prettier 2.0.1 → 2.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/parser-graphql.js CHANGED
@@ -1 +1 @@
1
- !function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n(((e=e||self).prettierPlugins=e.prettierPlugins||{},e.prettierPlugins.graphql={}))}(this,(function(e){"use strict";var n=function(e,n){const t=new SyntaxError(e+" ("+n.start.line+":"+n.start.column+")");return t.loc=n,t};var t={hasPragma:function(e){return/^\s*#[^\n\S]*@(format|prettier)\s*(\n|$)/.test(e)},insertPragma:function(e){return"# @format\n\n"+e}};function i(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function r(e,n){return e(n={exports:{}},n.exports),n.exports}var o=r((function(e,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(e,n){if(!Boolean(e))throw new Error(n)}}));i(o);var a=r((function(e,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(e){"function"==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e.prototype,Symbol.toStringTag,{get:function(){return this.constructor.name}})}}));i(a);var s=r((function(e,n){Object.defineProperty(n,"__esModule",{value:!0}),n.Source=void 0;var t=r(o),i=r(a);function r(e){return e&&e.__esModule?e:{default:e}}var s=function(e,n,i){this.body=e,this.name=n||"GraphQL request",this.locationOffset=i||{line:1,column:1},this.locationOffset.line>0||(0,t.default)(0,"line in locationOffset is 1-indexed and must be positive"),this.locationOffset.column>0||(0,t.default)(0,"column in locationOffset is 1-indexed and must be positive")};n.Source=s,(0,i.default)(s)}));i(s);s.Source;var c=r((function(e,n){Object.defineProperty(n,"__esModule",{value:!0}),n.getLocation=function(e,n){var t,i=/\r\n|[\n\r]/g,r=1,o=n+1;for(;(t=i.exec(e.body))&&t.index<n;)r+=1,o=n+1-(t.index+t[0].length);return{line:r,column:o}}}));i(c);c.getLocation;var u=r((function(e,n){function t(e,n){var t=e.locationOffset.column-1,o=r(t)+e.body,a=n.line-1,s=e.locationOffset.line-1,c=n.line+s,u=1===n.line?t:0,l=n.column+u,d="".concat(e.name,":").concat(c,":").concat(l,"\n"),p=o.split(/\r\n|[\n\r]/g),f=p[a];if(f.length>120){for(var h=Math.floor(l/80),T=l%80,v=[],E=0;E<f.length;E+=80)v.push(f.slice(E,E+80));return d+i([["".concat(c),v[0]]].concat(v.slice(1,h+1).map((function(e){return["",e]})),[[" ",r(T-1)+"^"],["",v[h+1]]]))}return d+i([["".concat(c-1),p[a-1]],["".concat(c),f],["",r(l-1)+"^"],["".concat(c+1),p[a+1]]])}function i(e){var n=e.filter((function(e){e[0];return void 0!==e[1]})),t=Math.max.apply(Math,n.map((function(e){return e[0].length})));return n.map((function(e){var n,i=e[0],o=e[1];return r(t-(n=i).length)+n+(o?" | "+o:" |")})).join("\n")}function r(e){return Array(e+1).join(" ")}Object.defineProperty(n,"__esModule",{value:!0}),n.printLocation=function(e){return t(e.source,(0,c.getLocation)(e.source,e.start))},n.printSourceLocation=t}));i(u);u.printLocation,u.printSourceLocation;var l=r((function(e,n){Object.defineProperty(n,"__esModule",{value:!0}),n.Kind=void 0;var t=Object.freeze({NAME:"Name",DOCUMENT:"Document",OPERATION_DEFINITION:"OperationDefinition",VARIABLE_DEFINITION:"VariableDefinition",SELECTION_SET:"SelectionSet",FIELD:"Field",ARGUMENT:"Argument",FRAGMENT_SPREAD:"FragmentSpread",INLINE_FRAGMENT:"InlineFragment",FRAGMENT_DEFINITION:"FragmentDefinition",VARIABLE:"Variable",INT:"IntValue",FLOAT:"FloatValue",STRING:"StringValue",BOOLEAN:"BooleanValue",NULL:"NullValue",ENUM:"EnumValue",LIST:"ListValue",OBJECT:"ObjectValue",OBJECT_FIELD:"ObjectField",DIRECTIVE:"Directive",NAMED_TYPE:"NamedType",LIST_TYPE:"ListType",NON_NULL_TYPE:"NonNullType",SCHEMA_DEFINITION:"SchemaDefinition",OPERATION_TYPE_DEFINITION:"OperationTypeDefinition",SCALAR_TYPE_DEFINITION:"ScalarTypeDefinition",OBJECT_TYPE_DEFINITION:"ObjectTypeDefinition",FIELD_DEFINITION:"FieldDefinition",INPUT_VALUE_DEFINITION:"InputValueDefinition",INTERFACE_TYPE_DEFINITION:"InterfaceTypeDefinition",UNION_TYPE_DEFINITION:"UnionTypeDefinition",ENUM_TYPE_DEFINITION:"EnumTypeDefinition",ENUM_VALUE_DEFINITION:"EnumValueDefinition",INPUT_OBJECT_TYPE_DEFINITION:"InputObjectTypeDefinition",DIRECTIVE_DEFINITION:"DirectiveDefinition",SCHEMA_EXTENSION:"SchemaExtension",SCALAR_TYPE_EXTENSION:"ScalarTypeExtension",OBJECT_TYPE_EXTENSION:"ObjectTypeExtension",INTERFACE_TYPE_EXTENSION:"InterfaceTypeExtension",UNION_TYPE_EXTENSION:"UnionTypeExtension",ENUM_TYPE_EXTENSION:"EnumTypeExtension",INPUT_OBJECT_TYPE_EXTENSION:"InputObjectTypeExtension"});n.Kind=t}));i(l);l.Kind;var d=r((function(e,n){Object.defineProperty(n,"__esModule",{value:!0}),n.TokenKind=void 0;var t=Object.freeze({SOF:"<SOF>",EOF:"<EOF>",BANG:"!",DOLLAR:"$",AMP:"&",PAREN_L:"(",PAREN_R:")",SPREAD:"...",COLON:":",EQUALS:"=",AT:"@",BRACKET_L:"[",BRACKET_R:"]",BRACE_L:"{",PIPE:"|",BRACE_R:"}",NAME:"Name",INT:"Int",FLOAT:"Float",STRING:"String",BLOCK_STRING:"BlockString",COMMENT:"Comment"});n.TokenKind=t}));i(d);d.TokenKind;var p=r((function(e,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var t="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):void 0;n.default=t}));i(p);var f=r((function(e,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.prototype.toString;e.prototype.toJSON=n,e.prototype.inspect=n,i.default&&(e.prototype[i.default]=n)};var t,i=(t=p)&&t.__esModule?t:{default:t}}));i(f);var h=r((function(e,n){function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(e){return"object"==t(e)&&null!==e}}));i(h);var T=r((function(e,n){Object.defineProperty(n,"__esModule",{value:!0}),n.GraphQLError=r,n.printError=o;var t,i=(t=h)&&t.__esModule?t:{default:t};function r(e,n,t,o,a,s,u){var l=Array.isArray(n)?0!==n.length?n:void 0:n?[n]:void 0,d=t;if(!d&&l){var p=l[0];d=p&&p.loc&&p.loc.source}var f,h=o;!h&&l&&(h=l.reduce((function(e,n){return n.loc&&e.push(n.loc.start),e}),[])),h&&0===h.length&&(h=void 0),o&&t?f=o.map((function(e){return(0,c.getLocation)(t,e)})):l&&(f=l.reduce((function(e,n){return n.loc&&e.push((0,c.getLocation)(n.loc.source,n.loc.start)),e}),[]));var T=u;if(null==T&&null!=s){var v=s.extensions;(0,i.default)(v)&&(T=v)}Object.defineProperties(this,{message:{value:e,enumerable:!0,writable:!0},locations:{value:f||void 0,enumerable:Boolean(f)},path:{value:a||void 0,enumerable:Boolean(a)},nodes:{value:l||void 0},source:{value:d||void 0},positions:{value:h||void 0},originalError:{value:s},extensions:{value:T||void 0,enumerable:Boolean(T)}}),s&&s.stack?Object.defineProperty(this,"stack",{value:s.stack,writable:!0,configurable:!0}):Error.captureStackTrace?Error.captureStackTrace(this,r):Object.defineProperty(this,"stack",{value:Error().stack,writable:!0,configurable:!0})}function o(e){var n=e.message;if(e.nodes)for(var t=0,i=e.nodes;t<i.length;t++){var r=i[t];r.loc&&(n+="\n\n"+(0,u.printLocation)(r.loc))}else if(e.source&&e.locations)for(var o=0,a=e.locations;o<a.length;o++){var s=a[o];n+="\n\n"+(0,u.printSourceLocation)(e.source,s)}return n}r.prototype=Object.create(Error.prototype,{constructor:{value:r},name:{value:"GraphQLError"},toString:{value:function(){return o(this)}}})}));i(T);T.GraphQLError,T.printError;var v=r((function(e,n){Object.defineProperty(n,"__esModule",{value:!0}),n.syntaxError=function(e,n,t){return new T.GraphQLError("Syntax Error: ".concat(t),void 0,e,[n])}}));i(v);v.syntaxError;var E=r((function(e,n){function t(e){for(var n=null,t=1;t<e.length;t++){var r=e[t],o=i(r);if(o!==r.length&&((null===n||o<n)&&0===(n=o)))break}return null===n?0:n}function i(e){for(var n=0;n<e.length&&(" "===e[n]||"\t"===e[n]);)n++;return n}function r(e){return i(e)===e.length}Object.defineProperty(n,"__esModule",{value:!0}),n.dedentBlockStringValue=function(e){var n=e.split(/\r\n|[\n\r]/g),i=t(n);if(0!==i)for(var o=1;o<n.length;o++)n[o]=n[o].slice(i);for(;n.length>0&&r(n[0]);)n.shift();for(;n.length>0&&r(n[n.length-1]);)n.pop();return n.join("\n")},n.getBlockStringIndentation=t,n.printBlockString=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",t=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=-1===e.indexOf("\n"),r=" "===e[0]||"\t"===e[0],o='"'===e[e.length-1],a=!i||o||t,s="";!a||i&&r||(s+="\n"+n);s+=n?e.replace(/\n/g,"\n"+n):e,a&&(s+="\n");return'"""'+s.replace(/"""/g,'\\"""')+'"""'}}));i(E);E.dedentBlockStringValue,E.getBlockStringIndentation,E.printBlockString;var y=r((function(e,n){var t;function i(){return this.lastToken=this.token,this.token=this.lookahead()}function r(){var e=this.token;if(e.kind!==d.TokenKind.EOF)do{e=e.next||(e.next=s(this,e))}while(e.kind===d.TokenKind.COMMENT);return e}function o(e,n,t,i,r,o,a){this.kind=e,this.start=n,this.end=t,this.line=i,this.column=r,this.value=a,this.prev=o,this.next=null}function a(e){return isNaN(e)?d.TokenKind.EOF:e<127?JSON.stringify(String.fromCharCode(e)):'"\\u'.concat(("00"+e.toString(16).toUpperCase()).slice(-4),'"')}function s(e,n){var t=e.source,i=t.body,r=i.length,s=function(e,n,t){var i=e.length,r=n;for(;r<i;){var o=e.charCodeAt(r);if(9===o||32===o||44===o||65279===o)++r;else if(10===o)++r,++t.line,t.lineStart=r;else{if(13!==o)break;10===e.charCodeAt(r+1)?r+=2:++r,++t.line,t.lineStart=r}}return r}(i,n.end,e),l=e.line,p=1+s-e.lineStart;if(s>=r)return new o(d.TokenKind.EOF,r,r,l,p,n);var f=i.charCodeAt(s);switch(f){case 33:return new o(d.TokenKind.BANG,s,s+1,l,p,n);case 35:return function(e,n,t,i,r){var a,s=e.body,c=n;do{a=s.charCodeAt(++c)}while(!isNaN(a)&&(a>31||9===a));return new o(d.TokenKind.COMMENT,n,c,t,i,r,s.slice(n+1,c))}(t,s,l,p,n);case 36:return new o(d.TokenKind.DOLLAR,s,s+1,l,p,n);case 38:return new o(d.TokenKind.AMP,s,s+1,l,p,n);case 40:return new o(d.TokenKind.PAREN_L,s,s+1,l,p,n);case 41:return new o(d.TokenKind.PAREN_R,s,s+1,l,p,n);case 46:if(46===i.charCodeAt(s+1)&&46===i.charCodeAt(s+2))return new o(d.TokenKind.SPREAD,s,s+3,l,p,n);break;case 58:return new o(d.TokenKind.COLON,s,s+1,l,p,n);case 61:return new o(d.TokenKind.EQUALS,s,s+1,l,p,n);case 64:return new o(d.TokenKind.AT,s,s+1,l,p,n);case 91:return new o(d.TokenKind.BRACKET_L,s,s+1,l,p,n);case 93:return new o(d.TokenKind.BRACKET_R,s,s+1,l,p,n);case 123:return new o(d.TokenKind.BRACE_L,s,s+1,l,p,n);case 124:return new o(d.TokenKind.PIPE,s,s+1,l,p,n);case 125:return new o(d.TokenKind.BRACE_R,s,s+1,l,p,n);case 65:case 66:case 67:case 68:case 69:case 70:case 71:case 72:case 73:case 74:case 75:case 76:case 77:case 78:case 79:case 80:case 81:case 82:case 83:case 84:case 85:case 86:case 87:case 88:case 89:case 90:case 95:case 97:case 98:case 99:case 100:case 101:case 102:case 103:case 104:case 105:case 106:case 107:case 108:case 109:case 110:case 111:case 112:case 113:case 114:case 115:case 116:case 117:case 118:case 119:case 120:case 121:case 122:return function(e,n,t,i,r){var a=e.body,s=a.length,c=n+1,u=0;for(;c!==s&&!isNaN(u=a.charCodeAt(c))&&(95===u||u>=48&&u<=57||u>=65&&u<=90||u>=97&&u<=122);)++c;return new o(d.TokenKind.NAME,n,c,t,i,r,a.slice(n,c))}(t,s,l,p,n);case 45:case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return function(e,n,t,i,r,s){var u=e.body,l=t,p=n,f=!1;45===l&&(l=u.charCodeAt(++p));if(48===l){if((l=u.charCodeAt(++p))>=48&&l<=57)throw(0,v.syntaxError)(e,p,"Invalid number, unexpected digit after 0: ".concat(a(l),"."))}else p=c(e,p,l),l=u.charCodeAt(p);46===l&&(f=!0,l=u.charCodeAt(++p),p=c(e,p,l),l=u.charCodeAt(p));69!==l&&101!==l||(f=!0,43!==(l=u.charCodeAt(++p))&&45!==l||(l=u.charCodeAt(++p)),p=c(e,p,l),l=u.charCodeAt(p));if(46===l||69===l||101===l)throw(0,v.syntaxError)(e,p,"Invalid number, expected digit but got: ".concat(a(l),"."));return new o(f?d.TokenKind.FLOAT:d.TokenKind.INT,n,p,i,r,s,u.slice(n,p))}(t,s,f,l,p,n);case 34:return 34===i.charCodeAt(s+1)&&34===i.charCodeAt(s+2)?function(e,n,t,i,r,s){var c=e.body,u=n+3,l=u,p=0,f="";for(;u<c.length&&!isNaN(p=c.charCodeAt(u));){if(34===p&&34===c.charCodeAt(u+1)&&34===c.charCodeAt(u+2))return f+=c.slice(l,u),new o(d.TokenKind.BLOCK_STRING,n,u+3,t,i,r,(0,E.dedentBlockStringValue)(f));if(p<32&&9!==p&&10!==p&&13!==p)throw(0,v.syntaxError)(e,u,"Invalid character within String: ".concat(a(p),"."));10===p?(++u,++s.line,s.lineStart=u):13===p?(10===c.charCodeAt(u+1)?u+=2:++u,++s.line,s.lineStart=u):92===p&&34===c.charCodeAt(u+1)&&34===c.charCodeAt(u+2)&&34===c.charCodeAt(u+3)?(f+=c.slice(l,u)+'"""',l=u+=4):++u}throw(0,v.syntaxError)(e,u,"Unterminated string.")}(t,s,l,p,n,e):function(e,n,t,i,r){var s=e.body,c=n+1,l=c,p=0,f="";for(;c<s.length&&!isNaN(p=s.charCodeAt(c))&&10!==p&&13!==p;){if(34===p)return f+=s.slice(l,c),new o(d.TokenKind.STRING,n,c+1,t,i,r,f);if(p<32&&9!==p)throw(0,v.syntaxError)(e,c,"Invalid character within String: ".concat(a(p),"."));if(++c,92===p){switch(f+=s.slice(l,c-1),p=s.charCodeAt(c)){case 34:f+='"';break;case 47:f+="/";break;case 92:f+="\\";break;case 98:f+="\b";break;case 102:f+="\f";break;case 110:f+="\n";break;case 114:f+="\r";break;case 116:f+="\t";break;case 117:var h=(E=s.charCodeAt(c+1),y=s.charCodeAt(c+2),N=s.charCodeAt(c+3),m=s.charCodeAt(c+4),u(E)<<12|u(y)<<8|u(N)<<4|u(m));if(h<0){var T=s.slice(c+1,c+5);throw(0,v.syntaxError)(e,c,"Invalid character escape sequence: \\u".concat(T,"."))}f+=String.fromCharCode(h),c+=4;break;default:throw(0,v.syntaxError)(e,c,"Invalid character escape sequence: \\".concat(String.fromCharCode(p),"."))}++c,l=c}}var E,y,N,m;throw(0,v.syntaxError)(e,c,"Unterminated string.")}(t,s,l,p,n)}throw(0,v.syntaxError)(t,s,function(e){if(e<32&&9!==e&&10!==e&&13!==e)return"Cannot contain the invalid character ".concat(a(e),".");if(39===e)return"Unexpected single quote character ('), did you mean to use a double quote (\")?";return"Cannot parse the unexpected character ".concat(a(e),".")}(f))}function c(e,n,t){var i=e.body,r=n,o=t;if(o>=48&&o<=57){do{o=i.charCodeAt(++r)}while(o>=48&&o<=57);return r}throw(0,v.syntaxError)(e,r,"Invalid number, expected digit but got: ".concat(a(o),"."))}function u(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}Object.defineProperty(n,"__esModule",{value:!0}),n.createLexer=function(e,n){var t=new o(d.TokenKind.SOF,0,0,0,0,null);return{source:e,options:n,lastToken:t,token:t,line:1,lineStart:0,advance:i,lookahead:r}},n.isPunctuatorToken=function(e){var n=e.kind;return n===d.TokenKind.BANG||n===d.TokenKind.DOLLAR||n===d.TokenKind.AMP||n===d.TokenKind.PAREN_L||n===d.TokenKind.PAREN_R||n===d.TokenKind.SPREAD||n===d.TokenKind.COLON||n===d.TokenKind.EQUALS||n===d.TokenKind.AT||n===d.TokenKind.BRACKET_L||n===d.TokenKind.BRACKET_R||n===d.TokenKind.BRACE_L||n===d.TokenKind.PIPE||n===d.TokenKind.BRACE_R},(0,((t=f)&&t.__esModule?t:{default:t}).default)(o,(function(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}}))}));i(y);y.createLexer,y.isPunctuatorToken;var N=r((function(e,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(e){return o(e,[])};var t,i=(t=p)&&t.__esModule?t:{default:t};function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e,n){switch(r(e)){case"string":return JSON.stringify(e);case"function":return e.name?"[function ".concat(e.name,"]"):"[function]";case"object":return null===e?"null":function(e,n){if(-1!==n.indexOf(e))return"[Circular]";var t=[].concat(n,[e]),r=function(e){var n=e[String(i.default)];if("function"==typeof n)return n;if("function"==typeof e.inspect)return e.inspect}(e);if(void 0!==r){var a=r.call(e);if(a!==e)return"string"==typeof a?a:o(a,t)}else if(Array.isArray(e))return function(e,n){if(0===e.length)return"[]";if(n.length>2)return"[Array]";for(var t=Math.min(10,e.length),i=e.length-t,r=[],a=0;a<t;++a)r.push(o(e[a],n));1===i?r.push("... 1 more item"):i>1&&r.push("... ".concat(i," more items"));return"["+r.join(", ")+"]"}(e,t);return function(e,n){var t=Object.keys(e);if(0===t.length)return"{}";if(n.length>2)return"["+function(e){var n=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if("Object"===n&&"function"==typeof e.constructor){var t=e.constructor.name;if("string"==typeof t&&""!==t)return t}return n}(e)+"]";return"{ "+t.map((function(t){return t+": "+o(e[t],n)})).join(", ")+" }"}(e,t)}(e,n);default:return String(e)}}}));i(N);var m=r((function(e,n){Object.defineProperty(n,"__esModule",{value:!0}),n.DirectiveLocation=void 0;var t=Object.freeze({QUERY:"QUERY",MUTATION:"MUTATION",SUBSCRIPTION:"SUBSCRIPTION",FIELD:"FIELD",FRAGMENT_DEFINITION:"FRAGMENT_DEFINITION",FRAGMENT_SPREAD:"FRAGMENT_SPREAD",INLINE_FRAGMENT:"INLINE_FRAGMENT",VARIABLE_DEFINITION:"VARIABLE_DEFINITION",SCHEMA:"SCHEMA",SCALAR:"SCALAR",OBJECT:"OBJECT",FIELD_DEFINITION:"FIELD_DEFINITION",ARGUMENT_DEFINITION:"ARGUMENT_DEFINITION",INTERFACE:"INTERFACE",UNION:"UNION",ENUM:"ENUM",ENUM_VALUE:"ENUM_VALUE",INPUT_OBJECT:"INPUT_OBJECT",INPUT_FIELD_DEFINITION:"INPUT_FIELD_DEFINITION"});n.DirectiveLocation=t}));i(m);m.DirectiveLocation;var k=r((function(e,n){Object.defineProperty(n,"__esModule",{value:!0}),n.parse=function(e,n){return new c(e,n).parseDocument()},n.parseValue=function(e,n){var t=new c(e,n);t.expectToken(d.TokenKind.SOF);var i=t.parseValueLiteral(!1);return t.expectToken(d.TokenKind.EOF),i},n.parseType=function(e,n){var t=new c(e,n);t.expectToken(d.TokenKind.SOF);var i=t.parseTypeReference();return t.expectToken(d.TokenKind.EOF),i};var t=a(N),i=a(o),r=a(f);function a(e){return e&&e.__esModule?e:{default:e}}var c=function(){function e(e,n){var r="string"==typeof e?new s.Source(e):e;r instanceof s.Source||(0,i.default)(0,"Must provide Source. Received: ".concat((0,t.default)(r))),this._lexer=(0,y.createLexer)(r),this._options=n||{}}var n=e.prototype;return n.parseName=function(){var e=this.expectToken(d.TokenKind.NAME);return{kind:l.Kind.NAME,value:e.value,loc:this.loc(e)}},n.parseDocument=function(){var e=this._lexer.token;return{kind:l.Kind.DOCUMENT,definitions:this.many(d.TokenKind.SOF,this.parseDefinition,d.TokenKind.EOF),loc:this.loc(e)}},n.parseDefinition=function(){if(this.peek(d.TokenKind.NAME))switch(this._lexer.token.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition();case"schema":case"scalar":case"type":case"interface":case"union":case"enum":case"input":case"directive":return this.parseTypeSystemDefinition();case"extend":return this.parseTypeSystemExtension()}else{if(this.peek(d.TokenKind.BRACE_L))return this.parseOperationDefinition();if(this.peekDescription())return this.parseTypeSystemDefinition()}throw this.unexpected()},n.parseOperationDefinition=function(){var e=this._lexer.token;if(this.peek(d.TokenKind.BRACE_L))return{kind:l.Kind.OPERATION_DEFINITION,operation:"query",name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet(),loc:this.loc(e)};var n,t=this.parseOperationType();return this.peek(d.TokenKind.NAME)&&(n=this.parseName()),{kind:l.Kind.OPERATION_DEFINITION,operation:t,name:n,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(e)}},n.parseOperationType=function(){var e=this.expectToken(d.TokenKind.NAME);switch(e.value){case"query":return"query";case"mutation":return"mutation";case"subscription":return"subscription"}throw this.unexpected(e)},n.parseVariableDefinitions=function(){return this.optionalMany(d.TokenKind.PAREN_L,this.parseVariableDefinition,d.TokenKind.PAREN_R)},n.parseVariableDefinition=function(){var e=this._lexer.token;return{kind:l.Kind.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(d.TokenKind.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(d.TokenKind.EQUALS)?this.parseValueLiteral(!0):void 0,directives:this.parseDirectives(!0),loc:this.loc(e)}},n.parseVariable=function(){var e=this._lexer.token;return this.expectToken(d.TokenKind.DOLLAR),{kind:l.Kind.VARIABLE,name:this.parseName(),loc:this.loc(e)}},n.parseSelectionSet=function(){var e=this._lexer.token;return{kind:l.Kind.SELECTION_SET,selections:this.many(d.TokenKind.BRACE_L,this.parseSelection,d.TokenKind.BRACE_R),loc:this.loc(e)}},n.parseSelection=function(){return this.peek(d.TokenKind.SPREAD)?this.parseFragment():this.parseField()},n.parseField=function(){var e,n,t=this._lexer.token,i=this.parseName();return this.expectOptionalToken(d.TokenKind.COLON)?(e=i,n=this.parseName()):n=i,{kind:l.Kind.FIELD,alias:e,name:n,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(d.TokenKind.BRACE_L)?this.parseSelectionSet():void 0,loc:this.loc(t)}},n.parseArguments=function(e){var n=e?this.parseConstArgument:this.parseArgument;return this.optionalMany(d.TokenKind.PAREN_L,n,d.TokenKind.PAREN_R)},n.parseArgument=function(){var e=this._lexer.token,n=this.parseName();return this.expectToken(d.TokenKind.COLON),{kind:l.Kind.ARGUMENT,name:n,value:this.parseValueLiteral(!1),loc:this.loc(e)}},n.parseConstArgument=function(){var e=this._lexer.token;return{kind:l.Kind.ARGUMENT,name:this.parseName(),value:(this.expectToken(d.TokenKind.COLON),this.parseValueLiteral(!0)),loc:this.loc(e)}},n.parseFragment=function(){var e=this._lexer.token;this.expectToken(d.TokenKind.SPREAD);var n=this.expectOptionalKeyword("on");return!n&&this.peek(d.TokenKind.NAME)?{kind:l.Kind.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1),loc:this.loc(e)}:{kind:l.Kind.INLINE_FRAGMENT,typeCondition:n?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(e)}},n.parseFragmentDefinition=function(){var e=this._lexer.token;return this.expectKeyword("fragment"),this._options.experimentalFragmentVariables?{kind:l.Kind.FRAGMENT_DEFINITION,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(e)}:{kind:l.Kind.FRAGMENT_DEFINITION,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(e)}},n.parseFragmentName=function(){if("on"===this._lexer.token.value)throw this.unexpected();return this.parseName()},n.parseValueLiteral=function(e){var n=this._lexer.token;switch(n.kind){case d.TokenKind.BRACKET_L:return this.parseList(e);case d.TokenKind.BRACE_L:return this.parseObject(e);case d.TokenKind.INT:return this._lexer.advance(),{kind:l.Kind.INT,value:n.value,loc:this.loc(n)};case d.TokenKind.FLOAT:return this._lexer.advance(),{kind:l.Kind.FLOAT,value:n.value,loc:this.loc(n)};case d.TokenKind.STRING:case d.TokenKind.BLOCK_STRING:return this.parseStringLiteral();case d.TokenKind.NAME:return"true"===n.value||"false"===n.value?(this._lexer.advance(),{kind:l.Kind.BOOLEAN,value:"true"===n.value,loc:this.loc(n)}):"null"===n.value?(this._lexer.advance(),{kind:l.Kind.NULL,loc:this.loc(n)}):(this._lexer.advance(),{kind:l.Kind.ENUM,value:n.value,loc:this.loc(n)});case d.TokenKind.DOLLAR:if(!e)return this.parseVariable()}throw this.unexpected()},n.parseStringLiteral=function(){var e=this._lexer.token;return this._lexer.advance(),{kind:l.Kind.STRING,value:e.value,block:e.kind===d.TokenKind.BLOCK_STRING,loc:this.loc(e)}},n.parseList=function(e){var n=this,t=this._lexer.token;return{kind:l.Kind.LIST,values:this.any(d.TokenKind.BRACKET_L,(function(){return n.parseValueLiteral(e)}),d.TokenKind.BRACKET_R),loc:this.loc(t)}},n.parseObject=function(e){var n=this,t=this._lexer.token;return{kind:l.Kind.OBJECT,fields:this.any(d.TokenKind.BRACE_L,(function(){return n.parseObjectField(e)}),d.TokenKind.BRACE_R),loc:this.loc(t)}},n.parseObjectField=function(e){var n=this._lexer.token,t=this.parseName();return this.expectToken(d.TokenKind.COLON),{kind:l.Kind.OBJECT_FIELD,name:t,value:this.parseValueLiteral(e),loc:this.loc(n)}},n.parseDirectives=function(e){for(var n=[];this.peek(d.TokenKind.AT);)n.push(this.parseDirective(e));return n},n.parseDirective=function(e){var n=this._lexer.token;return this.expectToken(d.TokenKind.AT),{kind:l.Kind.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(e),loc:this.loc(n)}},n.parseTypeReference=function(){var e,n=this._lexer.token;return this.expectOptionalToken(d.TokenKind.BRACKET_L)?(e=this.parseTypeReference(),this.expectToken(d.TokenKind.BRACKET_R),e={kind:l.Kind.LIST_TYPE,type:e,loc:this.loc(n)}):e=this.parseNamedType(),this.expectOptionalToken(d.TokenKind.BANG)?{kind:l.Kind.NON_NULL_TYPE,type:e,loc:this.loc(n)}:e},n.parseNamedType=function(){var e=this._lexer.token;return{kind:l.Kind.NAMED_TYPE,name:this.parseName(),loc:this.loc(e)}},n.parseTypeSystemDefinition=function(){var e=this.peekDescription()?this._lexer.lookahead():this._lexer.token;if(e.kind===d.TokenKind.NAME)switch(e.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()}throw this.unexpected(e)},n.peekDescription=function(){return this.peek(d.TokenKind.STRING)||this.peek(d.TokenKind.BLOCK_STRING)},n.parseDescription=function(){if(this.peekDescription())return this.parseStringLiteral()},n.parseSchemaDefinition=function(){var e=this._lexer.token;this.expectKeyword("schema");var n=this.parseDirectives(!0),t=this.many(d.TokenKind.BRACE_L,this.parseOperationTypeDefinition,d.TokenKind.BRACE_R);return{kind:l.Kind.SCHEMA_DEFINITION,directives:n,operationTypes:t,loc:this.loc(e)}},n.parseOperationTypeDefinition=function(){var e=this._lexer.token,n=this.parseOperationType();this.expectToken(d.TokenKind.COLON);var t=this.parseNamedType();return{kind:l.Kind.OPERATION_TYPE_DEFINITION,operation:n,type:t,loc:this.loc(e)}},n.parseScalarTypeDefinition=function(){var e=this._lexer.token,n=this.parseDescription();this.expectKeyword("scalar");var t=this.parseName(),i=this.parseDirectives(!0);return{kind:l.Kind.SCALAR_TYPE_DEFINITION,description:n,name:t,directives:i,loc:this.loc(e)}},n.parseObjectTypeDefinition=function(){var e=this._lexer.token,n=this.parseDescription();this.expectKeyword("type");var t=this.parseName(),i=this.parseImplementsInterfaces(),r=this.parseDirectives(!0),o=this.parseFieldsDefinition();return{kind:l.Kind.OBJECT_TYPE_DEFINITION,description:n,name:t,interfaces:i,directives:r,fields:o,loc:this.loc(e)}},n.parseImplementsInterfaces=function(){var e=[];if(this.expectOptionalKeyword("implements")){this.expectOptionalToken(d.TokenKind.AMP);do{e.push(this.parseNamedType())}while(this.expectOptionalToken(d.TokenKind.AMP)||this._options.allowLegacySDLImplementsInterfaces&&this.peek(d.TokenKind.NAME))}return e},n.parseFieldsDefinition=function(){return this._options.allowLegacySDLEmptyFields&&this.peek(d.TokenKind.BRACE_L)&&this._lexer.lookahead().kind===d.TokenKind.BRACE_R?(this._lexer.advance(),this._lexer.advance(),[]):this.optionalMany(d.TokenKind.BRACE_L,this.parseFieldDefinition,d.TokenKind.BRACE_R)},n.parseFieldDefinition=function(){var e=this._lexer.token,n=this.parseDescription(),t=this.parseName(),i=this.parseArgumentDefs();this.expectToken(d.TokenKind.COLON);var r=this.parseTypeReference(),o=this.parseDirectives(!0);return{kind:l.Kind.FIELD_DEFINITION,description:n,name:t,arguments:i,type:r,directives:o,loc:this.loc(e)}},n.parseArgumentDefs=function(){return this.optionalMany(d.TokenKind.PAREN_L,this.parseInputValueDef,d.TokenKind.PAREN_R)},n.parseInputValueDef=function(){var e=this._lexer.token,n=this.parseDescription(),t=this.parseName();this.expectToken(d.TokenKind.COLON);var i,r=this.parseTypeReference();this.expectOptionalToken(d.TokenKind.EQUALS)&&(i=this.parseValueLiteral(!0));var o=this.parseDirectives(!0);return{kind:l.Kind.INPUT_VALUE_DEFINITION,description:n,name:t,type:r,defaultValue:i,directives:o,loc:this.loc(e)}},n.parseInterfaceTypeDefinition=function(){var e=this._lexer.token,n=this.parseDescription();this.expectKeyword("interface");var t=this.parseName(),i=this.parseDirectives(!0),r=this.parseFieldsDefinition();return{kind:l.Kind.INTERFACE_TYPE_DEFINITION,description:n,name:t,directives:i,fields:r,loc:this.loc(e)}},n.parseUnionTypeDefinition=function(){var e=this._lexer.token,n=this.parseDescription();this.expectKeyword("union");var t=this.parseName(),i=this.parseDirectives(!0),r=this.parseUnionMemberTypes();return{kind:l.Kind.UNION_TYPE_DEFINITION,description:n,name:t,directives:i,types:r,loc:this.loc(e)}},n.parseUnionMemberTypes=function(){var e=[];if(this.expectOptionalToken(d.TokenKind.EQUALS)){this.expectOptionalToken(d.TokenKind.PIPE);do{e.push(this.parseNamedType())}while(this.expectOptionalToken(d.TokenKind.PIPE))}return e},n.parseEnumTypeDefinition=function(){var e=this._lexer.token,n=this.parseDescription();this.expectKeyword("enum");var t=this.parseName(),i=this.parseDirectives(!0),r=this.parseEnumValuesDefinition();return{kind:l.Kind.ENUM_TYPE_DEFINITION,description:n,name:t,directives:i,values:r,loc:this.loc(e)}},n.parseEnumValuesDefinition=function(){return this.optionalMany(d.TokenKind.BRACE_L,this.parseEnumValueDefinition,d.TokenKind.BRACE_R)},n.parseEnumValueDefinition=function(){var e=this._lexer.token,n=this.parseDescription(),t=this.parseName(),i=this.parseDirectives(!0);return{kind:l.Kind.ENUM_VALUE_DEFINITION,description:n,name:t,directives:i,loc:this.loc(e)}},n.parseInputObjectTypeDefinition=function(){var e=this._lexer.token,n=this.parseDescription();this.expectKeyword("input");var t=this.parseName(),i=this.parseDirectives(!0),r=this.parseInputFieldsDefinition();return{kind:l.Kind.INPUT_OBJECT_TYPE_DEFINITION,description:n,name:t,directives:i,fields:r,loc:this.loc(e)}},n.parseInputFieldsDefinition=function(){return this.optionalMany(d.TokenKind.BRACE_L,this.parseInputValueDef,d.TokenKind.BRACE_R)},n.parseTypeSystemExtension=function(){var e=this._lexer.lookahead();if(e.kind===d.TokenKind.NAME)switch(e.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(e)},n.parseSchemaExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");var n=this.parseDirectives(!0),t=this.optionalMany(d.TokenKind.BRACE_L,this.parseOperationTypeDefinition,d.TokenKind.BRACE_R);if(0===n.length&&0===t.length)throw this.unexpected();return{kind:l.Kind.SCHEMA_EXTENSION,directives:n,operationTypes:t,loc:this.loc(e)}},n.parseScalarTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");var n=this.parseName(),t=this.parseDirectives(!0);if(0===t.length)throw this.unexpected();return{kind:l.Kind.SCALAR_TYPE_EXTENSION,name:n,directives:t,loc:this.loc(e)}},n.parseObjectTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");var n=this.parseName(),t=this.parseImplementsInterfaces(),i=this.parseDirectives(!0),r=this.parseFieldsDefinition();if(0===t.length&&0===i.length&&0===r.length)throw this.unexpected();return{kind:l.Kind.OBJECT_TYPE_EXTENSION,name:n,interfaces:t,directives:i,fields:r,loc:this.loc(e)}},n.parseInterfaceTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");var n=this.parseName(),t=this.parseDirectives(!0),i=this.parseFieldsDefinition();if(0===t.length&&0===i.length)throw this.unexpected();return{kind:l.Kind.INTERFACE_TYPE_EXTENSION,name:n,directives:t,fields:i,loc:this.loc(e)}},n.parseUnionTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");var n=this.parseName(),t=this.parseDirectives(!0),i=this.parseUnionMemberTypes();if(0===t.length&&0===i.length)throw this.unexpected();return{kind:l.Kind.UNION_TYPE_EXTENSION,name:n,directives:t,types:i,loc:this.loc(e)}},n.parseEnumTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");var n=this.parseName(),t=this.parseDirectives(!0),i=this.parseEnumValuesDefinition();if(0===t.length&&0===i.length)throw this.unexpected();return{kind:l.Kind.ENUM_TYPE_EXTENSION,name:n,directives:t,values:i,loc:this.loc(e)}},n.parseInputObjectTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");var n=this.parseName(),t=this.parseDirectives(!0),i=this.parseInputFieldsDefinition();if(0===t.length&&0===i.length)throw this.unexpected();return{kind:l.Kind.INPUT_OBJECT_TYPE_EXTENSION,name:n,directives:t,fields:i,loc:this.loc(e)}},n.parseDirectiveDefinition=function(){var e=this._lexer.token,n=this.parseDescription();this.expectKeyword("directive"),this.expectToken(d.TokenKind.AT);var t=this.parseName(),i=this.parseArgumentDefs(),r=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");var o=this.parseDirectiveLocations();return{kind:l.Kind.DIRECTIVE_DEFINITION,description:n,name:t,arguments:i,repeatable:r,locations:o,loc:this.loc(e)}},n.parseDirectiveLocations=function(){this.expectOptionalToken(d.TokenKind.PIPE);var e=[];do{e.push(this.parseDirectiveLocation())}while(this.expectOptionalToken(d.TokenKind.PIPE));return e},n.parseDirectiveLocation=function(){var e=this._lexer.token,n=this.parseName();if(void 0!==m.DirectiveLocation[n.value])return n;throw this.unexpected(e)},n.loc=function(e){if(!this._options.noLocation)return new u(e,this._lexer.lastToken,this._lexer.source)},n.peek=function(e){return this._lexer.token.kind===e},n.expectToken=function(e){var n=this._lexer.token;if(n.kind===e)return this._lexer.advance(),n;throw(0,v.syntaxError)(this._lexer.source,n.start,"Expected ".concat(e,", found ").concat(p(n)))},n.expectOptionalToken=function(e){var n=this._lexer.token;if(n.kind===e)return this._lexer.advance(),n},n.expectKeyword=function(e){var n=this._lexer.token;if(n.kind!==d.TokenKind.NAME||n.value!==e)throw(0,v.syntaxError)(this._lexer.source,n.start,'Expected "'.concat(e,'", found ').concat(p(n)));this._lexer.advance()},n.expectOptionalKeyword=function(e){var n=this._lexer.token;return n.kind===d.TokenKind.NAME&&n.value===e&&(this._lexer.advance(),!0)},n.unexpected=function(e){var n=e||this._lexer.token;return(0,v.syntaxError)(this._lexer.source,n.start,"Unexpected ".concat(p(n)))},n.any=function(e,n,t){this.expectToken(e);for(var i=[];!this.expectOptionalToken(t);)i.push(n.call(this));return i},n.optionalMany=function(e,n,t){if(this.expectOptionalToken(e)){var i=[];do{i.push(n.call(this))}while(!this.expectOptionalToken(t));return i}return[]},n.many=function(e,n,t){this.expectToken(e);var i=[];do{i.push(n.call(this))}while(!this.expectOptionalToken(t));return i},e}();function u(e,n,t){this.start=e.start,this.end=n.end,this.startToken=e,this.endToken=n,this.source=t}function p(e){var n=e.value;return n?"".concat(e.kind,' "').concat(n,'"'):e.kind}(0,r.default)(u,(function(){return{start:this.start,end:this.end}}))}));i(k);k.parse,k.parseValue,k.parseType;var I=r((function(e,n){Object.defineProperty(n,"__esModule",{value:!0}),n.visit=function(e,n){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:r,c=void 0,u=Array.isArray(e),l=[e],d=-1,p=[],f=void 0,h=void 0,T=void 0,v=[],E=[],y=e;do{var N=++d===l.length,m=N&&0!==p.length;if(N){if(h=0===E.length?void 0:v[v.length-1],f=T,T=E.pop(),m){if(u)f=f.slice();else{for(var k={},I=0,_=Object.keys(f);I<_.length;I++){var O=_[I];k[O]=f[O]}f=k}for(var D=0,x=0;x<p.length;x++){var K=p[x][0],A=p[x][1];u&&(K-=D),u&&null===A?(f.splice(K,1),D++):f[K]=A}}d=c.index,l=c.keys,p=c.edits,u=c.inArray,c=c.prev}else{if(h=T?u?d:l[d]:void 0,null==(f=T?T[h]:y))continue;T&&v.push(h)}var b=void 0;if(!Array.isArray(f)){if(!a(f))throw new Error("Invalid AST Node: "+(0,i.default)(f));var S=s(n,f.kind,N);if(S){if((b=S.call(n,f,h,T,v,E))===o)break;if(!1===b){if(!N){v.pop();continue}}else if(void 0!==b&&(p.push([h,b]),!N)){if(!a(b)){v.pop();continue}f=b}}}void 0===b&&m&&p.push([h,f]),N?v.pop():(c={inArray:u,index:d,keys:l,edits:p,prev:c},u=Array.isArray(f),l=u?f:t[f.kind]||[],d=-1,p=[],T&&E.push(T),T=f)}while(void 0!==c);0!==p.length&&(y=p[p.length-1][1]);return y},n.visitInParallel=function(e){var n=new Array(e.length);return{enter:function(t){for(var i=0;i<e.length;i++)if(!n[i]){var r=s(e[i],t.kind,!1);if(r){var a=r.apply(e[i],arguments);if(!1===a)n[i]=t;else if(a===o)n[i]=o;else if(void 0!==a)return a}}},leave:function(t){for(var i=0;i<e.length;i++)if(n[i])n[i]===t&&(n[i]=null);else{var r=s(e[i],t.kind,!0);if(r){var a=r.apply(e[i],arguments);if(a===o)n[i]=o;else if(void 0!==a&&!1!==a)return a}}}}},n.visitWithTypeInfo=function(e,n){return{enter:function(t){e.enter(t);var i=s(n,t.kind,!1);if(i){var r=i.apply(n,arguments);return void 0!==r&&(e.leave(t),a(r)&&e.enter(r)),r}},leave:function(t){var i,r=s(n,t.kind,!0);return r&&(i=r.apply(n,arguments)),e.leave(t),i}}},n.getVisitFn=s,n.BREAK=n.QueryDocumentKeys=void 0;var t,i=(t=N)&&t.__esModule?t:{default:t};var r={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:["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","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","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"]};n.QueryDocumentKeys=r;var o=Object.freeze({});function a(e){return Boolean(e&&"string"==typeof e.kind)}function s(e,n,t){var i=e[n];if(i){if(!t&&"function"==typeof i)return i;var r=t?i.leave:i.enter;if("function"==typeof r)return r}else{var o=t?e.leave:e.enter;if(o){if("function"==typeof o)return o;var a=o[n];if("function"==typeof a)return a}}}n.BREAK=o}));i(I);I.visit,I.visitInParallel,I.visitWithTypeInfo,I.getVisitFn,I.BREAK,I.QueryDocumentKeys;var _=r((function(e,n){Object.defineProperty(n,"__esModule",{value:!0}),n.print=function(e){return(0,I.visit)(e,{leave:t})};var t={Name:function(e){return e.value},Variable:function(e){return"$"+e.name},Document:function(e){return r(e.definitions,"\n\n")+"\n"},OperationDefinition:function(e){var n=e.operation,t=e.name,i=a("(",r(e.variableDefinitions,", "),")"),o=r(e.directives," "),s=e.selectionSet;return t||o||i||"query"!==n?r([n,r([t,i]),o,s]," "):s},VariableDefinition:function(e){var n=e.variable,t=e.type,i=e.defaultValue,o=e.directives;return n+": "+t+a(" = ",i)+a(" ",r(o," "))},SelectionSet:function(e){return o(e.selections)},Field:function(e){var n=e.alias,t=e.name,i=e.arguments,o=e.directives,s=e.selectionSet;return r([a("",n,": ")+t+a("(",r(i,", "),")"),r(o," "),s]," ")},Argument:function(e){return e.name+": "+e.value},FragmentSpread:function(e){return"..."+e.name+a(" ",r(e.directives," "))},InlineFragment:function(e){var n=e.typeCondition,t=e.directives,i=e.selectionSet;return r(["...",a("on ",n),r(t," "),i]," ")},FragmentDefinition:function(e){var n=e.name,t=e.typeCondition,i=e.variableDefinitions,o=e.directives,s=e.selectionSet;return("fragment ".concat(n).concat(a("(",r(i,", "),")")," ")+"on ".concat(t," ").concat(a("",r(o," ")," "))+s)},IntValue:function(e){return e.value},FloatValue:function(e){return e.value},StringValue:function(e,n){var t=e.value;return e.block?(0,E.printBlockString)(t,"description"===n?"":" "):JSON.stringify(t)},BooleanValue:function(e){return e.value?"true":"false"},NullValue:function(){return"null"},EnumValue:function(e){return e.value},ListValue:function(e){return"["+r(e.values,", ")+"]"},ObjectValue:function(e){return"{"+r(e.fields,", ")+"}"},ObjectField:function(e){return e.name+": "+e.value},Directive:function(e){return"@"+e.name+a("(",r(e.arguments,", "),")")},NamedType:function(e){return e.name},ListType:function(e){return"["+e.type+"]"},NonNullType:function(e){return e.type+"!"},SchemaDefinition:function(e){var n=e.directives,t=e.operationTypes;return r(["schema",r(n," "),o(t)]," ")},OperationTypeDefinition:function(e){return e.operation+": "+e.type},ScalarTypeDefinition:i((function(e){return r(["scalar",e.name,r(e.directives," ")]," ")})),ObjectTypeDefinition:i((function(e){var n=e.name,t=e.interfaces,i=e.directives,s=e.fields;return r(["type",n,a("implements ",r(t," & ")),r(i," "),o(s)]," ")})),FieldDefinition:i((function(e){var n=e.name,t=e.arguments,i=e.type,o=e.directives;return n+(u(t)?a("(\n",s(r(t,"\n")),"\n)"):a("(",r(t,", "),")"))+": "+i+a(" ",r(o," "))})),InputValueDefinition:i((function(e){var n=e.name,t=e.type,i=e.defaultValue,o=e.directives;return r([n+": "+t,a("= ",i),r(o," ")]," ")})),InterfaceTypeDefinition:i((function(e){var n=e.name,t=e.directives,i=e.fields;return r(["interface",n,r(t," "),o(i)]," ")})),UnionTypeDefinition:i((function(e){var n=e.name,t=e.directives,i=e.types;return r(["union",n,r(t," "),i&&0!==i.length?"= "+r(i," | "):""]," ")})),EnumTypeDefinition:i((function(e){var n=e.name,t=e.directives,i=e.values;return r(["enum",n,r(t," "),o(i)]," ")})),EnumValueDefinition:i((function(e){return r([e.name,r(e.directives," ")]," ")})),InputObjectTypeDefinition:i((function(e){var n=e.name,t=e.directives,i=e.fields;return r(["input",n,r(t," "),o(i)]," ")})),DirectiveDefinition:i((function(e){var n=e.name,t=e.arguments,i=e.repeatable,o=e.locations;return"directive @"+n+(u(t)?a("(\n",s(r(t,"\n")),"\n)"):a("(",r(t,", "),")"))+(i?" repeatable":"")+" on "+r(o," | ")})),SchemaExtension:function(e){var n=e.directives,t=e.operationTypes;return r(["extend schema",r(n," "),o(t)]," ")},ScalarTypeExtension:function(e){return r(["extend scalar",e.name,r(e.directives," ")]," ")},ObjectTypeExtension:function(e){var n=e.name,t=e.interfaces,i=e.directives,s=e.fields;return r(["extend type",n,a("implements ",r(t," & ")),r(i," "),o(s)]," ")},InterfaceTypeExtension:function(e){var n=e.name,t=e.directives,i=e.fields;return r(["extend interface",n,r(t," "),o(i)]," ")},UnionTypeExtension:function(e){var n=e.name,t=e.directives,i=e.types;return r(["extend union",n,r(t," "),i&&0!==i.length?"= "+r(i," | "):""]," ")},EnumTypeExtension:function(e){var n=e.name,t=e.directives,i=e.values;return r(["extend enum",n,r(t," "),o(i)]," ")},InputObjectTypeExtension:function(e){var n=e.name,t=e.directives,i=e.fields;return r(["extend input",n,r(t," "),o(i)]," ")}};function i(e){return function(n){return r([n.description,e(n)],"\n")}}function r(e,n){return e?e.filter((function(e){return e})).join(n||""):""}function o(e){return e&&0!==e.length?"{\n"+s(r(e,"\n"))+"\n}":""}function a(e,n,t){return n?e+n+(t||""):""}function s(e){return e&&" "+e.replace(/\n/g,"\n ")}function c(e){return-1!==e.indexOf("\n")}function u(e){return e&&e.some(c)}}));i(_);_.print;var O=r((function(e,n){function t(e){return e.kind===l.Kind.OPERATION_DEFINITION||e.kind===l.Kind.FRAGMENT_DEFINITION}function i(e){return e.kind===l.Kind.SCHEMA_DEFINITION||r(e)||e.kind===l.Kind.DIRECTIVE_DEFINITION}function r(e){return e.kind===l.Kind.SCALAR_TYPE_DEFINITION||e.kind===l.Kind.OBJECT_TYPE_DEFINITION||e.kind===l.Kind.INTERFACE_TYPE_DEFINITION||e.kind===l.Kind.UNION_TYPE_DEFINITION||e.kind===l.Kind.ENUM_TYPE_DEFINITION||e.kind===l.Kind.INPUT_OBJECT_TYPE_DEFINITION}function o(e){return e.kind===l.Kind.SCHEMA_EXTENSION||a(e)}function a(e){return e.kind===l.Kind.SCALAR_TYPE_EXTENSION||e.kind===l.Kind.OBJECT_TYPE_EXTENSION||e.kind===l.Kind.INTERFACE_TYPE_EXTENSION||e.kind===l.Kind.UNION_TYPE_EXTENSION||e.kind===l.Kind.ENUM_TYPE_EXTENSION||e.kind===l.Kind.INPUT_OBJECT_TYPE_EXTENSION}Object.defineProperty(n,"__esModule",{value:!0}),n.isDefinitionNode=function(e){return t(e)||i(e)||o(e)},n.isExecutableDefinitionNode=t,n.isSelectionNode=function(e){return e.kind===l.Kind.FIELD||e.kind===l.Kind.FRAGMENT_SPREAD||e.kind===l.Kind.INLINE_FRAGMENT},n.isValueNode=function(e){return e.kind===l.Kind.VARIABLE||e.kind===l.Kind.INT||e.kind===l.Kind.FLOAT||e.kind===l.Kind.STRING||e.kind===l.Kind.BOOLEAN||e.kind===l.Kind.NULL||e.kind===l.Kind.ENUM||e.kind===l.Kind.LIST||e.kind===l.Kind.OBJECT},n.isTypeNode=function(e){return e.kind===l.Kind.NAMED_TYPE||e.kind===l.Kind.LIST_TYPE||e.kind===l.Kind.NON_NULL_TYPE},n.isTypeSystemDefinitionNode=i,n.isTypeDefinitionNode=r,n.isTypeSystemExtensionNode=o,n.isTypeExtensionNode=a}));i(O);O.isDefinitionNode,O.isExecutableDefinitionNode,O.isSelectionNode,O.isValueNode,O.isTypeNode,O.isTypeSystemDefinitionNode,O.isTypeDefinitionNode,O.isTypeSystemExtensionNode,O.isTypeExtensionNode;var D=r((function(e,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"Source",{enumerable:!0,get:function(){return s.Source}}),Object.defineProperty(n,"getLocation",{enumerable:!0,get:function(){return c.getLocation}}),Object.defineProperty(n,"printLocation",{enumerable:!0,get:function(){return u.printLocation}}),Object.defineProperty(n,"printSourceLocation",{enumerable:!0,get:function(){return u.printSourceLocation}}),Object.defineProperty(n,"Kind",{enumerable:!0,get:function(){return l.Kind}}),Object.defineProperty(n,"TokenKind",{enumerable:!0,get:function(){return d.TokenKind}}),Object.defineProperty(n,"createLexer",{enumerable:!0,get:function(){return y.createLexer}}),Object.defineProperty(n,"parse",{enumerable:!0,get:function(){return k.parse}}),Object.defineProperty(n,"parseValue",{enumerable:!0,get:function(){return k.parseValue}}),Object.defineProperty(n,"parseType",{enumerable:!0,get:function(){return k.parseType}}),Object.defineProperty(n,"print",{enumerable:!0,get:function(){return _.print}}),Object.defineProperty(n,"visit",{enumerable:!0,get:function(){return I.visit}}),Object.defineProperty(n,"visitInParallel",{enumerable:!0,get:function(){return I.visitInParallel}}),Object.defineProperty(n,"visitWithTypeInfo",{enumerable:!0,get:function(){return I.visitWithTypeInfo}}),Object.defineProperty(n,"getVisitFn",{enumerable:!0,get:function(){return I.getVisitFn}}),Object.defineProperty(n,"BREAK",{enumerable:!0,get:function(){return I.BREAK}}),Object.defineProperty(n,"isDefinitionNode",{enumerable:!0,get:function(){return O.isDefinitionNode}}),Object.defineProperty(n,"isExecutableDefinitionNode",{enumerable:!0,get:function(){return O.isExecutableDefinitionNode}}),Object.defineProperty(n,"isSelectionNode",{enumerable:!0,get:function(){return O.isSelectionNode}}),Object.defineProperty(n,"isValueNode",{enumerable:!0,get:function(){return O.isValueNode}}),Object.defineProperty(n,"isTypeNode",{enumerable:!0,get:function(){return O.isTypeNode}}),Object.defineProperty(n,"isTypeSystemDefinitionNode",{enumerable:!0,get:function(){return O.isTypeSystemDefinitionNode}}),Object.defineProperty(n,"isTypeDefinitionNode",{enumerable:!0,get:function(){return O.isTypeDefinitionNode}}),Object.defineProperty(n,"isTypeSystemExtensionNode",{enumerable:!0,get:function(){return O.isTypeSystemExtensionNode}}),Object.defineProperty(n,"isTypeExtensionNode",{enumerable:!0,get:function(){return O.isTypeExtensionNode}}),Object.defineProperty(n,"DirectiveLocation",{enumerable:!0,get:function(){return m.DirectiveLocation}})}));i(D);var x=r((function(e,n){Object.defineProperty(n,"__esModule",{value:!0}),n.locatedError=function(e,n,t){if(e&&Array.isArray(e.path))return e;return new T.GraphQLError(e&&e.message,e&&e.nodes||n,e&&e.source,e&&e.positions,t,e)}}));i(x);x.locatedError;var K=r((function(e,n){Object.defineProperty(n,"__esModule",{value:!0}),n.formatError=function(e){e||(0,i.default)(0,"Received null or undefined error.");var n=e.message||"An unknown error occurred.",t=e.locations,r=e.path,o=e.extensions;return o?{message:n,locations:t,path:r,extensions:o}:{message:n,locations:t,path:r}};var t,i=(t=o)&&t.__esModule?t:{default:t}}));i(K);K.formatError;var A=r((function(e,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"GraphQLError",{enumerable:!0,get:function(){return T.GraphQLError}}),Object.defineProperty(n,"printError",{enumerable:!0,get:function(){return T.printError}}),Object.defineProperty(n,"syntaxError",{enumerable:!0,get:function(){return v.syntaxError}}),Object.defineProperty(n,"locatedError",{enumerable:!0,get:function(){return x.locatedError}}),Object.defineProperty(n,"formatError",{enumerable:!0,get:function(){return K.formatError}})}));i(A);const{hasPragma:b}=t;var S={parsers:{graphql:{parse:function(e){const t=D;try{const n=function(e,n){const t={allowLegacySDLImplementsInterfaces:!1,experimentalFragmentVariables:!0};try{return e(n,t)}catch(i){return t.allowLegacySDLImplementsInterfaces=!0,e(n,t)}}(t.parse,e);return n.comments=function(e){const n=[],{startToken:t}=e.loc;let{next:i}=t;for(;"<EOF>"!==i.kind;)"Comment"===i.kind&&(Object.assign(i,{column:i.column-1}),n.push(i)),i=i.next;return n}(n),function e(n){if(n&&"object"==typeof n){delete n.startToken,delete n.endToken,delete n.prev,delete n.next;for(const t in n)e(n[t])}return n}(n),n}catch(e){const{GraphQLError:t}=A;throw e instanceof t?n(e.message,{start:{line:e.locations[0].line,column:e.locations[0].column}}):e}},astFormat:"graphql",hasPragma:b,locStart:e=>"number"==typeof e.start?e.start:e.loc&&e.loc.start,locEnd:e=>"number"==typeof e.end?e.end:e.loc&&e.loc.end}}},g=S.parsers;e.default=S,e.parsers=g,Object.defineProperty(e,"__esModule",{value:!0})}));
1
+ !function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n(((e=e||self).prettierPlugins=e.prettierPlugins||{},e.prettierPlugins.graphql={}))}(this,(function(e){"use strict";var n=function(e,n){const t=new SyntaxError(e+" ("+n.start.line+":"+n.start.column+")");return t.loc=n,t};var t={hasPragma:function(e){return/^\s*#[^\n\S]*@(format|prettier)\s*(\n|$)/.test(e)},insertPragma:function(e){return"# @format\n\n"+e}};function i(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function r(e,n){return e(n={exports:{}},n.exports),n.exports}var o=r((function(e,n){Object.defineProperty(n,"__esModule",{value:!0}),n.SYMBOL_TO_STRING_TAG=n.SYMBOL_ASYNC_ITERATOR=n.SYMBOL_ITERATOR=void 0;var t="function"==typeof Symbol?Symbol.iterator:"@@iterator";n.SYMBOL_ITERATOR=t;var i="function"==typeof Symbol?Symbol.asyncIterator:"@@asyncIterator";n.SYMBOL_ASYNC_ITERATOR=i;var r="function"==typeof Symbol?Symbol.toStringTag:"@@toStringTag";n.SYMBOL_TO_STRING_TAG=r}));i(o);o.SYMBOL_TO_STRING_TAG,o.SYMBOL_ASYNC_ITERATOR,o.SYMBOL_ITERATOR;var a=r((function(e,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(e,n){if(!Boolean(e))throw new Error(n)}}));i(a);var s=r((function(e,n){Object.defineProperty(n,"__esModule",{value:!0}),n.Source=void 0;var t,i=(t=a)&&t.__esModule?t:{default:t};function r(e,n){for(var t=0;t<n.length;t++){var i=n[t];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}var s=function(){function e(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"GraphQL request",t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{line:1,column:1};this.body=e,this.name=n,this.locationOffset=t,this.locationOffset.line>0||(0,i.default)(0,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||(0,i.default)(0,"column in locationOffset is 1-indexed and must be positive.")}var n,t,a;return n=e,(t=[{key:o.SYMBOL_TO_STRING_TAG,get:function(){return"Source"}}])&&r(n.prototype,t),a&&r(n,a),e}();n.Source=s}));i(s);s.Source;var c=r((function(e,n){Object.defineProperty(n,"__esModule",{value:!0}),n.getLocation=function(e,n){var t,i=/\r\n|[\n\r]/g,r=1,o=n+1;for(;(t=i.exec(e.body))&&t.index<n;)r+=1,o=n+1-(t.index+t[0].length);return{line:r,column:o}}}));i(c);c.getLocation;var u=r((function(e,n){function t(e,n){var t=e.locationOffset.column-1,o=r(t)+e.body,a=n.line-1,s=e.locationOffset.line-1,c=n.line+s,u=1===n.line?t:0,l=n.column+u,d="".concat(e.name,":").concat(c,":").concat(l,"\n"),p=o.split(/\r\n|[\n\r]/g),f=p[a];if(f.length>120){for(var h=Math.floor(l/80),T=l%80,v=[],E=0;E<f.length;E+=80)v.push(f.slice(E,E+80));return d+i([["".concat(c),v[0]]].concat(v.slice(1,h+1).map((function(e){return["",e]})),[[" ",r(T-1)+"^"],["",v[h+1]]]))}return d+i([["".concat(c-1),p[a-1]],["".concat(c),f],["",r(l-1)+"^"],["".concat(c+1),p[a+1]]])}function i(e){var n=e.filter((function(e){e[0];return void 0!==e[1]})),t=Math.max.apply(Math,n.map((function(e){return e[0].length})));return n.map((function(e){var n,i=e[0],o=e[1];return r(t-(n=i).length)+n+(o?" | "+o:" |")})).join("\n")}function r(e){return Array(e+1).join(" ")}Object.defineProperty(n,"__esModule",{value:!0}),n.printLocation=function(e){return t(e.source,(0,c.getLocation)(e.source,e.start))},n.printSourceLocation=t}));i(u);u.printLocation,u.printSourceLocation;var l=r((function(e,n){Object.defineProperty(n,"__esModule",{value:!0}),n.Kind=void 0;var t=Object.freeze({NAME:"Name",DOCUMENT:"Document",OPERATION_DEFINITION:"OperationDefinition",VARIABLE_DEFINITION:"VariableDefinition",SELECTION_SET:"SelectionSet",FIELD:"Field",ARGUMENT:"Argument",FRAGMENT_SPREAD:"FragmentSpread",INLINE_FRAGMENT:"InlineFragment",FRAGMENT_DEFINITION:"FragmentDefinition",VARIABLE:"Variable",INT:"IntValue",FLOAT:"FloatValue",STRING:"StringValue",BOOLEAN:"BooleanValue",NULL:"NullValue",ENUM:"EnumValue",LIST:"ListValue",OBJECT:"ObjectValue",OBJECT_FIELD:"ObjectField",DIRECTIVE:"Directive",NAMED_TYPE:"NamedType",LIST_TYPE:"ListType",NON_NULL_TYPE:"NonNullType",SCHEMA_DEFINITION:"SchemaDefinition",OPERATION_TYPE_DEFINITION:"OperationTypeDefinition",SCALAR_TYPE_DEFINITION:"ScalarTypeDefinition",OBJECT_TYPE_DEFINITION:"ObjectTypeDefinition",FIELD_DEFINITION:"FieldDefinition",INPUT_VALUE_DEFINITION:"InputValueDefinition",INTERFACE_TYPE_DEFINITION:"InterfaceTypeDefinition",UNION_TYPE_DEFINITION:"UnionTypeDefinition",ENUM_TYPE_DEFINITION:"EnumTypeDefinition",ENUM_VALUE_DEFINITION:"EnumValueDefinition",INPUT_OBJECT_TYPE_DEFINITION:"InputObjectTypeDefinition",DIRECTIVE_DEFINITION:"DirectiveDefinition",SCHEMA_EXTENSION:"SchemaExtension",SCALAR_TYPE_EXTENSION:"ScalarTypeExtension",OBJECT_TYPE_EXTENSION:"ObjectTypeExtension",INTERFACE_TYPE_EXTENSION:"InterfaceTypeExtension",UNION_TYPE_EXTENSION:"UnionTypeExtension",ENUM_TYPE_EXTENSION:"EnumTypeExtension",INPUT_OBJECT_TYPE_EXTENSION:"InputObjectTypeExtension"});n.Kind=t}));i(l);l.Kind;var d=r((function(e,n){Object.defineProperty(n,"__esModule",{value:!0}),n.TokenKind=void 0;var t=Object.freeze({SOF:"<SOF>",EOF:"<EOF>",BANG:"!",DOLLAR:"$",AMP:"&",PAREN_L:"(",PAREN_R:")",SPREAD:"...",COLON:":",EQUALS:"=",AT:"@",BRACKET_L:"[",BRACKET_R:"]",BRACE_L:"{",PIPE:"|",BRACE_R:"}",NAME:"Name",INT:"Int",FLOAT:"Float",STRING:"String",BLOCK_STRING:"BlockString",COMMENT:"Comment"});n.TokenKind=t}));i(d);d.TokenKind;var p=r((function(e,n){function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(e){return"object"==t(e)&&null!==e}}));i(p);var f=r((function(e,n){Object.defineProperty(n,"__esModule",{value:!0}),n.printError=y,n.GraphQLError=void 0;var t,i=(t=p)&&t.__esModule?t:{default:t};function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function a(e,n){for(var t=0;t<n.length;t++){var i=n[t];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function s(e,n){return!n||"object"!==r(n)&&"function"!=typeof n?l(e):n}function l(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function d(e){var n="function"==typeof Map?new Map:void 0;return(d=function(e){if(null===e||(t=e,-1===Function.toString.call(t).indexOf("[native code]")))return e;var t;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==n){if(n.has(e))return n.get(e);n.set(e,i)}function i(){return f(e,arguments,v(this).constructor)}return i.prototype=Object.create(e.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),T(i,e)})(e)}function f(e,n,t){return(f=h()?Reflect.construct:function(e,n,t){var i=[null];i.push.apply(i,n);var r=new(Function.bind.apply(e,i));return t&&T(r,t.prototype),r}).apply(null,arguments)}function h(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function T(e,n){return(T=Object.setPrototypeOf||function(e,n){return e.__proto__=n,e})(e,n)}function v(e){return(v=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var E=function(e){!function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),n&&T(e,n)}(p,e);var n,t,r,u,d=(n=p,function(){var e,t=v(n);if(h()){var i=v(this).constructor;e=Reflect.construct(t,arguments,i)}else e=t.apply(this,arguments);return s(this,e)});function p(e,n,t,r,o,a,u){var f,h,T,v,E;!function(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}(this,p),E=d.call(this,e);var y,N=Array.isArray(n)?0!==n.length?n:void 0:n?[n]:void 0,m=t;!m&&N&&(m=null===(y=N[0].loc)||void 0===y?void 0:y.source);var k,_=r;!_&&N&&(_=N.reduce((function(e,n){return n.loc&&e.push(n.loc.start),e}),[])),_&&0===_.length&&(_=void 0),r&&t?k=r.map((function(e){return(0,c.getLocation)(t,e)})):N&&(k=N.reduce((function(e,n){return n.loc&&e.push((0,c.getLocation)(n.loc.source,n.loc.start)),e}),[]));var O=u;if(null==O&&null!=a){var I=a.extensions;(0,i.default)(I)&&(O=I)}return Object.defineProperties(l(E),{name:{value:"GraphQLError"},message:{value:e,enumerable:!0,writable:!0},locations:{value:null!==(f=k)&&void 0!==f?f:void 0,enumerable:null!=k},path:{value:null!=o?o:void 0,enumerable:null!=o},nodes:{value:null!=N?N:void 0},source:{value:null!==(h=m)&&void 0!==h?h:void 0},positions:{value:null!==(T=_)&&void 0!==T?T:void 0},originalError:{value:a},extensions:{value:null!==(v=O)&&void 0!==v?v:void 0,enumerable:null!=O}}),(null==a?void 0:a.stack)?(Object.defineProperty(l(E),"stack",{value:a.stack,writable:!0,configurable:!0}),s(E)):(Error.captureStackTrace?Error.captureStackTrace(l(E),p):Object.defineProperty(l(E),"stack",{value:Error().stack,writable:!0,configurable:!0}),E)}return t=p,(r=[{key:"toString",value:function(){return y(this)}},{key:o.SYMBOL_TO_STRING_TAG,get:function(){return"Object"}}])&&a(t.prototype,r),u&&a(t,u),p}(d(Error));function y(e){var n=e.message;if(e.nodes)for(var t=0,i=e.nodes;t<i.length;t++){var r=i[t];r.loc&&(n+="\n\n"+(0,u.printLocation)(r.loc))}else if(e.source&&e.locations)for(var o=0,a=e.locations;o<a.length;o++){var s=a[o];n+="\n\n"+(0,u.printSourceLocation)(e.source,s)}return n}n.GraphQLError=E}));i(f);f.printError,f.GraphQLError;var h=r((function(e,n){Object.defineProperty(n,"__esModule",{value:!0}),n.syntaxError=function(e,n,t){return new f.GraphQLError("Syntax Error: ".concat(t),void 0,e,[n])}}));i(h);h.syntaxError;var T=r((function(e,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var t="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):void 0;n.default=t}));i(T);var v=r((function(e,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.prototype.toString;e.prototype.toJSON=n,e.prototype.inspect=n,i.default&&(e.prototype[i.default]=n)};var t,i=(t=T)&&t.__esModule?t:{default:t}}));i(v);var E=r((function(e,n){Object.defineProperty(n,"__esModule",{value:!0}),n.isNode=function(e){return null!=e&&"string"==typeof e.kind},n.Token=n.Location=void 0;var t,i=(t=v)&&t.__esModule?t:{default:t};var r=function(e,n,t){this.start=e.start,this.end=n.end,this.startToken=e,this.endToken=n,this.source=t};n.Location=r,(0,i.default)(r,(function(){return{start:this.start,end:this.end}}));var o=function(e,n,t,i,r,o,a){this.kind=e,this.start=n,this.end=t,this.line=i,this.column=r,this.value=a,this.prev=o,this.next=null};n.Token=o,(0,i.default)(o,(function(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}}))}));i(E);E.isNode,E.Token,E.Location;var y=r((function(e,n){function t(e){for(var n=null,t=1;t<e.length;t++){var r=e[t],o=i(r);if(o!==r.length&&((null===n||o<n)&&0===(n=o)))break}return null===n?0:n}function i(e){for(var n=0;n<e.length&&(" "===e[n]||"\t"===e[n]);)n++;return n}function r(e){return i(e)===e.length}Object.defineProperty(n,"__esModule",{value:!0}),n.dedentBlockStringValue=function(e){var n=e.split(/\r\n|[\n\r]/g),i=t(n);if(0!==i)for(var o=1;o<n.length;o++)n[o]=n[o].slice(i);for(;n.length>0&&r(n[0]);)n.shift();for(;n.length>0&&r(n[n.length-1]);)n.pop();return n.join("\n")},n.getBlockStringIndentation=t,n.printBlockString=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",t=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=-1===e.indexOf("\n"),r=" "===e[0]||"\t"===e[0],o='"'===e[e.length-1],a=!i||o||t,s="";!a||i&&r||(s+="\n"+n);s+=n?e.replace(/\n/g,"\n"+n):e,a&&(s+="\n");return'"""'+s.replace(/"""/g,'\\"""')+'"""'}}));i(y);y.dedentBlockStringValue,y.getBlockStringIndentation,y.printBlockString;var N=r((function(e,n){Object.defineProperty(n,"__esModule",{value:!0}),n.isPunctuatorTokenKind=function(e){return e===d.TokenKind.BANG||e===d.TokenKind.DOLLAR||e===d.TokenKind.AMP||e===d.TokenKind.PAREN_L||e===d.TokenKind.PAREN_R||e===d.TokenKind.SPREAD||e===d.TokenKind.COLON||e===d.TokenKind.EQUALS||e===d.TokenKind.AT||e===d.TokenKind.BRACKET_L||e===d.TokenKind.BRACKET_R||e===d.TokenKind.BRACE_L||e===d.TokenKind.PIPE||e===d.TokenKind.BRACE_R},n.Lexer=void 0;var t=function(){function e(e){var n=new E.Token(d.TokenKind.SOF,0,0,0,0,null);this.source=e,this.lastToken=n,this.token=n,this.line=1,this.lineStart=0}var n=e.prototype;return n.advance=function(){return this.lastToken=this.token,this.token=this.lookahead()},n.lookahead=function(){var e=this.token;if(e.kind!==d.TokenKind.EOF)do{var n;e=null!==(n=e.next)&&void 0!==n?n:e.next=r(this,e)}while(e.kind===d.TokenKind.COMMENT);return e},e}();function i(e){return isNaN(e)?d.TokenKind.EOF:e<127?JSON.stringify(String.fromCharCode(e)):'"\\u'.concat(("00"+e.toString(16).toUpperCase()).slice(-4),'"')}function r(e,n){var t=e.source,r=t.body,s=r.length,c=function(e,n,t){var i=e.length,r=n;for(;r<i;){var o=e.charCodeAt(r);if(9===o||32===o||44===o||65279===o)++r;else if(10===o)++r,++t.line,t.lineStart=r;else{if(13!==o)break;10===e.charCodeAt(r+1)?r+=2:++r,++t.line,t.lineStart=r}}return r}(r,n.end,e),u=e.line,l=1+c-e.lineStart;if(c>=s)return new E.Token(d.TokenKind.EOF,s,s,u,l,n);var p=r.charCodeAt(c);switch(p){case 33:return new E.Token(d.TokenKind.BANG,c,c+1,u,l,n);case 35:return function(e,n,t,i,r){var o,a=e.body,s=n;do{o=a.charCodeAt(++s)}while(!isNaN(o)&&(o>31||9===o));return new E.Token(d.TokenKind.COMMENT,n,s,t,i,r,a.slice(n+1,s))}(t,c,u,l,n);case 36:return new E.Token(d.TokenKind.DOLLAR,c,c+1,u,l,n);case 38:return new E.Token(d.TokenKind.AMP,c,c+1,u,l,n);case 40:return new E.Token(d.TokenKind.PAREN_L,c,c+1,u,l,n);case 41:return new E.Token(d.TokenKind.PAREN_R,c,c+1,u,l,n);case 46:if(46===r.charCodeAt(c+1)&&46===r.charCodeAt(c+2))return new E.Token(d.TokenKind.SPREAD,c,c+3,u,l,n);break;case 58:return new E.Token(d.TokenKind.COLON,c,c+1,u,l,n);case 61:return new E.Token(d.TokenKind.EQUALS,c,c+1,u,l,n);case 64:return new E.Token(d.TokenKind.AT,c,c+1,u,l,n);case 91:return new E.Token(d.TokenKind.BRACKET_L,c,c+1,u,l,n);case 93:return new E.Token(d.TokenKind.BRACKET_R,c,c+1,u,l,n);case 123:return new E.Token(d.TokenKind.BRACE_L,c,c+1,u,l,n);case 124:return new E.Token(d.TokenKind.PIPE,c,c+1,u,l,n);case 125:return new E.Token(d.TokenKind.BRACE_R,c,c+1,u,l,n);case 65:case 66:case 67:case 68:case 69:case 70:case 71:case 72:case 73:case 74:case 75:case 76:case 77:case 78:case 79:case 80:case 81:case 82:case 83:case 84:case 85:case 86:case 87:case 88:case 89:case 90:case 95:case 97:case 98:case 99:case 100:case 101:case 102:case 103:case 104:case 105:case 106:case 107:case 108:case 109:case 110:case 111:case 112:case 113:case 114:case 115:case 116:case 117:case 118:case 119:case 120:case 121:case 122:return function(e,n,t,i,r){var o=e.body,a=o.length,s=n+1,c=0;for(;s!==a&&!isNaN(c=o.charCodeAt(s))&&(95===c||c>=48&&c<=57||c>=65&&c<=90||c>=97&&c<=122);)++s;return new E.Token(d.TokenKind.NAME,n,s,t,i,r,o.slice(n,s))}(t,c,u,l,n);case 45:case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return function(e,n,t,r,a,s){var c=e.body,u=t,l=n,p=!1;45===u&&(u=c.charCodeAt(++l));if(48===u){if((u=c.charCodeAt(++l))>=48&&u<=57)throw(0,h.syntaxError)(e,l,"Invalid number, unexpected digit after 0: ".concat(i(u),"."))}else l=o(e,l,u),u=c.charCodeAt(l);46===u&&(p=!0,u=c.charCodeAt(++l),l=o(e,l,u),u=c.charCodeAt(l));69!==u&&101!==u||(p=!0,43!==(u=c.charCodeAt(++l))&&45!==u||(u=c.charCodeAt(++l)),l=o(e,l,u),u=c.charCodeAt(l));if(46===u||function(e){return 95===e||e>=65&&e<=90||e>=97&&e<=122}(u))throw(0,h.syntaxError)(e,l,"Invalid number, expected digit but got: ".concat(i(u),"."));return new E.Token(p?d.TokenKind.FLOAT:d.TokenKind.INT,n,l,r,a,s,c.slice(n,l))}(t,c,p,u,l,n);case 34:return 34===r.charCodeAt(c+1)&&34===r.charCodeAt(c+2)?function(e,n,t,r,o,a){var s=e.body,c=n+3,u=c,l=0,p="";for(;c<s.length&&!isNaN(l=s.charCodeAt(c));){if(34===l&&34===s.charCodeAt(c+1)&&34===s.charCodeAt(c+2))return p+=s.slice(u,c),new E.Token(d.TokenKind.BLOCK_STRING,n,c+3,t,r,o,(0,y.dedentBlockStringValue)(p));if(l<32&&9!==l&&10!==l&&13!==l)throw(0,h.syntaxError)(e,c,"Invalid character within String: ".concat(i(l),"."));10===l?(++c,++a.line,a.lineStart=c):13===l?(10===s.charCodeAt(c+1)?c+=2:++c,++a.line,a.lineStart=c):92===l&&34===s.charCodeAt(c+1)&&34===s.charCodeAt(c+2)&&34===s.charCodeAt(c+3)?(p+=s.slice(u,c)+'"""',u=c+=4):++c}throw(0,h.syntaxError)(e,c,"Unterminated string.")}(t,c,u,l,n,e):function(e,n,t,r,o){var s=e.body,c=n+1,u=c,l=0,p="";for(;c<s.length&&!isNaN(l=s.charCodeAt(c))&&10!==l&&13!==l;){if(34===l)return p+=s.slice(u,c),new E.Token(d.TokenKind.STRING,n,c+1,t,r,o,p);if(l<32&&9!==l)throw(0,h.syntaxError)(e,c,"Invalid character within String: ".concat(i(l),"."));if(++c,92===l){switch(p+=s.slice(u,c-1),l=s.charCodeAt(c)){case 34:p+='"';break;case 47:p+="/";break;case 92:p+="\\";break;case 98:p+="\b";break;case 102:p+="\f";break;case 110:p+="\n";break;case 114:p+="\r";break;case 116:p+="\t";break;case 117:var f=(v=s.charCodeAt(c+1),y=s.charCodeAt(c+2),N=s.charCodeAt(c+3),m=s.charCodeAt(c+4),a(v)<<12|a(y)<<8|a(N)<<4|a(m));if(f<0){var T=s.slice(c+1,c+5);throw(0,h.syntaxError)(e,c,"Invalid character escape sequence: \\u".concat(T,"."))}p+=String.fromCharCode(f),c+=4;break;default:throw(0,h.syntaxError)(e,c,"Invalid character escape sequence: \\".concat(String.fromCharCode(l),"."))}++c,u=c}}var v,y,N,m;throw(0,h.syntaxError)(e,c,"Unterminated string.")}(t,c,u,l,n)}throw(0,h.syntaxError)(t,c,function(e){if(e<32&&9!==e&&10!==e&&13!==e)return"Cannot contain the invalid character ".concat(i(e),".");if(39===e)return"Unexpected single quote character ('), did you mean to use a double quote (\")?";return"Cannot parse the unexpected character ".concat(i(e),".")}(p))}function o(e,n,t){var r=e.body,o=n,a=t;if(a>=48&&a<=57){do{a=r.charCodeAt(++o)}while(a>=48&&a<=57);return o}throw(0,h.syntaxError)(e,o,"Invalid number, expected digit but got: ".concat(i(a),"."))}function a(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}n.Lexer=t}));i(N);N.isPunctuatorTokenKind,N.Lexer;var m=r((function(e,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(e){return o(e,[])};var t,i=(t=T)&&t.__esModule?t:{default:t};function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e,n){switch(r(e)){case"string":return JSON.stringify(e);case"function":return e.name?"[function ".concat(e.name,"]"):"[function]";case"object":return null===e?"null":function(e,n){if(-1!==n.indexOf(e))return"[Circular]";var t=[].concat(n,[e]),r=function(e){var n=e[String(i.default)];if("function"==typeof n)return n;if("function"==typeof e.inspect)return e.inspect}(e);if(void 0!==r){var a=r.call(e);if(a!==e)return"string"==typeof a?a:o(a,t)}else if(Array.isArray(e))return function(e,n){if(0===e.length)return"[]";if(n.length>2)return"[Array]";for(var t=Math.min(10,e.length),i=e.length-t,r=[],a=0;a<t;++a)r.push(o(e[a],n));1===i?r.push("... 1 more item"):i>1&&r.push("... ".concat(i," more items"));return"["+r.join(", ")+"]"}(e,t);return function(e,n){var t=Object.keys(e);if(0===t.length)return"{}";if(n.length>2)return"["+function(e){var n=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if("Object"===n&&"function"==typeof e.constructor){var t=e.constructor.name;if("string"==typeof t&&""!==t)return t}return n}(e)+"]";return"{ "+t.map((function(t){return t+": "+o(e[t],n)})).join(", ")+" }"}(e,t)}(e,n);default:return String(e)}}}));i(m);var k=r((function(e,n){Object.defineProperty(n,"__esModule",{value:!0}),n.DirectiveLocation=void 0;var t=Object.freeze({QUERY:"QUERY",MUTATION:"MUTATION",SUBSCRIPTION:"SUBSCRIPTION",FIELD:"FIELD",FRAGMENT_DEFINITION:"FRAGMENT_DEFINITION",FRAGMENT_SPREAD:"FRAGMENT_SPREAD",INLINE_FRAGMENT:"INLINE_FRAGMENT",VARIABLE_DEFINITION:"VARIABLE_DEFINITION",SCHEMA:"SCHEMA",SCALAR:"SCALAR",OBJECT:"OBJECT",FIELD_DEFINITION:"FIELD_DEFINITION",ARGUMENT_DEFINITION:"ARGUMENT_DEFINITION",INTERFACE:"INTERFACE",UNION:"UNION",ENUM:"ENUM",ENUM_VALUE:"ENUM_VALUE",INPUT_OBJECT:"INPUT_OBJECT",INPUT_FIELD_DEFINITION:"INPUT_FIELD_DEFINITION"});n.DirectiveLocation=t}));i(k);k.DirectiveLocation;var _=r((function(e,n){Object.defineProperty(n,"__esModule",{value:!0}),n.parse=function(e,n){return new o(e,n).parseDocument()},n.parseValue=function(e,n){var t=new o(e,n);t.expectToken(d.TokenKind.SOF);var i=t.parseValueLiteral(!1);return t.expectToken(d.TokenKind.EOF),i},n.parseType=function(e,n){var t=new o(e,n);t.expectToken(d.TokenKind.SOF);var i=t.parseTypeReference();return t.expectToken(d.TokenKind.EOF),i};var t=r(m),i=r(a);function r(e){return e&&e.__esModule?e:{default:e}}var o=function(){function e(e,n){var r="string"==typeof e?new s.Source(e):e;r instanceof s.Source||(0,i.default)(0,"Must provide Source. Received: ".concat((0,t.default)(r),".")),this._lexer=new N.Lexer(r),this._options=n}var n=e.prototype;return n.parseName=function(){var e=this.expectToken(d.TokenKind.NAME);return{kind:l.Kind.NAME,value:e.value,loc:this.loc(e)}},n.parseDocument=function(){var e=this._lexer.token;return{kind:l.Kind.DOCUMENT,definitions:this.many(d.TokenKind.SOF,this.parseDefinition,d.TokenKind.EOF),loc:this.loc(e)}},n.parseDefinition=function(){if(this.peek(d.TokenKind.NAME))switch(this._lexer.token.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition();case"schema":case"scalar":case"type":case"interface":case"union":case"enum":case"input":case"directive":return this.parseTypeSystemDefinition();case"extend":return this.parseTypeSystemExtension()}else{if(this.peek(d.TokenKind.BRACE_L))return this.parseOperationDefinition();if(this.peekDescription())return this.parseTypeSystemDefinition()}throw this.unexpected()},n.parseOperationDefinition=function(){var e=this._lexer.token;if(this.peek(d.TokenKind.BRACE_L))return{kind:l.Kind.OPERATION_DEFINITION,operation:"query",name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet(),loc:this.loc(e)};var n,t=this.parseOperationType();return this.peek(d.TokenKind.NAME)&&(n=this.parseName()),{kind:l.Kind.OPERATION_DEFINITION,operation:t,name:n,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(e)}},n.parseOperationType=function(){var e=this.expectToken(d.TokenKind.NAME);switch(e.value){case"query":return"query";case"mutation":return"mutation";case"subscription":return"subscription"}throw this.unexpected(e)},n.parseVariableDefinitions=function(){return this.optionalMany(d.TokenKind.PAREN_L,this.parseVariableDefinition,d.TokenKind.PAREN_R)},n.parseVariableDefinition=function(){var e=this._lexer.token;return{kind:l.Kind.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(d.TokenKind.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(d.TokenKind.EQUALS)?this.parseValueLiteral(!0):void 0,directives:this.parseDirectives(!0),loc:this.loc(e)}},n.parseVariable=function(){var e=this._lexer.token;return this.expectToken(d.TokenKind.DOLLAR),{kind:l.Kind.VARIABLE,name:this.parseName(),loc:this.loc(e)}},n.parseSelectionSet=function(){var e=this._lexer.token;return{kind:l.Kind.SELECTION_SET,selections:this.many(d.TokenKind.BRACE_L,this.parseSelection,d.TokenKind.BRACE_R),loc:this.loc(e)}},n.parseSelection=function(){return this.peek(d.TokenKind.SPREAD)?this.parseFragment():this.parseField()},n.parseField=function(){var e,n,t=this._lexer.token,i=this.parseName();return this.expectOptionalToken(d.TokenKind.COLON)?(e=i,n=this.parseName()):n=i,{kind:l.Kind.FIELD,alias:e,name:n,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(d.TokenKind.BRACE_L)?this.parseSelectionSet():void 0,loc:this.loc(t)}},n.parseArguments=function(e){var n=e?this.parseConstArgument:this.parseArgument;return this.optionalMany(d.TokenKind.PAREN_L,n,d.TokenKind.PAREN_R)},n.parseArgument=function(){var e=this._lexer.token,n=this.parseName();return this.expectToken(d.TokenKind.COLON),{kind:l.Kind.ARGUMENT,name:n,value:this.parseValueLiteral(!1),loc:this.loc(e)}},n.parseConstArgument=function(){var e=this._lexer.token;return{kind:l.Kind.ARGUMENT,name:this.parseName(),value:(this.expectToken(d.TokenKind.COLON),this.parseValueLiteral(!0)),loc:this.loc(e)}},n.parseFragment=function(){var e=this._lexer.token;this.expectToken(d.TokenKind.SPREAD);var n=this.expectOptionalKeyword("on");return!n&&this.peek(d.TokenKind.NAME)?{kind:l.Kind.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1),loc:this.loc(e)}:{kind:l.Kind.INLINE_FRAGMENT,typeCondition:n?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(e)}},n.parseFragmentDefinition=function(){var e,n=this._lexer.token;return this.expectKeyword("fragment"),!0===(null===(e=this._options)||void 0===e?void 0:e.experimentalFragmentVariables)?{kind:l.Kind.FRAGMENT_DEFINITION,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(n)}:{kind:l.Kind.FRAGMENT_DEFINITION,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(n)}},n.parseFragmentName=function(){if("on"===this._lexer.token.value)throw this.unexpected();return this.parseName()},n.parseValueLiteral=function(e){var n=this._lexer.token;switch(n.kind){case d.TokenKind.BRACKET_L:return this.parseList(e);case d.TokenKind.BRACE_L:return this.parseObject(e);case d.TokenKind.INT:return this._lexer.advance(),{kind:l.Kind.INT,value:n.value,loc:this.loc(n)};case d.TokenKind.FLOAT:return this._lexer.advance(),{kind:l.Kind.FLOAT,value:n.value,loc:this.loc(n)};case d.TokenKind.STRING:case d.TokenKind.BLOCK_STRING:return this.parseStringLiteral();case d.TokenKind.NAME:switch(this._lexer.advance(),n.value){case"true":return{kind:l.Kind.BOOLEAN,value:!0,loc:this.loc(n)};case"false":return{kind:l.Kind.BOOLEAN,value:!1,loc:this.loc(n)};case"null":return{kind:l.Kind.NULL,loc:this.loc(n)};default:return{kind:l.Kind.ENUM,value:n.value,loc:this.loc(n)}}case d.TokenKind.DOLLAR:if(!e)return this.parseVariable()}throw this.unexpected()},n.parseStringLiteral=function(){var e=this._lexer.token;return this._lexer.advance(),{kind:l.Kind.STRING,value:e.value,block:e.kind===d.TokenKind.BLOCK_STRING,loc:this.loc(e)}},n.parseList=function(e){var n=this,t=this._lexer.token;return{kind:l.Kind.LIST,values:this.any(d.TokenKind.BRACKET_L,(function(){return n.parseValueLiteral(e)}),d.TokenKind.BRACKET_R),loc:this.loc(t)}},n.parseObject=function(e){var n=this,t=this._lexer.token;return{kind:l.Kind.OBJECT,fields:this.any(d.TokenKind.BRACE_L,(function(){return n.parseObjectField(e)}),d.TokenKind.BRACE_R),loc:this.loc(t)}},n.parseObjectField=function(e){var n=this._lexer.token,t=this.parseName();return this.expectToken(d.TokenKind.COLON),{kind:l.Kind.OBJECT_FIELD,name:t,value:this.parseValueLiteral(e),loc:this.loc(n)}},n.parseDirectives=function(e){for(var n=[];this.peek(d.TokenKind.AT);)n.push(this.parseDirective(e));return n},n.parseDirective=function(e){var n=this._lexer.token;return this.expectToken(d.TokenKind.AT),{kind:l.Kind.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(e),loc:this.loc(n)}},n.parseTypeReference=function(){var e,n=this._lexer.token;return this.expectOptionalToken(d.TokenKind.BRACKET_L)?(e=this.parseTypeReference(),this.expectToken(d.TokenKind.BRACKET_R),e={kind:l.Kind.LIST_TYPE,type:e,loc:this.loc(n)}):e=this.parseNamedType(),this.expectOptionalToken(d.TokenKind.BANG)?{kind:l.Kind.NON_NULL_TYPE,type:e,loc:this.loc(n)}:e},n.parseNamedType=function(){var e=this._lexer.token;return{kind:l.Kind.NAMED_TYPE,name:this.parseName(),loc:this.loc(e)}},n.parseTypeSystemDefinition=function(){var e=this.peekDescription()?this._lexer.lookahead():this._lexer.token;if(e.kind===d.TokenKind.NAME)switch(e.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()}throw this.unexpected(e)},n.peekDescription=function(){return this.peek(d.TokenKind.STRING)||this.peek(d.TokenKind.BLOCK_STRING)},n.parseDescription=function(){if(this.peekDescription())return this.parseStringLiteral()},n.parseSchemaDefinition=function(){var e=this._lexer.token,n=this.parseDescription();this.expectKeyword("schema");var t=this.parseDirectives(!0),i=this.many(d.TokenKind.BRACE_L,this.parseOperationTypeDefinition,d.TokenKind.BRACE_R);return{kind:l.Kind.SCHEMA_DEFINITION,description:n,directives:t,operationTypes:i,loc:this.loc(e)}},n.parseOperationTypeDefinition=function(){var e=this._lexer.token,n=this.parseOperationType();this.expectToken(d.TokenKind.COLON);var t=this.parseNamedType();return{kind:l.Kind.OPERATION_TYPE_DEFINITION,operation:n,type:t,loc:this.loc(e)}},n.parseScalarTypeDefinition=function(){var e=this._lexer.token,n=this.parseDescription();this.expectKeyword("scalar");var t=this.parseName(),i=this.parseDirectives(!0);return{kind:l.Kind.SCALAR_TYPE_DEFINITION,description:n,name:t,directives:i,loc:this.loc(e)}},n.parseObjectTypeDefinition=function(){var e=this._lexer.token,n=this.parseDescription();this.expectKeyword("type");var t=this.parseName(),i=this.parseImplementsInterfaces(),r=this.parseDirectives(!0),o=this.parseFieldsDefinition();return{kind:l.Kind.OBJECT_TYPE_DEFINITION,description:n,name:t,interfaces:i,directives:r,fields:o,loc:this.loc(e)}},n.parseImplementsInterfaces=function(){var e=[];if(this.expectOptionalKeyword("implements")){this.expectOptionalToken(d.TokenKind.AMP);do{var n;e.push(this.parseNamedType())}while(this.expectOptionalToken(d.TokenKind.AMP)||!0===(null===(n=this._options)||void 0===n?void 0:n.allowLegacySDLImplementsInterfaces)&&this.peek(d.TokenKind.NAME))}return e},n.parseFieldsDefinition=function(){var e;return!0===(null===(e=this._options)||void 0===e?void 0:e.allowLegacySDLEmptyFields)&&this.peek(d.TokenKind.BRACE_L)&&this._lexer.lookahead().kind===d.TokenKind.BRACE_R?(this._lexer.advance(),this._lexer.advance(),[]):this.optionalMany(d.TokenKind.BRACE_L,this.parseFieldDefinition,d.TokenKind.BRACE_R)},n.parseFieldDefinition=function(){var e=this._lexer.token,n=this.parseDescription(),t=this.parseName(),i=this.parseArgumentDefs();this.expectToken(d.TokenKind.COLON);var r=this.parseTypeReference(),o=this.parseDirectives(!0);return{kind:l.Kind.FIELD_DEFINITION,description:n,name:t,arguments:i,type:r,directives:o,loc:this.loc(e)}},n.parseArgumentDefs=function(){return this.optionalMany(d.TokenKind.PAREN_L,this.parseInputValueDef,d.TokenKind.PAREN_R)},n.parseInputValueDef=function(){var e=this._lexer.token,n=this.parseDescription(),t=this.parseName();this.expectToken(d.TokenKind.COLON);var i,r=this.parseTypeReference();this.expectOptionalToken(d.TokenKind.EQUALS)&&(i=this.parseValueLiteral(!0));var o=this.parseDirectives(!0);return{kind:l.Kind.INPUT_VALUE_DEFINITION,description:n,name:t,type:r,defaultValue:i,directives:o,loc:this.loc(e)}},n.parseInterfaceTypeDefinition=function(){var e=this._lexer.token,n=this.parseDescription();this.expectKeyword("interface");var t=this.parseName(),i=this.parseImplementsInterfaces(),r=this.parseDirectives(!0),o=this.parseFieldsDefinition();return{kind:l.Kind.INTERFACE_TYPE_DEFINITION,description:n,name:t,interfaces:i,directives:r,fields:o,loc:this.loc(e)}},n.parseUnionTypeDefinition=function(){var e=this._lexer.token,n=this.parseDescription();this.expectKeyword("union");var t=this.parseName(),i=this.parseDirectives(!0),r=this.parseUnionMemberTypes();return{kind:l.Kind.UNION_TYPE_DEFINITION,description:n,name:t,directives:i,types:r,loc:this.loc(e)}},n.parseUnionMemberTypes=function(){var e=[];if(this.expectOptionalToken(d.TokenKind.EQUALS)){this.expectOptionalToken(d.TokenKind.PIPE);do{e.push(this.parseNamedType())}while(this.expectOptionalToken(d.TokenKind.PIPE))}return e},n.parseEnumTypeDefinition=function(){var e=this._lexer.token,n=this.parseDescription();this.expectKeyword("enum");var t=this.parseName(),i=this.parseDirectives(!0),r=this.parseEnumValuesDefinition();return{kind:l.Kind.ENUM_TYPE_DEFINITION,description:n,name:t,directives:i,values:r,loc:this.loc(e)}},n.parseEnumValuesDefinition=function(){return this.optionalMany(d.TokenKind.BRACE_L,this.parseEnumValueDefinition,d.TokenKind.BRACE_R)},n.parseEnumValueDefinition=function(){var e=this._lexer.token,n=this.parseDescription(),t=this.parseName(),i=this.parseDirectives(!0);return{kind:l.Kind.ENUM_VALUE_DEFINITION,description:n,name:t,directives:i,loc:this.loc(e)}},n.parseInputObjectTypeDefinition=function(){var e=this._lexer.token,n=this.parseDescription();this.expectKeyword("input");var t=this.parseName(),i=this.parseDirectives(!0),r=this.parseInputFieldsDefinition();return{kind:l.Kind.INPUT_OBJECT_TYPE_DEFINITION,description:n,name:t,directives:i,fields:r,loc:this.loc(e)}},n.parseInputFieldsDefinition=function(){return this.optionalMany(d.TokenKind.BRACE_L,this.parseInputValueDef,d.TokenKind.BRACE_R)},n.parseTypeSystemExtension=function(){var e=this._lexer.lookahead();if(e.kind===d.TokenKind.NAME)switch(e.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(e)},n.parseSchemaExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");var n=this.parseDirectives(!0),t=this.optionalMany(d.TokenKind.BRACE_L,this.parseOperationTypeDefinition,d.TokenKind.BRACE_R);if(0===n.length&&0===t.length)throw this.unexpected();return{kind:l.Kind.SCHEMA_EXTENSION,directives:n,operationTypes:t,loc:this.loc(e)}},n.parseScalarTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");var n=this.parseName(),t=this.parseDirectives(!0);if(0===t.length)throw this.unexpected();return{kind:l.Kind.SCALAR_TYPE_EXTENSION,name:n,directives:t,loc:this.loc(e)}},n.parseObjectTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");var n=this.parseName(),t=this.parseImplementsInterfaces(),i=this.parseDirectives(!0),r=this.parseFieldsDefinition();if(0===t.length&&0===i.length&&0===r.length)throw this.unexpected();return{kind:l.Kind.OBJECT_TYPE_EXTENSION,name:n,interfaces:t,directives:i,fields:r,loc:this.loc(e)}},n.parseInterfaceTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");var n=this.parseName(),t=this.parseImplementsInterfaces(),i=this.parseDirectives(!0),r=this.parseFieldsDefinition();if(0===t.length&&0===i.length&&0===r.length)throw this.unexpected();return{kind:l.Kind.INTERFACE_TYPE_EXTENSION,name:n,interfaces:t,directives:i,fields:r,loc:this.loc(e)}},n.parseUnionTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");var n=this.parseName(),t=this.parseDirectives(!0),i=this.parseUnionMemberTypes();if(0===t.length&&0===i.length)throw this.unexpected();return{kind:l.Kind.UNION_TYPE_EXTENSION,name:n,directives:t,types:i,loc:this.loc(e)}},n.parseEnumTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");var n=this.parseName(),t=this.parseDirectives(!0),i=this.parseEnumValuesDefinition();if(0===t.length&&0===i.length)throw this.unexpected();return{kind:l.Kind.ENUM_TYPE_EXTENSION,name:n,directives:t,values:i,loc:this.loc(e)}},n.parseInputObjectTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");var n=this.parseName(),t=this.parseDirectives(!0),i=this.parseInputFieldsDefinition();if(0===t.length&&0===i.length)throw this.unexpected();return{kind:l.Kind.INPUT_OBJECT_TYPE_EXTENSION,name:n,directives:t,fields:i,loc:this.loc(e)}},n.parseDirectiveDefinition=function(){var e=this._lexer.token,n=this.parseDescription();this.expectKeyword("directive"),this.expectToken(d.TokenKind.AT);var t=this.parseName(),i=this.parseArgumentDefs(),r=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");var o=this.parseDirectiveLocations();return{kind:l.Kind.DIRECTIVE_DEFINITION,description:n,name:t,arguments:i,repeatable:r,locations:o,loc:this.loc(e)}},n.parseDirectiveLocations=function(){this.expectOptionalToken(d.TokenKind.PIPE);var e=[];do{e.push(this.parseDirectiveLocation())}while(this.expectOptionalToken(d.TokenKind.PIPE));return e},n.parseDirectiveLocation=function(){var e=this._lexer.token,n=this.parseName();if(void 0!==k.DirectiveLocation[n.value])return n;throw this.unexpected(e)},n.loc=function(e){var n;if(!0!==(null===(n=this._options)||void 0===n?void 0:n.noLocation))return new E.Location(e,this._lexer.lastToken,this._lexer.source)},n.peek=function(e){return this._lexer.token.kind===e},n.expectToken=function(e){var n=this._lexer.token;if(n.kind===e)return this._lexer.advance(),n;throw(0,h.syntaxError)(this._lexer.source,n.start,"Expected ".concat(u(e),", found ").concat(c(n),"."))},n.expectOptionalToken=function(e){var n=this._lexer.token;if(n.kind===e)return this._lexer.advance(),n},n.expectKeyword=function(e){var n=this._lexer.token;if(n.kind!==d.TokenKind.NAME||n.value!==e)throw(0,h.syntaxError)(this._lexer.source,n.start,'Expected "'.concat(e,'", found ').concat(c(n),"."));this._lexer.advance()},n.expectOptionalKeyword=function(e){var n=this._lexer.token;return n.kind===d.TokenKind.NAME&&n.value===e&&(this._lexer.advance(),!0)},n.unexpected=function(e){var n=null!=e?e:this._lexer.token;return(0,h.syntaxError)(this._lexer.source,n.start,"Unexpected ".concat(c(n),"."))},n.any=function(e,n,t){this.expectToken(e);for(var i=[];!this.expectOptionalToken(t);)i.push(n.call(this));return i},n.optionalMany=function(e,n,t){if(this.expectOptionalToken(e)){var i=[];do{i.push(n.call(this))}while(!this.expectOptionalToken(t));return i}return[]},n.many=function(e,n,t){this.expectToken(e);var i=[];do{i.push(n.call(this))}while(!this.expectOptionalToken(t));return i},e}();function c(e){var n=e.value;return u(e.kind)+(null!=n?' "'.concat(n,'"'):"")}function u(e){return(0,N.isPunctuatorTokenKind)(e)?'"'.concat(e,'"'):e}}));i(_);_.parse,_.parseValue,_.parseType;var O=r((function(e,n){Object.defineProperty(n,"__esModule",{value:!0}),n.visit=function(e,n){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:r,s=void 0,c=Array.isArray(e),u=[e],l=-1,d=[],p=void 0,f=void 0,h=void 0,T=[],v=[],y=e;do{var N=++l===u.length,m=N&&0!==d.length;if(N){if(f=0===v.length?void 0:T[T.length-1],p=h,h=v.pop(),m){if(c)p=p.slice();else{for(var k={},_=0,O=Object.keys(p);_<O.length;_++){var I=O[_];k[I]=p[I]}p=k}for(var D=0,x=0;x<d.length;x++){var b=d[x][0],A=d[x][1];c&&(b-=D),c&&null===A?(p.splice(b,1),D++):p[b]=A}}l=s.index,u=s.keys,d=s.edits,c=s.inArray,s=s.prev}else{if(f=h?c?l:u[l]:void 0,null==(p=h?h[f]:y))continue;h&&T.push(f)}var S,K=void 0;if(!Array.isArray(p)){if(!(0,E.isNode)(p))throw new Error("Invalid AST Node: ".concat((0,i.default)(p),"."));var g=a(n,p.kind,N);if(g){if((K=g.call(n,p,f,h,T,v))===o)break;if(!1===K){if(!N){T.pop();continue}}else if(void 0!==K&&(d.push([f,K]),!N)){if(!(0,E.isNode)(K)){T.pop();continue}p=K}}}if(void 0===K&&m&&d.push([f,p]),N)T.pop();else s={inArray:c,index:l,keys:u,edits:d,prev:s},c=Array.isArray(p),u=c?p:null!==(S=t[p.kind])&&void 0!==S?S:[],l=-1,d=[],h&&v.push(h),h=p}while(void 0!==s);0!==d.length&&(y=d[d.length-1][1]);return y},n.visitInParallel=function(e){var n=new Array(e.length);return{enter:function(t){for(var i=0;i<e.length;i++)if(null==n[i]){var r=a(e[i],t.kind,!1);if(r){var s=r.apply(e[i],arguments);if(!1===s)n[i]=t;else if(s===o)n[i]=o;else if(void 0!==s)return s}}},leave:function(t){for(var i=0;i<e.length;i++)if(null==n[i]){var r=a(e[i],t.kind,!0);if(r){var s=r.apply(e[i],arguments);if(s===o)n[i]=o;else if(void 0!==s&&!1!==s)return s}}else n[i]===t&&(n[i]=null)}}},n.getVisitFn=a,n.BREAK=n.QueryDocumentKeys=void 0;var t,i=(t=m)&&t.__esModule?t:{default:t};var r={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"]};n.QueryDocumentKeys=r;var o=Object.freeze({});function a(e,n,t){var i=e[n];if(i){if(!t&&"function"==typeof i)return i;var r=t?i.leave:i.enter;if("function"==typeof r)return r}else{var o=t?e.leave:e.enter;if(o){if("function"==typeof o)return o;var a=o[n];if("function"==typeof a)return a}}}n.BREAK=o}));i(O);O.visit,O.visitInParallel,O.getVisitFn,O.BREAK,O.QueryDocumentKeys;var I=r((function(e,n){Object.defineProperty(n,"__esModule",{value:!0}),n.print=function(e){return(0,O.visit)(e,{leave:t})};var t={Name:function(e){return e.value},Variable:function(e){return"$"+e.name},Document:function(e){return r(e.definitions,"\n\n")+"\n"},OperationDefinition:function(e){var n=e.operation,t=e.name,i=a("(",r(e.variableDefinitions,", "),")"),o=r(e.directives," "),s=e.selectionSet;return t||o||i||"query"!==n?r([n,r([t,i]),o,s]," "):s},VariableDefinition:function(e){var n=e.variable,t=e.type,i=e.defaultValue,o=e.directives;return n+": "+t+a(" = ",i)+a(" ",r(o," "))},SelectionSet:function(e){return o(e.selections)},Field:function(e){var n=e.alias,t=e.name,i=e.arguments,o=e.directives,s=e.selectionSet;return r([a("",n,": ")+t+a("(",r(i,", "),")"),r(o," "),s]," ")},Argument:function(e){return e.name+": "+e.value},FragmentSpread:function(e){return"..."+e.name+a(" ",r(e.directives," "))},InlineFragment:function(e){var n=e.typeCondition,t=e.directives,i=e.selectionSet;return r(["...",a("on ",n),r(t," "),i]," ")},FragmentDefinition:function(e){var n=e.name,t=e.typeCondition,i=e.variableDefinitions,o=e.directives,s=e.selectionSet;return("fragment ".concat(n).concat(a("(",r(i,", "),")")," ")+"on ".concat(t," ").concat(a("",r(o," ")," "))+s)},IntValue:function(e){return e.value},FloatValue:function(e){return e.value},StringValue:function(e,n){var t=e.value;return e.block?(0,y.printBlockString)(t,"description"===n?"":" "):JSON.stringify(t)},BooleanValue:function(e){return e.value?"true":"false"},NullValue:function(){return"null"},EnumValue:function(e){return e.value},ListValue:function(e){return"["+r(e.values,", ")+"]"},ObjectValue:function(e){return"{"+r(e.fields,", ")+"}"},ObjectField:function(e){return e.name+": "+e.value},Directive:function(e){return"@"+e.name+a("(",r(e.arguments,", "),")")},NamedType:function(e){return e.name},ListType:function(e){return"["+e.type+"]"},NonNullType:function(e){return e.type+"!"},SchemaDefinition:i((function(e){var n=e.directives,t=e.operationTypes;return r(["schema",r(n," "),o(t)]," ")})),OperationTypeDefinition:function(e){return e.operation+": "+e.type},ScalarTypeDefinition:i((function(e){return r(["scalar",e.name,r(e.directives," ")]," ")})),ObjectTypeDefinition:i((function(e){var n=e.name,t=e.interfaces,i=e.directives,s=e.fields;return r(["type",n,a("implements ",r(t," & ")),r(i," "),o(s)]," ")})),FieldDefinition:i((function(e){var n=e.name,t=e.arguments,i=e.type,o=e.directives;return n+(u(t)?a("(\n",s(r(t,"\n")),"\n)"):a("(",r(t,", "),")"))+": "+i+a(" ",r(o," "))})),InputValueDefinition:i((function(e){var n=e.name,t=e.type,i=e.defaultValue,o=e.directives;return r([n+": "+t,a("= ",i),r(o," ")]," ")})),InterfaceTypeDefinition:i((function(e){var n=e.name,t=e.interfaces,i=e.directives,s=e.fields;return r(["interface",n,a("implements ",r(t," & ")),r(i," "),o(s)]," ")})),UnionTypeDefinition:i((function(e){var n=e.name,t=e.directives,i=e.types;return r(["union",n,r(t," "),i&&0!==i.length?"= "+r(i," | "):""]," ")})),EnumTypeDefinition:i((function(e){var n=e.name,t=e.directives,i=e.values;return r(["enum",n,r(t," "),o(i)]," ")})),EnumValueDefinition:i((function(e){return r([e.name,r(e.directives," ")]," ")})),InputObjectTypeDefinition:i((function(e){var n=e.name,t=e.directives,i=e.fields;return r(["input",n,r(t," "),o(i)]," ")})),DirectiveDefinition:i((function(e){var n=e.name,t=e.arguments,i=e.repeatable,o=e.locations;return"directive @"+n+(u(t)?a("(\n",s(r(t,"\n")),"\n)"):a("(",r(t,", "),")"))+(i?" repeatable":"")+" on "+r(o," | ")})),SchemaExtension:function(e){var n=e.directives,t=e.operationTypes;return r(["extend schema",r(n," "),o(t)]," ")},ScalarTypeExtension:function(e){return r(["extend scalar",e.name,r(e.directives," ")]," ")},ObjectTypeExtension:function(e){var n=e.name,t=e.interfaces,i=e.directives,s=e.fields;return r(["extend type",n,a("implements ",r(t," & ")),r(i," "),o(s)]," ")},InterfaceTypeExtension:function(e){var n=e.name,t=e.interfaces,i=e.directives,s=e.fields;return r(["extend interface",n,a("implements ",r(t," & ")),r(i," "),o(s)]," ")},UnionTypeExtension:function(e){var n=e.name,t=e.directives,i=e.types;return r(["extend union",n,r(t," "),i&&0!==i.length?"= "+r(i," | "):""]," ")},EnumTypeExtension:function(e){var n=e.name,t=e.directives,i=e.values;return r(["extend enum",n,r(t," "),o(i)]," ")},InputObjectTypeExtension:function(e){var n=e.name,t=e.directives,i=e.fields;return r(["extend input",n,r(t," "),o(i)]," ")}};function i(e){return function(n){return r([n.description,e(n)],"\n")}}function r(e){var n,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return null!==(n=null==e?void 0:e.filter((function(e){return e})).join(t))&&void 0!==n?n:""}function o(e){return e&&0!==e.length?"{\n"+s(r(e,"\n"))+"\n}":""}function a(e,n){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return n?e+n+t:""}function s(e){return e&&" "+e.replace(/\n/g,"\n ")}function c(e){return-1!==e.indexOf("\n")}function u(e){return e&&e.some(c)}}));i(I);I.print;var D=r((function(e,n){function t(e){return e.kind===l.Kind.OPERATION_DEFINITION||e.kind===l.Kind.FRAGMENT_DEFINITION}function i(e){return e.kind===l.Kind.SCHEMA_DEFINITION||r(e)||e.kind===l.Kind.DIRECTIVE_DEFINITION}function r(e){return e.kind===l.Kind.SCALAR_TYPE_DEFINITION||e.kind===l.Kind.OBJECT_TYPE_DEFINITION||e.kind===l.Kind.INTERFACE_TYPE_DEFINITION||e.kind===l.Kind.UNION_TYPE_DEFINITION||e.kind===l.Kind.ENUM_TYPE_DEFINITION||e.kind===l.Kind.INPUT_OBJECT_TYPE_DEFINITION}function o(e){return e.kind===l.Kind.SCHEMA_EXTENSION||a(e)}function a(e){return e.kind===l.Kind.SCALAR_TYPE_EXTENSION||e.kind===l.Kind.OBJECT_TYPE_EXTENSION||e.kind===l.Kind.INTERFACE_TYPE_EXTENSION||e.kind===l.Kind.UNION_TYPE_EXTENSION||e.kind===l.Kind.ENUM_TYPE_EXTENSION||e.kind===l.Kind.INPUT_OBJECT_TYPE_EXTENSION}Object.defineProperty(n,"__esModule",{value:!0}),n.isDefinitionNode=function(e){return t(e)||i(e)||o(e)},n.isExecutableDefinitionNode=t,n.isSelectionNode=function(e){return e.kind===l.Kind.FIELD||e.kind===l.Kind.FRAGMENT_SPREAD||e.kind===l.Kind.INLINE_FRAGMENT},n.isValueNode=function(e){return e.kind===l.Kind.VARIABLE||e.kind===l.Kind.INT||e.kind===l.Kind.FLOAT||e.kind===l.Kind.STRING||e.kind===l.Kind.BOOLEAN||e.kind===l.Kind.NULL||e.kind===l.Kind.ENUM||e.kind===l.Kind.LIST||e.kind===l.Kind.OBJECT},n.isTypeNode=function(e){return e.kind===l.Kind.NAMED_TYPE||e.kind===l.Kind.LIST_TYPE||e.kind===l.Kind.NON_NULL_TYPE},n.isTypeSystemDefinitionNode=i,n.isTypeDefinitionNode=r,n.isTypeSystemExtensionNode=o,n.isTypeExtensionNode=a}));i(D);D.isDefinitionNode,D.isExecutableDefinitionNode,D.isSelectionNode,D.isValueNode,D.isTypeNode,D.isTypeSystemDefinitionNode,D.isTypeDefinitionNode,D.isTypeSystemExtensionNode,D.isTypeExtensionNode;var x=r((function(e,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"Source",{enumerable:!0,get:function(){return s.Source}}),Object.defineProperty(n,"getLocation",{enumerable:!0,get:function(){return c.getLocation}}),Object.defineProperty(n,"printLocation",{enumerable:!0,get:function(){return u.printLocation}}),Object.defineProperty(n,"printSourceLocation",{enumerable:!0,get:function(){return u.printSourceLocation}}),Object.defineProperty(n,"Kind",{enumerable:!0,get:function(){return l.Kind}}),Object.defineProperty(n,"TokenKind",{enumerable:!0,get:function(){return d.TokenKind}}),Object.defineProperty(n,"Lexer",{enumerable:!0,get:function(){return N.Lexer}}),Object.defineProperty(n,"parse",{enumerable:!0,get:function(){return _.parse}}),Object.defineProperty(n,"parseValue",{enumerable:!0,get:function(){return _.parseValue}}),Object.defineProperty(n,"parseType",{enumerable:!0,get:function(){return _.parseType}}),Object.defineProperty(n,"print",{enumerable:!0,get:function(){return I.print}}),Object.defineProperty(n,"visit",{enumerable:!0,get:function(){return O.visit}}),Object.defineProperty(n,"visitInParallel",{enumerable:!0,get:function(){return O.visitInParallel}}),Object.defineProperty(n,"getVisitFn",{enumerable:!0,get:function(){return O.getVisitFn}}),Object.defineProperty(n,"BREAK",{enumerable:!0,get:function(){return O.BREAK}}),Object.defineProperty(n,"isDefinitionNode",{enumerable:!0,get:function(){return D.isDefinitionNode}}),Object.defineProperty(n,"isExecutableDefinitionNode",{enumerable:!0,get:function(){return D.isExecutableDefinitionNode}}),Object.defineProperty(n,"isSelectionNode",{enumerable:!0,get:function(){return D.isSelectionNode}}),Object.defineProperty(n,"isValueNode",{enumerable:!0,get:function(){return D.isValueNode}}),Object.defineProperty(n,"isTypeNode",{enumerable:!0,get:function(){return D.isTypeNode}}),Object.defineProperty(n,"isTypeSystemDefinitionNode",{enumerable:!0,get:function(){return D.isTypeSystemDefinitionNode}}),Object.defineProperty(n,"isTypeDefinitionNode",{enumerable:!0,get:function(){return D.isTypeDefinitionNode}}),Object.defineProperty(n,"isTypeSystemExtensionNode",{enumerable:!0,get:function(){return D.isTypeSystemExtensionNode}}),Object.defineProperty(n,"isTypeExtensionNode",{enumerable:!0,get:function(){return D.isTypeExtensionNode}}),Object.defineProperty(n,"DirectiveLocation",{enumerable:!0,get:function(){return k.DirectiveLocation}})}));i(x);var b=r((function(e,n){Object.defineProperty(n,"__esModule",{value:!0}),n.locatedError=function(e,n,t){var i;if(Array.isArray(e.path))return e;return new f.GraphQLError(e.message,null!==(i=e.nodes)&&void 0!==i?i:n,e.source,e.positions,t,e)}}));i(b);b.locatedError;var A=r((function(e,n){Object.defineProperty(n,"__esModule",{value:!0}),n.formatError=function(e){var n;e||(0,i.default)(0,"Received null or undefined error.");var t=null!==(n=e.message)&&void 0!==n?n:"An unknown error occurred.",r=e.locations,o=e.path,a=e.extensions;return a?{message:t,locations:r,path:o,extensions:a}:{message:t,locations:r,path:o}};var t,i=(t=a)&&t.__esModule?t:{default:t}}));i(A);A.formatError;var S=r((function(e,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"GraphQLError",{enumerable:!0,get:function(){return f.GraphQLError}}),Object.defineProperty(n,"printError",{enumerable:!0,get:function(){return f.printError}}),Object.defineProperty(n,"syntaxError",{enumerable:!0,get:function(){return h.syntaxError}}),Object.defineProperty(n,"locatedError",{enumerable:!0,get:function(){return b.locatedError}}),Object.defineProperty(n,"formatError",{enumerable:!0,get:function(){return A.formatError}})}));i(S);const{hasPragma:K}=t;var g={parsers:{graphql:{parse:function(e){const t=x;try{const n=function(e,n){const t={allowLegacySDLImplementsInterfaces:!1,experimentalFragmentVariables:!0};try{return e(n,t)}catch(i){return t.allowLegacySDLImplementsInterfaces=!0,e(n,t)}}(t.parse,e);return n.comments=function(e){const n=[],{startToken:t}=e.loc;let{next:i}=t;for(;"<EOF>"!==i.kind;)"Comment"===i.kind&&(Object.assign(i,{column:i.column-1}),n.push(i)),i=i.next;return n}(n),function e(n){if(n&&"object"==typeof n){delete n.startToken,delete n.endToken,delete n.prev,delete n.next;for(const t in n)e(n[t])}return n}(n),n}catch(e){const{GraphQLError:t}=S;throw e instanceof t?n(e.message,{start:{line:e.locations[0].line,column:e.locations[0].column}}):e}},astFormat:"graphql",hasPragma:K,locStart:e=>"number"==typeof e.start?e.start:e.loc&&e.loc.start,locEnd:e=>"number"==typeof e.end?e.end:e.loc&&e.loc.end}}},L=g.parsers;e.default=g,e.parsers=L,Object.defineProperty(e,"__esModule",{value:!0})}));
package/parser-html.js CHANGED
@@ -1,4 +1,4 @@
1
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t(((e=e||self).prettierPlugins=e.prettierPlugins||{},e.prettierPlugins.html={}))}(this,(function(e){"use strict";const t=/[|\\{}()[\]^$+*?.-]/g;var r=e=>{if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(t,"\\$&")};const n={"---":"yaml","+++":"toml"};var s=function(e){const t=Object.keys(n).map(r).join("|"),s=e.match(new RegExp("^(".concat(t,")[^\\n\\S]*\\n(?:([\\s\\S]*?)\\n)?\\1[^\\n\\S]*(\\n|$)")));if(null===s)return{frontMatter:null,content:e};const[i,o,a]=s;return{frontMatter:{type:n[o],value:a,raw:i.replace(/\n$/,"")},content:i.replace(/[^\n]/g," ")+e.slice(i.length)}},i=Object.freeze({__proto__:null,default:["a","abbr","acronym","address","applet","area","article","aside","audio","b","base","basefont","bdi","bdo","bgsound","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","command","content","data","datalist","dd","del","details","dfn","dialog","dir","div","dl","dt","element","em","embed","fieldset","figcaption","figure","font","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","image","img","input","ins","isindex","kbd","keygen","label","legend","li","link","listing","main","map","mark","marquee","math","menu","menuitem","meta","meter","multicol","nav","nextid","nobr","noembed","noframes","noscript","object","ol","optgroup","option","output","p","param","picture","plaintext","pre","progress","q","rb","rbc","rp","rt","rtc","ruby","s","samp","script","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","svg","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","tt","u","ul","var","video","wbr","xmp"]}),o=["accesskey","charset","coords","download","href","hreflang","name","ping","referrerpolicy","rel","rev","shape","tabindex","target","type"],a=["title"],c=["align","alt","archive","code","codebase","height","hspace","name","object","vspace","width"],l=["accesskey","alt","coords","download","href","hreflang","nohref","ping","referrerpolicy","rel","shape","tabindex","target","type"],p=["autoplay","controls","crossorigin","loop","muted","preload","src"],u=["href","target"],h=["color","face","size"],d=["dir"],m=["cite"],f=["alink","background","bgcolor","link","text","vlink"],g=["clear"],_=["accesskey","autofocus","disabled","form","formaction","formenctype","formmethod","formnovalidate","formtarget","name","tabindex","type","value"],T=["height","width"],S=["align"],y=["align","char","charoff","span","valign","width"],b=["align","char","charoff","span","valign","width"],C=["value"],E=["cite","datetime"],v=["open"],A=["title"],w=["open"],k=["compact"],N=["align"],x=["compact"],P=["height","src","type","width"],D=["disabled","form","name"],R=["color","face","size"],O=["accept","accept-charset","action","autocomplete","enctype","method","name","novalidate","target"],q=["frameborder","longdesc","marginheight","marginwidth","name","noresize","scrolling","src"],L=["cols","rows"],$=["align"],I=["align"],M=["align"],U=["align"],B=["align"],F=["align"],V=["profile"],H=["align","noshade","size","width"],G=["manifest","version"],j=["align","allow","allowfullscreen","allowpaymentrequest","allowusermedia","frameborder","height","longdesc","marginheight","marginwidth","name","referrerpolicy","sandbox","scrolling","src","srcdoc","width"],X=["align","alt","border","crossorigin","decoding","height","hspace","ismap","longdesc","name","referrerpolicy","sizes","src","srcset","usemap","vspace","width"],z=["accept","accesskey","align","alt","autocomplete","autofocus","checked","dirname","disabled","form","formaction","formenctype","formmethod","formnovalidate","formtarget","height","ismap","list","max","maxlength","min","minlength","multiple","name","pattern","placeholder","readonly","required","size","src","step","tabindex","title","type","usemap","value","width"],W=["cite","datetime"],Q=["prompt"],Y=["accesskey","for","form"],J=["accesskey","align"],K=["type","value"],Z=["as","charset","color","crossorigin","href","hreflang","imagesizes","imagesrcset","integrity","media","nonce","referrerpolicy","rel","rev","sizes","target","title","type"],ee=["name"],te=["compact"],re=["charset","content","http-equiv","name","scheme"],ne=["high","low","max","min","optimum","value"],se=["align","archive","border","classid","codebase","codetype","data","declare","form","height","hspace","name","standby","tabindex","type","typemustmatch","usemap","vspace","width"],ie=["compact","reversed","start","type"],oe=["disabled","label"],ae=["disabled","label","selected","value"],ce=["for","form","name"],le=["align"],pe=["name","type","value","valuetype"],ue=["width"],he=["max","value"],de=["cite"],me=["async","charset","crossorigin","defer","integrity","language","nomodule","nonce","referrerpolicy","src","type"],fe=["autocomplete","autofocus","disabled","form","multiple","name","required","size","tabindex"],ge=["name"],_e=["media","sizes","src","srcset","type"],Te=["media","nonce","title","type"],Se=["align","bgcolor","border","cellpadding","cellspacing","frame","rules","summary","width"],ye=["align","char","charoff","valign"],be=["abbr","align","axis","bgcolor","char","charoff","colspan","headers","height","nowrap","rowspan","scope","valign","width"],Ce=["accesskey","autocomplete","autofocus","cols","dirname","disabled","form","maxlength","minlength","name","placeholder","readonly","required","rows","tabindex","wrap"],Ee=["align","char","charoff","valign"],ve=["abbr","align","axis","bgcolor","char","charoff","colspan","headers","height","nowrap","rowspan","scope","valign","width"],Ae=["align","char","charoff","valign"],we=["datetime"],ke=["align","bgcolor","char","charoff","valign"],Ne=["default","kind","label","src","srclang"],xe=["compact","type"],Pe=["autoplay","controls","crossorigin","height","loop","muted","playsinline","poster","preload","src","width"],De={"*":["accesskey","autocapitalize","autofocus","class","contenteditable","dir","draggable","enterkeyhint","hidden","id","inputmode","is","itemid","itemprop","itemref","itemscope","itemtype","lang","nonce","slot","spellcheck","style","tabindex","title","translate"],a:o,abbr:a,applet:c,area:l,audio:p,base:u,basefont:h,bdo:d,blockquote:m,body:f,br:g,button:_,canvas:T,caption:S,col:y,colgroup:b,data:C,del:E,details:v,dfn:A,dialog:w,dir:k,div:N,dl:x,embed:P,fieldset:D,font:R,form:O,frame:q,frameset:L,h1:$,h2:I,h3:M,h4:U,h5:B,h6:F,head:V,hr:H,html:G,iframe:j,img:X,input:z,ins:W,isindex:Q,label:Y,legend:J,li:K,link:Z,map:ee,menu:te,meta:re,meter:ne,object:se,ol:ie,optgroup:oe,option:ae,output:ce,p:le,param:pe,pre:ue,progress:he,q:de,script:me,select:fe,slot:ge,source:_e,style:Te,table:Se,tbody:ye,td:be,textarea:Ce,tfoot:Ee,th:ve,thead:Ae,time:we,tr:ke,track:Ne,ul:xe,video:Pe},Re=Object.freeze({__proto__:null,a:o,abbr:a,applet:c,area:l,audio:p,base:u,basefont:h,bdo:d,blockquote:m,body:f,br:g,button:_,canvas:T,caption:S,col:y,colgroup:b,data:C,del:E,details:v,dfn:A,dialog:w,dir:k,div:N,dl:x,embed:P,fieldset:D,font:R,form:O,frame:q,frameset:L,h1:$,h2:I,h3:M,h4:U,h5:B,h6:F,head:V,hr:H,html:G,iframe:j,img:X,input:z,ins:W,isindex:Q,label:Y,legend:J,li:K,link:Z,map:ee,menu:te,meta:re,meter:ne,object:se,ol:ie,optgroup:oe,option:ae,output:ce,p:le,param:pe,pre:ue,progress:he,q:de,script:me,select:fe,slot:ge,source:_e,style:Te,table:Se,tbody:ye,td:be,textarea:Ce,tfoot:Ee,th:ve,thead:Ae,time:we,tr:ke,track:Ne,ul:xe,video:Pe,default:De}),Oe="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function qe(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Le(e,t){return e(t={exports:{}},t.exports),t.exports}function $e(e){return e&&e.default||e}var Ie=$e(i),Me=$e(Re);const{CSS_DISPLAY_TAGS:Ue,CSS_DISPLAY_DEFAULT:Be,CSS_WHITE_SPACE_TAGS:Fe,CSS_WHITE_SPACE_DEFAULT:Ve}={CSS_DISPLAY_TAGS:{area:"none",base:"none",basefont:"none",datalist:"none",head:"none",link:"none",meta:"none",noembed:"none",noframes:"none",param:"none",rp:"none",script:"block",source:"block",style:"none",template:"inline",track:"block",title:"none",html:"block",body:"block",address:"block",blockquote:"block",center:"block",div:"block",figure:"block",figcaption:"block",footer:"block",form:"block",header:"block",hr:"block",legend:"block",listing:"block",main:"block",p:"block",plaintext:"block",pre:"block",xmp:"block",slot:"contents",ruby:"ruby",rt:"ruby-text",article:"block",aside:"block",h1:"block",h2:"block",h3:"block",h4:"block",h5:"block",h6:"block",hgroup:"block",nav:"block",section:"block",dir:"block",dd:"block",dl:"block",dt:"block",ol:"block",ul:"block",li:"list-item",table:"table",caption:"table-caption",colgroup:"table-column-group",col:"table-column",thead:"table-header-group",tbody:"table-row-group",tfoot:"table-footer-group",tr:"table-row",td:"table-cell",th:"table-cell",fieldset:"block",button:"inline-block",video:"inline-block",audio:"inline-block"},CSS_DISPLAY_DEFAULT:"inline",CSS_WHITE_SPACE_TAGS:{listing:"pre",plaintext:"pre",pre:"pre",xmp:"pre",nobr:"nowrap",table:"initial",textarea:"pre-wrap"},CSS_WHITE_SPACE_DEFAULT:"normal"},He=Ge(Ie);function Ge(e){const t=Object.create(null);for(const r of e)t[r]=!0;return t}function je(e,t){return!!e.endSourceSpan&&(!("element"!==e.type||"template"!==e.fullName||!e.attrMap.lang||"html"===e.attrMap.lang)||(!("ieConditionalComment"!==e.type||!e.lastChild||e.lastChild.isSelfClosing||e.lastChild.endSourceSpan)||("ieConditionalComment"===e.type&&!e.complete||("vue"===t.parser&&"element"===e.type&&"root"===e.parent.type&&!["template","style","script","html"].includes(e.fullName)||!(!nt(e)||!e.children.some(e=>"text"!==e.type&&"interpolation"!==e.type))))))}function Xe(e){if("attribute"===e.type)return!1;if(!e.parent)return!1;if("number"!=typeof e.index||0===e.index)return!1;return function(e){return"comment"===e.type&&"prettier-ignore"===e.value.trim()}(e.parent.children[e.index-1])}function ze(e){return"element"===e.type&&("script"===e.fullName||"style"===e.fullName||"svg:style"===e.fullName)}function We(e){return"yaml"===e.type||"toml"===e.type}function Qe(e){return it(e).startsWith("pre")}function Ye(e){return"element"===e.type&&0!==e.children.length&&(["html","head","ul","ol","select"].includes(e.name)||e.cssDisplay.startsWith("table")&&"table-cell"!==e.cssDisplay)}function Je(e){return tt(e)||"element"===e.type&&"br"===e.fullName||Ke(e)}function Ke(e){return Ze(e)&&et(e)}function Ze(e){return e.hasLeadingSpaces&&(e.prev?e.prev.sourceSpan.end.line<e.sourceSpan.start.line:"root"===e.parent.type||e.parent.startSourceSpan.end.line<e.sourceSpan.start.line)}function et(e){return e.hasTrailingSpaces&&(e.next?e.next.sourceSpan.start.line>e.sourceSpan.end.line:"root"===e.parent.type||e.parent.endSourceSpan&&e.parent.endSourceSpan.start.line>e.sourceSpan.end.line)}function tt(e){switch(e.type){case"ieConditionalComment":case"comment":case"directive":return!0;case"element":return["script","select"].includes(e.name)}return!1}function rt(e){return"block"===e||"list-item"===e||e.startsWith("table")}function nt(e){return it(e).startsWith("pre")}function st(e){return"element"===e.type&&!e.hasExplicitNamespace&&!["html","svg"].includes(e.namespace)}function it(e){return"element"===e.type&&(!e.namespace||st(e))&&Fe[e.name]||Ve}var ot={HTML_ELEMENT_ATTRIBUTES:function(e,t){const r=Object.create(null);for(const n of Object.keys(e))r[n]=t(e[n],n);return r}(Me,Ge),HTML_TAGS:He,canHaveInterpolation:function(e){return e.children&&!ze(e)},countChars:function(e,t){let r=0;for(let n=0;n<e.length;n++)e[n]===t&&r++;return r},countParents:function(e,t=(()=>!0)){let r=0;for(let n=e.stack.length-1;n>=0;n--){const s=e.stack[n];s&&"object"==typeof s&&!Array.isArray(s)&&t(s)&&r++}return r},dedentString:function(e,t=function(e){let t=1/0;for(const r of e.split("\n")){if(0===r.length)continue;if(/\S/.test(r[0]))return 0;const e=r.match(/^\s*/)[0].length;r.length!==e&&(e<t&&(t=e))}return t===1/0?0:t}(e)){return 0===t?e:e.split("\n").map(e=>e.slice(t)).join("\n")},forceBreakChildren:Ye,forceBreakContent:function(e){return Ye(e)||"element"===e.type&&0!==e.children.length&&(["body","script","style"].includes(e.name)||e.children.some(e=>function(e){return e.children&&e.children.some(e=>"text"!==e.type)}(e)))||e.firstChild&&e.firstChild===e.lastChild&&Ze(e.firstChild)&&(!e.lastChild.isTrailingSpaceSensitive||et(e.lastChild))},forceNextEmptyLine:function(e){return We(e)||e.next&&e.sourceSpan.end.line+1<e.next.sourceSpan.start.line},getLastDescendant:function e(t){return t.lastChild?e(t.lastChild):t},getNodeCssStyleDisplay:function(e,t){if(e.prev&&"comment"===e.prev.type){const t=e.prev.value.match(/^\s*display:\s*([a-z]+)\s*$/);if(t)return t[1]}let r=!1;if("element"===e.type&&"svg"===e.namespace){if(!function(e,t){let r=e;for(;r;){if(t(r))return!0;r=r.parent}return!1}(e,e=>"svg:foreignObject"===e.fullName))return"svg"===e.name?"inline-block":"block";r=!0}switch(t.htmlWhitespaceSensitivity){case"strict":return"inline";case"ignore":return"block";default:return"element"===e.type&&(!e.namespace||r||st(e))&&Ue[e.name]||Be}},getNodeCssStyleWhiteSpace:it,getPrettierIgnoreAttributeCommentData:function(e){const t=e.trim().match(/^prettier-ignore-attribute(?:\s+([^]+))?$/);return!!t&&(!t[1]||t[1].split(/\s+/))},hasPrettierIgnore:Xe,identity:function(e){return e},inferScriptParser:function(e){if("script"===e.name&&!e.attrMap.src){if(!e.attrMap.lang&&!e.attrMap.type||"module"===e.attrMap.type||"text/javascript"===e.attrMap.type||"text/babel"===e.attrMap.type||"application/javascript"===e.attrMap.type||"jsx"===e.attrMap.lang)return"babel";if("application/x-typescript"===e.attrMap.type||"ts"===e.attrMap.lang||"tsx"===e.attrMap.lang)return"typescript";if("text/markdown"===e.attrMap.type)return"markdown";if(e.attrMap.type.endsWith("json")||e.attrMap.type.endsWith("importmap"))return"json";if("text/x-handlebars-template"===e.attrMap.type)return"glimmer"}if("style"===e.name){if(!e.attrMap.lang||"postcss"===e.attrMap.lang||"css"===e.attrMap.lang)return"css";if("scss"===e.attrMap.lang)return"scss";if("less"===e.attrMap.lang)return"less"}return null},isDanglingSpaceSensitiveNode:function(e){return!rt(t=e.cssDisplay)&&"inline-block"!==t&&!ze(e);var t},isFrontMatterNode:We,isIndentationSensitiveNode:Qe,isLeadingSpaceSensitiveNode:function(e){const t=function(){if(We(e))return!1;if(("text"===e.type||"interpolation"===e.type)&&e.prev&&("text"===e.prev.type||"interpolation"===e.prev.type))return!0;if(!e.parent||"none"===e.parent.cssDisplay)return!1;if(nt(e.parent))return!0;if(!e.prev&&("root"===e.parent.type||nt(e)&&e.parent||ze(e.parent)||(t=e.parent.cssDisplay,rt(t)||"inline-block"===t)))return!1;var t;if(e.prev&&!function(e){return!rt(e)}(e.prev.cssDisplay))return!1;return!0}();return t&&!e.prev&&e.parent&&e.parent.tagDefinition&&e.parent.tagDefinition.ignoreFirstLf?"interpolation"===e.type:t},isPreLikeNode:nt,isScriptLikeTag:ze,isTextLikeNode:function(e){return"text"===e.type||"comment"===e.type},isTrailingSpaceSensitiveNode:function(e){return!We(e)&&(!("text"!==e.type&&"interpolation"!==e.type||!e.next||"text"!==e.next.type&&"interpolation"!==e.next.type)||!(!e.parent||"none"===e.parent.cssDisplay)&&(!!nt(e.parent)||!(!e.next&&("root"===e.parent.type||nt(e)&&e.parent||ze(e.parent)||(t=e.parent.cssDisplay,rt(t)||"inline-block"===t)))&&!(e.next&&!function(e){return!rt(e)}(e.next.cssDisplay))));var t},isWhitespaceSensitiveNode:function(e){return ze(e)||"interpolation"===e.type||Qe(e)},isUnknownNamespace:st,normalizeParts:function(e){const t=[],r=e.slice();for(;0!==r.length;){const e=r.shift();e&&("concat"!==e.type?0===t.length||"string"!=typeof t[t.length-1]||"string"!=typeof e?t.push(e):t.push(t.pop()+e):r.unshift(...e.parts))}return t},preferHardlineAsLeadingSpaces:function(e){return tt(e)||e.prev&&Je(e.prev)||Ke(e)},preferHardlineAsTrailingSpaces:Je,shouldNotPrintClosingTag:function(e,t){return!e.isSelfClosing&&!e.endSourceSpan&&(Xe(e)||je(e.parent,t))},shouldPreserveContent:je,unescapeQuoteEntities:function(e){return e.replace(/&apos;/g,"'").replace(/&quot;/g,'"')}};var at={hasPragma:function(e){return/^\s*<!--\s*@(format|prettier)\s*-->/.test(e)},insertPragma:function(e){return"\x3c!-- @format --\x3e\n\n"+e.replace(/^\s*\n/,"")}};var ct=function(e,t){const r=new SyntaxError(e+" ("+t.start.line+":"+t.start.column+")");return r.loc=t,r};const lt={attrs:!0,children:!0};class pt{constructor(e={}){for(const t of Object.keys(e)){const r=e[t];t in lt?this._setNodes(t,r):this[t]=r}}_setNodes(e,t){t!==this[e]&&(this[e]=function(e,t){const r=e.map(e=>e instanceof pt?e.clone():new pt(e));let n=null,s=r[0],i=r[1]||null;for(let e=0;e<r.length;e++)ht(s,{index:e,siblings:r,prev:n,next:i,parent:t}),n=s,s=i,i=r[e+2]||null;return r}(t,this),"attrs"===e&&ht(this,{attrMap:this[e].reduce((e,t)=>(e[t.fullName]=t.value,e),Object.create(null))}))}map(e){let t=null;for(const r in lt){const n=this[r];if(n){const s=ut(n,t=>t.map(e));t!==n&&(t||(t=new pt),t._setNodes(r,s))}}if(t){for(const e in this)e in lt||(t[e]=this[e]);const{index:e,siblings:r,prev:n,next:s,parent:i}=this;ht(t,{index:e,siblings:r,prev:n,next:s,parent:i})}return e(t||this)}clone(e){return new pt(e?Object.assign({},this,{},e):this)}get firstChild(){return this.children&&0!==this.children.length?this.children[0]:null}get lastChild(){return this.children&&0!==this.children.length?this.children[this.children.length-1]:null}get rawName(){return this.hasExplicitNamespace?this.fullName:this.name}get fullName(){return this.namespace?this.namespace+":"+this.name:this.name}}function ut(e,t){const r=e.map(t);return r.some((t,r)=>t!==e[r])?r:e}function ht(e,t){const r=Object.keys(t).reduce((e,r)=>(e[r]={value:t[r],enumerable:!1},e),{});Object.defineProperties(e,r)}var dt={Node:pt};const mt=[[/^(\[if([^\]]*?)\]>)([\s\S]*?)<!\s*\[endif\]$/,function(e,t,r){const[,n,s,i]=r,o="\x3c!--".length+n.length,a=e.sourceSpan.start.moveBy(o),c=a.moveBy(i.length),l=e.sourceSpan.constructor,[p,u]=(()=>{try{return[!0,t(i,a).children]}catch(e){return[!1,[{type:"text",value:i,sourceSpan:new l(a,c)}]]}})();return{type:"ieConditionalComment",complete:p,children:u,condition:s.trim().replace(/\s+/g," "),sourceSpan:e.sourceSpan,startSourceSpan:new l(e.sourceSpan.start,a),endSourceSpan:new l(c,e.sourceSpan.end)}}],[/^\[if([^\]]*?)\]><!$/,function(e,t,r){const[,n]=r;return{type:"ieConditionalStartComment",condition:n.trim().replace(/\s+/g," "),sourceSpan:e.sourceSpan}}],[/^<!\s*\[endif\]$/,function(e){return{type:"ieConditionalEndComment",sourceSpan:e.sourceSpan}}]];var ft={parseIeConditionalComment:function(e,t){if(e.value){let r;for(const[n,s]of mt)if(r=e.value.match(n))return s(e,t,r)}return null}},gt=Le((function(e,t){function r(e){if(":"!=e[0])return[null,e];const t=e.indexOf(":",1);if(-1==t)throw new Error('Unsupported format "'.concat(e,'" expecting ":namespace:name"'));return[e.slice(1,t),e.slice(t+1)]}
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t(((e=e||self).prettierPlugins=e.prettierPlugins||{},e.prettierPlugins.html={}))}(this,(function(e){"use strict";const t=/[|\\{}()[\]^$+*?.-]/g;var r=e=>{if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(t,"\\$&")};const n={"---":"yaml","+++":"toml"};var s=function(e){const t=Object.keys(n).map(r).join("|"),s=e.match(new RegExp("^(".concat(t,")[^\\n\\S]*\\n(?:([\\s\\S]*?)\\n)?\\1[^\\n\\S]*(\\n|$)")));if(null===s)return{frontMatter:null,content:e};const[i,o,a]=s;return{frontMatter:{type:n[o],value:a,raw:i.replace(/\n$/,"")},content:i.replace(/[^\n]/g," ")+e.slice(i.length)}},i=Object.freeze({__proto__:null,default:["a","abbr","acronym","address","applet","area","article","aside","audio","b","base","basefont","bdi","bdo","bgsound","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","command","content","data","datalist","dd","del","details","dfn","dialog","dir","div","dl","dt","element","em","embed","fieldset","figcaption","figure","font","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","image","img","input","ins","isindex","kbd","keygen","label","legend","li","link","listing","main","map","mark","marquee","math","menu","menuitem","meta","meter","multicol","nav","nextid","nobr","noembed","noframes","noscript","object","ol","optgroup","option","output","p","param","picture","plaintext","pre","progress","q","rb","rbc","rp","rt","rtc","ruby","s","samp","script","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","svg","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","tt","u","ul","var","video","wbr","xmp"]}),o=["accesskey","charset","coords","download","href","hreflang","name","ping","referrerpolicy","rel","rev","shape","tabindex","target","type"],a=["title"],c=["align","alt","archive","code","codebase","height","hspace","name","object","vspace","width"],l=["accesskey","alt","coords","download","href","hreflang","nohref","ping","referrerpolicy","rel","shape","tabindex","target","type"],p=["autoplay","controls","crossorigin","loop","muted","preload","src"],u=["href","target"],h=["color","face","size"],d=["dir"],m=["cite"],f=["alink","background","bgcolor","link","text","vlink"],g=["clear"],_=["accesskey","autofocus","disabled","form","formaction","formenctype","formmethod","formnovalidate","formtarget","name","tabindex","type","value"],T=["height","width"],S=["align"],y=["align","char","charoff","span","valign","width"],b=["align","char","charoff","span","valign","width"],C=["value"],E=["cite","datetime"],v=["open"],A=["title"],w=["open"],k=["compact"],N=["align"],x=["compact"],P=["height","src","type","width"],D=["disabled","form","name"],R=["color","face","size"],O=["accept","accept-charset","action","autocomplete","enctype","method","name","novalidate","target"],q=["frameborder","longdesc","marginheight","marginwidth","name","noresize","scrolling","src"],L=["cols","rows"],$=["align"],I=["align"],M=["align"],U=["align"],B=["align"],F=["align"],V=["profile"],H=["align","noshade","size","width"],G=["manifest","version"],j=["align","allow","allowfullscreen","allowpaymentrequest","allowusermedia","frameborder","height","longdesc","marginheight","marginwidth","name","referrerpolicy","sandbox","scrolling","src","srcdoc","width"],X=["align","alt","border","crossorigin","decoding","height","hspace","ismap","longdesc","name","referrerpolicy","sizes","src","srcset","usemap","vspace","width"],z=["accept","accesskey","align","alt","autocomplete","autofocus","checked","dirname","disabled","form","formaction","formenctype","formmethod","formnovalidate","formtarget","height","ismap","list","max","maxlength","min","minlength","multiple","name","pattern","placeholder","readonly","required","size","src","step","tabindex","title","type","usemap","value","width"],W=["cite","datetime"],Q=["prompt"],Y=["accesskey","for","form"],J=["accesskey","align"],K=["type","value"],Z=["as","charset","color","crossorigin","href","hreflang","imagesizes","imagesrcset","integrity","media","nonce","referrerpolicy","rel","rev","sizes","target","title","type"],ee=["name"],te=["compact"],re=["charset","content","http-equiv","name","scheme"],ne=["high","low","max","min","optimum","value"],se=["align","archive","border","classid","codebase","codetype","data","declare","form","height","hspace","name","standby","tabindex","type","typemustmatch","usemap","vspace","width"],ie=["compact","reversed","start","type"],oe=["disabled","label"],ae=["disabled","label","selected","value"],ce=["for","form","name"],le=["align"],pe=["name","type","value","valuetype"],ue=["width"],he=["max","value"],de=["cite"],me=["async","charset","crossorigin","defer","integrity","language","nomodule","nonce","referrerpolicy","src","type"],fe=["autocomplete","autofocus","disabled","form","multiple","name","required","size","tabindex"],ge=["name"],_e=["media","sizes","src","srcset","type"],Te=["media","nonce","title","type"],Se=["align","bgcolor","border","cellpadding","cellspacing","frame","rules","summary","width"],ye=["align","char","charoff","valign"],be=["abbr","align","axis","bgcolor","char","charoff","colspan","headers","height","nowrap","rowspan","scope","valign","width"],Ce=["accesskey","autocomplete","autofocus","cols","dirname","disabled","form","maxlength","minlength","name","placeholder","readonly","required","rows","tabindex","wrap"],Ee=["align","char","charoff","valign"],ve=["abbr","align","axis","bgcolor","char","charoff","colspan","headers","height","nowrap","rowspan","scope","valign","width"],Ae=["align","char","charoff","valign"],we=["datetime"],ke=["align","bgcolor","char","charoff","valign"],Ne=["default","kind","label","src","srclang"],xe=["compact","type"],Pe=["autoplay","controls","crossorigin","height","loop","muted","playsinline","poster","preload","src","width"],De={"*":["accesskey","autocapitalize","autofocus","class","contenteditable","dir","draggable","enterkeyhint","hidden","id","inputmode","is","itemid","itemprop","itemref","itemscope","itemtype","lang","nonce","slot","spellcheck","style","tabindex","title","translate"],a:o,abbr:a,applet:c,area:l,audio:p,base:u,basefont:h,bdo:d,blockquote:m,body:f,br:g,button:_,canvas:T,caption:S,col:y,colgroup:b,data:C,del:E,details:v,dfn:A,dialog:w,dir:k,div:N,dl:x,embed:P,fieldset:D,font:R,form:O,frame:q,frameset:L,h1:$,h2:I,h3:M,h4:U,h5:B,h6:F,head:V,hr:H,html:G,iframe:j,img:X,input:z,ins:W,isindex:Q,label:Y,legend:J,li:K,link:Z,map:ee,menu:te,meta:re,meter:ne,object:se,ol:ie,optgroup:oe,option:ae,output:ce,p:le,param:pe,pre:ue,progress:he,q:de,script:me,select:fe,slot:ge,source:_e,style:Te,table:Se,tbody:ye,td:be,textarea:Ce,tfoot:Ee,th:ve,thead:Ae,time:we,tr:ke,track:Ne,ul:xe,video:Pe},Re=Object.freeze({__proto__:null,a:o,abbr:a,applet:c,area:l,audio:p,base:u,basefont:h,bdo:d,blockquote:m,body:f,br:g,button:_,canvas:T,caption:S,col:y,colgroup:b,data:C,del:E,details:v,dfn:A,dialog:w,dir:k,div:N,dl:x,embed:P,fieldset:D,font:R,form:O,frame:q,frameset:L,h1:$,h2:I,h3:M,h4:U,h5:B,h6:F,head:V,hr:H,html:G,iframe:j,img:X,input:z,ins:W,isindex:Q,label:Y,legend:J,li:K,link:Z,map:ee,menu:te,meta:re,meter:ne,object:se,ol:ie,optgroup:oe,option:ae,output:ce,p:le,param:pe,pre:ue,progress:he,q:de,script:me,select:fe,slot:ge,source:_e,style:Te,table:Se,tbody:ye,td:be,textarea:Ce,tfoot:Ee,th:ve,thead:Ae,time:we,tr:ke,track:Ne,ul:xe,video:Pe,default:De}),Oe="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function qe(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Le(e,t){return e(t={exports:{}},t.exports),t.exports}function $e(e){return e&&e.default||e}var Ie=$e(i),Me=$e(Re);const{CSS_DISPLAY_TAGS:Ue,CSS_DISPLAY_DEFAULT:Be,CSS_WHITE_SPACE_TAGS:Fe,CSS_WHITE_SPACE_DEFAULT:Ve}={CSS_DISPLAY_TAGS:{area:"none",base:"none",basefont:"none",datalist:"none",head:"none",link:"none",meta:"none",noembed:"none",noframes:"none",param:"none",rp:"none",script:"block",source:"block",style:"none",template:"inline",track:"block",title:"none",html:"block",body:"block",address:"block",blockquote:"block",center:"block",div:"block",figure:"block",figcaption:"block",footer:"block",form:"block",header:"block",hr:"block",legend:"block",listing:"block",main:"block",p:"block",plaintext:"block",pre:"block",xmp:"block",slot:"contents",ruby:"ruby",rt:"ruby-text",article:"block",aside:"block",h1:"block",h2:"block",h3:"block",h4:"block",h5:"block",h6:"block",hgroup:"block",nav:"block",section:"block",dir:"block",dd:"block",dl:"block",dt:"block",ol:"block",ul:"block",li:"list-item",table:"table",caption:"table-caption",colgroup:"table-column-group",col:"table-column",thead:"table-header-group",tbody:"table-row-group",tfoot:"table-footer-group",tr:"table-row",td:"table-cell",th:"table-cell",fieldset:"block",button:"inline-block",video:"inline-block",audio:"inline-block"},CSS_DISPLAY_DEFAULT:"inline",CSS_WHITE_SPACE_TAGS:{listing:"pre",plaintext:"pre",pre:"pre",xmp:"pre",nobr:"nowrap",table:"initial",textarea:"pre-wrap"},CSS_WHITE_SPACE_DEFAULT:"normal"},He=Ge(Ie);function Ge(e){const t=Object.create(null);for(const r of e)t[r]=!0;return t}function je(e,t){return!!e.endSourceSpan&&(!("element"!==e.type||"template"!==e.fullName||!e.attrMap.lang||"html"===e.attrMap.lang)||(!("ieConditionalComment"!==e.type||!e.lastChild||e.lastChild.isSelfClosing||e.lastChild.endSourceSpan)||("ieConditionalComment"===e.type&&!e.complete||("vue"===t.parser&&"element"===e.type&&"root"===e.parent.type&&!["template","style","script","html"].includes(e.fullName)||!(!nt(e)||!e.children.some(e=>"text"!==e.type&&"interpolation"!==e.type))))))}function Xe(e){if("attribute"===e.type)return!1;if(!e.parent)return!1;if("number"!=typeof e.index||0===e.index)return!1;return function(e){return"comment"===e.type&&"prettier-ignore"===e.value.trim()}(e.parent.children[e.index-1])}function ze(e){return"element"===e.type&&("script"===e.fullName||"style"===e.fullName||"svg:style"===e.fullName||st(e)&&("script"===e.name||"style"===e.name))}function We(e){return"yaml"===e.type||"toml"===e.type}function Qe(e){return it(e).startsWith("pre")}function Ye(e){return"element"===e.type&&0!==e.children.length&&(["html","head","ul","ol","select"].includes(e.name)||e.cssDisplay.startsWith("table")&&"table-cell"!==e.cssDisplay)}function Je(e){return tt(e)||"element"===e.type&&"br"===e.fullName||Ke(e)}function Ke(e){return Ze(e)&&et(e)}function Ze(e){return e.hasLeadingSpaces&&(e.prev?e.prev.sourceSpan.end.line<e.sourceSpan.start.line:"root"===e.parent.type||e.parent.startSourceSpan.end.line<e.sourceSpan.start.line)}function et(e){return e.hasTrailingSpaces&&(e.next?e.next.sourceSpan.start.line>e.sourceSpan.end.line:"root"===e.parent.type||e.parent.endSourceSpan&&e.parent.endSourceSpan.start.line>e.sourceSpan.end.line)}function tt(e){switch(e.type){case"ieConditionalComment":case"comment":case"directive":return!0;case"element":return["script","select"].includes(e.name)}return!1}function rt(e){return"block"===e||"list-item"===e||e.startsWith("table")}function nt(e){return it(e).startsWith("pre")}function st(e){return"element"===e.type&&!e.hasExplicitNamespace&&!["html","svg"].includes(e.namespace)}function it(e){return"element"===e.type&&(!e.namespace||st(e))&&Fe[e.name]||Ve}var ot={HTML_ELEMENT_ATTRIBUTES:function(e,t){const r=Object.create(null);for(const n of Object.keys(e))r[n]=t(e[n],n);return r}(Me,Ge),HTML_TAGS:He,canHaveInterpolation:function(e){return e.children&&!ze(e)},countChars:function(e,t){let r=0;for(let n=0;n<e.length;n++)e[n]===t&&r++;return r},countParents:function(e,t=(()=>!0)){let r=0;for(let n=e.stack.length-1;n>=0;n--){const s=e.stack[n];s&&"object"==typeof s&&!Array.isArray(s)&&t(s)&&r++}return r},dedentString:function(e,t=function(e){let t=1/0;for(const r of e.split("\n")){if(0===r.length)continue;if(/\S/.test(r[0]))return 0;const e=r.match(/^\s*/)[0].length;r.length!==e&&(e<t&&(t=e))}return t===1/0?0:t}(e)){return 0===t?e:e.split("\n").map(e=>e.slice(t)).join("\n")},forceBreakChildren:Ye,forceBreakContent:function(e){return Ye(e)||"element"===e.type&&0!==e.children.length&&(["body","script","style"].includes(e.name)||e.children.some(e=>function(e){return e.children&&e.children.some(e=>"text"!==e.type)}(e)))||e.firstChild&&e.firstChild===e.lastChild&&Ze(e.firstChild)&&(!e.lastChild.isTrailingSpaceSensitive||et(e.lastChild))},forceNextEmptyLine:function(e){return We(e)||e.next&&e.sourceSpan.end.line+1<e.next.sourceSpan.start.line},getLastDescendant:function e(t){return t.lastChild?e(t.lastChild):t},getNodeCssStyleDisplay:function(e,t){if(e.prev&&"comment"===e.prev.type){const t=e.prev.value.match(/^\s*display:\s*([a-z]+)\s*$/);if(t)return t[1]}let r=!1;if("element"===e.type&&"svg"===e.namespace){if(!function(e,t){let r=e;for(;r;){if(t(r))return!0;r=r.parent}return!1}(e,e=>"svg:foreignObject"===e.fullName))return"svg"===e.name?"inline-block":"block";r=!0}switch(t.htmlWhitespaceSensitivity){case"strict":return"inline";case"ignore":return"block";default:return"element"===e.type&&(!e.namespace||r||st(e))&&Ue[e.name]||Be}},getNodeCssStyleWhiteSpace:it,getPrettierIgnoreAttributeCommentData:function(e){const t=e.trim().match(/^prettier-ignore-attribute(?:\s+([^]+))?$/);return!!t&&(!t[1]||t[1].split(/\s+/))},hasPrettierIgnore:Xe,identity:function(e){return e},inferScriptParser:function(e){if("script"===e.name&&!e.attrMap.src){if(!e.attrMap.lang&&!e.attrMap.type||"module"===e.attrMap.type||"text/javascript"===e.attrMap.type||"text/babel"===e.attrMap.type||"application/javascript"===e.attrMap.type||"jsx"===e.attrMap.lang)return"babel";if("application/x-typescript"===e.attrMap.type||"ts"===e.attrMap.lang||"tsx"===e.attrMap.lang)return"typescript";if("text/markdown"===e.attrMap.type)return"markdown";if(e.attrMap.type.endsWith("json")||e.attrMap.type.endsWith("importmap"))return"json";if("text/x-handlebars-template"===e.attrMap.type)return"glimmer"}if("style"===e.name){if(!e.attrMap.lang||"postcss"===e.attrMap.lang||"css"===e.attrMap.lang)return"css";if("scss"===e.attrMap.lang)return"scss";if("less"===e.attrMap.lang)return"less"}return null},isDanglingSpaceSensitiveNode:function(e){return!rt(t=e.cssDisplay)&&"inline-block"!==t&&!ze(e);var t},isFrontMatterNode:We,isIndentationSensitiveNode:Qe,isLeadingSpaceSensitiveNode:function(e){const t=function(){if(We(e))return!1;if(("text"===e.type||"interpolation"===e.type)&&e.prev&&("text"===e.prev.type||"interpolation"===e.prev.type))return!0;if(!e.parent||"none"===e.parent.cssDisplay)return!1;if(nt(e.parent))return!0;if(!e.prev&&("root"===e.parent.type||nt(e)&&e.parent||ze(e.parent)||(t=e.parent.cssDisplay,rt(t)||"inline-block"===t)))return!1;var t;if(e.prev&&!function(e){return!rt(e)}(e.prev.cssDisplay))return!1;return!0}();return t&&!e.prev&&e.parent&&e.parent.tagDefinition&&e.parent.tagDefinition.ignoreFirstLf?"interpolation"===e.type:t},isPreLikeNode:nt,isScriptLikeTag:ze,isTextLikeNode:function(e){return"text"===e.type||"comment"===e.type},isTrailingSpaceSensitiveNode:function(e){return!We(e)&&(!("text"!==e.type&&"interpolation"!==e.type||!e.next||"text"!==e.next.type&&"interpolation"!==e.next.type)||!(!e.parent||"none"===e.parent.cssDisplay)&&(!!nt(e.parent)||!(!e.next&&("root"===e.parent.type||nt(e)&&e.parent||ze(e.parent)||(t=e.parent.cssDisplay,rt(t)||"inline-block"===t)))&&!(e.next&&!function(e){return!rt(e)}(e.next.cssDisplay))));var t},isWhitespaceSensitiveNode:function(e){return ze(e)||"interpolation"===e.type||Qe(e)},isUnknownNamespace:st,normalizeParts:function(e){const t=[],r=e.slice();for(;0!==r.length;){const e=r.shift();e&&("concat"!==e.type?0===t.length||"string"!=typeof t[t.length-1]||"string"!=typeof e?t.push(e):t.push(t.pop()+e):r.unshift(...e.parts))}return t},preferHardlineAsLeadingSpaces:function(e){return tt(e)||e.prev&&Je(e.prev)||Ke(e)},preferHardlineAsTrailingSpaces:Je,shouldNotPrintClosingTag:function(e,t){return!e.isSelfClosing&&!e.endSourceSpan&&(Xe(e)||je(e.parent,t))},shouldPreserveContent:je,unescapeQuoteEntities:function(e){return e.replace(/&apos;/g,"'").replace(/&quot;/g,'"')}};var at={hasPragma:function(e){return/^\s*<!--\s*@(format|prettier)\s*-->/.test(e)},insertPragma:function(e){return"\x3c!-- @format --\x3e\n\n"+e.replace(/^\s*\n/,"")}};var ct=function(e,t){const r=new SyntaxError(e+" ("+t.start.line+":"+t.start.column+")");return r.loc=t,r};const lt={attrs:!0,children:!0};class pt{constructor(e={}){for(const t of Object.keys(e)){const r=e[t];t in lt?this._setNodes(t,r):this[t]=r}}_setNodes(e,t){t!==this[e]&&(this[e]=function(e,t){const r=e.map(e=>e instanceof pt?e.clone():new pt(e));let n=null,s=r[0],i=r[1]||null;for(let e=0;e<r.length;e++)ht(s,{index:e,siblings:r,prev:n,next:i,parent:t}),n=s,s=i,i=r[e+2]||null;return r}(t,this),"attrs"===e&&ht(this,{attrMap:this[e].reduce((e,t)=>(e[t.fullName]=t.value,e),Object.create(null))}))}map(e){let t=null;for(const r in lt){const n=this[r];if(n){const s=ut(n,t=>t.map(e));t!==n&&(t||(t=new pt),t._setNodes(r,s))}}if(t){for(const e in this)e in lt||(t[e]=this[e]);const{index:e,siblings:r,prev:n,next:s,parent:i}=this;ht(t,{index:e,siblings:r,prev:n,next:s,parent:i})}return e(t||this)}clone(e){return new pt(e?Object.assign({},this,{},e):this)}get firstChild(){return this.children&&0!==this.children.length?this.children[0]:null}get lastChild(){return this.children&&0!==this.children.length?this.children[this.children.length-1]:null}get rawName(){return this.hasExplicitNamespace?this.fullName:this.name}get fullName(){return this.namespace?this.namespace+":"+this.name:this.name}}function ut(e,t){const r=e.map(t);return r.some((t,r)=>t!==e[r])?r:e}function ht(e,t){const r=Object.keys(t).reduce((e,r)=>(e[r]={value:t[r],enumerable:!1},e),{});Object.defineProperties(e,r)}var dt={Node:pt};const mt=[[/^(\[if([^\]]*?)\]>)([\s\S]*?)<!\s*\[endif\]$/,function(e,t,r){const[,n,s,i]=r,o="\x3c!--".length+n.length,a=e.sourceSpan.start.moveBy(o),c=a.moveBy(i.length),l=e.sourceSpan.constructor,[p,u]=(()=>{try{return[!0,t(i,a).children]}catch(e){return[!1,[{type:"text",value:i,sourceSpan:new l(a,c)}]]}})();return{type:"ieConditionalComment",complete:p,children:u,condition:s.trim().replace(/\s+/g," "),sourceSpan:e.sourceSpan,startSourceSpan:new l(e.sourceSpan.start,a),endSourceSpan:new l(c,e.sourceSpan.end)}}],[/^\[if([^\]]*?)\]><!$/,function(e,t,r){const[,n]=r;return{type:"ieConditionalStartComment",condition:n.trim().replace(/\s+/g," "),sourceSpan:e.sourceSpan}}],[/^<!\s*\[endif\]$/,function(e){return{type:"ieConditionalEndComment",sourceSpan:e.sourceSpan}}]];var ft={parseIeConditionalComment:function(e,t){if(e.value){let r;for(const[n,s]of mt)if(r=e.value.match(n))return s(e,t,r)}return null}},gt=Le((function(e,t){function r(e){if(":"!=e[0])return[null,e];const t=e.indexOf(":",1);if(-1==t)throw new Error('Unsupported format "'.concat(e,'" expecting ":namespace:name"'));return[e.slice(1,t),e.slice(t+1)]}
2
2
  /**
3
3
  * @license
4
4
  * Copyright Google Inc. All Rights Reserved.