@angular-eslint/eslint-plugin 1.1.1-alpha.9 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var e=require("@typescript-eslint/experimental-utils");function t(){return(t=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(e[s]=n[s])}return e}).apply(this,arguments)}const n=Object.keys;var s,r,i,a;!function(e){e.Component="Component",e.Directive="Directive",e.Injectable="Injectable",e.NgModule="NgModule",e.Pipe="Pipe"}(s||(s={})),function(e){e.Attribute="Attribute",e.Host="Host",e.Inject="Inject",e.Optional="Optional",e.Self="Self",e.SkipSelf="SkipSelf"}(r||(r={})),function(e){e.HostListener="HostListener"}(i||(i={})),function(e){e.ContentChild="ContentChild",e.ContentChildren="ContentChildren",e.HostBinding="HostBinding",e.Input="Input",e.Output="Output",e.ViewChild="ViewChild",e.ViewChildren="ViewChildren"}(a||(a={}));const o=t({},r,i,a);var l,c;!function(e){e.AfterContentChecked="AfterContentChecked",e.AfterContentInit="AfterContentInit",e.AfterViewChecked="AfterViewChecked",e.AfterViewInit="AfterViewInit",e.DoBootstrap="DoBootstrap",e.DoCheck="DoCheck",e.OnChanges="OnChanges",e.OnDestroy="OnDestroy",e.OnInit="OnInit"}(l||(l={})),function(e){e.ngAfterContentChecked="ngAfterContentChecked",e.ngAfterContentInit="ngAfterContentInit",e.ngAfterViewChecked="ngAfterViewChecked",e.ngAfterViewInit="ngAfterViewInit",e.ngDoBootstrap="ngDoBootstrap",e.ngDoCheck="ngDoCheck",e.ngOnChanges="ngOnChanges",e.ngOnDestroy="ngOnDestroy",e.ngOnInit="ngOnInit"}(c||(c={}));const u="camelCase",p="kebab-case",h=n(s),d=n(o),m=n(l),g=n(c),f=new Map([[s.Component,new Set([c.ngAfterContentChecked,c.ngAfterContentInit,c.ngAfterViewChecked,c.ngAfterViewInit,c.ngOnChanges,c.ngOnDestroy,c.ngOnInit,c.ngDoCheck])],[s.Directive,new Set([c.ngAfterContentChecked,c.ngAfterContentInit,c.ngAfterViewChecked,c.ngAfterViewInit,c.ngOnChanges,c.ngOnDestroy,c.ngOnInit,c.ngDoCheck])],[s.Injectable,new Set([c.ngOnDestroy])],[s.NgModule,new Set([c.ngDoBootstrap])],[s.Pipe,new Set([c.ngOnDestroy])]]),v=new Set(d),y=new Set(h),x=new Map([[s.Component,v],[s.Directive,v],[s.Injectable,new Set([o.Host,o.Inject,o.Optional,o.Self,o.SkipSelf])],[s.NgModule,new Set([o.Host,o.Inject,o.Optional,o.Self,o.SkipSelf])],[s.Pipe,new Set([o.Host,o.Inject,o.Optional,o.Self,o.SkipSelf])]]);function S(e){return"CallExpression"===e.type}function E(e){return"Identifier"===e.type}function _(e){return"MemberExpression"===e.type}function C(e){return"ObjectExpression"===e.type}function w(e){return"ArrayExpression"===e.type}function b(e){return"Literal"===e.type}function I(e){return"TemplateLiteral"===e.type}function T(e){return"ImportDeclaration"===e.type}function N(e){return"ImportSpecifier"===e.type}function A(e){return"Literal"===e.type&&"string"==typeof e.value}function P(e){return"MethodDefinition"===e.type}const k=e=>function(e){return"ClassDeclaration"===e.type}(e)?e.id?e.id.name:void 0:e.parent?k(e.parent):void 0,O=({decorators:e})=>null==e?void 0:e.map(M).filter(G).find(U),M=e=>{const{expression:t}=e;return E(t)?t.name:S(t)&&E(t.callee)?t.callee.name:void 0},L=e=>{const{expression:t}=e;return _(t)?t.property.name:t.name},R=e=>e.implements||[],D=e=>R(e).map(L),F=e=>D(e).filter(V),B=new Set(m),$=new Set(g),V=e=>B.has(e),j=e=>$.has(e),U=e=>y.has(e);function q(e){if("Identifier"===e.key.type)return e.key.name;if("Literal"===e.key.type)return e.key.raw;throw new Error('Unexpected "ClassProperty.key.type" provided: '+e.key.type)}const H=(e,t)=>{const n=(e=>{const{expression:t}=e;if(!S(t)||!t.arguments||0===t.arguments.length)return;const n=t.arguments[0];return C(n)&&n.properties?n:void 0})(e);if(!n||!C(n))return;const s=n.properties.find(e=>e.key&&E(e.key)&&e.key.name===t);return s&&"Property"===s.type?s:void 0},W=(e,t)=>{const n=H(e,t);if(n)return n.value},z=e=>e.body.body.filter(P),K=e=>b(e.key)?e.key.value:e.key.name;function X(e){return Array.isArray(e)?e:null!=e?[e]:[]}const G=e=>null!=e,Q={attribute:e=>0!==e.length,camelCase:e=>/^[a-zA-Z0-9[\]]+$/.test(e),element:e=>null!==e,kebabCase:e=>/^[a-z0-9-]+-[a-z0-9-]+$/.test(e),prefix(e,t){const n=new RegExp(`^\\[?(${e})`);return s=>{if(!e)return!0;if(!n.test(s))return!1;const r=s.replace(n,"");if(t===u)return!r||r[0]===r[0].toUpperCase();if(t===p)return!r||"-"===r[0];throw Error("Invalid selector style!")}}};function Y(e,t){let n=e;for(;n=n.parent;)if("Program"===n.type)return n.body.some(n=>T(n)&&n.source.value===t&&n.specifiers.some(t=>N(t)&&t.imported.name===e.name&&t.local.name===e.name));return!1}const Z=e=>{const t=e.length;return 1===t?`"${e[0]}"`:`${e.map(e=>`"${e}"`).slice(0,t-1).join(", ")} or "${[...e].pop()}"`},J=e=>RegExp(`^(${e.join("|")})$`),ee=e.ESLintUtils.RuleCreator(()=>"");var te=ee({name:"contextual-decorator",meta:{type:"suggestion",docs:{description:"Ensures that classes use contextual decorators in its body.",category:"Best Practices",recommended:!1},schema:[],messages:{contextualDecorator:'Decorator out of context for "@{{classDecoratorName}}()"'}},defaultOptions:[],create:e=>({"MethodDefinition[kind=/^(get|set|method)$/], ClassProperty, TSParameterProperty"(t){!function(e,t){var n;if(!(null==(n=t.decorators)?void 0:n.length))return;const s=function(e){for(;e.parent;){if("ClassDeclaration"===e.type)return e;e=e.parent}return null}(t);if(!s)return;const r=O(s);if(r)for(const n of t.decorators)ne(e,n,r)}(e,t)}})});function ne(e,t,n){const s=M(t);if(!s||!v.has(s))return;const r=x.get(n);r&&!r.has(s)&&e.report({node:t,messageId:"contextualDecorator",data:{classDecoratorName:n}})}const se='ClassDeclaration > Decorator:matches([expression.callee.name="Component"], [expression.callee.name="Directive"])',re='ClassDeclaration > Decorator[expression.callee.name="Component"]',ie='ClassDeclaration > Decorator[expression.callee.name="Directive"]',ae='ClassDeclaration > Decorator[expression.callee.name="Pipe"]';var oe=ee({name:"component-class-suffix",meta:{type:"suggestion",docs:{description:'Classes decorated with @Component must have suffix "Component" (or custom) in their name. See more at https://angular.io/styleguide#style-02-03.',category:"Best Practices",recommended:"error"},schema:[{type:"object",properties:{suffixes:{type:"array",items:{type:"string"}}},additionalProperties:!1}],messages:{componentClassSuffix:"The name of the class {{className}} should end with the suffix {{suffixes}} (https://angular.io/styleguide#style-02-03)"}},defaultOptions:[{suffixes:["Component"]}],create(e,[t]){const{suffixes:n}=t;return{[re](t){const s=t.parent,r=k(s);r&&n.some(e=>r.endsWith(e))||e.report({node:s.id?s.id:s,messageId:"componentClassSuffix",data:{className:r,suffixes:n}})}}}});const le="componentMaxInlineDeclarations",ce=/\r\n|\r|\n/;function ue(e){return I(e)?e.quasis[0].value.raw.trim().split(ce).length:b(e)?e.raw.trim().split(ce).length:0}var pe,he=ee({name:"component-max-inline-declarations",meta:{type:"suggestion",docs:{description:"Disallows having too many lines in inline template and styles. Forces separate template or styles file creation.",category:"Best Practices",recommended:!1},schema:[{type:"object",properties:{template:{type:"number"},styles:{type:"number"},animations:{type:"number"}},additionalProperties:!1}],messages:{componentMaxInlineDeclarations:"Exceeds the maximum allowed inline lines for {{propertyType}}. Defined limit: {{definedLimit}} / total lines: {{totalLines}} (https://angular.io/guide/styleguide#style-05-04.)"}},defaultOptions:[{template:3,styles:3,animations:15}],create:(e,[{template:t=-1,styles:n=-1,animations:s=-1}])=>(t=t>-1?t:3,n=n>-1?n:3,s=s>-1?s:15,{[re](r){const i=W(r,"template");if(i){const n=ue(i);n>t&&e.report({node:i,messageId:le,data:{propertyType:"template",definedLimit:t,totalLines:n}})}const a=W(r,"styles");if(a&&w(a)){const t=a.elements.reduce((e,t)=>e+ue(t),0);t>n&&e.report({node:a,messageId:le,data:{propertyType:"styles",definedLimit:n,totalLines:t}})}const o=W(r,"animations");if(o&&w(o)){const t=o.elements.reduce((e,t)=>e+ue(t),0);t>s&&e.report({node:o,messageId:le,data:{propertyType:"animations",definedLimit:s,totalLines:t}})}}})});function de(e){if(":"!=e[0])return[null,e];const 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 me(e){return"ng-container"===de(e)[1]}function ge(e){return"ng-content"===de(e)[1]}function fe(e){return null===e?null:de(e)[0]}function ve(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"}(pe||(pe={}));const ye={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:""};class xe{constructor({closedByChildren:e,implicitNamespacePrefix:t,contentType:n=pe.PARSABLE_DATA,closedByParent:s=!1,isVoid:r=!1,ignoreFirstLf:i=!1,preventNamespaceInheritance:a=!1}={}){this.closedByChildren={},this.closedByParent=!1,this.canSelfClose=!1,e&&e.length>0&&e.forEach(e=>this.closedByChildren[e]=!0),this.isVoid=r,this.closedByParent=s||r,this.implicitNamespacePrefix=t||null,this.contentType=n,this.ignoreFirstLf=i,this.preventNamespaceInheritance=a}isClosedByChild(e){return this.isVoid||e.toLowerCase()in this.closedByChildren}}let Se,Ee;function _e(e){var t,n;return Ee||(Se=new xe,Ee={base:new xe({isVoid:!0}),meta:new xe({isVoid:!0}),area:new xe({isVoid:!0}),embed:new xe({isVoid:!0}),link:new xe({isVoid:!0}),img:new xe({isVoid:!0}),input:new xe({isVoid:!0}),param:new xe({isVoid:!0}),hr:new xe({isVoid:!0}),br:new xe({isVoid:!0}),source:new xe({isVoid:!0}),track:new xe({isVoid:!0}),wbr:new xe({isVoid:!0}),p:new xe({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 xe({closedByChildren:["tbody","tfoot"]}),tbody:new xe({closedByChildren:["tbody","tfoot"],closedByParent:!0}),tfoot:new xe({closedByChildren:["tbody"],closedByParent:!0}),tr:new xe({closedByChildren:["tr"],closedByParent:!0}),td:new xe({closedByChildren:["td","th"],closedByParent:!0}),th:new xe({closedByChildren:["td","th"],closedByParent:!0}),col:new xe({isVoid:!0}),svg:new xe({implicitNamespacePrefix:"svg"}),foreignObject:new xe({implicitNamespacePrefix:"svg",preventNamespaceInheritance:!0}),math:new xe({implicitNamespacePrefix:"math"}),li:new xe({closedByChildren:["li"],closedByParent:!0}),dt:new xe({closedByChildren:["dt","dd"]}),dd:new xe({closedByChildren:["dt","dd"],closedByParent:!0}),rb:new xe({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),rt:new xe({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),rtc:new xe({closedByChildren:["rb","rtc","rp"],closedByParent:!0}),rp:new xe({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),optgroup:new xe({closedByChildren:["optgroup"],closedByParent:!0}),option:new xe({closedByChildren:["option","optgroup"],closedByParent:!0}),pre:new xe({ignoreFirstLf:!0}),listing:new xe({ignoreFirstLf:!0}),style:new xe({contentType:pe.RAW_TEXT}),script:new xe({contentType:pe.RAW_TEXT}),title:new xe({contentType:pe.ESCAPABLE_RAW_TEXT}),textarea:new xe({contentType:pe.ESCAPABLE_RAW_TEXT,ignoreFirstLf:!0})}),null!==(n=null!==(t=Ee[e])&&void 0!==t?t:Ee[e.toLowerCase()])&&void 0!==n?n:Se}const Ce=new RegExp("(\\:not\\()|(([\\.\\#]?)[-\\w]+)|(?:\\[([-.\\w*]+)(?:=([\"']?)([^\\]\"']*)\\5)?\\])|(\\))|(\\s*,\\s*)","g");class we{constructor(){this.element=null,this.classNames=[],this.attrs=[],this.notSelectors=[]}static parse(e){const t=[],n=(e,t)=>{t.notSelectors.length>0&&!t.element&&0==t.classNames.length&&0==t.attrs.length&&(t.element="*"),e.push(t)};let s,r=new we,i=r,a=!1;for(Ce.lastIndex=0;s=Ce.exec(e);){if(s[1]){if(a)throw new Error("Nesting :not in a selector is not allowed");a=!0,i=new we,r.notSelectors.push(i)}const e=s[2];if(e){const t=s[3];"#"===t?i.addAttribute("id",e.substr(1)):"."===t?i.addClassName(e.substr(1)):i.setElement(e)}const o=s[4];if(o&&i.addAttribute(o,s[6]),s[7]&&(a=!1,i=r),s[8]){if(a)throw new Error("Multiple selectors in :not are not supported");n(t,r),r=i=new we}}return n(t,r),t}isElementSelector(){return this.hasElementSelector()&&0==this.classNames.length&&0==this.attrs.length&&0===this.notSelectors.length}hasElementSelector(){return!!this.element}setElement(e=null){this.element=e}getMatchingElementTemplate(){const e=this.element||"div",t=this.classNames.length>0?` class="${this.classNames.join(" ")}"`:"";let n="";for(let e=0;e<this.attrs.length;e+=2)n+=` ${this.attrs[e]}${""!==this.attrs[e+1]?`="${this.attrs[e+1]}"`:""}`;return _e(e).isVoid?`<${e}${t}${n}/>`:`<${e}${t}${n}></${e}>`}getAttrs(){const e=[];return this.classNames.length>0&&e.push("class",this.classNames.join(" ")),e.concat(this.attrs)}addAttribute(e,t=""){this.attrs.push(e,t&&t.toLowerCase()||"")}addClassName(e){this.classNames.push(e.toLowerCase())}toString(){let e=this.element||"";if(this.classNames&&this.classNames.forEach(t=>e+="."+t),this.attrs)for(let t=0;t<this.attrs.length;t+=2){const n=this.attrs[t+1];e+=`[${this.attrs[t]}${n?"="+n:""}]`}return this.notSelectors.forEach(t=>e+=`:not(${t})`),e}}class be{constructor(){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=[]}static createNotMatcher(e){const t=new be;return t.addSelectables(e,null),t}addSelectables(e,t){let n=null;e.length>1&&(n=new Ie(e),this._listContexts.push(n));for(let s=0;s<e.length;s++)this._addSelectable(e[s],t,n)}_addSelectable(e,t,n){let s=this;const r=e.element,i=e.classNames,a=e.attrs,o=new Te(e,t,n);if(r&&(0===a.length&&0===i.length?this._addTerminal(s._elementMap,r,o):s=this._addPartial(s._elementPartialMap,r)),i)for(let e=0;e<i.length;e++){const t=i[e];0===a.length&&e===i.length-1?this._addTerminal(s._classMap,t,o):s=this._addPartial(s._classPartialMap,t)}if(a)for(let e=0;e<a.length;e+=2){const t=a[e],n=a[e+1];if(e===a.length-2){const e=s._attrValueMap;let r=e.get(t);r||(r=new Map,e.set(t,r)),this._addTerminal(r,n,o)}else{const e=s._attrValuePartialMap;let r=e.get(t);r||(r=new Map,e.set(t,r)),s=this._addPartial(r,n)}}}_addTerminal(e,t,n){let s=e.get(t);s||(s=[],e.set(t,s)),s.push(n)}_addPartial(e,t){let n=e.get(t);return n||(n=new be,e.set(t,n)),n}match(e,t){let n=!1;const s=e.element,r=e.classNames,i=e.attrs;for(let e=0;e<this._listContexts.length;e++)this._listContexts[e].alreadyMatched=!1;if(n=this._matchTerminal(this._elementMap,s,e,t)||n,n=this._matchPartial(this._elementPartialMap,s,e,t)||n,r)for(let s=0;s<r.length;s++){const i=r[s];n=this._matchTerminal(this._classMap,i,e,t)||n,n=this._matchPartial(this._classPartialMap,i,e,t)||n}if(i)for(let s=0;s<i.length;s+=2){const r=i[s],a=i[s+1],o=this._attrValueMap.get(r);a&&(n=this._matchTerminal(o,"",e,t)||n),n=this._matchTerminal(o,a,e,t)||n;const l=this._attrValuePartialMap.get(r);a&&(n=this._matchPartial(l,"",e,t)||n),n=this._matchPartial(l,a,e,t)||n}return n}_matchTerminal(e,t,n,s){if(!e||"string"!=typeof t)return!1;let r=e.get(t)||[];const i=e.get("*");if(i&&(r=r.concat(i)),0===r.length)return!1;let a,o=!1;for(let e=0;e<r.length;e++)a=r[e],o=a.finalize(n,s)||o;return o}_matchPartial(e,t,n,s){if(!e||"string"!=typeof t)return!1;const r=e.get(t);return!!r&&r.match(n,s)}}class Ie{constructor(e){this.selectors=e,this.alreadyMatched=!1}}class Te{constructor(e,t,n){this.selector=e,this.cbContext=t,this.listContext=n,this.notSelectors=e.notSelectors}finalize(e,t){let n=!0;return!(this.notSelectors.length>0)||this.listContext&&this.listContext.alreadyMatched||(n=!be.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}}var Ne,Ae,Pe,ke,Oe,Me;function Le(e){const t=function(e){const t=e.classNames&&e.classNames.length?[8,...e.classNames]:[];return[e.element&&"*"!==e.element?e.element:"",...e.attrs,...t]}(e),n=e.notSelectors&&e.notSelectors.length?e.notSelectors.map(e=>function(e){const t=e.classNames&&e.classNames.length?[8,...e.classNames]:[];return e.element?[5,e.element,...e.attrs,...t]:e.attrs.length?[3,...e.attrs,...t]:e.classNames&&e.classNames.length?[9,...e.classNames]:[]}(e)):[];return t.concat(...n)}function Re(e){return e?we.parse(e).map(Le):[]}!function(e){e[e.Emulated=0]="Emulated",e[e.None=2]="None",e[e.ShadowDom=3]="ShadowDom"}(Ne||(Ne={})),function(e){e[e.OnPush=0]="OnPush",e[e.Default=1]="Default"}(Ae||(Ae={})),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"}(Pe||(Pe={})),function(e){e[e.Error=0]="Error",e[e.Warning=1]="Warning",e[e.Ignore=2]="Ignore"}(ke||(ke={})),function(e){e[e.Const=0]="Const"}(Oe||(Oe={}));class De{constructor(e=[]){this.modifiers=e}hasModifier(e){return-1!==this.modifiers.indexOf(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"}(Me||(Me={}));class Fe extends De{constructor(e,t){super(t),this.name=e}visitType(e,t){return e.visitBuiltinType(this,t)}}class Be extends De{constructor(e,t,n=null){super(t),this.value=e,this.typeParams=n}visitType(e,t){return e.visitExpressionType(this,t)}}const $e=new Fe(Me.Dynamic),Ve=new Fe(Me.Inferred),je=new Fe(Me.Bool),Ue=(new Fe(Me.Int),new Fe(Me.Number)),qe=new Fe(Me.String),He=(new Fe(Me.Function),new Fe(Me.None));var We,ze,Ke,Xe;function Ge(e,t){const n=e.length;if(n!==t.length)return!1;for(let s=0;s<n;s++)if(!e[s].isEquivalent(t[s]))return!1;return!0}!function(e){e[e.Minus=0]="Minus",e[e.Plus=1]="Plus"}(We||(We={})),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"}(ze||(ze={}));class Qe{constructor(e,t){this.type=e||null,this.sourceSpan=t||null}prop(e,t){return new wt(this,e,null,t)}key(e,t,n){return new bt(this,e,t,n)}callMethod(e,t,n){return new st(this,e,t,null,n)}callFn(e,t,n){return new rt(this,e,null,t,n)}instantiate(e,t,n){return new it(this,e,t,n)}conditional(e,t=null,n){return new ft(this,e,t,null,n)}equals(e,t){return new Ct(ze.Equals,this,e,null,t)}notEquals(e,t){return new Ct(ze.NotEquals,this,e,null,t)}identical(e,t){return new Ct(ze.Identical,this,e,null,t)}notIdentical(e,t){return new Ct(ze.NotIdentical,this,e,null,t)}minus(e,t){return new Ct(ze.Minus,this,e,null,t)}plus(e,t){return new Ct(ze.Plus,this,e,null,t)}divide(e,t){return new Ct(ze.Divide,this,e,null,t)}multiply(e,t){return new Ct(ze.Multiply,this,e,null,t)}modulo(e,t){return new Ct(ze.Modulo,this,e,null,t)}and(e,t){return new Ct(ze.And,this,e,null,t)}bitwiseAnd(e,t,n=!0){return new Ct(ze.BitwiseAnd,this,e,null,t,n)}or(e,t){return new Ct(ze.Or,this,e,null,t)}lower(e,t){return new Ct(ze.Lower,this,e,null,t)}lowerEquals(e,t){return new Ct(ze.LowerEquals,this,e,null,t)}bigger(e,t){return new Ct(ze.Bigger,this,e,null,t)}biggerEquals(e,t){return new Ct(ze.BiggerEquals,this,e,null,t)}isBlank(e){return this.equals(Pt,e)}cast(e,t){return new xt(this,e,t)}toStmt(){return new Dt(this,null)}}!function(e){e[e.This=0]="This",e[e.Super=1]="Super",e[e.CatchError=2]="CatchError",e[e.CatchStack=3]="CatchStack"}(Ke||(Ke={}));class Ye extends Qe{constructor(e,t,n){super(t,n),"string"==typeof e?(this.name=e,this.builtin=null):(this.name=null,this.builtin=e)}isEquivalent(e){return e instanceof Ye&&this.name===e.name&&this.builtin===e.builtin}isConstant(){return!1}visitExpression(e,t){return e.visitReadVarExpr(this,t)}set(e){if(!this.name)throw new Error(`Built in variable ${this.builtin} can not be assigned to.`);return new et(this.name,e,null,this.sourceSpan)}}class Ze extends Qe{constructor(e,t,n){super(t,n),this.expr=e}visitExpression(e,t){return e.visitTypeofExpr(this,t)}isEquivalent(e){return e instanceof Ze&&e.expr.isEquivalent(this.expr)}isConstant(){return this.expr.isConstant()}}class Je extends Qe{constructor(e,t,n){super(t,n),this.node=e}isEquivalent(e){return e instanceof Je&&this.node===e.node}isConstant(){return!1}visitExpression(e,t){return e.visitWrappedNodeExpr(this,t)}}class et extends Qe{constructor(e,t,n,s){super(n||t.type,s),this.name=e,this.value=t}isEquivalent(e){return e instanceof et&&this.name===e.name&&this.value.isEquivalent(e.value)}isConstant(){return!1}visitExpression(e,t){return e.visitWriteVarExpr(this,t)}toDeclStmt(e,t){return new Lt(this.name,this.value,e,t,this.sourceSpan)}toConstDecl(){return this.toDeclStmt(Ve,[kt.Final])}}class tt extends Qe{constructor(e,t,n,s,r){super(s||n.type,r),this.receiver=e,this.index=t,this.value=n}isEquivalent(e){return e instanceof tt&&this.receiver.isEquivalent(e.receiver)&&this.index.isEquivalent(e.index)&&this.value.isEquivalent(e.value)}isConstant(){return!1}visitExpression(e,t){return e.visitWriteKeyExpr(this,t)}}class nt extends Qe{constructor(e,t,n,s,r){super(s||n.type,r),this.receiver=e,this.name=t,this.value=n}isEquivalent(e){return e instanceof nt&&this.receiver.isEquivalent(e.receiver)&&this.name===e.name&&this.value.isEquivalent(e.value)}isConstant(){return!1}visitExpression(e,t){return e.visitWritePropExpr(this,t)}}!function(e){e[e.ConcatArray=0]="ConcatArray",e[e.SubscribeObservable=1]="SubscribeObservable",e[e.Bind=2]="Bind"}(Xe||(Xe={}));class st extends Qe{constructor(e,t,n,s,r){super(s,r),this.receiver=e,this.args=n,"string"==typeof t?(this.name=t,this.builtin=null):(this.name=null,this.builtin=t)}isEquivalent(e){return e instanceof st&&this.receiver.isEquivalent(e.receiver)&&this.name===e.name&&this.builtin===e.builtin&&Ge(this.args,e.args)}isConstant(){return!1}visitExpression(e,t){return e.visitInvokeMethodExpr(this,t)}}class rt extends Qe{constructor(e,t,n,s,r=!1){super(n,s),this.fn=e,this.args=t,this.pure=r}isEquivalent(e){return e instanceof rt&&this.fn.isEquivalent(e.fn)&&Ge(this.args,e.args)&&this.pure===e.pure}isConstant(){return!1}visitExpression(e,t){return e.visitInvokeFunctionExpr(this,t)}}class it extends Qe{constructor(e,t,n,s){super(n,s),this.classExpr=e,this.args=t}isEquivalent(e){return e instanceof it&&this.classExpr.isEquivalent(e.classExpr)&&Ge(this.args,e.args)}isConstant(){return!1}visitExpression(e,t){return e.visitInstantiateExpr(this,t)}}class at extends Qe{constructor(e,t,n){super(t,n),this.value=e}isEquivalent(e){return e instanceof at&&this.value===e.value}isConstant(){return!0}visitExpression(e,t){return e.visitLiteralExpr(this,t)}}class ot{constructor(e,t){this.text=e,this.sourceSpan=t}}class lt extends ot{}class ct extends ot{}class ut extends Qe{constructor(e,t,n,s,r){super(qe,r),this.metaBlock=e,this.messageParts=t,this.placeHolderNames=n,this.expressions=s}isEquivalent(e){return!1}isConstant(){return!1}visitExpression(e,t){return e.visitLocalizedString(this,t)}serializeI18nHead(){let 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(t=>{e=`${e}␟${t}`}),mt(e,this.messageParts[0].text,this.getMessagePartSourceSpan(0))}getMessagePartSourceSpan(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}getPlaceholderSourceSpan(e){var t,n,s,r;return null!==(r=null!==(n=null===(t=this.placeHolderNames[e])||void 0===t?void 0:t.sourceSpan)&&void 0!==n?n:null===(s=this.expressions[e])||void 0===s?void 0:s.sourceSpan)&&void 0!==r?r:this.sourceSpan}serializeI18nTemplatePart(e){return mt(this.placeHolderNames[e-1].text,this.messageParts[e].text,this.getMessagePartSourceSpan(e))}}const pt=e=>e.replace(/\\/g,"\\\\"),ht=e=>e.replace(/:/g,"\\:"),dt=e=>e.replace(/`/g,"\\`").replace(/\${/g,"$\\{");function mt(e,t,n){return""===e?{cooked:t,raw:dt((s=pt(t),s.replace(/^:/,"\\:"))),range:n}:{cooked:`:${e}:${t}`,raw:dt(`:${ht(pt(e))}:${pt(t)}`),range:n};var s}class gt extends Qe{constructor(e,t,n=null,s){super(t,s),this.value=e,this.typeParams=n}isEquivalent(e){return e instanceof gt&&this.value.name===e.value.name&&this.value.moduleName===e.value.moduleName&&this.value.runtime===e.value.runtime}isConstant(){return!1}visitExpression(e,t){return e.visitExternalExpr(this,t)}}class ft extends Qe{constructor(e,t,n=null,s,r){super(s||t.type,r),this.condition=e,this.falseCase=n,this.trueCase=t}isEquivalent(e){return e instanceof ft&&this.condition.isEquivalent(e.condition)&&this.trueCase.isEquivalent(e.trueCase)&&(n=e.falseCase,null==(t=this.falseCase)||null==n?t==n:t.isEquivalent(n));var t,n}isConstant(){return!1}visitExpression(e,t){return e.visitConditionalExpr(this,t)}}class vt extends Qe{constructor(e,t){super(je,t),this.condition=e}isEquivalent(e){return e instanceof vt&&this.condition.isEquivalent(e.condition)}isConstant(){return!1}visitExpression(e,t){return e.visitNotExpr(this,t)}}class yt extends Qe{constructor(e,t){super(e.type,t),this.condition=e}isEquivalent(e){return e instanceof yt&&this.condition.isEquivalent(e.condition)}isConstant(){return!1}visitExpression(e,t){return e.visitAssertNotNullExpr(this,t)}}class xt extends Qe{constructor(e,t,n){super(t,n),this.value=e}isEquivalent(e){return e instanceof xt&&this.value.isEquivalent(e.value)}isConstant(){return!1}visitExpression(e,t){return e.visitCastExpr(this,t)}}class St{constructor(e,t=null){this.name=e,this.type=t}isEquivalent(e){return this.name===e.name}}class Et extends Qe{constructor(e,t,n,s,r){super(n,s),this.params=e,this.statements=t,this.name=r}isEquivalent(e){return e instanceof Et&&Ge(this.params,e.params)&&Ge(this.statements,e.statements)}isConstant(){return!1}visitExpression(e,t){return e.visitFunctionExpr(this,t)}toDeclStmt(e,t){return new Rt(e,this.params,this.statements,this.type,t,this.sourceSpan)}}class _t extends Qe{constructor(e,t,n,s,r=!0){super(n||Ue,s),this.operator=e,this.expr=t,this.parens=r}isEquivalent(e){return e instanceof _t&&this.operator===e.operator&&this.expr.isEquivalent(e.expr)}isConstant(){return!1}visitExpression(e,t){return e.visitUnaryOperatorExpr(this,t)}}class Ct extends Qe{constructor(e,t,n,s,r,i=!0){super(s||t.type,r),this.operator=e,this.rhs=n,this.parens=i,this.lhs=t}isEquivalent(e){return e instanceof Ct&&this.operator===e.operator&&this.lhs.isEquivalent(e.lhs)&&this.rhs.isEquivalent(e.rhs)}isConstant(){return!1}visitExpression(e,t){return e.visitBinaryOperatorExpr(this,t)}}class wt extends Qe{constructor(e,t,n,s){super(n,s),this.receiver=e,this.name=t}isEquivalent(e){return e instanceof wt&&this.receiver.isEquivalent(e.receiver)&&this.name===e.name}isConstant(){return!1}visitExpression(e,t){return e.visitReadPropExpr(this,t)}set(e){return new nt(this.receiver,this.name,e,null,this.sourceSpan)}}class bt extends Qe{constructor(e,t,n,s){super(n,s),this.receiver=e,this.index=t}isEquivalent(e){return e instanceof bt&&this.receiver.isEquivalent(e.receiver)&&this.index.isEquivalent(e.index)}isConstant(){return!1}visitExpression(e,t){return e.visitReadKeyExpr(this,t)}set(e){return new tt(this.receiver,this.index,e,null,this.sourceSpan)}}class It extends Qe{constructor(e,t,n){super(t,n),this.entries=e}isConstant(){return this.entries.every(e=>e.isConstant())}isEquivalent(e){return e instanceof It&&Ge(this.entries,e.entries)}visitExpression(e,t){return e.visitLiteralArrayExpr(this,t)}}class Tt{constructor(e,t,n){this.key=e,this.value=t,this.quoted=n}isEquivalent(e){return this.key===e.key&&this.value.isEquivalent(e.value)}}class Nt extends Qe{constructor(e,t,n){super(t,n),this.entries=e,this.valueType=null,t&&(this.valueType=t.valueType)}isEquivalent(e){return e instanceof Nt&&Ge(this.entries,e.entries)}isConstant(){return this.entries.every(e=>e.value.isConstant())}visitExpression(e,t){return e.visitLiteralMapExpr(this,t)}}new Ye(Ke.This,null,null),new Ye(Ke.Super,null,null),new Ye(Ke.CatchError,null,null),new Ye(Ke.CatchStack,null,null);const At=new at(null,null,null),Pt=new at(null,Ve,null);var kt;!function(e){e[e.Final=0]="Final",e[e.Private=1]="Private",e[e.Exported=2]="Exported",e[e.Static=3]="Static"}(kt||(kt={}));class Ot extends class{constructor(e,t,n){this.text=e,this.multiline=t,this.trailingNewline=n}toString(){return this.multiline?` ${this.text} `:this.text}}{constructor(e){super("",!0,!0),this.tags=e}toString(){return function(e){if(0===e.length)return"";if(1===e.length&&e[0].tagName&&!e[0].text)return`*${Gt(e[0])} `;let t="*\n";for(const n of e)t+=" *",t+=Gt(n).replace(/\n/g,"\n * "),t+="\n";return t+=" ",t}(this.tags)}}class Mt{constructor(e=[],t=null,n){this.modifiers=e,this.sourceSpan=t,this.leadingComments=n}hasModifier(e){return-1!==this.modifiers.indexOf(e)}addLeadingComment(e){var t;this.leadingComments=null!==(t=this.leadingComments)&&void 0!==t?t:[],this.leadingComments.push(e)}}class Lt extends Mt{constructor(e,t,n,s,r,i){super(s,r,i),this.name=e,this.value=t,this.type=n||t&&t.type||null}isEquivalent(e){return e instanceof Lt&&this.name===e.name&&(this.value?!!e.value&&this.value.isEquivalent(e.value):!e.value)}visitStatement(e,t){return e.visitDeclareVarStmt(this,t)}}class Rt extends Mt{constructor(e,t,n,s,r,i,a){super(r,i,a),this.name=e,this.params=t,this.statements=n,this.type=s||null}isEquivalent(e){return e instanceof Rt&&Ge(this.params,e.params)&&Ge(this.statements,e.statements)}visitStatement(e,t){return e.visitDeclareFunctionStmt(this,t)}}class Dt extends Mt{constructor(e,t,n){super([],t,n),this.expr=e}isEquivalent(e){return e instanceof Dt&&this.expr.isEquivalent(e.expr)}visitStatement(e,t){return e.visitExpressionStmt(this,t)}}class Ft extends Mt{constructor(e,t=null,n){super([],t,n),this.value=e}isEquivalent(e){return e instanceof Ft&&this.value.isEquivalent(e.value)}visitStatement(e,t){return e.visitReturnStmt(this,t)}}class Bt extends Mt{constructor(e,t,n=[],s,r){super([],s,r),this.condition=e,this.trueCase=t,this.falseCase=n}isEquivalent(e){return e instanceof Bt&&this.condition.isEquivalent(e.condition)&&Ge(this.trueCase,e.trueCase)&&Ge(this.falseCase,e.falseCase)}visitStatement(e,t){return e.visitIfStmt(this,t)}}function $t(e,t,n){return new Ye(e,t,n)}function Vt(e,t=null,n){return new gt(e,null,t,n)}function jt(e,t,n){return new Be(e,t,n)}function Ut(e){return new Ze(e)}function qt(e,t,n){return new It(e,t,n)}function Ht(e,t=null){return new Nt(e.map(e=>new Tt(e.key,e.value,e.quoted)),t,null)}function Wt(e,t,n,s,r){return new Et(e,t,n,s,r)}function zt(e,t,n,s,r){return new Bt(e,t,n,s,r)}function Kt(e,t,n){return new at(e,t,n)}function Xt(e){return e instanceof at&&null===e.value}function Gt(e){let t="";if(e.tagName&&(t+=" @"+e.tagName),e.text){if(e.text.match(/\/\*|\*\//))throw new Error('JSDoc text cannot contain "/*" and "*/"');t+=" "+e.text.replace(/@/g,"\\@")}return t}const Qt=/-+([a-z0-9])/g;function Yt(e,t){return Zt(e,":",t)}function Zt(e,t,n){const s=e.indexOf(t);return-1==s?n:[e.slice(0,s).trim(),e.slice(s+1).trim()]}function Jt(e){throw new Error("Internal Error: "+e)}function en(e){return e.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")}function tn(e){let t="";for(let n=0;n<e.length;n++){let s=e.charCodeAt(n);if(s>=55296&&s<=56319&&e.length>n+1){const t=e.charCodeAt(n+1);t>=56320&&t<=57343&&(n++,s=(s-55296<<10)+t-56320+65536)}s<=127?t+=String.fromCharCode(s):s<=2047?t+=String.fromCharCode(s>>6&31|192,63&s|128):s<=65535?t+=String.fromCharCode(s>>12|224,s>>6&63|128,63&s|128):s<=2097151&&(t+=String.fromCharCode(s>>18&7|240,s>>12&63|128,s>>6&63|128,63&s|128))}return t}function nn(e){if("string"==typeof e)return e;if(Array.isArray(e))return"["+e.map(nn).join(", ")+"]";if(null==e)return""+e;if(e.overriddenName)return""+e.overriddenName;if(e.name)return""+e.name;if(!e.toString)return"object";const t=e.toString();if(null==t)return""+t;const n=t.indexOf("\n");return-1===n?t:t.substring(0,n)}const sn="undefined"!=typeof window&&window,rn="undefined"!=typeof self&&"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&self,an="undefined"!=typeof global&&global||sn||rn,on=$t("<unknown>"),ln={};class cn extends Qe{constructor(e){super(e.type),this.resolved=e,this.original=e}visitExpression(e,t){return t===ln?this.original.visitExpression(e,t):this.resolved.visitExpression(e,t)}isEquivalent(e){return e instanceof cn&&this.resolved.isEquivalent(e.resolved)}isConstant(){return!0}fixup(e){this.resolved=e,this.shared=!0}}class un{constructor(e=!1){this.isClosureCompilerEnabled=e,this.statements=[],this.literals=new Map,this.literalFactories=new Map,this.injectorDefinitions=new Map,this.directiveDefinitions=new Map,this.componentDefinitions=new Map,this.pipeDefinitions=new Map,this.nextNameIndex=0}getConstLiteral(e,t){if(e instanceof at&&!mn(e)||e instanceof cn)return e;const n=this.keyOf(e);let s=this.literals.get(n),r=!1;if(s||(s=new cn(e),this.literals.set(n,s),r=!0),!r&&!s.shared||r&&t){const t=this.freshName();let n,r;this.isClosureCompilerEnabled&&mn(e)?(n=$t(t).set(new Et([],[new Ft(e)])),r=$t(t).callFn([])):(n=$t(t).set(e),r=$t(t)),this.statements.push(n.toDeclStmt(Ve,[kt.Final])),s.fixup(r)}return s}getDefinition(e,t,n,s=!1){const r=this.definitionsOf(t);let i=r.get(e),a=!1;if(!i){const s=this.propertyNameOf(t);i=new cn(n.importExpr(e).prop(s)),r.set(e,i),a=!0}if(!a&&!i.shared||a&&s){const e=this.freshName();this.statements.push($t(e).set(i.resolved).toDeclStmt(Ve,[kt.Final])),i.fixup($t(e))}return i}getLiteralFactory(e){if(e instanceof It){const t=e.entries.map(e=>e.isConstant()?e:on),n=this.keyOf(qt(t));return this._getLiteralFactory(n,e.entries,e=>qt(e))}{const t=Ht(e.entries.map(e=>({key:e.key,value:e.value.isConstant()?e.value:on,quoted:e.quoted}))),n=this.keyOf(t);return this._getLiteralFactory(n,e.entries.map(e=>e.value),t=>Ht(t.map((t,n)=>({key:e.entries[n].key,value:t,quoted:e.entries[n].quoted}))))}}_getLiteralFactory(e,t,n){let s=this.literalFactories.get(e);const r=t.filter(e=>!e.isConstant());if(!s){const r=t.map((e,t)=>e.isConstant()?this.getConstLiteral(e,!0):$t("a"+t)),i=Wt(r.filter(dn).map(e=>new St(e.name,$e)),[new Ft(n(r))],Ve),a=this.freshName();this.statements.push($t(a).set(i).toDeclStmt(Ve,[kt.Final])),s=$t(a),this.literalFactories.set(e,s)}return{literalFactory:s,literalFactoryArguments:r}}uniqueName(e){return`${e}${this.nextNameIndex++}`}definitionsOf(e){switch(e){case 2:return this.componentDefinitions;case 1:return this.directiveDefinitions;case 0:return this.injectorDefinitions;case 3:return this.pipeDefinitions}return Jt("Unknown definition kind "+e),this.componentDefinitions}propertyNameOf(e){switch(e){case 2:return"ɵcmp";case 1:return"ɵdir";case 0:return"ɵinj";case 3:return"ɵpipe"}return Jt("Unknown definition kind "+e),"<unknown>"}freshName(){return this.uniqueName("_c")}keyOf(e){return e.visitExpression(new pn,ln)}}class pn{constructor(){this.visitWrappedNodeExpr=hn,this.visitWriteVarExpr=hn,this.visitWriteKeyExpr=hn,this.visitWritePropExpr=hn,this.visitInvokeMethodExpr=hn,this.visitInvokeFunctionExpr=hn,this.visitInstantiateExpr=hn,this.visitConditionalExpr=hn,this.visitNotExpr=hn,this.visitAssertNotNullExpr=hn,this.visitCastExpr=hn,this.visitFunctionExpr=hn,this.visitUnaryOperatorExpr=hn,this.visitBinaryOperatorExpr=hn,this.visitReadPropExpr=hn,this.visitReadKeyExpr=hn,this.visitCommaExpr=hn,this.visitLocalizedString=hn}visitLiteralExpr(e){return""+("string"==typeof e.value?'"'+e.value+'"':e.value)}visitLiteralArrayExpr(e,t){return`[${e.entries.map(e=>e.visitExpression(this,t)).join(",")}]`}visitLiteralMapExpr(e,t){return"{"+e.entries.map(e=>`${(e=>{const t=e.quoted?'"':"";return`${t}${e.key}${t}`})(e)}:${e.value.visitExpression(this,t)}`).join(",")}visitExternalExpr(e){return e.value.moduleName?`EX:${e.value.moduleName}:${e.value.name}`:"EX:"+e.value.runtime.name}visitReadVarExpr(e){return"VAR:"+e.name}visitTypeofExpr(e,t){return"TYPEOF:"+e.expr.visitExpression(this,t)}}function hn(e){throw new Error(`Invalid state: Visitor ${this.constructor.name} doesn't handle ${e.constructor.name}`)}function dn(e){return e instanceof Ye}function mn(e){return e instanceof at&&"string"==typeof e.value&&e.value.length>=50}const gn="@angular/core";class fn{}function vn(e){return e.replace(/\W/g,"_")}fn.ANALYZE_FOR_ENTRY_COMPONENTS={name:"ANALYZE_FOR_ENTRY_COMPONENTS",moduleName:gn},fn.ElementRef={name:"ElementRef",moduleName:gn},fn.NgModuleRef={name:"NgModuleRef",moduleName:gn},fn.ViewContainerRef={name:"ViewContainerRef",moduleName:gn},fn.ChangeDetectorRef={name:"ChangeDetectorRef",moduleName:gn},fn.QueryList={name:"QueryList",moduleName:gn},fn.TemplateRef={name:"TemplateRef",moduleName:gn},fn.Renderer2={name:"Renderer2",moduleName:gn},fn.CodegenComponentFactoryResolver={name:"ɵCodegenComponentFactoryResolver",moduleName:gn},fn.ComponentFactoryResolver={name:"ComponentFactoryResolver",moduleName:gn},fn.ComponentFactory={name:"ComponentFactory",moduleName:gn},fn.ComponentRef={name:"ComponentRef",moduleName:gn},fn.NgModuleFactory={name:"NgModuleFactory",moduleName:gn},fn.createModuleFactory={name:"ɵcmf",moduleName:gn},fn.moduleDef={name:"ɵmod",moduleName:gn},fn.moduleProviderDef={name:"ɵmpd",moduleName:gn},fn.RegisterModuleFactoryFn={name:"ɵregisterModuleFactory",moduleName:gn},fn.inject={name:"ɵɵinject",moduleName:gn},fn.directiveInject={name:"ɵɵdirectiveInject",moduleName:gn},fn.INJECTOR={name:"INJECTOR",moduleName:gn},fn.Injector={name:"Injector",moduleName:gn},fn.ɵɵdefineInjectable={name:"ɵɵdefineInjectable",moduleName:gn},fn.InjectableDef={name:"ɵɵInjectableDef",moduleName:gn},fn.ViewEncapsulation={name:"ViewEncapsulation",moduleName:gn},fn.ChangeDetectionStrategy={name:"ChangeDetectionStrategy",moduleName:gn},fn.SecurityContext={name:"SecurityContext",moduleName:gn},fn.LOCALE_ID={name:"LOCALE_ID",moduleName:gn},fn.TRANSLATIONS_FORMAT={name:"TRANSLATIONS_FORMAT",moduleName:gn},fn.inlineInterpolate={name:"ɵinlineInterpolate",moduleName:gn},fn.interpolate={name:"ɵinterpolate",moduleName:gn},fn.EMPTY_ARRAY={name:"ɵEMPTY_ARRAY",moduleName:gn},fn.EMPTY_MAP={name:"ɵEMPTY_MAP",moduleName:gn},fn.Renderer={name:"Renderer",moduleName:gn},fn.viewDef={name:"ɵvid",moduleName:gn},fn.elementDef={name:"ɵeld",moduleName:gn},fn.anchorDef={name:"ɵand",moduleName:gn},fn.textDef={name:"ɵted",moduleName:gn},fn.directiveDef={name:"ɵdid",moduleName:gn},fn.providerDef={name:"ɵprd",moduleName:gn},fn.queryDef={name:"ɵqud",moduleName:gn},fn.pureArrayDef={name:"ɵpad",moduleName:gn},fn.pureObjectDef={name:"ɵpod",moduleName:gn},fn.purePipeDef={name:"ɵppd",moduleName:gn},fn.pipeDef={name:"ɵpid",moduleName:gn},fn.nodeValue={name:"ɵnov",moduleName:gn},fn.ngContentDef={name:"ɵncd",moduleName:gn},fn.unwrapValue={name:"ɵunv",moduleName:gn},fn.createRendererType2={name:"ɵcrt",moduleName:gn},fn.RendererType2={name:"RendererType2",moduleName:gn},fn.ViewDefinition={name:"ɵViewDefinition",moduleName:gn},fn.createComponentFactory={name:"ɵccf",moduleName:gn},fn.setClassMetadata={name:"ɵsetClassMetadata",moduleName:gn};let yn=0;var xn;!function(e){e[e.Pipe=0]="Pipe",e[e.Directive=1]="Directive",e[e.NgModule=2]="NgModule",e[e.Injectable=3]="Injectable"}(xn||(xn={}));const Sn="@angular/core";class En{}function _n(e){return Ht(Object.keys(e).map(t=>({key:t,value:e[t],quoted:!1})))}function Cn(e,t){if(0===t)return jt(e);const n=[];for(let e=0;e<t;e++)n.push($e);return jt(e,void 0,n)}function wn(e){return"@"+e}function bn(e,t){return`animation_${e}_${t}`}En.NEW_METHOD="factory",En.TRANSFORM_METHOD="transform",En.PATCH_DEPS="patchedDeps",En.namespaceHTML={name:"ɵɵnamespaceHTML",moduleName:Sn},En.namespaceMathML={name:"ɵɵnamespaceMathML",moduleName:Sn},En.namespaceSVG={name:"ɵɵnamespaceSVG",moduleName:Sn},En.element={name:"ɵɵelement",moduleName:Sn},En.elementStart={name:"ɵɵelementStart",moduleName:Sn},En.elementEnd={name:"ɵɵelementEnd",moduleName:Sn},En.advance={name:"ɵɵadvance",moduleName:Sn},En.syntheticHostProperty={name:"ɵɵsyntheticHostProperty",moduleName:Sn},En.syntheticHostListener={name:"ɵɵsyntheticHostListener",moduleName:Sn},En.attribute={name:"ɵɵattribute",moduleName:Sn},En.attributeInterpolate1={name:"ɵɵattributeInterpolate1",moduleName:Sn},En.attributeInterpolate2={name:"ɵɵattributeInterpolate2",moduleName:Sn},En.attributeInterpolate3={name:"ɵɵattributeInterpolate3",moduleName:Sn},En.attributeInterpolate4={name:"ɵɵattributeInterpolate4",moduleName:Sn},En.attributeInterpolate5={name:"ɵɵattributeInterpolate5",moduleName:Sn},En.attributeInterpolate6={name:"ɵɵattributeInterpolate6",moduleName:Sn},En.attributeInterpolate7={name:"ɵɵattributeInterpolate7",moduleName:Sn},En.attributeInterpolate8={name:"ɵɵattributeInterpolate8",moduleName:Sn},En.attributeInterpolateV={name:"ɵɵattributeInterpolateV",moduleName:Sn},En.classProp={name:"ɵɵclassProp",moduleName:Sn},En.elementContainerStart={name:"ɵɵelementContainerStart",moduleName:Sn},En.elementContainerEnd={name:"ɵɵelementContainerEnd",moduleName:Sn},En.elementContainer={name:"ɵɵelementContainer",moduleName:Sn},En.styleMap={name:"ɵɵstyleMap",moduleName:Sn},En.styleMapInterpolate1={name:"ɵɵstyleMapInterpolate1",moduleName:Sn},En.styleMapInterpolate2={name:"ɵɵstyleMapInterpolate2",moduleName:Sn},En.styleMapInterpolate3={name:"ɵɵstyleMapInterpolate3",moduleName:Sn},En.styleMapInterpolate4={name:"ɵɵstyleMapInterpolate4",moduleName:Sn},En.styleMapInterpolate5={name:"ɵɵstyleMapInterpolate5",moduleName:Sn},En.styleMapInterpolate6={name:"ɵɵstyleMapInterpolate6",moduleName:Sn},En.styleMapInterpolate7={name:"ɵɵstyleMapInterpolate7",moduleName:Sn},En.styleMapInterpolate8={name:"ɵɵstyleMapInterpolate8",moduleName:Sn},En.styleMapInterpolateV={name:"ɵɵstyleMapInterpolateV",moduleName:Sn},En.classMap={name:"ɵɵclassMap",moduleName:Sn},En.classMapInterpolate1={name:"ɵɵclassMapInterpolate1",moduleName:Sn},En.classMapInterpolate2={name:"ɵɵclassMapInterpolate2",moduleName:Sn},En.classMapInterpolate3={name:"ɵɵclassMapInterpolate3",moduleName:Sn},En.classMapInterpolate4={name:"ɵɵclassMapInterpolate4",moduleName:Sn},En.classMapInterpolate5={name:"ɵɵclassMapInterpolate5",moduleName:Sn},En.classMapInterpolate6={name:"ɵɵclassMapInterpolate6",moduleName:Sn},En.classMapInterpolate7={name:"ɵɵclassMapInterpolate7",moduleName:Sn},En.classMapInterpolate8={name:"ɵɵclassMapInterpolate8",moduleName:Sn},En.classMapInterpolateV={name:"ɵɵclassMapInterpolateV",moduleName:Sn},En.styleProp={name:"ɵɵstyleProp",moduleName:Sn},En.stylePropInterpolate1={name:"ɵɵstylePropInterpolate1",moduleName:Sn},En.stylePropInterpolate2={name:"ɵɵstylePropInterpolate2",moduleName:Sn},En.stylePropInterpolate3={name:"ɵɵstylePropInterpolate3",moduleName:Sn},En.stylePropInterpolate4={name:"ɵɵstylePropInterpolate4",moduleName:Sn},En.stylePropInterpolate5={name:"ɵɵstylePropInterpolate5",moduleName:Sn},En.stylePropInterpolate6={name:"ɵɵstylePropInterpolate6",moduleName:Sn},En.stylePropInterpolate7={name:"ɵɵstylePropInterpolate7",moduleName:Sn},En.stylePropInterpolate8={name:"ɵɵstylePropInterpolate8",moduleName:Sn},En.stylePropInterpolateV={name:"ɵɵstylePropInterpolateV",moduleName:Sn},En.nextContext={name:"ɵɵnextContext",moduleName:Sn},En.templateCreate={name:"ɵɵtemplate",moduleName:Sn},En.text={name:"ɵɵtext",moduleName:Sn},En.enableBindings={name:"ɵɵenableBindings",moduleName:Sn},En.disableBindings={name:"ɵɵdisableBindings",moduleName:Sn},En.getCurrentView={name:"ɵɵgetCurrentView",moduleName:Sn},En.textInterpolate={name:"ɵɵtextInterpolate",moduleName:Sn},En.textInterpolate1={name:"ɵɵtextInterpolate1",moduleName:Sn},En.textInterpolate2={name:"ɵɵtextInterpolate2",moduleName:Sn},En.textInterpolate3={name:"ɵɵtextInterpolate3",moduleName:Sn},En.textInterpolate4={name:"ɵɵtextInterpolate4",moduleName:Sn},En.textInterpolate5={name:"ɵɵtextInterpolate5",moduleName:Sn},En.textInterpolate6={name:"ɵɵtextInterpolate6",moduleName:Sn},En.textInterpolate7={name:"ɵɵtextInterpolate7",moduleName:Sn},En.textInterpolate8={name:"ɵɵtextInterpolate8",moduleName:Sn},En.textInterpolateV={name:"ɵɵtextInterpolateV",moduleName:Sn},En.restoreView={name:"ɵɵrestoreView",moduleName:Sn},En.pureFunction0={name:"ɵɵpureFunction0",moduleName:Sn},En.pureFunction1={name:"ɵɵpureFunction1",moduleName:Sn},En.pureFunction2={name:"ɵɵpureFunction2",moduleName:Sn},En.pureFunction3={name:"ɵɵpureFunction3",moduleName:Sn},En.pureFunction4={name:"ɵɵpureFunction4",moduleName:Sn},En.pureFunction5={name:"ɵɵpureFunction5",moduleName:Sn},En.pureFunction6={name:"ɵɵpureFunction6",moduleName:Sn},En.pureFunction7={name:"ɵɵpureFunction7",moduleName:Sn},En.pureFunction8={name:"ɵɵpureFunction8",moduleName:Sn},En.pureFunctionV={name:"ɵɵpureFunctionV",moduleName:Sn},En.pipeBind1={name:"ɵɵpipeBind1",moduleName:Sn},En.pipeBind2={name:"ɵɵpipeBind2",moduleName:Sn},En.pipeBind3={name:"ɵɵpipeBind3",moduleName:Sn},En.pipeBind4={name:"ɵɵpipeBind4",moduleName:Sn},En.pipeBindV={name:"ɵɵpipeBindV",moduleName:Sn},En.hostProperty={name:"ɵɵhostProperty",moduleName:Sn},En.property={name:"ɵɵproperty",moduleName:Sn},En.propertyInterpolate={name:"ɵɵpropertyInterpolate",moduleName:Sn},En.propertyInterpolate1={name:"ɵɵpropertyInterpolate1",moduleName:Sn},En.propertyInterpolate2={name:"ɵɵpropertyInterpolate2",moduleName:Sn},En.propertyInterpolate3={name:"ɵɵpropertyInterpolate3",moduleName:Sn},En.propertyInterpolate4={name:"ɵɵpropertyInterpolate4",moduleName:Sn},En.propertyInterpolate5={name:"ɵɵpropertyInterpolate5",moduleName:Sn},En.propertyInterpolate6={name:"ɵɵpropertyInterpolate6",moduleName:Sn},En.propertyInterpolate7={name:"ɵɵpropertyInterpolate7",moduleName:Sn},En.propertyInterpolate8={name:"ɵɵpropertyInterpolate8",moduleName:Sn},En.propertyInterpolateV={name:"ɵɵpropertyInterpolateV",moduleName:Sn},En.i18n={name:"ɵɵi18n",moduleName:Sn},En.i18nAttributes={name:"ɵɵi18nAttributes",moduleName:Sn},En.i18nExp={name:"ɵɵi18nExp",moduleName:Sn},En.i18nStart={name:"ɵɵi18nStart",moduleName:Sn},En.i18nEnd={name:"ɵɵi18nEnd",moduleName:Sn},En.i18nApply={name:"ɵɵi18nApply",moduleName:Sn},En.i18nPostprocess={name:"ɵɵi18nPostprocess",moduleName:Sn},En.pipe={name:"ɵɵpipe",moduleName:Sn},En.projection={name:"ɵɵprojection",moduleName:Sn},En.projectionDef={name:"ɵɵprojectionDef",moduleName:Sn},En.reference={name:"ɵɵreference",moduleName:Sn},En.inject={name:"ɵɵinject",moduleName:Sn},En.injectAttribute={name:"ɵɵinjectAttribute",moduleName:Sn},En.injectPipeChangeDetectorRef={name:"ɵɵinjectPipeChangeDetectorRef",moduleName:Sn},En.directiveInject={name:"ɵɵdirectiveInject",moduleName:Sn},En.invalidFactory={name:"ɵɵinvalidFactory",moduleName:Sn},En.invalidFactoryDep={name:"ɵɵinvalidFactoryDep",moduleName:Sn},En.templateRefExtractor={name:"ɵɵtemplateRefExtractor",moduleName:Sn},En.resolveWindow={name:"ɵɵresolveWindow",moduleName:Sn},En.resolveDocument={name:"ɵɵresolveDocument",moduleName:Sn},En.resolveBody={name:"ɵɵresolveBody",moduleName:Sn},En.defineComponent={name:"ɵɵdefineComponent",moduleName:Sn},En.setComponentScope={name:"ɵɵsetComponentScope",moduleName:Sn},En.ComponentDefWithMeta={name:"ɵɵComponentDefWithMeta",moduleName:Sn},En.FactoryDef={name:"ɵɵFactoryDef",moduleName:Sn},En.defineDirective={name:"ɵɵdefineDirective",moduleName:Sn},En.DirectiveDefWithMeta={name:"ɵɵDirectiveDefWithMeta",moduleName:Sn},En.InjectorDef={name:"ɵɵInjectorDef",moduleName:Sn},En.defineInjector={name:"ɵɵdefineInjector",moduleName:Sn},En.NgModuleDefWithMeta={name:"ɵɵNgModuleDefWithMeta",moduleName:Sn},En.ModuleWithProviders={name:"ModuleWithProviders",moduleName:Sn},En.defineNgModule={name:"ɵɵdefineNgModule",moduleName:Sn},En.setNgModuleScope={name:"ɵɵsetNgModuleScope",moduleName:Sn},En.PipeDefWithMeta={name:"ɵɵPipeDefWithMeta",moduleName:Sn},En.definePipe={name:"ɵɵdefinePipe",moduleName:Sn},En.queryRefresh={name:"ɵɵqueryRefresh",moduleName:Sn},En.viewQuery={name:"ɵɵviewQuery",moduleName:Sn},En.staticViewQuery={name:"ɵɵstaticViewQuery",moduleName:Sn},En.staticContentQuery={name:"ɵɵstaticContentQuery",moduleName:Sn},En.loadQuery={name:"ɵɵloadQuery",moduleName:Sn},En.contentQuery={name:"ɵɵcontentQuery",moduleName:Sn},En.NgOnChangesFeature={name:"ɵɵNgOnChangesFeature",moduleName:Sn},En.InheritDefinitionFeature={name:"ɵɵInheritDefinitionFeature",moduleName:Sn},En.CopyDefinitionFeature={name:"ɵɵCopyDefinitionFeature",moduleName:Sn},En.ProvidersFeature={name:"ɵɵProvidersFeature",moduleName:Sn},En.listener={name:"ɵɵlistener",moduleName:Sn},En.getFactoryOf={name:"ɵɵgetFactoryOf",moduleName:Sn},En.getInheritedFactory={name:"ɵɵgetInheritedFactory",moduleName:Sn},En.sanitizeHtml={name:"ɵɵsanitizeHtml",moduleName:Sn},En.sanitizeStyle={name:"ɵɵsanitizeStyle",moduleName:Sn},En.sanitizeResourceUrl={name:"ɵɵsanitizeResourceUrl",moduleName:Sn},En.sanitizeScript={name:"ɵɵsanitizeScript",moduleName:Sn},En.sanitizeUrl={name:"ɵɵsanitizeUrl",moduleName:Sn},En.sanitizeUrlOrResourceUrl={name:"ɵɵsanitizeUrlOrResourceUrl",moduleName:Sn},En.trustConstantHtml={name:"ɵɵtrustConstantHtml",moduleName:Sn},En.trustConstantScript={name:"ɵɵtrustConstantScript",moduleName:Sn},En.trustConstantResourceUrl={name:"ɵɵtrustConstantResourceUrl",moduleName:Sn};class In{constructor(e,t){this.value=e,this.sourceSpan=t}visit(e){return e.visitText(this)}}class Tn{constructor(e,t,n){this.value=e,this.sourceSpan=t,this.i18n=n}visit(e){return e.visitBoundText(this)}}class Nn{constructor(e,t,n,s,r){this.name=e,this.value=t,this.sourceSpan=n,this.valueSpan=s,this.i18n=r}visit(e){return e.visitTextAttribute(this)}}class An{constructor(e,t,n,s,r,i,a,o,l){this.name=e,this.type=t,this.securityContext=n,this.value=s,this.unit=r,this.sourceSpan=i,this.keySpan=a,this.valueSpan=o,this.i18n=l}static fromBoundElementProperty(e,t){if(void 0===e.keySpan)throw new Error(`Unexpected state: keySpan must be defined for bound attributes but was not for ${e.name}: ${e.sourceSpan}`);return new An(e.name,e.type,e.securityContext,e.value,e.unit,e.sourceSpan,e.keySpan,e.valueSpan,t)}visit(e){return e.visitBoundAttribute(this)}}class Pn{constructor(e,t,n,s,r,i,a){this.name=e,this.type=t,this.handler=n,this.target=s,this.phase=r,this.sourceSpan=i,this.handlerSpan=a}static fromParsedEvent(e){return new Pn(e.name,e.type,e.handler,0===e.type?e.targetOrPhase:null,1===e.type?e.targetOrPhase:null,e.sourceSpan,e.handlerSpan)}visit(e){return e.visitBoundEvent(this)}}class kn{constructor(e,t,n,s,r,i,a,o,l,c){this.name=e,this.attributes=t,this.inputs=n,this.outputs=s,this.children=r,this.references=i,this.sourceSpan=a,this.startSourceSpan=o,this.endSourceSpan=l,this.i18n=c}visit(e){return e.visitElement(this)}}class On{constructor(e,t,n,s,r,i,a,o,l,c,u,p){this.tagName=e,this.attributes=t,this.inputs=n,this.outputs=s,this.templateAttrs=r,this.children=i,this.references=a,this.variables=o,this.sourceSpan=l,this.startSourceSpan=c,this.endSourceSpan=u,this.i18n=p}visit(e){return e.visitTemplate(this)}}class Mn{constructor(e,t,n,s){this.selector=e,this.attributes=t,this.sourceSpan=n,this.i18n=s,this.name="ng-content"}visit(e){return e.visitContent(this)}}class Ln{constructor(e,t,n,s,r){this.name=e,this.value=t,this.sourceSpan=n,this.keySpan=s,this.valueSpan=r}visit(e){return e.visitVariable(this)}}class Rn{constructor(e,t,n,s){this.name=e,this.value=t,this.sourceSpan=n,this.valueSpan=s}visit(e){return e.visitReference(this)}}class Dn{constructor(e,t,n,s){this.vars=e,this.placeholders=t,this.sourceSpan=n,this.i18n=s}visit(e){return e.visitIcu(this)}}function Fn(e,t){const n=[];if(e.visit)for(const n of t)e.visit(n)||n.visit(e);else for(const s of t){const t=s.visit(e);t&&n.push(t)}return n}class Bn{constructor(e,t,n,s,r,i){this.nodes=e,this.placeholders=t,this.placeholderToMessage=n,this.meaning=s,this.description=r,this.customId=i,this.id=this.customId,this.legacyIds=[],this.sources=e.length?[{filePath:e[0].sourceSpan.start.file.url,startLine:e[0].sourceSpan.start.line+1,startCol:e[0].sourceSpan.start.col+1,endLine:e[e.length-1].sourceSpan.end.line+1,endCol:e[0].sourceSpan.start.col+1}]:[]}}class $n{constructor(e,t){this.value=e,this.sourceSpan=t}visit(e,t){return e.visitText(this,t)}}class Vn{constructor(e,t){this.children=e,this.sourceSpan=t}visit(e,t){return e.visitContainer(this,t)}}class jn{constructor(e,t,n,s){this.expression=e,this.type=t,this.cases=n,this.sourceSpan=s}visit(e,t){return e.visitIcu(this,t)}}class Un{constructor(e,t,n,s,r,i,a,o,l){this.tag=e,this.attrs=t,this.startName=n,this.closeName=s,this.children=r,this.isVoid=i,this.sourceSpan=a,this.startSourceSpan=o,this.endSourceSpan=l}visit(e,t){return e.visitTagPlaceholder(this,t)}}class qn{constructor(e,t,n){this.value=e,this.name=t,this.sourceSpan=n}visit(e,t){return e.visitPlaceholder(this,t)}}class Hn{constructor(e,t,n){this.value=e,this.name=t,this.sourceSpan=n}visit(e,t){return e.visitIcuPlaceholder(this,t)}}function Wn(e){return function(e){const t=tn(e),n=function(e,t){const n=e.length+3>>>2,s=[];for(let r=0;r<n;r++)s[r]=as(e,4*r,t);return s}(t,es.Big),s=8*t.length,r=function(e,t){const n=[];for(let e=0;e<80;e++)n.push(void 0);return n}();let i=1732584193,a=4023233417,o=2562383102,l=271733878,c=3285377520;n[s>>5]|=128<<24-s%32,n[15+(s+64>>9<<4)]=s;for(let e=0;e<n.length;e+=16){const t=i,s=a,u=o,p=l,h=c;for(let t=0;t<80;t++){r[t]=t<16?n[e+t]:rs(r[t-3]^r[t-8]^r[t-14]^r[t-16],1);const s=Qn(t,a,o,l),u=s[0],p=s[1],h=[rs(i,5),u,c,p,r[t]].reduce(ts);c=l,l=o,o=rs(a,30),a=i,i=h}i=ts(i,t),a=ts(a,s),o=ts(o,u),l=ts(l,p),c=ts(c,h)}return function(e){let t="";for(let n=0;n<e.length;n++){const s=is(e,n);t+=(s>>>4).toString(16)+(15&s).toString(16)}return t.toLowerCase()}(os([i,a,o,l,c]))}((t=e.nodes,t.map(e=>e.visit(Xn,null))).join("")+`[${e.meaning}]`);var t}function zn(e){const t=new Gn;return function(e,t=""){let n=Yn(e);if(t){const e=Yn(t);n=function(e,t){const n=e[0],s=t[0],r=ns(e[1],t[1]),i=r[0],a=r[1];return[ts(ts(n,s),i),a]}(function(e,t){const n=e[0],s=e[1];return[n<<1|s>>>31,s<<1|n>>>31]}(n),e)}return function(e){let t="",n="1";for(let s=e.length-1;s>=0;s--)t=ls(t,cs(is(e,s),n)),n=cs(256,n);return t.split("").reverse().join("")}(os([2147483647&n[0],n[1]]))}(e.nodes.map(e=>e.visit(t,null)).join(""),e.meaning)}class Kn{visitText(e,t){return e.value}visitContainer(e,t){return`[${e.children.map(e=>e.visit(this)).join(", ")}]`}visitIcu(e,t){const n=Object.keys(e.cases).map(t=>`${t} {${e.cases[t].visit(this)}}`);return`{${e.expression}, ${e.type}, ${n.join(", ")}}`}visitTagPlaceholder(e,t){return e.isVoid?`<ph tag name="${e.startName}"/>`:`<ph tag name="${e.startName}">${e.children.map(e=>e.visit(this)).join(", ")}</ph name="${e.closeName}">`}visitPlaceholder(e,t){return e.value?`<ph name="${e.name}">${e.value}</ph>`:`<ph name="${e.name}"/>`}visitIcuPlaceholder(e,t){return`<ph icu name="${e.name}">${e.value.visit(this)}</ph>`}}const Xn=new Kn;class Gn extends Kn{visitIcu(e,t){let n=Object.keys(e.cases).map(t=>`${t} {${e.cases[t].visit(this)}}`);return`{${e.type}, ${n.join(", ")}}`}}function Qn(e,t,n,s){return e<20?[t&n|~t&s,1518500249]:e<40?[t^n^s,1859775393]:e<60?[t&n|t&s|n&s,2400959708]:[t^n^s,3395469782]}function Yn(e){const t=tn(e);let n=Zn(t,0),s=Zn(t,102072);return 0!=n||0!=s&&1!=s||(n^=319790063,s^=-1801410264),[n,s]}function Zn(e,t){let n,s=2654435769,r=2654435769;const i=e.length;for(n=0;n+12<=i;n+=12){s=ts(s,as(e,n,es.Little)),r=ts(r,as(e,n+4,es.Little));const i=Jn(s,r,t=ts(t,as(e,n+8,es.Little)));s=i[0],r=i[1],t=i[2]}return s=ts(s,as(e,n,es.Little)),r=ts(r,as(e,n+4,es.Little)),t=ts(t,i),Jn(s,r,t=ts(t,as(e,n+8,es.Little)<<8))[2]}function Jn(e,t,n){return e=ss(e,t),e=ss(e,n),e^=n>>>13,t=ss(t,n),t=ss(t,e),t^=e<<8,n=ss(n,e),n=ss(n,t),n^=t>>>13,e=ss(e,t),e=ss(e,n),e^=n>>>12,t=ss(t,n),t=ss(t,e),t^=e<<16,n=ss(n,e),n=ss(n,t),n^=t>>>5,e=ss(e,t),e=ss(e,n),e^=n>>>3,t=ss(t,n),t=ss(t,e),t^=e<<10,n=ss(n,e),n=ss(n,t),[e,t,n^=t>>>15]}var es;function ts(e,t){return ns(e,t)[1]}function ns(e,t){const n=(65535&e)+(65535&t),s=(e>>>16)+(t>>>16)+(n>>>16);return[s>>>16,s<<16|65535&n]}function ss(e,t){const n=(65535&e)-(65535&t);return(e>>16)-(t>>16)+(n>>16)<<16|65535&n}function rs(e,t){return e<<t|e>>>32-t}function is(e,t){return t>=e.length?0:255&e.charCodeAt(t)}function as(e,t,n){let s=0;if(n===es.Big)for(let n=0;n<4;n++)s+=is(e,t+n)<<24-8*n;else for(let n=0;n<4;n++)s+=is(e,t+n)<<8*n;return s}function os(e){return e.reduce((e,t)=>e+function(e){let t="";for(let n=0;n<4;n++)t+=String.fromCharCode(e>>>8*(3-n)&255);return t}(t),"")}function ls(e,t){let n="";const s=Math.max(e.length,t.length);for(let r=0,i=0;r<s||i;r++){const s=i+ +(e[r]||0)+ +(t[r]||0);s>=10?(i=1,n+=s-10):(i=0,n+=s)}return n}function cs(e,t){let n="",s=t;for(;0!==e;e>>>=1)1&e&&(n=ls(n,s)),s=ls(s,s);return n}function us(e){return"i18n"===e||e.startsWith("i18n-")}function ps(e){return e instanceof Bn}function hs(e){return ps(e)&&1===e.nodes.length&&e.nodes[0]instanceof jn}function ds(e){return!!e.i18n}function ms(e){return e.nodes[0]}function gs(e,t=0){return`�${e}${t>0?":"+t:""}�`}function fs(e=0){let t=e;return()=>t++}function vs(e){const t={};return e.forEach((e,n)=>{t[n]=Kt(e.length>1?`[${e.join("|")}]`:e[0])}),t}function ys(e,t,...n){const s=e.get(t)||[];s.push(...n),e.set(t,s)}function xs(e,t=0,n=0){const s=t,r=new Map,i=e instanceof Bn?e.nodes.find(e=>e instanceof Vn):e;return i&&i.children.filter(e=>e instanceof qn).forEach((e,t)=>{const i=gs(s+t,n);ys(r,e.name,i)}),r}function Ss(e={},t){const n={};return e&&Object.keys(e).length&&Object.keys(e).forEach(s=>n[Es(s,t)]=e[s]),n}function Es(e,t=!0){const n=e.toUpperCase().replace(/[^A-Z0-9_]/g,"_");if(!t)return n;const s=n.split("_");if(1===s.length)return e.toLowerCase();let r;/^\d+$/.test(s[s.length-1])&&(r=s.pop());let i=s.shift().toLowerCase();return s.length&&(i+=s.map(e=>e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()).join("")),r?`${i}_${r}`:i}function _s(e){return("MSG_"+e).toUpperCase()}function Cs(e){return new Lt(e.name,void 0,Ve,void 0,e.sourceSpan)}!function(e){e[e.Little=0]="Little",e[e.Big=1]="Big"}(es||(es={}));const ws=/[-.]/;function bs(e,t){let n=null;return()=>(n||(e.push(new Lt("_t",void 0,$e)),n=$t(t)),n)}function Is(e){if(this)throw new Error(`Builder ${this.constructor.name} doesn't support ${e} yet`);throw new Error(`Feature ${e} is not supported yet`)}function Ts(e){throw new Error(`Invalid state: Visitor ${this.constructor.name} doesn't handle ${e.constructor.name}`)}function Ns(e){return Array.isArray(e)?qt(e.map(Ns)):Kt(e,Ve)}function As(e,t){return Object.getOwnPropertyNames(e).length>0?function(e,t){return Ht(Object.getOwnPropertyNames(e).map(n=>{const s=e[n];let r,i,a;return Array.isArray(s)?[i,r]=s:[r,i]=Yt(n,[n,s]),a=r,{key:a,quoted:ws.test(a),value:t&&i!==r?qt([Ns(i),Ns(r)]):Ns(i)}}))}(e,t):null}function Ps(e){for(;Xt(e[e.length-1]);)e.pop();return e}function ks(e,t){if(Array.isArray(e.predicate)){let n=[];return e.predicate.forEach(e=>{const t=e.split(",").map(e=>Kt(e.trim()));n.push(...t)}),t.getConstLiteral(qt(n),!0)}return e.predicate}class Os{constructor(){this.values=[]}set(e,t){t&&this.values.push({key:e,value:t,quoted:!1})}toLiteralMap(){return Ht(this.values)}}function Ms(e,t,n){let s=Vt(e,null,n);if(t.length>0)for(let e=0;e<t.length;e++)s=s.callFn(t[e],n);else s=s.callFn([],n);return s}function Ls(e){const{expressions:t,strings:n}=e;return 1===t.length&&2===n.length&&""===n[0]&&""===n[1]?1:t.length+n.length}var Rs,Ds,Fs;function Bs(e){const t=$t("t"),n=[];let s=He;const r=Vs(e)?t:new Ct(ze.Or,t,e.internalType);let i=null;if(null!==e.deps)"invalid"!==e.deps&&(i=new it(r,$s(e.deps,e.injectFn,e.target===Ds.Pipe)),s=function(e){let t=!1;const n=e.map(e=>{const n=function(e){const t=[];return e.resolved===Fs.Attribute&&null!==e.attribute&&t.push({key:"attribute",value:e.attribute,quoted:!1}),e.optional&&t.push({key:"optional",value:Kt(!0),quoted:!1}),e.host&&t.push({key:"host",value:Kt(!0),quoted:!1}),e.self&&t.push({key:"self",value:Kt(!0),quoted:!1}),e.skipSelf&&t.push({key:"skipSelf",value:Kt(!0),quoted:!1}),t.length>0?Ht(t):null}(e);return null!==n?(t=!0,n):Kt(null)});return t?jt(qt(n)):He}(e.deps));else{const t=$t(`ɵ${e.name}_BaseFactory`),s=Vt(En.getInheritedFactory),a=t.set(s.callFn([e.internalType],void 0,!0)).toDeclStmt(Ve,[kt.Exported,kt.Final]);n.push(a),i=t.callFn([r])}const a=i,o=[];let l=null;function c(e){const n=$t("r");o.push(n.set(At).toDeclStmt());let s=null;return s=null!==a?n.set(a).toStmt():Vt(En.invalidFactory).callFn([]).toStmt(),o.push(zt(t,[s],[n.set(e).toStmt()])),n}if(Vs(e)&&e.delegateType===Rs.Factory){const t=$t(`ɵ${e.name}_BaseFactory`),s=Vt(En.getFactoryOf);if(e.delegate.isEquivalent(e.internalType))throw new Error("Illegal state: compiling factory that delegates to itself");const r=t.set(s.callFn([e.delegate])).toDeclStmt(Ve,[kt.Exported,kt.Final]);n.push(r),l=c(t.callFn([]))}else if(Vs(e)){const t=$s(e.delegateDeps,e.injectFn,e.target===Ds.Pipe);l=c(new(e.delegateType===Rs.Class?it:rt)(e.delegate,t))}else l=function(e){return void 0!==e.expression}(e)?c(e.expression):i;return o.push(null!==l?new Ft(l):Vt(En.invalidFactory).callFn([]).toStmt()),{factory:Wt([new St("t",$e)],o,Ve,void 0,e.name+"_Factory"),statements:n,type:jt(Vt(En.FactoryDef,[Cn(e.type.type,e.typeArgumentCount),s]))}}function $s(e,t,n){return e.map((e,s)=>function(e,t,n,s){switch(e.resolved){case Fs.Token:case Fs.ChangeDetectorRef:const r=0|(e.self?2:0)|(e.skipSelf?4:0)|(e.host?1:0)|(e.optional?8:0);let i=0!==r||e.optional?Kt(r):null;if(n&&e.resolved===Fs.ChangeDetectorRef)return Vt(En.injectPipeChangeDetectorRef).callFn(i?[i]:[]);const a=[e.token];return i&&a.push(i),Vt(t).callFn(a);case Fs.Attribute:return Vt(En.injectAttribute).callFn([e.token]);case Fs.Invalid:return Vt(En.invalidFactoryDep).callFn([Kt(s)]);default:return Is("Unknown R3ResolvedDependencyType: "+Fs[e.resolved])}}(e,t,n,s))}function Vs(e){return void 0!==e.delegateType}function js(e,t){return{statements:[],factory:e.node===t.node?t.prop("ɵfac"):Wt([new St("t",$e)],[new Ft(t.callMethod("ɵfac",[$t("t")]))])}}!function(e){e[e.Class=0]="Class",e[e.Function=1]="Function",e[e.Factory=2]="Factory"}(Rs||(Rs={})),function(e){e[e.Directive=0]="Directive",e[e.Component=1]="Component",e[e.Injectable=2]="Injectable",e[e.Pipe=3]="Pipe",e[e.NgModule=4]="NgModule"}(Ds||(Ds={})),function(e){e[e.Token=0]="Token",e[e.Attribute=1]="Attribute",e[e.ChangeDetectorRef=2]="ChangeDetectorRef",e[e.Invalid=3]="Invalid"}(Fs||(Fs={}));const Us=[/^\s*$/,/[<>]/,/^[{}]$/,/&(#|[a-z])/i,/^\/\//];class qs{constructor(e,t){this.start=e,this.end=t}static fromArray(e){return e?(function(e,t){if(!(null==t||Array.isArray(t)&&2==t.length))throw new Error("Expected 'interpolation' to be an array, [start, end].");if(null!=t){const e=t[0],n=t[1];Us.forEach(t=>{if(t.test(e)||t.test(n))throw new Error(`['${e}', '${n}'] contains unusable interpolation symbol.`)})}}(0,e),new qs(e[0],e[1])):Hs}}const Hs=new qs("{{","}}");class Ws{constructor(e=null){this.file=e,this.sourcesContent=new Map,this.lines=[],this.lastCol0=0,this.hasMappings=!1}addSource(e,t=null){return this.sourcesContent.has(e)||this.sourcesContent.set(e,t),this}addLine(){return this.lines.push([]),this.lastCol0=0,this}addMapping(e,t,n,s){if(!this.currentLine)throw new Error("A line must be added before mappings can be added");if(null!=t&&!this.sourcesContent.has(t))throw new Error(`Unknown source file "${t}"`);if(null==e)throw new Error("The column in the generated code must be provided");if(e<this.lastCol0)throw new Error("Mapping should be added in output order");if(t&&(null==n||null==s))throw new Error("The source location must be provided when a source url is provided");return this.hasMappings=!0,this.lastCol0=e,this.currentLine.push({col0:e,sourceUrl:t,sourceLine0:n,sourceCol0:s}),this}get currentLine(){return this.lines.slice(-1)[0]}toJSON(){if(!this.hasMappings)return null;const e=new Map,t=[],n=[];Array.from(this.sourcesContent.keys()).forEach((s,r)=>{e.set(s,r),t.push(s),n.push(this.sourcesContent.get(s)||null)});let s="",r=0,i=0,a=0,o=0;return this.lines.forEach(t=>{r=0,s+=t.map(t=>{let n=zs(t.col0-r);return r=t.col0,null!=t.sourceUrl&&(n+=zs(e.get(t.sourceUrl)-i),i=e.get(t.sourceUrl),n+=zs(t.sourceLine0-a),a=t.sourceLine0,n+=zs(t.sourceCol0-o),o=t.sourceCol0),n}).join(","),s+=";"}),s=s.slice(0,-1),{file:this.file||"",version:3,sourceRoot:"",sources:t,sourcesContent:n,mappings:s}}toJsComment(){return this.hasMappings?"//# sourceMappingURL=data:application/json;base64,"+function(e){let t="";e=tn(e);for(let n=0;n<e.length;){const s=e.charCodeAt(n++),r=e.charCodeAt(n++),i=e.charCodeAt(n++);t+=Ks(s>>2),t+=Ks((3&s)<<4|(isNaN(r)?0:r>>4)),t+=isNaN(r)?"=":Ks((15&r)<<2|i>>6),t+=isNaN(r)||isNaN(i)?"=":Ks(63&i)}return t}(JSON.stringify(this,null,0)):""}}function zs(e){e=e<0?1+(-e<<1):e<<1;let t="";do{let n=31&e;(e>>=5)>0&&(n|=32),t+=Ks(n)}while(e>0);return t}function Ks(e){if(e<0||e>=64)throw new Error("Can only encode value in the range [0, 63]");return"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[e]}const Xs=/'|\\|\n|\r|\$/g,Gs=/^[$A-Z_][0-9A-Z_$]*$/i,Qs=$t("error",null,null),Ys=$t("stack",null,null);class Zs{constructor(e){this.indent=e,this.partsLength=0,this.parts=[],this.srcSpans=[]}}class Js{constructor(e){this._indent=e,this._classes=[],this._preambleLineCount=0,this._lines=[new Zs(e)]}static createRoot(){return new Js(0)}get _currentLine(){return this._lines[this._lines.length-1]}println(e,t=""){this.print(e||null,t,!0)}lineIsEmpty(){return 0===this._currentLine.parts.length}lineLength(){return this._currentLine.indent*" ".length+this._currentLine.partsLength}print(e,t,n=!1){t.length>0&&(this._currentLine.parts.push(t),this._currentLine.partsLength+=t.length,this._currentLine.srcSpans.push(e&&e.sourceSpan||null)),n&&this._lines.push(new Zs(this._indent))}removeEmptyLastLine(){this.lineIsEmpty()&&this._lines.pop()}incIndent(){this._indent++,this.lineIsEmpty()&&(this._currentLine.indent=this._indent)}decIndent(){this._indent--,this.lineIsEmpty()&&(this._currentLine.indent=this._indent)}pushClass(e){this._classes.push(e)}popClass(){return this._classes.pop()}get currentClass(){return this._classes.length>0?this._classes[this._classes.length-1]:null}toSource(){return this.sourceLines.map(e=>e.parts.length>0?tr(e.indent)+e.parts.join(""):"").join("\n")}toSourceMapGenerator(e,t=0){const n=new Ws(e);let s=!1;const r=()=>{s||(n.addSource(e," ").addMapping(0,e,0,0),s=!0)};for(let e=0;e<t;e++)n.addLine(),r();return this.sourceLines.forEach((e,t)=>{n.addLine();const i=e.srcSpans,a=e.parts;let o=e.indent*" ".length,l=0;for(;l<i.length&&!i[l];)o+=a[l].length,l++;for(l<i.length&&0===t&&0===o?s=!0:r();l<i.length;){const e=i[l],t=e.start.file,s=e.start.line,r=e.start.col;for(n.addSource(t.url,t.content).addMapping(o,t.url,s,r),o+=a[l].length,l++;l<i.length&&(e===i[l]||!i[l]);)o+=a[l].length,l++}}),n}setPreambleLineCount(e){return this._preambleLineCount=e}spanOf(e,t){const n=this._lines[e-this._preambleLineCount];if(n){let e=t-tr(n.indent).length;for(let t=0;t<n.parts.length;t++){const s=n.parts[t];if(s.length>e)return n.srcSpans[t];e-=s.length}}return null}get sourceLines(){return this._lines.length&&0===this._lines[this._lines.length-1].parts.length?this._lines.slice(0,-1):this._lines}}function er(e,t,n=!0){if(null==e)return null;const s=e.replace(Xs,(...e)=>"$"==e[0]?t?"\\$":"$":"\n"==e[0]?"\\n":"\r"==e[0]?"\\r":"\\"+e[0]);return n||!Gs.test(s)?`'${s}'`:s}function tr(e){let t="";for(let n=0;n<e;n++)t+=" ";return t}class nr{evaluateStatements(e,t,n,s){const r=new sr(n),i=Js.createRoot();return t.length>0&&!t[0].isEquivalent(Kt("use strict").toStmt())&&(t=[Kt("use strict").toStmt(),...t]),r.visitAllStatements(t,i),r.createReturnStmt(i),this.evaluateCode(e,i,r.getArgs(),s)}evaluateCode(e,t,n,s){let r=`"use strict";${t.toSource()}\n//# sourceURL=${e}`;const i=[],a=[];for(const e in n)a.push(n[e]),i.push(e);if(s){const n=new Function(...i.concat("return null;")).toString(),s=n.slice(0,n.indexOf("return null;")).split("\n").length-1;r+="\n"+t.toSourceMapGenerator(e,s).toJsComment()}const o=new Function(...i.concat(r));return this.executeFunction(o,a)}executeFunction(e,t){return e(...t)}}class sr extends class extends class{constructor(e){this._escapeDollarInStrings=e}printLeadingComments(e,t){if(void 0!==e.leadingComments)for(const n of e.leadingComments)n instanceof Ot?t.print(e,`/*${n.toString()}*/`,n.trailingNewline):n.multiline?t.print(e,`/* ${n.text} */`,n.trailingNewline):n.text.split("\n").forEach(n=>{t.println(e,"// "+n)})}visitExpressionStmt(e,t){return this.printLeadingComments(e,t),e.expr.visitExpression(this,t),t.println(e,";"),null}visitReturnStmt(e,t){return this.printLeadingComments(e,t),t.print(e,"return "),e.value.visitExpression(this,t),t.println(e,";"),null}visitIfStmt(e,t){this.printLeadingComments(e,t),t.print(e,"if ("),e.condition.visitExpression(this,t),t.print(e,") {");const n=null!=e.falseCase&&e.falseCase.length>0;return e.trueCase.length<=1&&!n?(t.print(e," "),this.visitAllStatements(e.trueCase,t),t.removeEmptyLastLine(),t.print(e," ")):(t.println(),t.incIndent(),this.visitAllStatements(e.trueCase,t),t.decIndent(),n&&(t.println(e,"} else {"),t.incIndent(),this.visitAllStatements(e.falseCase,t),t.decIndent())),t.println(e,"}"),null}visitThrowStmt(e,t){return this.printLeadingComments(e,t),t.print(e,"throw "),e.error.visitExpression(this,t),t.println(e,";"),null}visitWriteVarExpr(e,t){const n=t.lineIsEmpty();return n||t.print(e,"("),t.print(e,e.name+" = "),e.value.visitExpression(this,t),n||t.print(e,")"),null}visitWriteKeyExpr(e,t){const n=t.lineIsEmpty();return n||t.print(e,"("),e.receiver.visitExpression(this,t),t.print(e,"["),e.index.visitExpression(this,t),t.print(e,"] = "),e.value.visitExpression(this,t),n||t.print(e,")"),null}visitWritePropExpr(e,t){const n=t.lineIsEmpty();return n||t.print(e,"("),e.receiver.visitExpression(this,t),t.print(e,`.${e.name} = `),e.value.visitExpression(this,t),n||t.print(e,")"),null}visitInvokeMethodExpr(e,t){e.receiver.visitExpression(this,t);let n=e.name;return null!=e.builtin&&(n=this.getBuiltinMethodName(e.builtin),null==n)||(t.print(e,`.${n}(`),this.visitAllExpressions(e.args,t,","),t.print(e,")")),null}visitInvokeFunctionExpr(e,t){return e.fn.visitExpression(this,t),t.print(e,"("),this.visitAllExpressions(e.args,t,","),t.print(e,")"),null}visitWrappedNodeExpr(e,t){throw new Error("Abstract emitter cannot visit WrappedNodeExpr.")}visitTypeofExpr(e,t){t.print(e,"typeof "),e.expr.visitExpression(this,t)}visitReadVarExpr(e,t){let n=e.name;if(null!=e.builtin)switch(e.builtin){case Ke.Super:n="super";break;case Ke.This:n="this";break;case Ke.CatchError:n=Qs.name;break;case Ke.CatchStack:n=Ys.name;break;default:throw new Error("Unknown builtin variable "+e.builtin)}return t.print(e,n),null}visitInstantiateExpr(e,t){return t.print(e,"new "),e.classExpr.visitExpression(this,t),t.print(e,"("),this.visitAllExpressions(e.args,t,","),t.print(e,")"),null}visitLiteralExpr(e,t){const n=e.value;return t.print(e,"string"==typeof n?er(n,this._escapeDollarInStrings):""+n),null}visitLocalizedString(e,t){const n=e.serializeI18nHead();t.print(e,"$localize `"+n.raw);for(let n=1;n<e.messageParts.length;n++)t.print(e,"${"),e.expressions[n-1].visitExpression(this,t),t.print(e,"}"+e.serializeI18nTemplatePart(n).raw);return t.print(e,"`"),null}visitConditionalExpr(e,t){return t.print(e,"("),e.condition.visitExpression(this,t),t.print(e,"? "),e.trueCase.visitExpression(this,t),t.print(e,": "),e.falseCase.visitExpression(this,t),t.print(e,")"),null}visitNotExpr(e,t){return t.print(e,"!"),e.condition.visitExpression(this,t),null}visitAssertNotNullExpr(e,t){return e.condition.visitExpression(this,t),null}visitUnaryOperatorExpr(e,t){let n;switch(e.operator){case We.Plus:n="+";break;case We.Minus:n="-";break;default:throw new Error("Unknown operator "+e.operator)}return e.parens&&t.print(e,"("),t.print(e,n),e.expr.visitExpression(this,t),e.parens&&t.print(e,")"),null}visitBinaryOperatorExpr(e,t){let n;switch(e.operator){case ze.Equals:n="==";break;case ze.Identical:n="===";break;case ze.NotEquals:n="!=";break;case ze.NotIdentical:n="!==";break;case ze.And:n="&&";break;case ze.BitwiseAnd:n="&";break;case ze.Or:n="||";break;case ze.Plus:n="+";break;case ze.Minus:n="-";break;case ze.Divide:n="/";break;case ze.Multiply:n="*";break;case ze.Modulo:n="%";break;case ze.Lower:n="<";break;case ze.LowerEquals:n="<=";break;case ze.Bigger:n=">";break;case ze.BiggerEquals:n=">=";break;default:throw new Error("Unknown operator "+e.operator)}return e.parens&&t.print(e,"("),e.lhs.visitExpression(this,t),t.print(e,` ${n} `),e.rhs.visitExpression(this,t),e.parens&&t.print(e,")"),null}visitReadPropExpr(e,t){return e.receiver.visitExpression(this,t),t.print(e,"."),t.print(e,e.name),null}visitReadKeyExpr(e,t){return e.receiver.visitExpression(this,t),t.print(e,"["),e.index.visitExpression(this,t),t.print(e,"]"),null}visitLiteralArrayExpr(e,t){return t.print(e,"["),this.visitAllExpressions(e.entries,t,","),t.print(e,"]"),null}visitLiteralMapExpr(e,t){return t.print(e,"{"),this.visitAllObjects(n=>{t.print(e,er(n.key,this._escapeDollarInStrings,n.quoted)+":"),n.value.visitExpression(this,t)},e.entries,t,","),t.print(e,"}"),null}visitCommaExpr(e,t){return t.print(e,"("),this.visitAllExpressions(e.parts,t,","),t.print(e,")"),null}visitAllExpressions(e,t,n){this.visitAllObjects(e=>e.visitExpression(this,t),e,t,n)}visitAllObjects(e,t,n,s){let r=!1;for(let i=0;i<t.length;i++)i>0&&(n.lineLength()>80?(n.print(null,s,!0),r||(n.incIndent(),n.incIndent(),r=!0)):n.print(null,s,!1)),e(t[i]);r&&(n.decIndent(),n.decIndent())}visitAllStatements(e,t){e.forEach(e=>e.visitStatement(this,t))}}{constructor(){super(!1)}visitDeclareClassStmt(e,t){return t.pushClass(e),this._visitClassConstructor(e,t),null!=e.parent&&(t.print(e,e.name+".prototype = Object.create("),e.parent.visitExpression(this,t),t.println(e,".prototype);")),e.getters.forEach(n=>this._visitClassGetter(e,n,t)),e.methods.forEach(n=>this._visitClassMethod(e,n,t)),t.popClass(),null}_visitClassConstructor(e,t){t.print(e,`function ${e.name}(`),null!=e.constructorMethod&&this._visitParams(e.constructorMethod.params,t),t.println(e,") {"),t.incIndent(),null!=e.constructorMethod&&e.constructorMethod.body.length>0&&(t.println(e,"var self = this;"),this.visitAllStatements(e.constructorMethod.body,t)),t.decIndent(),t.println(e,"}")}_visitClassGetter(e,t,n){n.println(e,`Object.defineProperty(${e.name}.prototype, '${t.name}', { get: function() {`),n.incIndent(),t.body.length>0&&(n.println(e,"var self = this;"),this.visitAllStatements(t.body,n)),n.decIndent(),n.println(e,"}});")}_visitClassMethod(e,t,n){n.print(e,`${e.name}.prototype.${t.name} = function(`),this._visitParams(t.params,n),n.println(e,") {"),n.incIndent(),t.body.length>0&&(n.println(e,"var self = this;"),this.visitAllStatements(t.body,n)),n.decIndent(),n.println(e,"};")}visitWrappedNodeExpr(e,t){throw new Error("Cannot emit a WrappedNodeExpr in Javascript.")}visitReadVarExpr(e,t){if(e.builtin===Ke.This)t.print(e,"self");else{if(e.builtin===Ke.Super)throw new Error("'super' needs to be handled at a parent ast node, not at the variable level!");super.visitReadVarExpr(e,t)}return null}visitDeclareVarStmt(e,t){return t.print(e,"var "+e.name),e.value&&(t.print(e," = "),e.value.visitExpression(this,t)),t.println(e,";"),null}visitCastExpr(e,t){return e.value.visitExpression(this,t),null}visitInvokeFunctionExpr(e,t){const n=e.fn;return n instanceof Ye&&n.builtin===Ke.Super?(t.currentClass.parent.visitExpression(this,t),t.print(e,".call(this"),e.args.length>0&&(t.print(e,", "),this.visitAllExpressions(e.args,t,",")),t.print(e,")")):super.visitInvokeFunctionExpr(e,t),null}visitFunctionExpr(e,t){return t.print(e,`function${e.name?" "+e.name:""}(`),this._visitParams(e.params,t),t.println(e,") {"),t.incIndent(),this.visitAllStatements(e.statements,t),t.decIndent(),t.print(e,"}"),null}visitDeclareFunctionStmt(e,t){return t.print(e,`function ${e.name}(`),this._visitParams(e.params,t),t.println(e,") {"),t.incIndent(),this.visitAllStatements(e.statements,t),t.decIndent(),t.println(e,"}"),null}visitTryCatchStmt(e,t){t.println(e,"try {"),t.incIndent(),this.visitAllStatements(e.bodyStmts,t),t.decIndent(),t.println(e,`} catch (${Qs.name}) {`),t.incIndent();const n=[Ys.set(Qs.prop("stack")).toDeclStmt(null,[kt.Final])].concat(e.catchStmts);return this.visitAllStatements(n,t),t.decIndent(),t.println(e,"}"),null}visitLocalizedString(e,t){t.print(e,'$localize((this&&this.__makeTemplateObject||function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e})(');const n=[e.serializeI18nHead()];for(let t=1;t<e.messageParts.length;t++)n.push(e.serializeI18nTemplatePart(t));return t.print(e,`[${n.map(e=>er(e.cooked,!1)).join(", ")}], `),t.print(e,`[${n.map(e=>er(e.raw,!1)).join(", ")}])`),e.expressions.forEach(n=>{t.print(e,", "),n.visitExpression(this,t)}),t.print(e,")"),null}_visitParams(e,t){this.visitAllObjects(e=>t.print(null,e.name),e,t,",")}getBuiltinMethodName(e){let t;switch(e){case Xe.ConcatArray:t="concat";break;case Xe.SubscribeObservable:t="subscribe";break;case Xe.Bind:t="bind";break;default:throw new Error("Unknown builtin method: "+e)}return t}}{constructor(e){super(),this.reflector=e,this._evalArgNames=[],this._evalArgValues=[],this._evalExportedVars=[]}createReturnStmt(e){new Ft(new Nt(this._evalExportedVars.map(e=>new Tt(e,$t(e),!1)))).visitStatement(this,e)}getArgs(){const e={};for(let t=0;t<this._evalArgNames.length;t++)e[this._evalArgNames[t]]=this._evalArgValues[t];return e}visitExternalExpr(e,t){return this._emitReferenceToExternal(e,this.reflector.resolveExternalReference(e.value),t),null}visitWrappedNodeExpr(e,t){return this._emitReferenceToExternal(e,e.node,t),null}visitDeclareVarStmt(e,t){return e.hasModifier(kt.Exported)&&this._evalExportedVars.push(e.name),super.visitDeclareVarStmt(e,t)}visitDeclareFunctionStmt(e,t){return e.hasModifier(kt.Exported)&&this._evalExportedVars.push(e.name),super.visitDeclareFunctionStmt(e,t)}visitDeclareClassStmt(e,t){return e.hasModifier(kt.Exported)&&this._evalExportedVars.push(e.name),super.visitDeclareClassStmt(e,t)}_emitReferenceToExternal(e,t,n){let s=this._evalArgValues.indexOf(t);if(-1===s){s=this._evalArgValues.length,this._evalArgValues.push(t);const e=function(e){if(!e||!e.reference)return null;const t=e.reference;if(t instanceof class{constructor(e,t,n){this.filePath=e,this.name=t,this.members=n}assertNoMembers(){if(this.members.length)throw new Error(`Illegal state: symbol without members expected, but got ${JSON.stringify(this)}.`)}})return t.name;if(t.__anonymousType)return t.__anonymousType;let n=nn(t);return n.indexOf("(")>=0?(n="anonymous_"+yn++,t.__anonymousType=n):n=vn(n),n}({reference:t})||"val";this._evalArgNames.push(`jit_${e}_${s}`)}n.print(e,this._evalArgNames[s])}}function rr(e){return e>=9&&e<=32||160==e}function ir(e){return 48<=e&&e<=57}function ar(e){return e>=97&&e<=122||e>=65&&e<=90}function or(e){return 10===e||13===e}function lr(e){return 48<=e&&e<=55}class cr{constructor(e,t,n,s){this.file=e,this.offset=t,this.line=n,this.col=s}toString(){return null!=this.offset?`${this.file.url}@${this.line}:${this.col}`:this.file.url}moveBy(e){const t=this.file.content,n=t.length;let s=this.offset,r=this.line,i=this.col;for(;s>0&&e<0;)if(s--,e++,10==t.charCodeAt(s)){r--;const e=t.substr(0,s-1).lastIndexOf(String.fromCharCode(10));i=e>0?s-e:s}else i--;for(;s<n&&e>0;){const n=t.charCodeAt(s);s++,e--,10==n?(r++,i=0):i++}return new cr(this.file,s,r,i)}getContext(e,t){const n=this.file.content;let s=this.offset;if(null!=s){s>n.length-1&&(s=n.length-1);let r=s,i=0,a=0;for(;i<e&&s>0&&(s--,i++,"\n"!=n[s]||++a!=t););for(i=0,a=0;i<e&&r<n.length-1&&(r++,i++,"\n"!=n[r]||++a!=t););return{before:n.substring(s,this.offset),after:n.substring(this.offset,r+1)}}return null}}class ur{constructor(e,t){this.content=e,this.url=t}}class pr{constructor(e,t,n=e,s=null){this.start=e,this.end=t,this.fullStart=n,this.details=s}toString(){return this.start.file.content.substring(this.start.offset,this.end.offset)}}var hr,dr,mr,gr;!function(e){e[e.WARNING=0]="WARNING",e[e.ERROR=1]="ERROR"}(hr||(hr={}));class fr{constructor(e,t,n=hr.ERROR){this.span=e,this.msg=t,this.level=n}contextualMessage(){const e=this.span.start.getContext(100,3);return e?`${this.msg} ("${e.before}[${hr[this.level]} ->]${e.after}")`:this.msg}toString(){const e=this.span.details?", "+this.span.details:"";return`${this.contextualMessage()}: ${this.span.start}${e}`}}class vr{constructor(e){this.context=e}resolveExternalReference(e){if("@angular/core"!==e.moduleName)throw new Error(`Cannot resolve external reference to ${e.moduleName}, only references to @angular/core are supported.`);if(!this.context.hasOwnProperty(e.name))throw new Error(`No value provided for @angular/core symbol '${e.name}'.`);return this.context[e.name]}parameters(e){throw new Error("Not implemented.")}annotations(e){throw new Error("Not implemented.")}shallowAnnotations(e){throw new Error("Not implemented.")}tryAnnotations(e){throw new Error("Not implemented.")}propMetadata(e){throw new Error("Not implemented.")}hasLifecycleHook(e,t){throw new Error("Not implemented.")}guards(e){throw new Error("Not implemented.")}componentModuleUrl(e,t){throw new Error("Not implemented.")}}function yr(e,t=!1){return Ht(Object.keys(e).map(n=>({key:n,quoted:t,value:e[n]})))}function xr(e){const t=e.map(e=>Ut(e.type));return e.length>0?jt(qt(t)):He}function Sr(e,t){const n=qt(e.map(e=>e.value));return t?Wt([],[new Ft(n)]):n}class Er{constructor(e,t,n,s){this.input=t,this.errLocation=n,this.ctxLocation=s,this.message=`Parser Error: ${e} ${n} [${t}] in ${s}`}}class _r{constructor(e,t){this.start=e,this.end=t}toAbsolute(e){return new Xr(e+this.start,e+this.end)}}class Cr{constructor(e,t){this.span=e,this.sourceSpan=t}visit(e,t=null){return null}toString(){return"AST"}}class wr extends Cr{constructor(e,t,n){super(e,t),this.nameSpan=n}}class br extends Cr{constructor(e,t,n,s,r){super(e,t),this.prefix=n,this.uninterpretedExpression=s,this.location=r}visit(e,t=null){return e.visitQuote(this,t)}toString(){return"Quote"}}class Ir extends Cr{visit(e,t=null){}}class Tr extends Cr{visit(e,t=null){return e.visitImplicitReceiver(this,t)}}class Nr extends Tr{visit(e,t=null){var n;return null===(n=e.visitThisReceiver)||void 0===n?void 0:n.call(e,this,t)}}class Ar extends Cr{constructor(e,t,n){super(e,t),this.expressions=n}visit(e,t=null){return e.visitChain(this,t)}}class Pr extends Cr{constructor(e,t,n,s,r){super(e,t),this.condition=n,this.trueExp=s,this.falseExp=r}visit(e,t=null){return e.visitConditional(this,t)}}class kr extends wr{constructor(e,t,n,s,r){super(e,t,n),this.receiver=s,this.name=r}visit(e,t=null){return e.visitPropertyRead(this,t)}}class Or extends wr{constructor(e,t,n,s,r,i){super(e,t,n),this.receiver=s,this.name=r,this.value=i}visit(e,t=null){return e.visitPropertyWrite(this,t)}}class Mr extends wr{constructor(e,t,n,s,r){super(e,t,n),this.receiver=s,this.name=r}visit(e,t=null){return e.visitSafePropertyRead(this,t)}}class Lr extends Cr{constructor(e,t,n,s){super(e,t),this.obj=n,this.key=s}visit(e,t=null){return e.visitKeyedRead(this,t)}}class Rr extends Cr{constructor(e,t,n,s,r){super(e,t),this.obj=n,this.key=s,this.value=r}visit(e,t=null){return e.visitKeyedWrite(this,t)}}class Dr extends wr{constructor(e,t,n,s,r,i){super(e,t,i),this.exp=n,this.name=s,this.args=r}visit(e,t=null){return e.visitPipe(this,t)}}class Fr extends Cr{constructor(e,t,n){super(e,t),this.value=n}visit(e,t=null){return e.visitLiteralPrimitive(this,t)}}class Br extends Cr{constructor(e,t,n){super(e,t),this.expressions=n}visit(e,t=null){return e.visitLiteralArray(this,t)}}class $r extends Cr{constructor(e,t,n,s){super(e,t),this.keys=n,this.values=s}visit(e,t=null){return e.visitLiteralMap(this,t)}}class Vr extends Cr{constructor(e,t,n,s){super(e,t),this.strings=n,this.expressions=s}visit(e,t=null){return e.visitInterpolation(this,t)}}class jr extends Cr{constructor(e,t,n,s,r){super(e,t),this.operation=n,this.left=s,this.right=r}visit(e,t=null){return e.visitBinary(this,t)}}class Ur extends jr{constructor(e,t,n,s,r,i,a){super(e,t,r,i,a),this.operator=n,this.expr=s}static createMinus(e,t,n){return new Ur(e,t,"-",n,"-",new Fr(e,t,0),n)}static createPlus(e,t,n){return new Ur(e,t,"+",n,"-",n,new Fr(e,t,0))}visit(e,t=null){return void 0!==e.visitUnary?e.visitUnary(this,t):e.visitBinary(this,t)}}class qr extends Cr{constructor(e,t,n){super(e,t),this.expression=n}visit(e,t=null){return e.visitPrefixNot(this,t)}}class Hr extends Cr{constructor(e,t,n){super(e,t),this.expression=n}visit(e,t=null){return e.visitNonNullAssert(this,t)}}class Wr extends wr{constructor(e,t,n,s,r,i){super(e,t,n),this.receiver=s,this.name=r,this.args=i}visit(e,t=null){return e.visitMethodCall(this,t)}}class zr extends wr{constructor(e,t,n,s,r,i){super(e,t,n),this.receiver=s,this.name=r,this.args=i}visit(e,t=null){return e.visitSafeMethodCall(this,t)}}class Kr extends Cr{constructor(e,t,n,s){super(e,t),this.target=n,this.args=s}visit(e,t=null){return e.visitFunctionCall(this,t)}}class Xr{constructor(e,t){this.start=e,this.end=t}}class Gr extends Cr{constructor(e,t,n,s,r){super(new _r(0,null===t?0:t.length),new Xr(s,null===t?s:s+t.length)),this.ast=e,this.source=t,this.location=n,this.errors=r}visit(e,t=null){return e.visitASTWithSource?e.visitASTWithSource(this,t):this.ast.visit(e,t)}toString(){return`${this.source} in ${this.location}`}}class Qr{constructor(e,t,n){this.sourceSpan=e,this.key=t,this.value=n}}class Yr{constructor(e,t,n){this.sourceSpan=e,this.key=t,this.value=n}}class Zr{visit(e,t){e.visit(this,t)}visitUnary(e,t){this.visit(e.expr,t)}visitBinary(e,t){this.visit(e.left,t),this.visit(e.right,t)}visitChain(e,t){this.visitAll(e.expressions,t)}visitConditional(e,t){this.visit(e.condition,t),this.visit(e.trueExp,t),this.visit(e.falseExp,t)}visitPipe(e,t){this.visit(e.exp,t),this.visitAll(e.args,t)}visitFunctionCall(e,t){e.target&&this.visit(e.target,t),this.visitAll(e.args,t)}visitImplicitReceiver(e,t){}visitThisReceiver(e,t){}visitInterpolation(e,t){this.visitAll(e.expressions,t)}visitKeyedRead(e,t){this.visit(e.obj,t),this.visit(e.key,t)}visitKeyedWrite(e,t){this.visit(e.obj,t),this.visit(e.key,t),this.visit(e.value,t)}visitLiteralArray(e,t){this.visitAll(e.expressions,t)}visitLiteralMap(e,t){this.visitAll(e.values,t)}visitLiteralPrimitive(e,t){}visitMethodCall(e,t){this.visit(e.receiver,t),this.visitAll(e.args,t)}visitPrefixNot(e,t){this.visit(e.expression,t)}visitNonNullAssert(e,t){this.visit(e.expression,t)}visitPropertyRead(e,t){this.visit(e.receiver,t)}visitPropertyWrite(e,t){this.visit(e.receiver,t),this.visit(e.value,t)}visitSafePropertyRead(e,t){this.visit(e.receiver,t)}visitSafeMethodCall(e,t){this.visit(e.receiver,t),this.visitAll(e.args,t)}visitQuote(e,t){}visitAll(e,t){for(const n of e)this.visit(n,t)}}class Jr{constructor(e,t,n,s,r,i){this.name=e,this.expression=t,this.type=n,this.sourceSpan=s,this.keySpan=r,this.valueSpan=i,this.isLiteral=this.type===dr.LITERAL_ATTR,this.isAnimation=this.type===dr.ANIMATION}}!function(e){e[e.DEFAULT=0]="DEFAULT",e[e.LITERAL_ATTR=1]="LITERAL_ATTR",e[e.ANIMATION=2]="ANIMATION"}(dr||(dr={}));class ei{constructor(e,t,n,s,r,i){this.name=e,this.targetOrPhase=t,this.type=n,this.handler=s,this.sourceSpan=r,this.handlerSpan=i}}class ti{constructor(e,t,n,s,r){this.name=e,this.value=t,this.sourceSpan=n,this.keySpan=s,this.valueSpan=r}}class ni{constructor(e,t,n,s,r,i,a,o){this.name=e,this.type=t,this.securityContext=n,this.value=s,this.unit=r,this.sourceSpan=i,this.keySpan=a,this.valueSpan=o}}class si{}si.event=$t("$event");class ri{constructor(e,t){this.stmts=e,this.allowDefault=t,this.render3Stmts=e.map(e=>e instanceof Lt&&e.name==t.name&&e.value instanceof Ct?new Ft(e.value.lhs.value):e)}}class ii{constructor(e,t){this.stmts=e,this.currValExpr=t}}function ai(e,t,n,s,r,i){e||(e=new mi);const a=new di(e,t,s,i),o=n.visit(a,gr.Expression),l=oi(a,s);if(a.usesImplicitReceiver&&e.notifyImplicitReceiverUse(),0===a.temporaryCount&&r==mr.TrySimple)return new ii([],o);if(r===mr.Expression)return new ii(l,o);const c=function(e){return $t("currVal_"+e)}(s);return l.push(c.set(o).toDeclStmt($e,[kt.Final])),new ii(l,c)}function oi(e,t){const n=[];for(let s=0;s<e.temporaryCount;s++)n.push(ci(t,s));return n}function li(e,t){return`tmp_${e}_${t}`}function ci(e,t){return new Lt(li(e,t),At)}function ui(e,t){if(e!==gr.Expression)throw new Error("Expected an expression, but saw "+t)}function pi(e,t){return e===gr.Statement?t.toStmt():t}!function(e){e[e.General=0]="General",e[e.TrySimple=1]="TrySimple",e[e.Expression=2]="Expression"}(mr||(mr={})),function(e){e[e.Statement=0]="Statement",e[e.Expression=1]="Expression"}(gr||(gr={}));class hi extends class{visitImplicitReceiver(e,t){return e}visitThisReceiver(e,t){return e}visitInterpolation(e,t){return new Vr(e.span,e.sourceSpan,e.strings,this.visitAll(e.expressions))}visitLiteralPrimitive(e,t){return new Fr(e.span,e.sourceSpan,e.value)}visitPropertyRead(e,t){return new kr(e.span,e.sourceSpan,e.nameSpan,e.receiver.visit(this),e.name)}visitPropertyWrite(e,t){return new Or(e.span,e.sourceSpan,e.nameSpan,e.receiver.visit(this),e.name,e.value.visit(this))}visitSafePropertyRead(e,t){return new Mr(e.span,e.sourceSpan,e.nameSpan,e.receiver.visit(this),e.name)}visitMethodCall(e,t){return new Wr(e.span,e.sourceSpan,e.nameSpan,e.receiver.visit(this),e.name,this.visitAll(e.args))}visitSafeMethodCall(e,t){return new zr(e.span,e.sourceSpan,e.nameSpan,e.receiver.visit(this),e.name,this.visitAll(e.args))}visitFunctionCall(e,t){return new Kr(e.span,e.sourceSpan,e.target.visit(this),this.visitAll(e.args))}visitLiteralArray(e,t){return new Br(e.span,e.sourceSpan,this.visitAll(e.expressions))}visitLiteralMap(e,t){return new $r(e.span,e.sourceSpan,e.keys,this.visitAll(e.values))}visitUnary(e,t){switch(e.operator){case"+":return Ur.createPlus(e.span,e.sourceSpan,e.expr.visit(this));case"-":return Ur.createMinus(e.span,e.sourceSpan,e.expr.visit(this));default:throw new Error("Unknown unary operator "+e.operator)}}visitBinary(e,t){return new jr(e.span,e.sourceSpan,e.operation,e.left.visit(this),e.right.visit(this))}visitPrefixNot(e,t){return new qr(e.span,e.sourceSpan,e.expression.visit(this))}visitNonNullAssert(e,t){return new Hr(e.span,e.sourceSpan,e.expression.visit(this))}visitConditional(e,t){return new Pr(e.span,e.sourceSpan,e.condition.visit(this),e.trueExp.visit(this),e.falseExp.visit(this))}visitPipe(e,t){return new Dr(e.span,e.sourceSpan,e.exp.visit(this),e.name,this.visitAll(e.args),e.nameSpan)}visitKeyedRead(e,t){return new Lr(e.span,e.sourceSpan,e.obj.visit(this),e.key.visit(this))}visitKeyedWrite(e,t){return new Rr(e.span,e.sourceSpan,e.obj.visit(this),e.key.visit(this),e.value.visit(this))}visitAll(e){const t=[];for(let n=0;n<e.length;++n)t[n]=e[n].visit(this);return t}visitChain(e,t){return new Ar(e.span,e.sourceSpan,this.visitAll(e.expressions))}visitQuote(e,t){return new br(e.span,e.sourceSpan,e.prefix,e.uninterpretedExpression,e.location)}}{constructor(e){super(),this._converterFactory=e}visitPipe(e,t){const n=[e.exp,...e.args].map(e=>e.visit(this,t));return new gi(e.span,e.sourceSpan,n,this._converterFactory.createPipeConverter(e.name,n.length))}visitLiteralArray(e,t){const n=e.expressions.map(e=>e.visit(this,t));return new gi(e.span,e.sourceSpan,n,this._converterFactory.createLiteralArrayConverter(e.expressions.length))}visitLiteralMap(e,t){const n=e.values.map(e=>e.visit(this,t));return new gi(e.span,e.sourceSpan,n,this._converterFactory.createLiteralMapConverter(e.keys))}}class di{constructor(e,t,n,s,r,i){this._localResolver=e,this._implicitReceiver=t,this.bindingId=n,this.interpolationFunction=s,this.baseSourceSpan=r,this.implicitReceiverAccesses=i,this._nodeMap=new Map,this._resultMap=new Map,this._currentTemporary=0,this.temporaryCount=0,this.usesImplicitReceiver=!1}visitUnary(e,t){let n;switch(e.operator){case"+":n=We.Plus;break;case"-":n=We.Minus;break;default:throw new Error("Unsupported operator "+e.operator)}return pi(t,new _t(n,this._visit(e.expr,gr.Expression),void 0,this.convertSourceSpan(e.span)))}visitBinary(e,t){let n;switch(e.operation){case"+":n=ze.Plus;break;case"-":n=ze.Minus;break;case"*":n=ze.Multiply;break;case"/":n=ze.Divide;break;case"%":n=ze.Modulo;break;case"&&":n=ze.And;break;case"||":n=ze.Or;break;case"==":n=ze.Equals;break;case"!=":n=ze.NotEquals;break;case"===":n=ze.Identical;break;case"!==":n=ze.NotIdentical;break;case"<":n=ze.Lower;break;case">":n=ze.Bigger;break;case"<=":n=ze.LowerEquals;break;case">=":n=ze.BiggerEquals;break;default:throw new Error("Unsupported operation "+e.operation)}return pi(t,new Ct(n,this._visit(e.left,gr.Expression),this._visit(e.right,gr.Expression),void 0,this.convertSourceSpan(e.span)))}visitChain(e,t){return function(e,t){if(e!==gr.Statement)throw new Error("Expected a statement, but saw "+t)}(t,e),this.visitAll(e.expressions,t)}visitConditional(e,t){return pi(t,this._visit(e.condition,gr.Expression).conditional(this._visit(e.trueExp,gr.Expression),this._visit(e.falseExp,gr.Expression),this.convertSourceSpan(e.span)))}visitPipe(e,t){throw new Error("Illegal state: Pipes should have been converted into functions. Pipe: "+e.name)}visitFunctionCall(e,t){const n=this.visitAll(e.args,gr.Expression);let s;return s=e instanceof gi?e.converter(n):this._visit(e.target,gr.Expression).callFn(n,this.convertSourceSpan(e.span)),pi(t,s)}visitImplicitReceiver(e,t){return ui(t,e),this.usesImplicitReceiver=!0,this._implicitReceiver}visitThisReceiver(e,t){return this.visitImplicitReceiver(e,t)}visitInterpolation(e,t){ui(t,e);const n=[Kt(e.expressions.length)];for(let t=0;t<e.strings.length-1;t++)n.push(Kt(e.strings[t])),n.push(this._visit(e.expressions[t],gr.Expression));return n.push(Kt(e.strings[e.strings.length-1])),this.interpolationFunction?this.interpolationFunction(n):e.expressions.length<=9?Vt(fn.inlineInterpolate).callFn(n):Vt(fn.interpolate).callFn([n[0],qt(n.slice(1),void 0,this.convertSourceSpan(e.span))])}visitKeyedRead(e,t){const n=this.leftMostSafeNode(e);return n?this.convertSafeAccess(e,n,t):pi(t,this._visit(e.obj,gr.Expression).key(this._visit(e.key,gr.Expression)))}visitKeyedWrite(e,t){const n=this._visit(e.obj,gr.Expression),s=this._visit(e.key,gr.Expression),r=this._visit(e.value,gr.Expression);return pi(t,n.key(s).set(r))}visitLiteralArray(e,t){throw new Error("Illegal State: literal arrays should have been converted into functions")}visitLiteralMap(e,t){throw new Error("Illegal State: literal maps should have been converted into functions")}visitLiteralPrimitive(e,t){return pi(t,Kt(e.value,null==e.value||!0===e.value||!0===e.value?Ve:void 0,this.convertSourceSpan(e.span)))}_getLocal(e,t){var n;return(null===(n=this._localResolver.globals)||void 0===n?void 0:n.has(e))&&t instanceof Nr?null:this._localResolver.getLocal(e)}visitMethodCall(e,t){if(e.receiver instanceof Tr&&!(e.receiver instanceof Nr)&&"$any"===e.name){const t=this.visitAll(e.args,gr.Expression);if(1!=t.length)throw new Error("Invalid call to $any, expected 1 argument but received "+(t.length||"none"));return t[0].cast($e,this.convertSourceSpan(e.span))}const n=this.leftMostSafeNode(e);if(n)return this.convertSafeAccess(e,n,t);{const n=this.visitAll(e.args,gr.Expression),s=this.usesImplicitReceiver;let r=null;const i=this._visit(e.receiver,gr.Expression);if(i===this._implicitReceiver){const t=this._getLocal(e.name,e.receiver);t&&(this.usesImplicitReceiver=s,r=t.callFn(n),this.addImplicitReceiverAccess(e.name))}return null==r&&(r=i.callMethod(e.name,n,this.convertSourceSpan(e.span))),pi(t,r)}}visitPrefixNot(e,t){return pi(t,(n=this._visit(e.expression,gr.Expression),new vt(n,void 0)));var n}visitNonNullAssert(e,t){return pi(t,(n=this._visit(e.expression,gr.Expression),new yt(n,void 0)));var n}visitPropertyRead(e,t){const n=this.leftMostSafeNode(e);if(n)return this.convertSafeAccess(e,n,t);{let n=null;const s=this.usesImplicitReceiver,r=this._visit(e.receiver,gr.Expression);return r===this._implicitReceiver&&(n=this._getLocal(e.name,e.receiver),n&&(this.usesImplicitReceiver=s,this.addImplicitReceiverAccess(e.name))),null==n&&(n=r.prop(e.name)),pi(t,n)}}visitPropertyWrite(e,t){const n=this._visit(e.receiver,gr.Expression),s=this.usesImplicitReceiver;let r=null;if(n===this._implicitReceiver){const t=this._getLocal(e.name,e.receiver);if(t){if(!(t instanceof wt))throw new Error(`Cannot assign value "${e.value instanceof kr?e.value.name:void 0}" to template variable "${e.name}". Template variables are read-only.`);r=t,this.usesImplicitReceiver=s,this.addImplicitReceiverAccess(e.name)}}return null===r&&(r=n.prop(e.name)),pi(t,r.set(this._visit(e.value,gr.Expression)))}visitSafePropertyRead(e,t){return this.convertSafeAccess(e,this.leftMostSafeNode(e),t)}visitSafeMethodCall(e,t){return this.convertSafeAccess(e,this.leftMostSafeNode(e),t)}visitAll(e,t){return e.map(e=>this._visit(e,t))}visitQuote(e,t){throw new Error(`Quotes are not supported for evaluation!\n Statement: ${e.uninterpretedExpression} located at ${e.location}`)}_visit(e,t){return this._resultMap.get(e)||(this._nodeMap.get(e)||e).visit(this,t)}convertSafeAccess(e,t,n){let s=this._visit(t.receiver,gr.Expression),r=void 0;this.needsTemporary(t.receiver)&&(r=this.allocateTemporary(),s=r.set(s),this._resultMap.set(t.receiver,r));const i=s.isBlank();this._nodeMap.set(t,t instanceof zr?new Wr(t.span,t.sourceSpan,t.nameSpan,t.receiver,t.name,t.args):new kr(t.span,t.sourceSpan,t.nameSpan,t.receiver,t.name));const a=this._visit(e,gr.Expression);return this._nodeMap.delete(t),r&&this.releaseTemporary(r),pi(n,i.conditional(Kt(null),a))}leftMostSafeNode(e){const t=(e,t)=>(this._nodeMap.get(t)||t).visit(e);return e.visit({visitUnary:e=>null,visitBinary:e=>null,visitChain:e=>null,visitConditional:e=>null,visitFunctionCall:e=>null,visitImplicitReceiver:e=>null,visitThisReceiver:e=>null,visitInterpolation:e=>null,visitKeyedRead(e){return t(this,e.obj)},visitKeyedWrite:e=>null,visitLiteralArray:e=>null,visitLiteralMap:e=>null,visitLiteralPrimitive:e=>null,visitMethodCall(e){return t(this,e.receiver)},visitPipe:e=>null,visitPrefixNot:e=>null,visitNonNullAssert:e=>null,visitPropertyRead(e){return t(this,e.receiver)},visitPropertyWrite:e=>null,visitQuote:e=>null,visitSafeMethodCall(e){return t(this,e.receiver)||e},visitSafePropertyRead(e){return t(this,e.receiver)||e}})}needsTemporary(e){const t=(e,t)=>t&&(this._nodeMap.get(t)||t).visit(e);return e.visit({visitUnary(e){return t(this,e.expr)},visitBinary(e){return t(this,e.left)||t(this,e.right)},visitChain:e=>!1,visitConditional(e){return t(this,e.condition)||t(this,e.trueExp)||t(this,e.falseExp)},visitFunctionCall:e=>!0,visitImplicitReceiver:e=>!1,visitThisReceiver:e=>!1,visitInterpolation(e){return((e,n)=>n.some(n=>t(e,n)))(this,e.expressions)},visitKeyedRead:e=>!1,visitKeyedWrite:e=>!1,visitLiteralArray:e=>!0,visitLiteralMap:e=>!0,visitLiteralPrimitive:e=>!1,visitMethodCall:e=>!0,visitPipe:e=>!0,visitPrefixNot(e){return t(this,e.expression)},visitNonNullAssert(e){return t(this,e.expression)},visitPropertyRead:e=>!1,visitPropertyWrite:e=>!1,visitQuote:e=>!1,visitSafeMethodCall:e=>!0,visitSafePropertyRead:e=>!1})}allocateTemporary(){const e=this._currentTemporary++;return this.temporaryCount=Math.max(this._currentTemporary,this.temporaryCount),new Ye(li(this.bindingId,e))}releaseTemporary(e){if(this._currentTemporary--,e.name!=li(this.bindingId,this._currentTemporary))throw new Error(`Temporary ${e.name} released out of order`)}convertSourceSpan(e){if(this.baseSourceSpan){const t=this.baseSourceSpan.start.moveBy(e.start),n=this.baseSourceSpan.start.moveBy(e.end),s=this.baseSourceSpan.fullStart.moveBy(e.start);return new pr(t,n,s)}return null}addImplicitReceiverAccess(e){this.implicitReceiverAccesses&&this.implicitReceiverAccesses.add(e)}}class mi{constructor(e){this.globals=e}notifyImplicitReceiverUse(){}getLocal(e){return e===si.event.name?si.event:null}}class gi extends Kr{constructor(e,t,n,s){super(e,t,null,n),this.args=n,this.converter=s}}class fi{constructor(){this.strictStyling=!0}shimCssText(e,t,n=""){const s=e.match(Ri)||[];return e=function(e){return e.replace(Li,"")}(e),e=this._insertDirectives(e),[this._scopeCssText(e,t,n),...s].join("\n")}_insertDirectives(e){return e=this._insertPolyfillDirectivesInCssText(e),this._insertPolyfillRulesInCssText(e)}_insertPolyfillDirectivesInCssText(e){return e.replace(yi,function(...e){return e[2]+"{"})}_insertPolyfillRulesInCssText(e){return e.replace(xi,(...e)=>{const t=e[0].replace(e[1],"").replace(e[2],"");return e[4]+t})}_scopeCssText(e,t,n){const s=this._extractUnscopedRulesFromCssText(e);return e=this._insertPolyfillHostInCssText(e),e=this._convertColonHost(e),e=this._convertColonHostContext(e),e=this._convertShadowDOMSelectors(e),t&&(e=this._scopeSelectors(e,t,n)),(e=e+"\n"+s).trim()}_extractUnscopedRulesFromCssText(e){let t,n="";for(Si.lastIndex=0;null!==(t=Si.exec(e));)n+=t[0].replace(t[2],"").replace(t[1],t[4])+"\n\n";return n}_convertColonHost(e){return this._convertColonRule(e,wi,this._colonHostPartReplacer)}_convertColonHostContext(e){return this._convertColonRule(e,bi,this._colonHostContextPartReplacer)}_convertColonRule(e,t,n){return e.replace(t,function(...e){if(e[2]){const t=e[2].split(","),s=[];for(let r=0;r<t.length;r++){const i=t[r].trim();if(!i)break;s.push(n(Ii,i,e[3]))}return s.join(",")}return Ii+e[3]})}_colonHostContextPartReplacer(e,t,n){return t.indexOf(Ei)>-1?this._colonHostPartReplacer(e,t,n):e+t+n+", "+t+" "+e+n}_colonHostPartReplacer(e,t,n){return e+t.replace(Ei,"")+n}_convertShadowDOMSelectors(e){return Ni.reduce((e,t)=>e.replace(t," "),e)}_scopeSelectors(e,t,n){return function(e,t){const n=Ui(e,$i,"%QUOTED%"),s=Ui(n.escapedString,Bi,"%BLOCK%");let r=0,i=0;return s.escapedString.replace(Di,(...e)=>{const n=e[2];let i="",a=e[4],o="";a&&a.startsWith("{%BLOCK%")&&(i=s.blocks[r++],a=a.substring("%BLOCK%".length+1),o="{");const l=t(new Vi(n,i));return`${e[1]}${l.selector}${e[3]}${o}${l.content}${a}`}).replace(Fi,()=>n.blocks[i++])}(e,e=>{let s=e.selector,r=e.content;return"@"!=e.selector[0]?s=this._scopeSelector(e.selector,t,n,this.strictStyling):(e.selector.startsWith("@media")||e.selector.startsWith("@supports")||e.selector.startsWith("@page")||e.selector.startsWith("@document"))&&(r=this._scopeSelectors(e.content,t,n)),new Vi(s,r)})}_scopeSelector(e,t,n,s){return e.split(",").map(e=>e.trim().split(Ai)).map(e=>{const[r,...i]=e;return[(e=>this._selectorNeedsScoping(e,t)?s?this._applyStrictSelectorScope(e,t,n):this._applySelectorScope(e,t,n):e)(r),...i].join(" ")}).join(", ")}_selectorNeedsScoping(e,t){return!this._makeScopeMatcher(t).test(e)}_makeScopeMatcher(e){return e=e.replace(/\[/g,"\\[").replace(/\]/g,"\\]"),new RegExp("^("+e+")"+Pi,"m")}_applySelectorScope(e,t,n){return this._applySimpleSelectorScope(e,t,n)}_applySimpleSelectorScope(e,t,n){if(ki.lastIndex=0,ki.test(e)){const s=this.strictStyling?`[${n}]`:t;return e.replace(Ti,(e,t)=>t.replace(/([^:]*)(:*)(.*)/,(e,t,n,r)=>t+s+n+r)).replace(ki,s+" ")}return t+" "+e}_applyStrictSelectorScope(e,t,n){const s="["+(t=t.replace(/\[is=([^\]]*)\]/g,(e,...t)=>t[0]))+"]",r=e=>{let r=e.trim();if(!r)return"";if(e.indexOf(Ii)>-1)r=this._applySimpleSelectorScope(e,t,n);else{const t=e.replace(ki,"");if(t.length>0){const e=t.match(/([^:]*)(:*)(.*)/);e&&(r=e[1]+s+e[2]+e[3])}}return r},i=new vi(e);let a,o="",l=0;const c=/( |>|\+|~(?!=))\s*/g;let u=!((e=i.content()).indexOf(Ii)>-1);for(;null!==(a=c.exec(e));){const t=a[1],n=e.slice(l,a.index).trim();u=u||n.indexOf(Ii)>-1,o+=`${u?r(n):n} ${t} `,l=c.lastIndex}const p=e.substring(l);return u=u||p.indexOf(Ii)>-1,o+=u?r(p):p,i.restore(o)}_insertPolyfillHostInCssText(e){return e.replace(Mi,_i).replace(Oi,Ei)}}class vi{constructor(e){this.placeholders=[],this.index=0,e=e.replace(/(\[[^\]]*\])/g,(e,t)=>{const n=`__ph-${this.index}__`;return this.placeholders.push(t),this.index++,n}),this._content=e.replace(/(:nth-[-\w]+)(\([^)]+\))/g,(e,t,n)=>{const s=`__ph-${this.index}__`;return this.placeholders.push(n),this.index++,t+s})}restore(e){return e.replace(/__ph-(\d+)__/g,(e,t)=>this.placeholders[+t])}content(){return this._content}}const yi=/polyfill-next-selector[^}]*content:[\s]*?(['"])(.*?)\1[;\s]*}([^{]*?){/gim,xi=/(polyfill-rule)[^}]*(content:[\s]*(['"])(.*?)\3)[;\s]*[^}]*}/gim,Si=/(polyfill-unscoped-rule)[^}]*(content:[\s]*(['"])(.*?)\3)[;\s]*[^}]*}/gim,Ei="-shadowcsshost",_i="-shadowcsscontext",Ci=")(?:\\(((?:\\([^)(]*\\)|[^)(]*)+?)\\))?([^,{]*)",wi=new RegExp("("+Ei+Ci,"gim"),bi=new RegExp("("+_i+Ci,"gim"),Ii=Ei+"-no-combinator",Ti=/-shadowcsshost-no-combinator([^\s]*)/,Ni=[/::shadow/g,/::content/g,/\/shadow-deep\//g,/\/shadow\//g],Ai=/(?:>>>)|(?:\/deep\/)|(?:::ng-deep)/g,Pi="([>\\s~+[.,{:][\\s\\S]*)?$",ki=/-shadowcsshost/gim,Oi=/:host/gim,Mi=/:host-context/gim,Li=/\/\*\s*[\s\S]*?\*\//g,Ri=/\/\*\s*#\s*source(Mapping)?URL=[\s\S]+?\*\//g,Di=/(\s*)([^;\{\}]+?)(\s*)((?:{%BLOCK%}?\s*;?)|(?:\s*;))/g,Fi=/%QUOTED%/g,Bi=new Map([["{","}"]]),$i=new Map([['"','"'],["'","'"]]);class Vi{constructor(e,t){this.selector=e,this.content=t}}class ji{constructor(e,t){this.escapedString=e,this.blocks=t}}function Ui(e,t,n){const s=[],r=[];let i,a,o=0,l=0,c=-1;for(let u=0;u<e.length;u++){const p=e[u];"\\"===p?u++:p===a?(o--,0===o&&(r.push(e.substring(c,u)),s.push(n),l=u,c=-1,i=a=void 0)):p===i?o++:0===o&&t.has(p)&&(i=p,a=t.get(p),o=1,c=u+1,s.push(e.substring(l,c)))}return-1!==c?(r.push(e.substring(c)),s.push(n)):s.push(e.substring(l)),new ji(s.join(""),r)}class qi{constructor(e,t){this.sourceSpan=e,this.i18n=t}}class Hi extends qi{constructor(e,t,n){super(t,n),this.value=e}visit(e,t){return e.visitText(this,t)}}class Wi extends qi{constructor(e,t,n,s,r,i){super(s,i),this.switchValue=e,this.type=t,this.cases=n,this.switchValueSourceSpan=r}visit(e,t){return e.visitExpansion(this,t)}}class zi{constructor(e,t,n,s,r){this.value=e,this.expression=t,this.sourceSpan=n,this.valueSourceSpan=s,this.expSourceSpan=r}visit(e,t){return e.visitExpansionCase(this,t)}}class Ki extends qi{constructor(e,t,n,s,r){super(n,r),this.name=e,this.value=t,this.valueSpan=s}visit(e,t){return e.visitAttribute(this,t)}}class Xi extends qi{constructor(e,t,n,s,r,i=null,a){super(s,a),this.name=e,this.attrs=t,this.children=n,this.startSourceSpan=r,this.endSourceSpan=i}visit(e,t){return e.visitElement(this,t)}}class Gi{constructor(e,t){this.value=e,this.sourceSpan=t}visit(e,t){return e.visitComment(this,t)}}function Qi(e,t,n=null){const s=[],r=e.visit?t=>e.visit(t,n)||t.visit(e,n):t=>t.visit(e,n);return t.forEach(e=>{const t=r(e);t&&s.push(t)}),s}var Yi;!function(e){e[e.TAG_OPEN_START=0]="TAG_OPEN_START",e[e.TAG_OPEN_END=1]="TAG_OPEN_END",e[e.TAG_OPEN_END_VOID=2]="TAG_OPEN_END_VOID",e[e.TAG_CLOSE=3]="TAG_CLOSE",e[e.INCOMPLETE_TAG_OPEN=4]="INCOMPLETE_TAG_OPEN",e[e.TEXT=5]="TEXT",e[e.ESCAPABLE_RAW_TEXT=6]="ESCAPABLE_RAW_TEXT",e[e.RAW_TEXT=7]="RAW_TEXT",e[e.COMMENT_START=8]="COMMENT_START",e[e.COMMENT_END=9]="COMMENT_END",e[e.CDATA_START=10]="CDATA_START",e[e.CDATA_END=11]="CDATA_END",e[e.ATTR_NAME=12]="ATTR_NAME",e[e.ATTR_QUOTE=13]="ATTR_QUOTE",e[e.ATTR_VALUE=14]="ATTR_VALUE",e[e.DOC_TYPE=15]="DOC_TYPE",e[e.EXPANSION_FORM_START=16]="EXPANSION_FORM_START",e[e.EXPANSION_CASE_VALUE=17]="EXPANSION_CASE_VALUE",e[e.EXPANSION_CASE_EXP_START=18]="EXPANSION_CASE_EXP_START",e[e.EXPANSION_CASE_EXP_END=19]="EXPANSION_CASE_EXP_END",e[e.EXPANSION_FORM_END=20]="EXPANSION_FORM_END",e[e.EOF=21]="EOF"}(Yi||(Yi={}));class Zi{constructor(e,t,n){this.type=e,this.parts=t,this.sourceSpan=n}}class Ji extends fr{constructor(e,t,n){super(n,e),this.tokenType=t}}class ea{constructor(e,t,n){this.tokens=e,this.errors=t,this.nonNormalizedIcuExpressions=n}}const ta=/\r\n?/g;function na(e){return`Unexpected character "${0===e?"EOF":String.fromCharCode(e)}"`}function sa(e){return`Unknown entity "${e}" - use the "&#<decimal>;" or "&#x<hex>;" syntax`}var ra;!function(e){e.HEX="hexadecimal",e.DEC="decimal"}(ra||(ra={}));class ia{constructor(e){this.error=e}}class aa{constructor(e,t,n){this._getTagDefinition=t,this._currentTokenStart=null,this._currentTokenType=null,this._expansionCaseStack=[],this._inInterpolation=!1,this.tokens=[],this.errors=[],this.nonNormalizedIcuExpressions=[],this._tokenizeIcu=n.tokenizeExpansionForms||!1,this._interpolationConfig=n.interpolationConfig||Hs,this._leadingTriviaCodePoints=n.leadingTriviaChars&&n.leadingTriviaChars.map(e=>e.codePointAt(0)||0);const s=n.range||{endPos:e.content.length,startPos:0,startLine:0,startCol:0};this._cursor=n.escapedString?new da(e,s):new ha(e,s),this._preserveLineEndings=n.preserveLineEndings||!1,this._escapedString=n.escapedString||!1,this._i18nNormalizeLineEndingsInICUs=n.i18nNormalizeLineEndingsInICUs||!1;try{this._cursor.init()}catch(e){this.handleError(e)}}_processCarriageReturns(e){return this._preserveLineEndings?e:e.replace(ta,"\n")}tokenize(){for(;0!==this._cursor.peek();){const e=this._cursor.clone();try{this._attemptCharCode(60)?this._attemptCharCode(33)?this._attemptCharCode(91)?this._consumeCdata(e):this._attemptCharCode(45)?this._consumeComment(e):this._consumeDocType(e):this._attemptCharCode(47)?this._consumeTagClose(e):this._consumeTagOpen(e):this._tokenizeIcu&&this._tokenizeExpansionForm()||this._consumeText()}catch(e){this.handleError(e)}}this._beginToken(Yi.EOF),this._endToken([])}_tokenizeExpansionForm(){if(this.isExpansionFormStart())return this._consumeExpansionFormStart(),!0;if(125!==this._cursor.peek()&&this._isInExpansionForm())return this._consumeExpansionCaseStart(),!0;if(125===this._cursor.peek()){if(this._isInExpansionCase())return this._consumeExpansionCaseEnd(),!0;if(this._isInExpansionForm())return this._consumeExpansionFormEnd(),!0}return!1}_beginToken(e,t=this._cursor.clone()){this._currentTokenStart=t,this._currentTokenType=e}_endToken(e,t){if(null===this._currentTokenStart)throw new Ji("Programming error - attempted to end a token when there was no start to the token",this._currentTokenType,this._cursor.getSpan(t));if(null===this._currentTokenType)throw new Ji("Programming error - attempted to end a token which has no token type",null,this._cursor.getSpan(this._currentTokenStart));const n=new Zi(this._currentTokenType,e,this._cursor.getSpan(this._currentTokenStart,this._leadingTriviaCodePoints));return this.tokens.push(n),this._currentTokenStart=null,this._currentTokenType=null,n}_createError(e,t){this._isInExpansionForm()&&(e+=' (Do you have an unescaped "{" in your template? Use "{{ \'{\' }}") to escape it.)');const n=new Ji(e,this._currentTokenType,t);return this._currentTokenStart=null,this._currentTokenType=null,new ia(n)}handleError(e){if(e instanceof ma&&(e=this._createError(e.msg,this._cursor.getSpan(e.cursor))),!(e instanceof ia))throw e;this.errors.push(e.error)}_attemptCharCode(e){return this._cursor.peek()===e&&(this._cursor.advance(),!0)}_attemptCharCodeCaseInsensitive(e){return t=e,pa(this._cursor.peek())==pa(t)&&(this._cursor.advance(),!0);var t}_requireCharCode(e){const t=this._cursor.clone();if(!this._attemptCharCode(e))throw this._createError(na(this._cursor.peek()),this._cursor.getSpan(t))}_attemptStr(e){const t=e.length;if(this._cursor.charsLeft()<t)return!1;const n=this._cursor.clone();for(let s=0;s<t;s++)if(!this._attemptCharCode(e.charCodeAt(s)))return this._cursor=n,!1;return!0}_attemptStrCaseInsensitive(e){for(let t=0;t<e.length;t++)if(!this._attemptCharCodeCaseInsensitive(e.charCodeAt(t)))return!1;return!0}_requireStr(e){const t=this._cursor.clone();if(!this._attemptStr(e))throw this._createError(na(this._cursor.peek()),this._cursor.getSpan(t))}_attemptCharCodeUntilFn(e){for(;!e(this._cursor.peek());)this._cursor.advance()}_requireCharCodeUntilFn(e,t){const n=this._cursor.clone();if(this._attemptCharCodeUntilFn(e),this._cursor.diff(n)<t)throw this._createError(na(this._cursor.peek()),this._cursor.getSpan(n))}_attemptUntilChar(e){for(;this._cursor.peek()!==e;)this._cursor.advance()}_readChar(e){if(e&&38===this._cursor.peek())return this._decodeEntity();{const e=String.fromCodePoint(this._cursor.peek());return this._cursor.advance(),e}}_decodeEntity(){const e=this._cursor.clone();if(this._cursor.advance(),!this._attemptCharCode(35)){const t=this._cursor.clone();if(this._attemptCharCodeUntilFn(ua),59!=this._cursor.peek())return this._cursor=t,"&";const n=this._cursor.getChars(t);this._cursor.advance();const s=ye[n];if(!s)throw this._createError(sa(n),this._cursor.getSpan(e));return s}{const n=this._attemptCharCode(120)||this._attemptCharCode(88),s=this._cursor.clone();if(this._attemptCharCodeUntilFn(ca),59!=this._cursor.peek())throw this._cursor.advance(),this._createError((t=n?ra.HEX:ra.DEC,`Unable to parse entity "${this._cursor.getChars(e)}" - ${t} character reference entities must end with ";"`),this._cursor.getSpan());const r=this._cursor.getChars(s);this._cursor.advance();try{const e=parseInt(r,n?16:10);return String.fromCharCode(e)}catch(t){throw this._createError(sa(this._cursor.getChars(e)),this._cursor.getSpan())}}var t}_consumeRawText(e,t){this._beginToken(e?Yi.ESCAPABLE_RAW_TEXT:Yi.RAW_TEXT);const n=[];for(;;){const s=this._cursor.clone(),r=t();if(this._cursor=s,r)break;n.push(this._readChar(e))}return this._endToken([this._processCarriageReturns(n.join(""))])}_consumeComment(e){this._beginToken(Yi.COMMENT_START,e),this._requireCharCode(45),this._endToken([]),this._consumeRawText(!1,()=>this._attemptStr("--\x3e")),this._beginToken(Yi.COMMENT_END),this._requireStr("--\x3e"),this._endToken([])}_consumeCdata(e){this._beginToken(Yi.CDATA_START,e),this._requireStr("CDATA["),this._endToken([]),this._consumeRawText(!1,()=>this._attemptStr("]]>")),this._beginToken(Yi.CDATA_END),this._requireStr("]]>"),this._endToken([])}_consumeDocType(e){this._beginToken(Yi.DOC_TYPE,e);const t=this._cursor.clone();this._attemptUntilChar(62);const n=this._cursor.getChars(t);this._cursor.advance(),this._endToken([n])}_consumePrefixAndName(){const e=this._cursor.clone();let t="";for(;58!==this._cursor.peek()&&!(((n=this._cursor.peek())<97||122<n)&&(n<65||90<n)&&(n<48||n>57));)this._cursor.advance();var n;let s;return 58===this._cursor.peek()?(t=this._cursor.getChars(e),this._cursor.advance(),s=this._cursor.clone()):s=e,this._requireCharCodeUntilFn(la,""===t?0:1),[t,this._cursor.getChars(s)]}_consumeTagOpen(e){let t,n,s;try{if(!ar(this._cursor.peek()))throw this._createError(na(this._cursor.peek()),this._cursor.getSpan(e));for(s=this._consumeTagOpenStart(e),n=s.parts[0],t=s.parts[1],this._attemptCharCodeUntilFn(oa);47!==this._cursor.peek()&&62!==this._cursor.peek()&&60!==this._cursor.peek();)this._consumeAttributeName(),this._attemptCharCodeUntilFn(oa),this._attemptCharCode(61)&&(this._attemptCharCodeUntilFn(oa),this._consumeAttributeValue()),this._attemptCharCodeUntilFn(oa);this._consumeTagOpenEnd()}catch(t){if(t instanceof ia)return void(s?s.type=Yi.INCOMPLETE_TAG_OPEN:(this._beginToken(Yi.TEXT,e),this._endToken(["<"])));throw t}const r=this._getTagDefinition(t).contentType;r===pe.RAW_TEXT?this._consumeRawTextWithTagClose(n,t,!1):r===pe.ESCAPABLE_RAW_TEXT&&this._consumeRawTextWithTagClose(n,t,!0)}_consumeRawTextWithTagClose(e,t,n){this._consumeRawText(n,()=>!!this._attemptCharCode(60)&&!!this._attemptCharCode(47)&&(this._attemptCharCodeUntilFn(oa),!!this._attemptStrCaseInsensitive(t)&&(this._attemptCharCodeUntilFn(oa),this._attemptCharCode(62)))),this._beginToken(Yi.TAG_CLOSE),this._requireCharCodeUntilFn(e=>62===e,3),this._cursor.advance(),this._endToken([e,t])}_consumeTagOpenStart(e){this._beginToken(Yi.TAG_OPEN_START,e);const t=this._consumePrefixAndName();return this._endToken(t)}_consumeAttributeName(){const e=this._cursor.peek();if(39===e||34===e)throw this._createError(na(e),this._cursor.getSpan());this._beginToken(Yi.ATTR_NAME);const t=this._consumePrefixAndName();this._endToken(t)}_consumeAttributeValue(){let e;if(39===this._cursor.peek()||34===this._cursor.peek()){this._beginToken(Yi.ATTR_QUOTE);const t=this._cursor.peek();this._cursor.advance(),this._endToken([String.fromCodePoint(t)]),this._beginToken(Yi.ATTR_VALUE);const n=[];for(;this._cursor.peek()!==t;)n.push(this._readChar(!0));e=n.join(""),this._endToken([this._processCarriageReturns(e)]),this._beginToken(Yi.ATTR_QUOTE),this._cursor.advance(),this._endToken([String.fromCodePoint(t)])}else{this._beginToken(Yi.ATTR_VALUE);const t=this._cursor.clone();this._requireCharCodeUntilFn(la,1),e=this._cursor.getChars(t),this._endToken([this._processCarriageReturns(e)])}}_consumeTagOpenEnd(){const e=this._attemptCharCode(47)?Yi.TAG_OPEN_END_VOID:Yi.TAG_OPEN_END;this._beginToken(e),this._requireCharCode(62),this._endToken([])}_consumeTagClose(e){this._beginToken(Yi.TAG_CLOSE,e),this._attemptCharCodeUntilFn(oa);const t=this._consumePrefixAndName();this._attemptCharCodeUntilFn(oa),this._requireCharCode(62),this._endToken(t)}_consumeExpansionFormStart(){this._beginToken(Yi.EXPANSION_FORM_START),this._requireCharCode(123),this._endToken([]),this._expansionCaseStack.push(Yi.EXPANSION_FORM_START),this._beginToken(Yi.RAW_TEXT);const e=this._readUntil(44),t=this._processCarriageReturns(e);if(this._i18nNormalizeLineEndingsInICUs)this._endToken([t]);else{const n=this._endToken([e]);t!==e&&this.nonNormalizedIcuExpressions.push(n)}this._requireCharCode(44),this._attemptCharCodeUntilFn(oa),this._beginToken(Yi.RAW_TEXT);const n=this._readUntil(44);this._endToken([n]),this._requireCharCode(44),this._attemptCharCodeUntilFn(oa)}_consumeExpansionCaseStart(){this._beginToken(Yi.EXPANSION_CASE_VALUE);const e=this._readUntil(123).trim();this._endToken([e]),this._attemptCharCodeUntilFn(oa),this._beginToken(Yi.EXPANSION_CASE_EXP_START),this._requireCharCode(123),this._endToken([]),this._attemptCharCodeUntilFn(oa),this._expansionCaseStack.push(Yi.EXPANSION_CASE_EXP_START)}_consumeExpansionCaseEnd(){this._beginToken(Yi.EXPANSION_CASE_EXP_END),this._requireCharCode(125),this._endToken([]),this._attemptCharCodeUntilFn(oa),this._expansionCaseStack.pop()}_consumeExpansionFormEnd(){this._beginToken(Yi.EXPANSION_FORM_END),this._requireCharCode(125),this._endToken([]),this._expansionCaseStack.pop()}_consumeText(){const e=this._cursor.clone();this._beginToken(Yi.TEXT,e);const t=[];do{this._interpolationConfig&&this._attemptStr(this._interpolationConfig.start)?(t.push(this._interpolationConfig.start),this._inInterpolation=!0):this._interpolationConfig&&this._inInterpolation&&this._attemptStr(this._interpolationConfig.end)?(t.push(this._interpolationConfig.end),this._inInterpolation=!1):t.push(this._readChar(!0))}while(!this._isTextEnd());this._endToken([this._processCarriageReturns(t.join(""))])}_isTextEnd(){if(60===this._cursor.peek()||0===this._cursor.peek())return!0;if(this._tokenizeIcu&&!this._inInterpolation){if(this.isExpansionFormStart())return!0;if(125===this._cursor.peek()&&this._isInExpansionCase())return!0}return!1}_readUntil(e){const t=this._cursor.clone();return this._attemptUntilChar(e),this._cursor.getChars(t)}_isInExpansionCase(){return this._expansionCaseStack.length>0&&this._expansionCaseStack[this._expansionCaseStack.length-1]===Yi.EXPANSION_CASE_EXP_START}_isInExpansionForm(){return this._expansionCaseStack.length>0&&this._expansionCaseStack[this._expansionCaseStack.length-1]===Yi.EXPANSION_FORM_START}isExpansionFormStart(){if(123!==this._cursor.peek())return!1;if(this._interpolationConfig){const e=this._cursor.clone(),t=this._attemptStr(this._interpolationConfig.start);return this._cursor=e,!t}return!0}}function oa(e){return!rr(e)||0===e}function la(e){return rr(e)||62===e||60===e||47===e||39===e||34===e||61===e}function ca(e){return 59==e||0==e||!function(e){return e>=97&&e<=102||e>=65&&e<=70||ir(e)}(e)}function ua(e){return 59==e||0==e||!ar(e)}function pa(e){return e>=97&&e<=122?e-97+65:e}class ha{constructor(e,t){if(e instanceof ha){this.file=e.file,this.input=e.input,this.end=e.end;const t=e.state;this.state={peek:t.peek,offset:t.offset,line:t.line,column:t.column}}else{if(!t)throw new Error("Programming error: the range argument must be provided with a file argument.");this.file=e,this.input=e.content,this.end=t.endPos,this.state={peek:-1,offset:t.startPos,line:t.startLine,column:t.startCol}}}clone(){return new ha(this)}peek(){return this.state.peek}charsLeft(){return this.end-this.state.offset}diff(e){return this.state.offset-e.state.offset}advance(){this.advanceState(this.state)}init(){this.updatePeek(this.state)}getSpan(e,t){let n=e=e||this;if(t)for(;this.diff(e)>0&&-1!==t.indexOf(e.peek());)n===e&&(e=e.clone()),e.advance();const s=this.locationFromCursor(e),r=this.locationFromCursor(this),i=n!==e?this.locationFromCursor(n):s;return new pr(s,r,i)}getChars(e){return this.input.substring(e.state.offset,this.state.offset)}charAt(e){return this.input.charCodeAt(e)}advanceState(e){if(e.offset>=this.end)throw this.state=e,new ma('Unexpected character "EOF"',this);const t=this.charAt(e.offset);10===t?(e.line++,e.column=0):or(t)||e.column++,e.offset++,this.updatePeek(e)}updatePeek(e){e.peek=e.offset>=this.end?0:this.charAt(e.offset)}locationFromCursor(e){return new cr(e.file,e.state.offset,e.state.line,e.state.column)}}class da extends ha{constructor(e,t){e instanceof da?(super(e),this.internalState=Object.assign({},e.internalState)):(super(e,t),this.internalState=this.state)}advance(){this.state=this.internalState,super.advance(),this.processEscapeSequence()}init(){super.init(),this.processEscapeSequence()}clone(){return new da(this)}getChars(e){const t=e.clone();let n="";for(;t.internalState.offset<this.internalState.offset;)n+=String.fromCodePoint(t.peek()),t.advance();return n}processEscapeSequence(){const e=()=>this.internalState.peek;if(92===e())if(this.internalState=Object.assign({},this.state),this.advanceState(this.internalState),110===e())this.state.peek=10;else if(114===e())this.state.peek=13;else if(118===e())this.state.peek=11;else if(116===e())this.state.peek=9;else if(98===e())this.state.peek=8;else if(102===e())this.state.peek=12;else if(117===e())if(this.advanceState(this.internalState),123===e()){this.advanceState(this.internalState);const t=this.clone();let n=0;for(;125!==e();)this.advanceState(this.internalState),n++;this.state.peek=this.decodeHexDigits(t,n)}else{const e=this.clone();this.advanceState(this.internalState),this.advanceState(this.internalState),this.advanceState(this.internalState),this.state.peek=this.decodeHexDigits(e,4)}else if(120===e()){this.advanceState(this.internalState);const e=this.clone();this.advanceState(this.internalState),this.state.peek=this.decodeHexDigits(e,2)}else if(lr(e())){let t="",n=0,s=this.clone();for(;lr(e())&&n<3;)s=this.clone(),t+=String.fromCodePoint(e()),this.advanceState(this.internalState),n++;this.state.peek=parseInt(t,8),this.internalState=s.internalState}else or(this.internalState.peek)?(this.advanceState(this.internalState),this.state=this.internalState):this.state.peek=this.internalState.peek}decodeHexDigits(e,t){const n=this.input.substr(e.internalState.offset,t),s=parseInt(n,16);if(isNaN(s))throw e.state=e.internalState,new ma("Invalid hexadecimal escape sequence",e);return s}}class ma{constructor(e,t){this.msg=e,this.cursor=t}}class ga extends fr{constructor(e,t,n){super(t,n),this.elementName=e}static create(e,t,n){return new ga(e,t,n)}}class fa{constructor(e,t){this.rootNodes=e,this.errors=t}}class va{constructor(e,t){this.tokens=e,this.getTagDefinition=t,this._index=-1,this._elementStack=[],this.rootNodes=[],this.errors=[],this._advance()}build(){for(;this._peek.type!==Yi.EOF;)this._peek.type===Yi.TAG_OPEN_START||this._peek.type===Yi.INCOMPLETE_TAG_OPEN?this._consumeStartTag(this._advance()):this._peek.type===Yi.TAG_CLOSE?this._consumeEndTag(this._advance()):this._peek.type===Yi.CDATA_START?(this._closeVoidElement(),this._consumeCdata(this._advance())):this._peek.type===Yi.COMMENT_START?(this._closeVoidElement(),this._consumeComment(this._advance())):this._peek.type===Yi.TEXT||this._peek.type===Yi.RAW_TEXT||this._peek.type===Yi.ESCAPABLE_RAW_TEXT?(this._closeVoidElement(),this._consumeText(this._advance())):this._peek.type===Yi.EXPANSION_FORM_START?this._consumeExpansion(this._advance()):this._advance()}_advance(){const e=this._peek;return this._index<this.tokens.length-1&&this._index++,this._peek=this.tokens[this._index],e}_advanceIf(e){return this._peek.type===e?this._advance():null}_consumeCdata(e){this._consumeText(this._advance()),this._advanceIf(Yi.CDATA_END)}_consumeComment(e){const t=this._advanceIf(Yi.RAW_TEXT);this._advanceIf(Yi.COMMENT_END);const n=null!=t?t.parts[0].trim():null;this._addToParent(new Gi(n,e.sourceSpan))}_consumeExpansion(e){const t=this._advance(),n=this._advance(),s=[];for(;this._peek.type===Yi.EXPANSION_CASE_VALUE;){const e=this._parseExpansionCase();if(!e)return;s.push(e)}if(this._peek.type!==Yi.EXPANSION_FORM_END)return void this.errors.push(ga.create(null,this._peek.sourceSpan,"Invalid ICU message. Missing '}'."));const r=new pr(e.sourceSpan.start,this._peek.sourceSpan.end,e.sourceSpan.fullStart);this._addToParent(new Wi(t.parts[0],n.parts[0],s,r,t.sourceSpan)),this._advance()}_parseExpansionCase(){const e=this._advance();if(this._peek.type!==Yi.EXPANSION_CASE_EXP_START)return this.errors.push(ga.create(null,this._peek.sourceSpan,"Invalid ICU message. Missing '{'.")),null;const t=this._advance(),n=this._collectExpansionExpTokens(t);if(!n)return null;const s=this._advance();n.push(new Zi(Yi.EOF,[],s.sourceSpan));const r=new va(n,this.getTagDefinition);if(r.build(),r.errors.length>0)return this.errors=this.errors.concat(r.errors),null;const i=new pr(e.sourceSpan.start,s.sourceSpan.end,e.sourceSpan.fullStart),a=new pr(t.sourceSpan.start,s.sourceSpan.end,t.sourceSpan.fullStart);return new zi(e.parts[0],r.rootNodes,i,e.sourceSpan,a)}_collectExpansionExpTokens(e){const t=[],n=[Yi.EXPANSION_CASE_EXP_START];for(;;){if(this._peek.type!==Yi.EXPANSION_FORM_START&&this._peek.type!==Yi.EXPANSION_CASE_EXP_START||n.push(this._peek.type),this._peek.type===Yi.EXPANSION_CASE_EXP_END){if(!ya(n,Yi.EXPANSION_CASE_EXP_START))return this.errors.push(ga.create(null,e.sourceSpan,"Invalid ICU message. Missing '}'.")),null;if(n.pop(),0==n.length)return t}if(this._peek.type===Yi.EXPANSION_FORM_END){if(!ya(n,Yi.EXPANSION_FORM_START))return this.errors.push(ga.create(null,e.sourceSpan,"Invalid ICU message. Missing '}'.")),null;n.pop()}if(this._peek.type===Yi.EOF)return this.errors.push(ga.create(null,e.sourceSpan,"Invalid ICU message. Missing '}'.")),null;t.push(this._advance())}}_consumeText(e){let t=e.parts[0];if(t.length>0&&"\n"==t[0]){const e=this._getParentElement();null!=e&&0==e.children.length&&this.getTagDefinition(e.name).ignoreFirstLf&&(t=t.substring(1))}t.length>0&&this._addToParent(new Hi(t,e.sourceSpan))}_closeVoidElement(){const e=this._getParentElement();e&&this.getTagDefinition(e.name).isVoid&&this._elementStack.pop()}_consumeStartTag(e){const[t,n]=e.parts,s=[];for(;this._peek.type===Yi.ATTR_NAME;)s.push(this._consumeAttr(this._advance()));const r=this._getElementFullName(t,n,this._getParentElement());let i=!1;if(this._peek.type===Yi.TAG_OPEN_END_VOID){this._advance(),i=!0;const t=this.getTagDefinition(r);t.canSelfClose||null!==fe(r)||t.isVoid||this.errors.push(ga.create(r,e.sourceSpan,`Only void and foreign elements can be self closed "${e.parts[1]}"`))}else this._peek.type===Yi.TAG_OPEN_END&&(this._advance(),i=!1);const a=this._peek.sourceSpan.start,o=new pr(e.sourceSpan.start,a,e.sourceSpan.fullStart),l=new pr(e.sourceSpan.start,a,e.sourceSpan.fullStart),c=new Xi(r,s,[],o,l,void 0);this._pushElement(c),i?this._popElement(r,o):e.type===Yi.INCOMPLETE_TAG_OPEN&&(this._popElement(r,null),this.errors.push(ga.create(r,o,`Opening tag "${r}" not terminated.`)))}_pushElement(e){const t=this._getParentElement();t&&this.getTagDefinition(t.name).isClosedByChild(e.name)&&this._elementStack.pop(),this._addToParent(e),this._elementStack.push(e)}_consumeEndTag(e){const t=this._getElementFullName(e.parts[0],e.parts[1],this._getParentElement());this.getTagDefinition(t).isVoid?this.errors.push(ga.create(t,e.sourceSpan,`Void elements do not have end tags "${e.parts[1]}"`)):this._popElement(t,e.sourceSpan)||this.errors.push(ga.create(t,e.sourceSpan,`Unexpected closing tag "${t}". It may happen when the tag has already been closed by another tag. For more info see https://www.w3.org/TR/html5/syntax.html#closing-elements-that-have-implied-end-tags`))}_popElement(e,t){for(let n=this._elementStack.length-1;n>=0;n--){const s=this._elementStack[n];if(s.name==e)return s.endSourceSpan=t,s.sourceSpan.end=null!==t?t.end:s.sourceSpan.end,this._elementStack.splice(n,this._elementStack.length-n),!0;if(!this.getTagDefinition(s.name).closedByParent)return!1}return!1}_consumeAttr(e){const t=ve(e.parts[0],e.parts[1]);let n=e.sourceSpan.end,s="",r=void 0;if(this._peek.type===Yi.ATTR_QUOTE&&this._advance(),this._peek.type===Yi.ATTR_VALUE){const e=this._advance();s=e.parts[0],n=e.sourceSpan.end,r=e.sourceSpan}return this._peek.type===Yi.ATTR_QUOTE&&(n=this._advance().sourceSpan.end),new Ki(t,s,new pr(e.sourceSpan.start,n,e.sourceSpan.fullStart),r)}_getParentElement(){return this._elementStack.length>0?this._elementStack[this._elementStack.length-1]:null}_addToParent(e){const t=this._getParentElement();null!=t?t.children.push(e):this.rootNodes.push(e)}_getElementFullName(e,t,n){if(""===e&&""===(e=this.getTagDefinition(t).implicitNamespacePrefix||"")&&null!=n){const t=de(n.name)[1];this.getTagDefinition(t).preventNamespaceInheritance||(e=fe(n.name))}return ve(e,t)}}function ya(e,t){return e.length>0&&e[e.length-1]===t}class xa extends class{constructor(e){this.getTagDefinition=e}parse(e,t,n){const s=function(e,t,n,s={}){const r=new aa(new ur(e,t),n,s);return r.tokenize(),new ea(function(e){const t=[];let n=void 0;for(let s=0;s<e.length;s++){const r=e[s];n&&n.type==Yi.TEXT&&r.type==Yi.TEXT?(n.parts[0]+=r.parts[0],n.sourceSpan.end=r.sourceSpan.end):(n=r,t.push(n))}return t}(r.tokens),r.errors,r.nonNormalizedIcuExpressions)}(e,t,this.getTagDefinition,n),r=new va(s.tokens,this.getTagDefinition);return r.build(),new fa(r.rootNodes,s.errors.concat(r.errors))}}{constructor(){super(_e)}parse(e,t,n){return super.parse(e,t,n)}}const Sa=new Set(["pre","template","textarea","script","style"]),Ea=new RegExp("[^ \f\n\r\t\v - \u2028\u2029 \ufeff]"),_a=new RegExp("[ \f\n\r\t\v - \u2028\u2029 \ufeff]{2,}","g");function Ca(e){return e.replace(new RegExp("","g")," ")}class wa{visitElement(e,t){return Sa.has(e.name)||e.attrs.some(e=>"ngPreserveWhitespaces"===e.name)?new Xi(e.name,Qi(this,e.attrs),e.children,e.sourceSpan,e.startSourceSpan,e.endSourceSpan,e.i18n):new Xi(e.name,e.attrs,function(e,t){const n=[];return t.forEach((s,r)=>{const i=s.visit(e,{prev:t[r-1],next:t[r+1]});i&&n.push(i)}),n}(this,e.children),e.sourceSpan,e.startSourceSpan,e.endSourceSpan,e.i18n)}visitAttribute(e,t){return"ngPreserveWhitespaces"!==e.name?e:null}visitText(e,t){return e.value.match(Ea)||t&&(t.prev instanceof Wi||t.next instanceof Wi)?new Hi(Ca(e.value).replace(_a," "),e.sourceSpan,e.i18n):null}visitComment(e,t){return e}visitExpansion(e,t){return e}visitExpansionCase(e,t){return e}}var ba;!function(e){e[e.PublicService=0]="PublicService",e[e.PrivateService=1]="PrivateService",e[e.Component=2]="Component",e[e.Directive=3]="Directive",e[e.Builtin=4]="Builtin"}(ba||(ba={}));const Ia=/^([^:/?#]+):/;class Ta{constructor(e,t,n,s,r){if(this._exprParser=e,this._interpolationConfig=t,this._schemaRegistry=n,this.errors=r,this.pipesByName=null,this._usedPipes=new Map,s){const e=new Map;s.forEach(t=>e.set(t.name,t)),this.pipesByName=e}}get interpolationConfig(){return this._interpolationConfig}getUsedPipes(){return Array.from(this._usedPipes.values())}createBoundHostProperties(e,t){if(e.hostProperties){const n=[];return Object.keys(e.hostProperties).forEach(s=>{const r=e.hostProperties[s];"string"==typeof r?this.parsePropertyBinding(s,r,!0,t,t.start.offset,void 0,[],n,t):this._reportError(`Value of the host property binding "${s}" needs to be a string representing an expression but got "${r}" (${typeof r})`,t)}),n}return null}createDirectiveHostPropertyAsts(e,t,n){const s=this.createBoundHostProperties(e,n);return s&&s.map(e=>this.createBoundElementProperty(t,e))}createDirectiveHostEventAsts(e,t){if(e.hostListeners){const n=[];return Object.keys(e.hostListeners).forEach(s=>{const r=e.hostListeners[s];"string"==typeof r?this.parseEvent(s,r,t,t,[],n):this._reportError(`Value of the host listener "${s}" needs to be a string representing an expression but got "${r}" (${typeof r})`,t)}),n}return null}parseInterpolation(e,t){const n=t.start.toString();try{const s=this._exprParser.parseInterpolation(e,n,t.start.offset,this._interpolationConfig);return s&&this._reportExpressionParserErrors(s.errors,t),this._checkPipes(s,t),s}catch(e){return this._reportError(""+e,t),this._exprParser.wrapLiteralPrimitive("ERROR",n,t.start.offset)}}parseInterpolationExpression(e,t){const n=t.start.toString();try{const s=this._exprParser.parseInterpolationExpression(e,n,t.start.offset);return s&&this._reportExpressionParserErrors(s.errors,t),this._checkPipes(s,t),s}catch(e){return this._reportError(""+e,t),this._exprParser.wrapLiteralPrimitive("ERROR",n,t.start.offset)}}parseInlineTemplateBinding(e,t,n,s,r,i,a,o){const l=this._parseTemplateBindings(e,t,n,n.start.offset+"*".length,s);for(const e of l){const t=ka(n,e.sourceSpan),l=e.key.source,c=ka(n,e.key.span);if(e instanceof Qr){const s=e.value?e.value.source:"$implicit",r=e.value?ka(n,e.value.span):void 0;a.push(new ti(l,s,t,c,r))}else if(e.value){const s=o?t:n,a=ka(n,e.value.ast.sourceSpan);this._parsePropertyAst(l,e.value,s,c,a,r,i)}else r.push([l,""]),this.parseLiteralAttr(l,null,c,s,void 0,r,i,c)}}_parseTemplateBindings(e,t,n,s,r){const i=n.start.toString();try{const a=this._exprParser.parseTemplateBindings(e,t,i,s,r);return this._reportExpressionParserErrors(a.errors,n),a.templateBindings.forEach(e=>{e.value instanceof Gr&&this._checkPipes(e.value,n)}),a.warnings.forEach(e=>{this._reportError(e,n,hr.WARNING)}),a.templateBindings}catch(e){return this._reportError(""+e,n),[]}}parseLiteralAttr(e,t,n,s,r,i,a,o){Aa(e)?(e=e.substring(1),t&&this._reportError('Assigning animation triggers via @prop="exp" attributes with an expression is invalid. Use property bindings (e.g. [@prop]="exp") or use an attribute without a value (e.g. @prop) instead.',n,hr.ERROR),this._parseAnimation(e,t,n,s,o,r,i,a)):a.push(new Jr(e,this._exprParser.wrapLiteralPrimitive(t,"",s),dr.LITERAL_ATTR,n,o,r))}parsePropertyBinding(e,t,n,s,r,i,a,o,l){0===e.length&&this._reportError("Property name is missing in binding",s);let c=!1;e.startsWith("animate-")?(c=!0,e=e.substring("animate-".length)):Aa(e)&&(c=!0,e=e.substring(1)),c?this._parseAnimation(e,t,s,r,l,i,a,o):this._parsePropertyAst(e,this._parseBinding(t,n,i||s,r),s,l,i,a,o)}parsePropertyInterpolation(e,t,n,s,r,i,a){const o=this.parseInterpolation(t,s||n);return!!o&&(this._parsePropertyAst(e,o,n,a,s,r,i),!0)}_parsePropertyAst(e,t,n,s,r,i,a){i.push([e,t.source]),a.push(new Jr(e,t,dr.DEFAULT,n,s,r))}_parseAnimation(e,t,n,s,r,i,a,o){0===e.length&&this._reportError("Animation trigger is missing",n);const l=this._parseBinding(t||"undefined",!1,i||n,s);a.push([e,l.source]),o.push(new Jr(e,l,dr.ANIMATION,n,r,i))}_parseBinding(e,t,n,s){const r=(n&&n.start||"(unknown)").toString();try{const i=t?this._exprParser.parseSimpleBinding(e,r,s,this._interpolationConfig):this._exprParser.parseBinding(e,r,s,this._interpolationConfig);return i&&this._reportExpressionParserErrors(i.errors,n),this._checkPipes(i,n),i}catch(e){return this._reportError(""+e,n),this._exprParser.wrapLiteralPrimitive("ERROR",r,s)}}createBoundElementProperty(e,t,n=!1,s=!0){if(t.isAnimation)return new ni(t.name,4,Pe.NONE,t.expression,null,t.sourceSpan,t.keySpan,t.valueSpan);let r=null,i=void 0,a=null;const o=t.name.split(".");let l=void 0;if(o.length>1)if("attr"==o[0]){a=o.slice(1).join("."),n||this._validatePropertyOrAttributeName(a,t.sourceSpan,!0),l=Pa(this._schemaRegistry,e,a,!0);const s=a.indexOf(":");if(s>-1){const e=a.substring(0,s),t=a.substring(s+1);a=ve(e,t)}i=1}else"class"==o[0]?(a=o[1],i=2,l=[Pe.NONE]):"style"==o[0]&&(r=o.length>2?o[2]:null,a=o[1],i=3,l=[Pe.STYLE]);if(null===a){const r=this._schemaRegistry.getMappedPropName(t.name);a=s?r:t.name,l=Pa(this._schemaRegistry,e,r,!1),i=0,n||this._validatePropertyOrAttributeName(r,t.sourceSpan,!1)}return new ni(a,i,l[0],t.expression,r,t.sourceSpan,t.keySpan,t.valueSpan)}parseEvent(e,t,n,s,r,i){0===e.length&&this._reportError("Event name is missing in binding",n),Aa(e)?(e=e.substr(1),this._parseAnimationEvent(e,t,n,s,i)):this._parseRegularEvent(e,t,n,s,r,i)}calcPossibleSecurityContexts(e,t,n){const s=this._schemaRegistry.getMappedPropName(t);return Pa(this._schemaRegistry,e,s,n)}_parseAnimationEvent(e,t,n,s,r){const i=Zt(e,".",[e,""]),a=i[0],o=i[1].toLowerCase();if(o)switch(o){case"start":case"done":const e=this._parseAction(t,s);r.push(new ei(a,o,1,e,n,s));break;default:this._reportError(`The provided animation output phase value "${o}" for "@${a}" is not supported (use start or done)`,n)}else this._reportError(`The animation trigger output event (@${a}) is missing its phase value name (start or done are currently supported)`,n)}_parseRegularEvent(e,t,n,s,r,i){const[a,o]=Yt(e,[null,e]),l=this._parseAction(t,s);r.push([e,l.source]),i.push(new ei(o,a,0,l,n,s))}_parseAction(e,t){const n=(t&&t.start||"(unknown").toString(),s=t&&t.start?t.start.offset:0;try{const r=this._exprParser.parseAction(e,n,s,this._interpolationConfig);return r&&this._reportExpressionParserErrors(r.errors,t),!r||r.ast instanceof Ir?(this._reportError("Empty expressions are not allowed",t),this._exprParser.wrapLiteralPrimitive("ERROR",n,s)):(this._checkPipes(r,t),r)}catch(e){return this._reportError(""+e,t),this._exprParser.wrapLiteralPrimitive("ERROR",n,s)}}_reportError(e,t,n=hr.ERROR){this.errors.push(new fr(t,e,n))}_reportExpressionParserErrors(e,t){for(const n of e)this._reportError(n.message,t)}_checkPipes(e,t){if(e&&this.pipesByName){const n=new Na;e.visit(n),n.pipes.forEach((e,n)=>{const s=this.pipesByName.get(n);s?this._usedPipes.set(n,s):this._reportError(`The pipe '${n}' could not be found`,new pr(t.start.moveBy(e.span.start),t.start.moveBy(e.span.end)))})}}_validatePropertyOrAttributeName(e,t,n){const s=n?this._schemaRegistry.validateAttribute(e):this._schemaRegistry.validateProperty(e);s.error&&this._reportError(s.msg,t,hr.ERROR)}}class Na extends Zr{constructor(){super(...arguments),this.pipes=new Map}visitPipe(e,t){return this.pipes.set(e.name,e),e.exp.visit(this),this.visitAll(e.args,t),null}}function Aa(e){return"@"==e[0]}function Pa(e,t,n,s){const r=[];return we.parse(t).forEach(t=>{const i=t.element?[t.element]:e.allKnownElementNames(),a=new Set(t.notSelectors.filter(e=>e.isElementSelector()).map(e=>e.element)),o=i.filter(e=>!a.has(e));r.push(...o.map(t=>e.securityContext(t,n,s)))}),0===r.length?[Pe.NONE]:Array.from(new Set(r)).sort()}function ka(e,t){const n=t.start-e.start.offset,s=t.end-e.end.offset;return new pr(e.start.moveBy(n),e.end.moveBy(s),e.fullStart.moveBy(n),e.details)}function Oa(e){let t=null,n=null,s=null,r=!1,i="";e.attrs.forEach(e=>{const a=e.name.toLowerCase();"select"==a?t=e.value:"href"==a?n=e.value:"rel"==a?s=e.value:"ngNonBindable"==e.name?r=!0:"ngProjectAs"==e.name&&e.value.length>0&&(i=e.value)}),t=function(e){return null===e||0===e.length?"*":e}(t);const a=e.name.toLowerCase();let o=Ma.OTHER;return ge(a)?o=Ma.NG_CONTENT:"style"==a?o=Ma.STYLE:"script"==a?o=Ma.SCRIPT:"link"==a&&"stylesheet"==s&&(o=Ma.STYLESHEET),new Ra(o,t,n,r,i)}var Ma,La;!function(e){e[e.NG_CONTENT=0]="NG_CONTENT",e[e.STYLE=1]="STYLE",e[e.STYLESHEET=2]="STYLESHEET",e[e.SCRIPT=3]="SCRIPT",e[e.OTHER=4]="OTHER"}(Ma||(Ma={}));class Ra{constructor(e,t,n,s,r){this.type=e,this.selectAttr=t,this.hrefAttr=n,this.nonBindable=s,this.projectAs=r}}function Da(e){return e instanceof Gr&&(e=e.ast),e instanceof Ir}function Fa(e){const t=e.charCodeAt(0);if(t==e.charCodeAt(e.length-1)&&(39==t||34==t)){const t=e.substring(1,e.length-1);-1==t.indexOf("'")&&-1==t.indexOf('"')&&(e=t)}return e}function Ba(e){return e.replace(/[a-z][A-Z]/g,e=>e.charAt(0)+"-"+e.charAt(1)).toLowerCase()}class $a{constructor(e){this._directiveExpr=e,this._hasInitialValues=!1,this.hasBindings=!1,this.hasBindingsWithPipes=!1,this._classMapInput=null,this._styleMapInput=null,this._singleStyleInputs=null,this._singleClassInputs=null,this._lastStylingInput=null,this._firstStylingInput=null,this._stylesIndex=new Map,this._classesIndex=new Map,this._initialStyleValues=[],this._initialClassValues=[]}registerBoundInput(e){let t=null,n=e.name;switch(e.type){case 0:t=this.registerInputBasedOnName(n,e.value,e.sourceSpan);break;case 3:t=this.registerStyleInput(n,!1,e.value,e.sourceSpan,e.unit);break;case 2:t=this.registerClassInput(n,!1,e.value,e.sourceSpan)}return!!t}registerInputBasedOnName(e,t,n){let s=null;const r=e.substring(0,6),i="style"===e||"style."===r||"style!"===r;if(i||!i&&("class"===e||"class."===r||"class!"===r)){const r="."!==e.charAt(5),a=e.substr(r?5:6);s=i?this.registerStyleInput(a,r,t,n):this.registerClassInput(a,r,t,n)}return s}registerStyleInput(e,t,n,s,r){if(Da(n))return null;e=Ba(e);const{property:i,hasOverrideFlag:a,suffix:o}=ja(e),l={name:i,suffix:r="string"==typeof r&&0!==r.length?r:o,value:n,sourceSpan:s,hasOverrideFlag:a};return t?this._styleMapInput=l:((this._singleStyleInputs=this._singleStyleInputs||[]).push(l),Va(this._stylesIndex,i)),this._lastStylingInput=l,this._firstStylingInput=this._firstStylingInput||l,this._checkForPipes(n),this.hasBindings=!0,l}registerClassInput(e,t,n,s){if(Da(n))return null;const{property:r,hasOverrideFlag:i}=ja(e),a={name:r,value:n,sourceSpan:s,hasOverrideFlag:i,suffix:null};if(t){if(this._classMapInput)throw new Error("[class] and [className] bindings cannot be used on the same element simultaneously");this._classMapInput=a}else(this._singleClassInputs=this._singleClassInputs||[]).push(a),Va(this._classesIndex,r);return this._lastStylingInput=a,this._firstStylingInput=this._firstStylingInput||a,this._checkForPipes(n),this.hasBindings=!0,a}_checkForPipes(e){e instanceof Gr&&e.ast instanceof Dr&&(this.hasBindingsWithPipes=!0)}registerStyleAttr(e){this._initialStyleValues=function(e){const t=[];let n=0,s=0,r=0,i=0,a=0,o=null,l=!1;for(;n<e.length;)switch(e.charCodeAt(n++)){case 40:s++;break;case 41:s--;break;case 39:l=l||i>0,0===r?r=39:39===r&&92!==e.charCodeAt(n-1)&&(r=0);break;case 34:l=l||i>0,0===r?r=34:34===r&&92!==e.charCodeAt(n-1)&&(r=0);break;case 58:o||0!==s||0!==r||(o=Ba(e.substring(a,n-1).trim()),i=n);break;case 59:if(o&&i>0&&0===s&&0===r){const s=e.substring(i,n-1).trim();t.push(o,l?Fa(s):s),a=n,i=0,o=null,l=!1}}if(o&&i){const n=e.substr(i).trim();t.push(o,l?Fa(n):n)}return t}(e),this._hasInitialValues=!0}registerClassAttr(e){this._initialClassValues=e.trim().split(/\s+/g),this._hasInitialValues=!0}populateInitialStylingAttrs(e){if(this._initialClassValues.length){e.push(Kt(1));for(let t=0;t<this._initialClassValues.length;t++)e.push(Kt(this._initialClassValues[t]))}if(this._initialStyleValues.length){e.push(Kt(2));for(let t=0;t<this._initialStyleValues.length;t+=2)e.push(Kt(this._initialStyleValues[t]),Kt(this._initialStyleValues[t+1]))}}assignHostAttrs(e,t){this._directiveExpr&&(e.length||this._hasInitialValues)&&(this.populateInitialStylingAttrs(e),t.set("hostAttrs",qt(e)))}buildClassMapInstruction(e){return this._classMapInput?this._buildMapBasedInstruction(e,!0,this._classMapInput):null}buildStyleMapInstruction(e){return this._styleMapInput?this._buildMapBasedInstruction(e,!1,this._styleMapInput):null}_buildMapBasedInstruction(e,t,n){let s=2;const r=n.value.visit(e);let i;return r instanceof Vr?(s+=r.expressions.length,i=t?function(e){switch(Ls(e)){case 1:return En.classMap;case 3:return En.classMapInterpolate1;case 5:return En.classMapInterpolate2;case 7:return En.classMapInterpolate3;case 9:return En.classMapInterpolate4;case 11:return En.classMapInterpolate5;case 13:return En.classMapInterpolate6;case 15:return En.classMapInterpolate7;case 17:return En.classMapInterpolate8;default:return En.classMapInterpolateV}}(r):function(e){switch(Ls(e)){case 1:return En.styleMap;case 3:return En.styleMapInterpolate1;case 5:return En.styleMapInterpolate2;case 7:return En.styleMapInterpolate3;case 9:return En.styleMapInterpolate4;case 11:return En.styleMapInterpolate5;case 13:return En.styleMapInterpolate6;case 15:return En.styleMapInterpolate7;case 17:return En.styleMapInterpolate8;default:return En.styleMapInterpolateV}}(r)):i=t?En.classMap:En.styleMap,{reference:i,calls:[{supportsInterpolation:!0,sourceSpan:n.sourceSpan,allocateBindingSlots:s,params:e=>{const t=e(r);return Array.isArray(t)?t:[t]}}]}}_buildSingleInputs(e,t,n,s,r){const i=[];return t.forEach(t=>{const a=i[i.length-1],o=t.value.visit(n);let l=e,c=2;o instanceof Vr&&(c+=o.expressions.length,s&&(l=s(o)));const u={sourceSpan:t.sourceSpan,allocateBindingSlots:c,supportsInterpolation:!!s,params:e=>{const n=[];n.push(Kt(t.name));const s=e(o);return Array.isArray(s)?n.push(...s):n.push(s),r||null===t.suffix||n.push(Kt(t.suffix)),n}};a&&a.reference===l?a.calls.push(u):i.push({reference:l,calls:[u]})}),i}_buildClassInputs(e){return this._singleClassInputs?this._buildSingleInputs(En.classProp,this._singleClassInputs,e,null,!0):[]}_buildStyleInputs(e){return this._singleStyleInputs?this._buildSingleInputs(En.styleProp,this._singleStyleInputs,e,Ua,!1):[]}buildUpdateLevelInstructions(e){const t=[];if(this.hasBindings){const n=this.buildStyleMapInstruction(e);n&&t.push(n);const s=this.buildClassMapInstruction(e);s&&t.push(s),t.push(...this._buildStyleInputs(e)),t.push(...this._buildClassInputs(e))}return t}}function Va(e,t){e.has(t)||e.set(t,e.size)}function ja(e){let t=!1;const n=e.indexOf("!important");-1!==n&&(e=n>0?e.substring(0,n):"",t=!0);let s=null,r=e;const i=e.lastIndexOf(".");return i>0&&(s=e.substr(i+1),r=e.substring(0,i)),{property:r,suffix:s,hasOverrideFlag:t}}function Ua(e){switch(Ls(e)){case 1:return En.styleProp;case 3:return En.stylePropInterpolate1;case 5:return En.stylePropInterpolate2;case 7:return En.stylePropInterpolate3;case 9:return En.stylePropInterpolate4;case 11:return En.stylePropInterpolate5;case 13:return En.stylePropInterpolate6;case 15:return En.stylePropInterpolate7;case 17:return En.stylePropInterpolate8;default:return En.stylePropInterpolateV}}!function(e){e[e.Character=0]="Character",e[e.Identifier=1]="Identifier",e[e.Keyword=2]="Keyword",e[e.String=3]="String",e[e.Operator=4]="Operator",e[e.Number=5]="Number",e[e.Error=6]="Error"}(La||(La={}));const qa=["var","let","as","null","undefined","true","false","if","else","this"];class Ha{tokenize(e){const t=new Ga(e),n=[];let s=t.scanToken();for(;null!=s;)n.push(s),s=t.scanToken();return n}}class Wa{constructor(e,t,n,s,r){this.index=e,this.end=t,this.type=n,this.numValue=s,this.strValue=r}isCharacter(e){return this.type==La.Character&&this.numValue==e}isNumber(){return this.type==La.Number}isString(){return this.type==La.String}isOperator(e){return this.type==La.Operator&&this.strValue==e}isIdentifier(){return this.type==La.Identifier}isKeyword(){return this.type==La.Keyword}isKeywordLet(){return this.type==La.Keyword&&"let"==this.strValue}isKeywordAs(){return this.type==La.Keyword&&"as"==this.strValue}isKeywordNull(){return this.type==La.Keyword&&"null"==this.strValue}isKeywordUndefined(){return this.type==La.Keyword&&"undefined"==this.strValue}isKeywordTrue(){return this.type==La.Keyword&&"true"==this.strValue}isKeywordFalse(){return this.type==La.Keyword&&"false"==this.strValue}isKeywordThis(){return this.type==La.Keyword&&"this"==this.strValue}isError(){return this.type==La.Error}toNumber(){return this.type==La.Number?this.numValue:-1}toString(){switch(this.type){case La.Character:case La.Identifier:case La.Keyword:case La.Operator:case La.String:case La.Error:return this.strValue;case La.Number:return this.numValue.toString();default:return null}}}function za(e,t,n){return new Wa(e,t,La.Character,n,String.fromCharCode(n))}function Ka(e,t,n){return new Wa(e,t,La.Operator,0,n)}const Xa=new Wa(-1,-1,La.Character,0,"");class Ga{constructor(e){this.input=e,this.peek=0,this.index=-1,this.length=e.length,this.advance()}advance(){this.peek=++this.index>=this.length?0:this.input.charCodeAt(this.index)}scanToken(){const e=this.input,t=this.length;let n=this.peek,s=this.index;for(;n<=32;){if(++s>=t){n=0;break}n=e.charCodeAt(s)}if(this.peek=n,this.index=s,s>=t)return null;if(Qa(n))return this.scanIdentifier();if(ir(n))return this.scanNumber(s);const r=s;switch(n){case 46:return this.advance(),ir(this.peek)?this.scanNumber(r):za(r,this.index,46);case 40:case 41:case 123:case 125:case 91:case 93:case 44:case 58:case 59:return this.scanCharacter(r,n);case 39:case 34:return this.scanString();case 35:case 43:case 45:case 42:case 47:case 37:case 94:return this.scanOperator(r,String.fromCharCode(n));case 63:return this.scanComplexOperator(r,"?",46,".");case 60:case 62:return this.scanComplexOperator(r,String.fromCharCode(n),61,"=");case 33:case 61:return this.scanComplexOperator(r,String.fromCharCode(n),61,"=",61,"=");case 38:return this.scanComplexOperator(r,"&",38,"&");case 124:return this.scanComplexOperator(r,"|",124,"|");case 160:for(;rr(this.peek);)this.advance();return this.scanToken()}return this.advance(),this.error(`Unexpected character [${String.fromCharCode(n)}]`,0)}scanCharacter(e,t){return this.advance(),za(e,this.index,t)}scanOperator(e,t){return this.advance(),Ka(e,this.index,t)}scanComplexOperator(e,t,n,s,r,i){this.advance();let a=t;return this.peek==n&&(this.advance(),a+=s),null!=r&&this.peek==r&&(this.advance(),a+=i),Ka(e,this.index,a)}scanIdentifier(){const e=this.index;for(this.advance();Ya(this.peek);)this.advance();const t=this.input.substring(e,this.index);return qa.indexOf(t)>-1?new Wa(e,this.index,La.Keyword,0,t):function(e,t,n){return new Wa(e,t,La.Identifier,0,n)}(e,this.index,t)}scanNumber(e){let t=this.index===e;for(this.advance();;){if(ir(this.peek));else if(46==this.peek)t=!1;else{if(101!=(n=this.peek)&&69!=n)break;if(this.advance(),Za(this.peek)&&this.advance(),!ir(this.peek))return this.error("Invalid exponent",-1);t=!1}this.advance()}var n;const s=this.input.substring(e,this.index),r=t?function(e){const t=parseInt(e);if(isNaN(t))throw new Error("Invalid integer literal when parsing "+e);return t}(s):parseFloat(s);return new Wa(e,this.index,La.Number,r,"")}scanString(){const e=this.index,t=this.peek;this.advance();let n="",s=this.index;const r=this.input;for(;this.peek!=t;)if(92==this.peek){let e;if(n+=r.substring(s,this.index),this.advance(),this.peek=this.peek,117==this.peek){const t=r.substring(this.index+1,this.index+5);if(!/^[0-9a-f]+$/i.test(t))return this.error(`Invalid unicode escape [\\u${t}]`,0);e=parseInt(t,16);for(let e=0;e<5;e++)this.advance()}else e=Ja(this.peek),this.advance();n+=String.fromCharCode(e),s=this.index}else{if(0==this.peek)return this.error("Unterminated quote",0);this.advance()}const i=r.substring(s,this.index);return this.advance(),new Wa(e,this.index,La.String,0,n+i)}error(e,t){const n=this.index+t;return function(e,t,n){return new Wa(e,t,La.Error,0,n)}(n,this.index,`Lexer Error: ${e} at column ${n} in expression [${this.input}]`)}}function Qa(e){return 97<=e&&e<=122||65<=e&&e<=90||95==e||36==e}function Ya(e){return ar(e)||ir(e)||95==e||36==e}function Za(e){return 45==e||43==e}function Ja(e){switch(e){case 110:return 10;case 102:return 12;case 114:return 13;case 116:return 9;case 118:return 11;default:return e}}class eo{constructor(e,t,n,s,r){this.strings=e,this.stringSpans=t,this.expressions=n,this.expressionsSpans=s,this.offsets=r}}class to{constructor(e,t,n){this.templateBindings=e,this.warnings=t,this.errors=n}}const no=so(Hs);function so(e){const t=en(e.start)+"([\\s\\S]*?)"+en(e.end);return new RegExp(t,"g")}class ro{constructor(e){this._lexer=e,this.errors=[],this.simpleExpressionChecker=lo}parseAction(e,t,n,s=Hs){this._checkNoInterpolation(e,t,s);const r=this._stripComments(e),i=this._lexer.tokenize(this._stripComments(e)),a=new oo(e,t,n,i,r.length,!0,this.errors,e.length-r.length).parseChain();return new Gr(a,e,t,n,this.errors)}parseBinding(e,t,n,s=Hs){const r=this._parseBindingAst(e,t,n,s);return new Gr(r,e,t,n,this.errors)}checkSimpleExpression(e){const t=new this.simpleExpressionChecker;return e.visit(t),t.errors}parseSimpleBinding(e,t,n,s=Hs){const r=this._parseBindingAst(e,t,n,s),i=this.checkSimpleExpression(r);return i.length>0&&this._reportError("Host binding expression cannot contain "+i.join(" "),e,t),new Gr(r,e,t,n,this.errors)}_reportError(e,t,n,s){this.errors.push(new Er(e,t,n,s))}_parseBindingAst(e,t,n,s){const r=this._parseQuote(e,t,n);if(null!=r)return r;this._checkNoInterpolation(e,t,s);const i=this._stripComments(e),a=this._lexer.tokenize(i);return new oo(e,t,n,a,i.length,!1,this.errors,e.length-i.length).parseChain()}_parseQuote(e,t,n){if(null==e)return null;const s=e.indexOf(":");if(-1==s)return null;const r=e.substring(0,s).trim();if(!function(e){if(0==e.length)return!1;const t=new Ga(e);if(!Qa(t.peek))return!1;for(t.advance();0!==t.peek;){if(!Ya(t.peek))return!1;t.advance()}return!0}(r))return null;const i=e.substring(s+1),a=new _r(0,e.length);return new br(a,a.toAbsolute(n),r,i,t)}parseTemplateBindings(e,t,n,s,r){const i=this._lexer.tokenize(t);return new oo(t,n,r,i,t.length,!1,this.errors,0).parseTemplateBindings({source:e,span:new Xr(s,s+e.length)})}parseInterpolation(e,t,n,s=Hs){const r=this.splitInterpolation(e,t,s);if(null==r)return null;const i=[];for(let s=0;s<r.expressions.length;++s){const a=r.expressions[s],o=this._stripComments(a),l=this._lexer.tokenize(o),c=new oo(e,t,n,l,o.length,!1,this.errors,r.offsets[s]+(a.length-o.length)).parseChain();i.push(c)}return this.createInterpolationAst(r.strings,i,e,t,n)}parseInterpolationExpression(e,t,n){const s=this._stripComments(e),r=this._lexer.tokenize(s),i=new oo(e,t,n,r,s.length,!1,this.errors,0).parseChain();return this.createInterpolationAst(["",""],[i],e,t,n)}createInterpolationAst(e,t,n,s,r){const i=new _r(0,n.length),a=new Vr(i,i.toAbsolute(r),e,t);return new Gr(a,n,s,r,this.errors)}splitInterpolation(e,t,n=Hs){const s=[],r=[],i=[],a=[],o=[];let l=0,c=!1,u=!1,{start:p,end:h}=n;for(;l<e.length;)if(c){const n=l,s=n+p.length,a=e.indexOf(h,s);if(-1===a){c=!1,u=!0;break}const d=a+h.length,m=e.substring(s,a);m.trim().length>0?r.push(m):(this._reportError("Blank expressions are not allowed in interpolated strings",e,`at column ${l} in`,t),r.push("$implicit")),i.push(s),o.push({start:n,end:d}),l=d,c=!1}else{const t=l;l=e.indexOf(p,l),-1===l&&(l=e.length);const n=e.substring(t,l);s.push(n),a.push({start:t,end:l}),c=!0}return c||(u?(s[s.length-1]+=e.substring(l),a[a.length-1].end=e.length):(s.push(e.substring(l)),a.push({start:l,end:e.length}))),0===r.length?null:new eo(s,a,r,o,i)}wrapLiteralPrimitive(e,t,n){const s=new _r(0,null==e?0:e.length);return new Gr(new Fr(s,s.toAbsolute(n),e),e,t,n,this.errors)}_stripComments(e){const t=this._commentStart(e);return null!=t?e.substring(0,t).trim():e}_commentStart(e){let t=null;for(let s=0;s<e.length-1;s++){const r=e.charCodeAt(s),i=e.charCodeAt(s+1);if(47===r&&47==i&&null==t)return s;t===r?t=null:null==t&&(39===(n=r)||34===n||96===n)&&(t=r)}var n;return null}_checkNoInterpolation(e,t,n){const s=(r=n)===Hs?no:so(r);var r;const i=e.split(s);i.length>1&&this._reportError(`Got interpolation (${n.start}${n.end}) where expression was expected`,e,`at column ${this._findInterpolationErrorColumn(i,1,n)} in`,t)}_findInterpolationErrorColumn(e,t,n){let s="";for(let r=0;r<t;r++)s+=r%2==0?e[r]:`${n.start}${e[r]}${n.end}`;return s.length}}class io extends ro{constructor(){super(...arguments),this.simpleExpressionChecker=co}}var ao;!function(e){e[e.None=0]="None",e[e.Writable=1]="Writable"}(ao||(ao={}));class oo{constructor(e,t,n,s,r,i,a,o){this.input=e,this.location=t,this.absoluteOffset=n,this.tokens=s,this.inputLength=r,this.parseAction=i,this.errors=a,this.offset=o,this.rparensExpected=0,this.rbracketsExpected=0,this.rbracesExpected=0,this.context=ao.None,this.sourceSpanCache=new Map,this.index=0}peek(e){const t=this.index+e;return t<this.tokens.length?this.tokens[t]:Xa}get next(){return this.peek(0)}get atEOF(){return this.index>=this.tokens.length}get inputIndex(){return this.atEOF?this.currentEndIndex:this.next.index+this.offset}get currentEndIndex(){return this.index>0?this.peek(-1).end+this.offset:0===this.tokens.length?this.inputLength+this.offset:this.next.index+this.offset}get currentAbsoluteOffset(){return this.absoluteOffset+this.inputIndex}span(e){return new _r(e,this.currentEndIndex)}sourceSpan(e){const t=`${e}@${this.inputIndex}`;return this.sourceSpanCache.has(t)||this.sourceSpanCache.set(t,this.span(e).toAbsolute(this.absoluteOffset)),this.sourceSpanCache.get(t)}advance(){this.index++}withContext(e,t){this.context|=e;const n=t();return this.context^=e,n}consumeOptionalCharacter(e){return!!this.next.isCharacter(e)&&(this.advance(),!0)}peekKeywordLet(){return this.next.isKeywordLet()}peekKeywordAs(){return this.next.isKeywordAs()}expectCharacter(e){this.consumeOptionalCharacter(e)||this.error("Missing expected "+String.fromCharCode(e))}consumeOptionalOperator(e){return!!this.next.isOperator(e)&&(this.advance(),!0)}expectOperator(e){this.consumeOptionalOperator(e)||this.error("Missing expected operator "+e)}prettyPrintToken(e){return e===Xa?"end of input":"token "+e}expectIdentifierOrKeyword(){const e=this.next;return e.isIdentifier()||e.isKeyword()?(this.advance(),e.toString()):(this.error(`Unexpected ${this.prettyPrintToken(e)}, expected identifier or keyword`),"")}expectIdentifierOrKeywordOrString(){const e=this.next;return e.isIdentifier()||e.isKeyword()||e.isString()?(this.advance(),e.toString()):(this.error(`Unexpected ${this.prettyPrintToken(e)}, expected identifier, keyword, or string`),"")}parseChain(){const e=[],t=this.inputIndex;for(;this.index<this.tokens.length;){const t=this.parsePipe();if(e.push(t),this.consumeOptionalCharacter(59))for(this.parseAction||this.error("Binding expression cannot contain chained expression");this.consumeOptionalCharacter(59););else this.index<this.tokens.length&&this.error(`Unexpected token '${this.next}'`)}return 0==e.length?new Ir(this.span(t),this.sourceSpan(t)):1==e.length?e[0]:new Ar(this.span(t),this.sourceSpan(t),e)}parsePipe(){let e=this.parseExpression();if(this.consumeOptionalOperator("|")){this.parseAction&&this.error("Cannot have a pipe in an action expression");do{const t=this.inputIndex,n=this.expectIdentifierOrKeyword(),s=this.sourceSpan(t),r=[];for(;this.consumeOptionalCharacter(58);)r.push(this.parseExpression());const{start:i}=e.span;e=new Dr(this.span(i),this.sourceSpan(i),e,n,r,s)}while(this.consumeOptionalOperator("|"))}return e}parseExpression(){return this.parseConditional()}parseConditional(){const e=this.inputIndex,t=this.parseLogicalOr();if(this.consumeOptionalOperator("?")){const n=this.parsePipe();let s;if(this.consumeOptionalCharacter(58))s=this.parsePipe();else{const t=this.input.substring(e,this.inputIndex);this.error(`Conditional expression ${t} requires all 3 expressions`),s=new Ir(this.span(e),this.sourceSpan(e))}return new Pr(this.span(e),this.sourceSpan(e),t,n,s)}return t}parseLogicalOr(){let e=this.parseLogicalAnd();for(;this.consumeOptionalOperator("||");){const t=this.parseLogicalAnd(),{start:n}=e.span;e=new jr(this.span(n),this.sourceSpan(n),"||",e,t)}return e}parseLogicalAnd(){let e=this.parseEquality();for(;this.consumeOptionalOperator("&&");){const t=this.parseEquality(),{start:n}=e.span;e=new jr(this.span(n),this.sourceSpan(n),"&&",e,t)}return e}parseEquality(){let e=this.parseRelational();for(;this.next.type==La.Operator;){const t=this.next.strValue;switch(t){case"==":case"===":case"!=":case"!==":this.advance();const n=this.parseRelational(),{start:s}=e.span;e=new jr(this.span(s),this.sourceSpan(s),t,e,n);continue}break}return e}parseRelational(){let e=this.parseAdditive();for(;this.next.type==La.Operator;){const t=this.next.strValue;switch(t){case"<":case">":case"<=":case">=":this.advance();const n=this.parseAdditive(),{start:s}=e.span;e=new jr(this.span(s),this.sourceSpan(s),t,e,n);continue}break}return e}parseAdditive(){let e=this.parseMultiplicative();for(;this.next.type==La.Operator;){const t=this.next.strValue;switch(t){case"+":case"-":this.advance();let n=this.parseMultiplicative();const{start:s}=e.span;e=new jr(this.span(s),this.sourceSpan(s),t,e,n);continue}break}return e}parseMultiplicative(){let e=this.parsePrefix();for(;this.next.type==La.Operator;){const t=this.next.strValue;switch(t){case"*":case"%":case"/":this.advance();let n=this.parsePrefix();const{start:s}=e.span;e=new jr(this.span(s),this.sourceSpan(s),t,e,n);continue}break}return e}parsePrefix(){if(this.next.type==La.Operator){const e=this.inputIndex;let t;switch(this.next.strValue){case"+":return this.advance(),t=this.parsePrefix(),Ur.createPlus(this.span(e),this.sourceSpan(e),t);case"-":return this.advance(),t=this.parsePrefix(),Ur.createMinus(this.span(e),this.sourceSpan(e),t);case"!":return this.advance(),t=this.parsePrefix(),new qr(this.span(e),this.sourceSpan(e),t)}}return this.parseCallChain()}parseCallChain(){let e=this.parsePrimary();const t=e.span.start;for(;;)if(this.consumeOptionalCharacter(46))e=this.parseAccessMemberOrMethodCall(e,!1);else if(this.consumeOptionalOperator("?."))e=this.parseAccessMemberOrMethodCall(e,!0);else if(this.consumeOptionalCharacter(91))this.withContext(ao.Writable,()=>{this.rbracketsExpected++;const n=this.parsePipe();if(n instanceof Ir&&this.error("Key access cannot be empty"),this.rbracketsExpected--,this.expectCharacter(93),this.consumeOptionalOperator("=")){const s=this.parseConditional();e=new Rr(this.span(t),this.sourceSpan(t),e,n,s)}else e=new Lr(this.span(t),this.sourceSpan(t),e,n)});else if(this.consumeOptionalCharacter(40)){this.rparensExpected++;const n=this.parseCallArguments();this.rparensExpected--,this.expectCharacter(41),e=new Kr(this.span(t),this.sourceSpan(t),e,n)}else{if(!this.consumeOptionalOperator("!"))return e;e=new Hr(this.span(t),this.sourceSpan(t),e)}}parsePrimary(){const e=this.inputIndex;if(this.consumeOptionalCharacter(40)){this.rparensExpected++;const e=this.parsePipe();return this.rparensExpected--,this.expectCharacter(41),e}if(this.next.isKeywordNull())return this.advance(),new Fr(this.span(e),this.sourceSpan(e),null);if(this.next.isKeywordUndefined())return this.advance(),new Fr(this.span(e),this.sourceSpan(e),void 0);if(this.next.isKeywordTrue())return this.advance(),new Fr(this.span(e),this.sourceSpan(e),!0);if(this.next.isKeywordFalse())return this.advance(),new Fr(this.span(e),this.sourceSpan(e),!1);if(this.next.isKeywordThis())return this.advance(),new Nr(this.span(e),this.sourceSpan(e));if(this.consumeOptionalCharacter(91)){this.rbracketsExpected++;const t=this.parseExpressionList(93);return this.rbracketsExpected--,this.expectCharacter(93),new Br(this.span(e),this.sourceSpan(e),t)}if(this.next.isCharacter(123))return this.parseLiteralMap();if(this.next.isIdentifier())return this.parseAccessMemberOrMethodCall(new Tr(this.span(e),this.sourceSpan(e)),!1);if(this.next.isNumber()){const t=this.next.toNumber();return this.advance(),new Fr(this.span(e),this.sourceSpan(e),t)}if(this.next.isString()){const t=this.next.toString();return this.advance(),new Fr(this.span(e),this.sourceSpan(e),t)}return this.index>=this.tokens.length?(this.error("Unexpected end of expression: "+this.input),new Ir(this.span(e),this.sourceSpan(e))):(this.error("Unexpected token "+this.next),new Ir(this.span(e),this.sourceSpan(e)))}parseExpressionList(e){const t=[];if(!this.next.isCharacter(e))do{t.push(this.parsePipe())}while(this.consumeOptionalCharacter(44));return t}parseLiteralMap(){const e=[],t=[],n=this.inputIndex;if(this.expectCharacter(123),!this.consumeOptionalCharacter(125)){this.rbracesExpected++;do{const n=this.next.isString(),s=this.expectIdentifierOrKeywordOrString();e.push({key:s,quoted:n}),this.expectCharacter(58),t.push(this.parsePipe())}while(this.consumeOptionalCharacter(44));this.rbracesExpected--,this.expectCharacter(125)}return new $r(this.span(n),this.sourceSpan(n),e,t)}parseAccessMemberOrMethodCall(e,t=!1){const n=e.span.start,s=this.inputIndex,r=this.expectIdentifierOrKeyword(),i=this.sourceSpan(s);if(this.consumeOptionalCharacter(40)){this.rparensExpected++;const s=this.parseCallArguments();this.expectCharacter(41),this.rparensExpected--;const a=this.span(n),o=this.sourceSpan(n);return t?new zr(a,o,i,e,r,s):new Wr(a,o,i,e,r,s)}if(t)return this.consumeOptionalOperator("=")?(this.error("The '?.' operator cannot be used in the assignment"),new Ir(this.span(n),this.sourceSpan(n))):new Mr(this.span(n),this.sourceSpan(n),i,e,r);if(this.consumeOptionalOperator("=")){if(!this.parseAction)return this.error("Bindings cannot contain assignments"),new Ir(this.span(n),this.sourceSpan(n));const t=this.parseConditional();return new Or(this.span(n),this.sourceSpan(n),i,e,r,t)}return new kr(this.span(n),this.sourceSpan(n),i,e,r)}parseCallArguments(){if(this.next.isCharacter(41))return[];const e=[];do{e.push(this.parsePipe())}while(this.consumeOptionalCharacter(44));return e}expectTemplateBindingKey(){let e="",t=!1;const n=this.currentAbsoluteOffset;do{e+=this.expectIdentifierOrKeywordOrString(),t=this.consumeOptionalOperator("-"),t&&(e+="-")}while(t);return{source:e,span:new Xr(n,n+e.length)}}parseTemplateBindings(e){const t=[];for(t.push(...this.parseDirectiveKeywordBindings(e));this.index<this.tokens.length;){const n=this.parseLetBinding();if(n)t.push(n);else{const n=this.expectTemplateBindingKey(),s=this.parseAsBinding(n);s?t.push(s):(n.source=e.source+n.source[0].toUpperCase()+n.source.substring(1),t.push(...this.parseDirectiveKeywordBindings(n)))}this.consumeStatementTerminator()}return new to(t,[],this.errors)}parseDirectiveKeywordBindings(e){const t=[];this.consumeOptionalCharacter(58);const n=this.getDirectiveBoundTarget();let s=this.currentAbsoluteOffset;const r=this.parseAsBinding(e);r||(this.consumeStatementTerminator(),s=this.currentAbsoluteOffset);const i=new Xr(e.span.start,s);return t.push(new Yr(i,e,n)),r&&t.push(r),t}getDirectiveBoundTarget(){if(this.next===Xa||this.peekKeywordAs()||this.peekKeywordLet())return null;const e=this.parsePipe(),{start:t,end:n}=e.span,s=this.input.substring(t,n);return new Gr(e,s,this.location,this.absoluteOffset+t,this.errors)}parseAsBinding(e){if(!this.peekKeywordAs())return null;this.advance();const t=this.expectTemplateBindingKey();this.consumeStatementTerminator();const n=new Xr(e.span.start,this.currentAbsoluteOffset);return new Qr(n,t,e)}parseLetBinding(){if(!this.peekKeywordLet())return null;const e=this.currentAbsoluteOffset;this.advance();const t=this.expectTemplateBindingKey();let n=null;this.consumeOptionalOperator("=")&&(n=this.expectTemplateBindingKey()),this.consumeStatementTerminator();const s=new Xr(e,this.currentAbsoluteOffset);return new Qr(s,t,n)}consumeStatementTerminator(){this.consumeOptionalCharacter(59)||this.consumeOptionalCharacter(44)}error(e,t=null){this.errors.push(new Er(e,this.input,this.locationText(t),this.location)),this.skip()}locationText(e=null){return null==e&&(e=this.index),e<this.tokens.length?`at column ${this.tokens[e].index+1} in`:"at the end of the expression"}skip(){let e=this.next;for(;this.index<this.tokens.length&&!e.isCharacter(59)&&(this.rparensExpected<=0||!e.isCharacter(41))&&(this.rbracesExpected<=0||!e.isCharacter(125))&&(this.rbracketsExpected<=0||!e.isCharacter(93))&&!(this.context&ao.Writable&&e.isOperator("="));)this.next.isError()&&this.errors.push(new Er(this.next.toString(),this.input,this.locationText(),this.location)),this.advance(),e=this.next}}class lo{constructor(){this.errors=[]}visitImplicitReceiver(e,t){}visitThisReceiver(e,t){}visitInterpolation(e,t){}visitLiteralPrimitive(e,t){}visitPropertyRead(e,t){}visitPropertyWrite(e,t){}visitSafePropertyRead(e,t){}visitMethodCall(e,t){}visitSafeMethodCall(e,t){}visitFunctionCall(e,t){}visitLiteralArray(e,t){this.visitAll(e.expressions,t)}visitLiteralMap(e,t){this.visitAll(e.values,t)}visitUnary(e,t){}visitBinary(e,t){}visitPrefixNot(e,t){}visitNonNullAssert(e,t){}visitConditional(e,t){}visitPipe(e,t){this.errors.push("pipes")}visitKeyedRead(e,t){}visitKeyedWrite(e,t){}visitAll(e,t){return e.map(e=>e.visit(this,t))}visitChain(e,t){}visitQuote(e,t){}}class co extends Zr{constructor(){super(...arguments),this.errors=[]}visitPipe(){this.errors.push("pipes")}}let uo;function po(){return uo||(uo={},ho(Pe.HTML,["iframe|srcdoc","*|innerHTML","*|outerHTML"]),ho(Pe.STYLE,["*|style"]),ho(Pe.URL,["*|formAction","area|href","area|ping","audio|src","a|href","a|ping","blockquote|cite","body|background","del|cite","form|action","img|src","img|srcset","input|src","ins|cite","q|cite","source|src","source|srcset","track|src","video|poster","video|src"]),ho(Pe.RESOURCE_URL,["applet|code","applet|codebase","base|href","embed|src","frame|src","head|profile","html|manifest","iframe|src","link|href","media|src","object|codebase","object|data","script|src"])),uo}function ho(e,t){for(const n of t)uo[n.toLowerCase()]=e}const mo=["[Element]|textContent,%classList,className,id,innerHTML,*beforecopy,*beforecut,*beforepaste,*copy,*cut,*paste,*search,*selectstart,*webkitfullscreenchange,*webkitfullscreenerror,*wheel,outerHTML,#scrollLeft,#scrollTop,slot,*message,*mozfullscreenchange,*mozfullscreenerror,*mozpointerlockchange,*mozpointerlockerror,*webglcontextcreationerror,*webglcontextlost,*webglcontextrestored","[HTMLElement]^[Element]|accessKey,contentEditable,dir,!draggable,!hidden,innerText,lang,*abort,*auxclick,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contextmenu,*cuechange,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*gotpointercapture,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*lostpointercapture,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*pause,*play,*playing,*pointercancel,*pointerdown,*pointerenter,*pointerleave,*pointermove,*pointerout,*pointerover,*pointerup,*progress,*ratechange,*reset,*resize,*scroll,*seeked,*seeking,*select,*show,*stalled,*submit,*suspend,*timeupdate,*toggle,*volumechange,*waiting,outerText,!spellcheck,%style,#tabIndex,title,!translate","abbr,address,article,aside,b,bdi,bdo,cite,code,dd,dfn,dt,em,figcaption,figure,footer,header,i,kbd,main,mark,nav,noscript,rb,rp,rt,rtc,ruby,s,samp,section,small,strong,sub,sup,u,var,wbr^[HTMLElement]|accessKey,contentEditable,dir,!draggable,!hidden,innerText,lang,*abort,*auxclick,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contextmenu,*cuechange,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*gotpointercapture,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*lostpointercapture,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*pause,*play,*playing,*pointercancel,*pointerdown,*pointerenter,*pointerleave,*pointermove,*pointerout,*pointerover,*pointerup,*progress,*ratechange,*reset,*resize,*scroll,*seeked,*seeking,*select,*show,*stalled,*submit,*suspend,*timeupdate,*toggle,*volumechange,*waiting,outerText,!spellcheck,%style,#tabIndex,title,!translate","media^[HTMLElement]|!autoplay,!controls,%controlsList,%crossOrigin,#currentTime,!defaultMuted,#defaultPlaybackRate,!disableRemotePlayback,!loop,!muted,*encrypted,*waitingforkey,#playbackRate,preload,src,%srcObject,#volume",":svg:^[HTMLElement]|*abort,*auxclick,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contextmenu,*cuechange,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*gotpointercapture,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*lostpointercapture,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*pause,*play,*playing,*pointercancel,*pointerdown,*pointerenter,*pointerleave,*pointermove,*pointerout,*pointerover,*pointerup,*progress,*ratechange,*reset,*resize,*scroll,*seeked,*seeking,*select,*show,*stalled,*submit,*suspend,*timeupdate,*toggle,*volumechange,*waiting,%style,#tabIndex",":svg:graphics^:svg:|",":svg:animation^:svg:|*begin,*end,*repeat",":svg:geometry^:svg:|",":svg:componentTransferFunction^:svg:|",":svg:gradient^:svg:|",":svg:textContent^:svg:graphics|",":svg:textPositioning^:svg:textContent|","a^[HTMLElement]|charset,coords,download,hash,host,hostname,href,hreflang,name,password,pathname,ping,port,protocol,referrerPolicy,rel,rev,search,shape,target,text,type,username","area^[HTMLElement]|alt,coords,download,hash,host,hostname,href,!noHref,password,pathname,ping,port,protocol,referrerPolicy,rel,search,shape,target,username","audio^media|","br^[HTMLElement]|clear","base^[HTMLElement]|href,target","body^[HTMLElement]|aLink,background,bgColor,link,*beforeunload,*blur,*error,*focus,*hashchange,*languagechange,*load,*message,*offline,*online,*pagehide,*pageshow,*popstate,*rejectionhandled,*resize,*scroll,*storage,*unhandledrejection,*unload,text,vLink","button^[HTMLElement]|!autofocus,!disabled,formAction,formEnctype,formMethod,!formNoValidate,formTarget,name,type,value","canvas^[HTMLElement]|#height,#width","content^[HTMLElement]|select","dl^[HTMLElement]|!compact","datalist^[HTMLElement]|","details^[HTMLElement]|!open","dialog^[HTMLElement]|!open,returnValue","dir^[HTMLElement]|!compact","div^[HTMLElement]|align","embed^[HTMLElement]|align,height,name,src,type,width","fieldset^[HTMLElement]|!disabled,name","font^[HTMLElement]|color,face,size","form^[HTMLElement]|acceptCharset,action,autocomplete,encoding,enctype,method,name,!noValidate,target","frame^[HTMLElement]|frameBorder,longDesc,marginHeight,marginWidth,name,!noResize,scrolling,src","frameset^[HTMLElement]|cols,*beforeunload,*blur,*error,*focus,*hashchange,*languagechange,*load,*message,*offline,*online,*pagehide,*pageshow,*popstate,*rejectionhandled,*resize,*scroll,*storage,*unhandledrejection,*unload,rows","hr^[HTMLElement]|align,color,!noShade,size,width","head^[HTMLElement]|","h1,h2,h3,h4,h5,h6^[HTMLElement]|align","html^[HTMLElement]|version","iframe^[HTMLElement]|align,!allowFullscreen,frameBorder,height,longDesc,marginHeight,marginWidth,name,referrerPolicy,%sandbox,scrolling,src,srcdoc,width","img^[HTMLElement]|align,alt,border,%crossOrigin,#height,#hspace,!isMap,longDesc,lowsrc,name,referrerPolicy,sizes,src,srcset,useMap,#vspace,#width","input^[HTMLElement]|accept,align,alt,autocapitalize,autocomplete,!autofocus,!checked,!defaultChecked,defaultValue,dirName,!disabled,%files,formAction,formEnctype,formMethod,!formNoValidate,formTarget,#height,!incremental,!indeterminate,max,#maxLength,min,#minLength,!multiple,name,pattern,placeholder,!readOnly,!required,selectionDirection,#selectionEnd,#selectionStart,#size,src,step,type,useMap,value,%valueAsDate,#valueAsNumber,#width","li^[HTMLElement]|type,#value","label^[HTMLElement]|htmlFor","legend^[HTMLElement]|align","link^[HTMLElement]|as,charset,%crossOrigin,!disabled,href,hreflang,integrity,media,referrerPolicy,rel,%relList,rev,%sizes,target,type","map^[HTMLElement]|name","marquee^[HTMLElement]|behavior,bgColor,direction,height,#hspace,#loop,#scrollAmount,#scrollDelay,!trueSpeed,#vspace,width","menu^[HTMLElement]|!compact","meta^[HTMLElement]|content,httpEquiv,name,scheme","meter^[HTMLElement]|#high,#low,#max,#min,#optimum,#value","ins,del^[HTMLElement]|cite,dateTime","ol^[HTMLElement]|!compact,!reversed,#start,type","object^[HTMLElement]|align,archive,border,code,codeBase,codeType,data,!declare,height,#hspace,name,standby,type,useMap,#vspace,width","optgroup^[HTMLElement]|!disabled,label","option^[HTMLElement]|!defaultSelected,!disabled,label,!selected,text,value","output^[HTMLElement]|defaultValue,%htmlFor,name,value","p^[HTMLElement]|align","param^[HTMLElement]|name,type,value,valueType","picture^[HTMLElement]|","pre^[HTMLElement]|#width","progress^[HTMLElement]|#max,#value","q,blockquote,cite^[HTMLElement]|","script^[HTMLElement]|!async,charset,%crossOrigin,!defer,event,htmlFor,integrity,src,text,type","select^[HTMLElement]|!autofocus,!disabled,#length,!multiple,name,!required,#selectedIndex,#size,value","shadow^[HTMLElement]|","slot^[HTMLElement]|name","source^[HTMLElement]|media,sizes,src,srcset,type","span^[HTMLElement]|","style^[HTMLElement]|!disabled,media,type","caption^[HTMLElement]|align","th,td^[HTMLElement]|abbr,align,axis,bgColor,ch,chOff,#colSpan,headers,height,!noWrap,#rowSpan,scope,vAlign,width","col,colgroup^[HTMLElement]|align,ch,chOff,#span,vAlign,width","table^[HTMLElement]|align,bgColor,border,%caption,cellPadding,cellSpacing,frame,rules,summary,%tFoot,%tHead,width","tr^[HTMLElement]|align,bgColor,ch,chOff,vAlign","tfoot,thead,tbody^[HTMLElement]|align,ch,chOff,vAlign","template^[HTMLElement]|","textarea^[HTMLElement]|autocapitalize,!autofocus,#cols,defaultValue,dirName,!disabled,#maxLength,#minLength,name,placeholder,!readOnly,!required,#rows,selectionDirection,#selectionEnd,#selectionStart,value,wrap","title^[HTMLElement]|text","track^[HTMLElement]|!default,kind,label,src,srclang","ul^[HTMLElement]|!compact,type","unknown^[HTMLElement]|","video^media|#height,poster,#width",":svg:a^:svg:graphics|",":svg:animate^:svg:animation|",":svg:animateMotion^:svg:animation|",":svg:animateTransform^:svg:animation|",":svg:circle^:svg:geometry|",":svg:clipPath^:svg:graphics|",":svg:defs^:svg:graphics|",":svg:desc^:svg:|",":svg:discard^:svg:|",":svg:ellipse^:svg:geometry|",":svg:feBlend^:svg:|",":svg:feColorMatrix^:svg:|",":svg:feComponentTransfer^:svg:|",":svg:feComposite^:svg:|",":svg:feConvolveMatrix^:svg:|",":svg:feDiffuseLighting^:svg:|",":svg:feDisplacementMap^:svg:|",":svg:feDistantLight^:svg:|",":svg:feDropShadow^:svg:|",":svg:feFlood^:svg:|",":svg:feFuncA^:svg:componentTransferFunction|",":svg:feFuncB^:svg:componentTransferFunction|",":svg:feFuncG^:svg:componentTransferFunction|",":svg:feFuncR^:svg:componentTransferFunction|",":svg:feGaussianBlur^:svg:|",":svg:feImage^:svg:|",":svg:feMerge^:svg:|",":svg:feMergeNode^:svg:|",":svg:feMorphology^:svg:|",":svg:feOffset^:svg:|",":svg:fePointLight^:svg:|",":svg:feSpecularLighting^:svg:|",":svg:feSpotLight^:svg:|",":svg:feTile^:svg:|",":svg:feTurbulence^:svg:|",":svg:filter^:svg:|",":svg:foreignObject^:svg:graphics|",":svg:g^:svg:graphics|",":svg:image^:svg:graphics|",":svg:line^:svg:geometry|",":svg:linearGradient^:svg:gradient|",":svg:mpath^:svg:|",":svg:marker^:svg:|",":svg:mask^:svg:|",":svg:metadata^:svg:|",":svg:path^:svg:geometry|",":svg:pattern^:svg:|",":svg:polygon^:svg:geometry|",":svg:polyline^:svg:geometry|",":svg:radialGradient^:svg:gradient|",":svg:rect^:svg:geometry|",":svg:svg^:svg:graphics|#currentScale,#zoomAndPan",":svg:script^:svg:|type",":svg:set^:svg:animation|",":svg:stop^:svg:|",":svg:style^:svg:|!disabled,media,title,type",":svg:switch^:svg:graphics|",":svg:symbol^:svg:|",":svg:tspan^:svg:textPositioning|",":svg:text^:svg:textPositioning|",":svg:textPath^:svg:textContent|",":svg:title^:svg:|",":svg:use^:svg:graphics|",":svg:view^:svg:|#zoomAndPan","data^[HTMLElement]|value","keygen^[HTMLElement]|!autofocus,challenge,!disabled,form,keytype,name","menuitem^[HTMLElement]|type,label,icon,!disabled,!checked,radiogroup,!default","summary^[HTMLElement]|","time^[HTMLElement]|dateTime",":svg:cursor^:svg:|"],go={class:"className",for:"htmlFor",formaction:"formAction",innerHtml:"innerHTML",readonly:"readOnly",tabindex:"tabIndex"};class fo extends class{}{constructor(){super(),this._schema={},mo.forEach(e=>{const t={},[n,s]=e.split("|"),r=s.split(","),[i,a]=n.split("^");i.split(",").forEach(e=>this._schema[e.toLowerCase()]=t);const o=a&&this._schema[a.toLowerCase()];o&&Object.keys(o).forEach(e=>{t[e]=o[e]}),r.forEach(e=>{if(e.length>0)switch(e[0]){case"*":break;case"!":t[e.substring(1)]="boolean";break;case"#":t[e.substring(1)]="number";break;case"%":t[e.substring(1)]="object";break;default:t[e]="string"}})})}hasProperty(e,t,n){if(n.some(e=>"no-errors-schema"===e.name))return!0;if(e.indexOf("-")>-1){if(me(e)||ge(e))return!1;if(n.some(e=>"custom-elements"===e.name))return!0}return!!(this._schema[e.toLowerCase()]||this._schema.unknown)[t]}hasElement(e,t){if(t.some(e=>"no-errors-schema"===e.name))return!0;if(e.indexOf("-")>-1){if(me(e)||ge(e))return!0;if(t.some(e=>"custom-elements"===e.name))return!0}return!!this._schema[e.toLowerCase()]}securityContext(e,t,n){n&&(t=this.getMappedPropName(t)),e=e.toLowerCase(),t=t.toLowerCase();let s=po()[e+"|"+t];return s||(s=po()["*|"+t],s||Pe.NONE)}getMappedPropName(e){return go[e]||e}getDefaultComponentElementName(){return"ng-component"}validateProperty(e){return e.toLowerCase().startsWith("on")?{error:!0,msg:`Binding to event property '${e}' is disallowed for security reasons, please use (${e.slice(2)})=...\nIf '${e}' is a directive input, make sure the directive is imported by the current module.`}:{error:!1}}validateAttribute(e){return e.toLowerCase().startsWith("on")?{error:!0,msg:`Binding to event attribute '${e}' is disallowed for security reasons, please use (${e.slice(2)})=...`}:{error:!1}}allKnownElementNames(){return Object.keys(this._schema)}normalizeAnimationStyleProperty(e){return e.replace(Qt,(...e)=>e[1].toUpperCase())}normalizeAnimationStyleValue(e,t,n){let s="";const r=n.toString().trim();let i=null;if(function(e){switch(e){case"width":case"height":case"minWidth":case"minHeight":case"maxWidth":case"maxHeight":case"left":case"top":case"bottom":case"right":case"fontSize":case"outlineWidth":case"outlineOffset":case"paddingTop":case"paddingLeft":case"paddingBottom":case"paddingRight":case"marginTop":case"marginLeft":case"marginBottom":case"marginRight":case"borderRadius":case"borderWidth":case"borderTopWidth":case"borderLeftWidth":case"borderRightWidth":case"borderBottomWidth":case"textIndent":return!0;default:return!1}}(e)&&0!==n&&"0"!==n)if("number"==typeof n)s="px";else{const e=n.match(/^[+-]?[\d\.]+([a-z]*)$/);e&&0==e[1].length&&(i=`Please provide a CSS unit value for ${t}:${n}`)}return{error:i,value:r+s}}}const vo=/^(?:(?:(?:(bind-)|(let-)|(ref-|#)|(on-)|(bindon-)|(@))(.*))|\[\(([^\)]+)\)\]|\[([^\]]+)\]|\(([^\)]+)\))$/;class yo{constructor(e){this.bindingParser=e,this.errors=[],this.styles=[],this.styleUrls=[],this.ngContentSelectors=[],this.inI18nBlock=!1}visitElement(e){const t=ps(e.i18n);t&&(this.inI18nBlock&&this.reportError("Cannot mark an element as translatable inside of a translatable section. Please remove the nested i18n marker.",e.sourceSpan),this.inI18nBlock=!0);const n=Oa(e);if(n.type===Ma.SCRIPT)return null;if(n.type===Ma.STYLE){const t=1===(s=e).children.length&&s.children[0]instanceof Hi?s.children[0].value:null;return null!==t&&this.styles.push(t),null}if(n.type===Ma.STYLESHEET&&function(e){if(null==e||0===e.length||"/"==e[0])return!1;const t=e.match(Ia);return null===t||"package"==t[1]||"asset"==t[1]}(n.hrefAttr))return this.styleUrls.push(n.hrefAttr),null;var s;const r="ng-template"===de(e.name)[1],i=[],a=[],o=[],l=[],c=[],u={},p=[],h=[];let d=!1;for(const t of e.attrs){let e=!1;const n=So(t.name);let s=!1;if(t.i18n&&(u[t.name]=t.i18n),n.startsWith("*")){d&&this.reportError("Can't have multiple template bindings on one element. Use only one attribute prefixed with *",t.sourceSpan),s=!0,d=!0;const e=t.value,r=n.substring("*".length),i=[];this.bindingParser.parseInlineTemplateBinding(r,e,t.sourceSpan,t.valueSpan?t.valueSpan.start.offset:t.sourceSpan.start.offset+t.name.length,[],p,i,!0),h.push(...i.map(e=>new Ln(e.name,e.value,e.sourceSpan,e.keySpan,e.valueSpan)))}else e=this.parseAttribute(r,t,[],i,a,o,l);e||s||c.push(this.visitAttribute(t))}const m=Qi(n.nonBindable?xo:this,e.children);let g;if(n.type===Ma.NG_CONTENT){e.children&&!e.children.every(e=>function(e){return e instanceof Hi&&0==e.value.trim().length}(e)||function(e){return e instanceof Gi}(e))&&this.reportError("<ng-content> element cannot have content.",e.sourceSpan);const t=n.selectAttr,s=e.attrs.map(e=>this.visitAttribute(e));g=new Mn(t,s,e.sourceSpan,e.i18n),this.ngContentSelectors.push(t)}else if(r){const t=this.extractAttributes(e.name,i,u);g=new On(e.name,c,t.bound,a,[],m,l,o,e.sourceSpan,e.startSourceSpan,e.endSourceSpan,e.i18n)}else{const t=this.extractAttributes(e.name,i,u);g=new kn(e.name,c,t.bound,a,m,l,e.sourceSpan,e.startSourceSpan,e.endSourceSpan,e.i18n)}if(d){const n=this.extractAttributes("ng-template",p,u),s=[];n.literal.forEach(e=>s.push(e)),n.bound.forEach(e=>s.push(e));const i=g instanceof kn?{attributes:g.attributes,inputs:g.inputs,outputs:g.outputs}:{attributes:[],inputs:[],outputs:[]};g=new On(g.name,i.attributes,i.inputs,i.outputs,s,[g],[],h,e.sourceSpan,e.startSourceSpan,e.endSourceSpan,r&&t?void 0:e.i18n)}return t&&(this.inI18nBlock=!1),g}visitAttribute(e){return new Nn(e.name,e.value,e.sourceSpan,e.valueSpan,e.i18n)}visitText(e){return this._visitTextWithInterpolation(e.value,e.sourceSpan,e.i18n)}visitExpansion(e){if(!e.i18n)return null;if(!ps(e.i18n))throw new Error(`Invalid type "${e.i18n.constructor}" for "i18n" property of ${e.sourceSpan.toString()}. Expected a "Message"`);const t=e.i18n,n={},s={};return Object.keys(t.placeholders).forEach(e=>{const r=t.placeholders[e];if(e.startsWith("VAR_")){const t=e.trim(),s=this.bindingParser.parseInterpolationExpression(r.text,r.sourceSpan);n[t]=new Tn(s,r.sourceSpan)}else s[e]=this._visitTextWithInterpolation(r.text,r.sourceSpan)}),new Dn(n,s,e.sourceSpan,t)}visitExpansionCase(e){return null}visitComment(e){return null}extractAttributes(e,t,n){const s=[],r=[];return t.forEach(t=>{const i=n[t.name];if(t.isLiteral)r.push(new Nn(t.name,t.expression.source||"",t.sourceSpan,void 0,i));else{const n=this.bindingParser.createBoundElementProperty(e,t,!0,!1);s.push(An.fromBoundElementProperty(n,i))}}),{bound:s,literal:r}}parseAttribute(e,t,n,s,r,i,a){const o=So(t.name),l=t.value,c=t.sourceSpan,u=t.valueSpan?t.valueSpan.start.offset:c.start.offset;function p(e,n,s){const r=e.start.moveBy(n.length+(t.name.length-o.length)),i=r.moveBy(s.length);return new pr(r,i,r,s)}const h=o.match(vo);let d=!1;if(h){if(d=!0,null!=h[1]){const e=h[7],r=p(c,h[1],e);this.bindingParser.parsePropertyBinding(e,l,!1,c,u,t.valueSpan,n,s,r)}else if(h[2])if(e){const e=h[7],n=p(c,h[2],e);this.parseVariable(e,l,c,n,t.valueSpan,i)}else this.reportError('"let-" is only supported on ng-template elements.',c);else if(h[3])this.parseReference(h[7],l,c,t.valueSpan,a);else if(h[4]){const e=[];this.bindingParser.parseEvent(h[7],l,c,t.valueSpan||c,n,e),Eo(e,r)}else if(h[5]){const e=h[7],i=p(c,h[5],e);this.bindingParser.parsePropertyBinding(e,l,!1,c,u,t.valueSpan,n,s,i),this.parseAssignmentEvent(e,l,c,t.valueSpan,n,r)}else if(h[6]){const e=p(c,"",o);this.bindingParser.parseLiteralAttr(o,l,c,u,t.valueSpan,n,s,e)}else if(h[8]){const e=p(c,"[(",h[8]);this.bindingParser.parsePropertyBinding(h[8],l,!1,c,u,t.valueSpan,n,s,e),this.parseAssignmentEvent(h[8],l,c,t.valueSpan,n,r)}else if(h[9]){const e=p(c,"[",h[9]);this.bindingParser.parsePropertyBinding(h[9],l,!1,c,u,t.valueSpan,n,s,e)}else if(h[10]){const e=[];this.bindingParser.parseEvent(h[10],l,c,t.valueSpan||c,n,e),Eo(e,r)}}else{const e=p(c,"",o);d=this.bindingParser.parsePropertyInterpolation(o,l,c,t.valueSpan,n,s,e)}return d}_visitTextWithInterpolation(e,t,n){const s=Ca(e),r=this.bindingParser.parseInterpolation(s,t);return r?new Tn(r,t,n):new In(s,t)}parseVariable(e,t,n,s,r,i){e.indexOf("-")>-1?this.reportError('"-" is not allowed in variable names',n):0===e.length&&this.reportError("Variable does not have a name",n),i.push(new Ln(e,t,n,s,r))}parseReference(e,t,n,s,r){e.indexOf("-")>-1?this.reportError('"-" is not allowed in reference names',n):0===e.length&&this.reportError("Reference does not have a name",n),r.push(new Rn(e,t,n,s))}parseAssignmentEvent(e,t,n,s,r,i){const a=[];this.bindingParser.parseEvent(e+"Change",t+"=$event",n,s||n,r,a),Eo(a,i)}reportError(e,t,n=hr.ERROR){this.errors.push(new fr(t,e,n))}}const xo=new class{visitElement(e){const t=Oa(e);if(t.type===Ma.SCRIPT||t.type===Ma.STYLE||t.type===Ma.STYLESHEET)return null;const n=Qi(this,e.children,null);return new kn(e.name,Qi(this,e.attrs),[],[],n,[],e.sourceSpan,e.startSourceSpan,e.endSourceSpan)}visitComment(e){return null}visitAttribute(e){return new Nn(e.name,e.value,e.sourceSpan,void 0,e.i18n)}visitText(e){return new In(e.value,e.sourceSpan)}visitExpansion(e){return null}visitExpansionCase(e){return null}};function So(e){return/^data-/i.test(e)?e.substring(5):e}function Eo(e,t){t.push(...e.map(e=>Pn.fromParsedEvent(e)))}var _o;!function(e){e[e.ELEMENT=0]="ELEMENT",e[e.TEMPLATE=1]="TEMPLATE"}(_o||(_o={}));class Co{constructor(e,t,n=0,s=null,r,i){this.index=e,this.ref=t,this.level=n,this.templateIndex=s,this.meta=r,this.registry=i,this.bindings=new Set,this.placeholders=new Map,this.isEmitted=!1,this._unresolvedCtxCount=0,this._registry=i||{getUniqueId:fs(),icus:new Map},this.id=this._registry.getUniqueId()}appendTag(e,t,n,s){t.isVoid&&s||ys(this.placeholders,t.isVoid||!s?t.startName:t.closeName,{type:e,index:n,ctx:this.id,isVoid:t.isVoid,closed:s})}get icus(){return this._registry.icus}get isRoot(){return 0===this.level}get isResolved(){return 0===this._unresolvedCtxCount}getSerializedPlaceholders(){const e=new Map;return this.placeholders.forEach((t,n)=>e.set(n,t.map(To))),e}appendBinding(e){this.bindings.add(e)}appendIcu(e,t){ys(this._registry.icus,e,t)}appendBoundText(e){xs(e,this.bindings.size,this.id).forEach((e,t)=>ys(this.placeholders,t,...e))}appendTemplate(e,t){this.appendTag(_o.TEMPLATE,e,t,!1),this.appendTag(_o.TEMPLATE,e,t,!0),this._unresolvedCtxCount++}appendElement(e,t,n){this.appendTag(_o.ELEMENT,e,t,n)}appendProjection(e,t){this.appendTag(_o.ELEMENT,e,t,!1),this.appendTag(_o.ELEMENT,e,t,!0)}forkChildContext(e,t,n){return new Co(e,this.ref,this.level+1,t,n,this._registry)}reconcileChildContext(e){["start","close"].forEach(t=>{const n=(this.placeholders.get(e.meta[t+"Name"])||[]).find(Io(this.id,e.templateIndex));n&&(n.ctx=e.id)}),e.placeholders.forEach((t,n)=>{const s=this.placeholders.get(n);if(!s)return void this.placeholders.set(n,t);const r=s.findIndex(Io(e.id,e.templateIndex));if(r>=0){const e=n.startsWith("CLOSE");n.endsWith("NG-TEMPLATE")?s.splice(r+(e?0:1),0,...t):(t[e?t.length-1:0].tmpl=s[r],s.splice(r,1,...t))}else s.push(...t);this.placeholders.set(n,s)}),this._unresolvedCtxCount--}}function wo(e,t,n,s){return gs(`${s?"/":""}${e}${t}`,n)}function bo(e,{index:t,ctx:n,isVoid:s},r){return s?wo(e,t,n)+wo(e,t,n,!0):wo(e,t,n,r)}function Io(e,t){return n=>"object"==typeof n&&n.type===_o.TEMPLATE&&n.index===t&&n.ctx===e}function To(e){const t=(e,t)=>bo("#",e,t),n=(e,t)=>bo("*",e,t);switch(e.type){case _o.ELEMENT:return e.closed?t(e,!0)+(e.tmpl?n(e.tmpl,!0):""):e.tmpl?n(e.tmpl)+t(e)+(e.isVoid?n(e.tmpl,!0):""):t(e);case _o.TEMPLATE:return n(e,e.closed);default:return e}}const No=new class{visitText(e){return e.value}visitContainer(e){return e.children.map(e=>e.visit(this)).join("")}visitIcu(e){const t=Object.keys(e.cases).map(t=>`${t} {${e.cases[t].visit(this)}}`);return`{${e.expressionPlaceholder}, ${e.type}, ${t.join(" ")}}`}visitTagPlaceholder(e){return e.isVoid?this.formatPh(e.startName):`${this.formatPh(e.startName)}${e.children.map(e=>e.visit(this)).join("")}${this.formatPh(e.closeName)}`}visitPlaceholder(e){return this.formatPh(e.name)}visitIcuPlaceholder(e,t){return this.formatPh(e.name)}formatPh(e){return`{${Es(e,!1)}}`}};function Ao(e){return e.visit(No)}const Po={A:"LINK",B:"BOLD_TEXT",BR:"LINE_BREAK",EM:"EMPHASISED_TEXT",H1:"HEADING_LEVEL1",H2:"HEADING_LEVEL2",H3:"HEADING_LEVEL3",H4:"HEADING_LEVEL4",H5:"HEADING_LEVEL5",H6:"HEADING_LEVEL6",HR:"HORIZONTAL_RULE",I:"ITALIC_TEXT",LI:"LIST_ITEM",LINK:"MEDIA_LINK",OL:"ORDERED_LIST",P:"PARAGRAPH",Q:"QUOTATION",S:"STRIKETHROUGH_TEXT",SMALL:"SMALL_TEXT",SUB:"SUBSTRIPT",SUP:"SUPERSCRIPT",TBODY:"TABLE_BODY",TD:"TABLE_CELL",TFOOT:"TABLE_FOOTER",TH:"TABLE_HEADER_CELL",THEAD:"TABLE_HEADER",TR:"TABLE_ROW",TT:"MONOSPACED_TEXT",U:"UNDERLINED_TEXT",UL:"UNORDERED_LIST"};class ko{constructor(){this._placeHolderNameCounts={},this._signatureToName={}}getStartTagPlaceholderName(e,t,n){const s=this._hashTag(e,t,n);if(this._signatureToName[s])return this._signatureToName[s];const r=e.toUpperCase(),i=Po[r]||"TAG_"+r,a=this._generateUniqueName(n?i:"START_"+i);return this._signatureToName[s]=a,a}getCloseTagPlaceholderName(e){const t=this._hashClosingTag(e);if(this._signatureToName[t])return this._signatureToName[t];const n=e.toUpperCase(),s=this._generateUniqueName("CLOSE_"+(Po[n]||"TAG_"+n));return this._signatureToName[t]=s,s}getPlaceholderName(e,t){const n=e.toUpperCase(),s=`PH: ${n}=${t}`;if(this._signatureToName[s])return this._signatureToName[s];const r=this._generateUniqueName(n);return this._signatureToName[s]=r,r}getUniquePlaceholder(e){return this._generateUniqueName(e.toUpperCase())}_hashTag(e,t,n){return"<"+e+Object.keys(t).sort().map(e=>` ${e}=${t[e]}`).join("")+(n?"/>":`></${e}>`)}_hashClosingTag(e){return this._hashTag("/"+e,{},!1)}_generateUniqueName(e){if(!this._placeHolderNameCounts.hasOwnProperty(e))return this._placeHolderNameCounts[e]=1,e;const t=this._placeHolderNameCounts[e];return this._placeHolderNameCounts[e]=t+1,`${e}_${t}`}}const Oo=new ro(new Ha);function Mo(e,t){return t}class Lo{constructor(e,t){this._expressionParser=e,this._interpolationConfig=t}toI18nMessage(e,t="",n="",s="",r){const i={isIcu:1==e.length&&e[0]instanceof Wi,icuDepth:0,placeholderRegistry:new ko,placeholderToContent:{},placeholderToMessage:{},visitNodeFn:r||Mo},a=Qi(this,e,i);return new Bn(a,i.placeholderToContent,i.placeholderToMessage,t,n,s)}visitElement(e,t){var n;const s=Qi(this,e.children,t),r={};e.attrs.forEach(e=>{r[e.name]=e.value});const i=_e(e.name).isVoid,a=t.placeholderRegistry.getStartTagPlaceholderName(e.name,r,i);t.placeholderToContent[a]={text:e.startSourceSpan.toString(),sourceSpan:e.startSourceSpan};let o="";i||(o=t.placeholderRegistry.getCloseTagPlaceholderName(e.name),t.placeholderToContent[o]={text:`</${e.name}>`,sourceSpan:null!==(n=e.endSourceSpan)&&void 0!==n?n:e.sourceSpan});const l=new Un(e.name,r,a,o,s,i,e.sourceSpan,e.startSourceSpan,e.endSourceSpan);return t.visitNodeFn(e,l)}visitAttribute(e,t){const n=this._visitTextWithInterpolation(e.value,e.sourceSpan,t);return t.visitNodeFn(e,n)}visitText(e,t){const n=this._visitTextWithInterpolation(e.value,e.sourceSpan,t);return t.visitNodeFn(e,n)}visitComment(e,t){return null}visitExpansion(e,t){t.icuDepth++;const n={},s=new jn(e.switchValue,e.type,n,e.sourceSpan);if(e.cases.forEach(e=>{n[e.value]=new Vn(e.expression.map(e=>e.visit(this,t)),e.expSourceSpan)}),t.icuDepth--,t.isIcu||t.icuDepth>0){const n=t.placeholderRegistry.getUniquePlaceholder("VAR_"+e.type);return s.expressionPlaceholder=n,t.placeholderToContent[n]={text:e.switchValue,sourceSpan:e.switchValueSourceSpan},t.visitNodeFn(e,s)}const r=t.placeholderRegistry.getPlaceholderName("ICU",e.sourceSpan.toString());t.placeholderToMessage[r]=this.toI18nMessage([e],"","","",void 0);const i=new Hn(s,r,e.sourceSpan);return t.visitNodeFn(e,i)}visitExpansionCase(e,t){throw new Error("Unreachable code")}_visitTextWithInterpolation(e,t,n){const s=this._expressionParser.splitInterpolation(e,t.start.toString(),this._interpolationConfig);if(!s)return new $n(e,t);const r=[],i=new Vn(r,t),{start:a,end:o}=this._interpolationConfig;for(let e=0;e<s.strings.length-1;e++){const i=s.expressions[e],l=i.split(Do)[2]||"INTERPOLATION",c=n.placeholderRegistry.getPlaceholderName(l,i);if(s.strings[e].length){const n=Ro(t,s.stringSpans[e]);r.push(new $n(s.strings[e],n))}const u=Ro(t,s.expressionsSpans[e]);r.push(new qn(i,c,u)),n.placeholderToContent[c]={text:a+i+o,sourceSpan:u}}const l=s.strings.length-1;if(s.strings[l].length){const e=Ro(t,s.stringSpans[l]);r.push(new $n(s.strings[l],e))}return i}}function Ro(e,{start:t,end:n}){return new pr(e.fullStart.moveBy(t),e.fullStart.moveBy(n))}const Do=/\/\/[\s\S]*i18n[\s\S]*\([\s\S]*ph[\s\S]*=[\s\S]*("|')([\s\S]*?)\1[\s\S]*\)/g,Fo=(e,t)=>(e instanceof qi&&(t instanceof Hn&&e.i18n instanceof Bn&&(t.previousMessage=e.i18n),e.i18n=t),t);class Bo{constructor(e=Hs,t=!1,n=!1){this.interpolationConfig=e,this.keepI18nAttrs=t,this.enableI18nLegacyMessageIdFormat=n,this.hasI18nMeta=!1,this._createI18nMessage=function(e){const t=new Lo(Oo,e);return(e,n,s,r,i)=>t.toI18nMessage(e,n,s,r,i)}(this.interpolationConfig)}_generateI18nMessage(e,t="",n){const{meaning:s,description:r,customId:i}=this._parseMetadata(t),a=this._createI18nMessage(e,s,r,i,n);return this._setMessageId(a,t),this._setLegacyIds(a,t),a}visitElement(e){if(function(e){return e.attrs.some(e=>us(e.name))}(e)){this.hasI18nMeta=!0;const t=[],n={};for(const s of e.attrs)if("i18n"===s.name){const t=this._generateI18nMessage(e.children,e.i18n||s.value,Fo);t.nodes.length&&(e.i18n=t)}else s.name.startsWith("i18n-")?n[s.name.slice("i18n-".length)]=s.value:t.push(s);if(Object.keys(n).length)for(const e of t){const t=n[e.name];void 0!==t&&e.value&&(e.i18n=this._generateI18nMessage([e],e.i18n||t))}this.keepI18nAttrs||(e.attrs=t)}return Qi(this,e.children,e.i18n),e}visitExpansion(e,t){let n;const s=e.i18n;if(this.hasI18nMeta=!0,s instanceof Hn){const t=s.name;n=this._generateI18nMessage([e],s),ms(n).name=t}else n=this._generateI18nMessage([e],t||s);return e.i18n=n,e}visitText(e){return e}visitAttribute(e){return e}visitComment(e){return e}visitExpansionCase(e){return e}_parseMetadata(e){return"string"==typeof e?function(e=""){let t,n,s;if(e=e.trim()){const r=e.indexOf("@@"),i=e.indexOf("|");let a;[a,t]=r>-1?[e.slice(0,r),e.slice(r+2)]:[e,""],[n,s]=i>-1?[a.slice(0,i),a.slice(i+1)]:["",a]}return{customId:t,meaning:n,description:s}}(e):e instanceof Bn?e:{}}_setMessageId(e,t){e.id||(e.id=t instanceof Bn&&t.id||function(e){return e.id||zn(e)}(e))}_setLegacyIds(e,t){if(this.enableI18nLegacyMessageIdFormat)e.legacyIds=[Wn(e),zn(e)];else if("string"!=typeof t){const n=t instanceof Bn?t:t instanceof Hn?t.previousMessage:void 0;e.legacyIds=n?n.legacyIds:[]}}}function $o(e,t,n,s){const r=[Kt(function(e){return e.nodes.map(e=>e.visit(Vo,null)).join("")}(t))];Object.keys(s).length&&r.push(yr(s,!0));const i=n.set($t("goog.getMsg").callFn(r)).toConstDecl(),a=function(e){const t=[];return e.description&&t.push({tagName:"desc",text:e.description}),e.meaning&&t.push({tagName:"meaning",text:e.meaning}),0==t.length?null:function(e=[]){return new Ot(e)}(t)}(t);return null!==a&&i.addLeadingComment(a),[i,new Dt(e.set(n))]}const Vo=new class{formatPh(e){return`{$${Es(e)}}`}visitText(e){return e.value}visitContainer(e){return e.children.map(e=>e.visit(this)).join("")}visitIcu(e){return Ao(e)}visitTagPlaceholder(e){return e.isVoid?this.formatPh(e.startName):`${this.formatPh(e.startName)}${e.children.map(e=>e.visit(this)).join("")}${this.formatPh(e.closeName)}`}visitPlaceholder(e){return this.formatPh(e.name)}visitIcuPlaceholder(e,t){return this.formatPh(e.name)}};function jo(e,t,n){const{messageParts:s,placeHolders:r}=function(e){const t=[];return e.nodes.forEach(e=>e.visit(Uo,t)),function(e){const t=[],n=[];e[0]instanceof ct&&t.push(qo(e[0].sourceSpan.start));for(let s=0;s<e.length;s++){const r=e[s];r instanceof lt?t.push(r):(n.push(r),e[s-1]instanceof ct&&t.push(qo(e[s-1].sourceSpan.end)))}return e[e.length-1]instanceof ct&&t.push(qo(e[e.length-1].sourceSpan.end)),{messageParts:t,placeHolders:n}}(t)}(t),i=function(e){const t=e.nodes[0];return new pr(t.sourceSpan.start,e.nodes[e.nodes.length-1].sourceSpan.end,t.sourceSpan.fullStart,t.sourceSpan.details)}(t),a=r.map(e=>n[e.text]),o=function(e,t,n,s,r){return new ut(e,t,n,s,r)}(t,s,r,a,i),l=e.set(o);return[new Dt(l)]}const Uo=new class{visitText(e,t){t[t.length-1]instanceof lt?t[t.length-1].text+=e.value:t.push(new lt(e.value,e.sourceSpan))}visitContainer(e,t){e.children.forEach(e=>e.visit(this,t))}visitIcu(e,t){t.push(new lt(Ao(e),e.sourceSpan))}visitTagPlaceholder(e,t){var n,s;t.push(this.createPlaceholderPiece(e.startName,null!==(n=e.startSourceSpan)&&void 0!==n?n:e.sourceSpan)),e.isVoid||(e.children.forEach(e=>e.visit(this,t)),t.push(this.createPlaceholderPiece(e.closeName,null!==(s=e.endSourceSpan)&&void 0!==s?s:e.sourceSpan)))}visitPlaceholder(e,t){t.push(this.createPlaceholderPiece(e.name,e.sourceSpan))}visitIcuPlaceholder(e,t){t.push(this.createPlaceholderPiece(e.name,e.sourceSpan))}createPlaceholderPiece(e,t){return new ct(Es(e,!1),t)}};function qo(e){return new lt("",new pr(e,e))}const Ho=new Set(["$event"]),Wo=new Map([["window",En.resolveWindow],["document",En.resolveDocument],["body",En.resolveBody]]),zo=[" ","\n","\r","\t"];function Ko(e,t){return zt($t("rf").bitwiseAnd(Kt(e),null,!1),t)}function Xo(e,t=null,n=null){const{type:s,name:r,target:i,phase:a,handler:o}=e;if(i&&!Wo.has(i))throw new Error(`Unexpected global target '${i}' defined for '${r}' event.\n Supported list of global targets: ${Array.from(Wo.keys())}.`);const l=new Set,c=null===n||0===n.bindingLevel?$t("ctx"):n.getOrCreateSharedContextVar(0),u=function(e,t,n,s,r,i,a,o){e||(e=new mi(Ho));const l=function(e,t){const n=new hi(e);return t.visit(n)}({createLiteralArrayConverter:e=>e=>qt(e),createLiteralMapConverter:e=>t=>Ht(e.map((e,n)=>({key:e.key,value:t[n],quoted:e.quoted}))),createPipeConverter:e=>{throw new Error("Illegal State: Actions are not allowed to contain pipes. Pipe: "+e)}},n),c=new di(e,t,"b",()=>Jt("Unexpected interpolation"),i,a),u=[];!function e(t,n){Array.isArray(t)?t.forEach(t=>e(t,n)):n.push(t)}(l.visit(c,gr.Statement),u),function(e,t,n){for(let t=e-1;t>=0;t--)n.unshift(ci("b",t))}(c.temporaryCount,0,u),c.usesImplicitReceiver&&e.notifyImplicitReceiverUse();const p=u.length-1;let h=null;if(p>=0){const e=(d=u[p])instanceof Dt?d.expr:d instanceof Ft?d.value:null;e&&(h=$t("pd_b"),u[p]=h.set(e.cast($e).notIdentical(Kt(!1))).toDeclStmt(null,[kt.Final]))}var d;return new ri(u,h)}(n,c,o,0,0,e.handlerSpan,l),p=[];n&&(p.push(...n.restoreViewStatement()),p.push(...n.variableDeclarations())),p.push(...u.render3Stmts);const h=1===s?function(e,t){return`@${e}.${t}`}(r,a):r,d=t&&vn(t),m=[];l.has("$event")&&m.push(new St("$event",$e));const g=Wt(m,p,Ve,null,d),f=[Kt(h),g];return i&&f.push(Kt(!1),Vt(Wo.get(i))),f}class Go{constructor(e,t,n=0,s,r,i,a,o,l,c,u,p,h,d,m={prepareStatements:[],constExpressions:[]}){this.constantPool=e,this.level=n,this.contextName=s,this.i18nContext=r,this.templateIndex=i,this.templateName=a,this.directiveMatcher=o,this.directives=l,this.pipeTypeByName=c,this.pipes=u,this._namespace=p,this.i18nUseExternalIds=d,this._constants=m,this._dataIndex=0,this._bindingContext=0,this._prefixCode=[],this._creationCodeFns=[],this._updateCodeFns=[],this._currentIndex=0,this._tempVariables=[],this._nestedTemplateFns=[],this._unsupported=Is,this.i18n=null,this._pureFunctionSlots=0,this._bindingSlots=0,this._ngContentReservedSlots=[],this._ngContentSelectorsOffset=0,this._implicitReceiverExpr=null,this.visitReference=Ts,this.visitVariable=Ts,this.visitTextAttribute=Ts,this.visitBoundAttribute=Ts,this.visitBoundEvent=Ts,this._bindingScope=t.nestedScope(n),this.fileBasedI18nSuffix=h.replace(/[^A-Za-z0-9]/g,"_")+"_",this._valueConverter=new Qo(e,()=>this.allocateDataSlot(),e=>this.allocatePureFunctionSlots(e),(e,t,n,s)=>{const r=c.get(e);r&&this.pipes.add(r),this._bindingScope.set(this.level,t,s),this.creationInstruction(null,En.pipe,[Kt(n),Kt(e)])})}buildTemplateFunction(e,t,n=0,s){this._ngContentSelectorsOffset=n,this._namespace!==En.namespaceHTML&&this.creationInstruction(null,this._namespace),t.forEach(e=>this.registerContextVariables(e));const r=this.i18nContext||ps(s)&&!hs(s)&&!(1===(i=e).length&&i[0]instanceof kn&&e[0].i18n===s);var i;const a=ul(e);if(r&&this.i18nStart(null,s,a),Fn(this,e),this._pureFunctionSlots+=this._bindingSlots,this._valueConverter.updatePipeSlotOffsets(this._bindingSlots),this._nestedTemplateFns.forEach(e=>e()),0===this.level&&this._ngContentReservedSlots.length){const e=[];if(this._ngContentReservedSlots.length>1||"*"!==this._ngContentReservedSlots[0]){const t=this._ngContentReservedSlots.map(e=>"*"!==e?Re(e):e);e.push(this.constantPool.getConstLiteral(Ns(t),!0))}this.creationInstruction(null,En.projectionDef,e,!0)}r&&this.i18nEnd(null,a);const o=this._creationCodeFns.map(e=>e()),l=this._updateCodeFns.map(e=>e()),c=this._bindingScope.viewSnapshotStatements(),u=this._bindingScope.variableDeclarations().concat(this._tempVariables),p=o.length>0?[Ko(1,c.concat(o))]:[],h=l.length>0?[Ko(2,u.concat(l))]:[];return Wt([new St("rf",Ue),new St("ctx",null)],[...this._prefixCode,...p,...h],Ve,null,this.templateName)}getLocal(e){return this._bindingScope.get(e)}notifyImplicitReceiverUse(){this._bindingScope.notifyImplicitReceiverUse()}i18nTranslate(e,t={},n,s){const r=n||this.i18nGenerateMainBlockVar(),i=function(e,t,n,s={},r){const i=[Cs(t),zt(pl(),$o(t,e,n,Ss(s,!0)),jo(t,e,Ss(s,!1)))];return r&&i.push(new Dt(t.set(r(t)))),i}(e,r,this.i18nGenerateClosureVar(e.id),t,s);return this._constants.prepareStatements.push(...i),r}registerContextVariables(e){const t=this._bindingScope.freshReferenceName(),n=this.level,s=$t(e.name+t);this._bindingScope.set(n,e.name,s,1,(t,r)=>{let i;return i=t.bindingLevel===n?$t("ctx"):t.getSharedContextName(n)||el(r),[s.set(i.prop(e.value||"$implicit")).toConstDecl()]})}i18nAppendBindings(e){e.length>0&&e.forEach(e=>this.i18n.appendBinding(e))}i18nBindProps(e){const t={};return Object.keys(e).forEach(n=>{const s=e[n];if(s instanceof In)t[n]=Kt(s.value);else{const e=s.value.visit(this._valueConverter);if(this.allocateBindingSlots(e),e instanceof Vr){const{strings:s,expressions:r}=e,{id:i,bindings:a}=this.i18n,o=function(e,t=0,n=0){if(!e.length)return"";let s="";const r=e.length-1;for(let i=0;i<r;i++)s+=`${e[i]}${gs(t+i,n)}`;return s+=e[r],s}(s,a.size,i);this.i18nAppendBindings(r),t[n]=Kt(o)}}}),t}i18nGenerateMainBlockVar(){return $t(this.constantPool.uniqueName("i18n_"))}i18nGenerateClosureVar(e){let t;const n=this.fileBasedI18nSuffix.toUpperCase();if(this.i18nUseExternalIds){const s=_s("EXTERNAL_"),r=this.constantPool.uniqueName(n);t=`${s}${vn(e)}$$${r}`}else{const e=_s(n);t=this.constantPool.uniqueName(e)}return $t(t)}i18nUpdateRef(e){const{icus:t,meta:n,isRoot:s,isResolved:r,isEmitted:i}=e;if(s&&r&&!i&&!hs(n)){e.isEmitted=!0;const s=e.getSerializedPlaceholders();let r,i={},a=s.size?vs(s):{};t.size&&t.forEach((e,t)=>{if(1===e.length)a[t]=e[0];else{const n=gs("I18N_EXP_"+t);a[t]=Kt(n),i[t]=qt(e)}}),(Array.from(s.values()).some(e=>e.length>1)||Object.keys(i).length)&&(r=e=>{const t=[e];return Object.keys(i).length&&t.push(yr(i,!0)),Jo(null,En.i18nPostprocess,t)}),this.i18nTranslate(n,a,e.ref,r)}}i18nStart(e=null,t,n){const s=this.allocateDataSlot();this.i18n=this.i18nContext?this.i18nContext.forkChildContext(s,this.templateIndex,t):new Co(s,this.i18nGenerateMainBlockVar(),0,this.templateIndex,t);const{id:r,ref:i}=this.i18n,a=[Kt(s),this.addToConsts(i)];r>0&&a.push(Kt(r)),this.creationInstruction(e,n?En.i18n:En.i18nStart,a)}i18nEnd(e=null,t){if(!this.i18n)throw new Error("i18nEnd is executed with no i18n context present");this.i18nContext?(this.i18nContext.reconcileChildContext(this.i18n),this.i18nUpdateRef(this.i18nContext)):this.i18nUpdateRef(this.i18n);const{index:n,bindings:s}=this.i18n;if(s.size){const t=[];s.forEach(n=>{t.push({sourceSpan:e,value:()=>this.convertPropertyBinding(n)})}),this.updateInstructionChainWithAdvance(this.getConstCount()-1,En.i18nExp,t),this.updateInstruction(e,En.i18nApply,[Kt(n)])}t||this.creationInstruction(e,En.i18nEnd),this.i18n=null}i18nAttributesInstruction(e,t,n){let s=!1;const r=[],i=[];if(t.forEach(e=>{const t=e.i18n,a=e.value.visit(this._valueConverter);if(this.allocateBindingSlots(a),a instanceof Vr){const o=vs(xs(t));r.push(Kt(e.name),this.i18nTranslate(t,o)),a.expressions.forEach(e=>{s=!0,i.push({sourceSpan:n,value:()=>this.convertPropertyBinding(e)})})}}),i.length>0&&this.updateInstructionChainWithAdvance(e,En.i18nExp,i),r.length>0){const e=Kt(this.allocateDataSlot()),t=this.addToConsts(qt(r));this.creationInstruction(n,En.i18nAttributes,[e,t]),s&&this.updateInstruction(n,En.i18nApply,[e])}}getNamespaceInstruction(e){switch(e){case"math":return En.namespaceMathML;case"svg":return En.namespaceSVG;default:return En.namespaceHTML}}addNamespaceInstruction(e,t){this._namespace=e,this.creationInstruction(t.startSourceSpan,e)}interpolatedUpdateInstruction(e,t,n,s,r,i){this.updateInstructionWithAdvance(t,s.sourceSpan,e,()=>[Kt(n),...this.getUpdateInstructionArguments(r),...i])}visitContent(e){const t=this.allocateDataSlot(),n=this._ngContentSelectorsOffset+this._ngContentReservedSlots.length,s=[Kt(t)];this._ngContentReservedSlots.push(e.selector);const r=e.attributes.filter(e=>"select"!==e.name.toLowerCase()),i=this.getAttributeExpressions(e.name,r,[],[]);i.length>0?s.push(Kt(n),qt(i)):0!==n&&s.push(Kt(n)),this.creationInstruction(e.sourceSpan,En.projection,s),this.i18n&&this.i18n.appendProjection(e.i18n,t)}visitElement(e){var t,n;const s=this.allocateDataSlot(),r=new $a(null);let i=!1;const a=ps(e.i18n)&&!hs(e.i18n),o=[],[l,c]=de(e.name),u=me(e.name);for(const t of e.attributes){const{name:e,value:n}=t;"ngNonBindable"===e?i=!0:"style"===e?r.registerStyleAttr(n):"class"===e?r.registerClassAttr(n):o.push(t)}this.matchDirectives(e.name,e);const p=[Kt(s)];u||p.push(Kt(c));const h=[],d=[];e.inputs.forEach(e=>{r.registerBoundInput(e)||(0===e.type&&e.i18n?d.push(e):h.push(e))});const m=this.getAttributeExpressions(e.name,o,h,e.outputs,r,[],d);p.push(this.addAttrsToConsts(m));const g=this.prepareRefsArray(e.references);p.push(this.addToConsts(g));const f=this._namespace,v=this.getNamespaceInstruction(l);v!==f&&this.addNamespaceInstruction(v,e),this.i18n&&this.i18n.appendElement(e.i18n,s);const y=!a&&this.i18n?!ul(e.children):e.children.length>0,x=!r.hasBindingsWithPipes&&0===e.outputs.length&&0===d.length&&!y,S=!x&&ul(e.children);if(x)this.creationInstruction(e.sourceSpan,u?En.elementContainer:En.element,Ps(p));else{if(this.creationInstruction(e.startSourceSpan,u?En.elementContainerStart:En.elementStart,Ps(p)),i&&this.creationInstruction(e.startSourceSpan,En.disableBindings),d.length>0&&this.i18nAttributesInstruction(s,d,null!==(t=e.startSourceSpan)&&void 0!==t?t:e.sourceSpan),e.outputs.length>0){const t=e.outputs.map(t=>({sourceSpan:t.sourceSpan,params:this.prepareListenerParameter(e.name,t,s)}));this.creationInstructionChain(En.listener,t)}a&&this.i18nStart(e.startSourceSpan,e.i18n,S)}const E=r.buildUpdateLevelInstructions(this._valueConverter),_=E.length-1;for(let e=0;e<=_;e++)this._bindingSlots+=this.processStylingUpdateInstruction(s,E[e]);const C=Kt(void 0),w=[],b=[];if(h.forEach(e=>{const t=e.type;if(4===t){const t=e.value.visit(this._valueConverter),n=!(t instanceof Fr&&!t.value);this.allocateBindingSlots(t),w.push({name:wn(e.name),sourceSpan:e.sourceSpan,value:()=>n?this.convertPropertyBinding(t):C})}else{if(e.i18n)return;const n=e.value.visit(this._valueConverter);if(void 0!==n){const r=[],[i,a]=de(e.name),o=ol(e.securityContext,1===t);if(o&&r.push(o),i){const e=Kt(i);o?r.push(e):r.push(Kt(null),e)}if(this.allocateBindingSlots(n),0===t)n instanceof Vr?this.interpolatedUpdateInstruction(rl(n),s,a,e,n,r):w.push({name:a,sourceSpan:e.sourceSpan,value:()=>this.convertPropertyBinding(n),params:r});else if(1===t)if(n instanceof Vr&&Ls(n)>1)this.interpolatedUpdateInstruction(function(e){switch(Ls(e)){case 3:return En.attributeInterpolate1;case 5:return En.attributeInterpolate2;case 7:return En.attributeInterpolate3;case 9:return En.attributeInterpolate4;case 11:return En.attributeInterpolate5;case 13:return En.attributeInterpolate6;case 15:return En.attributeInterpolate7;case 17:return En.attributeInterpolate8;default:return En.attributeInterpolateV}}(n),s,a,e,n,r);else{const t=n instanceof Vr?n.expressions[0]:n;b.push({name:a,sourceSpan:e.sourceSpan,value:()=>this.convertPropertyBinding(t),params:r})}else this.updateInstructionWithAdvance(s,e.sourceSpan,En.classProp,()=>[Kt(s),Kt(a),this.convertPropertyBinding(n),...r])}}}),w.length>0&&this.updateInstructionChainWithAdvance(s,En.property,w),b.length>0&&this.updateInstructionChainWithAdvance(s,En.attribute,b),Fn(this,e.children),!a&&this.i18n&&this.i18n.appendElement(e.i18n,s,!0),!x){const t=null!==(n=e.endSourceSpan)&&void 0!==n?n:e.sourceSpan;a&&this.i18nEnd(t,S),i&&this.creationInstruction(t,En.enableBindings),this.creationInstruction(t,u?En.elementContainerEnd:En.elementEnd)}}visitTemplate(e){var t;const n=this.allocateDataSlot();this.i18n&&this.i18n.appendTemplate(e.i18n,n);const s=vn(e.tagName||""),r=`${this.contextName}${s?"_"+s:""}_${n}`,i=r+"_Template",a=[Kt(n),$t(i),Kt(e.tagName?de(e.tagName)[1]:e.tagName)];this.matchDirectives("ng-template",e);const o=this.getAttributeExpressions("ng-template",e.attributes,e.inputs,e.outputs,void 0,e.templateAttrs);if(a.push(this.addAttrsToConsts(o)),e.references&&e.references.length){const t=this.prepareRefsArray(e.references);a.push(this.addToConsts(t)),a.push(Vt(En.templateRefExtractor))}const l=new Go(this.constantPool,this._bindingScope,this.level+1,r,this.i18n,n,i,this.directiveMatcher,this.directives,this.pipeTypeByName,this.pipes,this._namespace,this.fileBasedI18nSuffix,this.i18nUseExternalIds,this._constants);if(this._nestedTemplateFns.push(()=>{const t=l.buildTemplateFunction(e.children,e.variables,this._ngContentReservedSlots.length+this._ngContentSelectorsOffset,e.i18n);this.constantPool.statements.push(t.toDeclStmt(i)),l._ngContentReservedSlots.length&&this._ngContentReservedSlots.push(...l._ngContentReservedSlots)}),this.creationInstruction(e.sourceSpan,En.templateCreate,()=>(a.splice(2,0,Kt(l.getConstCount()),Kt(l.getVarCount())),Ps(a))),this.templatePropertyBindings(n,e.templateAttrs),"ng-template"===e.tagName){const[s,r]=function(e,t){const n=[],s=[];for(const r of e)(t(r)?n:s).push(r);return[n,s]}(e.inputs,ds);if(s.length>0&&this.i18nAttributesInstruction(n,s,null!==(t=e.startSourceSpan)&&void 0!==t?t:e.sourceSpan),r.length>0&&this.templatePropertyBindings(n,r),e.outputs.length>0){const t=e.outputs.map(e=>({sourceSpan:e.sourceSpan,params:this.prepareListenerParameter("ng_template",e,n)}));this.creationInstructionChain(En.listener,t)}}}visitBoundText(e){if(this.i18n){const t=e.value.visit(this._valueConverter);return this.allocateBindingSlots(t),void(t instanceof Vr&&(this.i18n.appendBoundText(e.i18n),this.i18nAppendBindings(t.expressions)))}const t=this.allocateDataSlot();this.creationInstruction(e.sourceSpan,En.text,[Kt(t)]);const n=e.value.visit(this._valueConverter);this.allocateBindingSlots(n),n instanceof Vr?this.updateInstructionWithAdvance(t,e.sourceSpan,function(e){switch(Ls(e)){case 1:return En.textInterpolate;case 3:return En.textInterpolate1;case 5:return En.textInterpolate2;case 7:return En.textInterpolate3;case 9:return En.textInterpolate4;case 11:return En.textInterpolate5;case 13:return En.textInterpolate6;case 15:return En.textInterpolate7;case 17:return En.textInterpolate8;default:return En.textInterpolateV}}(n),()=>this.getUpdateInstructionArguments(n)):Jt("Text nodes should be interpolated and never bound directly.")}visitText(e){this.i18n||this.creationInstruction(e.sourceSpan,En.text,[Kt(this.allocateDataSlot()),Kt(e.value)])}visitIcu(e){let t=!1;this.i18n||(t=!0,this.i18nStart(null,e.i18n,!0));const n=this.i18n,s=this.i18nBindProps(e.vars),r=this.i18nBindProps(e.placeholders),i=e.i18n,a=e=>{const t=Ss(Object.assign(Object.assign({},s),r),!1);return Jo(null,En.i18nPostprocess,[e,yr(t,!0)])};if(hs(n.meta))this.i18nTranslate(i,{},n.ref,a);else{const e=this.i18nTranslate(i,{},void 0,a);n.appendIcu(ms(i).name,e)}return t&&this.i18nEnd(null,!0),null}allocateDataSlot(){return this._dataIndex++}getConstCount(){return this._dataIndex}getVarCount(){return this._pureFunctionSlots}getConsts(){return this._constants}getNgContentSelectors(){return this._ngContentReservedSlots.length?this.constantPool.getConstLiteral(Ns(this._ngContentReservedSlots),!0):null}bindingContext(){return""+this._bindingContext++}templatePropertyBindings(e,t){const n=[];t.forEach(t=>{if(t instanceof An){const s=t.value.visit(this._valueConverter);if(void 0!==s)if(this.allocateBindingSlots(s),s instanceof Vr){const n=[];this.interpolatedUpdateInstruction(rl(s),e,t.name,t,s,n)}else n.push({name:t.name,sourceSpan:t.sourceSpan,value:()=>this.convertPropertyBinding(s)})}}),n.length>0&&this.updateInstructionChainWithAdvance(e,En.property,n)}instructionFn(e,t,n,s,r=!1){e[r?"unshift":"push"](()=>{const e=Array.isArray(s)?s:s();return Jo(t,n,e).toStmt()})}processStylingUpdateInstruction(e,t){let n=0;if(t){const s=[];t.calls.forEach(e=>{n+=e.allocateBindingSlots,s.push({sourceSpan:e.sourceSpan,value:()=>e.params(t=>e.supportsInterpolation&&t instanceof Vr?this.getUpdateInstructionArguments(t):this.convertPropertyBinding(t))})}),this.updateInstructionChainWithAdvance(e,t.reference,s)}return n}creationInstruction(e,t,n,s){this.instructionFn(this._creationCodeFns,e,t,n||[],s)}creationInstructionChain(e,t){const n=t.length?t[0].sourceSpan:null;this._creationCodeFns.push(()=>Ms(e,t.map(e=>e.params()),n).toStmt())}updateInstructionWithAdvance(e,t,n,s){this.addAdvanceInstructionIfNecessary(e,t),this.updateInstruction(t,n,s)}updateInstruction(e,t,n){this.instructionFn(this._updateCodeFns,e,t,n||[])}updateInstructionChain(e,t){const n=t.length?t[0].sourceSpan:null;this._updateCodeFns.push(()=>{const s=t.map(e=>{const t=e.value(),n=Array.isArray(t)?t:[t];return e.params&&n.push(...e.params),e.name&&n.unshift(Kt(e.name)),n});return Ms(e,s,n).toStmt()})}updateInstructionChainWithAdvance(e,t,n){this.addAdvanceInstructionIfNecessary(e,n.length?n[0].sourceSpan:null),this.updateInstructionChain(t,n)}addAdvanceInstructionIfNecessary(e,t){if(e!==this._currentIndex){const n=e-this._currentIndex;if(n<1)throw new Error("advance instruction can only go forwards");this.instructionFn(this._updateCodeFns,t,En.advance,[Kt(n)]),this._currentIndex=e}}allocatePureFunctionSlots(e){const t=this._pureFunctionSlots;return this._pureFunctionSlots+=e,t}allocateBindingSlots(e){this._bindingSlots+=e instanceof Vr?e.expressions.length:1}getImplicitReceiverExpr(){return this._implicitReceiverExpr?this._implicitReceiverExpr:this._implicitReceiverExpr=0===this.level?$t("ctx"):this._bindingScope.getOrCreateSharedContextVar(0)}convertPropertyBinding(e){const t=ai(this,this.getImplicitReceiverExpr(),e,this.bindingContext(),mr.Expression,()=>Jt("Unexpected interpolation")),n=t.currValExpr;return this._tempVariables.push(...t.stmts),n}getUpdateInstructionArguments(e){const{args:t,stmts:n}=function(e,t,n,s){const r=new di(e,t,s,void 0),i=n.visit(r,gr.Expression);r.usesImplicitReceiver&&e.notifyImplicitReceiverUse();const a=oi(r,s);let o=i.args.slice(1);if(n instanceof Vr){const e=n.strings;3===o.length&&""===e[0]&&""===e[1]?o=[o[1]]:o.length>=19&&(o=[qt(o)])}return{stmts:a,args:o}}(this,this.getImplicitReceiverExpr(),e,this.bindingContext());return this._tempVariables.push(...n),t}matchDirectives(e,t){if(this.directiveMatcher){const n=function(e,t){const n=new we,s=de(e)[1];return n.setElement(s),Object.getOwnPropertyNames(t).forEach(e=>{const s=de(e)[1],r=t[e];n.addAttribute(s,r),"class"===e.toLowerCase()&&r.trim().split(/\s+/).forEach(e=>n.addClassName(e))}),n}(e,function(e){const t={};return e instanceof On&&"ng-template"!==e.tagName?e.templateAttrs.forEach(e=>t[e.name]=""):(e.attributes.forEach(e=>{us(e.name)||(t[e.name]=e.value)}),e.inputs.forEach(e=>{t[e.name]=""}),e.outputs.forEach(e=>{t[e.name]=""})),t}(t));this.directiveMatcher.match(n,(e,t)=>{this.directives.add(t)})}}getAttributeExpressions(e,t,n,s,r,i=[],a=[]){const o=new Set,l=[];let c;for(const n of t)"ngProjectAs"===n.name&&(c=n),n.i18n?l.push(Kt(n.name),this.i18nTranslate(n.i18n)):l.push(...nl(n.name),ll(e,n));function u(e,t){"string"==typeof e?o.has(e)||(l.push(...nl(e)),void 0!==t&&l.push(t),o.add(e)):l.push(Kt(e))}if(c&&l.push(...function(e){const t=Re(e.value)[0];return[Kt(5),Ns(t)]}(c)),r&&r.populateInitialStylingAttrs(l),n.length||s.length){const e=l.length;for(let e=0;e<n.length;e++){const t=n[e];4!==t.type&&1!==t.type&&u(t.name)}for(let e=0;e<s.length;e++){const t=s[e];1!==t.type&&u(t.name)}l.length!==e&&l.splice(e,0,Kt(3))}return i.length&&(l.push(Kt(4)),i.forEach(e=>u(e.name))),a.length&&(l.push(Kt(6)),a.forEach(e=>u(e.name))),l}addToConsts(e){if(Xt(e))return Pt;const t=this._constants.constExpressions;for(let n=0;n<t.length;n++)if(t[n].isEquivalent(e))return Kt(n);return Kt(t.push(e)-1)}addAttrsToConsts(e){return e.length>0?this.addToConsts(qt(e)):Pt}prepareRefsArray(e){return e&&0!==e.length?Ns(function e(t){return t.reduce((t,n)=>{const s=Array.isArray(n)?e(n):n;return t.concat(s)},[])}(e.map(e=>{const t=this.allocateDataSlot(),n=this._bindingScope.freshReferenceName(),s=this.level,r=$t(n);return this._bindingScope.set(s,e.name,r,0,(e,n)=>{const s=n>0?[el(n).toStmt()]:[],i=r.set(Vt(En.reference).callFn([Kt(t)]));return s.concat(i.toConstDecl())},!0),[e.name,e.value]}))):Pt}prepareListenerParameter(e,t,n){return()=>{const s=t.name,r=1===t.type?bn(s,t.phase):vn(s),i=`${this.templateName}_${e}_${r}_${n}_listener`,a=this._bindingScope.nestedScope(this._bindingScope.bindingLevel,Ho);return Xo(t,i,a)}}}class Qo extends class{visitImplicitReceiver(e,t){return e}visitThisReceiver(e,t){return e}visitInterpolation(e,t){const n=this.visitAll(e.expressions);return n!==e.expressions?new Vr(e.span,e.sourceSpan,e.strings,n):e}visitLiteralPrimitive(e,t){return e}visitPropertyRead(e,t){const n=e.receiver.visit(this);return n!==e.receiver?new kr(e.span,e.sourceSpan,e.nameSpan,n,e.name):e}visitPropertyWrite(e,t){const n=e.receiver.visit(this),s=e.value.visit(this);return n!==e.receiver||s!==e.value?new Or(e.span,e.sourceSpan,e.nameSpan,n,e.name,s):e}visitSafePropertyRead(e,t){const n=e.receiver.visit(this);return n!==e.receiver?new Mr(e.span,e.sourceSpan,e.nameSpan,n,e.name):e}visitMethodCall(e,t){const n=e.receiver.visit(this),s=this.visitAll(e.args);return n!==e.receiver||s!==e.args?new Wr(e.span,e.sourceSpan,e.nameSpan,n,e.name,s):e}visitSafeMethodCall(e,t){const n=e.receiver.visit(this),s=this.visitAll(e.args);return n!==e.receiver||s!==e.args?new zr(e.span,e.sourceSpan,e.nameSpan,n,e.name,s):e}visitFunctionCall(e,t){const n=e.target&&e.target.visit(this),s=this.visitAll(e.args);return n!==e.target||s!==e.args?new Kr(e.span,e.sourceSpan,n,s):e}visitLiteralArray(e,t){const n=this.visitAll(e.expressions);return n!==e.expressions?new Br(e.span,e.sourceSpan,n):e}visitLiteralMap(e,t){const n=this.visitAll(e.values);return n!==e.values?new $r(e.span,e.sourceSpan,e.keys,n):e}visitUnary(e,t){const n=e.expr.visit(this);if(n!==e.expr)switch(e.operator){case"+":return Ur.createPlus(e.span,e.sourceSpan,n);case"-":return Ur.createMinus(e.span,e.sourceSpan,n);default:throw new Error("Unknown unary operator "+e.operator)}return e}visitBinary(e,t){const n=e.left.visit(this),s=e.right.visit(this);return n!==e.left||s!==e.right?new jr(e.span,e.sourceSpan,e.operation,n,s):e}visitPrefixNot(e,t){const n=e.expression.visit(this);return n!==e.expression?new qr(e.span,e.sourceSpan,n):e}visitNonNullAssert(e,t){const n=e.expression.visit(this);return n!==e.expression?new Hr(e.span,e.sourceSpan,n):e}visitConditional(e,t){const n=e.condition.visit(this),s=e.trueExp.visit(this),r=e.falseExp.visit(this);return n!==e.condition||s!==e.trueExp||r!==e.falseExp?new Pr(e.span,e.sourceSpan,n,s,r):e}visitPipe(e,t){const n=e.exp.visit(this),s=this.visitAll(e.args);return n!==e.exp||s!==e.args?new Dr(e.span,e.sourceSpan,n,e.name,s,e.nameSpan):e}visitKeyedRead(e,t){const n=e.obj.visit(this),s=e.key.visit(this);return n!==e.obj||s!==e.key?new Lr(e.span,e.sourceSpan,n,s):e}visitKeyedWrite(e,t){const n=e.obj.visit(this),s=e.key.visit(this),r=e.value.visit(this);return n!==e.obj||s!==e.key||r!==e.value?new Rr(e.span,e.sourceSpan,n,s,r):e}visitAll(e){const t=[];let n=!1;for(let s=0;s<e.length;++s){const r=e[s],i=r.visit(this);t[s]=i,n=n||i!==r}return n?t:e}visitChain(e,t){const n=this.visitAll(e.expressions);return n!==e.expressions?new Ar(e.span,e.sourceSpan,n):e}visitQuote(e,t){return e}}{constructor(e,t,n,s){super(),this.constantPool=e,this.allocateSlot=t,this.allocatePureFunctionSlots=n,this.definePipe=s,this._pipeBindExprs=[]}visitPipe(e,t){const n=this.allocateSlot(),s="PIPE:"+n,r=this.allocatePureFunctionSlots(2+e.args.length),i=new kr(e.span,e.sourceSpan,e.nameSpan,new Tr(e.span,e.sourceSpan),s),{identifier:a,isVarLength:o}=function(e){const t=Yo[e.length];return{identifier:t||En.pipeBindV,isVarLength:!t}}(e.args);this.definePipe(e.name,s,n,Vt(a));const l=[e.exp,...e.args],c=this.visitAll(o?[new Br(e.span,e.sourceSpan,l)]:l),u=new Kr(e.span,e.sourceSpan,i,[new Fr(e.span,e.sourceSpan,n),new Fr(e.span,e.sourceSpan,r),...c]);return this._pipeBindExprs.push(u),u}updatePipeSlotOffsets(e){this._pipeBindExprs.forEach(t=>{t.args[1].value+=e})}visitLiteralArray(e,t){return new gi(e.span,e.sourceSpan,this.visitAll(e.expressions),e=>{const t=qt(e);return tl(this.constantPool,t,this.allocatePureFunctionSlots)})}visitLiteralMap(e,t){return new gi(e.span,e.sourceSpan,this.visitAll(e.values),t=>{const n=Ht(t.map((t,n)=>({key:e.keys[n].key,value:t,quoted:e.keys[n].quoted})));return tl(this.constantPool,n,this.allocatePureFunctionSlots)})}}const Yo=[En.pipeBind1,En.pipeBind2,En.pipeBind3,En.pipeBind4],Zo=[En.pureFunction0,En.pureFunction1,En.pureFunction2,En.pureFunction3,En.pureFunction4,En.pureFunction5,En.pureFunction6,En.pureFunction7,En.pureFunction8];function Jo(e,t,n){return Vt(t,null,e).callFn(n,e)}function el(e){return Vt(En.nextContext).callFn(e>1?[Kt(e)]:[])}function tl(e,t,n){const{literalFactory:s,literalFactoryArguments:r}=e.getLiteralFactory(t),i=n(1+r.length),{identifier:a,isVarLength:o}=function(e){const t=Zo[e.length];return{identifier:t||En.pureFunctionV,isVarLength:!t}}(r),l=[Kt(i),s];return o?l.push(qt(r)):l.push(...r),Vt(a).callFn(l)}function nl(e){const[t,n]=de(e),s=Kt(n);return t?[Kt(0),Kt(t),s]:[s]}class sl{constructor(e=0,t=null,n){if(this.bindingLevel=e,this.parent=t,this.globals=n,this.map=new Map,this.referenceNameIndex=0,this.restoreViewVariable=null,void 0!==n)for(const e of n)this.set(0,e,$t(e))}static createRootScope(){return new sl}get(e){let t=this;for(;t;){let n=t.map.get(e);if(null!=n)return t!==this&&(n={retrievalLevel:n.retrievalLevel,lhs:n.lhs,declareLocalCallback:n.declareLocalCallback,declare:!1,priority:n.priority,localRef:n.localRef},this.map.set(e,n),this.maybeGenerateSharedContextVar(n),this.maybeRestoreView(n.retrievalLevel,n.localRef)),n.declareLocalCallback&&!n.declare&&(n.declare=!0),n.lhs;t=t.parent}return 0===this.bindingLevel?null:this.getComponentProperty(e)}set(e,t,n,s=0,r,i){if(this.map.has(t)){if(i)return this;Jt(`The name ${t} is already defined in scope to be ${this.map.get(t)}`)}return this.map.set(t,{retrievalLevel:e,lhs:n,declare:!1,declareLocalCallback:r,priority:s,localRef:i||!1}),this}getLocal(e){return this.get(e)}notifyImplicitReceiverUse(){0!==this.bindingLevel&&(this.map.get("$$shared_ctx$$0").declare=!0)}nestedScope(e,t){const n=new sl(e,this,t);return e>0&&n.generateSharedContextVar(0),n}getOrCreateSharedContextVar(e){const t="$$shared_ctx$$"+e;return this.map.has(t)||this.generateSharedContextVar(e),this.map.get(t).lhs}getSharedContextName(e){const t=this.map.get("$$shared_ctx$$"+e);return t&&t.declare?t.lhs:null}maybeGenerateSharedContextVar(e){if(1===e.priority&&e.retrievalLevel<this.bindingLevel){const t=this.map.get("$$shared_ctx$$"+e.retrievalLevel);t?t.declare=!0:this.generateSharedContextVar(e.retrievalLevel)}}generateSharedContextVar(e){const t=$t("ctx"+this.freshReferenceName());this.map.set("$$shared_ctx$$"+e,{retrievalLevel:e,lhs:t,declareLocalCallback:(e,n)=>[t.set(el(n)).toConstDecl()],declare:!1,priority:2,localRef:!1})}getComponentProperty(e){const t=this.map.get("$$shared_ctx$$0");return t.declare=!0,this.maybeRestoreView(0,!1),t.lhs.prop(e)}maybeRestoreView(e,t){this.isListenerScope()&&(e<this.bindingLevel||t)&&(this.parent.restoreViewVariable||(this.parent.restoreViewVariable=$t(this.parent.freshReferenceName())),this.restoreViewVariable=this.parent.restoreViewVariable)}restoreViewStatement(){return this.restoreViewVariable?[Jo(null,En.restoreView,[this.restoreViewVariable]).toStmt()]:[]}viewSnapshotStatements(){const e=Jo(null,En.getCurrentView,[]);return this.restoreViewVariable?[this.restoreViewVariable.set(e).toConstDecl()]:[]}isListenerScope(){return this.parent&&this.parent.bindingLevel===this.bindingLevel}variableDeclarations(){let e=0;return Array.from(this.map.values()).filter(e=>e.declare).sort((e,t)=>t.retrievalLevel-e.retrievalLevel||t.priority-e.priority).reduce((t,n)=>{const s=this.bindingLevel-n.retrievalLevel,r=n.declareLocalCallback(this,s-e);return e=s,t.concat(r)},[])}freshReferenceName(){let e=this;for(;e.parent;)e=e.parent;return"_r"+e.referenceNameIndex++}}function rl(e){switch(Ls(e)){case 1:return En.propertyInterpolate;case 3:return En.propertyInterpolate1;case 5:return En.propertyInterpolate2;case 7:return En.propertyInterpolate3;case 9:return En.propertyInterpolate4;case 11:return En.propertyInterpolate5;case 13:return En.propertyInterpolate6;case 15:return En.propertyInterpolate7;case 17:return En.propertyInterpolate8;default:return En.propertyInterpolateV}}const il=new fo;function al(e=Hs){return new Ta(new io(new Ha),e,il,null,[])}function ol(e,t){switch(e){case Pe.HTML:return Vt(En.sanitizeHtml);case Pe.SCRIPT:return Vt(En.sanitizeScript);case Pe.STYLE:return t?Vt(En.sanitizeStyle):null;case Pe.URL:return Vt(En.sanitizeUrl);case Pe.RESOURCE_URL:return Vt(En.sanitizeResourceUrl);default:return null}}function ll(e,t){const n=Ns(t.value);switch(il.securityContext(e,t.name,!0)){case Pe.HTML:return Vt(En.trustConstantHtml).callFn([n],t.valueSpan);case Pe.SCRIPT:return Vt(En.trustConstantScript).callFn([n],t.valueSpan);case Pe.RESOURCE_URL:return Vt(En.trustConstantResourceUrl).callFn([n],t.valueSpan);default:return n}}function cl(e){return e instanceof In||e instanceof Tn||e instanceof Dn}function ul(e){return e.every(cl)}function pl(){return Ut($t("ngI18nClosureMode")).notIdentical(Kt("undefined",qe)).and($t("ngI18nClosureMode"))}const hl=/attr\.([^\]]+)/;function dl(e,t,n){const s=new Os,r=Re(e.selector);return s.set("type",e.internalType),r.length>0&&s.set("selectors",Ns(r)),e.queries.length>0&&s.set("contentQueries",function(e,t,n){const s=[],r=[],i=bs(r,"_t");for(const n of e){s.push(Vt(n.static?En.staticContentQuery:En.contentQuery).callFn([$t("dirIndex"),...gl(n,t)]).toStmt());const e=i(),a=Vt(En.loadQuery).callFn([]),o=Vt(En.queryRefresh).callFn([e.set(a)]),l=$t("ctx").prop(n.propertyName).set(n.first?e.prop("first"):e);r.push(o.and(l).toStmt())}const a=n?n+"_ContentQueries":null;return Wt([new St("rf",Ue),new St("ctx",null),new St("dirIndex",null)],[Ko(1,s),Ko(2,r)],Ve,null,a)}(e.queries,t,e.name)),e.viewQueries.length&&s.set("viewQuery",function(e,t,n){const s=[],r=[],i=bs(r,"_t");e.forEach(e=>{const n=Vt(e.static?En.staticViewQuery:En.viewQuery).callFn(gl(e,t));s.push(n.toStmt());const a=i(),o=Vt(En.loadQuery).callFn([]),l=Vt(En.queryRefresh).callFn([a.set(o)]),c=$t("ctx").prop(e.propertyName).set(e.first?a.prop("first"):a);r.push(l.and(c).toStmt())});const a=n?n+"_Query":null;return Wt([new St("rf",Ue),new St("ctx",null)],[Ko(1,s),Ko(2,r)],Ve,null,a)}(e.viewQueries,t,e.name)),s.set("hostBindings",function(e,t,n,s,r,i,a){const o=$t("ctx"),l=new $a(o),{styleAttr:c,classAttr:u}=e.specialAttributes;void 0!==c&&l.registerStyleAttr(c),void 0!==u&&l.registerClassAttr(u);const p=[],h=[],d=t,m=Sl(e),g=n.createDirectiveHostEventAsts(m,d);if(g&&g.length){const e=function(e,t){const n=[],s=[],r=[];return e.forEach(e=>{let r=e.name&&vn(e.name);const i=1===e.type?bn(r,e.targetOrPhase):r,a=t&&r?`${t}_${i}_HostBindingHandler`:null,o=Xo(Pn.fromParsedEvent(e),a);1==e.type?s.push(o):n.push(o)}),s.length>0&&r.push(Ms(En.syntheticHostListener,s).toStmt()),n.length>0&&r.push(Ms(En.listener,n).toStmt()),r}(g,i);p.push(...e)}const f=n.createBoundHostProperties(m,d),v=[];let y,x=0;f&&f.forEach(e=>{l.registerInputBasedOnName(e.name,e.expression,d)?x+=2:(v.push(e),x++)});const S=()=>(y||(y=new Qo(s,()=>Jt("Unexpected node"),e=>{const t=x;return x+=e,t},()=>Jt("Unexpected pipe"))),y),E=[],_=[],C=[];v.forEach(e=>{const t=e.expression.visit(S()),s=xl(o,t),{bindingName:i,instruction:a,isAttribute:l}=function(e){let t,n=e.name;const s=n.match(hl);return s?(n=s[1],t=En.attribute):e.isAnimation?(n=wn(n),t=En.syntheticHostProperty):t=En.hostProperty,{bindingName:n,instruction:t,isAttribute:!!s}}(e),c=n.calcPossibleSecurityContexts(r,i,l).filter(e=>e!==Pe.NONE);let u=null;c.length&&(u=2===c.length&&c.indexOf(Pe.URL)>-1&&c.indexOf(Pe.RESOURCE_URL)>-1?Vt(En.sanitizeUrlOrResourceUrl):ol(c[0],l));const p=[Kt(i),s.currValExpr];u&&p.push(u),h.push(...s.stmts),a===En.hostProperty?E.push(p):a===En.attribute?_.push(p):a===En.syntheticHostProperty?C.push(p):h.push(Vt(a).callFn(p).toStmt())}),E.length>0&&h.push(Ms(En.hostProperty,E).toStmt()),_.length>0&&h.push(Ms(En.attribute,_).toStmt()),C.length>0&&h.push(Ms(En.syntheticHostProperty,C).toStmt());const w=function(e){const t=[];for(let n of Object.getOwnPropertyNames(e)){const s=e[n];t.push(Kt(n),s)}return t}(e.attributes);if(l.assignHostAttrs(w,a),l.hasBindings&&l.buildUpdateLevelInstructions(S()).forEach(e=>{if(e.calls.length>0){const t=[];e.calls.forEach(e=>{x+=Math.max(e.allocateBindingSlots-2,0),t.push(function(e,t,n){return e.params(e=>n(t,e).currValExpr)}(e,o,xl))}),h.push(Ms(e.reference,t).toStmt())}}),x&&a.set("hostVars",Kt(x)),p.length>0||h.length>0){const e=i?i+"_HostBindings":null,t=[];return p.length>0&&t.push(Ko(1,p)),h.length>0&&t.push(Ko(2,h)),Wt([new St("rf",Ue),new St("ctx",null)],t,Ve,null,e)}return null}(e.host,e.typeSourceSpan,n,t,e.selector||"",e.name,s)),s.set("inputs",As(e.inputs,!0)),s.set("outputs",As(e.outputs)),null!==e.exportAs&&s.set("exportAs",qt(e.exportAs.map(e=>Kt(e)))),s}function ml(e,t){const n=[],s=t.providers,r=t.viewProviders;if(s||r){const e=[s||new It([])];r&&e.push(r),n.push(Vt(En.ProvidersFeature).callFn(e))}t.usesInheritance&&n.push(Vt(En.InheritDefinitionFeature)),t.fullInheritance&&n.push(Vt(En.CopyDefinitionFeature)),t.lifecycle.usesOnChanges&&n.push(Vt(En.NgOnChangesFeature)),n.length&&e.set("features",qt(n))}function gl(e,t){const n=[ks(e,t),Kt(e.descendants)];return e.read&&n.push(e.read),n}function fl(e){return jt(Ht(Object.keys(e).map(t=>({key:t,value:Kt(Array.isArray(e[t])?e[t][0]:e[t]),quoted:!0}))))}function vl(e){return e.length>0?jt(qt(e.map(e=>Kt(e)))):He}function yl(e){const t=null!==e.selector?e.selector.replace(/\n/g,""):null;return[Cn(e.type.type,e.typeArgumentCount),null!==t?(n=t,jt(Kt(n))):He,null!==e.exportAs?vl(e.exportAs):He,fl(e.inputs),fl(e.outputs),vl(e.queries.map(e=>e.propertyName))];var n}function xl(e,t){return ai(null,e,t,"b",mr.Expression,()=>Jt("Unexpected interpolation"))}function Sl(e){return{hostAttributes:{},hostListeners:e.listeners,hostProperties:e.properties}}const El=/^(?:\[([^\]]+)\])|(?:\(([^\)]+)\))$/;class _l{get(e){return""}}const Cl=Object.keys({useClass:null})[0],wl=Object.keys({useFactory:null})[0],bl=Object.keys({useValue:null})[0],Il=Object.keys({useExisting:null})[0],Tl=function(e){const t=new Je(e);return{value:t,type:t}};function Nl(e){return Object.assign(Object.assign({},e),{predicate:Array.isArray(e.predicate)?e.predicate:new Je(e.predicate),read:e.read?new Je(e.read):null,static:e.static})}function Al(e){const t=Dl(e.inputs||[]),n=Dl(e.outputs||[]),s=e.propMetadata,r={},i={};for(const e in s)s.hasOwnProperty(e)&&s[e].forEach(t=>{"Input"===t.ngMetadataName?r[e]=t.bindingPropertyName?[t.bindingPropertyName,e]:e:Rl(t)&&(i[e]=t.bindingPropertyName||e)});return Object.assign(Object.assign({},e),{typeSourceSpan:e.typeSourceSpan,type:Tl(e.type),internalType:new Je(e.type),deps:Ol(e.deps),host:Ml(e.propMetadata,e.typeSourceSpan,e.host),inputs:Object.assign(Object.assign({},t),r),outputs:Object.assign(Object.assign({},n),i),queries:e.queries.map(Nl),providers:null!=e.providers?new Je(e.providers):null,viewQueries:e.viewQueries.map(Nl),fullInheritance:!1})}function Pl(e,t){return e.hasOwnProperty(t)?new Je(e[t]):void 0}function kl(e){let t;return t=null===e.token?new at(null):e.resolved===Fs.Attribute?new at(e.token):new Je(e.token),{token:t,attribute:null,resolved:e.resolved,host:e.host,optional:e.optional,self:e.self,skipSelf:e.skipSelf}}function Ol(e){return null==e?null:e.map(kl)}function Ml(e,t,n){const s=function(e){const t={},n={},s={},r={};for(const i of Object.keys(e)){const a=e[i],o=i.match(El);if(null===o)switch(i){case"class":if("string"!=typeof a)throw new Error("Class binding must be string");r.classAttr=a;break;case"style":if("string"!=typeof a)throw new Error("Style binding must be string");r.styleAttr=a;break;default:t[i]="string"==typeof a?Kt(a):a}else if(null!=o[1]){if("string"!=typeof a)throw new Error("Property binding must be string");s[o[1]]=a}else if(null!=o[2]){if("string"!=typeof a)throw new Error("Event binding must be string");n[o[2]]=a}}return{attributes:t,listeners:n,properties:s,specialAttributes:r}}(n||{}),r=function(e,t){const n=Sl(e),s=al();return s.createDirectiveHostEventAsts(n,t),s.createBoundHostProperties(n,t),s.errors}(s,t);if(r.length)throw new Error(r.map(e=>e.msg).join("\n"));for(const t in e)e.hasOwnProperty(t)&&e[t].forEach(e=>{"HostBinding"===e.ngMetadataName?s.properties[e.hostPropertyName||t]=t:Ll(e)&&(s.listeners[e.eventName||t]=`${t}(${(e.args||[]).join(",")})`)});return s}function Ll(e){return"HostListener"===e.ngMetadataName}function Rl(e){return"Output"===e.ngMetadataName}function Dl(e){return e.reduce((e,t)=>{const[n,s]=t.split(",").map(e=>e.trim());return e[n]=s||n,e},{})}var Fl,Bl,$l;new class{constructor(e){this.full=e;const t=e.split(".");this.major=t[0],this.minor=t[1],this.patch=t.slice(2).join(".")}}("11.0.0"),function(e){e[e.Extract=0]="Extract",e[e.Merge=1]="Merge"}(Fl||(Fl={})),function(e){e[e.OnInit=0]="OnInit",e[e.OnDestroy=1]="OnDestroy",e[e.DoCheck=2]="DoCheck",e[e.OnChanges=3]="OnChanges",e[e.AfterContentInit=4]="AfterContentInit",e[e.AfterContentChecked=5]="AfterContentChecked",e[e.AfterViewInit=6]="AfterViewInit",e[e.AfterViewChecked=7]="AfterViewChecked"}(Bl||(Bl={})),$t("_l"),$t("_l"),$t("_v"),$t("_ck"),$t("_co"),$t("en"),$t("ad"),function(e){e[e.Scheme=1]="Scheme",e[e.UserInfo=2]="UserInfo",e[e.Domain=3]="Domain",e[e.Port=4]="Port",e[e.Path=5]="Path",e[e.QueryData=6]="QueryData",e[e.Fragment=7]="Fragment"}($l||($l={})),(an.ng||(an.ng={})).ɵcompilerFacade=new class{constructor(e=new nr){this.jitEvaluator=e,this.R3ResolvedDependencyType=Fs,this.R3FactoryTarget=Ds,this.ResourceLoader=_l,this.elementSchemaRegistry=new fo}compilePipe(e,t,n){const s=function(e){const t=[];return t.push({key:"name",value:Kt(e.pipeName),quoted:!1}),t.push({key:"type",value:e.type.value,quoted:!1}),t.push({key:"pure",value:Kt(e.pure),quoted:!1}),{expression:Vt(En.definePipe).callFn([Ht(t)]),type:new Be(Vt(En.PipeDefWithMeta,[Cn(e.type.type,e.typeArgumentCount),new Be(new at(e.pipeName))]))}}({name:n.name,type:Tl(n.type),internalType:new Je(n.type),typeArgumentCount:n.typeArgumentCount,deps:Ol(n.deps),pipeName:n.pipeName,pure:n.pure});return this.jitExpression(s.expression,e,t,[])}compileInjectable(e,t,n){const{expression:s,statements:r}=function(e){let t=null;const n={name:e.name,type:e.type,internalType:e.internalType,typeArgumentCount:e.typeArgumentCount,deps:[],injectFn:fn.inject,target:Ds.Injectable};if(void 0!==e.useClass){const s=e.useClass.isEquivalent(e.internalType);let r=void 0;void 0!==e.userDeps&&(r=e.userDeps),t=void 0!==r?Bs(Object.assign(Object.assign({},n),{delegate:e.useClass,delegateDeps:r,delegateType:Rs.Class})):s?Bs(n):js(e.type.value,e.useClass)}else t=void 0!==e.useFactory?void 0!==e.userDeps?Bs(Object.assign(Object.assign({},n),{delegate:e.useFactory,delegateDeps:e.userDeps||[],delegateType:Rs.Function})):{statements:[],factory:Wt([],[new Ft(e.useFactory.callFn([]))])}:void 0!==e.useValue?Bs(Object.assign(Object.assign({},n),{expression:e.useValue})):void 0!==e.useExisting?Bs(Object.assign(Object.assign({},n),{expression:Vt(fn.inject).callFn([e.useExisting])})):js(e.type.value,e.internalType);const s={token:e.internalType,factory:t.factory};return null!==e.providedIn.value&&(s.providedIn=e.providedIn),{expression:Vt(fn.ɵɵdefineInjectable).callFn([_n(s)]),type:new Be(Vt(fn.InjectableDef,[Cn(e.type.type,e.typeArgumentCount)])),statements:t.statements}}({name:n.name,type:Tl(n.type),internalType:new Je(n.type),typeArgumentCount:n.typeArgumentCount,providedIn:(i=n.providedIn,null==i||"string"==typeof i?new at(i):new Je(i)),useClass:Pl(n,Cl),useFactory:Pl(n,wl),useValue:Pl(n,bl),useExisting:Pl(n,Il),userDeps:Ol(n.userDeps)||void 0});var i;return this.jitExpression(s,e,t,r)}compileInjector(e,t,n){const s=function(e){const t=Bs({name:e.name,type:e.type,internalType:e.internalType,typeArgumentCount:0,deps:e.deps,injectFn:En.inject,target:Ds.NgModule}),n={factory:t.factory};return null!==e.providers&&(n.providers=e.providers),e.imports.length>0&&(n.imports=qt(e.imports)),{expression:Vt(En.defineInjector).callFn([_n(n)]),type:new Be(Vt(En.InjectorDef,[new Be(e.type.type)])),statements:t.statements}}({name:n.name,type:Tl(n.type),internalType:new Je(n.type),deps:Ol(n.deps),providers:new Je(n.providers),imports:n.imports.map(e=>new Je(e))});return this.jitExpression(s.expression,e,t,s.statements)}compileNgModule(e,t,n){const s=function(e){const{internalType:t,type:n,bootstrap:s,declarations:r,imports:i,exports:a,schemas:o,containsForwardDecls:l,emitInline:c,id:u}=e,p=[],h={type:t};if(s.length&&(h.bootstrap=Sr(s,l)),c)r.length&&(h.declarations=Sr(r,l)),i.length&&(h.imports=Sr(i,l)),a.length&&(h.exports=Sr(a,l));else{const t=function(e){const{adjacentType:t,declarations:n,imports:s,exports:r,containsForwardDecls:i}=e,a={};if(n.length&&(a.declarations=Sr(n,i)),s.length&&(a.imports=Sr(s,i)),r.length&&(a.exports=Sr(r,i)),0===Object.keys(a).length)return null;const o=function(e){const t=new gt({name:"ngJitMode",moduleName:null}),n=new Ct(ze.Identical,new Ze(t),Kt("undefined")),s=new Ct(ze.Or,n,t,void 0,void 0,!0);return new Ct(ze.And,s,e)}(new rt(Vt(En.setNgModuleScope),[t,_n(a)])),l=new Et([],[o.toStmt()]);return new rt(l,[]).toStmt()}(e);null!==t&&p.push(t)}return o&&o.length&&(h.schemas=qt(o.map(e=>e.value))),u&&(h.id=u),{expression:Vt(En.defineNgModule).callFn([_n(h)]),type:new Be(Vt(En.NgModuleDefWithMeta,[new Be(n.type),xr(r),xr(i),xr(a)])),additionalStatements:p}}({type:Tl(n.type),internalType:new Je(n.type),adjacentType:new Je(n.type),bootstrap:n.bootstrap.map(Tl),declarations:n.declarations.map(Tl),imports:n.imports.map(Tl),exports:n.exports.map(Tl),emitInline:!0,containsForwardDecls:!1,schemas:n.schemas?n.schemas.map(Tl):null,id:n.id?new Je(n.id):null});return this.jitExpression(s.expression,e,t,[])}compileDirective(e,t,n){const s=new un,r=al(),i=function(e,t,n){const s=dl(e,t,n);ml(s,e);const r=Vt(En.defineDirective).callFn([s.toLiteralMap()]),i=yl(e);return{expression:r,type:jt(Vt(En.DirectiveDefWithMeta,i))}}(Al(n),s,r);return this.jitExpression(i.expression,e,t,s.statements)}compileComponent(e,t,n){const s=new un,r=n.interpolation?qs.fromArray(n.interpolation):Hs,i=function(e,t,n={}){const{interpolationConfig:s,preserveWhitespaces:r,enableI18nLegacyMessageIdFormat:i}=n,a=al(s),o=(new xa).parse(e,t,Object.assign(Object.assign({leadingTriviaChars:zo},n),{tokenizeExpansionForms:!0}));if(o.errors&&o.errors.length>0)return{interpolationConfig:s,preserveWhitespaces:r,template:e,errors:o.errors,nodes:[],styleUrls:[],styles:[],ngContentSelectors:[]};let l=o.rootNodes;const c=new Bo(s,!r,i);l=Qi(c,l),r||(l=Qi(new wa,l),c.hasI18nMeta&&(l=Qi(new Bo(s,!1),l)));const{nodes:u,errors:p,styleUrls:h,styles:d,ngContentSelectors:m}=function(e,t){const n=new yo(t);return{nodes:Qi(n,e),errors:t.errors.concat(n.errors),styleUrls:n.styleUrls,styles:n.styles,ngContentSelectors:n.ngContentSelectors}}(l,a);return{interpolationConfig:s,preserveWhitespaces:r,errors:p.length>0?p:null,template:e,nodes:u,styleUrls:h,styles:d,ngContentSelectors:m}}(n.template,t,{preserveWhitespaces:n.preserveWhitespaces,interpolationConfig:r});if(null!==i.errors){const e=i.errors.map(e=>e.toString()).join(", ");throw new Error(`Errors during JIT compilation of template for ${n.name}: ${e}`)}const a=function(e,t,n){const s=dl(e,t,n);ml(s,e);const r=e.selector&&we.parse(e.selector),i=r&&r[0];if(i){const e=i.getAttrs();e.length&&s.set("attrs",t.getConstLiteral(qt(e.map(e=>Kt(null!=e?e:void 0))),!0))}let a=null;if(e.directives.length>0){const t=new be;for(const{selector:n,expression:s}of e.directives)t.addSelectables(we.parse(n),s);a=t}const o=e.name,l=o?o+"_Template":null,c=new Set,u=new Set,p=e.changeDetection,h=e.template,d=new Go(t,sl.createRootScope(),0,o,null,null,l,a,c,e.pipes,u,En.namespaceHTML,e.relativeContextFilePath,e.i18nUseExternalIds),m=d.buildTemplateFunction(h.nodes,[]),g=d.getNgContentSelectors();g&&s.set("ngContentSelectors",g),s.set("decls",Kt(d.getConstCount())),s.set("vars",Kt(d.getVarCount()));const{constExpressions:f,prepareStatements:v}=d.getConsts();if(f.length>0){let e=qt(f);v.length>0&&(e=Wt([],[...v,new Ft(e)])),s.set("consts",e)}if(s.set("template",m),c.size){let t=qt(Array.from(c));e.wrapDirectivesAndPipesInClosure&&(t=Wt([],[new Ft(t)])),s.set("directives",t)}if(u.size){let t=qt(Array.from(u));e.wrapDirectivesAndPipesInClosure&&(t=Wt([],[new Ft(t)])),s.set("pipes",t)}if(null===e.encapsulation&&(e.encapsulation=Ne.Emulated),e.styles&&e.styles.length){const n=(e.encapsulation==Ne.Emulated?function(e,t,n){const s=new fi;return e.map(e=>s.shimCssText(e,"_ngcontent-%COMP%","_nghost-%COMP%"))}(e.styles):e.styles).map(e=>t.getConstLiteral(Kt(e)));s.set("styles",qt(n))}else e.encapsulation===Ne.Emulated&&(e.encapsulation=Ne.None);e.encapsulation!==Ne.Emulated&&s.set("encapsulation",Kt(e.encapsulation)),null!==e.animations&&s.set("data",Ht([{key:"animation",value:e.animations,quoted:!1}])),null!=p&&p!==Ae.Default&&s.set("changeDetection",Kt(p));const y=Vt(En.defineComponent).callFn([s.toLiteralMap()]),x=yl(e);return x.push(vl(e.template.ngContentSelectors)),{expression:y,type:jt(Vt(En.ComponentDefWithMeta,x))}}(Object.assign(Object.assign(Object.assign({},n),Al(n)),{selector:n.selector||this.elementSchemaRegistry.getDefaultComponentElementName(),template:i,wrapDirectivesAndPipesInClosure:!1,styles:[...n.styles,...i.styles],encapsulation:n.encapsulation,interpolation:r,changeDetection:n.changeDetection,animations:null!=n.animations?new Je(n.animations):null,viewProviders:null!=n.viewProviders?new Je(n.viewProviders):null,relativeContextFilePath:"",i18nUseExternalIds:!0}),s,al(r));return this.jitExpression(a.expression,e,`ng:///${n.name}.js`,s.statements)}compileFactory(e,t,n){const s=Bs({name:n.name,type:Tl(n.type),internalType:new Je(n.type),typeArgumentCount:n.typeArgumentCount,deps:Ol(n.deps),injectFn:"directiveInject"===n.injectFn?fn.directiveInject:fn.inject,target:n.target});return this.jitExpression(s.factory,e,t,s.statements)}createParseSourceSpan(e,t,n){return function(e,t,n){const s=new ur("",`in ${e} ${t} in ${n}`);return new pr(new cr(s,-1,-1,-1),new cr(s,-1,-1,-1))}(e,t,n)}jitExpression(e,t,n,s){const r=[...s,new Lt("$def",e,void 0,[kt.Exported])];return this.jitEvaluator.evaluateStatements(n,r,new vr(t),!0).$def}};const Vl="attribute",jl="element",Ul={[Vl]:"attrs",[jl]:jl},ql=(e,t,n)=>{n.report({node:e,messageId:"prefixFailure",data:{prefix:t}})},Hl=(e,t,n)=>{n.report({node:e,messageId:"styleFailure",data:{style:t}})},Wl=(e,t,n)=>{n.report({node:e,messageId:"typeFailure",data:{type:t}})},zl=(e,t,n)=>{const s=X(e),r=n,i=s.length>0&&s.every(e=>-1!==[jl,Vl].indexOf(e)),a=t.length>0,o=-1!==[u,p].indexOf(r);return i&&a&&o},Kl=(e,t,n,s)=>{const r=X(t||["attrs",jl]).reduce((e,t)=>e.concat(Ul[t]),[]),i=s===p?Q.kebabCase:Q.camelCase;let a=null;if(e&&b(e)?a=we.parse(e.raw):e&&I(e)&&e.quasis[0]&&(a=we.parse(e.quasis[0].value.raw)),!a)return null;const o=((e,t)=>e.reduce((e,n)=>{const s=t.reduce((e,t)=>{const s=n[t];return s?e.concat(s):e},[]);return e.concat(s)},[]))(a,r),l=o.some(e=>n.some(t=>Q.prefix(t,s)(e))),c=o.some(e=>i(e));return{hasExpectedPrefix:l,hasExpectedType:o.length>0,hasExpectedStyle:c}};var Xl=ee({name:"component-selector",meta:{type:"suggestion",docs:{description:"Component selectors should follow given naming rules. See more at https://angular.io/guide/styleguide#style-02-07, https://angular.io/guide/styleguide#style-05-02\n and https://angular.io/guide/styleguide#style-05-03.",category:"Best Practices",recommended:!1},schema:[{type:"object",properties:{type:{oneOf:[{type:"string"},{type:"array",items:{enum:[jl,Vl]}}]},prefix:{oneOf:[{type:"string"},{type:"array"}]},style:{type:"string",enum:[u,p]}},additionalProperties:!1}],messages:{prefixFailure:"The selector should be prefixed by one of the prefixes: '{{prefix}}' (https://angular.io/guide/styleguide#style-02-07)",styleFailure:"The selector should be {{style}} (https://angular.io/guide/styleguide#style-05-02)",typeFailure:"The selector should be used as an {{type}} (https://angular.io/guide/styleguide#style-05-03)"}},defaultOptions:[{type:"",prefix:"",style:""}],create(e,[t]){const{type:n,prefix:s,style:r}=t;return{[re](t){const i=W(t,"selector");if(!i)return;if(!zl(n,s,r))return;const a=Kl(i,n,X(s),r);null!==a&&(a.hasExpectedType?a.hasExpectedStyle?a.hasExpectedPrefix||ql(i,s,e):Hl(i,r,e):Wl(i,n,e))}}}}),Gl=ee({name:"contextual-lifecycle",meta:{type:"problem",docs:{description:"Ensures that lifecycle methods are used in a correct context",category:"Possible Errors",recommended:"error"},schema:[],messages:{contextuaLifecycle:"This lifecycle method is not called for {{decorator}}"}},defaultOptions:[],create(e){function t({parent:t},n){const s=t,r=f.get(n),i=z(s);for(const t of i){const s=K(t);j(s)&&!(null==r?void 0:r.has(s))&&e.report({node:t.key,messageId:"contextuaLifecycle",data:{decorator:n}})}}return{[re](e){t(e,s.Component)},[ie](e){t(e,s.Directive)},'ClassDeclaration > Decorator[expression.callee.name="Injectable"]'(e){t(e,s.Injectable)},'ClassDeclaration > Decorator[expression.callee.name="NgModule"]'(e){t(e,s.NgModule)},[ae](e){t(e,s.Pipe)}}}}),Ql=ee({name:"directive-class-suffix",meta:{type:"suggestion",docs:{description:'Classes decorated with @Directive must have suffix "Directive" (or custom) in their name. See more at https://angular.io/styleguide#style-02-03.',category:"Best Practices",recommended:"error"},schema:[{type:"object",properties:{suffixes:{type:"array",items:{type:"string"}}},additionalProperties:!1}],messages:{directiveClassSuffix:"The name of the class {{className}} should end with the suffix {{suffixes}} (https://angular.io/styleguide#style-02-03)"}},defaultOptions:[{suffixes:["Directive"]}],create(e,[t]){const{suffixes:n}=t;return{[ie](t){const s=t.parent,r=k(s);D(s).some(e=>e.endsWith("Validator"))&&n.push("Validator"),r&&n.some(e=>r.endsWith(e))||e.report({node:s.id?s.id:s,messageId:"directiveClassSuffix",data:{className:r,suffixes:n}})}}}}),Yl=ee({name:"directive-selector",meta:{type:"suggestion",docs:{description:"Directive selectors should follow given naming rules. See more at https://angular.io/guide/styleguide#style-02-06 and https://angular.io/guide/styleguide#style-02-08.",category:"Best Practices",recommended:!1},schema:[{type:"object",properties:{type:{oneOf:[{type:"string"},{type:"array",items:{enum:[jl,Vl]}}]},prefix:{oneOf:[{type:"string"},{type:"array"}]},style:{type:"string",enum:[u,p]}},additionalProperties:!1}],messages:{prefixFailure:"The selector should be prefixed by one of the prefixes: '{{prefix}}' (https://angular.io/guide/styleguide#style-02-08)",styleFailure:"The selector should be {{style}} (https://angular.io/guide/styleguide#style-02-06)",typeFailure:"The selector should be used as an {{type}} (https://angular.io/guide/styleguide#style-02-06)"}},defaultOptions:[{type:"",prefix:"",style:""}],create(e,[t]){const{type:n,prefix:s,style:r}=t;return{[ie](t){const i=W(t,"selector");if(!i)return;if(!zl(n,s,r))return;const a=Kl(i,n,X(s),r);null!==a&&(a.hasExpectedType?a.hasExpectedStyle?a.hasExpectedPrefix||ql(i,s,e):Hl(i,r,e):Wl(i,n,e))}}}}),Zl=ee({name:"no-attribute-decorator",meta:{type:"problem",docs:{description:`Disallows usage of @${o.Attribute} decorator.`,category:"Possible Errors",recommended:!1},schema:[],messages:{noAttributeDecorator:`@${o.Attribute} is considered bad practice. Use @Input instead`}},defaultOptions:[],create:t=>({MethodDefinition(n){n.value&&n.value.type===e.AST_NODE_TYPES.FunctionExpression&&function(e){return"constructor"===e.kind}(n)&&function(e){e.value.params.forEach(e=>{if(null!=e.decorators)for(const n of e.decorators)if(M(n)===o.Attribute){t.report({node:e,messageId:"noAttributeDecorator"});break}})}(n)}})});const Jl=[l.DoCheck,l.OnChanges],ec=[c.ngDoCheck,c.ngOnChanges];var tc=ee({name:"no-conflicting-lifecycle",meta:{type:"suggestion",docs:{description:"Ensures that directives not implement conflicting lifecycle interfaces.",category:"Best Practices",recommended:"error"},schema:[],messages:{noConflictingLifecycleInterface:`Implementing ${l.DoCheck} and ${l.OnChanges} in a class is not recommended`,noConflictingLifecycleMethod:`Declaring ${c.ngDoCheck} and ${c.ngOnChanges} method in a class is not recommended`}},defaultOptions:[],create:e=>({ClassDeclaration(t){(t=>{const n=F(t);if(!Jl.every(e=>n.includes(e)))return;const s=R(t).filter(e=>E(e.expression)&&V(e.expression.name));for(const t of s)e.report({node:t,messageId:"noConflictingLifecycleInterface"})})(t),(t=>{const n=(e=>z(e).map(K).filter(j))(t);if(!ec.every(e=>n.includes(e)))return;const s=z(t).filter(e=>E(e.key)&&j(e.key.name));for(const t of s)e.report({node:t,messageId:"noConflictingLifecycleMethod"})})(t)}})}),nc=ee({name:"no-forward-ref",meta:{type:"suggestion",docs:{description:"Disallows usage of `forwardRef` references for DI",category:"Best Practices",recommended:!1},schema:[],messages:{noForwardRef:"Avoid using `forwardRef`"}},defaultOptions:[],create:e=>({'CallExpression[callee.type="Identifier"][callee.name="forwardRef"]'(t){e.report({node:t,messageId:"noForwardRef"})}})}),sc=ee({name:"no-host-metadata-property",meta:{type:"suggestion",docs:{description:"Disallows usage of the `host` metadata property. See more at https://angular.io/styleguide#style-06-03.",category:"Best Practices",recommended:"error"},schema:[],messages:{noHostMetadataProperty:`Use @${o.HostBinding} or @${o.HostListener} rather than the \`host\` metadata property (https://angular.io/styleguide#style-06-03)`}},defaultOptions:[],create:e=>({[se](t){const n=W(t,"host");n&&e.report({node:n.parent,messageId:"noHostMetadataProperty"})}})}),rc=ee({name:"no-input-prefix",meta:{type:"suggestion",docs:{description:"Input names should not be prefixed by the configured disallowed prefixes.",category:"Best Practices",recommended:!1},schema:[{type:"object",properties:{prefixes:{type:"array",items:{type:"string"}}},additionalProperties:!1}],messages:{noInputPrefix:"@Inputs should not be prefixed by {{disallowedPrefixes}}"}},defaultOptions:[{prefixes:[]}],create:(e,[t])=>({':matches(ClassProperty, MethodDefinition[kind="set"]) > Decorator[expression.callee.name="Input"]'(n){if(!Y(n.expression.callee,"@angular/core"))return;const s=n.parent,r=q(s),i=t.prefixes;i.some(e=>e===r||new RegExp(`^${e}[^a-z]`).test(r))&&e.report({node:s,messageId:"noInputPrefix",data:{disallowedPrefixes:i.join(", ")}})}})});const ic=new Set(["aria-activedescendant","aria-atomic","aria-autocomplete","aria-busy","aria-checked","aria-controls","aria-current","aria-describedby","aria-disabled","aria-dragged","aria-dropeffect","aria-expanded","aria-flowto","aria-haspopup","aria-hidden","aria-invalid","aria-label","aria-labelledby","aria-level","aria-live","aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext"]);var ac=ee({name:"no-input-rename",meta:{type:"suggestion",docs:{description:"Disallows renaming directive inputs by providing a string to the decorator.",category:"Best Practices",recommended:"error"},schema:[],messages:{noInputRename:"In the class {{className}}, the directive input property {{propertyName}} should not be renamed"}},defaultOptions:[],create:e=>({':matches(ClassProperty, MethodDefinition[kind="set"]) > Decorator[expression.callee.name="Input"]'(t){const n=t.expression;if(!Y(n.callee,"@angular/core"))return;if(0===n.arguments.length)return;let r;const i=t.parent,a=i.parent.parent,o=a.decorators&&a.decorators.find(e=>S(e.expression)&&E(e.expression.callee)&&e.expression.callee.name===s.Directive);if(o){const e=W(o,"selector");e&&b(e)&&e.value&&(r=(e.value.toString()||"").replace(/[[\]\s]/g,"").split(","))}const l=n.arguments[0].value;l&&E(i.key)&&((e,t)=>{return!!(e!==t&&r&&r.some(n=>new RegExp(`^${n}((${t[0].toUpperCase()+t.slice(1)}$)|(?=$))`).test(e))||ic.has(e)&&t===(n=e,n.replace(/-[a-zA-Z]/g,e=>e[1].toUpperCase())));var n})(l.toString(),i.key.name)||e.report({node:i,messageId:"noInputRename",data:{className:a.id&&a.id.name,propertyName:i.key.name}})}})}),oc=ee({name:"no-inputs-metadata-property",meta:{type:"suggestion",docs:{description:"Disallows usage of the `inputs` metadata property. See more at https://angular.io/styleguide#style-05-12.",category:"Best Practices",recommended:"error"},schema:[],messages:{noInputsMetadataProperty:`Use @${o.Input} rather than the \`inputs\` metadata property (https://angular.io/styleguide#style-05-12)`}},defaultOptions:[],create:e=>({[se](t){const n=W(t,"inputs");n&&e.report({node:n.parent,messageId:"noInputsMetadataProperty"})}})}),lc=ee({name:"no-lifecycle-call",meta:{type:"suggestion",docs:{description:"Disallows explicit calls to lifecycle methods.",category:"Best Practices",recommended:!1},schema:[],messages:{noLifecycleCall:"Avoid explicit calls to lifecycle methods"}},defaultOptions:[],create:e=>({MemberExpression:({object:{type:t},parent:n,property:s})=>{const r="Super"===t;n&&E(s)&&j(s.name)&&!r&&e.report({node:n,messageId:"noLifecycleCall"})}})}),cc=ee({name:"no-output-native",meta:{type:"suggestion",docs:{description:"Disallows naming directive outputs as standard DOM event.",category:"Best Practices",recommended:"error"},schema:[],messages:{noOutputNative:"The output property should not be named or renamed as a native event"}},defaultOptions:[],create:e=>({'ClassProperty > Decorator[expression.callee.name="Output"]'(t){const n=t.parent;if(!k(t))return;const s=q(n),r=t.expression.arguments[0],i=r&&b(r)&&r.value||s;i&&(uc||(uc=new Set(["abort","afterprint","animationend","animationiteration","animationstart","appinstalled","audioprocess","audioend","audiostart","beforeprint","beforeunload","beginEvent","blocked","blur","boundary","cached","canplay","canplaythrough","change","chargingchange","chargingtimechange","checking","click","close","complete","compositionend","compositionstart","compositionupdate","contextmenu","copy","cut","dblclick","devicechange","devicelight","devicemotion","deviceorientation","deviceproximity","dischargingtimechange","DOMAttributeNameChanged","DOMAttrModified","DOMCharacterDataModified","DOMContentLoaded","DOMElementNameChanged","focus","focusin","focusout","DOMNodeInserted","DOMNodeInsertedIntoDocument","DOMNodeRemoved","DOMNodeRemovedFromDocument","DOMSubtreeModified","downloading","drag","dragend","dragenter","dragleave","dragover","dragstart","drop","durationchange","emptied","end","ended","endEvent","error","fullscreenchange","fullscreenerror","gamepadconnected","gamepaddisconnected","gotpointercapture","hashchange","lostpointercapture","input","invalid","keydown","keypress","keyup","languagechange","levelchange","load","loadeddata","loadedmetadata","loadend","loadstart","mark","message","messageerror","mousedown","mouseenter","mouseleave","mousemove","mouseout","mouseover","mouseup","nomatch","notificationclick","noupdate","obsolete","offline","online","open","orientationchange","pagehide","pageshow","paste","pause","pointercancel","pointerdown","pointerenter","pointerleave","pointerlockchange","pointerlockerror","pointermove","pointerout","pointerover","pointerup","play","playing","popstate","progress","push","pushsubscriptionchange","ratechange","readystatechange","repeatEvent","reset","resize","resourcetimingbufferfull","result","resume","scroll","seeked","seeking","select","selectstart","selectionchange","show","soundend","soundstart","speechend","speechstart","stalled","start","storage","submit","success","suspend","SVGAbort","SVGError","SVGLoad","SVGResize","SVGScroll","SVGUnload","SVGZoom","timeout","timeupdate","touchcancel","touchend","touchmove","touchstart","transitionend","unload","updateready","upgradeneeded","userproximity","voiceschanged","versionchange","visibilitychange","volumechange","waiting","wheel"]))).has(i.toString())&&e.report({node:n,messageId:"noOutputNative"})}})});let uc=null;var pc=ee({name:"no-output-on-prefix",meta:{type:"suggestion",docs:{description:"Name events without the prefix on. See more at https://angular.io/guide/styleguide#dont-prefix-output-properties.",category:"Best Practices",recommended:"error"},schema:[],messages:{noOutputOnPrefix:'In the class "{{className}}", the output property "{{memberName}}" should not be prefixed with on'}},defaultOptions:[],create:e=>({'ClassProperty > Decorator[expression.callee.name="Output"]'(t){const n=t.parent,s=k(t),r=q(n);r&&/^on((?![a-z])|(?=$))/.test(r)&&e.report({node:n,messageId:"noOutputOnPrefix",data:{className:s,memberName:r}})}})}),hc=ee({name:"no-output-rename",meta:{type:"suggestion",docs:{description:"Disallows renaming directive outputs by providing a string to the decorator.",category:"Best Practices",recommended:"error"},schema:[],messages:{noOutputRename:"@Outputs should not be renamed"}},defaultOptions:[],create:e=>({'ClassProperty > Decorator[expression.callee.name="Output"]'(t){const n=t.expression;if(!Y(n.callee,"@angular/core"))return;if(0===n.arguments.length)return;let r;const i=t.parent,a=i.parent.parent,o=a.decorators&&a.decorators.find(e=>S(e.expression)&&E(e.expression.callee)&&e.expression.callee.name===s.Directive);if(o){const e=W(o,"selector");e&&b(e)&&e.value&&(r=new Set((e.value.toString()||"").replace(/[[\]\s]/g,"").split(",")))}const l=n.arguments[0].value;l&&E(i.key)&&((e,t)=>!(!r||!r.has(e)||e===t))(l.toString(),i.key.name)||e.report({node:i,messageId:"noOutputRename"})}})}),dc=ee({name:"no-outputs-metadata-property",meta:{type:"suggestion",docs:{description:"Disallows usage of the `outputs` metadata property. See more at https://angular.io/styleguide#style-05-12.",category:"Best Practices",recommended:"error"},schema:[],messages:{noOutputsMetadataProperty:`Use @${o.Output} rather than the \`outputs\` metadata property (https://angular.io/styleguide#style-05-12)`}},defaultOptions:[],create:e=>({[se](t){const n=W(t,"outputs");n&&e.report({node:n.parent,messageId:"noOutputsMetadataProperty"})}})}),mc=ee({name:"no-pipe-impure",meta:{type:"suggestion",docs:{description:"Disallows the declaration of impure pipes.",category:"Best Practices",recommended:!1},schema:[],messages:{noPipeImpure:"Impure pipes should be avoided because they are invoked on each change-detection cycle."}},defaultOptions:[],create:e=>({[ae](t){const n=H(t,"pure");n&&b(n.value)&&!n.value.value&&e.report({node:n.value,messageId:"noPipeImpure"})}})}),gc=ee({name:"no-queries-metadata-property",meta:{type:"suggestion",docs:{description:"Disallows usage of the `queries` metadata property. See more at https://angular.io/styleguide#style-05-12.",category:"Best Practices",recommended:!1},schema:[],messages:{noQueriesMetadataProperty:`Use @${o.Output} rather than the \`queries\` metadata property (https://angular.io/styleguide#style-05-12)`}},defaultOptions:[],create:e=>({[se](t){const n=W(t,"queries");n&&e.report({node:n.parent,messageId:"noQueriesMetadataProperty"})}})}),fc=ee({name:"no-empty-lifecycle-method",meta:{type:"suggestion",docs:{description:"Disallows declaring empty lifecycle methods",category:"Best Practices",recommended:"error"},schema:[],messages:{noEmptyLifecycleMethod:"Lifecycle methods should not be empty"}},defaultOptions:[],create:e=>({[`MethodDefinition[key.name=${J([...$])}][value.body.body.length=0]`](t){O(t.parent.parent)&&e.report({node:t.key,messageId:"noEmptyLifecycleMethod"})}})});const vc="prefer-on-push-component-change-detection";var yc=ee({name:vc,meta:{type:"suggestion",docs:{description:"Enforces component's change detection to ChangeDetectionStrategy.OnPush.",category:"Best Practices",recommended:!1},schema:[],messages:{preferOnPushComponentChangeDetection:"The changeDetection value of a component should be set to ChangeDetectionStrategy.OnPush"}},defaultOptions:[],create:e=>({[re](t){const n=W(t,"changeDetection");n?E(n.property)&&"OnPush"===n.property.name||e.report({node:n,messageId:"preferOnPushComponentChangeDetection"}):e.report({node:t,messageId:"preferOnPushComponentChangeDetection"})}})}),xc=ee({name:"prefer-output-readonly",meta:{type:"suggestion",docs:{description:"Prefer to declare `@Output` as readonly since they are not supposed to be reassigned",category:"Best Practices",recommended:!1},schema:[],messages:{preferOutputReadonly:"Prefer to declare `@Output` as readonly since they are not supposed to be reassigned"}},defaultOptions:[],create:e=>({'ClassProperty[readonly=undefined] > Decorator[expression.callee.name="Output"]'({parent:t}){e.report({node:t.key,messageId:"preferOutputReadonly"})}})});const Sc=/^\.{1,2}\/[^./]/;var Ec=ee({name:"relative-url-prefix",meta:{type:"suggestion",docs:{description:"The ./ and ../ prefix is standard syntax for relative URLs; don't depend on Angular's current ability to do without that prefix. See more at https://angular.io/styleguide#style-05-04.",category:"Best Practices",recommended:!1},schema:[],messages:{relativeUrlPrefix:"The ./ and ../ prefix is standard syntax for relative URLs. (https://angular.io/styleguide#style-05-04)"}},defaultOptions:[],create:e=>({[re](t){const n=H(t,"templateUrl");n&&A(n.value)&&(Sc.test(n.value.value)||e.report({node:n.value,messageId:"relativeUrlPrefix"}));const s=H(t,"styleUrls");s&&s.value&&w(s.value)&&s.value.elements.length>0&&s.value.elements.forEach(t=>{A(t)&&!Sc.test(t.value)&&e.report({node:t,messageId:"relativeUrlPrefix"})})}})}),_c=ee({name:"use-component-selector",meta:{type:"suggestion",docs:{description:"Component selector must be declared",category:"Best Practices",recommended:!1},schema:[],messages:{useComponentSelector:"The selector of the component '{{className}}' is mandatory"}},defaultOptions:[],create:e=>({[re](t){const n=t.parent;if(!n||!n.id||!n.id.name)return;const s=W(t,"selector");s&&A(s)&&s.value.length||e.report({node:t,messageId:"useComponentSelector",data:{className:n.id.name}})}})}),Cc=ee({name:"use-component-view-encapsulation",meta:{type:"suggestion",docs:{description:"Disallows using ViewEncapsulation.None",category:"Best Practices",recommended:!1},schema:[],messages:{useComponentViewEncapsulation:"Using ViewEncapsulation.None makes your styles global, which may have an unintended effect"}},defaultOptions:[],create:e=>({[re](t){const n=W(t,"encapsulation");!n||_(n)&&E(n.property)&&"None"!==n.property.name||e.report({node:n,messageId:"useComponentViewEncapsulation"})}})}),wc=ee({name:"use-injectable-provided-in",meta:{type:"suggestion",docs:{description:`"Using the 'providedIn' property makes classes decorated with @${s.Injectable} tree shakeable`,category:"Best Practices",recommended:!1},schema:[],messages:{useInjectableProvidedIn:`Classes decorated with @${s.Injectable} should use the 'providedIn' property`}},defaultOptions:[],create:e=>({'ClassDeclaration > Decorator[expression.callee.name="Injectable"]'(t){W(t,"providedIn")||e.report({node:t,messageId:"useInjectableProvidedIn"})}})}),bc=ee({name:"use-lifecycle-interface",meta:{type:"suggestion",docs:{description:"Ensures that classes implement lifecycle interfaces corresponding to the declared lifecycle methods",category:"Best Practices",recommended:"warn"},schema:[],messages:{useLifecycleInterface:"Lifecycle interface '{{interfaceName}}' should be implemented for method '{{methodName}}'. (https://angular.io/styleguide#style-09-01)"}},defaultOptions:[],create:e=>({[`MethodDefinition[key.name=${J([...$])}]`]({key:t,parent:n}){const s=n.parent;if(!O(s))return;const r=F(s),i=t.name,a=(e=>e.slice(2))(i);r.includes(l[a])||e.report({node:t,messageId:"useLifecycleInterface",data:{interfaceName:a,methodName:i}})}})}),Ic=ee({name:"use-pipe-decorator",meta:{type:"suggestion",docs:{description:`Ensures that classes implementing PipeTransform interface use @${s.Pipe} decorator`,category:"Best Practices",recommended:!1},schema:[],messages:{usePipeDecorator:"Classes that implement the PipeTransform interface should be decorated with @"+s.Pipe}},defaultOptions:[],create:e=>({'ClassDeclaration > TSClassImplements:matches([expression.name="PipeTransform"], [expression.property.name="PipeTransform"])'(t){const n=t.parent;(e=>((e,t)=>{if(e.decorators)return e.decorators.find(e=>S(e.expression)&&e.expression.arguments&&e.expression.arguments.length>0&&"Pipe"===M(e))})(e))(n)||e.report({node:n,messageId:"usePipeDecorator"})}})}),Tc=ee({name:"use-pipe-transform-interface",meta:{type:"suggestion",docs:{description:"Ensures that Pipes implement `PipeTransform` interface",category:"Best Practices",recommended:"error"},fixable:"code",schema:[],messages:{usePipeTransformInterface:"Pipes should implement `PipeTransform` interface"}},defaultOptions:[],create:e=>({[ae]({parent:t}){if(D(t).find(e=>"PipeTransform"===e))return;const{errorNode:n,implementsNodeReplace:s,implementsTextReplace:r}=function(e){const t=e.id,[n,s,r]=e.implements?[t,Ac(e.implements),", PipeTransform"]:[t,t," implements PipeTransform"];return{errorNode:n,implementsNodeReplace:s,implementsTextReplace:r}}(t);e.report({node:n,messageId:"usePipeTransformInterface",fix:e=>[Nc(t,e),e.insertTextAfter(s,r)]})}})});function Nc(e,t){const n=function(e,t){let n=e;for(;n=n.parent;)if("Program"===n.type)return n.body.find(e=>T(e)&&"@angular/core"===e.source.value);return n}(e);if(!(null==n?void 0:n.specifiers.length))return t.insertTextAfterRange([0,0],"import { PipeTransform } from '@angular/core';\n");const s=Ac(n.specifiers);return t.insertTextAfter(s,", PipeTransform")}function Ac(e){return e.slice(-1)[0]}var Pc=ee({name:"pipe-prefix",meta:{type:"suggestion",docs:{description:"Enforce consistent prefix for pipes.",category:"Stylistic Issues",recommended:!1},schema:[{type:"object",properties:{prefixes:{type:"array",items:{type:"string"},minimum:1,uniqueItems:!0}},additionalProperties:!1}],messages:{pipePrefix:"@Pipe's name should be prefixed by {{prefixes}}"}},defaultOptions:[{prefixes:[]}],create:(e,[{prefixes:t}])=>({[ae](n){const s=W(n,"name");if(!s)return;if(!function(e){return Array.isArray(e)&&e.length>0}(t))return;const r=t.join("|"),i=Q.prefix(r,"camelCase");let a;A(s)?a=s.value:I(s)&&s.quasis[0]&&(a=s.quasis[0].value.raw),a&&(i.apply(this,[a])||e.report({node:s,messageId:"pipePrefix",data:{prefixes:Z(t)}}))}})});module.exports={configs:{all:{extends:"./configs/base.json",rules:{"@angular-eslint/component-class-suffix":"error","@angular-eslint/component-max-inline-declarations":"error","@angular-eslint/component-selector":"error","@angular-eslint/contextual-decorator":"error","@angular-eslint/contextual-lifecycle":"error","@angular-eslint/directive-class-suffix":"error","@angular-eslint/directive-selector":"error","@angular-eslint/no-attribute-decorator":"error","@angular-eslint/no-conflicting-lifecycle":"error","@angular-eslint/no-empty-lifecycle-method":"error","@angular-eslint/no-forward-ref":"error","@angular-eslint/no-host-metadata-property":"error","@angular-eslint/no-input-prefix":"error","@angular-eslint/no-input-rename":"error","@angular-eslint/no-inputs-metadata-property":"error","@angular-eslint/no-lifecycle-call":"error","@angular-eslint/no-output-native":"error","@angular-eslint/no-output-on-prefix":"error","@angular-eslint/no-output-rename":"error","@angular-eslint/no-outputs-metadata-property":"error","@angular-eslint/no-pipe-impure":"error","@angular-eslint/no-queries-metadata-property":"error","@angular-eslint/pipe-prefix":"error","@angular-eslint/prefer-on-push-component-change-detection":"error","@angular-eslint/prefer-output-readonly":"error","@angular-eslint/relative-url-prefix":"error","@angular-eslint/use-component-selector":"error","@angular-eslint/use-component-view-encapsulation":"error","@angular-eslint/use-injectable-provided-in":"error","@angular-eslint/use-lifecycle-interface":"error","@angular-eslint/use-pipe-decorator":"error","@angular-eslint/use-pipe-transform-interface":"error"}},base:{parser:"@typescript-eslint/parser",parserOptions:{ecmaVersion:2020,sourceType:"module",project:"./tsconfig.json"},plugins:["@typescript-eslint","@angular-eslint"]},recommended:{extends:"./configs/base.json",rules:{"no-restricted-imports":["error",{paths:[{name:"rxjs/Rx",message:"Please import directly from 'rxjs' instead"}]}],"@typescript-eslint/member-ordering":["error",{default:["static-field","instance-field","static-method","instance-method"]}],"no-restricted-syntax":["error",{selector:'CallExpression[callee.object.name="console"][callee.property.name=/^(debug|info|time|timeEnd|trace)$/]',message:"Unexpected property on console object was called"}],"@typescript-eslint/no-inferrable-types":["error",{ignoreParameters:!0}],"@typescript-eslint/no-non-null-assertion":"error","no-fallthrough":"error","@angular-eslint/component-class-suffix":"error","@angular-eslint/contextual-lifecycle":"error","@angular-eslint/directive-class-suffix":"error","@angular-eslint/no-conflicting-lifecycle":"error","@angular-eslint/no-empty-lifecycle-method":"error","@angular-eslint/no-host-metadata-property":"error","@angular-eslint/no-input-rename":"error","@angular-eslint/no-inputs-metadata-property":"error","@angular-eslint/no-output-native":"error","@angular-eslint/no-output-on-prefix":"error","@angular-eslint/no-output-rename":"error","@angular-eslint/no-outputs-metadata-property":"error","@angular-eslint/use-lifecycle-interface":"warn","@angular-eslint/use-pipe-transform-interface":"error"}},"ng-cli-compat":{extends:["./configs/base.json"],env:{browser:!0,es6:!0,node:!0},plugins:["eslint-plugin-import","eslint-plugin-jsdoc","eslint-plugin-prefer-arrow"],rules:{"@typescript-eslint/interface-name-prefix":"off","@typescript-eslint/explicit-member-accessibility":"off","sort-keys":"off","@angular-eslint/component-class-suffix":"error","@angular-eslint/component-selector":["error",{type:"element",prefix:"app",style:"kebab-case"}],"@angular-eslint/contextual-lifecycle":"error","@angular-eslint/directive-class-suffix":"error","@angular-eslint/directive-selector":["error",{type:"attribute",prefix:"app",style:"camelCase"}],"@angular-eslint/no-conflicting-lifecycle":"error","@angular-eslint/no-host-metadata-property":"error","@angular-eslint/no-input-rename":"error","@angular-eslint/no-inputs-metadata-property":"error","@angular-eslint/no-output-native":"error","@angular-eslint/no-output-on-prefix":"error","@angular-eslint/no-output-rename":"error","@angular-eslint/no-outputs-metadata-property":"error","@angular-eslint/use-lifecycle-interface":"error","@angular-eslint/use-pipe-transform-interface":"error","@typescript-eslint/adjacent-overload-signatures":"error","@typescript-eslint/array-type":"off","@typescript-eslint/ban-types":["error",{types:{Object:{message:"Avoid using the `Object` type. Did you mean `object`?"},Function:{message:"Avoid using the `Function` type. Prefer a specific function type, like `() => void`."},Boolean:{message:"Avoid using the `Boolean` type. Did you mean `boolean`?"},Number:{message:"Avoid using the `Number` type. Did you mean `number`?"},String:{message:"Avoid using the `String` type. Did you mean `string`?"},Symbol:{message:"Avoid using the `Symbol` type. Did you mean `symbol`?"}}}],"@typescript-eslint/consistent-type-assertions":"error","@typescript-eslint/dot-notation":"error","@typescript-eslint/member-ordering":"error","@typescript-eslint/naming-convention":"error","@typescript-eslint/no-empty-function":"off","@typescript-eslint/no-empty-interface":"error","@typescript-eslint/no-explicit-any":"off","@typescript-eslint/no-inferrable-types":["error",{ignoreParameters:!0}],"@typescript-eslint/no-misused-new":"error","@typescript-eslint/no-namespace":"error","@typescript-eslint/no-non-null-assertion":"error","@typescript-eslint/no-parameter-properties":"off","@typescript-eslint/no-unused-expressions":"error","@typescript-eslint/no-use-before-define":"off","@typescript-eslint/no-var-requires":"off","@typescript-eslint/prefer-for-of":"error","@typescript-eslint/prefer-function-type":"error","@typescript-eslint/prefer-namespace-keyword":"error","@typescript-eslint/triple-slash-reference":["error",{path:"always",types:"prefer-import",lib:"always"}],"@typescript-eslint/unified-signatures":"error",complexity:"off","constructor-super":"error",eqeqeq:["error","smart"],"guard-for-in":"error","id-blacklist":["error","any","Number","number","String","string","Boolean","boolean","Undefined","undefined"],"id-match":"error","import/no-deprecated":"warn","jsdoc/newline-after-description":"error","jsdoc/no-types":"error","max-classes-per-file":"off","no-bitwise":"error","no-caller":"error","no-cond-assign":"error","no-console":["error",{allow:["log","warn","dir","timeLog","assert","clear","count","countReset","group","groupEnd","table","dirxml","error","groupCollapsed","Console","profile","profileEnd","timeStamp","context"]}],"no-debugger":"error","no-empty":"off","no-eval":"error","no-fallthrough":"error","no-invalid-this":"off","no-new-wrappers":"error","no-restricted-imports":["error",{name:"rxjs/Rx",message:"Please import directly from 'rxjs' instead"}],"no-shadow":["error",{hoist:"all"}],"no-throw-literal":"error","no-undef-init":"error","no-underscore-dangle":"error","no-unsafe-finally":"error","no-unused-labels":"error","no-var":"error","object-shorthand":"error","one-var":["error","never"],"prefer-arrow/prefer-arrow-functions":"error","prefer-const":"error",radix:"error","use-isnan":"error","valid-typeof":"off"}},"ng-cli-compat--formatting-add-on":{plugins:["eslint-plugin-jsdoc"],rules:{"arrow-body-style":"error","arrow-parens":"off","comma-dangle":"off",curly:"error","eol-last":"error","jsdoc/check-alignment":"error","max-len":["error",{code:140}],"new-parens":"error","no-multiple-empty-lines":"off","no-trailing-spaces":"error","quote-props":["error","as-needed"],"space-before-function-paren":["error",{anonymous:"never",asyncArrow:"always",named:"never"}],"@typescript-eslint/member-delimiter-style":["error",{multiline:{delimiter:"semi",requireLast:!0},singleline:{delimiter:"semi",requireLast:!1}}],quotes:"off","@typescript-eslint/quotes":["error","single",{allowTemplateLiterals:!0}],"@typescript-eslint/semi":["error","always"],"@typescript-eslint/type-annotation-spacing":"error"}}},rules:{"contextual-decorator":te,"component-class-suffix":oe,"component-max-inline-declarations":he,"component-selector":Xl,"contextual-lifecycle":Gl,"directive-class-suffix":Ql,"directive-selector":Yl,"no-attribute-decorator":Zl,"no-conflicting-lifecycle":tc,"no-forward-ref":nc,"no-host-metadata-property":sc,"no-input-prefix":rc,"no-input-rename":ac,"no-inputs-metadata-property":oc,"no-lifecycle-call":lc,"no-output-native":cc,"no-output-on-prefix":pc,"no-output-rename":hc,"no-outputs-metadata-property":dc,"no-pipe-impure":mc,"no-queries-metadata-property":gc,"no-empty-lifecycle-method":fc,[vc]:yc,"prefer-output-readonly":xc,"relative-url-prefix":Ec,"use-component-selector":_c,"use-component-view-encapsulation":Cc,"use-injectable-provided-in":wc,"use-lifecycle-interface":bc,"use-pipe-decorator":Ic,"use-pipe-transform-interface":Tc,"pipe-prefix":Pc}};
|
|
1
|
+
var e=require("@typescript-eslint/experimental-utils");function t(){return(t=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(e[s]=n[s])}return e}).apply(this,arguments)}const n=Object.keys;var s,r,i,a;!function(e){e.Component="Component",e.Directive="Directive",e.Injectable="Injectable",e.NgModule="NgModule",e.Pipe="Pipe"}(s||(s={})),function(e){e.Attribute="Attribute",e.Host="Host",e.Inject="Inject",e.Optional="Optional",e.Self="Self",e.SkipSelf="SkipSelf"}(r||(r={})),function(e){e.HostListener="HostListener"}(i||(i={})),function(e){e.ContentChild="ContentChild",e.ContentChildren="ContentChildren",e.HostBinding="HostBinding",e.Input="Input",e.Output="Output",e.ViewChild="ViewChild",e.ViewChildren="ViewChildren"}(a||(a={}));const o=t({},r,i,a);var l,c;!function(e){e.AfterContentChecked="AfterContentChecked",e.AfterContentInit="AfterContentInit",e.AfterViewChecked="AfterViewChecked",e.AfterViewInit="AfterViewInit",e.DoBootstrap="DoBootstrap",e.DoCheck="DoCheck",e.OnChanges="OnChanges",e.OnDestroy="OnDestroy",e.OnInit="OnInit"}(l||(l={})),function(e){e.ngAfterContentChecked="ngAfterContentChecked",e.ngAfterContentInit="ngAfterContentInit",e.ngAfterViewChecked="ngAfterViewChecked",e.ngAfterViewInit="ngAfterViewInit",e.ngDoBootstrap="ngDoBootstrap",e.ngDoCheck="ngDoCheck",e.ngOnChanges="ngOnChanges",e.ngOnDestroy="ngOnDestroy",e.ngOnInit="ngOnInit"}(c||(c={}));const u="camelCase",p="kebab-case",h=n(s),d=n(o),m=n(l),g=n(c),f=new Map([[s.Component,new Set([c.ngAfterContentChecked,c.ngAfterContentInit,c.ngAfterViewChecked,c.ngAfterViewInit,c.ngOnChanges,c.ngOnDestroy,c.ngOnInit,c.ngDoCheck])],[s.Directive,new Set([c.ngAfterContentChecked,c.ngAfterContentInit,c.ngAfterViewChecked,c.ngAfterViewInit,c.ngOnChanges,c.ngOnDestroy,c.ngOnInit,c.ngDoCheck])],[s.Injectable,new Set([c.ngOnDestroy])],[s.NgModule,new Set([c.ngDoBootstrap])],[s.Pipe,new Set([c.ngOnDestroy])]]),v=new Set(d),y=new Set(h),x=new Map([[s.Component,v],[s.Directive,v],[s.Injectable,new Set([o.Host,o.Inject,o.Optional,o.Self,o.SkipSelf])],[s.NgModule,new Set([o.Host,o.Inject,o.Optional,o.Self,o.SkipSelf])],[s.Pipe,new Set([o.Host,o.Inject,o.Optional,o.Self,o.SkipSelf])]]);function S(e){return"CallExpression"===e.type}function E(e){return"Identifier"===e.type}function _(e){return"MemberExpression"===e.type}function C(e){return"ClassDeclaration"===e.type}function w(e){return"ObjectExpression"===e.type}function b(e){return"ArrayExpression"===e.type}function I(e){return"Literal"===e.type}function T(e){return"TemplateLiteral"===e.type}function N(e){return"ImportDeclaration"===e.type}function A(e){return"ImportSpecifier"===e.type}function P(e){return"Literal"===e.type&&"string"==typeof e.value}function k(e){return"MethodDefinition"===e.type}function O({parent:e},t){for(;e&&"Program"!==e.type;){if(t(e))return e;e=e.parent}return null}const M=e=>C(e)?e.id?e.id.name:void 0:e.parent?M(e.parent):void 0,L=({decorators:e})=>null==e?void 0:e.map(R).filter(Y).find(H),R=e=>{const{expression:t}=e;return E(t)?t.name:S(t)&&E(t.callee)?t.callee.name:void 0},D=e=>{const{expression:t}=e;return _(t)?t.property.name:t.name},F=e=>e.implements||[],B=e=>F(e).map(D),$=e=>B(e).filter(U),V=new Set(m),j=new Set(g),U=e=>V.has(e),q=e=>j.has(e),H=e=>y.has(e);function W(e){if("Identifier"===e.key.type)return e.key.name;if("Literal"===e.key.type)return e.key.raw;throw new Error('Unexpected "ClassProperty.key.type" provided: '+e.key.type)}const z=(e,t)=>{const n=(e=>{const{expression:t}=e;if(!S(t)||!t.arguments||0===t.arguments.length)return;const n=t.arguments[0];return w(n)&&n.properties?n:void 0})(e);if(!n||!w(n))return;const s=n.properties.find(e=>e.key&&E(e.key)&&e.key.name===t);return s&&"Property"===s.type?s:void 0},K=(e,t)=>{const n=z(e,t);if(n)return n.value},X=e=>e.body.body.filter(k),G=e=>I(e.key)?e.key.value:e.key.name;function Q(e){return Array.isArray(e)?e:null!=e?[e]:[]}const Y=e=>null!=e,Z={attribute:e=>0!==e.length,camelCase:e=>/^[a-zA-Z0-9[\]]+$/.test(e),element:e=>null!==e,kebabCase:e=>/^[a-z0-9-]+-[a-z0-9-]+$/.test(e),prefix(e,t){const n=new RegExp(`^\\[?(${e})`);return s=>{if(!e)return!0;if(!n.test(s))return!1;const r=s.replace(n,"");if(t===u)return!r||r[0]===r[0].toUpperCase();if(t===p)return!r||"-"===r[0];throw Error("Invalid selector style!")}}};function J(e,t){let n=e;for(;n=n.parent;)if("Program"===n.type)return n.body.some(n=>N(n)&&n.source.value===t&&n.specifiers.some(t=>A(t)&&t.imported.name===e.name&&t.local.name===e.name));return!1}const ee=e=>{const t=e.length;return 1===t?`"${e[0]}"`:`${e.map(e=>`"${e}"`).slice(0,t-1).join(", ")} or "${[...e].pop()}"`},te=e=>RegExp(`^(${e.join("|")})$`),ne=e.ESLintUtils.RuleCreator(()=>"");var se=ne({name:"contextual-decorator",meta:{type:"suggestion",docs:{description:"Ensures that classes use contextual decorators in its body.",category:"Best Practices",recommended:!1},schema:[],messages:{contextualDecorator:'Decorator out of context for "@{{classDecoratorName}}()"'}},defaultOptions:[],create:e=>({"MethodDefinition[kind=/^(get|set|method)$/], ClassProperty, TSParameterProperty"(t){!function(e,t){var n;if(!(null==(n=t.decorators)?void 0:n.length))return;const s=function(e){for(;e.parent;){if("ClassDeclaration"===e.type)return e;e=e.parent}return null}(t);if(!s)return;const r=L(s);if(r)for(const n of t.decorators)re(e,n,r)}(e,t)}})});function re(e,t,n){const s=R(t);if(!s||!v.has(s))return;const r=x.get(n);r&&!r.has(s)&&e.report({node:t,messageId:"contextualDecorator",data:{classDecoratorName:n}})}const ie='ClassDeclaration > Decorator:matches([expression.callee.name="Component"], [expression.callee.name="Directive"])',ae='ClassDeclaration > Decorator[expression.callee.name="Component"]',oe='ClassDeclaration > Decorator[expression.callee.name="Directive"]',le='ClassDeclaration > Decorator[expression.callee.name="Pipe"]';var ce=ne({name:"component-class-suffix",meta:{type:"suggestion",docs:{description:'Classes decorated with @Component must have suffix "Component" (or custom) in their name. See more at https://angular.io/styleguide#style-02-03.',category:"Best Practices",recommended:"error"},schema:[{type:"object",properties:{suffixes:{type:"array",items:{type:"string"}}},additionalProperties:!1}],messages:{componentClassSuffix:"The name of the class {{className}} should end with the suffix {{suffixes}} (https://angular.io/styleguide#style-02-03)"}},defaultOptions:[{suffixes:["Component"]}],create(e,[t]){const{suffixes:n}=t;return{[ae](t){const s=t.parent,r=M(s);r&&n.some(e=>r.endsWith(e))||e.report({node:s.id?s.id:s,messageId:"componentClassSuffix",data:{className:r,suffixes:n}})}}}});const ue=/\r\n|\r|\n/;function pe(e){return T(e)?e.quasis[0].value.raw.trim().split(ue).length:I(e)?e.raw.trim().split(ue).length:0}var he,de=ne({name:"component-max-inline-declarations",meta:{type:"suggestion",docs:{description:"Enforces a maximum number of lines in inline template, styles and animations",category:"Best Practices",recommended:!1},schema:[{type:"object",properties:{template:{type:"number"},styles:{type:"number"},animations:{type:"number"}},additionalProperties:!1}],messages:{componentMaxInlineDeclarations:"`{{propertyType}}` has too many lines ({{lineCount}}). Maximum allowed is {{max}} (https://angular.io/guide/styleguide#style-05-04)"}},defaultOptions:[{template:3,styles:3,animations:15}],create:(e,[{template:t=-1,styles:n=-1,animations:s=-1}])=>(t=t>-1?t:3,n=n>-1?n:3,s=s>-1?s:15,{[ae+" Property[key.name='template']"]({value:n}){const s=pe(n);s<=t||e.report({node:n,messageId:"componentMaxInlineDeclarations",data:{lineCount:s,max:t,propertyType:"template"}})},[ae+" Property[key.name='styles']"]({value:t}){if(!b(t))return;const s=t.elements.reduce((e,t)=>e+pe(t),0);s<=n||e.report({node:t,messageId:"componentMaxInlineDeclarations",data:{lineCount:s,max:n,propertyType:"styles"}})},[ae+" Property[key.name='animations']"]({value:t}){if(!b(t)||0===t.elements.length)return;const n=Math.max(t.loc.end.line-t.loc.start.line-2,1);n<=s||e.report({node:t,messageId:"componentMaxInlineDeclarations",data:{lineCount:n,max:s,propertyType:"animations"}})}})});function me(e){if(":"!=e[0])return[null,e];const 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 ge(e){return"ng-container"===me(e)[1]}function fe(e){return"ng-content"===me(e)[1]}function ve(e){return null===e?null:me(e)[0]}function ye(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"}(he||(he={}));const xe={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:""};class Se{constructor({closedByChildren:e,implicitNamespacePrefix:t,contentType:n=he.PARSABLE_DATA,closedByParent:s=!1,isVoid:r=!1,ignoreFirstLf:i=!1,preventNamespaceInheritance:a=!1}={}){this.closedByChildren={},this.closedByParent=!1,this.canSelfClose=!1,e&&e.length>0&&e.forEach(e=>this.closedByChildren[e]=!0),this.isVoid=r,this.closedByParent=s||r,this.implicitNamespacePrefix=t||null,this.contentType=n,this.ignoreFirstLf=i,this.preventNamespaceInheritance=a}isClosedByChild(e){return this.isVoid||e.toLowerCase()in this.closedByChildren}}let Ee,_e;function Ce(e){var t,n;return _e||(Ee=new Se,_e={base:new Se({isVoid:!0}),meta:new Se({isVoid:!0}),area:new Se({isVoid:!0}),embed:new Se({isVoid:!0}),link:new Se({isVoid:!0}),img:new Se({isVoid:!0}),input:new Se({isVoid:!0}),param:new Se({isVoid:!0}),hr:new Se({isVoid:!0}),br:new Se({isVoid:!0}),source:new Se({isVoid:!0}),track:new Se({isVoid:!0}),wbr:new Se({isVoid:!0}),p:new Se({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 Se({closedByChildren:["tbody","tfoot"]}),tbody:new Se({closedByChildren:["tbody","tfoot"],closedByParent:!0}),tfoot:new Se({closedByChildren:["tbody"],closedByParent:!0}),tr:new Se({closedByChildren:["tr"],closedByParent:!0}),td:new Se({closedByChildren:["td","th"],closedByParent:!0}),th:new Se({closedByChildren:["td","th"],closedByParent:!0}),col:new Se({isVoid:!0}),svg:new Se({implicitNamespacePrefix:"svg"}),foreignObject:new Se({implicitNamespacePrefix:"svg",preventNamespaceInheritance:!0}),math:new Se({implicitNamespacePrefix:"math"}),li:new Se({closedByChildren:["li"],closedByParent:!0}),dt:new Se({closedByChildren:["dt","dd"]}),dd:new Se({closedByChildren:["dt","dd"],closedByParent:!0}),rb:new Se({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),rt:new Se({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),rtc:new Se({closedByChildren:["rb","rtc","rp"],closedByParent:!0}),rp:new Se({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),optgroup:new Se({closedByChildren:["optgroup"],closedByParent:!0}),option:new Se({closedByChildren:["option","optgroup"],closedByParent:!0}),pre:new Se({ignoreFirstLf:!0}),listing:new Se({ignoreFirstLf:!0}),style:new Se({contentType:he.RAW_TEXT}),script:new Se({contentType:he.RAW_TEXT}),title:new Se({contentType:he.ESCAPABLE_RAW_TEXT}),textarea:new Se({contentType:he.ESCAPABLE_RAW_TEXT,ignoreFirstLf:!0})}),null!==(n=null!==(t=_e[e])&&void 0!==t?t:_e[e.toLowerCase()])&&void 0!==n?n:Ee}const we=new RegExp("(\\:not\\()|(([\\.\\#]?)[-\\w]+)|(?:\\[([-.\\w*]+)(?:=([\"']?)([^\\]\"']*)\\5)?\\])|(\\))|(\\s*,\\s*)","g");class be{constructor(){this.element=null,this.classNames=[],this.attrs=[],this.notSelectors=[]}static parse(e){const t=[],n=(e,t)=>{t.notSelectors.length>0&&!t.element&&0==t.classNames.length&&0==t.attrs.length&&(t.element="*"),e.push(t)};let s,r=new be,i=r,a=!1;for(we.lastIndex=0;s=we.exec(e);){if(s[1]){if(a)throw new Error("Nesting :not in a selector is not allowed");a=!0,i=new be,r.notSelectors.push(i)}const e=s[2];if(e){const t=s[3];"#"===t?i.addAttribute("id",e.substr(1)):"."===t?i.addClassName(e.substr(1)):i.setElement(e)}const o=s[4];if(o&&i.addAttribute(o,s[6]),s[7]&&(a=!1,i=r),s[8]){if(a)throw new Error("Multiple selectors in :not are not supported");n(t,r),r=i=new be}}return n(t,r),t}isElementSelector(){return this.hasElementSelector()&&0==this.classNames.length&&0==this.attrs.length&&0===this.notSelectors.length}hasElementSelector(){return!!this.element}setElement(e=null){this.element=e}getMatchingElementTemplate(){const e=this.element||"div",t=this.classNames.length>0?` class="${this.classNames.join(" ")}"`:"";let n="";for(let e=0;e<this.attrs.length;e+=2)n+=` ${this.attrs[e]}${""!==this.attrs[e+1]?`="${this.attrs[e+1]}"`:""}`;return Ce(e).isVoid?`<${e}${t}${n}/>`:`<${e}${t}${n}></${e}>`}getAttrs(){const e=[];return this.classNames.length>0&&e.push("class",this.classNames.join(" ")),e.concat(this.attrs)}addAttribute(e,t=""){this.attrs.push(e,t&&t.toLowerCase()||"")}addClassName(e){this.classNames.push(e.toLowerCase())}toString(){let e=this.element||"";if(this.classNames&&this.classNames.forEach(t=>e+="."+t),this.attrs)for(let t=0;t<this.attrs.length;t+=2){const n=this.attrs[t+1];e+=`[${this.attrs[t]}${n?"="+n:""}]`}return this.notSelectors.forEach(t=>e+=`:not(${t})`),e}}class Ie{constructor(){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=[]}static createNotMatcher(e){const t=new Ie;return t.addSelectables(e,null),t}addSelectables(e,t){let n=null;e.length>1&&(n=new Te(e),this._listContexts.push(n));for(let s=0;s<e.length;s++)this._addSelectable(e[s],t,n)}_addSelectable(e,t,n){let s=this;const r=e.element,i=e.classNames,a=e.attrs,o=new Ne(e,t,n);if(r&&(0===a.length&&0===i.length?this._addTerminal(s._elementMap,r,o):s=this._addPartial(s._elementPartialMap,r)),i)for(let e=0;e<i.length;e++){const t=i[e];0===a.length&&e===i.length-1?this._addTerminal(s._classMap,t,o):s=this._addPartial(s._classPartialMap,t)}if(a)for(let e=0;e<a.length;e+=2){const t=a[e],n=a[e+1];if(e===a.length-2){const e=s._attrValueMap;let r=e.get(t);r||(r=new Map,e.set(t,r)),this._addTerminal(r,n,o)}else{const e=s._attrValuePartialMap;let r=e.get(t);r||(r=new Map,e.set(t,r)),s=this._addPartial(r,n)}}}_addTerminal(e,t,n){let s=e.get(t);s||(s=[],e.set(t,s)),s.push(n)}_addPartial(e,t){let n=e.get(t);return n||(n=new Ie,e.set(t,n)),n}match(e,t){let n=!1;const s=e.element,r=e.classNames,i=e.attrs;for(let e=0;e<this._listContexts.length;e++)this._listContexts[e].alreadyMatched=!1;if(n=this._matchTerminal(this._elementMap,s,e,t)||n,n=this._matchPartial(this._elementPartialMap,s,e,t)||n,r)for(let s=0;s<r.length;s++){const i=r[s];n=this._matchTerminal(this._classMap,i,e,t)||n,n=this._matchPartial(this._classPartialMap,i,e,t)||n}if(i)for(let s=0;s<i.length;s+=2){const r=i[s],a=i[s+1],o=this._attrValueMap.get(r);a&&(n=this._matchTerminal(o,"",e,t)||n),n=this._matchTerminal(o,a,e,t)||n;const l=this._attrValuePartialMap.get(r);a&&(n=this._matchPartial(l,"",e,t)||n),n=this._matchPartial(l,a,e,t)||n}return n}_matchTerminal(e,t,n,s){if(!e||"string"!=typeof t)return!1;let r=e.get(t)||[];const i=e.get("*");if(i&&(r=r.concat(i)),0===r.length)return!1;let a,o=!1;for(let e=0;e<r.length;e++)a=r[e],o=a.finalize(n,s)||o;return o}_matchPartial(e,t,n,s){if(!e||"string"!=typeof t)return!1;const r=e.get(t);return!!r&&r.match(n,s)}}class Te{constructor(e){this.selectors=e,this.alreadyMatched=!1}}class Ne{constructor(e,t,n){this.selector=e,this.cbContext=t,this.listContext=n,this.notSelectors=e.notSelectors}finalize(e,t){let n=!0;return!(this.notSelectors.length>0)||this.listContext&&this.listContext.alreadyMatched||(n=!Ie.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}}var Ae,Pe,ke,Oe,Me,Le;function Re(e){const t=function(e){const t=e.classNames&&e.classNames.length?[8,...e.classNames]:[];return[e.element&&"*"!==e.element?e.element:"",...e.attrs,...t]}(e),n=e.notSelectors&&e.notSelectors.length?e.notSelectors.map(e=>function(e){const t=e.classNames&&e.classNames.length?[8,...e.classNames]:[];return e.element?[5,e.element,...e.attrs,...t]:e.attrs.length?[3,...e.attrs,...t]:e.classNames&&e.classNames.length?[9,...e.classNames]:[]}(e)):[];return t.concat(...n)}function De(e){return e?be.parse(e).map(Re):[]}!function(e){e[e.Emulated=0]="Emulated",e[e.None=2]="None",e[e.ShadowDom=3]="ShadowDom"}(Ae||(Ae={})),function(e){e[e.OnPush=0]="OnPush",e[e.Default=1]="Default"}(Pe||(Pe={})),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"}(ke||(ke={})),function(e){e[e.Error=0]="Error",e[e.Warning=1]="Warning",e[e.Ignore=2]="Ignore"}(Oe||(Oe={})),function(e){e[e.Const=0]="Const"}(Me||(Me={}));class Fe{constructor(e=[]){this.modifiers=e}hasModifier(e){return-1!==this.modifiers.indexOf(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={}));class Be extends Fe{constructor(e,t){super(t),this.name=e}visitType(e,t){return e.visitBuiltinType(this,t)}}class $e extends Fe{constructor(e,t,n=null){super(t),this.value=e,this.typeParams=n}visitType(e,t){return e.visitExpressionType(this,t)}}const Ve=new Be(Le.Dynamic),je=new Be(Le.Inferred),Ue=new Be(Le.Bool),qe=(new Be(Le.Int),new Be(Le.Number)),He=new Be(Le.String),We=(new Be(Le.Function),new Be(Le.None));var ze,Ke,Xe,Ge;function Qe(e,t){const n=e.length;if(n!==t.length)return!1;for(let s=0;s<n;s++)if(!e[s].isEquivalent(t[s]))return!1;return!0}!function(e){e[e.Minus=0]="Minus",e[e.Plus=1]="Plus"}(ze||(ze={})),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"}(Ke||(Ke={}));class Ye{constructor(e,t){this.type=e||null,this.sourceSpan=t||null}prop(e,t){return new bt(this,e,null,t)}key(e,t,n){return new It(this,e,t,n)}callMethod(e,t,n){return new rt(this,e,t,null,n)}callFn(e,t,n){return new it(this,e,null,t,n)}instantiate(e,t,n){return new at(this,e,t,n)}conditional(e,t=null,n){return new vt(this,e,t,null,n)}equals(e,t){return new wt(Ke.Equals,this,e,null,t)}notEquals(e,t){return new wt(Ke.NotEquals,this,e,null,t)}identical(e,t){return new wt(Ke.Identical,this,e,null,t)}notIdentical(e,t){return new wt(Ke.NotIdentical,this,e,null,t)}minus(e,t){return new wt(Ke.Minus,this,e,null,t)}plus(e,t){return new wt(Ke.Plus,this,e,null,t)}divide(e,t){return new wt(Ke.Divide,this,e,null,t)}multiply(e,t){return new wt(Ke.Multiply,this,e,null,t)}modulo(e,t){return new wt(Ke.Modulo,this,e,null,t)}and(e,t){return new wt(Ke.And,this,e,null,t)}bitwiseAnd(e,t,n=!0){return new wt(Ke.BitwiseAnd,this,e,null,t,n)}or(e,t){return new wt(Ke.Or,this,e,null,t)}lower(e,t){return new wt(Ke.Lower,this,e,null,t)}lowerEquals(e,t){return new wt(Ke.LowerEquals,this,e,null,t)}bigger(e,t){return new wt(Ke.Bigger,this,e,null,t)}biggerEquals(e,t){return new wt(Ke.BiggerEquals,this,e,null,t)}isBlank(e){return this.equals(kt,e)}cast(e,t){return new St(this,e,t)}toStmt(){return new Ft(this,null)}}!function(e){e[e.This=0]="This",e[e.Super=1]="Super",e[e.CatchError=2]="CatchError",e[e.CatchStack=3]="CatchStack"}(Xe||(Xe={}));class Ze extends Ye{constructor(e,t,n){super(t,n),"string"==typeof e?(this.name=e,this.builtin=null):(this.name=null,this.builtin=e)}isEquivalent(e){return e instanceof Ze&&this.name===e.name&&this.builtin===e.builtin}isConstant(){return!1}visitExpression(e,t){return e.visitReadVarExpr(this,t)}set(e){if(!this.name)throw new Error(`Built in variable ${this.builtin} can not be assigned to.`);return new tt(this.name,e,null,this.sourceSpan)}}class Je extends Ye{constructor(e,t,n){super(t,n),this.expr=e}visitExpression(e,t){return e.visitTypeofExpr(this,t)}isEquivalent(e){return e instanceof Je&&e.expr.isEquivalent(this.expr)}isConstant(){return this.expr.isConstant()}}class et extends Ye{constructor(e,t,n){super(t,n),this.node=e}isEquivalent(e){return e instanceof et&&this.node===e.node}isConstant(){return!1}visitExpression(e,t){return e.visitWrappedNodeExpr(this,t)}}class tt extends Ye{constructor(e,t,n,s){super(n||t.type,s),this.name=e,this.value=t}isEquivalent(e){return e instanceof tt&&this.name===e.name&&this.value.isEquivalent(e.value)}isConstant(){return!1}visitExpression(e,t){return e.visitWriteVarExpr(this,t)}toDeclStmt(e,t){return new Rt(this.name,this.value,e,t,this.sourceSpan)}toConstDecl(){return this.toDeclStmt(je,[Ot.Final])}}class nt extends Ye{constructor(e,t,n,s,r){super(s||n.type,r),this.receiver=e,this.index=t,this.value=n}isEquivalent(e){return e instanceof nt&&this.receiver.isEquivalent(e.receiver)&&this.index.isEquivalent(e.index)&&this.value.isEquivalent(e.value)}isConstant(){return!1}visitExpression(e,t){return e.visitWriteKeyExpr(this,t)}}class st extends Ye{constructor(e,t,n,s,r){super(s||n.type,r),this.receiver=e,this.name=t,this.value=n}isEquivalent(e){return e instanceof st&&this.receiver.isEquivalent(e.receiver)&&this.name===e.name&&this.value.isEquivalent(e.value)}isConstant(){return!1}visitExpression(e,t){return e.visitWritePropExpr(this,t)}}!function(e){e[e.ConcatArray=0]="ConcatArray",e[e.SubscribeObservable=1]="SubscribeObservable",e[e.Bind=2]="Bind"}(Ge||(Ge={}));class rt extends Ye{constructor(e,t,n,s,r){super(s,r),this.receiver=e,this.args=n,"string"==typeof t?(this.name=t,this.builtin=null):(this.name=null,this.builtin=t)}isEquivalent(e){return e instanceof rt&&this.receiver.isEquivalent(e.receiver)&&this.name===e.name&&this.builtin===e.builtin&&Qe(this.args,e.args)}isConstant(){return!1}visitExpression(e,t){return e.visitInvokeMethodExpr(this,t)}}class it extends Ye{constructor(e,t,n,s,r=!1){super(n,s),this.fn=e,this.args=t,this.pure=r}isEquivalent(e){return e instanceof it&&this.fn.isEquivalent(e.fn)&&Qe(this.args,e.args)&&this.pure===e.pure}isConstant(){return!1}visitExpression(e,t){return e.visitInvokeFunctionExpr(this,t)}}class at extends Ye{constructor(e,t,n,s){super(n,s),this.classExpr=e,this.args=t}isEquivalent(e){return e instanceof at&&this.classExpr.isEquivalent(e.classExpr)&&Qe(this.args,e.args)}isConstant(){return!1}visitExpression(e,t){return e.visitInstantiateExpr(this,t)}}class ot extends Ye{constructor(e,t,n){super(t,n),this.value=e}isEquivalent(e){return e instanceof ot&&this.value===e.value}isConstant(){return!0}visitExpression(e,t){return e.visitLiteralExpr(this,t)}}class lt{constructor(e,t){this.text=e,this.sourceSpan=t}}class ct extends lt{}class ut extends lt{}class pt extends Ye{constructor(e,t,n,s,r){super(He,r),this.metaBlock=e,this.messageParts=t,this.placeHolderNames=n,this.expressions=s}isEquivalent(e){return!1}isConstant(){return!1}visitExpression(e,t){return e.visitLocalizedString(this,t)}serializeI18nHead(){let 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(t=>{e=`${e}␟${t}`}),gt(e,this.messageParts[0].text,this.getMessagePartSourceSpan(0))}getMessagePartSourceSpan(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}getPlaceholderSourceSpan(e){var t,n,s,r;return null!==(r=null!==(n=null===(t=this.placeHolderNames[e])||void 0===t?void 0:t.sourceSpan)&&void 0!==n?n:null===(s=this.expressions[e])||void 0===s?void 0:s.sourceSpan)&&void 0!==r?r:this.sourceSpan}serializeI18nTemplatePart(e){return gt(this.placeHolderNames[e-1].text,this.messageParts[e].text,this.getMessagePartSourceSpan(e))}}const ht=e=>e.replace(/\\/g,"\\\\"),dt=e=>e.replace(/:/g,"\\:"),mt=e=>e.replace(/`/g,"\\`").replace(/\${/g,"$\\{");function gt(e,t,n){return""===e?{cooked:t,raw:mt((s=ht(t),s.replace(/^:/,"\\:"))),range:n}:{cooked:`:${e}:${t}`,raw:mt(`:${dt(ht(e))}:${ht(t)}`),range:n};var s}class ft extends Ye{constructor(e,t,n=null,s){super(t,s),this.value=e,this.typeParams=n}isEquivalent(e){return e instanceof ft&&this.value.name===e.value.name&&this.value.moduleName===e.value.moduleName&&this.value.runtime===e.value.runtime}isConstant(){return!1}visitExpression(e,t){return e.visitExternalExpr(this,t)}}class vt extends Ye{constructor(e,t,n=null,s,r){super(s||t.type,r),this.condition=e,this.falseCase=n,this.trueCase=t}isEquivalent(e){return e instanceof vt&&this.condition.isEquivalent(e.condition)&&this.trueCase.isEquivalent(e.trueCase)&&(n=e.falseCase,null==(t=this.falseCase)||null==n?t==n:t.isEquivalent(n));var t,n}isConstant(){return!1}visitExpression(e,t){return e.visitConditionalExpr(this,t)}}class yt extends Ye{constructor(e,t){super(Ue,t),this.condition=e}isEquivalent(e){return e instanceof yt&&this.condition.isEquivalent(e.condition)}isConstant(){return!1}visitExpression(e,t){return e.visitNotExpr(this,t)}}class xt extends Ye{constructor(e,t){super(e.type,t),this.condition=e}isEquivalent(e){return e instanceof xt&&this.condition.isEquivalent(e.condition)}isConstant(){return!1}visitExpression(e,t){return e.visitAssertNotNullExpr(this,t)}}class St extends Ye{constructor(e,t,n){super(t,n),this.value=e}isEquivalent(e){return e instanceof St&&this.value.isEquivalent(e.value)}isConstant(){return!1}visitExpression(e,t){return e.visitCastExpr(this,t)}}class Et{constructor(e,t=null){this.name=e,this.type=t}isEquivalent(e){return this.name===e.name}}class _t extends Ye{constructor(e,t,n,s,r){super(n,s),this.params=e,this.statements=t,this.name=r}isEquivalent(e){return e instanceof _t&&Qe(this.params,e.params)&&Qe(this.statements,e.statements)}isConstant(){return!1}visitExpression(e,t){return e.visitFunctionExpr(this,t)}toDeclStmt(e,t){return new Dt(e,this.params,this.statements,this.type,t,this.sourceSpan)}}class Ct extends Ye{constructor(e,t,n,s,r=!0){super(n||qe,s),this.operator=e,this.expr=t,this.parens=r}isEquivalent(e){return e instanceof Ct&&this.operator===e.operator&&this.expr.isEquivalent(e.expr)}isConstant(){return!1}visitExpression(e,t){return e.visitUnaryOperatorExpr(this,t)}}class wt extends Ye{constructor(e,t,n,s,r,i=!0){super(s||t.type,r),this.operator=e,this.rhs=n,this.parens=i,this.lhs=t}isEquivalent(e){return e instanceof wt&&this.operator===e.operator&&this.lhs.isEquivalent(e.lhs)&&this.rhs.isEquivalent(e.rhs)}isConstant(){return!1}visitExpression(e,t){return e.visitBinaryOperatorExpr(this,t)}}class bt extends Ye{constructor(e,t,n,s){super(n,s),this.receiver=e,this.name=t}isEquivalent(e){return e instanceof bt&&this.receiver.isEquivalent(e.receiver)&&this.name===e.name}isConstant(){return!1}visitExpression(e,t){return e.visitReadPropExpr(this,t)}set(e){return new st(this.receiver,this.name,e,null,this.sourceSpan)}}class It extends Ye{constructor(e,t,n,s){super(n,s),this.receiver=e,this.index=t}isEquivalent(e){return e instanceof It&&this.receiver.isEquivalent(e.receiver)&&this.index.isEquivalent(e.index)}isConstant(){return!1}visitExpression(e,t){return e.visitReadKeyExpr(this,t)}set(e){return new nt(this.receiver,this.index,e,null,this.sourceSpan)}}class Tt extends Ye{constructor(e,t,n){super(t,n),this.entries=e}isConstant(){return this.entries.every(e=>e.isConstant())}isEquivalent(e){return e instanceof Tt&&Qe(this.entries,e.entries)}visitExpression(e,t){return e.visitLiteralArrayExpr(this,t)}}class Nt{constructor(e,t,n){this.key=e,this.value=t,this.quoted=n}isEquivalent(e){return this.key===e.key&&this.value.isEquivalent(e.value)}}class At extends Ye{constructor(e,t,n){super(t,n),this.entries=e,this.valueType=null,t&&(this.valueType=t.valueType)}isEquivalent(e){return e instanceof At&&Qe(this.entries,e.entries)}isConstant(){return this.entries.every(e=>e.value.isConstant())}visitExpression(e,t){return e.visitLiteralMapExpr(this,t)}}new Ze(Xe.This,null,null),new Ze(Xe.Super,null,null),new Ze(Xe.CatchError,null,null),new Ze(Xe.CatchStack,null,null);const Pt=new ot(null,null,null),kt=new ot(null,je,null);var Ot;!function(e){e[e.Final=0]="Final",e[e.Private=1]="Private",e[e.Exported=2]="Exported",e[e.Static=3]="Static"}(Ot||(Ot={}));class Mt extends class{constructor(e,t,n){this.text=e,this.multiline=t,this.trailingNewline=n}toString(){return this.multiline?` ${this.text} `:this.text}}{constructor(e){super("",!0,!0),this.tags=e}toString(){return function(e){if(0===e.length)return"";if(1===e.length&&e[0].tagName&&!e[0].text)return`*${Qt(e[0])} `;let t="*\n";for(const n of e)t+=" *",t+=Qt(n).replace(/\n/g,"\n * "),t+="\n";return t+=" ",t}(this.tags)}}class Lt{constructor(e=[],t=null,n){this.modifiers=e,this.sourceSpan=t,this.leadingComments=n}hasModifier(e){return-1!==this.modifiers.indexOf(e)}addLeadingComment(e){var t;this.leadingComments=null!==(t=this.leadingComments)&&void 0!==t?t:[],this.leadingComments.push(e)}}class Rt extends Lt{constructor(e,t,n,s,r,i){super(s,r,i),this.name=e,this.value=t,this.type=n||t&&t.type||null}isEquivalent(e){return e instanceof Rt&&this.name===e.name&&(this.value?!!e.value&&this.value.isEquivalent(e.value):!e.value)}visitStatement(e,t){return e.visitDeclareVarStmt(this,t)}}class Dt extends Lt{constructor(e,t,n,s,r,i,a){super(r,i,a),this.name=e,this.params=t,this.statements=n,this.type=s||null}isEquivalent(e){return e instanceof Dt&&Qe(this.params,e.params)&&Qe(this.statements,e.statements)}visitStatement(e,t){return e.visitDeclareFunctionStmt(this,t)}}class Ft extends Lt{constructor(e,t,n){super([],t,n),this.expr=e}isEquivalent(e){return e instanceof Ft&&this.expr.isEquivalent(e.expr)}visitStatement(e,t){return e.visitExpressionStmt(this,t)}}class Bt extends Lt{constructor(e,t=null,n){super([],t,n),this.value=e}isEquivalent(e){return e instanceof Bt&&this.value.isEquivalent(e.value)}visitStatement(e,t){return e.visitReturnStmt(this,t)}}class $t extends Lt{constructor(e,t,n=[],s,r){super([],s,r),this.condition=e,this.trueCase=t,this.falseCase=n}isEquivalent(e){return e instanceof $t&&this.condition.isEquivalent(e.condition)&&Qe(this.trueCase,e.trueCase)&&Qe(this.falseCase,e.falseCase)}visitStatement(e,t){return e.visitIfStmt(this,t)}}function Vt(e,t,n){return new Ze(e,t,n)}function jt(e,t=null,n){return new ft(e,null,t,n)}function Ut(e,t,n){return new $e(e,t,n)}function qt(e){return new Je(e)}function Ht(e,t,n){return new Tt(e,t,n)}function Wt(e,t=null){return new At(e.map(e=>new Nt(e.key,e.value,e.quoted)),t,null)}function zt(e,t,n,s,r){return new _t(e,t,n,s,r)}function Kt(e,t,n,s,r){return new $t(e,t,n,s,r)}function Xt(e,t,n){return new ot(e,t,n)}function Gt(e){return e instanceof ot&&null===e.value}function Qt(e){let t="";if(e.tagName&&(t+=" @"+e.tagName),e.text){if(e.text.match(/\/\*|\*\//))throw new Error('JSDoc text cannot contain "/*" and "*/"');t+=" "+e.text.replace(/@/g,"\\@")}return t}const Yt=/-+([a-z0-9])/g;function Zt(e,t){return Jt(e,":",t)}function Jt(e,t,n){const s=e.indexOf(t);return-1==s?n:[e.slice(0,s).trim(),e.slice(s+1).trim()]}function en(e){throw new Error("Internal Error: "+e)}function tn(e){return e.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")}function nn(e){let t="";for(let n=0;n<e.length;n++){let s=e.charCodeAt(n);if(s>=55296&&s<=56319&&e.length>n+1){const t=e.charCodeAt(n+1);t>=56320&&t<=57343&&(n++,s=(s-55296<<10)+t-56320+65536)}s<=127?t+=String.fromCharCode(s):s<=2047?t+=String.fromCharCode(s>>6&31|192,63&s|128):s<=65535?t+=String.fromCharCode(s>>12|224,s>>6&63|128,63&s|128):s<=2097151&&(t+=String.fromCharCode(s>>18&7|240,s>>12&63|128,s>>6&63|128,63&s|128))}return t}function sn(e){if("string"==typeof e)return e;if(Array.isArray(e))return"["+e.map(sn).join(", ")+"]";if(null==e)return""+e;if(e.overriddenName)return""+e.overriddenName;if(e.name)return""+e.name;if(!e.toString)return"object";const t=e.toString();if(null==t)return""+t;const n=t.indexOf("\n");return-1===n?t:t.substring(0,n)}const rn="undefined"!=typeof window&&window,an="undefined"!=typeof self&&"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&self,on="undefined"!=typeof global&&global||rn||an,ln=Vt("<unknown>"),cn={};class un extends Ye{constructor(e){super(e.type),this.resolved=e,this.original=e}visitExpression(e,t){return t===cn?this.original.visitExpression(e,t):this.resolved.visitExpression(e,t)}isEquivalent(e){return e instanceof un&&this.resolved.isEquivalent(e.resolved)}isConstant(){return!0}fixup(e){this.resolved=e,this.shared=!0}}class pn{constructor(e=!1){this.isClosureCompilerEnabled=e,this.statements=[],this.literals=new Map,this.literalFactories=new Map,this.injectorDefinitions=new Map,this.directiveDefinitions=new Map,this.componentDefinitions=new Map,this.pipeDefinitions=new Map,this.nextNameIndex=0}getConstLiteral(e,t){if(e instanceof ot&&!gn(e)||e instanceof un)return e;const n=this.keyOf(e);let s=this.literals.get(n),r=!1;if(s||(s=new un(e),this.literals.set(n,s),r=!0),!r&&!s.shared||r&&t){const t=this.freshName();let n,r;this.isClosureCompilerEnabled&&gn(e)?(n=Vt(t).set(new _t([],[new Bt(e)])),r=Vt(t).callFn([])):(n=Vt(t).set(e),r=Vt(t)),this.statements.push(n.toDeclStmt(je,[Ot.Final])),s.fixup(r)}return s}getDefinition(e,t,n,s=!1){const r=this.definitionsOf(t);let i=r.get(e),a=!1;if(!i){const s=this.propertyNameOf(t);i=new un(n.importExpr(e).prop(s)),r.set(e,i),a=!0}if(!a&&!i.shared||a&&s){const e=this.freshName();this.statements.push(Vt(e).set(i.resolved).toDeclStmt(je,[Ot.Final])),i.fixup(Vt(e))}return i}getLiteralFactory(e){if(e instanceof Tt){const t=e.entries.map(e=>e.isConstant()?e:ln),n=this.keyOf(Ht(t));return this._getLiteralFactory(n,e.entries,e=>Ht(e))}{const t=Wt(e.entries.map(e=>({key:e.key,value:e.value.isConstant()?e.value:ln,quoted:e.quoted}))),n=this.keyOf(t);return this._getLiteralFactory(n,e.entries.map(e=>e.value),t=>Wt(t.map((t,n)=>({key:e.entries[n].key,value:t,quoted:e.entries[n].quoted}))))}}_getLiteralFactory(e,t,n){let s=this.literalFactories.get(e);const r=t.filter(e=>!e.isConstant());if(!s){const r=t.map((e,t)=>e.isConstant()?this.getConstLiteral(e,!0):Vt("a"+t)),i=zt(r.filter(mn).map(e=>new Et(e.name,Ve)),[new Bt(n(r))],je),a=this.freshName();this.statements.push(Vt(a).set(i).toDeclStmt(je,[Ot.Final])),s=Vt(a),this.literalFactories.set(e,s)}return{literalFactory:s,literalFactoryArguments:r}}uniqueName(e){return`${e}${this.nextNameIndex++}`}definitionsOf(e){switch(e){case 2:return this.componentDefinitions;case 1:return this.directiveDefinitions;case 0:return this.injectorDefinitions;case 3:return this.pipeDefinitions}return en("Unknown definition kind "+e),this.componentDefinitions}propertyNameOf(e){switch(e){case 2:return"ɵcmp";case 1:return"ɵdir";case 0:return"ɵinj";case 3:return"ɵpipe"}return en("Unknown definition kind "+e),"<unknown>"}freshName(){return this.uniqueName("_c")}keyOf(e){return e.visitExpression(new hn,cn)}}class hn{constructor(){this.visitWrappedNodeExpr=dn,this.visitWriteVarExpr=dn,this.visitWriteKeyExpr=dn,this.visitWritePropExpr=dn,this.visitInvokeMethodExpr=dn,this.visitInvokeFunctionExpr=dn,this.visitInstantiateExpr=dn,this.visitConditionalExpr=dn,this.visitNotExpr=dn,this.visitAssertNotNullExpr=dn,this.visitCastExpr=dn,this.visitFunctionExpr=dn,this.visitUnaryOperatorExpr=dn,this.visitBinaryOperatorExpr=dn,this.visitReadPropExpr=dn,this.visitReadKeyExpr=dn,this.visitCommaExpr=dn,this.visitLocalizedString=dn}visitLiteralExpr(e){return""+("string"==typeof e.value?'"'+e.value+'"':e.value)}visitLiteralArrayExpr(e,t){return`[${e.entries.map(e=>e.visitExpression(this,t)).join(",")}]`}visitLiteralMapExpr(e,t){return"{"+e.entries.map(e=>`${(e=>{const t=e.quoted?'"':"";return`${t}${e.key}${t}`})(e)}:${e.value.visitExpression(this,t)}`).join(",")}visitExternalExpr(e){return e.value.moduleName?`EX:${e.value.moduleName}:${e.value.name}`:"EX:"+e.value.runtime.name}visitReadVarExpr(e){return"VAR:"+e.name}visitTypeofExpr(e,t){return"TYPEOF:"+e.expr.visitExpression(this,t)}}function dn(e){throw new Error(`Invalid state: Visitor ${this.constructor.name} doesn't handle ${e.constructor.name}`)}function mn(e){return e instanceof Ze}function gn(e){return e instanceof ot&&"string"==typeof e.value&&e.value.length>=50}const fn="@angular/core";class vn{}function yn(e){return e.replace(/\W/g,"_")}vn.ANALYZE_FOR_ENTRY_COMPONENTS={name:"ANALYZE_FOR_ENTRY_COMPONENTS",moduleName:fn},vn.ElementRef={name:"ElementRef",moduleName:fn},vn.NgModuleRef={name:"NgModuleRef",moduleName:fn},vn.ViewContainerRef={name:"ViewContainerRef",moduleName:fn},vn.ChangeDetectorRef={name:"ChangeDetectorRef",moduleName:fn},vn.QueryList={name:"QueryList",moduleName:fn},vn.TemplateRef={name:"TemplateRef",moduleName:fn},vn.Renderer2={name:"Renderer2",moduleName:fn},vn.CodegenComponentFactoryResolver={name:"ɵCodegenComponentFactoryResolver",moduleName:fn},vn.ComponentFactoryResolver={name:"ComponentFactoryResolver",moduleName:fn},vn.ComponentFactory={name:"ComponentFactory",moduleName:fn},vn.ComponentRef={name:"ComponentRef",moduleName:fn},vn.NgModuleFactory={name:"NgModuleFactory",moduleName:fn},vn.createModuleFactory={name:"ɵcmf",moduleName:fn},vn.moduleDef={name:"ɵmod",moduleName:fn},vn.moduleProviderDef={name:"ɵmpd",moduleName:fn},vn.RegisterModuleFactoryFn={name:"ɵregisterModuleFactory",moduleName:fn},vn.inject={name:"ɵɵinject",moduleName:fn},vn.directiveInject={name:"ɵɵdirectiveInject",moduleName:fn},vn.INJECTOR={name:"INJECTOR",moduleName:fn},vn.Injector={name:"Injector",moduleName:fn},vn.ɵɵdefineInjectable={name:"ɵɵdefineInjectable",moduleName:fn},vn.InjectableDef={name:"ɵɵInjectableDef",moduleName:fn},vn.ViewEncapsulation={name:"ViewEncapsulation",moduleName:fn},vn.ChangeDetectionStrategy={name:"ChangeDetectionStrategy",moduleName:fn},vn.SecurityContext={name:"SecurityContext",moduleName:fn},vn.LOCALE_ID={name:"LOCALE_ID",moduleName:fn},vn.TRANSLATIONS_FORMAT={name:"TRANSLATIONS_FORMAT",moduleName:fn},vn.inlineInterpolate={name:"ɵinlineInterpolate",moduleName:fn},vn.interpolate={name:"ɵinterpolate",moduleName:fn},vn.EMPTY_ARRAY={name:"ɵEMPTY_ARRAY",moduleName:fn},vn.EMPTY_MAP={name:"ɵEMPTY_MAP",moduleName:fn},vn.Renderer={name:"Renderer",moduleName:fn},vn.viewDef={name:"ɵvid",moduleName:fn},vn.elementDef={name:"ɵeld",moduleName:fn},vn.anchorDef={name:"ɵand",moduleName:fn},vn.textDef={name:"ɵted",moduleName:fn},vn.directiveDef={name:"ɵdid",moduleName:fn},vn.providerDef={name:"ɵprd",moduleName:fn},vn.queryDef={name:"ɵqud",moduleName:fn},vn.pureArrayDef={name:"ɵpad",moduleName:fn},vn.pureObjectDef={name:"ɵpod",moduleName:fn},vn.purePipeDef={name:"ɵppd",moduleName:fn},vn.pipeDef={name:"ɵpid",moduleName:fn},vn.nodeValue={name:"ɵnov",moduleName:fn},vn.ngContentDef={name:"ɵncd",moduleName:fn},vn.unwrapValue={name:"ɵunv",moduleName:fn},vn.createRendererType2={name:"ɵcrt",moduleName:fn},vn.RendererType2={name:"RendererType2",moduleName:fn},vn.ViewDefinition={name:"ɵViewDefinition",moduleName:fn},vn.createComponentFactory={name:"ɵccf",moduleName:fn},vn.setClassMetadata={name:"ɵsetClassMetadata",moduleName:fn};let xn=0;var Sn;!function(e){e[e.Pipe=0]="Pipe",e[e.Directive=1]="Directive",e[e.NgModule=2]="NgModule",e[e.Injectable=3]="Injectable"}(Sn||(Sn={}));const En="@angular/core";class _n{}function Cn(e){return Wt(Object.keys(e).map(t=>({key:t,value:e[t],quoted:!1})))}function wn(e,t){if(0===t)return Ut(e);const n=[];for(let e=0;e<t;e++)n.push(Ve);return Ut(e,void 0,n)}function bn(e){return"@"+e}function In(e,t){return`animation_${e}_${t}`}_n.NEW_METHOD="factory",_n.TRANSFORM_METHOD="transform",_n.PATCH_DEPS="patchedDeps",_n.namespaceHTML={name:"ɵɵnamespaceHTML",moduleName:En},_n.namespaceMathML={name:"ɵɵnamespaceMathML",moduleName:En},_n.namespaceSVG={name:"ɵɵnamespaceSVG",moduleName:En},_n.element={name:"ɵɵelement",moduleName:En},_n.elementStart={name:"ɵɵelementStart",moduleName:En},_n.elementEnd={name:"ɵɵelementEnd",moduleName:En},_n.advance={name:"ɵɵadvance",moduleName:En},_n.syntheticHostProperty={name:"ɵɵsyntheticHostProperty",moduleName:En},_n.syntheticHostListener={name:"ɵɵsyntheticHostListener",moduleName:En},_n.attribute={name:"ɵɵattribute",moduleName:En},_n.attributeInterpolate1={name:"ɵɵattributeInterpolate1",moduleName:En},_n.attributeInterpolate2={name:"ɵɵattributeInterpolate2",moduleName:En},_n.attributeInterpolate3={name:"ɵɵattributeInterpolate3",moduleName:En},_n.attributeInterpolate4={name:"ɵɵattributeInterpolate4",moduleName:En},_n.attributeInterpolate5={name:"ɵɵattributeInterpolate5",moduleName:En},_n.attributeInterpolate6={name:"ɵɵattributeInterpolate6",moduleName:En},_n.attributeInterpolate7={name:"ɵɵattributeInterpolate7",moduleName:En},_n.attributeInterpolate8={name:"ɵɵattributeInterpolate8",moduleName:En},_n.attributeInterpolateV={name:"ɵɵattributeInterpolateV",moduleName:En},_n.classProp={name:"ɵɵclassProp",moduleName:En},_n.elementContainerStart={name:"ɵɵelementContainerStart",moduleName:En},_n.elementContainerEnd={name:"ɵɵelementContainerEnd",moduleName:En},_n.elementContainer={name:"ɵɵelementContainer",moduleName:En},_n.styleMap={name:"ɵɵstyleMap",moduleName:En},_n.styleMapInterpolate1={name:"ɵɵstyleMapInterpolate1",moduleName:En},_n.styleMapInterpolate2={name:"ɵɵstyleMapInterpolate2",moduleName:En},_n.styleMapInterpolate3={name:"ɵɵstyleMapInterpolate3",moduleName:En},_n.styleMapInterpolate4={name:"ɵɵstyleMapInterpolate4",moduleName:En},_n.styleMapInterpolate5={name:"ɵɵstyleMapInterpolate5",moduleName:En},_n.styleMapInterpolate6={name:"ɵɵstyleMapInterpolate6",moduleName:En},_n.styleMapInterpolate7={name:"ɵɵstyleMapInterpolate7",moduleName:En},_n.styleMapInterpolate8={name:"ɵɵstyleMapInterpolate8",moduleName:En},_n.styleMapInterpolateV={name:"ɵɵstyleMapInterpolateV",moduleName:En},_n.classMap={name:"ɵɵclassMap",moduleName:En},_n.classMapInterpolate1={name:"ɵɵclassMapInterpolate1",moduleName:En},_n.classMapInterpolate2={name:"ɵɵclassMapInterpolate2",moduleName:En},_n.classMapInterpolate3={name:"ɵɵclassMapInterpolate3",moduleName:En},_n.classMapInterpolate4={name:"ɵɵclassMapInterpolate4",moduleName:En},_n.classMapInterpolate5={name:"ɵɵclassMapInterpolate5",moduleName:En},_n.classMapInterpolate6={name:"ɵɵclassMapInterpolate6",moduleName:En},_n.classMapInterpolate7={name:"ɵɵclassMapInterpolate7",moduleName:En},_n.classMapInterpolate8={name:"ɵɵclassMapInterpolate8",moduleName:En},_n.classMapInterpolateV={name:"ɵɵclassMapInterpolateV",moduleName:En},_n.styleProp={name:"ɵɵstyleProp",moduleName:En},_n.stylePropInterpolate1={name:"ɵɵstylePropInterpolate1",moduleName:En},_n.stylePropInterpolate2={name:"ɵɵstylePropInterpolate2",moduleName:En},_n.stylePropInterpolate3={name:"ɵɵstylePropInterpolate3",moduleName:En},_n.stylePropInterpolate4={name:"ɵɵstylePropInterpolate4",moduleName:En},_n.stylePropInterpolate5={name:"ɵɵstylePropInterpolate5",moduleName:En},_n.stylePropInterpolate6={name:"ɵɵstylePropInterpolate6",moduleName:En},_n.stylePropInterpolate7={name:"ɵɵstylePropInterpolate7",moduleName:En},_n.stylePropInterpolate8={name:"ɵɵstylePropInterpolate8",moduleName:En},_n.stylePropInterpolateV={name:"ɵɵstylePropInterpolateV",moduleName:En},_n.nextContext={name:"ɵɵnextContext",moduleName:En},_n.templateCreate={name:"ɵɵtemplate",moduleName:En},_n.text={name:"ɵɵtext",moduleName:En},_n.enableBindings={name:"ɵɵenableBindings",moduleName:En},_n.disableBindings={name:"ɵɵdisableBindings",moduleName:En},_n.getCurrentView={name:"ɵɵgetCurrentView",moduleName:En},_n.textInterpolate={name:"ɵɵtextInterpolate",moduleName:En},_n.textInterpolate1={name:"ɵɵtextInterpolate1",moduleName:En},_n.textInterpolate2={name:"ɵɵtextInterpolate2",moduleName:En},_n.textInterpolate3={name:"ɵɵtextInterpolate3",moduleName:En},_n.textInterpolate4={name:"ɵɵtextInterpolate4",moduleName:En},_n.textInterpolate5={name:"ɵɵtextInterpolate5",moduleName:En},_n.textInterpolate6={name:"ɵɵtextInterpolate6",moduleName:En},_n.textInterpolate7={name:"ɵɵtextInterpolate7",moduleName:En},_n.textInterpolate8={name:"ɵɵtextInterpolate8",moduleName:En},_n.textInterpolateV={name:"ɵɵtextInterpolateV",moduleName:En},_n.restoreView={name:"ɵɵrestoreView",moduleName:En},_n.pureFunction0={name:"ɵɵpureFunction0",moduleName:En},_n.pureFunction1={name:"ɵɵpureFunction1",moduleName:En},_n.pureFunction2={name:"ɵɵpureFunction2",moduleName:En},_n.pureFunction3={name:"ɵɵpureFunction3",moduleName:En},_n.pureFunction4={name:"ɵɵpureFunction4",moduleName:En},_n.pureFunction5={name:"ɵɵpureFunction5",moduleName:En},_n.pureFunction6={name:"ɵɵpureFunction6",moduleName:En},_n.pureFunction7={name:"ɵɵpureFunction7",moduleName:En},_n.pureFunction8={name:"ɵɵpureFunction8",moduleName:En},_n.pureFunctionV={name:"ɵɵpureFunctionV",moduleName:En},_n.pipeBind1={name:"ɵɵpipeBind1",moduleName:En},_n.pipeBind2={name:"ɵɵpipeBind2",moduleName:En},_n.pipeBind3={name:"ɵɵpipeBind3",moduleName:En},_n.pipeBind4={name:"ɵɵpipeBind4",moduleName:En},_n.pipeBindV={name:"ɵɵpipeBindV",moduleName:En},_n.hostProperty={name:"ɵɵhostProperty",moduleName:En},_n.property={name:"ɵɵproperty",moduleName:En},_n.propertyInterpolate={name:"ɵɵpropertyInterpolate",moduleName:En},_n.propertyInterpolate1={name:"ɵɵpropertyInterpolate1",moduleName:En},_n.propertyInterpolate2={name:"ɵɵpropertyInterpolate2",moduleName:En},_n.propertyInterpolate3={name:"ɵɵpropertyInterpolate3",moduleName:En},_n.propertyInterpolate4={name:"ɵɵpropertyInterpolate4",moduleName:En},_n.propertyInterpolate5={name:"ɵɵpropertyInterpolate5",moduleName:En},_n.propertyInterpolate6={name:"ɵɵpropertyInterpolate6",moduleName:En},_n.propertyInterpolate7={name:"ɵɵpropertyInterpolate7",moduleName:En},_n.propertyInterpolate8={name:"ɵɵpropertyInterpolate8",moduleName:En},_n.propertyInterpolateV={name:"ɵɵpropertyInterpolateV",moduleName:En},_n.i18n={name:"ɵɵi18n",moduleName:En},_n.i18nAttributes={name:"ɵɵi18nAttributes",moduleName:En},_n.i18nExp={name:"ɵɵi18nExp",moduleName:En},_n.i18nStart={name:"ɵɵi18nStart",moduleName:En},_n.i18nEnd={name:"ɵɵi18nEnd",moduleName:En},_n.i18nApply={name:"ɵɵi18nApply",moduleName:En},_n.i18nPostprocess={name:"ɵɵi18nPostprocess",moduleName:En},_n.pipe={name:"ɵɵpipe",moduleName:En},_n.projection={name:"ɵɵprojection",moduleName:En},_n.projectionDef={name:"ɵɵprojectionDef",moduleName:En},_n.reference={name:"ɵɵreference",moduleName:En},_n.inject={name:"ɵɵinject",moduleName:En},_n.injectAttribute={name:"ɵɵinjectAttribute",moduleName:En},_n.injectPipeChangeDetectorRef={name:"ɵɵinjectPipeChangeDetectorRef",moduleName:En},_n.directiveInject={name:"ɵɵdirectiveInject",moduleName:En},_n.invalidFactory={name:"ɵɵinvalidFactory",moduleName:En},_n.invalidFactoryDep={name:"ɵɵinvalidFactoryDep",moduleName:En},_n.templateRefExtractor={name:"ɵɵtemplateRefExtractor",moduleName:En},_n.resolveWindow={name:"ɵɵresolveWindow",moduleName:En},_n.resolveDocument={name:"ɵɵresolveDocument",moduleName:En},_n.resolveBody={name:"ɵɵresolveBody",moduleName:En},_n.defineComponent={name:"ɵɵdefineComponent",moduleName:En},_n.setComponentScope={name:"ɵɵsetComponentScope",moduleName:En},_n.ComponentDefWithMeta={name:"ɵɵComponentDefWithMeta",moduleName:En},_n.FactoryDef={name:"ɵɵFactoryDef",moduleName:En},_n.defineDirective={name:"ɵɵdefineDirective",moduleName:En},_n.DirectiveDefWithMeta={name:"ɵɵDirectiveDefWithMeta",moduleName:En},_n.InjectorDef={name:"ɵɵInjectorDef",moduleName:En},_n.defineInjector={name:"ɵɵdefineInjector",moduleName:En},_n.NgModuleDefWithMeta={name:"ɵɵNgModuleDefWithMeta",moduleName:En},_n.ModuleWithProviders={name:"ModuleWithProviders",moduleName:En},_n.defineNgModule={name:"ɵɵdefineNgModule",moduleName:En},_n.setNgModuleScope={name:"ɵɵsetNgModuleScope",moduleName:En},_n.PipeDefWithMeta={name:"ɵɵPipeDefWithMeta",moduleName:En},_n.definePipe={name:"ɵɵdefinePipe",moduleName:En},_n.queryRefresh={name:"ɵɵqueryRefresh",moduleName:En},_n.viewQuery={name:"ɵɵviewQuery",moduleName:En},_n.staticViewQuery={name:"ɵɵstaticViewQuery",moduleName:En},_n.staticContentQuery={name:"ɵɵstaticContentQuery",moduleName:En},_n.loadQuery={name:"ɵɵloadQuery",moduleName:En},_n.contentQuery={name:"ɵɵcontentQuery",moduleName:En},_n.NgOnChangesFeature={name:"ɵɵNgOnChangesFeature",moduleName:En},_n.InheritDefinitionFeature={name:"ɵɵInheritDefinitionFeature",moduleName:En},_n.CopyDefinitionFeature={name:"ɵɵCopyDefinitionFeature",moduleName:En},_n.ProvidersFeature={name:"ɵɵProvidersFeature",moduleName:En},_n.listener={name:"ɵɵlistener",moduleName:En},_n.getFactoryOf={name:"ɵɵgetFactoryOf",moduleName:En},_n.getInheritedFactory={name:"ɵɵgetInheritedFactory",moduleName:En},_n.sanitizeHtml={name:"ɵɵsanitizeHtml",moduleName:En},_n.sanitizeStyle={name:"ɵɵsanitizeStyle",moduleName:En},_n.sanitizeResourceUrl={name:"ɵɵsanitizeResourceUrl",moduleName:En},_n.sanitizeScript={name:"ɵɵsanitizeScript",moduleName:En},_n.sanitizeUrl={name:"ɵɵsanitizeUrl",moduleName:En},_n.sanitizeUrlOrResourceUrl={name:"ɵɵsanitizeUrlOrResourceUrl",moduleName:En},_n.trustConstantHtml={name:"ɵɵtrustConstantHtml",moduleName:En},_n.trustConstantScript={name:"ɵɵtrustConstantScript",moduleName:En},_n.trustConstantResourceUrl={name:"ɵɵtrustConstantResourceUrl",moduleName:En};class Tn{constructor(e,t){this.value=e,this.sourceSpan=t}visit(e){return e.visitText(this)}}class Nn{constructor(e,t,n){this.value=e,this.sourceSpan=t,this.i18n=n}visit(e){return e.visitBoundText(this)}}class An{constructor(e,t,n,s,r){this.name=e,this.value=t,this.sourceSpan=n,this.valueSpan=s,this.i18n=r}visit(e){return e.visitTextAttribute(this)}}class Pn{constructor(e,t,n,s,r,i,a,o,l){this.name=e,this.type=t,this.securityContext=n,this.value=s,this.unit=r,this.sourceSpan=i,this.keySpan=a,this.valueSpan=o,this.i18n=l}static fromBoundElementProperty(e,t){if(void 0===e.keySpan)throw new Error(`Unexpected state: keySpan must be defined for bound attributes but was not for ${e.name}: ${e.sourceSpan}`);return new Pn(e.name,e.type,e.securityContext,e.value,e.unit,e.sourceSpan,e.keySpan,e.valueSpan,t)}visit(e){return e.visitBoundAttribute(this)}}class kn{constructor(e,t,n,s,r,i,a){this.name=e,this.type=t,this.handler=n,this.target=s,this.phase=r,this.sourceSpan=i,this.handlerSpan=a}static fromParsedEvent(e){return new kn(e.name,e.type,e.handler,0===e.type?e.targetOrPhase:null,1===e.type?e.targetOrPhase:null,e.sourceSpan,e.handlerSpan)}visit(e){return e.visitBoundEvent(this)}}class On{constructor(e,t,n,s,r,i,a,o,l,c){this.name=e,this.attributes=t,this.inputs=n,this.outputs=s,this.children=r,this.references=i,this.sourceSpan=a,this.startSourceSpan=o,this.endSourceSpan=l,this.i18n=c}visit(e){return e.visitElement(this)}}class Mn{constructor(e,t,n,s,r,i,a,o,l,c,u,p){this.tagName=e,this.attributes=t,this.inputs=n,this.outputs=s,this.templateAttrs=r,this.children=i,this.references=a,this.variables=o,this.sourceSpan=l,this.startSourceSpan=c,this.endSourceSpan=u,this.i18n=p}visit(e){return e.visitTemplate(this)}}class Ln{constructor(e,t,n,s){this.selector=e,this.attributes=t,this.sourceSpan=n,this.i18n=s,this.name="ng-content"}visit(e){return e.visitContent(this)}}class Rn{constructor(e,t,n,s,r){this.name=e,this.value=t,this.sourceSpan=n,this.keySpan=s,this.valueSpan=r}visit(e){return e.visitVariable(this)}}class Dn{constructor(e,t,n,s){this.name=e,this.value=t,this.sourceSpan=n,this.valueSpan=s}visit(e){return e.visitReference(this)}}class Fn{constructor(e,t,n,s){this.vars=e,this.placeholders=t,this.sourceSpan=n,this.i18n=s}visit(e){return e.visitIcu(this)}}function Bn(e,t){const n=[];if(e.visit)for(const n of t)e.visit(n)||n.visit(e);else for(const s of t){const t=s.visit(e);t&&n.push(t)}return n}class $n{constructor(e,t,n,s,r,i){this.nodes=e,this.placeholders=t,this.placeholderToMessage=n,this.meaning=s,this.description=r,this.customId=i,this.id=this.customId,this.legacyIds=[],this.sources=e.length?[{filePath:e[0].sourceSpan.start.file.url,startLine:e[0].sourceSpan.start.line+1,startCol:e[0].sourceSpan.start.col+1,endLine:e[e.length-1].sourceSpan.end.line+1,endCol:e[0].sourceSpan.start.col+1}]:[]}}class Vn{constructor(e,t){this.value=e,this.sourceSpan=t}visit(e,t){return e.visitText(this,t)}}class jn{constructor(e,t){this.children=e,this.sourceSpan=t}visit(e,t){return e.visitContainer(this,t)}}class Un{constructor(e,t,n,s){this.expression=e,this.type=t,this.cases=n,this.sourceSpan=s}visit(e,t){return e.visitIcu(this,t)}}class qn{constructor(e,t,n,s,r,i,a,o,l){this.tag=e,this.attrs=t,this.startName=n,this.closeName=s,this.children=r,this.isVoid=i,this.sourceSpan=a,this.startSourceSpan=o,this.endSourceSpan=l}visit(e,t){return e.visitTagPlaceholder(this,t)}}class Hn{constructor(e,t,n){this.value=e,this.name=t,this.sourceSpan=n}visit(e,t){return e.visitPlaceholder(this,t)}}class Wn{constructor(e,t,n){this.value=e,this.name=t,this.sourceSpan=n}visit(e,t){return e.visitIcuPlaceholder(this,t)}}function zn(e){return function(e){const t=nn(e),n=function(e,t){const n=e.length+3>>>2,s=[];for(let r=0;r<n;r++)s[r]=os(e,4*r,t);return s}(t,ts.Big),s=8*t.length,r=function(e,t){const n=[];for(let e=0;e<80;e++)n.push(void 0);return n}();let i=1732584193,a=4023233417,o=2562383102,l=271733878,c=3285377520;n[s>>5]|=128<<24-s%32,n[15+(s+64>>9<<4)]=s;for(let e=0;e<n.length;e+=16){const t=i,s=a,u=o,p=l,h=c;for(let t=0;t<80;t++){r[t]=t<16?n[e+t]:is(r[t-3]^r[t-8]^r[t-14]^r[t-16],1);const s=Yn(t,a,o,l),u=s[0],p=s[1],h=[is(i,5),u,c,p,r[t]].reduce(ns);c=l,l=o,o=is(a,30),a=i,i=h}i=ns(i,t),a=ns(a,s),o=ns(o,u),l=ns(l,p),c=ns(c,h)}return function(e){let t="";for(let n=0;n<e.length;n++){const s=as(e,n);t+=(s>>>4).toString(16)+(15&s).toString(16)}return t.toLowerCase()}(ls([i,a,o,l,c]))}((t=e.nodes,t.map(e=>e.visit(Gn,null))).join("")+`[${e.meaning}]`);var t}function Kn(e){const t=new Qn;return function(e,t=""){let n=Zn(e);if(t){const e=Zn(t);n=function(e,t){const n=e[0],s=t[0],r=ss(e[1],t[1]),i=r[0],a=r[1];return[ns(ns(n,s),i),a]}(function(e,t){const n=e[0],s=e[1];return[n<<1|s>>>31,s<<1|n>>>31]}(n),e)}return function(e){let t="",n="1";for(let s=e.length-1;s>=0;s--)t=cs(t,us(as(e,s),n)),n=us(256,n);return t.split("").reverse().join("")}(ls([2147483647&n[0],n[1]]))}(e.nodes.map(e=>e.visit(t,null)).join(""),e.meaning)}class Xn{visitText(e,t){return e.value}visitContainer(e,t){return`[${e.children.map(e=>e.visit(this)).join(", ")}]`}visitIcu(e,t){const n=Object.keys(e.cases).map(t=>`${t} {${e.cases[t].visit(this)}}`);return`{${e.expression}, ${e.type}, ${n.join(", ")}}`}visitTagPlaceholder(e,t){return e.isVoid?`<ph tag name="${e.startName}"/>`:`<ph tag name="${e.startName}">${e.children.map(e=>e.visit(this)).join(", ")}</ph name="${e.closeName}">`}visitPlaceholder(e,t){return e.value?`<ph name="${e.name}">${e.value}</ph>`:`<ph name="${e.name}"/>`}visitIcuPlaceholder(e,t){return`<ph icu name="${e.name}">${e.value.visit(this)}</ph>`}}const Gn=new Xn;class Qn extends Xn{visitIcu(e,t){let n=Object.keys(e.cases).map(t=>`${t} {${e.cases[t].visit(this)}}`);return`{${e.type}, ${n.join(", ")}}`}}function Yn(e,t,n,s){return e<20?[t&n|~t&s,1518500249]:e<40?[t^n^s,1859775393]:e<60?[t&n|t&s|n&s,2400959708]:[t^n^s,3395469782]}function Zn(e){const t=nn(e);let n=Jn(t,0),s=Jn(t,102072);return 0!=n||0!=s&&1!=s||(n^=319790063,s^=-1801410264),[n,s]}function Jn(e,t){let n,s=2654435769,r=2654435769;const i=e.length;for(n=0;n+12<=i;n+=12){s=ns(s,os(e,n,ts.Little)),r=ns(r,os(e,n+4,ts.Little));const i=es(s,r,t=ns(t,os(e,n+8,ts.Little)));s=i[0],r=i[1],t=i[2]}return s=ns(s,os(e,n,ts.Little)),r=ns(r,os(e,n+4,ts.Little)),t=ns(t,i),es(s,r,t=ns(t,os(e,n+8,ts.Little)<<8))[2]}function es(e,t,n){return e=rs(e,t),e=rs(e,n),e^=n>>>13,t=rs(t,n),t=rs(t,e),t^=e<<8,n=rs(n,e),n=rs(n,t),n^=t>>>13,e=rs(e,t),e=rs(e,n),e^=n>>>12,t=rs(t,n),t=rs(t,e),t^=e<<16,n=rs(n,e),n=rs(n,t),n^=t>>>5,e=rs(e,t),e=rs(e,n),e^=n>>>3,t=rs(t,n),t=rs(t,e),t^=e<<10,n=rs(n,e),n=rs(n,t),[e,t,n^=t>>>15]}var ts;function ns(e,t){return ss(e,t)[1]}function ss(e,t){const n=(65535&e)+(65535&t),s=(e>>>16)+(t>>>16)+(n>>>16);return[s>>>16,s<<16|65535&n]}function rs(e,t){const n=(65535&e)-(65535&t);return(e>>16)-(t>>16)+(n>>16)<<16|65535&n}function is(e,t){return e<<t|e>>>32-t}function as(e,t){return t>=e.length?0:255&e.charCodeAt(t)}function os(e,t,n){let s=0;if(n===ts.Big)for(let n=0;n<4;n++)s+=as(e,t+n)<<24-8*n;else for(let n=0;n<4;n++)s+=as(e,t+n)<<8*n;return s}function ls(e){return e.reduce((e,t)=>e+function(e){let t="";for(let n=0;n<4;n++)t+=String.fromCharCode(e>>>8*(3-n)&255);return t}(t),"")}function cs(e,t){let n="";const s=Math.max(e.length,t.length);for(let r=0,i=0;r<s||i;r++){const s=i+ +(e[r]||0)+ +(t[r]||0);s>=10?(i=1,n+=s-10):(i=0,n+=s)}return n}function us(e,t){let n="",s=t;for(;0!==e;e>>>=1)1&e&&(n=cs(n,s)),s=cs(s,s);return n}function ps(e){return"i18n"===e||e.startsWith("i18n-")}function hs(e){return e instanceof $n}function ds(e){return hs(e)&&1===e.nodes.length&&e.nodes[0]instanceof Un}function ms(e){return!!e.i18n}function gs(e){return e.nodes[0]}function fs(e,t=0){return`�${e}${t>0?":"+t:""}�`}function vs(e=0){let t=e;return()=>t++}function ys(e){const t={};return e.forEach((e,n)=>{t[n]=Xt(e.length>1?`[${e.join("|")}]`:e[0])}),t}function xs(e,t,...n){const s=e.get(t)||[];s.push(...n),e.set(t,s)}function Ss(e,t=0,n=0){const s=t,r=new Map,i=e instanceof $n?e.nodes.find(e=>e instanceof jn):e;return i&&i.children.filter(e=>e instanceof Hn).forEach((e,t)=>{const i=fs(s+t,n);xs(r,e.name,i)}),r}function Es(e={},t){const n={};return e&&Object.keys(e).length&&Object.keys(e).forEach(s=>n[_s(s,t)]=e[s]),n}function _s(e,t=!0){const n=e.toUpperCase().replace(/[^A-Z0-9_]/g,"_");if(!t)return n;const s=n.split("_");if(1===s.length)return e.toLowerCase();let r;/^\d+$/.test(s[s.length-1])&&(r=s.pop());let i=s.shift().toLowerCase();return s.length&&(i+=s.map(e=>e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()).join("")),r?`${i}_${r}`:i}function Cs(e){return("MSG_"+e).toUpperCase()}function ws(e){return new Rt(e.name,void 0,je,void 0,e.sourceSpan)}!function(e){e[e.Little=0]="Little",e[e.Big=1]="Big"}(ts||(ts={}));const bs=/[-.]/;function Is(e,t){let n=null;return()=>(n||(e.push(new Rt("_t",void 0,Ve)),n=Vt(t)),n)}function Ts(e){if(this)throw new Error(`Builder ${this.constructor.name} doesn't support ${e} yet`);throw new Error(`Feature ${e} is not supported yet`)}function Ns(e){throw new Error(`Invalid state: Visitor ${this.constructor.name} doesn't handle ${e.constructor.name}`)}function As(e){return Array.isArray(e)?Ht(e.map(As)):Xt(e,je)}function Ps(e,t){return Object.getOwnPropertyNames(e).length>0?function(e,t){return Wt(Object.getOwnPropertyNames(e).map(n=>{const s=e[n];let r,i,a;return Array.isArray(s)?[i,r]=s:[r,i]=Zt(n,[n,s]),a=r,{key:a,quoted:bs.test(a),value:t&&i!==r?Ht([As(i),As(r)]):As(i)}}))}(e,t):null}function ks(e){for(;Gt(e[e.length-1]);)e.pop();return e}function Os(e,t){if(Array.isArray(e.predicate)){let n=[];return e.predicate.forEach(e=>{const t=e.split(",").map(e=>Xt(e.trim()));n.push(...t)}),t.getConstLiteral(Ht(n),!0)}return e.predicate}class Ms{constructor(){this.values=[]}set(e,t){t&&this.values.push({key:e,value:t,quoted:!1})}toLiteralMap(){return Wt(this.values)}}function Ls(e,t,n){let s=jt(e,null,n);if(t.length>0)for(let e=0;e<t.length;e++)s=s.callFn(t[e],n);else s=s.callFn([],n);return s}function Rs(e){const{expressions:t,strings:n}=e;return 1===t.length&&2===n.length&&""===n[0]&&""===n[1]?1:t.length+n.length}var Ds,Fs,Bs;function $s(e){const t=Vt("t"),n=[];let s=We;const r=js(e)?t:new wt(Ke.Or,t,e.internalType);let i=null;if(null!==e.deps)"invalid"!==e.deps&&(i=new at(r,Vs(e.deps,e.injectFn,e.target===Fs.Pipe)),s=function(e){let t=!1;const n=e.map(e=>{const n=function(e){const t=[];return e.resolved===Bs.Attribute&&null!==e.attribute&&t.push({key:"attribute",value:e.attribute,quoted:!1}),e.optional&&t.push({key:"optional",value:Xt(!0),quoted:!1}),e.host&&t.push({key:"host",value:Xt(!0),quoted:!1}),e.self&&t.push({key:"self",value:Xt(!0),quoted:!1}),e.skipSelf&&t.push({key:"skipSelf",value:Xt(!0),quoted:!1}),t.length>0?Wt(t):null}(e);return null!==n?(t=!0,n):Xt(null)});return t?Ut(Ht(n)):We}(e.deps));else{const t=Vt(`ɵ${e.name}_BaseFactory`),s=jt(_n.getInheritedFactory),a=t.set(s.callFn([e.internalType],void 0,!0)).toDeclStmt(je,[Ot.Exported,Ot.Final]);n.push(a),i=t.callFn([r])}const a=i,o=[];let l=null;function c(e){const n=Vt("r");o.push(n.set(Pt).toDeclStmt());let s=null;return s=null!==a?n.set(a).toStmt():jt(_n.invalidFactory).callFn([]).toStmt(),o.push(Kt(t,[s],[n.set(e).toStmt()])),n}if(js(e)&&e.delegateType===Ds.Factory){const t=Vt(`ɵ${e.name}_BaseFactory`),s=jt(_n.getFactoryOf);if(e.delegate.isEquivalent(e.internalType))throw new Error("Illegal state: compiling factory that delegates to itself");const r=t.set(s.callFn([e.delegate])).toDeclStmt(je,[Ot.Exported,Ot.Final]);n.push(r),l=c(t.callFn([]))}else if(js(e)){const t=Vs(e.delegateDeps,e.injectFn,e.target===Fs.Pipe);l=c(new(e.delegateType===Ds.Class?at:it)(e.delegate,t))}else l=function(e){return void 0!==e.expression}(e)?c(e.expression):i;return o.push(null!==l?new Bt(l):jt(_n.invalidFactory).callFn([]).toStmt()),{factory:zt([new Et("t",Ve)],o,je,void 0,e.name+"_Factory"),statements:n,type:Ut(jt(_n.FactoryDef,[wn(e.type.type,e.typeArgumentCount),s]))}}function Vs(e,t,n){return e.map((e,s)=>function(e,t,n,s){switch(e.resolved){case Bs.Token:case Bs.ChangeDetectorRef:const r=0|(e.self?2:0)|(e.skipSelf?4:0)|(e.host?1:0)|(e.optional?8:0);let i=0!==r||e.optional?Xt(r):null;if(n&&e.resolved===Bs.ChangeDetectorRef)return jt(_n.injectPipeChangeDetectorRef).callFn(i?[i]:[]);const a=[e.token];return i&&a.push(i),jt(t).callFn(a);case Bs.Attribute:return jt(_n.injectAttribute).callFn([e.token]);case Bs.Invalid:return jt(_n.invalidFactoryDep).callFn([Xt(s)]);default:return Ts("Unknown R3ResolvedDependencyType: "+Bs[e.resolved])}}(e,t,n,s))}function js(e){return void 0!==e.delegateType}function Us(e,t){return{statements:[],factory:e.node===t.node?t.prop("ɵfac"):zt([new Et("t",Ve)],[new Bt(t.callMethod("ɵfac",[Vt("t")]))])}}!function(e){e[e.Class=0]="Class",e[e.Function=1]="Function",e[e.Factory=2]="Factory"}(Ds||(Ds={})),function(e){e[e.Directive=0]="Directive",e[e.Component=1]="Component",e[e.Injectable=2]="Injectable",e[e.Pipe=3]="Pipe",e[e.NgModule=4]="NgModule"}(Fs||(Fs={})),function(e){e[e.Token=0]="Token",e[e.Attribute=1]="Attribute",e[e.ChangeDetectorRef=2]="ChangeDetectorRef",e[e.Invalid=3]="Invalid"}(Bs||(Bs={}));const qs=[/^\s*$/,/[<>]/,/^[{}]$/,/&(#|[a-z])/i,/^\/\//];class Hs{constructor(e,t){this.start=e,this.end=t}static fromArray(e){return e?(function(e,t){if(!(null==t||Array.isArray(t)&&2==t.length))throw new Error("Expected 'interpolation' to be an array, [start, end].");if(null!=t){const e=t[0],n=t[1];qs.forEach(t=>{if(t.test(e)||t.test(n))throw new Error(`['${e}', '${n}'] contains unusable interpolation symbol.`)})}}(0,e),new Hs(e[0],e[1])):Ws}}const Ws=new Hs("{{","}}");class zs{constructor(e=null){this.file=e,this.sourcesContent=new Map,this.lines=[],this.lastCol0=0,this.hasMappings=!1}addSource(e,t=null){return this.sourcesContent.has(e)||this.sourcesContent.set(e,t),this}addLine(){return this.lines.push([]),this.lastCol0=0,this}addMapping(e,t,n,s){if(!this.currentLine)throw new Error("A line must be added before mappings can be added");if(null!=t&&!this.sourcesContent.has(t))throw new Error(`Unknown source file "${t}"`);if(null==e)throw new Error("The column in the generated code must be provided");if(e<this.lastCol0)throw new Error("Mapping should be added in output order");if(t&&(null==n||null==s))throw new Error("The source location must be provided when a source url is provided");return this.hasMappings=!0,this.lastCol0=e,this.currentLine.push({col0:e,sourceUrl:t,sourceLine0:n,sourceCol0:s}),this}get currentLine(){return this.lines.slice(-1)[0]}toJSON(){if(!this.hasMappings)return null;const e=new Map,t=[],n=[];Array.from(this.sourcesContent.keys()).forEach((s,r)=>{e.set(s,r),t.push(s),n.push(this.sourcesContent.get(s)||null)});let s="",r=0,i=0,a=0,o=0;return this.lines.forEach(t=>{r=0,s+=t.map(t=>{let n=Ks(t.col0-r);return r=t.col0,null!=t.sourceUrl&&(n+=Ks(e.get(t.sourceUrl)-i),i=e.get(t.sourceUrl),n+=Ks(t.sourceLine0-a),a=t.sourceLine0,n+=Ks(t.sourceCol0-o),o=t.sourceCol0),n}).join(","),s+=";"}),s=s.slice(0,-1),{file:this.file||"",version:3,sourceRoot:"",sources:t,sourcesContent:n,mappings:s}}toJsComment(){return this.hasMappings?"//# sourceMappingURL=data:application/json;base64,"+function(e){let t="";e=nn(e);for(let n=0;n<e.length;){const s=e.charCodeAt(n++),r=e.charCodeAt(n++),i=e.charCodeAt(n++);t+=Xs(s>>2),t+=Xs((3&s)<<4|(isNaN(r)?0:r>>4)),t+=isNaN(r)?"=":Xs((15&r)<<2|i>>6),t+=isNaN(r)||isNaN(i)?"=":Xs(63&i)}return t}(JSON.stringify(this,null,0)):""}}function Ks(e){e=e<0?1+(-e<<1):e<<1;let t="";do{let n=31&e;(e>>=5)>0&&(n|=32),t+=Xs(n)}while(e>0);return t}function Xs(e){if(e<0||e>=64)throw new Error("Can only encode value in the range [0, 63]");return"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[e]}const Gs=/'|\\|\n|\r|\$/g,Qs=/^[$A-Z_][0-9A-Z_$]*$/i,Ys=Vt("error",null,null),Zs=Vt("stack",null,null);class Js{constructor(e){this.indent=e,this.partsLength=0,this.parts=[],this.srcSpans=[]}}class er{constructor(e){this._indent=e,this._classes=[],this._preambleLineCount=0,this._lines=[new Js(e)]}static createRoot(){return new er(0)}get _currentLine(){return this._lines[this._lines.length-1]}println(e,t=""){this.print(e||null,t,!0)}lineIsEmpty(){return 0===this._currentLine.parts.length}lineLength(){return this._currentLine.indent*" ".length+this._currentLine.partsLength}print(e,t,n=!1){t.length>0&&(this._currentLine.parts.push(t),this._currentLine.partsLength+=t.length,this._currentLine.srcSpans.push(e&&e.sourceSpan||null)),n&&this._lines.push(new Js(this._indent))}removeEmptyLastLine(){this.lineIsEmpty()&&this._lines.pop()}incIndent(){this._indent++,this.lineIsEmpty()&&(this._currentLine.indent=this._indent)}decIndent(){this._indent--,this.lineIsEmpty()&&(this._currentLine.indent=this._indent)}pushClass(e){this._classes.push(e)}popClass(){return this._classes.pop()}get currentClass(){return this._classes.length>0?this._classes[this._classes.length-1]:null}toSource(){return this.sourceLines.map(e=>e.parts.length>0?nr(e.indent)+e.parts.join(""):"").join("\n")}toSourceMapGenerator(e,t=0){const n=new zs(e);let s=!1;const r=()=>{s||(n.addSource(e," ").addMapping(0,e,0,0),s=!0)};for(let e=0;e<t;e++)n.addLine(),r();return this.sourceLines.forEach((e,t)=>{n.addLine();const i=e.srcSpans,a=e.parts;let o=e.indent*" ".length,l=0;for(;l<i.length&&!i[l];)o+=a[l].length,l++;for(l<i.length&&0===t&&0===o?s=!0:r();l<i.length;){const e=i[l],t=e.start.file,s=e.start.line,r=e.start.col;for(n.addSource(t.url,t.content).addMapping(o,t.url,s,r),o+=a[l].length,l++;l<i.length&&(e===i[l]||!i[l]);)o+=a[l].length,l++}}),n}setPreambleLineCount(e){return this._preambleLineCount=e}spanOf(e,t){const n=this._lines[e-this._preambleLineCount];if(n){let e=t-nr(n.indent).length;for(let t=0;t<n.parts.length;t++){const s=n.parts[t];if(s.length>e)return n.srcSpans[t];e-=s.length}}return null}get sourceLines(){return this._lines.length&&0===this._lines[this._lines.length-1].parts.length?this._lines.slice(0,-1):this._lines}}function tr(e,t,n=!0){if(null==e)return null;const s=e.replace(Gs,(...e)=>"$"==e[0]?t?"\\$":"$":"\n"==e[0]?"\\n":"\r"==e[0]?"\\r":"\\"+e[0]);return n||!Qs.test(s)?`'${s}'`:s}function nr(e){let t="";for(let n=0;n<e;n++)t+=" ";return t}class sr{evaluateStatements(e,t,n,s){const r=new rr(n),i=er.createRoot();return t.length>0&&!t[0].isEquivalent(Xt("use strict").toStmt())&&(t=[Xt("use strict").toStmt(),...t]),r.visitAllStatements(t,i),r.createReturnStmt(i),this.evaluateCode(e,i,r.getArgs(),s)}evaluateCode(e,t,n,s){let r=`"use strict";${t.toSource()}\n//# sourceURL=${e}`;const i=[],a=[];for(const e in n)a.push(n[e]),i.push(e);if(s){const n=new Function(...i.concat("return null;")).toString(),s=n.slice(0,n.indexOf("return null;")).split("\n").length-1;r+="\n"+t.toSourceMapGenerator(e,s).toJsComment()}const o=new Function(...i.concat(r));return this.executeFunction(o,a)}executeFunction(e,t){return e(...t)}}class rr extends class extends class{constructor(e){this._escapeDollarInStrings=e}printLeadingComments(e,t){if(void 0!==e.leadingComments)for(const n of e.leadingComments)n instanceof Mt?t.print(e,`/*${n.toString()}*/`,n.trailingNewline):n.multiline?t.print(e,`/* ${n.text} */`,n.trailingNewline):n.text.split("\n").forEach(n=>{t.println(e,"// "+n)})}visitExpressionStmt(e,t){return this.printLeadingComments(e,t),e.expr.visitExpression(this,t),t.println(e,";"),null}visitReturnStmt(e,t){return this.printLeadingComments(e,t),t.print(e,"return "),e.value.visitExpression(this,t),t.println(e,";"),null}visitIfStmt(e,t){this.printLeadingComments(e,t),t.print(e,"if ("),e.condition.visitExpression(this,t),t.print(e,") {");const n=null!=e.falseCase&&e.falseCase.length>0;return e.trueCase.length<=1&&!n?(t.print(e," "),this.visitAllStatements(e.trueCase,t),t.removeEmptyLastLine(),t.print(e," ")):(t.println(),t.incIndent(),this.visitAllStatements(e.trueCase,t),t.decIndent(),n&&(t.println(e,"} else {"),t.incIndent(),this.visitAllStatements(e.falseCase,t),t.decIndent())),t.println(e,"}"),null}visitThrowStmt(e,t){return this.printLeadingComments(e,t),t.print(e,"throw "),e.error.visitExpression(this,t),t.println(e,";"),null}visitWriteVarExpr(e,t){const n=t.lineIsEmpty();return n||t.print(e,"("),t.print(e,e.name+" = "),e.value.visitExpression(this,t),n||t.print(e,")"),null}visitWriteKeyExpr(e,t){const n=t.lineIsEmpty();return n||t.print(e,"("),e.receiver.visitExpression(this,t),t.print(e,"["),e.index.visitExpression(this,t),t.print(e,"] = "),e.value.visitExpression(this,t),n||t.print(e,")"),null}visitWritePropExpr(e,t){const n=t.lineIsEmpty();return n||t.print(e,"("),e.receiver.visitExpression(this,t),t.print(e,`.${e.name} = `),e.value.visitExpression(this,t),n||t.print(e,")"),null}visitInvokeMethodExpr(e,t){e.receiver.visitExpression(this,t);let n=e.name;return null!=e.builtin&&(n=this.getBuiltinMethodName(e.builtin),null==n)||(t.print(e,`.${n}(`),this.visitAllExpressions(e.args,t,","),t.print(e,")")),null}visitInvokeFunctionExpr(e,t){return e.fn.visitExpression(this,t),t.print(e,"("),this.visitAllExpressions(e.args,t,","),t.print(e,")"),null}visitWrappedNodeExpr(e,t){throw new Error("Abstract emitter cannot visit WrappedNodeExpr.")}visitTypeofExpr(e,t){t.print(e,"typeof "),e.expr.visitExpression(this,t)}visitReadVarExpr(e,t){let n=e.name;if(null!=e.builtin)switch(e.builtin){case Xe.Super:n="super";break;case Xe.This:n="this";break;case Xe.CatchError:n=Ys.name;break;case Xe.CatchStack:n=Zs.name;break;default:throw new Error("Unknown builtin variable "+e.builtin)}return t.print(e,n),null}visitInstantiateExpr(e,t){return t.print(e,"new "),e.classExpr.visitExpression(this,t),t.print(e,"("),this.visitAllExpressions(e.args,t,","),t.print(e,")"),null}visitLiteralExpr(e,t){const n=e.value;return t.print(e,"string"==typeof n?tr(n,this._escapeDollarInStrings):""+n),null}visitLocalizedString(e,t){const n=e.serializeI18nHead();t.print(e,"$localize `"+n.raw);for(let n=1;n<e.messageParts.length;n++)t.print(e,"${"),e.expressions[n-1].visitExpression(this,t),t.print(e,"}"+e.serializeI18nTemplatePart(n).raw);return t.print(e,"`"),null}visitConditionalExpr(e,t){return t.print(e,"("),e.condition.visitExpression(this,t),t.print(e,"? "),e.trueCase.visitExpression(this,t),t.print(e,": "),e.falseCase.visitExpression(this,t),t.print(e,")"),null}visitNotExpr(e,t){return t.print(e,"!"),e.condition.visitExpression(this,t),null}visitAssertNotNullExpr(e,t){return e.condition.visitExpression(this,t),null}visitUnaryOperatorExpr(e,t){let n;switch(e.operator){case ze.Plus:n="+";break;case ze.Minus:n="-";break;default:throw new Error("Unknown operator "+e.operator)}return e.parens&&t.print(e,"("),t.print(e,n),e.expr.visitExpression(this,t),e.parens&&t.print(e,")"),null}visitBinaryOperatorExpr(e,t){let n;switch(e.operator){case Ke.Equals:n="==";break;case Ke.Identical:n="===";break;case Ke.NotEquals:n="!=";break;case Ke.NotIdentical:n="!==";break;case Ke.And:n="&&";break;case Ke.BitwiseAnd:n="&";break;case Ke.Or:n="||";break;case Ke.Plus:n="+";break;case Ke.Minus:n="-";break;case Ke.Divide:n="/";break;case Ke.Multiply:n="*";break;case Ke.Modulo:n="%";break;case Ke.Lower:n="<";break;case Ke.LowerEquals:n="<=";break;case Ke.Bigger:n=">";break;case Ke.BiggerEquals:n=">=";break;default:throw new Error("Unknown operator "+e.operator)}return e.parens&&t.print(e,"("),e.lhs.visitExpression(this,t),t.print(e,` ${n} `),e.rhs.visitExpression(this,t),e.parens&&t.print(e,")"),null}visitReadPropExpr(e,t){return e.receiver.visitExpression(this,t),t.print(e,"."),t.print(e,e.name),null}visitReadKeyExpr(e,t){return e.receiver.visitExpression(this,t),t.print(e,"["),e.index.visitExpression(this,t),t.print(e,"]"),null}visitLiteralArrayExpr(e,t){return t.print(e,"["),this.visitAllExpressions(e.entries,t,","),t.print(e,"]"),null}visitLiteralMapExpr(e,t){return t.print(e,"{"),this.visitAllObjects(n=>{t.print(e,tr(n.key,this._escapeDollarInStrings,n.quoted)+":"),n.value.visitExpression(this,t)},e.entries,t,","),t.print(e,"}"),null}visitCommaExpr(e,t){return t.print(e,"("),this.visitAllExpressions(e.parts,t,","),t.print(e,")"),null}visitAllExpressions(e,t,n){this.visitAllObjects(e=>e.visitExpression(this,t),e,t,n)}visitAllObjects(e,t,n,s){let r=!1;for(let i=0;i<t.length;i++)i>0&&(n.lineLength()>80?(n.print(null,s,!0),r||(n.incIndent(),n.incIndent(),r=!0)):n.print(null,s,!1)),e(t[i]);r&&(n.decIndent(),n.decIndent())}visitAllStatements(e,t){e.forEach(e=>e.visitStatement(this,t))}}{constructor(){super(!1)}visitDeclareClassStmt(e,t){return t.pushClass(e),this._visitClassConstructor(e,t),null!=e.parent&&(t.print(e,e.name+".prototype = Object.create("),e.parent.visitExpression(this,t),t.println(e,".prototype);")),e.getters.forEach(n=>this._visitClassGetter(e,n,t)),e.methods.forEach(n=>this._visitClassMethod(e,n,t)),t.popClass(),null}_visitClassConstructor(e,t){t.print(e,`function ${e.name}(`),null!=e.constructorMethod&&this._visitParams(e.constructorMethod.params,t),t.println(e,") {"),t.incIndent(),null!=e.constructorMethod&&e.constructorMethod.body.length>0&&(t.println(e,"var self = this;"),this.visitAllStatements(e.constructorMethod.body,t)),t.decIndent(),t.println(e,"}")}_visitClassGetter(e,t,n){n.println(e,`Object.defineProperty(${e.name}.prototype, '${t.name}', { get: function() {`),n.incIndent(),t.body.length>0&&(n.println(e,"var self = this;"),this.visitAllStatements(t.body,n)),n.decIndent(),n.println(e,"}});")}_visitClassMethod(e,t,n){n.print(e,`${e.name}.prototype.${t.name} = function(`),this._visitParams(t.params,n),n.println(e,") {"),n.incIndent(),t.body.length>0&&(n.println(e,"var self = this;"),this.visitAllStatements(t.body,n)),n.decIndent(),n.println(e,"};")}visitWrappedNodeExpr(e,t){throw new Error("Cannot emit a WrappedNodeExpr in Javascript.")}visitReadVarExpr(e,t){if(e.builtin===Xe.This)t.print(e,"self");else{if(e.builtin===Xe.Super)throw new Error("'super' needs to be handled at a parent ast node, not at the variable level!");super.visitReadVarExpr(e,t)}return null}visitDeclareVarStmt(e,t){return t.print(e,"var "+e.name),e.value&&(t.print(e," = "),e.value.visitExpression(this,t)),t.println(e,";"),null}visitCastExpr(e,t){return e.value.visitExpression(this,t),null}visitInvokeFunctionExpr(e,t){const n=e.fn;return n instanceof Ze&&n.builtin===Xe.Super?(t.currentClass.parent.visitExpression(this,t),t.print(e,".call(this"),e.args.length>0&&(t.print(e,", "),this.visitAllExpressions(e.args,t,",")),t.print(e,")")):super.visitInvokeFunctionExpr(e,t),null}visitFunctionExpr(e,t){return t.print(e,`function${e.name?" "+e.name:""}(`),this._visitParams(e.params,t),t.println(e,") {"),t.incIndent(),this.visitAllStatements(e.statements,t),t.decIndent(),t.print(e,"}"),null}visitDeclareFunctionStmt(e,t){return t.print(e,`function ${e.name}(`),this._visitParams(e.params,t),t.println(e,") {"),t.incIndent(),this.visitAllStatements(e.statements,t),t.decIndent(),t.println(e,"}"),null}visitTryCatchStmt(e,t){t.println(e,"try {"),t.incIndent(),this.visitAllStatements(e.bodyStmts,t),t.decIndent(),t.println(e,`} catch (${Ys.name}) {`),t.incIndent();const n=[Zs.set(Ys.prop("stack")).toDeclStmt(null,[Ot.Final])].concat(e.catchStmts);return this.visitAllStatements(n,t),t.decIndent(),t.println(e,"}"),null}visitLocalizedString(e,t){t.print(e,'$localize((this&&this.__makeTemplateObject||function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e})(');const n=[e.serializeI18nHead()];for(let t=1;t<e.messageParts.length;t++)n.push(e.serializeI18nTemplatePart(t));return t.print(e,`[${n.map(e=>tr(e.cooked,!1)).join(", ")}], `),t.print(e,`[${n.map(e=>tr(e.raw,!1)).join(", ")}])`),e.expressions.forEach(n=>{t.print(e,", "),n.visitExpression(this,t)}),t.print(e,")"),null}_visitParams(e,t){this.visitAllObjects(e=>t.print(null,e.name),e,t,",")}getBuiltinMethodName(e){let t;switch(e){case Ge.ConcatArray:t="concat";break;case Ge.SubscribeObservable:t="subscribe";break;case Ge.Bind:t="bind";break;default:throw new Error("Unknown builtin method: "+e)}return t}}{constructor(e){super(),this.reflector=e,this._evalArgNames=[],this._evalArgValues=[],this._evalExportedVars=[]}createReturnStmt(e){new Bt(new At(this._evalExportedVars.map(e=>new Nt(e,Vt(e),!1)))).visitStatement(this,e)}getArgs(){const e={};for(let t=0;t<this._evalArgNames.length;t++)e[this._evalArgNames[t]]=this._evalArgValues[t];return e}visitExternalExpr(e,t){return this._emitReferenceToExternal(e,this.reflector.resolveExternalReference(e.value),t),null}visitWrappedNodeExpr(e,t){return this._emitReferenceToExternal(e,e.node,t),null}visitDeclareVarStmt(e,t){return e.hasModifier(Ot.Exported)&&this._evalExportedVars.push(e.name),super.visitDeclareVarStmt(e,t)}visitDeclareFunctionStmt(e,t){return e.hasModifier(Ot.Exported)&&this._evalExportedVars.push(e.name),super.visitDeclareFunctionStmt(e,t)}visitDeclareClassStmt(e,t){return e.hasModifier(Ot.Exported)&&this._evalExportedVars.push(e.name),super.visitDeclareClassStmt(e,t)}_emitReferenceToExternal(e,t,n){let s=this._evalArgValues.indexOf(t);if(-1===s){s=this._evalArgValues.length,this._evalArgValues.push(t);const e=function(e){if(!e||!e.reference)return null;const t=e.reference;if(t instanceof class{constructor(e,t,n){this.filePath=e,this.name=t,this.members=n}assertNoMembers(){if(this.members.length)throw new Error(`Illegal state: symbol without members expected, but got ${JSON.stringify(this)}.`)}})return t.name;if(t.__anonymousType)return t.__anonymousType;let n=sn(t);return n.indexOf("(")>=0?(n="anonymous_"+xn++,t.__anonymousType=n):n=yn(n),n}({reference:t})||"val";this._evalArgNames.push(`jit_${e}_${s}`)}n.print(e,this._evalArgNames[s])}}function ir(e){return e>=9&&e<=32||160==e}function ar(e){return 48<=e&&e<=57}function or(e){return e>=97&&e<=122||e>=65&&e<=90}function lr(e){return 10===e||13===e}function cr(e){return 48<=e&&e<=55}class ur{constructor(e,t,n,s){this.file=e,this.offset=t,this.line=n,this.col=s}toString(){return null!=this.offset?`${this.file.url}@${this.line}:${this.col}`:this.file.url}moveBy(e){const t=this.file.content,n=t.length;let s=this.offset,r=this.line,i=this.col;for(;s>0&&e<0;)if(s--,e++,10==t.charCodeAt(s)){r--;const e=t.substr(0,s-1).lastIndexOf(String.fromCharCode(10));i=e>0?s-e:s}else i--;for(;s<n&&e>0;){const n=t.charCodeAt(s);s++,e--,10==n?(r++,i=0):i++}return new ur(this.file,s,r,i)}getContext(e,t){const n=this.file.content;let s=this.offset;if(null!=s){s>n.length-1&&(s=n.length-1);let r=s,i=0,a=0;for(;i<e&&s>0&&(s--,i++,"\n"!=n[s]||++a!=t););for(i=0,a=0;i<e&&r<n.length-1&&(r++,i++,"\n"!=n[r]||++a!=t););return{before:n.substring(s,this.offset),after:n.substring(this.offset,r+1)}}return null}}class pr{constructor(e,t){this.content=e,this.url=t}}class hr{constructor(e,t,n=e,s=null){this.start=e,this.end=t,this.fullStart=n,this.details=s}toString(){return this.start.file.content.substring(this.start.offset,this.end.offset)}}var dr,mr,gr,fr;!function(e){e[e.WARNING=0]="WARNING",e[e.ERROR=1]="ERROR"}(dr||(dr={}));class vr{constructor(e,t,n=dr.ERROR){this.span=e,this.msg=t,this.level=n}contextualMessage(){const e=this.span.start.getContext(100,3);return e?`${this.msg} ("${e.before}[${dr[this.level]} ->]${e.after}")`:this.msg}toString(){const e=this.span.details?", "+this.span.details:"";return`${this.contextualMessage()}: ${this.span.start}${e}`}}class yr{constructor(e){this.context=e}resolveExternalReference(e){if("@angular/core"!==e.moduleName)throw new Error(`Cannot resolve external reference to ${e.moduleName}, only references to @angular/core are supported.`);if(!this.context.hasOwnProperty(e.name))throw new Error(`No value provided for @angular/core symbol '${e.name}'.`);return this.context[e.name]}parameters(e){throw new Error("Not implemented.")}annotations(e){throw new Error("Not implemented.")}shallowAnnotations(e){throw new Error("Not implemented.")}tryAnnotations(e){throw new Error("Not implemented.")}propMetadata(e){throw new Error("Not implemented.")}hasLifecycleHook(e,t){throw new Error("Not implemented.")}guards(e){throw new Error("Not implemented.")}componentModuleUrl(e,t){throw new Error("Not implemented.")}}function xr(e,t=!1){return Wt(Object.keys(e).map(n=>({key:n,quoted:t,value:e[n]})))}function Sr(e){const t=e.map(e=>qt(e.type));return e.length>0?Ut(Ht(t)):We}function Er(e,t){const n=Ht(e.map(e=>e.value));return t?zt([],[new Bt(n)]):n}class _r{constructor(e,t,n,s){this.input=t,this.errLocation=n,this.ctxLocation=s,this.message=`Parser Error: ${e} ${n} [${t}] in ${s}`}}class Cr{constructor(e,t){this.start=e,this.end=t}toAbsolute(e){return new Gr(e+this.start,e+this.end)}}class wr{constructor(e,t){this.span=e,this.sourceSpan=t}visit(e,t=null){return null}toString(){return"AST"}}class br extends wr{constructor(e,t,n){super(e,t),this.nameSpan=n}}class Ir extends wr{constructor(e,t,n,s,r){super(e,t),this.prefix=n,this.uninterpretedExpression=s,this.location=r}visit(e,t=null){return e.visitQuote(this,t)}toString(){return"Quote"}}class Tr extends wr{visit(e,t=null){}}class Nr extends wr{visit(e,t=null){return e.visitImplicitReceiver(this,t)}}class Ar extends Nr{visit(e,t=null){var n;return null===(n=e.visitThisReceiver)||void 0===n?void 0:n.call(e,this,t)}}class Pr extends wr{constructor(e,t,n){super(e,t),this.expressions=n}visit(e,t=null){return e.visitChain(this,t)}}class kr extends wr{constructor(e,t,n,s,r){super(e,t),this.condition=n,this.trueExp=s,this.falseExp=r}visit(e,t=null){return e.visitConditional(this,t)}}class Or extends br{constructor(e,t,n,s,r){super(e,t,n),this.receiver=s,this.name=r}visit(e,t=null){return e.visitPropertyRead(this,t)}}class Mr extends br{constructor(e,t,n,s,r,i){super(e,t,n),this.receiver=s,this.name=r,this.value=i}visit(e,t=null){return e.visitPropertyWrite(this,t)}}class Lr extends br{constructor(e,t,n,s,r){super(e,t,n),this.receiver=s,this.name=r}visit(e,t=null){return e.visitSafePropertyRead(this,t)}}class Rr extends wr{constructor(e,t,n,s){super(e,t),this.obj=n,this.key=s}visit(e,t=null){return e.visitKeyedRead(this,t)}}class Dr extends wr{constructor(e,t,n,s,r){super(e,t),this.obj=n,this.key=s,this.value=r}visit(e,t=null){return e.visitKeyedWrite(this,t)}}class Fr extends br{constructor(e,t,n,s,r,i){super(e,t,i),this.exp=n,this.name=s,this.args=r}visit(e,t=null){return e.visitPipe(this,t)}}class Br extends wr{constructor(e,t,n){super(e,t),this.value=n}visit(e,t=null){return e.visitLiteralPrimitive(this,t)}}class $r extends wr{constructor(e,t,n){super(e,t),this.expressions=n}visit(e,t=null){return e.visitLiteralArray(this,t)}}class Vr extends wr{constructor(e,t,n,s){super(e,t),this.keys=n,this.values=s}visit(e,t=null){return e.visitLiteralMap(this,t)}}class jr extends wr{constructor(e,t,n,s){super(e,t),this.strings=n,this.expressions=s}visit(e,t=null){return e.visitInterpolation(this,t)}}class Ur extends wr{constructor(e,t,n,s,r){super(e,t),this.operation=n,this.left=s,this.right=r}visit(e,t=null){return e.visitBinary(this,t)}}class qr extends Ur{constructor(e,t,n,s,r,i,a){super(e,t,r,i,a),this.operator=n,this.expr=s}static createMinus(e,t,n){return new qr(e,t,"-",n,"-",new Br(e,t,0),n)}static createPlus(e,t,n){return new qr(e,t,"+",n,"-",n,new Br(e,t,0))}visit(e,t=null){return void 0!==e.visitUnary?e.visitUnary(this,t):e.visitBinary(this,t)}}class Hr extends wr{constructor(e,t,n){super(e,t),this.expression=n}visit(e,t=null){return e.visitPrefixNot(this,t)}}class Wr extends wr{constructor(e,t,n){super(e,t),this.expression=n}visit(e,t=null){return e.visitNonNullAssert(this,t)}}class zr extends br{constructor(e,t,n,s,r,i){super(e,t,n),this.receiver=s,this.name=r,this.args=i}visit(e,t=null){return e.visitMethodCall(this,t)}}class Kr extends br{constructor(e,t,n,s,r,i){super(e,t,n),this.receiver=s,this.name=r,this.args=i}visit(e,t=null){return e.visitSafeMethodCall(this,t)}}class Xr extends wr{constructor(e,t,n,s){super(e,t),this.target=n,this.args=s}visit(e,t=null){return e.visitFunctionCall(this,t)}}class Gr{constructor(e,t){this.start=e,this.end=t}}class Qr extends wr{constructor(e,t,n,s,r){super(new Cr(0,null===t?0:t.length),new Gr(s,null===t?s:s+t.length)),this.ast=e,this.source=t,this.location=n,this.errors=r}visit(e,t=null){return e.visitASTWithSource?e.visitASTWithSource(this,t):this.ast.visit(e,t)}toString(){return`${this.source} in ${this.location}`}}class Yr{constructor(e,t,n){this.sourceSpan=e,this.key=t,this.value=n}}class Zr{constructor(e,t,n){this.sourceSpan=e,this.key=t,this.value=n}}class Jr{visit(e,t){e.visit(this,t)}visitUnary(e,t){this.visit(e.expr,t)}visitBinary(e,t){this.visit(e.left,t),this.visit(e.right,t)}visitChain(e,t){this.visitAll(e.expressions,t)}visitConditional(e,t){this.visit(e.condition,t),this.visit(e.trueExp,t),this.visit(e.falseExp,t)}visitPipe(e,t){this.visit(e.exp,t),this.visitAll(e.args,t)}visitFunctionCall(e,t){e.target&&this.visit(e.target,t),this.visitAll(e.args,t)}visitImplicitReceiver(e,t){}visitThisReceiver(e,t){}visitInterpolation(e,t){this.visitAll(e.expressions,t)}visitKeyedRead(e,t){this.visit(e.obj,t),this.visit(e.key,t)}visitKeyedWrite(e,t){this.visit(e.obj,t),this.visit(e.key,t),this.visit(e.value,t)}visitLiteralArray(e,t){this.visitAll(e.expressions,t)}visitLiteralMap(e,t){this.visitAll(e.values,t)}visitLiteralPrimitive(e,t){}visitMethodCall(e,t){this.visit(e.receiver,t),this.visitAll(e.args,t)}visitPrefixNot(e,t){this.visit(e.expression,t)}visitNonNullAssert(e,t){this.visit(e.expression,t)}visitPropertyRead(e,t){this.visit(e.receiver,t)}visitPropertyWrite(e,t){this.visit(e.receiver,t),this.visit(e.value,t)}visitSafePropertyRead(e,t){this.visit(e.receiver,t)}visitSafeMethodCall(e,t){this.visit(e.receiver,t),this.visitAll(e.args,t)}visitQuote(e,t){}visitAll(e,t){for(const n of e)this.visit(n,t)}}class ei{constructor(e,t,n,s,r,i){this.name=e,this.expression=t,this.type=n,this.sourceSpan=s,this.keySpan=r,this.valueSpan=i,this.isLiteral=this.type===mr.LITERAL_ATTR,this.isAnimation=this.type===mr.ANIMATION}}!function(e){e[e.DEFAULT=0]="DEFAULT",e[e.LITERAL_ATTR=1]="LITERAL_ATTR",e[e.ANIMATION=2]="ANIMATION"}(mr||(mr={}));class ti{constructor(e,t,n,s,r,i){this.name=e,this.targetOrPhase=t,this.type=n,this.handler=s,this.sourceSpan=r,this.handlerSpan=i}}class ni{constructor(e,t,n,s,r){this.name=e,this.value=t,this.sourceSpan=n,this.keySpan=s,this.valueSpan=r}}class si{constructor(e,t,n,s,r,i,a,o){this.name=e,this.type=t,this.securityContext=n,this.value=s,this.unit=r,this.sourceSpan=i,this.keySpan=a,this.valueSpan=o}}class ri{}ri.event=Vt("$event");class ii{constructor(e,t){this.stmts=e,this.allowDefault=t,this.render3Stmts=e.map(e=>e instanceof Rt&&e.name==t.name&&e.value instanceof wt?new Bt(e.value.lhs.value):e)}}class ai{constructor(e,t){this.stmts=e,this.currValExpr=t}}function oi(e,t,n,s,r,i){e||(e=new gi);const a=new mi(e,t,s,i),o=n.visit(a,fr.Expression),l=li(a,s);if(a.usesImplicitReceiver&&e.notifyImplicitReceiverUse(),0===a.temporaryCount&&r==gr.TrySimple)return new ai([],o);if(r===gr.Expression)return new ai(l,o);const c=function(e){return Vt("currVal_"+e)}(s);return l.push(c.set(o).toDeclStmt(Ve,[Ot.Final])),new ai(l,c)}function li(e,t){const n=[];for(let s=0;s<e.temporaryCount;s++)n.push(ui(t,s));return n}function ci(e,t){return`tmp_${e}_${t}`}function ui(e,t){return new Rt(ci(e,t),Pt)}function pi(e,t){if(e!==fr.Expression)throw new Error("Expected an expression, but saw "+t)}function hi(e,t){return e===fr.Statement?t.toStmt():t}!function(e){e[e.General=0]="General",e[e.TrySimple=1]="TrySimple",e[e.Expression=2]="Expression"}(gr||(gr={})),function(e){e[e.Statement=0]="Statement",e[e.Expression=1]="Expression"}(fr||(fr={}));class di extends class{visitImplicitReceiver(e,t){return e}visitThisReceiver(e,t){return e}visitInterpolation(e,t){return new jr(e.span,e.sourceSpan,e.strings,this.visitAll(e.expressions))}visitLiteralPrimitive(e,t){return new Br(e.span,e.sourceSpan,e.value)}visitPropertyRead(e,t){return new Or(e.span,e.sourceSpan,e.nameSpan,e.receiver.visit(this),e.name)}visitPropertyWrite(e,t){return new Mr(e.span,e.sourceSpan,e.nameSpan,e.receiver.visit(this),e.name,e.value.visit(this))}visitSafePropertyRead(e,t){return new Lr(e.span,e.sourceSpan,e.nameSpan,e.receiver.visit(this),e.name)}visitMethodCall(e,t){return new zr(e.span,e.sourceSpan,e.nameSpan,e.receiver.visit(this),e.name,this.visitAll(e.args))}visitSafeMethodCall(e,t){return new Kr(e.span,e.sourceSpan,e.nameSpan,e.receiver.visit(this),e.name,this.visitAll(e.args))}visitFunctionCall(e,t){return new Xr(e.span,e.sourceSpan,e.target.visit(this),this.visitAll(e.args))}visitLiteralArray(e,t){return new $r(e.span,e.sourceSpan,this.visitAll(e.expressions))}visitLiteralMap(e,t){return new Vr(e.span,e.sourceSpan,e.keys,this.visitAll(e.values))}visitUnary(e,t){switch(e.operator){case"+":return qr.createPlus(e.span,e.sourceSpan,e.expr.visit(this));case"-":return qr.createMinus(e.span,e.sourceSpan,e.expr.visit(this));default:throw new Error("Unknown unary operator "+e.operator)}}visitBinary(e,t){return new Ur(e.span,e.sourceSpan,e.operation,e.left.visit(this),e.right.visit(this))}visitPrefixNot(e,t){return new Hr(e.span,e.sourceSpan,e.expression.visit(this))}visitNonNullAssert(e,t){return new Wr(e.span,e.sourceSpan,e.expression.visit(this))}visitConditional(e,t){return new kr(e.span,e.sourceSpan,e.condition.visit(this),e.trueExp.visit(this),e.falseExp.visit(this))}visitPipe(e,t){return new Fr(e.span,e.sourceSpan,e.exp.visit(this),e.name,this.visitAll(e.args),e.nameSpan)}visitKeyedRead(e,t){return new Rr(e.span,e.sourceSpan,e.obj.visit(this),e.key.visit(this))}visitKeyedWrite(e,t){return new Dr(e.span,e.sourceSpan,e.obj.visit(this),e.key.visit(this),e.value.visit(this))}visitAll(e){const t=[];for(let n=0;n<e.length;++n)t[n]=e[n].visit(this);return t}visitChain(e,t){return new Pr(e.span,e.sourceSpan,this.visitAll(e.expressions))}visitQuote(e,t){return new Ir(e.span,e.sourceSpan,e.prefix,e.uninterpretedExpression,e.location)}}{constructor(e){super(),this._converterFactory=e}visitPipe(e,t){const n=[e.exp,...e.args].map(e=>e.visit(this,t));return new fi(e.span,e.sourceSpan,n,this._converterFactory.createPipeConverter(e.name,n.length))}visitLiteralArray(e,t){const n=e.expressions.map(e=>e.visit(this,t));return new fi(e.span,e.sourceSpan,n,this._converterFactory.createLiteralArrayConverter(e.expressions.length))}visitLiteralMap(e,t){const n=e.values.map(e=>e.visit(this,t));return new fi(e.span,e.sourceSpan,n,this._converterFactory.createLiteralMapConverter(e.keys))}}class mi{constructor(e,t,n,s,r,i){this._localResolver=e,this._implicitReceiver=t,this.bindingId=n,this.interpolationFunction=s,this.baseSourceSpan=r,this.implicitReceiverAccesses=i,this._nodeMap=new Map,this._resultMap=new Map,this._currentTemporary=0,this.temporaryCount=0,this.usesImplicitReceiver=!1}visitUnary(e,t){let n;switch(e.operator){case"+":n=ze.Plus;break;case"-":n=ze.Minus;break;default:throw new Error("Unsupported operator "+e.operator)}return hi(t,new Ct(n,this._visit(e.expr,fr.Expression),void 0,this.convertSourceSpan(e.span)))}visitBinary(e,t){let n;switch(e.operation){case"+":n=Ke.Plus;break;case"-":n=Ke.Minus;break;case"*":n=Ke.Multiply;break;case"/":n=Ke.Divide;break;case"%":n=Ke.Modulo;break;case"&&":n=Ke.And;break;case"||":n=Ke.Or;break;case"==":n=Ke.Equals;break;case"!=":n=Ke.NotEquals;break;case"===":n=Ke.Identical;break;case"!==":n=Ke.NotIdentical;break;case"<":n=Ke.Lower;break;case">":n=Ke.Bigger;break;case"<=":n=Ke.LowerEquals;break;case">=":n=Ke.BiggerEquals;break;default:throw new Error("Unsupported operation "+e.operation)}return hi(t,new wt(n,this._visit(e.left,fr.Expression),this._visit(e.right,fr.Expression),void 0,this.convertSourceSpan(e.span)))}visitChain(e,t){return function(e,t){if(e!==fr.Statement)throw new Error("Expected a statement, but saw "+t)}(t,e),this.visitAll(e.expressions,t)}visitConditional(e,t){return hi(t,this._visit(e.condition,fr.Expression).conditional(this._visit(e.trueExp,fr.Expression),this._visit(e.falseExp,fr.Expression),this.convertSourceSpan(e.span)))}visitPipe(e,t){throw new Error("Illegal state: Pipes should have been converted into functions. Pipe: "+e.name)}visitFunctionCall(e,t){const n=this.visitAll(e.args,fr.Expression);let s;return s=e instanceof fi?e.converter(n):this._visit(e.target,fr.Expression).callFn(n,this.convertSourceSpan(e.span)),hi(t,s)}visitImplicitReceiver(e,t){return pi(t,e),this.usesImplicitReceiver=!0,this._implicitReceiver}visitThisReceiver(e,t){return this.visitImplicitReceiver(e,t)}visitInterpolation(e,t){pi(t,e);const n=[Xt(e.expressions.length)];for(let t=0;t<e.strings.length-1;t++)n.push(Xt(e.strings[t])),n.push(this._visit(e.expressions[t],fr.Expression));return n.push(Xt(e.strings[e.strings.length-1])),this.interpolationFunction?this.interpolationFunction(n):e.expressions.length<=9?jt(vn.inlineInterpolate).callFn(n):jt(vn.interpolate).callFn([n[0],Ht(n.slice(1),void 0,this.convertSourceSpan(e.span))])}visitKeyedRead(e,t){const n=this.leftMostSafeNode(e);return n?this.convertSafeAccess(e,n,t):hi(t,this._visit(e.obj,fr.Expression).key(this._visit(e.key,fr.Expression)))}visitKeyedWrite(e,t){const n=this._visit(e.obj,fr.Expression),s=this._visit(e.key,fr.Expression),r=this._visit(e.value,fr.Expression);return hi(t,n.key(s).set(r))}visitLiteralArray(e,t){throw new Error("Illegal State: literal arrays should have been converted into functions")}visitLiteralMap(e,t){throw new Error("Illegal State: literal maps should have been converted into functions")}visitLiteralPrimitive(e,t){return hi(t,Xt(e.value,null==e.value||!0===e.value||!0===e.value?je:void 0,this.convertSourceSpan(e.span)))}_getLocal(e,t){var n;return(null===(n=this._localResolver.globals)||void 0===n?void 0:n.has(e))&&t instanceof Ar?null:this._localResolver.getLocal(e)}visitMethodCall(e,t){if(e.receiver instanceof Nr&&!(e.receiver instanceof Ar)&&"$any"===e.name){const t=this.visitAll(e.args,fr.Expression);if(1!=t.length)throw new Error("Invalid call to $any, expected 1 argument but received "+(t.length||"none"));return t[0].cast(Ve,this.convertSourceSpan(e.span))}const n=this.leftMostSafeNode(e);if(n)return this.convertSafeAccess(e,n,t);{const n=this.visitAll(e.args,fr.Expression),s=this.usesImplicitReceiver;let r=null;const i=this._visit(e.receiver,fr.Expression);if(i===this._implicitReceiver){const t=this._getLocal(e.name,e.receiver);t&&(this.usesImplicitReceiver=s,r=t.callFn(n),this.addImplicitReceiverAccess(e.name))}return null==r&&(r=i.callMethod(e.name,n,this.convertSourceSpan(e.span))),hi(t,r)}}visitPrefixNot(e,t){return hi(t,(n=this._visit(e.expression,fr.Expression),new yt(n,void 0)));var n}visitNonNullAssert(e,t){return hi(t,(n=this._visit(e.expression,fr.Expression),new xt(n,void 0)));var n}visitPropertyRead(e,t){const n=this.leftMostSafeNode(e);if(n)return this.convertSafeAccess(e,n,t);{let n=null;const s=this.usesImplicitReceiver,r=this._visit(e.receiver,fr.Expression);return r===this._implicitReceiver&&(n=this._getLocal(e.name,e.receiver),n&&(this.usesImplicitReceiver=s,this.addImplicitReceiverAccess(e.name))),null==n&&(n=r.prop(e.name)),hi(t,n)}}visitPropertyWrite(e,t){const n=this._visit(e.receiver,fr.Expression),s=this.usesImplicitReceiver;let r=null;if(n===this._implicitReceiver){const t=this._getLocal(e.name,e.receiver);if(t){if(!(t instanceof bt))throw new Error(`Cannot assign value "${e.value instanceof Or?e.value.name:void 0}" to template variable "${e.name}". Template variables are read-only.`);r=t,this.usesImplicitReceiver=s,this.addImplicitReceiverAccess(e.name)}}return null===r&&(r=n.prop(e.name)),hi(t,r.set(this._visit(e.value,fr.Expression)))}visitSafePropertyRead(e,t){return this.convertSafeAccess(e,this.leftMostSafeNode(e),t)}visitSafeMethodCall(e,t){return this.convertSafeAccess(e,this.leftMostSafeNode(e),t)}visitAll(e,t){return e.map(e=>this._visit(e,t))}visitQuote(e,t){throw new Error(`Quotes are not supported for evaluation!\n Statement: ${e.uninterpretedExpression} located at ${e.location}`)}_visit(e,t){return this._resultMap.get(e)||(this._nodeMap.get(e)||e).visit(this,t)}convertSafeAccess(e,t,n){let s=this._visit(t.receiver,fr.Expression),r=void 0;this.needsTemporary(t.receiver)&&(r=this.allocateTemporary(),s=r.set(s),this._resultMap.set(t.receiver,r));const i=s.isBlank();this._nodeMap.set(t,t instanceof Kr?new zr(t.span,t.sourceSpan,t.nameSpan,t.receiver,t.name,t.args):new Or(t.span,t.sourceSpan,t.nameSpan,t.receiver,t.name));const a=this._visit(e,fr.Expression);return this._nodeMap.delete(t),r&&this.releaseTemporary(r),hi(n,i.conditional(Xt(null),a))}leftMostSafeNode(e){const t=(e,t)=>(this._nodeMap.get(t)||t).visit(e);return e.visit({visitUnary:e=>null,visitBinary:e=>null,visitChain:e=>null,visitConditional:e=>null,visitFunctionCall:e=>null,visitImplicitReceiver:e=>null,visitThisReceiver:e=>null,visitInterpolation:e=>null,visitKeyedRead(e){return t(this,e.obj)},visitKeyedWrite:e=>null,visitLiteralArray:e=>null,visitLiteralMap:e=>null,visitLiteralPrimitive:e=>null,visitMethodCall(e){return t(this,e.receiver)},visitPipe:e=>null,visitPrefixNot:e=>null,visitNonNullAssert:e=>null,visitPropertyRead(e){return t(this,e.receiver)},visitPropertyWrite:e=>null,visitQuote:e=>null,visitSafeMethodCall(e){return t(this,e.receiver)||e},visitSafePropertyRead(e){return t(this,e.receiver)||e}})}needsTemporary(e){const t=(e,t)=>t&&(this._nodeMap.get(t)||t).visit(e);return e.visit({visitUnary(e){return t(this,e.expr)},visitBinary(e){return t(this,e.left)||t(this,e.right)},visitChain:e=>!1,visitConditional(e){return t(this,e.condition)||t(this,e.trueExp)||t(this,e.falseExp)},visitFunctionCall:e=>!0,visitImplicitReceiver:e=>!1,visitThisReceiver:e=>!1,visitInterpolation(e){return((e,n)=>n.some(n=>t(e,n)))(this,e.expressions)},visitKeyedRead:e=>!1,visitKeyedWrite:e=>!1,visitLiteralArray:e=>!0,visitLiteralMap:e=>!0,visitLiteralPrimitive:e=>!1,visitMethodCall:e=>!0,visitPipe:e=>!0,visitPrefixNot(e){return t(this,e.expression)},visitNonNullAssert(e){return t(this,e.expression)},visitPropertyRead:e=>!1,visitPropertyWrite:e=>!1,visitQuote:e=>!1,visitSafeMethodCall:e=>!0,visitSafePropertyRead:e=>!1})}allocateTemporary(){const e=this._currentTemporary++;return this.temporaryCount=Math.max(this._currentTemporary,this.temporaryCount),new Ze(ci(this.bindingId,e))}releaseTemporary(e){if(this._currentTemporary--,e.name!=ci(this.bindingId,this._currentTemporary))throw new Error(`Temporary ${e.name} released out of order`)}convertSourceSpan(e){if(this.baseSourceSpan){const t=this.baseSourceSpan.start.moveBy(e.start),n=this.baseSourceSpan.start.moveBy(e.end),s=this.baseSourceSpan.fullStart.moveBy(e.start);return new hr(t,n,s)}return null}addImplicitReceiverAccess(e){this.implicitReceiverAccesses&&this.implicitReceiverAccesses.add(e)}}class gi{constructor(e){this.globals=e}notifyImplicitReceiverUse(){}getLocal(e){return e===ri.event.name?ri.event:null}}class fi extends Xr{constructor(e,t,n,s){super(e,t,null,n),this.args=n,this.converter=s}}class vi{constructor(){this.strictStyling=!0}shimCssText(e,t,n=""){const s=e.match(Di)||[];return e=function(e){return e.replace(Ri,"")}(e),e=this._insertDirectives(e),[this._scopeCssText(e,t,n),...s].join("\n")}_insertDirectives(e){return e=this._insertPolyfillDirectivesInCssText(e),this._insertPolyfillRulesInCssText(e)}_insertPolyfillDirectivesInCssText(e){return e.replace(xi,function(...e){return e[2]+"{"})}_insertPolyfillRulesInCssText(e){return e.replace(Si,(...e)=>{const t=e[0].replace(e[1],"").replace(e[2],"");return e[4]+t})}_scopeCssText(e,t,n){const s=this._extractUnscopedRulesFromCssText(e);return e=this._insertPolyfillHostInCssText(e),e=this._convertColonHost(e),e=this._convertColonHostContext(e),e=this._convertShadowDOMSelectors(e),t&&(e=this._scopeSelectors(e,t,n)),(e=e+"\n"+s).trim()}_extractUnscopedRulesFromCssText(e){let t,n="";for(Ei.lastIndex=0;null!==(t=Ei.exec(e));)n+=t[0].replace(t[2],"").replace(t[1],t[4])+"\n\n";return n}_convertColonHost(e){return this._convertColonRule(e,bi,this._colonHostPartReplacer)}_convertColonHostContext(e){return this._convertColonRule(e,Ii,this._colonHostContextPartReplacer)}_convertColonRule(e,t,n){return e.replace(t,function(...e){if(e[2]){const t=e[2].split(","),s=[];for(let r=0;r<t.length;r++){const i=t[r].trim();if(!i)break;s.push(n(Ti,i,e[3]))}return s.join(",")}return Ti+e[3]})}_colonHostContextPartReplacer(e,t,n){return t.indexOf(_i)>-1?this._colonHostPartReplacer(e,t,n):e+t+n+", "+t+" "+e+n}_colonHostPartReplacer(e,t,n){return e+t.replace(_i,"")+n}_convertShadowDOMSelectors(e){return Ai.reduce((e,t)=>e.replace(t," "),e)}_scopeSelectors(e,t,n){return function(e,t){const n=qi(e,Vi,"%QUOTED%"),s=qi(n.escapedString,$i,"%BLOCK%");let r=0,i=0;return s.escapedString.replace(Fi,(...e)=>{const n=e[2];let i="",a=e[4],o="";a&&a.startsWith("{%BLOCK%")&&(i=s.blocks[r++],a=a.substring("%BLOCK%".length+1),o="{");const l=t(new ji(n,i));return`${e[1]}${l.selector}${e[3]}${o}${l.content}${a}`}).replace(Bi,()=>n.blocks[i++])}(e,e=>{let s=e.selector,r=e.content;return"@"!=e.selector[0]?s=this._scopeSelector(e.selector,t,n,this.strictStyling):(e.selector.startsWith("@media")||e.selector.startsWith("@supports")||e.selector.startsWith("@page")||e.selector.startsWith("@document"))&&(r=this._scopeSelectors(e.content,t,n)),new ji(s,r)})}_scopeSelector(e,t,n,s){return e.split(",").map(e=>e.trim().split(Pi)).map(e=>{const[r,...i]=e;return[(e=>this._selectorNeedsScoping(e,t)?s?this._applyStrictSelectorScope(e,t,n):this._applySelectorScope(e,t,n):e)(r),...i].join(" ")}).join(", ")}_selectorNeedsScoping(e,t){return!this._makeScopeMatcher(t).test(e)}_makeScopeMatcher(e){return e=e.replace(/\[/g,"\\[").replace(/\]/g,"\\]"),new RegExp("^("+e+")"+ki,"m")}_applySelectorScope(e,t,n){return this._applySimpleSelectorScope(e,t,n)}_applySimpleSelectorScope(e,t,n){if(Oi.lastIndex=0,Oi.test(e)){const s=this.strictStyling?`[${n}]`:t;return e.replace(Ni,(e,t)=>t.replace(/([^:]*)(:*)(.*)/,(e,t,n,r)=>t+s+n+r)).replace(Oi,s+" ")}return t+" "+e}_applyStrictSelectorScope(e,t,n){const s="["+(t=t.replace(/\[is=([^\]]*)\]/g,(e,...t)=>t[0]))+"]",r=e=>{let r=e.trim();if(!r)return"";if(e.indexOf(Ti)>-1)r=this._applySimpleSelectorScope(e,t,n);else{const t=e.replace(Oi,"");if(t.length>0){const e=t.match(/([^:]*)(:*)(.*)/);e&&(r=e[1]+s+e[2]+e[3])}}return r},i=new yi(e);let a,o="",l=0;const c=/( |>|\+|~(?!=))\s*/g;let u=!((e=i.content()).indexOf(Ti)>-1);for(;null!==(a=c.exec(e));){const t=a[1],n=e.slice(l,a.index).trim();u=u||n.indexOf(Ti)>-1,o+=`${u?r(n):n} ${t} `,l=c.lastIndex}const p=e.substring(l);return u=u||p.indexOf(Ti)>-1,o+=u?r(p):p,i.restore(o)}_insertPolyfillHostInCssText(e){return e.replace(Li,Ci).replace(Mi,_i)}}class yi{constructor(e){this.placeholders=[],this.index=0,e=e.replace(/(\[[^\]]*\])/g,(e,t)=>{const n=`__ph-${this.index}__`;return this.placeholders.push(t),this.index++,n}),this._content=e.replace(/(:nth-[-\w]+)(\([^)]+\))/g,(e,t,n)=>{const s=`__ph-${this.index}__`;return this.placeholders.push(n),this.index++,t+s})}restore(e){return e.replace(/__ph-(\d+)__/g,(e,t)=>this.placeholders[+t])}content(){return this._content}}const xi=/polyfill-next-selector[^}]*content:[\s]*?(['"])(.*?)\1[;\s]*}([^{]*?){/gim,Si=/(polyfill-rule)[^}]*(content:[\s]*(['"])(.*?)\3)[;\s]*[^}]*}/gim,Ei=/(polyfill-unscoped-rule)[^}]*(content:[\s]*(['"])(.*?)\3)[;\s]*[^}]*}/gim,_i="-shadowcsshost",Ci="-shadowcsscontext",wi=")(?:\\(((?:\\([^)(]*\\)|[^)(]*)+?)\\))?([^,{]*)",bi=new RegExp("("+_i+wi,"gim"),Ii=new RegExp("("+Ci+wi,"gim"),Ti=_i+"-no-combinator",Ni=/-shadowcsshost-no-combinator([^\s]*)/,Ai=[/::shadow/g,/::content/g,/\/shadow-deep\//g,/\/shadow\//g],Pi=/(?:>>>)|(?:\/deep\/)|(?:::ng-deep)/g,ki="([>\\s~+[.,{:][\\s\\S]*)?$",Oi=/-shadowcsshost/gim,Mi=/:host/gim,Li=/:host-context/gim,Ri=/\/\*\s*[\s\S]*?\*\//g,Di=/\/\*\s*#\s*source(Mapping)?URL=[\s\S]+?\*\//g,Fi=/(\s*)([^;\{\}]+?)(\s*)((?:{%BLOCK%}?\s*;?)|(?:\s*;))/g,Bi=/%QUOTED%/g,$i=new Map([["{","}"]]),Vi=new Map([['"','"'],["'","'"]]);class ji{constructor(e,t){this.selector=e,this.content=t}}class Ui{constructor(e,t){this.escapedString=e,this.blocks=t}}function qi(e,t,n){const s=[],r=[];let i,a,o=0,l=0,c=-1;for(let u=0;u<e.length;u++){const p=e[u];"\\"===p?u++:p===a?(o--,0===o&&(r.push(e.substring(c,u)),s.push(n),l=u,c=-1,i=a=void 0)):p===i?o++:0===o&&t.has(p)&&(i=p,a=t.get(p),o=1,c=u+1,s.push(e.substring(l,c)))}return-1!==c?(r.push(e.substring(c)),s.push(n)):s.push(e.substring(l)),new Ui(s.join(""),r)}class Hi{constructor(e,t){this.sourceSpan=e,this.i18n=t}}class Wi extends Hi{constructor(e,t,n){super(t,n),this.value=e}visit(e,t){return e.visitText(this,t)}}class zi extends Hi{constructor(e,t,n,s,r,i){super(s,i),this.switchValue=e,this.type=t,this.cases=n,this.switchValueSourceSpan=r}visit(e,t){return e.visitExpansion(this,t)}}class Ki{constructor(e,t,n,s,r){this.value=e,this.expression=t,this.sourceSpan=n,this.valueSourceSpan=s,this.expSourceSpan=r}visit(e,t){return e.visitExpansionCase(this,t)}}class Xi extends Hi{constructor(e,t,n,s,r){super(n,r),this.name=e,this.value=t,this.valueSpan=s}visit(e,t){return e.visitAttribute(this,t)}}class Gi extends Hi{constructor(e,t,n,s,r,i=null,a){super(s,a),this.name=e,this.attrs=t,this.children=n,this.startSourceSpan=r,this.endSourceSpan=i}visit(e,t){return e.visitElement(this,t)}}class Qi{constructor(e,t){this.value=e,this.sourceSpan=t}visit(e,t){return e.visitComment(this,t)}}function Yi(e,t,n=null){const s=[],r=e.visit?t=>e.visit(t,n)||t.visit(e,n):t=>t.visit(e,n);return t.forEach(e=>{const t=r(e);t&&s.push(t)}),s}var Zi;!function(e){e[e.TAG_OPEN_START=0]="TAG_OPEN_START",e[e.TAG_OPEN_END=1]="TAG_OPEN_END",e[e.TAG_OPEN_END_VOID=2]="TAG_OPEN_END_VOID",e[e.TAG_CLOSE=3]="TAG_CLOSE",e[e.INCOMPLETE_TAG_OPEN=4]="INCOMPLETE_TAG_OPEN",e[e.TEXT=5]="TEXT",e[e.ESCAPABLE_RAW_TEXT=6]="ESCAPABLE_RAW_TEXT",e[e.RAW_TEXT=7]="RAW_TEXT",e[e.COMMENT_START=8]="COMMENT_START",e[e.COMMENT_END=9]="COMMENT_END",e[e.CDATA_START=10]="CDATA_START",e[e.CDATA_END=11]="CDATA_END",e[e.ATTR_NAME=12]="ATTR_NAME",e[e.ATTR_QUOTE=13]="ATTR_QUOTE",e[e.ATTR_VALUE=14]="ATTR_VALUE",e[e.DOC_TYPE=15]="DOC_TYPE",e[e.EXPANSION_FORM_START=16]="EXPANSION_FORM_START",e[e.EXPANSION_CASE_VALUE=17]="EXPANSION_CASE_VALUE",e[e.EXPANSION_CASE_EXP_START=18]="EXPANSION_CASE_EXP_START",e[e.EXPANSION_CASE_EXP_END=19]="EXPANSION_CASE_EXP_END",e[e.EXPANSION_FORM_END=20]="EXPANSION_FORM_END",e[e.EOF=21]="EOF"}(Zi||(Zi={}));class Ji{constructor(e,t,n){this.type=e,this.parts=t,this.sourceSpan=n}}class ea extends vr{constructor(e,t,n){super(n,e),this.tokenType=t}}class ta{constructor(e,t,n){this.tokens=e,this.errors=t,this.nonNormalizedIcuExpressions=n}}const na=/\r\n?/g;function sa(e){return`Unexpected character "${0===e?"EOF":String.fromCharCode(e)}"`}function ra(e){return`Unknown entity "${e}" - use the "&#<decimal>;" or "&#x<hex>;" syntax`}var ia;!function(e){e.HEX="hexadecimal",e.DEC="decimal"}(ia||(ia={}));class aa{constructor(e){this.error=e}}class oa{constructor(e,t,n){this._getTagDefinition=t,this._currentTokenStart=null,this._currentTokenType=null,this._expansionCaseStack=[],this._inInterpolation=!1,this.tokens=[],this.errors=[],this.nonNormalizedIcuExpressions=[],this._tokenizeIcu=n.tokenizeExpansionForms||!1,this._interpolationConfig=n.interpolationConfig||Ws,this._leadingTriviaCodePoints=n.leadingTriviaChars&&n.leadingTriviaChars.map(e=>e.codePointAt(0)||0);const s=n.range||{endPos:e.content.length,startPos:0,startLine:0,startCol:0};this._cursor=n.escapedString?new ma(e,s):new da(e,s),this._preserveLineEndings=n.preserveLineEndings||!1,this._escapedString=n.escapedString||!1,this._i18nNormalizeLineEndingsInICUs=n.i18nNormalizeLineEndingsInICUs||!1;try{this._cursor.init()}catch(e){this.handleError(e)}}_processCarriageReturns(e){return this._preserveLineEndings?e:e.replace(na,"\n")}tokenize(){for(;0!==this._cursor.peek();){const e=this._cursor.clone();try{this._attemptCharCode(60)?this._attemptCharCode(33)?this._attemptCharCode(91)?this._consumeCdata(e):this._attemptCharCode(45)?this._consumeComment(e):this._consumeDocType(e):this._attemptCharCode(47)?this._consumeTagClose(e):this._consumeTagOpen(e):this._tokenizeIcu&&this._tokenizeExpansionForm()||this._consumeText()}catch(e){this.handleError(e)}}this._beginToken(Zi.EOF),this._endToken([])}_tokenizeExpansionForm(){if(this.isExpansionFormStart())return this._consumeExpansionFormStart(),!0;if(125!==this._cursor.peek()&&this._isInExpansionForm())return this._consumeExpansionCaseStart(),!0;if(125===this._cursor.peek()){if(this._isInExpansionCase())return this._consumeExpansionCaseEnd(),!0;if(this._isInExpansionForm())return this._consumeExpansionFormEnd(),!0}return!1}_beginToken(e,t=this._cursor.clone()){this._currentTokenStart=t,this._currentTokenType=e}_endToken(e,t){if(null===this._currentTokenStart)throw new ea("Programming error - attempted to end a token when there was no start to the token",this._currentTokenType,this._cursor.getSpan(t));if(null===this._currentTokenType)throw new ea("Programming error - attempted to end a token which has no token type",null,this._cursor.getSpan(this._currentTokenStart));const n=new Ji(this._currentTokenType,e,this._cursor.getSpan(this._currentTokenStart,this._leadingTriviaCodePoints));return this.tokens.push(n),this._currentTokenStart=null,this._currentTokenType=null,n}_createError(e,t){this._isInExpansionForm()&&(e+=' (Do you have an unescaped "{" in your template? Use "{{ \'{\' }}") to escape it.)');const n=new ea(e,this._currentTokenType,t);return this._currentTokenStart=null,this._currentTokenType=null,new aa(n)}handleError(e){if(e instanceof ga&&(e=this._createError(e.msg,this._cursor.getSpan(e.cursor))),!(e instanceof aa))throw e;this.errors.push(e.error)}_attemptCharCode(e){return this._cursor.peek()===e&&(this._cursor.advance(),!0)}_attemptCharCodeCaseInsensitive(e){return t=e,ha(this._cursor.peek())==ha(t)&&(this._cursor.advance(),!0);var t}_requireCharCode(e){const t=this._cursor.clone();if(!this._attemptCharCode(e))throw this._createError(sa(this._cursor.peek()),this._cursor.getSpan(t))}_attemptStr(e){const t=e.length;if(this._cursor.charsLeft()<t)return!1;const n=this._cursor.clone();for(let s=0;s<t;s++)if(!this._attemptCharCode(e.charCodeAt(s)))return this._cursor=n,!1;return!0}_attemptStrCaseInsensitive(e){for(let t=0;t<e.length;t++)if(!this._attemptCharCodeCaseInsensitive(e.charCodeAt(t)))return!1;return!0}_requireStr(e){const t=this._cursor.clone();if(!this._attemptStr(e))throw this._createError(sa(this._cursor.peek()),this._cursor.getSpan(t))}_attemptCharCodeUntilFn(e){for(;!e(this._cursor.peek());)this._cursor.advance()}_requireCharCodeUntilFn(e,t){const n=this._cursor.clone();if(this._attemptCharCodeUntilFn(e),this._cursor.diff(n)<t)throw this._createError(sa(this._cursor.peek()),this._cursor.getSpan(n))}_attemptUntilChar(e){for(;this._cursor.peek()!==e;)this._cursor.advance()}_readChar(e){if(e&&38===this._cursor.peek())return this._decodeEntity();{const e=String.fromCodePoint(this._cursor.peek());return this._cursor.advance(),e}}_decodeEntity(){const e=this._cursor.clone();if(this._cursor.advance(),!this._attemptCharCode(35)){const t=this._cursor.clone();if(this._attemptCharCodeUntilFn(pa),59!=this._cursor.peek())return this._cursor=t,"&";const n=this._cursor.getChars(t);this._cursor.advance();const s=xe[n];if(!s)throw this._createError(ra(n),this._cursor.getSpan(e));return s}{const n=this._attemptCharCode(120)||this._attemptCharCode(88),s=this._cursor.clone();if(this._attemptCharCodeUntilFn(ua),59!=this._cursor.peek())throw this._cursor.advance(),this._createError((t=n?ia.HEX:ia.DEC,`Unable to parse entity "${this._cursor.getChars(e)}" - ${t} character reference entities must end with ";"`),this._cursor.getSpan());const r=this._cursor.getChars(s);this._cursor.advance();try{const e=parseInt(r,n?16:10);return String.fromCharCode(e)}catch(t){throw this._createError(ra(this._cursor.getChars(e)),this._cursor.getSpan())}}var t}_consumeRawText(e,t){this._beginToken(e?Zi.ESCAPABLE_RAW_TEXT:Zi.RAW_TEXT);const n=[];for(;;){const s=this._cursor.clone(),r=t();if(this._cursor=s,r)break;n.push(this._readChar(e))}return this._endToken([this._processCarriageReturns(n.join(""))])}_consumeComment(e){this._beginToken(Zi.COMMENT_START,e),this._requireCharCode(45),this._endToken([]),this._consumeRawText(!1,()=>this._attemptStr("--\x3e")),this._beginToken(Zi.COMMENT_END),this._requireStr("--\x3e"),this._endToken([])}_consumeCdata(e){this._beginToken(Zi.CDATA_START,e),this._requireStr("CDATA["),this._endToken([]),this._consumeRawText(!1,()=>this._attemptStr("]]>")),this._beginToken(Zi.CDATA_END),this._requireStr("]]>"),this._endToken([])}_consumeDocType(e){this._beginToken(Zi.DOC_TYPE,e);const t=this._cursor.clone();this._attemptUntilChar(62);const n=this._cursor.getChars(t);this._cursor.advance(),this._endToken([n])}_consumePrefixAndName(){const e=this._cursor.clone();let t="";for(;58!==this._cursor.peek()&&!(((n=this._cursor.peek())<97||122<n)&&(n<65||90<n)&&(n<48||n>57));)this._cursor.advance();var n;let s;return 58===this._cursor.peek()?(t=this._cursor.getChars(e),this._cursor.advance(),s=this._cursor.clone()):s=e,this._requireCharCodeUntilFn(ca,""===t?0:1),[t,this._cursor.getChars(s)]}_consumeTagOpen(e){let t,n,s;try{if(!or(this._cursor.peek()))throw this._createError(sa(this._cursor.peek()),this._cursor.getSpan(e));for(s=this._consumeTagOpenStart(e),n=s.parts[0],t=s.parts[1],this._attemptCharCodeUntilFn(la);47!==this._cursor.peek()&&62!==this._cursor.peek()&&60!==this._cursor.peek();)this._consumeAttributeName(),this._attemptCharCodeUntilFn(la),this._attemptCharCode(61)&&(this._attemptCharCodeUntilFn(la),this._consumeAttributeValue()),this._attemptCharCodeUntilFn(la);this._consumeTagOpenEnd()}catch(t){if(t instanceof aa)return void(s?s.type=Zi.INCOMPLETE_TAG_OPEN:(this._beginToken(Zi.TEXT,e),this._endToken(["<"])));throw t}const r=this._getTagDefinition(t).contentType;r===he.RAW_TEXT?this._consumeRawTextWithTagClose(n,t,!1):r===he.ESCAPABLE_RAW_TEXT&&this._consumeRawTextWithTagClose(n,t,!0)}_consumeRawTextWithTagClose(e,t,n){this._consumeRawText(n,()=>!!this._attemptCharCode(60)&&!!this._attemptCharCode(47)&&(this._attemptCharCodeUntilFn(la),!!this._attemptStrCaseInsensitive(t)&&(this._attemptCharCodeUntilFn(la),this._attemptCharCode(62)))),this._beginToken(Zi.TAG_CLOSE),this._requireCharCodeUntilFn(e=>62===e,3),this._cursor.advance(),this._endToken([e,t])}_consumeTagOpenStart(e){this._beginToken(Zi.TAG_OPEN_START,e);const t=this._consumePrefixAndName();return this._endToken(t)}_consumeAttributeName(){const e=this._cursor.peek();if(39===e||34===e)throw this._createError(sa(e),this._cursor.getSpan());this._beginToken(Zi.ATTR_NAME);const t=this._consumePrefixAndName();this._endToken(t)}_consumeAttributeValue(){let e;if(39===this._cursor.peek()||34===this._cursor.peek()){this._beginToken(Zi.ATTR_QUOTE);const t=this._cursor.peek();this._cursor.advance(),this._endToken([String.fromCodePoint(t)]),this._beginToken(Zi.ATTR_VALUE);const n=[];for(;this._cursor.peek()!==t;)n.push(this._readChar(!0));e=n.join(""),this._endToken([this._processCarriageReturns(e)]),this._beginToken(Zi.ATTR_QUOTE),this._cursor.advance(),this._endToken([String.fromCodePoint(t)])}else{this._beginToken(Zi.ATTR_VALUE);const t=this._cursor.clone();this._requireCharCodeUntilFn(ca,1),e=this._cursor.getChars(t),this._endToken([this._processCarriageReturns(e)])}}_consumeTagOpenEnd(){const e=this._attemptCharCode(47)?Zi.TAG_OPEN_END_VOID:Zi.TAG_OPEN_END;this._beginToken(e),this._requireCharCode(62),this._endToken([])}_consumeTagClose(e){this._beginToken(Zi.TAG_CLOSE,e),this._attemptCharCodeUntilFn(la);const t=this._consumePrefixAndName();this._attemptCharCodeUntilFn(la),this._requireCharCode(62),this._endToken(t)}_consumeExpansionFormStart(){this._beginToken(Zi.EXPANSION_FORM_START),this._requireCharCode(123),this._endToken([]),this._expansionCaseStack.push(Zi.EXPANSION_FORM_START),this._beginToken(Zi.RAW_TEXT);const e=this._readUntil(44),t=this._processCarriageReturns(e);if(this._i18nNormalizeLineEndingsInICUs)this._endToken([t]);else{const n=this._endToken([e]);t!==e&&this.nonNormalizedIcuExpressions.push(n)}this._requireCharCode(44),this._attemptCharCodeUntilFn(la),this._beginToken(Zi.RAW_TEXT);const n=this._readUntil(44);this._endToken([n]),this._requireCharCode(44),this._attemptCharCodeUntilFn(la)}_consumeExpansionCaseStart(){this._beginToken(Zi.EXPANSION_CASE_VALUE);const e=this._readUntil(123).trim();this._endToken([e]),this._attemptCharCodeUntilFn(la),this._beginToken(Zi.EXPANSION_CASE_EXP_START),this._requireCharCode(123),this._endToken([]),this._attemptCharCodeUntilFn(la),this._expansionCaseStack.push(Zi.EXPANSION_CASE_EXP_START)}_consumeExpansionCaseEnd(){this._beginToken(Zi.EXPANSION_CASE_EXP_END),this._requireCharCode(125),this._endToken([]),this._attemptCharCodeUntilFn(la),this._expansionCaseStack.pop()}_consumeExpansionFormEnd(){this._beginToken(Zi.EXPANSION_FORM_END),this._requireCharCode(125),this._endToken([]),this._expansionCaseStack.pop()}_consumeText(){const e=this._cursor.clone();this._beginToken(Zi.TEXT,e);const t=[];do{this._interpolationConfig&&this._attemptStr(this._interpolationConfig.start)?(t.push(this._interpolationConfig.start),this._inInterpolation=!0):this._interpolationConfig&&this._inInterpolation&&this._attemptStr(this._interpolationConfig.end)?(t.push(this._interpolationConfig.end),this._inInterpolation=!1):t.push(this._readChar(!0))}while(!this._isTextEnd());this._endToken([this._processCarriageReturns(t.join(""))])}_isTextEnd(){if(60===this._cursor.peek()||0===this._cursor.peek())return!0;if(this._tokenizeIcu&&!this._inInterpolation){if(this.isExpansionFormStart())return!0;if(125===this._cursor.peek()&&this._isInExpansionCase())return!0}return!1}_readUntil(e){const t=this._cursor.clone();return this._attemptUntilChar(e),this._cursor.getChars(t)}_isInExpansionCase(){return this._expansionCaseStack.length>0&&this._expansionCaseStack[this._expansionCaseStack.length-1]===Zi.EXPANSION_CASE_EXP_START}_isInExpansionForm(){return this._expansionCaseStack.length>0&&this._expansionCaseStack[this._expansionCaseStack.length-1]===Zi.EXPANSION_FORM_START}isExpansionFormStart(){if(123!==this._cursor.peek())return!1;if(this._interpolationConfig){const e=this._cursor.clone(),t=this._attemptStr(this._interpolationConfig.start);return this._cursor=e,!t}return!0}}function la(e){return!ir(e)||0===e}function ca(e){return ir(e)||62===e||60===e||47===e||39===e||34===e||61===e}function ua(e){return 59==e||0==e||!function(e){return e>=97&&e<=102||e>=65&&e<=70||ar(e)}(e)}function pa(e){return 59==e||0==e||!or(e)}function ha(e){return e>=97&&e<=122?e-97+65:e}class da{constructor(e,t){if(e instanceof da){this.file=e.file,this.input=e.input,this.end=e.end;const t=e.state;this.state={peek:t.peek,offset:t.offset,line:t.line,column:t.column}}else{if(!t)throw new Error("Programming error: the range argument must be provided with a file argument.");this.file=e,this.input=e.content,this.end=t.endPos,this.state={peek:-1,offset:t.startPos,line:t.startLine,column:t.startCol}}}clone(){return new da(this)}peek(){return this.state.peek}charsLeft(){return this.end-this.state.offset}diff(e){return this.state.offset-e.state.offset}advance(){this.advanceState(this.state)}init(){this.updatePeek(this.state)}getSpan(e,t){let n=e=e||this;if(t)for(;this.diff(e)>0&&-1!==t.indexOf(e.peek());)n===e&&(e=e.clone()),e.advance();const s=this.locationFromCursor(e),r=this.locationFromCursor(this),i=n!==e?this.locationFromCursor(n):s;return new hr(s,r,i)}getChars(e){return this.input.substring(e.state.offset,this.state.offset)}charAt(e){return this.input.charCodeAt(e)}advanceState(e){if(e.offset>=this.end)throw this.state=e,new ga('Unexpected character "EOF"',this);const t=this.charAt(e.offset);10===t?(e.line++,e.column=0):lr(t)||e.column++,e.offset++,this.updatePeek(e)}updatePeek(e){e.peek=e.offset>=this.end?0:this.charAt(e.offset)}locationFromCursor(e){return new ur(e.file,e.state.offset,e.state.line,e.state.column)}}class ma extends da{constructor(e,t){e instanceof ma?(super(e),this.internalState=Object.assign({},e.internalState)):(super(e,t),this.internalState=this.state)}advance(){this.state=this.internalState,super.advance(),this.processEscapeSequence()}init(){super.init(),this.processEscapeSequence()}clone(){return new ma(this)}getChars(e){const t=e.clone();let n="";for(;t.internalState.offset<this.internalState.offset;)n+=String.fromCodePoint(t.peek()),t.advance();return n}processEscapeSequence(){const e=()=>this.internalState.peek;if(92===e())if(this.internalState=Object.assign({},this.state),this.advanceState(this.internalState),110===e())this.state.peek=10;else if(114===e())this.state.peek=13;else if(118===e())this.state.peek=11;else if(116===e())this.state.peek=9;else if(98===e())this.state.peek=8;else if(102===e())this.state.peek=12;else if(117===e())if(this.advanceState(this.internalState),123===e()){this.advanceState(this.internalState);const t=this.clone();let n=0;for(;125!==e();)this.advanceState(this.internalState),n++;this.state.peek=this.decodeHexDigits(t,n)}else{const e=this.clone();this.advanceState(this.internalState),this.advanceState(this.internalState),this.advanceState(this.internalState),this.state.peek=this.decodeHexDigits(e,4)}else if(120===e()){this.advanceState(this.internalState);const e=this.clone();this.advanceState(this.internalState),this.state.peek=this.decodeHexDigits(e,2)}else if(cr(e())){let t="",n=0,s=this.clone();for(;cr(e())&&n<3;)s=this.clone(),t+=String.fromCodePoint(e()),this.advanceState(this.internalState),n++;this.state.peek=parseInt(t,8),this.internalState=s.internalState}else lr(this.internalState.peek)?(this.advanceState(this.internalState),this.state=this.internalState):this.state.peek=this.internalState.peek}decodeHexDigits(e,t){const n=this.input.substr(e.internalState.offset,t),s=parseInt(n,16);if(isNaN(s))throw e.state=e.internalState,new ga("Invalid hexadecimal escape sequence",e);return s}}class ga{constructor(e,t){this.msg=e,this.cursor=t}}class fa extends vr{constructor(e,t,n){super(t,n),this.elementName=e}static create(e,t,n){return new fa(e,t,n)}}class va{constructor(e,t){this.rootNodes=e,this.errors=t}}class ya{constructor(e,t){this.tokens=e,this.getTagDefinition=t,this._index=-1,this._elementStack=[],this.rootNodes=[],this.errors=[],this._advance()}build(){for(;this._peek.type!==Zi.EOF;)this._peek.type===Zi.TAG_OPEN_START||this._peek.type===Zi.INCOMPLETE_TAG_OPEN?this._consumeStartTag(this._advance()):this._peek.type===Zi.TAG_CLOSE?this._consumeEndTag(this._advance()):this._peek.type===Zi.CDATA_START?(this._closeVoidElement(),this._consumeCdata(this._advance())):this._peek.type===Zi.COMMENT_START?(this._closeVoidElement(),this._consumeComment(this._advance())):this._peek.type===Zi.TEXT||this._peek.type===Zi.RAW_TEXT||this._peek.type===Zi.ESCAPABLE_RAW_TEXT?(this._closeVoidElement(),this._consumeText(this._advance())):this._peek.type===Zi.EXPANSION_FORM_START?this._consumeExpansion(this._advance()):this._advance()}_advance(){const e=this._peek;return this._index<this.tokens.length-1&&this._index++,this._peek=this.tokens[this._index],e}_advanceIf(e){return this._peek.type===e?this._advance():null}_consumeCdata(e){this._consumeText(this._advance()),this._advanceIf(Zi.CDATA_END)}_consumeComment(e){const t=this._advanceIf(Zi.RAW_TEXT);this._advanceIf(Zi.COMMENT_END);const n=null!=t?t.parts[0].trim():null;this._addToParent(new Qi(n,e.sourceSpan))}_consumeExpansion(e){const t=this._advance(),n=this._advance(),s=[];for(;this._peek.type===Zi.EXPANSION_CASE_VALUE;){const e=this._parseExpansionCase();if(!e)return;s.push(e)}if(this._peek.type!==Zi.EXPANSION_FORM_END)return void this.errors.push(fa.create(null,this._peek.sourceSpan,"Invalid ICU message. Missing '}'."));const r=new hr(e.sourceSpan.start,this._peek.sourceSpan.end,e.sourceSpan.fullStart);this._addToParent(new zi(t.parts[0],n.parts[0],s,r,t.sourceSpan)),this._advance()}_parseExpansionCase(){const e=this._advance();if(this._peek.type!==Zi.EXPANSION_CASE_EXP_START)return this.errors.push(fa.create(null,this._peek.sourceSpan,"Invalid ICU message. Missing '{'.")),null;const t=this._advance(),n=this._collectExpansionExpTokens(t);if(!n)return null;const s=this._advance();n.push(new Ji(Zi.EOF,[],s.sourceSpan));const r=new ya(n,this.getTagDefinition);if(r.build(),r.errors.length>0)return this.errors=this.errors.concat(r.errors),null;const i=new hr(e.sourceSpan.start,s.sourceSpan.end,e.sourceSpan.fullStart),a=new hr(t.sourceSpan.start,s.sourceSpan.end,t.sourceSpan.fullStart);return new Ki(e.parts[0],r.rootNodes,i,e.sourceSpan,a)}_collectExpansionExpTokens(e){const t=[],n=[Zi.EXPANSION_CASE_EXP_START];for(;;){if(this._peek.type!==Zi.EXPANSION_FORM_START&&this._peek.type!==Zi.EXPANSION_CASE_EXP_START||n.push(this._peek.type),this._peek.type===Zi.EXPANSION_CASE_EXP_END){if(!xa(n,Zi.EXPANSION_CASE_EXP_START))return this.errors.push(fa.create(null,e.sourceSpan,"Invalid ICU message. Missing '}'.")),null;if(n.pop(),0==n.length)return t}if(this._peek.type===Zi.EXPANSION_FORM_END){if(!xa(n,Zi.EXPANSION_FORM_START))return this.errors.push(fa.create(null,e.sourceSpan,"Invalid ICU message. Missing '}'.")),null;n.pop()}if(this._peek.type===Zi.EOF)return this.errors.push(fa.create(null,e.sourceSpan,"Invalid ICU message. Missing '}'.")),null;t.push(this._advance())}}_consumeText(e){let t=e.parts[0];if(t.length>0&&"\n"==t[0]){const e=this._getParentElement();null!=e&&0==e.children.length&&this.getTagDefinition(e.name).ignoreFirstLf&&(t=t.substring(1))}t.length>0&&this._addToParent(new Wi(t,e.sourceSpan))}_closeVoidElement(){const e=this._getParentElement();e&&this.getTagDefinition(e.name).isVoid&&this._elementStack.pop()}_consumeStartTag(e){const[t,n]=e.parts,s=[];for(;this._peek.type===Zi.ATTR_NAME;)s.push(this._consumeAttr(this._advance()));const r=this._getElementFullName(t,n,this._getParentElement());let i=!1;if(this._peek.type===Zi.TAG_OPEN_END_VOID){this._advance(),i=!0;const t=this.getTagDefinition(r);t.canSelfClose||null!==ve(r)||t.isVoid||this.errors.push(fa.create(r,e.sourceSpan,`Only void and foreign elements can be self closed "${e.parts[1]}"`))}else this._peek.type===Zi.TAG_OPEN_END&&(this._advance(),i=!1);const a=this._peek.sourceSpan.start,o=new hr(e.sourceSpan.start,a,e.sourceSpan.fullStart),l=new hr(e.sourceSpan.start,a,e.sourceSpan.fullStart),c=new Gi(r,s,[],o,l,void 0);this._pushElement(c),i?this._popElement(r,o):e.type===Zi.INCOMPLETE_TAG_OPEN&&(this._popElement(r,null),this.errors.push(fa.create(r,o,`Opening tag "${r}" not terminated.`)))}_pushElement(e){const t=this._getParentElement();t&&this.getTagDefinition(t.name).isClosedByChild(e.name)&&this._elementStack.pop(),this._addToParent(e),this._elementStack.push(e)}_consumeEndTag(e){const t=this._getElementFullName(e.parts[0],e.parts[1],this._getParentElement());this.getTagDefinition(t).isVoid?this.errors.push(fa.create(t,e.sourceSpan,`Void elements do not have end tags "${e.parts[1]}"`)):this._popElement(t,e.sourceSpan)||this.errors.push(fa.create(t,e.sourceSpan,`Unexpected closing tag "${t}". It may happen when the tag has already been closed by another tag. For more info see https://www.w3.org/TR/html5/syntax.html#closing-elements-that-have-implied-end-tags`))}_popElement(e,t){for(let n=this._elementStack.length-1;n>=0;n--){const s=this._elementStack[n];if(s.name==e)return s.endSourceSpan=t,s.sourceSpan.end=null!==t?t.end:s.sourceSpan.end,this._elementStack.splice(n,this._elementStack.length-n),!0;if(!this.getTagDefinition(s.name).closedByParent)return!1}return!1}_consumeAttr(e){const t=ye(e.parts[0],e.parts[1]);let n=e.sourceSpan.end,s="",r=void 0;if(this._peek.type===Zi.ATTR_QUOTE&&this._advance(),this._peek.type===Zi.ATTR_VALUE){const e=this._advance();s=e.parts[0],n=e.sourceSpan.end,r=e.sourceSpan}return this._peek.type===Zi.ATTR_QUOTE&&(n=this._advance().sourceSpan.end),new Xi(t,s,new hr(e.sourceSpan.start,n,e.sourceSpan.fullStart),r)}_getParentElement(){return this._elementStack.length>0?this._elementStack[this._elementStack.length-1]:null}_addToParent(e){const t=this._getParentElement();null!=t?t.children.push(e):this.rootNodes.push(e)}_getElementFullName(e,t,n){if(""===e&&""===(e=this.getTagDefinition(t).implicitNamespacePrefix||"")&&null!=n){const t=me(n.name)[1];this.getTagDefinition(t).preventNamespaceInheritance||(e=ve(n.name))}return ye(e,t)}}function xa(e,t){return e.length>0&&e[e.length-1]===t}class Sa extends class{constructor(e){this.getTagDefinition=e}parse(e,t,n){const s=function(e,t,n,s={}){const r=new oa(new pr(e,t),n,s);return r.tokenize(),new ta(function(e){const t=[];let n=void 0;for(let s=0;s<e.length;s++){const r=e[s];n&&n.type==Zi.TEXT&&r.type==Zi.TEXT?(n.parts[0]+=r.parts[0],n.sourceSpan.end=r.sourceSpan.end):(n=r,t.push(n))}return t}(r.tokens),r.errors,r.nonNormalizedIcuExpressions)}(e,t,this.getTagDefinition,n),r=new ya(s.tokens,this.getTagDefinition);return r.build(),new va(r.rootNodes,s.errors.concat(r.errors))}}{constructor(){super(Ce)}parse(e,t,n){return super.parse(e,t,n)}}const Ea=new Set(["pre","template","textarea","script","style"]),_a=new RegExp("[^ \f\n\r\t\v - \u2028\u2029 \ufeff]"),Ca=new RegExp("[ \f\n\r\t\v - \u2028\u2029 \ufeff]{2,}","g");function wa(e){return e.replace(new RegExp("","g")," ")}class ba{visitElement(e,t){return Ea.has(e.name)||e.attrs.some(e=>"ngPreserveWhitespaces"===e.name)?new Gi(e.name,Yi(this,e.attrs),e.children,e.sourceSpan,e.startSourceSpan,e.endSourceSpan,e.i18n):new Gi(e.name,e.attrs,function(e,t){const n=[];return t.forEach((s,r)=>{const i=s.visit(e,{prev:t[r-1],next:t[r+1]});i&&n.push(i)}),n}(this,e.children),e.sourceSpan,e.startSourceSpan,e.endSourceSpan,e.i18n)}visitAttribute(e,t){return"ngPreserveWhitespaces"!==e.name?e:null}visitText(e,t){return e.value.match(_a)||t&&(t.prev instanceof zi||t.next instanceof zi)?new Wi(wa(e.value).replace(Ca," "),e.sourceSpan,e.i18n):null}visitComment(e,t){return e}visitExpansion(e,t){return e}visitExpansionCase(e,t){return e}}var Ia;!function(e){e[e.PublicService=0]="PublicService",e[e.PrivateService=1]="PrivateService",e[e.Component=2]="Component",e[e.Directive=3]="Directive",e[e.Builtin=4]="Builtin"}(Ia||(Ia={}));const Ta=/^([^:/?#]+):/;class Na{constructor(e,t,n,s,r){if(this._exprParser=e,this._interpolationConfig=t,this._schemaRegistry=n,this.errors=r,this.pipesByName=null,this._usedPipes=new Map,s){const e=new Map;s.forEach(t=>e.set(t.name,t)),this.pipesByName=e}}get interpolationConfig(){return this._interpolationConfig}getUsedPipes(){return Array.from(this._usedPipes.values())}createBoundHostProperties(e,t){if(e.hostProperties){const n=[];return Object.keys(e.hostProperties).forEach(s=>{const r=e.hostProperties[s];"string"==typeof r?this.parsePropertyBinding(s,r,!0,t,t.start.offset,void 0,[],n,t):this._reportError(`Value of the host property binding "${s}" needs to be a string representing an expression but got "${r}" (${typeof r})`,t)}),n}return null}createDirectiveHostPropertyAsts(e,t,n){const s=this.createBoundHostProperties(e,n);return s&&s.map(e=>this.createBoundElementProperty(t,e))}createDirectiveHostEventAsts(e,t){if(e.hostListeners){const n=[];return Object.keys(e.hostListeners).forEach(s=>{const r=e.hostListeners[s];"string"==typeof r?this.parseEvent(s,r,t,t,[],n):this._reportError(`Value of the host listener "${s}" needs to be a string representing an expression but got "${r}" (${typeof r})`,t)}),n}return null}parseInterpolation(e,t){const n=t.start.toString();try{const s=this._exprParser.parseInterpolation(e,n,t.start.offset,this._interpolationConfig);return s&&this._reportExpressionParserErrors(s.errors,t),this._checkPipes(s,t),s}catch(e){return this._reportError(""+e,t),this._exprParser.wrapLiteralPrimitive("ERROR",n,t.start.offset)}}parseInterpolationExpression(e,t){const n=t.start.toString();try{const s=this._exprParser.parseInterpolationExpression(e,n,t.start.offset);return s&&this._reportExpressionParserErrors(s.errors,t),this._checkPipes(s,t),s}catch(e){return this._reportError(""+e,t),this._exprParser.wrapLiteralPrimitive("ERROR",n,t.start.offset)}}parseInlineTemplateBinding(e,t,n,s,r,i,a,o){const l=this._parseTemplateBindings(e,t,n,n.start.offset+"*".length,s);for(const e of l){const t=Oa(n,e.sourceSpan),l=e.key.source,c=Oa(n,e.key.span);if(e instanceof Yr){const s=e.value?e.value.source:"$implicit",r=e.value?Oa(n,e.value.span):void 0;a.push(new ni(l,s,t,c,r))}else if(e.value){const s=o?t:n,a=Oa(n,e.value.ast.sourceSpan);this._parsePropertyAst(l,e.value,s,c,a,r,i)}else r.push([l,""]),this.parseLiteralAttr(l,null,c,s,void 0,r,i,c)}}_parseTemplateBindings(e,t,n,s,r){const i=n.start.toString();try{const a=this._exprParser.parseTemplateBindings(e,t,i,s,r);return this._reportExpressionParserErrors(a.errors,n),a.templateBindings.forEach(e=>{e.value instanceof Qr&&this._checkPipes(e.value,n)}),a.warnings.forEach(e=>{this._reportError(e,n,dr.WARNING)}),a.templateBindings}catch(e){return this._reportError(""+e,n),[]}}parseLiteralAttr(e,t,n,s,r,i,a,o){Pa(e)?(e=e.substring(1),t&&this._reportError('Assigning animation triggers via @prop="exp" attributes with an expression is invalid. Use property bindings (e.g. [@prop]="exp") or use an attribute without a value (e.g. @prop) instead.',n,dr.ERROR),this._parseAnimation(e,t,n,s,o,r,i,a)):a.push(new ei(e,this._exprParser.wrapLiteralPrimitive(t,"",s),mr.LITERAL_ATTR,n,o,r))}parsePropertyBinding(e,t,n,s,r,i,a,o,l){0===e.length&&this._reportError("Property name is missing in binding",s);let c=!1;e.startsWith("animate-")?(c=!0,e=e.substring("animate-".length)):Pa(e)&&(c=!0,e=e.substring(1)),c?this._parseAnimation(e,t,s,r,l,i,a,o):this._parsePropertyAst(e,this._parseBinding(t,n,i||s,r),s,l,i,a,o)}parsePropertyInterpolation(e,t,n,s,r,i,a){const o=this.parseInterpolation(t,s||n);return!!o&&(this._parsePropertyAst(e,o,n,a,s,r,i),!0)}_parsePropertyAst(e,t,n,s,r,i,a){i.push([e,t.source]),a.push(new ei(e,t,mr.DEFAULT,n,s,r))}_parseAnimation(e,t,n,s,r,i,a,o){0===e.length&&this._reportError("Animation trigger is missing",n);const l=this._parseBinding(t||"undefined",!1,i||n,s);a.push([e,l.source]),o.push(new ei(e,l,mr.ANIMATION,n,r,i))}_parseBinding(e,t,n,s){const r=(n&&n.start||"(unknown)").toString();try{const i=t?this._exprParser.parseSimpleBinding(e,r,s,this._interpolationConfig):this._exprParser.parseBinding(e,r,s,this._interpolationConfig);return i&&this._reportExpressionParserErrors(i.errors,n),this._checkPipes(i,n),i}catch(e){return this._reportError(""+e,n),this._exprParser.wrapLiteralPrimitive("ERROR",r,s)}}createBoundElementProperty(e,t,n=!1,s=!0){if(t.isAnimation)return new si(t.name,4,ke.NONE,t.expression,null,t.sourceSpan,t.keySpan,t.valueSpan);let r=null,i=void 0,a=null;const o=t.name.split(".");let l=void 0;if(o.length>1)if("attr"==o[0]){a=o.slice(1).join("."),n||this._validatePropertyOrAttributeName(a,t.sourceSpan,!0),l=ka(this._schemaRegistry,e,a,!0);const s=a.indexOf(":");if(s>-1){const e=a.substring(0,s),t=a.substring(s+1);a=ye(e,t)}i=1}else"class"==o[0]?(a=o[1],i=2,l=[ke.NONE]):"style"==o[0]&&(r=o.length>2?o[2]:null,a=o[1],i=3,l=[ke.STYLE]);if(null===a){const r=this._schemaRegistry.getMappedPropName(t.name);a=s?r:t.name,l=ka(this._schemaRegistry,e,r,!1),i=0,n||this._validatePropertyOrAttributeName(r,t.sourceSpan,!1)}return new si(a,i,l[0],t.expression,r,t.sourceSpan,t.keySpan,t.valueSpan)}parseEvent(e,t,n,s,r,i){0===e.length&&this._reportError("Event name is missing in binding",n),Pa(e)?(e=e.substr(1),this._parseAnimationEvent(e,t,n,s,i)):this._parseRegularEvent(e,t,n,s,r,i)}calcPossibleSecurityContexts(e,t,n){const s=this._schemaRegistry.getMappedPropName(t);return ka(this._schemaRegistry,e,s,n)}_parseAnimationEvent(e,t,n,s,r){const i=Jt(e,".",[e,""]),a=i[0],o=i[1].toLowerCase();if(o)switch(o){case"start":case"done":const e=this._parseAction(t,s);r.push(new ti(a,o,1,e,n,s));break;default:this._reportError(`The provided animation output phase value "${o}" for "@${a}" is not supported (use start or done)`,n)}else this._reportError(`The animation trigger output event (@${a}) is missing its phase value name (start or done are currently supported)`,n)}_parseRegularEvent(e,t,n,s,r,i){const[a,o]=Zt(e,[null,e]),l=this._parseAction(t,s);r.push([e,l.source]),i.push(new ti(o,a,0,l,n,s))}_parseAction(e,t){const n=(t&&t.start||"(unknown").toString(),s=t&&t.start?t.start.offset:0;try{const r=this._exprParser.parseAction(e,n,s,this._interpolationConfig);return r&&this._reportExpressionParserErrors(r.errors,t),!r||r.ast instanceof Tr?(this._reportError("Empty expressions are not allowed",t),this._exprParser.wrapLiteralPrimitive("ERROR",n,s)):(this._checkPipes(r,t),r)}catch(e){return this._reportError(""+e,t),this._exprParser.wrapLiteralPrimitive("ERROR",n,s)}}_reportError(e,t,n=dr.ERROR){this.errors.push(new vr(t,e,n))}_reportExpressionParserErrors(e,t){for(const n of e)this._reportError(n.message,t)}_checkPipes(e,t){if(e&&this.pipesByName){const n=new Aa;e.visit(n),n.pipes.forEach((e,n)=>{const s=this.pipesByName.get(n);s?this._usedPipes.set(n,s):this._reportError(`The pipe '${n}' could not be found`,new hr(t.start.moveBy(e.span.start),t.start.moveBy(e.span.end)))})}}_validatePropertyOrAttributeName(e,t,n){const s=n?this._schemaRegistry.validateAttribute(e):this._schemaRegistry.validateProperty(e);s.error&&this._reportError(s.msg,t,dr.ERROR)}}class Aa extends Jr{constructor(){super(...arguments),this.pipes=new Map}visitPipe(e,t){return this.pipes.set(e.name,e),e.exp.visit(this),this.visitAll(e.args,t),null}}function Pa(e){return"@"==e[0]}function ka(e,t,n,s){const r=[];return be.parse(t).forEach(t=>{const i=t.element?[t.element]:e.allKnownElementNames(),a=new Set(t.notSelectors.filter(e=>e.isElementSelector()).map(e=>e.element)),o=i.filter(e=>!a.has(e));r.push(...o.map(t=>e.securityContext(t,n,s)))}),0===r.length?[ke.NONE]:Array.from(new Set(r)).sort()}function Oa(e,t){const n=t.start-e.start.offset,s=t.end-e.end.offset;return new hr(e.start.moveBy(n),e.end.moveBy(s),e.fullStart.moveBy(n),e.details)}function Ma(e){let t=null,n=null,s=null,r=!1,i="";e.attrs.forEach(e=>{const a=e.name.toLowerCase();"select"==a?t=e.value:"href"==a?n=e.value:"rel"==a?s=e.value:"ngNonBindable"==e.name?r=!0:"ngProjectAs"==e.name&&e.value.length>0&&(i=e.value)}),t=function(e){return null===e||0===e.length?"*":e}(t);const a=e.name.toLowerCase();let o=La.OTHER;return fe(a)?o=La.NG_CONTENT:"style"==a?o=La.STYLE:"script"==a?o=La.SCRIPT:"link"==a&&"stylesheet"==s&&(o=La.STYLESHEET),new Da(o,t,n,r,i)}var La,Ra;!function(e){e[e.NG_CONTENT=0]="NG_CONTENT",e[e.STYLE=1]="STYLE",e[e.STYLESHEET=2]="STYLESHEET",e[e.SCRIPT=3]="SCRIPT",e[e.OTHER=4]="OTHER"}(La||(La={}));class Da{constructor(e,t,n,s,r){this.type=e,this.selectAttr=t,this.hrefAttr=n,this.nonBindable=s,this.projectAs=r}}function Fa(e){return e instanceof Qr&&(e=e.ast),e instanceof Tr}function Ba(e){const t=e.charCodeAt(0);if(t==e.charCodeAt(e.length-1)&&(39==t||34==t)){const t=e.substring(1,e.length-1);-1==t.indexOf("'")&&-1==t.indexOf('"')&&(e=t)}return e}function $a(e){return e.replace(/[a-z][A-Z]/g,e=>e.charAt(0)+"-"+e.charAt(1)).toLowerCase()}class Va{constructor(e){this._directiveExpr=e,this._hasInitialValues=!1,this.hasBindings=!1,this.hasBindingsWithPipes=!1,this._classMapInput=null,this._styleMapInput=null,this._singleStyleInputs=null,this._singleClassInputs=null,this._lastStylingInput=null,this._firstStylingInput=null,this._stylesIndex=new Map,this._classesIndex=new Map,this._initialStyleValues=[],this._initialClassValues=[]}registerBoundInput(e){let t=null,n=e.name;switch(e.type){case 0:t=this.registerInputBasedOnName(n,e.value,e.sourceSpan);break;case 3:t=this.registerStyleInput(n,!1,e.value,e.sourceSpan,e.unit);break;case 2:t=this.registerClassInput(n,!1,e.value,e.sourceSpan)}return!!t}registerInputBasedOnName(e,t,n){let s=null;const r=e.substring(0,6),i="style"===e||"style."===r||"style!"===r;if(i||!i&&("class"===e||"class."===r||"class!"===r)){const r="."!==e.charAt(5),a=e.substr(r?5:6);s=i?this.registerStyleInput(a,r,t,n):this.registerClassInput(a,r,t,n)}return s}registerStyleInput(e,t,n,s,r){if(Fa(n))return null;e=$a(e);const{property:i,hasOverrideFlag:a,suffix:o}=Ua(e),l={name:i,suffix:r="string"==typeof r&&0!==r.length?r:o,value:n,sourceSpan:s,hasOverrideFlag:a};return t?this._styleMapInput=l:((this._singleStyleInputs=this._singleStyleInputs||[]).push(l),ja(this._stylesIndex,i)),this._lastStylingInput=l,this._firstStylingInput=this._firstStylingInput||l,this._checkForPipes(n),this.hasBindings=!0,l}registerClassInput(e,t,n,s){if(Fa(n))return null;const{property:r,hasOverrideFlag:i}=Ua(e),a={name:r,value:n,sourceSpan:s,hasOverrideFlag:i,suffix:null};if(t){if(this._classMapInput)throw new Error("[class] and [className] bindings cannot be used on the same element simultaneously");this._classMapInput=a}else(this._singleClassInputs=this._singleClassInputs||[]).push(a),ja(this._classesIndex,r);return this._lastStylingInput=a,this._firstStylingInput=this._firstStylingInput||a,this._checkForPipes(n),this.hasBindings=!0,a}_checkForPipes(e){e instanceof Qr&&e.ast instanceof Fr&&(this.hasBindingsWithPipes=!0)}registerStyleAttr(e){this._initialStyleValues=function(e){const t=[];let n=0,s=0,r=0,i=0,a=0,o=null,l=!1;for(;n<e.length;)switch(e.charCodeAt(n++)){case 40:s++;break;case 41:s--;break;case 39:l=l||i>0,0===r?r=39:39===r&&92!==e.charCodeAt(n-1)&&(r=0);break;case 34:l=l||i>0,0===r?r=34:34===r&&92!==e.charCodeAt(n-1)&&(r=0);break;case 58:o||0!==s||0!==r||(o=$a(e.substring(a,n-1).trim()),i=n);break;case 59:if(o&&i>0&&0===s&&0===r){const s=e.substring(i,n-1).trim();t.push(o,l?Ba(s):s),a=n,i=0,o=null,l=!1}}if(o&&i){const n=e.substr(i).trim();t.push(o,l?Ba(n):n)}return t}(e),this._hasInitialValues=!0}registerClassAttr(e){this._initialClassValues=e.trim().split(/\s+/g),this._hasInitialValues=!0}populateInitialStylingAttrs(e){if(this._initialClassValues.length){e.push(Xt(1));for(let t=0;t<this._initialClassValues.length;t++)e.push(Xt(this._initialClassValues[t]))}if(this._initialStyleValues.length){e.push(Xt(2));for(let t=0;t<this._initialStyleValues.length;t+=2)e.push(Xt(this._initialStyleValues[t]),Xt(this._initialStyleValues[t+1]))}}assignHostAttrs(e,t){this._directiveExpr&&(e.length||this._hasInitialValues)&&(this.populateInitialStylingAttrs(e),t.set("hostAttrs",Ht(e)))}buildClassMapInstruction(e){return this._classMapInput?this._buildMapBasedInstruction(e,!0,this._classMapInput):null}buildStyleMapInstruction(e){return this._styleMapInput?this._buildMapBasedInstruction(e,!1,this._styleMapInput):null}_buildMapBasedInstruction(e,t,n){let s=2;const r=n.value.visit(e);let i;return r instanceof jr?(s+=r.expressions.length,i=t?function(e){switch(Rs(e)){case 1:return _n.classMap;case 3:return _n.classMapInterpolate1;case 5:return _n.classMapInterpolate2;case 7:return _n.classMapInterpolate3;case 9:return _n.classMapInterpolate4;case 11:return _n.classMapInterpolate5;case 13:return _n.classMapInterpolate6;case 15:return _n.classMapInterpolate7;case 17:return _n.classMapInterpolate8;default:return _n.classMapInterpolateV}}(r):function(e){switch(Rs(e)){case 1:return _n.styleMap;case 3:return _n.styleMapInterpolate1;case 5:return _n.styleMapInterpolate2;case 7:return _n.styleMapInterpolate3;case 9:return _n.styleMapInterpolate4;case 11:return _n.styleMapInterpolate5;case 13:return _n.styleMapInterpolate6;case 15:return _n.styleMapInterpolate7;case 17:return _n.styleMapInterpolate8;default:return _n.styleMapInterpolateV}}(r)):i=t?_n.classMap:_n.styleMap,{reference:i,calls:[{supportsInterpolation:!0,sourceSpan:n.sourceSpan,allocateBindingSlots:s,params:e=>{const t=e(r);return Array.isArray(t)?t:[t]}}]}}_buildSingleInputs(e,t,n,s,r){const i=[];return t.forEach(t=>{const a=i[i.length-1],o=t.value.visit(n);let l=e,c=2;o instanceof jr&&(c+=o.expressions.length,s&&(l=s(o)));const u={sourceSpan:t.sourceSpan,allocateBindingSlots:c,supportsInterpolation:!!s,params:e=>{const n=[];n.push(Xt(t.name));const s=e(o);return Array.isArray(s)?n.push(...s):n.push(s),r||null===t.suffix||n.push(Xt(t.suffix)),n}};a&&a.reference===l?a.calls.push(u):i.push({reference:l,calls:[u]})}),i}_buildClassInputs(e){return this._singleClassInputs?this._buildSingleInputs(_n.classProp,this._singleClassInputs,e,null,!0):[]}_buildStyleInputs(e){return this._singleStyleInputs?this._buildSingleInputs(_n.styleProp,this._singleStyleInputs,e,qa,!1):[]}buildUpdateLevelInstructions(e){const t=[];if(this.hasBindings){const n=this.buildStyleMapInstruction(e);n&&t.push(n);const s=this.buildClassMapInstruction(e);s&&t.push(s),t.push(...this._buildStyleInputs(e)),t.push(...this._buildClassInputs(e))}return t}}function ja(e,t){e.has(t)||e.set(t,e.size)}function Ua(e){let t=!1;const n=e.indexOf("!important");-1!==n&&(e=n>0?e.substring(0,n):"",t=!0);let s=null,r=e;const i=e.lastIndexOf(".");return i>0&&(s=e.substr(i+1),r=e.substring(0,i)),{property:r,suffix:s,hasOverrideFlag:t}}function qa(e){switch(Rs(e)){case 1:return _n.styleProp;case 3:return _n.stylePropInterpolate1;case 5:return _n.stylePropInterpolate2;case 7:return _n.stylePropInterpolate3;case 9:return _n.stylePropInterpolate4;case 11:return _n.stylePropInterpolate5;case 13:return _n.stylePropInterpolate6;case 15:return _n.stylePropInterpolate7;case 17:return _n.stylePropInterpolate8;default:return _n.stylePropInterpolateV}}!function(e){e[e.Character=0]="Character",e[e.Identifier=1]="Identifier",e[e.Keyword=2]="Keyword",e[e.String=3]="String",e[e.Operator=4]="Operator",e[e.Number=5]="Number",e[e.Error=6]="Error"}(Ra||(Ra={}));const Ha=["var","let","as","null","undefined","true","false","if","else","this"];class Wa{tokenize(e){const t=new Qa(e),n=[];let s=t.scanToken();for(;null!=s;)n.push(s),s=t.scanToken();return n}}class za{constructor(e,t,n,s,r){this.index=e,this.end=t,this.type=n,this.numValue=s,this.strValue=r}isCharacter(e){return this.type==Ra.Character&&this.numValue==e}isNumber(){return this.type==Ra.Number}isString(){return this.type==Ra.String}isOperator(e){return this.type==Ra.Operator&&this.strValue==e}isIdentifier(){return this.type==Ra.Identifier}isKeyword(){return this.type==Ra.Keyword}isKeywordLet(){return this.type==Ra.Keyword&&"let"==this.strValue}isKeywordAs(){return this.type==Ra.Keyword&&"as"==this.strValue}isKeywordNull(){return this.type==Ra.Keyword&&"null"==this.strValue}isKeywordUndefined(){return this.type==Ra.Keyword&&"undefined"==this.strValue}isKeywordTrue(){return this.type==Ra.Keyword&&"true"==this.strValue}isKeywordFalse(){return this.type==Ra.Keyword&&"false"==this.strValue}isKeywordThis(){return this.type==Ra.Keyword&&"this"==this.strValue}isError(){return this.type==Ra.Error}toNumber(){return this.type==Ra.Number?this.numValue:-1}toString(){switch(this.type){case Ra.Character:case Ra.Identifier:case Ra.Keyword:case Ra.Operator:case Ra.String:case Ra.Error:return this.strValue;case Ra.Number:return this.numValue.toString();default:return null}}}function Ka(e,t,n){return new za(e,t,Ra.Character,n,String.fromCharCode(n))}function Xa(e,t,n){return new za(e,t,Ra.Operator,0,n)}const Ga=new za(-1,-1,Ra.Character,0,"");class Qa{constructor(e){this.input=e,this.peek=0,this.index=-1,this.length=e.length,this.advance()}advance(){this.peek=++this.index>=this.length?0:this.input.charCodeAt(this.index)}scanToken(){const e=this.input,t=this.length;let n=this.peek,s=this.index;for(;n<=32;){if(++s>=t){n=0;break}n=e.charCodeAt(s)}if(this.peek=n,this.index=s,s>=t)return null;if(Ya(n))return this.scanIdentifier();if(ar(n))return this.scanNumber(s);const r=s;switch(n){case 46:return this.advance(),ar(this.peek)?this.scanNumber(r):Ka(r,this.index,46);case 40:case 41:case 123:case 125:case 91:case 93:case 44:case 58:case 59:return this.scanCharacter(r,n);case 39:case 34:return this.scanString();case 35:case 43:case 45:case 42:case 47:case 37:case 94:return this.scanOperator(r,String.fromCharCode(n));case 63:return this.scanComplexOperator(r,"?",46,".");case 60:case 62:return this.scanComplexOperator(r,String.fromCharCode(n),61,"=");case 33:case 61:return this.scanComplexOperator(r,String.fromCharCode(n),61,"=",61,"=");case 38:return this.scanComplexOperator(r,"&",38,"&");case 124:return this.scanComplexOperator(r,"|",124,"|");case 160:for(;ir(this.peek);)this.advance();return this.scanToken()}return this.advance(),this.error(`Unexpected character [${String.fromCharCode(n)}]`,0)}scanCharacter(e,t){return this.advance(),Ka(e,this.index,t)}scanOperator(e,t){return this.advance(),Xa(e,this.index,t)}scanComplexOperator(e,t,n,s,r,i){this.advance();let a=t;return this.peek==n&&(this.advance(),a+=s),null!=r&&this.peek==r&&(this.advance(),a+=i),Xa(e,this.index,a)}scanIdentifier(){const e=this.index;for(this.advance();Za(this.peek);)this.advance();const t=this.input.substring(e,this.index);return Ha.indexOf(t)>-1?new za(e,this.index,Ra.Keyword,0,t):function(e,t,n){return new za(e,t,Ra.Identifier,0,n)}(e,this.index,t)}scanNumber(e){let t=this.index===e;for(this.advance();;){if(ar(this.peek));else if(46==this.peek)t=!1;else{if(101!=(n=this.peek)&&69!=n)break;if(this.advance(),Ja(this.peek)&&this.advance(),!ar(this.peek))return this.error("Invalid exponent",-1);t=!1}this.advance()}var n;const s=this.input.substring(e,this.index),r=t?function(e){const t=parseInt(e);if(isNaN(t))throw new Error("Invalid integer literal when parsing "+e);return t}(s):parseFloat(s);return new za(e,this.index,Ra.Number,r,"")}scanString(){const e=this.index,t=this.peek;this.advance();let n="",s=this.index;const r=this.input;for(;this.peek!=t;)if(92==this.peek){let e;if(n+=r.substring(s,this.index),this.advance(),this.peek=this.peek,117==this.peek){const t=r.substring(this.index+1,this.index+5);if(!/^[0-9a-f]+$/i.test(t))return this.error(`Invalid unicode escape [\\u${t}]`,0);e=parseInt(t,16);for(let e=0;e<5;e++)this.advance()}else e=eo(this.peek),this.advance();n+=String.fromCharCode(e),s=this.index}else{if(0==this.peek)return this.error("Unterminated quote",0);this.advance()}const i=r.substring(s,this.index);return this.advance(),new za(e,this.index,Ra.String,0,n+i)}error(e,t){const n=this.index+t;return function(e,t,n){return new za(e,t,Ra.Error,0,n)}(n,this.index,`Lexer Error: ${e} at column ${n} in expression [${this.input}]`)}}function Ya(e){return 97<=e&&e<=122||65<=e&&e<=90||95==e||36==e}function Za(e){return or(e)||ar(e)||95==e||36==e}function Ja(e){return 45==e||43==e}function eo(e){switch(e){case 110:return 10;case 102:return 12;case 114:return 13;case 116:return 9;case 118:return 11;default:return e}}class to{constructor(e,t,n,s,r){this.strings=e,this.stringSpans=t,this.expressions=n,this.expressionsSpans=s,this.offsets=r}}class no{constructor(e,t,n){this.templateBindings=e,this.warnings=t,this.errors=n}}const so=ro(Ws);function ro(e){const t=tn(e.start)+"([\\s\\S]*?)"+tn(e.end);return new RegExp(t,"g")}class io{constructor(e){this._lexer=e,this.errors=[],this.simpleExpressionChecker=co}parseAction(e,t,n,s=Ws){this._checkNoInterpolation(e,t,s);const r=this._stripComments(e),i=this._lexer.tokenize(this._stripComments(e)),a=new lo(e,t,n,i,r.length,!0,this.errors,e.length-r.length).parseChain();return new Qr(a,e,t,n,this.errors)}parseBinding(e,t,n,s=Ws){const r=this._parseBindingAst(e,t,n,s);return new Qr(r,e,t,n,this.errors)}checkSimpleExpression(e){const t=new this.simpleExpressionChecker;return e.visit(t),t.errors}parseSimpleBinding(e,t,n,s=Ws){const r=this._parseBindingAst(e,t,n,s),i=this.checkSimpleExpression(r);return i.length>0&&this._reportError("Host binding expression cannot contain "+i.join(" "),e,t),new Qr(r,e,t,n,this.errors)}_reportError(e,t,n,s){this.errors.push(new _r(e,t,n,s))}_parseBindingAst(e,t,n,s){const r=this._parseQuote(e,t,n);if(null!=r)return r;this._checkNoInterpolation(e,t,s);const i=this._stripComments(e),a=this._lexer.tokenize(i);return new lo(e,t,n,a,i.length,!1,this.errors,e.length-i.length).parseChain()}_parseQuote(e,t,n){if(null==e)return null;const s=e.indexOf(":");if(-1==s)return null;const r=e.substring(0,s).trim();if(!function(e){if(0==e.length)return!1;const t=new Qa(e);if(!Ya(t.peek))return!1;for(t.advance();0!==t.peek;){if(!Za(t.peek))return!1;t.advance()}return!0}(r))return null;const i=e.substring(s+1),a=new Cr(0,e.length);return new Ir(a,a.toAbsolute(n),r,i,t)}parseTemplateBindings(e,t,n,s,r){const i=this._lexer.tokenize(t);return new lo(t,n,r,i,t.length,!1,this.errors,0).parseTemplateBindings({source:e,span:new Gr(s,s+e.length)})}parseInterpolation(e,t,n,s=Ws){const r=this.splitInterpolation(e,t,s);if(null==r)return null;const i=[];for(let s=0;s<r.expressions.length;++s){const a=r.expressions[s],o=this._stripComments(a),l=this._lexer.tokenize(o),c=new lo(e,t,n,l,o.length,!1,this.errors,r.offsets[s]+(a.length-o.length)).parseChain();i.push(c)}return this.createInterpolationAst(r.strings,i,e,t,n)}parseInterpolationExpression(e,t,n){const s=this._stripComments(e),r=this._lexer.tokenize(s),i=new lo(e,t,n,r,s.length,!1,this.errors,0).parseChain();return this.createInterpolationAst(["",""],[i],e,t,n)}createInterpolationAst(e,t,n,s,r){const i=new Cr(0,n.length),a=new jr(i,i.toAbsolute(r),e,t);return new Qr(a,n,s,r,this.errors)}splitInterpolation(e,t,n=Ws){const s=[],r=[],i=[],a=[],o=[];let l=0,c=!1,u=!1,{start:p,end:h}=n;for(;l<e.length;)if(c){const n=l,s=n+p.length,a=e.indexOf(h,s);if(-1===a){c=!1,u=!0;break}const d=a+h.length,m=e.substring(s,a);m.trim().length>0?r.push(m):(this._reportError("Blank expressions are not allowed in interpolated strings",e,`at column ${l} in`,t),r.push("$implicit")),i.push(s),o.push({start:n,end:d}),l=d,c=!1}else{const t=l;l=e.indexOf(p,l),-1===l&&(l=e.length);const n=e.substring(t,l);s.push(n),a.push({start:t,end:l}),c=!0}return c||(u?(s[s.length-1]+=e.substring(l),a[a.length-1].end=e.length):(s.push(e.substring(l)),a.push({start:l,end:e.length}))),0===r.length?null:new to(s,a,r,o,i)}wrapLiteralPrimitive(e,t,n){const s=new Cr(0,null==e?0:e.length);return new Qr(new Br(s,s.toAbsolute(n),e),e,t,n,this.errors)}_stripComments(e){const t=this._commentStart(e);return null!=t?e.substring(0,t).trim():e}_commentStart(e){let t=null;for(let s=0;s<e.length-1;s++){const r=e.charCodeAt(s),i=e.charCodeAt(s+1);if(47===r&&47==i&&null==t)return s;t===r?t=null:null==t&&(39===(n=r)||34===n||96===n)&&(t=r)}var n;return null}_checkNoInterpolation(e,t,n){const s=(r=n)===Ws?so:ro(r);var r;const i=e.split(s);i.length>1&&this._reportError(`Got interpolation (${n.start}${n.end}) where expression was expected`,e,`at column ${this._findInterpolationErrorColumn(i,1,n)} in`,t)}_findInterpolationErrorColumn(e,t,n){let s="";for(let r=0;r<t;r++)s+=r%2==0?e[r]:`${n.start}${e[r]}${n.end}`;return s.length}}class ao extends io{constructor(){super(...arguments),this.simpleExpressionChecker=uo}}var oo;!function(e){e[e.None=0]="None",e[e.Writable=1]="Writable"}(oo||(oo={}));class lo{constructor(e,t,n,s,r,i,a,o){this.input=e,this.location=t,this.absoluteOffset=n,this.tokens=s,this.inputLength=r,this.parseAction=i,this.errors=a,this.offset=o,this.rparensExpected=0,this.rbracketsExpected=0,this.rbracesExpected=0,this.context=oo.None,this.sourceSpanCache=new Map,this.index=0}peek(e){const t=this.index+e;return t<this.tokens.length?this.tokens[t]:Ga}get next(){return this.peek(0)}get atEOF(){return this.index>=this.tokens.length}get inputIndex(){return this.atEOF?this.currentEndIndex:this.next.index+this.offset}get currentEndIndex(){return this.index>0?this.peek(-1).end+this.offset:0===this.tokens.length?this.inputLength+this.offset:this.next.index+this.offset}get currentAbsoluteOffset(){return this.absoluteOffset+this.inputIndex}span(e){return new Cr(e,this.currentEndIndex)}sourceSpan(e){const t=`${e}@${this.inputIndex}`;return this.sourceSpanCache.has(t)||this.sourceSpanCache.set(t,this.span(e).toAbsolute(this.absoluteOffset)),this.sourceSpanCache.get(t)}advance(){this.index++}withContext(e,t){this.context|=e;const n=t();return this.context^=e,n}consumeOptionalCharacter(e){return!!this.next.isCharacter(e)&&(this.advance(),!0)}peekKeywordLet(){return this.next.isKeywordLet()}peekKeywordAs(){return this.next.isKeywordAs()}expectCharacter(e){this.consumeOptionalCharacter(e)||this.error("Missing expected "+String.fromCharCode(e))}consumeOptionalOperator(e){return!!this.next.isOperator(e)&&(this.advance(),!0)}expectOperator(e){this.consumeOptionalOperator(e)||this.error("Missing expected operator "+e)}prettyPrintToken(e){return e===Ga?"end of input":"token "+e}expectIdentifierOrKeyword(){const e=this.next;return e.isIdentifier()||e.isKeyword()?(this.advance(),e.toString()):(this.error(`Unexpected ${this.prettyPrintToken(e)}, expected identifier or keyword`),"")}expectIdentifierOrKeywordOrString(){const e=this.next;return e.isIdentifier()||e.isKeyword()||e.isString()?(this.advance(),e.toString()):(this.error(`Unexpected ${this.prettyPrintToken(e)}, expected identifier, keyword, or string`),"")}parseChain(){const e=[],t=this.inputIndex;for(;this.index<this.tokens.length;){const t=this.parsePipe();if(e.push(t),this.consumeOptionalCharacter(59))for(this.parseAction||this.error("Binding expression cannot contain chained expression");this.consumeOptionalCharacter(59););else this.index<this.tokens.length&&this.error(`Unexpected token '${this.next}'`)}return 0==e.length?new Tr(this.span(t),this.sourceSpan(t)):1==e.length?e[0]:new Pr(this.span(t),this.sourceSpan(t),e)}parsePipe(){let e=this.parseExpression();if(this.consumeOptionalOperator("|")){this.parseAction&&this.error("Cannot have a pipe in an action expression");do{const t=this.inputIndex,n=this.expectIdentifierOrKeyword(),s=this.sourceSpan(t),r=[];for(;this.consumeOptionalCharacter(58);)r.push(this.parseExpression());const{start:i}=e.span;e=new Fr(this.span(i),this.sourceSpan(i),e,n,r,s)}while(this.consumeOptionalOperator("|"))}return e}parseExpression(){return this.parseConditional()}parseConditional(){const e=this.inputIndex,t=this.parseLogicalOr();if(this.consumeOptionalOperator("?")){const n=this.parsePipe();let s;if(this.consumeOptionalCharacter(58))s=this.parsePipe();else{const t=this.input.substring(e,this.inputIndex);this.error(`Conditional expression ${t} requires all 3 expressions`),s=new Tr(this.span(e),this.sourceSpan(e))}return new kr(this.span(e),this.sourceSpan(e),t,n,s)}return t}parseLogicalOr(){let e=this.parseLogicalAnd();for(;this.consumeOptionalOperator("||");){const t=this.parseLogicalAnd(),{start:n}=e.span;e=new Ur(this.span(n),this.sourceSpan(n),"||",e,t)}return e}parseLogicalAnd(){let e=this.parseEquality();for(;this.consumeOptionalOperator("&&");){const t=this.parseEquality(),{start:n}=e.span;e=new Ur(this.span(n),this.sourceSpan(n),"&&",e,t)}return e}parseEquality(){let e=this.parseRelational();for(;this.next.type==Ra.Operator;){const t=this.next.strValue;switch(t){case"==":case"===":case"!=":case"!==":this.advance();const n=this.parseRelational(),{start:s}=e.span;e=new Ur(this.span(s),this.sourceSpan(s),t,e,n);continue}break}return e}parseRelational(){let e=this.parseAdditive();for(;this.next.type==Ra.Operator;){const t=this.next.strValue;switch(t){case"<":case">":case"<=":case">=":this.advance();const n=this.parseAdditive(),{start:s}=e.span;e=new Ur(this.span(s),this.sourceSpan(s),t,e,n);continue}break}return e}parseAdditive(){let e=this.parseMultiplicative();for(;this.next.type==Ra.Operator;){const t=this.next.strValue;switch(t){case"+":case"-":this.advance();let n=this.parseMultiplicative();const{start:s}=e.span;e=new Ur(this.span(s),this.sourceSpan(s),t,e,n);continue}break}return e}parseMultiplicative(){let e=this.parsePrefix();for(;this.next.type==Ra.Operator;){const t=this.next.strValue;switch(t){case"*":case"%":case"/":this.advance();let n=this.parsePrefix();const{start:s}=e.span;e=new Ur(this.span(s),this.sourceSpan(s),t,e,n);continue}break}return e}parsePrefix(){if(this.next.type==Ra.Operator){const e=this.inputIndex;let t;switch(this.next.strValue){case"+":return this.advance(),t=this.parsePrefix(),qr.createPlus(this.span(e),this.sourceSpan(e),t);case"-":return this.advance(),t=this.parsePrefix(),qr.createMinus(this.span(e),this.sourceSpan(e),t);case"!":return this.advance(),t=this.parsePrefix(),new Hr(this.span(e),this.sourceSpan(e),t)}}return this.parseCallChain()}parseCallChain(){let e=this.parsePrimary();const t=e.span.start;for(;;)if(this.consumeOptionalCharacter(46))e=this.parseAccessMemberOrMethodCall(e,!1);else if(this.consumeOptionalOperator("?."))e=this.parseAccessMemberOrMethodCall(e,!0);else if(this.consumeOptionalCharacter(91))this.withContext(oo.Writable,()=>{this.rbracketsExpected++;const n=this.parsePipe();if(n instanceof Tr&&this.error("Key access cannot be empty"),this.rbracketsExpected--,this.expectCharacter(93),this.consumeOptionalOperator("=")){const s=this.parseConditional();e=new Dr(this.span(t),this.sourceSpan(t),e,n,s)}else e=new Rr(this.span(t),this.sourceSpan(t),e,n)});else if(this.consumeOptionalCharacter(40)){this.rparensExpected++;const n=this.parseCallArguments();this.rparensExpected--,this.expectCharacter(41),e=new Xr(this.span(t),this.sourceSpan(t),e,n)}else{if(!this.consumeOptionalOperator("!"))return e;e=new Wr(this.span(t),this.sourceSpan(t),e)}}parsePrimary(){const e=this.inputIndex;if(this.consumeOptionalCharacter(40)){this.rparensExpected++;const e=this.parsePipe();return this.rparensExpected--,this.expectCharacter(41),e}if(this.next.isKeywordNull())return this.advance(),new Br(this.span(e),this.sourceSpan(e),null);if(this.next.isKeywordUndefined())return this.advance(),new Br(this.span(e),this.sourceSpan(e),void 0);if(this.next.isKeywordTrue())return this.advance(),new Br(this.span(e),this.sourceSpan(e),!0);if(this.next.isKeywordFalse())return this.advance(),new Br(this.span(e),this.sourceSpan(e),!1);if(this.next.isKeywordThis())return this.advance(),new Ar(this.span(e),this.sourceSpan(e));if(this.consumeOptionalCharacter(91)){this.rbracketsExpected++;const t=this.parseExpressionList(93);return this.rbracketsExpected--,this.expectCharacter(93),new $r(this.span(e),this.sourceSpan(e),t)}if(this.next.isCharacter(123))return this.parseLiteralMap();if(this.next.isIdentifier())return this.parseAccessMemberOrMethodCall(new Nr(this.span(e),this.sourceSpan(e)),!1);if(this.next.isNumber()){const t=this.next.toNumber();return this.advance(),new Br(this.span(e),this.sourceSpan(e),t)}if(this.next.isString()){const t=this.next.toString();return this.advance(),new Br(this.span(e),this.sourceSpan(e),t)}return this.index>=this.tokens.length?(this.error("Unexpected end of expression: "+this.input),new Tr(this.span(e),this.sourceSpan(e))):(this.error("Unexpected token "+this.next),new Tr(this.span(e),this.sourceSpan(e)))}parseExpressionList(e){const t=[];if(!this.next.isCharacter(e))do{t.push(this.parsePipe())}while(this.consumeOptionalCharacter(44));return t}parseLiteralMap(){const e=[],t=[],n=this.inputIndex;if(this.expectCharacter(123),!this.consumeOptionalCharacter(125)){this.rbracesExpected++;do{const n=this.next.isString(),s=this.expectIdentifierOrKeywordOrString();e.push({key:s,quoted:n}),this.expectCharacter(58),t.push(this.parsePipe())}while(this.consumeOptionalCharacter(44));this.rbracesExpected--,this.expectCharacter(125)}return new Vr(this.span(n),this.sourceSpan(n),e,t)}parseAccessMemberOrMethodCall(e,t=!1){const n=e.span.start,s=this.inputIndex,r=this.expectIdentifierOrKeyword(),i=this.sourceSpan(s);if(this.consumeOptionalCharacter(40)){this.rparensExpected++;const s=this.parseCallArguments();this.expectCharacter(41),this.rparensExpected--;const a=this.span(n),o=this.sourceSpan(n);return t?new Kr(a,o,i,e,r,s):new zr(a,o,i,e,r,s)}if(t)return this.consumeOptionalOperator("=")?(this.error("The '?.' operator cannot be used in the assignment"),new Tr(this.span(n),this.sourceSpan(n))):new Lr(this.span(n),this.sourceSpan(n),i,e,r);if(this.consumeOptionalOperator("=")){if(!this.parseAction)return this.error("Bindings cannot contain assignments"),new Tr(this.span(n),this.sourceSpan(n));const t=this.parseConditional();return new Mr(this.span(n),this.sourceSpan(n),i,e,r,t)}return new Or(this.span(n),this.sourceSpan(n),i,e,r)}parseCallArguments(){if(this.next.isCharacter(41))return[];const e=[];do{e.push(this.parsePipe())}while(this.consumeOptionalCharacter(44));return e}expectTemplateBindingKey(){let e="",t=!1;const n=this.currentAbsoluteOffset;do{e+=this.expectIdentifierOrKeywordOrString(),t=this.consumeOptionalOperator("-"),t&&(e+="-")}while(t);return{source:e,span:new Gr(n,n+e.length)}}parseTemplateBindings(e){const t=[];for(t.push(...this.parseDirectiveKeywordBindings(e));this.index<this.tokens.length;){const n=this.parseLetBinding();if(n)t.push(n);else{const n=this.expectTemplateBindingKey(),s=this.parseAsBinding(n);s?t.push(s):(n.source=e.source+n.source[0].toUpperCase()+n.source.substring(1),t.push(...this.parseDirectiveKeywordBindings(n)))}this.consumeStatementTerminator()}return new no(t,[],this.errors)}parseDirectiveKeywordBindings(e){const t=[];this.consumeOptionalCharacter(58);const n=this.getDirectiveBoundTarget();let s=this.currentAbsoluteOffset;const r=this.parseAsBinding(e);r||(this.consumeStatementTerminator(),s=this.currentAbsoluteOffset);const i=new Gr(e.span.start,s);return t.push(new Zr(i,e,n)),r&&t.push(r),t}getDirectiveBoundTarget(){if(this.next===Ga||this.peekKeywordAs()||this.peekKeywordLet())return null;const e=this.parsePipe(),{start:t,end:n}=e.span,s=this.input.substring(t,n);return new Qr(e,s,this.location,this.absoluteOffset+t,this.errors)}parseAsBinding(e){if(!this.peekKeywordAs())return null;this.advance();const t=this.expectTemplateBindingKey();this.consumeStatementTerminator();const n=new Gr(e.span.start,this.currentAbsoluteOffset);return new Yr(n,t,e)}parseLetBinding(){if(!this.peekKeywordLet())return null;const e=this.currentAbsoluteOffset;this.advance();const t=this.expectTemplateBindingKey();let n=null;this.consumeOptionalOperator("=")&&(n=this.expectTemplateBindingKey()),this.consumeStatementTerminator();const s=new Gr(e,this.currentAbsoluteOffset);return new Yr(s,t,n)}consumeStatementTerminator(){this.consumeOptionalCharacter(59)||this.consumeOptionalCharacter(44)}error(e,t=null){this.errors.push(new _r(e,this.input,this.locationText(t),this.location)),this.skip()}locationText(e=null){return null==e&&(e=this.index),e<this.tokens.length?`at column ${this.tokens[e].index+1} in`:"at the end of the expression"}skip(){let e=this.next;for(;this.index<this.tokens.length&&!e.isCharacter(59)&&(this.rparensExpected<=0||!e.isCharacter(41))&&(this.rbracesExpected<=0||!e.isCharacter(125))&&(this.rbracketsExpected<=0||!e.isCharacter(93))&&!(this.context&oo.Writable&&e.isOperator("="));)this.next.isError()&&this.errors.push(new _r(this.next.toString(),this.input,this.locationText(),this.location)),this.advance(),e=this.next}}class co{constructor(){this.errors=[]}visitImplicitReceiver(e,t){}visitThisReceiver(e,t){}visitInterpolation(e,t){}visitLiteralPrimitive(e,t){}visitPropertyRead(e,t){}visitPropertyWrite(e,t){}visitSafePropertyRead(e,t){}visitMethodCall(e,t){}visitSafeMethodCall(e,t){}visitFunctionCall(e,t){}visitLiteralArray(e,t){this.visitAll(e.expressions,t)}visitLiteralMap(e,t){this.visitAll(e.values,t)}visitUnary(e,t){}visitBinary(e,t){}visitPrefixNot(e,t){}visitNonNullAssert(e,t){}visitConditional(e,t){}visitPipe(e,t){this.errors.push("pipes")}visitKeyedRead(e,t){}visitKeyedWrite(e,t){}visitAll(e,t){return e.map(e=>e.visit(this,t))}visitChain(e,t){}visitQuote(e,t){}}class uo extends Jr{constructor(){super(...arguments),this.errors=[]}visitPipe(){this.errors.push("pipes")}}let po;function ho(){return po||(po={},mo(ke.HTML,["iframe|srcdoc","*|innerHTML","*|outerHTML"]),mo(ke.STYLE,["*|style"]),mo(ke.URL,["*|formAction","area|href","area|ping","audio|src","a|href","a|ping","blockquote|cite","body|background","del|cite","form|action","img|src","img|srcset","input|src","ins|cite","q|cite","source|src","source|srcset","track|src","video|poster","video|src"]),mo(ke.RESOURCE_URL,["applet|code","applet|codebase","base|href","embed|src","frame|src","head|profile","html|manifest","iframe|src","link|href","media|src","object|codebase","object|data","script|src"])),po}function mo(e,t){for(const n of t)po[n.toLowerCase()]=e}const go=["[Element]|textContent,%classList,className,id,innerHTML,*beforecopy,*beforecut,*beforepaste,*copy,*cut,*paste,*search,*selectstart,*webkitfullscreenchange,*webkitfullscreenerror,*wheel,outerHTML,#scrollLeft,#scrollTop,slot,*message,*mozfullscreenchange,*mozfullscreenerror,*mozpointerlockchange,*mozpointerlockerror,*webglcontextcreationerror,*webglcontextlost,*webglcontextrestored","[HTMLElement]^[Element]|accessKey,contentEditable,dir,!draggable,!hidden,innerText,lang,*abort,*auxclick,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contextmenu,*cuechange,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*gotpointercapture,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*lostpointercapture,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*pause,*play,*playing,*pointercancel,*pointerdown,*pointerenter,*pointerleave,*pointermove,*pointerout,*pointerover,*pointerup,*progress,*ratechange,*reset,*resize,*scroll,*seeked,*seeking,*select,*show,*stalled,*submit,*suspend,*timeupdate,*toggle,*volumechange,*waiting,outerText,!spellcheck,%style,#tabIndex,title,!translate","abbr,address,article,aside,b,bdi,bdo,cite,code,dd,dfn,dt,em,figcaption,figure,footer,header,i,kbd,main,mark,nav,noscript,rb,rp,rt,rtc,ruby,s,samp,section,small,strong,sub,sup,u,var,wbr^[HTMLElement]|accessKey,contentEditable,dir,!draggable,!hidden,innerText,lang,*abort,*auxclick,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contextmenu,*cuechange,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*gotpointercapture,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*lostpointercapture,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*pause,*play,*playing,*pointercancel,*pointerdown,*pointerenter,*pointerleave,*pointermove,*pointerout,*pointerover,*pointerup,*progress,*ratechange,*reset,*resize,*scroll,*seeked,*seeking,*select,*show,*stalled,*submit,*suspend,*timeupdate,*toggle,*volumechange,*waiting,outerText,!spellcheck,%style,#tabIndex,title,!translate","media^[HTMLElement]|!autoplay,!controls,%controlsList,%crossOrigin,#currentTime,!defaultMuted,#defaultPlaybackRate,!disableRemotePlayback,!loop,!muted,*encrypted,*waitingforkey,#playbackRate,preload,src,%srcObject,#volume",":svg:^[HTMLElement]|*abort,*auxclick,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contextmenu,*cuechange,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*gotpointercapture,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*lostpointercapture,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*pause,*play,*playing,*pointercancel,*pointerdown,*pointerenter,*pointerleave,*pointermove,*pointerout,*pointerover,*pointerup,*progress,*ratechange,*reset,*resize,*scroll,*seeked,*seeking,*select,*show,*stalled,*submit,*suspend,*timeupdate,*toggle,*volumechange,*waiting,%style,#tabIndex",":svg:graphics^:svg:|",":svg:animation^:svg:|*begin,*end,*repeat",":svg:geometry^:svg:|",":svg:componentTransferFunction^:svg:|",":svg:gradient^:svg:|",":svg:textContent^:svg:graphics|",":svg:textPositioning^:svg:textContent|","a^[HTMLElement]|charset,coords,download,hash,host,hostname,href,hreflang,name,password,pathname,ping,port,protocol,referrerPolicy,rel,rev,search,shape,target,text,type,username","area^[HTMLElement]|alt,coords,download,hash,host,hostname,href,!noHref,password,pathname,ping,port,protocol,referrerPolicy,rel,search,shape,target,username","audio^media|","br^[HTMLElement]|clear","base^[HTMLElement]|href,target","body^[HTMLElement]|aLink,background,bgColor,link,*beforeunload,*blur,*error,*focus,*hashchange,*languagechange,*load,*message,*offline,*online,*pagehide,*pageshow,*popstate,*rejectionhandled,*resize,*scroll,*storage,*unhandledrejection,*unload,text,vLink","button^[HTMLElement]|!autofocus,!disabled,formAction,formEnctype,formMethod,!formNoValidate,formTarget,name,type,value","canvas^[HTMLElement]|#height,#width","content^[HTMLElement]|select","dl^[HTMLElement]|!compact","datalist^[HTMLElement]|","details^[HTMLElement]|!open","dialog^[HTMLElement]|!open,returnValue","dir^[HTMLElement]|!compact","div^[HTMLElement]|align","embed^[HTMLElement]|align,height,name,src,type,width","fieldset^[HTMLElement]|!disabled,name","font^[HTMLElement]|color,face,size","form^[HTMLElement]|acceptCharset,action,autocomplete,encoding,enctype,method,name,!noValidate,target","frame^[HTMLElement]|frameBorder,longDesc,marginHeight,marginWidth,name,!noResize,scrolling,src","frameset^[HTMLElement]|cols,*beforeunload,*blur,*error,*focus,*hashchange,*languagechange,*load,*message,*offline,*online,*pagehide,*pageshow,*popstate,*rejectionhandled,*resize,*scroll,*storage,*unhandledrejection,*unload,rows","hr^[HTMLElement]|align,color,!noShade,size,width","head^[HTMLElement]|","h1,h2,h3,h4,h5,h6^[HTMLElement]|align","html^[HTMLElement]|version","iframe^[HTMLElement]|align,!allowFullscreen,frameBorder,height,longDesc,marginHeight,marginWidth,name,referrerPolicy,%sandbox,scrolling,src,srcdoc,width","img^[HTMLElement]|align,alt,border,%crossOrigin,#height,#hspace,!isMap,longDesc,lowsrc,name,referrerPolicy,sizes,src,srcset,useMap,#vspace,#width","input^[HTMLElement]|accept,align,alt,autocapitalize,autocomplete,!autofocus,!checked,!defaultChecked,defaultValue,dirName,!disabled,%files,formAction,formEnctype,formMethod,!formNoValidate,formTarget,#height,!incremental,!indeterminate,max,#maxLength,min,#minLength,!multiple,name,pattern,placeholder,!readOnly,!required,selectionDirection,#selectionEnd,#selectionStart,#size,src,step,type,useMap,value,%valueAsDate,#valueAsNumber,#width","li^[HTMLElement]|type,#value","label^[HTMLElement]|htmlFor","legend^[HTMLElement]|align","link^[HTMLElement]|as,charset,%crossOrigin,!disabled,href,hreflang,integrity,media,referrerPolicy,rel,%relList,rev,%sizes,target,type","map^[HTMLElement]|name","marquee^[HTMLElement]|behavior,bgColor,direction,height,#hspace,#loop,#scrollAmount,#scrollDelay,!trueSpeed,#vspace,width","menu^[HTMLElement]|!compact","meta^[HTMLElement]|content,httpEquiv,name,scheme","meter^[HTMLElement]|#high,#low,#max,#min,#optimum,#value","ins,del^[HTMLElement]|cite,dateTime","ol^[HTMLElement]|!compact,!reversed,#start,type","object^[HTMLElement]|align,archive,border,code,codeBase,codeType,data,!declare,height,#hspace,name,standby,type,useMap,#vspace,width","optgroup^[HTMLElement]|!disabled,label","option^[HTMLElement]|!defaultSelected,!disabled,label,!selected,text,value","output^[HTMLElement]|defaultValue,%htmlFor,name,value","p^[HTMLElement]|align","param^[HTMLElement]|name,type,value,valueType","picture^[HTMLElement]|","pre^[HTMLElement]|#width","progress^[HTMLElement]|#max,#value","q,blockquote,cite^[HTMLElement]|","script^[HTMLElement]|!async,charset,%crossOrigin,!defer,event,htmlFor,integrity,src,text,type","select^[HTMLElement]|!autofocus,!disabled,#length,!multiple,name,!required,#selectedIndex,#size,value","shadow^[HTMLElement]|","slot^[HTMLElement]|name","source^[HTMLElement]|media,sizes,src,srcset,type","span^[HTMLElement]|","style^[HTMLElement]|!disabled,media,type","caption^[HTMLElement]|align","th,td^[HTMLElement]|abbr,align,axis,bgColor,ch,chOff,#colSpan,headers,height,!noWrap,#rowSpan,scope,vAlign,width","col,colgroup^[HTMLElement]|align,ch,chOff,#span,vAlign,width","table^[HTMLElement]|align,bgColor,border,%caption,cellPadding,cellSpacing,frame,rules,summary,%tFoot,%tHead,width","tr^[HTMLElement]|align,bgColor,ch,chOff,vAlign","tfoot,thead,tbody^[HTMLElement]|align,ch,chOff,vAlign","template^[HTMLElement]|","textarea^[HTMLElement]|autocapitalize,!autofocus,#cols,defaultValue,dirName,!disabled,#maxLength,#minLength,name,placeholder,!readOnly,!required,#rows,selectionDirection,#selectionEnd,#selectionStart,value,wrap","title^[HTMLElement]|text","track^[HTMLElement]|!default,kind,label,src,srclang","ul^[HTMLElement]|!compact,type","unknown^[HTMLElement]|","video^media|#height,poster,#width",":svg:a^:svg:graphics|",":svg:animate^:svg:animation|",":svg:animateMotion^:svg:animation|",":svg:animateTransform^:svg:animation|",":svg:circle^:svg:geometry|",":svg:clipPath^:svg:graphics|",":svg:defs^:svg:graphics|",":svg:desc^:svg:|",":svg:discard^:svg:|",":svg:ellipse^:svg:geometry|",":svg:feBlend^:svg:|",":svg:feColorMatrix^:svg:|",":svg:feComponentTransfer^:svg:|",":svg:feComposite^:svg:|",":svg:feConvolveMatrix^:svg:|",":svg:feDiffuseLighting^:svg:|",":svg:feDisplacementMap^:svg:|",":svg:feDistantLight^:svg:|",":svg:feDropShadow^:svg:|",":svg:feFlood^:svg:|",":svg:feFuncA^:svg:componentTransferFunction|",":svg:feFuncB^:svg:componentTransferFunction|",":svg:feFuncG^:svg:componentTransferFunction|",":svg:feFuncR^:svg:componentTransferFunction|",":svg:feGaussianBlur^:svg:|",":svg:feImage^:svg:|",":svg:feMerge^:svg:|",":svg:feMergeNode^:svg:|",":svg:feMorphology^:svg:|",":svg:feOffset^:svg:|",":svg:fePointLight^:svg:|",":svg:feSpecularLighting^:svg:|",":svg:feSpotLight^:svg:|",":svg:feTile^:svg:|",":svg:feTurbulence^:svg:|",":svg:filter^:svg:|",":svg:foreignObject^:svg:graphics|",":svg:g^:svg:graphics|",":svg:image^:svg:graphics|",":svg:line^:svg:geometry|",":svg:linearGradient^:svg:gradient|",":svg:mpath^:svg:|",":svg:marker^:svg:|",":svg:mask^:svg:|",":svg:metadata^:svg:|",":svg:path^:svg:geometry|",":svg:pattern^:svg:|",":svg:polygon^:svg:geometry|",":svg:polyline^:svg:geometry|",":svg:radialGradient^:svg:gradient|",":svg:rect^:svg:geometry|",":svg:svg^:svg:graphics|#currentScale,#zoomAndPan",":svg:script^:svg:|type",":svg:set^:svg:animation|",":svg:stop^:svg:|",":svg:style^:svg:|!disabled,media,title,type",":svg:switch^:svg:graphics|",":svg:symbol^:svg:|",":svg:tspan^:svg:textPositioning|",":svg:text^:svg:textPositioning|",":svg:textPath^:svg:textContent|",":svg:title^:svg:|",":svg:use^:svg:graphics|",":svg:view^:svg:|#zoomAndPan","data^[HTMLElement]|value","keygen^[HTMLElement]|!autofocus,challenge,!disabled,form,keytype,name","menuitem^[HTMLElement]|type,label,icon,!disabled,!checked,radiogroup,!default","summary^[HTMLElement]|","time^[HTMLElement]|dateTime",":svg:cursor^:svg:|"],fo={class:"className",for:"htmlFor",formaction:"formAction",innerHtml:"innerHTML",readonly:"readOnly",tabindex:"tabIndex"};class vo extends class{}{constructor(){super(),this._schema={},go.forEach(e=>{const t={},[n,s]=e.split("|"),r=s.split(","),[i,a]=n.split("^");i.split(",").forEach(e=>this._schema[e.toLowerCase()]=t);const o=a&&this._schema[a.toLowerCase()];o&&Object.keys(o).forEach(e=>{t[e]=o[e]}),r.forEach(e=>{if(e.length>0)switch(e[0]){case"*":break;case"!":t[e.substring(1)]="boolean";break;case"#":t[e.substring(1)]="number";break;case"%":t[e.substring(1)]="object";break;default:t[e]="string"}})})}hasProperty(e,t,n){if(n.some(e=>"no-errors-schema"===e.name))return!0;if(e.indexOf("-")>-1){if(ge(e)||fe(e))return!1;if(n.some(e=>"custom-elements"===e.name))return!0}return!!(this._schema[e.toLowerCase()]||this._schema.unknown)[t]}hasElement(e,t){if(t.some(e=>"no-errors-schema"===e.name))return!0;if(e.indexOf("-")>-1){if(ge(e)||fe(e))return!0;if(t.some(e=>"custom-elements"===e.name))return!0}return!!this._schema[e.toLowerCase()]}securityContext(e,t,n){n&&(t=this.getMappedPropName(t)),e=e.toLowerCase(),t=t.toLowerCase();let s=ho()[e+"|"+t];return s||(s=ho()["*|"+t],s||ke.NONE)}getMappedPropName(e){return fo[e]||e}getDefaultComponentElementName(){return"ng-component"}validateProperty(e){return e.toLowerCase().startsWith("on")?{error:!0,msg:`Binding to event property '${e}' is disallowed for security reasons, please use (${e.slice(2)})=...\nIf '${e}' is a directive input, make sure the directive is imported by the current module.`}:{error:!1}}validateAttribute(e){return e.toLowerCase().startsWith("on")?{error:!0,msg:`Binding to event attribute '${e}' is disallowed for security reasons, please use (${e.slice(2)})=...`}:{error:!1}}allKnownElementNames(){return Object.keys(this._schema)}normalizeAnimationStyleProperty(e){return e.replace(Yt,(...e)=>e[1].toUpperCase())}normalizeAnimationStyleValue(e,t,n){let s="";const r=n.toString().trim();let i=null;if(function(e){switch(e){case"width":case"height":case"minWidth":case"minHeight":case"maxWidth":case"maxHeight":case"left":case"top":case"bottom":case"right":case"fontSize":case"outlineWidth":case"outlineOffset":case"paddingTop":case"paddingLeft":case"paddingBottom":case"paddingRight":case"marginTop":case"marginLeft":case"marginBottom":case"marginRight":case"borderRadius":case"borderWidth":case"borderTopWidth":case"borderLeftWidth":case"borderRightWidth":case"borderBottomWidth":case"textIndent":return!0;default:return!1}}(e)&&0!==n&&"0"!==n)if("number"==typeof n)s="px";else{const e=n.match(/^[+-]?[\d\.]+([a-z]*)$/);e&&0==e[1].length&&(i=`Please provide a CSS unit value for ${t}:${n}`)}return{error:i,value:r+s}}}const yo=/^(?:(?:(?:(bind-)|(let-)|(ref-|#)|(on-)|(bindon-)|(@))(.*))|\[\(([^\)]+)\)\]|\[([^\]]+)\]|\(([^\)]+)\))$/;class xo{constructor(e){this.bindingParser=e,this.errors=[],this.styles=[],this.styleUrls=[],this.ngContentSelectors=[],this.inI18nBlock=!1}visitElement(e){const t=hs(e.i18n);t&&(this.inI18nBlock&&this.reportError("Cannot mark an element as translatable inside of a translatable section. Please remove the nested i18n marker.",e.sourceSpan),this.inI18nBlock=!0);const n=Ma(e);if(n.type===La.SCRIPT)return null;if(n.type===La.STYLE){const t=1===(s=e).children.length&&s.children[0]instanceof Wi?s.children[0].value:null;return null!==t&&this.styles.push(t),null}if(n.type===La.STYLESHEET&&function(e){if(null==e||0===e.length||"/"==e[0])return!1;const t=e.match(Ta);return null===t||"package"==t[1]||"asset"==t[1]}(n.hrefAttr))return this.styleUrls.push(n.hrefAttr),null;var s;const r="ng-template"===me(e.name)[1],i=[],a=[],o=[],l=[],c=[],u={},p=[],h=[];let d=!1;for(const t of e.attrs){let e=!1;const n=Eo(t.name);let s=!1;if(t.i18n&&(u[t.name]=t.i18n),n.startsWith("*")){d&&this.reportError("Can't have multiple template bindings on one element. Use only one attribute prefixed with *",t.sourceSpan),s=!0,d=!0;const e=t.value,r=n.substring("*".length),i=[];this.bindingParser.parseInlineTemplateBinding(r,e,t.sourceSpan,t.valueSpan?t.valueSpan.start.offset:t.sourceSpan.start.offset+t.name.length,[],p,i,!0),h.push(...i.map(e=>new Rn(e.name,e.value,e.sourceSpan,e.keySpan,e.valueSpan)))}else e=this.parseAttribute(r,t,[],i,a,o,l);e||s||c.push(this.visitAttribute(t))}const m=Yi(n.nonBindable?So:this,e.children);let g;if(n.type===La.NG_CONTENT){e.children&&!e.children.every(e=>function(e){return e instanceof Wi&&0==e.value.trim().length}(e)||function(e){return e instanceof Qi}(e))&&this.reportError("<ng-content> element cannot have content.",e.sourceSpan);const t=n.selectAttr,s=e.attrs.map(e=>this.visitAttribute(e));g=new Ln(t,s,e.sourceSpan,e.i18n),this.ngContentSelectors.push(t)}else if(r){const t=this.extractAttributes(e.name,i,u);g=new Mn(e.name,c,t.bound,a,[],m,l,o,e.sourceSpan,e.startSourceSpan,e.endSourceSpan,e.i18n)}else{const t=this.extractAttributes(e.name,i,u);g=new On(e.name,c,t.bound,a,m,l,e.sourceSpan,e.startSourceSpan,e.endSourceSpan,e.i18n)}if(d){const n=this.extractAttributes("ng-template",p,u),s=[];n.literal.forEach(e=>s.push(e)),n.bound.forEach(e=>s.push(e));const i=g instanceof On?{attributes:g.attributes,inputs:g.inputs,outputs:g.outputs}:{attributes:[],inputs:[],outputs:[]};g=new Mn(g.name,i.attributes,i.inputs,i.outputs,s,[g],[],h,e.sourceSpan,e.startSourceSpan,e.endSourceSpan,r&&t?void 0:e.i18n)}return t&&(this.inI18nBlock=!1),g}visitAttribute(e){return new An(e.name,e.value,e.sourceSpan,e.valueSpan,e.i18n)}visitText(e){return this._visitTextWithInterpolation(e.value,e.sourceSpan,e.i18n)}visitExpansion(e){if(!e.i18n)return null;if(!hs(e.i18n))throw new Error(`Invalid type "${e.i18n.constructor}" for "i18n" property of ${e.sourceSpan.toString()}. Expected a "Message"`);const t=e.i18n,n={},s={};return Object.keys(t.placeholders).forEach(e=>{const r=t.placeholders[e];if(e.startsWith("VAR_")){const t=e.trim(),s=this.bindingParser.parseInterpolationExpression(r.text,r.sourceSpan);n[t]=new Nn(s,r.sourceSpan)}else s[e]=this._visitTextWithInterpolation(r.text,r.sourceSpan)}),new Fn(n,s,e.sourceSpan,t)}visitExpansionCase(e){return null}visitComment(e){return null}extractAttributes(e,t,n){const s=[],r=[];return t.forEach(t=>{const i=n[t.name];if(t.isLiteral)r.push(new An(t.name,t.expression.source||"",t.sourceSpan,void 0,i));else{const n=this.bindingParser.createBoundElementProperty(e,t,!0,!1);s.push(Pn.fromBoundElementProperty(n,i))}}),{bound:s,literal:r}}parseAttribute(e,t,n,s,r,i,a){const o=Eo(t.name),l=t.value,c=t.sourceSpan,u=t.valueSpan?t.valueSpan.start.offset:c.start.offset;function p(e,n,s){const r=e.start.moveBy(n.length+(t.name.length-o.length)),i=r.moveBy(s.length);return new hr(r,i,r,s)}const h=o.match(yo);let d=!1;if(h){if(d=!0,null!=h[1]){const e=h[7],r=p(c,h[1],e);this.bindingParser.parsePropertyBinding(e,l,!1,c,u,t.valueSpan,n,s,r)}else if(h[2])if(e){const e=h[7],n=p(c,h[2],e);this.parseVariable(e,l,c,n,t.valueSpan,i)}else this.reportError('"let-" is only supported on ng-template elements.',c);else if(h[3])this.parseReference(h[7],l,c,t.valueSpan,a);else if(h[4]){const e=[];this.bindingParser.parseEvent(h[7],l,c,t.valueSpan||c,n,e),_o(e,r)}else if(h[5]){const e=h[7],i=p(c,h[5],e);this.bindingParser.parsePropertyBinding(e,l,!1,c,u,t.valueSpan,n,s,i),this.parseAssignmentEvent(e,l,c,t.valueSpan,n,r)}else if(h[6]){const e=p(c,"",o);this.bindingParser.parseLiteralAttr(o,l,c,u,t.valueSpan,n,s,e)}else if(h[8]){const e=p(c,"[(",h[8]);this.bindingParser.parsePropertyBinding(h[8],l,!1,c,u,t.valueSpan,n,s,e),this.parseAssignmentEvent(h[8],l,c,t.valueSpan,n,r)}else if(h[9]){const e=p(c,"[",h[9]);this.bindingParser.parsePropertyBinding(h[9],l,!1,c,u,t.valueSpan,n,s,e)}else if(h[10]){const e=[];this.bindingParser.parseEvent(h[10],l,c,t.valueSpan||c,n,e),_o(e,r)}}else{const e=p(c,"",o);d=this.bindingParser.parsePropertyInterpolation(o,l,c,t.valueSpan,n,s,e)}return d}_visitTextWithInterpolation(e,t,n){const s=wa(e),r=this.bindingParser.parseInterpolation(s,t);return r?new Nn(r,t,n):new Tn(s,t)}parseVariable(e,t,n,s,r,i){e.indexOf("-")>-1?this.reportError('"-" is not allowed in variable names',n):0===e.length&&this.reportError("Variable does not have a name",n),i.push(new Rn(e,t,n,s,r))}parseReference(e,t,n,s,r){e.indexOf("-")>-1?this.reportError('"-" is not allowed in reference names',n):0===e.length&&this.reportError("Reference does not have a name",n),r.push(new Dn(e,t,n,s))}parseAssignmentEvent(e,t,n,s,r,i){const a=[];this.bindingParser.parseEvent(e+"Change",t+"=$event",n,s||n,r,a),_o(a,i)}reportError(e,t,n=dr.ERROR){this.errors.push(new vr(t,e,n))}}const So=new class{visitElement(e){const t=Ma(e);if(t.type===La.SCRIPT||t.type===La.STYLE||t.type===La.STYLESHEET)return null;const n=Yi(this,e.children,null);return new On(e.name,Yi(this,e.attrs),[],[],n,[],e.sourceSpan,e.startSourceSpan,e.endSourceSpan)}visitComment(e){return null}visitAttribute(e){return new An(e.name,e.value,e.sourceSpan,void 0,e.i18n)}visitText(e){return new Tn(e.value,e.sourceSpan)}visitExpansion(e){return null}visitExpansionCase(e){return null}};function Eo(e){return/^data-/i.test(e)?e.substring(5):e}function _o(e,t){t.push(...e.map(e=>kn.fromParsedEvent(e)))}var Co;!function(e){e[e.ELEMENT=0]="ELEMENT",e[e.TEMPLATE=1]="TEMPLATE"}(Co||(Co={}));class wo{constructor(e,t,n=0,s=null,r,i){this.index=e,this.ref=t,this.level=n,this.templateIndex=s,this.meta=r,this.registry=i,this.bindings=new Set,this.placeholders=new Map,this.isEmitted=!1,this._unresolvedCtxCount=0,this._registry=i||{getUniqueId:vs(),icus:new Map},this.id=this._registry.getUniqueId()}appendTag(e,t,n,s){t.isVoid&&s||xs(this.placeholders,t.isVoid||!s?t.startName:t.closeName,{type:e,index:n,ctx:this.id,isVoid:t.isVoid,closed:s})}get icus(){return this._registry.icus}get isRoot(){return 0===this.level}get isResolved(){return 0===this._unresolvedCtxCount}getSerializedPlaceholders(){const e=new Map;return this.placeholders.forEach((t,n)=>e.set(n,t.map(No))),e}appendBinding(e){this.bindings.add(e)}appendIcu(e,t){xs(this._registry.icus,e,t)}appendBoundText(e){Ss(e,this.bindings.size,this.id).forEach((e,t)=>xs(this.placeholders,t,...e))}appendTemplate(e,t){this.appendTag(Co.TEMPLATE,e,t,!1),this.appendTag(Co.TEMPLATE,e,t,!0),this._unresolvedCtxCount++}appendElement(e,t,n){this.appendTag(Co.ELEMENT,e,t,n)}appendProjection(e,t){this.appendTag(Co.ELEMENT,e,t,!1),this.appendTag(Co.ELEMENT,e,t,!0)}forkChildContext(e,t,n){return new wo(e,this.ref,this.level+1,t,n,this._registry)}reconcileChildContext(e){["start","close"].forEach(t=>{const n=(this.placeholders.get(e.meta[t+"Name"])||[]).find(To(this.id,e.templateIndex));n&&(n.ctx=e.id)}),e.placeholders.forEach((t,n)=>{const s=this.placeholders.get(n);if(!s)return void this.placeholders.set(n,t);const r=s.findIndex(To(e.id,e.templateIndex));if(r>=0){const e=n.startsWith("CLOSE");n.endsWith("NG-TEMPLATE")?s.splice(r+(e?0:1),0,...t):(t[e?t.length-1:0].tmpl=s[r],s.splice(r,1,...t))}else s.push(...t);this.placeholders.set(n,s)}),this._unresolvedCtxCount--}}function bo(e,t,n,s){return fs(`${s?"/":""}${e}${t}`,n)}function Io(e,{index:t,ctx:n,isVoid:s},r){return s?bo(e,t,n)+bo(e,t,n,!0):bo(e,t,n,r)}function To(e,t){return n=>"object"==typeof n&&n.type===Co.TEMPLATE&&n.index===t&&n.ctx===e}function No(e){const t=(e,t)=>Io("#",e,t),n=(e,t)=>Io("*",e,t);switch(e.type){case Co.ELEMENT:return e.closed?t(e,!0)+(e.tmpl?n(e.tmpl,!0):""):e.tmpl?n(e.tmpl)+t(e)+(e.isVoid?n(e.tmpl,!0):""):t(e);case Co.TEMPLATE:return n(e,e.closed);default:return e}}const Ao=new class{visitText(e){return e.value}visitContainer(e){return e.children.map(e=>e.visit(this)).join("")}visitIcu(e){const t=Object.keys(e.cases).map(t=>`${t} {${e.cases[t].visit(this)}}`);return`{${e.expressionPlaceholder}, ${e.type}, ${t.join(" ")}}`}visitTagPlaceholder(e){return e.isVoid?this.formatPh(e.startName):`${this.formatPh(e.startName)}${e.children.map(e=>e.visit(this)).join("")}${this.formatPh(e.closeName)}`}visitPlaceholder(e){return this.formatPh(e.name)}visitIcuPlaceholder(e,t){return this.formatPh(e.name)}formatPh(e){return`{${_s(e,!1)}}`}};function Po(e){return e.visit(Ao)}const ko={A:"LINK",B:"BOLD_TEXT",BR:"LINE_BREAK",EM:"EMPHASISED_TEXT",H1:"HEADING_LEVEL1",H2:"HEADING_LEVEL2",H3:"HEADING_LEVEL3",H4:"HEADING_LEVEL4",H5:"HEADING_LEVEL5",H6:"HEADING_LEVEL6",HR:"HORIZONTAL_RULE",I:"ITALIC_TEXT",LI:"LIST_ITEM",LINK:"MEDIA_LINK",OL:"ORDERED_LIST",P:"PARAGRAPH",Q:"QUOTATION",S:"STRIKETHROUGH_TEXT",SMALL:"SMALL_TEXT",SUB:"SUBSTRIPT",SUP:"SUPERSCRIPT",TBODY:"TABLE_BODY",TD:"TABLE_CELL",TFOOT:"TABLE_FOOTER",TH:"TABLE_HEADER_CELL",THEAD:"TABLE_HEADER",TR:"TABLE_ROW",TT:"MONOSPACED_TEXT",U:"UNDERLINED_TEXT",UL:"UNORDERED_LIST"};class Oo{constructor(){this._placeHolderNameCounts={},this._signatureToName={}}getStartTagPlaceholderName(e,t,n){const s=this._hashTag(e,t,n);if(this._signatureToName[s])return this._signatureToName[s];const r=e.toUpperCase(),i=ko[r]||"TAG_"+r,a=this._generateUniqueName(n?i:"START_"+i);return this._signatureToName[s]=a,a}getCloseTagPlaceholderName(e){const t=this._hashClosingTag(e);if(this._signatureToName[t])return this._signatureToName[t];const n=e.toUpperCase(),s=this._generateUniqueName("CLOSE_"+(ko[n]||"TAG_"+n));return this._signatureToName[t]=s,s}getPlaceholderName(e,t){const n=e.toUpperCase(),s=`PH: ${n}=${t}`;if(this._signatureToName[s])return this._signatureToName[s];const r=this._generateUniqueName(n);return this._signatureToName[s]=r,r}getUniquePlaceholder(e){return this._generateUniqueName(e.toUpperCase())}_hashTag(e,t,n){return"<"+e+Object.keys(t).sort().map(e=>` ${e}=${t[e]}`).join("")+(n?"/>":`></${e}>`)}_hashClosingTag(e){return this._hashTag("/"+e,{},!1)}_generateUniqueName(e){if(!this._placeHolderNameCounts.hasOwnProperty(e))return this._placeHolderNameCounts[e]=1,e;const t=this._placeHolderNameCounts[e];return this._placeHolderNameCounts[e]=t+1,`${e}_${t}`}}const Mo=new io(new Wa);function Lo(e,t){return t}class Ro{constructor(e,t){this._expressionParser=e,this._interpolationConfig=t}toI18nMessage(e,t="",n="",s="",r){const i={isIcu:1==e.length&&e[0]instanceof zi,icuDepth:0,placeholderRegistry:new Oo,placeholderToContent:{},placeholderToMessage:{},visitNodeFn:r||Lo},a=Yi(this,e,i);return new $n(a,i.placeholderToContent,i.placeholderToMessage,t,n,s)}visitElement(e,t){var n;const s=Yi(this,e.children,t),r={};e.attrs.forEach(e=>{r[e.name]=e.value});const i=Ce(e.name).isVoid,a=t.placeholderRegistry.getStartTagPlaceholderName(e.name,r,i);t.placeholderToContent[a]={text:e.startSourceSpan.toString(),sourceSpan:e.startSourceSpan};let o="";i||(o=t.placeholderRegistry.getCloseTagPlaceholderName(e.name),t.placeholderToContent[o]={text:`</${e.name}>`,sourceSpan:null!==(n=e.endSourceSpan)&&void 0!==n?n:e.sourceSpan});const l=new qn(e.name,r,a,o,s,i,e.sourceSpan,e.startSourceSpan,e.endSourceSpan);return t.visitNodeFn(e,l)}visitAttribute(e,t){const n=this._visitTextWithInterpolation(e.value,e.sourceSpan,t);return t.visitNodeFn(e,n)}visitText(e,t){const n=this._visitTextWithInterpolation(e.value,e.sourceSpan,t);return t.visitNodeFn(e,n)}visitComment(e,t){return null}visitExpansion(e,t){t.icuDepth++;const n={},s=new Un(e.switchValue,e.type,n,e.sourceSpan);if(e.cases.forEach(e=>{n[e.value]=new jn(e.expression.map(e=>e.visit(this,t)),e.expSourceSpan)}),t.icuDepth--,t.isIcu||t.icuDepth>0){const n=t.placeholderRegistry.getUniquePlaceholder("VAR_"+e.type);return s.expressionPlaceholder=n,t.placeholderToContent[n]={text:e.switchValue,sourceSpan:e.switchValueSourceSpan},t.visitNodeFn(e,s)}const r=t.placeholderRegistry.getPlaceholderName("ICU",e.sourceSpan.toString());t.placeholderToMessage[r]=this.toI18nMessage([e],"","","",void 0);const i=new Wn(s,r,e.sourceSpan);return t.visitNodeFn(e,i)}visitExpansionCase(e,t){throw new Error("Unreachable code")}_visitTextWithInterpolation(e,t,n){const s=this._expressionParser.splitInterpolation(e,t.start.toString(),this._interpolationConfig);if(!s)return new Vn(e,t);const r=[],i=new jn(r,t),{start:a,end:o}=this._interpolationConfig;for(let e=0;e<s.strings.length-1;e++){const i=s.expressions[e],l=i.split(Fo)[2]||"INTERPOLATION",c=n.placeholderRegistry.getPlaceholderName(l,i);if(s.strings[e].length){const n=Do(t,s.stringSpans[e]);r.push(new Vn(s.strings[e],n))}const u=Do(t,s.expressionsSpans[e]);r.push(new Hn(i,c,u)),n.placeholderToContent[c]={text:a+i+o,sourceSpan:u}}const l=s.strings.length-1;if(s.strings[l].length){const e=Do(t,s.stringSpans[l]);r.push(new Vn(s.strings[l],e))}return i}}function Do(e,{start:t,end:n}){return new hr(e.fullStart.moveBy(t),e.fullStart.moveBy(n))}const Fo=/\/\/[\s\S]*i18n[\s\S]*\([\s\S]*ph[\s\S]*=[\s\S]*("|')([\s\S]*?)\1[\s\S]*\)/g,Bo=(e,t)=>(e instanceof Hi&&(t instanceof Wn&&e.i18n instanceof $n&&(t.previousMessage=e.i18n),e.i18n=t),t);class $o{constructor(e=Ws,t=!1,n=!1){this.interpolationConfig=e,this.keepI18nAttrs=t,this.enableI18nLegacyMessageIdFormat=n,this.hasI18nMeta=!1,this._createI18nMessage=function(e){const t=new Ro(Mo,e);return(e,n,s,r,i)=>t.toI18nMessage(e,n,s,r,i)}(this.interpolationConfig)}_generateI18nMessage(e,t="",n){const{meaning:s,description:r,customId:i}=this._parseMetadata(t),a=this._createI18nMessage(e,s,r,i,n);return this._setMessageId(a,t),this._setLegacyIds(a,t),a}visitElement(e){if(function(e){return e.attrs.some(e=>ps(e.name))}(e)){this.hasI18nMeta=!0;const t=[],n={};for(const s of e.attrs)if("i18n"===s.name){const t=this._generateI18nMessage(e.children,e.i18n||s.value,Bo);t.nodes.length&&(e.i18n=t)}else s.name.startsWith("i18n-")?n[s.name.slice("i18n-".length)]=s.value:t.push(s);if(Object.keys(n).length)for(const e of t){const t=n[e.name];void 0!==t&&e.value&&(e.i18n=this._generateI18nMessage([e],e.i18n||t))}this.keepI18nAttrs||(e.attrs=t)}return Yi(this,e.children,e.i18n),e}visitExpansion(e,t){let n;const s=e.i18n;if(this.hasI18nMeta=!0,s instanceof Wn){const t=s.name;n=this._generateI18nMessage([e],s),gs(n).name=t}else n=this._generateI18nMessage([e],t||s);return e.i18n=n,e}visitText(e){return e}visitAttribute(e){return e}visitComment(e){return e}visitExpansionCase(e){return e}_parseMetadata(e){return"string"==typeof e?function(e=""){let t,n,s;if(e=e.trim()){const r=e.indexOf("@@"),i=e.indexOf("|");let a;[a,t]=r>-1?[e.slice(0,r),e.slice(r+2)]:[e,""],[n,s]=i>-1?[a.slice(0,i),a.slice(i+1)]:["",a]}return{customId:t,meaning:n,description:s}}(e):e instanceof $n?e:{}}_setMessageId(e,t){e.id||(e.id=t instanceof $n&&t.id||function(e){return e.id||Kn(e)}(e))}_setLegacyIds(e,t){if(this.enableI18nLegacyMessageIdFormat)e.legacyIds=[zn(e),Kn(e)];else if("string"!=typeof t){const n=t instanceof $n?t:t instanceof Wn?t.previousMessage:void 0;e.legacyIds=n?n.legacyIds:[]}}}function Vo(e,t,n,s){const r=[Xt(function(e){return e.nodes.map(e=>e.visit(jo,null)).join("")}(t))];Object.keys(s).length&&r.push(xr(s,!0));const i=n.set(Vt("goog.getMsg").callFn(r)).toConstDecl(),a=function(e){const t=[];return e.description&&t.push({tagName:"desc",text:e.description}),e.meaning&&t.push({tagName:"meaning",text:e.meaning}),0==t.length?null:function(e=[]){return new Mt(e)}(t)}(t);return null!==a&&i.addLeadingComment(a),[i,new Ft(e.set(n))]}const jo=new class{formatPh(e){return`{$${_s(e)}}`}visitText(e){return e.value}visitContainer(e){return e.children.map(e=>e.visit(this)).join("")}visitIcu(e){return Po(e)}visitTagPlaceholder(e){return e.isVoid?this.formatPh(e.startName):`${this.formatPh(e.startName)}${e.children.map(e=>e.visit(this)).join("")}${this.formatPh(e.closeName)}`}visitPlaceholder(e){return this.formatPh(e.name)}visitIcuPlaceholder(e,t){return this.formatPh(e.name)}};function Uo(e,t,n){const{messageParts:s,placeHolders:r}=function(e){const t=[];return e.nodes.forEach(e=>e.visit(qo,t)),function(e){const t=[],n=[];e[0]instanceof ut&&t.push(Ho(e[0].sourceSpan.start));for(let s=0;s<e.length;s++){const r=e[s];r instanceof ct?t.push(r):(n.push(r),e[s-1]instanceof ut&&t.push(Ho(e[s-1].sourceSpan.end)))}return e[e.length-1]instanceof ut&&t.push(Ho(e[e.length-1].sourceSpan.end)),{messageParts:t,placeHolders:n}}(t)}(t),i=function(e){const t=e.nodes[0];return new hr(t.sourceSpan.start,e.nodes[e.nodes.length-1].sourceSpan.end,t.sourceSpan.fullStart,t.sourceSpan.details)}(t),a=r.map(e=>n[e.text]),o=function(e,t,n,s,r){return new pt(e,t,n,s,r)}(t,s,r,a,i),l=e.set(o);return[new Ft(l)]}const qo=new class{visitText(e,t){t[t.length-1]instanceof ct?t[t.length-1].text+=e.value:t.push(new ct(e.value,e.sourceSpan))}visitContainer(e,t){e.children.forEach(e=>e.visit(this,t))}visitIcu(e,t){t.push(new ct(Po(e),e.sourceSpan))}visitTagPlaceholder(e,t){var n,s;t.push(this.createPlaceholderPiece(e.startName,null!==(n=e.startSourceSpan)&&void 0!==n?n:e.sourceSpan)),e.isVoid||(e.children.forEach(e=>e.visit(this,t)),t.push(this.createPlaceholderPiece(e.closeName,null!==(s=e.endSourceSpan)&&void 0!==s?s:e.sourceSpan)))}visitPlaceholder(e,t){t.push(this.createPlaceholderPiece(e.name,e.sourceSpan))}visitIcuPlaceholder(e,t){t.push(this.createPlaceholderPiece(e.name,e.sourceSpan))}createPlaceholderPiece(e,t){return new ut(_s(e,!1),t)}};function Ho(e){return new ct("",new hr(e,e))}const Wo=new Set(["$event"]),zo=new Map([["window",_n.resolveWindow],["document",_n.resolveDocument],["body",_n.resolveBody]]),Ko=[" ","\n","\r","\t"];function Xo(e,t){return Kt(Vt("rf").bitwiseAnd(Xt(e),null,!1),t)}function Go(e,t=null,n=null){const{type:s,name:r,target:i,phase:a,handler:o}=e;if(i&&!zo.has(i))throw new Error(`Unexpected global target '${i}' defined for '${r}' event.\n Supported list of global targets: ${Array.from(zo.keys())}.`);const l=new Set,c=null===n||0===n.bindingLevel?Vt("ctx"):n.getOrCreateSharedContextVar(0),u=function(e,t,n,s,r,i,a,o){e||(e=new gi(Wo));const l=function(e,t){const n=new di(e);return t.visit(n)}({createLiteralArrayConverter:e=>e=>Ht(e),createLiteralMapConverter:e=>t=>Wt(e.map((e,n)=>({key:e.key,value:t[n],quoted:e.quoted}))),createPipeConverter:e=>{throw new Error("Illegal State: Actions are not allowed to contain pipes. Pipe: "+e)}},n),c=new mi(e,t,"b",()=>en("Unexpected interpolation"),i,a),u=[];!function e(t,n){Array.isArray(t)?t.forEach(t=>e(t,n)):n.push(t)}(l.visit(c,fr.Statement),u),function(e,t,n){for(let t=e-1;t>=0;t--)n.unshift(ui("b",t))}(c.temporaryCount,0,u),c.usesImplicitReceiver&&e.notifyImplicitReceiverUse();const p=u.length-1;let h=null;if(p>=0){const e=(d=u[p])instanceof Ft?d.expr:d instanceof Bt?d.value:null;e&&(h=Vt("pd_b"),u[p]=h.set(e.cast(Ve).notIdentical(Xt(!1))).toDeclStmt(null,[Ot.Final]))}var d;return new ii(u,h)}(n,c,o,0,0,e.handlerSpan,l),p=[];n&&(p.push(...n.restoreViewStatement()),p.push(...n.variableDeclarations())),p.push(...u.render3Stmts);const h=1===s?function(e,t){return`@${e}.${t}`}(r,a):r,d=t&&yn(t),m=[];l.has("$event")&&m.push(new Et("$event",Ve));const g=zt(m,p,je,null,d),f=[Xt(h),g];return i&&f.push(Xt(!1),jt(zo.get(i))),f}class Qo{constructor(e,t,n=0,s,r,i,a,o,l,c,u,p,h,d,m={prepareStatements:[],constExpressions:[]}){this.constantPool=e,this.level=n,this.contextName=s,this.i18nContext=r,this.templateIndex=i,this.templateName=a,this.directiveMatcher=o,this.directives=l,this.pipeTypeByName=c,this.pipes=u,this._namespace=p,this.i18nUseExternalIds=d,this._constants=m,this._dataIndex=0,this._bindingContext=0,this._prefixCode=[],this._creationCodeFns=[],this._updateCodeFns=[],this._currentIndex=0,this._tempVariables=[],this._nestedTemplateFns=[],this._unsupported=Ts,this.i18n=null,this._pureFunctionSlots=0,this._bindingSlots=0,this._ngContentReservedSlots=[],this._ngContentSelectorsOffset=0,this._implicitReceiverExpr=null,this.visitReference=Ns,this.visitVariable=Ns,this.visitTextAttribute=Ns,this.visitBoundAttribute=Ns,this.visitBoundEvent=Ns,this._bindingScope=t.nestedScope(n),this.fileBasedI18nSuffix=h.replace(/[^A-Za-z0-9]/g,"_")+"_",this._valueConverter=new Yo(e,()=>this.allocateDataSlot(),e=>this.allocatePureFunctionSlots(e),(e,t,n,s)=>{const r=c.get(e);r&&this.pipes.add(r),this._bindingScope.set(this.level,t,s),this.creationInstruction(null,_n.pipe,[Xt(n),Xt(e)])})}buildTemplateFunction(e,t,n=0,s){this._ngContentSelectorsOffset=n,this._namespace!==_n.namespaceHTML&&this.creationInstruction(null,this._namespace),t.forEach(e=>this.registerContextVariables(e));const r=this.i18nContext||hs(s)&&!ds(s)&&!(1===(i=e).length&&i[0]instanceof On&&e[0].i18n===s);var i;const a=pl(e);if(r&&this.i18nStart(null,s,a),Bn(this,e),this._pureFunctionSlots+=this._bindingSlots,this._valueConverter.updatePipeSlotOffsets(this._bindingSlots),this._nestedTemplateFns.forEach(e=>e()),0===this.level&&this._ngContentReservedSlots.length){const e=[];if(this._ngContentReservedSlots.length>1||"*"!==this._ngContentReservedSlots[0]){const t=this._ngContentReservedSlots.map(e=>"*"!==e?De(e):e);e.push(this.constantPool.getConstLiteral(As(t),!0))}this.creationInstruction(null,_n.projectionDef,e,!0)}r&&this.i18nEnd(null,a);const o=this._creationCodeFns.map(e=>e()),l=this._updateCodeFns.map(e=>e()),c=this._bindingScope.viewSnapshotStatements(),u=this._bindingScope.variableDeclarations().concat(this._tempVariables),p=o.length>0?[Xo(1,c.concat(o))]:[],h=l.length>0?[Xo(2,u.concat(l))]:[];return zt([new Et("rf",qe),new Et("ctx",null)],[...this._prefixCode,...p,...h],je,null,this.templateName)}getLocal(e){return this._bindingScope.get(e)}notifyImplicitReceiverUse(){this._bindingScope.notifyImplicitReceiverUse()}i18nTranslate(e,t={},n,s){const r=n||this.i18nGenerateMainBlockVar(),i=function(e,t,n,s={},r){const i=[ws(t),Kt(hl(),Vo(t,e,n,Es(s,!0)),Uo(t,e,Es(s,!1)))];return r&&i.push(new Ft(t.set(r(t)))),i}(e,r,this.i18nGenerateClosureVar(e.id),t,s);return this._constants.prepareStatements.push(...i),r}registerContextVariables(e){const t=this._bindingScope.freshReferenceName(),n=this.level,s=Vt(e.name+t);this._bindingScope.set(n,e.name,s,1,(t,r)=>{let i;return i=t.bindingLevel===n?Vt("ctx"):t.getSharedContextName(n)||tl(r),[s.set(i.prop(e.value||"$implicit")).toConstDecl()]})}i18nAppendBindings(e){e.length>0&&e.forEach(e=>this.i18n.appendBinding(e))}i18nBindProps(e){const t={};return Object.keys(e).forEach(n=>{const s=e[n];if(s instanceof Tn)t[n]=Xt(s.value);else{const e=s.value.visit(this._valueConverter);if(this.allocateBindingSlots(e),e instanceof jr){const{strings:s,expressions:r}=e,{id:i,bindings:a}=this.i18n,o=function(e,t=0,n=0){if(!e.length)return"";let s="";const r=e.length-1;for(let i=0;i<r;i++)s+=`${e[i]}${fs(t+i,n)}`;return s+=e[r],s}(s,a.size,i);this.i18nAppendBindings(r),t[n]=Xt(o)}}}),t}i18nGenerateMainBlockVar(){return Vt(this.constantPool.uniqueName("i18n_"))}i18nGenerateClosureVar(e){let t;const n=this.fileBasedI18nSuffix.toUpperCase();if(this.i18nUseExternalIds){const s=Cs("EXTERNAL_"),r=this.constantPool.uniqueName(n);t=`${s}${yn(e)}$$${r}`}else{const e=Cs(n);t=this.constantPool.uniqueName(e)}return Vt(t)}i18nUpdateRef(e){const{icus:t,meta:n,isRoot:s,isResolved:r,isEmitted:i}=e;if(s&&r&&!i&&!ds(n)){e.isEmitted=!0;const s=e.getSerializedPlaceholders();let r,i={},a=s.size?ys(s):{};t.size&&t.forEach((e,t)=>{if(1===e.length)a[t]=e[0];else{const n=fs("I18N_EXP_"+t);a[t]=Xt(n),i[t]=Ht(e)}}),(Array.from(s.values()).some(e=>e.length>1)||Object.keys(i).length)&&(r=e=>{const t=[e];return Object.keys(i).length&&t.push(xr(i,!0)),el(null,_n.i18nPostprocess,t)}),this.i18nTranslate(n,a,e.ref,r)}}i18nStart(e=null,t,n){const s=this.allocateDataSlot();this.i18n=this.i18nContext?this.i18nContext.forkChildContext(s,this.templateIndex,t):new wo(s,this.i18nGenerateMainBlockVar(),0,this.templateIndex,t);const{id:r,ref:i}=this.i18n,a=[Xt(s),this.addToConsts(i)];r>0&&a.push(Xt(r)),this.creationInstruction(e,n?_n.i18n:_n.i18nStart,a)}i18nEnd(e=null,t){if(!this.i18n)throw new Error("i18nEnd is executed with no i18n context present");this.i18nContext?(this.i18nContext.reconcileChildContext(this.i18n),this.i18nUpdateRef(this.i18nContext)):this.i18nUpdateRef(this.i18n);const{index:n,bindings:s}=this.i18n;if(s.size){const t=[];s.forEach(n=>{t.push({sourceSpan:e,value:()=>this.convertPropertyBinding(n)})}),this.updateInstructionChainWithAdvance(this.getConstCount()-1,_n.i18nExp,t),this.updateInstruction(e,_n.i18nApply,[Xt(n)])}t||this.creationInstruction(e,_n.i18nEnd),this.i18n=null}i18nAttributesInstruction(e,t,n){let s=!1;const r=[],i=[];if(t.forEach(e=>{const t=e.i18n,a=e.value.visit(this._valueConverter);if(this.allocateBindingSlots(a),a instanceof jr){const o=ys(Ss(t));r.push(Xt(e.name),this.i18nTranslate(t,o)),a.expressions.forEach(e=>{s=!0,i.push({sourceSpan:n,value:()=>this.convertPropertyBinding(e)})})}}),i.length>0&&this.updateInstructionChainWithAdvance(e,_n.i18nExp,i),r.length>0){const e=Xt(this.allocateDataSlot()),t=this.addToConsts(Ht(r));this.creationInstruction(n,_n.i18nAttributes,[e,t]),s&&this.updateInstruction(n,_n.i18nApply,[e])}}getNamespaceInstruction(e){switch(e){case"math":return _n.namespaceMathML;case"svg":return _n.namespaceSVG;default:return _n.namespaceHTML}}addNamespaceInstruction(e,t){this._namespace=e,this.creationInstruction(t.startSourceSpan,e)}interpolatedUpdateInstruction(e,t,n,s,r,i){this.updateInstructionWithAdvance(t,s.sourceSpan,e,()=>[Xt(n),...this.getUpdateInstructionArguments(r),...i])}visitContent(e){const t=this.allocateDataSlot(),n=this._ngContentSelectorsOffset+this._ngContentReservedSlots.length,s=[Xt(t)];this._ngContentReservedSlots.push(e.selector);const r=e.attributes.filter(e=>"select"!==e.name.toLowerCase()),i=this.getAttributeExpressions(e.name,r,[],[]);i.length>0?s.push(Xt(n),Ht(i)):0!==n&&s.push(Xt(n)),this.creationInstruction(e.sourceSpan,_n.projection,s),this.i18n&&this.i18n.appendProjection(e.i18n,t)}visitElement(e){var t,n;const s=this.allocateDataSlot(),r=new Va(null);let i=!1;const a=hs(e.i18n)&&!ds(e.i18n),o=[],[l,c]=me(e.name),u=ge(e.name);for(const t of e.attributes){const{name:e,value:n}=t;"ngNonBindable"===e?i=!0:"style"===e?r.registerStyleAttr(n):"class"===e?r.registerClassAttr(n):o.push(t)}this.matchDirectives(e.name,e);const p=[Xt(s)];u||p.push(Xt(c));const h=[],d=[];e.inputs.forEach(e=>{r.registerBoundInput(e)||(0===e.type&&e.i18n?d.push(e):h.push(e))});const m=this.getAttributeExpressions(e.name,o,h,e.outputs,r,[],d);p.push(this.addAttrsToConsts(m));const g=this.prepareRefsArray(e.references);p.push(this.addToConsts(g));const f=this._namespace,v=this.getNamespaceInstruction(l);v!==f&&this.addNamespaceInstruction(v,e),this.i18n&&this.i18n.appendElement(e.i18n,s);const y=!a&&this.i18n?!pl(e.children):e.children.length>0,x=!r.hasBindingsWithPipes&&0===e.outputs.length&&0===d.length&&!y,S=!x&&pl(e.children);if(x)this.creationInstruction(e.sourceSpan,u?_n.elementContainer:_n.element,ks(p));else{if(this.creationInstruction(e.startSourceSpan,u?_n.elementContainerStart:_n.elementStart,ks(p)),i&&this.creationInstruction(e.startSourceSpan,_n.disableBindings),d.length>0&&this.i18nAttributesInstruction(s,d,null!==(t=e.startSourceSpan)&&void 0!==t?t:e.sourceSpan),e.outputs.length>0){const t=e.outputs.map(t=>({sourceSpan:t.sourceSpan,params:this.prepareListenerParameter(e.name,t,s)}));this.creationInstructionChain(_n.listener,t)}a&&this.i18nStart(e.startSourceSpan,e.i18n,S)}const E=r.buildUpdateLevelInstructions(this._valueConverter),_=E.length-1;for(let e=0;e<=_;e++)this._bindingSlots+=this.processStylingUpdateInstruction(s,E[e]);const C=Xt(void 0),w=[],b=[];if(h.forEach(e=>{const t=e.type;if(4===t){const t=e.value.visit(this._valueConverter),n=!(t instanceof Br&&!t.value);this.allocateBindingSlots(t),w.push({name:bn(e.name),sourceSpan:e.sourceSpan,value:()=>n?this.convertPropertyBinding(t):C})}else{if(e.i18n)return;const n=e.value.visit(this._valueConverter);if(void 0!==n){const r=[],[i,a]=me(e.name),o=ll(e.securityContext,1===t);if(o&&r.push(o),i){const e=Xt(i);o?r.push(e):r.push(Xt(null),e)}if(this.allocateBindingSlots(n),0===t)n instanceof jr?this.interpolatedUpdateInstruction(il(n),s,a,e,n,r):w.push({name:a,sourceSpan:e.sourceSpan,value:()=>this.convertPropertyBinding(n),params:r});else if(1===t)if(n instanceof jr&&Rs(n)>1)this.interpolatedUpdateInstruction(function(e){switch(Rs(e)){case 3:return _n.attributeInterpolate1;case 5:return _n.attributeInterpolate2;case 7:return _n.attributeInterpolate3;case 9:return _n.attributeInterpolate4;case 11:return _n.attributeInterpolate5;case 13:return _n.attributeInterpolate6;case 15:return _n.attributeInterpolate7;case 17:return _n.attributeInterpolate8;default:return _n.attributeInterpolateV}}(n),s,a,e,n,r);else{const t=n instanceof jr?n.expressions[0]:n;b.push({name:a,sourceSpan:e.sourceSpan,value:()=>this.convertPropertyBinding(t),params:r})}else this.updateInstructionWithAdvance(s,e.sourceSpan,_n.classProp,()=>[Xt(s),Xt(a),this.convertPropertyBinding(n),...r])}}}),w.length>0&&this.updateInstructionChainWithAdvance(s,_n.property,w),b.length>0&&this.updateInstructionChainWithAdvance(s,_n.attribute,b),Bn(this,e.children),!a&&this.i18n&&this.i18n.appendElement(e.i18n,s,!0),!x){const t=null!==(n=e.endSourceSpan)&&void 0!==n?n:e.sourceSpan;a&&this.i18nEnd(t,S),i&&this.creationInstruction(t,_n.enableBindings),this.creationInstruction(t,u?_n.elementContainerEnd:_n.elementEnd)}}visitTemplate(e){var t;const n=this.allocateDataSlot();this.i18n&&this.i18n.appendTemplate(e.i18n,n);const s=yn(e.tagName||""),r=`${this.contextName}${s?"_"+s:""}_${n}`,i=r+"_Template",a=[Xt(n),Vt(i),Xt(e.tagName?me(e.tagName)[1]:e.tagName)];this.matchDirectives("ng-template",e);const o=this.getAttributeExpressions("ng-template",e.attributes,e.inputs,e.outputs,void 0,e.templateAttrs);if(a.push(this.addAttrsToConsts(o)),e.references&&e.references.length){const t=this.prepareRefsArray(e.references);a.push(this.addToConsts(t)),a.push(jt(_n.templateRefExtractor))}const l=new Qo(this.constantPool,this._bindingScope,this.level+1,r,this.i18n,n,i,this.directiveMatcher,this.directives,this.pipeTypeByName,this.pipes,this._namespace,this.fileBasedI18nSuffix,this.i18nUseExternalIds,this._constants);if(this._nestedTemplateFns.push(()=>{const t=l.buildTemplateFunction(e.children,e.variables,this._ngContentReservedSlots.length+this._ngContentSelectorsOffset,e.i18n);this.constantPool.statements.push(t.toDeclStmt(i)),l._ngContentReservedSlots.length&&this._ngContentReservedSlots.push(...l._ngContentReservedSlots)}),this.creationInstruction(e.sourceSpan,_n.templateCreate,()=>(a.splice(2,0,Xt(l.getConstCount()),Xt(l.getVarCount())),ks(a))),this.templatePropertyBindings(n,e.templateAttrs),"ng-template"===e.tagName){const[s,r]=function(e,t){const n=[],s=[];for(const r of e)(t(r)?n:s).push(r);return[n,s]}(e.inputs,ms);if(s.length>0&&this.i18nAttributesInstruction(n,s,null!==(t=e.startSourceSpan)&&void 0!==t?t:e.sourceSpan),r.length>0&&this.templatePropertyBindings(n,r),e.outputs.length>0){const t=e.outputs.map(e=>({sourceSpan:e.sourceSpan,params:this.prepareListenerParameter("ng_template",e,n)}));this.creationInstructionChain(_n.listener,t)}}}visitBoundText(e){if(this.i18n){const t=e.value.visit(this._valueConverter);return this.allocateBindingSlots(t),void(t instanceof jr&&(this.i18n.appendBoundText(e.i18n),this.i18nAppendBindings(t.expressions)))}const t=this.allocateDataSlot();this.creationInstruction(e.sourceSpan,_n.text,[Xt(t)]);const n=e.value.visit(this._valueConverter);this.allocateBindingSlots(n),n instanceof jr?this.updateInstructionWithAdvance(t,e.sourceSpan,function(e){switch(Rs(e)){case 1:return _n.textInterpolate;case 3:return _n.textInterpolate1;case 5:return _n.textInterpolate2;case 7:return _n.textInterpolate3;case 9:return _n.textInterpolate4;case 11:return _n.textInterpolate5;case 13:return _n.textInterpolate6;case 15:return _n.textInterpolate7;case 17:return _n.textInterpolate8;default:return _n.textInterpolateV}}(n),()=>this.getUpdateInstructionArguments(n)):en("Text nodes should be interpolated and never bound directly.")}visitText(e){this.i18n||this.creationInstruction(e.sourceSpan,_n.text,[Xt(this.allocateDataSlot()),Xt(e.value)])}visitIcu(e){let t=!1;this.i18n||(t=!0,this.i18nStart(null,e.i18n,!0));const n=this.i18n,s=this.i18nBindProps(e.vars),r=this.i18nBindProps(e.placeholders),i=e.i18n,a=e=>{const t=Es(Object.assign(Object.assign({},s),r),!1);return el(null,_n.i18nPostprocess,[e,xr(t,!0)])};if(ds(n.meta))this.i18nTranslate(i,{},n.ref,a);else{const e=this.i18nTranslate(i,{},void 0,a);n.appendIcu(gs(i).name,e)}return t&&this.i18nEnd(null,!0),null}allocateDataSlot(){return this._dataIndex++}getConstCount(){return this._dataIndex}getVarCount(){return this._pureFunctionSlots}getConsts(){return this._constants}getNgContentSelectors(){return this._ngContentReservedSlots.length?this.constantPool.getConstLiteral(As(this._ngContentReservedSlots),!0):null}bindingContext(){return""+this._bindingContext++}templatePropertyBindings(e,t){const n=[];t.forEach(t=>{if(t instanceof Pn){const s=t.value.visit(this._valueConverter);if(void 0!==s)if(this.allocateBindingSlots(s),s instanceof jr){const n=[];this.interpolatedUpdateInstruction(il(s),e,t.name,t,s,n)}else n.push({name:t.name,sourceSpan:t.sourceSpan,value:()=>this.convertPropertyBinding(s)})}}),n.length>0&&this.updateInstructionChainWithAdvance(e,_n.property,n)}instructionFn(e,t,n,s,r=!1){e[r?"unshift":"push"](()=>{const e=Array.isArray(s)?s:s();return el(t,n,e).toStmt()})}processStylingUpdateInstruction(e,t){let n=0;if(t){const s=[];t.calls.forEach(e=>{n+=e.allocateBindingSlots,s.push({sourceSpan:e.sourceSpan,value:()=>e.params(t=>e.supportsInterpolation&&t instanceof jr?this.getUpdateInstructionArguments(t):this.convertPropertyBinding(t))})}),this.updateInstructionChainWithAdvance(e,t.reference,s)}return n}creationInstruction(e,t,n,s){this.instructionFn(this._creationCodeFns,e,t,n||[],s)}creationInstructionChain(e,t){const n=t.length?t[0].sourceSpan:null;this._creationCodeFns.push(()=>Ls(e,t.map(e=>e.params()),n).toStmt())}updateInstructionWithAdvance(e,t,n,s){this.addAdvanceInstructionIfNecessary(e,t),this.updateInstruction(t,n,s)}updateInstruction(e,t,n){this.instructionFn(this._updateCodeFns,e,t,n||[])}updateInstructionChain(e,t){const n=t.length?t[0].sourceSpan:null;this._updateCodeFns.push(()=>{const s=t.map(e=>{const t=e.value(),n=Array.isArray(t)?t:[t];return e.params&&n.push(...e.params),e.name&&n.unshift(Xt(e.name)),n});return Ls(e,s,n).toStmt()})}updateInstructionChainWithAdvance(e,t,n){this.addAdvanceInstructionIfNecessary(e,n.length?n[0].sourceSpan:null),this.updateInstructionChain(t,n)}addAdvanceInstructionIfNecessary(e,t){if(e!==this._currentIndex){const n=e-this._currentIndex;if(n<1)throw new Error("advance instruction can only go forwards");this.instructionFn(this._updateCodeFns,t,_n.advance,[Xt(n)]),this._currentIndex=e}}allocatePureFunctionSlots(e){const t=this._pureFunctionSlots;return this._pureFunctionSlots+=e,t}allocateBindingSlots(e){this._bindingSlots+=e instanceof jr?e.expressions.length:1}getImplicitReceiverExpr(){return this._implicitReceiverExpr?this._implicitReceiverExpr:this._implicitReceiverExpr=0===this.level?Vt("ctx"):this._bindingScope.getOrCreateSharedContextVar(0)}convertPropertyBinding(e){const t=oi(this,this.getImplicitReceiverExpr(),e,this.bindingContext(),gr.Expression,()=>en("Unexpected interpolation")),n=t.currValExpr;return this._tempVariables.push(...t.stmts),n}getUpdateInstructionArguments(e){const{args:t,stmts:n}=function(e,t,n,s){const r=new mi(e,t,s,void 0),i=n.visit(r,fr.Expression);r.usesImplicitReceiver&&e.notifyImplicitReceiverUse();const a=li(r,s);let o=i.args.slice(1);if(n instanceof jr){const e=n.strings;3===o.length&&""===e[0]&&""===e[1]?o=[o[1]]:o.length>=19&&(o=[Ht(o)])}return{stmts:a,args:o}}(this,this.getImplicitReceiverExpr(),e,this.bindingContext());return this._tempVariables.push(...n),t}matchDirectives(e,t){if(this.directiveMatcher){const n=function(e,t){const n=new be,s=me(e)[1];return n.setElement(s),Object.getOwnPropertyNames(t).forEach(e=>{const s=me(e)[1],r=t[e];n.addAttribute(s,r),"class"===e.toLowerCase()&&r.trim().split(/\s+/).forEach(e=>n.addClassName(e))}),n}(e,function(e){const t={};return e instanceof Mn&&"ng-template"!==e.tagName?e.templateAttrs.forEach(e=>t[e.name]=""):(e.attributes.forEach(e=>{ps(e.name)||(t[e.name]=e.value)}),e.inputs.forEach(e=>{t[e.name]=""}),e.outputs.forEach(e=>{t[e.name]=""})),t}(t));this.directiveMatcher.match(n,(e,t)=>{this.directives.add(t)})}}getAttributeExpressions(e,t,n,s,r,i=[],a=[]){const o=new Set,l=[];let c;for(const n of t)"ngProjectAs"===n.name&&(c=n),n.i18n?l.push(Xt(n.name),this.i18nTranslate(n.i18n)):l.push(...sl(n.name),cl(e,n));function u(e,t){"string"==typeof e?o.has(e)||(l.push(...sl(e)),void 0!==t&&l.push(t),o.add(e)):l.push(Xt(e))}if(c&&l.push(...function(e){const t=De(e.value)[0];return[Xt(5),As(t)]}(c)),r&&r.populateInitialStylingAttrs(l),n.length||s.length){const e=l.length;for(let e=0;e<n.length;e++){const t=n[e];4!==t.type&&1!==t.type&&u(t.name)}for(let e=0;e<s.length;e++){const t=s[e];1!==t.type&&u(t.name)}l.length!==e&&l.splice(e,0,Xt(3))}return i.length&&(l.push(Xt(4)),i.forEach(e=>u(e.name))),a.length&&(l.push(Xt(6)),a.forEach(e=>u(e.name))),l}addToConsts(e){if(Gt(e))return kt;const t=this._constants.constExpressions;for(let n=0;n<t.length;n++)if(t[n].isEquivalent(e))return Xt(n);return Xt(t.push(e)-1)}addAttrsToConsts(e){return e.length>0?this.addToConsts(Ht(e)):kt}prepareRefsArray(e){return e&&0!==e.length?As(function e(t){return t.reduce((t,n)=>{const s=Array.isArray(n)?e(n):n;return t.concat(s)},[])}(e.map(e=>{const t=this.allocateDataSlot(),n=this._bindingScope.freshReferenceName(),s=this.level,r=Vt(n);return this._bindingScope.set(s,e.name,r,0,(e,n)=>{const s=n>0?[tl(n).toStmt()]:[],i=r.set(jt(_n.reference).callFn([Xt(t)]));return s.concat(i.toConstDecl())},!0),[e.name,e.value]}))):kt}prepareListenerParameter(e,t,n){return()=>{const s=t.name,r=1===t.type?In(s,t.phase):yn(s),i=`${this.templateName}_${e}_${r}_${n}_listener`,a=this._bindingScope.nestedScope(this._bindingScope.bindingLevel,Wo);return Go(t,i,a)}}}class Yo extends class{visitImplicitReceiver(e,t){return e}visitThisReceiver(e,t){return e}visitInterpolation(e,t){const n=this.visitAll(e.expressions);return n!==e.expressions?new jr(e.span,e.sourceSpan,e.strings,n):e}visitLiteralPrimitive(e,t){return e}visitPropertyRead(e,t){const n=e.receiver.visit(this);return n!==e.receiver?new Or(e.span,e.sourceSpan,e.nameSpan,n,e.name):e}visitPropertyWrite(e,t){const n=e.receiver.visit(this),s=e.value.visit(this);return n!==e.receiver||s!==e.value?new Mr(e.span,e.sourceSpan,e.nameSpan,n,e.name,s):e}visitSafePropertyRead(e,t){const n=e.receiver.visit(this);return n!==e.receiver?new Lr(e.span,e.sourceSpan,e.nameSpan,n,e.name):e}visitMethodCall(e,t){const n=e.receiver.visit(this),s=this.visitAll(e.args);return n!==e.receiver||s!==e.args?new zr(e.span,e.sourceSpan,e.nameSpan,n,e.name,s):e}visitSafeMethodCall(e,t){const n=e.receiver.visit(this),s=this.visitAll(e.args);return n!==e.receiver||s!==e.args?new Kr(e.span,e.sourceSpan,e.nameSpan,n,e.name,s):e}visitFunctionCall(e,t){const n=e.target&&e.target.visit(this),s=this.visitAll(e.args);return n!==e.target||s!==e.args?new Xr(e.span,e.sourceSpan,n,s):e}visitLiteralArray(e,t){const n=this.visitAll(e.expressions);return n!==e.expressions?new $r(e.span,e.sourceSpan,n):e}visitLiteralMap(e,t){const n=this.visitAll(e.values);return n!==e.values?new Vr(e.span,e.sourceSpan,e.keys,n):e}visitUnary(e,t){const n=e.expr.visit(this);if(n!==e.expr)switch(e.operator){case"+":return qr.createPlus(e.span,e.sourceSpan,n);case"-":return qr.createMinus(e.span,e.sourceSpan,n);default:throw new Error("Unknown unary operator "+e.operator)}return e}visitBinary(e,t){const n=e.left.visit(this),s=e.right.visit(this);return n!==e.left||s!==e.right?new Ur(e.span,e.sourceSpan,e.operation,n,s):e}visitPrefixNot(e,t){const n=e.expression.visit(this);return n!==e.expression?new Hr(e.span,e.sourceSpan,n):e}visitNonNullAssert(e,t){const n=e.expression.visit(this);return n!==e.expression?new Wr(e.span,e.sourceSpan,n):e}visitConditional(e,t){const n=e.condition.visit(this),s=e.trueExp.visit(this),r=e.falseExp.visit(this);return n!==e.condition||s!==e.trueExp||r!==e.falseExp?new kr(e.span,e.sourceSpan,n,s,r):e}visitPipe(e,t){const n=e.exp.visit(this),s=this.visitAll(e.args);return n!==e.exp||s!==e.args?new Fr(e.span,e.sourceSpan,n,e.name,s,e.nameSpan):e}visitKeyedRead(e,t){const n=e.obj.visit(this),s=e.key.visit(this);return n!==e.obj||s!==e.key?new Rr(e.span,e.sourceSpan,n,s):e}visitKeyedWrite(e,t){const n=e.obj.visit(this),s=e.key.visit(this),r=e.value.visit(this);return n!==e.obj||s!==e.key||r!==e.value?new Dr(e.span,e.sourceSpan,n,s,r):e}visitAll(e){const t=[];let n=!1;for(let s=0;s<e.length;++s){const r=e[s],i=r.visit(this);t[s]=i,n=n||i!==r}return n?t:e}visitChain(e,t){const n=this.visitAll(e.expressions);return n!==e.expressions?new Pr(e.span,e.sourceSpan,n):e}visitQuote(e,t){return e}}{constructor(e,t,n,s){super(),this.constantPool=e,this.allocateSlot=t,this.allocatePureFunctionSlots=n,this.definePipe=s,this._pipeBindExprs=[]}visitPipe(e,t){const n=this.allocateSlot(),s="PIPE:"+n,r=this.allocatePureFunctionSlots(2+e.args.length),i=new Or(e.span,e.sourceSpan,e.nameSpan,new Nr(e.span,e.sourceSpan),s),{identifier:a,isVarLength:o}=function(e){const t=Zo[e.length];return{identifier:t||_n.pipeBindV,isVarLength:!t}}(e.args);this.definePipe(e.name,s,n,jt(a));const l=[e.exp,...e.args],c=this.visitAll(o?[new $r(e.span,e.sourceSpan,l)]:l),u=new Xr(e.span,e.sourceSpan,i,[new Br(e.span,e.sourceSpan,n),new Br(e.span,e.sourceSpan,r),...c]);return this._pipeBindExprs.push(u),u}updatePipeSlotOffsets(e){this._pipeBindExprs.forEach(t=>{t.args[1].value+=e})}visitLiteralArray(e,t){return new fi(e.span,e.sourceSpan,this.visitAll(e.expressions),e=>{const t=Ht(e);return nl(this.constantPool,t,this.allocatePureFunctionSlots)})}visitLiteralMap(e,t){return new fi(e.span,e.sourceSpan,this.visitAll(e.values),t=>{const n=Wt(t.map((t,n)=>({key:e.keys[n].key,value:t,quoted:e.keys[n].quoted})));return nl(this.constantPool,n,this.allocatePureFunctionSlots)})}}const Zo=[_n.pipeBind1,_n.pipeBind2,_n.pipeBind3,_n.pipeBind4],Jo=[_n.pureFunction0,_n.pureFunction1,_n.pureFunction2,_n.pureFunction3,_n.pureFunction4,_n.pureFunction5,_n.pureFunction6,_n.pureFunction7,_n.pureFunction8];function el(e,t,n){return jt(t,null,e).callFn(n,e)}function tl(e){return jt(_n.nextContext).callFn(e>1?[Xt(e)]:[])}function nl(e,t,n){const{literalFactory:s,literalFactoryArguments:r}=e.getLiteralFactory(t),i=n(1+r.length),{identifier:a,isVarLength:o}=function(e){const t=Jo[e.length];return{identifier:t||_n.pureFunctionV,isVarLength:!t}}(r),l=[Xt(i),s];return o?l.push(Ht(r)):l.push(...r),jt(a).callFn(l)}function sl(e){const[t,n]=me(e),s=Xt(n);return t?[Xt(0),Xt(t),s]:[s]}class rl{constructor(e=0,t=null,n){if(this.bindingLevel=e,this.parent=t,this.globals=n,this.map=new Map,this.referenceNameIndex=0,this.restoreViewVariable=null,void 0!==n)for(const e of n)this.set(0,e,Vt(e))}static createRootScope(){return new rl}get(e){let t=this;for(;t;){let n=t.map.get(e);if(null!=n)return t!==this&&(n={retrievalLevel:n.retrievalLevel,lhs:n.lhs,declareLocalCallback:n.declareLocalCallback,declare:!1,priority:n.priority,localRef:n.localRef},this.map.set(e,n),this.maybeGenerateSharedContextVar(n),this.maybeRestoreView(n.retrievalLevel,n.localRef)),n.declareLocalCallback&&!n.declare&&(n.declare=!0),n.lhs;t=t.parent}return 0===this.bindingLevel?null:this.getComponentProperty(e)}set(e,t,n,s=0,r,i){if(this.map.has(t)){if(i)return this;en(`The name ${t} is already defined in scope to be ${this.map.get(t)}`)}return this.map.set(t,{retrievalLevel:e,lhs:n,declare:!1,declareLocalCallback:r,priority:s,localRef:i||!1}),this}getLocal(e){return this.get(e)}notifyImplicitReceiverUse(){0!==this.bindingLevel&&(this.map.get("$$shared_ctx$$0").declare=!0)}nestedScope(e,t){const n=new rl(e,this,t);return e>0&&n.generateSharedContextVar(0),n}getOrCreateSharedContextVar(e){const t="$$shared_ctx$$"+e;return this.map.has(t)||this.generateSharedContextVar(e),this.map.get(t).lhs}getSharedContextName(e){const t=this.map.get("$$shared_ctx$$"+e);return t&&t.declare?t.lhs:null}maybeGenerateSharedContextVar(e){if(1===e.priority&&e.retrievalLevel<this.bindingLevel){const t=this.map.get("$$shared_ctx$$"+e.retrievalLevel);t?t.declare=!0:this.generateSharedContextVar(e.retrievalLevel)}}generateSharedContextVar(e){const t=Vt("ctx"+this.freshReferenceName());this.map.set("$$shared_ctx$$"+e,{retrievalLevel:e,lhs:t,declareLocalCallback:(e,n)=>[t.set(tl(n)).toConstDecl()],declare:!1,priority:2,localRef:!1})}getComponentProperty(e){const t=this.map.get("$$shared_ctx$$0");return t.declare=!0,this.maybeRestoreView(0,!1),t.lhs.prop(e)}maybeRestoreView(e,t){this.isListenerScope()&&(e<this.bindingLevel||t)&&(this.parent.restoreViewVariable||(this.parent.restoreViewVariable=Vt(this.parent.freshReferenceName())),this.restoreViewVariable=this.parent.restoreViewVariable)}restoreViewStatement(){return this.restoreViewVariable?[el(null,_n.restoreView,[this.restoreViewVariable]).toStmt()]:[]}viewSnapshotStatements(){const e=el(null,_n.getCurrentView,[]);return this.restoreViewVariable?[this.restoreViewVariable.set(e).toConstDecl()]:[]}isListenerScope(){return this.parent&&this.parent.bindingLevel===this.bindingLevel}variableDeclarations(){let e=0;return Array.from(this.map.values()).filter(e=>e.declare).sort((e,t)=>t.retrievalLevel-e.retrievalLevel||t.priority-e.priority).reduce((t,n)=>{const s=this.bindingLevel-n.retrievalLevel,r=n.declareLocalCallback(this,s-e);return e=s,t.concat(r)},[])}freshReferenceName(){let e=this;for(;e.parent;)e=e.parent;return"_r"+e.referenceNameIndex++}}function il(e){switch(Rs(e)){case 1:return _n.propertyInterpolate;case 3:return _n.propertyInterpolate1;case 5:return _n.propertyInterpolate2;case 7:return _n.propertyInterpolate3;case 9:return _n.propertyInterpolate4;case 11:return _n.propertyInterpolate5;case 13:return _n.propertyInterpolate6;case 15:return _n.propertyInterpolate7;case 17:return _n.propertyInterpolate8;default:return _n.propertyInterpolateV}}const al=new vo;function ol(e=Ws){return new Na(new ao(new Wa),e,al,null,[])}function ll(e,t){switch(e){case ke.HTML:return jt(_n.sanitizeHtml);case ke.SCRIPT:return jt(_n.sanitizeScript);case ke.STYLE:return t?jt(_n.sanitizeStyle):null;case ke.URL:return jt(_n.sanitizeUrl);case ke.RESOURCE_URL:return jt(_n.sanitizeResourceUrl);default:return null}}function cl(e,t){const n=As(t.value);switch(al.securityContext(e,t.name,!0)){case ke.HTML:return jt(_n.trustConstantHtml).callFn([n],t.valueSpan);case ke.SCRIPT:return jt(_n.trustConstantScript).callFn([n],t.valueSpan);case ke.RESOURCE_URL:return jt(_n.trustConstantResourceUrl).callFn([n],t.valueSpan);default:return n}}function ul(e){return e instanceof Tn||e instanceof Nn||e instanceof Fn}function pl(e){return e.every(ul)}function hl(){return qt(Vt("ngI18nClosureMode")).notIdentical(Xt("undefined",He)).and(Vt("ngI18nClosureMode"))}const dl=/attr\.([^\]]+)/;function ml(e,t,n){const s=new Ms,r=De(e.selector);return s.set("type",e.internalType),r.length>0&&s.set("selectors",As(r)),e.queries.length>0&&s.set("contentQueries",function(e,t,n){const s=[],r=[],i=Is(r,"_t");for(const n of e){s.push(jt(n.static?_n.staticContentQuery:_n.contentQuery).callFn([Vt("dirIndex"),...fl(n,t)]).toStmt());const e=i(),a=jt(_n.loadQuery).callFn([]),o=jt(_n.queryRefresh).callFn([e.set(a)]),l=Vt("ctx").prop(n.propertyName).set(n.first?e.prop("first"):e);r.push(o.and(l).toStmt())}const a=n?n+"_ContentQueries":null;return zt([new Et("rf",qe),new Et("ctx",null),new Et("dirIndex",null)],[Xo(1,s),Xo(2,r)],je,null,a)}(e.queries,t,e.name)),e.viewQueries.length&&s.set("viewQuery",function(e,t,n){const s=[],r=[],i=Is(r,"_t");e.forEach(e=>{const n=jt(e.static?_n.staticViewQuery:_n.viewQuery).callFn(fl(e,t));s.push(n.toStmt());const a=i(),o=jt(_n.loadQuery).callFn([]),l=jt(_n.queryRefresh).callFn([a.set(o)]),c=Vt("ctx").prop(e.propertyName).set(e.first?a.prop("first"):a);r.push(l.and(c).toStmt())});const a=n?n+"_Query":null;return zt([new Et("rf",qe),new Et("ctx",null)],[Xo(1,s),Xo(2,r)],je,null,a)}(e.viewQueries,t,e.name)),s.set("hostBindings",function(e,t,n,s,r,i,a){const o=Vt("ctx"),l=new Va(o),{styleAttr:c,classAttr:u}=e.specialAttributes;void 0!==c&&l.registerStyleAttr(c),void 0!==u&&l.registerClassAttr(u);const p=[],h=[],d=t,m=El(e),g=n.createDirectiveHostEventAsts(m,d);if(g&&g.length){const e=function(e,t){const n=[],s=[],r=[];return e.forEach(e=>{let r=e.name&&yn(e.name);const i=1===e.type?In(r,e.targetOrPhase):r,a=t&&r?`${t}_${i}_HostBindingHandler`:null,o=Go(kn.fromParsedEvent(e),a);1==e.type?s.push(o):n.push(o)}),s.length>0&&r.push(Ls(_n.syntheticHostListener,s).toStmt()),n.length>0&&r.push(Ls(_n.listener,n).toStmt()),r}(g,i);p.push(...e)}const f=n.createBoundHostProperties(m,d),v=[];let y,x=0;f&&f.forEach(e=>{l.registerInputBasedOnName(e.name,e.expression,d)?x+=2:(v.push(e),x++)});const S=()=>(y||(y=new Yo(s,()=>en("Unexpected node"),e=>{const t=x;return x+=e,t},()=>en("Unexpected pipe"))),y),E=[],_=[],C=[];v.forEach(e=>{const t=e.expression.visit(S()),s=Sl(o,t),{bindingName:i,instruction:a,isAttribute:l}=function(e){let t,n=e.name;const s=n.match(dl);return s?(n=s[1],t=_n.attribute):e.isAnimation?(n=bn(n),t=_n.syntheticHostProperty):t=_n.hostProperty,{bindingName:n,instruction:t,isAttribute:!!s}}(e),c=n.calcPossibleSecurityContexts(r,i,l).filter(e=>e!==ke.NONE);let u=null;c.length&&(u=2===c.length&&c.indexOf(ke.URL)>-1&&c.indexOf(ke.RESOURCE_URL)>-1?jt(_n.sanitizeUrlOrResourceUrl):ll(c[0],l));const p=[Xt(i),s.currValExpr];u&&p.push(u),h.push(...s.stmts),a===_n.hostProperty?E.push(p):a===_n.attribute?_.push(p):a===_n.syntheticHostProperty?C.push(p):h.push(jt(a).callFn(p).toStmt())}),E.length>0&&h.push(Ls(_n.hostProperty,E).toStmt()),_.length>0&&h.push(Ls(_n.attribute,_).toStmt()),C.length>0&&h.push(Ls(_n.syntheticHostProperty,C).toStmt());const w=function(e){const t=[];for(let n of Object.getOwnPropertyNames(e)){const s=e[n];t.push(Xt(n),s)}return t}(e.attributes);if(l.assignHostAttrs(w,a),l.hasBindings&&l.buildUpdateLevelInstructions(S()).forEach(e=>{if(e.calls.length>0){const t=[];e.calls.forEach(e=>{x+=Math.max(e.allocateBindingSlots-2,0),t.push(function(e,t,n){return e.params(e=>n(t,e).currValExpr)}(e,o,Sl))}),h.push(Ls(e.reference,t).toStmt())}}),x&&a.set("hostVars",Xt(x)),p.length>0||h.length>0){const e=i?i+"_HostBindings":null,t=[];return p.length>0&&t.push(Xo(1,p)),h.length>0&&t.push(Xo(2,h)),zt([new Et("rf",qe),new Et("ctx",null)],t,je,null,e)}return null}(e.host,e.typeSourceSpan,n,t,e.selector||"",e.name,s)),s.set("inputs",Ps(e.inputs,!0)),s.set("outputs",Ps(e.outputs)),null!==e.exportAs&&s.set("exportAs",Ht(e.exportAs.map(e=>Xt(e)))),s}function gl(e,t){const n=[],s=t.providers,r=t.viewProviders;if(s||r){const e=[s||new Tt([])];r&&e.push(r),n.push(jt(_n.ProvidersFeature).callFn(e))}t.usesInheritance&&n.push(jt(_n.InheritDefinitionFeature)),t.fullInheritance&&n.push(jt(_n.CopyDefinitionFeature)),t.lifecycle.usesOnChanges&&n.push(jt(_n.NgOnChangesFeature)),n.length&&e.set("features",Ht(n))}function fl(e,t){const n=[Os(e,t),Xt(e.descendants)];return e.read&&n.push(e.read),n}function vl(e){return Ut(Wt(Object.keys(e).map(t=>({key:t,value:Xt(Array.isArray(e[t])?e[t][0]:e[t]),quoted:!0}))))}function yl(e){return e.length>0?Ut(Ht(e.map(e=>Xt(e)))):We}function xl(e){const t=null!==e.selector?e.selector.replace(/\n/g,""):null;return[wn(e.type.type,e.typeArgumentCount),null!==t?(n=t,Ut(Xt(n))):We,null!==e.exportAs?yl(e.exportAs):We,vl(e.inputs),vl(e.outputs),yl(e.queries.map(e=>e.propertyName))];var n}function Sl(e,t){return oi(null,e,t,"b",gr.Expression,()=>en("Unexpected interpolation"))}function El(e){return{hostAttributes:{},hostListeners:e.listeners,hostProperties:e.properties}}const _l=/^(?:\[([^\]]+)\])|(?:\(([^\)]+)\))$/;class Cl{get(e){return""}}const wl=Object.keys({useClass:null})[0],bl=Object.keys({useFactory:null})[0],Il=Object.keys({useValue:null})[0],Tl=Object.keys({useExisting:null})[0],Nl=function(e){const t=new et(e);return{value:t,type:t}};function Al(e){return Object.assign(Object.assign({},e),{predicate:Array.isArray(e.predicate)?e.predicate:new et(e.predicate),read:e.read?new et(e.read):null,static:e.static})}function Pl(e){const t=Fl(e.inputs||[]),n=Fl(e.outputs||[]),s=e.propMetadata,r={},i={};for(const e in s)s.hasOwnProperty(e)&&s[e].forEach(t=>{"Input"===t.ngMetadataName?r[e]=t.bindingPropertyName?[t.bindingPropertyName,e]:e:Dl(t)&&(i[e]=t.bindingPropertyName||e)});return Object.assign(Object.assign({},e),{typeSourceSpan:e.typeSourceSpan,type:Nl(e.type),internalType:new et(e.type),deps:Ml(e.deps),host:Ll(e.propMetadata,e.typeSourceSpan,e.host),inputs:Object.assign(Object.assign({},t),r),outputs:Object.assign(Object.assign({},n),i),queries:e.queries.map(Al),providers:null!=e.providers?new et(e.providers):null,viewQueries:e.viewQueries.map(Al),fullInheritance:!1})}function kl(e,t){return e.hasOwnProperty(t)?new et(e[t]):void 0}function Ol(e){let t;return t=null===e.token?new ot(null):e.resolved===Bs.Attribute?new ot(e.token):new et(e.token),{token:t,attribute:null,resolved:e.resolved,host:e.host,optional:e.optional,self:e.self,skipSelf:e.skipSelf}}function Ml(e){return null==e?null:e.map(Ol)}function Ll(e,t,n){const s=function(e){const t={},n={},s={},r={};for(const i of Object.keys(e)){const a=e[i],o=i.match(_l);if(null===o)switch(i){case"class":if("string"!=typeof a)throw new Error("Class binding must be string");r.classAttr=a;break;case"style":if("string"!=typeof a)throw new Error("Style binding must be string");r.styleAttr=a;break;default:t[i]="string"==typeof a?Xt(a):a}else if(null!=o[1]){if("string"!=typeof a)throw new Error("Property binding must be string");s[o[1]]=a}else if(null!=o[2]){if("string"!=typeof a)throw new Error("Event binding must be string");n[o[2]]=a}}return{attributes:t,listeners:n,properties:s,specialAttributes:r}}(n||{}),r=function(e,t){const n=El(e),s=ol();return s.createDirectiveHostEventAsts(n,t),s.createBoundHostProperties(n,t),s.errors}(s,t);if(r.length)throw new Error(r.map(e=>e.msg).join("\n"));for(const t in e)e.hasOwnProperty(t)&&e[t].forEach(e=>{"HostBinding"===e.ngMetadataName?s.properties[e.hostPropertyName||t]=t:Rl(e)&&(s.listeners[e.eventName||t]=`${t}(${(e.args||[]).join(",")})`)});return s}function Rl(e){return"HostListener"===e.ngMetadataName}function Dl(e){return"Output"===e.ngMetadataName}function Fl(e){return e.reduce((e,t)=>{const[n,s]=t.split(",").map(e=>e.trim());return e[n]=s||n,e},{})}var Bl,$l,Vl;new class{constructor(e){this.full=e;const t=e.split(".");this.major=t[0],this.minor=t[1],this.patch=t.slice(2).join(".")}}("11.0.0"),function(e){e[e.Extract=0]="Extract",e[e.Merge=1]="Merge"}(Bl||(Bl={})),function(e){e[e.OnInit=0]="OnInit",e[e.OnDestroy=1]="OnDestroy",e[e.DoCheck=2]="DoCheck",e[e.OnChanges=3]="OnChanges",e[e.AfterContentInit=4]="AfterContentInit",e[e.AfterContentChecked=5]="AfterContentChecked",e[e.AfterViewInit=6]="AfterViewInit",e[e.AfterViewChecked=7]="AfterViewChecked"}($l||($l={})),Vt("_l"),Vt("_l"),Vt("_v"),Vt("_ck"),Vt("_co"),Vt("en"),Vt("ad"),function(e){e[e.Scheme=1]="Scheme",e[e.UserInfo=2]="UserInfo",e[e.Domain=3]="Domain",e[e.Port=4]="Port",e[e.Path=5]="Path",e[e.QueryData=6]="QueryData",e[e.Fragment=7]="Fragment"}(Vl||(Vl={})),(on.ng||(on.ng={})).ɵcompilerFacade=new class{constructor(e=new sr){this.jitEvaluator=e,this.R3ResolvedDependencyType=Bs,this.R3FactoryTarget=Fs,this.ResourceLoader=Cl,this.elementSchemaRegistry=new vo}compilePipe(e,t,n){const s=function(e){const t=[];return t.push({key:"name",value:Xt(e.pipeName),quoted:!1}),t.push({key:"type",value:e.type.value,quoted:!1}),t.push({key:"pure",value:Xt(e.pure),quoted:!1}),{expression:jt(_n.definePipe).callFn([Wt(t)]),type:new $e(jt(_n.PipeDefWithMeta,[wn(e.type.type,e.typeArgumentCount),new $e(new ot(e.pipeName))]))}}({name:n.name,type:Nl(n.type),internalType:new et(n.type),typeArgumentCount:n.typeArgumentCount,deps:Ml(n.deps),pipeName:n.pipeName,pure:n.pure});return this.jitExpression(s.expression,e,t,[])}compileInjectable(e,t,n){const{expression:s,statements:r}=function(e){let t=null;const n={name:e.name,type:e.type,internalType:e.internalType,typeArgumentCount:e.typeArgumentCount,deps:[],injectFn:vn.inject,target:Fs.Injectable};if(void 0!==e.useClass){const s=e.useClass.isEquivalent(e.internalType);let r=void 0;void 0!==e.userDeps&&(r=e.userDeps),t=void 0!==r?$s(Object.assign(Object.assign({},n),{delegate:e.useClass,delegateDeps:r,delegateType:Ds.Class})):s?$s(n):Us(e.type.value,e.useClass)}else t=void 0!==e.useFactory?void 0!==e.userDeps?$s(Object.assign(Object.assign({},n),{delegate:e.useFactory,delegateDeps:e.userDeps||[],delegateType:Ds.Function})):{statements:[],factory:zt([],[new Bt(e.useFactory.callFn([]))])}:void 0!==e.useValue?$s(Object.assign(Object.assign({},n),{expression:e.useValue})):void 0!==e.useExisting?$s(Object.assign(Object.assign({},n),{expression:jt(vn.inject).callFn([e.useExisting])})):Us(e.type.value,e.internalType);const s={token:e.internalType,factory:t.factory};return null!==e.providedIn.value&&(s.providedIn=e.providedIn),{expression:jt(vn.ɵɵdefineInjectable).callFn([Cn(s)]),type:new $e(jt(vn.InjectableDef,[wn(e.type.type,e.typeArgumentCount)])),statements:t.statements}}({name:n.name,type:Nl(n.type),internalType:new et(n.type),typeArgumentCount:n.typeArgumentCount,providedIn:(i=n.providedIn,null==i||"string"==typeof i?new ot(i):new et(i)),useClass:kl(n,wl),useFactory:kl(n,bl),useValue:kl(n,Il),useExisting:kl(n,Tl),userDeps:Ml(n.userDeps)||void 0});var i;return this.jitExpression(s,e,t,r)}compileInjector(e,t,n){const s=function(e){const t=$s({name:e.name,type:e.type,internalType:e.internalType,typeArgumentCount:0,deps:e.deps,injectFn:_n.inject,target:Fs.NgModule}),n={factory:t.factory};return null!==e.providers&&(n.providers=e.providers),e.imports.length>0&&(n.imports=Ht(e.imports)),{expression:jt(_n.defineInjector).callFn([Cn(n)]),type:new $e(jt(_n.InjectorDef,[new $e(e.type.type)])),statements:t.statements}}({name:n.name,type:Nl(n.type),internalType:new et(n.type),deps:Ml(n.deps),providers:new et(n.providers),imports:n.imports.map(e=>new et(e))});return this.jitExpression(s.expression,e,t,s.statements)}compileNgModule(e,t,n){const s=function(e){const{internalType:t,type:n,bootstrap:s,declarations:r,imports:i,exports:a,schemas:o,containsForwardDecls:l,emitInline:c,id:u}=e,p=[],h={type:t};if(s.length&&(h.bootstrap=Er(s,l)),c)r.length&&(h.declarations=Er(r,l)),i.length&&(h.imports=Er(i,l)),a.length&&(h.exports=Er(a,l));else{const t=function(e){const{adjacentType:t,declarations:n,imports:s,exports:r,containsForwardDecls:i}=e,a={};if(n.length&&(a.declarations=Er(n,i)),s.length&&(a.imports=Er(s,i)),r.length&&(a.exports=Er(r,i)),0===Object.keys(a).length)return null;const o=function(e){const t=new ft({name:"ngJitMode",moduleName:null}),n=new wt(Ke.Identical,new Je(t),Xt("undefined")),s=new wt(Ke.Or,n,t,void 0,void 0,!0);return new wt(Ke.And,s,e)}(new it(jt(_n.setNgModuleScope),[t,Cn(a)])),l=new _t([],[o.toStmt()]);return new it(l,[]).toStmt()}(e);null!==t&&p.push(t)}return o&&o.length&&(h.schemas=Ht(o.map(e=>e.value))),u&&(h.id=u),{expression:jt(_n.defineNgModule).callFn([Cn(h)]),type:new $e(jt(_n.NgModuleDefWithMeta,[new $e(n.type),Sr(r),Sr(i),Sr(a)])),additionalStatements:p}}({type:Nl(n.type),internalType:new et(n.type),adjacentType:new et(n.type),bootstrap:n.bootstrap.map(Nl),declarations:n.declarations.map(Nl),imports:n.imports.map(Nl),exports:n.exports.map(Nl),emitInline:!0,containsForwardDecls:!1,schemas:n.schemas?n.schemas.map(Nl):null,id:n.id?new et(n.id):null});return this.jitExpression(s.expression,e,t,[])}compileDirective(e,t,n){const s=new pn,r=ol(),i=function(e,t,n){const s=ml(e,t,n);gl(s,e);const r=jt(_n.defineDirective).callFn([s.toLiteralMap()]),i=xl(e);return{expression:r,type:Ut(jt(_n.DirectiveDefWithMeta,i))}}(Pl(n),s,r);return this.jitExpression(i.expression,e,t,s.statements)}compileComponent(e,t,n){const s=new pn,r=n.interpolation?Hs.fromArray(n.interpolation):Ws,i=function(e,t,n={}){const{interpolationConfig:s,preserveWhitespaces:r,enableI18nLegacyMessageIdFormat:i}=n,a=ol(s),o=(new Sa).parse(e,t,Object.assign(Object.assign({leadingTriviaChars:Ko},n),{tokenizeExpansionForms:!0}));if(o.errors&&o.errors.length>0)return{interpolationConfig:s,preserveWhitespaces:r,template:e,errors:o.errors,nodes:[],styleUrls:[],styles:[],ngContentSelectors:[]};let l=o.rootNodes;const c=new $o(s,!r,i);l=Yi(c,l),r||(l=Yi(new ba,l),c.hasI18nMeta&&(l=Yi(new $o(s,!1),l)));const{nodes:u,errors:p,styleUrls:h,styles:d,ngContentSelectors:m}=function(e,t){const n=new xo(t);return{nodes:Yi(n,e),errors:t.errors.concat(n.errors),styleUrls:n.styleUrls,styles:n.styles,ngContentSelectors:n.ngContentSelectors}}(l,a);return{interpolationConfig:s,preserveWhitespaces:r,errors:p.length>0?p:null,template:e,nodes:u,styleUrls:h,styles:d,ngContentSelectors:m}}(n.template,t,{preserveWhitespaces:n.preserveWhitespaces,interpolationConfig:r});if(null!==i.errors){const e=i.errors.map(e=>e.toString()).join(", ");throw new Error(`Errors during JIT compilation of template for ${n.name}: ${e}`)}const a=function(e,t,n){const s=ml(e,t,n);gl(s,e);const r=e.selector&&be.parse(e.selector),i=r&&r[0];if(i){const e=i.getAttrs();e.length&&s.set("attrs",t.getConstLiteral(Ht(e.map(e=>Xt(null!=e?e:void 0))),!0))}let a=null;if(e.directives.length>0){const t=new Ie;for(const{selector:n,expression:s}of e.directives)t.addSelectables(be.parse(n),s);a=t}const o=e.name,l=o?o+"_Template":null,c=new Set,u=new Set,p=e.changeDetection,h=e.template,d=new Qo(t,rl.createRootScope(),0,o,null,null,l,a,c,e.pipes,u,_n.namespaceHTML,e.relativeContextFilePath,e.i18nUseExternalIds),m=d.buildTemplateFunction(h.nodes,[]),g=d.getNgContentSelectors();g&&s.set("ngContentSelectors",g),s.set("decls",Xt(d.getConstCount())),s.set("vars",Xt(d.getVarCount()));const{constExpressions:f,prepareStatements:v}=d.getConsts();if(f.length>0){let e=Ht(f);v.length>0&&(e=zt([],[...v,new Bt(e)])),s.set("consts",e)}if(s.set("template",m),c.size){let t=Ht(Array.from(c));e.wrapDirectivesAndPipesInClosure&&(t=zt([],[new Bt(t)])),s.set("directives",t)}if(u.size){let t=Ht(Array.from(u));e.wrapDirectivesAndPipesInClosure&&(t=zt([],[new Bt(t)])),s.set("pipes",t)}if(null===e.encapsulation&&(e.encapsulation=Ae.Emulated),e.styles&&e.styles.length){const n=(e.encapsulation==Ae.Emulated?function(e,t,n){const s=new vi;return e.map(e=>s.shimCssText(e,"_ngcontent-%COMP%","_nghost-%COMP%"))}(e.styles):e.styles).map(e=>t.getConstLiteral(Xt(e)));s.set("styles",Ht(n))}else e.encapsulation===Ae.Emulated&&(e.encapsulation=Ae.None);e.encapsulation!==Ae.Emulated&&s.set("encapsulation",Xt(e.encapsulation)),null!==e.animations&&s.set("data",Wt([{key:"animation",value:e.animations,quoted:!1}])),null!=p&&p!==Pe.Default&&s.set("changeDetection",Xt(p));const y=jt(_n.defineComponent).callFn([s.toLiteralMap()]),x=xl(e);return x.push(yl(e.template.ngContentSelectors)),{expression:y,type:Ut(jt(_n.ComponentDefWithMeta,x))}}(Object.assign(Object.assign(Object.assign({},n),Pl(n)),{selector:n.selector||this.elementSchemaRegistry.getDefaultComponentElementName(),template:i,wrapDirectivesAndPipesInClosure:!1,styles:[...n.styles,...i.styles],encapsulation:n.encapsulation,interpolation:r,changeDetection:n.changeDetection,animations:null!=n.animations?new et(n.animations):null,viewProviders:null!=n.viewProviders?new et(n.viewProviders):null,relativeContextFilePath:"",i18nUseExternalIds:!0}),s,ol(r));return this.jitExpression(a.expression,e,`ng:///${n.name}.js`,s.statements)}compileFactory(e,t,n){const s=$s({name:n.name,type:Nl(n.type),internalType:new et(n.type),typeArgumentCount:n.typeArgumentCount,deps:Ml(n.deps),injectFn:"directiveInject"===n.injectFn?vn.directiveInject:vn.inject,target:n.target});return this.jitExpression(s.factory,e,t,s.statements)}createParseSourceSpan(e,t,n){return function(e,t,n){const s=new pr("",`in ${e} ${t} in ${n}`);return new hr(new ur(s,-1,-1,-1),new ur(s,-1,-1,-1))}(e,t,n)}jitExpression(e,t,n,s){const r=[...s,new Rt("$def",e,void 0,[Ot.Exported])];return this.jitEvaluator.evaluateStatements(n,r,new yr(t),!0).$def}};const jl="attribute",Ul="element",ql={[jl]:"attrs",[Ul]:Ul},Hl=(e,t,n)=>{n.report({node:e,messageId:"prefixFailure",data:{prefix:t}})},Wl=(e,t,n)=>{n.report({node:e,messageId:"styleFailure",data:{style:t}})},zl=(e,t,n)=>{n.report({node:e,messageId:"typeFailure",data:{type:t}})},Kl=(e,t,n)=>{const s=Q(e),r=n,i=s.length>0&&s.every(e=>-1!==[Ul,jl].indexOf(e)),a=t.length>0,o=-1!==[u,p].indexOf(r);return i&&a&&o},Xl=(e,t,n,s)=>{const r=Q(t||["attrs",Ul]).reduce((e,t)=>e.concat(ql[t]),[]),i=s===p?Z.kebabCase:Z.camelCase;let a=null;if(e&&I(e)?a=be.parse(e.raw):e&&T(e)&&e.quasis[0]&&(a=be.parse(e.quasis[0].value.raw)),!a)return null;const o=((e,t)=>e.reduce((e,n)=>{const s=t.reduce((e,t)=>{const s=n[t];return s?e.concat(s):e},[]);return e.concat(s)},[]))(a,r),l=o.some(e=>n.some(t=>Z.prefix(t,s)(e))),c=o.some(e=>i(e));return{hasExpectedPrefix:l,hasExpectedType:o.length>0,hasExpectedStyle:c}};var Gl=ne({name:"component-selector",meta:{type:"suggestion",docs:{description:"Component selectors should follow given naming rules. See more at https://angular.io/guide/styleguide#style-02-07, https://angular.io/guide/styleguide#style-05-02\n and https://angular.io/guide/styleguide#style-05-03.",category:"Best Practices",recommended:!1},schema:[{type:"object",properties:{type:{oneOf:[{type:"string"},{type:"array",items:{enum:[Ul,jl]}}]},prefix:{oneOf:[{type:"string"},{type:"array"}]},style:{type:"string",enum:[u,p]}},additionalProperties:!1}],messages:{prefixFailure:"The selector should be prefixed by one of the prefixes: '{{prefix}}' (https://angular.io/guide/styleguide#style-02-07)",styleFailure:"The selector should be {{style}} (https://angular.io/guide/styleguide#style-05-02)",typeFailure:"The selector should be used as an {{type}} (https://angular.io/guide/styleguide#style-05-03)"}},defaultOptions:[{type:"",prefix:"",style:""}],create(e,[t]){const{type:n,prefix:s,style:r}=t;return{[ae](t){const i=K(t,"selector");if(!i)return;if(!Kl(n,s,r))return;const a=Xl(i,n,Q(s),r);null!==a&&(a.hasExpectedType?a.hasExpectedStyle?a.hasExpectedPrefix||Hl(i,s,e):Wl(i,r,e):zl(i,n,e))}}}}),Ql=ne({name:"contextual-lifecycle",meta:{type:"problem",docs:{description:"Ensures that lifecycle methods are used in a correct context",category:"Possible Errors",recommended:"error"},schema:[],messages:{contextuaLifecycle:"This lifecycle method is not called for {{decorator}}"}},defaultOptions:[],create(e){function t({parent:t},n){const s=t,r=f.get(n),i=X(s);for(const t of i){const s=G(t);q(s)&&!(null==r?void 0:r.has(s))&&e.report({node:t.key,messageId:"contextuaLifecycle",data:{decorator:n}})}}return{[ae](e){t(e,s.Component)},[oe](e){t(e,s.Directive)},'ClassDeclaration > Decorator[expression.callee.name="Injectable"]'(e){t(e,s.Injectable)},'ClassDeclaration > Decorator[expression.callee.name="NgModule"]'(e){t(e,s.NgModule)},[le](e){t(e,s.Pipe)}}}}),Yl=ne({name:"directive-class-suffix",meta:{type:"suggestion",docs:{description:'Classes decorated with @Directive must have suffix "Directive" (or custom) in their name. See more at https://angular.io/styleguide#style-02-03.',category:"Best Practices",recommended:"error"},schema:[{type:"object",properties:{suffixes:{type:"array",items:{type:"string"}}},additionalProperties:!1}],messages:{directiveClassSuffix:"The name of the class {{className}} should end with the suffix {{suffixes}} (https://angular.io/styleguide#style-02-03)"}},defaultOptions:[{suffixes:["Directive"]}],create(e,[t]){const{suffixes:n}=t;return{[oe](t){const s=t.parent,r=M(s);B(s).some(e=>e.endsWith("Validator"))&&n.push("Validator"),r&&n.some(e=>r.endsWith(e))||e.report({node:s.id?s.id:s,messageId:"directiveClassSuffix",data:{className:r,suffixes:n}})}}}}),Zl=ne({name:"directive-selector",meta:{type:"suggestion",docs:{description:"Directive selectors should follow given naming rules. See more at https://angular.io/guide/styleguide#style-02-06 and https://angular.io/guide/styleguide#style-02-08.",category:"Best Practices",recommended:!1},schema:[{type:"object",properties:{type:{oneOf:[{type:"string"},{type:"array",items:{enum:[Ul,jl]}}]},prefix:{oneOf:[{type:"string"},{type:"array"}]},style:{type:"string",enum:[u,p]}},additionalProperties:!1}],messages:{prefixFailure:"The selector should be prefixed by one of the prefixes: '{{prefix}}' (https://angular.io/guide/styleguide#style-02-08)",styleFailure:"The selector should be {{style}} (https://angular.io/guide/styleguide#style-02-06)",typeFailure:"The selector should be used as an {{type}} (https://angular.io/guide/styleguide#style-02-06)"}},defaultOptions:[{type:"",prefix:"",style:""}],create(e,[t]){const{type:n,prefix:s,style:r}=t;return{[oe](t){const i=K(t,"selector");if(!i)return;if(!Kl(n,s,r))return;const a=Xl(i,n,Q(s),r);null!==a&&(a.hasExpectedType?a.hasExpectedStyle?a.hasExpectedPrefix||Hl(i,s,e):Wl(i,r,e):zl(i,n,e))}}}}),Jl=ne({name:"no-attribute-decorator",meta:{type:"problem",docs:{description:`Disallows usage of @${o.Attribute} decorator.`,category:"Possible Errors",recommended:!1},schema:[],messages:{noAttributeDecorator:`@${o.Attribute} is considered bad practice. Use @Input instead`}},defaultOptions:[],create:t=>({MethodDefinition(n){n.value&&n.value.type===e.AST_NODE_TYPES.FunctionExpression&&function(e){return"constructor"===e.kind}(n)&&function(e){e.value.params.forEach(e=>{if(null!=e.decorators)for(const n of e.decorators)if(R(n)===o.Attribute){t.report({node:e,messageId:"noAttributeDecorator"});break}})}(n)}})});const ec=[l.DoCheck,l.OnChanges],tc=[c.ngDoCheck,c.ngOnChanges];var nc=ne({name:"no-conflicting-lifecycle",meta:{type:"suggestion",docs:{description:"Ensures that directives not implement conflicting lifecycle interfaces.",category:"Best Practices",recommended:"error"},schema:[],messages:{noConflictingLifecycleInterface:`Implementing ${l.DoCheck} and ${l.OnChanges} in a class is not recommended`,noConflictingLifecycleMethod:`Declaring ${c.ngDoCheck} and ${c.ngOnChanges} method in a class is not recommended`}},defaultOptions:[],create:e=>({ClassDeclaration(t){(t=>{const n=$(t);if(!ec.every(e=>n.includes(e)))return;const s=F(t).filter(e=>E(e.expression)&&U(e.expression.name));for(const t of s)e.report({node:t,messageId:"noConflictingLifecycleInterface"})})(t),(t=>{const n=(e=>X(e).map(G).filter(q))(t);if(!tc.every(e=>n.includes(e)))return;const s=X(t).filter(e=>E(e.key)&&q(e.key.name));for(const t of s)e.report({node:t,messageId:"noConflictingLifecycleMethod"})})(t)}})}),sc=ne({name:"no-forward-ref",meta:{type:"suggestion",docs:{description:"Disallows usage of `forwardRef` references for DI",category:"Best Practices",recommended:!1},schema:[],messages:{noForwardRef:"Avoid using `forwardRef`"}},defaultOptions:[],create:e=>({'CallExpression[callee.type="Identifier"][callee.name="forwardRef"]'(t){e.report({node:t,messageId:"noForwardRef"})}})}),rc=ne({name:"no-host-metadata-property",meta:{type:"suggestion",docs:{description:"Disallows usage of the `host` metadata property. See more at https://angular.io/styleguide#style-06-03.",category:"Best Practices",recommended:"error"},schema:[],messages:{noHostMetadataProperty:`Use @${o.HostBinding} or @${o.HostListener} rather than the \`host\` metadata property (https://angular.io/styleguide#style-06-03)`}},defaultOptions:[],create:e=>({[ie](t){const n=K(t,"host");n&&e.report({node:n.parent,messageId:"noHostMetadataProperty"})}})}),ic=ne({name:"no-input-prefix",meta:{type:"suggestion",docs:{description:"Input names should not be prefixed by the configured disallowed prefixes.",category:"Best Practices",recommended:!1},schema:[{type:"object",properties:{prefixes:{type:"array",items:{type:"string"}}},additionalProperties:!1}],messages:{noInputPrefix:"@Inputs should not be prefixed by {{disallowedPrefixes}}"}},defaultOptions:[{prefixes:[]}],create:(e,[t])=>({':matches(ClassProperty, MethodDefinition[kind="set"]) > Decorator[expression.callee.name="Input"]'(n){if(!J(n.expression.callee,"@angular/core"))return;const s=n.parent,r=W(s),i=t.prefixes;i.some(e=>e===r||new RegExp(`^${e}[^a-z]`).test(r))&&e.report({node:s,messageId:"noInputPrefix",data:{disallowedPrefixes:i.join(", ")}})}})});const ac=new Set(["aria-activedescendant","aria-atomic","aria-autocomplete","aria-busy","aria-checked","aria-controls","aria-current","aria-describedby","aria-disabled","aria-dragged","aria-dropeffect","aria-expanded","aria-flowto","aria-haspopup","aria-hidden","aria-invalid","aria-label","aria-labelledby","aria-level","aria-live","aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext"]);var oc=ne({name:"no-input-rename",meta:{type:"suggestion",docs:{description:"Disallows renaming directive inputs by providing a string to the decorator.",category:"Best Practices",recommended:"error"},schema:[],messages:{noInputRename:"In the class {{className}}, the directive input property {{propertyName}} should not be renamed"}},defaultOptions:[],create:e=>({':matches(ClassProperty, MethodDefinition[kind="set"]) > Decorator[expression.callee.name="Input"]'(t){const n=t.expression;if(!J(n.callee,"@angular/core"))return;if(0===n.arguments.length)return;let r;const i=t.parent,a=i.parent.parent,o=a.decorators&&a.decorators.find(e=>S(e.expression)&&E(e.expression.callee)&&e.expression.callee.name===s.Directive);if(o){const e=K(o,"selector");e&&I(e)&&e.value&&(r=(e.value.toString()||"").replace(/[[\]\s]/g,"").split(","))}const l=n.arguments[0].value;l&&E(i.key)&&((e,t)=>{return!!(e!==t&&r&&r.some(n=>new RegExp(`^${n}((${t[0].toUpperCase()+t.slice(1)}$)|(?=$))`).test(e))||ac.has(e)&&t===(n=e,n.replace(/-[a-zA-Z]/g,e=>e[1].toUpperCase())));var n})(l.toString(),i.key.name)||e.report({node:i,messageId:"noInputRename",data:{className:a.id&&a.id.name,propertyName:i.key.name}})}})}),lc=ne({name:"no-inputs-metadata-property",meta:{type:"suggestion",docs:{description:"Disallows usage of the `inputs` metadata property. See more at https://angular.io/styleguide#style-05-12.",category:"Best Practices",recommended:"error"},schema:[],messages:{noInputsMetadataProperty:`Use @${o.Input} rather than the \`inputs\` metadata property (https://angular.io/styleguide#style-05-12)`}},defaultOptions:[],create:e=>({[ie](t){const n=K(t,"inputs");n&&e.report({node:n.parent,messageId:"noInputsMetadataProperty"})}})}),cc=ne({name:"no-lifecycle-call",meta:{type:"suggestion",docs:{description:"Disallows explicit calls to lifecycle methods",category:"Best Practices",recommended:!1},schema:[],messages:{noLifecycleCall:"Avoid explicit calls to lifecycle methods"}},defaultOptions:[],create:e=>({[`ClassDeclaration MemberExpression[property.name=${te([...j])}]`]:t=>{!L(function(e){return O(e,C)}(t))||function(e){return"Super"===e.type}(t.object)&&function(e){const t=O(e,k);return Boolean(t&&function({property:e},{key:t}){return E(e)&&E(t)&&e.name===t.name}(e,t))}(t)||e.report({node:t.parent,messageId:"noLifecycleCall"})}})}),uc=ne({name:"no-output-native",meta:{type:"suggestion",docs:{description:"Disallows naming directive outputs as standard DOM event.",category:"Best Practices",recommended:"error"},schema:[],messages:{noOutputNative:"The output property should not be named or renamed as a native event"}},defaultOptions:[],create:e=>({'ClassProperty > Decorator[expression.callee.name="Output"]'(t){const n=t.parent;if(!M(t))return;const s=W(n),r=t.expression.arguments[0],i=r&&I(r)&&r.value||s;i&&(pc||(pc=new Set(["abort","afterprint","animationend","animationiteration","animationstart","appinstalled","audioprocess","audioend","audiostart","beforeprint","beforeunload","beginEvent","blocked","blur","boundary","cached","canplay","canplaythrough","change","chargingchange","chargingtimechange","checking","click","close","complete","compositionend","compositionstart","compositionupdate","contextmenu","copy","cut","dblclick","devicechange","devicelight","devicemotion","deviceorientation","deviceproximity","dischargingtimechange","DOMAttributeNameChanged","DOMAttrModified","DOMCharacterDataModified","DOMContentLoaded","DOMElementNameChanged","focus","focusin","focusout","DOMNodeInserted","DOMNodeInsertedIntoDocument","DOMNodeRemoved","DOMNodeRemovedFromDocument","DOMSubtreeModified","downloading","drag","dragend","dragenter","dragleave","dragover","dragstart","drop","durationchange","emptied","end","ended","endEvent","error","fullscreenchange","fullscreenerror","gamepadconnected","gamepaddisconnected","gotpointercapture","hashchange","lostpointercapture","input","invalid","keydown","keypress","keyup","languagechange","levelchange","load","loadeddata","loadedmetadata","loadend","loadstart","mark","message","messageerror","mousedown","mouseenter","mouseleave","mousemove","mouseout","mouseover","mouseup","nomatch","notificationclick","noupdate","obsolete","offline","online","open","orientationchange","pagehide","pageshow","paste","pause","pointercancel","pointerdown","pointerenter","pointerleave","pointerlockchange","pointerlockerror","pointermove","pointerout","pointerover","pointerup","play","playing","popstate","progress","push","pushsubscriptionchange","ratechange","readystatechange","repeatEvent","reset","resize","resourcetimingbufferfull","result","resume","scroll","seeked","seeking","select","selectstart","selectionchange","show","soundend","soundstart","speechend","speechstart","stalled","start","storage","submit","success","suspend","SVGAbort","SVGError","SVGLoad","SVGResize","SVGScroll","SVGUnload","SVGZoom","timeout","timeupdate","touchcancel","touchend","touchmove","touchstart","transitionend","unload","updateready","upgradeneeded","userproximity","voiceschanged","versionchange","visibilitychange","volumechange","waiting","wheel"]))).has(i.toString())&&e.report({node:n,messageId:"noOutputNative"})}})});let pc=null;var hc=ne({name:"no-output-on-prefix",meta:{type:"suggestion",docs:{description:"Name events without the prefix on. See more at https://angular.io/guide/styleguide#dont-prefix-output-properties.",category:"Best Practices",recommended:"error"},schema:[],messages:{noOutputOnPrefix:'In the class "{{className}}", the output property "{{memberName}}" should not be prefixed with on'}},defaultOptions:[],create:e=>({'ClassProperty > Decorator[expression.callee.name="Output"]'(t){const n=t.parent,s=M(t),r=W(n);r&&/^on((?![a-z])|(?=$))/.test(r)&&e.report({node:n,messageId:"noOutputOnPrefix",data:{className:s,memberName:r}})}})}),dc=ne({name:"no-output-rename",meta:{type:"suggestion",docs:{description:"Disallows renaming directive outputs by providing a string to the decorator.",category:"Best Practices",recommended:"error"},schema:[],messages:{noOutputRename:"@Outputs should not be renamed"}},defaultOptions:[],create:e=>({'ClassProperty > Decorator[expression.callee.name="Output"]'(t){const n=t.expression;if(!J(n.callee,"@angular/core"))return;if(0===n.arguments.length)return;let r;const i=t.parent,a=i.parent.parent,o=a.decorators&&a.decorators.find(e=>S(e.expression)&&E(e.expression.callee)&&e.expression.callee.name===s.Directive);if(o){const e=K(o,"selector");e&&I(e)&&e.value&&(r=new Set((e.value.toString()||"").replace(/[[\]\s]/g,"").split(",")))}const l=n.arguments[0].value;l&&E(i.key)&&((e,t)=>!(!r||!r.has(e)||e===t))(l.toString(),i.key.name)||e.report({node:i,messageId:"noOutputRename"})}})}),mc=ne({name:"no-outputs-metadata-property",meta:{type:"suggestion",docs:{description:"Disallows usage of the `outputs` metadata property. See more at https://angular.io/styleguide#style-05-12.",category:"Best Practices",recommended:"error"},schema:[],messages:{noOutputsMetadataProperty:`Use @${o.Output} rather than the \`outputs\` metadata property (https://angular.io/styleguide#style-05-12)`}},defaultOptions:[],create:e=>({[ie](t){const n=K(t,"outputs");n&&e.report({node:n.parent,messageId:"noOutputsMetadataProperty"})}})}),gc=ne({name:"no-pipe-impure",meta:{type:"suggestion",docs:{description:"Disallows the declaration of impure pipes.",category:"Best Practices",recommended:!1},schema:[],messages:{noPipeImpure:"Impure pipes should be avoided because they are invoked on each change-detection cycle."}},defaultOptions:[],create:e=>({[le](t){const n=z(t,"pure");n&&I(n.value)&&!n.value.value&&e.report({node:n.value,messageId:"noPipeImpure"})}})}),fc=ne({name:"no-queries-metadata-property",meta:{type:"suggestion",docs:{description:"Disallows usage of the `queries` metadata property. See more at https://angular.io/styleguide#style-05-12.",category:"Best Practices",recommended:!1},schema:[],messages:{noQueriesMetadataProperty:`Use @${o.Output} rather than the \`queries\` metadata property (https://angular.io/styleguide#style-05-12)`}},defaultOptions:[],create:e=>({[ie](t){const n=K(t,"queries");n&&e.report({node:n.parent,messageId:"noQueriesMetadataProperty"})}})}),vc=ne({name:"no-empty-lifecycle-method",meta:{type:"suggestion",docs:{description:"Disallows declaring empty lifecycle methods",category:"Best Practices",recommended:"error"},schema:[],messages:{noEmptyLifecycleMethod:"Lifecycle methods should not be empty"}},defaultOptions:[],create:e=>({[`MethodDefinition[key.name=${te([...j])}][value.body.body.length=0]`](t){L(t.parent.parent)&&e.report({node:t.key,messageId:"noEmptyLifecycleMethod"})}})});const yc="prefer-on-push-component-change-detection";var xc=ne({name:yc,meta:{type:"suggestion",docs:{description:"Enforces component's change detection to ChangeDetectionStrategy.OnPush.",category:"Best Practices",recommended:!1},schema:[],messages:{preferOnPushComponentChangeDetection:"The changeDetection value of a component should be set to ChangeDetectionStrategy.OnPush"}},defaultOptions:[],create:e=>({[ae](t){const n=K(t,"changeDetection");n?E(n.property)&&"OnPush"===n.property.name||e.report({node:n,messageId:"preferOnPushComponentChangeDetection"}):e.report({node:t,messageId:"preferOnPushComponentChangeDetection"})}})}),Sc=ne({name:"prefer-output-readonly",meta:{type:"suggestion",docs:{description:"Prefer to declare `@Output` as readonly since they are not supposed to be reassigned",category:"Best Practices",recommended:!1},schema:[],messages:{preferOutputReadonly:"Prefer to declare `@Output` as readonly since they are not supposed to be reassigned"}},defaultOptions:[],create:e=>({'ClassProperty[readonly=undefined] > Decorator[expression.callee.name="Output"]'({parent:t}){e.report({node:t.key,messageId:"preferOutputReadonly"})}})});const Ec=/^\.{1,2}\/[^./]/;var _c=ne({name:"relative-url-prefix",meta:{type:"suggestion",docs:{description:"The ./ and ../ prefix is standard syntax for relative URLs; don't depend on Angular's current ability to do without that prefix. See more at https://angular.io/styleguide#style-05-04.",category:"Best Practices",recommended:!1},schema:[],messages:{relativeUrlPrefix:"The ./ and ../ prefix is standard syntax for relative URLs. (https://angular.io/styleguide#style-05-04)"}},defaultOptions:[],create:e=>({[ae](t){const n=z(t,"templateUrl");n&&P(n.value)&&(Ec.test(n.value.value)||e.report({node:n.value,messageId:"relativeUrlPrefix"}));const s=z(t,"styleUrls");s&&s.value&&b(s.value)&&s.value.elements.length>0&&s.value.elements.forEach(t=>{P(t)&&!Ec.test(t.value)&&e.report({node:t,messageId:"relativeUrlPrefix"})})}})}),Cc=ne({name:"use-component-selector",meta:{type:"suggestion",docs:{description:"Component selector must be declared",category:"Best Practices",recommended:!1},schema:[],messages:{useComponentSelector:"The selector of the component '{{className}}' is mandatory"}},defaultOptions:[],create:e=>({[ae](t){const n=t.parent;if(!n||!n.id||!n.id.name)return;const s=K(t,"selector");s&&P(s)&&s.value.length||e.report({node:t,messageId:"useComponentSelector",data:{className:n.id.name}})}})}),wc=ne({name:"use-component-view-encapsulation",meta:{type:"suggestion",docs:{description:"Disallows using ViewEncapsulation.None",category:"Best Practices",recommended:!1},schema:[],messages:{useComponentViewEncapsulation:"Using ViewEncapsulation.None makes your styles global, which may have an unintended effect"}},defaultOptions:[],create:e=>({[ae](t){const n=K(t,"encapsulation");!n||_(n)&&E(n.property)&&"None"!==n.property.name||e.report({node:n,messageId:"useComponentViewEncapsulation"})}})}),bc=ne({name:"use-injectable-provided-in",meta:{type:"suggestion",docs:{description:`"Using the 'providedIn' property makes classes decorated with @${s.Injectable} tree shakeable`,category:"Best Practices",recommended:!1},schema:[],messages:{useInjectableProvidedIn:`Classes decorated with @${s.Injectable} should use the 'providedIn' property`}},defaultOptions:[],create:e=>({'ClassDeclaration > Decorator[expression.callee.name="Injectable"]'(t){K(t,"providedIn")||e.report({node:t,messageId:"useInjectableProvidedIn"})}})}),Ic=ne({name:"use-lifecycle-interface",meta:{type:"suggestion",docs:{description:"Ensures that classes implement lifecycle interfaces corresponding to the declared lifecycle methods",category:"Best Practices",recommended:"warn"},schema:[],messages:{useLifecycleInterface:"Lifecycle interface '{{interfaceName}}' should be implemented for method '{{methodName}}'. (https://angular.io/styleguide#style-09-01)"}},defaultOptions:[],create:e=>({[`MethodDefinition[key.name=${te([...j])}]`]({key:t,parent:n}){const s=n.parent;if(!L(s))return;const r=$(s),i=t.name,a=(e=>e.slice(2))(i);r.includes(l[a])||e.report({node:t,messageId:"useLifecycleInterface",data:{interfaceName:a,methodName:i}})}})}),Tc=ne({name:"use-pipe-decorator",meta:{type:"suggestion",docs:{description:`Ensures that classes implementing PipeTransform interface use @${s.Pipe} decorator`,category:"Best Practices",recommended:!1},schema:[],messages:{usePipeDecorator:"Classes that implement the PipeTransform interface should be decorated with @"+s.Pipe}},defaultOptions:[],create:e=>({'ClassDeclaration > TSClassImplements:matches([expression.name="PipeTransform"], [expression.property.name="PipeTransform"])'(t){const n=t.parent;(e=>((e,t)=>{if(e.decorators)return e.decorators.find(e=>S(e.expression)&&e.expression.arguments&&e.expression.arguments.length>0&&"Pipe"===R(e))})(e))(n)||e.report({node:n,messageId:"usePipeDecorator"})}})}),Nc=ne({name:"use-pipe-transform-interface",meta:{type:"suggestion",docs:{description:"Ensures that Pipes implement `PipeTransform` interface",category:"Best Practices",recommended:"error"},fixable:"code",schema:[],messages:{usePipeTransformInterface:"Pipes should implement `PipeTransform` interface"}},defaultOptions:[],create:e=>({[le]({parent:t}){if(B(t).find(e=>"PipeTransform"===e))return;const{errorNode:n,implementsNodeReplace:s,implementsTextReplace:r}=function(e){const t=e.id,[n,s,r]=e.implements?[t,Pc(e.implements),", PipeTransform"]:[t,t," implements PipeTransform"];return{errorNode:n,implementsNodeReplace:s,implementsTextReplace:r}}(t);e.report({node:n,messageId:"usePipeTransformInterface",fix:e=>[Ac(t,e),e.insertTextAfter(s,r)]})}})});function Ac(e,t){const n=function(e,t){let n=e;for(;n=n.parent;)if("Program"===n.type)return n.body.find(e=>N(e)&&"@angular/core"===e.source.value);return n}(e);if(!(null==n?void 0:n.specifiers.length))return t.insertTextAfterRange([0,0],"import { PipeTransform } from '@angular/core';\n");const s=Pc(n.specifiers);return t.insertTextAfter(s,", PipeTransform")}function Pc(e){return e.slice(-1)[0]}var kc=ne({name:"pipe-prefix",meta:{type:"suggestion",docs:{description:"Enforce consistent prefix for pipes.",category:"Stylistic Issues",recommended:!1},schema:[{type:"object",properties:{prefixes:{type:"array",items:{type:"string"},minimum:1,uniqueItems:!0}},additionalProperties:!1}],messages:{pipePrefix:"@Pipe's name should be prefixed by {{prefixes}}"}},defaultOptions:[{prefixes:[]}],create:(e,[{prefixes:t}])=>({[le](n){const s=K(n,"name");if(!s)return;if(!function(e){return Array.isArray(e)&&e.length>0}(t))return;const r=t.join("|"),i=Z.prefix(r,"camelCase");let a;P(s)?a=s.value:T(s)&&s.quasis[0]&&(a=s.quasis[0].value.raw),a&&(i.apply(this,[a])||e.report({node:s,messageId:"pipePrefix",data:{prefixes:ee(t)}}))}})});module.exports={configs:{all:{extends:"./configs/base.json",rules:{"@angular-eslint/component-class-suffix":"error","@angular-eslint/component-max-inline-declarations":"error","@angular-eslint/component-selector":"error","@angular-eslint/contextual-decorator":"error","@angular-eslint/contextual-lifecycle":"error","@angular-eslint/directive-class-suffix":"error","@angular-eslint/directive-selector":"error","@angular-eslint/no-attribute-decorator":"error","@angular-eslint/no-conflicting-lifecycle":"error","@angular-eslint/no-empty-lifecycle-method":"error","@angular-eslint/no-forward-ref":"error","@angular-eslint/no-host-metadata-property":"error","@angular-eslint/no-input-prefix":"error","@angular-eslint/no-input-rename":"error","@angular-eslint/no-inputs-metadata-property":"error","@angular-eslint/no-lifecycle-call":"error","@angular-eslint/no-output-native":"error","@angular-eslint/no-output-on-prefix":"error","@angular-eslint/no-output-rename":"error","@angular-eslint/no-outputs-metadata-property":"error","@angular-eslint/no-pipe-impure":"error","@angular-eslint/no-queries-metadata-property":"error","@angular-eslint/pipe-prefix":"error","@angular-eslint/prefer-on-push-component-change-detection":"error","@angular-eslint/prefer-output-readonly":"error","@angular-eslint/relative-url-prefix":"error","@angular-eslint/use-component-selector":"error","@angular-eslint/use-component-view-encapsulation":"error","@angular-eslint/use-injectable-provided-in":"error","@angular-eslint/use-lifecycle-interface":"error","@angular-eslint/use-pipe-decorator":"error","@angular-eslint/use-pipe-transform-interface":"error"}},base:{parser:"@typescript-eslint/parser",parserOptions:{ecmaVersion:2020,sourceType:"module",project:"./tsconfig.json"},plugins:["@typescript-eslint","@angular-eslint"]},recommended:{extends:"./configs/base.json",rules:{"no-restricted-imports":["error",{paths:[{name:"rxjs/Rx",message:"Please import directly from 'rxjs' instead"}]}],"@typescript-eslint/member-ordering":["error",{default:["static-field","instance-field","static-method","instance-method"]}],"no-restricted-syntax":["error",{selector:'CallExpression[callee.object.name="console"][callee.property.name=/^(debug|info|time|timeEnd|trace)$/]',message:"Unexpected property on console object was called"}],"@typescript-eslint/no-inferrable-types":["error",{ignoreParameters:!0}],"@typescript-eslint/no-non-null-assertion":"error","no-fallthrough":"error","@angular-eslint/component-class-suffix":"error","@angular-eslint/contextual-lifecycle":"error","@angular-eslint/directive-class-suffix":"error","@angular-eslint/no-conflicting-lifecycle":"error","@angular-eslint/no-empty-lifecycle-method":"error","@angular-eslint/no-host-metadata-property":"error","@angular-eslint/no-input-rename":"error","@angular-eslint/no-inputs-metadata-property":"error","@angular-eslint/no-output-native":"error","@angular-eslint/no-output-on-prefix":"error","@angular-eslint/no-output-rename":"error","@angular-eslint/no-outputs-metadata-property":"error","@angular-eslint/use-lifecycle-interface":"warn","@angular-eslint/use-pipe-transform-interface":"error"}},"ng-cli-compat":{extends:["./configs/base.json"],env:{browser:!0,es6:!0,node:!0},plugins:["eslint-plugin-import","eslint-plugin-jsdoc","eslint-plugin-prefer-arrow"],rules:{"@typescript-eslint/interface-name-prefix":"off","@typescript-eslint/explicit-member-accessibility":"off","sort-keys":"off","@angular-eslint/component-class-suffix":"error","@angular-eslint/component-selector":["error",{type:"element",prefix:"app",style:"kebab-case"}],"@angular-eslint/contextual-lifecycle":"error","@angular-eslint/directive-class-suffix":"error","@angular-eslint/directive-selector":["error",{type:"attribute",prefix:"app",style:"camelCase"}],"@angular-eslint/no-conflicting-lifecycle":"error","@angular-eslint/no-host-metadata-property":"error","@angular-eslint/no-input-rename":"error","@angular-eslint/no-inputs-metadata-property":"error","@angular-eslint/no-output-native":"error","@angular-eslint/no-output-on-prefix":"error","@angular-eslint/no-output-rename":"error","@angular-eslint/no-outputs-metadata-property":"error","@angular-eslint/use-lifecycle-interface":"error","@angular-eslint/use-pipe-transform-interface":"error","@typescript-eslint/adjacent-overload-signatures":"error","@typescript-eslint/array-type":"off","@typescript-eslint/ban-types":["error",{types:{Object:{message:"Avoid using the `Object` type. Did you mean `object`?"},Function:{message:"Avoid using the `Function` type. Prefer a specific function type, like `() => void`."},Boolean:{message:"Avoid using the `Boolean` type. Did you mean `boolean`?"},Number:{message:"Avoid using the `Number` type. Did you mean `number`?"},String:{message:"Avoid using the `String` type. Did you mean `string`?"},Symbol:{message:"Avoid using the `Symbol` type. Did you mean `symbol`?"}}}],"@typescript-eslint/consistent-type-assertions":"error","@typescript-eslint/dot-notation":"error","@typescript-eslint/member-ordering":"error","@typescript-eslint/naming-convention":"error","@typescript-eslint/no-empty-function":"off","@typescript-eslint/no-empty-interface":"error","@typescript-eslint/no-explicit-any":"off","@typescript-eslint/no-inferrable-types":["error",{ignoreParameters:!0}],"@typescript-eslint/no-misused-new":"error","@typescript-eslint/no-namespace":"error","@typescript-eslint/no-non-null-assertion":"error","@typescript-eslint/no-parameter-properties":"off","@typescript-eslint/no-unused-expressions":"error","@typescript-eslint/no-use-before-define":"off","@typescript-eslint/no-var-requires":"off","@typescript-eslint/prefer-for-of":"error","@typescript-eslint/prefer-function-type":"error","@typescript-eslint/prefer-namespace-keyword":"error","@typescript-eslint/triple-slash-reference":["error",{path:"always",types:"prefer-import",lib:"always"}],"@typescript-eslint/unified-signatures":"error",complexity:"off","constructor-super":"error",eqeqeq:["error","smart"],"guard-for-in":"error","id-blacklist":["error","any","Number","number","String","string","Boolean","boolean","Undefined","undefined"],"id-match":"error","import/no-deprecated":"warn","jsdoc/newline-after-description":"error","jsdoc/no-types":"error","max-classes-per-file":"off","no-bitwise":"error","no-caller":"error","no-cond-assign":"error","no-console":["error",{allow:["log","warn","dir","timeLog","assert","clear","count","countReset","group","groupEnd","table","dirxml","error","groupCollapsed","Console","profile","profileEnd","timeStamp","context"]}],"no-debugger":"error","no-empty":"off","no-eval":"error","no-fallthrough":"error","no-invalid-this":"off","no-new-wrappers":"error","no-restricted-imports":["error",{name:"rxjs/Rx",message:"Please import directly from 'rxjs' instead"}],"no-shadow":["error",{hoist:"all"}],"no-throw-literal":"error","no-undef-init":"error","no-underscore-dangle":"error","no-unsafe-finally":"error","no-unused-labels":"error","no-var":"error","object-shorthand":"error","one-var":["error","never"],"prefer-arrow/prefer-arrow-functions":"error","prefer-const":"error",radix:"error","use-isnan":"error","valid-typeof":"off"}},"ng-cli-compat--formatting-add-on":{plugins:["eslint-plugin-jsdoc"],rules:{"arrow-body-style":"error","arrow-parens":"off","comma-dangle":"off",curly:"error","eol-last":"error","jsdoc/check-alignment":"error","max-len":["error",{code:140}],"new-parens":"error","no-multiple-empty-lines":"off","no-trailing-spaces":"error","quote-props":["error","as-needed"],"space-before-function-paren":["error",{anonymous:"never",asyncArrow:"always",named:"never"}],"@typescript-eslint/member-delimiter-style":["error",{multiline:{delimiter:"semi",requireLast:!0},singleline:{delimiter:"semi",requireLast:!1}}],quotes:"off","@typescript-eslint/quotes":["error","single",{allowTemplateLiterals:!0}],"@typescript-eslint/semi":["error","always"],"@typescript-eslint/type-annotation-spacing":"error"}}},rules:{"contextual-decorator":se,"component-class-suffix":ce,"component-max-inline-declarations":de,"component-selector":Gl,"contextual-lifecycle":Ql,"directive-class-suffix":Yl,"directive-selector":Zl,"no-attribute-decorator":Jl,"no-conflicting-lifecycle":nc,"no-forward-ref":sc,"no-host-metadata-property":rc,"no-input-prefix":ic,"no-input-rename":oc,"no-inputs-metadata-property":lc,"no-lifecycle-call":cc,"no-output-native":uc,"no-output-on-prefix":hc,"no-output-rename":dc,"no-outputs-metadata-property":mc,"no-pipe-impure":gc,"no-queries-metadata-property":fc,"no-empty-lifecycle-method":vc,[yc]:xc,"prefer-output-readonly":Sc,"relative-url-prefix":_c,"use-component-selector":Cc,"use-component-view-encapsulation":wc,"use-injectable-provided-in":bc,"use-lifecycle-interface":Ic,"use-pipe-decorator":Tc,"use-pipe-transform-interface":Nc,"pipe-prefix":kc}};
|