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?e.name:typeof e}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 isFunction(e){return"function"==typeof e}function isStringMap(e){return"object"==typeof e&&null!==e}function isPromise(e){return isPresent(e)&&isFunction(e.then)}function isArray(e){return Array.isArray(e)}function isDate(e){return e instanceof u&&!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(d))if(isPresent(n.Symbol)&&isPresent(Symbol.iterator))d=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,u=e.split("-")[0].toLowerCase();switch(u){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?l.One:l.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?l.One:l.Other;case"am":case"as":case"bn":case"fa":case"gu":case"hi":case"kn":case"mr":case"zu":return 0===i||1===r?l.One:l.Other;case"ar":return 0===r?l.Zero:1===r?l.One:2===r?l.Two:r%100===Math.floor(r%100)&&r%100>=3&&r%100<=10?l.Few:r%100===Math.floor(r%100)&&r%100>=11&&r%100<=99?l.Many:l.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?l.One:l.Other;case"be":return r%10===1&&r%100!==11?l.One:r%10===Math.floor(r%10)&&r%10>=2&&r%10<=4&&!(r%100>=12&&r%100<=14)?l.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?l.Many:l.Other;case"br":return r%10===1&&r%100!==11&&r%100!==71&&r%100!==91?l.One:r%10===2&&r%100!==12&&r%100!==72&&r%100!==92?l.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)?l.Few:0!==r&&r%1e6===0?l.Many:l.Other;case"bs":case"hr":case"sr":return 0===o&&i%10===1&&i%100!==11||s%10===1&&s%100!==11?l.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)?l.Few:l.Other;case"cs":case"sk":return 1===i&&0===o?l.One:i===Math.floor(i)&&i>=2&&i<=4&&0===o?l.Few:0!==o?l.Many:l.Other;case"cy":return 0===r?l.Zero:1===r?l.One:2===r?l.Two:3===r?l.Few:6===r?l.Many:l.Other;case"da":return 1===r||0!==a&&(0===i||1===i)?l.One:l.Other;case"dsb":case"hsb":return 0===o&&i%100===1||s%100===1?l.One:0===o&&i%100===2||s%100===2?l.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?l.Few:l.Other;case"ff":case"fr":case"hy":case"kab":return 0===i||1===i?l.One:l.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?l.One:l.Other;case"ga":return 1===r?l.One:2===r?l.Two:r===Math.floor(r)&&r>=3&&r<=6?l.Few:r===Math.floor(r)&&r>=7&&r<=10?l.Many:l.Other;case"gd":return 1===r||11===r?l.One:2===r||12===r?l.Two:r===Math.floor(r)&&(r>=3&&r<=10||r>=13&&r<=19)?l.Few:l.Other;case"gv":return 0===o&&i%10===1?l.One:0===o&&i%10===2?l.Two:0!==o||i%100!==0&&i%100!==20&&i%100!==40&&i%100!==60&&i%100!==80?0!==o?l.Many:l.Other:l.Few;case"he":return 1===i&&0===o?l.One:2===i&&0===o?l.Two:0!==o||r>=0&&r<=10||r%10!==0?l.Other:l.Many;case"is":return 0===a&&i%10===1&&i%100!==11||0!==a?l.One:l.Other;case"ksh":return 0===r?l.Zero:1===r?l.One:l.Other;case"kw":case"naq":case"se":case"smn":return 1===r?l.One:2===r?l.Two:l.Other;case"lag":return 0===r?l.Zero:0!==i&&1!==i||0===r?l.Other:l.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)?l.Few:0!==s?l.Many:l.Other:l.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?l.Zero:r%10===1&&r%100!==11||2===o&&s%10===1&&s%100!==11||2!==o&&s%10===1?l.One:l.Other;case"mk":return 0===o&&i%10===1||s%10===1?l.One:l.Other;case"mt":return 1===r?l.One:0===r||r%100===Math.floor(r%100)&&r%100>=2&&r%100<=10?l.Few:r%100===Math.floor(r%100)&&r%100>=11&&r%100<=19?l.Many:l.Other;case"pl":return 1===i&&0===o?l.One:0===o&&i%10===Math.floor(i%10)&&i%10>=2&&i%10<=4&&!(i%100>=12&&i%100<=14)?l.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?l.Many:l.Other;case"pt":return r===Math.floor(r)&&r>=0&&r<=2&&2!==r?l.One:l.Other;case"ro":return 1===i&&0===o?l.One:0!==o||0===r||1!==r&&r%100===Math.floor(r%100)&&r%100>=1&&r%100<=19?l.Few:l.Other;case"ru":case"uk":return 0===o&&i%10===1&&i%100!==11?l.One:0===o&&i%10===Math.floor(i%10)&&i%10>=2&&i%10<=4&&!(i%100>=12&&i%100<=14)?l.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?l.Many:l.Other;case"shi":return 0===i||1===r?l.One:r===Math.floor(r)&&r>=2&&r<=10?l.Few:l.Other;case"si":return 0===r||1===r||0===i&&1===s?l.One:l.Other;case"sl":return 0===o&&i%100===1?l.One:0===o&&i%100===2?l.Two:0===o&&i%100===Math.floor(i%100)&&i%100>=3&&i%100<=4||0!==o?l.Few:l.Other;case"tzm":return r===Math.floor(r)&&r>=0&&r<=1||r===Math.floor(r)&&r>=11&&r<=99?l.One:l.Other;default:return l.Other}}function _flattenArray(e,t){if(isPresent(e))for(var r=0;r=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}(),p=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}(),h=function(){function Json(){}return Json.parse=function(e){return a.JSON.parse(e)},Json.stringify=function(e){return a.JSON.stringify(e,null,2)},Json}(),f=function(){function DateWrapper(){}return DateWrapper.create=function(e,t,r,n,i,o,s){return void 0===t&&(t=1),void 0===r&&(r=1),void 0===n&&(n=0),void 0===i&&(i=0),void 0===o&&(o=0),void 0===s&&(s=0),new u(e,t-1,r,n,i,o,s)},DateWrapper.fromISOString=function(e){return new u(e)},DateWrapper.fromMillis=function(e){return new u(e)},DateWrapper.toMillis=function(e){return e.getTime()},DateWrapper.now=function(){return new u},DateWrapper.toJson=function(e){return e.toJSON()},DateWrapper}(),d=null,m=function(){function Location(e){var t=this;this._subject=new r.EventEmitter,this._platformStrategy=e;var n=this._platformStrategy.getBaseHref();this._baseHref=Location.stripTrailingSlash(_stripIndexHtml(n)),this._platformStrategy.onPopState(function(e){t._subject.emit({url:t.path(!0),pop:!0,type:e.type})})}return Location.prototype.path=function(e){return void 0===e&&(e=!1),this.normalize(this._platformStrategy.path(e))},Location.prototype.isCurrentPathEqualTo=function(e,t){return void 0===t&&(t=""),this.path()==this.normalize(e+Location.normalizeQueryParams(t))},Location.prototype.normalize=function(e){return Location.stripTrailingSlash(_stripBaseHref(this._baseHref,_stripIndexHtml(e)))},Location.prototype.prepareExternalUrl=function(e){return e.length>0&&!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}(),y=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 __)},v=function(e){function HashLocationStrategy(t,r){e.call(this),this._platformLocation=t,this._baseHref="",isPresent(r)&&(this._baseHref=r)}return y(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=m.joinWithSlash(this._baseHref,e);return t.length>0?"#"+t:t},HashLocationStrategy.prototype.pushState=function(e,t,r,n){var i=this.prepareExternalUrl(r+m.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+m.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),g=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){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 g(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 m.joinWithSlash(this._baseHref,e)},PathLocationStrategy.prototype.path=function(e){void 0===e&&(e=!1);var t=this._platformLocation.pathname+m.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+m.normalizeQueryParams(n));this._platformLocation.pushState(e,t,i)},PathLocationStrategy.prototype.replaceState=function(e,t,r,n){var i=this.prepareExternalUrl(r+m.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),b=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 __)},w=function(){function NgLocalization(){}return NgLocalization}(),C=function(e){function NgLocaleLocalization(t){e.call(this),this._locale=t}return b(NgLocaleLocalization,e),NgLocaleLocalization.prototype.getPluralCategory=function(e){var t=getPluralCase(this._locale,e);switch(t){case l.Zero:return"zero";case l.One:return"one";case l.Two:return"two";case l.Few:return"few";case l.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}(w);!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"}(l||(l={}));var E,S=a.Map,P=a.Set,A=(function(){try{if(1===new S([[1,2]]).size)return function(e){return new S(e)}}catch(e){}return function(e){for(var t=new S,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=er&&e<=or||e==Jr}function isDigit(e){return xr<=e&&e<=Tr}function isAsciiLetter(e){return e>=jr&&e<=Qr||e>=Mr&&e<=Vr}function isAsciiHexDigit(e){return e>=jr&&e<=Wr||e>=Mr&&e<=Dr||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===Yt}function isNameEnd(e){return isWhitespace(e)||e===Pr||e===br||e===hr||e===ar||e===Sr}function isPrefixEnd(e){return(eTr)}function isDigitEntityEnd(e){return e==Cr||e==Yt||!isAsciiHexDigit(e)}function isNamedEntityEnd(e){return e==Cr||e==Yt||!isAsciiLetter(e)}function isExpansionFormStart(e,t,r){var n=!!r&&e.indexOf(r.start,t)==t;return e.charCodeAt(t)==Zr&&!n}function isExpansionCaseStart(e){return e===Sr||isAsciiLetter(e)}function compareCharCodeCaseInsensitive(e,t){return toUpperCaseCharCode(e)==toUpperCaseCharCode(t)}function toUpperCaseCharCode(e){return e>=jr&&e<=Qr?e-jr+Mr: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(Wn,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 Jn($n,e);return function(e,r,n){return t.toI18nMessage(e,r,n)}}function _extractPlaceholderName(e){return e.split(Yn)[1]}function extractMessages(e,t,r,n){var i=new ai(r,n);return i.extract(e,t)}function mergeTranslations(e,t,r,n,i){var o=new ai(n,i);return o.merge(e,t,r)}function _isOpeningComment(e){return e instanceof An&&e.value&&e.value.startsWith("i18n")}function _isClosingComment(e){return e instanceof An&&e.value&&"/i18n"===e.value}function _getI18nAttr(e){return e.attrs.find(function(e){return e.name===ri})||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 ci}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(di)}).join("")}function _escapeXml(e){return _i.reduce(function(e,t){return e.replace(t[0],t[1])},e)}function resolveIdentifier(e){return new ht({name:e.name,moduleUrl:e.moduleUrl,reference:Mo.resolveIdentifier(e.name,e.moduleUrl,e.runtime)})}function identifierToken(e){return new yt({identifier:e})}function resolveIdentifierToken(e){return identifierToken(resolveIdentifier(e))}function resolveEnumIdentifier(e,t){var r=Mo.resolveEnum(e.reference,t);return new ht({name:e.name+"."+t,moduleUrl:e.moduleUrl,reference:r})}function expandNodes(e){var t=new os;return new ns(visitAll(t,e),t.isExpanded,t.errors)}function _expandPluralForm(e,t){var r=e.cases.map(function(e){rs.indexOf(e.value)!=-1||e.value.match(/^=\d+$/)||t.push(new is(e.valueSourceSpan,'Plural cases should be "=" or one of '+rs.join(", ")));var r=expandNodes(e.expression);return t.push.apply(t,r.errors),new Pn("template",[new Sn("ngPluralCase",""+e.value,e.valueSourceSpan)],r.nodes,e.sourceSpan,e.sourceSpan,e.sourceSpan)}),n=new Sn("[ngPlural]",e.switchValue,e.switchValueSourceSpan);return new Pn("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 Pn("template",[new Sn("ngSwitchCase",""+e.value,e.valueSourceSpan)],r.nodes,e.sourceSpan,e.sourceSpan,e.sourceSpan)}),n=new Sn("[ngSwitch]",e.switchValue,e.switchValueSourceSpan);return new Pn("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 dt({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),isBlank(n)&&(n=[]),isPresent(e)&&e.forEach(function(e){if(isArray(e))_normalizeProviders(e,t,r,n);else{var i=void 0;e instanceof dt?i=e:e instanceof vt?i=new dt({token:new yt({identifier:e}),useClass:e}):r.push(new as("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 dt({token:new yt({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 as("Mixing multi and non multi provider is not possible for token "+s.token.name,n)),isBlank(s)){var a=e.token.identifier&&e.token.identifier instanceof vt?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)}else e.multi||D.clear(s.providers),s.providers.push(e)})}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);isBlank(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(ds);return null===t||"package"==t[1]||"asset"==t[1]}function extractStyleUrls(e,t,r){var n=[],i=s.replaceAllMapped(r,fs,function(r){var i=isPresent(r[1])?r[1]:r[2];return isStyleUrlResolvable(i)?(n.push(e.resolve(t,i)),""):r[0]});return new hs(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==ms?t=e.value:s==_s?r=e.value:s==gs?n=e.value:e.name==Es?i=!0:e.name==Ss&&e.value.length>0&&(o=e.value)}),t=normalizeNgContentSelect(t);var s=e.name.toLowerCase(),a=si.OTHER;return splitNsName(s)[1]==ys?a=si.NG_CONTENT:s==ws?a=si.STYLE:s==Cs?a=si.SCRIPT:s==vs&&n==bs&&(a=si.STYLESHEET),new As(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 W,n=splitNsName(e)[1];r.setElement(n);for(var i=0;i1){r=n[0];var o=n[1];switch(o){case"start":case"done":i=o;break;default:t.push(new Ia('The provided animation output phase value "'+o+'" for "@'+r+'" is not supported (use start or done)'))}}else r=e,t.push(new Ia("The animation trigger output event (@"+r+") is missing its phase value name (start or done are currently supported)"));return new Lo(r,i,e)}function _parseAnimationDeclarationStates(e,t){var r=[];e.styles.styles.forEach(function(e){isStringMap(e)?r.push(e):t.push(new Ia("State based animations cannot contain references to other states"))});var n=new ga(r),i=e.stateNameExpr.split(/\s*,\s*/);return i.map(function(e){return new da(e,n)})}function _parseAnimationStateTransition(e,t,r){var n=new Pa,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 ba?u:new Ca([u]);return new ya(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 Ia("the provided "+e+" is not of a supported format")),r;var i=n[1],o=n[2],s=n[3];r.push(new ma(i,s));var a=i==Fo&&s==Fo;return"<"!=o[0]||a||r.push(new ma(s,i)),r}function _normalizeAnimationEntry(e){return isArray(e)?new ct(e):e}function _normalizeStyleMetadata(e,t,r){ var n=[];return e.styles.forEach(function(e){isString(e)?D.addAll(n,_resolveStylesFromState(e,t,r)):n.push(e)}),n}function _normalizeStyleSteps(e,t,r){var n=_normalizeStyleStepEntry(e,t,r);return e instanceof pt?new pt(n):new ct(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]=I.merge(n,t))}e.push(t)}function _normalizeStyleStepEntry(e,t,r){var n;if(!(e instanceof lt))return[e];n=e.steps;var i,o=[];return n.forEach(function(e){if(e instanceof at)isPresent(i)||(i=[]),_normalizeStyleMetadata(e,t,r).forEach(function(e){_mergeAnimationStyles(i,e)});else{if(isPresent(i)&&(o.push(new at(0,i)),i=null),e instanceof ut){var n=e.styles;n instanceof at?n.styles=_normalizeStyleMetadata(n,t,r):n instanceof st&&n.steps.forEach(function(e){e.styles=_normalizeStyleMetadata(e,t,r)})}else if(e instanceof lt){var s=_normalizeStyleStepEntry(e,t,r);e=e instanceof pt?new pt(s):new ct(s)}o.push(e)}}),isPresent(i)&&o.push(new at(0,i)),o}function _resolveStylesFromState(e,t,r){var n=[];if(":"!=e[0])r.push(new Ia('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 Ia('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--){var g=l[f],_=g[1];I.forEach(_,function(e,t){isPresent(v[t])||(v[t]=e)})}return l.map(function(e){return new _a(e[0],new ga([e[1]]))})}function _parseTransitionAnimation(e,t,r,n,i){var o,s=0,a=t;if(e instanceof lt){var u,l=0,c=[],p=e instanceof pt;if(e.steps.forEach(function(e){var o=p?a:t;if(e instanceof at)return e.styles.forEach(function(e){var t=e;I.forEach(t,function(e,t){r.insertAtTime(t,o,e)})}),void(u=e.styles);var h=_parseTransitionAnimation(e,o,r,n,i);if(isPresent(u)){if(e instanceof lt){var f=new ga(u);c.push(new va(f,[],0,0,""))}else{var d=h;D.addAll(d.startingStyles.styles,u)}u=null}var m=h.playTime;t+=m,s+=m,l=Ea.max(m,l),c.push(h)}),isPresent(u)){var h=new ga(u);c.push(new va(h,[],0,0,""))}p?(o=new wa(c),s=l,t=a+s):o=new Ca(c)}else if(e instanceof ut){var f,d=_parseTimeExpression(e.timings,i),m=e.styles;if(m instanceof st)f=_parseAnimationKeyframes(m,t,r,n,i);else{var y=m,v=Ta,g=new ga(y.styles),_=new _a(v,g);f=[_]}o=new va(new ga([]),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 I.forEach(e,function(e,n){return r.insertAtTime(n,t,e)})})})}else o=new va(null,[],0,0,"");return o.playTime=s,o.startTime=a,o}function _fillAnimationAstStartingKeyframes(e,t,r){if(e instanceof va&&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 ba&&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 Ia('The provided timing value "'+e+'" is invalid.')),new Na(0,0,null);var a=parseFloat(s[1]),u=s[2];"s"==u&&(a*=Ma),r=Ea.floor(a);var l=s[3],c=s[4];if(isPresent(l)){var p=parseFloat(l);isPresent(c)&&"s"==c&&(p*=Ma),i=Ea.floor(p)}var h=s[5];isBlank(h)||(o=h)}else r=e;return new Na(r,i,o)}function _createStartKeyframeFromEndKeyframe(e,t,r,n,i){var o={},s=t+r;return e.styles.styles.forEach(function(e){I.forEach(e,function(e,r){if("offset"!=r){var a,u,l,c=n.indexOfAtOrBeforeTime(r,t);isPresent(c)?(a=n.getByIndex(r,c),l=a.value,u=n.getByIndex(r,c+1)):l=Wo,isPresent(u)&&!u.matches(s,e)&&i.push(new Ia('The animated CSS property "'+r+'" unexpectedly changes between steps "'+a.time+'ms" and "'+s+'ms" at "'+u.time+'ms"')),o[r]=l}})}),new _a(xa,new ga([o]))}function _compareToAnimationStateExpr(e,t){var r=literal(Bo);switch(t){case Bo:return e.equals(r);case Fo:return literal(!0);default:return e.equals(literal(t))}}function _isEndStateAnimateStep(e){if(e instanceof va&&e.duration>0&&2==e.keyframes.length){var t=_getStylesArray(e.keyframes[0])[0],r=_getStylesArray(e.keyframes[1])[0];return I.isEmpty(t)&&I.isEmpty(r)}return!1}function _getStylesArray(e){return e.styles.styles}function _validateAnimationProperties(e,t){var r=new Ya(e);return templateVisitAll(r,t),new Ja(r.outputs,r.errors)}function convertValueToOutputAst(e,t){return void 0===t&&(t=null),visitValue(e,new eu,t)}function getPropertyInView(e,t,r){if(t===r)return e;for(var n=xe,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 Ee){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(xe.name,n,e)}function injectFromViewParentInjector(e,t){var r=[createDiTokenExpression(e)];return t&&r.push(Me),xe.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(se.ConcatArray,[literalArr(t)]),t=[]),r=r.callMethod(se.ConcatArray,[i])):t.push(i)}return t.length>0&&(r=r.callMethod(se.ConcatArray,[literalArr(t)])),r}function createPureProxy(e,t,r,n){n.fields.push(new Le(r.name,null));var i=t0?literal(e).lowerEquals(hu.requestNodeIndex).and(hu.requestNodeIndex.lowerEquals(literal(e+t))):literal(e).identical(hu.requestNodeIndex),new We(hu.token.identical(createDiTokenExpression(r.token)).and(i),[new ke(n)])}function createProviderProperty(e,t,r,n,i,o){var s,a,u=o.view;if(n?(s=literalArr(r),a=new $(Y)):(s=r[0],a=r[0].type),isBlank(a)&&(a=Y),i)u.fields.push(new Le(e,a)),u.createMethod.addStmt(xe.prop(e).set(s).toStmt());else{var l="_"+e;u.fields.push(new Le(l,a));var c=new nu(u);c.resetDebugInfo(o.nodeIndex,o.sourceAst),c.addStmt(new We(xe.prop(l).isBlank(),[xe.prop(l).set(s).toStmt()])),c.addStmt(new ke(xe.prop(l))),u.getters.push(new je(e,c.finish(),a))}return xe.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(isBlank(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?ro.EMBEDDED:e.type.isHost?ro.HOST:ro.COMPONENT}function convertCdExpressionToIr(e,t,r,n,i){var o=new Eu(e,t,n,i),s=r.visit(o,Ps.Expression);return new wu(s,o.needsValueUnwrapper,o.temporaryCount)}function convertCdStatementToIr(e,t,r,n){var i=new Eu(e,t,null,n),o=[];return flattenStatements(r.visit(i,Ps.Statement),o),prependTemporaryDecls(i.temporaryCount,n,o),o}function temporaryName(e,t){return"tmp_"+e+"_"+t}function temporaryDeclaration(e,t){return new Ne(temporaryName(e,t),Me)}function prependTemporaryDecls(e,t,r){for(var n=e-1;n>=0;n--)r.unshift(temporaryDeclaration(t,n))}function ensureStatementMode(e,t){if(e!==Ps.Statement)throw new Error("Expected a statement, but saw "+t)}function ensureExpressionMode(e,t){if(e!==Ps.Expression)throw new Error("Expected an expression, but saw "+t)}function convertToStatementIfNeeded(e,t){return e===Ps.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 bu(r,e));var t=Pu.getOrCreate(r,e.target,e.name,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 bu(r,i));var o=Pu.getOrCreate(r,i.target,i.name,n);o.addAction(i,e.directive,t)})}),n.forEach(function(e){return e.finishMethod()}),n}function bindDirectiveOutputs(e,t,r){I.forEach(e.directive.outputs,function(e,n){r.filter(function(t){return t.eventName==e}).forEach(function(e){e.listenToDirective(t,n)})})}function bindRenderOutputs(e){e.forEach(function(e){return e.listenToRenderer()})}function bindAnimationOutputs(e){e.forEach(function(e){e.listener.listenToAnimation(e.output)})}function convertStmtIntoExpression(e){return e instanceof Oe?e.expr:e instanceof ke?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(Ki.OnChanges)!==-1&&e.inputs.length>0&&i.addStmt(new We(fu.changes.notIdentical(Me),[t.callMethod("ngOnChanges",[fu.changes]).toStmt()])),o.indexOf(Ki.OnInit)!==-1&&i.addStmt(new We(Au.and(xu),[t.callMethod("ngOnInit",[]).toStmt()])),o.indexOf(Ki.DoCheck)!==-1&&i.addStmt(new We(xu,[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(Ki.AfterContentInit)!==-1&&o.addStmt(new We(Au,[t.callMethod("ngAfterContentInit",[]).toStmt()])),i.indexOf(Ki.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(Ki.AfterViewInit)!==-1&&o.addStmt(new We(Au,[t.callMethod("ngAfterViewInit",[]).toStmt()])),i.indexOf(Ki.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(Ki.OnDestroy)!==-1&&n.addStmt(t.callMethod("ngOnDestroy",[]).toStmt())}function bindPipeDestroyLifecycleCallbacks(e,t,r){var n=r.destroyMethod;e.type.lifecycleHooks.indexOf(Ki.OnDestroy)!==-1&&n.addStmt(t.callMethod("ngOnDestroy",[]).toStmt())}function createBindFieldExpr(e){return xe.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,fu.valUnwrapper,a);if(!isBlank(u.expression)){if(u.temporaryCount)for(var l=0;l0}));return u}function createViewFactory(e,t,r){var n,i=[new be(lu.viewUtils.name,importType(resolveIdentifier(Jo.ViewUtils))),new be(lu.parentInjector.name,importType(resolveIdentifier(Jo.Injector))),new be(lu.declarationEl.name,importType(resolveIdentifier(Jo.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.fnVariable]}));o=[new We(r.identical(Me),[r.set(lu.viewUtils.callMethod("createRenderComponentType",[literal(n),literal(e.component.template.ngContentSelectors.length),au.fromValue(e.component.template.encapsulation),e.styles,s])).toStmt()])]}return fn(i,o.concat([new ke(variable(t.name).instantiate(t.constructorMethod.params.map(function(e){return variable(e.name)})))]),importType(resolveIdentifier(Jo.AppView),[getContextType(e)])).toDeclStmt(e.viewFactory.name,[pe.Final])}function generateCreateMethod(e){var t=Me,r=[];e.viewType===ro.COMPONENT&&(t=cu.renderer.callMethod("createViewRoot",[xe.prop("declarationAppElement").prop("nativeElement")]),r=[Vu.set(t).toDeclStmt(importType(e.genConfig.renderTypes.renderNode),[pe.Final])]);var n;return n=e.viewType===ro.HOST?e.nodes[0].appElement:Me,r.concat(e.createMethod.finish(),[xe.callMethod("init",[createFlatArray(e.rootNodesOrAppElements),literalArr(e.nodes.map(function(e){return e.renderNode})),literalArr(e.disposables),literalArr(e.subscriptions)]).toStmt(),new ke(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;D.addAll(t,e.animationBindingsMethod.finish()),D.addAll(t,e.detectChangesInInputsMethod.finish()),t.push(xe.callMethod("detectContentChildrenChanges",[fu.throwOnChange]).toStmt());var r=e.updateContentQueriesMethod.finish().concat(e.afterContentLifecycleCallbacksMethod.finish());r.length>0&&t.push(new We(not(fu.throwOnChange),r)),D.addAll(t,e.detectChangesRenderPropertiesMethod.finish()),t.push(xe.callMethod("detectViewChildrenChanges",[fu.throwOnChange]).toStmt());var n=e.updateViewQueriesMethod.finish().concat(e.afterViewLifecycleCallbacksMethod.finish());n.length>0&&t.push(new We(not(fu.throwOnChange),n));var i=[],o=findReadVarNames(t);return V.has(o,fu.changed.name)&&i.push(fu.changed.set(literal(!0)).toDeclStmt(ee)),V.has(o,fu.changes.name)&&i.push(fu.changes.set(Me).toDeclStmt(new J(importType(resolveIdentifier(Jo.SimpleChange))))),V.has(o,fu.valUnwrapper.name)&&i.push(fu.valUnwrapper.set(importExpr(resolveIdentifier(Jo.ValueUnwrapper)).instantiate([])).toDeclStmt(null,[pe.Final])),i.concat(t)}function addReturnValuefNotEmpty(e,t){return e.length>0?e.concat([new ke(t)]):e}function getContextType(e){return e.viewType===ro.COMPONENT?importType(e.component.type):Y}function getChangeDetectionMode(e){var t;return t=e.viewType===ro.COMPONENT?Gi(e.component.changeDetection)?qi.CheckAlways:qi.CheckOnce:qi.CheckAlways}function _resolveViewStatements(e){return e.dependencies.forEach(function(e){if(e instanceof ku){var t=e;t.placeholder.moduleUrl=_ngfactoryModuleUrl(t.comp.moduleUrl)}else if(e instanceof Ru){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(/\.d\.ts$/.test(e))return[e.substring(0,e.length-5),".ts"];var t=e.lastIndexOf(".");return t!==-1?[e.substring(0,t),e.substring(t)]:[e,""]}function createOfflineCompileUrlResolver(){return new qu(zu)}function getUrlScheme(e){var t=_split(e);return t&&t[Cu.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[Cu.Path];return t=isBlank(t)?"":_removeDotSegments(t),e[Cu.Path]=t,_buildFromEncodedParts(e[Cu.Scheme],e[Cu.UserInfo],e[Cu.Domain],e[Cu.Port],t,e[Cu.QueryData],e[Cu.Fragment])}function _resolveUrl(e,t){var r=_split(encodeURI(t)),n=_split(e);if(isPresent(r[Cu.Scheme]))return _joinAndCanonicalizePath(r);r[Cu.Scheme]=n[Cu.Scheme];for(var i=Cu.Scheme;i<=Cu.Port;i++)isBlank(r[i])&&(r[i]=n[i]);if("/"==r[Cu.Path][0])return _joinAndCanonicalizePath(r);var o=n[Cu.Path];isBlank(o)&&(o="/");var s=o.lastIndexOf("/");return o=o.substring(0,s+1)+r[Cu.Path],r[Cu.Path]=o,_joinAndCanonicalizePath(r)}function _cloneDirectiveWithTemplate(e,t){return new wt({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=$u.get(e),n=Ju.get(e);return Mo.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?n:"package:"+n+Qe}return e.importUri(t)}function convertToCompileValue(e,t){return visitValue(e,new nl,t)}function escapeIdentifier(e,t,r){if(void 0===r&&(r=!0),isBlank(e))return null;var n=s.replaceAllMapped(e,cl,function(e){return"$"==e[0]?t?"\\$":"$":"\n"==e[0]?"\\n":"\r"==e[0]?"\\r":"\\"+e[0]}),i=r||!pl.test(n);return i?"'"+n+"'":n}function _createIndent(e){for(var t="",r=0;r0?o.push(u):(o.length>0&&(n.push(o.join("")),r.push(Jl),o=[]),r.push(u)),u==Xl&&i++}return o.length>0&&(n.push(o.join("")),r.push(Jl)),new ec(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)},BoundElementPropertyAst}(),f=function(){function BoundEventAst(e,t,r,n){this.name=e,this.target=t,this.handler=r,this.sourceSpan=n}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}),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=i.Map,S=i.Set,P=function(){try{if(1===new E([[1,2]]).size)return function(e){return new E(e)}}catch(e){}return function(e){for(var t=new E,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:"‌"},R=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}(),L={base:new R({isVoid:!0}),meta:new R({isVoid:!0}),area:new R({isVoid:!0}),embed:new R({isVoid:!0}),link:new R({isVoid:!0}),img:new R({isVoid:!0}),input:new R({isVoid:!0}),param:new R({isVoid:!0}),hr:new R({isVoid:!0}),br:new R({isVoid:!0}),source:new R({isVoid:!0}),track:new R({isVoid:!0}),wbr:new R({isVoid:!0}),p:new R({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 R({closedByChildren:["tbody","tfoot"]}),tbody:new R({closedByChildren:["tbody","tfoot"],closedByParent:!0}),tfoot:new R({closedByChildren:["tbody"],closedByParent:!0}),tr:new R({closedByChildren:["tr"],requiredParents:["tbody","tfoot","thead"],closedByParent:!0}),td:new R({closedByChildren:["td","th"],closedByParent:!0}),th:new R({closedByChildren:["td","th"],closedByParent:!0}),col:new R({requiredParents:["colgroup"],isVoid:!0}),svg:new R({implicitNamespacePrefix:"svg"}),math:new R({implicitNamespacePrefix:"math"}),li:new R({closedByChildren:["li"],closedByParent:!0}),dt:new R({closedByChildren:["dt","dd"]}),dd:new R({closedByChildren:["dt","dd"],closedByParent:!0}),rb:new R({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),rt:new R({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),rtc:new R({closedByChildren:["rb","rtc","rp"],closedByParent:!0}),rp:new R({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),optgroup:new R({closedByChildren:["optgroup"],closedByParent:!0}),option:new R({closedByChildren:["option","optgroup"],closedByParent:!0}),pre:new R({ignoreFirstLf:!0}),listing:new R({ignoreFirstLf:!0}),style:new R({contentType:C.RAW_TEXT}),script:new R({contentType:C.RAW_TEXT}),title:new R({contentType:C.ESCAPABLE_RAW_TEXT}),textarea:new R({contentType:C.ESCAPABLE_RAW_TEXT,ignoreFirstLf:!0})},F=new R,j="",B=new RegExp("(\\:not\\()|([-\\w]+)|(?:\\.([-\\w]+))|(?:\\[([-\\w*]+)(?:=([^\\]]*))?\\])|(\\))|(\\s*,\\s*)","g"),W=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&&isBlank(t.element)&&D.isEmpty(t.classNames)&&D.isEmpty(t.attrs)&&(t.element="*"),e.push(t)},i=new CssSelector,o=i,s=!1;for(B.lastIndex=0;isPresent(t=B.exec(e));){if(isPresent(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(isPresent(t[2])&&o.setElement(t[2]),isPresent(t[3])&&o.addClassName(t[3]),isPresent(t[4])&&o.addAttribute(t[4],t[5]),isPresent(t[6])&&(s=!1,o=i),isPresent(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=j),this.attrs.push(e),t=isPresent(t)?t.toLowerCase():j,this.attrs.push(t)},CssSelector.prototype.addClassName=function(e){this.classNames.push(e.toLowerCase())},CssSelector.prototype.toString=function(){var e="";if(isPresent(this.element)&&(e+=this.element),isPresent(this.classNames))for(var t=0;t0&&(e+="="+n),e+="]"}return this.notSelectors.forEach(function(t){return e+=":not("+t+")"}),e},CssSelector}(),U=function(){function SelectorMatcher(){this._elementMap=new Map,this._elementPartialMap=new Map,this._classMap=new Map,this._classPartialMap=new Map,this._attrValueMap=new Map,this._attrValuePartialMap=new Map,this._listContexts=[]}return SelectorMatcher.createNotMatcher=function(e){var t=new SelectorMatcher;return t.addSelectables(e,null),t},SelectorMatcher.prototype.addSelectables=function(e,t){var r=null;e.length>1&&(r=new H(e),this._listContexts.push(r));for(var n=0;n0&&(isBlank(this.listContext)||!this.listContext.alreadyMatched)){var n=U.createNotMatcher(this.notSelectors);r=!n.match(e,null)}return r&&isPresent(t)&&(isBlank(this.listContext)||!this.listContext.alreadyMatched)&&(isPresent(this.listContext)&&(this.listContext.alreadyMatched=!0),t(this.selector,this.cbContext)),r},SelectorContext}(),G=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"}(O||(O={}));var q,K=function(){function Type(e){void 0===e&&(e=null),this.modifiers=e,isBlank(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"}(q||(q={}));var Q,Z=function(e){function BuiltinType(t,r){void 0===r&&(r=null),e.call(this,r),this.name=t}return G(BuiltinType,e),BuiltinType.prototype.visitType=function(e,t){return e.visitBuiltintType(this,t)},BuiltinType}(K),X=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 G(ExternalType,e),ExternalType.prototype.visitType=function(e,t){return e.visitExternalType(this,t)},ExternalType}(K),$=function(e){function ArrayType(t,r){void 0===r&&(r=null),e.call(this,r),this.of=t}return G(ArrayType,e),ArrayType.prototype.visitType=function(e,t){return e.visitArrayType(this,t)},ArrayType}(K),J=function(e){function MapType(t,r){void 0===r&&(r=null),e.call(this,r),this.valueType=t}return G(MapType,e),MapType.prototype.visitType=function(e,t){return e.visitMapType(this,t)},MapType}(K),Y=new Z(q.Dynamic),ee=new Z(q.Bool),te=(new Z(q.Int),new Z(q.Number)),re=new Z(q.String),ne=new Z(q.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"}(Q||(Q={}));var ie,oe=function(){function Expression(e){this.type=e}return Expression.prototype.prop=function(e){return new Ee(this,e)},Expression.prototype.key=function(e,t){return void 0===t&&(t=null),new Se(this,e,t)},Expression.prototype.callMethod=function(e,t){return new he(this,e,t)},Expression.prototype.callFn=function(e){return new fe(this,e)},Expression.prototype.instantiate=function(e,t){return void 0===t&&(t=null),new de(this,e,t)},Expression.prototype.conditional=function(e,t){return void 0===t&&(t=null),new ve(this,e,t)},Expression.prototype.equals=function(e){return new Ce(Q.Equals,this,e)},Expression.prototype.notEquals=function(e){return new Ce(Q.NotEquals,this,e)},Expression.prototype.identical=function(e){return new Ce(Q.Identical,this,e)},Expression.prototype.notIdentical=function(e){return new Ce(Q.NotIdentical,this,e)},Expression.prototype.minus=function(e){return new Ce(Q.Minus,this,e)},Expression.prototype.plus=function(e){return new Ce(Q.Plus,this,e)},Expression.prototype.divide=function(e){return new Ce(Q.Divide,this,e)},Expression.prototype.multiply=function(e){return new Ce(Q.Multiply,this,e)},Expression.prototype.modulo=function(e){return new Ce(Q.Modulo,this,e)},Expression.prototype.and=function(e){return new Ce(Q.And,this,e)},Expression.prototype.or=function(e){return new Ce(Q.Or,this,e)},Expression.prototype.lower=function(e){return new Ce(Q.Lower,this,e)},Expression.prototype.lowerEquals=function(e){return new Ce(Q.LowerEquals,this,e)},Expression.prototype.bigger=function(e){return new Ce(Q.Bigger,this,e)},Expression.prototype.biggerEquals=function(e){return new Ce(Q.BiggerEquals,this,e)},Expression.prototype.isBlank=function(){return this.equals(Me)},Expression.prototype.cast=function(e){return new _e(this,e)},Expression.prototype.toStmt=function(){return new Oe(this)},Expression}();!function(e){e[e.This=0]="This",e[e.Super=1]="Super",e[e.CatchError=2]="CatchError",e[e.CatchStack=3]="CatchStack"}(ie||(ie={}));var se,ae=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 G(ReadVarExpr,e),ReadVarExpr.prototype.visitExpression=function(e,t){return e.visitReadVarExpr(this,t)},ReadVarExpr.prototype.set=function(e){return new ue(this.name,e)},ReadVarExpr}(oe),ue=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 G(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 Ne(this.name,this.value,e,t)},WriteVarExpr}(oe),le=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 G(WriteKeyExpr,e),WriteKeyExpr.prototype.visitExpression=function(e,t){return e.visitWriteKeyExpr(this,t)},WriteKeyExpr}(oe),ce=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 G(WritePropExpr,e),WritePropExpr.prototype.visitExpression=function(e,t){return e.visitWritePropExpr(this,t)},WritePropExpr}(oe);!function(e){e[e.ConcatArray=0]="ConcatArray",e[e.SubscribeObservable=1]="SubscribeObservable",e[e.Bind=2]="Bind"}(se||(se={}));var pe,he=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 G(InvokeMethodExpr,e),InvokeMethodExpr.prototype.visitExpression=function(e,t){return e.visitInvokeMethodExpr(this,t)},InvokeMethodExpr}(oe),fe=function(e){function InvokeFunctionExpr(t,r,n){void 0===n&&(n=null),e.call(this,n),this.fn=t,this.args=r}return G(InvokeFunctionExpr,e),InvokeFunctionExpr.prototype.visitExpression=function(e,t){return e.visitInvokeFunctionExpr(this,t)},InvokeFunctionExpr}(oe),de=function(e){function InstantiateExpr(t,r,n){e.call(this,n),this.classExpr=t,this.args=r}return G(InstantiateExpr,e),InstantiateExpr.prototype.visitExpression=function(e,t){return e.visitInstantiateExpr(this,t)},InstantiateExpr}(oe),me=function(e){function LiteralExpr(t,r){void 0===r&&(r=null),e.call(this,r),this.value=t}return G(LiteralExpr,e),LiteralExpr.prototype.visitExpression=function(e,t){return e.visitLiteralExpr(this,t)},LiteralExpr}(oe),ye=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 G(ExternalExpr,e),ExternalExpr.prototype.visitExpression=function(e,t){return e.visitExternalExpr(this,t)},ExternalExpr}(oe),ve=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 G(ConditionalExpr,e),ConditionalExpr.prototype.visitExpression=function(e,t){return e.visitConditionalExpr(this,t)},ConditionalExpr}(oe),ge=function(e){function NotExpr(t){e.call(this,ee),this.condition=t}return G(NotExpr,e),NotExpr.prototype.visitExpression=function(e,t){return e.visitNotExpr(this,t)},NotExpr}(oe),_e=function(e){function CastExpr(t,r){e.call(this,r),this.value=t}return G(CastExpr,e),CastExpr.prototype.visitExpression=function(e,t){return e.visitCastExpr(this,t)},CastExpr}(oe),be=function(){function FnParam(e,t){void 0===t&&(t=null),this.name=e,this.type=t}return FnParam}(),we=function(e){function FunctionExpr(t,r,n){void 0===n&&(n=null),e.call(this,n),this.params=t,this.statements=r}return G(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 Ve(e,this.params,this.statements,this.type,t)},FunctionExpr}(oe),Ce=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 G(BinaryOperatorExpr,e),BinaryOperatorExpr.prototype.visitExpression=function(e,t){return e.visitBinaryOperatorExpr(this,t)},BinaryOperatorExpr}(oe),Ee=function(e){function ReadPropExpr(t,r,n){void 0===n&&(n=null),e.call(this,n),this.receiver=t,this.name=r}return G(ReadPropExpr,e),ReadPropExpr.prototype.visitExpression=function(e,t){return e.visitReadPropExpr(this,t)},ReadPropExpr.prototype.set=function(e){return new ce(this.receiver,this.name,e)},ReadPropExpr}(oe),Se=function(e){function ReadKeyExpr(t,r,n){void 0===n&&(n=null),e.call(this,n),this.receiver=t,this.index=r}return G(ReadKeyExpr,e),ReadKeyExpr.prototype.visitExpression=function(e,t){return e.visitReadKeyExpr(this,t)},ReadKeyExpr.prototype.set=function(e){return new le(this.receiver,this.index,e)},ReadKeyExpr}(oe),Pe=function(e){function LiteralArrayExpr(t,r){void 0===r&&(r=null),e.call(this,r),this.entries=t}return G(LiteralArrayExpr,e),LiteralArrayExpr.prototype.visitExpression=function(e,t){return e.visitLiteralArrayExpr(this,t)},LiteralArrayExpr}(oe),Ae=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 G(LiteralMapExpr,e),LiteralMapExpr.prototype.visitExpression=function(e,t){return e.visitLiteralMapExpr(this,t)},LiteralMapExpr}(oe),xe=new ae(ie.This),Te=new ae(ie.Super),Me=(new ae(ie.CatchError),new ae(ie.CatchStack),new me(null,null));!function(e){e[e.Final=0]="Final",e[e.Private=1]="Private"}(pe||(pe={}));var Ie,De=function(){function Statement(e){void 0===e&&(e=null),this.modifiers=e,isBlank(e)&&(this.modifiers=[])}return Statement.prototype.hasModifier=function(e){return this.modifiers.indexOf(e)!==-1},Statement}(),Ne=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 G(DeclareVarStmt,e),DeclareVarStmt.prototype.visitStatement=function(e,t){return e.visitDeclareVarStmt(this,t)},DeclareVarStmt}(De),Ve=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 G(DeclareFunctionStmt,e),DeclareFunctionStmt.prototype.visitStatement=function(e,t){return e.visitDeclareFunctionStmt(this,t)},DeclareFunctionStmt}(De),Oe=function(e){function ExpressionStatement(t){e.call(this),this.expr=t}return G(ExpressionStatement,e),ExpressionStatement.prototype.visitStatement=function(e,t){ return e.visitExpressionStmt(this,t)},ExpressionStatement}(De),ke=function(e){function ReturnStatement(t){e.call(this),this.value=t}return G(ReturnStatement,e),ReturnStatement.prototype.visitStatement=function(e,t){return e.visitReturnStmt(this,t)},ReturnStatement}(De),Re=function(){function AbstractClassPart(e,t){void 0===e&&(e=null),this.type=e,this.modifiers=t,isBlank(t)&&(this.modifiers=[])}return AbstractClassPart.prototype.hasModifier=function(e){return this.modifiers.indexOf(e)!==-1},AbstractClassPart}(),Le=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 G(ClassField,e),ClassField}(Re),Fe=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 G(ClassMethod,e),ClassMethod}(Re),je=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 G(ClassGetter,e),ClassGetter}(Re),Be=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 G(ClassStmt,e),ClassStmt.prototype.visitStatement=function(e,t){return e.visitDeclareClassStmt(this,t)},ClassStmt}(De),We=function(e){function IfStmt(t,r,n){void 0===n&&(n=[]),e.call(this),this.condition=t,this.trueCase=r,this.falseCase=n}return G(IfStmt,e),IfStmt.prototype.visitStatement=function(e,t){return e.visitIfStmt(this,t)},IfStmt}(De),Ue=(function(e){function CommentStmt(t){e.call(this),this.comment=t}return G(CommentStmt,e),CommentStmt.prototype.visitStatement=function(e,t){return e.visitCommentStmt(this,t)},CommentStmt}(De),function(e){function TryCatchStmt(t,r){e.call(this),this.bodyStmts=t,this.catchStmts=r}return G(TryCatchStmt,e),TryCatchStmt.prototype.visitStatement=function(e,t){return e.visitTryCatchStmt(this,t)},TryCatchStmt}(De)),He=function(e){function ThrowStmt(t){e.call(this),this.error=t}return G(ThrowStmt,e),ThrowStmt.prototype.visitStatement=function(e,t){return e.visitThrowStmt(this,t)},ThrowStmt}(De),ze=function(){function ExpressionTransformer(){}return ExpressionTransformer.prototype.visitReadVarExpr=function(e,t){return e},ExpressionTransformer.prototype.visitWriteVarExpr=function(e,t){return new ue(e.name,e.value.visitExpression(this,t))},ExpressionTransformer.prototype.visitWriteKeyExpr=function(e,t){return new le(e.receiver.visitExpression(this,t),e.index.visitExpression(this,t),e.value.visitExpression(this,t))},ExpressionTransformer.prototype.visitWritePropExpr=function(e,t){return new ce(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 he(e.receiver.visitExpression(this,t),r,this.visitAllExpressions(e.args,t),e.type)},ExpressionTransformer.prototype.visitInvokeFunctionExpr=function(e,t){return new fe(e.fn.visitExpression(this,t),this.visitAllExpressions(e.args,t),e.type)},ExpressionTransformer.prototype.visitInstantiateExpr=function(e,t){return new de(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 ve(e.condition.visitExpression(this,t),e.trueCase.visitExpression(this,t),e.falseCase.visitExpression(this,t))},ExpressionTransformer.prototype.visitNotExpr=function(e,t){return new ge(e.condition.visitExpression(this,t))},ExpressionTransformer.prototype.visitCastExpr=function(e,t){return new _e(e.value.visitExpression(this,t),t)},ExpressionTransformer.prototype.visitFunctionExpr=function(e,t){return e},ExpressionTransformer.prototype.visitBinaryOperatorExpr=function(e,t){return new Ce(e.operator,e.lhs.visitExpression(this,t),e.rhs.visitExpression(this,t),e.type)},ExpressionTransformer.prototype.visitReadPropExpr=function(e,t){return new Ee(e.receiver.visitExpression(this,t),e.name,e.type)},ExpressionTransformer.prototype.visitReadKeyExpr=function(e,t){return new Se(e.receiver.visitExpression(this,t),e.index.visitExpression(this,t),e.type)},ExpressionTransformer.prototype.visitLiteralArrayExpr=function(e,t){return new Pe(this.visitAllExpressions(e.entries,t))},ExpressionTransformer.prototype.visitLiteralMapExpr=function(e,t){var r=this;return new Ae(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 Ne(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 Oe(e.expr.visitExpression(this,t))},ExpressionTransformer.prototype.visitReturnStmt=function(e,t){return new ke(e.value.visitExpression(this,t))},ExpressionTransformer.prototype.visitDeclareClassStmt=function(e,t){return e},ExpressionTransformer.prototype.visitIfStmt=function(e,t){return new We(e.condition.visitExpression(this,t),this.visitAllStatements(e.trueCase,t),this.visitAllStatements(e.falseCase,t))},ExpressionTransformer.prototype.visitTryCatchStmt=function(e,t){return new Ue(this.visitAllStatements(e.bodyStmts,t),this.visitAllStatements(e.catchStmts,t))},ExpressionTransformer.prototype.visitThrowStmt=function(e,t){return new He(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}(),Ge=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}(),qe=function(e){function _ReplaceVariableTransformer(t,r){e.call(this),this._varName=t,this._newValue=r}return G(_ReplaceVariableTransformer,e),_ReplaceVariableTransformer.prototype.visitReadVarExpr=function(e,t){return e.name==this._varName?this._newValue:e},_ReplaceVariableTransformer}(ze),Ke=function(e){function _VariableFinder(){e.apply(this,arguments),this.varNames=new Set}return G(_VariableFinder,e),_VariableFinder.prototype.visitReadVarExpr=function(e,t){return this.varNames.add(e.name),null},_VariableFinder}(Ge),Qe="",Ze=/([A-Z])/g,Xe=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 I.forEach(e,function(e,i){n[i]=visitValue(e,r,t)}),n},ValueTransformer.prototype.visitPrimitive=function(e,t){return e},ValueTransformer.prototype.visitOther=function(e,t){return e},ValueTransformer}(),$e=function(){function SyncAsyncResult(e,t){void 0===t&&(t=null),this.syncResult=e,this.asyncResult=t,t||(this.asyncResult=Promise.resolve(e))}return SyncAsyncResult}(),Je=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=/^(?:(?:\[([^\]]+)\])|(?:\(([^\)]+)\)))|(\@[-\w]+)$/,et=function(){function CompileMetadataWithIdentifier(){}return Object.defineProperty(CompileMetadataWithIdentifier.prototype,"identifier",{get:function(){return unimplemented()},enumerable:!0,configurable:!0}),CompileMetadataWithIdentifier}(),tt=function(){function CompileAnimationEntryMetadata(e,t){void 0===e&&(e=null),void 0===t&&(t=null),this.name=e,this.definitions=t}return CompileAnimationEntryMetadata}(),rt=function(){function CompileAnimationStateMetadata(){}return CompileAnimationStateMetadata}(),nt=function(e){function CompileAnimationStateDeclarationMetadata(t,r){e.call(this),this.stateNameExpr=t,this.styles=r}return Je(CompileAnimationStateDeclarationMetadata,e),CompileAnimationStateDeclarationMetadata}(rt),it=function(e){function CompileAnimationStateTransitionMetadata(t,r){e.call(this),this.stateChangeExpr=t,this.steps=r}return Je(CompileAnimationStateTransitionMetadata,e),CompileAnimationStateTransitionMetadata}(rt),ot=function(){function CompileAnimationMetadata(){}return CompileAnimationMetadata}(),st=function(e){function CompileAnimationKeyframesSequenceMetadata(t){void 0===t&&(t=[]),e.call(this),this.steps=t}return Je(CompileAnimationKeyframesSequenceMetadata,e),CompileAnimationKeyframesSequenceMetadata}(ot),at=function(e){function CompileAnimationStyleMetadata(t,r){void 0===r&&(r=null),e.call(this),this.offset=t,this.styles=r}return Je(CompileAnimationStyleMetadata,e),CompileAnimationStyleMetadata}(ot),ut=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 Je(CompileAnimationAnimateMetadata,e),CompileAnimationAnimateMetadata}(ot),lt=function(e){function CompileAnimationWithStepsMetadata(t){void 0===t&&(t=null),e.call(this),this.steps=t}return Je(CompileAnimationWithStepsMetadata,e),CompileAnimationWithStepsMetadata}(ot),ct=function(e){function CompileAnimationSequenceMetadata(t){void 0===t&&(t=null),e.call(this,t)}return Je(CompileAnimationSequenceMetadata,e),CompileAnimationSequenceMetadata}(lt),pt=function(e){function CompileAnimationGroupMetadata(t){void 0===t&&(t=null),e.call(this,t)}return Je(CompileAnimationGroupMetadata,e),CompileAnimationGroupMetadata}(lt),ht=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}(),ft=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}(),dt=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}(),mt=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 Je(CompileFactoryMetadata,e),CompileFactoryMetadata}(ht),yt=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}(),vt=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 Je(CompileTypeMetadata,e),CompileTypeMetadata}(ht),gt=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}(),_t=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}(),bt=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)?D.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}(),wt=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)&&I.forEach(l,function(e,t){var r=t.match(Ye);null===r?g[t]=e:isPresent(r[1])?v[r[1]]=e:isPresent(r[2])&&(y[r[2]]=e)});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}(),Ct=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}(),Et=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}(),St=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}(),Pt=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}(),At=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(){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}(),Tt=function(){function ParseSpan(e,t){this.start=e,this.end=t}return ParseSpan}(),Mt=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}(),It=function(e){function Quote(t,r,n,i){e.call(this,t),this.prefix=r,this.uninterpretedExpression=n,this.location=i}return At(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}(Mt),Dt=function(e){function EmptyExpr(){e.apply(this,arguments)}return At(EmptyExpr,e),EmptyExpr.prototype.visit=function(e,t){void 0===t&&(t=null)},EmptyExpr}(Mt),Nt=function(e){function ImplicitReceiver(){e.apply(this,arguments)}return At(ImplicitReceiver,e),ImplicitReceiver.prototype.visit=function(e,t){return void 0===t&&(t=null),e.visitImplicitReceiver(this,t)},ImplicitReceiver}(Mt),Vt=function(e){function Chain(t,r){e.call(this,t),this.expressions=r}return At(Chain,e),Chain.prototype.visit=function(e,t){return void 0===t&&(t=null),e.visitChain(this,t)},Chain}(Mt),Ot=function(e){function Conditional(t,r,n,i){e.call(this,t),this.condition=r,this.trueExp=n,this.falseExp=i}return At(Conditional,e),Conditional.prototype.visit=function(e,t){return void 0===t&&(t=null),e.visitConditional(this,t)},Conditional}(Mt),kt=function(e){function PropertyRead(t,r,n){e.call(this,t),this.receiver=r,this.name=n}return At(PropertyRead,e),PropertyRead.prototype.visit=function(e,t){return void 0===t&&(t=null),e.visitPropertyRead(this,t)},PropertyRead}(Mt),Rt=function(e){function PropertyWrite(t,r,n,i){e.call(this,t),this.receiver=r,this.name=n,this.value=i}return At(PropertyWrite,e),PropertyWrite.prototype.visit=function(e,t){return void 0===t&&(t=null),e.visitPropertyWrite(this,t)},PropertyWrite}(Mt),Lt=function(e){function SafePropertyRead(t,r,n){e.call(this,t),this.receiver=r,this.name=n}return At(SafePropertyRead,e),SafePropertyRead.prototype.visit=function(e,t){return void 0===t&&(t=null),e.visitSafePropertyRead(this,t)},SafePropertyRead}(Mt),Ft=function(e){function KeyedRead(t,r,n){e.call(this,t),this.obj=r,this.key=n}return At(KeyedRead,e),KeyedRead.prototype.visit=function(e,t){return void 0===t&&(t=null),e.visitKeyedRead(this,t)},KeyedRead}(Mt),jt=function(e){function KeyedWrite(t,r,n,i){e.call(this,t),this.obj=r,this.key=n,this.value=i}return At(KeyedWrite,e),KeyedWrite.prototype.visit=function(e,t){return void 0===t&&(t=null),e.visitKeyedWrite(this,t)},KeyedWrite}(Mt),Bt=function(e){function BindingPipe(t,r,n,i){e.call(this,t),this.exp=r,this.name=n,this.args=i}return At(BindingPipe,e),BindingPipe.prototype.visit=function(e,t){return void 0===t&&(t=null),e.visitPipe(this,t)},BindingPipe}(Mt),Wt=function(e){function LiteralPrimitive(t,r){e.call(this,t),this.value=r}return At(LiteralPrimitive,e),LiteralPrimitive.prototype.visit=function(e,t){return void 0===t&&(t=null),e.visitLiteralPrimitive(this,t)},LiteralPrimitive}(Mt),Ut=function(e){function LiteralArray(t,r){e.call(this,t),this.expressions=r}return At(LiteralArray,e),LiteralArray.prototype.visit=function(e,t){return void 0===t&&(t=null),e.visitLiteralArray(this,t)},LiteralArray}(Mt),Ht=function(e){function LiteralMap(t,r,n){e.call(this,t),this.keys=r,this.values=n}return At(LiteralMap,e),LiteralMap.prototype.visit=function(e,t){return void 0===t&&(t=null),e.visitLiteralMap(this,t)},LiteralMap}(Mt),zt=function(e){function Interpolation(t,r,n){e.call(this,t),this.strings=r,this.expressions=n}return At(Interpolation,e),Interpolation.prototype.visit=function(e,t){return void 0===t&&(t=null),e.visitInterpolation(this,t)},Interpolation}(Mt),Gt=function(e){function Binary(t,r,n,i){e.call(this,t),this.operation=r,this.left=n,this.right=i}return At(Binary,e),Binary.prototype.visit=function(e,t){return void 0===t&&(t=null),e.visitBinary(this,t)},Binary}(Mt),qt=function(e){function PrefixNot(t,r){e.call(this,t),this.expression=r}return At(PrefixNot,e),PrefixNot.prototype.visit=function(e,t){return void 0===t&&(t=null),e.visitPrefixNot(this,t)},PrefixNot}(Mt),Kt=function(e){function MethodCall(t,r,n,i){e.call(this,t),this.receiver=r,this.name=n,this.args=i}return At(MethodCall,e),MethodCall.prototype.visit=function(e,t){return void 0===t&&(t=null),e.visitMethodCall(this,t)},MethodCall}(Mt),Qt=function(e){function SafeMethodCall(t,r,n,i){e.call(this,t),this.receiver=r,this.name=n,this.args=i}return At(SafeMethodCall,e),SafeMethodCall.prototype.visit=function(e,t){return void 0===t&&(t=null),e.visitSafeMethodCall(this,t)},SafeMethodCall}(Mt),Zt=function(e){function FunctionCall(t,r,n){e.call(this,t),this.target=r,this.args=n}return At(FunctionCall,e),FunctionCall.prototype.visit=function(e,t){return void 0===t&&(t=null),e.visitFunctionCall(this,t)},FunctionCall}(Mt),Xt=function(e){function ASTWithSource(t,r,n,i){e.call(this,new Tt(0,isBlank(r)?0:r.length)),this.ast=t,this.source=r,this.location=n,this.errors=i}return At(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}(Mt),$t=function(){function TemplateBinding(e,t,r,n){this.key=e,this.keyIsVar=t,this.name=r,this.expression=n}return TemplateBinding}(),Jt=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}(),Yt=0,er=9,tr=10,rr=11,nr=12,ir=13,or=32,sr=33,ar=34,ur=35,lr=36,cr=37,pr=38,hr=39,fr=40,dr=41,mr=42,yr=43,vr=44,gr=45,_r=46,br=47,wr=58,Cr=59,Er=60,Sr=61,Pr=62,Ar=63,xr=48,Tr=57,Mr=65,Ir=69,Dr=70,Nr=88,Vr=90,Or=91,kr=92,Rr=93,Lr=94,Fr=95,jr=97,Br=101,Wr=102,Ur=110,Hr=114,zr=116,Gr=117,qr=118,Kr=120,Qr=122,Zr=123,Xr=124,$r=125,Jr=160,Yr=96,en=[/^\s*$/,/[<>]/,/^[{}]$/,/&(#|[a-z])/i,/^\/\//],tn=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])):rn},InterpolationConfig}(),rn=new tn("{{","}}");!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"}(Ie||(Ie={}));var nn,on=["var","let","null","undefined","true","false","if","else","this"],sn=function(){function Lexer(){}return Lexer.prototype.tokenize=function(e){for(var t=new ln(e),r=[],n=t.scanToken();null!=n;)r.push(n),n=t.scanToken();return r},Lexer.decorators=[{type:r.Injectable}],Lexer.ctorParameters=[],Lexer}(),an=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==Ie.Character&&this.numValue==e},Token.prototype.isNumber=function(){return this.type==Ie.Number},Token.prototype.isString=function(){return this.type==Ie.String},Token.prototype.isOperator=function(e){return this.type==Ie.Operator&&this.strValue==e},Token.prototype.isIdentifier=function(){return this.type==Ie.Identifier},Token.prototype.isKeyword=function(){return this.type==Ie.Keyword},Token.prototype.isKeywordLet=function(){return this.type==Ie.Keyword&&"let"==this.strValue},Token.prototype.isKeywordNull=function(){return this.type==Ie.Keyword&&"null"==this.strValue},Token.prototype.isKeywordUndefined=function(){return this.type==Ie.Keyword&&"undefined"==this.strValue},Token.prototype.isKeywordTrue=function(){return this.type==Ie.Keyword&&"true"==this.strValue},Token.prototype.isKeywordFalse=function(){return this.type==Ie.Keyword&&"false"==this.strValue},Token.prototype.isKeywordThis=function(){return this.type==Ie.Keyword&&"this"==this.strValue},Token.prototype.isError=function(){return this.type==Ie.Error},Token.prototype.toNumber=function(){return this.type==Ie.Number?this.numValue:-1},Token.prototype.toString=function(){switch(this.type){case Ie.Character:case Ie.Identifier:case Ie.Keyword:case Ie.Operator:case Ie.String:case Ie.Error:return this.strValue;case Ie.Number:return this.numValue.toString();default:return null}},Token}(),un=new an((-1),Ie.Character,0,""),ln=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?Yt: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<=or;){if(++n>=t){r=Yt;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 _r:return this.advance(),isDigit(this.peek)?this.scanNumber(i):newCharacterToken(i,_r);case fr:case dr:case Zr:case $r:case Or:case Rr:case vr:case wr:case Cr:return this.scanCharacter(i,r);case hr:case ar:return this.scanString();case ur:case yr:case gr:case mr:case br:case cr:case Lr:return this.scanOperator(i,s.fromCharCode(r));case Ar:return this.scanComplexOperator(i,"?",_r,".");case Er:case Pr:return this.scanComplexOperator(i,s.fromCharCode(r),Sr,"=");case sr: case Sr:return this.scanComplexOperator(i,s.fromCharCode(r),Sr,"=",Sr,"=");case pr:return this.scanComplexOperator(i,"&",pr,"&");case Xr:return this.scanComplexOperator(i,"|",Xr,"|");case Jr: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 on.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==_r)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==kr){null==r&&(r=new a),r.add(i.substring(n,this.index)),this.advance();var o;if(this.peek==Gr){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==Yt)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}(),cn=function(){function SplitInterpolation(e,t){this.strings=e,this.expressions=t}return SplitInterpolation}(),pn=function(){function TemplateBindingParseResult(e,t,r){this.templateBindings=e,this.warnings=t,this.errors=r}return TemplateBindingParseResult}(),hn=function(){function Parser(e){this._lexer=e,this.errors=[]}return Parser.prototype.parseAction=function(e,t,r){void 0===r&&(r=rn),this._checkNoInterpolation(e,t,r);var n=this._lexer.tokenize(this._stripComments(e)),i=new dn(e,t,n,(!0),this.errors).parseChain();return new Xt(i,e,t,this.errors)},Parser.prototype.parseBinding=function(e,t,r){void 0===r&&(r=rn);var n=this._parseBindingAst(e,t,r);return new Xt(n,e,t,this.errors)},Parser.prototype.parseSimpleBinding=function(e,t,r){void 0===r&&(r=rn);var n=this._parseBindingAst(e,t,r);return mn.check(n)||this._reportError("Host binding expression can only contain field access and constants",e,t),new Xt(n,e,t,this.errors)},Parser.prototype._reportError=function(e,t,r,n){this.errors.push(new xt(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 dn(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 It(new Tt(0,e.length),n,i,t)},Parser.prototype.parseTemplateBindings=function(e,t){var r=this._lexer.tokenize(e);return new dn(e,t,r,(!1),this.errors).parseTemplateBindings()},Parser.prototype.parseInterpolation=function(e,t,r){void 0===r&&(r=rn);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 cn(o,a)},Parser.prototype.wrapLiteralPrimitive=function(e,t){return new Xt(new Wt(new Tt(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 Gt(this.span(e.span.start),t,e,r);continue}break}return e},_ParseAST.prototype.parseAdditive=function(){for(var e=this.parseMultiplicative();this.next.type==Ie.Operator;){var t=this.next.strValue;switch(t){case"+":case"-":this.advance();var r=this.parseMultiplicative();e=new Gt(this.span(e.span.start),t,e,r);continue}break}return e},_ParseAST.prototype.parseMultiplicative=function(){for(var e=this.parsePrefix();this.next.type==Ie.Operator;){var t=this.next.strValue;switch(t){case"*":case"%":case"/":this.advance();var r=this.parsePrefix();e=new Gt(this.span(e.span.start),t,e,r);continue}break}return e},_ParseAST.prototype.parsePrefix=function(){if(this.next.type==Ie.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 Gt(this.span(e),t,new Wt(new Tt(e,e),0),r);case"!":return this.advance(),r=this.parsePrefix(),new qt(this.span(e),r)}}return this.parseCallChain()},_ParseAST.prototype.parseCallChain=function(){for(var e=this.parsePrimary();;)if(this.optionalCharacter(_r))e=this.parseAccessMemberOrMethodCall(e,!1);else if(this.optionalOperator("?."))e=this.parseAccessMemberOrMethodCall(e,!0);else if(this.optionalCharacter(Or)){this.rbracketsExpected++;var t=this.parsePipe();if(this.rbracketsExpected--,this.expectCharacter(Rr),this.optionalOperator("=")){var r=this.parseConditional();e=new jt(this.span(e.span.start),e,t,r)}else e=new Ft(this.span(e.span.start),e,t)}else{if(!this.optionalCharacter(fr))return e;this.rparensExpected++;var n=this.parseCallArguments();this.rparensExpected--,this.expectCharacter(dr),e=new Zt(this.span(e.span.start),e,n)}},_ParseAST.prototype.parsePrimary=function(){var e=this.inputIndex;if(this.optionalCharacter(fr)){this.rparensExpected++;var t=this.parsePipe();return this.rparensExpected--,this.expectCharacter(dr),t}if(this.next.isKeywordNull())return this.advance(),new Wt(this.span(e),null);if(this.next.isKeywordUndefined())return this.advance(),new Wt(this.span(e),(void 0));if(this.next.isKeywordTrue())return this.advance(),new Wt(this.span(e),(!0));if(this.next.isKeywordFalse())return this.advance(),new Wt(this.span(e),(!1));if(this.next.isKeywordThis())return this.advance(),new Nt(this.span(e));if(this.optionalCharacter(Or)){this.rbracketsExpected++;var r=this.parseExpressionList(Rr);return this.rbracketsExpected--,this.expectCharacter(Rr),new Ut(this.span(e),r)}if(this.next.isCharacter(Zr))return this.parseLiteralMap();if(this.next.isIdentifier())return this.parseAccessMemberOrMethodCall(new Nt(this.span(e)),!1);if(this.next.isNumber()){var n=this.next.toNumber();return this.advance(),new Wt(this.span(e),n)}if(this.next.isString()){var i=this.next.toString();return this.advance(),new Wt(this.span(e),i)}return this.index>=this.tokens.length?(this.error("Unexpected end of expression: "+this.input),new Dt(this.span(e))):(this.error("Unexpected token "+this.next),new Dt(this.span(e)))},_ParseAST.prototype.parseExpressionList=function(e){var t=[];if(!this.next.isCharacter(e))do t.push(this.parsePipe());while(this.optionalCharacter(vr));return t},_ParseAST.prototype.parseLiteralMap=function(){var e=[],t=[],r=this.inputIndex;if(this.expectCharacter(Zr),!this.optionalCharacter($r)){this.rbracesExpected++;do{var n=this.expectIdentifierOrKeywordOrString();e.push(n),this.expectCharacter(wr),t.push(this.parsePipe())}while(this.optionalCharacter(vr));this.rbracesExpected--,this.expectCharacter($r)}return new Ht(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(fr)){this.rparensExpected++;var i=this.parseCallArguments();this.expectCharacter(dr),this.rparensExpected--;var o=this.span(r);return t?new Qt(o,e,n,i):new Kt(o,e,n,i)}if(t)return this.optionalOperator("=")?(this.error("The '?.' operator cannot be used in the assignment"),new Dt(this.span(r))):new Lt(this.span(r),e,n);if(this.optionalOperator("=")){if(!this.parseAction)return this.error("Bindings cannot contain assignments"),new Dt(this.span(r));var s=this.parseConditional();return new Rt(this.span(r),e,n,s)}return new kt(this.span(r),e,n)},_ParseAST.prototype.parseCallArguments=function(){if(this.next.isCharacter(dr))return[];var e=[];do e.push(this.parsePipe());while(this.optionalCharacter(vr));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}(),wn=function(){function Text(e,t){this.value=e,this.sourceSpan=t}return Text.prototype.visit=function(e,t){return e.visitText(this,t)},Text}(),Cn=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}(),En=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}(),Sn=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}(),Pn=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}(),An=function(){function Comment(e,t){this.value=e,this.sourceSpan=t}return Comment.prototype.visit=function(e,t){return e.visitComment(this,t)},Comment}(),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 __)};!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"}(_n||(_n={}));var Tn,Mn=function(){function Token(e,t,r){this.type=e,this.parts=t,this.sourceSpan=r}return Token}(),In=function(e){function TokenError(t,r,n){e.call(this,n,t),this.tokenType=r}return xn(TokenError,e),TokenError}(bn),Dn=function(){function TokenizeResult(e,t){this.tokens=e,this.errors=t}return TokenizeResult}(),Nn=/\r\n?/g,Vn=function(){function _ControlFlowError(e){this.error=e}return _ControlFlowError}(),On=function(){function _Tokenizer(e,t,r,n){void 0===n&&(n=rn),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(Nn,"\n")},_Tokenizer.prototype.tokenize=function(){for(;this._peek!==Yt;){var e=this._getLocation();try{this._attemptCharCode(Er)?this._attemptCharCode(sr)?this._attemptCharCode(Or)?this._consumeCdata(e):this._attemptCharCode(gr)?this._consumeComment(e):this._consumeDocType(e):this._attemptCharCode(br)?this._consumeTagClose(e):this._consumeTagOpen(e):this._tokenizeIcu&&this._tokenizeExpansionForm()||this._consumeText()}catch(t){if(!(t instanceof Vn))throw t;this.errors.push(t.error)}}return this._beginToken(_n.EOF),this._endToken([]),new Dn(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===$r){if(this._isInExpansionCase())return this._consumeExpansionCaseEnd(),!0;if(this._isInExpansionForm())return this._consumeExpansionFormEnd(),!0}return!1},_Tokenizer.prototype._getLocation=function(){return new yn(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 gn(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 Mn(this._currentTokenType,e,new gn(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 In(e,this._currentTokenType,t);return this._currentTokenStart=null,this._currentTokenType=null,new Vn(r)},_Tokenizer.prototype._advance=function(){if(this._index>=this._length)throw this._createError(_unexpectedCharacterErrorMsg(Yt),this._getSpan());this._peek===tr?(this._line++,this._column=0):this._peek!==tr&&this._peek!==ir&&this._column++,this._index++,this._peek=this._index>=this._length?Yt:this._input.charCodeAt(this._index),this._nextPeek=this._index+1>=this._length?Yt: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(_n.COMMENT_START,e),this._requireCharCode(gr),this._endToken([]);var r=this._consumeRawText(!1,gr,function(){return t._attemptStr("->")});this._beginToken(_n.COMMENT_END,r.sourceSpan.end),this._endToken([])},_Tokenizer.prototype._consumeCdata=function(e){var t=this;this._beginToken(_n.CDATA_START,e),this._requireStr("CDATA["),this._endToken([]);var r=this._consumeRawText(!1,Rr,function(){return t._attemptStr("]>")});this._beginToken(_n.CDATA_END,r.sourceSpan.end),this._endToken([])},_Tokenizer.prototype._consumeDocType=function(e){this._beginToken(_n.DOC_TYPE,e),this._attemptUntilChar(Pr),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!==wr&&!isPrefixEnd(this._peek);)this._advance();var r;this._peek===wr?(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!==br&&this._peek!==Pr;)this._consumeAttributeName(),this._attemptCharCodeUntilFn(isNotWhitespace),this._attemptCharCode(Sr)&&(this._attemptCharCodeUntilFn(isNotWhitespace),this._consumeAttributeValue()),this._attemptCharCodeUntilFn(isNotWhitespace);this._consumeTagOpenEnd()}catch(o){if(o instanceof Vn)return this._restorePosition(n),this._beginToken(_n.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,Er,function(){return!!r._attemptCharCode(br)&&(r._attemptCharCodeUntilFn(isNotWhitespace),!!r._attemptStrCaseInsensitive(e)&&(r._attemptCharCodeUntilFn(isNotWhitespace),r._attemptCharCode(Pr)))});this._beginToken(_n.TAG_CLOSE,n.sourceSpan.end),this._endToken([null,e])},_Tokenizer.prototype._consumeTagOpenStart=function(e){this._beginToken(_n.TAG_OPEN_START,e);var t=this._consumePrefixAndName();this._endToken(t)},_Tokenizer.prototype._consumeAttributeName=function(){this._beginToken(_n.ATTR_NAME);var e=this._consumePrefixAndName();this._endToken(e)},_Tokenizer.prototype._consumeAttributeValue=function(){this._beginToken(_n.ATTR_VALUE);var e;if(this._peek===hr||this._peek===ar){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(br)?_n.TAG_OPEN_END_VOID:_n.TAG_OPEN_END;this._beginToken(e),this._requireCharCode(Pr),this._endToken([])},_Tokenizer.prototype._consumeTagClose=function(e){this._beginToken(_n.TAG_CLOSE,e),this._attemptCharCodeUntilFn(isNotWhitespace);var t=this._consumePrefixAndName();this._attemptCharCodeUntilFn(isNotWhitespace),this._requireCharCode(Pr),this._endToken(t)},_Tokenizer.prototype._consumeExpansionFormStart=function(){this._beginToken(_n.EXPANSION_FORM_START,this._getLocation()),this._requireCharCode(Zr),this._endToken([]),this._expansionCaseStack.push(_n.EXPANSION_FORM_START),this._beginToken(_n.RAW_TEXT,this._getLocation());var e=this._readUntil(vr);this._endToken([e],this._getLocation()),this._requireCharCode(vr),this._attemptCharCodeUntilFn(isNotWhitespace),this._beginToken(_n.RAW_TEXT,this._getLocation());var t=this._readUntil(vr);this._endToken([t],this._getLocation()),this._requireCharCode(vr),this._attemptCharCodeUntilFn(isNotWhitespace)},_Tokenizer.prototype._consumeExpansionCaseStart=function(){this._beginToken(_n.EXPANSION_CASE_VALUE,this._getLocation());var e=this._readUntil(Zr).trim();this._endToken([e],this._getLocation()),this._attemptCharCodeUntilFn(isNotWhitespace),this._beginToken(_n.EXPANSION_CASE_EXP_START,this._getLocation()),this._requireCharCode(Zr),this._endToken([],this._getLocation()),this._attemptCharCodeUntilFn(isNotWhitespace),this._expansionCaseStack.push(_n.EXPANSION_CASE_EXP_START)},_Tokenizer.prototype._consumeExpansionCaseEnd=function(){this._beginToken(_n.EXPANSION_CASE_EXP_END,this._getLocation()),this._requireCharCode($r),this._endToken([],this._getLocation()),this._attemptCharCodeUntilFn(isNotWhitespace),this._expansionCaseStack.pop()},_Tokenizer.prototype._consumeExpansionFormEnd=function(){this._beginToken(_n.EXPANSION_FORM_END,this._getLocation()),this._requireCharCode($r),this._endToken([]),this._expansionCaseStack.pop()},_Tokenizer.prototype._consumeText=function(){ var e=this._getLocation();this._beginToken(_n.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===Er||this._peek===Yt)return!0;if(this._tokenizeIcu&&!this._inInterpolation){if(isExpansionFormStart(this._input,this._index,this._interpolationConfig))return!0;if(this._peek===$r&&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]===_n.EXPANSION_CASE_EXP_START},_Tokenizer.prototype._isInExpansionForm=function(){return this._expansionCaseStack.length>0&&this._expansionCaseStack[this._expansionCaseStack.length-1]===_n.EXPANSION_FORM_START},_Tokenizer}(),kn=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 __)},Rn=function(e){function TreeError(t,r,n){e.call(this,r,n),this.elementName=t}return kn(TreeError,e),TreeError.create=function(e,t,r){return new TreeError(e,t,r)},TreeError}(bn),Ln=function(){function ParseTreeResult(e,t){this.rootNodes=e,this.errors=t}return ParseTreeResult}(),Fn=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=rn);var i=tokenize(e,t,this.getTagDefinition,r,n),o=new jn(i.tokens,this.getTagDefinition).build();return new Ln(o.rootNodes,i.errors.concat(o.errors))},Parser}(),jn=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!==_n.EOF;)this._peek.type===_n.TAG_OPEN_START?this._consumeStartTag(this._advance()):this._peek.type===_n.TAG_CLOSE?this._consumeEndTag(this._advance()):this._peek.type===_n.CDATA_START?(this._closeVoidElement(),this._consumeCdata(this._advance())):this._peek.type===_n.COMMENT_START?(this._closeVoidElement(),this._consumeComment(this._advance())):this._peek.type===_n.TEXT||this._peek.type===_n.RAW_TEXT||this._peek.type===_n.ESCAPABLE_RAW_TEXT?(this._closeVoidElement(),this._consumeText(this._advance())):this._peek.type===_n.EXPANSION_FORM_START?this._consumeExpansion(this._advance()):this._advance();return new Ln(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 gn(e.sourceSpan.start,n.sourceSpan.end),s=new gn(t.sourceSpan.start,n.sourceSpan.end);return new En(e.parts[0],i.rootNodes,o,e.sourceSpan,s)},_TreeBuilder.prototype._collectExpansionExpTokens=function(e){for(var t=[],r=[_n.EXPANSION_CASE_EXP_START];;){if(this._peek.type!==_n.EXPANSION_FORM_START&&this._peek.type!==_n.EXPANSION_CASE_EXP_START||r.push(this._peek.type),this._peek.type===_n.EXPANSION_CASE_EXP_END){if(!lastOnStack(r,_n.EXPANSION_CASE_EXP_START))return this._errors.push(Rn.create(null,e.sourceSpan,"Invalid ICU message. Missing '}'.")),null;if(r.pop(),0==r.length)return t}if(this._peek.type===_n.EXPANSION_FORM_END){if(!lastOnStack(r,_n.EXPANSION_FORM_START))return this._errors.push(Rn.create(null,e.sourceSpan,"Invalid ICU message. Missing '}'.")),null;r.pop()}if(this._peek.type===_n.EOF)return this._errors.push(Rn.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 wn(t,e.sourceSpan))},_TreeBuilder.prototype._closeVoidElement=function(){if(this._elementStack.length>0){var e=D.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===_n.ATTR_NAME;)n.push(this._consumeAttr(this._advance()));var i=this._getElementFullName(t,r,this._getParentElement()),o=!1;if(this._peek.type===_n.TAG_OPEN_END_VOID){this._advance(),o=!0;var s=this.getTagDefinition(i);s.canSelfClose||null!==getNsPrefix(i)||s.isVoid||this._errors.push(Rn.create(i,e.sourceSpan,'Only void and foreign elements can be self closed "'+e.parts[1]+'"'))}else this._peek.type===_n.TAG_OPEN_END&&(this._advance(),o=!1);var a=this._peek.sourceSpan.start,u=new gn(e.sourceSpan.start,a),l=new Pn(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=D.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 Pn(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(Rn.create(t,e.sourceSpan,'Void elements do not have end tags "'+e.parts[1]+'"')):this._popElement(t)||this._errors.push(Rn.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 D.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===_n.ATTR_VALUE){var i=this._advance();n=i.parts[0],r=i.sourceSpan.end}return new Sn(t,n,new gn(e.sourceSpan.start,r))},_TreeBuilder.prototype._getParentElement=function(){return this._elementStack.length>0?D.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:D.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}(),Bn=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}(),Wn=new Bn,Un=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}(),Hn=function(){function Text(e,t){this.value=e,this.sourceSpan=t}return Text.prototype.visit=function(e,t){return e.visitText(this,t)},Text}(),zn=function(){function Container(e,t){this.children=e,this.sourceSpan=t}return Container.prototype.visit=function(e,t){return e.visitContainer(this,t)},Container}(),Gn=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}(),qn=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}(),Kn=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}(),Qn=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}(),Zn={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"},Xn=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=Zn[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=Zn[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}(),$n=new hn(new sn),Jn=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 Cn,this._icuDepth=0,this._placeholderRegistry=new Xn,this._placeholderToContent={},this._placeholderToIds={};var n=visitAll(this,e,{});return new Un(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 qn(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 Gn(e.switchValue,e.type,n,e.sourceSpan);if(e.cases.forEach(function(e){n[e.value]=new zn(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 Qn(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 Hn(e,t);for(var n=[],i=new zn(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 Hn)){this._messages.splice(i,1);break}}this._msgCountAtSectionStart=void 0},_Visitor.prototype._reportError=function(e,t){this._errors.push(new ti(e.sourceSpan,t))},_Visitor}(),ui=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}(),li=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}(),ci=new li,pi=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 __)},hi=function(e){function XmlParser(){e.call(this,getXmlTagDefinition)}return pi(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}(Fn),fi=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}(),di=new fi,mi=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}(),yi=function(){function Doctype(e,t){this.rootTag=e,this.dtd=t}return Doctype.prototype.visit=function(e){return e.visitDoctype(this)},Doctype}(),vi=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}(),gi=function(){function Text(e){this.value=_escapeXml(e)}return Text.prototype.visit=function(e){return e.visitText(this)},Text}(),_i=[[/&/g,"&"],[/"/g,"""],[/'/g,"'"],[//g,">"]],bi="1.2",wi="urn:oasis:names:tc:xliff:document:1.2",Ci="en",Ei="x",Si="source",Pi="target",Ai="trans-unit",xi=function(e){return void 0===e&&(e=0),new gi("\n"+new Array(e).join(" "))},Ti=function(){function Xliff(e,t){this._htmlParser=e,this._interpolationConfig=t}return Xliff.prototype.write=function(e){var t=new Mi,r=[];Object.keys(e).forEach(function(n){var i=e[n],o=new vi(Ai,{id:n,datatype:"html"});o.children.push(xi(8),new vi(Si,{},t.serialize(i.nodes)),xi(8),new vi(Pi)),i.description&&o.children.push(xi(8),new vi("note",{priority:"1",from:"description"},[new gi(i.description)])),i.meaning&&o.children.push(xi(8),new vi("note",{priority:"1",from:"meaning"},[new gi(i.meaning)])),o.children.push(xi(6)),r.push(xi(6),o)});var n=new vi("body",{},r.concat([xi(4)])),i=new vi("file",{"source-language":Ci,datatype:"plaintext",original:"ng2.template"},[xi(4),n,xi(2)]),o=new vi("xliff",{version:bi,xmlns:wi},[xi(2),i,xi()]);return serialize([new mi({version:"1.0",encoding:"UTF-8"}),xi(),o])},Xliff.prototype.load=function(e,t,r){var n=this,i=(new hi).parse(e,t);if(i.errors.length)throw new Error("xtb parse errors:\n"+i.errors.join("\n"));var o=(new Ii).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}(),Mi=function(){function _WriteVisitor(){}return _WriteVisitor.prototype.visitText=function(e,t){return[new gi(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=new vi(Ei,{id:e.startName,ctype:e.tag});if(e.isVoid)return[r];var n=new vi(Ei,{id:e.closeName,ctype:e.tag});return[r].concat(this.serialize(e.children),[n])},_WriteVisitor.prototype.visitPlaceholder=function(e,t){return[new vi(Ei,{id:e.name})]},_WriteVisitor.prototype.visitIcuPlaceholder=function(e,t){return[new vi(Ei,{id:e.name})]},_WriteVisitor.prototype.serialize=function(e){var t=this;return this._isInIcu=!1,D.flatten(e.map(function(e){return e.visit(t)}))},_WriteVisitor}(),Ii=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 Ai:this._target=null;var r=e.attrs.find(function(e){return"id"===e.name});r?this._msgId=r.value:this._addError(e,"<"+Ai+'> misses the "id" attribute'),visitAll(this,e.children,null),null!==this._msgId&&this._messageNodes.push([this._msgId,this._target]);break;case Si:break;case Pi:this._target=e.children;break;case Ei: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,"<"+Ei+'> 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 ti(e.sourceSpan,t))},_LoadVisitor}(),Di="messagebundle",Ni="msg",Vi="ph",Oi="ex",ki='\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n',Ri=function(){function Xmb(){}return Xmb.prototype.write=function(e){var t=new Li,r=new vi(Di);return r.children.push(new gi("\n")),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 gi(" "),new vi(Ni,o,t.serialize(i.nodes)),new gi("\n"))}),serialize([new mi({version:"1.0",encoding:"UTF-8"}),new gi("\n"),new yi(Di,ki),new gi("\n"),r])},Xmb.prototype.load=function(e,t,r){throw new Error("Unsupported")},Xmb}(),Li=function(){function _Visitor(){}return _Visitor.prototype.visitText=function(e,t){return[new gi(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 gi("{"+e.expression+", "+e.type+", ")]; return Object.keys(e.cases).forEach(function(t){n.push.apply(n,[new gi(t+" {")].concat(e.cases[t].visit(r),[new gi("} ")]))}),n.push(new gi("}")),n},_Visitor.prototype.visitTagPlaceholder=function(e,t){var r=new vi(Oi,{},[new gi("<"+e.tag+">")]),n=new vi(Vi,{name:e.startName},[r]);if(e.isVoid)return[n];var i=new vi(Oi,{},[new gi("")]),o=new vi(Vi,{name:e.closeName},[i]);return[n].concat(this.serialize(e.children),[o])},_Visitor.prototype.visitPlaceholder=function(e,t){return[new vi(Vi,{name:e.name})]},_Visitor.prototype.visitIcuPlaceholder=function(e,t){return[new vi(Vi,{name:e.name})]},_Visitor.prototype.serialize=function(e){var t=this;return D.flatten(e.map(function(e){return e.visit(t)}))},_Visitor}(),Fi="translationbundle",ji="translation",Bi="ph",Wi=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 hi).parse(e,t);if(i.errors.length)throw new Error("xtb parse errors:\n"+i.errors.join("\n"));var o=(new Ui).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}(),Ui=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 Fi:this._bundleDepth++,this._bundleDepth>1&&this._addError(e,"<"+Fi+"> elements can not be nested"),visitAll(this,e.children,null),this._bundleDepth--;break;case ji:this._translationDepth++,this._translationDepth>1&&this._addError(e,"<"+ji+"> 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,"<"+ji+'> misses the "id" attribute'),this._translationDepth--;break;case Bi: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,"<"+Bi+'> 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 ti(e.sourceSpan,t))},_Visitor}(),Hi=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}(),zi=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=rn);var i=this._htmlParser.parse(e,t,r,n);if(!this._translations||""===this._translations)return i;var o=new ui(this._htmlParser,[],{}),s=o.updateFromTemplate(e,t,n);if(s&&s.length)return new Ln(i.rootNodes,i.errors.concat(s));var a=this._createSerializer(n),u=Hi.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 Ri;case"xtb":return new Wi(this._htmlParser,e);case"xliff":case"xlf":default:return new Ti(this._htmlParser,e)}},I18NHtmlParser}(),Gi=r.__core_private__.isDefaultChangeDetectionStrategy,qi=r.__core_private__.ChangeDetectorStatus,Ki=r.__core_private__.LifecycleHooks,Qi=r.__core_private__.LIFECYCLE_HOOKS_VALUES,Zi=r.__core_private__.ReflectorReader,Xi=r.__core_private__.AppElement,$i=r.__core_private__.CodegenComponentFactoryResolver,Ji=r.__core_private__.AppView,Yi=r.__core_private__.DebugAppView,eo=r.__core_private__.NgModuleInjector,to=r.__core_private__.registerModuleFactory,ro=r.__core_private__.ViewType,no=r.__core_private__.MAX_INTERPOLATION_VALUES,io=r.__core_private__.checkBinding,oo=r.__core_private__.flattenNestedViewRenderNodes,so=r.__core_private__.interpolate,ao=r.__core_private__.ViewUtils,uo=r.__core_private__.DebugContext,lo=r.__core_private__.StaticNodeDebugInfo,co=r.__core_private__.devModeEqual,po=r.__core_private__.UNINITIALIZED,ho=r.__core_private__.ValueUnwrapper,fo=r.__core_private__.TemplateRef_,mo=r.__core_private__.EMPTY_ARRAY,yo=r.__core_private__.EMPTY_MAP,vo=r.__core_private__.pureProxy1,go=r.__core_private__.pureProxy2,_o=r.__core_private__.pureProxy3,bo=r.__core_private__.pureProxy4,wo=r.__core_private__.pureProxy5,Co=r.__core_private__.pureProxy6,Eo=r.__core_private__.pureProxy7,So=r.__core_private__.pureProxy8,Po=r.__core_private__.pureProxy9,Ao=r.__core_private__.pureProxy10,xo=r.__core_private__.castByValue,To=r.__core_private__.Console,Mo=r.__core_private__.reflector,Io=r.__core_private__.Reflector,Do=r.__core_private__.ReflectionCapabilities,No=r.__core_private__.NoOpAnimationPlayer,Vo=r.__core_private__.AnimationSequencePlayer,Oo=r.__core_private__.AnimationGroupPlayer,ko=r.__core_private__.AnimationKeyframe,Ro=r.__core_private__.AnimationStyles,Lo=r.__core_private__.AnimationOutput,Fo=r.__core_private__.ANY_STATE,jo=r.__core_private__.DEFAULT_STATE,Bo=r.__core_private__.EMPTY_STATE,Wo=r.__core_private__.FILL_STYLE_FLAG,Uo=r.__core_private__.prepareFinalAnimationStyles,Ho=r.__core_private__.balanceAnimationKeyframes,zo=r.__core_private__.clearStyles,Go=r.__core_private__.collectAndResolveStyles,qo=r.__core_private__.renderStyles,Ko=r.__core_private__.ComponentStillLoadingError,Qo=assetUrl("core","linker/view"),Zo=assetUrl("core","linker/view_utils"),Xo=assetUrl("core","change_detection/change_detection"),$o=assetUrl("core","animation/animation_style_util"),Jo=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:ao},Identifiers.AppView={name:"AppView",moduleUrl:Qo,runtime:Ji},Identifiers.DebugAppView={name:"DebugAppView",moduleUrl:Qo,runtime:Yi},Identifiers.AppElement={name:"AppElement",moduleUrl:assetUrl("core","linker/element"),runtime:Xi},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:fo},Identifiers.CodegenComponentFactoryResolver={name:"CodegenComponentFactoryResolver",moduleUrl:assetUrl("core","linker/component_factory_resolver"),runtime:$i},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:eo,moduleUrl:assetUrl("core","linker/ng_module_factory")},Identifiers.RegisterModuleFactoryFn={name:"registerModuleFactory",runtime:to,moduleUrl:assetUrl("core","linker/ng_module_factory_loader")},Identifiers.ValueUnwrapper={name:"ValueUnwrapper",moduleUrl:Xo,runtime:ho},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:ro},Identifiers.ChangeDetectionStrategy={name:"ChangeDetectionStrategy",moduleUrl:Xo,runtime:r.ChangeDetectionStrategy},Identifiers.StaticNodeDebugInfo={name:"StaticNodeDebugInfo",moduleUrl:assetUrl("core","linker/debug_context"),runtime:lo},Identifiers.DebugContext={name:"DebugContext",moduleUrl:assetUrl("core","linker/debug_context"),runtime:uo},Identifiers.Renderer={name:"Renderer",moduleUrl:assetUrl("core","render/api"),runtime:r.Renderer},Identifiers.SimpleChange={name:"SimpleChange",moduleUrl:Xo,runtime:r.SimpleChange},Identifiers.UNINITIALIZED={name:"UNINITIALIZED",moduleUrl:Xo,runtime:po},Identifiers.ChangeDetectorStatus={name:"ChangeDetectorStatus",moduleUrl:Xo,runtime:qi},Identifiers.checkBinding={name:"checkBinding",moduleUrl:Zo,runtime:io},Identifiers.flattenNestedViewRenderNodes={name:"flattenNestedViewRenderNodes",moduleUrl:Zo,runtime:oo},Identifiers.devModeEqual={name:"devModeEqual",moduleUrl:Xo,runtime:co},Identifiers.interpolate={name:"interpolate",moduleUrl:Zo,runtime:so},Identifiers.castByValue={name:"castByValue",moduleUrl:Zo,runtime:xo},Identifiers.EMPTY_ARRAY={name:"EMPTY_ARRAY",moduleUrl:Zo,runtime:mo},Identifiers.EMPTY_MAP={name:"EMPTY_MAP",moduleUrl:Zo,runtime:yo},Identifiers.pureProxies=[null,{name:"pureProxy1",moduleUrl:Zo,runtime:vo},{name:"pureProxy2",moduleUrl:Zo,runtime:go},{name:"pureProxy3",moduleUrl:Zo,runtime:_o},{name:"pureProxy4",moduleUrl:Zo,runtime:bo},{name:"pureProxy5",moduleUrl:Zo,runtime:wo},{name:"pureProxy6",moduleUrl:Zo,runtime:Co},{name:"pureProxy7",moduleUrl:Zo,runtime:Eo},{name:"pureProxy8",moduleUrl:Zo,runtime:So},{name:"pureProxy9",moduleUrl:Zo,runtime:Po},{name:"pureProxy10",moduleUrl:Zo,runtime:Ao}],Identifiers.SecurityContext={name:"SecurityContext",moduleUrl:assetUrl("core","security"),runtime:r.SecurityContext},Identifiers.AnimationKeyframe={name:"AnimationKeyframe",moduleUrl:assetUrl("core","animation/animation_keyframe"),runtime:ko},Identifiers.AnimationStyles={name:"AnimationStyles",moduleUrl:assetUrl("core","animation/animation_styles"),runtime:Ro},Identifiers.NoOpAnimationPlayer={name:"NoOpAnimationPlayer",moduleUrl:assetUrl("core","animation/animation_player"),runtime:No},Identifiers.AnimationGroupPlayer={name:"AnimationGroupPlayer",moduleUrl:assetUrl("core","animation/animation_group_player"),runtime:Oo},Identifiers.AnimationSequencePlayer={name:"AnimationSequencePlayer",moduleUrl:assetUrl("core","animation/animation_sequence_player"),runtime:Vo},Identifiers.prepareFinalAnimationStyles={name:"prepareFinalAnimationStyles",moduleUrl:$o,runtime:Uo},Identifiers.balanceAnimationKeyframes={name:"balanceAnimationKeyframes",moduleUrl:$o,runtime:Ho},Identifiers.clearStyles={name:"clearStyles",moduleUrl:$o,runtime:zo},Identifiers.renderStyles={name:"renderStyles",moduleUrl:$o,runtime:qo},Identifiers.collectAndResolveStyles={name:"collectAndResolveStyles",moduleUrl:$o,runtime:Go},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.AnimationOutput={name:"AnimationOutput",moduleUrl:assetUrl("core","animation/animation_output"),runtime:Lo},Identifiers}(),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 HtmlParser(){e.call(this,getHtmlTagDefinition)}return Yo(HtmlParser,e),HtmlParser.prototype.parse=function(t,r,n,i){return void 0===n&&(n=!1),void 0===i&&(i=rn),e.prototype.parse.call(this,t,r,n,i)},HtmlParser.decorators=[{type:r.Injectable}],HtmlParser.ctorParameters=[],HtmlParser}(Fn),ts=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 __)},rs=["zero","one","two","few","many","other"],ns=function(){function ExpansionResult(e,t,r){this.nodes=e,this.expanded=t,this.errors=r}return ExpansionResult}(),is=function(e){function ExpansionError(t,r){e.call(this,t,r)}return ts(ExpansionError,e),ExpansionError}(bn),os=function(){function _Expander(){this.isExpanded=!1,this.errors=[]}return _Expander.prototype.visitElement=function(e,t){return new Pn(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}(),ss=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 __)},as=function(e){function ProviderError(t,r){e.call(this,r,t)}return ss(ProviderError,e),ProviderError}(bn),us=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}(),ls=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;M.values(this._allProviders).forEach(function(e){a._addQueryReadsTo(e.token,l)}),o.forEach(function(e){a._addQueryReadsTo(new yt({value:e.name}),l)}),isPresent(l.get(resolveIdentifierToken(Jo.ViewContainerRef).reference))&&(this._hasViewContainer=!0),M.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;M.values(this._allProviders).forEach(function(t){e._getOrCreateLocalProvider(t.providerType,t.token,!1)})},Object.defineProperty(ProviderElementContext.prototype,"transformProviders",{get:function(){return M.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=D.clone(this._directiveAsts);return D.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)&&D.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)&&D.addAll(r,t),r},ProviderElementContext.prototype._getOrCreateLocalProvider=function(e,r,n){var i=this,o=this._allProviders.get(r.reference);if(isBlank(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 as("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 ft({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 ft({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(Jo.Renderer).reference||r.token.reference===resolveIdentifierToken(Jo.ElementRef).reference||r.token.reference===resolveIdentifierToken(Jo.ChangeDetectorRef).reference||r.token.reference===resolveIdentifierToken(Jo.TemplateRef).reference)return r;r.token.reference===resolveIdentifierToken(Jo.ViewContainerRef).reference&&(this._hasViewContainer=!0)}if(r.token.reference===resolveIdentifierToken(Jo.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)isBlank(s)&&r.isOptional&&(s=new ft({isValue:!0,value:null}));else{for(;isBlank(s)&&isPresent(i._parent);){var a=i;i=i._parent,a._isViewRoot&&(o=!1),s=i._getLocalDependency(t.ProviderAstType.PublicService,r,o)}isBlank(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 ft({isValue:!0,value:null}):null)}return isBlank(s)&&this._viewContext.errors.push(new as("No provider for "+r.token.name,this._sourceSpan)),s},ProviderElementContext}(),cs=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 dt({token:new yt({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(M.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 M.values(this._transformedProviders)},NgModuleProviderAnalyzer.prototype._getOrCreateLocalProvider=function(e,t){var r=this,n=this._allProviders.get(e.reference);if(isBlank(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 as("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 ft({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(Jo.Injector).reference||e.token.reference===resolveIdentifierToken(Jo.ComponentFactoryResolver).reference?n=!0:isPresent(this._getOrCreateLocalProvider(e.token,t))&&(n=!0));var i=e;return e.isSelf&&!n&&(e.isOptional?i=new ft({isValue:!0,value:null}):this._errors.push(new as("No provider for "+e.token.name,r))),i},NgModuleProviderAnalyzer}(),ps=function(){function ElementSchemaRegistry(){}return ElementSchemaRegistry}(),hs=function(){function StyleWithImports(e,t){this.style=e,this.styleUrls=t}return StyleWithImports}(),fs=/@import\s+(?:url\()?\s*(?:(?:['"]([^'"]*))|([^;\)\s]*))[^;]*;?/g,ds=/^([^:\/?#]+):/,ms="select",ys="ng-content",vs="link",gs="rel",_s="href",bs="stylesheet",ws="style",Cs="script",Es="ngNonBindable",Ss="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"}(si||(si={}));var Ps,As=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}(),xs=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 __)},Ts=/^(?:(?:(?:(bind-)|(let-)|(ref-|#)|(on-)|(bindon-)|(@))(.+))|\[\(([^\)]+)\)\]|\[([^\]]+)\]|\(([^\)]+)\))$/,Ms=1,Is=2,Ds=3,Ns=4,Vs=5,Os=6,ks=7,Rs=8,Ls=9,Fs=10,js="animate-",Bs="template",Ws="template",Us="*",Hs="class",zs=".",Gs="attr",qs="class",Ks="style",Qs=W.parse("*")[0],Zs=new r.OpaqueToken("TemplateTransforms"),Xs=function(e){function TemplateParseError(t,r,n){e.call(this,r,t,n)}return xs(TemplateParseError,e),TemplateParseError}(bn),$s=function(){function TemplateParseResult(e,t){this.templateAst=e,this.errors=t}return TemplateParseResult}(),Js=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===nn.WARNING}),u=s.errors.filter(function(e){return e.level===nn.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=tn.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 Ln(c.nodes,l)}if(u.rootNodes.length>0){var p=removeIdentifierDuplicates(r),h=removeIdentifierDuplicates(n),f=new us(e,u.rootNodes[0].sourceSpan),d=new Ys(f,p,h,i,this._exprParser,this._schemaRegistry);a=visitAll(d,u.rootNodes,ia),l.push.apply(l,d.errors.concat(f.errors))}else a=[];return this._assertNoReferenceDuplicationOnTemplate(a,l),l.length>0?new $s(a,l):(isPresent(this.transforms)&&this.transforms.forEach(function(e){a=templateVisitAll(e,a)}),new $s(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 Xs('Reference "#'+n+'" is defined several times',e.sourceSpan,nn.FATAL);t.push(i)}})})},TemplateParser.decorators=[{type:r.Injectable}],TemplateParser.ctorParameters=[{type:hn},{type:ps},{type:zi},{type:To},{type:Array,decorators:[{type:r.Optional},{type:r.Inject,args:[Zs]}]}],TemplateParser}(),Ys=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 U,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=W.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=nn.FATAL),this.errors.push(new Xs(e,t,r))},TemplateParseVisitor.prototype._reportParserErrors=function(e,t){for(var r=0,n=e;rno)throw new Error("Only support at most "+no+" 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 Dt?(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,nn.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 sa;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(Qs),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===si.SCRIPT||i.type===si.STYLE)return null;if(i.type===si.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==Bs;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 ls(this.providerViewContext,t.providerContext,T,A,m,P,e.sourceSpan),I=visitAll(i.nonBindable?oa:this,e.children,na.create(_,A,_?t.providerContext:M));M.afterElement();var D,N=isPresent(i.projectAs)?W.parse(i.projectAs)[0]:b,V=t.findNgContentIndex(N);if(i.type===si.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:V,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:V,e.sourceSpan);else{this._assertElementExists(S,e),this._assertOnlyOneComponent(A,e.sourceSpan);var O=d?null:t.findNgContentIndex(N);D=new y(n,m,x,c,P,M.transformedDirectiveAsts,M.transformProviders,M.transformedHasViewContainer,I,d?null:O,e.sourceSpan)}if(d){var k=createElementCssSelector(Bs,h),R=this._parseDirectives(this.selectorMatcher,k).directives,L=this._createDirectiveAsts(!0,e.name,R,p,[],e.sourceSpan,[]),F=this._createElementPropertyAsts(e.name,p,L);this._assertNoComponentsNorElementBindingsOnTemplate(L,F,e.sourceSpan);var j=new ls(this.providerViewContext,t.providerContext,t.isTemplateElement,L,[],[],e.sourceSpan); j.afterElement(),D=new v([],[],[],f,j.transformedDirectiveAsts,j.transformProviders,j.transformedHasViewContainer,[D],V,e.sourceSpan)}return D},TemplateParseVisitor.prototype._parseInlineTemplateBinding=function(e,t,r,n){var i=null;if(this._normalizeAttributeName(e.name)==Ws)i=e.value;else if(e.name.startsWith(Us)){var o=e.name.substring(Us.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,nn.FATAL),this._parseAnimation(p[ks],l,c,r,i)):p[Rs]?(this._parsePropertyOrAnimation(p[Rs],l,c,r,n,i),this._parseAssignmentEvent(p[Rs],l,c,r,o)):p[Ls]?this._parsePropertyOrAnimation(p[Ls],l,c,r,n,i):p[Fs]&&this._parseEvent(p[Fs],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 ra(e,t,r))},TemplateParseVisitor.prototype._parsePropertyOrAnimation=function(e,t,r,n,i,o){var s=js.length,a="@"==e[0],u=1;e.substring(0,s)==js&&(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 ta(e,t,(!1),r))},TemplateParseVisitor.prototype._parseAssignmentEvent=function(e,t,r,n,i){this._parseEvent(e+"Change",t+"=$event",r,n,i)},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,u,r))},TemplateParseVisitor.prototype._parseLiteralAttr=function(e,t,r,n){n.push(new ta(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 gn(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(Jo.TemplateRef)),s.push(new d(t.name,r,t.sourceSpan))}}),c},TemplateParseVisitor.prototype._createDirectiveHostPropertyAsts=function(e,t,r,n){var i=this;t&&I.forEach(t,function(t,o){if(isString(t)){var s=i._parseBinding(t,r);n.push(i._createElementPropertyAst(e,o,s,r))}else i._reportError('Value of the host property binding "'+o+'" needs to be a string representing an expression but got "'+t+'" ('+typeof t+")",r)})},TemplateParseVisitor.prototype._createDirectiveHostEventAsts=function(e,t,r){var n=this;e&&I.forEach(e,function(e,i){isString(e)?n._parseEvent(i,e,t,[],r):n._reportError('Value of the host listener "'+i+'" needs to be a string representing an expression but got "'+e+'" ('+typeof e+")",t)})},TemplateParseVisitor.prototype._createDirectivePropertyAsts=function(e,t,r){if(e){var n=new Map;t.forEach(function(e){var t=n.get(e.name);(isBlank(t)||t.isLiteral)&&n.set(e.name,e)}),I.forEach(e,function(e,t){var i=n.get(e);i&&r.push(new g(t,i.name,i.expression,i.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&&isBlank(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(zs);if(1===c.length){var p=c[0];if("@"==p[0])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._assertNoEventBinding(a,o),!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.schema' of this component to suppress this message.\n")),this._reportError(f,o)}}else if(c[0]==Gs){a=c[1],this._assertNoEventBinding(a,o);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]==qs?(a=c[1],s=t.PropertyBindingType.Class,u=r.SecurityContext.NONE):c[0]==Ks?(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._assertNoEventBinding=function(e,t){e.toLowerCase().startsWith("on")&&this._reportError("Binding to event attribute '"+e+"' is disallowed "+("for security reasons, please use ("+e.slice(2)+")=..."),t,nn.FATAL)},TemplateParseVisitor.prototype._findComponentDirectiveNames=function(e){var t=[];return e.forEach(function(e){var r=e.directive.type.name;e.directive.isComponent&&t.push(r)}),t},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.schema' 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){I.forEach(e.directive.outputs,function(e){n.add(e)})}),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}(),ea=function(){function NonBindableVisitor(){}return NonBindableVisitor.prototype.visitElement=function(e,t){var r=preparseElement(e);if(r.type===si.SCRIPT||r.type===si.STYLE||r.type===si.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,ia);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(Qs);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}(),ta=function(){function BoundElementOrDirectiveProperty(e,t,r,n){this.name=e,this.expression=t,this.isLiteral=r,this.sourceSpan=n}return BoundElementOrDirectiveProperty}(),ra=function(){function ElementOrDirectiveRef(e,t,r){this.name=e,this.value=t,this.sourceSpan=r}return ElementOrDirectiveRef}(),na=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 U,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}(),ia=new na((!0),new U,null,null),oa=new ea,sa=function(e){function PipeCollector(){e.apply(this,arguments),this.pipes=new Set}return xs(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}(Jt),aa=function(){function CompilerConfig(e){var t=void 0===e?{}:e,n=t.renderTypes,i=void 0===n?new la: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}(),ua=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}(),la=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(Jo.Renderer)},enumerable:!0,configurable:!0}),DefaultRenderTypes}(),ca=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 __)},pa=function(){function AnimationAst(){this.startTime=0,this.playTime=0}return AnimationAst}(),ha=function(e){function AnimationStateAst(){e.apply(this,arguments)}return ca(AnimationStateAst,e),AnimationStateAst}(pa),fa=function(e){function AnimationEntryAst(t,r,n){e.call(this),this.name=t,this.stateDeclarations=r,this.stateTransitions=n}return ca(AnimationEntryAst,e),AnimationEntryAst.prototype.visit=function(e,t){return e.visitAnimationEntry(this,t)},AnimationEntryAst}(pa),da=function(e){function AnimationStateDeclarationAst(t,r){e.call(this),this.stateName=t,this.styles=r}return ca(AnimationStateDeclarationAst,e),AnimationStateDeclarationAst.prototype.visit=function(e,t){return e.visitAnimationStateDeclaration(this,t)},AnimationStateDeclarationAst}(ha),ma=function(){function AnimationStateTransitionExpression(e,t){this.fromState=e,this.toState=t}return AnimationStateTransitionExpression}(),ya=function(e){function AnimationStateTransitionAst(t,r){e.call(this),this.stateChanges=t,this.animation=r}return ca(AnimationStateTransitionAst,e),AnimationStateTransitionAst.prototype.visit=function(e,t){return e.visitAnimationStateTransition(this,t)},AnimationStateTransitionAst}(ha),va=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 ca(AnimationStepAst,e),AnimationStepAst.prototype.visit=function(e,t){return e.visitAnimationStep(this,t)},AnimationStepAst}(pa),ga=function(e){function AnimationStylesAst(t){e.call(this),this.styles=t}return ca(AnimationStylesAst,e),AnimationStylesAst.prototype.visit=function(e,t){return e.visitAnimationStyles(this,t)},AnimationStylesAst}(pa),_a=function(e){function AnimationKeyframeAst(t,r){e.call(this),this.offset=t,this.styles=r}return ca(AnimationKeyframeAst,e),AnimationKeyframeAst.prototype.visit=function(e,t){return e.visitAnimationKeyframe(this,t)},AnimationKeyframeAst}(pa),ba=function(e){function AnimationWithStepsAst(t){e.call(this),this.steps=t}return ca(AnimationWithStepsAst,e),AnimationWithStepsAst}(pa),wa=function(e){function AnimationGroupAst(t){e.call(this,t)}return ca(AnimationGroupAst,e),AnimationGroupAst.prototype.visit=function(e,t){return e.visitAnimationGroup(this,t)},AnimationGroupAst}(ba),Ca=function(e){function AnimationSequenceAst(t){e.call(this,t)}return ca(AnimationSequenceAst,e),AnimationSequenceAst.prototype.visit=function(e,t){return e.visitAnimationSequence(this,t)},AnimationSequenceAst}(ba),Ea=i.Math,Sa=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}(),Pa=function(){function StylesCollection(){this.styles={}}return StylesCollection.prototype.insertAtTime=function(e,t,r){var n=new Sa(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}D.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}(),Aa=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 __)},xa=0,Ta=1,Ma=1e3,Ia=function(e){function AnimationParseError(t){e.call(this,null,t)}return Aa(AnimationParseError,e),AnimationParseError.prototype.toString=function(){return""+this.msg},AnimationParseError}(bn),Da=function(){function ParsedAnimationResult(e,t){this.ast=e,this.errors=t}return ParsedAnimationResult}(),Na=function(){function _AnimationTimings(e,t,r){this.duration=e,this.delay=t,this.easing=r}return _AnimationTimings}(),Va=new Map,Oa=function(){function CompiledAnimationTriggerResult(e,t,r,n,i){this.name=e,this.statesMapStatement=t,this.statesVariableName=r,this.fnStatement=n,this.fnVariable=i}return CompiledAnimationTriggerResult}(),ka=function(){function CompiledComponentAnimationResult(e,t){this.outputs=e,this.triggers=t}return CompiledComponentAnimationResult}(),Ra=function(){function AnimationCompiler(){}return AnimationCompiler.prototype.compileComponent=function(e,t){var r=[],n=[],i={},o=e.type.name;e.template.animations.forEach(function(e){var t=parseAnimationEntry(e),s=e.name;if(t.errors.length>0){var a='Unable to parse the animation sequence for "'+s+'" due to the following errors:';t.errors.forEach(function(e){a+="\n-- "+e.msg}),n.push(a)}if(i[s])n.push('The animation trigger "'+s+'" has already been registered on "'+o+'"');else{var u=o+"_"+e.name,l=new Za(s,u),c=l.build(t.ast);r.push(c),i[e.name]=c}});var s=_validateAnimationProperties(r,t);if(s.errors.forEach(function(e){n.push(e.msg)}),n.length>0){var a="Animation parsing for "+e.type.name+" has failed due to the following errors:";throw n.forEach(function(e){return a+="\n- "+e}),new Error(a)}return Va.set(e,r),new ka(s.outputs,r)},AnimationCompiler}(),La=variable("element"),Fa=variable("defaultStateStyles"),ja=variable("view"),Ba=ja.prop("renderer"),Wa=variable("currentState"),Ua=variable("nextState"),Ha=variable("player"),za=variable("totalTime"),Ga=variable("startStateStyles"),qa=variable("endStateStyles"),Ka=variable("collectedStyles"),Qa=literalMap([]),Za=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(Ga),t.isExpectingFirstStyleStep=!1),e.styles.forEach(function(e){r.push(literalMap(I.keys(e).map(function(t){return[t,literal(e[t])]})))}),importExpr(resolveIdentifier(Jo.AnimationStyles)).instantiate([importExpr(resolveIdentifier(Jo.collectAndResolveStyles)).callFn([Ka,literalArr(r)])])},_AnimationBuilder.prototype.visitAnimationKeyframe=function(e,t){return importExpr(resolveIdentifier(Jo.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(Jo.balanceAnimationKeyframes)).callFn([Ka,qa,literalArr(i)]);return this._callAnimateMethod(e,n,o,t)},_AnimationBuilder.prototype._callAnimateMethod=function(e,t,r,n){return n.totalTransitionTime+=e.duration+e.delay,Ba.callMethod("animate",[La,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(Jo.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(Jo.AnimationGroupPlayer)).instantiate([literalArr(n)])},_AnimationBuilder.prototype.visitAnimationStateDeclaration=function(e,t){var r={};_getStylesArray(e).forEach(function(e){I.forEach(e,function(e,t){r[t]=e})}),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(Wa,e.fromState).and(_compareToAnimationStateExpr(Ua,e.toState))),e.fromState!=Fo&&t.stateMap.registerState(e.fromState),e.toState!=Fo&&t.stateMap.registerState(e.toState)});var o=e.animation.visit(this,t),s=i.reduce(function(e,t){return e.or(t)}),a=Ha.equals(Me).and(s),u=Ha.set(o).toStmt(),l=za.set(literal(t.totalTransitionTime)).toStmt();return new We(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(jo,{});var n=[];n.push(ja.callMethod("cancelActiveAnimation",[La,literal(this.animationName),Ua.equals(literal(Bo))]).toStmt()),n.push(Ka.set(Qa).toDeclStmt()),n.push(Ha.set(Me).toDeclStmt()),n.push(za.set(literal(0)).toDeclStmt()),n.push(Fa.set(this._statesMapVar.key(literal(jo))).toDeclStmt()),n.push(Ga.set(this._statesMapVar.key(Wa)).toDeclStmt()),n.push(new We(Ga.equals(Me),[Ga.set(Fa).toStmt()])),n.push(qa.set(this._statesMapVar.key(Ua)).toDeclStmt()),n.push(new We(qa.equals(Me),[qa.set(Fa).toStmt()]));var i=importExpr(resolveIdentifier(Jo.renderStyles));return n.push(i.callFn([La,Ba,importExpr(resolveIdentifier(Jo.clearStyles)).callFn([Ga])]).toStmt()),e.stateTransitions.forEach(function(e){return n.push(e.visit(r,t))}),n.push(new We(Ha.equals(Me),[Ha.set(importExpr(resolveIdentifier(Jo.NoOpAnimationPlayer)).instantiate([])).toStmt()])),n.push(Ha.callMethod("onDone",[fn([],[i.callFn([La,Ba,importExpr(resolveIdentifier(Jo.prepareFinalAnimationStyles)).callFn([Ga,qa])]).toStmt()])]).toStmt()),n.push(ja.callMethod("queueAnimation",[La,literal(this.animationName),Ha,za,Wa,Ua]).toStmt()),fn([new be(ja.name,importType(resolveIdentifier(Jo.AppView),[Y])),new be(La.name,Y),new be(Wa.name,Y),new be(Ua.name,Y)],n)},_AnimationBuilder.prototype.build=function(e){var t=new Xa,r=e.visit(this,t).toDeclStmt(this._fnVarName),n=variable(this._fnVarName),i=[];I.forEach(t.stateMap.states,function(e,t){var r=Qa;if(isPresent(e)){var n=[];I.forEach(e,function(e,t){n.push([t,literal(e)])}),r=literalMap(n)}i.push([t,r])});var o=this._statesMapVar.set(literalMap(i)).toDeclStmt();return new Oa(this.animationName,o,this._statesMapVarName,r,n)},_AnimationBuilder}(),Xa=function(){function _AnimationBuilderContext(){this.stateMap=new $a,this.endStateAnimateStep=null,this.isExpectingFirstStyleStep=!1,this.totalTransitionTime=0}return _AnimationBuilderContext}(),$a=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];isBlank(r)&&(this._states[e]=t)},_AnimationBuilderStateMap}(),Ja=function(){function AnimationPropertyValidationOutput(e,t){this.outputs=e,this.errors=t}return AnimationPropertyValidationOutput}(),Ya=function(){function _AnimationTemplatePropertyVisitor(e){this.errors=[],this.outputs=[],this._animationRegistry=this._buildCompileAnimationLookup(e)}return _AnimationTemplatePropertyVisitor.prototype._buildCompileAnimationLookup=function(e){var t={};return e.forEach(function(e){t[e.name]=!0}),t},_AnimationTemplatePropertyVisitor.prototype._validateAnimationInputOutputPairs=function(e,r,n,i){var o=this,s={};e.forEach(function(e){if(e.type==t.PropertyBindingType.Animation){var r=e.name;isPresent(n[r])?s[r]=!0:o.errors.push(new Ia("Couldn't find an animation entry for "+r))}}),r.forEach(function(e){if("@"==e.name[0]){var t=parseAnimationOutputName(e.name.substr(1),o.errors),r=t.name,a=t.phase;n[r]?s[r]?o.outputs.push(t):o.errors.push(new Ia("Unable to listen on (@"+r+"."+a+") because the animation trigger [@"+r+"] isn't being used on the same element")):o.errors.push(new Ia("Couldn't find the corresponding "+(i?"host-level ":"")+"animation trigger definition for (@"+r+")"))}})},_AnimationTemplatePropertyVisitor.prototype.visitElement=function(e,t){this._validateAnimationInputOutputPairs(e.inputs,e.outputs,this._animationRegistry,!1);var r=e.directives.find(function(e){return e.directive.isComponent});if(r){var n=Va.get(r.directive);n&&this._validateAnimationInputOutputPairs(r.hostProperties,r.hostEvents,this._buildCompileAnimationLookup(n),!0)}templateVisitAll(this,e.children)},_AnimationTemplatePropertyVisitor.prototype.visitEmbeddedTemplate=function(e,t){templateVisitAll(this,e.children)},_AnimationTemplatePropertyVisitor.prototype.visitEvent=function(e,t){},_AnimationTemplatePropertyVisitor.prototype.visitBoundText=function(e,t){},_AnimationTemplatePropertyVisitor.prototype.visitText=function(e,t){},_AnimationTemplatePropertyVisitor.prototype.visitNgContent=function(e,t){},_AnimationTemplatePropertyVisitor.prototype.visitAttr=function(e,t){},_AnimationTemplatePropertyVisitor.prototype.visitDirective=function(e,t){},_AnimationTemplatePropertyVisitor.prototype.visitReference=function(e,t){},_AnimationTemplatePropertyVisitor.prototype.visitVariable=function(e,t){},_AnimationTemplatePropertyVisitor.prototype.visitDirectiveProperty=function(e,t){},_AnimationTemplatePropertyVisitor.prototype.visitElementProperty=function(e,t){},_AnimationTemplatePropertyVisitor}(),eu=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 I.forEach(e,function(e,t){n.push([t,visitValue(e,r,null)])}),literalMap(n,t)},_ValueOutputAstTransformer.prototype.visitPrimitive=function(e,t){return literal(e,t)},_ValueOutputAstTransformer.prototype.visitOther=function(e,t){if(e instanceof ht)return importExpr(e);if(e instanceof oe)return e;throw new Error("Illegal state: Don't now how to compile value "+e)},_ValueOutputAstTransformer}(),tu=function(){function _DebugState(e,t){this.nodeIndex=e,this.sourceAst=t}return _DebugState}(),ru=new tu(null,null),nu=function(){function CompileMethod(e){this._view=e,this._newState=ru,this._currState=ru,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 xe.callMethod("debug",[literal(e.nodeIndex),isPresent(t)?literal(t.line):Me,isPresent(t)?literal(t.col):Me])}return null},CompileMethod.prototype.resetDebugInfoExpr=function(e,t){var r=this._updateDebugContext(new tu(e,t));return isPresent(r)?r:Me},CompileMethod.prototype.resetDebugInfo=function(e,t){this._newState=new tu(e,t)},CompileMethod.prototype.addStmt=function(e){this._updateDebugContextIfNeeded(),this._bodyStatements.push(e)},CompileMethod.prototype.addStmts=function(e){this._updateDebugContextIfNeeded(),D.addAll(this._bodyStatements,e)},CompileMethod.prototype.finish=function(){return this._bodyStatements},CompileMethod.prototype.isEmpty=function(){return 0===this._bodyStatements.length},CompileMethod}(),iu=function(){function ViewQueryValues(e,t){this.view=e,this.values=t}return ViewQueryValues}(),ou=function(){function CompileQuery(e,t,r,n){this.meta=e,this.queryList=t,this.ownerDirectiveExpression=r,this.view=n,this._values=new iu(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 iu&&t.view===e.embeddedView)s=t;else{var r=new iu(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 iu})},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 We(this.queryList.prop("dirty"),n))},CompileQuery}(),su=function(){function ViewTypeEnum(){}return ViewTypeEnum.fromValue=function(e){var t=resolveIdentifier(Jo.ViewType);switch(e){case ro.HOST:return _enumExpression(t,"HOST");case ro.COMPONENT:return _enumExpression(t,"COMPONENT");case ro.EMBEDDED:return _enumExpression(t,"EMBEDDED");default:throw Error("Inavlid ViewType value: "+e)}},ViewTypeEnum}(),au=function(){function ViewEncapsulationEnum(){}return ViewEncapsulationEnum.fromValue=function(e){var t=resolveIdentifier(Jo.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}(),uu=function(){function ChangeDetectorStatusEnum(){}return ChangeDetectorStatusEnum.fromValue=function(e){var t=resolveIdentifier(Jo.ChangeDetectorStatus);switch(e){case qi.CheckOnce:return _enumExpression(t,"CheckOnce");case qi.Checked:return _enumExpression(t,"Checked");case qi.CheckAlways:return _enumExpression(t,"CheckAlways");case qi.Detached:return _enumExpression(t,"Detached");case qi.Errored:return _enumExpression(t,"Errored");case qi.Destroyed:return _enumExpression(t,"Destroyed");default:throw Error("Inavlid ChangeDetectorStatus value: "+e)}},ChangeDetectorStatusEnum}(),lu=function(){function ViewConstructorVars(){}return ViewConstructorVars.viewUtils=variable("viewUtils"),ViewConstructorVars.parentInjector=variable("parentInjector"),ViewConstructorVars.declarationEl=variable("declarationEl"),ViewConstructorVars}(),cu=function(){function ViewProperties(){}return ViewProperties.renderer=xe.prop("renderer"), ViewProperties.projectableNodes=xe.prop("projectableNodes"),ViewProperties.viewUtils=xe.prop("viewUtils"),ViewProperties}(),pu=function(){function EventHandlerVars(){}return EventHandlerVars.event=variable("$event"),EventHandlerVars}(),hu=function(){function InjectMethodVars(){}return InjectMethodVars.token=variable("token"),InjectMethodVars.requestNodeIndex=variable("requestNodeIndex"),InjectMethodVars.notFoundResult=variable("notFoundResult"),InjectMethodVars}(),fu=function(){function DetectChangesVars(){}return DetectChangesVars.throwOnChange=variable("throwOnChange"),DetectChangesVars.changes=variable("changes"),DetectChangesVars.changed=variable("changed"),DetectChangesVars.valUnwrapper=variable("valUnwrapper"),DetectChangesVars}(),du=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 __)},mu=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 isBlank(this.renderNode)},CompileNode.prototype.isRootElement=function(){return this.view!=this.parent.view},CompileNode}(),yu=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(Jo.ElementRef)).instantiate([this.renderNode]),this.instances.set(resolveIdentifierToken(Jo.ElementRef).reference,this.elementRef),this.injector=xe.callMethod("injector",[literal(this.nodeIndex)]),this.instances.set(resolveIdentifierToken(Jo.Injector).reference,this.injector),this.instances.set(resolveIdentifierToken(Jo.Renderer).reference,xe.prop("renderer")),(this.hasViewContainer||this.hasEmbeddedView||isPresent(this.component))&&this._createAppElement()}return du(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 Le(e,importType(resolveIdentifier(Jo.AppElement)),[pe.Private]));var r=xe.prop(e).set(importExpr(resolveIdentifier(Jo.AppElement)).instantiate([literal(this.nodeIndex),literal(t),xe,this.renderNode])).toStmt();this.view.createMethod.addStmt(r),this.appElement=xe.prop(e),this.instances.set(resolveIdentifierToken(Jo.AppElement).reference,this.appElement)},CompileElement.prototype.createComponentFactoryResolver=function(e){if(e&&0!==e.length){var r=importExpr(resolveIdentifier(Jo.CodegenComponentFactoryResolver)).instantiate([literalArr(e.map(function(e){return importExpr(e)})),injectFromViewParentInjector(resolveIdentifierToken(Jo.ComponentFactoryResolver),!1)]),n=new dt({token:resolveIdentifierToken(Jo.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=D.createFixedSize(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)&&D.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 ou(e,n,t,this.view);return addQueryToTokenMap(this._queries,i),i},CompileElement.prototype._getLocalDependency=function(e,r){var n=null;if(isBlank(n)&&isPresent(r.query)&&(n=this._addQuery(r.query,null).queryList),isBlank(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(isBlank(n)&&r.token.reference===resolveIdentifierToken(Jo.ChangeDetectorRef).reference)return e===t.ProviderAstType.Component?this._compViewExpr.prop("ref"):getPropertyInView(xe.prop("ref"),this.view,this.view.componentView);if(isBlank(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)),isBlank(i)&&!r.isSkipSelf&&(i=this._getLocalDependency(e,r));isBlank(i)&&!n.parent.isNull();)n=n.parent,i=n._getLocalDependency(t.ProviderAstType.PublicService,new ft({token:r.token}));return isBlank(i)&&(i=injectFromViewParentInjector(r.token,r.isOptional)),isBlank(i)&&(i=Me),getPropertyInView(i,this.view,n.view)},CompileElement}(mu),vu=function(){function _QueryWithRead(e,t){this.query=e,this.read=isPresent(e.meta.read)?e.meta.read:t}return _QueryWithRead}(),gu=function(){function CompilePipe(e,t){var r=this;this.view=e,this.meta=t,this._purePipeProxyCount=0,this.instance=xe.prop("_pipe_"+t.name+"_"+e.pipeCount++);var n=this.meta.type.diDeps.map(function(e){return e.token.reference===resolveIdentifierToken(Jo.ChangeDetectorRef).reference?getPropertyInView(xe.prop("ref"),r.view,r.view.componentView):injectFromViewParentInjector(e.token,!1)});this.view.fields.push(new Le(this.instance.name,importType(this.meta.type))),this.view.createMethod.resetDebugInfo(null,null),this.view.createMethod.addStmt(xe.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),isBlank(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=xe.prop(this.instance.name+"_"+this._purePipeProxyCount++),n=getPropertyInView(this.instance,e,this.view);return createPureProxy(n.prop("transform").callMethod(se.Bind,[n]),t.length,r,e),importExpr(resolveIdentifier(Jo.castByValue)).callFn([r,n.prop("transform")]).callFn(t)}return getPropertyInView(this.instance,e,this.view).callMethod("transform",t)},CompilePipe}(),_u=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 nu(this),this.animationBindingsMethod=new nu(this),this.injectorGetMethod=new nu(this),this.updateContentQueriesMethod=new nu(this),this.dirtyParentQueriesMethod=new nu(this),this.updateViewQueriesMethod=new nu(this),this.detectChangesInInputsMethod=new nu(this),this.detectChangesRenderPropertiesMethod=new nu(this),this.afterContentLifecycleCallbacksMethod=new nu(this),this.afterViewLifecycleCallbacksMethod=new nu(this),this.destroyMethod=new nu(this),this.detachMethod=new nu(this),this.viewType=getViewType(e,o),this.className="_View_"+e.type.name+o,this.classType=importType(new ht({name:this.className})),this.viewFactory=variable(getViewFactoryName(e,o)),this.viewType===ro.COMPONENT||this.viewType===ro.HOST?this.componentView=this:this.componentView=this.declarationElement.view.componentView,this.componentContext=getPropertyInView(xe.prop("context"),this,this.componentView);var l=new Map;if(this.viewType===ro.COMPONENT){var c=xe.prop("context");D.forEachWithIndex(this.component.viewQueries,function(e,t){var r="_viewQuery_"+e.selectors[0].name+"_"+t,n=createQueryList(e,c,r,u),i=new ou(e,n,c,u);addQueryToTokenMap(l,i)});var p=0;this.component.type.diDeps.forEach(function(e){if(isPresent(e.viewQuery)){var t=xe.prop("declarationAppElement").prop("componentConstructorViewQueries").key(literal(p++)),r=new ou(e.viewQuery,t,null,u);addQueryToTokenMap(l,r)}})}this.viewQueries=l,a.forEach(function(e){u.locals.set(e[1],xe.prop("context").prop(e[0]))}),this.declarationElement.isNull()||this.declarationElement.setEmbeddedView(this)}return CompileView.prototype.callPipe=function(e,t,r){return gu.call(this,e,[t].concat(r))},CompileView.prototype.getLocal=function(e){if(e==pu.event.name)return pu.event;for(var t=this,r=t.locals.get(e);isBlank(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(Jo.EMPTY_ARRAY));for(var t=xe.prop("_arr_"+this.literalArrayCount++),r=[],n=[],i=0;i":r=Q.Bigger;break;case"<=":r=Q.LowerEquals;break;case">=":r=Q.BiggerEquals;break;default:throw new Error("Unsupported operation "+e.operation)}return convertToStatementIfNeeded(t,new Ce(r,this.visit(e.left,Ps.Expression),this.visit(e.right,Ps.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,Ps.Expression);return convertToStatementIfNeeded(t,r.conditional(this.visit(e.trueExp,Ps.Expression),this.visit(e.falseExp,Ps.Expression)))},_AstToIrVisitor.prototype.visitPipe=function(e,t){var r=this.visit(e.exp,Ps.Expression),n=this.visitAll(e.args,Ps.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,Ps.Expression).callFn(this.visitAll(e.args,Ps.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(Y).notIdentical(literal(!1))).toDeclStmt(null,[pe.Final]))}this._method.addStmts(i)},CompileEventListener.prototype.finishMethod=function(){var e=this._hasComponentHostListener?this.compileElement.appElement.prop("componentView"):xe,t=literal(!0);this._actionResultExprs.forEach(function(e){t=t.and(e)});var r=[e.callMethod("markPathToRootAsCheckOnce",[]).toStmt()].concat(this._method.finish()).concat([new ke(t)]);this.compileElement.view.eventHandlerMethods.push(new Fe(this._methodName,[this._eventParam],r,ee,[pe.Private]))},CompileEventListener.prototype.listenToRenderer=function(){var e,t=xe.callMethod("eventHandler",[xe.prop(this._methodName).callMethod(se.Bind,[xe])]);e=isPresent(this.eventTarget)?cu.renderer.callMethod("listenGlobal",[literal(this.eventTarget),literal(this.eventName),t]):cu.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(ne,[pe.Private]))},CompileEventListener.prototype.listenToAnimation=function(e){var t=xe.callMethod("eventHandler",[xe.prop(this._methodName).callMethod(se.Bind,[xe])]),r=xe.callMethod("registerAnimationOutput",[this.compileElement.renderNode,importExpr(resolveIdentifier(Jo.AnimationOutput)).instantiate([literal(e.name),literal(e.phase)]),t]).toStmt();this.compileElement.view.createMethod.addStmt(r)},CompileEventListener.prototype.listenToDirective=function(e,t){var r=variable("subscription_"+this.compileElement.view.subscriptions.length);this.compileElement.view.subscriptions.push(r);var n=xe.callMethod("eventHandler",[xe.prop(this._methodName).callMethod(se.Bind,[xe])]);this.compileElement.view.createMethod.addStmt(r.set(e.prop(t).callMethod(se.SubscribeObservable,[n])).toDeclStmt(null,[pe.Final]))},CompileEventListener}(),Au=xe.prop("numberOfChecks").identical(new me(0)),xu=not(fu.throwOnChange),Tu=function(){function ViewBinderVisitor(e,t){var r=this;this.view=e,this.animationOutputs=t,this._nodeIndex=0,this._animationOutputsMap={},t.forEach(function(e){r._animationOutputsMap[e.fullPropertyName]=e})}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,n=this.view.nodes[this._nodeIndex++],i=[],o=[];return collectEventListeners(e.outputs,e.directives,n).forEach(function(e){if("@"==e.eventName[0]){var t=e.eventName.substr(1),n=r._animationOutputsMap[t];n&&o.push(new Su(e,n))}else i.push(e)}),bindAnimationOutputs(o),bindRenderInputs(e.inputs,n),bindRenderOutputs(i),e.directives.forEach(function(e){var t=n.instances.get(e.directive.type.reference);bindDirectiveInputs(e,t,n),bindDirectiveDetectChangesLifecycleCallbacks(e,t,n),bindDirectiveHostProps(e,t,n),bindDirectiveOutputs(e,t,i)}),templateVisitAll(this,e.children,n),e.directives.forEach(function(e){var t=n.instances.get(e.directive.type.reference);bindDirectiveAfterContentLifecycleCallbacks(e.directive,t,n),bindDirectiveAfterViewLifecycleCallbacks(e.directive,t,n)}),e.providers.forEach(function(e){var t=n.instances.get(e.token.reference);bindInjectableDestroyLifecycleCallbacks(e,t,n)}),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,this.animationOutputs),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}(),Mu="$implicit",Iu="class",Du="style",Nu="ng-container",Vu=variable("parentRenderNode"),Ou=variable("rootSelector"),ku=function(){function ViewFactoryDependency(e,t){this.comp=e,this.placeholder=t}return ViewFactoryDependency}(),Ru=function(){function ComponentFactoryDependency(e,t){this.comp=e,this.placeholder=t}return ComponentFactoryDependency}(),Lu=function(){function ViewBuilderVisitor(e,t){this.view=e,this.targetDependencies=t,this.nestedViewCount=0,this._animationCompiler=new Ra}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 yu&&e.hasViewContainer?e.appElement:null;this._isRootNode(r)?this.view.viewType!==ro.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===ro.COMPONENT?Vu:Me:isPresent(e.component)&&e.component.template.encapsulation!==r.ViewEncapsulation.Native?Me: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 Le(n,importType(this.view.genConfig.renderTypes.renderText)));var i=xe.prop(n),o=new mu(r,this.view,this.view.nodes.length,i,e),s=xe.prop(n).set(cu.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=cu.projectableNodes.key(literal(e.index),new $(importType(this.view.genConfig.renderTypes.renderNode)));return r!==Me?this.view.createMethod.addStmt(cu.renderer.callMethod("projectNodes",[r,importExpr(resolveIdentifier(Jo.flattenNestedViewRenderNodes)).callFn([n])]).toStmt()):this._isRootNode(t)?this.view.viewType!==ro.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===ro.HOST?xe.callMethod("selectOrCreateHostElement",[literal(e.name),Ou,o]):e.name===Nu?cu.renderer.callMethod("createTemplateAnchor",[this._getParentRenderNode(t),o]):cu.renderer.callMethod("createElement",[this._getParentRenderNode(t),literal(e.name),o]);var s="_el_"+i;this.view.fields.push(new Le(s,importType(this.view.genConfig.renderTypes.renderElement))),this.view.createMethod.addStmt(xe.prop(s).set(r).toStmt());for(var a=xe.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:Mu,e.name]}),s=e.directives.map(function(e){return e.directive}),a=new yu(t,this.view,r,i,e,null,s,e.providers,e.hasViewContainer,(!0),e.references);this.view.nodes.push(a);var u=this._animationCompiler.compileComponent(this.view.component,[e]);this.nestedViewCount++;var l=new _u(this.view.component,this.view.genConfig,this.view.pipeMetas,Me,u.triggers,this.view.viewIndex+this.nestedViewCount,a,o);return this.nestedViewCount+=buildView(l,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}(),Fu=function(){function ViewCompileResult(e,t,r){this.statements=e,this.viewFactoryVar=t,this.dependencies=r}return ViewCompileResult}(),ju=function(){function ViewCompiler(e){this._genConfig=e,this._animationCompiler=new Ra}return ViewCompiler.prototype.compileComponent=function(e,t,r,n){var i=[],o=this._animationCompiler.compileComponent(e,t),s=[],a=o.triggers;a.forEach(function(e){s.push(e.statesMapStatement),s.push(e.fnStatement)});var u=new _u(e,this._genConfig,n,r,a,0,yu.createNull(),[]);return buildView(u,t,i),bindView(u,t,o.outputs),finishView(u,s),new Fu(s,u.viewFactory.name,i)},ViewCompiler.decorators=[{type:r.Injectable}],ViewCompiler.ctorParameters=[{type:aa}],ViewCompiler}(),Bu=function(){function SourceModule(e,t){this.moduleUrl=e,this.source=t}return SourceModule}(),Wu=function(){function NgModulesSummary(e){this.ngModuleByComponent=e}return NgModulesSummary}(),Uu=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}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 Wu(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)),a.push(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._ngModuleCompiler.compile(r,[new dt({token:resolveIdentifierToken(Jo.LOCALE_ID),useValue:this._localeId}),new dt({token:resolveIdentifierToken(Jo.TRANSLATIONS_FORMAT),useValue:this._translationFormat})]);return n.dependencies.forEach(function(e){e.placeholder.name=_componentFactoryName(e.comp),e.placeholder.moduleUrl=_ngfactoryModuleUrl(e.comp.moduleUrl)}),t.push.apply(t,n.statements),n.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(Jo.ComponentFactory),[importType(e.type)]).instantiate([literal(e.selector),variable(i),importExpr(e.type)],importType(resolveIdentifier(Jo.ComponentFactory),[importType(e.type)],[O.Const]))).toDeclStmt(null,[pe.Final])),o},OfflineCompiler.prototype._compileComponent=function(e,t,r,n,i,o,s){var a=this._templateParser.parse(e,e.template.template,t,r,n,e.type.name),u=i?variable(i.stylesVar):literalArr([]),l=this._viewCompiler.compileComponent(e,a,u,r);return i&&D.addAll(s,_resolveStyleStatements(i,o)),D.addAll(s,_resolveViewStatements(l)),l.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 Bu(e,this._outputEmitter.emitStatements(e,t,r))},OfflineCompiler}(),Hu=function(){function ResourceLoader(){}return ResourceLoader.prototype.get=function(e){return null},ResourceLoader}(),zu="asset:",Gu={provide:r.PACKAGE_ROOT_URL,useValue:"/"},qu=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[Cu.Scheme]){var o=n[Cu.Path];if(this._packagePrefix!==zu)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"}(Cu||(Cu={}));var Qu=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 $e(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 $e(i,Promise.resolve(i))}return new $e(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=tn.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 _t({styles:t.styles,styleUrls:t.styleUrls,moduleUrl:e.moduleUrl})),l=new Zu;visitAll(l,s.rootNodes);var c=this.normalizeStylesheet(new _t({styles:l.styles,styleUrls:l.styleUrls,moduleUrl:i})),p=u.styles.concat(c.styles),h=u.styleUrls.concat(c.styleUrls),f=t.encapsulation;return isBlank(f)&&(f=this._config.defaultEncapsulation),f===r.ViewEncapsulation.Emulated&&0===p.length&&0===h.length&&(f=r.ViewEncapsulation.None),new bt({encapsulation:f,template:n,templateUrl:i,styles:p,styleUrls:h,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 bt({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 _t({styles:[n],moduleUrl:e}));return t.set(e,i),r._loadMissingExternalStylesheets(i.styleUrls,t)})})).then(function(e){return M.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 _t({styles:n,styleUrls:r,moduleUrl:e.moduleUrl})},DirectiveNormalizer.decorators=[{type:r.Injectable}],DirectiveNormalizer.ctorParameters=[{type:Hu},{type:qu},{type:es},{type:aa}],DirectiveNormalizer}(),Zu=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 si.NG_CONTENT:0===this.ngNonBindableStackCount&&this.ngContentSelectors.push(r.selectAttr);break;case si.STYLE:var n="";e.children.forEach(function(e){e instanceof wn&&(n+=e.value)}),this.styles.push(n);break;case si.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}(),Xu=function(){function DirectiveResolver(e){void 0===e&&(e=Mo),this._reflector=e}return DirectiveResolver.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(_isDirectiveMetadata);if(isPresent(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 I.forEach(t,function(e,t){e.forEach(function(e){if(e instanceof r.Input)isPresent(e.bindingPropertyName)?i.push(t+": "+e.bindingPropertyName):i.push(t);else if(e instanceof r.Output){var n=e;isPresent(n.bindingPropertyName)?o.push(t+": "+n.bindingPropertyName):o.push(t)}else if(e instanceof r.HostBinding){var u=e;isPresent(u.hostPropertyName)?s["["+u.hostPropertyName+"]"]=t:s["["+t+"]"]=t}else if(e instanceof r.HostListener){var l=e,c=isPresent(l.args)?l.args.join(", "):"";s["("+l.eventName+")"]=t+"("+c+")"}else e instanceof r.Query&&(a[t]=e)})}),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,u=this;if(isPresent(e.inputs)){var l=e.inputs.map(function(e){return u._extractPublicName(e)});t.forEach(function(e){var t=u._extractPublicName(e);if(l.indexOf(t)>-1)throw new Error("Input '"+t+"' defined multiple times in '"+stringify(s)+"'")}),a=e.inputs.concat(t)}else a=t;var c;if(isPresent(e.outputs)){var p=e.outputs.map(function(e){return u._extractPublicName(e)});n.forEach(function(e){var t=u._extractPublicName(e);if(p.indexOf(t)>-1)throw new Error("Output event '"+t+"' defined multiple times in '"+stringify(s)+"'")}),c=e.outputs.concat(n)}else c=n;var h=isPresent(e.host)?I.merge(e.host,i):i,f=isPresent(e.queries)?I.merge(e.queries,o):o;return e instanceof r.Component?new r.Component({selector:e.selector,inputs:a,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:a,outputs:c,host:h,exportAs:e.exportAs,queries:f,providers:e.providers})},DirectiveResolver.decorators=[{type:r.Injectable}],DirectiveResolver.ctorParameters=[{type:Zi}],DirectiveResolver}(),$u=M.createFromPairs([[Ki.OnInit,r.OnInit],[Ki.OnDestroy,r.OnDestroy],[Ki.DoCheck,r.DoCheck],[Ki.OnChanges,r.OnChanges],[Ki.AfterContentInit,r.AfterContentInit],[Ki.AfterContentChecked,r.AfterContentChecked],[Ki.AfterViewInit,r.AfterViewInit],[Ki.AfterViewChecked,r.AfterViewChecked]]),Ju=M.createFromPairs([[Ki.OnInit,"ngOnInit"],[Ki.OnDestroy,"ngOnDestroy"],[Ki.DoCheck,"ngDoCheck"],[Ki.OnChanges,"ngOnChanges"],[Ki.AfterContentInit,"ngAfterContentInit"],[Ki.AfterContentChecked,"ngAfterContentChecked"],[Ki.AfterViewInit,"ngAfterViewInit"],[Ki.AfterViewChecked,"ngAfterViewChecked"]]),Yu=function(){function NgModuleResolver(e){void 0===e&&(e=Mo),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:Zi}],NgModuleResolver}(),el=function(){function PipeResolver(e){void 0===e&&(e=Mo),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:Zi}],PipeResolver}(),tl=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 __)},rl=function(){function CompileMetadataResolver(e,t,r,n,i){void 0===i&&(i=Mo),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);isBlank(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 tt(e.name,r)},CompileMetadataResolver.prototype.getAnimationStateMetadata=function(e){if(e instanceof r.AnimationStateDeclarationMetadata){var t=this.getAnimationStyleMetadata(e.styles);return new nt(e.stateNameExpr,t)}return e instanceof r.AnimationStateTransitionMetadata?new it(e.stateChangeExpr,this.getAnimationMetadata(e.steps)):null},CompileMetadataResolver.prototype.getAnimationStyleMetadata=function(e){return new at(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 st(e.steps.map(function(e){return t.getAnimationStyleMetadata(e)}));if(e instanceof r.AnimationAnimateMetadata){var n=this.getAnimationMetadata(e.styles);return new ut(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 pt(i):new ct(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(isBlank(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){var h=o;assertArrayOfStrings("styles",h.styles),assertInterpolationSymbols("interpolation",h.interpolation);var f=isPresent(h.animations)?h.animations.map(function(e){return n.getAnimationEntryMetadata(e)}):null;assertArrayOfStrings("styles",h.styles),assertArrayOfStrings("styleUrls",h.styleUrls),s=new bt({encapsulation:h.encapsulation,template:h.template,templateUrl:h.templateUrl,styles:h.styles,styleUrls:h.styleUrls,animations:f,interpolation:h.interpolation}),a=h.changeDetection,isPresent(o.viewProviders)&&(u=this.getProvidersMetadata(o.viewProviders,c,'viewProviders for "'+stringify(e)+'"')),l=componentModuleUrl(this._reflector,e,h),h.entryComponents&&(c=flattenArray(h.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 d=[];isPresent(o.providers)&&(d=this.getProvidersMetadata(o.providers,c,'providers for "'+stringify(e)+'"'));var m=[],y=[];isPresent(o.queries)&&(m=this.getQueriesMetadata(o.queries,!1,e),y=this.getQueriesMetadata(o.queries,!0,e)),i=wt.create({selector:p,exportAs:o.exportAs,isComponent:isPresent(s),type:this.getTypeMetadata(e,l),template:s,changeDetection:a,inputs:o.inputs,outputs:o.outputs,host:o.host,providers:d,viewProviders:u,queries:m,viewQueries:y,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 Et({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 St(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 vt({name:this.sanitizeTokenName(e),moduleUrl:t,reference:e,diDeps:this.getDependenciesMetadata(e,n),lifecycleHooks:Qi.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 mt({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(isBlank(n)){var i=this._pipeResolver.resolve(e,t);if(!i)return null;n=new Ct({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=isPresent(t)?t:this._reflector.parameters(e);isBlank(o)&&(o=[]);var s=o.map(function(t){var o=!1,s=!1,a=!1,u=!1,l=!1,c=null,p=null,h=null;return 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 ft({isAttribute:o,isHost:s,isSelf:a,isSkipSelf:u,isOptional:l,query:isPresent(c)?n.getQueryMetadata(c,null,e):null,viewQuery:isPresent(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 yt(isString(e)?{value:e}:{identifier:new ht({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 Pt(s.provide,s));var u;if(isArray(s))u=i.getProvidersMetadata(s,t,n);else if(s instanceof Pt){var l=i.getTokenMetadata(s.token);l.reference===resolveIdentifierToken(Jo.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 il(t,r)),r}),u=new al(e,a,s,i),l=new cs(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(Jo.NgModuleFactory)).instantiate([variable(c.name),importExpr(e.type)],importType(resolveIdentifier(Jo.NgModuleFactory),[importType(e.type)],[O.Const]))).toDeclStmt(null,[pe.Final]),f=[c,h];if(e.id){var d=importExpr(resolveIdentifier(Jo.RegisterModuleFactoryFn)).callFn([literal(e.id),variable(p)]).toStmt(); f.push(d)}return new ol(f,p,o)},NgModuleCompiler.decorators=[{type:r.Injectable}],NgModuleCompiler.ctorParameters=[],NgModuleCompiler}(),al=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(Ki.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 We(ll.token.identical(createDiTokenExpression(t)),[new ke(r)])}),r=[new Fe("createInternal",[],this._createStmts.concat(new ke(this._instances.get(this._ngModuleMeta.type.reference))),importType(this._ngModuleMeta.type)),new Fe("getInternal",[new be(ll.token.name,Y),new be(ll.notFoundResult.name,Y)],t.concat([new ke(ll.notFoundResult)]),Y),new Fe("destroyInternal",[],this._destroyStmts)],n=new Fe(null,[new be(ul.parent.name,importType(resolveIdentifier(Jo.Injector)))],[Te.callFn([variable(ul.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 Be(i,importExpr(resolveIdentifier(Jo.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 ft({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 $(Y)):(o=r[0],s=r[0].type),isBlank(s)&&(s=Y),i)this._fields.push(new Le(e,s)),this._createStmts.push(xe.prop(e).set(o).toStmt());else{var a="_"+e;this._fields.push(new Le(a,s));var u=[new We(xe.prop(a).isBlank(),[xe.prop(a).set(o).toStmt()]),new ke(xe.prop(a))];this._getters.push(new je(e,u,s))}return xe.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(Jo.Injector).reference&&e.token.reference!==resolveIdentifierToken(Jo.ComponentFactoryResolver).reference||(t=xe),isBlank(t)&&(t=this._instances.get(e.token.reference))),isBlank(t)){var r=[createDiTokenExpression(e.token)];e.isOptional&&r.push(Me),t=ul.parent.callMethod("get",r)}return t},_InjectorBuilder}(),ul=function(){function InjectorProps(){}return InjectorProps.parent=xe.prop("parent"),InjectorProps}(),ll=function(){function InjectMethodVars(){}return InjectMethodVars.token=variable("token"),InjectMethodVars.notFoundResult=variable("notFoundResult"),InjectMethodVars}(),cl=/'|\\|\n|\r|\$/g,pl=/^[$A-Z_][0-9A-Z_$]*$/i,hl=variable("error"),fl=variable("stack"),dl=function(){function _EmittedLine(e){this.indent=e,this.parts=[]}return _EmittedLine}(),ml=function(){function EmitterVisitorContext(e,t){this._exportedVars=e,this._indent=t,this._classes=[],this._lines=[new dl(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 dl(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}(),yl=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 ie.Super:r="super";break;case ie.This:r="this";break;case ie.CatchError:r=hl.name;break;case ie.CatchStack:r=fl.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 Q.Equals:r="==";break;case Q.Identical:r="===";break;case Q.NotEquals:r="!=";break;case Q.NotIdentical:r="!==";break;case Q.And:r="&&";break;case Q.Or:r="||";break;case Q.Plus:r="+";break;case Q.Minus:r="-";break;case Q.Divide:r="/";break;case Q.Multiply:r="*";break;case Q.Modulo:r="%";break;case Q.Lower:r="<";break;case Q.LowerEquals:r="<=";break;case Q.Bigger:r=">";break;case Q.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}(),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="asset://debug/lib",_l=function(){function TypeScriptEmitter(e){this._importGenerator=e}return TypeScriptEmitter.prototype.emitStatements=function(e,t,r){var n=this,i=new bl(e),o=ml.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}(),bl=function(e){function _TsEmitterVisitor(t){e.call(this,!1),this._moduleUrl=t,this.importsWithPrefixes=new Map}return vl(_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(pe.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(pe.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(pe.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(pe.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 ("+hl.name+") {"),t.incIndent();var r=[fl.set(hl.prop("stack")).toDeclStmt(null,[pe.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 q.Bool:r="boolean";break;case q.Dynamic:r="any";break;case q.Function:r="Function";break;case q.Number:r="number";break;case q.Int:r="number";break;case q.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 se.ConcatArray:t="concat";break;case se.SubscribeObservable:t="subscribe";break;case se.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}(yl),wl=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}(),Cl=function(){function ReturnValue(e){this.value=e}return ReturnValue}(),El=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 ie.Super:return t.instance.__proto__;case ie.This:return t.instance;case ie.CatchError:r=Sl;break;case ie.CatchStack:r=Pl;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 se.ConcatArray:r=D.concat(n,i[0]);break;case se.SubscribeObservable:r=n.subscribe({next:i[0]});break;case se.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 ae&&n.builtin===ie.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 Cl(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(Sl,r),n.vars.set(Pl,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 Q.Equals:return n()==i();case Q.Identical:return n()===i();case Q.NotEquals:return n()!=i();case Q.NotIdentical:return n()!==i();case Q.And:return n()&&i();case Q.Or:return n()||i();case Q.Plus:return n()+i();case Q.Minus:return n()-i();case Q.Divide:return n()/i();case Q.Multiply:return n()*i();case Q.Modulo:return n()%i();case Q.Lower:return n()i();case Q.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===ie.This)r.print("self");else{if(t.builtin===ie.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 ae&&n.builtin===ie.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 ("+hl.name+") {"),t.incIndent();var r=[fl.set(hl.prop("stack")).toDeclStmt(null,[pe.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 se.ConcatArray:t="concat";break;case se.SubscribeObservable:t="subscribe";break;case se.Bind:t="bind";break;default:throw new Error("Unknown builtin method: "+e)}return t},AbstractJsEmitterVisitor}(yl),Tl=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 __)},Ml=function(e){function JitEmitterVisitor(){e.apply(this,arguments),this._evalArgNames=[],this._evalArgValues=[]}return Tl(JitEmitterVisitor,e),JitEmitterVisitor.prototype.getArgs=function(){for(var e={},t=0;t-1)i=n._applySimpleSelectorScope(e,t,r);else{var o=e.replace(Hl,"");if(o.length>0){var a=o.match(/([^:]*)(:*)(.*)/);null!==a&&(i=a[1]+s+a[2]+a[3])}}return i},u=/( |>|\+|~)\s*/g,l=e.indexOf(jl),c="",p=0;null!==(o=u.exec(e));){var h=o[1],f=e.slice(p,o.index).trim(),d=p>=l?a(f):f;c+=d+" "+h+" ",p=u.lastIndex}return c+a(e.substring(p))},ShadowCss.prototype._insertPolyfillHostInCssText=function(e){return e.replace(Gl,kl).replace(zl,Ol)},ShadowCss}(),Dl=/polyfill-next-selector[^}]*content:[\s]*?['"](.*?)['"][;\s]*}([^{]*?){/gim,Nl=/(polyfill-rule)[^}]*(content:[\s]*['"](.*?)['"])[;\s]*[^}]*}/gim,Vl=/(polyfill-unscoped-rule)[^}]*(content:[\s]*['"](.*?)['"])[;\s]*[^}]*}/gim,Ol="-shadowcsshost",kl="-shadowcsscontext",Rl=")(?:\\(((?:\\([^)(]*\\)|[^)(]*)+?)\\))?([^,{]*)",Ll=new RegExp("("+Ol+Rl,"gim"),Fl=new RegExp("("+kl+Rl,"gim"),jl=Ol+"-no-combinator",Bl=[/::shadow/g,/::content/g,/\/shadow-deep\//g,/\/shadow\//g],Wl=/(?:>>>)|(?:\/deep\/)/g,Ul="([>\\s~+[.,{:][\\s\\S]*)?$",Hl=/-shadowcsshost/gim,zl=/:host/gim,Gl=/:host-context/gim,ql=/\/\*\s*[\s\S]*?\*\//g,Kl=/\/\*\s*#\s*sourceMappingURL=[\s\S]+?\*\//,Ql=/(\s*)([^;\{\}]+?)(\s*)((?:{%BLOCK%}?\s*;?)|(?:\s*;))/g,Zl=/([{}])/g,Xl="{",$l="}",Jl="%BLOCK%",Yl=function(){ function CssRule(e,t){this.selector=e,this.content=t}return CssRule}(),ec=function(){function StringWithEscapedBlocks(e,t){this.escapedString=e,this.blocks=t}return StringWithEscapedBlocks}(),tc="%COMP%",rc="_nghost-"+tc,nc="_ngcontent-"+tc,ic=function(){function StylesCompileDependency(e,t,r){this.moduleUrl=e,this.isShimmed=t,this.valuePlaceholder=r}return StylesCompileDependency}(),oc=function(){function StylesCompileResult(e,t){this.componentStylesheet=e,this.externalStylesheets=t}return StylesCompileResult}(),sc=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}(),ac=function(){function StyleCompiler(e){this._urlResolver=e,this._shadowCss=new Il}return StyleCompiler.prototype.compileComponent=function(e){var t=this,r=[],n=this._compileStyles(e,new _t({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 oc(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)]=fc;break;case"#":r[e.substring(1)]=dc;break;case"%":r[e.substring(1)]=yc;break;default:r[e]=mc}})})}return hc(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=pc[e+"|"+t];return n?n:(n=pc["*|"+t],n?n:r.SecurityContext.NONE)},DomElementSchemaRegistry.prototype.getMappedPropName=function(e){return gc[e]||e},DomElementSchemaRegistry.prototype.getDefaultComponentElementName=function(){return"ng-component"},DomElementSchemaRegistry.decorators=[{type:r.Injectable}],DomElementSchemaRegistry.ctorParameters=[],DomElementSchemaRegistry}(ps),bc={get:function(e){throw new Error("No ResourceLoader implementation has been provided. Can't read the url \""+e+'"')}},wc=[{provide:Io,useValue:Mo},{provide:Zi,useExisting:Io},{provide:Hu,useValue:bc},To,sn,hn,es,{provide:zi,useFactory:function(e,t,r){return new zi(e,t,r)},deps:[es,[new r.Optional,new r.Inject(r.TRANSLATIONS)],[new r.Optional,new r.Inject(r.TRANSLATIONS_FORMAT)]]},Js,Qu,rl,Gu,ac,ju,sl,{provide:aa,useValue:new aa},uc,{provide:r.Compiler,useExisting:uc},_c,{provide:ps,useExisting:_c},qu,Xu,el,Yu],Cc=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([wc,{provide:aa,useFactory:function(){return new aa({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}(),Ec=r.createPlatformFactory(r.platformCore,"coreDynamic",[{provide:r.COMPILER_OPTIONS,useValue:{},multi:!0},{provide:r.CompilerFactory,useClass:Cc},{provide:r.PLATFORM_INITIALIZER,useValue:_initReflector,multi:!0}]),Sc=/asset:([^\/]+)\/([^\/]+)\/(.+)/,Pc=function(){function ImportGenerator(){}return ImportGenerator.parseAssetUrl=function(e){return Ac.parse(e)},ImportGenerator}(),Ac=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(Sc);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}(),xc={SelectorMatcher:U,CssSelector:W,AssetUrl:Ac,ImportGenerator:Pc,CompileMetadataResolver:rl,HtmlParser:es,InterpolationConfig:tn,DirectiveNormalizer:Qu,Lexer:sn,Parser:hn,ParseLocation:yn,ParseError:bn,ParseErrorLevel:nn,ParseSourceFile:vn,ParseSourceSpan:gn,TemplateParser:Js,DomElementSchemaRegistry:_c,StyleCompiler:ac,ViewCompiler:ju,NgModuleCompiler:sl,TypeScriptEmitter:_l};t.COMPILER_PROVIDERS=wc,t.CompileDiDependencyMetadata=ft,t.CompileDirectiveMetadata=wt,t.CompileFactoryMetadata=mt,t.CompileIdentifierMetadata=ht,t.CompileMetadataWithIdentifier=et,t.CompilePipeMetadata=Ct,t.CompileProviderMetadata=dt,t.CompileQueryMetadata=gt,t.CompileTemplateMetadata=bt,t.CompileTokenMetadata=yt,t.CompileTypeMetadata=vt,t.CompilerConfig=aa,t.DEFAULT_PACKAGE_URL_PROVIDER=Gu,t.DirectiveResolver=Xu,t.NgModuleResolver=Yu,t.OfflineCompiler=Uu,t.PipeResolver=el,t.RenderTypes=ua,t.ResourceLoader=Hu,t.RuntimeCompiler=uc,t.SourceModule=Bu,t.TEMPLATE_TRANSFORMS=Zs,t.UrlResolver=qu,t.createOfflineCompileUrlResolver=createOfflineCompileUrlResolver,t.platformCoreDynamic=Ec,t.DEFAULT_INTERPOLATION_CONFIG=rn,t.InterpolationConfig=tn,t.ElementSchemaRegistry=ps,t.I18NHtmlParser=zi,t.MessageBundle=ui,t.Xliff=Ti,t.Xmb=Ri,t.Xtb=Wi,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__=xc})}).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?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 isPromise(e){return isPresent(e)&&isFunction(e.then)}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(u))if(isPresent(i.Symbol)&&isPresent(Symbol.iterator))u=Symbol.iterator;else for(var e=Object.getOwnPropertyNames(Map.prototype),t=0;t1){var t=findFirstClosedCycle(ce.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){le.forEach(t,function(t,r){return e.set(r,t)})}function resolveReflectiveFactory(e){var t,r;if(isPresent(e.useClass)){var n=resolveForwardRef(e.useClass);t=Ie.factory(n),r=_dependenciesFor(n)}else isPresent(e.useExisting)?(t=function(e){return e},r=[De.fromKey(Ce.get(e.useExisting))]):isPresent(e.useFactory)?(t=e.useFactory,r=constructDependencies(e.useFactory,e.deps)):(t=function(){return e.useValue},r=Ne);return new Oe(t,r)}function resolveReflectiveProvider(e){return new Ve(Ce.get(e.provide),[resolveReflectiveFactory(e)],e.multi)}function resolveReflectiveProviders(e){var t=_normalizeProviders(e,[]),r=t.map(resolveReflectiveProvider);return ue.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,s=o.Math;o.assert=function(e){};var a=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}(),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}(),null),l=0,c=o.Reflect,p=makeParamDecorator("Inject",[["token",void 0]]),h=makeParamDecorator("Optional",[]),f=makeParamDecorator("Injectable",[]),d=makeParamDecorator("Self",[]),m=makeParamDecorator("SkipSelf",[]),y=makeParamDecorator("Host",[]),v=function(){function OpaqueToken(e){this._desc=e}return OpaqueToken.prototype.toString=function(){return"Token "+this._desc},OpaqueToken.decorators=[{type:f}],OpaqueToken.ctorParameters=[null],OpaqueToken}(),g=new v("AnalyzeForEntryComponents"),_=makeParamDecorator("Attribute",[["attributeName",void 0]]),b=function(){function Query(){}return Query}(),w=makePropDecorator("ContentChildren",[["selector",void 0],{first:!1,isViewQuery:!1,descendants:!1,read:void 0}],b),C=makePropDecorator("ContentChild",[["selector",void 0],{first:!0,isViewQuery:!1,descendants:!1,read:void 0}],b),E=makePropDecorator("ViewChildren",[["selector",void 0],{first:!1,isViewQuery:!0,descendants:!0,read:void 0}],b),S=makePropDecorator("ViewChild",[["selector",void 0],{first:!0,isViewQuery:!0,descendants:!0,read:void 0}],b);t.ChangeDetectionStrategy,function(e){e[e.OnPush=0]="OnPush",e[e.Default=1]="Default"}(t.ChangeDetectionStrategy||(t.ChangeDetectionStrategy={}));var P;!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"}(P||(P={}));var A,x=[t.ChangeDetectionStrategy.OnPush,t.ChangeDetectionStrategy.Default],T=makeDecorator("Directive",{selector:void 0,inputs:void 0,outputs:void 0,host:void 0,providers:void 0,exportAs:void 0,queries:void 0}),M=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},T),I=makeDecorator("Pipe",{name:void 0,pure:!0}),D=makePropDecorator("Input",[["bindingPropertyName",void 0]]),N=makePropDecorator("Output",[["bindingPropertyName",void 0]]),V=makePropDecorator("HostBinding",[["hostPropertyName",void 0]]),O=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"}(A||(A={}));var k=[A.OnInit,A.OnDestroy,A.DoCheck,A.OnChanges,A.AfterContentInit,A.AfterContentChecked,A.AfterViewInit,A.AfterViewChecked],R=function(){function OnChanges(){}return OnChanges}(),L=function(){function OnInit(){}return OnInit}(),F=function(){function DoCheck(){}return DoCheck}(),j=function(){function OnDestroy(){}return OnDestroy}(),B=function(){function AfterContentInit(){}return AfterContentInit}(),W=function(){function AfterContentChecked(){}return AfterContentChecked}(),U=function(){function AfterViewInit(){}return AfterViewInit}(),H=function(){function AfterViewChecked(){}return AfterViewChecked}(),z={name:"custom-elements"},G={name:"no-errors-schema"},q=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 K=[t.ViewEncapsulation.Emulated,t.ViewEncapsulation.Native,t.ViewEncapsulation.None],Q=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}(),Z=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 BaseError(t){var r=e.call(this,t);this._nativeError=r}return Z(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),$=function(e){function WrappedError(t,r){e.call(this,t+" caused by: "+(r instanceof Error?r.message:r)),this.originalError=r}return Z(WrappedError,e),Object.defineProperty(WrappedError.prototype,"stack",{get:function(){return(this.originalError instanceof Error?this.originalError:this._nativeError).stack},enumerable:!0,configurable:!0}),WrappedError}(X),J=new Object,Y=J,ee=function(){function _NullInjector(){}return _NullInjector.prototype.get=function(e,t){if(void 0===t&&(t=J),t===J)throw new Error("No provider for "+stringify(e)+"!");return t},_NullInjector}(),te=function(){function Injector(){}return Injector.prototype.get=function(e,t){return unimplemented()},Injector.THROW_IF_NOT_FOUND=J,Injector.NULL=new ee,Injector}(),re=o.Map,ne=o.Set,ie=function(){try{if(1===new re([[1,2]]).size)return function(e){return new re(e)}}catch(e){}return function(e){for(var t=new re,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 be(e)},ReflectiveProtoInjectorInlineStrategy.prototype.createInjectorStrategy=function(e){return new Be(e,this)},ReflectiveProtoInjectorInlineStrategy}(),Fe=function(){function ReflectiveProtoInjectorDynamicStrategy(e,t){this.providers=t;var r=t.length;this.keyIds=ce.createFixedSize(r);for(var n=0;n=this.providers.length)throw new be(e);return this.providers[e]},ReflectiveProtoInjectorDynamicStrategy.prototype.createInjectorStrategy=function(e){return new We(this,e)},ReflectiveProtoInjectorDynamicStrategy}(),je=function(){function ReflectiveProtoInjector(e){this.numberOfProviders=e.length,this._strategy=e.length>ke?new Fe(this,e):new Le(this,e)}return ReflectiveProtoInjector.fromResolvedProviders=function(e){return new ReflectiveProtoInjector(e)},ReflectiveProtoInjector.prototype.getProviderAtIndex=function(e){return this._strategy.getProviderAtIndex(e)},ReflectiveProtoInjector}(),Be=function(){function ReflectiveInjectorInlineStrategy(e,t){this.injector=e,this.protoStrategy=t,this.obj0=Re,this.obj1=Re,this.obj2=Re,this.obj3=Re,this.obj4=Re,this.obj5=Re,this.obj6=Re,this.obj7=Re,this.obj8=Re,this.obj9=Re}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===Re&&(this.obj0=r._new(t.provider0)),this.obj0):t.keyId1===e?(this.obj1===Re&&(this.obj1=r._new(t.provider1)),this.obj1):t.keyId2===e?(this.obj2===Re&&(this.obj2=r._new(t.provider2)),this.obj2):t.keyId3===e?(this.obj3===Re&&(this.obj3=r._new(t.provider3)),this.obj3):t.keyId4===e?(this.obj4===Re&&(this.obj4=r._new(t.provider4)),this.obj4):t.keyId5===e?(this.obj5===Re&&(this.obj5=r._new(t.provider5)),this.obj5):t.keyId6===e?(this.obj6===Re&&(this.obj6=r._new(t.provider6)),this.obj6):t.keyId7===e?(this.obj7===Re&&(this.obj7=r._new(t.provider7)),this.obj7):t.keyId8===e?(this.obj8===Re&&(this.obj8=r._new(t.provider8)),this.obj8):t.keyId9===e?(this.obj9===Re&&(this.obj9=r._new(t.provider9)),this.obj9):Re},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 be(e)},ReflectiveInjectorInlineStrategy.prototype.getMaxNumberOfObjects=function(){return ke},ReflectiveInjectorInlineStrategy}(),We=function(){function ReflectiveInjectorDynamicStrategy(e,t){this.protoStrategy=e,this.injector=t,this.objs=ce.createFixedSize(e.providers.length),ce.fill(this.objs,Re)}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 be(e);return this.objs[e]},ReflectiveInjectorDynamicStrategy.prototype.getMaxNumberOfObjects=function(){return this.objs.length},ReflectiveInjectorDynamicStrategy}(),Ue=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 He(je.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}(),He=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=Y),this._getByKey(Ce.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=Ue.resolve(e);return this.createChildFromResolved(t)},ReflectiveInjector_.prototype.createChildFromResolved=function(e){var t=new je(e),r=new ReflectiveInjector_(t);return r._parent=this,r},ReflectiveInjector_.prototype.resolveAndInstantiate=function(e){return this.instantiateResolved(Ue.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 ye(this,e.key);return this._instantiateProvider(e)},ReflectiveInjector_.prototype._instantiateProvider=function(e){if(e.multiProvider){for(var t=ce.createFixedSize(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 de||P instanceof ve)&&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 ve(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:Y)},ReflectiveInjector_.prototype._getByKey=function(e,t,r,n){return e===ze?this:r instanceof d?this._getByKeySelf(e,n):this._getByKeyDefault(e,n,t)},ReflectiveInjector_.prototype._throwOrNull=function(e,t){if(t!==Y)return t;throw new me(this,e)},ReflectiveInjector_.prototype._getByKeySelf=function(e,t){var r=this._strategy.getObjByKeyId(e.id);return r!==Re?r:this._throwOrNull(e,t)},ReflectiveInjector_.prototype._getByKeyDefault=function(e,t,r){var n;for(n=r instanceof m?this._parent:this;n instanceof ReflectiveInjector_;){var i=n,o=i._strategy.getObjByKeyId(e.id);if(o!==Re)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_}(),ze=Ce.get(te),Ge=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}(),qe=new v("Application Initializer"),Ke=function(){function ApplicationInitStatus(e){var t=this;this._done=!1;var r=[];if(e)for(var n=0;n"+stringify(this.currentIndex)+"]"},CollectionChangeRecord}(),ct=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}(),mt=function(){function IterableDiffers(e){this.factories=e}return IterableDiffers.create=function(e,t){if(isPresent(t)){var r=ce.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(isBlank(t))throw new Error("Cannot extend IterableDiffers without a parent injector");return IterableDiffers.create(e,t)},deps:[[IterableDiffers,new m,new h]]}},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}(),yt=function(){function KeyValueDiffers(e){this.factories=e}return KeyValueDiffers.create=function(e,t){if(isPresent(t)){var r=ce.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(isBlank(t))throw new Error("Cannot extend KeyValueDiffers without a parent injector");return KeyValueDiffers.create(e,t)},deps:[[KeyValueDiffers,new m,new h]]}},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}(),vt={toString:function(){return"CD_INIT_VALUE"}},gt=function(){function WrappedValue(e){this.wrapped=e}return WrappedValue.wrap=function(e){return new WrappedValue(e)},WrappedValue}(),_t=function(){function ValueUnwrapper(){this.hasWrappedValue=!1}return ValueUnwrapper.prototype.unwrap=function(e){return e instanceof gt?(this.hasWrappedValue=!0,e.wrapped):e},ValueUnwrapper.prototype.reset=function(){this.hasWrappedValue=!1},ValueUnwrapper}(),bt=function(){function SimpleChange(e,t){this.previousValue=e,this.currentValue=t}return SimpleChange.prototype.isFirstChange=function(){return this.previousValue===vt},SimpleChange}(),wt=function(){function ChangeDetectorRef(){}return ChangeDetectorRef}(),Ct=[new ht],Et=[new st],St=new mt(Et),Pt=new yt(Ct),At=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}(),xt=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}(),Tt=function(){function Renderer(){}return Renderer}(),Mt=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 It,Dt,Nt,Vt=function(){function Sanitizer(){}return Sanitizer}(),Ot=function(){function ElementRef(e){this.nativeElement=e}return ElementRef}(),kt=detectWTF(),Rt=kt?createScope:function(e,t){return noopScope},Lt=kt?leave:function(e,t){return t},Ft=kt?startTimeRange:function(e,t){return null},jt=kt?endTimeRange:function(e){return null},Bt=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}(),Wt=function(){function ViewContainerRef_(e){this._element=e,this._createComponentInContainerScope=Rt("ViewContainerRef#createComponent()"),this._insertScope=Rt("ViewContainerRef#insert()"),this._removeScope=Rt("ViewContainerRef#remove()"),this._detachScope=Rt("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),Lt(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),Lt(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),Lt(r,n)}},ViewContainerRef_.prototype.indexOf=function(e){return ce.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(),Lt(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 Lt(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"}(Nt||(Nt={}));var Ut,Ht=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 Ot(this.nativeElement)},enumerable:!0,configurable:!0}),Object.defineProperty(AppElement.prototype,"vcRef",{get:function(){return new Wt(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===Nt.COMPONENT)throw new Error("Component views can't be moved!");var n=this.nestedViews;null==n&&(n=[],this.nestedViews=n),ce.removeAt(n,r),ce.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===Nt.COMPONENT)throw new Error("Component views can't be moved!");var r=this.nestedViews;null==r&&(r=[],this.nestedViews=r),ce.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=ce.removeAt(this.nestedViews,e);if(t.type===Nt.COMPONENT)throw new Error("Component views can't be moved!");return t.detach(),t.removeFromContentChildren(this),t},AppElement}(),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 __)},Gt=function(e){function ExpressionChangedAfterItHasBeenCheckedError(t,r){var n="Expression has changed after it was checked. Previous value: '"+t+"'. Current value: '"+r+"'.";t===vt&&(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 zt(ExpressionChangedAfterItHasBeenCheckedError,e),ExpressionChangedAfterItHasBeenCheckedError}(X),qt=function(e){function ViewWrappedError(t,r){e.call(this,"Error in "+r.source,t),this.context=r}return zt(ViewWrappedError,e),ViewWrappedError}($),Kt=function(e){function ViewDestroyedError(t){e.call(this,"Attempt to use a destroyed view: "+t)}return zt(ViewDestroyedError,e),ViewDestroyedError}(X),Qt=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 At(this._appId+"-"+this._nextCompTypeId++,e,t,r,n,i)},ViewUtils.prototype.renderComponent=function(e){return this._renderer.renderComponent(e)},ViewUtils.decorators=[{type:f}],ViewUtils.ctorParameters=[{type:Mt},{type:void 0,decorators:[{type:p,args:[Qe]}]},{type:Vt}],ViewUtils}(),Zt=[],Xt=9,$t=[],Jt={},Yt=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 __)},er=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}(),tr=function(e){function ComponentRef_(t,r){e.call(this),this._hostElement=t,this._componentType=r}return Yt(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_}(er),rr=new Object,nr=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(Qt);isBlank(t)&&(t=[]);var i=this._viewFactory(n,e,null),o=i.create(rr,t,r);return new tr(o,this._componentType)},ComponentFactory}(),ir=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(e){function NoComponentFactoryError(t){e.call(this,"No component factory found for "+stringify(t)),this.component=t}return ir(NoComponentFactoryError,e),NoComponentFactoryError}(X),sr=function(){function _NullComponentFactoryResolver(){}return _NullComponentFactoryResolver.prototype.resolveComponentFactory=function(e){throw new or(e)},_NullComponentFactoryResolver}(),ar=function(){function ComponentFactoryResolver(){}return ComponentFactoryResolver.NULL=new sr,ComponentFactoryResolver}(),ur=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:f}],PlatformRef_.ctorParameters=[{type:te}],PlatformRef_}(br),Cr=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}(),Er=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 vr(ApplicationRef_,e),ApplicationRef_.prototype.registerChangeDetector=function(e){this._changeDetectorRefs.push(e)},ApplicationRef_.prototype.unregisterChangeDetector=function(e){ce.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 nr?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(fr,null);return isPresent(i)&&n.injector.get(dr).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($e,[]).concat(this._bootstrapListeners);t.forEach(function(t){return t(e)})},ApplicationRef_.prototype._unloadComponent=function(e){ce.contains(this._rootComponents,e)&&(this.unregisterChangeDetector(e.changeDetectorRef),ce.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,Lt(e)}},ApplicationRef_.prototype.ngOnDestroy=function(){ce.clone(this._rootComponents).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=Rt("ApplicationRef#tick()"),ApplicationRef_.decorators=[{type:f}],ApplicationRef_.ctorParameters=[{type:hr},{type:Ye},{type:te},{type:Ge},{type:ar},{type:Ke},{type:dr,decorators:[{type:h}]},{type:fr,decorators:[{type:h}]}],ApplicationRef_}(Cr),Sr=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 __)},Pr=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}(),Ar=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=te.NULL);var t=new this._injectorClass(e);return t.create(),t},NgModuleFactory}(),xr=new Object,Tr=function(e){function NgModuleInjector(t,r,n){e.call(this,r,t.get(ar,ar.NULL)),this.parent=t,this.bootstrapFactories=n,this._destroyListeners=[],this._destroyed=!1}return Sr(NgModuleInjector,e),NgModuleInjector.prototype.create=function(){this.instance=this.createInternal()},NgModuleInjector.prototype.get=function(e,t){if(void 0===t&&(t=Y),e===te||e===ar)return this;var r=this.getInternal(e,xr);return r===xr?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}(ur),Mr=function(){function NgModuleFactoryLoader(){}return NgModuleFactoryLoader}(),Ir=new Map,Dr=function(){function QueryList(){this._dirty=!0,this._results=[],this._emitter=new cr}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=ce.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}(),Nr="#",Vr="NgFactory",Or=function(){function SystemJsNgModuleLoaderConfig(){}return SystemJsNgModuleLoaderConfig}(),kr={factoryPathPrefix:"",factoryPathSuffix:".ngfactory"},Rr=function(){function SystemJsNgModuleLoader(e,t){this._compiler=e,this._config=t||kr}return SystemJsNgModuleLoader.prototype.load=function(e){var t=this._compiler instanceof nt;return t?this.loadFactory(e):this.loadAndCompile(e)},SystemJsNgModuleLoader.prototype.loadAndCompile=function(e){var t=this,r=e.split(Nr),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(Nr),r=t[0],n=t[1],i=Vr;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:f}],SystemJsNgModuleLoader.ctorParameters=[{type:nt},{type:Or,decorators:[{type:h}]}],SystemJsNgModuleLoader}(),Lr=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 __)},Fr=function(){function TemplateRef(){}return Object.defineProperty(TemplateRef.prototype,"elementRef",{get:function(){return null},enumerable:!0,configurable:!0}),TemplateRef}(),jr=function(e){function TemplateRef_(t,r){e.call(this),this._appElement=t,this._viewFactory=r}return Lr(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_}(Fr),Br=[],Wr=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 __)},Ur=function(){function ViewRef(){}return Object.defineProperty(ViewRef.prototype,"destroyed",{get:function(){return unimplemented()},enumerable:!0,configurable:!0}),ViewRef}(),Hr=function(e){function EmbeddedViewRef(){e.apply(this,arguments)}return Wr(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}(Ur),zr=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=P.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_}(),Gr=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 __)},qr=function(){function EventListener(e,t){this.name=e,this.callback=t}return EventListener}(),Kr=function(){function DebugNode(e,t,r){this._debugInfo=r,this.nativeNode=e,isPresent(t)&&t instanceof Qr?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}(),Qr=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 Gr(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=ce.concat(ce.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}(Kr),Zr=new Map,Xr=[wr,{provide:br,useExisting:wr},{provide:Me,useFactory:_reflector,deps:[]},{provide:xe,useExisting:Me},dr,Ye],$r=createPlatformFactory(null,"core",Xr),Jr=new v("LocaleId"),Yr=new v("Translations"),en=new v("TranslationsFormat"),tn=function(){function ApplicationModule(){}return ApplicationModule.decorators=[{type:q,args:[{providers:[Er,{provide:Cr,useExisting:Er},Ke,nt,Ze,Qt,{provide:mt,useFactory:_iterableDiffersFactory},{provide:yt,useFactory:_keyValueDiffersFactory},{provide:Jr,useValue:"en-US"}]}]}],ApplicationModule.ctorParameters=[],ApplicationModule}(),rn="true",nn="*",on="*",sn="void",an=o.Math,un=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=an.min(r,e)}),e},AnimationGroupPlayer}(),ln=function(){function AnimationKeyframe(e,t){this.offset=e,this.styles=t}return AnimationKeyframe}(),cn=function(){function AnimationOutput(e,t,r){this.name=e,this.phase=t,this.fullPropertyName=r}return AnimationOutput}(),pn=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}(),hn=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}(),fn=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 hn,scheduleMicroTask(function(){return t._onFinish()});else if(this._currentIndex>=this._players.length)this._activePlayer=new hn,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}(),dn=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="*",yn=function(){function AnimationEntryMetadata(e,t){this.name=e,this.definitions=t}return AnimationEntryMetadata}(),vn=function(){function AnimationStateMetadata(){}return AnimationStateMetadata}(),gn=function(e){function AnimationStateDeclarationMetadata(t,r){e.call(this),this.stateNameExpr=t,this.styles=r}return dn(AnimationStateDeclarationMetadata,e),AnimationStateDeclarationMetadata}(vn),_n=function(e){function AnimationStateTransitionMetadata(t,r){e.call(this),this.stateChangeExpr=t,this.steps=r}return dn(AnimationStateTransitionMetadata,e),AnimationStateTransitionMetadata}(vn),bn=function(){function AnimationMetadata(){}return AnimationMetadata}(),wn=function(e){function AnimationKeyframesSequenceMetadata(t){e.call(this),this.steps=t}return dn(AnimationKeyframesSequenceMetadata,e),AnimationKeyframesSequenceMetadata}(bn),Cn=function(e){function AnimationStyleMetadata(t,r){void 0===r&&(r=null),e.call(this),this.styles=t,this.offset=r}return dn(AnimationStyleMetadata,e),AnimationStyleMetadata}(bn),En=function(e){function AnimationAnimateMetadata(t,r){e.call(this),this.timings=t,this.styles=r}return dn(AnimationAnimateMetadata,e),AnimationAnimateMetadata}(bn),Sn=function(e){function AnimationWithStepsMetadata(){e.call(this)}return dn(AnimationWithStepsMetadata,e),Object.defineProperty(AnimationWithStepsMetadata.prototype,"steps",{get:function(){throw new Error("NOT IMPLEMENTED: Base Class")},enumerable:!0,configurable:!0}),AnimationWithStepsMetadata}(bn),Pn=function(e){function AnimationSequenceMetadata(t){e.call(this),this._steps=t}return dn(AnimationSequenceMetadata,e),Object.defineProperty(AnimationSequenceMetadata.prototype,"steps",{get:function(){return this._steps},enumerable:!0,configurable:!0}),AnimationSequenceMetadata}(Sn),An=function(e){function AnimationGroupMetadata(t){e.call(this),this._steps=t}return dn(AnimationGroupMetadata,e),Object.defineProperty(AnimationGroupMetadata.prototype,"steps",{get:function(){return this._steps},enumerable:!0,configurable:!0}),AnimationGroupMetadata}(Sn),xn=function(){function AnimationStyles(e){this.styles=e}return AnimationStyles}(),Tn=function(){function DebugDomRootRenderer(e){this._delegate=e}return DebugDomRootRenderer.prototype.renderComponent=function(e){return new Mn(this._delegate.renderComponent(e))},DebugDomRootRenderer}(),Mn=function(){function DebugDomRenderer(e){this._delegate=e}return DebugDomRenderer.prototype.selectRootElement=function(e,t){var r=this._delegate.selectRootElement(e,t),n=new Qr(r,null,t);return indexDebugNode(n),r},DebugDomRenderer.prototype.createElement=function(e,t,r){var n=this._delegate.createElement(e,t,r),i=new Qr(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 Kr(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 Kr(n,getDebugNode(e),r);return indexDebugNode(i),n},DebugDomRenderer.prototype.projectNodes=function(e,t){var r=getDebugNode(e);if(isPresent(r)&&r instanceof Qr){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 qr(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 Qr&&(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 Qr&&(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 Qr&&(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 Qr&&(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}(),In=function(){function StaticNodeDebugInfo(e,t,r){this.providerTokens=e,this.componentToken=t,this.refTokens=r}return StaticNodeDebugInfo}(),Dn=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!==Nt.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;le.forEach(n,function(r,n){var i;i=isBlank(r)?e._view.allNodes?e._view.allNodes[e._nodeIndex]:null:e._view.injectorGet(r,e._nodeIndex,null),t[n]=i})}return t},enumerable:!0,configurable:!0}),DebugContext}(),Nn=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}(),Vn=function(){function ViewAnimationMap(){this._map=new re,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?le.values(t):[]},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(isPresent(r)){var n=r[t];delete r[t];var i=this._allPlayers.indexOf(n);ce.removeAt(this._allPlayers,i),le.isEmpty(r)&&this._map.delete(e)}},ViewAnimationMap}(),On=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 __)},kn=new Object,Rn=function(e){function ElementInjector(t,r){e.call(this),this._view=t,this._nodeIndex=r}return On(ElementInjector,e),ElementInjector.prototype.get=function(e,t){void 0===t&&(t=Y);var r=kn;return r===kn&&(r=this._view.injectorGet(e,this._nodeIndex,kn)),r===kn&&(r=this._view.parentInjector.get(e,t)),r},ElementInjector}(te),Ln=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 __)},Fn=Rt("AppView#check(ascii id)"),jn=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 Vn,this._animationListeners=new Map,this.ref=new zr(this),r===Nt.COMPONENT||r===Nt.HOST?this.renderer=n.renderComponent(t):this.renderer=o.parentView.renderer}return Object.defineProperty(AppView.prototype,"destroyed",{get:function(){return this.cdMode===P.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 Nn({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=Fn(this.clazz);this.cdMode!==P.Checked&&this.cdMode!==P.Errored&&(this.cdMode===P.Destroyed&&this.throwDestroyedError("detectChanges"),this.detectChangesInternal(e),this.cdMode===P.CheckOnce&&(this.cdMode=P.Checked),this.numberOfChecks++,Lt(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)?S.compose(e.map(normalizeValidator)):null}function composeAsyncValidators(e){return isPresent(e)?S.composeAsync(e.map(normalizeAsyncValidator)):null}function isPropertyUpdated(e,t){if(!b.contains(e,"model"))return!1;var r=e.model;return!!r.isFirstChange()||!looseIdentical(t,r.currentValue)}function isBuiltInAccessor(e){return hasConstructor(e,x)||hasConstructor(e,D)||hasConstructor(e,F)||hasConstructor(e,W)||hasConstructor(e,R)}function selectValueAccessor(e,t){if(isBlank(t))return null;var r,n,i;return t.forEach(function(t){hasConstructor(t,M)?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&&w.isEmpty(t)?null:t.reduce(function(e,t){if(e instanceof oe)return isPresent(e.controls[t])?e.controls[t]:null;if(e instanceof se){var r=t;return isPresent(e.at(r))?e.at(r):null}return null},e))}function toObservable(e){return isPromise(e)?s.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 Me||e instanceof Ae||e instanceof De)}var a;a="undefined"==typeof window?"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:e:window;var u=a;u.assert=function(e){};var l=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}(),c=(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}()),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 ControlContainer(){e.apply(this,arguments)}return p(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}(c),f=u.Map,d=u.Set,m=function(){try{if(1===new f([[1,2]]).size)return function(e){return new f(e)}}catch(e){}return function(e){for(var t=new f,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){if(isPresent(Validators.required(t)))return null;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(isBlank(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(isBlank(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}(),P=new r.OpaqueToken("NgValueAccessor"),A={provide:P,useExisting:r.forwardRef(function(){return x}),multi:!0},x=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:r.Directive,args:[{selector:"input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]",host:{"(change)":"onChange($event.target.checked)","(blur)":"onTouched()"},providers:[A]}]}],CheckboxControlValueAccessor.ctorParameters=[{type:r.Renderer},{type:r.ElementRef}],CheckboxControlValueAccessor}(),T={provide:P,useExisting:r.forwardRef(function(){return M}),multi:!0},M=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:r.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:[T]}]}],DefaultValueAccessor.ctorParameters=[{type:r.Renderer},{type:r.ElementRef}],DefaultValueAccessor}(),I={provide:P,useExisting:r.forwardRef(function(){return D}),multi:!0},D=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:r.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:[I]}]}],NumberValueAccessor.ctorParameters=[{type:r.Renderer},{type:r.ElementRef}],NumberValueAccessor}(),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 __)},V=function(e){function NgControl(){e.apply(this,arguments),this._parent=null,this.name=null,this.valueAccessor=null,this._rawValidators=[],this._rawAsyncValidators=[]}return N(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}(c),O={provide:P,useExisting:r.forwardRef(function(){return R}),multi:!0},k=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:r.Directive,args:[{selector:"input[type=radio][formControlName],input[type=radio][formControl],input[type=radio][ngModel]",host:{"(change)":"onChange()","(blur)":"onTouched()"},providers:[O]}]}],RadioControlValueAccessor.ctorParameters=[{type:r.Renderer},{type:r.ElementRef},{type:k},{type:r.Injector}],RadioControlValueAccessor.propDecorators={name:[{type:r.Input}],formControlName:[{type:r.Input}],value:[{type:r.Input}]},RadioControlValueAccessor}(),L={provide:P,useExisting:r.forwardRef(function(){return F}),multi:!0},F=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=_.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}(ne),se=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 J(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){w.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(){}),w.removeAt(this.controls,e),this.updateValueAndValidity(),this._onCollectionChange()},FormArray.prototype.setControl=function(e,t){this.controls[e]&&this.controls[e]._registerOnCollectionChange(function(){}),w.removeAt(this.controls,e),t&&(w.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}(ne),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:h,useExisting:r.forwardRef(function(){return ce})},le=Promise.resolve(null),ce=function(e){function NgForm(t,r){e.call(this),this._submitted=!1,this.ngSubmit=new $,this.form=new oe({},composeValidators(t),composeAsyncValidators(r))}return ae(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;le.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;le.then(function(){var r=t._findContainer(e.path);isPresent(r)&&r.removeControl(e.name)})},NgForm.prototype.addFormGroup=function(e){var t=this;le.then(function(){var r=t._findContainer(e.path),n=new oe({});setUpFormContainer(n,e),r.registerControl(e.name,n),n.updateValueAndValidity({emitEvent:!1})})},NgForm.prototype.removeFormGroup=function(e){var t=this;le.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;le.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(),w.isEmpty(e)?this.form:this.form.get(e)},NgForm.decorators=[{type:r.Directive,args:[{selector:"form:not([ngNoForm]):not([formGroup]),ngForm,[ngForm]",providers:[ue],host:{"(submit)":"onSubmit()","(reset)":"onReset()"},outputs:["ngSubmit"],exportAs:"ngForm"}]}],NgForm.ctorParameters=[{type:Array,decorators:[{type:r.Optional},{type:r.Self},{type:r.Inject,args:[C]}]},{type:Array,decorators:[{type:r.Optional},{type:r.Self},{type:r.Inject,args:[E]}]}],NgForm}(h),pe={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 '},he=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 '+pe.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 "+pe.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 "+pe.formGroupName+"\n\n Option 2: Update ngModel's parent be ngModelGroup (template-driven strategy):\n\n "+pe.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 "+pe.formGroupName+"\n\n Option 2: Use a regular form tag instead of the formGroup directive (template-driven strategy):\n\n "+pe.ngModelGroup)},TemplateDrivenErrors}(),fe=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 __)},de={provide:h,useExisting:r.forwardRef(function(){return me})},me=function(e){function NgModelGroup(t,r,n){e.call(this),this._parent=t,this._validators=r,this._asyncValidators=n}return fe(NgModelGroup,e),NgModelGroup.prototype._checkParentType=function(){this._parent instanceof NgModelGroup||this._parent instanceof ce||he.modelGroupParentException()},NgModelGroup.decorators=[{type:r.Directive,args:[{selector:"[ngModelGroup]",providers:[de],exportAs:"ngModelGroup"}]}],NgModelGroup.ctorParameters=[{type:h,decorators:[{type:r.Host},{type:r.SkipSelf}]},{type:Array,decorators:[{type:r.Optional},{type:r.Self},{type:r.Inject,args:[C]}]},{type:Array,decorators:[{type:r.Optional},{type:r.Self},{type:r.Inject,args:[E]}]}],NgModelGroup.propDecorators={name:[{type:r.Input,args:["ngModelGroup"]}]},NgModelGroup}(z),ye=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 __)},ve={provide:V,useExisting:r.forwardRef(function(){return _e})},ge=Promise.resolve(null),_e=function(e){function NgModel(t,r,n,i){e.call(this),this._control=new ie,this._registered=!1,this.update=new $,this._parent=t,this._rawValidators=r||[],this._rawAsyncValidators=n||[],this.valueAccessor=selectValueAccessor(this,i)}return ye(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 me)&&this._parent instanceof z?he.formGroupNameException():this._parent instanceof me||this._parent instanceof ce||he.modelParentException()},NgModel.prototype._checkName=function(){this.options&&this.options.name&&(this.name=this.options.name),this._isStandalone()||this.name||he.missingNameException()},NgModel.prototype._updateValue=function(e){var t=this;ge.then(function(){t.control.setValue(e,{emitViewToModelChange:!1})})},NgModel.prototype._updateDisabled=function(e){var t=this,r=e.isDisabled.currentValue,n=null!=r&&0!=r;ge.then(function(){n&&!t.control.disabled?t.control.disable():!n&&t.control.disabled&&t.control.enable()})},NgModel.decorators=[{type:r.Directive,args:[{selector:"[ngModel]:not([formControlName]):not([formControl])",providers:[ve],exportAs:"ngModel"}]}],NgModel.ctorParameters=[{type:h,decorators:[{type:r.Optional},{type:r.Host}]},{type:Array,decorators:[{type:r.Optional},{type:r.Self},{type:r.Inject,args:[C]}]},{type:Array,decorators:[{type:r.Optional},{type:r.Self},{type:r.Inject,args:[E]}]},{type:Array,decorators:[{type:r.Optional},{type:r.Self},{type:r.Inject,args:[P]}]}],NgModel.propDecorators={name:[{type:r.Input}],isDisabled:[{type:r.Input,args:["disabled"]}],model:[{type:r.Input,args:["ngModel"]}],options:[{type:r.Input,args:["ngModelOptions"]}],update:[{type:r.Output,args:["ngModelChange"]}]},NgModel}(V),be=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 "+pe.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 '+pe.formGroupName+"\n\n Option 2: Use ngModel instead of formControlName (template-driven strategy)\n\n "+pe.ngModelGroup)},ReactiveErrors.missingFormException=function(){throw new Error("formGroup expects a FormGroup instance. Please pass one in.\n\n Example:\n\n "+pe.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 "+pe.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 "+pe.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}(),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:V,useExisting:r.forwardRef(function(){return Ee})},Ee=function(e){function FormControlDirective(t,r,n){e.call(this),this.update=new $,this._rawValidators=t||[],this._rawAsyncValidators=r||[],this.valueAccessor=selectValueAccessor(this,n)}return we(FormControlDirective,e),Object.defineProperty(FormControlDirective.prototype,"isDisabled",{set:function(e){be.disabledAttrWarning()},enumerable:!0,configurable:!0}),FormControlDirective.prototype.ngOnChanges=function(e){this._isControlChanged(e)&&(setUpControl(this.form,this),this.control.disabled&&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 b.contains(e,"form")},FormControlDirective.decorators=[{type:r.Directive,args:[{selector:"[formControl]",providers:[Ce],exportAs:"ngForm"}]}],FormControlDirective.ctorParameters=[{type:Array,decorators:[{type:r.Optional},{type:r.Self},{type:r.Inject,args:[C]}]},{type:Array,decorators:[{type:r.Optional},{type:r.Self},{type:r.Inject,args:[E]}]},{type:Array,decorators:[{type:r.Optional},{type:r.Self},{type:r.Inject,args:[P]}]}],FormControlDirective.propDecorators={form:[{type:r.Input,args:["formControl"]}],model:[{type:r.Input,args:["ngModel"]}],update:[{type:r.Output,args:["ngModelChange"]}],isDisabled:[{type:r.Input,args:["disabled"]}]},FormControlDirective}(V),Se=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:h,useExisting:r.forwardRef(function(){return Ae})},Ae=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 $}return Se(FormGroupDirective,e),FormGroupDirective.prototype.ngOnChanges=function(e){this._checkFormPresent(),b.contains(e,"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){w.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=S.compose([this.form.validator,e]);var t=composeAsyncValidators(this._asyncValidators);this.form.asyncValidator=S.composeAsync([this.form.asyncValidator,t])},FormGroupDirective.prototype._checkFormPresent=function(){isBlank(this.form)&&be.missingFormException()},FormGroupDirective.decorators=[{type:r.Directive,args:[{selector:"[formGroup]",providers:[Pe],host:{"(submit)":"onSubmit()","(reset)":"onReset()"},exportAs:"ngForm"}]}],FormGroupDirective.ctorParameters=[{type:Array,decorators:[{type:r.Optional},{type:r.Self},{type:r.Inject,args:[C]}]},{type:Array,decorators:[{type:r.Optional},{type:r.Self},{type:r.Inject,args:[E]}]}],FormGroupDirective.propDecorators={form:[{type:r.Input,args:["formGroup"]}],ngSubmit:[{type:r.Output}]},FormGroupDirective}(h),xe=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 __)},Te={provide:h,useExisting:r.forwardRef(function(){return Me})},Me=function(e){function FormGroupName(t,r,n){e.call(this),this._parent=t,this._validators=r,this._asyncValidators=n}return xe(FormGroupName,e),FormGroupName.prototype._checkParentType=function(){_hasInvalidParent(this._parent)&&be.groupParentException()},FormGroupName.decorators=[{type:r.Directive,args:[{selector:"[formGroupName]",providers:[Te]}]}],FormGroupName.ctorParameters=[{type:h,decorators:[{type:r.Optional},{type:r.Host},{type:r.SkipSelf}]},{type:Array,decorators:[{type:r.Optional},{type:r.Self},{type:r.Inject,args:[C]}]},{type:Array,decorators:[{type:r.Optional},{type:r.Self},{type:r.Inject,args:[E]}]}],FormGroupName.propDecorators={name:[{type:r.Input,args:["formGroupName"]}]},FormGroupName}(z),Ie={provide:h,useExisting:r.forwardRef(function(){return De})},De=function(e){function FormArrayName(t,r,n){e.call(this),this._parent=t,this._validators=r,this._asyncValidators=n}return xe(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)&&be.arrayParentException()},FormArrayName.decorators=[{type:r.Directive,args:[{selector:"[formArrayName]",providers:[Ie]}]}],FormArrayName.ctorParameters=[{type:h,decorators:[{type:r.Optional},{type:r.Host},{type:r.SkipSelf}]},{type:Array,decorators:[{type:r.Optional},{type:r.Self},{type:r.Inject,args:[C]}]},{type:Array,decorators:[{type:r.Optional},{type:r.Self},{type:r.Inject,args:[E]}]}],FormArrayName.propDecorators={name:[{type:r.Input,args:["formArrayName"]}]},FormArrayName}(h),Ne=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 __)},Ve={provide:V,useExisting:r.forwardRef(function(){return Oe})},Oe=function(e){function FormControlName(t,r,n,i){e.call(this),this._added=!1,this.update=new $,this._parent=t,this._rawValidators=r||[],this._rawAsyncValidators=n||[],this.valueAccessor=selectValueAccessor(this,i)}return Ne(FormControlName,e),Object.defineProperty(FormControlName.prototype,"isDisabled",{set:function(e){be.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 Me)&&this._parent instanceof z?be.ngModelGroupException():this._parent instanceof Me||this._parent instanceof Ae||this._parent instanceof De||be.controlParentException()},FormControlName.prototype._setUpControl=function(){this._checkParentType(),this._control=this.formDirective.addControl(this),this.control.disabled&&this.valueAccessor.setDisabledState(!0),this._added=!0},FormControlName.decorators=[{type:r.Directive,args:[{selector:"[formControlName]",providers:[Ve]}]}],FormControlName.ctorParameters=[{type:h,decorators:[{type:r.Optional},{type:r.Host},{type:r.SkipSelf}]},{type:Array,decorators:[{type:r.Optional},{type:r.Self},{type:r.Inject,args:[C]}]},{type:Array,decorators:[{type:r.Optional},{type:r.Self},{type:r.Inject,args:[E]}]},{type:Array,decorators:[{type:r.Optional},{type:r.Self},{type:r.Inject,args:[P]}]}],FormControlName.propDecorators={name:[{type:r.Input,args:["formControlName"]}],model:[{type:r.Input,args:["ngModel"]}],update:[{type:r.Output,args:["ngModelChange"]}],isDisabled:[{type:r.Input,args:["disabled"]}]},FormControlName}(V),ke={provide:C,useExisting:r.forwardRef(function(){return Re}),multi:!0},Re=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?S.required(e):null},RequiredValidator.prototype.registerOnValidatorChange=function(e){this._onChange=e},RequiredValidator.decorators=[{type:r.Directive,args:[{selector:"[required][formControlName],[required][formControl],[required][ngModel]",providers:[ke],host:{"[attr.required]":'required? "" : null'}}]}],RequiredValidator.ctorParameters=[],RequiredValidator.propDecorators={required:[{type:r.Input}]},RequiredValidator}(),Le={provide:C,useExisting:r.forwardRef(function(){return Fe}),multi:!0},Fe=function(){function MinLengthValidator(){}return MinLengthValidator.prototype._createValidator=function(){this._validator=S.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:r.Directive,args:[{selector:"[minlength][formControlName],[minlength][formControl],[minlength][ngModel]",providers:[Le],host:{"[attr.minlength]":"minlength? minlength : null"}}]}],MinLengthValidator.ctorParameters=[],MinLengthValidator.propDecorators={minlength:[{type:r.Input}]},MinLengthValidator}(),je={provide:C,useExisting:r.forwardRef(function(){return Be}),multi:!0},Be=function(){function MaxLengthValidator(){}return MaxLengthValidator.prototype._createValidator=function(){this._validator=S.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:r.Directive,args:[{selector:"[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]",providers:[je],host:{"[attr.maxlength]":"maxlength? maxlength : null"}}]}],MaxLengthValidator.ctorParameters=[],MaxLengthValidator.propDecorators={maxlength:[{type:r.Input}]},MaxLengthValidator}(),We={provide:C,useExisting:r.forwardRef(function(){return Ue}),multi:!0},Ue=function(){function PatternValidator(){}return PatternValidator.prototype._createValidator=function(){this._validator=S.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:r.Directive,args:[{selector:"[pattern][formControlName],[pattern][formControl],[pattern][ngModel]",providers:[We],host:{"[attr.pattern]":"pattern? pattern : null"}}]}],PatternValidator.ctorParameters=[],PatternValidator.propDecorators={pattern:[{type:r.Input}]},PatternValidator}(),He=function(){function FormBuilder(){}return FormBuilder.prototype.group=function(e,t){void 0===t&&(t=null);var r=this._reduceControls(e),n=isPresent(t)?b.get(t,"validator"):null,i=isPresent(t)?b.get(t,"asyncValidator"):null;return new oe(r,n,i)},FormBuilder.prototype.control=function(e,t,r){return void 0===t&&(t=null),void 0===r&&(r=null),new ie(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 se(i,t,r)},FormBuilder.prototype._reduceControls=function(e){var t=this,r={};return b.forEach(e,function(e,n){r[n]=t._createControl(e)}),r},FormBuilder.prototype._createControl=function(e){if(e instanceof ie||e instanceof oe||e instanceof se)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:r.Injectable}],FormBuilder.ctorParameters=[],FormBuilder}(),ze=[j,U,M,D,x,F,W,R,Q,Z,Re,Fe,Be,Ue],Ge=[_e,me,ce],qe=[Ee,Ae,Oe,Me,De],Ke=function(){function InternalFormsSharedModule(){}return InternalFormsSharedModule.decorators=[{type:r.NgModule,args:[{declarations:ze,exports:ze}]}],InternalFormsSharedModule.ctorParameters=[],InternalFormsSharedModule}(),Qe=function(){function FormsModule(){}return FormsModule.decorators=[{type:r.NgModule,args:[{declarations:Ge,providers:[k],exports:[Ke,Ge]}]}],FormsModule.ctorParameters=[],FormsModule}(),Ze=function(){function ReactiveFormsModule(){}return ReactiveFormsModule.decorators=[{type:r.NgModule,args:[{declarations:[qe],providers:[He,k],exports:[Ke,qe]}]}],ReactiveFormsModule.ctorParameters=[],ReactiveFormsModule}();t.AbstractControlDirective=c,t.AbstractFormGroupDirective=z,t.CheckboxControlValueAccessor=x,t.ControlContainer=h,t.NG_VALUE_ACCESSOR=P,t.DefaultValueAccessor=M,t.NgControl=V,t.NgControlStatus=Q,t.NgControlStatusGroup=Z,t.NgForm=ce,t.NgModel=_e,t.NgModelGroup=me,t.FormControlDirective=Ee,t.FormControlName=Oe,t.FormGroupDirective=Ae,t.FormArrayName=De,t.FormGroupName=Me,t.NgSelectOption=j,t.SelectControlValueAccessor=F,t.SelectMultipleControlValueAccessor=W,t.MaxLengthValidator=Be,t.MinLengthValidator=Fe,t.PatternValidator=Ue,t.RequiredValidator=Re,t.FormBuilder=He,t.AbstractControl=ne,t.FormArray=se,t.FormControl=ie,t.FormGroup=oe,t.NG_ASYNC_VALIDATORS=E,t.NG_VALIDATORS=C,t.Validators=S,t.FormsModule=Qe,t.ReactiveFormsModule=Ze})}).call(t,function(){return this}())},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 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 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 _flattenArray(e,t){if(isPresent(e))for(var r=0;r=P&&r<=A||r==x))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 isBlank(R)&&(R=document.querySelector("base"),isBlank(R))?null:R.getAttribute("href")}function relativePath(e){return isBlank(L)&&(L=document.createElement("a")),L.setAttribute("href",e),"/"===L.pathname.charAt(0)?L.pathname:"/"+L.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){Te.attributeMap(e).forEach(function(t,r){"xmlns:ns1"!==r&&0!==r.indexOf("ns1:")||Te.removeAttribute(e,r)});for(var t=0,r=Te.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=function(){function DateWrapper(){}return DateWrapper.create=function(e,t,r,n,i,o,s){return void 0===t&&(t=1),void 0===r&&(r=1),void 0===n&&(n=0),void 0===i&&(i=0),void 0===o&&(o=0),void 0===s&&(s=0),new c(e,t-1,r,n,i,o,s)},DateWrapper.fromISOString=function(e){return new c(e)},DateWrapper.fromMillis=function(e){return new c(e)},DateWrapper.toMillis=function(e){return e.getTime()},DateWrapper.now=function(){return new c},DateWrapper.toJson=function(e){return e.toJSON()},DateWrapper}(),m=l.Map,y=l.Set,v=(function(){try{if(1===new m([[1,2]]).size)return function(e){return new m(e)}}catch(e){}return function(e){for(var t=new m,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&&(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 E(e,s,l)},WebAnimationsDriver}(),P=48,A=57,x=46,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 __)},M=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},HammerGesturesPlugin.decorators=[{type:n.Injectable}],HammerGesturesPlugin.ctorParameters=[{type:_e,decorators:[{type:n.Inject,args:[ge]}]}],HammerGesturesPlugin}(ye),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=["alt","control","meta","shift"],Ee={alt:function(e){return e.altKey},control:function(e){return e.ctrlKey},meta:function(e){return e.metaKey},shift:function(e){return e.shiftKey}},Se=function(e){function KeyEventsPlugin(){e.call(this)}return we(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,v.get(n,"fullKey"),r,this.manager.getZone());return this.manager.getZone().runOutsideAngular(function(){return getDOM().onAndCancel(e,v.get(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(Ce.forEach(function(e){g.contains(t,e)&&(g.remove(t,e),i+=e+".")}),i+=n,0!=t.length||0===n.length)return null;var o=v.create();return v.set(o,"domEventName",r),v.set(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"),Ce.forEach(function(n){if(n!=r){var i=v.get(Ee,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}(G),Pe=/^(?:(?:https?|mailto|ftp|tel|file):|[^&:\/?#]*(?:[\/?#]|$))/gi,Ae=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+\/]+=*$/i,xe=null,Te=null,Me=tagSet("area,br,col,hr,img,wbr"),Ie=tagSet("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),De=tagSet("rp,rt"),Ne=merge(De,Ie),Ve=merge(Ie,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")),Oe=merge(De,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")),ke=merge(Me,Ve,Oe,Ne),Re=tagSet("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),Le=tagSet("srcset"),Fe=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"),je=merge(Re,Le,Fe),Be=function(){function SanitizingHtmlSerializer(){this.sanitizedSomething=!1,this.buf=[]}return SanitizingHtmlSerializer.prototype.sanitizeChildren=function(e){for(var t=e.firstChild;t;)if(Te.isElementNode(t)?this.startElement(t):Te.isTextNode(t)?this.chars(Te.nodeValue(t)):this.sanitizedSomething=!0,Te.firstChild(t))t=Te.firstChild(t);else for(;t;){if(Te.isElementNode(t)&&this.endElement(t),Te.nextSibling(t)){t=Te.nextSibling(t);break}t=Te.parentElement(t)}return this.buf.join("")},SanitizingHtmlSerializer.prototype.startElement=function(e){var t=this,r=Te.nodeName(e).toLowerCase();return ke.hasOwnProperty(r)?(this.buf.push("<"),this.buf.push(r),Te.attributeMap(e).forEach(function(e,r){var n=r.toLowerCase();return je.hasOwnProperty(n)?(Re[n]&&(e=sanitizeUrl(e)),Le[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=Te.nodeName(e).toLowerCase();ke.hasOwnProperty(t)&&!Me.hasOwnProperty(t)&&(this.buf.push(""))},SanitizingHtmlSerializer.prototype.chars=function(e){this.buf.push(encodeEntities(e))},SanitizingHtmlSerializer}(),We=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Ue=/([^\#-~ |!])/g,He="[-,.\"'%_!# a-zA-Z0-9]+",ze="(?:matrix|translate|scale|rotate|skew|perspective)(?:X|Y|3d)?",Ge="(?:rgb|hsl)a?",qe="\\([-0-9.%, a-zA-Z]+\\)",Ke=new RegExp("^("+He+"|(?:"+ze+"|"+Ge+")"+qe+")$","g"),Qe=/^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 __)},Xe=function(){function DomSanitizer(){}return DomSanitizer}(),$e=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 Ye?t.changingThisBreaksApplicationSecurity:(this.checkNotSafeValue(t,"HTML"),sanitizeHtml(String(t)));case n.SecurityContext.STYLE:return t instanceof et?t.changingThisBreaksApplicationSecurity:(this.checkNotSafeValue(t,"Style"),sanitizeStyle(t));case n.SecurityContext.SCRIPT:if(t instanceof tt)return t.changingThisBreaksApplicationSecurity;throw this.checkNotSafeValue(t,"Script"),new Error("unsafe value used in a script context");case n.SecurityContext.URL:return t instanceof nt||t instanceof rt?t.changingThisBreaksApplicationSecurity:(this.checkNotSafeValue(t,"URL"),sanitizeUrl(String(t)));case n.SecurityContext.RESOURCE_URL:if(t instanceof nt)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 Je)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 Ye(e)},DomSanitizerImpl.prototype.bypassSecurityTrustStyle=function(e){return new et(e)},DomSanitizerImpl.prototype.bypassSecurityTrustScript=function(e){return new tt(e)},DomSanitizerImpl.prototype.bypassSecurityTrustUrl=function(e){return new rt(e)},DomSanitizerImpl.prototype.bypassSecurityTrustResourceUrl=function(e){return new nt(e)},DomSanitizerImpl.decorators=[{type:n.Injectable}],DomSanitizerImpl.ctorParameters=[],DomSanitizerImpl}(Xe),Je=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}(),Ye=function(e){function SafeHtmlImpl(){e.apply(this,arguments)}return Ze(SafeHtmlImpl,e),SafeHtmlImpl.prototype.getTypeName=function(){return"HTML"},SafeHtmlImpl}(Je),et=function(e){function SafeStyleImpl(){e.apply(this,arguments)}return Ze(SafeStyleImpl,e),SafeStyleImpl.prototype.getTypeName=function(){return"Style"},SafeStyleImpl}(Je),tt=function(e){function SafeScriptImpl(){e.apply(this,arguments)}return Ze(SafeScriptImpl,e),SafeScriptImpl.prototype.getTypeName=function(){return"Script"},SafeScriptImpl}(Je),rt=function(e){function SafeUrlImpl(){e.apply(this,arguments)}return Ze(SafeUrlImpl,e),SafeUrlImpl.prototype.getTypeName=function(){return"URL"},SafeUrlImpl}(Je),nt=function(e){function SafeResourceUrlImpl(){e.apply(this,arguments)}return Ze(SafeResourceUrlImpl,e),SafeResourceUrlImpl.prototype.getTypeName=function(){return"ResourceURL"},SafeResourceUrlImpl}(Je),it=[{provide:n.PLATFORM_INITIALIZER,useValue:initDomAdapter,multi:!0},{provide:r.PlatformLocation,useClass:j}],ot=[{provide:n.Sanitizer,useExisting:Xe},{provide:Xe,useClass:$e}],st=n.createPlatformFactory(n.platformCore,"browser",it),at=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:[ot,{provide:n.ErrorHandler,useFactory:errorHandler,deps:[]},{provide:U,useFactory:_document,deps:[]},{provide:H,useClass:fe,multi:!0},{provide:H,useClass:Se,multi:!0},{provide:H,useClass:be,multi:!0},{provide:ge,useClass:_e},{provide:Y,useClass:ee},{provide:n.RootRenderer,useExisting:Y},{provide:K,useExisting:Q},{provide:u,useFactory:_resolveDefaultAnimationDriver},Q,n.Testability,z,pe,W],exports:[r.CommonModule,n.ApplicationModule]}]}],BrowserModule.ctorParameters=[{type:BrowserModule,decorators:[{type:n.Optional},{type:n.SkipSelf}]}],BrowserModule}(),ut="undefined"!=typeof window&&window||{},lt=function(){function ChangeDetectionPerfRecord(e,t){this.msPerTick=e,this.numTicks=t}return ChangeDetectionPerfRecord}(),ct=function(){function AngularTools(e){this.profiler=new pt(e)}return AngularTools}(),pt=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(ut.console.profile);t&&n&&ut.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&&ut.console.profileEnd(r);var a=(s-i)/o;return ut.console.log("ran "+o+" change detection cycles"),ut.console.log(h.toFixed(a,2)+" ms per check"),new lt(a,o)},AngularProfiler}(),ht=l,ft=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}(),dt={BrowserPlatformLocation:j,DomAdapter:C,BrowserDomAdapter:k,BrowserGetTestability:B,getDOM:getDOM,setRootDomAdapter:setRootDomAdapter,DomRootRenderer_:ee,DomRootRenderer:Y,DomSharedStylesHost:Q,SharedStylesHost:K,ELEMENT_PROBE_PROVIDERS:pe,DomEventsPlugin:fe,KeyEventsPlugin:Se,HammerGesturesPlugin:be,initDomAdapter:initDomAdapter,INTERNAL_BROWSER_PLATFORM_PROVIDERS:it,BROWSER_SANITIZATION_PROVIDERS:ot};t.BrowserModule=at,t.platformBrowser=st,t.Title=W,t.disableDebugTools=disableDebugTools,t.enableDebugTools=enableDebugTools,t.AnimationDriver=u,t.By=ft,t.NgProbeToken=ce,t.DOCUMENT=U,t.EVENT_MANAGER_PLUGINS=H,t.EventManager=z,t.HAMMER_GESTURE_CONFIG=ge,t.HammerGestureConfig=_e,t.DomSanitizer=Xe,t.__platform_browser_private__=dt})}).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