Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

prettier

Package Overview
Dependencies
Maintainers
11
Versions
164
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

prettier - npm Package Compare versions

Comparing version 3.2.2 to 3.2.3

2

package.json
{
"name": "prettier",
"version": "3.2.2",
"version": "3.2.3",
"description": "Prettier is an opinionated code formatter",

@@ -5,0 +5,0 @@ "bin": "./bin/prettier.cjs",

@@ -1,1 +0,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 Re=Object.defineProperty;var Rt=Object.getOwnPropertyDescriptor;var Lt=Object.getOwnPropertyNames;var Kt=Object.prototype.hasOwnProperty;var ze=(r,e)=>{for(var t in e)Re(r,t,{get:e[t],enumerable:!0})},bt=(r,e,t,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of Lt(e))!Kt.call(r,n)&&n!==t&&Re(r,n,{get:()=>e[n],enumerable:!(s=Rt(e,n))||s.enumerable});return r};var Bt=r=>bt(Re({},"__esModule",{value:!0}),r);var br={};ze(br,{parsers:()=>Qe});var Qe={};ze(Qe,{__ng_action:()=>Pr,__ng_binding:()=>Rr,__ng_directive:()=>Kr,__ng_interpolation:()=>Lr});var D=class{constructor(e,t,s,n){this.input=t,this.errLocation=s,this.ctxLocation=n,this.message=`Parser Error: ${e} ${s} [${t}] in ${n}`}},R=class{constructor(e,t){this.start=e,this.end=t}toAbsolute(e){return new I(e+this.start,e+this.end)}},w=class{constructor(e,t){this.span=e,this.sourceSpan=t}toString(){return"AST"}},V=class extends w{constructor(e,t,s){super(e,t),this.nameSpan=s}},$=class extends w{visit(e,t=null){}},L=class extends w{visit(e,t=null){return e.visitImplicitReceiver(this,t)}},me=class extends L{visit(e,t=null){var s;return(s=e.visitThisReceiver)==null?void 0:s.call(e,this,t)}},W=class extends w{constructor(e,t,s){super(e,t),this.expressions=s}visit(e,t=null){return e.visitChain(this,t)}},Q=class extends w{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)}},b=class extends V{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 V{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 V{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)}},q=class extends w{constructor(e,t,s,n){super(e,t),this.receiver=s,this.key=n}visit(e,t=null){return e.visitKeyedRead(this,t)}},j=class extends w{constructor(e,t,s,n){super(e,t),this.receiver=s,this.key=n}visit(e,t=null){return e.visitSafeKeyedRead(this,t)}},X=class extends w{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)}},Z=class extends V{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)}},C=class extends w{constructor(e,t,s){super(e,t),this.value=s}visit(e,t=null){return e.visitLiteralPrimitive(this,t)}},J=class extends w{constructor(e,t,s){super(e,t),this.expressions=s}visit(e,t=null){return e.visitLiteralArray(this,t)}},Y=class extends w{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 w{constructor(e,t,s,n){super(e,t),this.strings=s,this.expressions=n}visit(e,t=null){return e.visitInterpolation(this,t)}},A=class extends w{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)}},B=class r extends A{static createMinus(e,t,s){return new r(e,t,"-",s,"-",new C(e,t,0),s)}static createPlus(e,t,s){return new r(e,t,"+",s,"-",s,new C(e,t,0))}constructor(e,t,s,n,i,a,h){super(e,t,i,a,h),this.operator=s,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 w{constructor(e,t,s){super(e,t),this.expression=s}visit(e,t=null){return e.visitPrefixNot(this,t)}},te=class extends w{constructor(e,t,s){super(e,t),this.expression=s}visit(e,t=null){return e.visitNonNullAssert(this,t)}},re=class extends w{constructor(e,t,s,n,i){super(e,t),this.receiver=s,this.args=n,this.argumentSpan=i}visit(e,t=null){return e.visitCall(this,t)}},se=class extends w{constructor(e,t,s,n,i){super(e,t),this.receiver=s,this.args=n,this.argumentSpan=i}visit(e,t=null){return e.visitSafeCall(this,t)}},I=class{constructor(e,t){this.start=e,this.end=t}},P=class extends w{constructor(e,t,s,n,i){super(new R(0,t===null?0:t.length),new I(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}`}},T=class{constructor(e,t,s){this.sourceSpan=e,this.key=t,this.value=s}},ne=class{constructor(e,t,s){this.sourceSpan=e,this.key=t,this.value=s}},we=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 s of e)this.visit(s,t)}};var qe;(function(r){r[r.DEFAULT=0]="DEFAULT",r[r.LITERAL_ATTR=1]="LITERAL_ATTR",r[r.ANIMATION=2]="ANIMATION"})(qe||(qe={}));function je(r){return r>=9&&r<=32||r==160}function K(r){return 48<=r&&r<=57}function Xe(r){return r>=97&&r<=122||r>=65&&r<=90}function Le(r){return r===39||r===34||r===96}var f;(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={}));var ur=["var","let","as","null","undefined","true","false","if","else","this"],le=class{tokenize(e){let t=new Be(e),s=[],n=t.scanToken();for(;n!=null;)s.push(n),n=t.scanToken();return s}},O=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}}};function tt(r,e,t){return new O(r,e,f.Character,t,String.fromCharCode(t))}function lr(r,e,t){return new O(r,e,f.Identifier,0,t)}function xr(r,e,t){return new O(r,e,f.PrivateIdentifier,0,t)}function dr(r,e,t){return new O(r,e,f.Keyword,0,t)}function be(r,e,t){return new O(r,e,f.Operator,0,t)}function fr(r,e,t){return new O(r,e,f.String,0,t)}function vr(r,e,t){return new O(r,e,f.Number,t,"")}function gr(r,e,t){return new O(r,e,f.Error,0,t)}var Ce=new O(-1,-1,f.Character,0,""),Be=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(rt(s))return this.scanIdentifier();if(K(s))return this.scanNumber(n);let i=n;switch(s){case 46:return this.advance(),K(this.peek)?this.scanNumber(i):tt(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(;je(this.peek);)this.advance();return this.scanToken()}return this.advance(),this.error(`Unexpected character [${String.fromCharCode(s)}]`,0)}scanCharacter(e,t){return this.advance(),tt(e,this.index,t)}scanOperator(e,t){return this.advance(),be(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),be(e,this.index,h)}scanIdentifier(){let e=this.index;for(this.advance();st(this.peek);)this.advance();let t=this.input.substring(e,this.index);return ur.indexOf(t)>-1?dr(e,this.index,t):lr(e,this.index,t)}scanPrivateIdentifier(){let e=this.index;if(this.advance(),!rt(this.peek))return this.error("Invalid character [#]",-1);for(;st(this.peek);)this.advance();let t=this.input.substring(e,this.index);return xr(e,this.index,t)}scanNumber(e){let t=this.index===e,s=!1;for(this.advance();;){if(!K(this.peek))if(this.peek===95){if(!K(this.input.charCodeAt(this.index-1))||!K(this.input.charCodeAt(this.index+1)))return this.error("Invalid numeric separator",0);s=!0}else if(this.peek===46)t=!1;else if(mr(this.peek)){if(this.advance(),Sr(this.peek)&&this.advance(),!K(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?yr(n):parseFloat(n);return vr(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);let h;if(this.advance(),this.peek==117){let g=i.substring(this.index+1,this.index+5);if(/^[0-9a-f]+$/i.test(g))h=parseInt(g,16);else return this.error(`Invalid unicode escape [\\u${g}]`,0);for(let d=0;d<5;d++)this.advance()}else h=wr(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(),fr(e,this.index,s+a)}scanQuestion(e){this.advance();let t="?";return(this.peek===63||this.peek===46)&&(t+=this.peek===46?".":"?",this.advance()),be(e,this.index,t)}error(e,t){let s=this.index+t;return gr(s,this.index,`Lexer Error: ${e} at column ${s} in expression [${this.input}]`)}};function rt(r){return 97<=r&&r<=122||65<=r&&r<=90||r==95||r==36}function st(r){return Xe(r)||K(r)||r==95||r==36}function mr(r){return r==101||r==69}function Sr(r){return r==45||r==43}function wr(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 yr(r){let e=parseInt(r);if(isNaN(e))throw new Error("Invalid integer literal when parsing "+r);return e}var Er=[/^\s*$/,/[<>]/,/^[{}]$/,/&(#|[a-z])/i,/^\/\//];function ot(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];Er.forEach(n=>{if(n.test(t)||n.test(s))throw new Error(`['${t}', '${s}'] contains unusable interpolation symbol.`)})}}var _e=class r{static fromArray(e){return e?(ot("interpolation",e),new r(e[0],e[1])):F}constructor(e,t){this.start=e,this.end=t}},F=new _e("{{","}}");var Me=class{constructor(e,t,s){this.strings=e,this.expressions=t,this.offsets=s}},Fe=class{constructor(e,t,s){this.templateBindings=e,this.warnings=t,this.errors=s}},fe=class{constructor(e){this._lexer=e,this.errors=[]}parseAction(e,t,s,n,i=F){this._checkNoInterpolation(e,s,i);let a=this._stripComments(e),h=this._lexer.tokenize(a),g=1;t&&(g|=2);let d=new U(e,s,n,h,g,this.errors,0).parseChain();return new P(d,e,s,n,this.errors)}parseBinding(e,t,s,n=F){let i=this._parseBindingAst(e,t,s,n);return new P(i,e,t,s,this.errors)}checkSimpleExpression(e){let t=new Ue;return e.visit(t),t.errors}parseSimpleBinding(e,t,s,n=F){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 P(i,e,t,s,this.errors)}_reportError(e,t,s,n){this.errors.push(new D(e,t,s,n))}_parseBindingAst(e,t,s,n){this._checkNoInterpolation(e,t,n);let i=this._stripComments(e),a=this._lexer.tokenize(i);return new U(e,t,s,a,0,this.errors,0).parseChain()}parseTemplateBindings(e,t,s,n,i){let a=this._lexer.tokenize(t);return new U(t,s,i,a,0,this.errors,0).parseTemplateBindings({source:e,span:new I(n,n+e.length)})}parseInterpolation(e,t,s,n,i=F){let{strings:a,expressions:h,offsets:g}=this.splitInterpolation(e,t,n,i);if(h.length===0)return null;let d=[];for(let y=0;y<h.length;++y){let E=h[y].text,m=this._stripComments(E),o=this._lexer.tokenize(m),u=new U(e,t,s,o,0,this.errors,g[y]).parseChain();d.push(u)}return this.createInterpolationAst(a.map(y=>y.text),d,e,t,s)}parseInterpolationExpression(e,t,s){let n=this._stripComments(e),i=this._lexer.tokenize(n),a=new U(e,t,s,i,0,this.errors,0).parseChain(),h=["",""];return this.createInterpolationAst(h,[a],e,t,s)}createInterpolationAst(e,t,s,n,i){let a=new R(0,s.length),h=new Se(a,a.toAbsolute(i),e,t);return new P(h,s,n,i,this.errors)}splitInterpolation(e,t,s,n=F){let i=[],a=[],h=[],g=s?$r(s):null,d=0,y=!1,E=!1,{start:m,end:o}=n;for(;d<e.length;)if(y){let u=d,v=u+m.length,c=this._getInterpolationEndIndex(e,o,v);if(c===-1){y=!1,E=!0;break}let x=c+o.length,l=e.substring(v,c);l.trim().length===0&&this._reportError("Blank expressions are not allowed in interpolated strings",e,`at column ${d} in`,t),a.push({text:l,start:u,end:x});let k=((g==null?void 0:g.get(u))??u)+m.length;h.push(k),d=x,y=!1}else{let u=d;d=e.indexOf(m,d),d===-1&&(d=e.length);let v=e.substring(u,d);i.push({text:v,start:u,end:d}),y=!0}if(!y)if(E){let u=i[i.length-1];u.text+=e.substring(d),u.end=e.length}else i.push({text:e.substring(d),start:d,end:e.length});return new Me(i,a,h)}wrapLiteralPrimitive(e,t,s){let n=new R(0,e==null?0:e.length);return new P(new C(n,n.toAbsolute(s),e),e,t,s,this.errors)}_stripComments(e){let t=this._commentStart(e);return t!=null?e.substring(0,t):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&&Le(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];Le(e.charCodeAt(i))&&(s===null||s===a)&&n%2===0?s=s===null?a:null:s===null&&(yield i),n=a==="\\"?n+1:0}}},pe;(function(r){r[r.None=0]="None",r[r.Writable=1]="Writable"})(pe||(pe={}));var U=class{constructor(e,t,s,n,i,a,h){this.input=e,this.location=t,this.absoluteOffset=s,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]:Ce}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 s=this.currentEndIndex;if(t!==void 0&&t>this.currentEndIndex&&(s=t),e>s){let n=s;s=e,e=n}return new R(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===Ce?"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.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 s=this.offset,n=this.offset+this.input.length;return new $(this.span(s,n),this.sourceSpan(s,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 s=this.inputIndex,n=this.expectIdentifierOrKeyword(),i,a;n!==null?i=this.sourceSpan(s):(n="",a=this.next.index!==-1?this.next.index:this.input.length+this.offset,i=new R(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 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 $(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 A(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 A(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 A(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 A(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 A(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 A(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 A(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(),B.createPlus(this.span(e),this.sourceSpan(e),s);case"-":return this.advance(),s=this.parsePrefix(),B.createMinus(this.span(e),this.sourceSpan(e),s);case"!":return this.advance(),s=this.parsePrefix(),new ee(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.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 C(this.span(e),this.sourceSpan(e),null);if(this.next.isKeywordUndefined())return this.advance(),new C(this.span(e),this.sourceSpan(e),void 0);if(this.next.isKeywordTrue())return this.advance(),new C(this.span(e),this.sourceSpan(e),!0);if(this.next.isKeywordFalse())return this.advance(),new C(this.span(e),this.sourceSpan(e),!1);if(this.next.isKeywordThis())return this.advance(),new me(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 L(this.span(e),this.sourceSpan(e)),e,!1);if(this.next.isNumber()){let t=this.next.toNumber();return this.advance(),new C(this.span(e),this.sourceSpan(e),t)}else if(this.next.isString()){let t=this.next.toString();return this.advance(),new C(this.span(e),this.sourceSpan(e),t)}else return this.next.isPrivateIdentifier()?(this._reportErrorForPrivateIdentifier(this.next,null),new $(this.span(e),this.sourceSpan(e))):this.index>=this.tokens.length?(this.error(`Unexpected end of expression: ${this.input}`),new $(this.span(e),this.sourceSpan(e))):(this.error(`Unexpected token ${this.next}`),new $(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),g=this.sourceSpan(n);t.push(new b(h,g,g,new L(h,g),a))}}while(this.consumeOptionalCharacter(44)&&!this.next.isCharacter(125));this.rbracesExpected--,this.expectCharacter(125)}return new Y(this.span(s),this.sourceSpan(s),e,t)}parseAccessMember(e,t,s){let n=this.inputIndex,i=this.withContext(pe.Writable,()=>{let g=this.expectIdentifierOrKeyword()??"";return g.length===0&&this.error("Expected identifier for property access",e.span.end),g}),a=this.sourceSpan(n),h;if(s)this.consumeOptionalAssignment()?(this.error("The '?.' operator cannot be used in the assignment"),h=new $(this.span(t),this.sourceSpan(t))):h=new z(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 $(this.span(t),this.sourceSpan(t));let g=this.parseConditional();h=new H(this.span(t),this.sourceSpan(t),a,e,i,g)}else h=new b(this.span(t),this.sourceSpan(t),a,e,i);return h}parseCall(e,t,s){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),g=this.sourceSpan(t);return s?new se(h,g,e,i,a):new re(h,g,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,s=this.currentAbsoluteOffset;do e+=this.expectIdentifierOrKeywordOrString(),t=this.consumeOptionalOperator("-"),t&&(e+="-");while(t);return{source:e,span:new I(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 Fe(t,[],this.errors)}parseKeyedReadOrWrite(e,t,s){return this.withContext(pe.Writable,()=>{this.rbracketsExpected++;let n=this.parsePipe();if(n instanceof $&&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 X(this.span(t),this.sourceSpan(t),e,n,i)}else return s?new j(this.span(t),this.sourceSpan(t),e,n):new q(this.span(t),this.sourceSpan(t),e,n);return new $(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 I(e.span.start,n);return t.push(new ne(a,e,s)),i&&t.push(i),t}getDirectiveBoundTarget(){if(this.next===Ce||this.peekKeywordAs()||this.peekKeywordLet())return null;let e=this.parsePipe(),{start:t,end:s}=e.span,n=this.input.substring(t,s);return new P(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 I(e.span.start,this.currentAbsoluteOffset);return new T(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 I(e,this.currentAbsoluteOffset);return new T(n,t,s)}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 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&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}},Ue=class extends we{constructor(){super(...arguments),this.errors=[]}visitPipe(){this.errors.push("pipes")}};function $r(r){let e=new Map,t=0,s=0,n=0;for(;n<r.length;){let i=r[n];if(i.type===9){let[a,h]=i.parts;t+=h.length,s+=a.length}else{let a=i.parts.reduce((h,g)=>h+g.length,0);s+=a,t+=a}e.set(s,t),n++}return e}var ht="angular-estree-parser",De="NgEstreeParser",Ge=0,Ae=[ht,Ge];function pt(){return new fe(new le)}function Oe(r,e){let t=pt(),{astInput:s,comments:n}=Ar(r,t),{ast:i,errors:a}=e(s,t);return vt(a),{ast:i,comments:n}}function ut(r){return Oe(r,(e,t)=>t.parseBinding(e,...Ae))}function lt(r){return Oe(r,(e,t)=>t.parseSimpleBinding(e,...Ae))}function xt(r){return Oe(r,(e,t)=>t.parseAction(e,!1,...Ae))}function dt(r){return Oe(r,(e,t)=>{let s=t.parseInterpolationExpression(e,...Ae);return s.ast=s.ast.expressions[0],s})}function ft(r){let e=pt(),{templateBindings:t,errors:s}=e.parseTemplateBindings(De,r,ht,Ge,Ge);return vt(s),t}function vt(r){if(r.length!==0){let[{message:e}]=r;throw new SyntaxError(e.replace(/^Parser Error: | at column \d+ in [^]*$/g,""))}}function Ar(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),sourceSpan:{start:t,end:r.length}}]}}function gt(r){return r instanceof B?"Unary":r instanceof A?"Binary":r instanceof Z?"BindingPipe":r instanceof re?"Call":r instanceof W?"Chain":r instanceof Q?"Conditional":r instanceof $?"EmptyExpr":r instanceof L?"ImplicitReceiver":r instanceof q?"KeyedRead":r instanceof j?"SafeKeyedRead":r instanceof X?"KeyedWrite":r instanceof J?"LiteralArray":r instanceof Y?"LiteralMap":r instanceof C?"LiteralPrimitive":r instanceof te?"NonNullAssert":r instanceof ee?"PrefixNot":r instanceof b?"PropertyRead":r instanceof H?"PropertyWrite":r instanceof se?"SafeCall":r instanceof z?"SafePropertyRead":r.type}function ct({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 Or({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 Nr(r,e){return e[r.start-1]==="("&&e[r.end]===")"?{start:r.start-1,end:r.end+1}:r}function mt(r,e,t){let s=0,n={start:r.start,end:r.end};for(;;){let i=Or(n,e),a=Nr(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:ct(t?{start:n.start+1,end:n.end-1}:n,e),innerSpan:ct(r,e)}}function St(r){return typeof r=="string"?e=>e===r:e=>r.test(e)}function wt(r,e,t){let s=St(e);for(let n=t;n>=0;n--){let i=r[n];if(s(i))return n}throw new Error(`Cannot find front char ${e} from index ${t} in ${JSON.stringify(r)}`)}function yt(r,e,t){let s=St(e);for(let n=t;n<r.length;n++){let i=r[n];if(s(i))return n}throw new Error(`Cannot find character ${e} from index ${t} in ${JSON.stringify(r)}`)}function Et(r){return r.slice(0,1).toLowerCase()+r.slice(1)}var ve=class{text;constructor(e){this.text=e}getCharacterIndex(e,t){return yt(this.text,e,t)}getCharacterLastIndex(e,t){return wt(this.text,e,t)}};var Ir=(r,e,t)=>{if(!(r&&e==null))return Array.isArray(e)||typeof e=="string"?e[t<0?e.length+t:t]:e.at(t)},Ne=Ir;var G=(r,e,t=!1)=>{let s=gt(r);switch(s){case"Unary":{let{operator:o,expr:u}=r,v=n(u);return a("UnaryExpression",{prefix:!0,argument:v,operator:o},r.sourceSpan,{hasParentParens:t})}case"Binary":{let{left:o,operation:u,right:v}=r,c=n(o),x=n(v);return a(u==="&&"||u==="||"||u==="??"?"LogicalExpression":"BinaryExpression",{left:c,right:x,operator:u},{start:E(c),end:m(x)},{hasParentParens:t})}case"BindingPipe":{let{exp:o,name:u,args:v}=r,c=n(o),x=e.getCharacterIndex(/\S/,e.getCharacterIndex("|",m(c))+1),l=a("Identifier",{name:u},{start:x,end:x+u.length}),p=v.map(n);return a("NGPipeExpression",{left:c,right:l,arguments:p},{start:E(c),end:m(p.length===0?l:Ne(!1,p,-1))},{hasParentParens:t})}case"Chain":{let{expressions:o}=r;return a("NGChainedExpression",{expressions:o.map(n)},r.sourceSpan,{hasParentParens:t})}case"Comment":{let{value:o}=r;return a("CommentLine",{value:o},r.sourceSpan,{processSpan:!1})}case"Conditional":{let{condition:o,trueExp:u,falseExp:v}=r,c=n(o),x=n(u),l=n(v);return a("ConditionalExpression",{test:c,consequent:x,alternate:l},{start:E(c),end:m(l)},{hasParentParens:t})}case"EmptyExpr":return a("NGEmptyExpression",{},r.sourceSpan,{hasParentParens:t});case"ImplicitReceiver":return a("ThisExpression",{},r.sourceSpan,{hasParentParens:t});case"KeyedRead":case"SafeKeyedRead":{let o=s==="SafeKeyedRead",{key:u}=r,v=Object.prototype.hasOwnProperty.call(r,"receiver")?r.receiver:r.obj,c=n(u);return h(v,c,{computed:!0,optional:o},{end:r.sourceSpan.end,hasParentParens:t})}case"LiteralArray":{let{expressions:o}=r;return a("ArrayExpression",{elements:o.map(n)},r.sourceSpan,{hasParentParens:t})}case"LiteralMap":{let{keys:o,values:u}=r,v=u.map(x=>n(x)),c=o.map(({key:x,quoted:l},p)=>{let k=v[p],S=E(k),N=m(k),ue=e.getCharacterIndex(/\S/,p===0?r.sourceSpan.start+1:e.getCharacterIndex(",",m(v[p-1]))+1),kt=S===ue?N:e.getCharacterLastIndex(/\S/,e.getCharacterLastIndex(":",S-1)-1)+1,He={start:ue,end:kt},ge=l?a("StringLiteral",{value:x},He):a("Identifier",{name:x},He),Pt=ge.end<ge.start||ue===S;return a("ObjectProperty",{key:ge,value:k,shorthand:Pt,computed:!1},{start:E(ge),end:N})});return a("ObjectExpression",{properties:c},r.sourceSpan,{hasParentParens:t})}case"LiteralPrimitive":{let{value:o}=r;switch(typeof o){case"boolean":return a("BooleanLiteral",{value:o},r.sourceSpan,{hasParentParens:t});case"number":return a("NumericLiteral",{value:o},r.sourceSpan,{hasParentParens:t});case"object":return a("NullLiteral",{},r.sourceSpan,{hasParentParens:t});case"string":return a("StringLiteral",{value:o},r.sourceSpan,{hasParentParens:t});case"undefined":return a("Identifier",{name:"undefined"},r.sourceSpan,{hasParentParens:t});default:throw new Error(`Unexpected LiteralPrimitive value type ${typeof o}`)}}case"Call":case"SafeCall":{let o=s==="SafeCall",{receiver:u,args:v}=r,c=v.length===1?[i(v[0])]:v.map(n),x=n(u),l=d(x),p=o||l?"OptionalCallExpression":"CallExpression";return a(p,{callee:x,arguments:c,optional:p==="OptionalCallExpression"?o:void 0},{start:E(x),end:r.sourceSpan.end},{hasParentParens:t})}case"NonNullAssert":{let{expression:o}=r,u=n(o);return a("TSNonNullExpression",{expression:u},{start:E(u),end:r.sourceSpan.end},{hasParentParens:t})}case"PrefixNot":{let{expression:o}=r,u=n(o);return a("UnaryExpression",{prefix:!0,operator:"!",argument:u},{start:r.sourceSpan.start,end:m(u)},{hasParentParens:t})}case"PropertyRead":case"SafePropertyRead":{let o=s==="SafePropertyRead",{receiver:u,name:v}=r,c=e.getCharacterLastIndex(/\S/,r.sourceSpan.end-1)+1,x=a("Identifier",{name:v},{start:c-v.length,end:c},g(u)?{hasParentParens:t}:{});return h(u,x,{computed:!1,optional:o},{hasParentParens:t})}case"KeyedWrite":{let{key:o,value:u}=r,v=Object.prototype.hasOwnProperty.call(r,"receiver")?r.receiver:r.obj,c=n(o),x=n(u),l=h(v,c,{computed:!0,optional:!1},{end:e.getCharacterIndex("]",m(c))+1});return a("AssignmentExpression",{left:l,operator:"=",right:x},{start:E(l),end:m(x)},{hasParentParens:t})}case"PropertyWrite":{let{receiver:o,name:u,value:v}=r,c=n(v),x=e.getCharacterLastIndex(/\S/,e.getCharacterLastIndex("=",E(c)-1)-1)+1,l=a("Identifier",{name:u},{start:x-u.length,end:x}),p=h(o,l,{computed:!1,optional:!1});return a("AssignmentExpression",{left:p,operator:"=",right:c},{start:E(p),end:m(c)},{hasParentParens:t})}default:throw new Error(`Unexpected node ${s}`)}function n(o){return G(o,e)}function i(o){return G(o,e,!0)}function a(o,u,v,{processSpan:c=!0,hasParentParens:x=!1}={}){let l={type:o,...Ie(v,e,c,x),...u};switch(o){case"NumericLiteral":{let p=l;p.extra={...p.extra,raw:e.text.slice(p.start,p.end),rawValue:p.value};break}case"StringLiteral":{let p=l;p.extra={...p.extra,raw:e.text.slice(p.start,p.end),rawValue:p.value};break}case"ObjectProperty":{let p=l;p.shorthand&&(p.extra={...p.extra,shorthand:p.shorthand});break}}return l}function h(o,u,v,{end:c=m(u),hasParentParens:x=!1}={}){if(g(o)||o.sourceSpan.start===u.start)return u;let l=n(o),p=d(l);return a(v.optional||p?"OptionalMemberExpression":"MemberExpression",{object:l,property:u,computed:v.computed,...v.optional?{optional:!0}:p?{optional:!1}:null},{start:E(l),end:c},{hasParentParens:x})}function g(o){return o.sourceSpan.start>=o.sourceSpan.end||/^\s+$/.test(e.text.slice(o.sourceSpan.start,o.sourceSpan.end))}function d(o){return(o.type==="OptionalCallExpression"||o.type==="OptionalMemberExpression")&&!y(o)}function y(o){return o.extra&&o.extra.parenthesized}function E(o){return y(o)?o.extra.parenStart:o.start}function m(o){return y(o)?o.extra.parenEnd:o.end}};function Ie(r,e,t=!1,s=!1){if(!t){let{start:g,end:d}=r;return{start:g,end:d,range:[g,d]}}let{outerSpan:n,innerSpan:{start:i,end:a},hasParens:h}=mt(r,e.text,s);return{start:i,end:a,range:[i,a],...h&&{extra:{parenthesized:!0,parenStart:n.start,parenEnd:n.end}}}}function $t(r,e){r.forEach(o);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 c=0;c<n.length;c++){let x=n[c];if(a&&E(a)&&m(x)&&x.value&&x.value.source===a.key.source){let l=d("NGMicrosyntaxKey",{name:x.key.source},x.key.span),p=(N,ue)=>({...N,...Ie({start:N.start,end:ue},e)}),k=N=>({...p(N,l.end),alias:l}),S=i.pop();if(S.type==="NGMicrosyntaxExpression")i.push(k(S));else if(S.type==="NGMicrosyntaxKeyedExpression"){let N=k(S.expression);i.push(p({...S,expression:N},N.end))}else throw new Error(`Unexpected type ${S.type}`)}else i.push(h(x,c));a=x}return d("NGMicrosyntax",{body:i},i.length===0?r[0].sourceSpan:{start:i[0].start,end:Ne(!1,i,-1).end});function h(c,x){if(E(c)){let{key:l,value:p}=c;return p?x===0?d("NGMicrosyntaxExpression",{expression:g(p.ast),alias:null},p.sourceSpan):d("NGMicrosyntaxKeyedExpression",{key:d("NGMicrosyntaxKey",{name:y(l.source)},l.span),expression:d("NGMicrosyntaxExpression",{expression:g(p.ast),alias:null},p.sourceSpan)},{start:l.span.start,end:p.sourceSpan.end}):d("NGMicrosyntaxKey",{name:y(l.source)},l.span)}else{let{key:l,sourceSpan:p}=c;if(/^let\s$/.test(e.text.slice(p.start,p.start+4))){let{value:S}=c;return d("NGMicrosyntaxLet",{key:d("NGMicrosyntaxKey",{name:l.source},l.span),value:S?d("NGMicrosyntaxKey",{name:S.source},S.span):null},{start:p.start,end:S?S.span.end:l.span.end})}else{let S=v(c);return d("NGMicrosyntaxAs",{key:d("NGMicrosyntaxKey",{name:S.source},S.span),alias:d("NGMicrosyntaxKey",{name:l.source},l.span)},{start:S.span.start,end:l.span.end})}}}function g(c){return G(c,e)}function d(c,x,l,p=!0){return{type:c,...Ie(l,e,p),...x}}function y(c){return Et(c.slice(s.source.length))}function E(c){return c instanceof ne}function m(c){return c instanceof T}function o(c){u(c.key.span),m(c)&&c.value&&u(c.value.span)}function u(c){if(e.text[c.start]!=='"'&&e.text[c.start]!=="'")return;let x=e.text[c.start],l=!1;for(let p=c.start+1;p<e.text.length;p++)switch(e.text[p]){case x:if(!l){c.end=p+1;return}default:l=!1;break;case"\\":l=!l;break}}function v(c){if(!c.value||c.value.source!==De)return c.value;let x=e.getCharacterIndex(/\S/,c.sourceSpan.start);return{source:"$implicit",span:{start:x,end:x}}}}function ke(r){return e=>{let{ast:t,comments:s}=r(e),n=new ve(e),i=G(t,n);return i.comments=s.map(a=>G(a,n)),i}}var Ct=ke(ut),us=ke(lt),At=ke(dt),Ve=ke(xt),Ot=r=>$t(ft(r),new ve(r));function kr(r){return Array.isArray(r)&&r.length>0}var Nt=kr;function We(r){var s;let e=r.range?r.range[0]:r.start,t=((s=r.declaration)==null?void 0:s.decorators)??r.decorators;return Nt(t)?Math.min(We(t[0]),e):e}function It(r){return r.range?r.range[1]:r.end}function Pe(r){return{astFormat:"estree",parse(e){let t=r(e);return{type:"NGRoot",node:r===Ve&&t.type!=="NGChainedExpression"?{...t,type:"NGChainedExpression",expressions:[t]}:t}},locStart:We,locEnd:It}}var Pr=Pe(Ve),Rr=Pe(Ct),Lr=Pe(At),Kr=Pe(Ot);return Bt(br);});
(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 Re=Object.defineProperty;var Pt=Object.getOwnPropertyDescriptor;var Rt=Object.getOwnPropertyNames;var Lt=Object.prototype.hasOwnProperty;var ze=(r,e)=>{for(var t in e)Re(r,t,{get:e[t],enumerable:!0})},Kt=(r,e,t,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of Rt(e))!Lt.call(r,n)&&n!==t&&Re(r,n,{get:()=>e[n],enumerable:!(s=Pt(e,n))||s.enumerable});return r};var bt=r=>Kt(Re({},"__esModule",{value:!0}),r);var Lr={};ze(Lr,{parsers:()=>Qe});var Qe={};ze(Qe,{__ng_action:()=>Ir,__ng_binding:()=>kr,__ng_directive:()=>Rr,__ng_interpolation:()=>Pr});var G=class{constructor(e,t,s,n){this.input=t,this.errLocation=s,this.ctxLocation=n,this.message=`Parser Error: ${e} ${s} [${t}] in ${n}`}},R=class{constructor(e,t){this.start=e,this.end=t}toAbsolute(e){return new I(e+this.start,e+this.end)}},w=class{constructor(e,t){this.span=e,this.sourceSpan=t}toString(){return"AST"}},V=class extends w{constructor(e,t,s){super(e,t),this.nameSpan=s}},$=class extends w{visit(e,t=null){}},L=class extends w{visit(e,t=null){return e.visitImplicitReceiver(this,t)}},Se=class extends L{visit(e,t=null){var s;return(s=e.visitThisReceiver)==null?void 0:s.call(e,this,t)}},W=class extends w{constructor(e,t,s){super(e,t),this.expressions=s}visit(e,t=null){return e.visitChain(this,t)}},Q=class extends w{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)}},b=class extends V{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 V{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 V{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)}},q=class extends w{constructor(e,t,s,n){super(e,t),this.receiver=s,this.key=n}visit(e,t=null){return e.visitKeyedRead(this,t)}},j=class extends w{constructor(e,t,s,n){super(e,t),this.receiver=s,this.key=n}visit(e,t=null){return e.visitSafeKeyedRead(this,t)}},X=class extends w{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)}},Z=class extends V{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)}},C=class extends w{constructor(e,t,s){super(e,t),this.value=s}visit(e,t=null){return e.visitLiteralPrimitive(this,t)}},J=class extends w{constructor(e,t,s){super(e,t),this.expressions=s}visit(e,t=null){return e.visitLiteralArray(this,t)}},Y=class extends w{constructor(e,t,s,n){super(e,t),this.keys=s,this.values=n}visit(e,t=null){return e.visitLiteralMap(this,t)}},me=class extends w{constructor(e,t,s,n){super(e,t),this.strings=s,this.expressions=n}visit(e,t=null){return e.visitInterpolation(this,t)}},A=class extends w{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)}},B=class r extends A{static createMinus(e,t,s){return new r(e,t,"-",s,"-",new C(e,t,0),s)}static createPlus(e,t,s){return new r(e,t,"+",s,"-",s,new C(e,t,0))}constructor(e,t,s,n,i,a,h){super(e,t,i,a,h),this.operator=s,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 w{constructor(e,t,s){super(e,t),this.expression=s}visit(e,t=null){return e.visitPrefixNot(this,t)}},te=class extends w{constructor(e,t,s){super(e,t),this.expression=s}visit(e,t=null){return e.visitNonNullAssert(this,t)}},re=class extends w{constructor(e,t,s,n,i){super(e,t),this.receiver=s,this.args=n,this.argumentSpan=i}visit(e,t=null){return e.visitCall(this,t)}},se=class extends w{constructor(e,t,s,n,i){super(e,t),this.receiver=s,this.args=n,this.argumentSpan=i}visit(e,t=null){return e.visitSafeCall(this,t)}},I=class{constructor(e,t){this.start=e,this.end=t}},P=class extends w{constructor(e,t,s,n,i){super(new R(0,t===null?0:t.length),new I(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}`}},T=class{constructor(e,t,s){this.sourceSpan=e,this.key=t,this.value=s}},ne=class{constructor(e,t,s){this.sourceSpan=e,this.key=t,this.value=s}},we=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 s of e)this.visit(s,t)}};var qe;(function(r){r[r.DEFAULT=0]="DEFAULT",r[r.LITERAL_ATTR=1]="LITERAL_ATTR",r[r.ANIMATION=2]="ANIMATION"})(qe||(qe={}));function je(r){return r>=9&&r<=32||r==160}function K(r){return 48<=r&&r<=57}function Xe(r){return r>=97&&r<=122||r>=65&&r<=90}function Le(r){return r===39||r===34||r===96}var f;(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={}));var pr=["var","let","as","null","undefined","true","false","if","else","this"],le=class{tokenize(e){let t=new Be(e),s=[],n=t.scanToken();for(;n!=null;)s.push(n),n=t.scanToken();return s}},O=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}}};function tt(r,e,t){return new O(r,e,f.Character,t,String.fromCharCode(t))}function ur(r,e,t){return new O(r,e,f.Identifier,0,t)}function lr(r,e,t){return new O(r,e,f.PrivateIdentifier,0,t)}function xr(r,e,t){return new O(r,e,f.Keyword,0,t)}function be(r,e,t){return new O(r,e,f.Operator,0,t)}function dr(r,e,t){return new O(r,e,f.String,0,t)}function fr(r,e,t){return new O(r,e,f.Number,t,"")}function vr(r,e,t){return new O(r,e,f.Error,0,t)}var Ce=new O(-1,-1,f.Character,0,""),Be=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(rt(s))return this.scanIdentifier();if(K(s))return this.scanNumber(n);let i=n;switch(s){case 46:return this.advance(),K(this.peek)?this.scanNumber(i):tt(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(;je(this.peek);)this.advance();return this.scanToken()}return this.advance(),this.error(`Unexpected character [${String.fromCharCode(s)}]`,0)}scanCharacter(e,t){return this.advance(),tt(e,this.index,t)}scanOperator(e,t){return this.advance(),be(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),be(e,this.index,h)}scanIdentifier(){let e=this.index;for(this.advance();st(this.peek);)this.advance();let t=this.input.substring(e,this.index);return pr.indexOf(t)>-1?xr(e,this.index,t):ur(e,this.index,t)}scanPrivateIdentifier(){let e=this.index;if(this.advance(),!rt(this.peek))return this.error("Invalid character [#]",-1);for(;st(this.peek);)this.advance();let t=this.input.substring(e,this.index);return lr(e,this.index,t)}scanNumber(e){let t=this.index===e,s=!1;for(this.advance();;){if(!K(this.peek))if(this.peek===95){if(!K(this.input.charCodeAt(this.index-1))||!K(this.input.charCodeAt(this.index+1)))return this.error("Invalid numeric separator",0);s=!0}else if(this.peek===46)t=!1;else if(gr(this.peek)){if(this.advance(),Sr(this.peek)&&this.advance(),!K(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?wr(n):parseFloat(n);return fr(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);let h;if(this.advance(),this.peek==117){let g=i.substring(this.index+1,this.index+5);if(/^[0-9a-f]+$/i.test(g))h=parseInt(g,16);else return this.error(`Invalid unicode escape [\\u${g}]`,0);for(let d=0;d<5;d++)this.advance()}else h=mr(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(),dr(e,this.index,s+a)}scanQuestion(e){this.advance();let t="?";return(this.peek===63||this.peek===46)&&(t+=this.peek===46?".":"?",this.advance()),be(e,this.index,t)}error(e,t){let s=this.index+t;return vr(s,this.index,`Lexer Error: ${e} at column ${s} in expression [${this.input}]`)}};function rt(r){return 97<=r&&r<=122||65<=r&&r<=90||r==95||r==36}function st(r){return Xe(r)||K(r)||r==95||r==36}function gr(r){return r==101||r==69}function Sr(r){return r==45||r==43}function mr(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 wr(r){let e=parseInt(r);if(isNaN(e))throw new Error("Invalid integer literal when parsing "+r);return e}var yr=[/^\s*$/,/[<>]/,/^[{}]$/,/&(#|[a-z])/i,/^\/\//];function ot(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];yr.forEach(n=>{if(n.test(t)||n.test(s))throw new Error(`['${t}', '${s}'] contains unusable interpolation symbol.`)})}}var _e=class r{static fromArray(e){return e?(ot("interpolation",e),new r(e[0],e[1])):F}constructor(e,t){this.start=e,this.end=t}},F=new _e("{{","}}");var Me=class{constructor(e,t,s){this.strings=e,this.expressions=t,this.offsets=s}},Fe=class{constructor(e,t,s){this.templateBindings=e,this.warnings=t,this.errors=s}},fe=class{constructor(e){this._lexer=e,this.errors=[]}parseAction(e,t,s,n,i=F){this._checkNoInterpolation(e,s,i);let a=this._stripComments(e),h=this._lexer.tokenize(a),g=1;t&&(g|=2);let d=new U(e,s,n,h,g,this.errors,0).parseChain();return new P(d,e,s,n,this.errors)}parseBinding(e,t,s,n=F){let i=this._parseBindingAst(e,t,s,n);return new P(i,e,t,s,this.errors)}checkSimpleExpression(e){let t=new Ue;return e.visit(t),t.errors}parseSimpleBinding(e,t,s,n=F){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 P(i,e,t,s,this.errors)}_reportError(e,t,s,n){this.errors.push(new G(e,t,s,n))}_parseBindingAst(e,t,s,n){this._checkNoInterpolation(e,t,n);let i=this._stripComments(e),a=this._lexer.tokenize(i);return new U(e,t,s,a,0,this.errors,0).parseChain()}parseTemplateBindings(e,t,s,n,i){let a=this._lexer.tokenize(t);return new U(t,s,i,a,0,this.errors,0).parseTemplateBindings({source:e,span:new I(n,n+e.length)})}parseInterpolation(e,t,s,n,i=F){let{strings:a,expressions:h,offsets:g}=this.splitInterpolation(e,t,n,i);if(h.length===0)return null;let d=[];for(let y=0;y<h.length;++y){let E=h[y].text,S=this._stripComments(E),o=this._lexer.tokenize(S),u=new U(e,t,s,o,0,this.errors,g[y]).parseChain();d.push(u)}return this.createInterpolationAst(a.map(y=>y.text),d,e,t,s)}parseInterpolationExpression(e,t,s){let n=this._stripComments(e),i=this._lexer.tokenize(n),a=new U(e,t,s,i,0,this.errors,0).parseChain(),h=["",""];return this.createInterpolationAst(h,[a],e,t,s)}createInterpolationAst(e,t,s,n,i){let a=new R(0,s.length),h=new me(a,a.toAbsolute(i),e,t);return new P(h,s,n,i,this.errors)}splitInterpolation(e,t,s,n=F){let i=[],a=[],h=[],g=s?Er(s):null,d=0,y=!1,E=!1,{start:S,end:o}=n;for(;d<e.length;)if(y){let u=d,v=u+S.length,c=this._getInterpolationEndIndex(e,o,v);if(c===-1){y=!1,E=!0;break}let x=c+o.length,l=e.substring(v,c);l.trim().length===0&&this._reportError("Blank expressions are not allowed in interpolated strings",e,`at column ${d} in`,t),a.push({text:l,start:u,end:x});let k=((g==null?void 0:g.get(u))??u)+S.length;h.push(k),d=x,y=!1}else{let u=d;d=e.indexOf(S,d),d===-1&&(d=e.length);let v=e.substring(u,d);i.push({text:v,start:u,end:d}),y=!0}if(!y)if(E){let u=i[i.length-1];u.text+=e.substring(d),u.end=e.length}else i.push({text:e.substring(d),start:d,end:e.length});return new Me(i,a,h)}wrapLiteralPrimitive(e,t,s){let n=new R(0,e==null?0:e.length);return new P(new C(n,n.toAbsolute(s),e),e,t,s,this.errors)}_stripComments(e){let t=this._commentStart(e);return t!=null?e.substring(0,t):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&&Le(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];Le(e.charCodeAt(i))&&(s===null||s===a)&&n%2===0?s=s===null?a:null:s===null&&(yield i),n=a==="\\"?n+1:0}}},pe;(function(r){r[r.None=0]="None",r[r.Writable=1]="Writable"})(pe||(pe={}));var U=class{constructor(e,t,s,n,i,a,h){this.input=e,this.location=t,this.absoluteOffset=s,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]:Ce}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 s=this.currentEndIndex;if(t!==void 0&&t>this.currentEndIndex&&(s=t),e>s){let n=s;s=e,e=n}return new R(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===Ce?"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.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 s=this.offset,n=this.offset+this.input.length;return new $(this.span(s,n),this.sourceSpan(s,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 s=this.inputIndex,n=this.expectIdentifierOrKeyword(),i,a;n!==null?i=this.sourceSpan(s):(n="",a=this.next.index!==-1?this.next.index:this.input.length+this.offset,i=new R(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 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 $(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 A(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 A(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 A(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 A(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 A(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 A(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 A(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(),B.createPlus(this.span(e),this.sourceSpan(e),s);case"-":return this.advance(),s=this.parsePrefix(),B.createMinus(this.span(e),this.sourceSpan(e),s);case"!":return this.advance(),s=this.parsePrefix(),new ee(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.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 C(this.span(e),this.sourceSpan(e),null);if(this.next.isKeywordUndefined())return this.advance(),new C(this.span(e),this.sourceSpan(e),void 0);if(this.next.isKeywordTrue())return this.advance(),new C(this.span(e),this.sourceSpan(e),!0);if(this.next.isKeywordFalse())return this.advance(),new C(this.span(e),this.sourceSpan(e),!1);if(this.next.isKeywordThis())return this.advance(),new Se(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 L(this.span(e),this.sourceSpan(e)),e,!1);if(this.next.isNumber()){let t=this.next.toNumber();return this.advance(),new C(this.span(e),this.sourceSpan(e),t)}else if(this.next.isString()){let t=this.next.toString();return this.advance(),new C(this.span(e),this.sourceSpan(e),t)}else return this.next.isPrivateIdentifier()?(this._reportErrorForPrivateIdentifier(this.next,null),new $(this.span(e),this.sourceSpan(e))):this.index>=this.tokens.length?(this.error(`Unexpected end of expression: ${this.input}`),new $(this.span(e),this.sourceSpan(e))):(this.error(`Unexpected token ${this.next}`),new $(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),g=this.sourceSpan(n);t.push(new b(h,g,g,new L(h,g),a))}}while(this.consumeOptionalCharacter(44)&&!this.next.isCharacter(125));this.rbracesExpected--,this.expectCharacter(125)}return new Y(this.span(s),this.sourceSpan(s),e,t)}parseAccessMember(e,t,s){let n=this.inputIndex,i=this.withContext(pe.Writable,()=>{let g=this.expectIdentifierOrKeyword()??"";return g.length===0&&this.error("Expected identifier for property access",e.span.end),g}),a=this.sourceSpan(n),h;if(s)this.consumeOptionalAssignment()?(this.error("The '?.' operator cannot be used in the assignment"),h=new $(this.span(t),this.sourceSpan(t))):h=new z(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 $(this.span(t),this.sourceSpan(t));let g=this.parseConditional();h=new H(this.span(t),this.sourceSpan(t),a,e,i,g)}else h=new b(this.span(t),this.sourceSpan(t),a,e,i);return h}parseCall(e,t,s){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),g=this.sourceSpan(t);return s?new se(h,g,e,i,a):new re(h,g,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,s=this.currentAbsoluteOffset;do e+=this.expectIdentifierOrKeywordOrString(),t=this.consumeOptionalOperator("-"),t&&(e+="-");while(t);return{source:e,span:new I(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 Fe(t,[],this.errors)}parseKeyedReadOrWrite(e,t,s){return this.withContext(pe.Writable,()=>{this.rbracketsExpected++;let n=this.parsePipe();if(n instanceof $&&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 X(this.span(t),this.sourceSpan(t),e,n,i)}else return s?new j(this.span(t),this.sourceSpan(t),e,n):new q(this.span(t),this.sourceSpan(t),e,n);return new $(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 I(e.span.start,n);return t.push(new ne(a,e,s)),i&&t.push(i),t}getDirectiveBoundTarget(){if(this.next===Ce||this.peekKeywordAs()||this.peekKeywordLet())return null;let e=this.parsePipe(),{start:t,end:s}=e.span,n=this.input.substring(t,s);return new P(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 I(e.span.start,this.currentAbsoluteOffset);return new T(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 I(e,this.currentAbsoluteOffset);return new T(n,t,s)}consumeStatementTerminator(){this.consumeOptionalCharacter(59)||this.consumeOptionalCharacter(44)}error(e,t=null){this.errors.push(new G(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&pe.Writable)||!e.isOperator("="));)this.next.isError()&&this.errors.push(new G(this.next.toString(),this.input,this.locationText(),this.location)),this.advance(),e=this.next}},Ue=class extends we{constructor(){super(...arguments),this.errors=[]}visitPipe(){this.errors.push("pipes")}};function Er(r){let e=new Map,t=0,s=0,n=0;for(;n<r.length;){let i=r[n];if(i.type===9){let[a,h]=i.parts;t+=h.length,s+=a.length}else{let a=i.parts.reduce((h,g)=>h+g.length,0);s+=a,t+=a}e.set(s,t),n++}return e}var ht="angular-estree-parser",Ge="NgEstreeParser",De=0,Ae=[ht,De];function pt(){return new fe(new le)}function Oe(r,e){let t=pt(),{astInput:s,comments:n}=Cr(r,t),{ast:i,errors:a}=e(s,t);return vt(a),{ast:i,comments:n}}function ut(r){return Oe(r,(e,t)=>t.parseBinding(e,...Ae))}function lt(r){return Oe(r,(e,t)=>t.parseSimpleBinding(e,...Ae))}function xt(r){return Oe(r,(e,t)=>t.parseAction(e,!1,...Ae))}function dt(r){return Oe(r,(e,t)=>{let s=t.parseInterpolationExpression(e,...Ae);return s.ast=s.ast.expressions[0],s})}function ft(r){let e=pt(),{templateBindings:t,errors:s}=e.parseTemplateBindings(Ge,r,ht,De,De);return vt(s),t}function vt(r){if(r.length!==0){let[{message:e}]=r;throw new SyntaxError(e.replace(/^Parser Error: | at column \d+ in [^]*$/g,""))}}function Cr(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),sourceSpan:{start:t,end:r.length}}]}}function gt(r){return r instanceof B?"Unary":r instanceof A?"Binary":r instanceof Z?"BindingPipe":r instanceof re?"Call":r instanceof W?"Chain":r instanceof Q?"Conditional":r instanceof $?"EmptyExpr":r instanceof L?"ImplicitReceiver":r instanceof q?"KeyedRead":r instanceof j?"SafeKeyedRead":r instanceof X?"KeyedWrite":r instanceof J?"LiteralArray":r instanceof Y?"LiteralMap":r instanceof C?"LiteralPrimitive":r instanceof te?"NonNullAssert":r instanceof ee?"PrefixNot":r instanceof b?"PropertyRead":r instanceof H?"PropertyWrite":r instanceof se?"SafeCall":r instanceof z?"SafePropertyRead":r.type}function ct({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 Ar({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 Or(r,e){return e[r.start-1]==="("&&e[r.end]===")"?{start:r.start-1,end:r.end+1}:r}function St(r,e,t){let s=0,n={start:r.start,end:r.end};for(;;){let i=Ar(n,e),a=Or(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:ct(t?{start:n.start+1,end:n.end-1}:n,e),innerSpan:ct(r,e)}}function mt(r){return typeof r=="string"?e=>e===r:e=>r.test(e)}function wt(r,e,t){let s=mt(e);for(let n=t;n>=0;n--){let i=r[n];if(s(i))return n}throw new Error(`Cannot find front char ${e} from index ${t} in ${JSON.stringify(r)}`)}function yt(r,e,t){let s=mt(e);for(let n=t;n<r.length;n++){let i=r[n];if(s(i))return n}throw new Error(`Cannot find character ${e} from index ${t} in ${JSON.stringify(r)}`)}function Et(r){return r.slice(0,1).toLowerCase()+r.slice(1)}var ve=class{text;constructor(e){this.text=e}getCharacterIndex(e,t){return yt(this.text,e,t)}getCharacterLastIndex(e,t){return wt(this.text,e,t)}};var Nr=(r,e,t)=>{if(!(r&&e==null))return Array.isArray(e)||typeof e=="string"?e[t<0?e.length+t:t]:e.at(t)},Ne=Nr;var D=(r,e,t=!1)=>{let s=gt(r);switch(s){case"Unary":{let{operator:o,expr:u}=r,v=n(u);return a("UnaryExpression",{prefix:!0,argument:v,operator:o},r.sourceSpan,{hasParentParens:t})}case"Binary":{let{left:o,operation:u,right:v}=r,c=n(o),x=n(v);return a(u==="&&"||u==="||"||u==="??"?"LogicalExpression":"BinaryExpression",{left:c,right:x,operator:u},{start:E(c),end:S(x)},{hasParentParens:t})}case"BindingPipe":{let{exp:o,name:u,args:v}=r,c=n(o),x=e.getCharacterIndex(/\S/,e.getCharacterIndex("|",S(c))+1),l=a("Identifier",{name:u},{start:x,end:x+u.length}),p=v.map(n);return a("NGPipeExpression",{left:c,right:l,arguments:p},{start:E(c),end:S(p.length===0?l:Ne(!1,p,-1))},{hasParentParens:t})}case"Chain":{let{expressions:o}=r;return a("NGChainedExpression",{expressions:o.map(n)},r.sourceSpan,{hasParentParens:t})}case"Comment":{let{value:o}=r;return a("CommentLine",{value:o},r.sourceSpan,{processSpan:!1})}case"Conditional":{let{condition:o,trueExp:u,falseExp:v}=r,c=n(o),x=n(u),l=n(v);return a("ConditionalExpression",{test:c,consequent:x,alternate:l},{start:E(c),end:S(l)},{hasParentParens:t})}case"EmptyExpr":return a("NGEmptyExpression",{},r.sourceSpan,{hasParentParens:t});case"ImplicitReceiver":return a("ThisExpression",{},r.sourceSpan,{hasParentParens:t});case"KeyedRead":case"SafeKeyedRead":{let o=s==="SafeKeyedRead",{key:u}=r,v=Object.prototype.hasOwnProperty.call(r,"receiver")?r.receiver:r.obj,c=n(u);return h(v,c,{computed:!0,optional:o},{end:r.sourceSpan.end,hasParentParens:t})}case"LiteralArray":{let{expressions:o}=r;return a("ArrayExpression",{elements:o.map(n)},r.sourceSpan,{hasParentParens:t})}case"LiteralMap":{let{keys:o,values:u}=r,v=u.map(x=>n(x)),c=o.map(({key:x,quoted:l},p)=>{let k=v[p],m=E(k),N=S(k),ue=e.getCharacterIndex(/\S/,p===0?r.sourceSpan.start+1:e.getCharacterIndex(",",S(v[p-1]))+1),It=m===ue?N:e.getCharacterLastIndex(/\S/,e.getCharacterLastIndex(":",m-1)-1)+1,He={start:ue,end:It},ge=l?a("StringLiteral",{value:x},He):a("Identifier",{name:x},He),kt=ge.end<ge.start||ue===m;return a("ObjectProperty",{key:ge,value:k,shorthand:kt,computed:!1},{start:E(ge),end:N})});return a("ObjectExpression",{properties:c},r.sourceSpan,{hasParentParens:t})}case"LiteralPrimitive":{let{value:o}=r;switch(typeof o){case"boolean":return a("BooleanLiteral",{value:o},r.sourceSpan,{hasParentParens:t});case"number":return a("NumericLiteral",{value:o},r.sourceSpan,{hasParentParens:t});case"object":return a("NullLiteral",{},r.sourceSpan,{hasParentParens:t});case"string":return a("StringLiteral",{value:o},r.sourceSpan,{hasParentParens:t});case"undefined":return a("Identifier",{name:"undefined"},r.sourceSpan,{hasParentParens:t});default:throw new Error(`Unexpected LiteralPrimitive value type ${typeof o}`)}}case"Call":case"SafeCall":{let o=s==="SafeCall",{receiver:u,args:v}=r,c=v.length===1?[i(v[0])]:v.map(n),x=n(u),l=d(x),p=o||l?"OptionalCallExpression":"CallExpression";return a(p,{callee:x,arguments:c,optional:p==="OptionalCallExpression"?o:void 0},{start:E(x),end:r.sourceSpan.end},{hasParentParens:t})}case"NonNullAssert":{let{expression:o}=r,u=n(o);return a("TSNonNullExpression",{expression:u},{start:E(u),end:r.sourceSpan.end},{hasParentParens:t})}case"PrefixNot":{let{expression:o}=r,u=n(o);return a("UnaryExpression",{prefix:!0,operator:"!",argument:u},{start:r.sourceSpan.start,end:S(u)},{hasParentParens:t})}case"PropertyRead":case"SafePropertyRead":{let o=s==="SafePropertyRead",{receiver:u,name:v}=r,c=e.getCharacterLastIndex(/\S/,r.sourceSpan.end-1)+1,x=a("Identifier",{name:v},{start:c-v.length,end:c},g(u)?{hasParentParens:t}:{});return h(u,x,{computed:!1,optional:o},{hasParentParens:t})}case"KeyedWrite":{let{key:o,value:u}=r,v=Object.prototype.hasOwnProperty.call(r,"receiver")?r.receiver:r.obj,c=n(o),x=n(u),l=h(v,c,{computed:!0,optional:!1},{end:e.getCharacterIndex("]",S(c))+1});return a("AssignmentExpression",{left:l,operator:"=",right:x},{start:E(l),end:S(x)},{hasParentParens:t})}case"PropertyWrite":{let{receiver:o,name:u,value:v}=r,c=n(v),x=e.getCharacterLastIndex(/\S/,e.getCharacterLastIndex("=",E(c)-1)-1)+1,l=a("Identifier",{name:u},{start:x-u.length,end:x}),p=h(o,l,{computed:!1,optional:!1});return a("AssignmentExpression",{left:p,operator:"=",right:c},{start:E(p),end:S(c)},{hasParentParens:t})}default:throw new Error(`Unexpected node ${s}`)}function n(o){return D(o,e)}function i(o){return D(o,e,!0)}function a(o,u,v,{processSpan:c=!0,hasParentParens:x=!1}={}){let l={type:o,...Ie(v,e,c,x),...u};switch(o){case"NumericLiteral":{let p=l;p.extra={...p.extra,raw:e.text.slice(p.start,p.end),rawValue:p.value};break}case"StringLiteral":{let p=l;p.extra={...p.extra,raw:e.text.slice(p.start,p.end),rawValue:p.value};break}case"ObjectProperty":{let p=l;p.shorthand&&(p.extra={...p.extra,shorthand:p.shorthand});break}}return l}function h(o,u,v,{end:c=S(u),hasParentParens:x=!1}={}){if(g(o)||o.sourceSpan.start===u.start)return u;let l=n(o),p=d(l);return a(v.optional||p?"OptionalMemberExpression":"MemberExpression",{object:l,property:u,computed:v.computed,...v.optional?{optional:!0}:p?{optional:!1}:null},{start:E(l),end:c},{hasParentParens:x})}function g(o){return o.sourceSpan.start>=o.sourceSpan.end||/^\s+$/.test(e.text.slice(o.sourceSpan.start,o.sourceSpan.end))}function d(o){return(o.type==="OptionalCallExpression"||o.type==="OptionalMemberExpression")&&!y(o)}function y(o){return o.extra&&o.extra.parenthesized}function E(o){return y(o)?o.extra.parenStart:o.start}function S(o){return y(o)?o.extra.parenEnd:o.end}};function Ie(r,e,t=!1,s=!1){if(!t){let{start:g,end:d}=r;return{start:g,end:d,range:[g,d]}}let{outerSpan:n,innerSpan:{start:i,end:a},hasParens:h}=St(r,e.text,s);return{start:i,end:a,range:[i,a],...h&&{extra:{parenthesized:!0,parenStart:n.start,parenEnd:n.end}}}}function $t(r,e){r.forEach(o);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 c=0;c<n.length;c++){let x=n[c];if(a&&E(a)&&S(x)&&x.value&&x.value.source===a.key.source){let l=d("NGMicrosyntaxKey",{name:x.key.source},x.key.span),p=(N,ue)=>({...N,...Ie({start:N.start,end:ue},e)}),k=N=>({...p(N,l.end),alias:l}),m=i.pop();if(m.type==="NGMicrosyntaxExpression")i.push(k(m));else if(m.type==="NGMicrosyntaxKeyedExpression"){let N=k(m.expression);i.push(p({...m,expression:N},N.end))}else throw new Error(`Unexpected type ${m.type}`)}else i.push(h(x,c));a=x}return d("NGMicrosyntax",{body:i},i.length===0?r[0].sourceSpan:{start:i[0].start,end:Ne(!1,i,-1).end});function h(c,x){if(E(c)){let{key:l,value:p}=c;return p?x===0?d("NGMicrosyntaxExpression",{expression:g(p.ast),alias:null},p.sourceSpan):d("NGMicrosyntaxKeyedExpression",{key:d("NGMicrosyntaxKey",{name:y(l.source)},l.span),expression:d("NGMicrosyntaxExpression",{expression:g(p.ast),alias:null},p.sourceSpan)},{start:l.span.start,end:p.sourceSpan.end}):d("NGMicrosyntaxKey",{name:y(l.source)},l.span)}else{let{key:l,sourceSpan:p}=c;if(/^let\s$/.test(e.text.slice(p.start,p.start+4))){let{value:m}=c;return d("NGMicrosyntaxLet",{key:d("NGMicrosyntaxKey",{name:l.source},l.span),value:m?d("NGMicrosyntaxKey",{name:m.source},m.span):null},{start:p.start,end:m?m.span.end:l.span.end})}else{let m=v(c);return d("NGMicrosyntaxAs",{key:d("NGMicrosyntaxKey",{name:m.source},m.span),alias:d("NGMicrosyntaxKey",{name:l.source},l.span)},{start:m.span.start,end:l.span.end})}}}function g(c){return D(c,e)}function d(c,x,l,p=!0){return{type:c,...Ie(l,e,p),...x}}function y(c){return Et(c.slice(s.source.length))}function E(c){return c instanceof ne}function S(c){return c instanceof T}function o(c){u(c.key.span),S(c)&&c.value&&u(c.value.span)}function u(c){if(e.text[c.start]!=='"'&&e.text[c.start]!=="'")return;let x=e.text[c.start],l=!1;for(let p=c.start+1;p<e.text.length;p++)switch(e.text[p]){case x:if(!l){c.end=p+1;return}default:l=!1;break;case"\\":l=!l;break}}function v(c){if(!c.value||c.value.source!==Ge)return c.value;let x=e.getCharacterIndex(/\S/,c.sourceSpan.start);return{source:"$implicit",span:{start:x,end:x}}}}function ke(r){return e=>{let{ast:t,comments:s}=r(e),n=new ve(e),i=D(t,n);return i.comments=s.map(a=>D(a,n)),i}}var Ct=ke(ut),hs=ke(lt),At=ke(dt),Ve=ke(xt),Ot=r=>$t(ft(r),new ve(r));function We(r){var s,n,i;let e=((s=r.range)==null?void 0:s[0])??r.start,t=(i=((n=r.declaration)==null?void 0:n.decorators)??r.decorators)==null?void 0:i[0];return t?Math.min(We(t),e):e}function Nt(r){var e;return((e=r.range)==null?void 0:e[1])??r.end}function Pe(r){return{astFormat:"estree",parse(e){let t=r(e);return{type:"NGRoot",node:r===Ve&&t.type!=="NGChainedExpression"?{...t,type:"NGChainedExpression",expressions:[t]}:t}},locStart:We,locEnd:Nt}}var Ir=Pe(Ve),kr=Pe(Ct),Pr=Pe(At),Rr=Pe(Ot);return bt(Lr);});

@@ -1,6 +0,6 @@

(function(f){function e(){var i=f();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.graphql=e()}})(function(){"use strict";var re=Object.defineProperty;var tt=Object.getOwnPropertyDescriptor;var nt=Object.getOwnPropertyNames;var it=Object.prototype.hasOwnProperty;var Ne=(e,t)=>{for(var n in t)re(e,n,{get:t[n],enumerable:!0})},rt=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of nt(t))!it.call(e,i)&&i!==n&&re(e,i,{get:()=>t[i],enumerable:!(r=tt(t,i))||r.enumerable});return e};var st=e=>rt(re({},"__esModule",{value:!0}),e);var un={};Ne(un,{languages:()=>Pe,options:()=>we,parsers:()=>Te,printers:()=>cn});var ot=(e,t,n,r)=>{if(!(e&&t==null))return t.replaceAll?t.replaceAll(n,r):n.global?t.replace(n,r):t.split(n).join(r)},Y=ot;var se="indent";var oe="group";var ae="if-break";var P="line";var ce="break-parent";var xe=()=>{},b=xe,ue=xe;function x(e){return b(e),{type:se,contents:e}}function y(e,t={}){return b(e),ue(t.expandedStates,!0),{type:oe,id:t.id,contents:e,break:!!t.shouldBreak,expandedStates:t.expandedStates}}function O(e,t="",n={}){return b(e),t!==""&&b(t),{type:ae,breakContents:e,flatContents:t,groupId:n.groupId}}var xt={type:ce};var _t={type:P,hard:!0};var k={type:P},p={type:P,soft:!0},f=[_t,xt];function E(e,t){b(e),ue(t);let n=[];for(let r=0;r<t.length;r++)r!==0&&n.push(e),n.push(t[r]);return n}function j(e){return(t,n,r)=>{let i=!!(r!=null&&r.backwards);if(n===!1)return!1;let{length:s}=t,a=n;for(;a>=0&&a<s;){let u=t.charAt(a);if(e instanceof RegExp){if(!e.test(u))return a}else if(!e.includes(u))return a;i?a--:a++}return a===-1||a===s?a:!1}}var Sn=j(/\s/),G=j(" "),_e=j(",; "),ye=j(/[^\n\r]/);function yt(e,t,n){let r=!!(n!=null&&n.backwards);if(t===!1)return!1;let i=e.charAt(t);if(r){if(e.charAt(t-1)==="\r"&&i===`
(function(f){function e(){var i=f();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.graphql=e()}})(function(){"use strict";var re=Object.defineProperty;var tt=Object.getOwnPropertyDescriptor;var nt=Object.getOwnPropertyNames;var it=Object.prototype.hasOwnProperty;var Ne=(e,t)=>{for(var n in t)re(e,n,{get:t[n],enumerable:!0})},rt=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of nt(t))!it.call(e,i)&&i!==n&&re(e,i,{get:()=>t[i],enumerable:!(r=tt(t,i))||r.enumerable});return e};var st=e=>rt(re({},"__esModule",{value:!0}),e);var un={};Ne(un,{languages:()=>Pe,options:()=>we,parsers:()=>Te,printers:()=>cn});var ot=(e,t,n,r)=>{if(!(e&&t==null))return t.replaceAll?t.replaceAll(n,r):n.global?t.replace(n,r):t.split(n).join(r)},Y=ot;var se="indent";var oe="group";var ae="if-break";var P="line";var ce="break-parent";var xe=()=>{},b=xe,ue=xe;function x(e){return b(e),{type:se,contents:e}}function y(e,t={}){return b(e),ue(t.expandedStates,!0),{type:oe,id:t.id,contents:e,break:!!t.shouldBreak,expandedStates:t.expandedStates}}function O(e,t="",n={}){return b(e),t!==""&&b(t),{type:ae,breakContents:e,flatContents:t,groupId:n.groupId}}var xt={type:ce};var _t={type:P,hard:!0};var k={type:P},p={type:P,soft:!0},f=[_t,xt];function E(e,t){b(e),ue(t);let n=[];for(let r=0;r<t.length;r++)r!==0&&n.push(e),n.push(t[r]);return n}function j(e){return(t,n,r)=>{let i=!!(r!=null&&r.backwards);if(n===!1)return!1;let{length:s}=t,a=n;for(;a>=0&&a<s;){let u=t.charAt(a);if(e instanceof RegExp){if(!e.test(u))return a}else if(!e.includes(u))return a;i?a--:a++}return a===-1||a===s?a:!1}}var Cn=j(/\s/),G=j(" "),_e=j(",; "),ye=j(/[^\n\r]/);function yt(e,t,n){let r=!!(n!=null&&n.backwards);if(t===!1)return!1;let i=e.charAt(t);if(r){if(e.charAt(t-1)==="\r"&&i===`
`)return t-2;if(i===`
`||i==="\r"||i==="\u2028"||i==="\u2029")return t-1}else{if(i==="\r"&&e.charAt(t+1)===`
`)return t+2;if(i===`
`||i==="\r"||i==="\u2028"||i==="\u2029")return t+1}return t}var $=yt;function It(e,t,n={}){let r=G(e,n.backwards?t-1:t,n),i=$(e,r,n);return r!==i}var Ie=It;function Ot(e,t){if(t===!1)return!1;if(e.charAt(t)==="/"&&e.charAt(t+1)==="*"){for(let n=t+2;n<e.length;++n)if(e.charAt(n)==="*"&&e.charAt(n+1)==="/")return n+2}return t}var Oe=Ot;function Dt(e,t){return t===!1?!1:e.charAt(t)==="/"&&e.charAt(t+1)==="/"?ye(e,t):t}var De=Dt;function gt(e,t){let n=null,r=t;for(;r!==n;)n=r,r=_e(e,r),r=Oe(e,r),r=G(e,r);return r=De(e,r),r=$(e,r),r!==!1&&Ie(e,r)}var ge=gt;function At(e){return Array.isArray(e)&&e.length>0}var le=At;var pe=class extends Error{name="UnexpectedNodeError";constructor(t,n,r="type"){super(`Unexpected ${n} node ${r}: ${JSON.stringify(t[r])}.`),this.node=t}},Ae=pe;var F=null;function w(e){if(F!==null&&typeof F.property){let t=F;return F=w.prototype=null,t}return F=w.prototype=e??Object.create(null),new w}var kt=10;for(let e=0;e<=kt;e++)w();function fe(e){return w(e)}function Ct(e,t="type"){fe(e);function n(r){let i=r[t],s=e[i];if(!Array.isArray(s))throw Object.assign(new Error(`Missing visitor keys for '${i}'.`),{node:r});return s}return n}var ke=Ct;var J=class{constructor(t,n,r){this.start=t.start,this.end=n.end,this.startToken=t,this.endToken=n,this.source=r}get[Symbol.toStringTag](){return"Location"}toJSON(){return{start:this.start,end:this.end}}},V=class{constructor(t,n,r,i,s,a){this.kind=t,this.start=n,this.end=r,this.line=i,this.column=s,this.value=a,this.prev=null,this.next=null}get[Symbol.toStringTag](){return"Token"}toJSON(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}}},X={Name:[],Document:["definitions"],OperationDefinition:["name","variableDefinitions","directives","selectionSet"],VariableDefinition:["variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentSpread:["name","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:["type"],ScalarTypeDefinition:["description","name","directives"],ObjectTypeDefinition:["description","name","interfaces","directives","fields"],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:["description","name","interfaces","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","locations"],SchemaExtension:["directives","operationTypes"],ScalarTypeExtension:["name","directives"],ObjectTypeExtension:["name","interfaces","directives","fields"],InterfaceTypeExtension:["name","interfaces","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"]},Wn=new Set(Object.keys(X));var C;(function(e){e.QUERY="query",e.MUTATION="mutation",e.SUBSCRIPTION="subscription"})(C||(C={}));var St=ke(X,"kind"),Ce=St;function q(e){return e.kind==="Comment"?e.start:e.loc.start}function Q(e){return e.kind==="Comment"?e.end:e.loc.end}function Se(e){return/^\s*#[^\S\n]*@(?:format|prettier)\s*(?:\n|$)/.test(e)}function ve(e){return`# @format
`||i==="\r"||i==="\u2028"||i==="\u2029")return t+1}return t}var $=yt;function It(e,t,n={}){let r=G(e,n.backwards?t-1:t,n),i=$(e,r,n);return r!==i}var Ie=It;function Ot(e,t){if(t===!1)return!1;if(e.charAt(t)==="/"&&e.charAt(t+1)==="*"){for(let n=t+2;n<e.length;++n)if(e.charAt(n)==="*"&&e.charAt(n+1)==="/")return n+2}return t}var Oe=Ot;function Dt(e,t){return t===!1?!1:e.charAt(t)==="/"&&e.charAt(t+1)==="/"?ye(e,t):t}var De=Dt;function gt(e,t){let n=null,r=t;for(;r!==n;)n=r,r=_e(e,r),r=Oe(e,r),r=G(e,r);return r=De(e,r),r=$(e,r),r!==!1&&Ie(e,r)}var ge=gt;function At(e){return Array.isArray(e)&&e.length>0}var le=At;var pe=class extends Error{name="UnexpectedNodeError";constructor(t,n,r="type"){super(`Unexpected ${n} node ${r}: ${JSON.stringify(t[r])}.`),this.node=t}},Ae=pe;var F=null;function w(e){if(F!==null&&typeof F.property){let t=F;return F=w.prototype=null,t}return F=w.prototype=e??Object.create(null),new w}var kt=10;for(let e=0;e<=kt;e++)w();function fe(e){return w(e)}function St(e,t="type"){fe(e);function n(r){let i=r[t],s=e[i];if(!Array.isArray(s))throw Object.assign(new Error(`Missing visitor keys for '${i}'.`),{node:r});return s}return n}var ke=St;var J=class{constructor(t,n,r){this.start=t.start,this.end=n.end,this.startToken=t,this.endToken=n,this.source=r}get[Symbol.toStringTag](){return"Location"}toJSON(){return{start:this.start,end:this.end}}},V=class{constructor(t,n,r,i,s,a){this.kind=t,this.start=n,this.end=r,this.line=i,this.column=s,this.value=a,this.prev=null,this.next=null}get[Symbol.toStringTag](){return"Token"}toJSON(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}}},X={Name:[],Document:["definitions"],OperationDefinition:["name","variableDefinitions","directives","selectionSet"],VariableDefinition:["variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentSpread:["name","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:["type"],ScalarTypeDefinition:["description","name","directives"],ObjectTypeDefinition:["description","name","interfaces","directives","fields"],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:["description","name","interfaces","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","locations"],SchemaExtension:["directives","operationTypes"],ScalarTypeExtension:["name","directives"],ObjectTypeExtension:["name","interfaces","directives","fields"],InterfaceTypeExtension:["name","interfaces","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"]},Wn=new Set(Object.keys(X));var S;(function(e){e.QUERY="query",e.MUTATION="mutation",e.SUBSCRIPTION="subscription"})(S||(S={}));var Ct=ke(X,"kind"),Se=Ct;function q(e){return e.loc.start}function Q(e){return e.loc.end}function Ce(e){return/^\s*#[^\S\n]*@(?:format|prettier)\s*(?:\n|$)/.test(e)}function ve(e){return`# @format

@@ -10,3 +10,3 @@ `+e}function vt(e,t,n){let{node:r}=e;if(!r.description)return"";let i=[n("description")];return r.kind==="InputValueDefinition"&&!r.description.block?i.push(k):i.push(f),i}var g=vt;function bt(e,t,n){let{node:r}=e;switch(r.kind){case"Document":return[...E(f,A(e,t,n,"definitions")),f];case"OperationDefinition":{let i=t.originalText[q(r)]!=="{",s=!!r.name;return[i?r.operation:"",i&&s?[" ",n("name")]:"",i&&!s&&le(r.variableDefinitions)?" ":"",be(e,n),_(e,n,r),!i&&!s?"":" ",n("selectionSet")]}case"FragmentDefinition":return["fragment ",n("name"),be(e,n)," on ",n("typeCondition"),_(e,n,r)," ",n("selectionSet")];case"SelectionSet":return["{",x([f,E(f,A(e,t,n,"selections"))]),f,"}"];case"Field":return y([r.alias?[n("alias"),": "]:"",n("name"),r.arguments.length>0?y(["(",x([p,E([O("",", "),p],A(e,t,n,"arguments"))]),p,")"]):"",_(e,n,r),r.selectionSet?" ":"",n("selectionSet")]);case"Name":return r.value;case"StringValue":if(r.block){let i=Y(!1,r.value,'"""','\\"""').split(`

`,"\\n"),'"'];case"IntValue":case"FloatValue":case"EnumValue":return r.value;case"BooleanValue":return r.value?"true":"false";case"NullValue":return"null";case"Variable":return["$",n("name")];case"ListValue":return y(["[",x([p,E([O("",", "),p],e.map(n,"values"))]),p,"]"]);case"ObjectValue":{let i=t.bracketSpacing&&r.fields.length>0?" ":"";return y(["{",i,x([p,E([O("",", "),p],e.map(n,"fields"))]),p,O("",i),"}"])}case"ObjectField":case"Argument":return[n("name"),": ",n("value")];case"Directive":return["@",n("name"),r.arguments.length>0?y(["(",x([p,E([O("",", "),p],A(e,t,n,"arguments"))]),p,")"]):""];case"NamedType":return n("name");case"VariableDefinition":return[n("variable"),": ",n("type"),r.defaultValue?[" = ",n("defaultValue")]:"",_(e,n,r)];case"ObjectTypeExtension":case"ObjectTypeDefinition":case"InputObjectTypeExtension":case"InputObjectTypeDefinition":case"InterfaceTypeExtension":case"InterfaceTypeDefinition":{let{kind:i}=r,s=[];return i.endsWith("TypeDefinition")?s.push(g(e,t,n)):s.push("extend "),i.startsWith("ObjectType")?s.push("type"):i.startsWith("InputObjectType")?s.push("input"):s.push("interface"),s.push(" ",n("name")),!i.startsWith("InputObjectType")&&r.interfaces.length>0&&s.push(" implements ",...Pt(e,t,n)),s.push(_(e,n,r)),r.fields.length>0&&s.push([" {",x([f,E(f,A(e,t,n,"fields"))]),f,"}"]),s}case"FieldDefinition":return[g(e,t,n),n("name"),r.arguments.length>0?y(["(",x([p,E([O("",", "),p],A(e,t,n,"arguments"))]),p,")"]):"",": ",n("type"),_(e,n,r)];case"DirectiveDefinition":return[g(e,t,n),"directive ","@",n("name"),r.arguments.length>0?y(["(",x([p,E([O("",", "),p],A(e,t,n,"arguments"))]),p,")"]):"",r.repeatable?" repeatable":""," on ",...E(" | ",e.map(n,"locations"))];case"EnumTypeExtension":case"EnumTypeDefinition":return[g(e,t,n),r.kind==="EnumTypeExtension"?"extend ":"","enum ",n("name"),_(e,n,r),r.values.length>0?[" {",x([f,E(f,A(e,t,n,"values"))]),f,"}"]:""];case"EnumValueDefinition":return[g(e,t,n),n("name"),_(e,n,r)];case"InputValueDefinition":return[g(e,t,n),n("name"),": ",n("type"),r.defaultValue?[" = ",n("defaultValue")]:"",_(e,n,r)];case"SchemaExtension":return["extend schema",_(e,n,r),...r.operationTypes.length>0?[" {",x([f,E(f,A(e,t,n,"operationTypes"))]),f,"}"]:[]];case"SchemaDefinition":return[g(e,t,n),"schema",_(e,n,r)," {",r.operationTypes.length>0?x([f,E(f,A(e,t,n,"operationTypes"))]):"",f,"}"];case"OperationTypeDefinition":return[r.operation,": ",n("type")];case"FragmentSpread":return["...",n("name"),_(e,n,r)];case"InlineFragment":return["...",r.typeCondition?[" on ",n("typeCondition")]:"",_(e,n,r)," ",n("selectionSet")];case"UnionTypeExtension":case"UnionTypeDefinition":return y([g(e,t,n),y([r.kind==="UnionTypeExtension"?"extend ":"","union ",n("name"),_(e,n,r),r.types.length>0?[" =",O(""," "),x([O([k,"| "]),E([k,"| "],e.map(n,"types"))])]:""])]);case"ScalarTypeExtension":case"ScalarTypeDefinition":return[g(e,t,n),r.kind==="ScalarTypeExtension"?"extend ":"","scalar ",n("name"),_(e,n,r)];case"NonNullType":return[n("type"),"!"];case"ListType":return["[",n("type"),"]"];default:throw new Ae(r,"Graphql","kind")}}function _(e,t,n){if(n.directives.length===0)return"";let r=E(k,e.map(t,"directives"));return n.kind==="FragmentDefinition"||n.kind==="OperationDefinition"?y([k,r]):[" ",y(x([p,r]))]}function A(e,t,n,r){return e.map(({isLast:i,node:s})=>{let a=n();return!i&&ge(t.originalText,Q(s))?[a,f]:a},r)}function Lt(e){return e.kind!=="Comment"}function Rt(e){let t=e.node;if(t.kind==="Comment")return"#"+t.value.trimEnd();throw new Error("Not a comment: "+JSON.stringify(t))}function Pt(e,t,n){let{node:r}=e,i=[],{interfaces:s}=r,a=e.map(n,"interfaces");for(let u=0;u<s.length;u++){let l=s[u];i.push(a[u]);let T=s[u+1];if(T){let D=t.originalText.slice(l.loc.end,T.loc.start).includes("#");i.push(" &",D?k:" ")}}return i}function be(e,t){let{node:n}=e;return le(n.variableDefinitions)?y(["(",x([p,E([O("",", "),p],e.map(t,"variableDefinitions"))]),p,")"]):""}function Le(e,t){e.kind==="StringValue"&&e.block&&!e.value.includes(`
`)&&(t.value=t.value.trim())}Le.ignoredProperties=new Set(["loc","comments"]);function Ft(e){var n;let{node:t}=e;return(n=t==null?void 0:t.comments)==null?void 0:n.some(r=>r.value.trim()==="prettier-ignore")}var wt={print:bt,massageAstNode:Le,hasPrettierIgnore:Ft,insertPragma:ve,printComment:Rt,canAttachComment:Lt,getVisitorKeys:Ce},Re=wt;var Pe=[{linguistLanguageId:139,name:"GraphQL",type:"data",color:"#e10098",extensions:[".graphql",".gql",".graphqls"],tmScope:"source.graphql",aceMode:"text",parsers:["graphql"],vscodeLanguageIds:["graphql"]}];var Fe={bracketSpacing:{category:"Common",type:"boolean",default:!0,description:"Print spaces between brackets.",oppositeDescription:"Do not print spaces between brackets."},singleQuote:{category:"Common",type:"boolean",default:!1,description:"Use single quotes instead of double quotes."},proseWrap:{category:"Common",type:"choice",default:"preserve",description:"How to wrap prose.",choices:[{value:"always",description:"Wrap prose if it exceeds the print width."},{value:"never",description:"Do not wrap prose."},{value:"preserve",description:"Wrap prose as-is."}]},bracketSameLine:{category:"Common",type:"boolean",default:!1,description:"Put > of opening tags on the last line instead of on a new line."},singleAttributePerLine:{category:"Common",type:"boolean",default:!1,description:"Enforce single attribute per line in HTML, Vue and JSX."}};var Vt={bracketSpacing:Fe.bracketSpacing},we=Vt;var Te={};Ne(Te,{graphql:()=>an});function Ve(e){return typeof e=="object"&&e!==null}function Be(e,t){if(!!!e)throw new Error(t??"Unexpected invariant triggered.")}var Bt=/\r\n|[\n\r]/g;function B(e,t){let n=0,r=1;for(let i of e.body.matchAll(Bt)){if(typeof i.index=="number"||Be(!1),i.index>=t)break;n=i.index+i[0].length,r+=1}return{line:r,column:t+1-n}}function Me(e){return he(e.source,B(e.source,e.start))}function he(e,t){let n=e.locationOffset.column-1,r="".padStart(n)+e.body,i=t.line-1,s=e.locationOffset.line-1,a=t.line+s,u=t.line===1?n:0,l=t.column+u,T=`${e.name}:${a}:${l}
`)&&(t.value=t.value.trim())}Le.ignoredProperties=new Set(["loc","comments"]);function Ft(e){var n;let{node:t}=e;return(n=t==null?void 0:t.comments)==null?void 0:n.some(r=>r.value.trim()==="prettier-ignore")}var wt={print:bt,massageAstNode:Le,hasPrettierIgnore:Ft,insertPragma:ve,printComment:Rt,canAttachComment:Lt,getVisitorKeys:Se},Re=wt;var Pe=[{linguistLanguageId:139,name:"GraphQL",type:"data",color:"#e10098",extensions:[".graphql",".gql",".graphqls"],tmScope:"source.graphql",aceMode:"text",parsers:["graphql"],vscodeLanguageIds:["graphql"]}];var Fe={bracketSpacing:{category:"Common",type:"boolean",default:!0,description:"Print spaces between brackets.",oppositeDescription:"Do not print spaces between brackets."},singleQuote:{category:"Common",type:"boolean",default:!1,description:"Use single quotes instead of double quotes."},proseWrap:{category:"Common",type:"choice",default:"preserve",description:"How to wrap prose.",choices:[{value:"always",description:"Wrap prose if it exceeds the print width."},{value:"never",description:"Do not wrap prose."},{value:"preserve",description:"Wrap prose as-is."}]},bracketSameLine:{category:"Common",type:"boolean",default:!1,description:"Put > of opening tags on the last line instead of on a new line."},singleAttributePerLine:{category:"Common",type:"boolean",default:!1,description:"Enforce single attribute per line in HTML, Vue and JSX."}};var Vt={bracketSpacing:Fe.bracketSpacing},we=Vt;var Te={};Ne(Te,{graphql:()=>an});function Ve(e){return typeof e=="object"&&e!==null}function Be(e,t){if(!!!e)throw new Error(t??"Unexpected invariant triggered.")}var Bt=/\r\n|[\n\r]/g;function B(e,t){let n=0,r=1;for(let i of e.body.matchAll(Bt)){if(typeof i.index=="number"||Be(!1),i.index>=t)break;n=i.index+i[0].length,r+=1}return{line:r,column:t+1-n}}function Me(e){return he(e.source,B(e.source,e.start))}function he(e,t){let n=e.locationOffset.column-1,r="".padStart(n)+e.body,i=t.line-1,s=e.locationOffset.line-1,a=t.line+s,u=t.line===1?n:0,l=t.column+u,T=`${e.name}:${a}:${l}
`,h=r.split(/\r\n|[\n\r]/g),D=h[i];if(D.length>120){let I=Math.floor(l/80),ie=l%80,N=[];for(let v=0;v<D.length;v+=80)N.push(D.slice(v,v+80));return T+Ue([[`${a} |`,N[0]],...N.slice(1,I+1).map(v=>["|",v]),["|","^".padStart(ie)],["|",N[I+1]]])}return T+Ue([[`${a-1} |`,h[i-1]],[`${a} |`,D],["|","^".padStart(l)],[`${a+1} |`,h[i+1]]])}function Ue(e){let t=e.filter(([r,i])=>i!==void 0),n=Math.max(...t.map(([r])=>r.length));return t.map(([r,i])=>r.padStart(n)+(i?" "+i:"")).join(`

@@ -17,5 +17,5 @@ `)}function Ut(e){let t=e[0];return t==null||"kind"in t||"length"in t?{nodes:t,source:e[1],positions:e[2],path:e[3],originalError:e[4],extensions:e[5]}:t}var W=class e extends Error{constructor(t,...n){var r,i,s;let{nodes:a,source:u,positions:l,path:T,originalError:h,extensions:D}=Ut(n);super(t),this.name="GraphQLError",this.path=T??void 0,this.originalError=h??void 0,this.nodes=Ye(Array.isArray(a)?a:a?[a]:void 0);let I=Ye((r=this.nodes)===null||r===void 0?void 0:r.map(N=>N.loc).filter(N=>N!=null));this.source=u??(I==null||(i=I[0])===null||i===void 0?void 0:i.source),this.positions=l??(I==null?void 0:I.map(N=>N.start)),this.locations=l&&u?l.map(N=>B(u,N)):I==null?void 0:I.map(N=>B(N.source,N.start));let ie=Ve(h==null?void 0:h.extensions)?h==null?void 0:h.extensions:void 0;this.extensions=(s=D??ie)!==null&&s!==void 0?s:Object.create(null),Object.defineProperties(this,{message:{writable:!0,enumerable:!0},name:{enumerable:!1},nodes:{enumerable:!1},source:{enumerable:!1},positions:{enumerable:!1},originalError:{enumerable:!1}}),h!=null&&h.stack?Object.defineProperty(this,"stack",{value:h.stack,writable:!0,configurable:!0}):Error.captureStackTrace?Error.captureStackTrace(this,e):Object.defineProperty(this,"stack",{value:Error().stack,writable:!0,configurable:!0})}get[Symbol.toStringTag](){return"GraphQLError"}toString(){let t=this.message;if(this.nodes)for(let n of this.nodes)n.loc&&(t+=`

`+he(this.source,n);return t}toJSON(){let t={message:this.message};return this.locations!=null&&(t.locations=this.locations),this.path!=null&&(t.path=this.path),this.extensions!=null&&Object.keys(this.extensions).length>0&&(t.extensions=this.extensions),t}};function Ye(e){return e===void 0||e.length===0?void 0:e}function d(e,t,n){return new W(`Syntax Error: ${n}`,{source:e,positions:[t]})}var H;(function(e){e.QUERY="QUERY",e.MUTATION="MUTATION",e.SUBSCRIPTION="SUBSCRIPTION",e.FIELD="FIELD",e.FRAGMENT_DEFINITION="FRAGMENT_DEFINITION",e.FRAGMENT_SPREAD="FRAGMENT_SPREAD",e.INLINE_FRAGMENT="INLINE_FRAGMENT",e.VARIABLE_DEFINITION="VARIABLE_DEFINITION",e.SCHEMA="SCHEMA",e.SCALAR="SCALAR",e.OBJECT="OBJECT",e.FIELD_DEFINITION="FIELD_DEFINITION",e.ARGUMENT_DEFINITION="ARGUMENT_DEFINITION",e.INTERFACE="INTERFACE",e.UNION="UNION",e.ENUM="ENUM",e.ENUM_VALUE="ENUM_VALUE",e.INPUT_OBJECT="INPUT_OBJECT",e.INPUT_FIELD_DEFINITION="INPUT_FIELD_DEFINITION"})(H||(H={}));var c;(function(e){e.NAME="Name",e.DOCUMENT="Document",e.OPERATION_DEFINITION="OperationDefinition",e.VARIABLE_DEFINITION="VariableDefinition",e.SELECTION_SET="SelectionSet",e.FIELD="Field",e.ARGUMENT="Argument",e.FRAGMENT_SPREAD="FragmentSpread",e.INLINE_FRAGMENT="InlineFragment",e.FRAGMENT_DEFINITION="FragmentDefinition",e.VARIABLE="Variable",e.INT="IntValue",e.FLOAT="FloatValue",e.STRING="StringValue",e.BOOLEAN="BooleanValue",e.NULL="NullValue",e.ENUM="EnumValue",e.LIST="ListValue",e.OBJECT="ObjectValue",e.OBJECT_FIELD="ObjectField",e.DIRECTIVE="Directive",e.NAMED_TYPE="NamedType",e.LIST_TYPE="ListType",e.NON_NULL_TYPE="NonNullType",e.SCHEMA_DEFINITION="SchemaDefinition",e.OPERATION_TYPE_DEFINITION="OperationTypeDefinition",e.SCALAR_TYPE_DEFINITION="ScalarTypeDefinition",e.OBJECT_TYPE_DEFINITION="ObjectTypeDefinition",e.FIELD_DEFINITION="FieldDefinition",e.INPUT_VALUE_DEFINITION="InputValueDefinition",e.INTERFACE_TYPE_DEFINITION="InterfaceTypeDefinition",e.UNION_TYPE_DEFINITION="UnionTypeDefinition",e.ENUM_TYPE_DEFINITION="EnumTypeDefinition",e.ENUM_VALUE_DEFINITION="EnumValueDefinition",e.INPUT_OBJECT_TYPE_DEFINITION="InputObjectTypeDefinition",e.DIRECTIVE_DEFINITION="DirectiveDefinition",e.SCHEMA_EXTENSION="SchemaExtension",e.SCALAR_TYPE_EXTENSION="ScalarTypeExtension",e.OBJECT_TYPE_EXTENSION="ObjectTypeExtension",e.INTERFACE_TYPE_EXTENSION="InterfaceTypeExtension",e.UNION_TYPE_EXTENSION="UnionTypeExtension",e.ENUM_TYPE_EXTENSION="EnumTypeExtension",e.INPUT_OBJECT_TYPE_EXTENSION="InputObjectTypeExtension"})(c||(c={}));function je(e){return e===9||e===32}function L(e){return e>=48&&e<=57}function Ge(e){return e>=97&&e<=122||e>=65&&e<=90}function de(e){return Ge(e)||e===95}function $e(e){return Ge(e)||L(e)||e===95}function Je(e){var t;let n=Number.MAX_SAFE_INTEGER,r=null,i=-1;for(let a=0;a<e.length;++a){var s;let u=e[a],l=Mt(u);l!==u.length&&(r=(s=r)!==null&&s!==void 0?s:a,i=a,a!==0&&l<n&&(n=l))}return e.map((a,u)=>u===0?a:a.slice(n)).slice((t=r)!==null&&t!==void 0?t:0,i+1)}function Mt(e){let t=0;for(;t<e.length&&je(e.charCodeAt(t));)++t;return t}var o;(function(e){e.SOF="<SOF>",e.EOF="<EOF>",e.BANG="!",e.DOLLAR="$",e.AMP="&",e.PAREN_L="(",e.PAREN_R=")",e.SPREAD="...",e.COLON=":",e.EQUALS="=",e.AT="@",e.BRACKET_L="[",e.BRACKET_R="]",e.BRACE_L="{",e.PIPE="|",e.BRACE_R="}",e.NAME="Name",e.INT="Int",e.FLOAT="Float",e.STRING="String",e.BLOCK_STRING="BlockString",e.COMMENT="Comment"})(o||(o={}));var z=class{constructor(t){let n=new V(o.SOF,0,0,0,0);this.source=t,this.lastToken=n,this.token=n,this.line=1,this.lineStart=0}get[Symbol.toStringTag](){return"Lexer"}advance(){return this.lastToken=this.token,this.token=this.lookahead()}lookahead(){let t=this.token;if(t.kind!==o.EOF)do if(t.next)t=t.next;else{let n=Yt(this,t.end);t.next=n,n.prev=t,t=n}while(t.kind===o.COMMENT);return t}};function qe(e){return e===o.BANG||e===o.DOLLAR||e===o.AMP||e===o.PAREN_L||e===o.PAREN_R||e===o.SPREAD||e===o.COLON||e===o.EQUALS||e===o.AT||e===o.BRACKET_L||e===o.BRACKET_R||e===o.BRACE_L||e===o.PIPE||e===o.BRACE_R}function R(e){return e>=0&&e<=55295||e>=57344&&e<=1114111}function K(e,t){return Qe(e.charCodeAt(t))&&We(e.charCodeAt(t+1))}function Qe(e){return e>=55296&&e<=56319}function We(e){return e>=56320&&e<=57343}function S(e,t){let n=e.source.body.codePointAt(t);if(n===void 0)return o.EOF;if(n>=32&&n<=126){let r=String.fromCodePoint(n);return r==='"'?`'"'`:`"${r}"`}return"U+"+n.toString(16).toUpperCase().padStart(4,"0")}function m(e,t,n,r,i){let s=e.line,a=1+n-e.lineStart;return new V(t,n,r,s,a,i)}function Yt(e,t){let n=e.source.body,r=n.length,i=t;for(;i<r;){let s=n.charCodeAt(i);switch(s){case 65279:case 9:case 32:case 44:++i;continue;case 10:++i,++e.line,e.lineStart=i;continue;case 13:n.charCodeAt(i+1)===10?i+=2:++i,++e.line,e.lineStart=i;continue;case 35:return jt(e,i);case 33:return m(e,o.BANG,i,i+1);case 36:return m(e,o.DOLLAR,i,i+1);case 38:return m(e,o.AMP,i,i+1);case 40:return m(e,o.PAREN_L,i,i+1);case 41:return m(e,o.PAREN_R,i,i+1);case 46:if(n.charCodeAt(i+1)===46&&n.charCodeAt(i+2)===46)return m(e,o.SPREAD,i,i+3);break;case 58:return m(e,o.COLON,i,i+1);case 61:return m(e,o.EQUALS,i,i+1);case 64:return m(e,o.AT,i,i+1);case 91:return m(e,o.BRACKET_L,i,i+1);case 93:return m(e,o.BRACKET_R,i,i+1);case 123:return m(e,o.BRACE_L,i,i+1);case 124:return m(e,o.PIPE,i,i+1);case 125:return m(e,o.BRACE_R,i,i+1);case 34:return n.charCodeAt(i+1)===34&&n.charCodeAt(i+2)===34?Qt(e,i):$t(e,i)}if(L(s)||s===45)return Gt(e,i,s);if(de(s))return Wt(e,i);throw d(e.source,i,s===39?`Unexpected single quote character ('), did you mean to use a double quote (")?`:R(s)||K(n,i)?`Unexpected character: ${S(e,i)}.`:`Invalid character: ${S(e,i)}.`)}return m(e,o.EOF,r,r)}function jt(e,t){let n=e.source.body,r=n.length,i=t+1;for(;i<r;){let s=n.charCodeAt(i);if(s===10||s===13)break;if(R(s))++i;else if(K(n,i))i+=2;else break}return m(e,o.COMMENT,t,i,n.slice(t+1,i))}function Gt(e,t,n){let r=e.source.body,i=t,s=n,a=!1;if(s===45&&(s=r.charCodeAt(++i)),s===48){if(s=r.charCodeAt(++i),L(s))throw d(e.source,i,`Invalid number, unexpected digit after 0: ${S(e,i)}.`)}else i=me(e,i,s),s=r.charCodeAt(i);if(s===46&&(a=!0,s=r.charCodeAt(++i),i=me(e,i,s),s=r.charCodeAt(i)),(s===69||s===101)&&(a=!0,s=r.charCodeAt(++i),(s===43||s===45)&&(s=r.charCodeAt(++i)),i=me(e,i,s),s=r.charCodeAt(i)),s===46||de(s))throw d(e.source,i,`Invalid number, expected digit but got: ${S(e,i)}.`);return m(e,a?o.FLOAT:o.INT,t,i,r.slice(t,i))}function me(e,t,n){if(!L(n))throw d(e.source,t,`Invalid number, expected digit but got: ${S(e,t)}.`);let r=e.source.body,i=t+1;for(;L(r.charCodeAt(i));)++i;return i}function $t(e,t){let n=e.source.body,r=n.length,i=t+1,s=i,a="";for(;i<r;){let u=n.charCodeAt(i);if(u===34)return a+=n.slice(s,i),m(e,o.STRING,t,i+1,a);if(u===92){a+=n.slice(s,i);let l=n.charCodeAt(i+1)===117?n.charCodeAt(i+2)===123?Jt(e,i):Xt(e,i):qt(e,i);a+=l.value,i+=l.size,s=i;continue}if(u===10||u===13)break;if(R(u))++i;else if(K(n,i))i+=2;else throw d(e.source,i,`Invalid character within String: ${S(e,i)}.`)}throw d(e.source,i,"Unterminated string.")}function Jt(e,t){let n=e.source.body,r=0,i=3;for(;i<12;){let s=n.charCodeAt(t+i++);if(s===125){if(i<5||!R(r))break;return{value:String.fromCodePoint(r),size:i}}if(r=r<<4|U(s),r<0)break}throw d(e.source,t,`Invalid Unicode escape sequence: "${n.slice(t,t+i)}".`)}function Xt(e,t){let n=e.source.body,r=Xe(n,t+2);if(R(r))return{value:String.fromCodePoint(r),size:6};if(Qe(r)&&n.charCodeAt(t+6)===92&&n.charCodeAt(t+7)===117){let i=Xe(n,t+8);if(We(i))return{value:String.fromCodePoint(r,i),size:12}}throw d(e.source,t,`Invalid Unicode escape sequence: "${n.slice(t,t+6)}".`)}function Xe(e,t){return U(e.charCodeAt(t))<<12|U(e.charCodeAt(t+1))<<8|U(e.charCodeAt(t+2))<<4|U(e.charCodeAt(t+3))}function U(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}function qt(e,t){let n=e.source.body;switch(n.charCodeAt(t+1)){case 34:return{value:'"',size:2};case 92:return{value:"\\",size:2};case 47:return{value:"/",size:2};case 98:return{value:"\b",size:2};case 102:return{value:"\f",size:2};case 110:return{value:`
`+he(this.source,n);return t}toJSON(){let t={message:this.message};return this.locations!=null&&(t.locations=this.locations),this.path!=null&&(t.path=this.path),this.extensions!=null&&Object.keys(this.extensions).length>0&&(t.extensions=this.extensions),t}};function Ye(e){return e===void 0||e.length===0?void 0:e}function d(e,t,n){return new W(`Syntax Error: ${n}`,{source:e,positions:[t]})}var H;(function(e){e.QUERY="QUERY",e.MUTATION="MUTATION",e.SUBSCRIPTION="SUBSCRIPTION",e.FIELD="FIELD",e.FRAGMENT_DEFINITION="FRAGMENT_DEFINITION",e.FRAGMENT_SPREAD="FRAGMENT_SPREAD",e.INLINE_FRAGMENT="INLINE_FRAGMENT",e.VARIABLE_DEFINITION="VARIABLE_DEFINITION",e.SCHEMA="SCHEMA",e.SCALAR="SCALAR",e.OBJECT="OBJECT",e.FIELD_DEFINITION="FIELD_DEFINITION",e.ARGUMENT_DEFINITION="ARGUMENT_DEFINITION",e.INTERFACE="INTERFACE",e.UNION="UNION",e.ENUM="ENUM",e.ENUM_VALUE="ENUM_VALUE",e.INPUT_OBJECT="INPUT_OBJECT",e.INPUT_FIELD_DEFINITION="INPUT_FIELD_DEFINITION"})(H||(H={}));var c;(function(e){e.NAME="Name",e.DOCUMENT="Document",e.OPERATION_DEFINITION="OperationDefinition",e.VARIABLE_DEFINITION="VariableDefinition",e.SELECTION_SET="SelectionSet",e.FIELD="Field",e.ARGUMENT="Argument",e.FRAGMENT_SPREAD="FragmentSpread",e.INLINE_FRAGMENT="InlineFragment",e.FRAGMENT_DEFINITION="FragmentDefinition",e.VARIABLE="Variable",e.INT="IntValue",e.FLOAT="FloatValue",e.STRING="StringValue",e.BOOLEAN="BooleanValue",e.NULL="NullValue",e.ENUM="EnumValue",e.LIST="ListValue",e.OBJECT="ObjectValue",e.OBJECT_FIELD="ObjectField",e.DIRECTIVE="Directive",e.NAMED_TYPE="NamedType",e.LIST_TYPE="ListType",e.NON_NULL_TYPE="NonNullType",e.SCHEMA_DEFINITION="SchemaDefinition",e.OPERATION_TYPE_DEFINITION="OperationTypeDefinition",e.SCALAR_TYPE_DEFINITION="ScalarTypeDefinition",e.OBJECT_TYPE_DEFINITION="ObjectTypeDefinition",e.FIELD_DEFINITION="FieldDefinition",e.INPUT_VALUE_DEFINITION="InputValueDefinition",e.INTERFACE_TYPE_DEFINITION="InterfaceTypeDefinition",e.UNION_TYPE_DEFINITION="UnionTypeDefinition",e.ENUM_TYPE_DEFINITION="EnumTypeDefinition",e.ENUM_VALUE_DEFINITION="EnumValueDefinition",e.INPUT_OBJECT_TYPE_DEFINITION="InputObjectTypeDefinition",e.DIRECTIVE_DEFINITION="DirectiveDefinition",e.SCHEMA_EXTENSION="SchemaExtension",e.SCALAR_TYPE_EXTENSION="ScalarTypeExtension",e.OBJECT_TYPE_EXTENSION="ObjectTypeExtension",e.INTERFACE_TYPE_EXTENSION="InterfaceTypeExtension",e.UNION_TYPE_EXTENSION="UnionTypeExtension",e.ENUM_TYPE_EXTENSION="EnumTypeExtension",e.INPUT_OBJECT_TYPE_EXTENSION="InputObjectTypeExtension"})(c||(c={}));function je(e){return e===9||e===32}function L(e){return e>=48&&e<=57}function Ge(e){return e>=97&&e<=122||e>=65&&e<=90}function de(e){return Ge(e)||e===95}function $e(e){return Ge(e)||L(e)||e===95}function Je(e){var t;let n=Number.MAX_SAFE_INTEGER,r=null,i=-1;for(let a=0;a<e.length;++a){var s;let u=e[a],l=Mt(u);l!==u.length&&(r=(s=r)!==null&&s!==void 0?s:a,i=a,a!==0&&l<n&&(n=l))}return e.map((a,u)=>u===0?a:a.slice(n)).slice((t=r)!==null&&t!==void 0?t:0,i+1)}function Mt(e){let t=0;for(;t<e.length&&je(e.charCodeAt(t));)++t;return t}var o;(function(e){e.SOF="<SOF>",e.EOF="<EOF>",e.BANG="!",e.DOLLAR="$",e.AMP="&",e.PAREN_L="(",e.PAREN_R=")",e.SPREAD="...",e.COLON=":",e.EQUALS="=",e.AT="@",e.BRACKET_L="[",e.BRACKET_R="]",e.BRACE_L="{",e.PIPE="|",e.BRACE_R="}",e.NAME="Name",e.INT="Int",e.FLOAT="Float",e.STRING="String",e.BLOCK_STRING="BlockString",e.COMMENT="Comment"})(o||(o={}));var z=class{constructor(t){let n=new V(o.SOF,0,0,0,0);this.source=t,this.lastToken=n,this.token=n,this.line=1,this.lineStart=0}get[Symbol.toStringTag](){return"Lexer"}advance(){return this.lastToken=this.token,this.token=this.lookahead()}lookahead(){let t=this.token;if(t.kind!==o.EOF)do if(t.next)t=t.next;else{let n=Yt(this,t.end);t.next=n,n.prev=t,t=n}while(t.kind===o.COMMENT);return t}};function qe(e){return e===o.BANG||e===o.DOLLAR||e===o.AMP||e===o.PAREN_L||e===o.PAREN_R||e===o.SPREAD||e===o.COLON||e===o.EQUALS||e===o.AT||e===o.BRACKET_L||e===o.BRACKET_R||e===o.BRACE_L||e===o.PIPE||e===o.BRACE_R}function R(e){return e>=0&&e<=55295||e>=57344&&e<=1114111}function K(e,t){return Qe(e.charCodeAt(t))&&We(e.charCodeAt(t+1))}function Qe(e){return e>=55296&&e<=56319}function We(e){return e>=56320&&e<=57343}function C(e,t){let n=e.source.body.codePointAt(t);if(n===void 0)return o.EOF;if(n>=32&&n<=126){let r=String.fromCodePoint(n);return r==='"'?`'"'`:`"${r}"`}return"U+"+n.toString(16).toUpperCase().padStart(4,"0")}function m(e,t,n,r,i){let s=e.line,a=1+n-e.lineStart;return new V(t,n,r,s,a,i)}function Yt(e,t){let n=e.source.body,r=n.length,i=t;for(;i<r;){let s=n.charCodeAt(i);switch(s){case 65279:case 9:case 32:case 44:++i;continue;case 10:++i,++e.line,e.lineStart=i;continue;case 13:n.charCodeAt(i+1)===10?i+=2:++i,++e.line,e.lineStart=i;continue;case 35:return jt(e,i);case 33:return m(e,o.BANG,i,i+1);case 36:return m(e,o.DOLLAR,i,i+1);case 38:return m(e,o.AMP,i,i+1);case 40:return m(e,o.PAREN_L,i,i+1);case 41:return m(e,o.PAREN_R,i,i+1);case 46:if(n.charCodeAt(i+1)===46&&n.charCodeAt(i+2)===46)return m(e,o.SPREAD,i,i+3);break;case 58:return m(e,o.COLON,i,i+1);case 61:return m(e,o.EQUALS,i,i+1);case 64:return m(e,o.AT,i,i+1);case 91:return m(e,o.BRACKET_L,i,i+1);case 93:return m(e,o.BRACKET_R,i,i+1);case 123:return m(e,o.BRACE_L,i,i+1);case 124:return m(e,o.PIPE,i,i+1);case 125:return m(e,o.BRACE_R,i,i+1);case 34:return n.charCodeAt(i+1)===34&&n.charCodeAt(i+2)===34?Qt(e,i):$t(e,i)}if(L(s)||s===45)return Gt(e,i,s);if(de(s))return Wt(e,i);throw d(e.source,i,s===39?`Unexpected single quote character ('), did you mean to use a double quote (")?`:R(s)||K(n,i)?`Unexpected character: ${C(e,i)}.`:`Invalid character: ${C(e,i)}.`)}return m(e,o.EOF,r,r)}function jt(e,t){let n=e.source.body,r=n.length,i=t+1;for(;i<r;){let s=n.charCodeAt(i);if(s===10||s===13)break;if(R(s))++i;else if(K(n,i))i+=2;else break}return m(e,o.COMMENT,t,i,n.slice(t+1,i))}function Gt(e,t,n){let r=e.source.body,i=t,s=n,a=!1;if(s===45&&(s=r.charCodeAt(++i)),s===48){if(s=r.charCodeAt(++i),L(s))throw d(e.source,i,`Invalid number, unexpected digit after 0: ${C(e,i)}.`)}else i=me(e,i,s),s=r.charCodeAt(i);if(s===46&&(a=!0,s=r.charCodeAt(++i),i=me(e,i,s),s=r.charCodeAt(i)),(s===69||s===101)&&(a=!0,s=r.charCodeAt(++i),(s===43||s===45)&&(s=r.charCodeAt(++i)),i=me(e,i,s),s=r.charCodeAt(i)),s===46||de(s))throw d(e.source,i,`Invalid number, expected digit but got: ${C(e,i)}.`);return m(e,a?o.FLOAT:o.INT,t,i,r.slice(t,i))}function me(e,t,n){if(!L(n))throw d(e.source,t,`Invalid number, expected digit but got: ${C(e,t)}.`);let r=e.source.body,i=t+1;for(;L(r.charCodeAt(i));)++i;return i}function $t(e,t){let n=e.source.body,r=n.length,i=t+1,s=i,a="";for(;i<r;){let u=n.charCodeAt(i);if(u===34)return a+=n.slice(s,i),m(e,o.STRING,t,i+1,a);if(u===92){a+=n.slice(s,i);let l=n.charCodeAt(i+1)===117?n.charCodeAt(i+2)===123?Jt(e,i):Xt(e,i):qt(e,i);a+=l.value,i+=l.size,s=i;continue}if(u===10||u===13)break;if(R(u))++i;else if(K(n,i))i+=2;else throw d(e.source,i,`Invalid character within String: ${C(e,i)}.`)}throw d(e.source,i,"Unterminated string.")}function Jt(e,t){let n=e.source.body,r=0,i=3;for(;i<12;){let s=n.charCodeAt(t+i++);if(s===125){if(i<5||!R(r))break;return{value:String.fromCodePoint(r),size:i}}if(r=r<<4|U(s),r<0)break}throw d(e.source,t,`Invalid Unicode escape sequence: "${n.slice(t,t+i)}".`)}function Xt(e,t){let n=e.source.body,r=Xe(n,t+2);if(R(r))return{value:String.fromCodePoint(r),size:6};if(Qe(r)&&n.charCodeAt(t+6)===92&&n.charCodeAt(t+7)===117){let i=Xe(n,t+8);if(We(i))return{value:String.fromCodePoint(r,i),size:12}}throw d(e.source,t,`Invalid Unicode escape sequence: "${n.slice(t,t+6)}".`)}function Xe(e,t){return U(e.charCodeAt(t))<<12|U(e.charCodeAt(t+1))<<8|U(e.charCodeAt(t+2))<<4|U(e.charCodeAt(t+3))}function U(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}function qt(e,t){let n=e.source.body;switch(n.charCodeAt(t+1)){case 34:return{value:'"',size:2};case 92:return{value:"\\",size:2};case 47:return{value:"/",size:2};case 98:return{value:"\b",size:2};case 102:return{value:"\f",size:2};case 110:return{value:`
`,size:2};case 114:return{value:"\r",size:2};case 116:return{value:" ",size:2}}throw d(e.source,t,`Invalid character escape sequence: "${n.slice(t,t+2)}".`)}function Qt(e,t){let n=e.source.body,r=n.length,i=e.lineStart,s=t+3,a=s,u="",l=[];for(;s<r;){let T=n.charCodeAt(s);if(T===34&&n.charCodeAt(s+1)===34&&n.charCodeAt(s+2)===34){u+=n.slice(a,s),l.push(u);let h=m(e,o.BLOCK_STRING,t,s+3,Je(l).join(`
`));return e.line+=l.length-1,e.lineStart=i,h}if(T===92&&n.charCodeAt(s+1)===34&&n.charCodeAt(s+2)===34&&n.charCodeAt(s+3)===34){u+=n.slice(a,s),a=s+1,s+=4;continue}if(T===10||T===13){u+=n.slice(a,s),l.push(u),T===13&&n.charCodeAt(s+1)===10?s+=2:++s,u="",a=s,i=s;continue}if(R(T))++s;else if(K(n,s))s+=2;else throw d(e.source,s,`Invalid character within String: ${S(e,s)}.`)}throw d(e.source,s,"Unterminated string.")}function Wt(e,t){let n=e.source.body,r=n.length,i=t+1;for(;i<r;){let s=n.charCodeAt(i);if($e(s))++i;else break}return m(e,o.NAME,t,i,n.slice(t,i))}function Z(e,t){if(!!!e)throw new Error(t)}function ee(e){return te(e,[])}function te(e,t){switch(typeof e){case"string":return JSON.stringify(e);case"function":return e.name?`[function ${e.name}]`:"[function]";case"object":return Ht(e,t);default:return String(e)}}function Ht(e,t){if(e===null)return"null";if(t.includes(e))return"[Circular]";let n=[...t,e];if(zt(e)){let r=e.toJSON();if(r!==e)return typeof r=="string"?r:te(r,n)}else if(Array.isArray(e))return Zt(e,n);return Kt(e,n)}function zt(e){return typeof e.toJSON=="function"}function Kt(e,t){let n=Object.entries(e);return n.length===0?"{}":t.length>2?"["+en(e)+"]":"{ "+n.map(([i,s])=>i+": "+te(s,t)).join(", ")+" }"}function Zt(e,t){if(e.length===0)return"[]";if(t.length>2)return"[Array]";let n=Math.min(10,e.length),r=e.length-n,i=[];for(let s=0;s<n;++s)i.push(te(e[s],t));return r===1?i.push("... 1 more item"):r>1&&i.push(`... ${r} more items`),"["+i.join(", ")+"]"}function en(e){let t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if(t==="Object"&&typeof e.constructor=="function"){let n=e.constructor.name;if(typeof n=="string"&&n!=="")return n}return t}var He=globalThis.process&&globalThis.process.env.NODE_ENV==="production"?function(t,n){return t instanceof n}:function(t,n){if(t instanceof n)return!0;if(typeof t=="object"&&t!==null){var r;let i=n.prototype[Symbol.toStringTag],s=Symbol.toStringTag in t?t[Symbol.toStringTag]:(r=t.constructor)===null||r===void 0?void 0:r.name;if(i===s){let a=ee(t);throw new Error(`Cannot use ${i} "${a}" from another module or realm.
`));return e.line+=l.length-1,e.lineStart=i,h}if(T===92&&n.charCodeAt(s+1)===34&&n.charCodeAt(s+2)===34&&n.charCodeAt(s+3)===34){u+=n.slice(a,s),a=s+1,s+=4;continue}if(T===10||T===13){u+=n.slice(a,s),l.push(u),T===13&&n.charCodeAt(s+1)===10?s+=2:++s,u="",a=s,i=s;continue}if(R(T))++s;else if(K(n,s))s+=2;else throw d(e.source,s,`Invalid character within String: ${C(e,s)}.`)}throw d(e.source,s,"Unterminated string.")}function Wt(e,t){let n=e.source.body,r=n.length,i=t+1;for(;i<r;){let s=n.charCodeAt(i);if($e(s))++i;else break}return m(e,o.NAME,t,i,n.slice(t,i))}function Z(e,t){if(!!!e)throw new Error(t)}function ee(e){return te(e,[])}function te(e,t){switch(typeof e){case"string":return JSON.stringify(e);case"function":return e.name?`[function ${e.name}]`:"[function]";case"object":return Ht(e,t);default:return String(e)}}function Ht(e,t){if(e===null)return"null";if(t.includes(e))return"[Circular]";let n=[...t,e];if(zt(e)){let r=e.toJSON();if(r!==e)return typeof r=="string"?r:te(r,n)}else if(Array.isArray(e))return Zt(e,n);return Kt(e,n)}function zt(e){return typeof e.toJSON=="function"}function Kt(e,t){let n=Object.entries(e);return n.length===0?"{}":t.length>2?"["+en(e)+"]":"{ "+n.map(([i,s])=>i+": "+te(s,t)).join(", ")+" }"}function Zt(e,t){if(e.length===0)return"[]";if(t.length>2)return"[Array]";let n=Math.min(10,e.length),r=e.length-n,i=[];for(let s=0;s<n;++s)i.push(te(e[s],t));return r===1?i.push("... 1 more item"):r>1&&i.push(`... ${r} more items`),"["+i.join(", ")+"]"}function en(e){let t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if(t==="Object"&&typeof e.constructor=="function"){let n=e.constructor.name;if(typeof n=="string"&&n!=="")return n}return t}var He=globalThis.process&&globalThis.process.env.NODE_ENV==="production"?function(t,n){return t instanceof n}:function(t,n){if(t instanceof n)return!0;if(typeof t=="object"&&t!==null){var r;let i=n.prototype[Symbol.toStringTag],s=Symbol.toStringTag in t?t[Symbol.toStringTag]:(r=t.constructor)===null||r===void 0?void 0:r.name;if(i===s){let a=ee(t);throw new Error(`Cannot use ${i} "${a}" from another module or realm.

@@ -31,2 +31,2 @@ Ensure that there is only one instance of "graphql" in the node_modules

version used in the function from another could produce confusing and
spurious results.`)}}return!1};var M=class{constructor(t,n="GraphQL request",r={line:1,column:1}){typeof t=="string"||Z(!1,`Body must be a string. Received: ${ee(t)}.`),this.body=t,this.name=n,this.locationOffset=r,this.locationOffset.line>0||Z(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||Z(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}};function ze(e){return He(e,M)}function Ke(e,t){return new Ee(e,t).parseDocument()}var Ee=class{constructor(t,n={}){let r=ze(t)?t:new M(t);this._lexer=new z(r),this._options=n,this._tokenCounter=0}parseName(){let t=this.expectToken(o.NAME);return this.node(t,{kind:c.NAME,value:t.value})}parseDocument(){return this.node(this._lexer.token,{kind:c.DOCUMENT,definitions:this.many(o.SOF,this.parseDefinition,o.EOF)})}parseDefinition(){if(this.peek(o.BRACE_L))return this.parseOperationDefinition();let t=this.peekDescription(),n=t?this._lexer.lookahead():this._lexer.token;if(n.kind===o.NAME){switch(n.value){case"schema":return this.parseSchemaDefinition();case"scalar":return this.parseScalarTypeDefinition();case"type":return this.parseObjectTypeDefinition();case"interface":return this.parseInterfaceTypeDefinition();case"union":return this.parseUnionTypeDefinition();case"enum":return this.parseEnumTypeDefinition();case"input":return this.parseInputObjectTypeDefinition();case"directive":return this.parseDirectiveDefinition()}if(t)throw d(this._lexer.source,this._lexer.token.start,"Unexpected description, descriptions are supported only on type definitions.");switch(n.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition();case"extend":return this.parseTypeSystemExtension()}}throw this.unexpected(n)}parseOperationDefinition(){let t=this._lexer.token;if(this.peek(o.BRACE_L))return this.node(t,{kind:c.OPERATION_DEFINITION,operation:C.QUERY,name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet()});let n=this.parseOperationType(),r;return this.peek(o.NAME)&&(r=this.parseName()),this.node(t,{kind:c.OPERATION_DEFINITION,operation:n,name:r,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){let t=this.expectToken(o.NAME);switch(t.value){case"query":return C.QUERY;case"mutation":return C.MUTATION;case"subscription":return C.SUBSCRIPTION}throw this.unexpected(t)}parseVariableDefinitions(){return this.optionalMany(o.PAREN_L,this.parseVariableDefinition,o.PAREN_R)}parseVariableDefinition(){return this.node(this._lexer.token,{kind:c.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(o.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(o.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){let t=this._lexer.token;return this.expectToken(o.DOLLAR),this.node(t,{kind:c.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this._lexer.token,{kind:c.SELECTION_SET,selections:this.many(o.BRACE_L,this.parseSelection,o.BRACE_R)})}parseSelection(){return this.peek(o.SPREAD)?this.parseFragment():this.parseField()}parseField(){let t=this._lexer.token,n=this.parseName(),r,i;return this.expectOptionalToken(o.COLON)?(r=n,i=this.parseName()):i=n,this.node(t,{kind:c.FIELD,alias:r,name:i,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(o.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(t){let n=t?this.parseConstArgument:this.parseArgument;return this.optionalMany(o.PAREN_L,n,o.PAREN_R)}parseArgument(t=!1){let n=this._lexer.token,r=this.parseName();return this.expectToken(o.COLON),this.node(n,{kind:c.ARGUMENT,name:r,value:this.parseValueLiteral(t)})}parseConstArgument(){return this.parseArgument(!0)}parseFragment(){let t=this._lexer.token;this.expectToken(o.SPREAD);let n=this.expectOptionalKeyword("on");return!n&&this.peek(o.NAME)?this.node(t,{kind:c.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1)}):this.node(t,{kind:c.INLINE_FRAGMENT,typeCondition:n?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentDefinition(){let t=this._lexer.token;return this.expectKeyword("fragment"),this._options.allowLegacyFragmentVariables===!0?this.node(t,{kind:c.FRAGMENT_DEFINITION,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()}):this.node(t,{kind:c.FRAGMENT_DEFINITION,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentName(){if(this._lexer.token.value==="on")throw this.unexpected();return this.parseName()}parseValueLiteral(t){let n=this._lexer.token;switch(n.kind){case o.BRACKET_L:return this.parseList(t);case o.BRACE_L:return this.parseObject(t);case o.INT:return this.advanceLexer(),this.node(n,{kind:c.INT,value:n.value});case o.FLOAT:return this.advanceLexer(),this.node(n,{kind:c.FLOAT,value:n.value});case o.STRING:case o.BLOCK_STRING:return this.parseStringLiteral();case o.NAME:switch(this.advanceLexer(),n.value){case"true":return this.node(n,{kind:c.BOOLEAN,value:!0});case"false":return this.node(n,{kind:c.BOOLEAN,value:!1});case"null":return this.node(n,{kind:c.NULL});default:return this.node(n,{kind:c.ENUM,value:n.value})}case o.DOLLAR:if(t)if(this.expectToken(o.DOLLAR),this._lexer.token.kind===o.NAME){let r=this._lexer.token.value;throw d(this._lexer.source,n.start,`Unexpected variable "$${r}" in constant value.`)}else throw this.unexpected(n);return this.parseVariable();default:throw this.unexpected()}}parseConstValueLiteral(){return this.parseValueLiteral(!0)}parseStringLiteral(){let t=this._lexer.token;return this.advanceLexer(),this.node(t,{kind:c.STRING,value:t.value,block:t.kind===o.BLOCK_STRING})}parseList(t){let n=()=>this.parseValueLiteral(t);return this.node(this._lexer.token,{kind:c.LIST,values:this.any(o.BRACKET_L,n,o.BRACKET_R)})}parseObject(t){let n=()=>this.parseObjectField(t);return this.node(this._lexer.token,{kind:c.OBJECT,fields:this.any(o.BRACE_L,n,o.BRACE_R)})}parseObjectField(t){let n=this._lexer.token,r=this.parseName();return this.expectToken(o.COLON),this.node(n,{kind:c.OBJECT_FIELD,name:r,value:this.parseValueLiteral(t)})}parseDirectives(t){let n=[];for(;this.peek(o.AT);)n.push(this.parseDirective(t));return n}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(t){let n=this._lexer.token;return this.expectToken(o.AT),this.node(n,{kind:c.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(t)})}parseTypeReference(){let t=this._lexer.token,n;if(this.expectOptionalToken(o.BRACKET_L)){let r=this.parseTypeReference();this.expectToken(o.BRACKET_R),n=this.node(t,{kind:c.LIST_TYPE,type:r})}else n=this.parseNamedType();return this.expectOptionalToken(o.BANG)?this.node(t,{kind:c.NON_NULL_TYPE,type:n}):n}parseNamedType(){return this.node(this._lexer.token,{kind:c.NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek(o.STRING)||this.peek(o.BLOCK_STRING)}parseDescription(){if(this.peekDescription())return this.parseStringLiteral()}parseSchemaDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("schema");let r=this.parseConstDirectives(),i=this.many(o.BRACE_L,this.parseOperationTypeDefinition,o.BRACE_R);return this.node(t,{kind:c.SCHEMA_DEFINITION,description:n,directives:r,operationTypes:i})}parseOperationTypeDefinition(){let t=this._lexer.token,n=this.parseOperationType();this.expectToken(o.COLON);let r=this.parseNamedType();return this.node(t,{kind:c.OPERATION_TYPE_DEFINITION,operation:n,type:r})}parseScalarTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("scalar");let r=this.parseName(),i=this.parseConstDirectives();return this.node(t,{kind:c.SCALAR_TYPE_DEFINITION,description:n,name:r,directives:i})}parseObjectTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("type");let r=this.parseName(),i=this.parseImplementsInterfaces(),s=this.parseConstDirectives(),a=this.parseFieldsDefinition();return this.node(t,{kind:c.OBJECT_TYPE_DEFINITION,description:n,name:r,interfaces:i,directives:s,fields:a})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany(o.AMP,this.parseNamedType):[]}parseFieldsDefinition(){return this.optionalMany(o.BRACE_L,this.parseFieldDefinition,o.BRACE_R)}parseFieldDefinition(){let t=this._lexer.token,n=this.parseDescription(),r=this.parseName(),i=this.parseArgumentDefs();this.expectToken(o.COLON);let s=this.parseTypeReference(),a=this.parseConstDirectives();return this.node(t,{kind:c.FIELD_DEFINITION,description:n,name:r,arguments:i,type:s,directives:a})}parseArgumentDefs(){return this.optionalMany(o.PAREN_L,this.parseInputValueDef,o.PAREN_R)}parseInputValueDef(){let t=this._lexer.token,n=this.parseDescription(),r=this.parseName();this.expectToken(o.COLON);let i=this.parseTypeReference(),s;this.expectOptionalToken(o.EQUALS)&&(s=this.parseConstValueLiteral());let a=this.parseConstDirectives();return this.node(t,{kind:c.INPUT_VALUE_DEFINITION,description:n,name:r,type:i,defaultValue:s,directives:a})}parseInterfaceTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("interface");let r=this.parseName(),i=this.parseImplementsInterfaces(),s=this.parseConstDirectives(),a=this.parseFieldsDefinition();return this.node(t,{kind:c.INTERFACE_TYPE_DEFINITION,description:n,name:r,interfaces:i,directives:s,fields:a})}parseUnionTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("union");let r=this.parseName(),i=this.parseConstDirectives(),s=this.parseUnionMemberTypes();return this.node(t,{kind:c.UNION_TYPE_DEFINITION,description:n,name:r,directives:i,types:s})}parseUnionMemberTypes(){return this.expectOptionalToken(o.EQUALS)?this.delimitedMany(o.PIPE,this.parseNamedType):[]}parseEnumTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("enum");let r=this.parseName(),i=this.parseConstDirectives(),s=this.parseEnumValuesDefinition();return this.node(t,{kind:c.ENUM_TYPE_DEFINITION,description:n,name:r,directives:i,values:s})}parseEnumValuesDefinition(){return this.optionalMany(o.BRACE_L,this.parseEnumValueDefinition,o.BRACE_R)}parseEnumValueDefinition(){let t=this._lexer.token,n=this.parseDescription(),r=this.parseEnumValueName(),i=this.parseConstDirectives();return this.node(t,{kind:c.ENUM_VALUE_DEFINITION,description:n,name:r,directives:i})}parseEnumValueName(){if(this._lexer.token.value==="true"||this._lexer.token.value==="false"||this._lexer.token.value==="null")throw d(this._lexer.source,this._lexer.token.start,`${ne(this._lexer.token)} is reserved and cannot be used for an enum value.`);return this.parseName()}parseInputObjectTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("input");let r=this.parseName(),i=this.parseConstDirectives(),s=this.parseInputFieldsDefinition();return this.node(t,{kind:c.INPUT_OBJECT_TYPE_DEFINITION,description:n,name:r,directives:i,fields:s})}parseInputFieldsDefinition(){return this.optionalMany(o.BRACE_L,this.parseInputValueDef,o.BRACE_R)}parseTypeSystemExtension(){let t=this._lexer.lookahead();if(t.kind===o.NAME)switch(t.value){case"schema":return this.parseSchemaExtension();case"scalar":return this.parseScalarTypeExtension();case"type":return this.parseObjectTypeExtension();case"interface":return this.parseInterfaceTypeExtension();case"union":return this.parseUnionTypeExtension();case"enum":return this.parseEnumTypeExtension();case"input":return this.parseInputObjectTypeExtension()}throw this.unexpected(t)}parseSchemaExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");let n=this.parseConstDirectives(),r=this.optionalMany(o.BRACE_L,this.parseOperationTypeDefinition,o.BRACE_R);if(n.length===0&&r.length===0)throw this.unexpected();return this.node(t,{kind:c.SCHEMA_EXTENSION,directives:n,operationTypes:r})}parseScalarTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");let n=this.parseName(),r=this.parseConstDirectives();if(r.length===0)throw this.unexpected();return this.node(t,{kind:c.SCALAR_TYPE_EXTENSION,name:n,directives:r})}parseObjectTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");let n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),s=this.parseFieldsDefinition();if(r.length===0&&i.length===0&&s.length===0)throw this.unexpected();return this.node(t,{kind:c.OBJECT_TYPE_EXTENSION,name:n,interfaces:r,directives:i,fields:s})}parseInterfaceTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");let n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),s=this.parseFieldsDefinition();if(r.length===0&&i.length===0&&s.length===0)throw this.unexpected();return this.node(t,{kind:c.INTERFACE_TYPE_EXTENSION,name:n,interfaces:r,directives:i,fields:s})}parseUnionTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");let n=this.parseName(),r=this.parseConstDirectives(),i=this.parseUnionMemberTypes();if(r.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:c.UNION_TYPE_EXTENSION,name:n,directives:r,types:i})}parseEnumTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");let n=this.parseName(),r=this.parseConstDirectives(),i=this.parseEnumValuesDefinition();if(r.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:c.ENUM_TYPE_EXTENSION,name:n,directives:r,values:i})}parseInputObjectTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");let n=this.parseName(),r=this.parseConstDirectives(),i=this.parseInputFieldsDefinition();if(r.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:c.INPUT_OBJECT_TYPE_EXTENSION,name:n,directives:r,fields:i})}parseDirectiveDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("directive"),this.expectToken(o.AT);let r=this.parseName(),i=this.parseArgumentDefs(),s=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");let a=this.parseDirectiveLocations();return this.node(t,{kind:c.DIRECTIVE_DEFINITION,description:n,name:r,arguments:i,repeatable:s,locations:a})}parseDirectiveLocations(){return this.delimitedMany(o.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){let t=this._lexer.token,n=this.parseName();if(Object.prototype.hasOwnProperty.call(H,n.value))return n;throw this.unexpected(t)}node(t,n){return this._options.noLocation!==!0&&(n.loc=new J(t,this._lexer.lastToken,this._lexer.source)),n}peek(t){return this._lexer.token.kind===t}expectToken(t){let n=this._lexer.token;if(n.kind===t)return this.advanceLexer(),n;throw d(this._lexer.source,n.start,`Expected ${Ze(t)}, found ${ne(n)}.`)}expectOptionalToken(t){return this._lexer.token.kind===t?(this.advanceLexer(),!0):!1}expectKeyword(t){let n=this._lexer.token;if(n.kind===o.NAME&&n.value===t)this.advanceLexer();else throw d(this._lexer.source,n.start,`Expected "${t}", found ${ne(n)}.`)}expectOptionalKeyword(t){let n=this._lexer.token;return n.kind===o.NAME&&n.value===t?(this.advanceLexer(),!0):!1}unexpected(t){let n=t??this._lexer.token;return d(this._lexer.source,n.start,`Unexpected ${ne(n)}.`)}any(t,n,r){this.expectToken(t);let i=[];for(;!this.expectOptionalToken(r);)i.push(n.call(this));return i}optionalMany(t,n,r){if(this.expectOptionalToken(t)){let i=[];do i.push(n.call(this));while(!this.expectOptionalToken(r));return i}return[]}many(t,n,r){this.expectToken(t);let i=[];do i.push(n.call(this));while(!this.expectOptionalToken(r));return i}delimitedMany(t,n){this.expectOptionalToken(t);let r=[];do r.push(n.call(this));while(this.expectOptionalToken(t));return r}advanceLexer(){let{maxTokens:t}=this._options,n=this._lexer.advance();if(t!==void 0&&n.kind!==o.EOF&&(++this._tokenCounter,this._tokenCounter>t))throw d(this._lexer.source,n.start,`Document contains more that ${t} tokens. Parsing aborted.`)}};function ne(e){let t=e.value;return Ze(e.kind)+(t!=null?` "${t}"`:"")}function Ze(e){return qe(e)?`"${e}"`:e}function tn(e,t){let n=new SyntaxError(e+" ("+t.loc.start.line+":"+t.loc.start.column+")");return Object.assign(n,t)}var et=tn;function nn(e){let t=[],{startToken:n,endToken:r}=e.loc;for(let i=n;i!==r;i=i.next)i.kind==="Comment"&&t.push(i);return t}var rn={allowLegacyFragmentVariables:!0};function sn(e){if((e==null?void 0:e.name)==="GraphQLError"){let{message:t,locations:[n]}=e;return et(t,{loc:{start:n},cause:e})}return e}function on(e){let t;try{t=Ke(e,rn)}catch(n){throw sn(n)}return t.comments=nn(t),t}var an={parse:on,astFormat:"graphql",hasPragma:Se,locStart:q,locEnd:Q};var cn={graphql:Re};return st(un);});
spurious results.`)}}return!1};var M=class{constructor(t,n="GraphQL request",r={line:1,column:1}){typeof t=="string"||Z(!1,`Body must be a string. Received: ${ee(t)}.`),this.body=t,this.name=n,this.locationOffset=r,this.locationOffset.line>0||Z(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||Z(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}};function ze(e){return He(e,M)}function Ke(e,t){return new Ee(e,t).parseDocument()}var Ee=class{constructor(t,n={}){let r=ze(t)?t:new M(t);this._lexer=new z(r),this._options=n,this._tokenCounter=0}parseName(){let t=this.expectToken(o.NAME);return this.node(t,{kind:c.NAME,value:t.value})}parseDocument(){return this.node(this._lexer.token,{kind:c.DOCUMENT,definitions:this.many(o.SOF,this.parseDefinition,o.EOF)})}parseDefinition(){if(this.peek(o.BRACE_L))return this.parseOperationDefinition();let t=this.peekDescription(),n=t?this._lexer.lookahead():this._lexer.token;if(n.kind===o.NAME){switch(n.value){case"schema":return this.parseSchemaDefinition();case"scalar":return this.parseScalarTypeDefinition();case"type":return this.parseObjectTypeDefinition();case"interface":return this.parseInterfaceTypeDefinition();case"union":return this.parseUnionTypeDefinition();case"enum":return this.parseEnumTypeDefinition();case"input":return this.parseInputObjectTypeDefinition();case"directive":return this.parseDirectiveDefinition()}if(t)throw d(this._lexer.source,this._lexer.token.start,"Unexpected description, descriptions are supported only on type definitions.");switch(n.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition();case"extend":return this.parseTypeSystemExtension()}}throw this.unexpected(n)}parseOperationDefinition(){let t=this._lexer.token;if(this.peek(o.BRACE_L))return this.node(t,{kind:c.OPERATION_DEFINITION,operation:S.QUERY,name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet()});let n=this.parseOperationType(),r;return this.peek(o.NAME)&&(r=this.parseName()),this.node(t,{kind:c.OPERATION_DEFINITION,operation:n,name:r,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){let t=this.expectToken(o.NAME);switch(t.value){case"query":return S.QUERY;case"mutation":return S.MUTATION;case"subscription":return S.SUBSCRIPTION}throw this.unexpected(t)}parseVariableDefinitions(){return this.optionalMany(o.PAREN_L,this.parseVariableDefinition,o.PAREN_R)}parseVariableDefinition(){return this.node(this._lexer.token,{kind:c.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(o.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(o.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){let t=this._lexer.token;return this.expectToken(o.DOLLAR),this.node(t,{kind:c.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this._lexer.token,{kind:c.SELECTION_SET,selections:this.many(o.BRACE_L,this.parseSelection,o.BRACE_R)})}parseSelection(){return this.peek(o.SPREAD)?this.parseFragment():this.parseField()}parseField(){let t=this._lexer.token,n=this.parseName(),r,i;return this.expectOptionalToken(o.COLON)?(r=n,i=this.parseName()):i=n,this.node(t,{kind:c.FIELD,alias:r,name:i,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(o.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(t){let n=t?this.parseConstArgument:this.parseArgument;return this.optionalMany(o.PAREN_L,n,o.PAREN_R)}parseArgument(t=!1){let n=this._lexer.token,r=this.parseName();return this.expectToken(o.COLON),this.node(n,{kind:c.ARGUMENT,name:r,value:this.parseValueLiteral(t)})}parseConstArgument(){return this.parseArgument(!0)}parseFragment(){let t=this._lexer.token;this.expectToken(o.SPREAD);let n=this.expectOptionalKeyword("on");return!n&&this.peek(o.NAME)?this.node(t,{kind:c.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1)}):this.node(t,{kind:c.INLINE_FRAGMENT,typeCondition:n?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentDefinition(){let t=this._lexer.token;return this.expectKeyword("fragment"),this._options.allowLegacyFragmentVariables===!0?this.node(t,{kind:c.FRAGMENT_DEFINITION,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()}):this.node(t,{kind:c.FRAGMENT_DEFINITION,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentName(){if(this._lexer.token.value==="on")throw this.unexpected();return this.parseName()}parseValueLiteral(t){let n=this._lexer.token;switch(n.kind){case o.BRACKET_L:return this.parseList(t);case o.BRACE_L:return this.parseObject(t);case o.INT:return this.advanceLexer(),this.node(n,{kind:c.INT,value:n.value});case o.FLOAT:return this.advanceLexer(),this.node(n,{kind:c.FLOAT,value:n.value});case o.STRING:case o.BLOCK_STRING:return this.parseStringLiteral();case o.NAME:switch(this.advanceLexer(),n.value){case"true":return this.node(n,{kind:c.BOOLEAN,value:!0});case"false":return this.node(n,{kind:c.BOOLEAN,value:!1});case"null":return this.node(n,{kind:c.NULL});default:return this.node(n,{kind:c.ENUM,value:n.value})}case o.DOLLAR:if(t)if(this.expectToken(o.DOLLAR),this._lexer.token.kind===o.NAME){let r=this._lexer.token.value;throw d(this._lexer.source,n.start,`Unexpected variable "$${r}" in constant value.`)}else throw this.unexpected(n);return this.parseVariable();default:throw this.unexpected()}}parseConstValueLiteral(){return this.parseValueLiteral(!0)}parseStringLiteral(){let t=this._lexer.token;return this.advanceLexer(),this.node(t,{kind:c.STRING,value:t.value,block:t.kind===o.BLOCK_STRING})}parseList(t){let n=()=>this.parseValueLiteral(t);return this.node(this._lexer.token,{kind:c.LIST,values:this.any(o.BRACKET_L,n,o.BRACKET_R)})}parseObject(t){let n=()=>this.parseObjectField(t);return this.node(this._lexer.token,{kind:c.OBJECT,fields:this.any(o.BRACE_L,n,o.BRACE_R)})}parseObjectField(t){let n=this._lexer.token,r=this.parseName();return this.expectToken(o.COLON),this.node(n,{kind:c.OBJECT_FIELD,name:r,value:this.parseValueLiteral(t)})}parseDirectives(t){let n=[];for(;this.peek(o.AT);)n.push(this.parseDirective(t));return n}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(t){let n=this._lexer.token;return this.expectToken(o.AT),this.node(n,{kind:c.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(t)})}parseTypeReference(){let t=this._lexer.token,n;if(this.expectOptionalToken(o.BRACKET_L)){let r=this.parseTypeReference();this.expectToken(o.BRACKET_R),n=this.node(t,{kind:c.LIST_TYPE,type:r})}else n=this.parseNamedType();return this.expectOptionalToken(o.BANG)?this.node(t,{kind:c.NON_NULL_TYPE,type:n}):n}parseNamedType(){return this.node(this._lexer.token,{kind:c.NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek(o.STRING)||this.peek(o.BLOCK_STRING)}parseDescription(){if(this.peekDescription())return this.parseStringLiteral()}parseSchemaDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("schema");let r=this.parseConstDirectives(),i=this.many(o.BRACE_L,this.parseOperationTypeDefinition,o.BRACE_R);return this.node(t,{kind:c.SCHEMA_DEFINITION,description:n,directives:r,operationTypes:i})}parseOperationTypeDefinition(){let t=this._lexer.token,n=this.parseOperationType();this.expectToken(o.COLON);let r=this.parseNamedType();return this.node(t,{kind:c.OPERATION_TYPE_DEFINITION,operation:n,type:r})}parseScalarTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("scalar");let r=this.parseName(),i=this.parseConstDirectives();return this.node(t,{kind:c.SCALAR_TYPE_DEFINITION,description:n,name:r,directives:i})}parseObjectTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("type");let r=this.parseName(),i=this.parseImplementsInterfaces(),s=this.parseConstDirectives(),a=this.parseFieldsDefinition();return this.node(t,{kind:c.OBJECT_TYPE_DEFINITION,description:n,name:r,interfaces:i,directives:s,fields:a})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany(o.AMP,this.parseNamedType):[]}parseFieldsDefinition(){return this.optionalMany(o.BRACE_L,this.parseFieldDefinition,o.BRACE_R)}parseFieldDefinition(){let t=this._lexer.token,n=this.parseDescription(),r=this.parseName(),i=this.parseArgumentDefs();this.expectToken(o.COLON);let s=this.parseTypeReference(),a=this.parseConstDirectives();return this.node(t,{kind:c.FIELD_DEFINITION,description:n,name:r,arguments:i,type:s,directives:a})}parseArgumentDefs(){return this.optionalMany(o.PAREN_L,this.parseInputValueDef,o.PAREN_R)}parseInputValueDef(){let t=this._lexer.token,n=this.parseDescription(),r=this.parseName();this.expectToken(o.COLON);let i=this.parseTypeReference(),s;this.expectOptionalToken(o.EQUALS)&&(s=this.parseConstValueLiteral());let a=this.parseConstDirectives();return this.node(t,{kind:c.INPUT_VALUE_DEFINITION,description:n,name:r,type:i,defaultValue:s,directives:a})}parseInterfaceTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("interface");let r=this.parseName(),i=this.parseImplementsInterfaces(),s=this.parseConstDirectives(),a=this.parseFieldsDefinition();return this.node(t,{kind:c.INTERFACE_TYPE_DEFINITION,description:n,name:r,interfaces:i,directives:s,fields:a})}parseUnionTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("union");let r=this.parseName(),i=this.parseConstDirectives(),s=this.parseUnionMemberTypes();return this.node(t,{kind:c.UNION_TYPE_DEFINITION,description:n,name:r,directives:i,types:s})}parseUnionMemberTypes(){return this.expectOptionalToken(o.EQUALS)?this.delimitedMany(o.PIPE,this.parseNamedType):[]}parseEnumTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("enum");let r=this.parseName(),i=this.parseConstDirectives(),s=this.parseEnumValuesDefinition();return this.node(t,{kind:c.ENUM_TYPE_DEFINITION,description:n,name:r,directives:i,values:s})}parseEnumValuesDefinition(){return this.optionalMany(o.BRACE_L,this.parseEnumValueDefinition,o.BRACE_R)}parseEnumValueDefinition(){let t=this._lexer.token,n=this.parseDescription(),r=this.parseEnumValueName(),i=this.parseConstDirectives();return this.node(t,{kind:c.ENUM_VALUE_DEFINITION,description:n,name:r,directives:i})}parseEnumValueName(){if(this._lexer.token.value==="true"||this._lexer.token.value==="false"||this._lexer.token.value==="null")throw d(this._lexer.source,this._lexer.token.start,`${ne(this._lexer.token)} is reserved and cannot be used for an enum value.`);return this.parseName()}parseInputObjectTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("input");let r=this.parseName(),i=this.parseConstDirectives(),s=this.parseInputFieldsDefinition();return this.node(t,{kind:c.INPUT_OBJECT_TYPE_DEFINITION,description:n,name:r,directives:i,fields:s})}parseInputFieldsDefinition(){return this.optionalMany(o.BRACE_L,this.parseInputValueDef,o.BRACE_R)}parseTypeSystemExtension(){let t=this._lexer.lookahead();if(t.kind===o.NAME)switch(t.value){case"schema":return this.parseSchemaExtension();case"scalar":return this.parseScalarTypeExtension();case"type":return this.parseObjectTypeExtension();case"interface":return this.parseInterfaceTypeExtension();case"union":return this.parseUnionTypeExtension();case"enum":return this.parseEnumTypeExtension();case"input":return this.parseInputObjectTypeExtension()}throw this.unexpected(t)}parseSchemaExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");let n=this.parseConstDirectives(),r=this.optionalMany(o.BRACE_L,this.parseOperationTypeDefinition,o.BRACE_R);if(n.length===0&&r.length===0)throw this.unexpected();return this.node(t,{kind:c.SCHEMA_EXTENSION,directives:n,operationTypes:r})}parseScalarTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");let n=this.parseName(),r=this.parseConstDirectives();if(r.length===0)throw this.unexpected();return this.node(t,{kind:c.SCALAR_TYPE_EXTENSION,name:n,directives:r})}parseObjectTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");let n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),s=this.parseFieldsDefinition();if(r.length===0&&i.length===0&&s.length===0)throw this.unexpected();return this.node(t,{kind:c.OBJECT_TYPE_EXTENSION,name:n,interfaces:r,directives:i,fields:s})}parseInterfaceTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");let n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),s=this.parseFieldsDefinition();if(r.length===0&&i.length===0&&s.length===0)throw this.unexpected();return this.node(t,{kind:c.INTERFACE_TYPE_EXTENSION,name:n,interfaces:r,directives:i,fields:s})}parseUnionTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");let n=this.parseName(),r=this.parseConstDirectives(),i=this.parseUnionMemberTypes();if(r.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:c.UNION_TYPE_EXTENSION,name:n,directives:r,types:i})}parseEnumTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");let n=this.parseName(),r=this.parseConstDirectives(),i=this.parseEnumValuesDefinition();if(r.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:c.ENUM_TYPE_EXTENSION,name:n,directives:r,values:i})}parseInputObjectTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");let n=this.parseName(),r=this.parseConstDirectives(),i=this.parseInputFieldsDefinition();if(r.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:c.INPUT_OBJECT_TYPE_EXTENSION,name:n,directives:r,fields:i})}parseDirectiveDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("directive"),this.expectToken(o.AT);let r=this.parseName(),i=this.parseArgumentDefs(),s=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");let a=this.parseDirectiveLocations();return this.node(t,{kind:c.DIRECTIVE_DEFINITION,description:n,name:r,arguments:i,repeatable:s,locations:a})}parseDirectiveLocations(){return this.delimitedMany(o.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){let t=this._lexer.token,n=this.parseName();if(Object.prototype.hasOwnProperty.call(H,n.value))return n;throw this.unexpected(t)}node(t,n){return this._options.noLocation!==!0&&(n.loc=new J(t,this._lexer.lastToken,this._lexer.source)),n}peek(t){return this._lexer.token.kind===t}expectToken(t){let n=this._lexer.token;if(n.kind===t)return this.advanceLexer(),n;throw d(this._lexer.source,n.start,`Expected ${Ze(t)}, found ${ne(n)}.`)}expectOptionalToken(t){return this._lexer.token.kind===t?(this.advanceLexer(),!0):!1}expectKeyword(t){let n=this._lexer.token;if(n.kind===o.NAME&&n.value===t)this.advanceLexer();else throw d(this._lexer.source,n.start,`Expected "${t}", found ${ne(n)}.`)}expectOptionalKeyword(t){let n=this._lexer.token;return n.kind===o.NAME&&n.value===t?(this.advanceLexer(),!0):!1}unexpected(t){let n=t??this._lexer.token;return d(this._lexer.source,n.start,`Unexpected ${ne(n)}.`)}any(t,n,r){this.expectToken(t);let i=[];for(;!this.expectOptionalToken(r);)i.push(n.call(this));return i}optionalMany(t,n,r){if(this.expectOptionalToken(t)){let i=[];do i.push(n.call(this));while(!this.expectOptionalToken(r));return i}return[]}many(t,n,r){this.expectToken(t);let i=[];do i.push(n.call(this));while(!this.expectOptionalToken(r));return i}delimitedMany(t,n){this.expectOptionalToken(t);let r=[];do r.push(n.call(this));while(this.expectOptionalToken(t));return r}advanceLexer(){let{maxTokens:t}=this._options,n=this._lexer.advance();if(t!==void 0&&n.kind!==o.EOF&&(++this._tokenCounter,this._tokenCounter>t))throw d(this._lexer.source,n.start,`Document contains more that ${t} tokens. Parsing aborted.`)}};function ne(e){let t=e.value;return Ze(e.kind)+(t!=null?` "${t}"`:"")}function Ze(e){return qe(e)?`"${e}"`:e}function tn(e,t){let n=new SyntaxError(e+" ("+t.loc.start.line+":"+t.loc.start.column+")");return Object.assign(n,t)}var et=tn;function nn(e){let t=[],{startToken:n,endToken:r}=e.loc;for(let i=n;i!==r;i=i.next)i.kind==="Comment"&&t.push({...i,loc:{start:i.start,end:i.end}});return t}var rn={allowLegacyFragmentVariables:!0};function sn(e){if((e==null?void 0:e.name)==="GraphQLError"){let{message:t,locations:[n]}=e;return et(t,{loc:{start:n},cause:e})}return e}function on(e){let t;try{t=Ke(e,rn)}catch(n){throw sn(n)}return t.comments=nn(t),t}var an={parse:on,astFormat:"graphql",hasPragma:Ce,locStart:q,locEnd:Q};var cn={graphql:Re};return st(un);});

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc