UNPKG

@codesandbox/sandpack-client

Version:

<img style="width:100%" src="https://user-images.githubusercontent.com/4838076/143581035-ebee5ba2-9cb1-4fe8-a05b-2f44bd69bb4b.gif" alt="Component toolkit for live running code editing experiences" />

37 lines 581 kB
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t(((e=e||self).prettierPlugins=e.prettierPlugins||{},e.prettierPlugins.angular={}))}(this,(function(e){"use strict";function t(e,n){return!(n=n||{}).ignoreDecorators&&e.declaration&&e.declaration.decorators&&e.declaration.decorators.length>0?t(e.declaration.decorators[0]):!n.ignoreDecorators&&e.decorators&&e.decorators.length>0?t(e.decorators[0]):e.__location?e.__location.startOffset:e.range?e.range[0]:"number"==typeof e.start?e.start:e.loc?e.loc.start:null}function n(e){const t=e.nodes&&(r=e.nodes)[r.length-1];var r;if(t&&e.source&&!e.source.end&&(e=t),e.__location)return e.__location.endOffset;const i=e.range?e.range[1]:"number"==typeof e.end?e.end:null;return e.typeAnnotation?Math.max(i,n(e.typeAnnotation)):e.loc&&!i?e.loc.end:i}var r={locStart:t,locEnd:n,composeLoc:function(e,r=e){const i="number"==typeof r?r:-1,s=t(e),o=-1!==i?s+i:n(r),a=e.loc.start;return{start:s,end:o,range:[s,o],loc:{start:a,end:-1!==i?{line:a.line,column:a.column+i}:r.loc.end}}}};function i(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function s(e,t){return e(t={exports:{}},t.exports),t.exports}var o=s((function(e,t){var n=function(){function e(e){this.string=e;for(var t=[0],n=0;n<e.length;)switch(e[n]){case"\n":n+="\n".length,t.push(n);break;case"\r":"\n"===e[n+="\r".length]&&(n+="\n".length),t.push(n);break;default:n++}this.offsets=t}return e.prototype.locationForIndex=function(e){if(e<0||e>this.string.length)return null;for(var t=0,n=this.offsets;n[t+1]<=e;)t++;return{line:t,column:e-n[t]}},e.prototype.indexForLocation=function(e){var t=e.line,n=e.column;return t<0||t>=this.offsets.length?null:n<0||n>this.lengthOfLine(t)?null:this.offsets[t]+n},e.prototype.lengthOfLine=function(e){var t=this.offsets[e];return(e===this.offsets.length-1?this.string.length:this.offsets[e+1])-t},e}();t.__esModule=!0,t.default=n}));i(o);var a=s((function(e,t){Object.defineProperty(t,"__esModule",{value:!0});t.Context=class{constructor(e){this.text=e,this.locator=new n(this.text)}};class n{constructor(e){this._lineAndColumn=new o.default(e)}locationForIndex(e){const{line:t,column:n}=this._lineAndColumn.locationForIndex(e);return{line:t+1,column:n}}}}));i(a);a.Context;var u="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},p=function(e,t){return(p=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 l(e,t){function n(){this.constructor=e}p(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var c,h=function(){return(h=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function f(e){var t="function"==typeof Symbol&&e[Symbol.iterator],n=0;return t?t.call(e):{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}}function d(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,s=n.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(r=s.next()).done;)o.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=s.return)&&n.call(s)}finally{if(i)throw i.error}}return o}function v(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(d(arguments[t]));return e} /** * @license * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */function m(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 y(e){return"ng-container"===m(e)[1]}function g(e){return"ng-content"===m(e)[1]}function _(e){return"ng-template"===m(e)[1]}function E(e){return null===e?null:m(e)[0]}function x(e,t){return e?":"+e+":"+t:t}!function(e){e[e.RAW_TEXT=0]="RAW_TEXT",e[e.ESCAPABLE_RAW_TEXT=1]="ESCAPABLE_RAW_TEXT",e[e.PARSABLE_DATA=2]="PARSABLE_DATA"}(c||(c={}));var S={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:"‌"};S.ngsp=""; /** * @license * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ var w,C,b=function(){function e(e){var t=this,n=void 0===e?{}:e,r=n.closedByChildren,i=n.implicitNamespacePrefix,s=n.contentType,o=void 0===s?c.PARSABLE_DATA:s,a=n.closedByParent,u=void 0!==a&&a,p=n.isVoid,l=void 0!==p&&p,h=n.ignoreFirstLf,f=void 0!==h&&h;this.closedByChildren={},this.closedByParent=!1,this.canSelfClose=!1,r&&r.length>0&&r.forEach((function(e){return t.closedByChildren[e]=!0})),this.isVoid=l,this.closedByParent=u||l,this.implicitNamespacePrefix=i||null,this.contentType=o,this.ignoreFirstLf=f}return e.prototype.isClosedByChild=function(e){return this.isVoid||e.toLowerCase()in this.closedByChildren},e}();function T(e){return C||(w=new b,C={base:new b({isVoid:!0}),meta:new b({isVoid:!0}),area:new b({isVoid:!0}),embed:new b({isVoid:!0}),link:new b({isVoid:!0}),img:new b({isVoid:!0}),input:new b({isVoid:!0}),param:new b({isVoid:!0}),hr:new b({isVoid:!0}),br:new b({isVoid:!0}),source:new b({isVoid:!0}),track:new b({isVoid:!0}),wbr:new b({isVoid:!0}),p:new b({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 b({closedByChildren:["tbody","tfoot"]}),tbody:new b({closedByChildren:["tbody","tfoot"],closedByParent:!0}),tfoot:new b({closedByChildren:["tbody"],closedByParent:!0}),tr:new b({closedByChildren:["tr"],closedByParent:!0}),td:new b({closedByChildren:["td","th"],closedByParent:!0}),th:new b({closedByChildren:["td","th"],closedByParent:!0}),col:new b({isVoid:!0}),svg:new b({implicitNamespacePrefix:"svg"}),math:new b({implicitNamespacePrefix:"math"}),li:new b({closedByChildren:["li"],closedByParent:!0}),dt:new b({closedByChildren:["dt","dd"]}),dd:new b({closedByChildren:["dt","dd"],closedByParent:!0}),rb:new b({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),rt:new b({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),rtc:new b({closedByChildren:["rb","rtc","rp"],closedByParent:!0}),rp:new b({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),optgroup:new b({closedByChildren:["optgroup"],closedByParent:!0}),option:new b({closedByChildren:["option","optgroup"],closedByParent:!0}),pre:new b({ignoreFirstLf:!0}),listing:new b({ignoreFirstLf:!0}),style:new b({contentType:c.RAW_TEXT}),script:new b({contentType:c.RAW_TEXT}),title:new b({contentType:c.ESCAPABLE_RAW_TEXT}),textarea:new b({contentType:c.ESCAPABLE_RAW_TEXT,ignoreFirstLf:!0})}),C[e.toLowerCase()]||w} /** * @license * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */var P,N,A=new RegExp("(\\:not\\()|(([\\.\\#]?)[-\\w]+)|(?:\\[([-.\\w*]+)(?:=([\"']?)([^\\]\"']*)\\5)?\\])|(\\))|(\\s*,\\s*)","g"),M=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)},s=new e,o=s,a=!1;for(A.lastIndex=0;n=A.exec(t);){if(n[1]){if(a)throw new Error("Nesting :not in a selector is not allowed");a=!0,o=new e,s.notSelectors.push(o)}var u=n[2];if(u){var p=n[3];"#"===p?o.addAttribute("id",u.substr(1)):"."===p?o.addClassName(u.substr(1)):o.setElement(u)}var l=n[4];if(l&&o.addAttribute(l,n[6]),n[7]&&(a=!1,o=s),n[8]){if(a)throw new Error("Multiple selectors in :not are not supported");i(r,s),s=o=new e}}return i(r,s),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 T(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],r=this.attrs[t+1];e+="["+n+(r?"="+r:"")+"]"}return this.notSelectors.forEach((function(t){return e+=":not("+t+")"})),e},e}(),I=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 k(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,s=e.classNames,o=e.attrs,a=new R(e,t,n);i&&((p=0===o.length&&0===s.length)?this._addTerminal(r._elementMap,i,a):r=this._addPartial(r._elementPartialMap,i));if(s)for(var u=0;u<s.length;u++){var p=0===o.length&&u===s.length-1,l=s[u];p?this._addTerminal(r._classMap,l,a):r=this._addPartial(r._classPartialMap,l)}if(o)for(u=0;u<o.length;u+=2){p=u===o.length-2;var c=o[u],h=o[u+1];if(p){var f=r._attrValueMap,d=f.get(c);d||(d=new Map,f.set(c,d)),this._addTerminal(d,h,a)}else{var v=r._attrValuePartialMap,m=v.get(c);m||(m=new Map,v.set(c,m)),r=this._addPartial(m,h)}}},e.prototype._addTerminal=function(e,t,n){var r=e.get(t);r||(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,s=e.attrs,o=0;o<this._listContexts.length;o++)this._listContexts[o].alreadyMatched=!1;if(n=this._matchTerminal(this._elementMap,r,e,t)||n,n=this._matchPartial(this._elementPartialMap,r,e,t)||n,i)for(o=0;o<i.length;o++){var a=i[o];n=this._matchTerminal(this._classMap,a,e,t)||n,n=this._matchPartial(this._classPartialMap,a,e,t)||n}if(s)for(o=0;o<s.length;o+=2){var u=s[o],p=s[o+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)||[],s=e.get("*");if(s&&(i=i.concat(s)),0===i.length)return!1;for(var o=!1,a=0;a<i.length;a++)o=i[a].finalize(n,r)||o;return o},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}(),k=function(e){this.selectors=e,this.alreadyMatched=!1},R=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;!(this.notSelectors.length>0)||this.listContext&&this.listContext.alreadyMatched||(n=!I.createNotMatcher(this.notSelectors).match(e,null));return!n||!t||this.listContext&&this.listContext.alreadyMatched||(this.listContext&&(this.listContext.alreadyMatched=!0),t(this.selector,this.cbContext)),n},e}(),O=se("Inject",(function(e){return{token:e}})),F=se("InjectionToken",(function(e){return{_desc:e,"ɵprov":void 0}})),L=se("Attribute",(function(e){return{attributeName:e}})),D=se("ContentChildren",(function(e,t){return void 0===t&&(t={}),h({selector:e,first:!1,isViewQuery:!1,descendants:!1},t)})),B=se("ContentChild",(function(e,t){return void 0===t&&(t={}),h({selector:e,first:!0,isViewQuery:!1,descendants:!0},t)})),V=se("ViewChildren",(function(e,t){return void 0===t&&(t={}),h({selector:e,first:!1,isViewQuery:!0,descendants:!0},t)})),j=se("ViewChild",(function(e,t){return h({selector:e,first:!0,isViewQuery:!0,descendants:!0},t)})),U=se("Directive",(function(e){return void 0===e&&(e={}),e}));!function(e){e[e.Emulated=0]="Emulated",e[e.Native=1]="Native",e[e.None=2]="None",e[e.ShadowDom=3]="ShadowDom"}(P||(P={})),function(e){e[e.OnPush=0]="OnPush",e[e.Default=1]="Default"}(N||(N={}));var H,q,W=se("Component",(function(e){return void 0===e&&(e={}),h({changeDetection:N.Default},e)})),z=se("Pipe",(function(e){return h({pure:!0},e)})),K=se("Input",(function(e){return{bindingPropertyName:e}})),Q=se("Output",(function(e){return{bindingPropertyName:e}})),G=se("HostBinding",(function(e){return{hostPropertyName:e}})),X=se("HostListener",(function(e,t){return{eventName:e,args:t}})),$=se("NgModule",(function(e){return e})),Y=se("Injectable",(function(e){return void 0===e&&(e={}),e})),J={name:"custom-elements"},Z={name:"no-errors-schema"},ee=se("Optional"),te=se("Self"),ne=se("SkipSelf"),re=se("Host"),ie=Function;function se(e,t){function n(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var i=t?t.apply(void 0,v(n)):{};return h({ngMetadataName:e},i)}return n.isTypeOf=function(t){return t&&t.ngMetadataName===e},n.ngMetadataName=e,n}function oe(e){var t=function(e){var t=e.classNames&&e.classNames.length?v([8],e.classNames):[];return v([e.element&&"*"!==e.element?e.element:""],e.attrs,t)}(e),n=e.notSelectors&&e.notSelectors.length?e.notSelectors.map((function(e){return function(e){var t=e.classNames&&e.classNames.length?v([8],e.classNames):[];return e.element?v([5,e.element],e.attrs,t):e.attrs.length?v([3],e.attrs,t):e.classNames&&e.classNames.length?v([9],e.classNames):[]}(e)})):[];return t.concat.apply(t,v(n))}function ae(e){return e?M.parse(e).map(oe):[]}!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"}(H||(H={})),function(e){e[e.Error=0]="Error",e[e.Warning=1]="Warning",e[e.Ignore=2]="Ignore"}(q||(q={}));var ue,pe=Object.freeze({__proto__:null,createInject:O,createInjectionToken:F,createAttribute:L,createContentChildren:D,createContentChild:B,createViewChildren:V,createViewChild:j,createDirective:U,get ViewEncapsulation(){return P},get ChangeDetectionStrategy(){return N},createComponent:W,createPipe:z,createInput:K,createOutput:Q,createHostBinding:G,createHostListener:X,createNgModule:$,createInjectable:Y,CUSTOM_ELEMENTS_SCHEMA:J,NO_ERRORS_SCHEMA:Z,createOptional:ee,createSelf:te,createSkipSelf:ne,createHost:re,Type:ie,get SecurityContext(){return H},get MissingTranslationStrategy(){return q},parseSelectorToR3Selector:ae}); /** * @license * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */!function(e){e[e.Const=0]="Const"}(ue||(ue={}));var le,ce=function(){function e(e){void 0===e&&(e=null),this.modifiers=e,e||(this.modifiers=[])}return e.prototype.hasModifier=function(e){return-1!==this.modifiers.indexOf(e)},e}();!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",e[e.Inferred=6]="Inferred",e[e.None=7]="None"}(le||(le={}));var he,fe=function(e){function t(t,n){void 0===n&&(n=null);var r=e.call(this,n)||this;return r.name=t,r}return l(t,e),t.prototype.visitType=function(e,t){return e.visitBuiltinType(this,t)},t}(ce),de=function(e){function t(t,n,r){void 0===n&&(n=null),void 0===r&&(r=null);var i=e.call(this,n)||this;return i.value=t,i.typeParams=r,i}return l(t,e),t.prototype.visitType=function(e,t){return e.visitExpressionType(this,t)},t}(ce),ve=function(e){function t(t,n){void 0===n&&(n=null);var r=e.call(this,n)||this;return r.of=t,r}return l(t,e),t.prototype.visitType=function(e,t){return e.visitArrayType(this,t)},t}(ce),me=function(e){function t(t,n){void 0===n&&(n=null);var r=e.call(this,n)||this;return r.valueType=t||null,r}return l(t,e),t.prototype.visitType=function(e,t){return e.visitMapType(this,t)},t}(ce),ye=new fe(le.Dynamic),ge=new fe(le.Inferred),_e=new fe(le.Bool),Ee=(new fe(le.Int),new fe(le.Number)),xe=new fe(le.String),Se=(new fe(le.Function),new fe(le.None));function we(e,t){return null==e||null==t?e==t:e.isEquivalent(t)}function Ce(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}!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.BitwiseAnd=11]="BitwiseAnd",e[e.Lower=12]="Lower",e[e.LowerEquals=13]="LowerEquals",e[e.Bigger=14]="Bigger",e[e.BiggerEquals=15]="BiggerEquals"}(he||(he={}));var be,Te=function(){function e(e,t){this.type=e||null,this.sourceSpan=t||null}return e.prototype.prop=function(e,t){return new Ze(this,e,null,t)},e.prototype.key=function(e,t,n){return new et(this,e,t,n)},e.prototype.callMethod=function(e,t,n){return new Oe(this,e,t,null,n)},e.prototype.callFn=function(e,t){return new Fe(this,e,null,t)},e.prototype.instantiate=function(e,t,n){return new Le(this,e,t,n)},e.prototype.conditional=function(e,t,n){return void 0===t&&(t=null),new Ke(this,e,t,null,n)},e.prototype.equals=function(e,t){return new Je(he.Equals,this,e,null,t)},e.prototype.notEquals=function(e,t){return new Je(he.NotEquals,this,e,null,t)},e.prototype.identical=function(e,t){return new Je(he.Identical,this,e,null,t)},e.prototype.notIdentical=function(e,t){return new Je(he.NotIdentical,this,e,null,t)},e.prototype.minus=function(e,t){return new Je(he.Minus,this,e,null,t)},e.prototype.plus=function(e,t){return new Je(he.Plus,this,e,null,t)},e.prototype.divide=function(e,t){return new Je(he.Divide,this,e,null,t)},e.prototype.multiply=function(e,t){return new Je(he.Multiply,this,e,null,t)},e.prototype.modulo=function(e,t){return new Je(he.Modulo,this,e,null,t)},e.prototype.and=function(e,t){return new Je(he.And,this,e,null,t)},e.prototype.bitwiseAnd=function(e,t,n){return void 0===n&&(n=!0),new Je(he.BitwiseAnd,this,e,null,t,n)},e.prototype.or=function(e,t){return new Je(he.Or,this,e,null,t)},e.prototype.lower=function(e,t){return new Je(he.Lower,this,e,null,t)},e.prototype.lowerEquals=function(e,t){return new Je(he.LowerEquals,this,e,null,t)},e.prototype.bigger=function(e,t){return new Je(he.Bigger,this,e,null,t)},e.prototype.biggerEquals=function(e,t){return new Je(he.BiggerEquals,this,e,null,t)},e.prototype.isBlank=function(e){return this.equals(ot,e)},e.prototype.cast=function(e,t){return new Xe(this,e,t)},e.prototype.toStmt=function(){return new lt(this,null)},e}();!function(e){e[e.This=0]="This",e[e.Super=1]="Super",e[e.CatchError=2]="CatchError",e[e.CatchStack=3]="CatchStack"}(be||(be={}));var Pe,Ne=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 l(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 Ie(this.name,e,null,this.sourceSpan)},t}(Te),Ae=function(e){function t(t,n,r){var i=e.call(this,n,r)||this;return i.expr=t,i}return l(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}(Te),Me=function(e){function t(t,n,r){var i=e.call(this,n,r)||this;return i.node=t,i}return l(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}(Te),Ie=function(e){function t(t,n,r,i){var s=e.call(this,r||n.type,i)||this;return s.name=t,s.value=n,s}return l(t,e),t.prototype.isEquivalent=function(e){return e instanceof t&&this.name===e.name&&this.value.isEquivalent(e.value)},t.prototype.isConstant=function(){return!1},t.prototype.visitExpression=function(e,t){return e.visitWriteVarExpr(this,t)},t.prototype.toDeclStmt=function(e,t){return new ut(this.name,this.value,e,t,this.sourceSpan)},t.prototype.toConstDecl=function(){return this.toDeclStmt(ge,[qe.Final])},t}(Te),ke=function(e){function t(t,n,r,i,s){var o=e.call(this,i||r.type,s)||this;return o.receiver=t,o.index=n,o.value=r,o}return l(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}(Te),Re=function(e){function t(t,n,r,i,s){var o=e.call(this,i||r.type,s)||this;return o.receiver=t,o.name=n,o.value=r,o}return l(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}(Te);!function(e){e[e.ConcatArray=0]="ConcatArray",e[e.SubscribeObservable=1]="SubscribeObservable",e[e.Bind=2]="Bind"}(Pe||(Pe={}));var Oe=function(e){function t(t,n,r,i,s){var o=e.call(this,i,s)||this;return o.receiver=t,o.args=r,"string"==typeof n?(o.name=n,o.builtin=null):(o.name=null,o.builtin=n),o}return l(t,e),t.prototype.isEquivalent=function(e){return e instanceof t&&this.receiver.isEquivalent(e.receiver)&&this.name===e.name&&this.builtin===e.builtin&&Ce(this.args,e.args)},t.prototype.isConstant=function(){return!1},t.prototype.visitExpression=function(e,t){return e.visitInvokeMethodExpr(this,t)},t}(Te),Fe=function(e){function t(t,n,r,i,s){void 0===s&&(s=!1);var o=e.call(this,r,i)||this;return o.fn=t,o.args=n,o.pure=s,o}return l(t,e),t.prototype.isEquivalent=function(e){return e instanceof t&&this.fn.isEquivalent(e.fn)&&Ce(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}(Te),Le=function(e){function t(t,n,r,i){var s=e.call(this,r,i)||this;return s.classExpr=t,s.args=n,s}return l(t,e),t.prototype.isEquivalent=function(e){return e instanceof t&&this.classExpr.isEquivalent(e.classExpr)&&Ce(this.args,e.args)},t.prototype.isConstant=function(){return!1},t.prototype.visitExpression=function(e,t){return e.visitInstantiateExpr(this,t)},t}(Te),De=function(e){function t(t,n,r){var i=e.call(this,n,r)||this;return i.value=t,i}return l(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}(Te),Be=function(e){function t(t,n,r,i,s){var o=e.call(this,xe,s)||this;return o.metaBlock=t,o.messageParts=n,o.placeHolderNames=r,o.expressions=i,o}return l(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})),He(e,this.messageParts[0])},t.prototype.serializeI18nTemplatePart=function(e){return He(this.placeHolderNames[e-1],this.messageParts[e])},t}(Te),Ve=function(e){return e.replace(/\\/g,"\\\\")},je=function(e){return e.replace(/:/g,"\\:")},Ue=function(e){return e.replace(/`/g,"\\`").replace(/\${/g,"$\\{")};function He(e,t){return""===e?{cooked:t,raw:Ue((n=Ve(t),n.replace(/^:/,"\\:")))}:{cooked:":"+e+":"+t,raw:Ue(":"+je(Ve(e))+":"+Ve(t))};var n}var qe,We=function(e){function t(t,n,r,i){void 0===r&&(r=null);var s=e.call(this,n,i)||this;return s.value=t,s.typeParams=r,s}return l(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}(Te),ze=function(e,t,n){this.moduleName=e,this.name=t,this.runtime=n},Ke=function(e){function t(t,n,r,i,s){void 0===r&&(r=null);var o=e.call(this,i||n.type,s)||this;return o.condition=t,o.falseCase=r,o.trueCase=n,o}return l(t,e),t.prototype.isEquivalent=function(e){return e instanceof t&&this.condition.isEquivalent(e.condition)&&this.trueCase.isEquivalent(e.trueCase)&&we(this.falseCase,e.falseCase)},t.prototype.isConstant=function(){return!1},t.prototype.visitExpression=function(e,t){return e.visitConditionalExpr(this,t)},t}(Te),Qe=function(e){function t(t,n){var r=e.call(this,_e,n)||this;return r.condition=t,r}return l(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}(Te),Ge=function(e){function t(t,n){var r=e.call(this,t.type,n)||this;return r.condition=t,r}return l(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}(Te),Xe=function(e){function t(t,n,r){var i=e.call(this,n,r)||this;return i.value=t,i}return l(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}(Te),$e=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}(),Ye=function(e){function t(t,n,r,i,s){var o=e.call(this,r,i)||this;return o.params=t,o.statements=n,o.name=s,o}return l(t,e),t.prototype.isEquivalent=function(e){return e instanceof t&&Ce(this.params,e.params)&&Ce(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 void 0===t&&(t=null),new pt(e,this.params,this.statements,this.type,t,this.sourceSpan)},t}(Te),Je=function(e){function t(t,n,r,i,s,o){void 0===o&&(o=!0);var a=e.call(this,i||n.type,s)||this;return a.operator=t,a.rhs=r,a.parens=o,a.lhs=n,a}return l(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}(Te),Ze=function(e){function t(t,n,r,i){var s=e.call(this,r,i)||this;return s.receiver=t,s.name=n,s}return l(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 Re(this.receiver,this.name,e,null,this.sourceSpan)},t}(Te),et=function(e){function t(t,n,r,i){var s=e.call(this,r,i)||this;return s.receiver=t,s.index=n,s}return l(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 ke(this.receiver,this.index,e,null,this.sourceSpan)},t}(Te),tt=function(e){function t(t,n,r){var i=e.call(this,n,r)||this;return i.entries=t,i}return l(t,e),t.prototype.isConstant=function(){return this.entries.every((function(e){return e.isConstant()}))},t.prototype.isEquivalent=function(e){return e instanceof t&&Ce(this.entries,e.entries)},t.prototype.visitExpression=function(e,t){return e.visitLiteralArrayExpr(this,t)},t}(Te),nt=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}(),rt=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 l(t,e),t.prototype.isEquivalent=function(e){return e instanceof t&&Ce(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}(Te),it=function(e){function t(t,n){var r=e.call(this,t[t.length-1].type,n)||this;return r.parts=t,r}return l(t,e),t.prototype.isEquivalent=function(e){return e instanceof t&&Ce(this.parts,e.parts)},t.prototype.isConstant=function(){return!1},t.prototype.visitExpression=function(e,t){return e.visitCommaExpr(this,t)},t}(Te),st=(new Ne(be.This,null,null),new Ne(be.Super,null,null),new Ne(be.CatchError,null,null),new Ne(be.CatchStack,null,null),new De(null,null,null)),ot=new De(null,ge,null);!function(e){e[e.Final=0]="Final",e[e.Private=1]="Private",e[e.Exported=2]="Exported",e[e.Static=3]="Static"}(qe||(qe={}));var at=function(){function e(e,t){this.modifiers=e||[],this.sourceSpan=t||null}return e.prototype.hasModifier=function(e){return-1!==this.modifiers.indexOf(e)},e}(),ut=function(e){function t(t,n,r,i,s){void 0===i&&(i=null);var o=e.call(this,i,s)||this;return o.name=t,o.value=n,o.type=r||n&&n.type||null,o}return l(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}(at),pt=function(e){function t(t,n,r,i,s,o){void 0===s&&(s=null);var a=e.call(this,s,o)||this;return a.name=t,a.params=n,a.statements=r,a.type=i||null,a}return l(t,e),t.prototype.isEquivalent=function(e){return e instanceof t&&Ce(this.params,e.params)&&Ce(this.statements,e.statements)},t.prototype.visitStatement=function(e,t){return e.visitDeclareFunctionStmt(this,t)},t}(at),lt=function(e){function t(t,n){var r=e.call(this,null,n)||this;return r.expr=t,r}return l(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}(at),ct=function(e){function t(t,n){var r=e.call(this,null,n)||this;return r.value=t,r}return l(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}(at),ht=function(){function e(e,t){this.modifiers=t,t||(this.modifiers=[]),this.type=e||null}return e.prototype.hasModifier=function(e){return-1!==this.modifiers.indexOf(e)},e}(),ft=function(e){function t(t,n,r,i){void 0===r&&(r=null);var s=e.call(this,n,r)||this;return s.name=t,s.initializer=i,s}return l(t,e),t.prototype.isEquivalent=function(e){return this.name===e.name},t}(ht),dt=function(e){function t(t,n,r,i,s){void 0===s&&(s=null);var o=e.call(this,i,s)||this;return o.name=t,o.params=n,o.body=r,o}return l(t,e),t.prototype.isEquivalent=function(e){return this.name===e.name&&Ce(this.body,e.body)},t}(ht),vt=function(e){function t(t,n,r,i){void 0===i&&(i=null);var s=e.call(this,r,i)||this;return s.name=t,s.body=n,s}return l(t,e),t.prototype.isEquivalent=function(e){return this.name===e.name&&Ce(this.body,e.body)},t}(ht),mt=function(e){function t(t,n,r,i,s,o,a,u){void 0===a&&(a=null);var p=e.call(this,a,u)||this;return p.name=t,p.parent=n,p.fields=r,p.getters=i,p.constructorMethod=s,p.methods=o,p}return l(t,e),t.prototype.isEquivalent=function(e){return e instanceof t&&this.name===e.name&&we(this.parent,e.parent)&&Ce(this.fields,e.fields)&&Ce(this.getters,e.getters)&&this.constructorMethod.isEquivalent(e.constructorMethod)&&Ce(this.methods,e.methods)},t.prototype.visitStatement=function(e,t){return e.visitDeclareClassStmt(this,t)},t}(at),yt=function(e){function t(t,n,r,i){void 0===r&&(r=[]);var s=e.call(this,null,i)||this;return s.condition=t,s.trueCase=n,s.falseCase=r,s}return l(t,e),t.prototype.isEquivalent=function(e){return e instanceof t&&this.condition.isEquivalent(e.condition)&&Ce(this.trueCase,e.trueCase)&&Ce(this.falseCase,e.falseCase)},t.prototype.visitStatement=function(e,t){return e.visitIfStmt(this,t)},t}(at),gt=function(e){function t(t,n,r){void 0===n&&(n=!1);var i=e.call(this,null,r)||this;return i.comment=t,i.multiline=n,i}return l(t,e),t.prototype.isEquivalent=function(e){return e instanceof t},t.prototype.visitStatement=function(e,t){return e.visitCommentStmt(this,t)},t}(at),_t=function(e){function t(t,n){void 0===t&&(t=[]);var r=e.call(this,null,n)||this;return r.tags=t,r}return l(t,e),t.prototype.isEquivalent=function(e){return e instanceof t&&this.toString()===e.toString()},t.prototype.visitStatement=function(e,t){return e.visitJSDocCommentStmt(this,t)},t.prototype.toString=function(){return function(e){var t,n;if(0===e.length)return"";var r="*\n";try{for(var i=f(e),s=i.next();!s.done;s=i.next()){var o=s.value;r+=" *",r+=Ut(o).replace(/\n/g,"\n * "),r+="\n"}}catch(e){t={error:e}}finally{try{s&&!s.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return r+=" "} /** * @license * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */(this.tags)},t}(at),Et=function(e){function t(t,n,r){var i=e.call(this,null,r)||this;return i.bodyStmts=t,i.catchStmts=n,i}return l(t,e),t.prototype.isEquivalent=function(e){return e instanceof t&&Ce(this.bodyStmts,e.bodyStmts)&&Ce(this.catchStmts,e.catchStmts)},t.prototype.visitStatement=function(e,t){return e.visitTryCatchStmt(this,t)},t}(at),xt=function(e){function t(t,n){var r=e.call(this,null,n)||this;return r.error=t,r}return l(t,e),t.prototype.isEquivalent=function(e){return e instanceof Et&&this.error.isEquivalent(e.error)},t.prototype.visitStatement=function(e,t){return e.visitThrowStmt(this,t)},t}(at),St=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 Ae(e.expr.visitExpression(this,t),e.type,e.sourceSpan),t)},e.prototype.visitWriteVarExpr=function(e,t){return this.transformExpr(new Ie(e.name,e.value.visitExpression(this,t),e.type,e.sourceSpan),t)},e.prototype.visitWriteKeyExpr=function(e,t){return this.transformExpr(new ke(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 Re(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 Oe(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 Fe(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 Le(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 Be(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 Ke(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 Qe(e.condition.visitExpression(this,t),e.sourceSpan),t)},e.prototype.visitAssertNotNullExpr=function(e,t){return this.transformExpr(new Ge(e.condition.visitExpression(this,t),e.sourceSpan),t)},e.prototype.visitCastExpr=function(e,t){return this.transformExpr(new Xe(e.value.visitExpression(this,t),e.type,e.sourceSpan),t)},e.prototype.visitFunctionExpr=function(e,t){return this.transformExpr(new Ye(e.params,this.visitAllStatements(e.statements,t),e.type,e.sourceSpan),t)},e.prototype.visitBinaryOperatorExpr=function(e,t){return this.transformExpr(new Je(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 Ze(e.receiver.visitExpression(this,t),e.name,e.type,e.sourceSpan),t)},e.prototype.visitReadKeyExpr=function(e,t){return this.transformExpr(new et(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 tt(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 nt(e.key,e.value.visitExpression(n,t),e.quoted)})),i=new me(e.valueType,null);return this.transformExpr(new rt(r,i,e.sourceSpan),t)},e.prototype.visitCommaExpr=function(e,t){return this.transformExpr(new it(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 ut(e.name,n,e.type,e.modifiers,e.sourceSpan),t)},e.prototype.visitDeclareFunctionStmt=function(e,t){return this.transformStmt(new pt(e.name,e.params,this.visitAllStatements(e.statements,t),e.type,e.modifiers,e.sourceSpan),t)},e.prototype.visitExpressionStmt=function(e,t){return this.transformStmt(new lt(e.expr.visitExpression(this,t),e.sourceSpan),t)},e.prototype.visitReturnStmt=function(e,t){return this.transformStmt(new ct(e.value.visitExpression(this,t),e.sourceSpan),t)},e.prototype.visitDeclareClassStmt=function(e,t){var n=this,r=e.parent.visitExpression(this,t),i=e.getters.map((function(e){return new vt(e.name,n.visitAllStatements(e.body,t),e.type,e.modifiers)})),s=e.constructorMethod&&new dt(e.constructorMethod.name,e.constructorMethod.params,this.visitAllStatements(e.constructorMethod.body,t),e.constructorMethod.type,e.constructorMethod.modifiers),o=e.methods.map((function(e){return new dt(e.name,e.params,n.visitAllStatements(e.body,t),e.type,e.modifiers)}));return this.transformStmt(new mt(e.name,r,e.fields,i,s,o,e.modifiers,e.sourceSpan),t)},e.prototype.visitIfStmt=function(e,t){return this.transformStmt(new yt(e.condition.visitExpression(this,t),this.visitAllStatements(e.trueCase,t),this.visitAllStatements(e.falseCase,t),e.sourceSpan),t)},e.prototype.visitTryCatchStmt=function(e,t){return this.transformStmt(new Et(this.visitAllStatements(e.bodyStmts,t),this.visitAllStatements(e.catchStmts,t),e.sourceSpan),t)},e.prototype.visitThrowStmt=function(e,t){return this.transformStmt(new xt(e.error.visitExpression(this,t),e.sourceSpan),t)},e.prototype.visitCommentStmt=function(e,t){return this.transformStmt(e,t)},e.prototype.visitJSDocCommentStmt=function(e,t){return this.transformStmt(e,t)},e.prototype.visitAllStatements=function(e,t){var n=this;return e.map((function(e){return e.visitStatement(n,t)}))},e}(),wt=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.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.visitCommentStmt=function(e,t){return e},e.prototype.visitJSDocCommentStmt=function(e,t){return e},e.prototype.visitAllStatements=function(e,t){var n=this;e.forEach((function(e){return e.visitStatement(n,t)}))},e}();function Ct(e){var t=new bt;return t.visitAllStatements(e,null),t.varNames}var bt=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.varNames=new Set,t}return l(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}(wt);var Tt=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.externalReferences=[],t}return l(t,e),t.prototype.visitExternalExpr=function(t,n){return this.externalReferences.push(t.value),e.prototype.visitExternalExpr.call(this,t,n)},t}(wt);function Pt(e,t){if(!t)return e;var n=new At(t);return e.visitStatement(n,null)}function Nt(e,t){if(!t)return e;var n=new At(t);return e.visitExpression(n,null)}var At=function(e){function t(t){var n=e.call(this)||this;return n.sourceSpan=t,n}return l(t,e),t.prototype._clone=function(e){var t,n,r=Object.create(e.constructor.prototype);try{for(var i=f(Object.keys(e)),s=i.next();!s.done;s=i.next()){var o=s.value;r[o]=e[o]}}catch(e){t={error:e}}finally{try{s&&!s.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return r},t.prototype.transformExpr=function(e,t){return e.sourceSpan||((e=this._clone(e)).sourceSpan=this.sourceSpan),e},t.prototype.transformStmt=function(e,t){return e.sourceSpan||((e=this._clone(e)).sourceSpan=this.sourceSpan),e},t}(St);function Mt(e,t,n){return new Ne(e,t,n)}function It(e,t,n){return void 0===t&&(t=null),new We(e,null,t,n)}function kt(e,t,n){return void 0===t&&(t=null),void 0===n&&(n=null),null!=e?Rt(It(e,t,null),n):null}function