@angular/compiler
Version:
Angular - the compiler library
49 lines (47 loc) • 547 kB
JavaScript
/**
* @license Angular v11.0.1
* (c) 2010-2020 Google LLC. https://angular.io/
* License: MIT
*/
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define("@angular/compiler",["exports"],t):t(((e=e||self).ng=e.ng||{},e.ng.compiler={}))}(this,(function(e){"use strict";
/*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */var t,n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function r(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}function i(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function o(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return s}function s(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(o(arguments[t]));return e}function a(e){if(":"!=e[0])return[null,e];var t=e.indexOf(":",1);if(-1==t)throw new Error('Unsupported format "'+e+'" expecting ":namespace:name"');return[e.slice(1,t),e.slice(t+1)]}function u(e){return"ng-container"===a(e)[1]}function p(e){return"ng-content"===a(e)[1]}function l(e){return"ng-template"===a(e)[1]}function c(e){return null===e?null:a(e)[0]}function h(e,t){return e?":"+e+":"+t:t}(
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
t=e.TagContentType||(e.TagContentType={}))[t.RAW_TEXT=0]="RAW_TEXT",t[t.ESCAPABLE_RAW_TEXT=1]="ESCAPABLE_RAW_TEXT",t[t.PARSABLE_DATA=2]="PARSABLE_DATA";var f,d,v={Aacute:"Á",aacute:"á",Acirc:"Â",acirc:"â",acute:"´",AElig:"Æ",aelig:"æ",Agrave:"À",agrave:"à",alefsym:"ℵ",Alpha:"Α",alpha:"α",amp:"&",and:"∧",ang:"∠",apos:"'",Aring:"Å",aring:"å",asymp:"≈",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",bdquo:"„",Beta:"Β",beta:"β",brvbar:"¦",bull:"•",cap:"∩",Ccedil:"Ç",ccedil:"ç",cedil:"¸",cent:"¢",Chi:"Χ",chi:"χ",circ:"ˆ",clubs:"♣",cong:"≅",copy:"©",crarr:"↵",cup:"∪",curren:"¤",dagger:"†",Dagger:"‡",darr:"↓",dArr:"⇓",deg:"°",Delta:"Δ",delta:"δ",diams:"♦",divide:"÷",Eacute:"É",eacute:"é",Ecirc:"Ê",ecirc:"ê",Egrave:"È",egrave:"è",empty:"∅",emsp:" ",ensp:" ",Epsilon:"Ε",epsilon:"ε",equiv:"≡",Eta:"Η",eta:"η",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",euro:"€",exist:"∃",fnof:"ƒ",forall:"∀",frac12:"½",frac14:"¼",frac34:"¾",frasl:"⁄",Gamma:"Γ",gamma:"γ",ge:"≥",gt:">",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:"",ngsp:""},m=function(){function t(t){var n=this,r=void 0===t?{}:t,i=r.closedByChildren,o=r.implicitNamespacePrefix,s=r.contentType,a=void 0===s?e.TagContentType.PARSABLE_DATA:s,u=r.closedByParent,p=void 0!==u&&u,l=r.isVoid,c=void 0!==l&&l,h=r.ignoreFirstLf,f=void 0!==h&&h,d=r.preventNamespaceInheritance,v=void 0!==d&&d;this.closedByChildren={},this.closedByParent=!1,this.canSelfClose=!1,i&&i.length>0&&i.forEach((function(e){return n.closedByChildren[e]=!0})),this.isVoid=c,this.closedByParent=p||c,this.implicitNamespacePrefix=o||null,this.contentType=a,this.ignoreFirstLf=f,this.preventNamespaceInheritance=v}return t.prototype.isClosedByChild=function(e){return this.isVoid||e.toLowerCase()in this.closedByChildren},t}();function y(t){var n,r;return d||(f=new m,d={base:new m({isVoid:!0}),meta:new m({isVoid:!0}),area:new m({isVoid:!0}),embed:new m({isVoid:!0}),link:new m({isVoid:!0}),img:new m({isVoid:!0}),input:new m({isVoid:!0}),param:new m({isVoid:!0}),hr:new m({isVoid:!0}),br:new m({isVoid:!0}),source:new m({isVoid:!0}),track:new m({isVoid:!0}),wbr:new m({isVoid:!0}),p:new m({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 m({closedByChildren:["tbody","tfoot"]}),tbody:new m({closedByChildren:["tbody","tfoot"],closedByParent:!0}),tfoot:new m({closedByChildren:["tbody"],closedByParent:!0}),tr:new m({closedByChildren:["tr"],closedByParent:!0}),td:new m({closedByChildren:["td","th"],closedByParent:!0}),th:new m({closedByChildren:["td","th"],closedByParent:!0}),col:new m({isVoid:!0}),svg:new m({implicitNamespacePrefix:"svg"}),foreignObject:new m({implicitNamespacePrefix:"svg",preventNamespaceInheritance:!0}),math:new m({implicitNamespacePrefix:"math"}),li:new m({closedByChildren:["li"],closedByParent:!0}),dt:new m({closedByChildren:["dt","dd"]}),dd:new m({closedByChildren:["dt","dd"],closedByParent:!0}),rb:new m({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),rt:new m({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),rtc:new m({closedByChildren:["rb","rtc","rp"],closedByParent:!0}),rp:new m({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),optgroup:new m({closedByChildren:["optgroup"],closedByParent:!0}),option:new m({closedByChildren:["option","optgroup"],closedByParent:!0}),pre:new m({ignoreFirstLf:!0}),listing:new m({ignoreFirstLf:!0}),style:new m({contentType:e.TagContentType.RAW_TEXT}),script:new m({contentType:e.TagContentType.RAW_TEXT}),title:new m({contentType:e.TagContentType.ESCAPABLE_RAW_TEXT}),textarea:new m({contentType:e.TagContentType.ESCAPABLE_RAW_TEXT,ignoreFirstLf:!0})}),null!==(r=null!==(n=d[t])&&void 0!==n?n:d[t.toLowerCase()])&&void 0!==r?r:f}
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/var g,_,E=new RegExp("(\\:not\\()|(([\\.\\#]?)[-\\w]+)|(?:\\[([-.\\w*]+)(?:=([\"']?)([^\\]\"']*)\\5)?\\])|(\\))|(\\s*,\\s*)","g"),S=function(){function e(){this.element=null,this.classNames=[],this.attrs=[],this.notSelectors=[]}return e.parse=function(t){var n,r=[],i=function(e,t){t.notSelectors.length>0&&!t.element&&0==t.classNames.length&&0==t.attrs.length&&(t.element="*"),e.push(t)},o=new e,s=o,a=!1;for(E.lastIndex=0;n=E.exec(t);){if(n[1]){if(a)throw new Error("Nesting :not in a selector is not allowed");a=!0,s=new e,o.notSelectors.push(s)}var u=n[2];if(u){var p=n[3];"#"===p?s.addAttribute("id",u.substr(1)):"."===p?s.addClassName(u.substr(1)):s.setElement(u)}var l=n[4];if(l&&s.addAttribute(l,n[6]),n[7]&&(a=!1,s=o),n[8]){if(a)throw new Error("Multiple selectors in :not are not supported");i(r,o),o=s=new e}}return i(r,o),r},e.prototype.isElementSelector=function(){return this.hasElementSelector()&&0==this.classNames.length&&0==this.attrs.length&&0===this.notSelectors.length},e.prototype.hasElementSelector=function(){return!!this.element},e.prototype.setElement=function(e){void 0===e&&(e=null),this.element=e},e.prototype.getMatchingElementTemplate=function(){for(var e=this.element||"div",t=this.classNames.length>0?' class="'+this.classNames.join(" ")+'"':"",n="",r=0;r<this.attrs.length;r+=2)n+=" "+this.attrs[r]+(""!==this.attrs[r+1]?'="'+this.attrs[r+1]+'"':"");return y(e).isVoid?"<"+e+t+n+"/>":"<"+e+t+n+"></"+e+">"},e.prototype.getAttrs=function(){var e=[];return this.classNames.length>0&&e.push("class",this.classNames.join(" ")),e.concat(this.attrs)},e.prototype.addAttribute=function(e,t){void 0===t&&(t=""),this.attrs.push(e,t&&t.toLowerCase()||"")},e.prototype.addClassName=function(e){this.classNames.push(e.toLowerCase())},e.prototype.toString=function(){var e=this.element||"";if(this.classNames&&this.classNames.forEach((function(t){return e+="."+t})),this.attrs)for(var t=0;t<this.attrs.length;t+=2){var n=this.attrs[t+1];e+="["+this.attrs[t]+(n?"="+n:"")+"]"}return this.notSelectors.forEach((function(t){return e+=":not("+t+")"})),e},e}(),x=function(){function e(){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 e.createNotMatcher=function(t){var n=new e;return n.addSelectables(t,null),n},e.prototype.addSelectables=function(e,t){var n=null;e.length>1&&(n=new w(e),this._listContexts.push(n));for(var r=0;r<e.length;r++)this._addSelectable(e[r],t,n)},e.prototype._addSelectable=function(e,t,n){var r=this,i=e.element,o=e.classNames,s=e.attrs,a=new C(e,t,n);if(i&&(0===s.length&&0===o.length?this._addTerminal(r._elementMap,i,a):r=this._addPartial(r._elementPartialMap,i)),o)for(var u=0;u<o.length;u++){var p=o[u];0===s.length&&u===o.length-1?this._addTerminal(r._classMap,p,a):r=this._addPartial(r._classPartialMap,p)}if(s)for(u=0;u<s.length;u+=2){var l=s[u],c=s[u+1];if(u===s.length-2){var h=r._attrValueMap,f=h.get(l);f||(f=new Map,h.set(l,f)),this._addTerminal(f,c,a)}else{var d=r._attrValuePartialMap,v=d.get(l);v||(v=new Map,d.set(l,v)),r=this._addPartial(v,c)}}},e.prototype._addTerminal=function(e,t,n){var r=e.get(t);r||e.set(t,r=[]),r.push(n)},e.prototype._addPartial=function(t,n){var r=t.get(n);return r||(r=new e,t.set(n,r)),r},e.prototype.match=function(e,t){for(var n=!1,r=e.element,i=e.classNames,o=e.attrs,s=0;s<this._listContexts.length;s++)this._listContexts[s].alreadyMatched=!1;if(n=this._matchTerminal(this._elementMap,r,e,t)||n,n=this._matchPartial(this._elementPartialMap,r,e,t)||n,i)for(s=0;s<i.length;s++){var a=i[s];n=this._matchTerminal(this._classMap,a,e,t)||n,n=this._matchPartial(this._classPartialMap,a,e,t)||n}if(o)for(s=0;s<o.length;s+=2){var u=o[s],p=o[s+1],l=this._attrValueMap.get(u);p&&(n=this._matchTerminal(l,"",e,t)||n),n=this._matchTerminal(l,p,e,t)||n;var c=this._attrValuePartialMap.get(u);p&&(n=this._matchPartial(c,"",e,t)||n),n=this._matchPartial(c,p,e,t)||n}return n},e.prototype._matchTerminal=function(e,t,n,r){if(!e||"string"!=typeof t)return!1;var i=e.get(t)||[],o=e.get("*");if(o&&(i=i.concat(o)),0===i.length)return!1;for(var s=!1,a=0;a<i.length;a++)s=i[a].finalize(n,r)||s;return s},e.prototype._matchPartial=function(e,t,n,r){if(!e||"string"!=typeof t)return!1;var i=e.get(t);return!!i&&i.match(n,r)},e}(),w=function w(e){this.selectors=e,this.alreadyMatched=!1},C=function(){function e(e,t,n){this.selector=e,this.cbContext=t,this.listContext=n,this.notSelectors=e.notSelectors}return e.prototype.finalize=function(e,t){var n=!0;return!(this.notSelectors.length>0)||this.listContext&&this.listContext.alreadyMatched||(n=!x.createNotMatcher(this.notSelectors).match(e,null)),!n||!t||this.listContext&&this.listContext.alreadyMatched||(this.listContext&&(this.listContext.alreadyMatched=!0),t(this.selector,this.cbContext)),n},e}(),b=$("Inject",(function(e){return{token:e}})),T=$("InjectionToken",(function(e){return{_desc:e,"ɵprov":void 0}})),P=$("Attribute",(function(e){return{attributeName:e}})),M=$("ContentChildren",(function(e,t){return void 0===t&&(t={}),Object.assign({selector:e,first:!1,isViewQuery:!1,descendants:!1},t)})),N=$("ContentChild",(function(e,t){return void 0===t&&(t={}),Object.assign({selector:e,first:!0,isViewQuery:!1,descendants:!0},t)})),A=$("ViewChildren",(function(e,t){return void 0===t&&(t={}),Object.assign({selector:e,first:!1,isViewQuery:!0,descendants:!0},t)})),I=$("ViewChild",(function(e,t){return Object.assign({selector:e,first:!0,isViewQuery:!0,descendants:!0},t)})),k=$("Directive",(function(e){return void 0===e&&(e={}),e}));!function(e){e[e.Emulated=0]="Emulated",e[e.None=2]="None",e[e.ShadowDom=3]="ShadowDom"}(g||(g={})),function(e){e[e.OnPush=0]="OnPush",e[e.Default=1]="Default"}(_||(_={}));var O,R,D=$("Component",(function(e){return void 0===e&&(e={}),Object.assign({changeDetection:_.Default},e)})),F=$("Pipe",(function(e){return Object.assign({pure:!0},e)})),L=$("Input",(function(e){return{bindingPropertyName:e}})),B=$("Output",(function(e){return{bindingPropertyName:e}})),V=$("HostBinding",(function(e){return{hostPropertyName:e}})),j=$("HostListener",(function(e,t){return{eventName:e,args:t}})),U=$("NgModule",(function(e){return e})),H=$("Injectable",(function(e){return void 0===e&&(e={}),e})),q={name:"custom-elements"},W={name:"no-errors-schema"},z=$("Optional"),K=$("Self"),Q=$("SkipSelf"),X=$("Host"),G=Function;function $(e,t){function n(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var i=t?t.apply(void 0,s(n)):{};return Object.assign({ngMetadataName:e},i)}return n.isTypeOf=function(t){return t&&t.ngMetadataName===e},n.ngMetadataName=e,n}function Y(e){var t=function n(e){var t=e.classNames&&e.classNames.length?s([8],e.classNames):[];return s([e.element&&"*"!==e.element?e.element:""],e.attrs,t)}(e),r=e.notSelectors&&e.notSelectors.length?e.notSelectors.map((function(e){return function t(e){var t=e.classNames&&e.classNames.length?s([8],e.classNames):[];return e.element?s([5,e.element],e.attrs,t):e.attrs.length?s([3],e.attrs,t):e.classNames&&e.classNames.length?s([9],e.classNames):[]}(e)})):[];return t.concat.apply(t,s(r))}function J(e){return e?S.parse(e).map(Y):[]}!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"}(O||(O={})),function(e){e[e.Error=0]="Error",e[e.Warning=1]="Warning",e[e.Ignore=2]="Ignore"}(R||(R={}));var Z,ee=Object.freeze({__proto__:null,createInject:b,createInjectionToken:T,createAttribute:P,createContentChildren:M,createContentChild:N,createViewChildren:A,createViewChild:I,createDirective:k,get ViewEncapsulation(){return g},get ChangeDetectionStrategy(){return _},createComponent:D,createPipe:F,createInput:L,createOutput:B,createHostBinding:V,createHostListener:j,createNgModule:U,createInjectable:H,CUSTOM_ELEMENTS_SCHEMA:q,NO_ERRORS_SCHEMA:W,createOptional:z,createSelf:K,createSkipSelf:Q,createHost:X,Type:G,get SecurityContext(){return O},get MissingTranslationStrategy(){return R},parseSelectorToR3Selector:J});
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/!function(e){e[e.Const=0]="Const"}(Z||(Z={}));var te,ne=function(){function e(e){void 0===e&&(e=[]),this.modifiers=e}return e.prototype.hasModifier=function(e){return-1!==this.modifiers.indexOf(e)},e}();(te=e.BuiltinTypeName||(e.BuiltinTypeName={}))[te.Dynamic=0]="Dynamic",te[te.Bool=1]="Bool",te[te.String=2]="String",te[te.Int=3]="Int",te[te.Number=4]="Number",te[te.Function=5]="Function",te[te.Inferred=6]="Inferred",te[te.None=7]="None";var re,ie,oe=function(e){function t(t,n){var r=e.call(this,n)||this;return r.name=t,r}return r(t,e),t.prototype.visitType=function(e,t){return e.visitBuiltinType(this,t)},t}(ne),se=function(e){function t(t,n,r){void 0===r&&(r=null);var i=e.call(this,n)||this;return i.value=t,i.typeParams=r,i}return r(t,e),t.prototype.visitType=function(e,t){return e.visitExpressionType(this,t)},t}(ne),ae=function(e){function t(t,n){var r=e.call(this,n)||this;return r.of=t,r}return r(t,e),t.prototype.visitType=function(e,t){return e.visitArrayType(this,t)},t}(ne),ue=function(e){function t(t,n){var r=e.call(this,n)||this;return r.valueType=t||null,r}return r(t,e),t.prototype.visitType=function(e,t){return e.visitMapType(this,t)},t}(ne),pe=new oe(e.BuiltinTypeName.Dynamic),le=new oe(e.BuiltinTypeName.Inferred),ce=new oe(e.BuiltinTypeName.Bool),he=(new oe(e.BuiltinTypeName.Int),new oe(e.BuiltinTypeName.Number)),fe=new oe(e.BuiltinTypeName.String),de=(new oe(e.BuiltinTypeName.Function),new oe(e.BuiltinTypeName.None));function ve(e,t){return null==e||null==t?e==t:e.isEquivalent(t)}function me(e,t){var n=e.length;if(n!==t.length)return!1;for(var r=0;r<n;r++)if(!e[r].isEquivalent(t[r]))return!1;return!0}(re=e.UnaryOperator||(e.UnaryOperator={}))[re.Minus=0]="Minus",re[re.Plus=1]="Plus",(ie=e.BinaryOperator||(e.BinaryOperator={}))[ie.Equals=0]="Equals",ie[ie.NotEquals=1]="NotEquals",ie[ie.Identical=2]="Identical",ie[ie.NotIdentical=3]="NotIdentical",ie[ie.Minus=4]="Minus",ie[ie.Plus=5]="Plus",ie[ie.Divide=6]="Divide",ie[ie.Multiply=7]="Multiply",ie[ie.Modulo=8]="Modulo",ie[ie.And=9]="And",ie[ie.Or=10]="Or",ie[ie.BitwiseAnd=11]="BitwiseAnd",ie[ie.Lower=12]="Lower",ie[ie.LowerEquals=13]="LowerEquals",ie[ie.Bigger=14]="Bigger",ie[ie.BiggerEquals=15]="BiggerEquals";var ye,ge=function(){function t(e,t){this.type=e||null,this.sourceSpan=t||null}return t.prototype.prop=function(e,t){return new Ge(this,e,null,t)},t.prototype.key=function(e,t,n){return new $e(this,e,t,n)},t.prototype.callMethod=function(e,t,n){return new Pe(this,e,t,null,n)},t.prototype.callFn=function(e,t,n){return new Me(this,e,null,t,n)},t.prototype.instantiate=function(e,t,n){return new Ne(this,e,t,n)},t.prototype.conditional=function(e,t,n){return void 0===t&&(t=null),new Ue(this,e,t,null,n)},t.prototype.equals=function(t,n){return new Xe(e.BinaryOperator.Equals,this,t,null,n)},t.prototype.notEquals=function(t,n){return new Xe(e.BinaryOperator.NotEquals,this,t,null,n)},t.prototype.identical=function(t,n){return new Xe(e.BinaryOperator.Identical,this,t,null,n)},t.prototype.notIdentical=function(t,n){return new Xe(e.BinaryOperator.NotIdentical,this,t,null,n)},t.prototype.minus=function(t,n){return new Xe(e.BinaryOperator.Minus,this,t,null,n)},t.prototype.plus=function(t,n){return new Xe(e.BinaryOperator.Plus,this,t,null,n)},t.prototype.divide=function(t,n){return new Xe(e.BinaryOperator.Divide,this,t,null,n)},t.prototype.multiply=function(t,n){return new Xe(e.BinaryOperator.Multiply,this,t,null,n)},t.prototype.modulo=function(t,n){return new Xe(e.BinaryOperator.Modulo,this,t,null,n)},t.prototype.and=function(t,n){return new Xe(e.BinaryOperator.And,this,t,null,n)},t.prototype.bitwiseAnd=function(t,n,r){return void 0===r&&(r=!0),new Xe(e.BinaryOperator.BitwiseAnd,this,t,null,n,r)},t.prototype.or=function(t,n){return new Xe(e.BinaryOperator.Or,this,t,null,n)},t.prototype.lower=function(t,n){return new Xe(e.BinaryOperator.Lower,this,t,null,n)},t.prototype.lowerEquals=function(t,n){return new Xe(e.BinaryOperator.LowerEquals,this,t,null,n)},t.prototype.bigger=function(t,n){return new Xe(e.BinaryOperator.Bigger,this,t,null,n)},t.prototype.biggerEquals=function(t,n){return new Xe(e.BinaryOperator.BiggerEquals,this,t,null,n)},t.prototype.isBlank=function(e){return this.equals(nt,e)},t.prototype.cast=function(e,t){return new We(this,e,t)},t.prototype.toStmt=function(){return new ut(this,null)},t}();(ye=e.BuiltinVar||(e.BuiltinVar={}))[ye.This=0]="This",ye[ye.Super=1]="Super",ye[ye.CatchError=2]="CatchError",ye[ye.CatchStack=3]="CatchStack";var _e,Ee=function(e){function t(t,n,r){var i=e.call(this,n,r)||this;return"string"==typeof t?(i.name=t,i.builtin=null):(i.name=null,i.builtin=t),i}return r(t,e),t.prototype.isEquivalent=function(e){return e instanceof t&&this.name===e.name&&this.builtin===e.builtin},t.prototype.isConstant=function(){return!1},t.prototype.visitExpression=function(e,t){return e.visitReadVarExpr(this,t)},t.prototype.set=function(e){if(!this.name)throw new Error("Built in variable "+this.builtin+" can not be assigned to.");return new we(this.name,e,null,this.sourceSpan)},t}(ge),Se=function(e){function t(t,n,r){var i=e.call(this,n,r)||this;return i.expr=t,i}return r(t,e),t.prototype.visitExpression=function(e,t){return e.visitTypeofExpr(this,t)},t.prototype.isEquivalent=function(e){return e instanceof t&&e.expr.isEquivalent(this.expr)},t.prototype.isConstant=function(){return this.expr.isConstant()},t}(ge),xe=function(e){function t(t,n,r){var i=e.call(this,n,r)||this;return i.node=t,i}return r(t,e),t.prototype.isEquivalent=function(e){return e instanceof t&&this.node===e.node},t.prototype.isConstant=function(){return!1},t.prototype.visitExpression=function(e,t){return e.visitWrappedNodeExpr(this,t)},t}(ge),we=function(t){function n(e,n,r,i){var o=t.call(this,r||n.type,i)||this;return o.name=e,o.value=n,o}return r(n,t),n.prototype.isEquivalent=function(e){return e instanceof n&&this.name===e.name&&this.value.isEquivalent(e.value)},n.prototype.isConstant=function(){return!1},n.prototype.visitExpression=function(e,t){return e.visitWriteVarExpr(this,t)},n.prototype.toDeclStmt=function(e,t){return new st(this.name,this.value,e,t,this.sourceSpan)},n.prototype.toConstDecl=function(){return this.toDeclStmt(le,[e.StmtModifier.Final])},n}(ge),Ce=function(e){function t(t,n,r,i,o){var s=e.call(this,i||r.type,o)||this;return s.receiver=t,s.index=n,s.value=r,s}return r(t,e),t.prototype.isEquivalent=function(e){return e instanceof t&&this.receiver.isEquivalent(e.receiver)&&this.index.isEquivalent(e.index)&&this.value.isEquivalent(e.value)},t.prototype.isConstant=function(){return!1},t.prototype.visitExpression=function(e,t){return e.visitWriteKeyExpr(this,t)},t}(ge),be=function(e){function t(t,n,r,i,o){var s=e.call(this,i||r.type,o)||this;return s.receiver=t,s.name=n,s.value=r,s}return r(t,e),t.prototype.isEquivalent=function(e){return e instanceof t&&this.receiver.isEquivalent(e.receiver)&&this.name===e.name&&this.value.isEquivalent(e.value)},t.prototype.isConstant=function(){return!1},t.prototype.visitExpression=function(e,t){return e.visitWritePropExpr(this,t)},t}(ge);(_e=e.BuiltinMethod||(e.BuiltinMethod={}))[_e.ConcatArray=0]="ConcatArray",_e[_e.SubscribeObservable=1]="SubscribeObservable",_e[_e.Bind=2]="Bind";var Te,Pe=function(e){function t(t,n,r,i,o){var s=e.call(this,i,o)||this;return s.receiver=t,s.args=r,"string"==typeof n?(s.name=n,s.builtin=null):(s.name=null,s.builtin=n),s}return r(t,e),t.prototype.isEquivalent=function(e){return e instanceof t&&this.receiver.isEquivalent(e.receiver)&&this.name===e.name&&this.builtin===e.builtin&&me(this.args,e.args)},t.prototype.isConstant=function(){return!1},t.prototype.visitExpression=function(e,t){return e.visitInvokeMethodExpr(this,t)},t}(ge),Me=function(e){function t(t,n,r,i,o){void 0===o&&(o=!1);var s=e.call(this,r,i)||this;return s.fn=t,s.args=n,s.pure=o,s}return r(t,e),t.prototype.isEquivalent=function(e){return e instanceof t&&this.fn.isEquivalent(e.fn)&&me(this.args,e.args)&&this.pure===e.pure},t.prototype.isConstant=function(){return!1},t.prototype.visitExpression=function(e,t){return e.visitInvokeFunctionExpr(this,t)},t}(ge),Ne=function(e){function t(t,n,r,i){var o=e.call(this,r,i)||this;return o.classExpr=t,o.args=n,o}return r(t,e),t.prototype.isEquivalent=function(e){return e instanceof t&&this.classExpr.isEquivalent(e.classExpr)&&me(this.args,e.args)},t.prototype.isConstant=function(){return!1},t.prototype.visitExpression=function(e,t){return e.visitInstantiateExpr(this,t)},t}(ge),Ae=function(e){function t(t,n,r){var i=e.call(this,n,r)||this;return i.value=t,i}return r(t,e),t.prototype.isEquivalent=function(e){return e instanceof t&&this.value===e.value},t.prototype.isConstant=function(){return!0},t.prototype.visitExpression=function(e,t){return e.visitLiteralExpr(this,t)},t}(ge),Ie=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t}(Te=function Te(e,t){this.text=e,this.sourceSpan=t}),ke=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t}(Te),Oe=function(e){function t(t,n,r,i,o){var s=e.call(this,fe,o)||this;return s.metaBlock=t,s.messageParts=n,s.placeHolderNames=r,s.expressions=i,s}return r(t,e),t.prototype.isEquivalent=function(e){return!1},t.prototype.isConstant=function(){return!1},t.prototype.visitExpression=function(e,t){return e.visitLocalizedString(this,t)},t.prototype.serializeI18nHead=function(){var e=this.metaBlock.description||"";return this.metaBlock.meaning&&(e=this.metaBlock.meaning+"|"+e),this.metaBlock.customId&&(e=e+"@@"+this.metaBlock.customId),this.metaBlock.legacyIds&&this.metaBlock.legacyIds.forEach((function(t){e=e+"␟"+t})),Le(e,this.messageParts[0].text,this.getMessagePartSourceSpan(0))},t.prototype.getMessagePartSourceSpan=function(e){var t,n;return null!==(n=null===(t=this.messageParts[e])||void 0===t?void 0:t.sourceSpan)&&void 0!==n?n:this.sourceSpan},t.prototype.getPlaceholderSourceSpan=function(e){var t,n,r,i;return null!==(i=null!==(n=null===(t=this.placeHolderNames[e])||void 0===t?void 0:t.sourceSpan)&&void 0!==n?n:null===(r=this.expressions[e])||void 0===r?void 0:r.sourceSpan)&&void 0!==i?i:this.sourceSpan},t.prototype.serializeI18nTemplatePart=function(e){return Le(this.placeHolderNames[e-1].text,this.messageParts[e].text,this.getMessagePartSourceSpan(e))},t}(ge),Re=function(e){return e.replace(/\\/g,"\\\\")},De=function(e){return e.replace(/:/g,"\\:")},Fe=function(e){return e.replace(/`/g,"\\`").replace(/\${/g,"$\\{")};function Le(e,t,n){return""===e?{cooked:t,raw:Fe((r=Re(t),r.replace(/^:/,"\\:"))),range:n}:{cooked:":"+e+":"+t,raw:Fe(":"+De(Re(e))+":"+Re(t)),range:n};var r}var Be,Ve=function(e){function t(t,n,r,i){void 0===r&&(r=null);var o=e.call(this,n,i)||this;return o.value=t,o.typeParams=r,o}return r(t,e),t.prototype.isEquivalent=function(e){return e instanceof t&&this.value.name===e.value.name&&this.value.moduleName===e.value.moduleName&&this.value.runtime===e.value.runtime},t.prototype.isConstant=function(){return!1},t.prototype.visitExpression=function(e,t){return e.visitExternalExpr(this,t)},t}(ge),je=function je(e,t,n){this.moduleName=e,this.name=t,this.runtime=n},Ue=function(e){function t(t,n,r,i,o){void 0===r&&(r=null);var s=e.call(this,i||n.type,o)||this;return s.condition=t,s.falseCase=r,s.trueCase=n,s}return r(t,e),t.prototype.isEquivalent=function(e){return e instanceof t&&this.condition.isEquivalent(e.condition)&&this.trueCase.isEquivalent(e.trueCase)&&ve(this.falseCase,e.falseCase)},t.prototype.isConstant=function(){return!1},t.prototype.visitExpression=function(e,t){return e.visitConditionalExpr(this,t)},t}(ge),He=function(e){function t(t,n){var r=e.call(this,ce,n)||this;return r.condition=t,r}return r(t,e),t.prototype.isEquivalent=function(e){return e instanceof t&&this.condition.isEquivalent(e.condition)},t.prototype.isConstant=function(){return!1},t.prototype.visitExpression=function(e,t){return e.visitNotExpr(this,t)},t}(ge),qe=function(e){function t(t,n){var r=e.call(this,t.type,n)||this;return r.condition=t,r}return r(t,e),t.prototype.isEquivalent=function(e){return e instanceof t&&this.condition.isEquivalent(e.condition)},t.prototype.isConstant=function(){return!1},t.prototype.visitExpression=function(e,t){return e.visitAssertNotNullExpr(this,t)},t}(ge),We=function(e){function t(t,n,r){var i=e.call(this,n,r)||this;return i.value=t,i}return r(t,e),t.prototype.isEquivalent=function(e){return e instanceof t&&this.value.isEquivalent(e.value)},t.prototype.isConstant=function(){return!1},t.prototype.visitExpression=function(e,t){return e.visitCastExpr(this,t)},t}(ge),ze=function(){function e(e,t){void 0===t&&(t=null),this.name=e,this.type=t}return e.prototype.isEquivalent=function(e){return this.name===e.name},e}(),Ke=function(e){function t(t,n,r,i,o){var s=e.call(this,r,i)||this;return s.params=t,s.statements=n,s.name=o,s}return r(t,e),t.prototype.isEquivalent=function(e){return e instanceof t&&me(this.params,e.params)&&me(this.statements,e.statements)},t.prototype.isConstant=function(){return!1},t.prototype.visitExpression=function(e,t){return e.visitFunctionExpr(this,t)},t.prototype.toDeclStmt=function(e,t){return new at(e,this.params,this.statements,this.type,t,this.sourceSpan)},t}(ge),Qe=function(e){function t(t,n,r,i,o){void 0===o&&(o=!0);var s=e.call(this,r||he,i)||this;return s.operator=t,s.expr=n,s.parens=o,s}return r(t,e),t.prototype.isEquivalent=function(e){return e instanceof t&&this.operator===e.operator&&this.expr.isEquivalent(e.expr)},t.prototype.isConstant=function(){return!1},t.prototype.visitExpression=function(e,t){return e.visitUnaryOperatorExpr(this,t)},t}(ge),Xe=function(e){function t(t,n,r,i,o,s){void 0===s&&(s=!0);var a=e.call(this,i||n.type,o)||this;return a.operator=t,a.rhs=r,a.parens=s,a.lhs=n,a}return r(t,e),t.prototype.isEquivalent=function(e){return e instanceof t&&this.operator===e.operator&&this.lhs.isEquivalent(e.lhs)&&this.rhs.isEquivalent(e.rhs)},t.prototype.isConstant=function(){return!1},t.prototype.visitExpression=function(e,t){return e.visitBinaryOperatorExpr(this,t)},t}(ge),Ge=function(e){function t(t,n,r,i){var o=e.call(this,r,i)||this;return o.receiver=t,o.name=n,o}return r(t,e),t.prototype.isEquivalent=function(e){return e instanceof t&&this.receiver.isEquivalent(e.receiver)&&this.name===e.name},t.prototype.isConstant=function(){return!1},t.prototype.visitExpression=function(e,t){return e.visitReadPropExpr(this,t)},t.prototype.set=function(e){return new be(this.receiver,this.name,e,null,this.sourceSpan)},t}(ge),$e=function(e){function t(t,n,r,i){var o=e.call(this,r,i)||this;return o.receiver=t,o.index=n,o}return r(t,e),t.prototype.isEquivalent=function(e){return e instanceof t&&this.receiver.isEquivalent(e.receiver)&&this.index.isEquivalent(e.index)},t.prototype.isConstant=function(){return!1},t.prototype.visitExpression=function(e,t){return e.visitReadKeyExpr(this,t)},t.prototype.set=function(e){return new Ce(this.receiver,this.index,e,null,this.sourceSpan)},t}(ge),Ye=function(e){function t(t,n,r){var i=e.call(this,n,r)||this;return i.entries=t,i}return r(t,e),t.prototype.isConstant=function(){return this.entries.every((function(e){return e.isConstant()}))},t.prototype.isEquivalent=function(e){return e instanceof t&&me(this.entries,e.entries)},t.prototype.visitExpression=function(e,t){return e.visitLiteralArrayExpr(this,t)},t}(ge),Je=function(){function e(e,t,n){this.key=e,this.value=t,this.quoted=n}return e.prototype.isEquivalent=function(e){return this.key===e.key&&this.value.isEquivalent(e.value)},e}(),Ze=function(e){function t(t,n,r){var i=e.call(this,n,r)||this;return i.entries=t,i.valueType=null,n&&(i.valueType=n.valueType),i}return r(t,e),t.prototype.isEquivalent=function(e){return e instanceof t&&me(this.entries,e.entries)},t.prototype.isConstant=function(){return this.entries.every((function(e){return e.value.isConstant()}))},t.prototype.visitExpression=function(e,t){return e.visitLiteralMapExpr(this,t)},t}(ge),et=function(e){function t(t,n){var r=e.call(this,t[t.length-1].type,n)||this;return r.parts=t,r}return r(t,e),t.prototype.isEquivalent=function(e){return e instanceof t&&me(this.parts,e.parts)},t.prototype.isConstant=function(){return!1},t.prototype.visitExpression=function(e,t){return e.visitCommaExpr(this,t)},t}(ge),tt=(new Ee(e.BuiltinVar.This,null,null),new Ee(e.BuiltinVar.Super,null,null),new Ee(e.BuiltinVar.CatchError,null,null),new Ee(e.BuiltinVar.CatchStack,null,null),new Ae(null,null,null)),nt=new Ae(null,le,null);(Be=e.StmtModifier||(e.StmtModifier={}))[Be.Final=0]="Final",Be[Be.Private=1]="Private",Be[Be.Exported=2]="Exported",Be[Be.Static=3]="Static";var rt=function(){function e(e,t,n){this.text=e,this.multiline=t,this.trailingNewline=n}return e.prototype.toString=function(){return this.multiline?" "+this.text+" ":this.text},e}(),it=function(e){function t(t){var n=e.call(this,"",!0,!0)||this;return n.tags=t,n}return r(t,e),t.prototype.toString=function(){return function e(t){var n,r;if(0===t.length)return"";if(1===t.length&&t[0].tagName&&!t[0].text)return"*"+Bt(t[0])+" ";var o="*\n";try{for(var s=i(t),a=s.next();!a.done;a=s.next())o+=" *",o+=Bt(a.value).replace(/\n/g,"\n * "),o+="\n"}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}return o+" "}
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/(this.tags)},t}(rt),ot=function(){function e(e,t,n){void 0===e&&(e=[]),void 0===t&&(t=null),this.modifiers=e,this.sourceSpan=t,this.leadingComments=n}return e.prototype.hasModifier=function(e){return-1!==this.modifiers.indexOf(e)},e.prototype.addLeadingComment=function(e){var t;this.leadingComments=null!==(t=this.leadingComments)&&void 0!==t?t:[],this.leadingComments.push(e)},e}(),st=function(e){function t(t,n,r,i,o,s){var a=e.call(this,i,o,s)||this;return a.name=t,a.value=n,a.type=r||n&&n.type||null,a}return r(t,e),t.prototype.isEquivalent=function(e){return e instanceof t&&this.name===e.name&&(this.value?!!e.value&&this.value.isEquivalent(e.value):!e.value)},t.prototype.visitStatement=function(e,t){return e.visitDeclareVarStmt(this,t)},t}(ot),at=function(e){function t(t,n,r,i,o,s,a){var u=e.call(this,o,s,a)||this;return u.name=t,u.params=n,u.statements=r,u.type=i||null,u}return r(t,e),t.prototype.isEquivalent=function(e){return e instanceof t&&me(this.params,e.params)&&me(this.statements,e.statements)},t.prototype.visitStatement=function(e,t){return e.visitDeclareFunctionStmt(this,t)},t}(ot),ut=function(e){function t(t,n,r){var i=e.call(this,[],n,r)||this;return i.expr=t,i}return r(t,e),t.prototype.isEquivalent=function(e){return e instanceof t&&this.expr.isEquivalent(e.expr)},t.prototype.visitStatement=function(e,t){return e.visitExpressionStmt(this,t)},t}(ot),pt=function(e){function t(t,n,r){void 0===n&&(n=null);var i=e.call(this,[],n,r)||this;return i.value=t,i}return r(t,e),t.prototype.isEquivalent=function(e){return e instanceof t&&this.value.isEquivalent(e.value)},t.prototype.visitStatement=function(e,t){return e.visitReturnStmt(this,t)},t}(ot),lt=function(){function e(e,t){void 0===e&&(e=null),void 0===t&&(t=[]),this.type=e,this.modifiers=t}return e.prototype.hasModifier=function(e){return-1!==this.modifiers.indexOf(e)},e}(),ct=function(e){function t(t,n,r,i){var o=e.call(this,n,r)||this;return o.name=t,o.initializer=i,o}return r(t,e),t.prototype.isEquivalent=function(e){return this.name===e.name},t}(lt),ht=function(e){function t(t,n,r,i,o){var s=e.call(this,i,o)||this;return s.name=t,s.params=n,s.body=r,s}return r(t,e),t.prototype.isEquivalent=function(e){return this.name===e.name&&me(this.body,e.body)},t}(lt),ft=function(e){function t(t,n,r,i){var o=e.call(this,r,i)||this;return o.name=t,o.body=n,o}return r(t,e),t.prototype.isEquivalent=function(e){return this.name===e.name&&me(this.body,e.body)},t}(lt),dt=function(e){function t(t,n,r,i,o,s,a,u,p){var l=e.call(this,a,u,p)||this;return l.name=t,l.parent=n,l.fields=r,l.getters=i,l.constructorMethod=o,l.methods=s,l}return r(t,e),t.prototype.isEquivalent=function(e){return e instanceof t&&this.name===e.name&&ve(this.parent,e.parent)&&me(this.fields,e.fields)&&me(this.getters,e.getters)&&this.constructorMethod.isEquivalent(e.constructorMethod)&&me(this.methods,e.methods)},t.prototype.visitStatement=function(e,t){return e.visitDeclareClassStmt(this,t)},t}(ot),vt=function(e){function t(t,n,r,i,o){void 0===r&&(r=[]);var s=e.call(this,[],i,o)||this;return s.condition=t,s.trueCase=n,s.falseCase=r,s}return r(t,e),t.prototype.isEquivalent=function(e){return e instanceof t&&this.condition.isEquivalent(e.condition)&&me(this.trueCase,e.trueCase)&&me(this.falseCase,e.falseCase)},t.prototype.visitStatement=function(e,t){return e.visitIfStmt(this,t)},t}(ot),mt=function(e){function t(t,n,r,i){void 0===r&&(r=null);var o=e.call(this,[],r,i)||this;return o.bodyStmts=t,o.catchStmts=n,o}return r(t,e),t.prototype.isEquivalent=function(e){return e instanceof t&&me(this.bodyStmts,e.bodyStmts)&&me(this.catchStmts,e.catchStmts)},t.prototype.visitStatement=function(e,t){return e.visitTryCatchStmt(this,t)},t}(ot),yt=function(e){function t(t,n,r){void 0===n&&(n=null);var i=e.call(this,[],n,r)||this;return i.error=t,i}return r(t,e),t.prototype.isEquivalent=function(e){return e instanceof mt&&this.error.isEquivalent(e.error)},t.prototype.visitStatement=function(e,t){return e.visitThrowStmt(this,t)},t}(ot),gt=function(){function e(){}return e.prototype.transformExpr=function(e,t){return e},e.prototype.transformStmt=function(e,t){return e},e.prototype.visitReadVarExpr=function(e,t){return this.transformExpr(e,t)},e.prototype.visitWrappedNodeExpr=function(e,t){return this.transformExpr(e,t)},e.prototype.visitTypeofExpr=function(e,t){return this.transformExpr(new Se(e.expr.visitExpression(this,t),e.type,e.sourceSpan),t)},e.prototype.visitWriteVarExpr=function(e,t){return this.transformExpr(new we(e.name,e.value.visitExpression(this,t),e.type,e.sourceSpan),t)},e.prototype.visitWriteKeyExpr=function(e,t){return this.transformExpr(new Ce(e.receiver.visitExpression(this,t),e.index.visitExpression(this,t),e.value.visitExpression(this,t),e.type,e.sourceSpan),t)},e.prototype.visitWritePropExpr=function(e,t){return this.transformExpr(new be(e.receiver.visitExpression(this,t),e.name,e.value.visitExpression(this,t),e.type,e.sourceSpan),t)},e.prototype.visitInvokeMethodExpr=function(e,t){var n=e.builtin||e.name;return this.transformExpr(new Pe(e.receiver.visitExpression(this,t),n,this.visitAllExpressions(e.args,t),e.type,e.sourceSpan),t)},e.prototype.visitInvokeFunctionExpr=function(e,t){return this.transformExpr(new Me(e.fn.visitExpression(this,t),this.visitAllExpressions(e.args,t),e.type,e.sourceSpan),t)},e.prototype.visitInstantiateExpr=function(e,t){return this.transformExpr(new Ne(e.classExpr.visitExpression(this,t),this.visitAllExpressions(e.args,t),e.type,e.sourceSpan),t)},e.prototype.visitLiteralExpr=function(e,t){return this.transformExpr(e,t)},e.prototype.visitLocalizedString=function(e,t){return this.transformExpr(new Oe(e.metaBlock,e.messageParts,e.placeHolderNames,this.visitAllExpressions(e.expressions,t),e.sourceSpan),t)},e.prototype.visitExternalExpr=function(e,t){return this.transformExpr(e,t)},e.prototype.visitConditionalExpr=function(e,t){return this.transformExpr(new Ue(e.condition.visitExpression(this,t),e.trueCase.visitExpression(this,t),e.falseCase.visitExpression(this,t),e.type,e.sourceSpan),t)},e.prototype.visitNotExpr=function(e,t){return this.transformExpr(new He(e.condition.visitExpression(this,t),e.sourceSpan),t)},e.prototype.visitAssertNotNullExpr=function(e,t){return this.transformExpr(new qe(e.condition.visitExpression(this,t),e.sourceSpan),t)},e.prototype.visitCastExpr=function(e,t){return this.transformExpr(new We(e.value.visitExpression(this,t),e.type,e.sourceSpan),t)},e.prototype.visitFunctionExpr=function(e,t){return this.transformExpr(new Ke(e.params,this.visitAllStatements(e.statements,t),e.type,e.sourceSpan),t)},e.prototype.visitUnaryOperatorExpr=function(e,t){return this.transformExpr(new Qe(e.operator,e.expr.visitExpression(this,t),e.type,e.sourceSpan),t)},e.prototype.visitBinaryOperatorExpr=function(e,t){return this.transformExpr(new Xe(e.operator,e.lhs.visitExpression(this,t),e.rhs.visitExpression(this,t),e.type,e.sourceSpan),t)},e.prototype.visitReadPropExpr=function(e,t){return this.transformExpr(new Ge(e.receiver.visitExpression(this,t),e.name,e.type,e.sourceSpan),t)},e.prototype.visitReadKeyExpr=function(e,t){return this.transformExpr(new $e(e.receiver.visitExpression(this,t),e.index.visitExpression(this,t),e.type,e.sourceSpan),t)},e.prototype.visitLiteralArrayExpr=function(e,t){return this.transformExpr(new Ye(this.visitAllExpressions(e.entries,t),e.type,e.sourceSpan),t)},e.prototype.visitLiteralMapExpr=function(e,t){var n=this,r=e.entries.map((function(e){return new Je(e.key,e.value.visitExpression(n,t),e.quoted)})),i=new ue(e.valueType);return this.transformExpr(new Ze(r,i,e.sourceSpan),t)},e.prototype.visitCommaExpr=function(e,t){return this.transformExpr(new et(this.visitAllExpressions(e.parts,t),e.sourceSpan),t)},e.prototype.visitAllExpressions=function(e,t){var n=this;return e.map((function(e){return e.visitExpression(n,t)}))},e.prototype.visitDeclareVarStmt=function(e,t){var n=e.value&&e.value.visitExpression(this,t);return this.transformStmt(new st(e.name,n,e.type,e.modifiers,e.sourceSpan,e.leadingComments),t)},e.prototype.visitDeclareFunctionStmt=function(e,t){return this.transformStmt(new at(e.name,e.params,this.visitAllStatements(e.statements,t),e.type,e.modifiers,e.sourceSpan,e.leadingComments),t)},e.prototype.visitExpressionStmt=function(e,t){return this.transformStmt(new ut(e.expr.visitExpression(this,t),e.sourceSpan,e.leadingComments),t)},e.prototype.visitReturnStmt=function(e,t){return this.transformStmt(new pt(e.value.visitExpression(this,t),e.sourceSpan,e.leadingComments),t)},e.prototype.visitDeclareClassStmt=function(e,t){var n=this,r=e.parent.visitExpression(this,t),i=e.getters.map((function(e){return new ft(e.name,n.visitAllStatements(e.body,t),e.type,e.modifiers)})),o=e.constructorMethod&&new ht(e.constructorMethod.name,e.constructorMethod.params,this.visitAllStatements(e.constructorMethod.body,t),e.constructorMethod.type,e.constructorMethod.modifiers),s=e.methods.map((function(e){return new ht(e.name,e.params,n.visitAllStatements(e.body,t),e.type,e.modifiers)}));return this.transformStmt(new dt(e.name,r,e.fields,i,o,s,e.modifiers,e.sourceSpan),t)},e.prototype.visitIfStmt=function(e,t){return this.transformStmt(new vt(e.condition.visitExpression(this,t),this.visitAllStatements(e.trueCase,t),this.visitAllStatements(e.falseCase,t),e.sourceSpan,e.leadingComments),t)},e.prototype.visitTryCatchStmt=function(e,t){return this.transformStmt(new mt(this.visitAllStatements(e.bodyStmts,t),this.visitAllStatements(e.catchStmts,t),e.sourceSpan,e.leadingComments),t)},e.prototype.visitThrowStmt=function(e,t){return this.transformStmt(new yt(e.error.visitExpression(this,t),e.sourceSpan,e.leadingComments),t)},e.prototype.visitAllStatements=function(e,t){var n=this;return e.map((function(e){return e.visitStatement(n,t)}))},e}(),_t=function(){function e(){}return e.prototype.visitType=function(e,t){return e},e.prototype.visitExpression=function(e,t){return e.type&&e.type.visitType(this,t),e},e.prototype.visitBuiltinType=function(e,t){return this.visitType(e,t)},e.prototype.visitExpressionType=function(e,t){var n=this;return e.value.visitExpression(this,t),null!==e.typeParams&&e.typeParams.forEach((function(e){return n.visitType(e,t)})),this.visitType(e,t)},e.prototype.visitArrayType=function(e,t){return this.visitType(e,t)},e.prototype.visitMapType=function(e,t){return this.visitType(e,t)},e.prototype.visitWrappedNodeExpr=function(e,t){return e},e.prototype.visitTypeofExpr=function(e,t){return this.visitExpression(e,t)},e.prototype.visitReadVarExpr=function(e,t){return this.visitExpression(e,t)},e.prototype.visitWriteVarExpr=function(e,t){return e.value.visitExpression(this,t),this.visitExpression(e,t)},e.prototype.visitWriteKeyExpr=function(e,t){return e.receiver.visitExpression(this,t),e.index.visitExpression(this,t),e.value.visitExpression(this,t),this.visitExpression(e,t)},e.prototype.visitWritePropExpr=function(e,t){return e.receiver.visitExpression(this,t),e.value.visitExpression(this,t),this.visitExpression(e,t)},e.prototype.visitInvokeMethodExpr=function(e,t){return e.receiver.visitExpression(this,t),this.visitAllExpressions(e.args,t),this.visitExpression(e,t)},e.prototype.visitInvokeFunctionExpr=function(e,t){return e.fn.visitExpression(this,t),this.visitAllExpressions(e.args,t),this.visitExpression(e,t)},e.prototype.visitInstantiateExpr=function(e,t){return e.classExpr.visitExpression(this,t),this.visitAllExpressions(e.args,t),this.visitExpression(e,t)},e.prototype.visitLiteralExpr=function(e,t){return this.visitExpression(e,t)},e.prototype.visitLocalizedString=function(e,t){return this.visitExpression(e,t)},e.prototype.visitExternalExpr=function(e,t){var n=this;return e.typeParams&&e.typeParams.forEach((function(e){return e.visitType(n,t)})),this.visitExpression(e,t)},e.prototype.visitConditionalExpr=function(e,t){return e.condition.visitExpression(this,t),e.trueCase.visitExpression(this,t),e.falseCase.visitExpression(this,t),this.visitExpression(e,t)},e.prototype.visitNotExpr=function(e,t){return e.condition.visitExpression(this,t),this.visitExpression(e,t)},e.prototype.visitAssertNotNullExpr=function(e,t){return e.condition.visitExpression(this,t),this.visitExpression(e,t)},e.prototype.visitCastExpr=function(e,t){return e.value.visitExpression(this,t),this.visitExpression(e,t)},e.prototype.visitFunctionExpr=function(e,t){return this.visitAllStatements(e.statements,t),this.visitExpression(e,t)},e.prototype.visitUnaryOperatorExpr=function(e,t){return e.expr.visitExpression(this,t),this.visitExpression(e,t)},e.prototype.visitBinaryOperatorExpr=function(e,t){return e.lhs.visitExpression(this,t),e.rhs.visitExpression(this,t),this.visitExpression(e,t)},e.prototype.visitReadPropExpr=function(e,t){return e.receiver.visitExpression(this,t),this.visitExpression(e,t)},e.prototype.visitReadKeyExpr=function(e,t){return e.receiver.visitExpression(this,t),e.index.visitExpression(this,t),this.visitExpression(e,t)},e.prototype.visitLiteralArrayExpr=function(e,t){return this.visitAllExpressions(e.entries,t),this.visitExpression(e,t)},e.prototype.visitLiteralMapExpr=function(e,t){var n=this;return e.entries.forEach((function(e){return e.value.visitExpression(n,t)})),this.visitExpression(e,t)},e.prototype.visitCommaExpr=function(e,t){return this.visitAllExpressions(e.parts,t),this.visitExpression(e,t)},e.prototype.visitAllExpressions=function(e,t){var n=this;e.forEach((function(e){return e.visitExpression(n,t)}))},e.prototype.visitDeclareVarStmt=function(e,t){return e.value&&e.value.visitExpression(this,t),e.type&&e.type.visitType(this,t),e},e.prototype.visitDeclareFunctionStmt=function(e,t){return this.visitAllStatements(e.statements,t),e.type&&e.type.visitType(this,t),e},e.prototype.visitExpressionStmt=function(e,t){return e.expr.visitExpression(this,t),e},e.prototype.visitReturnStmt=function(e,t){return e.value.visitExpression(this,t),e},e.prototype.visitDeclareClassStmt=function(e,t){var n=this;return e.parent.visitExpression(this,t),e.getters.forEach((function(e){return n.visitAllStatements(e.body,t)})),e.constructorMethod&&this.visitAllStatements(e.constructorMethod.body,t),e.methods.forEach((function(e){return n.visitAllStatements(e.body,t)})),e},e.prototype.visitIfStmt=function(e,t){return e.condition.visitExpression(this,t),this.visitAllStatements(e.trueCase,t),this.visitAllStatements(e.falseCase,t),e},e.prototype.visitTryCatchStmt=function(e,t){return this.visitAllStatements(e.bodyStmts,t),this.visitAllStatements(e.catchStmts,t),e},e.prototype.visitThrowStmt=function(e,t){return e.error.visitExpression(this,t),e},e.prototype.visitAllStatements=function(e,t){var n=this;e.forEach((function(e){return e.visitStatement(n,t)}))},e}();function Et(e){var t=new St;return t.visitAllStatements(e,null),t.varNames}var St=function(e){function t(){var t=e.apply(this,s(arguments))||this;return t.varNames=new Set,t}return r(t,e),t.prototype.visitDeclareFunctionStmt=function(e,t){return e},t.prototype.visitDeclareClassStmt=function(e,t){return e},t.prototype.visitReadVarExpr=function(e,t){return e.name&&this.varNames.add(e.name),null},t}(_t),xt=function(e){function t(){var t=e.apply(this,s(arguments))||this;return t.externalReferences=[],t}return r(t,e),t.prototype.visitExternalExpr=function(t,n){return this.externalReferences.push(t.value),e.prototype.visitExternalExpr.call(this,t,n)},t}(_t);function wt(e,t){if(!t)return e;var n=new bt(t);return e.visitStatement(n,null)}function Ct(e,t){if(!t)return e;var n=new bt(t);return e.visitExpression(n,null)}var bt=function(e){function t(t){var n=e.call(this)||this;return n.sourceSpan=t,n}return r(t,e),t.prototype._clone=function(e){var t,n,r=Object.create(e.constructor.prototype);try{for(var o=i(Object.keys(e)),s=o.next();!s.done;s=o.next()){var a=s.value;r[a]=e[a]}}catch(e){t={error:e}}finall