prettier 3.0.0-alpha.1 → 3.0.0-alpha.10

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.
Files changed (57) hide show
  1. package/LICENSE +910 -759
  2. package/README.md +3 -3
  3. package/bin/prettier.cjs +0 -0
  4. package/doc.d.ts +240 -0
  5. package/doc.js +351 -479
  6. package/doc.mjs +342 -474
  7. package/index.cjs +400 -230
  8. package/index.d.ts +921 -0
  9. package/index.mjs +17218 -32209
  10. package/internal/cli.mjs +4374 -10823
  11. package/internal/internal.mjs +6437 -0
  12. package/package.json +55 -13
  13. package/plugins/acorn.d.ts +6 -0
  14. package/plugins/acorn.js +13 -0
  15. package/plugins/acorn.mjs +13 -0
  16. package/plugins/angular.d.ts +8 -0
  17. package/plugins/angular.js +2 -2
  18. package/plugins/angular.mjs +2 -2
  19. package/plugins/babel.d.ts +17 -0
  20. package/plugins/babel.js +12 -12
  21. package/plugins/babel.mjs +12 -12
  22. package/plugins/estree.d.ts +0 -0
  23. package/plugins/estree.js +35 -0
  24. package/plugins/estree.mjs +35 -0
  25. package/plugins/flow.d.ts +5 -0
  26. package/plugins/flow.js +20 -20
  27. package/plugins/flow.mjs +20 -20
  28. package/plugins/glimmer.d.ts +5 -0
  29. package/plugins/glimmer.js +22 -17
  30. package/plugins/glimmer.mjs +22 -17
  31. package/plugins/graphql.d.ts +5 -0
  32. package/plugins/graphql.js +16 -7
  33. package/plugins/graphql.mjs +16 -7
  34. package/plugins/html.d.ts +8 -0
  35. package/plugins/html.js +19 -29
  36. package/plugins/html.mjs +19 -29
  37. package/plugins/markdown.d.ts +7 -0
  38. package/plugins/markdown.js +54 -34
  39. package/plugins/markdown.mjs +54 -34
  40. package/plugins/meriyah.d.ts +5 -0
  41. package/plugins/meriyah.js +5 -6
  42. package/plugins/meriyah.mjs +5 -6
  43. package/plugins/postcss.d.ts +7 -0
  44. package/plugins/postcss.js +45 -43
  45. package/plugins/postcss.mjs +45 -43
  46. package/plugins/typescript.d.ts +5 -0
  47. package/plugins/typescript.js +24 -239
  48. package/plugins/typescript.mjs +24 -239
  49. package/plugins/yaml.d.ts +5 -0
  50. package/plugins/yaml.js +148 -135
  51. package/plugins/yaml.mjs +148 -135
  52. package/standalone.d.ts +33 -0
  53. package/standalone.js +35 -105
  54. package/standalone.mjs +35 -105
  55. package/internal/third-party.mjs +0 -9071
  56. package/plugins/acorn-and-espree.js +0 -13
  57. package/plugins/acorn-and-espree.mjs +0 -13
@@ -1,2 +1,2 @@
1
- (function(e){function n(i){var l=i();return l.default}if(typeof exports=="object"&&typeof module=="object")module.exports=n(e);else if(typeof define=="function"&&define.amd)define(function(){return n(e)});else{var t=typeof globalThis<"u"?globalThis:typeof global<"u"?global:typeof self<"u"?self:this||{};t.prettierPlugins=t.prettierPlugins||{},t.prettierPlugins.angular=n(e)}})(function(){"use strict";var cs=Object.create;var be=Object.defineProperty;var hs=Object.getOwnPropertyDescriptor;var ps=Object.getOwnPropertyNames;var us=Object.getPrototypeOf,ls=Object.prototype.hasOwnProperty;var j=(r,e)=>()=>(r&&(e=r(r=0)),e);var le=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports),Be=(r,e)=>{for(var t in e)be(r,t,{get:e[t],enumerable:!0})},Pt=(r,e,t,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of ps(e))!ls.call(r,n)&&n!==t&&be(r,n,{get:()=>e[n],enumerable:!(s=hs(e,n))||s.enumerable});return r};var ds=(r,e,t)=>(t=r!=null?cs(us(r)):{},Pt(e||!r||!r.__esModule?be(t,"default",{value:r,enumerable:!0}):t,r)),we=r=>Pt(be({},"__esModule",{value:!0}),r);var m=j(()=>{});var bt=le(ye=>{"use strict";m();ye.__esModule=!0;ye.LinesAndColumns=void 0;var Te=`
2
- `,Lt="\r",_t=function(){function r(e){this.string=e;for(var t=[0],s=0;s<e.length;)switch(e[s]){case Te:s+=Te.length,t.push(s);break;case Lt:s+=Lt.length,e[s]===Te&&(s+=Te.length),t.push(s);break;default:s++;break}this.offsets=t}return r.prototype.locationForIndex=function(e){if(e<0||e>this.string.length)return null;for(var t=0,s=this.offsets;s[t+1]<=e;)t++;var n=e-s[t];return{line:t,column:n}},r.prototype.indexForLocation=function(e){var t=e.line,s=e.column;return t<0||t>=this.offsets.length||s<0||s>this.lengthOfLine(t)?null:this.offsets[t]+s},r.prototype.lengthOfLine=function(e){var t=this.offsets[e],s=e===this.offsets.length-1?this.string.length:this.offsets[e+1];return s-t},r}();ye.LinesAndColumns=_t;ye.default=_t});var Bt=le(Ke=>{"use strict";m();Object.defineProperty(Ke,"__esModule",{value:!0});Ke.Context=void 0;var fs=bt(),Ye=class{constructor(e){this.text=e,this.locator=new et(this.text)}};Ke.Context=Ye;var et=class{constructor(e){this._lineAndColumn=new fs.default(e)}locationForIndex(e){let{line:t,column:s}=this._lineAndColumn.locationForIndex(e);return{line:t+1,column:s}}}});var ot={};Be(ot,{AST:()=>E,ASTWithName:()=>M,ASTWithSource:()=>K,AbsoluteSourceSpan:()=>B,AstMemoryEfficientTransformer:()=>st,AstTransformer:()=>tt,Binary:()=>I,BindingPipe:()=>Y,BoundElementProperty:()=>at,Chain:()=>V,Conditional:()=>q,EmptyExpr:()=>R,ExpressionBinding:()=>Ae,FunctionCall:()=>oe,ImplicitReceiver:()=>W,Interpolation:()=>se,KeyedRead:()=>X,KeyedWrite:()=>J,LiteralArray:()=>ee,LiteralMap:()=>te,LiteralPrimitive:()=>P,MethodCall:()=>ie,NonNullAssert:()=>ne,ParseSpan:()=>T,ParsedEvent:()=>nt,ParsedProperty:()=>rt,ParsedPropertyType:()=>$e,ParsedVariable:()=>it,ParserError:()=>Q,PrefixNot:()=>re,PropertyRead:()=>F,PropertyWrite:()=>H,Quote:()=>de,RecursiveAstVisitor:()=>Ce,SafeKeyedRead:()=>Z,SafeMethodCall:()=>ae,SafePropertyRead:()=>z,ThisReceiver:()=>Ee,Unary:()=>L,VariableBinding:()=>xe});var Q,T,E,M,de,R,W,Ee,V,q,F,H,z,X,Z,J,Y,P,ee,te,se,I,L,re,ne,ie,ae,oe,B,K,xe,Ae,Ce,tt,st,rt,$e,nt,it,at,Me=j(()=>{m();Q=class{constructor(e,t,s,n){this.input=t,this.errLocation=s,this.ctxLocation=n,this.message=`Parser Error: ${e} ${s} [${t}] in ${n}`}},T=class{constructor(e,t){this.start=e,this.end=t}toAbsolute(e){return new B(e+this.start,e+this.end)}},E=class{constructor(e,t){this.span=e,this.sourceSpan=t}toString(){return"AST"}},M=class extends E{constructor(e,t,s){super(e,t),this.nameSpan=s}},de=class extends E{constructor(e,t,s,n,i){super(e,t),this.prefix=s,this.uninterpretedExpression=n,this.location=i}visit(e,t=null){return e.visitQuote(this,t)}toString(){return"Quote"}},R=class extends E{visit(e,t=null){}},W=class extends E{visit(e,t=null){return e.visitImplicitReceiver(this,t)}},Ee=class extends W{visit(e,t=null){var s;return(s=e.visitThisReceiver)===null||s===void 0?void 0:s.call(e,this,t)}},V=class extends E{constructor(e,t,s){super(e,t),this.expressions=s}visit(e,t=null){return e.visitChain(this,t)}},q=class extends E{constructor(e,t,s,n,i){super(e,t),this.condition=s,this.trueExp=n,this.falseExp=i}visit(e,t=null){return e.visitConditional(this,t)}},F=class extends M{constructor(e,t,s,n,i){super(e,t,s),this.receiver=n,this.name=i}visit(e,t=null){return e.visitPropertyRead(this,t)}},H=class extends M{constructor(e,t,s,n,i,a){super(e,t,s),this.receiver=n,this.name=i,this.value=a}visit(e,t=null){return e.visitPropertyWrite(this,t)}},z=class extends M{constructor(e,t,s,n,i){super(e,t,s),this.receiver=n,this.name=i}visit(e,t=null){return e.visitSafePropertyRead(this,t)}},X=class extends E{constructor(e,t,s,n){super(e,t),this.receiver=s,this.key=n}visit(e,t=null){return e.visitKeyedRead(this,t)}},Z=class extends E{constructor(e,t,s,n){super(e,t),this.receiver=s,this.key=n}visit(e,t=null){return e.visitSafeKeyedRead(this,t)}},J=class extends E{constructor(e,t,s,n,i){super(e,t),this.receiver=s,this.key=n,this.value=i}visit(e,t=null){return e.visitKeyedWrite(this,t)}},Y=class extends M{constructor(e,t,s,n,i,a){super(e,t,a),this.exp=s,this.name=n,this.args=i}visit(e,t=null){return e.visitPipe(this,t)}},P=class extends E{constructor(e,t,s){super(e,t),this.value=s}visit(e,t=null){return e.visitLiteralPrimitive(this,t)}},ee=class extends E{constructor(e,t,s){super(e,t),this.expressions=s}visit(e,t=null){return e.visitLiteralArray(this,t)}},te=class extends E{constructor(e,t,s,n){super(e,t),this.keys=s,this.values=n}visit(e,t=null){return e.visitLiteralMap(this,t)}},se=class extends E{constructor(e,t,s,n){super(e,t),this.strings=s,this.expressions=n}visit(e,t=null){return e.visitInterpolation(this,t)}},I=class extends E{constructor(e,t,s,n,i){super(e,t),this.operation=s,this.left=n,this.right=i}visit(e,t=null){return e.visitBinary(this,t)}},L=class extends I{constructor(e,t,s,n,i,a,h){super(e,t,i,a,h),this.operator=s,this.expr=n}static createMinus(e,t,s){return new L(e,t,"-",s,"-",new P(e,t,0),s)}static createPlus(e,t,s){return new L(e,t,"+",s,"-",s,new P(e,t,0))}visit(e,t=null){return e.visitUnary!==void 0?e.visitUnary(this,t):e.visitBinary(this,t)}},re=class extends E{constructor(e,t,s){super(e,t),this.expression=s}visit(e,t=null){return e.visitPrefixNot(this,t)}},ne=class extends E{constructor(e,t,s){super(e,t),this.expression=s}visit(e,t=null){return e.visitNonNullAssert(this,t)}},ie=class extends M{constructor(e,t,s,n,i,a,h){super(e,t,s),this.receiver=n,this.name=i,this.args=a,this.argumentSpan=h}visit(e,t=null){return e.visitMethodCall(this,t)}},ae=class extends M{constructor(e,t,s,n,i,a,h){super(e,t,s),this.receiver=n,this.name=i,this.args=a,this.argumentSpan=h}visit(e,t=null){return e.visitSafeMethodCall(this,t)}},oe=class extends E{constructor(e,t,s,n){super(e,t),this.target=s,this.args=n}visit(e,t=null){return e.visitFunctionCall(this,t)}},B=class{constructor(e,t){this.start=e,this.end=t}},K=class extends E{constructor(e,t,s,n,i){super(new T(0,t===null?0:t.length),new B(n,t===null?n:n+t.length)),this.ast=e,this.source=t,this.location=s,this.errors=i}visit(e,t=null){return e.visitASTWithSource?e.visitASTWithSource(this,t):this.ast.visit(e,t)}toString(){return`${this.source} in ${this.location}`}},xe=class{constructor(e,t,s){this.sourceSpan=e,this.key=t,this.value=s}},Ae=class{constructor(e,t,s){this.sourceSpan=e,this.key=t,this.value=s}},Ce=class{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.receiver,t),this.visit(e.key,t)}visitKeyedWrite(e,t){this.visit(e.receiver,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)}visitSafeKeyedRead(e,t){this.visit(e.receiver,t),this.visit(e.key,t)}visitQuote(e,t){}visitAll(e,t){for(let s of e)this.visit(s,t)}},tt=class{visitImplicitReceiver(e,t){return e}visitThisReceiver(e,t){return e}visitInterpolation(e,t){return new se(e.span,e.sourceSpan,e.strings,this.visitAll(e.expressions))}visitLiteralPrimitive(e,t){return new P(e.span,e.sourceSpan,e.value)}visitPropertyRead(e,t){return new F(e.span,e.sourceSpan,e.nameSpan,e.receiver.visit(this),e.name)}visitPropertyWrite(e,t){return new H(e.span,e.sourceSpan,e.nameSpan,e.receiver.visit(this),e.name,e.value.visit(this))}visitSafePropertyRead(e,t){return new z(e.span,e.sourceSpan,e.nameSpan,e.receiver.visit(this),e.name)}visitMethodCall(e,t){return new ie(e.span,e.sourceSpan,e.nameSpan,e.receiver.visit(this),e.name,this.visitAll(e.args),e.argumentSpan)}visitSafeMethodCall(e,t){return new ae(e.span,e.sourceSpan,e.nameSpan,e.receiver.visit(this),e.name,this.visitAll(e.args),e.argumentSpan)}visitFunctionCall(e,t){return new oe(e.span,e.sourceSpan,e.target.visit(this),this.visitAll(e.args))}visitLiteralArray(e,t){return new ee(e.span,e.sourceSpan,this.visitAll(e.expressions))}visitLiteralMap(e,t){return new te(e.span,e.sourceSpan,e.keys,this.visitAll(e.values))}visitUnary(e,t){switch(e.operator){case"+":return L.createPlus(e.span,e.sourceSpan,e.expr.visit(this));case"-":return L.createMinus(e.span,e.sourceSpan,e.expr.visit(this));default:throw new Error(`Unknown unary operator ${e.operator}`)}}visitBinary(e,t){return new I(e.span,e.sourceSpan,e.operation,e.left.visit(this),e.right.visit(this))}visitPrefixNot(e,t){return new re(e.span,e.sourceSpan,e.expression.visit(this))}visitNonNullAssert(e,t){return new ne(e.span,e.sourceSpan,e.expression.visit(this))}visitConditional(e,t){return new q(e.span,e.sourceSpan,e.condition.visit(this),e.trueExp.visit(this),e.falseExp.visit(this))}visitPipe(e,t){return new Y(e.span,e.sourceSpan,e.exp.visit(this),e.name,this.visitAll(e.args),e.nameSpan)}visitKeyedRead(e,t){return new X(e.span,e.sourceSpan,e.receiver.visit(this),e.key.visit(this))}visitKeyedWrite(e,t){return new J(e.span,e.sourceSpan,e.receiver.visit(this),e.key.visit(this),e.value.visit(this))}visitAll(e){let t=[];for(let s=0;s<e.length;++s)t[s]=e[s].visit(this);return t}visitChain(e,t){return new V(e.span,e.sourceSpan,this.visitAll(e.expressions))}visitQuote(e,t){return new de(e.span,e.sourceSpan,e.prefix,e.uninterpretedExpression,e.location)}visitSafeKeyedRead(e,t){return new Z(e.span,e.sourceSpan,e.receiver.visit(this),e.key.visit(this))}},st=class{visitImplicitReceiver(e,t){return e}visitThisReceiver(e,t){return e}visitInterpolation(e,t){let s=this.visitAll(e.expressions);return s!==e.expressions?new se(e.span,e.sourceSpan,e.strings,s):e}visitLiteralPrimitive(e,t){return e}visitPropertyRead(e,t){let s=e.receiver.visit(this);return s!==e.receiver?new F(e.span,e.sourceSpan,e.nameSpan,s,e.name):e}visitPropertyWrite(e,t){let s=e.receiver.visit(this),n=e.value.visit(this);return s!==e.receiver||n!==e.value?new H(e.span,e.sourceSpan,e.nameSpan,s,e.name,n):e}visitSafePropertyRead(e,t){let s=e.receiver.visit(this);return s!==e.receiver?new z(e.span,e.sourceSpan,e.nameSpan,s,e.name):e}visitMethodCall(e,t){let s=e.receiver.visit(this),n=this.visitAll(e.args);return s!==e.receiver||n!==e.args?new ie(e.span,e.sourceSpan,e.nameSpan,s,e.name,n,e.argumentSpan):e}visitSafeMethodCall(e,t){let s=e.receiver.visit(this),n=this.visitAll(e.args);return s!==e.receiver||n!==e.args?new ae(e.span,e.sourceSpan,e.nameSpan,s,e.name,n,e.argumentSpan):e}visitFunctionCall(e,t){let s=e.target&&e.target.visit(this),n=this.visitAll(e.args);return s!==e.target||n!==e.args?new oe(e.span,e.sourceSpan,s,n):e}visitLiteralArray(e,t){let s=this.visitAll(e.expressions);return s!==e.expressions?new ee(e.span,e.sourceSpan,s):e}visitLiteralMap(e,t){let s=this.visitAll(e.values);return s!==e.values?new te(e.span,e.sourceSpan,e.keys,s):e}visitUnary(e,t){let s=e.expr.visit(this);if(s!==e.expr)switch(e.operator){case"+":return L.createPlus(e.span,e.sourceSpan,s);case"-":return L.createMinus(e.span,e.sourceSpan,s);default:throw new Error(`Unknown unary operator ${e.operator}`)}return e}visitBinary(e,t){let s=e.left.visit(this),n=e.right.visit(this);return s!==e.left||n!==e.right?new I(e.span,e.sourceSpan,e.operation,s,n):e}visitPrefixNot(e,t){let s=e.expression.visit(this);return s!==e.expression?new re(e.span,e.sourceSpan,s):e}visitNonNullAssert(e,t){let s=e.expression.visit(this);return s!==e.expression?new ne(e.span,e.sourceSpan,s):e}visitConditional(e,t){let s=e.condition.visit(this),n=e.trueExp.visit(this),i=e.falseExp.visit(this);return s!==e.condition||n!==e.trueExp||i!==e.falseExp?new q(e.span,e.sourceSpan,s,n,i):e}visitPipe(e,t){let s=e.exp.visit(this),n=this.visitAll(e.args);return s!==e.exp||n!==e.args?new Y(e.span,e.sourceSpan,s,e.name,n,e.nameSpan):e}visitKeyedRead(e,t){let s=e.receiver.visit(this),n=e.key.visit(this);return s!==e.receiver||n!==e.key?new X(e.span,e.sourceSpan,s,n):e}visitKeyedWrite(e,t){let s=e.receiver.visit(this),n=e.key.visit(this),i=e.value.visit(this);return s!==e.receiver||n!==e.key||i!==e.value?new J(e.span,e.sourceSpan,s,n,i):e}visitAll(e){let t=[],s=!1;for(let n=0;n<e.length;++n){let i=e[n],a=i.visit(this);t[n]=a,s=s||a!==i}return s?t:e}visitChain(e,t){let s=this.visitAll(e.expressions);return s!==e.expressions?new V(e.span,e.sourceSpan,s):e}visitQuote(e,t){return e}visitSafeKeyedRead(e,t){let s=e.receiver.visit(this),n=e.key.visit(this);return s!==e.receiver||n!==e.key?new Z(e.span,e.sourceSpan,s,n):e}},rt=class{constructor(e,t,s,n,i,a){this.name=e,this.expression=t,this.type=s,this.sourceSpan=n,this.keySpan=i,this.valueSpan=a,this.isLiteral=this.type===$e.LITERAL_ATTR,this.isAnimation=this.type===$e.ANIMATION}};(function(r){r[r.DEFAULT=0]="DEFAULT",r[r.LITERAL_ATTR=1]="LITERAL_ATTR",r[r.ANIMATION=2]="ANIMATION"})($e||($e={}));nt=class{constructor(e,t,s,n,i,a,h){this.name=e,this.targetOrPhase=t,this.type=s,this.handler=n,this.sourceSpan=i,this.handlerSpan=a,this.keySpan=h}},it=class{constructor(e,t,s,n,i){this.name=e,this.value=t,this.sourceSpan=s,this.keySpan=n,this.valueSpan=i}},at=class{constructor(e,t,s,n,i,a,h,x){this.name=e,this.type=t,this.securityContext=s,this.value=n,this.unit=i,this.sourceSpan=a,this.keySpan=h,this.valueSpan=x}}});function Tt(r){return r>=9&&r<=32||r==160}function U(r){return 48<=r&&r<=57}function Kt(r){return r>=97&&r<=122||r>=65&&r<=90}function ct(r){return r===39||r===34||r===96}var ht=j(()=>{m();});var Vt={};Be(Vt,{EOF:()=>Pe,Lexer:()=>ut,Token:()=>_,TokenType:()=>f,isIdentifier:()=>ft});function Dt(r,e,t){return new _(r,e,f.Character,t,String.fromCharCode(t))}function Vs(r,e,t){return new _(r,e,f.Identifier,0,t)}function qs(r,e,t){return new _(r,e,f.PrivateIdentifier,0,t)}function Hs(r,e,t){return new _(r,e,f.Keyword,0,t)}function pt(r,e,t){return new _(r,e,f.Operator,0,t)}function zs(r,e,t){return new _(r,e,f.String,0,t)}function Xs(r,e,t){return new _(r,e,f.Number,t,"")}function Zs(r,e,t){return new _(r,e,f.Error,0,t)}function lt(r){return 97<=r&&r<=122||65<=r&&r<=90||r==95||r==36}function ft(r){if(r.length==0)return!1;let e=new Ge(r);if(!lt(e.peek))return!1;for(e.advance();e.peek!==0;){if(!dt(e.peek))return!1;e.advance()}return!0}function dt(r){return Kt(r)||U(r)||r==95||r==36}function Js(r){return r==101||r==69}function Ys(r){return r==45||r==43}function er(r){switch(r){case 110:return 10;case 102:return 12;case 114:return 13;case 116:return 9;case 118:return 11;default:return r}}function tr(r){let e=parseInt(r);if(isNaN(e))throw new Error("Invalid integer literal when parsing "+r);return e}var f,Ws,ut,_,Pe,Ge,vt=j(()=>{m();ht();(function(r){r[r.Character=0]="Character",r[r.Identifier=1]="Identifier",r[r.PrivateIdentifier=2]="PrivateIdentifier",r[r.Keyword=3]="Keyword",r[r.String=4]="String",r[r.Operator=5]="Operator",r[r.Number=6]="Number",r[r.Error=7]="Error"})(f||(f={}));Ws=["var","let","as","null","undefined","true","false","if","else","this"],ut=class{tokenize(e){let t=new Ge(e),s=[],n=t.scanToken();for(;n!=null;)s.push(n),n=t.scanToken();return s}},_=class{constructor(e,t,s,n,i){this.index=e,this.end=t,this.type=s,this.numValue=n,this.strValue=i}isCharacter(e){return this.type==f.Character&&this.numValue==e}isNumber(){return this.type==f.Number}isString(){return this.type==f.String}isOperator(e){return this.type==f.Operator&&this.strValue==e}isIdentifier(){return this.type==f.Identifier}isPrivateIdentifier(){return this.type==f.PrivateIdentifier}isKeyword(){return this.type==f.Keyword}isKeywordLet(){return this.type==f.Keyword&&this.strValue=="let"}isKeywordAs(){return this.type==f.Keyword&&this.strValue=="as"}isKeywordNull(){return this.type==f.Keyword&&this.strValue=="null"}isKeywordUndefined(){return this.type==f.Keyword&&this.strValue=="undefined"}isKeywordTrue(){return this.type==f.Keyword&&this.strValue=="true"}isKeywordFalse(){return this.type==f.Keyword&&this.strValue=="false"}isKeywordThis(){return this.type==f.Keyword&&this.strValue=="this"}isError(){return this.type==f.Error}toNumber(){return this.type==f.Number?this.numValue:-1}toString(){switch(this.type){case f.Character:case f.Identifier:case f.Keyword:case f.Operator:case f.PrivateIdentifier:case f.String:case f.Error:return this.strValue;case f.Number:return this.numValue.toString();default:return null}}};Pe=new _(-1,-1,f.Character,0,""),Ge=class{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(){let e=this.input,t=this.length,s=this.peek,n=this.index;for(;s<=32;)if(++n>=t){s=0;break}else s=e.charCodeAt(n);if(this.peek=s,this.index=n,n>=t)return null;if(lt(s))return this.scanIdentifier();if(U(s))return this.scanNumber(n);let i=n;switch(s){case 46:return this.advance(),U(this.peek)?this.scanNumber(i):Dt(i,this.index,46);case 40:case 41:case 123:case 125:case 91:case 93:case 44:case 58:case 59:return this.scanCharacter(i,s);case 39:case 34:return this.scanString();case 35:return this.scanPrivateIdentifier();case 43:case 45:case 42:case 47:case 37:case 94:return this.scanOperator(i,String.fromCharCode(s));case 63:return this.scanQuestion(i);case 60:case 62:return this.scanComplexOperator(i,String.fromCharCode(s),61,"=");case 33:case 61:return this.scanComplexOperator(i,String.fromCharCode(s),61,"=",61,"=");case 38:return this.scanComplexOperator(i,"&",38,"&");case 124:return this.scanComplexOperator(i,"|",124,"|");case 160:for(;Tt(this.peek);)this.advance();return this.scanToken()}return this.advance(),this.error(`Unexpected character [${String.fromCharCode(s)}]`,0)}scanCharacter(e,t){return this.advance(),Dt(e,this.index,t)}scanOperator(e,t){return this.advance(),pt(e,this.index,t)}scanComplexOperator(e,t,s,n,i,a){this.advance();let h=t;return this.peek==s&&(this.advance(),h+=n),i!=null&&this.peek==i&&(this.advance(),h+=a),pt(e,this.index,h)}scanIdentifier(){let e=this.index;for(this.advance();dt(this.peek);)this.advance();let t=this.input.substring(e,this.index);return Ws.indexOf(t)>-1?Hs(e,this.index,t):Vs(e,this.index,t)}scanPrivateIdentifier(){let e=this.index;if(this.advance(),!lt(this.peek))return this.error("Invalid character [#]",-1);for(;dt(this.peek);)this.advance();let t=this.input.substring(e,this.index);return qs(e,this.index,t)}scanNumber(e){let t=this.index===e,s=!1;for(this.advance();;){if(!U(this.peek))if(this.peek===95){if(!U(this.input.charCodeAt(this.index-1))||!U(this.input.charCodeAt(this.index+1)))return this.error("Invalid numeric separator",0);s=!0}else if(this.peek===46)t=!1;else if(Js(this.peek)){if(this.advance(),Ys(this.peek)&&this.advance(),!U(this.peek))return this.error("Invalid exponent",-1);t=!1}else break;this.advance()}let n=this.input.substring(e,this.index);s&&(n=n.replace(/_/g,""));let i=t?tr(n):parseFloat(n);return Xs(e,this.index,i)}scanString(){let e=this.index,t=this.peek;this.advance();let s="",n=this.index,i=this.input;for(;this.peek!=t;)if(this.peek==92){s+=i.substring(n,this.index),this.advance();let h;if(this.peek=this.peek,this.peek==117){let x=i.substring(this.index+1,this.index+5);if(/^[0-9a-f]+$/i.test(x))h=parseInt(x,16);else return this.error(`Invalid unicode escape [\\u${x}]`,0);for(let v=0;v<5;v++)this.advance()}else h=er(this.peek),this.advance();s+=String.fromCharCode(h),n=this.index}else{if(this.peek==0)return this.error("Unterminated quote",0);this.advance()}let a=i.substring(n,this.index);return this.advance(),zs(e,this.index,s+a)}scanQuestion(e){this.advance();let t="?";return(this.peek===63||this.peek===46)&&(t+=this.peek===46?".":"?",this.advance()),pt(e,this.index,t)}error(e,t){let s=this.index+t;return Zs(s,this.index,`Lexer Error: ${e} at column ${s} in expression [${this.input}]`)}}});function qt(r,e){if(e!=null&&!(Array.isArray(e)&&e.length==2))throw new Error(`Expected '${r}' to be an array, [start, end].`);if(e!=null){let t=e[0],s=e[1];sr.forEach(n=>{if(n.test(t)||n.test(s))throw new Error(`['${t}', '${s}'] contains unusable interpolation symbol.`)})}}var sr,Ht=j(()=>{m();sr=[/^\s*$/,/[<>]/,/^[{}]$/,/&(#|[a-z])/i,/^\/\//]});var Ie,ue,zt=j(()=>{m();Ht();Ie=class{constructor(e,t){this.start=e,this.end=t}static fromArray(e){return e?(qt("interpolation",e),new Ie(e[0],e[1])):ue}},ue=new Ie("{{","}}")});var Xt={};Be(Xt,{IvyParser:()=>gt,Parser:()=>Ve,SplitInterpolation:()=>Qe,TemplateBindingParseResult:()=>We,_ParseAST:()=>G});var Qe,We,Ve,gt,me,G,mt,St,Zt=j(()=>{m();ht();zt();Me();vt();Qe=class{constructor(e,t,s){this.strings=e,this.expressions=t,this.offsets=s}},We=class{constructor(e,t,s){this.templateBindings=e,this.warnings=t,this.errors=s}},Ve=class{constructor(e){this._lexer=e,this.errors=[],this.simpleExpressionChecker=mt}parseAction(e,t,s,n=ue){this._checkNoInterpolation(e,t,n);let i=this._stripComments(e),a=this._lexer.tokenize(this._stripComments(e)),h=new G(e,t,s,a,i.length,!0,this.errors,e.length-i.length).parseChain();return new K(h,e,t,s,this.errors)}parseBinding(e,t,s,n=ue){let i=this._parseBindingAst(e,t,s,n);return new K(i,e,t,s,this.errors)}checkSimpleExpression(e){let t=new this.simpleExpressionChecker;return e.visit(t),t.errors}parseSimpleBinding(e,t,s,n=ue){let i=this._parseBindingAst(e,t,s,n),a=this.checkSimpleExpression(i);return a.length>0&&this._reportError(`Host binding expression cannot contain ${a.join(" ")}`,e,t),new K(i,e,t,s,this.errors)}_reportError(e,t,s,n){this.errors.push(new Q(e,t,s,n))}_parseBindingAst(e,t,s,n){let i=this._parseQuote(e,t,s);if(i!=null)return i;this._checkNoInterpolation(e,t,n);let a=this._stripComments(e),h=this._lexer.tokenize(a);return new G(e,t,s,h,a.length,!1,this.errors,e.length-a.length).parseChain()}_parseQuote(e,t,s){if(e==null)return null;let n=e.indexOf(":");if(n==-1)return null;let i=e.substring(0,n).trim();if(!ft(i))return null;let a=e.substring(n+1),h=new T(0,e.length);return new de(h,h.toAbsolute(s),i,a,t)}parseTemplateBindings(e,t,s,n,i){let a=this._lexer.tokenize(t);return new G(t,s,i,a,t.length,!1,this.errors,0).parseTemplateBindings({source:e,span:new B(n,n+e.length)})}parseInterpolation(e,t,s,n=ue){let{strings:i,expressions:a,offsets:h}=this.splitInterpolation(e,t,n);if(a.length===0)return null;let x=[];for(let v=0;v<a.length;++v){let A=a[v].text,N=this._stripComments(A),O=this._lexer.tokenize(N),w=new G(e,t,s,O,N.length,!1,this.errors,h[v]+(A.length-N.length)).parseChain();x.push(w)}return this.createInterpolationAst(i.map(v=>v.text),x,e,t,s)}parseInterpolationExpression(e,t,s){let n=this._stripComments(e),i=this._lexer.tokenize(n),a=new G(e,t,s,i,n.length,!1,this.errors,0).parseChain(),h=["",""];return this.createInterpolationAst(h,[a],e,t,s)}createInterpolationAst(e,t,s,n,i){let a=new T(0,s.length),h=new se(a,a.toAbsolute(i),e,t);return new K(h,s,n,i,this.errors)}splitInterpolation(e,t,s=ue){let n=[],i=[],a=[],h=0,x=!1,v=!1,{start:A,end:N}=s;for(;h<e.length;)if(x){let O=h,w=O+A.length,C=this._getInterpolationEndIndex(e,N,w);if(C===-1){x=!1,v=!0;break}let c=C+N.length,o=e.substring(w,C);o.trim().length===0&&this._reportError("Blank expressions are not allowed in interpolated strings",e,`at column ${h} in`,t),i.push({text:o,start:O,end:c}),a.push(w),h=c,x=!1}else{let O=h;h=e.indexOf(A,h),h===-1&&(h=e.length);let w=e.substring(O,h);n.push({text:w,start:O,end:h}),x=!0}if(!x)if(v){let O=n[n.length-1];O.text+=e.substring(h),O.end=e.length}else n.push({text:e.substring(h),start:h,end:e.length});return new Qe(n,i,a)}wrapLiteralPrimitive(e,t,s){let n=new T(0,e==null?0:e.length);return new K(new P(n,n.toAbsolute(s),e),e,t,s,this.errors)}_stripComments(e){let t=this._commentStart(e);return t!=null?e.substring(0,t).trim():e}_commentStart(e){let t=null;for(let s=0;s<e.length-1;s++){let n=e.charCodeAt(s),i=e.charCodeAt(s+1);if(n===47&&i==47&&t==null)return s;t===n?t=null:t==null&&ct(n)&&(t=n)}return null}_checkNoInterpolation(e,t,{start:s,end:n}){let i=-1,a=-1;for(let h of this._forEachUnquotedChar(e,0))if(i===-1)e.startsWith(s)&&(i=h);else if(a=this._getInterpolationEndIndex(e,n,h),a>-1)break;i>-1&&a>-1&&this._reportError(`Got interpolation (${s}${n}) where expression was expected`,e,`at column ${i} in`,t)}_getInterpolationEndIndex(e,t,s){for(let n of this._forEachUnquotedChar(e,s)){if(e.startsWith(t,n))return n;if(e.startsWith("//",n))return e.indexOf(t,n)}return-1}*_forEachUnquotedChar(e,t){let s=null,n=0;for(let i=t;i<e.length;i++){let a=e[i];ct(e.charCodeAt(i))&&(s===null||s===a)&&n%2===0?s=s===null?a:null:s===null&&(yield i),n=a==="\\"?n+1:0}}},gt=class extends Ve{constructor(){super(...arguments),this.simpleExpressionChecker=St}};(function(r){r[r.None=0]="None",r[r.Writable=1]="Writable"})(me||(me={}));G=class{constructor(e,t,s,n,i,a,h,x){this.input=e,this.location=t,this.absoluteOffset=s,this.tokens=n,this.inputLength=i,this.parseAction=a,this.errors=h,this.offset=x,this.rparensExpected=0,this.rbracketsExpected=0,this.rbracesExpected=0,this.context=me.None,this.sourceSpanCache=new Map,this.index=0}peek(e){let t=this.index+e;return t<this.tokens.length?this.tokens[t]:Pe}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:this.tokens.length===0?this.inputLength+this.offset:this.next.index+this.offset}get currentAbsoluteOffset(){return this.absoluteOffset+this.inputIndex}span(e,t){let s=this.currentEndIndex;if(t!==void 0&&t>this.currentEndIndex&&(s=t),e>s){let n=s;s=e,e=n}return new T(e,s)}sourceSpan(e,t){let s=`${e}@${this.inputIndex}:${t}`;return this.sourceSpanCache.has(s)||this.sourceSpanCache.set(s,this.span(e,t).toAbsolute(this.absoluteOffset)),this.sourceSpanCache.get(s)}advance(){this.index++}withContext(e,t){this.context|=e;let s=t();return this.context^=e,s}consumeOptionalCharacter(e){return this.next.isCharacter(e)?(this.advance(),!0):!1}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):!1}expectOperator(e){this.consumeOptionalOperator(e)||this.error(`Missing expected operator ${e}`)}prettyPrintToken(e){return e===Pe?"end of input":`token ${e}`}expectIdentifierOrKeyword(){let e=this.next;return!e.isIdentifier()&&!e.isKeyword()?(e.isPrivateIdentifier()?this._reportErrorForPrivateIdentifier(e,"expected identifier or keyword"):this.error(`Unexpected ${this.prettyPrintToken(e)}, expected identifier or keyword`),null):(this.advance(),e.toString())}expectIdentifierOrKeywordOrString(){let e=this.next;return!e.isIdentifier()&&!e.isKeyword()&&!e.isString()?(e.isPrivateIdentifier()?this._reportErrorForPrivateIdentifier(e,"expected identifier, keyword or string"):this.error(`Unexpected ${this.prettyPrintToken(e)}, expected identifier, keyword, or string`),""):(this.advance(),e.toString())}parseChain(){let e=[],t=this.inputIndex;for(;this.index<this.tokens.length;){let s=this.parsePipe();if(e.push(s),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}'`)}if(e.length==0){let s=this.offset,n=this.offset+this.inputLength;return new R(this.span(s,n),this.sourceSpan(s,n))}return e.length==1?e[0]:new V(this.span(t),this.sourceSpan(t),e)}parsePipe(){let e=this.inputIndex,t=this.parseExpression();if(this.consumeOptionalOperator("|")){this.parseAction&&this.error("Cannot have a pipe in an action expression");do{let s=this.inputIndex,n=this.expectIdentifierOrKeyword(),i,a;n!==null?i=this.sourceSpan(s):(n="",a=this.next.index!==-1?this.next.index:this.inputLength+this.offset,i=new T(a,a).toAbsolute(this.absoluteOffset));let h=[];for(;this.consumeOptionalCharacter(58);)h.push(this.parseExpression());t=new Y(this.span(e),this.sourceSpan(e,a),t,n,h,i)}while(this.consumeOptionalOperator("|"))}return t}parseExpression(){return this.parseConditional()}parseConditional(){let e=this.inputIndex,t=this.parseLogicalOr();if(this.consumeOptionalOperator("?")){let s=this.parsePipe(),n;if(this.consumeOptionalCharacter(58))n=this.parsePipe();else{let i=this.inputIndex,a=this.input.substring(e,i);this.error(`Conditional expression ${a} requires all 3 expressions`),n=new R(this.span(e),this.sourceSpan(e))}return new q(this.span(e),this.sourceSpan(e),t,s,n)}else return t}parseLogicalOr(){let e=this.inputIndex,t=this.parseLogicalAnd();for(;this.consumeOptionalOperator("||");){let s=this.parseLogicalAnd();t=new I(this.span(e),this.sourceSpan(e),"||",t,s)}return t}parseLogicalAnd(){let e=this.inputIndex,t=this.parseNullishCoalescing();for(;this.consumeOptionalOperator("&&");){let s=this.parseNullishCoalescing();t=new I(this.span(e),this.sourceSpan(e),"&&",t,s)}return t}parseNullishCoalescing(){let e=this.inputIndex,t=this.parseEquality();for(;this.consumeOptionalOperator("??");){let s=this.parseEquality();t=new I(this.span(e),this.sourceSpan(e),"??",t,s)}return t}parseEquality(){let e=this.inputIndex,t=this.parseRelational();for(;this.next.type==f.Operator;){let s=this.next.strValue;switch(s){case"==":case"===":case"!=":case"!==":this.advance();let n=this.parseRelational();t=new I(this.span(e),this.sourceSpan(e),s,t,n);continue}break}return t}parseRelational(){let e=this.inputIndex,t=this.parseAdditive();for(;this.next.type==f.Operator;){let s=this.next.strValue;switch(s){case"<":case">":case"<=":case">=":this.advance();let n=this.parseAdditive();t=new I(this.span(e),this.sourceSpan(e),s,t,n);continue}break}return t}parseAdditive(){let e=this.inputIndex,t=this.parseMultiplicative();for(;this.next.type==f.Operator;){let s=this.next.strValue;switch(s){case"+":case"-":this.advance();let n=this.parseMultiplicative();t=new I(this.span(e),this.sourceSpan(e),s,t,n);continue}break}return t}parseMultiplicative(){let e=this.inputIndex,t=this.parsePrefix();for(;this.next.type==f.Operator;){let s=this.next.strValue;switch(s){case"*":case"%":case"/":this.advance();let n=this.parsePrefix();t=new I(this.span(e),this.sourceSpan(e),s,t,n);continue}break}return t}parsePrefix(){if(this.next.type==f.Operator){let e=this.inputIndex,t=this.next.strValue,s;switch(t){case"+":return this.advance(),s=this.parsePrefix(),L.createPlus(this.span(e),this.sourceSpan(e),s);case"-":return this.advance(),s=this.parsePrefix(),L.createMinus(this.span(e),this.sourceSpan(e),s);case"!":return this.advance(),s=this.parsePrefix(),new re(this.span(e),this.sourceSpan(e),s)}}return this.parseCallChain()}parseCallChain(){let e=this.inputIndex,t=this.parsePrimary();for(;;)if(this.consumeOptionalCharacter(46))t=this.parseAccessMemberOrMethodCall(t,e,!1);else if(this.consumeOptionalOperator("?."))t=this.consumeOptionalCharacter(91)?this.parseKeyedReadOrWrite(t,e,!0):this.parseAccessMemberOrMethodCall(t,e,!0);else if(this.consumeOptionalCharacter(91))t=this.parseKeyedReadOrWrite(t,e,!1);else if(this.consumeOptionalCharacter(40)){this.rparensExpected++;let s=this.parseCallArguments();this.rparensExpected--,this.expectCharacter(41),t=new oe(this.span(e),this.sourceSpan(e),t,s)}else if(this.consumeOptionalOperator("!"))t=new ne(this.span(e),this.sourceSpan(e),t);else return t}parsePrimary(){let e=this.inputIndex;if(this.consumeOptionalCharacter(40)){this.rparensExpected++;let t=this.parsePipe();return this.rparensExpected--,this.expectCharacter(41),t}else{if(this.next.isKeywordNull())return this.advance(),new P(this.span(e),this.sourceSpan(e),null);if(this.next.isKeywordUndefined())return this.advance(),new P(this.span(e),this.sourceSpan(e),void 0);if(this.next.isKeywordTrue())return this.advance(),new P(this.span(e),this.sourceSpan(e),!0);if(this.next.isKeywordFalse())return this.advance(),new P(this.span(e),this.sourceSpan(e),!1);if(this.next.isKeywordThis())return this.advance(),new Ee(this.span(e),this.sourceSpan(e));if(this.consumeOptionalCharacter(91)){this.rbracketsExpected++;let t=this.parseExpressionList(93);return this.rbracketsExpected--,this.expectCharacter(93),new ee(this.span(e),this.sourceSpan(e),t)}else{if(this.next.isCharacter(123))return this.parseLiteralMap();if(this.next.isIdentifier())return this.parseAccessMemberOrMethodCall(new W(this.span(e),this.sourceSpan(e)),e,!1);if(this.next.isNumber()){let t=this.next.toNumber();return this.advance(),new P(this.span(e),this.sourceSpan(e),t)}else if(this.next.isString()){let t=this.next.toString();return this.advance(),new P(this.span(e),this.sourceSpan(e),t)}else return this.next.isPrivateIdentifier()?(this._reportErrorForPrivateIdentifier(this.next,null),new R(this.span(e),this.sourceSpan(e))):this.index>=this.tokens.length?(this.error(`Unexpected end of expression: ${this.input}`),new R(this.span(e),this.sourceSpan(e))):(this.error(`Unexpected token ${this.next}`),new R(this.span(e),this.sourceSpan(e)))}}}parseExpressionList(e){let t=[];do if(!this.next.isCharacter(e))t.push(this.parsePipe());else break;while(this.consumeOptionalCharacter(44));return t}parseLiteralMap(){let e=[],t=[],s=this.inputIndex;if(this.expectCharacter(123),!this.consumeOptionalCharacter(125)){this.rbracesExpected++;do{let n=this.inputIndex,i=this.next.isString(),a=this.expectIdentifierOrKeywordOrString();if(e.push({key:a,quoted:i}),i)this.expectCharacter(58),t.push(this.parsePipe());else if(this.consumeOptionalCharacter(58))t.push(this.parsePipe());else{let h=this.span(n),x=this.sourceSpan(n);t.push(new F(h,x,x,new W(h,x),a))}}while(this.consumeOptionalCharacter(44));this.rbracesExpected--,this.expectCharacter(125)}return new te(this.span(s),this.sourceSpan(s),e,t)}parseAccessMemberOrMethodCall(e,t,s){let n=this.inputIndex,i=this.withContext(me.Writable,()=>{var h;let x=(h=this.expectIdentifierOrKeyword())!==null&&h!==void 0?h:"";return x.length===0&&this.error("Expected identifier for property access",e.span.end),x}),a=this.sourceSpan(n);if(this.consumeOptionalCharacter(40)){let h=this.inputIndex;this.rparensExpected++;let x=this.parseCallArguments(),v=this.span(h,this.inputIndex).toAbsolute(this.absoluteOffset);this.expectCharacter(41),this.rparensExpected--;let A=this.span(t),N=this.sourceSpan(t);return s?new ae(A,N,a,e,i,x,v):new ie(A,N,a,e,i,x,v)}else{if(s)return this.consumeOptionalOperator("=")?(this.error("The '?.' operator cannot be used in the assignment"),new R(this.span(t),this.sourceSpan(t))):new z(this.span(t),this.sourceSpan(t),a,e,i);if(this.consumeOptionalOperator("=")){if(!this.parseAction)return this.error("Bindings cannot contain assignments"),new R(this.span(t),this.sourceSpan(t));let h=this.parseConditional();return new H(this.span(t),this.sourceSpan(t),a,e,i,h)}else return new F(this.span(t),this.sourceSpan(t),a,e,i)}}parseCallArguments(){if(this.next.isCharacter(41))return[];let e=[];do e.push(this.parsePipe());while(this.consumeOptionalCharacter(44));return e}expectTemplateBindingKey(){let e="",t=!1,s=this.currentAbsoluteOffset;do e+=this.expectIdentifierOrKeywordOrString(),t=this.consumeOptionalOperator("-"),t&&(e+="-");while(t);return{source:e,span:new B(s,s+e.length)}}parseTemplateBindings(e){let t=[];for(t.push(...this.parseDirectiveKeywordBindings(e));this.index<this.tokens.length;){let s=this.parseLetBinding();if(s)t.push(s);else{let n=this.expectTemplateBindingKey(),i=this.parseAsBinding(n);i?t.push(i):(n.source=e.source+n.source.charAt(0).toUpperCase()+n.source.substring(1),t.push(...this.parseDirectiveKeywordBindings(n)))}this.consumeStatementTerminator()}return new We(t,[],this.errors)}parseKeyedReadOrWrite(e,t,s){return this.withContext(me.Writable,()=>{this.rbracketsExpected++;let n=this.parsePipe();if(n instanceof R&&this.error("Key access cannot be empty"),this.rbracketsExpected--,this.expectCharacter(93),this.consumeOptionalOperator("="))if(s)this.error("The '?.' operator cannot be used in the assignment");else{let i=this.parseConditional();return new J(this.span(t),this.sourceSpan(t),e,n,i)}else return s?new Z(this.span(t),this.sourceSpan(t),e,n):new X(this.span(t),this.sourceSpan(t),e,n);return new R(this.span(t),this.sourceSpan(t))})}parseDirectiveKeywordBindings(e){let t=[];this.consumeOptionalCharacter(58);let s=this.getDirectiveBoundTarget(),n=this.currentAbsoluteOffset,i=this.parseAsBinding(e);i||(this.consumeStatementTerminator(),n=this.currentAbsoluteOffset);let a=new B(e.span.start,n);return t.push(new Ae(a,e,s)),i&&t.push(i),t}getDirectiveBoundTarget(){if(this.next===Pe||this.peekKeywordAs()||this.peekKeywordLet())return null;let e=this.parsePipe(),{start:t,end:s}=e.span,n=this.input.substring(t,s);return new K(e,n,this.location,this.absoluteOffset+t,this.errors)}parseAsBinding(e){if(!this.peekKeywordAs())return null;this.advance();let t=this.expectTemplateBindingKey();this.consumeStatementTerminator();let s=new B(e.span.start,this.currentAbsoluteOffset);return new xe(s,t,e)}parseLetBinding(){if(!this.peekKeywordLet())return null;let e=this.currentAbsoluteOffset;this.advance();let t=this.expectTemplateBindingKey(),s=null;this.consumeOptionalOperator("=")&&(s=this.expectTemplateBindingKey()),this.consumeStatementTerminator();let n=new B(e,this.currentAbsoluteOffset);return new xe(n,t,s)}consumeStatementTerminator(){this.consumeOptionalCharacter(59)||this.consumeOptionalCharacter(44)}error(e,t=null){this.errors.push(new Q(e,this.input,this.locationText(t),this.location)),this.skip()}locationText(e=null){return e==null&&(e=this.index),e<this.tokens.length?`at column ${this.tokens[e].index+1} in`:"at the end of the expression"}_reportErrorForPrivateIdentifier(e,t){let s=`Private identifiers are not supported. Unexpected private identifier: ${e}`;t!==null&&(s+=`, ${t}`),this.error(s)}skip(){let e=this.next;for(;this.index<this.tokens.length&&!e.isCharacter(59)&&!e.isOperator("|")&&(this.rparensExpected<=0||!e.isCharacter(41))&&(this.rbracesExpected<=0||!e.isCharacter(125))&&(this.rbracketsExpected<=0||!e.isCharacter(93))&&(!(this.context&me.Writable)||!e.isOperator("="));)this.next.isError()&&this.errors.push(new Q(this.next.toString(),this.input,this.locationText(),this.location)),this.advance(),e=this.next}},mt=class{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(s=>s.visit(this,t))}visitChain(e,t){}visitQuote(e,t){}visitSafeKeyedRead(e,t){}},St=class extends Ce{constructor(){super(...arguments),this.errors=[]}visitPipe(){this.errors.push("pipes")}}});var He=le(S=>{"use strict";m();Object.defineProperty(S,"__esModule",{value:!0});S.getLast=S.toLowerCamelCase=S.findBackChar=S.findFrontChar=S.fitSpans=S.getNgType=S.parseNgInterpolation=S.parseNgTemplateBindings=S.parseNgAction=S.parseNgSimpleBinding=S.parseNgBinding=S.NG_PARSE_TEMPLATE_BINDINGS_FAKE_PREFIX=void 0;var y=(Me(),we(ot)),rr=(vt(),we(Vt)),nr=(Zt(),we(Xt)),Yt="angular-estree-parser";S.NG_PARSE_TEMPLATE_BINDINGS_FAKE_PREFIX="NgEstreeParser";var wt=0,qe=[Yt,wt];function Et(){return new nr.Parser(new rr.Lexer)}function At(r,e){let t=Et(),{astInput:s,comments:n}=es(r,t),{ast:i,errors:a}=e(s,t);return Ct(a),{ast:i,comments:n}}function ir(r){return At(r,(e,t)=>t.parseBinding(e,...qe))}S.parseNgBinding=ir;function ar(r){return At(r,(e,t)=>t.parseSimpleBinding(e,...qe))}S.parseNgSimpleBinding=ar;function or(r){return At(r,(e,t)=>t.parseAction(e,...qe))}S.parseNgAction=or;function cr(r){let e=Et(),{templateBindings:t,errors:s}=e.parseTemplateBindings(S.NG_PARSE_TEMPLATE_BINDINGS_FAKE_PREFIX,r,Yt,wt,wt);return Ct(s),t}S.parseNgTemplateBindings=cr;function hr(r){let e=Et(),{astInput:t,comments:s}=es(r,e),n="{{",i="}}",{ast:a,errors:h}=e.parseInterpolation(n+t+i,...qe);Ct(h);let x=a.expressions[0],v=new Set;return yt(x,A=>{v.has(A)||(A.start-=n.length,A.end-=n.length,v.add(A))}),{ast:x,comments:s}}S.parseNgInterpolation=hr;function yt(r,e){if(!(!r||typeof r!="object")){if(Array.isArray(r))return r.forEach(t=>yt(t,e));for(let t of Object.keys(r)){let s=r[t];t==="span"?e(s):yt(s,e)}}}function Ct(r){if(r.length!==0){let[{message:e}]=r;throw new SyntaxError(e.replace(/^Parser Error: | at column \d+ in [^]*$/g,""))}}function es(r,e){let t=e._commentStart(r);return t===null?{astInput:r,comments:[]}:{astInput:r.slice(0,t),comments:[{type:"Comment",value:r.slice(t+2),span:{start:t,end:r.length}}]}}function pr(r){return y.Unary&&r instanceof y.Unary?"Unary":r instanceof y.Binary?"Binary":r instanceof y.BindingPipe?"BindingPipe":r instanceof y.Chain?"Chain":r instanceof y.Conditional?"Conditional":r instanceof y.EmptyExpr?"EmptyExpr":r instanceof y.FunctionCall?"FunctionCall":r instanceof y.ImplicitReceiver?"ImplicitReceiver":r instanceof y.KeyedRead?"KeyedRead":r instanceof y.KeyedWrite?"KeyedWrite":r instanceof y.LiteralArray?"LiteralArray":r instanceof y.LiteralMap?"LiteralMap":r instanceof y.LiteralPrimitive?"LiteralPrimitive":r instanceof y.MethodCall?"MethodCall":r instanceof y.NonNullAssert?"NonNullAssert":r instanceof y.PrefixNot?"PrefixNot":r instanceof y.PropertyRead?"PropertyRead":r instanceof y.PropertyWrite?"PropertyWrite":r instanceof y.Quote?"Quote":r instanceof y.SafeMethodCall?"SafeMethodCall":r instanceof y.SafePropertyRead?"SafePropertyRead":r.type}S.getNgType=pr;function Jt({start:r,end:e},t){let s=r,n=e;for(;n!==s&&/\s/.test(t[n-1]);)n--;for(;s!==n&&/\s/.test(t[s]);)s++;return{start:s,end:n}}function ur({start:r,end:e},t){let s=r,n=e;for(;n!==t.length&&/\s/.test(t[n]);)n++;for(;s!==0&&/\s/.test(t[s-1]);)s--;return{start:s,end:n}}function lr(r,e){return e[r.start-1]==="("&&e[r.end]===")"?{start:r.start-1,end:r.end+1}:r}function dr(r,e,t){let s=0,n={start:r.start,end:r.end};for(;;){let i=ur(n,e),a=lr(i,e);if(i.start===a.start&&i.end===a.end)break;n.start=a.start,n.end=a.end,s++}return{hasParens:(t?s-1:s)!==0,outerSpan:Jt(t?{start:n.start+1,end:n.end-1}:n,e),innerSpan:Jt(r,e)}}S.fitSpans=dr;function xr(r,e,t){let s=e;for(;!r.test(t[s]);)if(--s<0)throw new Error(`Cannot find front char ${r} from index ${e} in ${JSON.stringify(t)}`);return s}S.findFrontChar=xr;function fr(r,e,t){let s=e;for(;!r.test(t[s]);)if(++s>=t.length)throw new Error(`Cannot find back char ${r} from index ${e} in ${JSON.stringify(t)}`);return s}S.findBackChar=fr;function vr(r){return r.slice(0,1).toLowerCase()+r.slice(1)}S.toLowerCamelCase=vr;function gr(r){return r.length===0?void 0:r[r.length-1]}S.getLast=gr});var $t=le(D=>{"use strict";m();Object.defineProperty(D,"__esModule",{value:!0});D.transformSpan=D.transform=void 0;var Re=He(),mr=(r,e,t=!1)=>{let s=Re.getNgType(r);switch(s){case"Unary":{let{operator:c,expr:o}=r,u=n(o);return a("UnaryExpression",{prefix:!0,argument:u,operator:c},r.span,{hasParentParens:t})}case"Binary":{let{left:c,operation:o,right:u}=r,p=u.span.start===u.span.end,d=c.span.start===c.span.end;if(p||d){let $=c.span.start===c.span.end?n(u):n(c);return a("UnaryExpression",{prefix:!0,argument:$,operator:p?"+":"-"},{start:r.span.start,end:C($)},{hasParentParens:t})}let g=n(c),l=n(u);return a(o==="&&"||o==="||"?"LogicalExpression":"BinaryExpression",{left:g,right:l,operator:o},{start:w(g),end:C(l)},{hasParentParens:t})}case"BindingPipe":{let{exp:c,name:o,args:u}=r,p=n(c),d=v(/\S/,v(/\|/,C(p))+1),g=a("Identifier",{name:o},{start:d,end:d+o.length}),l=u.map(n);return a("NGPipeExpression",{left:p,right:g,arguments:l},{start:w(p),end:C(l.length===0?g:Re.getLast(l))},{hasParentParens:t})}case"Chain":{let{expressions:c}=r;return a("NGChainedExpression",{expressions:c.map(n)},r.span,{hasParentParens:t})}case"Comment":{let{value:c}=r;return a("CommentLine",{value:c},r.span,{processSpan:!1})}case"Conditional":{let{condition:c,trueExp:o,falseExp:u}=r,p=n(c),d=n(o),g=n(u);return a("ConditionalExpression",{test:p,consequent:d,alternate:g},{start:w(p),end:C(g)},{hasParentParens:t})}case"EmptyExpr":return a("NGEmptyExpression",{},r.span,{hasParentParens:t});case"FunctionCall":{let{target:c,args:o}=r,u=o.length===1?[i(o[0])]:o.map(n),p=n(c);return a("CallExpression",{callee:p,arguments:u},{start:w(p),end:r.span.end},{hasParentParens:t})}case"ImplicitReceiver":return a("ThisExpression",{},r.span,{hasParentParens:t});case"KeyedRead":{let{key:c}=r,o=Object.prototype.hasOwnProperty.call(r,"receiver")?r.receiver:r.obj,u=n(c);return h(o,u,{computed:!0,optional:!1},{end:r.span.end,hasParentParens:t})}case"LiteralArray":{let{expressions:c}=r;return a("ArrayExpression",{elements:c.map(n)},r.span,{hasParentParens:t})}case"LiteralMap":{let{keys:c,values:o}=r,u=o.map(d=>n(d)),p=c.map(({key:d,quoted:g},l)=>{let $=u[l],Se=v(/\S/,l===0?r.span.start+1:v(/,/,C(u[l-1]))+1),as=x(/\S/,x(/:/,w($)-1)-1)+1,kt={start:Se,end:as},_e=g?a("StringLiteral",{value:d},kt):a("Identifier",{name:d},kt),os=_e.end<_e.start;return a("ObjectProperty",{key:_e,value:$,method:!1,shorthand:os,computed:!1},{start:w(_e),end:C($)})});return a("ObjectExpression",{properties:p},r.span,{hasParentParens:t})}case"LiteralPrimitive":{let{value:c}=r;switch(typeof c){case"boolean":return a("BooleanLiteral",{value:c},r.span,{hasParentParens:t});case"number":return a("NumericLiteral",{value:c},r.span,{hasParentParens:t});case"object":return a("NullLiteral",{},r.span,{hasParentParens:t});case"string":return a("StringLiteral",{value:c},r.span,{hasParentParens:t});case"undefined":return a("Identifier",{name:"undefined"},r.span,{hasParentParens:t});default:throw new Error(`Unexpected LiteralPrimitive value type ${typeof c}`)}}case"MethodCall":case"SafeMethodCall":{let c=s==="SafeMethodCall",{receiver:o,name:u,args:p}=r,d=p.length===1?[i(p[0])]:p.map(n),g=x(/\S/,x(/\(/,(d.length===0?x(/\)/,r.span.end-1):w(d[0]))-1)-1)+1,l=a("Identifier",{name:u},{start:g-u.length,end:g}),$=h(o,l,{computed:!1,optional:c}),Se=N($);return a(c||Se?"OptionalCallExpression":"CallExpression",{callee:$,arguments:d},{start:w($),end:r.span.end},{hasParentParens:t})}case"NonNullAssert":{let{expression:c}=r,o=n(c);return a("TSNonNullExpression",{expression:o},{start:w(o),end:r.span.end},{hasParentParens:t})}case"PrefixNot":{let{expression:c}=r,o=n(c);return a("UnaryExpression",{prefix:!0,operator:"!",argument:o},{start:r.span.start,end:C(o)},{hasParentParens:t})}case"PropertyRead":case"SafePropertyRead":{let c=s==="SafePropertyRead",{receiver:o,name:u}=r,p=x(/\S/,r.span.end-1)+1,d=a("Identifier",{name:u},{start:p-u.length,end:p},A(o)?{hasParentParens:t}:{});return h(o,d,{computed:!1,optional:c},{hasParentParens:t})}case"KeyedWrite":{let{key:c,value:o}=r,u=Object.prototype.hasOwnProperty.call(r,"receiver")?r.receiver:r.obj,p=n(c),d=n(o),g=h(u,p,{computed:!0,optional:!1},{end:v(/\]/,C(p))+1});return a("AssignmentExpression",{left:g,operator:"=",right:d},{start:w(g),end:C(d)},{hasParentParens:t})}case"PropertyWrite":{let{receiver:c,name:o,value:u}=r,p=n(u),d=x(/\S/,x(/=/,w(p)-1)-1)+1,g=a("Identifier",{name:o},{start:d-o.length,end:d}),l=h(c,g,{computed:!1,optional:!1});return a("AssignmentExpression",{left:l,operator:"=",right:p},{start:w(l),end:C(p)},{hasParentParens:t})}case"Quote":{let{prefix:c,uninterpretedExpression:o}=r;return a("NGQuotedExpression",{prefix:c,value:o},r.span,{hasParentParens:t})}default:throw new Error(`Unexpected node ${s}`)}function n(c){return D.transform(c,e)}function i(c){return D.transform(c,e,!0)}function a(c,o,u,{processSpan:p=!0,hasParentParens:d=!1}={}){let g=Object.assign(Object.assign({type:c},ts(u,e,p,d)),o);switch(c){case"Identifier":{let l=g;l.loc.identifierName=l.name;break}case"NumericLiteral":{let l=g;l.extra=Object.assign(Object.assign({},l.extra),{raw:e.text.slice(l.start,l.end),rawValue:l.value});break}case"StringLiteral":{let l=g;l.extra=Object.assign(Object.assign({},l.extra),{raw:e.text.slice(l.start,l.end),rawValue:l.value});break}}return g}function h(c,o,u,{end:p=C(o),hasParentParens:d=!1}={}){if(A(c)||c.span.start===o.start)return o;let g=n(c),l=N(g);return a(u.optional||l?"OptionalMemberExpression":"MemberExpression",Object.assign({object:g,property:o,computed:u.computed},u.optional?{optional:!0}:l?{optional:!1}:null),{start:w(g),end:p},{hasParentParens:d})}function x(c,o){return Re.findFrontChar(c,o,e.text)}function v(c,o){return Re.findBackChar(c,o,e.text)}function A(c){return c.span.start>=c.span.end||/^\s+$/.test(e.text.slice(c.span.start,c.span.end))}function N(c){return(c.type==="OptionalCallExpression"||c.type==="OptionalMemberExpression")&&!O(c)}function O(c){return c.extra&&c.extra.parenthesized}function w(c){return O(c)?c.extra.parenStart:c.start}function C(c){return O(c)?c.extra.parenEnd:c.end}};D.transform=mr;function ts(r,e,t=!1,s=!1){if(!t){let{start:h,end:x}=r;return{start:h,end:x,loc:{start:e.locator.locationForIndex(h),end:e.locator.locationForIndex(x)}}}let{outerSpan:n,innerSpan:i,hasParens:a}=Re.fitSpans(r,e.text,s);return Object.assign({start:i.start,end:i.end,loc:{start:e.locator.locationForIndex(i.start),end:e.locator.locationForIndex(i.end)}},a&&{extra:{parenthesized:!0,parenStart:n.start,parenEnd:n.end}})}D.transformSpan=ts});var rs=le(ze=>{"use strict";m();Object.defineProperty(ze,"__esModule",{value:!0});ze.transformTemplateBindings=void 0;var ss=(Me(),we(ot)),Ot=$t(),Nt=He();function Sr(r,e){r.forEach(w);let[t]=r,{key:s}=t,n=e.text.slice(t.sourceSpan.start,t.sourceSpan.end).trim().length===0?r.slice(1):r,i=[],a=null;for(let o=0;o<n.length;o++){let u=n[o];if(a&&N(a)&&O(u)&&u.value&&u.value.source===a.key.source){let p=v("NGMicrosyntaxKey",{name:u.key.source},u.key.span),d=($,Se)=>Object.assign(Object.assign({},$),Ot.transformSpan({start:$.start,end:Se},e)),g=$=>Object.assign(Object.assign({},d($,p.end)),{alias:p}),l=i.pop();if(l.type==="NGMicrosyntaxExpression")i.push(g(l));else if(l.type==="NGMicrosyntaxKeyedExpression"){let $=g(l.expression);i.push(d(Object.assign(Object.assign({},l),{expression:$}),$.end))}else throw new Error(`Unexpected type ${l.type}`)}else i.push(h(u,o));a=u}return v("NGMicrosyntax",{body:i},i.length===0?r[0].sourceSpan:{start:i[0].start,end:i[i.length-1].end});function h(o,u){if(N(o)){let{key:p,value:d}=o;return d?u===0?v("NGMicrosyntaxExpression",{expression:x(d.ast),alias:null},d.sourceSpan):v("NGMicrosyntaxKeyedExpression",{key:v("NGMicrosyntaxKey",{name:A(p.source)},p.span),expression:v("NGMicrosyntaxExpression",{expression:x(d.ast),alias:null},d.sourceSpan)},{start:p.span.start,end:d.sourceSpan.end}):v("NGMicrosyntaxKey",{name:A(p.source)},p.span)}else{let{key:p,sourceSpan:d}=o;if(/^let\s$/.test(e.text.slice(d.start,d.start+4))){let{value:l}=o;return v("NGMicrosyntaxLet",{key:v("NGMicrosyntaxKey",{name:p.source},p.span),value:l?v("NGMicrosyntaxKey",{name:l.source},l.span):null},{start:d.start,end:l?l.span.end:p.span.end})}else{let l=c(o);return v("NGMicrosyntaxAs",{key:v("NGMicrosyntaxKey",{name:l.source},l.span),alias:v("NGMicrosyntaxKey",{name:p.source},p.span)},{start:l.span.start,end:p.span.end})}}}function x(o){return Ot.transform(o,e)}function v(o,u,p,d=!0){return Object.assign(Object.assign({type:o},Ot.transformSpan(p,e,d)),u)}function A(o){return Nt.toLowerCamelCase(o.slice(s.source.length))}function N(o){return o instanceof ss.ExpressionBinding}function O(o){return o instanceof ss.VariableBinding}function w(o){C(o.key.span),O(o)&&o.value&&C(o.value.span)}function C(o){if(e.text[o.start]!=='"'&&e.text[o.start]!=="'")return;let u=e.text[o.start],p=!1;for(let d=o.start+1;d<e.text.length;d++)switch(e.text[d]){case u:if(!p){o.end=d+1;return}default:p=!1;break;case"\\":p=!p;break}}function c(o){if(!o.value||o.value.source!==Nt.NG_PARSE_TEMPLATE_BINDINGS_FAKE_PREFIX)return o.value;let u=Nt.findBackChar(/\S/,o.sourceSpan.start,e.text);return{source:"$implicit",span:{start:u,end:u}}}}ze.transformTemplateBindings=Sr});var is=le(b=>{"use strict";m();Object.defineProperty(b,"__esModule",{value:!0});b.parseTemplateBindings=b.parseAction=b.parseInterpolation=b.parseSimpleBinding=b.parseBinding=void 0;var ns=Bt(),wr=$t(),yr=rs(),Le=He();function Xe(r,e){let{ast:t,comments:s}=e(r),n=new ns.Context(r),i=h=>wr.transform(h,n),a=i(t);return a.comments=s.map(i),a}function Er(r){return Xe(r,Le.parseNgBinding)}b.parseBinding=Er;function Ar(r){return Xe(r,Le.parseNgSimpleBinding)}b.parseSimpleBinding=Ar;function Cr(r){return Xe(r,Le.parseNgInterpolation)}b.parseInterpolation=Cr;function $r(r){return Xe(r,Le.parseNgAction)}b.parseAction=$r;function Or(r){return yr.transformTemplateBindings(Le.parseNgTemplateBindings(r),new ns.Context(r))}b.parseTemplateBindings=Or});var Pr={};Be(Pr,{default:()=>kr});m();m();m();function xs(r){return Array.isArray(r)&&r.length>0}var It=xs;function Je(r,e){let{ignoreDecorators:t}=e||{};if(!t){let s=r.declaration&&r.declaration.decorators||r.decorators;if(It(s))return Je(s[0])}return r.range?r.range[0]:r.start}function Rt(r){return r.range?r.range[1]:r.end}function Ze(r){return{astFormat:"estree",parse:async(t,s)=>{let n=await Promise.resolve().then(()=>ds(is(),1)),i=r(t,n);return{type:"NGRoot",node:s.parser==="__ng_action"&&i.type!=="NGChainedExpression"?{...i,type:"NGChainedExpression",expressions:[i]}:i}},locStart:Je,locEnd:Rt}}var Nr={parsers:{__ng_action:Ze((r,e)=>e.parseAction(r)),__ng_binding:Ze((r,e)=>e.parseBinding(r)),__ng_interpolation:Ze((r,e)=>e.parseInterpolation(r)),__ng_directive:Ze((r,e)=>e.parseTemplateBindings(r))}},kr=Nr;return we(Pr);});
1
+ (function(n){function e(){var i=n();return i.default||i}if(typeof exports=="object"&&typeof module=="object")module.exports=e();else if(typeof define=="function"&&define.amd)define(e);else{var t=typeof globalThis<"u"?globalThis:typeof global<"u"?global:typeof self<"u"?self:this||{};t.prettierPlugins=t.prettierPlugins||{},t.prettierPlugins.angular=e()}})(function(){"use strict";var _e=Object.defineProperty;var er=Object.getOwnPropertyDescriptor;var tr=Object.getOwnPropertyNames;var rr=Object.prototype.hasOwnProperty;var E=(s,e)=>()=>(s&&(e=s(s=0)),e);var st=(s,e)=>{for(var t in e)_e(s,t,{get:e[t],enumerable:!0})},sr=(s,e,t,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of tr(e))!rr.call(s,n)&&n!==t&&_e(s,n,{get:()=>e[n],enumerable:!(r=er(e,n))||r.enumerable});return s};var nr=s=>sr(_e({},"__esModule",{value:!0}),s);var we,it,at,ot=E(()=>{we=`
2
+ `,it="\r",at=function(){function s(e){this.length=e.length;for(var t=[0],r=0;r<e.length;)switch(e[r]){case we:r+=we.length,t.push(r);break;case it:r+=it.length,e[r]===we&&(r+=we.length),t.push(r);break;default:r++;break}this.offsets=t}return s.prototype.locationForIndex=function(e){if(e<0||e>this.length)return null;for(var t=0,r=this.offsets;r[t+1]<=e;)t++;var n=e-r[t];return{line:t,column:n}},s.prototype.indexForLocation=function(e){var t=e.line,r=e.column;return t<0||t>=this.offsets.length||r<0||r>this.lengthOfLine(t)?null:this.offsets[t]+r},s.prototype.lengthOfLine=function(e){var t=this.offsets[e],r=e===this.offsets.length-1?this.length:this.offsets[e+1];return r-t},s}()});var xe,Be,ct=E(()=>{ot();xe=class{text;locator;constructor(e){this.text=e,this.locator=new Be(this.text)}},Be=class{_linesAndColumns;constructor(e){this._linesAndColumns=new at(e)}locationForIndex(e){let{line:t,column:r}=this._linesAndColumns.locationForIndex(e);return{line:t+1,column:r,index:e}}}});var D,b,S,V,A,_,ye,W,Q,K,j,H,z,q,X,Z,$,J,Y,Ee,C,P,ee,te,re,se,R,L,T,ne,Ae,ht,Ke=E(()=>{D=class{constructor(e,t,r,n){this.input=t,this.errLocation=r,this.ctxLocation=n,this.message=`Parser Error: ${e} ${r} [${t}] in ${n}`}},b=class{constructor(e,t){this.start=e,this.end=t}toAbsolute(e){return new R(e+this.start,e+this.end)}},S=class{constructor(e,t){this.span=e,this.sourceSpan=t}toString(){return"AST"}},V=class extends S{constructor(e,t,r){super(e,t),this.nameSpan=r}},A=class extends S{visit(e,t=null){}},_=class extends S{visit(e,t=null){return e.visitImplicitReceiver(this,t)}},ye=class extends _{visit(e,t=null){var r;return(r=e.visitThisReceiver)==null?void 0:r.call(e,this,t)}},W=class extends S{constructor(e,t,r){super(e,t),this.expressions=r}visit(e,t=null){return e.visitChain(this,t)}},Q=class extends S{constructor(e,t,r,n,i){super(e,t),this.condition=r,this.trueExp=n,this.falseExp=i}visit(e,t=null){return e.visitConditional(this,t)}},K=class extends V{constructor(e,t,r,n,i){super(e,t,r),this.receiver=n,this.name=i}visit(e,t=null){return e.visitPropertyRead(this,t)}},j=class extends V{constructor(e,t,r,n,i,a){super(e,t,r),this.receiver=n,this.name=i,this.value=a}visit(e,t=null){return e.visitPropertyWrite(this,t)}},H=class extends V{constructor(e,t,r,n,i){super(e,t,r),this.receiver=n,this.name=i}visit(e,t=null){return e.visitSafePropertyRead(this,t)}},z=class extends S{constructor(e,t,r,n){super(e,t),this.receiver=r,this.key=n}visit(e,t=null){return e.visitKeyedRead(this,t)}},q=class extends S{constructor(e,t,r,n){super(e,t),this.receiver=r,this.key=n}visit(e,t=null){return e.visitSafeKeyedRead(this,t)}},X=class extends S{constructor(e,t,r,n,i){super(e,t),this.receiver=r,this.key=n,this.value=i}visit(e,t=null){return e.visitKeyedWrite(this,t)}},Z=class extends V{constructor(e,t,r,n,i,a){super(e,t,a),this.exp=r,this.name=n,this.args=i}visit(e,t=null){return e.visitPipe(this,t)}},$=class extends S{constructor(e,t,r){super(e,t),this.value=r}visit(e,t=null){return e.visitLiteralPrimitive(this,t)}},J=class extends S{constructor(e,t,r){super(e,t),this.expressions=r}visit(e,t=null){return e.visitLiteralArray(this,t)}},Y=class extends S{constructor(e,t,r,n){super(e,t),this.keys=r,this.values=n}visit(e,t=null){return e.visitLiteralMap(this,t)}},Ee=class extends S{constructor(e,t,r,n){super(e,t),this.strings=r,this.expressions=n}visit(e,t=null){return e.visitInterpolation(this,t)}},C=class extends S{constructor(e,t,r,n,i){super(e,t),this.operation=r,this.left=n,this.right=i}visit(e,t=null){return e.visitBinary(this,t)}},P=class extends C{static createMinus(e,t,r){return new P(e,t,"-",r,"-",new $(e,t,0),r)}static createPlus(e,t,r){return new P(e,t,"+",r,"-",r,new $(e,t,0))}constructor(e,t,r,n,i,a,h){super(e,t,i,a,h),this.operator=r,this.expr=n,this.left=null,this.right=null,this.operation=null}visit(e,t=null){return e.visitUnary!==void 0?e.visitUnary(this,t):e.visitBinary(this,t)}},ee=class extends S{constructor(e,t,r){super(e,t),this.expression=r}visit(e,t=null){return e.visitPrefixNot(this,t)}},te=class extends S{constructor(e,t,r){super(e,t),this.expression=r}visit(e,t=null){return e.visitNonNullAssert(this,t)}},re=class extends S{constructor(e,t,r,n,i){super(e,t),this.receiver=r,this.args=n,this.argumentSpan=i}visit(e,t=null){return e.visitCall(this,t)}},se=class extends S{constructor(e,t,r,n,i){super(e,t),this.receiver=r,this.args=n,this.argumentSpan=i}visit(e,t=null){return e.visitSafeCall(this,t)}},R=class{constructor(e,t){this.start=e,this.end=t}},L=class extends S{constructor(e,t,r,n,i){super(new b(0,t===null?0:t.length),new R(n,t===null?n:n+t.length)),this.ast=e,this.source=t,this.location=r,this.errors=i}visit(e,t=null){return e.visitASTWithSource?e.visitASTWithSource(this,t):this.ast.visit(e,t)}toString(){return`${this.source} in ${this.location}`}},T=class{constructor(e,t,r){this.sourceSpan=e,this.key=t,this.value=r}},ne=class{constructor(e,t,r){this.sourceSpan=e,this.key=t,this.value=r}},Ae=class{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)}visitImplicitReceiver(e,t){}visitThisReceiver(e,t){}visitInterpolation(e,t){this.visitAll(e.expressions,t)}visitKeyedRead(e,t){this.visit(e.receiver,t),this.visit(e.key,t)}visitKeyedWrite(e,t){this.visit(e.receiver,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){}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)}visitSafeKeyedRead(e,t){this.visit(e.receiver,t),this.visit(e.key,t)}visitCall(e,t){this.visit(e.receiver,t),this.visitAll(e.args,t)}visitSafeCall(e,t){this.visit(e.receiver,t),this.visitAll(e.args,t)}visitAll(e,t){for(let r of e)this.visit(r,t)}};(function(s){s[s.DEFAULT=0]="DEFAULT",s[s.LITERAL_ATTR=1]="LITERAL_ATTR",s[s.ANIMATION=2]="ANIMATION"})(ht||(ht={}))});function pt(s){return s>=9&&s<=32||s==160}function B(s){return 48<=s&&s<=57}function ut(s){return s>=97&&s<=122||s>=65&&s<=90}function Te(s){return s===39||s===34||s===96}var Me=E(()=>{});function vt(s,e,t){return new k(s,e,d.Character,t,String.fromCharCode(t))}function Kr(s,e,t){return new k(s,e,d.Identifier,0,t)}function Tr(s,e,t){return new k(s,e,d.PrivateIdentifier,0,t)}function Mr(s,e,t){return new k(s,e,d.Keyword,0,t)}function Ue(s,e,t){return new k(s,e,d.Operator,0,t)}function Fr(s,e,t){return new k(s,e,d.String,0,t)}function Ur(s,e,t){return new k(s,e,d.Number,t,"")}function Gr(s,e,t){return new k(s,e,d.Error,0,t)}function gt(s){return 97<=s&&s<=122||65<=s&&s<=90||s==95||s==36}function mt(s){return ut(s)||B(s)||s==95||s==36}function Dr(s){return s==101||s==69}function Vr(s){return s==45||s==43}function Wr(s){switch(s){case 110:return 10;case 102:return 12;case 114:return 13;case 116:return 9;case 118:return 11;default:return s}}function Qr(s){let e=parseInt(s);if(isNaN(e))throw new Error("Invalid integer literal when parsing "+s);return e}var d,Br,fe,k,Ne,Ge,Ve=E(()=>{Me();(function(s){s[s.Character=0]="Character",s[s.Identifier=1]="Identifier",s[s.PrivateIdentifier=2]="PrivateIdentifier",s[s.Keyword=3]="Keyword",s[s.String=4]="String",s[s.Operator=5]="Operator",s[s.Number=6]="Number",s[s.Error=7]="Error"})(d||(d={}));Br=["var","let","as","null","undefined","true","false","if","else","this"],fe=class{tokenize(e){let t=new Ge(e),r=[],n=t.scanToken();for(;n!=null;)r.push(n),n=t.scanToken();return r}},k=class{constructor(e,t,r,n,i){this.index=e,this.end=t,this.type=r,this.numValue=n,this.strValue=i}isCharacter(e){return this.type==d.Character&&this.numValue==e}isNumber(){return this.type==d.Number}isString(){return this.type==d.String}isOperator(e){return this.type==d.Operator&&this.strValue==e}isIdentifier(){return this.type==d.Identifier}isPrivateIdentifier(){return this.type==d.PrivateIdentifier}isKeyword(){return this.type==d.Keyword}isKeywordLet(){return this.type==d.Keyword&&this.strValue=="let"}isKeywordAs(){return this.type==d.Keyword&&this.strValue=="as"}isKeywordNull(){return this.type==d.Keyword&&this.strValue=="null"}isKeywordUndefined(){return this.type==d.Keyword&&this.strValue=="undefined"}isKeywordTrue(){return this.type==d.Keyword&&this.strValue=="true"}isKeywordFalse(){return this.type==d.Keyword&&this.strValue=="false"}isKeywordThis(){return this.type==d.Keyword&&this.strValue=="this"}isError(){return this.type==d.Error}toNumber(){return this.type==d.Number?this.numValue:-1}toString(){switch(this.type){case d.Character:case d.Identifier:case d.Keyword:case d.Operator:case d.PrivateIdentifier:case d.String:case d.Error:return this.strValue;case d.Number:return this.numValue.toString();default:return null}}};Ne=new k(-1,-1,d.Character,0,""),Ge=class{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(){let e=this.input,t=this.length,r=this.peek,n=this.index;for(;r<=32;)if(++n>=t){r=0;break}else r=e.charCodeAt(n);if(this.peek=r,this.index=n,n>=t)return null;if(gt(r))return this.scanIdentifier();if(B(r))return this.scanNumber(n);let i=n;switch(r){case 46:return this.advance(),B(this.peek)?this.scanNumber(i):vt(i,this.index,46);case 40:case 41:case 123:case 125:case 91:case 93:case 44:case 58:case 59:return this.scanCharacter(i,r);case 39:case 34:return this.scanString();case 35:return this.scanPrivateIdentifier();case 43:case 45:case 42:case 47:case 37:case 94:return this.scanOperator(i,String.fromCharCode(r));case 63:return this.scanQuestion(i);case 60:case 62:return this.scanComplexOperator(i,String.fromCharCode(r),61,"=");case 33:case 61:return this.scanComplexOperator(i,String.fromCharCode(r),61,"=",61,"=");case 38:return this.scanComplexOperator(i,"&",38,"&");case 124:return this.scanComplexOperator(i,"|",124,"|");case 160:for(;pt(this.peek);)this.advance();return this.scanToken()}return this.advance(),this.error(`Unexpected character [${String.fromCharCode(r)}]`,0)}scanCharacter(e,t){return this.advance(),vt(e,this.index,t)}scanOperator(e,t){return this.advance(),Ue(e,this.index,t)}scanComplexOperator(e,t,r,n,i,a){this.advance();let h=t;return this.peek==r&&(this.advance(),h+=n),i!=null&&this.peek==i&&(this.advance(),h+=a),Ue(e,this.index,h)}scanIdentifier(){let e=this.index;for(this.advance();mt(this.peek);)this.advance();let t=this.input.substring(e,this.index);return Br.indexOf(t)>-1?Mr(e,this.index,t):Kr(e,this.index,t)}scanPrivateIdentifier(){let e=this.index;if(this.advance(),!gt(this.peek))return this.error("Invalid character [#]",-1);for(;mt(this.peek);)this.advance();let t=this.input.substring(e,this.index);return Tr(e,this.index,t)}scanNumber(e){let t=this.index===e,r=!1;for(this.advance();;){if(!B(this.peek))if(this.peek===95){if(!B(this.input.charCodeAt(this.index-1))||!B(this.input.charCodeAt(this.index+1)))return this.error("Invalid numeric separator",0);r=!0}else if(this.peek===46)t=!1;else if(Dr(this.peek)){if(this.advance(),Vr(this.peek)&&this.advance(),!B(this.peek))return this.error("Invalid exponent",-1);t=!1}else break;this.advance()}let n=this.input.substring(e,this.index);r&&(n=n.replace(/_/g,""));let i=t?Qr(n):parseFloat(n);return Ur(e,this.index,i)}scanString(){let e=this.index,t=this.peek;this.advance();let r="",n=this.index,i=this.input;for(;this.peek!=t;)if(this.peek==92){r+=i.substring(n,this.index);let h;if(this.advance(),this.peek==117){let v=i.substring(this.index+1,this.index+5);if(/^[0-9a-f]+$/i.test(v))h=parseInt(v,16);else return this.error(`Invalid unicode escape [\\u${v}]`,0);for(let f=0;f<5;f++)this.advance()}else h=Wr(this.peek),this.advance();r+=String.fromCharCode(h),n=this.index}else{if(this.peek==0)return this.error("Unterminated quote",0);this.advance()}let a=i.substring(n,this.index);return this.advance(),Fr(e,this.index,r+a)}scanQuestion(e){this.advance();let t="?";return(this.peek===63||this.peek===46)&&(t+=this.peek===46?".":"?",this.advance()),Ue(e,this.index,t)}error(e,t){let r=this.index+t;return Gr(r,this.index,`Lexer Error: ${e} at column ${r} in expression [${this.input}]`)}}});function Et(s,e){if(e!=null&&!(Array.isArray(e)&&e.length==2))throw new Error(`Expected '${s}' to be an array, [start, end].`);if(e!=null){let t=e[0],r=e[1];jr.forEach(n=>{if(n.test(t)||n.test(r))throw new Error(`['${t}', '${r}'] contains unusable interpolation symbol.`)})}}var jr,At=E(()=>{jr=[/^\s*$/,/[<>]/,/^[{}]$/,/&(#|[a-z])/i,/^\/\//]});var ge,U,$t=E(()=>{At();ge=class{static fromArray(e){return e?(Et("interpolation",e),new ge(e[0],e[1])):U}constructor(e,t){this.start=e,this.end=t}},U=new ge("{{","}}")});function Hr(s){let e=new Map,t=0,r=0,n=0;for(;n<s.length;){let i=s[n];if(i.type===9){let[a,h]=i.parts;t+=h.length,r+=a.length}else{let a=i.parts.reduce((h,v)=>h+v.length,0);r+=a,t+=a}e.set(r,t),n++}return e}var We,Qe,me,pe,G,je,Ct=E(()=>{Me();$t();Ke();Ve();We=class{constructor(e,t,r){this.strings=e,this.expressions=t,this.offsets=r}},Qe=class{constructor(e,t,r){this.templateBindings=e,this.warnings=t,this.errors=r}},me=class{constructor(e){this._lexer=e,this.errors=[]}parseAction(e,t,r,n,i=U){this._checkNoInterpolation(e,r,i);let a=this._stripComments(e),h=this._lexer.tokenize(a),v=1;t&&(v|=2);let f=new G(e,r,n,h,v,this.errors,0).parseChain();return new L(f,e,r,n,this.errors)}parseBinding(e,t,r,n=U){let i=this._parseBindingAst(e,t,r,n);return new L(i,e,t,r,this.errors)}checkSimpleExpression(e){let t=new je;return e.visit(t),t.errors}parseSimpleBinding(e,t,r,n=U){let i=this._parseBindingAst(e,t,r,n),a=this.checkSimpleExpression(i);return a.length>0&&this._reportError(`Host binding expression cannot contain ${a.join(" ")}`,e,t),new L(i,e,t,r,this.errors)}_reportError(e,t,r,n){this.errors.push(new D(e,t,r,n))}_parseBindingAst(e,t,r,n){this._checkNoInterpolation(e,t,n);let i=this._stripComments(e),a=this._lexer.tokenize(i);return new G(e,t,r,a,0,this.errors,0).parseChain()}parseTemplateBindings(e,t,r,n,i){let a=this._lexer.tokenize(t);return new G(t,r,i,a,0,this.errors,0).parseTemplateBindings({source:e,span:new R(n,n+e.length)})}parseInterpolation(e,t,r,n,i=U){let{strings:a,expressions:h,offsets:v}=this.splitInterpolation(e,t,n,i);if(h.length===0)return null;let f=[];for(let w=0;w<h.length;++w){let I=h[w].text,O=this._stripComments(I),y=this._lexer.tokenize(O),m=new G(e,t,r,y,0,this.errors,v[w]).parseChain();f.push(m)}return this.createInterpolationAst(a.map(w=>w.text),f,e,t,r)}parseInterpolationExpression(e,t,r){let n=this._stripComments(e),i=this._lexer.tokenize(n),a=new G(e,t,r,i,0,this.errors,0).parseChain(),h=["",""];return this.createInterpolationAst(h,[a],e,t,r)}createInterpolationAst(e,t,r,n,i){let a=new b(0,r.length),h=new Ee(a,a.toAbsolute(i),e,t);return new L(h,r,n,i,this.errors)}splitInterpolation(e,t,r,n=U){let i=[],a=[],h=[],v=r?Hr(r):null,f=0,w=!1,I=!1,{start:O,end:y}=n;for(;f<e.length;)if(w){let m=f,c=m+O.length,o=this._getInterpolationEndIndex(e,y,c);if(o===-1){w=!1,I=!0;break}let x=o+y.length,p=e.substring(c,o);p.trim().length===0&&this._reportError("Blank expressions are not allowed in interpolated strings",e,`at column ${f} in`,t),a.push({text:p,start:m,end:x});let g=((v==null?void 0:v.get(m))??m)+O.length;h.push(g),f=x,w=!1}else{let m=f;f=e.indexOf(O,f),f===-1&&(f=e.length);let c=e.substring(m,f);i.push({text:c,start:m,end:f}),w=!0}if(!w)if(I){let m=i[i.length-1];m.text+=e.substring(f),m.end=e.length}else i.push({text:e.substring(f),start:f,end:e.length});return new We(i,a,h)}wrapLiteralPrimitive(e,t,r){let n=new b(0,e==null?0:e.length);return new L(new $(n,n.toAbsolute(r),e),e,t,r,this.errors)}_stripComments(e){let t=this._commentStart(e);return t!=null?e.substring(0,t):e}_commentStart(e){let t=null;for(let r=0;r<e.length-1;r++){let n=e.charCodeAt(r),i=e.charCodeAt(r+1);if(n===47&&i==47&&t==null)return r;t===n?t=null:t==null&&Te(n)&&(t=n)}return null}_checkNoInterpolation(e,t,{start:r,end:n}){let i=-1,a=-1;for(let h of this._forEachUnquotedChar(e,0))if(i===-1)e.startsWith(r)&&(i=h);else if(a=this._getInterpolationEndIndex(e,n,h),a>-1)break;i>-1&&a>-1&&this._reportError(`Got interpolation (${r}${n}) where expression was expected`,e,`at column ${i} in`,t)}_getInterpolationEndIndex(e,t,r){for(let n of this._forEachUnquotedChar(e,r)){if(e.startsWith(t,n))return n;if(e.startsWith("//",n))return e.indexOf(t,n)}return-1}*_forEachUnquotedChar(e,t){let r=null,n=0;for(let i=t;i<e.length;i++){let a=e[i];Te(e.charCodeAt(i))&&(r===null||r===a)&&n%2===0?r=r===null?a:null:r===null&&(yield i),n=a==="\\"?n+1:0}}};(function(s){s[s.None=0]="None",s[s.Writable=1]="Writable"})(pe||(pe={}));G=class{constructor(e,t,r,n,i,a,h){this.input=e,this.location=t,this.absoluteOffset=r,this.tokens=n,this.parseFlags=i,this.errors=a,this.offset=h,this.rparensExpected=0,this.rbracketsExpected=0,this.rbracesExpected=0,this.context=pe.None,this.sourceSpanCache=new Map,this.index=0}peek(e){let t=this.index+e;return t<this.tokens.length?this.tokens[t]:Ne}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:this.tokens.length===0?this.input.length+this.offset:this.next.index+this.offset}get currentAbsoluteOffset(){return this.absoluteOffset+this.inputIndex}span(e,t){let r=this.currentEndIndex;if(t!==void 0&&t>this.currentEndIndex&&(r=t),e>r){let n=r;r=e,e=n}return new b(e,r)}sourceSpan(e,t){let r=`${e}@${this.inputIndex}:${t}`;return this.sourceSpanCache.has(r)||this.sourceSpanCache.set(r,this.span(e,t).toAbsolute(this.absoluteOffset)),this.sourceSpanCache.get(r)}advance(){this.index++}withContext(e,t){this.context|=e;let r=t();return this.context^=e,r}consumeOptionalCharacter(e){return this.next.isCharacter(e)?(this.advance(),!0):!1}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):!1}expectOperator(e){this.consumeOptionalOperator(e)||this.error(`Missing expected operator ${e}`)}prettyPrintToken(e){return e===Ne?"end of input":`token ${e}`}expectIdentifierOrKeyword(){let e=this.next;return!e.isIdentifier()&&!e.isKeyword()?(e.isPrivateIdentifier()?this._reportErrorForPrivateIdentifier(e,"expected identifier or keyword"):this.error(`Unexpected ${this.prettyPrintToken(e)}, expected identifier or keyword`),null):(this.advance(),e.toString())}expectIdentifierOrKeywordOrString(){let e=this.next;return!e.isIdentifier()&&!e.isKeyword()&&!e.isString()?(e.isPrivateIdentifier()?this._reportErrorForPrivateIdentifier(e,"expected identifier, keyword or string"):this.error(`Unexpected ${this.prettyPrintToken(e)}, expected identifier, keyword, or string`),""):(this.advance(),e.toString())}parseChain(){let e=[],t=this.inputIndex;for(;this.index<this.tokens.length;){let r=this.parsePipe();if(e.push(r),this.consumeOptionalCharacter(59))for(this.parseFlags&1||this.error("Binding expression cannot contain chained expression");this.consumeOptionalCharacter(59););else if(this.index<this.tokens.length){let n=this.index;if(this.error(`Unexpected token '${this.next}'`),this.index===n)break}}if(e.length===0){let r=this.offset,n=this.offset+this.input.length;return new A(this.span(r,n),this.sourceSpan(r,n))}return e.length==1?e[0]:new W(this.span(t),this.sourceSpan(t),e)}parsePipe(){let e=this.inputIndex,t=this.parseExpression();if(this.consumeOptionalOperator("|")){this.parseFlags&1&&this.error("Cannot have a pipe in an action expression");do{let r=this.inputIndex,n=this.expectIdentifierOrKeyword(),i,a;n!==null?i=this.sourceSpan(r):(n="",a=this.next.index!==-1?this.next.index:this.input.length+this.offset,i=new b(a,a).toAbsolute(this.absoluteOffset));let h=[];for(;this.consumeOptionalCharacter(58);)h.push(this.parseExpression());t=new Z(this.span(e),this.sourceSpan(e,a),t,n,h,i)}while(this.consumeOptionalOperator("|"))}return t}parseExpression(){return this.parseConditional()}parseConditional(){let e=this.inputIndex,t=this.parseLogicalOr();if(this.consumeOptionalOperator("?")){let r=this.parsePipe(),n;if(this.consumeOptionalCharacter(58))n=this.parsePipe();else{let i=this.inputIndex,a=this.input.substring(e,i);this.error(`Conditional expression ${a} requires all 3 expressions`),n=new A(this.span(e),this.sourceSpan(e))}return new Q(this.span(e),this.sourceSpan(e),t,r,n)}else return t}parseLogicalOr(){let e=this.inputIndex,t=this.parseLogicalAnd();for(;this.consumeOptionalOperator("||");){let r=this.parseLogicalAnd();t=new C(this.span(e),this.sourceSpan(e),"||",t,r)}return t}parseLogicalAnd(){let e=this.inputIndex,t=this.parseNullishCoalescing();for(;this.consumeOptionalOperator("&&");){let r=this.parseNullishCoalescing();t=new C(this.span(e),this.sourceSpan(e),"&&",t,r)}return t}parseNullishCoalescing(){let e=this.inputIndex,t=this.parseEquality();for(;this.consumeOptionalOperator("??");){let r=this.parseEquality();t=new C(this.span(e),this.sourceSpan(e),"??",t,r)}return t}parseEquality(){let e=this.inputIndex,t=this.parseRelational();for(;this.next.type==d.Operator;){let r=this.next.strValue;switch(r){case"==":case"===":case"!=":case"!==":this.advance();let n=this.parseRelational();t=new C(this.span(e),this.sourceSpan(e),r,t,n);continue}break}return t}parseRelational(){let e=this.inputIndex,t=this.parseAdditive();for(;this.next.type==d.Operator;){let r=this.next.strValue;switch(r){case"<":case">":case"<=":case">=":this.advance();let n=this.parseAdditive();t=new C(this.span(e),this.sourceSpan(e),r,t,n);continue}break}return t}parseAdditive(){let e=this.inputIndex,t=this.parseMultiplicative();for(;this.next.type==d.Operator;){let r=this.next.strValue;switch(r){case"+":case"-":this.advance();let n=this.parseMultiplicative();t=new C(this.span(e),this.sourceSpan(e),r,t,n);continue}break}return t}parseMultiplicative(){let e=this.inputIndex,t=this.parsePrefix();for(;this.next.type==d.Operator;){let r=this.next.strValue;switch(r){case"*":case"%":case"/":this.advance();let n=this.parsePrefix();t=new C(this.span(e),this.sourceSpan(e),r,t,n);continue}break}return t}parsePrefix(){if(this.next.type==d.Operator){let e=this.inputIndex,t=this.next.strValue,r;switch(t){case"+":return this.advance(),r=this.parsePrefix(),P.createPlus(this.span(e),this.sourceSpan(e),r);case"-":return this.advance(),r=this.parsePrefix(),P.createMinus(this.span(e),this.sourceSpan(e),r);case"!":return this.advance(),r=this.parsePrefix(),new ee(this.span(e),this.sourceSpan(e),r)}}return this.parseCallChain()}parseCallChain(){let e=this.inputIndex,t=this.parsePrimary();for(;;)if(this.consumeOptionalCharacter(46))t=this.parseAccessMember(t,e,!1);else if(this.consumeOptionalOperator("?."))this.consumeOptionalCharacter(40)?t=this.parseCall(t,e,!0):t=this.consumeOptionalCharacter(91)?this.parseKeyedReadOrWrite(t,e,!0):this.parseAccessMember(t,e,!0);else if(this.consumeOptionalCharacter(91))t=this.parseKeyedReadOrWrite(t,e,!1);else if(this.consumeOptionalCharacter(40))t=this.parseCall(t,e,!1);else if(this.consumeOptionalOperator("!"))t=new te(this.span(e),this.sourceSpan(e),t);else return t}parsePrimary(){let e=this.inputIndex;if(this.consumeOptionalCharacter(40)){this.rparensExpected++;let t=this.parsePipe();return this.rparensExpected--,this.expectCharacter(41),t}else{if(this.next.isKeywordNull())return this.advance(),new $(this.span(e),this.sourceSpan(e),null);if(this.next.isKeywordUndefined())return this.advance(),new $(this.span(e),this.sourceSpan(e),void 0);if(this.next.isKeywordTrue())return this.advance(),new $(this.span(e),this.sourceSpan(e),!0);if(this.next.isKeywordFalse())return this.advance(),new $(this.span(e),this.sourceSpan(e),!1);if(this.next.isKeywordThis())return this.advance(),new ye(this.span(e),this.sourceSpan(e));if(this.consumeOptionalCharacter(91)){this.rbracketsExpected++;let t=this.parseExpressionList(93);return this.rbracketsExpected--,this.expectCharacter(93),new J(this.span(e),this.sourceSpan(e),t)}else{if(this.next.isCharacter(123))return this.parseLiteralMap();if(this.next.isIdentifier())return this.parseAccessMember(new _(this.span(e),this.sourceSpan(e)),e,!1);if(this.next.isNumber()){let t=this.next.toNumber();return this.advance(),new $(this.span(e),this.sourceSpan(e),t)}else if(this.next.isString()){let t=this.next.toString();return this.advance(),new $(this.span(e),this.sourceSpan(e),t)}else return this.next.isPrivateIdentifier()?(this._reportErrorForPrivateIdentifier(this.next,null),new A(this.span(e),this.sourceSpan(e))):this.index>=this.tokens.length?(this.error(`Unexpected end of expression: ${this.input}`),new A(this.span(e),this.sourceSpan(e))):(this.error(`Unexpected token ${this.next}`),new A(this.span(e),this.sourceSpan(e)))}}}parseExpressionList(e){let t=[];do if(!this.next.isCharacter(e))t.push(this.parsePipe());else break;while(this.consumeOptionalCharacter(44));return t}parseLiteralMap(){let e=[],t=[],r=this.inputIndex;if(this.expectCharacter(123),!this.consumeOptionalCharacter(125)){this.rbracesExpected++;do{let n=this.inputIndex,i=this.next.isString(),a=this.expectIdentifierOrKeywordOrString();if(e.push({key:a,quoted:i}),i)this.expectCharacter(58),t.push(this.parsePipe());else if(this.consumeOptionalCharacter(58))t.push(this.parsePipe());else{let h=this.span(n),v=this.sourceSpan(n);t.push(new K(h,v,v,new _(h,v),a))}}while(this.consumeOptionalCharacter(44)&&!this.next.isCharacter(125));this.rbracesExpected--,this.expectCharacter(125)}return new Y(this.span(r),this.sourceSpan(r),e,t)}parseAccessMember(e,t,r){let n=this.inputIndex,i=this.withContext(pe.Writable,()=>{let v=this.expectIdentifierOrKeyword()??"";return v.length===0&&this.error("Expected identifier for property access",e.span.end),v}),a=this.sourceSpan(n),h;if(r)this.consumeOptionalAssignment()?(this.error("The '?.' operator cannot be used in the assignment"),h=new A(this.span(t),this.sourceSpan(t))):h=new H(this.span(t),this.sourceSpan(t),a,e,i);else if(this.consumeOptionalAssignment()){if(!(this.parseFlags&1))return this.error("Bindings cannot contain assignments"),new A(this.span(t),this.sourceSpan(t));let v=this.parseConditional();h=new j(this.span(t),this.sourceSpan(t),a,e,i,v)}else h=new K(this.span(t),this.sourceSpan(t),a,e,i);return h}parseCall(e,t,r){let n=this.inputIndex;this.rparensExpected++;let i=this.parseCallArguments(),a=this.span(n,this.inputIndex).toAbsolute(this.absoluteOffset);this.expectCharacter(41),this.rparensExpected--;let h=this.span(t),v=this.sourceSpan(t);return r?new se(h,v,e,i,a):new re(h,v,e,i,a)}consumeOptionalAssignment(){return this.parseFlags&2&&this.next.isOperator("!")&&this.peek(1).isOperator("=")?(this.advance(),this.advance(),!0):this.consumeOptionalOperator("=")}parseCallArguments(){if(this.next.isCharacter(41))return[];let e=[];do e.push(this.parsePipe());while(this.consumeOptionalCharacter(44));return e}expectTemplateBindingKey(){let e="",t=!1,r=this.currentAbsoluteOffset;do e+=this.expectIdentifierOrKeywordOrString(),t=this.consumeOptionalOperator("-"),t&&(e+="-");while(t);return{source:e,span:new R(r,r+e.length)}}parseTemplateBindings(e){let t=[];for(t.push(...this.parseDirectiveKeywordBindings(e));this.index<this.tokens.length;){let r=this.parseLetBinding();if(r)t.push(r);else{let n=this.expectTemplateBindingKey(),i=this.parseAsBinding(n);i?t.push(i):(n.source=e.source+n.source.charAt(0).toUpperCase()+n.source.substring(1),t.push(...this.parseDirectiveKeywordBindings(n)))}this.consumeStatementTerminator()}return new Qe(t,[],this.errors)}parseKeyedReadOrWrite(e,t,r){return this.withContext(pe.Writable,()=>{this.rbracketsExpected++;let n=this.parsePipe();if(n instanceof A&&this.error("Key access cannot be empty"),this.rbracketsExpected--,this.expectCharacter(93),this.consumeOptionalOperator("="))if(r)this.error("The '?.' operator cannot be used in the assignment");else{let i=this.parseConditional();return new X(this.span(t),this.sourceSpan(t),e,n,i)}else return r?new q(this.span(t),this.sourceSpan(t),e,n):new z(this.span(t),this.sourceSpan(t),e,n);return new A(this.span(t),this.sourceSpan(t))})}parseDirectiveKeywordBindings(e){let t=[];this.consumeOptionalCharacter(58);let r=this.getDirectiveBoundTarget(),n=this.currentAbsoluteOffset,i=this.parseAsBinding(e);i||(this.consumeStatementTerminator(),n=this.currentAbsoluteOffset);let a=new R(e.span.start,n);return t.push(new ne(a,e,r)),i&&t.push(i),t}getDirectiveBoundTarget(){if(this.next===Ne||this.peekKeywordAs()||this.peekKeywordLet())return null;let e=this.parsePipe(),{start:t,end:r}=e.span,n=this.input.substring(t,r);return new L(e,n,this.location,this.absoluteOffset+t,this.errors)}parseAsBinding(e){if(!this.peekKeywordAs())return null;this.advance();let t=this.expectTemplateBindingKey();this.consumeStatementTerminator();let r=new R(e.span.start,this.currentAbsoluteOffset);return new T(r,t,e)}parseLetBinding(){if(!this.peekKeywordLet())return null;let e=this.currentAbsoluteOffset;this.advance();let t=this.expectTemplateBindingKey(),r=null;this.consumeOptionalOperator("=")&&(r=this.expectTemplateBindingKey()),this.consumeStatementTerminator();let n=new R(e,this.currentAbsoluteOffset);return new T(n,t,r)}consumeStatementTerminator(){this.consumeOptionalCharacter(59)||this.consumeOptionalCharacter(44)}error(e,t=null){this.errors.push(new D(e,this.input,this.locationText(t),this.location)),this.skip()}locationText(e=null){return e==null&&(e=this.index),e<this.tokens.length?`at column ${this.tokens[e].index+1} in`:"at the end of the expression"}_reportErrorForPrivateIdentifier(e,t){let r=`Private identifiers are not supported. Unexpected private identifier: ${e}`;t!==null&&(r+=`, ${t}`),this.error(r)}skip(){let e=this.next;for(;this.index<this.tokens.length&&!e.isCharacter(59)&&!e.isOperator("|")&&(this.rparensExpected<=0||!e.isCharacter(41))&&(this.rbracesExpected<=0||!e.isCharacter(125))&&(this.rbracketsExpected<=0||!e.isCharacter(93))&&(!(this.context&pe.Writable)||!e.isOperator("="));)this.next.isError()&&this.errors.push(new D(this.next.toString(),this.input,this.locationText(),this.location)),this.advance(),e=this.next}},je=class extends Ae{constructor(){super(...arguments),this.errors=[]}visitPipe(){this.errors.push("pipes")}}});var ke=E(()=>{Ke();Ve();Ct()});function kt(){return new me(new fe)}function Xe(s,e){let t=kt(),{astInput:r,comments:n}=qr(s,t),{ast:i,errors:a}=e(r,t);return bt(a),{ast:i,comments:n}}function It(s){return Xe(s,(e,t)=>t.parseBinding(e,...qe))}function Pt(s){return Xe(s,(e,t)=>t.parseAction(e,!1,...qe))}function Rt(s){return Xe(s,(e,t)=>{let r=t.parseInterpolationExpression(e,...qe);return r.ast=r.ast.expressions[0],r})}function Lt(s){let e=kt(),{templateBindings:t,errors:r}=e.parseTemplateBindings(ze,s,Nt,He,He);return bt(r),t}function bt(s){if(s.length!==0){let[{message:e}]=s;throw new SyntaxError(e.replace(/^Parser Error: | at column \d+ in [^]*$/g,""))}}function qr(s,e){let t=e._commentStart(s);return t===null?{astInput:s,comments:[]}:{astInput:s.slice(0,t),comments:[{type:"Comment",value:s.slice(t+2),sourceSpan:{start:t,end:s.length}}]}}function _t(s){return s instanceof P?"Unary":s instanceof C?"Binary":s instanceof Z?"BindingPipe":s instanceof re?"Call":s instanceof W?"Chain":s instanceof Q?"Conditional":s instanceof A?"EmptyExpr":s instanceof _?"ImplicitReceiver":s instanceof z?"KeyedRead":s instanceof q?"SafeKeyedRead":s instanceof X?"KeyedWrite":s instanceof J?"LiteralArray":s instanceof Y?"LiteralMap":s instanceof $?"LiteralPrimitive":s instanceof te?"NonNullAssert":s instanceof ee?"PrefixNot":s instanceof K?"PropertyRead":s instanceof j?"PropertyWrite":s instanceof se?"SafeCall":s instanceof H?"SafePropertyRead":s.type}function Ot({start:s,end:e},t){let r=s,n=e;for(;n!==r&&/\s/.test(t[n-1]);)n--;for(;r!==n&&/\s/.test(t[r]);)r++;return{start:r,end:n}}function Xr({start:s,end:e},t){let r=s,n=e;for(;n!==t.length&&/\s/.test(t[n]);)n++;for(;r!==0&&/\s/.test(t[r-1]);)r--;return{start:r,end:n}}function Zr(s,e){return e[s.start-1]==="("&&e[s.end]===")"?{start:s.start-1,end:s.end+1}:s}function Bt(s,e,t){let r=0,n={start:s.start,end:s.end};for(;;){let i=Xr(n,e),a=Zr(i,e);if(i.start===a.start&&i.end===a.end)break;n.start=a.start,n.end=a.end,r++}return{hasParens:(t?r-1:r)!==0,outerSpan:Ot(t?{start:n.start+1,end:n.end-1}:n,e),innerSpan:Ot(s,e)}}function Kt(s,e,t){let r=e;for(;!s.test(t[r]);)if(--r<0)throw new Error(`Cannot find front char ${s} from index ${e} in ${JSON.stringify(t)}`);return r}function Ie(s,e,t){let r=e;for(;!s.test(t[r]);)if(++r>=t.length)throw new Error(`Cannot find back char ${s} from index ${e} in ${JSON.stringify(t)}`);return r}function Tt(s){return s.slice(0,1).toLowerCase()+s.slice(1)}function Mt(s){return s.length===0?void 0:s[s.length-1]}var Nt,ze,He,qe,Pe=E(()=>{ke();ke();Nt="angular-estree-parser",ze="NgEstreeParser",He=0,qe=[Nt,He]});function Re(s,e,t=!1,r=!1){if(!t){let{start:h,end:v}=s;return{start:h,end:v,loc:{start:e.locator.locationForIndex(h),end:e.locator.locationForIndex(v)}}}let{outerSpan:n,innerSpan:i,hasParens:a}=Bt(s,e.text,r);return{start:i.start,end:i.end,loc:{start:e.locator.locationForIndex(i.start),end:e.locator.locationForIndex(i.end)},...a&&{extra:{parenthesized:!0,parenStart:n.start,parenEnd:n.end}}}}var ue,Ze=E(()=>{Pe();ue=(s,e,t=!1)=>{let r=_t(s);switch(r){case"Unary":{let{operator:c,expr:o}=s,x=n(o);return a("UnaryExpression",{prefix:!0,argument:x,operator:c},s.sourceSpan,{hasParentParens:t})}case"Binary":{let{left:c,operation:o,right:x}=s,p=n(c),u=n(x);return a(o==="&&"||o==="||"||o==="??"?"LogicalExpression":"BinaryExpression",{left:p,right:u,operator:o},{start:y(p),end:m(u)},{hasParentParens:t})}case"BindingPipe":{let{exp:c,name:o,args:x}=s,p=n(c),u=f(/\S/,f(/\|/,m(p))+1),g=a("Identifier",{name:o},{start:u,end:u+o.length}),l=x.map(n);return a("NGPipeExpression",{left:p,right:g,arguments:l},{start:y(p),end:m(l.length===0?g:Mt(l))},{hasParentParens:t})}case"Chain":{let{expressions:c}=s;return a("NGChainedExpression",{expressions:c.map(n)},s.sourceSpan,{hasParentParens:t})}case"Comment":{let{value:c}=s;return a("CommentLine",{value:c},s.sourceSpan,{processSpan:!1})}case"Conditional":{let{condition:c,trueExp:o,falseExp:x}=s,p=n(c),u=n(o),g=n(x);return a("ConditionalExpression",{test:p,consequent:u,alternate:g},{start:y(p),end:m(g)},{hasParentParens:t})}case"EmptyExpr":return a("NGEmptyExpression",{},s.sourceSpan,{hasParentParens:t});case"ImplicitReceiver":return a("ThisExpression",{},s.sourceSpan,{hasParentParens:t});case"KeyedRead":case"SafeKeyedRead":{let c=r==="SafeKeyedRead",{key:o}=s,x=Object.prototype.hasOwnProperty.call(s,"receiver")?s.receiver:s.obj,p=n(o);return h(x,p,{computed:!0,optional:c},{end:s.sourceSpan.end,hasParentParens:t})}case"LiteralArray":{let{expressions:c}=s;return a("ArrayExpression",{elements:c.map(n)},s.sourceSpan,{hasParentParens:t})}case"LiteralMap":{let{keys:c,values:o}=s,x=o.map(u=>n(u)),p=c.map(({key:u,quoted:g},l)=>{let N=x[l],le=y(N),tt=m(N),be=f(/\S/,l===0?s.sourceSpan.start+1:f(/,/,m(x[l-1]))+1),Jt=le===be?tt:v(/\S/,v(/:/,le-1)-1)+1,rt={start:be,end:Jt},Se=g?a("StringLiteral",{value:u},rt):a("Identifier",{name:u},rt),Yt=Se.end<Se.start||be===le;return a("ObjectProperty",{key:Se,value:N,shorthand:Yt,computed:!1},{start:y(Se),end:tt})});return a("ObjectExpression",{properties:p},s.sourceSpan,{hasParentParens:t})}case"LiteralPrimitive":{let{value:c}=s;switch(typeof c){case"boolean":return a("BooleanLiteral",{value:c},s.sourceSpan,{hasParentParens:t});case"number":return a("NumericLiteral",{value:c},s.sourceSpan,{hasParentParens:t});case"object":return a("NullLiteral",{},s.sourceSpan,{hasParentParens:t});case"string":return a("StringLiteral",{value:c},s.sourceSpan,{hasParentParens:t});case"undefined":return a("Identifier",{name:"undefined"},s.sourceSpan,{hasParentParens:t});default:throw new Error(`Unexpected LiteralPrimitive value type ${typeof c}`)}}case"Call":case"SafeCall":{let c=r==="SafeCall",{receiver:o,args:x}=s,p=x.length===1?[i(x[0])]:x.map(n),u=n(o),g=I(u),l=c||g?"OptionalCallExpression":"CallExpression";return a(l,{callee:u,arguments:p,optional:l==="OptionalCallExpression"?c:void 0},{start:y(u),end:s.sourceSpan.end},{hasParentParens:t})}case"NonNullAssert":{let{expression:c}=s,o=n(c);return a("TSNonNullExpression",{expression:o},{start:y(o),end:s.sourceSpan.end},{hasParentParens:t})}case"PrefixNot":{let{expression:c}=s,o=n(c);return a("UnaryExpression",{prefix:!0,operator:"!",argument:o},{start:s.sourceSpan.start,end:m(o)},{hasParentParens:t})}case"PropertyRead":case"SafePropertyRead":{let c=r==="SafePropertyRead",{receiver:o,name:x}=s,p=v(/\S/,s.sourceSpan.end-1)+1,u=a("Identifier",{name:x},{start:p-x.length,end:p},w(o)?{hasParentParens:t}:{});return h(o,u,{computed:!1,optional:c},{hasParentParens:t})}case"KeyedWrite":{let{key:c,value:o}=s,x=Object.prototype.hasOwnProperty.call(s,"receiver")?s.receiver:s.obj,p=n(c),u=n(o),g=h(x,p,{computed:!0,optional:!1},{end:f(/\]/,m(p))+1});return a("AssignmentExpression",{left:g,operator:"=",right:u},{start:y(g),end:m(u)},{hasParentParens:t})}case"PropertyWrite":{let{receiver:c,name:o,value:x}=s,p=n(x),u=v(/\S/,v(/=/,y(p)-1)-1)+1,g=a("Identifier",{name:o},{start:u-o.length,end:u}),l=h(c,g,{computed:!1,optional:!1});return a("AssignmentExpression",{left:l,operator:"=",right:p},{start:y(l),end:m(p)},{hasParentParens:t})}default:throw new Error(`Unexpected node ${r}`)}function n(c){return ue(c,e)}function i(c){return ue(c,e,!0)}function a(c,o,x,{processSpan:p=!0,hasParentParens:u=!1}={}){let g={type:c,...Re(x,e,p,u),...o};switch(c){case"NumericLiteral":{let l=g;l.extra={...l.extra,raw:e.text.slice(l.start,l.end),rawValue:l.value};break}case"StringLiteral":{let l=g;l.extra={...l.extra,raw:e.text.slice(l.start,l.end),rawValue:l.value};break}case"ObjectProperty":{let l=g;l.shorthand&&(l.extra={...l.extra,shorthand:l.shorthand});break}}return g}function h(c,o,x,{end:p=m(o),hasParentParens:u=!1}={}){if(w(c)||c.sourceSpan.start===o.start)return o;let g=n(c),l=I(g);return a(x.optional||l?"OptionalMemberExpression":"MemberExpression",{object:g,property:o,computed:x.computed,...x.optional?{optional:!0}:l?{optional:!1}:null},{start:y(g),end:p},{hasParentParens:u})}function v(c,o){return Kt(c,o,e.text)}function f(c,o){return Ie(c,o,e.text)}function w(c){return c.sourceSpan.start>=c.sourceSpan.end||/^\s+$/.test(e.text.slice(c.sourceSpan.start,c.sourceSpan.end))}function I(c){return(c.type==="OptionalCallExpression"||c.type==="OptionalMemberExpression")&&!O(c)}function O(c){return c.extra&&c.extra.parenthesized}function y(c){return O(c)?c.extra.parenStart:c.start}function m(c){return O(c)?c.extra.parenEnd:c.end}}});function Ft(s,e){s.forEach(y);let[t]=s,{key:r}=t,n=e.text.slice(t.sourceSpan.start,t.sourceSpan.end).trim().length===0?s.slice(1):s,i=[],a=null;for(let o=0;o<n.length;o++){let x=n[o];if(a&&I(a)&&O(x)&&x.value&&x.value.source===a.key.source){let p=f("NGMicrosyntaxKey",{name:x.key.source},x.key.span),u=(N,le)=>({...N,...Re({start:N.start,end:le},e)}),g=N=>({...u(N,p.end),alias:p}),l=i.pop();if(l.type==="NGMicrosyntaxExpression")i.push(g(l));else if(l.type==="NGMicrosyntaxKeyedExpression"){let N=g(l.expression);i.push(u({...l,expression:N},N.end))}else throw new Error(`Unexpected type ${l.type}`)}else i.push(h(x,o));a=x}return f("NGMicrosyntax",{body:i},i.length===0?s[0].sourceSpan:{start:i[0].start,end:i[i.length-1].end});function h(o,x){if(I(o)){let{key:p,value:u}=o;return u?x===0?f("NGMicrosyntaxExpression",{expression:v(u.ast),alias:null},u.sourceSpan):f("NGMicrosyntaxKeyedExpression",{key:f("NGMicrosyntaxKey",{name:w(p.source)},p.span),expression:f("NGMicrosyntaxExpression",{expression:v(u.ast),alias:null},u.sourceSpan)},{start:p.span.start,end:u.sourceSpan.end}):f("NGMicrosyntaxKey",{name:w(p.source)},p.span)}else{let{key:p,sourceSpan:u}=o;if(/^let\s$/.test(e.text.slice(u.start,u.start+4))){let{value:l}=o;return f("NGMicrosyntaxLet",{key:f("NGMicrosyntaxKey",{name:p.source},p.span),value:l?f("NGMicrosyntaxKey",{name:l.source},l.span):null},{start:u.start,end:l?l.span.end:p.span.end})}else{let l=c(o);return f("NGMicrosyntaxAs",{key:f("NGMicrosyntaxKey",{name:l.source},l.span),alias:f("NGMicrosyntaxKey",{name:p.source},p.span)},{start:l.span.start,end:p.span.end})}}}function v(o){return ue(o,e)}function f(o,x,p,u=!0){return{type:o,...Re(p,e,u),...x}}function w(o){return Tt(o.slice(r.source.length))}function I(o){return o instanceof ne}function O(o){return o instanceof T}function y(o){m(o.key.span),O(o)&&o.value&&m(o.value.span)}function m(o){if(e.text[o.start]!=='"'&&e.text[o.start]!=="'")return;let x=e.text[o.start],p=!1;for(let u=o.start+1;u<e.text.length;u++)switch(e.text[u]){case x:if(!p){o.end=u+1;return}default:p=!1;break;case"\\":p=!p;break}}function c(o){if(!o.value||o.value.source!==ze)return o.value;let x=Ie(/\S/,o.sourceSpan.start,e.text);return{source:"$implicit",span:{start:x,end:x}}}}var Ut=E(()=>{ke();Ze();Pe()});function Je(s,e){let{ast:t,comments:r}=e(s),n=new xe(s),i=h=>ue(h,n),a=i(t);return a.comments=r.map(h=>i(h)),a}function Gt(s){return Je(s,It)}function Dt(s){return Je(s,Rt)}function Ye(s){return Je(s,Pt)}function Vt(s){return Ft(Lt(s),new xe(s))}var Wt=E(()=>{ct();Ze();Ut();Pe()});function Jr(s){return Array.isArray(s)&&s.length>0}var Qt,jt=E(()=>{Qt=Jr});function et(s){var r;let e=s.range?s.range[0]:s.start,t=((r=s.declaration)==null?void 0:r.decorators)??s.decorators;return Qt(t)?Math.min(et(t[0]),e):e}function Ht(s){return s.range?s.range[1]:s.end}var zt=E(()=>{jt()});var qt={};st(qt,{__ng_action:()=>Yr,__ng_binding:()=>es,__ng_directive:()=>rs,__ng_interpolation:()=>ts});function Le(s){return{astFormat:"estree",parse(e){let t=s(e);return{type:"NGRoot",node:s===Ye&&t.type!=="NGChainedExpression"?{...t,type:"NGChainedExpression",expressions:[t]}:t}},locStart:et,locEnd:Ht}}var Yr,es,ts,rs,Xt=E(()=>{Wt();zt();Yr=Le(Ye),es=Le(Gt),ts=Le(Dt),rs=Le(Vt)});var ns={};st(ns,{default:()=>ss,parsers:()=>Zt});function ir(s){let e=Object.create(null);for(let{importParsers:t,parserNames:r}of s)for(let n of r)e[n]=async()=>Object.assign(e,await t())[n];return e}var nt=ir;var Zt=nt([{importParsers:()=>Promise.resolve().then(()=>(Xt(),qt)),parserNames:["__ng_action","__ng_binding","__ng_interpolation","__ng_directive"]}]),ss={parsers:Zt};return nr(ns);});
@@ -1,2 +1,2 @@
1
- var cs=Object.create;var _e=Object.defineProperty;var hs=Object.getOwnPropertyDescriptor;var ps=Object.getOwnPropertyNames;var us=Object.getPrototypeOf,ls=Object.prototype.hasOwnProperty;var j=(r,e)=>()=>(r&&(e=r(r=0)),e);var le=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports),Ze=(r,e)=>{for(var t in e)_e(r,t,{get:e[t],enumerable:!0})},Pt=(r,e,t,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of ps(e))!ls.call(r,n)&&n!==t&&_e(r,n,{get:()=>e[n],enumerable:!(s=hs(e,n))||s.enumerable});return r};var ds=(r,e,t)=>(t=r!=null?cs(us(r)):{},Pt(e||!r||!r.__esModule?_e(t,"default",{value:r,enumerable:!0}):t,r)),be=r=>Pt(_e({},"__esModule",{value:!0}),r);var m=j(()=>{});var bt=le(we=>{"use strict";m();we.__esModule=!0;we.LinesAndColumns=void 0;var Be=`
2
- `,Lt="\r",_t=function(){function r(e){this.string=e;for(var t=[0],s=0;s<e.length;)switch(e[s]){case Be:s+=Be.length,t.push(s);break;case Lt:s+=Lt.length,e[s]===Be&&(s+=Be.length),t.push(s);break;default:s++;break}this.offsets=t}return r.prototype.locationForIndex=function(e){if(e<0||e>this.string.length)return null;for(var t=0,s=this.offsets;s[t+1]<=e;)t++;var n=e-s[t];return{line:t,column:n}},r.prototype.indexForLocation=function(e){var t=e.line,s=e.column;return t<0||t>=this.offsets.length||s<0||s>this.lengthOfLine(t)?null:this.offsets[t]+s},r.prototype.lengthOfLine=function(e){var t=this.offsets[e],s=e===this.offsets.length-1?this.string.length:this.offsets[e+1];return s-t},r}();we.LinesAndColumns=_t;we.default=_t});var Bt=le(Te=>{"use strict";m();Object.defineProperty(Te,"__esModule",{value:!0});Te.Context=void 0;var fs=bt(),Ye=class{constructor(e){this.text=e,this.locator=new et(this.text)}};Te.Context=Ye;var et=class{constructor(e){this._lineAndColumn=new fs.default(e)}locationForIndex(e){let{line:t,column:s}=this._lineAndColumn.locationForIndex(e);return{line:t+1,column:s}}}});var ot={};Ze(ot,{AST:()=>E,ASTWithName:()=>M,ASTWithSource:()=>K,AbsoluteSourceSpan:()=>B,AstMemoryEfficientTransformer:()=>st,AstTransformer:()=>tt,Binary:()=>I,BindingPipe:()=>Y,BoundElementProperty:()=>at,Chain:()=>V,Conditional:()=>q,EmptyExpr:()=>R,ExpressionBinding:()=>Ee,FunctionCall:()=>oe,ImplicitReceiver:()=>W,Interpolation:()=>se,KeyedRead:()=>X,KeyedWrite:()=>J,LiteralArray:()=>ee,LiteralMap:()=>te,LiteralPrimitive:()=>P,MethodCall:()=>ie,NonNullAssert:()=>ne,ParseSpan:()=>T,ParsedEvent:()=>nt,ParsedProperty:()=>rt,ParsedPropertyType:()=>Ce,ParsedVariable:()=>it,ParserError:()=>Q,PrefixNot:()=>re,PropertyRead:()=>F,PropertyWrite:()=>H,Quote:()=>de,RecursiveAstVisitor:()=>Ae,SafeKeyedRead:()=>Z,SafeMethodCall:()=>ae,SafePropertyRead:()=>z,ThisReceiver:()=>ye,Unary:()=>L,VariableBinding:()=>xe});var Q,T,E,M,de,R,W,ye,V,q,F,H,z,X,Z,J,Y,P,ee,te,se,I,L,re,ne,ie,ae,oe,B,K,xe,Ee,Ae,tt,st,rt,Ce,nt,it,at,Ke=j(()=>{m();Q=class{constructor(e,t,s,n){this.input=t,this.errLocation=s,this.ctxLocation=n,this.message=`Parser Error: ${e} ${s} [${t}] in ${n}`}},T=class{constructor(e,t){this.start=e,this.end=t}toAbsolute(e){return new B(e+this.start,e+this.end)}},E=class{constructor(e,t){this.span=e,this.sourceSpan=t}toString(){return"AST"}},M=class extends E{constructor(e,t,s){super(e,t),this.nameSpan=s}},de=class extends E{constructor(e,t,s,n,i){super(e,t),this.prefix=s,this.uninterpretedExpression=n,this.location=i}visit(e,t=null){return e.visitQuote(this,t)}toString(){return"Quote"}},R=class extends E{visit(e,t=null){}},W=class extends E{visit(e,t=null){return e.visitImplicitReceiver(this,t)}},ye=class extends W{visit(e,t=null){var s;return(s=e.visitThisReceiver)===null||s===void 0?void 0:s.call(e,this,t)}},V=class extends E{constructor(e,t,s){super(e,t),this.expressions=s}visit(e,t=null){return e.visitChain(this,t)}},q=class extends E{constructor(e,t,s,n,i){super(e,t),this.condition=s,this.trueExp=n,this.falseExp=i}visit(e,t=null){return e.visitConditional(this,t)}},F=class extends M{constructor(e,t,s,n,i){super(e,t,s),this.receiver=n,this.name=i}visit(e,t=null){return e.visitPropertyRead(this,t)}},H=class extends M{constructor(e,t,s,n,i,a){super(e,t,s),this.receiver=n,this.name=i,this.value=a}visit(e,t=null){return e.visitPropertyWrite(this,t)}},z=class extends M{constructor(e,t,s,n,i){super(e,t,s),this.receiver=n,this.name=i}visit(e,t=null){return e.visitSafePropertyRead(this,t)}},X=class extends E{constructor(e,t,s,n){super(e,t),this.receiver=s,this.key=n}visit(e,t=null){return e.visitKeyedRead(this,t)}},Z=class extends E{constructor(e,t,s,n){super(e,t),this.receiver=s,this.key=n}visit(e,t=null){return e.visitSafeKeyedRead(this,t)}},J=class extends E{constructor(e,t,s,n,i){super(e,t),this.receiver=s,this.key=n,this.value=i}visit(e,t=null){return e.visitKeyedWrite(this,t)}},Y=class extends M{constructor(e,t,s,n,i,a){super(e,t,a),this.exp=s,this.name=n,this.args=i}visit(e,t=null){return e.visitPipe(this,t)}},P=class extends E{constructor(e,t,s){super(e,t),this.value=s}visit(e,t=null){return e.visitLiteralPrimitive(this,t)}},ee=class extends E{constructor(e,t,s){super(e,t),this.expressions=s}visit(e,t=null){return e.visitLiteralArray(this,t)}},te=class extends E{constructor(e,t,s,n){super(e,t),this.keys=s,this.values=n}visit(e,t=null){return e.visitLiteralMap(this,t)}},se=class extends E{constructor(e,t,s,n){super(e,t),this.strings=s,this.expressions=n}visit(e,t=null){return e.visitInterpolation(this,t)}},I=class extends E{constructor(e,t,s,n,i){super(e,t),this.operation=s,this.left=n,this.right=i}visit(e,t=null){return e.visitBinary(this,t)}},L=class extends I{constructor(e,t,s,n,i,a,h){super(e,t,i,a,h),this.operator=s,this.expr=n}static createMinus(e,t,s){return new L(e,t,"-",s,"-",new P(e,t,0),s)}static createPlus(e,t,s){return new L(e,t,"+",s,"-",s,new P(e,t,0))}visit(e,t=null){return e.visitUnary!==void 0?e.visitUnary(this,t):e.visitBinary(this,t)}},re=class extends E{constructor(e,t,s){super(e,t),this.expression=s}visit(e,t=null){return e.visitPrefixNot(this,t)}},ne=class extends E{constructor(e,t,s){super(e,t),this.expression=s}visit(e,t=null){return e.visitNonNullAssert(this,t)}},ie=class extends M{constructor(e,t,s,n,i,a,h){super(e,t,s),this.receiver=n,this.name=i,this.args=a,this.argumentSpan=h}visit(e,t=null){return e.visitMethodCall(this,t)}},ae=class extends M{constructor(e,t,s,n,i,a,h){super(e,t,s),this.receiver=n,this.name=i,this.args=a,this.argumentSpan=h}visit(e,t=null){return e.visitSafeMethodCall(this,t)}},oe=class extends E{constructor(e,t,s,n){super(e,t),this.target=s,this.args=n}visit(e,t=null){return e.visitFunctionCall(this,t)}},B=class{constructor(e,t){this.start=e,this.end=t}},K=class extends E{constructor(e,t,s,n,i){super(new T(0,t===null?0:t.length),new B(n,t===null?n:n+t.length)),this.ast=e,this.source=t,this.location=s,this.errors=i}visit(e,t=null){return e.visitASTWithSource?e.visitASTWithSource(this,t):this.ast.visit(e,t)}toString(){return`${this.source} in ${this.location}`}},xe=class{constructor(e,t,s){this.sourceSpan=e,this.key=t,this.value=s}},Ee=class{constructor(e,t,s){this.sourceSpan=e,this.key=t,this.value=s}},Ae=class{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.receiver,t),this.visit(e.key,t)}visitKeyedWrite(e,t){this.visit(e.receiver,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)}visitSafeKeyedRead(e,t){this.visit(e.receiver,t),this.visit(e.key,t)}visitQuote(e,t){}visitAll(e,t){for(let s of e)this.visit(s,t)}},tt=class{visitImplicitReceiver(e,t){return e}visitThisReceiver(e,t){return e}visitInterpolation(e,t){return new se(e.span,e.sourceSpan,e.strings,this.visitAll(e.expressions))}visitLiteralPrimitive(e,t){return new P(e.span,e.sourceSpan,e.value)}visitPropertyRead(e,t){return new F(e.span,e.sourceSpan,e.nameSpan,e.receiver.visit(this),e.name)}visitPropertyWrite(e,t){return new H(e.span,e.sourceSpan,e.nameSpan,e.receiver.visit(this),e.name,e.value.visit(this))}visitSafePropertyRead(e,t){return new z(e.span,e.sourceSpan,e.nameSpan,e.receiver.visit(this),e.name)}visitMethodCall(e,t){return new ie(e.span,e.sourceSpan,e.nameSpan,e.receiver.visit(this),e.name,this.visitAll(e.args),e.argumentSpan)}visitSafeMethodCall(e,t){return new ae(e.span,e.sourceSpan,e.nameSpan,e.receiver.visit(this),e.name,this.visitAll(e.args),e.argumentSpan)}visitFunctionCall(e,t){return new oe(e.span,e.sourceSpan,e.target.visit(this),this.visitAll(e.args))}visitLiteralArray(e,t){return new ee(e.span,e.sourceSpan,this.visitAll(e.expressions))}visitLiteralMap(e,t){return new te(e.span,e.sourceSpan,e.keys,this.visitAll(e.values))}visitUnary(e,t){switch(e.operator){case"+":return L.createPlus(e.span,e.sourceSpan,e.expr.visit(this));case"-":return L.createMinus(e.span,e.sourceSpan,e.expr.visit(this));default:throw new Error(`Unknown unary operator ${e.operator}`)}}visitBinary(e,t){return new I(e.span,e.sourceSpan,e.operation,e.left.visit(this),e.right.visit(this))}visitPrefixNot(e,t){return new re(e.span,e.sourceSpan,e.expression.visit(this))}visitNonNullAssert(e,t){return new ne(e.span,e.sourceSpan,e.expression.visit(this))}visitConditional(e,t){return new q(e.span,e.sourceSpan,e.condition.visit(this),e.trueExp.visit(this),e.falseExp.visit(this))}visitPipe(e,t){return new Y(e.span,e.sourceSpan,e.exp.visit(this),e.name,this.visitAll(e.args),e.nameSpan)}visitKeyedRead(e,t){return new X(e.span,e.sourceSpan,e.receiver.visit(this),e.key.visit(this))}visitKeyedWrite(e,t){return new J(e.span,e.sourceSpan,e.receiver.visit(this),e.key.visit(this),e.value.visit(this))}visitAll(e){let t=[];for(let s=0;s<e.length;++s)t[s]=e[s].visit(this);return t}visitChain(e,t){return new V(e.span,e.sourceSpan,this.visitAll(e.expressions))}visitQuote(e,t){return new de(e.span,e.sourceSpan,e.prefix,e.uninterpretedExpression,e.location)}visitSafeKeyedRead(e,t){return new Z(e.span,e.sourceSpan,e.receiver.visit(this),e.key.visit(this))}},st=class{visitImplicitReceiver(e,t){return e}visitThisReceiver(e,t){return e}visitInterpolation(e,t){let s=this.visitAll(e.expressions);return s!==e.expressions?new se(e.span,e.sourceSpan,e.strings,s):e}visitLiteralPrimitive(e,t){return e}visitPropertyRead(e,t){let s=e.receiver.visit(this);return s!==e.receiver?new F(e.span,e.sourceSpan,e.nameSpan,s,e.name):e}visitPropertyWrite(e,t){let s=e.receiver.visit(this),n=e.value.visit(this);return s!==e.receiver||n!==e.value?new H(e.span,e.sourceSpan,e.nameSpan,s,e.name,n):e}visitSafePropertyRead(e,t){let s=e.receiver.visit(this);return s!==e.receiver?new z(e.span,e.sourceSpan,e.nameSpan,s,e.name):e}visitMethodCall(e,t){let s=e.receiver.visit(this),n=this.visitAll(e.args);return s!==e.receiver||n!==e.args?new ie(e.span,e.sourceSpan,e.nameSpan,s,e.name,n,e.argumentSpan):e}visitSafeMethodCall(e,t){let s=e.receiver.visit(this),n=this.visitAll(e.args);return s!==e.receiver||n!==e.args?new ae(e.span,e.sourceSpan,e.nameSpan,s,e.name,n,e.argumentSpan):e}visitFunctionCall(e,t){let s=e.target&&e.target.visit(this),n=this.visitAll(e.args);return s!==e.target||n!==e.args?new oe(e.span,e.sourceSpan,s,n):e}visitLiteralArray(e,t){let s=this.visitAll(e.expressions);return s!==e.expressions?new ee(e.span,e.sourceSpan,s):e}visitLiteralMap(e,t){let s=this.visitAll(e.values);return s!==e.values?new te(e.span,e.sourceSpan,e.keys,s):e}visitUnary(e,t){let s=e.expr.visit(this);if(s!==e.expr)switch(e.operator){case"+":return L.createPlus(e.span,e.sourceSpan,s);case"-":return L.createMinus(e.span,e.sourceSpan,s);default:throw new Error(`Unknown unary operator ${e.operator}`)}return e}visitBinary(e,t){let s=e.left.visit(this),n=e.right.visit(this);return s!==e.left||n!==e.right?new I(e.span,e.sourceSpan,e.operation,s,n):e}visitPrefixNot(e,t){let s=e.expression.visit(this);return s!==e.expression?new re(e.span,e.sourceSpan,s):e}visitNonNullAssert(e,t){let s=e.expression.visit(this);return s!==e.expression?new ne(e.span,e.sourceSpan,s):e}visitConditional(e,t){let s=e.condition.visit(this),n=e.trueExp.visit(this),i=e.falseExp.visit(this);return s!==e.condition||n!==e.trueExp||i!==e.falseExp?new q(e.span,e.sourceSpan,s,n,i):e}visitPipe(e,t){let s=e.exp.visit(this),n=this.visitAll(e.args);return s!==e.exp||n!==e.args?new Y(e.span,e.sourceSpan,s,e.name,n,e.nameSpan):e}visitKeyedRead(e,t){let s=e.receiver.visit(this),n=e.key.visit(this);return s!==e.receiver||n!==e.key?new X(e.span,e.sourceSpan,s,n):e}visitKeyedWrite(e,t){let s=e.receiver.visit(this),n=e.key.visit(this),i=e.value.visit(this);return s!==e.receiver||n!==e.key||i!==e.value?new J(e.span,e.sourceSpan,s,n,i):e}visitAll(e){let t=[],s=!1;for(let n=0;n<e.length;++n){let i=e[n],a=i.visit(this);t[n]=a,s=s||a!==i}return s?t:e}visitChain(e,t){let s=this.visitAll(e.expressions);return s!==e.expressions?new V(e.span,e.sourceSpan,s):e}visitQuote(e,t){return e}visitSafeKeyedRead(e,t){let s=e.receiver.visit(this),n=e.key.visit(this);return s!==e.receiver||n!==e.key?new Z(e.span,e.sourceSpan,s,n):e}},rt=class{constructor(e,t,s,n,i,a){this.name=e,this.expression=t,this.type=s,this.sourceSpan=n,this.keySpan=i,this.valueSpan=a,this.isLiteral=this.type===Ce.LITERAL_ATTR,this.isAnimation=this.type===Ce.ANIMATION}};(function(r){r[r.DEFAULT=0]="DEFAULT",r[r.LITERAL_ATTR=1]="LITERAL_ATTR",r[r.ANIMATION=2]="ANIMATION"})(Ce||(Ce={}));nt=class{constructor(e,t,s,n,i,a,h){this.name=e,this.targetOrPhase=t,this.type=s,this.handler=n,this.sourceSpan=i,this.handlerSpan=a,this.keySpan=h}},it=class{constructor(e,t,s,n,i){this.name=e,this.value=t,this.sourceSpan=s,this.keySpan=n,this.valueSpan=i}},at=class{constructor(e,t,s,n,i,a,h,x){this.name=e,this.type=t,this.securityContext=s,this.value=n,this.unit=i,this.sourceSpan=a,this.keySpan=h,this.valueSpan=x}}});function Tt(r){return r>=9&&r<=32||r==160}function U(r){return 48<=r&&r<=57}function Kt(r){return r>=97&&r<=122||r>=65&&r<=90}function ct(r){return r===39||r===34||r===96}var ht=j(()=>{m();});var Vt={};Ze(Vt,{EOF:()=>ke,Lexer:()=>ut,Token:()=>_,TokenType:()=>f,isIdentifier:()=>ft});function Dt(r,e,t){return new _(r,e,f.Character,t,String.fromCharCode(t))}function Vs(r,e,t){return new _(r,e,f.Identifier,0,t)}function qs(r,e,t){return new _(r,e,f.PrivateIdentifier,0,t)}function Hs(r,e,t){return new _(r,e,f.Keyword,0,t)}function pt(r,e,t){return new _(r,e,f.Operator,0,t)}function zs(r,e,t){return new _(r,e,f.String,0,t)}function Xs(r,e,t){return new _(r,e,f.Number,t,"")}function Zs(r,e,t){return new _(r,e,f.Error,0,t)}function lt(r){return 97<=r&&r<=122||65<=r&&r<=90||r==95||r==36}function ft(r){if(r.length==0)return!1;let e=new Ue(r);if(!lt(e.peek))return!1;for(e.advance();e.peek!==0;){if(!dt(e.peek))return!1;e.advance()}return!0}function dt(r){return Kt(r)||U(r)||r==95||r==36}function Js(r){return r==101||r==69}function Ys(r){return r==45||r==43}function er(r){switch(r){case 110:return 10;case 102:return 12;case 114:return 13;case 116:return 9;case 118:return 11;default:return r}}function tr(r){let e=parseInt(r);if(isNaN(e))throw new Error("Invalid integer literal when parsing "+r);return e}var f,Ws,ut,_,ke,Ue,vt=j(()=>{m();ht();(function(r){r[r.Character=0]="Character",r[r.Identifier=1]="Identifier",r[r.PrivateIdentifier=2]="PrivateIdentifier",r[r.Keyword=3]="Keyword",r[r.String=4]="String",r[r.Operator=5]="Operator",r[r.Number=6]="Number",r[r.Error=7]="Error"})(f||(f={}));Ws=["var","let","as","null","undefined","true","false","if","else","this"],ut=class{tokenize(e){let t=new Ue(e),s=[],n=t.scanToken();for(;n!=null;)s.push(n),n=t.scanToken();return s}},_=class{constructor(e,t,s,n,i){this.index=e,this.end=t,this.type=s,this.numValue=n,this.strValue=i}isCharacter(e){return this.type==f.Character&&this.numValue==e}isNumber(){return this.type==f.Number}isString(){return this.type==f.String}isOperator(e){return this.type==f.Operator&&this.strValue==e}isIdentifier(){return this.type==f.Identifier}isPrivateIdentifier(){return this.type==f.PrivateIdentifier}isKeyword(){return this.type==f.Keyword}isKeywordLet(){return this.type==f.Keyword&&this.strValue=="let"}isKeywordAs(){return this.type==f.Keyword&&this.strValue=="as"}isKeywordNull(){return this.type==f.Keyword&&this.strValue=="null"}isKeywordUndefined(){return this.type==f.Keyword&&this.strValue=="undefined"}isKeywordTrue(){return this.type==f.Keyword&&this.strValue=="true"}isKeywordFalse(){return this.type==f.Keyword&&this.strValue=="false"}isKeywordThis(){return this.type==f.Keyword&&this.strValue=="this"}isError(){return this.type==f.Error}toNumber(){return this.type==f.Number?this.numValue:-1}toString(){switch(this.type){case f.Character:case f.Identifier:case f.Keyword:case f.Operator:case f.PrivateIdentifier:case f.String:case f.Error:return this.strValue;case f.Number:return this.numValue.toString();default:return null}}};ke=new _(-1,-1,f.Character,0,""),Ue=class{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(){let e=this.input,t=this.length,s=this.peek,n=this.index;for(;s<=32;)if(++n>=t){s=0;break}else s=e.charCodeAt(n);if(this.peek=s,this.index=n,n>=t)return null;if(lt(s))return this.scanIdentifier();if(U(s))return this.scanNumber(n);let i=n;switch(s){case 46:return this.advance(),U(this.peek)?this.scanNumber(i):Dt(i,this.index,46);case 40:case 41:case 123:case 125:case 91:case 93:case 44:case 58:case 59:return this.scanCharacter(i,s);case 39:case 34:return this.scanString();case 35:return this.scanPrivateIdentifier();case 43:case 45:case 42:case 47:case 37:case 94:return this.scanOperator(i,String.fromCharCode(s));case 63:return this.scanQuestion(i);case 60:case 62:return this.scanComplexOperator(i,String.fromCharCode(s),61,"=");case 33:case 61:return this.scanComplexOperator(i,String.fromCharCode(s),61,"=",61,"=");case 38:return this.scanComplexOperator(i,"&",38,"&");case 124:return this.scanComplexOperator(i,"|",124,"|");case 160:for(;Tt(this.peek);)this.advance();return this.scanToken()}return this.advance(),this.error(`Unexpected character [${String.fromCharCode(s)}]`,0)}scanCharacter(e,t){return this.advance(),Dt(e,this.index,t)}scanOperator(e,t){return this.advance(),pt(e,this.index,t)}scanComplexOperator(e,t,s,n,i,a){this.advance();let h=t;return this.peek==s&&(this.advance(),h+=n),i!=null&&this.peek==i&&(this.advance(),h+=a),pt(e,this.index,h)}scanIdentifier(){let e=this.index;for(this.advance();dt(this.peek);)this.advance();let t=this.input.substring(e,this.index);return Ws.indexOf(t)>-1?Hs(e,this.index,t):Vs(e,this.index,t)}scanPrivateIdentifier(){let e=this.index;if(this.advance(),!lt(this.peek))return this.error("Invalid character [#]",-1);for(;dt(this.peek);)this.advance();let t=this.input.substring(e,this.index);return qs(e,this.index,t)}scanNumber(e){let t=this.index===e,s=!1;for(this.advance();;){if(!U(this.peek))if(this.peek===95){if(!U(this.input.charCodeAt(this.index-1))||!U(this.input.charCodeAt(this.index+1)))return this.error("Invalid numeric separator",0);s=!0}else if(this.peek===46)t=!1;else if(Js(this.peek)){if(this.advance(),Ys(this.peek)&&this.advance(),!U(this.peek))return this.error("Invalid exponent",-1);t=!1}else break;this.advance()}let n=this.input.substring(e,this.index);s&&(n=n.replace(/_/g,""));let i=t?tr(n):parseFloat(n);return Xs(e,this.index,i)}scanString(){let e=this.index,t=this.peek;this.advance();let s="",n=this.index,i=this.input;for(;this.peek!=t;)if(this.peek==92){s+=i.substring(n,this.index),this.advance();let h;if(this.peek=this.peek,this.peek==117){let x=i.substring(this.index+1,this.index+5);if(/^[0-9a-f]+$/i.test(x))h=parseInt(x,16);else return this.error(`Invalid unicode escape [\\u${x}]`,0);for(let v=0;v<5;v++)this.advance()}else h=er(this.peek),this.advance();s+=String.fromCharCode(h),n=this.index}else{if(this.peek==0)return this.error("Unterminated quote",0);this.advance()}let a=i.substring(n,this.index);return this.advance(),zs(e,this.index,s+a)}scanQuestion(e){this.advance();let t="?";return(this.peek===63||this.peek===46)&&(t+=this.peek===46?".":"?",this.advance()),pt(e,this.index,t)}error(e,t){let s=this.index+t;return Zs(s,this.index,`Lexer Error: ${e} at column ${s} in expression [${this.input}]`)}}});function qt(r,e){if(e!=null&&!(Array.isArray(e)&&e.length==2))throw new Error(`Expected '${r}' to be an array, [start, end].`);if(e!=null){let t=e[0],s=e[1];sr.forEach(n=>{if(n.test(t)||n.test(s))throw new Error(`['${t}', '${s}'] contains unusable interpolation symbol.`)})}}var sr,Ht=j(()=>{m();sr=[/^\s*$/,/[<>]/,/^[{}]$/,/&(#|[a-z])/i,/^\/\//]});var Pe,ue,zt=j(()=>{m();Ht();Pe=class{constructor(e,t){this.start=e,this.end=t}static fromArray(e){return e?(qt("interpolation",e),new Pe(e[0],e[1])):ue}},ue=new Pe("{{","}}")});var Xt={};Ze(Xt,{IvyParser:()=>gt,Parser:()=>We,SplitInterpolation:()=>je,TemplateBindingParseResult:()=>Qe,_ParseAST:()=>G});var je,Qe,We,gt,me,G,mt,St,Zt=j(()=>{m();ht();zt();Ke();vt();je=class{constructor(e,t,s){this.strings=e,this.expressions=t,this.offsets=s}},Qe=class{constructor(e,t,s){this.templateBindings=e,this.warnings=t,this.errors=s}},We=class{constructor(e){this._lexer=e,this.errors=[],this.simpleExpressionChecker=mt}parseAction(e,t,s,n=ue){this._checkNoInterpolation(e,t,n);let i=this._stripComments(e),a=this._lexer.tokenize(this._stripComments(e)),h=new G(e,t,s,a,i.length,!0,this.errors,e.length-i.length).parseChain();return new K(h,e,t,s,this.errors)}parseBinding(e,t,s,n=ue){let i=this._parseBindingAst(e,t,s,n);return new K(i,e,t,s,this.errors)}checkSimpleExpression(e){let t=new this.simpleExpressionChecker;return e.visit(t),t.errors}parseSimpleBinding(e,t,s,n=ue){let i=this._parseBindingAst(e,t,s,n),a=this.checkSimpleExpression(i);return a.length>0&&this._reportError(`Host binding expression cannot contain ${a.join(" ")}`,e,t),new K(i,e,t,s,this.errors)}_reportError(e,t,s,n){this.errors.push(new Q(e,t,s,n))}_parseBindingAst(e,t,s,n){let i=this._parseQuote(e,t,s);if(i!=null)return i;this._checkNoInterpolation(e,t,n);let a=this._stripComments(e),h=this._lexer.tokenize(a);return new G(e,t,s,h,a.length,!1,this.errors,e.length-a.length).parseChain()}_parseQuote(e,t,s){if(e==null)return null;let n=e.indexOf(":");if(n==-1)return null;let i=e.substring(0,n).trim();if(!ft(i))return null;let a=e.substring(n+1),h=new T(0,e.length);return new de(h,h.toAbsolute(s),i,a,t)}parseTemplateBindings(e,t,s,n,i){let a=this._lexer.tokenize(t);return new G(t,s,i,a,t.length,!1,this.errors,0).parseTemplateBindings({source:e,span:new B(n,n+e.length)})}parseInterpolation(e,t,s,n=ue){let{strings:i,expressions:a,offsets:h}=this.splitInterpolation(e,t,n);if(a.length===0)return null;let x=[];for(let v=0;v<a.length;++v){let A=a[v].text,N=this._stripComments(A),O=this._lexer.tokenize(N),w=new G(e,t,s,O,N.length,!1,this.errors,h[v]+(A.length-N.length)).parseChain();x.push(w)}return this.createInterpolationAst(i.map(v=>v.text),x,e,t,s)}parseInterpolationExpression(e,t,s){let n=this._stripComments(e),i=this._lexer.tokenize(n),a=new G(e,t,s,i,n.length,!1,this.errors,0).parseChain(),h=["",""];return this.createInterpolationAst(h,[a],e,t,s)}createInterpolationAst(e,t,s,n,i){let a=new T(0,s.length),h=new se(a,a.toAbsolute(i),e,t);return new K(h,s,n,i,this.errors)}splitInterpolation(e,t,s=ue){let n=[],i=[],a=[],h=0,x=!1,v=!1,{start:A,end:N}=s;for(;h<e.length;)if(x){let O=h,w=O+A.length,C=this._getInterpolationEndIndex(e,N,w);if(C===-1){x=!1,v=!0;break}let c=C+N.length,o=e.substring(w,C);o.trim().length===0&&this._reportError("Blank expressions are not allowed in interpolated strings",e,`at column ${h} in`,t),i.push({text:o,start:O,end:c}),a.push(w),h=c,x=!1}else{let O=h;h=e.indexOf(A,h),h===-1&&(h=e.length);let w=e.substring(O,h);n.push({text:w,start:O,end:h}),x=!0}if(!x)if(v){let O=n[n.length-1];O.text+=e.substring(h),O.end=e.length}else n.push({text:e.substring(h),start:h,end:e.length});return new je(n,i,a)}wrapLiteralPrimitive(e,t,s){let n=new T(0,e==null?0:e.length);return new K(new P(n,n.toAbsolute(s),e),e,t,s,this.errors)}_stripComments(e){let t=this._commentStart(e);return t!=null?e.substring(0,t).trim():e}_commentStart(e){let t=null;for(let s=0;s<e.length-1;s++){let n=e.charCodeAt(s),i=e.charCodeAt(s+1);if(n===47&&i==47&&t==null)return s;t===n?t=null:t==null&&ct(n)&&(t=n)}return null}_checkNoInterpolation(e,t,{start:s,end:n}){let i=-1,a=-1;for(let h of this._forEachUnquotedChar(e,0))if(i===-1)e.startsWith(s)&&(i=h);else if(a=this._getInterpolationEndIndex(e,n,h),a>-1)break;i>-1&&a>-1&&this._reportError(`Got interpolation (${s}${n}) where expression was expected`,e,`at column ${i} in`,t)}_getInterpolationEndIndex(e,t,s){for(let n of this._forEachUnquotedChar(e,s)){if(e.startsWith(t,n))return n;if(e.startsWith("//",n))return e.indexOf(t,n)}return-1}*_forEachUnquotedChar(e,t){let s=null,n=0;for(let i=t;i<e.length;i++){let a=e[i];ct(e.charCodeAt(i))&&(s===null||s===a)&&n%2===0?s=s===null?a:null:s===null&&(yield i),n=a==="\\"?n+1:0}}},gt=class extends We{constructor(){super(...arguments),this.simpleExpressionChecker=St}};(function(r){r[r.None=0]="None",r[r.Writable=1]="Writable"})(me||(me={}));G=class{constructor(e,t,s,n,i,a,h,x){this.input=e,this.location=t,this.absoluteOffset=s,this.tokens=n,this.inputLength=i,this.parseAction=a,this.errors=h,this.offset=x,this.rparensExpected=0,this.rbracketsExpected=0,this.rbracesExpected=0,this.context=me.None,this.sourceSpanCache=new Map,this.index=0}peek(e){let t=this.index+e;return t<this.tokens.length?this.tokens[t]:ke}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:this.tokens.length===0?this.inputLength+this.offset:this.next.index+this.offset}get currentAbsoluteOffset(){return this.absoluteOffset+this.inputIndex}span(e,t){let s=this.currentEndIndex;if(t!==void 0&&t>this.currentEndIndex&&(s=t),e>s){let n=s;s=e,e=n}return new T(e,s)}sourceSpan(e,t){let s=`${e}@${this.inputIndex}:${t}`;return this.sourceSpanCache.has(s)||this.sourceSpanCache.set(s,this.span(e,t).toAbsolute(this.absoluteOffset)),this.sourceSpanCache.get(s)}advance(){this.index++}withContext(e,t){this.context|=e;let s=t();return this.context^=e,s}consumeOptionalCharacter(e){return this.next.isCharacter(e)?(this.advance(),!0):!1}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):!1}expectOperator(e){this.consumeOptionalOperator(e)||this.error(`Missing expected operator ${e}`)}prettyPrintToken(e){return e===ke?"end of input":`token ${e}`}expectIdentifierOrKeyword(){let e=this.next;return!e.isIdentifier()&&!e.isKeyword()?(e.isPrivateIdentifier()?this._reportErrorForPrivateIdentifier(e,"expected identifier or keyword"):this.error(`Unexpected ${this.prettyPrintToken(e)}, expected identifier or keyword`),null):(this.advance(),e.toString())}expectIdentifierOrKeywordOrString(){let e=this.next;return!e.isIdentifier()&&!e.isKeyword()&&!e.isString()?(e.isPrivateIdentifier()?this._reportErrorForPrivateIdentifier(e,"expected identifier, keyword or string"):this.error(`Unexpected ${this.prettyPrintToken(e)}, expected identifier, keyword, or string`),""):(this.advance(),e.toString())}parseChain(){let e=[],t=this.inputIndex;for(;this.index<this.tokens.length;){let s=this.parsePipe();if(e.push(s),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}'`)}if(e.length==0){let s=this.offset,n=this.offset+this.inputLength;return new R(this.span(s,n),this.sourceSpan(s,n))}return e.length==1?e[0]:new V(this.span(t),this.sourceSpan(t),e)}parsePipe(){let e=this.inputIndex,t=this.parseExpression();if(this.consumeOptionalOperator("|")){this.parseAction&&this.error("Cannot have a pipe in an action expression");do{let s=this.inputIndex,n=this.expectIdentifierOrKeyword(),i,a;n!==null?i=this.sourceSpan(s):(n="",a=this.next.index!==-1?this.next.index:this.inputLength+this.offset,i=new T(a,a).toAbsolute(this.absoluteOffset));let h=[];for(;this.consumeOptionalCharacter(58);)h.push(this.parseExpression());t=new Y(this.span(e),this.sourceSpan(e,a),t,n,h,i)}while(this.consumeOptionalOperator("|"))}return t}parseExpression(){return this.parseConditional()}parseConditional(){let e=this.inputIndex,t=this.parseLogicalOr();if(this.consumeOptionalOperator("?")){let s=this.parsePipe(),n;if(this.consumeOptionalCharacter(58))n=this.parsePipe();else{let i=this.inputIndex,a=this.input.substring(e,i);this.error(`Conditional expression ${a} requires all 3 expressions`),n=new R(this.span(e),this.sourceSpan(e))}return new q(this.span(e),this.sourceSpan(e),t,s,n)}else return t}parseLogicalOr(){let e=this.inputIndex,t=this.parseLogicalAnd();for(;this.consumeOptionalOperator("||");){let s=this.parseLogicalAnd();t=new I(this.span(e),this.sourceSpan(e),"||",t,s)}return t}parseLogicalAnd(){let e=this.inputIndex,t=this.parseNullishCoalescing();for(;this.consumeOptionalOperator("&&");){let s=this.parseNullishCoalescing();t=new I(this.span(e),this.sourceSpan(e),"&&",t,s)}return t}parseNullishCoalescing(){let e=this.inputIndex,t=this.parseEquality();for(;this.consumeOptionalOperator("??");){let s=this.parseEquality();t=new I(this.span(e),this.sourceSpan(e),"??",t,s)}return t}parseEquality(){let e=this.inputIndex,t=this.parseRelational();for(;this.next.type==f.Operator;){let s=this.next.strValue;switch(s){case"==":case"===":case"!=":case"!==":this.advance();let n=this.parseRelational();t=new I(this.span(e),this.sourceSpan(e),s,t,n);continue}break}return t}parseRelational(){let e=this.inputIndex,t=this.parseAdditive();for(;this.next.type==f.Operator;){let s=this.next.strValue;switch(s){case"<":case">":case"<=":case">=":this.advance();let n=this.parseAdditive();t=new I(this.span(e),this.sourceSpan(e),s,t,n);continue}break}return t}parseAdditive(){let e=this.inputIndex,t=this.parseMultiplicative();for(;this.next.type==f.Operator;){let s=this.next.strValue;switch(s){case"+":case"-":this.advance();let n=this.parseMultiplicative();t=new I(this.span(e),this.sourceSpan(e),s,t,n);continue}break}return t}parseMultiplicative(){let e=this.inputIndex,t=this.parsePrefix();for(;this.next.type==f.Operator;){let s=this.next.strValue;switch(s){case"*":case"%":case"/":this.advance();let n=this.parsePrefix();t=new I(this.span(e),this.sourceSpan(e),s,t,n);continue}break}return t}parsePrefix(){if(this.next.type==f.Operator){let e=this.inputIndex,t=this.next.strValue,s;switch(t){case"+":return this.advance(),s=this.parsePrefix(),L.createPlus(this.span(e),this.sourceSpan(e),s);case"-":return this.advance(),s=this.parsePrefix(),L.createMinus(this.span(e),this.sourceSpan(e),s);case"!":return this.advance(),s=this.parsePrefix(),new re(this.span(e),this.sourceSpan(e),s)}}return this.parseCallChain()}parseCallChain(){let e=this.inputIndex,t=this.parsePrimary();for(;;)if(this.consumeOptionalCharacter(46))t=this.parseAccessMemberOrMethodCall(t,e,!1);else if(this.consumeOptionalOperator("?."))t=this.consumeOptionalCharacter(91)?this.parseKeyedReadOrWrite(t,e,!0):this.parseAccessMemberOrMethodCall(t,e,!0);else if(this.consumeOptionalCharacter(91))t=this.parseKeyedReadOrWrite(t,e,!1);else if(this.consumeOptionalCharacter(40)){this.rparensExpected++;let s=this.parseCallArguments();this.rparensExpected--,this.expectCharacter(41),t=new oe(this.span(e),this.sourceSpan(e),t,s)}else if(this.consumeOptionalOperator("!"))t=new ne(this.span(e),this.sourceSpan(e),t);else return t}parsePrimary(){let e=this.inputIndex;if(this.consumeOptionalCharacter(40)){this.rparensExpected++;let t=this.parsePipe();return this.rparensExpected--,this.expectCharacter(41),t}else{if(this.next.isKeywordNull())return this.advance(),new P(this.span(e),this.sourceSpan(e),null);if(this.next.isKeywordUndefined())return this.advance(),new P(this.span(e),this.sourceSpan(e),void 0);if(this.next.isKeywordTrue())return this.advance(),new P(this.span(e),this.sourceSpan(e),!0);if(this.next.isKeywordFalse())return this.advance(),new P(this.span(e),this.sourceSpan(e),!1);if(this.next.isKeywordThis())return this.advance(),new ye(this.span(e),this.sourceSpan(e));if(this.consumeOptionalCharacter(91)){this.rbracketsExpected++;let t=this.parseExpressionList(93);return this.rbracketsExpected--,this.expectCharacter(93),new ee(this.span(e),this.sourceSpan(e),t)}else{if(this.next.isCharacter(123))return this.parseLiteralMap();if(this.next.isIdentifier())return this.parseAccessMemberOrMethodCall(new W(this.span(e),this.sourceSpan(e)),e,!1);if(this.next.isNumber()){let t=this.next.toNumber();return this.advance(),new P(this.span(e),this.sourceSpan(e),t)}else if(this.next.isString()){let t=this.next.toString();return this.advance(),new P(this.span(e),this.sourceSpan(e),t)}else return this.next.isPrivateIdentifier()?(this._reportErrorForPrivateIdentifier(this.next,null),new R(this.span(e),this.sourceSpan(e))):this.index>=this.tokens.length?(this.error(`Unexpected end of expression: ${this.input}`),new R(this.span(e),this.sourceSpan(e))):(this.error(`Unexpected token ${this.next}`),new R(this.span(e),this.sourceSpan(e)))}}}parseExpressionList(e){let t=[];do if(!this.next.isCharacter(e))t.push(this.parsePipe());else break;while(this.consumeOptionalCharacter(44));return t}parseLiteralMap(){let e=[],t=[],s=this.inputIndex;if(this.expectCharacter(123),!this.consumeOptionalCharacter(125)){this.rbracesExpected++;do{let n=this.inputIndex,i=this.next.isString(),a=this.expectIdentifierOrKeywordOrString();if(e.push({key:a,quoted:i}),i)this.expectCharacter(58),t.push(this.parsePipe());else if(this.consumeOptionalCharacter(58))t.push(this.parsePipe());else{let h=this.span(n),x=this.sourceSpan(n);t.push(new F(h,x,x,new W(h,x),a))}}while(this.consumeOptionalCharacter(44));this.rbracesExpected--,this.expectCharacter(125)}return new te(this.span(s),this.sourceSpan(s),e,t)}parseAccessMemberOrMethodCall(e,t,s){let n=this.inputIndex,i=this.withContext(me.Writable,()=>{var h;let x=(h=this.expectIdentifierOrKeyword())!==null&&h!==void 0?h:"";return x.length===0&&this.error("Expected identifier for property access",e.span.end),x}),a=this.sourceSpan(n);if(this.consumeOptionalCharacter(40)){let h=this.inputIndex;this.rparensExpected++;let x=this.parseCallArguments(),v=this.span(h,this.inputIndex).toAbsolute(this.absoluteOffset);this.expectCharacter(41),this.rparensExpected--;let A=this.span(t),N=this.sourceSpan(t);return s?new ae(A,N,a,e,i,x,v):new ie(A,N,a,e,i,x,v)}else{if(s)return this.consumeOptionalOperator("=")?(this.error("The '?.' operator cannot be used in the assignment"),new R(this.span(t),this.sourceSpan(t))):new z(this.span(t),this.sourceSpan(t),a,e,i);if(this.consumeOptionalOperator("=")){if(!this.parseAction)return this.error("Bindings cannot contain assignments"),new R(this.span(t),this.sourceSpan(t));let h=this.parseConditional();return new H(this.span(t),this.sourceSpan(t),a,e,i,h)}else return new F(this.span(t),this.sourceSpan(t),a,e,i)}}parseCallArguments(){if(this.next.isCharacter(41))return[];let e=[];do e.push(this.parsePipe());while(this.consumeOptionalCharacter(44));return e}expectTemplateBindingKey(){let e="",t=!1,s=this.currentAbsoluteOffset;do e+=this.expectIdentifierOrKeywordOrString(),t=this.consumeOptionalOperator("-"),t&&(e+="-");while(t);return{source:e,span:new B(s,s+e.length)}}parseTemplateBindings(e){let t=[];for(t.push(...this.parseDirectiveKeywordBindings(e));this.index<this.tokens.length;){let s=this.parseLetBinding();if(s)t.push(s);else{let n=this.expectTemplateBindingKey(),i=this.parseAsBinding(n);i?t.push(i):(n.source=e.source+n.source.charAt(0).toUpperCase()+n.source.substring(1),t.push(...this.parseDirectiveKeywordBindings(n)))}this.consumeStatementTerminator()}return new Qe(t,[],this.errors)}parseKeyedReadOrWrite(e,t,s){return this.withContext(me.Writable,()=>{this.rbracketsExpected++;let n=this.parsePipe();if(n instanceof R&&this.error("Key access cannot be empty"),this.rbracketsExpected--,this.expectCharacter(93),this.consumeOptionalOperator("="))if(s)this.error("The '?.' operator cannot be used in the assignment");else{let i=this.parseConditional();return new J(this.span(t),this.sourceSpan(t),e,n,i)}else return s?new Z(this.span(t),this.sourceSpan(t),e,n):new X(this.span(t),this.sourceSpan(t),e,n);return new R(this.span(t),this.sourceSpan(t))})}parseDirectiveKeywordBindings(e){let t=[];this.consumeOptionalCharacter(58);let s=this.getDirectiveBoundTarget(),n=this.currentAbsoluteOffset,i=this.parseAsBinding(e);i||(this.consumeStatementTerminator(),n=this.currentAbsoluteOffset);let a=new B(e.span.start,n);return t.push(new Ee(a,e,s)),i&&t.push(i),t}getDirectiveBoundTarget(){if(this.next===ke||this.peekKeywordAs()||this.peekKeywordLet())return null;let e=this.parsePipe(),{start:t,end:s}=e.span,n=this.input.substring(t,s);return new K(e,n,this.location,this.absoluteOffset+t,this.errors)}parseAsBinding(e){if(!this.peekKeywordAs())return null;this.advance();let t=this.expectTemplateBindingKey();this.consumeStatementTerminator();let s=new B(e.span.start,this.currentAbsoluteOffset);return new xe(s,t,e)}parseLetBinding(){if(!this.peekKeywordLet())return null;let e=this.currentAbsoluteOffset;this.advance();let t=this.expectTemplateBindingKey(),s=null;this.consumeOptionalOperator("=")&&(s=this.expectTemplateBindingKey()),this.consumeStatementTerminator();let n=new B(e,this.currentAbsoluteOffset);return new xe(n,t,s)}consumeStatementTerminator(){this.consumeOptionalCharacter(59)||this.consumeOptionalCharacter(44)}error(e,t=null){this.errors.push(new Q(e,this.input,this.locationText(t),this.location)),this.skip()}locationText(e=null){return e==null&&(e=this.index),e<this.tokens.length?`at column ${this.tokens[e].index+1} in`:"at the end of the expression"}_reportErrorForPrivateIdentifier(e,t){let s=`Private identifiers are not supported. Unexpected private identifier: ${e}`;t!==null&&(s+=`, ${t}`),this.error(s)}skip(){let e=this.next;for(;this.index<this.tokens.length&&!e.isCharacter(59)&&!e.isOperator("|")&&(this.rparensExpected<=0||!e.isCharacter(41))&&(this.rbracesExpected<=0||!e.isCharacter(125))&&(this.rbracketsExpected<=0||!e.isCharacter(93))&&(!(this.context&me.Writable)||!e.isOperator("="));)this.next.isError()&&this.errors.push(new Q(this.next.toString(),this.input,this.locationText(),this.location)),this.advance(),e=this.next}},mt=class{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(s=>s.visit(this,t))}visitChain(e,t){}visitQuote(e,t){}visitSafeKeyedRead(e,t){}},St=class extends Ae{constructor(){super(...arguments),this.errors=[]}visitPipe(){this.errors.push("pipes")}}});var qe=le(S=>{"use strict";m();Object.defineProperty(S,"__esModule",{value:!0});S.getLast=S.toLowerCamelCase=S.findBackChar=S.findFrontChar=S.fitSpans=S.getNgType=S.parseNgInterpolation=S.parseNgTemplateBindings=S.parseNgAction=S.parseNgSimpleBinding=S.parseNgBinding=S.NG_PARSE_TEMPLATE_BINDINGS_FAKE_PREFIX=void 0;var y=(Ke(),be(ot)),rr=(vt(),be(Vt)),nr=(Zt(),be(Xt)),Yt="angular-estree-parser";S.NG_PARSE_TEMPLATE_BINDINGS_FAKE_PREFIX="NgEstreeParser";var wt=0,Ve=[Yt,wt];function Et(){return new nr.Parser(new rr.Lexer)}function At(r,e){let t=Et(),{astInput:s,comments:n}=es(r,t),{ast:i,errors:a}=e(s,t);return Ct(a),{ast:i,comments:n}}function ir(r){return At(r,(e,t)=>t.parseBinding(e,...Ve))}S.parseNgBinding=ir;function ar(r){return At(r,(e,t)=>t.parseSimpleBinding(e,...Ve))}S.parseNgSimpleBinding=ar;function or(r){return At(r,(e,t)=>t.parseAction(e,...Ve))}S.parseNgAction=or;function cr(r){let e=Et(),{templateBindings:t,errors:s}=e.parseTemplateBindings(S.NG_PARSE_TEMPLATE_BINDINGS_FAKE_PREFIX,r,Yt,wt,wt);return Ct(s),t}S.parseNgTemplateBindings=cr;function hr(r){let e=Et(),{astInput:t,comments:s}=es(r,e),n="{{",i="}}",{ast:a,errors:h}=e.parseInterpolation(n+t+i,...Ve);Ct(h);let x=a.expressions[0],v=new Set;return yt(x,A=>{v.has(A)||(A.start-=n.length,A.end-=n.length,v.add(A))}),{ast:x,comments:s}}S.parseNgInterpolation=hr;function yt(r,e){if(!(!r||typeof r!="object")){if(Array.isArray(r))return r.forEach(t=>yt(t,e));for(let t of Object.keys(r)){let s=r[t];t==="span"?e(s):yt(s,e)}}}function Ct(r){if(r.length!==0){let[{message:e}]=r;throw new SyntaxError(e.replace(/^Parser Error: | at column \d+ in [^]*$/g,""))}}function es(r,e){let t=e._commentStart(r);return t===null?{astInput:r,comments:[]}:{astInput:r.slice(0,t),comments:[{type:"Comment",value:r.slice(t+2),span:{start:t,end:r.length}}]}}function pr(r){return y.Unary&&r instanceof y.Unary?"Unary":r instanceof y.Binary?"Binary":r instanceof y.BindingPipe?"BindingPipe":r instanceof y.Chain?"Chain":r instanceof y.Conditional?"Conditional":r instanceof y.EmptyExpr?"EmptyExpr":r instanceof y.FunctionCall?"FunctionCall":r instanceof y.ImplicitReceiver?"ImplicitReceiver":r instanceof y.KeyedRead?"KeyedRead":r instanceof y.KeyedWrite?"KeyedWrite":r instanceof y.LiteralArray?"LiteralArray":r instanceof y.LiteralMap?"LiteralMap":r instanceof y.LiteralPrimitive?"LiteralPrimitive":r instanceof y.MethodCall?"MethodCall":r instanceof y.NonNullAssert?"NonNullAssert":r instanceof y.PrefixNot?"PrefixNot":r instanceof y.PropertyRead?"PropertyRead":r instanceof y.PropertyWrite?"PropertyWrite":r instanceof y.Quote?"Quote":r instanceof y.SafeMethodCall?"SafeMethodCall":r instanceof y.SafePropertyRead?"SafePropertyRead":r.type}S.getNgType=pr;function Jt({start:r,end:e},t){let s=r,n=e;for(;n!==s&&/\s/.test(t[n-1]);)n--;for(;s!==n&&/\s/.test(t[s]);)s++;return{start:s,end:n}}function ur({start:r,end:e},t){let s=r,n=e;for(;n!==t.length&&/\s/.test(t[n]);)n++;for(;s!==0&&/\s/.test(t[s-1]);)s--;return{start:s,end:n}}function lr(r,e){return e[r.start-1]==="("&&e[r.end]===")"?{start:r.start-1,end:r.end+1}:r}function dr(r,e,t){let s=0,n={start:r.start,end:r.end};for(;;){let i=ur(n,e),a=lr(i,e);if(i.start===a.start&&i.end===a.end)break;n.start=a.start,n.end=a.end,s++}return{hasParens:(t?s-1:s)!==0,outerSpan:Jt(t?{start:n.start+1,end:n.end-1}:n,e),innerSpan:Jt(r,e)}}S.fitSpans=dr;function xr(r,e,t){let s=e;for(;!r.test(t[s]);)if(--s<0)throw new Error(`Cannot find front char ${r} from index ${e} in ${JSON.stringify(t)}`);return s}S.findFrontChar=xr;function fr(r,e,t){let s=e;for(;!r.test(t[s]);)if(++s>=t.length)throw new Error(`Cannot find back char ${r} from index ${e} in ${JSON.stringify(t)}`);return s}S.findBackChar=fr;function vr(r){return r.slice(0,1).toLowerCase()+r.slice(1)}S.toLowerCamelCase=vr;function gr(r){return r.length===0?void 0:r[r.length-1]}S.getLast=gr});var $t=le(D=>{"use strict";m();Object.defineProperty(D,"__esModule",{value:!0});D.transformSpan=D.transform=void 0;var Ie=qe(),mr=(r,e,t=!1)=>{let s=Ie.getNgType(r);switch(s){case"Unary":{let{operator:c,expr:o}=r,u=n(o);return a("UnaryExpression",{prefix:!0,argument:u,operator:c},r.span,{hasParentParens:t})}case"Binary":{let{left:c,operation:o,right:u}=r,p=u.span.start===u.span.end,d=c.span.start===c.span.end;if(p||d){let $=c.span.start===c.span.end?n(u):n(c);return a("UnaryExpression",{prefix:!0,argument:$,operator:p?"+":"-"},{start:r.span.start,end:C($)},{hasParentParens:t})}let g=n(c),l=n(u);return a(o==="&&"||o==="||"?"LogicalExpression":"BinaryExpression",{left:g,right:l,operator:o},{start:w(g),end:C(l)},{hasParentParens:t})}case"BindingPipe":{let{exp:c,name:o,args:u}=r,p=n(c),d=v(/\S/,v(/\|/,C(p))+1),g=a("Identifier",{name:o},{start:d,end:d+o.length}),l=u.map(n);return a("NGPipeExpression",{left:p,right:g,arguments:l},{start:w(p),end:C(l.length===0?g:Ie.getLast(l))},{hasParentParens:t})}case"Chain":{let{expressions:c}=r;return a("NGChainedExpression",{expressions:c.map(n)},r.span,{hasParentParens:t})}case"Comment":{let{value:c}=r;return a("CommentLine",{value:c},r.span,{processSpan:!1})}case"Conditional":{let{condition:c,trueExp:o,falseExp:u}=r,p=n(c),d=n(o),g=n(u);return a("ConditionalExpression",{test:p,consequent:d,alternate:g},{start:w(p),end:C(g)},{hasParentParens:t})}case"EmptyExpr":return a("NGEmptyExpression",{},r.span,{hasParentParens:t});case"FunctionCall":{let{target:c,args:o}=r,u=o.length===1?[i(o[0])]:o.map(n),p=n(c);return a("CallExpression",{callee:p,arguments:u},{start:w(p),end:r.span.end},{hasParentParens:t})}case"ImplicitReceiver":return a("ThisExpression",{},r.span,{hasParentParens:t});case"KeyedRead":{let{key:c}=r,o=Object.prototype.hasOwnProperty.call(r,"receiver")?r.receiver:r.obj,u=n(c);return h(o,u,{computed:!0,optional:!1},{end:r.span.end,hasParentParens:t})}case"LiteralArray":{let{expressions:c}=r;return a("ArrayExpression",{elements:c.map(n)},r.span,{hasParentParens:t})}case"LiteralMap":{let{keys:c,values:o}=r,u=o.map(d=>n(d)),p=c.map(({key:d,quoted:g},l)=>{let $=u[l],Se=v(/\S/,l===0?r.span.start+1:v(/,/,C(u[l-1]))+1),as=x(/\S/,x(/:/,w($)-1)-1)+1,kt={start:Se,end:as},Le=g?a("StringLiteral",{value:d},kt):a("Identifier",{name:d},kt),os=Le.end<Le.start;return a("ObjectProperty",{key:Le,value:$,method:!1,shorthand:os,computed:!1},{start:w(Le),end:C($)})});return a("ObjectExpression",{properties:p},r.span,{hasParentParens:t})}case"LiteralPrimitive":{let{value:c}=r;switch(typeof c){case"boolean":return a("BooleanLiteral",{value:c},r.span,{hasParentParens:t});case"number":return a("NumericLiteral",{value:c},r.span,{hasParentParens:t});case"object":return a("NullLiteral",{},r.span,{hasParentParens:t});case"string":return a("StringLiteral",{value:c},r.span,{hasParentParens:t});case"undefined":return a("Identifier",{name:"undefined"},r.span,{hasParentParens:t});default:throw new Error(`Unexpected LiteralPrimitive value type ${typeof c}`)}}case"MethodCall":case"SafeMethodCall":{let c=s==="SafeMethodCall",{receiver:o,name:u,args:p}=r,d=p.length===1?[i(p[0])]:p.map(n),g=x(/\S/,x(/\(/,(d.length===0?x(/\)/,r.span.end-1):w(d[0]))-1)-1)+1,l=a("Identifier",{name:u},{start:g-u.length,end:g}),$=h(o,l,{computed:!1,optional:c}),Se=N($);return a(c||Se?"OptionalCallExpression":"CallExpression",{callee:$,arguments:d},{start:w($),end:r.span.end},{hasParentParens:t})}case"NonNullAssert":{let{expression:c}=r,o=n(c);return a("TSNonNullExpression",{expression:o},{start:w(o),end:r.span.end},{hasParentParens:t})}case"PrefixNot":{let{expression:c}=r,o=n(c);return a("UnaryExpression",{prefix:!0,operator:"!",argument:o},{start:r.span.start,end:C(o)},{hasParentParens:t})}case"PropertyRead":case"SafePropertyRead":{let c=s==="SafePropertyRead",{receiver:o,name:u}=r,p=x(/\S/,r.span.end-1)+1,d=a("Identifier",{name:u},{start:p-u.length,end:p},A(o)?{hasParentParens:t}:{});return h(o,d,{computed:!1,optional:c},{hasParentParens:t})}case"KeyedWrite":{let{key:c,value:o}=r,u=Object.prototype.hasOwnProperty.call(r,"receiver")?r.receiver:r.obj,p=n(c),d=n(o),g=h(u,p,{computed:!0,optional:!1},{end:v(/\]/,C(p))+1});return a("AssignmentExpression",{left:g,operator:"=",right:d},{start:w(g),end:C(d)},{hasParentParens:t})}case"PropertyWrite":{let{receiver:c,name:o,value:u}=r,p=n(u),d=x(/\S/,x(/=/,w(p)-1)-1)+1,g=a("Identifier",{name:o},{start:d-o.length,end:d}),l=h(c,g,{computed:!1,optional:!1});return a("AssignmentExpression",{left:l,operator:"=",right:p},{start:w(l),end:C(p)},{hasParentParens:t})}case"Quote":{let{prefix:c,uninterpretedExpression:o}=r;return a("NGQuotedExpression",{prefix:c,value:o},r.span,{hasParentParens:t})}default:throw new Error(`Unexpected node ${s}`)}function n(c){return D.transform(c,e)}function i(c){return D.transform(c,e,!0)}function a(c,o,u,{processSpan:p=!0,hasParentParens:d=!1}={}){let g=Object.assign(Object.assign({type:c},ts(u,e,p,d)),o);switch(c){case"Identifier":{let l=g;l.loc.identifierName=l.name;break}case"NumericLiteral":{let l=g;l.extra=Object.assign(Object.assign({},l.extra),{raw:e.text.slice(l.start,l.end),rawValue:l.value});break}case"StringLiteral":{let l=g;l.extra=Object.assign(Object.assign({},l.extra),{raw:e.text.slice(l.start,l.end),rawValue:l.value});break}}return g}function h(c,o,u,{end:p=C(o),hasParentParens:d=!1}={}){if(A(c)||c.span.start===o.start)return o;let g=n(c),l=N(g);return a(u.optional||l?"OptionalMemberExpression":"MemberExpression",Object.assign({object:g,property:o,computed:u.computed},u.optional?{optional:!0}:l?{optional:!1}:null),{start:w(g),end:p},{hasParentParens:d})}function x(c,o){return Ie.findFrontChar(c,o,e.text)}function v(c,o){return Ie.findBackChar(c,o,e.text)}function A(c){return c.span.start>=c.span.end||/^\s+$/.test(e.text.slice(c.span.start,c.span.end))}function N(c){return(c.type==="OptionalCallExpression"||c.type==="OptionalMemberExpression")&&!O(c)}function O(c){return c.extra&&c.extra.parenthesized}function w(c){return O(c)?c.extra.parenStart:c.start}function C(c){return O(c)?c.extra.parenEnd:c.end}};D.transform=mr;function ts(r,e,t=!1,s=!1){if(!t){let{start:h,end:x}=r;return{start:h,end:x,loc:{start:e.locator.locationForIndex(h),end:e.locator.locationForIndex(x)}}}let{outerSpan:n,innerSpan:i,hasParens:a}=Ie.fitSpans(r,e.text,s);return Object.assign({start:i.start,end:i.end,loc:{start:e.locator.locationForIndex(i.start),end:e.locator.locationForIndex(i.end)}},a&&{extra:{parenthesized:!0,parenStart:n.start,parenEnd:n.end}})}D.transformSpan=ts});var rs=le(He=>{"use strict";m();Object.defineProperty(He,"__esModule",{value:!0});He.transformTemplateBindings=void 0;var ss=(Ke(),be(ot)),Ot=$t(),Nt=qe();function Sr(r,e){r.forEach(w);let[t]=r,{key:s}=t,n=e.text.slice(t.sourceSpan.start,t.sourceSpan.end).trim().length===0?r.slice(1):r,i=[],a=null;for(let o=0;o<n.length;o++){let u=n[o];if(a&&N(a)&&O(u)&&u.value&&u.value.source===a.key.source){let p=v("NGMicrosyntaxKey",{name:u.key.source},u.key.span),d=($,Se)=>Object.assign(Object.assign({},$),Ot.transformSpan({start:$.start,end:Se},e)),g=$=>Object.assign(Object.assign({},d($,p.end)),{alias:p}),l=i.pop();if(l.type==="NGMicrosyntaxExpression")i.push(g(l));else if(l.type==="NGMicrosyntaxKeyedExpression"){let $=g(l.expression);i.push(d(Object.assign(Object.assign({},l),{expression:$}),$.end))}else throw new Error(`Unexpected type ${l.type}`)}else i.push(h(u,o));a=u}return v("NGMicrosyntax",{body:i},i.length===0?r[0].sourceSpan:{start:i[0].start,end:i[i.length-1].end});function h(o,u){if(N(o)){let{key:p,value:d}=o;return d?u===0?v("NGMicrosyntaxExpression",{expression:x(d.ast),alias:null},d.sourceSpan):v("NGMicrosyntaxKeyedExpression",{key:v("NGMicrosyntaxKey",{name:A(p.source)},p.span),expression:v("NGMicrosyntaxExpression",{expression:x(d.ast),alias:null},d.sourceSpan)},{start:p.span.start,end:d.sourceSpan.end}):v("NGMicrosyntaxKey",{name:A(p.source)},p.span)}else{let{key:p,sourceSpan:d}=o;if(/^let\s$/.test(e.text.slice(d.start,d.start+4))){let{value:l}=o;return v("NGMicrosyntaxLet",{key:v("NGMicrosyntaxKey",{name:p.source},p.span),value:l?v("NGMicrosyntaxKey",{name:l.source},l.span):null},{start:d.start,end:l?l.span.end:p.span.end})}else{let l=c(o);return v("NGMicrosyntaxAs",{key:v("NGMicrosyntaxKey",{name:l.source},l.span),alias:v("NGMicrosyntaxKey",{name:p.source},p.span)},{start:l.span.start,end:p.span.end})}}}function x(o){return Ot.transform(o,e)}function v(o,u,p,d=!0){return Object.assign(Object.assign({type:o},Ot.transformSpan(p,e,d)),u)}function A(o){return Nt.toLowerCamelCase(o.slice(s.source.length))}function N(o){return o instanceof ss.ExpressionBinding}function O(o){return o instanceof ss.VariableBinding}function w(o){C(o.key.span),O(o)&&o.value&&C(o.value.span)}function C(o){if(e.text[o.start]!=='"'&&e.text[o.start]!=="'")return;let u=e.text[o.start],p=!1;for(let d=o.start+1;d<e.text.length;d++)switch(e.text[d]){case u:if(!p){o.end=d+1;return}default:p=!1;break;case"\\":p=!p;break}}function c(o){if(!o.value||o.value.source!==Nt.NG_PARSE_TEMPLATE_BINDINGS_FAKE_PREFIX)return o.value;let u=Nt.findBackChar(/\S/,o.sourceSpan.start,e.text);return{source:"$implicit",span:{start:u,end:u}}}}He.transformTemplateBindings=Sr});var is=le(b=>{"use strict";m();Object.defineProperty(b,"__esModule",{value:!0});b.parseTemplateBindings=b.parseAction=b.parseInterpolation=b.parseSimpleBinding=b.parseBinding=void 0;var ns=Bt(),wr=$t(),yr=rs(),Re=qe();function ze(r,e){let{ast:t,comments:s}=e(r),n=new ns.Context(r),i=h=>wr.transform(h,n),a=i(t);return a.comments=s.map(i),a}function Er(r){return ze(r,Re.parseNgBinding)}b.parseBinding=Er;function Ar(r){return ze(r,Re.parseNgSimpleBinding)}b.parseSimpleBinding=Ar;function Cr(r){return ze(r,Re.parseNgInterpolation)}b.parseInterpolation=Cr;function $r(r){return ze(r,Re.parseNgAction)}b.parseAction=$r;function Or(r){return yr.transformTemplateBindings(Re.parseNgTemplateBindings(r),new ns.Context(r))}b.parseTemplateBindings=Or});m();m();m();function xs(r){return Array.isArray(r)&&r.length>0}var It=xs;function Je(r,e){let{ignoreDecorators:t}=e||{};if(!t){let s=r.declaration&&r.declaration.decorators||r.decorators;if(It(s))return Je(s[0])}return r.range?r.range[0]:r.start}function Rt(r){return r.range?r.range[1]:r.end}function Xe(r){return{astFormat:"estree",parse:async(t,s)=>{let n=await Promise.resolve().then(()=>ds(is(),1)),i=r(t,n);return{type:"NGRoot",node:s.parser==="__ng_action"&&i.type!=="NGChainedExpression"?{...i,type:"NGChainedExpression",expressions:[i]}:i}},locStart:Je,locEnd:Rt}}var Nr={parsers:{__ng_action:Xe((r,e)=>e.parseAction(r)),__ng_binding:Xe((r,e)=>e.parseBinding(r)),__ng_interpolation:Xe((r,e)=>e.parseInterpolation(r)),__ng_directive:Xe((r,e)=>e.parseTemplateBindings(r))}},cn=Nr;export{cn as default};
1
+ var Zt=Object.defineProperty;var E=(s,e)=>()=>(s&&(e=s(s=0)),e);var Jt=(s,e)=>{for(var t in e)Zt(s,t,{get:e[t],enumerable:!0})};var we,st,nt,it=E(()=>{we=`
2
+ `,st="\r",nt=function(){function s(e){this.length=e.length;for(var t=[0],r=0;r<e.length;)switch(e[r]){case we:r+=we.length,t.push(r);break;case st:r+=st.length,e[r]===we&&(r+=we.length),t.push(r);break;default:r++;break}this.offsets=t}return s.prototype.locationForIndex=function(e){if(e<0||e>this.length)return null;for(var t=0,r=this.offsets;r[t+1]<=e;)t++;var n=e-r[t];return{line:t,column:n}},s.prototype.indexForLocation=function(e){var t=e.line,r=e.column;return t<0||t>=this.offsets.length||r<0||r>this.lengthOfLine(t)?null:this.offsets[t]+r},s.prototype.lengthOfLine=function(e){var t=this.offsets[e],r=e===this.offsets.length-1?this.length:this.offsets[e+1];return r-t},s}()});var xe,_e,at=E(()=>{it();xe=class{text;locator;constructor(e){this.text=e,this.locator=new _e(this.text)}},_e=class{_linesAndColumns;constructor(e){this._linesAndColumns=new nt(e)}locationForIndex(e){let{line:t,column:r}=this._linesAndColumns.locationForIndex(e);return{line:t+1,column:r,index:e}}}});var D,b,S,V,A,_,ye,W,Q,K,j,H,z,q,X,Z,$,J,Y,Ee,C,P,ee,te,re,se,R,L,T,ne,Ae,ot,Be=E(()=>{D=class{constructor(e,t,r,n){this.input=t,this.errLocation=r,this.ctxLocation=n,this.message=`Parser Error: ${e} ${r} [${t}] in ${n}`}},b=class{constructor(e,t){this.start=e,this.end=t}toAbsolute(e){return new R(e+this.start,e+this.end)}},S=class{constructor(e,t){this.span=e,this.sourceSpan=t}toString(){return"AST"}},V=class extends S{constructor(e,t,r){super(e,t),this.nameSpan=r}},A=class extends S{visit(e,t=null){}},_=class extends S{visit(e,t=null){return e.visitImplicitReceiver(this,t)}},ye=class extends _{visit(e,t=null){var r;return(r=e.visitThisReceiver)==null?void 0:r.call(e,this,t)}},W=class extends S{constructor(e,t,r){super(e,t),this.expressions=r}visit(e,t=null){return e.visitChain(this,t)}},Q=class extends S{constructor(e,t,r,n,i){super(e,t),this.condition=r,this.trueExp=n,this.falseExp=i}visit(e,t=null){return e.visitConditional(this,t)}},K=class extends V{constructor(e,t,r,n,i){super(e,t,r),this.receiver=n,this.name=i}visit(e,t=null){return e.visitPropertyRead(this,t)}},j=class extends V{constructor(e,t,r,n,i,a){super(e,t,r),this.receiver=n,this.name=i,this.value=a}visit(e,t=null){return e.visitPropertyWrite(this,t)}},H=class extends V{constructor(e,t,r,n,i){super(e,t,r),this.receiver=n,this.name=i}visit(e,t=null){return e.visitSafePropertyRead(this,t)}},z=class extends S{constructor(e,t,r,n){super(e,t),this.receiver=r,this.key=n}visit(e,t=null){return e.visitKeyedRead(this,t)}},q=class extends S{constructor(e,t,r,n){super(e,t),this.receiver=r,this.key=n}visit(e,t=null){return e.visitSafeKeyedRead(this,t)}},X=class extends S{constructor(e,t,r,n,i){super(e,t),this.receiver=r,this.key=n,this.value=i}visit(e,t=null){return e.visitKeyedWrite(this,t)}},Z=class extends V{constructor(e,t,r,n,i,a){super(e,t,a),this.exp=r,this.name=n,this.args=i}visit(e,t=null){return e.visitPipe(this,t)}},$=class extends S{constructor(e,t,r){super(e,t),this.value=r}visit(e,t=null){return e.visitLiteralPrimitive(this,t)}},J=class extends S{constructor(e,t,r){super(e,t),this.expressions=r}visit(e,t=null){return e.visitLiteralArray(this,t)}},Y=class extends S{constructor(e,t,r,n){super(e,t),this.keys=r,this.values=n}visit(e,t=null){return e.visitLiteralMap(this,t)}},Ee=class extends S{constructor(e,t,r,n){super(e,t),this.strings=r,this.expressions=n}visit(e,t=null){return e.visitInterpolation(this,t)}},C=class extends S{constructor(e,t,r,n,i){super(e,t),this.operation=r,this.left=n,this.right=i}visit(e,t=null){return e.visitBinary(this,t)}},P=class extends C{static createMinus(e,t,r){return new P(e,t,"-",r,"-",new $(e,t,0),r)}static createPlus(e,t,r){return new P(e,t,"+",r,"-",r,new $(e,t,0))}constructor(e,t,r,n,i,a,h){super(e,t,i,a,h),this.operator=r,this.expr=n,this.left=null,this.right=null,this.operation=null}visit(e,t=null){return e.visitUnary!==void 0?e.visitUnary(this,t):e.visitBinary(this,t)}},ee=class extends S{constructor(e,t,r){super(e,t),this.expression=r}visit(e,t=null){return e.visitPrefixNot(this,t)}},te=class extends S{constructor(e,t,r){super(e,t),this.expression=r}visit(e,t=null){return e.visitNonNullAssert(this,t)}},re=class extends S{constructor(e,t,r,n,i){super(e,t),this.receiver=r,this.args=n,this.argumentSpan=i}visit(e,t=null){return e.visitCall(this,t)}},se=class extends S{constructor(e,t,r,n,i){super(e,t),this.receiver=r,this.args=n,this.argumentSpan=i}visit(e,t=null){return e.visitSafeCall(this,t)}},R=class{constructor(e,t){this.start=e,this.end=t}},L=class extends S{constructor(e,t,r,n,i){super(new b(0,t===null?0:t.length),new R(n,t===null?n:n+t.length)),this.ast=e,this.source=t,this.location=r,this.errors=i}visit(e,t=null){return e.visitASTWithSource?e.visitASTWithSource(this,t):this.ast.visit(e,t)}toString(){return`${this.source} in ${this.location}`}},T=class{constructor(e,t,r){this.sourceSpan=e,this.key=t,this.value=r}},ne=class{constructor(e,t,r){this.sourceSpan=e,this.key=t,this.value=r}},Ae=class{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)}visitImplicitReceiver(e,t){}visitThisReceiver(e,t){}visitInterpolation(e,t){this.visitAll(e.expressions,t)}visitKeyedRead(e,t){this.visit(e.receiver,t),this.visit(e.key,t)}visitKeyedWrite(e,t){this.visit(e.receiver,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){}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)}visitSafeKeyedRead(e,t){this.visit(e.receiver,t),this.visit(e.key,t)}visitCall(e,t){this.visit(e.receiver,t),this.visitAll(e.args,t)}visitSafeCall(e,t){this.visit(e.receiver,t),this.visitAll(e.args,t)}visitAll(e,t){for(let r of e)this.visit(r,t)}};(function(s){s[s.DEFAULT=0]="DEFAULT",s[s.LITERAL_ATTR=1]="LITERAL_ATTR",s[s.ANIMATION=2]="ANIMATION"})(ot||(ot={}))});function ct(s){return s>=9&&s<=32||s==160}function B(s){return 48<=s&&s<=57}function ht(s){return s>=97&&s<=122||s>=65&&s<=90}function Ke(s){return s===39||s===34||s===96}var Te=E(()=>{});function ft(s,e,t){return new k(s,e,d.Character,t,String.fromCharCode(t))}function Pr(s,e,t){return new k(s,e,d.Identifier,0,t)}function Rr(s,e,t){return new k(s,e,d.PrivateIdentifier,0,t)}function Lr(s,e,t){return new k(s,e,d.Keyword,0,t)}function Fe(s,e,t){return new k(s,e,d.Operator,0,t)}function br(s,e,t){return new k(s,e,d.String,0,t)}function _r(s,e,t){return new k(s,e,d.Number,t,"")}function Br(s,e,t){return new k(s,e,d.Error,0,t)}function dt(s){return 97<=s&&s<=122||65<=s&&s<=90||s==95||s==36}function vt(s){return ht(s)||B(s)||s==95||s==36}function Kr(s){return s==101||s==69}function Tr(s){return s==45||s==43}function Mr(s){switch(s){case 110:return 10;case 102:return 12;case 114:return 13;case 116:return 9;case 118:return 11;default:return s}}function Fr(s){let e=parseInt(s);if(isNaN(e))throw new Error("Invalid integer literal when parsing "+s);return e}var d,Ir,fe,k,Ne,Ue,De=E(()=>{Te();(function(s){s[s.Character=0]="Character",s[s.Identifier=1]="Identifier",s[s.PrivateIdentifier=2]="PrivateIdentifier",s[s.Keyword=3]="Keyword",s[s.String=4]="String",s[s.Operator=5]="Operator",s[s.Number=6]="Number",s[s.Error=7]="Error"})(d||(d={}));Ir=["var","let","as","null","undefined","true","false","if","else","this"],fe=class{tokenize(e){let t=new Ue(e),r=[],n=t.scanToken();for(;n!=null;)r.push(n),n=t.scanToken();return r}},k=class{constructor(e,t,r,n,i){this.index=e,this.end=t,this.type=r,this.numValue=n,this.strValue=i}isCharacter(e){return this.type==d.Character&&this.numValue==e}isNumber(){return this.type==d.Number}isString(){return this.type==d.String}isOperator(e){return this.type==d.Operator&&this.strValue==e}isIdentifier(){return this.type==d.Identifier}isPrivateIdentifier(){return this.type==d.PrivateIdentifier}isKeyword(){return this.type==d.Keyword}isKeywordLet(){return this.type==d.Keyword&&this.strValue=="let"}isKeywordAs(){return this.type==d.Keyword&&this.strValue=="as"}isKeywordNull(){return this.type==d.Keyword&&this.strValue=="null"}isKeywordUndefined(){return this.type==d.Keyword&&this.strValue=="undefined"}isKeywordTrue(){return this.type==d.Keyword&&this.strValue=="true"}isKeywordFalse(){return this.type==d.Keyword&&this.strValue=="false"}isKeywordThis(){return this.type==d.Keyword&&this.strValue=="this"}isError(){return this.type==d.Error}toNumber(){return this.type==d.Number?this.numValue:-1}toString(){switch(this.type){case d.Character:case d.Identifier:case d.Keyword:case d.Operator:case d.PrivateIdentifier:case d.String:case d.Error:return this.strValue;case d.Number:return this.numValue.toString();default:return null}}};Ne=new k(-1,-1,d.Character,0,""),Ue=class{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(){let e=this.input,t=this.length,r=this.peek,n=this.index;for(;r<=32;)if(++n>=t){r=0;break}else r=e.charCodeAt(n);if(this.peek=r,this.index=n,n>=t)return null;if(dt(r))return this.scanIdentifier();if(B(r))return this.scanNumber(n);let i=n;switch(r){case 46:return this.advance(),B(this.peek)?this.scanNumber(i):ft(i,this.index,46);case 40:case 41:case 123:case 125:case 91:case 93:case 44:case 58:case 59:return this.scanCharacter(i,r);case 39:case 34:return this.scanString();case 35:return this.scanPrivateIdentifier();case 43:case 45:case 42:case 47:case 37:case 94:return this.scanOperator(i,String.fromCharCode(r));case 63:return this.scanQuestion(i);case 60:case 62:return this.scanComplexOperator(i,String.fromCharCode(r),61,"=");case 33:case 61:return this.scanComplexOperator(i,String.fromCharCode(r),61,"=",61,"=");case 38:return this.scanComplexOperator(i,"&",38,"&");case 124:return this.scanComplexOperator(i,"|",124,"|");case 160:for(;ct(this.peek);)this.advance();return this.scanToken()}return this.advance(),this.error(`Unexpected character [${String.fromCharCode(r)}]`,0)}scanCharacter(e,t){return this.advance(),ft(e,this.index,t)}scanOperator(e,t){return this.advance(),Fe(e,this.index,t)}scanComplexOperator(e,t,r,n,i,a){this.advance();let h=t;return this.peek==r&&(this.advance(),h+=n),i!=null&&this.peek==i&&(this.advance(),h+=a),Fe(e,this.index,h)}scanIdentifier(){let e=this.index;for(this.advance();vt(this.peek);)this.advance();let t=this.input.substring(e,this.index);return Ir.indexOf(t)>-1?Lr(e,this.index,t):Pr(e,this.index,t)}scanPrivateIdentifier(){let e=this.index;if(this.advance(),!dt(this.peek))return this.error("Invalid character [#]",-1);for(;vt(this.peek);)this.advance();let t=this.input.substring(e,this.index);return Rr(e,this.index,t)}scanNumber(e){let t=this.index===e,r=!1;for(this.advance();;){if(!B(this.peek))if(this.peek===95){if(!B(this.input.charCodeAt(this.index-1))||!B(this.input.charCodeAt(this.index+1)))return this.error("Invalid numeric separator",0);r=!0}else if(this.peek===46)t=!1;else if(Kr(this.peek)){if(this.advance(),Tr(this.peek)&&this.advance(),!B(this.peek))return this.error("Invalid exponent",-1);t=!1}else break;this.advance()}let n=this.input.substring(e,this.index);r&&(n=n.replace(/_/g,""));let i=t?Fr(n):parseFloat(n);return _r(e,this.index,i)}scanString(){let e=this.index,t=this.peek;this.advance();let r="",n=this.index,i=this.input;for(;this.peek!=t;)if(this.peek==92){r+=i.substring(n,this.index);let h;if(this.advance(),this.peek==117){let v=i.substring(this.index+1,this.index+5);if(/^[0-9a-f]+$/i.test(v))h=parseInt(v,16);else return this.error(`Invalid unicode escape [\\u${v}]`,0);for(let f=0;f<5;f++)this.advance()}else h=Mr(this.peek),this.advance();r+=String.fromCharCode(h),n=this.index}else{if(this.peek==0)return this.error("Unterminated quote",0);this.advance()}let a=i.substring(n,this.index);return this.advance(),br(e,this.index,r+a)}scanQuestion(e){this.advance();let t="?";return(this.peek===63||this.peek===46)&&(t+=this.peek===46?".":"?",this.advance()),Fe(e,this.index,t)}error(e,t){let r=this.index+t;return Br(r,this.index,`Lexer Error: ${e} at column ${r} in expression [${this.input}]`)}}});function wt(s,e){if(e!=null&&!(Array.isArray(e)&&e.length==2))throw new Error(`Expected '${s}' to be an array, [start, end].`);if(e!=null){let t=e[0],r=e[1];Ur.forEach(n=>{if(n.test(t)||n.test(r))throw new Error(`['${t}', '${r}'] contains unusable interpolation symbol.`)})}}var Ur,yt=E(()=>{Ur=[/^\s*$/,/[<>]/,/^[{}]$/,/&(#|[a-z])/i,/^\/\//]});var ge,U,Et=E(()=>{yt();ge=class{static fromArray(e){return e?(wt("interpolation",e),new ge(e[0],e[1])):U}constructor(e,t){this.start=e,this.end=t}},U=new ge("{{","}}")});function Gr(s){let e=new Map,t=0,r=0,n=0;for(;n<s.length;){let i=s[n];if(i.type===9){let[a,h]=i.parts;t+=h.length,r+=a.length}else{let a=i.parts.reduce((h,v)=>h+v.length,0);r+=a,t+=a}e.set(r,t),n++}return e}var Ve,We,me,pe,G,Qe,At=E(()=>{Te();Et();Be();De();Ve=class{constructor(e,t,r){this.strings=e,this.expressions=t,this.offsets=r}},We=class{constructor(e,t,r){this.templateBindings=e,this.warnings=t,this.errors=r}},me=class{constructor(e){this._lexer=e,this.errors=[]}parseAction(e,t,r,n,i=U){this._checkNoInterpolation(e,r,i);let a=this._stripComments(e),h=this._lexer.tokenize(a),v=1;t&&(v|=2);let f=new G(e,r,n,h,v,this.errors,0).parseChain();return new L(f,e,r,n,this.errors)}parseBinding(e,t,r,n=U){let i=this._parseBindingAst(e,t,r,n);return new L(i,e,t,r,this.errors)}checkSimpleExpression(e){let t=new Qe;return e.visit(t),t.errors}parseSimpleBinding(e,t,r,n=U){let i=this._parseBindingAst(e,t,r,n),a=this.checkSimpleExpression(i);return a.length>0&&this._reportError(`Host binding expression cannot contain ${a.join(" ")}`,e,t),new L(i,e,t,r,this.errors)}_reportError(e,t,r,n){this.errors.push(new D(e,t,r,n))}_parseBindingAst(e,t,r,n){this._checkNoInterpolation(e,t,n);let i=this._stripComments(e),a=this._lexer.tokenize(i);return new G(e,t,r,a,0,this.errors,0).parseChain()}parseTemplateBindings(e,t,r,n,i){let a=this._lexer.tokenize(t);return new G(t,r,i,a,0,this.errors,0).parseTemplateBindings({source:e,span:new R(n,n+e.length)})}parseInterpolation(e,t,r,n,i=U){let{strings:a,expressions:h,offsets:v}=this.splitInterpolation(e,t,n,i);if(h.length===0)return null;let f=[];for(let w=0;w<h.length;++w){let I=h[w].text,O=this._stripComments(I),y=this._lexer.tokenize(O),m=new G(e,t,r,y,0,this.errors,v[w]).parseChain();f.push(m)}return this.createInterpolationAst(a.map(w=>w.text),f,e,t,r)}parseInterpolationExpression(e,t,r){let n=this._stripComments(e),i=this._lexer.tokenize(n),a=new G(e,t,r,i,0,this.errors,0).parseChain(),h=["",""];return this.createInterpolationAst(h,[a],e,t,r)}createInterpolationAst(e,t,r,n,i){let a=new b(0,r.length),h=new Ee(a,a.toAbsolute(i),e,t);return new L(h,r,n,i,this.errors)}splitInterpolation(e,t,r,n=U){let i=[],a=[],h=[],v=r?Gr(r):null,f=0,w=!1,I=!1,{start:O,end:y}=n;for(;f<e.length;)if(w){let m=f,c=m+O.length,o=this._getInterpolationEndIndex(e,y,c);if(o===-1){w=!1,I=!0;break}let x=o+y.length,p=e.substring(c,o);p.trim().length===0&&this._reportError("Blank expressions are not allowed in interpolated strings",e,`at column ${f} in`,t),a.push({text:p,start:m,end:x});let g=((v==null?void 0:v.get(m))??m)+O.length;h.push(g),f=x,w=!1}else{let m=f;f=e.indexOf(O,f),f===-1&&(f=e.length);let c=e.substring(m,f);i.push({text:c,start:m,end:f}),w=!0}if(!w)if(I){let m=i[i.length-1];m.text+=e.substring(f),m.end=e.length}else i.push({text:e.substring(f),start:f,end:e.length});return new Ve(i,a,h)}wrapLiteralPrimitive(e,t,r){let n=new b(0,e==null?0:e.length);return new L(new $(n,n.toAbsolute(r),e),e,t,r,this.errors)}_stripComments(e){let t=this._commentStart(e);return t!=null?e.substring(0,t):e}_commentStart(e){let t=null;for(let r=0;r<e.length-1;r++){let n=e.charCodeAt(r),i=e.charCodeAt(r+1);if(n===47&&i==47&&t==null)return r;t===n?t=null:t==null&&Ke(n)&&(t=n)}return null}_checkNoInterpolation(e,t,{start:r,end:n}){let i=-1,a=-1;for(let h of this._forEachUnquotedChar(e,0))if(i===-1)e.startsWith(r)&&(i=h);else if(a=this._getInterpolationEndIndex(e,n,h),a>-1)break;i>-1&&a>-1&&this._reportError(`Got interpolation (${r}${n}) where expression was expected`,e,`at column ${i} in`,t)}_getInterpolationEndIndex(e,t,r){for(let n of this._forEachUnquotedChar(e,r)){if(e.startsWith(t,n))return n;if(e.startsWith("//",n))return e.indexOf(t,n)}return-1}*_forEachUnquotedChar(e,t){let r=null,n=0;for(let i=t;i<e.length;i++){let a=e[i];Ke(e.charCodeAt(i))&&(r===null||r===a)&&n%2===0?r=r===null?a:null:r===null&&(yield i),n=a==="\\"?n+1:0}}};(function(s){s[s.None=0]="None",s[s.Writable=1]="Writable"})(pe||(pe={}));G=class{constructor(e,t,r,n,i,a,h){this.input=e,this.location=t,this.absoluteOffset=r,this.tokens=n,this.parseFlags=i,this.errors=a,this.offset=h,this.rparensExpected=0,this.rbracketsExpected=0,this.rbracesExpected=0,this.context=pe.None,this.sourceSpanCache=new Map,this.index=0}peek(e){let t=this.index+e;return t<this.tokens.length?this.tokens[t]:Ne}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:this.tokens.length===0?this.input.length+this.offset:this.next.index+this.offset}get currentAbsoluteOffset(){return this.absoluteOffset+this.inputIndex}span(e,t){let r=this.currentEndIndex;if(t!==void 0&&t>this.currentEndIndex&&(r=t),e>r){let n=r;r=e,e=n}return new b(e,r)}sourceSpan(e,t){let r=`${e}@${this.inputIndex}:${t}`;return this.sourceSpanCache.has(r)||this.sourceSpanCache.set(r,this.span(e,t).toAbsolute(this.absoluteOffset)),this.sourceSpanCache.get(r)}advance(){this.index++}withContext(e,t){this.context|=e;let r=t();return this.context^=e,r}consumeOptionalCharacter(e){return this.next.isCharacter(e)?(this.advance(),!0):!1}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):!1}expectOperator(e){this.consumeOptionalOperator(e)||this.error(`Missing expected operator ${e}`)}prettyPrintToken(e){return e===Ne?"end of input":`token ${e}`}expectIdentifierOrKeyword(){let e=this.next;return!e.isIdentifier()&&!e.isKeyword()?(e.isPrivateIdentifier()?this._reportErrorForPrivateIdentifier(e,"expected identifier or keyword"):this.error(`Unexpected ${this.prettyPrintToken(e)}, expected identifier or keyword`),null):(this.advance(),e.toString())}expectIdentifierOrKeywordOrString(){let e=this.next;return!e.isIdentifier()&&!e.isKeyword()&&!e.isString()?(e.isPrivateIdentifier()?this._reportErrorForPrivateIdentifier(e,"expected identifier, keyword or string"):this.error(`Unexpected ${this.prettyPrintToken(e)}, expected identifier, keyword, or string`),""):(this.advance(),e.toString())}parseChain(){let e=[],t=this.inputIndex;for(;this.index<this.tokens.length;){let r=this.parsePipe();if(e.push(r),this.consumeOptionalCharacter(59))for(this.parseFlags&1||this.error("Binding expression cannot contain chained expression");this.consumeOptionalCharacter(59););else if(this.index<this.tokens.length){let n=this.index;if(this.error(`Unexpected token '${this.next}'`),this.index===n)break}}if(e.length===0){let r=this.offset,n=this.offset+this.input.length;return new A(this.span(r,n),this.sourceSpan(r,n))}return e.length==1?e[0]:new W(this.span(t),this.sourceSpan(t),e)}parsePipe(){let e=this.inputIndex,t=this.parseExpression();if(this.consumeOptionalOperator("|")){this.parseFlags&1&&this.error("Cannot have a pipe in an action expression");do{let r=this.inputIndex,n=this.expectIdentifierOrKeyword(),i,a;n!==null?i=this.sourceSpan(r):(n="",a=this.next.index!==-1?this.next.index:this.input.length+this.offset,i=new b(a,a).toAbsolute(this.absoluteOffset));let h=[];for(;this.consumeOptionalCharacter(58);)h.push(this.parseExpression());t=new Z(this.span(e),this.sourceSpan(e,a),t,n,h,i)}while(this.consumeOptionalOperator("|"))}return t}parseExpression(){return this.parseConditional()}parseConditional(){let e=this.inputIndex,t=this.parseLogicalOr();if(this.consumeOptionalOperator("?")){let r=this.parsePipe(),n;if(this.consumeOptionalCharacter(58))n=this.parsePipe();else{let i=this.inputIndex,a=this.input.substring(e,i);this.error(`Conditional expression ${a} requires all 3 expressions`),n=new A(this.span(e),this.sourceSpan(e))}return new Q(this.span(e),this.sourceSpan(e),t,r,n)}else return t}parseLogicalOr(){let e=this.inputIndex,t=this.parseLogicalAnd();for(;this.consumeOptionalOperator("||");){let r=this.parseLogicalAnd();t=new C(this.span(e),this.sourceSpan(e),"||",t,r)}return t}parseLogicalAnd(){let e=this.inputIndex,t=this.parseNullishCoalescing();for(;this.consumeOptionalOperator("&&");){let r=this.parseNullishCoalescing();t=new C(this.span(e),this.sourceSpan(e),"&&",t,r)}return t}parseNullishCoalescing(){let e=this.inputIndex,t=this.parseEquality();for(;this.consumeOptionalOperator("??");){let r=this.parseEquality();t=new C(this.span(e),this.sourceSpan(e),"??",t,r)}return t}parseEquality(){let e=this.inputIndex,t=this.parseRelational();for(;this.next.type==d.Operator;){let r=this.next.strValue;switch(r){case"==":case"===":case"!=":case"!==":this.advance();let n=this.parseRelational();t=new C(this.span(e),this.sourceSpan(e),r,t,n);continue}break}return t}parseRelational(){let e=this.inputIndex,t=this.parseAdditive();for(;this.next.type==d.Operator;){let r=this.next.strValue;switch(r){case"<":case">":case"<=":case">=":this.advance();let n=this.parseAdditive();t=new C(this.span(e),this.sourceSpan(e),r,t,n);continue}break}return t}parseAdditive(){let e=this.inputIndex,t=this.parseMultiplicative();for(;this.next.type==d.Operator;){let r=this.next.strValue;switch(r){case"+":case"-":this.advance();let n=this.parseMultiplicative();t=new C(this.span(e),this.sourceSpan(e),r,t,n);continue}break}return t}parseMultiplicative(){let e=this.inputIndex,t=this.parsePrefix();for(;this.next.type==d.Operator;){let r=this.next.strValue;switch(r){case"*":case"%":case"/":this.advance();let n=this.parsePrefix();t=new C(this.span(e),this.sourceSpan(e),r,t,n);continue}break}return t}parsePrefix(){if(this.next.type==d.Operator){let e=this.inputIndex,t=this.next.strValue,r;switch(t){case"+":return this.advance(),r=this.parsePrefix(),P.createPlus(this.span(e),this.sourceSpan(e),r);case"-":return this.advance(),r=this.parsePrefix(),P.createMinus(this.span(e),this.sourceSpan(e),r);case"!":return this.advance(),r=this.parsePrefix(),new ee(this.span(e),this.sourceSpan(e),r)}}return this.parseCallChain()}parseCallChain(){let e=this.inputIndex,t=this.parsePrimary();for(;;)if(this.consumeOptionalCharacter(46))t=this.parseAccessMember(t,e,!1);else if(this.consumeOptionalOperator("?."))this.consumeOptionalCharacter(40)?t=this.parseCall(t,e,!0):t=this.consumeOptionalCharacter(91)?this.parseKeyedReadOrWrite(t,e,!0):this.parseAccessMember(t,e,!0);else if(this.consumeOptionalCharacter(91))t=this.parseKeyedReadOrWrite(t,e,!1);else if(this.consumeOptionalCharacter(40))t=this.parseCall(t,e,!1);else if(this.consumeOptionalOperator("!"))t=new te(this.span(e),this.sourceSpan(e),t);else return t}parsePrimary(){let e=this.inputIndex;if(this.consumeOptionalCharacter(40)){this.rparensExpected++;let t=this.parsePipe();return this.rparensExpected--,this.expectCharacter(41),t}else{if(this.next.isKeywordNull())return this.advance(),new $(this.span(e),this.sourceSpan(e),null);if(this.next.isKeywordUndefined())return this.advance(),new $(this.span(e),this.sourceSpan(e),void 0);if(this.next.isKeywordTrue())return this.advance(),new $(this.span(e),this.sourceSpan(e),!0);if(this.next.isKeywordFalse())return this.advance(),new $(this.span(e),this.sourceSpan(e),!1);if(this.next.isKeywordThis())return this.advance(),new ye(this.span(e),this.sourceSpan(e));if(this.consumeOptionalCharacter(91)){this.rbracketsExpected++;let t=this.parseExpressionList(93);return this.rbracketsExpected--,this.expectCharacter(93),new J(this.span(e),this.sourceSpan(e),t)}else{if(this.next.isCharacter(123))return this.parseLiteralMap();if(this.next.isIdentifier())return this.parseAccessMember(new _(this.span(e),this.sourceSpan(e)),e,!1);if(this.next.isNumber()){let t=this.next.toNumber();return this.advance(),new $(this.span(e),this.sourceSpan(e),t)}else if(this.next.isString()){let t=this.next.toString();return this.advance(),new $(this.span(e),this.sourceSpan(e),t)}else return this.next.isPrivateIdentifier()?(this._reportErrorForPrivateIdentifier(this.next,null),new A(this.span(e),this.sourceSpan(e))):this.index>=this.tokens.length?(this.error(`Unexpected end of expression: ${this.input}`),new A(this.span(e),this.sourceSpan(e))):(this.error(`Unexpected token ${this.next}`),new A(this.span(e),this.sourceSpan(e)))}}}parseExpressionList(e){let t=[];do if(!this.next.isCharacter(e))t.push(this.parsePipe());else break;while(this.consumeOptionalCharacter(44));return t}parseLiteralMap(){let e=[],t=[],r=this.inputIndex;if(this.expectCharacter(123),!this.consumeOptionalCharacter(125)){this.rbracesExpected++;do{let n=this.inputIndex,i=this.next.isString(),a=this.expectIdentifierOrKeywordOrString();if(e.push({key:a,quoted:i}),i)this.expectCharacter(58),t.push(this.parsePipe());else if(this.consumeOptionalCharacter(58))t.push(this.parsePipe());else{let h=this.span(n),v=this.sourceSpan(n);t.push(new K(h,v,v,new _(h,v),a))}}while(this.consumeOptionalCharacter(44)&&!this.next.isCharacter(125));this.rbracesExpected--,this.expectCharacter(125)}return new Y(this.span(r),this.sourceSpan(r),e,t)}parseAccessMember(e,t,r){let n=this.inputIndex,i=this.withContext(pe.Writable,()=>{let v=this.expectIdentifierOrKeyword()??"";return v.length===0&&this.error("Expected identifier for property access",e.span.end),v}),a=this.sourceSpan(n),h;if(r)this.consumeOptionalAssignment()?(this.error("The '?.' operator cannot be used in the assignment"),h=new A(this.span(t),this.sourceSpan(t))):h=new H(this.span(t),this.sourceSpan(t),a,e,i);else if(this.consumeOptionalAssignment()){if(!(this.parseFlags&1))return this.error("Bindings cannot contain assignments"),new A(this.span(t),this.sourceSpan(t));let v=this.parseConditional();h=new j(this.span(t),this.sourceSpan(t),a,e,i,v)}else h=new K(this.span(t),this.sourceSpan(t),a,e,i);return h}parseCall(e,t,r){let n=this.inputIndex;this.rparensExpected++;let i=this.parseCallArguments(),a=this.span(n,this.inputIndex).toAbsolute(this.absoluteOffset);this.expectCharacter(41),this.rparensExpected--;let h=this.span(t),v=this.sourceSpan(t);return r?new se(h,v,e,i,a):new re(h,v,e,i,a)}consumeOptionalAssignment(){return this.parseFlags&2&&this.next.isOperator("!")&&this.peek(1).isOperator("=")?(this.advance(),this.advance(),!0):this.consumeOptionalOperator("=")}parseCallArguments(){if(this.next.isCharacter(41))return[];let e=[];do e.push(this.parsePipe());while(this.consumeOptionalCharacter(44));return e}expectTemplateBindingKey(){let e="",t=!1,r=this.currentAbsoluteOffset;do e+=this.expectIdentifierOrKeywordOrString(),t=this.consumeOptionalOperator("-"),t&&(e+="-");while(t);return{source:e,span:new R(r,r+e.length)}}parseTemplateBindings(e){let t=[];for(t.push(...this.parseDirectiveKeywordBindings(e));this.index<this.tokens.length;){let r=this.parseLetBinding();if(r)t.push(r);else{let n=this.expectTemplateBindingKey(),i=this.parseAsBinding(n);i?t.push(i):(n.source=e.source+n.source.charAt(0).toUpperCase()+n.source.substring(1),t.push(...this.parseDirectiveKeywordBindings(n)))}this.consumeStatementTerminator()}return new We(t,[],this.errors)}parseKeyedReadOrWrite(e,t,r){return this.withContext(pe.Writable,()=>{this.rbracketsExpected++;let n=this.parsePipe();if(n instanceof A&&this.error("Key access cannot be empty"),this.rbracketsExpected--,this.expectCharacter(93),this.consumeOptionalOperator("="))if(r)this.error("The '?.' operator cannot be used in the assignment");else{let i=this.parseConditional();return new X(this.span(t),this.sourceSpan(t),e,n,i)}else return r?new q(this.span(t),this.sourceSpan(t),e,n):new z(this.span(t),this.sourceSpan(t),e,n);return new A(this.span(t),this.sourceSpan(t))})}parseDirectiveKeywordBindings(e){let t=[];this.consumeOptionalCharacter(58);let r=this.getDirectiveBoundTarget(),n=this.currentAbsoluteOffset,i=this.parseAsBinding(e);i||(this.consumeStatementTerminator(),n=this.currentAbsoluteOffset);let a=new R(e.span.start,n);return t.push(new ne(a,e,r)),i&&t.push(i),t}getDirectiveBoundTarget(){if(this.next===Ne||this.peekKeywordAs()||this.peekKeywordLet())return null;let e=this.parsePipe(),{start:t,end:r}=e.span,n=this.input.substring(t,r);return new L(e,n,this.location,this.absoluteOffset+t,this.errors)}parseAsBinding(e){if(!this.peekKeywordAs())return null;this.advance();let t=this.expectTemplateBindingKey();this.consumeStatementTerminator();let r=new R(e.span.start,this.currentAbsoluteOffset);return new T(r,t,e)}parseLetBinding(){if(!this.peekKeywordLet())return null;let e=this.currentAbsoluteOffset;this.advance();let t=this.expectTemplateBindingKey(),r=null;this.consumeOptionalOperator("=")&&(r=this.expectTemplateBindingKey()),this.consumeStatementTerminator();let n=new R(e,this.currentAbsoluteOffset);return new T(n,t,r)}consumeStatementTerminator(){this.consumeOptionalCharacter(59)||this.consumeOptionalCharacter(44)}error(e,t=null){this.errors.push(new D(e,this.input,this.locationText(t),this.location)),this.skip()}locationText(e=null){return e==null&&(e=this.index),e<this.tokens.length?`at column ${this.tokens[e].index+1} in`:"at the end of the expression"}_reportErrorForPrivateIdentifier(e,t){let r=`Private identifiers are not supported. Unexpected private identifier: ${e}`;t!==null&&(r+=`, ${t}`),this.error(r)}skip(){let e=this.next;for(;this.index<this.tokens.length&&!e.isCharacter(59)&&!e.isOperator("|")&&(this.rparensExpected<=0||!e.isCharacter(41))&&(this.rbracesExpected<=0||!e.isCharacter(125))&&(this.rbracketsExpected<=0||!e.isCharacter(93))&&(!(this.context&pe.Writable)||!e.isOperator("="));)this.next.isError()&&this.errors.push(new D(this.next.toString(),this.input,this.locationText(),this.location)),this.advance(),e=this.next}},Qe=class extends Ae{constructor(){super(...arguments),this.errors=[]}visitPipe(){this.errors.push("pipes")}}});var ke=E(()=>{Be();De();At()});function Ot(){return new me(new fe)}function qe(s,e){let t=Ot(),{astInput:r,comments:n}=Vr(s,t),{ast:i,errors:a}=e(r,t);return Rt(a),{ast:i,comments:n}}function Nt(s){return qe(s,(e,t)=>t.parseBinding(e,...ze))}function kt(s){return qe(s,(e,t)=>t.parseAction(e,!1,...ze))}function It(s){return qe(s,(e,t)=>{let r=t.parseInterpolationExpression(e,...ze);return r.ast=r.ast.expressions[0],r})}function Pt(s){let e=Ot(),{templateBindings:t,errors:r}=e.parseTemplateBindings(He,s,Ct,je,je);return Rt(r),t}function Rt(s){if(s.length!==0){let[{message:e}]=s;throw new SyntaxError(e.replace(/^Parser Error: | at column \d+ in [^]*$/g,""))}}function Vr(s,e){let t=e._commentStart(s);return t===null?{astInput:s,comments:[]}:{astInput:s.slice(0,t),comments:[{type:"Comment",value:s.slice(t+2),sourceSpan:{start:t,end:s.length}}]}}function Lt(s){return s instanceof P?"Unary":s instanceof C?"Binary":s instanceof Z?"BindingPipe":s instanceof re?"Call":s instanceof W?"Chain":s instanceof Q?"Conditional":s instanceof A?"EmptyExpr":s instanceof _?"ImplicitReceiver":s instanceof z?"KeyedRead":s instanceof q?"SafeKeyedRead":s instanceof X?"KeyedWrite":s instanceof J?"LiteralArray":s instanceof Y?"LiteralMap":s instanceof $?"LiteralPrimitive":s instanceof te?"NonNullAssert":s instanceof ee?"PrefixNot":s instanceof K?"PropertyRead":s instanceof j?"PropertyWrite":s instanceof se?"SafeCall":s instanceof H?"SafePropertyRead":s.type}function $t({start:s,end:e},t){let r=s,n=e;for(;n!==r&&/\s/.test(t[n-1]);)n--;for(;r!==n&&/\s/.test(t[r]);)r++;return{start:r,end:n}}function Wr({start:s,end:e},t){let r=s,n=e;for(;n!==t.length&&/\s/.test(t[n]);)n++;for(;r!==0&&/\s/.test(t[r-1]);)r--;return{start:r,end:n}}function Qr(s,e){return e[s.start-1]==="("&&e[s.end]===")"?{start:s.start-1,end:s.end+1}:s}function bt(s,e,t){let r=0,n={start:s.start,end:s.end};for(;;){let i=Wr(n,e),a=Qr(i,e);if(i.start===a.start&&i.end===a.end)break;n.start=a.start,n.end=a.end,r++}return{hasParens:(t?r-1:r)!==0,outerSpan:$t(t?{start:n.start+1,end:n.end-1}:n,e),innerSpan:$t(s,e)}}function _t(s,e,t){let r=e;for(;!s.test(t[r]);)if(--r<0)throw new Error(`Cannot find front char ${s} from index ${e} in ${JSON.stringify(t)}`);return r}function Ie(s,e,t){let r=e;for(;!s.test(t[r]);)if(++r>=t.length)throw new Error(`Cannot find back char ${s} from index ${e} in ${JSON.stringify(t)}`);return r}function Bt(s){return s.slice(0,1).toLowerCase()+s.slice(1)}function Kt(s){return s.length===0?void 0:s[s.length-1]}var Ct,He,je,ze,Pe=E(()=>{ke();ke();Ct="angular-estree-parser",He="NgEstreeParser",je=0,ze=[Ct,je]});function Re(s,e,t=!1,r=!1){if(!t){let{start:h,end:v}=s;return{start:h,end:v,loc:{start:e.locator.locationForIndex(h),end:e.locator.locationForIndex(v)}}}let{outerSpan:n,innerSpan:i,hasParens:a}=bt(s,e.text,r);return{start:i.start,end:i.end,loc:{start:e.locator.locationForIndex(i.start),end:e.locator.locationForIndex(i.end)},...a&&{extra:{parenthesized:!0,parenStart:n.start,parenEnd:n.end}}}}var ue,Xe=E(()=>{Pe();ue=(s,e,t=!1)=>{let r=Lt(s);switch(r){case"Unary":{let{operator:c,expr:o}=s,x=n(o);return a("UnaryExpression",{prefix:!0,argument:x,operator:c},s.sourceSpan,{hasParentParens:t})}case"Binary":{let{left:c,operation:o,right:x}=s,p=n(c),u=n(x);return a(o==="&&"||o==="||"||o==="??"?"LogicalExpression":"BinaryExpression",{left:p,right:u,operator:o},{start:y(p),end:m(u)},{hasParentParens:t})}case"BindingPipe":{let{exp:c,name:o,args:x}=s,p=n(c),u=f(/\S/,f(/\|/,m(p))+1),g=a("Identifier",{name:o},{start:u,end:u+o.length}),l=x.map(n);return a("NGPipeExpression",{left:p,right:g,arguments:l},{start:y(p),end:m(l.length===0?g:Kt(l))},{hasParentParens:t})}case"Chain":{let{expressions:c}=s;return a("NGChainedExpression",{expressions:c.map(n)},s.sourceSpan,{hasParentParens:t})}case"Comment":{let{value:c}=s;return a("CommentLine",{value:c},s.sourceSpan,{processSpan:!1})}case"Conditional":{let{condition:c,trueExp:o,falseExp:x}=s,p=n(c),u=n(o),g=n(x);return a("ConditionalExpression",{test:p,consequent:u,alternate:g},{start:y(p),end:m(g)},{hasParentParens:t})}case"EmptyExpr":return a("NGEmptyExpression",{},s.sourceSpan,{hasParentParens:t});case"ImplicitReceiver":return a("ThisExpression",{},s.sourceSpan,{hasParentParens:t});case"KeyedRead":case"SafeKeyedRead":{let c=r==="SafeKeyedRead",{key:o}=s,x=Object.prototype.hasOwnProperty.call(s,"receiver")?s.receiver:s.obj,p=n(o);return h(x,p,{computed:!0,optional:c},{end:s.sourceSpan.end,hasParentParens:t})}case"LiteralArray":{let{expressions:c}=s;return a("ArrayExpression",{elements:c.map(n)},s.sourceSpan,{hasParentParens:t})}case"LiteralMap":{let{keys:c,values:o}=s,x=o.map(u=>n(u)),p=c.map(({key:u,quoted:g},l)=>{let N=x[l],le=y(N),et=m(N),be=f(/\S/,l===0?s.sourceSpan.start+1:f(/,/,m(x[l-1]))+1),qt=le===be?et:v(/\S/,v(/:/,le-1)-1)+1,tt={start:be,end:qt},Se=g?a("StringLiteral",{value:u},tt):a("Identifier",{name:u},tt),Xt=Se.end<Se.start||be===le;return a("ObjectProperty",{key:Se,value:N,shorthand:Xt,computed:!1},{start:y(Se),end:et})});return a("ObjectExpression",{properties:p},s.sourceSpan,{hasParentParens:t})}case"LiteralPrimitive":{let{value:c}=s;switch(typeof c){case"boolean":return a("BooleanLiteral",{value:c},s.sourceSpan,{hasParentParens:t});case"number":return a("NumericLiteral",{value:c},s.sourceSpan,{hasParentParens:t});case"object":return a("NullLiteral",{},s.sourceSpan,{hasParentParens:t});case"string":return a("StringLiteral",{value:c},s.sourceSpan,{hasParentParens:t});case"undefined":return a("Identifier",{name:"undefined"},s.sourceSpan,{hasParentParens:t});default:throw new Error(`Unexpected LiteralPrimitive value type ${typeof c}`)}}case"Call":case"SafeCall":{let c=r==="SafeCall",{receiver:o,args:x}=s,p=x.length===1?[i(x[0])]:x.map(n),u=n(o),g=I(u),l=c||g?"OptionalCallExpression":"CallExpression";return a(l,{callee:u,arguments:p,optional:l==="OptionalCallExpression"?c:void 0},{start:y(u),end:s.sourceSpan.end},{hasParentParens:t})}case"NonNullAssert":{let{expression:c}=s,o=n(c);return a("TSNonNullExpression",{expression:o},{start:y(o),end:s.sourceSpan.end},{hasParentParens:t})}case"PrefixNot":{let{expression:c}=s,o=n(c);return a("UnaryExpression",{prefix:!0,operator:"!",argument:o},{start:s.sourceSpan.start,end:m(o)},{hasParentParens:t})}case"PropertyRead":case"SafePropertyRead":{let c=r==="SafePropertyRead",{receiver:o,name:x}=s,p=v(/\S/,s.sourceSpan.end-1)+1,u=a("Identifier",{name:x},{start:p-x.length,end:p},w(o)?{hasParentParens:t}:{});return h(o,u,{computed:!1,optional:c},{hasParentParens:t})}case"KeyedWrite":{let{key:c,value:o}=s,x=Object.prototype.hasOwnProperty.call(s,"receiver")?s.receiver:s.obj,p=n(c),u=n(o),g=h(x,p,{computed:!0,optional:!1},{end:f(/\]/,m(p))+1});return a("AssignmentExpression",{left:g,operator:"=",right:u},{start:y(g),end:m(u)},{hasParentParens:t})}case"PropertyWrite":{let{receiver:c,name:o,value:x}=s,p=n(x),u=v(/\S/,v(/=/,y(p)-1)-1)+1,g=a("Identifier",{name:o},{start:u-o.length,end:u}),l=h(c,g,{computed:!1,optional:!1});return a("AssignmentExpression",{left:l,operator:"=",right:p},{start:y(l),end:m(p)},{hasParentParens:t})}default:throw new Error(`Unexpected node ${r}`)}function n(c){return ue(c,e)}function i(c){return ue(c,e,!0)}function a(c,o,x,{processSpan:p=!0,hasParentParens:u=!1}={}){let g={type:c,...Re(x,e,p,u),...o};switch(c){case"NumericLiteral":{let l=g;l.extra={...l.extra,raw:e.text.slice(l.start,l.end),rawValue:l.value};break}case"StringLiteral":{let l=g;l.extra={...l.extra,raw:e.text.slice(l.start,l.end),rawValue:l.value};break}case"ObjectProperty":{let l=g;l.shorthand&&(l.extra={...l.extra,shorthand:l.shorthand});break}}return g}function h(c,o,x,{end:p=m(o),hasParentParens:u=!1}={}){if(w(c)||c.sourceSpan.start===o.start)return o;let g=n(c),l=I(g);return a(x.optional||l?"OptionalMemberExpression":"MemberExpression",{object:g,property:o,computed:x.computed,...x.optional?{optional:!0}:l?{optional:!1}:null},{start:y(g),end:p},{hasParentParens:u})}function v(c,o){return _t(c,o,e.text)}function f(c,o){return Ie(c,o,e.text)}function w(c){return c.sourceSpan.start>=c.sourceSpan.end||/^\s+$/.test(e.text.slice(c.sourceSpan.start,c.sourceSpan.end))}function I(c){return(c.type==="OptionalCallExpression"||c.type==="OptionalMemberExpression")&&!O(c)}function O(c){return c.extra&&c.extra.parenthesized}function y(c){return O(c)?c.extra.parenStart:c.start}function m(c){return O(c)?c.extra.parenEnd:c.end}}});function Tt(s,e){s.forEach(y);let[t]=s,{key:r}=t,n=e.text.slice(t.sourceSpan.start,t.sourceSpan.end).trim().length===0?s.slice(1):s,i=[],a=null;for(let o=0;o<n.length;o++){let x=n[o];if(a&&I(a)&&O(x)&&x.value&&x.value.source===a.key.source){let p=f("NGMicrosyntaxKey",{name:x.key.source},x.key.span),u=(N,le)=>({...N,...Re({start:N.start,end:le},e)}),g=N=>({...u(N,p.end),alias:p}),l=i.pop();if(l.type==="NGMicrosyntaxExpression")i.push(g(l));else if(l.type==="NGMicrosyntaxKeyedExpression"){let N=g(l.expression);i.push(u({...l,expression:N},N.end))}else throw new Error(`Unexpected type ${l.type}`)}else i.push(h(x,o));a=x}return f("NGMicrosyntax",{body:i},i.length===0?s[0].sourceSpan:{start:i[0].start,end:i[i.length-1].end});function h(o,x){if(I(o)){let{key:p,value:u}=o;return u?x===0?f("NGMicrosyntaxExpression",{expression:v(u.ast),alias:null},u.sourceSpan):f("NGMicrosyntaxKeyedExpression",{key:f("NGMicrosyntaxKey",{name:w(p.source)},p.span),expression:f("NGMicrosyntaxExpression",{expression:v(u.ast),alias:null},u.sourceSpan)},{start:p.span.start,end:u.sourceSpan.end}):f("NGMicrosyntaxKey",{name:w(p.source)},p.span)}else{let{key:p,sourceSpan:u}=o;if(/^let\s$/.test(e.text.slice(u.start,u.start+4))){let{value:l}=o;return f("NGMicrosyntaxLet",{key:f("NGMicrosyntaxKey",{name:p.source},p.span),value:l?f("NGMicrosyntaxKey",{name:l.source},l.span):null},{start:u.start,end:l?l.span.end:p.span.end})}else{let l=c(o);return f("NGMicrosyntaxAs",{key:f("NGMicrosyntaxKey",{name:l.source},l.span),alias:f("NGMicrosyntaxKey",{name:p.source},p.span)},{start:l.span.start,end:p.span.end})}}}function v(o){return ue(o,e)}function f(o,x,p,u=!0){return{type:o,...Re(p,e,u),...x}}function w(o){return Bt(o.slice(r.source.length))}function I(o){return o instanceof ne}function O(o){return o instanceof T}function y(o){m(o.key.span),O(o)&&o.value&&m(o.value.span)}function m(o){if(e.text[o.start]!=='"'&&e.text[o.start]!=="'")return;let x=e.text[o.start],p=!1;for(let u=o.start+1;u<e.text.length;u++)switch(e.text[u]){case x:if(!p){o.end=u+1;return}default:p=!1;break;case"\\":p=!p;break}}function c(o){if(!o.value||o.value.source!==He)return o.value;let x=Ie(/\S/,o.sourceSpan.start,e.text);return{source:"$implicit",span:{start:x,end:x}}}}var Mt=E(()=>{ke();Xe();Pe()});function Ze(s,e){let{ast:t,comments:r}=e(s),n=new xe(s),i=h=>ue(h,n),a=i(t);return a.comments=r.map(h=>i(h)),a}function Ft(s){return Ze(s,Nt)}function Ut(s){return Ze(s,It)}function Je(s){return Ze(s,kt)}function Gt(s){return Tt(Pt(s),new xe(s))}var Dt=E(()=>{at();Xe();Mt();Pe()});function jr(s){return Array.isArray(s)&&s.length>0}var Vt,Wt=E(()=>{Vt=jr});function Ye(s){var r;let e=s.range?s.range[0]:s.start,t=((r=s.declaration)==null?void 0:r.decorators)??s.decorators;return Vt(t)?Math.min(Ye(t[0]),e):e}function Qt(s){return s.range?s.range[1]:s.end}var jt=E(()=>{Wt()});var Ht={};Jt(Ht,{__ng_action:()=>Hr,__ng_binding:()=>zr,__ng_directive:()=>Xr,__ng_interpolation:()=>qr});function Le(s){return{astFormat:"estree",parse(e){let t=s(e);return{type:"NGRoot",node:s===Je&&t.type!=="NGChainedExpression"?{...t,type:"NGChainedExpression",expressions:[t]}:t}},locStart:Ye,locEnd:Qt}}var Hr,zr,qr,Xr,zt=E(()=>{Dt();jt();Hr=Le(Je),zr=Le(Ft),qr=Le(Ut),Xr=Le(Gt)});function Yt(s){let e=Object.create(null);for(let{importParsers:t,parserNames:r}of s)for(let n of r)e[n]=async()=>Object.assign(e,await t())[n];return e}var rt=Yt;var Zr=rt([{importParsers:()=>Promise.resolve().then(()=>(zt(),Ht)),parserNames:["__ng_action","__ng_binding","__ng_interpolation","__ng_directive"]}]),Bs={parsers:Zr};export{Bs as default,Zr as parsers};
@@ -0,0 +1,17 @@
1
+ import { Parser } from "../index.js";
2
+
3
+ export declare const parsers: {
4
+ babel: Parser;
5
+ "babel-flow": Parser;
6
+ "babel-ts": Parser;
7
+ __js_expression: Parser;
8
+ __ts_expression: Parser;
9
+ __vue_expression: Parser;
10
+ __vue_ts_expression: Parser;
11
+ __vue_event_binding: Parser;
12
+ __vue_ts_event_binding: Parser;
13
+ __babel_estree: Parser;
14
+ json: Parser;
15
+ json5: Parser;
16
+ "json-stringify": Parser;
17
+ };