webpackJsonp([2],{0:function(e,t,r){"use strict";r(12),r(2),r(11),r(54),r(121),r(123),r(124)},12:function(e,t,r){(function(e){!function(e,n){n(t,r(2))}(this,function(t,r){"use strict";function getTypeNameForDebugging(e){return e.name||typeof e}function isPresent(e){return void 0!==e&&null!==e}function isBlank(e){return void 0===e||null===e}function isStringMap(e){return"object"==typeof e&&null!==e}function isArray(e){return Array.isArray(e)}function isDate(e){return e instanceof Date&&!isNaN(e.valueOf())}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 getSymbolIterator(){if(isBlank(p))if(isPresent(n.Symbol)&&isPresent(Symbol.iterator))p=Symbol.iterator;else for(var e=Object.getOwnPropertyNames(Map.prototype),t=0;t0&&t.startsWith(e)?t.substring(e.length):t}function _stripIndexHtml(e){return/\/index.html$/g.test(e)?e.substring(0,e.length-11):e}function getPluralCategory(e,t,r){var n="="+e;return t.indexOf(n)>-1?n:r.getPluralCategory(e)}function getPluralCase(e,t){"string"==typeof t&&(t=parseInt(t,10));var r=t,n=r.toString().replace(/^[^.]*\.?/,""),i=Math.floor(Math.abs(r)),o=n.length,s=parseInt(n,10),a=parseInt(r.toString().replace(/^[^.]*\.?|0+$/g,""),10)||0,l=e.split("-")[0].toLowerCase();switch(l){case"af":case"asa":case"az":case"bem":case"bez":case"bg":case"brx":case"ce":case"cgg":case"chr":case"ckb":case"ee":case"el":case"eo":case"es":case"eu":case"fo":case"fur":case"gsw":case"ha":case"haw":case"hu":case"jgo":case"jmc":case"ka":case"kk":case"kkj":case"kl":case"ks":case"ksb":case"ky":case"lb":case"lg":case"mas":case"mgo":case"ml":case"mn":case"nb":case"nd":case"ne":case"nn":case"nnh":case"nyn":case"om":case"or":case"os":case"ps":case"rm":case"rof":case"rwk":case"saq":case"seh":case"sn":case"so":case"sq":case"ta":case"te":case"teo":case"tk":case"tr":case"ug":case"uz":case"vo":case"vun":case"wae":case"xog":return 1===r?u.One:u.Other;case"agq":case"bas":case"cu":case"dav":case"dje":case"dua":case"dyo":case"ebu":case"ewo":case"guz":case"kam":case"khq":case"ki":case"kln":case"kok":case"ksf":case"lrc":case"lu":case"luo":case"luy":case"mer":case"mfe":case"mgh":case"mua":case"mzn":case"nmg":case"nus":case"qu":case"rn":case"rw":case"sbp":case"twq":case"vai":case"yav":case"yue":case"zgh":case"ak":case"ln":case"mg":case"pa":case"ti":return r===Math.floor(r)&&r>=0&&r<=1?u.One:u.Other;case"am":case"as":case"bn":case"fa":case"gu":case"hi":case"kn":case"mr":case"zu":return 0===i||1===r?u.One:u.Other;case"ar":return 0===r?u.Zero:1===r?u.One:2===r?u.Two:r%100===Math.floor(r%100)&&r%100>=3&&r%100<=10?u.Few:r%100===Math.floor(r%100)&&r%100>=11&&r%100<=99?u.Many:u.Other;case"ast":case"ca":case"de":case"en":case"et":case"fi":case"fy":case"gl":case"it":case"nl":case"sv":case"sw":case"ur":case"yi":return 1===i&&0===o?u.One:u.Other;case"be":return r%10===1&&r%100!==11?u.One:r%10===Math.floor(r%10)&&r%10>=2&&r%10<=4&&!(r%100>=12&&r%100<=14)?u.Few:r%10===0||r%10===Math.floor(r%10)&&r%10>=5&&r%10<=9||r%100===Math.floor(r%100)&&r%100>=11&&r%100<=14?u.Many:u.Other;case"br":return r%10===1&&r%100!==11&&r%100!==71&&r%100!==91?u.One:r%10===2&&r%100!==12&&r%100!==72&&r%100!==92?u.Two:r%10===Math.floor(r%10)&&(r%10>=3&&r%10<=4||r%10===9)&&!(r%100>=10&&r%100<=19||r%100>=70&&r%100<=79||r%100>=90&&r%100<=99)?u.Few:0!==r&&r%1e6===0?u.Many:u.Other;case"bs":case"hr":case"sr":return 0===o&&i%10===1&&i%100!==11||s%10===1&&s%100!==11?u.One:0===o&&i%10===Math.floor(i%10)&&i%10>=2&&i%10<=4&&!(i%100>=12&&i%100<=14)||s%10===Math.floor(s%10)&&s%10>=2&&s%10<=4&&!(s%100>=12&&s%100<=14)?u.Few:u.Other;case"cs":case"sk":return 1===i&&0===o?u.One:i===Math.floor(i)&&i>=2&&i<=4&&0===o?u.Few:0!==o?u.Many:u.Other;case"cy":return 0===r?u.Zero:1===r?u.One:2===r?u.Two:3===r?u.Few:6===r?u.Many:u.Other;case"da":return 1===r||0!==a&&(0===i||1===i)?u.One:u.Other;case"dsb":case"hsb":return 0===o&&i%100===1||s%100===1?u.One:0===o&&i%100===2||s%100===2?u.Two:0===o&&i%100===Math.floor(i%100)&&i%100>=3&&i%100<=4||s%100===Math.floor(s%100)&&s%100>=3&&s%100<=4?u.Few:u.Other;case"ff":case"fr":case"hy":case"kab":return 0===i||1===i?u.One:u.Other;case"fil":return 0===o&&(1===i||2===i||3===i)||0===o&&i%10!==4&&i%10!==6&&i%10!==9||0!==o&&s%10!==4&&s%10!==6&&s%10!==9?u.One:u.Other;case"ga":return 1===r?u.One:2===r?u.Two:r===Math.floor(r)&&r>=3&&r<=6?u.Few:r===Math.floor(r)&&r>=7&&r<=10?u.Many:u.Other;case"gd":return 1===r||11===r?u.One:2===r||12===r?u.Two:r===Math.floor(r)&&(r>=3&&r<=10||r>=13&&r<=19)?u.Few:u.Other;case"gv":return 0===o&&i%10===1?u.One:0===o&&i%10===2?u.Two:0!==o||i%100!==0&&i%100!==20&&i%100!==40&&i%100!==60&&i%100!==80?0!==o?u.Many:u.Other:u.Few;case"he":return 1===i&&0===o?u.One:2===i&&0===o?u.Two:0!==o||r>=0&&r<=10||r%10!==0?u.Other:u.Many;case"is":return 0===a&&i%10===1&&i%100!==11||0!==a?u.One:u.Other;case"ksh":return 0===r?u.Zero:1===r?u.One:u.Other;case"kw":case"naq":case"se":case"smn":return 1===r?u.One:2===r?u.Two:u.Other;case"lag":return 0===r?u.Zero:0!==i&&1!==i||0===r?u.Other:u.One;case"lt":return r%10!==1||r%100>=11&&r%100<=19?r%10===Math.floor(r%10)&&r%10>=2&&r%10<=9&&!(r%100>=11&&r%100<=19)?u.Few:0!==s?u.Many:u.Other:u.One;case"lv":case"prg":return r%10===0||r%100===Math.floor(r%100)&&r%100>=11&&r%100<=19||2===o&&s%100===Math.floor(s%100)&&s%100>=11&&s%100<=19?u.Zero:r%10===1&&r%100!==11||2===o&&s%10===1&&s%100!==11||2!==o&&s%10===1?u.One:u.Other;case"mk":return 0===o&&i%10===1||s%10===1?u.One:u.Other;case"mt":return 1===r?u.One:0===r||r%100===Math.floor(r%100)&&r%100>=2&&r%100<=10?u.Few:r%100===Math.floor(r%100)&&r%100>=11&&r%100<=19?u.Many:u.Other;case"pl":return 1===i&&0===o?u.One:0===o&&i%10===Math.floor(i%10)&&i%10>=2&&i%10<=4&&!(i%100>=12&&i%100<=14)?u.Few:0===o&&1!==i&&i%10===Math.floor(i%10)&&i%10>=0&&i%10<=1||0===o&&i%10===Math.floor(i%10)&&i%10>=5&&i%10<=9||0===o&&i%100===Math.floor(i%100)&&i%100>=12&&i%100<=14?u.Many:u.Other;case"pt":return r===Math.floor(r)&&r>=0&&r<=2&&2!==r?u.One:u.Other;case"ro":return 1===i&&0===o?u.One:0!==o||0===r||1!==r&&r%100===Math.floor(r%100)&&r%100>=1&&r%100<=19?u.Few:u.Other;case"ru":case"uk":return 0===o&&i%10===1&&i%100!==11?u.One:0===o&&i%10===Math.floor(i%10)&&i%10>=2&&i%10<=4&&!(i%100>=12&&i%100<=14)?u.Few:0===o&&i%10===0||0===o&&i%10===Math.floor(i%10)&&i%10>=5&&i%10<=9||0===o&&i%100===Math.floor(i%100)&&i%100>=11&&i%100<=14?u.Many:u.Other;case"shi":return 0===i||1===r?u.One:r===Math.floor(r)&&r>=2&&r<=10?u.Few:u.Other;case"si":return 0===r||1===r||0===i&&1===s?u.One:u.Other;case"sl":return 0===o&&i%100===1?u.One:0===o&&i%100===2?u.Two:0===o&&i%100===Math.floor(i%100)&&i%100>=3&&i%100<=4||0!==o?u.Few:u.Other;case"tzm":return r===Math.floor(r)&&r>=0&&r<=1||r===Math.floor(r)&&r>=11&&r<=99?u.One:u.Other;default:return u.Other}}function _flattenArray(e,t){if(isPresent(e))for(var r=0;r0&&!e.startsWith("/")&&(e="/"+e),this._platformStrategy.prepareExternalUrl(e)},Location.prototype.go=function(e,t){void 0===t&&(t=""),this._platformStrategy.pushState(null,"",e,t)},Location.prototype.replaceState=function(e,t){void 0===t&&(t=""),this._platformStrategy.replaceState(null,"",e,t)},Location.prototype.forward=function(){this._platformStrategy.forward()},Location.prototype.back=function(){this._platformStrategy.back()},Location.prototype.subscribe=function(e,t,r){return void 0===t&&(t=null),void 0===r&&(r=null),this._subject.subscribe({next:e,error:t,complete:r})},Location.normalizeQueryParams=function(e){return e.length>0&&"?"!=e.substring(0,1)?"?"+e:e},Location.joinWithSlash=function(e,t){if(0==e.length)return t;if(0==t.length)return e;var r=0;return e.endsWith("/")&&r++,t.startsWith("/")&&r++,2==r?e+t.substring(1):1==r?e+t:e+"/"+t},Location.stripTrailingSlash=function(e){return/\/$/g.test(e)&&(e=e.substring(0,e.length-1)),e},Location.decorators=[{type:r.Injectable}],Location.ctorParameters=[{type:o}],Location}(),f=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 __)},d=function(e){function HashLocationStrategy(t,r){e.call(this),this._platformLocation=t,this._baseHref="",isPresent(r)&&(this._baseHref=r)}return f(HashLocationStrategy,e),HashLocationStrategy.prototype.onPopState=function(e){this._platformLocation.onPopState(e),this._platformLocation.onHashChange(e)},HashLocationStrategy.prototype.getBaseHref=function(){return this._baseHref},HashLocationStrategy.prototype.path=function(e){void 0===e&&(e=!1);var t=this._platformLocation.hash;return isPresent(t)||(t="#"),t.length>0?t.substring(1):t},HashLocationStrategy.prototype.prepareExternalUrl=function(e){var t=h.joinWithSlash(this._baseHref,e);return t.length>0?"#"+t:t},HashLocationStrategy.prototype.pushState=function(e,t,r,n){var i=this.prepareExternalUrl(r+h.normalizeQueryParams(n));0==i.length&&(i=this._platformLocation.pathname),this._platformLocation.pushState(e,t,i)},HashLocationStrategy.prototype.replaceState=function(e,t,r,n){var i=this.prepareExternalUrl(r+h.normalizeQueryParams(n));0==i.length&&(i=this._platformLocation.pathname),this._platformLocation.replaceState(e,t,i)},HashLocationStrategy.prototype.forward=function(){this._platformLocation.forward()},HashLocationStrategy.prototype.back=function(){this._platformLocation.back()},HashLocationStrategy.decorators=[{type:r.Injectable}],HashLocationStrategy.ctorParameters=[{type:i},{type:void 0,decorators:[{type:r.Optional},{type:r.Inject,args:[s]}]}],HashLocationStrategy}(o),m=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 __)},y=function(e){function PathLocationStrategy(t,r){if(e.call(this),this._platformLocation=t,isBlank(r)&&(r=this._platformLocation.getBaseHrefFromDOM()),isBlank(r))throw new Error("No base href set. Please provide a value for the APP_BASE_HREF token or add a base element to the document.");this._baseHref=r}return m(PathLocationStrategy,e),PathLocationStrategy.prototype.onPopState=function(e){this._platformLocation.onPopState(e),this._platformLocation.onHashChange(e)},PathLocationStrategy.prototype.getBaseHref=function(){return this._baseHref},PathLocationStrategy.prototype.prepareExternalUrl=function(e){return h.joinWithSlash(this._baseHref,e)},PathLocationStrategy.prototype.path=function(e){void 0===e&&(e=!1);var t=this._platformLocation.pathname+h.normalizeQueryParams(this._platformLocation.search),r=this._platformLocation.hash;return r&&e?""+t+r:t},PathLocationStrategy.prototype.pushState=function(e,t,r,n){var i=this.prepareExternalUrl(r+h.normalizeQueryParams(n));this._platformLocation.pushState(e,t,i)},PathLocationStrategy.prototype.replaceState=function(e,t,r,n){var i=this.prepareExternalUrl(r+h.normalizeQueryParams(n));this._platformLocation.replaceState(e,t,i)},PathLocationStrategy.prototype.forward=function(){this._platformLocation.forward()},PathLocationStrategy.prototype.back=function(){this._platformLocation.back()},PathLocationStrategy.decorators=[{type:r.Injectable}],PathLocationStrategy.ctorParameters=[{type:i},{type:void 0,decorators:[{type:r.Optional},{type:r.Inject,args:[s]}]}],PathLocationStrategy}(o),v=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 __)},g=function(){function NgLocalization(){}return NgLocalization}(),_=function(e){function NgLocaleLocalization(t){e.call(this),this._locale=t}return v(NgLocaleLocalization,e),NgLocaleLocalization.prototype.getPluralCategory=function(e){var t=getPluralCase(this._locale,e);switch(t){case u.Zero:return"zero";case u.One:return"one";case u.Two:return"two";case u.Few:return"few";case u.Many:return"many";default:return"other"}},NgLocaleLocalization.decorators=[{type:r.Injectable}],NgLocaleLocalization.ctorParameters=[{type:void 0,decorators:[{type:r.Inject,args:[r.LOCALE_ID]}]}],NgLocaleLocalization}(g);!function(e){e[e.Zero=0]="Zero",e[e.One=1]="One",e[e.Two=2]="Two",e[e.Few=3]="Few",e[e.Many=4]="Many",e[e.Other=5]="Other"}(u||(u={}));var b,w=(function(){return(new Map).keys().next?function(e){for(var t,r=e.keys();!(t=r.next()).done;)e.set(t.value,null)}:function(e){e.forEach(function(t,r){e.set(r,null)})}}(),function(){try{if((new Map).values().next)return function(e,t){return t?Array.from(e.values()):Array.from(e.keys())}}catch(e){}return function(e,t){var r=new Array(e.size),n=0;return e.forEach(function(e,i){r[n]=t?e:i,n++}),r}}(),function(){function ListWrapper(){}return ListWrapper.createFixedSize=function(e){return new Array(e)},ListWrapper.createGrowableSize=function(e){return new Array(e)},ListWrapper.clone=function(e){return e.slice(0)},ListWrapper.forEachWithIndex=function(e,t){for(var r=0;r-1&&(e.splice(r,1),!0)},ListWrapper.clear=function(e){e.length=0},ListWrapper.isEmpty=function(e){return 0==e.length},ListWrapper.fill=function(e,t,r,n){void 0===r&&(r=0),void 0===n&&(n=null),e.fill(t,r,null===n?e.length:n)},ListWrapper.equals=function(e,t){if(e.length!=t.length)return!1;for(var r=0;rn&&(r=o,n=s)}}return r},ListWrapper.flatten=function(e){var t=[];return _flattenArray(e,t),t},ListWrapper.addAll=function(e,t){for(var r=0;r=Kt&&e<=Jt||e==zr}function isDigit(e){return br<=e&&e<=wr}function isAsciiLetter(e){return e>=Nr&&e<=Wr||e>=Cr&&e<=Ar}function isAsciiHexDigit(e){return e>=Nr&&e<=Vr||e>=Cr&&e<=Sr||isDigit(e)}function assertArrayOfStrings(e,t){if(r.isDevMode()&&!isBlank(t)){if(!isArray(t))throw new Error("Expected '"+e+"' to be an array of strings.");for(var n=0;n;" or "&#x;" syntax'}function isNotWhitespace(e){return!isWhitespace(e)||e===qt}function isNameEnd(e){return isWhitespace(e)||e===gr||e===fr||e===or||e===er||e===vr}function isPrefixEnd(e){return(ewr)}function isDigitEntityEnd(e){return e==mr||e==qt||!isAsciiHexDigit(e)}function isNamedEntityEnd(e){return e==mr||e==qt||!isAsciiLetter(e)}function isExpansionFormStart(e,t,r){var n=!!r&&e.indexOf(r.start,t)==t;return e.charCodeAt(t)==Ur&&!n}function isExpansionCaseStart(e){return e===vr||isAsciiLetter(e)}function compareCharCodeCaseInsensitive(e,t){return toUpperCaseCharCode(e)==toUpperCaseCharCode(t)}function toUpperCaseCharCode(e){return e>=Nr&&e<=Wr?e-Nr+Cr:e}function mergeTextTokens(e){for(var t,r=[],n=0;n0&&e[e.length-1]===t}function digestMessage(e){return sha1(serializeNodes(e.nodes).join("")+("["+e.meaning+"]"))}function serializeNodes(e){return e.map(function(e){return e.visit(Vn,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],l=o[3],c=o[4];r[n>>5]|=128<<24-n%32,r[(n+64>>9<<4)+15]=n;for(var p=0;p>>4&15).toString(16)+(15&P).toString(16)}return S.toLowerCase();var A,x}function utf8Encode(e){for(var t="",r=0;r>>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>>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<>>32-t}function createI18nMessageFactory(e){var t=new zn(Gn,e);return function(e,r,n){return t.toI18nMessage(e,r,n)}}function _extractPlaceholderName(e){return e.split(qn)[1]}function extractMessages(e,t,r,n){var i=new ei(r,n);return i.extract(e,t)}function mergeTranslations(e,t,r,n,i){var o=new ei(n,i);return o.merge(e,t,r)}function _isOpeningComment(e){return e instanceof _n&&e.value&&e.value.startsWith("i18n")}function _isClosingComment(e){return e instanceof _n&&e.value&&"/i18n"===e.value}function _getI18nAttr(e){return e.attrs.find(function(e){return e.name===Zn})||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 ni}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(ui)}).join("")}function _escapeXml(e){return di.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 resolveIdentifier(e){return new ot({name:e.name,moduleUrl:e.moduleUrl,reference:Eo.resolveIdentifier(e.name,e.moduleUrl,e.runtime)})}function identifierToken(e){return new lt({identifier:e})}function resolveIdentifierToken(e){return identifierToken(resolveIdentifier(e))}function resolveEnumIdentifier(e,t){var r=Eo.resolveEnum(e.reference,t);return new ot({name:e.name+"."+t,moduleUrl:e.moduleUrl,reference:r})}function expandNodes(e){var t=new Jo;return new Xo(visitAll(t,e),t.isExpanded,t.errors)}function _expandPluralForm(e,t){var r=e.cases.map(function(e){Zo.indexOf(e.value)!=-1||e.value.match(/^=\d+$/)||t.push(new $o(e.valueSourceSpan,'Plural cases should be "=" or one of '+Zo.join(", ")));var r=expandNodes(e.expression);return t.push.apply(t,r.errors),new gn("template",[new vn("ngPluralCase",""+e.value,e.valueSourceSpan)],r.nodes,e.sourceSpan,e.sourceSpan,e.sourceSpan)}),n=new vn("[ngPlural]",e.switchValue,e.switchValueSourceSpan);return new gn("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 gn("template",[new vn("ngSwitchCase",""+e.value,e.valueSourceSpan)],r.nodes,e.sourceSpan,e.sourceSpan,e.sourceSpan)}),n=new vn("[ngSwitch]",e.switchValue,e.switchValueSourceSpan);return new gn("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 at({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 b(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(isArray(e))_normalizeProviders(e,t,r,n);else{var i=void 0;e instanceof at?i=e:e instanceof ct?i=new at({token:new lt({identifier:e}),useClass:e}):r.push(new es("Unknown provider type "+e,t)),isPresent(i)&&n.push(i)}}),n}function _resolveProvidersFromDirectives(e,r,n){var i=new Map;e.forEach(function(e){var o=new at({token:new lt({identifier:e.type}),useClass:e.type});_resolveProviders([o],e.isComponent?t.ProviderAstType.Component:t.ProviderAstType.Directive,!0,r,n,i)});var o=e.filter(function(e){return e.isComponent}).concat(e.filter(function(e){return!e.isComponent}));return o.forEach(function(e){_resolveProviders(_normalizeProviders(e.providers,r,n),t.ProviderAstType.PublicService,!1,r,n,i),_resolveProviders(_normalizeProviders(e.viewProviders,r,n),t.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 es("Mixing multi and non multi provider is not possible for token "+s.token.name,n)),s)e.multi||x.clear(s.providers),s.providers.push(e);else{var a=e.token.identifier&&e.token.identifier instanceof ct?e.token.identifier.lifecycleHooks:[];s=new b(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(as);return null===t||"package"==t[1]||"asset"==t[1]}function extractStyleUrls(e,t,r){var n=[],i=s.replaceAllMapped(r,ss,function(r){var i=isPresent(r[1])?r[1]:r[2];return isStyleUrlResolvable(i)?(n.push(e.resolve(t,i)),""):r[0]});return new os(i,n)}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==us?t=e.value:s==hs?r=e.value:s==ps?n=e.value:e.name==ys?i=!0:e.name==vs&&e.value.length>0&&(o=e.value)}),t=normalizeNgContentSelect(t);var s=e.name.toLowerCase(),a=Yn.OTHER;return splitNsName(s)[1]==ls?a=Yn.NG_CONTENT:s==ds?a=Yn.STYLE:s==ms?a=Yn.SCRIPT:s==cs&&n==fs&&(a=Yn.STYLESHEET),new _s(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 V,n=splitNsName(e)[1];r.setElement(n);for(var i=0;i0&&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){isStringMap(e)?r.push(e):t.push(new Ba("State based animations cannot contain references to other states"))});var n=new pa(r),i=e.stateNameExpr.split(/\s*,\s*/);return i.map(function(e){return new aa(e,n)})}function _parseAnimationStateTransition(e,t,r){var n=new Ra,i=[],o=e.stateChangeExpr.split(/\s*,\s*/);o.forEach(function(e){_parseAnimationTransitionExpr(e,r).forEach(function(e){i.push(e)})});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 l=u instanceof fa?u:new ma([u]);return new la(i,l)}function _parseAnimationTransitionExpr(e,t){var r=[],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 ua(i,s));var a=i==Do&&s==Do;return"<"!=o[0]||a||r.push(new ua(s,i)),r}function _normalizeAnimationEntry(e){return isArray(e)?new nt(e):e}function _normalizeStyleMetadata(e,t,r){var n=[];return e.styles.forEach(function(e){isString(e)?x.addAll(n,_resolveStylesFromState(e,t,r)):n.push(e)}),n}function _normalizeStyleSteps(e,t,r){var n=_normalizeStyleStepEntry(e,t,r);return e instanceof it?new it(n):new nt(n)}function _mergeAnimationStyles(e,t){if(isStringMap(t)&&e.length>0){var r=e.length-1,n=e[r];if(isStringMap(n))return void(e[r]=A.merge(n,t))}e.push(t)}function _normalizeStyleStepEntry(e,t,r){var n;if(!(e instanceof rt))return[e];n=e.steps;var i,o=[];return n.forEach(function(e){if(e instanceof et)isPresent(i)||(i=[]),_normalizeStyleMetadata(e,t,r).forEach(function(e){_mergeAnimationStyles(i,e)});else{if(isPresent(i)&&(o.push(new et(0,i)),i=null),e instanceof tt){var n=e.styles;n instanceof et?n.styles=_normalizeStyleMetadata(n,t,r):n instanceof Ye&&n.steps.forEach(function(e){e.styles=_normalizeStyleMetadata(e,t,r)})}else if(e instanceof rt){var s=_normalizeStyleStepEntry(e,t,r);e=e instanceof it?new it(s):new nt(s)}o.push(e)}}),isPresent(i)&&o.push(new et(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){isStringMap(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=0;f--)b();return l.map(function(e){return new ha(e[0],new pa([e[1]]))})}function _parseTransitionAnimation(e,t,r,n,i){var o,s=0,a=t;if(e instanceof rt){var u,l=0,c=[],p=e instanceof it;if(e.steps.forEach(function(e){var o=p?a:t;if(e instanceof et)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 rt){var f=new pa(u);c.push(new ca(f,[],0,0,""))}else{var d=h;x.addAll(d.startingStyles.styles,u)}u=null}var m=h.playTime;t+=m,s+=m,l=Oa.max(m,l),c.push(h)}),isPresent(u)){var h=new pa(u);c.push(new ca(h,[],0,0,""))}p?(o=new da(c),s=l,t=a+s):o=new ma(c)}else if(e instanceof tt){var f,d=_parseTimeExpression(e.timings,i),m=e.styles;if(m instanceof Ye)f=_parseAnimationKeyframes(m,t,r,n,i);else{var y=m,v=Fa,g=new pa(y.styles),_=new ha(v,g);f=[_]}o=new ca(new pa([]),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 ca(null,[],0,0,"");return o.playTime=s,o.startTime=a,o}function _fillAnimationAstStartingKeyframes(e,t,r){if(e instanceof ca&&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 fa&&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(isString(e)){var s=e.match(n);if(null===s)return t.push(new Ba('The provided timing value "'+e+'" is invalid.')),new Ha(0,0,null);var a=parseFloat(s[1]),u=s[2];"s"==u&&(a*=ja),r=Oa.floor(a);var l=s[3],c=s[4];if(isPresent(l)){var p=parseFloat(l);isPresent(c)&&"s"==c&&(p*=ja),i=Oa.floor(p)}var h=s[5];isBlank(h)||(o=h)}else r=e;return new Ha(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,l,c,p=n.indexOfAtOrBeforeTime(r,t);isPresent(p)?(u=n.getByIndex(r,p),c=u.value,l=n.getByIndex(r,p+1)):c=Vo,isPresent(l)&&!l.matches(s,a)&&i.push(new Ba('The animated CSS property "'+r+'" unexpectedly changes between steps "'+u.time+'ms" and "'+s+'ms" at "'+l.time+'ms"')),o[r]=c}})}),new ha(La,new pa([o]))}function convertValueToOutputAst(e,t){return void 0===t&&(t=null),visitValue(e,new Ga,t)}function getPropertyInView(e,t,r){if(t===r)return e;for(var n=be,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);if(e instanceof ye){var o=e;(r.fields.some(function(e){return e.name==o.name})||r.getters.some(function(e){return e.name==o.name}))&&(n=n.cast(r.classType))}return replaceVarInExpression(be.name,n,e)}function injectFromViewParentInjector(e,t){var r=[createDiTokenExpression(e)];return t&&r.push(Ce),be.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;n0&&(r=r.callMethod(Y.ConcatArray,[literalArr(t)]),t=[]),r=r.callMethod(Y.ConcatArray,[i])):t.push(i)}return t.length>0&&(r=r.callMethod(Y.ConcatArray,[literalArr(t)])),r}function createPureProxy(e,t,r,n){n.fields.push(new Ie(r.name,null));var i=t0?literal(e).lowerEquals(ru.requestNodeIndex).and(ru.requestNodeIndex.lowerEquals(literal(e+t))):literal(e).identical(ru.requestNodeIndex),new Ve(ru.token.identical(createDiTokenExpression(r.token)).and(i),[new Te(n)])}function createProviderProperty(e,t,r,n,i,o){var s,a,u=o.view;if(n?(s=literalArr(r),a=new G(q)):(s=r[0],a=r[0].type),a||(a=q),i)u.fields.push(new Ie(e,a)),u.createMethod.addStmt(be.prop(e).set(s).toStmt());else{var l="_"+e;u.fields.push(new Ie(l,a));var c=new Ka(u);c.resetDebugInfo(o.nodeIndex,o.sourceAst),c.addStmt(new Ve(be.prop(l).isBlank(),[be.prop(l).set(s).toStmt()])),c.addStmt(new Te(be.prop(l))),u.getters.push(new Ne(e,c.finish(),a))}return be.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?Xi.EMBEDDED:e.type.isHost?Xi.HOST:Xi.COMPONENT}function convertCdExpressionToIr(e,t,r,n,i){var o=new fu(e,t,n,i),s=r.visit(o,gs.Expression);return new pu(s,o.needsValueUnwrapper,o.temporaryCount)}function convertCdStatementToIr(e,t,r,n){var i=new fu(e,t,null,n),o=[];return flattenStatements(r.visit(i,gs.Statement),o),prependTemporaryDecls(i.temporaryCount,n,o),o}function temporaryName(e,t){return"tmp_"+e+"_"+t}function temporaryDeclaration(e,t){return new Pe(temporaryName(e,t),Ce)}function prependTemporaryDecls(e,t,r){for(var n=e-1;n>=0;n--)r.unshift(temporaryDeclaration(t,n))}function ensureStatementMode(e,t){if(e!==gs.Statement)throw new Error("Expected a statement, but saw "+t)}function ensureExpressionMode(e,t){if(e!==gs.Expression)throw new Error("Expected an expression, but saw "+t)}function convertToStatementIfNeeded(e,t){return e===gs.Statement?t.toStmt():t}function flattenStatements(e,t){isArray(e)?e.forEach(function(e){return flattenStatements(e,t)}):t.push(e)}function collectEventListeners(e,t,r){var n=[];return e.forEach(function(e){r.view.bindings.push(new cu(r,e));var t=du.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){r.view.bindings.push(new cu(r,i));var o=du.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.eventPhase?e.listenToAnimation():e.listenToRenderer()})}function convertStmtIntoExpression(e){return e instanceof xe?e.expr:e instanceof Te?e.value:null}function santitizeEventName(e){return s.replaceAll(e,/[^a-zA-Z_]/g,"_")}function bindDirectiveDetectChangesLifecycleCallbacks(e,t,r){var n=r.view,i=n.detectChangesInInputsMethod,o=e.directive.type.lifecycleHooks;o.indexOf(Wi.OnChanges)!==-1&&e.inputs.length>0&&i.addStmt(new Ve(nu.changes.notIdentical(Ce),[t.callMethod("ngOnChanges",[nu.changes]).toStmt()])),o.indexOf(Wi.OnInit)!==-1&&i.addStmt(new Ve(mu.and(yu),[t.callMethod("ngOnInit",[]).toStmt()])),o.indexOf(Wi.DoCheck)!==-1&&i.addStmt(new Ve(yu,[t.callMethod("ngDoCheck",[]).toStmt()]))}function bindDirectiveAfterContentLifecycleCallbacks(e,t,r){var n=r.view,i=e.type.lifecycleHooks,o=n.afterContentLifecycleCallbacksMethod;o.resetDebugInfo(r.nodeIndex,r.sourceAst),i.indexOf(Wi.AfterContentInit)!==-1&&o.addStmt(new Ve(mu,[t.callMethod("ngAfterContentInit",[]).toStmt()])),i.indexOf(Wi.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(Wi.AfterViewInit)!==-1&&o.addStmt(new Ve(mu,[t.callMethod("ngAfterViewInit",[]).toStmt()])),i.indexOf(Wi.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(Wi.OnDestroy)!==-1&&n.addStmt(t.callMethod("ngOnDestroy",[]).toStmt())}function bindPipeDestroyLifecycleCallbacks(e,t,r){var n=r.destroyMethod;e.type.lifecycleHooks.indexOf(Wi.OnDestroy)!==-1&&n.addStmt(t.callMethod("ngOnDestroy",[]).toStmt())}function createBindFieldExpr(e){return be.prop("_expr_"+e)}function createCurrValueExpr(e){return variable("currVal_"+e)}function bind(e,t,r,n,i,o,s,a){var u=convertCdExpressionToIr(e,i,n,nu.valUnwrapper,a);if(u.expression){if(u.temporaryCount)for(var l=0;l0}));return u}function createViewFactory(e,t,r){var n,i=[new fe(Ya.viewUtils.name,importType(resolveIdentifier(zo.ViewUtils))),new fe(Ya.parentInjector.name,importType(resolveIdentifier(zo.Injector))),new fe(Ya.declarationEl.name,importType(resolveIdentifier(zo.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 Ve(r.identical(Ce),[r.set(Ya.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 Te(variable(t.name).instantiate(t.constructorMethod.params.map(function(e){return variable(e.name)})))]),importType(resolveIdentifier(zo.AppView),[getContextType(e)])).toDeclStmt(e.viewFactory.name,[ie.Final])}function generateCreateMethod(e){var t=Ce,r=[];e.viewType===Xi.COMPONENT&&(t=eu.renderer.callMethod("createViewRoot",[be.prop("declarationAppElement").prop("nativeElement")]),r=[Cu.set(t).toDeclStmt(importType(e.genConfig.renderTypes.renderNode),[ie.Final])]);var n;return n=e.viewType===Xi.HOST?e.nodes[0].appElement:Ce,r.concat(e.createMethod.finish(),[be.callMethod("init",[createFlatArray(e.rootNodesOrAppElements),literalArr(e.nodes.map(function(e){return e.renderNode})),literalArr(e.disposables),literalArr(e.subscriptions)]).toStmt(),new Te(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;x.addAll(t,e.animationBindingsMethod.finish()),x.addAll(t,e.detectChangesInInputsMethod.finish()),t.push(be.callMethod("detectContentChildrenChanges",[nu.throwOnChange]).toStmt());var r=e.updateContentQueriesMethod.finish().concat(e.afterContentLifecycleCallbacksMethod.finish());r.length>0&&t.push(new Ve(not(nu.throwOnChange),r)),x.addAll(t,e.detectChangesRenderPropertiesMethod.finish()),t.push(be.callMethod("detectViewChildrenChanges",[nu.throwOnChange]).toStmt());var n=e.updateViewQueriesMethod.finish().concat(e.afterViewLifecycleCallbacksMethod.finish());n.length>0&&t.push(new Ve(not(nu.throwOnChange),n));var i=[],o=findReadVarNames(t);return o.has(nu.changed.name)&&i.push(nu.changed.set(literal(!0)).toDeclStmt(K)),o.has(nu.changes.name)&&i.push(nu.changes.set(Ce).toDeclStmt(new z(importType(resolveIdentifier(zo.SimpleChange))))),o.has(nu.valUnwrapper.name)&&i.push(nu.valUnwrapper.set(importExpr(resolveIdentifier(zo.ValueUnwrapper)).instantiate([])).toDeclStmt(null,[ie.Final])),i.concat(t)}function addReturnValuefNotEmpty(e,t){return e.length>0?e.concat([new Te(t)]):e}function getContextType(e){return e.viewType===Xi.COMPONENT?importType(e.component.type):q}function getChangeDetectionMode(e){var t;return t=e.viewType===Xi.COMPONENT?ji(e.component.changeDetection)?Bi.CheckAlways:Bi.CheckOnce:Bi.CheckAlways}function _resolveViewStatements(e){return e.dependencies.forEach(function(e){if(e instanceof Su){var t=e;t.placeholder.moduleUrl=_ngfactoryModuleUrl(t.comp.moduleUrl)}else if(e instanceof Pu){var r=e;r.placeholder.name=_componentFactoryName(r.comp),r.placeholder.moduleUrl=_ngfactoryModuleUrl(r.comp.moduleUrl)}}),e.statements}function _resolveStyleStatements(e,t){return e.dependencies.forEach(function(e){e.valuePlaceholder.moduleUrl=_stylesModuleUrl(e.moduleUrl,e.isShimmed,t)}),e.statements}function _ngfactoryModuleUrl(e){var t=_splitTypescriptSuffix(e);return t[0]+".ngfactory"+t[1]}function _componentFactoryName(e){return e.name+"NgFactory"}function _stylesModuleUrl(e,t,r){return t?e+".shim"+r:""+e+r}function _assertComponent(e){if(!e.isComponent)throw new Error("Could not compile '"+e.type.name+"' because it is not a component.")}function _splitTypescriptSuffix(e){if(e.endsWith(".d.ts"))return[e.slice(0,-5),".ts"];var t=e.lastIndexOf(".");return t!==-1?[e.substring(0,t),e.substring(t)]:[e,""]}function createOfflineCompileUrlResolver(){return new Ru(Ou)}function getUrlScheme(e){var t=_split(e);return t&&t[hu.Scheme]||""}function _buildFromEncodedParts(e,t,r,n,i,o,s){var a=[];return isPresent(e)&&a.push(e+":"),isPresent(r)&&(a.push("//"),isPresent(t)&&a.push(t+"@"),a.push(r),isPresent(n)&&a.push(":"+n)),isPresent(i)&&a.push(i),isPresent(o)&&a.push("?"+o),isPresent(s)&&a.push("#"+s),a.join("")}function _split(e){return e.match(ku)}function _removeDotSegments(e){if("/"==e)return"/";for(var t="/"==e[0]?"/":"",r="/"===e[e.length-1]?"/":"",n=e.split("/"),i=[],o=0,s=0;s0?i.pop():o++;break;default:i.push(a)}}if(""==t){for(;o-- >0;)i.unshift("..");0===i.length&&i.push(".")}return t+i.join("/")+r}function _joinAndCanonicalizePath(e){var t=e[hu.Path];return t=isBlank(t)?"":_removeDotSegments(t),e[hu.Path]=t,_buildFromEncodedParts(e[hu.Scheme],e[hu.UserInfo],e[hu.Domain],e[hu.Port],t,e[hu.QueryData],e[hu.Fragment])}function _resolveUrl(e,t){var r=_split(encodeURI(t)),n=_split(e);if(isPresent(r[hu.Scheme]))return _joinAndCanonicalizePath(r);r[hu.Scheme]=n[hu.Scheme];for(var i=hu.Scheme;i<=hu.Port;i++)isBlank(r[i])&&(r[i]=n[i]);if("/"==r[hu.Path][0])return _joinAndCanonicalizePath(r);var o=n[hu.Path];isBlank(o)&&(o="/");var s=o.lastIndexOf("/");return o=o.substring(0,s+1)+r[hu.Path],r[hu.Path]=o,_joinAndCanonicalizePath(r)}function _cloneDirectiveWithTemplate(e,t){return new dt({type:e.type,isComponent:e.isComponent,selector:e.selector,exportAs:e.exportAs,changeDetection:e.changeDetection,inputs:e.inputs,outputs:e.outputs,hostListeners:e.hostListeners,hostProperties:e.hostProperties,hostAttributes:e.hostAttributes,providers:e.providers,viewProviders:e.viewProviders,queries:e.queries,viewQueries:e.viewQueries,entryComponents:e.entryComponents,template:t})}function isDirectiveMetadata(e){return e instanceof r.Directive}function hasLifecycleHook(e,t){var r=Bu.get(e),n=Wu.get(e);return Eo.hasLifecycleHook(t,r,n)}function _isNgModuleMetadata(e){return e instanceof r.NgModule}function _isPipeMetadata(e){return e instanceof r.Pipe}function getTransitiveModules(e,t,r,n){return void 0===r&&(r=[]),void 0===n&&(n=new Set),e.forEach(function(e){if(!n.has(e.type.reference)){n.add(e.type.reference);var i=t?e.importedModules.concat(e.exportedModules):e.exportedModules;getTransitiveModules(i,t,r,n),r.push(e)}}),r}function flattenArray(e,t){if(void 0===t&&(t=[]),e)for(var n=0;n0?o.push(a):(o.length>0&&(n.push(o.join("")),r.push(Ul),o=[]),r.push(a)),a==Bl&&i++}return o.length>0&&(n.push(o.join("")),r.push(Ul)),new Gl(r.join(""),n)}function getStylesVarName(e){var t="styles";return e&&(t+="_"+e.type.name),t}function assertComponent(e){if(!e.isComponent)throw new Error("Could not compile '"+e.type.name+"' because it is not a component.")}function registerContext(e,t){for(var r=0,n=t;r=0;t--)if(void 0!==e[t])return e[t]}function _mergeArrays(e){var t=[];return e.forEach(function(e){return e&&t.push.apply(t,e)}),t}var n;n="undefined"==typeof window?"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:e:window;var i=n;i.assert=function(e){};var o=Object.getPrototypeOf({}),s=function(){function StringWrapper(){}return StringWrapper.fromCharCode=function(e){return String.fromCharCode(e)},StringWrapper.charCodeAt=function(e,t){return e.charCodeAt(t)},StringWrapper.split=function(e,t){return e.split(t)},StringWrapper.equals=function(e,t){return e===t},StringWrapper.stripLeft=function(e,t){if(e&&e.length){for(var r=0,n=0;n=0&&e[n]==t;n--)r--;e=e.substring(0,r)}return e},StringWrapper.replace=function(e,t,r){return e.replace(t,r)},StringWrapper.replaceAll=function(e,t,r){return e.replace(t,r)},StringWrapper.slice=function(e,t,r){return void 0===t&&(t=0),void 0===r&&(r=null),e.slice(t,null===r?void 0:r)},StringWrapper.replaceAllMapped=function(e,t,r){return e.replace(t,function(){for(var e=[],t=0;tt?1:0},StringWrapper}(),a=function(){function StringJoiner(e){void 0===e&&(e=[]),this.parts=e}return StringJoiner.prototype.add=function(e){this.parts.push(e)},StringJoiner.prototype.toString=function(){return this.parts.join("")},StringJoiner}(),u=function(){function NumberWrapper(){}return NumberWrapper.toFixed=function(e,t){return e.toFixed(t)},NumberWrapper.equal=function(e,t){return e===t},NumberWrapper.parseIntAutoRadix=function(e){var t=parseInt(e);if(isNaN(t))throw new Error("Invalid integer literal when parsing "+e);return t},NumberWrapper.parseInt=function(e,t){if(10==t){if(/^(\-|\+)?[0-9]+$/.test(e))return parseInt(e,t)}else if(16==t){if(/^(\-|\+)?[0-9ABCDEFabcdef]+$/.test(e))return parseInt(e,t)}else{var r=parseInt(e,t);if(!isNaN(r))return r}throw new Error("Invalid integer literal when parsing "+e+" in base "+t)},Object.defineProperty(NumberWrapper,"NaN",{get:function(){return NaN},enumerable:!0,configurable:!0}),NumberWrapper.isNumeric=function(e){return!isNaN(e-parseFloat(e))},NumberWrapper.isNaN=function(e){return isNaN(e)},NumberWrapper.isInteger=function(e){return Number.isInteger(e)},NumberWrapper}(),l=function(){function TextAst(e,t,r){this.value=e,this.ngContentIndex=t,this.sourceSpan=r}return TextAst.prototype.visit=function(e,t){return e.visitText(this,t)},TextAst}(),c=function(){function BoundTextAst(e,t,r){this.value=e,this.ngContentIndex=t,this.sourceSpan=r}return BoundTextAst.prototype.visit=function(e,t){return e.visitBoundText(this,t)},BoundTextAst}(),p=function(){function AttrAst(e,t,r){this.name=e,this.value=t,this.sourceSpan=r}return AttrAst.prototype.visit=function(e,t){return e.visitAttr(this,t)},AttrAst}(),h=function(){function BoundElementPropertyAst(e,t,r,n,i,o){this.name=e,this.type=t,this.securityContext=r,this.value=n,this.unit=i,this.sourceSpan=o}return BoundElementPropertyAst.prototype.visit=function(e,t){return e.visitElementProperty(this,t)},Object.defineProperty(BoundElementPropertyAst.prototype,"isAnimation",{get:function(){return this.type===t.PropertyBindingType.Animation},enumerable:!0,configurable:!0}),BoundElementPropertyAst}(),f=function(){function BoundEventAst(e,t,r,n,i){this.name=e,this.target=t,this.phase=r,this.handler=n,this.sourceSpan=i}return BoundEventAst.prototype.visit=function(e,t){return e.visitEvent(this,t)},Object.defineProperty(BoundEventAst.prototype,"fullName",{get:function(){return isPresent(this.target)?this.target+":"+this.name:this.name},enumerable:!0,configurable:!0}),Object.defineProperty(BoundEventAst.prototype,"isAnimation",{get:function(){return!!this.phase},enumerable:!0,configurable:!0}),BoundEventAst}(),d=function(){ function ReferenceAst(e,t,r){this.name=e,this.value=t,this.sourceSpan=r}return ReferenceAst.prototype.visit=function(e,t){return e.visitReference(this,t)},ReferenceAst}(),m=function(){function VariableAst(e,t,r){this.name=e,this.value=t,this.sourceSpan=r}return VariableAst.prototype.visit=function(e,t){return e.visitVariable(this,t)},VariableAst}(),y=function(){function ElementAst(e,t,r,n,i,o,s,a,u,l,c){this.name=e,this.attrs=t,this.inputs=r,this.outputs=n,this.references=i,this.directives=o,this.providers=s,this.hasViewContainer=a,this.children=u,this.ngContentIndex=l,this.sourceSpan=c}return ElementAst.prototype.visit=function(e,t){return e.visitElement(this,t)},ElementAst}(),v=function(){function EmbeddedTemplateAst(e,t,r,n,i,o,s,a,u,l){this.attrs=e,this.outputs=t,this.references=r,this.variables=n,this.directives=i,this.providers=o,this.hasViewContainer=s,this.children=a,this.ngContentIndex=u,this.sourceSpan=l}return EmbeddedTemplateAst.prototype.visit=function(e,t){return e.visitEmbeddedTemplate(this,t)},EmbeddedTemplateAst}(),g=function(){function BoundDirectivePropertyAst(e,t,r,n){this.directiveName=e,this.templateName=t,this.value=r,this.sourceSpan=n}return BoundDirectivePropertyAst.prototype.visit=function(e,t){return e.visitDirectiveProperty(this,t)},BoundDirectivePropertyAst}(),_=function(){function DirectiveAst(e,t,r,n,i){this.directive=e,this.inputs=t,this.hostProperties=r,this.hostEvents=n,this.sourceSpan=i}return DirectiveAst.prototype.visit=function(e,t){return e.visitDirective(this,t)},DirectiveAst}(),b=function(){function ProviderAst(e,t,r,n,i,o,s){this.token=e,this.multiProvider=t,this.eager=r,this.providers=n,this.providerType=i,this.lifecycleHooks=o,this.sourceSpan=s}return ProviderAst.prototype.visit=function(e,t){return null},ProviderAst}();t.ProviderAstType,function(e){e[e.PublicService=0]="PublicService",e[e.PrivateService=1]="PrivateService",e[e.Component=2]="Component",e[e.Directive=3]="Directive",e[e.Builtin=4]="Builtin"}(t.ProviderAstType||(t.ProviderAstType={}));var w=function(){function NgContentAst(e,t,r){this.index=e,this.ngContentIndex=t,this.sourceSpan=r}return NgContentAst.prototype.visit=function(e,t){return e.visitNgContent(this,t)},NgContentAst}();t.PropertyBindingType,function(e){e[e.Property=0]="Property",e[e.Attribute=1]="Attribute",e[e.Class=2]="Class",e[e.Style=3]="Style",e[e.Animation=4]="Animation"}(t.PropertyBindingType||(t.PropertyBindingType={}));var C,E=function(){try{if(1===new Map([[1,2]]).size)return function(e){return new Map(e)}}catch(e){}return function(e){for(var t=new Map,r=0;r-1&&(e.splice(r,1),!0)},ListWrapper.clear=function(e){e.length=0},ListWrapper.isEmpty=function(e){return 0==e.length},ListWrapper.fill=function(e,t,r,n){void 0===r&&(r=0),void 0===n&&(n=null),e.fill(t,r,null===n?e.length:n)},ListWrapper.equals=function(e,t){if(e.length!=t.length)return!1;for(var r=0;rn&&(r=o,n=s)}}return r},ListWrapper.flatten=function(e){var t=[];return _flattenArray(e,t),t},ListWrapper.addAll=function(e,t){for(var r=0;r",harr:"↔",hArr:"⇔",hearts:"♥",hellip:"…",Iacute:"Í",iacute:"í",Icirc:"Î",icirc:"î",iexcl:"¡",Igrave:"Ì",igrave:"ì",image:"ℑ",infin:"∞","int":"∫",Iota:"Ι",iota:"ι",iquest:"¿",isin:"∈",Iuml:"Ï",iuml:"ï",Kappa:"Κ",kappa:"κ",Lambda:"Λ",lambda:"λ",lang:"⟨",laquo:"«",larr:"←",lArr:"⇐",lceil:"⌈",ldquo:"“",le:"≤",lfloor:"⌊",lowast:"∗",loz:"◊",lrm:"‎",lsaquo:"‹",lsquo:"‘",lt:"<",macr:"¯",mdash:"—",micro:"µ",middot:"·",minus:"−",Mu:"Μ",mu:"μ",nabla:"∇",nbsp:" ",ndash:"–",ne:"≠",ni:"∋",not:"¬",notin:"∉",nsub:"⊄",Ntilde:"Ñ",ntilde:"ñ",Nu:"Ν",nu:"ν",Oacute:"Ó",oacute:"ó",Ocirc:"Ô",ocirc:"ô",OElig:"Œ",oelig:"œ",Ograve:"Ò",ograve:"ò",oline:"‾",Omega:"Ω",omega:"ω",Omicron:"Ο",omicron:"ο",oplus:"⊕",or:"∨",ordf:"ª",ordm:"º",Oslash:"Ø",oslash:"ø",Otilde:"Õ",otilde:"õ",otimes:"⊗",Ouml:"Ö",ouml:"ö",para:"¶",permil:"‰",perp:"⊥",Phi:"Φ",phi:"φ",Pi:"Π",pi:"π",piv:"ϖ",plusmn:"±",pound:"£",prime:"′",Prime:"″",prod:"∏",prop:"∝",Psi:"Ψ",psi:"ψ",quot:'"',radic:"√",rang:"⟩",raquo:"»",rarr:"→",rArr:"⇒",rceil:"⌉",rdquo:"”",real:"ℜ",reg:"®",rfloor:"⌋",Rho:"Ρ",rho:"ρ",rlm:"‏",rsaquo:"›",rsquo:"’",sbquo:"‚",Scaron:"Š",scaron:"š",sdot:"⋅",sect:"§",shy:"­",Sigma:"Σ",sigma:"σ",sigmaf:"ς",sim:"∼",spades:"♠",sub:"⊂",sube:"⊆",sum:"∑",sup:"⊃",sup1:"¹",sup2:"²",sup3:"³",supe:"⊇",szlig:"ß",Tau:"Τ",tau:"τ",there4:"∴",Theta:"Θ",theta:"θ",thetasym:"ϑ",thinsp:" ",THORN:"Þ",thorn:"þ",tilde:"˜",times:"×",trade:"™",Uacute:"Ú",uacute:"ú",uarr:"↑",uArr:"⇑",Ucirc:"Û",ucirc:"û",Ugrave:"Ù",ugrave:"ù",uml:"¨",upsih:"ϒ",Upsilon:"Υ",upsilon:"υ",Uuml:"Ü",uuml:"ü",weierp:"℘",Xi:"Ξ",xi:"ξ",Yacute:"Ý",yacute:"ý",yen:"¥",yuml:"ÿ",Yuml:"Ÿ",Zeta:"Ζ",zeta:"ζ",zwj:"‍",zwnj:"‌"},I=function(){function HtmlTagDefinition(e){var t=this,r=void 0===e?{}:e,n=r.closedByChildren,i=r.requiredParents,o=r.implicitNamespacePrefix,s=r.contentType,a=void 0===s?C.PARSABLE_DATA:s,u=r.closedByParent,l=void 0!==u&&u,c=r.isVoid,p=void 0!==c&&c,h=r.ignoreFirstLf,f=void 0!==h&&h;this.closedByChildren={},this.closedByParent=!1,this.canSelfClose=!1,n&&n.length>0&&n.forEach(function(e){return t.closedByChildren[e]=!0}),this.isVoid=p,this.closedByParent=l||p,i&&i.length>0&&(this.requiredParents={},this.parentToAdd=i[0],i.forEach(function(e){return t.requiredParents[e]=!0})),this.implicitNamespacePrefix=o,this.contentType=a,this.ignoreFirstLf=f}return HtmlTagDefinition.prototype.requireExtraParent=function(e){if(!this.requiredParents)return!1;if(!e)return!0;var t=e.toLowerCase();return 1!=this.requiredParents[t]&&"template"!=t},HtmlTagDefinition.prototype.isClosedByChild=function(e){return this.isVoid||e.toLowerCase()in this.closedByChildren},HtmlTagDefinition}(),D={base:new I({isVoid:!0}),meta:new I({isVoid:!0}),area:new I({isVoid:!0}),embed:new I({isVoid:!0}),link:new I({isVoid:!0}),img:new I({isVoid:!0}),input:new I({isVoid:!0}),param:new I({isVoid:!0}),hr:new I({isVoid:!0}),br:new I({isVoid:!0}),source:new I({isVoid:!0}),track:new I({isVoid:!0}),wbr:new I({isVoid:!0}),p:new I({closedByChildren:["address","article","aside","blockquote","div","dl","fieldset","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","main","nav","ol","p","pre","section","table","ul"],closedByParent:!0}),thead:new I({closedByChildren:["tbody","tfoot"]}),tbody:new I({closedByChildren:["tbody","tfoot"],closedByParent:!0}),tfoot:new I({closedByChildren:["tbody"],closedByParent:!0}),tr:new I({closedByChildren:["tr"],requiredParents:["tbody","tfoot","thead"],closedByParent:!0}),td:new I({closedByChildren:["td","th"],closedByParent:!0}),th:new I({closedByChildren:["td","th"],closedByParent:!0}),col:new I({requiredParents:["colgroup"],isVoid:!0}),svg:new I({implicitNamespacePrefix:"svg"}),math:new I({implicitNamespacePrefix:"math"}),li:new I({closedByChildren:["li"],closedByParent:!0}),dt:new I({closedByChildren:["dt","dd"]}),dd:new I({closedByChildren:["dt","dd"],closedByParent:!0}),rb:new I({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),rt:new I({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),rtc:new I({closedByChildren:["rb","rtc","rp"],closedByParent:!0}),rp:new I({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),optgroup:new I({closedByChildren:["optgroup"],closedByParent:!0}),option:new I({closedByChildren:["option","optgroup"],closedByParent:!0}),pre:new I({ignoreFirstLf:!0}),listing:new I({ignoreFirstLf:!0}),style:new I({contentType:C.RAW_TEXT}),script:new I({contentType:C.RAW_TEXT}),title:new I({contentType:C.ESCAPABLE_RAW_TEXT}),textarea:new I({contentType:C.ESCAPABLE_RAW_TEXT,ignoreFirstLf:!0})},N=new I,O=new RegExp("(\\:not\\()|([-\\w]+)|(?:\\.([-\\w]+))|(?:\\[([-\\w*]+)(?:=([^\\]]*))?\\])|(\\))|(\\s*,\\s*)","g"),V=function(){function CssSelector(){this.element=null,this.classNames=[],this.attrs=[],this.notSelectors=[]}return CssSelector.parse=function(e){var t,r=[],n=function(e,t){t.notSelectors.length>0&&!t.element&&0==t.classNames.length&&0==t.attrs.length&&(t.element="*"),e.push(t)},i=new CssSelector,o=i,s=!1;for(O.lastIndex=0;t=O.exec(e);){if(t[1]){if(s)throw new Error("Nesting :not is not allowed in a selector");s=!0,o=new CssSelector,i.notSelectors.push(o)}if(t[2]&&o.setElement(t[2]),t[3]&&o.addClassName(t[3]),t[4]&&o.addAttribute(t[4],t[5]),t[6]&&(s=!1,o=i),t[7]){if(s)throw new Error("Multiple selectors in :not are not supported");n(r,i),i=o=new CssSelector}}return n(r,i),r},CssSelector.prototype.isElementSelector=function(){return this.hasElementSelector()&&0==this.classNames.length&&0==this.attrs.length&&0===this.notSelectors.length},CssSelector.prototype.hasElementSelector=function(){return!!this.element},CssSelector.prototype.setElement=function(e){void 0===e&&(e=null),this.element=e},CssSelector.prototype.getMatchingElementTemplate=function(){for(var e=this.element||"div",t=this.classNames.length>0?' class="'+this.classNames.join(" ")+'"':"",r="",n=0;n":"<"+e+t+r+">"},CssSelector.prototype.addAttribute=function(e,t){void 0===t&&(t=""),this.attrs.push(e,t&&t.toLowerCase()||"")},CssSelector.prototype.addClassName=function(e){this.classNames.push(e.toLowerCase())},CssSelector.prototype.toString=function(){var e=this.element||"";if(this.classNames&&this.classNames.forEach(function(t){return e+="."+t}),this.attrs)for(var t=0;t1&&(r=new k(e),this._listContexts.push(r));for(var n=0;n0&&(!this.listContext||!this.listContext.alreadyMatched)){var n=R.createNotMatcher(this.notSelectors);r=!n.match(e,null)}return!r||!t||this.listContext&&this.listContext.alreadyMatched||(this.listContext&&(this.listContext.alreadyMatched=!0),t(this.selector,this.cbContext)),r},SelectorContext}(),F=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 __)};!function(e){e[e.Const=0]="Const"}(T||(T={}));var j,B=function(){function Type(e){void 0===e&&(e=null),this.modifiers=e,e||(this.modifiers=[])}return Type.prototype.hasModifier=function(e){return this.modifiers.indexOf(e)!==-1},Type}();!function(e){e[e.Dynamic=0]="Dynamic",e[e.Bool=1]="Bool",e[e.String=2]="String",e[e.Int=3]="Int",e[e.Number=4]="Number",e[e.Function=5]="Function"}(j||(j={}));var W,U=function(e){function BuiltinType(t,r){void 0===r&&(r=null),e.call(this,r),this.name=t}return F(BuiltinType,e),BuiltinType.prototype.visitType=function(e,t){return e.visitBuiltintType(this,t)},BuiltinType}(B),H=function(e){function ExternalType(t,r,n){void 0===r&&(r=null),void 0===n&&(n=null),e.call(this,n),this.value=t,this.typeParams=r}return F(ExternalType,e),ExternalType.prototype.visitType=function(e,t){return e.visitExternalType(this,t)},ExternalType}(B),G=function(e){function ArrayType(t,r){void 0===r&&(r=null),e.call(this,r),this.of=t}return F(ArrayType,e),ArrayType.prototype.visitType=function(e,t){return e.visitArrayType(this,t)},ArrayType}(B),z=function(e){function MapType(t,r){void 0===r&&(r=null),e.call(this,r),this.valueType=t}return F(MapType,e),MapType.prototype.visitType=function(e,t){return e.visitMapType(this,t)},MapType}(B),q=new U(j.Dynamic),K=new U(j.Bool),Q=(new U(j.Int),new U(j.Number)),Z=new U(j.String),X=new U(j.Function);!function(e){e[e.Equals=0]="Equals",e[e.NotEquals=1]="NotEquals",e[e.Identical=2]="Identical",e[e.NotIdentical=3]="NotIdentical",e[e.Minus=4]="Minus",e[e.Plus=5]="Plus",e[e.Divide=6]="Divide",e[e.Multiply=7]="Multiply",e[e.Modulo=8]="Modulo",e[e.And=9]="And",e[e.Or=10]="Or",e[e.Lower=11]="Lower",e[e.LowerEquals=12]="LowerEquals",e[e.Bigger=13]="Bigger",e[e.BiggerEquals=14]="BiggerEquals"}(W||(W={}));var $,J=function(){function Expression(e){this.type=e}return Expression.prototype.prop=function(e){return new ye(this,e)},Expression.prototype.key=function(e,t){return void 0===t&&(t=null),new ve(this,e,t)},Expression.prototype.callMethod=function(e,t){return new oe(this,e,t)},Expression.prototype.callFn=function(e){return new se(this,e)},Expression.prototype.instantiate=function(e,t){return void 0===t&&(t=null),new ae(this,e,t)},Expression.prototype.conditional=function(e,t){return void 0===t&&(t=null),new ce(this,e,t)},Expression.prototype.equals=function(e){return new me(W.Equals,this,e)},Expression.prototype.notEquals=function(e){return new me(W.NotEquals,this,e)},Expression.prototype.identical=function(e){return new me(W.Identical,this,e)},Expression.prototype.notIdentical=function(e){return new me(W.NotIdentical,this,e)},Expression.prototype.minus=function(e){return new me(W.Minus,this,e)},Expression.prototype.plus=function(e){return new me(W.Plus,this,e)},Expression.prototype.divide=function(e){return new me(W.Divide,this,e)},Expression.prototype.multiply=function(e){return new me(W.Multiply,this,e)},Expression.prototype.modulo=function(e){return new me(W.Modulo,this,e)},Expression.prototype.and=function(e){return new me(W.And,this,e)},Expression.prototype.or=function(e){return new me(W.Or,this,e)},Expression.prototype.lower=function(e){return new me(W.Lower,this,e)},Expression.prototype.lowerEquals=function(e){return new me(W.LowerEquals,this,e)},Expression.prototype.bigger=function(e){return new me(W.Bigger,this,e)},Expression.prototype.biggerEquals=function(e){return new me(W.BiggerEquals,this,e)},Expression.prototype.isBlank=function(){return this.equals(Ce)},Expression.prototype.cast=function(e){return new he(this,e)},Expression.prototype.toStmt=function(){return new xe(this)},Expression}();!function(e){e[e.This=0]="This",e[e.Super=1]="Super",e[e.CatchError=2]="CatchError",e[e.CatchStack=3]="CatchStack"}($||($={}));var Y,ee=function(e){function ReadVarExpr(t,r){void 0===r&&(r=null),e.call(this,r),isString(t)?(this.name=t,this.builtin=null):(this.name=null,this.builtin=t)}return F(ReadVarExpr,e),ReadVarExpr.prototype.visitExpression=function(e,t){return e.visitReadVarExpr(this,t)},ReadVarExpr.prototype.set=function(e){return new te(this.name,e)},ReadVarExpr}(J),te=function(e){function WriteVarExpr(t,r,n){void 0===n&&(n=null),e.call(this,isPresent(n)?n:r.type),this.name=t,this.value=r}return F(WriteVarExpr,e),WriteVarExpr.prototype.visitExpression=function(e,t){return e.visitWriteVarExpr(this,t)},WriteVarExpr.prototype.toDeclStmt=function(e,t){return void 0===e&&(e=null),void 0===t&&(t=null),new Pe(this.name,this.value,e,t)},WriteVarExpr}(J),re=function(e){function WriteKeyExpr(t,r,n,i){void 0===i&&(i=null),e.call(this,isPresent(i)?i:n.type),this.receiver=t,this.index=r,this.value=n}return F(WriteKeyExpr,e),WriteKeyExpr.prototype.visitExpression=function(e,t){return e.visitWriteKeyExpr(this,t)},WriteKeyExpr}(J),ne=function(e){function WritePropExpr(t,r,n,i){void 0===i&&(i=null),e.call(this,isPresent(i)?i:n.type),this.receiver=t,this.name=r,this.value=n}return F(WritePropExpr,e),WritePropExpr.prototype.visitExpression=function(e,t){return e.visitWritePropExpr(this,t)},WritePropExpr}(J);!function(e){e[e.ConcatArray=0]="ConcatArray",e[e.SubscribeObservable=1]="SubscribeObservable",e[e.Bind=2]="Bind"}(Y||(Y={}));var ie,oe=function(e){function InvokeMethodExpr(t,r,n,i){void 0===i&&(i=null),e.call(this,i),this.receiver=t,this.args=n,isString(r)?(this.name=r,this.builtin=null):(this.name=null,this.builtin=r)}return F(InvokeMethodExpr,e),InvokeMethodExpr.prototype.visitExpression=function(e,t){return e.visitInvokeMethodExpr(this,t)},InvokeMethodExpr}(J),se=function(e){function InvokeFunctionExpr(t,r,n){void 0===n&&(n=null),e.call(this,n),this.fn=t,this.args=r}return F(InvokeFunctionExpr,e),InvokeFunctionExpr.prototype.visitExpression=function(e,t){return e.visitInvokeFunctionExpr(this,t)},InvokeFunctionExpr}(J),ae=function(e){function InstantiateExpr(t,r,n){e.call(this,n),this.classExpr=t,this.args=r}return F(InstantiateExpr,e),InstantiateExpr.prototype.visitExpression=function(e,t){return e.visitInstantiateExpr(this,t)},InstantiateExpr}(J),ue=function(e){function LiteralExpr(t,r){void 0===r&&(r=null),e.call(this,r),this.value=t}return F(LiteralExpr,e),LiteralExpr.prototype.visitExpression=function(e,t){return e.visitLiteralExpr(this,t)},LiteralExpr}(J),le=function(e){function ExternalExpr(t,r,n){void 0===r&&(r=null),void 0===n&&(n=null),e.call(this,r),this.value=t,this.typeParams=n}return F(ExternalExpr,e),ExternalExpr.prototype.visitExpression=function(e,t){return e.visitExternalExpr(this,t)},ExternalExpr}(J),ce=function(e){function ConditionalExpr(t,r,n,i){void 0===n&&(n=null),void 0===i&&(i=null),e.call(this,isPresent(i)?i:r.type),this.condition=t,this.falseCase=n,this.trueCase=r}return F(ConditionalExpr,e),ConditionalExpr.prototype.visitExpression=function(e,t){return e.visitConditionalExpr(this,t)},ConditionalExpr}(J),pe=function(e){function NotExpr(t){e.call(this,K),this.condition=t}return F(NotExpr,e),NotExpr.prototype.visitExpression=function(e,t){return e.visitNotExpr(this,t)},NotExpr}(J),he=function(e){function CastExpr(t,r){e.call(this,r),this.value=t}return F(CastExpr,e),CastExpr.prototype.visitExpression=function(e,t){return e.visitCastExpr(this,t)},CastExpr}(J),fe=function(){function FnParam(e,t){void 0===t&&(t=null),this.name=e,this.type=t}return FnParam}(),de=function(e){function FunctionExpr(t,r,n){void 0===n&&(n=null),e.call(this,n),this.params=t,this.statements=r}return F(FunctionExpr,e),FunctionExpr.prototype.visitExpression=function(e,t){return e.visitFunctionExpr(this,t)},FunctionExpr.prototype.toDeclStmt=function(e,t){return void 0===t&&(t=null),new Ae(e,this.params,this.statements,this.type,t)},FunctionExpr}(J),me=function(e){function BinaryOperatorExpr(t,r,n,i){void 0===i&&(i=null),e.call(this,isPresent(i)?i:r.type),this.operator=t,this.rhs=n,this.lhs=r}return F(BinaryOperatorExpr,e),BinaryOperatorExpr.prototype.visitExpression=function(e,t){return e.visitBinaryOperatorExpr(this,t)},BinaryOperatorExpr}(J),ye=function(e){function ReadPropExpr(t,r,n){void 0===n&&(n=null),e.call(this,n),this.receiver=t,this.name=r}return F(ReadPropExpr,e),ReadPropExpr.prototype.visitExpression=function(e,t){return e.visitReadPropExpr(this,t)},ReadPropExpr.prototype.set=function(e){return new ne(this.receiver,this.name,e)},ReadPropExpr}(J),ve=function(e){function ReadKeyExpr(t,r,n){void 0===n&&(n=null),e.call(this,n),this.receiver=t,this.index=r}return F(ReadKeyExpr,e),ReadKeyExpr.prototype.visitExpression=function(e,t){return e.visitReadKeyExpr(this,t)},ReadKeyExpr.prototype.set=function(e){return new re(this.receiver,this.index,e)},ReadKeyExpr}(J),ge=function(e){function LiteralArrayExpr(t,r){void 0===r&&(r=null),e.call(this,r),this.entries=t}return F(LiteralArrayExpr,e),LiteralArrayExpr.prototype.visitExpression=function(e,t){return e.visitLiteralArrayExpr(this,t)},LiteralArrayExpr}(J),_e=function(e){function LiteralMapExpr(t,r){void 0===r&&(r=null),e.call(this,r),this.entries=t,this.valueType=null,isPresent(r)&&(this.valueType=r.valueType)}return F(LiteralMapExpr,e),LiteralMapExpr.prototype.visitExpression=function(e,t){return e.visitLiteralMapExpr(this,t)},LiteralMapExpr}(J),be=new ee($.This),we=new ee($.Super),Ce=(new ee($.CatchError),new ee($.CatchStack),new ue(null,null));!function(e){e[e.Final=0]="Final",e[e.Private=1]="Private"}(ie||(ie={}));var Ee,Se=function(){function Statement(e){void 0===e&&(e=null),this.modifiers=e,e||(this.modifiers=[])}return Statement.prototype.hasModifier=function(e){return this.modifiers.indexOf(e)!==-1},Statement}(),Pe=function(e){function DeclareVarStmt(t,r,n,i){void 0===n&&(n=null),void 0===i&&(i=null),e.call(this,i),this.name=t,this.value=r,this.type=isPresent(n)?n:r.type}return F(DeclareVarStmt,e),DeclareVarStmt.prototype.visitStatement=function(e,t){return e.visitDeclareVarStmt(this,t)},DeclareVarStmt}(Se),Ae=function(e){function DeclareFunctionStmt(t,r,n,i,o){void 0===i&&(i=null),void 0===o&&(o=null),e.call(this,o),this.name=t,this.params=r,this.statements=n,this.type=i}return F(DeclareFunctionStmt,e),DeclareFunctionStmt.prototype.visitStatement=function(e,t){return e.visitDeclareFunctionStmt(this,t)},DeclareFunctionStmt}(Se),xe=function(e){function ExpressionStatement(t){e.call(this),this.expr=t}return F(ExpressionStatement,e),ExpressionStatement.prototype.visitStatement=function(e,t){return e.visitExpressionStmt(this,t)},ExpressionStatement}(Se),Te=function(e){function ReturnStatement(t){e.call(this),this.value=t}return F(ReturnStatement,e),ReturnStatement.prototype.visitStatement=function(e,t){return e.visitReturnStmt(this,t)},ReturnStatement}(Se),Me=function(){function AbstractClassPart(e,t){void 0===e&&(e=null),this.type=e,this.modifiers=t,t||(this.modifiers=[])}return AbstractClassPart.prototype.hasModifier=function(e){return this.modifiers.indexOf(e)!==-1},AbstractClassPart}(),Ie=function(e){function ClassField(t,r,n){void 0===r&&(r=null),void 0===n&&(n=null),e.call(this,r,n),this.name=t}return F(ClassField,e),ClassField}(Me),De=function(e){function ClassMethod(t,r,n,i,o){void 0===i&&(i=null),void 0===o&&(o=null),e.call(this,i,o),this.name=t,this.params=r,this.body=n}return F(ClassMethod,e),ClassMethod}(Me),Ne=function(e){function ClassGetter(t,r,n,i){void 0===n&&(n=null),void 0===i&&(i=null),e.call(this,n,i),this.name=t,this.body=r}return F(ClassGetter,e),ClassGetter}(Me),Oe=function(e){function ClassStmt(t,r,n,i,o,s,a){void 0===a&&(a=null),e.call(this,a),this.name=t,this.parent=r,this.fields=n,this.getters=i,this.constructorMethod=o,this.methods=s}return F(ClassStmt,e),ClassStmt.prototype.visitStatement=function(e,t){return e.visitDeclareClassStmt(this,t)},ClassStmt}(Se),Ve=function(e){function IfStmt(t,r,n){void 0===n&&(n=[]),e.call(this),this.condition=t,this.trueCase=r,this.falseCase=n}return F(IfStmt,e),IfStmt.prototype.visitStatement=function(e,t){return e.visitIfStmt(this,t)},IfStmt}(Se),Re=(function(e){function CommentStmt(t){e.call(this),this.comment=t}return F(CommentStmt,e),CommentStmt.prototype.visitStatement=function(e,t){return e.visitCommentStmt(this,t)},CommentStmt}(Se),function(e){function TryCatchStmt(t,r){e.call(this),this.bodyStmts=t,this.catchStmts=r}return F(TryCatchStmt,e),TryCatchStmt.prototype.visitStatement=function(e,t){return e.visitTryCatchStmt(this,t)},TryCatchStmt}(Se)),ke=function(e){function ThrowStmt(t){e.call(this),this.error=t}return F(ThrowStmt,e),ThrowStmt.prototype.visitStatement=function(e,t){return e.visitThrowStmt(this,t)},ThrowStmt}(Se),Le=function(){function ExpressionTransformer(){}return ExpressionTransformer.prototype.visitReadVarExpr=function(e,t){return e},ExpressionTransformer.prototype.visitWriteVarExpr=function(e,t){return new te(e.name,e.value.visitExpression(this,t))},ExpressionTransformer.prototype.visitWriteKeyExpr=function(e,t){return new re(e.receiver.visitExpression(this,t),e.index.visitExpression(this,t),e.value.visitExpression(this,t))},ExpressionTransformer.prototype.visitWritePropExpr=function(e,t){return new ne(e.receiver.visitExpression(this,t),e.name,e.value.visitExpression(this,t))},ExpressionTransformer.prototype.visitInvokeMethodExpr=function(e,t){var r=isPresent(e.builtin)?e.builtin:e.name;return new oe(e.receiver.visitExpression(this,t),r,this.visitAllExpressions(e.args,t),e.type)},ExpressionTransformer.prototype.visitInvokeFunctionExpr=function(e,t){return new se(e.fn.visitExpression(this,t),this.visitAllExpressions(e.args,t),e.type)},ExpressionTransformer.prototype.visitInstantiateExpr=function(e,t){return new ae(e.classExpr.visitExpression(this,t),this.visitAllExpressions(e.args,t),e.type)},ExpressionTransformer.prototype.visitLiteralExpr=function(e,t){return e},ExpressionTransformer.prototype.visitExternalExpr=function(e,t){return e},ExpressionTransformer.prototype.visitConditionalExpr=function(e,t){return new ce(e.condition.visitExpression(this,t),e.trueCase.visitExpression(this,t),e.falseCase.visitExpression(this,t))},ExpressionTransformer.prototype.visitNotExpr=function(e,t){return new pe(e.condition.visitExpression(this,t))},ExpressionTransformer.prototype.visitCastExpr=function(e,t){return new he(e.value.visitExpression(this,t),t)},ExpressionTransformer.prototype.visitFunctionExpr=function(e,t){return e},ExpressionTransformer.prototype.visitBinaryOperatorExpr=function(e,t){return new me(e.operator,e.lhs.visitExpression(this,t),e.rhs.visitExpression(this,t),e.type)},ExpressionTransformer.prototype.visitReadPropExpr=function(e,t){return new ye(e.receiver.visitExpression(this,t),e.name,e.type)},ExpressionTransformer.prototype.visitReadKeyExpr=function(e,t){return new ve(e.receiver.visitExpression(this,t),e.index.visitExpression(this,t),e.type)},ExpressionTransformer.prototype.visitLiteralArrayExpr=function(e,t){return new ge(this.visitAllExpressions(e.entries,t))},ExpressionTransformer.prototype.visitLiteralMapExpr=function(e,t){var r=this;return new _e(e.entries.map(function(e){return[e[0],e[1].visitExpression(r,t)]}))},ExpressionTransformer.prototype.visitAllExpressions=function(e,t){var r=this;return e.map(function(e){return e.visitExpression(r,t)})},ExpressionTransformer.prototype.visitDeclareVarStmt=function(e,t){return new Pe(e.name,e.value.visitExpression(this,t),e.type,e.modifiers)},ExpressionTransformer.prototype.visitDeclareFunctionStmt=function(e,t){return e},ExpressionTransformer.prototype.visitExpressionStmt=function(e,t){return new xe(e.expr.visitExpression(this,t))},ExpressionTransformer.prototype.visitReturnStmt=function(e,t){return new Te(e.value.visitExpression(this,t)); },ExpressionTransformer.prototype.visitDeclareClassStmt=function(e,t){return e},ExpressionTransformer.prototype.visitIfStmt=function(e,t){return new Ve(e.condition.visitExpression(this,t),this.visitAllStatements(e.trueCase,t),this.visitAllStatements(e.falseCase,t))},ExpressionTransformer.prototype.visitTryCatchStmt=function(e,t){return new Re(this.visitAllStatements(e.bodyStmts,t),this.visitAllStatements(e.catchStmts,t))},ExpressionTransformer.prototype.visitThrowStmt=function(e,t){return new ke(e.error.visitExpression(this,t))},ExpressionTransformer.prototype.visitCommentStmt=function(e,t){return e},ExpressionTransformer.prototype.visitAllStatements=function(e,t){var r=this;return e.map(function(e){return e.visitStatement(r,t)})},ExpressionTransformer}(),Fe=function(){function RecursiveExpressionVisitor(){}return RecursiveExpressionVisitor.prototype.visitReadVarExpr=function(e,t){return e},RecursiveExpressionVisitor.prototype.visitWriteVarExpr=function(e,t){return e.value.visitExpression(this,t),e},RecursiveExpressionVisitor.prototype.visitWriteKeyExpr=function(e,t){return e.receiver.visitExpression(this,t),e.index.visitExpression(this,t),e.value.visitExpression(this,t),e},RecursiveExpressionVisitor.prototype.visitWritePropExpr=function(e,t){return e.receiver.visitExpression(this,t),e.value.visitExpression(this,t),e},RecursiveExpressionVisitor.prototype.visitInvokeMethodExpr=function(e,t){return e.receiver.visitExpression(this,t),this.visitAllExpressions(e.args,t),e},RecursiveExpressionVisitor.prototype.visitInvokeFunctionExpr=function(e,t){return e.fn.visitExpression(this,t),this.visitAllExpressions(e.args,t),e},RecursiveExpressionVisitor.prototype.visitInstantiateExpr=function(e,t){return e.classExpr.visitExpression(this,t),this.visitAllExpressions(e.args,t),e},RecursiveExpressionVisitor.prototype.visitLiteralExpr=function(e,t){return e},RecursiveExpressionVisitor.prototype.visitExternalExpr=function(e,t){return e},RecursiveExpressionVisitor.prototype.visitConditionalExpr=function(e,t){return e.condition.visitExpression(this,t),e.trueCase.visitExpression(this,t),e.falseCase.visitExpression(this,t),e},RecursiveExpressionVisitor.prototype.visitNotExpr=function(e,t){return e.condition.visitExpression(this,t),e},RecursiveExpressionVisitor.prototype.visitCastExpr=function(e,t){return e.value.visitExpression(this,t),e},RecursiveExpressionVisitor.prototype.visitFunctionExpr=function(e,t){return e},RecursiveExpressionVisitor.prototype.visitBinaryOperatorExpr=function(e,t){return e.lhs.visitExpression(this,t),e.rhs.visitExpression(this,t),e},RecursiveExpressionVisitor.prototype.visitReadPropExpr=function(e,t){return e.receiver.visitExpression(this,t),e},RecursiveExpressionVisitor.prototype.visitReadKeyExpr=function(e,t){return e.receiver.visitExpression(this,t),e.index.visitExpression(this,t),e},RecursiveExpressionVisitor.prototype.visitLiteralArrayExpr=function(e,t){return this.visitAllExpressions(e.entries,t),e},RecursiveExpressionVisitor.prototype.visitLiteralMapExpr=function(e,t){var r=this;return e.entries.forEach(function(e){return e[1].visitExpression(r,t)}),e},RecursiveExpressionVisitor.prototype.visitAllExpressions=function(e,t){var r=this;e.forEach(function(e){return e.visitExpression(r,t)})},RecursiveExpressionVisitor.prototype.visitDeclareVarStmt=function(e,t){return e.value.visitExpression(this,t),e},RecursiveExpressionVisitor.prototype.visitDeclareFunctionStmt=function(e,t){return e},RecursiveExpressionVisitor.prototype.visitExpressionStmt=function(e,t){return e.expr.visitExpression(this,t),e},RecursiveExpressionVisitor.prototype.visitReturnStmt=function(e,t){return e.value.visitExpression(this,t),e},RecursiveExpressionVisitor.prototype.visitDeclareClassStmt=function(e,t){return e},RecursiveExpressionVisitor.prototype.visitIfStmt=function(e,t){return e.condition.visitExpression(this,t),this.visitAllStatements(e.trueCase,t),this.visitAllStatements(e.falseCase,t),e},RecursiveExpressionVisitor.prototype.visitTryCatchStmt=function(e,t){return this.visitAllStatements(e.bodyStmts,t),this.visitAllStatements(e.catchStmts,t),e},RecursiveExpressionVisitor.prototype.visitThrowStmt=function(e,t){return e.error.visitExpression(this,t),e},RecursiveExpressionVisitor.prototype.visitCommentStmt=function(e,t){return e},RecursiveExpressionVisitor.prototype.visitAllStatements=function(e,t){var r=this;e.forEach(function(e){return e.visitStatement(r,t)})},RecursiveExpressionVisitor}(),je=function(e){function _ReplaceVariableTransformer(t,r){e.call(this),this._varName=t,this._newValue=r}return F(_ReplaceVariableTransformer,e),_ReplaceVariableTransformer.prototype.visitReadVarExpr=function(e,t){return e.name==this._varName?this._newValue:e},_ReplaceVariableTransformer}(Le),Be=function(e){function _VariableFinder(){e.apply(this,arguments),this.varNames=new Set}return F(_VariableFinder,e),_VariableFinder.prototype.visitReadVarExpr=function(e,t){return this.varNames.add(e.name),null},_VariableFinder}(Fe),We="",Ue=/([A-Z])/g,He=function(){function ValueTransformer(){}return ValueTransformer.prototype.visitArray=function(e,t){var r=this;return e.map(function(e){return visitValue(e,r,t)})},ValueTransformer.prototype.visitStringMap=function(e,t){var r=this,n={};return Object.keys(e).forEach(function(i){n[i]=visitValue(e[i],r,t)}),n},ValueTransformer.prototype.visitPrimitive=function(e,t){return e},ValueTransformer.prototype.visitOther=function(e,t){return e},ValueTransformer}(),Ge=function(){function SyncAsyncResult(e,t){void 0===t&&(t=null),this.syncResult=e,this.asyncResult=t,t||(this.asyncResult=Promise.resolve(e))}return SyncAsyncResult}(),ze=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 __)},qe=/^(?:(?:\[([^\]]+)\])|(?:\(([^\)]+)\)))|(\@[-\w]+)$/,Ke=function(){function CompileMetadataWithIdentifier(){}return Object.defineProperty(CompileMetadataWithIdentifier.prototype,"identifier",{get:function(){return unimplemented()},enumerable:!0,configurable:!0}),CompileMetadataWithIdentifier}(),Qe=function(){function CompileAnimationEntryMetadata(e,t){void 0===e&&(e=null),void 0===t&&(t=null),this.name=e,this.definitions=t}return CompileAnimationEntryMetadata}(),Ze=function(){function CompileAnimationStateMetadata(){}return CompileAnimationStateMetadata}(),Xe=function(e){function CompileAnimationStateDeclarationMetadata(t,r){e.call(this),this.stateNameExpr=t,this.styles=r}return ze(CompileAnimationStateDeclarationMetadata,e),CompileAnimationStateDeclarationMetadata}(Ze),$e=function(e){function CompileAnimationStateTransitionMetadata(t,r){e.call(this),this.stateChangeExpr=t,this.steps=r}return ze(CompileAnimationStateTransitionMetadata,e),CompileAnimationStateTransitionMetadata}(Ze),Je=function(){function CompileAnimationMetadata(){}return CompileAnimationMetadata}(),Ye=function(e){function CompileAnimationKeyframesSequenceMetadata(t){void 0===t&&(t=[]),e.call(this),this.steps=t}return ze(CompileAnimationKeyframesSequenceMetadata,e),CompileAnimationKeyframesSequenceMetadata}(Je),et=function(e){function CompileAnimationStyleMetadata(t,r){void 0===r&&(r=null),e.call(this),this.offset=t,this.styles=r}return ze(CompileAnimationStyleMetadata,e),CompileAnimationStyleMetadata}(Je),tt=function(e){function CompileAnimationAnimateMetadata(t,r){void 0===t&&(t=0),void 0===r&&(r=null),e.call(this),this.timings=t,this.styles=r}return ze(CompileAnimationAnimateMetadata,e),CompileAnimationAnimateMetadata}(Je),rt=function(e){function CompileAnimationWithStepsMetadata(t){void 0===t&&(t=null),e.call(this),this.steps=t}return ze(CompileAnimationWithStepsMetadata,e),CompileAnimationWithStepsMetadata}(Je),nt=function(e){function CompileAnimationSequenceMetadata(t){void 0===t&&(t=null),e.call(this,t)}return ze(CompileAnimationSequenceMetadata,e),CompileAnimationSequenceMetadata}(rt),it=function(e){function CompileAnimationGroupMetadata(t){void 0===t&&(t=null),e.call(this,t)}return ze(CompileAnimationGroupMetadata,e),CompileAnimationGroupMetadata}(rt),ot=function(){function CompileIdentifierMetadata(e){var t=void 0===e?{}:e,r=t.reference,n=t.name,i=t.moduleUrl,o=t.prefix,s=t.value;this.reference=r,this.name=n,this.prefix=o,this.moduleUrl=i,this.value=s}return Object.defineProperty(CompileIdentifierMetadata.prototype,"identifier",{get:function(){return this},enumerable:!0,configurable:!0}),CompileIdentifierMetadata}(),st=function(){function CompileDiDependencyMetadata(e){var t=void 0===e?{}:e,r=t.isAttribute,n=t.isSelf,i=t.isHost,o=t.isSkipSelf,s=t.isOptional,a=t.isValue,u=t.query,l=t.viewQuery,c=t.token,p=t.value;this.isAttribute=normalizeBool(r),this.isSelf=normalizeBool(n),this.isHost=normalizeBool(i),this.isSkipSelf=normalizeBool(o),this.isOptional=normalizeBool(s),this.isValue=normalizeBool(a),this.query=u,this.viewQuery=l,this.token=c,this.value=p}return CompileDiDependencyMetadata}(),at=function(){function CompileProviderMetadata(e){var t=e.token,r=e.useClass,n=e.useValue,i=e.useExisting,o=e.useFactory,s=e.deps,a=e.multi;this.token=t,this.useClass=r,this.useValue=n,this.useExisting=i,this.useFactory=o,this.deps=normalizeBlank(s),this.multi=normalizeBool(a)}return CompileProviderMetadata}(),ut=function(e){function CompileFactoryMetadata(t){var r=t.reference,n=t.name,i=t.moduleUrl,o=t.prefix,s=t.diDeps,a=t.value;e.call(this,{reference:r,name:n,prefix:o,moduleUrl:i,value:a}),this.diDeps=_normalizeArray(s)}return ze(CompileFactoryMetadata,e),CompileFactoryMetadata}(ot),lt=function(){function CompileTokenMetadata(e){var t=e.value,r=e.identifier,n=e.identifierIsInstance;this.value=t,this.identifier=r,this.identifierIsInstance=normalizeBool(n)}return Object.defineProperty(CompileTokenMetadata.prototype,"reference",{get:function(){return isPresent(this.identifier)?this.identifier.reference:this.value},enumerable:!0,configurable:!0}),Object.defineProperty(CompileTokenMetadata.prototype,"name",{get:function(){return isPresent(this.value)?sanitizeIdentifier(this.value):this.identifier.name},enumerable:!0,configurable:!0}),CompileTokenMetadata}(),ct=function(e){function CompileTypeMetadata(t){var r=void 0===t?{}:t,n=r.reference,i=r.name,o=r.moduleUrl,s=r.prefix,a=r.isHost,u=r.value,l=r.diDeps,c=r.lifecycleHooks;e.call(this,{reference:n,name:i,moduleUrl:o,prefix:s,value:u}),this.isHost=normalizeBool(a),this.diDeps=_normalizeArray(l),this.lifecycleHooks=_normalizeArray(c)}return ze(CompileTypeMetadata,e),CompileTypeMetadata}(ot),pt=function(){function CompileQueryMetadata(e){var t=void 0===e?{}:e,r=t.selectors,n=t.descendants,i=t.first,o=t.propertyName,s=t.read;this.selectors=r,this.descendants=normalizeBool(n),this.first=normalizeBool(i),this.propertyName=o,this.read=s}return CompileQueryMetadata}(),ht=function(){function CompileStylesheetMetadata(e){var t=void 0===e?{}:e,r=t.moduleUrl,n=t.styles,i=t.styleUrls;this.moduleUrl=r,this.styles=_normalizeArray(n),this.styleUrls=_normalizeArray(i)}return CompileStylesheetMetadata}(),ft=function(){function CompileTemplateMetadata(e){var t=void 0===e?{}:e,r=t.encapsulation,n=t.template,i=t.templateUrl,o=t.styles,s=t.styleUrls,a=t.externalStylesheets,u=t.animations,l=t.ngContentSelectors,c=t.interpolation;if(this.encapsulation=r,this.template=n,this.templateUrl=i,this.styles=_normalizeArray(o),this.styleUrls=_normalizeArray(s),this.externalStylesheets=_normalizeArray(a),this.animations=isPresent(u)?x.flatten(u):[],this.ngContentSelectors=isPresent(l)?l:[],isPresent(c)&&2!=c.length)throw new Error("'interpolation' should have a start and an end symbol.");this.interpolation=c}return CompileTemplateMetadata}(),dt=function(){function CompileDirectiveMetadata(e){var t=void 0===e?{}:e,r=t.type,n=t.isComponent,i=t.selector,o=t.exportAs,s=t.changeDetection,a=t.inputs,u=t.outputs,l=t.hostListeners,c=t.hostProperties,p=t.hostAttributes,h=t.providers,f=t.viewProviders,d=t.queries,m=t.viewQueries,y=t.entryComponents,v=t.template;this.type=r,this.isComponent=n,this.selector=i,this.exportAs=o,this.changeDetection=s,this.inputs=a,this.outputs=u,this.hostListeners=l,this.hostProperties=c,this.hostAttributes=p,this.providers=_normalizeArray(h),this.viewProviders=_normalizeArray(f),this.queries=_normalizeArray(d),this.viewQueries=_normalizeArray(m),this.entryComponents=_normalizeArray(y),this.template=v}return CompileDirectiveMetadata.create=function(e){var t=void 0===e?{}:e,r=t.type,n=t.isComponent,i=t.selector,o=t.exportAs,s=t.changeDetection,a=t.inputs,u=t.outputs,l=t.host,c=t.providers,p=t.viewProviders,h=t.queries,f=t.viewQueries,d=t.entryComponents,m=t.template,y={},v={},g={};isPresent(l)&&Object.keys(l).forEach(function(e){var t=l[e],r=e.match(qe);null===r?g[e]=t:isPresent(r[1])?v[r[1]]=t:isPresent(r[2])&&(y[r[2]]=t)});var _={};isPresent(a)&&a.forEach(function(e){var t=splitAtColon(e,[e,e]);_[t[0]]=t[1]});var b={};return isPresent(u)&&u.forEach(function(e){var t=splitAtColon(e,[e,e]);b[t[0]]=t[1]}),new CompileDirectiveMetadata({type:r,isComponent:normalizeBool(n),selector:i,exportAs:o,changeDetection:s,inputs:_,outputs:b,hostListeners:y,hostProperties:v,hostAttributes:g,providers:c,viewProviders:p,queries:h,viewQueries:f,entryComponents:d,template:m})},Object.defineProperty(CompileDirectiveMetadata.prototype,"identifier",{get:function(){return this.type},enumerable:!0,configurable:!0}),CompileDirectiveMetadata}(),mt=function(){function CompilePipeMetadata(e){var t=void 0===e?{}:e,r=t.type,n=t.name,i=t.pure;this.type=r,this.name=n,this.pure=normalizeBool(i)}return Object.defineProperty(CompilePipeMetadata.prototype,"identifier",{get:function(){return this.type},enumerable:!0,configurable:!0}),CompilePipeMetadata}(),yt=function(){function CompileNgModuleMetadata(e){var t=void 0===e?{}:e,r=t.type,n=t.providers,i=t.declaredDirectives,o=t.exportedDirectives,s=t.declaredPipes,a=t.exportedPipes,u=t.entryComponents,l=t.bootstrapComponents,c=t.importedModules,p=t.exportedModules,h=t.schemas,f=t.transitiveModule,d=t.id;this.type=r,this.declaredDirectives=_normalizeArray(i),this.exportedDirectives=_normalizeArray(o),this.declaredPipes=_normalizeArray(s),this.exportedPipes=_normalizeArray(a),this.providers=_normalizeArray(n),this.entryComponents=_normalizeArray(u),this.bootstrapComponents=_normalizeArray(l),this.importedModules=_normalizeArray(c),this.exportedModules=_normalizeArray(p),this.schemas=_normalizeArray(h),this.id=d,this.transitiveModule=f}return Object.defineProperty(CompileNgModuleMetadata.prototype,"identifier",{get:function(){return this.type},enumerable:!0,configurable:!0}),CompileNgModuleMetadata}(),vt=function(){function TransitiveCompileNgModuleMetadata(e,t,r,n,i){var o=this;this.modules=e,this.providers=t,this.entryComponents=r,this.directives=n,this.pipes=i,this.directivesSet=new Set,this.pipesSet=new Set,n.forEach(function(e){return o.directivesSet.add(e.type.reference)}),i.forEach(function(e){return o.pipesSet.add(e.type.reference)})}return TransitiveCompileNgModuleMetadata}(),gt=function(){function ProviderMeta(e,t){var r=t.useClass,n=t.useValue,i=t.useExisting,o=t.useFactory,s=t.deps,a=t.multi;this.token=e,this.useClass=r,this.useValue=n,this.useExisting=i,this.useFactory=o,this.dependencies=s,this.multi=!!a}return ProviderMeta}(),_t=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 __)},bt=function(){function ParserError(e,t,r,n){this.input=t,this.errLocation=r,this.ctxLocation=n,this.message="Parser Error: "+e+" "+r+" ["+t+"] in "+n}return ParserError}(),wt=function(){function ParseSpan(e,t){this.start=e,this.end=t}return ParseSpan}(),Ct=function(){function AST(e){this.span=e}return AST.prototype.visit=function(e,t){return void 0===t&&(t=null),null},AST.prototype.toString=function(){return"AST"},AST}(),Et=function(e){function Quote(t,r,n,i){e.call(this,t),this.prefix=r,this.uninterpretedExpression=n,this.location=i}return _t(Quote,e),Quote.prototype.visit=function(e,t){return void 0===t&&(t=null),e.visitQuote(this,t)},Quote.prototype.toString=function(){return"Quote"},Quote}(Ct),St=function(e){function EmptyExpr(){e.apply(this,arguments)}return _t(EmptyExpr,e),EmptyExpr.prototype.visit=function(e,t){void 0===t&&(t=null)},EmptyExpr}(Ct),Pt=function(e){function ImplicitReceiver(){e.apply(this,arguments)}return _t(ImplicitReceiver,e),ImplicitReceiver.prototype.visit=function(e,t){return void 0===t&&(t=null),e.visitImplicitReceiver(this,t)},ImplicitReceiver}(Ct),At=function(e){function Chain(t,r){e.call(this,t),this.expressions=r}return _t(Chain,e),Chain.prototype.visit=function(e,t){return void 0===t&&(t=null),e.visitChain(this,t)},Chain}(Ct),xt=function(e){function Conditional(t,r,n,i){e.call(this,t),this.condition=r,this.trueExp=n,this.falseExp=i}return _t(Conditional,e),Conditional.prototype.visit=function(e,t){return void 0===t&&(t=null),e.visitConditional(this,t)},Conditional}(Ct),Tt=function(e){function PropertyRead(t,r,n){e.call(this,t),this.receiver=r,this.name=n}return _t(PropertyRead,e),PropertyRead.prototype.visit=function(e,t){return void 0===t&&(t=null),e.visitPropertyRead(this,t)},PropertyRead}(Ct),Mt=function(e){function PropertyWrite(t,r,n,i){e.call(this,t),this.receiver=r,this.name=n,this.value=i}return _t(PropertyWrite,e),PropertyWrite.prototype.visit=function(e,t){return void 0===t&&(t=null),e.visitPropertyWrite(this,t)},PropertyWrite}(Ct),It=function(e){function SafePropertyRead(t,r,n){e.call(this,t),this.receiver=r,this.name=n}return _t(SafePropertyRead,e),SafePropertyRead.prototype.visit=function(e,t){return void 0===t&&(t=null),e.visitSafePropertyRead(this,t)},SafePropertyRead}(Ct),Dt=function(e){function KeyedRead(t,r,n){e.call(this,t),this.obj=r,this.key=n}return _t(KeyedRead,e),KeyedRead.prototype.visit=function(e,t){return void 0===t&&(t=null),e.visitKeyedRead(this,t)},KeyedRead}(Ct),Nt=function(e){function KeyedWrite(t,r,n,i){e.call(this,t),this.obj=r,this.key=n,this.value=i}return _t(KeyedWrite,e),KeyedWrite.prototype.visit=function(e,t){return void 0===t&&(t=null),e.visitKeyedWrite(this,t)},KeyedWrite}(Ct),Ot=function(e){function BindingPipe(t,r,n,i){e.call(this,t),this.exp=r,this.name=n,this.args=i}return _t(BindingPipe,e),BindingPipe.prototype.visit=function(e,t){return void 0===t&&(t=null),e.visitPipe(this,t)},BindingPipe}(Ct),Vt=function(e){function LiteralPrimitive(t,r){e.call(this,t),this.value=r}return _t(LiteralPrimitive,e),LiteralPrimitive.prototype.visit=function(e,t){return void 0===t&&(t=null),e.visitLiteralPrimitive(this,t)},LiteralPrimitive}(Ct),Rt=function(e){function LiteralArray(t,r){e.call(this,t),this.expressions=r}return _t(LiteralArray,e),LiteralArray.prototype.visit=function(e,t){return void 0===t&&(t=null),e.visitLiteralArray(this,t)},LiteralArray}(Ct),kt=function(e){function LiteralMap(t,r,n){e.call(this,t),this.keys=r,this.values=n}return _t(LiteralMap,e),LiteralMap.prototype.visit=function(e,t){return void 0===t&&(t=null),e.visitLiteralMap(this,t)},LiteralMap}(Ct),Lt=function(e){function Interpolation(t,r,n){e.call(this,t),this.strings=r,this.expressions=n}return _t(Interpolation,e),Interpolation.prototype.visit=function(e,t){return void 0===t&&(t=null),e.visitInterpolation(this,t)},Interpolation}(Ct),Ft=function(e){function Binary(t,r,n,i){e.call(this,t),this.operation=r,this.left=n,this.right=i}return _t(Binary,e),Binary.prototype.visit=function(e,t){return void 0===t&&(t=null),e.visitBinary(this,t)},Binary}(Ct),jt=function(e){function PrefixNot(t,r){e.call(this,t),this.expression=r}return _t(PrefixNot,e),PrefixNot.prototype.visit=function(e,t){return void 0===t&&(t=null),e.visitPrefixNot(this,t)},PrefixNot}(Ct),Bt=function(e){function MethodCall(t,r,n,i){e.call(this,t),this.receiver=r,this.name=n,this.args=i}return _t(MethodCall,e),MethodCall.prototype.visit=function(e,t){return void 0===t&&(t=null),e.visitMethodCall(this,t)},MethodCall}(Ct),Wt=function(e){function SafeMethodCall(t,r,n,i){e.call(this,t),this.receiver=r,this.name=n,this.args=i}return _t(SafeMethodCall,e),SafeMethodCall.prototype.visit=function(e,t){return void 0===t&&(t=null),e.visitSafeMethodCall(this,t)},SafeMethodCall}(Ct),Ut=function(e){function FunctionCall(t,r,n){e.call(this,t),this.target=r,this.args=n}return _t(FunctionCall,e),FunctionCall.prototype.visit=function(e,t){return void 0===t&&(t=null),e.visitFunctionCall(this,t)},FunctionCall}(Ct),Ht=function(e){function ASTWithSource(t,r,n,i){e.call(this,new wt(0,isBlank(r)?0:r.length)),this.ast=t,this.source=r,this.location=n,this.errors=i}return _t(ASTWithSource,e),ASTWithSource.prototype.visit=function(e,t){return void 0===t&&(t=null),this.ast.visit(e,t)},ASTWithSource.prototype.toString=function(){return this.source+" in "+this.location},ASTWithSource}(Ct),Gt=function(){function TemplateBinding(e,t,r,n){this.key=e,this.keyIsVar=t,this.name=r,this.expression=n}return TemplateBinding}(),zt=function(){function RecursiveAstVisitor(){}return RecursiveAstVisitor.prototype.visitBinary=function(e,t){return e.left.visit(this),e.right.visit(this),null},RecursiveAstVisitor.prototype.visitChain=function(e,t){return this.visitAll(e.expressions,t)},RecursiveAstVisitor.prototype.visitConditional=function(e,t){return e.condition.visit(this),e.trueExp.visit(this),e.falseExp.visit(this),null},RecursiveAstVisitor.prototype.visitPipe=function(e,t){return e.exp.visit(this),this.visitAll(e.args,t),null},RecursiveAstVisitor.prototype.visitFunctionCall=function(e,t){return e.target.visit(this),this.visitAll(e.args,t),null},RecursiveAstVisitor.prototype.visitImplicitReceiver=function(e,t){return null},RecursiveAstVisitor.prototype.visitInterpolation=function(e,t){return this.visitAll(e.expressions,t)},RecursiveAstVisitor.prototype.visitKeyedRead=function(e,t){return e.obj.visit(this),e.key.visit(this),null},RecursiveAstVisitor.prototype.visitKeyedWrite=function(e,t){return e.obj.visit(this),e.key.visit(this),e.value.visit(this),null},RecursiveAstVisitor.prototype.visitLiteralArray=function(e,t){return this.visitAll(e.expressions,t)},RecursiveAstVisitor.prototype.visitLiteralMap=function(e,t){return this.visitAll(e.values,t)},RecursiveAstVisitor.prototype.visitLiteralPrimitive=function(e,t){return null},RecursiveAstVisitor.prototype.visitMethodCall=function(e,t){return e.receiver.visit(this),this.visitAll(e.args,t)},RecursiveAstVisitor.prototype.visitPrefixNot=function(e,t){return e.expression.visit(this),null},RecursiveAstVisitor.prototype.visitPropertyRead=function(e,t){return e.receiver.visit(this),null},RecursiveAstVisitor.prototype.visitPropertyWrite=function(e,t){return e.receiver.visit(this),e.value.visit(this),null},RecursiveAstVisitor.prototype.visitSafePropertyRead=function(e,t){return e.receiver.visit(this),null},RecursiveAstVisitor.prototype.visitSafeMethodCall=function(e,t){return e.receiver.visit(this),this.visitAll(e.args,t)},RecursiveAstVisitor.prototype.visitAll=function(e,t){var r=this;return e.forEach(function(e){return e.visit(r,t)}),null},RecursiveAstVisitor.prototype.visitQuote=function(e,t){return null},RecursiveAstVisitor}(),qt=0,Kt=9,Qt=10,Zt=11,Xt=12,$t=13,Jt=32,Yt=33,er=34,tr=35,rr=36,nr=37,ir=38,or=39,sr=40,ar=41,ur=42,lr=43,cr=44,pr=45,hr=46,fr=47,dr=58,mr=59,yr=60,vr=61,gr=62,_r=63,br=48,wr=57,Cr=65,Er=69,Sr=70,Pr=88,Ar=90,xr=91,Tr=92,Mr=93,Ir=94,Dr=95,Nr=97,Or=101,Vr=102,Rr=110,kr=114,Lr=116,Fr=117,jr=118,Br=120,Wr=122,Ur=123,Hr=124,Gr=125,zr=160,qr=96,Kr=[/^\s*$/,/[<>]/,/^[{}]$/,/&(#|[a-z])/i,/^\/\//],Qr=function(){function InterpolationConfig(e,t){this.start=e,this.end=t}return InterpolationConfig.fromArray=function(e){return e?(assertInterpolationSymbols("interpolation",e),new InterpolationConfig(e[0],e[1])):Zr},InterpolationConfig}(),Zr=new Qr("{{","}}");!function(e){e[e.Character=0]="Character",e[e.Identifier=1]="Identifier",e[e.Keyword=2]="Keyword",e[e.String=3]="String",e[e.Operator=4]="Operator",e[e.Number=5]="Number",e[e.Error=6]="Error"}(Ee||(Ee={}));var Xr,$r=["var","let","null","undefined","true","false","if","else","this"],Jr=function(){function Lexer(){}return Lexer.prototype.tokenize=function(e){for(var t=new tn(e),r=[],n=t.scanToken();null!=n;)r.push(n),n=t.scanToken();return r},Lexer.decorators=[{type:r.Injectable}],Lexer.ctorParameters=[],Lexer}(),Yr=function(){function Token(e,t,r,n){this.index=e,this.type=t,this.numValue=r,this.strValue=n}return Token.prototype.isCharacter=function(e){return this.type==Ee.Character&&this.numValue==e},Token.prototype.isNumber=function(){return this.type==Ee.Number},Token.prototype.isString=function(){return this.type==Ee.String},Token.prototype.isOperator=function(e){return this.type==Ee.Operator&&this.strValue==e},Token.prototype.isIdentifier=function(){return this.type==Ee.Identifier},Token.prototype.isKeyword=function(){return this.type==Ee.Keyword},Token.prototype.isKeywordLet=function(){return this.type==Ee.Keyword&&"let"==this.strValue},Token.prototype.isKeywordNull=function(){return this.type==Ee.Keyword&&"null"==this.strValue},Token.prototype.isKeywordUndefined=function(){return this.type==Ee.Keyword&&"undefined"==this.strValue},Token.prototype.isKeywordTrue=function(){return this.type==Ee.Keyword&&"true"==this.strValue},Token.prototype.isKeywordFalse=function(){return this.type==Ee.Keyword&&"false"==this.strValue},Token.prototype.isKeywordThis=function(){return this.type==Ee.Keyword&&"this"==this.strValue},Token.prototype.isError=function(){return this.type==Ee.Error},Token.prototype.toNumber=function(){return this.type==Ee.Number?this.numValue:-1},Token.prototype.toString=function(){switch(this.type){case Ee.Character:case Ee.Identifier:case Ee.Keyword:case Ee.Operator:case Ee.String:case Ee.Error:return this.strValue;case Ee.Number:return this.numValue.toString();default:return null}},Token}(),en=new Yr((-1),Ee.Character,0,""),tn=function(){function _Scanner(e){this.input=e,this.peek=0,this.index=-1,this.length=e.length,this.advance()}return _Scanner.prototype.advance=function(){this.peek=++this.index>=this.length?qt:s.charCodeAt(this.input,this.index)},_Scanner.prototype.scanToken=function(){for(var e=this.input,t=this.length,r=this.peek,n=this.index;r<=Jt;){if(++n>=t){r=qt;break}r=s.charCodeAt(e,n)}if(this.peek=r,this.index=n,n>=t)return null;if(isIdentifierStart(r))return this.scanIdentifier();if(isDigit(r))return this.scanNumber(n);var i=n;switch(r){case hr:return this.advance(),isDigit(this.peek)?this.scanNumber(i):newCharacterToken(i,hr);case sr:case ar:case Ur:case Gr:case xr:case Mr:case cr:case dr:case mr:return this.scanCharacter(i,r);case or:case er:return this.scanString();case tr:case lr:case pr:case ur:case fr:case nr:case Ir:return this.scanOperator(i,s.fromCharCode(r));case _r:return this.scanComplexOperator(i,"?",hr,".");case yr:case gr:return this.scanComplexOperator(i,s.fromCharCode(r),vr,"=");case Yt:case vr:return this.scanComplexOperator(i,s.fromCharCode(r),vr,"=",vr,"=");case ir:return this.scanComplexOperator(i,"&",ir,"&");case Hr:return this.scanComplexOperator(i,"|",Hr,"|");case zr:for(;isWhitespace(this.peek);)this.advance();return this.scanToken()}return this.advance(),this.error("Unexpected character ["+s.fromCharCode(r)+"]",0)},_Scanner.prototype.scanCharacter=function(e,t){return this.advance(),newCharacterToken(e,t)},_Scanner.prototype.scanOperator=function(e,t){return this.advance(),newOperatorToken(e,t)},_Scanner.prototype.scanComplexOperator=function(e,t,r,n,i,o){this.advance();var s=t;return this.peek==r&&(this.advance(),s+=n),isPresent(i)&&this.peek==i&&(this.advance(),s+=o),newOperatorToken(e,s)},_Scanner.prototype.scanIdentifier=function(){var e=this.index;for(this.advance();isIdentifierPart(this.peek);)this.advance();var t=this.input.substring(e,this.index);return $r.indexOf(t)>-1?newKeywordToken(e,t):newIdentifierToken(e,t)},_Scanner.prototype.scanNumber=function(e){var t=this.index===e;for(this.advance();;){if(isDigit(this.peek));else if(this.peek==hr)t=!1;else{if(!isExponentStart(this.peek))break;if(this.advance(),isExponentSign(this.peek)&&this.advance(),!isDigit(this.peek))return this.error("Invalid exponent",-1);t=!1}this.advance()}var r=this.input.substring(e,this.index),n=t?u.parseIntAutoRadix(r):parseFloat(r);return newNumberToken(e,n)},_Scanner.prototype.scanString=function(){var e=this.index,t=this.peek;this.advance();for(var r,n=this.index,i=this.input;this.peek!=t;)if(this.peek==Tr){null==r&&(r=new a),r.add(i.substring(n,this.index)),this.advance();var o;if(this.peek==Fr){var l=i.substring(this.index+1,this.index+5);try{o=u.parseInt(l,16)}catch(c){return this.error("Invalid unicode escape [\\u"+l+"]",0)}for(var p=0;p<5;p++)this.advance()}else o=unescape(this.peek),this.advance();r.add(s.fromCharCode(o)),n=this.index}else{if(this.peek==qt)return this.error("Unterminated quote",0);this.advance()}var h=i.substring(n,this.index);this.advance();var f=h;return null!=r&&(r.add(h),f=r.toString()),newStringToken(e,f)},_Scanner.prototype.error=function(e,t){var r=this.index+t;return newErrorToken(r,"Lexer Error: "+e+" at column "+r+" in expression ["+this.input+"]")},_Scanner}(),rn=function(){function SplitInterpolation(e,t){this.strings=e,this.expressions=t}return SplitInterpolation}(),nn=function(){function TemplateBindingParseResult(e,t,r){this.templateBindings=e,this.warnings=t,this.errors=r}return TemplateBindingParseResult}(),on=function(){function Parser(e){this._lexer=e,this.errors=[]}return Parser.prototype.parseAction=function(e,t,r){void 0===r&&(r=Zr),this._checkNoInterpolation(e,t,r);var n=this._lexer.tokenize(this._stripComments(e)),i=new sn(e,t,n,(!0),this.errors).parseChain();return new Ht(i,e,t,this.errors)},Parser.prototype.parseBinding=function(e,t,r){void 0===r&&(r=Zr);var n=this._parseBindingAst(e,t,r);return new Ht(n,e,t,this.errors)},Parser.prototype.parseSimpleBinding=function(e,t,r){void 0===r&&(r=Zr);var n=this._parseBindingAst(e,t,r);return an.check(n)||this._reportError("Host binding expression can only contain field access and constants",e,t),new Ht(n,e,t,this.errors)},Parser.prototype._reportError=function(e,t,r,n){this.errors.push(new bt(e,t,r,n))},Parser.prototype._parseBindingAst=function(e,t,r){var n=this._parseQuote(e,t);if(isPresent(n))return n;this._checkNoInterpolation(e,t,r);var i=this._lexer.tokenize(this._stripComments(e));return new sn(e,t,i,(!1),this.errors).parseChain()},Parser.prototype._parseQuote=function(e,t){if(isBlank(e))return null;var r=e.indexOf(":");if(r==-1)return null;var n=e.substring(0,r).trim();if(!isIdentifier(n))return null;var i=e.substring(r+1);return new Et(new wt(0,e.length),n,i,t)},Parser.prototype.parseTemplateBindings=function(e,t){var r=this._lexer.tokenize(e);return new sn(e,t,r,(!1),this.errors).parseTemplateBindings()},Parser.prototype.parseInterpolation=function(e,t,r){void 0===r&&(r=Zr);var n=this.splitInterpolation(e,t,r);if(null==n)return null;for(var i=[],o=0;o0?a.push(l):this._reportError("Blank expressions are not allowed in interpolated strings",e,"at column "+this._findInterpolationErrorColumn(i,u,r)+" in",t)}return new rn(o,a)},Parser.prototype.wrapLiteralPrimitive=function(e,t){return new Ht(new Vt(new wt(0,isBlank(e)?0:e.length),e),e,t,this.errors)},Parser.prototype._stripComments=function(e){var t=this._commentStart(e);return isPresent(t)?e.substring(0,t).trim():e},Parser.prototype._commentStart=function(e){for(var t=null,r=0;r1&&this._reportError("Got interpolation ("+r.start+r.end+") where expression was expected",e,"at column "+this._findInterpolationErrorColumn(i,1,r)+" in",t)},Parser.prototype._findInterpolationErrorColumn=function(e,t,r){for(var n="",i=0;i":case"<=":case">=":this.advance();var r=this.parseAdditive();e=new Ft(this.span(e.span.start),t,e,r);continue}break}return e},_ParseAST.prototype.parseAdditive=function(){for(var e=this.parseMultiplicative();this.next.type==Ee.Operator;){var t=this.next.strValue;switch(t){case"+":case"-":this.advance();var r=this.parseMultiplicative();e=new Ft(this.span(e.span.start),t,e,r);continue}break}return e},_ParseAST.prototype.parseMultiplicative=function(){for(var e=this.parsePrefix();this.next.type==Ee.Operator;){var t=this.next.strValue;switch(t){case"*":case"%":case"/":this.advance();var r=this.parsePrefix();e=new Ft(this.span(e.span.start),t,e,r);continue}break}return e},_ParseAST.prototype.parsePrefix=function(){if(this.next.type==Ee.Operator){var e=this.inputIndex,t=this.next.strValue,r=void 0;switch(t){case"+":return this.advance(),this.parsePrefix();case"-":return this.advance(),r=this.parsePrefix(),new Ft(this.span(e),t,new Vt(new wt(e,e),0),r);case"!":return this.advance(),r=this.parsePrefix(),new jt(this.span(e),r)}}return this.parseCallChain()},_ParseAST.prototype.parseCallChain=function(){for(var e=this.parsePrimary();;)if(this.optionalCharacter(hr))e=this.parseAccessMemberOrMethodCall(e,!1);else if(this.optionalOperator("?."))e=this.parseAccessMemberOrMethodCall(e,!0);else if(this.optionalCharacter(xr)){this.rbracketsExpected++;var t=this.parsePipe();if(this.rbracketsExpected--,this.expectCharacter(Mr),this.optionalOperator("=")){var r=this.parseConditional();e=new Nt(this.span(e.span.start),e,t,r)}else e=new Dt(this.span(e.span.start),e,t)}else{if(!this.optionalCharacter(sr))return e;this.rparensExpected++;var n=this.parseCallArguments();this.rparensExpected--,this.expectCharacter(ar),e=new Ut(this.span(e.span.start),e,n)}},_ParseAST.prototype.parsePrimary=function(){var e=this.inputIndex;if(this.optionalCharacter(sr)){this.rparensExpected++;var t=this.parsePipe();return this.rparensExpected--,this.expectCharacter(ar),t}if(this.next.isKeywordNull())return this.advance(),new Vt(this.span(e),null);if(this.next.isKeywordUndefined())return this.advance(),new Vt(this.span(e),(void 0));if(this.next.isKeywordTrue())return this.advance(),new Vt(this.span(e),(!0));if(this.next.isKeywordFalse())return this.advance(),new Vt(this.span(e),(!1));if(this.next.isKeywordThis())return this.advance(),new Pt(this.span(e));if(this.optionalCharacter(xr)){this.rbracketsExpected++;var r=this.parseExpressionList(Mr);return this.rbracketsExpected--,this.expectCharacter(Mr),new Rt(this.span(e),r)}if(this.next.isCharacter(Ur))return this.parseLiteralMap();if(this.next.isIdentifier())return this.parseAccessMemberOrMethodCall(new Pt(this.span(e)),!1);if(this.next.isNumber()){var n=this.next.toNumber();return this.advance(),new Vt(this.span(e),n)}if(this.next.isString()){var i=this.next.toString();return this.advance(),new Vt(this.span(e),i)}return this.index>=this.tokens.length?(this.error("Unexpected end of expression: "+this.input),new St(this.span(e))):(this.error("Unexpected token "+this.next),new St(this.span(e)))},_ParseAST.prototype.parseExpressionList=function(e){var t=[];if(!this.next.isCharacter(e))do t.push(this.parsePipe());while(this.optionalCharacter(cr));return t},_ParseAST.prototype.parseLiteralMap=function(){var e=[],t=[],r=this.inputIndex;if(this.expectCharacter(Ur),!this.optionalCharacter(Gr)){this.rbracesExpected++;do{var n=this.expectIdentifierOrKeywordOrString();e.push(n),this.expectCharacter(dr),t.push(this.parsePipe())}while(this.optionalCharacter(cr));this.rbracesExpected--,this.expectCharacter(Gr)}return new kt(this.span(r),e,t)},_ParseAST.prototype.parseAccessMemberOrMethodCall=function(e,t){void 0===t&&(t=!1);var r=e.span.start,n=this.expectIdentifierOrKeyword();if(this.optionalCharacter(sr)){this.rparensExpected++;var i=this.parseCallArguments();this.expectCharacter(ar),this.rparensExpected--;var o=this.span(r);return t?new Wt(o,e,n,i):new Bt(o,e,n,i)}if(t)return this.optionalOperator("=")?(this.error("The '?.' operator cannot be used in the assignment"),new St(this.span(r))):new It(this.span(r),e,n);if(this.optionalOperator("=")){if(!this.parseAction)return this.error("Bindings cannot contain assignments"),new St(this.span(r));var s=this.parseConditional();return new Mt(this.span(r),e,n,s)}return new Tt(this.span(r),e,n)},_ParseAST.prototype.parseCallArguments=function(){if(this.next.isCharacter(ar))return[];var e=[];do e.push(this.parsePipe());while(this.optionalCharacter(cr));return e},_ParseAST.prototype.expectTemplateBindingKey=function(){var e="",t=!1;do e+=this.expectIdentifierOrKeywordOrString(),t=this.optionalOperator("-"),t&&(e+="-");while(t);return e.toString()},_ParseAST.prototype.parseTemplateBindings=function(){for(var e=[],t=null,r=[];this.indexe.length-1&&(t=e.length-1);for(var i=t,o=0,s=0;o<100&&t>0&&(t--,o++,"\n"!=e[t]||3!=++s););for(o=0,s=0;o<100&&i]"+e.substring(this.span.start.offset,i+1);r=' ("'+a+'")'}return this.span.details&&(n=", "+this.span.details),""+this.msg+r+": "+this.span.start+n},ParseError}(),dn=function(){function Text(e,t){this.value=e,this.sourceSpan=t}return Text.prototype.visit=function(e,t){return e.visitText(this,t)},Text}(),mn=function(){function Expansion(e,t,r,n,i){this.switchValue=e,this.type=t,this.cases=r,this.sourceSpan=n,this.switchValueSourceSpan=i}return Expansion.prototype.visit=function(e,t){return e.visitExpansion(this,t)},Expansion}(),yn=function(){function ExpansionCase(e,t,r,n,i){this.value=e,this.expression=t,this.sourceSpan=r,this.valueSourceSpan=n,this.expSourceSpan=i}return ExpansionCase.prototype.visit=function(e,t){return e.visitExpansionCase(this,t)},ExpansionCase}(),vn=function(){function Attribute(e,t,r){this.name=e,this.value=t,this.sourceSpan=r}return Attribute.prototype.visit=function(e,t){return e.visitAttribute(this,t)},Attribute}(),gn=function(){function Element(e,t,r,n,i,o){this.name=e,this.attrs=t,this.children=r,this.sourceSpan=n,this.startSourceSpan=i,this.endSourceSpan=o}return Element.prototype.visit=function(e,t){return e.visitElement(this,t)},Element}(),_n=function(){function Comment(e,t){this.value=e,this.sourceSpan=t}return Comment.prototype.visit=function(e,t){return e.visitComment(this,t)},Comment}(),bn=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 __)};!function(e){e[e.TAG_OPEN_START=0]="TAG_OPEN_START",e[e.TAG_OPEN_END=1]="TAG_OPEN_END",e[e.TAG_OPEN_END_VOID=2]="TAG_OPEN_END_VOID",e[e.TAG_CLOSE=3]="TAG_CLOSE",e[e.TEXT=4]="TEXT",e[e.ESCAPABLE_RAW_TEXT=5]="ESCAPABLE_RAW_TEXT",e[e.RAW_TEXT=6]="RAW_TEXT",e[e.COMMENT_START=7]="COMMENT_START",e[e.COMMENT_END=8]="COMMENT_END",e[e.CDATA_START=9]="CDATA_START",e[e.CDATA_END=10]="CDATA_END",e[e.ATTR_NAME=11]="ATTR_NAME",e[e.ATTR_VALUE=12]="ATTR_VALUE",e[e.DOC_TYPE=13]="DOC_TYPE",e[e.EXPANSION_FORM_START=14]="EXPANSION_FORM_START",e[e.EXPANSION_CASE_VALUE=15]="EXPANSION_CASE_VALUE",e[e.EXPANSION_CASE_EXP_START=16]="EXPANSION_CASE_EXP_START",e[e.EXPANSION_CASE_EXP_END=17]="EXPANSION_CASE_EXP_END",e[e.EXPANSION_FORM_END=18]="EXPANSION_FORM_END",e[e.EOF=19]="EOF"}(pn||(pn={}));var wn,Cn=function(){function Token(e,t,r){this.type=e,this.parts=t,this.sourceSpan=r}return Token}(),En=function(e){function TokenError(t,r,n){e.call(this,n,t),this.tokenType=r}return bn(TokenError,e),TokenError}(hn),Sn=function(){function TokenizeResult(e,t){this.tokens=e,this.errors=t}return TokenizeResult}(),Pn=/\r\n?/g,An=function(){function _ControlFlowError(e){this.error=e}return _ControlFlowError}(),xn=function(){function _Tokenizer(e,t,r,n){void 0===n&&(n=Zr),this._file=e,this._getTagDefinition=t,this._tokenizeIcu=r,this._interpolationConfig=n,this._peek=-1,this._nextPeek=-1,this._index=-1,this._line=0,this._column=-1,this._expansionCaseStack=[],this._inInterpolation=!1,this.tokens=[],this.errors=[],this._input=e.content,this._length=e.content.length,this._advance()}return _Tokenizer.prototype._processCarriageReturns=function(e){return e.replace(Pn,"\n")},_Tokenizer.prototype.tokenize=function(){for(;this._peek!==qt;){var e=this._getLocation();try{this._attemptCharCode(yr)?this._attemptCharCode(Yt)?this._attemptCharCode(xr)?this._consumeCdata(e):this._attemptCharCode(pr)?this._consumeComment(e):this._consumeDocType(e):this._attemptCharCode(fr)?this._consumeTagClose(e):this._consumeTagOpen(e):this._tokenizeIcu&&this._tokenizeExpansionForm()||this._consumeText()}catch(t){if(!(t instanceof An))throw t;this.errors.push(t.error)}}return this._beginToken(pn.EOF),this._endToken([]),new Sn(mergeTextTokens(this.tokens),this.errors)},_Tokenizer.prototype._tokenizeExpansionForm=function(){if(isExpansionFormStart(this._input,this._index,this._interpolationConfig))return this._consumeExpansionFormStart(),!0;if(isExpansionCaseStart(this._peek)&&this._isInExpansionForm())return this._consumeExpansionCaseStart(),!0;if(this._peek===Gr){if(this._isInExpansionCase())return this._consumeExpansionCaseEnd(),!0;if(this._isInExpansionForm())return this._consumeExpansionFormEnd(),!0}return!1},_Tokenizer.prototype._getLocation=function(){return new un(this._file,this._index,this._line,this._column)},_Tokenizer.prototype._getSpan=function(e,t){return void 0===e&&(e=this._getLocation()),void 0===t&&(t=this._getLocation()),new cn(e,t)},_Tokenizer.prototype._beginToken=function(e,t){void 0===t&&(t=this._getLocation()),this._currentTokenStart=t,this._currentTokenType=e},_Tokenizer.prototype._endToken=function(e,t){void 0===t&&(t=this._getLocation());var r=new Cn(this._currentTokenType,e,new cn(this._currentTokenStart,t));return this.tokens.push(r),this._currentTokenStart=null,this._currentTokenType=null,r},_Tokenizer.prototype._createError=function(e,t){this._isInExpansionForm()&&(e+=' (Do you have an unescaped "{" in your template? Use "{{ \'{\' }}") to escape it.)');var r=new En(e,this._currentTokenType,t);return this._currentTokenStart=null,this._currentTokenType=null,new An(r)},_Tokenizer.prototype._advance=function(){if(this._index>=this._length)throw this._createError(_unexpectedCharacterErrorMsg(qt),this._getSpan());this._peek===Qt?(this._line++,this._column=0):this._peek!==Qt&&this._peek!==$t&&this._column++,this._index++,this._peek=this._index>=this._length?qt:this._input.charCodeAt(this._index),this._nextPeek=this._index+1>=this._length?qt:this._input.charCodeAt(this._index+1)},_Tokenizer.prototype._attemptCharCode=function(e){return this._peek===e&&(this._advance(),!0)},_Tokenizer.prototype._attemptCharCodeCaseInsensitive=function(e){return!!compareCharCodeCaseInsensitive(this._peek,e)&&(this._advance(),!0)},_Tokenizer.prototype._requireCharCode=function(e){var t=this._getLocation();if(!this._attemptCharCode(e))throw this._createError(_unexpectedCharacterErrorMsg(this._peek),this._getSpan(t,t))},_Tokenizer.prototype._attemptStr=function(e){var t=e.length;if(this._index+t>this._length)return!1;for(var r=this._savePosition(),n=0;nn.offset&&o.push(this._input.substring(n.offset,this._index));this._peek!==t;)o.push(this._readChar(e))}return this._endToken([this._processCarriageReturns(o.join(""))],n)},_Tokenizer.prototype._consumeComment=function(e){var t=this;this._beginToken(pn.COMMENT_START,e),this._requireCharCode(pr),this._endToken([]);var r=this._consumeRawText(!1,pr,function(){return t._attemptStr("->")});this._beginToken(pn.COMMENT_END,r.sourceSpan.end),this._endToken([])},_Tokenizer.prototype._consumeCdata=function(e){var t=this;this._beginToken(pn.CDATA_START,e),this._requireStr("CDATA["),this._endToken([]);var r=this._consumeRawText(!1,Mr,function(){return t._attemptStr("]>")});this._beginToken(pn.CDATA_END,r.sourceSpan.end),this._endToken([])},_Tokenizer.prototype._consumeDocType=function(e){this._beginToken(pn.DOC_TYPE,e),this._attemptUntilChar(gr),this._advance(),this._endToken([this._input.substring(e.offset+2,this._index-1)])},_Tokenizer.prototype._consumePrefixAndName=function(){for(var e=this._index,t=null;this._peek!==dr&&!isPrefixEnd(this._peek);)this._advance();var r;this._peek===dr?(this._advance(),t=this._input.substring(e,this._index-1),r=this._index):r=e,this._requireCharCodeUntilFn(isNameEnd,this._index===r?1:0);var n=this._input.substring(r,this._index);return[t,n]},_Tokenizer.prototype._consumeTagOpen=function(e){var t,r,n=this._savePosition();try{if(!isAsciiLetter(this._peek))throw this._createError(_unexpectedCharacterErrorMsg(this._peek),this._getSpan());var i=this._index;for(this._consumeTagOpenStart(e),t=this._input.substring(i,this._index),r=t.toLowerCase(),this._attemptCharCodeUntilFn(isNotWhitespace);this._peek!==fr&&this._peek!==gr;)this._consumeAttributeName(),this._attemptCharCodeUntilFn(isNotWhitespace),this._attemptCharCode(vr)&&(this._attemptCharCodeUntilFn(isNotWhitespace),this._consumeAttributeValue()),this._attemptCharCodeUntilFn(isNotWhitespace);this._consumeTagOpenEnd()}catch(o){if(o instanceof An)return this._restorePosition(n),this._beginToken(pn.TEXT,e),void this._endToken(["<"]);throw o}var s=this._getTagDefinition(t).contentType;s===C.RAW_TEXT?this._consumeRawTextWithTagClose(r,!1):s===C.ESCAPABLE_RAW_TEXT&&this._consumeRawTextWithTagClose(r,!0)},_Tokenizer.prototype._consumeRawTextWithTagClose=function(e,t){var r=this,n=this._consumeRawText(t,yr,function(){return!!r._attemptCharCode(fr)&&(r._attemptCharCodeUntilFn(isNotWhitespace),!!r._attemptStrCaseInsensitive(e)&&(r._attemptCharCodeUntilFn(isNotWhitespace),r._attemptCharCode(gr)))});this._beginToken(pn.TAG_CLOSE,n.sourceSpan.end),this._endToken([null,e])},_Tokenizer.prototype._consumeTagOpenStart=function(e){this._beginToken(pn.TAG_OPEN_START,e);var t=this._consumePrefixAndName();this._endToken(t)},_Tokenizer.prototype._consumeAttributeName=function(){this._beginToken(pn.ATTR_NAME);var e=this._consumePrefixAndName();this._endToken(e)},_Tokenizer.prototype._consumeAttributeValue=function(){this._beginToken(pn.ATTR_VALUE);var e;if(this._peek===or||this._peek===er){var t=this._peek;this._advance();for(var r=[];this._peek!==t;)r.push(this._readChar(!0));e=r.join(""),this._advance()}else{var n=this._index;this._requireCharCodeUntilFn(isNameEnd,1),e=this._input.substring(n,this._index)}this._endToken([this._processCarriageReturns(e)])},_Tokenizer.prototype._consumeTagOpenEnd=function(){var e=this._attemptCharCode(fr)?pn.TAG_OPEN_END_VOID:pn.TAG_OPEN_END;this._beginToken(e),this._requireCharCode(gr),this._endToken([])},_Tokenizer.prototype._consumeTagClose=function(e){this._beginToken(pn.TAG_CLOSE,e),this._attemptCharCodeUntilFn(isNotWhitespace);var t=this._consumePrefixAndName();this._attemptCharCodeUntilFn(isNotWhitespace),this._requireCharCode(gr),this._endToken(t)},_Tokenizer.prototype._consumeExpansionFormStart=function(){this._beginToken(pn.EXPANSION_FORM_START,this._getLocation()),this._requireCharCode(Ur),this._endToken([]),this._expansionCaseStack.push(pn.EXPANSION_FORM_START),this._beginToken(pn.RAW_TEXT,this._getLocation());var e=this._readUntil(cr);this._endToken([e],this._getLocation()),this._requireCharCode(cr),this._attemptCharCodeUntilFn(isNotWhitespace),this._beginToken(pn.RAW_TEXT,this._getLocation());var t=this._readUntil(cr);this._endToken([t],this._getLocation()),this._requireCharCode(cr),this._attemptCharCodeUntilFn(isNotWhitespace)},_Tokenizer.prototype._consumeExpansionCaseStart=function(){this._beginToken(pn.EXPANSION_CASE_VALUE,this._getLocation());var e=this._readUntil(Ur).trim();this._endToken([e],this._getLocation()),this._attemptCharCodeUntilFn(isNotWhitespace),this._beginToken(pn.EXPANSION_CASE_EXP_START,this._getLocation()),this._requireCharCode(Ur),this._endToken([],this._getLocation()),this._attemptCharCodeUntilFn(isNotWhitespace),this._expansionCaseStack.push(pn.EXPANSION_CASE_EXP_START)},_Tokenizer.prototype._consumeExpansionCaseEnd=function(){this._beginToken(pn.EXPANSION_CASE_EXP_END,this._getLocation()),this._requireCharCode(Gr),this._endToken([],this._getLocation()),this._attemptCharCodeUntilFn(isNotWhitespace),this._expansionCaseStack.pop()},_Tokenizer.prototype._consumeExpansionFormEnd=function(){this._beginToken(pn.EXPANSION_FORM_END,this._getLocation()),this._requireCharCode(Gr),this._endToken([]),this._expansionCaseStack.pop()},_Tokenizer.prototype._consumeText=function(){var e=this._getLocation();this._beginToken(pn.TEXT,e);var t=[];do this._interpolationConfig&&this._attemptStr(this._interpolationConfig.start)?(t.push(this._interpolationConfig.start),this._inInterpolation=!0):this._interpolationConfig&&this._attemptStr(this._interpolationConfig.end)&&this._inInterpolation?(t.push(this._interpolationConfig.end),this._inInterpolation=!1):t.push(this._readChar(!0));while(!this._isTextEnd());this._endToken([this._processCarriageReturns(t.join(""))])},_Tokenizer.prototype._isTextEnd=function(){if(this._peek===yr||this._peek===qt)return!0;if(this._tokenizeIcu&&!this._inInterpolation){if(isExpansionFormStart(this._input,this._index,this._interpolationConfig))return!0;if(this._peek===Gr&&this._isInExpansionCase())return!0}return!1},_Tokenizer.prototype._savePosition=function(){return[this._peek,this._index,this._column,this._line,this.tokens.length]},_Tokenizer.prototype._readUntil=function(e){var t=this._index;return this._attemptUntilChar(e),this._input.substring(t,this._index)},_Tokenizer.prototype._restorePosition=function(e){this._peek=e[0],this._index=e[1],this._column=e[2],this._line=e[3];var t=e[4];t0&&this._expansionCaseStack[this._expansionCaseStack.length-1]===pn.EXPANSION_CASE_EXP_START},_Tokenizer.prototype._isInExpansionForm=function(){return this._expansionCaseStack.length>0&&this._expansionCaseStack[this._expansionCaseStack.length-1]===pn.EXPANSION_FORM_START},_Tokenizer}(),Tn=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 __)},Mn=function(e){function TreeError(t,r,n){e.call(this,r,n),this.elementName=t}return Tn(TreeError,e),TreeError.create=function(e,t,r){return new TreeError(e,t,r)},TreeError}(hn),In=function(){function ParseTreeResult(e,t){this.rootNodes=e,this.errors=t}return ParseTreeResult}(),Dn=function(){function Parser(e){this.getTagDefinition=e}return Parser.prototype.parse=function(e,t,r,n){void 0===r&&(r=!1),void 0===n&&(n=Zr);var i=tokenize(e,t,this.getTagDefinition,r,n),o=new Nn(i.tokens,this.getTagDefinition).build();return new In(o.rootNodes,i.errors.concat(o.errors))},Parser}(),Nn=function(){function _TreeBuilder(e,t){this.tokens=e,this.getTagDefinition=t,this._index=-1,this._rootNodes=[],this._errors=[],this._elementStack=[],this._advance()}return _TreeBuilder.prototype.build=function(){for(;this._peek.type!==pn.EOF;)this._peek.type===pn.TAG_OPEN_START?this._consumeStartTag(this._advance()):this._peek.type===pn.TAG_CLOSE?this._consumeEndTag(this._advance()):this._peek.type===pn.CDATA_START?(this._closeVoidElement(),this._consumeCdata(this._advance())):this._peek.type===pn.COMMENT_START?(this._closeVoidElement(),this._consumeComment(this._advance())):this._peek.type===pn.TEXT||this._peek.type===pn.RAW_TEXT||this._peek.type===pn.ESCAPABLE_RAW_TEXT?(this._closeVoidElement(),this._consumeText(this._advance())):this._peek.type===pn.EXPANSION_FORM_START?this._consumeExpansion(this._advance()):this._advance();return new In(this._rootNodes,this._errors)},_TreeBuilder.prototype._advance=function(){var e=this._peek;return this._index0)return this._errors=this._errors.concat(i.errors),null;var o=new cn(e.sourceSpan.start,n.sourceSpan.end),s=new cn(t.sourceSpan.start,n.sourceSpan.end);return new yn(e.parts[0],i.rootNodes,o,e.sourceSpan,s)},_TreeBuilder.prototype._collectExpansionExpTokens=function(e){for(var t=[],r=[pn.EXPANSION_CASE_EXP_START];;){if(this._peek.type!==pn.EXPANSION_FORM_START&&this._peek.type!==pn.EXPANSION_CASE_EXP_START||r.push(this._peek.type), this._peek.type===pn.EXPANSION_CASE_EXP_END){if(!lastOnStack(r,pn.EXPANSION_CASE_EXP_START))return this._errors.push(Mn.create(null,e.sourceSpan,"Invalid ICU message. Missing '}'.")),null;if(r.pop(),0==r.length)return t}if(this._peek.type===pn.EXPANSION_FORM_END){if(!lastOnStack(r,pn.EXPANSION_FORM_START))return this._errors.push(Mn.create(null,e.sourceSpan,"Invalid ICU message. Missing '}'.")),null;r.pop()}if(this._peek.type===pn.EOF)return this._errors.push(Mn.create(null,e.sourceSpan,"Invalid ICU message. Missing '}'.")),null;t.push(this._advance())}},_TreeBuilder.prototype._consumeText=function(e){var t=e.parts[0];if(t.length>0&&"\n"==t[0]){var r=this._getParentElement();isPresent(r)&&0==r.children.length&&this.getTagDefinition(r.name).ignoreFirstLf&&(t=t.substring(1))}t.length>0&&this._addToParent(new dn(t,e.sourceSpan))},_TreeBuilder.prototype._closeVoidElement=function(){if(this._elementStack.length>0){var e=x.last(this._elementStack);this.getTagDefinition(e.name).isVoid&&this._elementStack.pop()}},_TreeBuilder.prototype._consumeStartTag=function(e){for(var t=e.parts[0],r=e.parts[1],n=[];this._peek.type===pn.ATTR_NAME;)n.push(this._consumeAttr(this._advance()));var i=this._getElementFullName(t,r,this._getParentElement()),o=!1;if(this._peek.type===pn.TAG_OPEN_END_VOID){this._advance(),o=!0;var s=this.getTagDefinition(i);s.canSelfClose||null!==getNsPrefix(i)||s.isVoid||this._errors.push(Mn.create(i,e.sourceSpan,'Only void and foreign elements can be self closed "'+e.parts[1]+'"'))}else this._peek.type===pn.TAG_OPEN_END&&(this._advance(),o=!1);var a=this._peek.sourceSpan.start,u=new cn(e.sourceSpan.start,a),l=new gn(i,n,[],u,u,null);this._pushElement(l),o&&(this._popElement(i),l.endSourceSpan=u)},_TreeBuilder.prototype._pushElement=function(e){if(this._elementStack.length>0){var t=x.last(this._elementStack);this.getTagDefinition(t.name).isClosedByChild(e.name)&&this._elementStack.pop()}var r=this.getTagDefinition(e.name),n=this._getParentElementSkippingContainers(),i=n.parent,o=n.container;if(isPresent(i)&&r.requireExtraParent(i.name)){var s=new gn(r.parentToAdd,[],[],e.sourceSpan,e.startSourceSpan,e.endSourceSpan);this._insertBeforeContainer(i,o,s)}this._addToParent(e),this._elementStack.push(e)},_TreeBuilder.prototype._consumeEndTag=function(e){var t=this._getElementFullName(e.parts[0],e.parts[1],this._getParentElement());this._getParentElement()&&(this._getParentElement().endSourceSpan=e.sourceSpan),this.getTagDefinition(t).isVoid?this._errors.push(Mn.create(t,e.sourceSpan,'Void elements do not have end tags "'+e.parts[1]+'"')):this._popElement(t)||this._errors.push(Mn.create(t,e.sourceSpan,'Unexpected closing tag "'+e.parts[1]+'"'))},_TreeBuilder.prototype._popElement=function(e){for(var t=this._elementStack.length-1;t>=0;t--){var r=this._elementStack[t];if(r.name==e)return x.splice(this._elementStack,t,this._elementStack.length-t),!0;if(!this.getTagDefinition(r.name).closedByParent)return!1}return!1},_TreeBuilder.prototype._consumeAttr=function(e){var t=mergeNsAndName(e.parts[0],e.parts[1]),r=e.sourceSpan.end,n="";if(this._peek.type===pn.ATTR_VALUE){var i=this._advance();n=i.parts[0],r=i.sourceSpan.end}return new vn(t,n,new cn(e.sourceSpan.start,r))},_TreeBuilder.prototype._getParentElement=function(){return this._elementStack.length>0?x.last(this._elementStack):null},_TreeBuilder.prototype._getParentElementSkippingContainers=function(){for(var e=null,t=this._elementStack.length-1;t>=0;t--){if("ng-container"!==this._elementStack[t].name)return{parent:this._elementStack[t],container:e};e=this._elementStack[t]}return{parent:x.last(this._elementStack),container:e}},_TreeBuilder.prototype._addToParent=function(e){var t=this._getParentElement();isPresent(t)?t.children.push(e):this._rootNodes.push(e)},_TreeBuilder.prototype._insertBeforeContainer=function(e,t,r){if(t){if(e){var n=e.children.indexOf(t);e.children[n]=r}else this._rootNodes.push(r);r.children.push(t),this._elementStack.splice(this._elementStack.indexOf(t),0,r)}else this._addToParent(r),this._elementStack.push(r)},_TreeBuilder.prototype._getElementFullName=function(e,t,r){return isBlank(e)&&(e=this.getTagDefinition(t).implicitNamespacePrefix,isBlank(e)&&isPresent(r)&&(e=getNsPrefix(r.name))),mergeNsAndName(e,t)},_TreeBuilder}(),On=function(){function _SerializerVisitor(){}return _SerializerVisitor.prototype.visitText=function(e,t){return e.value},_SerializerVisitor.prototype.visitContainer=function(e,t){var r=this;return"["+e.children.map(function(e){return e.visit(r)}).join(", ")+"]"},_SerializerVisitor.prototype.visitIcu=function(e,t){var r=this,n=Object.keys(e.cases).map(function(t){return t+" {"+e.cases[t].visit(r)+"}"});return"{"+e.expression+", "+e.type+", "+n.join(", ")+"}"},_SerializerVisitor.prototype.visitTagPlaceholder=function(e,t){var r=this;return e.isVoid?'':''+e.children.map(function(e){return e.visit(r)}).join(", ")+''},_SerializerVisitor.prototype.visitPlaceholder=function(e,t){return''+e.value+""},_SerializerVisitor.prototype.visitIcuPlaceholder=function(e,t){return''+e.value.visit(this)+""},_SerializerVisitor}(),Vn=new On,Rn=function(){function Message(e,t,r,n,i){this.nodes=e,this.placeholders=t,this.placeholderToMsgIds=r,this.meaning=n,this.description=i}return Message}(),kn=function(){function Text(e,t){this.value=e,this.sourceSpan=t}return Text.prototype.visit=function(e,t){return e.visitText(this,t)},Text}(),Ln=function(){function Container(e,t){this.children=e,this.sourceSpan=t}return Container.prototype.visit=function(e,t){return e.visitContainer(this,t)},Container}(),Fn=function(){function Icu(e,t,r,n){this.expression=e,this.type=t,this.cases=r,this.sourceSpan=n}return Icu.prototype.visit=function(e,t){return e.visitIcu(this,t)},Icu}(),jn=function(){function TagPlaceholder(e,t,r,n,i,o,s){this.tag=e,this.attrs=t,this.startName=r,this.closeName=n,this.children=i,this.isVoid=o,this.sourceSpan=s}return TagPlaceholder.prototype.visit=function(e,t){return e.visitTagPlaceholder(this,t)},TagPlaceholder}(),Bn=function(){function Placeholder(e,t,r){void 0===t&&(t=""),this.value=e,this.name=t,this.sourceSpan=r}return Placeholder.prototype.visit=function(e,t){return e.visitPlaceholder(this,t)},Placeholder}(),Wn=function(){function IcuPlaceholder(e,t,r){void 0===t&&(t=""),this.value=e,this.name=t,this.sourceSpan=r}return IcuPlaceholder.prototype.visit=function(e,t){return e.visitIcuPlaceholder(this,t)},IcuPlaceholder}(),Un={A:"LINK",B:"BOLD_TEXT",BR:"LINE_BREAK",EM:"EMPHASISED_TEXT",H1:"HEADING_LEVEL1",H2:"HEADING_LEVEL2",H3:"HEADING_LEVEL3",H4:"HEADING_LEVEL4",H5:"HEADING_LEVEL5",H6:"HEADING_LEVEL6",HR:"HORIZONTAL_RULE",I:"ITALIC_TEXT",LI:"LIST_ITEM",LINK:"MEDIA_LINK",OL:"ORDERED_LIST",P:"PARAGRAPH",Q:"QUOTATION",S:"STRIKETHROUGH_TEXT",SMALL:"SMALL_TEXT",SUB:"SUBSTRIPT",SUP:"SUPERSCRIPT",TBODY:"TABLE_BODY",TD:"TABLE_CELL",TFOOT:"TABLE_FOOTER",TH:"TABLE_HEADER_CELL",THEAD:"TABLE_HEADER",TR:"TABLE_ROW",TT:"MONOSPACED_TEXT",U:"UNDERLINED_TEXT",UL:"UNORDERED_LIST"},Hn=function(){function PlaceholderRegistry(){this._placeHolderNameCounts={},this._signatureToName={}}return PlaceholderRegistry.prototype.getStartTagPlaceholderName=function(e,t,r){var n=this._hashTag(e,t,r);if(this._signatureToName[n])return this._signatureToName[n];var i=e.toUpperCase(),o=Un[i]||"TAG_"+i,s=this._generateUniqueName(r?o:"START_"+o);return this._signatureToName[n]=s,s},PlaceholderRegistry.prototype.getCloseTagPlaceholderName=function(e){var t=this._hashClosingTag(e);if(this._signatureToName[t])return this._signatureToName[t];var r=e.toUpperCase(),n=Un[r]||"TAG_"+r,i=this._generateUniqueName("CLOSE_"+n);return this._signatureToName[t]=i,i},PlaceholderRegistry.prototype.getPlaceholderName=function(e,t){var r=e.toUpperCase(),n="PH: "+r+"="+t;if(this._signatureToName[n])return this._signatureToName[n];var i=this._generateUniqueName(r);return this._signatureToName[n]=i,i},PlaceholderRegistry.prototype._hashTag=function(e,t,r){var n="<"+e,i=Object.keys(t).sort().map(function(e){return" "+e+"="+t[e]}).join(""),o=r?"/>":">";return n+i+o},PlaceholderRegistry.prototype._hashClosingTag=function(e){return this._hashTag("/"+e,{},!1)},PlaceholderRegistry.prototype._generateUniqueName=function(e){var t=e,r=this._placeHolderNameCounts[t];return r?(t+="_"+r,r++):r=1,this._placeHolderNameCounts[e]=r,t},PlaceholderRegistry}(),Gn=new on(new Jr),zn=function(){function _I18nVisitor(e,t){this._expressionParser=e,this._interpolationConfig=t}return _I18nVisitor.prototype.toI18nMessage=function(e,t,r){this._isIcu=1==e.length&&e[0]instanceof mn,this._icuDepth=0,this._placeholderRegistry=new Hn,this._placeholderToContent={},this._placeholderToIds={};var n=visitAll(this,e,{});return new Rn(n,this._placeholderToContent,this._placeholderToIds,t,r)},_I18nVisitor.prototype.visitElement=function(e,t){var r=visitAll(this,e.children),n={};e.attrs.forEach(function(e){n[e.name]=e.value});var i=getHtmlTagDefinition(e.name).isVoid,o=this._placeholderRegistry.getStartTagPlaceholderName(e.name,n,i);this._placeholderToContent[o]=e.sourceSpan.toString();var s="";return i||(s=this._placeholderRegistry.getCloseTagPlaceholderName(e.name),this._placeholderToContent[s]=""),new jn(e.name,n,o,s,r,i,e.sourceSpan)},_I18nVisitor.prototype.visitAttribute=function(e,t){return this._visitTextWithInterpolation(e.value,e.sourceSpan)},_I18nVisitor.prototype.visitText=function(e,t){return this._visitTextWithInterpolation(e.value,e.sourceSpan)},_I18nVisitor.prototype.visitComment=function(e,t){return null},_I18nVisitor.prototype.visitExpansion=function(e,t){var r=this;this._icuDepth++;var n={},i=new Fn(e.switchValue,e.type,n,e.sourceSpan);if(e.cases.forEach(function(e){n[e.value]=new Ln(e.expression.map(function(e){return e.visit(r,{})}),e.expSourceSpan)}),this._icuDepth--,this._isIcu||this._icuDepth>0)return i;var o=this._placeholderRegistry.getPlaceholderName("ICU",e.sourceSpan.toString()),s=new _I18nVisitor(this._expressionParser,this._interpolationConfig);return this._placeholderToIds[o]=digestMessage(s.toI18nMessage([e],"","")),new Wn(i,o,e.sourceSpan)},_I18nVisitor.prototype.visitExpansionCase=function(e,t){throw new Error("Unreachable code")},_I18nVisitor.prototype._visitTextWithInterpolation=function(e,t){var r=this._expressionParser.splitInterpolation(e,t.start.toString(),this._interpolationConfig);if(!r)return new kn(e,t);for(var n=[],i=new Ln(n,t),o=this._interpolationConfig,s=o.start,a=o.end,u=0;u=r;i--){var o=this._messages[i].nodes;if(!(1==o.length&&o[0]instanceof kn)){this._messages.splice(i,1);break}}this._msgCountAtSectionStart=void 0},_Visitor.prototype._reportError=function(e,t){this._errors.push(new Qn(e.sourceSpan,t))},_Visitor}(),ti=function(){function MessageBundle(e,t,r){this._htmlParser=e,this._implicitTags=t,this._implicitAttrs=r,this._messageMap={}}return MessageBundle.prototype.updateFromTemplate=function(e,t,r){var n=this,i=this._htmlParser.parse(e,t,!0,r);if(i.errors.length)return i.errors;var o=extractMessages(i.rootNodes,r,this._implicitTags,this._implicitAttrs);return o.errors.length?o.errors:void o.messages.forEach(function(e){n._messageMap[digestMessage(e)]=e})},MessageBundle.prototype.getMessageMap=function(){return this._messageMap},MessageBundle.prototype.write=function(e){return e.write(this._messageMap)},MessageBundle}(),ri=function(){function XmlTagDefinition(){this.closedByParent=!1,this.contentType=C.PARSABLE_DATA,this.isVoid=!1,this.ignoreFirstLf=!1,this.canSelfClose=!0}return XmlTagDefinition.prototype.requireExtraParent=function(e){return!1},XmlTagDefinition.prototype.isClosedByChild=function(e){return!1},XmlTagDefinition}(),ni=new ri,ii=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 __)},oi=function(e){function XmlParser(){e.call(this,getXmlTagDefinition)}return ii(XmlParser,e),XmlParser.prototype.parse=function(t,r,n){return void 0===n&&(n=!1),e.prototype.parse.call(this,t,r,n,null)},XmlParser}(Dn),si=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 __)},ai=function(){function _Visitor(){}return _Visitor.prototype.visitTag=function(e){var t=this,r=this._serializeAttributes(e.attrs);if(0==e.children.length)return"<"+e.name+r+"/>";var n=e.children.map(function(e){return e.visit(t)});return"<"+e.name+r+">"+n.join("")+""},_Visitor.prototype.visitText=function(e){return e.value},_Visitor.prototype.visitDeclaration=function(e){return""},_Visitor.prototype._serializeAttributes=function(e){var t=Object.keys(e).map(function(t){return t+'="'+e[t]+'"'}).join(" ");return t.length>0?" "+t:""},_Visitor.prototype.visitDoctype=function(e){return""},_Visitor}(),ui=new ai,li=function(){function Declaration(e){var t=this;this.attrs={},Object.keys(e).forEach(function(r){t.attrs[r]=_escapeXml(e[r])})}return Declaration.prototype.visit=function(e){return e.visitDeclaration(this)},Declaration}(),ci=function(){function Doctype(e,t){this.rootTag=e,this.dtd=t}return Doctype.prototype.visit=function(e){return e.visitDoctype(this)},Doctype}(),pi=function(){function Tag(e,t,r){var n=this;void 0===t&&(t={}),void 0===r&&(r=[]),this.name=e,this.children=r,this.attrs={},Object.keys(t).forEach(function(e){n.attrs[e]=_escapeXml(t[e])})}return Tag.prototype.visit=function(e){return e.visitTag(this)},Tag}(),hi=function(){function Text(e){this.value=_escapeXml(e)}return Text.prototype.visit=function(e){return e.visitText(this)},Text}(),fi=function(e){function CR(t){void 0===t&&(t=0),e.call(this,"\n"+new Array(t+1).join(" "))}return si(CR,e),CR}(hi),di=[[/&/g,"&"],[/"/g,"""],[/'/g,"'"],[//g,">"]],mi="1.2",yi="urn:oasis:names:tc:xliff:document:1.2",vi="en",gi="x",_i="source",bi="target",wi="trans-unit",Ci=function(){function Xliff(e,t){this._htmlParser=e,this._interpolationConfig=t}return Xliff.prototype.write=function(e){var t=new Ei,r=[];Object.keys(e).forEach(function(n){var i=e[n],o=new pi(wi,{id:n,datatype:"html"});o.children.push(new fi(8),new pi(_i,{},t.serialize(i.nodes)),new fi(8),new pi(bi)),i.description&&o.children.push(new fi(8),new pi("note",{priority:"1",from:"description"},[new hi(i.description)])),i.meaning&&o.children.push(new fi(8),new pi("note",{priority:"1",from:"meaning"},[new hi(i.meaning)])),o.children.push(new fi(6)),r.push(new fi(6),o)});var n=new pi("body",{},r.concat([new fi(4)])),i=new pi("file",{"source-language":vi,datatype:"plaintext",original:"ng2.template"},[new fi(4),n,new fi(2)]),o=new pi("xliff",{version:mi,xmlns:yi},[new fi(2),i,new fi]);return serialize([new li({version:"1.0",encoding:"UTF-8"}),new fi,o,new fi])},Xliff.prototype.load=function(e,t,r){var n=this,i=(new oi).parse(e,t);if(i.errors.length)throw new Error("xtb parse errors:\n"+i.errors.join("\n"));var o=(new Si).parse(i.rootNodes,r),s=o.messages,a=o.errors;if(a.length)throw new Error("xtb parse errors:\n"+a.join("\n"));var u={},l=[];if(Object.keys(s).forEach(function(e){var r=n._htmlParser.parse(s[e],t,!0,n._interpolationConfig);l.push.apply(l,r.errors),u[e]=r.rootNodes}),l.length)throw new Error("xtb parse errors:\n"+l.join("\n"));return u},Xliff}(),Ei=function(){function _WriteVisitor(){}return _WriteVisitor.prototype.visitText=function(e,t){return[new hi(e.value)]},_WriteVisitor.prototype.visitContainer=function(e,t){var r=this,n=[];return e.children.forEach(function(e){return n.push.apply(n,e.visit(r))}),n},_WriteVisitor.prototype.visitIcu=function(e,t){if(this._isInIcu)throw new Error("xliff does not support nested ICU messages");this._isInIcu=!0;var r=[];return this._isInIcu=!1,r},_WriteVisitor.prototype.visitTagPlaceholder=function(e,t){var r=getCtypeForTag(e.tag),n=new pi(gi,{id:e.startName,ctype:r});if(e.isVoid)return[n];var i=new pi(gi,{id:e.closeName,ctype:r});return[n].concat(this.serialize(e.children),[i])},_WriteVisitor.prototype.visitPlaceholder=function(e,t){return[new pi(gi,{id:e.name})]},_WriteVisitor.prototype.visitIcuPlaceholder=function(e,t){return[new pi(gi,{id:e.name})]},_WriteVisitor.prototype.serialize=function(e){var t=this;return this._isInIcu=!1,x.flatten(e.map(function(e){return e.visit(t)}))},_WriteVisitor}(),Si=function(){function _LoadVisitor(){}return _LoadVisitor.prototype.parse=function(e,t){var r=this;this._messageNodes=[],this._translatedMessages={},this._msgId="",this._target=[],this._errors=[],visitAll(this,e,null);var n=t.getMessageMap(),i=extractPlaceholders(t),o=extractPlaceholderToIds(t);return this._messageNodes.filter(function(e){return n.hasOwnProperty(e[0])}).sort(function(e,t){return 0==Object.keys(n[e[0]].placeholderToMsgIds).length?-1:0==Object.keys(n[t[0]].placeholderToMsgIds).length?1:0}).forEach(function(e){var t=e[0];r._placeholders=i[t]||{},r._placeholderToIds=o[t]||{},r._translatedMessages[t]=visitAll(r,e[1]).join("")}),{messages:this._translatedMessages,errors:this._errors}},_LoadVisitor.prototype.visitElement=function(e,t){switch(e.name){case wi:this._target=null;var r=e.attrs.find(function(e){return"id"===e.name});r?this._msgId=r.value:this._addError(e,"<"+wi+'> misses the "id" attribute'),visitAll(this,e.children,null),null!==this._msgId&&this._messageNodes.push([this._msgId,this._target]);break;case _i:break;case bi:this._target=e.children;break;case gi:var n=e.attrs.find(function(e){return"id"===e.name});if(n){var i=n.value;if(this._placeholders.hasOwnProperty(i))return this._placeholders[i];if(this._placeholderToIds.hasOwnProperty(i)&&this._translatedMessages.hasOwnProperty(this._placeholderToIds[i]))return this._translatedMessages[this._placeholderToIds[i]];this._addError(e,'The placeholder "'+i+'" does not exists in the source message')}else this._addError(e,"<"+gi+'> misses the "id" attribute');break;default:visitAll(this,e.children,null)}},_LoadVisitor.prototype.visitAttribute=function(e,t){throw new Error("unreachable code")},_LoadVisitor.prototype.visitText=function(e,t){return e.value},_LoadVisitor.prototype.visitComment=function(e,t){return""},_LoadVisitor.prototype.visitExpansion=function(e,t){throw new Error("unreachable code")},_LoadVisitor.prototype.visitExpansionCase=function(e,t){throw new Error("unreachable code")},_LoadVisitor.prototype._addError=function(e,t){this._errors.push(new Qn(e.sourceSpan,t))},_LoadVisitor}(),Pi="messagebundle",Ai="msg",xi="ph",Ti="ex",Mi='\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n',Ii=function(){function Xmb(){}return Xmb.prototype.write=function(e){var t=new Di,r=new pi(Pi);return Object.keys(e).forEach(function(n){var i=e[n],o={id:n};i.description&&(o.desc=i.description),i.meaning&&(o.meaning=i.meaning),r.children.push(new fi(2),new pi(Ai,o,t.serialize(i.nodes)))}),r.children.push(new fi),serialize([new li({version:"1.0",encoding:"UTF-8"}),new fi,new ci(Pi,Mi),new fi,r,new fi])},Xmb.prototype.load=function(e,t,r){throw new Error("Unsupported")},Xmb}(),Di=function(){function _Visitor(){}return _Visitor.prototype.visitText=function(e,t){return[new hi(e.value)]},_Visitor.prototype.visitContainer=function(e,t){var r=this,n=[];return e.children.forEach(function(e){return n.push.apply(n,e.visit(r))}),n},_Visitor.prototype.visitIcu=function(e,t){var r=this,n=[new hi("{"+e.expression+", "+e.type+", ")];return Object.keys(e.cases).forEach(function(t){n.push.apply(n,[new hi(t+" {")].concat(e.cases[t].visit(r),[new hi("} ")]))}),n.push(new hi("}")),n},_Visitor.prototype.visitTagPlaceholder=function(e,t){var r=new pi(Ti,{},[new hi("<"+e.tag+">")]),n=new pi(xi,{name:e.startName},[r]);if(e.isVoid)return[n];var i=new pi(Ti,{},[new hi("")]),o=new pi(xi,{name:e.closeName},[i]);return[n].concat(this.serialize(e.children),[o])},_Visitor.prototype.visitPlaceholder=function(e,t){return[new pi(xi,{name:e.name})]},_Visitor.prototype.visitIcuPlaceholder=function(e,t){return[new pi(xi,{name:e.name})]},_Visitor.prototype.serialize=function(e){var t=this;return x.flatten(e.map(function(e){return e.visit(t)}))},_Visitor}(),Ni="translationbundle",Oi="translation",Vi="ph",Ri=function(){function Xtb(e,t){this._htmlParser=e,this._interpolationConfig=t}return Xtb.prototype.write=function(e){throw new Error("Unsupported")},Xtb.prototype.load=function(e,t,r){var n=this,i=(new oi).parse(e,t);if(i.errors.length)throw new Error("xtb parse errors:\n"+i.errors.join("\n"));var o=(new ki).parse(i.rootNodes,r),s=o.messages,a=o.errors;if(a.length)throw new Error("xtb parse errors:\n"+a.join("\n"));var u={},l=[];if(Object.keys(s).forEach(function(e){var r=n._htmlParser.parse(s[e],t,!0,n._interpolationConfig);l.push.apply(l,r.errors),u[e]=r.rootNodes}),l.length)throw new Error("xtb parse errors:\n"+l.join("\n"));return u},Xtb}(),ki=function(){function _Visitor(){}return _Visitor.prototype.parse=function(e,t){var r=this;this._messageNodes=[],this._translatedMessages={},this._bundleDepth=0,this._translationDepth=0,this._errors=[],visitAll(this,e,null);var n=t.getMessageMap(),i=extractPlaceholders(t),o=extractPlaceholderToIds(t);return this._messageNodes.filter(function(e){return n.hasOwnProperty(e[0])}).sort(function(e,t){return 0==Object.keys(n[e[0]].placeholderToMsgIds).length?-1:0==Object.keys(n[t[0]].placeholderToMsgIds).length?1:0}).forEach(function(e){var t=e[0];r._placeholders=i[t]||{},r._placeholderToIds=o[t]||{},r._translatedMessages[t]=visitAll(r,e[1]).join("")}),{messages:this._translatedMessages,errors:this._errors}},_Visitor.prototype.visitElement=function(e,t){switch(e.name){case Ni:this._bundleDepth++,this._bundleDepth>1&&this._addError(e,"<"+Ni+"> elements can not be nested"),visitAll(this,e.children,null),this._bundleDepth--;break;case Oi:this._translationDepth++,this._translationDepth>1&&this._addError(e,"<"+Oi+"> elements can not be nested");var r=e.attrs.find(function(e){return"id"===e.name});r?this._messageNodes.push([r.value,e.children]):this._addError(e,"<"+Oi+'> misses the "id" attribute'),this._translationDepth--;break;case Vi:var n=e.attrs.find(function(e){return"name"===e.name});if(n){var i=n.value;if(this._placeholders.hasOwnProperty(i))return this._placeholders[i];if(this._placeholderToIds.hasOwnProperty(i)&&this._translatedMessages.hasOwnProperty(this._placeholderToIds[i]))return this._translatedMessages[this._placeholderToIds[i]];this._addError(e,'The placeholder "'+i+'" does not exists in the source message')}else this._addError(e,"<"+Vi+'> misses the "name" attribute');break;default:this._addError(e,"Unexpected tag")}},_Visitor.prototype.visitAttribute=function(e,t){throw new Error("unreachable code")},_Visitor.prototype.visitText=function(e,t){return e.value},_Visitor.prototype.visitComment=function(e,t){return""},_Visitor.prototype.visitExpansion=function(e,t){var r=this;e.cases.map(function(e){return e.visit(r,null)});return"{"+e.switchValue+", "+e.type+", strCases.join(' ')}"},_Visitor.prototype.visitExpansionCase=function(e,t){return e.value+" {"+visitAll(this,e.expression,null)+"}"},_Visitor.prototype._addError=function(e,t){this._errors.push(new Qn(e.sourceSpan,t))},_Visitor}(),Li=function(){function TranslationBundle(e){void 0===e&&(e={}),this._messageMap=e}return TranslationBundle.load=function(e,t,r,n){return new TranslationBundle(n.load(e,t,r))},TranslationBundle.prototype.get=function(e){return this._messageMap[e]},TranslationBundle.prototype.has=function(e){return e in this._messageMap},TranslationBundle}(),Fi=function(){function I18NHtmlParser(e,t,r){this._htmlParser=e,this._translations=t,this._translationsFormat=r}return I18NHtmlParser.prototype.parse=function(e,t,r,n){void 0===r&&(r=!1),void 0===n&&(n=Zr);var i=this._htmlParser.parse(e,t,r,n);if(!this._translations||""===this._translations)return i;var o=new ti(this._htmlParser,[],{}),s=o.updateFromTemplate(e,t,n);if(s&&s.length)return new In(i.rootNodes,i.errors.concat(s));var a=this._createSerializer(n),u=Li.load(this._translations,t,o,a);return mergeTranslations(i.rootNodes,u,n,[],{})},I18NHtmlParser.prototype._createSerializer=function(e){var t=(this._translationsFormat||"xlf").toLowerCase();switch(t){case"xmb":return new Ii;case"xtb":return new Ri(this._htmlParser,e);case"xliff":case"xlf":default:return new Ci(this._htmlParser,e)}},I18NHtmlParser}(),ji=r.__core_private__.isDefaultChangeDetectionStrategy,Bi=r.__core_private__.ChangeDetectorStatus,Wi=r.__core_private__.LifecycleHooks,Ui=r.__core_private__.LIFECYCLE_HOOKS_VALUES,Hi=r.__core_private__.ReflectorReader,Gi=r.__core_private__.AppElement,zi=r.__core_private__.CodegenComponentFactoryResolver,qi=r.__core_private__.AppView,Ki=r.__core_private__.DebugAppView,Qi=r.__core_private__.NgModuleInjector,Zi=r.__core_private__.registerModuleFactory,Xi=r.__core_private__.ViewType,$i=r.__core_private__.MAX_INTERPOLATION_VALUES,Ji=r.__core_private__.checkBinding,Yi=r.__core_private__.flattenNestedViewRenderNodes,eo=r.__core_private__.interpolate,to=r.__core_private__.ViewUtils,ro=r.__core_private__.DebugContext,no=r.__core_private__.StaticNodeDebugInfo,io=r.__core_private__.devModeEqual,oo=r.__core_private__.UNINITIALIZED,so=r.__core_private__.ValueUnwrapper,ao=r.__core_private__.TemplateRef_,uo=r.__core_private__.EMPTY_ARRAY,lo=r.__core_private__.EMPTY_MAP,co=r.__core_private__.pureProxy1,po=r.__core_private__.pureProxy2,ho=r.__core_private__.pureProxy3,fo=r.__core_private__.pureProxy4,mo=r.__core_private__.pureProxy5,yo=r.__core_private__.pureProxy6,vo=r.__core_private__.pureProxy7,go=r.__core_private__.pureProxy8,_o=r.__core_private__.pureProxy9,bo=r.__core_private__.pureProxy10,wo=r.__core_private__.castByValue,Co=r.__core_private__.Console,Eo=r.__core_private__.reflector,So=r.__core_private__.Reflector,Po=r.__core_private__.ReflectionCapabilities,Ao=r.__core_private__.NoOpAnimationPlayer,xo=r.__core_private__.AnimationSequencePlayer,To=r.__core_private__.AnimationGroupPlayer,Mo=r.__core_private__.AnimationKeyframe,Io=r.__core_private__.AnimationStyles,Do=r.__core_private__.ANY_STATE,No=r.__core_private__.DEFAULT_STATE,Oo=r.__core_private__.EMPTY_STATE,Vo=r.__core_private__.FILL_STYLE_FLAG,Ro=r.__core_private__.prepareFinalAnimationStyles,ko=r.__core_private__.balanceAnimationKeyframes,Lo=r.__core_private__.clearStyles,Fo=r.__core_private__.collectAndResolveStyles,jo=r.__core_private__.renderStyles,Bo=r.__core_private__.ComponentStillLoadingError,Wo=assetUrl("core","linker/view"),Uo=assetUrl("core","linker/view_utils"),Ho=assetUrl("core","change_detection/change_detection"),Go=assetUrl("core","animation/animation_style_util"),zo=function(){ function Identifiers(){}return Identifiers.ANALYZE_FOR_ENTRY_COMPONENTS={name:"ANALYZE_FOR_ENTRY_COMPONENTS",moduleUrl:assetUrl("core","metadata/di"),runtime:r.ANALYZE_FOR_ENTRY_COMPONENTS},Identifiers.ViewUtils={name:"ViewUtils",moduleUrl:assetUrl("core","linker/view_utils"),runtime:to},Identifiers.AppView={name:"AppView",moduleUrl:Wo,runtime:qi},Identifiers.DebugAppView={name:"DebugAppView",moduleUrl:Wo,runtime:Ki},Identifiers.AppElement={name:"AppElement",moduleUrl:assetUrl("core","linker/element"),runtime:Gi},Identifiers.ElementRef={name:"ElementRef",moduleUrl:assetUrl("core","linker/element_ref"),runtime:r.ElementRef},Identifiers.ViewContainerRef={name:"ViewContainerRef",moduleUrl:assetUrl("core","linker/view_container_ref"),runtime:r.ViewContainerRef},Identifiers.ChangeDetectorRef={name:"ChangeDetectorRef",moduleUrl:assetUrl("core","change_detection/change_detector_ref"),runtime:r.ChangeDetectorRef},Identifiers.RenderComponentType={name:"RenderComponentType",moduleUrl:assetUrl("core","render/api"),runtime:r.RenderComponentType},Identifiers.QueryList={name:"QueryList",moduleUrl:assetUrl("core","linker/query_list"),runtime:r.QueryList},Identifiers.TemplateRef={name:"TemplateRef",moduleUrl:assetUrl("core","linker/template_ref"),runtime:r.TemplateRef},Identifiers.TemplateRef_={name:"TemplateRef_",moduleUrl:assetUrl("core","linker/template_ref"),runtime:ao},Identifiers.CodegenComponentFactoryResolver={name:"CodegenComponentFactoryResolver",moduleUrl:assetUrl("core","linker/component_factory_resolver"),runtime:zi},Identifiers.ComponentFactoryResolver={name:"ComponentFactoryResolver",moduleUrl:assetUrl("core","linker/component_factory_resolver"),runtime:r.ComponentFactoryResolver},Identifiers.ComponentFactory={name:"ComponentFactory",runtime:r.ComponentFactory,moduleUrl:assetUrl("core","linker/component_factory")},Identifiers.NgModuleFactory={name:"NgModuleFactory",runtime:r.NgModuleFactory,moduleUrl:assetUrl("core","linker/ng_module_factory")},Identifiers.NgModuleInjector={name:"NgModuleInjector",runtime:Qi,moduleUrl:assetUrl("core","linker/ng_module_factory")},Identifiers.RegisterModuleFactoryFn={name:"registerModuleFactory",runtime:Zi,moduleUrl:assetUrl("core","linker/ng_module_factory_loader")},Identifiers.ValueUnwrapper={name:"ValueUnwrapper",moduleUrl:Ho,runtime:so},Identifiers.Injector={name:"Injector",moduleUrl:assetUrl("core","di/injector"),runtime:r.Injector},Identifiers.ViewEncapsulation={name:"ViewEncapsulation",moduleUrl:assetUrl("core","metadata/view"),runtime:r.ViewEncapsulation},Identifiers.ViewType={name:"ViewType",moduleUrl:assetUrl("core","linker/view_type"),runtime:Xi},Identifiers.ChangeDetectionStrategy={name:"ChangeDetectionStrategy",moduleUrl:Ho,runtime:r.ChangeDetectionStrategy},Identifiers.StaticNodeDebugInfo={name:"StaticNodeDebugInfo",moduleUrl:assetUrl("core","linker/debug_context"),runtime:no},Identifiers.DebugContext={name:"DebugContext",moduleUrl:assetUrl("core","linker/debug_context"),runtime:ro},Identifiers.Renderer={name:"Renderer",moduleUrl:assetUrl("core","render/api"),runtime:r.Renderer},Identifiers.SimpleChange={name:"SimpleChange",moduleUrl:Ho,runtime:r.SimpleChange},Identifiers.UNINITIALIZED={name:"UNINITIALIZED",moduleUrl:Ho,runtime:oo},Identifiers.ChangeDetectorStatus={name:"ChangeDetectorStatus",moduleUrl:Ho,runtime:Bi},Identifiers.checkBinding={name:"checkBinding",moduleUrl:Uo,runtime:Ji},Identifiers.flattenNestedViewRenderNodes={name:"flattenNestedViewRenderNodes",moduleUrl:Uo,runtime:Yi},Identifiers.devModeEqual={name:"devModeEqual",moduleUrl:Ho,runtime:io},Identifiers.interpolate={name:"interpolate",moduleUrl:Uo,runtime:eo},Identifiers.castByValue={name:"castByValue",moduleUrl:Uo,runtime:wo},Identifiers.EMPTY_ARRAY={name:"EMPTY_ARRAY",moduleUrl:Uo,runtime:uo},Identifiers.EMPTY_MAP={name:"EMPTY_MAP",moduleUrl:Uo,runtime:lo},Identifiers.pureProxies=[null,{name:"pureProxy1",moduleUrl:Uo,runtime:co},{name:"pureProxy2",moduleUrl:Uo,runtime:po},{name:"pureProxy3",moduleUrl:Uo,runtime:ho},{name:"pureProxy4",moduleUrl:Uo,runtime:fo},{name:"pureProxy5",moduleUrl:Uo,runtime:mo},{name:"pureProxy6",moduleUrl:Uo,runtime:yo},{name:"pureProxy7",moduleUrl:Uo,runtime:vo},{name:"pureProxy8",moduleUrl:Uo,runtime:go},{name:"pureProxy9",moduleUrl:Uo,runtime:_o},{name:"pureProxy10",moduleUrl:Uo,runtime:bo}],Identifiers.SecurityContext={name:"SecurityContext",moduleUrl:assetUrl("core","security"),runtime:r.SecurityContext},Identifiers.AnimationKeyframe={name:"AnimationKeyframe",moduleUrl:assetUrl("core","animation/animation_keyframe"),runtime:Mo},Identifiers.AnimationStyles={name:"AnimationStyles",moduleUrl:assetUrl("core","animation/animation_styles"),runtime:Io},Identifiers.NoOpAnimationPlayer={name:"NoOpAnimationPlayer",moduleUrl:assetUrl("core","animation/animation_player"),runtime:Ao},Identifiers.AnimationGroupPlayer={name:"AnimationGroupPlayer",moduleUrl:assetUrl("core","animation/animation_group_player"),runtime:To},Identifiers.AnimationSequencePlayer={name:"AnimationSequencePlayer",moduleUrl:assetUrl("core","animation/animation_sequence_player"),runtime:xo},Identifiers.prepareFinalAnimationStyles={name:"prepareFinalAnimationStyles",moduleUrl:Go,runtime:Ro},Identifiers.balanceAnimationKeyframes={name:"balanceAnimationKeyframes",moduleUrl:Go,runtime:ko},Identifiers.clearStyles={name:"clearStyles",moduleUrl:Go,runtime:Lo},Identifiers.renderStyles={name:"renderStyles",moduleUrl:Go,runtime:jo},Identifiers.collectAndResolveStyles={name:"collectAndResolveStyles",moduleUrl:Go,runtime:Fo},Identifiers.LOCALE_ID={name:"LOCALE_ID",moduleUrl:assetUrl("core","i18n/tokens"),runtime:r.LOCALE_ID},Identifiers.TRANSLATIONS_FORMAT={name:"TRANSLATIONS_FORMAT",moduleUrl:assetUrl("core","i18n/tokens"),runtime:r.TRANSLATIONS_FORMAT},Identifiers}(),qo=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 __)},Ko=function(e){function HtmlParser(){e.call(this,getHtmlTagDefinition)}return qo(HtmlParser,e),HtmlParser.prototype.parse=function(t,r,n,i){return void 0===n&&(n=!1),void 0===i&&(i=Zr),e.prototype.parse.call(this,t,r,n,i)},HtmlParser.decorators=[{type:r.Injectable}],HtmlParser.ctorParameters=[],HtmlParser}(Dn),Qo=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 __)},Zo=["zero","one","two","few","many","other"],Xo=function(){function ExpansionResult(e,t,r){this.nodes=e,this.expanded=t,this.errors=r}return ExpansionResult}(),$o=function(e){function ExpansionError(t,r){e.call(this,t,r)}return Qo(ExpansionError,e),ExpansionError}(hn),Jo=function(){function _Expander(){this.isExpanded=!1,this.errors=[]}return _Expander.prototype.visitElement=function(e,t){return new gn(e.name,e.attrs,visitAll(this,e.children),e.sourceSpan,e.startSourceSpan,e.endSourceSpan)},_Expander.prototype.visitAttribute=function(e,t){return e},_Expander.prototype.visitText=function(e,t){return e},_Expander.prototype.visitComment=function(e,t){return e},_Expander.prototype.visitExpansion=function(e,t){return this.isExpanded=!0,"plural"==e.type?_expandPluralForm(e,this.errors):_expandDefaultForm(e,this.errors)},_Expander.prototype.visitExpansionCase=function(e,t){throw new Error("Should not be reached")},_Expander}(),Yo=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 __)},es=function(e){function ProviderError(t,r){e.call(this,r,t)}return Yo(ProviderError,e),ProviderError}(hn),ts=function(){function ProviderViewContext(e,t){var r=this;this.component=e,this.sourceSpan=t,this.errors=[],this.viewQueries=_getViewQueries(e),this.viewProviders=new Map,_normalizeProviders(e.viewProviders,t,this.errors).forEach(function(e){isBlank(r.viewProviders.get(e.token.reference))&&r.viewProviders.set(e.token.reference,!0)})}return ProviderViewContext}(),rs=function(){function ProviderElementContext(e,t,r,n,i,o,s){var a=this;this.viewContext=e,this._parent=t,this._isViewRoot=r,this._directiveAsts=n,this._sourceSpan=s,this._transformedProviders=new Map,this._seenProviders=new Map,this._hasViewContainer=!1,this._attrs={},i.forEach(function(e){return a._attrs[e.name]=e.value});var u=n.map(function(e){return e.directive});this._allProviders=_resolveProvidersFromDirectives(u,s,e.errors),this._contentQueries=_getContentQueries(u);var l=new Map;P.values(this._allProviders).forEach(function(e){a._addQueryReadsTo(e.token,l)}),o.forEach(function(e){a._addQueryReadsTo(new lt({value:e.name}),l)}),isPresent(l.get(resolveIdentifierToken(zo.ViewContainerRef).reference))&&(this._hasViewContainer=!0),P.values(this._allProviders).forEach(function(e){var t=e.eager||isPresent(l.get(e.token.reference));t&&a._getOrCreateLocalProvider(e.providerType,e.token,!0)})}return ProviderElementContext.prototype.afterElement=function(){var e=this;P.values(this._allProviders).forEach(function(t){e._getOrCreateLocalProvider(t.providerType,t.token,!1)})},Object.defineProperty(ProviderElementContext.prototype,"transformProviders",{get:function(){return P.values(this._transformedProviders)},enumerable:!0,configurable:!0}),Object.defineProperty(ProviderElementContext.prototype,"transformedDirectiveAsts",{get:function(){var e=this.transformProviders.map(function(e){return e.token.identifier}),t=x.clone(this._directiveAsts);return x.sort(t,function(t,r){return e.indexOf(t.directive.type)-e.indexOf(r.directive.type)}),t},enumerable:!0,configurable:!0}),Object.defineProperty(ProviderElementContext.prototype,"transformedHasViewContainer",{get:function(){return this._hasViewContainer},enumerable:!0,configurable:!0}),ProviderElementContext.prototype._addQueryReadsTo=function(e,t){this._getQueriesFor(e).forEach(function(r){var n=isPresent(r.read)?r.read:e;isBlank(t.get(n.reference))&&t.set(n.reference,!0)})},ProviderElementContext.prototype._getQueriesFor=function(e){for(var t,r=[],n=this,i=0;null!==n;)t=n._contentQueries.get(e.reference),isPresent(t)&&x.addAll(r,t.filter(function(e){return e.descendants||i<=1})),n._directiveAsts.length>0&&i++,n=n._parent;return t=this.viewContext.viewQueries.get(e.reference),isPresent(t)&&x.addAll(r,t),r},ProviderElementContext.prototype._getOrCreateLocalProvider=function(e,r,n){var i=this,o=this._allProviders.get(r.reference);if(!o||(e===t.ProviderAstType.Directive||e===t.ProviderAstType.PublicService)&&o.providerType===t.ProviderAstType.PrivateService||(e===t.ProviderAstType.PrivateService||e===t.ProviderAstType.PublicService)&&o.providerType===t.ProviderAstType.Builtin)return null;var s=this._transformedProviders.get(r.reference);if(isPresent(s))return s;if(isPresent(this._seenProviders.get(r.reference)))return this.viewContext.errors.push(new es("Cannot instantiate cyclic dependency! "+r.name,this._sourceSpan)),null;this._seenProviders.set(r.reference,!0);var a=o.providers.map(function(e){var t,r=e.useValue,s=e.useExisting;if(isPresent(e.useExisting)){var a=i._getDependency(o.providerType,new st({token:e.useExisting}),n);isPresent(a.token)?s=a.token:(s=null,r=a.value)}else if(isPresent(e.useFactory)){var u=isPresent(e.deps)?e.deps:e.useFactory.diDeps;t=u.map(function(e){return i._getDependency(o.providerType,e,n)})}else if(isPresent(e.useClass)){var u=isPresent(e.deps)?e.deps:e.useClass.diDeps;t=u.map(function(e){return i._getDependency(o.providerType,e,n)})}return _transformProvider(e,{useExisting:s,useValue:r,deps:t})});return s=_transformProviderAst(o,{eager:n,providers:a}),this._transformedProviders.set(r.reference,s),s},ProviderElementContext.prototype._getLocalDependency=function(e,r,n){if(void 0===n&&(n=null),r.isAttribute){var i=this._attrs[r.token.value];return new st({isValue:!0,value:normalizeBlank(i)})}if(isPresent(r.query)||isPresent(r.viewQuery))return r;if(isPresent(r.token)){if(e===t.ProviderAstType.Directive||e===t.ProviderAstType.Component){if(r.token.reference===resolveIdentifierToken(zo.Renderer).reference||r.token.reference===resolveIdentifierToken(zo.ElementRef).reference||r.token.reference===resolveIdentifierToken(zo.ChangeDetectorRef).reference||r.token.reference===resolveIdentifierToken(zo.TemplateRef).reference)return r;r.token.reference===resolveIdentifierToken(zo.ViewContainerRef).reference&&(this._hasViewContainer=!0)}if(r.token.reference===resolveIdentifierToken(zo.Injector).reference)return r;if(isPresent(this._getOrCreateLocalProvider(e,r.token,n)))return r}return null},ProviderElementContext.prototype._getDependency=function(e,r,n){void 0===n&&(n=null);var i=this,o=n,s=null;if(r.isSkipSelf||(s=this._getLocalDependency(e,r,n)),r.isSelf)!s&&r.isOptional&&(s=new st({isValue:!0,value:null}));else{for(;!s&&isPresent(i._parent);){var a=i;i=i._parent,a._isViewRoot&&(o=!1),s=i._getLocalDependency(t.ProviderAstType.PublicService,r,o)}s||(s=!r.isHost||this.viewContext.component.type.isHost||this.viewContext.component.type.reference===r.token.reference||isPresent(this.viewContext.viewProviders.get(r.token.reference))?r:r.isOptional?s=new st({isValue:!0,value:null}):null)}return s||this.viewContext.errors.push(new es("No provider for "+r.token.name,this._sourceSpan)),s},ProviderElementContext}(),ns=function(){function NgModuleProviderAnalyzer(e,r,n){var i=this;this._transformedProviders=new Map,this._seenProviders=new Map,this._errors=[],this._allProviders=new Map;var o=e.transitiveModule.modules.map(function(e){return e.type});o.forEach(function(e){var r=new at({token:new lt({identifier:e}),useClass:e});_resolveProviders([r],t.ProviderAstType.PublicService,!0,n,i._errors,i._allProviders)}),_resolveProviders(_normalizeProviders(e.transitiveModule.providers.concat(r),n,this._errors),t.ProviderAstType.PublicService,!1,n,this._errors,this._allProviders)}return NgModuleProviderAnalyzer.prototype.parse=function(){var e=this;if(P.values(this._allProviders).forEach(function(t){e._getOrCreateLocalProvider(t.token,t.eager)}),this._errors.length>0){var t=this._errors.join("\n");throw new Error("Provider parse errors:\n"+t)}return P.values(this._transformedProviders)},NgModuleProviderAnalyzer.prototype._getOrCreateLocalProvider=function(e,t){var r=this,n=this._allProviders.get(e.reference);if(!n)return null;var i=this._transformedProviders.get(e.reference);if(isPresent(i))return i;if(isPresent(this._seenProviders.get(e.reference)))return this._errors.push(new es("Cannot instantiate cyclic dependency! "+e.name,n.sourceSpan)),null;this._seenProviders.set(e.reference,!0);var o=n.providers.map(function(e){var i,o=e.useValue,s=e.useExisting;if(isPresent(e.useExisting)){var a=r._getDependency(new st({token:e.useExisting}),t,n.sourceSpan);isPresent(a.token)?s=a.token:(s=null,o=a.value)}else if(isPresent(e.useFactory)){var u=isPresent(e.deps)?e.deps:e.useFactory.diDeps;i=u.map(function(e){return r._getDependency(e,t,n.sourceSpan)})}else if(isPresent(e.useClass)){var u=isPresent(e.deps)?e.deps:e.useClass.diDeps;i=u.map(function(e){return r._getDependency(e,t,n.sourceSpan)})}return _transformProvider(e,{useExisting:s,useValue:o,deps:i})});return i=_transformProviderAst(n,{eager:t,providers:o}),this._transformedProviders.set(e.reference,i),i},NgModuleProviderAnalyzer.prototype._getDependency=function(e,t,r){void 0===t&&(t=null);var n=!1;!e.isSkipSelf&&isPresent(e.token)&&(e.token.reference===resolveIdentifierToken(zo.Injector).reference||e.token.reference===resolveIdentifierToken(zo.ComponentFactoryResolver).reference?n=!0:isPresent(this._getOrCreateLocalProvider(e.token,t))&&(n=!0));var i=e;return e.isSelf&&!n&&(e.isOptional?i=new st({isValue:!0,value:null}):this._errors.push(new es("No provider for "+e.token.name,r))),i},NgModuleProviderAnalyzer}(),is=function(){function ElementSchemaRegistry(){}return ElementSchemaRegistry}(),os=function(){function StyleWithImports(e,t){this.style=e,this.styleUrls=t}return StyleWithImports}(),ss=/@import\s+(?:url\()?\s*(?:(?:['"]([^'"]*))|([^;\)\s]*))[^;]*;?/g,as=/^([^:\/?#]+):/,us="select",ls="ng-content",cs="link",ps="rel",hs="href",fs="stylesheet",ds="style",ms="script",ys="ngNonBindable",vs="ngProjectAs";!function(e){e[e.NG_CONTENT=0]="NG_CONTENT",e[e.STYLE=1]="STYLE",e[e.STYLESHEET=2]="STYLESHEET",e[e.SCRIPT=3]="SCRIPT",e[e.OTHER=4]="OTHER"}(Yn||(Yn={}));var gs,_s=function(){function PreparsedElement(e,t,r,n,i){this.type=e,this.selectAttr=t,this.hrefAttr=r,this.nonBindable=n,this.projectAs=i}return PreparsedElement}(),bs=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 __)},ws=/^(?:(?:(?:(bind-)|(let-)|(ref-|#)|(on-)|(bindon-)|(@))(.+))|\[\(([^\)]+)\)\]|\[([^\]]+)\]|\(([^\)]+)\))$/,Cs=1,Es=2,Ss=3,Ps=4,As=5,xs=6,Ts=7,Ms=8,Is=9,Ds=10,Ns="animate-",Os="template",Vs="template",Rs="*",ks="class",Ls=".",Fs="attr",js="class",Bs="style",Ws=V.parse("*")[0],Us=new r.OpaqueToken("TemplateTransforms"),Hs=function(e){function TemplateParseError(t,r,n){e.call(this,r,t,n)}return bs(TemplateParseError,e),TemplateParseError}(hn),Gs=function(){function TemplateParseResult(e,t){this.templateAst=e,this.errors=t}return TemplateParseResult}(),zs=function(){function TemplateParser(e,t,r,n,i){this._exprParser=e,this._schemaRegistry=t,this._htmlParser=r,this._console=n,this.transforms=i}return TemplateParser.prototype.parse=function(e,t,r,n,i,o){var s=this.tryParse(e,t,r,n,i,o),a=s.errors.filter(function(e){return e.level===Xr.WARNING}),u=s.errors.filter(function(e){return e.level===Xr.FATAL});if(a.length>0&&this._console.warn("Template parse warnings:\n"+a.join("\n")),u.length>0){var l=u.join("\n");throw new Error("Template parse errors:\n"+l)}return s.templateAst},TemplateParser.prototype.tryParse=function(e,t,r,n,i,o){var s;e.template&&(s=Qr.fromArray(e.template.interpolation));var a,u=this._htmlParser.parse(t,o,!0,s),l=u.errors;if(0==l.length){var c=expandNodes(u.rootNodes);l.push.apply(l,c.errors),u=new In(c.nodes,l)}if(u.rootNodes.length>0){var p=removeIdentifierDuplicates(r),h=removeIdentifierDuplicates(n),f=new ts(e,u.rootNodes[0].sourceSpan),d=new qs(f,p,h,i,this._exprParser,this._schemaRegistry);a=visitAll(d,u.rootNodes,$s),l.push.apply(l,d.errors.concat(f.errors))}else a=[];return this._assertNoReferenceDuplicationOnTemplate(a,l),l.length>0?new Gs(a,l):(isPresent(this.transforms)&&this.transforms.forEach(function(e){a=templateVisitAll(e,a)}),new Gs(a,l))},TemplateParser.prototype._assertNoReferenceDuplicationOnTemplate=function(e,t){var r=[];e.filter(function(e){return!!e.references}).forEach(function(e){return e.references.forEach(function(e){var n=e.name;if(r.indexOf(n)<0)r.push(n);else{var i=new Hs('Reference "#'+n+'" is defined several times',e.sourceSpan,Xr.FATAL);t.push(i)}})})},TemplateParser.decorators=[{type:r.Injectable}],TemplateParser.ctorParameters=[{type:on},{type:is},{type:Fi},{type:Co},{type:Array,decorators:[{type:r.Optional},{type:r.Inject,args:[Us]}]}],TemplateParser}(),qs=function(){function TemplateParseVisitor(e,t,r,n,i,o){var s=this;this.providerViewContext=e,this._schemas=n,this._exprParser=i,this._schemaRegistry=o,this.selectorMatcher=new R,this.errors=[],this.directivesIndex=new Map,this.ngContentCount=0,this.pipesByName=new Map;var a=e.component.template;a&&a.interpolation&&(this._interpolationConfig={start:a.interpolation[0],end:a.interpolation[1]}),t.forEach(function(e,t){var r=V.parse(e.selector);s.selectorMatcher.addSelectables(r,e),s.directivesIndex.set(e,t)}),r.forEach(function(e){return s.pipesByName.set(e.name,e)})}return TemplateParseVisitor.prototype._reportError=function(e,t,r){void 0===r&&(r=Xr.FATAL),this.errors.push(new Hs(e,t,r))},TemplateParseVisitor.prototype._reportParserErrors=function(e,t){for(var r=0,n=e;r$i)throw new Error("Only support at most "+$i+" interpolation values!");return n}catch(i){return this._reportError(""+i,t),this._exprParser.wrapLiteralPrimitive("ERROR",r)}},TemplateParseVisitor.prototype._parseAction=function(e,t){var r=t.start.toString();try{var n=this._exprParser.parseAction(e,r,this._interpolationConfig);return n&&this._reportParserErrors(n.errors,t),!n||n.ast instanceof St?(this._reportError("Empty expressions are not allowed",t),this._exprParser.wrapLiteralPrimitive("ERROR",r)):(this._checkPipes(n,t),n)}catch(i){return this._reportError(""+i,t),this._exprParser.wrapLiteralPrimitive("ERROR",r)}},TemplateParseVisitor.prototype._parseBinding=function(e,t){var r=t.start.toString();try{var n=this._exprParser.parseBinding(e,r,this._interpolationConfig);return n&&this._reportParserErrors(n.errors,t),this._checkPipes(n,t),n}catch(i){return this._reportError(""+i,t),this._exprParser.wrapLiteralPrimitive("ERROR",r)}},TemplateParseVisitor.prototype._parseTemplateBindings=function(e,t){var r=this,n=t.start.toString();try{var i=this._exprParser.parseTemplateBindings(e,n);return this._reportParserErrors(i.errors,t),i.templateBindings.forEach(function(e){isPresent(e.expression)&&r._checkPipes(e.expression,t)}),i.warnings.forEach(function(e){r._reportError(e,t,Xr.WARNING)}),i.templateBindings}catch(o){return this._reportError(""+o,t),[]}},TemplateParseVisitor.prototype._checkPipes=function(e,t){var r=this;if(isPresent(e)){var n=new Ys;e.visit(n),n.pipes.forEach(function(e){r.pipesByName.has(e)||r._reportError("The pipe '"+e+"' could not be found",t)})}},TemplateParseVisitor.prototype.visitExpansion=function(e,t){return null},TemplateParseVisitor.prototype.visitExpansionCase=function(e,t){return null},TemplateParseVisitor.prototype.visitText=function(e,t){var r=t.findNgContentIndex(Ws),n=this._parseInterpolation(e.value,e.sourceSpan);return isPresent(n)?new c(n,r,e.sourceSpan):new l(e.value,r,e.sourceSpan)},TemplateParseVisitor.prototype.visitAttribute=function(e,t){return new p(e.name,e.value,e.sourceSpan)},TemplateParseVisitor.prototype.visitComment=function(e,t){return null},TemplateParseVisitor.prototype.visitElement=function(e,t){var r=this,n=e.name,i=preparseElement(e);if(i.type===Yn.SCRIPT||i.type===Yn.STYLE)return null;if(i.type===Yn.STYLESHEET&&isStyleUrlResolvable(i.hrefAttr))return null;var o=[],s=[],a=[],u=[],l=[],c=[],p=[],h=[],f=[],d=!1,m=[],g=splitNsName(n.toLowerCase())[1],_=g==Os;e.attrs.forEach(function(e){var t=r._parseAttr(_,e,o,s,l,c,a,u),n=r._parseInlineTemplateBinding(e,h,p,f);n&&d&&r._reportError("Can't have multiple template bindings on one element. Use only one attribute named 'template' or prefixed with *",e.sourceSpan),t||n||(m.push(r.visitAttribute(e,null)),o.push([e.name,e.value])),n&&(d=!0)});var b=createElementCssSelector(n,o),C=this._parseDirectives(this.selectorMatcher,b),E=C.directives,S=C.matchElement,P=[],A=this._createDirectiveAsts(_,e.name,E,s,a,e.sourceSpan,P),x=this._createElementPropertyAsts(e.name,s,A).concat(l),T=t.isTemplateElement||d,M=new rs(this.providerViewContext,t.providerContext,T,A,m,P,e.sourceSpan),I=visitAll(i.nonBindable?Js:this,e.children,Xs.create(_,A,_?t.providerContext:M));M.afterElement();var D,N=isPresent(i.projectAs)?V.parse(i.projectAs)[0]:b,O=t.findNgContentIndex(N);if(i.type===Yn.NG_CONTENT)isPresent(e.children)&&e.children.length>0&&this._reportError(" element cannot have content. must be immediately followed by ",e.sourceSpan),D=new w((this.ngContentCount++),d?null:O,e.sourceSpan);else if(_)this._assertAllEventsPublishedByDirectives(A,c),this._assertNoComponentsNorElementBindingsOnTemplate(A,x,e.sourceSpan),D=new v(m,c,P,u,M.transformedDirectiveAsts,M.transformProviders,M.transformedHasViewContainer,I,d?null:O,e.sourceSpan);else{this._assertElementExists(S,e),this._assertOnlyOneComponent(A,e.sourceSpan);var R=d?null:t.findNgContentIndex(N);D=new y(n,m,x,c,P,M.transformedDirectiveAsts,M.transformProviders,M.transformedHasViewContainer,I,d?null:R,e.sourceSpan),this._findComponentDirectives(A).forEach(function(e){return r._validateElementAnimationInputOutputs(e.hostProperties,e.hostEvents,e.directive.template)});var k=M.viewContext.component.template;this._validateElementAnimationInputOutputs(x,c,k)}if(d){var L=createElementCssSelector(Os,h),F=this._parseDirectives(this.selectorMatcher,L).directives,j=this._createDirectiveAsts(!0,e.name,F,p,[],e.sourceSpan,[]),B=this._createElementPropertyAsts(e.name,p,j);this._assertNoComponentsNorElementBindingsOnTemplate(j,B,e.sourceSpan);var W=new rs(this.providerViewContext,t.providerContext,t.isTemplateElement,j,[],[],e.sourceSpan);W.afterElement(),D=new v([],[],[],f,W.transformedDirectiveAsts,W.transformProviders,W.transformedHasViewContainer,[D],O,e.sourceSpan)}return D},TemplateParseVisitor.prototype._validateElementAnimationInputOutputs=function(e,t,r){var n=this,i=new Set;r.animations.forEach(function(e){i.add(e.name)});var o=e.filter(function(e){return e.isAnimation});o.forEach(function(e){var t=e.name;i.has(t)||n._reportError("Couldn't find an animation entry for \""+t+'"',e.sourceSpan)}),t.forEach(function(e){if(e.isAnimation){var t=o.find(function(t){return t.name==e.name});t||n._reportError("Unable to listen on (@"+e.name+"."+e.phase+") because the animation trigger [@"+e.name+"] isn't being used on the same element",e.sourceSpan)}})},TemplateParseVisitor.prototype._parseInlineTemplateBinding=function(e,t,r,n){var i=null;if(this._normalizeAttributeName(e.name)==Vs)i=e.value;else if(e.name.startsWith(Rs)){var o=e.name.substring(Rs.length);i=0==e.value.length?o:o+" "+e.value}if(isPresent(i)){for(var s=this._parseTemplateBindings(i,e.sourceSpan),a=0;a0&&this._reportError('Assigning animation triggers via @prop="exp" attributes with an expression is invalid. Use property bindings (e.g. [@prop]="exp") or use an attribute without a value (e.g. @prop) instead.',c,Xr.FATAL),this._parseAnimation(p[Ts],l,c,r,i)):p[Ms]?(this._parsePropertyOrAnimation(p[Ms],l,c,r,n,i),this._parseAssignmentEvent(p[Ms],l,c,r,o)):p[Is]?this._parsePropertyOrAnimation(p[Is],l,c,r,n,i):p[Ds]&&this._parseEventOrAnimationEvent(p[Ds],l,c,r,o);else h=this._parsePropertyInterpolation(u,l,c,r,n);return h||this._parseLiteralAttr(u,l,c,n),h},TemplateParseVisitor.prototype._normalizeAttributeName=function(e){return/^data-/i.test(e)?e.substring(5):e},TemplateParseVisitor.prototype._parseVariable=function(e,t,r,n){e.indexOf("-")>-1&&this._reportError('"-" is not allowed in variable names',r),n.push(new m(e,t,r))},TemplateParseVisitor.prototype._parseReference=function(e,t,r,n){e.indexOf("-")>-1&&this._reportError('"-" is not allowed in reference names',r),n.push(new Zs(e,t,r))},TemplateParseVisitor.prototype._parsePropertyOrAnimation=function(e,t,r,n,i,o){var s=Ns.length,a=_isAnimationLabel(e),u=1;e.substring(0,s)==Ns&&(a=!0,u=s),a?this._parseAnimation(e.substr(u),t,r,n,o):this._parsePropertyAst(e,this._parseBinding(t,r),r,n,i)},TemplateParseVisitor.prototype._parseAnimation=function(e,n,i,o,s){isPresent(n)&&0!=n.length||(n="null");var a=this._parseBinding(n,i);o.push([e,a.source]),s.push(new h(e,t.PropertyBindingType.Animation,r.SecurityContext.NONE,a,null,i))},TemplateParseVisitor.prototype._parsePropertyInterpolation=function(e,t,r,n,i){var o=this._parseInterpolation(t,r);return!!isPresent(o)&&(this._parsePropertyAst(e,o,r,n,i),!0)},TemplateParseVisitor.prototype._parsePropertyAst=function(e,t,r,n,i){n.push([e,t.source]),i.push(new Qs(e,t,(!1),r))},TemplateParseVisitor.prototype._parseAssignmentEvent=function(e,t,r,n,i){this._parseEventOrAnimationEvent(e+"Change",t+"=$event",r,n,i)},TemplateParseVisitor.prototype._parseEventOrAnimationEvent=function(e,t,r,n,i){_isAnimationLabel(e)?(e=e.substr(1),this._parseAnimationEvent(e,t,r,i)):this._parseEvent(e,t,r,n,i)},TemplateParseVisitor.prototype._parseAnimationEvent=function(e,t,r,n){var i=splitAtPeriod(e,[e,""]),o=i[0],s=i[1].toLowerCase();if(s)switch(s){case"start":case"done":var a=this._parseAction(t,r);n.push(new f(o,null,s,a,r));break;default:this._reportError('The provided animation output phase value "'+s+'" for "@'+o+'" is not supported (use start or done)',r)}else this._reportError("The animation trigger output event (@"+o+") is missing its phase value name (start or done are currently supported)",r)},TemplateParseVisitor.prototype._parseEvent=function(e,t,r,n,i){var o=splitAtColon(e,[null,e]),s=o[0],a=o[1],u=this._parseAction(t,r);n.push([e,u.source]),i.push(new f(a,s,null,u,r))},TemplateParseVisitor.prototype._parseLiteralAttr=function(e,t,r,n){n.push(new Qs(e,this._exprParser.wrapLiteralPrimitive(t,""),(!0),r))},TemplateParseVisitor.prototype._parseDirectives=function(e,t){var r=this,n=new Array(this.directivesIndex.size),i=!1;return e.match(t,function(e,t){n[r.directivesIndex.get(t)]=t,i=i||e.hasElementSelector()}),{directives:n.filter(function(e){return!!e}),matchElement:i}},TemplateParseVisitor.prototype._createDirectiveAsts=function(e,t,r,n,i,o,s){var a=this,u=new Set,l=null,c=r.map(function(e){var r=new cn(o.start,o.end,"Directive "+e.type.name);e.isComponent&&(l=e);var c=[],p=[],h=[];return a._createDirectiveHostPropertyAsts(t,e.hostProperties,r,c),a._createDirectiveHostEventAsts(e.hostListeners,r,p),a._createDirectivePropertyAsts(e.inputs,n,h),i.forEach(function(t){(0===t.value.length&&e.isComponent||e.exportAs==t.value)&&(s.push(new d(t.name,identifierToken(e.type),t.sourceSpan)),u.add(t.name))}),new _(e,h,c,p,r)});return i.forEach(function(t){if(t.value.length>0)u.has(t.name)||a._reportError('There is no directive with "exportAs" set to "'+t.value+'"',t.sourceSpan);else if(!l){var r=null;e&&(r=resolveIdentifierToken(zo.TemplateRef)),s.push(new d(t.name,r,t.sourceSpan))}}),c},TemplateParseVisitor.prototype._createDirectiveHostPropertyAsts=function(e,t,r,n){var i=this;t&&Object.keys(t).forEach(function(o){var s=t[o];if(isString(s)){var a=i._parseBinding(s,r);n.push(i._createElementPropertyAst(e,o,a,r))}else i._reportError('Value of the host property binding "'+o+'" needs to be a string representing an expression but got "'+s+'" ('+typeof s+")",r)})},TemplateParseVisitor.prototype._createDirectiveHostEventAsts=function(e,t,r){var n=this;e&&Object.keys(e).forEach(function(i){var o=e[i];isString(o)?n._parseEventOrAnimationEvent(i,o,t,[],r):n._reportError('Value of the host listener "'+i+'" needs to be a string representing an expression but got "'+o+'" ('+typeof o+")",t)})},TemplateParseVisitor.prototype._createDirectivePropertyAsts=function(e,t,r){if(e){var n=new Map;t.forEach(function(e){var t=n.get(e.name);t&&!t.isLiteral||n.set(e.name,e)}),Object.keys(e).forEach(function(t){var i=e[t],o=n.get(i);o&&r.push(new g(t,o.name,o.expression,o.sourceSpan))})}},TemplateParseVisitor.prototype._createElementPropertyAsts=function(e,t,r){var n=this,i=[],o=new Map;return r.forEach(function(e){e.inputs.forEach(function(e){o.set(e.templateName,e)})}),t.forEach(function(t){ t.isLiteral||o.get(t.name)||i.push(n._createElementPropertyAst(e,t.name,t.expression,t.sourceSpan))}),i},TemplateParseVisitor.prototype._createElementPropertyAst=function(e,n,i,o){var s,a,u,l=null,c=n.split(Ls);if(1===c.length){var p=c[0];if(_isAnimationLabel(p))a=p.substr(1),s=t.PropertyBindingType.Animation,u=r.SecurityContext.NONE;else if(a=this._schemaRegistry.getMappedPropName(p),u=this._schemaRegistry.securityContext(e,a),s=t.PropertyBindingType.Property,this._validatePropertyOrAttributeName(a,o,!1),!this._schemaRegistry.hasProperty(e,a,this._schemas)){var f="Can't bind to '"+a+"' since it isn't a known property of '"+e+"'.";e.indexOf("-")>-1&&(f+="\n1. If '"+e+"' is an Angular component and it has '"+a+"' input, then verify that it is part of this module."+("\n2. If '"+e+"' is a Web Component then add \"CUSTOM_ELEMENTS_SCHEMA\" to the '@NgModule.schemas' of this component to suppress this message.\n")),this._reportError(f,o)}}else if(c[0]==Fs){a=c[1],this._validatePropertyOrAttributeName(a,o,!0);var d=this._schemaRegistry.getMappedPropName(a);u=this._schemaRegistry.securityContext(e,d);var m=a.indexOf(":");if(m>-1){var y=a.substring(0,m),v=a.substring(m+1);a=mergeNsAndName(y,v)}s=t.PropertyBindingType.Attribute}else c[0]==js?(a=c[1],s=t.PropertyBindingType.Class,u=r.SecurityContext.NONE):c[0]==Bs?(l=c.length>2?c[2]:null,a=c[1],s=t.PropertyBindingType.Style,u=r.SecurityContext.STYLE):(this._reportError("Invalid property name '"+n+"'",o),s=null,u=null);return new h(a,s,u,i,l,o)},TemplateParseVisitor.prototype._validatePropertyOrAttributeName=function(e,t,r){var n=r?this._schemaRegistry.validateAttribute(e):this._schemaRegistry.validateProperty(e);n.error&&this._reportError(n.msg,t,Xr.FATAL)},TemplateParseVisitor.prototype._findComponentDirectives=function(e){return e.filter(function(e){return e.directive.isComponent})},TemplateParseVisitor.prototype._findComponentDirectiveNames=function(e){return this._findComponentDirectives(e).map(function(e){return e.directive.type.name})},TemplateParseVisitor.prototype._assertOnlyOneComponent=function(e,t){var r=this._findComponentDirectiveNames(e);r.length>1&&this._reportError("More than one component: "+r.join(","),t)},TemplateParseVisitor.prototype._assertElementExists=function(e,t){var r=t.name.replace(/^:xhtml:/,"");if(!e&&!this._schemaRegistry.hasElement(r,this._schemas)){var n="'"+r+"' is not a known element:\n"+("1. If '"+r+"' is an Angular component, then verify that it is part of this module.\n")+("2. If '"+r+"' is a Web Component then add \"CUSTOM_ELEMENTS_SCHEMA\" to the '@NgModule.schemas' of this component to suppress this message.");this._reportError(n,t.sourceSpan)}},TemplateParseVisitor.prototype._assertNoComponentsNorElementBindingsOnTemplate=function(e,t,r){var n=this,i=this._findComponentDirectiveNames(e);i.length>0&&this._reportError("Components on an embedded template: "+i.join(","),r),t.forEach(function(e){n._reportError("Property binding "+e.name+' not used by any directive on an embedded template. Make sure that the property name is spelled correctly and all directives are listed in the "directives" section.',r)})},TemplateParseVisitor.prototype._assertAllEventsPublishedByDirectives=function(e,t){var r=this,n=new Set;e.forEach(function(e){Object.keys(e.directive.outputs).forEach(function(t){var r=e.directive.outputs[t];n.add(r)})}),t.forEach(function(e){!isPresent(e.target)&&n.has(e.name)||r._reportError("Event binding "+e.fullName+' not emitted by any directive on an embedded template. Make sure that the event name is spelled correctly and all directives are listed in the "directives" section.',e.sourceSpan)})},TemplateParseVisitor}(),Ks=function(){function NonBindableVisitor(){}return NonBindableVisitor.prototype.visitElement=function(e,t){var r=preparseElement(e);if(r.type===Yn.SCRIPT||r.type===Yn.STYLE||r.type===Yn.STYLESHEET)return null;var n=e.attrs.map(function(e){return[e.name,e.value]}),i=createElementCssSelector(e.name,n),o=t.findNgContentIndex(i),s=visitAll(this,e.children,$s);return new y(e.name,visitAll(this,e.attrs),[],[],[],[],[],(!1),s,o,e.sourceSpan)},NonBindableVisitor.prototype.visitComment=function(e,t){return null},NonBindableVisitor.prototype.visitAttribute=function(e,t){return new p(e.name,e.value,e.sourceSpan)},NonBindableVisitor.prototype.visitText=function(e,t){var r=t.findNgContentIndex(Ws);return new l(e.value,r,e.sourceSpan)},NonBindableVisitor.prototype.visitExpansion=function(e,t){return e},NonBindableVisitor.prototype.visitExpansionCase=function(e,t){return e},NonBindableVisitor}(),Qs=function(){function BoundElementOrDirectiveProperty(e,t,r,n){this.name=e,this.expression=t,this.isLiteral=r,this.sourceSpan=n}return BoundElementOrDirectiveProperty}(),Zs=function(){function ElementOrDirectiveRef(e,t,r){this.name=e,this.value=t,this.sourceSpan=r}return ElementOrDirectiveRef}(),Xs=function(){function ElementContext(e,t,r,n){this.isTemplateElement=e,this._ngContentIndexMatcher=t,this._wildcardNgContentIndex=r,this.providerContext=n}return ElementContext.create=function(e,t,r){var n=new R,i=null,o=t.find(function(e){return e.directive.isComponent});if(o)for(var s=o.directive.template.ngContentSelectors,a=0;a0?t[0]:null},ElementContext}(),$s=new Xs((!0),new R,null,null),Js=new Ks,Ys=function(e){function PipeCollector(){e.apply(this,arguments),this.pipes=new Set}return bs(PipeCollector,e),PipeCollector.prototype.visitPipe=function(e,t){return this.pipes.add(e.name),e.exp.visit(this),this.visitAll(e.args,t),null},PipeCollector}(zt),ea=function(){function CompilerConfig(e){var t=void 0===e?{}:e,n=t.renderTypes,i=void 0===n?new ra:n,o=t.defaultEncapsulation,s=void 0===o?r.ViewEncapsulation.Emulated:o,a=t.genDebugInfo,u=t.logBindingUpdate,l=t.useJit,c=void 0===l||l;this.renderTypes=i,this.defaultEncapsulation=s,this._genDebugInfo=a,this._logBindingUpdate=u,this.useJit=c}return Object.defineProperty(CompilerConfig.prototype,"genDebugInfo",{get:function(){return void 0===this._genDebugInfo?r.isDevMode():this._genDebugInfo},enumerable:!0,configurable:!0}),Object.defineProperty(CompilerConfig.prototype,"logBindingUpdate",{get:function(){return void 0===this._logBindingUpdate?r.isDevMode():this._logBindingUpdate},enumerable:!0,configurable:!0}),CompilerConfig}(),ta=function(){function RenderTypes(){}return Object.defineProperty(RenderTypes.prototype,"renderer",{get:function(){return unimplemented$1()},enumerable:!0,configurable:!0}),Object.defineProperty(RenderTypes.prototype,"renderText",{get:function(){return unimplemented$1()},enumerable:!0,configurable:!0}),Object.defineProperty(RenderTypes.prototype,"renderElement",{get:function(){return unimplemented$1()},enumerable:!0,configurable:!0}),Object.defineProperty(RenderTypes.prototype,"renderComment",{get:function(){return unimplemented$1()},enumerable:!0,configurable:!0}),Object.defineProperty(RenderTypes.prototype,"renderNode",{get:function(){return unimplemented$1()},enumerable:!0,configurable:!0}),Object.defineProperty(RenderTypes.prototype,"renderEvent",{get:function(){return unimplemented$1()},enumerable:!0,configurable:!0}),RenderTypes}(),ra=function(){function DefaultRenderTypes(){this.renderText=null,this.renderElement=null,this.renderComment=null,this.renderNode=null,this.renderEvent=null}return Object.defineProperty(DefaultRenderTypes.prototype,"renderer",{get:function(){return resolveIdentifier(zo.Renderer)},enumerable:!0,configurable:!0}),DefaultRenderTypes}(),na=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 __)},ia=function(){function AnimationAst(){this.startTime=0,this.playTime=0}return AnimationAst}(),oa=function(e){function AnimationStateAst(){e.apply(this,arguments)}return na(AnimationStateAst,e),AnimationStateAst}(ia),sa=function(e){function AnimationEntryAst(t,r,n){e.call(this),this.name=t,this.stateDeclarations=r,this.stateTransitions=n}return na(AnimationEntryAst,e),AnimationEntryAst.prototype.visit=function(e,t){return e.visitAnimationEntry(this,t)},AnimationEntryAst}(ia),aa=function(e){function AnimationStateDeclarationAst(t,r){e.call(this),this.stateName=t,this.styles=r}return na(AnimationStateDeclarationAst,e),AnimationStateDeclarationAst.prototype.visit=function(e,t){return e.visitAnimationStateDeclaration(this,t)},AnimationStateDeclarationAst}(oa),ua=function(){function AnimationStateTransitionExpression(e,t){this.fromState=e,this.toState=t}return AnimationStateTransitionExpression}(),la=function(e){function AnimationStateTransitionAst(t,r){e.call(this),this.stateChanges=t,this.animation=r}return na(AnimationStateTransitionAst,e),AnimationStateTransitionAst.prototype.visit=function(e,t){return e.visitAnimationStateTransition(this,t)},AnimationStateTransitionAst}(oa),ca=function(e){function AnimationStepAst(t,r,n,i,o){e.call(this),this.startingStyles=t,this.keyframes=r,this.duration=n,this.delay=i,this.easing=o}return na(AnimationStepAst,e),AnimationStepAst.prototype.visit=function(e,t){return e.visitAnimationStep(this,t)},AnimationStepAst}(ia),pa=function(e){function AnimationStylesAst(t){e.call(this),this.styles=t}return na(AnimationStylesAst,e),AnimationStylesAst.prototype.visit=function(e,t){return e.visitAnimationStyles(this,t)},AnimationStylesAst}(ia),ha=function(e){function AnimationKeyframeAst(t,r){e.call(this),this.offset=t,this.styles=r}return na(AnimationKeyframeAst,e),AnimationKeyframeAst.prototype.visit=function(e,t){return e.visitAnimationKeyframe(this,t)},AnimationKeyframeAst}(ia),fa=function(e){function AnimationWithStepsAst(t){e.call(this),this.steps=t}return na(AnimationWithStepsAst,e),AnimationWithStepsAst}(ia),da=function(e){function AnimationGroupAst(t){e.call(this,t)}return na(AnimationGroupAst,e),AnimationGroupAst.prototype.visit=function(e,t){return e.visitAnimationGroup(this,t)},AnimationGroupAst}(fa),ma=function(e){function AnimationSequenceAst(t){e.call(this,t)}return na(AnimationSequenceAst,e),AnimationSequenceAst.prototype.visit=function(e,t){return e.visitAnimationSequence(this,t)},AnimationSequenceAst}(fa),ya=function(){function AnimationEntryCompileResult(e,t,r){this.name=e,this.statements=t,this.fnExp=r}return AnimationEntryCompileResult}(),va=function(){function AnimationCompiler(){}return AnimationCompiler.prototype.compile=function(e,t){return t.map(function(t){var r=e+"_"+t.name,n=new Ia(t.name,r);return n.build(t)})},AnimationCompiler}(),ga=variable("element"),_a=variable("defaultStateStyles"),ba=variable("view"),wa=ba.prop("renderer"),Ca=variable("currentState"),Ea=variable("nextState"),Sa=variable("player"),Pa=variable("totalTime"),Aa=variable("startStateStyles"),xa=variable("endStateStyles"),Ta=variable("collectedStyles"),Ma=literalMap([]),Ia=function(){function _AnimationBuilder(e,t){this.animationName=e,this._fnVarName=t+"_factory",this._statesMapVarName=t+"_states",this._statesMapVar=variable(this._statesMapVarName)}return _AnimationBuilder.prototype.visitAnimationStyles=function(e,t){var r=[];return t.isExpectingFirstStyleStep&&(r.push(Aa),t.isExpectingFirstStyleStep=!1),e.styles.forEach(function(e){r.push(literalMap(Object.keys(e).map(function(t){return[t,literal(e[t])]})))}),importExpr(resolveIdentifier(zo.AnimationStyles)).instantiate([importExpr(resolveIdentifier(zo.collectAndResolveStyles)).callFn([Ta,literalArr(r)])])},_AnimationBuilder.prototype.visitAnimationKeyframe=function(e,t){return importExpr(resolveIdentifier(zo.AnimationKeyframe)).instantiate([literal(e.offset),e.styles.visit(this,t)])},_AnimationBuilder.prototype.visitAnimationStep=function(e,t){var r=this;if(t.endStateAnimateStep===e)return this._visitEndStateAnimation(e,t);var n=e.startingStyles.visit(this,t),i=e.keyframes.map(function(e){return e.visit(r,t)});return this._callAnimateMethod(e,n,literalArr(i),t)},_AnimationBuilder.prototype._visitEndStateAnimation=function(e,t){var r=this,n=e.startingStyles.visit(this,t),i=e.keyframes.map(function(e){return e.visit(r,t)}),o=importExpr(resolveIdentifier(zo.balanceAnimationKeyframes)).callFn([Ta,xa,literalArr(i)]);return this._callAnimateMethod(e,n,o,t)},_AnimationBuilder.prototype._callAnimateMethod=function(e,t,r,n){return n.totalTransitionTime+=e.duration+e.delay,wa.callMethod("animate",[ga,t,r,literal(e.duration),literal(e.delay),literal(e.easing)])},_AnimationBuilder.prototype.visitAnimationSequence=function(e,t){var r=this,n=e.steps.map(function(e){return e.visit(r,t)});return importExpr(resolveIdentifier(zo.AnimationSequencePlayer)).instantiate([literalArr(n)])},_AnimationBuilder.prototype.visitAnimationGroup=function(e,t){var r=this,n=e.steps.map(function(e){return e.visit(r,t)});return importExpr(resolveIdentifier(zo.AnimationGroupPlayer)).instantiate([literalArr(n)])},_AnimationBuilder.prototype.visitAnimationStateDeclaration=function(e,t){var r={};_getStylesArray(e).forEach(function(e){Object.keys(e).forEach(function(t){r[t]=e[t]})}),t.stateMap.registerState(e.stateName,r)},_AnimationBuilder.prototype.visitAnimationStateTransition=function(e,t){var r=e.animation.steps,n=r[r.length-1];_isEndStateAnimateStep(n)&&(t.endStateAnimateStep=n),t.totalTransitionTime=0,t.isExpectingFirstStyleStep=!0;var i=[];e.stateChanges.forEach(function(e){i.push(_compareToAnimationStateExpr(Ca,e.fromState).and(_compareToAnimationStateExpr(Ea,e.toState))),e.fromState!=Do&&t.stateMap.registerState(e.fromState),e.toState!=Do&&t.stateMap.registerState(e.toState)});var o=e.animation.visit(this,t),s=i.reduce(function(e,t){return e.or(t)}),a=Sa.equals(Ce).and(s),u=Sa.set(o).toStmt(),l=Pa.set(literal(t.totalTransitionTime)).toStmt();return new Ve(a,[u,l])},_AnimationBuilder.prototype.visitAnimationEntry=function(e,t){var r=this;e.stateDeclarations.forEach(function(e){return e.visit(r,t)}),t.stateMap.registerState(No,{});var n=[];n.push(ba.callMethod("cancelActiveAnimation",[ga,literal(this.animationName),Ea.equals(literal(Oo))]).toStmt()),n.push(Ta.set(Ma).toDeclStmt()),n.push(Sa.set(Ce).toDeclStmt()),n.push(Pa.set(literal(0)).toDeclStmt()),n.push(_a.set(this._statesMapVar.key(literal(No))).toDeclStmt()),n.push(Aa.set(this._statesMapVar.key(Ca)).toDeclStmt()),n.push(new Ve(Aa.equals(Ce),[Aa.set(_a).toStmt()])),n.push(xa.set(this._statesMapVar.key(Ea)).toDeclStmt()),n.push(new Ve(xa.equals(Ce),[xa.set(_a).toStmt()]));var i=importExpr(resolveIdentifier(zo.renderStyles));return n.push(i.callFn([ga,wa,importExpr(resolveIdentifier(zo.clearStyles)).callFn([Aa])]).toStmt()),e.stateTransitions.forEach(function(e){return n.push(e.visit(r,t))}),n.push(new Ve(Sa.equals(Ce),[Sa.set(importExpr(resolveIdentifier(zo.NoOpAnimationPlayer)).instantiate([])).toStmt()])),n.push(Sa.callMethod("onDone",[fn([],[i.callFn([ga,wa,importExpr(resolveIdentifier(zo.prepareFinalAnimationStyles)).callFn([Aa,xa])]).toStmt()])]).toStmt()),n.push(ba.callMethod("queueAnimation",[ga,literal(this.animationName),Sa,Pa,Ca,Ea]).toStmt()),fn([new fe(ba.name,importType(resolveIdentifier(zo.AppView),[q])),new fe(ga.name,q),new fe(Ca.name,q),new fe(Ea.name,q)],n)},_AnimationBuilder.prototype.build=function(e){var t=new Da,r=e.visit(this,t).toDeclStmt(this._fnVarName),n=variable(this._fnVarName),i=[];Object.keys(t.stateMap.states).forEach(function(e){var r=t.stateMap.states[e],n=Ma;if(isPresent(r)){var o=[];Object.keys(r).forEach(function(e){o.push([e,literal(r[e])])}),n=literalMap(o)}i.push([e,n])});var o=this._statesMapVar.set(literalMap(i)).toDeclStmt(),s=[o,r];return new ya(this.animationName,s,n)},_AnimationBuilder}(),Da=function(){function _AnimationBuilderContext(){this.stateMap=new Na,this.endStateAnimateStep=null,this.isExpectingFirstStyleStep=!1,this.totalTransitionTime=0}return _AnimationBuilderContext}(),Na=function(){function _AnimationBuilderStateMap(){this._states={}}return Object.defineProperty(_AnimationBuilderStateMap.prototype,"states",{get:function(){return this._states},enumerable:!0,configurable:!0}),_AnimationBuilderStateMap.prototype.registerState=function(e,t){void 0===t&&(t=null);var r=this._states[e];r||(this._states[e]=t)},_AnimationBuilderStateMap}(),Oa=i.Math,Va=function(){function StylesCollectionEntry(e,t){this.time=e,this.value=t}return StylesCollectionEntry.prototype.matches=function(e,t){return e==this.time&&t==this.value},StylesCollectionEntry}(),Ra=function(){function StylesCollection(){this.styles={}}return StylesCollection.prototype.insertAtTime=function(e,t,r){var n=new Va(t,r),i=this.styles[e];isPresent(i)||(i=this.styles[e]=[]);for(var o=0,s=i.length-1;s>=0;s--)if(i[s].time<=t){o=s+1;break}x.insert(i,o,n)},StylesCollection.prototype.getByIndex=function(e,t){var r=this.styles[e];return isPresent(r)?t>=r.length?null:r[t]:null},StylesCollection.prototype.indexOfAtOrBeforeTime=function(e,t){var r=this.styles[e];if(isPresent(r))for(var n=r.length-1;n>=0;n--)if(r[n].time<=t)return n;return null},StylesCollection}(),ka=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 __)},La=0,Fa=1,ja=1e3,Ba=function(e){function AnimationParseError(t){e.call(this,null,t)}return ka(AnimationParseError,e),AnimationParseError.prototype.toString=function(){return""+this.msg},AnimationParseError}(hn),Wa=function(){function AnimationEntryParseResult(e,t){this.ast=e,this.errors=t}return AnimationEntryParseResult}(),Ua=function(){function AnimationParser(){}return AnimationParser.prototype.parseComponent=function(e){var t=this,r=[],n=e.type.name,i=new Set,o=e.template.animations.map(function(e){var o=t.parseEntry(e),s=o.ast,a=s.name;if(i.has(a)?o.errors.push(new Ba('The animation trigger "'+a+'" has already been registered for the '+n+" component")):i.add(a),o.errors.length>0){var u='- Unable to parse the animation sequence for "'+a+'" on the '+n+" component due to the following errors:";o.errors.forEach(function(e){u+="\n-- "+e.msg}),r.push(u)}return s});if(r.length>0){var s=r.join("\n");throw new Error("Animation parse errors:\n"+s)}return o},AnimationParser.prototype.parseEntry=function(e){var t=[],r={},n=[],i=[];e.definitions.forEach(function(e){e instanceof Xe?_parseAnimationDeclarationStates(e,t).forEach(function(e){i.push(e),r[e.stateName]=e.styles}):n.push(e)});var o=n.map(function(e){return _parseAnimationStateTransition(e,r,t)}),s=new sa(e.name,i,o);return new Wa(s,t)},AnimationParser}(),Ha=function(){function _AnimationTimings(e,t,r){this.duration=e,this.delay=t,this.easing=r}return _AnimationTimings}(),Ga=function(){function _ValueOutputAstTransformer(){}return _ValueOutputAstTransformer.prototype.visitArray=function(e,t){var r=this;return literalArr(e.map(function(e){return visitValue(e,r,null)}),t)},_ValueOutputAstTransformer.prototype.visitStringMap=function(e,t){var r=this,n=[];return Object.keys(e).forEach(function(t){n.push([t,visitValue(e[t],r,null)])}),literalMap(n,t)},_ValueOutputAstTransformer.prototype.visitPrimitive=function(e,t){return literal(e,t)},_ValueOutputAstTransformer.prototype.visitOther=function(e,t){if(e instanceof ot)return importExpr(e);if(e instanceof J)return e;throw new Error("Illegal state: Don't now how to compile value "+e)},_ValueOutputAstTransformer}(),za=function(){function _DebugState(e,t){this.nodeIndex=e,this.sourceAst=t}return _DebugState}(),qa=new za(null,null),Ka=function(){function CompileMethod(e){this._view=e,this._newState=qa,this._currState=qa,this._bodyStatements=[],this._debugEnabled=this._view.genConfig.genDebugInfo}return CompileMethod.prototype._updateDebugContextIfNeeded=function(){if(this._newState.nodeIndex!==this._currState.nodeIndex||this._newState.sourceAst!==this._currState.sourceAst){var e=this._updateDebugContext(this._newState);isPresent(e)&&this._bodyStatements.push(e.toStmt())}},CompileMethod.prototype._updateDebugContext=function(e){if(this._currState=this._newState=e,this._debugEnabled){var t=isPresent(e.sourceAst)?e.sourceAst.sourceSpan.start:null;return be.callMethod("debug",[literal(e.nodeIndex),isPresent(t)?literal(t.line):Ce,isPresent(t)?literal(t.col):Ce])}return null},CompileMethod.prototype.resetDebugInfoExpr=function(e,t){var r=this._updateDebugContext(new za(e,t));return isPresent(r)?r:Ce},CompileMethod.prototype.resetDebugInfo=function(e,t){this._newState=new za(e,t)},CompileMethod.prototype.addStmt=function(e){this._updateDebugContextIfNeeded(),this._bodyStatements.push(e)},CompileMethod.prototype.addStmts=function(e){this._updateDebugContextIfNeeded(),x.addAll(this._bodyStatements,e)},CompileMethod.prototype.finish=function(){return this._bodyStatements},CompileMethod.prototype.isEmpty=function(){return 0===this._bodyStatements.length},CompileMethod}(),Qa=function(){function ViewQueryValues(e,t){this.view=e,this.values=t}return ViewQueryValues}(),Za=function(){function CompileQuery(e,t,r,n){this.meta=e,this.queryList=t,this.ownerDirectiveExpression=r,this.view=n,this._values=new Qa(n,[])}return CompileQuery.prototype.addValue=function(e,t){for(var r=t,n=[];isPresent(r)&&r!==this.view;){var i=r.declarationElement;n.unshift(i),r=i.view}var o=getPropertyInView(this.queryList,t,this.view),s=this._values;n.forEach(function(e){var t=s.values.length>0?s.values[s.values.length-1]:null;if(t instanceof Qa&&t.view===e.embeddedView)s=t;else{var r=new Qa(e.embeddedView,[]);s.values.push(r),s=r}}),s.values.push(e),n.length>0&&t.dirtyParentQueriesMethod.addStmt(o.callMethod("setDirty",[]).toStmt())},CompileQuery.prototype._isStatic=function(){return!this._values.values.some(function(e){return e instanceof Qa})},CompileQuery.prototype.afterChildren=function(e,t){var r=createQueryValues(this._values),n=[this.queryList.callMethod("reset",[literalArr(r)]).toStmt()];if(isPresent(this.ownerDirectiveExpression)){var i=this.meta.first?this.queryList.prop("first"):this.queryList;n.push(this.ownerDirectiveExpression.prop(this.meta.propertyName).set(i).toStmt())}this.meta.first||n.push(this.queryList.callMethod("notifyOnChanges",[]).toStmt()),this.meta.first&&this._isStatic()?e.addStmts(n):t.addStmt(new Ve(this.queryList.prop("dirty"),n))},CompileQuery}(),Xa=function(){function ViewTypeEnum(){}return ViewTypeEnum.fromValue=function(e){var t=resolveIdentifier(zo.ViewType);switch(e){case Xi.HOST:return _enumExpression(t,"HOST");case Xi.COMPONENT:return _enumExpression(t,"COMPONENT");case Xi.EMBEDDED:return _enumExpression(t,"EMBEDDED");default:throw Error("Inavlid ViewType value: "+e)}},ViewTypeEnum}(),$a=function(){function ViewEncapsulationEnum(){}return ViewEncapsulationEnum.fromValue=function(e){var t=resolveIdentifier(zo.ViewEncapsulation);switch(e){case r.ViewEncapsulation.Emulated:return _enumExpression(t,"Emulated");case r.ViewEncapsulation.Native:return _enumExpression(t,"Native");case r.ViewEncapsulation.None:return _enumExpression(t,"None");default:throw Error("Inavlid ViewEncapsulation value: "+e)}},ViewEncapsulationEnum}(),Ja=function(){function ChangeDetectorStatusEnum(){}return ChangeDetectorStatusEnum.fromValue=function(e){var t=resolveIdentifier(zo.ChangeDetectorStatus);switch(e){case Bi.CheckOnce:return _enumExpression(t,"CheckOnce");case Bi.Checked:return _enumExpression(t,"Checked");case Bi.CheckAlways:return _enumExpression(t,"CheckAlways");case Bi.Detached:return _enumExpression(t,"Detached");case Bi.Errored:return _enumExpression(t,"Errored");case Bi.Destroyed:return _enumExpression(t,"Destroyed");default:throw Error("Inavlid ChangeDetectorStatus value: "+e)}},ChangeDetectorStatusEnum}(),Ya=function(){function ViewConstructorVars(){}return ViewConstructorVars.viewUtils=variable("viewUtils"),ViewConstructorVars.parentInjector=variable("parentInjector"),ViewConstructorVars.declarationEl=variable("declarationEl"),ViewConstructorVars}(),eu=function(){function ViewProperties(){}return ViewProperties.renderer=be.prop("renderer"),ViewProperties.projectableNodes=be.prop("projectableNodes"),ViewProperties.viewUtils=be.prop("viewUtils"),ViewProperties}(),tu=function(){function EventHandlerVars(){}return EventHandlerVars.event=variable("$event"),EventHandlerVars}(),ru=function(){function InjectMethodVars(){}return InjectMethodVars.token=variable("token"),InjectMethodVars.requestNodeIndex=variable("requestNodeIndex"),InjectMethodVars.notFoundResult=variable("notFoundResult"),InjectMethodVars}(),nu=function(){function DetectChangesVars(){}return DetectChangesVars.throwOnChange=variable("throwOnChange"),DetectChangesVars.changes=variable("changes"),DetectChangesVars.changed=variable("changed"),DetectChangesVars.valUnwrapper=variable("valUnwrapper"),DetectChangesVars}(),iu=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 __)},ou=function(){function CompileNode(e,t,r,n,i){this.parent=e,this.view=t,this.nodeIndex=r,this.renderNode=n,this.sourceAst=i}return CompileNode.prototype.isNull=function(){return!this.renderNode},CompileNode.prototype.isRootElement=function(){return this.view!=this.parent.view},CompileNode}(),su=function(e){function CompileElement(t,r,n,i,o,s,a,u,l,c,p){var h=this;e.call(this,t,r,n,i,o),this.component=s,this._directives=a,this._resolvedProvidersArray=u,this.hasViewContainer=l,this.hasEmbeddedView=c,this._compViewExpr=null,this.instances=new Map,this._queryCount=0,this._queries=new Map,this._componentConstructorViewQueryLists=[],this.contentNodesByNgContentIndex=null,this.referenceTokens={},p.forEach(function(e){return h.referenceTokens[e.name]=e.value}),this.elementRef=importExpr(resolveIdentifier(zo.ElementRef)).instantiate([this.renderNode]),this.instances.set(resolveIdentifierToken(zo.ElementRef).reference,this.elementRef),this.injector=be.callMethod("injector",[literal(this.nodeIndex)]),this.instances.set(resolveIdentifierToken(zo.Injector).reference,this.injector),this.instances.set(resolveIdentifierToken(zo.Renderer).reference,be.prop("renderer")),(this.hasViewContainer||this.hasEmbeddedView||isPresent(this.component))&&this._createAppElement()}return iu(CompileElement,e),CompileElement.createNull=function(){return new CompileElement(null,null,null,null,null,null,[],[],(!1),(!1),[])},CompileElement.prototype._createAppElement=function(){var e="_appEl_"+this.nodeIndex,t=this.isRootElement()?null:this.parent.nodeIndex;this.view.fields.push(new Ie(e,importType(resolveIdentifier(zo.AppElement)),[ie.Private]));var r=be.prop(e).set(importExpr(resolveIdentifier(zo.AppElement)).instantiate([literal(this.nodeIndex),literal(t),be,this.renderNode])).toStmt();this.view.createMethod.addStmt(r),this.appElement=be.prop(e),this.instances.set(resolveIdentifierToken(zo.AppElement).reference,this.appElement)},CompileElement.prototype.createComponentFactoryResolver=function(e){if(e&&0!==e.length){var r=importExpr(resolveIdentifier(zo.CodegenComponentFactoryResolver)).instantiate([literalArr(e.map(function(e){return importExpr(e)})),injectFromViewParentInjector(resolveIdentifierToken(zo.ComponentFactoryResolver),!1)]),n=new at({token:resolveIdentifierToken(zo.ComponentFactoryResolver),useValue:r});this._resolvedProvidersArray.unshift(new b(n.token,(!1),(!0),[n],t.ProviderAstType.PrivateService,[],this.sourceAst.sourceSpan))}},CompileElement.prototype.setComponentView=function(e){this._compViewExpr=e,this.contentNodesByNgContentIndex=new Array(this.component.template.ngContentSelectors.length);for(var t=0;t0&&i++,n=n.parent;return t=this.view.componentView.viewQueries.get(e.reference),isPresent(t)&&x.addAll(r,t),r},CompileElement.prototype._addQuery=function(e,t){var r="_query_"+e.selectors[0].name+"_"+this.nodeIndex+"_"+this._queryCount++,n=createQueryList(e,t,r,this.view),i=new Za(e,n,t,this.view);return addQueryToTokenMap(this._queries,i),i},CompileElement.prototype._getLocalDependency=function(e,r){var n=null;if(!n&&isPresent(r.query)&&(n=this._addQuery(r.query,null).queryList),!n&&isPresent(r.viewQuery)&&(n=createQueryList(r.viewQuery,null,"_viewQuery_"+r.viewQuery.selectors[0].name+"_"+this.nodeIndex+"_"+this._componentConstructorViewQueryLists.length,this.view), this._componentConstructorViewQueryLists.push(n)),isPresent(r.token)){if(!n&&r.token.reference===resolveIdentifierToken(zo.ChangeDetectorRef).reference)return e===t.ProviderAstType.Component?this._compViewExpr.prop("ref"):getPropertyInView(be.prop("ref"),this.view,this.view.componentView);if(!n){var i=this._resolvedProviders.get(r.token.reference);if(i&&(e===t.ProviderAstType.Directive||e===t.ProviderAstType.PublicService)&&i.providerType===t.ProviderAstType.PrivateService)return null;n=this.instances.get(r.token.reference)}}return n},CompileElement.prototype._getDependency=function(e,r){var n=this,i=null;for(r.isValue&&(i=literal(r.value)),i||r.isSkipSelf||(i=this._getLocalDependency(e,r));!i&&!n.parent.isNull();)n=n.parent,i=n._getLocalDependency(t.ProviderAstType.PublicService,new st({token:r.token}));return i||(i=injectFromViewParentInjector(r.token,r.isOptional)),i||(i=Ce),getPropertyInView(i,this.view,n.view)},CompileElement}(ou),au=function(){function _QueryWithRead(e,t){this.query=e,this.read=isPresent(e.meta.read)?e.meta.read:t}return _QueryWithRead}(),uu=function(){function CompilePipe(e,t){var r=this;this.view=e,this.meta=t,this._purePipeProxyCount=0,this.instance=be.prop("_pipe_"+t.name+"_"+e.pipeCount++);var n=this.meta.type.diDeps.map(function(e){return e.token.reference===resolveIdentifierToken(zo.ChangeDetectorRef).reference?getPropertyInView(be.prop("ref"),r.view,r.view.componentView):injectFromViewParentInjector(e.token,!1)});this.view.fields.push(new Ie(this.instance.name,importType(this.meta.type))),this.view.createMethod.resetDebugInfo(null,null),this.view.createMethod.addStmt(be.prop(this.instance.name).set(importExpr(this.meta.type).instantiate(n)).toStmt())}return CompilePipe.call=function(e,t,r){var n,i=e.componentView,o=_findPipeMeta(i,t);return o.pure?(n=i.purePipes.get(t),n||(n=new CompilePipe(i,o),i.purePipes.set(t,n),i.pipes.push(n))):(n=new CompilePipe(e,o),e.pipes.push(n)),n._call(e,r)},Object.defineProperty(CompilePipe.prototype,"pure",{get:function(){return this.meta.pure},enumerable:!0,configurable:!0}),CompilePipe.prototype._call=function(e,t){if(this.meta.pure){var r=be.prop(this.instance.name+"_"+this._purePipeProxyCount++),n=getPropertyInView(this.instance,e,this.view);return createPureProxy(n.prop("transform").callMethod(Y.Bind,[n]),t.length,r,e),importExpr(resolveIdentifier(zo.castByValue)).callFn([r,n.prop("transform")]).callFn(t)}return getPropertyInView(this.instance,e,this.view).callMethod("transform",t)},CompilePipe}(),lu=function(){function CompileView(e,t,r,n,i,o,s,a){var u=this;this.component=e,this.genConfig=t,this.pipeMetas=r,this.styles=n,this.animations=i,this.viewIndex=o,this.declarationElement=s,this.templateVariableBindings=a,this.nodes=[],this.rootNodesOrAppElements=[],this.bindings=[],this.classStatements=[],this.eventHandlerMethods=[],this.fields=[],this.getters=[],this.disposables=[],this.subscriptions=[],this.purePipes=new Map,this.pipes=[],this.locals=new Map,this.literalArrayCount=0,this.literalMapCount=0,this.pipeCount=0,this.createMethod=new Ka(this),this.animationBindingsMethod=new Ka(this),this.injectorGetMethod=new Ka(this),this.updateContentQueriesMethod=new Ka(this),this.dirtyParentQueriesMethod=new Ka(this),this.updateViewQueriesMethod=new Ka(this),this.detectChangesInInputsMethod=new Ka(this),this.detectChangesRenderPropertiesMethod=new Ka(this),this.afterContentLifecycleCallbacksMethod=new Ka(this),this.afterViewLifecycleCallbacksMethod=new Ka(this),this.destroyMethod=new Ka(this),this.detachMethod=new Ka(this),this.viewType=getViewType(e,o),this.className="_View_"+e.type.name+o,this.classType=importType(new ot({name:this.className})),this.viewFactory=variable(getViewFactoryName(e,o)),this.viewType===Xi.COMPONENT||this.viewType===Xi.HOST?this.componentView=this:this.componentView=this.declarationElement.view.componentView,this.componentContext=getPropertyInView(be.prop("context"),this,this.componentView);var l=new Map;if(this.viewType===Xi.COMPONENT){var c=be.prop("context");x.forEachWithIndex(this.component.viewQueries,function(e,t){var r="_viewQuery_"+e.selectors[0].name+"_"+t,n=createQueryList(e,c,r,u),i=new Za(e,n,c,u);addQueryToTokenMap(l,i)});var p=0;this.component.type.diDeps.forEach(function(e){if(isPresent(e.viewQuery)){var t=be.prop("declarationAppElement").prop("componentConstructorViewQueries").key(literal(p++)),r=new Za(e.viewQuery,t,null,u);addQueryToTokenMap(l,r)}})}this.viewQueries=l,a.forEach(function(e){u.locals.set(e[1],be.prop("context").prop(e[0]))}),this.declarationElement.isNull()||this.declarationElement.setEmbeddedView(this)}return CompileView.prototype.callPipe=function(e,t,r){return uu.call(this,e,[t].concat(r))},CompileView.prototype.getLocal=function(e){if(e==tu.event.name)return tu.event;for(var t=this,r=t.locals.get(e);!r&&isPresent(t.declarationElement.view);)t=t.declarationElement.view,r=t.locals.get(e);return isPresent(r)?getPropertyInView(r,this,t):null},CompileView.prototype.createLiteralArray=function(e){if(0===e.length)return importExpr(resolveIdentifier(zo.EMPTY_ARRAY));for(var t=be.prop("_arr_"+this.literalArrayCount++),r=[],n=[],i=0;i":r=W.Bigger;break;case"<=":r=W.LowerEquals;break;case">=":r=W.BiggerEquals;break;default:throw new Error("Unsupported operation "+e.operation)}return convertToStatementIfNeeded(t,new me(r,this.visit(e.left,gs.Expression),this.visit(e.right,gs.Expression)))},_AstToIrVisitor.prototype.visitChain=function(e,t){return ensureStatementMode(t,e),this.visitAll(e.expressions,t)},_AstToIrVisitor.prototype.visitConditional=function(e,t){var r=this.visit(e.condition,gs.Expression);return convertToStatementIfNeeded(t,r.conditional(this.visit(e.trueExp,gs.Expression),this.visit(e.falseExp,gs.Expression)))},_AstToIrVisitor.prototype.visitPipe=function(e,t){var r=this.visit(e.exp,gs.Expression),n=this.visitAll(e.args,gs.Expression),i=this._nameResolver.callPipe(e.name,r,n);return this.needsValueUnwrapper=!0,convertToStatementIfNeeded(t,this._valueUnwrapper.callMethod("unwrap",[i]))},_AstToIrVisitor.prototype.visitFunctionCall=function(e,t){return convertToStatementIfNeeded(t,this.visit(e.target,gs.Expression).callFn(this.visitAll(e.args,gs.Expression)))},_AstToIrVisitor.prototype.visitImplicitReceiver=function(e,t){return ensureExpressionMode(t,e),this._implicitReceiver},_AstToIrVisitor.prototype.visitInterpolation=function(e,t){ensureExpressionMode(t,e);for(var r=[literal(e.expressions.length)],n=0;n=0){var s=i[o],a=convertStmtIntoExpression(s),u=variable("pd_"+this._actionResultExprs.length);this._actionResultExprs.push(u),isPresent(a)&&(i[o]=u.set(a.cast(q).notIdentical(literal(!1))).toDeclStmt(null,[ie.Final]))}this._method.addStmts(i)},CompileEventListener.prototype.finishMethod=function(){var e=this._hasComponentHostListener?this.compileElement.appElement.prop("componentView"):be,t=literal(!0);this._actionResultExprs.forEach(function(e){t=t.and(e)});var r=[e.callMethod("markPathToRootAsCheckOnce",[]).toStmt()].concat(this._method.finish()).concat([new Te(t)]);this.compileElement.view.eventHandlerMethods.push(new De(this._methodName,[this._eventParam],r,K,[ie.Private]))},CompileEventListener.prototype.listenToRenderer=function(){var e,t=be.callMethod("eventHandler",[be.prop(this._methodName).callMethod(Y.Bind,[be])]);e=isPresent(this.eventTarget)?eu.renderer.callMethod("listenGlobal",[literal(this.eventTarget),literal(this.eventName),t]):eu.renderer.callMethod("listen",[this.compileElement.renderNode,literal(this.eventName),t]);var r=variable("disposable_"+this.compileElement.view.disposables.length);this.compileElement.view.disposables.push(r),this.compileElement.view.createMethod.addStmt(r.set(e).toDeclStmt(X,[ie.Private]))},CompileEventListener.prototype.listenToAnimation=function(){var e=be.callMethod("eventHandler",[be.prop(this._methodName).callMethod(Y.Bind,[be])]),t=be.callMethod("registerAnimationOutput",[this.compileElement.renderNode,literal(this.eventName),literal(this.eventPhase),e]).toStmt();this.compileElement.view.createMethod.addStmt(t)},CompileEventListener.prototype.listenToDirective=function(e,t){var r=variable("subscription_"+this.compileElement.view.subscriptions.length);this.compileElement.view.subscriptions.push(r);var n=be.callMethod("eventHandler",[be.prop(this._methodName).callMethod(Y.Bind,[be])]);this.compileElement.view.createMethod.addStmt(r.set(e.prop(t).callMethod(Y.SubscribeObservable,[n])).toDeclStmt(null,[ie.Final]))},CompileEventListener}(),mu=be.prop("numberOfChecks").identical(new ue(0)),yu=not(nu.throwOnChange),vu=function(){function ViewBinderVisitor(e){this.view=e,this._nodeIndex=0}return ViewBinderVisitor.prototype.visitBoundText=function(e,t){var r=this.view.nodes[this._nodeIndex++];return bindRenderText(e,r,this.view),null},ViewBinderVisitor.prototype.visitText=function(e,t){return this._nodeIndex++,null},ViewBinderVisitor.prototype.visitNgContent=function(e,t){return null},ViewBinderVisitor.prototype.visitElement=function(e,t){var r=this.view.nodes[this._nodeIndex++],n=[];return collectEventListeners(e.outputs,e.directives,r).forEach(function(e){n.push(e)}),bindRenderInputs(e.inputs,r),bindRenderOutputs(n),e.directives.forEach(function(e){var t=r.instances.get(e.directive.type.reference);bindDirectiveInputs(e,t,r),bindDirectiveDetectChangesLifecycleCallbacks(e,t,r),bindDirectiveHostProps(e,t,r),bindDirectiveOutputs(e,t,n)}),templateVisitAll(this,e.children,r),e.directives.forEach(function(e){var t=r.instances.get(e.directive.type.reference);bindDirectiveAfterContentLifecycleCallbacks(e.directive,t,r),bindDirectiveAfterViewLifecycleCallbacks(e.directive,t,r)}),e.providers.forEach(function(e){var t=r.instances.get(e.token.reference);bindInjectableDestroyLifecycleCallbacks(e,t,r)}),null},ViewBinderVisitor.prototype.visitEmbeddedTemplate=function(e,t){var r=this.view.nodes[this._nodeIndex++],n=collectEventListeners(e.outputs,e.directives,r);return e.directives.forEach(function(e){var t=r.instances.get(e.directive.type.reference);bindDirectiveInputs(e,t,r),bindDirectiveDetectChangesLifecycleCallbacks(e,t,r),bindDirectiveOutputs(e,t,n),bindDirectiveAfterContentLifecycleCallbacks(e.directive,t,r),bindDirectiveAfterViewLifecycleCallbacks(e.directive,t,r)}),e.providers.forEach(function(e){var t=r.instances.get(e.token.reference);bindInjectableDestroyLifecycleCallbacks(e,t,r)}),bindView(r.embeddedView,e.children),null},ViewBinderVisitor.prototype.visitAttr=function(e,t){return null},ViewBinderVisitor.prototype.visitDirective=function(e,t){return null},ViewBinderVisitor.prototype.visitEvent=function(e,t){return null},ViewBinderVisitor.prototype.visitReference=function(e,t){return null},ViewBinderVisitor.prototype.visitVariable=function(e,t){return null},ViewBinderVisitor.prototype.visitDirectiveProperty=function(e,t){return null},ViewBinderVisitor.prototype.visitElementProperty=function(e,t){return null},ViewBinderVisitor}(),gu="$implicit",_u="class",bu="style",wu="ng-container",Cu=variable("parentRenderNode"),Eu=variable("rootSelector"),Su=function(){function ViewFactoryDependency(e,t){this.comp=e,this.placeholder=t}return ViewFactoryDependency}(),Pu=function(){function ComponentFactoryDependency(e,t){this.comp=e,this.placeholder=t}return ComponentFactoryDependency}(),Au=function(){function ViewBuilderVisitor(e,t){this.view=e,this.targetDependencies=t,this.nestedViewCount=0}return ViewBuilderVisitor.prototype._isRootNode=function(e){return e.view!==this.view},ViewBuilderVisitor.prototype._addRootNodeAndProject=function(e){var t=_getOuterContainerOrSelf(e),r=t.parent,n=t.sourceAst.ngContentIndex,i=e instanceof su&&e.hasViewContainer?e.appElement:null;this._isRootNode(r)?this.view.viewType!==Xi.COMPONENT&&this.view.rootNodesOrAppElements.push(isPresent(i)?i:e.renderNode):isPresent(r.component)&&isPresent(n)&&r.addContentNode(n,isPresent(i)?i:e.renderNode)},ViewBuilderVisitor.prototype._getParentRenderNode=function(e){return e=_getOuterContainerParentOrSelf(e),this._isRootNode(e)?this.view.viewType===Xi.COMPONENT?Cu:Ce:isPresent(e.component)&&e.component.template.encapsulation!==r.ViewEncapsulation.Native?Ce:e.renderNode},ViewBuilderVisitor.prototype.visitBoundText=function(e,t){return this._visitText(e,"",t)},ViewBuilderVisitor.prototype.visitText=function(e,t){return this._visitText(e,e.value,t)},ViewBuilderVisitor.prototype._visitText=function(e,t,r){var n="_text_"+this.view.nodes.length;this.view.fields.push(new Ie(n,importType(this.view.genConfig.renderTypes.renderText)));var i=be.prop(n),o=new ou(r,this.view,this.view.nodes.length,i,e),s=be.prop(n).set(eu.renderer.callMethod("createText",[this._getParentRenderNode(r),literal(t),this.view.createMethod.resetDebugInfoExpr(this.view.nodes.length,e)])).toStmt();return this.view.nodes.push(o),this.view.createMethod.addStmt(s),this._addRootNodeAndProject(o),i},ViewBuilderVisitor.prototype.visitNgContent=function(e,t){this.view.createMethod.resetDebugInfo(null,e);var r=this._getParentRenderNode(t),n=eu.projectableNodes.key(literal(e.index),new G(importType(this.view.genConfig.renderTypes.renderNode)));return r!==Ce?this.view.createMethod.addStmt(eu.renderer.callMethod("projectNodes",[r,importExpr(resolveIdentifier(zo.flattenNestedViewRenderNodes)).callFn([n])]).toStmt()):this._isRootNode(t)?this.view.viewType!==Xi.COMPONENT&&this.view.rootNodesOrAppElements.push(n):isPresent(t.component)&&isPresent(e.ngContentIndex)&&t.addContentNode(e.ngContentIndex,n),null},ViewBuilderVisitor.prototype.visitElement=function(e,t){var r,n=this,i=this.view.nodes.length,o=this.view.createMethod.resetDebugInfoExpr(i,e);r=0===i&&this.view.viewType===Xi.HOST?be.callMethod("selectOrCreateHostElement",[literal(e.name),Eu,o]):e.name===wu?eu.renderer.callMethod("createTemplateAnchor",[this._getParentRenderNode(t),o]):eu.renderer.callMethod("createElement",[this._getParentRenderNode(t),literal(e.name),o]);var s="_el_"+i;this.view.fields.push(new Ie(s,importType(this.view.genConfig.renderTypes.renderElement))),this.view.createMethod.addStmt(be.prop(s).set(r).toStmt());for(var a=be.prop(s),u=e.directives.map(function(e){return e.directive}),l=u.find(function(e){return e.isComponent}),c=_readHtmlAttrs(e.attrs),p=_mergeHtmlAndDirectiveAttrs(c,u),h=0;h0?e.value:gu,e.name]}),s=e.directives.map(function(e){return e.directive}),a=new su(t,this.view,r,i,e,null,s,e.providers,e.hasViewContainer,(!0),e.references);this.view.nodes.push(a),this.nestedViewCount++;var u=new lu(this.view.component,this.view.genConfig,this.view.pipeMetas,Ce,this.view.animations,this.view.viewIndex+this.nestedViewCount,a,o);return this.nestedViewCount+=buildView(u,e.children,this.targetDependencies),a.beforeChildren(),this._addRootNodeAndProject(a),a.afterChildren(0),null},ViewBuilderVisitor.prototype.visitAttr=function(e,t){return null},ViewBuilderVisitor.prototype.visitDirective=function(e,t){return null},ViewBuilderVisitor.prototype.visitEvent=function(e,t){return null},ViewBuilderVisitor.prototype.visitReference=function(e,t){return null},ViewBuilderVisitor.prototype.visitVariable=function(e,t){return null},ViewBuilderVisitor.prototype.visitDirectiveProperty=function(e,t){return null},ViewBuilderVisitor.prototype.visitElementProperty=function(e,t){return null},ViewBuilderVisitor}(),xu=function(){function ViewCompileResult(e,t,r){this.statements=e,this.viewFactoryVar=t,this.dependencies=r}return ViewCompileResult}(),Tu=function(){function ViewCompiler(e){this._genConfig=e,this._animationCompiler=new va}return ViewCompiler.prototype.compileComponent=function(e,t,r,n,i){var o=[],s=new lu(e,this._genConfig,n,r,i,0,su.createNull(),[]),a=[];return buildView(s,t,o),bindView(s,t),finishView(s,a),new xu(a,s.viewFactory.name,o)},ViewCompiler.decorators=[{type:r.Injectable}],ViewCompiler.ctorParameters=[{type:ea}],ViewCompiler}(),Mu=function(){function SourceModule(e,t){this.moduleUrl=e,this.source=t}return SourceModule}(),Iu=function(){function NgModulesSummary(e){this.ngModuleByComponent=e}return NgModulesSummary}(),Du=function(){function OfflineCompiler(e,t,r,n,i,o,s,a,u){this._metadataResolver=e,this._directiveNormalizer=t,this._templateParser=r,this._styleCompiler=n,this._viewCompiler=i,this._ngModuleCompiler=o,this._outputEmitter=s,this._localeId=a,this._translationFormat=u,this._animationParser=new Ua,this._animationCompiler=new va}return OfflineCompiler.prototype.analyzeModules=function(e){var t=this,r=new Map;return e.forEach(function(e){var n=t._metadataResolver.getNgModuleMetadata(e);n.declaredDirectives.forEach(function(e){e.isComponent&&r.set(e.type.reference,n)})}),new Iu(r)},OfflineCompiler.prototype.clearCache=function(){this._directiveNormalizer.clearCache(),this._metadataResolver.clearCache()},OfflineCompiler.prototype.compile=function(e,t,r,n){var i=this,o=_splitTypescriptSuffix(e)[1],s=[],a=[],u=[];return a.push.apply(a,n.map(function(e){return i._compileModule(e,s)})),Promise.all(r.map(function(e){var r=i._metadataResolver.getDirectiveMetadata(e),n=t.ngModuleByComponent.get(e);if(!n)throw new Error("Cannot determine the module for component "+r.type.name+"!");return Promise.all([r].concat(n.transitiveModule.directives).map(function(e){return i._directiveNormalizer.normalizeDirective(e).asyncResult})).then(function(e){var t=e[0],r=e.slice(1);_assertComponent(t);var l=i._styleCompiler.compileComponent(t);l.externalStylesheets.forEach(function(e){u.push(i._codgenStyles(e,o))}),a.push(i._compileComponentFactory(t,o,s),i._compileComponent(t,r,n.transitiveModule.pipes,n.schemas,l.componentStylesheet,o,s))})})).then(function(){return s.length>0&&u.unshift(i._codegenSourceModule(_ngfactoryModuleUrl(e),s,a)),u})},OfflineCompiler.prototype._compileModule=function(e,t){var r=this._metadataResolver.getNgModuleMetadata(e),n=[];this._localeId&&n.push(new at({token:resolveIdentifierToken(zo.LOCALE_ID),useValue:this._localeId})),this._translationFormat&&n.push(new at({token:resolveIdentifierToken(zo.TRANSLATIONS_FORMAT),useValue:this._translationFormat}));var i=this._ngModuleCompiler.compile(r,n);return i.dependencies.forEach(function(e){e.placeholder.name=_componentFactoryName(e.comp),e.placeholder.moduleUrl=_ngfactoryModuleUrl(e.comp.moduleUrl)}),t.push.apply(t,i.statements),i.ngModuleFactoryVar},OfflineCompiler.prototype._compileComponentFactory=function(e,t,r){var n=createHostComponentMeta(e),i=this._compileComponent(n,[e],[],[],null,t,r),o=_componentFactoryName(e.type);return r.push(variable(o).set(importExpr(resolveIdentifier(zo.ComponentFactory),[importType(e.type)]).instantiate([literal(e.selector),variable(i),importExpr(e.type)],importType(resolveIdentifier(zo.ComponentFactory),[importType(e.type)],[T.Const]))).toDeclStmt(null,[ie.Final])),o},OfflineCompiler.prototype._compileComponent=function(e,t,r,n,i,o,s){var a=this._animationParser.parseComponent(e),u=this._templateParser.parse(e,e.template.template,t,r,n,e.type.name),l=i?variable(i.stylesVar):literalArr([]),c=this._animationCompiler.compile(e.type.name,a),p=this._viewCompiler.compileComponent(e,u,l,r,c);return i&&s.push.apply(s,_resolveStyleStatements(i,o)),c.forEach(function(e){e.statements.forEach(function(e){s.push(e)})}),s.push.apply(s,_resolveViewStatements(p)),p.viewFactoryVar},OfflineCompiler.prototype._codgenStyles=function(e,t){return _resolveStyleStatements(e,t),this._codegenSourceModule(_stylesModuleUrl(e.meta.moduleUrl,e.isShimmed,t),e.statements,[e.stylesVar])},OfflineCompiler.prototype._codegenSourceModule=function(e,t,r){return new Mu(e,this._outputEmitter.emitStatements(e,t,r))},OfflineCompiler}(),Nu=function(){function ResourceLoader(){}return ResourceLoader.prototype.get=function(e){return null},ResourceLoader}(),Ou="asset:",Vu={provide:r.PACKAGE_ROOT_URL,useValue:"/"},Ru=function(){function UrlResolver(e){void 0===e&&(e=null),this._packagePrefix=e}return UrlResolver.prototype.resolve=function(e,t){var r=t;isPresent(e)&&e.length>0&&(r=_resolveUrl(e,r));var n=_split(r),i=this._packagePrefix;if(isPresent(i)&&isPresent(n)&&"package"==n[hu.Scheme]){var o=n[hu.Path];if(this._packagePrefix!==Ou)return i=s.stripRight(i,"/"),o=s.stripLeft(o,"/"),i+"/"+o;var a=o.split(/\//);r="asset:"+a[0]+"/lib/"+a.slice(1).join("/")}return r},UrlResolver.decorators=[{type:r.Injectable}],UrlResolver.ctorParameters=[{type:void 0,decorators:[{type:r.Inject,args:[r.PACKAGE_ROOT_URL]}]}],UrlResolver}(),ku=new RegExp("^(?:([^:/?#.]+):)?(?://(?:([^/?#]*)@)?([\\w\\d\\-\\u0100-\\uffff.%]*)(?::([0-9]+))?)?([^?#]+)?(?:\\?([^#]*))?(?:#(.*))?$");!function(e){e[e.Scheme=1]="Scheme",e[e.UserInfo=2]="UserInfo",e[e.Domain=3]="Domain",e[e.Port=4]="Port",e[e.Path=5]="Path",e[e.QueryData=6]="QueryData",e[e.Fragment=7]="Fragment"}(hu||(hu={}));var Lu=function(){function DirectiveNormalizer(e,t,r,n){this._resourceLoader=e,this._urlResolver=t,this._htmlParser=r,this._config=n,this._resourceLoaderCache=new Map}return DirectiveNormalizer.prototype.clearCache=function(){this._resourceLoaderCache.clear()},DirectiveNormalizer.prototype.clearCacheFor=function(e){var t=this;e.isComponent&&(this._resourceLoaderCache.delete(e.template.templateUrl),e.template.externalStylesheets.forEach(function(e){t._resourceLoaderCache.delete(e.moduleUrl)}))},DirectiveNormalizer.prototype._fetch=function(e){var t=this._resourceLoaderCache.get(e);return t||(t=this._resourceLoader.get(e),this._resourceLoaderCache.set(e,t)),t},DirectiveNormalizer.prototype.normalizeDirective=function(e){var t=this;if(!e.isComponent)return new Ge(e,Promise.resolve(e));var r,n=null;if(isPresent(e.template.template))n=this.normalizeTemplateSync(e.type,e.template),r=Promise.resolve(n);else{if(!e.template.templateUrl)throw new Error("No template specified for component "+e.type.name);r=this.normalizeTemplateAsync(e.type,e.template); }if(n&&0===n.styleUrls.length){var i=_cloneDirectiveWithTemplate(e,n);return new Ge(i,Promise.resolve(i))}return new Ge(null,r.then(function(e){return t.normalizeExternalStylesheets(e)}).then(function(t){return _cloneDirectiveWithTemplate(e,t)}))},DirectiveNormalizer.prototype.normalizeTemplateSync=function(e,t){return this.normalizeLoadedTemplate(e,t,t.template,e.moduleUrl)},DirectiveNormalizer.prototype.normalizeTemplateAsync=function(e,t){var r=this,n=this._urlResolver.resolve(e.moduleUrl,t.templateUrl);return this._fetch(n).then(function(i){return r.normalizeLoadedTemplate(e,t,i,n)})},DirectiveNormalizer.prototype.normalizeLoadedTemplate=function(e,t,n,i){var o=Qr.fromArray(t.interpolation),s=this._htmlParser.parse(n,e.name,!1,o);if(s.errors.length>0){var a=s.errors.join("\n");throw new Error("Template parse errors:\n"+a)}var u=this.normalizeStylesheet(new ht({styles:t.styles,styleUrls:t.styleUrls,moduleUrl:e.moduleUrl})),l=new Fu;visitAll(l,s.rootNodes);var c=this.normalizeStylesheet(new ht({styles:l.styles,styleUrls:l.styleUrls,moduleUrl:i})),p=t.encapsulation;isBlank(p)&&(p=this._config.defaultEncapsulation);var h=u.styles.concat(c.styles),f=u.styleUrls.concat(c.styleUrls);return p===r.ViewEncapsulation.Emulated&&0===h.length&&0===f.length&&(p=r.ViewEncapsulation.None),new ft({encapsulation:p,template:n,templateUrl:i,styles:h,styleUrls:f,externalStylesheets:t.externalStylesheets,ngContentSelectors:l.ngContentSelectors,animations:t.animations,interpolation:t.interpolation})},DirectiveNormalizer.prototype.normalizeExternalStylesheets=function(e){return this._loadMissingExternalStylesheets(e.styleUrls).then(function(t){return new ft({encapsulation:e.encapsulation,template:e.template,templateUrl:e.templateUrl,styles:e.styles,styleUrls:e.styleUrls,externalStylesheets:t,ngContentSelectors:e.ngContentSelectors,animations:e.animations,interpolation:e.interpolation})})},DirectiveNormalizer.prototype._loadMissingExternalStylesheets=function(e,t){var r=this;return void 0===t&&(t=new Map),Promise.all(e.filter(function(e){return!t.has(e)}).map(function(e){return r._fetch(e).then(function(n){var i=r.normalizeStylesheet(new ht({styles:[n],moduleUrl:e}));return t.set(e,i),r._loadMissingExternalStylesheets(i.styleUrls,t)})})).then(function(e){return P.values(t)})},DirectiveNormalizer.prototype.normalizeStylesheet=function(e){var t=this,r=e.styleUrls.filter(isStyleUrlResolvable).map(function(r){return t._urlResolver.resolve(e.moduleUrl,r)}),n=e.styles.map(function(n){var i=extractStyleUrls(t._urlResolver,e.moduleUrl,n);return r.push.apply(r,i.styleUrls),i.style});return new ht({styles:n,styleUrls:r,moduleUrl:e.moduleUrl})},DirectiveNormalizer.decorators=[{type:r.Injectable}],DirectiveNormalizer.ctorParameters=[{type:Nu},{type:Ru},{type:Ko},{type:ea}],DirectiveNormalizer}(),Fu=function(){function TemplatePreparseVisitor(){this.ngContentSelectors=[],this.styles=[],this.styleUrls=[],this.ngNonBindableStackCount=0}return TemplatePreparseVisitor.prototype.visitElement=function(e,t){var r=preparseElement(e);switch(r.type){case Yn.NG_CONTENT:0===this.ngNonBindableStackCount&&this.ngContentSelectors.push(r.selectAttr);break;case Yn.STYLE:var n="";e.children.forEach(function(e){e instanceof dn&&(n+=e.value)}),this.styles.push(n);break;case Yn.STYLESHEET:this.styleUrls.push(r.hrefAttr)}return r.nonBindable&&this.ngNonBindableStackCount++,visitAll(this,e.children),r.nonBindable&&this.ngNonBindableStackCount--,null},TemplatePreparseVisitor.prototype.visitComment=function(e,t){return null},TemplatePreparseVisitor.prototype.visitAttribute=function(e,t){return null},TemplatePreparseVisitor.prototype.visitText=function(e,t){return null},TemplatePreparseVisitor.prototype.visitExpansion=function(e,t){return null},TemplatePreparseVisitor.prototype.visitExpansionCase=function(e,t){return null},TemplatePreparseVisitor}(),ju=function(){function DirectiveResolver(e){void 0===e&&(e=Eo),this._reflector=e}return DirectiveResolver.prototype.resolve=function(e,t){void 0===t&&(t=!0);var n=this._reflector.annotations(r.resolveForwardRef(e));if(n){var i=n.find(isDirectiveMetadata);if(i){var o=this._reflector.propMetadata(e);return this._mergeWithPropertyMetadata(i,o,e)}}if(t)throw new Error("No Directive annotation found on "+stringify(e));return null},DirectiveResolver.prototype._mergeWithPropertyMetadata=function(e,t,n){var i=[],o=[],s={},a={};return Object.keys(t).forEach(function(e){t[e].forEach(function(t){if(t instanceof r.Input)t.bindingPropertyName?i.push(e+": "+t.bindingPropertyName):i.push(e);else if(t instanceof r.Output){var n=t;n.bindingPropertyName?o.push(e+": "+n.bindingPropertyName):o.push(e)}else if(t instanceof r.HostBinding){var u=t;u.hostPropertyName?s["["+u.hostPropertyName+"]"]=e:s["["+e+"]"]=e}else if(t instanceof r.HostListener){var l=t,c=l.args||[];s["("+l.eventName+")"]=e+"("+c.join(",")+")"}else t instanceof r.Query&&(a[e]=t)})}),this._merge(e,i,o,s,a,n)},DirectiveResolver.prototype._extractPublicName=function(e){return splitAtColon(e,[null,e])[1].trim()},DirectiveResolver.prototype._merge=function(e,t,n,i,o,s){var a=this,u=t;if(e.inputs){var l=e.inputs.map(function(e){return a._extractPublicName(e)});t.forEach(function(e){var t=a._extractPublicName(e);if(l.indexOf(t)>-1)throw new Error("Input '"+t+"' defined multiple times in '"+stringify(s)+"'")}),u.unshift.apply(u,e.inputs)}var c=n;if(e.outputs){var p=e.outputs.map(function(e){return a._extractPublicName(e)});n.forEach(function(e){var t=a._extractPublicName(e);if(p.indexOf(t)>-1)throw new Error("Output event '"+t+"' defined multiple times in '"+stringify(s)+"'")}),c.unshift.apply(c,e.outputs)}var h=e.host?A.merge(e.host,i):i,f=e.queries?A.merge(e.queries,o):o;return e instanceof r.Component?new r.Component({selector:e.selector,inputs:u,outputs:c,host:h,exportAs:e.exportAs,moduleId:e.moduleId,queries:f,changeDetection:e.changeDetection,providers:e.providers,viewProviders:e.viewProviders,entryComponents:e.entryComponents,template:e.template,templateUrl:e.templateUrl,styles:e.styles,styleUrls:e.styleUrls,encapsulation:e.encapsulation,animations:e.animations,interpolation:e.interpolation}):new r.Directive({selector:e.selector,inputs:u,outputs:c,host:h,exportAs:e.exportAs,queries:f,providers:e.providers})},DirectiveResolver.decorators=[{type:r.Injectable}],DirectiveResolver.ctorParameters=[{type:Hi}],DirectiveResolver}(),Bu=P.createFromPairs([[Wi.OnInit,r.OnInit],[Wi.OnDestroy,r.OnDestroy],[Wi.DoCheck,r.DoCheck],[Wi.OnChanges,r.OnChanges],[Wi.AfterContentInit,r.AfterContentInit],[Wi.AfterContentChecked,r.AfterContentChecked],[Wi.AfterViewInit,r.AfterViewInit],[Wi.AfterViewChecked,r.AfterViewChecked]]),Wu=P.createFromPairs([[Wi.OnInit,"ngOnInit"],[Wi.OnDestroy,"ngOnDestroy"],[Wi.DoCheck,"ngDoCheck"],[Wi.OnChanges,"ngOnChanges"],[Wi.AfterContentInit,"ngAfterContentInit"],[Wi.AfterContentChecked,"ngAfterContentChecked"],[Wi.AfterViewInit,"ngAfterViewInit"],[Wi.AfterViewChecked,"ngAfterViewChecked"]]),Uu=function(){function NgModuleResolver(e){void 0===e&&(e=Eo),this._reflector=e}return NgModuleResolver.prototype.resolve=function(e,t){void 0===t&&(t=!0);var r=this._reflector.annotations(e).find(_isNgModuleMetadata);if(isPresent(r))return r;if(t)throw new Error("No NgModule metadata found for '"+stringify(e)+"'.");return null},NgModuleResolver.decorators=[{type:r.Injectable}],NgModuleResolver.ctorParameters=[{type:Hi}],NgModuleResolver}(),Hu=function(){function PipeResolver(e){void 0===e&&(e=Eo),this._reflector=e}return PipeResolver.prototype.resolve=function(e,t){void 0===t&&(t=!0);var n=this._reflector.annotations(r.resolveForwardRef(e));if(isPresent(n)){var i=n.find(_isPipeMetadata);if(isPresent(i))return i}if(t)throw new Error("No Pipe decorator found on "+stringify(e));return null},PipeResolver.decorators=[{type:r.Injectable}],PipeResolver.ctorParameters=[{type:Hi}],PipeResolver}(),Gu=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 __)},zu=function(){function CompileMetadataResolver(e,t,r,n,i){void 0===i&&(i=Eo),this._ngModuleResolver=e,this._directiveResolver=t,this._pipeResolver=r,this._schemaRegistry=n,this._reflector=i,this._directiveCache=new Map,this._pipeCache=new Map,this._ngModuleCache=new Map,this._ngModuleOfTypes=new Map,this._anonymousTypes=new Map,this._anonymousTypeIndex=0}return CompileMetadataResolver.prototype.sanitizeTokenName=function(e){var t=stringify(e);if(t.indexOf("(")>=0){var r=this._anonymousTypes.get(e);r||(this._anonymousTypes.set(e,this._anonymousTypeIndex++),r=this._anonymousTypes.get(e)),t="anonymous_token_"+r+"_"}return sanitizeIdentifier(t)},CompileMetadataResolver.prototype.clearCacheFor=function(e){this._directiveCache.delete(e),this._pipeCache.delete(e),this._ngModuleOfTypes.delete(e),this._ngModuleCache.clear()},CompileMetadataResolver.prototype.clearCache=function(){this._directiveCache.clear(),this._pipeCache.clear(),this._ngModuleCache.clear(),this._ngModuleOfTypes.clear()},CompileMetadataResolver.prototype.getAnimationEntryMetadata=function(e){var t=this,r=e.definitions.map(function(e){return t.getAnimationStateMetadata(e)});return new Qe(e.name,r)},CompileMetadataResolver.prototype.getAnimationStateMetadata=function(e){if(e instanceof r.AnimationStateDeclarationMetadata){var t=this.getAnimationStyleMetadata(e.styles);return new Xe(e.stateNameExpr,t)}return e instanceof r.AnimationStateTransitionMetadata?new $e(e.stateChangeExpr,this.getAnimationMetadata(e.steps)):null},CompileMetadataResolver.prototype.getAnimationStyleMetadata=function(e){return new et(e.offset,e.styles)},CompileMetadataResolver.prototype.getAnimationMetadata=function(e){var t=this;if(e instanceof r.AnimationStyleMetadata)return this.getAnimationStyleMetadata(e);if(e instanceof r.AnimationKeyframesSequenceMetadata)return new Ye(e.steps.map(function(e){return t.getAnimationStyleMetadata(e)}));if(e instanceof r.AnimationAnimateMetadata){var n=this.getAnimationMetadata(e.styles);return new tt(e.timings,n)}if(e instanceof r.AnimationWithStepsMetadata){var i=e.steps.map(function(e){return t.getAnimationMetadata(e)});return e instanceof r.AnimationGroupMetadata?new it(i):new nt(i)}return null},CompileMetadataResolver.prototype.getDirectiveMetadata=function(e,t){var n=this;void 0===t&&(t=!0),e=r.resolveForwardRef(e);var i=this._directiveCache.get(e);if(!i){var o=this._directiveResolver.resolve(e,t);if(!o)return null;var s=null,a=null,u=[],l=staticTypeModuleUrl(e),c=[],p=o.selector;if(o instanceof r.Component){assertArrayOfStrings("styles",o.styles),assertArrayOfStrings("styleUrls",o.styleUrls),assertInterpolationSymbols("interpolation",o.interpolation);var h=o.animations?o.animations.map(function(e){return n.getAnimationEntryMetadata(e)}):null;s=new ft({encapsulation:o.encapsulation,template:o.template,templateUrl:o.templateUrl,styles:o.styles,styleUrls:o.styleUrls,animations:h,interpolation:o.interpolation}),a=o.changeDetection,o.viewProviders&&(u=this.getProvidersMetadata(o.viewProviders,c,'viewProviders for "'+stringify(e)+'"')),l=componentModuleUrl(this._reflector,e,o),o.entryComponents&&(c=flattenArray(o.entryComponents).map(function(e){return n.getTypeMetadata(e,staticTypeModuleUrl(e))}).concat(c)),p||(p=this._schemaRegistry.getDefaultComponentElementName())}else if(!p)throw new Error("Directive "+stringify(e)+" has no selector, please add it!");var f=[];isPresent(o.providers)&&(f=this.getProvidersMetadata(o.providers,c,'providers for "'+stringify(e)+'"'));var d=[],m=[];isPresent(o.queries)&&(d=this.getQueriesMetadata(o.queries,!1,e),m=this.getQueriesMetadata(o.queries,!0,e)),i=dt.create({selector:p,exportAs:o.exportAs,isComponent:!!s,type:this.getTypeMetadata(e,l),template:s,changeDetection:a,inputs:o.inputs,outputs:o.outputs,host:o.host,providers:f,viewProviders:u,queries:d,viewQueries:m,entryComponents:c}),this._directiveCache.set(e,i)}return i},CompileMetadataResolver.prototype.getNgModuleMetadata=function(e,t){var n=this;void 0===t&&(t=!0),e=r.resolveForwardRef(e);var i=this._ngModuleCache.get(e);if(!i){var o=this._ngModuleResolver.resolve(e,t);if(!o)return null;var s=[],a=[],u=[],l=[],c=[],p=[],h=[],f=[],d=[],m=[];o.imports&&flattenArray(o.imports).forEach(function(t){var r;if(isValidType(t))r=t;else if(t&&t.ngModule){var i=t;r=i.ngModule,i.providers&&h.push.apply(h,n.getProvidersMetadata(i.providers,f,"provider for the NgModule '"+stringify(r)+"'"))}if(!r)throw new Error("Unexpected value '"+stringify(t)+"' imported by the module '"+stringify(e)+"'");var o=n.getNgModuleMetadata(r,!1);if(null===o)throw new Error("Unexpected "+n._getTypeDescriptor(t)+" '"+stringify(t)+"' imported by the module '"+stringify(e)+"'");c.push(o)}),o.exports&&flattenArray(o.exports).forEach(function(t){if(!isValidType(t))throw new Error("Unexpected value '"+stringify(t)+"' exported by the module '"+stringify(e)+"'");var r,i,o;if(r=n.getDirectiveMetadata(t,!1))a.push(r);else if(i=n.getPipeMetadata(t,!1))l.push(i);else{if(!(o=n.getNgModuleMetadata(t,!1)))throw new Error("Unexpected "+n._getTypeDescriptor(t)+" '"+stringify(t)+"' exported by the module '"+stringify(e)+"'");p.push(o)}});var y=this._getTransitiveNgModuleMetadata(c,p);if(o.declarations&&flattenArray(o.declarations).forEach(function(t){if(!isValidType(t))throw new Error("Unexpected value '"+stringify(t)+"' declared by the module '"+stringify(e)+"'");var r,i;if(r=n.getDirectiveMetadata(t,!1))n._addDirectiveToModule(r,e,y,s,!0);else{if(!(i=n.getPipeMetadata(t,!1)))throw new Error("Unexpected "+n._getTypeDescriptor(t)+" '"+stringify(t)+"' declared by the module '"+stringify(e)+"'");n._addPipeToModule(i,e,y,u,!0)}}),o.providers&&h.push.apply(h,this.getProvidersMetadata(o.providers,f,"provider for the NgModule '"+stringify(e)+"'")),o.entryComponents&&f.push.apply(f,flattenArray(o.entryComponents).map(function(e){return n.getTypeMetadata(e,staticTypeModuleUrl(e))})),o.bootstrap){var v=flattenArray(o.bootstrap).map(function(t){if(!isValidType(t))throw new Error("Unexpected value '"+stringify(t)+"' used in the bootstrap property of module '"+stringify(e)+"'");return n.getTypeMetadata(t,staticTypeModuleUrl(t))});d.push.apply(d,v)}f.push.apply(f,d),o.schemas&&m.push.apply(m,flattenArray(o.schemas)),(g=y.entryComponents).push.apply(g,f),(_=y.providers).push.apply(_,h),i=new yt({type:this.getTypeMetadata(e,staticTypeModuleUrl(e)),providers:h,entryComponents:f,bootstrapComponents:d,schemas:m,declaredDirectives:s,exportedDirectives:a,declaredPipes:u,exportedPipes:l,importedModules:c,exportedModules:p,transitiveModule:y,id:o.id}),y.modules.push(i),this._verifyModule(i),this._ngModuleCache.set(e,i)}return i;var g,_},CompileMetadataResolver.prototype._verifyModule=function(e){e.exportedDirectives.forEach(function(t){if(!e.transitiveModule.directivesSet.has(t.type.reference))throw new Error("Can't export directive "+stringify(t.type.reference)+" from "+stringify(e.type.reference)+" as it was neither declared nor imported!")}),e.exportedPipes.forEach(function(t){if(!e.transitiveModule.pipesSet.has(t.type.reference))throw new Error("Can't export pipe "+stringify(t.type.reference)+" from "+stringify(e.type.reference)+" as it was neither declared nor imported!")})},CompileMetadataResolver.prototype._getTypeDescriptor=function(e){return null!==this._directiveResolver.resolve(e,!1)?"directive":null!==this._pipeResolver.resolve(e,!1)?"pipe":null!==this._ngModuleResolver.resolve(e,!1)?"module":e.provide?"provider":"value"},CompileMetadataResolver.prototype._addTypeToModule=function(e,t){var r=this._ngModuleOfTypes.get(e);if(r&&r!==t)throw new Error("Type "+stringify(e)+" is part of the declarations of 2 modules: "+stringify(r)+" and "+stringify(t)+"! "+("Please consider moving "+stringify(e)+" to a higher module that imports "+stringify(r)+" and "+stringify(t)+". ")+("You can also create a new NgModule that exports and includes "+stringify(e)+" then import that NgModule in "+stringify(r)+" and "+stringify(t)+"."));this._ngModuleOfTypes.set(e,t)},CompileMetadataResolver.prototype._getTransitiveNgModuleMetadata=function(e,t){var r=getTransitiveModules(e.concat(t),!0),n=flattenArray(r.map(function(e){return e.providers})),i=flattenArray(r.map(function(e){return e.entryComponents})),o=getTransitiveModules(e,!1),s=flattenArray(o.map(function(e){return e.exportedDirectives})),a=flattenArray(o.map(function(e){return e.exportedPipes}));return new vt(r,n,i,s,a)},CompileMetadataResolver.prototype._addDirectiveToModule=function(e,t,r,n,i){return void 0===i&&(i=!1),!(!i&&r.directivesSet.has(e.type.reference))&&(r.directivesSet.add(e.type.reference),r.directives.push(e),n.push(e),this._addTypeToModule(e.type.reference,t),!0)},CompileMetadataResolver.prototype._addPipeToModule=function(e,t,r,n,i){return void 0===i&&(i=!1),!(!i&&r.pipesSet.has(e.type.reference))&&(r.pipesSet.add(e.type.reference),r.pipes.push(e),n.push(e),this._addTypeToModule(e.type.reference,t),!0)},CompileMetadataResolver.prototype.getTypeMetadata=function(e,t,n){return void 0===n&&(n=null),e=r.resolveForwardRef(e),new ct({name:this.sanitizeTokenName(e),moduleUrl:t,reference:e,diDeps:this.getDependenciesMetadata(e,n),lifecycleHooks:Ui.filter(function(t){return hasLifecycleHook(t,e)})})},CompileMetadataResolver.prototype.getFactoryMetadata=function(e,t,n){return void 0===n&&(n=null),e=r.resolveForwardRef(e),new ut({name:this.sanitizeTokenName(e),moduleUrl:t,reference:e,diDeps:this.getDependenciesMetadata(e,n)})},CompileMetadataResolver.prototype.getPipeMetadata=function(e,t){void 0===t&&(t=!0),e=r.resolveForwardRef(e);var n=this._pipeCache.get(e);if(!n){var i=this._pipeResolver.resolve(e,t);if(!i)return null;n=new mt({type:this.getTypeMetadata(e,staticTypeModuleUrl(e)),name:i.name,pure:i.pure}),this._pipeCache.set(e,n)}return n},CompileMetadataResolver.prototype.getDependenciesMetadata=function(e,t){var n=this,i=!1,o=t||this._reflector.parameters(e)||[],s=o.map(function(t){var o=!1,s=!1,a=!1,u=!1,l=!1,c=null,p=null,h=null;return Array.isArray(t)?t.forEach(function(e){e instanceof r.Host?s=!0:e instanceof r.Self?a=!0:e instanceof r.SkipSelf?u=!0:e instanceof r.Optional?l=!0:e instanceof r.Attribute?(o=!0,h=e.attributeName):e instanceof r.Query?e.isViewQuery?p=e:c=e:e instanceof r.Inject?h=e.token:isValidType(e)&&isBlank(h)&&(h=e)}):h=t,isBlank(h)?(i=!0,null):new st({isAttribute:o,isHost:s,isSelf:a,isSkipSelf:u,isOptional:l,query:c?n.getQueryMetadata(c,null,e):null,viewQuery:p?n.getQueryMetadata(p,null,e):null,token:n.getTokenMetadata(h)})});if(i){var a=s.map(function(e){return e?stringify(e.token):"?"}).join(", ");throw new Error("Can't resolve all parameters for "+stringify(e)+": ("+a+").")}return s},CompileMetadataResolver.prototype.getTokenMetadata=function(e){e=r.resolveForwardRef(e);var t;return t=new lt(isString(e)?{value:e}:{identifier:new ot({reference:e,name:this.sanitizeTokenName(e),moduleUrl:staticTypeModuleUrl(e)})})},CompileMetadataResolver.prototype.getProvidersMetadata=function(e,t,n){var i=this,o=[];return e.forEach(function(s,a){s=r.resolveForwardRef(s),s&&"object"==typeof s&&s.hasOwnProperty("provide")&&(s=new gt(s.provide,s));var u;if(Array.isArray(s))u=i.getProvidersMetadata(s,t,n);else if(s instanceof gt){var l=i.getTokenMetadata(s.token);l.reference===resolveIdentifierToken(zo.ANALYZE_FOR_ENTRY_COMPONENTS).reference?t.push.apply(t,i._getEntryComponentsFromProvider(s)):u=i.getProviderMetadata(s)}else{if(!isValidType(s)){var c=e.reduce(function(e,t,r){return r-1&&s.push(r),o.push(new Ku(t,r)),r}),u=new Xu(e,a,s,i),l=new ns(e,t,i);l.parse().forEach(function(e){return u.addProvider(e)});var c=u.build(),p=e.type.name+"NgFactory",h=variable(p).set(importExpr(resolveIdentifier(zo.NgModuleFactory)).instantiate([variable(c.name),importExpr(e.type)],importType(resolveIdentifier(zo.NgModuleFactory),[importType(e.type)],[T.Const]))).toDeclStmt(null,[ie.Final]),f=[c,h];if(e.id){var d=importExpr(resolveIdentifier(zo.RegisterModuleFactoryFn)).callFn([literal(e.id),variable(p)]).toStmt();f.push(d)}return new Qu(f,p,o)},NgModuleCompiler.decorators=[{type:r.Injectable}],NgModuleCompiler.ctorParameters=[],NgModuleCompiler}(),Xu=function(){function _InjectorBuilder(e,t,r,n){this._ngModuleMeta=e,this._entryComponentFactories=t,this._bootstrapComponentFactories=r,this._sourceSpan=n,this._tokens=[],this._instances=new Map,this._fields=[],this._createStmts=[],this._destroyStmts=[],this._getters=[]}return _InjectorBuilder.prototype.addProvider=function(e){var t=this,r=e.providers.map(function(e){return t._getProviderValue(e)}),n="_"+e.token.name+"_"+this._instances.size,i=this._createProviderProperty(n,e,r,e.multiProvider,e.eager);e.lifecycleHooks.indexOf(Wi.OnDestroy)!==-1&&this._destroyStmts.push(i.callMethod("ngOnDestroy",[]).toStmt()),this._tokens.push(e.token),this._instances.set(e.token.reference,i)},_InjectorBuilder.prototype.build=function(){var e=this,t=this._tokens.map(function(t){var r=e._instances.get(t.reference);return new Ve(Ju.token.identical(createDiTokenExpression(t)),[new Te(r)])}),r=[new De("createInternal",[],this._createStmts.concat(new Te(this._instances.get(this._ngModuleMeta.type.reference))),importType(this._ngModuleMeta.type)),new De("getInternal",[new fe(Ju.token.name,q),new fe(Ju.notFoundResult.name,q)],t.concat([new Te(Ju.notFoundResult)]),q),new De("destroyInternal",[],this._destroyStmts)],n=new De(null,[new fe($u.parent.name,importType(resolveIdentifier(zo.Injector)))],[we.callFn([variable($u.parent.name),literalArr(this._entryComponentFactories.map(function(e){return importExpr(e)})),literalArr(this._bootstrapComponentFactories.map(function(e){return importExpr(e)}))]).toStmt()]),i=this._ngModuleMeta.type.name+"Injector";return new Oe(i,importExpr(resolveIdentifier(zo.NgModuleInjector),[importType(this._ngModuleMeta.type)]),this._fields,this._getters,n,r)},_InjectorBuilder.prototype._getProviderValue=function(e){var t,r=this;if(isPresent(e.useExisting))t=this._getDependency(new st({token:e.useExisting}));else if(isPresent(e.useFactory)){var n=isPresent(e.deps)?e.deps:e.useFactory.diDeps,i=n.map(function(e){return r._getDependency(e)});t=importExpr(e.useFactory).callFn(i)}else if(isPresent(e.useClass)){var n=isPresent(e.deps)?e.deps:e.useClass.diDeps,i=n.map(function(e){return r._getDependency(e)});t=importExpr(e.useClass).instantiate(i,importType(e.useClass))}else t=convertValueToOutputAst(e.useValue);return t},_InjectorBuilder.prototype._createProviderProperty=function(e,t,r,n,i){var o,s;if(n?(o=literalArr(r),s=new G(q)):(o=r[0],s=r[0].type),s||(s=q),i)this._fields.push(new Ie(e,s)),this._createStmts.push(be.prop(e).set(o).toStmt());else{var a="_"+e;this._fields.push(new Ie(a,s));var u=[new Ve(be.prop(a).isBlank(),[be.prop(a).set(o).toStmt()]),new Te(be.prop(a))];this._getters.push(new Ne(e,u,s))}return be.prop(e)},_InjectorBuilder.prototype._getDependency=function(e){var t=null;if(e.isValue&&(t=literal(e.value)),e.isSkipSelf||(!e.token||e.token.reference!==resolveIdentifierToken(zo.Injector).reference&&e.token.reference!==resolveIdentifierToken(zo.ComponentFactoryResolver).reference||(t=be),t||(t=this._instances.get(e.token.reference))),!t){var r=[createDiTokenExpression(e.token)];e.isOptional&&r.push(Ce),t=$u.parent.callMethod("get",r)}return t},_InjectorBuilder}(),$u=function(){function InjectorProps(){}return InjectorProps.parent=be.prop("parent"),InjectorProps}(),Ju=function(){function InjectMethodVars(){}return InjectMethodVars.token=variable("token"),InjectMethodVars.notFoundResult=variable("notFoundResult"),InjectMethodVars}(),Yu=/'|\\|\n|\r|\$/g,el=/^[$A-Z_][0-9A-Z_$]*$/i,tl=variable("error"),rl=variable("stack"),nl=function(){function _EmittedLine(e){this.indent=e,this.parts=[]}return _EmittedLine}(),il=function(){function EmitterVisitorContext(e,t){this._exportedVars=e,this._indent=t,this._classes=[],this._lines=[new nl(t)]}return EmitterVisitorContext.createRoot=function(e){return new EmitterVisitorContext(e,0)},Object.defineProperty(EmitterVisitorContext.prototype,"_currentLine",{get:function(){return this._lines[this._lines.length-1]},enumerable:!0,configurable:!0}),EmitterVisitorContext.prototype.isExportedVar=function(e){return this._exportedVars.indexOf(e)!==-1},EmitterVisitorContext.prototype.println=function(e){void 0===e&&(e=""),this.print(e,!0)},EmitterVisitorContext.prototype.lineIsEmpty=function(){return 0===this._currentLine.parts.length},EmitterVisitorContext.prototype.print=function(e,t){void 0===t&&(t=!1),e.length>0&&this._currentLine.parts.push(e),t&&this._lines.push(new nl(this._indent))},EmitterVisitorContext.prototype.removeEmptyLastLine=function(){this.lineIsEmpty()&&this._lines.pop()},EmitterVisitorContext.prototype.incIndent=function(){this._indent++,this._currentLine.indent=this._indent},EmitterVisitorContext.prototype.decIndent=function(){this._indent--,this._currentLine.indent=this._indent},EmitterVisitorContext.prototype.pushClass=function(e){this._classes.push(e)},EmitterVisitorContext.prototype.popClass=function(){return this._classes.pop()},Object.defineProperty(EmitterVisitorContext.prototype,"currentClass",{get:function(){return this._classes.length>0?this._classes[this._classes.length-1]:null},enumerable:!0,configurable:!0}),EmitterVisitorContext.prototype.toSource=function(){var e=this._lines;return 0===e[e.length-1].parts.length&&(e=e.slice(0,e.length-1)),e.map(function(e){return e.parts.length>0?_createIndent(e.indent)+e.parts.join(""):""}).join("\n")},EmitterVisitorContext}(),ol=function(){function AbstractEmitterVisitor(e){this._escapeDollarInStrings=e}return AbstractEmitterVisitor.prototype.visitExpressionStmt=function(e,t){return e.expr.visitExpression(this,t),t.println(";"),null},AbstractEmitterVisitor.prototype.visitReturnStmt=function(e,t){return t.print("return "),e.value.visitExpression(this,t),t.println(";"),null},AbstractEmitterVisitor.prototype.visitIfStmt=function(e,t){t.print("if ("),e.condition.visitExpression(this,t),t.print(") {");var r=isPresent(e.falseCase)&&e.falseCase.length>0;return e.trueCase.length<=1&&!r?(t.print(" "),this.visitAllStatements(e.trueCase,t),t.removeEmptyLastLine(),t.print(" ")):(t.println(),t.incIndent(),this.visitAllStatements(e.trueCase,t),t.decIndent(),r&&(t.println("} else {"),t.incIndent(),this.visitAllStatements(e.falseCase,t),t.decIndent())),t.println("}"),null},AbstractEmitterVisitor.prototype.visitThrowStmt=function(e,t){return t.print("throw "),e.error.visitExpression(this,t),t.println(";"),null},AbstractEmitterVisitor.prototype.visitCommentStmt=function(e,t){var r=e.comment.split("\n");return r.forEach(function(e){t.println("// "+e)}),null},AbstractEmitterVisitor.prototype.visitWriteVarExpr=function(e,t){var r=t.lineIsEmpty();return r||t.print("("),t.print(e.name+" = "),e.value.visitExpression(this,t),r||t.print(")"),null},AbstractEmitterVisitor.prototype.visitWriteKeyExpr=function(e,t){var r=t.lineIsEmpty();return r||t.print("("),e.receiver.visitExpression(this,t),t.print("["),e.index.visitExpression(this,t),t.print("] = "),e.value.visitExpression(this,t),r||t.print(")"),null},AbstractEmitterVisitor.prototype.visitWritePropExpr=function(e,t){var r=t.lineIsEmpty();return r||t.print("("),e.receiver.visitExpression(this,t),t.print("."+e.name+" = "),e.value.visitExpression(this,t),r||t.print(")"),null},AbstractEmitterVisitor.prototype.visitInvokeMethodExpr=function(e,t){e.receiver.visitExpression(this,t);var r=e.name;return isPresent(e.builtin)&&(r=this.getBuiltinMethodName(e.builtin),isBlank(r))?null:(t.print("."+r+"("),this.visitAllExpressions(e.args,t,","),t.print(")"),null)},AbstractEmitterVisitor.prototype.visitInvokeFunctionExpr=function(e,t){return e.fn.visitExpression(this,t),t.print("("),this.visitAllExpressions(e.args,t,","),t.print(")"),null},AbstractEmitterVisitor.prototype.visitReadVarExpr=function(e,t){var r=e.name;if(isPresent(e.builtin))switch(e.builtin){case $.Super:r="super";break;case $.This:r="this";break;case $.CatchError:r=tl.name;break;case $.CatchStack:r=rl.name;break;default:throw new Error("Unknown builtin variable "+e.builtin)}return t.print(r),null},AbstractEmitterVisitor.prototype.visitInstantiateExpr=function(e,t){return t.print("new "),e.classExpr.visitExpression(this,t),t.print("("),this.visitAllExpressions(e.args,t,","),t.print(")"),null},AbstractEmitterVisitor.prototype.visitLiteralExpr=function(e,t,r){void 0===r&&(r="null");var n=e.value;return isString(n)?t.print(escapeIdentifier(n,this._escapeDollarInStrings)):isBlank(n)?t.print(r):t.print(""+n),null},AbstractEmitterVisitor.prototype.visitConditionalExpr=function(e,t){return t.print("("),e.condition.visitExpression(this,t),t.print("? "),e.trueCase.visitExpression(this,t),t.print(": "),e.falseCase.visitExpression(this,t),t.print(")"),null},AbstractEmitterVisitor.prototype.visitNotExpr=function(e,t){ return t.print("!"),e.condition.visitExpression(this,t),null},AbstractEmitterVisitor.prototype.visitBinaryOperatorExpr=function(e,t){var r;switch(e.operator){case W.Equals:r="==";break;case W.Identical:r="===";break;case W.NotEquals:r="!=";break;case W.NotIdentical:r="!==";break;case W.And:r="&&";break;case W.Or:r="||";break;case W.Plus:r="+";break;case W.Minus:r="-";break;case W.Divide:r="/";break;case W.Multiply:r="*";break;case W.Modulo:r="%";break;case W.Lower:r="<";break;case W.LowerEquals:r="<=";break;case W.Bigger:r=">";break;case W.BiggerEquals:r=">=";break;default:throw new Error("Unknown operator "+e.operator)}return t.print("("),e.lhs.visitExpression(this,t),t.print(" "+r+" "),e.rhs.visitExpression(this,t),t.print(")"),null},AbstractEmitterVisitor.prototype.visitReadPropExpr=function(e,t){return e.receiver.visitExpression(this,t),t.print("."),t.print(e.name),null},AbstractEmitterVisitor.prototype.visitReadKeyExpr=function(e,t){return e.receiver.visitExpression(this,t),t.print("["),e.index.visitExpression(this,t),t.print("]"),null},AbstractEmitterVisitor.prototype.visitLiteralArrayExpr=function(e,t){var r=e.entries.length>1;return t.print("[",r),t.incIndent(),this.visitAllExpressions(e.entries,t,",",r),t.decIndent(),t.print("]",r),null},AbstractEmitterVisitor.prototype.visitLiteralMapExpr=function(e,t){var r=this,n=e.entries.length>1;return t.print("{",n),t.incIndent(),this.visitAllObjects(function(e){t.print(escapeIdentifier(e[0],r._escapeDollarInStrings,!1)+": "),e[1].visitExpression(r,t)},e.entries,t,",",n),t.decIndent(),t.print("}",n),null},AbstractEmitterVisitor.prototype.visitAllExpressions=function(e,t,r,n){var i=this;void 0===n&&(n=!1),this.visitAllObjects(function(e){return e.visitExpression(i,t)},e,t,r,n)},AbstractEmitterVisitor.prototype.visitAllObjects=function(e,t,r,n,i){void 0===i&&(i=!1);for(var o=0;o0&&r.print(n,i),e(t[o]);i&&r.println()},AbstractEmitterVisitor.prototype.visitAllStatements=function(e,t){var r=this;e.forEach(function(e){return e.visitStatement(r,t)})},AbstractEmitterVisitor}(),sl=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 __)},al="asset://debug/lib",ul=function(){function TypeScriptEmitter(e){this._importGenerator=e}return TypeScriptEmitter.prototype.emitStatements=function(e,t,r){var n=this,i=new ll(e),o=il.createRoot(r);i.visitAllStatements(t,o);var s=[];return i.importsWithPrefixes.forEach(function(t,r){s.push("imp"+("ort * as "+t+" from '"+n._importGenerator.getImportPath(e,r)+"';"))}),s.push(o.toSource()),s.join("\n")},TypeScriptEmitter}(),ll=function(e){function _TsEmitterVisitor(t){e.call(this,!1),this._moduleUrl=t,this.importsWithPrefixes=new Map}return sl(_TsEmitterVisitor,e),_TsEmitterVisitor.prototype.visitType=function(e,t,r){void 0===r&&(r="any"),isPresent(e)?e.visitType(this,t):t.print(r)},_TsEmitterVisitor.prototype.visitLiteralExpr=function(t,r){e.prototype.visitLiteralExpr.call(this,t,r,"(null as any)")},_TsEmitterVisitor.prototype.visitExternalExpr=function(e,t){return this._visitIdentifier(e.value,e.typeParams,t),null},_TsEmitterVisitor.prototype.visitDeclareVarStmt=function(e,t){return t.isExportedVar(e.name)&&t.print("export "),e.hasModifier(ie.Final)?t.print("const"):t.print("var"),t.print(" "+e.name+":"),this.visitType(e.type,t),t.print(" = "),e.value.visitExpression(this,t),t.println(";"),null},_TsEmitterVisitor.prototype.visitCastExpr=function(e,t){return t.print("(<"),e.type.visitType(this,t),t.print(">"),e.value.visitExpression(this,t),t.print(")"),null},_TsEmitterVisitor.prototype.visitDeclareClassStmt=function(e,t){var r=this;return t.pushClass(e),t.isExportedVar(e.name)&&t.print("export "),t.print("class "+e.name),isPresent(e.parent)&&(t.print(" extends "),e.parent.visitExpression(this,t)),t.println(" {"),t.incIndent(),e.fields.forEach(function(e){return r._visitClassField(e,t)}),isPresent(e.constructorMethod)&&this._visitClassConstructor(e,t),e.getters.forEach(function(e){return r._visitClassGetter(e,t)}),e.methods.forEach(function(e){return r._visitClassMethod(e,t)}),t.decIndent(),t.println("}"),t.popClass(),null},_TsEmitterVisitor.prototype._visitClassField=function(e,t){e.hasModifier(ie.Private)&&t.print("/*private*/ "),t.print(e.name),t.print(":"),this.visitType(e.type,t),t.println(";")},_TsEmitterVisitor.prototype._visitClassGetter=function(e,t){e.hasModifier(ie.Private)&&t.print("private "),t.print("get "+e.name+"()"),t.print(":"),this.visitType(e.type,t),t.println(" {"),t.incIndent(),this.visitAllStatements(e.body,t),t.decIndent(),t.println("}")},_TsEmitterVisitor.prototype._visitClassConstructor=function(e,t){t.print("constructor("),this._visitParams(e.constructorMethod.params,t),t.println(") {"),t.incIndent(),this.visitAllStatements(e.constructorMethod.body,t),t.decIndent(),t.println("}")},_TsEmitterVisitor.prototype._visitClassMethod=function(e,t){e.hasModifier(ie.Private)&&t.print("private "),t.print(e.name+"("),this._visitParams(e.params,t),t.print("):"),this.visitType(e.type,t,"void"),t.println(" {"),t.incIndent(),this.visitAllStatements(e.body,t),t.decIndent(),t.println("}")},_TsEmitterVisitor.prototype.visitFunctionExpr=function(e,t){return t.print("("),this._visitParams(e.params,t),t.print("):"),this.visitType(e.type,t,"void"),t.println(" => {"),t.incIndent(),this.visitAllStatements(e.statements,t),t.decIndent(),t.print("}"),null},_TsEmitterVisitor.prototype.visitDeclareFunctionStmt=function(e,t){return t.isExportedVar(e.name)&&t.print("export "),t.print("function "+e.name+"("),this._visitParams(e.params,t),t.print("):"),this.visitType(e.type,t,"void"),t.println(" {"),t.incIndent(),this.visitAllStatements(e.statements,t),t.decIndent(),t.println("}"),null},_TsEmitterVisitor.prototype.visitTryCatchStmt=function(e,t){t.println("try {"),t.incIndent(),this.visitAllStatements(e.bodyStmts,t),t.decIndent(),t.println("} catch ("+tl.name+") {"),t.incIndent();var r=[rl.set(tl.prop("stack")).toDeclStmt(null,[ie.Final])].concat(e.catchStmts);return this.visitAllStatements(r,t),t.decIndent(),t.println("}"),null},_TsEmitterVisitor.prototype.visitBuiltintType=function(e,t){var r;switch(e.name){case j.Bool:r="boolean";break;case j.Dynamic:r="any";break;case j.Function:r="Function";break;case j.Number:r="number";break;case j.Int:r="number";break;case j.String:r="string";break;default:throw new Error("Unsupported builtin type "+e.name)}return t.print(r),null},_TsEmitterVisitor.prototype.visitExternalType=function(e,t){return this._visitIdentifier(e.value,e.typeParams,t),null},_TsEmitterVisitor.prototype.visitArrayType=function(e,t){return this.visitType(e.of,t),t.print("[]"),null},_TsEmitterVisitor.prototype.visitMapType=function(e,t){return t.print("{[key: string]:"),this.visitType(e.valueType,t),t.print("}"),null},_TsEmitterVisitor.prototype.getBuiltinMethodName=function(e){var t;switch(e){case Y.ConcatArray:t="concat";break;case Y.SubscribeObservable:t="subscribe";break;case Y.Bind:t="bind";break;default:throw new Error("Unknown builtin method: "+e)}return t},_TsEmitterVisitor.prototype._visitParams=function(e,t){var r=this;this.visitAllObjects(function(e){t.print(e.name),t.print(":"),r.visitType(e.type,t)},e,t,",")},_TsEmitterVisitor.prototype._visitIdentifier=function(e,t,r){var n=this;if(isBlank(e.name))throw new Error("Internal error: unknown identifier "+e);if(isPresent(e.moduleUrl)&&e.moduleUrl!=this._moduleUrl){var i=this.importsWithPrefixes.get(e.moduleUrl);isBlank(i)&&(i="import"+this.importsWithPrefixes.size,this.importsWithPrefixes.set(e.moduleUrl,i)),r.print(i+".")}e.reference&&e.reference.members?(r.print(e.reference.name),r.print("."),r.print(e.reference.members.join("."))):r.print(e.name),isPresent(t)&&t.length>0&&(r.print("<"),this.visitAllObjects(function(e){return e.visitType(n,r)},t,r,","),r.print(">"))},_TsEmitterVisitor}(ol),cl=function(){function _ExecutionContext(e,t,r,n){this.parent=e,this.instance=t,this.className=r,this.vars=n}return _ExecutionContext.prototype.createChildWihtLocalVars=function(){return new _ExecutionContext(this,this.instance,this.className,new Map)},_ExecutionContext}(),pl=function(){function ReturnValue(e){this.value=e}return ReturnValue}(),hl=function(){function StatementInterpreter(){}return StatementInterpreter.prototype.debugAst=function(e){return debugOutputAstAsTypeScript(e)},StatementInterpreter.prototype.visitDeclareVarStmt=function(e,t){return t.vars.set(e.name,e.value.visitExpression(this,t)),null},StatementInterpreter.prototype.visitWriteVarExpr=function(e,t){for(var r=e.value.visitExpression(this,t),n=t;null!=n;){if(n.vars.has(e.name))return n.vars.set(e.name,r),r;n=n.parent}throw new Error("Not declared variable "+e.name)},StatementInterpreter.prototype.visitReadVarExpr=function(e,t){var r=e.name;if(isPresent(e.builtin))switch(e.builtin){case $.Super:return t.instance.__proto__;case $.This:return t.instance;case $.CatchError:r=fl;break;case $.CatchStack:r=dl;break;default:throw new Error("Unknown builtin variable "+e.builtin)}for(var n=t;null!=n;){if(n.vars.has(r))return n.vars.get(r);n=n.parent}throw new Error("Not declared variable "+r)},StatementInterpreter.prototype.visitWriteKeyExpr=function(e,t){var r=e.receiver.visitExpression(this,t),n=e.index.visitExpression(this,t),i=e.value.visitExpression(this,t);return r[n]=i,i},StatementInterpreter.prototype.visitWritePropExpr=function(e,t){var r=e.receiver.visitExpression(this,t),n=e.value.visitExpression(this,t);return r[e.name]=n,n},StatementInterpreter.prototype.visitInvokeMethodExpr=function(e,t){var r,n=e.receiver.visitExpression(this,t),i=this.visitAllExpressions(e.args,t);if(isPresent(e.builtin))switch(e.builtin){case Y.ConcatArray:r=x.concat(n,i[0]);break;case Y.SubscribeObservable:r=n.subscribe({next:i[0]});break;case Y.Bind:r=n.bind(i[0]);break;default:throw new Error("Unknown builtin method "+e.builtin)}else r=n[e.name].apply(n,i);return r},StatementInterpreter.prototype.visitInvokeFunctionExpr=function(e,t){var r=this.visitAllExpressions(e.args,t),n=e.fn;if(n instanceof ee&&n.builtin===$.Super)return t.instance.constructor.prototype.constructor.apply(t.instance,r),null;var i=e.fn.visitExpression(this,t);return i.apply(null,r)},StatementInterpreter.prototype.visitReturnStmt=function(e,t){return new pl(e.value.visitExpression(this,t))},StatementInterpreter.prototype.visitDeclareClassStmt=function(e,t){var r=createDynamicClass(e,t,this);return t.vars.set(e.name,r),null},StatementInterpreter.prototype.visitExpressionStmt=function(e,t){return e.expr.visitExpression(this,t)},StatementInterpreter.prototype.visitIfStmt=function(e,t){var r=e.condition.visitExpression(this,t);return r?this.visitAllStatements(e.trueCase,t):isPresent(e.falseCase)?this.visitAllStatements(e.falseCase,t):null},StatementInterpreter.prototype.visitTryCatchStmt=function(e,t){try{return this.visitAllStatements(e.bodyStmts,t)}catch(r){var n=t.createChildWihtLocalVars();return n.vars.set(fl,r),n.vars.set(dl,r.stack),this.visitAllStatements(e.catchStmts,n)}},StatementInterpreter.prototype.visitThrowStmt=function(e,t){throw e.error.visitExpression(this,t)},StatementInterpreter.prototype.visitCommentStmt=function(e,t){return null},StatementInterpreter.prototype.visitInstantiateExpr=function(e,t){var r=this.visitAllExpressions(e.args,t),n=e.classExpr.visitExpression(this,t);return new(n.bind.apply(n,[void 0].concat(r)))},StatementInterpreter.prototype.visitLiteralExpr=function(e,t){return e.value},StatementInterpreter.prototype.visitExternalExpr=function(e,t){return e.value.reference},StatementInterpreter.prototype.visitConditionalExpr=function(e,t){return e.condition.visitExpression(this,t)?e.trueCase.visitExpression(this,t):isPresent(e.falseCase)?e.falseCase.visitExpression(this,t):null},StatementInterpreter.prototype.visitNotExpr=function(e,t){return!e.condition.visitExpression(this,t)},StatementInterpreter.prototype.visitCastExpr=function(e,t){return e.value.visitExpression(this,t)},StatementInterpreter.prototype.visitFunctionExpr=function(e,t){var r=e.params.map(function(e){return e.name});return _declareFn(r,e.statements,t,this)},StatementInterpreter.prototype.visitDeclareFunctionStmt=function(e,t){var r=e.params.map(function(e){return e.name});return t.vars.set(e.name,_declareFn(r,e.statements,t,this)),null},StatementInterpreter.prototype.visitBinaryOperatorExpr=function(e,t){var r=this,n=function(){return e.lhs.visitExpression(r,t)},i=function(){return e.rhs.visitExpression(r,t)};switch(e.operator){case W.Equals:return n()==i();case W.Identical:return n()===i();case W.NotEquals:return n()!=i();case W.NotIdentical:return n()!==i();case W.And:return n()&&i();case W.Or:return n()||i();case W.Plus:return n()+i();case W.Minus:return n()-i();case W.Divide:return n()/i();case W.Multiply:return n()*i();case W.Modulo:return n()%i();case W.Lower:return n()i();case W.BiggerEquals:return n()>=i();default:throw new Error("Unknown operator "+e.operator)}},StatementInterpreter.prototype.visitReadPropExpr=function(e,t){var r,n=e.receiver.visitExpression(this,t);return r=n[e.name]},StatementInterpreter.prototype.visitReadKeyExpr=function(e,t){var r=e.receiver.visitExpression(this,t),n=e.index.visitExpression(this,t);return r[n]},StatementInterpreter.prototype.visitLiteralArrayExpr=function(e,t){return this.visitAllExpressions(e.entries,t)},StatementInterpreter.prototype.visitLiteralMapExpr=function(e,t){var r=this,n={};return e.entries.forEach(function(e){return n[e[0]]=e[1].visitExpression(r,t)}),n},StatementInterpreter.prototype.visitAllExpressions=function(e,t){var r=this;return e.map(function(e){return e.visitExpression(r,t)})},StatementInterpreter.prototype.visitAllStatements=function(e,t){for(var r=0;r0&&(t.println("var self = this;"),this.visitAllStatements(e.constructorMethod.body,t)),t.decIndent(),t.println("}")},AbstractJsEmitterVisitor.prototype._visitClassGetter=function(e,t,r){r.println("Object.defineProperty("+e.name+".prototype, '"+t.name+"', { get: function() {"),r.incIndent(),t.body.length>0&&(r.println("var self = this;"),this.visitAllStatements(t.body,r)),r.decIndent(),r.println("}});")},AbstractJsEmitterVisitor.prototype._visitClassMethod=function(e,t,r){r.print(e.name+".prototype."+t.name+" = function("),this._visitParams(t.params,r),r.println(") {"),r.incIndent(),t.body.length>0&&(r.println("var self = this;"),this.visitAllStatements(t.body,r)),r.decIndent(),r.println("};")},AbstractJsEmitterVisitor.prototype.visitReadVarExpr=function(t,r){if(t.builtin===$.This)r.print("self");else{if(t.builtin===$.Super)throw new Error("'super' needs to be handled at a parent ast node, not at the variable level!");e.prototype.visitReadVarExpr.call(this,t,r)}return null},AbstractJsEmitterVisitor.prototype.visitDeclareVarStmt=function(e,t){return t.print("var "+e.name+" = "),e.value.visitExpression(this,t),t.println(";"),null},AbstractJsEmitterVisitor.prototype.visitCastExpr=function(e,t){return e.value.visitExpression(this,t),null},AbstractJsEmitterVisitor.prototype.visitInvokeFunctionExpr=function(t,r){var n=t.fn;return n instanceof ee&&n.builtin===$.Super?(r.currentClass.parent.visitExpression(this,r),r.print(".call(this"),t.args.length>0&&(r.print(", "),this.visitAllExpressions(t.args,r,",")),r.print(")")):e.prototype.visitInvokeFunctionExpr.call(this,t,r),null},AbstractJsEmitterVisitor.prototype.visitFunctionExpr=function(e,t){return t.print("function("),this._visitParams(e.params,t),t.println(") {"),t.incIndent(),this.visitAllStatements(e.statements,t),t.decIndent(),t.print("}"),null},AbstractJsEmitterVisitor.prototype.visitDeclareFunctionStmt=function(e,t){return t.print("function "+e.name+"("),this._visitParams(e.params,t),t.println(") {"),t.incIndent(),this.visitAllStatements(e.statements,t),t.decIndent(),t.println("}"),null},AbstractJsEmitterVisitor.prototype.visitTryCatchStmt=function(e,t){t.println("try {"),t.incIndent(),this.visitAllStatements(e.bodyStmts,t),t.decIndent(),t.println("} catch ("+tl.name+") {"),t.incIndent();var r=[rl.set(tl.prop("stack")).toDeclStmt(null,[ie.Final])].concat(e.catchStmts);return this.visitAllStatements(r,t),t.decIndent(),t.println("}"),null},AbstractJsEmitterVisitor.prototype._visitParams=function(e,t){this.visitAllObjects(function(e){return t.print(e.name)},e,t,",")},AbstractJsEmitterVisitor.prototype.getBuiltinMethodName=function(e){var t;switch(e){case Y.ConcatArray:t="concat";break;case Y.SubscribeObservable:t="subscribe";break;case Y.Bind:t="bind";break;default:throw new Error("Unknown builtin method: "+e)}return t},AbstractJsEmitterVisitor}(ol),vl=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 __)},gl=function(e){function JitEmitterVisitor(){e.apply(this,arguments),this._evalArgNames=[],this._evalArgValues=[]}return vl(JitEmitterVisitor,e),JitEmitterVisitor.prototype.getArgs=function(){for(var e={},t=0;t-1?this._colonHostPartReplacer(e,t,r):e+t+r+", "+t+" "+e+r},ShadowCss.prototype._colonHostPartReplacer=function(e,t,r){return e+t.replace(El,"")+r},ShadowCss.prototype._convertShadowDOMSelectors=function(e){return Il.reduce(function(e,t){return e.replace(t," ")},e)},ShadowCss.prototype._scopeSelectors=function(e,t,r){var n=this;return processRules(e,function(e){var i=e.selector,o=e.content;return"@"!=e.selector[0]?i=n._scopeSelector(e.selector,t,r,n.strictStyling):(e.selector.startsWith("@media")||e.selector.startsWith("@supports")||e.selector.startsWith("@page")||e.selector.startsWith("@document"))&&(o=n._scopeSelectors(e.content,t,r)),new Hl(i,o)})},ShadowCss.prototype._scopeSelector=function(e,t,r,n){var i=this;return e.split(",").map(function(e){return e.trim().split(Dl)}).map(function(e){var o=e[0],s=e.slice(1),a=function(e){return i._selectorNeedsScoping(e,t)?n?i._applyStrictSelectorScope(e,t,r):i._applySelectorScope(e,t,r):e};return[a(o)].concat(s).join(" ")}).join(", ")},ShadowCss.prototype._selectorNeedsScoping=function(e,t){var r=this._makeScopeMatcher(t);return!r.test(e)},ShadowCss.prototype._makeScopeMatcher=function(e){var t=/\[/g,r=/\]/g;return e=e.replace(t,"\\[").replace(r,"\\]"),new RegExp("^("+e+")"+Nl,"m")},ShadowCss.prototype._applySelectorScope=function(e,t,r){return this._applySimpleSelectorScope(e,t,r)},ShadowCss.prototype._applySimpleSelectorScope=function(e,t,r){if(Ol.lastIndex=0,Ol.test(e)){var n=this.strictStyling?"["+r+"]":t;return e.replace(Ml,function(e,t){return t+n}).replace(Ol,n+" ")}return t+" "+e},ShadowCss.prototype._applyStrictSelectorScope=function(e,t,r){var n=this,i=/\[is=([^\]]*)\]/g;t=t.replace(i,function(e){for(var t=[],r=1;r-1)i=n._applySimpleSelectorScope(e,t,r);else{var s=e.replace(Ol,"");if(s.length>0){var a=s.match(/([^:]*)(:*)(.*)/);null!==a&&(i=a[1]+o+a[2]+a[3])}}return i},a=0,u=[];e=e.replace(/\[[^\]]*\]/g,function(e){var t="__attr_sel_"+a+"__";return u.push(e),a++,t});for(var l,c="",p=0,h=/( |>|\+|~(?!=))\s*/g,f=e.indexOf(Tl);null!==(l=h.exec(e));){var d=l[1],m=e.slice(p,l.index).trim(),y=p>=f?s(m):m;c+=y+" "+d+" ",p=h.lastIndex}return c+=s(e.substring(p)),c.replace(/__attr_sel_(\d+)__/g,function(e,t){return u[+t]})},ShadowCss.prototype._insertPolyfillHostInCssText=function(e){return e.replace(Rl,Sl).replace(Vl,El)},ShadowCss}(),bl=/polyfill-next-selector[^}]*content:[\s]*?(['"])(.*?)\1[;\s]*}([^{]*?){/gim,wl=/(polyfill-rule)[^}]*(content:[\s]*(['"])(.*?)\3)[;\s]*[^}]*}/gim,Cl=/(polyfill-unscoped-rule)[^}]*(content:[\s]*(['"])(.*?)\3)[;\s]*[^}]*}/gim,El="-shadowcsshost",Sl="-shadowcsscontext",Pl=")(?:\\(((?:\\([^)(]*\\)|[^)(]*)+?)\\))?([^,{]*)",Al=new RegExp("("+El+Pl,"gim"),xl=new RegExp("("+Sl+Pl,"gim"),Tl=El+"-no-combinator",Ml=/-shadowcsshost-no-combinator([^\s]*)/,Il=[/::shadow/g,/::content/g,/\/shadow-deep\//g,/\/shadow\//g],Dl=/(?:>>>)|(?:\/deep\/)/g,Nl="([>\\s~+[.,{:][\\s\\S]*)?$",Ol=/-shadowcsshost/gim,Vl=/:host/gim,Rl=/:host-context/gim,kl=/\/\*\s*[\s\S]*?\*\//g,Ll=/\/\*\s*#\s*sourceMappingURL=[\s\S]+?\*\//,Fl=/(\s*)([^;\{\}]+?)(\s*)((?:{%BLOCK%}?\s*;?)|(?:\s*;))/g,jl=/([{}])/g,Bl="{",Wl="}",Ul="%BLOCK%",Hl=function(){function CssRule(e,t){this.selector=e,this.content=t}return CssRule}(),Gl=function(){function StringWithEscapedBlocks(e,t){this.escapedString=e,this.blocks=t}return StringWithEscapedBlocks}(),zl="%COMP%",ql="_nghost-"+zl,Kl="_ngcontent-"+zl,Ql=function(){function StylesCompileDependency(e,t,r){this.moduleUrl=e,this.isShimmed=t,this.valuePlaceholder=r}return StylesCompileDependency}(),Zl=function(){function StylesCompileResult(e,t){this.componentStylesheet=e,this.externalStylesheets=t}return StylesCompileResult}(),Xl=function(){function CompiledStylesheet(e,t,r,n,i){this.statements=e,this.stylesVar=t,this.dependencies=r,this.isShimmed=n,this.meta=i}return CompiledStylesheet}(),$l=function(){function StyleCompiler(e){this._urlResolver=e,this._shadowCss=new _l}return StyleCompiler.prototype.compileComponent=function(e){var t=this,r=[],n=this._compileStyles(e,new ht({styles:e.template.styles,styleUrls:e.template.styleUrls,moduleUrl:e.type.moduleUrl}),!0);return e.template.externalStylesheets.forEach(function(n){var i=t._compileStyles(e,n,!1);r.push(i)}),new Zl(n,r)},StyleCompiler.prototype._compileStyles=function(e,t,n){for(var i=this,o=e.template.encapsulation===r.ViewEncapsulation.Emulated,s=t.styles.map(function(e){return literal(i._shimIfNeeded(e,o))}),a=[],u=0;u0)switch(e[0]){case"*":break;case"!":r[e.substring(1)]=nc;break;case"#":r[e.substring(1)]=ic;break;case"%":r[e.substring(1)]=sc;break;default:r[e]=oc}})})}return rc(DomElementSchemaRegistry,e),DomElementSchemaRegistry.prototype.hasProperty=function(e,t,n){if(n.some(function(e){return e.name===r.NO_ERRORS_SCHEMA.name}))return!0;if(e.indexOf("-")>-1){if("ng-container"===e||"ng-content"===e)return!1;if(n.some(function(e){return e.name===r.CUSTOM_ELEMENTS_SCHEMA.name}))return!0}var i=this._schema[e.toLowerCase()]||this._schema.unknown;return!!i[t]},DomElementSchemaRegistry.prototype.hasElement=function(e,t){if(t.some(function(e){return e.name===r.NO_ERRORS_SCHEMA.name}))return!0;if(e.indexOf("-")>-1){if("ng-container"===e||"ng-content"===e)return!0;if(t.some(function(e){return e.name===r.CUSTOM_ELEMENTS_SCHEMA.name}))return!0}return!!this._schema[e.toLowerCase()]},DomElementSchemaRegistry.prototype.securityContext=function(e,t){e=e.toLowerCase(),t=t.toLowerCase();var n=tc[e+"|"+t];return n?n:(n=tc["*|"+t],n?n:r.SecurityContext.NONE)},DomElementSchemaRegistry.prototype.getMappedPropName=function(e){return uc[e]||e},DomElementSchemaRegistry.prototype.getDefaultComponentElementName=function(){return"ng-component"},DomElementSchemaRegistry.prototype.validateProperty=function(e){if(e.toLowerCase().startsWith("on")){var t="Binding to event property '"+e+"' is disallowed for security reasons, "+("please use ("+e.slice(2)+")=...")+("\nIf '"+e+"' is a directive input, make sure the directive is imported by the")+" current module.";return{error:!0,msg:t}}return{error:!1}},DomElementSchemaRegistry.prototype.validateAttribute=function(e){if(e.toLowerCase().startsWith("on")){var t="Binding to event attribute '"+e+"' is disallowed for security reasons, "+("please use ("+e.slice(2)+")=...");return{error:!0,msg:t}}return{error:!1}},DomElementSchemaRegistry.decorators=[{type:r.Injectable}],DomElementSchemaRegistry.ctorParameters=[],DomElementSchemaRegistry}(is),cc={get:function(e){throw new Error("No ResourceLoader implementation has been provided. Can't read the url \""+e+'"')}},pc=[{provide:So,useValue:Eo},{provide:Hi,useExisting:So},{provide:Nu,useValue:cc},Co,Jr,on,Ko,{provide:Fi,useFactory:function(e,t,r){return new Fi(e,t,r)},deps:[Ko,[new r.Optional,new r.Inject(r.TRANSLATIONS)],[new r.Optional,new r.Inject(r.TRANSLATIONS_FORMAT)]]},zs,Lu,zu,Vu,$l,Tu,Zu,{provide:ea,useValue:new ea},Jl,{provide:r.Compiler,useExisting:Jl},lc,{provide:is,useExisting:lc},Ru,ju,Hu,Uu],hc=function(){function RuntimeCompilerFactory(e){this._defaultOptions=[{useDebug:r.isDevMode(),useJit:!0,defaultEncapsulation:r.ViewEncapsulation.Emulated}].concat(e)}return RuntimeCompilerFactory.prototype.createCompiler=function(e){void 0===e&&(e=[]);var t=_mergeOptions(this._defaultOptions.concat(e)),n=r.ReflectiveInjector.resolveAndCreate([pc,{provide:ea,useFactory:function(){return new ea({genDebugInfo:t.useDebug,useJit:t.useJit,defaultEncapsulation:t.defaultEncapsulation,logBindingUpdate:t.useDebug})},deps:[]},t.providers]);return n.get(r.Compiler)},RuntimeCompilerFactory.decorators=[{type:r.Injectable}],RuntimeCompilerFactory.ctorParameters=[{type:Array,decorators:[{type:r.Inject,args:[r.COMPILER_OPTIONS]}]}],RuntimeCompilerFactory}(),fc=r.createPlatformFactory(r.platformCore,"coreDynamic",[{provide:r.COMPILER_OPTIONS,useValue:{},multi:!0},{provide:r.CompilerFactory,useClass:hc},{provide:r.PLATFORM_INITIALIZER,useValue:_initReflector,multi:!0}]),dc=/asset:([^\/]+)\/([^\/]+)\/(.+)/,mc=function(){function ImportGenerator(){}return ImportGenerator.parseAssetUrl=function(e){return yc.parse(e)},ImportGenerator}(),yc=function(){function AssetUrl(e,t,r){this.packageName=e,this.firstLevelDir=t,this.modulePath=r}return AssetUrl.parse=function(e,t){void 0===t&&(t=!0);var r=e.match(dc);if(null!==r)return new AssetUrl(r[1],r[2],r[3]);if(t)return null;throw new Error("Url "+e+" is not a valid asset: url")},AssetUrl}(),vc={SelectorMatcher:R,CssSelector:V,AssetUrl:yc,ImportGenerator:mc,CompileMetadataResolver:zu,HtmlParser:Ko,InterpolationConfig:Qr,DirectiveNormalizer:Lu,Lexer:Jr,Parser:on,ParseLocation:un,ParseError:hn,ParseErrorLevel:Xr,ParseSourceFile:ln,ParseSourceSpan:cn,TemplateParser:zs,DomElementSchemaRegistry:lc,StyleCompiler:$l,ViewCompiler:Tu,NgModuleCompiler:Zu,TypeScriptEmitter:ul};t.COMPILER_PROVIDERS=pc,t.CompileDiDependencyMetadata=st,t.CompileDirectiveMetadata=dt,t.CompileFactoryMetadata=ut,t.CompileIdentifierMetadata=ot,t.CompileMetadataWithIdentifier=Ke,t.CompilePipeMetadata=mt,t.CompileProviderMetadata=at,t.CompileQueryMetadata=pt,t.CompileTemplateMetadata=ft,t.CompileTokenMetadata=lt,t.CompileTypeMetadata=ct,t.CompilerConfig=ea,t.DEFAULT_PACKAGE_URL_PROVIDER=Vu,t.DirectiveResolver=ju,t.NgModuleResolver=Uu,t.OfflineCompiler=Du,t.PipeResolver=Hu,t.RenderTypes=ta,t.ResourceLoader=Nu,t.RuntimeCompiler=Jl,t.SourceModule=Mu,t.TEMPLATE_TRANSFORMS=Us,t.UrlResolver=Ru,t.createOfflineCompileUrlResolver=createOfflineCompileUrlResolver,t.platformCoreDynamic=fc,t.DEFAULT_INTERPOLATION_CONFIG=Zr,t.InterpolationConfig=Qr,t.ElementSchemaRegistry=is,t.I18NHtmlParser=Fi,t.MessageBundle=ti,t.Xliff=Ci,t.Xmb=Ii,t.Xtb=Ri,t.TextAst=l,t.BoundTextAst=c,t.AttrAst=p,t.BoundElementPropertyAst=h,t.BoundEventAst=f,t.ReferenceAst=d,t.VariableAst=m,t.ElementAst=y,t.EmbeddedTemplateAst=v,t.BoundDirectivePropertyAst=g,t.DirectiveAst=_,t.ProviderAst=b,t.NgContentAst=w,t.templateVisitAll=templateVisitAll,t.__compiler_private__=vc})}).call(t,function(){return this}())},2:function(e,t,r){(function(e){!function(e,n){n(t,r(122),r(8))}(this,function(t,r,n){"use strict";function scheduleMicroTask(e){Zone.current.scheduleMicroTask("scheduleMicrotask",e)}function getTypeNameForDebugging(e){return e.name||typeof e}function isPresent(e){return void 0!==e&&null!==e}function isBlank(e){return void 0===e||null===e}function isString(e){return"string"==typeof e}function isFunction(e){return"function"==typeof e}function isArray(e){return Array.isArray(e)}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 looseIdentical(e,t){return e===t||"number"==typeof e&&"number"==typeof t&&isNaN(e)&&isNaN(t)}function getMapKey(e){return e}function isJsObject(e){return null!==e&&("function"==typeof e||"object"==typeof e)}function print(e){console.log(e)}function warn(e){console.warn(e)}function getSymbolIterator(){if(isBlank(a))if(isPresent(i.Symbol)&&isPresent(Symbol.iterator))a=Symbol.iterator;else for(var e=Object.getOwnPropertyNames(Map.prototype),t=0;t1){var t=findFirstClosedCycle(ne.reversed(e)),r=t.map(function(e){return stringify(e.token)});return" ("+r.join(" -> ")+")"}return""}function convertTsickleDecoratorIntoMetadata(e){return e?e.map(function(e){var t=e.type,r=t.annotationCls,n=e.args?e.args:[];return new(r.bind.apply(r,[void 0].concat(n)))}):[]}function _mergeMaps(e,t){Object.keys(t).forEach(function(r){e.set(r,t[r])})}function resolveReflectiveFactory(e){var t,r;if(isPresent(e.useClass)){var n=resolveForwardRef(e.useClass);t=we.factory(n),r=_dependenciesFor(n)}else isPresent(e.useExisting)?(t=function(e){return e},r=[Ce.fromKey(fe.get(e.useExisting))]):isPresent(e.useFactory)?(t=e.useFactory,r=constructDependencies(e.useFactory,e.deps)):(t=function(){return e.useValue},r=Ee);return new Pe(t,r)}function resolveReflectiveProvider(e){return new Se(fe.get(e.provide),[resolveReflectiveFactory(e)],e.multi)}function resolveReflectiveProviders(e){var t=_normalizeProviders(e,[]),r=t.map(resolveReflectiveProvider);return te.values(mergeResolvedReflectiveProviders(r,new Map))}function mergeResolvedReflectiveProviders(e,t){for(var r=0;r=0;n--){var i=r.nestedViews[n];i.rootNodesOrAppElements.length>0&&(t=_findLastRenderNode(i.rootNodesOrAppElements[i.rootNodesOrAppElements.length-1]))}}else t=e;return t}var i;i="undefined"==typeof window?"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:e:window;var o=i;o.assert=function(e){};var s=function(){function StringWrapper(){}return StringWrapper.fromCharCode=function(e){return String.fromCharCode(e)},StringWrapper.charCodeAt=function(e,t){return e.charCodeAt(t)},StringWrapper.split=function(e,t){return e.split(t)},StringWrapper.equals=function(e,t){return e===t},StringWrapper.stripLeft=function(e,t){if(e&&e.length){for(var r=0,n=0;n=0&&e[n]==t;n--)r--;e=e.substring(0,r)}return e},StringWrapper.replace=function(e,t,r){return e.replace(t,r)},StringWrapper.replaceAll=function(e,t,r){return e.replace(t,r)},StringWrapper.slice=function(e,t,r){return void 0===t&&(t=0),void 0===r&&(r=null),e.slice(t,null===r?void 0:r)},StringWrapper.replaceAllMapped=function(e,t,r){return e.replace(t,function(){for(var e=[],t=0;tt?1:0},StringWrapper}(),a=(function(){function NumberWrapper(){}return NumberWrapper.toFixed=function(e,t){return e.toFixed(t)},NumberWrapper.equal=function(e,t){return e===t},NumberWrapper.parseIntAutoRadix=function(e){var t=parseInt(e);if(isNaN(t))throw new Error("Invalid integer literal when parsing "+e);return t},NumberWrapper.parseInt=function(e,t){if(10==t){if(/^(\-|\+)?[0-9]+$/.test(e))return parseInt(e,t)}else if(16==t){if(/^(\-|\+)?[0-9ABCDEFabcdef]+$/.test(e))return parseInt(e,t)}else{var r=parseInt(e,t);if(!isNaN(r))return r}throw new Error("Invalid integer literal when parsing "+e+" in base "+t)},Object.defineProperty(NumberWrapper,"NaN",{get:function(){return NaN},enumerable:!0,configurable:!0}),NumberWrapper.isNumeric=function(e){return!isNaN(e-parseFloat(e))},NumberWrapper.isNaN=function(e){return isNaN(e)},NumberWrapper.isInteger=function(e){return Number.isInteger(e)},NumberWrapper}(),null),u=0,l=o.Reflect,c=makeParamDecorator("Inject",[["token",void 0]]),p=makeParamDecorator("Optional",[]),h=makeParamDecorator("Injectable",[]),f=makeParamDecorator("Self",[]),d=makeParamDecorator("SkipSelf",[]),m=makeParamDecorator("Host",[]),y=function(){function OpaqueToken(e){this._desc=e}return OpaqueToken.prototype.toString=function(){return"Token "+this._desc},OpaqueToken.decorators=[{type:h}],OpaqueToken.ctorParameters=[null],OpaqueToken}(),v=new y("AnalyzeForEntryComponents"),g=makeParamDecorator("Attribute",[["attributeName",void 0]]),_=function(){function Query(){}return Query}(),b=makePropDecorator("ContentChildren",[["selector",void 0],{first:!1,isViewQuery:!1,descendants:!1,read:void 0}],_),w=makePropDecorator("ContentChild",[["selector",void 0],{first:!0,isViewQuery:!1,descendants:!0,read:void 0}],_),C=makePropDecorator("ViewChildren",[["selector",void 0],{first:!1,isViewQuery:!0,descendants:!0,read:void 0}],_),E=makePropDecorator("ViewChild",[["selector",void 0],{first:!0,isViewQuery:!0,descendants:!0,read:void 0}],_);t.ChangeDetectionStrategy,function(e){e[e.OnPush=0]="OnPush",e[e.Default=1]="Default"}(t.ChangeDetectionStrategy||(t.ChangeDetectionStrategy={}));var S;!function(e){e[e.CheckOnce=0]="CheckOnce",e[e.Checked=1]="Checked",e[e.CheckAlways=2]="CheckAlways",e[e.Detached=3]="Detached",e[e.Errored=4]="Errored",e[e.Destroyed=5]="Destroyed"}(S||(S={}));var P,A=makeDecorator("Directive",{selector:void 0,inputs:void 0,outputs:void 0,host:void 0,providers:void 0,exportAs:void 0,queries:void 0}),x=makeDecorator("Component",{selector:void 0,inputs:void 0,outputs:void 0,host:void 0,exportAs:void 0,moduleId:void 0,providers:void 0,viewProviders:void 0,changeDetection:t.ChangeDetectionStrategy.Default,queries:void 0,templateUrl:void 0,template:void 0,styleUrls:void 0,styles:void 0,animations:void 0,encapsulation:void 0,interpolation:void 0,entryComponents:void 0},A),T=makeDecorator("Pipe",{name:void 0,pure:!0}),M=makePropDecorator("Input",[["bindingPropertyName",void 0]]),I=makePropDecorator("Output",[["bindingPropertyName",void 0]]),D=makePropDecorator("HostBinding",[["hostPropertyName",void 0]]),N=makePropDecorator("HostListener",[["eventName",void 0],["args",[]]]);!function(e){e[e.OnInit=0]="OnInit",e[e.OnDestroy=1]="OnDestroy",e[e.DoCheck=2]="DoCheck",e[e.OnChanges=3]="OnChanges",e[e.AfterContentInit=4]="AfterContentInit",e[e.AfterContentChecked=5]="AfterContentChecked",e[e.AfterViewInit=6]="AfterViewInit",e[e.AfterViewChecked=7]="AfterViewChecked"}(P||(P={}));var O=[P.OnInit,P.OnDestroy,P.DoCheck,P.OnChanges,P.AfterContentInit,P.AfterContentChecked,P.AfterViewInit,P.AfterViewChecked],V=function(){function OnChanges(){}return OnChanges}(),R=function(){function OnInit(){}return OnInit}(),k=function(){function DoCheck(){}return DoCheck}(),L=function(){function OnDestroy(){}return OnDestroy}(),F=function(){function AfterContentInit(){}return AfterContentInit}(),j=function(){function AfterContentChecked(){}return AfterContentChecked}(),B=function(){function AfterViewInit(){}return AfterViewInit}(),W=function(){function AfterViewChecked(){}return AfterViewChecked}(),U={name:"custom-elements"},H={name:"no-errors-schema"},G=makeDecorator("NgModule",{providers:void 0,declarations:void 0,imports:void 0,exports:void 0,entryComponents:void 0,bootstrap:void 0,schemas:void 0,id:void 0});t.ViewEncapsulation,function(e){e[e.Emulated=0]="Emulated",e[e.Native=1]="Native",e[e.None=2]="None"}(t.ViewEncapsulation||(t.ViewEncapsulation={}));var z=function(){function ViewMetadata(e){var t=void 0===e?{}:e,r=t.templateUrl,n=t.template,i=t.encapsulation,o=t.styles,s=t.styleUrls,a=t.animations,u=t.interpolation;this.templateUrl=r,this.template=n,this.styleUrls=s,this.styles=o,this.encapsulation=i,this.animations=a,this.interpolation=u}return ViewMetadata}(),q=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 __)},K=function(e){function BaseError(t){var r=e.call(this,t);this._nativeError=r}return q(BaseError,e),Object.defineProperty(BaseError.prototype,"message",{get:function(){return this._nativeError.message},set:function(e){this._nativeError.message=e},enumerable:!0,configurable:!0}),Object.defineProperty(BaseError.prototype,"name",{get:function(){return this._nativeError.name},enumerable:!0,configurable:!0}),Object.defineProperty(BaseError.prototype,"stack",{get:function(){return this._nativeError.stack},set:function(e){this._nativeError.stack=e},enumerable:!0,configurable:!0}),BaseError.prototype.toString=function(){return this._nativeError.toString()},BaseError}(Error),Q=function(e){function WrappedError(t,r){e.call(this,t+" caused by: "+(r instanceof Error?r.message:r)),this.originalError=r}return q(WrappedError,e),Object.defineProperty(WrappedError.prototype,"stack",{get:function(){return(this.originalError instanceof Error?this.originalError:this._nativeError).stack},enumerable:!0,configurable:!0}),WrappedError}(K),Z=new Object,X=Z,$=function(){function _NullInjector(){}return _NullInjector.prototype.get=function(e,t){if(void 0===t&&(t=Z),t===Z)throw new Error("No provider for "+stringify(e)+"!");return t},_NullInjector}(),J=function(){function Injector(){}return Injector.prototype.get=function(e,t){return unimplemented()},Injector.THROW_IF_NOT_FOUND=Z,Injector.NULL=new $,Injector}(),Y=function(){try{if(1===new Map([[1,2]]).size)return function(e){return new Map(e)}}catch(e){}return function(e){for(var t=new Map,r=0;r-1&&(e.splice(r,1),!0)},ListWrapper.clear=function(e){e.length=0},ListWrapper.isEmpty=function(e){return 0==e.length},ListWrapper.fill=function(e,t,r,n){void 0===r&&(r=0),void 0===n&&(n=null),e.fill(t,r,null===n?e.length:n)},ListWrapper.equals=function(e,t){if(e.length!=t.length)return!1;for(var r=0;rn&&(r=o,n=s)}}return r},ListWrapper.flatten=function(e){var t=[];return _flattenArray(e,t),t},ListWrapper.addAll=function(e,t){for(var r=0;r0&&(this.provider0=t[0],this.keyId0=t[0].key.id),r>1&&(this.provider1=t[1],this.keyId1=t[1].key.id),r>2&&(this.provider2=t[2],this.keyId2=t[2].key.id),r>3&&(this.provider3=t[3],this.keyId3=t[3].key.id),r>4&&(this.provider4=t[4],this.keyId4=t[4].key.id),r>5&&(this.provider5=t[5],this.keyId5=t[5].key.id),r>6&&(this.provider6=t[6],this.keyId6=t[6].key.id),r>7&&(this.provider7=t[7],this.keyId7=t[7].key.id),r>8&&(this.provider8=t[8],this.keyId8=t[8].key.id),r>9&&(this.provider9=t[9],this.keyId9=t[9].key.id)}return ReflectiveProtoInjectorInlineStrategy.prototype.getProviderAtIndex=function(e){if(0==e)return this.provider0;if(1==e)return this.provider1;if(2==e)return this.provider2;if(3==e)return this.provider3;if(4==e)return this.provider4;if(5==e)return this.provider5;if(6==e)return this.provider6;if(7==e)return this.provider7;if(8==e)return this.provider8;if(9==e)return this.provider9;throw new pe(e)},ReflectiveProtoInjectorInlineStrategy.prototype.createInjectorStrategy=function(e){return new De(e,this)},ReflectiveProtoInjectorInlineStrategy}(),Me=function(){function ReflectiveProtoInjectorDynamicStrategy(e,t){this.providers=t;var r=t.length;this.keyIds=new Array(r);for(var n=0;n=this.providers.length)throw new pe(e);return this.providers[e]},ReflectiveProtoInjectorDynamicStrategy.prototype.createInjectorStrategy=function(e){return new Ne(this,e)},ReflectiveProtoInjectorDynamicStrategy}(),Ie=function(){function ReflectiveProtoInjector(e){this.numberOfProviders=e.length,this._strategy=e.length>Ae?new Me(this,e):new Te(this,e)}return ReflectiveProtoInjector.fromResolvedProviders=function(e){return new ReflectiveProtoInjector(e)},ReflectiveProtoInjector.prototype.getProviderAtIndex=function(e){return this._strategy.getProviderAtIndex(e)},ReflectiveProtoInjector}(),De=function(){function ReflectiveInjectorInlineStrategy(e,t){this.injector=e,this.protoStrategy=t,this.obj0=xe,this.obj1=xe,this.obj2=xe,this.obj3=xe,this.obj4=xe,this.obj5=xe,this.obj6=xe,this.obj7=xe,this.obj8=xe,this.obj9=xe}return ReflectiveInjectorInlineStrategy.prototype.resetConstructionCounter=function(){this.injector._constructionCounter=0},ReflectiveInjectorInlineStrategy.prototype.instantiateProvider=function(e){return this.injector._new(e)},ReflectiveInjectorInlineStrategy.prototype.getObjByKeyId=function(e){var t=this.protoStrategy,r=this.injector; return t.keyId0===e?(this.obj0===xe&&(this.obj0=r._new(t.provider0)),this.obj0):t.keyId1===e?(this.obj1===xe&&(this.obj1=r._new(t.provider1)),this.obj1):t.keyId2===e?(this.obj2===xe&&(this.obj2=r._new(t.provider2)),this.obj2):t.keyId3===e?(this.obj3===xe&&(this.obj3=r._new(t.provider3)),this.obj3):t.keyId4===e?(this.obj4===xe&&(this.obj4=r._new(t.provider4)),this.obj4):t.keyId5===e?(this.obj5===xe&&(this.obj5=r._new(t.provider5)),this.obj5):t.keyId6===e?(this.obj6===xe&&(this.obj6=r._new(t.provider6)),this.obj6):t.keyId7===e?(this.obj7===xe&&(this.obj7=r._new(t.provider7)),this.obj7):t.keyId8===e?(this.obj8===xe&&(this.obj8=r._new(t.provider8)),this.obj8):t.keyId9===e?(this.obj9===xe&&(this.obj9=r._new(t.provider9)),this.obj9):xe},ReflectiveInjectorInlineStrategy.prototype.getObjAtIndex=function(e){if(0==e)return this.obj0;if(1==e)return this.obj1;if(2==e)return this.obj2;if(3==e)return this.obj3;if(4==e)return this.obj4;if(5==e)return this.obj5;if(6==e)return this.obj6;if(7==e)return this.obj7;if(8==e)return this.obj8;if(9==e)return this.obj9;throw new pe(e)},ReflectiveInjectorInlineStrategy.prototype.getMaxNumberOfObjects=function(){return Ae},ReflectiveInjectorInlineStrategy}(),Ne=function(){function ReflectiveInjectorDynamicStrategy(e,t){this.protoStrategy=e,this.injector=t,this.objs=new Array(e.providers.length),ne.fill(this.objs,xe)}return ReflectiveInjectorDynamicStrategy.prototype.resetConstructionCounter=function(){this.injector._constructionCounter=0},ReflectiveInjectorDynamicStrategy.prototype.instantiateProvider=function(e){return this.injector._new(e)},ReflectiveInjectorDynamicStrategy.prototype.getObjByKeyId=function(e){for(var t=this.protoStrategy,r=0;r=this.objs.length)throw new pe(e);return this.objs[e]},ReflectiveInjectorDynamicStrategy.prototype.getMaxNumberOfObjects=function(){return this.objs.length},ReflectiveInjectorDynamicStrategy}(),Oe=function(){function ReflectiveInjector(){}return ReflectiveInjector.resolve=function(e){return resolveReflectiveProviders(e)},ReflectiveInjector.resolveAndCreate=function(e,t){void 0===t&&(t=null);var r=ReflectiveInjector.resolve(e);return ReflectiveInjector.fromResolvedProviders(r,t)},ReflectiveInjector.fromResolvedProviders=function(e,t){return void 0===t&&(t=null),new Ve(Ie.fromResolvedProviders(e),t)},Object.defineProperty(ReflectiveInjector.prototype,"parent",{get:function(){return unimplemented()},enumerable:!0,configurable:!0}),ReflectiveInjector.prototype.resolveAndCreateChild=function(e){return unimplemented()},ReflectiveInjector.prototype.createChildFromResolved=function(e){return unimplemented()},ReflectiveInjector.prototype.resolveAndInstantiate=function(e){return unimplemented()},ReflectiveInjector.prototype.instantiateResolved=function(e){return unimplemented()},ReflectiveInjector}(),Ve=function(){function ReflectiveInjector_(e,t){void 0===t&&(t=null),this._constructionCounter=0,this._proto=e,this._parent=t,this._strategy=e._strategy.createInjectorStrategy(this)}return ReflectiveInjector_.prototype.get=function(e,t){return void 0===t&&(t=X),this._getByKey(fe.get(e),null,null,t)},ReflectiveInjector_.prototype.getAt=function(e){return this._strategy.getObjAtIndex(e)},Object.defineProperty(ReflectiveInjector_.prototype,"parent",{get:function(){return this._parent},enumerable:!0,configurable:!0}),Object.defineProperty(ReflectiveInjector_.prototype,"internalStrategy",{get:function(){return this._strategy},enumerable:!0,configurable:!0}),ReflectiveInjector_.prototype.resolveAndCreateChild=function(e){var t=Oe.resolve(e);return this.createChildFromResolved(t)},ReflectiveInjector_.prototype.createChildFromResolved=function(e){var t=new Ie(e),r=new ReflectiveInjector_(t);return r._parent=this,r},ReflectiveInjector_.prototype.resolveAndInstantiate=function(e){return this.instantiateResolved(Oe.resolve([e])[0])},ReflectiveInjector_.prototype.instantiateResolved=function(e){return this._instantiateProvider(e)},ReflectiveInjector_.prototype._new=function(e){if(this._constructionCounter++>this._strategy.getMaxNumberOfObjects())throw new ae(this,e.key);return this._instantiateProvider(e)},ReflectiveInjector_.prototype._instantiateProvider=function(e){if(e.multiProvider){for(var t=new Array(e.resolvedFactories.length),r=0;r0?this._getByReflectiveDependency(e,E[0]):null,n=S>1?this._getByReflectiveDependency(e,E[1]):null,i=S>2?this._getByReflectiveDependency(e,E[2]):null,o=S>3?this._getByReflectiveDependency(e,E[3]):null,s=S>4?this._getByReflectiveDependency(e,E[4]):null,a=S>5?this._getByReflectiveDependency(e,E[5]):null,u=S>6?this._getByReflectiveDependency(e,E[6]):null,l=S>7?this._getByReflectiveDependency(e,E[7]):null,c=S>8?this._getByReflectiveDependency(e,E[8]):null,p=S>9?this._getByReflectiveDependency(e,E[9]):null,h=S>10?this._getByReflectiveDependency(e,E[10]):null,f=S>11?this._getByReflectiveDependency(e,E[11]):null,d=S>12?this._getByReflectiveDependency(e,E[12]):null,m=S>13?this._getByReflectiveDependency(e,E[13]):null,y=S>14?this._getByReflectiveDependency(e,E[14]):null,v=S>15?this._getByReflectiveDependency(e,E[15]):null,g=S>16?this._getByReflectiveDependency(e,E[16]):null,_=S>17?this._getByReflectiveDependency(e,E[17]):null,b=S>18?this._getByReflectiveDependency(e,E[18]):null,w=S>19?this._getByReflectiveDependency(e,E[19]):null}catch(P){throw(P instanceof oe||P instanceof ue)&&P.addKey(this,e.key),P}var A;try{switch(S){case 0:A=C();break;case 1:A=C(r);break;case 2:A=C(r,n);break;case 3:A=C(r,n,i);break;case 4:A=C(r,n,i,o);break;case 5:A=C(r,n,i,o,s);break;case 6:A=C(r,n,i,o,s,a);break;case 7:A=C(r,n,i,o,s,a,u);break;case 8:A=C(r,n,i,o,s,a,u,l);break;case 9:A=C(r,n,i,o,s,a,u,l,c);break;case 10:A=C(r,n,i,o,s,a,u,l,c,p);break;case 11:A=C(r,n,i,o,s,a,u,l,c,p,h);break;case 12:A=C(r,n,i,o,s,a,u,l,c,p,h,f);break;case 13:A=C(r,n,i,o,s,a,u,l,c,p,h,f,d);break;case 14:A=C(r,n,i,o,s,a,u,l,c,p,h,f,d,m);break;case 15:A=C(r,n,i,o,s,a,u,l,c,p,h,f,d,m,y);break;case 16:A=C(r,n,i,o,s,a,u,l,c,p,h,f,d,m,y,v);break;case 17:A=C(r,n,i,o,s,a,u,l,c,p,h,f,d,m,y,v,g);break;case 18:A=C(r,n,i,o,s,a,u,l,c,p,h,f,d,m,y,v,g,_);break;case 19:A=C(r,n,i,o,s,a,u,l,c,p,h,f,d,m,y,v,g,_,b);break;case 20:A=C(r,n,i,o,s,a,u,l,c,p,h,f,d,m,y,v,g,_,b,w);break;default:throw new Error("Cannot instantiate '"+e.key.displayName+"' because it has more than 20 dependencies")}}catch(P){throw new ue(this,P,P.stack,e.key)}return A},ReflectiveInjector_.prototype._getByReflectiveDependency=function(e,t){return this._getByKey(t.key,t.lowerBoundVisibility,t.upperBoundVisibility,t.optional?null:X)},ReflectiveInjector_.prototype._getByKey=function(e,t,r,n){return e===Re?this:r instanceof f?this._getByKeySelf(e,n):this._getByKeyDefault(e,n,t)},ReflectiveInjector_.prototype._throwOrNull=function(e,t){if(t!==X)return t;throw new se(this,e)},ReflectiveInjector_.prototype._getByKeySelf=function(e,t){var r=this._strategy.getObjByKeyId(e.id);return r!==xe?r:this._throwOrNull(e,t)},ReflectiveInjector_.prototype._getByKeyDefault=function(e,t,r){var n;for(n=r instanceof d?this._parent:this;n instanceof ReflectiveInjector_;){var i=n,o=i._strategy.getObjByKeyId(e.id);if(o!==xe)return o;n=i._parent}return null!==n?n.get(e.token,t):this._throwOrNull(e,t)},Object.defineProperty(ReflectiveInjector_.prototype,"displayName",{get:function(){var e=_mapProviders(this,function(e){return' "'+e.key.displayName+'" '}).join(", ");return"ReflectiveInjector(providers: ["+e+"])"},enumerable:!0,configurable:!0}),ReflectiveInjector_.prototype.toString=function(){return this.displayName},ReflectiveInjector_}(),Re=fe.get(J),ke=function(){function ErrorHandler(e){void 0===e&&(e=!0),this._console=console,this.rethrowError=e}return ErrorHandler.prototype.handleError=function(e){var t=this._findOriginalError(e),r=this._findOriginalStack(e),n=this._findContext(e);if(this._console.error("EXCEPTION: "+this._extractMessage(e)),t&&this._console.error("ORIGINAL EXCEPTION: "+this._extractMessage(t)),r&&(this._console.error("ORIGINAL STACKTRACE:"),this._console.error(r)),n&&(this._console.error("ERROR CONTEXT:"),this._console.error(n)),this.rethrowError)throw e},ErrorHandler.prototype._extractMessage=function(e){return e instanceof Error?e.message:e.toString()},ErrorHandler.prototype._findContext=function(e){return e?e.context?e.context:this._findContext(e.originalError):null},ErrorHandler.prototype._findOriginalError=function(e){for(var t=e.originalError;t&&t.originalError;)t=t.originalError;return t},ErrorHandler.prototype._findOriginalStack=function(e){if(!(e instanceof Error))return null;for(var t=e,r=t.stack;t instanceof Error&&t.originalError;)t=t.originalError,t instanceof Error&&t.stack&&(r=t.stack);return r},ErrorHandler}(),Le=new y("Application Initializer"),Fe=function(){function ApplicationInitStatus(e){var t=this;this._done=!1;var r=[];if(e)for(var n=0;n"+stringify(this.currentIndex)+"]"},CollectionChangeRecord}(),tt=function(){function _DuplicateItemRecordList(){this._head=null,this._tail=null}return _DuplicateItemRecordList.prototype.add=function(e){null===this._head?(this._head=this._tail=e,e._nextDup=null,e._prevDup=null):(this._tail._nextDup=e,e._prevDup=this._tail,e._nextDup=null,this._tail=e)},_DuplicateItemRecordList.prototype.get=function(e,t){var r;for(r=this._head;null!==r;r=r._nextDup)if((null===t||t"+stringify(this.currentValue)+"]"},KeyValueChangeRecord}(),st=function(){function IterableDiffers(e){this.factories=e}return IterableDiffers.create=function(e,t){if(isPresent(t)){var r=ne.clone(t.factories);return e=e.concat(r),new IterableDiffers(e)}return new IterableDiffers(e)},IterableDiffers.extend=function(e){return{provide:IterableDiffers,useFactory:function(t){if(!t)throw new Error("Cannot extend IterableDiffers without a parent injector");return IterableDiffers.create(e,t)},deps:[[IterableDiffers,new d,new p]]}},IterableDiffers.prototype.find=function(e){var t=this.factories.find(function(t){return t.supports(e)});if(isPresent(t))return t;throw new Error("Cannot find a differ supporting object '"+e+"' of type '"+getTypeNameForDebugging(e)+"'")},IterableDiffers}(),at=function(){function KeyValueDiffers(e){this.factories=e}return KeyValueDiffers.create=function(e,t){if(isPresent(t)){var r=ne.clone(t.factories);return e=e.concat(r),new KeyValueDiffers(e)}return new KeyValueDiffers(e)},KeyValueDiffers.extend=function(e){return{provide:KeyValueDiffers,useFactory:function(t){if(!t)throw new Error("Cannot extend KeyValueDiffers without a parent injector");return KeyValueDiffers.create(e,t)},deps:[[KeyValueDiffers,new d,new p]]}},KeyValueDiffers.prototype.find=function(e){var t=this.factories.find(function(t){return t.supports(e)});if(isPresent(t))return t;throw new Error("Cannot find a differ supporting object '"+e+"'")},KeyValueDiffers}(),ut={toString:function(){return"CD_INIT_VALUE"}},lt=function(){function WrappedValue(e){this.wrapped=e}return WrappedValue.wrap=function(e){return new WrappedValue(e)},WrappedValue}(),ct=function(){function ValueUnwrapper(){this.hasWrappedValue=!1}return ValueUnwrapper.prototype.unwrap=function(e){return e instanceof lt?(this.hasWrappedValue=!0,e.wrapped):e},ValueUnwrapper.prototype.reset=function(){this.hasWrappedValue=!1},ValueUnwrapper}(),pt=function(){function SimpleChange(e,t){this.previousValue=e,this.currentValue=t}return SimpleChange.prototype.isFirstChange=function(){return this.previousValue===ut},SimpleChange}(),ht=function(){function ChangeDetectorRef(){}return ChangeDetectorRef}(),ft=[new nt],dt=[new $e],mt=new st(dt),yt=new at(ft),vt=function(){function RenderComponentType(e,t,r,n,i,o){this.id=e,this.templateUrl=t,this.slotCount=r,this.encapsulation=n,this.styles=i,this.animations=o}return RenderComponentType}(),gt=function(){function RenderDebugInfo(){}return Object.defineProperty(RenderDebugInfo.prototype,"injector",{get:function(){return unimplemented()},enumerable:!0,configurable:!0}),Object.defineProperty(RenderDebugInfo.prototype,"component",{get:function(){return unimplemented()},enumerable:!0,configurable:!0}),Object.defineProperty(RenderDebugInfo.prototype,"providerTokens",{get:function(){return unimplemented()},enumerable:!0,configurable:!0}),Object.defineProperty(RenderDebugInfo.prototype,"references",{get:function(){return unimplemented()},enumerable:!0,configurable:!0}),Object.defineProperty(RenderDebugInfo.prototype,"context",{get:function(){return unimplemented()},enumerable:!0,configurable:!0}),Object.defineProperty(RenderDebugInfo.prototype,"source",{get:function(){return unimplemented()},enumerable:!0,configurable:!0}),RenderDebugInfo}(),_t=function(){function Renderer(){}return Renderer}(),bt=function(){function RootRenderer(){}return RootRenderer}();t.SecurityContext,function(e){e[e.NONE=0]="NONE",e[e.HTML=1]="HTML",e[e.STYLE=2]="STYLE",e[e.SCRIPT=3]="SCRIPT",e[e.URL=4]="URL",e[e.RESOURCE_URL=5]="RESOURCE_URL"}(t.SecurityContext||(t.SecurityContext={}));var wt,Ct,Et,St=function(){function Sanitizer(){}return Sanitizer}(),Pt=function(){function ElementRef(e){this.nativeElement=e}return ElementRef}(),At=detectWTF(),xt=At?createScope:function(e,t){return noopScope},Tt=At?leave:function(e,t){return t},Mt=At?startTimeRange:function(e,t){return null},It=At?endTimeRange:function(e){return null},Dt=function(){function ViewContainerRef(){}return Object.defineProperty(ViewContainerRef.prototype,"element",{get:function(){return unimplemented()},enumerable:!0,configurable:!0}),Object.defineProperty(ViewContainerRef.prototype,"injector",{get:function(){return unimplemented()},enumerable:!0,configurable:!0}),Object.defineProperty(ViewContainerRef.prototype,"parentInjector",{get:function(){return unimplemented()},enumerable:!0,configurable:!0}),Object.defineProperty(ViewContainerRef.prototype,"length",{get:function(){return unimplemented()},enumerable:!0,configurable:!0}),ViewContainerRef}(),Nt=function(){function ViewContainerRef_(e){this._element=e,this._createComponentInContainerScope=xt("ViewContainerRef#createComponent()"),this._insertScope=xt("ViewContainerRef#insert()"),this._removeScope=xt("ViewContainerRef#remove()"),this._detachScope=xt("ViewContainerRef#detach()")}return ViewContainerRef_.prototype.get=function(e){return this._element.nestedViews[e].ref},Object.defineProperty(ViewContainerRef_.prototype,"length",{get:function(){var e=this._element.nestedViews;return isPresent(e)?e.length:0},enumerable:!0,configurable:!0}),Object.defineProperty(ViewContainerRef_.prototype,"element",{get:function(){return this._element.elementRef},enumerable:!0,configurable:!0}),Object.defineProperty(ViewContainerRef_.prototype,"injector",{get:function(){return this._element.injector},enumerable:!0,configurable:!0}),Object.defineProperty(ViewContainerRef_.prototype,"parentInjector",{ get:function(){return this._element.parentInjector},enumerable:!0,configurable:!0}),ViewContainerRef_.prototype.createEmbeddedView=function(e,t,r){void 0===t&&(t=null),void 0===r&&(r=-1);var n=e.createEmbeddedView(t);return this.insert(n,r),n},ViewContainerRef_.prototype.createComponent=function(e,t,r,n){void 0===t&&(t=-1),void 0===r&&(r=null),void 0===n&&(n=null);var i=this._createComponentInContainerScope(),o=isPresent(r)?r:this._element.parentInjector,s=e.create(o,n);return this.insert(s.hostView,t),Tt(i,s)},ViewContainerRef_.prototype.insert=function(e,t){void 0===t&&(t=-1);var r=this._insertScope();t==-1&&(t=this.length);var n=e;return this._element.attachView(n.internalView,t),Tt(r,n)},ViewContainerRef_.prototype.move=function(e,t){var r=this._insertScope();if(t!=-1){var n=e;return this._element.moveView(n.internalView,t),Tt(r,n)}},ViewContainerRef_.prototype.indexOf=function(e){return ne.indexOf(this._element.nestedViews,e.internalView)},ViewContainerRef_.prototype.remove=function(e){void 0===e&&(e=-1);var t=this._removeScope();e==-1&&(e=this.length-1);var r=this._element.detachView(e);r.destroy(),Tt(t)},ViewContainerRef_.prototype.detach=function(e){void 0===e&&(e=-1);var t=this._detachScope();e==-1&&(e=this.length-1);var r=this._element.detachView(e);return Tt(t,r.ref)},ViewContainerRef_.prototype.clear=function(){for(var e=this.length-1;e>=0;e--)this.remove(e)},ViewContainerRef_}();!function(e){e[e.HOST=0]="HOST",e[e.COMPONENT=1]="COMPONENT",e[e.EMBEDDED=2]="EMBEDDED"}(Et||(Et={}));var Ot,Vt=function(){function AppElement(e,t,r,n){this.index=e,this.parentIndex=t,this.parentView=r,this.nativeElement=n,this.nestedViews=null,this.componentView=null}return Object.defineProperty(AppElement.prototype,"elementRef",{get:function(){return new Pt(this.nativeElement)},enumerable:!0,configurable:!0}),Object.defineProperty(AppElement.prototype,"vcRef",{get:function(){return new Nt(this)},enumerable:!0,configurable:!0}),AppElement.prototype.initComponent=function(e,t,r){this.component=e,this.componentConstructorViewQueries=t,this.componentView=r},Object.defineProperty(AppElement.prototype,"parentInjector",{get:function(){return this.parentView.injector(this.parentIndex)},enumerable:!0,configurable:!0}),Object.defineProperty(AppElement.prototype,"injector",{get:function(){return this.parentView.injector(this.index)},enumerable:!0,configurable:!0}),AppElement.prototype.mapNestedViews=function(e,t){var r=[];return isPresent(this.nestedViews)&&this.nestedViews.forEach(function(n){n.clazz===e&&r.push(t(n))}),r},AppElement.prototype.moveView=function(e,t){var r=this.nestedViews.indexOf(e);if(e.type===Et.COMPONENT)throw new Error("Component views can't be moved!");var n=this.nestedViews;null==n&&(n=[],this.nestedViews=n),ne.removeAt(n,r),ne.insert(n,t,e);var i;if(t>0){var o=n[t-1];i=o.lastRootNode}else i=this.nativeElement;isPresent(i)&&e.renderer.attachViewAfter(i,e.flatRootNodes),e.markContentChildAsMoved(this)},AppElement.prototype.attachView=function(e,t){if(e.type===Et.COMPONENT)throw new Error("Component views can't be moved!");var r=this.nestedViews;null==r&&(r=[],this.nestedViews=r),ne.insert(r,t,e);var n;if(t>0){var i=r[t-1];n=i.lastRootNode}else n=this.nativeElement;isPresent(n)&&e.renderer.attachViewAfter(n,e.flatRootNodes),e.addToContentChildren(this)},AppElement.prototype.detachView=function(e){var t=ne.removeAt(this.nestedViews,e);if(t.type===Et.COMPONENT)throw new Error("Component views can't be moved!");return t.detach(),t.removeFromContentChildren(this),t},AppElement}(),Rt=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 __)},kt=function(e){function ExpressionChangedAfterItHasBeenCheckedError(t,r){var n="Expression has changed after it was checked. Previous value: '"+t+"'. Current value: '"+r+"'.";t===ut&&(n+=" It seems like the view has been created after its parent and its children have been dirty checked. Has it been created in a change detection hook ?"),e.call(this,n)}return Rt(ExpressionChangedAfterItHasBeenCheckedError,e),ExpressionChangedAfterItHasBeenCheckedError}(K),Lt=function(e){function ViewWrappedError(t,r){e.call(this,"Error in "+r.source,t),this.context=r}return Rt(ViewWrappedError,e),ViewWrappedError}(Q),Ft=function(e){function ViewDestroyedError(t){e.call(this,"Attempt to use a destroyed view: "+t)}return Rt(ViewDestroyedError,e),ViewDestroyedError}(K),jt=function(){function ViewUtils(e,t,r){this._renderer=e,this._appId=t,this._nextCompTypeId=0,this.sanitizer=r}return ViewUtils.prototype.createRenderComponentType=function(e,t,r,n,i){return new vt(this._appId+"-"+this._nextCompTypeId++,e,t,r,n,i)},ViewUtils.prototype.renderComponent=function(e){return this._renderer.renderComponent(e)},ViewUtils.decorators=[{type:h}],ViewUtils.ctorParameters=[{type:bt},{type:void 0,decorators:[{type:c,args:[je]}]},{type:St}],ViewUtils}(),Bt=[],Wt=9,Ut=[],Ht={},Gt=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 __)},zt=function(){function ComponentRef(){}return Object.defineProperty(ComponentRef.prototype,"location",{get:function(){return unimplemented()},enumerable:!0,configurable:!0}),Object.defineProperty(ComponentRef.prototype,"injector",{get:function(){return unimplemented()},enumerable:!0,configurable:!0}),Object.defineProperty(ComponentRef.prototype,"instance",{get:function(){return unimplemented()},enumerable:!0,configurable:!0}),Object.defineProperty(ComponentRef.prototype,"hostView",{get:function(){return unimplemented()},enumerable:!0,configurable:!0}),Object.defineProperty(ComponentRef.prototype,"changeDetectorRef",{get:function(){return unimplemented()},enumerable:!0,configurable:!0}),Object.defineProperty(ComponentRef.prototype,"componentType",{get:function(){return unimplemented()},enumerable:!0,configurable:!0}),ComponentRef}(),qt=function(e){function ComponentRef_(t,r){e.call(this),this._hostElement=t,this._componentType=r}return Gt(ComponentRef_,e),Object.defineProperty(ComponentRef_.prototype,"location",{get:function(){return this._hostElement.elementRef},enumerable:!0,configurable:!0}),Object.defineProperty(ComponentRef_.prototype,"injector",{get:function(){return this._hostElement.injector},enumerable:!0,configurable:!0}),Object.defineProperty(ComponentRef_.prototype,"instance",{get:function(){return this._hostElement.component},enumerable:!0,configurable:!0}),Object.defineProperty(ComponentRef_.prototype,"hostView",{get:function(){return this._hostElement.parentView.ref},enumerable:!0,configurable:!0}),Object.defineProperty(ComponentRef_.prototype,"changeDetectorRef",{get:function(){return this._hostElement.parentView.ref},enumerable:!0,configurable:!0}),Object.defineProperty(ComponentRef_.prototype,"componentType",{get:function(){return this._componentType},enumerable:!0,configurable:!0}),ComponentRef_.prototype.destroy=function(){this._hostElement.parentView.destroy()},ComponentRef_.prototype.onDestroy=function(e){this.hostView.onDestroy(e)},ComponentRef_}(zt),Kt=new Object,Qt=function(){function ComponentFactory(e,t,r){this.selector=e,this._viewFactory=t,this._componentType=r}return Object.defineProperty(ComponentFactory.prototype,"componentType",{get:function(){return this._componentType},enumerable:!0,configurable:!0}),ComponentFactory.prototype.create=function(e,t,r){void 0===t&&(t=null),void 0===r&&(r=null);var n=e.get(jt);t||(t=[]);var i=this._viewFactory(n,e,null),o=i.create(Kt,t,r);return new qt(o,this._componentType)},ComponentFactory}(),Zt=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 __)},Xt=function(e){function NoComponentFactoryError(t){e.call(this,"No component factory found for "+stringify(t)),this.component=t}return Zt(NoComponentFactoryError,e),NoComponentFactoryError}(K),$t=function(){function _NullComponentFactoryResolver(){}return _NullComponentFactoryResolver.prototype.resolveComponentFactory=function(e){throw new Xt(e)},_NullComponentFactoryResolver}(),Jt=function(){function ComponentFactoryResolver(){}return ComponentFactoryResolver.NULL=new $t,ComponentFactoryResolver}(),Yt=function(){function CodegenComponentFactoryResolver(e,t){this._parent=t,this._factories=new Map;for(var r=0;r0)e.bootstrapFactories.forEach(function(e){return t.bootstrap(e)});else{if(!e.instance.ngDoBootstrap)throw new Error("The module "+stringify(e.instance.constructor)+' was bootstrapped, but it does not declare "@NgModule.bootstrap" components nor a "ngDoBootstrap" method. Please define one of these.');e.instance.ngDoBootstrap(t)}},PlatformRef_.decorators=[{type:h}],PlatformRef_.ctorParameters=[{type:J}],PlatformRef_}(pr),fr=function(){function ApplicationRef(){}return Object.defineProperty(ApplicationRef.prototype,"componentTypes",{get:function(){return unimplemented()},enumerable:!0,configurable:!0}),Object.defineProperty(ApplicationRef.prototype,"components",{get:function(){return unimplemented()},enumerable:!0,configurable:!0}),ApplicationRef}(),dr=function(e){function ApplicationRef_(t,r,n,i,o,s,a,u){var l=this;e.call(this),this._zone=t,this._console=r,this._injector=n,this._exceptionHandler=i,this._componentFactoryResolver=o,this._initStatus=s,this._testabilityRegistry=a,this._testability=u,this._bootstrapListeners=[],this._rootComponents=[],this._rootComponentTypes=[],this._changeDetectorRefs=[],this._runningTick=!1,this._enforceNoNewChanges=!1,this._enforceNoNewChanges=isDevMode(),this._zone.onMicrotaskEmpty.subscribe({next:function(){l._zone.run(function(){l.tick()})}})}return ur(ApplicationRef_,e),ApplicationRef_.prototype.registerChangeDetector=function(e){this._changeDetectorRefs.push(e)},ApplicationRef_.prototype.unregisterChangeDetector=function(e){ne.remove(this._changeDetectorRefs,e)},ApplicationRef_.prototype.bootstrap=function(e){var t=this;if(!this._initStatus.done)throw new Error("Cannot bootstrap as there are still asynchronous initializers running. Bootstrap components in the `ngDoBootstrap` method of the root module.");var r;r=e instanceof Qt?e:this._componentFactoryResolver.resolveComponentFactory(e),this._rootComponentTypes.push(r.componentType);var n=r.create(this._injector,[],r.selector);n.onDestroy(function(){t._unloadComponent(n)});var i=n.injector.get(ir,null);return i&&n.injector.get(or).registerApplication(n.location.nativeElement,i),this._loadComponent(n),isDevMode()&&this._console.log("Angular 2 is running in the development mode. Call enableProdMode() to enable the production mode."),n},ApplicationRef_.prototype._loadComponent=function(e){this._changeDetectorRefs.push(e.changeDetectorRef),this.tick(),this._rootComponents.push(e);var t=this._injector.get(Ue,[]).concat(this._bootstrapListeners);t.forEach(function(t){return t(e)})},ApplicationRef_.prototype._unloadComponent=function(e){this._rootComponents.indexOf(e)!=-1&&(this.unregisterChangeDetector(e.changeDetectorRef),ne.remove(this._rootComponents,e))},ApplicationRef_.prototype.tick=function(){if(this._runningTick)throw new Error("ApplicationRef.tick is called recursively");var e=ApplicationRef_._tickScope();try{this._runningTick=!0,this._changeDetectorRefs.forEach(function(e){return e.detectChanges()}),this._enforceNoNewChanges&&this._changeDetectorRefs.forEach(function(e){return e.checkNoChanges()})}finally{this._runningTick=!1,Tt(e)}},ApplicationRef_.prototype.ngOnDestroy=function(){this._rootComponents.slice().forEach(function(e){return e.destroy()})},Object.defineProperty(ApplicationRef_.prototype,"componentTypes",{get:function(){return this._rootComponentTypes},enumerable:!0,configurable:!0}),Object.defineProperty(ApplicationRef_.prototype,"components",{get:function(){return this._rootComponents},enumerable:!0,configurable:!0}),ApplicationRef_._tickScope=xt("ApplicationRef#tick()"),ApplicationRef_.decorators=[{type:h}],ApplicationRef_.ctorParameters=[{type:nr},{type:Ge},{type:J},{type:ke},{type:Jt},{type:Fe},{type:or,decorators:[{type:p}]},{type:ir,decorators:[{type:p}]}],ApplicationRef_}(fr),mr=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 __)},yr=function(){function NgModuleRef(){}return Object.defineProperty(NgModuleRef.prototype,"injector",{get:function(){return unimplemented()},enumerable:!0,configurable:!0}),Object.defineProperty(NgModuleRef.prototype,"componentFactoryResolver",{get:function(){return unimplemented()},enumerable:!0,configurable:!0}),Object.defineProperty(NgModuleRef.prototype,"instance",{get:function(){return unimplemented()},enumerable:!0,configurable:!0}),NgModuleRef}(),vr=function(){function NgModuleFactory(e,t){this._injectorClass=e,this._moduleType=t}return Object.defineProperty(NgModuleFactory.prototype,"moduleType",{get:function(){return this._moduleType},enumerable:!0,configurable:!0}),NgModuleFactory.prototype.create=function(e){e||(e=J.NULL);var t=new this._injectorClass(e);return t.create(),t},NgModuleFactory}(),gr=new Object,_r=function(e){function NgModuleInjector(t,r,n){e.call(this,r,t.get(Jt,Jt.NULL)),this.parent=t,this.bootstrapFactories=n,this._destroyListeners=[],this._destroyed=!1}return mr(NgModuleInjector,e),NgModuleInjector.prototype.create=function(){this.instance=this.createInternal()},NgModuleInjector.prototype.get=function(e,t){if(void 0===t&&(t=X),e===J||e===Jt)return this;var r=this.getInternal(e,gr);return r===gr?this.parent.get(e,t):r},Object.defineProperty(NgModuleInjector.prototype,"injector",{get:function(){return this},enumerable:!0,configurable:!0}),Object.defineProperty(NgModuleInjector.prototype,"componentFactoryResolver",{get:function(){return this},enumerable:!0,configurable:!0}),NgModuleInjector.prototype.destroy=function(){if(this._destroyed)throw new Error("The ng module "+stringify(this.instance.constructor)+" has already been destroyed.");this._destroyed=!0,this.destroyInternal(),this._destroyListeners.forEach(function(e){return e()})},NgModuleInjector.prototype.onDestroy=function(e){this._destroyListeners.push(e)},NgModuleInjector}(Yt),br=function(){function NgModuleFactoryLoader(){}return NgModuleFactoryLoader}(),wr=new Map,Cr=function(){function QueryList(){this._dirty=!0,this._results=[],this._emitter=new tr}return Object.defineProperty(QueryList.prototype,"changes",{get:function(){return this._emitter},enumerable:!0,configurable:!0}),Object.defineProperty(QueryList.prototype,"length",{get:function(){return this._results.length},enumerable:!0,configurable:!0}),Object.defineProperty(QueryList.prototype,"first",{get:function(){return this._results[0]},enumerable:!0,configurable:!0}),Object.defineProperty(QueryList.prototype,"last",{get:function(){return this._results[this.length-1]},enumerable:!0,configurable:!0}),QueryList.prototype.map=function(e){return this._results.map(e)},QueryList.prototype.filter=function(e){return this._results.filter(e)},QueryList.prototype.reduce=function(e,t){return this._results.reduce(e,t)},QueryList.prototype.forEach=function(e){this._results.forEach(e)},QueryList.prototype.some=function(e){return this._results.some(e)},QueryList.prototype.toArray=function(){return this._results.slice()},QueryList.prototype[getSymbolIterator()]=function(){return this._results[getSymbolIterator()]()},QueryList.prototype.toString=function(){return this._results.toString()},QueryList.prototype.reset=function(e){this._results=ne.flatten(e),this._dirty=!1},QueryList.prototype.notifyOnChanges=function(){this._emitter.emit(this)},QueryList.prototype.setDirty=function(){this._dirty=!0},Object.defineProperty(QueryList.prototype,"dirty",{get:function(){return this._dirty},enumerable:!0,configurable:!0}),QueryList}(),Er="#",Sr="NgFactory",Pr=function(){function SystemJsNgModuleLoaderConfig(){}return SystemJsNgModuleLoaderConfig}(),Ar={factoryPathPrefix:"",factoryPathSuffix:".ngfactory"},xr=function(){function SystemJsNgModuleLoader(e,t){this._compiler=e,this._config=t||Ar}return SystemJsNgModuleLoader.prototype.load=function(e){var t=this._compiler instanceof Qe;return t?this.loadFactory(e):this.loadAndCompile(e)},SystemJsNgModuleLoader.prototype.loadAndCompile=function(e){var t=this,r=e.split(Er),n=r[0],i=r[1];return void 0===i&&(i="default"),System.import(n).then(function(e){return e[i]}).then(function(e){return checkNotEmpty(e,n,i)}).then(function(e){return t._compiler.compileModuleAsync(e)})},SystemJsNgModuleLoader.prototype.loadFactory=function(e){var t=e.split(Er),r=t[0],n=t[1],i=Sr;return void 0===n&&(n="default",i=""),System.import(this._config.factoryPathPrefix+r+this._config.factoryPathSuffix).then(function(e){return e[n+i]}).then(function(e){return checkNotEmpty(e,r,n)})},SystemJsNgModuleLoader.decorators=[{type:h}],SystemJsNgModuleLoader.ctorParameters=[{type:Qe},{type:Pr,decorators:[{type:p}]}],SystemJsNgModuleLoader}(),Tr=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 __)},Mr=function(){function TemplateRef(){}return Object.defineProperty(TemplateRef.prototype,"elementRef",{get:function(){return null},enumerable:!0,configurable:!0}),TemplateRef}(),Ir=function(e){function TemplateRef_(t,r){e.call(this),this._appElement=t,this._viewFactory=r}return Tr(TemplateRef_,e),TemplateRef_.prototype.createEmbeddedView=function(e){var t=this._viewFactory(this._appElement.parentView.viewUtils,this._appElement.parentInjector,this._appElement);return t.create(e||{},null,null),t.ref},Object.defineProperty(TemplateRef_.prototype,"elementRef",{get:function(){return this._appElement.elementRef},enumerable:!0,configurable:!0}),TemplateRef_}(Mr),Dr=[],Nr=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 __)},Or=function(){function ViewRef(){}return Object.defineProperty(ViewRef.prototype,"destroyed",{get:function(){return unimplemented()},enumerable:!0,configurable:!0}),ViewRef}(),Vr=function(e){function EmbeddedViewRef(){e.apply(this,arguments)}return Nr(EmbeddedViewRef,e),Object.defineProperty(EmbeddedViewRef.prototype,"context",{get:function(){return unimplemented()},enumerable:!0,configurable:!0}),Object.defineProperty(EmbeddedViewRef.prototype,"rootNodes",{get:function(){return unimplemented()},enumerable:!0,configurable:!0}),EmbeddedViewRef}(Or),Rr=function(){function ViewRef_(e){this._view=e,this._view=e,this._originalMode=this._view.cdMode}return Object.defineProperty(ViewRef_.prototype,"internalView",{get:function(){return this._view},enumerable:!0,configurable:!0}),Object.defineProperty(ViewRef_.prototype,"rootNodes",{get:function(){return this._view.flatRootNodes},enumerable:!0,configurable:!0}),Object.defineProperty(ViewRef_.prototype,"context",{get:function(){return this._view.context},enumerable:!0,configurable:!0}),Object.defineProperty(ViewRef_.prototype,"destroyed",{get:function(){return this._view.destroyed},enumerable:!0,configurable:!0}),ViewRef_.prototype.markForCheck=function(){this._view.markPathToRootAsCheckOnce()},ViewRef_.prototype.detach=function(){this._view.cdMode=S.Detached},ViewRef_.prototype.detectChanges=function(){this._view.detectChanges(!1),triggerQueuedAnimations()},ViewRef_.prototype.checkNoChanges=function(){this._view.detectChanges(!0)},ViewRef_.prototype.reattach=function(){this._view.cdMode=this._originalMode,this.markForCheck()},ViewRef_.prototype.onDestroy=function(e){this._view.disposables.push(e)},ViewRef_.prototype.destroy=function(){this._view.destroy()},ViewRef_}(),kr=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 __)},Lr=function(){function EventListener(e,t){this.name=e,this.callback=t}return EventListener}(),Fr=function(){function DebugNode(e,t,r){this._debugInfo=r,this.nativeNode=e,isPresent(t)&&t instanceof jr?t.addChild(this):this.parent=null,this.listeners=[]}return Object.defineProperty(DebugNode.prototype,"injector",{get:function(){return isPresent(this._debugInfo)?this._debugInfo.injector:null},enumerable:!0,configurable:!0}),Object.defineProperty(DebugNode.prototype,"componentInstance",{get:function(){return isPresent(this._debugInfo)?this._debugInfo.component:null},enumerable:!0,configurable:!0}),Object.defineProperty(DebugNode.prototype,"context",{get:function(){return isPresent(this._debugInfo)?this._debugInfo.context:null},enumerable:!0,configurable:!0}),Object.defineProperty(DebugNode.prototype,"references",{get:function(){return isPresent(this._debugInfo)?this._debugInfo.references:null},enumerable:!0,configurable:!0}),Object.defineProperty(DebugNode.prototype,"providerTokens",{get:function(){return isPresent(this._debugInfo)?this._debugInfo.providerTokens:null},enumerable:!0,configurable:!0}),Object.defineProperty(DebugNode.prototype,"source",{get:function(){return isPresent(this._debugInfo)?this._debugInfo.source:null},enumerable:!0,configurable:!0}),DebugNode}(),jr=function(e){function DebugElement(t,r,n){e.call(this,t,r,n), this.properties={},this.attributes={},this.classes={},this.styles={},this.childNodes=[],this.nativeElement=t}return kr(DebugElement,e),DebugElement.prototype.addChild=function(e){isPresent(e)&&(this.childNodes.push(e),e.parent=this)},DebugElement.prototype.removeChild=function(e){var t=this.childNodes.indexOf(e);t!==-1&&(e.parent=null,this.childNodes.splice(t,1))},DebugElement.prototype.insertChildrenAfter=function(e,t){var r=this.childNodes.indexOf(e);if(r!==-1){var n=this.childNodes.slice(0,r+1),i=this.childNodes.slice(r+1);this.childNodes=ne.concat(ne.concat(n,t),i);for(var o=0;o0?t[0]:null},DebugElement.prototype.queryAll=function(e){var t=[];return _queryElementChildren(this,e,t),t},DebugElement.prototype.queryAllNodes=function(e){var t=[];return _queryNodeChildren(this,e,t),t},Object.defineProperty(DebugElement.prototype,"children",{get:function(){var e=[];return this.childNodes.forEach(function(t){t instanceof DebugElement&&e.push(t)}),e},enumerable:!0,configurable:!0}),DebugElement.prototype.triggerEventHandler=function(e,t){this.listeners.forEach(function(r){r.name==e&&r.callback(t)})},DebugElement}(Fr),Br=new Map,Wr=[hr,{provide:pr,useExisting:hr},{provide:be,useFactory:_reflector,deps:[]},{provide:ge,useExisting:be},or,Ge],Ur=createPlatformFactory(null,"core",Wr),Hr=new y("LocaleId"),Gr=new y("Translations"),zr=new y("TranslationsFormat"),qr=function(){function ApplicationModule(){}return ApplicationModule.decorators=[{type:G,args:[{providers:[dr,{provide:fr,useExisting:dr},Fe,Qe,Be,jt,{provide:st,useFactory:_iterableDiffersFactory},{provide:at,useFactory:_keyValueDiffersFactory},{provide:Hr,useValue:"en-US"}]}]}],ApplicationModule.ctorParameters=[],ApplicationModule}(),Kr="true",Qr="*",Zr="*",Xr="void",$r=o.Math,Jr=function(){function AnimationGroupPlayer(e){var t=this;this._players=e,this._onDoneFns=[],this._onStartFns=[],this._finished=!1,this._started=!1,this.parentPlayer=null;var r=0,n=this._players.length;0==n?scheduleMicroTask(function(){return t._onFinish()}):this._players.forEach(function(e){e.parentPlayer=t,e.onDone(function(){++r>=n&&t._onFinish()})})}return AnimationGroupPlayer.prototype._onFinish=function(){this._finished||(this._finished=!0,isPresent(this.parentPlayer)||this.destroy(),this._onDoneFns.forEach(function(e){return e()}),this._onDoneFns=[])},AnimationGroupPlayer.prototype.init=function(){this._players.forEach(function(e){return e.init()})},AnimationGroupPlayer.prototype.onStart=function(e){this._onStartFns.push(e)},AnimationGroupPlayer.prototype.onDone=function(e){this._onDoneFns.push(e)},AnimationGroupPlayer.prototype.hasStarted=function(){return this._started},AnimationGroupPlayer.prototype.play=function(){isPresent(this.parentPlayer)||this.init(),this.hasStarted()||(this._onStartFns.forEach(function(e){return e()}),this._onStartFns=[],this._started=!0),this._players.forEach(function(e){return e.play()})},AnimationGroupPlayer.prototype.pause=function(){this._players.forEach(function(e){return e.pause()})},AnimationGroupPlayer.prototype.restart=function(){this._players.forEach(function(e){return e.restart()})},AnimationGroupPlayer.prototype.finish=function(){this._onFinish(),this._players.forEach(function(e){return e.finish()})},AnimationGroupPlayer.prototype.destroy=function(){this._onFinish(),this._players.forEach(function(e){return e.destroy()})},AnimationGroupPlayer.prototype.reset=function(){this._players.forEach(function(e){return e.reset()})},AnimationGroupPlayer.prototype.setPosition=function(e){this._players.forEach(function(t){t.setPosition(e)})},AnimationGroupPlayer.prototype.getPosition=function(){var e=0;return this._players.forEach(function(t){var r=t.getPosition();e=$r.min(r,e)}),e},AnimationGroupPlayer}(),Yr=function(){function AnimationKeyframe(e,t){this.offset=e,this.styles=t}return AnimationKeyframe}(),en=function(){function AnimationPlayer(){}return Object.defineProperty(AnimationPlayer.prototype,"parentPlayer",{get:function(){throw new Error("NOT IMPLEMENTED: Base Class")},set:function(e){throw new Error("NOT IMPLEMENTED: Base Class")},enumerable:!0,configurable:!0}),AnimationPlayer}(),tn=function(){function NoOpAnimationPlayer(){var e=this;this._onDoneFns=[],this._onStartFns=[],this._started=!1,this.parentPlayer=null,scheduleMicroTask(function(){return e._onFinish()})}return NoOpAnimationPlayer.prototype._onFinish=function(){this._onDoneFns.forEach(function(e){return e()}),this._onDoneFns=[]},NoOpAnimationPlayer.prototype.onStart=function(e){this._onStartFns.push(e)},NoOpAnimationPlayer.prototype.onDone=function(e){this._onDoneFns.push(e)},NoOpAnimationPlayer.prototype.hasStarted=function(){return this._started},NoOpAnimationPlayer.prototype.init=function(){},NoOpAnimationPlayer.prototype.play=function(){this.hasStarted()||(this._onStartFns.forEach(function(e){return e()}),this._onStartFns=[]),this._started=!0},NoOpAnimationPlayer.prototype.pause=function(){},NoOpAnimationPlayer.prototype.restart=function(){},NoOpAnimationPlayer.prototype.finish=function(){this._onFinish()},NoOpAnimationPlayer.prototype.destroy=function(){},NoOpAnimationPlayer.prototype.reset=function(){},NoOpAnimationPlayer.prototype.setPosition=function(e){},NoOpAnimationPlayer.prototype.getPosition=function(){return 0},NoOpAnimationPlayer}(),rn=function(){function AnimationSequencePlayer(e){var t=this;this._players=e,this._currentIndex=0,this._onDoneFns=[],this._onStartFns=[],this._finished=!1,this._started=!1,this.parentPlayer=null,this._players.forEach(function(e){e.parentPlayer=t}),this._onNext(!1)}return AnimationSequencePlayer.prototype._onNext=function(e){var t=this;if(!this._finished)if(0==this._players.length)this._activePlayer=new tn,scheduleMicroTask(function(){return t._onFinish()});else if(this._currentIndex>=this._players.length)this._activePlayer=new tn,this._onFinish();else{var r=this._players[this._currentIndex++];r.onDone(function(){return t._onNext(!0)}),this._activePlayer=r,e&&r.play()}},AnimationSequencePlayer.prototype._onFinish=function(){this._finished||(this._finished=!0,isPresent(this.parentPlayer)||this.destroy(),this._onDoneFns.forEach(function(e){return e()}),this._onDoneFns=[])},AnimationSequencePlayer.prototype.init=function(){this._players.forEach(function(e){return e.init()})},AnimationSequencePlayer.prototype.onStart=function(e){this._onStartFns.push(e)},AnimationSequencePlayer.prototype.onDone=function(e){this._onDoneFns.push(e)},AnimationSequencePlayer.prototype.hasStarted=function(){return this._started},AnimationSequencePlayer.prototype.play=function(){isPresent(this.parentPlayer)||this.init(),this.hasStarted()||(this._onStartFns.forEach(function(e){return e()}),this._onStartFns=[],this._started=!0),this._activePlayer.play()},AnimationSequencePlayer.prototype.pause=function(){this._activePlayer.pause()},AnimationSequencePlayer.prototype.restart=function(){this._players.length>0&&(this.reset(),this._players[0].restart())},AnimationSequencePlayer.prototype.reset=function(){this._players.forEach(function(e){return e.reset()})},AnimationSequencePlayer.prototype.finish=function(){this._onFinish(),this._players.forEach(function(e){return e.finish()})},AnimationSequencePlayer.prototype.destroy=function(){this._onFinish(),this._players.forEach(function(e){return e.destroy()})},AnimationSequencePlayer.prototype.setPosition=function(e){this._players[0].setPosition(e)},AnimationSequencePlayer.prototype.getPosition=function(){return this._players[0].getPosition()},AnimationSequencePlayer}(),nn=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 __)},on="*",sn=function(){function AnimationEntryMetadata(e,t){this.name=e,this.definitions=t}return AnimationEntryMetadata}(),an=function(){function AnimationStateMetadata(){}return AnimationStateMetadata}(),un=function(e){function AnimationStateDeclarationMetadata(t,r){e.call(this),this.stateNameExpr=t,this.styles=r}return nn(AnimationStateDeclarationMetadata,e),AnimationStateDeclarationMetadata}(an),ln=function(e){function AnimationStateTransitionMetadata(t,r){e.call(this),this.stateChangeExpr=t,this.steps=r}return nn(AnimationStateTransitionMetadata,e),AnimationStateTransitionMetadata}(an),cn=function(){function AnimationMetadata(){}return AnimationMetadata}(),pn=function(e){function AnimationKeyframesSequenceMetadata(t){e.call(this),this.steps=t}return nn(AnimationKeyframesSequenceMetadata,e),AnimationKeyframesSequenceMetadata}(cn),hn=function(e){function AnimationStyleMetadata(t,r){void 0===r&&(r=null),e.call(this),this.styles=t,this.offset=r}return nn(AnimationStyleMetadata,e),AnimationStyleMetadata}(cn),fn=function(e){function AnimationAnimateMetadata(t,r){e.call(this),this.timings=t,this.styles=r}return nn(AnimationAnimateMetadata,e),AnimationAnimateMetadata}(cn),dn=function(e){function AnimationWithStepsMetadata(){e.call(this)}return nn(AnimationWithStepsMetadata,e),Object.defineProperty(AnimationWithStepsMetadata.prototype,"steps",{get:function(){throw new Error("NOT IMPLEMENTED: Base Class")},enumerable:!0,configurable:!0}),AnimationWithStepsMetadata}(cn),mn=function(e){function AnimationSequenceMetadata(t){e.call(this),this._steps=t}return nn(AnimationSequenceMetadata,e),Object.defineProperty(AnimationSequenceMetadata.prototype,"steps",{get:function(){return this._steps},enumerable:!0,configurable:!0}),AnimationSequenceMetadata}(dn),yn=function(e){function AnimationGroupMetadata(t){e.call(this),this._steps=t}return nn(AnimationGroupMetadata,e),Object.defineProperty(AnimationGroupMetadata.prototype,"steps",{get:function(){return this._steps},enumerable:!0,configurable:!0}),AnimationGroupMetadata}(dn),vn=function(){function AnimationStyles(e){this.styles=e}return AnimationStyles}(),gn=function(){function DebugDomRootRenderer(e){this._delegate=e}return DebugDomRootRenderer.prototype.renderComponent=function(e){return new _n(this._delegate.renderComponent(e))},DebugDomRootRenderer}(),_n=function(){function DebugDomRenderer(e){this._delegate=e}return DebugDomRenderer.prototype.selectRootElement=function(e,t){var r=this._delegate.selectRootElement(e,t),n=new jr(r,null,t);return indexDebugNode(n),r},DebugDomRenderer.prototype.createElement=function(e,t,r){var n=this._delegate.createElement(e,t,r),i=new jr(n,getDebugNode(e),r);return i.name=t,indexDebugNode(i),n},DebugDomRenderer.prototype.createViewRoot=function(e){return this._delegate.createViewRoot(e)},DebugDomRenderer.prototype.createTemplateAnchor=function(e,t){var r=this._delegate.createTemplateAnchor(e,t),n=new Fr(r,getDebugNode(e),t);return indexDebugNode(n),r},DebugDomRenderer.prototype.createText=function(e,t,r){var n=this._delegate.createText(e,t,r),i=new Fr(n,getDebugNode(e),r);return indexDebugNode(i),n},DebugDomRenderer.prototype.projectNodes=function(e,t){var r=getDebugNode(e);if(isPresent(r)&&r instanceof jr){var n=r;t.forEach(function(e){n.addChild(getDebugNode(e))})}this._delegate.projectNodes(e,t)},DebugDomRenderer.prototype.attachViewAfter=function(e,t){var r=getDebugNode(e);if(isPresent(r)){var n=r.parent;if(t.length>0&&isPresent(n)){var i=[];t.forEach(function(e){return i.push(getDebugNode(e))}),n.insertChildrenAfter(r,i)}}this._delegate.attachViewAfter(e,t)},DebugDomRenderer.prototype.detachView=function(e){e.forEach(function(e){var t=getDebugNode(e);isPresent(t)&&isPresent(t.parent)&&t.parent.removeChild(t)}),this._delegate.detachView(e)},DebugDomRenderer.prototype.destroyView=function(e,t){t.forEach(function(e){removeDebugNodeFromIndex(getDebugNode(e))}),this._delegate.destroyView(e,t)},DebugDomRenderer.prototype.listen=function(e,t,r){var n=getDebugNode(e);return isPresent(n)&&n.listeners.push(new Lr(t,r)),this._delegate.listen(e,t,r)},DebugDomRenderer.prototype.listenGlobal=function(e,t,r){return this._delegate.listenGlobal(e,t,r)},DebugDomRenderer.prototype.setElementProperty=function(e,t,r){var n=getDebugNode(e);isPresent(n)&&n instanceof jr&&(n.properties[t]=r),this._delegate.setElementProperty(e,t,r)},DebugDomRenderer.prototype.setElementAttribute=function(e,t,r){var n=getDebugNode(e);isPresent(n)&&n instanceof jr&&(n.attributes[t]=r),this._delegate.setElementAttribute(e,t,r)},DebugDomRenderer.prototype.setBindingDebugInfo=function(e,t,r){this._delegate.setBindingDebugInfo(e,t,r)},DebugDomRenderer.prototype.setElementClass=function(e,t,r){var n=getDebugNode(e);isPresent(n)&&n instanceof jr&&(n.classes[t]=r),this._delegate.setElementClass(e,t,r)},DebugDomRenderer.prototype.setElementStyle=function(e,t,r){var n=getDebugNode(e);isPresent(n)&&n instanceof jr&&(n.styles[t]=r),this._delegate.setElementStyle(e,t,r)},DebugDomRenderer.prototype.invokeElementMethod=function(e,t,r){this._delegate.invokeElementMethod(e,t,r)},DebugDomRenderer.prototype.setText=function(e,t){this._delegate.setText(e,t)},DebugDomRenderer.prototype.animate=function(e,t,r,n,i,o){return this._delegate.animate(e,t,r,n,i,o)},DebugDomRenderer}(),bn=function(){function StaticNodeDebugInfo(e,t,r){this.providerTokens=e,this.componentToken=t,this.refTokens=r}return StaticNodeDebugInfo}(),wn=function(){function DebugContext(e,t,r,n){this._view=e,this._nodeIndex=t,this._tplRow=r,this._tplCol=n}return Object.defineProperty(DebugContext.prototype,"_staticNodeInfo",{get:function(){return isPresent(this._nodeIndex)?this._view.staticNodeDebugInfos[this._nodeIndex]:null},enumerable:!0,configurable:!0}),Object.defineProperty(DebugContext.prototype,"context",{get:function(){return this._view.context},enumerable:!0,configurable:!0}),Object.defineProperty(DebugContext.prototype,"component",{get:function(){var e=this._staticNodeInfo;return isPresent(e)&&isPresent(e.componentToken)?this.injector.get(e.componentToken):null},enumerable:!0,configurable:!0}),Object.defineProperty(DebugContext.prototype,"componentRenderElement",{get:function(){for(var e=this._view;isPresent(e.declarationAppElement)&&e.type!==Et.COMPONENT;)e=e.declarationAppElement.parentView;return isPresent(e.declarationAppElement)?e.declarationAppElement.nativeElement:null},enumerable:!0,configurable:!0}),Object.defineProperty(DebugContext.prototype,"injector",{get:function(){return this._view.injector(this._nodeIndex)},enumerable:!0,configurable:!0}),Object.defineProperty(DebugContext.prototype,"renderNode",{get:function(){return isPresent(this._nodeIndex)&&this._view.allNodes?this._view.allNodes[this._nodeIndex]:null},enumerable:!0,configurable:!0}),Object.defineProperty(DebugContext.prototype,"providerTokens",{get:function(){var e=this._staticNodeInfo;return isPresent(e)?e.providerTokens:null},enumerable:!0,configurable:!0}),Object.defineProperty(DebugContext.prototype,"source",{get:function(){return this._view.componentType.templateUrl+":"+this._tplRow+":"+this._tplCol},enumerable:!0,configurable:!0}),Object.defineProperty(DebugContext.prototype,"references",{get:function(){var e=this,t={},r=this._staticNodeInfo;if(isPresent(r)){var n=r.refTokens;Object.keys(n).forEach(function(r){var i,o=n[r];i=isBlank(o)?e._view.allNodes?e._view.allNodes[e._nodeIndex]:null:e._view.injectorGet(o,e._nodeIndex,null),t[r]=i})}return t},enumerable:!0,configurable:!0}),DebugContext}(),Cn=function(){function AnimationTransitionEvent(e){var t=e.fromState,r=e.toState,n=e.totalTime;this.fromState=t,this.toState=r,this.totalTime=n}return AnimationTransitionEvent}(),En=function(){function ViewAnimationMap(){this._map=new Map,this._allPlayers=[]}return Object.defineProperty(ViewAnimationMap.prototype,"length",{get:function(){return this.getAllPlayers().length},enumerable:!0,configurable:!0}),ViewAnimationMap.prototype.find=function(e,t){var r=this._map.get(e);if(isPresent(r))return r[t]},ViewAnimationMap.prototype.findAllPlayersByElement=function(e){var t=this._map.get(e);return t?Object.keys(t).map(function(e){return t[e]}):[]},ViewAnimationMap.prototype.set=function(e,t,r){var n=this._map.get(e);isPresent(n)||(n={});var i=n[t];isPresent(i)&&this.remove(e,t),n[t]=r,this._allPlayers.push(r),this._map.set(e,n)},ViewAnimationMap.prototype.getAllPlayers=function(){return this._allPlayers},ViewAnimationMap.prototype.remove=function(e,t){var r=this._map.get(e);if(r){var n=r[t];delete r[t];var i=this._allPlayers.indexOf(n);this._allPlayers.splice(i,1),0===Object.keys(r).length&&this._map.delete(e)}},ViewAnimationMap}(),Sn=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 __)},Pn=new Object,An=function(e){function ElementInjector(t,r){e.call(this),this._view=t,this._nodeIndex=r}return Sn(ElementInjector,e),ElementInjector.prototype.get=function(e,t){void 0===t&&(t=X);var r=Pn;return r===Pn&&(r=this._view.injectorGet(e,this._nodeIndex,Pn)),r===Pn&&(r=this._view.parentInjector.get(e,t)),r},ElementInjector}(J),xn=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 __)},Tn=xt("AppView#check(ascii id)"),Mn=function(){function AppView(e,t,r,n,i,o,s){this.clazz=e,this.componentType=t,this.type=r,this.viewUtils=n,this.parentInjector=i,this.declarationAppElement=o,this.cdMode=s,this.contentChildren=[],this.viewChildren=[],this.viewContainerElement=null,this.numberOfChecks=0,this.animationPlayers=new En,this._animationListeners=new Map,this.ref=new Rr(this),r===Et.COMPONENT||r===Et.HOST?this.renderer=n.renderComponent(t):this.renderer=o.parentView.renderer}return Object.defineProperty(AppView.prototype,"destroyed",{get:function(){return this.cdMode===S.Destroyed},enumerable:!0,configurable:!0}),AppView.prototype.cancelActiveAnimation=function(e,t,r){if(void 0===r&&(r=!1),r)this.animationPlayers.findAllPlayersByElement(e).forEach(function(e){return e.destroy()});else{var n=this.animationPlayers.find(e,t);isPresent(n)&&n.destroy()}},AppView.prototype.queueAnimation=function(e,t,r,n,i,o){var s=this;queueAnimation(r);var a=new Cn({fromState:i,toState:o,totalTime:n});this.animationPlayers.set(e,t,r),r.onDone(function(){s.triggerAnimationOutput(e,t,"done",a),s.animationPlayers.remove(e,t)}),r.onStart(function(){s.triggerAnimationOutput(e,t,"start",a)})},AppView.prototype.triggerAnimationOutput=function(e,t,r,n){var i=this._animationListeners.get(e);if(isPresent(i)&&i.length)for(var o=0;o0?this.rootNodesOrAppElements[this.rootNodesOrAppElements.length-1]:null;return _findLastRenderNode(e)},enumerable:!0,configurable:!0}),AppView.prototype.dirtyParentQueriesInternal=function(){},AppView.prototype.detectChanges=function(e){var t=Tn(this.clazz);this.cdMode!==S.Checked&&this.cdMode!==S.Errored&&(this.cdMode===S.Destroyed&&this.throwDestroyedError("detectChanges"),this.detectChangesInternal(e),this.cdMode===S.CheckOnce&&(this.cdMode=S.Checked),this.numberOfChecks++,Tt(t))},AppView.prototype.detectChangesInternal=function(e){this.detectContentChildrenChanges(e),this.detectViewChildrenChanges(e)},AppView.prototype.detectContentChildrenChanges=function(e){for(var t=0;t1?"path: '"+e.path.join(" -> ")+"'":e.path[0]?"name: '"+e.path+"'":"unspecified name attribute",new Error(t+" "+r)}function composeValidators(e){return isPresent(e)?g.compose(e.map(normalizeValidator)):null}function composeAsyncValidators(e){return isPresent(e)?g.composeAsync(e.map(normalizeAsyncValidator)):null}function isPropertyUpdated(e,t){if(!e.hasOwnProperty("model"))return!1;var r=e.model;return!!r.isFirstChange()||!looseIdentical(t,r.currentValue)}function isBuiltInAccessor(e){return hasConstructor(e,w)||hasConstructor(e,P)||hasConstructor(e,N)||hasConstructor(e,R)||hasConstructor(e,I)}function selectValueAccessor(e,t){if(!t)return null;var r,n,i;return t.forEach(function(t){hasConstructor(t,E)?r=t:isBuiltInAccessor(t)?(isPresent(n)&&_throwError(e,"More than one built-in value accessor matches form control with"),n=t):(isPresent(i)&&_throwError(e,"More than one custom value accessor matches form control with"),i=t)}),isPresent(i)?i:isPresent(n)?n:isPresent(r)?r:(_throwError(e,"No valid value accessor for form control with"),null)}function _find(e,t,r){return isBlank(t)?null:(t instanceof Array||(t=t.split(r)),t instanceof Array&&d.isEmpty(t)?null:t.reduce(function(e,t){if(e instanceof Y)return isPresent(e.controls[t])?e.controls[t]:null;if(e instanceof ee){var r=t;return isPresent(e.at(r))?e.at(r):null}return null},e))}function toObservable(e){return m(e)?o.fromPromise(e):e}function coerceToValidator(e){return Array.isArray(e)?composeValidators(e):e}function coerceToAsyncValidator(e){return Array.isArray(e)?composeAsyncValidators(e):e}function _hasInvalidParent(e){return!(e instanceof Ee||e instanceof be||e instanceof Pe)}var s=function(){function StringWrapper(){}return StringWrapper.fromCharCode=function(e){return String.fromCharCode(e)},StringWrapper.charCodeAt=function(e,t){return e.charCodeAt(t)},StringWrapper.split=function(e,t){return e.split(t)},StringWrapper.equals=function(e,t){return e===t},StringWrapper.stripLeft=function(e,t){if(e&&e.length){for(var r=0,n=0;n=0&&e[n]==t;n--)r--;e=e.substring(0,r)}return e},StringWrapper.replace=function(e,t,r){return e.replace(t,r)},StringWrapper.replaceAll=function(e,t,r){return e.replace(t,r)},StringWrapper.slice=function(e,t,r){return void 0===t&&(t=0),void 0===r&&(r=null),e.slice(t,null===r?void 0:r)},StringWrapper.replaceAllMapped=function(e,t,r){return e.replace(t,function(){for(var e=[],t=0;tt?1:0},StringWrapper}(),a=(function(){function NumberWrapper(){}return NumberWrapper.toFixed=function(e,t){return e.toFixed(t)},NumberWrapper.equal=function(e,t){return e===t},NumberWrapper.parseIntAutoRadix=function(e){var t=parseInt(e);if(isNaN(t))throw new Error("Invalid integer literal when parsing "+e);return t},NumberWrapper.parseInt=function(e,t){if(10==t){if(/^(\-|\+)?[0-9]+$/.test(e))return parseInt(e,t)}else if(16==t){if(/^(\-|\+)?[0-9ABCDEFabcdef]+$/.test(e))return parseInt(e,t)}else{var r=parseInt(e,t);if(!isNaN(r))return r}throw new Error("Invalid integer literal when parsing "+e+" in base "+t)},Object.defineProperty(NumberWrapper,"NaN",{get:function(){return NaN},enumerable:!0,configurable:!0}),NumberWrapper.isNumeric=function(e){return!isNaN(e-parseFloat(e))},NumberWrapper.isNaN=function(e){return isNaN(e)},NumberWrapper.isInteger=function(e){return Number.isInteger(e)},NumberWrapper}(),function(){function AbstractControlDirective(){}return Object.defineProperty(AbstractControlDirective.prototype,"control",{get:function(){throw new Error("unimplemented")},enumerable:!0,configurable:!0}),Object.defineProperty(AbstractControlDirective.prototype,"value",{get:function(){return isPresent(this.control)?this.control.value:null},enumerable:!0,configurable:!0}),Object.defineProperty(AbstractControlDirective.prototype,"valid",{get:function(){return isPresent(this.control)?this.control.valid:null},enumerable:!0,configurable:!0}),Object.defineProperty(AbstractControlDirective.prototype,"invalid",{get:function(){return isPresent(this.control)?this.control.invalid:null},enumerable:!0,configurable:!0}),Object.defineProperty(AbstractControlDirective.prototype,"pending",{get:function(){return isPresent(this.control)?this.control.pending:null},enumerable:!0,configurable:!0}),Object.defineProperty(AbstractControlDirective.prototype,"errors",{get:function(){return isPresent(this.control)?this.control.errors:null},enumerable:!0,configurable:!0}),Object.defineProperty(AbstractControlDirective.prototype,"pristine",{get:function(){return isPresent(this.control)?this.control.pristine:null},enumerable:!0,configurable:!0}),Object.defineProperty(AbstractControlDirective.prototype,"dirty",{get:function(){return isPresent(this.control)?this.control.dirty:null},enumerable:!0,configurable:!0}),Object.defineProperty(AbstractControlDirective.prototype,"touched",{get:function(){return isPresent(this.control)?this.control.touched:null},enumerable:!0,configurable:!0}),Object.defineProperty(AbstractControlDirective.prototype,"untouched",{get:function(){return isPresent(this.control)?this.control.untouched:null},enumerable:!0,configurable:!0}),Object.defineProperty(AbstractControlDirective.prototype,"disabled",{get:function(){return isPresent(this.control)?this.control.disabled:null},enumerable:!0,configurable:!0}),Object.defineProperty(AbstractControlDirective.prototype,"enabled",{get:function(){return isPresent(this.control)?this.control.enabled:null},enumerable:!0,configurable:!0}),Object.defineProperty(AbstractControlDirective.prototype,"statusChanges",{get:function(){return isPresent(this.control)?this.control.statusChanges:null},enumerable:!0,configurable:!0}),Object.defineProperty(AbstractControlDirective.prototype,"valueChanges",{get:function(){return isPresent(this.control)?this.control.valueChanges:null},enumerable:!0,configurable:!0}),Object.defineProperty(AbstractControlDirective.prototype,"path",{get:function(){return null},enumerable:!0,configurable:!0}),AbstractControlDirective.prototype.reset=function(e){void 0===e&&(e=void 0),isPresent(this.control)&&this.control.reset(e)},AbstractControlDirective}()),u=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 __)},l=function(e){function ControlContainer(){e.apply(this,arguments)}return u(ControlContainer,e),Object.defineProperty(ControlContainer.prototype,"formDirective",{get:function(){return null},enumerable:!0,configurable:!0}),Object.defineProperty(ControlContainer.prototype,"path",{get:function(){return null},enumerable:!0,configurable:!0}),ControlContainer}(a),c=function(){try{if(1===new Map([[1,2]]).size)return function(e){return new Map(e)}}catch(e){}return function(e){for(var t=new Map,r=0;r-1&&(e.splice(r,1),!0)},ListWrapper.clear=function(e){e.length=0},ListWrapper.isEmpty=function(e){return 0==e.length},ListWrapper.fill=function(e,t,r,n){void 0===r&&(r=0),void 0===n&&(n=null),e.fill(t,r,null===n?e.length:n)},ListWrapper.equals=function(e,t){if(e.length!=t.length)return!1;for(var r=0;rn&&(r=o,n=s)}}return r},ListWrapper.flatten=function(e){var t=[];return _flattenArray(e,t),t},ListWrapper.addAll=function(e,t){for(var r=0;re?{maxlength:{requiredLength:e,actualLength:r.length}}:null}},Validators.pattern=function(e){return function(t){var r=new RegExp("^"+e+"$"),n=t.value;return r.test(n)?null:{pattern:{requiredPattern:"^"+e+"$",actualValue:n}}}},Validators.nullValidator=function(e){return null},Validators.compose=function(e){if(!e)return null;var t=e.filter(isPresent);return 0==t.length?null:function(e){return _mergeErrors(_executeValidators(e,t))}},Validators.composeAsync=function(e){if(!e)return null;var t=e.filter(isPresent);return 0==t.length?null:function(e){var r=_executeAsyncValidators(e,t).map(_convertToPromise);return Promise.all(r).then(_mergeErrors)}},Validators}(),_=new t.OpaqueToken("NgValueAccessor"),b={provide:_,useExisting:t.forwardRef(function(){return w}),multi:!0},w=function(){function CheckboxControlValueAccessor(e,t){this._renderer=e,this._elementRef=t,this.onChange=function(e){},this.onTouched=function(){}}return CheckboxControlValueAccessor.prototype.writeValue=function(e){this._renderer.setElementProperty(this._elementRef.nativeElement,"checked",e)},CheckboxControlValueAccessor.prototype.registerOnChange=function(e){this.onChange=e},CheckboxControlValueAccessor.prototype.registerOnTouched=function(e){this.onTouched=e},CheckboxControlValueAccessor.prototype.setDisabledState=function(e){this._renderer.setElementProperty(this._elementRef.nativeElement,"disabled",e)},CheckboxControlValueAccessor.decorators=[{type:t.Directive,args:[{selector:"input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]",host:{"(change)":"onChange($event.target.checked)","(blur)":"onTouched()"},providers:[b]}]}],CheckboxControlValueAccessor.ctorParameters=[{type:t.Renderer},{type:t.ElementRef}],CheckboxControlValueAccessor}(),C={provide:_,useExisting:t.forwardRef(function(){return E}),multi:!0},E=function(){function DefaultValueAccessor(e,t){this._renderer=e,this._elementRef=t,this.onChange=function(e){},this.onTouched=function(){}}return DefaultValueAccessor.prototype.writeValue=function(e){var t=isBlank(e)?"":e;this._renderer.setElementProperty(this._elementRef.nativeElement,"value",t)},DefaultValueAccessor.prototype.registerOnChange=function(e){this.onChange=e},DefaultValueAccessor.prototype.registerOnTouched=function(e){this.onTouched=e},DefaultValueAccessor.prototype.setDisabledState=function(e){this._renderer.setElementProperty(this._elementRef.nativeElement,"disabled",e)},DefaultValueAccessor.decorators=[{type:t.Directive,args:[{selector:"input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]",host:{"(input)":"onChange($event.target.value)","(blur)":"onTouched()"},providers:[C]}]}],DefaultValueAccessor.ctorParameters=[{type:t.Renderer},{type:t.ElementRef}],DefaultValueAccessor}(),S={provide:_,useExisting:t.forwardRef(function(){return P}),multi:!0},P=function(){function NumberValueAccessor(e,t){this._renderer=e,this._elementRef=t,this.onChange=function(e){},this.onTouched=function(){}}return NumberValueAccessor.prototype.writeValue=function(e){var t=isBlank(e)?"":e;this._renderer.setElementProperty(this._elementRef.nativeElement,"value",t)},NumberValueAccessor.prototype.registerOnChange=function(e){this.onChange=function(t){e(""==t?null:parseFloat(t))}},NumberValueAccessor.prototype.registerOnTouched=function(e){this.onTouched=e},NumberValueAccessor.prototype.setDisabledState=function(e){this._renderer.setElementProperty(this._elementRef.nativeElement,"disabled",e)},NumberValueAccessor.decorators=[{type:t.Directive,args:[{selector:"input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]",host:{"(change)":"onChange($event.target.value)","(input)":"onChange($event.target.value)","(blur)":"onTouched()"},providers:[S]}]}],NumberValueAccessor.ctorParameters=[{type:t.Renderer},{type:t.ElementRef}],NumberValueAccessor}(),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 __)},x=function(e){function NgControl(){e.apply(this,arguments),this._parent=null,this.name=null,this.valueAccessor=null,this._rawValidators=[],this._rawAsyncValidators=[]}return A(NgControl,e),Object.defineProperty(NgControl.prototype,"validator",{get:function(){return unimplemented()},enumerable:!0,configurable:!0}),Object.defineProperty(NgControl.prototype,"asyncValidator",{get:function(){return unimplemented()},enumerable:!0,configurable:!0}),NgControl}(a),T={provide:_,useExisting:t.forwardRef(function(){return I}),multi:!0},M=function(){function RadioControlRegistry(){this._accessors=[]}return RadioControlRegistry.prototype.add=function(e,t){this._accessors.push([e,t])},RadioControlRegistry.prototype.remove=function(e){for(var t=-1,r=0;r\n ')},RadioControlValueAccessor.decorators=[{type:t.Directive,args:[{selector:"input[type=radio][formControlName],input[type=radio][formControl],input[type=radio][ngModel]",host:{"(change)":"onChange()","(blur)":"onTouched()"},providers:[T]}]}],RadioControlValueAccessor.ctorParameters=[{type:t.Renderer},{type:t.ElementRef},{type:M},{type:t.Injector}],RadioControlValueAccessor.propDecorators={name:[{type:t.Input}],formControlName:[{type:t.Input}],value:[{type:t.Input}]},RadioControlValueAccessor}(),D={provide:_,useExisting:t.forwardRef(function(){return N}),multi:!0},N=function(){function SelectControlValueAccessor(e,t){this._renderer=e,this._elementRef=t,this._optionMap=new Map,this._idCounter=0,this.onChange=function(e){},this.onTouched=function(){}}return SelectControlValueAccessor.prototype.writeValue=function(e){this.value=e;var t=_buildValueString(this._getOptionId(e),e);this._renderer.setElementProperty(this._elementRef.nativeElement,"value",t)},SelectControlValueAccessor.prototype.registerOnChange=function(e){var t=this;this.onChange=function(r){t.value=r,e(t._getOptionValue(r))}},SelectControlValueAccessor.prototype.registerOnTouched=function(e){this.onTouched=e},SelectControlValueAccessor.prototype.setDisabledState=function(e){this._renderer.setElementProperty(this._elementRef.nativeElement,"disabled",e)},SelectControlValueAccessor.prototype._registerOption=function(){return(this._idCounter++).toString()},SelectControlValueAccessor.prototype._getOptionId=function(e){for(var t=0,r=h.keys(this._optionMap);t-1)})}},SelectMultipleControlValueAccessor.prototype.registerOnChange=function(e){var t=this;this.onChange=function(r){var n=[];if(r.hasOwnProperty("selectedOptions"))for(var i=r.selectedOptions,o=0;o0||this.disabled},FormGroup.prototype._checkAllValuesPresent=function(e){this._forEachChild(function(t,r){if(void 0===e[r])throw new Error("Must supply a value for form control with name: '"+r+"'.")})},FormGroup}($),ee=function(e){function FormArray(t,r,n){void 0===r&&(r=null),void 0===n&&(n=null),e.call(this,r,n),this.controls=t,this._initObservables(),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!1})}return q(FormArray,e),FormArray.prototype.at=function(e){return this.controls[e]},FormArray.prototype.push=function(e){this.controls.push(e),this._registerControl(e),this.updateValueAndValidity(),this._onCollectionChange()},FormArray.prototype.insert=function(e,t){d.insert(this.controls,e,t),this._registerControl(t),this.updateValueAndValidity(),this._onCollectionChange()},FormArray.prototype.removeAt=function(e){this.controls[e]&&this.controls[e]._registerOnCollectionChange(function(){}),d.removeAt(this.controls,e),this.updateValueAndValidity(),this._onCollectionChange()},FormArray.prototype.setControl=function(e,t){this.controls[e]&&this.controls[e]._registerOnCollectionChange(function(){}),d.removeAt(this.controls,e),t&&(d.insert(this.controls,e,t),this._registerControl(t)),this.updateValueAndValidity(),this._onCollectionChange()},Object.defineProperty(FormArray.prototype,"length",{get:function(){return this.controls.length},enumerable:!0,configurable:!0}),FormArray.prototype.setValue=function(e,t){var r=this,n=(void 0===t?{}:t).onlySelf;this._checkAllValuesPresent(e),e.forEach(function(e,t){r._throwIfControlMissing(t),r.at(t).setValue(e,{onlySelf:!0})}),this.updateValueAndValidity({onlySelf:n})},FormArray.prototype.patchValue=function(e,t){var r=this,n=(void 0===t?{}:t).onlySelf;e.forEach(function(e,t){r.at(t)&&r.at(t).patchValue(e,{onlySelf:!0})}),this.updateValueAndValidity({onlySelf:n})},FormArray.prototype.reset=function(e,t){void 0===e&&(e=[]);var r=(void 0===t?{}:t).onlySelf;this._forEachChild(function(t,r){t.reset(e[r],{onlySelf:!0})}),this.updateValueAndValidity({onlySelf:r}),this._updatePristine({onlySelf:r}),this._updateTouched({onlySelf:r})},FormArray.prototype.getRawValue=function(){return this.controls.map(function(e){return e.value})},FormArray.prototype._throwIfControlMissing=function(e){if(!this.controls.length)throw new Error("\n There are no form controls registered with this array yet. If you're using ngModel,\n you may want to check next tick (e.g. use setTimeout).\n ");if(!this.at(e))throw new Error("Cannot find form control at index "+e)},FormArray.prototype._forEachChild=function(e){this.controls.forEach(function(t,r){e(t,r)})},FormArray.prototype._updateValue=function(){var e=this;this._value=this.controls.filter(function(t){return t.enabled||e.disabled}).map(function(e){return e.value})},FormArray.prototype._anyControls=function(e){return this.controls.some(function(t){return t.enabled&&e(t)})},FormArray.prototype._setUpControls=function(){var e=this;this._forEachChild(function(t){return e._registerControl(t)})},FormArray.prototype._checkAllValuesPresent=function(e){this._forEachChild(function(t,r){if(void 0===e[r])throw new Error("Must supply a value for form control at index: "+r+".")})},FormArray.prototype._allControlsDisabled=function(){for(var e=0,t=this.controls;e0||this.disabled},FormArray.prototype._registerControl=function(e){e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange)},FormArray}($),te=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 __)},re={provide:l,useExisting:t.forwardRef(function(){return ie})},ne=Promise.resolve(null),ie=function(e){function NgForm(t,r){e.call(this),this._submitted=!1,this.ngSubmit=new z,this.form=new Y({},composeValidators(t),composeAsyncValidators(r))}return te(NgForm,e),Object.defineProperty(NgForm.prototype,"submitted",{get:function(){return this._submitted},enumerable:!0,configurable:!0}),Object.defineProperty(NgForm.prototype,"formDirective",{get:function(){return this},enumerable:!0,configurable:!0}),Object.defineProperty(NgForm.prototype,"control",{get:function(){return this.form},enumerable:!0,configurable:!0}),Object.defineProperty(NgForm.prototype,"path",{get:function(){return[]},enumerable:!0,configurable:!0}),Object.defineProperty(NgForm.prototype,"controls",{get:function(){return this.form.controls},enumerable:!0,configurable:!0}),NgForm.prototype.addControl=function(e){var t=this;ne.then(function(){var r=t._findContainer(e.path);e._control=r.registerControl(e.name,e.control),setUpControl(e.control,e),e.control.updateValueAndValidity({emitEvent:!1})})},NgForm.prototype.getControl=function(e){return this.form.get(e.path)},NgForm.prototype.removeControl=function(e){var t=this;ne.then(function(){var r=t._findContainer(e.path);isPresent(r)&&r.removeControl(e.name)})},NgForm.prototype.addFormGroup=function(e){var t=this;ne.then(function(){var r=t._findContainer(e.path),n=new Y({});setUpFormContainer(n,e),r.registerControl(e.name,n),n.updateValueAndValidity({emitEvent:!1})})},NgForm.prototype.removeFormGroup=function(e){var t=this;ne.then(function(){var r=t._findContainer(e.path);isPresent(r)&&r.removeControl(e.name)})},NgForm.prototype.getFormGroup=function(e){return this.form.get(e.path)},NgForm.prototype.updateModel=function(e,t){var r=this;ne.then(function(){var n=r.form.get(e.path);n.setValue(t)})},NgForm.prototype.setValue=function(e){this.control.setValue(e)},NgForm.prototype.onSubmit=function(){return this._submitted=!0,this.ngSubmit.emit(null),!1},NgForm.prototype.onReset=function(){this.resetForm()},NgForm.prototype.resetForm=function(e){void 0===e&&(e=void 0),this.form.reset(e),this._submitted=!1},NgForm.prototype._findContainer=function(e){return e.pop(),d.isEmpty(e)?this.form:this.form.get(e)},NgForm.decorators=[{type:t.Directive,args:[{selector:"form:not([ngNoForm]):not([formGroup]),ngForm,[ngForm]",providers:[re],host:{"(submit)":"onSubmit()","(reset)":"onReset()"},outputs:["ngSubmit"],exportAs:"ngForm"}]}],NgForm.ctorParameters=[{type:Array,decorators:[{type:t.Optional},{type:t.Self},{type:t.Inject,args:[y]}]},{type:Array,decorators:[{type:t.Optional},{type:t.Self},{type:t.Inject,args:[v]}]}],NgForm}(l),oe={formControlName:'\n
\n \n
\n\n In your class:\n\n this.myGroup = new FormGroup({\n firstName: new FormControl()\n });',formGroupName:'\n
\n
\n \n
\n
\n\n In your class:\n\n this.myGroup = new FormGroup({\n person: new FormGroup({ firstName: new FormControl() })\n });',formArrayName:'\n
\n
\n
\n \n
\n
\n
\n\n In your class:\n\n this.cityArray = new FormArray([new FormControl(\'SF\')]);\n this.myGroup = new FormGroup({\n cities: this.cityArray\n });',ngModelGroup:'\n
\n
\n \n
\n
',ngModelWithFormGroup:'\n
\n \n \n
\n '},se=function(){function TemplateDrivenErrors(){}return TemplateDrivenErrors.modelParentException=function(){throw new Error('\n ngModel cannot be used to register form controls with a parent formGroup directive. Try using\n formGroup\'s partner directive "formControlName" instead. Example:\n\n '+oe.formControlName+"\n\n Or, if you'd like to avoid registering this form control, indicate that it's standalone in ngModelOptions:\n\n Example:\n\n "+oe.ngModelWithFormGroup)},TemplateDrivenErrors.formGroupNameException=function(){throw new Error("\n ngModel cannot be used to register form controls with a parent formGroupName or formArrayName directive.\n\n Option 1: Use formControlName instead of ngModel (reactive strategy):\n\n "+oe.formGroupName+"\n\n Option 2: Update ngModel's parent be ngModelGroup (template-driven strategy):\n\n "+oe.ngModelGroup)},TemplateDrivenErrors.missingNameException=function(){throw new Error('If ngModel is used within a form tag, either the name attribute must be set or the form\n control must be defined as \'standalone\' in ngModelOptions.\n\n Example 1: \n Example 2: ')},TemplateDrivenErrors.modelGroupParentException=function(){throw new Error("\n ngModelGroup cannot be used with a parent formGroup directive.\n\n Option 1: Use formGroupName instead of ngModelGroup (reactive strategy):\n\n "+oe.formGroupName+"\n\n Option 2: Use a regular form tag instead of the formGroup directive (template-driven strategy):\n\n "+oe.ngModelGroup)},TemplateDrivenErrors}(),ae=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 __)},ue={provide:l,useExisting:t.forwardRef(function(){return le})},le=function(e){function NgModelGroup(t,r,n){e.call(this),this._parent=t,this._validators=r,this._asyncValidators=n}return ae(NgModelGroup,e),NgModelGroup.prototype._checkParentType=function(){this._parent instanceof NgModelGroup||this._parent instanceof ie||se.modelGroupParentException()},NgModelGroup.decorators=[{type:t.Directive,args:[{selector:"[ngModelGroup]",providers:[ue],exportAs:"ngModelGroup"}]}],NgModelGroup.ctorParameters=[{type:l,decorators:[{type:t.Host},{type:t.SkipSelf}]},{type:Array,decorators:[{type:t.Optional},{type:t.Self},{type:t.Inject,args:[y]}]},{type:Array,decorators:[{type:t.Optional},{type:t.Self},{type:t.Inject,args:[v]}]}],NgModelGroup.propDecorators={name:[{type:t.Input,args:["ngModelGroup"]}]},NgModelGroup}(F),ce=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 __)},pe={provide:x,useExisting:t.forwardRef(function(){return fe})},he=Promise.resolve(null),fe=function(e){function NgModel(t,r,n,i){e.call(this),this._control=new J,this._registered=!1,this.update=new z,this._parent=t,this._rawValidators=r||[],this._rawAsyncValidators=n||[],this.valueAccessor=selectValueAccessor(this,i)}return ce(NgModel,e),NgModel.prototype.ngOnChanges=function(e){this._checkForErrors(),this._registered||this._setUpControl(),"isDisabled"in e&&this._updateDisabled(e),isPropertyUpdated(e,this.viewModel)&&(this._updateValue(this.model),this.viewModel=this.model)},NgModel.prototype.ngOnDestroy=function(){this.formDirective&&this.formDirective.removeControl(this)},Object.defineProperty(NgModel.prototype,"control",{get:function(){return this._control},enumerable:!0,configurable:!0}),Object.defineProperty(NgModel.prototype,"path",{get:function(){return this._parent?controlPath(this.name,this._parent):[this.name]},enumerable:!0,configurable:!0}),Object.defineProperty(NgModel.prototype,"formDirective",{get:function(){return this._parent?this._parent.formDirective:null},enumerable:!0,configurable:!0}),Object.defineProperty(NgModel.prototype,"validator",{get:function(){return composeValidators(this._rawValidators)},enumerable:!0,configurable:!0}),Object.defineProperty(NgModel.prototype,"asyncValidator",{get:function(){return composeAsyncValidators(this._rawAsyncValidators)},enumerable:!0,configurable:!0}),NgModel.prototype.viewToModelUpdate=function(e){this.viewModel=e,this.update.emit(e)},NgModel.prototype._setUpControl=function(){this._isStandalone()?this._setUpStandalone():this.formDirective.addControl(this),this._registered=!0},NgModel.prototype._isStandalone=function(){return!this._parent||this.options&&this.options.standalone},NgModel.prototype._setUpStandalone=function(){setUpControl(this._control,this),this._control.updateValueAndValidity({emitEvent:!1})},NgModel.prototype._checkForErrors=function(){this._isStandalone()||this._checkParentType(),this._checkName()},NgModel.prototype._checkParentType=function(){!(this._parent instanceof le)&&this._parent instanceof F?se.formGroupNameException():this._parent instanceof le||this._parent instanceof ie||se.modelParentException()},NgModel.prototype._checkName=function(){this.options&&this.options.name&&(this.name=this.options.name),this._isStandalone()||this.name||se.missingNameException()},NgModel.prototype._updateValue=function(e){var t=this;he.then(function(){t.control.setValue(e,{emitViewToModelChange:!1})})},NgModel.prototype._updateDisabled=function(e){var t=this,r=e.isDisabled.currentValue,n=""===r||r&&"false"!==r;he.then(function(){n&&!t.control.disabled?t.control.disable():!n&&t.control.disabled&&t.control.enable()})},NgModel.decorators=[{type:t.Directive,args:[{selector:"[ngModel]:not([formControlName]):not([formControl])",providers:[pe],exportAs:"ngModel"}]}],NgModel.ctorParameters=[{type:l,decorators:[{type:t.Optional},{type:t.Host}]},{type:Array,decorators:[{type:t.Optional},{type:t.Self},{type:t.Inject,args:[y]}]},{type:Array,decorators:[{type:t.Optional},{type:t.Self},{type:t.Inject,args:[v]}]},{type:Array,decorators:[{type:t.Optional},{type:t.Self},{type:t.Inject,args:[_]}]}],NgModel.propDecorators={name:[{type:t.Input}],isDisabled:[{type:t.Input,args:["disabled"]}],model:[{type:t.Input,args:["ngModel"]}],options:[{type:t.Input,args:["ngModelOptions"]}],update:[{type:t.Output,args:["ngModelChange"]}]},NgModel}(x),de=function(){function ReactiveErrors(){}return ReactiveErrors.controlParentException=function(){throw new Error("formControlName must be used with a parent formGroup directive. You'll want to add a formGroup\n directive and pass it an existing FormGroup instance (you can create one in your class).\n\n Example:\n\n "+oe.formControlName)},ReactiveErrors.ngModelGroupException=function(){throw new Error('formControlName cannot be used with an ngModelGroup parent. It is only compatible with parents\n that also have a "form" prefix: formGroupName, formArrayName, or formGroup.\n\n Option 1: Update the parent to be formGroupName (reactive form strategy)\n\n '+oe.formGroupName+"\n\n Option 2: Use ngModel instead of formControlName (template-driven strategy)\n\n "+oe.ngModelGroup)},ReactiveErrors.missingFormException=function(){throw new Error("formGroup expects a FormGroup instance. Please pass one in.\n\n Example:\n\n "+oe.formControlName)},ReactiveErrors.groupParentException=function(){throw new Error("formGroupName must be used with a parent formGroup directive. You'll want to add a formGroup\n directive and pass it an existing FormGroup instance (you can create one in your class).\n\n Example:\n\n "+oe.formGroupName)},ReactiveErrors.arrayParentException=function(){throw new Error("formArrayName must be used with a parent formGroup directive. You'll want to add a formGroup\n directive and pass it an existing FormGroup instance (you can create one in your class).\n\n Example:\n\n "+oe.formArrayName)},ReactiveErrors.disabledAttrWarning=function(){console.warn("\n It looks like you're using the disabled attribute with a reactive form directive. If you set disabled to true\n when you set up this control in your component class, the disabled attribute will actually be set in the DOM for\n you. We recommend using this approach to avoid 'changed after checked' errors.\n \n Example: \n form = new FormGroup({\n first: new FormControl({value: 'Nancy', disabled: true}, Validators.required),\n last: new FormControl('Drew', Validators.required)\n });\n ")},ReactiveErrors}(),me=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 __)},ye={provide:x,useExisting:t.forwardRef(function(){return ve})},ve=function(e){function FormControlDirective(t,r,n){e.call(this),this.update=new z,this._rawValidators=t||[],this._rawAsyncValidators=r||[],this.valueAccessor=selectValueAccessor(this,n)}return me(FormControlDirective,e),Object.defineProperty(FormControlDirective.prototype,"isDisabled",{set:function(e){de.disabledAttrWarning()},enumerable:!0,configurable:!0}),FormControlDirective.prototype.ngOnChanges=function(e){this._isControlChanged(e)&&(setUpControl(this.form,this),this.control.disabled&&this.valueAccessor.setDisabledState&&this.valueAccessor.setDisabledState(!0),this.form.updateValueAndValidity({emitEvent:!1})),isPropertyUpdated(e,this.viewModel)&&(this.form.setValue(this.model),this.viewModel=this.model)},Object.defineProperty(FormControlDirective.prototype,"path",{get:function(){return[]},enumerable:!0,configurable:!0}),Object.defineProperty(FormControlDirective.prototype,"validator",{get:function(){return composeValidators(this._rawValidators)},enumerable:!0,configurable:!0}),Object.defineProperty(FormControlDirective.prototype,"asyncValidator",{get:function(){return composeAsyncValidators(this._rawAsyncValidators)},enumerable:!0,configurable:!0}),Object.defineProperty(FormControlDirective.prototype,"control",{get:function(){return this.form},enumerable:!0,configurable:!0}),FormControlDirective.prototype.viewToModelUpdate=function(e){this.viewModel=e,this.update.emit(e)},FormControlDirective.prototype._isControlChanged=function(e){return e.hasOwnProperty("form")},FormControlDirective.decorators=[{type:t.Directive,args:[{selector:"[formControl]",providers:[ye],exportAs:"ngForm"}]}],FormControlDirective.ctorParameters=[{type:Array,decorators:[{type:t.Optional},{type:t.Self},{type:t.Inject,args:[y]}]},{type:Array,decorators:[{type:t.Optional},{type:t.Self},{type:t.Inject,args:[v]}]},{type:Array,decorators:[{type:t.Optional},{type:t.Self},{type:t.Inject,args:[_]}]}],FormControlDirective.propDecorators={form:[{type:t.Input,args:["formControl"]}],model:[{type:t.Input,args:["ngModel"]}],update:[{type:t.Output,args:["ngModelChange"]}],isDisabled:[{type:t.Input,args:["disabled"]}]},FormControlDirective}(x),ge=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 __)},_e={provide:l,useExisting:t.forwardRef(function(){return be})},be=function(e){function FormGroupDirective(t,r){e.call(this),this._validators=t,this._asyncValidators=r,this._submitted=!1,this.directives=[],this.form=null,this.ngSubmit=new z}return ge(FormGroupDirective,e),FormGroupDirective.prototype.ngOnChanges=function(e){this._checkFormPresent(),e.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations())},Object.defineProperty(FormGroupDirective.prototype,"submitted",{get:function(){return this._submitted},enumerable:!0,configurable:!0}),Object.defineProperty(FormGroupDirective.prototype,"formDirective",{get:function(){return this},enumerable:!0,configurable:!0}),Object.defineProperty(FormGroupDirective.prototype,"control",{get:function(){return this.form},enumerable:!0,configurable:!0}),Object.defineProperty(FormGroupDirective.prototype,"path",{get:function(){return[]; },enumerable:!0,configurable:!0}),FormGroupDirective.prototype.addControl=function(e){var t=this.form.get(e.path);return setUpControl(t,e),t.updateValueAndValidity({emitEvent:!1}),this.directives.push(e),t},FormGroupDirective.prototype.getControl=function(e){return this.form.get(e.path)},FormGroupDirective.prototype.removeControl=function(e){d.remove(this.directives,e)},FormGroupDirective.prototype.addFormGroup=function(e){var t=this.form.get(e.path);setUpFormContainer(t,e),t.updateValueAndValidity({emitEvent:!1})},FormGroupDirective.prototype.removeFormGroup=function(e){},FormGroupDirective.prototype.getFormGroup=function(e){return this.form.get(e.path)},FormGroupDirective.prototype.addFormArray=function(e){var t=this.form.get(e.path);setUpFormContainer(t,e),t.updateValueAndValidity({emitEvent:!1})},FormGroupDirective.prototype.removeFormArray=function(e){},FormGroupDirective.prototype.getFormArray=function(e){return this.form.get(e.path)},FormGroupDirective.prototype.updateModel=function(e,t){var r=this.form.get(e.path);r.setValue(t)},FormGroupDirective.prototype.onSubmit=function(){return this._submitted=!0,this.ngSubmit.emit(null),!1},FormGroupDirective.prototype.onReset=function(){this.resetForm()},FormGroupDirective.prototype.resetForm=function(e){void 0===e&&(e=void 0),this.form.reset(e),this._submitted=!1},FormGroupDirective.prototype._updateDomValue=function(){var e=this;this.directives.forEach(function(t){var r=e.form.get(t.path);t._control!==r&&(cleanUpControl(t._control,t),r&&setUpControl(r,t),t._control=r)}),this.form._updateTreeValidity({emitEvent:!1})},FormGroupDirective.prototype._updateRegistrations=function(){var e=this;this.form._registerOnCollectionChange(function(){return e._updateDomValue()}),this._oldForm&&this._oldForm._registerOnCollectionChange(function(){}),this._oldForm=this.form},FormGroupDirective.prototype._updateValidators=function(){var e=composeValidators(this._validators);this.form.validator=g.compose([this.form.validator,e]);var t=composeAsyncValidators(this._asyncValidators);this.form.asyncValidator=g.composeAsync([this.form.asyncValidator,t])},FormGroupDirective.prototype._checkFormPresent=function(){this.form||de.missingFormException()},FormGroupDirective.decorators=[{type:t.Directive,args:[{selector:"[formGroup]",providers:[_e],host:{"(submit)":"onSubmit()","(reset)":"onReset()"},exportAs:"ngForm"}]}],FormGroupDirective.ctorParameters=[{type:Array,decorators:[{type:t.Optional},{type:t.Self},{type:t.Inject,args:[y]}]},{type:Array,decorators:[{type:t.Optional},{type:t.Self},{type:t.Inject,args:[v]}]}],FormGroupDirective.propDecorators={form:[{type:t.Input,args:["formGroup"]}],ngSubmit:[{type:t.Output}]},FormGroupDirective}(l),we=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 __)},Ce={provide:l,useExisting:t.forwardRef(function(){return Ee})},Ee=function(e){function FormGroupName(t,r,n){e.call(this),this._parent=t,this._validators=r,this._asyncValidators=n}return we(FormGroupName,e),FormGroupName.prototype._checkParentType=function(){_hasInvalidParent(this._parent)&&de.groupParentException()},FormGroupName.decorators=[{type:t.Directive,args:[{selector:"[formGroupName]",providers:[Ce]}]}],FormGroupName.ctorParameters=[{type:l,decorators:[{type:t.Optional},{type:t.Host},{type:t.SkipSelf}]},{type:Array,decorators:[{type:t.Optional},{type:t.Self},{type:t.Inject,args:[y]}]},{type:Array,decorators:[{type:t.Optional},{type:t.Self},{type:t.Inject,args:[v]}]}],FormGroupName.propDecorators={name:[{type:t.Input,args:["formGroupName"]}]},FormGroupName}(F),Se={provide:l,useExisting:t.forwardRef(function(){return Pe})},Pe=function(e){function FormArrayName(t,r,n){e.call(this),this._parent=t,this._validators=r,this._asyncValidators=n}return we(FormArrayName,e),FormArrayName.prototype.ngOnInit=function(){this._checkParentType(),this.formDirective.addFormArray(this)},FormArrayName.prototype.ngOnDestroy=function(){this.formDirective&&this.formDirective.removeFormArray(this)},Object.defineProperty(FormArrayName.prototype,"control",{get:function(){return this.formDirective.getFormArray(this)},enumerable:!0,configurable:!0}),Object.defineProperty(FormArrayName.prototype,"formDirective",{get:function(){return this._parent?this._parent.formDirective:null},enumerable:!0,configurable:!0}),Object.defineProperty(FormArrayName.prototype,"path",{get:function(){return controlPath(this.name,this._parent)},enumerable:!0,configurable:!0}),Object.defineProperty(FormArrayName.prototype,"validator",{get:function(){return composeValidators(this._validators)},enumerable:!0,configurable:!0}),Object.defineProperty(FormArrayName.prototype,"asyncValidator",{get:function(){return composeAsyncValidators(this._asyncValidators)},enumerable:!0,configurable:!0}),FormArrayName.prototype._checkParentType=function(){_hasInvalidParent(this._parent)&&de.arrayParentException()},FormArrayName.decorators=[{type:t.Directive,args:[{selector:"[formArrayName]",providers:[Se]}]}],FormArrayName.ctorParameters=[{type:l,decorators:[{type:t.Optional},{type:t.Host},{type:t.SkipSelf}]},{type:Array,decorators:[{type:t.Optional},{type:t.Self},{type:t.Inject,args:[y]}]},{type:Array,decorators:[{type:t.Optional},{type:t.Self},{type:t.Inject,args:[v]}]}],FormArrayName.propDecorators={name:[{type:t.Input,args:["formArrayName"]}]},FormArrayName}(l),Ae=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 __)},xe={provide:x,useExisting:t.forwardRef(function(){return Te})},Te=function(e){function FormControlName(t,r,n,i){e.call(this),this._added=!1,this.update=new z,this._parent=t,this._rawValidators=r||[],this._rawAsyncValidators=n||[],this.valueAccessor=selectValueAccessor(this,i)}return Ae(FormControlName,e),Object.defineProperty(FormControlName.prototype,"isDisabled",{set:function(e){de.disabledAttrWarning()},enumerable:!0,configurable:!0}),FormControlName.prototype.ngOnChanges=function(e){this._added||this._setUpControl(),isPropertyUpdated(e,this.viewModel)&&(this.viewModel=this.model,this.formDirective.updateModel(this,this.model))},FormControlName.prototype.ngOnDestroy=function(){this.formDirective&&this.formDirective.removeControl(this)},FormControlName.prototype.viewToModelUpdate=function(e){this.viewModel=e,this.update.emit(e)},Object.defineProperty(FormControlName.prototype,"path",{get:function(){return controlPath(this.name,this._parent)},enumerable:!0,configurable:!0}),Object.defineProperty(FormControlName.prototype,"formDirective",{get:function(){return this._parent?this._parent.formDirective:null},enumerable:!0,configurable:!0}),Object.defineProperty(FormControlName.prototype,"validator",{get:function(){return composeValidators(this._rawValidators)},enumerable:!0,configurable:!0}),Object.defineProperty(FormControlName.prototype,"asyncValidator",{get:function(){return composeAsyncValidators(this._rawAsyncValidators)},enumerable:!0,configurable:!0}),Object.defineProperty(FormControlName.prototype,"control",{get:function(){return this._control},enumerable:!0,configurable:!0}),FormControlName.prototype._checkParentType=function(){!(this._parent instanceof Ee)&&this._parent instanceof F?de.ngModelGroupException():this._parent instanceof Ee||this._parent instanceof be||this._parent instanceof Pe||de.controlParentException()},FormControlName.prototype._setUpControl=function(){this._checkParentType(),this._control=this.formDirective.addControl(this),this.control.disabled&&this.valueAccessor.setDisabledState&&this.valueAccessor.setDisabledState(!0),this._added=!0},FormControlName.decorators=[{type:t.Directive,args:[{selector:"[formControlName]",providers:[xe]}]}],FormControlName.ctorParameters=[{type:l,decorators:[{type:t.Optional},{type:t.Host},{type:t.SkipSelf}]},{type:Array,decorators:[{type:t.Optional},{type:t.Self},{type:t.Inject,args:[y]}]},{type:Array,decorators:[{type:t.Optional},{type:t.Self},{type:t.Inject,args:[v]}]},{type:Array,decorators:[{type:t.Optional},{type:t.Self},{type:t.Inject,args:[_]}]}],FormControlName.propDecorators={name:[{type:t.Input,args:["formControlName"]}],model:[{type:t.Input,args:["ngModel"]}],update:[{type:t.Output,args:["ngModelChange"]}],isDisabled:[{type:t.Input,args:["disabled"]}]},FormControlName}(x),Me={provide:y,useExisting:t.forwardRef(function(){return Ie}),multi:!0},Ie=function(){function RequiredValidator(){}return Object.defineProperty(RequiredValidator.prototype,"required",{get:function(){return this._required},set:function(e){this._required=isPresent(e)&&""+e!="false",this._onChange&&this._onChange()},enumerable:!0,configurable:!0}),RequiredValidator.prototype.validate=function(e){return this.required?g.required(e):null},RequiredValidator.prototype.registerOnValidatorChange=function(e){this._onChange=e},RequiredValidator.decorators=[{type:t.Directive,args:[{selector:"[required][formControlName],[required][formControl],[required][ngModel]",providers:[Me],host:{"[attr.required]":'required? "" : null'}}]}],RequiredValidator.ctorParameters=[],RequiredValidator.propDecorators={required:[{type:t.Input}]},RequiredValidator}(),De={provide:y,useExisting:t.forwardRef(function(){return Ne}),multi:!0},Ne=function(){function MinLengthValidator(){}return MinLengthValidator.prototype._createValidator=function(){this._validator=g.minLength(parseInt(this.minlength,10))},MinLengthValidator.prototype.ngOnChanges=function(e){e.minlength&&(this._createValidator(),this._onChange&&this._onChange())},MinLengthValidator.prototype.validate=function(e){return isPresent(this.minlength)?this._validator(e):null},MinLengthValidator.prototype.registerOnValidatorChange=function(e){this._onChange=e},MinLengthValidator.decorators=[{type:t.Directive,args:[{selector:"[minlength][formControlName],[minlength][formControl],[minlength][ngModel]",providers:[De],host:{"[attr.minlength]":"minlength? minlength : null"}}]}],MinLengthValidator.ctorParameters=[],MinLengthValidator.propDecorators={minlength:[{type:t.Input}]},MinLengthValidator}(),Oe={provide:y,useExisting:t.forwardRef(function(){return Ve}),multi:!0},Ve=function(){function MaxLengthValidator(){}return MaxLengthValidator.prototype._createValidator=function(){this._validator=g.maxLength(parseInt(this.maxlength,10))},MaxLengthValidator.prototype.ngOnChanges=function(e){e.maxlength&&(this._createValidator(),this._onChange&&this._onChange())},MaxLengthValidator.prototype.validate=function(e){return isPresent(this.maxlength)?this._validator(e):null},MaxLengthValidator.prototype.registerOnValidatorChange=function(e){this._onChange=e},MaxLengthValidator.decorators=[{type:t.Directive,args:[{selector:"[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]",providers:[Oe],host:{"[attr.maxlength]":"maxlength? maxlength : null"}}]}],MaxLengthValidator.ctorParameters=[],MaxLengthValidator.propDecorators={maxlength:[{type:t.Input}]},MaxLengthValidator}(),Re={provide:y,useExisting:t.forwardRef(function(){return ke}),multi:!0},ke=function(){function PatternValidator(){}return PatternValidator.prototype._createValidator=function(){this._validator=g.pattern(this.pattern)},PatternValidator.prototype.ngOnChanges=function(e){e.pattern&&(this._createValidator(),this._onChange&&this._onChange())},PatternValidator.prototype.validate=function(e){return isPresent(this.pattern)?this._validator(e):null},PatternValidator.prototype.registerOnValidatorChange=function(e){this._onChange=e},PatternValidator.decorators=[{type:t.Directive,args:[{selector:"[pattern][formControlName],[pattern][formControl],[pattern][ngModel]",providers:[Re],host:{"[attr.pattern]":"pattern? pattern : null"}}]}],PatternValidator.ctorParameters=[],PatternValidator.propDecorators={pattern:[{type:t.Input}]},PatternValidator}(),Le=function(){function FormBuilder(){}return FormBuilder.prototype.group=function(e,t){void 0===t&&(t=null);var r=this._reduceControls(e),n=isPresent(t)?t.validator:null,i=isPresent(t)?t.asyncValidator:null;return new Y(r,n,i)},FormBuilder.prototype.control=function(e,t,r){return void 0===t&&(t=null),void 0===r&&(r=null),new J(e,t,r)},FormBuilder.prototype.array=function(e,t,r){var n=this;void 0===t&&(t=null),void 0===r&&(r=null);var i=e.map(function(e){return n._createControl(e)});return new ee(i,t,r)},FormBuilder.prototype._reduceControls=function(e){var t=this,r={};return Object.keys(e).forEach(function(n){r[n]=t._createControl(e[n])}),r},FormBuilder.prototype._createControl=function(e){if(e instanceof J||e instanceof Y||e instanceof ee)return e;if(isArray(e)){var t=e[0],r=e.length>1?e[1]:null,n=e.length>2?e[2]:null;return this.control(t,r,n)}return this.control(e)},FormBuilder.decorators=[{type:t.Injectable}],FormBuilder.ctorParameters=[],FormBuilder}(),Fe=[O,k,E,P,w,N,R,I,U,H,Ie,Ne,Ve,ke],je=[fe,le,ie],Be=[ve,be,Te,Ee,Pe],We=function(){function InternalFormsSharedModule(){}return InternalFormsSharedModule.decorators=[{type:t.NgModule,args:[{declarations:Fe,exports:Fe}]}],InternalFormsSharedModule.ctorParameters=[],InternalFormsSharedModule}(),Ue=function(){function FormsModule(){}return FormsModule.decorators=[{type:t.NgModule,args:[{declarations:je,providers:[M],exports:[We,je]}]}],FormsModule.ctorParameters=[],FormsModule}(),He=function(){function ReactiveFormsModule(){}return ReactiveFormsModule.decorators=[{type:t.NgModule,args:[{declarations:[Be],providers:[Le,M],exports:[We,Be]}]}],ReactiveFormsModule.ctorParameters=[],ReactiveFormsModule}();e.AbstractControlDirective=a,e.AbstractFormGroupDirective=F,e.CheckboxControlValueAccessor=w,e.ControlContainer=l,e.NG_VALUE_ACCESSOR=_,e.DefaultValueAccessor=E,e.NgControl=x,e.NgControlStatus=U,e.NgControlStatusGroup=H,e.NgForm=ie,e.NgModel=fe,e.NgModelGroup=le,e.RadioControlValueAccessor=I,e.FormControlDirective=ve,e.FormControlName=Te,e.FormGroupDirective=be,e.FormArrayName=Pe,e.FormGroupName=Ee,e.NgSelectOption=O,e.SelectControlValueAccessor=N,e.SelectMultipleControlValueAccessor=R,e.MaxLengthValidator=Ve,e.MinLengthValidator=Ne,e.PatternValidator=ke,e.RequiredValidator=Ie,e.FormBuilder=Le,e.AbstractControl=$,e.FormArray=ee,e.FormControl=J,e.FormGroup=Y,e.NG_ASYNC_VALIDATORS=v,e.NG_VALIDATORS=y,e.Validators=g,e.FormsModule=Ue,e.ReactiveFormsModule=He})},121:function(e,t,r){(function(e){!function(e,n){n(t,r(186),r(2),r(54))}(this,function(t,r,n,i){"use strict";function isPresent(e){return void 0!==e&&null!==e}var o,s=i.__platform_browser_private__.INTERNAL_BROWSER_PLATFORM_PROVIDERS;o="undefined"==typeof window?"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:e:window;var a=o;a.assert=function(e){};var u=(function(){function NumberWrapper(){}return NumberWrapper.toFixed=function(e,t){return e.toFixed(t)},NumberWrapper.equal=function(e,t){return e===t},NumberWrapper.parseIntAutoRadix=function(e){var t=parseInt(e);if(isNaN(t))throw new Error("Invalid integer literal when parsing "+e);return t},NumberWrapper.parseInt=function(e,t){if(10==t){if(/^(\-|\+)?[0-9]+$/.test(e))return parseInt(e,t)}else if(16==t){if(/^(\-|\+)?[0-9ABCDEFabcdef]+$/.test(e))return parseInt(e,t)}else{var r=parseInt(e,t);if(!isNaN(r))return r}throw new Error("Invalid integer literal when parsing "+e+" in base "+t)},Object.defineProperty(NumberWrapper,"NaN",{get:function(){return NaN},enumerable:!0,configurable:!0}),NumberWrapper.isNumeric=function(e){return!isNaN(e-parseFloat(e))},NumberWrapper.isNaN=function(e){return isNaN(e)},NumberWrapper.isInteger=function(e){return Number.isInteger(e)},NumberWrapper}(),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 __)}),l=function(e){function ResourceLoaderImpl(){e.apply(this,arguments)}return u(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=isPresent(i.response)?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:l}]},multi:!0}],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=a.$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:l},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}())},54:function(e,t,r){(function(e){!function(e,n){n(t,r(12),r(2))}(this,function(t,r,n){"use strict";function isPresent(e){return void 0!==e&&null!==e}function isBlank(e){return void 0===e||null===e}function isNumber(e){return"number"==typeof e}function isString(e){return"string"==typeof e}function isArray(e){return Array.isArray(e)}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 setValueOnPath(e,t,r){for(var n=t.split("."),i=e;n.length>1;){var o=n.shift();i=i.hasOwnProperty(o)&&isPresent(i[o])?i[o]:i[o]={}}void 0!==i&&null!==i||(i={}),i[n.shift()]=r}function camelCaseToDashCase(e){return p.replaceAllMapped(e,d,function(e){return"-"+e[1].toLowerCase()})}function dashCaseToCamelCase(e){return p.replaceAllMapped(e,m,function(e){return e[1].toUpperCase()})}function getDOM(){return y}function setRootDomAdapter(e){y||(y=e)}function _computeStyle(e,t){return getDOM().getComputedStyle(e)[t]}function _populateStyles(e,t,r){var i={};return t.styles.forEach(function(e){Object.keys(e).forEach(function(t){var r=e[t],o=dashCaseToCamelCase(t);i[o]=r==n.AUTO_STYLE?r:r.toString()+_resolveStyleUnit(r,t,o)})}),Object.keys(r).forEach(function(e){isPresent(i[e])||(i[e]=r[e])}),i}function _resolveStyleUnit(e,t,r){var n="";if(_isPixelDimensionStyle(r)&&0!=e&&"0"!=e)if(isNumber(e))n="px";else if(0==_findDimensionalSuffix(e.toString()).length)throw new Error("Please provide a CSS unit value for "+t+":"+e);return n}function _findDimensionalSuffix(e){for(var t=0;t=b&&r<=w||r==C))return e.substring(t,e.length)}return""}function _isPixelDimensionStyle(e){switch(e){case"width":case"height":case"minWidth":case"minHeight":case"maxWidth":case"maxHeight":case"left":case"top":case"bottom":case"right":case"fontSize":case"outlineWidth":case"outlineOffset":case"paddingTop":case"paddingLeft":case"paddingBottom":case"paddingRight":case"marginTop":case"marginLeft":case"marginBottom":case"marginRight":case"borderRadius":case"borderWidth":case"borderTopWidth":case"borderLeftWidth":case"borderRightWidth":case"borderBottomWidth":case"textIndent":return!0;default:return!1}}function getBaseElementHref(){return D||(D=document.querySelector("base"))?D.getAttribute("href"):null}function relativePath(e){return c||(c=document.createElement("a")),c.setAttribute("href",e),"/"===c.pathname.charAt(0)?c.pathname:"/"+c.pathname}function parseCookieValue(e,t){t=encodeURIComponent(t);for(var r=0,n=e.split(";");r0&&isPresent(r)){var n=getDOM().nextSibling(e);if(isPresent(n))for(var i=0;i/g,">")}function stripCustomNsAttrs(e){Se.attributeMap(e).forEach(function(t,r){"xmlns:ns1"!==r&&0!==r.indexOf("ns1:")||Se.removeAttribute(e,r)});for(var t=0,r=Se.childNodesAsList(e);t=0&&e[n]==t;n--)r--;e=e.substring(0,r)}return e},StringWrapper.replace=function(e,t,r){return e.replace(t,r)},StringWrapper.replaceAll=function(e,t,r){return e.replace(t,r)},StringWrapper.slice=function(e,t,r){return void 0===t&&(t=0),void 0===r&&(r=null),e.slice(t,null===r?void 0:r)},StringWrapper.replaceAllMapped=function(e,t,r){return e.replace(t,function(){for(var e=[],t=0;tt?1:0},StringWrapper}(),h=function(){function NumberWrapper(){}return NumberWrapper.toFixed=function(e,t){return e.toFixed(t)},NumberWrapper.equal=function(e,t){return e===t},NumberWrapper.parseIntAutoRadix=function(e){var t=parseInt(e);if(isNaN(t))throw new Error("Invalid integer literal when parsing "+e);return t},NumberWrapper.parseInt=function(e,t){if(10==t){if(/^(\-|\+)?[0-9]+$/.test(e))return parseInt(e,t)}else if(16==t){if(/^(\-|\+)?[0-9ABCDEFabcdef]+$/.test(e))return parseInt(e,t)}else{var r=parseInt(e,t);if(!isNaN(r))return r}throw new Error("Invalid integer literal when parsing "+e+" in base "+t)},Object.defineProperty(NumberWrapper,"NaN",{get:function(){return NaN},enumerable:!0,configurable:!0}),NumberWrapper.isNumeric=function(e){return!isNaN(e-parseFloat(e))},NumberWrapper.isNaN=function(e){return isNaN(e)},NumberWrapper.isInteger=function(e){return Number.isInteger(e)},NumberWrapper}(),f=function(){function Json(){}return Json.parse=function(e){return l.JSON.parse(e)},Json.stringify=function(e){return l.JSON.stringify(e,null,2)},Json}(),d=/([A-Z])/g,m=/-([a-z])/g,y=null,v=function(){function DomAdapter(){this.resourceLoaderType=null}return Object.defineProperty(DomAdapter.prototype,"attrToPropMap",{get:function(){return this._attrToPropMap},set:function(e){this._attrToPropMap=e},enumerable:!0,configurable:!0}),DomAdapter}(),g=function(){function WebAnimationsPlayer(e,t,r){this.element=e,this.keyframes=t,this.options=r,this._onDoneFns=[],this._onStartFns=[],this._finished=!1,this._initialized=!1,this._started=!1,this.parentPlayer=null,this._duration=r.duration}return WebAnimationsPlayer.prototype._onFinish=function(){this._finished||(this._finished=!0,isPresent(this.parentPlayer)||this.destroy(),this._onDoneFns.forEach(function(e){return e()}),this._onDoneFns=[])},WebAnimationsPlayer.prototype.init=function(){var e=this;if(!this._initialized){this._initialized=!0;var t=this.keyframes.map(function(t){var r={};return Object.keys(t).forEach(function(i){var o=t[i];r[i]=o==n.AUTO_STYLE?_computeStyle(e.element,i):o}),r});this._player=this._triggerWebAnimation(this.element,t,this.options),this.reset(),this._player.onfinish=function(){return e._onFinish()}}},WebAnimationsPlayer.prototype._triggerWebAnimation=function(e,t,r){return e.animate(t,r)},WebAnimationsPlayer.prototype.onStart=function(e){this._onStartFns.push(e)},WebAnimationsPlayer.prototype.onDone=function(e){this._onDoneFns.push(e)},WebAnimationsPlayer.prototype.play=function(){this.init(),this.hasStarted()||(this._onStartFns.forEach(function(e){return e()}),this._onStartFns=[],this._started=!0),this._player.play()},WebAnimationsPlayer.prototype.pause=function(){this.init(),this._player.pause()},WebAnimationsPlayer.prototype.finish=function(){this.init(),this._onFinish(),this._player.finish()},WebAnimationsPlayer.prototype.reset=function(){this._player.cancel()},WebAnimationsPlayer.prototype.restart=function(){this.reset(),this.play()},WebAnimationsPlayer.prototype.hasStarted=function(){return this._started},WebAnimationsPlayer.prototype.destroy=function(){this.reset(),this._onFinish()},Object.defineProperty(WebAnimationsPlayer.prototype,"totalTime",{get:function(){return this._duration},enumerable:!0,configurable:!0}),WebAnimationsPlayer.prototype.setPosition=function(e){this._player.currentTime=e*this.totalTime},WebAnimationsPlayer.prototype.getPosition=function(){return this._player.currentTime/this.totalTime},WebAnimationsPlayer}(),_=function(){function WebAnimationsDriver(){}return WebAnimationsDriver.prototype.animate=function(e,t,r,n,i,o){var s=[],a={};if(isPresent(t)&&t.styles.length>0&&(a=_populateStyles(e,t,{}),a.offset=0,s.push(a)),r.forEach(function(t){var r=_populateStyles(e,t.styles,a);r.offset=t.offset,s.push(r)}),1==s.length){var u=s[0];u.offset=null,s=[u,u]}var l={duration:n,delay:i,fill:"both"};return o&&(l.easing=o),new g(e,s,l)},WebAnimationsDriver}(),b=48,w=57,C=46,E=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 __)},S=function(e){function GenericBrowserDomAdapter(){var t=this;e.call(this),this._animationPrefix=null,this._transitionEnd=null;try{var r=this.createElement("div",this.defaultDoc());if(isPresent(this.getStyle(r,"animationName")))this._animationPrefix="";else for(var n=["Webkit","Moz","O","ms"],i=0;i0},BrowserDomAdapter.prototype.tagName=function(e){return e.tagName},BrowserDomAdapter.prototype.attributeMap=function(e){for(var t=new Map,r=e.attributes,n=0;n-1&&(e.splice(r,1),!0)},ListWrapper.clear=function(e){e.length=0},ListWrapper.isEmpty=function(e){return 0==e.length},ListWrapper.fill=function(e,t,r,n){void 0===r&&(r=0),void 0===n&&(n=null),e.fill(t,r,null===n?e.length:n)},ListWrapper.equals=function(e,t){if(e.length!=t.length)return!1;for(var r=0;rn&&(r=o,n=s)}}return r},ListWrapper.flatten=function(e){var t=[];return _flattenArray(e,t),t},ListWrapper.addAll=function(e,t){for(var r=0;r-1},HammerGesturesPlugin.decorators=[{type:n.Injectable}],HammerGesturesPlugin.ctorParameters=[{type:me,decorators:[{type:n.Inject,args:[de]}]}],HammerGesturesPlugin}(he),ve=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 __)},ge=["alt","control","meta","shift"],_e={alt:function(e){return e.altKey},control:function(e){return e.ctrlKey},meta:function(e){return e.metaKey},shift:function(e){return e.shiftKey}},be=function(e){function KeyEventsPlugin(){e.call(this)}return ve(KeyEventsPlugin,e),KeyEventsPlugin.prototype.supports=function(e){return isPresent(KeyEventsPlugin.parseEventName(e))},KeyEventsPlugin.prototype.addEventListener=function(e,t,r){var n=KeyEventsPlugin.parseEventName(t),i=KeyEventsPlugin.eventCallback(e,n.fullKey,r,this.manager.getZone());return this.manager.getZone().runOutsideAngular(function(){return getDOM().onAndCancel(e,n.domEventName,i)})},KeyEventsPlugin.parseEventName=function(e){var t=e.toLowerCase().split("."),r=t.shift();if(0===t.length||!p.equals(r,"keydown")&&!p.equals(r,"keyup"))return null;var n=KeyEventsPlugin._normalizeKey(t.pop()),i="";if(ge.forEach(function(e){R.contains(t,e)&&(R.remove(t,e),i+=e+".")}),i+=n,0!=t.length||0===n.length)return null;var o={};return o.domEventName=r,o.fullKey=i,o},KeyEventsPlugin.getEventFullKey=function(e){var t="",r=getDOM().getEventKey(e);return r=r.toLowerCase(),p.equals(r," ")?r="space":p.equals(r,".")&&(r="dot"),ge.forEach(function(n){if(n!=r){var i=_e[n];i(e)&&(t+=n+".")}}),t+=r},KeyEventsPlugin.eventCallback=function(e,t,r,n){return function(e){p.equals(KeyEventsPlugin.getEventFullKey(e),t)&&n.runGuarded(function(){return r(e)})}},KeyEventsPlugin._normalizeKey=function(e){switch(e){case"esc":return"escape";default:return e}},KeyEventsPlugin.decorators=[{type:n.Injectable}],KeyEventsPlugin.ctorParameters=[],KeyEventsPlugin}(W),we=/^(?:(?:https?|mailto|ftp|tel|file):|[^&:\/?#]*(?:[\/?#]|$))/gi,Ce=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+\/]+=*$/i,Ee=null,Se=null,Pe=tagSet("area,br,col,hr,img,wbr"),Ae=tagSet("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),xe=tagSet("rp,rt"),Te=merge(xe,Ae),Me=merge(Ae,tagSet("address,article,aside,blockquote,caption,center,del,details,dialog,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,main,map,menu,nav,ol,pre,section,summary,table,ul")),Ie=merge(xe,tagSet("a,abbr,acronym,audio,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,picture,q,ruby,rp,rt,s,samp,small,source,span,strike,strong,sub,sup,time,track,tt,u,var,video")),De=merge(Pe,Me,Ie,Te),Ne=tagSet("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),Oe=tagSet("srcset"),Ve=tagSet("abbr,accesskey,align,alt,autoplay,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,controls,coords,datetime,default,dir,download,face,headers,height,hidden,hreflang,hspace,ismap,itemscope,itemprop,kind,label,lang,language,loop,media,muted,nohref,nowrap,open,preload,rel,rev,role,rows,rowspan,rules,scope,scrolling,shape,size,sizes,span,srclang,start,summary,tabindex,target,title,translate,type,usemap,valign,value,vspace,width"),Re=merge(Ne,Oe,Ve),ke=function(){function SanitizingHtmlSerializer(){this.sanitizedSomething=!1,this.buf=[]}return SanitizingHtmlSerializer.prototype.sanitizeChildren=function(e){for(var t=e.firstChild;t;)if(Se.isElementNode(t)?this.startElement(t):Se.isTextNode(t)?this.chars(Se.nodeValue(t)):this.sanitizedSomething=!0,Se.firstChild(t))t=Se.firstChild(t);else for(;t;){if(Se.isElementNode(t)&&this.endElement(t),Se.nextSibling(t)){t=Se.nextSibling(t);break}t=Se.parentElement(t)}return this.buf.join("")},SanitizingHtmlSerializer.prototype.startElement=function(e){var t=this,r=Se.nodeName(e).toLowerCase();return De.hasOwnProperty(r)?(this.buf.push("<"),this.buf.push(r),Se.attributeMap(e).forEach(function(e,r){var n=r.toLowerCase();return Re.hasOwnProperty(n)?(Ne[n]&&(e=sanitizeUrl(e)),Oe[n]&&(e=sanitizeSrcset(e)),t.buf.push(" "),t.buf.push(r),t.buf.push('="'),t.buf.push(encodeEntities(e)),void t.buf.push('"')):void(t.sanitizedSomething=!0)}),void this.buf.push(">")):void(this.sanitizedSomething=!0); },SanitizingHtmlSerializer.prototype.endElement=function(e){var t=Se.nodeName(e).toLowerCase();De.hasOwnProperty(t)&&!Pe.hasOwnProperty(t)&&(this.buf.push(""))},SanitizingHtmlSerializer.prototype.chars=function(e){this.buf.push(encodeEntities(e))},SanitizingHtmlSerializer}(),Le=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Fe=/([^\#-~ |!])/g,je="[-,.\"'%_!# a-zA-Z0-9]+",Be="(?:matrix|translate|scale|rotate|skew|perspective)(?:X|Y|3d)?",We="(?:rgb|hsl)a?",Ue="\\([-0-9.%, a-zA-Z]+\\)",He=new RegExp("^("+je+"|(?:"+Be+"|"+We+")"+Ue+")$","g"),Ge=/^url\(([^)]+)\)$/,ze=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 __)},qe=function(){function DomSanitizer(){}return DomSanitizer}(),Ke=function(e){function DomSanitizerImpl(){e.apply(this,arguments)}return ze(DomSanitizerImpl,e),DomSanitizerImpl.prototype.sanitize=function(e,t){if(null==t)return null;switch(e){case n.SecurityContext.NONE:return t;case n.SecurityContext.HTML:return t instanceof Ze?t.changingThisBreaksApplicationSecurity:(this.checkNotSafeValue(t,"HTML"),sanitizeHtml(String(t)));case n.SecurityContext.STYLE:return t instanceof Xe?t.changingThisBreaksApplicationSecurity:(this.checkNotSafeValue(t,"Style"),sanitizeStyle(t));case n.SecurityContext.SCRIPT:if(t instanceof $e)return t.changingThisBreaksApplicationSecurity;throw this.checkNotSafeValue(t,"Script"),new Error("unsafe value used in a script context");case n.SecurityContext.URL:return t instanceof Ye||t instanceof Je?t.changingThisBreaksApplicationSecurity:(this.checkNotSafeValue(t,"URL"),sanitizeUrl(String(t)));case n.SecurityContext.RESOURCE_URL:if(t instanceof Ye)return t.changingThisBreaksApplicationSecurity;throw this.checkNotSafeValue(t,"ResourceURL"),new Error("unsafe value used in a resource URL context (see http://g.co/ng/security#xss)");default:throw new Error("Unexpected SecurityContext "+e+" (see http://g.co/ng/security#xss)")}},DomSanitizerImpl.prototype.checkNotSafeValue=function(e,t){if(e instanceof Qe)throw new Error("Required a safe "+t+", got a "+e.getTypeName()+" (see http://g.co/ng/security#xss)")},DomSanitizerImpl.prototype.bypassSecurityTrustHtml=function(e){return new Ze(e)},DomSanitizerImpl.prototype.bypassSecurityTrustStyle=function(e){return new Xe(e)},DomSanitizerImpl.prototype.bypassSecurityTrustScript=function(e){return new $e(e)},DomSanitizerImpl.prototype.bypassSecurityTrustUrl=function(e){return new Je(e)},DomSanitizerImpl.prototype.bypassSecurityTrustResourceUrl=function(e){return new Ye(e)},DomSanitizerImpl.decorators=[{type:n.Injectable}],DomSanitizerImpl.ctorParameters=[],DomSanitizerImpl}(qe),Qe=function(){function SafeValueImpl(e){this.changingThisBreaksApplicationSecurity=e}return SafeValueImpl.prototype.toString=function(){return"SafeValue must use [property]=binding: "+this.changingThisBreaksApplicationSecurity+" (see http://g.co/ng/security#xss)"},SafeValueImpl}(),Ze=function(e){function SafeHtmlImpl(){e.apply(this,arguments)}return ze(SafeHtmlImpl,e),SafeHtmlImpl.prototype.getTypeName=function(){return"HTML"},SafeHtmlImpl}(Qe),Xe=function(e){function SafeStyleImpl(){e.apply(this,arguments)}return ze(SafeStyleImpl,e),SafeStyleImpl.prototype.getTypeName=function(){return"Style"},SafeStyleImpl}(Qe),$e=function(e){function SafeScriptImpl(){e.apply(this,arguments)}return ze(SafeScriptImpl,e),SafeScriptImpl.prototype.getTypeName=function(){return"Script"},SafeScriptImpl}(Qe),Je=function(e){function SafeUrlImpl(){e.apply(this,arguments)}return ze(SafeUrlImpl,e),SafeUrlImpl.prototype.getTypeName=function(){return"URL"},SafeUrlImpl}(Qe),Ye=function(e){function SafeResourceUrlImpl(){e.apply(this,arguments)}return ze(SafeResourceUrlImpl,e),SafeResourceUrlImpl.prototype.getTypeName=function(){return"ResourceURL"},SafeResourceUrlImpl}(Qe),et=[{provide:n.PLATFORM_INITIALIZER,useValue:initDomAdapter,multi:!0},{provide:r.PlatformLocation,useClass:O}],tt=[{provide:n.Sanitizer,useExisting:qe},{provide:qe,useClass:Ke}],rt=n.createPlatformFactory(n.platformCore,"browser",et),nt=function(){function BrowserModule(e){if(e)throw new Error("BrowserModule has already been loaded. If you need access to common directives such as NgIf and NgFor from a lazy loaded module, import CommonModule instead.")}return BrowserModule.decorators=[{type:n.NgModule,args:[{providers:[tt,{provide:n.ErrorHandler,useFactory:errorHandler,deps:[]},{provide:F,useFactory:_document,deps:[]},{provide:j,useClass:le,multi:!0},{provide:j,useClass:be,multi:!0},{provide:j,useClass:ye,multi:!0},{provide:de,useClass:me},{provide:Z,useClass:X},{provide:n.RootRenderer,useExisting:Z},{provide:H,useExisting:G},{provide:u,useFactory:_resolveDefaultAnimationDriver},G,n.Testability,B,ae,L],exports:[r.CommonModule,n.ApplicationModule]}]}],BrowserModule.ctorParameters=[{type:BrowserModule,decorators:[{type:n.Optional},{type:n.SkipSelf}]}],BrowserModule}(),it="undefined"!=typeof window&&window||{},ot=function(){function ChangeDetectionPerfRecord(e,t){this.msPerTick=e,this.numTicks=t}return ChangeDetectionPerfRecord}(),st=function(){function AngularTools(e){this.profiler=new at(e)}return AngularTools}(),at=function(){function AngularProfiler(e){this.appRef=e.injector.get(n.ApplicationRef)}return AngularProfiler.prototype.timeChangeDetection=function(e){var t=isPresent(e)&&e.record,r="Change Detection",n=isPresent(it.console.profile);t&&n&&it.console.profile(r);for(var i=getDOM().performanceNow(),o=0;o<5||getDOM().performanceNow()-i<500;)this.appRef.tick(),o++;var s=getDOM().performanceNow();t&&n&&it.console.profileEnd(r);var a=(s-i)/o;return it.console.log("ran "+o+" change detection cycles"),it.console.log(h.toFixed(a,2)+" ms per check"),new ot(a,o)},AngularProfiler}(),ut=l,lt=function(){function By(){}return By.all=function(){return function(e){return!0}},By.css=function(e){return function(t){return!!isPresent(t.nativeElement)&&getDOM().elementMatches(t.nativeElement,e)}},By.directive=function(e){return function(t){return t.providerTokens.indexOf(e)!==-1}},By}(),ct={BrowserPlatformLocation:O,DomAdapter:v,BrowserDomAdapter:I,BrowserGetTestability:k,getDOM:getDOM,setRootDomAdapter:setRootDomAdapter,DomRootRenderer_:X,DomRootRenderer:Z,DomSharedStylesHost:G,SharedStylesHost:H,ELEMENT_PROBE_PROVIDERS:ae,DomEventsPlugin:le,KeyEventsPlugin:be,HammerGesturesPlugin:ye,initDomAdapter:initDomAdapter,INTERNAL_BROWSER_PLATFORM_PROVIDERS:et,BROWSER_SANITIZATION_PROVIDERS:tt};t.BrowserModule=nt,t.platformBrowser=rt,t.Title=L,t.disableDebugTools=disableDebugTools,t.enableDebugTools=enableDebugTools,t.AnimationDriver=u,t.By=lt,t.NgProbeToken=se,t.DOCUMENT=F,t.EVENT_MANAGER_PLUGINS=j,t.EventManager=B,t.HAMMER_GESTURE_CONFIG=de,t.HammerGestureConfig=me,t.DomSanitizer=qe,t.__platform_browser_private__=ct})}).call(t,function(){return this}())},193:function(e,t,r){"use strict";var n=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 __)},i=r(24),o=function(e){function InnerSubscriber(t,r,n){e.call(this),this.parent=t,this.outerValue=r,this.outerIndex=n,this.index=0}return n(InnerSubscriber,e),InnerSubscriber.prototype._next=function(e){this.parent.notifyNext(this.outerValue,e,this.outerIndex,this.index++,this)},InnerSubscriber.prototype._error=function(e){this.parent.notifyError(e,this),this.unsubscribe()},InnerSubscriber.prototype._complete=function(){this.parent.notifyComplete(this),this.unsubscribe()},InnerSubscriber}(i.Subscriber);t.InnerSubscriber=o},8:function(e,t,r){"use strict";var n=r(25),i=r(225),o=r(69),s=function(){function Observable(e){this._isScalar=!1,e&&(this._subscribe=e)}return Observable.prototype.lift=function(e){var t=new Observable;return t.source=this,t.operator=e,t},Observable.prototype.subscribe=function(e,t,r){var n=this.operator,o=i.toSubscriber(e,t,r);if(n?n.call(o,this):o.add(this._subscribe(o)),o.syncErrorThrowable&&(o.syncErrorThrowable=!1,o.syncErrorThrown))throw o.syncErrorValue;return o},Observable.prototype.forEach=function(e,t){var r=this;if(t||(n.root.Rx&&n.root.Rx.config&&n.root.Rx.config.Promise?t=n.root.Rx.config.Promise:n.root.Promise&&(t=n.root.Promise)),!t)throw new Error("no Promise impl found");return new t(function(t,n){var i=r.subscribe(function(t){if(i)try{e(t)}catch(r){n(r),i.unsubscribe()}else e(t)},n,t)})},Observable.prototype._subscribe=function(e){return this.source.subscribe(e)},Observable.prototype[o.$$observable]=function(){return this},Observable.create=function(e){return new Observable(e)},Observable}();t.Observable=s},195:function(e,t){"use strict";t.empty={closed:!0,next:function(e){},error:function(e){throw e},complete:function(){}}},196:function(e,t,r){"use strict";var n=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 __)},i=r(24),o=function(e){function OuterSubscriber(){e.apply(this,arguments)}return n(OuterSubscriber,e),OuterSubscriber.prototype.notifyNext=function(e,t,r,n,i){this.destination.next(t)},OuterSubscriber.prototype.notifyError=function(e,t){this.destination.error(e)},OuterSubscriber.prototype.notifyComplete=function(e){this.destination.complete()},OuterSubscriber}(i.Subscriber);t.OuterSubscriber=o},122:function(e,t,r){"use strict";var n=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 __)},i=r(8),o=r(24),s=r(55),a=r(220),u=r(198),l=r(70),c=function(e){function SubjectSubscriber(t){e.call(this,t),this.destination=t}return n(SubjectSubscriber,e),SubjectSubscriber}(o.Subscriber);t.SubjectSubscriber=c;var p=function(e){function Subject(){e.call(this),this.observers=[],this.closed=!1,this.isStopped=!1,this.hasError=!1,this.thrownError=null}return n(Subject,e),Subject.prototype[l.$$rxSubscriber]=function(){return new c(this)},Subject.prototype.lift=function(e){var t=new h(this,this);return t.operator=e,t},Subject.prototype.next=function(e){if(this.closed)throw new a.ObjectUnsubscribedError;if(!this.isStopped)for(var t=this.observers,r=t.length,n=t.slice(),i=0;i0?this._next(t.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()},MergeMapSubscriber}(o.OuterSubscriber);t.MergeMapSubscriber=a},215:function(e,t,r){"use strict";function toPromise(e){var t=this;if(e||(n.root.Rx&&n.root.Rx.config&&n.root.Rx.config.Promise?e=n.root.Rx.config.Promise:n.root.Promise&&(e=n.root.Promise)),!e)throw new Error("no Promise impl found");return new e(function(e,r){var n;t.subscribe(function(e){return n=e},function(e){return r(e)},function(){return e(n)})})}var n=r(25);t.toPromise=toPromise},68:function(e,t,r){"use strict";var n=r(25),i=n.root.Symbol;if("function"==typeof i)i.iterator?t.$$iterator=i.iterator:"function"==typeof i.for&&(t.$$iterator=i.for("iterator"));else if(n.root.Set&&"function"==typeof(new n.root.Set)["@@iterator"])t.$$iterator="@@iterator";else if(n.root.Map)for(var o=Object.getOwnPropertyNames(n.root.Map.prototype),s=0;s