Socket
Socket
Sign inDemoInstall

prettier

Package Overview
Dependencies
Maintainers
0
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.3.2 to 3.3.3

4

doc.js

@@ -381,3 +381,3 @@ (function (factory) {

// src/utils/get-string-width.js
var notAsciiRegex = /[^\x20-\x7F]/;
var notAsciiRegex = /[^\x20-\x7F]/u;
function getStringWidth(text) {

@@ -614,3 +614,3 @@ if (!text) {

case DOC_TYPE_STRING:
return doc.replace(/[\n\r]*$/, "");
return doc.replace(/[\n\r]*$/u, "");
case DOC_TYPE_ALIGN:

@@ -617,0 +617,0 @@ case DOC_TYPE_CURSOR:

@@ -616,4 +616,3 @@ // Copied from `@types/prettier`

* passing its path or url as the first argument. The config search will start at
* the file location and continue to search up the directory.
* (You can use `process.cwd()` to start searching from the current directory).
* the directory of the file location and continue to search up the directory.
*

@@ -620,0 +619,0 @@ * A promise is returned which will resolve to:

{
"name": "prettier",
"version": "3.3.2",
"version": "3.3.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 Ut=Object.defineProperty;var Je=Object.getOwnPropertyDescriptor;var Xe=Object.getOwnPropertyNames;var ts=Object.prototype.hasOwnProperty;var ae=r=>{throw TypeError(r)};var oe=(r,t)=>{for(var e in t)Ut(r,e,{get:t[e],enumerable:!0})},es=(r,t,e,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Xe(t))!ts.call(r,i)&&i!==e&&Ut(r,i,{get:()=>t[i],enumerable:!(s=Je(t,i))||s.enumerable});return r};var ss=r=>es(Ut({},"__esModule",{value:!0}),r);var Ft=(r,t,e)=>t.has(r)||ae("Cannot "+e);var O=(r,t,e)=>(Ft(r,t,"read from private field"),e?e.call(r):t.get(r)),P=(r,t,e)=>t.has(r)?ae("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(r):t.set(r,e),Y=(r,t,e,s)=>(Ft(r,t,"write to private field"),s?s.call(r,e):t.set(r,e),e),c=(r,t,e)=>(Ft(r,t,"access private method"),e);var rr={};oe(rr,{parsers:()=>ne});var ne={};oe(ne,{__ng_action:()=>Xs,__ng_binding:()=>tr,__ng_directive:()=>sr,__ng_interpolation:()=>er});var Z=class{constructor(t,e,s,i){this.input=e,this.errLocation=s,this.ctxLocation=i,this.message=`Parser Error: ${t} ${s} [${e}] in ${i}`}},b=class{constructor(t,e){this.start=t,this.end=e}toAbsolute(t){return new L(t+this.start,t+this.end)}},m=class{constructor(t,e){this.span=t,this.sourceSpan=e}toString(){return"AST"}},J=class extends m{constructor(t,e,s){super(t,e),this.nameSpan=s}},$=class extends m{visit(t,e=null){}},K=class extends m{visit(t,e=null){return t.visitImplicitReceiver(this,e)}},Lt=class extends K{visit(t,e=null){var s;return(s=t.visitThisReceiver)==null?void 0:s.call(t,this,e)}},X=class extends m{constructor(t,e,s){super(t,e),this.expressions=s}visit(t,e=null){return t.visitChain(this,e)}},tt=class extends m{constructor(t,e,s,i,n){super(t,e),this.condition=s,this.trueExp=i,this.falseExp=n}visit(t,e=null){return t.visitConditional(this,e)}},M=class extends J{constructor(t,e,s,i,n){super(t,e,s),this.receiver=i,this.name=n}visit(t,e=null){return t.visitPropertyRead(this,e)}},et=class extends J{constructor(t,e,s,i,n,a){super(t,e,s),this.receiver=i,this.name=n,this.value=a}visit(t,e=null){return t.visitPropertyWrite(this,e)}},_=class extends J{constructor(t,e,s,i,n){super(t,e,s),this.receiver=i,this.name=n}visit(t,e=null){return t.visitSafePropertyRead(this,e)}},st=class extends m{constructor(t,e,s,i){super(t,e),this.receiver=s,this.key=i}visit(t,e=null){return t.visitKeyedRead(this,e)}},U=class extends m{constructor(t,e,s,i){super(t,e),this.receiver=s,this.key=i}visit(t,e=null){return t.visitSafeKeyedRead(this,e)}},rt=class extends m{constructor(t,e,s,i,n){super(t,e),this.receiver=s,this.key=i,this.value=n}visit(t,e=null){return t.visitKeyedWrite(this,e)}},it=class extends J{constructor(t,e,s,i,n,a){super(t,e,a),this.exp=s,this.name=i,this.args=n}visit(t,e=null){return t.visitPipe(this,e)}},E=class extends m{constructor(t,e,s){super(t,e),this.value=s}visit(t,e=null){return t.visitLiteralPrimitive(this,e)}},nt=class extends m{constructor(t,e,s){super(t,e),this.expressions=s}visit(t,e=null){return t.visitLiteralArray(this,e)}},at=class extends m{constructor(t,e,s,i){super(t,e),this.keys=s,this.values=i}visit(t,e=null){return t.visitLiteralMap(this,e)}},ot=class extends m{constructor(t,e,s,i){super(t,e),this.strings=s,this.expressions=i}visit(t,e=null){return t.visitInterpolation(this,e)}},A=class extends m{constructor(t,e,s,i,n){super(t,e),this.operation=s,this.left=i,this.right=n}visit(t,e=null){return t.visitBinary(this,e)}},F=class r extends A{static createMinus(t,e,s){return new r(t,e,"-",s,"-",new E(t,e,0),s)}static createPlus(t,e,s){return new r(t,e,"+",s,"-",s,new E(t,e,0))}constructor(t,e,s,i,n,a,o){super(t,e,n,a,o),this.operator=s,this.expr=i,this.left=null,this.right=null,this.operation=null}visit(t,e=null){return t.visitUnary!==void 0?t.visitUnary(this,e):t.visitBinary(this,e)}},ct=class extends m{constructor(t,e,s){super(t,e),this.expression=s}visit(t,e=null){return t.visitPrefixNot(this,e)}},ht=class extends m{constructor(t,e,s){super(t,e),this.expression=s}visit(t,e=null){return t.visitNonNullAssert(this,e)}},pt=class extends m{constructor(t,e,s,i,n){super(t,e),this.receiver=s,this.args=i,this.argumentSpan=n}visit(t,e=null){return t.visitCall(this,e)}},D=class extends m{constructor(t,e,s,i,n){super(t,e),this.receiver=s,this.args=i,this.argumentSpan=n}visit(t,e=null){return t.visitSafeCall(this,e)}},L=class{constructor(t,e){this.start=t,this.end=e}},R=class extends m{constructor(t,e,s,i,n){super(new b(0,e===null?0:e.length),new L(i,e===null?i:i+e.length)),this.ast=t,this.source=e,this.location=s,this.errors=n}visit(t,e=null){return t.visitASTWithSource?t.visitASTWithSource(this,e):this.ast.visit(t,e)}toString(){return`${this.source} in ${this.location}`}},W=class{constructor(t,e,s){this.sourceSpan=t,this.key=e,this.value=s}},ut=class{constructor(t,e,s){this.sourceSpan=t,this.key=e,this.value=s}},Rt=class{visit(t,e){t.visit(this,e)}visitUnary(t,e){this.visit(t.expr,e)}visitBinary(t,e){this.visit(t.left,e),this.visit(t.right,e)}visitChain(t,e){this.visitAll(t.expressions,e)}visitConditional(t,e){this.visit(t.condition,e),this.visit(t.trueExp,e),this.visit(t.falseExp,e)}visitPipe(t,e){this.visit(t.exp,e),this.visitAll(t.args,e)}visitImplicitReceiver(t,e){}visitThisReceiver(t,e){}visitInterpolation(t,e){this.visitAll(t.expressions,e)}visitKeyedRead(t,e){this.visit(t.receiver,e),this.visit(t.key,e)}visitKeyedWrite(t,e){this.visit(t.receiver,e),this.visit(t.key,e),this.visit(t.value,e)}visitLiteralArray(t,e){this.visitAll(t.expressions,e)}visitLiteralMap(t,e){this.visitAll(t.values,e)}visitLiteralPrimitive(t,e){}visitPrefixNot(t,e){this.visit(t.expression,e)}visitNonNullAssert(t,e){this.visit(t.expression,e)}visitPropertyRead(t,e){this.visit(t.receiver,e)}visitPropertyWrite(t,e){this.visit(t.receiver,e),this.visit(t.value,e)}visitSafePropertyRead(t,e){this.visit(t.receiver,e)}visitSafeKeyedRead(t,e){this.visit(t.receiver,e),this.visit(t.key,e)}visitCall(t,e){this.visit(t.receiver,e),this.visitAll(t.args,e)}visitSafeCall(t,e){this.visit(t.receiver,e),this.visitAll(t.args,e)}visitAll(t,e){for(let s of t)this.visit(s,e)}};var ce;(function(r){r[r.DEFAULT=0]="DEFAULT",r[r.LITERAL_ATTR=1]="LITERAL_ATTR",r[r.ANIMATION=2]="ANIMATION",r[r.TWO_WAY=3]="TWO_WAY"})(ce||(ce={}));var he;(function(r){r[r.Regular=0]="Regular",r[r.Animation=1]="Animation",r[r.TwoWay=2]="TwoWay"})(he||(he={}));var pe;(function(r){r[r.Property=0]="Property",r[r.Attribute=1]="Attribute",r[r.Class=2]="Class",r[r.Style=3]="Style",r[r.Animation=4]="Animation",r[r.TwoWay=5]="TwoWay"})(pe||(pe={}));function ue(r){return r>=9&&r<=32||r==160}function B(r){return 48<=r&&r<=57}function le(r){return r>=97&&r<=122||r>=65&&r<=90}function Dt(r){return r===39||r===34||r===96}var l;(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"})(l||(l={}));var Ps=["var","let","as","null","undefined","true","false","if","else","this"],yt=class{tokenize(t){let e=new Vt(t),s=[],i=e.scanToken();for(;i!=null;)s.push(i),i=e.scanToken();return s}},I=class{constructor(t,e,s,i,n){this.index=t,this.end=e,this.type=s,this.numValue=i,this.strValue=n}isCharacter(t){return this.type==l.Character&&this.numValue==t}isNumber(){return this.type==l.Number}isString(){return this.type==l.String}isOperator(t){return this.type==l.Operator&&this.strValue==t}isIdentifier(){return this.type==l.Identifier}isPrivateIdentifier(){return this.type==l.PrivateIdentifier}isKeyword(){return this.type==l.Keyword}isKeywordLet(){return this.type==l.Keyword&&this.strValue=="let"}isKeywordAs(){return this.type==l.Keyword&&this.strValue=="as"}isKeywordNull(){return this.type==l.Keyword&&this.strValue=="null"}isKeywordUndefined(){return this.type==l.Keyword&&this.strValue=="undefined"}isKeywordTrue(){return this.type==l.Keyword&&this.strValue=="true"}isKeywordFalse(){return this.type==l.Keyword&&this.strValue=="false"}isKeywordThis(){return this.type==l.Keyword&&this.strValue=="this"}isError(){return this.type==l.Error}toNumber(){return this.type==l.Number?this.numValue:-1}toString(){switch(this.type){case l.Character:case l.Identifier:case l.Keyword:case l.Operator:case l.PrivateIdentifier:case l.String:case l.Error:return this.strValue;case l.Number:return this.numValue.toString();default:return null}}};function ge(r,t,e){return new I(r,t,l.Character,e,String.fromCharCode(e))}function bs(r,t,e){return new I(r,t,l.Identifier,0,e)}function Ks(r,t,e){return new I(r,t,l.PrivateIdentifier,0,e)}function Bs(r,t,e){return new I(r,t,l.Keyword,0,e)}function Gt(r,t,e){return new I(r,t,l.Operator,0,e)}function Ts(r,t,e){return new I(r,t,l.String,0,e)}function Ms(r,t,e){return new I(r,t,l.Number,e,"")}function _s(r,t,e){return new I(r,t,l.Error,0,e)}var Bt=new I(-1,-1,l.Character,0,""),Vt=class{constructor(t){this.input=t,this.peek=0,this.index=-1,this.length=t.length,this.advance()}advance(){this.peek=++this.index>=this.length?0:this.input.charCodeAt(this.index)}scanToken(){let t=this.input,e=this.length,s=this.peek,i=this.index;for(;s<=32;)if(++i>=e){s=0;break}else s=t.charCodeAt(i);if(this.peek=s,this.index=i,i>=e)return null;if(me(s))return this.scanIdentifier();if(B(s))return this.scanNumber(i);let n=i;switch(s){case 46:return this.advance(),B(this.peek)?this.scanNumber(n):ge(n,this.index,46);case 40:case 41:case 123:case 125:case 91:case 93:case 44:case 58:case 59:return this.scanCharacter(n,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(n,String.fromCharCode(s));case 63:return this.scanQuestion(n);case 60:case 62:return this.scanComplexOperator(n,String.fromCharCode(s),61,"=");case 33:case 61:return this.scanComplexOperator(n,String.fromCharCode(s),61,"=",61,"=");case 38:return this.scanComplexOperator(n,"&",38,"&");case 124:return this.scanComplexOperator(n,"|",124,"|");case 160:for(;ue(this.peek);)this.advance();return this.scanToken()}return this.advance(),this.error(`Unexpected character [${String.fromCharCode(s)}]`,0)}scanCharacter(t,e){return this.advance(),ge(t,this.index,e)}scanOperator(t,e){return this.advance(),Gt(t,this.index,e)}scanComplexOperator(t,e,s,i,n,a){this.advance();let o=e;return this.peek==s&&(this.advance(),o+=i),n!=null&&this.peek==n&&(this.advance(),o+=a),Gt(t,this.index,o)}scanIdentifier(){let t=this.index;for(this.advance();Se(this.peek);)this.advance();let e=this.input.substring(t,this.index);return Ps.indexOf(e)>-1?Bs(t,this.index,e):bs(t,this.index,e)}scanPrivateIdentifier(){let t=this.index;if(this.advance(),!me(this.peek))return this.error("Invalid character [#]",-1);for(;Se(this.peek);)this.advance();let e=this.input.substring(t,this.index);return Ks(t,this.index,e)}scanNumber(t){let e=this.index===t,s=!1;for(this.advance();;){if(!B(this.peek))if(this.peek===95){if(!B(this.input.charCodeAt(this.index-1))||!B(this.input.charCodeAt(this.index+1)))return this.error("Invalid numeric separator",0);s=!0}else if(this.peek===46)e=!1;else if(Us(this.peek)){if(this.advance(),Fs(this.peek)&&this.advance(),!B(this.peek))return this.error("Invalid exponent",-1);e=!1}else break;this.advance()}let i=this.input.substring(t,this.index);s&&(i=i.replace(/_/g,""));let n=e?Ws(i):parseFloat(i);return Ms(t,this.index,n)}scanString(){let t=this.index,e=this.peek;this.advance();let s="",i=this.index,n=this.input;for(;this.peek!=e;)if(this.peek==92){s+=n.substring(i,this.index);let o;if(this.advance(),this.peek==117){let p=n.substring(this.index+1,this.index+5);if(/^[0-9a-f]+$/i.test(p))o=parseInt(p,16);else return this.error(`Invalid unicode escape [\\u${p}]`,0);for(let u=0;u<5;u++)this.advance()}else o=Ds(this.peek),this.advance();s+=String.fromCharCode(o),i=this.index}else{if(this.peek==0)return this.error("Unterminated quote",0);this.advance()}let a=n.substring(i,this.index);return this.advance(),Ts(t,this.index,s+a)}scanQuestion(t){this.advance();let e="?";return(this.peek===63||this.peek===46)&&(e+=this.peek===46?".":"?",this.advance()),Gt(t,this.index,e)}error(t,e){let s=this.index+e;return _s(s,this.index,`Lexer Error: ${t} at column ${s} in expression [${this.input}]`)}};function me(r){return 97<=r&&r<=122||65<=r&&r<=90||r==95||r==36}function Se(r){return le(r)||B(r)||r==95||r==36}function Us(r){return r==101||r==69}function Fs(r){return r==45||r==43}function Ds(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 Ws(r){let t=parseInt(r);if(isNaN(t))throw new Error("Invalid integer literal when parsing "+r);return t}var Gs=[/@/,/^\s*$/,/[<>]/,/^[{}]$/,/&(#|[a-z])/i,/^\/\//];function Ee(r,t){if(t!=null&&!(Array.isArray(t)&&t.length==2))throw new Error(`Expected '${r}' to be an array, [start, end].`);if(t!=null){let e=t[0],s=t[1];Gs.forEach(i=>{if(i.test(e)||i.test(s))throw new Error(`['${e}', '${s}'] contains unusable interpolation symbol.`)})}}var zt=class r{static fromArray(t){return t?(Ee("interpolation",t),new r(t[0],t[1])):Q}constructor(t,e){this.start=t,this.end=e}},Q=new zt("{{","}}");var qt=class{constructor(t,e,s){this.strings=t,this.expressions=e,this.offsets=s}},Ht=class{constructor(t,e,s){this.templateBindings=t,this.warnings=e,this.errors=s}},mt=class{constructor(t){this._lexer=t,this.errors=[]}parseAction(t,e,s,i=Q){this._checkNoInterpolation(t,e,i);let n=this._stripComments(t),a=this._lexer.tokenize(n),o=new z(t,e,s,a,1,this.errors,0).parseChain();return new R(o,t,e,s,this.errors)}parseBinding(t,e,s,i=Q){let n=this._parseBindingAst(t,e,s,i);return new R(n,t,e,s,this.errors)}checkSimpleExpression(t){let e=new jt;return t.visit(e),e.errors}parseSimpleBinding(t,e,s,i=Q){let n=this._parseBindingAst(t,e,s,i),a=this.checkSimpleExpression(n);return a.length>0&&this._reportError(`Host binding expression cannot contain ${a.join(" ")}`,t,e),new R(n,t,e,s,this.errors)}_reportError(t,e,s,i){this.errors.push(new Z(t,e,s,i))}_parseBindingAst(t,e,s,i){this._checkNoInterpolation(t,e,i);let n=this._stripComments(t),a=this._lexer.tokenize(n);return new z(t,e,s,a,0,this.errors,0).parseChain()}parseTemplateBindings(t,e,s,i,n){let a=this._lexer.tokenize(e);return new z(e,s,n,a,0,this.errors,0).parseTemplateBindings({source:t,span:new L(i,i+t.length)})}parseInterpolation(t,e,s,i,n=Q){let{strings:a,expressions:o,offsets:p}=this.splitInterpolation(t,e,i,n);if(o.length===0)return null;let u=[];for(let f=0;f<o.length;++f){let S=o[f].text,g=this._stripComments(S),y=this._lexer.tokenize(g),w=new z(t,e,s,y,0,this.errors,p[f]).parseChain();u.push(w)}return this.createInterpolationAst(a.map(f=>f.text),u,t,e,s)}parseInterpolationExpression(t,e,s){let i=this._stripComments(t),n=this._lexer.tokenize(i),a=new z(t,e,s,n,0,this.errors,0).parseChain(),o=["",""];return this.createInterpolationAst(o,[a],t,e,s)}createInterpolationAst(t,e,s,i,n){let a=new b(0,s.length),o=new ot(a,a.toAbsolute(n),t,e);return new R(o,s,i,n,this.errors)}splitInterpolation(t,e,s,i=Q){let n=[],a=[],o=[],p=s?Vs(s):null,u=0,f=!1,S=!1,{start:g,end:y}=i;for(;u<t.length;)if(f){let w=u,H=w+g.length,j=this._getInterpolationEndIndex(t,y,H);if(j===-1){f=!1,S=!0;break}let T=j+y.length,Nt=t.substring(H,j);Nt.trim().length===0&&this._reportError("Blank expressions are not allowed in interpolated strings",t,`at column ${u} in`,e),a.push({text:Nt,start:w,end:T});let Ze=((p==null?void 0:p.get(w))??w)+g.length;o.push(Ze),u=T,f=!1}else{let w=u;u=t.indexOf(g,u),u===-1&&(u=t.length);let H=t.substring(w,u);n.push({text:H,start:w,end:u}),f=!0}if(!f)if(S){let w=n[n.length-1];w.text+=t.substring(u),w.end=t.length}else n.push({text:t.substring(u),start:u,end:t.length});return new qt(n,a,o)}wrapLiteralPrimitive(t,e,s){let i=new b(0,t==null?0:t.length);return new R(new E(i,i.toAbsolute(s),t),t,e,s,this.errors)}_stripComments(t){let e=this._commentStart(t);return e!=null?t.substring(0,e):t}_commentStart(t){let e=null;for(let s=0;s<t.length-1;s++){let i=t.charCodeAt(s),n=t.charCodeAt(s+1);if(i===47&&n==47&&e==null)return s;e===i?e=null:e==null&&Dt(i)&&(e=i)}return null}_checkNoInterpolation(t,e,{start:s,end:i}){let n=-1,a=-1;for(let o of this._forEachUnquotedChar(t,0))if(n===-1)t.startsWith(s)&&(n=o);else if(a=this._getInterpolationEndIndex(t,i,o),a>-1)break;n>-1&&a>-1&&this._reportError(`Got interpolation (${s}${i}) where expression was expected`,t,`at column ${n} in`,e)}_getInterpolationEndIndex(t,e,s){for(let i of this._forEachUnquotedChar(t,s)){if(t.startsWith(e,i))return i;if(t.startsWith("//",i))return t.indexOf(e,i)}return-1}*_forEachUnquotedChar(t,e){let s=null,i=0;for(let n=e;n<t.length;n++){let a=t[n];Dt(t.charCodeAt(n))&&(s===null||s===a)&&i%2===0?s=s===null?a:null:s===null&&(yield n),i=a==="\\"?i+1:0}}},gt;(function(r){r[r.None=0]="None",r[r.Writable=1]="Writable"})(gt||(gt={}));var z=class{constructor(t,e,s,i,n,a,o){this.input=t,this.location=e,this.absoluteOffset=s,this.tokens=i,this.parseFlags=n,this.errors=a,this.offset=o,this.rparensExpected=0,this.rbracketsExpected=0,this.rbracesExpected=0,this.context=gt.None,this.sourceSpanCache=new Map,this.index=0}peek(t){let e=this.index+t;return e<this.tokens.length?this.tokens[e]:Bt}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(t,e){let s=this.currentEndIndex;if(e!==void 0&&e>this.currentEndIndex&&(s=e),t>s){let i=s;s=t,t=i}return new b(t,s)}sourceSpan(t,e){let s=`${t}@${this.inputIndex}:${e}`;return this.sourceSpanCache.has(s)||this.sourceSpanCache.set(s,this.span(t,e).toAbsolute(this.absoluteOffset)),this.sourceSpanCache.get(s)}advance(){this.index++}withContext(t,e){this.context|=t;let s=e();return this.context^=t,s}consumeOptionalCharacter(t){return this.next.isCharacter(t)?(this.advance(),!0):!1}peekKeywordLet(){return this.next.isKeywordLet()}peekKeywordAs(){return this.next.isKeywordAs()}expectCharacter(t){this.consumeOptionalCharacter(t)||this.error(`Missing expected ${String.fromCharCode(t)}`)}consumeOptionalOperator(t){return this.next.isOperator(t)?(this.advance(),!0):!1}expectOperator(t){this.consumeOptionalOperator(t)||this.error(`Missing expected operator ${t}`)}prettyPrintToken(t){return t===Bt?"end of input":`token ${t}`}expectIdentifierOrKeyword(){let t=this.next;return!t.isIdentifier()&&!t.isKeyword()?(t.isPrivateIdentifier()?this._reportErrorForPrivateIdentifier(t,"expected identifier or keyword"):this.error(`Unexpected ${this.prettyPrintToken(t)}, expected identifier or keyword`),null):(this.advance(),t.toString())}expectIdentifierOrKeywordOrString(){let t=this.next;return!t.isIdentifier()&&!t.isKeyword()&&!t.isString()?(t.isPrivateIdentifier()?this._reportErrorForPrivateIdentifier(t,"expected identifier, keyword or string"):this.error(`Unexpected ${this.prettyPrintToken(t)}, expected identifier, keyword, or string`),""):(this.advance(),t.toString())}parseChain(){let t=[],e=this.inputIndex;for(;this.index<this.tokens.length;){let s=this.parsePipe();if(t.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 i=this.index;if(this.error(`Unexpected token '${this.next}'`),this.index===i)break}}if(t.length===0){let s=this.offset,i=this.offset+this.input.length;return new $(this.span(s,i),this.sourceSpan(s,i))}return t.length==1?t[0]:new X(this.span(e),this.sourceSpan(e),t)}parsePipe(){let t=this.inputIndex,e=this.parseExpression();if(this.consumeOptionalOperator("|")){this.parseFlags&1&&this.error("Cannot have a pipe in an action expression");do{let s=this.inputIndex,i=this.expectIdentifierOrKeyword(),n,a;i!==null?n=this.sourceSpan(s):(i="",a=this.next.index!==-1?this.next.index:this.input.length+this.offset,n=new b(a,a).toAbsolute(this.absoluteOffset));let o=[];for(;this.consumeOptionalCharacter(58);)o.push(this.parseExpression());e=new it(this.span(t),this.sourceSpan(t,a),e,i,o,n)}while(this.consumeOptionalOperator("|"))}return e}parseExpression(){return this.parseConditional()}parseConditional(){let t=this.inputIndex,e=this.parseLogicalOr();if(this.consumeOptionalOperator("?")){let s=this.parsePipe(),i;if(this.consumeOptionalCharacter(58))i=this.parsePipe();else{let n=this.inputIndex,a=this.input.substring(t,n);this.error(`Conditional expression ${a} requires all 3 expressions`),i=new $(this.span(t),this.sourceSpan(t))}return new tt(this.span(t),this.sourceSpan(t),e,s,i)}else return e}parseLogicalOr(){let t=this.inputIndex,e=this.parseLogicalAnd();for(;this.consumeOptionalOperator("||");){let s=this.parseLogicalAnd();e=new A(this.span(t),this.sourceSpan(t),"||",e,s)}return e}parseLogicalAnd(){let t=this.inputIndex,e=this.parseNullishCoalescing();for(;this.consumeOptionalOperator("&&");){let s=this.parseNullishCoalescing();e=new A(this.span(t),this.sourceSpan(t),"&&",e,s)}return e}parseNullishCoalescing(){let t=this.inputIndex,e=this.parseEquality();for(;this.consumeOptionalOperator("??");){let s=this.parseEquality();e=new A(this.span(t),this.sourceSpan(t),"??",e,s)}return e}parseEquality(){let t=this.inputIndex,e=this.parseRelational();for(;this.next.type==l.Operator;){let s=this.next.strValue;switch(s){case"==":case"===":case"!=":case"!==":this.advance();let i=this.parseRelational();e=new A(this.span(t),this.sourceSpan(t),s,e,i);continue}break}return e}parseRelational(){let t=this.inputIndex,e=this.parseAdditive();for(;this.next.type==l.Operator;){let s=this.next.strValue;switch(s){case"<":case">":case"<=":case">=":this.advance();let i=this.parseAdditive();e=new A(this.span(t),this.sourceSpan(t),s,e,i);continue}break}return e}parseAdditive(){let t=this.inputIndex,e=this.parseMultiplicative();for(;this.next.type==l.Operator;){let s=this.next.strValue;switch(s){case"+":case"-":this.advance();let i=this.parseMultiplicative();e=new A(this.span(t),this.sourceSpan(t),s,e,i);continue}break}return e}parseMultiplicative(){let t=this.inputIndex,e=this.parsePrefix();for(;this.next.type==l.Operator;){let s=this.next.strValue;switch(s){case"*":case"%":case"/":this.advance();let i=this.parsePrefix();e=new A(this.span(t),this.sourceSpan(t),s,e,i);continue}break}return e}parsePrefix(){if(this.next.type==l.Operator){let t=this.inputIndex,e=this.next.strValue,s;switch(e){case"+":return this.advance(),s=this.parsePrefix(),F.createPlus(this.span(t),this.sourceSpan(t),s);case"-":return this.advance(),s=this.parsePrefix(),F.createMinus(this.span(t),this.sourceSpan(t),s);case"!":return this.advance(),s=this.parsePrefix(),new ct(this.span(t),this.sourceSpan(t),s)}}return this.parseCallChain()}parseCallChain(){let t=this.inputIndex,e=this.parsePrimary();for(;;)if(this.consumeOptionalCharacter(46))e=this.parseAccessMember(e,t,!1);else if(this.consumeOptionalOperator("?."))this.consumeOptionalCharacter(40)?e=this.parseCall(e,t,!0):e=this.consumeOptionalCharacter(91)?this.parseKeyedReadOrWrite(e,t,!0):this.parseAccessMember(e,t,!0);else if(this.consumeOptionalCharacter(91))e=this.parseKeyedReadOrWrite(e,t,!1);else if(this.consumeOptionalCharacter(40))e=this.parseCall(e,t,!1);else if(this.consumeOptionalOperator("!"))e=new ht(this.span(t),this.sourceSpan(t),e);else return e}parsePrimary(){let t=this.inputIndex;if(this.consumeOptionalCharacter(40)){this.rparensExpected++;let e=this.parsePipe();return this.rparensExpected--,this.expectCharacter(41),e}else{if(this.next.isKeywordNull())return this.advance(),new E(this.span(t),this.sourceSpan(t),null);if(this.next.isKeywordUndefined())return this.advance(),new E(this.span(t),this.sourceSpan(t),void 0);if(this.next.isKeywordTrue())return this.advance(),new E(this.span(t),this.sourceSpan(t),!0);if(this.next.isKeywordFalse())return this.advance(),new E(this.span(t),this.sourceSpan(t),!1);if(this.next.isKeywordThis())return this.advance(),new Lt(this.span(t),this.sourceSpan(t));if(this.consumeOptionalCharacter(91)){this.rbracketsExpected++;let e=this.parseExpressionList(93);return this.rbracketsExpected--,this.expectCharacter(93),new nt(this.span(t),this.sourceSpan(t),e)}else{if(this.next.isCharacter(123))return this.parseLiteralMap();if(this.next.isIdentifier())return this.parseAccessMember(new K(this.span(t),this.sourceSpan(t)),t,!1);if(this.next.isNumber()){let e=this.next.toNumber();return this.advance(),new E(this.span(t),this.sourceSpan(t),e)}else if(this.next.isString()){let e=this.next.toString();return this.advance(),new E(this.span(t),this.sourceSpan(t),e)}else return this.next.isPrivateIdentifier()?(this._reportErrorForPrivateIdentifier(this.next,null),new $(this.span(t),this.sourceSpan(t))):this.index>=this.tokens.length?(this.error(`Unexpected end of expression: ${this.input}`),new $(this.span(t),this.sourceSpan(t))):(this.error(`Unexpected token ${this.next}`),new $(this.span(t),this.sourceSpan(t)))}}}parseExpressionList(t){let e=[];do if(!this.next.isCharacter(t))e.push(this.parsePipe());else break;while(this.consumeOptionalCharacter(44));return e}parseLiteralMap(){let t=[],e=[],s=this.inputIndex;if(this.expectCharacter(123),!this.consumeOptionalCharacter(125)){this.rbracesExpected++;do{let i=this.inputIndex,n=this.next.isString(),a=this.expectIdentifierOrKeywordOrString();if(t.push({key:a,quoted:n}),n)this.expectCharacter(58),e.push(this.parsePipe());else if(this.consumeOptionalCharacter(58))e.push(this.parsePipe());else{let o=this.span(i),p=this.sourceSpan(i);e.push(new M(o,p,p,new K(o,p),a))}}while(this.consumeOptionalCharacter(44)&&!this.next.isCharacter(125));this.rbracesExpected--,this.expectCharacter(125)}return new at(this.span(s),this.sourceSpan(s),t,e)}parseAccessMember(t,e,s){let i=this.inputIndex,n=this.withContext(gt.Writable,()=>{let p=this.expectIdentifierOrKeyword()??"";return p.length===0&&this.error("Expected identifier for property access",t.span.end),p}),a=this.sourceSpan(i),o;if(s)this.consumeOptionalOperator("=")?(this.error("The '?.' operator cannot be used in the assignment"),o=new $(this.span(e),this.sourceSpan(e))):o=new _(this.span(e),this.sourceSpan(e),a,t,n);else if(this.consumeOptionalOperator("=")){if(!(this.parseFlags&1))return this.error("Bindings cannot contain assignments"),new $(this.span(e),this.sourceSpan(e));let p=this.parseConditional();o=new et(this.span(e),this.sourceSpan(e),a,t,n,p)}else o=new M(this.span(e),this.sourceSpan(e),a,t,n);return o}parseCall(t,e,s){let i=this.inputIndex;this.rparensExpected++;let n=this.parseCallArguments(),a=this.span(i,this.inputIndex).toAbsolute(this.absoluteOffset);this.expectCharacter(41),this.rparensExpected--;let o=this.span(e),p=this.sourceSpan(e);return s?new D(o,p,t,n,a):new pt(o,p,t,n,a)}parseCallArguments(){if(this.next.isCharacter(41))return[];let t=[];do t.push(this.parsePipe());while(this.consumeOptionalCharacter(44));return t}expectTemplateBindingKey(){let t="",e=!1,s=this.currentAbsoluteOffset;do t+=this.expectIdentifierOrKeywordOrString(),e=this.consumeOptionalOperator("-"),e&&(t+="-");while(e);return{source:t,span:new L(s,s+t.length)}}parseTemplateBindings(t){let e=[];for(e.push(...this.parseDirectiveKeywordBindings(t));this.index<this.tokens.length;){let s=this.parseLetBinding();if(s)e.push(s);else{let i=this.expectTemplateBindingKey(),n=this.parseAsBinding(i);n?e.push(n):(i.source=t.source+i.source.charAt(0).toUpperCase()+i.source.substring(1),e.push(...this.parseDirectiveKeywordBindings(i)))}this.consumeStatementTerminator()}return new Ht(e,[],this.errors)}parseKeyedReadOrWrite(t,e,s){return this.withContext(gt.Writable,()=>{this.rbracketsExpected++;let i=this.parsePipe();if(i 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 n=this.parseConditional();return new rt(this.span(e),this.sourceSpan(e),t,i,n)}else return s?new U(this.span(e),this.sourceSpan(e),t,i):new st(this.span(e),this.sourceSpan(e),t,i);return new $(this.span(e),this.sourceSpan(e))})}parseDirectiveKeywordBindings(t){let e=[];this.consumeOptionalCharacter(58);let s=this.getDirectiveBoundTarget(),i=this.currentAbsoluteOffset,n=this.parseAsBinding(t);n||(this.consumeStatementTerminator(),i=this.currentAbsoluteOffset);let a=new L(t.span.start,i);return e.push(new ut(a,t,s)),n&&e.push(n),e}getDirectiveBoundTarget(){if(this.next===Bt||this.peekKeywordAs()||this.peekKeywordLet())return null;let t=this.parsePipe(),{start:e,end:s}=t.span,i=this.input.substring(e,s);return new R(t,i,this.location,this.absoluteOffset+e,this.errors)}parseAsBinding(t){if(!this.peekKeywordAs())return null;this.advance();let e=this.expectTemplateBindingKey();this.consumeStatementTerminator();let s=new L(t.span.start,this.currentAbsoluteOffset);return new W(s,e,t)}parseLetBinding(){if(!this.peekKeywordLet())return null;let t=this.currentAbsoluteOffset;this.advance();let e=this.expectTemplateBindingKey(),s=null;this.consumeOptionalOperator("=")&&(s=this.expectTemplateBindingKey()),this.consumeStatementTerminator();let i=new L(t,this.currentAbsoluteOffset);return new W(i,e,s)}consumeStatementTerminator(){this.consumeOptionalCharacter(59)||this.consumeOptionalCharacter(44)}error(t,e=null){this.errors.push(new Z(t,this.input,this.locationText(e),this.location)),this.skip()}locationText(t=null){return t==null&&(t=this.index),t<this.tokens.length?`at column ${this.tokens[t].index+1} in`:"at the end of the expression"}_reportErrorForPrivateIdentifier(t,e){let s=`Private identifiers are not supported. Unexpected private identifier: ${t}`;e!==null&&(s+=`, ${e}`),this.error(s)}skip(){let t=this.next;for(;this.index<this.tokens.length&&!t.isCharacter(59)&&!t.isOperator("|")&&(this.rparensExpected<=0||!t.isCharacter(41))&&(this.rbracesExpected<=0||!t.isCharacter(125))&&(this.rbracketsExpected<=0||!t.isCharacter(93))&&(!(this.context&gt.Writable)||!t.isOperator("="));)this.next.isError()&&this.errors.push(new Z(this.next.toString(),this.input,this.locationText(),this.location)),this.advance(),t=this.next}},jt=class extends Rt{constructor(){super(...arguments),this.errors=[]}visitPipe(){this.errors.push("pipes")}};function Vs(r){let t=new Map,e=0,s=0,i=0;for(;i<r.length;){let n=r[i];if(n.type===9){let[a,o]=n.parts;e+=o.length,s+=a.length}else{let a=n.parts.reduce((o,p)=>o+p.length,0);s+=a,e+=a}t.set(s,e),i++}return t}function Ce({start:r,end:t},e){let s=r,i=t;for(;i!==s&&/\s/.test(e[i-1]);)i--;for(;s!==i&&/\s/.test(e[s]);)s++;return{start:s,end:i}}function zs({start:r,end:t},e){let s=r,i=t;for(;i!==e.length&&/\s/.test(e[i]);)i++;for(;s!==0&&/\s/.test(e[s-1]);)s--;return{start:s,end:i}}function qs(r,t){return t[r.start-1]==="("&&t[r.end]===")"?{start:r.start-1,end:r.end+1}:r}function Ae(r,t,e){let s=0,i={start:r.start,end:r.end};for(;;){let n=zs(i,t),a=qs(n,t);if(n.start===a.start&&n.end===a.end)break;i.start=a.start,i.end=a.end,s++}return{hasParens:(e?s-1:s)!==0,outerSpan:Ce(e?{start:i.start+1,end:i.end-1}:i,t),innerSpan:Ce(r,t)}}function Oe(r){return typeof r=="string"?t=>t===r:t=>r.test(t)}function Ie(r,t,e){let s=Oe(t);for(let i=e;i>=0;i--){let n=r[i];if(s(n))return i}throw new Error(`Cannot find front char ${t} from index ${e} in ${JSON.stringify(r)}`)}function ke(r,t,e){let s=Oe(t);for(let i=e;i<r.length;i++){let n=r[i];if(s(n))return i}throw new Error(`Cannot find character ${t} from index ${e} in ${JSON.stringify(r)}`)}function Ne(r){return r.slice(0,1).toLowerCase()+r.slice(1)}function Ct(r){let{start:t,end:e}=r;return{start:t,end:e,range:[t,e]}}var Hs=r=>mt.prototype._commentStart(r);function js(r,t){let e=t?Hs(r):null;if(e===null)return{text:r,comments:[]};let s={type:"CommentLine",value:r.slice(e+2),...Ct({start:e,end:r.length})};return{text:r.slice(0,e),comments:[s]}}function At(r,t=!0){return e=>{let s=new yt,i=new mt(s),{text:n,comments:a}=js(e,t),o=r(n,i);if(o.errors.length!==0){let[{message:p}]=o.errors;throw new SyntaxError(p.replace(/^Parser Error: | at column \d+ in [^]*$/g,""))}return{result:o,comments:a,text:n}}}var Le=At((r,t)=>t.parseBinding(r,"",0)),Ys=At((r,t)=>t.parseSimpleBinding(r,"",0)),Re=At((r,t)=>t.parseAction(r,"",0)),Pe=At((r,t)=>t.parseInterpolationExpression(r,"",0)),be=At((r,t)=>t.parseTemplateBindings("",r,"",0,0),!1);var Js=(r,t,e)=>{if(!(r&&t==null))return Array.isArray(t)||typeof t=="string"?t[e<0?t.length+e:e]:t.at(e)},Tt=Js;var Yt=class{text;constructor(t){this.text=t}getCharacterIndex(t,e){return ke(this.text,t,e)}getCharacterLastIndex(t,e){return Ie(this.text,t,e)}transformSpan(t,{stripSpaces:e=!1,hasParentParens:s=!1}={}){if(!e)return Ct(t);let{outerSpan:i,innerSpan:n,hasParens:a}=Ae(t,this.text,s),o=Ct(n);return a&&(o.extra={parenthesized:!0,parenStart:i.start,parenEnd:i.end}),o}createNode(t,{stripSpaces:e=!0,hasParentParens:s=!1}={}){let{type:i,start:n,end:a}=t,o={...t,...this.transformSpan({start:n,end:a},{stripSpaces:e,hasParentParens:s})};switch(i){case"NumericLiteral":case"StringLiteral":{let p=this.text.slice(o.start,o.end),{value:u}=o;o.extra={...o.extra,raw:p,rawValue:u};break}case"ObjectProperty":{let{shorthand:p}=o;p&&(o.extra={...o.extra,shorthand:p});break}}return o}},Ke=Yt;function Jt(r){var t;return!!((t=r.extra)!=null&&t.parenthesized)}function k(r){return Jt(r)?r.extra.parenStart:r.start}function N(r){return Jt(r)?r.extra.parenEnd:r.end}function Be(r){return(r.type==="OptionalCallExpression"||r.type==="OptionalMemberExpression")&&!Jt(r)}function Te(r,t){let{start:e,end:s}=r.sourceSpan;return e>=s||/^\s+$/.test(t.slice(e,s))}var kt,St,h,d,Ot,v,Zt,It=class extends Ke{constructor(e,s){super(s);P(this,h);P(this,kt);P(this,St);Y(this,kt,e),Y(this,St,s)}get node(){return c(this,h,v).call(this,O(this,kt))}transformNode(e){return c(this,h,Zt).call(this,e)}};kt=new WeakMap,St=new WeakMap,h=new WeakSet,d=function(e,{stripSpaces:s=!0,hasParentParens:i=!1}={}){return this.createNode(e,{stripSpaces:s,hasParentParens:i})},Ot=function(e,s,{computed:i,optional:n,end:a=N(s),hasParentParens:o=!1}){if(Te(e,O(this,St))||e.sourceSpan.start===s.start)return s;let p=c(this,h,v).call(this,e),u=Be(p);return c(this,h,d).call(this,{type:n||u?"OptionalMemberExpression":"MemberExpression",object:p,property:s,computed:i,...n?{optional:!0}:u?{optional:!1}:void 0,start:k(p),end:a},{hasParentParens:o})},v=function(e,s=!1){return c(this,h,Zt).call(this,e,s)},Zt=function(e,s=!1){if(e instanceof ot){let{expressions:i}=e;if(i.length!==1)throw new Error("Unexpected 'Interpolation'");return c(this,h,v).call(this,i[0])}if(e instanceof F)return c(this,h,d).call(this,{type:"UnaryExpression",prefix:!0,argument:c(this,h,v).call(this,e.expr),operator:e.operator,...e.sourceSpan},{hasParentParens:s});if(e instanceof A){let{left:i,operation:n,right:a}=e,o=c(this,h,v).call(this,i),p=c(this,h,v).call(this,a),u=k(o),f=N(p),S={left:o,right:p,start:u,end:f};return n==="&&"||n==="||"||n==="??"?c(this,h,d).call(this,{...S,type:"LogicalExpression",operator:n},{hasParentParens:s}):c(this,h,d).call(this,{...S,type:"BinaryExpression",operator:n},{hasParentParens:s})}if(e instanceof it){let{exp:i,name:n,args:a}=e,o=c(this,h,v).call(this,i),p=k(o),u=N(o),f=this.getCharacterIndex(/\S/,this.getCharacterIndex("|",u)+1),S=c(this,h,d).call(this,{type:"Identifier",name:n,start:f,end:f+n.length}),g=a.map(y=>c(this,h,v).call(this,y));return c(this,h,d).call(this,{type:"NGPipeExpression",left:o,right:S,arguments:g,start:p,end:N(g.length===0?S:Tt(!1,g,-1))},{hasParentParens:s})}if(e instanceof X)return c(this,h,d).call(this,{type:"NGChainedExpression",expressions:e.expressions.map(i=>c(this,h,v).call(this,i)),...e.sourceSpan},{hasParentParens:s});if(e instanceof tt){let{condition:i,trueExp:n,falseExp:a}=e,o=c(this,h,v).call(this,i),p=c(this,h,v).call(this,n),u=c(this,h,v).call(this,a);return c(this,h,d).call(this,{type:"ConditionalExpression",test:o,consequent:p,alternate:u,start:k(o),end:N(u)},{hasParentParens:s})}if(e instanceof $)return c(this,h,d).call(this,{type:"NGEmptyExpression",...e.sourceSpan},{hasParentParens:s});if(e instanceof K)return c(this,h,d).call(this,{type:"ThisExpression",...e.sourceSpan},{hasParentParens:s});if(e instanceof st||e instanceof U)return c(this,h,Ot).call(this,e.receiver,c(this,h,v).call(this,e.key),{computed:!0,optional:e instanceof U,end:e.sourceSpan.end,hasParentParens:s});if(e instanceof nt)return c(this,h,d).call(this,{type:"ArrayExpression",elements:e.expressions.map(i=>c(this,h,v).call(this,i)),...e.sourceSpan},{hasParentParens:s});if(e instanceof at){let{keys:i,values:n}=e,a=n.map(p=>c(this,h,v).call(this,p)),o=i.map(({key:p,quoted:u},f)=>{let S=a[f],g=k(S),y=N(S),w=this.getCharacterIndex(/\S/,f===0?e.sourceSpan.start+1:this.getCharacterIndex(",",N(a[f-1]))+1),H=g===w?y:this.getCharacterLastIndex(/\S/,this.getCharacterLastIndex(":",g-1)-1)+1,j={start:w,end:H},T=u?c(this,h,d).call(this,{type:"StringLiteral",value:p,...j}):c(this,h,d).call(this,{type:"Identifier",name:p,...j}),Nt=T.end<T.start||w===g;return c(this,h,d).call(this,{type:"ObjectProperty",key:T,value:S,shorthand:Nt,computed:!1,start:k(T),end:y})});return c(this,h,d).call(this,{type:"ObjectExpression",properties:o,...e.sourceSpan},{hasParentParens:s})}if(e instanceof E){let{value:i}=e;switch(typeof i){case"boolean":return c(this,h,d).call(this,{type:"BooleanLiteral",value:i,...e.sourceSpan},{hasParentParens:s});case"number":return c(this,h,d).call(this,{type:"NumericLiteral",value:i,...e.sourceSpan},{hasParentParens:s});case"object":return c(this,h,d).call(this,{type:"NullLiteral",...e.sourceSpan},{hasParentParens:s});case"string":return c(this,h,d).call(this,{type:"StringLiteral",value:i,...e.sourceSpan},{hasParentParens:s});case"undefined":return c(this,h,d).call(this,{type:"Identifier",name:"undefined",...e.sourceSpan},{hasParentParens:s});default:throw new Error(`Unexpected LiteralPrimitive value type ${typeof i}`)}}if(e instanceof pt||e instanceof D){let i=e instanceof D,{receiver:n,args:a}=e,o=a.length===1?[c(this,h,v).call(this,a[0],!0)]:a.map(S=>c(this,h,v).call(this,S)),p=c(this,h,v).call(this,n),u=Be(p),f=i||u?"OptionalCallExpression":"CallExpression";return c(this,h,d).call(this,{type:f,callee:p,arguments:o,optional:f==="OptionalCallExpression"?i:void 0,start:k(p),end:e.sourceSpan.end},{hasParentParens:s})}if(e instanceof ht){let i=c(this,h,v).call(this,e.expression);return c(this,h,d).call(this,{type:"TSNonNullExpression",expression:i,start:k(i),end:e.sourceSpan.end},{hasParentParens:s})}if(e instanceof ct){let i=c(this,h,v).call(this,e.expression);return c(this,h,d).call(this,{type:"UnaryExpression",prefix:!0,operator:"!",argument:i,start:e.sourceSpan.start,end:N(i)},{hasParentParens:s})}if(e instanceof M||e instanceof _){let{receiver:i,name:n}=e,a=this.getCharacterLastIndex(/\S/,e.sourceSpan.end-1)+1,o=c(this,h,d).call(this,{type:"Identifier",name:n,start:a-n.length,end:a},Te(i,O(this,St))?{hasParentParens:s}:{});return c(this,h,Ot).call(this,i,o,{computed:!1,optional:e instanceof _,hasParentParens:s})}if(e instanceof rt){let i=c(this,h,v).call(this,e.key),n=c(this,h,v).call(this,e.value),a=c(this,h,Ot).call(this,e.receiver,i,{computed:!0,optional:!1,end:this.getCharacterIndex("]",N(i))+1});return c(this,h,d).call(this,{type:"AssignmentExpression",left:a,operator:"=",right:n,start:k(a),end:N(n)},{hasParentParens:s})}if(e instanceof et){let{receiver:i,name:n,value:a}=e,o=c(this,h,v).call(this,a),p=this.getCharacterLastIndex(/\S/,this.getCharacterLastIndex("=",k(o)-1)-1)+1,u=c(this,h,d).call(this,{type:"Identifier",name:n,start:p-n.length,end:p}),f=c(this,h,Ot).call(this,i,u,{computed:!1,optional:!1});return c(this,h,d).call(this,{type:"AssignmentExpression",left:f,operator:"=",right:o,start:k(f),end:N(o)},{hasParentParens:s})}throw Object.assign(new Error("Unexpected node"),{node:e})};function Me(r,t){return new It(r,t).node}function _e(r){return r instanceof ut}function Ue(r){return r instanceof W}var wt,q,x,Fe,C,te,ee,se,De,We,Ge,Ve,Xt=class extends It{constructor(e,s){super(void 0,s);P(this,x);P(this,wt);P(this,q);Y(this,wt,e),Y(this,q,s);for(let i of e)c(this,x,De).call(this,i)}get expressions(){return c(this,x,Ge).call(this)}};wt=new WeakMap,q=new WeakMap,x=new WeakSet,Fe=function(){return O(this,wt)[0].key},C=function(e,{stripSpaces:s=!0}={}){return this.createNode(e,{stripSpaces:s})},te=function(e){return this.transformNode(e)},ee=function(e){return Ne(e.slice(O(this,x,Fe).source.length))},se=function(e){let s=O(this,q);if(s[e.start]!=='"'&&s[e.start]!=="'")return;let i=s[e.start],n=!1;for(let a=e.start+1;a<s.length;a++)switch(s[a]){case i:if(!n){e.end=a+1;return}default:n=!1;break;case"\\":n=!n;break}},De=function(e){c(this,x,se).call(this,e.key.span),Ue(e)&&e.value&&c(this,x,se).call(this,e.value.span)},We=function(e){if(!e.value||e.value.source)return e.value;let s=this.getCharacterIndex(/\S/,e.sourceSpan.start);return{source:"$implicit",span:{start:s,end:s}}},Ge=function(){let e=O(this,wt),[s]=e,i=O(this,q).slice(s.sourceSpan.start,s.sourceSpan.end).trim().length===0?e.slice(1):e,n=[],a=null;for(let[o,p]of i.entries()){if(a&&_e(a)&&Ue(p)&&p.value&&p.value.source===a.key.source){let u=c(this,x,C).call(this,{type:"NGMicrosyntaxKey",name:p.key.source,...p.key.span}),f=(y,w)=>({...y,...this.transformSpan({start:y.start,end:w})}),S=y=>({...f(y,u.end),alias:u}),g=n.pop();if(g.type==="NGMicrosyntaxExpression")n.push(S(g));else if(g.type==="NGMicrosyntaxKeyedExpression"){let y=S(g.expression);n.push(f({...g,expression:y},y.end))}else throw new Error(`Unexpected type ${g.type}`)}else n.push(c(this,x,Ve).call(this,p,o));a=p}return c(this,x,C).call(this,{type:"NGMicrosyntax",body:n,...n.length===0?e[0].sourceSpan:{start:n[0].start,end:Tt(!1,n,-1).end}})},Ve=function(e,s){if(_e(e)){let{key:i,value:n}=e;return n?s===0?c(this,x,C).call(this,{type:"NGMicrosyntaxExpression",expression:c(this,x,te).call(this,n.ast),alias:null,...n.sourceSpan}):c(this,x,C).call(this,{type:"NGMicrosyntaxKeyedExpression",key:c(this,x,C).call(this,{type:"NGMicrosyntaxKey",name:c(this,x,ee).call(this,i.source),...i.span}),expression:c(this,x,C).call(this,{type:"NGMicrosyntaxExpression",expression:c(this,x,te).call(this,n.ast),alias:null,...n.sourceSpan}),start:i.span.start,end:n.sourceSpan.end}):c(this,x,C).call(this,{type:"NGMicrosyntaxKey",name:c(this,x,ee).call(this,i.source),...i.span})}else{let{key:i,sourceSpan:n}=e;if(/^let\s$/.test(O(this,q).slice(n.start,n.start+4))){let{value:o}=e;return c(this,x,C).call(this,{type:"NGMicrosyntaxLet",key:c(this,x,C).call(this,{type:"NGMicrosyntaxKey",name:i.source,...i.span}),value:o?c(this,x,C).call(this,{type:"NGMicrosyntaxKey",name:o.source,...o.span}):null,start:n.start,end:o?o.span.end:i.span.end})}else{let o=c(this,x,We).call(this,e);return c(this,x,C).call(this,{type:"NGMicrosyntaxAs",key:c(this,x,C).call(this,{type:"NGMicrosyntaxKey",name:o.source,...o.span}),alias:c(this,x,C).call(this,{type:"NGMicrosyntaxKey",name:i.source,...i.span}),start:o.span.start,end:i.span.end})}}};function Qe(r,t){return new Xt(r,t).expressions}function Mt({result:{ast:r},text:t,comments:e}){return Object.assign(Me(r,t),{comments:e})}function ze({result:{templateBindings:r},text:t}){return Qe(r,t)}var qe=r=>Mt(Le(r));var He=r=>Mt(Pe(r)),re=r=>Mt(Re(r)),je=r=>ze(be(r));function ie(r){var s,i,n;let t=((s=r.range)==null?void 0:s[0])??r.start,e=(n=((i=r.declaration)==null?void 0:i.decorators)??r.decorators)==null?void 0:n[0];return e?Math.min(ie(e),t):t}function Ye(r){var t;return((t=r.range)==null?void 0:t[1])??r.end}function _t(r){return{astFormat:"estree",parse(t){let e=r(t);return{type:"NGRoot",node:r===re&&e.type!=="NGChainedExpression"?{...e,type:"NGChainedExpression",expressions:[e]}:e}},locStart:ie,locEnd:Ye}}var Xs=_t(re),tr=_t(qe),er=_t(He),sr=_t(je);return ss(rr);});
(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 Ut=Object.defineProperty;var Je=Object.getOwnPropertyDescriptor;var Xe=Object.getOwnPropertyNames;var ts=Object.prototype.hasOwnProperty;var ae=r=>{throw TypeError(r)};var oe=(r,t)=>{for(var e in t)Ut(r,e,{get:t[e],enumerable:!0})},es=(r,t,e,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Xe(t))!ts.call(r,i)&&i!==e&&Ut(r,i,{get:()=>t[i],enumerable:!(s=Je(t,i))||s.enumerable});return r};var ss=r=>es(Ut({},"__esModule",{value:!0}),r);var Ft=(r,t,e)=>t.has(r)||ae("Cannot "+e);var O=(r,t,e)=>(Ft(r,t,"read from private field"),e?e.call(r):t.get(r)),P=(r,t,e)=>t.has(r)?ae("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(r):t.set(r,e),Y=(r,t,e,s)=>(Ft(r,t,"write to private field"),s?s.call(r,e):t.set(r,e),e),c=(r,t,e)=>(Ft(r,t,"access private method"),e);var rr={};oe(rr,{parsers:()=>ne});var ne={};oe(ne,{__ng_action:()=>Xs,__ng_binding:()=>tr,__ng_directive:()=>sr,__ng_interpolation:()=>er});var Z=class{constructor(t,e,s,i){this.input=e,this.errLocation=s,this.ctxLocation=i,this.message=`Parser Error: ${t} ${s} [${e}] in ${i}`}},b=class{constructor(t,e){this.start=t,this.end=e}toAbsolute(t){return new L(t+this.start,t+this.end)}},m=class{constructor(t,e){this.span=t,this.sourceSpan=e}toString(){return"AST"}},J=class extends m{constructor(t,e,s){super(t,e),this.nameSpan=s}},$=class extends m{visit(t,e=null){}},K=class extends m{visit(t,e=null){return t.visitImplicitReceiver(this,e)}},Lt=class extends K{visit(t,e=null){var s;return(s=t.visitThisReceiver)==null?void 0:s.call(t,this,e)}},X=class extends m{constructor(t,e,s){super(t,e),this.expressions=s}visit(t,e=null){return t.visitChain(this,e)}},tt=class extends m{constructor(t,e,s,i,n){super(t,e),this.condition=s,this.trueExp=i,this.falseExp=n}visit(t,e=null){return t.visitConditional(this,e)}},M=class extends J{constructor(t,e,s,i,n){super(t,e,s),this.receiver=i,this.name=n}visit(t,e=null){return t.visitPropertyRead(this,e)}},et=class extends J{constructor(t,e,s,i,n,a){super(t,e,s),this.receiver=i,this.name=n,this.value=a}visit(t,e=null){return t.visitPropertyWrite(this,e)}},_=class extends J{constructor(t,e,s,i,n){super(t,e,s),this.receiver=i,this.name=n}visit(t,e=null){return t.visitSafePropertyRead(this,e)}},st=class extends m{constructor(t,e,s,i){super(t,e),this.receiver=s,this.key=i}visit(t,e=null){return t.visitKeyedRead(this,e)}},U=class extends m{constructor(t,e,s,i){super(t,e),this.receiver=s,this.key=i}visit(t,e=null){return t.visitSafeKeyedRead(this,e)}},rt=class extends m{constructor(t,e,s,i,n){super(t,e),this.receiver=s,this.key=i,this.value=n}visit(t,e=null){return t.visitKeyedWrite(this,e)}},it=class extends J{constructor(t,e,s,i,n,a){super(t,e,a),this.exp=s,this.name=i,this.args=n}visit(t,e=null){return t.visitPipe(this,e)}},E=class extends m{constructor(t,e,s){super(t,e),this.value=s}visit(t,e=null){return t.visitLiteralPrimitive(this,e)}},nt=class extends m{constructor(t,e,s){super(t,e),this.expressions=s}visit(t,e=null){return t.visitLiteralArray(this,e)}},at=class extends m{constructor(t,e,s,i){super(t,e),this.keys=s,this.values=i}visit(t,e=null){return t.visitLiteralMap(this,e)}},ot=class extends m{constructor(t,e,s,i){super(t,e),this.strings=s,this.expressions=i}visit(t,e=null){return t.visitInterpolation(this,e)}},A=class extends m{constructor(t,e,s,i,n){super(t,e),this.operation=s,this.left=i,this.right=n}visit(t,e=null){return t.visitBinary(this,e)}},F=class r extends A{static createMinus(t,e,s){return new r(t,e,"-",s,"-",new E(t,e,0),s)}static createPlus(t,e,s){return new r(t,e,"+",s,"-",s,new E(t,e,0))}constructor(t,e,s,i,n,a,o){super(t,e,n,a,o),this.operator=s,this.expr=i,this.left=null,this.right=null,this.operation=null}visit(t,e=null){return t.visitUnary!==void 0?t.visitUnary(this,e):t.visitBinary(this,e)}},ct=class extends m{constructor(t,e,s){super(t,e),this.expression=s}visit(t,e=null){return t.visitPrefixNot(this,e)}},ht=class extends m{constructor(t,e,s){super(t,e),this.expression=s}visit(t,e=null){return t.visitNonNullAssert(this,e)}},pt=class extends m{constructor(t,e,s,i,n){super(t,e),this.receiver=s,this.args=i,this.argumentSpan=n}visit(t,e=null){return t.visitCall(this,e)}},D=class extends m{constructor(t,e,s,i,n){super(t,e),this.receiver=s,this.args=i,this.argumentSpan=n}visit(t,e=null){return t.visitSafeCall(this,e)}},L=class{constructor(t,e){this.start=t,this.end=e}},R=class extends m{constructor(t,e,s,i,n){super(new b(0,e===null?0:e.length),new L(i,e===null?i:i+e.length)),this.ast=t,this.source=e,this.location=s,this.errors=n}visit(t,e=null){return t.visitASTWithSource?t.visitASTWithSource(this,e):this.ast.visit(t,e)}toString(){return`${this.source} in ${this.location}`}},W=class{constructor(t,e,s){this.sourceSpan=t,this.key=e,this.value=s}},ut=class{constructor(t,e,s){this.sourceSpan=t,this.key=e,this.value=s}},Rt=class{visit(t,e){t.visit(this,e)}visitUnary(t,e){this.visit(t.expr,e)}visitBinary(t,e){this.visit(t.left,e),this.visit(t.right,e)}visitChain(t,e){this.visitAll(t.expressions,e)}visitConditional(t,e){this.visit(t.condition,e),this.visit(t.trueExp,e),this.visit(t.falseExp,e)}visitPipe(t,e){this.visit(t.exp,e),this.visitAll(t.args,e)}visitImplicitReceiver(t,e){}visitThisReceiver(t,e){}visitInterpolation(t,e){this.visitAll(t.expressions,e)}visitKeyedRead(t,e){this.visit(t.receiver,e),this.visit(t.key,e)}visitKeyedWrite(t,e){this.visit(t.receiver,e),this.visit(t.key,e),this.visit(t.value,e)}visitLiteralArray(t,e){this.visitAll(t.expressions,e)}visitLiteralMap(t,e){this.visitAll(t.values,e)}visitLiteralPrimitive(t,e){}visitPrefixNot(t,e){this.visit(t.expression,e)}visitNonNullAssert(t,e){this.visit(t.expression,e)}visitPropertyRead(t,e){this.visit(t.receiver,e)}visitPropertyWrite(t,e){this.visit(t.receiver,e),this.visit(t.value,e)}visitSafePropertyRead(t,e){this.visit(t.receiver,e)}visitSafeKeyedRead(t,e){this.visit(t.receiver,e),this.visit(t.key,e)}visitCall(t,e){this.visit(t.receiver,e),this.visitAll(t.args,e)}visitSafeCall(t,e){this.visit(t.receiver,e),this.visitAll(t.args,e)}visitAll(t,e){for(let s of t)this.visit(s,e)}};var ce;(function(r){r[r.DEFAULT=0]="DEFAULT",r[r.LITERAL_ATTR=1]="LITERAL_ATTR",r[r.ANIMATION=2]="ANIMATION",r[r.TWO_WAY=3]="TWO_WAY"})(ce||(ce={}));var he;(function(r){r[r.Regular=0]="Regular",r[r.Animation=1]="Animation",r[r.TwoWay=2]="TwoWay"})(he||(he={}));var pe;(function(r){r[r.Property=0]="Property",r[r.Attribute=1]="Attribute",r[r.Class=2]="Class",r[r.Style=3]="Style",r[r.Animation=4]="Animation",r[r.TwoWay=5]="TwoWay"})(pe||(pe={}));function ue(r){return r>=9&&r<=32||r==160}function B(r){return 48<=r&&r<=57}function le(r){return r>=97&&r<=122||r>=65&&r<=90}function Dt(r){return r===39||r===34||r===96}var l;(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"})(l||(l={}));var Ps=["var","let","as","null","undefined","true","false","if","else","this"],yt=class{tokenize(t){let e=new Vt(t),s=[],i=e.scanToken();for(;i!=null;)s.push(i),i=e.scanToken();return s}},I=class{constructor(t,e,s,i,n){this.index=t,this.end=e,this.type=s,this.numValue=i,this.strValue=n}isCharacter(t){return this.type==l.Character&&this.numValue==t}isNumber(){return this.type==l.Number}isString(){return this.type==l.String}isOperator(t){return this.type==l.Operator&&this.strValue==t}isIdentifier(){return this.type==l.Identifier}isPrivateIdentifier(){return this.type==l.PrivateIdentifier}isKeyword(){return this.type==l.Keyword}isKeywordLet(){return this.type==l.Keyword&&this.strValue=="let"}isKeywordAs(){return this.type==l.Keyword&&this.strValue=="as"}isKeywordNull(){return this.type==l.Keyword&&this.strValue=="null"}isKeywordUndefined(){return this.type==l.Keyword&&this.strValue=="undefined"}isKeywordTrue(){return this.type==l.Keyword&&this.strValue=="true"}isKeywordFalse(){return this.type==l.Keyword&&this.strValue=="false"}isKeywordThis(){return this.type==l.Keyword&&this.strValue=="this"}isError(){return this.type==l.Error}toNumber(){return this.type==l.Number?this.numValue:-1}toString(){switch(this.type){case l.Character:case l.Identifier:case l.Keyword:case l.Operator:case l.PrivateIdentifier:case l.String:case l.Error:return this.strValue;case l.Number:return this.numValue.toString();default:return null}}};function ge(r,t,e){return new I(r,t,l.Character,e,String.fromCharCode(e))}function bs(r,t,e){return new I(r,t,l.Identifier,0,e)}function Ks(r,t,e){return new I(r,t,l.PrivateIdentifier,0,e)}function Bs(r,t,e){return new I(r,t,l.Keyword,0,e)}function Gt(r,t,e){return new I(r,t,l.Operator,0,e)}function Ts(r,t,e){return new I(r,t,l.String,0,e)}function Ms(r,t,e){return new I(r,t,l.Number,e,"")}function _s(r,t,e){return new I(r,t,l.Error,0,e)}var Bt=new I(-1,-1,l.Character,0,""),Vt=class{constructor(t){this.input=t,this.peek=0,this.index=-1,this.length=t.length,this.advance()}advance(){this.peek=++this.index>=this.length?0:this.input.charCodeAt(this.index)}scanToken(){let t=this.input,e=this.length,s=this.peek,i=this.index;for(;s<=32;)if(++i>=e){s=0;break}else s=t.charCodeAt(i);if(this.peek=s,this.index=i,i>=e)return null;if(me(s))return this.scanIdentifier();if(B(s))return this.scanNumber(i);let n=i;switch(s){case 46:return this.advance(),B(this.peek)?this.scanNumber(n):ge(n,this.index,46);case 40:case 41:case 123:case 125:case 91:case 93:case 44:case 58:case 59:return this.scanCharacter(n,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(n,String.fromCharCode(s));case 63:return this.scanQuestion(n);case 60:case 62:return this.scanComplexOperator(n,String.fromCharCode(s),61,"=");case 33:case 61:return this.scanComplexOperator(n,String.fromCharCode(s),61,"=",61,"=");case 38:return this.scanComplexOperator(n,"&",38,"&");case 124:return this.scanComplexOperator(n,"|",124,"|");case 160:for(;ue(this.peek);)this.advance();return this.scanToken()}return this.advance(),this.error(`Unexpected character [${String.fromCharCode(s)}]`,0)}scanCharacter(t,e){return this.advance(),ge(t,this.index,e)}scanOperator(t,e){return this.advance(),Gt(t,this.index,e)}scanComplexOperator(t,e,s,i,n,a){this.advance();let o=e;return this.peek==s&&(this.advance(),o+=i),n!=null&&this.peek==n&&(this.advance(),o+=a),Gt(t,this.index,o)}scanIdentifier(){let t=this.index;for(this.advance();Se(this.peek);)this.advance();let e=this.input.substring(t,this.index);return Ps.indexOf(e)>-1?Bs(t,this.index,e):bs(t,this.index,e)}scanPrivateIdentifier(){let t=this.index;if(this.advance(),!me(this.peek))return this.error("Invalid character [#]",-1);for(;Se(this.peek);)this.advance();let e=this.input.substring(t,this.index);return Ks(t,this.index,e)}scanNumber(t){let e=this.index===t,s=!1;for(this.advance();;){if(!B(this.peek))if(this.peek===95){if(!B(this.input.charCodeAt(this.index-1))||!B(this.input.charCodeAt(this.index+1)))return this.error("Invalid numeric separator",0);s=!0}else if(this.peek===46)e=!1;else if(Us(this.peek)){if(this.advance(),Fs(this.peek)&&this.advance(),!B(this.peek))return this.error("Invalid exponent",-1);e=!1}else break;this.advance()}let i=this.input.substring(t,this.index);s&&(i=i.replace(/_/g,""));let n=e?Ws(i):parseFloat(i);return Ms(t,this.index,n)}scanString(){let t=this.index,e=this.peek;this.advance();let s="",i=this.index,n=this.input;for(;this.peek!=e;)if(this.peek==92){s+=n.substring(i,this.index);let o;if(this.advance(),this.peek==117){let p=n.substring(this.index+1,this.index+5);if(/^[0-9a-f]+$/i.test(p))o=parseInt(p,16);else return this.error(`Invalid unicode escape [\\u${p}]`,0);for(let u=0;u<5;u++)this.advance()}else o=Ds(this.peek),this.advance();s+=String.fromCharCode(o),i=this.index}else{if(this.peek==0)return this.error("Unterminated quote",0);this.advance()}let a=n.substring(i,this.index);return this.advance(),Ts(t,this.index,s+a)}scanQuestion(t){this.advance();let e="?";return(this.peek===63||this.peek===46)&&(e+=this.peek===46?".":"?",this.advance()),Gt(t,this.index,e)}error(t,e){let s=this.index+e;return _s(s,this.index,`Lexer Error: ${t} at column ${s} in expression [${this.input}]`)}};function me(r){return 97<=r&&r<=122||65<=r&&r<=90||r==95||r==36}function Se(r){return le(r)||B(r)||r==95||r==36}function Us(r){return r==101||r==69}function Fs(r){return r==45||r==43}function Ds(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 Ws(r){let t=parseInt(r);if(isNaN(t))throw new Error("Invalid integer literal when parsing "+r);return t}var Gs=[/@/,/^\s*$/,/[<>]/,/^[{}]$/,/&(#|[a-z])/i,/^\/\//];function Ee(r,t){if(t!=null&&!(Array.isArray(t)&&t.length==2))throw new Error(`Expected '${r}' to be an array, [start, end].`);if(t!=null){let e=t[0],s=t[1];Gs.forEach(i=>{if(i.test(e)||i.test(s))throw new Error(`['${e}', '${s}'] contains unusable interpolation symbol.`)})}}var zt=class r{static fromArray(t){return t?(Ee("interpolation",t),new r(t[0],t[1])):Q}constructor(t,e){this.start=t,this.end=e}},Q=new zt("{{","}}");var qt=class{constructor(t,e,s){this.strings=t,this.expressions=e,this.offsets=s}},Ht=class{constructor(t,e,s){this.templateBindings=t,this.warnings=e,this.errors=s}},mt=class{constructor(t){this._lexer=t,this.errors=[]}parseAction(t,e,s,i=Q){this._checkNoInterpolation(t,e,i);let n=this._stripComments(t),a=this._lexer.tokenize(n),o=new z(t,e,s,a,1,this.errors,0).parseChain();return new R(o,t,e,s,this.errors)}parseBinding(t,e,s,i=Q){let n=this._parseBindingAst(t,e,s,i);return new R(n,t,e,s,this.errors)}checkSimpleExpression(t){let e=new jt;return t.visit(e),e.errors}parseSimpleBinding(t,e,s,i=Q){let n=this._parseBindingAst(t,e,s,i),a=this.checkSimpleExpression(n);return a.length>0&&this._reportError(`Host binding expression cannot contain ${a.join(" ")}`,t,e),new R(n,t,e,s,this.errors)}_reportError(t,e,s,i){this.errors.push(new Z(t,e,s,i))}_parseBindingAst(t,e,s,i){this._checkNoInterpolation(t,e,i);let n=this._stripComments(t),a=this._lexer.tokenize(n);return new z(t,e,s,a,0,this.errors,0).parseChain()}parseTemplateBindings(t,e,s,i,n){let a=this._lexer.tokenize(e);return new z(e,s,n,a,0,this.errors,0).parseTemplateBindings({source:t,span:new L(i,i+t.length)})}parseInterpolation(t,e,s,i,n=Q){let{strings:a,expressions:o,offsets:p}=this.splitInterpolation(t,e,i,n);if(o.length===0)return null;let u=[];for(let f=0;f<o.length;++f){let S=o[f].text,g=this._stripComments(S),y=this._lexer.tokenize(g),w=new z(t,e,s,y,0,this.errors,p[f]).parseChain();u.push(w)}return this.createInterpolationAst(a.map(f=>f.text),u,t,e,s)}parseInterpolationExpression(t,e,s){let i=this._stripComments(t),n=this._lexer.tokenize(i),a=new z(t,e,s,n,0,this.errors,0).parseChain(),o=["",""];return this.createInterpolationAst(o,[a],t,e,s)}createInterpolationAst(t,e,s,i,n){let a=new b(0,s.length),o=new ot(a,a.toAbsolute(n),t,e);return new R(o,s,i,n,this.errors)}splitInterpolation(t,e,s,i=Q){let n=[],a=[],o=[],p=s?Vs(s):null,u=0,f=!1,S=!1,{start:g,end:y}=i;for(;u<t.length;)if(f){let w=u,H=w+g.length,j=this._getInterpolationEndIndex(t,y,H);if(j===-1){f=!1,S=!0;break}let T=j+y.length,Nt=t.substring(H,j);Nt.trim().length===0&&this._reportError("Blank expressions are not allowed in interpolated strings",t,`at column ${u} in`,e),a.push({text:Nt,start:w,end:T});let Ze=((p==null?void 0:p.get(w))??w)+g.length;o.push(Ze),u=T,f=!1}else{let w=u;u=t.indexOf(g,u),u===-1&&(u=t.length);let H=t.substring(w,u);n.push({text:H,start:w,end:u}),f=!0}if(!f)if(S){let w=n[n.length-1];w.text+=t.substring(u),w.end=t.length}else n.push({text:t.substring(u),start:u,end:t.length});return new qt(n,a,o)}wrapLiteralPrimitive(t,e,s){let i=new b(0,t==null?0:t.length);return new R(new E(i,i.toAbsolute(s),t),t,e,s,this.errors)}_stripComments(t){let e=this._commentStart(t);return e!=null?t.substring(0,e):t}_commentStart(t){let e=null;for(let s=0;s<t.length-1;s++){let i=t.charCodeAt(s),n=t.charCodeAt(s+1);if(i===47&&n==47&&e==null)return s;e===i?e=null:e==null&&Dt(i)&&(e=i)}return null}_checkNoInterpolation(t,e,{start:s,end:i}){let n=-1,a=-1;for(let o of this._forEachUnquotedChar(t,0))if(n===-1)t.startsWith(s)&&(n=o);else if(a=this._getInterpolationEndIndex(t,i,o),a>-1)break;n>-1&&a>-1&&this._reportError(`Got interpolation (${s}${i}) where expression was expected`,t,`at column ${n} in`,e)}_getInterpolationEndIndex(t,e,s){for(let i of this._forEachUnquotedChar(t,s)){if(t.startsWith(e,i))return i;if(t.startsWith("//",i))return t.indexOf(e,i)}return-1}*_forEachUnquotedChar(t,e){let s=null,i=0;for(let n=e;n<t.length;n++){let a=t[n];Dt(t.charCodeAt(n))&&(s===null||s===a)&&i%2===0?s=s===null?a:null:s===null&&(yield n),i=a==="\\"?i+1:0}}},gt;(function(r){r[r.None=0]="None",r[r.Writable=1]="Writable"})(gt||(gt={}));var z=class{constructor(t,e,s,i,n,a,o){this.input=t,this.location=e,this.absoluteOffset=s,this.tokens=i,this.parseFlags=n,this.errors=a,this.offset=o,this.rparensExpected=0,this.rbracketsExpected=0,this.rbracesExpected=0,this.context=gt.None,this.sourceSpanCache=new Map,this.index=0}peek(t){let e=this.index+t;return e<this.tokens.length?this.tokens[e]:Bt}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(t,e){let s=this.currentEndIndex;if(e!==void 0&&e>this.currentEndIndex&&(s=e),t>s){let i=s;s=t,t=i}return new b(t,s)}sourceSpan(t,e){let s=`${t}@${this.inputIndex}:${e}`;return this.sourceSpanCache.has(s)||this.sourceSpanCache.set(s,this.span(t,e).toAbsolute(this.absoluteOffset)),this.sourceSpanCache.get(s)}advance(){this.index++}withContext(t,e){this.context|=t;let s=e();return this.context^=t,s}consumeOptionalCharacter(t){return this.next.isCharacter(t)?(this.advance(),!0):!1}peekKeywordLet(){return this.next.isKeywordLet()}peekKeywordAs(){return this.next.isKeywordAs()}expectCharacter(t){this.consumeOptionalCharacter(t)||this.error(`Missing expected ${String.fromCharCode(t)}`)}consumeOptionalOperator(t){return this.next.isOperator(t)?(this.advance(),!0):!1}expectOperator(t){this.consumeOptionalOperator(t)||this.error(`Missing expected operator ${t}`)}prettyPrintToken(t){return t===Bt?"end of input":`token ${t}`}expectIdentifierOrKeyword(){let t=this.next;return!t.isIdentifier()&&!t.isKeyword()?(t.isPrivateIdentifier()?this._reportErrorForPrivateIdentifier(t,"expected identifier or keyword"):this.error(`Unexpected ${this.prettyPrintToken(t)}, expected identifier or keyword`),null):(this.advance(),t.toString())}expectIdentifierOrKeywordOrString(){let t=this.next;return!t.isIdentifier()&&!t.isKeyword()&&!t.isString()?(t.isPrivateIdentifier()?this._reportErrorForPrivateIdentifier(t,"expected identifier, keyword or string"):this.error(`Unexpected ${this.prettyPrintToken(t)}, expected identifier, keyword, or string`),""):(this.advance(),t.toString())}parseChain(){let t=[],e=this.inputIndex;for(;this.index<this.tokens.length;){let s=this.parsePipe();if(t.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 i=this.index;if(this.error(`Unexpected token '${this.next}'`),this.index===i)break}}if(t.length===0){let s=this.offset,i=this.offset+this.input.length;return new $(this.span(s,i),this.sourceSpan(s,i))}return t.length==1?t[0]:new X(this.span(e),this.sourceSpan(e),t)}parsePipe(){let t=this.inputIndex,e=this.parseExpression();if(this.consumeOptionalOperator("|")){this.parseFlags&1&&this.error("Cannot have a pipe in an action expression");do{let s=this.inputIndex,i=this.expectIdentifierOrKeyword(),n,a;i!==null?n=this.sourceSpan(s):(i="",a=this.next.index!==-1?this.next.index:this.input.length+this.offset,n=new b(a,a).toAbsolute(this.absoluteOffset));let o=[];for(;this.consumeOptionalCharacter(58);)o.push(this.parseExpression());e=new it(this.span(t),this.sourceSpan(t,a),e,i,o,n)}while(this.consumeOptionalOperator("|"))}return e}parseExpression(){return this.parseConditional()}parseConditional(){let t=this.inputIndex,e=this.parseLogicalOr();if(this.consumeOptionalOperator("?")){let s=this.parsePipe(),i;if(this.consumeOptionalCharacter(58))i=this.parsePipe();else{let n=this.inputIndex,a=this.input.substring(t,n);this.error(`Conditional expression ${a} requires all 3 expressions`),i=new $(this.span(t),this.sourceSpan(t))}return new tt(this.span(t),this.sourceSpan(t),e,s,i)}else return e}parseLogicalOr(){let t=this.inputIndex,e=this.parseLogicalAnd();for(;this.consumeOptionalOperator("||");){let s=this.parseLogicalAnd();e=new A(this.span(t),this.sourceSpan(t),"||",e,s)}return e}parseLogicalAnd(){let t=this.inputIndex,e=this.parseNullishCoalescing();for(;this.consumeOptionalOperator("&&");){let s=this.parseNullishCoalescing();e=new A(this.span(t),this.sourceSpan(t),"&&",e,s)}return e}parseNullishCoalescing(){let t=this.inputIndex,e=this.parseEquality();for(;this.consumeOptionalOperator("??");){let s=this.parseEquality();e=new A(this.span(t),this.sourceSpan(t),"??",e,s)}return e}parseEquality(){let t=this.inputIndex,e=this.parseRelational();for(;this.next.type==l.Operator;){let s=this.next.strValue;switch(s){case"==":case"===":case"!=":case"!==":this.advance();let i=this.parseRelational();e=new A(this.span(t),this.sourceSpan(t),s,e,i);continue}break}return e}parseRelational(){let t=this.inputIndex,e=this.parseAdditive();for(;this.next.type==l.Operator;){let s=this.next.strValue;switch(s){case"<":case">":case"<=":case">=":this.advance();let i=this.parseAdditive();e=new A(this.span(t),this.sourceSpan(t),s,e,i);continue}break}return e}parseAdditive(){let t=this.inputIndex,e=this.parseMultiplicative();for(;this.next.type==l.Operator;){let s=this.next.strValue;switch(s){case"+":case"-":this.advance();let i=this.parseMultiplicative();e=new A(this.span(t),this.sourceSpan(t),s,e,i);continue}break}return e}parseMultiplicative(){let t=this.inputIndex,e=this.parsePrefix();for(;this.next.type==l.Operator;){let s=this.next.strValue;switch(s){case"*":case"%":case"/":this.advance();let i=this.parsePrefix();e=new A(this.span(t),this.sourceSpan(t),s,e,i);continue}break}return e}parsePrefix(){if(this.next.type==l.Operator){let t=this.inputIndex,e=this.next.strValue,s;switch(e){case"+":return this.advance(),s=this.parsePrefix(),F.createPlus(this.span(t),this.sourceSpan(t),s);case"-":return this.advance(),s=this.parsePrefix(),F.createMinus(this.span(t),this.sourceSpan(t),s);case"!":return this.advance(),s=this.parsePrefix(),new ct(this.span(t),this.sourceSpan(t),s)}}return this.parseCallChain()}parseCallChain(){let t=this.inputIndex,e=this.parsePrimary();for(;;)if(this.consumeOptionalCharacter(46))e=this.parseAccessMember(e,t,!1);else if(this.consumeOptionalOperator("?."))this.consumeOptionalCharacter(40)?e=this.parseCall(e,t,!0):e=this.consumeOptionalCharacter(91)?this.parseKeyedReadOrWrite(e,t,!0):this.parseAccessMember(e,t,!0);else if(this.consumeOptionalCharacter(91))e=this.parseKeyedReadOrWrite(e,t,!1);else if(this.consumeOptionalCharacter(40))e=this.parseCall(e,t,!1);else if(this.consumeOptionalOperator("!"))e=new ht(this.span(t),this.sourceSpan(t),e);else return e}parsePrimary(){let t=this.inputIndex;if(this.consumeOptionalCharacter(40)){this.rparensExpected++;let e=this.parsePipe();return this.rparensExpected--,this.expectCharacter(41),e}else{if(this.next.isKeywordNull())return this.advance(),new E(this.span(t),this.sourceSpan(t),null);if(this.next.isKeywordUndefined())return this.advance(),new E(this.span(t),this.sourceSpan(t),void 0);if(this.next.isKeywordTrue())return this.advance(),new E(this.span(t),this.sourceSpan(t),!0);if(this.next.isKeywordFalse())return this.advance(),new E(this.span(t),this.sourceSpan(t),!1);if(this.next.isKeywordThis())return this.advance(),new Lt(this.span(t),this.sourceSpan(t));if(this.consumeOptionalCharacter(91)){this.rbracketsExpected++;let e=this.parseExpressionList(93);return this.rbracketsExpected--,this.expectCharacter(93),new nt(this.span(t),this.sourceSpan(t),e)}else{if(this.next.isCharacter(123))return this.parseLiteralMap();if(this.next.isIdentifier())return this.parseAccessMember(new K(this.span(t),this.sourceSpan(t)),t,!1);if(this.next.isNumber()){let e=this.next.toNumber();return this.advance(),new E(this.span(t),this.sourceSpan(t),e)}else if(this.next.isString()){let e=this.next.toString();return this.advance(),new E(this.span(t),this.sourceSpan(t),e)}else return this.next.isPrivateIdentifier()?(this._reportErrorForPrivateIdentifier(this.next,null),new $(this.span(t),this.sourceSpan(t))):this.index>=this.tokens.length?(this.error(`Unexpected end of expression: ${this.input}`),new $(this.span(t),this.sourceSpan(t))):(this.error(`Unexpected token ${this.next}`),new $(this.span(t),this.sourceSpan(t)))}}}parseExpressionList(t){let e=[];do if(!this.next.isCharacter(t))e.push(this.parsePipe());else break;while(this.consumeOptionalCharacter(44));return e}parseLiteralMap(){let t=[],e=[],s=this.inputIndex;if(this.expectCharacter(123),!this.consumeOptionalCharacter(125)){this.rbracesExpected++;do{let i=this.inputIndex,n=this.next.isString(),a=this.expectIdentifierOrKeywordOrString(),o={key:a,quoted:n};if(t.push(o),n)this.expectCharacter(58),e.push(this.parsePipe());else if(this.consumeOptionalCharacter(58))e.push(this.parsePipe());else{o.isShorthandInitialized=!0;let p=this.span(i),u=this.sourceSpan(i);e.push(new M(p,u,u,new K(p,u),a))}}while(this.consumeOptionalCharacter(44)&&!this.next.isCharacter(125));this.rbracesExpected--,this.expectCharacter(125)}return new at(this.span(s),this.sourceSpan(s),t,e)}parseAccessMember(t,e,s){let i=this.inputIndex,n=this.withContext(gt.Writable,()=>{let p=this.expectIdentifierOrKeyword()??"";return p.length===0&&this.error("Expected identifier for property access",t.span.end),p}),a=this.sourceSpan(i),o;if(s)this.consumeOptionalOperator("=")?(this.error("The '?.' operator cannot be used in the assignment"),o=new $(this.span(e),this.sourceSpan(e))):o=new _(this.span(e),this.sourceSpan(e),a,t,n);else if(this.consumeOptionalOperator("=")){if(!(this.parseFlags&1))return this.error("Bindings cannot contain assignments"),new $(this.span(e),this.sourceSpan(e));let p=this.parseConditional();o=new et(this.span(e),this.sourceSpan(e),a,t,n,p)}else o=new M(this.span(e),this.sourceSpan(e),a,t,n);return o}parseCall(t,e,s){let i=this.inputIndex;this.rparensExpected++;let n=this.parseCallArguments(),a=this.span(i,this.inputIndex).toAbsolute(this.absoluteOffset);this.expectCharacter(41),this.rparensExpected--;let o=this.span(e),p=this.sourceSpan(e);return s?new D(o,p,t,n,a):new pt(o,p,t,n,a)}parseCallArguments(){if(this.next.isCharacter(41))return[];let t=[];do t.push(this.parsePipe());while(this.consumeOptionalCharacter(44));return t}expectTemplateBindingKey(){let t="",e=!1,s=this.currentAbsoluteOffset;do t+=this.expectIdentifierOrKeywordOrString(),e=this.consumeOptionalOperator("-"),e&&(t+="-");while(e);return{source:t,span:new L(s,s+t.length)}}parseTemplateBindings(t){let e=[];for(e.push(...this.parseDirectiveKeywordBindings(t));this.index<this.tokens.length;){let s=this.parseLetBinding();if(s)e.push(s);else{let i=this.expectTemplateBindingKey(),n=this.parseAsBinding(i);n?e.push(n):(i.source=t.source+i.source.charAt(0).toUpperCase()+i.source.substring(1),e.push(...this.parseDirectiveKeywordBindings(i)))}this.consumeStatementTerminator()}return new Ht(e,[],this.errors)}parseKeyedReadOrWrite(t,e,s){return this.withContext(gt.Writable,()=>{this.rbracketsExpected++;let i=this.parsePipe();if(i 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 n=this.parseConditional();return new rt(this.span(e),this.sourceSpan(e),t,i,n)}else return s?new U(this.span(e),this.sourceSpan(e),t,i):new st(this.span(e),this.sourceSpan(e),t,i);return new $(this.span(e),this.sourceSpan(e))})}parseDirectiveKeywordBindings(t){let e=[];this.consumeOptionalCharacter(58);let s=this.getDirectiveBoundTarget(),i=this.currentAbsoluteOffset,n=this.parseAsBinding(t);n||(this.consumeStatementTerminator(),i=this.currentAbsoluteOffset);let a=new L(t.span.start,i);return e.push(new ut(a,t,s)),n&&e.push(n),e}getDirectiveBoundTarget(){if(this.next===Bt||this.peekKeywordAs()||this.peekKeywordLet())return null;let t=this.parsePipe(),{start:e,end:s}=t.span,i=this.input.substring(e,s);return new R(t,i,this.location,this.absoluteOffset+e,this.errors)}parseAsBinding(t){if(!this.peekKeywordAs())return null;this.advance();let e=this.expectTemplateBindingKey();this.consumeStatementTerminator();let s=new L(t.span.start,this.currentAbsoluteOffset);return new W(s,e,t)}parseLetBinding(){if(!this.peekKeywordLet())return null;let t=this.currentAbsoluteOffset;this.advance();let e=this.expectTemplateBindingKey(),s=null;this.consumeOptionalOperator("=")&&(s=this.expectTemplateBindingKey()),this.consumeStatementTerminator();let i=new L(t,this.currentAbsoluteOffset);return new W(i,e,s)}consumeStatementTerminator(){this.consumeOptionalCharacter(59)||this.consumeOptionalCharacter(44)}error(t,e=null){this.errors.push(new Z(t,this.input,this.locationText(e),this.location)),this.skip()}locationText(t=null){return t==null&&(t=this.index),t<this.tokens.length?`at column ${this.tokens[t].index+1} in`:"at the end of the expression"}_reportErrorForPrivateIdentifier(t,e){let s=`Private identifiers are not supported. Unexpected private identifier: ${t}`;e!==null&&(s+=`, ${e}`),this.error(s)}skip(){let t=this.next;for(;this.index<this.tokens.length&&!t.isCharacter(59)&&!t.isOperator("|")&&(this.rparensExpected<=0||!t.isCharacter(41))&&(this.rbracesExpected<=0||!t.isCharacter(125))&&(this.rbracketsExpected<=0||!t.isCharacter(93))&&(!(this.context&gt.Writable)||!t.isOperator("="));)this.next.isError()&&this.errors.push(new Z(this.next.toString(),this.input,this.locationText(),this.location)),this.advance(),t=this.next}},jt=class extends Rt{constructor(){super(...arguments),this.errors=[]}visitPipe(){this.errors.push("pipes")}};function Vs(r){let t=new Map,e=0,s=0,i=0;for(;i<r.length;){let n=r[i];if(n.type===9){let[a,o]=n.parts;e+=o.length,s+=a.length}else{let a=n.parts.reduce((o,p)=>o+p.length,0);s+=a,e+=a}t.set(s,e),i++}return t}function Ce({start:r,end:t},e){let s=r,i=t;for(;i!==s&&/\s/.test(e[i-1]);)i--;for(;s!==i&&/\s/.test(e[s]);)s++;return{start:s,end:i}}function zs({start:r,end:t},e){let s=r,i=t;for(;i!==e.length&&/\s/.test(e[i]);)i++;for(;s!==0&&/\s/.test(e[s-1]);)s--;return{start:s,end:i}}function qs(r,t){return t[r.start-1]==="("&&t[r.end]===")"?{start:r.start-1,end:r.end+1}:r}function Ae(r,t,e){let s=0,i={start:r.start,end:r.end};for(;;){let n=zs(i,t),a=qs(n,t);if(n.start===a.start&&n.end===a.end)break;i.start=a.start,i.end=a.end,s++}return{hasParens:(e?s-1:s)!==0,outerSpan:Ce(e?{start:i.start+1,end:i.end-1}:i,t),innerSpan:Ce(r,t)}}function Oe(r){return typeof r=="string"?t=>t===r:t=>r.test(t)}function Ie(r,t,e){let s=Oe(t);for(let i=e;i>=0;i--){let n=r[i];if(s(n))return i}throw new Error(`Cannot find front char ${t} from index ${e} in ${JSON.stringify(r)}`)}function ke(r,t,e){let s=Oe(t);for(let i=e;i<r.length;i++){let n=r[i];if(s(n))return i}throw new Error(`Cannot find character ${t} from index ${e} in ${JSON.stringify(r)}`)}function Ne(r){return r.slice(0,1).toLowerCase()+r.slice(1)}function Ct(r){let{start:t,end:e}=r;return{start:t,end:e,range:[t,e]}}var Hs=r=>mt.prototype._commentStart(r);function js(r,t){let e=t?Hs(r):null;if(e===null)return{text:r,comments:[]};let s={type:"CommentLine",value:r.slice(e+2),...Ct({start:e,end:r.length})};return{text:r.slice(0,e),comments:[s]}}function At(r,t=!0){return e=>{let s=new yt,i=new mt(s),{text:n,comments:a}=js(e,t),o=r(n,i);if(o.errors.length!==0){let[{message:p}]=o.errors;throw new SyntaxError(p.replace(/^Parser Error: | at column \d+ in [^]*$/g,""))}return{result:o,comments:a,text:n}}}var Le=At((r,t)=>t.parseBinding(r,"",0)),Ys=At((r,t)=>t.parseSimpleBinding(r,"",0)),Re=At((r,t)=>t.parseAction(r,"",0)),Pe=At((r,t)=>t.parseInterpolationExpression(r,"",0)),be=At((r,t)=>t.parseTemplateBindings("",r,"",0,0),!1);var Js=(r,t,e)=>{if(!(r&&t==null))return Array.isArray(t)||typeof t=="string"?t[e<0?t.length+e:e]:t.at(e)},Tt=Js;var Yt=class{text;constructor(t){this.text=t}getCharacterIndex(t,e){return ke(this.text,t,e)}getCharacterLastIndex(t,e){return Ie(this.text,t,e)}transformSpan(t,{stripSpaces:e=!1,hasParentParens:s=!1}={}){if(!e)return Ct(t);let{outerSpan:i,innerSpan:n,hasParens:a}=Ae(t,this.text,s),o=Ct(n);return a&&(o.extra={parenthesized:!0,parenStart:i.start,parenEnd:i.end}),o}createNode(t,{stripSpaces:e=!0,hasParentParens:s=!1}={}){let{type:i,start:n,end:a}=t,o={...t,...this.transformSpan({start:n,end:a},{stripSpaces:e,hasParentParens:s})};switch(i){case"NumericLiteral":case"StringLiteral":{let p=this.text.slice(o.start,o.end),{value:u}=o;o.extra={...o.extra,raw:p,rawValue:u};break}case"ObjectProperty":{let{shorthand:p}=o;p&&(o.extra={...o.extra,shorthand:p});break}}return o}},Ke=Yt;function Jt(r){var t;return!!((t=r.extra)!=null&&t.parenthesized)}function k(r){return Jt(r)?r.extra.parenStart:r.start}function N(r){return Jt(r)?r.extra.parenEnd:r.end}function Be(r){return(r.type==="OptionalCallExpression"||r.type==="OptionalMemberExpression")&&!Jt(r)}function Te(r,t){let{start:e,end:s}=r.sourceSpan;return e>=s||/^\s+$/.test(t.slice(e,s))}var kt,St,h,d,Ot,v,Zt,It=class extends Ke{constructor(e,s){super(s);P(this,h);P(this,kt);P(this,St);Y(this,kt,e),Y(this,St,s)}get node(){return c(this,h,v).call(this,O(this,kt))}transformNode(e){return c(this,h,Zt).call(this,e)}};kt=new WeakMap,St=new WeakMap,h=new WeakSet,d=function(e,{stripSpaces:s=!0,hasParentParens:i=!1}={}){return this.createNode(e,{stripSpaces:s,hasParentParens:i})},Ot=function(e,s,{computed:i,optional:n,end:a=N(s),hasParentParens:o=!1}){if(Te(e,O(this,St))||e.sourceSpan.start===s.start)return s;let p=c(this,h,v).call(this,e),u=Be(p);return c(this,h,d).call(this,{type:n||u?"OptionalMemberExpression":"MemberExpression",object:p,property:s,computed:i,...n?{optional:!0}:u?{optional:!1}:void 0,start:k(p),end:a},{hasParentParens:o})},v=function(e,s=!1){return c(this,h,Zt).call(this,e,s)},Zt=function(e,s=!1){if(e instanceof ot){let{expressions:i}=e;if(i.length!==1)throw new Error("Unexpected 'Interpolation'");return c(this,h,v).call(this,i[0])}if(e instanceof F)return c(this,h,d).call(this,{type:"UnaryExpression",prefix:!0,argument:c(this,h,v).call(this,e.expr),operator:e.operator,...e.sourceSpan},{hasParentParens:s});if(e instanceof A){let{left:i,operation:n,right:a}=e,o=c(this,h,v).call(this,i),p=c(this,h,v).call(this,a),u=k(o),f=N(p),S={left:o,right:p,start:u,end:f};return n==="&&"||n==="||"||n==="??"?c(this,h,d).call(this,{...S,type:"LogicalExpression",operator:n},{hasParentParens:s}):c(this,h,d).call(this,{...S,type:"BinaryExpression",operator:n},{hasParentParens:s})}if(e instanceof it){let{exp:i,name:n,args:a}=e,o=c(this,h,v).call(this,i),p=k(o),u=N(o),f=this.getCharacterIndex(/\S/,this.getCharacterIndex("|",u)+1),S=c(this,h,d).call(this,{type:"Identifier",name:n,start:f,end:f+n.length}),g=a.map(y=>c(this,h,v).call(this,y));return c(this,h,d).call(this,{type:"NGPipeExpression",left:o,right:S,arguments:g,start:p,end:N(g.length===0?S:Tt(!1,g,-1))},{hasParentParens:s})}if(e instanceof X)return c(this,h,d).call(this,{type:"NGChainedExpression",expressions:e.expressions.map(i=>c(this,h,v).call(this,i)),...e.sourceSpan},{hasParentParens:s});if(e instanceof tt){let{condition:i,trueExp:n,falseExp:a}=e,o=c(this,h,v).call(this,i),p=c(this,h,v).call(this,n),u=c(this,h,v).call(this,a);return c(this,h,d).call(this,{type:"ConditionalExpression",test:o,consequent:p,alternate:u,start:k(o),end:N(u)},{hasParentParens:s})}if(e instanceof $)return c(this,h,d).call(this,{type:"NGEmptyExpression",...e.sourceSpan},{hasParentParens:s});if(e instanceof K)return c(this,h,d).call(this,{type:"ThisExpression",...e.sourceSpan},{hasParentParens:s});if(e instanceof st||e instanceof U)return c(this,h,Ot).call(this,e.receiver,c(this,h,v).call(this,e.key),{computed:!0,optional:e instanceof U,end:e.sourceSpan.end,hasParentParens:s});if(e instanceof nt)return c(this,h,d).call(this,{type:"ArrayExpression",elements:e.expressions.map(i=>c(this,h,v).call(this,i)),...e.sourceSpan},{hasParentParens:s});if(e instanceof at){let{keys:i,values:n}=e,a=n.map(p=>c(this,h,v).call(this,p)),o=i.map(({key:p,quoted:u},f)=>{let S=a[f],g=k(S),y=N(S),w=this.getCharacterIndex(/\S/,f===0?e.sourceSpan.start+1:this.getCharacterIndex(",",N(a[f-1]))+1),H=g===w?y:this.getCharacterLastIndex(/\S/,this.getCharacterLastIndex(":",g-1)-1)+1,j={start:w,end:H},T=u?c(this,h,d).call(this,{type:"StringLiteral",value:p,...j}):c(this,h,d).call(this,{type:"Identifier",name:p,...j}),Nt=T.end<T.start||w===g;return c(this,h,d).call(this,{type:"ObjectProperty",key:T,value:S,shorthand:Nt,computed:!1,start:k(T),end:y})});return c(this,h,d).call(this,{type:"ObjectExpression",properties:o,...e.sourceSpan},{hasParentParens:s})}if(e instanceof E){let{value:i}=e;switch(typeof i){case"boolean":return c(this,h,d).call(this,{type:"BooleanLiteral",value:i,...e.sourceSpan},{hasParentParens:s});case"number":return c(this,h,d).call(this,{type:"NumericLiteral",value:i,...e.sourceSpan},{hasParentParens:s});case"object":return c(this,h,d).call(this,{type:"NullLiteral",...e.sourceSpan},{hasParentParens:s});case"string":return c(this,h,d).call(this,{type:"StringLiteral",value:i,...e.sourceSpan},{hasParentParens:s});case"undefined":return c(this,h,d).call(this,{type:"Identifier",name:"undefined",...e.sourceSpan},{hasParentParens:s});default:throw new Error(`Unexpected LiteralPrimitive value type ${typeof i}`)}}if(e instanceof pt||e instanceof D){let i=e instanceof D,{receiver:n,args:a}=e,o=a.length===1?[c(this,h,v).call(this,a[0],!0)]:a.map(S=>c(this,h,v).call(this,S)),p=c(this,h,v).call(this,n),u=Be(p),f=i||u?"OptionalCallExpression":"CallExpression";return c(this,h,d).call(this,{type:f,callee:p,arguments:o,optional:f==="OptionalCallExpression"?i:void 0,start:k(p),end:e.sourceSpan.end},{hasParentParens:s})}if(e instanceof ht){let i=c(this,h,v).call(this,e.expression);return c(this,h,d).call(this,{type:"TSNonNullExpression",expression:i,start:k(i),end:e.sourceSpan.end},{hasParentParens:s})}if(e instanceof ct){let i=c(this,h,v).call(this,e.expression);return c(this,h,d).call(this,{type:"UnaryExpression",prefix:!0,operator:"!",argument:i,start:e.sourceSpan.start,end:N(i)},{hasParentParens:s})}if(e instanceof M||e instanceof _){let{receiver:i,name:n}=e,a=this.getCharacterLastIndex(/\S/,e.sourceSpan.end-1)+1,o=c(this,h,d).call(this,{type:"Identifier",name:n,start:a-n.length,end:a},Te(i,O(this,St))?{hasParentParens:s}:{});return c(this,h,Ot).call(this,i,o,{computed:!1,optional:e instanceof _,hasParentParens:s})}if(e instanceof rt){let i=c(this,h,v).call(this,e.key),n=c(this,h,v).call(this,e.value),a=c(this,h,Ot).call(this,e.receiver,i,{computed:!0,optional:!1,end:this.getCharacterIndex("]",N(i))+1});return c(this,h,d).call(this,{type:"AssignmentExpression",left:a,operator:"=",right:n,start:k(a),end:N(n)},{hasParentParens:s})}if(e instanceof et){let{receiver:i,name:n,value:a}=e,o=c(this,h,v).call(this,a),p=this.getCharacterLastIndex(/\S/,this.getCharacterLastIndex("=",k(o)-1)-1)+1,u=c(this,h,d).call(this,{type:"Identifier",name:n,start:p-n.length,end:p}),f=c(this,h,Ot).call(this,i,u,{computed:!1,optional:!1});return c(this,h,d).call(this,{type:"AssignmentExpression",left:f,operator:"=",right:o,start:k(f),end:N(o)},{hasParentParens:s})}throw Object.assign(new Error("Unexpected node"),{node:e})};function Me(r,t){return new It(r,t).node}function _e(r){return r instanceof ut}function Ue(r){return r instanceof W}var wt,q,x,Fe,C,te,ee,se,De,We,Ge,Ve,Xt=class extends It{constructor(e,s){super(void 0,s);P(this,x);P(this,wt);P(this,q);Y(this,wt,e),Y(this,q,s);for(let i of e)c(this,x,De).call(this,i)}get expressions(){return c(this,x,Ge).call(this)}};wt=new WeakMap,q=new WeakMap,x=new WeakSet,Fe=function(){return O(this,wt)[0].key},C=function(e,{stripSpaces:s=!0}={}){return this.createNode(e,{stripSpaces:s})},te=function(e){return this.transformNode(e)},ee=function(e){return Ne(e.slice(O(this,x,Fe).source.length))},se=function(e){let s=O(this,q);if(s[e.start]!=='"'&&s[e.start]!=="'")return;let i=s[e.start],n=!1;for(let a=e.start+1;a<s.length;a++)switch(s[a]){case i:if(!n){e.end=a+1;return}default:n=!1;break;case"\\":n=!n;break}},De=function(e){c(this,x,se).call(this,e.key.span),Ue(e)&&e.value&&c(this,x,se).call(this,e.value.span)},We=function(e){if(!e.value||e.value.source)return e.value;let s=this.getCharacterIndex(/\S/,e.sourceSpan.start);return{source:"$implicit",span:{start:s,end:s}}},Ge=function(){let e=O(this,wt),[s]=e,i=O(this,q).slice(s.sourceSpan.start,s.sourceSpan.end).trim().length===0?e.slice(1):e,n=[],a=null;for(let[o,p]of i.entries()){if(a&&_e(a)&&Ue(p)&&p.value&&p.value.source===a.key.source){let u=c(this,x,C).call(this,{type:"NGMicrosyntaxKey",name:p.key.source,...p.key.span}),f=(y,w)=>({...y,...this.transformSpan({start:y.start,end:w})}),S=y=>({...f(y,u.end),alias:u}),g=n.pop();if(g.type==="NGMicrosyntaxExpression")n.push(S(g));else if(g.type==="NGMicrosyntaxKeyedExpression"){let y=S(g.expression);n.push(f({...g,expression:y},y.end))}else throw new Error(`Unexpected type ${g.type}`)}else n.push(c(this,x,Ve).call(this,p,o));a=p}return c(this,x,C).call(this,{type:"NGMicrosyntax",body:n,...n.length===0?e[0].sourceSpan:{start:n[0].start,end:Tt(!1,n,-1).end}})},Ve=function(e,s){if(_e(e)){let{key:i,value:n}=e;return n?s===0?c(this,x,C).call(this,{type:"NGMicrosyntaxExpression",expression:c(this,x,te).call(this,n.ast),alias:null,...n.sourceSpan}):c(this,x,C).call(this,{type:"NGMicrosyntaxKeyedExpression",key:c(this,x,C).call(this,{type:"NGMicrosyntaxKey",name:c(this,x,ee).call(this,i.source),...i.span}),expression:c(this,x,C).call(this,{type:"NGMicrosyntaxExpression",expression:c(this,x,te).call(this,n.ast),alias:null,...n.sourceSpan}),start:i.span.start,end:n.sourceSpan.end}):c(this,x,C).call(this,{type:"NGMicrosyntaxKey",name:c(this,x,ee).call(this,i.source),...i.span})}else{let{key:i,sourceSpan:n}=e;if(/^let\s$/.test(O(this,q).slice(n.start,n.start+4))){let{value:o}=e;return c(this,x,C).call(this,{type:"NGMicrosyntaxLet",key:c(this,x,C).call(this,{type:"NGMicrosyntaxKey",name:i.source,...i.span}),value:o?c(this,x,C).call(this,{type:"NGMicrosyntaxKey",name:o.source,...o.span}):null,start:n.start,end:o?o.span.end:i.span.end})}else{let o=c(this,x,We).call(this,e);return c(this,x,C).call(this,{type:"NGMicrosyntaxAs",key:c(this,x,C).call(this,{type:"NGMicrosyntaxKey",name:o.source,...o.span}),alias:c(this,x,C).call(this,{type:"NGMicrosyntaxKey",name:i.source,...i.span}),start:o.span.start,end:i.span.end})}}};function Qe(r,t){return new Xt(r,t).expressions}function Mt({result:{ast:r},text:t,comments:e}){return Object.assign(Me(r,t),{comments:e})}function ze({result:{templateBindings:r},text:t}){return Qe(r,t)}var qe=r=>Mt(Le(r));var He=r=>Mt(Pe(r)),re=r=>Mt(Re(r)),je=r=>ze(be(r));function ie(r){var s,i,n;let t=((s=r.range)==null?void 0:s[0])??r.start,e=(n=((i=r.declaration)==null?void 0:i.decorators)??r.decorators)==null?void 0:n[0];return e?Math.min(ie(e),t):t}function Ye(r){var t;return((t=r.range)==null?void 0:t[1])??r.end}function _t(r){return{astFormat:"estree",parse(t){let e=r(t);return{type:"NGRoot",node:r===re&&e.type!=="NGChainedExpression"?{...e,type:"NGChainedExpression",expressions:[e]}:e}},locStart:ie,locEnd:Ye}}var Xs=_t(re),tr=_t(qe),er=_t(He),sr=_t(je);return ss(rr);});

@@ -1,11 +0,11 @@

(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===`
(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 ln={};Ne(ln,{languages:()=>Pe,options:()=>we,parsers:()=>Te,printers:()=>un});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 vn=j(/\s/u),G=j(" "),_e=j(",; "),ye=j(/[^\n\r]/u);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 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
`||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 At(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 Ae=At;function gt(e){return Array.isArray(e)&&e.length>0}var le=gt;var pe=class extends Error{name="UnexpectedNodeError";constructor(t,n,r="type"){super(`Unexpected ${n} node ${r}: ${JSON.stringify(t[r])}.`),this.node=t}},ge=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"]},Hn=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|$)/u.test(e)}function ve(e){return`# @format
`+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,'"""',String.raw`\"""`).split(`
`);return i.length===1&&(i[0]=i[0].trim()),i.every(s=>s==="")&&(i.length=0),E(f,['"""',...i,'"""'])}return['"',Y(!1,Y(!1,r.value,/["\\]/g,String.raw`\$&`),`
`,String.raw`\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=e.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}
`+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 A=vt;function bt(e,t,n){let{node:r}=e;switch(r.kind){case"Document":return[...E(f,g(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,g(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],g(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,'"""',String.raw`\"""`).split(`
`);return i.length===1&&(i[0]=i[0].trim()),i.every(s=>s==="")&&(i.length=0),E(f,['"""',...i,'"""'])}return['"',Y(!1,Y(!1,r.value,/["\\]/gu,String.raw`\$&`),`
`,String.raw`\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],g(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(A(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,g(e,t,n,"fields"))]),f,"}"]),s}case"FieldDefinition":return[A(e,t,n),n("name"),r.arguments.length>0?y(["(",x([p,E([O("",", "),p],g(e,t,n,"arguments"))]),p,")"]):"",": ",n("type"),_(e,n,r)];case"DirectiveDefinition":return[A(e,t,n),"directive ","@",n("name"),r.arguments.length>0?y(["(",x([p,E([O("",", "),p],g(e,t,n,"arguments"))]),p,")"]):"",r.repeatable?" repeatable":""," on ",...E(" | ",e.map(n,"locations"))];case"EnumTypeExtension":case"EnumTypeDefinition":return[A(e,t,n),r.kind==="EnumTypeExtension"?"extend ":"","enum ",n("name"),_(e,n,r),r.values.length>0?[" {",x([f,E(f,g(e,t,n,"values"))]),f,"}"]:""];case"EnumValueDefinition":return[A(e,t,n),n("name"),_(e,n,r)];case"InputValueDefinition":return[A(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,g(e,t,n,"operationTypes"))]),f,"}"]:[]];case"SchemaDefinition":return[A(e,t,n),"schema",_(e,n,r)," {",r.operationTypes.length>0?x([f,E(f,g(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([A(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[A(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 ge(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 g(e,t,n,r){return e.map(({isLast:i,node:s})=>{let a=n();return!i&&Ae(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=e.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:()=>cn});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(`

@@ -18,3 +18,3 @@ `)}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+=`

`,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: ${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.
`));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 tn=globalThis.process&&!0,He=tn?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.

@@ -30,2 +30,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: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);});
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 nn(e,t){let n=new SyntaxError(e+" ("+t.loc.start.line+":"+t.loc.start.column+")");return Object.assign(n,t)}var et=nn;function rn(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 sn={allowLegacyFragmentVariables:!0};function on(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 an(e){let t;try{t=Ke(e,sn)}catch(n){throw on(n)}return t.comments=rn(t),t}var cn={parse:an,astFormat:"graphql",hasPragma:Ce,locStart:q,locEnd:Q};var un={graphql:Re};return st(ln);});

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 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 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

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