@ghul/language-server 1.25.4 → 1.25.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/out/server.js CHANGED
@@ -1,3 +1,3 @@
1
1
  /*! For license information please see server.js.LICENSE.txt */
2
- (()=>{var e={4043(e,t,i){!function(e){e.parser=function(e,t){return new r(e,t)},e.SAXParser=r,e.SAXStream=s,e.createStream=function(e,t){return new s(e,t)},e.MAX_BUFFER_LENGTH=65536;var t,n=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];function r(t,i){if(!(this instanceof r))return new r(t,i);var o=this;!function(e){for(var t=0,i=n.length;t<i;t++)e[n[t]]=""}(o),o.q=o.c="",o.bufferCheckPosition=e.MAX_BUFFER_LENGTH,o.encoding=null,o.opt=i||{},o.opt.lowercase=o.opt.lowercase||o.opt.lowercasetags,o.looseCase=o.opt.lowercase?"toLowerCase":"toUpperCase",o.opt.maxEntityCount=o.opt.maxEntityCount||512,o.opt.maxEntityDepth=o.opt.maxEntityDepth||4,o.entityCount=o.entityDepth=0,o.tags=[],o.closed=o.closedRoot=o.sawRoot=!1,o.tag=o.error=null,o.strict=!!t,o.noscript=!(!t&&!o.opt.noscript),o.state=S.BEGIN,o.strictEntities=o.opt.strictEntities,o.ENTITIES=o.strictEntities?Object.create(e.XML_ENTITIES):Object.create(e.ENTITIES),o.attribList=[],o.opt.xmlns&&(o.ns=Object.create(h)),void 0===o.opt.unquotedAttributeValues&&(o.opt.unquotedAttributeValues=!t),o.trackPosition=!1!==o.opt.position,o.trackPosition&&(o.position=o.line=o.column=0),R(o,"onready")}e.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"],Object.create||(Object.create=function(e){function t(){}return t.prototype=e,new t}),Object.keys||(Object.keys=function(e){var t=[];for(var i in e)e.hasOwnProperty(i)&&t.push(i);return t}),r.prototype={end:function(){A(this)},write:function(t){var i=this;if(this.error)throw this.error;if(i.closed)return N(i,"Cannot write after close. Assign an onready handler.");if(null===t)return A(i);"object"==typeof t&&(t=t.toString());for(var r=0,o="";o=B(t,r++),i.c=o,o;)switch(i.trackPosition&&(i.position++,"\n"===o?(i.line++,i.column=0):i.column++),i.state){case S.BEGIN:if(i.state=S.BEGIN_WHITESPACE,"\ufeff"===o)continue;U(i,o);continue;case S.BEGIN_WHITESPACE:U(i,o);continue;case S.TEXT:if(i.sawRoot&&!i.closedRoot){for(var s=r-1;o&&"<"!==o&&"&"!==o;)(o=B(t,r++))&&i.trackPosition&&(i.position++,"\n"===o?(i.line++,i.column=0):i.column++);i.textNode+=t.substring(s,r-1)}"<"!==o||i.sawRoot&&i.closedRoot&&!i.strict?(m(o)||i.sawRoot&&!i.closedRoot||M(i,"Text data outside of root node."),"&"===o?i.state=S.TEXT_ENTITY:i.textNode+=o):(i.state=S.OPEN_WAKA,i.startTagPosition=i.position);continue;case S.SCRIPT:"<"===o?i.state=S.SCRIPT_ENDING:i.script+=o;continue;case S.SCRIPT_ENDING:"/"===o?i.state=S.CLOSE_TAG:(i.script+="<"+o,i.state=S.SCRIPT);continue;case S.OPEN_WAKA:if("!"===o)i.state=S.SGML_DECL,i.sgmlDecl="";else if(m(o));else if(_(d,o))i.state=S.OPEN_TAG,i.tagName=o;else if("/"===o)i.state=S.CLOSE_TAG,i.tagName="";else if("?"===o)i.state=S.PROC_INST,i.procInstName=i.procInstBody="";else{if(M(i,"Unencoded <"),i.startTagPosition+1<i.position){var l=i.position-i.startTagPosition;o=new Array(l).join(" ")+o}i.textNode+="<"+o,i.state=S.TEXT}continue;case S.SGML_DECL:if(i.sgmlDecl+o==="--"){i.state=S.COMMENT,i.comment="",i.sgmlDecl="";continue}i.doctype&&!0!==i.doctype&&i.sgmlDecl?(i.state=S.DOCTYPE_DTD,i.doctype+="<!"+i.sgmlDecl+o,i.sgmlDecl=""):(i.sgmlDecl+o).toUpperCase()===a?(x(i,"onopencdata"),i.state=S.CDATA,i.sgmlDecl="",i.cdata=""):(i.sgmlDecl+o).toUpperCase()===c?(i.state=S.DOCTYPE,(i.doctype||i.sawRoot)&&M(i,"Inappropriately located doctype declaration"),i.doctype="",i.sgmlDecl=""):">"===o?(x(i,"onsgmldeclaration",i.sgmlDecl),i.sgmlDecl="",i.state=S.TEXT):y(o)?(i.state=S.SGML_DECL_QUOTED,i.sgmlDecl+=o):i.sgmlDecl+=o;continue;case S.SGML_DECL_QUOTED:o===i.q&&(i.state=S.SGML_DECL,i.q=""),i.sgmlDecl+=o;continue;case S.DOCTYPE:">"===o?(i.state=S.TEXT,x(i,"ondoctype",i.doctype),i.doctype=!0):(i.doctype+=o,"["===o?i.state=S.DOCTYPE_DTD:y(o)&&(i.state=S.DOCTYPE_QUOTED,i.q=o));continue;case S.DOCTYPE_QUOTED:i.doctype+=o,o===i.q&&(i.q="",i.state=S.DOCTYPE);continue;case S.DOCTYPE_DTD:"]"===o?(i.doctype+=o,i.state=S.DOCTYPE):"<"===o?(i.state=S.OPEN_WAKA,i.startTagPosition=i.position):y(o)?(i.doctype+=o,i.state=S.DOCTYPE_DTD_QUOTED,i.q=o):i.doctype+=o;continue;case S.DOCTYPE_DTD_QUOTED:i.doctype+=o,o===i.q&&(i.state=S.DOCTYPE_DTD,i.q="");continue;case S.COMMENT:"-"===o?i.state=S.COMMENT_ENDING:i.comment+=o;continue;case S.COMMENT_ENDING:"-"===o?(i.state=S.COMMENT_ENDED,i.comment=k(i.opt,i.comment),i.comment&&x(i,"oncomment",i.comment),i.comment=""):(i.comment+="-"+o,i.state=S.COMMENT);continue;case S.COMMENT_ENDED:">"!==o?(M(i,"Malformed comment"),i.comment+="--"+o,i.state=S.COMMENT):i.doctype&&!0!==i.doctype?i.state=S.DOCTYPE_DTD:i.state=S.TEXT;continue;case S.CDATA:for(s=r-1;o&&"]"!==o;)(o=B(t,r++))&&i.trackPosition&&(i.position++,"\n"===o?(i.line++,i.column=0):i.column++);i.cdata+=t.substring(s,r-1),"]"===o&&(i.state=S.CDATA_ENDING);continue;case S.CDATA_ENDING:"]"===o?i.state=S.CDATA_ENDING_2:(i.cdata+="]"+o,i.state=S.CDATA);continue;case S.CDATA_ENDING_2:">"===o?(i.cdata&&x(i,"oncdata",i.cdata),x(i,"onclosecdata"),i.cdata="",i.state=S.TEXT):"]"===o?i.cdata+="]":(i.cdata+="]]"+o,i.state=S.CDATA);continue;case S.PROC_INST:"?"===o?i.state=S.PROC_INST_ENDING:m(o)?i.state=S.PROC_INST_BODY:i.procInstName+=o;continue;case S.PROC_INST_BODY:if(!i.procInstBody&&m(o))continue;"?"===o?i.state=S.PROC_INST_ENDING:i.procInstBody+=o;continue;case S.PROC_INST_ENDING:if(">"===o){const e={name:i.procInstName,body:i.procInstBody};P(i,e),x(i,"onprocessinginstruction",e),i.procInstName=i.procInstBody="",i.state=S.TEXT}else i.procInstBody+="?"+o,i.state=S.PROC_INST_BODY;continue;case S.OPEN_TAG:_(p,o)?i.tagName+=o:(I(i),">"===o?F(i):"/"===o?i.state=S.OPEN_TAG_SLASH:(m(o)||M(i,"Invalid character in tag name"),i.state=S.ATTRIB));continue;case S.OPEN_TAG_SLASH:">"===o?(F(i,!0),L(i)):(M(i,"Forward-slash in opening tag not followed by >"),i.state=S.ATTRIB);continue;case S.ATTRIB:if(m(o))continue;">"===o?F(i):"/"===o?i.state=S.OPEN_TAG_SLASH:_(d,o)?(i.attribName=o,i.attribValue="",i.state=S.ATTRIB_NAME):M(i,"Invalid attribute name");continue;case S.ATTRIB_NAME:"="===o?i.state=S.ATTRIB_VALUE:">"===o?(M(i,"Attribute without value"),i.attribValue=i.attribName,j(i),F(i)):m(o)?i.state=S.ATTRIB_NAME_SAW_WHITE:_(p,o)?i.attribName+=o:M(i,"Invalid attribute name");continue;case S.ATTRIB_NAME_SAW_WHITE:if("="===o)i.state=S.ATTRIB_VALUE;else{if(m(o))continue;M(i,"Attribute without value"),i.tag.attributes[i.attribName]="",i.attribValue="",x(i,"onattribute",{name:i.attribName,value:""}),i.attribName="",">"===o?F(i):_(d,o)?(i.attribName=o,i.state=S.ATTRIB_NAME):(M(i,"Invalid attribute name"),i.state=S.ATTRIB)}continue;case S.ATTRIB_VALUE:if(m(o))continue;y(o)?(i.q=o,i.state=S.ATTRIB_VALUE_QUOTED):(i.opt.unquotedAttributeValues||N(i,"Unquoted attribute value"),i.state=S.ATTRIB_VALUE_UNQUOTED,i.attribValue=o);continue;case S.ATTRIB_VALUE_QUOTED:if(o!==i.q){"&"===o?i.state=S.ATTRIB_VALUE_ENTITY_Q:i.attribValue+=o;continue}j(i),i.q="",i.state=S.ATTRIB_VALUE_CLOSED;continue;case S.ATTRIB_VALUE_CLOSED:m(o)?i.state=S.ATTRIB:">"===o?F(i):"/"===o?i.state=S.OPEN_TAG_SLASH:_(d,o)?(M(i,"No whitespace between attributes"),i.attribName=o,i.attribValue="",i.state=S.ATTRIB_NAME):M(i,"Invalid attribute name");continue;case S.ATTRIB_VALUE_UNQUOTED:if(!v(o)){"&"===o?i.state=S.ATTRIB_VALUE_ENTITY_U:i.attribValue+=o;continue}j(i),">"===o?F(i):i.state=S.ATTRIB;continue;case S.CLOSE_TAG:if(i.tagName)">"===o?L(i):_(p,o)?i.tagName+=o:i.script?(i.script+="</"+i.tagName+o,i.tagName="",i.state=S.SCRIPT):(m(o)||M(i,"Invalid tagname in closing tag"),i.state=S.CLOSE_TAG_SAW_WHITE);else{if(m(o))continue;b(d,o)?i.script?(i.script+="</"+o,i.state=S.SCRIPT):M(i,"Invalid tagname in closing tag."):i.tagName=o}continue;case S.CLOSE_TAG_SAW_WHITE:if(m(o))continue;">"===o?L(i):M(i,"Invalid characters in closing tag");continue;case S.TEXT_ENTITY:case S.ATTRIB_VALUE_ENTITY_Q:case S.ATTRIB_VALUE_ENTITY_U:var u,h;switch(i.state){case S.TEXT_ENTITY:u=S.TEXT,h="textNode";break;case S.ATTRIB_VALUE_ENTITY_Q:u=S.ATTRIB_VALUE_QUOTED,h="attribValue";break;case S.ATTRIB_VALUE_ENTITY_U:u=S.ATTRIB_VALUE_UNQUOTED,h="attribValue"}if(";"===o){var w=W(i);i.opt.unparsedEntities&&!Object.values(e.XML_ENTITIES).includes(w)?((i.entityCount+=1)>i.opt.maxEntityCount&&N(i,"Parsed entity count exceeds max entity count"),(i.entityDepth+=1)>i.opt.maxEntityDepth&&N(i,"Parsed entity depth exceeds max entity depth"),i.entity="",i.state=u,i.write(w),i.entityDepth-=1):(i[h]+=w,i.entity="",i.state=u)}else _(i.entity.length?g:f,o)?i.entity+=o:(M(i,"Invalid character in entity name"),i[h]+="&"+i.entity+o,i.entity="",i.state=u);continue;default:throw new Error(i,"Unknown state: "+i.state)}return i.position>=i.bufferCheckPosition&&function(t){for(var i=Math.max(e.MAX_BUFFER_LENGTH,10),r=0,o=0,s=n.length;o<s;o++){var a=t[n[o]].length;if(a>i)switch(n[o]){case"textNode":O(t);break;case"cdata":x(t,"oncdata",t.cdata),t.cdata="";break;case"script":x(t,"onscript",t.script),t.script="";break;default:N(t,"Max buffer length exceeded: "+n[o])}r=Math.max(r,a)}var c=e.MAX_BUFFER_LENGTH-r;t.bufferCheckPosition=c+t.position}(i),i},resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){var e;O(e=this),""!==e.cdata&&(x(e,"oncdata",e.cdata),e.cdata=""),""!==e.script&&(x(e,"onscript",e.script),e.script="")}};try{t=i(2203).Stream}catch(e){t=function(){}}t||(t=function(){});var o=e.EVENTS.filter(function(e){return"error"!==e&&"end"!==e});function s(e,i){if(!(this instanceof s))return new s(e,i);t.apply(this),this._parser=new r(e,i),this.writable=!0,this.readable=!0;var n=this;this._parser.onend=function(){n.emit("end")},this._parser.onerror=function(e){n.emit("error",e),n._parser.error=null},this._decoder=null,this._decoderBuffer=null,o.forEach(function(e){Object.defineProperty(n,"on"+e,{get:function(){return n._parser["on"+e]},set:function(t){if(!t)return n.removeAllListeners(e),n._parser["on"+e]=t,t;n.on(e,t)},enumerable:!0,configurable:!1})})}s.prototype=Object.create(t.prototype,{constructor:{value:s}}),s.prototype._decodeBuffer=function(e,t){if(this._decoderBuffer&&(e=Buffer.concat([this._decoderBuffer,e]),this._decoderBuffer=null),!this._decoder){var i=function(e,t){if(e.length>=2){if(255===e[0]&&254===e[1])return"utf-16le";if(254===e[0]&&255===e[1])return"utf-16be"}return e.length>=3&&239===e[0]&&187===e[1]&&191===e[2]?"utf8":e.length>=4?60===e[0]&&0===e[1]&&63===e[2]&&0===e[3]?"utf-16le":0===e[0]&&60===e[1]&&0===e[2]&&63===e[3]?"utf-16be":"utf8":t?"utf8":null}(e,t);if(!i)return this._decoderBuffer=e,"";this._parser.encoding=i,this._decoder=new TextDecoder(i)}return this._decoder.decode(e,{stream:!t})},s.prototype.write=function(e){if("function"==typeof Buffer&&"function"==typeof Buffer.isBuffer&&Buffer.isBuffer(e))e=this._decodeBuffer(e,!1);else if(this._decoderBuffer){var t=this._decodeBuffer(Buffer.alloc(0),!0);t&&(this._parser.write(t),this.emit("data",t))}return this._parser.write(e.toString()),this.emit("data",e),!0},s.prototype.end=function(e){if(e&&e.length&&this.write(e),this._decoderBuffer){var t=this._decodeBuffer(Buffer.alloc(0),!0);t&&(this._parser.write(t),this.emit("data",t))}else if(this._decoder){var i=this._decoder.decode();i&&(this._parser.write(i),this.emit("data",i))}return this._parser.end(),!0},s.prototype.on=function(e,i){var n=this;return n._parser["on"+e]||-1===o.indexOf(e)||(n._parser["on"+e]=function(){var t=1===arguments.length?[arguments[0]]:Array.apply(null,arguments);t.splice(0,0,e),n.emit.apply(n,t)}),t.prototype.on.call(n,e,i)};var a="[CDATA[",c="DOCTYPE",l="http://www.w3.org/XML/1998/namespace",u="http://www.w3.org/2000/xmlns/",h={xml:l,xmlns:u},d=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,p=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/,f=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,g=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/;function m(e){return" "===e||"\n"===e||"\r"===e||"\t"===e}function y(e){return'"'===e||"'"===e}function v(e){return">"===e||m(e)}function _(e,t){return e.test(t)}function b(e,t){return!_(e,t)}var w,D,T,S=0;for(var C in e.STATE={BEGIN:S++,BEGIN_WHITESPACE:S++,TEXT:S++,TEXT_ENTITY:S++,OPEN_WAKA:S++,SGML_DECL:S++,SGML_DECL_QUOTED:S++,DOCTYPE:S++,DOCTYPE_QUOTED:S++,DOCTYPE_DTD:S++,DOCTYPE_DTD_QUOTED:S++,COMMENT_STARTING:S++,COMMENT:S++,COMMENT_ENDING:S++,COMMENT_ENDED:S++,CDATA:S++,CDATA_ENDING:S++,CDATA_ENDING_2:S++,PROC_INST:S++,PROC_INST_BODY:S++,PROC_INST_ENDING:S++,OPEN_TAG:S++,OPEN_TAG_SLASH:S++,ATTRIB:S++,ATTRIB_NAME:S++,ATTRIB_NAME_SAW_WHITE:S++,ATTRIB_VALUE:S++,ATTRIB_VALUE_QUOTED:S++,ATTRIB_VALUE_CLOSED:S++,ATTRIB_VALUE_UNQUOTED:S++,ATTRIB_VALUE_ENTITY_Q:S++,ATTRIB_VALUE_ENTITY_U:S++,CLOSE_TAG:S++,CLOSE_TAG_SAW_WHITE:S++,SCRIPT:S++,SCRIPT_ENDING:S++},e.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},e.ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'",AElig:198,Aacute:193,Acirc:194,Agrave:192,Aring:197,Atilde:195,Auml:196,Ccedil:199,ETH:208,Eacute:201,Ecirc:202,Egrave:200,Euml:203,Iacute:205,Icirc:206,Igrave:204,Iuml:207,Ntilde:209,Oacute:211,Ocirc:212,Ograve:210,Oslash:216,Otilde:213,Ouml:214,THORN:222,Uacute:218,Ucirc:219,Ugrave:217,Uuml:220,Yacute:221,aacute:225,acirc:226,aelig:230,agrave:224,aring:229,atilde:227,auml:228,ccedil:231,eacute:233,ecirc:234,egrave:232,eth:240,euml:235,iacute:237,icirc:238,igrave:236,iuml:239,ntilde:241,oacute:243,ocirc:244,ograve:242,oslash:248,otilde:245,ouml:246,szlig:223,thorn:254,uacute:250,ucirc:251,ugrave:249,uuml:252,yacute:253,yuml:255,copy:169,reg:174,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,ordf:170,laquo:171,not:172,shy:173,macr:175,deg:176,plusmn:177,sup1:185,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,times:215,divide:247,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,int:8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830},Object.keys(e.ENTITIES).forEach(function(t){var i=e.ENTITIES[t],n="number"==typeof i?String.fromCharCode(i):i;e.ENTITIES[t]=n}),e.STATE)e.STATE[e.STATE[C]]=C;function R(e,t,i){e[t]&&e[t](i)}function E(e){return e?e.toLowerCase().replace(/[^a-z0-9]/g,""):null}function P(e,t){if(e.strict&&e.encoding&&t&&"xml"===t.name){var i,n,r=(n=(i=t.body)&&i.match(/(?:^|\s)encoding\s*=\s*(['"])([^'"]+)\1/i))?n[2]:null;r&&!function(e,t){const i=E(e),n=E(t);return!i||!n||("utf16"===n?"utf16le"===i||"utf16be"===i:i===n)}(e.encoding,r)&&M(e,"XML declaration encoding "+r+" does not match detected stream encoding "+e.encoding.toUpperCase())}}function x(e,t,i){e.textNode&&O(e),R(e,t,i)}function O(e){e.textNode=k(e.opt,e.textNode),e.textNode&&R(e,"ontext",e.textNode),e.textNode=""}function k(e,t){return e.trim&&(t=t.trim()),e.normalize&&(t=t.replace(/\s+/g," ")),t}function N(e,t){return O(e),e.trackPosition&&(t+="\nLine: "+e.line+"\nColumn: "+e.column+"\nChar: "+e.c),t=new Error(t),e.error=t,R(e,"onerror",t),e}function A(e){return e.sawRoot&&!e.closedRoot&&M(e,"Unclosed root tag"),e.state!==S.BEGIN&&e.state!==S.BEGIN_WHITESPACE&&e.state!==S.TEXT&&N(e,"Unexpected end"),O(e),e.c="",e.closed=!0,R(e,"onend"),r.call(e,e.strict,e.opt),e}function M(e,t){if("object"!=typeof e||!(e instanceof r))throw new Error("bad call to strictFail");e.strict&&N(e,t)}function I(e){e.strict||(e.tagName=e.tagName[e.looseCase]());var t=e.tags[e.tags.length-1]||e,i=e.tag={name:e.tagName,attributes:{}};e.opt.xmlns&&(i.ns=t.ns),e.attribList.length=0,x(e,"onopentagstart",i)}function q(e,t){var i=e.indexOf(":")<0?["",e]:e.split(":"),n=i[0],r=i[1];return t&&"xmlns"===e&&(n="xmlns",r=""),{prefix:n,local:r}}function j(e){if(e.strict||(e.attribName=e.attribName[e.looseCase]()),-1!==e.attribList.indexOf(e.attribName)||e.tag.attributes.hasOwnProperty(e.attribName))e.attribName=e.attribValue="";else{if(e.opt.xmlns){var t=q(e.attribName,!0),i=t.prefix,n=t.local;if("xmlns"===i)if("xml"===n&&e.attribValue!==l)M(e,"xml: prefix must be bound to "+l+"\nActual: "+e.attribValue);else if("xmlns"===n&&e.attribValue!==u)M(e,"xmlns: prefix must be bound to "+u+"\nActual: "+e.attribValue);else{var r=e.tag,o=e.tags[e.tags.length-1]||e;r.ns===o.ns&&(r.ns=Object.create(o.ns)),r.ns[n]=e.attribValue}e.attribList.push([e.attribName,e.attribValue])}else e.tag.attributes[e.attribName]=e.attribValue,x(e,"onattribute",{name:e.attribName,value:e.attribValue});e.attribName=e.attribValue=""}}function F(e,t){if(e.opt.xmlns){var i=e.tag,n=q(e.tagName);i.prefix=n.prefix,i.local=n.local,i.uri=i.ns[n.prefix]||"",i.prefix&&!i.uri&&(M(e,"Unbound namespace prefix: "+JSON.stringify(e.tagName)),i.uri=n.prefix);var r=e.tags[e.tags.length-1]||e;i.ns&&r.ns!==i.ns&&Object.keys(i.ns).forEach(function(t){x(e,"onopennamespace",{prefix:t,uri:i.ns[t]})});for(var o=0,s=e.attribList.length;o<s;o++){var a=e.attribList[o],c=a[0],l=a[1],u=q(c,!0),h=u.prefix,d=u.local,p=""===h?"":i.ns[h]||"",f={name:c,value:l,prefix:h,local:d,uri:p};h&&"xmlns"!==h&&!p&&(M(e,"Unbound namespace prefix: "+JSON.stringify(h)),f.uri=h),e.tag.attributes[c]=f,x(e,"onattribute",f)}e.attribList.length=0}e.tag.isSelfClosing=!!t,e.sawRoot=!0,e.tags.push(e.tag),x(e,"onopentag",e.tag),t||(e.noscript||"script"!==e.tagName.toLowerCase()?e.state=S.TEXT:e.state=S.SCRIPT,e.tag=null,e.tagName=""),e.attribName=e.attribValue="",e.attribList.length=0}function L(e){if(!e.tagName)return M(e,"Weird empty close tag."),e.textNode+="</>",void(e.state=S.TEXT);if(e.script){if("script"!==e.tagName)return e.script+="</"+e.tagName+">",e.tagName="",void(e.state=S.SCRIPT);x(e,"onscript",e.script),e.script=""}var t=e.tags.length,i=e.tagName;e.strict||(i=i[e.looseCase]());for(var n=i;t--&&e.tags[t].name!==n;)M(e,"Unexpected close tag");if(t<0)return M(e,"Unmatched closing tag: "+e.tagName),e.textNode+="</"+e.tagName+">",void(e.state=S.TEXT);e.tagName=i;for(var r=e.tags.length;r-- >t;){var o=e.tag=e.tags.pop();e.tagName=e.tag.name,x(e,"onclosetag",e.tagName);var s={};for(var a in o.ns)s[a]=o.ns[a];var c=e.tags[e.tags.length-1]||e;e.opt.xmlns&&o.ns!==c.ns&&Object.keys(o.ns).forEach(function(t){var i=o.ns[t];x(e,"onclosenamespace",{prefix:t,uri:i})})}0===t&&(e.closedRoot=!0),e.tagName=e.attribValue=e.attribName="",e.attribList.length=0,e.state=S.TEXT}function W(e){var t,i=e.entity,n=i.toLowerCase(),r="";return e.ENTITIES[i]?e.ENTITIES[i]:e.ENTITIES[n]?e.ENTITIES[n]:("#"===(i=n).charAt(0)&&("x"===i.charAt(1)?(i=i.slice(2),r=(t=parseInt(i,16)).toString(16)):(i=i.slice(1),r=(t=parseInt(i,10)).toString(10))),i=i.replace(/^0+/,""),isNaN(t)||r.toLowerCase()!==i||t<0||t>1114111?(M(e,"Invalid character entity"),"&"+e.entity+";"):String.fromCodePoint(t))}function U(e,t){"<"===t?(e.state=S.OPEN_WAKA,e.startTagPosition=e.position):m(t)||(M(e,"Non-whitespace before first tag."),e.textNode=t,e.state=S.TEXT)}function B(e,t){var i="";return t<e.length&&(i=e.charAt(t)),i}S=e.STATE,String.fromCodePoint||(w=String.fromCharCode,D=Math.floor,T=function(){var e,t,i=[],n=-1,r=arguments.length;if(!r)return"";for(var o="";++n<r;){var s=Number(arguments[n]);if(!isFinite(s)||s<0||s>1114111||D(s)!==s)throw RangeError("Invalid code point: "+s);s<=65535?i.push(s):(e=55296+((s-=65536)>>10),t=s%1024+56320,i.push(e,t)),(n+1===r||i.length>16384)&&(o+=w.apply(null,i),i.length=0)}return o},Object.defineProperty?Object.defineProperty(String,"fromCodePoint",{value:T,configurable:!0,writable:!0}):String.fromCodePoint=T)}(t)},5192(e,t,i){"use strict";t.quote=i(3940),t.parse=i(9563)},9563(e){"use strict";for(var t="(?:"+["\\|\\|","\\&\\&",";;","\\|\\&","\\<\\(","\\<\\<\\<",">>",">\\&","<\\&","[&;()|<>]"].join("|")+")",i=new RegExp("^"+t+"$"),n="|&;()<> \\t",r=/^#$/,o="$",s="",a=0;a<4;a++)s+=(4294967296*Math.random()).toString(16);var c=new RegExp("^"+s);e.exports=function(e,a,l){var u=function(e,a,c){c||(c={});var l=c.escape||"\\",u=!0===c.splitUnquoted?" \t\n":"string"==typeof c.splitUnquoted?c.splitUnquoted:"",h=new RegExp(["("+t+")","((\\"+l+"['\""+n+"]|[^\\s'\""+n+'])+|"((\\\\"|[^"])*?)"|\'([^\']*?)\')+'].join("|"),"g"),d=function(e,t){for(var i,n=t.lastIndex,r=[];i=t.exec(e);)r[r.length]=i,t.lastIndex===i.index&&(t.lastIndex+=1);return t.lastIndex=n,r}(e,h);if(0===d.length)return[];a||(a={});var p=!1;return d.map(function(t){var n=t[0];if(n&&!p){if(i.test(n))return{op:n};var c,h=!1,d=!1,f="",g=[],m=!1,y=null,v=!1;for(c=0;c<n.length;c++){var _=n.charAt(c);if(u&&_!==o&&R(),v=v||!h&&("*"===_||"?"===_),d)f+=_,d=!1;else if(h)_===h?h=!1:"'"==h?f+=_:_===l?(c+=1,_=n.charAt(c),f+='"'===_||_===l||_===o?_:l+_):f+=_===o?C():_;else if('"'===_||"'"===_)h=_,m=!0;else{if(i.test(_))return{op:n};if(r.test(_)){p=!0;var b={comment:e.slice(t.index+c+1)};return f.length?[f,b]:[b]}if(_===l)d=!0;else if(_===o){var w=C();if(u)for(var D=0;D<w.length;D+=1){var T=w.charAt(D);u.indexOf(T)<0?(R(),f+=T):null===y?y=" "===T||"\t"===T||"\n"===T?0:1:" "!==T&&"\t"!==T&&"\n"!==T&&(y+=1)}else f+=w}else f+=_}}if(v)return{op:"glob",pattern:f};if(u){if(null!==y&&y>0){g[g.length]=f,f="";for(var S=1;S<y;S+=1)g[g.length]=""}return(""!==f||m&&0===g.length)&&(g[g.length]=f),g}return f}function C(){var e,t;c+=1;var i=n.charAt(c);if("{"===i){if(c+=1,"}"===n.charAt(c))throw new Error("Bad substitution: "+n.slice(c-2,c+1));var r=1;for(e=c;r>0&&e<n.length;)"{"===n.charAt(e)&&"$"===n.charAt(e-1)?r+=1:"}"===n.charAt(e)&&(r-=1),e+=1;if(0!==r)throw new Error("Bad substitution: "+n.slice(c));e-=1,t=n.slice(c,e),c=e}else if(/[*@#?$!_-]/.test(i))t=i,c+=1;else{var o=n.slice(c);(e=o.match(/[^\w\d_]/))?(t=o.slice(0,e.index),c+=e.index-1):(t=o,c=n.length)}return function(e,t,i){var n="function"==typeof e?e(i):e[i];return void 0===n&&""!=i?n="":void 0===n&&(n="$"),"object"==typeof n?""+s+JSON.stringify(n)+s:""+n}(a,0,t)}function R(){if(null!==y){if(0===y)""!==f&&(g[g.length]=f,f="");else{g[g.length]=f,f="";for(var e=1;e<y;e+=1)g[g.length]=""}y=null}}}).reduce(function(e,t){return void 0===t||[].concat(t).forEach(function(t){e[e.length]=t}),e},[])}(e,a,l);return"function"!=typeof a?u:u.reduce(function(e,t){if("object"==typeof t)return e[e.length]=t,e;var i=t.split(RegExp("("+s+".*?"+s+")","g"));return 1===i.length?(e[e.length]=i[0],e):(i.filter(Boolean).forEach(function(t){e[e.length]=c.test(t)?JSON.parse(t.split(s)[1]):t}),e)},[])}},3940(e){"use strict";var t=["||","&&",";;","|&","<(","<<<",">>",">&","<&","&",";","(",")","|","<",">"],i=/[\n\r\u2028\u2029]/,n=/[\s#!"$&'():;<=>@\\^`|]/g;e.exports=function(e){return e.map(function(e){if(""===e)return"''";if(e&&"object"==typeof e){if("op"in e&&"glob"===e.op){if("string"!=typeof e.pattern)throw new TypeError("glob token requires a string `pattern`");if(i.test(e.pattern))throw new TypeError("glob `pattern` must not contain line terminators");return e.pattern.replace(n,"\\$&")}if("op"in e&&"string"==typeof e.op){if(t.indexOf(e.op)<0)throw new TypeError("invalid `op` value: "+JSON.stringify(e.op));return e.op.replace(/[\s\S]/g,"\\$&")}if("comment"in e&&"string"==typeof e.comment){if(i.test(e.comment))throw new TypeError("`comment` must not contain line terminators");return"#"+e.comment}throw new TypeError("unrecognized object token shape")}return/["\s\\]/.test(e)&&!/'/.test(e)?"'"+e.replace(/(['])/g,"\\$1")+"'":/["'\s]/.test(e)?'"'+e.replace(/(["\\$`!])/g,"\\$1")+'"':String(e).replace(/([A-Za-z]:)?([#!"$&'()*,:;<=>?@[\\\]^`{|}~])/g,"$1\\$2")}).join(" ")}},990(e,t,i){"use strict";t.ActivityProgress=t.s=t.SLOW_ACTIVITY_DELAY_MS=t.ROUTINE_ANALYSIS_MESSAGE=t.Activity=void 0;const n=i(5215);var r;!function(e){e.Setup="setup",e.Compiler="compiler",e.Edit="edit",e.Compile="compile",e.Heap="heap",e.Request="request"}(r||(t.Activity=r={})),t.ROUTINE_ANALYSIS_MESSAGE="analysing",t.SLOW_ACTIVITY_DELAY_MS=500,t.s=1e4,t.ActivityProgress=class{constructor(e){this.activities=new Map,this.waiting=new Map,this.reporter=null,this.opening=!1,this.shown=null,this.connection=e}report(e,t,i={}){var n,r,o;const s={message:t,fallback:null!==(n=i.fallback)&&void 0!==n&&n,done_message:null!==(r=i.done_message)&&void 0!==r?r:null},a=this.waiting.get(e);if(a)a.activity=s;else{if(i.delay_ms&&!this.activities.has(e)){const t=setTimeout(()=>{const t=this.waiting.get(e);this.waiting.delete(e),t&&this.show(e,t.activity)},i.delay_ms);return null===(o=t.unref)||void 0===o||o.call(t),void this.waiting.set(e,{timer:t,activity:s})}this.show(e,s)}}end(e){const t=this.waiting.get(e);t&&(clearTimeout(t.timer),this.waiting.delete(e));const i=this.activities.get(e);if(this.activities.delete(e))return this.reporter&&0==this.activities.size&&(null==i?void 0:i.done_message)?(this.reporter.report(i.done_message),this.reporter.done(),this.reporter=null,void(this.shown=null)):void this.render()}show(e,t){this.activities.delete(e),this.activities.set(e,t),this.render()}current(){let e=null,t=null;for(const i of this.activities.values())i.fallback?t=i.message:e=i.message;return null!=e?e:t}render(){var e;const t=this.current();if(null==t)return null===(e=this.reporter)||void 0===e||e.done(),this.reporter=null,void(this.shown=null);this.reporter?t!=this.shown&&(this.shown=t,this.reporter.report(t)):this.open()}open(){var e,i,r;if(this.opening||!(null===(i=null===(e=this.connection)||void 0===e?void 0:e.window)||void 0===i?void 0:i.createWorkDoneProgress))return;this.opening=!0;const o=setTimeout(()=>{this.opening=!1,(0,n.log)("the client has not granted a progress token; will ask again for the next activity")},t.s);null===(r=o.unref)||void 0===r||r.call(o),Promise.resolve(this.connection.window.createWorkDoneProgress()).then(e=>{clearTimeout(o),this.opening=!1;const t=this.current();if(null==t||this.reporter)return e.begin("ghūl",void 0,"",!1),void e.done();e.begin("ghūl",void 0,t,!1),this.reporter=e,this.shown=t},e=>{clearTimeout(o),this.opening=!1,(0,n.log)(`could not create a progress reporter: ${e}`)})}}},1076(e,t,i){"use strict";t.CompilerQuickFixProvider=void 0;const n=i(2861),r=i(2029);class o{provide(e,t,i){const n=[],r=new Set;for(const s of i){const i=o.toDiagnostic(s);for(const a of o.fixesOf(s)){if(!o.editsStillApply(e,a.edits))continue;const s=JSON.stringify([a.title,a.edits]);r.has(s)||(r.add(s),n.push(o.buildAction(t,i,a)))}}return n}static fixesOf(e){return Array.isArray(e.fixes)?e.fixes.filter(e=>e&&"string"==typeof e.title&&Array.isArray(e.edits)&&e.edits.every(e=>e&&"string"==typeof e.new_text&&"number"==typeof e.start_line)).map(e=>({title:e.title,isPreferred:!!e.is_preferred,edits:e.edits.map(e=>{var t;return{range:{start:{line:e.start_line-1,character:e.start_column-1},end:{line:e.end_line-1,character:e.end_column-1}},replaces:null!==(t=e.replaces)&&void 0!==t?t:null,newText:e.new_text}})})):[]}static toDiagnostic(e){const t={severity:r.SeverityMapper.getSeverity(e.severity,"new"),range:{start:{line:e.start_line-1,character:e.start_column-1},end:{line:e.end_line-1,character:e.end_column-1}},message:e.message,source:"ghūl"};return e.code&&(t.code=e.code),t}static editsStillApply(e,t){return t.every(t=>null==t.replaces||e.getText(t.range)===t.replaces)}static buildAction(e,t,i){const n=i.edits.map(e=>({range:e.range,newText:e.newText})),r={changes:{[e]:n}},s={title:i.title,kind:o.KIND,diagnostics:[t],edit:r};return i.isPreferred&&(s.isPreferred=!0),s}}t.CompilerQuickFixProvider=o,o.KIND=n.CodeActionKind.QuickFix},6781(e,t,i){"use strict";t.ConfigEventEmitter=void 0;const n=i(4434);class r extends n.EventEmitter{constructor(){super()}configAvailable(e,t){this.emit("config-available",e,t)}onConfigAvailable(e){this.on("config-available",e)}}t.ConfigEventEmitter=r},4465(e,t,i){"use strict";var n=this&&this.__awaiter||function(e,t,i,n){return new(i||(i=Promise))(function(r,o){function s(e){try{c(n.next(e))}catch(e){o(e)}}function a(e){try{c(n.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?r(e.value):(t=e.value,t instanceof i?t:new i(function(e){e(t)})).then(s,a)}c((n=n.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.ConnectionEventHandler=t.WATCHED_FILE_GLOBS=void 0;const r=i(2861),o=i(8945),s=i(1323),a=i(5215),c=i(1076),l=i(2510);t.WATCHED_FILE_GLOBS=["**/*.ghul","**/*.ghulproj","**/Directory.Build.props","**/Directory.Packages.props","**/dotnet-tools.json","**/.block-compiler"],t.ConnectionEventHandler=class{constructor(e,t,i){this.compiler_quick_fix_provider=new c.CompilerQuickFixProvider,this.extension_state=e,this.connection=t,this.documents=i,t.onInitialize(e=>this.onInitialize(e)),t.onShutdown(()=>this.onShutdown()),t.onExit(()=>this.onExit()),t.onDidChangeConfiguration(e=>this.onDidChangeConfiguration(e)),t.onDidChangeWatchedFiles(e=>this.extension_state.onDidChangeWatchedFiles(e)),t.onCompletion((e,t)=>this.onCompletion(e,t)),t.onHover((e,t)=>this.onHover(e,t)),t.onDefinition((e,t)=>this.onDefinition(e,t)),t.onDeclaration((e,t)=>this.onDeclaration(e,t)),t.onSignatureHelp((e,t)=>this.onSignatureHelp(e,t)),t.onDocumentSymbol((e,t)=>this.onDocumentSymbol(e,t)),t.onWorkspaceSymbol((e,t)=>this.onWorkspaceSymbol(t)),t.onReferences((e,t)=>this.onReferences(e,t)),t.onImplementation((e,t)=>this.onImplementation(e,t)),t.onTypeDefinition((e,t)=>this.onTypeDefinition(e,t)),t.onRenameRequest(e=>this.onRenameRequest(e)),t.onDocumentFormatting(e=>this.onDocumentFormatting(e)),t.onDocumentRangeFormatting(e=>this.onDocumentRangeFormatting(e)),t.languages.semanticTokens.on((e,t)=>this.onSemanticTokens(e,t)),t.languages.inlayHint.on((e,t)=>this.onInlayHint(e,t)),t.onCodeAction(e=>this.onCodeAction(e))}workspaceForUri(e){return this.extension_state.getWorkspaceForUri(e)}onInitialize(e){var i,n,o,c,u,h,d,p,f,g,m,y,v;this.extension_state.setClientSupportsConfiguration(!!(null===(n=null===(i=e.capabilities)||void 0===i?void 0:i.workspace)||void 0===n?void 0:n.configuration)),this.extension_state.setClientSupportsRefresh(!!(null===(u=null===(c=null===(o=e.capabilities)||void 0===o?void 0:o.workspace)||void 0===c?void 0:c.semanticTokens)||void 0===u?void 0:u.refreshSupport)&&!!(null===(p=null===(d=null===(h=e.capabilities)||void 0===h?void 0:h.workspace)||void 0===d?void 0:d.inlayHint)||void 0===p?void 0:p.refreshSupport));const _=this.collectWorkspaceRoots(e),b=[];for(const e of _)l.WorkspaceContext.looksLikeGhulWorkspace(e)?b.push(this.extension_state.registerWorkspace(e)):(0,a.log)(`skipping non-ghūl workspace folder: ${e}`);const w=!!(null===(g=null===(f=e.capabilities)||void 0===f?void 0:f.workspace)||void 0===g?void 0:g.workspaceFolders),D=!!(null===(v=null===(y=null===(m=e.capabilities)||void 0===m?void 0:m.workspace)||void 0===y?void 0:y.didChangeWatchedFiles)||void 0===v?void 0:v.dynamicRegistration);return this.connection.onInitialized(()=>{for(const e of b)e.initializeDetached();w&&this.connection.workspace.onDidChangeWorkspaceFolders(e=>this.onDidChangeWorkspaceFolders(e)),D&&this.connection.client.register(r.DidChangeWatchedFilesNotification.type,{watchers:t.WATCHED_FILE_GLOBS.map(e=>({globPattern:e}))})}),{capabilities:{textDocumentSync:{openClose:!0,change:r.TextDocumentSyncKind.Incremental},completionProvider:{triggerCharacters:[".",":"],resolveProvider:!1},documentSymbolProvider:!0,workspaceSymbolProvider:!0,hoverProvider:!0,definitionProvider:!0,declarationProvider:!0,referencesProvider:!0,signatureHelpProvider:{triggerCharacters:["(","["]},implementationProvider:!0,typeDefinitionProvider:!0,renameProvider:!0,documentFormattingProvider:!0,documentRangeFormattingProvider:!0,semanticTokensProvider:{legend:s.SEMANTIC_TOKENS_LEGEND,full:!0,range:!1},inlayHintProvider:!0,codeActionProvider:{codeActionKinds:[r.CodeActionKind.QuickFix]},workspace:{workspaceFolders:{supported:!0,changeNotifications:!0}}}}}collectWorkspaceRoots(e){const t=e.workspaceFolders;if(t&&t.length>0)return t.map(e=>this.folderUriToPath(e.uri)).filter(e=>!!e);if(e.rootUri){const t=this.folderUriToPath(e.rootUri);if(t)return[t]}return e.rootPath?[e.rootPath]:[]}folderUriToPath(e){try{return o.URI.parse(e).fsPath||null}catch(t){return(0,a.log)(`could not parse workspace folder uri '${e}': ${t}`),null}}onDidChangeWorkspaceFolders(e){for(const t of e.removed){const e=this.folderUriToPath(t.uri);e&&((0,a.log)(`workspace folder removed: ${e}`),this.extension_state.unregisterWorkspace(e))}for(const t of e.added){const e=this.folderUriToPath(t.uri);e&&(l.WorkspaceContext.looksLikeGhulWorkspace(e)?((0,a.log)(`workspace folder added: ${e}`),this.extension_state.registerWorkspace(e).initializeDetached()):(0,a.log)(`skipping added non-ghūl workspace folder: ${e}`))}}onShutdown(){(0,a.log)("language extension: shutting down...");for(const e of this.extension_state.allWorkspaces())e.server_manager.kill()}onExit(){(0,a.log)("language extension: exit")}onDidChangeConfiguration(e){(0,a.log)("language extension: configuration changed");for(const e of this.extension_state.allWorkspaces())e.reinitialize()}onCompletion(e,t){return n(this,void 0,void 0,function*(){const i=this.workspaceForUri(e.textDocument.uri);if(!i)return[];const n="."==e.context.triggerCharacter;return n&&(yield i.edit_queue.whenFlushed()),i.requester.sendCompletion(e.textDocument.uri,e.position.line,e.position.character,n,t)})}onHover(e,t){const i=this.workspaceForUri(e.textDocument.uri);return i?i.requester.sendHover(e.textDocument.uri,e.position.line,e.position.character,t):Promise.resolve(null)}onDefinition(e,t){const i=this.workspaceForUri(e.textDocument.uri);return i?i.requester.sendDefinition(e.textDocument.uri,e.position.line,e.position.character,t):Promise.resolve([])}onDeclaration(e,t){const i=this.workspaceForUri(e.textDocument.uri);return i?i.requester.sendDeclaration(e.textDocument.uri,e.position.line,e.position.character,t):Promise.resolve([])}onSignatureHelp(e,t){const i=this.workspaceForUri(e.textDocument.uri);return i?(i.edit_queue.sendQueued(),i.requester.sendSignature(e.textDocument.uri,e.position.line,e.position.character,t)):Promise.resolve(null)}onDocumentSymbol(e,t){const i=this.workspaceForUri(e.textDocument.uri);return i?i.requester.sendDocumentSymbol(e.textDocument.uri,t):Promise.resolve([])}onWorkspaceSymbol(e){return n(this,void 0,void 0,function*(){const t=this.extension_state.allWorkspaces();return 0===t.length?[]:(yield Promise.all(t.map(t=>{var i;return null!==(i=t.requester.sendWorkspaceSymbol(e))&&void 0!==i?i:Promise.resolve([])}))).reduce((e,t)=>t?e.concat(t):e,[])})}onReferences(e,t){const i=this.workspaceForUri(e.textDocument.uri);return i?i.requester.sendReferences(e.textDocument.uri,e.position.line,e.position.character,t):Promise.resolve([])}onImplementation(e,t){const i=this.workspaceForUri(e.textDocument.uri);return i?i.requester.sendImplementation(e.textDocument.uri,e.position.line,e.position.character,t):Promise.resolve([])}onTypeDefinition(e,t){const i=this.workspaceForUri(e.textDocument.uri);return i?i.requester.sendTypeDefinition(e.textDocument.uri,e.position.line,e.position.character,t):Promise.resolve([])}onRenameRequest(e){const t=this.workspaceForUri(e.textDocument.uri);return t?t.requester.sendRenameRequest(e.textDocument.uri,e.position.line,e.position.character,e.newName):Promise.resolve(null)}onDocumentFormatting(e){const t=this.workspaceForUri(e.textDocument.uri);if(!t)return Promise.resolve([]);let i=this.documents.get(e.textDocument.uri);if(!i)return Promise.resolve([]);let n={start:{line:0,character:0},end:{line:i.lineCount+1,character:0}};return t.requester.sendDocumentFormatting(e.textDocument.uri,i.getText(),n)}onCodeAction(e){return n(this,void 0,void 0,function*(){const t=this.documents.get(e.textDocument.uri);if(!t)return[];const i=this.workspaceForUri(e.textDocument.uri);if(!i)return[];const n=yield i.requester.sendCodeActions(e.textDocument.uri,e.range);return this.compiler_quick_fix_provider.provide(t,e.textDocument.uri,n)})}onSemanticTokens(e,t){const i=this.workspaceForUri(e.textDocument.uri);return i?(i.edit_queue.sendQueued(),i.requester.sendSemanticTokens(e.textDocument.uri,t)):Promise.resolve({data:[]})}onInlayHint(e,t){const i=this.workspaceForUri(e.textDocument.uri);return i?(i.edit_queue.sendQueued(),i.requester.sendInlayHints(e.textDocument.uri,t)):Promise.resolve([])}onDocumentRangeFormatting(e){const t=this.workspaceForUri(e.textDocument.uri);if(!t)return Promise.resolve([]);let i=this.documents.get(e.textDocument.uri);return i?t.requester.sendDocumentRangeFormatting(e.textDocument.uri,i.getText(),e.range):Promise.resolve([])}}},6024(e,t,i){"use strict";t.DocumentChangeTracker=void 0;const n=i(2861),r=i(8945),o=i(1431),s=i(4150),a=i(4236),c=i(8722),l=i(9896);t.DocumentChangeTracker=class{constructor(e,t,i,n,r=[]){this.workspace=e,this.edit_queue=t,this.globs=i,this.documents=n,this.missing_assemblies=new Set(r.map(e=>e.replace(/\\/g,"/"))),this.debounced_reinitialize=(0,o.debounce)(5e3,()=>{this.workspace.reinitialize()})}dispose(){this.debounced_reinitialize.cancel()}onDidChangeWatchedFiles(e){if(null==e?void 0:e.changes)for(let t of e.changes){if(t.uri.endsWith(".ghulproj")||t.uri.endsWith("Directory.Build.props")||t.uri.endsWith("dotnet-tools.json"))return(0,a.log)("project file changed: "+t.uri),void this.debounced_reinitialize();if(t.uri.endsWith(".block-compiler"))(0,a.log)("compiler block requested: "+t.uri),this.workspace.reinitialize();else if(this.isMissingAssembly(t.uri))return(0,a.log)("referenced assembly appeared: "+t.uri),void this.debounced_reinitialize();let e=this.tryGetValidSourceFile(t.uri);if(!e)continue;let i=(0,s.normalizeFileUri)(t.uri);if(t.type==n.FileChangeType.Deleted)(0,a.log)("source file deleted: '",i,"', clearing in memory"),this.edit_queue.queueEdit3(i,null,"");else if(t.type==n.FileChangeType.Created||t.type==n.FileChangeType.Changed){if(this.isOpenInEditor(i))continue;(0,a.log)("source file changed on disk: '",i,"', reloading from file contents");let t=(0,l.readFileSync)(e,"utf8");this.edit_queue.queueEdit3(i,null,t)}}}isMissingAssembly(e){if(!this.missing_assemblies.size)return!1;let t=r.URI.parse(e);return!("file"!=t.scheme||!t.fsPath)&&this.missing_assemblies.has(t.fsPath.replace(/\\/g,"/"))}isOpenInEditor(e){for(let t of this.documents.all())if((0,s.normalizeFileUri)(t.uri)==e)return!0;return!1}tryGetValidSourceFile(e){let t=r.URI.parse(e);if("file"!=t.scheme)return null;let i=t.fsPath;if(!i)return null;let n=i.replace(/\\/g,"/");return this.globs.find(e=>(0,c.minimatch)(n,e))?i:null}}},2326(e,t){"use strict";function i(e,t){let i=1,n=0;for(let r=0;r<t;r++)"\n"===e[r]&&(i++,n=r+1);return{line:i,column:t-n+1}}t.computeSpan=function(e,t){const n=Math.min(e.length,t.length);let r=0;for(;r<n&&e[r]===t[r];)r++;let o=0;for(;o<n-r&&e[e.length-1-o]===t[t.length-1-o];)o++;const s=e.length-o;if(r===s&&r===t.length-o)return null;const a=i(e,r),c=i(e,s),l=t.substring(r,t.length-o);return{start_line:a.line,start_column:a.column,end_line:c.line,end_column:c.column,new_text:l,expected_length:e.length}}},8887(e,t,i){"use strict";t.EditQueue=void 0;const n=i(5215),r=i(4150),o=i(990),s=i(5127),a=i(2326);var c;!function(e){e[e.START=0]="START",e[e.IDLE=1]="IDLE",e[e.WAITING_FOR_MORE_EDITS=2]="WAITING_FOR_MORE_EDITS",e[e.DOING_PARTIAL_COMPILE=3]="DOING_PARTIAL_COMPILE",e[e.WAITING_FOR_MORE_EDITS_AFTER_PARTIAL_COMPILE=4]="WAITING_FOR_MORE_EDITS_AFTER_PARTIAL_COMPILE",e[e.DOING_FULL_COMPILE=5]="DOING_FULL_COMPILE",e[e.DOING_FULL_COMPILE_SUPERSEDED=6]="DOING_FULL_COMPILE_SUPERSEDED",e[e.DOING_HEAP_CHECK=7]="DOING_HEAP_CHECK"}(c||(c={}));class l{constructor(e,t,i,n,r){this.incremental_stats=null,this.last_stats_request_at=0,this.edit_count=0,this.build_count=0,this.fake_version=-1,this.requester=e,this.response_handler=t,this.watchdog=i,this.progress=null!=n?n:null,this.metrics=null!=r?r:null,this.edit_latency_ms=null,this.compile_latency_ms=null,this.pending_changes=new Map,this.last_sent_text=new Map,this.flushed_waiters=[],this.state=c.START,this.edit_timeout=l.PARTIAL_BUILD_EDIT_TIMEOUT,this.full_build_timeout=l.FULL_BUILD_EDIT_TIMEOUT}hasPendingEdits(){return this.pending_changes.size>0}reset(){var e,t,i;this.pending_changes.clear(),this.clearEditTimer(),this.clearIdleTimer(),null===(e=this.progress)||void 0===e||e.end(o.Activity.Edit),null===(t=this.progress)||void 0===t||t.end(o.Activity.Compile),null===(i=this.progress)||void 0===i||i.end(o.Activity.Heap),this.incremental_stats=null,this.last_stats_request_at=0,this.last_sent_text.clear(),this.send_start_time=0,this.compile_start_time=0;const n=this.flushed_waiters;this.flushed_waiters=[];for(const e of n)e();this.state=c.IDLE}queueEdit(e){this.queueEdit3((0,r.normalizeFileUri)(e.document.uri),e.document.version,e.document.getText())}sendMultiEdits(e){this.requester.sendDocuments(e);for(let t of e)this.last_sent_text.set((0,r.normalizeFileUri)(t.uri),t.source)}sendOpenFiles(e){this.requester.sendOpenFiles(e)}queueEdit3(e,t,i){(null==t||t<0)&&(t=this.fake_version--),this.pending_changes.set(e,{uri:e,version:t,text:i}),this.state==c.START||(this.state==c.IDLE?(this.clearIdleTimer(),this.state=c.WAITING_FOR_MORE_EDITS,this.startEditTimer(this.edit_timeout)):this.state==c.WAITING_FOR_MORE_EDITS?this.startEditTimer(this.edit_timeout):this.state==c.DOING_PARTIAL_COMPILE||(this.state==c.WAITING_FOR_MORE_EDITS_AFTER_PARTIAL_COMPILE?(this.state=c.WAITING_FOR_MORE_EDITS,this.startEditTimer(this.edit_timeout)):this.state==c.DOING_FULL_COMPILE?this.response_handler.compile_abort_supported&&this.startEditTimer(this.edit_timeout):this.state==c.DOING_FULL_COMPILE_SUPERSEDED||this.state==c.DOING_HEAP_CHECK||this.response_handler.rejectAllAndThrow("queue edit: unexpected queue state (A): "+c[this.state])))}onEditTimeout(){this.edit_timer=null,this.state==c.WAITING_FOR_MORE_EDITS?this.sendQueued("edit timeout when waiting for more edits"):this.state==c.WAITING_FOR_MORE_EDITS_AFTER_PARTIAL_COMPILE?this.pending_changes.size>0?this.sendQueued("edit timeout when waiting for more edits after partial compile"):this.requestFullCompile():this.state==c.DOING_FULL_COMPILE?this.sendSupersedingEdit():(0,n.log)("timer expired but not waiting for edits: "+c[this.state]+" ("+this.state+")")}onIdleTimeout(){var e;this.state!=c.IDLE||this.watchdog.isRunning()?this.startIdleTimer():(null===(e=this.progress)||void 0===e||e.report(o.Activity.Heap,"garbage collecting",{delay_ms:o.SLOW_ACTIVITY_DELAY_MS,done_message:"garbage collected"}),this.requester.sendHeapCheckRequest(),this.state=c.DOING_HEAP_CHECK)}onDiagnosticsReceived(){this.state==c.START&&(this.state=c.IDLE)}onPartialCompileDone(e){var t;this.state==c.DOING_PARTIAL_COMPILE?(this.requester.analysed=!0,this.recordLatency("edit",this.send_start_time),this.requestStatsIfDue(),e&&(this.edit_timeout=1.5*e,this.full_build_timeout<this.edit_timeout&&(this.full_build_timeout=this.edit_timeout,this.watchdog.setTimeout(2*this.full_build_timeout)),31&this.edit_count||(0,n.log)(`edit request average: ${e.toFixed()} ms, edit timeout: ${this.edit_timeout.toFixed()} ms, compile timeout: ${this.full_build_timeout.toFixed()} ms, watchdog timeout: ${this.watchdog.timeout_milliseconds.toFixed()} ms`),this.edit_count++),this.pending_changes.size>0?(this.state=c.WAITING_FOR_MORE_EDITS,this.startEditTimer(this.edit_timeout)):(null===(t=this.progress)||void 0===t||t.end(o.Activity.Edit),this.state=c.WAITING_FOR_MORE_EDITS_AFTER_PARTIAL_COMPILE,this.startEditTimer(this.full_build_timeout)),this.releaseFlushedWaiters()):(0,n.log)("edit queue: on partial compile done: unexpected queue state (C): "+c[this.state]+" ("+this.state+")")}onFullCompileDone(e){var t,i;if(this.state==c.DOING_FULL_COMPILE_SUPERSEDED)return null===(t=this.progress)||void 0===t||t.end(o.Activity.Compile),void(this.state=c.DOING_PARTIAL_COMPILE);this.state==c.DOING_FULL_COMPILE?(this.requester.analysed=!0,null===(i=this.progress)||void 0===i||i.end(o.Activity.Compile),this.recordLatency("compile",this.compile_start_time),this.requestStatsIfDue(),e&&(this.full_build_timeout=1.5*e,this.full_build_timeout<this.edit_timeout&&(this.full_build_timeout=this.edit_timeout),this.watchdog.setTimeout(2*this.full_build_timeout),31&this.build_count||(0,n.log)(`compile request average: ${e.toFixed()} ms, edit timeout: ${this.edit_timeout.toFixed()} ms, compile timeout: ${this.full_build_timeout.toFixed()} ms, watchdog timeout: ${this.watchdog.timeout_milliseconds.toFixed()} ms`),this.build_count++),this.pending_changes.size>0?(this.state=c.WAITING_FOR_MORE_EDITS,this.startEditTimer(this.edit_timeout)):(this.state=c.IDLE,this.startIdleTimer()),this.releaseFlushedWaiters()):(0,n.log)("edit queue: on full compile done: unexpected queue state: "+c[this.state])}onHeapCheckDone(){var e;this.state==c.DOING_HEAP_CHECK?(null===(e=this.progress)||void 0===e||e.end(o.Activity.Heap),this.pending_changes.size>0?(this.state=c.WAITING_FOR_MORE_EDITS,this.startEditTimer(this.edit_timeout)):this.state=c.IDLE,this.releaseFlushedWaiters()):(0,n.log)("edit queue: on heap check done: unexpected queue state: "+c[this.state])}forceScheduleFullCompile(){this.state=c.WAITING_FOR_MORE_EDITS_AFTER_PARTIAL_COMPILE,this.startEditTimer(l.FULL_BUILD_EDIT_TIMEOUT)}requestFullCompile(){var e;null===(e=this.progress)||void 0===e||e.report(o.Activity.Compile,o.ROUTINE_ANALYSIS_MESSAGE,{delay_ms:o.SLOW_ACTIVITY_DELAY_MS,fallback:!0}),this.compile_start_time=Date.now(),this.requester.sendFullCompileRequest(),this.state=c.DOING_FULL_COMPILE}recordLatency(e,t){if(!t)return;const i=Date.now()-t;"edit"==e?(this.send_start_time=0,this.edit_latency_ms=this.smooth(this.edit_latency_ms,i)):(this.compile_start_time=0,this.compile_latency_ms=this.smooth(this.compile_latency_ms,i)),this.reportMetrics()}smooth(e,t){return null==e?t:e+l.LATENCY_SMOOTHING*(t-e)}reportMetrics(){var e;null===(e=this.metrics)||void 0===e||e.report(this.edit_latency_ms,this.compile_latency_ms,this.response_handler.incremental_analysis_requested,this.incremental_stats)}onStatsReceived(e){this.incremental_stats=(0,s.summariseIncrementalStats)(e),this.reportMetrics()}requestStatsIfDue(){if(!this.response_handler.stats_supported)return;const e=Date.now();e-this.last_stats_request_at<l.STATS_INTERVAL||(this.last_stats_request_at=e,this.requester.sendStatsRequest())}startEditTimer(e){this.clearEditTimer(),this.edit_timer=setTimeout(()=>{this.onEditTimeout()},e)}clearEditTimer(){clearTimeout(this.edit_timer),this.edit_timer=null}startIdleTimer(){this.clearIdleTimer(),this.idle_timer=setTimeout(()=>{this.onIdleTimeout()},l.HEAP_CHECK_IDLE_TIMEOUT)}clearIdleTimer(){this.idle_timer&&(clearTimeout(this.idle_timer),this.idle_timer=null)}start(e){this.clearEditTimer(),this.clearIdleTimer(),this.state=c.DOING_PARTIAL_COMPILE,this.sendMultiEdits(e)}whenFlushed(){return 0==this.pending_changes.size?Promise.resolve():(this.sendQueued("flush ahead of a query"),0==this.pending_changes.size?Promise.resolve():new Promise(e=>{const t=setTimeout(()=>{this.flushed_waiters=this.flushed_waiters.filter(e=>e!==i),(0,n.log)("query proceeding without waiting further for the analyser to catch up"),e()},l.FLUSH_WAIT_TIMEOUT),i=()=>{clearTimeout(t),e()};this.flushed_waiters.push(i)}))}releaseFlushedWaiters(){if(0==this.flushed_waiters.length)return;this.sendQueued("flush for a waiting query");const e=this.flushed_waiters;this.flushed_waiters=[];for(const t of e)t()}sendQueued(e="send queued"){var t;if(0==this.pending_changes.size)return;if(this.state!=c.WAITING_FOR_MORE_EDITS&&this.state!=c.WAITING_FOR_MORE_EDITS_AFTER_PARTIAL_COMPILE)return;this.clearEditTimer(),this.send_start_time=Date.now();let i=[];for(let e of this.pending_changes.values())i.push({uri:e.uri,source:e.text});this.pending_changes.clear(),this.state=c.DOING_PARTIAL_COMPILE,null===(t=this.progress)||void 0===t||t.report(o.Activity.Edit,o.ROUTINE_ANALYSIS_MESSAGE,{delay_ms:o.SLOW_ACTIVITY_DELAY_MS,fallback:!0}),this.sendEdits(i)||this.onPartialCompileDone(0)}sendSupersedingEdit(){var e;if(0==this.pending_changes.size)return;this.clearEditTimer();const t=[];for(const e of this.pending_changes.values())t.push({uri:e.uri,source:e.text});this.pending_changes.clear(),this.sendEdits(t)&&(this.send_start_time=Date.now(),this.state=c.DOING_FULL_COMPILE_SUPERSEDED,null===(e=this.progress)||void 0===e||e.report(o.Activity.Edit,o.ROUTINE_ANALYSIS_MESSAGE,{delay_ms:o.SLOW_ACTIVITY_DELAY_MS,fallback:!0}))}sendEdits(e){if(!this.response_handler.edit_deltas_supported)return this.sendMultiEdits(e),!0;const t=[];for(let i of e){const n=(0,r.normalizeFileUri)(i.uri),o=this.last_sent_text.get(n);if(!o)return this.sendMultiEdits(e),!0;const s=(0,a.computeSpan)(o,i.source);s&&(t.push(Object.assign({path:n},s)),this.last_sent_text.set(n,i.source))}return 0!==t.length&&(this.requester.sendEditDeltas(t),!0)}}t.EditQueue=l,l.FULL_BUILD_EDIT_TIMEOUT=1e3,l.PARTIAL_BUILD_EDIT_TIMEOUT=100,l.HEAP_CHECK_IDLE_TIMEOUT=6e4,l.LATENCY_SMOOTHING=.3,l.STATS_INTERVAL=2e3,l.FLUSH_WAIT_TIMEOUT=500},2312(e,t,i){"use strict";t.ExtensionState=void 0;const n=i(2861),r=i(1327),o=i(5172),s=i(8945),a=i(4465),c=i(2510),l=i(5215);class u{constructor(){this.workspaces=new Map,this.client_supports_configuration=!1,this.client_supports_refresh=!1}static getInstance(){return u.instance||(u.instance=new u),u.instance}reset(){this.workspaces.clear()}connect(){this.connection=(0,r.createConnection)(),this.documents=new n.TextDocuments(o.TextDocument),this.documents.onDidChangeContent(e=>{const t=this.getWorkspaceForUri(e.document.uri);null==t||t.edit_queue.queueEdit(e)}),this.documents.onDidOpen(()=>this.broadcastOpenFiles()),this.documents.onDidClose(()=>this.broadcastOpenFiles()),this.connection_event_handler=new a.ConnectionEventHandler(this,this.connection,this.documents),this.documents.listen(this.connection),this.connection.listen()}setClientSupportsConfiguration(e){this.client_supports_configuration=e;for(const t of this.allWorkspaces())t.client_supports_configuration=e}setClientSupportsRefresh(e){this.client_supports_refresh=e;for(const t of this.allWorkspaces())t.response_handler.client_supports_refresh=e}registerWorkspace(e){const t=this.workspaces.get(e);if(t)return t;const i=new c.WorkspaceContext(e,this.connection,this.documents);return i.client_supports_configuration=this.client_supports_configuration,i.response_handler.client_supports_refresh=this.client_supports_refresh,this.workspaces.set(e,i),i}unregisterWorkspace(e){var t;const i=this.workspaces.get(e);i&&(null===(t=i.server_manager)||void 0===t||t.kill(),this.workspaces.delete(e))}allWorkspaces(){return Array.from(this.workspaces.values())}broadcastOpenFiles(){var e,t;const i=new Map;for(const t of this.documents.all()){const n=this.getWorkspaceForUri(t.uri);if(!n)continue;const r=null!==(e=i.get(n))&&void 0!==e?e:[];r.push(t.uri),i.set(n,r)}for(const e of this.allWorkspaces())e.edit_queue.sendOpenFiles(null!==(t=i.get(e))&&void 0!==t?t:[])}defaultWorkspace(){const e=this.workspaces.values().next();return e.done?null:e.value}getWorkspaceForUri(e){let t;try{t=s.URI.parse(e).fsPath}catch(t){return(0,l.log)(`getWorkspaceForUri: could not parse uri '${e}': ${t}`),null}if(!t)return null;const i=t.replace(/\\/g,"/");let n=null,r=-1;for(const e of this.workspaces.values()){const t=e.workspace_root.replace(/\\/g,"/");(i===t||i.startsWith(t+"/"))&&t.length>r&&(n=e,r=t.length)}return n}onDidChangeWatchedFiles(e){var t;if(null==e?void 0:e.changes)for(const i of e.changes){const e=this.getWorkspaceForUri(i.uri);e&&(null===(t=e.document_change_tracker)||void 0===t||t.onDidChangeWatchedFiles({changes:[i]}))}}}t.ExtensionState=u},6634(e,t,i){"use strict";t.generateAssembliesJson=function(e){return function(e,t,i){return function(e){return!!(0,r.readdirSync)(e).find(e=>e.endsWith(".ghulproj"))||((0,o.log)("no .ghulproj found: cannot generate .assemblies.json"),!1)}(e)?((0,o.log)(`${i}...`),new Promise(r=>{(0,n.execFile)(s,t,{cwd:e},(e,t)=>{if(e){let t=`could not generate .assemblies.json — the ghūl project may be missing or invalid: ${(n=e)instanceof Error?n.message:String(n)}`;return(0,o.log)(t),void r(t)}var n;(0,o.log)(t),(0,o.log)(`finished ${i}`),r(null)})})):Promise.resolve(null)}(e,a,"building project references")};const n=i(5317),r=i(9896),o=i(5215),s="dotnet",a=["build","-verbosity:minimal","-t:GenerateAssembliesJson"]},5657(e,t,i){"use strict";t.generateGhulOptionsJson=function(e){return function(e){let t;try{t=(0,r.readdirSync)(e)}catch(t){return(0,o.log)(`could not read ${e}: cannot generate .ghul-options.json`),!1}return!!t.find(e=>e.endsWith(".ghulproj"))||((0,o.log)("no .ghulproj found: cannot generate .ghul-options.json"),!1)}(e)?((0,o.log)("resolving compiler options..."),new Promise(t=>{(0,n.execFile)("dotnet",s,{cwd:e},(e,i)=>{e?(0,o.log)(`could not generate .ghul-options.json (falling back to hand-parsed .ghulproj options): ${e.message}`):((0,o.log)(i),(0,o.log)("finished resolving compiler options")),t()})})):Promise.resolve()};const n=i(5317),r=i(9896),o=i(5215),s=["build","-verbosity:minimal","-t:GenerateGhulOptionsJson"]},7221(e,t,i){"use strict";t.GhulAnalyser=void 0;const n=i(9896),r=i(7016),o=i(8862),s=i(4150);t.GhulAnalyser=class{constructor(e,t,i,n){this.edit_queue=e,this.documents=n,this.server_event_emitter=i,t.onConfigAvailable((e,t)=>{this.workspace_root=e,this.ghul_config=t}),i.onListening(()=>{this.analyseEntireProject()})}analyseEntireProject(){let e=this.ghul_config,t=[];e.source.forEach(e=>{t.push(...(0,o.globSync)(e,{cwd:this.workspace_root,absolute:!0}).filter(e=>e.endsWith(".ghul")).map(e=>(0,r.pathToFileURL)(e)))});let i=new Map;for(let e of this.documents.all())i.set((0,s.normalizeFileUri)(e.uri),e.getText());let a=t.map(e=>{let t=e.toString(),o=i.get((0,s.normalizeFileUri)(t));return{uri:t,source:void 0!==o?o:(0,n.readFileSync)((0,r.fileURLToPath)(e)).toString()}}),c=a.map(e=>e.uri).filter(e=>i.has((0,s.normalizeFileUri)(e)));this.edit_queue.sendOpenFiles(c),this.edit_queue.start(a)}}},7326(e,t,i){"use strict";t.getGhulConfig=function(e,t={}){var i,h;let d,p=[],f={};if((0,n.existsSync)(e+"/ghul.json"))try{let t=""+(0,n.readFileSync)(e+"/ghul.json","utf-8").replace(/^\uFEFF/,"");f=JSON.parse(t)}catch(e){let t=`could not load ghul.json: ${l(e)}`;(0,s.log)(t),p.push(t)}f.compiler&&(d="string"==typeof f.compiler?(0,c.parse)(f.compiler).map(e=>e.toString()):f.compiler);let g=!1;(0,n.existsSync)(e+"/.block-compiler")&&(g=!0);let m=null!==(i=f.other_flags)&&void 0!==i?i:[];"string"==typeof m&&(m=(0,c.parse)(m).map(e=>e.toString()));let y=!1;if((0,n.existsSync)(e+"/.ghul-options.json"))try{let t=(""+(0,n.readFileSync)(e+"/.ghul-options.json","utf-8")).replace(/^\uFEFF/,""),{options:i}=JSON.parse(t);i&&m.push(...(0,c.parse)(i).map(e=>e.toString())),y=!0}catch(e){let t=`could not load .ghul-options.json: ${l(e)}`;(0,s.log)(t),p.push(t)}let v=(0,r.globSync)(e+"/*.ghulproj");if(1==v.length){let e=v[0];try{let t=""+(0,n.readFileSync)(e,"utf-8").replace(/^\uFEFF/,"");(0,o.parseString)(t,(t,i)=>{var n,r;if(!t&&i&&i.Project){if(!f.update_compiler_tool&&i.Project.PropertyGroup&&i.Project.PropertyGroup.filter(e=>e.UpdateCompilerTool).map(e=>e.UpdateCompilerTool)[0]&&((0,s.log)("will update any locally installed compiler tool to latest version"),f.update_compiler_tool=!0),!d&&i.Project.PropertyGroup){let t=null===(n=i.Project.PropertyGroup.filter(e=>e.GhulCompiler).map(e=>e.GhulCompiler)[0])||void 0===n?void 0:n[0];""!=(null!=t?t:"")&&(d=(0,c.parse)(t).map(e=>e.toString()),(0,s.log)(`will use compiler '${(0,c.quote)([...d,...m])}' specified in ${e}`))}!(null===(r=f.source)||void 0===r?void 0:r.length)&&i.Project.ItemGroup?(f.source=[],i.Project.ItemGroup.filter(e=>e.GhulSources).map(e=>e.GhulSources).forEach(e=>{e.filter(e=>{var t;return null===(t=e.$)||void 0===t?void 0:t.Include}).map(e=>{var t;return null===(t=e.$)||void 0===t?void 0:t.Include}).forEach(e=>{f.source.push(e)})})):f.source&&(f.source=f.source.map(e=>e+"/**/*.ghul")),!y&&i.Project.ItemGroup&&i.Project.ItemGroup.filter(e=>e.GhulOptions).map(e=>e.GhulOptions).forEach(e=>{e.filter(e=>{var t,i;return(null===(t=e.$)||void 0===t?void 0:t.Include)&&!(null===(i=e.$)||void 0===i?void 0:i.Condition)}).map(e=>e.$.Include).forEach(e=>{m.push(...(0,c.parse)(e).map(e=>e.toString()))})})}else{let i=`could not parse ghūl project file ${e}`+(t?`: ${l(t)}`:"");(0,s.log)(i),p.push(i)}})}catch(t){let i=`could not read ghūl project file ${e}: ${l(t)}`;(0,s.log)(i),p.push(i)}}else v.length>0&&(0,s.log)("ignoring multiple .ghulproj files:"+v.join(","));if(!d){if((0,n.existsSync)(e+"/.config/dotnet-tools.json"))try{let t=(""+(0,n.readFileSync)(e+"/.config/dotnet-tools.json","utf-8")).replace(/^\uFEFF/,""),i=JSON.parse(t),{tools:r}=i,o=r["ghul.compiler"];o&&1==o.commands.length&&(d=["dotnet","tool","run",o.commands[0]],(0,s.log)(`will use compiler '${(0,c.quote)([...d,...m])}' version ${o.version} from local tool manifest`))}catch(e){let t=`could not load .config/dotnet-tools.json: ${l(e)}`;(0,s.log)(t),p.push(t)}if(!d){let t=(0,a.spawnSync)("dotnet",["ghul-compiler"],{encoding:"utf-8",cwd:e});0===t.status&&t.stdout.startsWith("ghūl")&&(d=["dotnet","ghul-compiler"],(0,s.log)(`will use compiler '${(0,c.quote)([...d,...m])}'`))}if(!d){let t=(0,a.spawnSync)("ghul-compiler",{encoding:"utf-8",cwd:e});0===t.status&&t.stdout.startsWith("ghūl")&&(d=["ghul-compiler"],(0,s.log)(`will use compiler '${(0,c.quote)([...d,...m])}'`))}}if(!d){let e="no usable ghūl compiler found: install the ghul.compiler tool or set 'compiler' in ghul.json";(0,s.log)(e),p.push(e)}if(f.update_compiler_tool){let t=(0,a.spawnSync)("dotnet",["tool","update","ghul.compiler","--local"],{encoding:"utf-8",cwd:e});(0,s.log)(t.stdout),0===t.status?(0,s.log)("compiler tool update successful"):((0,s.log)(t.stderr),(0,s.log)("compiler tool update failed"))}let _=[];if((0,n.existsSync)(e+"/.assemblies.json"))try{let t=(""+(0,n.readFileSync)(e+"/.assemblies.json","utf-8")).replace(/^\uFEFF/,""),{assemblies:i}=JSON.parse(t);for(let e of i)(0,n.existsSync)(e)?(m.push("-a"),m.push(e)):_.push(e);_.length&&(0,s.log)(`${_.length} referenced assembly/assemblies not present yet, analysis will be incomplete until they are built: ${_.join(", ")}`)}catch(e){let t=`could not load .assemblies.json: ${l(e)}`;(0,s.log)(t),p.push(t)}m.push("-A");let b=u(t.incremental_analysis,f.incremental_analysis);b&&m.push("--incremental-analysis");let w=[...null!==(h=f.source)&&void 0!==h?h:["./**/*.ghul"]];return{block:g,compiler:d,source:w,arguments:m,want_plaintext_hover:u(t.want_plaintext_hover,f.want_plaintext_hover),incremental_analysis:b,missing_assemblies:_,problems:p}};const n=i(9896),r=i(8862),o=i(8805),s=i(5215),a=i(5317),c=i(5192);function l(e){return e instanceof Error?e.message:String(e)}function u(e,t){var i;return null!==(i=null!=e?e:t)&&void 0!==i&&i}},5127(e,t){"use strict";t.QR=t.Bj=t.UU=t.nY=void 0,t.summariseIncrementalStats=function(e){var i,n,r;const o=new Map;for(const t of null!=e?e:[])o.set(t.name,t.count);const s=null!==(i=o.get(t.nY))&&void 0!==i?i:0,a=null!==(n=o.get(t.UU))&&void 0!==n?n:0,c=null!==(r=o.get(t.Bj))&&void 0!==r?r:0;let l=null,u=0;for(const[e,i]of o)!e.startsWith(t.QR)||i<=u||(l=e.slice(t.QR.length),u=i);return{body_rewalk:s,interface_incremental:a,full_rebuild:c,total:s+a+c,top_decline_reason:l,top_decline_count:u}},t.nY="edit-path-body-rewalk",t.UU="edit-path-interface-incremental",t.Bj="edit-path-full-rebuild",t.QR="edit-declined-"},5215(e,t){"use strict";t.log=function(...e){console.log("ghūl:",...e)}},1376(e,t,i){"use strict";t.MetricsReporter=t.s=void 0;const n=i(5215);t.s="ghul/metrics",t.MetricsReporter=class{constructor(e,t){this.latest=null,this.last_sent_at=0,this.timer=null,this.connection=e,this.workspace_root=t}report(e,t,i=!1,n=null){var r,o;if(this.latest={workspace:this.workspace_root,edit_ms:e,compile_ms:t,incremental_requested:i,incremental:n},this.timer)return;const s=Date.now()-this.last_sent_at;s>=2e3?this.send():(this.timer=setTimeout(()=>{this.timer=null,this.send()},2e3-s),null===(o=(r=this.timer).unref)||void 0===o||o.call(r))}dispose(){this.timer&&(clearTimeout(this.timer),this.timer=null)}send(){var e;if(this.latest&&(null===(e=this.connection)||void 0===e?void 0:e.sendNotification)){this.last_sent_at=Date.now();try{this.connection.sendNotification(t.s,this.latest)}catch(e){(0,n.log)(`could not report analysis metrics: ${e}`)}}}}},4150(e,t,i){"use strict";t.normalizeFileUri=function(e){return new n.URL(e).toString().replace("%3A",":")};const n=i(7016)},4855(e,t,i){"use strict";t.Requester=void 0;const n=i(5215),r=i(4150),o=i(1424);t.Requester=class{get analysed(){return this._analysed}set analysed(e){this._analysed=e,e&&this.releaseAnalysedWaiters()}constructor(e,t,i,r=()=>{}){this.analysed_waiters=[],this.response_handler=t,this.watchdog=i,this.ensure_running=r,this.analysed=!1,e.onStarting(()=>{this.analysed=!1}),e.onRunning(e=>{(0,n.log)(`ghūl language extension v${o}: initialized`),this.stream=e.stdin})}whenAnalysed(e,t=null,i){return this.ensure_running(),this.analysed?(this.watchdog.startWatchdogIfNotRunning(),e()):new Promise(r=>{const o=()=>{this.analysed_waiters=this.analysed_waiters.filter(e=>e!==a),clearTimeout(s)},s=setTimeout(()=>{o(),(0,n.log)("query timed out waiting for the analyser to become ready"),r(t)},6e4);null==i||i.onCancellationRequested(()=>{o(),r(t)});const a=()=>{clearTimeout(s),this.watchdog.startWatchdogIfNotRunning(),r(e())};this.analysed_waiters.push(a)})}untilFirstAnalysed(){return this.analysed?Promise.resolve():new Promise(e=>this.analysed_waiters.push(e))}releaseAnalysedWaiters(){const e=this.analysed_waiters;this.analysed_waiters=[];for(const t of e)t()}write(e){try{this.stream.write(e)}catch(e){(0,n.log)("caught exception trying to send request data: compiler may have died:"+e),this.response_handler.rejectAllAndThrow(e)}}send(e){this.write(JSON.stringify(e)+"\n")}sendDocuments(e){this.ensure_running(),this.watchdog.startWatchdogIfNotRunning(),this.send({command:"edit",files:e.map(({uri:e,source:t})=>({path:(0,r.normalizeFileUri)(e),source:t}))})}sendEditDeltas(e){this.ensure_running(),this.watchdog.startWatchdogIfNotRunning(),this.send({command:"edit_delta",files:e})}sendOpenFiles(e){this.stream&&this.send({command:"set_open_files",paths:e.map(e=>(0,r.normalizeFileUri)(e))})}sendCodeActions(e,t,i){return this.response_handler.code_actions_supported?this.whenAnalysed(()=>(this.send({command:"code_actions",path:(0,r.normalizeFileUri)(e),start_line:t.start.line+1,start_column:t.start.character+1,end_line:t.end.line+1,end_column:t.end.character+1}),this.response_handler.expectCodeActions()),[],i):Promise.resolve([])}sendHover(e,t,i,n){return this.whenAnalysed(()=>(this.send({command:"hover",path:(0,r.normalizeFileUri)(e),line:t+1,column:i+1}),this.response_handler.expectHover()),null,n)}sendDefinition(e,t,i,n){return this.whenAnalysed(()=>(this.send({command:"definition",path:(0,r.normalizeFileUri)(e),line:t+1,column:i+1}),this.response_handler.expectDefinition()),null,n)}sendDeclaration(e,t,i,n){return this.whenAnalysed(()=>(this.send({command:"declaration",path:(0,r.normalizeFileUri)(e),line:t+1,column:i+1}),this.response_handler.expectDeclaration()),null,n)}sendCompletion(e,t,i,n=!1,o){return this.whenAnalysed(()=>(this.send({command:"complete",path:(0,r.normalizeFileUri)(e),line:t+1,column:i+1,is_member_trigger:n}),this.response_handler.expectCompletion()),null,o)}sendSignature(e,t,i,n){return this.whenAnalysed(()=>(this.send({command:"signature",path:(0,r.normalizeFileUri)(e),line:t+1,column:i+1}),this.response_handler.expectSignature()),null,n)}sendDocumentSymbol(e,t){return this.whenAnalysed(()=>(this.send({command:"symbols",path:(0,r.normalizeFileUri)(e)}),this.response_handler.expectSymbols()),null,t)}sendWorkspaceSymbol(e){return this.whenAnalysed(()=>(this.send({command:"symbols",path:""}),this.response_handler.expectSymbols()),null,e)}sendReferences(e,t,i,n){return this.whenAnalysed(()=>(this.send({command:"references",path:(0,r.normalizeFileUri)(e),line:t+1,column:i+1}),this.response_handler.expectReferences()),null,n)}sendImplementation(e,t,i,n){return this.whenAnalysed(()=>(this.send({command:"implementation",path:(0,r.normalizeFileUri)(e),line:t+1,column:i+1}),this.response_handler.expectImplementation()),null,n)}sendTypeDefinition(e,t,i,n){return this.whenAnalysed(()=>(this.send({command:"type_definition",path:(0,r.normalizeFileUri)(e),line:t+1,column:i+1}),this.response_handler.expectTypeDefinition()),null,n)}sendRenameRequest(e,t,i,n){return this.whenAnalysed(()=>(this.send({command:"rename",path:(0,r.normalizeFileUri)(e),line:t+1,column:i+1,new_name:n}),this.response_handler.expectRenameRequest()))}sendSemanticTokens(e,t){return this.whenAnalysed(()=>(this.send({command:"semantic_tokens",path:(0,r.normalizeFileUri)(e)}),this.response_handler.expectSemanticTokens()),null,t)}sendInlayHints(e,t){return this.whenAnalysed(()=>(this.send({command:"inlay_hints",path:(0,r.normalizeFileUri)(e)}),this.response_handler.expectInlayHints()),[],t)}sendDocumentFormatting(e,t,i){return this.whenAnalysed(()=>(this.send({command:"format",path:(0,r.normalizeFileUri)(e),source:t}),this.response_handler.expectDocumentFormatting(i)))}sendDocumentRangeFormatting(e,t,i){return this.whenAnalysed(()=>(this.send({command:"format_range",path:(0,r.normalizeFileUri)(e),start_line:i.start.line+1,start_column:i.start.character+1,end_line:i.end.line+1,end_column:i.end.character+1,source:t}),this.response_handler.expectDocumentRangeFormatting()))}sendFullCompileRequest(){this.watchdog.startWatchdogIfNotRunning(),this.send({command:"compile"})}sendHeapCheckRequest(){this.watchdog.startWatchdogIfNotRunning(),this.send({command:"heap_check"})}sendStatsRequest(){this.send({command:"stats"})}sendRestart(){this.analysed&&(this.watchdog.startWatchdogIfNotRunning(),this.send({command:"restart"}))}}},1323(e,t,i){"use strict";t.ResponseHandler=t.SEMANTIC_TOKENS_LEGEND=t.EI=t.f1=void 0;const n=i(2861),r=i(5215),o=i(4150),s=i(2029);class a{constructor(e){this._name=e,this._queue=[]}enqueue(){return new Promise((e,t)=>{this._queue.push({resolve:e,reject:t})})}dequeue(){return this._queue.shift()}dequeueAlways(){var e;return null!==(e=this._queue.shift())&&void 0!==e?e:{resolve:e=>console.log(this._name+": oops: unexpected resolve: "+JSON.stringify(e)),reject:e=>console.log(this._name+": oops: unexpected reject: "+e)}}isEmpty(){return 0==this._queue.length}resolve(e){this.dequeueAlways().resolve(e)}reject(e){console.log(this._name+": will reject: "+e),this.dequeueAlways().reject(e)}resolveAll(e){for(let t=this.dequeue();t;t=this.dequeue())t.resolve(e)}rejectAll(e){console.log(this._name+": will reject ALL: "+e);for(let t=this.dequeue();t;t=this.dequeue())t.reject(e)}}t.f1=["namespace","class","interface","struct","enum","enumMember","typeParameter","method","function","property","variable","parameter","operator","modifier"],t.EI=["static","readonly","modification"],t.SEMANTIC_TOKENS_LEGEND={tokenTypes:t.f1,tokenModifiers:t.EI};const c=new Map(t.f1.map((e,t)=>[e,t])),l=new Map(t.EI.map((e,t)=>[e,1<<t]));t.ResponseHandler=class{constructor(e,t){this.incremental_analysis_requested=!1,this.stats_supported=!1,this.edit_deltas_supported=!1,this.compile_abort_supported=!1,this.client_supports_refresh=!1,this.code_actions_supported=!1,this._formatting_ranges=[],this.connection=e,t.onConfigAvailable((e,t)=>{this.onConfigAvailable(e,t)}),this._hover_promise_queue=new a("HOVER"),this._definition_promise_queue=new a("DEFINITION"),this._declaration_promise_queue=new a("DECLARATION"),this._completion_promise_queue=new a("COMPLETION"),this._signature_promise_queue=new a("SIGNATURE"),this._symbols_promise_queue=new a("SYMBOLS"),this._references_promise_queue=new a("REFERENCES"),this._implementation_promise_queue=new a("IMPLEMENTATION"),this._type_definition_promise_queue=new a("TYPEDEFINITION"),this._rename_promise_queue=new a("RENAMEREQUEST"),this._formatting_promise_queue=new a("FORMAT"),this._range_formatting_promise_queue=new a("FORMATRANGE"),this._semantic_tokens_promise_queue=new a("SEMANTICTOKENS"),this._inlay_hints_promise_queue=new a("INLAYHINTS"),this._code_actions_promise_queue=new a("CODEACTIONS")}onConfigAvailable(e,t){this.want_plaintext_hover=t.want_plaintext_hover,this.incremental_analysis_requested=t.incremental_analysis}resolveAllPendingPromises(){this._hover_promise_queue.resolveAll(null),this._definition_promise_queue.resolveAll([]),this._declaration_promise_queue.resolveAll([]),this._completion_promise_queue.resolveAll([]),this._signature_promise_queue.resolveAll(null),this._symbols_promise_queue.resolveAll([]),this._references_promise_queue.resolveAll([]),this._implementation_promise_queue.resolveAll([]),this._type_definition_promise_queue.resolveAll(null),this._rename_promise_queue.resolveAll(null),this._formatting_promise_queue.resolveAll([]),this._range_formatting_promise_queue.resolveAll([]),this._semantic_tokens_promise_queue.resolveAll({data:[]}),this._inlay_hints_promise_queue.resolveAll([]),this._code_actions_promise_queue.resolveAll([]),this._formatting_ranges=[]}rejectAllPendingPromises(e){this._hover_promise_queue.rejectAll(e),this._definition_promise_queue.rejectAll(e),this._declaration_promise_queue.rejectAll(e),this._completion_promise_queue.rejectAll(e),this._signature_promise_queue.rejectAll(e),this._symbols_promise_queue.rejectAll(e),this._references_promise_queue.rejectAll(e),this._implementation_promise_queue.rejectAll(e),this._type_definition_promise_queue.rejectAll(e),this._rename_promise_queue.rejectAll(e),this._formatting_promise_queue.rejectAll(e),this._range_formatting_promise_queue.rejectAll(e),this._semantic_tokens_promise_queue.rejectAll(e),this._inlay_hints_promise_queue.rejectAll(e),this._code_actions_promise_queue.rejectAll(e),this._formatting_ranges=[]}rejectAllAndThrow(e){throw(0,r.log)(e),this.rejectAllPendingPromises(e),e}setServerManager(e){null==this.server_manager?this.server_manager=e:this.rejectAllAndThrow("replacing existing server manager in ResponseHandler")}setEditQueue(e){null==this.edit_queue?this.edit_queue=e:this.rejectAllAndThrow("replacing existing edit queue in ResponseHandler")}handleListen(e){var t;let i=null!==(t=null==e?void 0:e.capabilities)&&void 0!==t?t:[];this.incremental_analysis_requested&&!i.includes("incremental-analysis")&&(0,r.log)("ghul.json sets incremental_analysis but the spawned compiler does not advertise it — running with the feature disabled. Upgrade ghul.compiler to use it."),this.code_actions_supported=i.includes("code-actions"),this.stats_supported=i.includes("incremental-analysis"),this.edit_deltas_supported=i.includes("edit-deltas"),this.compile_abort_supported=i.includes("compile-abort"),this.server_manager.startListening()}handleDiagnostics(e){for(let[t,i]of this.parseDiagnostics(e))this.connection.sendDiagnostics({uri:t,diagnostics:i});let t;this.edit_queue.onDiagnosticsReceived(),null!=e.elapsed_ms&&(t=e.elapsed_ms),"partial"==e.phase?(this.edit_queue.onPartialCompileDone(t),this.refreshDerivedViews()):"full"==e.phase&&(this.edit_queue.onFullCompileDone(t),this.refreshDerivedViews())}refreshDerivedViews(){this.client_supports_refresh&&!this.edit_queue.hasPendingEdits()&&(this.connection.languages.semanticTokens.refresh().catch(e=>(0,r.log)("semantic token refresh failed: "+e)),this.connection.languages.inlayHint.refresh().catch(e=>(0,r.log)("inlay hint refresh failed: "+e)))}handleHeapCheckDone(){this.edit_queue.onHeapCheckDone()}handleStats(e){var t;this.edit_queue.onStatsReceived(null!==(t=e.entries)&&void 0!==t?t:[])}handleError(e){(0,r.log)(`analyser error: ${e.error_kind}: ${e.message}`)}expectCodeActions(){return this._code_actions_promise_queue.enqueue()}handleCodeActions(e){var t;let{resolve:i}=this._code_actions_promise_queue.dequeueAlways();i(null!==(t=e.diagnostics)&&void 0!==t?t:[])}expectHover(){return this._hover_promise_queue.enqueue()}handleHover(e){var t;let{resolve:i}=this._hover_promise_queue.dequeueAlways();try{let n=e.signature;if(null!=n&&0!=n.length||(n=null!==(t=e.description)&&void 0!==t?t:null),null==n||0==n.length)return void i(null);if(this.want_plaintext_hover)return void i({contents:{kind:"plaintext",value:e.kind_label?`${n} // ${e.kind_label}`:n}});const r=["```ghul",n,"```"];e.kind_label&&(r.push(""),r.push(`_${e.kind_label}_`)),i({contents:{kind:"markdown",value:r.join("\n")}})}catch(e){(0,r.log)("hover caught:",e),i(null)}}expectDefinition(){return this._definition_promise_queue.enqueue()}handleDefinition(e){let{resolve:t}=this._definition_promise_queue.dequeueAlways();try{let i=this.parseLocations(e);1==i.length?t(i[0]):t(null)}catch(e){(0,r.log)("definition caught:",e),t([])}}expectDeclaration(){return this._declaration_promise_queue.enqueue()}handleDeclaration(e){let{resolve:t}=this._declaration_promise_queue.dequeueAlways();try{t(this.parseLocations(e))}catch(e){(0,r.log)("declaration caught:",e),t([])}}expectCompletion(){return this._completion_promise_queue.enqueue()}handleCompletion(e){var t;let{resolve:i}=this._completion_promise_queue.dequeueAlways();try{let r=[];for(let i of null!==(t=e.items)&&void 0!==t?t:[]){let e={label:i.name,kind:i.kind,detail:i.description};i.kind_label&&(e.documentation={kind:n.MarkupKind.Markdown,value:`_${i.kind_label}_`}),i.insert_text&&(e.insertText=i.insert_text,e.insertTextFormat=n.InsertTextFormat.Snippet),r.push(e)}i(r)}catch(e){(0,r.log)("completion caught:",e),i([])}}expectSignature(){return this._signature_promise_queue.enqueue()}handleSignature(e){var t,i;let{resolve:n}=this._signature_promise_queue.dequeueAlways();try{let r=e.best_signature_index,o=e.current_parameter_index;r<0&&(r=void 0);let s=[];for(let n of null!==(t=e.signatures)&&void 0!==t?t:[]){let e=[];for(let t of null!==(i=n.parameters)&&void 0!==i?i:[])e.push({label:t});s.push({label:n.label,parameters:e})}n({signatures:s,activeSignature:r,activeParameter:o})}catch(e){(0,r.log)("signature caught:",e),n({signatures:[]})}}expectSymbols(){return this._symbols_promise_queue.enqueue()}handleSymbols(e){var t,i;let{resolve:n}=this._symbols_promise_queue.dequeueAlways();try{let o=[];for(let n of null!==(t=e.files)&&void 0!==t?t:[]){let e=n.path;for(let t of null!==(i=n.symbols)&&void 0!==i?i:[]){let i={name:t.search_description,kind:t.kind,location:{uri:e,range:{start:{line:Math.max(0,t.start_line-1),character:Math.max(0,t.start_column-1)},end:{line:Math.max(0,t.end_line-1),character:Math.max(0,t.end_column-1)}}},containerName:t.qualifier};"internal"!=i.location.uri&&"reflected"!=i.location.uri?o.push(i):(0,r.log)("oops: unexpected internal/reflected uri in symbols response: "+i.location.uri)}}n(o)}catch(e){(0,r.log)("symbols caught:"+e),n([])}}expectReferences(){return this._references_promise_queue.enqueue()}handleReferences(e){let{resolve:t}=this._references_promise_queue.dequeueAlways();try{t(this.parseLocations(e))}catch(e){(0,r.log)("references caught:",e),t([])}}expectImplementation(){return this._implementation_promise_queue.enqueue()}handleImplementation(e){let{resolve:t}=this._implementation_promise_queue.dequeueAlways();try{t(this.parseLocations(e))}catch(e){(0,r.log)("implementation caught:",e),t([])}}expectTypeDefinition(){return this._type_definition_promise_queue.enqueue()}handleTypeDefinition(e){let{resolve:t}=this._type_definition_promise_queue.dequeueAlways();try{let i=this.parseLocations(e);1==i.length?t(i[0]):t(null)}catch(e){(0,r.log)("type definition caught:",e),t(null)}}expectRenameRequest(){return this._rename_promise_queue.enqueue()}handleRenameRequest(e){var t;let{resolve:i}=this._rename_promise_queue.dequeueAlways();try{let n={};for(let i of null!==(t=e.edits)&&void 0!==t?t:[]){let e=i.file,t=n[e];t||(t=[],n[e]=t);let r={range:{start:{line:i.start_line-1,character:i.start_column-1},end:{line:i.end_line-1,character:i.end_column}},newText:i.new_name};t.push(r)}i({changes:n})}catch(e){(0,r.log)("rename request: caught:"+e),i({})}}expectDocumentFormatting(e){return this._formatting_ranges.push(e),this._formatting_promise_queue.enqueue()}handleDocumentFormatting(e){let{resolve:t}=this._formatting_promise_queue.dequeueAlways(),i=this._formatting_ranges.shift();try{t([{range:i,newText:e.text}])}catch(e){(0,r.log)("document formatting: caught:"+e),t([])}}expectDocumentRangeFormatting(){return this._range_formatting_promise_queue.enqueue()}handleDocumentRangeFormatting(e){let{resolve:t}=this._range_formatting_promise_queue.dequeueAlways();try{let i=e.start_line;if(!i)return void t([]);t([{range:{start:{line:i-1,character:e.start_column-1},end:{line:e.end_line-1,character:e.end_column-1}},newText:e.text}])}catch(e){(0,r.log)("document range formatting: caught:"+e),t([])}}expectSemanticTokens(){return this._semantic_tokens_promise_queue.enqueue()}handleSemanticTokens(e){let{resolve:t}=this._semantic_tokens_promise_queue.dequeueAlways();try{t(function(e){var t;const i=[];for(const n of null!=e?e:[]){if(!n)continue;const e=n.start_line,r=n.start_column,o=n.end_line,s=n.end_column,a=n.token_type,u=null!==(t=n.modifiers)&&void 0!==t?t:"";if(!(Number.isFinite(e)&&Number.isFinite(r)&&Number.isFinite(o)&&Number.isFinite(s)))continue;if(e!==o)continue;const h=c.get(a);if(void 0===h)continue;let d=0;if(u.length>0)for(const e of u.split(",")){const t=l.get(e);void 0!==t&&(d|=t)}const p=s-r+1;p<=0||i.push({line:e-1,startChar:r-1,length:p,typeIndex:h,modifierBits:d})}i.sort((e,t)=>e.line-t.line||e.startChar-t.startChar);const n=[];let r=0,o=0;for(const e of i){const t=e.line-r,i=0===t?e.startChar-o:e.startChar;n.push(t,i,e.length,e.typeIndex,e.modifierBits),r=e.line,o=e.startChar}return{data:n}}(e.tokens))}catch(e){(0,r.log)("semantic tokens caught:"+e),t({data:[]})}}expectInlayHints(){return this._inlay_hints_promise_queue.enqueue()}handleInlayHints(e){let{resolve:t}=this._inlay_hints_promise_queue.dequeueAlways();try{t(function(e,t=!1){var i;const r=[];for(const o of null!=e?e:[]){if(!o)continue;const e=o.line,s=o.column;if(!Number.isFinite(e)||!Number.isFinite(s))continue;const a={position:n.Position.create(e-1,s-1),label:null!==(i=o.label)&&void 0!==i?i:"",kind:n.InlayHintKind.Type};if(o.detail&&o.detail.length>0)if(t)a.tooltip={kind:n.MarkupKind.PlainText,value:o.detail};else{const e=o.detail.indexOf("\n\n"),t=e>=0?o.detail.slice(0,e):o.detail,i=e>=0?o.detail.slice(e+2):"",r=["```ghul",t,"```"].join("\n");a.tooltip={kind:n.MarkupKind.Markdown,value:i?r+"\n\n"+i:r}}r.push(a)}return r}(e.hints,this.want_plaintext_hover))}catch(e){(0,r.log)("inlay hints caught:"+e),t([])}}handleRestart(){(0,r.log)("compiler requested restart"),this.server_manager.noteRecycle(),this.edit_queue.reset()}handleExit(e){(0,r.log)("compiler is exiting: "+e),this.server_manager.noteIdleExit(),this.edit_queue.reset()}handleUnexpected(){this.server_manager.abort()}parseDiagnostics(e){var t,i;let n=new Map,r=e=>{if("internal"==e||"reflected"==e)return null;let t=e;return t.startsWith("file://")||(t="file://"+t),(0,o.normalizeFileUri)(t)};for(let i of null!==(t=e.checked_paths)&&void 0!==t?t:[]){let e=r(i);null==e||n.has(e)||n.set(e,[])}for(let t of null!==(i=e.diagnostics)&&void 0!==i?i:[]){let e=r(t.path);if(null==e)continue;n.has(e)||n.set(e,[]);let i={severity:s.SeverityMapper.getSeverity(t.severity,"new"),range:{start:{line:t.start_line-1,character:t.start_column-1},end:{line:t.end_line-1,character:t.end_column-1}},message:t.message,source:"ghūl"};if(t.code&&(i.code=t.code),t.related&&t.related.length>0){let e=[];for(let i of t.related){let t=r(i.location.file);null!=t&&e.push({location:{uri:t,range:{start:{line:i.location.start_line-1,character:i.location.start_column-1},end:{line:i.location.end_line-1,character:i.location.end_column-1}}},message:i.message})}e.length>0&&(i.relatedInformation=e)}n.get(e).push(i)}return n}parseLocations(e){var t;let i=[];for(let n of null!==(t=e.locations)&&void 0!==t?t:[])i.push({uri:n.file,range:{start:{line:n.start_line-1,character:n.start_column-1},end:{line:n.end_line-1,character:n.end_column}}});return i}}},2644(e,t,i){"use strict";t.ResponseParser=void 0;const n=i(5215);t.ResponseParser=class{constructor(e,t){this.buffer="",this.response_handler=e,this.watchdog=t}reset(){this.buffer=""}handleChunk(e){e=e.replace(/\r/g,""),this.buffer+=e;let t=this.buffer.split("\n");this.buffer=t.pop();for(let e of t)e.length>0&&this.handleLine(e)}handleLine(e){let t;try{t=JSON.parse(e)}catch(e){return(0,n.log)("response parser: protocol error: could not parse JSON message: "+e),void this.response_handler.rejectAllPendingPromises("response parser: protocol error: could not parse JSON message: "+e)}switch(this.watchdog.clearWatchdog(),t.kind){case"listen":this.response_handler.handleListen(t);break;case"diagnostics":this.response_handler.handleDiagnostics(t);break;case"code_actions":this.response_handler.handleCodeActions(t);break;case"hover":this.response_handler.handleHover(t);break;case"definition":this.response_handler.handleDefinition(t);break;case"declaration":this.response_handler.handleDeclaration(t);break;case"completion":this.response_handler.handleCompletion(t);break;case"signature":this.response_handler.handleSignature(t);break;case"symbols":this.response_handler.handleSymbols(t);break;case"references":this.response_handler.handleReferences(t);break;case"implementation":this.response_handler.handleImplementation(t);break;case"type_definition":this.response_handler.handleTypeDefinition(t);break;case"rename":this.response_handler.handleRenameRequest(t);break;case"restart":this.response_handler.handleRestart();break;case"exit":this.response_handler.handleExit(t.reason);break;case"heap_check":this.response_handler.handleHeapCheckDone();break;case"format":this.response_handler.handleDocumentFormatting(t);break;case"format_range":this.response_handler.handleDocumentRangeFormatting(t);break;case"semantic_tokens":this.response_handler.handleSemanticTokens(t);break;case"inlay_hints":this.response_handler.handleInlayHints(t);break;case"stats":this.response_handler.handleStats(t);break;case"error":this.response_handler.handleError(t);break;default:this.response_handler.handleUnexpected()}}}},576(e,t,i){"use strict";t.restoreDotNetTools=function(e){return(0,o.existsSync)(e+"/.config/dotnet-tools.json")?((0,r.log)("restoring .NET tools..."),new Promise(t=>{(0,n.execFile)("dotnet",["tool","restore"],{cwd:e},(e,i)=>{if(e){let i=`could not restore .NET tools: ${e.message}`;return(0,r.log)(i),void t(i)}(0,r.log)(i),(0,r.log)("finished restoring .NET tools"),t(null)})})):((0,r.log)("no .config/dotnet-tools.json found: won't attempt to restore .NET tools"),Promise.resolve(null))};const n=i(5317),r=i(5215),o=i(9896)},5252(e,t,i){"use strict";t.ServerEventEmitter=void 0;const n=i(4434);class r extends n.EventEmitter{constructor(){super()}starting(){this.emit("starting")}running(e){this.emit("running",e)}listening(){this.emit("listening")}analysed(){this.emit("analysed")}abort(){this.emit("aborted")}killing(){this.emit("killing")}killed(){this.emit("killed")}onStarting(e){this.on("starting",e)}onRunning(e){this.on("running",e)}onListening(e){this.on("listening",e)}onAnalysed(e){this.on("analysed",e)}onAbort(e){this.on("abort",e)}onKilling(e){this.on("killing",e)}onKilled(e){this.on("killed",e)}}t.ServerEventEmitter=r},7684(e,t,i){"use strict";var n,r=this&&this.__createBinding||(Object.create?function(e,t,i,n){void 0===n&&(n=i);var r=Object.getOwnPropertyDescriptor(t,i);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[i]}}),Object.defineProperty(e,n,r)}:function(e,t,i,n){void 0===n&&(n=i),e[n]=t[i]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||(n=function(e){return n=Object.getOwnPropertyNames||function(e){var t=[];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[t.length]=i);return t},n(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i=n(e),s=0;s<i.length;s++)"default"!==i[s]&&r(t,e,i[s]);return o(t,e),t});Object.defineProperty(t,"__esModule",{value:!0}),t.ServerManager=t.MAX_RESTART_ATTEMPTS=t.ServerState=void 0;const a=s(i(6928)),c=i(9896),l=i(5192),u=i(5317),h=i(5215);var d;!function(e){e[e.Cold=0]="Cold",e[e.StartingUp=1]="StartingUp",e[e.Listening=2]="Listening",e[e.Aborted=3]="Aborted",e[e.Blocked=4]="Blocked",e[e.Failed=5]="Failed",e[e.Dormant=6]="Dormant"}(d||(t.ServerState=d={})),t.MAX_RESTART_ATTEMPTS=5;const p=new Map;t.ServerManager=class{constructor(e,t,i,n,r,o,s,a){this.event_emitter=t,this.edit_queue=i,this.response_handler=n,this.response_parser=r,this.watchdog=o,this.workspace_root=s,this.connection=a,this.restart_attempts=0,e.onConfigAvailable((e,t)=>{if(this.isServingConfig(t))return(0,h.log)("configuration is unchanged: keeping the running compiler"),void(this.ghul_config=t);this.ghul_config=t,this.start()})}isServingConfig(e){return!(this.server_state!=d.Listening&&this.server_state!=d.StartingUp||!this.child||null!=this.child.exitCode)&&JSON.stringify(this.ghul_config)==JSON.stringify(e)}start(){this.clearRestartTimer(),this.restart_attempts=0,this.launch()}reapAbandonedCompiler(){var e;const t=p.get(this.workspace_root);if(t&&t!==this.child&&null==t.exitCode){(0,h.log)(`killing abandoned compiler PID ${t.pid} left by an earlier connection`);try{null===(e=t.stdout)||void 0===e||e.removeAllListeners("data"),t.removeAllListeners("exit"),t.removeAllListeners("error"),t.on("error",e=>(0,h.log)(`abandoned compiler PID ${t.pid} errored while being killed: ${e}`)),t.kill()}catch(e){(0,h.log)("killing abandoned compiler caught: "+e)}p.delete(this.workspace_root)}}launch(){var e,t,i;this.event_emitter.starting(),this.server_state=d.StartingUp;let n=this.ghul_config.compiler;if(this.child&&((0,h.log)("killing running compiler PID "+this.child.pid),this.expecting_exit=!0,this.expecting_recycle=!1,this.expecting_idle_exit=!1,null===(e=this.child.stdout)||void 0===e||e.removeAllListeners("data"),this.child.kill()),this.reapAbandonedCompiler(),this.ghul_config.block)return(0,h.log)("compiler block requested: won't spawn compiler"),void(this.server_state=d.Blocked);if(!n||0==n.length)return void this.fail("ghūl language extension: no ghūl compiler could be found. "+((null===(t=this.ghul_config.problems)||void 0===t?void 0:t.length)?this.ghul_config.problems.join("; "):"Install the ghul.compiler tool or set 'compiler' in ghul.json."));const r=a.join(this.workspace_root,".analysis.rsp");(0,c.writeFileSync)(r,(0,l.quote)(this.ghul_config.arguments)),(0,h.log)(`compiler is "${(0,l.quote)(n)}"`),this.child=(0,u.spawn)(n[0],[...n.slice(1),"@.analysis.rsp"],{cwd:this.workspace_root});let o=!1;const s=e=>{o||(o=!0,this.child=null,this.response_handler.resolveAllPendingPromises(),this.edit_queue.reset(),(0,h.log)(e),this.scheduleRestart())};this.child.on("error",e=>{this.expecting_exit?(0,h.log)(`compiler: error after expected exit: ${e.message}`):s(`compiler: failed to start: ${e.message}`)}),p.set(this.workspace_root,this.child),(0,h.log)(`spawned compiler process PID ${this.child.pid}`),this.child.stderr.on("data",e=>{process.stderr.write(e)}),this.response_parser.reset(),this.watchdog.enterColdStart(),this.child.stdout.on("data",e=>{this.response_parser.handleChunk(e.toString())}),this.event_emitter.running(this.child);const f=null===(i=this.child)||void 0===i?void 0:i.pid,g=this.child;this.child.on("exit",(e,t)=>{p.get(this.workspace_root)===g&&p.delete(this.workspace_root);const i=this.child===g;return this.expecting_exit?((0,h.log)(`compiler PID ${f}: exited`),i&&(this.child=null),this.response_handler.resolveAllPendingPromises(),void(this.expecting_exit=!1)):this.expecting_recycle?(this.expecting_recycle=!1,(0,h.log)(`compiler PID ${f}: recycled — relaunching`),i&&(this.child=null),this.response_handler.resolveAllPendingPromises(),this.edit_queue.reset(),void this.launch()):this.expecting_idle_exit?(this.expecting_idle_exit=!1,(0,h.log)(`compiler PID ${f}: exited while idle — will restart when next needed`),i&&(this.child=null),this.server_state=d.Dormant,this.response_handler.resolveAllPendingPromises(),void this.edit_queue.reset()):void s(`compiler PID ${f}: unexpected exit`)})}scheduleRestart(){if(this.clearRestartTimer(),this.restart_attempts++,this.restart_attempts>t.MAX_RESTART_ATTEMPTS)return void this.fail("ghūl language extension: the ghūl compiler failed to start repeatedly and will not be retried automatically. Check the ghūl project file and compiler configuration — saving a project file will retry.");const e=1==this.restart_attempts?0:Math.min(2e3*Math.pow(2,this.restart_attempts-2),16e3);(0,h.log)(`compiler: will restart (attempt ${this.restart_attempts} of ${t.MAX_RESTART_ATTEMPTS}) in ${e}ms`),this.restart_timer=setTimeout(()=>{this.restart_timer=null,this.launch()},e)}clearRestartTimer(){this.restart_timer&&(clearTimeout(this.restart_timer),this.restart_timer=null)}fail(e){var t,i;this.clearRestartTimer(),this.server_state=d.Failed,(0,h.log)(e),null===(i=null===(t=this.connection)||void 0===t?void 0:t.window)||void 0===i||i.showErrorMessage(e)}state(){return this.server_state}startListening(){this.server_state!=d.Blocked&&(this.restart_attempts=0,this.server_state=d.Listening,this.event_emitter.listening())}abort(){this.server_state!=d.Blocked&&(this.server_state=d.Aborted,this.event_emitter.abort())}kill(){this.event_emitter.killing(),(0,h.log)("killing any running compiler..."),this.clearRestartTimer();try{this.expecting_exit=!0,this.child.kill(),this.event_emitter.killed(),(0,h.log)("finished killing compiler")}catch(e){(0,h.log)("killing compiler caught: "+e),this.abort()}}noteRecycle(){this.expecting_recycle=!0}noteIdleExit(){this.expecting_idle_exit=!0}ensureRunning(){this.server_state==d.Dormant&&((0,h.log)("compiler is needed again after an idle exit — relaunching"),this.launch())}recoverFromHang(){this.response_handler.rejectAllPendingPromises("ghūl language extension: compiler watchdog timeout"),this.child?((0,h.log)(`compiler PID ${this.child.pid}: unresponsive — killing`),this.child.kill()):((0,h.log)("compiler watchdog timeout with no running compiler — scheduling restart"),this.scheduleRestart())}killQuiet(){}}},2029(e,t,i){"use strict";t.SeverityMapper=void 0;const n=i(2861);let r=new Map([["info",n.DiagnosticSeverity.Information],["warn",n.DiagnosticSeverity.Warning],["error",n.DiagnosticSeverity.Error]]),o=new Map([["info",n.DiagnosticSeverity.Information],["warn",n.DiagnosticSeverity.Warning],["error",n.DiagnosticSeverity.Error]]);t.SeverityMapper=class{static getSeverity(e,t){return"parse"==t?r.get(e):"number"==typeof e?e:isNaN(Number(e))?o.get(e):Number(e)}}},5110(e,t,i){"use strict";t.Watchdog=t.H=void 0;const n=i(5215);t.H=6e4,t.Watchdog=class{constructor(e,t,i=()=>{}){this.timeout_milliseconds=e,this.on_timeout=t,this.on_busy_changed=i}setTimeout(e){this.timeout_milliseconds=e>1e3?e:1e3}startWatchdogIfNotRunning(){this.watchdog_timer||this.startWatchdog()}startWatchdog(){this.watchdog_timer=setTimeout(()=>{this.onWatchdogTimeout()},this.timeout_milliseconds),this.on_busy_changed(!0)}resetWatchdog(){this.clearWatchdog(),this.startWatchdog()}clearWatchdog(){this.watchdog_timer&&(clearTimeout(this.watchdog_timer),this.watchdog_timer=null),this.on_busy_changed(!1)}enterColdStart(){this.clearWatchdog(),this.timeout_milliseconds=t.H}isRunning(){return null!=this.watchdog_timer}onWatchdogTimeout(){this.watchdog_timer=null,this.on_busy_changed(!1),(0,n.log)("ghūl language extension: compiler watchdog timeout"),this.on_timeout()}}},2510(e,t,i){"use strict";var n,r=this&&this.__createBinding||(Object.create?function(e,t,i,n){void 0===n&&(n=i);var r=Object.getOwnPropertyDescriptor(t,i);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[i]}}),Object.defineProperty(e,n,r)}:function(e,t,i,n){void 0===n&&(n=i),e[n]=t[i]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||(n=function(e){return n=Object.getOwnPropertyNames||function(e){var t=[];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[t.length]=i);return t},n(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i=n(e),s=0;s<i.length;s++)"default"!==i[s]&&r(t,e,i[s]);return o(t,e),t}),a=this&&this.__awaiter||function(e,t,i,n){return new(i||(i=Promise))(function(r,o){function s(e){try{c(n.next(e))}catch(e){o(e)}}function a(e){try{c(n.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?r(e.value):(t=e.value,t instanceof i?t:new i(function(e){e(t)})).then(s,a)}c((n=n.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.WorkspaceContext=void 0;const c=s(i(6928)),l=i(7016),u=i(9896),h=i(2861),d=i(5215),p=i(6781),f=i(5252),g=i(1323),m=i(4855),y=i(8887),v=i(2644),_=i(7684),b=i(6024),w=i(7221),D=i(5110),T=i(990),S=i(1376),C=i(7326),R=i(576),E=i(6634),P=i(5657);function x(e){return"boolean"==typeof e?e:null}t.WorkspaceContext=class{constructor(e,t,i){this.client_supports_configuration=!1,this.missing_assembly_watch=null,this.initialize_running=null,this.initialize_queued=null,this.compiler_generation=0,this.reporting_compiler_startup=!1,this.workspace_root=e,this.connection=t,this.documents=i,this.server_event_emitter=new f.ServerEventEmitter,this.config_event_emitter=new p.ConfigEventEmitter,this.progress=new T.ActivityProgress(t),this.metrics=new S.MetricsReporter(t,e),this.response_handler=new g.ResponseHandler(t,this.config_event_emitter),this.watchdog=new D.Watchdog(1e4,()=>this.server_manager.recoverFromHang(),e=>this.reportOutstandingRequest(e)),this.requester=new m.Requester(this.server_event_emitter,this.response_handler,this.watchdog,()=>{var e;return null===(e=this.server_manager)||void 0===e?void 0:e.ensureRunning()}),this.edit_queue=new y.EditQueue(this.requester,this.response_handler,this.watchdog,this.progress,this.metrics),this.ghul_analyser=new w.GhulAnalyser(this.edit_queue,this.config_event_emitter,this.server_event_emitter,i),this.response_parser=new v.ResponseParser(this.response_handler,this.watchdog),this.server_manager=new _.ServerManager(this.config_event_emitter,this.server_event_emitter,this.edit_queue,this.response_handler,this.response_parser,this.watchdog,e,t),this.response_handler.setServerManager(this.server_manager),this.response_handler.setEditQueue(this.edit_queue),this.reportCompilerStartup()}reportOutstandingRequest(e){e?this.progress.report(T.Activity.Request,T.ROUTINE_ANALYSIS_MESSAGE,{delay_ms:T.SLOW_ACTIVITY_DELAY_MS,fallback:!0}):this.progress.end(T.Activity.Request)}reportCompilerStartup(){this.server_event_emitter.onStarting(()=>{var e,t;(null===(t=null===(e=this.config)||void 0===e?void 0:e.compiler)||void 0===t?void 0:t.length)&&!this.config.block&&(this.reporting_compiler_startup=!0,this.progress.report(T.Activity.Compiler,"starting analyser"),this.awaitFirstAnalysis(++this.compiler_generation))}),this.server_event_emitter.onListening(()=>{this.reporting_compiler_startup&&this.progress.report(T.Activity.Compiler,"analysing project",{done_message:"project analysed"})})}awaitFirstAnalysis(e){const t=new Promise(e=>{var t,i;null===(i=(t=setTimeout(e,3e5)).unref)||void 0===i||i.call(t)});Promise.race([this.requester.untilFirstAnalysed(),t]).then(()=>{this.compiler_generation==e&&(this.reporting_compiler_startup=!1,this.progress.end(T.Activity.Compiler))}).catch(e=>(0,d.log)(`could not finish reporting progress: ${e}`))}initialize(){var e;return this.initialize_running?null!==(e=this.initialize_queued)&&void 0!==e?e:this.initialize_queued=this.initialize_running.catch(()=>{}).then(()=>(this.initialize_queued=null,this.beginInitialize())):this.beginInitialize()}beginInitialize(){return this.initialize_running=this.runInitialize().finally(()=>{this.initialize_queued||(this.initialize_running=null)})}runInitialize(){return a(this,void 0,void 0,function*(){var e,t,i,n;let r=[];this.progress.report(T.Activity.Setup,"restoring .NET tools");let o=yield(0,R.restoreDotNetTools)(this.workspace_root);o&&r.push(o),this.progress.report(T.Activity.Setup,"building project references",{done_message:"project references built"});let s=yield(0,E.generateAssembliesJson)(this.workspace_root);s&&r.push(s),yield(0,P.generateGhulOptionsJson)(this.workspace_root),this.config=(0,C.getGhulConfig)(this.workspace_root,yield this.readEditorSettings()),r.push(...null!==(e=this.config.problems)&&void 0!==e?e:[]),this.config.missing_assemblies.length&&r.push(`could not build ${this.config.missing_assemblies.length} referenced assembly/assemblies; analysis will be incomplete until they are built`),r.length&&(null===(t=this.config.compiler)||void 0===t?void 0:t.length)&&(null===(i=this.connection.window)||void 0===i||i.showWarningMessage("ghūl language extension: "+r.join("; ")));const a=this.workspace_root.replace(/\\/g,"/");null===(n=this.document_change_tracker)||void 0===n||n.dispose(),this.document_change_tracker=new b.DocumentChangeTracker(this,this.edit_queue,this.config.source.map(e=>`${a}/${e}`),this.documents,this.config.missing_assemblies),this.watchMissingAssemblies(),this.config_event_emitter.configAvailable(this.workspace_root,this.config),this.progress.end(T.Activity.Setup)})}readEditorSettings(){return a(this,void 0,void 0,function*(){var e,t;if(!this.client_supports_configuration||!(null===(t=null===(e=this.connection)||void 0===e?void 0:e.workspace)||void 0===t?void 0:t.getConfiguration))return{};const i=(0,l.pathToFileURL)(this.workspace_root).toString();try{const e=yield Promise.race([this.connection.workspace.getConfiguration([{scopeUri:i,section:"ghul.incrementalAnalysis"},{scopeUri:i,section:"ghul.plaintextHover"}]),new Promise(e=>{var t,i;null===(i=(t=setTimeout(()=>e(null),5e3)).unref)||void 0===i||i.call(t)})]);if(!e)return(0,d.log)("the client did not answer for its settings; using the project's own configuration"),{};const[t,n]=e;return{incremental_analysis:x(t),want_plaintext_hover:x(n)}}catch(e){return(0,d.log)(`could not read editor settings: ${e}`),{}}})}reinitialize(){this.initializeDetached()}initializeDetached(){this.initialize().catch(e=>(0,d.log)(`workspace initialization failed: ${e}`))}watchMissingAssemblies(){var e,t;this.stopWatchingMissingAssemblies(),this.config.missing_assemblies.length&&(null===(t=null===(e=this.connection)||void 0===e?void 0:e.client)||void 0===t?void 0:t.register)&&(this.missing_assembly_watch=this.connection.client.register(h.DidChangeWatchedFilesNotification.type,{watchers:this.config.missing_assemblies.map(e=>({globPattern:e.replace(/\\/g,"/")}))}))}stopWatchingMissingAssemblies(){var e;null===(e=this.missing_assembly_watch)||void 0===e||e.then(e=>e.dispose()),this.missing_assembly_watch=null}sourceGlobs(){var e,t;return null!==(t=null===(e=this.document_change_tracker)||void 0===e?void 0:e.globs)&&void 0!==t?t:[]}analysisResponseFilePath(){return c.join(this.workspace_root,".analysis.rsp")}static looksLikeGhulWorkspace(e){if(!e)return!1;let t;try{t=(0,u.readdirSync)(e)}catch(e){return!1}return t.some(e=>e.endsWith(".ghulproj")||"ghul.json"===e)}}},3281(e,t,i){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ProgressType=t.ProgressToken=t.createMessageConnection=t.NullLogger=t.ConnectionOptions=t.ConnectionStrategy=t.AbstractMessageBuffer=t.WriteableStreamMessageWriter=t.AbstractMessageWriter=t.MessageWriter=t.ReadableStreamMessageReader=t.AbstractMessageReader=t.MessageReader=t.SharedArrayReceiverStrategy=t.SharedArraySenderStrategy=t.CancellationToken=t.CancellationTokenSource=t.Emitter=t.Event=t.Disposable=t.LRUCache=t.Touch=t.LinkedMap=t.ParameterStructures=t.NotificationType9=t.NotificationType8=t.NotificationType7=t.NotificationType6=t.NotificationType5=t.NotificationType4=t.NotificationType3=t.NotificationType2=t.NotificationType1=t.NotificationType0=t.NotificationType=t.ErrorCodes=t.ResponseError=t.RequestType9=t.RequestType8=t.RequestType7=t.RequestType6=t.RequestType5=t.RequestType4=t.RequestType3=t.RequestType2=t.RequestType1=t.RequestType0=t.RequestType=t.Message=t.RAL=void 0,t.MessageStrategy=t.CancellationStrategy=t.CancellationSenderStrategy=t.RequestCancellationReceiverStrategy=t.IdCancellationReceiverStrategy=t.CancellationReceiverStrategy=t.ConnectionError=t.ConnectionErrors=t.LogTraceNotification=t.SetTraceNotification=t.TraceFormat=t.TraceValues=t.TraceValue=t.Trace=void 0;const r=i(6177);Object.defineProperty(t,"Message",{enumerable:!0,get:function(){return r.Message}}),Object.defineProperty(t,"RequestType",{enumerable:!0,get:function(){return r.RequestType}}),Object.defineProperty(t,"RequestType0",{enumerable:!0,get:function(){return r.RequestType0}}),Object.defineProperty(t,"RequestType1",{enumerable:!0,get:function(){return r.RequestType1}}),Object.defineProperty(t,"RequestType2",{enumerable:!0,get:function(){return r.RequestType2}}),Object.defineProperty(t,"RequestType3",{enumerable:!0,get:function(){return r.RequestType3}}),Object.defineProperty(t,"RequestType4",{enumerable:!0,get:function(){return r.RequestType4}}),Object.defineProperty(t,"RequestType5",{enumerable:!0,get:function(){return r.RequestType5}}),Object.defineProperty(t,"RequestType6",{enumerable:!0,get:function(){return r.RequestType6}}),Object.defineProperty(t,"RequestType7",{enumerable:!0,get:function(){return r.RequestType7}}),Object.defineProperty(t,"RequestType8",{enumerable:!0,get:function(){return r.RequestType8}}),Object.defineProperty(t,"RequestType9",{enumerable:!0,get:function(){return r.RequestType9}}),Object.defineProperty(t,"ResponseError",{enumerable:!0,get:function(){return r.ResponseError}}),Object.defineProperty(t,"ErrorCodes",{enumerable:!0,get:function(){return r.ErrorCodes}}),Object.defineProperty(t,"NotificationType",{enumerable:!0,get:function(){return r.NotificationType}}),Object.defineProperty(t,"NotificationType0",{enumerable:!0,get:function(){return r.NotificationType0}}),Object.defineProperty(t,"NotificationType1",{enumerable:!0,get:function(){return r.NotificationType1}}),Object.defineProperty(t,"NotificationType2",{enumerable:!0,get:function(){return r.NotificationType2}}),Object.defineProperty(t,"NotificationType3",{enumerable:!0,get:function(){return r.NotificationType3}}),Object.defineProperty(t,"NotificationType4",{enumerable:!0,get:function(){return r.NotificationType4}}),Object.defineProperty(t,"NotificationType5",{enumerable:!0,get:function(){return r.NotificationType5}}),Object.defineProperty(t,"NotificationType6",{enumerable:!0,get:function(){return r.NotificationType6}}),Object.defineProperty(t,"NotificationType7",{enumerable:!0,get:function(){return r.NotificationType7}}),Object.defineProperty(t,"NotificationType8",{enumerable:!0,get:function(){return r.NotificationType8}}),Object.defineProperty(t,"NotificationType9",{enumerable:!0,get:function(){return r.NotificationType9}}),Object.defineProperty(t,"ParameterStructures",{enumerable:!0,get:function(){return r.ParameterStructures}});const o=i(3352);Object.defineProperty(t,"LinkedMap",{enumerable:!0,get:function(){return o.LinkedMap}}),Object.defineProperty(t,"LRUCache",{enumerable:!0,get:function(){return o.LRUCache}}),Object.defineProperty(t,"Touch",{enumerable:!0,get:function(){return o.Touch}});const s=i(4019);Object.defineProperty(t,"Disposable",{enumerable:!0,get:function(){return s.Disposable}});const a=i(2676);Object.defineProperty(t,"Event",{enumerable:!0,get:function(){return a.Event}}),Object.defineProperty(t,"Emitter",{enumerable:!0,get:function(){return a.Emitter}});const c=i(9850);Object.defineProperty(t,"CancellationTokenSource",{enumerable:!0,get:function(){return c.CancellationTokenSource}}),Object.defineProperty(t,"CancellationToken",{enumerable:!0,get:function(){return c.CancellationToken}});const l=i(4996);Object.defineProperty(t,"SharedArraySenderStrategy",{enumerable:!0,get:function(){return l.SharedArraySenderStrategy}}),Object.defineProperty(t,"SharedArrayReceiverStrategy",{enumerable:!0,get:function(){return l.SharedArrayReceiverStrategy}});const u=i(9085);Object.defineProperty(t,"MessageReader",{enumerable:!0,get:function(){return u.MessageReader}}),Object.defineProperty(t,"AbstractMessageReader",{enumerable:!0,get:function(){return u.AbstractMessageReader}}),Object.defineProperty(t,"ReadableStreamMessageReader",{enumerable:!0,get:function(){return u.ReadableStreamMessageReader}});const h=i(3193);Object.defineProperty(t,"MessageWriter",{enumerable:!0,get:function(){return h.MessageWriter}}),Object.defineProperty(t,"AbstractMessageWriter",{enumerable:!0,get:function(){return h.AbstractMessageWriter}}),Object.defineProperty(t,"WriteableStreamMessageWriter",{enumerable:!0,get:function(){return h.WriteableStreamMessageWriter}});const d=i(9244);Object.defineProperty(t,"AbstractMessageBuffer",{enumerable:!0,get:function(){return d.AbstractMessageBuffer}});const p=i(577);Object.defineProperty(t,"ConnectionStrategy",{enumerable:!0,get:function(){return p.ConnectionStrategy}}),Object.defineProperty(t,"ConnectionOptions",{enumerable:!0,get:function(){return p.ConnectionOptions}}),Object.defineProperty(t,"NullLogger",{enumerable:!0,get:function(){return p.NullLogger}}),Object.defineProperty(t,"createMessageConnection",{enumerable:!0,get:function(){return p.createMessageConnection}}),Object.defineProperty(t,"ProgressToken",{enumerable:!0,get:function(){return p.ProgressToken}}),Object.defineProperty(t,"ProgressType",{enumerable:!0,get:function(){return p.ProgressType}}),Object.defineProperty(t,"Trace",{enumerable:!0,get:function(){return p.Trace}}),Object.defineProperty(t,"TraceValue",{enumerable:!0,get:function(){return p.TraceValue}}),Object.defineProperty(t,"TraceFormat",{enumerable:!0,get:function(){return p.TraceFormat}}),Object.defineProperty(t,"SetTraceNotification",{enumerable:!0,get:function(){return p.SetTraceNotification}}),Object.defineProperty(t,"LogTraceNotification",{enumerable:!0,get:function(){return p.LogTraceNotification}}),Object.defineProperty(t,"ConnectionErrors",{enumerable:!0,get:function(){return p.ConnectionErrors}}),Object.defineProperty(t,"ConnectionError",{enumerable:!0,get:function(){return p.ConnectionError}}),Object.defineProperty(t,"CancellationReceiverStrategy",{enumerable:!0,get:function(){return p.CancellationReceiverStrategy}}),Object.defineProperty(t,"IdCancellationReceiverStrategy",{enumerable:!0,get:function(){return p.IdCancellationReceiverStrategy}}),Object.defineProperty(t,"RequestCancellationReceiverStrategy",{enumerable:!0,get:function(){return p.RequestCancellationReceiverStrategy}}),Object.defineProperty(t,"CancellationSenderStrategy",{enumerable:!0,get:function(){return p.CancellationSenderStrategy}}),Object.defineProperty(t,"CancellationStrategy",{enumerable:!0,get:function(){return p.CancellationStrategy}}),Object.defineProperty(t,"MessageStrategy",{enumerable:!0,get:function(){return p.MessageStrategy}}),Object.defineProperty(t,"TraceValues",{enumerable:!0,get:function(){return p.TraceValues}});const f=n(i(9590));t.RAL=f.default},9850(e,t,i){"use strict";var n,r=this&&this.__createBinding||(Object.create?function(e,t,i,n){void 0===n&&(n=i);var r=Object.getOwnPropertyDescriptor(t,i);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[i]}}),Object.defineProperty(e,n,r)}:function(e,t,i,n){void 0===n&&(n=i),e[n]=t[i]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||(n=function(e){return n=Object.getOwnPropertyNames||function(e){var t=[];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[t.length]=i);return t},n(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i=n(e),s=0;s<i.length;s++)"default"!==i[s]&&r(t,e,i[s]);return o(t,e),t}),a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.CancellationTokenSource=t.CancellationToken=void 0;const c=a(i(9590)),l=s(i(8585)),u=i(2676);var h;!function(e){e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:u.Event.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:u.Event.None}),e.is=function(t){const i=t;return i&&(i===e.None||i===e.Cancelled||l.boolean(i.isCancellationRequested)&&!!i.onCancellationRequested)}}(h||(t.CancellationToken=h={}));const d=Object.freeze(function(e,t){const i=(0,c.default)().timer.setTimeout(e.bind(t),0);return{dispose(){i.dispose()}}});class p{_isCancelled=!1;_emitter;cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?d:(this._emitter||(this._emitter=new u.Emitter),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=void 0)}}t.CancellationTokenSource=class{_token;get token(){return this._token||(this._token=new p),this._token}cancel(){this._token?this._token.cancel():this._token=h.Cancelled}dispose(){this._token?this._token instanceof p&&this._token.dispose():this._token=h.None}}},577(e,t,i){"use strict";var n,r=this&&this.__createBinding||(Object.create?function(e,t,i,n){void 0===n&&(n=i);var r=Object.getOwnPropertyDescriptor(t,i);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[i]}}),Object.defineProperty(e,n,r)}:function(e,t,i,n){void 0===n&&(n=i),e[n]=t[i]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||(n=function(e){return n=Object.getOwnPropertyNames||function(e){var t=[];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[t.length]=i);return t},n(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i=n(e),s=0;s<i.length;s++)"default"!==i[s]&&r(t,e,i[s]);return o(t,e),t}),a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ConnectionOptions=t.MessageStrategy=t.CancellationStrategy=t.CancellationSenderStrategy=t.CancellationReceiverStrategy=t.RequestCancellationReceiverStrategy=t.IdCancellationReceiverStrategy=t.ConnectionStrategy=t.ConnectionError=t.ConnectionErrors=t.LogTraceNotification=t.SetTraceNotification=t.TraceFormat=t.TraceValues=t.TraceValue=t.Trace=t.NullLogger=t.ProgressType=t.ProgressToken=void 0,t.createMessageConnection=function(e,i,n,r){const o=void 0!==n?n:t.NullLogger;let s=0,a=0,_=0;const S="2.0",R=r?.maxParallelism??-1;let E,P=0;const k=new Map;let M;const I=new Map,q=new Map;let j,F,L=new h.LinkedMap,W=new Map,U=new Set,B=new Map,$=v.Off,z=b.Text,H=N.New;const G=new d.Emitter,V=new d.Emitter,K=new d.Emitter,Y=new d.Emitter,X=new d.Emitter,J=r&&r.cancellationStrategy?r.cancellationStrategy:x.Message;function Q(e){}function Z(){return H===N.Listening}function ee(){return H===N.Closed}function te(){return H===N.Disposed}function ie(){H!==N.New&&H!==N.Listening||(H=N.Closed,V.fire(void 0))}function ne(e){if(null===e)throw new Error("Can't send requests with id null since the response can't be correlated.");return"req-"+e.toString()}function re(){j||0===L.size||-1!==R&&P>=R||(j=(0,c.default)().timer.setImmediate(async()=>{if(j=void 0,0===L.size)return;if(-1!==R&&P>=R)return;const e=L.shift();let t;try{P++;const i=r?.messageStrategy;t=O.is(i)?i.handleMessage(e,oe):oe(e)}catch(e){o.error(`Processing message queue failed: ${e.toString()}`)}finally{t instanceof Promise?t.then(()=>{P--,re()}).catch(e=>{o.error(`Processing message queue failed: ${e.toString()}`)}):P--,re()}}))}async function oe(e){return u.Message.isRequest(e)?async function(e){if(te())return Promise.resolve();function t(t,n,r){const o={jsonrpc:S,id:e.id};return t instanceof u.ResponseError?o.error=t.toJson():o.result=void 0===t?null:t,le(o,n,r),i.write(o)}function n(t,n,r){const o={jsonrpc:S,id:e.id,error:t.toJson()};return le(o,n,r),i.write(o)}!function(e){if($!==v.Off&&F)if(z===b.Text){let t;$!==v.Verbose&&$!==v.Compact||!e.params||(t=`Params: ${ce(e.params)}`),F.log(`Received request '${e.method} - (${e.id})'.`,t)}else he("receive-request",e)}(e);const r=k.get(e.method);let o,s;r&&(o=r.type,s=r.handler);const a=Date.now();if(s||E){const i=e.id??String(Date.now()),r=C.is(J.receiver)?J.receiver.createCancellationTokenSource(i):J.receiver.createCancellationTokenSource(e);null!==e.id&&U.has(e.id)&&r.cancel(),null!==e.id&&B.set(i,r);try{let i;if(s)if(void 0===e.params){if(void 0!==o&&0!==o.numberOfParams)return n(new u.ResponseError(u.ErrorCodes.InvalidParams,`Request ${e.method} defines ${o.numberOfParams} params but received none.`),e.method,a);i=s(r.token)}else if(Array.isArray(e.params)){if(void 0!==o&&o.parameterStructures===u.ParameterStructures.byName)return n(new u.ResponseError(u.ErrorCodes.InvalidParams,`Request ${e.method} defines parameters by name but received parameters by position`),e.method,a);i=s(...e.params,r.token)}else{if(void 0!==o&&o.parameterStructures===u.ParameterStructures.byPosition)return n(new u.ResponseError(u.ErrorCodes.InvalidParams,`Request ${e.method} defines parameters by position but received parameters by name`),e.method,a);i=s(e.params,r.token)}else E&&(i=E(e.method,e.params,r.token));const c=await i;await t(c,e.method,a)}catch(i){i instanceof u.ResponseError?await t(i,e.method,a):i&&l.string(i.message)?await n(new u.ResponseError(u.ErrorCodes.InternalError,`Request ${e.method} failed with message: ${i.message}`),e.method,a):await n(new u.ResponseError(u.ErrorCodes.InternalError,`Request ${e.method} failed unexpectedly without providing any details.`),e.method,a)}finally{B.delete(i)}}else await n(new u.ResponseError(u.ErrorCodes.MethodNotFound,`Unhandled method ${e.method}`),e.method,a)}(e):u.Message.isNotification(e)?async function(e){if(te())return;let t,i;if(e.method===f.type.method){const t=e.params.id;return U.delete(t),void ue(e)}{const n=I.get(e.method);n&&(i=n.handler,t=n.type)}if(i||M)try{if(ue(e),i)if(void 0===e.params)void 0!==t&&0!==t.numberOfParams&&t.parameterStructures!==u.ParameterStructures.byName&&o.error(`Notification ${e.method} defines ${t.numberOfParams} params but received none.`),await i();else if(Array.isArray(e.params)){const n=e.params;e.method===m.type.method&&2===n.length&&g.is(n[0])?await i({token:n[0],value:n[1]}):(void 0!==t&&(t.parameterStructures===u.ParameterStructures.byName&&o.error(`Notification ${e.method} defines parameters by name but received parameters by position`),t.numberOfParams!==e.params.length&&o.error(`Notification ${e.method} defines ${t.numberOfParams} params but received ${n.length} arguments`)),await i(...n))}else void 0!==t&&t.parameterStructures===u.ParameterStructures.byPosition&&o.error(`Notification ${e.method} defines parameters by position but received parameters by name`),await i(e.params);else M&&await M(e.method,e.params)}catch(t){t.message?o.error(`Notification handler '${e.method}' failed with message: ${t.message}`):o.error(`Notification handler '${e.method}' failed unexpectedly.`)}else K.fire(e)}(e):u.Message.isResponse(e)?ae(e):function(e){if(!e)return void o.error("Received empty message.");o.error(`Received message which is neither a response nor a notification message:\n${JSON.stringify(e,null,4)}`);const t=e;if(l.string(t.id)||l.number(t.id)){const e=t.id,i=W.get(e);i&&i.reject(new Error("The received response has neither a result nor an error property."))}}(e)}e.onClose(ie),e.onError(function(e){G.fire([e,void 0,void 0])}),i.onClose(ie),i.onError(function(e){G.fire(e)});const se=e=>{try{if(u.Message.isNotification(e)&&e.method===f.type.method){const t=e.params.id,n=ne(t),s=L.get(n);if(u.Message.isRequest(s)){const a=r?.connectionStrategy,c=a&&a.cancelUndispatched?a.cancelUndispatched(s,Q):void 0;if(c&&(void 0!==c.error||void 0!==c.result))return L.delete(n),B.delete(t),c.id=s.id,le(c,e.method,Date.now()),void i.write(c).catch(()=>o.error("Sending response for canceled message failed."))}const a=B.get(t);if(void 0!==a)return a.cancel(),void ue(e);U.add(t)}!function(e,t){var i;u.Message.isRequest(t)?e.set(ne(t.id),t):u.Message.isResponse(t)?-1===R?e.set(null===(i=t.id)?"res-unknown-"+(++_).toString():"res-"+i.toString(),t):ae(t):e.set("not-"+(++a).toString(),t)}(L,e)}finally{re()}};function ae(e){if(!te())if(null===e.id)e.error?o.error(`Received response message without id: Error is: \n${JSON.stringify(e.error,void 0,4)}`):o.error("Received response message without id. No further error information provided.");else{const t=e.id,i=W.get(t);if(function(e,t){if($!==v.Off&&F)if(z===b.Text){let i;if($!==v.Verbose&&$!==v.Compact||(e.error&&e.error.data?i=`Error data: ${ce(e.error.data)}`:e.result?i=`Result: ${ce(e.result)}`:void 0===e.error&&(i="No result returned.")),t){const n=e.error?` Request failed: ${e.error.message} (${e.error.code}).`:"";F.log(`Received response '${t.method} - (${e.id})' in ${Date.now()-t.timerStart}ms.${n}`,i)}else F.log(`Received response ${e.id} without active response promise.`,i)}else he("receive-response",e)}(e,i),void 0!==i){W.delete(t);try{if(e.error){const t=e.error;i.reject(new u.ResponseError(t.code,t.message,t.data))}else{if(void 0===e.result)throw new Error("Should never happen.");i.resolve(e.result)}}catch(e){e.message?o.error(`Response handler '${i.method}' failed with message: ${e.message}`):o.error(`Response handler '${i.method}' failed unexpectedly.`)}}}}function ce(e){if(null!=e)switch($){case v.Verbose:return JSON.stringify(e,null,4);case v.Compact:return JSON.stringify(e);default:return}}function le(e,t,i){if($!==v.Off&&F)if(z===b.Text){let n;$!==v.Verbose&&$!==v.Compact||(e.error&&e.error.data?n=`Error data: ${ce(e.error.data)}`:e.result?n=`Result: ${ce(e.result)}`:void 0===e.error&&(n="No result returned.")),F.log(`Sending response '${t} - (${e.id})'. Processing request took ${Date.now()-i}ms`,n)}else he("send-response",e)}function ue(e){if($!==v.Off&&F&&e.method!==D.type.method)if(z===b.Text){let t;$!==v.Verbose&&$!==v.Compact||(t=e.params?`Params: ${ce(e.params)}`:"No parameters provided."),F.log(`Received notification '${e.method}'.`,t)}else he("receive-notification",e)}function he(e,t){if(!F||$===v.Off)return;const i={isLSPMessage:!0,type:e,message:t,timestamp:Date.now()};F.log(i)}function de(){if(ee())throw new A(T.Closed,"Connection is closed.");if(te())throw new A(T.Disposed,"Connection is disposed.")}function pe(e){return void 0===e?null:e}function fe(e){return null===e?void 0:e}function ge(e){return null!=e&&!Array.isArray(e)&&"object"==typeof e}function me(e,t){switch(e){case u.ParameterStructures.auto:return ge(t)?fe(t):[pe(t)];case u.ParameterStructures.byName:if(!ge(t))throw new Error("Received parameters by name but param is not an object literal.");return fe(t);case u.ParameterStructures.byPosition:return[pe(t)];default:throw new Error(`Unknown parameter structure ${e.toString()}`)}}function ye(e,t){let i;const n=e.numberOfParams;switch(n){case 0:i=void 0;break;case 1:i=me(e.parameterStructures,t[0]);break;default:i=[];for(let e=0;e<t.length&&e<n;e++)i.push(pe(t[e]));if(t.length<n)for(let e=t.length;e<n;e++)i.push(null)}return i}const ve={sendNotification:(e,...t)=>{let n,r;if(de(),l.string(e)){n=e;const i=t[0];let o=0,s=u.ParameterStructures.auto;u.ParameterStructures.is(i)&&(o=1,s=i);const a=t.length,c=a-o;switch(c){case 0:r=void 0;break;case 1:r=me(s,t[o]);break;default:if(s===u.ParameterStructures.byName)throw new Error(`Received ${c} parameters for 'by Name' notification parameter structure.`);r=t.slice(o,a).map(e=>pe(e))}}else{const i=t;n=e.method,r=ye(e,i)}const s={jsonrpc:S,method:n,params:r};return function(e){if($!==v.Off&&F)if(z===b.Text){let t;$!==v.Verbose&&$!==v.Compact||(t=e.params?`Params: ${ce(e.params)}`:"No parameters provided."),F.log(`Sending notification '${e.method}'.`,t)}else he("send-notification",e)}(s),i.write(s).catch(e=>{throw o.error("Sending notification failed."),e})},onNotification:(e,t)=>{let i;return de(),l.func(e)?M=e:t&&(l.string(e)?(i=e,I.set(e,{type:void 0,handler:t})):(i=e.method,I.set(e.method,{type:e,handler:t}))),{dispose:()=>{void 0!==i?I.get(i)?.handler===t&&I.delete(i):M===e&&(M=void 0)}}},onProgress:(e,t,i)=>{if(q.has(t))throw new Error(`Progress handler for token ${t} already registered`);return q.set(t,i),{dispose:()=>{q.get(t)===i&&q.delete(t)}}},sendProgress:(e,t,i)=>ve.sendNotification(m.type,{token:t,value:i}),onUnhandledProgress:Y.event,sendRequest:(e,...t)=>{function n(e,t){const i=J.sender.sendCancellation(e,t);void 0===i?o.log(`Received no promise from cancellation strategy when cancelling id ${t}`):i.catch(()=>{o.log(`Sending cancellation messages for id ${t} failed.`)})}let r,a,c;if(de(),function(){if(!Z())throw new Error("Call listen() first.")}(),l.string(e)){r=e;const i=t[0],n=t[t.length-1];let o=0,s=u.ParameterStructures.auto;u.ParameterStructures.is(i)&&(o=1,s=i);let l=t.length;p.CancellationToken.is(n)&&(l-=1,c=n);const h=l-o;switch(h){case 0:a=void 0;break;case 1:a=me(s,t[o]);break;default:if(s===u.ParameterStructures.byName)throw new Error(`Received ${h} parameters for 'by Name' request parameter structure.`);a=t.slice(o,l).map(e=>pe(e))}}else{const i=t;r=e.method,a=ye(e,i);const n=e.numberOfParams;c=p.CancellationToken.is(i[n])?i[n]:void 0}const h=s++;let d,f=!1;void 0!==c&&(c.isCancellationRequested?f=!0:d=c.onCancellationRequested(()=>{n(ve,h)}));const g={jsonrpc:S,id:h,method:r,params:a};return function(e){if($!==v.Off&&F)if(z===b.Text){let t;$!==v.Verbose&&$!==v.Compact||!e.params||(t=`Params: ${ce(e.params)}`),F.log(`Sending request '${e.method} - (${e.id})'.`,t)}else he("send-request",e)}(g),"function"==typeof J.sender.enableCancellation&&J.sender.enableCancellation(g),new Promise(async(e,t)=>{const s={method:r,timerStart:Date.now(),resolve:t=>{e(t),J.sender.cleanup(h),d?.dispose()},reject:e=>{t(e),J.sender.cleanup(h),d?.dispose()}};try{W.set(h,s),await i.write(g),f&&n(ve,h)}catch(e){throw W.delete(h),s.reject(new u.ResponseError(u.ErrorCodes.MessageWriteError,e.message?e.message:"Unknown reason")),o.error("Sending request failed."),e}})},onRequest:(e,t)=>{de();let i=null;return y.is(e)?(i=void 0,E=e):l.string(e)?(i=null,void 0!==t&&(i=e,k.set(e,{handler:t,type:void 0}))):void 0!==t&&(i=e.method,k.set(e.method,{type:e,handler:t})),{dispose:()=>{null!==i&&(void 0!==i?k.get(i)?.handler===t&&k.delete(i):E===e&&(E=void 0))}}},hasPendingResponse:()=>W.size>0,trace:async(e,t,i)=>{let n=!1,r=b.Text;void 0!==i&&(l.boolean(i)?n=i:(n=i.sendNotification||!1,r=i.traceFormat||b.Text)),$=e,z=r,F=$===v.Off?void 0:t,!n||ee()||te()||await ve.sendNotification(w.type,{value:v.toString(e)})},onError:G.event,onClose:V.event,onUnhandledNotification:K.event,onDispose:X.event,end:()=>{i.end()},dispose:()=>{if(te())return;H=N.Disposed,X.fire(void 0);const t=new u.ResponseError(u.ErrorCodes.PendingResponseRejected,"Pending response rejected since connection got disposed");for(const e of W.values())e.reject(t);W=new Map,B=new Map,U=new Set,L=new h.LinkedMap,l.func(i.dispose)&&i.dispose(),l.func(e.dispose)&&e.dispose()},listen:()=>{de(),function(){if(Z())throw new A(T.AlreadyListening,"Connection is already listening")}(),H=N.Listening,e.listen(se)},inspect:()=>{(0,c.default)().console.log("inspect")}};return ve.onNotification(D.type,e=>{if($===v.Off||!F)return;const t=$===v.Verbose||$===v.Compact;F.log(e.message,t?e.verbose:void 0)}),ve.onNotification(m.type,async e=>{const t=q.get(e.token);t?await t(e.value):Y.fire(e)}),ve};const c=a(i(9590)),l=s(i(8585)),u=i(6177),h=i(3352),d=i(2676),p=i(9850);var f,g,m,y,v,_,b,w,D,T,S,C,R,E,P,x,O,k,N;!function(e){e.type=new u.NotificationType("$/cancelRequest")}(f||(f={})),function(e){e.is=function(e){return"string"==typeof e||"number"==typeof e}}(g||(t.ProgressToken=g={})),function(e){e.type=new u.NotificationType("$/progress")}(m||(m={})),t.ProgressType=class{__;_pr;constructor(){}},function(e){e.is=function(e){return l.func(e)}}(y||(y={})),t.NullLogger=Object.freeze({error:()=>{},warn:()=>{},info:()=>{},log:()=>{}}),function(e){e[e.Off=0]="Off",e[e.Messages=1]="Messages",e[e.Compact=2]="Compact",e[e.Verbose=3]="Verbose"}(v||(t.Trace=v={})),function(e){e.Off="off",e.Messages="messages",e.Compact="compact",e.Verbose="verbose"}(_||(t.TraceValue=_={})),t.TraceValues=_,function(e){e.fromString=function(t){if(!l.string(t))return e.Off;switch(t=t.toLowerCase()){case"off":default:return e.Off;case"messages":return e.Messages;case"compact":return e.Compact;case"verbose":return e.Verbose}},e.toString=function(t){switch(t){case e.Off:return"off";case e.Messages:return"messages";case e.Compact:return"compact";case e.Verbose:return"verbose";default:return"off"}}}(v||(t.Trace=v={})),function(e){e.Text="text",e.JSON="json"}(b||(t.TraceFormat=b={})),function(e){e.fromString=function(t){return l.string(t)&&"json"===(t=t.toLowerCase())?e.JSON:e.Text}}(b||(t.TraceFormat=b={})),function(e){e.type=new u.NotificationType("$/setTrace")}(w||(t.SetTraceNotification=w={})),function(e){e.type=new u.NotificationType("$/logTrace")}(D||(t.LogTraceNotification=D={})),function(e){e[e.Closed=1]="Closed",e[e.Disposed=2]="Disposed",e[e.AlreadyListening=3]="AlreadyListening"}(T||(t.ConnectionErrors=T={}));class A extends Error{code;constructor(e,t){super(t),this.code=e,Object.setPrototypeOf(this,A.prototype)}}t.ConnectionError=A,function(e){e.is=function(e){const t=e;return t&&l.func(t.cancelUndispatched)}}(S||(t.ConnectionStrategy=S={})),function(e){e.is=function(e){const t=e;return t&&(void 0===t.kind||"id"===t.kind)&&l.func(t.createCancellationTokenSource)&&(void 0===t.dispose||l.func(t.dispose))}}(C||(t.IdCancellationReceiverStrategy=C={})),function(e){e.is=function(e){const t=e;return t&&"request"===t.kind&&l.func(t.createCancellationTokenSource)&&(void 0===t.dispose||l.func(t.dispose))}}(R||(t.RequestCancellationReceiverStrategy=R={})),function(e){e.Message=Object.freeze({createCancellationTokenSource:e=>new p.CancellationTokenSource}),e.is=function(e){return C.is(e)||R.is(e)}}(E||(t.CancellationReceiverStrategy=E={})),function(e){e.Message=Object.freeze({sendCancellation:(e,t)=>e.sendNotification(f.type,{id:t}),cleanup(e){}}),e.is=function(e){const t=e;return t&&l.func(t.sendCancellation)&&l.func(t.cleanup)}}(P||(t.CancellationSenderStrategy=P={})),function(e){e.Message=Object.freeze({receiver:E.Message,sender:P.Message}),e.is=function(e){const t=e;return t&&E.is(t.receiver)&&P.is(t.sender)}}(x||(t.CancellationStrategy=x={})),function(e){e.is=function(e){const t=e;return t&&l.func(t.handleMessage)}}(O||(t.MessageStrategy=O={})),function(e){e.is=function(e){const t=e;return t&&(x.is(t.cancellationStrategy)||S.is(t.connectionStrategy)||O.is(t.messageStrategy)||l.number(t.maxParallelism))}}(k||(t.ConnectionOptions=k={})),function(e){e[e.New=1]="New",e[e.Listening=2]="Listening",e[e.Closed=3]="Closed",e[e.Disposed=4]="Disposed"}(N||(N={}))},4019(e,t){"use strict";var i;t.Disposable=void 0,function(e){e.create=function(e){return{dispose:e}}}(i||(t.Disposable=i={}))},2676(e,t,i){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Emitter=t.Event=void 0;const r=n(i(9590));var o;!function(e){const t={dispose(){}};e.None=function(){return t}}(o||(t.Event=o={}));class s{_callbacks;_contexts;add(e,t=null,i){this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(e),this._contexts.push(t),Array.isArray(i)&&i.push({dispose:()=>this.remove(e,t)})}remove(e,t=null){if(!this._callbacks)return;let i=!1;for(let n=0,r=this._callbacks.length;n<r;n++)if(this._callbacks[n]===e){if(this._contexts[n]===t)return this._callbacks.splice(n,1),void this._contexts.splice(n,1);i=!0}if(i)throw new Error("When adding a listener with a context, you should remove it with the same context")}invoke(...e){if(!this._callbacks)return[];const t=[],i=this._callbacks.slice(0),n=this._contexts.slice(0);for(let o=0,s=i.length;o<s;o++)try{t.push(i[o].apply(n[o],e))}catch(e){(0,r.default)().console.error(e)}return t}isEmpty(){return!this._callbacks||0===this._callbacks.length}dispose(){this._callbacks=void 0,this._contexts=void 0}}class a{_options;static _noop=function(){};_event;_callbacks;constructor(e){this._options=e}get event(){return this._event||(this._event=(e,t,i)=>{this._callbacks||(this._callbacks=new s),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(e,t);const n={dispose:()=>{this._callbacks&&(this._callbacks.remove(e,t),n.dispose=a._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this))}};return Array.isArray(i)&&i.push(n),n}),this._event}fire(e){this._callbacks&&this._callbacks.invoke.call(this._callbacks,e)}dispose(){this._callbacks&&(this._callbacks.dispose(),this._callbacks=void 0)}}t.Emitter=a},8585(e,t){"use strict";function i(e){return"string"==typeof e||e instanceof String}function n(e){return Array.isArray(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.boolean=function(e){return!0===e||!1===e},t.string=i,t.number=function(e){return"number"==typeof e||e instanceof Number},t.error=function(e){return e instanceof Error},t.func=function(e){return"function"==typeof e},t.array=n,t.stringArray=function(e){return n(e)&&e.every(e=>i(e))}},3352(e,t){"use strict";var i;t.LRUCache=t.LinkedMap=t.Touch=void 0,function(e){e.None=0,e.First=1,e.AsOld=e.First,e.Last=2,e.AsNew=e.Last}(i||(t.Touch=i={}));class n{[Symbol.toStringTag]="LinkedMap";_map;_head;_tail;_size;_state;constructor(){this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0,this._state=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0,this._state++}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}get first(){return this._head?.value}get last(){return this._tail?.value}before(e){const t=this._map.get(e);return t?t.previous?.value:void 0}after(e){const t=this._map.get(e);return t?t.next?.value:void 0}has(e){return this._map.has(e)}get(e,t=i.None){const n=this._map.get(e);if(n)return t!==i.None&&this.touch(n,t),n.value}set(e,t,n=i.None){let r=this._map.get(e);if(r)r.value=t,n!==i.None&&this.touch(r,n);else{switch(r={key:e,value:t,next:void 0,previous:void 0},n){case i.None:this.addItemLast(r);break;case i.First:this.addItemFirst(r);break;case i.Last:default:this.addItemLast(r)}this._map.set(e,r),this._size++}return this}delete(e){return!!this.remove(e)}remove(e){const t=this._map.get(e);if(t)return this._map.delete(e),this.removeItem(t),this._size--,t.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");const e=this._head;return this._map.delete(e.key),this.removeItem(e),this._size--,e.value}forEach(e,t){const i=this._state;let n=this._head;for(;n;){if(t?e.bind(t)(n.value,n.key,this):e(n.value,n.key,this),this._state!==i)throw new Error("LinkedMap got modified during iteration.");n=n.next}}keys(){const e=this._state;let t=this._head;const i={[Symbol.iterator]:()=>i,next:()=>{if(this._state!==e)throw new Error("LinkedMap got modified during iteration.");if(t){const e={value:t.key,done:!1};return t=t.next,e}return{value:void 0,done:!0}}};return i}values(){const e=this._state;let t=this._head;const i={[Symbol.iterator]:()=>i,next:()=>{if(this._state!==e)throw new Error("LinkedMap got modified during iteration.");if(t){const e={value:t.value,done:!1};return t=t.next,e}return{value:void 0,done:!0}}};return i}entries(){const e=this._state;let t=this._head;const i={[Symbol.iterator]:()=>i,next:()=>{if(this._state!==e)throw new Error("LinkedMap got modified during iteration.");if(t){const e={value:[t.key,t.value],done:!1};return t=t.next,e}return{value:void 0,done:!0}}};return i}[Symbol.iterator](){return this.entries()}trimOld(e){if(e>=this.size)return;if(0===e)return void this.clear();let t=this._head,i=this.size;for(;t&&i>e;)this._map.delete(t.key),t=t.next,i--;this._head=t,this._size=i,t&&(t.previous=void 0),this._state++}addItemFirst(e){if(this._head||this._tail){if(!this._head)throw new Error("Invalid list");e.next=this._head,this._head.previous=e}else this._tail=e;this._head=e,this._state++}addItemLast(e){if(this._head||this._tail){if(!this._tail)throw new Error("Invalid list");e.previous=this._tail,this._tail.next=e}else this._head=e;this._tail=e,this._state++}removeItem(e){if(e===this._head&&e===this._tail)this._head=void 0,this._tail=void 0;else if(e===this._head){if(!e.next)throw new Error("Invalid list");e.next.previous=void 0,this._head=e.next}else if(e===this._tail){if(!e.previous)throw new Error("Invalid list");e.previous.next=void 0,this._tail=e.previous}else{const t=e.next,i=e.previous;if(!t||!i)throw new Error("Invalid list");t.previous=i,i.next=t}e.next=void 0,e.previous=void 0,this._state++}touch(e,t){if(!this._head||!this._tail)throw new Error("Invalid list");if(t===i.First||t===i.Last)if(t===i.First){if(e===this._head)return;const t=e.next,i=e.previous;e===this._tail?(i.next=void 0,this._tail=i):(t.previous=i,i.next=t),e.previous=void 0,e.next=this._head,this._head.previous=e,this._head=e,this._state++}else if(t===i.Last){if(e===this._tail)return;const t=e.next,i=e.previous;e===this._head?(t.previous=void 0,this._head=t):(t.previous=i,i.next=t),e.next=void 0,e.previous=this._tail,this._tail.next=e,this._tail=e,this._state++}}toJSON(){const e=[];return this.forEach((t,i)=>{e.push([i,t])}),e}fromJSON(e){this.clear();for(const[t,i]of e)this.set(t,i)}}t.LinkedMap=n,t.LRUCache=class extends n{_limit;_ratio;constructor(e,t=1){super(),this._limit=e,this._ratio=Math.min(Math.max(0,t),1)}get limit(){return this._limit}set limit(e){this._limit=e,this.checkTrim()}get ratio(){return this._ratio}set ratio(e){this._ratio=Math.min(Math.max(0,e),1),this.checkTrim()}get(e,t=i.AsNew){return super.get(e,t)}peek(e){return super.get(e,i.None)}set(e,t){return super.set(e,t,i.Last),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}}},9244(e,t){"use strict";t.AbstractMessageBuffer=void 0,t.AbstractMessageBuffer=class{_encoding;_chunks;_totalLength;constructor(e="utf-8"){this._encoding=e,this._chunks=[],this._totalLength=0}get encoding(){return this._encoding}append(e){const t="string"==typeof e?this.fromString(e,this._encoding):e;this._chunks.push(t),this._totalLength+=t.byteLength}tryReadHeaders(e=!1){if(0===this._chunks.length)return;let t=0,i=0,n=0,r=0;e:for(;i<this._chunks.length;){const e=this._chunks[i];for(n=0;n<e.length;){switch(e[n]){case 13:switch(t){case 0:t=1;break;case 2:t=3;break;default:t=0}break;case 10:switch(t){case 1:t=2;break;case 3:t=4,n++;break e;default:t=0}break;default:t=0}n++}r+=e.byteLength,i++}if(4!==t)return;const o=this._read(r+n),s=new Map,a=this.toString(o,"ascii").split("\r\n");if(a.length<2)return s;for(let t=0;t<a.length-2;t++){const i=a[t],n=i.indexOf(":");if(-1===n)throw new Error(`Message header must separate key and value using ':'\n${i}`);const r=i.substr(0,n),o=i.substr(n+1).trim();s.set(e?r.toLowerCase():r,o)}return s}tryReadBody(e){if(!(this._totalLength<e))return this._read(e)}get numberOfBytes(){return this._totalLength}_read(e){if(0===e)return this.emptyBuffer();if(e>this._totalLength)throw new Error("Cannot read so many bytes!");if(this._chunks[0].byteLength===e){const t=this._chunks[0];return this._chunks.shift(),this._totalLength-=e,this.asNative(t)}if(this._chunks[0].byteLength>e){const t=this._chunks[0],i=this.asNative(t,e);return this._chunks[0]=t.slice(e),this._totalLength-=e,i}const t=this.allocNative(e);let i=0;for(;e>0;){const n=this._chunks[0];if(n.byteLength>e){const r=n.slice(0,e);t.set(r,i),i+=e,this._chunks[0]=n.slice(e),this._totalLength-=e,e-=e}else t.set(n,i),i+=n.byteLength,this._chunks.shift(),this._totalLength-=n.byteLength,e-=n.byteLength}return t}}},9085(e,t,i){"use strict";var n,r=this&&this.__createBinding||(Object.create?function(e,t,i,n){void 0===n&&(n=i);var r=Object.getOwnPropertyDescriptor(t,i);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[i]}}),Object.defineProperty(e,n,r)}:function(e,t,i,n){void 0===n&&(n=i),e[n]=t[i]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||(n=function(e){return n=Object.getOwnPropertyNames||function(e){var t=[];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[t.length]=i);return t},n(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i=n(e),s=0;s<i.length;s++)"default"!==i[s]&&r(t,e,i[s]);return o(t,e),t}),a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ReadableStreamMessageReader=t.AbstractMessageReader=t.MessageReader=void 0;const c=a(i(9590)),l=s(i(8585)),u=i(2676),h=i(4323);var d,p;!function(e){e.is=function(e){const t=e;return t&&l.func(t.listen)&&l.func(t.dispose)&&l.func(t.onError)&&l.func(t.onClose)&&l.func(t.onPartialMessage)}}(d||(t.MessageReader=d={}));class f{errorEmitter;closeEmitter;partialMessageEmitter;constructor(){this.errorEmitter=new u.Emitter,this.closeEmitter=new u.Emitter,this.partialMessageEmitter=new u.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose(),this.partialMessageEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(e){this.errorEmitter.fire(this.asError(e))}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}get onPartialMessage(){return this.partialMessageEmitter.event}firePartialMessage(e){this.partialMessageEmitter.fire(e)}asError(e){return e instanceof Error?e:new Error(`Reader received error. Reason: ${l.string(e.message)?e.message:"unknown"}`)}}t.AbstractMessageReader=f,function(e){e.fromOptions=function(e){let t,i;const n=new Map;let r;const o=new Map;if(void 0===e||"string"==typeof e)t=e??"utf-8";else{if(t=e.charset??"utf-8",void 0!==e.contentDecoder&&(i=e.contentDecoder,n.set(i.name,i)),void 0!==e.contentDecoders)for(const t of e.contentDecoders)n.set(t.name,t);if(void 0!==e.contentTypeDecoder&&(r=e.contentTypeDecoder,o.set(r.name,r)),void 0!==e.contentTypeDecoders)for(const t of e.contentTypeDecoders)o.set(t.name,t)}return void 0===r&&(r=(0,c.default)().applicationJson.decoder,o.set(r.name,r)),{charset:t,contentDecoder:i,contentDecoders:n,contentTypeDecoder:r,contentTypeDecoders:o}}}(p||(p={})),t.ReadableStreamMessageReader=class extends f{readable;options;callback;nextMessageLength;messageToken;buffer;partialMessageTimer;_partialMessageTimeout;readSemaphore;constructor(e,t){super(),this.readable=e,this.options=p.fromOptions(t),this.buffer=(0,c.default)().messageBuffer.create(this.options.charset),this._partialMessageTimeout=1e4,this.nextMessageLength=-1,this.messageToken=0,this.readSemaphore=new h.Semaphore(1)}set partialMessageTimeout(e){this._partialMessageTimeout=e}get partialMessageTimeout(){return this._partialMessageTimeout}listen(e){this.nextMessageLength=-1,this.messageToken=0,this.partialMessageTimer=void 0,this.callback=e;const t=this.readable.onData(e=>{this.onData(e)});return this.readable.onError(e=>this.fireError(e)),this.readable.onClose(()=>this.fireClose()),t}onData(e){try{for(this.buffer.append(e);;){if(-1===this.nextMessageLength){const e=this.buffer.tryReadHeaders(!0);if(!e)return;const t=e.get("content-length");if(!t)return void this.fireError(new Error(`Header must provide a Content-Length property.\n${JSON.stringify(Object.fromEntries(e))}`));const i=parseInt(t);if(isNaN(i))return void this.fireError(new Error(`Content-Length value must be a number. Got ${t}`));this.nextMessageLength=i}const e=this.buffer.tryReadBody(this.nextMessageLength);if(void 0===e)return void this.setPartialMessageTimer();this.clearPartialMessageTimer(),this.nextMessageLength=-1,this.readSemaphore.lock(async()=>{const t=void 0!==this.options.contentDecoder?await this.options.contentDecoder.decode(e):e,i=await this.options.contentTypeDecoder.decode(t,this.options);this.callback(i)}).catch(e=>{this.fireError(e)})}}catch(e){this.fireError(e)}}clearPartialMessageTimer(){this.partialMessageTimer&&(this.partialMessageTimer.dispose(),this.partialMessageTimer=void 0)}setPartialMessageTimer(){this.clearPartialMessageTimer(),this._partialMessageTimeout<=0||(this.partialMessageTimer=(0,c.default)().timer.setTimeout((e,t)=>{this.partialMessageTimer=void 0,e===this.messageToken&&(this.firePartialMessage({messageToken:e,waitingTime:t}),this.setPartialMessageTimer())},this._partialMessageTimeout,this.messageToken,this._partialMessageTimeout))}}},3193(e,t,i){"use strict";var n,r=this&&this.__createBinding||(Object.create?function(e,t,i,n){void 0===n&&(n=i);var r=Object.getOwnPropertyDescriptor(t,i);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[i]}}),Object.defineProperty(e,n,r)}:function(e,t,i,n){void 0===n&&(n=i),e[n]=t[i]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||(n=function(e){return n=Object.getOwnPropertyNames||function(e){var t=[];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[t.length]=i);return t},n(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i=n(e),s=0;s<i.length;s++)"default"!==i[s]&&r(t,e,i[s]);return o(t,e),t}),a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.WriteableStreamMessageWriter=t.AbstractMessageWriter=t.MessageWriter=void 0;const c=a(i(9590)),l=s(i(8585)),u=i(4323),h=i(2676);var d,p;!function(e){e.is=function(e){const t=e;return t&&l.func(t.dispose)&&l.func(t.onClose)&&l.func(t.onError)&&l.func(t.write)}}(d||(t.MessageWriter=d={}));class f{errorEmitter;closeEmitter;constructor(){this.errorEmitter=new h.Emitter,this.closeEmitter=new h.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(e,t,i){this.errorEmitter.fire([this.asError(e),t,i])}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}asError(e){return e instanceof Error?e:new Error(`Writer received error. Reason: ${l.string(e.message)?e.message:"unknown"}`)}}t.AbstractMessageWriter=f,function(e){e.fromOptions=function(e){return void 0===e||"string"==typeof e?{charset:e??"utf-8",contentTypeEncoder:(0,c.default)().applicationJson.encoder}:{charset:e.charset??"utf-8",contentEncoder:e.contentEncoder,contentTypeEncoder:e.contentTypeEncoder??(0,c.default)().applicationJson.encoder}}}(p||(p={})),t.WriteableStreamMessageWriter=class extends f{writable;options;errorCount;writeSemaphore;constructor(e,t){super(),this.writable=e,this.options=p.fromOptions(t),this.errorCount=0,this.writeSemaphore=new u.Semaphore(1),this.writable.onError(e=>this.fireError(e)),this.writable.onClose(()=>this.fireClose())}async write(e){return this.writeSemaphore.lock(async()=>this.options.contentTypeEncoder.encode(e,this.options).then(e=>void 0!==this.options.contentEncoder?this.options.contentEncoder.encode(e):e).then(t=>{const i=[];return i.push("Content-Length: ",t.byteLength.toString(),"\r\n"),i.push("\r\n"),this.doWrite(e,i,t)},e=>{throw this.fireError(e),e}))}async doWrite(e,t,i){try{return await this.writable.write(t.join(""),"ascii"),this.writable.write(i)}catch(t){return this.handleError(t,e),Promise.reject(t)}}handleError(e,t){this.errorCount++,this.fireError(e,t,this.errorCount)}end(){this.writable.end()}}},6177(e,t,i){"use strict";var n,r=this&&this.__createBinding||(Object.create?function(e,t,i,n){void 0===n&&(n=i);var r=Object.getOwnPropertyDescriptor(t,i);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[i]}}),Object.defineProperty(e,n,r)}:function(e,t,i,n){void 0===n&&(n=i),e[n]=t[i]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||(n=function(e){return n=Object.getOwnPropertyNames||function(e){var t=[];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[t.length]=i);return t},n(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i=n(e),s=0;s<i.length;s++)"default"!==i[s]&&r(t,e,i[s]);return o(t,e),t});Object.defineProperty(t,"__esModule",{value:!0}),t.Message=t.NotificationType9=t.NotificationType8=t.NotificationType7=t.NotificationType6=t.NotificationType5=t.NotificationType4=t.NotificationType3=t.NotificationType2=t.NotificationType1=t.NotificationType0=t.NotificationType=t.RequestType9=t.RequestType8=t.RequestType7=t.RequestType6=t.RequestType5=t.RequestType4=t.RequestType3=t.RequestType2=t.RequestType1=t.RequestType=t.RequestType0=t.AbstractMessageSignature=t.ParameterStructures=t.ResponseError=t.ErrorCodes=void 0;const a=s(i(8585));var c,l;!function(e){e.ParseError=-32700,e.InvalidRequest=-32600,e.MethodNotFound=-32601,e.InvalidParams=-32602,e.InternalError=-32603,e.jsonrpcReservedErrorRangeStart=-32099,e.serverErrorStart=-32099,e.MessageWriteError=-32099,e.MessageReadError=-32098,e.PendingResponseRejected=-32097,e.ConnectionInactive=-32096,e.ServerNotInitialized=-32002,e.UnknownErrorCode=-32001,e.jsonrpcReservedErrorRangeEnd=-32e3,e.serverErrorEnd=-32e3}(c||(t.ErrorCodes=c={}));class u extends Error{code;data;constructor(e,t,i){super(t),this.code=a.number(e)?e:c.UnknownErrorCode,this.data=i,Object.setPrototypeOf(this,u.prototype)}toJson(){const e={code:this.code,message:this.message};return void 0!==this.data&&(e.data=this.data),e}}t.ResponseError=u;class h{kind;static auto=new h("auto");static byPosition=new h("byPosition");static byName=new h("byName");constructor(e){this.kind=e}static is(e){return e===h.auto||e===h.byName||e===h.byPosition}toString(){return this.kind}}t.ParameterStructures=h;class d{method;numberOfParams;constructor(e,t){this.method=e,this.numberOfParams=t}get parameterStructures(){return h.auto}}t.AbstractMessageSignature=d,t.RequestType0=class extends d{_;constructor(e){super(e,0)}},t.RequestType=class extends d{_parameterStructures;_;constructor(e,t=h.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}},t.RequestType1=class extends d{_parameterStructures;_;constructor(e,t=h.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}},t.RequestType2=class extends d{_;constructor(e){super(e,2)}},t.RequestType3=class extends d{_;constructor(e){super(e,3)}},t.RequestType4=class extends d{_;constructor(e){super(e,4)}},t.RequestType5=class extends d{_;constructor(e){super(e,5)}},t.RequestType6=class extends d{_;constructor(e){super(e,6)}},t.RequestType7=class extends d{_;constructor(e){super(e,7)}},t.RequestType8=class extends d{_;constructor(e){super(e,8)}},t.RequestType9=class extends d{_;constructor(e){super(e,9)}},t.NotificationType=class extends d{_parameterStructures;_;constructor(e,t=h.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}},t.NotificationType0=class extends d{_;constructor(e){super(e,0)}},t.NotificationType1=class extends d{_parameterStructures;_;constructor(e,t=h.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}},t.NotificationType2=class extends d{_;constructor(e){super(e,2)}},t.NotificationType3=class extends d{_;constructor(e){super(e,3)}},t.NotificationType4=class extends d{_;constructor(e){super(e,4)}},t.NotificationType5=class extends d{_;constructor(e){super(e,5)}},t.NotificationType6=class extends d{_;constructor(e){super(e,6)}},t.NotificationType7=class extends d{_;constructor(e){super(e,7)}},t.NotificationType8=class extends d{_;constructor(e){super(e,8)}},t.NotificationType9=class extends d{_;constructor(e){super(e,9)}},function(e){e.isRequest=function(e){const t=e;return t&&a.string(t.method)&&(a.string(t.id)||a.number(t.id))},e.isNotification=function(e){const t=e;return t&&a.string(t.method)&&void 0===e.id},e.isResponse=function(e){const t=e;return t&&(void 0!==t.result||!!t.error)&&(a.string(t.id)||a.number(t.id)||null===t.id)}}(l||(t.Message=l={}))},9590(e,t){"use strict";let i;function n(){if(void 0===i)throw new Error("No runtime abstraction layer installed");return i}Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.install=function(e){if(void 0===e)throw new Error("No runtime abstraction layer provided");i=e}}(n||(n={})),t.default=n},4323(e,t,i){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Semaphore=void 0;const r=n(i(9590));t.Semaphore=class{_capacity;_active;_waiting;constructor(e=1){if(e<=0)throw new Error("Capacity must be greater than 0");this._capacity=e,this._active=0,this._waiting=[]}lock(e){return new Promise((t,i)=>{this._waiting.push({thunk:e,resolve:t,reject:i}),this.runNext()})}get active(){return this._active}runNext(){0!==this._waiting.length&&this._active!==this._capacity&&(0,r.default)().timer.setImmediate(()=>this.doRunNext())}doRunNext(){if(0===this._waiting.length||this._active===this._capacity)return;const e=this._waiting.shift();if(this._active++,this._active>this._capacity)throw new Error("Too many thunks active");try{const t=e.thunk();t instanceof Promise?t.then(t=>{this._active--,e.resolve(t),this.runNext()},t=>{this._active--,e.reject(t),this.runNext()}):(this._active--,e.resolve(t),this.runNext())}catch(t){this._active--,e.reject(t),this.runNext()}}}},4996(e,t,i){"use strict";t.SharedArrayReceiverStrategy=t.SharedArraySenderStrategy=void 0;const n=i(9850);var r;!function(e){e.Continue=0,e.Cancelled=1}(r||(r={})),t.SharedArraySenderStrategy=class{buffers;constructor(){this.buffers=new Map}enableCancellation(e){if(null===e.id)return;const t=new SharedArrayBuffer(4);new Int32Array(t,0,1)[0]=r.Continue,this.buffers.set(e.id,t),e.$cancellationData=t}async sendCancellation(e,t){const i=this.buffers.get(t);if(void 0===i)return;const n=new Int32Array(i,0,1);Atomics.store(n,0,r.Cancelled)}cleanup(e){this.buffers.delete(e)}dispose(){this.buffers.clear()}};class o{data;constructor(e){this.data=new Int32Array(e,0,1)}get isCancellationRequested(){return Atomics.load(this.data,0)===r.Cancelled}get onCancellationRequested(){throw new Error("Cancellation over SharedArrayBuffer doesn't support cancellation events")}}class s{token;constructor(e){this.token=new o(e)}cancel(){}dispose(){}}t.SharedArrayReceiverStrategy=class{kind="request";createCancellationTokenSource(e){const t=e.$cancellationData;return void 0===t?new n.CancellationTokenSource:new s(t)}}},7123(e,t,i){"use strict";var n,r=this&&this.__createBinding||(Object.create?function(e,t,i,n){void 0===n&&(n=i);var r=Object.getOwnPropertyDescriptor(t,i);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[i]}}),Object.defineProperty(e,n,r)}:function(e,t,i,n){void 0===n&&(n=i),e[n]=t[i]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||(n=function(e){return n=Object.getOwnPropertyNames||function(e){var t=[];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[t.length]=i);return t},n(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i=n(e),s=0;s<i.length;s++)"default"!==i[s]&&r(t,e,i[s]);return o(t,e),t}),a=this&&this.__exportStar||function(e,t){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(t,i)||r(t,e,i)},c=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.StreamMessageWriter=t.StreamMessageReader=t.SocketMessageWriter=t.SocketMessageReader=t.PortMessageWriter=t.PortMessageReader=t.IPCMessageWriter=t.IPCMessageReader=void 0,t.generateRandomPipeName=function(){if("win32"===process.platform)return`\\\\.\\pipe\\lsp-${(0,p.randomBytes)(16).toString("hex")}-sock`;let e=32;const t=d.realpathSync(S??h.tmpdir()),i=C.get(process.platform);if(void 0!==i&&(e=Math.min(i-t.length-10,e)),e<16)throw new Error(`Unable to generate a random pipe name with ${e} characters.`);const n=(0,p.randomBytes)(Math.floor(e/2)).toString("hex");return u.join(t,`lsp-${n}.sock`)},t.createClientPipeTransport=function(e,t="utf-8"){let i;const n=new Promise((e,t)=>{i=e});return new Promise((r,o)=>{const s=(0,f.createServer)(e=>{s.close(),i([new b(e,t),new w(e,t)])});s.on("error",o),s.listen(e,()=>{s.removeListener("error",o),r({onConnected:()=>n})})})},t.createServerPipeTransport=function(e,t="utf-8"){const i=(0,f.createConnection)(e);return[new b(i,t),new w(i,t)]},t.createClientSocketTransport=function(e,t="utf-8"){let i;const n=new Promise((e,t)=>{i=e});return new Promise((r,o)=>{const s=(0,f.createServer)(e=>{s.close(),i([new b(e,t),new w(e,t)])});s.on("error",o),s.listen(e,"127.0.0.1",()=>{s.removeListener("error",o),r({onConnected:()=>n})})})},t.createServerSocketTransport=function(e,t="utf-8"){const i=(0,f.createConnection)(e,"127.0.0.1");return[new b(i,t),new w(i,t)]},t.createMessageConnection=function(e,t,i,n){i||(i=g.NullLogger);const r=function(e){const t=e;return void 0!==t.read&&void 0!==t.addListener}(e)?new D(e):e,o=function(e){const t=e;return void 0!==t.write&&void 0!==t.addListener}(t)?new T(t):t;return g.ConnectionStrategy.is(n)&&(n={connectionStrategy:n}),(0,g.createMessageConnection)(r,o,i,n)};const l=c(i(9571));l.default.install();const u=s(i(6928)),h=s(i(857)),d=s(i(9896)),p=i(6982),f=i(9278),g=i(3281);a(i(3281),t);class m extends g.AbstractMessageReader{process;constructor(e){super(),this.process=e;const t=this.process;t.on("error",e=>this.fireError(e)),t.on("close",()=>this.fireClose())}listen(e){return this.process.on("message",e),g.Disposable.create(()=>this.process.off("message",e))}}t.IPCMessageReader=m;class y extends g.AbstractMessageWriter{process;errorCount;constructor(e){super(),this.process=e,this.errorCount=0;const t=this.process;t.on("error",e=>this.fireError(e)),t.on("close",()=>this.fireClose)}write(e){try{return"function"==typeof this.process.send&&this.process.send(e,void 0,void 0,t=>{t?(this.errorCount++,this.handleError(t,e)):this.errorCount=0}),Promise.resolve()}catch(t){return this.handleError(t,e),Promise.reject(t)}}handleError(e,t){this.errorCount++,this.fireError(e,t,this.errorCount)}end(){}}t.IPCMessageWriter=y;class v extends g.AbstractMessageReader{onData;constructor(e){super(),this.onData=new g.Emitter,e.on("close",()=>this.fireClose),e.on("error",e=>this.fireError(e)),e.on("message",e=>{this.onData.fire(e)})}listen(e){return this.onData.event(e)}}t.PortMessageReader=v;class _ extends g.AbstractMessageWriter{port;errorCount;constructor(e){super(),this.port=e,this.errorCount=0,e.on("close",()=>this.fireClose()),e.on("error",e=>this.fireError(e))}write(e){try{return this.port.postMessage(e),Promise.resolve()}catch(t){return this.handleError(t,e),Promise.reject(t)}}handleError(e,t){this.errorCount++,this.fireError(e,t,this.errorCount)}end(){}}t.PortMessageWriter=_;class b extends g.ReadableStreamMessageReader{constructor(e,t="utf-8"){super((0,l.default)().stream.asReadableStream(e),t)}}t.SocketMessageReader=b;class w extends g.WriteableStreamMessageWriter{socket;constructor(e,t){super((0,l.default)().stream.asWritableStream(e),t),this.socket=e}dispose(){super.dispose(),this.socket.destroy()}}t.SocketMessageWriter=w;class D extends g.ReadableStreamMessageReader{constructor(e,t){super((0,l.default)().stream.asReadableStream(e),t)}}t.StreamMessageReader=D;class T extends g.WriteableStreamMessageWriter{constructor(e,t){super((0,l.default)().stream.asWritableStream(e),t)}}t.StreamMessageWriter=T;const S=process.env.XDG_RUNTIME_DIR,C=new Map([["linux",107],["darwin",102]])},9571(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(9023),r=i(3281);class o extends r.AbstractMessageBuffer{static emptyBuffer=Buffer.allocUnsafe(0);constructor(e="utf-8"){super(e)}emptyBuffer(){return o.emptyBuffer}fromString(e,t){return Buffer.from(e,t)}toString(e,t){return e instanceof Buffer?e.toString(t):new n.TextDecoder(t).decode(e)}asNative(e,t){return void 0===t?e instanceof Buffer?e:Buffer.from(e):e instanceof Buffer?e.slice(0,t):Buffer.from(e,0,t)}allocNative(e){return Buffer.allocUnsafe(e)}}class s{stream;constructor(e){this.stream=e}onClose(e){return this.stream.on("close",e),r.Disposable.create(()=>this.stream.off("close",e))}onError(e){return this.stream.on("error",e),r.Disposable.create(()=>this.stream.off("error",e))}onEnd(e){return this.stream.on("end",e),r.Disposable.create(()=>this.stream.off("end",e))}onData(e){return this.stream.on("data",e),r.Disposable.create(()=>this.stream.off("data",e))}}class a{stream;constructor(e){this.stream=e}onClose(e){return this.stream.on("close",e),r.Disposable.create(()=>this.stream.off("close",e))}onError(e){return this.stream.on("error",e),r.Disposable.create(()=>this.stream.off("error",e))}onEnd(e){return this.stream.on("end",e),r.Disposable.create(()=>this.stream.off("end",e))}write(e,t){return new Promise((i,n)=>{const r=e=>{null==e?i():n(e)};"string"==typeof e?this.stream.write(e,t,r):this.stream.write(e,r)})}end(){this.stream.end()}}const c=Object.freeze({messageBuffer:Object.freeze({create:e=>new o(e)}),applicationJson:Object.freeze({encoder:Object.freeze({name:"application/json",encode:(e,t)=>{try{return Promise.resolve(Buffer.from(JSON.stringify(e,void 0,0),t.charset))}catch(e){return Promise.reject(e)}}}),decoder:Object.freeze({name:"application/json",decode:(e,t)=>{try{return e instanceof Buffer?Promise.resolve(JSON.parse(e.toString(t.charset))):Promise.resolve(JSON.parse(new n.TextDecoder(t.charset).decode(e)))}catch(e){return Promise.reject(e)}}})}),stream:Object.freeze({asReadableStream:e=>new s(e),asWritableStream:e=>new a(e)}),console,timer:Object.freeze({setTimeout(e,t,...i){const n=setTimeout(e,t,...i);return{dispose:()=>clearTimeout(n)}},setImmediate(e,...t){const i=setImmediate(e,...t);return{dispose:()=>clearImmediate(i)}},setInterval(e,t,...i){const n=setInterval(e,t,...i);return{dispose:()=>clearInterval(n)}}})});function l(){return c}!function(e){e.install=function(){r.RAL.install(c)}}(l||(l={})),t.default=l},8766(e,t,i){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,i,n){void 0===n&&(n=i);var r=Object.getOwnPropertyDescriptor(t,i);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[i]}}),Object.defineProperty(e,n,r)}:function(e,t,i,n){void 0===n&&(n=i),e[n]=t[i]}),r=this&&this.__exportStar||function(e,t){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(t,i)||n(t,e,i)};Object.defineProperty(t,"__esModule",{value:!0}),t.LSPErrorCodes=t.createProtocolConnection=void 0,r(i(3281),t),r(i(6203),t),r(i(372),t),r(i(1560),t);var o,s=i(1580);Object.defineProperty(t,"createProtocolConnection",{enumerable:!0,get:function(){return s.createProtocolConnection}}),function(e){e.lspReservedErrorRangeStart=-32899,e.RequestFailed=-32803,e.ServerCancelled=-32802,e.ContentModified=-32801,e.RequestCancelled=-32800,e.lspReservedErrorRangeEnd=-32800}(o||(t.LSPErrorCodes=o={}))},1580(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createProtocolConnection=function(e,t,i,r){return n.ConnectionStrategy.is(r)&&(r={connectionStrategy:r}),(0,n.createMessageConnection)(e,t,i,r)};const n=i(3281)},372(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CM=t.ProtocolNotificationType=t.ProtocolNotificationType0=t.ProtocolRequestType=t.ProtocolRequestType0=t.RegistrationType=t.MessageDirection=void 0;const n=i(3281);var r,o;!function(e){e.clientToServer="clientToServer",e.serverToClient="serverToClient",e.both="both"}(r||(t.MessageDirection=r={})),t.RegistrationType=class{____;method;constructor(e){this.method=e}};class s extends n.RequestType0{__;___;____;_pr;constructor(e){super(e)}}t.ProtocolRequestType0=s;class a extends n.RequestType{__;___;____;_pr;constructor(e){super(e,n.ParameterStructures.byName)}}t.ProtocolRequestType=a;class c extends n.NotificationType0{___;____;constructor(e){super(e)}}t.ProtocolNotificationType0=c;class l extends n.NotificationType{___;____;constructor(e){super(e,n.ParameterStructures.byName)}}t.ProtocolNotificationType=l,function(e){e.create=function(e,t){return{client:e,server:t}}}(o||(t.CM=o={}))},8765(e,t,i){"use strict";t.CallHierarchyOutgoingCallsRequest=t.CallHierarchyIncomingCallsRequest=t.CallHierarchyPrepareRequest=void 0;const n=i(372);var r,o,s;!function(e){e.method="textDocument/prepareCallHierarchy",e.messageDirection=n.MessageDirection.clientToServer,e.type=new n.ProtocolRequestType(e.method),e.capabilities=n.CM.create("textDocument.callHierarchy","callHierarchyProvider")}(r||(t.CallHierarchyPrepareRequest=r={})),function(e){e.method="callHierarchy/incomingCalls",e.messageDirection=n.MessageDirection.clientToServer,e.type=new n.ProtocolRequestType(e.method),e.capabilities=n.CM.create("textDocument.callHierarchy","callHierarchyProvider")}(o||(t.CallHierarchyIncomingCallsRequest=o={})),function(e){e.method="callHierarchy/outgoingCalls",e.messageDirection=n.MessageDirection.clientToServer,e.type=new n.ProtocolRequestType(e.method),e.capabilities=n.CM.create("textDocument.callHierarchy","callHierarchyProvider")}(s||(t.CallHierarchyOutgoingCallsRequest=s={}))},7672(e,t,i){"use strict";t.ColorPresentationRequest=t.DocumentColorRequest=void 0;const n=i(372);var r,o;!function(e){e.method="textDocument/documentColor",e.messageDirection=n.MessageDirection.clientToServer,e.type=new n.ProtocolRequestType(e.method),e.capabilities=n.CM.create("textDocument.colorProvider","colorProvider")}(r||(t.DocumentColorRequest=r={})),function(e){e.method="textDocument/colorPresentation",e.messageDirection=n.MessageDirection.clientToServer,e.type=new n.ProtocolRequestType(e.method),e.capabilities=n.CM.create("textDocument.colorProvider","colorProvider")}(o||(t.ColorPresentationRequest=o={}))},1660(e,t,i){"use strict";t.ConfigurationRequest=void 0;const n=i(372);var r;!function(e){e.method="workspace/configuration",e.messageDirection=n.MessageDirection.serverToClient,e.type=new n.ProtocolRequestType(e.method),e.capabilities=n.CM.create("workspace.configuration",void 0)}(r||(t.ConfigurationRequest=r={}))},6914(e,t,i){"use strict";t.DeclarationRequest=void 0;const n=i(372);var r;!function(e){e.method="textDocument/declaration",e.messageDirection=n.MessageDirection.clientToServer,e.type=new n.ProtocolRequestType(e.method),e.capabilities=n.CM.create("textDocument.declaration","declarationProvider")}(r||(t.DeclarationRequest=r={}))},6011(e,t,i){"use strict";var n,r=this&&this.__createBinding||(Object.create?function(e,t,i,n){void 0===n&&(n=i);var r=Object.getOwnPropertyDescriptor(t,i);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[i]}}),Object.defineProperty(e,n,r)}:function(e,t,i,n){void 0===n&&(n=i),e[n]=t[i]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||(n=function(e){return n=Object.getOwnPropertyNames||function(e){var t=[];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[t.length]=i);return t},n(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i=n(e),s=0;s<i.length;s++)"default"!==i[s]&&r(t,e,i[s]);return o(t,e),t});Object.defineProperty(t,"__esModule",{value:!0}),t.DiagnosticRefreshRequest=t.WorkspaceDiagnosticRequest=t.DocumentDiagnosticRequest=t.DocumentDiagnosticReportKind=t.DiagnosticServerCancellationData=void 0;const a=i(3281),c=s(i(8598)),l=i(372);var u,h,d,p,f;!function(e){e.is=function(e){const t=e;return t&&c.boolean(t.retriggerRequest)}}(u||(t.DiagnosticServerCancellationData=u={})),function(e){e.Full="full",e.Unchanged="unchanged"}(h||(t.DocumentDiagnosticReportKind=h={})),function(e){e.method="textDocument/diagnostic",e.messageDirection=l.MessageDirection.clientToServer,e.type=new l.ProtocolRequestType(e.method),e.partialResult=new a.ProgressType,e.capabilities=l.CM.create("textDocument.diagnostic","diagnosticProvider")}(d||(t.DocumentDiagnosticRequest=d={})),function(e){e.method="workspace/diagnostic",e.messageDirection=l.MessageDirection.clientToServer,e.type=new l.ProtocolRequestType(e.method),e.partialResult=new a.ProgressType,e.capabilities=l.CM.create("workspace.diagnostics","diagnosticProvider.workspaceDiagnostics")}(p||(t.WorkspaceDiagnosticRequest=p={})),function(e){e.method="workspace/diagnostic/refresh",e.messageDirection=l.MessageDirection.serverToClient,e.type=new l.ProtocolRequestType0(e.method),e.capabilities=l.CM.create("workspace.diagnostics.refreshSupport",void 0)}(f||(t.DiagnosticRefreshRequest=f={}))},9840(e,t,i){"use strict";t.WillDeleteFilesRequest=t.DidDeleteFilesNotification=t.DidRenameFilesNotification=t.WillRenameFilesRequest=t.DidCreateFilesNotification=t.WillCreateFilesRequest=t.FileOperationPatternKind=void 0;const n=i(372);var r,o,s,a,c,l,u;!function(e){e.file="file",e.folder="folder"}(r||(t.FileOperationPatternKind=r={})),function(e){e.method="workspace/willCreateFiles",e.messageDirection=n.MessageDirection.clientToServer,e.type=new n.ProtocolRequestType(e.method),e.capabilities=n.CM.create("workspace.fileOperations.willCreate","workspace.fileOperations.willCreate")}(o||(t.WillCreateFilesRequest=o={})),function(e){e.method="workspace/didCreateFiles",e.messageDirection=n.MessageDirection.clientToServer,e.type=new n.ProtocolNotificationType(e.method),e.capabilities=n.CM.create("workspace.fileOperations.didCreate","workspace.fileOperations.didCreate")}(s||(t.DidCreateFilesNotification=s={})),function(e){e.method="workspace/willRenameFiles",e.messageDirection=n.MessageDirection.clientToServer,e.type=new n.ProtocolRequestType(e.method),e.capabilities=n.CM.create("workspace.fileOperations.willRename","workspace.fileOperations.willRename")}(a||(t.WillRenameFilesRequest=a={})),function(e){e.method="workspace/didRenameFiles",e.messageDirection=n.MessageDirection.clientToServer,e.type=new n.ProtocolNotificationType(e.method),e.capabilities=n.CM.create("workspace.fileOperations.didRename","workspace.fileOperations.didRename")}(c||(t.DidRenameFilesNotification=c={})),function(e){e.method="workspace/didDeleteFiles",e.messageDirection=n.MessageDirection.clientToServer,e.type=new n.ProtocolNotificationType(e.method),e.capabilities=n.CM.create("workspace.fileOperations.didDelete","workspace.fileOperations.didDelete")}(l||(t.DidDeleteFilesNotification=l={})),function(e){e.method="workspace/willDeleteFiles",e.messageDirection=n.MessageDirection.clientToServer,e.type=new n.ProtocolRequestType(e.method),e.capabilities=n.CM.create("workspace.fileOperations.willDelete","workspace.fileOperations.willDelete")}(u||(t.WillDeleteFilesRequest=u={}))},2874(e,t,i){"use strict";t.FoldingRangeRefreshRequest=t.FoldingRangeRequest=void 0;const n=i(372);var r,o;!function(e){e.method="textDocument/foldingRange",e.messageDirection=n.MessageDirection.clientToServer,e.type=new n.ProtocolRequestType(e.method),e.capabilities=n.CM.create("textDocument.foldingRange","foldingRangeProvider")}(r||(t.FoldingRangeRequest=r={})),function(e){e.method="workspace/foldingRange/refresh",e.messageDirection=n.MessageDirection.serverToClient,e.type=new n.ProtocolRequestType0(e.method),e.capabilities=n.CM.create("workspace.foldingRange.refreshSupport",void 0)}(o||(t.FoldingRangeRefreshRequest=o={}))},9574(e,t,i){"use strict";t.ImplementationRequest=void 0;const n=i(372);var r;!function(e){e.method="textDocument/implementation",e.messageDirection=n.MessageDirection.clientToServer,e.type=new n.ProtocolRequestType(e.method),e.capabilities=n.CM.create("textDocument.implementation","implementationProvider")}(r||(t.ImplementationRequest=r={}))},7752(e,t,i){"use strict";t.InlayHintRefreshRequest=t.InlayHintResolveRequest=t.InlayHintRequest=void 0;const n=i(372);var r,o,s;!function(e){e.method="textDocument/inlayHint",e.messageDirection=n.MessageDirection.clientToServer,e.type=new n.ProtocolRequestType(e.method),e.capabilities=n.CM.create("textDocument.inlayHint","inlayHintProvider")}(r||(t.InlayHintRequest=r={})),function(e){e.method="inlayHint/resolve",e.messageDirection=n.MessageDirection.clientToServer,e.type=new n.ProtocolRequestType(e.method),e.capabilities=n.CM.create("textDocument.inlayHint.resolveSupport","inlayHintProvider.resolveProvider")}(o||(t.InlayHintResolveRequest=o={})),function(e){e.method="workspace/inlayHint/refresh",e.messageDirection=n.MessageDirection.serverToClient,e.type=new n.ProtocolRequestType0(e.method),e.capabilities=n.CM.create("workspace.inlayHint.refreshSupport",void 0)}(s||(t.InlayHintRefreshRequest=s={}))},3307(e,t,i){"use strict";t.InlineCompletionRequest=void 0;const n=i(372);var r;!function(e){e.method="textDocument/inlineCompletion",e.messageDirection=n.MessageDirection.clientToServer,e.type=new n.ProtocolRequestType(e.method),e.capabilities=n.CM.create("textDocument.inlineCompletion","inlineCompletionProvider")}(r||(t.InlineCompletionRequest=r={}))},3124(e,t,i){"use strict";t.InlineValueRefreshRequest=t.InlineValueRequest=void 0;const n=i(372);var r,o;!function(e){e.method="textDocument/inlineValue",e.messageDirection=n.MessageDirection.clientToServer,e.type=new n.ProtocolRequestType(e.method),e.capabilities=n.CM.create("textDocument.inlineValue","inlineValueProvider")}(r||(t.InlineValueRequest=r={})),function(e){e.method="workspace/inlineValue/refresh",e.messageDirection=n.MessageDirection.serverToClient,e.type=new n.ProtocolRequestType0(e.method),e.capabilities=n.CM.create("workspace.inlineValue.refreshSupport",void 0)}(o||(t.InlineValueRefreshRequest=o={}))},1560(e,t,i){"use strict";var n,r=this&&this.__createBinding||(Object.create?function(e,t,i,n){void 0===n&&(n=i);var r=Object.getOwnPropertyDescriptor(t,i);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[i]}}),Object.defineProperty(e,n,r)}:function(e,t,i,n){void 0===n&&(n=i),e[n]=t[i]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||(n=function(e){return n=Object.getOwnPropertyNames||function(e){var t=[];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[t.length]=i);return t},n(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i=n(e),s=0;s<i.length;s++)"default"!==i[s]&&r(t,e,i[s]);return o(t,e),t});Object.defineProperty(t,"__esModule",{value:!0}),t.CodeActionRequest=t.DocumentSymbolRequest=t.DocumentHighlightRequest=t.ReferencesRequest=t.DefinitionRequest=t.SignatureHelpRequest=t.SignatureHelpTriggerKind=t.HoverRequest=t.CompletionResolveRequest=t.CompletionRequest=t.CompletionTriggerKind=t.PublishDiagnosticsNotification=t.WatchKind=t.GlobPattern=t.RelativePattern=t.FileChangeType=t.DidChangeWatchedFilesNotification=t.WillSaveTextDocumentWaitUntilRequest=t.WillSaveTextDocumentNotification=t.TextDocumentSaveReason=t.DidSaveTextDocumentNotification=t.DidCloseTextDocumentNotification=t.DidChangeTextDocumentNotification=t.TextDocumentContentChangeEvent=t.DidOpenTextDocumentNotification=t.TextDocumentSyncKind=t.TelemetryEventNotification=t.LogMessageNotification=t.ShowMessageRequest=t.ShowMessageNotification=t.MessageType=t.DidChangeConfigurationNotification=t.ExitNotification=t.ShutdownRequest=t.InitializedNotification=t.InitializeErrorCodes=t.InitializeRequest=t.WorkDoneProgressOptions=t.TextDocumentRegistrationOptions=t.StaticRegistrationOptions=t.PositionEncodingKind=t.RegularExpressionEngineKind=t.FailureHandlingKind=t.ResourceOperationKind=t.UnregistrationRequest=t.RegistrationRequest=t.DocumentSelector=t.NotebookCellTextDocumentFilter=t.NotebookDocumentFilter=t.TextDocumentFilter=void 0,t.UniquenessLevel=t.WillDeleteFilesRequest=t.DidDeleteFilesNotification=t.WillRenameFilesRequest=t.DidRenameFilesNotification=t.WillCreateFilesRequest=t.DidCreateFilesNotification=t.FileOperationPatternKind=t.LinkedEditingRangeRequest=t.ShowDocumentRequest=t.SemanticTokensRegistrationType=t.SemanticTokensRefreshRequest=t.SemanticTokensRangeRequest=t.SemanticTokensDeltaRequest=t.SemanticTokensRequest=t.TokenFormat=t.CallHierarchyPrepareRequest=t.CallHierarchyOutgoingCallsRequest=t.CallHierarchyIncomingCallsRequest=t.WorkDoneProgressCancelNotification=t.WorkDoneProgressCreateRequest=t.WorkDoneProgress=t.SelectionRangeRequest=t.DeclarationRequest=t.FoldingRangeRefreshRequest=t.FoldingRangeRequest=t.ColorPresentationRequest=t.DocumentColorRequest=t.ConfigurationRequest=t.DidChangeWorkspaceFoldersNotification=t.WorkspaceFoldersRequest=t.TypeDefinitionRequest=t.ImplementationRequest=t.ApplyWorkspaceEditRequest=t.ExecuteCommandRequest=t.PrepareRenameRequest=t.RenameRequest=t.PrepareSupportDefaultBehavior=t.DocumentOnTypeFormattingRequest=t.DocumentRangesFormattingRequest=t.DocumentRangeFormattingRequest=t.DocumentFormattingRequest=t.DocumentLinkResolveRequest=t.DocumentLinkRequest=t.CodeLensRefreshRequest=t.CodeLensResolveRequest=t.CodeLensRequest=t.WorkspaceSymbolResolveRequest=t.WorkspaceSymbolRequest=t.CodeActionResolveRequest=void 0,t.TextDocumentContentRefreshRequest=t.TextDocumentContentRequest=t.InlineCompletionRequest=t.DidCloseNotebookDocumentNotification=t.DidSaveNotebookDocumentNotification=t.DidChangeNotebookDocumentNotification=t.NotebookCellArrayChange=t.DidOpenNotebookDocumentNotification=t.NotebookDocumentSyncRegistrationType=t.NotebookDocument=t.NotebookCell=t.ExecutionSummary=t.NotebookCellKind=t.DiagnosticRefreshRequest=t.WorkspaceDiagnosticRequest=t.DocumentDiagnosticRequest=t.DocumentDiagnosticReportKind=t.DiagnosticServerCancellationData=t.InlayHintRefreshRequest=t.InlayHintResolveRequest=t.InlayHintRequest=t.InlineValueRefreshRequest=t.InlineValueRequest=t.TypeHierarchySupertypesRequest=t.TypeHierarchySubtypesRequest=t.TypeHierarchyPrepareRequest=t.MonikerRequest=t.MonikerKind=void 0;const a=i(372),c=i(6203),l=s(i(8598)),u=i(9574);Object.defineProperty(t,"ImplementationRequest",{enumerable:!0,get:function(){return u.ImplementationRequest}});const h=i(8461);Object.defineProperty(t,"TypeDefinitionRequest",{enumerable:!0,get:function(){return h.TypeDefinitionRequest}});const d=i(9935);Object.defineProperty(t,"WorkspaceFoldersRequest",{enumerable:!0,get:function(){return d.WorkspaceFoldersRequest}}),Object.defineProperty(t,"DidChangeWorkspaceFoldersNotification",{enumerable:!0,get:function(){return d.DidChangeWorkspaceFoldersNotification}});const p=i(1660);Object.defineProperty(t,"ConfigurationRequest",{enumerable:!0,get:function(){return p.ConfigurationRequest}});const f=i(7672);Object.defineProperty(t,"DocumentColorRequest",{enumerable:!0,get:function(){return f.DocumentColorRequest}}),Object.defineProperty(t,"ColorPresentationRequest",{enumerable:!0,get:function(){return f.ColorPresentationRequest}});const g=i(2874);Object.defineProperty(t,"FoldingRangeRequest",{enumerable:!0,get:function(){return g.FoldingRangeRequest}}),Object.defineProperty(t,"FoldingRangeRefreshRequest",{enumerable:!0,get:function(){return g.FoldingRangeRefreshRequest}});const m=i(6914);Object.defineProperty(t,"DeclarationRequest",{enumerable:!0,get:function(){return m.DeclarationRequest}});const y=i(3487);Object.defineProperty(t,"SelectionRangeRequest",{enumerable:!0,get:function(){return y.SelectionRangeRequest}});const v=i(2687);Object.defineProperty(t,"WorkDoneProgress",{enumerable:!0,get:function(){return v.WorkDoneProgress}}),Object.defineProperty(t,"WorkDoneProgressCreateRequest",{enumerable:!0,get:function(){return v.WorkDoneProgressCreateRequest}}),Object.defineProperty(t,"WorkDoneProgressCancelNotification",{enumerable:!0,get:function(){return v.WorkDoneProgressCancelNotification}});const _=i(8765);Object.defineProperty(t,"CallHierarchyIncomingCallsRequest",{enumerable:!0,get:function(){return _.CallHierarchyIncomingCallsRequest}}),Object.defineProperty(t,"CallHierarchyOutgoingCallsRequest",{enumerable:!0,get:function(){return _.CallHierarchyOutgoingCallsRequest}}),Object.defineProperty(t,"CallHierarchyPrepareRequest",{enumerable:!0,get:function(){return _.CallHierarchyPrepareRequest}});const b=i(2478);Object.defineProperty(t,"TokenFormat",{enumerable:!0,get:function(){return b.TokenFormat}}),Object.defineProperty(t,"SemanticTokensRequest",{enumerable:!0,get:function(){return b.SemanticTokensRequest}}),Object.defineProperty(t,"SemanticTokensDeltaRequest",{enumerable:!0,get:function(){return b.SemanticTokensDeltaRequest}}),Object.defineProperty(t,"SemanticTokensRangeRequest",{enumerable:!0,get:function(){return b.SemanticTokensRangeRequest}}),Object.defineProperty(t,"SemanticTokensRefreshRequest",{enumerable:!0,get:function(){return b.SemanticTokensRefreshRequest}}),Object.defineProperty(t,"SemanticTokensRegistrationType",{enumerable:!0,get:function(){return b.SemanticTokensRegistrationType}});const w=i(908);Object.defineProperty(t,"ShowDocumentRequest",{enumerable:!0,get:function(){return w.ShowDocumentRequest}});const D=i(5316);Object.defineProperty(t,"LinkedEditingRangeRequest",{enumerable:!0,get:function(){return D.LinkedEditingRangeRequest}});const T=i(9840);Object.defineProperty(t,"FileOperationPatternKind",{enumerable:!0,get:function(){return T.FileOperationPatternKind}}),Object.defineProperty(t,"DidCreateFilesNotification",{enumerable:!0,get:function(){return T.DidCreateFilesNotification}}),Object.defineProperty(t,"WillCreateFilesRequest",{enumerable:!0,get:function(){return T.WillCreateFilesRequest}}),Object.defineProperty(t,"DidRenameFilesNotification",{enumerable:!0,get:function(){return T.DidRenameFilesNotification}}),Object.defineProperty(t,"WillRenameFilesRequest",{enumerable:!0,get:function(){return T.WillRenameFilesRequest}}),Object.defineProperty(t,"DidDeleteFilesNotification",{enumerable:!0,get:function(){return T.DidDeleteFilesNotification}}),Object.defineProperty(t,"WillDeleteFilesRequest",{enumerable:!0,get:function(){return T.WillDeleteFilesRequest}});const S=i(9047);Object.defineProperty(t,"UniquenessLevel",{enumerable:!0,get:function(){return S.UniquenessLevel}}),Object.defineProperty(t,"MonikerKind",{enumerable:!0,get:function(){return S.MonikerKind}}),Object.defineProperty(t,"MonikerRequest",{enumerable:!0,get:function(){return S.MonikerRequest}});const C=i(645);Object.defineProperty(t,"TypeHierarchyPrepareRequest",{enumerable:!0,get:function(){return C.TypeHierarchyPrepareRequest}}),Object.defineProperty(t,"TypeHierarchySubtypesRequest",{enumerable:!0,get:function(){return C.TypeHierarchySubtypesRequest}}),Object.defineProperty(t,"TypeHierarchySupertypesRequest",{enumerable:!0,get:function(){return C.TypeHierarchySupertypesRequest}});const R=i(3124);Object.defineProperty(t,"InlineValueRequest",{enumerable:!0,get:function(){return R.InlineValueRequest}}),Object.defineProperty(t,"InlineValueRefreshRequest",{enumerable:!0,get:function(){return R.InlineValueRefreshRequest}});const E=i(7752);Object.defineProperty(t,"InlayHintRequest",{enumerable:!0,get:function(){return E.InlayHintRequest}}),Object.defineProperty(t,"InlayHintResolveRequest",{enumerable:!0,get:function(){return E.InlayHintResolveRequest}}),Object.defineProperty(t,"InlayHintRefreshRequest",{enumerable:!0,get:function(){return E.InlayHintRefreshRequest}});const P=i(6011);Object.defineProperty(t,"DiagnosticServerCancellationData",{enumerable:!0,get:function(){return P.DiagnosticServerCancellationData}}),Object.defineProperty(t,"DocumentDiagnosticReportKind",{enumerable:!0,get:function(){return P.DocumentDiagnosticReportKind}}),Object.defineProperty(t,"DocumentDiagnosticRequest",{enumerable:!0,get:function(){return P.DocumentDiagnosticRequest}}),Object.defineProperty(t,"WorkspaceDiagnosticRequest",{enumerable:!0,get:function(){return P.WorkspaceDiagnosticRequest}}),Object.defineProperty(t,"DiagnosticRefreshRequest",{enumerable:!0,get:function(){return P.DiagnosticRefreshRequest}});const x=i(3557);Object.defineProperty(t,"NotebookCellKind",{enumerable:!0,get:function(){return x.NotebookCellKind}}),Object.defineProperty(t,"ExecutionSummary",{enumerable:!0,get:function(){return x.ExecutionSummary}}),Object.defineProperty(t,"NotebookCell",{enumerable:!0,get:function(){return x.NotebookCell}}),Object.defineProperty(t,"NotebookDocument",{enumerable:!0,get:function(){return x.NotebookDocument}}),Object.defineProperty(t,"NotebookDocumentSyncRegistrationType",{enumerable:!0,get:function(){return x.NotebookDocumentSyncRegistrationType}}),Object.defineProperty(t,"DidOpenNotebookDocumentNotification",{enumerable:!0,get:function(){return x.DidOpenNotebookDocumentNotification}}),Object.defineProperty(t,"NotebookCellArrayChange",{enumerable:!0,get:function(){return x.NotebookCellArrayChange}}),Object.defineProperty(t,"DidChangeNotebookDocumentNotification",{enumerable:!0,get:function(){return x.DidChangeNotebookDocumentNotification}}),Object.defineProperty(t,"DidSaveNotebookDocumentNotification",{enumerable:!0,get:function(){return x.DidSaveNotebookDocumentNotification}}),Object.defineProperty(t,"DidCloseNotebookDocumentNotification",{enumerable:!0,get:function(){return x.DidCloseNotebookDocumentNotification}});const O=i(3307);Object.defineProperty(t,"InlineCompletionRequest",{enumerable:!0,get:function(){return O.InlineCompletionRequest}});const k=i(4289);var N,A,M,I,q,j,F,L,W,U,B,$,z,H,G,V,K,Y,X,J,Q,Z,ee,te,ie,ne,re,oe,se,ae,ce,le,ue,he,de,pe,fe,ge,me,ye,ve,_e,be,we,De,Te,Se,Ce,Re,Ee,Pe,xe,Oe,ke,Ne,Ae,Me,Ie,qe,je,Fe,Le,We,Ue,Be,$e,ze;Object.defineProperty(t,"TextDocumentContentRequest",{enumerable:!0,get:function(){return k.TextDocumentContentRequest}}),Object.defineProperty(t,"TextDocumentContentRefreshRequest",{enumerable:!0,get:function(){return k.TextDocumentContentRefreshRequest}}),function(e){e.is=function(e){const t=e;return l.string(t)||l.string(t.language)||l.string(t.scheme)||fe.is(t.pattern)}}(N||(t.TextDocumentFilter=N={})),function(e){e.is=function(e){const t=e;return l.objectLiteral(t)&&(l.string(t.notebookType)||l.string(t.scheme)||l.string(t.pattern))}}(A||(t.NotebookDocumentFilter=A={})),function(e){e.is=function(e){const t=e;return l.objectLiteral(t)&&(l.string(t.notebook)||A.is(t.notebook))&&(void 0===t.language||l.string(t.language))}}(M||(t.NotebookCellTextDocumentFilter=M={})),function(e){e.is=function(e){if(!Array.isArray(e))return!1;for(const t of e)if(!l.string(t)&&!N.is(t)&&!M.is(t))return!1;return!0}}(I||(t.DocumentSelector=I={})),function(e){e.method="client/registerCapability",e.messageDirection=a.MessageDirection.serverToClient,e.type=new a.ProtocolRequestType(e.method)}(q||(t.RegistrationRequest=q={})),function(e){e.method="client/unregisterCapability",e.messageDirection=a.MessageDirection.serverToClient,e.type=new a.ProtocolRequestType(e.method)}(j||(t.UnregistrationRequest=j={})),function(e){e.Create="create",e.Rename="rename",e.Delete="delete"}(F||(t.ResourceOperationKind=F={})),function(e){e.Abort="abort",e.Transactional="transactional",e.TextOnlyTransactional="textOnlyTransactional",e.Undo="undo"}(L||(t.FailureHandlingKind=L={})),function(e){e.ES2020="ES2020"}(W||(t.RegularExpressionEngineKind=W={})),function(e){e.UTF8="utf-8",e.UTF16="utf-16",e.UTF32="utf-32"}(U||(t.PositionEncodingKind=U={})),function(e){e.hasId=function(e){const t=e;return t&&l.string(t.id)&&t.id.length>0}}(B||(t.StaticRegistrationOptions=B={})),function(e){e.is=function(e){const t=e;return t&&(null===t.documentSelector||I.is(t.documentSelector))}}($||(t.TextDocumentRegistrationOptions=$={})),function(e){e.is=function(e){const t=e;return l.objectLiteral(t)&&(void 0===t.workDoneProgress||l.boolean(t.workDoneProgress))},e.hasWorkDoneProgress=function(e){const t=e;return t&&l.boolean(t.workDoneProgress)}}(z||(t.WorkDoneProgressOptions=z={})),function(e){e.method="initialize",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolRequestType(e.method)}(H||(t.InitializeRequest=H={})),function(e){e.unknownProtocolVersion=1}(G||(t.InitializeErrorCodes=G={})),function(e){e.method="initialized",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolNotificationType(e.method)}(V||(t.InitializedNotification=V={})),function(e){e.method="shutdown",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolRequestType0(e.method)}(K||(t.ShutdownRequest=K={})),function(e){e.method="exit",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolNotificationType0(e.method)}(Y||(t.ExitNotification=Y={})),function(e){e.method="workspace/didChangeConfiguration",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolNotificationType(e.method),e.capabilities=a.CM.create("workspace.didChangeConfiguration",void 0)}(X||(t.DidChangeConfigurationNotification=X={})),function(e){e.Error=1,e.Warning=2,e.Info=3,e.Log=4,e.Debug=5}(J||(t.MessageType=J={})),function(e){e.method="window/showMessage",e.messageDirection=a.MessageDirection.serverToClient,e.type=new a.ProtocolNotificationType(e.method),e.capabilities=a.CM.create("window.showMessage",void 0)}(Q||(t.ShowMessageNotification=Q={})),function(e){e.method="window/showMessageRequest",e.messageDirection=a.MessageDirection.serverToClient,e.type=new a.ProtocolRequestType(e.method),e.capabilities=a.CM.create("window.showMessage",void 0)}(Z||(t.ShowMessageRequest=Z={})),function(e){e.method="window/logMessage",e.messageDirection=a.MessageDirection.serverToClient,e.type=new a.ProtocolNotificationType(e.method)}(ee||(t.LogMessageNotification=ee={})),function(e){e.method="telemetry/event",e.messageDirection=a.MessageDirection.serverToClient,e.type=new a.ProtocolNotificationType(e.method)}(te||(t.TelemetryEventNotification=te={})),function(e){e.None=0,e.Full=1,e.Incremental=2}(ie||(t.TextDocumentSyncKind=ie={})),function(e){e.method="textDocument/didOpen",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolNotificationType(e.method),e.capabilities=a.CM.create("textDocument.synchronization","textDocumentSync.openClose")}(ne||(t.DidOpenTextDocumentNotification=ne={})),function(e){e.isIncremental=function(e){const t=e;return null!=t&&"string"==typeof t.text&&void 0!==t.range&&(void 0===t.rangeLength||"number"==typeof t.rangeLength)},e.isFull=function(e){const t=e;return null!=t&&"string"==typeof t.text&&void 0===t.range&&void 0===t.rangeLength}}(re||(t.TextDocumentContentChangeEvent=re={})),function(e){e.method="textDocument/didChange",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolNotificationType(e.method),e.capabilities=a.CM.create("textDocument.synchronization","textDocumentSync")}(oe||(t.DidChangeTextDocumentNotification=oe={})),function(e){e.method="textDocument/didClose",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolNotificationType(e.method),e.capabilities=a.CM.create("textDocument.synchronization","textDocumentSync.openClose")}(se||(t.DidCloseTextDocumentNotification=se={})),function(e){e.method="textDocument/didSave",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolNotificationType(e.method),e.capabilities=a.CM.create("textDocument.synchronization.didSave","textDocumentSync.save")}(ae||(t.DidSaveTextDocumentNotification=ae={})),function(e){e.Manual=1,e.AfterDelay=2,e.FocusOut=3}(ce||(t.TextDocumentSaveReason=ce={})),function(e){e.method="textDocument/willSave",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolNotificationType(e.method),e.capabilities=a.CM.create("textDocument.synchronization.willSave","textDocumentSync.willSave")}(le||(t.WillSaveTextDocumentNotification=le={})),function(e){e.method="textDocument/willSaveWaitUntil",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolRequestType(e.method),e.capabilities=a.CM.create("textDocument.synchronization.willSaveWaitUntil","textDocumentSync.willSaveWaitUntil")}(ue||(t.WillSaveTextDocumentWaitUntilRequest=ue={})),function(e){e.method="workspace/didChangeWatchedFiles",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolNotificationType(e.method),e.capabilities=a.CM.create("workspace.didChangeWatchedFiles",void 0)}(he||(t.DidChangeWatchedFilesNotification=he={})),function(e){e.Created=1,e.Changed=2,e.Deleted=3}(de||(t.FileChangeType=de={})),function(e){e.is=function(e){const t=e;return l.objectLiteral(t)&&(c.URI.is(t.baseUri)||c.WorkspaceFolder.is(t.baseUri))&&l.string(t.pattern)}}(pe||(t.RelativePattern=pe={})),function(e){e.is=function(e){const t=e;return l.string(t)||pe.is(t)}}(fe||(t.GlobPattern=fe={})),function(e){e.Create=1,e.Change=2,e.Delete=4}(ge||(t.WatchKind=ge={})),function(e){e.method="textDocument/publishDiagnostics",e.messageDirection=a.MessageDirection.serverToClient,e.type=new a.ProtocolNotificationType(e.method),e.capabilities=a.CM.create("textDocument.publishDiagnostics",void 0)}(me||(t.PublishDiagnosticsNotification=me={})),function(e){e.Invoked=1,e.TriggerCharacter=2,e.TriggerForIncompleteCompletions=3}(ye||(t.CompletionTriggerKind=ye={})),function(e){e.method="textDocument/completion",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolRequestType(e.method),e.capabilities=a.CM.create("textDocument.completion","completionProvider")}(ve||(t.CompletionRequest=ve={})),function(e){e.method="completionItem/resolve",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolRequestType(e.method),e.capabilities=a.CM.create("textDocument.completion.completionItem.resolveSupport","completionProvider.resolveProvider")}(_e||(t.CompletionResolveRequest=_e={})),function(e){e.method="textDocument/hover",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolRequestType(e.method),e.capabilities=a.CM.create("textDocument.hover","hoverProvider")}(be||(t.HoverRequest=be={})),function(e){e.Invoked=1,e.TriggerCharacter=2,e.ContentChange=3}(we||(t.SignatureHelpTriggerKind=we={})),function(e){e.method="textDocument/signatureHelp",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolRequestType(e.method),e.capabilities=a.CM.create("textDocument.signatureHelp","signatureHelpProvider")}(De||(t.SignatureHelpRequest=De={})),function(e){e.method="textDocument/definition",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolRequestType(e.method),e.capabilities=a.CM.create("textDocument.definition","definitionProvider")}(Te||(t.DefinitionRequest=Te={})),function(e){e.method="textDocument/references",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolRequestType(e.method),e.capabilities=a.CM.create("textDocument.references","referencesProvider")}(Se||(t.ReferencesRequest=Se={})),function(e){e.method="textDocument/documentHighlight",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolRequestType(e.method),e.capabilities=a.CM.create("textDocument.documentHighlight","documentHighlightProvider")}(Ce||(t.DocumentHighlightRequest=Ce={})),function(e){e.method="textDocument/documentSymbol",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolRequestType(e.method),e.capabilities=a.CM.create("textDocument.documentSymbol","documentSymbolProvider")}(Re||(t.DocumentSymbolRequest=Re={})),function(e){e.method="textDocument/codeAction",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolRequestType(e.method),e.capabilities=a.CM.create("textDocument.codeAction","codeActionProvider")}(Ee||(t.CodeActionRequest=Ee={})),function(e){e.method="codeAction/resolve",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolRequestType(e.method),e.capabilities=a.CM.create("textDocument.codeAction.resolveSupport","codeActionProvider.resolveProvider")}(Pe||(t.CodeActionResolveRequest=Pe={})),function(e){e.method="workspace/symbol",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolRequestType(e.method),e.capabilities=a.CM.create("workspace.symbol","workspaceSymbolProvider")}(xe||(t.WorkspaceSymbolRequest=xe={})),function(e){e.method="workspaceSymbol/resolve",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolRequestType(e.method),e.capabilities=a.CM.create("workspace.symbol.resolveSupport","workspaceSymbolProvider.resolveProvider")}(Oe||(t.WorkspaceSymbolResolveRequest=Oe={})),function(e){e.method="textDocument/codeLens",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolRequestType(e.method),e.capabilities=a.CM.create("textDocument.codeLens","codeLensProvider")}(ke||(t.CodeLensRequest=ke={})),function(e){e.method="codeLens/resolve",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolRequestType(e.method),e.capabilities=a.CM.create("textDocument.codeLens.resolveSupport","codeLensProvider.resolveProvider")}(Ne||(t.CodeLensResolveRequest=Ne={})),function(e){e.method="workspace/codeLens/refresh",e.messageDirection=a.MessageDirection.serverToClient,e.type=new a.ProtocolRequestType0(e.method),e.capabilities=a.CM.create("workspace.codeLens",void 0)}(Ae||(t.CodeLensRefreshRequest=Ae={})),function(e){e.method="textDocument/documentLink",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolRequestType(e.method),e.capabilities=a.CM.create("textDocument.documentLink","documentLinkProvider")}(Me||(t.DocumentLinkRequest=Me={})),function(e){e.method="documentLink/resolve",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolRequestType(e.method),e.capabilities=a.CM.create("textDocument.documentLink","documentLinkProvider.resolveProvider")}(Ie||(t.DocumentLinkResolveRequest=Ie={})),function(e){e.method="textDocument/formatting",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolRequestType(e.method),e.capabilities=a.CM.create("textDocument.formatting","documentFormattingProvider")}(qe||(t.DocumentFormattingRequest=qe={})),function(e){e.method="textDocument/rangeFormatting",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolRequestType(e.method),e.capabilities=a.CM.create("textDocument.rangeFormatting","documentRangeFormattingProvider")}(je||(t.DocumentRangeFormattingRequest=je={})),function(e){e.method="textDocument/rangesFormatting",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolRequestType(e.method),e.capabilities=a.CM.create("textDocument.rangeFormatting.rangesSupport","documentRangeFormattingProvider.rangesSupport")}(Fe||(t.DocumentRangesFormattingRequest=Fe={})),function(e){e.method="textDocument/onTypeFormatting",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolRequestType(e.method),e.capabilities=a.CM.create("textDocument.onTypeFormatting","documentOnTypeFormattingProvider")}(Le||(t.DocumentOnTypeFormattingRequest=Le={})),function(e){e.Identifier=1}(We||(t.PrepareSupportDefaultBehavior=We={})),function(e){e.method="textDocument/rename",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolRequestType(e.method),e.capabilities=a.CM.create("textDocument.rename","renameProvider")}(Ue||(t.RenameRequest=Ue={})),function(e){e.method="textDocument/prepareRename",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolRequestType(e.method),e.capabilities=a.CM.create("textDocument.rename.prepareSupport","renameProvider.prepareProvider")}(Be||(t.PrepareRenameRequest=Be={})),function(e){e.method="workspace/executeCommand",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolRequestType(e.method),e.capabilities=a.CM.create("workspace.executeCommand","executeCommandProvider")}($e||(t.ExecuteCommandRequest=$e={})),function(e){e.method="workspace/applyEdit",e.messageDirection=a.MessageDirection.serverToClient,e.type=new a.ProtocolRequestType("workspace/applyEdit"),e.capabilities=a.CM.create("workspace.applyEdit",void 0)}(ze||(t.ApplyWorkspaceEditRequest=ze={}))},5316(e,t,i){"use strict";t.LinkedEditingRangeRequest=void 0;const n=i(372);var r;!function(e){e.method="textDocument/linkedEditingRange",e.messageDirection=n.MessageDirection.clientToServer,e.type=new n.ProtocolRequestType(e.method),e.capabilities=n.CM.create("textDocument.linkedEditingRange","linkedEditingRangeProvider")}(r||(t.LinkedEditingRangeRequest=r={}))},9047(e,t,i){"use strict";t.MonikerRequest=t.MonikerKind=t.UniquenessLevel=void 0;const n=i(372);var r,o,s;!function(e){e.document="document",e.project="project",e.group="group",e.scheme="scheme",e.global="global"}(r||(t.UniquenessLevel=r={})),function(e){e.$import="import",e.$export="export",e.local="local"}(o||(t.MonikerKind=o={})),function(e){e.method="textDocument/moniker",e.messageDirection=n.MessageDirection.clientToServer,e.type=new n.ProtocolRequestType(e.method),e.capabilities=n.CM.create("textDocument.moniker","monikerProvider")}(s||(t.MonikerRequest=s={}))},3557(e,t,i){"use strict";var n,r=this&&this.__createBinding||(Object.create?function(e,t,i,n){void 0===n&&(n=i);var r=Object.getOwnPropertyDescriptor(t,i);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[i]}}),Object.defineProperty(e,n,r)}:function(e,t,i,n){void 0===n&&(n=i),e[n]=t[i]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||(n=function(e){return n=Object.getOwnPropertyNames||function(e){var t=[];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[t.length]=i);return t},n(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i=n(e),s=0;s<i.length;s++)"default"!==i[s]&&r(t,e,i[s]);return o(t,e),t});Object.defineProperty(t,"__esModule",{value:!0}),t.DidCloseNotebookDocumentNotification=t.DidSaveNotebookDocumentNotification=t.DidChangeNotebookDocumentNotification=t.NotebookCellArrayChange=t.DidOpenNotebookDocumentNotification=t.NotebookDocumentSyncRegistrationType=t.NotebookDocument=t.NotebookCell=t.ExecutionSummary=t.NotebookCellKind=void 0;const a=i(6203),c=s(i(8598)),l=i(372);var u,h,d,p,f,g,m,y,v,_;!function(e){e.Markup=1,e.Code=2,e.is=function(e){return 1===e||2===e}}(u||(t.NotebookCellKind=u={})),function(e){e.create=function(e,t){const i={executionOrder:e};return!0!==t&&!1!==t||(i.success=t),i},e.is=function(e){const t=e;return c.objectLiteral(t)&&a.uinteger.is(t.executionOrder)&&(void 0===t.success||c.boolean(t.success))},e.equals=function(e,t){return e===t||null!=e&&null!=t&&e.executionOrder===t.executionOrder&&e.success===t.success}}(h||(t.ExecutionSummary=h={})),function(e){function t(e,i){if(e===i)return!0;if(null==e||null==i)return!1;if(typeof e!=typeof i)return!1;if("object"!=typeof e)return!1;const n=Array.isArray(e),r=Array.isArray(i);if(n!==r)return!1;if(n&&r){if(e.length!==i.length)return!1;for(let n=0;n<e.length;n++)if(!t(e[n],i[n]))return!1}if(c.objectLiteral(e)&&c.objectLiteral(i)){const n=Object.keys(e),r=Object.keys(i);if(n.length!==r.length)return!1;if(n.sort(),r.sort(),!t(n,r))return!1;for(let r=0;r<n.length;r++){const o=n[r];if(!t(e[o],i[o]))return!1}}return!0}e.create=function(e,t){return{kind:e,document:t}},e.is=function(e){const t=e;return c.objectLiteral(t)&&u.is(t.kind)&&a.DocumentUri.is(t.document)&&(void 0===t.metadata||c.objectLiteral(t.metadata))},e.diff=function(e,i){const n=new Set;return e.document!==i.document&&n.add("document"),e.kind!==i.kind&&n.add("kind"),e.executionSummary!==i.executionSummary&&n.add("executionSummary"),void 0===e.metadata&&void 0===i.metadata||t(e.metadata,i.metadata)||n.add("metadata"),void 0===e.executionSummary&&void 0===i.executionSummary||h.equals(e.executionSummary,i.executionSummary)||n.add("executionSummary"),n}}(d||(t.NotebookCell=d={})),function(e){e.create=function(e,t,i,n){return{uri:e,notebookType:t,version:i,cells:n}},e.is=function(e){const t=e;return c.objectLiteral(t)&&c.string(t.uri)&&a.integer.is(t.version)&&c.typedArray(t.cells,d.is)}}(p||(t.NotebookDocument=p={})),function(e){e.method="notebookDocument/sync",e.messageDirection=l.MessageDirection.clientToServer,e.type=new l.RegistrationType(e.method)}(f||(t.NotebookDocumentSyncRegistrationType=f={})),function(e){e.method="notebookDocument/didOpen",e.messageDirection=l.MessageDirection.clientToServer,e.type=new l.ProtocolNotificationType(e.method),e.registrationMethod=f.method}(g||(t.DidOpenNotebookDocumentNotification=g={})),function(e){e.is=function(e){const t=e;return c.objectLiteral(t)&&a.uinteger.is(t.start)&&a.uinteger.is(t.deleteCount)&&(void 0===t.cells||c.typedArray(t.cells,d.is))},e.create=function(e,t,i){const n={start:e,deleteCount:t};return void 0!==i&&(n.cells=i),n}}(m||(t.NotebookCellArrayChange=m={})),function(e){e.method="notebookDocument/didChange",e.messageDirection=l.MessageDirection.clientToServer,e.type=new l.ProtocolNotificationType(e.method),e.registrationMethod=f.method}(y||(t.DidChangeNotebookDocumentNotification=y={})),function(e){e.method="notebookDocument/didSave",e.messageDirection=l.MessageDirection.clientToServer,e.type=new l.ProtocolNotificationType(e.method),e.registrationMethod=f.method}(v||(t.DidSaveNotebookDocumentNotification=v={})),function(e){e.method="notebookDocument/didClose",e.messageDirection=l.MessageDirection.clientToServer,e.type=new l.ProtocolNotificationType(e.method),e.registrationMethod=f.method}(_||(t.DidCloseNotebookDocumentNotification=_={}))},2687(e,t,i){"use strict";t.WorkDoneProgressCancelNotification=t.WorkDoneProgressCreateRequest=t.WorkDoneProgress=void 0;const n=i(3281),r=i(372);var o,s,a;!function(e){e.type=new n.ProgressType,e.is=function(t){return t===e.type}}(o||(t.WorkDoneProgress=o={})),function(e){e.method="window/workDoneProgress/create",e.messageDirection=r.MessageDirection.serverToClient,e.type=new r.ProtocolRequestType(e.method),e.capabilities=r.CM.create("window.workDoneProgress",void 0)}(s||(t.WorkDoneProgressCreateRequest=s={})),function(e){e.method="window/workDoneProgress/cancel",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolNotificationType(e.method)}(a||(t.WorkDoneProgressCancelNotification=a={}))},3487(e,t,i){"use strict";t.SelectionRangeRequest=void 0;const n=i(372);var r;!function(e){e.method="textDocument/selectionRange",e.messageDirection=n.MessageDirection.clientToServer,e.type=new n.ProtocolRequestType(e.method),e.capabilities=n.CM.create("textDocument.selectionRange","selectionRangeProvider")}(r||(t.SelectionRangeRequest=r={}))},2478(e,t,i){"use strict";t.SemanticTokensRefreshRequest=t.SemanticTokensRangeRequest=t.SemanticTokensDeltaRequest=t.SemanticTokensRequest=t.SemanticTokensRegistrationType=t.TokenFormat=void 0;const n=i(372);var r,o,s,a,c,l;!function(e){e.Relative="relative"}(r||(t.TokenFormat=r={})),function(e){e.method="textDocument/semanticTokens",e.type=new n.RegistrationType(e.method)}(o||(t.SemanticTokensRegistrationType=o={})),function(e){e.method="textDocument/semanticTokens/full",e.messageDirection=n.MessageDirection.clientToServer,e.type=new n.ProtocolRequestType(e.method),e.registrationMethod=o.method,e.capabilities=n.CM.create("textDocument.semanticTokens","semanticTokensProvider")}(s||(t.SemanticTokensRequest=s={})),function(e){e.method="textDocument/semanticTokens/full/delta",e.messageDirection=n.MessageDirection.clientToServer,e.type=new n.ProtocolRequestType(e.method),e.registrationMethod=o.method,e.capabilities=n.CM.create("textDocument.semanticTokens.requests.full.delta","semanticTokensProvider.full.delta")}(a||(t.SemanticTokensDeltaRequest=a={})),function(e){e.method="textDocument/semanticTokens/range",e.messageDirection=n.MessageDirection.clientToServer,e.type=new n.ProtocolRequestType(e.method),e.registrationMethod=o.method,e.capabilities=n.CM.create("textDocument.semanticTokens.requests.range","semanticTokensProvider.range")}(c||(t.SemanticTokensRangeRequest=c={})),function(e){e.method="workspace/semanticTokens/refresh",e.messageDirection=n.MessageDirection.serverToClient,e.type=new n.ProtocolRequestType0(e.method),e.capabilities=n.CM.create("workspace.semanticTokens.refreshSupport",void 0)}(l||(t.SemanticTokensRefreshRequest=l={}))},908(e,t,i){"use strict";t.ShowDocumentRequest=void 0;const n=i(372);var r;!function(e){e.method="window/showDocument",e.messageDirection=n.MessageDirection.serverToClient,e.type=new n.ProtocolRequestType(e.method),e.capabilities=n.CM.create("window.showDocument.support",void 0)}(r||(t.ShowDocumentRequest=r={}))},4289(e,t,i){"use strict";t.TextDocumentContentRefreshRequest=t.TextDocumentContentRequest=void 0;const n=i(372);var r,o;!function(e){e.method="workspace/textDocumentContent",e.messageDirection=n.MessageDirection.clientToServer,e.type=new n.ProtocolRequestType(e.method),e.capabilities=n.CM.create("workspace.textDocumentContent","workspace.textDocumentContent")}(r||(t.TextDocumentContentRequest=r={})),function(e){e.method="workspace/textDocumentContent/refresh",e.messageDirection=n.MessageDirection.serverToClient,e.type=new n.ProtocolRequestType(e.method)}(o||(t.TextDocumentContentRefreshRequest=o={}))},8461(e,t,i){"use strict";t.TypeDefinitionRequest=void 0;const n=i(372);var r;!function(e){e.method="textDocument/typeDefinition",e.messageDirection=n.MessageDirection.clientToServer,e.type=new n.ProtocolRequestType(e.method),e.capabilities=n.CM.create("textDocument.typeDefinition","typeDefinitionProvider")}(r||(t.TypeDefinitionRequest=r={}))},645(e,t,i){"use strict";t.TypeHierarchySubtypesRequest=t.TypeHierarchySupertypesRequest=t.TypeHierarchyPrepareRequest=void 0;const n=i(372);var r,o,s;!function(e){e.method="textDocument/prepareTypeHierarchy",e.messageDirection=n.MessageDirection.clientToServer,e.type=new n.ProtocolRequestType(e.method),e.capabilities=n.CM.create("textDocument.typeHierarchy","typeHierarchyProvider")}(r||(t.TypeHierarchyPrepareRequest=r={})),function(e){e.method="typeHierarchy/supertypes",e.messageDirection=n.MessageDirection.clientToServer,e.type=new n.ProtocolRequestType(e.method)}(o||(t.TypeHierarchySupertypesRequest=o={})),function(e){e.method="typeHierarchy/subtypes",e.messageDirection=n.MessageDirection.clientToServer,e.type=new n.ProtocolRequestType(e.method)}(s||(t.TypeHierarchySubtypesRequest=s={}))},9935(e,t,i){"use strict";t.DidChangeWorkspaceFoldersNotification=t.WorkspaceFoldersRequest=void 0;const n=i(372);var r,o;!function(e){e.method="workspace/workspaceFolders",e.messageDirection=n.MessageDirection.serverToClient,e.type=new n.ProtocolRequestType0(e.method),e.capabilities=n.CM.create("workspace.workspaceFolders","workspace.workspaceFolders")}(r||(t.WorkspaceFoldersRequest=r={})),function(e){e.method="workspace/didChangeWorkspaceFolders",e.messageDirection=n.MessageDirection.clientToServer,e.type=new n.ProtocolNotificationType(e.method),e.capabilities=n.CM.create(void 0,"workspace.workspaceFolders.changeNotifications")}(o||(t.DidChangeWorkspaceFoldersNotification=o={}))},8598(e,t){"use strict";function i(e){return"string"==typeof e||e instanceof String}function n(e){return Array.isArray(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.boolean=function(e){return!0===e||!1===e},t.string=i,t.number=function(e){return"number"==typeof e||e instanceof Number},t.error=function(e){return e instanceof Error},t.func=function(e){return"function"==typeof e},t.array=n,t.stringArray=function(e){return n(e)&&e.every(e=>i(e))},t.typedArray=function(e,t){return Array.isArray(e)&&e.every(t)},t.objectLiteral=function(e){return null!==e&&"object"==typeof e}},7354(e,t,i){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,i,n){void 0===n&&(n=i);var r=Object.getOwnPropertyDescriptor(t,i);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[i]}}),Object.defineProperty(e,n,r)}:function(e,t,i,n){void 0===n&&(n=i),e[n]=t[i]}),r=this&&this.__exportStar||function(e,t){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(t,i)||n(t,e,i)};Object.defineProperty(t,"__esModule",{value:!0}),t.createProtocolConnection=function(e,t,i,n){return(0,o.createMessageConnection)(e,t,i,n)};const o=i(7123);r(i(7123),t),r(i(8766),t)},2861(e,t,i){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,i,n){void 0===n&&(n=i);var r=Object.getOwnPropertyDescriptor(t,i);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[i]}}),Object.defineProperty(e,n,r)}:function(e,t,i,n){void 0===n&&(n=i),e[n]=t[i]}),r=this&&this.__exportStar||function(e,t){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(t,i)||n(t,e,i)};Object.defineProperty(t,"__esModule",{value:!0}),t.ProposedFeatures=t.NotebookDocuments=t.TextDocuments=t.SemanticTokensBuilder=void 0;const o=i(2655);Object.defineProperty(t,"SemanticTokensBuilder",{enumerable:!0,get:function(){return o.SemanticTokensBuilder}}),r(i(8766),t);const s=i(1662);Object.defineProperty(t,"TextDocuments",{enumerable:!0,get:function(){return s.TextDocuments}});const a=i(20);var c;Object.defineProperty(t,"NotebookDocuments",{enumerable:!0,get:function(){return a.NotebookDocuments}}),r(i(7874),t),function(e){e.all={__brand:"features"}}(c||(t.ProposedFeatures=c={}))},3918(e,t,i){"use strict";t.CallHierarchyFeature=void 0;const n=i(8766);t.CallHierarchyFeature=e=>class extends e{get callHierarchy(){return{onPrepare:e=>this.connection.onRequest(n.CallHierarchyPrepareRequest.type,(t,i)=>e(t,i,this.attachWorkDoneProgress(t),void 0)),onIncomingCalls:e=>{const t=n.CallHierarchyIncomingCallsRequest.type;return this.connection.onRequest(t,(i,n)=>e(i,n,this.attachWorkDoneProgress(i),this.attachPartialResultProgress(t,i)))},onOutgoingCalls:e=>{const t=n.CallHierarchyOutgoingCallsRequest.type;return this.connection.onRequest(t,(i,n)=>e(i,n,this.attachWorkDoneProgress(i),this.attachPartialResultProgress(t,i)))}}}}},8491(e,t,i){"use strict";var n,r=this&&this.__createBinding||(Object.create?function(e,t,i,n){void 0===n&&(n=i);var r=Object.getOwnPropertyDescriptor(t,i);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[i]}}),Object.defineProperty(e,n,r)}:function(e,t,i,n){void 0===n&&(n=i),e[n]=t[i]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||(n=function(e){return n=Object.getOwnPropertyNames||function(e){var t=[];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[t.length]=i);return t},n(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i=n(e),s=0;s<i.length;s++)"default"!==i[s]&&r(t,e,i[s]);return o(t,e),t});Object.defineProperty(t,"__esModule",{value:!0}),t.ConfigurationFeature=void 0;const a=i(8766),c=s(i(8867));t.ConfigurationFeature=e=>class extends e{getConfiguration(e){return e?c.string(e)?this._getConfiguration({section:e}):this._getConfiguration(e):this._getConfiguration({})}_getConfiguration(e){const t={items:Array.isArray(e)?e:[e]};return this.connection.sendRequest(a.ConfigurationRequest.type,t).then(t=>Array.isArray(t)?Array.isArray(e)?t:t[0]:Array.isArray(e)?[]:null)}}},493(e,t,i){"use strict";t.DiagnosticFeature=void 0;const n=i(8766);t.DiagnosticFeature=e=>class extends e{get diagnostics(){return{refresh:()=>this.connection.sendRequest(n.DiagnosticRefreshRequest.type),on:e=>this.connection.onRequest(n.DocumentDiagnosticRequest.type,(t,i)=>e(t,i,this.attachWorkDoneProgress(t),this.attachPartialResultProgress(n.DocumentDiagnosticRequest.partialResult,t))),onWorkspace:e=>this.connection.onRequest(n.WorkspaceDiagnosticRequest.type,(t,i)=>e(t,i,this.attachWorkDoneProgress(t),this.attachPartialResultProgress(n.WorkspaceDiagnosticRequest.partialResult,t)))}}}},2697(e,t,i){"use strict";t.FileOperationsFeature=void 0;const n=i(8766);t.FileOperationsFeature=e=>class extends e{onDidCreateFiles(e){return this.connection.onNotification(n.DidCreateFilesNotification.type,t=>e(t))}onDidRenameFiles(e){return this.connection.onNotification(n.DidRenameFilesNotification.type,t=>e(t))}onDidDeleteFiles(e){return this.connection.onNotification(n.DidDeleteFilesNotification.type,t=>e(t))}onWillCreateFiles(e){return this.connection.onRequest(n.WillCreateFilesRequest.type,(t,i)=>e(t,i))}onWillRenameFiles(e){return this.connection.onRequest(n.WillRenameFilesRequest.type,(t,i)=>e(t,i))}onWillDeleteFiles(e){return this.connection.onRequest(n.WillDeleteFilesRequest.type,(t,i)=>e(t,i))}}},6007(e,t,i){"use strict";t.FoldingRangeFeature=void 0;const n=i(8766);t.FoldingRangeFeature=e=>class extends e{get foldingRange(){return{refresh:()=>this.connection.sendRequest(n.FoldingRangeRefreshRequest.type),on:e=>{const t=n.FoldingRangeRequest.type;return this.connection.onRequest(t,(i,n)=>e(i,n,this.attachWorkDoneProgress(i),this.attachPartialResultProgress(t,i)))}}}}},4635(e,t,i){"use strict";t.InlayHintFeature=void 0;const n=i(8766);t.InlayHintFeature=e=>class extends e{get inlayHint(){return{refresh:()=>this.connection.sendRequest(n.InlayHintRefreshRequest.type),on:e=>this.connection.onRequest(n.InlayHintRequest.type,(t,i)=>e(t,i,this.attachWorkDoneProgress(t))),resolve:e=>this.connection.onRequest(n.InlayHintResolveRequest.type,(t,i)=>e(t,i))}}}},2534(e,t,i){"use strict";t.InlineCompletionFeature=void 0;const n=i(8766);t.InlineCompletionFeature=e=>class extends e{get inlineCompletion(){return{on:e=>this.connection.onRequest(n.InlineCompletionRequest.type,(t,i)=>e(t,i,this.attachWorkDoneProgress(t)))}}}},1815(e,t,i){"use strict";t.InlineValueFeature=void 0;const n=i(8766);t.InlineValueFeature=e=>class extends e{get inlineValue(){return{refresh:()=>this.connection.sendRequest(n.InlineValueRefreshRequest.type),on:e=>this.connection.onRequest(n.InlineValueRequest.type,(t,i)=>e(t,i,this.attachWorkDoneProgress(t)))}}}},8517(e,t,i){"use strict";t.LinkedEditingRangeFeature=void 0;const n=i(8766);t.LinkedEditingRangeFeature=e=>class extends e{onLinkedEditingRange(e){return this.connection.onRequest(n.LinkedEditingRangeRequest.type,(t,i)=>e(t,i,this.attachWorkDoneProgress(t),void 0))}}},2936(e,t,i){"use strict";t.MonikerFeature=void 0;const n=i(8766);t.MonikerFeature=e=>class extends e{get moniker(){return{on:e=>{const t=n.MonikerRequest.type;return this.connection.onRequest(t,(i,n)=>e(i,n,this.attachWorkDoneProgress(i),this.attachPartialResultProgress(t,i)))}}}}},20(e,t,i){"use strict";t.NotebookDocuments=t.NotebookSyncFeature=void 0;const n=i(8766),r=i(1662);t.NotebookSyncFeature=e=>class extends e{get synchronization(){return{onDidOpenNotebookDocument:e=>this.connection.onNotification(n.DidOpenNotebookDocumentNotification.type,t=>e(t)),onDidChangeNotebookDocument:e=>this.connection.onNotification(n.DidChangeNotebookDocumentNotification.type,t=>e(t)),onDidSaveNotebookDocument:e=>this.connection.onNotification(n.DidSaveNotebookDocumentNotification.type,t=>e(t)),onDidCloseNotebookDocument:e=>this.connection.onNotification(n.DidCloseNotebookDocumentNotification.type,t=>e(t))}}};class o{static NULL_DISPOSE=Object.freeze({dispose:()=>{}});openHandler;changeHandler;closeHandler;onDidOpenTextDocument(e){return this.openHandler=e,n.Disposable.create(()=>{this.openHandler=void 0})}openTextDocument(e){return this.openHandler&&this.openHandler(e)}onDidChangeTextDocument(e){return this.changeHandler=e,n.Disposable.create(()=>{this.changeHandler=e})}changeTextDocument(e){return this.changeHandler&&this.changeHandler(e)}onDidCloseTextDocument(e){return this.closeHandler=e,n.Disposable.create(()=>{this.closeHandler=void 0})}closeTextDocument(e){return this.closeHandler&&this.closeHandler(e)}onWillSaveTextDocument(){return o.NULL_DISPOSE}onWillSaveTextDocumentWaitUntil(){return o.NULL_DISPOSE}onDidSaveTextDocument(){return o.NULL_DISPOSE}}t.NotebookDocuments=class{notebookDocuments;notebookCellMap;_onDidOpen;_onDidSave;_onDidChange;_onDidClose;_cellTextDocuments;constructor(e){e instanceof r.TextDocuments?this._cellTextDocuments=e:this._cellTextDocuments=new r.TextDocuments(e),this.notebookDocuments=new Map,this.notebookCellMap=new Map,this._onDidOpen=new n.Emitter,this._onDidChange=new n.Emitter,this._onDidSave=new n.Emitter,this._onDidClose=new n.Emitter}get cellTextDocuments(){return this._cellTextDocuments}getCellTextDocument(e){return this._cellTextDocuments.get(e.document)}getNotebookDocument(e){return this.notebookDocuments.get(e)}getNotebookCell(e){const t=this.notebookCellMap.get(e);return t&&t[0]}findNotebookDocumentForCell(e){const t="string"==typeof e?e:e.document,i=this.notebookCellMap.get(t);return i&&i[1]}get onDidOpen(){return this._onDidOpen.event}get onDidSave(){return this._onDidSave.event}get onDidChange(){return this._onDidChange.event}get onDidClose(){return this._onDidClose.event}listen(e){const t=new o,i=[];return i.push(this.cellTextDocuments.listen(t)),i.push(e.notebooks.synchronization.onDidOpenNotebookDocument(async e=>{this.notebookDocuments.set(e.notebookDocument.uri,e.notebookDocument);for(const i of e.cellTextDocuments)await t.openTextDocument({textDocument:i});this.updateCellMap(e.notebookDocument),this._onDidOpen.fire(e.notebookDocument)})),i.push(e.notebooks.synchronization.onDidChangeNotebookDocument(async e=>{const i=this.notebookDocuments.get(e.notebookDocument.uri);if(void 0===i)return;i.version=e.notebookDocument.version;const n=i.metadata;let r=!1;const o=e.change;void 0!==o.metadata&&(r=!0,i.metadata=o.metadata);const s=[],a=[],c=[],l=[];if(void 0!==o.cells){const e=o.cells;if(void 0!==e.structure){const n=e.structure.array;if(i.cells.splice(n.start,n.deleteCount,...void 0!==n.cells?n.cells:[]),void 0!==e.structure.didOpen)for(const i of e.structure.didOpen)await t.openTextDocument({textDocument:i}),s.push(i.uri);if(e.structure.didClose)for(const i of e.structure.didClose)await t.closeTextDocument({textDocument:i}),a.push(i.uri)}if(void 0!==e.data){const t=new Map(e.data.map(e=>[e.document,e]));for(let e=0;e<=i.cells.length;e++){const n=t.get(i.cells[e].document);if(void 0!==n){const r=i.cells.splice(e,1,n);if(c.push({old:r[0],new:n}),t.delete(n.document),0===t.size)break}}}if(void 0!==e.textContent)for(const i of e.textContent)await t.changeTextDocument({textDocument:i.document,contentChanges:i.changes}),l.push(i.document.uri)}this.updateCellMap(i);const u={notebookDocument:i};r&&(u.metadata={old:n,new:i.metadata});const h=[];for(const e of s)h.push(this.getNotebookCell(e));const d=[];for(const e of a)d.push(this.getNotebookCell(e));const p=[];for(const e of l)p.push(this.getNotebookCell(e));(h.length>0||d.length>0||c.length>0||p.length>0)&&(u.cells={added:h,removed:d,changed:{data:c,textContent:p}}),void 0===u.metadata&&void 0===u.cells||this._onDidChange.fire(u)})),i.push(e.notebooks.synchronization.onDidSaveNotebookDocument(e=>{const t=this.notebookDocuments.get(e.notebookDocument.uri);void 0!==t&&this._onDidSave.fire(t)})),i.push(e.notebooks.synchronization.onDidCloseNotebookDocument(async e=>{const i=this.notebookDocuments.get(e.notebookDocument.uri);if(void 0!==i){this._onDidClose.fire(i);for(const i of e.cellTextDocuments)await t.closeTextDocument({textDocument:i});this.notebookDocuments.delete(e.notebookDocument.uri);for(const e of i.cells)this.notebookCellMap.delete(e.document)}})),n.Disposable.create(()=>{i.forEach(e=>e.dispose())})}updateCellMap(e){for(const t of e.cells)this.notebookCellMap.set(t.document,[t,e])}}},2938(e,t,i){"use strict";t.ProgressFeature=void 0,t.attachWorkDone=function(e,t){if(void 0===t||void 0===t.workDoneToken)return new a;const i=t.workDoneToken;return delete t.workDoneToken,new o(e,i)},t.attachPartialResult=function(e,t){if(void 0===t||void 0===t.partialResultToken)return;const i=t.partialResultToken;return delete t.partialResultToken,new u(e,i)};const n=i(8766),r=i(6116);class o{_connection;_token;static Instances=new Map;constructor(e,t){this._connection=e,this._token=t,o.Instances.set(this._token,this)}begin(e,t,i,r){const o={kind:"begin",title:e,message:i,cancellable:r};"number"==typeof t&&(o.percentage=Math.round(t)),this._connection.sendProgress(n.WorkDoneProgress.type,this._token,o)}report(e,t){const i={kind:"report"};"number"==typeof e?(i.percentage=Math.round(e),void 0!==t&&(i.message=t)):i.message=e,this._connection.sendProgress(n.WorkDoneProgress.type,this._token,i)}done(){o.Instances.delete(this._token),this._connection.sendProgress(n.WorkDoneProgress.type,this._token,{kind:"end"})}}class s extends o{_source;constructor(e,t){super(e,t),this._source=new n.CancellationTokenSource}get token(){return this._source.token}done(){this._source.dispose(),super.done()}cancel(){this._source.cancel()}}class a{constructor(){}begin(){}report(){}done(){}}class c extends a{_source;constructor(){super(),this._source=new n.CancellationTokenSource}get token(){return this._source.token}done(){this._source.dispose()}cancel(){this._source.cancel()}}var l;t.ProgressFeature=e=>class extends e{_progressSupported;constructor(){super(),this._progressSupported=!1}initialize(e){super.initialize(e),!0===e?.window?.workDoneProgress&&(this._progressSupported=!0,this.connection.onNotification(n.WorkDoneProgressCancelNotification.type,e=>{const t=o.Instances.get(e.token);(t instanceof s||t instanceof c)&&t.cancel()}))}attachWorkDoneProgress(e){return void 0===e?new a:new o(this.connection,e)}createWorkDoneProgress(){if(this._progressSupported){const e=(0,r.generateUuid)();return this.connection.sendRequest(n.WorkDoneProgressCreateRequest.type,{token:e}).then(()=>new s(this.connection,e))}return Promise.resolve(new c)}},function(e){e.type=new n.ProgressType}(l||(l={}));class u{_connection;_token;constructor(e,t){this._connection=e,this._token=t}report(e){this._connection.sendProgress(l.type,this._token,e)}}},2655(e,t,i){"use strict";t.SemanticTokensBuilder=t.SemanticTokensFeature=void 0;const n=i(8766);t.SemanticTokensFeature=e=>class extends e{get semanticTokens(){return{refresh:()=>this.connection.sendRequest(n.SemanticTokensRefreshRequest.type),on:e=>{const t=n.SemanticTokensRequest.type;return this.connection.onRequest(t,(i,n)=>e(i,n,this.attachWorkDoneProgress(i),this.attachPartialResultProgress(t,i)))},onDelta:e=>{const t=n.SemanticTokensDeltaRequest.type;return this.connection.onRequest(t,(i,n)=>e(i,n,this.attachWorkDoneProgress(i),this.attachPartialResultProgress(t,i)))},onRange:e=>{const t=n.SemanticTokensRangeRequest.type;return this.connection.onRequest(t,(i,n)=>e(i,n,this.attachWorkDoneProgress(i),this.attachPartialResultProgress(t,i)))}}}};class r{originalSequence;modifiedSequence;constructor(e,t){this.originalSequence=e,this.modifiedSequence=t}computeDiff(){const e=this.originalSequence.length,t=this.modifiedSequence.length;let i=0;for(;i<t&&i<e&&this.originalSequence[i]===this.modifiedSequence[i];)i++;if(i<t&&i<e){let n=e-1,r=t-1;for(;n>=i&&r>=i&&this.originalSequence[n]===this.modifiedSequence[r];)n--,r--;(n<i||r<i)&&(n++,r++);const o=n-i+1,s=this.modifiedSequence.slice(i,r+1);return 1===s.length&&s[0]===this.originalSequence[n]?[{start:i,deleteCount:o-1}]:[{start:i,deleteCount:o,data:s}]}return i<t?[{start:i,deleteCount:0,data:this.modifiedSequence.slice(i)}]:i<e?[{start:i,deleteCount:e-i}]:[]}}class o{_id;_prevLine;_prevChar;_dataIsSortedAndDeltaEncoded;_data;_dataNonDelta;_dataLen;_prevData;constructor(){this._prevData=void 0,this.initialize()}initialize(){this._id=Date.now(),this._prevLine=0,this._prevChar=0,this._data=[],this._dataNonDelta=[],this._dataLen=0,this._dataIsSortedAndDeltaEncoded=!0}push(e,t,i,n,r){this._dataIsSortedAndDeltaEncoded&&(e<this._prevLine||e===this._prevLine&&t<this._prevChar)&&(this._dataIsSortedAndDeltaEncoded=!1,this._dataNonDelta=o._deltaDecode(this._data));let s=e,a=t;this._dataIsSortedAndDeltaEncoded&&this._dataLen>0&&(s-=this._prevLine,0===s&&(a-=this._prevChar));const c=this._dataIsSortedAndDeltaEncoded?this._data:this._dataNonDelta;c[this._dataLen++]=s,c[this._dataLen++]=a,c[this._dataLen++]=i,c[this._dataLen++]=n,c[this._dataLen++]=r,this._prevLine=e,this._prevChar=t}get id(){return this._id.toString()}static _deltaDecode(e){const t=e.length/5|0;let i=0,n=0;const r=[];for(let o=0;o<t;o++){const t=5*o;let s=e[t],a=e[t+1];0===s?(s=i,a+=n):s+=i;const c=e[t+2],l=e[t+3],u=e[t+4];r[t+0]=s,r[t+1]=a,r[t+2]=c,r[t+3]=l,r[t+4]=u,i=s,n=a}return r}static _sortAndDeltaEncode(e){const t=[],i=e.length/5|0;for(let e=0;e<i;e++)t[e]=e;t.sort((t,i)=>{const n=e[5*t],r=e[5*i];return n===r?e[5*t+1]-e[5*i+1]:n-r});const n=[];let r=0,o=0;for(let s=0;s<i;s++){const i=5*t[s],a=e[i+0],c=e[i+1],l=e[i+2],u=e[i+3],h=e[i+4],d=a-r,p=0===d?c-o:c,f=5*s;n[f+0]=d,n[f+1]=p,n[f+2]=l,n[f+3]=u,n[f+4]=h,r=a,o=c}return n}getFinalDataDelta(){return this._dataIsSortedAndDeltaEncoded?this._data:o._sortAndDeltaEncode(this._dataNonDelta)}previousResult(e){this.id===e&&(this._prevData=this.getFinalDataDelta()),this.initialize()}build(){return this._prevData=void 0,{resultId:this.id,data:this.getFinalDataDelta()}}canBuildEdits(){return void 0!==this._prevData}buildEdits(){return void 0!==this._prevData?{resultId:this.id,edits:new r(this._prevData,this.getFinalDataDelta()).computeDiff()}:this.build()}}t.SemanticTokensBuilder=o},7874(e,t,i){"use strict";var n,r=this&&this.__createBinding||(Object.create?function(e,t,i,n){void 0===n&&(n=i);var r=Object.getOwnPropertyDescriptor(t,i);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[i]}}),Object.defineProperty(e,n,r)}:function(e,t,i,n){void 0===n&&(n=i),e[n]=t[i]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||(n=function(e){return n=Object.getOwnPropertyNames||function(e){var t=[];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[t.length]=i);return t},n(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i=n(e),s=0;s<i.length;s++)"default"!==i[s]&&r(t,e,i[s]);return o(t,e),t});Object.defineProperty(t,"__esModule",{value:!0}),t._NotebooksImpl=t._LanguagesImpl=t.BulkUnregistration=t.BulkRegistration=t.ErrorMessageTracker=void 0,t.combineConsoleFeatures=B,t.combineTelemetryFeatures=$,t.combineTracerFeatures=z,t.combineClientFeatures=H,t.combineWindowFeatures=G,t.combineWorkspaceFeatures=V,t.combineLanguagesFeatures=K,t.combineNotebooksFeatures=Y,t.combineFeatures=function(e,t){function i(e,t,i){return e&&t?i(e,t):e||t}return{__brand:"features",console:i(e.console,t.console,B),tracer:i(e.tracer,t.tracer,z),telemetry:i(e.telemetry,t.telemetry,$),client:i(e.client,t.client,H),window:i(e.window,t.window,G),workspace:i(e.workspace,t.workspace,V),languages:i(e.languages,t.languages,K),notebooks:i(e.notebooks,t.notebooks,Y)}},t.createConnection=function(e,t,i){const n=i&&i.console?new(i.console(P)):new P,r=e(n);n.rawAttach(r);const o=i&&i.tracer?new(i.tracer(q)):new q,s=i&&i.telemetry?new(i.telemetry(j)):new j,l=i&&i.client?new(i.client(M)):new M,h=i&&i.window?new(i.window(x)):new x,d=i&&i.workspace?new(i.workspace(I)):new I,p=i&&i.languages?new(i.languages(L)):new L,f=i&&i.notebooks?new(i.notebooks(U)):new U,g=[n,o,s,l,h,d,p,f];let m,y,v;const _={listen:()=>r.listen(),sendRequest:(e,...t)=>r.sendRequest(c.string(e)?e:e.method,...t),onRequest:(e,t)=>r.onRequest(e,t),sendNotification:(e,t)=>{const i=c.string(e)?e:e.method;return r.sendNotification(i,t)},onNotification:(e,t)=>r.onNotification(e,t),onProgress:r.onProgress,sendProgress:r.sendProgress,onInitialize:e=>(y=e,{dispose:()=>{y=void 0}}),onInitialized:e=>r.onNotification(a.InitializedNotification.type,e),onShutdown:e=>(m=e,{dispose:()=>{m=void 0}}),onExit:e=>(v=e,{dispose:()=>{v=void 0}}),get console(){return n},get telemetry(){return s},get tracer(){return o},get client(){return l},get window(){return h},get workspace(){return d},get languages(){return p},get notebooks(){return f},onDidChangeConfiguration:e=>r.onNotification(a.DidChangeConfigurationNotification.type,e),onDidChangeWatchedFiles:e=>r.onNotification(a.DidChangeWatchedFilesNotification.type,e),__textDocumentSync:void 0,onDidOpenTextDocument:e=>r.onNotification(a.DidOpenTextDocumentNotification.type,e),onDidChangeTextDocument:e=>r.onNotification(a.DidChangeTextDocumentNotification.type,e),onDidCloseTextDocument:e=>r.onNotification(a.DidCloseTextDocumentNotification.type,e),onWillSaveTextDocument:e=>r.onNotification(a.WillSaveTextDocumentNotification.type,e),onWillSaveTextDocumentWaitUntil:e=>r.onRequest(a.WillSaveTextDocumentWaitUntilRequest.type,e),onDidSaveTextDocument:e=>r.onNotification(a.DidSaveTextDocumentNotification.type,e),sendDiagnostics:e=>r.sendNotification(a.PublishDiagnosticsNotification.type,e),onHover:e=>r.onRequest(a.HoverRequest.type,(t,i)=>e(t,i,(0,u.attachWorkDone)(r,t),void 0)),onCompletion:e=>r.onRequest(a.CompletionRequest.type,(t,i)=>e(t,i,(0,u.attachWorkDone)(r,t),(0,u.attachPartialResult)(r,t))),onCompletionResolve:e=>r.onRequest(a.CompletionResolveRequest.type,e),onSignatureHelp:e=>r.onRequest(a.SignatureHelpRequest.type,(t,i)=>e(t,i,(0,u.attachWorkDone)(r,t),void 0)),onDeclaration:e=>r.onRequest(a.DeclarationRequest.type,(t,i)=>e(t,i,(0,u.attachWorkDone)(r,t),(0,u.attachPartialResult)(r,t))),onDefinition:e=>r.onRequest(a.DefinitionRequest.type,(t,i)=>e(t,i,(0,u.attachWorkDone)(r,t),(0,u.attachPartialResult)(r,t))),onTypeDefinition:e=>r.onRequest(a.TypeDefinitionRequest.type,(t,i)=>e(t,i,(0,u.attachWorkDone)(r,t),(0,u.attachPartialResult)(r,t))),onImplementation:e=>r.onRequest(a.ImplementationRequest.type,(t,i)=>e(t,i,(0,u.attachWorkDone)(r,t),(0,u.attachPartialResult)(r,t))),onReferences:e=>r.onRequest(a.ReferencesRequest.type,(t,i)=>e(t,i,(0,u.attachWorkDone)(r,t),(0,u.attachPartialResult)(r,t))),onDocumentHighlight:e=>r.onRequest(a.DocumentHighlightRequest.type,(t,i)=>e(t,i,(0,u.attachWorkDone)(r,t),(0,u.attachPartialResult)(r,t))),onDocumentSymbol:e=>r.onRequest(a.DocumentSymbolRequest.type,(t,i)=>e(t,i,(0,u.attachWorkDone)(r,t),(0,u.attachPartialResult)(r,t))),onWorkspaceSymbol:e=>r.onRequest(a.WorkspaceSymbolRequest.type,(t,i)=>e(t,i,(0,u.attachWorkDone)(r,t),(0,u.attachPartialResult)(r,t))),onWorkspaceSymbolResolve:e=>r.onRequest(a.WorkspaceSymbolResolveRequest.type,e),onCodeAction:e=>r.onRequest(a.CodeActionRequest.type,(t,i)=>e(t,i,(0,u.attachWorkDone)(r,t),(0,u.attachPartialResult)(r,t))),onCodeActionResolve:e=>r.onRequest(a.CodeActionResolveRequest.type,(t,i)=>e(t,i)),onCodeLens:e=>r.onRequest(a.CodeLensRequest.type,(t,i)=>e(t,i,(0,u.attachWorkDone)(r,t),(0,u.attachPartialResult)(r,t))),onCodeLensResolve:e=>r.onRequest(a.CodeLensResolveRequest.type,(t,i)=>e(t,i)),onDocumentFormatting:e=>r.onRequest(a.DocumentFormattingRequest.type,(t,i)=>e(t,i,(0,u.attachWorkDone)(r,t),void 0)),onDocumentRangeFormatting:e=>r.onRequest(a.DocumentRangeFormattingRequest.type,(t,i)=>e(t,i,(0,u.attachWorkDone)(r,t),void 0)),onDocumentOnTypeFormatting:e=>r.onRequest(a.DocumentOnTypeFormattingRequest.type,(t,i)=>e(t,i)),onRenameRequest:e=>r.onRequest(a.RenameRequest.type,(t,i)=>e(t,i,(0,u.attachWorkDone)(r,t),void 0)),onPrepareRename:e=>r.onRequest(a.PrepareRenameRequest.type,(t,i)=>e(t,i)),onDocumentLinks:e=>r.onRequest(a.DocumentLinkRequest.type,(t,i)=>e(t,i,(0,u.attachWorkDone)(r,t),(0,u.attachPartialResult)(r,t))),onDocumentLinkResolve:e=>r.onRequest(a.DocumentLinkResolveRequest.type,(t,i)=>e(t,i)),onDocumentColor:e=>r.onRequest(a.DocumentColorRequest.type,(t,i)=>e(t,i,(0,u.attachWorkDone)(r,t),(0,u.attachPartialResult)(r,t))),onColorPresentation:e=>r.onRequest(a.ColorPresentationRequest.type,(t,i)=>e(t,i,(0,u.attachWorkDone)(r,t),(0,u.attachPartialResult)(r,t))),onFoldingRanges:e=>r.onRequest(a.FoldingRangeRequest.type,(t,i)=>e(t,i,(0,u.attachWorkDone)(r,t),(0,u.attachPartialResult)(r,t))),onSelectionRanges:e=>r.onRequest(a.SelectionRangeRequest.type,(t,i)=>e(t,i,(0,u.attachWorkDone)(r,t),(0,u.attachPartialResult)(r,t))),onExecuteCommand:e=>r.onRequest(a.ExecuteCommandRequest.type,(t,i)=>e(t,i,(0,u.attachWorkDone)(r,t),void 0)),dispose:()=>r.dispose()};for(const e of g)e.attach(_);return r.onRequest(a.InitializeRequest.type,e=>{t.initialize(e),c.string(e.trace)&&(o.trace=a.Trace.fromString(e.trace));for(const t of g)t.initialize(e.capabilities);if(y){const t=y(e,(new a.CancellationTokenSource).token,(0,u.attachWorkDone)(r,e),void 0);return(i=t,i instanceof Promise?i:c.thenable(i)?new Promise((e,t)=>{i.then(t=>e(t),e=>t(e))}):Promise.resolve(i)).then(e=>{if(e instanceof a.ResponseError)return e;let t=e;t||(t={capabilities:{}});let i=t.capabilities;i||(i={},t.capabilities=i),void 0===i.textDocumentSync||null===i.textDocumentSync?i.textDocumentSync=c.number(_.__textDocumentSync)?_.__textDocumentSync:a.TextDocumentSyncKind.None:c.number(i.textDocumentSync)||c.number(i.textDocumentSync.change)||(i.textDocumentSync.change=c.number(_.__textDocumentSync)?_.__textDocumentSync:a.TextDocumentSyncKind.None);for(const e of g)e.fillServerCapabilities(i);return t})}{const e={capabilities:{textDocumentSync:a.TextDocumentSyncKind.None}};for(const t of g)t.fillServerCapabilities(e.capabilities);return e}var i}),r.onRequest(a.ShutdownRequest.type,()=>(t.shutdownReceived=!0,m?m((new a.CancellationTokenSource).token):void 0)),r.onNotification(a.ExitNotification.type,()=>{try{if(v)return v()}finally{t.shutdownReceived?t.exit(0):t.exit(1)}}),r.onNotification(a.SetTraceNotification.type,e=>{o.trace=a.Trace.fromString(e.value)}),_};const a=i(8766),c=s(i(8867)),l=s(i(6116)),u=i(2938),h=i(8491),d=i(2112),p=i(3918),f=i(2655),g=i(8817),m=i(2697),y=i(8517),v=i(5026),_=i(1815),b=i(6007),w=i(4635),D=i(493),T=i(20),S=i(2936),C=i(2534),R=i(9202);function E(e){if(null!==e)return e}t.ErrorMessageTracker=class{_messages;constructor(){this._messages=Object.create(null)}add(e){let t=this._messages[e];t||(t=0),t++,this._messages[e]=t}sendErrors(e){Object.keys(this._messages).forEach(t=>{e.window.showErrorMessage(t)})}};class P{_rawConnection;_connection;constructor(){}rawAttach(e){this._rawConnection=e}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}fillServerCapabilities(e){}initialize(e){}error(e){this.send(a.MessageType.Error,e)}warn(e){this.send(a.MessageType.Warning,e)}info(e){this.send(a.MessageType.Info,e)}log(e){this.send(a.MessageType.Log,e)}debug(e){this.send(a.MessageType.Debug,e)}send(e,t){this._rawConnection&&this._rawConnection.sendNotification(a.LogMessageNotification.type,{type:e,message:t}).catch(()=>{(0,a.RAL)().console.error("Sending log message failed")})}}const x=(0,g.ShowDocumentFeature)((0,u.ProgressFeature)(class{_connection;constructor(){}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}showErrorMessage(e,...t){const i={type:a.MessageType.Error,message:e,actions:t};return this.connection.sendRequest(a.ShowMessageRequest.type,i).then(E)}showWarningMessage(e,...t){const i={type:a.MessageType.Warning,message:e,actions:t};return this.connection.sendRequest(a.ShowMessageRequest.type,i).then(E)}showInformationMessage(e,...t){const i={type:a.MessageType.Info,message:e,actions:t};return this.connection.sendRequest(a.ShowMessageRequest.type,i).then(E)}}));var O,k;!function(e){e.create=function(){return new N}}(O||(t.BulkRegistration=O={}));class N{_registrations=[];_registered=new Set;add(e,t){const i=c.string(e)?e:e.method;if(this._registered.has(i))throw new Error(`${i} is already added to this registration`);const n=l.generateUuid();this._registrations.push({id:n,method:i,registerOptions:t||{}}),this._registered.add(i)}asRegistrationParams(){return{registrations:this._registrations}}}!function(e){e.create=function(){return new A(void 0,[])}}(k||(t.BulkUnregistration=k={}));class A{_connection;_unregistrations=new Map;constructor(e,t){this._connection=e,t.forEach(e=>{this._unregistrations.set(e.method,e)})}get isAttached(){return!!this._connection}attach(e){this._connection=e}add(e){this._unregistrations.set(e.method,e)}dispose(){const e=[];for(const t of this._unregistrations.values())e.push(t);const t={unregisterations:e};this._connection.sendRequest(a.UnregistrationRequest.type,t).catch(()=>{this._connection.console.info("Bulk unregistration failed.")})}disposeSingle(e){const t=c.string(e)?e:e.method,i=this._unregistrations.get(t);if(!i)return!1;const n={unregisterations:[i]};return this._connection.sendRequest(a.UnregistrationRequest.type,n).then(()=>{this._unregistrations.delete(t)},e=>{this._connection.console.info(`Un-registering request handler for ${i.id} failed.`)}),!0}}class M{_connection;attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}register(e,t,i){return e instanceof N?this.registerMany(e):e instanceof A?this.registerSingle1(e,t,i):this.registerSingle2(e,t)}registerSingle1(e,t,i){const n=c.string(t)?t:t.method,r=l.generateUuid(),o={registrations:[{id:r,method:n,registerOptions:i||{}}]};return e.isAttached||e.attach(this.connection),this.connection.sendRequest(a.RegistrationRequest.type,o).then(t=>(e.add({id:r,method:n}),e),e=>(this.connection.console.info(`Registering request handler for ${n} failed.`),Promise.reject(e)))}registerSingle2(e,t){const i=c.string(e)?e:e.method,n=l.generateUuid(),r={registrations:[{id:n,method:i,registerOptions:t||{}}]};return this.connection.sendRequest(a.RegistrationRequest.type,r).then(e=>a.Disposable.create(()=>{this.unregisterSingle(n,i).catch(()=>{this.connection.console.info(`Un-registering capability with id ${n} failed.`)})}),e=>(this.connection.console.info(`Registering request handler for ${i} failed.`),Promise.reject(e)))}unregisterSingle(e,t){const i={unregisterations:[{id:e,method:t}]};return this.connection.sendRequest(a.UnregistrationRequest.type,i).catch(()=>{this.connection.console.info(`Un-registering request handler for ${e} failed.`)})}registerMany(e){const t=e.asRegistrationParams();return this.connection.sendRequest(a.RegistrationRequest.type,t).then(()=>new A(this._connection,t.registrations.map(e=>({id:e.id,method:e.method}))),e=>(this.connection.console.info("Bulk registration failed."),Promise.reject(e)))}}const I=(0,R.TextDocumentContentFeature)((0,m.FileOperationsFeature)((0,d.WorkspaceFoldersFeature)((0,h.ConfigurationFeature)(class{_connection;constructor(){}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}applyEdit(e){const t=(i=e)&&i.edit?e:{edit:e};var i;return this.connection.sendRequest(a.ApplyWorkspaceEditRequest.type,t)}}))));class q{_trace;_connection;constructor(){this._trace=a.Trace.Off}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}set trace(e){this._trace=e}log(e,t){this._trace!==a.Trace.Off&&this.connection.sendNotification(a.LogTraceNotification.type,{message:e,verbose:this._trace===a.Trace.Verbose?t:void 0}).catch(()=>{})}}class j{_connection;constructor(){}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}logEvent(e){this.connection.sendNotification(a.TelemetryEventNotification.type,e).catch(()=>{this.connection.console.log("Sending TelemetryEventNotification failed")})}}class F{_connection;constructor(){}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}attachWorkDoneProgress(e){return(0,u.attachWorkDone)(this.connection,e)}attachPartialResultProgress(e,t){return(0,u.attachPartialResult)(this.connection,t)}}t._LanguagesImpl=F;const L=(0,C.InlineCompletionFeature)((0,b.FoldingRangeFeature)((0,S.MonikerFeature)((0,D.DiagnosticFeature)((0,w.InlayHintFeature)((0,_.InlineValueFeature)((0,v.TypeHierarchyFeature)((0,y.LinkedEditingRangeFeature)((0,f.SemanticTokensFeature)((0,p.CallHierarchyFeature)(F))))))))));class W{_connection;constructor(){}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}attachWorkDoneProgress(e){return(0,u.attachWorkDone)(this.connection,e)}attachPartialResultProgress(e,t){return(0,u.attachPartialResult)(this.connection,t)}}t._NotebooksImpl=W;const U=(0,T.NotebookSyncFeature)(W);function B(e,t){return function(i){return t(e(i))}}function $(e,t){return function(i){return t(e(i))}}function z(e,t){return function(i){return t(e(i))}}function H(e,t){return function(i){return t(e(i))}}function G(e,t){return function(i){return t(e(i))}}function V(e,t){return function(i){return t(e(i))}}function K(e,t){return function(i){return t(e(i))}}function Y(e,t){return function(i){return t(e(i))}}},8817(e,t,i){"use strict";t.ShowDocumentFeature=void 0;const n=i(8766);t.ShowDocumentFeature=e=>class extends e{showDocument(e){return this.connection.sendRequest(n.ShowDocumentRequest.type,e)}}},9202(e,t,i){"use strict";t.TextDocumentContentFeature=void 0;const n=i(8766);t.TextDocumentContentFeature=e=>class extends e{get textDocumentContent(){return{refresh:e=>this.connection.sendRequest(n.TextDocumentContentRefreshRequest.type,{uri:e}),on:e=>this.connection.onRequest(n.TextDocumentContentRequest.type,(t,i)=>e(t,i))}}}},1662(e,t,i){"use strict";t.TextDocuments=void 0;const n=i(8766);t.TextDocuments=class{_configuration;_syncedDocuments;_onDidChangeContent;_onDidOpen;_onDidClose;_onDidSave;_onWillSave;_willSaveWaitUntil;constructor(e){this._configuration=e,this._syncedDocuments=new Map,this._onDidChangeContent=new n.Emitter,this._onDidOpen=new n.Emitter,this._onDidClose=new n.Emitter,this._onDidSave=new n.Emitter,this._onWillSave=new n.Emitter}get onDidOpen(){return this._onDidOpen.event}get onDidChangeContent(){return this._onDidChangeContent.event}get onWillSave(){return this._onWillSave.event}onWillSaveWaitUntil(e){this._willSaveWaitUntil=e}get onDidSave(){return this._onDidSave.event}get onDidClose(){return this._onDidClose.event}get(e){return this._syncedDocuments.get(e)}all(){return Array.from(this._syncedDocuments.values())}keys(){return Array.from(this._syncedDocuments.keys())}listen(e){e.__textDocumentSync=n.TextDocumentSyncKind.Incremental;const t=[];return t.push(e.onDidOpenTextDocument(e=>{const t=e.textDocument,i=this._configuration.create(t.uri,t.languageId,t.version,t.text);this._syncedDocuments.set(t.uri,i);const n=Object.freeze({document:i});this._onDidOpen.fire(n),this._onDidChangeContent.fire(n)})),t.push(e.onDidChangeTextDocument(e=>{const t=e.textDocument,i=e.contentChanges;if(0===i.length)return;const{version:n}=t;if(null==n)throw new Error(`Received document change event for ${t.uri} without valid version identifier`);let r=this._syncedDocuments.get(t.uri);void 0!==r&&(r=this._configuration.update(r,i,n),this._syncedDocuments.set(t.uri,r),this._onDidChangeContent.fire(Object.freeze({document:r})))})),t.push(e.onDidCloseTextDocument(e=>{const t=this._syncedDocuments.get(e.textDocument.uri);void 0!==t&&(this._syncedDocuments.delete(e.textDocument.uri),this._onDidClose.fire(Object.freeze({document:t})))})),t.push(e.onWillSaveTextDocument(e=>{const t=this._syncedDocuments.get(e.textDocument.uri);void 0!==t&&this._onWillSave.fire(Object.freeze({document:t,reason:e.reason}))})),t.push(e.onWillSaveTextDocumentWaitUntil((e,t)=>{const i=this._syncedDocuments.get(e.textDocument.uri);return void 0!==i&&this._willSaveWaitUntil?this._willSaveWaitUntil(Object.freeze({document:i,reason:e.reason}),t):[]})),t.push(e.onDidSaveTextDocument(e=>{const t=this._syncedDocuments.get(e.textDocument.uri);void 0!==t&&this._onDidSave.fire(Object.freeze({document:t}))})),n.Disposable.create(()=>{t.forEach(e=>e.dispose())})}}},5026(e,t,i){"use strict";t.TypeHierarchyFeature=void 0;const n=i(8766);t.TypeHierarchyFeature=e=>class extends e{get typeHierarchy(){return{onPrepare:e=>this.connection.onRequest(n.TypeHierarchyPrepareRequest.type,(t,i)=>e(t,i,this.attachWorkDoneProgress(t),void 0)),onSupertypes:e=>{const t=n.TypeHierarchySupertypesRequest.type;return this.connection.onRequest(t,(i,n)=>e(i,n,this.attachWorkDoneProgress(i),this.attachPartialResultProgress(t,i)))},onSubtypes:e=>{const t=n.TypeHierarchySubtypesRequest.type;return this.connection.onRequest(t,(i,n)=>e(i,n,this.attachWorkDoneProgress(i),this.attachPartialResultProgress(t,i)))}}}}},8867(e,t){"use strict";function i(e){return"string"==typeof e||e instanceof String}function n(e){return"function"==typeof e}function r(e){return Array.isArray(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.boolean=function(e){return!0===e||!1===e},t.string=i,t.number=function(e){return"number"==typeof e||e instanceof Number},t.error=function(e){return e instanceof Error},t.func=n,t.array=r,t.stringArray=function(e){return r(e)&&e.every(e=>i(e))},t.typedArray=function(e,t){return Array.isArray(e)&&e.every(t)},t.thenable=function(e){return e&&n(e.then)}},6116(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.empty=void 0,t.v4=r,t.isUUID=s,t.parse=function(e){if(!s(e))throw new Error("invalid uuid");return new i(e)},t.generateUuid=function(){return r().asHex()};class i{_value;constructor(e){this._value=e}asHex(){return this._value}equals(e){return this.asHex()===e.asHex()}}class n extends i{static _chars=["0","1","2","3","4","5","6","6","7","8","9","a","b","c","d","e","f"];static _timeHighBits=["8","9","a","b"];static _oneOf(e){return e[Math.floor(e.length*Math.random())]}static _randomHex(){return n._oneOf(n._chars)}constructor(){super([n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),"-",n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),"-","4",n._randomHex(),n._randomHex(),n._randomHex(),"-",n._oneOf(n._timeHighBits),n._randomHex(),n._randomHex(),n._randomHex(),"-",n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex()].join(""))}}function r(){return new n}t.empty=new i("00000000-0000-0000-0000-000000000000");const o=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function s(e){return o.test(e)}},2112(e,t,i){"use strict";t.WorkspaceFoldersFeature=void 0;const n=i(8766);t.WorkspaceFoldersFeature=e=>class extends e{_onDidChangeWorkspaceFolders;_unregistration;_notificationIsAutoRegistered;constructor(){super(),this._notificationIsAutoRegistered=!1}initialize(e){super.initialize(e);const t=e.workspace;t&&t.workspaceFolders&&(this._onDidChangeWorkspaceFolders=new n.Emitter,this.connection.onNotification(n.DidChangeWorkspaceFoldersNotification.type,e=>{this._onDidChangeWorkspaceFolders.fire(e.event)}))}fillServerCapabilities(e){super.fillServerCapabilities(e);const t=e.workspace?.workspaceFolders?.changeNotifications;this._notificationIsAutoRegistered=!0===t||"string"==typeof t}getWorkspaceFolders(){return this.connection.sendRequest(n.WorkspaceFoldersRequest.type)}get onDidChangeWorkspaceFolders(){if(!this._onDidChangeWorkspaceFolders)throw new Error("Client doesn't support sending workspace folder change events.");return this._notificationIsAutoRegistered||this._unregistration||(this._unregistration=this.connection.client.register(n.DidChangeWorkspaceFoldersNotification.type)),this._onDidChangeWorkspaceFolders.event}}},3911(e,t,i){"use strict";var n,r=this&&this.__createBinding||(Object.create?function(e,t,i,n){void 0===n&&(n=i);var r=Object.getOwnPropertyDescriptor(t,i);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[i]}}),Object.defineProperty(e,n,r)}:function(e,t,i,n){void 0===n&&(n=i),e[n]=t[i]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||(n=function(e){return n=Object.getOwnPropertyNames||function(e){var t=[];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[t.length]=i);return t},n(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i=n(e),s=0;s<i.length;s++)"default"!==i[s]&&r(t,e,i[s]);return o(t,e),t});Object.defineProperty(t,"__esModule",{value:!0}),t.FileSystem=void 0,t.uriToFilePath=function(e){const t=a.parse(e);if("file:"!==t.protocol||!t.path)return;const i=t.path.split("/");for(let e=0,t=i.length;e<t;e++)i[e]=decodeURIComponent(i[e]);if("win32"===process.platform&&i.length>1){const e=i[0],t=i[1];0===e.length&&t.length>1&&":"===t[1]&&i.shift()}return c.normalize(i.join("/"))},t.resolve=d,t.resolveGlobalNodePath=p,t.resolveGlobalYarnPath=function(e){let t="yarn";const i={encoding:"utf8"};h()&&(t="yarn.cmd",i.shell=!0);const n=()=>{};try{process.on("SIGPIPE",n);const r=(0,u.spawnSync)(t,["global","dir","--json"],i),o=r.stdout;if(!o)return void(e&&(e("'yarn global dir' didn't return a value."),r.stderr&&e(r.stderr)));const s=o.trim().split(/\r?\n/);for(const e of s)try{const t=JSON.parse(e);if("log"===t.type)return c.join(t.data,"node_modules")}catch(e){}return}catch(e){return}finally{process.removeListener("SIGPIPE",n)}},t.resolveModulePath=function(e,t,i,n){return i?(c.isAbsolute(i)||(i=c.join(e,i)),d(t,i,i,n).then(e=>f.isParent(i,e)?e:Promise.reject(new Error(`Failed to load ${t} from node path location.`))).then(void 0,i=>d(t,p(n),e,n))):d(t,p(n),e,n)};const a=s(i(7016)),c=s(i(6928)),l=s(i(9896)),u=i(5317);function h(){return"win32"===process.platform}function d(e,t,i,n){const r="NODE_PATH",o=["var p = process;","p.on('message',function(m){","if(m.c==='e'){","p.exit(0);","}","else if(m.c==='rs'){","try{","var r=require.resolve(m.a);","p.send({c:'r',s:true,r:r});","}","catch(err){","p.send({c:'r',s:false});","}","}","});"].join("");return new Promise((s,a)=>{const h=process.env,d=Object.create(null);Object.keys(h).forEach(e=>d[e]=h[e]),t&&l.existsSync(t)&&(d[r]?d[r]=t+c.delimiter+d[r]:d[r]=t,n&&n(`NODE_PATH value is: ${d[r]}`)),d.ELECTRON_RUN_AS_NODE="1";try{const t=(0,u.fork)("",[],{cwd:i,env:d,execArgv:["-e",o]});if(void 0===t.pid)return void a(new Error(`Starting process to resolve node module ${e} failed`));t.on("error",e=>{a(e)}),t.on("message",i=>{"r"===i.c&&(t.send({c:"e"}),i.s?s(i.r):a(new Error(`Failed to resolve module: ${e}`)))});const n={c:"rs",a:e};t.send(n)}catch(e){a(e)}})}function p(e){let t="npm";const i=Object.create(null);Object.keys(process.env).forEach(e=>i[e]=process.env[e]),i.NO_UPDATE_NOTIFIER="true";const n={encoding:"utf8",env:i};h()&&(t="npm.cmd",n.shell=!0);const r=()=>{};try{process.on("SIGPIPE",r);const i=(0,u.spawnSync)(t,["config","get","prefix"],n).stdout;if(!i)return void(e&&e("'npm config get prefix' didn't return a value."));const o=i.trim();return e&&e(`'npm config get prefix' value is: ${o}`),o.length>0?h()?c.join(o,"node_modules"):c.join(o,"lib","node_modules"):void 0}catch(e){return}finally{process.removeListener("SIGPIPE",r)}}var f;!function(e){let t;function i(){return void 0!==t||(t=!("win32"===process.platform||l.existsSync(__filename.toUpperCase())&&l.existsSync(__filename.toLowerCase()))),t}e.isCaseSensitive=i,e.isParent=function(e,t){return i()?0===c.normalize(t).indexOf(c.normalize(e)):0===c.normalize(t).toLowerCase().indexOf(c.normalize(e).toLowerCase())}}(f||(t.FileSystem=f={}))},1327(e,t,i){"use strict";var n,r=this&&this.__createBinding||(Object.create?function(e,t,i,n){void 0===n&&(n=i);var r=Object.getOwnPropertyDescriptor(t,i);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[i]}}),Object.defineProperty(e,n,r)}:function(e,t,i,n){void 0===n&&(n=i),e[n]=t[i]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||(n=function(e){return n=Object.getOwnPropertyNames||function(e){var t=[];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[t.length]=i);return t},n(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i=n(e),s=0;s<i.length;s++)"default"!==i[s]&&r(t,e,i[s]);return o(t,e),t}),a=this&&this.__exportStar||function(e,t){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(t,i)||r(t,e,i)};Object.defineProperty(t,"__esModule",{value:!0}),t.Files=void 0,t.createConnection=function(e,t,i,n){let r,o,s,a;return void 0!==e&&"features"===e.__brand&&(r=e,e=t,t=i,i=n),d.ConnectionStrategy.is(e)||d.ConnectionOptions.is(e)?a=e:(o=e,s=t,a=i),function(e,t,i,n){let r=!1;if(!e&&!t&&process.argv.length>2){let i,n;const o=process.argv.slice(2);for(let s=0;s<o.length;s++){const a=o[s];if("--node-ipc"===a){e=new d.IPCMessageReader(process),t=new d.IPCMessageWriter(process);break}if("--stdio"===a){r=!0,e=process.stdin,t=process.stdout;break}if("--socket"===a){i=parseInt(o[s+1]);break}if("--pipe"===a){n=o[s+1];break}{const e=a.split("=");if("--socket"===e[0]){i=parseInt(e[1]);break}if("--pipe"===e[0]){n=e[1];break}}}if(i){const n=(0,d.createServerSocketTransport)(i);e=n[0],t=n[1]}else if(n){const i=(0,d.createServerPipeTransport)(n);e=i[0],t=i[1]}}const o="Use arguments of createConnection or set command line parameters: '--node-ipc', '--stdio' or '--socket={number}'";if(!e)throw new Error("Connection input stream is not set. "+o);if(!t)throw new Error("Connection output stream is not set. "+o);if(l.func(e.read)&&l.func(e.on)){const t=e;t.on("end",()=>{process.exit(g?0:1)}),t.on("close",()=>{process.exit(g?0:1)})}return(0,u.createConnection)(n=>{const o=(0,d.createProtocolConnection)(e,t,n,i);return r&&function(e){function t(e){return e.map(e=>"string"==typeof e?e:(0,c.inspect)(e)).join(" ")}const i=new Map;console.assert=function(i,...n){if(!i)if(0===n.length)e.error("Assertion failed");else{const[i,...r]=n;e.error(`Assertion failed: ${i} ${t(r)}`)}},console.count=function(t="default"){const n=String(t);let r=i.get(n)??0;r+=1,i.set(n,r),e.log(`${n}: ${n}`)},console.countReset=function(e){void 0===e?i.clear():i.delete(String(e))},console.debug=function(...i){e.log(t(i))},console.dir=function(t,i){e.log((0,c.inspect)(t,i))},console.log=function(...i){e.log(t(i))},console.error=function(...i){e.error(t(i))},console.trace=function(...i){const n=(new Error).stack.replace(/(.+\n){2}/,"");let r="Trace";0!==i.length&&(r+=`: ${t(i)}`),e.log(`${r}\n${n}`)},console.warn=function(...i){e.warn(t(i))}}(n),o},m,n)}(o,s,a,r)};const c=i(7975),l=s(i(8867)),u=i(7874),h=s(i(3911)),d=i(7354);var p;a(i(7354),t),a(i(2861),t),function(e){e.uriToFilePath=h.uriToFilePath,e.resolveGlobalNodePath=h.resolveGlobalNodePath,e.resolveGlobalYarnPath=h.resolveGlobalYarnPath,e.resolve=h.resolve,e.resolveModulePath=h.resolveModulePath}(p||(t.Files=p={}));let f,g=!1;!function(){const e="--clientProcessId";function t(e){try{const t=parseInt(e);isNaN(t)||(f=setInterval(()=>{try{process.kill(t,0)}catch(e){process.exit(g?0:1)}},3e3))}catch(e){}}for(let i=2;i<process.argv.length;i++){const n=process.argv[i];if(n===e&&i+1<process.argv.length)return void t(process.argv[i+1]);{const i=n.split("=");i[0]===e&&t(i[1])}}}();const m={initialize:e=>{const t=e.processId;l.number(t)&&void 0===f&&setInterval(()=>{try{process.kill(t,0)}catch(e){process.exit(g?0:1)}},3e3)},get shutdownReceived(){return g},set shutdownReceived(e){g=e},exit:e=>{process.exit(e)}}},8945(e){var t;t=()=>(()=>{"use strict";var e={975:e=>{function t(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}function i(e,t){for(var i,n="",r=0,o=-1,s=0,a=0;a<=e.length;++a){if(a<e.length)i=e.charCodeAt(a);else{if(47===i)break;i=47}if(47===i){if(o===a-1||1===s);else if(o!==a-1&&2===s){if(n.length<2||2!==r||46!==n.charCodeAt(n.length-1)||46!==n.charCodeAt(n.length-2))if(n.length>2){var c=n.lastIndexOf("/");if(c!==n.length-1){-1===c?(n="",r=0):r=(n=n.slice(0,c)).length-1-n.lastIndexOf("/"),o=a,s=0;continue}}else if(2===n.length||1===n.length){n="",r=0,o=a,s=0;continue}t&&(n.length>0?n+="/..":n="..",r=2)}else n.length>0?n+="/"+e.slice(o+1,a):n=e.slice(o+1,a),r=a-o-1;o=a,s=0}else 46===i&&-1!==s?++s:s=-1}return n}var n={resolve:function(){for(var e,n="",r=!1,o=arguments.length-1;o>=-1&&!r;o--){var s;o>=0?s=arguments[o]:(void 0===e&&(e=process.cwd()),s=e),t(s),0!==s.length&&(n=s+"/"+n,r=47===s.charCodeAt(0))}return n=i(n,!r),r?n.length>0?"/"+n:"/":n.length>0?n:"."},normalize:function(e){if(t(e),0===e.length)return".";var n=47===e.charCodeAt(0),r=47===e.charCodeAt(e.length-1);return 0!==(e=i(e,!n)).length||n||(e="."),e.length>0&&r&&(e+="/"),n?"/"+e:e},isAbsolute:function(e){return t(e),e.length>0&&47===e.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var e,i=0;i<arguments.length;++i){var r=arguments[i];t(r),r.length>0&&(void 0===e?e=r:e+="/"+r)}return void 0===e?".":n.normalize(e)},relative:function(e,i){if(t(e),t(i),e===i)return"";if((e=n.resolve(e))===(i=n.resolve(i)))return"";for(var r=1;r<e.length&&47===e.charCodeAt(r);++r);for(var o=e.length,s=o-r,a=1;a<i.length&&47===i.charCodeAt(a);++a);for(var c=i.length-a,l=s<c?s:c,u=-1,h=0;h<=l;++h){if(h===l){if(c>l){if(47===i.charCodeAt(a+h))return i.slice(a+h+1);if(0===h)return i.slice(a+h)}else s>l&&(47===e.charCodeAt(r+h)?u=h:0===h&&(u=0));break}var d=e.charCodeAt(r+h);if(d!==i.charCodeAt(a+h))break;47===d&&(u=h)}var p="";for(h=r+u+1;h<=o;++h)h!==o&&47!==e.charCodeAt(h)||(0===p.length?p+="..":p+="/..");return p.length>0?p+i.slice(a+u):(a+=u,47===i.charCodeAt(a)&&++a,i.slice(a))},_makeLong:function(e){return e},dirname:function(e){if(t(e),0===e.length)return".";for(var i=e.charCodeAt(0),n=47===i,r=-1,o=!0,s=e.length-1;s>=1;--s)if(47===(i=e.charCodeAt(s))){if(!o){r=s;break}}else o=!1;return-1===r?n?"/":".":n&&1===r?"//":e.slice(0,r)},basename:function(e,i){if(void 0!==i&&"string"!=typeof i)throw new TypeError('"ext" argument must be a string');t(e);var n,r=0,o=-1,s=!0;if(void 0!==i&&i.length>0&&i.length<=e.length){if(i.length===e.length&&i===e)return"";var a=i.length-1,c=-1;for(n=e.length-1;n>=0;--n){var l=e.charCodeAt(n);if(47===l){if(!s){r=n+1;break}}else-1===c&&(s=!1,c=n+1),a>=0&&(l===i.charCodeAt(a)?-1==--a&&(o=n):(a=-1,o=c))}return r===o?o=c:-1===o&&(o=e.length),e.slice(r,o)}for(n=e.length-1;n>=0;--n)if(47===e.charCodeAt(n)){if(!s){r=n+1;break}}else-1===o&&(s=!1,o=n+1);return-1===o?"":e.slice(r,o)},extname:function(e){t(e);for(var i=-1,n=0,r=-1,o=!0,s=0,a=e.length-1;a>=0;--a){var c=e.charCodeAt(a);if(47!==c)-1===r&&(o=!1,r=a+1),46===c?-1===i?i=a:1!==s&&(s=1):-1!==i&&(s=-1);else if(!o){n=a+1;break}}return-1===i||-1===r||0===s||1===s&&i===r-1&&i===n+1?"":e.slice(i,r)},format:function(e){if(null===e||"object"!=typeof e)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return function(e,t){var i=t.dir||t.root,n=t.base||(t.name||"")+(t.ext||"");return i?i===t.root?i+n:i+"/"+n:n}(0,e)},parse:function(e){t(e);var i={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return i;var n,r=e.charCodeAt(0),o=47===r;o?(i.root="/",n=1):n=0;for(var s=-1,a=0,c=-1,l=!0,u=e.length-1,h=0;u>=n;--u)if(47!==(r=e.charCodeAt(u)))-1===c&&(l=!1,c=u+1),46===r?-1===s?s=u:1!==h&&(h=1):-1!==s&&(h=-1);else if(!l){a=u+1;break}return-1===s||-1===c||0===h||1===h&&s===c-1&&s===a+1?-1!==c&&(i.base=i.name=0===a&&o?e.slice(1,c):e.slice(a,c)):(0===a&&o?(i.name=e.slice(1,s),i.base=e.slice(1,c)):(i.name=e.slice(a,s),i.base=e.slice(a,c)),i.ext=e.slice(s,c)),a>0?i.dir=e.slice(0,a-1):o&&(i.dir="/"),i},sep:"/",delimiter:":",win32:null,posix:null};n.posix=n,e.exports=n},70:(e,t)=>{if(Object.defineProperty(t,"__esModule",{value:!0}),t.isWindows=void 0,"object"==typeof process)t.isWindows="win32"===process.platform;else if("object"==typeof navigator){let e=navigator.userAgent;t.isWindows=e.indexOf("Windows")>=0}},231:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.uriToFsPath=t.URI=void 0;const n=i(70),r=/^\w[\w\d+.-]*$/,o=/^\//,s=/^\/\//;function a(e,t){if(!e.scheme&&t)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${e.authority}", path: "${e.path}", query: "${e.query}", fragment: "${e.fragment}"}`);if(e.scheme&&!r.test(e.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(e.path)if(e.authority){if(!o.test(e.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(s.test(e.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}const c="",l="/",u=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class h{static isUri(e){return e instanceof h||!!e&&"string"==typeof e.authority&&"string"==typeof e.fragment&&"string"==typeof e.path&&"string"==typeof e.query&&"string"==typeof e.scheme&&"string"==typeof e.fsPath&&"function"==typeof e.with&&"function"==typeof e.toString}scheme;authority;path;query;fragment;constructor(e,t,i,n,r,o=!1){"object"==typeof e?(this.scheme=e.scheme||c,this.authority=e.authority||c,this.path=e.path||c,this.query=e.query||c,this.fragment=e.fragment||c):(this.scheme=function(e,t){return e||t?e:"file"}(e,o),this.authority=t||c,this.path=function(e,t){switch(e){case"https":case"http":case"file":t?t[0]!==l&&(t=l+t):t=l}return t}(this.scheme,i||c),this.query=n||c,this.fragment=r||c,a(this,o))}get fsPath(){return y(this,!1)}with(e){if(!e)return this;let{scheme:t,authority:i,path:n,query:r,fragment:o}=e;return void 0===t?t=this.scheme:null===t&&(t=c),void 0===i?i=this.authority:null===i&&(i=c),void 0===n?n=this.path:null===n&&(n=c),void 0===r?r=this.query:null===r&&(r=c),void 0===o?o=this.fragment:null===o&&(o=c),t===this.scheme&&i===this.authority&&n===this.path&&r===this.query&&o===this.fragment?this:new p(t,i,n,r,o)}static parse(e,t=!1){const i=u.exec(e);return i?new p(i[2]||c,w(i[4]||c),w(i[5]||c),w(i[7]||c),w(i[9]||c),t):new p(c,c,c,c,c)}static file(e){let t=c;if(n.isWindows&&(e=e.replace(/\\/g,l)),e[0]===l&&e[1]===l){const i=e.indexOf(l,2);-1===i?(t=e.substring(2),e=l):(t=e.substring(2,i),e=e.substring(i)||l)}return new p("file",t,e,c,c)}static from(e){const t=new p(e.scheme,e.authority,e.path,e.query,e.fragment);return a(t,!0),t}toString(e=!1){return v(this,e)}toJSON(){return this}static revive(e){if(e){if(e instanceof h)return e;{const t=new p(e);return t._formatted=e.external,t._fsPath=e._sep===d?e.fsPath:null,t}}return e}}t.URI=h;const d=n.isWindows?1:void 0;class p extends h{_formatted=null;_fsPath=null;get fsPath(){return this._fsPath||(this._fsPath=y(this,!1)),this._fsPath}toString(e=!1){return e?v(this,!0):(this._formatted||(this._formatted=v(this,!1)),this._formatted)}toJSON(){const e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=d),this._formatted&&(e.external=this._formatted),this.path&&(e.path=this.path),this.scheme&&(e.scheme=this.scheme),this.authority&&(e.authority=this.authority),this.query&&(e.query=this.query),this.fragment&&(e.fragment=this.fragment),e}}const f={58:"%3A",47:"%2F",63:"%3F",35:"%23",91:"%5B",93:"%5D",64:"%40",33:"%21",36:"%24",38:"%26",39:"%27",40:"%28",41:"%29",42:"%2A",43:"%2B",44:"%2C",59:"%3B",61:"%3D",32:"%20"};function g(e,t,i){let n,r=-1;for(let o=0;o<e.length;o++){const s=e.charCodeAt(o);if(s>=97&&s<=122||s>=65&&s<=90||s>=48&&s<=57||45===s||46===s||95===s||126===s||t&&47===s||i&&91===s||i&&93===s||i&&58===s)-1!==r&&(n+=encodeURIComponent(e.substring(r,o)),r=-1),void 0!==n&&(n+=e.charAt(o));else{void 0===n&&(n=e.substr(0,o));const t=f[s];void 0!==t?(-1!==r&&(n+=encodeURIComponent(e.substring(r,o)),r=-1),n+=t):-1===r&&(r=o)}}return-1!==r&&(n+=encodeURIComponent(e.substring(r))),void 0!==n?n:e}function m(e){let t;for(let i=0;i<e.length;i++){const n=e.charCodeAt(i);35===n||63===n?(void 0===t&&(t=e.substr(0,i)),t+=f[n]):void 0!==t&&(t+=e[i])}return void 0!==t?t:e}function y(e,t){let i;return i=e.authority&&e.path.length>1&&"file"===e.scheme?`//${e.authority}${e.path}`:47===e.path.charCodeAt(0)&&(e.path.charCodeAt(1)>=65&&e.path.charCodeAt(1)<=90||e.path.charCodeAt(1)>=97&&e.path.charCodeAt(1)<=122)&&58===e.path.charCodeAt(2)?t?e.path.substr(1):e.path[1].toLowerCase()+e.path.substr(2):e.path,n.isWindows&&(i=i.replace(/\//g,"\\")),i}function v(e,t){const i=t?m:g;let n="",{scheme:r,authority:o,path:s,query:a,fragment:c}=e;if(r&&(n+=r,n+=":"),(o||"file"===r)&&(n+=l,n+=l),o){let e=o.indexOf("@");if(-1!==e){const t=o.substr(0,e);o=o.substr(e+1),e=t.lastIndexOf(":"),-1===e?n+=i(t,!1,!1):(n+=i(t.substr(0,e),!1,!1),n+=":",n+=i(t.substr(e+1),!1,!0)),n+="@"}o=o.toLowerCase(),e=o.lastIndexOf(":"),-1===e?n+=i(o,!1,!0):(n+=i(o.substr(0,e),!1,!0),n+=o.substr(e))}if(s){if(s.length>=3&&47===s.charCodeAt(0)&&58===s.charCodeAt(2)){const e=s.charCodeAt(1);e>=65&&e<=90&&(s=`/${String.fromCharCode(e+32)}:${s.substr(3)}`)}else if(s.length>=2&&58===s.charCodeAt(1)){const e=s.charCodeAt(0);e>=65&&e<=90&&(s=`${String.fromCharCode(e+32)}:${s.substr(2)}`)}n+=i(s,!0,!1)}return a&&(n+="?",n+=i(a,!1,!1)),c&&(n+="#",n+=t?c:g(c,!1,!1)),n}function _(e){try{return decodeURIComponent(e)}catch{return e.length>3?e.substr(0,3)+_(e.substr(3)):e}}t.uriToFsPath=y;const b=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function w(e){return e.match(b)?e.replace(b,e=>_(e)):e}},552:function(e,t,i){var n=this&&this.__createBinding||(Object.create?function(e,t,i,n){void 0===n&&(n=i);var r=Object.getOwnPropertyDescriptor(t,i);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[i]}}),Object.defineProperty(e,n,r)}:function(e,t,i,n){void 0===n&&(n=i),e[n]=t[i]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)"default"!==i&&Object.prototype.hasOwnProperty.call(e,i)&&n(t,e,i);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.Utils=void 0;const s=o(i(975)),a=s.posix||s,c="/";var l;!function(e){e.joinPath=function(e,...t){return e.with({path:a.join(e.path,...t)})},e.resolvePath=function(e,...t){let i=e.path,n=!1;i[0]!==c&&(i=c+i,n=!0);let r=a.resolve(i,...t);return n&&r[0]===c&&!e.authority&&(r=r.substring(1)),e.with({path:r})},e.dirname=function(e){if(0===e.path.length||e.path===c)return e;let t=a.dirname(e.path);return 1===t.length&&46===t.charCodeAt(0)&&(t=""),e.with({path:t})},e.basename=function(e){return a.basename(e.path)},e.extname=function(e){return a.extname(e.path)}}(l||(t.Utils=l={}))}},t={};function i(n){var r=t[n];if(void 0!==r)return r.exports;var o=t[n]={exports:{}};return e[n].call(o.exports,o,o.exports,i),o.exports}var n={};return(()=>{var e=n;Object.defineProperty(e,"__esModule",{value:!0}),e.Utils=e.URI=void 0;const t=i(231);Object.defineProperty(e,"URI",{enumerable:!0,get:function(){return t.URI}});const r=i(552);Object.defineProperty(e,"Utils",{enumerable:!0,get:function(){return r.Utils}})})(),n})(),e.exports=t()},3177(e,t){(function(){"use strict";t.stripBOM=function(e){return"\ufeff"===e[0]?e.substring(1):e}}).call(this)},6712(e,t,i){(function(){"use strict";var e,n,r,o,s,a={}.hasOwnProperty;e=i(9665),n=i(6465).defaults,o=function(e){return"string"==typeof e&&(e.indexOf("&")>=0||e.indexOf(">")>=0||e.indexOf("<")>=0)},s=function(e){return"<![CDATA["+r(e)+"]]>"},r=function(e){return e.replace("]]>","]]]]><![CDATA[>")},t.Builder=function(){function t(e){var t,i,r;for(t in this.options={},i=n[.2])a.call(i,t)&&(r=i[t],this.options[t]=r);for(t in e)a.call(e,t)&&(r=e[t],this.options[t]=r)}return t.prototype.buildObject=function(t){var i,r,c,l,u,h;return i=this.options.attrkey,r=this.options.charkey,1===Object.keys(t).length&&this.options.rootName===n[.2].rootName?t=t[u=Object.keys(t)[0]]:u=this.options.rootName,h=this,c=function(e,t){var n,l,u,d,p,f;if("object"!=typeof t)h.options.cdata&&o(t)?e.raw(s(t)):e.txt(t);else if(Array.isArray(t)){for(d in t)if(a.call(t,d))for(p in l=t[d])u=l[p],e=c(e.ele(p),u).up()}else for(p in t)if(a.call(t,p))if(l=t[p],p===i){if("object"==typeof l)for(n in l)f=l[n],e=e.att(n,f)}else if(p===r)e=h.options.cdata&&o(l)?e.raw(s(l)):e.txt(l);else if(Array.isArray(l))for(d in l)a.call(l,d)&&(e="string"==typeof(u=l[d])?h.options.cdata&&o(u)?e.ele(p).raw(s(u)).up():e.ele(p,u).up():c(e.ele(p),u).up());else"object"==typeof l?e=c(e.ele(p),l).up():"string"==typeof l&&h.options.cdata&&o(l)?e=e.ele(p).raw(s(l)).up():(null==l&&(l=""),e=e.ele(p,l.toString()).up());return e},l=e.create(u,this.options.xmldec,this.options.doctype,{headless:this.options.headless,allowSurrogateChars:this.options.allowSurrogateChars}),c(l,t).end(this.options.renderOpts)},t}()}).call(this)},6465(e,t){(function(){t.defaults={.1:{explicitCharkey:!1,trim:!0,normalize:!0,normalizeTags:!1,attrkey:"@",charkey:"#",explicitArray:!1,ignoreAttrs:!1,mergeAttrs:!1,explicitRoot:!1,validator:null,xmlns:!1,explicitChildren:!1,childkey:"@@",charsAsChildren:!1,includeWhiteChars:!1,async:!1,strict:!0,attrNameProcessors:null,attrValueProcessors:null,tagNameProcessors:null,valueProcessors:null,emptyTag:""},.2:{explicitCharkey:!1,trim:!1,normalize:!1,normalizeTags:!1,attrkey:"$",charkey:"_",explicitArray:!0,ignoreAttrs:!1,mergeAttrs:!1,explicitRoot:!0,validator:null,xmlns:!1,explicitChildren:!1,preserveChildrenOrder:!1,childkey:"$$",charsAsChildren:!1,includeWhiteChars:!1,async:!1,strict:!0,attrNameProcessors:null,attrValueProcessors:null,tagNameProcessors:null,valueProcessors:null,rootName:"root",xmldec:{version:"1.0",encoding:"UTF-8",standalone:!0},doctype:null,renderOpts:{pretty:!0,indent:" ",newline:"\n"},headless:!1,chunkSize:1e4,emptyTag:"",cdata:!1}}}).call(this)},1912(e,t,i){(function(){"use strict";var e,n,r,o,s,a,c,l,u,h=function(e,t){return function(){return e.apply(t,arguments)}},d={}.hasOwnProperty;l=i(4043),o=i(4434),e=i(3177),c=i(2114),u=i(5938).setImmediate,n=i(6465).defaults,s=function(e){return"object"==typeof e&&null!=e&&0===Object.keys(e).length},a=function(e,t,i){var n,r;for(n=0,r=e.length;n<r;n++)t=(0,e[n])(t,i);return t},r=function(e,t,i){var n;return(n=Object.create(null)).value=i,n.writable=!0,n.enumerable=!0,n.configurable=!0,Object.defineProperty(e,t,n)},t.Parser=function(i){function o(e){var i,r,o;if(this.parseStringPromise=h(this.parseStringPromise,this),this.parseString=h(this.parseString,this),this.reset=h(this.reset,this),this.assignOrPush=h(this.assignOrPush,this),this.processAsync=h(this.processAsync,this),!(this instanceof t.Parser))return new t.Parser(e);for(i in this.options={},r=n[.2])d.call(r,i)&&(o=r[i],this.options[i]=o);for(i in e)d.call(e,i)&&(o=e[i],this.options[i]=o);this.options.xmlns&&(this.options.xmlnskey=this.options.attrkey+"ns"),this.options.normalizeTags&&(this.options.tagNameProcessors||(this.options.tagNameProcessors=[]),this.options.tagNameProcessors.unshift(c.normalize)),this.reset()}return function(e,t){for(var i in t)d.call(t,i)&&(e[i]=t[i]);function n(){this.constructor=e}n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype}(o,i),o.prototype.processAsync=function(){var e,t;try{return this.remaining.length<=this.options.chunkSize?(e=this.remaining,this.remaining="",this.saxParser=this.saxParser.write(e),this.saxParser.close()):(e=this.remaining.substr(0,this.options.chunkSize),this.remaining=this.remaining.substr(this.options.chunkSize,this.remaining.length),this.saxParser=this.saxParser.write(e),u(this.processAsync))}catch(e){if(t=e,!this.saxParser.errThrown)return this.saxParser.errThrown=!0,this.emit(t)}},o.prototype.assignOrPush=function(e,t,i){return t in e?(e[t]instanceof Array||r(e,t,[e[t]]),e[t].push(i)):this.options.explicitArray?r(e,t,[i]):r(e,t,i)},o.prototype.reset=function(){var e,t,i,n,o;return this.removeAllListeners(),this.saxParser=l.parser(this.options.strict,{trim:!1,normalize:!1,xmlns:this.options.xmlns}),this.saxParser.errThrown=!1,this.saxParser.onerror=(o=this,function(e){if(o.saxParser.resume(),!o.saxParser.errThrown)return o.saxParser.errThrown=!0,o.emit("error",e)}),this.saxParser.onend=function(e){return function(){if(!e.saxParser.ended)return e.saxParser.ended=!0,e.emit("end",e.resultObject)}}(this),this.saxParser.ended=!1,this.EXPLICIT_CHARKEY=this.options.explicitCharkey,this.resultObject=null,n=[],e=this.options.attrkey,t=this.options.charkey,this.saxParser.onopentag=function(i){return function(o){var s,c,l,u,h;if((l={})[t]="",!i.options.ignoreAttrs)for(s in h=o.attributes)d.call(h,s)&&(e in l||i.options.mergeAttrs||(l[e]={}),c=i.options.attrValueProcessors?a(i.options.attrValueProcessors,o.attributes[s],s):o.attributes[s],u=i.options.attrNameProcessors?a(i.options.attrNameProcessors,s):s,i.options.mergeAttrs?i.assignOrPush(l,u,c):r(l[e],u,c));return l["#name"]=i.options.tagNameProcessors?a(i.options.tagNameProcessors,o.name):o.name,i.options.xmlns&&(l[i.options.xmlnskey]={uri:o.uri,local:o.local}),n.push(l)}}(this),this.saxParser.onclosetag=function(e){return function(){var i,o,c,l,u,h,p,f,g,m;if(h=n.pop(),u=h["#name"],e.options.explicitChildren&&e.options.preserveChildrenOrder||delete h["#name"],!0===h.cdata&&(i=h.cdata,delete h.cdata),g=n[n.length-1],h[t].match(/^\s*$/)&&!i?(o=h[t],delete h[t]):(e.options.trim&&(h[t]=h[t].trim()),e.options.normalize&&(h[t]=h[t].replace(/\s{2,}/g," ").trim()),h[t]=e.options.valueProcessors?a(e.options.valueProcessors,h[t],u):h[t],1===Object.keys(h).length&&t in h&&!e.EXPLICIT_CHARKEY&&(h=h[t])),s(h)&&(h="function"==typeof e.options.emptyTag?e.options.emptyTag():""!==e.options.emptyTag?e.options.emptyTag:o),null!=e.options.validator&&(m="/"+function(){var e,t,i;for(i=[],e=0,t=n.length;e<t;e++)l=n[e],i.push(l["#name"]);return i}().concat(u).join("/"),function(){var t;try{return h=e.options.validator(m,g&&g[u],h)}catch(i){return t=i,e.emit("error",t)}}()),e.options.explicitChildren&&!e.options.mergeAttrs&&"object"==typeof h)if(e.options.preserveChildrenOrder){if(g){for(c in g[e.options.childkey]=g[e.options.childkey]||[],p={},h)d.call(h,c)&&r(p,c,h[c]);g[e.options.childkey].push(p),delete h["#name"],1===Object.keys(h).length&&t in h&&!e.EXPLICIT_CHARKEY&&(h=h[t])}}else l={},e.options.attrkey in h&&(l[e.options.attrkey]=h[e.options.attrkey],delete h[e.options.attrkey]),!e.options.charsAsChildren&&e.options.charkey in h&&(l[e.options.charkey]=h[e.options.charkey],delete h[e.options.charkey]),Object.getOwnPropertyNames(h).length>0&&(l[e.options.childkey]=h),h=l;return n.length>0?e.assignOrPush(g,u,h):(e.options.explicitRoot&&(f=h,r(h={},u,f)),e.resultObject=h,e.saxParser.ended=!0,e.emit("end",e.resultObject))}}(this),i=function(e){return function(i){var r,o;if(o=n[n.length-1])return o[t]+=i,e.options.explicitChildren&&e.options.preserveChildrenOrder&&e.options.charsAsChildren&&(e.options.includeWhiteChars||""!==i.replace(/\\n/g,"").trim())&&(o[e.options.childkey]=o[e.options.childkey]||[],(r={"#name":"__text__"})[t]=i,e.options.normalize&&(r[t]=r[t].replace(/\s{2,}/g," ").trim()),o[e.options.childkey].push(r)),o}}(this),this.saxParser.ontext=i,this.saxParser.oncdata=function(e){var t;if(t=i(e))return t.cdata=!0}},o.prototype.parseString=function(t,i){var n;null!=i&&"function"==typeof i&&(this.on("end",function(e){return this.reset(),i(null,e)}),this.on("error",function(e){return this.reset(),i(e)}));try{return""===(t=t.toString()).trim()?(this.emit("end",null),!0):(t=e.stripBOM(t),this.options.async?(this.remaining=t,u(this.processAsync),this.saxParser):this.saxParser.write(t).close())}catch(e){if(n=e,!this.saxParser.errThrown&&!this.saxParser.ended)return this.emit("error",n),this.saxParser.errThrown=!0;if(this.saxParser.ended)throw n}},o.prototype.parseStringPromise=function(e){return new Promise((t=this,function(i,n){return t.parseString(e,function(e,t){return e?n(e):i(t)})}));var t},o}(o),t.parseString=function(e,i,n){var r,o;return null!=n?("function"==typeof n&&(r=n),"object"==typeof i&&(o=i)):("function"==typeof i&&(r=i),o={}),new t.Parser(o).parseString(e,r)},t.parseStringPromise=function(e,i){var n;return"object"==typeof i&&(n=i),new t.Parser(n).parseStringPromise(e)}}).call(this)},2114(e,t){(function(){"use strict";var e;e=new RegExp(/(?!xmlns)^.*:/),t.normalize=function(e){return e.toLowerCase()},t.firstCharLowerCase=function(e){return e.charAt(0).toLowerCase()+e.slice(1)},t.stripPrefix=function(t){return t.replace(e,"")},t.parseNumbers=function(e){return isNaN(e)||(e=e%1==0?parseInt(e,10):parseFloat(e)),e},t.parseBooleans=function(e){return/^(?:true|false)$/i.test(e)&&(e="true"===e.toLowerCase()),e}}).call(this)},8805(e,t,i){(function(){"use strict";var e,n,r,o,s={}.hasOwnProperty;n=i(6465),e=i(6712),r=i(1912),o=i(2114),t.defaults=n.defaults,t.processors=o,t.ValidationError=function(){function e(e){this.message=e}return function(e,t){for(var i in t)s.call(t,i)&&(e[i]=t[i]);function n(){this.constructor=e}n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype}(e,Error),e}(),t.Builder=e.Builder,t.Parser=r.Parser,t.parseString=r.parseString,t.parseStringPromise=r.parseStringPromise}).call(this)},4923(e){(function(){e.exports={Disconnected:1,Preceding:2,Following:4,Contains:8,ContainedBy:16,ImplementationSpecific:32}}).call(this)},1737(e){(function(){e.exports={Element:1,Attribute:2,Text:3,CData:4,EntityReference:5,EntityDeclaration:6,ProcessingInstruction:7,Comment:8,Document:9,DocType:10,DocumentFragment:11,NotationDeclaration:12,Declaration:201,Raw:202,AttributeDeclaration:203,ElementDeclaration:204,Dummy:205}}).call(this)},9241(e){(function(){var t,i,n,r,o,s,a,c=[].slice,l={}.hasOwnProperty;t=function(){var e,t,i,n,r,s;if(s=arguments[0],r=2<=arguments.length?c.call(arguments,1):[],o(Object.assign))Object.assign.apply(null,arguments);else for(e=0,i=r.length;e<i;e++)if(null!=(n=r[e]))for(t in n)l.call(n,t)&&(s[t]=n[t]);return s},o=function(e){return!!e&&"[object Function]"===Object.prototype.toString.call(e)},s=function(e){var t;return!!e&&("function"==(t=typeof e)||"object"===t)},n=function(e){return o(Array.isArray)?Array.isArray(e):"[object Array]"===Object.prototype.toString.call(e)},r=function(e){var t;if(n(e))return!e.length;for(t in e)if(l.call(e,t))return!1;return!0},a=function(e){var t,i;return s(e)&&(i=Object.getPrototypeOf(e))&&(t=i.constructor)&&"function"==typeof t&&t instanceof t&&Function.prototype.toString.call(t)===Function.prototype.toString.call(Object)},i=function(e){return o(e.valueOf)?e.valueOf():e},e.exports.assign=t,e.exports.isFunction=o,e.exports.isObject=s,e.exports.isArray=n,e.exports.isEmpty=r,e.exports.isPlainObject=a,e.exports.getValue=i}).call(this)},8753(e){(function(){e.exports={None:0,OpenTag:1,InsideTag:2,CloseTag:3}}).call(this)},4238(e,t,i){(function(){var t;t=i(1737),i(468),e.exports=function(){function e(e,i,n){if(this.parent=e,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),null==i)throw new Error("Missing attribute name. "+this.debugInfo(i));this.name=this.stringify.name(i),this.value=this.stringify.attValue(n),this.type=t.Attribute,this.isId=!1,this.schemaTypeInfo=null}return Object.defineProperty(e.prototype,"nodeType",{get:function(){return this.type}}),Object.defineProperty(e.prototype,"ownerElement",{get:function(){return this.parent}}),Object.defineProperty(e.prototype,"textContent",{get:function(){return this.value},set:function(e){return this.value=e||""}}),Object.defineProperty(e.prototype,"namespaceURI",{get:function(){return""}}),Object.defineProperty(e.prototype,"prefix",{get:function(){return""}}),Object.defineProperty(e.prototype,"localName",{get:function(){return this.name}}),Object.defineProperty(e.prototype,"specified",{get:function(){return!0}}),e.prototype.clone=function(){return Object.create(this)},e.prototype.toString=function(e){return this.options.writer.attribute(this,this.options.writer.filterOptions(e))},e.prototype.debugInfo=function(e){return null==(e=e||this.name)?"parent: <"+this.parent.name+">":"attribute: {"+e+"}, parent: <"+this.parent.name+">"},e.prototype.isEqualNode=function(e){return e.namespaceURI===this.namespaceURI&&e.prefix===this.prefix&&e.localName===this.localName&&e.value===this.value},e}()}).call(this)},2691(e,t,i){(function(){var t,n,r={}.hasOwnProperty;t=i(1737),n=i(7457),e.exports=function(e){function i(e,n){if(i.__super__.constructor.call(this,e),null==n)throw new Error("Missing CDATA text. "+this.debugInfo());this.name="#cdata-section",this.type=t.CData,this.value=this.stringify.cdata(n)}return function(e,t){for(var i in t)r.call(t,i)&&(e[i]=t[i]);function n(){this.constructor=e}n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype}(i,e),i.prototype.clone=function(){return Object.create(this)},i.prototype.toString=function(e){return this.options.writer.cdata(this,this.options.writer.filterOptions(e))},i}(n)}).call(this)},7457(e,t,i){(function(){var t,n={}.hasOwnProperty;t=i(468),e.exports=function(e){function t(e){t.__super__.constructor.call(this,e),this.value=""}return function(e,t){for(var i in t)n.call(t,i)&&(e[i]=t[i]);function r(){this.constructor=e}r.prototype=t.prototype,e.prototype=new r,e.__super__=t.prototype}(t,e),Object.defineProperty(t.prototype,"data",{get:function(){return this.value},set:function(e){return this.value=e||""}}),Object.defineProperty(t.prototype,"length",{get:function(){return this.value.length}}),Object.defineProperty(t.prototype,"textContent",{get:function(){return this.value},set:function(e){return this.value=e||""}}),t.prototype.clone=function(){return Object.create(this)},t.prototype.substringData=function(e,t){throw new Error("This DOM method is not implemented."+this.debugInfo())},t.prototype.appendData=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())},t.prototype.insertData=function(e,t){throw new Error("This DOM method is not implemented."+this.debugInfo())},t.prototype.deleteData=function(e,t){throw new Error("This DOM method is not implemented."+this.debugInfo())},t.prototype.replaceData=function(e,t,i){throw new Error("This DOM method is not implemented."+this.debugInfo())},t.prototype.isEqualNode=function(e){return!!t.__super__.isEqualNode.apply(this,arguments).isEqualNode(e)&&e.data===this.data},t}(t)}).call(this)},2679(e,t,i){(function(){var t,n,r={}.hasOwnProperty;t=i(1737),n=i(7457),e.exports=function(e){function i(e,n){if(i.__super__.constructor.call(this,e),null==n)throw new Error("Missing comment text. "+this.debugInfo());this.name="#comment",this.type=t.Comment,this.value=this.stringify.comment(n)}return function(e,t){for(var i in t)r.call(t,i)&&(e[i]=t[i]);function n(){this.constructor=e}n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype}(i,e),i.prototype.clone=function(){return Object.create(this)},i.prototype.toString=function(e){return this.options.writer.comment(this,this.options.writer.filterOptions(e))},i}(n)}).call(this)},3074(e,t,i){(function(){var t,n;t=i(5660),n=i(2527),e.exports=function(){function e(){this.defaultParams={"canonical-form":!1,"cdata-sections":!1,comments:!1,"datatype-normalization":!1,"element-content-whitespace":!0,entities:!0,"error-handler":new t,infoset:!0,"validate-if-schema":!1,namespaces:!0,"namespace-declarations":!0,"normalize-characters":!1,"schema-location":"","schema-type":"","split-cdata-sections":!0,validate:!1,"well-formed":!0},this.params=Object.create(this.defaultParams)}return Object.defineProperty(e.prototype,"parameterNames",{get:function(){return new n(Object.keys(this.defaultParams))}}),e.prototype.getParameter=function(e){return this.params.hasOwnProperty(e)?this.params[e]:null},e.prototype.canSetParameter=function(e,t){return!0},e.prototype.setParameter=function(e,t){return null!=t?this.params[e]=t:delete this.params[e]},e}()}).call(this)},5660(e){(function(){e.exports=function(){function e(){}return e.prototype.handleError=function(e){throw new Error(e)},e}()}).call(this)},7260(e){(function(){e.exports=function(){function e(){}return e.prototype.hasFeature=function(e,t){return!0},e.prototype.createDocumentType=function(e,t,i){throw new Error("This DOM method is not implemented.")},e.prototype.createDocument=function(e,t,i){throw new Error("This DOM method is not implemented.")},e.prototype.createHTMLDocument=function(e){throw new Error("This DOM method is not implemented.")},e.prototype.getFeature=function(e,t){throw new Error("This DOM method is not implemented.")},e}()}).call(this)},2527(e){(function(){e.exports=function(){function e(e){this.arr=e||[]}return Object.defineProperty(e.prototype,"length",{get:function(){return this.arr.length}}),e.prototype.item=function(e){return this.arr[e]||null},e.prototype.contains=function(e){return-1!==this.arr.indexOf(e)},e}()}).call(this)},4111(e,t,i){(function(){var t,n,r={}.hasOwnProperty;n=i(468),t=i(1737),e.exports=function(e){function i(e,n,r,o,s,a){if(i.__super__.constructor.call(this,e),null==n)throw new Error("Missing DTD element name. "+this.debugInfo());if(null==r)throw new Error("Missing DTD attribute name. "+this.debugInfo(n));if(!o)throw new Error("Missing DTD attribute type. "+this.debugInfo(n));if(!s)throw new Error("Missing DTD attribute default. "+this.debugInfo(n));if(0!==s.indexOf("#")&&(s="#"+s),!s.match(/^(#REQUIRED|#IMPLIED|#FIXED|#DEFAULT)$/))throw new Error("Invalid default value type; expected: #REQUIRED, #IMPLIED, #FIXED or #DEFAULT. "+this.debugInfo(n));if(a&&!s.match(/^(#FIXED|#DEFAULT)$/))throw new Error("Default value only applies to #FIXED or #DEFAULT. "+this.debugInfo(n));this.elementName=this.stringify.name(n),this.type=t.AttributeDeclaration,this.attributeName=this.stringify.name(r),this.attributeType=this.stringify.dtdAttType(o),a&&(this.defaultValue=this.stringify.dtdAttDefault(a)),this.defaultValueType=s}return function(e,t){for(var i in t)r.call(t,i)&&(e[i]=t[i]);function n(){this.constructor=e}n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype}(i,e),i.prototype.toString=function(e){return this.options.writer.dtdAttList(this,this.options.writer.filterOptions(e))},i}(n)}).call(this)},7696(e,t,i){(function(){var t,n,r={}.hasOwnProperty;n=i(468),t=i(1737),e.exports=function(e){function i(e,n,r){if(i.__super__.constructor.call(this,e),null==n)throw new Error("Missing DTD element name. "+this.debugInfo());r||(r="(#PCDATA)"),Array.isArray(r)&&(r="("+r.join(",")+")"),this.name=this.stringify.name(n),this.type=t.ElementDeclaration,this.value=this.stringify.dtdElementValue(r)}return function(e,t){for(var i in t)r.call(t,i)&&(e[i]=t[i]);function n(){this.constructor=e}n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype}(i,e),i.prototype.toString=function(e){return this.options.writer.dtdElement(this,this.options.writer.filterOptions(e))},i}(n)}).call(this)},5529(e,t,i){(function(){var t,n,r,o={}.hasOwnProperty;r=i(9241).isObject,n=i(468),t=i(1737),e.exports=function(e){function i(e,n,o,s){if(i.__super__.constructor.call(this,e),null==o)throw new Error("Missing DTD entity name. "+this.debugInfo(o));if(null==s)throw new Error("Missing DTD entity value. "+this.debugInfo(o));if(this.pe=!!n,this.name=this.stringify.name(o),this.type=t.EntityDeclaration,r(s)){if(!s.pubID&&!s.sysID)throw new Error("Public and/or system identifiers are required for an external entity. "+this.debugInfo(o));if(s.pubID&&!s.sysID)throw new Error("System identifier is required for a public external entity. "+this.debugInfo(o));if(this.internal=!1,null!=s.pubID&&(this.pubID=this.stringify.dtdPubID(s.pubID)),null!=s.sysID&&(this.sysID=this.stringify.dtdSysID(s.sysID)),null!=s.nData&&(this.nData=this.stringify.dtdNData(s.nData)),this.pe&&this.nData)throw new Error("Notation declaration is not allowed in a parameter entity. "+this.debugInfo(o))}else this.value=this.stringify.dtdEntityValue(s),this.internal=!0}return function(e,t){for(var i in t)o.call(t,i)&&(e[i]=t[i]);function n(){this.constructor=e}n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype}(i,e),Object.defineProperty(i.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(i.prototype,"systemId",{get:function(){return this.sysID}}),Object.defineProperty(i.prototype,"notationName",{get:function(){return this.nData||null}}),Object.defineProperty(i.prototype,"inputEncoding",{get:function(){return null}}),Object.defineProperty(i.prototype,"xmlEncoding",{get:function(){return null}}),Object.defineProperty(i.prototype,"xmlVersion",{get:function(){return null}}),i.prototype.toString=function(e){return this.options.writer.dtdEntity(this,this.options.writer.filterOptions(e))},i}(n)}).call(this)},8012(e,t,i){(function(){var t,n,r={}.hasOwnProperty;n=i(468),t=i(1737),e.exports=function(e){function i(e,n,r){if(i.__super__.constructor.call(this,e),null==n)throw new Error("Missing DTD notation name. "+this.debugInfo(n));if(!r.pubID&&!r.sysID)throw new Error("Public or system identifiers are required for an external entity. "+this.debugInfo(n));this.name=this.stringify.name(n),this.type=t.NotationDeclaration,null!=r.pubID&&(this.pubID=this.stringify.dtdPubID(r.pubID)),null!=r.sysID&&(this.sysID=this.stringify.dtdSysID(r.sysID))}return function(e,t){for(var i in t)r.call(t,i)&&(e[i]=t[i]);function n(){this.constructor=e}n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype}(i,e),Object.defineProperty(i.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(i.prototype,"systemId",{get:function(){return this.sysID}}),i.prototype.toString=function(e){return this.options.writer.dtdNotation(this,this.options.writer.filterOptions(e))},i}(n)}).call(this)},4130(e,t,i){(function(){var t,n,r,o={}.hasOwnProperty;r=i(9241).isObject,n=i(468),t=i(1737),e.exports=function(e){function i(e,n,o,s){var a;i.__super__.constructor.call(this,e),r(n)&&(n=(a=n).version,o=a.encoding,s=a.standalone),n||(n="1.0"),this.type=t.Declaration,this.version=this.stringify.xmlVersion(n),null!=o&&(this.encoding=this.stringify.xmlEncoding(o)),null!=s&&(this.standalone=this.stringify.xmlStandalone(s))}return function(e,t){for(var i in t)o.call(t,i)&&(e[i]=t[i]);function n(){this.constructor=e}n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype}(i,e),i.prototype.toString=function(e){return this.options.writer.declaration(this,this.options.writer.filterOptions(e))},i}(n)}).call(this)},6376(e,t,i){(function(){var t,n,r,o,s,a,c,l,u={}.hasOwnProperty;l=i(9241).isObject,c=i(468),t=i(1737),n=i(4111),o=i(5529),r=i(7696),s=i(8012),a=i(4797),e.exports=function(e){function i(e,n,r){var o,s,a,c,u,h;if(i.__super__.constructor.call(this,e),this.type=t.DocType,e.children)for(s=0,a=(c=e.children).length;s<a;s++)if((o=c[s]).type===t.Element){this.name=o.name;break}this.documentObject=e,l(n)&&(n=(u=n).pubID,r=u.sysID),null==r&&(r=(h=[n,r])[0],n=h[1]),null!=n&&(this.pubID=this.stringify.dtdPubID(n)),null!=r&&(this.sysID=this.stringify.dtdSysID(r))}return function(e,t){for(var i in t)u.call(t,i)&&(e[i]=t[i]);function n(){this.constructor=e}n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype}(i,e),Object.defineProperty(i.prototype,"entities",{get:function(){var e,i,n,r,o;for(r={},i=0,n=(o=this.children).length;i<n;i++)(e=o[i]).type!==t.EntityDeclaration||e.pe||(r[e.name]=e);return new a(r)}}),Object.defineProperty(i.prototype,"notations",{get:function(){var e,i,n,r,o;for(r={},i=0,n=(o=this.children).length;i<n;i++)(e=o[i]).type===t.NotationDeclaration&&(r[e.name]=e);return new a(r)}}),Object.defineProperty(i.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(i.prototype,"systemId",{get:function(){return this.sysID}}),Object.defineProperty(i.prototype,"internalSubset",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),i.prototype.element=function(e,t){var i;return i=new r(this,e,t),this.children.push(i),this},i.prototype.attList=function(e,t,i,r,o){var s;return s=new n(this,e,t,i,r,o),this.children.push(s),this},i.prototype.entity=function(e,t){var i;return i=new o(this,!1,e,t),this.children.push(i),this},i.prototype.pEntity=function(e,t){var i;return i=new o(this,!0,e,t),this.children.push(i),this},i.prototype.notation=function(e,t){var i;return i=new s(this,e,t),this.children.push(i),this},i.prototype.toString=function(e){return this.options.writer.docType(this,this.options.writer.filterOptions(e))},i.prototype.ele=function(e,t){return this.element(e,t)},i.prototype.att=function(e,t,i,n,r){return this.attList(e,t,i,n,r)},i.prototype.ent=function(e,t){return this.entity(e,t)},i.prototype.pent=function(e,t){return this.pEntity(e,t)},i.prototype.not=function(e,t){return this.notation(e,t)},i.prototype.up=function(){return this.root()||this.documentObject},i.prototype.isEqualNode=function(e){return!!i.__super__.isEqualNode.apply(this,arguments).isEqualNode(e)&&e.name===this.name&&e.publicId===this.publicId&&e.systemId===this.systemId},i}(c)}).call(this)},1933(e,t,i){(function(){var t,n,r,o,s,a,c,l={}.hasOwnProperty;c=i(9241).isPlainObject,r=i(7260),n=i(3074),o=i(468),t=i(1737),a=i(3976),s=i(382),e.exports=function(e){function i(e){i.__super__.constructor.call(this,null),this.name="#document",this.type=t.Document,this.documentURI=null,this.domConfig=new n,e||(e={}),e.writer||(e.writer=new s),this.options=e,this.stringify=new a(e)}return function(e,t){for(var i in t)l.call(t,i)&&(e[i]=t[i]);function n(){this.constructor=e}n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype}(i,e),Object.defineProperty(i.prototype,"implementation",{value:new r}),Object.defineProperty(i.prototype,"doctype",{get:function(){var e,i,n,r;for(i=0,n=(r=this.children).length;i<n;i++)if((e=r[i]).type===t.DocType)return e;return null}}),Object.defineProperty(i.prototype,"documentElement",{get:function(){return this.rootObject||null}}),Object.defineProperty(i.prototype,"inputEncoding",{get:function(){return null}}),Object.defineProperty(i.prototype,"strictErrorChecking",{get:function(){return!1}}),Object.defineProperty(i.prototype,"xmlEncoding",{get:function(){return 0!==this.children.length&&this.children[0].type===t.Declaration?this.children[0].encoding:null}}),Object.defineProperty(i.prototype,"xmlStandalone",{get:function(){return 0!==this.children.length&&this.children[0].type===t.Declaration&&"yes"===this.children[0].standalone}}),Object.defineProperty(i.prototype,"xmlVersion",{get:function(){return 0!==this.children.length&&this.children[0].type===t.Declaration?this.children[0].version:"1.0"}}),Object.defineProperty(i.prototype,"URL",{get:function(){return this.documentURI}}),Object.defineProperty(i.prototype,"origin",{get:function(){return null}}),Object.defineProperty(i.prototype,"compatMode",{get:function(){return null}}),Object.defineProperty(i.prototype,"characterSet",{get:function(){return null}}),Object.defineProperty(i.prototype,"contentType",{get:function(){return null}}),i.prototype.end=function(e){var t;return t={},e?c(e)&&(t=e,e=this.options.writer):e=this.options.writer,e.document(this,e.filterOptions(t))},i.prototype.toString=function(e){return this.options.writer.document(this,this.options.writer.filterOptions(e))},i.prototype.createElement=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())},i.prototype.createDocumentFragment=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},i.prototype.createTextNode=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())},i.prototype.createComment=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())},i.prototype.createCDATASection=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())},i.prototype.createProcessingInstruction=function(e,t){throw new Error("This DOM method is not implemented."+this.debugInfo())},i.prototype.createAttribute=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())},i.prototype.createEntityReference=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())},i.prototype.getElementsByTagName=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())},i.prototype.importNode=function(e,t){throw new Error("This DOM method is not implemented."+this.debugInfo())},i.prototype.createElementNS=function(e,t){throw new Error("This DOM method is not implemented."+this.debugInfo())},i.prototype.createAttributeNS=function(e,t){throw new Error("This DOM method is not implemented."+this.debugInfo())},i.prototype.getElementsByTagNameNS=function(e,t){throw new Error("This DOM method is not implemented."+this.debugInfo())},i.prototype.getElementById=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())},i.prototype.adoptNode=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())},i.prototype.normalizeDocument=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},i.prototype.renameNode=function(e,t,i){throw new Error("This DOM method is not implemented."+this.debugInfo())},i.prototype.getElementsByClassName=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())},i.prototype.createEvent=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())},i.prototype.createRange=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},i.prototype.createNodeIterator=function(e,t,i){throw new Error("This DOM method is not implemented."+this.debugInfo())},i.prototype.createTreeWalker=function(e,t,i){throw new Error("This DOM method is not implemented."+this.debugInfo())},i}(o)}).call(this)},400(e,t,i){(function(){var t,n,r,o,s,a,c,l,u,h,d,p,f,g,m,y,v,_,b,w,D,T,S,C={}.hasOwnProperty;S=i(9241),D=S.isObject,w=S.isFunction,T=S.isPlainObject,b=S.getValue,t=i(1737),p=i(1933),f=i(3906),o=i(2691),s=i(2679),m=i(1268),_=i(2535),g=i(5915),h=i(4130),d=i(6376),a=i(4111),l=i(5529),c=i(7696),u=i(8012),r=i(4238),v=i(3976),y=i(382),n=i(8753),e.exports=function(){function e(e,i,n){var r;this.name="?xml",this.type=t.Document,e||(e={}),r={},e.writer?T(e.writer)&&(r=e.writer,e.writer=new y):e.writer=new y,this.options=e,this.writer=e.writer,this.writerOptions=this.writer.filterOptions(r),this.stringify=new v(e),this.onDataCallback=i||function(){},this.onEndCallback=n||function(){},this.currentNode=null,this.currentLevel=-1,this.openTags={},this.documentStarted=!1,this.documentCompleted=!1,this.root=null}return e.prototype.createChildNode=function(e){var i,n,r,o,s,a,c,l;switch(e.type){case t.CData:this.cdata(e.value);break;case t.Comment:this.comment(e.value);break;case t.Element:for(n in r={},c=e.attribs)C.call(c,n)&&(i=c[n],r[n]=i.value);this.node(e.name,r);break;case t.Dummy:this.dummy();break;case t.Raw:this.raw(e.value);break;case t.Text:this.text(e.value);break;case t.ProcessingInstruction:this.instruction(e.target,e.value);break;default:throw new Error("This XML node type is not supported in a JS object: "+e.constructor.name)}for(s=0,a=(l=e.children).length;s<a;s++)o=l[s],this.createChildNode(o),o.type===t.Element&&this.up();return this},e.prototype.dummy=function(){return this},e.prototype.node=function(e,t,i){var n;if(null==e)throw new Error("Missing node name.");if(this.root&&-1===this.currentLevel)throw new Error("Document can only have one root node. "+this.debugInfo(e));return this.openCurrent(),e=b(e),null==t&&(t={}),t=b(t),D(t)||(i=(n=[t,i])[0],t=n[1]),this.currentNode=new f(this,e,t),this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,null!=i&&this.text(i),this},e.prototype.element=function(e,i,n){var r,o,s,a,c,l;if(this.currentNode&&this.currentNode.type===t.DocType)this.dtdElement.apply(this,arguments);else if(Array.isArray(e)||D(e)||w(e))for(a=this.options.noValidation,this.options.noValidation=!0,(l=new p(this.options).element("TEMP_ROOT")).element(e),this.options.noValidation=a,o=0,s=(c=l.children).length;o<s;o++)r=c[o],this.createChildNode(r),r.type===t.Element&&this.up();else this.node(e,i,n);return this},e.prototype.attribute=function(e,t){var i,n;if(!this.currentNode||this.currentNode.children)throw new Error("att() can only be used immediately after an ele() call in callback mode. "+this.debugInfo(e));if(null!=e&&(e=b(e)),D(e))for(i in e)C.call(e,i)&&(n=e[i],this.attribute(i,n));else w(t)&&(t=t.apply()),this.options.keepNullAttributes&&null==t?this.currentNode.attribs[e]=new r(this,e,""):null!=t&&(this.currentNode.attribs[e]=new r(this,e,t));return this},e.prototype.text=function(e){var t;return this.openCurrent(),t=new _(this,e),this.onData(this.writer.text(t,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},e.prototype.cdata=function(e){var t;return this.openCurrent(),t=new o(this,e),this.onData(this.writer.cdata(t,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},e.prototype.comment=function(e){var t;return this.openCurrent(),t=new s(this,e),this.onData(this.writer.comment(t,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},e.prototype.raw=function(e){var t;return this.openCurrent(),t=new m(this,e),this.onData(this.writer.raw(t,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},e.prototype.instruction=function(e,t){var i,n,r,o,s;if(this.openCurrent(),null!=e&&(e=b(e)),null!=t&&(t=b(t)),Array.isArray(e))for(i=0,o=e.length;i<o;i++)n=e[i],this.instruction(n);else if(D(e))for(n in e)C.call(e,n)&&(r=e[n],this.instruction(n,r));else w(t)&&(t=t.apply()),s=new g(this,e,t),this.onData(this.writer.processingInstruction(s,this.writerOptions,this.currentLevel+1),this.currentLevel+1);return this},e.prototype.declaration=function(e,t,i){var n;if(this.openCurrent(),this.documentStarted)throw new Error("declaration() must be the first node.");return n=new h(this,e,t,i),this.onData(this.writer.declaration(n,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},e.prototype.doctype=function(e,t,i){if(this.openCurrent(),null==e)throw new Error("Missing root node name.");if(this.root)throw new Error("dtd() must come before the root node.");return this.currentNode=new d(this,t,i),this.currentNode.rootNodeName=e,this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,this},e.prototype.dtdElement=function(e,t){var i;return this.openCurrent(),i=new c(this,e,t),this.onData(this.writer.dtdElement(i,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},e.prototype.attList=function(e,t,i,n,r){var o;return this.openCurrent(),o=new a(this,e,t,i,n,r),this.onData(this.writer.dtdAttList(o,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},e.prototype.entity=function(e,t){var i;return this.openCurrent(),i=new l(this,!1,e,t),this.onData(this.writer.dtdEntity(i,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},e.prototype.pEntity=function(e,t){var i;return this.openCurrent(),i=new l(this,!0,e,t),this.onData(this.writer.dtdEntity(i,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},e.prototype.notation=function(e,t){var i;return this.openCurrent(),i=new u(this,e,t),this.onData(this.writer.dtdNotation(i,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},e.prototype.up=function(){if(this.currentLevel<0)throw new Error("The document node has no parent.");return this.currentNode?(this.currentNode.children?this.closeNode(this.currentNode):this.openNode(this.currentNode),this.currentNode=null):this.closeNode(this.openTags[this.currentLevel]),delete this.openTags[this.currentLevel],this.currentLevel--,this},e.prototype.end=function(){for(;this.currentLevel>=0;)this.up();return this.onEnd()},e.prototype.openCurrent=function(){if(this.currentNode)return this.currentNode.children=!0,this.openNode(this.currentNode)},e.prototype.openNode=function(e){var i,r,o,s;if(!e.isOpen){if(this.root||0!==this.currentLevel||e.type!==t.Element||(this.root=e),r="",e.type===t.Element){for(o in this.writerOptions.state=n.OpenTag,r=this.writer.indent(e,this.writerOptions,this.currentLevel)+"<"+e.name,s=e.attribs)C.call(s,o)&&(i=s[o],r+=this.writer.attribute(i,this.writerOptions,this.currentLevel));r+=(e.children?">":"/>")+this.writer.endline(e,this.writerOptions,this.currentLevel),this.writerOptions.state=n.InsideTag}else this.writerOptions.state=n.OpenTag,r=this.writer.indent(e,this.writerOptions,this.currentLevel)+"<!DOCTYPE "+e.rootNodeName,e.pubID&&e.sysID?r+=' PUBLIC "'+e.pubID+'" "'+e.sysID+'"':e.sysID&&(r+=' SYSTEM "'+e.sysID+'"'),e.children?(r+=" [",this.writerOptions.state=n.InsideTag):(this.writerOptions.state=n.CloseTag,r+=">"),r+=this.writer.endline(e,this.writerOptions,this.currentLevel);return this.onData(r,this.currentLevel),e.isOpen=!0}},e.prototype.closeNode=function(e){var i;if(!e.isClosed)return"",this.writerOptions.state=n.CloseTag,i=e.type===t.Element?this.writer.indent(e,this.writerOptions,this.currentLevel)+"</"+e.name+">"+this.writer.endline(e,this.writerOptions,this.currentLevel):this.writer.indent(e,this.writerOptions,this.currentLevel)+"]>"+this.writer.endline(e,this.writerOptions,this.currentLevel),this.writerOptions.state=n.None,this.onData(i,this.currentLevel),e.isClosed=!0},e.prototype.onData=function(e,t){return this.documentStarted=!0,this.onDataCallback(e,t+1)},e.prototype.onEnd=function(){return this.documentCompleted=!0,this.onEndCallback()},e.prototype.debugInfo=function(e){return null==e?"":"node: <"+e+">"},e.prototype.ele=function(){return this.element.apply(this,arguments)},e.prototype.nod=function(e,t,i){return this.node(e,t,i)},e.prototype.txt=function(e){return this.text(e)},e.prototype.dat=function(e){return this.cdata(e)},e.prototype.com=function(e){return this.comment(e)},e.prototype.ins=function(e,t){return this.instruction(e,t)},e.prototype.dec=function(e,t,i){return this.declaration(e,t,i)},e.prototype.dtd=function(e,t,i){return this.doctype(e,t,i)},e.prototype.e=function(e,t,i){return this.element(e,t,i)},e.prototype.n=function(e,t,i){return this.node(e,t,i)},e.prototype.t=function(e){return this.text(e)},e.prototype.d=function(e){return this.cdata(e)},e.prototype.c=function(e){return this.comment(e)},e.prototype.r=function(e){return this.raw(e)},e.prototype.i=function(e,t){return this.instruction(e,t)},e.prototype.att=function(){return this.currentNode&&this.currentNode.type===t.DocType?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},e.prototype.a=function(){return this.currentNode&&this.currentNode.type===t.DocType?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},e.prototype.ent=function(e,t){return this.entity(e,t)},e.prototype.pent=function(e,t){return this.pEntity(e,t)},e.prototype.not=function(e,t){return this.notation(e,t)},e}()}).call(this)},1218(e,t,i){(function(){var t,n,r={}.hasOwnProperty;n=i(468),t=i(1737),e.exports=function(e){function i(e){i.__super__.constructor.call(this,e),this.type=t.Dummy}return function(e,t){for(var i in t)r.call(t,i)&&(e[i]=t[i]);function n(){this.constructor=e}n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype}(i,e),i.prototype.clone=function(){return Object.create(this)},i.prototype.toString=function(e){return""},i}(n)}).call(this)},3906(e,t,i){(function(){var t,n,r,o,s,a,c,l,u={}.hasOwnProperty;l=i(9241),c=l.isObject,a=l.isFunction,s=l.getValue,o=i(468),t=i(1737),n=i(4238),r=i(4797),e.exports=function(e){function i(e,n,r){var o,s,a,c;if(i.__super__.constructor.call(this,e),null==n)throw new Error("Missing element name. "+this.debugInfo());if(this.name=this.stringify.name(n),this.type=t.Element,this.attribs={},this.schemaTypeInfo=null,null!=r&&this.attribute(r),e.type===t.Document&&(this.isRoot=!0,this.documentObject=e,e.rootObject=this,e.children))for(s=0,a=(c=e.children).length;s<a;s++)if((o=c[s]).type===t.DocType){o.name=this.name;break}}return function(e,t){for(var i in t)u.call(t,i)&&(e[i]=t[i]);function n(){this.constructor=e}n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype}(i,e),Object.defineProperty(i.prototype,"tagName",{get:function(){return this.name}}),Object.defineProperty(i.prototype,"namespaceURI",{get:function(){return""}}),Object.defineProperty(i.prototype,"prefix",{get:function(){return""}}),Object.defineProperty(i.prototype,"localName",{get:function(){return this.name}}),Object.defineProperty(i.prototype,"id",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(i.prototype,"className",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(i.prototype,"classList",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(i.prototype,"attributes",{get:function(){return this.attributeMap&&this.attributeMap.nodes||(this.attributeMap=new r(this.attribs)),this.attributeMap}}),i.prototype.clone=function(){var e,t,i,n;for(t in(i=Object.create(this)).isRoot&&(i.documentObject=null),i.attribs={},n=this.attribs)u.call(n,t)&&(e=n[t],i.attribs[t]=e.clone());return i.children=[],this.children.forEach(function(e){var t;return(t=e.clone()).parent=i,i.children.push(t)}),i},i.prototype.attribute=function(e,t){var i,r;if(null!=e&&(e=s(e)),c(e))for(i in e)u.call(e,i)&&(r=e[i],this.attribute(i,r));else a(t)&&(t=t.apply()),this.options.keepNullAttributes&&null==t?this.attribs[e]=new n(this,e,""):null!=t&&(this.attribs[e]=new n(this,e,t));return this},i.prototype.removeAttribute=function(e){var t,i,n;if(null==e)throw new Error("Missing attribute name. "+this.debugInfo());if(e=s(e),Array.isArray(e))for(i=0,n=e.length;i<n;i++)t=e[i],delete this.attribs[t];else delete this.attribs[e];return this},i.prototype.toString=function(e){return this.options.writer.element(this,this.options.writer.filterOptions(e))},i.prototype.att=function(e,t){return this.attribute(e,t)},i.prototype.a=function(e,t){return this.attribute(e,t)},i.prototype.getAttribute=function(e){return this.attribs.hasOwnProperty(e)?this.attribs[e].value:null},i.prototype.setAttribute=function(e,t){throw new Error("This DOM method is not implemented."+this.debugInfo())},i.prototype.getAttributeNode=function(e){return this.attribs.hasOwnProperty(e)?this.attribs[e]:null},i.prototype.setAttributeNode=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())},i.prototype.removeAttributeNode=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())},i.prototype.getElementsByTagName=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())},i.prototype.getAttributeNS=function(e,t){throw new Error("This DOM method is not implemented."+this.debugInfo())},i.prototype.setAttributeNS=function(e,t,i){throw new Error("This DOM method is not implemented."+this.debugInfo())},i.prototype.removeAttributeNS=function(e,t){throw new Error("This DOM method is not implemented."+this.debugInfo())},i.prototype.getAttributeNodeNS=function(e,t){throw new Error("This DOM method is not implemented."+this.debugInfo())},i.prototype.setAttributeNodeNS=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())},i.prototype.getElementsByTagNameNS=function(e,t){throw new Error("This DOM method is not implemented."+this.debugInfo())},i.prototype.hasAttribute=function(e){return this.attribs.hasOwnProperty(e)},i.prototype.hasAttributeNS=function(e,t){throw new Error("This DOM method is not implemented."+this.debugInfo())},i.prototype.setIdAttribute=function(e,t){return this.attribs.hasOwnProperty(e)?this.attribs[e].isId:t},i.prototype.setIdAttributeNS=function(e,t,i){throw new Error("This DOM method is not implemented."+this.debugInfo())},i.prototype.setIdAttributeNode=function(e,t){throw new Error("This DOM method is not implemented."+this.debugInfo())},i.prototype.getElementsByTagName=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())},i.prototype.getElementsByTagNameNS=function(e,t){throw new Error("This DOM method is not implemented."+this.debugInfo())},i.prototype.getElementsByClassName=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())},i.prototype.isEqualNode=function(e){var t,n,r;if(!i.__super__.isEqualNode.apply(this,arguments).isEqualNode(e))return!1;if(e.namespaceURI!==this.namespaceURI)return!1;if(e.prefix!==this.prefix)return!1;if(e.localName!==this.localName)return!1;if(e.attribs.length!==this.attribs.length)return!1;for(t=n=0,r=this.attribs.length-1;0<=r?n<=r:n>=r;t=0<=r?++n:--n)if(!this.attribs[t].isEqualNode(e.attribs[t]))return!1;return!0},i}(o)}).call(this)},4797(e){(function(){e.exports=function(){function e(e){this.nodes=e}return Object.defineProperty(e.prototype,"length",{get:function(){return Object.keys(this.nodes).length||0}}),e.prototype.clone=function(){return this.nodes=null},e.prototype.getNamedItem=function(e){return this.nodes[e]},e.prototype.setNamedItem=function(e){var t;return t=this.nodes[e.nodeName],this.nodes[e.nodeName]=e,t||null},e.prototype.removeNamedItem=function(e){var t;return t=this.nodes[e],delete this.nodes[e],t||null},e.prototype.item=function(e){return this.nodes[Object.keys(this.nodes)[e]]||null},e.prototype.getNamedItemNS=function(e,t){throw new Error("This DOM method is not implemented.")},e.prototype.setNamedItemNS=function(e){throw new Error("This DOM method is not implemented.")},e.prototype.removeNamedItemNS=function(e,t){throw new Error("This DOM method is not implemented.")},e}()}).call(this)},468(e,t,i){(function(){var t,n,r,o,s,a,c,l,u,h,d,p,f,g,m,y,v,_={}.hasOwnProperty;v=i(9241),y=v.isObject,m=v.isFunction,g=v.isEmpty,f=v.getValue,l=null,r=null,o=null,s=null,a=null,d=null,p=null,h=null,c=null,n=null,u=null,t=null,e.exports=function(){function e(e){this.parent=e,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),this.value=null,this.children=[],this.baseURI=null,l||(l=i(3906),r=i(2691),o=i(2679),s=i(4130),a=i(6376),d=i(1268),p=i(2535),h=i(5915),c=i(1218),n=i(1737),u=i(6684),i(4797),t=i(4923))}return Object.defineProperty(e.prototype,"nodeName",{get:function(){return this.name}}),Object.defineProperty(e.prototype,"nodeType",{get:function(){return this.type}}),Object.defineProperty(e.prototype,"nodeValue",{get:function(){return this.value}}),Object.defineProperty(e.prototype,"parentNode",{get:function(){return this.parent}}),Object.defineProperty(e.prototype,"childNodes",{get:function(){return this.childNodeList&&this.childNodeList.nodes||(this.childNodeList=new u(this.children)),this.childNodeList}}),Object.defineProperty(e.prototype,"firstChild",{get:function(){return this.children[0]||null}}),Object.defineProperty(e.prototype,"lastChild",{get:function(){return this.children[this.children.length-1]||null}}),Object.defineProperty(e.prototype,"previousSibling",{get:function(){var e;return e=this.parent.children.indexOf(this),this.parent.children[e-1]||null}}),Object.defineProperty(e.prototype,"nextSibling",{get:function(){var e;return e=this.parent.children.indexOf(this),this.parent.children[e+1]||null}}),Object.defineProperty(e.prototype,"ownerDocument",{get:function(){return this.document()||null}}),Object.defineProperty(e.prototype,"textContent",{get:function(){var e,t,i,r,o;if(this.nodeType===n.Element||this.nodeType===n.DocumentFragment){for(o="",t=0,i=(r=this.children).length;t<i;t++)(e=r[t]).textContent&&(o+=e.textContent);return o}return null},set:function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),e.prototype.setParent=function(e){var t,i,n,r,o;for(this.parent=e,e&&(this.options=e.options,this.stringify=e.stringify),o=[],i=0,n=(r=this.children).length;i<n;i++)t=r[i],o.push(t.setParent(this));return o},e.prototype.element=function(e,t,i){var n,r,o,s,a,c,l,u,h,d,p;if(c=null,null===t&&null==i&&(t=(h=[{},null])[0],i=h[1]),null==t&&(t={}),t=f(t),y(t)||(i=(d=[t,i])[0],t=d[1]),null!=e&&(e=f(e)),Array.isArray(e))for(o=0,l=e.length;o<l;o++)r=e[o],c=this.element(r);else if(m(e))c=this.element(e.apply());else if(y(e)){for(a in e)if(_.call(e,a))if(p=e[a],m(p)&&(p=p.apply()),!this.options.ignoreDecorators&&this.stringify.convertAttKey&&0===a.indexOf(this.stringify.convertAttKey))c=this.attribute(a.substr(this.stringify.convertAttKey.length),p);else if(!this.options.separateArrayItems&&Array.isArray(p)&&g(p))c=this.dummy();else if(y(p)&&g(p))c=this.element(a);else if(this.options.keepNullNodes||null!=p)if(!this.options.separateArrayItems&&Array.isArray(p))for(s=0,u=p.length;s<u;s++)r=p[s],(n={})[a]=r,c=this.element(n);else y(p)?!this.options.ignoreDecorators&&this.stringify.convertTextKey&&0===a.indexOf(this.stringify.convertTextKey)?c=this.element(p):(c=this.element(a)).element(p):c=this.element(a,p);else c=this.dummy()}else c=this.options.keepNullNodes||null!==i?!this.options.ignoreDecorators&&this.stringify.convertTextKey&&0===e.indexOf(this.stringify.convertTextKey)?this.text(i):!this.options.ignoreDecorators&&this.stringify.convertCDataKey&&0===e.indexOf(this.stringify.convertCDataKey)?this.cdata(i):!this.options.ignoreDecorators&&this.stringify.convertCommentKey&&0===e.indexOf(this.stringify.convertCommentKey)?this.comment(i):!this.options.ignoreDecorators&&this.stringify.convertRawKey&&0===e.indexOf(this.stringify.convertRawKey)?this.raw(i):!this.options.ignoreDecorators&&this.stringify.convertPIKey&&0===e.indexOf(this.stringify.convertPIKey)?this.instruction(e.substr(this.stringify.convertPIKey.length),i):this.node(e,t,i):this.dummy();if(null==c)throw new Error("Could not create any elements with: "+e+". "+this.debugInfo());return c},e.prototype.insertBefore=function(e,t,i){var n,r,o,s,a;if(null!=e?e.type:void 0)return s=t,(o=e).setParent(this),s?(r=children.indexOf(s),a=children.splice(r),children.push(o),Array.prototype.push.apply(children,a)):children.push(o),o;if(this.isRoot)throw new Error("Cannot insert elements at root level. "+this.debugInfo(e));return r=this.parent.children.indexOf(this),a=this.parent.children.splice(r),n=this.parent.element(e,t,i),Array.prototype.push.apply(this.parent.children,a),n},e.prototype.insertAfter=function(e,t,i){var n,r,o;if(this.isRoot)throw new Error("Cannot insert elements at root level. "+this.debugInfo(e));return r=this.parent.children.indexOf(this),o=this.parent.children.splice(r+1),n=this.parent.element(e,t,i),Array.prototype.push.apply(this.parent.children,o),n},e.prototype.remove=function(){var e;if(this.isRoot)throw new Error("Cannot remove the root element. "+this.debugInfo());return e=this.parent.children.indexOf(this),[].splice.apply(this.parent.children,[e,e-e+1].concat([])),this.parent},e.prototype.node=function(e,t,i){var n,r;return null!=e&&(e=f(e)),t||(t={}),t=f(t),y(t)||(i=(r=[t,i])[0],t=r[1]),n=new l(this,e,t),null!=i&&n.text(i),this.children.push(n),n},e.prototype.text=function(e){var t;return y(e)&&this.element(e),t=new p(this,e),this.children.push(t),this},e.prototype.cdata=function(e){var t;return t=new r(this,e),this.children.push(t),this},e.prototype.comment=function(e){var t;return t=new o(this,e),this.children.push(t),this},e.prototype.commentBefore=function(e){var t,i;return t=this.parent.children.indexOf(this),i=this.parent.children.splice(t),this.parent.comment(e),Array.prototype.push.apply(this.parent.children,i),this},e.prototype.commentAfter=function(e){var t,i;return t=this.parent.children.indexOf(this),i=this.parent.children.splice(t+1),this.parent.comment(e),Array.prototype.push.apply(this.parent.children,i),this},e.prototype.raw=function(e){var t;return t=new d(this,e),this.children.push(t),this},e.prototype.dummy=function(){return new c(this)},e.prototype.instruction=function(e,t){var i,n,r,o,s;if(null!=e&&(e=f(e)),null!=t&&(t=f(t)),Array.isArray(e))for(o=0,s=e.length;o<s;o++)i=e[o],this.instruction(i);else if(y(e))for(i in e)_.call(e,i)&&(n=e[i],this.instruction(i,n));else m(t)&&(t=t.apply()),r=new h(this,e,t),this.children.push(r);return this},e.prototype.instructionBefore=function(e,t){var i,n;return i=this.parent.children.indexOf(this),n=this.parent.children.splice(i),this.parent.instruction(e,t),Array.prototype.push.apply(this.parent.children,n),this},e.prototype.instructionAfter=function(e,t){var i,n;return i=this.parent.children.indexOf(this),n=this.parent.children.splice(i+1),this.parent.instruction(e,t),Array.prototype.push.apply(this.parent.children,n),this},e.prototype.declaration=function(e,t,i){var r,o;return r=this.document(),o=new s(r,e,t,i),0===r.children.length?r.children.unshift(o):r.children[0].type===n.Declaration?r.children[0]=o:r.children.unshift(o),r.root()||r},e.prototype.dtd=function(e,t){var i,r,o,s,c,l,u,h,d;for(i=this.document(),r=new a(i,e,t),o=s=0,l=(h=i.children).length;s<l;o=++s)if(h[o].type===n.DocType)return i.children[o]=r,r;for(o=c=0,u=(d=i.children).length;c<u;o=++c)if(d[o].isRoot)return i.children.splice(o,0,r),r;return i.children.push(r),r},e.prototype.up=function(){if(this.isRoot)throw new Error("The root node has no parent. Use doc() if you need to get the document object.");return this.parent},e.prototype.root=function(){var e;for(e=this;e;){if(e.type===n.Document)return e.rootObject;if(e.isRoot)return e;e=e.parent}},e.prototype.document=function(){var e;for(e=this;e;){if(e.type===n.Document)return e;e=e.parent}},e.prototype.end=function(e){return this.document().end(e)},e.prototype.prev=function(){var e;if((e=this.parent.children.indexOf(this))<1)throw new Error("Already at the first node. "+this.debugInfo());return this.parent.children[e-1]},e.prototype.next=function(){var e;if(-1===(e=this.parent.children.indexOf(this))||e===this.parent.children.length-1)throw new Error("Already at the last node. "+this.debugInfo());return this.parent.children[e+1]},e.prototype.importDocument=function(e){var t;return(t=e.root().clone()).parent=this,t.isRoot=!1,this.children.push(t),this},e.prototype.debugInfo=function(e){var t,i;return null!=(e=e||this.name)||(null!=(t=this.parent)?t.name:void 0)?null==e?"parent: <"+this.parent.name+">":(null!=(i=this.parent)?i.name:void 0)?"node: <"+e+">, parent: <"+this.parent.name+">":"node: <"+e+">":""},e.prototype.ele=function(e,t,i){return this.element(e,t,i)},e.prototype.nod=function(e,t,i){return this.node(e,t,i)},e.prototype.txt=function(e){return this.text(e)},e.prototype.dat=function(e){return this.cdata(e)},e.prototype.com=function(e){return this.comment(e)},e.prototype.ins=function(e,t){return this.instruction(e,t)},e.prototype.doc=function(){return this.document()},e.prototype.dec=function(e,t,i){return this.declaration(e,t,i)},e.prototype.e=function(e,t,i){return this.element(e,t,i)},e.prototype.n=function(e,t,i){return this.node(e,t,i)},e.prototype.t=function(e){return this.text(e)},e.prototype.d=function(e){return this.cdata(e)},e.prototype.c=function(e){return this.comment(e)},e.prototype.r=function(e){return this.raw(e)},e.prototype.i=function(e,t){return this.instruction(e,t)},e.prototype.u=function(){return this.up()},e.prototype.importXMLBuilder=function(e){return this.importDocument(e)},e.prototype.replaceChild=function(e,t){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.removeChild=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.appendChild=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.hasChildNodes=function(){return 0!==this.children.length},e.prototype.cloneNode=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.normalize=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.isSupported=function(e,t){return!0},e.prototype.hasAttributes=function(){return 0!==this.attribs.length},e.prototype.compareDocumentPosition=function(e){var i,n;return(i=this)===e?0:this.document()!==e.document()?(n=t.Disconnected|t.ImplementationSpecific,Math.random()<.5?n|=t.Preceding:n|=t.Following,n):i.isAncestor(e)?t.Contains|t.Preceding:i.isDescendant(e)?t.Contains|t.Following:i.isPreceding(e)?t.Preceding:t.Following},e.prototype.isSameNode=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.lookupPrefix=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.isDefaultNamespace=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.lookupNamespaceURI=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.isEqualNode=function(e){var t,i,n;if(e.nodeType!==this.nodeType)return!1;if(e.children.length!==this.children.length)return!1;for(t=i=0,n=this.children.length-1;0<=n?i<=n:i>=n;t=0<=n?++i:--i)if(!this.children[t].isEqualNode(e.children[t]))return!1;return!0},e.prototype.getFeature=function(e,t){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.setUserData=function(e,t,i){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.getUserData=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.contains=function(e){return!!e&&(e===this||this.isDescendant(e))},e.prototype.isDescendant=function(e){var t,i,n,r;for(i=0,n=(r=this.children).length;i<n;i++){if(e===(t=r[i]))return!0;if(t.isDescendant(e))return!0}return!1},e.prototype.isAncestor=function(e){return e.isDescendant(this)},e.prototype.isPreceding=function(e){var t,i;return t=this.treePosition(e),i=this.treePosition(this),-1!==t&&-1!==i&&t<i},e.prototype.isFollowing=function(e){var t,i;return t=this.treePosition(e),i=this.treePosition(this),-1!==t&&-1!==i&&t>i},e.prototype.treePosition=function(e){var t,i;return i=0,t=!1,this.foreachTreeNode(this.document(),function(n){if(i++,!t&&n===e)return t=!0}),t?i:-1},e.prototype.foreachTreeNode=function(e,t){var i,n,r,o,s;for(e||(e=this.document()),n=0,r=(o=e.children).length;n<r;n++){if(s=t(i=o[n]))return s;if(s=this.foreachTreeNode(i,t))return s}},e}()}).call(this)},6684(e){(function(){e.exports=function(){function e(e){this.nodes=e}return Object.defineProperty(e.prototype,"length",{get:function(){return this.nodes.length||0}}),e.prototype.clone=function(){return this.nodes=null},e.prototype.item=function(e){return this.nodes[e]||null},e}()}).call(this)},5915(e,t,i){(function(){var t,n,r={}.hasOwnProperty;t=i(1737),n=i(7457),e.exports=function(e){function i(e,n,r){if(i.__super__.constructor.call(this,e),null==n)throw new Error("Missing instruction target. "+this.debugInfo());this.type=t.ProcessingInstruction,this.target=this.stringify.insTarget(n),this.name=this.target,r&&(this.value=this.stringify.insValue(r))}return function(e,t){for(var i in t)r.call(t,i)&&(e[i]=t[i]);function n(){this.constructor=e}n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype}(i,e),i.prototype.clone=function(){return Object.create(this)},i.prototype.toString=function(e){return this.options.writer.processingInstruction(this,this.options.writer.filterOptions(e))},i.prototype.isEqualNode=function(e){return!!i.__super__.isEqualNode.apply(this,arguments).isEqualNode(e)&&e.target===this.target},i}(n)}).call(this)},1268(e,t,i){(function(){var t,n,r={}.hasOwnProperty;t=i(1737),n=i(468),e.exports=function(e){function i(e,n){if(i.__super__.constructor.call(this,e),null==n)throw new Error("Missing raw text. "+this.debugInfo());this.type=t.Raw,this.value=this.stringify.raw(n)}return function(e,t){for(var i in t)r.call(t,i)&&(e[i]=t[i]);function n(){this.constructor=e}n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype}(i,e),i.prototype.clone=function(){return Object.create(this)},i.prototype.toString=function(e){return this.options.writer.raw(this,this.options.writer.filterOptions(e))},i}(n)}).call(this)},6775(e,t,i){(function(){var t,n,r,o={}.hasOwnProperty;t=i(1737),r=i(6286),n=i(8753),e.exports=function(e){function i(e,t){this.stream=e,i.__super__.constructor.call(this,t)}return function(e,t){for(var i in t)o.call(t,i)&&(e[i]=t[i]);function n(){this.constructor=e}n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype}(i,e),i.prototype.endline=function(e,t,r){return e.isLastRootNode&&t.state===n.CloseTag?"":i.__super__.endline.call(this,e,t,r)},i.prototype.document=function(e,t){var i,n,r,o,s,a,c,l,u;for(n=r=0,s=(c=e.children).length;r<s;n=++r)(i=c[n]).isLastRootNode=n===e.children.length-1;for(t=this.filterOptions(t),u=[],o=0,a=(l=e.children).length;o<a;o++)i=l[o],u.push(this.writeChildNode(i,t,0));return u},i.prototype.attribute=function(e,t,n){return this.stream.write(i.__super__.attribute.call(this,e,t,n))},i.prototype.cdata=function(e,t,n){return this.stream.write(i.__super__.cdata.call(this,e,t,n))},i.prototype.comment=function(e,t,n){return this.stream.write(i.__super__.comment.call(this,e,t,n))},i.prototype.declaration=function(e,t,n){return this.stream.write(i.__super__.declaration.call(this,e,t,n))},i.prototype.docType=function(e,t,i){var r,o,s,a;if(i||(i=0),this.openNode(e,t,i),t.state=n.OpenTag,this.stream.write(this.indent(e,t,i)),this.stream.write("<!DOCTYPE "+e.root().name),e.pubID&&e.sysID?this.stream.write(' PUBLIC "'+e.pubID+'" "'+e.sysID+'"'):e.sysID&&this.stream.write(' SYSTEM "'+e.sysID+'"'),e.children.length>0){for(this.stream.write(" ["),this.stream.write(this.endline(e,t,i)),t.state=n.InsideTag,o=0,s=(a=e.children).length;o<s;o++)r=a[o],this.writeChildNode(r,t,i+1);t.state=n.CloseTag,this.stream.write("]")}return t.state=n.CloseTag,this.stream.write(t.spaceBeforeSlash+">"),this.stream.write(this.endline(e,t,i)),t.state=n.None,this.closeNode(e,t,i)},i.prototype.element=function(e,i,r){var s,a,c,l,u,h,d,p,f;for(d in r||(r=0),this.openNode(e,i,r),i.state=n.OpenTag,this.stream.write(this.indent(e,i,r)+"<"+e.name),p=e.attribs)o.call(p,d)&&(s=p[d],this.attribute(s,i,r));if(l=0===(c=e.children.length)?null:e.children[0],0===c||e.children.every(function(e){return(e.type===t.Text||e.type===t.Raw)&&""===e.value}))i.allowEmpty?(this.stream.write(">"),i.state=n.CloseTag,this.stream.write("</"+e.name+">")):(i.state=n.CloseTag,this.stream.write(i.spaceBeforeSlash+"/>"));else if(!i.pretty||1!==c||l.type!==t.Text&&l.type!==t.Raw||null==l.value){for(this.stream.write(">"+this.endline(e,i,r)),i.state=n.InsideTag,u=0,h=(f=e.children).length;u<h;u++)a=f[u],this.writeChildNode(a,i,r+1);i.state=n.CloseTag,this.stream.write(this.indent(e,i,r)+"</"+e.name+">")}else this.stream.write(">"),i.state=n.InsideTag,i.suppressPrettyCount++,this.writeChildNode(l,i,r+1),i.suppressPrettyCount--,i.state=n.CloseTag,this.stream.write("</"+e.name+">");return this.stream.write(this.endline(e,i,r)),i.state=n.None,this.closeNode(e,i,r)},i.prototype.processingInstruction=function(e,t,n){return this.stream.write(i.__super__.processingInstruction.call(this,e,t,n))},i.prototype.raw=function(e,t,n){return this.stream.write(i.__super__.raw.call(this,e,t,n))},i.prototype.text=function(e,t,n){return this.stream.write(i.__super__.text.call(this,e,t,n))},i.prototype.dtdAttList=function(e,t,n){return this.stream.write(i.__super__.dtdAttList.call(this,e,t,n))},i.prototype.dtdElement=function(e,t,n){return this.stream.write(i.__super__.dtdElement.call(this,e,t,n))},i.prototype.dtdEntity=function(e,t,n){return this.stream.write(i.__super__.dtdEntity.call(this,e,t,n))},i.prototype.dtdNotation=function(e,t,n){return this.stream.write(i.__super__.dtdNotation.call(this,e,t,n))},i}(r)}).call(this)},382(e,t,i){(function(){var t,n={}.hasOwnProperty;t=i(6286),e.exports=function(e){function t(e){t.__super__.constructor.call(this,e)}return function(e,t){for(var i in t)n.call(t,i)&&(e[i]=t[i]);function r(){this.constructor=e}r.prototype=t.prototype,e.prototype=new r,e.__super__=t.prototype}(t,e),t.prototype.document=function(e,t){var i,n,r,o,s;for(t=this.filterOptions(t),o="",n=0,r=(s=e.children).length;n<r;n++)i=s[n],o+=this.writeChildNode(i,t,0);return t.pretty&&o.slice(-t.newline.length)===t.newline&&(o=o.slice(0,-t.newline.length)),o},t}(t)}).call(this)},3976(e){(function(){var t=function(e,t){return function(){return e.apply(t,arguments)}},i={}.hasOwnProperty;e.exports=function(){function e(e){var n,r,o;for(n in this.assertLegalName=t(this.assertLegalName,this),this.assertLegalChar=t(this.assertLegalChar,this),e||(e={}),this.options=e,this.options.version||(this.options.version="1.0"),r=e.stringify||{})i.call(r,n)&&(o=r[n],this[n]=o)}return e.prototype.name=function(e){return this.options.noValidation?e:this.assertLegalName(""+e||"")},e.prototype.text=function(e){return this.options.noValidation?e:this.assertLegalChar(this.textEscape(""+e||""))},e.prototype.cdata=function(e){return this.options.noValidation?e:(e=(e=""+e||"").replace("]]>","]]]]><![CDATA[>"),this.assertLegalChar(e))},e.prototype.comment=function(e){if(this.options.noValidation)return e;if((e=""+e||"").match(/--/))throw new Error("Comment text cannot contain double-hypen: "+e);return this.assertLegalChar(e)},e.prototype.raw=function(e){return this.options.noValidation?e:""+e||""},e.prototype.attValue=function(e){return this.options.noValidation?e:this.assertLegalChar(this.attEscape(e=""+e||""))},e.prototype.insTarget=function(e){return this.options.noValidation?e:this.assertLegalChar(""+e||"")},e.prototype.insValue=function(e){if(this.options.noValidation)return e;if((e=""+e||"").match(/\?>/))throw new Error("Invalid processing instruction value: "+e);return this.assertLegalChar(e)},e.prototype.xmlVersion=function(e){if(this.options.noValidation)return e;if(!(e=""+e||"").match(/1\.[0-9]+/))throw new Error("Invalid version number: "+e);return e},e.prototype.xmlEncoding=function(e){if(this.options.noValidation)return e;if(!(e=""+e||"").match(/^[A-Za-z](?:[A-Za-z0-9._-])*$/))throw new Error("Invalid encoding: "+e);return this.assertLegalChar(e)},e.prototype.xmlStandalone=function(e){return this.options.noValidation?e:e?"yes":"no"},e.prototype.dtdPubID=function(e){return this.options.noValidation?e:this.assertLegalChar(""+e||"")},e.prototype.dtdSysID=function(e){return this.options.noValidation?e:this.assertLegalChar(""+e||"")},e.prototype.dtdElementValue=function(e){return this.options.noValidation?e:this.assertLegalChar(""+e||"")},e.prototype.dtdAttType=function(e){return this.options.noValidation?e:this.assertLegalChar(""+e||"")},e.prototype.dtdAttDefault=function(e){return this.options.noValidation?e:this.assertLegalChar(""+e||"")},e.prototype.dtdEntityValue=function(e){return this.options.noValidation?e:this.assertLegalChar(""+e||"")},e.prototype.dtdNData=function(e){return this.options.noValidation?e:this.assertLegalChar(""+e||"")},e.prototype.convertAttKey="@",e.prototype.convertPIKey="?",e.prototype.convertTextKey="#text",e.prototype.convertCDataKey="#cdata",e.prototype.convertCommentKey="#comment",e.prototype.convertRawKey="#raw",e.prototype.assertLegalChar=function(e){var t,i;if(this.options.noValidation)return e;if(t="","1.0"===this.options.version){if(t=/[\0-\x08\x0B\f\x0E-\x1F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,i=e.match(t))throw new Error("Invalid character in string: "+e+" at index "+i.index)}else if("1.1"===this.options.version&&(t=/[\0\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,i=e.match(t)))throw new Error("Invalid character in string: "+e+" at index "+i.index);return e},e.prototype.assertLegalName=function(e){var t;if(this.options.noValidation)return e;if(this.assertLegalChar(e),t=/^([:A-Z_a-z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])([\x2D\.0-:A-Z_a-z\xB7\xC0-\xD6\xD8-\xF6\xF8-\u037D\u037F-\u1FFF\u200C\u200D\u203F\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])*$/,!e.match(t))throw new Error("Invalid character in name");return e},e.prototype.textEscape=function(e){var t;return this.options.noValidation?e:(t=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,e.replace(t,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\r/g,"&#xD;"))},e.prototype.attEscape=function(e){var t;return this.options.noValidation?e:(t=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,e.replace(t,"&amp;").replace(/</g,"&lt;").replace(/"/g,"&quot;").replace(/\t/g,"&#x9;").replace(/\n/g,"&#xA;").replace(/\r/g,"&#xD;"))},e}()}).call(this)},2535(e,t,i){(function(){var t,n,r={}.hasOwnProperty;t=i(1737),n=i(7457),e.exports=function(e){function i(e,n){if(i.__super__.constructor.call(this,e),null==n)throw new Error("Missing element text. "+this.debugInfo());this.name="#text",this.type=t.Text,this.value=this.stringify.text(n)}return function(e,t){for(var i in t)r.call(t,i)&&(e[i]=t[i]);function n(){this.constructor=e}n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype}(i,e),Object.defineProperty(i.prototype,"isElementContentWhitespace",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(i.prototype,"wholeText",{get:function(){var e,t,i;for(i="",t=this.previousSibling;t;)i=t.data+i,t=t.previousSibling;for(i+=this.data,e=this.nextSibling;e;)i+=e.data,e=e.nextSibling;return i}}),i.prototype.clone=function(){return Object.create(this)},i.prototype.toString=function(e){return this.options.writer.text(this,this.options.writer.filterOptions(e))},i.prototype.splitText=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())},i.prototype.replaceWholeText=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())},i}(n)}).call(this)},6286(e,t,i){(function(){var t,n,r,o={}.hasOwnProperty;r=i(9241).assign,t=i(1737),i(4130),i(6376),i(2691),i(2679),i(3906),i(1268),i(2535),i(5915),i(1218),i(4111),i(7696),i(5529),i(8012),n=i(8753),e.exports=function(){function e(e){var t,i,n;for(t in e||(e={}),this.options=e,i=e.writer||{})o.call(i,t)&&(n=i[t],this["_"+t]=this[t],this[t]=n)}return e.prototype.filterOptions=function(e){var t,i,o,s,a,c,l,u;return e||(e={}),e=r({},this.options,e),(t={writer:this}).pretty=e.pretty||!1,t.allowEmpty=e.allowEmpty||!1,t.indent=null!=(i=e.indent)?i:" ",t.newline=null!=(o=e.newline)?o:"\n",t.offset=null!=(s=e.offset)?s:0,t.dontPrettyTextNodes=null!=(a=null!=(c=e.dontPrettyTextNodes)?c:e.dontprettytextnodes)?a:0,t.spaceBeforeSlash=null!=(l=null!=(u=e.spaceBeforeSlash)?u:e.spacebeforeslash)?l:"",!0===t.spaceBeforeSlash&&(t.spaceBeforeSlash=" "),t.suppressPrettyCount=0,t.user={},t.state=n.None,t},e.prototype.indent=function(e,t,i){var n;return!t.pretty||t.suppressPrettyCount?"":t.pretty&&(n=(i||0)+t.offset+1)>0?new Array(n).join(t.indent):""},e.prototype.endline=function(e,t,i){return!t.pretty||t.suppressPrettyCount?"":t.newline},e.prototype.attribute=function(e,t,i){var n;return this.openAttribute(e,t,i),n=" "+e.name+'="'+e.value+'"',this.closeAttribute(e,t,i),n},e.prototype.cdata=function(e,t,i){var r;return this.openNode(e,t,i),t.state=n.OpenTag,r=this.indent(e,t,i)+"<![CDATA[",t.state=n.InsideTag,r+=e.value,t.state=n.CloseTag,r+="]]>"+this.endline(e,t,i),t.state=n.None,this.closeNode(e,t,i),r},e.prototype.comment=function(e,t,i){var r;return this.openNode(e,t,i),t.state=n.OpenTag,r=this.indent(e,t,i)+"\x3c!-- ",t.state=n.InsideTag,r+=e.value,t.state=n.CloseTag,r+=" --\x3e"+this.endline(e,t,i),t.state=n.None,this.closeNode(e,t,i),r},e.prototype.declaration=function(e,t,i){var r;return this.openNode(e,t,i),t.state=n.OpenTag,r=this.indent(e,t,i)+"<?xml",t.state=n.InsideTag,r+=' version="'+e.version+'"',null!=e.encoding&&(r+=' encoding="'+e.encoding+'"'),null!=e.standalone&&(r+=' standalone="'+e.standalone+'"'),t.state=n.CloseTag,r+=t.spaceBeforeSlash+"?>",r+=this.endline(e,t,i),t.state=n.None,this.closeNode(e,t,i),r},e.prototype.docType=function(e,t,i){var r,o,s,a,c;if(i||(i=0),this.openNode(e,t,i),t.state=n.OpenTag,a=this.indent(e,t,i),a+="<!DOCTYPE "+e.root().name,e.pubID&&e.sysID?a+=' PUBLIC "'+e.pubID+'" "'+e.sysID+'"':e.sysID&&(a+=' SYSTEM "'+e.sysID+'"'),e.children.length>0){for(a+=" [",a+=this.endline(e,t,i),t.state=n.InsideTag,o=0,s=(c=e.children).length;o<s;o++)r=c[o],a+=this.writeChildNode(r,t,i+1);t.state=n.CloseTag,a+="]"}return t.state=n.CloseTag,a+=t.spaceBeforeSlash+">",a+=this.endline(e,t,i),t.state=n.None,this.closeNode(e,t,i),a},e.prototype.element=function(e,i,r){var s,a,c,l,u,h,d,p,f,g,m,y,v,_;for(f in r||(r=0),g=!1,m="",this.openNode(e,i,r),i.state=n.OpenTag,m+=this.indent(e,i,r)+"<"+e.name,y=e.attribs)o.call(y,f)&&(s=y[f],m+=this.attribute(s,i,r));if(l=0===(c=e.children.length)?null:e.children[0],0===c||e.children.every(function(e){return(e.type===t.Text||e.type===t.Raw)&&""===e.value}))i.allowEmpty?(m+=">",i.state=n.CloseTag,m+="</"+e.name+">"+this.endline(e,i,r)):(i.state=n.CloseTag,m+=i.spaceBeforeSlash+"/>"+this.endline(e,i,r));else if(!i.pretty||1!==c||l.type!==t.Text&&l.type!==t.Raw||null==l.value){if(i.dontPrettyTextNodes)for(u=0,d=(v=e.children).length;u<d;u++)if(((a=v[u]).type===t.Text||a.type===t.Raw)&&null!=a.value){i.suppressPrettyCount++,g=!0;break}for(m+=">"+this.endline(e,i,r),i.state=n.InsideTag,h=0,p=(_=e.children).length;h<p;h++)a=_[h],m+=this.writeChildNode(a,i,r+1);i.state=n.CloseTag,m+=this.indent(e,i,r)+"</"+e.name+">",g&&i.suppressPrettyCount--,m+=this.endline(e,i,r),i.state=n.None}else m+=">",i.state=n.InsideTag,i.suppressPrettyCount++,g=!0,m+=this.writeChildNode(l,i,r+1),i.suppressPrettyCount--,g=!1,i.state=n.CloseTag,m+="</"+e.name+">"+this.endline(e,i,r);return this.closeNode(e,i,r),m},e.prototype.writeChildNode=function(e,i,n){switch(e.type){case t.CData:return this.cdata(e,i,n);case t.Comment:return this.comment(e,i,n);case t.Element:return this.element(e,i,n);case t.Raw:return this.raw(e,i,n);case t.Text:return this.text(e,i,n);case t.ProcessingInstruction:return this.processingInstruction(e,i,n);case t.Dummy:return"";case t.Declaration:return this.declaration(e,i,n);case t.DocType:return this.docType(e,i,n);case t.AttributeDeclaration:return this.dtdAttList(e,i,n);case t.ElementDeclaration:return this.dtdElement(e,i,n);case t.EntityDeclaration:return this.dtdEntity(e,i,n);case t.NotationDeclaration:return this.dtdNotation(e,i,n);default:throw new Error("Unknown XML node type: "+e.constructor.name)}},e.prototype.processingInstruction=function(e,t,i){var r;return this.openNode(e,t,i),t.state=n.OpenTag,r=this.indent(e,t,i)+"<?",t.state=n.InsideTag,r+=e.target,e.value&&(r+=" "+e.value),t.state=n.CloseTag,r+=t.spaceBeforeSlash+"?>",r+=this.endline(e,t,i),t.state=n.None,this.closeNode(e,t,i),r},e.prototype.raw=function(e,t,i){var r;return this.openNode(e,t,i),t.state=n.OpenTag,r=this.indent(e,t,i),t.state=n.InsideTag,r+=e.value,t.state=n.CloseTag,r+=this.endline(e,t,i),t.state=n.None,this.closeNode(e,t,i),r},e.prototype.text=function(e,t,i){var r;return this.openNode(e,t,i),t.state=n.OpenTag,r=this.indent(e,t,i),t.state=n.InsideTag,r+=e.value,t.state=n.CloseTag,r+=this.endline(e,t,i),t.state=n.None,this.closeNode(e,t,i),r},e.prototype.dtdAttList=function(e,t,i){var r;return this.openNode(e,t,i),t.state=n.OpenTag,r=this.indent(e,t,i)+"<!ATTLIST",t.state=n.InsideTag,r+=" "+e.elementName+" "+e.attributeName+" "+e.attributeType,"#DEFAULT"!==e.defaultValueType&&(r+=" "+e.defaultValueType),e.defaultValue&&(r+=' "'+e.defaultValue+'"'),t.state=n.CloseTag,r+=t.spaceBeforeSlash+">"+this.endline(e,t,i),t.state=n.None,this.closeNode(e,t,i),r},e.prototype.dtdElement=function(e,t,i){var r;return this.openNode(e,t,i),t.state=n.OpenTag,r=this.indent(e,t,i)+"<!ELEMENT",t.state=n.InsideTag,r+=" "+e.name+" "+e.value,t.state=n.CloseTag,r+=t.spaceBeforeSlash+">"+this.endline(e,t,i),t.state=n.None,this.closeNode(e,t,i),r},e.prototype.dtdEntity=function(e,t,i){var r;return this.openNode(e,t,i),t.state=n.OpenTag,r=this.indent(e,t,i)+"<!ENTITY",t.state=n.InsideTag,e.pe&&(r+=" %"),r+=" "+e.name,e.value?r+=' "'+e.value+'"':(e.pubID&&e.sysID?r+=' PUBLIC "'+e.pubID+'" "'+e.sysID+'"':e.sysID&&(r+=' SYSTEM "'+e.sysID+'"'),e.nData&&(r+=" NDATA "+e.nData)),t.state=n.CloseTag,r+=t.spaceBeforeSlash+">"+this.endline(e,t,i),t.state=n.None,this.closeNode(e,t,i),r},e.prototype.dtdNotation=function(e,t,i){var r;return this.openNode(e,t,i),t.state=n.OpenTag,r=this.indent(e,t,i)+"<!NOTATION",t.state=n.InsideTag,r+=" "+e.name,e.pubID&&e.sysID?r+=' PUBLIC "'+e.pubID+'" "'+e.sysID+'"':e.pubID?r+=' PUBLIC "'+e.pubID+'"':e.sysID&&(r+=' SYSTEM "'+e.sysID+'"'),t.state=n.CloseTag,r+=t.spaceBeforeSlash+">"+this.endline(e,t,i),t.state=n.None,this.closeNode(e,t,i),r},e.prototype.openNode=function(e,t,i){},e.prototype.closeNode=function(e,t,i){},e.prototype.openAttribute=function(e,t,i){},e.prototype.closeAttribute=function(e,t,i){},e}()}).call(this)},9665(e,t,i){(function(){var t,n,r,o,s,a,c,l,u,h;h=i(9241),l=h.assign,u=h.isFunction,r=i(7260),o=i(1933),s=i(400),c=i(382),a=i(6775),t=i(1737),n=i(8753),e.exports.create=function(e,t,i,n){var r,s;if(null==e)throw new Error("Root element needs a name.");return n=l({},t,i,n),s=(r=new o(n)).element(e),n.headless||(r.declaration(n),null==n.pubID&&null==n.sysID||r.dtd(n)),s},e.exports.begin=function(e,t,i){var n;return u(e)&&(t=(n=[e,t])[0],i=n[1],e={}),t?new s(e,t,i):new o(e)},e.exports.stringWriter=function(e){return new c(e)},e.exports.streamWriter=function(e,t){return new a(e,t)},e.exports.implementation=new r,e.exports.nodeType=t,e.exports.writerState=n}).call(this)},1424(e){e.exports="1.25.4"},5317(e){"use strict";e.exports=require("child_process")},4236(e){"use strict";e.exports=require("console")},6982(e){"use strict";e.exports=require("crypto")},4434(e){"use strict";e.exports=require("events")},9896(e){"use strict";e.exports=require("fs")},9278(e){"use strict";e.exports=require("net")},8474(e){"use strict";e.exports=require("node:events")},3024(e){"use strict";e.exports=require("node:fs")},1455(e){"use strict";e.exports=require("node:fs/promises")},6760(e){"use strict";e.exports=require("node:path")},7075(e){"use strict";e.exports=require("node:stream")},6193(e){"use strict";e.exports=require("node:string_decoder")},3136(e){"use strict";e.exports=require("node:url")},7975(e){"use strict";e.exports=require("node:util")},857(e){"use strict";e.exports=require("os")},6928(e){"use strict";e.exports=require("path")},2203(e){"use strict";e.exports=require("stream")},5938(e){"use strict";e.exports=require("timers")},7016(e){"use strict";e.exports=require("url")},9023(e){"use strict";e.exports=require("util")},878(e,t){"use strict";t.y=t.balanced=void 0,t.balanced=(e,n,r)=>{const o=e instanceof RegExp?i(e,r):e,s=n instanceof RegExp?i(n,r):n,a=null!==o&&null!=s&&(0,t.y)(o,s,r);return a&&{start:a[0],end:a[1],pre:r.slice(0,a[0]),body:r.slice(a[0]+o.length,a[1]),post:r.slice(a[1]+s.length)}};const i=(e,t)=>{const i=t.match(e);return i?i[0]:null};t.y=(e,t,i)=>{let n,r,o,s,a,c=i.indexOf(e),l=i.indexOf(t,c+1),u=c;if(c>=0&&l>0){if(e===t)return[c,l];for(n=[],o=i.length;u>=0&&!a;){if(u===c)n.push(u),c=i.indexOf(e,u+1);else if(1===n.length){const e=n.pop();void 0!==e&&(a=[e,l])}else r=n.pop(),void 0!==r&&r<o&&(o=r,s=l),l=i.indexOf(t,u+1);u=c<l&&c>=0?c:l}n.length&&void 0!==s&&(a=[o,s])}return a}},305(e,t,i){"use strict";t.M9=t.T4=void 0,t.expand=function(e,i={}){if(!e)return[];const{max:n=t.T4,maxLength:l=t.M9}=i;return"{}"===e.slice(0,2)&&(e="\\{\\}"+e.slice(2)),P(function(e){return e.replace(f,r).replace(g,o).replace(m,s).replace(y,a).replace(v,c)}(e),n,l,!0).map(b)};const n=i(878),r="\0SLASH"+Math.random()+"\0",o="\0OPEN"+Math.random()+"\0",s="\0CLOSE"+Math.random()+"\0",a="\0COMMA"+Math.random()+"\0",c="\0PERIOD"+Math.random()+"\0",l=new RegExp(r,"g"),u=new RegExp(o,"g"),h=new RegExp(s,"g"),d=new RegExp(a,"g"),p=new RegExp(c,"g"),f=/\\\\/g,g=/\\{/g,m=/\\}/g,y=/\\,/g,v=/\\\./g;function _(e){return isNaN(e)?e.charCodeAt(0):parseInt(e,10)}function b(e){return e.replace(l,"\\").replace(u,"{").replace(h,"}").replace(d,",").replace(p,".")}function w(e){if(!e)return[""];const t=[],i=(0,n.balanced)("{","}",e);if(!i)return e.split(",");const{pre:r,body:o,post:s}=i,a=r.split(",");a[a.length-1]+="{"+o+"}";const c=w(s);return s.length&&(a[a.length-1]+=c.shift(),a.push.apply(a,c)),t.push.apply(t,a),t}function D(e){return"{"+e+"}"}function T(e){return/^-?0\d/.test(e)}function S(e,t){return e<=t}function C(e,t){return e>=t}function R(e,t,i,n,r,o){const s=[];let a=0;for(let c=0;c<e.length;c++)for(let l=0;l<i.length;l++){if(s.length>=n)return s;const u=e[c]+t+i[l];if(!o||u){if(a+u.length>r)return s;s.push(u),a+=u.length}}return s}function E(e,t,i){const n=e.split(/\.\./),r=[];if(void 0===n[0]||void 0===n[1])return r;const o=_(n[0]),s=_(n[1]),a=Math.max(n[0].length,n[1].length);let c=3===n.length&&void 0!==n[2]?Math.max(Math.abs(_(n[2])),1):1,l=S;s<o&&(c*=-1,l=C);const u=n.some(T);for(let e=o;l(e,s)&&r.length<i;e+=c){let i;if(t)i=String.fromCharCode(e),"\\"===i&&(i="");else if(i=String(e),u){const t=a-i.length;if(t>0){const n=new Array(t+1).join("0");i=e<0?"-"+n+i.slice(1):n+i}}r.push(i)}return r}function P(e,t,i,r){let o=[""],a=!1,c=!0;for(;;){const l=(0,n.balanced)("{","}",e);if(!l)return R(o,e,[""],t,i,a);const u=l.pre;if(/\$$/.test(u)){if(o=R(o,u+"{"+l.body+"}",[""],t,i,a&&!l.post.length),c=!1,!l.post.length)break;e=l.post;continue}const h=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(l.body),d=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(l.body),p=h||d,f=l.body.indexOf(",")>=0;if(!p&&!f){if(l.post.match(/,(?!,).*\}/)){e=l.pre+"{"+l.body+s+l.post,r=!0;continue}return R(o,u+"{"+l.body+"}"+l.post,[""],t,i,a)}let g;if(c&&(a=r&&!p,c=!1),p)g=E(l.body,d,t);else{let n=w(l.body);if(1===n.length&&void 0!==n[0]&&(n=P(n[0],t,i,!1).map(D),1===n.length)){if(o=R(o,u+n[0],[""],t,i,a&&!l.post.length),!l.post.length)break;e=l.post;continue}g=[];for(let e=0;e<n.length;e++)g.push.apply(g,P(n[e],t,i,!1))}if(o=R(o,u,g,t,i,a&&!l.post.length),!l.post.length)break;e=l.post}return o}t.T4=1e5,t.M9=4e6},8862(e,t,i){"use strict";var n=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),r=n(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.range=e.balanced=void 0,e.balanced=(i,n,r)=>{let o=i instanceof RegExp?t(i,r):i,s=n instanceof RegExp?t(n,r):n,a=null!==o&&null!=s&&(0,e.range)(o,s,r);return a&&{start:a[0],end:a[1],pre:r.slice(0,a[0]),body:r.slice(a[0]+o.length,a[1]),post:r.slice(a[1]+s.length)}};var t=(e,t)=>{let i=t.match(e);return i?i[0]:null};e.range=(e,t,i)=>{let n,r,o,s,a,c=i.indexOf(e),l=i.indexOf(t,c+1),u=c;if(c>=0&&l>0){if(e===t)return[c,l];for(n=[],o=i.length;u>=0&&!a;){if(u===c)n.push(u),c=i.indexOf(e,u+1);else if(1===n.length){let e=n.pop();void 0!==e&&(a=[e,l])}else r=n.pop(),void 0!==r&&r<o&&(o=r,s=l),l=i.indexOf(t,u+1);u=c<l&&c>=0?c:l}n.length&&void 0!==s&&(a=[o,s])}return a}}),o=n(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.EXPANSION_MAX=void 0,e.expand=function(t,r={}){if(!t)return[];let{max:c=e.EXPANSION_MAX}=r;return"{}"===t.slice(0,2)&&(t="\\{\\}"+t.slice(2)),C(function(e){return e.replace(p,i).replace(f,n).replace(g,o).replace(m,s).replace(y,a)}(t),c,!0).map(_)};var t=r(),i="\0SLASH"+Math.random()+"\0",n="\0OPEN"+Math.random()+"\0",o="\0CLOSE"+Math.random()+"\0",s="\0COMMA"+Math.random()+"\0",a="\0PERIOD"+Math.random()+"\0",c=new RegExp(i,"g"),l=new RegExp(n,"g"),u=new RegExp(o,"g"),h=new RegExp(s,"g"),d=new RegExp(a,"g"),p=/\\\\/g,f=/\\{/g,g=/\\}/g,m=/\\,/g,y=/\\./g;function v(e){return isNaN(e)?e.charCodeAt(0):parseInt(e,10)}function _(e){return e.replace(c,"\\").replace(l,"{").replace(u,"}").replace(h,",").replace(d,".")}function b(e){if(!e)return[""];let i=[],n=(0,t.balanced)("{","}",e);if(!n)return e.split(",");let{pre:r,body:o,post:s}=n,a=r.split(",");a[a.length-1]+="{"+o+"}";let c=b(s);return s.length&&(a[a.length-1]+=c.shift(),a.push.apply(a,c)),i.push.apply(i,a),i}function w(e){return"{"+e+"}"}function D(e){return/^-?0\d/.test(e)}function T(e,t){return e<=t}function S(e,t){return e>=t}function C(e,i,n){let r=[],s=(0,t.balanced)("{","}",e);if(!s)return[e];let a=s.pre,c=s.post.length?C(s.post,i,!1):[""];if(/\$$/.test(s.pre))for(let e=0;e<c.length&&e<i;e++){let t=a+"{"+s.body+"}"+c[e];r.push(t)}else{let t,l,u=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(s.body),h=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(s.body),d=u||h,p=s.body.indexOf(",")>=0;if(!d&&!p)return s.post.match(/,(?!,).*\}/)?C(e=s.pre+"{"+s.body+o+s.post,i,!0):[e];if(d)t=s.body.split(/\.\./);else if(t=b(s.body),1===t.length&&void 0!==t[0]&&(t=C(t[0],i,!1).map(w),1===t.length))return c.map(e=>s.pre+t[0]+e);if(d&&void 0!==t[0]&&void 0!==t[1]){let e=v(t[0]),i=v(t[1]),n=Math.max(t[0].length,t[1].length),r=3===t.length&&void 0!==t[2]?Math.abs(v(t[2])):1,o=T;i<e&&(r*=-1,o=S);let s=t.some(D);l=[];for(let t=e;o(t,i);t+=r){let e;if(h)e=String.fromCharCode(t),"\\"===e&&(e="");else if(e=String(t),s){let i=n-e.length;if(i>0){let n=new Array(i+1).join("0");e=t<0?"-"+n+e.slice(1):n+e}}l.push(e)}}else{l=[];for(let e=0;e<t.length;e++)l.push.apply(l,C(t[e],i,!1))}for(let e=0;e<l.length;e++)for(let t=0;t<c.length&&r.length<i;t++){let i=a+l[e]+c[t];(!n||d||i)&&r.push(i)}}return r}e.EXPANSION_MAX=1e5}),s=n(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.assertValidPattern=void 0,e.assertValidPattern=e=>{if("string"!=typeof e)throw new TypeError("invalid pattern");if(e.length>65536)throw new TypeError("pattern is too long")}}),a=n(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.parseClass=void 0;var t={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},i=e=>e.replace(/[[\]\\-]/g,"\\$&"),n=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),r=e=>e.join("");e.parseClass=(e,o)=>{let s=o;if("["!==e.charAt(s))throw new Error("not in a brace expression");let a=[],c=[],l=s+1,u=!1,h=!1,d=!1,p=!1,f=s,g="";e:for(;l<e.length;){let n=e.charAt(l);if("!"!==n&&"^"!==n||l!==s+1){if("]"===n&&u&&!d){f=l+1;break}if(u=!0,"\\"!==n||d){if("["===n&&!d)for(let[i,[n,r,o]]of Object.entries(t))if(e.startsWith(i,l)){if(g)return["$.",!1,e.length-s,!0];l+=i.length,o?c.push(n):a.push(n),h=h||r;continue e}d=!1,g?(n>g?a.push(i(g)+"-"+i(n)):n===g&&a.push(i(n)),g="",l++):e.startsWith("-]",l+1)?(a.push(i(n+"-")),l+=2):e.startsWith("-",l+1)?(g=n,l+=2):(a.push(i(n)),l++)}else d=!0,l++}else p=!0,l++}if(f<l)return["",!1,0,!1];if(!a.length&&!c.length)return["$.",!1,e.length-s,!0];if(0===c.length&&1===a.length&&/^\\?.$/.test(a[0])&&!p){let e=2===a[0].length?a[0].slice(-1):a[0];return[n(e),!1,f-s,!1]}let m="["+(p?"^":"")+r(a)+"]",y="["+(p?"":"^")+r(c)+"]";return[a.length&&c.length?"("+m+"|"+y+")":a.length?m:y,h,f-s,!0]}}),c=n(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.unescape=void 0,e.unescape=(e,{windowsPathsNoEscape:t=!1,magicalBraces:i=!0}={})=>i?t?e.replace(/\[([^\/\\])\]/g,"$1"):e.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1"):t?e.replace(/\[([^\/\\{}])\]/g,"$1"):e.replace(/((?!\\).|^)\[([^\/\\{}])\]/g,"$1$2").replace(/\\([^\/{}])/g,"$1")}),l=n(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.AST=void 0;var t=a(),i=c(),n=new Set(["!","?","+","*","@"]),r=e=>n.has(e),o="(?!\\.)",s=new Set(["[","."]),l=new Set(["..","."]),u=new Set("().*{}+?[]^$\\!"),h=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),d="[^/]",p=d+"*?",f=d+"+?";e.AST=class e{type;#e;#t;#i=!1;#n=[];#r;#o;#s;#a=!1;#c;#l;#u=!1;constructor(e,t,i={}){this.type=e,e&&(this.#t=!0),this.#r=t,this.#e=this.#r?this.#r.#e:this,this.#c=this.#e===this?i:this.#e.#c,this.#s=this.#e===this?[]:this.#e.#s,"!"===e&&!this.#e.#a&&this.#s.push(this),this.#o=this.#r?this.#r.#n.length:0}get hasMagic(){if(void 0!==this.#t)return this.#t;for(let e of this.#n)if("string"!=typeof e&&(e.type||e.hasMagic))return this.#t=!0;return this.#t}toString(){return void 0!==this.#l?this.#l:this.type?this.#l=this.type+"("+this.#n.map(e=>String(e)).join("|")+")":this.#l=this.#n.map(e=>String(e)).join("")}#h(){if(this!==this.#e)throw new Error("should only call on root");if(this.#a)return this;let e;for(this.toString(),this.#a=!0;e=this.#s.pop();){if("!"!==e.type)continue;let t=e,i=t.#r;for(;i;){for(let n=t.#o+1;!i.type&&n<i.#n.length;n++)for(let t of e.#n){if("string"==typeof t)throw new Error("string part in extglob AST??");t.copyIn(i.#n[n])}t=i,i=t.#r}}return this}push(...t){for(let i of t)if(""!==i){if("string"!=typeof i&&!(i instanceof e&&i.#r===this))throw new Error("invalid part: "+i);this.#n.push(i)}}toJSON(){let e=null===this.type?this.#n.slice().map(e=>"string"==typeof e?e:e.toJSON()):[this.type,...this.#n.map(e=>e.toJSON())];return this.isStart()&&!this.type&&e.unshift([]),this.isEnd()&&(this===this.#e||this.#e.#a&&"!"===this.#r?.type)&&e.push({}),e}isStart(){if(this.#e===this)return!0;if(!this.#r?.isStart())return!1;if(0===this.#o)return!0;let t=this.#r;for(let i=0;i<this.#o;i++){let n=t.#n[i];if(!(n instanceof e&&"!"===n.type))return!1}return!0}isEnd(){if(this.#e===this||"!"===this.#r?.type)return!0;if(!this.#r?.isEnd())return!1;if(!this.type)return this.#r?.isEnd();let e=this.#r?this.#r.#n.length:0;return this.#o===e-1}copyIn(e){"string"==typeof e?this.push(e):this.push(e.clone(this))}clone(t){let i=new e(this.type,t);for(let e of this.#n)i.copyIn(e);return i}static#d(t,i,n,o){let s=!1,a=!1,c=-1,l=!1;if(null===i.type){let u=n,h="";for(;u<t.length;){let n=t.charAt(u++);if(s||"\\"===n)s=!s,h+=n;else if(a)u===c+1?("^"===n||"!"===n)&&(l=!0):"]"===n&&!(u===c+2&&l)&&(a=!1),h+=n;else if("["!==n){if(!o.noext&&r(n)&&"("===t.charAt(u)){i.push(h),h="";let r=new e(n,i);u=e.#d(t,r,u,o),i.push(r);continue}h+=n}else a=!0,c=u,l=!1,h+=n}return i.push(h),u}let u=n+1,h=new e(null,i),d=[],p="";for(;u<t.length;){let n=t.charAt(u++);if(s||"\\"===n)s=!s,p+=n;else if(a)u===c+1?("^"===n||"!"===n)&&(l=!0):"]"===n&&!(u===c+2&&l)&&(a=!1),p+=n;else if("["!==n){if(r(n)&&"("===t.charAt(u)){h.push(p),p="";let i=new e(n,h);h.push(i),u=e.#d(t,i,u,o);continue}if("|"!==n){if(")"===n)return""===p&&0===i.#n.length&&(i.#u=!0),h.push(p),p="",i.push(...d,h),u;p+=n}else h.push(p),p="",d.push(h),h=new e(null,i)}else a=!0,c=u,l=!1,p+=n}return i.type=null,i.#t=void 0,i.#n=[t.substring(n-1)],u}static fromGlob(t,i={}){let n=new e(null,void 0,i);return e.#d(t,n,0,i),n}toMMPattern(){if(this!==this.#e)return this.#e.toMMPattern();let e=this.toString(),[t,i,n,r]=this.toRegExpSource();if(!(n||this.#t||this.#c.nocase&&!this.#c.nocaseMagicOnly&&e.toUpperCase()!==e.toLowerCase()))return i;let o=(this.#c.nocase?"i":"")+(r?"u":"");return Object.assign(new RegExp(`^${t}$`,o),{_src:t,_glob:e})}get options(){return this.#c}toRegExpSource(t){let n=t??!!this.#c.dot;if(this.#e===this&&this.#h(),!this.type){let r=this.isStart()&&this.isEnd()&&!this.#n.some(e=>"string"!=typeof e),a=this.#n.map(i=>{let[n,o,s,a]="string"==typeof i?e.#p(i,this.#t,r):i.toRegExpSource(t);return this.#t=this.#t||s,this.#i=this.#i||a,n}).join(""),c="";if(this.isStart()&&"string"==typeof this.#n[0]&&(1!==this.#n.length||!l.has(this.#n[0]))){let e=s,i=n&&e.has(a.charAt(0))||a.startsWith("\\.")&&e.has(a.charAt(2))||a.startsWith("\\.\\.")&&e.has(a.charAt(4)),r=!n&&!t&&e.has(a.charAt(0));c=i?"(?!(?:^|/)\\.\\.?(?:$|/))":r?o:""}let u="";return this.isEnd()&&this.#e.#a&&"!"===this.#r?.type&&(u="(?:$|\\/)"),[c+a+u,(0,i.unescape)(a),this.#t=!!this.#t,this.#i]}let r="*"===this.type||"+"===this.type,a="!"===this.type?"(?:(?!(?:":"(?:",c=this.#f(n);if(this.isStart()&&this.isEnd()&&!c&&"!"!==this.type){let e=this.toString();return this.#n=[e],this.type=null,this.#t=void 0,[e,(0,i.unescape)(this.toString()),!1,!1]}let u=!r||t||n?"":this.#f(!0);u===c&&(u=""),u&&(c=`(?:${c})(?:${u})*?`);let h="";return h="!"===this.type&&this.#u?(this.isStart()&&!n?o:"")+f:a+c+("!"===this.type?"))"+(!this.isStart()||n||t?"":o)+p+")":"@"===this.type?")":"?"===this.type?")?":"+"===this.type&&u?")":"*"===this.type&&u?")?":`)${this.type}`),[h,(0,i.unescape)(c),this.#t=!!this.#t,this.#i]}#f(e){return this.#n.map(t=>{if("string"==typeof t)throw new Error("string type in extglob ast??");let[i,n,r,o]=t.toRegExpSource(e);return this.#i=this.#i||o,i}).filter(e=>!(this.isStart()&&this.isEnd()&&!e)).join("|")}static#p(e,n,r=!1){let o=!1,s="",a=!1,c=!1;for(let i=0;i<e.length;i++){let l=e.charAt(i);if(o)o=!1,s+=(u.has(l)?"\\":"")+l;else if("*"!==l)if(c=!1,"\\"!==l){if("["===l){let[r,o,c,l]=(0,t.parseClass)(e,i);if(c){s+=r,a=a||o,i+=c-1,n=n||l;continue}}"?"!==l?s+=h(l):(s+=d,n=!0)}else i===e.length-1?s+="\\\\":o=!0;else{if(c)continue;c=!0,s+=r&&/^[*]+$/.test(e)?f:p,n=!0}}return[s,(0,i.unescape)(e),!!n,a]}}}),u=n(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.escape=void 0,e.escape=(e,{windowsPathsNoEscape:t=!1,magicalBraces:i=!1}={})=>i?t?e.replace(/[?*()[\]{}]/g,"[$&]"):e.replace(/[?*()[\]\\{}]/g,"\\$&"):t?e.replace(/[?*()[\]]/g,"[$&]"):e.replace(/[?*()[\]\\]/g,"\\$&")}),h=n(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.unescape=e.escape=e.AST=e.Minimatch=e.match=e.makeRe=e.braceExpand=e.defaults=e.filter=e.GLOBSTAR=e.sep=e.minimatch=void 0;var t=o(),i=s(),n=l(),r=u(),a=c();e.minimatch=(e,t,n={})=>((0,i.assertValidPattern)(t),!(!n.nocomment&&"#"===t.charAt(0))&&new M(t,n).match(e));var h=/^\*+([^+@!?\*\[\(]*)$/,d=e=>t=>!t.startsWith(".")&&t.endsWith(e),p=e=>t=>t.endsWith(e),f=e=>(e=e.toLowerCase(),t=>!t.startsWith(".")&&t.toLowerCase().endsWith(e)),g=e=>(e=e.toLowerCase(),t=>t.toLowerCase().endsWith(e)),m=/^\*+\.\*+$/,y=e=>!e.startsWith(".")&&e.includes("."),v=e=>"."!==e&&".."!==e&&e.includes("."),_=/^\.\*+$/,b=e=>"."!==e&&".."!==e&&e.startsWith("."),w=/^\*+$/,D=e=>0!==e.length&&!e.startsWith("."),T=e=>0!==e.length&&"."!==e&&".."!==e,S=/^\?+([^+@!?\*\[\(]*)?$/,C=([e,t=""])=>{let i=x([e]);return t?(t=t.toLowerCase(),e=>i(e)&&e.toLowerCase().endsWith(t)):i},R=([e,t=""])=>{let i=O([e]);return t?(t=t.toLowerCase(),e=>i(e)&&e.toLowerCase().endsWith(t)):i},E=([e,t=""])=>{let i=O([e]);return t?e=>i(e)&&e.endsWith(t):i},P=([e,t=""])=>{let i=x([e]);return t?e=>i(e)&&e.endsWith(t):i},x=([e])=>{let t=e.length;return e=>e.length===t&&!e.startsWith(".")},O=([e])=>{let t=e.length;return e=>e.length===t&&"."!==e&&".."!==e},k="object"==typeof process&&process?"object"==typeof process.env&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix";e.sep="win32"===k?"\\":"/",e.minimatch.sep=e.sep,e.GLOBSTAR=Symbol("globstar **"),e.minimatch.GLOBSTAR=e.GLOBSTAR,e.filter=(t,i={})=>n=>(0,e.minimatch)(n,t,i),e.minimatch.filter=e.filter;var N=(e,t={})=>Object.assign({},e,t);e.defaults=t=>{if(!t||"object"!=typeof t||!Object.keys(t).length)return e.minimatch;let i=e.minimatch;return Object.assign((e,n,r={})=>i(e,n,N(t,r)),{Minimatch:class extends i.Minimatch{constructor(e,i={}){super(e,N(t,i))}static defaults(e){return i.defaults(N(t,e)).Minimatch}},AST:class extends i.AST{constructor(e,i,n={}){super(e,i,N(t,n))}static fromGlob(e,n={}){return i.AST.fromGlob(e,N(t,n))}},unescape:(e,n={})=>i.unescape(e,N(t,n)),escape:(e,n={})=>i.escape(e,N(t,n)),filter:(e,n={})=>i.filter(e,N(t,n)),defaults:e=>i.defaults(N(t,e)),makeRe:(e,n={})=>i.makeRe(e,N(t,n)),braceExpand:(e,n={})=>i.braceExpand(e,N(t,n)),match:(e,n,r={})=>i.match(e,n,N(t,r)),sep:i.sep,GLOBSTAR:e.GLOBSTAR})},e.minimatch.defaults=e.defaults,e.braceExpand=(e,n={})=>((0,i.assertValidPattern)(e),n.nobrace||!/\{(?:(?!\{).)*\}/.test(e)?[e]:(0,t.expand)(e,{max:n.braceExpandMax})),e.minimatch.braceExpand=e.braceExpand,e.makeRe=(e,t={})=>new M(e,t).makeRe(),e.minimatch.makeRe=e.makeRe,e.match=(e,t,i={})=>{let n=new M(t,i);return e=e.filter(e=>n.match(e)),n.options.nonull&&!e.length&&e.push(t),e},e.minimatch.match=e.match;var A=/[?*]|[+@!]\(.*?\)|\[|\]/,M=class{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;regexp;constructor(e,t={}){(0,i.assertValidPattern)(e),t=t||{},this.options=t,this.pattern=e,this.platform=t.platform||k,this.isWindows="win32"===this.platform,this.windowsPathsNoEscape=!!t.windowsPathsNoEscape||!1===t.allowWindowsEscape,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!t.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!t.nonegate,this.comment=!1,this.empty=!1,this.partial=!!t.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=void 0!==t.windowsNoMagicRoot?t.windowsNoMagicRoot:!(!this.isWindows||!this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(let e of this.set)for(let t of e)if("string"!=typeof t)return!0;return!1}debug(...e){}make(){let e=this.pattern,t=this.options;if(!t.nocomment&&"#"===e.charAt(0))return void(this.comment=!0);if(!e)return void(this.empty=!0);this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],t.debug&&(this.debug=(...e)=>console.error(...e)),this.debug(this.pattern,this.globSet);let i=this.globSet.map(e=>this.slashSplit(e));this.globParts=this.preprocess(i),this.debug(this.pattern,this.globParts);let n=this.globParts.map((e,t,i)=>{if(this.isWindows&&this.windowsNoMagicRoot){let t=!(""!==e[0]||""!==e[1]||"?"!==e[2]&&A.test(e[2])||A.test(e[3])),i=/^[a-z]:/i.test(e[0]);if(t)return[...e.slice(0,4),...e.slice(4).map(e=>this.parse(e))];if(i)return[e[0],...e.slice(1).map(e=>this.parse(e))]}return e.map(e=>this.parse(e))});if(this.debug(this.pattern,n),this.set=n.filter(e=>-1===e.indexOf(!1)),this.isWindows)for(let e=0;e<this.set.length;e++){let t=this.set[e];""===t[0]&&""===t[1]&&"?"===this.globParts[e][2]&&"string"==typeof t[3]&&/^[a-z]:$/i.test(t[3])&&(t[2]="?")}this.debug(this.pattern,this.set)}preprocess(e){if(this.options.noglobstar)for(let t=0;t<e.length;t++)for(let i=0;i<e[t].length;i++)"**"===e[t][i]&&(e[t][i]="*");let{optimizationLevel:t=1}=this.options;return t>=2?(e=this.firstPhasePreProcess(e),e=this.secondPhasePreProcess(e)):e=t>=1?this.levelOneOptimize(e):this.adjascentGlobstarOptimize(e),e}adjascentGlobstarOptimize(e){return e.map(e=>{let t=-1;for(;-1!==(t=e.indexOf("**",t+1));){let i=t;for(;"**"===e[i+1];)i++;i!==t&&e.splice(t,i-t)}return e})}levelOneOptimize(e){return e.map(e=>0===(e=e.reduce((e,t)=>{let i=e[e.length-1];return"**"===t&&"**"===i?e:".."===t&&i&&".."!==i&&"."!==i&&"**"!==i?(e.pop(),e):(e.push(t),e)},[])).length?[""]:e)}levelTwoFileOptimize(e){Array.isArray(e)||(e=this.slashSplit(e));let t=!1;do{if(t=!1,!this.preserveMultipleSlashes){for(let i=1;i<e.length-1;i++){let n=e[i];1===i&&""===n&&""===e[0]||("."===n||""===n)&&(t=!0,e.splice(i,1),i--)}"."===e[0]&&2===e.length&&("."===e[1]||""===e[1])&&(t=!0,e.pop())}let i=0;for(;-1!==(i=e.indexOf("..",i+1));){let n=e[i-1];n&&"."!==n&&".."!==n&&"**"!==n&&(t=!0,e.splice(i-1,2),i-=2)}}while(t);return 0===e.length?[""]:e}firstPhasePreProcess(e){let t=!1;do{t=!1;for(let i of e){let n=-1;for(;-1!==(n=i.indexOf("**",n+1));){let r=n;for(;"**"===i[r+1];)r++;r>n&&i.splice(n+1,r-n);let o=i[n+1],s=i[n+2],a=i[n+3];if(".."!==o||!s||"."===s||".."===s||!a||"."===a||".."===a)continue;t=!0,i.splice(n,1);let c=i.slice(0);c[n]="**",e.push(c),n--}if(!this.preserveMultipleSlashes){for(let e=1;e<i.length-1;e++){let n=i[e];1===e&&""===n&&""===i[0]||("."===n||""===n)&&(t=!0,i.splice(e,1),e--)}"."===i[0]&&2===i.length&&("."===i[1]||""===i[1])&&(t=!0,i.pop())}let r=0;for(;-1!==(r=i.indexOf("..",r+1));){let e=i[r-1];if(e&&"."!==e&&".."!==e&&"**"!==e){t=!0;let e=1===r&&"**"===i[r+1]?["."]:[];i.splice(r-1,2,...e),0===i.length&&i.push(""),r-=2}}}}while(t);return e}secondPhasePreProcess(e){for(let t=0;t<e.length-1;t++)for(let i=t+1;i<e.length;i++){let n=this.partsMatch(e[t],e[i],!this.preserveMultipleSlashes);if(n){e[t]=[],e[i]=n;break}}return e.filter(e=>e.length)}partsMatch(e,t,i=!1){let n=0,r=0,o=[],s="";for(;n<e.length&&r<t.length;)if(e[n]===t[r])o.push("b"===s?t[r]:e[n]),n++,r++;else if(i&&"**"===e[n]&&t[r]===e[n+1])o.push(e[n]),n++;else if(i&&"**"===t[r]&&e[n]===t[r+1])o.push(t[r]),r++;else if("*"!==e[n]||!t[r]||!this.options.dot&&t[r].startsWith(".")||"**"===t[r]){if("*"!==t[r]||!e[n]||!this.options.dot&&e[n].startsWith(".")||"**"===e[n])return!1;if("a"===s)return!1;s="b",o.push(t[r]),n++,r++}else{if("b"===s)return!1;s="a",o.push(e[n]),n++,r++}return e.length===t.length&&o}parseNegate(){if(this.nonegate)return;let e=this.pattern,t=!1,i=0;for(let n=0;n<e.length&&"!"===e.charAt(n);n++)t=!t,i++;i&&(this.pattern=e.slice(i)),this.negate=t}matchOne(t,i,n=!1){let r=this.options;if(this.isWindows){let e="string"==typeof t[0]&&/^[a-z]:$/i.test(t[0]),n=!e&&""===t[0]&&""===t[1]&&"?"===t[2]&&/^[a-z]:$/i.test(t[3]),r="string"==typeof i[0]&&/^[a-z]:$/i.test(i[0]),o=n?3:e?0:void 0,s=!r&&""===i[0]&&""===i[1]&&"?"===i[2]&&"string"==typeof i[3]&&/^[a-z]:$/i.test(i[3])?3:r?0:void 0;if("number"==typeof o&&"number"==typeof s){let[e,n]=[t[o],i[s]];e.toLowerCase()===n.toLowerCase()&&(i[s]=e,s>o?i=i.slice(s):o>s&&(t=t.slice(o)))}}let{optimizationLevel:o=1}=this.options;o>=2&&(t=this.levelTwoFileOptimize(t)),this.debug("matchOne",this,{file:t,pattern:i}),this.debug("matchOne",t.length,i.length);for(var s=0,a=0,c=t.length,l=i.length;s<c&&a<l;s++,a++){this.debug("matchOne loop");var u=i[a],h=t[s];if(this.debug(i,u,h),!1===u)return!1;if(u===e.GLOBSTAR){this.debug("GLOBSTAR",[i,u,h]);var d=s,p=a+1;if(p===l){for(this.debug("** at the end");s<c;s++)if("."===t[s]||".."===t[s]||!r.dot&&"."===t[s].charAt(0))return!1;return!0}for(;d<c;){var f=t[d];if(this.debug("\nglobstar while",t,d,i,p,f),this.matchOne(t.slice(d),i.slice(p),n))return this.debug("globstar found match!",d,c,f),!0;if("."===f||".."===f||!r.dot&&"."===f.charAt(0)){this.debug("dot detected!",t,d,i,p);break}this.debug("globstar swallow a segment, and continue"),d++}return!(!n||(this.debug("\n>>> no match, partial?",t,d,i,p),d!==c))}let o;if("string"==typeof u?(o=h===u,this.debug("string match",u,h,o)):(o=u.test(h),this.debug("pattern match",u,h,o)),!o)return!1}if(s===c&&a===l)return!0;if(s===c)return n;if(a===l)return s===c-1&&""===t[s];throw new Error("wtf?")}braceExpand(){return(0,e.braceExpand)(this.pattern,this.options)}parse(t){(0,i.assertValidPattern)(t);let r=this.options;if("**"===t)return e.GLOBSTAR;if(""===t)return"";let o,s=null;(o=t.match(w))?s=r.dot?T:D:(o=t.match(h))?s=(r.nocase?r.dot?g:f:r.dot?p:d)(o[1]):(o=t.match(S))?s=(r.nocase?r.dot?R:C:r.dot?E:P)(o):(o=t.match(m))?s=r.dot?v:y:(o=t.match(_))&&(s=b);let a=n.AST.fromGlob(t,this.options).toMMPattern();return s&&"object"==typeof a&&Reflect.defineProperty(a,"test",{value:s}),a}makeRe(){if(this.regexp||!1===this.regexp)return this.regexp;let t=this.set;if(!t.length)return this.regexp=!1,this.regexp;let i=this.options,n=i.noglobstar?"[^/]*?":i.dot?"(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?":"(?:(?!(?:\\/|^)\\.).)*?",r=new Set(i.nocase?["i"]:[]),o=t.map(t=>{let i=t.map(t=>{if(t instanceof RegExp)for(let e of t.flags.split(""))r.add(e);return"string"==typeof t?t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"):t===e.GLOBSTAR?e.GLOBSTAR:t._src});i.forEach((t,r)=>{let o=i[r+1],s=i[r-1];t!==e.GLOBSTAR||s===e.GLOBSTAR||(void 0===s?void 0!==o&&o!==e.GLOBSTAR?i[r+1]="(?:\\/|"+n+"\\/)?"+o:i[r]=n:void 0===o?i[r-1]=s+"(?:\\/|\\/"+n+")?":o!==e.GLOBSTAR&&(i[r-1]=s+"(?:\\/|\\/"+n+"\\/)"+o,i[r+1]=e.GLOBSTAR))});let o=i.filter(t=>t!==e.GLOBSTAR);if(this.partial&&o.length>=1){let e=[];for(let t=1;t<=o.length;t++)e.push(o.slice(0,t).join("/"));return"(?:"+e.join("|")+")"}return o.join("/")}).join("|"),[s,a]=t.length>1?["(?:",")"]:["",""];o="^"+s+o+a+"$",this.partial&&(o="^(?:\\/|"+s+o.slice(1,-1)+a+")$"),this.negate&&(o="^(?!"+o+").+$");try{this.regexp=new RegExp(o,[...r].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(e){return this.preserveMultipleSlashes?e.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(e)?["",...e.split(/\/+/)]:e.split(/\/+/)}match(e,t=this.partial){if(this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return""===e;if("/"===e&&t)return!0;let i=this.options;this.isWindows&&(e=e.split("\\").join("/"));let n=this.slashSplit(e);this.debug(this.pattern,"split",n);let r=this.set;this.debug(this.pattern,"set",r);let o=n[n.length-1];if(!o)for(let e=n.length-2;!o&&e>=0;e--)o=n[e];for(let e=0;e<r.length;e++){let s=r[e],a=n;if(i.matchBase&&1===s.length&&(a=[o]),this.matchOne(a,s,t))return!!i.flipNegate||!this.negate}return!i.flipNegate&&this.negate}static defaults(t){return e.minimatch.defaults(t).Minimatch}};e.Minimatch=M;var I=l();Object.defineProperty(e,"AST",{enumerable:!0,get:function(){return I.AST}});var q=u();Object.defineProperty(e,"escape",{enumerable:!0,get:function(){return q.escape}});var j=c();Object.defineProperty(e,"unescape",{enumerable:!0,get:function(){return j.unescape}}),e.minimatch.AST=n.AST,e.minimatch.Minimatch=M,e.minimatch.escape=r.escape,e.minimatch.unescape=a.unescape}),d=n(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.LRUCache=void 0;var t="object"==typeof performance&&performance&&"function"==typeof performance.now?performance:Date,i=new Set,n="object"==typeof process&&process?process:{},r=(e,t,i,r)=>{"function"==typeof n.emitWarning?n.emitWarning(e,t,i,r):console.error(`[${i}] ${t}: ${e}`)},o=globalThis.AbortController,s=globalThis.AbortSignal;if(typeof o>"u"){s=class{onabort;_onabort=[];reason;aborted=!1;addEventListener(e,t){this._onabort.push(t)}},o=class{constructor(){t()}signal=new s;abort(e){if(!this.signal.aborted){this.signal.reason=e,this.signal.aborted=!0;for(let t of this.signal._onabort)t(e);this.signal.onabort?.(e)}}};let e="1"!==n.env?.LRU_CACHE_IGNORE_AC_WARNING,t=()=>{e&&(e=!1,r("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",t))}}var a=e=>e&&e===Math.floor(e)&&e>0&&isFinite(e),c=e=>a(e)?e<=Math.pow(2,8)?Uint8Array:e<=Math.pow(2,16)?Uint16Array:e<=Math.pow(2,32)?Uint32Array:e<=Number.MAX_SAFE_INTEGER?l:null:null,l=class extends Array{constructor(e){super(e),this.fill(0)}},u=class e{heap;length;static#e=!1;static create(t){let i=c(t);if(!i)return[];e.#e=!0;let n=new e(t,i);return e.#e=!1,n}constructor(t,i){if(!e.#e)throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new i(t),this.length=0}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}},h=class e{#e;#t;#i;#n;#r;#o;#s;#a;get perf(){return this.#a}ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#c;#l;#u;#h;#d;#f;#p;#g;#m;#y;#v;#_;#b;#w;#D;#T;#S;#C;#R;static unsafeExposeInternals(e){return{starts:e.#b,ttls:e.#w,autopurgeTimers:e.#D,sizes:e.#_,keyMap:e.#u,keyList:e.#h,valList:e.#d,next:e.#f,prev:e.#p,get head(){return e.#g},get tail(){return e.#m},free:e.#y,isBackgroundFetch:t=>e.#E(t),backgroundFetch:(t,i,n,r)=>e.#P(t,i,n,r),moveToTail:t=>e.#x(t),indexes:t=>e.#O(t),rindexes:t=>e.#k(t),isStale:t=>e.#N(t)}}get max(){return this.#e}get maxSize(){return this.#t}get calculatedSize(){return this.#l}get size(){return this.#c}get fetchMethod(){return this.#o}get memoMethod(){return this.#s}get dispose(){return this.#i}get onInsert(){return this.#n}get disposeAfter(){return this.#r}constructor(n){let{max:o=0,ttl:s,ttlResolution:l=1,ttlAutopurge:h,updateAgeOnGet:d,updateAgeOnHas:p,allowStale:f,dispose:g,onInsert:m,disposeAfter:y,noDisposeOnSet:v,noUpdateTTL:_,maxSize:b=0,maxEntrySize:w=0,sizeCalculation:D,fetchMethod:T,memoMethod:S,noDeleteOnFetchRejection:C,noDeleteOnStaleGet:R,allowStaleOnFetchRejection:E,allowStaleOnFetchAbort:P,ignoreFetchAbort:x,perf:O}=n;if(void 0!==O&&"function"!=typeof O?.now)throw new TypeError("perf option must have a now() method if specified");if(this.#a=O??t,0!==o&&!a(o))throw new TypeError("max option must be a nonnegative integer");let k=o?c(o):Array;if(!k)throw new Error("invalid max value: "+o);if(this.#e=o,this.#t=b,this.maxEntrySize=w||this.#t,this.sizeCalculation=D,this.sizeCalculation){if(!this.#t&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if("function"!=typeof this.sizeCalculation)throw new TypeError("sizeCalculation set to non-function")}if(void 0!==S&&"function"!=typeof S)throw new TypeError("memoMethod must be a function if defined");if(this.#s=S,void 0!==T&&"function"!=typeof T)throw new TypeError("fetchMethod must be a function if specified");if(this.#o=T,this.#S=!!T,this.#u=new Map,this.#h=new Array(o).fill(void 0),this.#d=new Array(o).fill(void 0),this.#f=new k(o),this.#p=new k(o),this.#g=0,this.#m=0,this.#y=u.create(o),this.#c=0,this.#l=0,"function"==typeof g&&(this.#i=g),"function"==typeof m&&(this.#n=m),"function"==typeof y?(this.#r=y,this.#v=[]):(this.#r=void 0,this.#v=void 0),this.#T=!!this.#i,this.#R=!!this.#n,this.#C=!!this.#r,this.noDisposeOnSet=!!v,this.noUpdateTTL=!!_,this.noDeleteOnFetchRejection=!!C,this.allowStaleOnFetchRejection=!!E,this.allowStaleOnFetchAbort=!!P,this.ignoreFetchAbort=!!x,0!==this.maxEntrySize){if(0!==this.#t&&!a(this.#t))throw new TypeError("maxSize must be a positive integer if specified");if(!a(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#A()}if(this.allowStale=!!f,this.noDeleteOnStaleGet=!!R,this.updateAgeOnGet=!!d,this.updateAgeOnHas=!!p,this.ttlResolution=a(l)||0===l?l:1,this.ttlAutopurge=!!h,this.ttl=s||0,this.ttl){if(!a(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#M()}if(0===this.#e&&0===this.ttl&&0===this.#t)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#e&&!this.#t){let t="LRU_CACHE_UNBOUNDED";N=t,!i.has(N)&&(i.add(t),r("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",t,e))}var N}getRemainingTTL(e){return this.#u.has(e)?1/0:0}#M(){let e=new l(this.#e),t=new l(this.#e);this.#w=e,this.#b=t;let i=this.ttlAutopurge?new Array(this.#e):void 0;this.#D=i,this.#I=(n,r,o=this.#a.now())=>{if(t[n]=0!==r?o:0,e[n]=r,i?.[n]&&(clearTimeout(i[n]),i[n]=void 0),0!==r&&i){let e=setTimeout(()=>{this.#N(n)&&this.#q(this.#h[n],"expire")},r+1);e.unref&&e.unref(),i[n]=e}},this.#j=i=>{t[i]=0!==e[i]?this.#a.now():0},this.#F=(i,o)=>{if(e[o]){let s=e[o],a=t[o];if(!s||!a)return;i.ttl=s,i.start=a,i.now=n||r();let c=i.now-a;i.remainingTTL=s-c}};let n=0,r=()=>{let e=this.#a.now();if(this.ttlResolution>0){n=e;let t=setTimeout(()=>n=0,this.ttlResolution);t.unref&&t.unref()}return e};this.getRemainingTTL=i=>{let o=this.#u.get(i);if(void 0===o)return 0;let s=e[o],a=t[o];return s&&a?s-((n||r())-a):1/0},this.#N=i=>{let o=t[i],s=e[i];return!!s&&!!o&&(n||r())-o>s}}#j=()=>{};#F=()=>{};#I=()=>{};#N=()=>!1;#A(){let e=new l(this.#e);this.#l=0,this.#_=e,this.#L=t=>{this.#l-=e[t],e[t]=0},this.#W=(e,t,i,n)=>{if(this.#E(t))return 0;if(!a(i)){if(!n)throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");if("function"!=typeof n)throw new TypeError("sizeCalculation must be a function");if(i=n(t,e),!a(i))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}return i},this.#U=(t,i,n)=>{if(e[t]=i,this.#t){let i=this.#t-e[t];for(;this.#l>i;)this.#B(!0)}this.#l+=e[t],n&&(n.entrySize=i,n.totalCalculatedSize=this.#l)}}#L=e=>{};#U=(e,t,i)=>{};#W=(e,t,i,n)=>{if(i||n)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#O({allowStale:e=this.allowStale}={}){if(this.#c)for(let t=this.#m;this.#$(t)&&((e||!this.#N(t))&&(yield t),t!==this.#g);)t=this.#p[t]}*#k({allowStale:e=this.allowStale}={}){if(this.#c)for(let t=this.#g;this.#$(t)&&((e||!this.#N(t))&&(yield t),t!==this.#m);)t=this.#f[t]}#$(e){return void 0!==e&&this.#u.get(this.#h[e])===e}*entries(){for(let e of this.#O())void 0!==this.#d[e]&&void 0!==this.#h[e]&&!this.#E(this.#d[e])&&(yield[this.#h[e],this.#d[e]])}*rentries(){for(let e of this.#k())void 0!==this.#d[e]&&void 0!==this.#h[e]&&!this.#E(this.#d[e])&&(yield[this.#h[e],this.#d[e]])}*keys(){for(let e of this.#O()){let t=this.#h[e];void 0!==t&&!this.#E(this.#d[e])&&(yield t)}}*rkeys(){for(let e of this.#k()){let t=this.#h[e];void 0!==t&&!this.#E(this.#d[e])&&(yield t)}}*values(){for(let e of this.#O())void 0!==this.#d[e]&&!this.#E(this.#d[e])&&(yield this.#d[e])}*rvalues(){for(let e of this.#k())void 0!==this.#d[e]&&!this.#E(this.#d[e])&&(yield this.#d[e])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(e,t={}){for(let i of this.#O()){let n=this.#d[i],r=this.#E(n)?n.__staleWhileFetching:n;if(void 0!==r&&e(r,this.#h[i],this))return this.get(this.#h[i],t)}}forEach(e,t=this){for(let i of this.#O()){let n=this.#d[i],r=this.#E(n)?n.__staleWhileFetching:n;void 0!==r&&e.call(t,r,this.#h[i],this)}}rforEach(e,t=this){for(let i of this.#k()){let n=this.#d[i],r=this.#E(n)?n.__staleWhileFetching:n;void 0!==r&&e.call(t,r,this.#h[i],this)}}purgeStale(){let e=!1;for(let t of this.#k({allowStale:!0}))this.#N(t)&&(this.#q(this.#h[t],"expire"),e=!0);return e}info(e){let t=this.#u.get(e);if(void 0===t)return;let i=this.#d[t],n=this.#E(i)?i.__staleWhileFetching:i;if(void 0===n)return;let r={value:n};if(this.#w&&this.#b){let e=this.#w[t],i=this.#b[t];if(e&&i){let t=e-(this.#a.now()-i);r.ttl=t,r.start=Date.now()}}return this.#_&&(r.size=this.#_[t]),r}dump(){let e=[];for(let t of this.#O({allowStale:!0})){let i=this.#h[t],n=this.#d[t],r=this.#E(n)?n.__staleWhileFetching:n;if(void 0===r||void 0===i)continue;let o={value:r};if(this.#w&&this.#b){o.ttl=this.#w[t];let e=this.#a.now()-this.#b[t];o.start=Math.floor(Date.now()-e)}this.#_&&(o.size=this.#_[t]),e.unshift([i,o])}return e}load(e){this.clear();for(let[t,i]of e){if(i.start){let e=Date.now()-i.start;i.start=this.#a.now()-e}this.set(t,i.value,i)}}set(e,t,i={}){if(void 0===t)return this.delete(e),this;let{ttl:n=this.ttl,start:r,noDisposeOnSet:o=this.noDisposeOnSet,sizeCalculation:s=this.sizeCalculation,status:a}=i,{noUpdateTTL:c=this.noUpdateTTL}=i,l=this.#W(e,t,i.size||0,s);if(this.maxEntrySize&&l>this.maxEntrySize)return a&&(a.set="miss",a.maxEntrySizeExceeded=!0),this.#q(e,"set"),this;let u=0===this.#c?void 0:this.#u.get(e);if(void 0===u)u=0===this.#c?this.#m:0!==this.#y.length?this.#y.pop():this.#c===this.#e?this.#B(!1):this.#c,this.#h[u]=e,this.#d[u]=t,this.#u.set(e,u),this.#f[this.#m]=u,this.#p[u]=this.#m,this.#m=u,this.#c++,this.#U(u,l,a),a&&(a.set="add"),c=!1,this.#R&&this.#n?.(t,e,"add");else{this.#x(u);let i=this.#d[u];if(t!==i){if(this.#S&&this.#E(i)){i.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:t}=i;void 0!==t&&!o&&(this.#T&&this.#i?.(t,e,"set"),this.#C&&this.#v?.push([t,e,"set"]))}else o||(this.#T&&this.#i?.(i,e,"set"),this.#C&&this.#v?.push([i,e,"set"]));if(this.#L(u),this.#U(u,l,a),this.#d[u]=t,a){a.set="replace";let e=i&&this.#E(i)?i.__staleWhileFetching:i;void 0!==e&&(a.oldValue=e)}}else a&&(a.set="update");this.#R&&this.onInsert?.(t,e,t===i?"update":"replace")}if(0!==n&&!this.#w&&this.#M(),this.#w&&(c||this.#I(u,n,r),a&&this.#F(a,u)),!o&&this.#C&&this.#v){let e,t=this.#v;for(;e=t?.shift();)this.#r?.(...e)}return this}pop(){try{for(;this.#c;){let e=this.#d[this.#g];if(this.#B(!0),this.#E(e)){if(e.__staleWhileFetching)return e.__staleWhileFetching}else if(void 0!==e)return e}}finally{if(this.#C&&this.#v){let e,t=this.#v;for(;e=t?.shift();)this.#r?.(...e)}}}#B(e){let t=this.#g,i=this.#h[t],n=this.#d[t];return this.#S&&this.#E(n)?n.__abortController.abort(new Error("evicted")):(this.#T||this.#C)&&(this.#T&&this.#i?.(n,i,"evict"),this.#C&&this.#v?.push([n,i,"evict"])),this.#L(t),this.#D?.[t]&&(clearTimeout(this.#D[t]),this.#D[t]=void 0),e&&(this.#h[t]=void 0,this.#d[t]=void 0,this.#y.push(t)),1===this.#c?(this.#g=this.#m=0,this.#y.length=0):this.#g=this.#f[t],this.#u.delete(i),this.#c--,t}has(e,t={}){let{updateAgeOnHas:i=this.updateAgeOnHas,status:n}=t,r=this.#u.get(e);if(void 0!==r){let e=this.#d[r];if(this.#E(e)&&void 0===e.__staleWhileFetching)return!1;if(!this.#N(r))return i&&this.#j(r),n&&(n.has="hit",this.#F(n,r)),!0;n&&(n.has="stale",this.#F(n,r))}else n&&(n.has="miss");return!1}peek(e,t={}){let{allowStale:i=this.allowStale}=t,n=this.#u.get(e);if(void 0===n||!i&&this.#N(n))return;let r=this.#d[n];return this.#E(r)?r.__staleWhileFetching:r}#P(e,t,i,n){let r=void 0===t?void 0:this.#d[t];if(this.#E(r))return r;let s=new o,{signal:a}=i;a?.addEventListener("abort",()=>s.abort(a.reason),{signal:s.signal});let c={signal:s.signal,options:i,context:n},l=(n,r=!1)=>{let{aborted:o}=s.signal,a=i.ignoreFetchAbort&&void 0!==n,l=i.ignoreFetchAbort||!(!i.allowStaleOnFetchAbort||void 0===n);if(i.status&&(o&&!r?(i.status.fetchAborted=!0,i.status.fetchError=s.signal.reason,a&&(i.status.fetchAbortIgnored=!0)):i.status.fetchResolved=!0),o&&!a&&!r)return u(s.signal.reason,l);let d=h,p=this.#d[t];return(p===h||a&&r&&void 0===p)&&(void 0===n?void 0!==d.__staleWhileFetching?this.#d[t]=d.__staleWhileFetching:this.#q(e,"fetch"):(i.status&&(i.status.fetchUpdated=!0),this.set(e,n,c.options))),n},u=(n,r)=>{let{aborted:o}=s.signal,a=o&&i.allowStaleOnFetchAbort,c=a||i.allowStaleOnFetchRejection,l=c||i.noDeleteOnFetchRejection,u=h;if(this.#d[t]===h&&(!l||!r&&void 0===u.__staleWhileFetching?this.#q(e,"fetch"):a||(this.#d[t]=u.__staleWhileFetching)),c)return i.status&&void 0!==u.__staleWhileFetching&&(i.status.returnedStale=!0),u.__staleWhileFetching;if(u.__returned===u)throw n};i.status&&(i.status.fetchDispatched=!0);let h=new Promise((t,n)=>{let o=this.#o?.(e,r,c);o&&o instanceof Promise&&o.then(e=>t(void 0===e?void 0:e),n),s.signal.addEventListener("abort",()=>{(!i.ignoreFetchAbort||i.allowStaleOnFetchAbort)&&(t(void 0),i.allowStaleOnFetchAbort&&(t=e=>l(e,!0)))})}).then(l,e=>(i.status&&(i.status.fetchRejected=!0,i.status.fetchError=e),u(e,!1))),d=Object.assign(h,{__abortController:s,__staleWhileFetching:r,__returned:void 0});return void 0===t?(this.set(e,d,{...c.options,status:void 0}),t=this.#u.get(e)):this.#d[t]=d,d}#E(e){if(!this.#S)return!1;let t=e;return!!t&&t instanceof Promise&&t.hasOwnProperty("__staleWhileFetching")&&t.__abortController instanceof o}async fetch(e,t={}){let{allowStale:i=this.allowStale,updateAgeOnGet:n=this.updateAgeOnGet,noDeleteOnStaleGet:r=this.noDeleteOnStaleGet,ttl:o=this.ttl,noDisposeOnSet:s=this.noDisposeOnSet,size:a=0,sizeCalculation:c=this.sizeCalculation,noUpdateTTL:l=this.noUpdateTTL,noDeleteOnFetchRejection:u=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:h=this.allowStaleOnFetchRejection,ignoreFetchAbort:d=this.ignoreFetchAbort,allowStaleOnFetchAbort:p=this.allowStaleOnFetchAbort,context:f,forceRefresh:g=!1,status:m,signal:y}=t;if(!this.#S)return m&&(m.fetch="get"),this.get(e,{allowStale:i,updateAgeOnGet:n,noDeleteOnStaleGet:r,status:m});let v={allowStale:i,updateAgeOnGet:n,noDeleteOnStaleGet:r,ttl:o,noDisposeOnSet:s,size:a,sizeCalculation:c,noUpdateTTL:l,noDeleteOnFetchRejection:u,allowStaleOnFetchRejection:h,allowStaleOnFetchAbort:p,ignoreFetchAbort:d,status:m,signal:y},_=this.#u.get(e);if(void 0===_){m&&(m.fetch="miss");let t=this.#P(e,_,v,f);return t.__returned=t}{let t=this.#d[_];if(this.#E(t)){let e=i&&void 0!==t.__staleWhileFetching;return m&&(m.fetch="inflight",e&&(m.returnedStale=!0)),e?t.__staleWhileFetching:t.__returned=t}let r=this.#N(_);if(!g&&!r)return m&&(m.fetch="hit"),this.#x(_),n&&this.#j(_),m&&this.#F(m,_),t;let o=this.#P(e,_,v,f),s=void 0!==o.__staleWhileFetching&&i;return m&&(m.fetch=r?"stale":"refresh",s&&r&&(m.returnedStale=!0)),s?o.__staleWhileFetching:o.__returned=o}}async forceFetch(e,t={}){let i=await this.fetch(e,t);if(void 0===i)throw new Error("fetch() returned undefined");return i}memo(e,t={}){let i=this.#s;if(!i)throw new Error("no memoMethod provided to constructor");let{context:n,forceRefresh:r,...o}=t,s=this.get(e,o);if(!r&&void 0!==s)return s;let a=i(e,s,{options:o,context:n});return this.set(e,a,o),a}get(e,t={}){let{allowStale:i=this.allowStale,updateAgeOnGet:n=this.updateAgeOnGet,noDeleteOnStaleGet:r=this.noDeleteOnStaleGet,status:o}=t,s=this.#u.get(e);if(void 0!==s){let t=this.#d[s],a=this.#E(t);return o&&this.#F(o,s),this.#N(s)?(o&&(o.get="stale"),a?(o&&i&&void 0!==t.__staleWhileFetching&&(o.returnedStale=!0),i?t.__staleWhileFetching:void 0):(r||this.#q(e,"expire"),o&&i&&(o.returnedStale=!0),i?t:void 0)):(o&&(o.get="hit"),a?t.__staleWhileFetching:(this.#x(s),n&&this.#j(s),t))}o&&(o.get="miss")}#z(e,t){this.#p[t]=e,this.#f[e]=t}#x(e){e!==this.#m&&(e===this.#g?this.#g=this.#f[e]:this.#z(this.#p[e],this.#f[e]),this.#z(this.#m,e),this.#m=e)}delete(e){return this.#q(e,"delete")}#q(e,t){let i=!1;if(0!==this.#c){let n=this.#u.get(e);if(void 0!==n)if(this.#D?.[n]&&(clearTimeout(this.#D?.[n]),this.#D[n]=void 0),i=!0,1===this.#c)this.#H(t);else{this.#L(n);let i=this.#d[n];if(this.#E(i)?i.__abortController.abort(new Error("deleted")):(this.#T||this.#C)&&(this.#T&&this.#i?.(i,e,t),this.#C&&this.#v?.push([i,e,t])),this.#u.delete(e),this.#h[n]=void 0,this.#d[n]=void 0,n===this.#m)this.#m=this.#p[n];else if(n===this.#g)this.#g=this.#f[n];else{let e=this.#p[n];this.#f[e]=this.#f[n];let t=this.#f[n];this.#p[t]=this.#p[n]}this.#c--,this.#y.push(n)}}if(this.#C&&this.#v?.length){let e,t=this.#v;for(;e=t?.shift();)this.#r?.(...e)}return i}clear(){return this.#H("delete")}#H(e){for(let t of this.#k({allowStale:!0})){let i=this.#d[t];if(this.#E(i))i.__abortController.abort(new Error("deleted"));else{let n=this.#h[t];this.#T&&this.#i?.(i,n,e),this.#C&&this.#v?.push([i,n,e])}}if(this.#u.clear(),this.#d.fill(void 0),this.#h.fill(void 0),this.#w&&this.#b){this.#w.fill(0),this.#b.fill(0);for(let e of this.#D??[])void 0!==e&&clearTimeout(e);this.#D?.fill(void 0)}if(this.#_&&this.#_.fill(0),this.#g=0,this.#m=0,this.#y.length=0,this.#l=0,this.#c=0,this.#C&&this.#v){let e,t=this.#v;for(;e=t?.shift();)this.#r?.(...e)}}};e.LRUCache=h}),p=n(e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.Minipass=e.isWritable=e.isReadable=e.isStream=void 0;var n="object"==typeof process&&process?process:{stdout:null,stderr:null},r=i(8474),o=t(i(7075)),s=i(6193);e.isStream=t=>!!t&&"object"==typeof t&&(t instanceof B||t instanceof o.default||(0,e.isReadable)(t)||(0,e.isWritable)(t)),e.isReadable=e=>!!e&&"object"==typeof e&&e instanceof r.EventEmitter&&"function"==typeof e.pipe&&e.pipe!==o.default.Writable.prototype.pipe,e.isWritable=e=>!!e&&"object"==typeof e&&e instanceof r.EventEmitter&&"function"==typeof e.write&&"function"==typeof e.end;var a=Symbol("EOF"),c=Symbol("maybeEmitEnd"),l=Symbol("emittedEnd"),u=Symbol("emittingEnd"),h=Symbol("emittedError"),d=Symbol("closed"),p=Symbol("read"),f=Symbol("flush"),g=Symbol("flushChunk"),m=Symbol("encoding"),y=Symbol("decoder"),v=Symbol("flowing"),_=Symbol("paused"),b=Symbol("resume"),w=Symbol("buffer"),D=Symbol("pipes"),T=Symbol("bufferLength"),S=Symbol("bufferPush"),C=Symbol("bufferShift"),R=Symbol("objectMode"),E=Symbol("destroyed"),P=Symbol("error"),x=Symbol("emitData"),O=Symbol("emitEnd"),k=Symbol("emitEnd2"),N=Symbol("async"),A=Symbol("abort"),M=Symbol("aborted"),I=Symbol("signal"),q=Symbol("dataListeners"),j=Symbol("discarded"),F=e=>Promise.resolve().then(e),L=e=>e(),W=class{src;dest;opts;ondrain;constructor(e,t,i){this.src=e,this.dest=t,this.opts=i,this.ondrain=()=>e[b](),this.dest.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(e){}end(){this.unpipe(),this.opts.end&&this.dest.end()}},U=class extends W{unpipe(){this.src.removeListener("error",this.proxyErrors),super.unpipe()}constructor(e,t,i){super(e,t,i),this.proxyErrors=e=>this.dest.emit("error",e),e.on("error",this.proxyErrors)}},B=class extends r.EventEmitter{[v]=!1;[_]=!1;[D]=[];[w]=[];[R];[m];[N];[y];[a]=!1;[l]=!1;[u]=!1;[d]=!1;[h]=null;[T]=0;[E]=!1;[I];[M]=!1;[q]=0;[j]=!1;writable=!0;readable=!0;constructor(...e){let t=e[0]||{};if(super(),t.objectMode&&"string"==typeof t.encoding)throw new TypeError("Encoding and objectMode may not be used together");var i;t.objectMode?(this[R]=!0,this[m]=null):!(i=t).objectMode&&i.encoding&&"buffer"!==i.encoding?(this[m]=t.encoding,this[R]=!1):(this[R]=!1,this[m]=null),this[N]=!!t.async,this[y]=this[m]?new s.StringDecoder(this[m]):null,t&&!0===t.debugExposeBuffer&&Object.defineProperty(this,"buffer",{get:()=>this[w]}),t&&!0===t.debugExposePipes&&Object.defineProperty(this,"pipes",{get:()=>this[D]});let{signal:n}=t;n&&(this[I]=n,n.aborted?this[A]():n.addEventListener("abort",()=>this[A]()))}get bufferLength(){return this[T]}get encoding(){return this[m]}set encoding(e){throw new Error("Encoding must be set at instantiation time")}setEncoding(e){throw new Error("Encoding must be set at instantiation time")}get objectMode(){return this[R]}set objectMode(e){throw new Error("objectMode must be set at instantiation time")}get async(){return this[N]}set async(e){this[N]=this[N]||!!e}[A](){this[M]=!0,this.emit("abort",this[I]?.reason),this.destroy(this[I]?.reason)}get aborted(){return this[M]}set aborted(e){}write(e,t,i){if(this[M])return!1;if(this[a])throw new Error("write after end");if(this[E])return this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"})),!0;"function"==typeof t&&(i=t,t="utf8"),t||(t="utf8");let n=this[N]?F:L;if(!this[R]&&!Buffer.isBuffer(e))if(r=e,!Buffer.isBuffer(r)&&ArrayBuffer.isView(r))e=Buffer.from(e.buffer,e.byteOffset,e.byteLength);else if((e=>e instanceof ArrayBuffer||!!e&&"object"==typeof e&&e.constructor&&"ArrayBuffer"===e.constructor.name&&e.byteLength>=0)(e))e=Buffer.from(e);else if("string"!=typeof e)throw new Error("Non-contiguous data written to non-objectMode stream");var r;return this[R]?(this[v]&&0!==this[T]&&this[f](!0),this[v]?this.emit("data",e):this[S](e),0!==this[T]&&this.emit("readable"),i&&n(i),this[v]):e.length?("string"==typeof e&&!(t===this[m]&&!this[y]?.lastNeed)&&(e=Buffer.from(e,t)),Buffer.isBuffer(e)&&this[m]&&(e=this[y].write(e)),this[v]&&0!==this[T]&&this[f](!0),this[v]?this.emit("data",e):this[S](e),0!==this[T]&&this.emit("readable"),i&&n(i),this[v]):(0!==this[T]&&this.emit("readable"),i&&n(i),this[v])}read(e){if(this[E])return null;if(this[j]=!1,0===this[T]||0===e||e&&e>this[T])return this[c](),null;this[R]&&(e=null),this[w].length>1&&!this[R]&&(this[w]=[this[m]?this[w].join(""):Buffer.concat(this[w],this[T])]);let t=this[p](e||null,this[w][0]);return this[c](),t}[p](e,t){if(this[R])this[C]();else{let i=t;e===i.length||null===e?this[C]():"string"==typeof i?(this[w][0]=i.slice(e),t=i.slice(0,e),this[T]-=e):(this[w][0]=i.subarray(e),t=i.subarray(0,e),this[T]-=e)}return this.emit("data",t),!this[w].length&&!this[a]&&this.emit("drain"),t}end(e,t,i){return"function"==typeof e&&(i=e,e=void 0),"function"==typeof t&&(i=t,t="utf8"),void 0!==e&&this.write(e,t),i&&this.once("end",i),this[a]=!0,this.writable=!1,(this[v]||!this[_])&&this[c](),this}[b](){this[E]||(!this[q]&&!this[D].length&&(this[j]=!0),this[_]=!1,this[v]=!0,this.emit("resume"),this[w].length?this[f]():this[a]?this[c]():this.emit("drain"))}resume(){return this[b]()}pause(){this[v]=!1,this[_]=!0,this[j]=!1}get destroyed(){return this[E]}get flowing(){return this[v]}get paused(){return this[_]}[S](e){this[R]?this[T]+=1:this[T]+=e.length,this[w].push(e)}[C](){return this[R]?this[T]-=1:this[T]-=this[w][0].length,this[w].shift()}[f](e=!1){do{}while(this[g](this[C]())&&this[w].length);!e&&!this[w].length&&!this[a]&&this.emit("drain")}[g](e){return this.emit("data",e),this[v]}pipe(e,t){if(this[E])return e;this[j]=!1;let i=this[l];return t=t||{},e===n.stdout||e===n.stderr?t.end=!1:t.end=!1!==t.end,t.proxyErrors=!!t.proxyErrors,i?t.end&&e.end():(this[D].push(t.proxyErrors?new U(this,e,t):new W(this,e,t)),this[N]?F(()=>this[b]()):this[b]()),e}unpipe(e){let t=this[D].find(t=>t.dest===e);t&&(1===this[D].length?(this[v]&&0===this[q]&&(this[v]=!1),this[D]=[]):this[D].splice(this[D].indexOf(t),1),t.unpipe())}addListener(e,t){return this.on(e,t)}on(e,t){let i=super.on(e,t);if("data"===e)this[j]=!1,this[q]++,!this[D].length&&!this[v]&&this[b]();else if("readable"===e&&0!==this[T])super.emit("readable");else if("end"!==(n=e)&&"finish"!==n&&"prefinish"!==n||!this[l]){if("error"===e&&this[h]){let e=t;this[N]?F(()=>e.call(this,this[h])):e.call(this,this[h])}}else super.emit(e),this.removeAllListeners(e);var n;return i}removeListener(e,t){return this.off(e,t)}off(e,t){let i=super.off(e,t);return"data"===e&&(this[q]=this.listeners("data").length,0===this[q]&&!this[j]&&!this[D].length&&(this[v]=!1)),i}removeAllListeners(e){let t=super.removeAllListeners(e);return("data"===e||void 0===e)&&(this[q]=0,!this[j]&&!this[D].length&&(this[v]=!1)),t}get emittedEnd(){return this[l]}[c](){!this[u]&&!this[l]&&!this[E]&&0===this[w].length&&this[a]&&(this[u]=!0,this.emit("end"),this.emit("prefinish"),this.emit("finish"),this[d]&&this.emit("close"),this[u]=!1)}emit(e,...t){let i=t[0];if("error"!==e&&"close"!==e&&e!==E&&this[E])return!1;if("data"===e)return!(!this[R]&&!i)&&(this[N]?(F(()=>this[x](i)),!0):this[x](i));if("end"===e)return this[O]();if("close"===e){if(this[d]=!0,!this[l]&&!this[E])return!1;let e=super.emit("close");return this.removeAllListeners("close"),e}if("error"===e){this[h]=i,super.emit(P,i);let e=!(this[I]&&!this.listeners("error").length)&&super.emit("error",i);return this[c](),e}if("resume"===e){let e=super.emit("resume");return this[c](),e}if("finish"===e||"prefinish"===e){let t=super.emit(e);return this.removeAllListeners(e),t}let n=super.emit(e,...t);return this[c](),n}[x](e){for(let t of this[D])!1===t.dest.write(e)&&this.pause();let t=!this[j]&&super.emit("data",e);return this[c](),t}[O](){return!this[l]&&(this[l]=!0,this.readable=!1,this[N]?(F(()=>this[k]()),!0):this[k]())}[k](){if(this[y]){let e=this[y].end();if(e){for(let t of this[D])t.dest.write(e);this[j]||super.emit("data",e)}}for(let e of this[D])e.end();let e=super.emit("end");return this.removeAllListeners("end"),e}async collect(){let e=Object.assign([],{dataLength:0});this[R]||(e.dataLength=0);let t=this.promise();return this.on("data",t=>{e.push(t),this[R]||(e.dataLength+=t.length)}),await t,e}async concat(){if(this[R])throw new Error("cannot concat in objectMode");let e=await this.collect();return this[m]?e.join(""):Buffer.concat(e,e.dataLength)}async promise(){return new Promise((e,t)=>{this.on(E,()=>t(new Error("stream destroyed"))),this.on("error",e=>t(e)),this.on("end",()=>e())})}[Symbol.asyncIterator](){this[j]=!1;let e=!1,t=async()=>(this.pause(),e=!0,{value:void 0,done:!0});return{next:()=>{if(e)return t();let i=this.read();if(null!==i)return Promise.resolve({done:!1,value:i});if(this[a])return t();let n,r,o=e=>{this.off("data",s),this.off("end",c),this.off(E,l),t(),r(e)},s=e=>{this.off("error",o),this.off("end",c),this.off(E,l),this.pause(),n({value:e,done:!!this[a]})},c=()=>{this.off("error",o),this.off("data",s),this.off(E,l),t(),n({done:!0,value:void 0})},l=()=>o(new Error("stream destroyed"));return new Promise((e,t)=>{r=t,n=e,this.once(E,l),this.once("error",o),this.once("end",c),this.once("data",s)})},throw:t,return:t,[Symbol.asyncIterator](){return this},[Symbol.asyncDispose]:async()=>{}}}[Symbol.iterator](){this[j]=!1;let e=!1,t=()=>(this.pause(),this.off(P,t),this.off(E,t),this.off("end",t),e=!0,{done:!0,value:void 0});return this.once("end",t),this.once(P,t),this.once(E,t),{next:()=>{if(e)return t();let i=this.read();return null===i?t():{done:!1,value:i}},throw:t,return:t,[Symbol.iterator](){return this},[Symbol.dispose]:()=>{}}}destroy(e){return this[E]?(e?this.emit("error",e):this.emit(E),this):(this[E]=!0,this[j]=!0,this[w].length=0,this[T]=0,"function"==typeof this.close&&!this[d]&&this.close(),e?this.emit("error",e):this.emit(E),this)}static get isStream(){return e.isStream}};e.Minipass=B}),f=n(e=>{var t=e&&e.__createBinding||(Object.create?function(e,t,i,n){void 0===n&&(n=i);var r=Object.getOwnPropertyDescriptor(t,i);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[i]}}),Object.defineProperty(e,n,r)}:function(e,t,i,n){void 0===n&&(n=i),e[n]=t[i]}),n=e&&e.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=e&&e.__importStar||function(e){if(e&&e.__esModule)return e;var i={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&t(i,e,r);return n(i,e),i};Object.defineProperty(e,"__esModule",{value:!0}),e.PathScurry=e.Path=e.PathScurryDarwin=e.PathScurryPosix=e.PathScurryWin32=e.PathScurryBase=e.PathPosix=e.PathWin32=e.PathBase=e.ChildrenCache=e.ResolveCache=void 0;var o=d(),s=i(6760),a=i(3136),c=i(9896),l=r(i(3024)),u=c.realpathSync.native,h=i(1455),f=p(),g={lstatSync:c.lstatSync,readdir:c.readdir,readdirSync:c.readdirSync,readlinkSync:c.readlinkSync,realpathSync:u,promises:{lstat:h.lstat,readdir:h.readdir,readlink:h.readlink,realpath:h.realpath}},m=e=>e&&e!==g&&e!==l?{...g,...e,promises:{...g.promises,...e.promises||{}}}:g,y=/^\\\\\?\\([a-z]:)\\?$/i,v=/[\\\/]/,_=10,b=15,w=~b,D=128,T=e=>e.isFile()?8:e.isDirectory()?4:e.isSymbolicLink()?_:e.isCharacterDevice()?2:e.isBlockDevice()?6:e.isSocket()?12:e.isFIFO()?1:0,S=new o.LRUCache({max:4096}),C=e=>{let t=S.get(e);if(t)return t;let i=e.normalize("NFKD");return S.set(e,i),i},R=new o.LRUCache({max:4096}),E=e=>{let t=R.get(e);if(t)return t;let i=C(e.toLowerCase());return R.set(e,i),i},P=class extends o.LRUCache{constructor(){super({max:256})}};e.ResolveCache=P;var x=class extends o.LRUCache{constructor(e=16384){super({maxSize:e,sizeCalculation:e=>e.length+1})}};e.ChildrenCache=x;var O=Symbol("PathScurry setAsCwd"),k=class{name;root;roots;parent;nocase;isCWD=!1;#e;#t;get dev(){return this.#t}#i;get mode(){return this.#i}#n;get nlink(){return this.#n}#r;get uid(){return this.#r}#o;get gid(){return this.#o}#s;get rdev(){return this.#s}#a;get blksize(){return this.#a}#c;get ino(){return this.#c}#l;get size(){return this.#l}#u;get blocks(){return this.#u}#h;get atimeMs(){return this.#h}#d;get mtimeMs(){return this.#d}#f;get ctimeMs(){return this.#f}#p;get birthtimeMs(){return this.#p}#g;get atime(){return this.#g}#m;get mtime(){return this.#m}#y;get ctime(){return this.#y}#v;get birthtime(){return this.#v}#_;#b;#w;#D;#T;#S;#C;#R;#M;#j;get parentPath(){return(this.parent||this).fullpath()}get path(){return this.parentPath}constructor(e,t=0,i,n,r,o,s){this.name=e,this.#_=r?E(e):C(e),this.#C=1023&t,this.nocase=r,this.roots=n,this.root=i||this,this.#R=o,this.#w=s.fullpath,this.#T=s.relative,this.#S=s.relativePosix,this.parent=s.parent,this.parent?this.#e=this.parent.#e:this.#e=m(s.fs)}depth(){return void 0!==this.#b?this.#b:this.parent?this.#b=this.parent.depth()+1:this.#b=0}childrenCache(){return this.#R}resolve(e){if(!e)return this;let t=this.getRootString(e),i=e.substring(t.length).split(this.splitSep);return t?this.getRoot(t).#F(i):this.#F(i)}#F(e){let t=this;for(let i of e)t=t.child(i);return t}children(){let e=this.#R.get(this);if(e)return e;let t=Object.assign([],{provisional:0});return this.#R.set(this,t),this.#C&=-17,t}child(e,t){if(""===e||"."===e)return this;if(".."===e)return this.parent||this;let i=this.children(),n=this.nocase?E(e):C(e);for(let e of i)if(e.#_===n)return e;let r=this.parent?this.sep:"",o=this.#w?this.#w+r+e:void 0,s=this.newChild(e,0,{...t,parent:this,fullpath:o});return this.canReaddir()||(s.#C|=D),i.push(s),s}relative(){if(this.isCWD)return"";if(void 0!==this.#T)return this.#T;let e=this.name,t=this.parent;if(!t)return this.#T=this.name;let i=t.relative();return i+(i&&t.parent?this.sep:"")+e}relativePosix(){if("/"===this.sep)return this.relative();if(this.isCWD)return"";if(void 0!==this.#S)return this.#S;let e=this.name,t=this.parent;if(!t)return this.#S=this.fullpathPosix();let i=t.relativePosix();return i+(i&&t.parent?"/":"")+e}fullpath(){if(void 0!==this.#w)return this.#w;let e=this.name,t=this.parent;if(!t)return this.#w=this.name;let i=t.fullpath()+(t.parent?this.sep:"")+e;return this.#w=i}fullpathPosix(){if(void 0!==this.#D)return this.#D;if("/"===this.sep)return this.#D=this.fullpath();if(!this.parent){let e=this.fullpath().replace(/\\/g,"/");return/^[a-z]:\//i.test(e)?this.#D=`//?/${e}`:this.#D=e}let e=this.parent,t=e.fullpathPosix(),i=t+(t&&e.parent?"/":"")+this.name;return this.#D=i}isUnknown(){return 0===(this.#C&b)}isType(e){return this[`is${e}`]()}getType(){return this.isUnknown()?"Unknown":this.isDirectory()?"Directory":this.isFile()?"File":this.isSymbolicLink()?"SymbolicLink":this.isFIFO()?"FIFO":this.isCharacterDevice()?"CharacterDevice":this.isBlockDevice()?"BlockDevice":this.isSocket()?"Socket":"Unknown"}isFile(){return 8===(this.#C&b)}isDirectory(){return 4===(this.#C&b)}isCharacterDevice(){return 2===(this.#C&b)}isBlockDevice(){return 6===(this.#C&b)}isFIFO(){return 1===(this.#C&b)}isSocket(){return 12===(this.#C&b)}isSymbolicLink(){return(this.#C&_)===_}lstatCached(){return 32&this.#C?this:void 0}readlinkCached(){return this.#M}realpathCached(){return this.#j}readdirCached(){let e=this.children();return e.slice(0,e.provisional)}canReadlink(){if(this.#M)return!0;if(!this.parent)return!1;let e=this.#C&b;return!(0!==e&&e!==_||256&this.#C||this.#C&D)}calledReaddir(){return!!(16&this.#C)}isENOENT(){return!!(this.#C&D)}isNamed(e){return this.nocase?this.#_===E(e):this.#_===C(e)}async readlink(){let e=this.#M;if(e)return e;if(this.canReadlink()&&this.parent)try{let e=await this.#e.promises.readlink(this.fullpath()),t=(await this.parent.realpath())?.resolve(e);if(t)return this.#M=t}catch(e){return void this.#k(e.code)}}readlinkSync(){let e=this.#M;if(e)return e;if(this.canReadlink()&&this.parent)try{let e=this.#e.readlinkSync(this.fullpath()),t=this.parent.realpathSync()?.resolve(e);if(t)return this.#M=t}catch(e){return void this.#k(e.code)}}#I(e){this.#C|=16;for(let t=e.provisional;t<e.length;t++){let i=e[t];i&&i.#N()}}#N(){this.#C&D||(this.#C=(this.#C|D)&w,this.#A())}#A(){let e=this.children();e.provisional=0;for(let t of e)t.#N()}#L(){this.#C|=512,this.#U()}#U(){if(64&this.#C)return;let e=this.#C;4===(e&b)&&(e&=w),this.#C=64|e,this.#A()}#W(e=""){"ENOTDIR"===e||"EPERM"===e?this.#U():"ENOENT"===e?this.#N():this.children().provisional=0}#O(e=""){"ENOTDIR"===e?this.parent.#U():"ENOENT"===e&&this.#N()}#k(e=""){let t=this.#C;t|=256,"ENOENT"===e&&(t|=D),("EINVAL"===e||"UNKNOWN"===e)&&(t&=w),this.#C=t,"ENOTDIR"===e&&this.parent&&this.parent.#U()}#$(e,t){return this.#P(e,t)||this.#B(e,t)}#B(e,t){let i=T(e),n=this.newChild(e.name,i,{parent:this}),r=n.#C&b;return 4!==r&&r!==_&&0!==r&&(n.#C|=64),t.unshift(n),t.provisional++,n}#P(e,t){for(let i=t.provisional;i<t.length;i++){let n=t[i];if((this.nocase?E(e.name):C(e.name))===n.#_)return this.#E(e,n,i,t)}}#E(e,t,i,n){let r=t.name;return t.#C=t.#C&w|T(e),r!==e.name&&(t.name=e.name),i!==n.provisional&&(i===n.length-1?n.pop():n.splice(i,1),n.unshift(t)),n.provisional++,t}async lstat(){if(0===(this.#C&D))try{return this.#z(await this.#e.promises.lstat(this.fullpath())),this}catch(e){this.#O(e.code)}}lstatSync(){if(0===(this.#C&D))try{return this.#z(this.#e.lstatSync(this.fullpath())),this}catch(e){this.#O(e.code)}}#z(e){let{atime:t,atimeMs:i,birthtime:n,birthtimeMs:r,blksize:o,blocks:s,ctime:a,ctimeMs:c,dev:l,gid:u,ino:h,mode:d,mtime:p,mtimeMs:f,nlink:g,rdev:m,size:y,uid:v}=e;this.#g=t,this.#h=i,this.#v=n,this.#p=r,this.#a=o,this.#u=s,this.#y=a,this.#f=c,this.#t=l,this.#o=u,this.#c=h,this.#i=d,this.#m=p,this.#d=f,this.#n=g,this.#s=m,this.#l=y,this.#r=v;let b=T(e);this.#C=this.#C&w|b|32,0!==b&&4!==b&&b!==_&&(this.#C|=64)}#x=[];#q=!1;#H(e){this.#q=!1;let t=this.#x.slice();this.#x.length=0,t.forEach(t=>t(null,e))}readdirCB(e,t=!1){if(!this.canReaddir())return void(t?e(null,[]):queueMicrotask(()=>e(null,[])));let i=this.children();if(this.calledReaddir()){let n=i.slice(0,i.provisional);return void(t?e(null,n):queueMicrotask(()=>e(null,n)))}if(this.#x.push(e),this.#q)return;this.#q=!0;let n=this.fullpath();this.#e.readdir(n,{withFileTypes:!0},(e,t)=>{if(e)this.#W(e.code),i.provisional=0;else{for(let e of t)this.#$(e,i);this.#I(i)}this.#H(i.slice(0,i.provisional))})}#G;async readdir(){if(!this.canReaddir())return[];let e=this.children();if(this.calledReaddir())return e.slice(0,e.provisional);let t=this.fullpath();if(this.#G)await this.#G;else{let i=()=>{};this.#G=new Promise(e=>i=e);try{for(let i of await this.#e.promises.readdir(t,{withFileTypes:!0}))this.#$(i,e);this.#I(e)}catch(t){this.#W(t.code),e.provisional=0}this.#G=void 0,i()}return e.slice(0,e.provisional)}readdirSync(){if(!this.canReaddir())return[];let e=this.children();if(this.calledReaddir())return e.slice(0,e.provisional);let t=this.fullpath();try{for(let i of this.#e.readdirSync(t,{withFileTypes:!0}))this.#$(i,e);this.#I(e)}catch(t){this.#W(t.code),e.provisional=0}return e.slice(0,e.provisional)}canReaddir(){if(704&this.#C)return!1;let e=b&this.#C;return 0===e||4===e||e===_}shouldWalk(e,t){return!(4&~this.#C)&&!(704&this.#C)&&!e.has(this)&&(!t||t(this))}async realpath(){if(this.#j)return this.#j;if(!(896&this.#C))try{let e=await this.#e.promises.realpath(this.fullpath());return this.#j=this.resolve(e)}catch{this.#L()}}realpathSync(){if(this.#j)return this.#j;if(!(896&this.#C))try{let e=this.#e.realpathSync(this.fullpath());return this.#j=this.resolve(e)}catch{this.#L()}}[O](e){if(e===this)return;e.isCWD=!1,this.isCWD=!0;let t=new Set([]),i=[],n=this;for(;n&&n.parent;)t.add(n),n.#T=i.join(this.sep),n.#S=i.join("/"),n=n.parent,i.push("..");for(n=e;n&&n.parent&&!t.has(n);)n.#T=void 0,n.#S=void 0,n=n.parent}};e.PathBase=k;var N=class e extends k{sep="\\";splitSep=v;constructor(e,t=0,i,n,r,o,s){super(e,t,i,n,r,o,s)}newChild(t,i=0,n={}){return new e(t,i,this.root,this.roots,this.nocase,this.childrenCache(),n)}getRootString(e){return s.win32.parse(e).root}getRoot(e){if(e=(e=>e.replace(/\//g,"\\").replace(y,"$1\\"))(e.toUpperCase()),e===this.root.name)return this.root;for(let[t,i]of Object.entries(this.roots))if(this.sameRoot(e,t))return this.roots[e]=i;return this.roots[e]=new I(e,this).root}sameRoot(e,t=this.root.name){return(e=e.toUpperCase().replace(/\//g,"\\").replace(y,"$1\\"))===t}};e.PathWin32=N;var A=class e extends k{splitSep="/";sep="/";constructor(e,t=0,i,n,r,o,s){super(e,t,i,n,r,o,s)}getRootString(e){return e.startsWith("/")?"/":""}getRoot(e){return this.root}newChild(t,i=0,n={}){return new e(t,i,this.root,this.roots,this.nocase,this.childrenCache(),n)}};e.PathPosix=A;var M=class{root;rootPath;roots;cwd;#e;#t;#i;nocase;#n;constructor(e=process.cwd(),t,i,{nocase:n,childrenCacheSize:r=16384,fs:o=g}={}){this.#n=m(o),(e instanceof URL||e.startsWith("file://"))&&(e=(0,a.fileURLToPath)(e));let s=t.resolve(e);this.roots=Object.create(null),this.rootPath=this.parseRootPath(s),this.#e=new P,this.#t=new P,this.#i=new x(r);let c=s.substring(this.rootPath.length).split(i);if(1===c.length&&!c[0]&&c.pop(),void 0===n)throw new TypeError("must provide nocase setting to PathScurryBase ctor");this.nocase=n,this.root=this.newRoot(this.#n),this.roots[this.rootPath]=this.root;let l=this.root,u=c.length-1,h=t.sep,d=this.rootPath,p=!1;for(let e of c){let t=u--;l=l.child(e,{relative:new Array(t).fill("..").join(h),relativePosix:new Array(t).fill("..").join("/"),fullpath:d+=(p?"":h)+e}),p=!0}this.cwd=l}depth(e=this.cwd){return"string"==typeof e&&(e=this.cwd.resolve(e)),e.depth()}childrenCache(){return this.#i}resolve(...e){let t="";for(let i=e.length-1;i>=0;i--){let n=e[i];if(n&&"."!==n&&(t=t?`${n}/${t}`:n,this.isAbsolute(n)))break}let i=this.#e.get(t);if(void 0!==i)return i;let n=this.cwd.resolve(t).fullpath();return this.#e.set(t,n),n}resolvePosix(...e){let t="";for(let i=e.length-1;i>=0;i--){let n=e[i];if(n&&"."!==n&&(t=t?`${n}/${t}`:n,this.isAbsolute(n)))break}let i=this.#t.get(t);if(void 0!==i)return i;let n=this.cwd.resolve(t).fullpathPosix();return this.#t.set(t,n),n}relative(e=this.cwd){return"string"==typeof e&&(e=this.cwd.resolve(e)),e.relative()}relativePosix(e=this.cwd){return"string"==typeof e&&(e=this.cwd.resolve(e)),e.relativePosix()}basename(e=this.cwd){return"string"==typeof e&&(e=this.cwd.resolve(e)),e.name}dirname(e=this.cwd){return"string"==typeof e&&(e=this.cwd.resolve(e)),(e.parent||e).fullpath()}async readdir(e=this.cwd,t={withFileTypes:!0}){"string"==typeof e?e=this.cwd.resolve(e):e instanceof k||(t=e,e=this.cwd);let{withFileTypes:i}=t;if(e.canReaddir()){let t=await e.readdir();return i?t:t.map(e=>e.name)}return[]}readdirSync(e=this.cwd,t={withFileTypes:!0}){"string"==typeof e?e=this.cwd.resolve(e):e instanceof k||(t=e,e=this.cwd);let{withFileTypes:i=!0}=t;return e.canReaddir()?i?e.readdirSync():e.readdirSync().map(e=>e.name):[]}async lstat(e=this.cwd){return"string"==typeof e&&(e=this.cwd.resolve(e)),e.lstat()}lstatSync(e=this.cwd){return"string"==typeof e&&(e=this.cwd.resolve(e)),e.lstatSync()}async readlink(e=this.cwd,{withFileTypes:t}={withFileTypes:!1}){"string"==typeof e?e=this.cwd.resolve(e):e instanceof k||(t=e.withFileTypes,e=this.cwd);let i=await e.readlink();return t?i:i?.fullpath()}readlinkSync(e=this.cwd,{withFileTypes:t}={withFileTypes:!1}){"string"==typeof e?e=this.cwd.resolve(e):e instanceof k||(t=e.withFileTypes,e=this.cwd);let i=e.readlinkSync();return t?i:i?.fullpath()}async realpath(e=this.cwd,{withFileTypes:t}={withFileTypes:!1}){"string"==typeof e?e=this.cwd.resolve(e):e instanceof k||(t=e.withFileTypes,e=this.cwd);let i=await e.realpath();return t?i:i?.fullpath()}realpathSync(e=this.cwd,{withFileTypes:t}={withFileTypes:!1}){"string"==typeof e?e=this.cwd.resolve(e):e instanceof k||(t=e.withFileTypes,e=this.cwd);let i=e.realpathSync();return t?i:i?.fullpath()}async walk(e=this.cwd,t={}){"string"==typeof e?e=this.cwd.resolve(e):e instanceof k||(t=e,e=this.cwd);let{withFileTypes:i=!0,follow:n=!1,filter:r,walkFilter:o}=t,s=[];(!r||r(e))&&s.push(i?e:e.fullpath());let a=new Set,c=(e,t)=>{a.add(e),e.readdirCB((e,l)=>{if(e)return t(e);let u=l.length;if(!u)return t();let h=()=>{0===--u&&t()};for(let e of l)(!r||r(e))&&s.push(i?e:e.fullpath()),n&&e.isSymbolicLink()?e.realpath().then(e=>e?.isUnknown()?e.lstat():e).then(e=>e?.shouldWalk(a,o)?c(e,h):h()):e.shouldWalk(a,o)?c(e,h):h()},!0)},l=e;return new Promise((e,t)=>{c(l,i=>{if(i)return t(i);e(s)})})}walkSync(e=this.cwd,t={}){"string"==typeof e?e=this.cwd.resolve(e):e instanceof k||(t=e,e=this.cwd);let{withFileTypes:i=!0,follow:n=!1,filter:r,walkFilter:o}=t,s=[];(!r||r(e))&&s.push(i?e:e.fullpath());let a=new Set([e]);for(let e of a){let t=e.readdirSync();for(let e of t){(!r||r(e))&&s.push(i?e:e.fullpath());let t=e;if(e.isSymbolicLink()){if(!n||!(t=e.realpathSync()))continue;t.isUnknown()&&t.lstatSync()}t.shouldWalk(a,o)&&a.add(t)}}return s}[Symbol.asyncIterator](){return this.iterate()}iterate(e=this.cwd,t={}){return"string"==typeof e?e=this.cwd.resolve(e):e instanceof k||(t=e,e=this.cwd),this.stream(e,t)[Symbol.asyncIterator]()}[Symbol.iterator](){return this.iterateSync()}*iterateSync(e=this.cwd,t={}){"string"==typeof e?e=this.cwd.resolve(e):e instanceof k||(t=e,e=this.cwd);let{withFileTypes:i=!0,follow:n=!1,filter:r,walkFilter:o}=t;(!r||r(e))&&(yield i?e:e.fullpath());let s=new Set([e]);for(let e of s){let t=e.readdirSync();for(let e of t){(!r||r(e))&&(yield i?e:e.fullpath());let t=e;if(e.isSymbolicLink()){if(!n||!(t=e.realpathSync()))continue;t.isUnknown()&&t.lstatSync()}t.shouldWalk(s,o)&&s.add(t)}}}stream(e=this.cwd,t={}){"string"==typeof e?e=this.cwd.resolve(e):e instanceof k||(t=e,e=this.cwd);let{withFileTypes:i=!0,follow:n=!1,filter:r,walkFilter:o}=t,s=new f.Minipass({objectMode:!0});(!r||r(e))&&s.write(i?e:e.fullpath());let a=new Set,c=[e],l=0,u=()=>{let e=!1;for(;!e;){let t=c.shift();if(!t)return void(0===l&&s.end());l++,a.add(t);let h=(t,p,f=!1)=>{if(t)return s.emit("error",t);if(n&&!f){let e=[];for(let t of p)t.isSymbolicLink()&&e.push(t.realpath().then(e=>e?.isUnknown()?e.lstat():e));if(e.length)return void Promise.all(e).then(()=>h(null,p,!0))}for(let t of p)t&&(!r||r(t))&&(s.write(i?t:t.fullpath())||(e=!0));l--;for(let e of p){let t=e.realpathCached()||e;t.shouldWalk(a,o)&&c.push(t)}e&&!s.flowing?s.once("drain",u):d||u()},d=!0;t.readdirCB(h,!0),d=!1}};return u(),s}streamSync(e=this.cwd,t={}){"string"==typeof e?e=this.cwd.resolve(e):e instanceof k||(t=e,e=this.cwd);let{withFileTypes:i=!0,follow:n=!1,filter:r,walkFilter:o}=t,s=new f.Minipass({objectMode:!0}),a=new Set;(!r||r(e))&&s.write(i?e:e.fullpath());let c=[e],l=0,u=()=>{let e=!1;for(;!e;){let t=c.shift();if(!t)return void(0===l&&s.end());l++,a.add(t);let u=t.readdirSync();for(let t of u)(!r||r(t))&&(s.write(i?t:t.fullpath())||(e=!0));l--;for(let e of u){let t=e;if(e.isSymbolicLink()){if(!n||!(t=e.realpathSync()))continue;t.isUnknown()&&t.lstatSync()}t.shouldWalk(a,o)&&c.push(t)}}e&&!s.flowing&&s.once("drain",u)};return u(),s}chdir(e=this.cwd){let t=this.cwd;this.cwd="string"==typeof e?this.cwd.resolve(e):e,this.cwd[O](t)}};e.PathScurryBase=M;var I=class extends M{sep="\\";constructor(e=process.cwd(),t={}){let{nocase:i=!0}=t;super(e,s.win32,"\\",{...t,nocase:i}),this.nocase=i;for(let e=this.cwd;e;e=e.parent)e.nocase=this.nocase}parseRootPath(e){return s.win32.parse(e).root.toUpperCase()}newRoot(e){return new N(this.rootPath,4,void 0,this.roots,this.nocase,this.childrenCache(),{fs:e})}isAbsolute(e){return e.startsWith("/")||e.startsWith("\\")||/^[a-z]:(\/|\\)/i.test(e)}};e.PathScurryWin32=I;var q=class extends M{sep="/";constructor(e=process.cwd(),t={}){let{nocase:i=!1}=t;super(e,s.posix,"/",{...t,nocase:i}),this.nocase=i}parseRootPath(e){return"/"}newRoot(e){return new A(this.rootPath,4,void 0,this.roots,this.nocase,this.childrenCache(),{fs:e})}isAbsolute(e){return e.startsWith("/")}};e.PathScurryPosix=q;var j=class extends q{constructor(e=process.cwd(),t={}){let{nocase:i=!0}=t;super(e,{...t,nocase:i})}};e.PathScurryDarwin=j,e.Path="win32"===process.platform?N:A,e.PathScurry="win32"===process.platform?I:"darwin"===process.platform?j:q}),g=n(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Pattern=void 0;var t=h(),i=Symbol.for("nodejs.util.inspect.custom");e.Pattern=class e{#e;#t;#i;length;#n;#r;#o;#s;#a;#c;#l=!0;constructor(e,t,i,n){if(!(e=>e.length>=1)(e))throw new TypeError("empty pattern list");if(!(e=>e.length>=1)(t))throw new TypeError("empty glob list");if(t.length!==e.length)throw new TypeError("mismatched pattern list and glob list lengths");if(this.length=e.length,i<0||i>=this.length)throw new TypeError("index out of range");if(this.#e=e,this.#t=t,this.#i=i,this.#n=n,0===this.#i)if(this.isUNC()){let[e,t,i,n,...r]=this.#e,[o,s,a,c,...l]=this.#t;""===r[0]&&(r.shift(),l.shift());let u=[e,t,i,n,""].join("/"),h=[o,s,a,c,""].join("/");this.#e=[u,...r],this.#t=[h,...l],this.length=this.#e.length}else if(this.isDrive()||this.isAbsolute()){let[e,...t]=this.#e,[i,...n]=this.#t;""===t[0]&&(t.shift(),n.shift());let r=e+"/",o=i+"/";this.#e=[r,...t],this.#t=[o,...n],this.length=this.#e.length}}[i](){return"Pattern <"+this.#t.slice(this.#i).join("/")+">"}pattern(){return this.#e[this.#i]}isString(){return"string"==typeof this.#e[this.#i]}isGlobstar(){return this.#e[this.#i]===t.GLOBSTAR}isRegExp(){return this.#e[this.#i]instanceof RegExp}globString(){return this.#o=this.#o||(0===this.#i?this.isAbsolute()?this.#t[0]+this.#t.slice(1).join("/"):this.#t.join("/"):this.#t.slice(this.#i).join("/"))}hasMore(){return this.length>this.#i+1}rest(){return void 0!==this.#r?this.#r:this.hasMore()?(this.#r=new e(this.#e,this.#t,this.#i+1,this.#n),this.#r.#c=this.#c,this.#r.#a=this.#a,this.#r.#s=this.#s,this.#r):this.#r=null}isUNC(){let e=this.#e;return void 0!==this.#a?this.#a:this.#a="win32"===this.#n&&0===this.#i&&""===e[0]&&""===e[1]&&"string"==typeof e[2]&&!!e[2]&&"string"==typeof e[3]&&!!e[3]}isDrive(){let e=this.#e;return void 0!==this.#s?this.#s:this.#s="win32"===this.#n&&0===this.#i&&this.length>1&&"string"==typeof e[0]&&/^[a-z]:$/i.test(e[0])}isAbsolute(){let e=this.#e;return void 0!==this.#c?this.#c:this.#c=""===e[0]&&e.length>1||this.isDrive()||this.isUNC()}root(){let e=this.#e[0];return"string"==typeof e&&this.isAbsolute()&&0===this.#i?e:""}checkFollowGlobstar(){return!(0===this.#i||!this.isGlobstar()||!this.#l)}markFollowGlobstar(){return!(0===this.#i||!this.isGlobstar()||!this.#l||(this.#l=!1,0))}}}),m=n(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Ignore=void 0;var t=h(),i=g(),n="object"==typeof process&&process&&"string"==typeof process.platform?process.platform:"linux";e.Ignore=class{relative;relativeChildren;absolute;absoluteChildren;platform;mmopts;constructor(e,{nobrace:t,nocase:i,noext:r,noglobstar:o,platform:s=n}){this.relative=[],this.absolute=[],this.relativeChildren=[],this.absoluteChildren=[],this.platform=s,this.mmopts={dot:!0,nobrace:t,nocase:i,noext:r,noglobstar:o,optimizationLevel:2,platform:s,nocomment:!0,nonegate:!0};for(let t of e)this.add(t)}add(e){let n=new t.Minimatch(e,this.mmopts);for(let e=0;e<n.set.length;e++){let r=n.set[e],o=n.globParts[e];if(!r||!o)throw new Error("invalid pattern object");for(;"."===r[0]&&"."===o[0];)r.shift(),o.shift();let s=new i.Pattern(r,o,0,this.platform),a=new t.Minimatch(s.globString(),this.mmopts),c="**"===o[o.length-1],l=s.isAbsolute();l?this.absolute.push(a):this.relative.push(a),c&&(l?this.absoluteChildren.push(a):this.relativeChildren.push(a))}}ignored(e){let t=e.fullpath(),i=`${t}/`,n=e.relative()||".",r=`${n}/`;for(let e of this.relative)if(e.match(n)||e.match(r))return!0;for(let e of this.absolute)if(e.match(t)||e.match(i))return!0;return!1}childrenIgnored(e){let t=e.fullpath()+"/",i=(e.relative()||".")+"/";for(let e of this.relativeChildren)if(e.match(i))return!0;for(let e of this.absoluteChildren)if(e.match(t))return!0;return!1}}}),y=n(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Processor=e.SubWalks=e.MatchRecord=e.HasWalkedCache=void 0;var t=h(),i=class e{store;constructor(e=new Map){this.store=e}copy(){return new e(new Map(this.store))}hasWalked(e,t){return this.store.get(e.fullpath())?.has(t.globString())}storeWalked(e,t){let i=e.fullpath(),n=this.store.get(i);n?n.add(t.globString()):this.store.set(i,new Set([t.globString()]))}};e.HasWalkedCache=i;var n=class{store=new Map;add(e,t,i){let n=(t?2:0)|(i?1:0),r=this.store.get(e);this.store.set(e,void 0===r?n:n&r)}entries(){return[...this.store.entries()].map(([e,t])=>[e,!!(2&t),!!(1&t)])}};e.MatchRecord=n;var r=class{store=new Map;add(e,t){if(!e.canReaddir())return;let i=this.store.get(e);i?i.find(e=>e.globString()===t.globString())||i.push(t):this.store.set(e,[t])}get(e){let t=this.store.get(e);if(!t)throw new Error("attempting to walk unknown path");return t}entries(){return this.keys().map(e=>[e,this.store.get(e)])}keys(){return[...this.store.keys()].filter(e=>e.canReaddir())}};e.SubWalks=r,e.Processor=class e{hasWalkedCache;matches=new n;subwalks=new r;patterns;follow;dot;opts;constructor(e,t){this.opts=e,this.follow=!!e.follow,this.dot=!!e.dot,this.hasWalkedCache=t?t.copy():new i}processPatterns(e,i){this.patterns=i;let n=i.map(t=>[e,t]);for(let[e,i]of n){this.hasWalkedCache.storeWalked(e,i);let n=i.root(),r=i.isAbsolute()&&!1!==this.opts.absolute;if(n){e=e.resolve("/"===n&&void 0!==this.opts.root?this.opts.root:n);let t=i.rest();if(!t){this.matches.add(e,!0,!1);continue}i=t}if(e.isENOENT())continue;let o,s,a=!1;for(;"string"==typeof(o=i.pattern())&&(s=i.rest());)e=e.resolve(o),i=s,a=!0;if(o=i.pattern(),s=i.rest(),a){if(this.hasWalkedCache.hasWalked(e,i))continue;this.hasWalkedCache.storeWalked(e,i)}if("string"==typeof o){let t=".."===o||""===o||"."===o;this.matches.add(e.resolve(o),r,t);continue}if(o===t.GLOBSTAR){(!e.isSymbolicLink()||this.follow||i.checkFollowGlobstar())&&this.subwalks.add(e,i);let t=s?.pattern(),n=s?.rest();if(s&&(""!==t&&"."!==t||n)){if(".."===t){let t=e.parent||e;n?this.hasWalkedCache.hasWalked(t,n)||this.subwalks.add(t,n):this.matches.add(t,r,!0)}}else this.matches.add(e,r,""===t||"."===t)}else o instanceof RegExp&&this.subwalks.add(e,i)}return this}subwalkTargets(){return this.subwalks.keys()}child(){return new e(this.opts,this.hasWalkedCache)}filterEntries(e,i){let n=this.subwalks.get(e),r=this.child();for(let e of i)for(let i of n){let n=i.isAbsolute(),o=i.pattern(),s=i.rest();o===t.GLOBSTAR?r.testGlobstar(e,i,s,n):o instanceof RegExp?r.testRegExp(e,o,s,n):r.testString(e,o,s,n)}return r}testGlobstar(e,t,i,n){if((this.dot||!e.name.startsWith("."))&&(t.hasMore()||this.matches.add(e,n,!1),e.canReaddir()&&(this.follow||!e.isSymbolicLink()?this.subwalks.add(e,t):e.isSymbolicLink()&&(i&&t.checkFollowGlobstar()?this.subwalks.add(e,i):t.markFollowGlobstar()&&this.subwalks.add(e,t)))),i){let t=i.pattern();if("string"==typeof t&&".."!==t&&""!==t&&"."!==t)this.testString(e,t,i.rest(),n);else if(".."===t){let t=e.parent||e;this.subwalks.add(t,i)}else t instanceof RegExp&&this.testRegExp(e,t,i.rest(),n)}}testRegExp(e,t,i,n){t.test(e.name)&&(i?this.subwalks.add(e,i):this.matches.add(e,n,!1))}testString(e,t,i,n){e.isNamed(t)&&(i?this.subwalks.add(e,i):this.matches.add(e,n,!1))}}}),v=n(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.GlobStream=e.GlobWalker=e.GlobUtil=void 0;var t=p(),i=m(),n=y(),r=class{path;patterns;opts;seen=new Set;paused=!1;aborted=!1;#e=[];#t;#i;signal;maxDepth;includeChildMatches;constructor(e,t,n){if(this.patterns=e,this.path=t,this.opts=n,this.#i=n.posix||"win32"!==n.platform?"/":"\\",this.includeChildMatches=!1!==n.includeChildMatches,(n.ignore||!this.includeChildMatches)&&(this.#t=((e,t)=>"string"==typeof e?new i.Ignore([e],t):Array.isArray(e)?new i.Ignore(e,t):e)(n.ignore??[],n),!this.includeChildMatches&&"function"!=typeof this.#t.add))throw new Error("cannot ignore child matches, ignore lacks add() method.");this.maxDepth=n.maxDepth||1/0,n.signal&&(this.signal=n.signal,this.signal.addEventListener("abort",()=>{this.#e.length=0}))}#n(e){return this.seen.has(e)||!!this.#t?.ignored?.(e)}#r(e){return!!this.#t?.childrenIgnored?.(e)}pause(){this.paused=!0}resume(){if(this.signal?.aborted)return;let e;for(this.paused=!1;!this.paused&&(e=this.#e.shift());)e()}onResume(e){this.signal?.aborted||(this.paused?this.#e.push(e):e())}async matchCheck(e,t){if(t&&this.opts.nodir)return;let i;if(this.opts.realpath){if(i=e.realpathCached()||await e.realpath(),!i)return;e=i}let n=e.isUnknown()||this.opts.stat?await e.lstat():e;if(this.opts.follow&&this.opts.nodir&&n?.isSymbolicLink()){let e=await n.realpath();e&&(e.isUnknown()||this.opts.stat)&&await e.lstat()}return this.matchCheckTest(n,t)}matchCheckTest(e,t){return!e||!(this.maxDepth===1/0||e.depth()<=this.maxDepth)||t&&!e.canReaddir()||this.opts.nodir&&e.isDirectory()||this.opts.nodir&&this.opts.follow&&e.isSymbolicLink()&&e.realpathCached()?.isDirectory()||this.#n(e)?void 0:e}matchCheckSync(e,t){if(t&&this.opts.nodir)return;let i;if(this.opts.realpath){if(i=e.realpathCached()||e.realpathSync(),!i)return;e=i}let n=e.isUnknown()||this.opts.stat?e.lstatSync():e;if(this.opts.follow&&this.opts.nodir&&n?.isSymbolicLink()){let e=n.realpathSync();e&&(e?.isUnknown()||this.opts.stat)&&e.lstatSync()}return this.matchCheckTest(n,t)}matchFinish(e,t){if(this.#n(e))return;if(!this.includeChildMatches&&this.#t?.add){let t=`${e.relativePosix()}/**`;this.#t.add(t)}let i=void 0===this.opts.absolute?t:this.opts.absolute;this.seen.add(e);let n=this.opts.mark&&e.isDirectory()?this.#i:"";if(this.opts.withFileTypes)this.matchEmit(e);else if(i){let t=this.opts.posix?e.fullpathPosix():e.fullpath();this.matchEmit(t+n)}else{let t=this.opts.posix?e.relativePosix():e.relative(),i=this.opts.dotRelative&&!t.startsWith(".."+this.#i)?"."+this.#i:"";this.matchEmit(t?i+t+n:"."+n)}}async match(e,t,i){let n=await this.matchCheck(e,i);n&&this.matchFinish(n,t)}matchSync(e,t,i){let n=this.matchCheckSync(e,i);n&&this.matchFinish(n,t)}walkCB(e,t,i){this.signal?.aborted&&i(),this.walkCB2(e,t,new n.Processor(this.opts),i)}walkCB2(e,t,i,n){if(this.#r(e))return n();if(this.signal?.aborted&&n(),this.paused)return void this.onResume(()=>this.walkCB2(e,t,i,n));i.processPatterns(e,t);let r=1,o=()=>{0===--r&&n()};for(let[e,t,n]of i.matches.entries())this.#n(e)||(r++,this.match(e,t,n).then(()=>o()));for(let e of i.subwalkTargets()){if(this.maxDepth!==1/0&&e.depth()>=this.maxDepth)continue;r++;let t=e.readdirCached();e.calledReaddir()?this.walkCB3(e,t,i,o):e.readdirCB((t,n)=>this.walkCB3(e,n,i,o),!0)}o()}walkCB3(e,t,i,n){i=i.filterEntries(e,t);let r=1,o=()=>{0===--r&&n()};for(let[e,t,n]of i.matches.entries())this.#n(e)||(r++,this.match(e,t,n).then(()=>o()));for(let[e,t]of i.subwalks.entries())r++,this.walkCB2(e,t,i.child(),o);o()}walkCBSync(e,t,i){this.signal?.aborted&&i(),this.walkCB2Sync(e,t,new n.Processor(this.opts),i)}walkCB2Sync(e,t,i,n){if(this.#r(e))return n();if(this.signal?.aborted&&n(),this.paused)return void this.onResume(()=>this.walkCB2Sync(e,t,i,n));i.processPatterns(e,t);let r=1,o=()=>{0===--r&&n()};for(let[e,t,n]of i.matches.entries())this.#n(e)||this.matchSync(e,t,n);for(let e of i.subwalkTargets()){if(this.maxDepth!==1/0&&e.depth()>=this.maxDepth)continue;r++;let t=e.readdirSync();this.walkCB3Sync(e,t,i,o)}o()}walkCB3Sync(e,t,i,n){i=i.filterEntries(e,t);let r=1,o=()=>{0===--r&&n()};for(let[e,t,n]of i.matches.entries())this.#n(e)||this.matchSync(e,t,n);for(let[e,t]of i.subwalks.entries())r++,this.walkCB2Sync(e,t,i.child(),o);o()}};e.GlobUtil=r,e.GlobWalker=class extends r{matches=new Set;constructor(e,t,i){super(e,t,i)}matchEmit(e){this.matches.add(e)}async walk(){if(this.signal?.aborted)throw this.signal.reason;return this.path.isUnknown()&&await this.path.lstat(),await new Promise((e,t)=>{this.walkCB(this.path,this.patterns,()=>{this.signal?.aborted?t(this.signal.reason):e(this.matches)})}),this.matches}walkSync(){if(this.signal?.aborted)throw this.signal.reason;return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,()=>{if(this.signal?.aborted)throw this.signal.reason}),this.matches}},e.GlobStream=class extends r{results;constructor(e,i,n){super(e,i,n),this.results=new t.Minipass({signal:this.signal,objectMode:!0}),this.results.on("drain",()=>this.resume()),this.results.on("resume",()=>this.resume())}matchEmit(e){this.results.write(e),this.results.flowing||this.pause()}stream(){let e=this.path;return e.isUnknown()?e.lstat().then(()=>{this.walkCB(e,this.patterns,()=>this.results.end())}):this.walkCB(e,this.patterns,()=>this.results.end()),this.results}streamSync(){return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,()=>this.results.end()),this.results}}}),_=n(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Glob=void 0;var t=h(),n=i(3136),r=f(),o=g(),s=v(),a="object"==typeof process&&process&&"string"==typeof process.platform?process.platform:"linux",c=class{absolute;cwd;root;dot;dotRelative;follow;ignore;magicalBraces;mark;matchBase;maxDepth;nobrace;nocase;nodir;noext;noglobstar;pattern;platform;realpath;scurry;stat;signal;windowsPathsNoEscape;withFileTypes;includeChildMatches;opts;patterns;constructor(e,i){if(!i)throw new TypeError("glob options required");if(this.withFileTypes=!!i.withFileTypes,this.signal=i.signal,this.follow=!!i.follow,this.dot=!!i.dot,this.dotRelative=!!i.dotRelative,this.nodir=!!i.nodir,this.mark=!!i.mark,i.cwd?(i.cwd instanceof URL||i.cwd.startsWith("file://"))&&(i.cwd=(0,n.fileURLToPath)(i.cwd)):this.cwd="",this.cwd=i.cwd||"",this.root=i.root,this.magicalBraces=!!i.magicalBraces,this.nobrace=!!i.nobrace,this.noext=!!i.noext,this.realpath=!!i.realpath,this.absolute=i.absolute,this.includeChildMatches=!1!==i.includeChildMatches,this.noglobstar=!!i.noglobstar,this.matchBase=!!i.matchBase,this.maxDepth="number"==typeof i.maxDepth?i.maxDepth:1/0,this.stat=!!i.stat,this.ignore=i.ignore,this.withFileTypes&&void 0!==this.absolute)throw new Error("cannot set absolute and withFileTypes:true");if("string"==typeof e&&(e=[e]),this.windowsPathsNoEscape=!!i.windowsPathsNoEscape||!1===i.allowWindowsEscape,this.windowsPathsNoEscape&&(e=e.map(e=>e.replace(/\\/g,"/"))),this.matchBase){if(i.noglobstar)throw new TypeError("base matching requires globstar");e=e.map(e=>e.includes("/")?e:`./**/${e}`)}if(this.pattern=e,this.platform=i.platform||a,this.opts={...i,platform:this.platform},i.scurry){if(this.scurry=i.scurry,void 0!==i.nocase&&i.nocase!==i.scurry.nocase)throw new Error("nocase option contradicts provided scurry option")}else{let e="win32"===i.platform?r.PathScurryWin32:"darwin"===i.platform?r.PathScurryDarwin:i.platform?r.PathScurryPosix:r.PathScurry;this.scurry=new e(this.cwd,{nocase:i.nocase,fs:i.fs})}this.nocase=this.scurry.nocase;let s="darwin"===this.platform||"win32"===this.platform,c={braceExpandMax:1e4,...i,dot:this.dot,matchBase:this.matchBase,nobrace:this.nobrace,nocase:this.nocase,nocaseMagicOnly:s,nocomment:!0,noext:this.noext,nonegate:!0,optimizationLevel:2,platform:this.platform,windowsPathsNoEscape:this.windowsPathsNoEscape,debug:!!this.opts.debug},l=this.pattern.map(e=>new t.Minimatch(e,c)),[u,h]=l.reduce((e,t)=>(e[0].push(...t.set),e[1].push(...t.globParts),e),[[],[]]);this.patterns=u.map((e,t)=>{let i=h[t];if(!i)throw new Error("invalid pattern object");return new o.Pattern(e,i,0,this.platform)})}async walk(){return[...await new s.GlobWalker(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).walk()]}walkSync(){return[...new s.GlobWalker(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).walkSync()]}stream(){return new s.GlobStream(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).stream()}streamSync(){return new s.GlobStream(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).streamSync()}iterateSync(){return this.streamSync()[Symbol.iterator]()}[Symbol.iterator](){return this.iterateSync()}iterate(){return this.stream()[Symbol.asyncIterator]()}[Symbol.asyncIterator](){return this.iterate()}};e.Glob=c}),b=n(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.hasMagic=void 0;var t=h();e.hasMagic=(e,i={})=>{Array.isArray(e)||(e=[e]);for(let n of e)if(new t.Minimatch(n,i).hasMagic())return!0;return!1}});t.TI=t.OH=t.nl=t.qD=t.Td=t.Qo=void 0,t.globSync=R;var w=h(),D=_(),T=b();h(),_(),b(),m();function S(e,t={}){return new D.Glob(e,t).streamSync()}function C(e,t={}){return new D.Glob(e,t).stream()}function R(e,t={}){return new D.Glob(e,t).walkSync()}async function E(e,t={}){return new D.Glob(e,t).walk()}function P(e,t={}){return new D.Glob(e,t).iterateSync()}function x(e,t={}){return new D.Glob(e,t).iterate()}t.Qo=S,t.Td=Object.assign(C,{sync:S}),t.qD=P,t.nl=Object.assign(x,{sync:P}),t.OH=Object.assign(R,{stream:S,iterate:P}),t.TI=Object.assign(E,{glob:E,globSync:R,sync:t.OH,globStream:C,stream:t.Td,globStreamSync:S,streamSync:t.Qo,globIterate:x,iterate:t.nl,globIterateSync:P,iterateSync:t.qD,Glob:D.Glob,hasMagic:T.hasMagic,escape:w.escape,unescape:w.unescape}),t.TI.glob=t.TI},9274(e,t){"use strict";t.assertValidPattern=void 0,t.assertValidPattern=e=>{if("string"!=typeof e)throw new TypeError("invalid pattern");if(e.length>65536)throw new TypeError("pattern is too long")}},1674(e,t,i){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.AST=void 0;const r=i(3843),o=i(4116),s=new Set(["!","?","+","*","@"]),a=e=>s.has(e),c=e=>a(e.type),l=new Map([["!",["@"]],["?",["?","@"]],["@",["@"]],["*",["*","+","?","@"]],["+",["+","@"]]]),u=new Map([["!",["?"]],["@",["?"]],["+",["?","*"]]]),h=new Map([["!",["?","@"]],["?",["?","@"]],["@",["?","@"]],["*",["*","+","?","@"]],["+",["+","@","?","*"]]]),d=new Map([["!",new Map([["!","@"]])],["?",new Map([["*","*"],["+","*"]])],["@",new Map([["!","!"],["?","?"],["@","@"],["*","*"],["+","+"]])],["+",new Map([["?","*"],["*","*"]])]]),p="(?!\\.)",f=new Set(["[","."]),g=new Set(["..","."]),m=new Set("().*{}+?[]^$\\!"),y=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),v="[^/]",_=v+"*?",b=v+"+?";let w=0;class D{type;#V;#K;#Y=!1;#X=[];#J;#Q;#Z;#ee=!1;#te;#ie;#ne=!1;id=++w;get depth(){return(this.#J?.depth??-1)+1}[Symbol.for("nodejs.util.inspect.custom")](){return{"@@type":"AST",id:this.id,type:this.type,root:this.#V.id,parent:this.#J?.id,depth:this.depth,partsLength:this.#X.length,parts:this.#X}}constructor(e,t,i={}){this.type=e,e&&(this.#K=!0),this.#J=t,this.#V=this.#J?this.#J.#V:this,this.#te=this.#V===this?i:this.#V.#te,this.#Z=this.#V===this?[]:this.#V.#Z,"!"!==e||this.#V.#ee||this.#Z.push(this),this.#Q=this.#J?this.#J.#X.length:0}get hasMagic(){if(void 0!==this.#K)return this.#K;for(const e of this.#X)if("string"!=typeof e&&(e.type||e.hasMagic))return this.#K=!0;return this.#K}toString(){return void 0!==this.#ie?this.#ie:this.type?this.#ie=this.type+"("+this.#X.map(e=>String(e)).join("|")+")":this.#ie=this.#X.map(e=>String(e)).join("")}#re(){if(this!==this.#V)throw new Error("should only call on root");if(this.#ee)return this;let e;for(this.toString(),this.#ee=!0;e=this.#Z.pop();){if("!"!==e.type)continue;let t=e,i=t.#J;for(;i;){for(let n=t.#Q+1;!i.type&&n<i.#X.length;n++)for(const t of e.#X){if("string"==typeof t)throw new Error("string part in extglob AST??");t.copyIn(i.#X[n])}t=i,i=t.#J}}return this}push(...e){for(const t of e)if(""!==t){if("string"!=typeof t&&!(t instanceof n&&t.#J===this))throw new Error("invalid part: "+t);this.#X.push(t)}}toJSON(){const e=null===this.type?this.#X.slice().map(e=>"string"==typeof e?e:e.toJSON()):[this.type,...this.#X.map(e=>e.toJSON())];return this.isStart()&&!this.type&&e.unshift([]),this.isEnd()&&(this===this.#V||this.#V.#ee&&"!"===this.#J?.type)&&e.push({}),e}isStart(){if(this.#V===this)return!0;if(!this.#J?.isStart())return!1;if(0===this.#Q)return!0;const e=this.#J;for(let t=0;t<this.#Q;t++){const i=e.#X[t];if(!(i instanceof n&&"!"===i.type))return!1}return!0}isEnd(){if(this.#V===this)return!0;if("!"===this.#J?.type)return!0;if(!this.#J?.isEnd())return!1;if(!this.type)return this.#J?.isEnd();const e=this.#J?this.#J.#X.length:0;return this.#Q===e-1}copyIn(e){"string"==typeof e?this.push(e):this.push(e.clone(this))}clone(e){const t=new n(this.type,e);for(const e of this.#X)t.copyIn(e);return t}static#oe(e,t,i,r,o){const s=r.maxExtglobRecursion??2;let c=!1,l=!1,u=-1,h=!1;if(null===t.type){let d=i,p="";for(;d<e.length;){const i=e.charAt(d++);if(c||"\\"===i)c=!c,p+=i;else if(l)d===u+1?"^"!==i&&"!"!==i||(h=!0):"]"!==i||d===u+2&&h||(l=!1),p+=i;else if("["!==i){if(!r.noext&&a(i)&&"("===e.charAt(d)&&o<=s){t.push(p),p="";const s=new n(i,t);d=n.#oe(e,s,d,r,o+1),t.push(s);continue}p+=i}else l=!0,u=d,h=!1,p+=i}return t.push(p),d}let d=i+1,p=new n(null,t);const f=[];let g="";for(;d<e.length;){const i=e.charAt(d++);if(c||"\\"===i)c=!c,g+=i;else if(l)d===u+1?"^"!==i&&"!"!==i||(h=!0):"]"!==i||d===u+2&&h||(l=!1),g+=i;else if("["!==i){if(!r.noext&&a(i)&&"("===e.charAt(d)&&(o<=s||t&&t.#se(i))){const s=t&&t.#se(i)?0:1;p.push(g),g="";const a=new n(i,p);p.push(a),d=n.#oe(e,a,d,r,o+s);continue}if("|"!==i){if(")"===i)return""===g&&0===t.#X.length&&(t.#ne=!0),p.push(g),g="",t.push(...f,p),d;g+=i}else p.push(g),g="",f.push(p),p=new n(null,t)}else l=!0,u=d,h=!1,g+=i}return t.type=null,t.#K=void 0,t.#X=[e.substring(i-1)],d}#ae(e){return this.#ce(e,u)}#ce(e,t=l){if(!e||"object"!=typeof e||null!==e.type||1!==e.#X.length||null===this.type)return!1;const i=e.#X[0];return!(!i||"object"!=typeof i||null===i.type)&&this.#se(i.type,t)}#se(e,t=h){return!!t.get(this.type)?.includes(e)}#le(e,t){const i=e.#X[0],r=new n(null,i,this.options);r.#X.push(""),i.push(r),this.#ue(e,t)}#ue(e,t){const i=e.#X[0];this.#X.splice(t,1,...i.#X);for(const e of i.#X)"object"==typeof e&&(e.#J=this);this.#ie=void 0}#he(e){const t=d.get(this.type);return!!t?.has(e)}#de(e){if(!e||"object"!=typeof e||null!==e.type||1!==e.#X.length||null===this.type||1!==this.#X.length)return!1;const t=e.#X[0];return!(!t||"object"!=typeof t||null===t.type)&&this.#he(t.type)}#pe(e){const t=d.get(this.type),i=e.#X[0],n=t?.get(i.type);if(!n)return!1;this.#X=i.#X;for(const e of this.#X)"object"==typeof e&&(e.#J=this);this.type=n,this.#ie=void 0,this.#ne=!1}static fromGlob(e,t={}){const i=new n(null,void 0,t);return n.#oe(e,i,0,t,0),i}toMMPattern(){if(this!==this.#V)return this.#V.toMMPattern();const e=this.toString(),[t,i,n,r]=this.toRegExpSource();if(!(n||this.#K||this.#te.nocase&&!this.#te.nocaseMagicOnly&&e.toUpperCase()!==e.toLowerCase()))return i;const o=(this.#te.nocase?"i":"")+(r?"u":"");return Object.assign(new RegExp(`^${t}$`,o),{_src:t,_glob:e})}get options(){return this.#te}toRegExpSource(e){const t=e??!!this.#te.dot;if(this.#V===this&&(this.#fe(),this.#re()),!c(this)){const i=this.isStart()&&this.isEnd()&&!this.#X.some(e=>"string"!=typeof e),r=this.#X.map(t=>{const[r,o,s,a]="string"==typeof t?n.#ge(t,this.#K,i):t.toRegExpSource(e);return this.#K=this.#K||s,this.#Y=this.#Y||a,r}).join("");let s="";if(this.isStart()&&"string"==typeof this.#X[0]&&(1!==this.#X.length||!g.has(this.#X[0]))){const i=f,n=t&&i.has(r.charAt(0))||r.startsWith("\\.")&&i.has(r.charAt(2))||r.startsWith("\\.\\.")&&i.has(r.charAt(4)),o=!t&&!e&&i.has(r.charAt(0));s=n?"(?!(?:^|/)\\.\\.?(?:$|/))":o?p:""}let a="";return this.isEnd()&&this.#V.#ee&&"!"===this.#J?.type&&(a="(?:$|\\/)"),[s+r+a,(0,o.unescape)(r),this.#K=!!this.#K,this.#Y]}const i="*"===this.type||"+"===this.type,r="!"===this.type?"(?:(?!(?:":"(?:";let s=this.#me(t);if(this.isStart()&&this.isEnd()&&!s&&"!"!==this.type){const e=this.toString(),t=this;return t.#X=[e],t.type=null,t.#K=void 0,[e,(0,o.unescape)(this.toString()),!1,!1]}let a=!i||e||t?"":this.#me(!0);a===s&&(a=""),a&&(s=`(?:${s})(?:${a})*?`);let l="";return l="!"===this.type&&this.#ne?(this.isStart()&&!t?p:"")+b:r+s+("!"===this.type?"))"+(!this.isStart()||t||e?"":p)+_+")":"@"===this.type?")":"?"===this.type?")?":"+"===this.type&&a?")":"*"===this.type&&a?")?":`)${this.type}`),[l,(0,o.unescape)(s),this.#K=!!this.#K,this.#Y]}#fe(){if(c(this)){let e=0,t=!1;do{t=!0;for(let e=0;e<this.#X.length;e++){const i=this.#X[e];"object"==typeof i&&(i.#fe(),this.#ce(i)?(t=!1,this.#ue(i,e)):this.#ae(i)?(t=!1,this.#le(i,e)):this.#de(i)&&(t=!1,this.#pe(i)))}}while(!t&&++e<10)}else for(const e of this.#X)"object"==typeof e&&e.#fe();this.#ie=void 0}#me(e){return this.#X.map(t=>{if("string"==typeof t)throw new Error("string type in extglob ast??");const[i,n,r,o]=t.toRegExpSource(e);return this.#Y=this.#Y||o,i}).filter(e=>!(this.isStart()&&this.isEnd()&&!e)).join("|")}static#ge(e,t,i=!1){let n=!1,s="",a=!1,c=!1;for(let o=0;o<e.length;o++){const l=e.charAt(o);if(n)n=!1,s+=(m.has(l)?"\\":"")+l;else if("*"!==l)if(c=!1,"\\"!==l){if("["===l){const[i,n,c,l]=(0,r.parseClass)(e,o);if(c){s+=i,a=a||n,o+=c-1,t=t||l;continue}}"?"!==l?s+=y(l):(s+=v,t=!0)}else o===e.length-1?s+="\\\\":n=!0;else{if(c)continue;c=!0,s+=i&&/^[*]+$/.test(e)?b:_,t=!0}}return[s,(0,o.unescape)(e),!!t,a]}}t.AST=D,n=D},3843(e,t){"use strict";t.parseClass=void 0;const i={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},n=e=>e.replace(/[[\]\\-]/g,"\\$&"),r=e=>e.join("");t.parseClass=(e,t)=>{const o=t;if("["!==e.charAt(o))throw new Error("not in a brace expression");const s=[],a=[];let c=o+1,l=!1,u=!1,h=!1,d=!1,p=o,f="";e:for(;c<e.length;){const t=e.charAt(c);if("!"!==t&&"^"!==t||c!==o+1){if("]"===t&&l&&!h){p=c+1;break}if(l=!0,"\\"!==t||h){if("["===t&&!h)for(const[t,[n,r,l]]of Object.entries(i))if(e.startsWith(t,c)){if(f)return["$.",!1,e.length-o,!0];c+=t.length,l?a.push(n):s.push(n),u=u||r;continue e}h=!1,f?(t>f?s.push(n(f)+"-"+n(t)):t===f&&s.push(n(t)),f="",c++):e.startsWith("-]",c+1)?(s.push(n(t+"-")),c+=2):e.startsWith("-",c+1)?(f=t,c+=2):(s.push(n(t)),c++)}else h=!0,c++}else d=!0,c++}if(p<c)return["",!1,0,!1];if(!s.length&&!a.length)return["$.",!1,e.length-o,!0];if(0===a.length&&1===s.length&&/^\\?.$/.test(s[0])&&!d){return[(g=2===s[0].length?s[0].slice(-1):s[0],g.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")),!1,p-o,!1]}var g;const m="["+(d?"^":"")+r(s)+"]",y="["+(d?"":"^")+r(a)+"]";return[s.length&&a.length?"("+m+"|"+y+")":s.length?m:y,u,p-o,!0]}},2363(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.escape=void 0,t.escape=(e,{windowsPathsNoEscape:t=!1,magicalBraces:i=!1}={})=>i?t?e.replace(/[?*()[\]{}]/g,"[$&]"):e.replace(/[?*()[\]\\{}]/g,"\\$&"):t?e.replace(/[?*()[\]]/g,"[$&]"):e.replace(/[?*()[\]\\]/g,"\\$&")},8722(e,t,i){"use strict";t.YW=t.AC=t.KA=t.NT=t.pb=t.ZN=t.Vn=t.minimatch=void 0;const n=i(305),r=i(9274),o=i(1674),s=i(2363),a=i(4116);t.minimatch=(e,t,i={})=>((0,r.assertValidPattern)(t),!(!i.nocomment&&"#"===t.charAt(0))&&new k(t,i).match(e));const c=/^\*+([^+@!?*[(]*)$/,l=e=>t=>!t.startsWith(".")&&t.endsWith(e),u=e=>t=>t.endsWith(e),h=e=>(e=e.toLowerCase(),t=>!t.startsWith(".")&&t.toLowerCase().endsWith(e)),d=e=>(e=e.toLowerCase(),t=>t.toLowerCase().endsWith(e)),p=/^\*+\.\*+$/,f=e=>!e.startsWith(".")&&e.includes("."),g=e=>"."!==e&&".."!==e&&e.includes("."),m=/^\.\*+$/,y=e=>"."!==e&&".."!==e&&e.startsWith("."),v=/^\*+$/,_=e=>0!==e.length&&!e.startsWith("."),b=e=>0!==e.length&&"."!==e&&".."!==e,w=/^\?+([^+@!?*[(]*)?$/,D=([e,t=""])=>{const i=R([e]);return t?(t=t.toLowerCase(),e=>i(e)&&e.toLowerCase().endsWith(t)):i},T=([e,t=""])=>{const i=E([e]);return t?(t=t.toLowerCase(),e=>i(e)&&e.toLowerCase().endsWith(t)):i},S=([e,t=""])=>{const i=E([e]);return t?e=>i(e)&&e.endsWith(t):i},C=([e,t=""])=>{const i=R([e]);return t?e=>i(e)&&e.endsWith(t):i},R=([e])=>{const t=e.length;return e=>e.length===t&&!e.startsWith(".")},E=([e])=>{const t=e.length;return e=>e.length===t&&"."!==e&&".."!==e},P="object"==typeof process&&process?"object"==typeof process.env&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix";t.Vn="win32"===P?"\\":"/",t.minimatch.sep=t.Vn,t.ZN=Symbol("globstar **"),t.minimatch.GLOBSTAR=t.ZN,t.pb=(e,i={})=>n=>(0,t.minimatch)(n,e,i),t.minimatch.filter=t.pb;const x=(e,t={})=>Object.assign({},e,t);t.NT=e=>{if(!e||"object"!=typeof e||!Object.keys(e).length)return t.minimatch;const i=t.minimatch;return Object.assign((t,n,r={})=>i(t,n,x(e,r)),{Minimatch:class extends i.Minimatch{constructor(t,i={}){super(t,x(e,i))}static defaults(t){return i.defaults(x(e,t)).Minimatch}},AST:class extends i.AST{constructor(t,i,n={}){super(t,i,x(e,n))}static fromGlob(t,n={}){return i.AST.fromGlob(t,x(e,n))}},unescape:(t,n={})=>i.unescape(t,x(e,n)),escape:(t,n={})=>i.escape(t,x(e,n)),filter:(t,n={})=>i.filter(t,x(e,n)),defaults:t=>i.defaults(x(e,t)),makeRe:(t,n={})=>i.makeRe(t,x(e,n)),braceExpand:(t,n={})=>i.braceExpand(t,x(e,n)),match:(t,n,r={})=>i.match(t,n,x(e,r)),sep:i.sep,GLOBSTAR:t.ZN})},t.minimatch.defaults=t.NT,t.KA=(e,t={})=>((0,r.assertValidPattern)(e),t.nobrace||!/\{(?:(?!\{).)*\}/.test(e)?[e]:(0,n.expand)(e,{max:t.braceExpandMax})),t.minimatch.braceExpand=t.KA,t.AC=(e,t={})=>new k(e,t).makeRe(),t.minimatch.makeRe=t.AC,t.YW=(e,t,i={})=>{const n=new k(t,i);return e=e.filter(e=>n.match(e)),n.options.nonull&&!e.length&&e.push(t),e},t.minimatch.match=t.YW;const O=/[?*]|[+@!]\(.*?\)|\[|\]/;class k{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;maxGlobstarRecursion;regexp;constructor(e,t={}){(0,r.assertValidPattern)(e),t=t||{},this.options=t,this.maxGlobstarRecursion=t.maxGlobstarRecursion??200,this.pattern=e,this.platform=t.platform||P,this.isWindows="win32"===this.platform,this.windowsPathsNoEscape=!!t.windowsPathsNoEscape||!1===t.allowWindowsEscape,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!t.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!t.nonegate,this.comment=!1,this.empty=!1,this.partial=!!t.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=void 0!==t.windowsNoMagicRoot?t.windowsNoMagicRoot:!(!this.isWindows||!this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(const e of this.set)for(const t of e)if("string"!=typeof t)return!0;return!1}debug(...e){}make(){const e=this.pattern,t=this.options;if(!t.nocomment&&"#"===e.charAt(0))return void(this.comment=!0);if(!e)return void(this.empty=!0);this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],t.debug&&(this.debug=(...e)=>console.error(...e)),this.debug(this.pattern,this.globSet);const i=this.globSet.map(e=>this.slashSplit(e));this.globParts=this.preprocess(i),this.debug(this.pattern,this.globParts);let n=this.globParts.map((e,t,i)=>{if(this.isWindows&&this.windowsNoMagicRoot){const t=!(""!==e[0]||""!==e[1]||"?"!==e[2]&&O.test(e[2])||O.test(e[3])),i=/^[a-z]:/i.test(e[0]);if(t)return[...e.slice(0,4),...e.slice(4).map(e=>this.parse(e))];if(i)return[e[0],...e.slice(1).map(e=>this.parse(e))]}return e.map(e=>this.parse(e))});if(this.debug(this.pattern,n),this.set=n.filter(e=>-1===e.indexOf(!1)),this.isWindows)for(let e=0;e<this.set.length;e++){const t=this.set[e];""===t[0]&&""===t[1]&&"?"===this.globParts[e][2]&&"string"==typeof t[3]&&/^[a-z]:$/i.test(t[3])&&(t[2]="?")}this.debug(this.pattern,this.set)}preprocess(e){if(this.options.noglobstar)for(const t of e)for(let e=0;e<t.length;e++)"**"===t[e]&&(t[e]="*");const{optimizationLevel:t=1}=this.options;return t>=2?(e=this.firstPhasePreProcess(e),e=this.secondPhasePreProcess(e)):e=t>=1?this.levelOneOptimize(e):this.adjascentGlobstarOptimize(e),e}adjascentGlobstarOptimize(e){return e.map(e=>{let t=-1;for(;-1!==(t=e.indexOf("**",t+1));){let i=t;for(;"**"===e[i+1];)i++;i!==t&&e.splice(t,i-t)}return e})}levelOneOptimize(e){return e.map(e=>0===(e=e.reduce((e,t)=>{const i=e[e.length-1];return"**"===t&&"**"===i?e:".."===t&&i&&".."!==i&&"."!==i&&"**"!==i?(e.pop(),e):(e.push(t),e)},[])).length?[""]:e)}levelTwoFileOptimize(e){Array.isArray(e)||(e=this.slashSplit(e));let t=!1;do{if(t=!1,!this.preserveMultipleSlashes){for(let i=1;i<e.length-1;i++){const n=e[i];1===i&&""===n&&""===e[0]||"."!==n&&""!==n||(t=!0,e.splice(i,1),i--)}"."!==e[0]||2!==e.length||"."!==e[1]&&""!==e[1]||(t=!0,e.pop())}let i=0;for(;-1!==(i=e.indexOf("..",i+1));){const n=e[i-1];!n||"."===n||".."===n||"**"===n||this.isWindows&&/^[a-z]:$/i.test(n)||(t=!0,e.splice(i-1,2),i-=2)}}while(t);return 0===e.length?[""]:e}firstPhasePreProcess(e){let t=!1;do{t=!1;for(let i of e){let n=-1;for(;-1!==(n=i.indexOf("**",n+1));){let r=n;for(;"**"===i[r+1];)r++;r>n&&i.splice(n+1,r-n);let o=i[n+1];const s=i[n+2],a=i[n+3];if(".."!==o)continue;if(!s||"."===s||".."===s||!a||"."===a||".."===a)continue;t=!0,i.splice(n,1);const c=i.slice(0);c[n]="**",e.push(c),n--}if(!this.preserveMultipleSlashes){for(let e=1;e<i.length-1;e++){const n=i[e];1===e&&""===n&&""===i[0]||"."!==n&&""!==n||(t=!0,i.splice(e,1),e--)}"."!==i[0]||2!==i.length||"."!==i[1]&&""!==i[1]||(t=!0,i.pop())}let r=0;for(;-1!==(r=i.indexOf("..",r+1));){const e=i[r-1];if(e&&"."!==e&&".."!==e&&"**"!==e){t=!0;const e=1===r&&"**"===i[r+1]?["."]:[];i.splice(r-1,2,...e),0===i.length&&i.push(""),r-=2}}}}while(t);return e}secondPhasePreProcess(e){for(let t=0;t<e.length-1;t++)for(let i=t+1;i<e.length;i++){const n=this.partsMatch(e[t],e[i],!this.preserveMultipleSlashes);if(n){e[t]=[],e[i]=n;break}}return e.filter(e=>e.length)}partsMatch(e,t,i=!1){let n=0,r=0,o=[],s="";for(;n<e.length&&r<t.length;)if(e[n]===t[r])o.push("b"===s?t[r]:e[n]),n++,r++;else if(i&&"**"===e[n]&&t[r]===e[n+1])o.push(e[n]),n++;else if(i&&"**"===t[r]&&e[n]===t[r+1])o.push(t[r]),r++;else if("*"!==e[n]||!t[r]||!this.options.dot&&t[r].startsWith(".")||"**"===t[r]){if("*"!==t[r]||!e[n]||!this.options.dot&&e[n].startsWith(".")||"**"===e[n])return!1;if("a"===s)return!1;s="b",o.push(t[r]),n++,r++}else{if("b"===s)return!1;s="a",o.push(e[n]),n++,r++}return e.length===t.length&&o}parseNegate(){if(this.nonegate)return;const e=this.pattern;let t=!1,i=0;for(let n=0;n<e.length&&"!"===e.charAt(n);n++)t=!t,i++;i&&(this.pattern=e.slice(i)),this.negate=t}matchOne(e,i,n=!1){let r=0,o=0;if(this.isWindows){const t="string"==typeof e[0]&&/^[a-z]:$/i.test(e[0]),n=!t&&""===e[0]&&""===e[1]&&"?"===e[2]&&/^[a-z]:$/i.test(e[3]),s="string"==typeof i[0]&&/^[a-z]:$/i.test(i[0]),a=n?3:t?0:void 0,c=!s&&""===i[0]&&""===i[1]&&"?"===i[2]&&"string"==typeof i[3]&&/^[a-z]:$/i.test(i[3])?3:s?0:void 0;if("number"==typeof a&&"number"==typeof c){const[t,n]=[e[a],i[c]];t.toLowerCase()===n.toLowerCase()&&(i[c]=t,o=c,r=a)}}const{optimizationLevel:s=1}=this.options;return s>=2&&(e=this.levelTwoFileOptimize(e)),i.includes(t.ZN)?this.#ye(e,i,n,r,o):this.#ve(e,i,n,r,o)}#ye(e,i,n,r,o){const s=i.indexOf(t.ZN,o),a=i.lastIndexOf(t.ZN),[c,l,u]=n?[i.slice(o,s),i.slice(s+1),[]]:[i.slice(o,s),i.slice(s+1,a),i.slice(a+1)];if(c.length){const t=e.slice(r,r+c.length);if(!this.#ve(t,c,n,0,0))return!1;r+=c.length,o+=c.length}let h=0;if(u.length){if(u.length+r>e.length)return!1;let t=e.length-u.length;if(this.#ve(e,u,n,t,0))h=u.length;else{if(""!==e[e.length-1]||r+u.length===e.length)return!1;if(t--,!this.#ve(e,u,n,t,0))return!1;h=u.length+1}}if(!l.length){let t=!!h;for(let i=r;i<e.length-h;i++){const n=String(e[i]);if(t=!0,"."===n||".."===n||!this.options.dot&&n.startsWith("."))return!1}return n||t}const d=[[[],0]];let p=d[0],f=0;const g=[0];for(const e of l)e===t.ZN?(g.push(f),p=[[],0],d.push(p)):(p[0].push(e),f++);let m=d.length-1;const y=e.length-h;for(const e of d)e[1]=y-(g[m--]+e[0].length);return!!this.#_e(e,d,r,0,n,0,!!h)}#_e(e,t,i,n,r,o,s){const a=t[n];if(!a){for(let t=i;t<e.length;t++){s=!0;const i=e[t];if("."===i||".."===i||!this.options.dot&&i.startsWith("."))return!1}return s}const[c,l]=a;for(;i<=l;){if(this.#ve(e.slice(0,i+c.length),c,r,i,0)&&o<this.maxGlobstarRecursion){const a=this.#_e(e,t,i+c.length,n+1,r,o+1,s);if(!1!==a)return a}const a=e[i];if("."===a||".."===a||!this.options.dot&&a.startsWith("."))return!1;i++}return r||null}#ve(e,i,n,r,o){let s,a,c,l;for(s=r,a=o,l=e.length,c=i.length;s<l&&a<c;s++,a++){this.debug("matchOne loop");let n,r=i[a],o=e[s];if(this.debug(i,r,o),!1===r||r===t.ZN)return!1;if("string"==typeof r?(n=o===r,this.debug("string match",r,o,n)):(n=r.test(o),this.debug("pattern match",r,o,n)),!n)return!1}if(s===l&&a===c)return!0;if(s===l)return n;if(a===c)return s===l-1&&""===e[s];throw new Error("wtf?")}braceExpand(){return(0,t.KA)(this.pattern,this.options)}parse(e){(0,r.assertValidPattern)(e);const i=this.options;if("**"===e)return t.ZN;if(""===e)return"";let n,s=null;(n=e.match(v))?s=i.dot?b:_:(n=e.match(c))?s=(i.nocase?i.dot?d:h:i.dot?u:l)(n[1]):(n=e.match(w))?s=(i.nocase?i.dot?T:D:i.dot?S:C)(n):(n=e.match(p))?s=i.dot?g:f:(n=e.match(m))&&(s=y);const a=o.AST.fromGlob(e,this.options).toMMPattern();return s&&"object"==typeof a&&Reflect.defineProperty(a,"test",{value:s}),a}makeRe(){if(this.regexp||!1===this.regexp)return this.regexp;const e=this.set;if(!e.length)return this.regexp=!1,this.regexp;const i=this.options,n=i.noglobstar?"[^/]*?":i.dot?"(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?":"(?:(?!(?:\\/|^)\\.).)*?",r=new Set(i.nocase?["i"]:[]);let o=e.map(e=>{const i=e.map(e=>{if(e instanceof RegExp)for(const t of e.flags.split(""))r.add(t);return"string"==typeof e?e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"):e===t.ZN?t.ZN:e._src});i.forEach((e,r)=>{const o=i[r+1],s=i[r-1];e===t.ZN&&s!==t.ZN&&(void 0===s?void 0!==o&&o!==t.ZN?i[r+1]="(?:\\/|"+n+"\\/)?"+o:i[r]=n:void 0===o?i[r-1]=s+"(?:\\/|\\/"+n+")?":o!==t.ZN&&(i[r-1]=s+"(?:\\/|\\/"+n+"\\/)"+o,i[r+1]=t.ZN))});const o=i.filter(e=>e!==t.ZN);if(this.partial&&o.length>=1){const e=[];for(let t=1;t<=o.length;t++)e.push(o.slice(0,t).join("/"));return"(?:"+e.join("|")+")"}return o.join("/")}).join("|");const[s,a]=e.length>1?["(?:",")"]:["",""];o="^"+s+o+a+"$",this.partial&&(o="^(?:\\/|"+s+o.slice(1,-1)+a+")$"),this.negate&&(o="^(?!"+o+").+$");try{this.regexp=new RegExp(o,[...r].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(e){return this.preserveMultipleSlashes?e.split("/"):this.isWindows&&/^\/\/[^/]+/.test(e)?["",...e.split(/\/+/)]:e.split(/\/+/)}match(e,t=this.partial){if(this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return""===e;if("/"===e&&t)return!0;const i=this.options;this.isWindows&&(e=e.split("\\").join("/"));const n=this.slashSplit(e);this.debug(this.pattern,"split",n);const r=this.set;this.debug(this.pattern,"set",r);let o=n[n.length-1];if(!o)for(let e=n.length-2;!o&&e>=0;e--)o=n[e];for(const e of r){let r=n;if(i.matchBase&&1===e.length&&(r=[o]),this.matchOne(r,e,t))return!!i.flipNegate||!this.negate}return!i.flipNegate&&this.negate}static defaults(e){return t.minimatch.defaults(e).Minimatch}}i(1674),i(2363),i(4116);t.minimatch.AST=o.AST,t.minimatch.Minimatch=k,t.minimatch.escape=s.escape,t.minimatch.unescape=a.unescape},4116(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.unescape=void 0,t.unescape=(e,{windowsPathsNoEscape:t=!1,magicalBraces:i=!0}={})=>i?t?e.replace(/\[([^/\\])\]/g,"$1"):e.replace(/((?!\\).|^)\[([^/\\])\]/g,"$1$2").replace(/\\([^/])/g,"$1"):t?e.replace(/\[([^/\\{}])\]/g,"$1"):e.replace(/((?!\\).|^)\[([^/\\{}])\]/g,"$1$2").replace(/\\([^/{}])/g,"$1")},1431(e,t){"use strict";t.debounce=function(e,t,i){var n=(i||{}).atBegin;return function(e,t,i){var n,r=i||{},o=r.noTrailing,s=void 0!==o&&o,a=r.noLeading,c=void 0!==a&&a,l=r.debounceMode,u=void 0===l?void 0:l,h=!1,d=0;function p(){n&&clearTimeout(n)}function f(){for(var i=arguments.length,r=new Array(i),o=0;o<i;o++)r[o]=arguments[o];var a=this,l=Date.now()-d;function f(){d=Date.now(),t.apply(a,r)}function g(){n=void 0}h||(c||!u||n||f(),p(),void 0===u&&l>e?c?(d=Date.now(),s||(n=setTimeout(u?g:f,e))):f():!0!==s&&(n=setTimeout(u?g:f,void 0===u?e-l:e)))}return f.cancel=function(e){var t=(e||{}).upcomingOnly,i=void 0!==t&&t;p(),h=!i},f}(e,t,{debounceMode:!1!==(void 0!==n&&n)})}},5172(e,t,i){"use strict";i.d(t,{TextDocument:()=>r});class n{constructor(e,t,i,n){this._uri=e,this._languageId=t,this._version=i,this._content=n,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){const t=this.offsetAt(e.start),i=this.offsetAt(e.end);return this._content.substring(t,i)}return this._content}update(e,t){for(const t of e)if(n.isIncremental(t)){const e=c(t.range),i=this.offsetAt(e.start),n=this.offsetAt(e.end);this._content=this._content.substring(0,i)+t.text+this._content.substring(n,this._content.length);const r=Math.max(e.start.line,0),o=Math.max(e.end.line,0);let a=this._lineOffsets;const l=s(t.text,!1,i);if(o-r===l.length)for(let e=0,t=l.length;e<t;e++)a[e+r+1]=l[e];else l.length<1e4?a.splice(r+1,o-r,...l):this._lineOffsets=a=a.slice(0,r+1).concat(l,a.slice(o+1));const u=t.text.length-(n-i);if(0!==u)for(let e=r+1+l.length,t=a.length;e<t;e++)a[e]=a[e]+u}else{if(!n.isFull(t))throw new Error("Unknown change event received");this._content=t.text,this._lineOffsets=void 0}this._version=t}getLineOffsets(){return void 0===this._lineOffsets&&(this._lineOffsets=s(this._content,!0)),this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);const t=this.getLineOffsets();let i=0,n=t.length;if(0===n)return{line:0,character:e};for(;i<n;){const r=Math.floor((i+n)/2);t[r]>e?n=r:i=r+1}const r=i-1;return{line:r,character:(e=this.ensureBeforeEOL(e,t[r]))-t[r]}}offsetAt(e){const t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;const i=t[e.line];if(e.character<=0)return i;const n=e.line+1<t.length?t[e.line+1]:this._content.length,r=Math.min(i+e.character,n);return this.ensureBeforeEOL(r,i)}ensureBeforeEOL(e,t){for(;e>t&&a(this._content.charCodeAt(e-1));)e--;return e}get lineCount(){return this.getLineOffsets().length}static isIncremental(e){const t=e;return null!=t&&"string"==typeof t.text&&void 0!==t.range&&(void 0===t.rangeLength||"number"==typeof t.rangeLength)}static isFull(e){const t=e;return null!=t&&"string"==typeof t.text&&void 0===t.range&&void 0===t.rangeLength}}var r;function o(e,t){if(e.length<=1)return e;const i=e.length/2|0,n=e.slice(0,i),r=e.slice(i);o(n,t),o(r,t);let s=0,a=0,c=0;for(;s<n.length&&a<r.length;){const i=t(n[s],r[a]);e[c++]=i<=0?n[s++]:r[a++]}for(;s<n.length;)e[c++]=n[s++];for(;a<r.length;)e[c++]=r[a++];return e}function s(e,t,i=0){const n=t?[i]:[];for(let t=0;t<e.length;t++){const r=e.charCodeAt(t);a(r)&&(13===r&&t+1<e.length&&10===e.charCodeAt(t+1)&&t++,n.push(i+t+1))}return n}function a(e){return 13===e||10===e}function c(e){const t=e.start,i=e.end;return t.line>i.line||t.line===i.line&&t.character>i.character?{start:i,end:t}:e}function l(e){const t=c(e.range);return t!==e.range?{newText:e.newText,range:t}:e}!function(e){e.create=function(e,t,i,r){return new n(e,t,i,r)},e.update=function(e,t,i){if(e instanceof n)return e.update(t,i),e;throw new Error("TextDocument.update: document must be created by TextDocument.create")},e.applyEdits=function(e,t){const i=e.getText(),n=o(t.map(l),(e,t)=>{const i=e.range.start.line-t.range.start.line;return 0===i?e.range.start.character-t.range.start.character:i});let r=0;const s=[];for(const t of n){const n=e.offsetAt(t.range.start);if(n<r)throw new Error("Overlapping edit");n>r&&s.push(i.substring(r,n)),t.newText.length&&s.push(t.newText),r=e.offsetAt(t.range.end)}return s.push(i.substr(r)),s.join("")}}(r||(r={}))},6203(e,t,i){"use strict";var n,r,o,s,a,c,l,u,h,d,p,f,g,m,y,v,_,b,w,D,T,S,C,R,E,P,x,O,k,N,A,M,I,q,j,F,L,W,U,B,$,z,H,G,V,K,Y,X,J,Q,Z,ee,te,ie,ne,re,oe,se,ae,ce,le,ue,he,de,pe,fe,ge,me,ye,ve,_e,be,we,De,Te,Se,Ce,Re,Ee,Pe,xe,Oe,ke,Ne;i.r(t),i.d(t,{AnnotatedTextEdit:()=>C,ApplyKind:()=>z,ChangeAnnotation:()=>T,ChangeAnnotationIdentifier:()=>S,CodeAction:()=>le,CodeActionContext:()=>ae,CodeActionKind:()=>oe,CodeActionTag:()=>ce,CodeActionTriggerKind:()=>se,CodeDescription:()=>_,CodeLens:()=>ue,Color:()=>h,ColorInformation:()=>d,ColorPresentation:()=>p,Command:()=>w,CompletionItem:()=>G,CompletionItemKind:()=>L,CompletionItemLabelDetails:()=>H,CompletionItemTag:()=>U,CompletionList:()=>V,CreateFile:()=>E,DeleteFile:()=>x,Diagnostic:()=>b,DiagnosticRelatedInformation:()=>m,DiagnosticSeverity:()=>y,DiagnosticTag:()=>v,DocumentHighlight:()=>Z,DocumentHighlightKind:()=>Q,DocumentLink:()=>de,DocumentSymbol:()=>re,DocumentUri:()=>n,FoldingRange:()=>g,FoldingRangeKind:()=>f,FormattingOptions:()=>he,Hover:()=>Y,InlayHint:()=>Te,InlayHintKind:()=>we,InlayHintLabelPart:()=>De,InlineCompletionContext:()=>xe,InlineCompletionItem:()=>Ce,InlineCompletionList:()=>Re,InlineCompletionTriggerKind:()=>Ee,InlineValueContext:()=>be,InlineValueEvaluatableExpression:()=>_e,InlineValueText:()=>ye,InlineValueVariableLookup:()=>ve,InsertReplaceEdit:()=>B,InsertTextFormat:()=>W,InsertTextMode:()=>$,LanguageKind:()=>I,Location:()=>l,LocationLink:()=>u,MarkedString:()=>K,MarkupContent:()=>F,MarkupKind:()=>j,OptionalVersionedTextDocumentIdentifier:()=>M,ParameterInformation:()=>X,Position:()=>a,Range:()=>c,RenameFile:()=>P,SelectedCompletionInfo:()=>Pe,SelectionRange:()=>pe,SemanticTokenModifiers:()=>ge,SemanticTokenTypes:()=>fe,SemanticTokens:()=>me,SignatureInformation:()=>J,SnippetTextEdit:()=>k,StringValue:()=>Se,SymbolInformation:()=>ie,SymbolKind:()=>ee,SymbolTag:()=>te,TextDocument:()=>ke,TextDocumentEdit:()=>R,TextDocumentIdentifier:()=>N,TextDocumentItem:()=>q,TextEdit:()=>D,URI:()=>r,VersionedTextDocumentIdentifier:()=>A,WorkspaceChange:()=>Ie,WorkspaceEdit:()=>O,WorkspaceFolder:()=>Oe,WorkspaceSymbol:()=>ne,integer:()=>o,uinteger:()=>s}),function(e){e.is=function(e){return"string"==typeof e}}(n||(n={})),function(e){e.is=function(e){return"string"==typeof e}}(r||(r={})),function(e){e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647,e.is=function(t){return"number"==typeof t&&e.MIN_VALUE<=t&&t<=e.MAX_VALUE}}(o||(o={})),function(e){e.MIN_VALUE=0,e.MAX_VALUE=2147483647,e.is=function(t){return"number"==typeof t&&e.MIN_VALUE<=t&&t<=e.MAX_VALUE}}(s||(s={})),function(e){e.create=function(e,t){return e===Number.MAX_VALUE&&(e=s.MAX_VALUE),t===Number.MAX_VALUE&&(t=s.MAX_VALUE),{line:e,character:t}},e.is=function(e){const t=e;return Ne.objectLiteral(t)&&Ne.uinteger(t.line)&&Ne.uinteger(t.character)}}(a||(a={})),function(e){e.create=function(e,t,i,n){if(Ne.uinteger(e)&&Ne.uinteger(t)&&Ne.uinteger(i)&&Ne.uinteger(n))return{start:a.create(e,t),end:a.create(i,n)};if(a.is(e)&&a.is(t))return{start:e,end:t};throw new Error(`Range#create called with invalid arguments[${e}, ${t}, ${i}, ${n}]`)},e.is=function(e){const t=e;return Ne.objectLiteral(t)&&a.is(t.start)&&a.is(t.end)}}(c||(c={})),function(e){e.create=function(e,t){return{uri:e,range:t}},e.is=function(e){const t=e;return Ne.objectLiteral(t)&&c.is(t.range)&&(Ne.string(t.uri)||Ne.undefined(t.uri))}}(l||(l={})),function(e){e.create=function(e,t,i,n){return{targetUri:e,targetRange:t,targetSelectionRange:i,originSelectionRange:n}},e.is=function(e){const t=e;return Ne.objectLiteral(t)&&c.is(t.targetRange)&&Ne.string(t.targetUri)&&c.is(t.targetSelectionRange)&&(c.is(t.originSelectionRange)||Ne.undefined(t.originSelectionRange))}}(u||(u={})),function(e){e.create=function(e,t,i,n){return{red:e,green:t,blue:i,alpha:n}},e.is=function(e){const t=e;return Ne.objectLiteral(t)&&Ne.numberRange(t.red,0,1)&&Ne.numberRange(t.green,0,1)&&Ne.numberRange(t.blue,0,1)&&Ne.numberRange(t.alpha,0,1)}}(h||(h={})),function(e){e.create=function(e,t){return{range:e,color:t}},e.is=function(e){const t=e;return Ne.objectLiteral(t)&&c.is(t.range)&&h.is(t.color)}}(d||(d={})),function(e){e.create=function(e,t,i){return{label:e,textEdit:t,additionalTextEdits:i}},e.is=function(e){const t=e;return Ne.objectLiteral(t)&&Ne.string(t.label)&&(Ne.undefined(t.textEdit)||D.is(t))&&(Ne.undefined(t.additionalTextEdits)||Ne.typedArray(t.additionalTextEdits,D.is))}}(p||(p={})),function(e){e.Comment="comment",e.Imports="imports",e.Region="region"}(f||(f={})),function(e){e.create=function(e,t,i,n,r,o){const s={startLine:e,endLine:t};return Ne.defined(i)&&(s.startCharacter=i),Ne.defined(n)&&(s.endCharacter=n),Ne.defined(r)&&(s.kind=r),Ne.defined(o)&&(s.collapsedText=o),s},e.is=function(e){const t=e;return Ne.objectLiteral(t)&&Ne.uinteger(t.startLine)&&Ne.uinteger(t.startLine)&&(Ne.undefined(t.startCharacter)||Ne.uinteger(t.startCharacter))&&(Ne.undefined(t.endCharacter)||Ne.uinteger(t.endCharacter))&&(Ne.undefined(t.kind)||Ne.string(t.kind))}}(g||(g={})),function(e){e.create=function(e,t){return{location:e,message:t}},e.is=function(e){const t=e;return Ne.defined(t)&&l.is(t.location)&&Ne.string(t.message)}}(m||(m={})),function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4}(y||(y={})),function(e){e.Unnecessary=1,e.Deprecated=2}(v||(v={})),function(e){e.is=function(e){const t=e;return Ne.objectLiteral(t)&&Ne.string(t.href)}}(_||(_={})),function(e){e.create=function(e,t,i,n,r,o){const s={range:e,message:t};return Ne.defined(i)&&(s.severity=i),Ne.defined(n)&&(s.code=n),Ne.defined(r)&&(s.source=r),Ne.defined(o)&&(s.relatedInformation=o),s},e.is=function(e){var t;const i=e;return Ne.defined(i)&&c.is(i.range)&&(Ne.string(i.message)||F.is(i.message))&&(Ne.number(i.severity)||Ne.undefined(i.severity))&&(Ne.integer(i.code)||Ne.string(i.code)||Ne.undefined(i.code))&&(Ne.undefined(i.codeDescription)||Ne.string(null===(t=i.codeDescription)||void 0===t?void 0:t.href))&&(Ne.string(i.source)||Ne.undefined(i.source))&&(Ne.undefined(i.relatedInformation)||Ne.typedArray(i.relatedInformation,m.is))},e.is3_17=function(e){return Ne.string(e.message)},e.getMessageString=function(e){if(Ne.string(e.message))return e.message;if(F.is(e.message))return e.message.value;throw new Error("Unknown message type "+typeof e.message)}}(b||(b={})),function(e){e.create=function(e,t,...i){const n={title:e,command:t};return Ne.defined(i)&&i.length>0&&(n.arguments=i),n},e.is=function(e){const t=e;return Ne.defined(t)&&Ne.string(t.title)&&(void 0===t.tooltip||Ne.string(t.tooltip))&&Ne.string(t.command)}}(w||(w={})),function(e){e.replace=function(e,t){return{range:e,newText:t}},e.insert=function(e,t){return{range:{start:e,end:e},newText:t}},e.del=function(e){return{range:e,newText:""}},e.is=function(e){const t=e;return Ne.objectLiteral(t)&&Ne.string(t.newText)&&c.is(t.range)}}(D||(D={})),function(e){e.create=function(e,t,i){const n={label:e};return void 0!==t&&(n.needsConfirmation=t),void 0!==i&&(n.description=i),n},e.is=function(e){const t=e;return Ne.objectLiteral(t)&&Ne.string(t.label)&&(Ne.boolean(t.needsConfirmation)||void 0===t.needsConfirmation)&&(Ne.string(t.description)||void 0===t.description)}}(T||(T={})),function(e){e.is=function(e){const t=e;return Ne.string(t)}}(S||(S={})),function(e){e.replace=function(e,t,i){return{range:e,newText:t,annotationId:i}},e.insert=function(e,t,i){return{range:{start:e,end:e},newText:t,annotationId:i}},e.del=function(e,t){return{range:e,newText:"",annotationId:t}},e.is=function(e){const t=e;return D.is(t)&&(T.is(t.annotationId)||S.is(t.annotationId))}}(C||(C={})),function(e){e.create=function(e,t){return{textDocument:e,edits:t}},e.is=function(e){const t=e;return Ne.defined(t)&&M.is(t.textDocument)&&Array.isArray(t.edits)}}(R||(R={})),function(e){e.create=function(e,t,i){const n={kind:"create",uri:e};return void 0===t||void 0===t.overwrite&&void 0===t.ignoreIfExists||(n.options=t),void 0!==i&&(n.annotationId=i),n},e.is=function(e){const t=e;return t&&"create"===t.kind&&Ne.string(t.uri)&&(void 0===t.options||(void 0===t.options.overwrite||Ne.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||Ne.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||S.is(t.annotationId))}}(E||(E={})),function(e){e.create=function(e,t,i,n){const r={kind:"rename",oldUri:e,newUri:t};return void 0===i||void 0===i.overwrite&&void 0===i.ignoreIfExists||(r.options=i),void 0!==n&&(r.annotationId=n),r},e.is=function(e){const t=e;return t&&"rename"===t.kind&&Ne.string(t.oldUri)&&Ne.string(t.newUri)&&(void 0===t.options||(void 0===t.options.overwrite||Ne.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||Ne.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||S.is(t.annotationId))}}(P||(P={})),function(e){e.create=function(e,t,i){const n={kind:"delete",uri:e};return void 0===t||void 0===t.recursive&&void 0===t.ignoreIfNotExists||(n.options=t),void 0!==i&&(n.annotationId=i),n},e.is=function(e){const t=e;return t&&"delete"===t.kind&&Ne.string(t.uri)&&(void 0===t.options||(void 0===t.options.recursive||Ne.boolean(t.options.recursive))&&(void 0===t.options.ignoreIfNotExists||Ne.boolean(t.options.ignoreIfNotExists)))&&(void 0===t.annotationId||S.is(t.annotationId))}}(x||(x={})),function(e){e.is=function(e){const t=e;return t&&(void 0!==t.changes||void 0!==t.documentChanges)&&(void 0===t.documentChanges||t.documentChanges.every(e=>Ne.string(e.kind)?E.is(e)||P.is(e)||x.is(e):R.is(e)))}}(O||(O={}));class Ae{constructor(e,t){this.edits=e,this.changeAnnotations=t}insert(e,t,i){let n,r;if(void 0===i?n=D.insert(e,t):S.is(i)?(r=i,n=C.insert(e,t,i)):(this.assertChangeAnnotations(this.changeAnnotations),r=this.changeAnnotations.manage(i),n=C.insert(e,t,r)),this.edits.push(n),void 0!==r)return r}replace(e,t,i){let n,r;if(void 0===i?n=D.replace(e,t):S.is(i)?(r=i,n=C.replace(e,t,i)):(this.assertChangeAnnotations(this.changeAnnotations),r=this.changeAnnotations.manage(i),n=C.replace(e,t,r)),this.edits.push(n),void 0!==r)return r}delete(e,t){let i,n;if(void 0===t?i=D.del(e):S.is(t)?(n=t,i=C.del(e,t)):(this.assertChangeAnnotations(this.changeAnnotations),n=this.changeAnnotations.manage(t),i=C.del(e,n)),this.edits.push(i),void 0!==n)return n}add(e){this.edits.push(e)}all(){return this.edits}clear(){this.edits.splice(0,this.edits.length)}assertChangeAnnotations(e){if(void 0===e)throw new Error("Text edit change is not configured to manage change annotations.")}}!function(e){e.is=function(e){const t=e;return Ne.objectLiteral(t)&&c.is(t.range)&&Se.isSnippet(t.snippet)&&(void 0===t.annotationId||T.is(t.annotationId)||S.is(t.annotationId))}}(k||(k={}));class Me{constructor(e){this._annotations=void 0===e?Object.create(null):e,this._counter=0,this._size=0}all(){return this._annotations}get size(){return this._size}manage(e,t){let i;if(S.is(e)?i=e:(i=this.nextId(),t=e),void 0!==this._annotations[i])throw new Error(`Id ${i} is already in use.`);if(void 0===t)throw new Error(`No annotation provided for id ${i}`);return this._annotations[i]=t,this._size++,i}nextId(){return this._counter++,this._counter.toString()}}class Ie{constructor(e){this._textEditChanges=Object.create(null),void 0!==e?(this._workspaceEdit=e,e.documentChanges?(this._changeAnnotations=new Me(e.changeAnnotations),e.changeAnnotations=this._changeAnnotations.all(),e.documentChanges.forEach(e=>{if(R.is(e)){const t=new Ae(e.edits,this._changeAnnotations);this._textEditChanges[e.textDocument.uri]=t}})):e.changes&&Object.keys(e.changes).forEach(t=>{const i=new Ae(e.changes[t]);this._textEditChanges[t]=i})):this._workspaceEdit={}}get edit(){return this.initDocumentChanges(),void 0!==this._changeAnnotations&&(0===this._changeAnnotations.size?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit}getTextEditChange(e){if(M.is(e)){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");const t={uri:e.uri,version:e.version};let i=this._textEditChanges[t.uri];if(!i){const e=[],n={textDocument:t,edits:e};this._workspaceEdit.documentChanges.push(n),i=new Ae(e,this._changeAnnotations),this._textEditChanges[t.uri]=i}return i}{if(this.initChanges(),void 0===this._workspaceEdit.changes)throw new Error("Workspace edit is not configured for normal text edit changes.");let t=this._textEditChanges[e];if(!t){const i=[];this._workspaceEdit.changes[e]=i,t=new Ae(i),this._textEditChanges[e]=t}return t}}initDocumentChanges(){void 0===this._workspaceEdit.documentChanges&&void 0===this._workspaceEdit.changes&&(this._changeAnnotations=new Me,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())}initChanges(){void 0===this._workspaceEdit.documentChanges&&void 0===this._workspaceEdit.changes&&(this._workspaceEdit.changes=Object.create(null))}createFile(e,t,i){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");let n,r,o;if(T.is(t)||S.is(t)?n=t:i=t,void 0===n?r=E.create(e,i):(o=S.is(n)?n:this._changeAnnotations.manage(n),r=E.create(e,i,o)),this._workspaceEdit.documentChanges.push(r),void 0!==o)return o}renameFile(e,t,i,n){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");let r,o,s;if(T.is(i)||S.is(i)?r=i:n=i,void 0===r?o=P.create(e,t,n):(s=S.is(r)?r:this._changeAnnotations.manage(r),o=P.create(e,t,n,s)),this._workspaceEdit.documentChanges.push(o),void 0!==s)return s}deleteFile(e,t,i){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");let n,r,o;if(T.is(t)||S.is(t)?n=t:i=t,void 0===n?r=x.create(e,i):(o=S.is(n)?n:this._changeAnnotations.manage(n),r=x.create(e,i,o)),this._workspaceEdit.documentChanges.push(r),void 0!==o)return o}}!function(e){e.create=function(e){return{uri:e}},e.is=function(e){const t=e;return Ne.defined(t)&&Ne.string(t.uri)}}(N||(N={})),function(e){e.create=function(e,t){return{uri:e,version:t}},e.is=function(e){const t=e;return Ne.defined(t)&&Ne.string(t.uri)&&Ne.integer(t.version)}}(A||(A={})),function(e){e.create=function(e,t){return{uri:e,version:t}},e.is=function(e){const t=e;return Ne.defined(t)&&Ne.string(t.uri)&&(null===t.version||Ne.integer(t.version))}}(M||(M={})),function(e){e.ABAP="abap",e.WindowsBat="bat",e.BibTeX="bibtex",e.Clojure="clojure",e.Coffeescript="coffeescript",e.C="c",e.CPP="cpp",e.CSharp="csharp",e.CSS="css",e.D="d",e.Delphi="pascal",e.Diff="diff",e.Dart="dart",e.Dockerfile="dockerfile",e.Elixir="elixir",e.Erlang="erlang",e.FSharp="fsharp",e.GitCommit="git-commit",e.GitRebase="git-rebase",e.Go="go",e.Groovy="groovy",e.Handlebars="handlebars",e.Haskell="haskell",e.HTML="html",e.Ini="ini",e.Java="java",e.JavaScript="javascript",e.JavaScriptReact="javascriptreact",e.JSON="json",e.LaTeX="latex",e.Less="less",e.Lua="lua",e.Makefile="makefile",e.Markdown="markdown",e.ObjectiveC="objective-c",e.ObjectiveCPP="objective-cpp",e.Pascal="pascal",e.Perl="perl",e.Perl6="perl6",e.PHP="php",e.Plaintext="plaintext",e.Powershell="powershell",e.Pug="jade",e.Python="python",e.R="r",e.Razor="razor",e.Ruby="ruby",e.Rust="rust",e.SCSS="scss",e.SASS="sass",e.Scala="scala",e.ShaderLab="shaderlab",e.ShellScript="shellscript",e.SQL="sql",e.Swift="swift",e.TypeScript="typescript",e.TypeScriptReact="typescriptreact",e.TeX="tex",e.VisualBasic="vb",e.XML="xml",e.XSL="xsl",e.YAML="yaml"}(I||(I={})),function(e){e.create=function(e,t,i,n){return{uri:e,languageId:t,version:i,text:n}},e.is=function(e){const t=e;return Ne.defined(t)&&Ne.string(t.uri)&&Ne.string(t.languageId)&&Ne.integer(t.version)&&Ne.string(t.text)}}(q||(q={})),function(e){e.PlainText="plaintext",e.Markdown="markdown",e.is=function(t){const i=t;return i===e.PlainText||i===e.Markdown}}(j||(j={})),function(e){e.is=function(e){const t=e;return Ne.objectLiteral(e)&&j.is(t.kind)&&Ne.string(t.value)}}(F||(F={})),function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25}(L||(L={})),function(e){e.PlainText=1,e.Snippet=2}(W||(W={})),function(e){e.Deprecated=1}(U||(U={})),function(e){e.create=function(e,t,i){return{newText:e,insert:t,replace:i}},e.is=function(e){const t=e;return t&&Ne.string(t.newText)&&c.is(t.insert)&&c.is(t.replace)}}(B||(B={})),function(e){e.asIs=1,e.adjustIndentation=2}($||($={})),function(e){e.Replace=1,e.Merge=2}(z||(z={})),function(e){e.is=function(e){const t=e;return t&&(Ne.string(t.detail)||void 0===t.detail)&&(Ne.string(t.description)||void 0===t.description)}}(H||(H={})),function(e){e.create=function(e){return{label:e}}}(G||(G={})),function(e){e.create=function(e,t){return{items:e||[],isIncomplete:!!t}}}(V||(V={})),function(e){e.fromPlainText=function(e){return e.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")},e.is=function(e){const t=e;return Ne.string(t)||Ne.objectLiteral(t)&&Ne.string(t.language)&&Ne.string(t.value)}}(K||(K={})),function(e){e.is=function(e){const t=e;return!!t&&Ne.objectLiteral(t)&&(F.is(t.contents)||K.is(t.contents)||Ne.typedArray(t.contents,K.is))&&(void 0===e.range||c.is(e.range))}}(Y||(Y={})),function(e){e.create=function(e,t){return t?{label:e,documentation:t}:{label:e}}}(X||(X={})),function(e){e.create=function(e,t,...i){const n={label:e};return Ne.defined(t)&&(n.documentation=t),Ne.defined(i)?n.parameters=i:n.parameters=[],n}}(J||(J={})),function(e){e.Text=1,e.Read=2,e.Write=3}(Q||(Q={})),function(e){e.create=function(e,t){const i={range:e};return Ne.number(t)&&(i.kind=t),i}}(Z||(Z={})),function(e){e.File=1,e.Module=2,e.Namespace=3,e.Package=4,e.Class=5,e.Method=6,e.Property=7,e.Field=8,e.Constructor=9,e.Enum=10,e.Interface=11,e.Function=12,e.Variable=13,e.Constant=14,e.String=15,e.Number=16,e.Boolean=17,e.Array=18,e.Object=19,e.Key=20,e.Null=21,e.EnumMember=22,e.Struct=23,e.Event=24,e.Operator=25,e.TypeParameter=26}(ee||(ee={})),function(e){e.Deprecated=1}(te||(te={})),function(e){e.create=function(e,t,i,n,r){const o={name:e,kind:t,location:{uri:n,range:i}};return r&&(o.containerName=r),o}}(ie||(ie={})),function(e){e.create=function(e,t,i,n){return void 0!==n?{name:e,kind:t,location:{uri:i,range:n}}:{name:e,kind:t,location:{uri:i}}}}(ne||(ne={})),function(e){e.create=function(e,t,i,n,r,o){const s={name:e,detail:t,kind:i,range:n,selectionRange:r};return void 0!==o&&(s.children=o),s},e.is=function(e){const t=e;return t&&Ne.string(t.name)&&Ne.number(t.kind)&&c.is(t.range)&&c.is(t.selectionRange)&&(void 0===t.detail||Ne.string(t.detail))&&(void 0===t.deprecated||Ne.boolean(t.deprecated))&&(void 0===t.children||Array.isArray(t.children))&&(void 0===t.tags||Array.isArray(t.tags))}}(re||(re={})),function(e){e.Empty="",e.QuickFix="quickfix",e.Refactor="refactor",e.RefactorExtract="refactor.extract",e.RefactorInline="refactor.inline",e.RefactorMove="refactor.move",e.RefactorRewrite="refactor.rewrite",e.Source="source",e.SourceOrganizeImports="source.organizeImports",e.SourceFixAll="source.fixAll",e.Notebook="notebook"}(oe||(oe={})),function(e){e.Invoked=1,e.Automatic=2}(se||(se={})),function(e){e.create=function(e,t,i){const n={diagnostics:e};return null!=t&&(n.only=t),null!=i&&(n.triggerKind=i),n},e.is=function(e){const t=e;return Ne.defined(t)&&Ne.typedArray(t.diagnostics,b.is)&&(void 0===t.only||Ne.typedArray(t.only,Ne.string))&&(void 0===t.triggerKind||t.triggerKind===se.Invoked||t.triggerKind===se.Automatic)}}(ae||(ae={})),function(e){e.LLMGenerated=1,e.is=function(t){return Ne.defined(t)&&t===e.LLMGenerated}}(ce||(ce={})),function(e){e.create=function(e,t,i){const n={title:e};let r=!0;return"string"==typeof t?(r=!1,n.kind=t):w.is(t)?n.command=t:n.edit=t,r&&void 0!==i&&(n.kind=i),n},e.is=function(e){const t=e;return t&&Ne.string(t.title)&&(void 0===t.diagnostics||Ne.typedArray(t.diagnostics,b.is))&&(void 0===t.kind||Ne.string(t.kind))&&(void 0!==t.edit||void 0!==t.command)&&(void 0===t.command||w.is(t.command))&&(void 0===t.isPreferred||Ne.boolean(t.isPreferred))&&(void 0===t.edit||O.is(t.edit))&&(void 0===t.tags||Ne.typedArray(t.tags,ce.is))}}(le||(le={})),function(e){e.create=function(e,t){const i={range:e};return Ne.defined(t)&&(i.data=t),i},e.is=function(e){const t=e;return Ne.defined(t)&&c.is(t.range)&&(Ne.undefined(t.command)||w.is(t.command))}}(ue||(ue={})),function(e){e.create=function(e,t){return{tabSize:e,insertSpaces:t}},e.is=function(e){const t=e;return Ne.defined(t)&&Ne.uinteger(t.tabSize)&&Ne.boolean(t.insertSpaces)}}(he||(he={})),function(e){e.create=function(e,t,i){return{range:e,target:t,data:i}},e.is=function(e){const t=e;return Ne.defined(t)&&c.is(t.range)&&(Ne.undefined(t.target)||Ne.string(t.target))}}(de||(de={})),function(e){e.create=function(e,t){return{range:e,parent:t}},e.is=function(t){const i=t;return Ne.objectLiteral(i)&&c.is(i.range)&&(void 0===i.parent||e.is(i.parent))}}(pe||(pe={})),function(e){e.namespace="namespace",e.type="type",e.class="class",e.enum="enum",e.interface="interface",e.struct="struct",e.typeParameter="typeParameter",e.parameter="parameter",e.variable="variable",e.property="property",e.enumMember="enumMember",e.event="event",e.function="function",e.method="method",e.macro="macro",e.keyword="keyword",e.modifier="modifier",e.comment="comment",e.string="string",e.number="number",e.regexp="regexp",e.operator="operator",e.decorator="decorator",e.label="label"}(fe||(fe={})),function(e){e.declaration="declaration",e.definition="definition",e.readonly="readonly",e.static="static",e.deprecated="deprecated",e.abstract="abstract",e.async="async",e.modification="modification",e.documentation="documentation",e.defaultLibrary="defaultLibrary"}(ge||(ge={})),function(e){e.is=function(e){const t=e;return Ne.objectLiteral(t)&&(void 0===t.resultId||"string"==typeof t.resultId)&&Array.isArray(t.data)&&(0===t.data.length||"number"==typeof t.data[0])}}(me||(me={})),function(e){e.create=function(e,t){return{range:e,text:t}},e.is=function(e){const t=e;return null!=t&&c.is(t.range)&&Ne.string(t.text)}}(ye||(ye={})),function(e){e.create=function(e,t,i){return{range:e,variableName:t,caseSensitiveLookup:i}},e.is=function(e){const t=e;return null!=t&&c.is(t.range)&&Ne.boolean(t.caseSensitiveLookup)&&(Ne.string(t.variableName)||void 0===t.variableName)}}(ve||(ve={})),function(e){e.create=function(e,t){return{range:e,expression:t}},e.is=function(e){const t=e;return null!=t&&c.is(t.range)&&(Ne.string(t.expression)||void 0===t.expression)}}(_e||(_e={})),function(e){e.create=function(e,t){return{frameId:e,stoppedLocation:t}},e.is=function(e){const t=e;return Ne.defined(t)&&c.is(e.stoppedLocation)}}(be||(be={})),function(e){e.Type=1,e.Parameter=2,e.is=function(e){return 1===e||2===e}}(we||(we={})),function(e){e.create=function(e){return{value:e}},e.is=function(e){const t=e;return Ne.objectLiteral(t)&&(void 0===t.tooltip||Ne.string(t.tooltip)||F.is(t.tooltip))&&(void 0===t.location||l.is(t.location))&&(void 0===t.command||w.is(t.command))}}(De||(De={})),function(e){e.create=function(e,t,i){const n={position:e,label:t};return void 0!==i&&(n.kind=i),n},e.is=function(e){const t=e;return Ne.objectLiteral(t)&&a.is(t.position)&&(Ne.string(t.label)||Ne.typedArray(t.label,De.is))&&(void 0===t.kind||we.is(t.kind))&&void 0===t.textEdits||Ne.typedArray(t.textEdits,D.is)&&(void 0===t.tooltip||Ne.string(t.tooltip)||F.is(t.tooltip))&&(void 0===t.paddingLeft||Ne.boolean(t.paddingLeft))&&(void 0===t.paddingRight||Ne.boolean(t.paddingRight))}}(Te||(Te={})),function(e){e.createSnippet=function(e){return{kind:"snippet",value:e}},e.isSnippet=function(e){const t=e;return Ne.objectLiteral(t)&&"snippet"===t.kind&&Ne.string(t.value)}}(Se||(Se={})),function(e){e.create=function(e,t,i,n){return{insertText:e,filterText:t,range:i,command:n}}}(Ce||(Ce={})),function(e){e.create=function(e){return{items:e}}}(Re||(Re={})),function(e){e.Invoked=1,e.Automatic=2}(Ee||(Ee={})),function(e){e.create=function(e,t){return{range:e,text:t}}}(Pe||(Pe={})),function(e){e.create=function(e,t){return{triggerKind:e,selectedCompletionInfo:t}}}(xe||(xe={})),function(e){e.is=function(e){const t=e;return Ne.objectLiteral(t)&&r.is(t.uri)&&Ne.string(t.name)}}(Oe||(Oe={})),function(e){function t(e,i){if(e.length<=1)return e;const n=e.length/2|0,r=e.slice(0,n),o=e.slice(n);t(r,i),t(o,i);let s=0,a=0,c=0;for(;s<r.length&&a<o.length;){const t=i(r[s],o[a]);e[c++]=t<=0?r[s++]:o[a++]}for(;s<r.length;)e[c++]=r[s++];for(;a<o.length;)e[c++]=o[a++];return e}e.create=function(e,t,i,n){return new qe(e,t,i,n)},e.is=function(e){const t=e;return!!(Ne.defined(t)&&Ne.string(t.uri)&&(Ne.undefined(t.languageId)||Ne.string(t.languageId))&&Ne.uinteger(t.lineCount)&&Ne.func(t.getText)&&Ne.func(t.positionAt)&&Ne.func(t.offsetAt))},e.applyEdits=function(e,i){let n=e.getText();const r=t(i,(e,t)=>{const i=e.range.start.line-t.range.start.line;return 0===i?e.range.start.character-t.range.start.character:i});let o=n.length;for(let t=r.length-1;t>=0;t--){const i=r[t],s=e.offsetAt(i.range.start),a=e.offsetAt(i.range.end);if(!(a<=o))throw new Error("Overlapping edit");n=n.substring(0,s)+i.newText+n.substring(a,n.length),o=s}return n}}(ke||(ke={}));class qe{constructor(e,t,i,n){this._uri=e,this._languageId=t,this._version=i,this._content=n,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){const t=this.offsetAt(e.start),i=this.offsetAt(e.end);return this._content.substring(t,i)}return this._content}update(e,t){this._content=e.text,this._version=t,this._lineOffsets=void 0}getLineOffsets(){if(void 0===this._lineOffsets){const e=[],t=this._content;let i=!0;for(let n=0;n<t.length;n++){i&&(e.push(n),i=!1);const r=t.charAt(n);i="\r"===r||"\n"===r,"\r"===r&&n+1<t.length&&"\n"===t.charAt(n+1)&&n++}i&&t.length>0&&e.push(t.length),this._lineOffsets=e}return this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);const t=this.getLineOffsets();let i=0,n=t.length;if(0===n)return a.create(0,e);for(;i<n;){const r=Math.floor((i+n)/2);t[r]>e?n=r:i=r+1}const r=i-1;return a.create(r,e-t[r])}offsetAt(e){const t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;const i=t[e.line],n=e.line+1<t.length?t[e.line+1]:this._content.length;return Math.max(Math.min(i+e.character,n),i)}get lineCount(){return this.getLineOffsets().length}}!function(e){const t=Object.prototype.toString;e.defined=function(e){return void 0!==e},e.undefined=function(e){return void 0===e},e.boolean=function(e){return!0===e||!1===e},e.string=function(e){return"[object String]"===t.call(e)},e.number=function(e){return"[object Number]"===t.call(e)},e.numberRange=function(e,i,n){return"[object Number]"===t.call(e)&&i<=e&&e<=n},e.integer=function(e){return"[object Number]"===t.call(e)&&-2147483648<=e&&e<=2147483647},e.uinteger=function(e){return"[object Number]"===t.call(e)&&0<=e&&e<=2147483647},e.func=function(e){return"[object Function]"===t.call(e)},e.objectLiteral=function(e){return null!==e&&"object"==typeof e},e.typedArray=function(e,t){return Array.isArray(e)&&e.every(t)}}(Ne||(Ne={})),i.d(t,["EOL",0,["\n","\r\n","\r"]])}};const t={};function i(n){const r=t[n];if(void 0!==r)return r.exports;const o=t[n]={exports:{}};return e[n].call(o.exports,o,o.exports,i),o.exports}i.d=(e,t)=>{if(Array.isArray(t))for(var n=0;n<t.length;){var r=t[n++],o=t[n++];i.o(e,r)?0===o&&n++:0===o?Object.defineProperty(e,r,{enumerable:!0,value:t[n++]}):Object.defineProperty(e,r,{enumerable:!0,get:o})}else for(var r in t)i.o(t,r)&&!i.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};let n={};(()=>{"use strict";let e=n;Object.defineProperty(e,"__esModule",{value:!0}),i(2312).ExtensionState.getInstance().connect()})();const r=exports;for(var o in n)r[o]=n[o];n.__esModule&&Object.defineProperty(r,"__esModule",{value:!0})})();
2
+ (()=>{var e={4043(e,t,i){!function(e){e.parser=function(e,t){return new r(e,t)},e.SAXParser=r,e.SAXStream=s,e.createStream=function(e,t){return new s(e,t)},e.MAX_BUFFER_LENGTH=65536;var t,n=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];function r(t,i){if(!(this instanceof r))return new r(t,i);var o=this;!function(e){for(var t=0,i=n.length;t<i;t++)e[n[t]]=""}(o),o.q=o.c="",o.bufferCheckPosition=e.MAX_BUFFER_LENGTH,o.encoding=null,o.opt=i||{},o.opt.lowercase=o.opt.lowercase||o.opt.lowercasetags,o.looseCase=o.opt.lowercase?"toLowerCase":"toUpperCase",o.opt.maxEntityCount=o.opt.maxEntityCount||512,o.opt.maxEntityDepth=o.opt.maxEntityDepth||4,o.entityCount=o.entityDepth=0,o.tags=[],o.closed=o.closedRoot=o.sawRoot=!1,o.tag=o.error=null,o.strict=!!t,o.noscript=!(!t&&!o.opt.noscript),o.state=S.BEGIN,o.strictEntities=o.opt.strictEntities,o.ENTITIES=o.strictEntities?Object.create(e.XML_ENTITIES):Object.create(e.ENTITIES),o.attribList=[],o.opt.xmlns&&(o.ns=Object.create(h)),void 0===o.opt.unquotedAttributeValues&&(o.opt.unquotedAttributeValues=!t),o.trackPosition=!1!==o.opt.position,o.trackPosition&&(o.position=o.line=o.column=0),R(o,"onready")}e.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"],Object.create||(Object.create=function(e){function t(){}return t.prototype=e,new t}),Object.keys||(Object.keys=function(e){var t=[];for(var i in e)e.hasOwnProperty(i)&&t.push(i);return t}),r.prototype={end:function(){A(this)},write:function(t){var i=this;if(this.error)throw this.error;if(i.closed)return N(i,"Cannot write after close. Assign an onready handler.");if(null===t)return A(i);"object"==typeof t&&(t=t.toString());for(var r=0,o="";o=B(t,r++),i.c=o,o;)switch(i.trackPosition&&(i.position++,"\n"===o?(i.line++,i.column=0):i.column++),i.state){case S.BEGIN:if(i.state=S.BEGIN_WHITESPACE,"\ufeff"===o)continue;U(i,o);continue;case S.BEGIN_WHITESPACE:U(i,o);continue;case S.TEXT:if(i.sawRoot&&!i.closedRoot){for(var s=r-1;o&&"<"!==o&&"&"!==o;)(o=B(t,r++))&&i.trackPosition&&(i.position++,"\n"===o?(i.line++,i.column=0):i.column++);i.textNode+=t.substring(s,r-1)}"<"!==o||i.sawRoot&&i.closedRoot&&!i.strict?(m(o)||i.sawRoot&&!i.closedRoot||M(i,"Text data outside of root node."),"&"===o?i.state=S.TEXT_ENTITY:i.textNode+=o):(i.state=S.OPEN_WAKA,i.startTagPosition=i.position);continue;case S.SCRIPT:"<"===o?i.state=S.SCRIPT_ENDING:i.script+=o;continue;case S.SCRIPT_ENDING:"/"===o?i.state=S.CLOSE_TAG:(i.script+="<"+o,i.state=S.SCRIPT);continue;case S.OPEN_WAKA:if("!"===o)i.state=S.SGML_DECL,i.sgmlDecl="";else if(m(o));else if(_(d,o))i.state=S.OPEN_TAG,i.tagName=o;else if("/"===o)i.state=S.CLOSE_TAG,i.tagName="";else if("?"===o)i.state=S.PROC_INST,i.procInstName=i.procInstBody="";else{if(M(i,"Unencoded <"),i.startTagPosition+1<i.position){var l=i.position-i.startTagPosition;o=new Array(l).join(" ")+o}i.textNode+="<"+o,i.state=S.TEXT}continue;case S.SGML_DECL:if(i.sgmlDecl+o==="--"){i.state=S.COMMENT,i.comment="",i.sgmlDecl="";continue}i.doctype&&!0!==i.doctype&&i.sgmlDecl?(i.state=S.DOCTYPE_DTD,i.doctype+="<!"+i.sgmlDecl+o,i.sgmlDecl=""):(i.sgmlDecl+o).toUpperCase()===a?(x(i,"onopencdata"),i.state=S.CDATA,i.sgmlDecl="",i.cdata=""):(i.sgmlDecl+o).toUpperCase()===c?(i.state=S.DOCTYPE,(i.doctype||i.sawRoot)&&M(i,"Inappropriately located doctype declaration"),i.doctype="",i.sgmlDecl=""):">"===o?(x(i,"onsgmldeclaration",i.sgmlDecl),i.sgmlDecl="",i.state=S.TEXT):y(o)?(i.state=S.SGML_DECL_QUOTED,i.sgmlDecl+=o):i.sgmlDecl+=o;continue;case S.SGML_DECL_QUOTED:o===i.q&&(i.state=S.SGML_DECL,i.q=""),i.sgmlDecl+=o;continue;case S.DOCTYPE:">"===o?(i.state=S.TEXT,x(i,"ondoctype",i.doctype),i.doctype=!0):(i.doctype+=o,"["===o?i.state=S.DOCTYPE_DTD:y(o)&&(i.state=S.DOCTYPE_QUOTED,i.q=o));continue;case S.DOCTYPE_QUOTED:i.doctype+=o,o===i.q&&(i.q="",i.state=S.DOCTYPE);continue;case S.DOCTYPE_DTD:"]"===o?(i.doctype+=o,i.state=S.DOCTYPE):"<"===o?(i.state=S.OPEN_WAKA,i.startTagPosition=i.position):y(o)?(i.doctype+=o,i.state=S.DOCTYPE_DTD_QUOTED,i.q=o):i.doctype+=o;continue;case S.DOCTYPE_DTD_QUOTED:i.doctype+=o,o===i.q&&(i.state=S.DOCTYPE_DTD,i.q="");continue;case S.COMMENT:"-"===o?i.state=S.COMMENT_ENDING:i.comment+=o;continue;case S.COMMENT_ENDING:"-"===o?(i.state=S.COMMENT_ENDED,i.comment=k(i.opt,i.comment),i.comment&&x(i,"oncomment",i.comment),i.comment=""):(i.comment+="-"+o,i.state=S.COMMENT);continue;case S.COMMENT_ENDED:">"!==o?(M(i,"Malformed comment"),i.comment+="--"+o,i.state=S.COMMENT):i.doctype&&!0!==i.doctype?i.state=S.DOCTYPE_DTD:i.state=S.TEXT;continue;case S.CDATA:for(s=r-1;o&&"]"!==o;)(o=B(t,r++))&&i.trackPosition&&(i.position++,"\n"===o?(i.line++,i.column=0):i.column++);i.cdata+=t.substring(s,r-1),"]"===o&&(i.state=S.CDATA_ENDING);continue;case S.CDATA_ENDING:"]"===o?i.state=S.CDATA_ENDING_2:(i.cdata+="]"+o,i.state=S.CDATA);continue;case S.CDATA_ENDING_2:">"===o?(i.cdata&&x(i,"oncdata",i.cdata),x(i,"onclosecdata"),i.cdata="",i.state=S.TEXT):"]"===o?i.cdata+="]":(i.cdata+="]]"+o,i.state=S.CDATA);continue;case S.PROC_INST:"?"===o?i.state=S.PROC_INST_ENDING:m(o)?i.state=S.PROC_INST_BODY:i.procInstName+=o;continue;case S.PROC_INST_BODY:if(!i.procInstBody&&m(o))continue;"?"===o?i.state=S.PROC_INST_ENDING:i.procInstBody+=o;continue;case S.PROC_INST_ENDING:if(">"===o){const e={name:i.procInstName,body:i.procInstBody};P(i,e),x(i,"onprocessinginstruction",e),i.procInstName=i.procInstBody="",i.state=S.TEXT}else i.procInstBody+="?"+o,i.state=S.PROC_INST_BODY;continue;case S.OPEN_TAG:_(p,o)?i.tagName+=o:(I(i),">"===o?F(i):"/"===o?i.state=S.OPEN_TAG_SLASH:(m(o)||M(i,"Invalid character in tag name"),i.state=S.ATTRIB));continue;case S.OPEN_TAG_SLASH:">"===o?(F(i,!0),L(i)):(M(i,"Forward-slash in opening tag not followed by >"),i.state=S.ATTRIB);continue;case S.ATTRIB:if(m(o))continue;">"===o?F(i):"/"===o?i.state=S.OPEN_TAG_SLASH:_(d,o)?(i.attribName=o,i.attribValue="",i.state=S.ATTRIB_NAME):M(i,"Invalid attribute name");continue;case S.ATTRIB_NAME:"="===o?i.state=S.ATTRIB_VALUE:">"===o?(M(i,"Attribute without value"),i.attribValue=i.attribName,j(i),F(i)):m(o)?i.state=S.ATTRIB_NAME_SAW_WHITE:_(p,o)?i.attribName+=o:M(i,"Invalid attribute name");continue;case S.ATTRIB_NAME_SAW_WHITE:if("="===o)i.state=S.ATTRIB_VALUE;else{if(m(o))continue;M(i,"Attribute without value"),i.tag.attributes[i.attribName]="",i.attribValue="",x(i,"onattribute",{name:i.attribName,value:""}),i.attribName="",">"===o?F(i):_(d,o)?(i.attribName=o,i.state=S.ATTRIB_NAME):(M(i,"Invalid attribute name"),i.state=S.ATTRIB)}continue;case S.ATTRIB_VALUE:if(m(o))continue;y(o)?(i.q=o,i.state=S.ATTRIB_VALUE_QUOTED):(i.opt.unquotedAttributeValues||N(i,"Unquoted attribute value"),i.state=S.ATTRIB_VALUE_UNQUOTED,i.attribValue=o);continue;case S.ATTRIB_VALUE_QUOTED:if(o!==i.q){"&"===o?i.state=S.ATTRIB_VALUE_ENTITY_Q:i.attribValue+=o;continue}j(i),i.q="",i.state=S.ATTRIB_VALUE_CLOSED;continue;case S.ATTRIB_VALUE_CLOSED:m(o)?i.state=S.ATTRIB:">"===o?F(i):"/"===o?i.state=S.OPEN_TAG_SLASH:_(d,o)?(M(i,"No whitespace between attributes"),i.attribName=o,i.attribValue="",i.state=S.ATTRIB_NAME):M(i,"Invalid attribute name");continue;case S.ATTRIB_VALUE_UNQUOTED:if(!v(o)){"&"===o?i.state=S.ATTRIB_VALUE_ENTITY_U:i.attribValue+=o;continue}j(i),">"===o?F(i):i.state=S.ATTRIB;continue;case S.CLOSE_TAG:if(i.tagName)">"===o?L(i):_(p,o)?i.tagName+=o:i.script?(i.script+="</"+i.tagName+o,i.tagName="",i.state=S.SCRIPT):(m(o)||M(i,"Invalid tagname in closing tag"),i.state=S.CLOSE_TAG_SAW_WHITE);else{if(m(o))continue;b(d,o)?i.script?(i.script+="</"+o,i.state=S.SCRIPT):M(i,"Invalid tagname in closing tag."):i.tagName=o}continue;case S.CLOSE_TAG_SAW_WHITE:if(m(o))continue;">"===o?L(i):M(i,"Invalid characters in closing tag");continue;case S.TEXT_ENTITY:case S.ATTRIB_VALUE_ENTITY_Q:case S.ATTRIB_VALUE_ENTITY_U:var u,h;switch(i.state){case S.TEXT_ENTITY:u=S.TEXT,h="textNode";break;case S.ATTRIB_VALUE_ENTITY_Q:u=S.ATTRIB_VALUE_QUOTED,h="attribValue";break;case S.ATTRIB_VALUE_ENTITY_U:u=S.ATTRIB_VALUE_UNQUOTED,h="attribValue"}if(";"===o){var w=W(i);i.opt.unparsedEntities&&!Object.values(e.XML_ENTITIES).includes(w)?((i.entityCount+=1)>i.opt.maxEntityCount&&N(i,"Parsed entity count exceeds max entity count"),(i.entityDepth+=1)>i.opt.maxEntityDepth&&N(i,"Parsed entity depth exceeds max entity depth"),i.entity="",i.state=u,i.write(w),i.entityDepth-=1):(i[h]+=w,i.entity="",i.state=u)}else _(i.entity.length?g:f,o)?i.entity+=o:(M(i,"Invalid character in entity name"),i[h]+="&"+i.entity+o,i.entity="",i.state=u);continue;default:throw new Error(i,"Unknown state: "+i.state)}return i.position>=i.bufferCheckPosition&&function(t){for(var i=Math.max(e.MAX_BUFFER_LENGTH,10),r=0,o=0,s=n.length;o<s;o++){var a=t[n[o]].length;if(a>i)switch(n[o]){case"textNode":O(t);break;case"cdata":x(t,"oncdata",t.cdata),t.cdata="";break;case"script":x(t,"onscript",t.script),t.script="";break;default:N(t,"Max buffer length exceeded: "+n[o])}r=Math.max(r,a)}var c=e.MAX_BUFFER_LENGTH-r;t.bufferCheckPosition=c+t.position}(i),i},resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){var e;O(e=this),""!==e.cdata&&(x(e,"oncdata",e.cdata),e.cdata=""),""!==e.script&&(x(e,"onscript",e.script),e.script="")}};try{t=i(2203).Stream}catch(e){t=function(){}}t||(t=function(){});var o=e.EVENTS.filter(function(e){return"error"!==e&&"end"!==e});function s(e,i){if(!(this instanceof s))return new s(e,i);t.apply(this),this._parser=new r(e,i),this.writable=!0,this.readable=!0;var n=this;this._parser.onend=function(){n.emit("end")},this._parser.onerror=function(e){n.emit("error",e),n._parser.error=null},this._decoder=null,this._decoderBuffer=null,o.forEach(function(e){Object.defineProperty(n,"on"+e,{get:function(){return n._parser["on"+e]},set:function(t){if(!t)return n.removeAllListeners(e),n._parser["on"+e]=t,t;n.on(e,t)},enumerable:!0,configurable:!1})})}s.prototype=Object.create(t.prototype,{constructor:{value:s}}),s.prototype._decodeBuffer=function(e,t){if(this._decoderBuffer&&(e=Buffer.concat([this._decoderBuffer,e]),this._decoderBuffer=null),!this._decoder){var i=function(e,t){if(e.length>=2){if(255===e[0]&&254===e[1])return"utf-16le";if(254===e[0]&&255===e[1])return"utf-16be"}return e.length>=3&&239===e[0]&&187===e[1]&&191===e[2]?"utf8":e.length>=4?60===e[0]&&0===e[1]&&63===e[2]&&0===e[3]?"utf-16le":0===e[0]&&60===e[1]&&0===e[2]&&63===e[3]?"utf-16be":"utf8":t?"utf8":null}(e,t);if(!i)return this._decoderBuffer=e,"";this._parser.encoding=i,this._decoder=new TextDecoder(i)}return this._decoder.decode(e,{stream:!t})},s.prototype.write=function(e){if("function"==typeof Buffer&&"function"==typeof Buffer.isBuffer&&Buffer.isBuffer(e))e=this._decodeBuffer(e,!1);else if(this._decoderBuffer){var t=this._decodeBuffer(Buffer.alloc(0),!0);t&&(this._parser.write(t),this.emit("data",t))}return this._parser.write(e.toString()),this.emit("data",e),!0},s.prototype.end=function(e){if(e&&e.length&&this.write(e),this._decoderBuffer){var t=this._decodeBuffer(Buffer.alloc(0),!0);t&&(this._parser.write(t),this.emit("data",t))}else if(this._decoder){var i=this._decoder.decode();i&&(this._parser.write(i),this.emit("data",i))}return this._parser.end(),!0},s.prototype.on=function(e,i){var n=this;return n._parser["on"+e]||-1===o.indexOf(e)||(n._parser["on"+e]=function(){var t=1===arguments.length?[arguments[0]]:Array.apply(null,arguments);t.splice(0,0,e),n.emit.apply(n,t)}),t.prototype.on.call(n,e,i)};var a="[CDATA[",c="DOCTYPE",l="http://www.w3.org/XML/1998/namespace",u="http://www.w3.org/2000/xmlns/",h={xml:l,xmlns:u},d=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,p=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/,f=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,g=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/;function m(e){return" "===e||"\n"===e||"\r"===e||"\t"===e}function y(e){return'"'===e||"'"===e}function v(e){return">"===e||m(e)}function _(e,t){return e.test(t)}function b(e,t){return!_(e,t)}var w,D,T,S=0;for(var C in e.STATE={BEGIN:S++,BEGIN_WHITESPACE:S++,TEXT:S++,TEXT_ENTITY:S++,OPEN_WAKA:S++,SGML_DECL:S++,SGML_DECL_QUOTED:S++,DOCTYPE:S++,DOCTYPE_QUOTED:S++,DOCTYPE_DTD:S++,DOCTYPE_DTD_QUOTED:S++,COMMENT_STARTING:S++,COMMENT:S++,COMMENT_ENDING:S++,COMMENT_ENDED:S++,CDATA:S++,CDATA_ENDING:S++,CDATA_ENDING_2:S++,PROC_INST:S++,PROC_INST_BODY:S++,PROC_INST_ENDING:S++,OPEN_TAG:S++,OPEN_TAG_SLASH:S++,ATTRIB:S++,ATTRIB_NAME:S++,ATTRIB_NAME_SAW_WHITE:S++,ATTRIB_VALUE:S++,ATTRIB_VALUE_QUOTED:S++,ATTRIB_VALUE_CLOSED:S++,ATTRIB_VALUE_UNQUOTED:S++,ATTRIB_VALUE_ENTITY_Q:S++,ATTRIB_VALUE_ENTITY_U:S++,CLOSE_TAG:S++,CLOSE_TAG_SAW_WHITE:S++,SCRIPT:S++,SCRIPT_ENDING:S++},e.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},e.ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'",AElig:198,Aacute:193,Acirc:194,Agrave:192,Aring:197,Atilde:195,Auml:196,Ccedil:199,ETH:208,Eacute:201,Ecirc:202,Egrave:200,Euml:203,Iacute:205,Icirc:206,Igrave:204,Iuml:207,Ntilde:209,Oacute:211,Ocirc:212,Ograve:210,Oslash:216,Otilde:213,Ouml:214,THORN:222,Uacute:218,Ucirc:219,Ugrave:217,Uuml:220,Yacute:221,aacute:225,acirc:226,aelig:230,agrave:224,aring:229,atilde:227,auml:228,ccedil:231,eacute:233,ecirc:234,egrave:232,eth:240,euml:235,iacute:237,icirc:238,igrave:236,iuml:239,ntilde:241,oacute:243,ocirc:244,ograve:242,oslash:248,otilde:245,ouml:246,szlig:223,thorn:254,uacute:250,ucirc:251,ugrave:249,uuml:252,yacute:253,yuml:255,copy:169,reg:174,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,ordf:170,laquo:171,not:172,shy:173,macr:175,deg:176,plusmn:177,sup1:185,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,times:215,divide:247,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,int:8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830},Object.keys(e.ENTITIES).forEach(function(t){var i=e.ENTITIES[t],n="number"==typeof i?String.fromCharCode(i):i;e.ENTITIES[t]=n}),e.STATE)e.STATE[e.STATE[C]]=C;function R(e,t,i){e[t]&&e[t](i)}function E(e){return e?e.toLowerCase().replace(/[^a-z0-9]/g,""):null}function P(e,t){if(e.strict&&e.encoding&&t&&"xml"===t.name){var i,n,r=(n=(i=t.body)&&i.match(/(?:^|\s)encoding\s*=\s*(['"])([^'"]+)\1/i))?n[2]:null;r&&!function(e,t){const i=E(e),n=E(t);return!i||!n||("utf16"===n?"utf16le"===i||"utf16be"===i:i===n)}(e.encoding,r)&&M(e,"XML declaration encoding "+r+" does not match detected stream encoding "+e.encoding.toUpperCase())}}function x(e,t,i){e.textNode&&O(e),R(e,t,i)}function O(e){e.textNode=k(e.opt,e.textNode),e.textNode&&R(e,"ontext",e.textNode),e.textNode=""}function k(e,t){return e.trim&&(t=t.trim()),e.normalize&&(t=t.replace(/\s+/g," ")),t}function N(e,t){return O(e),e.trackPosition&&(t+="\nLine: "+e.line+"\nColumn: "+e.column+"\nChar: "+e.c),t=new Error(t),e.error=t,R(e,"onerror",t),e}function A(e){return e.sawRoot&&!e.closedRoot&&M(e,"Unclosed root tag"),e.state!==S.BEGIN&&e.state!==S.BEGIN_WHITESPACE&&e.state!==S.TEXT&&N(e,"Unexpected end"),O(e),e.c="",e.closed=!0,R(e,"onend"),r.call(e,e.strict,e.opt),e}function M(e,t){if("object"!=typeof e||!(e instanceof r))throw new Error("bad call to strictFail");e.strict&&N(e,t)}function I(e){e.strict||(e.tagName=e.tagName[e.looseCase]());var t=e.tags[e.tags.length-1]||e,i=e.tag={name:e.tagName,attributes:{}};e.opt.xmlns&&(i.ns=t.ns),e.attribList.length=0,x(e,"onopentagstart",i)}function q(e,t){var i=e.indexOf(":")<0?["",e]:e.split(":"),n=i[0],r=i[1];return t&&"xmlns"===e&&(n="xmlns",r=""),{prefix:n,local:r}}function j(e){if(e.strict||(e.attribName=e.attribName[e.looseCase]()),-1!==e.attribList.indexOf(e.attribName)||e.tag.attributes.hasOwnProperty(e.attribName))e.attribName=e.attribValue="";else{if(e.opt.xmlns){var t=q(e.attribName,!0),i=t.prefix,n=t.local;if("xmlns"===i)if("xml"===n&&e.attribValue!==l)M(e,"xml: prefix must be bound to "+l+"\nActual: "+e.attribValue);else if("xmlns"===n&&e.attribValue!==u)M(e,"xmlns: prefix must be bound to "+u+"\nActual: "+e.attribValue);else{var r=e.tag,o=e.tags[e.tags.length-1]||e;r.ns===o.ns&&(r.ns=Object.create(o.ns)),r.ns[n]=e.attribValue}e.attribList.push([e.attribName,e.attribValue])}else e.tag.attributes[e.attribName]=e.attribValue,x(e,"onattribute",{name:e.attribName,value:e.attribValue});e.attribName=e.attribValue=""}}function F(e,t){if(e.opt.xmlns){var i=e.tag,n=q(e.tagName);i.prefix=n.prefix,i.local=n.local,i.uri=i.ns[n.prefix]||"",i.prefix&&!i.uri&&(M(e,"Unbound namespace prefix: "+JSON.stringify(e.tagName)),i.uri=n.prefix);var r=e.tags[e.tags.length-1]||e;i.ns&&r.ns!==i.ns&&Object.keys(i.ns).forEach(function(t){x(e,"onopennamespace",{prefix:t,uri:i.ns[t]})});for(var o=0,s=e.attribList.length;o<s;o++){var a=e.attribList[o],c=a[0],l=a[1],u=q(c,!0),h=u.prefix,d=u.local,p=""===h?"":i.ns[h]||"",f={name:c,value:l,prefix:h,local:d,uri:p};h&&"xmlns"!==h&&!p&&(M(e,"Unbound namespace prefix: "+JSON.stringify(h)),f.uri=h),e.tag.attributes[c]=f,x(e,"onattribute",f)}e.attribList.length=0}e.tag.isSelfClosing=!!t,e.sawRoot=!0,e.tags.push(e.tag),x(e,"onopentag",e.tag),t||(e.noscript||"script"!==e.tagName.toLowerCase()?e.state=S.TEXT:e.state=S.SCRIPT,e.tag=null,e.tagName=""),e.attribName=e.attribValue="",e.attribList.length=0}function L(e){if(!e.tagName)return M(e,"Weird empty close tag."),e.textNode+="</>",void(e.state=S.TEXT);if(e.script){if("script"!==e.tagName)return e.script+="</"+e.tagName+">",e.tagName="",void(e.state=S.SCRIPT);x(e,"onscript",e.script),e.script=""}var t=e.tags.length,i=e.tagName;e.strict||(i=i[e.looseCase]());for(var n=i;t--&&e.tags[t].name!==n;)M(e,"Unexpected close tag");if(t<0)return M(e,"Unmatched closing tag: "+e.tagName),e.textNode+="</"+e.tagName+">",void(e.state=S.TEXT);e.tagName=i;for(var r=e.tags.length;r-- >t;){var o=e.tag=e.tags.pop();e.tagName=e.tag.name,x(e,"onclosetag",e.tagName);var s={};for(var a in o.ns)s[a]=o.ns[a];var c=e.tags[e.tags.length-1]||e;e.opt.xmlns&&o.ns!==c.ns&&Object.keys(o.ns).forEach(function(t){var i=o.ns[t];x(e,"onclosenamespace",{prefix:t,uri:i})})}0===t&&(e.closedRoot=!0),e.tagName=e.attribValue=e.attribName="",e.attribList.length=0,e.state=S.TEXT}function W(e){var t,i=e.entity,n=i.toLowerCase(),r="";return e.ENTITIES[i]?e.ENTITIES[i]:e.ENTITIES[n]?e.ENTITIES[n]:("#"===(i=n).charAt(0)&&("x"===i.charAt(1)?(i=i.slice(2),r=(t=parseInt(i,16)).toString(16)):(i=i.slice(1),r=(t=parseInt(i,10)).toString(10))),i=i.replace(/^0+/,""),isNaN(t)||r.toLowerCase()!==i||t<0||t>1114111?(M(e,"Invalid character entity"),"&"+e.entity+";"):String.fromCodePoint(t))}function U(e,t){"<"===t?(e.state=S.OPEN_WAKA,e.startTagPosition=e.position):m(t)||(M(e,"Non-whitespace before first tag."),e.textNode=t,e.state=S.TEXT)}function B(e,t){var i="";return t<e.length&&(i=e.charAt(t)),i}S=e.STATE,String.fromCodePoint||(w=String.fromCharCode,D=Math.floor,T=function(){var e,t,i=[],n=-1,r=arguments.length;if(!r)return"";for(var o="";++n<r;){var s=Number(arguments[n]);if(!isFinite(s)||s<0||s>1114111||D(s)!==s)throw RangeError("Invalid code point: "+s);s<=65535?i.push(s):(e=55296+((s-=65536)>>10),t=s%1024+56320,i.push(e,t)),(n+1===r||i.length>16384)&&(o+=w.apply(null,i),i.length=0)}return o},Object.defineProperty?Object.defineProperty(String,"fromCodePoint",{value:T,configurable:!0,writable:!0}):String.fromCodePoint=T)}(t)},5192(e,t,i){"use strict";t.quote=i(3940),t.parse=i(9563)},9563(e){"use strict";for(var t="(?:"+["\\|\\|","\\&\\&",";;","\\|\\&","\\<\\(","\\<\\<\\<",">>",">\\&","<\\&","[&;()|<>]"].join("|")+")",i=new RegExp("^"+t+"$"),n="|&;()<> \\t",r=/^#$/,o="$",s="",a=0;a<4;a++)s+=(4294967296*Math.random()).toString(16);var c=new RegExp("^"+s);e.exports=function(e,a,l){var u=function(e,a,c){c||(c={});var l=c.escape||"\\",u=!0===c.splitUnquoted?" \t\n":"string"==typeof c.splitUnquoted?c.splitUnquoted:"",h=new RegExp(["("+t+")","((\\"+l+"['\""+n+"]|[^\\s'\""+n+'])+|"((\\\\"|[^"])*?)"|\'([^\']*?)\')+'].join("|"),"g"),d=function(e,t){for(var i,n=t.lastIndex,r=[];i=t.exec(e);)r[r.length]=i,t.lastIndex===i.index&&(t.lastIndex+=1);return t.lastIndex=n,r}(e,h);if(0===d.length)return[];a||(a={});var p=!1;return d.map(function(t){var n=t[0];if(n&&!p){if(i.test(n))return{op:n};var c,h=!1,d=!1,f="",g=[],m=!1,y=null,v=!1;for(c=0;c<n.length;c++){var _=n.charAt(c);if(u&&_!==o&&R(),v=v||!h&&("*"===_||"?"===_),d)f+=_,d=!1;else if(h)_===h?h=!1:"'"==h?f+=_:_===l?(c+=1,_=n.charAt(c),f+='"'===_||_===l||_===o?_:l+_):f+=_===o?C():_;else if('"'===_||"'"===_)h=_,m=!0;else{if(i.test(_))return{op:n};if(r.test(_)){p=!0;var b={comment:e.slice(t.index+c+1)};return f.length?[f,b]:[b]}if(_===l)d=!0;else if(_===o){var w=C();if(u)for(var D=0;D<w.length;D+=1){var T=w.charAt(D);u.indexOf(T)<0?(R(),f+=T):null===y?y=" "===T||"\t"===T||"\n"===T?0:1:" "!==T&&"\t"!==T&&"\n"!==T&&(y+=1)}else f+=w}else f+=_}}if(v)return{op:"glob",pattern:f};if(u){if(null!==y&&y>0){g[g.length]=f,f="";for(var S=1;S<y;S+=1)g[g.length]=""}return(""!==f||m&&0===g.length)&&(g[g.length]=f),g}return f}function C(){var e,t;c+=1;var i=n.charAt(c);if("{"===i){if(c+=1,"}"===n.charAt(c))throw new Error("Bad substitution: "+n.slice(c-2,c+1));var r=1;for(e=c;r>0&&e<n.length;)"{"===n.charAt(e)&&"$"===n.charAt(e-1)?r+=1:"}"===n.charAt(e)&&(r-=1),e+=1;if(0!==r)throw new Error("Bad substitution: "+n.slice(c));e-=1,t=n.slice(c,e),c=e}else if(/[*@#?$!_-]/.test(i))t=i,c+=1;else{var o=n.slice(c);(e=o.match(/[^\w\d_]/))?(t=o.slice(0,e.index),c+=e.index-1):(t=o,c=n.length)}return function(e,t,i){var n="function"==typeof e?e(i):e[i];return void 0===n&&""!=i?n="":void 0===n&&(n="$"),"object"==typeof n?""+s+JSON.stringify(n)+s:""+n}(a,0,t)}function R(){if(null!==y){if(0===y)""!==f&&(g[g.length]=f,f="");else{g[g.length]=f,f="";for(var e=1;e<y;e+=1)g[g.length]=""}y=null}}}).reduce(function(e,t){return void 0===t||[].concat(t).forEach(function(t){e[e.length]=t}),e},[])}(e,a,l);return"function"!=typeof a?u:u.reduce(function(e,t){if("object"==typeof t)return e[e.length]=t,e;var i=t.split(RegExp("("+s+".*?"+s+")","g"));return 1===i.length?(e[e.length]=i[0],e):(i.filter(Boolean).forEach(function(t){e[e.length]=c.test(t)?JSON.parse(t.split(s)[1]):t}),e)},[])}},3940(e){"use strict";var t=["||","&&",";;","|&","<(","<<<",">>",">&","<&","&",";","(",")","|","<",">"],i=/[\n\r\u2028\u2029]/,n=/[\s#!"$&'():;<=>@\\^`|]/g;e.exports=function(e){return e.map(function(e){if(""===e)return"''";if(e&&"object"==typeof e){if("op"in e&&"glob"===e.op){if("string"!=typeof e.pattern)throw new TypeError("glob token requires a string `pattern`");if(i.test(e.pattern))throw new TypeError("glob `pattern` must not contain line terminators");return e.pattern.replace(n,"\\$&")}if("op"in e&&"string"==typeof e.op){if(t.indexOf(e.op)<0)throw new TypeError("invalid `op` value: "+JSON.stringify(e.op));return e.op.replace(/[\s\S]/g,"\\$&")}if("comment"in e&&"string"==typeof e.comment){if(i.test(e.comment))throw new TypeError("`comment` must not contain line terminators");return"#"+e.comment}throw new TypeError("unrecognized object token shape")}return/["\s\\]/.test(e)&&!/'/.test(e)?"'"+e.replace(/(['])/g,"\\$1")+"'":/["'\s]/.test(e)?'"'+e.replace(/(["\\$`!])/g,"\\$1")+'"':String(e).replace(/([A-Za-z]:)?([#!"$&'()*,:;<=>?@[\\\]^`{|}~])/g,"$1\\$2")}).join(" ")}},990(e,t,i){"use strict";t.ActivityProgress=t.s=t.SLOW_ACTIVITY_DELAY_MS=t.ROUTINE_ANALYSIS_MESSAGE=t.Activity=void 0;const n=i(5215);var r;!function(e){e.Setup="setup",e.Compiler="compiler",e.Edit="edit",e.Compile="compile",e.Heap="heap",e.Request="request"}(r||(t.Activity=r={})),t.ROUTINE_ANALYSIS_MESSAGE="analysing",t.SLOW_ACTIVITY_DELAY_MS=500,t.s=1e4,t.ActivityProgress=class{constructor(e){this.activities=new Map,this.waiting=new Map,this.reporter=null,this.opening=!1,this.shown=null,this.connection=e}report(e,t,i={}){var n,r,o;const s={message:t,fallback:null!==(n=i.fallback)&&void 0!==n&&n,done_message:null!==(r=i.done_message)&&void 0!==r?r:null},a=this.waiting.get(e);if(a)a.activity=s;else{if(i.delay_ms&&!this.activities.has(e)){const t=setTimeout(()=>{const t=this.waiting.get(e);this.waiting.delete(e),t&&this.show(e,t.activity)},i.delay_ms);return null===(o=t.unref)||void 0===o||o.call(t),void this.waiting.set(e,{timer:t,activity:s})}this.show(e,s)}}end(e){const t=this.waiting.get(e);t&&(clearTimeout(t.timer),this.waiting.delete(e));const i=this.activities.get(e);if(this.activities.delete(e))return this.reporter&&0==this.activities.size&&(null==i?void 0:i.done_message)?(this.reporter.report(i.done_message),this.reporter.done(),this.reporter=null,void(this.shown=null)):void this.render()}show(e,t){this.activities.delete(e),this.activities.set(e,t),this.render()}current(){let e=null,t=null;for(const i of this.activities.values())i.fallback?t=i.message:e=i.message;return null!=e?e:t}render(){var e;const t=this.current();if(null==t)return null===(e=this.reporter)||void 0===e||e.done(),this.reporter=null,void(this.shown=null);this.reporter?t!=this.shown&&(this.shown=t,this.reporter.report(t)):this.open()}open(){var e,i,r;if(this.opening||!(null===(i=null===(e=this.connection)||void 0===e?void 0:e.window)||void 0===i?void 0:i.createWorkDoneProgress))return;this.opening=!0;const o=setTimeout(()=>{this.opening=!1,(0,n.log)("the client has not granted a progress token; will ask again for the next activity")},t.s);null===(r=o.unref)||void 0===r||r.call(o),Promise.resolve(this.connection.window.createWorkDoneProgress()).then(e=>{clearTimeout(o),this.opening=!1;const t=this.current();if(null==t||this.reporter)return e.begin("ghūl",void 0,"",!1),void e.done();e.begin("ghūl",void 0,t,!1),this.reporter=e,this.shown=t},e=>{clearTimeout(o),this.opening=!1,(0,n.log)(`could not create a progress reporter: ${e}`)})}}},1076(e,t,i){"use strict";t.CompilerQuickFixProvider=void 0;const n=i(2861),r=i(2029);class o{provide(e,t,i){const n=[],r=new Set;for(const s of i){const i=o.toDiagnostic(s);for(const a of o.fixesOf(s)){if(!o.editsStillApply(e,a.edits))continue;const s=JSON.stringify([a.title,a.edits]);r.has(s)||(r.add(s),n.push(o.buildAction(t,i,a)))}}return n}static fixesOf(e){return Array.isArray(e.fixes)?e.fixes.filter(e=>e&&"string"==typeof e.title&&Array.isArray(e.edits)&&e.edits.every(e=>e&&"string"==typeof e.new_text&&"number"==typeof e.start_line)).map(e=>({title:e.title,isPreferred:!!e.is_preferred,edits:e.edits.map(e=>{var t;return{range:{start:{line:e.start_line-1,character:e.start_column-1},end:{line:e.end_line-1,character:e.end_column-1}},replaces:null!==(t=e.replaces)&&void 0!==t?t:null,newText:e.new_text}})})):[]}static toDiagnostic(e){const t={severity:r.SeverityMapper.getSeverity(e.severity,"new"),range:{start:{line:e.start_line-1,character:e.start_column-1},end:{line:e.end_line-1,character:e.end_column-1}},message:e.message,source:"ghūl"};return e.code&&(t.code=e.code),t}static editsStillApply(e,t){return t.every(t=>null==t.replaces||e.getText(t.range)===t.replaces)}static buildAction(e,t,i){const n=i.edits.map(e=>({range:e.range,newText:e.newText})),r={changes:{[e]:n}},s={title:i.title,kind:o.KIND,diagnostics:[t],edit:r};return i.isPreferred&&(s.isPreferred=!0),s}}t.CompilerQuickFixProvider=o,o.KIND=n.CodeActionKind.QuickFix},6781(e,t,i){"use strict";t.ConfigEventEmitter=void 0;const n=i(4434);class r extends n.EventEmitter{constructor(){super()}configAvailable(e,t){this.emit("config-available",e,t)}onConfigAvailable(e){this.on("config-available",e)}}t.ConfigEventEmitter=r},4465(e,t,i){"use strict";var n=this&&this.__awaiter||function(e,t,i,n){return new(i||(i=Promise))(function(r,o){function s(e){try{c(n.next(e))}catch(e){o(e)}}function a(e){try{c(n.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?r(e.value):(t=e.value,t instanceof i?t:new i(function(e){e(t)})).then(s,a)}c((n=n.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.ConnectionEventHandler=t.WATCHED_FILE_GLOBS=void 0;const r=i(2861),o=i(8945),s=i(1323),a=i(5215),c=i(1076),l=i(2510);t.WATCHED_FILE_GLOBS=["**/*.ghul","**/*.ghulproj","**/Directory.Build.props","**/Directory.Packages.props","**/dotnet-tools.json","**/.block-compiler"],t.ConnectionEventHandler=class{constructor(e,t,i){this.compiler_quick_fix_provider=new c.CompilerQuickFixProvider,this.extension_state=e,this.connection=t,this.documents=i,t.onInitialize(e=>this.onInitialize(e)),t.onShutdown(()=>this.onShutdown()),t.onExit(()=>this.onExit()),t.onDidChangeConfiguration(e=>this.onDidChangeConfiguration(e)),t.onDidChangeWatchedFiles(e=>this.extension_state.onDidChangeWatchedFiles(e)),t.onCompletion((e,t)=>this.onCompletion(e,t)),t.onHover((e,t)=>this.onHover(e,t)),t.onDefinition((e,t)=>this.onDefinition(e,t)),t.onDeclaration((e,t)=>this.onDeclaration(e,t)),t.onSignatureHelp((e,t)=>this.onSignatureHelp(e,t)),t.onDocumentSymbol((e,t)=>this.onDocumentSymbol(e,t)),t.onWorkspaceSymbol((e,t)=>this.onWorkspaceSymbol(t)),t.onReferences((e,t)=>this.onReferences(e,t)),t.onImplementation((e,t)=>this.onImplementation(e,t)),t.onTypeDefinition((e,t)=>this.onTypeDefinition(e,t)),t.onRenameRequest(e=>this.onRenameRequest(e)),t.onDocumentFormatting(e=>this.onDocumentFormatting(e)),t.onDocumentRangeFormatting(e=>this.onDocumentRangeFormatting(e)),t.languages.semanticTokens.on((e,t)=>this.onSemanticTokens(e,t)),t.languages.inlayHint.on((e,t)=>this.onInlayHint(e,t)),t.onCodeAction(e=>this.onCodeAction(e))}workspaceForUri(e){return this.extension_state.getWorkspaceForUri(e)}onInitialize(e){var i,n,o,c,u,h,d,p,f,g,m,y,v;this.extension_state.setClientSupportsConfiguration(!!(null===(n=null===(i=e.capabilities)||void 0===i?void 0:i.workspace)||void 0===n?void 0:n.configuration)),this.extension_state.setClientSupportsRefresh(!!(null===(u=null===(c=null===(o=e.capabilities)||void 0===o?void 0:o.workspace)||void 0===c?void 0:c.semanticTokens)||void 0===u?void 0:u.refreshSupport)&&!!(null===(p=null===(d=null===(h=e.capabilities)||void 0===h?void 0:h.workspace)||void 0===d?void 0:d.inlayHint)||void 0===p?void 0:p.refreshSupport));const _=this.collectWorkspaceRoots(e),b=[];for(const e of _)l.WorkspaceContext.looksLikeGhulWorkspace(e)?b.push(this.extension_state.registerWorkspace(e)):(0,a.log)(`skipping non-ghūl workspace folder: ${e}`);const w=!!(null===(g=null===(f=e.capabilities)||void 0===f?void 0:f.workspace)||void 0===g?void 0:g.workspaceFolders),D=!!(null===(v=null===(y=null===(m=e.capabilities)||void 0===m?void 0:m.workspace)||void 0===y?void 0:y.didChangeWatchedFiles)||void 0===v?void 0:v.dynamicRegistration);return this.connection.onInitialized(()=>{for(const e of b)e.initializeDetached();w&&this.connection.workspace.onDidChangeWorkspaceFolders(e=>this.onDidChangeWorkspaceFolders(e)),D&&this.connection.client.register(r.DidChangeWatchedFilesNotification.type,{watchers:t.WATCHED_FILE_GLOBS.map(e=>({globPattern:e}))})}),{capabilities:{textDocumentSync:{openClose:!0,change:r.TextDocumentSyncKind.Incremental},completionProvider:{triggerCharacters:[".",":"],resolveProvider:!1},documentSymbolProvider:!0,workspaceSymbolProvider:!0,hoverProvider:!0,definitionProvider:!0,declarationProvider:!0,referencesProvider:!0,signatureHelpProvider:{triggerCharacters:["(","["]},implementationProvider:!0,typeDefinitionProvider:!0,renameProvider:!0,documentFormattingProvider:!0,documentRangeFormattingProvider:!0,semanticTokensProvider:{legend:s.SEMANTIC_TOKENS_LEGEND,full:!0,range:!1},inlayHintProvider:!0,codeActionProvider:{codeActionKinds:[r.CodeActionKind.QuickFix]},workspace:{workspaceFolders:{supported:!0,changeNotifications:!0}}}}}collectWorkspaceRoots(e){const t=e.workspaceFolders;if(t&&t.length>0)return t.map(e=>this.folderUriToPath(e.uri)).filter(e=>!!e);if(e.rootUri){const t=this.folderUriToPath(e.rootUri);if(t)return[t]}return e.rootPath?[e.rootPath]:[]}folderUriToPath(e){try{return o.URI.parse(e).fsPath||null}catch(t){return(0,a.log)(`could not parse workspace folder uri '${e}': ${t}`),null}}onDidChangeWorkspaceFolders(e){for(const t of e.removed){const e=this.folderUriToPath(t.uri);e&&((0,a.log)(`workspace folder removed: ${e}`),this.extension_state.unregisterWorkspace(e))}for(const t of e.added){const e=this.folderUriToPath(t.uri);e&&(l.WorkspaceContext.looksLikeGhulWorkspace(e)?((0,a.log)(`workspace folder added: ${e}`),this.extension_state.registerWorkspace(e).initializeDetached()):(0,a.log)(`skipping added non-ghūl workspace folder: ${e}`))}}onShutdown(){(0,a.log)("language extension: shutting down...");for(const e of this.extension_state.allWorkspaces())e.server_manager.kill()}onExit(){(0,a.log)("language extension: exit")}onDidChangeConfiguration(e){(0,a.log)("language extension: configuration changed");for(const e of this.extension_state.allWorkspaces())e.reinitialize()}onCompletion(e,t){return n(this,void 0,void 0,function*(){const i=this.workspaceForUri(e.textDocument.uri);if(!i)return[];const n="."==e.context.triggerCharacter;return n&&(yield i.edit_queue.whenFlushed()),i.requester.sendCompletion(e.textDocument.uri,e.position.line,e.position.character,n,t)})}onHover(e,t){const i=this.workspaceForUri(e.textDocument.uri);return i?i.requester.sendHover(e.textDocument.uri,e.position.line,e.position.character,t):Promise.resolve(null)}onDefinition(e,t){const i=this.workspaceForUri(e.textDocument.uri);return i?i.requester.sendDefinition(e.textDocument.uri,e.position.line,e.position.character,t):Promise.resolve([])}onDeclaration(e,t){const i=this.workspaceForUri(e.textDocument.uri);return i?i.requester.sendDeclaration(e.textDocument.uri,e.position.line,e.position.character,t):Promise.resolve([])}onSignatureHelp(e,t){const i=this.workspaceForUri(e.textDocument.uri);return i?(i.edit_queue.sendQueued(),i.requester.sendSignature(e.textDocument.uri,e.position.line,e.position.character,t)):Promise.resolve(null)}onDocumentSymbol(e,t){const i=this.workspaceForUri(e.textDocument.uri);return i?i.requester.sendDocumentSymbol(e.textDocument.uri,t):Promise.resolve([])}onWorkspaceSymbol(e){return n(this,void 0,void 0,function*(){const t=this.extension_state.allWorkspaces();return 0===t.length?[]:(yield Promise.all(t.map(t=>{var i;return null!==(i=t.requester.sendWorkspaceSymbol(e))&&void 0!==i?i:Promise.resolve([])}))).reduce((e,t)=>t?e.concat(t):e,[])})}onReferences(e,t){const i=this.workspaceForUri(e.textDocument.uri);return i?i.requester.sendReferences(e.textDocument.uri,e.position.line,e.position.character,t):Promise.resolve([])}onImplementation(e,t){const i=this.workspaceForUri(e.textDocument.uri);return i?i.requester.sendImplementation(e.textDocument.uri,e.position.line,e.position.character,t):Promise.resolve([])}onTypeDefinition(e,t){const i=this.workspaceForUri(e.textDocument.uri);return i?i.requester.sendTypeDefinition(e.textDocument.uri,e.position.line,e.position.character,t):Promise.resolve([])}onRenameRequest(e){const t=this.workspaceForUri(e.textDocument.uri);return t?t.requester.sendRenameRequest(e.textDocument.uri,e.position.line,e.position.character,e.newName):Promise.resolve(null)}onDocumentFormatting(e){const t=this.workspaceForUri(e.textDocument.uri);if(!t)return Promise.resolve([]);let i=this.documents.get(e.textDocument.uri);if(!i)return Promise.resolve([]);let n={start:{line:0,character:0},end:{line:i.lineCount+1,character:0}};return t.requester.sendDocumentFormatting(e.textDocument.uri,i.getText(),n)}onCodeAction(e){return n(this,void 0,void 0,function*(){const t=this.documents.get(e.textDocument.uri);if(!t)return[];const i=this.workspaceForUri(e.textDocument.uri);if(!i)return[];const n=yield i.requester.sendCodeActions(e.textDocument.uri,e.range);return this.compiler_quick_fix_provider.provide(t,e.textDocument.uri,n)})}onSemanticTokens(e,t){const i=this.workspaceForUri(e.textDocument.uri);return i?(i.edit_queue.sendQueued(),i.requester.sendSemanticTokens(e.textDocument.uri,t)):Promise.resolve({data:[]})}onInlayHint(e,t){const i=this.workspaceForUri(e.textDocument.uri);return i?(i.edit_queue.sendQueued(),i.requester.sendInlayHints(e.textDocument.uri,t)):Promise.resolve([])}onDocumentRangeFormatting(e){const t=this.workspaceForUri(e.textDocument.uri);if(!t)return Promise.resolve([]);let i=this.documents.get(e.textDocument.uri);return i?t.requester.sendDocumentRangeFormatting(e.textDocument.uri,i.getText(),e.range):Promise.resolve([])}}},6024(e,t,i){"use strict";t.DocumentChangeTracker=void 0;const n=i(2861),r=i(8945),o=i(1431),s=i(4150),a=i(4236),c=i(8722),l=i(9896);t.DocumentChangeTracker=class{constructor(e,t,i,n,r=[]){this.workspace=e,this.edit_queue=t,this.globs=i,this.documents=n,this.missing_assemblies=new Set(r.map(e=>e.replace(/\\/g,"/"))),this.debounced_reinitialize=(0,o.debounce)(5e3,()=>{this.workspace.reinitialize()})}dispose(){this.debounced_reinitialize.cancel()}onDidChangeWatchedFiles(e){if(null==e?void 0:e.changes)for(let t of e.changes){if(t.uri.endsWith(".ghulproj")||t.uri.endsWith("Directory.Build.props")||t.uri.endsWith("dotnet-tools.json"))return(0,a.log)("project file changed: "+t.uri),void this.debounced_reinitialize();if(t.uri.endsWith(".block-compiler"))(0,a.log)("compiler block requested: "+t.uri),this.workspace.reinitialize();else if(this.isMissingAssembly(t.uri))return(0,a.log)("referenced assembly appeared: "+t.uri),void this.debounced_reinitialize();let e=this.tryGetValidSourceFile(t.uri);if(!e)continue;let i=(0,s.normalizeFileUri)(t.uri);if(t.type==n.FileChangeType.Deleted)(0,a.log)("source file deleted: '",i,"', clearing in memory"),this.edit_queue.queueEdit3(i,null,"");else if(t.type==n.FileChangeType.Created||t.type==n.FileChangeType.Changed){if(this.isOpenInEditor(i))continue;(0,a.log)("source file changed on disk: '",i,"', reloading from file contents");let t=(0,l.readFileSync)(e,"utf8");this.edit_queue.queueEdit3(i,null,t)}}}isMissingAssembly(e){if(!this.missing_assemblies.size)return!1;let t=r.URI.parse(e);return!("file"!=t.scheme||!t.fsPath)&&this.missing_assemblies.has(t.fsPath.replace(/\\/g,"/"))}isOpenInEditor(e){for(let t of this.documents.all())if((0,s.normalizeFileUri)(t.uri)==e)return!0;return!1}tryGetValidSourceFile(e){let t=r.URI.parse(e);if("file"!=t.scheme)return null;let i=t.fsPath;if(!i)return null;let n=i.replace(/\\/g,"/");return this.globs.find(e=>(0,c.minimatch)(n,e))?i:null}}},2326(e,t){"use strict";function i(e,t){let i=1,n=0;for(let r=0;r<t;r++)"\n"===e[r]&&(i++,n=r+1);return{line:i,column:t-n+1}}t.computeSpan=function(e,t){const n=Math.min(e.length,t.length);let r=0;for(;r<n&&e[r]===t[r];)r++;let o=0;for(;o<n-r&&e[e.length-1-o]===t[t.length-1-o];)o++;const s=e.length-o;if(r===s&&r===t.length-o)return null;const a=i(e,r),c=i(e,s),l=t.substring(r,t.length-o);return{start_line:a.line,start_column:a.column,end_line:c.line,end_column:c.column,new_text:l,expected_length:e.length}}},8887(e,t,i){"use strict";t.EditQueue=void 0;const n=i(5215),r=i(4150),o=i(990),s=i(5127),a=i(2326);var c;!function(e){e[e.START=0]="START",e[e.IDLE=1]="IDLE",e[e.WAITING_FOR_MORE_EDITS=2]="WAITING_FOR_MORE_EDITS",e[e.DOING_PARTIAL_COMPILE=3]="DOING_PARTIAL_COMPILE",e[e.WAITING_FOR_MORE_EDITS_AFTER_PARTIAL_COMPILE=4]="WAITING_FOR_MORE_EDITS_AFTER_PARTIAL_COMPILE",e[e.DOING_FULL_COMPILE=5]="DOING_FULL_COMPILE",e[e.DOING_FULL_COMPILE_SUPERSEDED=6]="DOING_FULL_COMPILE_SUPERSEDED",e[e.DOING_HEAP_CHECK=7]="DOING_HEAP_CHECK"}(c||(c={}));class l{constructor(e,t,i,n,r){this.incremental_stats=null,this.last_stats_request_at=0,this.edit_count=0,this.build_count=0,this.fake_version=-1,this.requester=e,this.response_handler=t,this.watchdog=i,this.progress=null!=n?n:null,this.metrics=null!=r?r:null,this.edit_latency_ms=null,this.compile_latency_ms=null,this.pending_changes=new Map,this.last_sent_text=new Map,this.flushed_waiters=[],this.state=c.START,this.edit_timeout=l.PARTIAL_BUILD_EDIT_TIMEOUT,this.full_build_timeout=l.FULL_BUILD_EDIT_TIMEOUT}hasPendingEdits(){return this.pending_changes.size>0}reset(){var e,t,i;this.pending_changes.clear(),this.clearEditTimer(),this.clearIdleTimer(),null===(e=this.progress)||void 0===e||e.end(o.Activity.Edit),null===(t=this.progress)||void 0===t||t.end(o.Activity.Compile),null===(i=this.progress)||void 0===i||i.end(o.Activity.Heap),this.incremental_stats=null,this.last_stats_request_at=0,this.last_sent_text.clear(),this.send_start_time=0,this.compile_start_time=0;const n=this.flushed_waiters;this.flushed_waiters=[];for(const e of n)e();this.state=c.IDLE}queueEdit(e){this.queueEdit3((0,r.normalizeFileUri)(e.document.uri),e.document.version,e.document.getText())}sendMultiEdits(e){this.requester.sendDocuments(e);for(let t of e)this.last_sent_text.set((0,r.normalizeFileUri)(t.uri),t.source)}sendOpenFiles(e){this.requester.sendOpenFiles(e)}queueEdit3(e,t,i){(null==t||t<0)&&(t=this.fake_version--),this.pending_changes.set(e,{uri:e,version:t,text:i}),this.state==c.START||(this.state==c.IDLE?(this.clearIdleTimer(),this.state=c.WAITING_FOR_MORE_EDITS,this.startEditTimer(this.edit_timeout)):this.state==c.WAITING_FOR_MORE_EDITS?this.startEditTimer(this.edit_timeout):this.state==c.DOING_PARTIAL_COMPILE||(this.state==c.WAITING_FOR_MORE_EDITS_AFTER_PARTIAL_COMPILE?(this.state=c.WAITING_FOR_MORE_EDITS,this.startEditTimer(this.edit_timeout)):this.state==c.DOING_FULL_COMPILE?this.response_handler.compile_abort_supported&&this.startEditTimer(this.edit_timeout):this.state==c.DOING_FULL_COMPILE_SUPERSEDED||this.state==c.DOING_HEAP_CHECK||this.response_handler.rejectAllAndThrow("queue edit: unexpected queue state (A): "+c[this.state])))}onEditTimeout(){this.edit_timer=null,this.state==c.WAITING_FOR_MORE_EDITS?this.sendQueued("edit timeout when waiting for more edits"):this.state==c.WAITING_FOR_MORE_EDITS_AFTER_PARTIAL_COMPILE?this.pending_changes.size>0?this.sendQueued("edit timeout when waiting for more edits after partial compile"):this.requestFullCompile():this.state==c.DOING_FULL_COMPILE?this.sendSupersedingEdit():(0,n.log)("timer expired but not waiting for edits: "+c[this.state]+" ("+this.state+")")}onIdleTimeout(){var e;this.state!=c.IDLE||this.watchdog.isRunning()?this.startIdleTimer():(null===(e=this.progress)||void 0===e||e.report(o.Activity.Heap,"garbage collecting",{delay_ms:o.SLOW_ACTIVITY_DELAY_MS,done_message:"garbage collected"}),this.requester.sendHeapCheckRequest(),this.state=c.DOING_HEAP_CHECK)}onDiagnosticsReceived(){this.state==c.START&&(this.state=c.IDLE)}onPartialCompileDone(e){var t;this.state==c.DOING_PARTIAL_COMPILE?(this.requester.analysed=!0,this.recordLatency("edit",this.send_start_time),this.requestStatsIfDue(),e&&(this.edit_timeout=1.5*e,this.full_build_timeout<this.edit_timeout&&(this.full_build_timeout=this.edit_timeout,this.watchdog.setTimeout(2*this.full_build_timeout)),31&this.edit_count||(0,n.log)(`edit request average: ${e.toFixed()} ms, edit timeout: ${this.edit_timeout.toFixed()} ms, compile timeout: ${this.full_build_timeout.toFixed()} ms, watchdog timeout: ${this.watchdog.timeout_milliseconds.toFixed()} ms`),this.edit_count++),this.pending_changes.size>0?(this.state=c.WAITING_FOR_MORE_EDITS,this.startEditTimer(this.edit_timeout)):(null===(t=this.progress)||void 0===t||t.end(o.Activity.Edit),this.state=c.WAITING_FOR_MORE_EDITS_AFTER_PARTIAL_COMPILE,this.startEditTimer(this.full_build_timeout)),this.releaseFlushedWaiters()):(0,n.log)("edit queue: on partial compile done: unexpected queue state (C): "+c[this.state]+" ("+this.state+")")}onFullCompileDone(e){var t,i;if(this.state==c.DOING_FULL_COMPILE_SUPERSEDED)return null===(t=this.progress)||void 0===t||t.end(o.Activity.Compile),void(this.state=c.DOING_PARTIAL_COMPILE);this.state==c.DOING_FULL_COMPILE?(this.requester.analysed=!0,null===(i=this.progress)||void 0===i||i.end(o.Activity.Compile),this.recordLatency("compile",this.compile_start_time),this.requestStatsIfDue(),e&&(this.full_build_timeout=1.5*e,this.full_build_timeout<this.edit_timeout&&(this.full_build_timeout=this.edit_timeout),this.watchdog.setTimeout(2*this.full_build_timeout),31&this.build_count||(0,n.log)(`compile request average: ${e.toFixed()} ms, edit timeout: ${this.edit_timeout.toFixed()} ms, compile timeout: ${this.full_build_timeout.toFixed()} ms, watchdog timeout: ${this.watchdog.timeout_milliseconds.toFixed()} ms`),this.build_count++),this.pending_changes.size>0?(this.state=c.WAITING_FOR_MORE_EDITS,this.startEditTimer(this.edit_timeout)):(this.state=c.IDLE,this.startIdleTimer()),this.releaseFlushedWaiters()):(0,n.log)("edit queue: on full compile done: unexpected queue state: "+c[this.state])}onHeapCheckDone(){var e;this.state==c.DOING_HEAP_CHECK?(null===(e=this.progress)||void 0===e||e.end(o.Activity.Heap),this.pending_changes.size>0?(this.state=c.WAITING_FOR_MORE_EDITS,this.startEditTimer(this.edit_timeout)):this.state=c.IDLE,this.releaseFlushedWaiters()):(0,n.log)("edit queue: on heap check done: unexpected queue state: "+c[this.state])}forceScheduleFullCompile(){this.state=c.WAITING_FOR_MORE_EDITS_AFTER_PARTIAL_COMPILE,this.startEditTimer(l.FULL_BUILD_EDIT_TIMEOUT)}requestFullCompile(){var e;null===(e=this.progress)||void 0===e||e.report(o.Activity.Compile,o.ROUTINE_ANALYSIS_MESSAGE,{delay_ms:o.SLOW_ACTIVITY_DELAY_MS,fallback:!0}),this.compile_start_time=Date.now(),this.requester.sendFullCompileRequest(),this.state=c.DOING_FULL_COMPILE}recordLatency(e,t){if(!t)return;const i=Date.now()-t;"edit"==e?(this.send_start_time=0,this.edit_latency_ms=this.smooth(this.edit_latency_ms,i)):(this.compile_start_time=0,this.compile_latency_ms=this.smooth(this.compile_latency_ms,i)),this.reportMetrics()}smooth(e,t){return null==e?t:e+l.LATENCY_SMOOTHING*(t-e)}reportMetrics(){var e;null===(e=this.metrics)||void 0===e||e.report(this.edit_latency_ms,this.compile_latency_ms,this.response_handler.incremental_analysis_requested,this.incremental_stats)}onStatsReceived(e){this.incremental_stats=(0,s.summariseIncrementalStats)(e),this.reportMetrics()}requestStatsIfDue(){if(!this.response_handler.stats_supported)return;const e=Date.now();e-this.last_stats_request_at<l.STATS_INTERVAL||(this.last_stats_request_at=e,this.requester.sendStatsRequest())}startEditTimer(e){this.clearEditTimer(),this.edit_timer=setTimeout(()=>{this.onEditTimeout()},e)}clearEditTimer(){clearTimeout(this.edit_timer),this.edit_timer=null}startIdleTimer(){this.clearIdleTimer(),this.idle_timer=setTimeout(()=>{this.onIdleTimeout()},l.HEAP_CHECK_IDLE_TIMEOUT)}clearIdleTimer(){this.idle_timer&&(clearTimeout(this.idle_timer),this.idle_timer=null)}start(e){this.clearEditTimer(),this.clearIdleTimer(),this.state=c.DOING_PARTIAL_COMPILE,this.sendMultiEdits(e)}whenFlushed(){return 0==this.pending_changes.size?Promise.resolve():(this.sendQueued("flush ahead of a query"),0==this.pending_changes.size?Promise.resolve():new Promise(e=>{const t=setTimeout(()=>{this.flushed_waiters=this.flushed_waiters.filter(e=>e!==i),(0,n.log)("query proceeding without waiting further for the analyser to catch up"),e()},l.FLUSH_WAIT_TIMEOUT),i=()=>{clearTimeout(t),e()};this.flushed_waiters.push(i)}))}releaseFlushedWaiters(){if(0==this.flushed_waiters.length)return;this.sendQueued("flush for a waiting query");const e=this.flushed_waiters;this.flushed_waiters=[];for(const t of e)t()}sendQueued(e="send queued"){var t;if(0==this.pending_changes.size)return;if(this.state!=c.WAITING_FOR_MORE_EDITS&&this.state!=c.WAITING_FOR_MORE_EDITS_AFTER_PARTIAL_COMPILE)return;this.clearEditTimer(),this.send_start_time=Date.now();let i=[];for(let e of this.pending_changes.values())i.push({uri:e.uri,source:e.text});this.pending_changes.clear(),this.state=c.DOING_PARTIAL_COMPILE,null===(t=this.progress)||void 0===t||t.report(o.Activity.Edit,o.ROUTINE_ANALYSIS_MESSAGE,{delay_ms:o.SLOW_ACTIVITY_DELAY_MS,fallback:!0}),this.sendEdits(i)||this.onPartialCompileDone(0)}sendSupersedingEdit(){var e;if(0==this.pending_changes.size)return;this.clearEditTimer();const t=[];for(const e of this.pending_changes.values())t.push({uri:e.uri,source:e.text});this.pending_changes.clear(),this.sendEdits(t)&&(this.send_start_time=Date.now(),this.state=c.DOING_FULL_COMPILE_SUPERSEDED,null===(e=this.progress)||void 0===e||e.report(o.Activity.Edit,o.ROUTINE_ANALYSIS_MESSAGE,{delay_ms:o.SLOW_ACTIVITY_DELAY_MS,fallback:!0}))}sendEdits(e){if(!this.response_handler.edit_deltas_supported)return this.sendMultiEdits(e),!0;const t=[];for(let i of e){const n=(0,r.normalizeFileUri)(i.uri),o=this.last_sent_text.get(n);if(!o)return this.sendMultiEdits(e),!0;const s=(0,a.computeSpan)(o,i.source);s&&(t.push(Object.assign({path:n},s)),this.last_sent_text.set(n,i.source))}return 0!==t.length&&(this.requester.sendEditDeltas(t),!0)}}t.EditQueue=l,l.FULL_BUILD_EDIT_TIMEOUT=1e3,l.PARTIAL_BUILD_EDIT_TIMEOUT=100,l.HEAP_CHECK_IDLE_TIMEOUT=6e4,l.LATENCY_SMOOTHING=.3,l.STATS_INTERVAL=2e3,l.FLUSH_WAIT_TIMEOUT=500},2312(e,t,i){"use strict";t.ExtensionState=void 0;const n=i(2861),r=i(1327),o=i(5172),s=i(8945),a=i(4465),c=i(2510),l=i(5215);class u{constructor(){this.workspaces=new Map,this.client_supports_configuration=!1,this.client_supports_refresh=!1}static getInstance(){return u.instance||(u.instance=new u),u.instance}reset(){this.workspaces.clear()}connect(){this.connection=(0,r.createConnection)(),this.documents=new n.TextDocuments(o.TextDocument),this.documents.onDidChangeContent(e=>{const t=this.getWorkspaceForUri(e.document.uri);null==t||t.edit_queue.queueEdit(e)}),this.documents.onDidOpen(()=>this.broadcastOpenFiles()),this.documents.onDidClose(()=>this.broadcastOpenFiles()),this.connection_event_handler=new a.ConnectionEventHandler(this,this.connection,this.documents),this.documents.listen(this.connection),this.connection.listen()}setClientSupportsConfiguration(e){this.client_supports_configuration=e;for(const t of this.allWorkspaces())t.client_supports_configuration=e}setClientSupportsRefresh(e){this.client_supports_refresh=e;for(const t of this.allWorkspaces())t.response_handler.client_supports_refresh=e}registerWorkspace(e){const t=this.workspaces.get(e);if(t)return t;const i=new c.WorkspaceContext(e,this.connection,this.documents);return i.client_supports_configuration=this.client_supports_configuration,i.response_handler.client_supports_refresh=this.client_supports_refresh,this.workspaces.set(e,i),i}unregisterWorkspace(e){var t;const i=this.workspaces.get(e);i&&(null===(t=i.server_manager)||void 0===t||t.kill(),this.workspaces.delete(e))}allWorkspaces(){return Array.from(this.workspaces.values())}broadcastOpenFiles(){var e,t;const i=new Map;for(const t of this.documents.all()){const n=this.getWorkspaceForUri(t.uri);if(!n)continue;const r=null!==(e=i.get(n))&&void 0!==e?e:[];r.push(t.uri),i.set(n,r)}for(const e of this.allWorkspaces())e.edit_queue.sendOpenFiles(null!==(t=i.get(e))&&void 0!==t?t:[])}defaultWorkspace(){const e=this.workspaces.values().next();return e.done?null:e.value}getWorkspaceForUri(e){let t;try{t=s.URI.parse(e).fsPath}catch(t){return(0,l.log)(`getWorkspaceForUri: could not parse uri '${e}': ${t}`),null}if(!t)return null;const i=t.replace(/\\/g,"/");let n=null,r=-1;for(const e of this.workspaces.values()){const t=e.workspace_root.replace(/\\/g,"/");(i===t||i.startsWith(t+"/"))&&t.length>r&&(n=e,r=t.length)}return n}onDidChangeWatchedFiles(e){var t;if(null==e?void 0:e.changes)for(const i of e.changes){const e=this.getWorkspaceForUri(i.uri);e&&(null===(t=e.document_change_tracker)||void 0===t||t.onDidChangeWatchedFiles({changes:[i]}))}}}t.ExtensionState=u},6634(e,t,i){"use strict";t.generateAssembliesJson=function(e){return function(e,t,i){return function(e){return!!(0,r.readdirSync)(e).find(e=>e.endsWith(".ghulproj"))||((0,o.log)("no .ghulproj found: cannot generate .assemblies.json"),!1)}(e)?((0,o.log)(`${i}...`),new Promise(r=>{(0,n.execFile)(s,t,{cwd:e},(e,t)=>{if(e){let t=`could not generate .assemblies.json — the ghūl project may be missing or invalid: ${(n=e)instanceof Error?n.message:String(n)}`;return(0,o.log)(t),void r(t)}var n;(0,o.log)(t),(0,o.log)(`finished ${i}`),r(null)})})):Promise.resolve(null)}(e,a,"building project references")};const n=i(5317),r=i(9896),o=i(5215),s="dotnet",a=["build","-verbosity:minimal","-t:GenerateAssembliesJson"]},5657(e,t,i){"use strict";t.generateGhulOptionsJson=function(e){return function(e){let t;try{t=(0,r.readdirSync)(e)}catch(t){return(0,o.log)(`could not read ${e}: cannot generate .ghul-options.json`),!1}return!!t.find(e=>e.endsWith(".ghulproj"))||((0,o.log)("no .ghulproj found: cannot generate .ghul-options.json"),!1)}(e)?((0,o.log)("resolving compiler options..."),new Promise(t=>{(0,n.execFile)("dotnet",s,{cwd:e},(e,i)=>{e?(0,o.log)(`could not generate .ghul-options.json (falling back to hand-parsed .ghulproj options): ${e.message}`):((0,o.log)(i),(0,o.log)("finished resolving compiler options")),t()})})):Promise.resolve()};const n=i(5317),r=i(9896),o=i(5215),s=["build","-verbosity:minimal","-t:GenerateGhulOptionsJson"]},7221(e,t,i){"use strict";t.GhulAnalyser=void 0;const n=i(9896),r=i(7016),o=i(8862),s=i(4150);t.GhulAnalyser=class{constructor(e,t,i,n){this.edit_queue=e,this.documents=n,this.server_event_emitter=i,t.onConfigAvailable((e,t)=>{this.workspace_root=e,this.ghul_config=t}),i.onListening(()=>{this.analyseEntireProject()})}analyseEntireProject(){let e=this.ghul_config,t=[];e.source.forEach(e=>{t.push(...(0,o.globSync)(e,{cwd:this.workspace_root,absolute:!0}).filter(e=>e.endsWith(".ghul")).map(e=>(0,r.pathToFileURL)(e)))});let i=new Map;for(let e of this.documents.all())i.set((0,s.normalizeFileUri)(e.uri),e.getText());let a=t.map(e=>{let t=e.toString(),o=i.get((0,s.normalizeFileUri)(t));return{uri:t,source:void 0!==o?o:(0,n.readFileSync)((0,r.fileURLToPath)(e)).toString()}}),c=a.map(e=>e.uri).filter(e=>i.has((0,s.normalizeFileUri)(e)));this.edit_queue.sendOpenFiles(c),this.edit_queue.start(a)}}},7326(e,t,i){"use strict";t.getGhulConfig=function(e,t={}){var i,h;let d,p=[],f={};if((0,n.existsSync)(e+"/ghul.json"))try{let t=""+(0,n.readFileSync)(e+"/ghul.json","utf-8").replace(/^\uFEFF/,"");f=JSON.parse(t)}catch(e){let t=`could not load ghul.json: ${l(e)}`;(0,s.log)(t),p.push(t)}f.compiler&&(d="string"==typeof f.compiler?(0,c.parse)(f.compiler).map(e=>e.toString()):f.compiler);let g=!1;(0,n.existsSync)(e+"/.block-compiler")&&(g=!0);let m=null!==(i=f.other_flags)&&void 0!==i?i:[];"string"==typeof m&&(m=(0,c.parse)(m).map(e=>e.toString()));let y=!1;if((0,n.existsSync)(e+"/.ghul-options.json"))try{let t=(""+(0,n.readFileSync)(e+"/.ghul-options.json","utf-8")).replace(/^\uFEFF/,""),{options:i}=JSON.parse(t);i&&m.push(...(0,c.parse)(i).map(e=>e.toString())),y=!0}catch(e){let t=`could not load .ghul-options.json: ${l(e)}`;(0,s.log)(t),p.push(t)}let v=(0,r.globSync)(e+"/*.ghulproj");if(1==v.length){let e=v[0];try{let t=""+(0,n.readFileSync)(e,"utf-8").replace(/^\uFEFF/,"");(0,o.parseString)(t,(t,i)=>{var n,r;if(!t&&i&&i.Project){if(!f.update_compiler_tool&&i.Project.PropertyGroup&&i.Project.PropertyGroup.filter(e=>e.UpdateCompilerTool).map(e=>e.UpdateCompilerTool)[0]&&((0,s.log)("will update any locally installed compiler tool to latest version"),f.update_compiler_tool=!0),!d&&i.Project.PropertyGroup){let t=null===(n=i.Project.PropertyGroup.filter(e=>e.GhulCompiler).map(e=>e.GhulCompiler)[0])||void 0===n?void 0:n[0];""!=(null!=t?t:"")&&(d=(0,c.parse)(t).map(e=>e.toString()),(0,s.log)(`will use compiler '${(0,c.quote)([...d,...m])}' specified in ${e}`))}!(null===(r=f.source)||void 0===r?void 0:r.length)&&i.Project.ItemGroup?(f.source=[],i.Project.ItemGroup.filter(e=>e.GhulSources).map(e=>e.GhulSources).forEach(e=>{e.filter(e=>{var t;return null===(t=e.$)||void 0===t?void 0:t.Include}).map(e=>{var t;return null===(t=e.$)||void 0===t?void 0:t.Include}).forEach(e=>{f.source.push(e)})})):f.source&&(f.source=f.source.map(e=>e+"/**/*.ghul")),!y&&i.Project.ItemGroup&&i.Project.ItemGroup.filter(e=>e.GhulOptions).map(e=>e.GhulOptions).forEach(e=>{e.filter(e=>{var t,i;return(null===(t=e.$)||void 0===t?void 0:t.Include)&&!(null===(i=e.$)||void 0===i?void 0:i.Condition)}).map(e=>e.$.Include).forEach(e=>{m.push(...(0,c.parse)(e).map(e=>e.toString()))})})}else{let i=`could not parse ghūl project file ${e}`+(t?`: ${l(t)}`:"");(0,s.log)(i),p.push(i)}})}catch(t){let i=`could not read ghūl project file ${e}: ${l(t)}`;(0,s.log)(i),p.push(i)}}else v.length>0&&(0,s.log)("ignoring multiple .ghulproj files:"+v.join(","));if(!d){if((0,n.existsSync)(e+"/.config/dotnet-tools.json"))try{let t=(""+(0,n.readFileSync)(e+"/.config/dotnet-tools.json","utf-8")).replace(/^\uFEFF/,""),i=JSON.parse(t),{tools:r}=i,o=r["ghul.compiler"];o&&1==o.commands.length&&(d=["dotnet","tool","run",o.commands[0]],(0,s.log)(`will use compiler '${(0,c.quote)([...d,...m])}' version ${o.version} from local tool manifest`))}catch(e){let t=`could not load .config/dotnet-tools.json: ${l(e)}`;(0,s.log)(t),p.push(t)}if(!d){let t=(0,a.spawnSync)("dotnet",["ghul-compiler"],{encoding:"utf-8",cwd:e});0===t.status&&t.stdout.startsWith("ghūl")&&(d=["dotnet","ghul-compiler"],(0,s.log)(`will use compiler '${(0,c.quote)([...d,...m])}'`))}if(!d){let t=(0,a.spawnSync)("ghul-compiler",{encoding:"utf-8",cwd:e});0===t.status&&t.stdout.startsWith("ghūl")&&(d=["ghul-compiler"],(0,s.log)(`will use compiler '${(0,c.quote)([...d,...m])}'`))}}if(!d){let e="no usable ghūl compiler found: install the ghul.compiler tool or set 'compiler' in ghul.json";(0,s.log)(e),p.push(e)}if(f.update_compiler_tool){let t=(0,a.spawnSync)("dotnet",["tool","update","ghul.compiler","--local"],{encoding:"utf-8",cwd:e});(0,s.log)(t.stdout),0===t.status?(0,s.log)("compiler tool update successful"):((0,s.log)(t.stderr),(0,s.log)("compiler tool update failed"))}let _=[];if((0,n.existsSync)(e+"/.assemblies.json"))try{let t=(""+(0,n.readFileSync)(e+"/.assemblies.json","utf-8")).replace(/^\uFEFF/,""),{assemblies:i}=JSON.parse(t);for(let e of i)(0,n.existsSync)(e)?(m.push("-a"),m.push(e)):_.push(e);_.length&&(0,s.log)(`${_.length} referenced assembly/assemblies not present yet, analysis will be incomplete until they are built: ${_.join(", ")}`)}catch(e){let t=`could not load .assemblies.json: ${l(e)}`;(0,s.log)(t),p.push(t)}m.push("-A");let b=u(t.incremental_analysis,f.incremental_analysis);b&&m.push("--incremental-analysis");let w=[...null!==(h=f.source)&&void 0!==h?h:["./**/*.ghul"]];return{block:g,compiler:d,source:w,arguments:m,want_plaintext_hover:u(t.want_plaintext_hover,f.want_plaintext_hover),incremental_analysis:b,missing_assemblies:_,problems:p}};const n=i(9896),r=i(8862),o=i(8805),s=i(5215),a=i(5317),c=i(5192);function l(e){return e instanceof Error?e.message:String(e)}function u(e,t){var i;return null!==(i=null!=e?e:t)&&void 0!==i&&i}},5127(e,t){"use strict";t.QR=t.Bj=t.UU=t.nY=void 0,t.summariseIncrementalStats=function(e){var i,n,r;const o=new Map;for(const t of null!=e?e:[])o.set(t.name,t.count);const s=null!==(i=o.get(t.nY))&&void 0!==i?i:0,a=null!==(n=o.get(t.UU))&&void 0!==n?n:0,c=null!==(r=o.get(t.Bj))&&void 0!==r?r:0;let l=null,u=0;for(const[e,i]of o)!e.startsWith(t.QR)||i<=u||(l=e.slice(t.QR.length),u=i);return{body_rewalk:s,interface_incremental:a,full_rebuild:c,total:s+a+c,top_decline_reason:l,top_decline_count:u}},t.nY="edit-path-body-rewalk",t.UU="edit-path-interface-incremental",t.Bj="edit-path-full-rebuild",t.QR="edit-declined-"},5215(e,t){"use strict";t.log=function(...e){console.log("ghūl:",...e)}},1376(e,t,i){"use strict";t.MetricsReporter=t.s=void 0;const n=i(5215);t.s="ghul/metrics",t.MetricsReporter=class{constructor(e,t){this.latest=null,this.last_sent_at=0,this.timer=null,this.connection=e,this.workspace_root=t}report(e,t,i=!1,n=null){var r,o;if(this.latest={workspace:this.workspace_root,edit_ms:e,compile_ms:t,incremental_requested:i,incremental:n},this.timer)return;const s=Date.now()-this.last_sent_at;s>=2e3?this.send():(this.timer=setTimeout(()=>{this.timer=null,this.send()},2e3-s),null===(o=(r=this.timer).unref)||void 0===o||o.call(r))}dispose(){this.timer&&(clearTimeout(this.timer),this.timer=null)}send(){var e;if(this.latest&&(null===(e=this.connection)||void 0===e?void 0:e.sendNotification)){this.last_sent_at=Date.now();try{this.connection.sendNotification(t.s,this.latest)}catch(e){(0,n.log)(`could not report analysis metrics: ${e}`)}}}}},4150(e,t,i){"use strict";t.normalizeFileUri=function(e){return new n.URL(e).toString().replace("%3A",":")};const n=i(7016)},4855(e,t,i){"use strict";t.Requester=void 0;const n=i(5215),r=i(4150),o=i(1424);t.Requester=class{get analysed(){return this._analysed}set analysed(e){this._analysed=e,e&&this.releaseAnalysedWaiters()}constructor(e,t,i,r=()=>{}){this.analysed_waiters=[],this.response_handler=t,this.watchdog=i,this.ensure_running=r,this.analysed=!1,e.onStarting(()=>{this.analysed=!1}),e.onRunning(e=>{(0,n.log)(`ghūl language extension v${o}: initialized`),this.stream=e.stdin})}whenAnalysed(e,t=null,i){return this.ensure_running(),this.analysed?(this.watchdog.startWatchdogIfNotRunning(),e()):new Promise(r=>{const o=()=>{this.analysed_waiters=this.analysed_waiters.filter(e=>e!==a),clearTimeout(s)},s=setTimeout(()=>{o(),(0,n.log)("query timed out waiting for the analyser to become ready"),r(t)},6e4);null==i||i.onCancellationRequested(()=>{o(),r(t)});const a=()=>{clearTimeout(s),this.watchdog.startWatchdogIfNotRunning(),r(e())};this.analysed_waiters.push(a)})}untilFirstAnalysed(){return this.analysed?Promise.resolve():new Promise(e=>this.analysed_waiters.push(e))}releaseAnalysedWaiters(){const e=this.analysed_waiters;this.analysed_waiters=[];for(const t of e)t()}write(e){try{this.stream.write(e)}catch(e){(0,n.log)("caught exception trying to send request data: compiler may have died:"+e),this.response_handler.rejectAllAndThrow(e)}}send(e){this.write(JSON.stringify(e)+"\n")}sendDocuments(e){this.ensure_running(),this.watchdog.startWatchdogIfNotRunning(),this.send({command:"edit",files:e.map(({uri:e,source:t})=>({path:(0,r.normalizeFileUri)(e),source:t}))})}sendEditDeltas(e){this.ensure_running(),this.watchdog.startWatchdogIfNotRunning(),this.send({command:"edit_delta",files:e})}sendOpenFiles(e){this.stream&&this.send({command:"set_open_files",paths:e.map(e=>(0,r.normalizeFileUri)(e))})}sendCodeActions(e,t,i){return this.response_handler.code_actions_supported?this.whenAnalysed(()=>(this.send({command:"code_actions",path:(0,r.normalizeFileUri)(e),start_line:t.start.line+1,start_column:t.start.character+1,end_line:t.end.line+1,end_column:t.end.character+1}),this.response_handler.expectCodeActions()),[],i):Promise.resolve([])}sendHover(e,t,i,n){return this.whenAnalysed(()=>(this.send({command:"hover",path:(0,r.normalizeFileUri)(e),line:t+1,column:i+1}),this.response_handler.expectHover()),null,n)}sendDefinition(e,t,i,n){return this.whenAnalysed(()=>(this.send({command:"definition",path:(0,r.normalizeFileUri)(e),line:t+1,column:i+1}),this.response_handler.expectDefinition()),null,n)}sendDeclaration(e,t,i,n){return this.whenAnalysed(()=>(this.send({command:"declaration",path:(0,r.normalizeFileUri)(e),line:t+1,column:i+1}),this.response_handler.expectDeclaration()),null,n)}sendCompletion(e,t,i,n=!1,o){return this.whenAnalysed(()=>(this.send({command:"complete",path:(0,r.normalizeFileUri)(e),line:t+1,column:i+1,is_member_trigger:n}),this.response_handler.expectCompletion()),null,o)}sendSignature(e,t,i,n){return this.whenAnalysed(()=>(this.send({command:"signature",path:(0,r.normalizeFileUri)(e),line:t+1,column:i+1}),this.response_handler.expectSignature()),null,n)}sendDocumentSymbol(e,t){return this.whenAnalysed(()=>(this.send({command:"symbols",path:(0,r.normalizeFileUri)(e)}),this.response_handler.expectSymbols()),null,t)}sendWorkspaceSymbol(e){return this.whenAnalysed(()=>(this.send({command:"symbols",path:""}),this.response_handler.expectSymbols()),null,e)}sendReferences(e,t,i,n){return this.whenAnalysed(()=>(this.send({command:"references",path:(0,r.normalizeFileUri)(e),line:t+1,column:i+1}),this.response_handler.expectReferences()),null,n)}sendImplementation(e,t,i,n){return this.whenAnalysed(()=>(this.send({command:"implementation",path:(0,r.normalizeFileUri)(e),line:t+1,column:i+1}),this.response_handler.expectImplementation()),null,n)}sendTypeDefinition(e,t,i,n){return this.whenAnalysed(()=>(this.send({command:"type_definition",path:(0,r.normalizeFileUri)(e),line:t+1,column:i+1}),this.response_handler.expectTypeDefinition()),null,n)}sendRenameRequest(e,t,i,n){return this.whenAnalysed(()=>(this.send({command:"rename",path:(0,r.normalizeFileUri)(e),line:t+1,column:i+1,new_name:n}),this.response_handler.expectRenameRequest()))}sendSemanticTokens(e,t){return this.whenAnalysed(()=>(this.send({command:"semantic_tokens",path:(0,r.normalizeFileUri)(e)}),this.response_handler.expectSemanticTokens()),null,t)}sendInlayHints(e,t){return this.whenAnalysed(()=>(this.send({command:"inlay_hints",path:(0,r.normalizeFileUri)(e)}),this.response_handler.expectInlayHints()),[],t)}sendDocumentFormatting(e,t,i){return this.whenAnalysed(()=>(this.send({command:"format",path:(0,r.normalizeFileUri)(e),source:t}),this.response_handler.expectDocumentFormatting(i)))}sendDocumentRangeFormatting(e,t,i){return this.whenAnalysed(()=>(this.send({command:"format_range",path:(0,r.normalizeFileUri)(e),start_line:i.start.line+1,start_column:i.start.character+1,end_line:i.end.line+1,end_column:i.end.character+1,source:t}),this.response_handler.expectDocumentRangeFormatting()))}sendFullCompileRequest(){this.watchdog.startWatchdogIfNotRunning(),this.send({command:"compile"})}sendHeapCheckRequest(){this.watchdog.startWatchdogIfNotRunning(),this.send({command:"heap_check"})}sendStatsRequest(){this.send({command:"stats"})}sendRestart(){this.analysed&&(this.watchdog.startWatchdogIfNotRunning(),this.send({command:"restart"}))}}},1323(e,t,i){"use strict";t.ResponseHandler=t.SEMANTIC_TOKENS_LEGEND=t.EI=t.f1=void 0;const n=i(2861),r=i(5215),o=i(4150),s=i(2029);class a{constructor(e){this._name=e,this._queue=[]}enqueue(){return new Promise((e,t)=>{this._queue.push({resolve:e,reject:t})})}dequeue(){return this._queue.shift()}dequeueAlways(){var e;return null!==(e=this._queue.shift())&&void 0!==e?e:{resolve:e=>console.log(this._name+": oops: unexpected resolve: "+JSON.stringify(e)),reject:e=>console.log(this._name+": oops: unexpected reject: "+e)}}isEmpty(){return 0==this._queue.length}resolve(e){this.dequeueAlways().resolve(e)}reject(e){console.log(this._name+": will reject: "+e),this.dequeueAlways().reject(e)}resolveAll(e){for(let t=this.dequeue();t;t=this.dequeue())t.resolve(e)}rejectAll(e){console.log(this._name+": will reject ALL: "+e);for(let t=this.dequeue();t;t=this.dequeue())t.reject(e)}}t.f1=["namespace","class","interface","struct","enum","enumMember","typeParameter","method","function","property","variable","parameter","operator","modifier"],t.EI=["static","readonly","modification"],t.SEMANTIC_TOKENS_LEGEND={tokenTypes:t.f1,tokenModifiers:t.EI};const c=new Map(t.f1.map((e,t)=>[e,t])),l=new Map(t.EI.map((e,t)=>[e,1<<t]));t.ResponseHandler=class{constructor(e,t){this.incremental_analysis_requested=!1,this.stats_supported=!1,this.edit_deltas_supported=!1,this.compile_abort_supported=!1,this.client_supports_refresh=!1,this.code_actions_supported=!1,this._formatting_ranges=[],this.connection=e,t.onConfigAvailable((e,t)=>{this.onConfigAvailable(e,t)}),this._hover_promise_queue=new a("HOVER"),this._definition_promise_queue=new a("DEFINITION"),this._declaration_promise_queue=new a("DECLARATION"),this._completion_promise_queue=new a("COMPLETION"),this._signature_promise_queue=new a("SIGNATURE"),this._symbols_promise_queue=new a("SYMBOLS"),this._references_promise_queue=new a("REFERENCES"),this._implementation_promise_queue=new a("IMPLEMENTATION"),this._type_definition_promise_queue=new a("TYPEDEFINITION"),this._rename_promise_queue=new a("RENAMEREQUEST"),this._formatting_promise_queue=new a("FORMAT"),this._range_formatting_promise_queue=new a("FORMATRANGE"),this._semantic_tokens_promise_queue=new a("SEMANTICTOKENS"),this._inlay_hints_promise_queue=new a("INLAYHINTS"),this._code_actions_promise_queue=new a("CODEACTIONS")}onConfigAvailable(e,t){this.want_plaintext_hover=t.want_plaintext_hover,this.incremental_analysis_requested=t.incremental_analysis}resolveAllPendingPromises(){this._hover_promise_queue.resolveAll(null),this._definition_promise_queue.resolveAll([]),this._declaration_promise_queue.resolveAll([]),this._completion_promise_queue.resolveAll([]),this._signature_promise_queue.resolveAll(null),this._symbols_promise_queue.resolveAll([]),this._references_promise_queue.resolveAll([]),this._implementation_promise_queue.resolveAll([]),this._type_definition_promise_queue.resolveAll(null),this._rename_promise_queue.resolveAll(null),this._formatting_promise_queue.resolveAll([]),this._range_formatting_promise_queue.resolveAll([]),this._semantic_tokens_promise_queue.resolveAll({data:[]}),this._inlay_hints_promise_queue.resolveAll([]),this._code_actions_promise_queue.resolveAll([]),this._formatting_ranges=[]}rejectAllPendingPromises(e){this._hover_promise_queue.rejectAll(e),this._definition_promise_queue.rejectAll(e),this._declaration_promise_queue.rejectAll(e),this._completion_promise_queue.rejectAll(e),this._signature_promise_queue.rejectAll(e),this._symbols_promise_queue.rejectAll(e),this._references_promise_queue.rejectAll(e),this._implementation_promise_queue.rejectAll(e),this._type_definition_promise_queue.rejectAll(e),this._rename_promise_queue.rejectAll(e),this._formatting_promise_queue.rejectAll(e),this._range_formatting_promise_queue.rejectAll(e),this._semantic_tokens_promise_queue.rejectAll(e),this._inlay_hints_promise_queue.rejectAll(e),this._code_actions_promise_queue.rejectAll(e),this._formatting_ranges=[]}rejectAllAndThrow(e){throw(0,r.log)(e),this.rejectAllPendingPromises(e),e}setServerManager(e){null==this.server_manager?this.server_manager=e:this.rejectAllAndThrow("replacing existing server manager in ResponseHandler")}setEditQueue(e){null==this.edit_queue?this.edit_queue=e:this.rejectAllAndThrow("replacing existing edit queue in ResponseHandler")}handleListen(e){var t;let i=null!==(t=null==e?void 0:e.capabilities)&&void 0!==t?t:[];this.incremental_analysis_requested&&!i.includes("incremental-analysis")&&(0,r.log)("ghul.json sets incremental_analysis but the spawned compiler does not advertise it — running with the feature disabled. Upgrade ghul.compiler to use it."),this.code_actions_supported=i.includes("code-actions"),this.stats_supported=i.includes("incremental-analysis"),this.edit_deltas_supported=i.includes("edit-deltas"),this.compile_abort_supported=i.includes("compile-abort"),this.server_manager.startListening()}handleDiagnostics(e){for(let[t,i]of this.parseDiagnostics(e))this.connection.sendDiagnostics({uri:t,diagnostics:i});let t;this.edit_queue.onDiagnosticsReceived(),null!=e.elapsed_ms&&(t=e.elapsed_ms),"partial"==e.phase?(this.edit_queue.onPartialCompileDone(t),this.refreshDerivedViews()):"full"==e.phase&&(this.edit_queue.onFullCompileDone(t),this.refreshDerivedViews())}refreshDerivedViews(){this.client_supports_refresh&&!this.edit_queue.hasPendingEdits()&&(this.connection.languages.semanticTokens.refresh().catch(e=>(0,r.log)("semantic token refresh failed: "+e)),this.connection.languages.inlayHint.refresh().catch(e=>(0,r.log)("inlay hint refresh failed: "+e)))}handleHeapCheckDone(){this.edit_queue.onHeapCheckDone()}handleStats(e){var t;this.edit_queue.onStatsReceived(null!==(t=e.entries)&&void 0!==t?t:[])}handleError(e){(0,r.log)(`analyser error: ${e.error_kind}: ${e.message}`)}expectCodeActions(){return this._code_actions_promise_queue.enqueue()}handleCodeActions(e){var t;let{resolve:i}=this._code_actions_promise_queue.dequeueAlways();i(null!==(t=e.diagnostics)&&void 0!==t?t:[])}expectHover(){return this._hover_promise_queue.enqueue()}handleHover(e){var t;let{resolve:i}=this._hover_promise_queue.dequeueAlways();try{let n=e.signature;if(null!=n&&0!=n.length||(n=null!==(t=e.description)&&void 0!==t?t:null),null==n||0==n.length)return void i(null);if(this.want_plaintext_hover)return void i({contents:{kind:"plaintext",value:e.kind_label?`${n} // ${e.kind_label}`:n}});const r=["```ghul",n,"```"];e.kind_label&&(r.push(""),r.push(`_${e.kind_label}_`)),i({contents:{kind:"markdown",value:r.join("\n")}})}catch(e){(0,r.log)("hover caught:",e),i(null)}}expectDefinition(){return this._definition_promise_queue.enqueue()}handleDefinition(e){let{resolve:t}=this._definition_promise_queue.dequeueAlways();try{let i=this.parseLocations(e);1==i.length?t(i[0]):t(null)}catch(e){(0,r.log)("definition caught:",e),t([])}}expectDeclaration(){return this._declaration_promise_queue.enqueue()}handleDeclaration(e){let{resolve:t}=this._declaration_promise_queue.dequeueAlways();try{t(this.parseLocations(e))}catch(e){(0,r.log)("declaration caught:",e),t([])}}expectCompletion(){return this._completion_promise_queue.enqueue()}handleCompletion(e){var t;let{resolve:i}=this._completion_promise_queue.dequeueAlways();try{let r=[];for(let i of null!==(t=e.items)&&void 0!==t?t:[]){let e={label:i.name,kind:i.kind,detail:i.description};i.kind_label&&(e.documentation={kind:n.MarkupKind.Markdown,value:`_${i.kind_label}_`}),i.insert_text&&(e.insertText=i.insert_text,e.insertTextFormat=n.InsertTextFormat.Snippet),r.push(e)}i(r)}catch(e){(0,r.log)("completion caught:",e),i([])}}expectSignature(){return this._signature_promise_queue.enqueue()}handleSignature(e){var t,i;let{resolve:n}=this._signature_promise_queue.dequeueAlways();try{let r=e.best_signature_index,o=e.current_parameter_index;r<0&&(r=void 0);let s=[];for(let n of null!==(t=e.signatures)&&void 0!==t?t:[]){let e=[];for(let t of null!==(i=n.parameters)&&void 0!==i?i:[])e.push({label:t});s.push({label:n.label,parameters:e})}n({signatures:s,activeSignature:r,activeParameter:o})}catch(e){(0,r.log)("signature caught:",e),n({signatures:[]})}}expectSymbols(){return this._symbols_promise_queue.enqueue()}handleSymbols(e){var t,i;let{resolve:n}=this._symbols_promise_queue.dequeueAlways();try{let o=[];for(let n of null!==(t=e.files)&&void 0!==t?t:[]){let e=n.path;for(let t of null!==(i=n.symbols)&&void 0!==i?i:[]){let i={name:t.search_description,kind:t.kind,location:{uri:e,range:{start:{line:Math.max(0,t.start_line-1),character:Math.max(0,t.start_column-1)},end:{line:Math.max(0,t.end_line-1),character:Math.max(0,t.end_column-1)}}},containerName:t.qualifier};"internal"!=i.location.uri&&"reflected"!=i.location.uri?o.push(i):(0,r.log)("oops: unexpected internal/reflected uri in symbols response: "+i.location.uri)}}n(o)}catch(e){(0,r.log)("symbols caught:"+e),n([])}}expectReferences(){return this._references_promise_queue.enqueue()}handleReferences(e){let{resolve:t}=this._references_promise_queue.dequeueAlways();try{t(this.parseLocations(e))}catch(e){(0,r.log)("references caught:",e),t([])}}expectImplementation(){return this._implementation_promise_queue.enqueue()}handleImplementation(e){let{resolve:t}=this._implementation_promise_queue.dequeueAlways();try{t(this.parseLocations(e))}catch(e){(0,r.log)("implementation caught:",e),t([])}}expectTypeDefinition(){return this._type_definition_promise_queue.enqueue()}handleTypeDefinition(e){let{resolve:t}=this._type_definition_promise_queue.dequeueAlways();try{let i=this.parseLocations(e);1==i.length?t(i[0]):t(null)}catch(e){(0,r.log)("type definition caught:",e),t(null)}}expectRenameRequest(){return this._rename_promise_queue.enqueue()}handleRenameRequest(e){var t;let{resolve:i}=this._rename_promise_queue.dequeueAlways();try{let n={};for(let i of null!==(t=e.edits)&&void 0!==t?t:[]){let e=i.file,t=n[e];t||(t=[],n[e]=t);let r={range:{start:{line:i.start_line-1,character:i.start_column-1},end:{line:i.end_line-1,character:i.end_column}},newText:i.new_name};t.push(r)}i({changes:n})}catch(e){(0,r.log)("rename request: caught:"+e),i({})}}expectDocumentFormatting(e){return this._formatting_ranges.push(e),this._formatting_promise_queue.enqueue()}handleDocumentFormatting(e){let{resolve:t}=this._formatting_promise_queue.dequeueAlways(),i=this._formatting_ranges.shift();try{t([{range:i,newText:e.text}])}catch(e){(0,r.log)("document formatting: caught:"+e),t([])}}expectDocumentRangeFormatting(){return this._range_formatting_promise_queue.enqueue()}handleDocumentRangeFormatting(e){let{resolve:t}=this._range_formatting_promise_queue.dequeueAlways();try{let i=e.start_line;if(!i)return void t([]);t([{range:{start:{line:i-1,character:e.start_column-1},end:{line:e.end_line-1,character:e.end_column-1}},newText:e.text}])}catch(e){(0,r.log)("document range formatting: caught:"+e),t([])}}expectSemanticTokens(){return this._semantic_tokens_promise_queue.enqueue()}handleSemanticTokens(e){let{resolve:t}=this._semantic_tokens_promise_queue.dequeueAlways();try{t(function(e){var t;const i=[];for(const n of null!=e?e:[]){if(!n)continue;const e=n.start_line,r=n.start_column,o=n.end_line,s=n.end_column,a=n.token_type,u=null!==(t=n.modifiers)&&void 0!==t?t:"";if(!(Number.isFinite(e)&&Number.isFinite(r)&&Number.isFinite(o)&&Number.isFinite(s)))continue;if(e!==o)continue;const h=c.get(a);if(void 0===h)continue;let d=0;if(u.length>0)for(const e of u.split(",")){const t=l.get(e);void 0!==t&&(d|=t)}const p=s-r+1;p<=0||i.push({line:e-1,startChar:r-1,length:p,typeIndex:h,modifierBits:d})}i.sort((e,t)=>e.line-t.line||e.startChar-t.startChar);const n=[];let r=0,o=0;for(const e of i){const t=e.line-r,i=0===t?e.startChar-o:e.startChar;n.push(t,i,e.length,e.typeIndex,e.modifierBits),r=e.line,o=e.startChar}return{data:n}}(e.tokens))}catch(e){(0,r.log)("semantic tokens caught:"+e),t({data:[]})}}expectInlayHints(){return this._inlay_hints_promise_queue.enqueue()}handleInlayHints(e){let{resolve:t}=this._inlay_hints_promise_queue.dequeueAlways();try{t(function(e,t=!1){var i;const r=[];for(const o of null!=e?e:[]){if(!o)continue;const e=o.line,s=o.column;if(!Number.isFinite(e)||!Number.isFinite(s))continue;const a={position:n.Position.create(e-1,s-1),label:null!==(i=o.label)&&void 0!==i?i:"",kind:n.InlayHintKind.Type};if(o.detail&&o.detail.length>0)if(t)a.tooltip={kind:n.MarkupKind.PlainText,value:o.detail};else{const e=o.detail.indexOf("\n\n"),t=e>=0?o.detail.slice(0,e):o.detail,i=e>=0?o.detail.slice(e+2):"",r=["```ghul",t,"```"].join("\n");a.tooltip={kind:n.MarkupKind.Markdown,value:i?r+"\n\n"+i:r}}r.push(a)}return r}(e.hints,this.want_plaintext_hover))}catch(e){(0,r.log)("inlay hints caught:"+e),t([])}}handleRestart(){(0,r.log)("compiler requested restart"),this.server_manager.noteRecycle(),this.edit_queue.reset()}handleExit(e){(0,r.log)("compiler is exiting: "+e),this.server_manager.noteIdleExit(),this.edit_queue.reset()}handleUnexpected(){this.server_manager.abort()}parseDiagnostics(e){var t,i;let n=new Map,r=e=>{if("internal"==e||"reflected"==e)return null;let t=e;return t.startsWith("file://")||(t="file://"+t),(0,o.normalizeFileUri)(t)};for(let i of null!==(t=e.checked_paths)&&void 0!==t?t:[]){let e=r(i);null==e||n.has(e)||n.set(e,[])}for(let t of null!==(i=e.diagnostics)&&void 0!==i?i:[]){let e=r(t.path);if(null==e)continue;n.has(e)||n.set(e,[]);let i={severity:s.SeverityMapper.getSeverity(t.severity,"new"),range:{start:{line:t.start_line-1,character:t.start_column-1},end:{line:t.end_line-1,character:t.end_column-1}},message:t.message,source:"ghūl"};if(t.code&&(i.code=t.code),t.related&&t.related.length>0){let e=[];for(let i of t.related){let t=r(i.location.file);null!=t&&e.push({location:{uri:t,range:{start:{line:i.location.start_line-1,character:i.location.start_column-1},end:{line:i.location.end_line-1,character:i.location.end_column-1}}},message:i.message})}e.length>0&&(i.relatedInformation=e)}n.get(e).push(i)}return n}parseLocations(e){var t;let i=[];for(let n of null!==(t=e.locations)&&void 0!==t?t:[])i.push({uri:n.file,range:{start:{line:n.start_line-1,character:n.start_column-1},end:{line:n.end_line-1,character:n.end_column}}});return i}}},2644(e,t,i){"use strict";t.ResponseParser=void 0;const n=i(5215);t.ResponseParser=class{constructor(e,t){this.buffer="",this.response_handler=e,this.watchdog=t}reset(){this.buffer=""}handleChunk(e){e=e.replace(/\r/g,""),this.buffer+=e;let t=this.buffer.split("\n");this.buffer=t.pop();for(let e of t)e.length>0&&this.handleLine(e)}handleLine(e){let t;try{t=JSON.parse(e)}catch(e){return(0,n.log)("response parser: protocol error: could not parse JSON message: "+e),void this.response_handler.rejectAllPendingPromises("response parser: protocol error: could not parse JSON message: "+e)}switch(this.watchdog.clearWatchdog(),t.kind){case"listen":this.response_handler.handleListen(t);break;case"diagnostics":this.response_handler.handleDiagnostics(t);break;case"code_actions":this.response_handler.handleCodeActions(t);break;case"hover":this.response_handler.handleHover(t);break;case"definition":this.response_handler.handleDefinition(t);break;case"declaration":this.response_handler.handleDeclaration(t);break;case"completion":this.response_handler.handleCompletion(t);break;case"signature":this.response_handler.handleSignature(t);break;case"symbols":this.response_handler.handleSymbols(t);break;case"references":this.response_handler.handleReferences(t);break;case"implementation":this.response_handler.handleImplementation(t);break;case"type_definition":this.response_handler.handleTypeDefinition(t);break;case"rename":this.response_handler.handleRenameRequest(t);break;case"restart":this.response_handler.handleRestart();break;case"exit":this.response_handler.handleExit(t.reason);break;case"heap_check":this.response_handler.handleHeapCheckDone();break;case"format":this.response_handler.handleDocumentFormatting(t);break;case"format_range":this.response_handler.handleDocumentRangeFormatting(t);break;case"semantic_tokens":this.response_handler.handleSemanticTokens(t);break;case"inlay_hints":this.response_handler.handleInlayHints(t);break;case"stats":this.response_handler.handleStats(t);break;case"error":this.response_handler.handleError(t);break;default:this.response_handler.handleUnexpected()}}}},576(e,t,i){"use strict";t.restoreDotNetTools=function(e){return(0,o.existsSync)(e+"/.config/dotnet-tools.json")?((0,r.log)("restoring .NET tools..."),new Promise(t=>{(0,n.execFile)("dotnet",["tool","restore"],{cwd:e},(e,i)=>{if(e){let i=`could not restore .NET tools: ${e.message}`;return(0,r.log)(i),void t(i)}(0,r.log)(i),(0,r.log)("finished restoring .NET tools"),t(null)})})):((0,r.log)("no .config/dotnet-tools.json found: won't attempt to restore .NET tools"),Promise.resolve(null))};const n=i(5317),r=i(5215),o=i(9896)},5252(e,t,i){"use strict";t.ServerEventEmitter=void 0;const n=i(4434);class r extends n.EventEmitter{constructor(){super()}starting(){this.emit("starting")}running(e){this.emit("running",e)}listening(){this.emit("listening")}analysed(){this.emit("analysed")}abort(){this.emit("aborted")}killing(){this.emit("killing")}killed(){this.emit("killed")}onStarting(e){this.on("starting",e)}onRunning(e){this.on("running",e)}onListening(e){this.on("listening",e)}onAnalysed(e){this.on("analysed",e)}onAbort(e){this.on("abort",e)}onKilling(e){this.on("killing",e)}onKilled(e){this.on("killed",e)}}t.ServerEventEmitter=r},7684(e,t,i){"use strict";var n,r=this&&this.__createBinding||(Object.create?function(e,t,i,n){void 0===n&&(n=i);var r=Object.getOwnPropertyDescriptor(t,i);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[i]}}),Object.defineProperty(e,n,r)}:function(e,t,i,n){void 0===n&&(n=i),e[n]=t[i]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||(n=function(e){return n=Object.getOwnPropertyNames||function(e){var t=[];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[t.length]=i);return t},n(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i=n(e),s=0;s<i.length;s++)"default"!==i[s]&&r(t,e,i[s]);return o(t,e),t});Object.defineProperty(t,"__esModule",{value:!0}),t.ServerManager=t.MAX_RESTART_ATTEMPTS=t.ServerState=void 0;const a=s(i(6928)),c=i(9896),l=i(5192),u=i(5317),h=i(5215);var d;!function(e){e[e.Cold=0]="Cold",e[e.StartingUp=1]="StartingUp",e[e.Listening=2]="Listening",e[e.Aborted=3]="Aborted",e[e.Blocked=4]="Blocked",e[e.Failed=5]="Failed",e[e.Dormant=6]="Dormant"}(d||(t.ServerState=d={})),t.MAX_RESTART_ATTEMPTS=5;const p=new Map;t.ServerManager=class{constructor(e,t,i,n,r,o,s,a){this.event_emitter=t,this.edit_queue=i,this.response_handler=n,this.response_parser=r,this.watchdog=o,this.workspace_root=s,this.connection=a,this.restart_attempts=0,e.onConfigAvailable((e,t)=>{if(this.isServingConfig(t))return(0,h.log)("configuration is unchanged: keeping the running compiler"),void(this.ghul_config=t);this.ghul_config=t,this.start()})}isServingConfig(e){return!(this.server_state!=d.Listening&&this.server_state!=d.StartingUp||!this.child||null!=this.child.exitCode)&&JSON.stringify(this.ghul_config)==JSON.stringify(e)}start(){this.clearRestartTimer(),this.restart_attempts=0,this.launch()}reapAbandonedCompiler(){var e;const t=p.get(this.workspace_root);if(t&&t!==this.child&&null==t.exitCode){(0,h.log)(`killing abandoned compiler PID ${t.pid} left by an earlier connection`);try{null===(e=t.stdout)||void 0===e||e.removeAllListeners("data"),t.removeAllListeners("exit"),t.removeAllListeners("error"),t.on("error",e=>(0,h.log)(`abandoned compiler PID ${t.pid} errored while being killed: ${e}`)),t.kill()}catch(e){(0,h.log)("killing abandoned compiler caught: "+e)}p.delete(this.workspace_root)}}launch(){var e,t,i;this.event_emitter.starting(),this.server_state=d.StartingUp;let n=this.ghul_config.compiler;if(this.child&&((0,h.log)("killing running compiler PID "+this.child.pid),this.expecting_exit=!0,this.expecting_recycle=!1,this.expecting_idle_exit=!1,null===(e=this.child.stdout)||void 0===e||e.removeAllListeners("data"),this.child.kill()),this.reapAbandonedCompiler(),this.ghul_config.block)return(0,h.log)("compiler block requested: won't spawn compiler"),void(this.server_state=d.Blocked);if(!n||0==n.length)return void this.fail("ghūl language extension: no ghūl compiler could be found. "+((null===(t=this.ghul_config.problems)||void 0===t?void 0:t.length)?this.ghul_config.problems.join("; "):"Install the ghul.compiler tool or set 'compiler' in ghul.json."));const r=a.join(this.workspace_root,".analysis.rsp");(0,c.writeFileSync)(r,(0,l.quote)(this.ghul_config.arguments)),(0,h.log)(`compiler is "${(0,l.quote)(n)}"`),this.child=(0,u.spawn)(n[0],[...n.slice(1),"@.analysis.rsp"],{cwd:this.workspace_root});let o=!1;const s=e=>{o||(o=!0,this.child=null,this.response_handler.resolveAllPendingPromises(),this.edit_queue.reset(),(0,h.log)(e),this.scheduleRestart())};this.child.on("error",e=>{this.expecting_exit?(0,h.log)(`compiler: error after expected exit: ${e.message}`):s(`compiler: failed to start: ${e.message}`)}),p.set(this.workspace_root,this.child),(0,h.log)(`spawned compiler process PID ${this.child.pid}`),this.child.stderr.on("data",e=>{process.stderr.write(e)}),this.response_parser.reset(),this.watchdog.enterColdStart(),this.child.stdout.on("data",e=>{this.response_parser.handleChunk(e.toString())}),this.event_emitter.running(this.child);const f=null===(i=this.child)||void 0===i?void 0:i.pid,g=this.child;this.child.on("exit",(e,t)=>{p.get(this.workspace_root)===g&&p.delete(this.workspace_root);const i=this.child===g;return this.expecting_exit?((0,h.log)(`compiler PID ${f}: exited`),i&&(this.child=null),this.response_handler.resolveAllPendingPromises(),void(this.expecting_exit=!1)):this.expecting_recycle?(this.expecting_recycle=!1,(0,h.log)(`compiler PID ${f}: recycled — relaunching`),i&&(this.child=null),this.response_handler.resolveAllPendingPromises(),this.edit_queue.reset(),void this.launch()):this.expecting_idle_exit?(this.expecting_idle_exit=!1,(0,h.log)(`compiler PID ${f}: exited while idle — will restart when next needed`),i&&(this.child=null),this.server_state=d.Dormant,this.response_handler.resolveAllPendingPromises(),void this.edit_queue.reset()):void s(`compiler PID ${f}: unexpected exit`)})}scheduleRestart(){if(this.clearRestartTimer(),this.restart_attempts++,this.restart_attempts>t.MAX_RESTART_ATTEMPTS)return void this.fail("ghūl language extension: the ghūl compiler failed to start repeatedly and will not be retried automatically. Check the ghūl project file and compiler configuration — saving a project file will retry.");const e=1==this.restart_attempts?0:Math.min(2e3*Math.pow(2,this.restart_attempts-2),16e3);(0,h.log)(`compiler: will restart (attempt ${this.restart_attempts} of ${t.MAX_RESTART_ATTEMPTS}) in ${e}ms`),this.restart_timer=setTimeout(()=>{this.restart_timer=null,this.launch()},e)}clearRestartTimer(){this.restart_timer&&(clearTimeout(this.restart_timer),this.restart_timer=null)}fail(e){var t,i;this.clearRestartTimer(),this.server_state=d.Failed,(0,h.log)(e),null===(i=null===(t=this.connection)||void 0===t?void 0:t.window)||void 0===i||i.showErrorMessage(e)}state(){return this.server_state}startListening(){this.server_state!=d.Blocked&&(this.restart_attempts=0,this.server_state=d.Listening,this.event_emitter.listening())}abort(){this.server_state!=d.Blocked&&(this.server_state=d.Aborted,this.event_emitter.abort())}kill(){this.event_emitter.killing(),(0,h.log)("killing any running compiler..."),this.clearRestartTimer();try{this.expecting_exit=!0,this.child.kill(),this.event_emitter.killed(),(0,h.log)("finished killing compiler")}catch(e){(0,h.log)("killing compiler caught: "+e),this.abort()}}noteRecycle(){this.expecting_recycle=!0}noteIdleExit(){this.expecting_idle_exit=!0}ensureRunning(){this.server_state==d.Dormant&&((0,h.log)("compiler is needed again after an idle exit — relaunching"),this.launch())}recoverFromHang(){this.response_handler.rejectAllPendingPromises("ghūl language extension: compiler watchdog timeout"),this.child?((0,h.log)(`compiler PID ${this.child.pid}: unresponsive — killing`),this.child.kill()):((0,h.log)("compiler watchdog timeout with no running compiler — scheduling restart"),this.scheduleRestart())}killQuiet(){}}},2029(e,t,i){"use strict";t.SeverityMapper=void 0;const n=i(2861);let r=new Map([["info",n.DiagnosticSeverity.Information],["warn",n.DiagnosticSeverity.Warning],["error",n.DiagnosticSeverity.Error]]),o=new Map([["info",n.DiagnosticSeverity.Information],["warn",n.DiagnosticSeverity.Warning],["error",n.DiagnosticSeverity.Error]]);t.SeverityMapper=class{static getSeverity(e,t){return"parse"==t?r.get(e):"number"==typeof e?e:isNaN(Number(e))?o.get(e):Number(e)}}},5110(e,t,i){"use strict";t.Watchdog=t.H=void 0;const n=i(5215);t.H=6e4,t.Watchdog=class{constructor(e,t,i=()=>{}){this.timeout_milliseconds=e,this.on_timeout=t,this.on_busy_changed=i}setTimeout(e){this.timeout_milliseconds=e>1e3?e:1e3}startWatchdogIfNotRunning(){this.watchdog_timer||this.startWatchdog()}startWatchdog(){this.watchdog_timer=setTimeout(()=>{this.onWatchdogTimeout()},this.timeout_milliseconds),this.on_busy_changed(!0)}resetWatchdog(){this.clearWatchdog(),this.startWatchdog()}clearWatchdog(){this.watchdog_timer&&(clearTimeout(this.watchdog_timer),this.watchdog_timer=null),this.on_busy_changed(!1)}enterColdStart(){this.clearWatchdog(),this.timeout_milliseconds=t.H}isRunning(){return null!=this.watchdog_timer}onWatchdogTimeout(){this.watchdog_timer=null,this.on_busy_changed(!1),(0,n.log)("ghūl language extension: compiler watchdog timeout"),this.on_timeout()}}},2510(e,t,i){"use strict";var n,r=this&&this.__createBinding||(Object.create?function(e,t,i,n){void 0===n&&(n=i);var r=Object.getOwnPropertyDescriptor(t,i);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[i]}}),Object.defineProperty(e,n,r)}:function(e,t,i,n){void 0===n&&(n=i),e[n]=t[i]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||(n=function(e){return n=Object.getOwnPropertyNames||function(e){var t=[];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[t.length]=i);return t},n(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i=n(e),s=0;s<i.length;s++)"default"!==i[s]&&r(t,e,i[s]);return o(t,e),t}),a=this&&this.__awaiter||function(e,t,i,n){return new(i||(i=Promise))(function(r,o){function s(e){try{c(n.next(e))}catch(e){o(e)}}function a(e){try{c(n.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?r(e.value):(t=e.value,t instanceof i?t:new i(function(e){e(t)})).then(s,a)}c((n=n.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.WorkspaceContext=void 0;const c=s(i(6928)),l=i(7016),u=i(9896),h=i(2861),d=i(5215),p=i(6781),f=i(5252),g=i(1323),m=i(4855),y=i(8887),v=i(2644),_=i(7684),b=i(6024),w=i(7221),D=i(5110),T=i(990),S=i(1376),C=i(7326),R=i(576),E=i(6634),P=i(5657);function x(e){return"boolean"==typeof e?e:null}t.WorkspaceContext=class{constructor(e,t,i){this.client_supports_configuration=!1,this.missing_assembly_watch=null,this.initialize_running=null,this.initialize_queued=null,this.compiler_generation=0,this.reporting_compiler_startup=!1,this.workspace_root=e,this.connection=t,this.documents=i,this.server_event_emitter=new f.ServerEventEmitter,this.config_event_emitter=new p.ConfigEventEmitter,this.progress=new T.ActivityProgress(t),this.metrics=new S.MetricsReporter(t,e),this.response_handler=new g.ResponseHandler(t,this.config_event_emitter),this.watchdog=new D.Watchdog(1e4,()=>this.server_manager.recoverFromHang(),e=>this.reportOutstandingRequest(e)),this.requester=new m.Requester(this.server_event_emitter,this.response_handler,this.watchdog,()=>{var e;return null===(e=this.server_manager)||void 0===e?void 0:e.ensureRunning()}),this.edit_queue=new y.EditQueue(this.requester,this.response_handler,this.watchdog,this.progress,this.metrics),this.ghul_analyser=new w.GhulAnalyser(this.edit_queue,this.config_event_emitter,this.server_event_emitter,i),this.response_parser=new v.ResponseParser(this.response_handler,this.watchdog),this.server_manager=new _.ServerManager(this.config_event_emitter,this.server_event_emitter,this.edit_queue,this.response_handler,this.response_parser,this.watchdog,e,t),this.response_handler.setServerManager(this.server_manager),this.response_handler.setEditQueue(this.edit_queue),this.reportCompilerStartup()}reportOutstandingRequest(e){e?this.progress.report(T.Activity.Request,T.ROUTINE_ANALYSIS_MESSAGE,{delay_ms:T.SLOW_ACTIVITY_DELAY_MS,fallback:!0}):this.progress.end(T.Activity.Request)}reportCompilerStartup(){this.server_event_emitter.onStarting(()=>{var e,t;(null===(t=null===(e=this.config)||void 0===e?void 0:e.compiler)||void 0===t?void 0:t.length)&&!this.config.block&&(this.reporting_compiler_startup=!0,this.progress.report(T.Activity.Compiler,"starting analyser"),this.awaitFirstAnalysis(++this.compiler_generation))}),this.server_event_emitter.onListening(()=>{this.reporting_compiler_startup&&this.progress.report(T.Activity.Compiler,"analysing project",{done_message:"project analysed"})})}awaitFirstAnalysis(e){const t=new Promise(e=>{var t,i;null===(i=(t=setTimeout(e,3e5)).unref)||void 0===i||i.call(t)});Promise.race([this.requester.untilFirstAnalysed(),t]).then(()=>{this.compiler_generation==e&&(this.reporting_compiler_startup=!1,this.progress.end(T.Activity.Compiler))}).catch(e=>(0,d.log)(`could not finish reporting progress: ${e}`))}initialize(){var e;return this.initialize_running?null!==(e=this.initialize_queued)&&void 0!==e?e:this.initialize_queued=this.initialize_running.catch(()=>{}).then(()=>(this.initialize_queued=null,this.beginInitialize())):this.beginInitialize()}beginInitialize(){return this.initialize_running=this.runInitialize().finally(()=>{this.initialize_queued||(this.initialize_running=null)})}runInitialize(){return a(this,void 0,void 0,function*(){var e,t,i,n;let r=[];this.progress.report(T.Activity.Setup,"restoring .NET tools");let o=yield(0,R.restoreDotNetTools)(this.workspace_root);o&&r.push(o),this.progress.report(T.Activity.Setup,"building project references",{done_message:"project references built"});let s=yield(0,E.generateAssembliesJson)(this.workspace_root);s&&r.push(s),yield(0,P.generateGhulOptionsJson)(this.workspace_root),this.config=(0,C.getGhulConfig)(this.workspace_root,yield this.readEditorSettings()),r.push(...null!==(e=this.config.problems)&&void 0!==e?e:[]),this.config.missing_assemblies.length&&r.push(`could not build ${this.config.missing_assemblies.length} referenced assembly/assemblies; analysis will be incomplete until they are built`),r.length&&(null===(t=this.config.compiler)||void 0===t?void 0:t.length)&&(null===(i=this.connection.window)||void 0===i||i.showWarningMessage("ghūl language extension: "+r.join("; ")));const a=this.workspace_root.replace(/\\/g,"/");null===(n=this.document_change_tracker)||void 0===n||n.dispose(),this.document_change_tracker=new b.DocumentChangeTracker(this,this.edit_queue,this.config.source.map(e=>`${a}/${e}`),this.documents,this.config.missing_assemblies),this.watchMissingAssemblies(),this.config_event_emitter.configAvailable(this.workspace_root,this.config),this.progress.end(T.Activity.Setup)})}readEditorSettings(){return a(this,void 0,void 0,function*(){var e,t;if(!this.client_supports_configuration||!(null===(t=null===(e=this.connection)||void 0===e?void 0:e.workspace)||void 0===t?void 0:t.getConfiguration))return{};const i=(0,l.pathToFileURL)(this.workspace_root).toString();try{const e=yield Promise.race([this.connection.workspace.getConfiguration([{scopeUri:i,section:"ghul.incrementalAnalysis"},{scopeUri:i,section:"ghul.plaintextHover"}]),new Promise(e=>{var t,i;null===(i=(t=setTimeout(()=>e(null),5e3)).unref)||void 0===i||i.call(t)})]);if(!e)return(0,d.log)("the client did not answer for its settings; using the project's own configuration"),{};const[t,n]=e;return{incremental_analysis:x(t),want_plaintext_hover:x(n)}}catch(e){return(0,d.log)(`could not read editor settings: ${e}`),{}}})}reinitialize(){this.initializeDetached()}initializeDetached(){this.initialize().catch(e=>(0,d.log)(`workspace initialization failed: ${e}`))}watchMissingAssemblies(){var e,t;this.stopWatchingMissingAssemblies(),this.config.missing_assemblies.length&&(null===(t=null===(e=this.connection)||void 0===e?void 0:e.client)||void 0===t?void 0:t.register)&&(this.missing_assembly_watch=this.connection.client.register(h.DidChangeWatchedFilesNotification.type,{watchers:this.config.missing_assemblies.map(e=>({globPattern:e.replace(/\\/g,"/")}))}))}stopWatchingMissingAssemblies(){var e;null===(e=this.missing_assembly_watch)||void 0===e||e.then(e=>e.dispose()),this.missing_assembly_watch=null}sourceGlobs(){var e,t;return null!==(t=null===(e=this.document_change_tracker)||void 0===e?void 0:e.globs)&&void 0!==t?t:[]}analysisResponseFilePath(){return c.join(this.workspace_root,".analysis.rsp")}static looksLikeGhulWorkspace(e){if(!e)return!1;let t;try{t=(0,u.readdirSync)(e)}catch(e){return!1}return t.some(e=>e.endsWith(".ghulproj")||"ghul.json"===e)}}},3281(e,t,i){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ProgressType=t.ProgressToken=t.createMessageConnection=t.NullLogger=t.ConnectionOptions=t.ConnectionStrategy=t.AbstractMessageBuffer=t.WriteableStreamMessageWriter=t.AbstractMessageWriter=t.MessageWriter=t.ReadableStreamMessageReader=t.AbstractMessageReader=t.MessageReader=t.SharedArrayReceiverStrategy=t.SharedArraySenderStrategy=t.CancellationToken=t.CancellationTokenSource=t.Emitter=t.Event=t.Disposable=t.LRUCache=t.Touch=t.LinkedMap=t.ParameterStructures=t.NotificationType9=t.NotificationType8=t.NotificationType7=t.NotificationType6=t.NotificationType5=t.NotificationType4=t.NotificationType3=t.NotificationType2=t.NotificationType1=t.NotificationType0=t.NotificationType=t.ErrorCodes=t.ResponseError=t.RequestType9=t.RequestType8=t.RequestType7=t.RequestType6=t.RequestType5=t.RequestType4=t.RequestType3=t.RequestType2=t.RequestType1=t.RequestType0=t.RequestType=t.Message=t.RAL=void 0,t.MessageStrategy=t.CancellationStrategy=t.CancellationSenderStrategy=t.RequestCancellationReceiverStrategy=t.IdCancellationReceiverStrategy=t.CancellationReceiverStrategy=t.ConnectionError=t.ConnectionErrors=t.LogTraceNotification=t.SetTraceNotification=t.TraceFormat=t.TraceValues=t.TraceValue=t.Trace=void 0;const r=i(6177);Object.defineProperty(t,"Message",{enumerable:!0,get:function(){return r.Message}}),Object.defineProperty(t,"RequestType",{enumerable:!0,get:function(){return r.RequestType}}),Object.defineProperty(t,"RequestType0",{enumerable:!0,get:function(){return r.RequestType0}}),Object.defineProperty(t,"RequestType1",{enumerable:!0,get:function(){return r.RequestType1}}),Object.defineProperty(t,"RequestType2",{enumerable:!0,get:function(){return r.RequestType2}}),Object.defineProperty(t,"RequestType3",{enumerable:!0,get:function(){return r.RequestType3}}),Object.defineProperty(t,"RequestType4",{enumerable:!0,get:function(){return r.RequestType4}}),Object.defineProperty(t,"RequestType5",{enumerable:!0,get:function(){return r.RequestType5}}),Object.defineProperty(t,"RequestType6",{enumerable:!0,get:function(){return r.RequestType6}}),Object.defineProperty(t,"RequestType7",{enumerable:!0,get:function(){return r.RequestType7}}),Object.defineProperty(t,"RequestType8",{enumerable:!0,get:function(){return r.RequestType8}}),Object.defineProperty(t,"RequestType9",{enumerable:!0,get:function(){return r.RequestType9}}),Object.defineProperty(t,"ResponseError",{enumerable:!0,get:function(){return r.ResponseError}}),Object.defineProperty(t,"ErrorCodes",{enumerable:!0,get:function(){return r.ErrorCodes}}),Object.defineProperty(t,"NotificationType",{enumerable:!0,get:function(){return r.NotificationType}}),Object.defineProperty(t,"NotificationType0",{enumerable:!0,get:function(){return r.NotificationType0}}),Object.defineProperty(t,"NotificationType1",{enumerable:!0,get:function(){return r.NotificationType1}}),Object.defineProperty(t,"NotificationType2",{enumerable:!0,get:function(){return r.NotificationType2}}),Object.defineProperty(t,"NotificationType3",{enumerable:!0,get:function(){return r.NotificationType3}}),Object.defineProperty(t,"NotificationType4",{enumerable:!0,get:function(){return r.NotificationType4}}),Object.defineProperty(t,"NotificationType5",{enumerable:!0,get:function(){return r.NotificationType5}}),Object.defineProperty(t,"NotificationType6",{enumerable:!0,get:function(){return r.NotificationType6}}),Object.defineProperty(t,"NotificationType7",{enumerable:!0,get:function(){return r.NotificationType7}}),Object.defineProperty(t,"NotificationType8",{enumerable:!0,get:function(){return r.NotificationType8}}),Object.defineProperty(t,"NotificationType9",{enumerable:!0,get:function(){return r.NotificationType9}}),Object.defineProperty(t,"ParameterStructures",{enumerable:!0,get:function(){return r.ParameterStructures}});const o=i(3352);Object.defineProperty(t,"LinkedMap",{enumerable:!0,get:function(){return o.LinkedMap}}),Object.defineProperty(t,"LRUCache",{enumerable:!0,get:function(){return o.LRUCache}}),Object.defineProperty(t,"Touch",{enumerable:!0,get:function(){return o.Touch}});const s=i(4019);Object.defineProperty(t,"Disposable",{enumerable:!0,get:function(){return s.Disposable}});const a=i(2676);Object.defineProperty(t,"Event",{enumerable:!0,get:function(){return a.Event}}),Object.defineProperty(t,"Emitter",{enumerable:!0,get:function(){return a.Emitter}});const c=i(9850);Object.defineProperty(t,"CancellationTokenSource",{enumerable:!0,get:function(){return c.CancellationTokenSource}}),Object.defineProperty(t,"CancellationToken",{enumerable:!0,get:function(){return c.CancellationToken}});const l=i(4996);Object.defineProperty(t,"SharedArraySenderStrategy",{enumerable:!0,get:function(){return l.SharedArraySenderStrategy}}),Object.defineProperty(t,"SharedArrayReceiverStrategy",{enumerable:!0,get:function(){return l.SharedArrayReceiverStrategy}});const u=i(9085);Object.defineProperty(t,"MessageReader",{enumerable:!0,get:function(){return u.MessageReader}}),Object.defineProperty(t,"AbstractMessageReader",{enumerable:!0,get:function(){return u.AbstractMessageReader}}),Object.defineProperty(t,"ReadableStreamMessageReader",{enumerable:!0,get:function(){return u.ReadableStreamMessageReader}});const h=i(3193);Object.defineProperty(t,"MessageWriter",{enumerable:!0,get:function(){return h.MessageWriter}}),Object.defineProperty(t,"AbstractMessageWriter",{enumerable:!0,get:function(){return h.AbstractMessageWriter}}),Object.defineProperty(t,"WriteableStreamMessageWriter",{enumerable:!0,get:function(){return h.WriteableStreamMessageWriter}});const d=i(9244);Object.defineProperty(t,"AbstractMessageBuffer",{enumerable:!0,get:function(){return d.AbstractMessageBuffer}});const p=i(577);Object.defineProperty(t,"ConnectionStrategy",{enumerable:!0,get:function(){return p.ConnectionStrategy}}),Object.defineProperty(t,"ConnectionOptions",{enumerable:!0,get:function(){return p.ConnectionOptions}}),Object.defineProperty(t,"NullLogger",{enumerable:!0,get:function(){return p.NullLogger}}),Object.defineProperty(t,"createMessageConnection",{enumerable:!0,get:function(){return p.createMessageConnection}}),Object.defineProperty(t,"ProgressToken",{enumerable:!0,get:function(){return p.ProgressToken}}),Object.defineProperty(t,"ProgressType",{enumerable:!0,get:function(){return p.ProgressType}}),Object.defineProperty(t,"Trace",{enumerable:!0,get:function(){return p.Trace}}),Object.defineProperty(t,"TraceValue",{enumerable:!0,get:function(){return p.TraceValue}}),Object.defineProperty(t,"TraceFormat",{enumerable:!0,get:function(){return p.TraceFormat}}),Object.defineProperty(t,"SetTraceNotification",{enumerable:!0,get:function(){return p.SetTraceNotification}}),Object.defineProperty(t,"LogTraceNotification",{enumerable:!0,get:function(){return p.LogTraceNotification}}),Object.defineProperty(t,"ConnectionErrors",{enumerable:!0,get:function(){return p.ConnectionErrors}}),Object.defineProperty(t,"ConnectionError",{enumerable:!0,get:function(){return p.ConnectionError}}),Object.defineProperty(t,"CancellationReceiverStrategy",{enumerable:!0,get:function(){return p.CancellationReceiverStrategy}}),Object.defineProperty(t,"IdCancellationReceiverStrategy",{enumerable:!0,get:function(){return p.IdCancellationReceiverStrategy}}),Object.defineProperty(t,"RequestCancellationReceiverStrategy",{enumerable:!0,get:function(){return p.RequestCancellationReceiverStrategy}}),Object.defineProperty(t,"CancellationSenderStrategy",{enumerable:!0,get:function(){return p.CancellationSenderStrategy}}),Object.defineProperty(t,"CancellationStrategy",{enumerable:!0,get:function(){return p.CancellationStrategy}}),Object.defineProperty(t,"MessageStrategy",{enumerable:!0,get:function(){return p.MessageStrategy}}),Object.defineProperty(t,"TraceValues",{enumerable:!0,get:function(){return p.TraceValues}});const f=n(i(9590));t.RAL=f.default},9850(e,t,i){"use strict";var n,r=this&&this.__createBinding||(Object.create?function(e,t,i,n){void 0===n&&(n=i);var r=Object.getOwnPropertyDescriptor(t,i);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[i]}}),Object.defineProperty(e,n,r)}:function(e,t,i,n){void 0===n&&(n=i),e[n]=t[i]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||(n=function(e){return n=Object.getOwnPropertyNames||function(e){var t=[];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[t.length]=i);return t},n(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i=n(e),s=0;s<i.length;s++)"default"!==i[s]&&r(t,e,i[s]);return o(t,e),t}),a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.CancellationTokenSource=t.CancellationToken=void 0;const c=a(i(9590)),l=s(i(8585)),u=i(2676);var h;!function(e){e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:u.Event.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:u.Event.None}),e.is=function(t){const i=t;return i&&(i===e.None||i===e.Cancelled||l.boolean(i.isCancellationRequested)&&!!i.onCancellationRequested)}}(h||(t.CancellationToken=h={}));const d=Object.freeze(function(e,t){const i=(0,c.default)().timer.setTimeout(e.bind(t),0);return{dispose(){i.dispose()}}});class p{_isCancelled=!1;_emitter;cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?d:(this._emitter||(this._emitter=new u.Emitter),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=void 0)}}t.CancellationTokenSource=class{_token;get token(){return this._token||(this._token=new p),this._token}cancel(){this._token?this._token.cancel():this._token=h.Cancelled}dispose(){this._token?this._token instanceof p&&this._token.dispose():this._token=h.None}}},577(e,t,i){"use strict";var n,r=this&&this.__createBinding||(Object.create?function(e,t,i,n){void 0===n&&(n=i);var r=Object.getOwnPropertyDescriptor(t,i);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[i]}}),Object.defineProperty(e,n,r)}:function(e,t,i,n){void 0===n&&(n=i),e[n]=t[i]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||(n=function(e){return n=Object.getOwnPropertyNames||function(e){var t=[];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[t.length]=i);return t},n(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i=n(e),s=0;s<i.length;s++)"default"!==i[s]&&r(t,e,i[s]);return o(t,e),t}),a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ConnectionOptions=t.MessageStrategy=t.CancellationStrategy=t.CancellationSenderStrategy=t.CancellationReceiverStrategy=t.RequestCancellationReceiverStrategy=t.IdCancellationReceiverStrategy=t.ConnectionStrategy=t.ConnectionError=t.ConnectionErrors=t.LogTraceNotification=t.SetTraceNotification=t.TraceFormat=t.TraceValues=t.TraceValue=t.Trace=t.NullLogger=t.ProgressType=t.ProgressToken=void 0,t.createMessageConnection=function(e,i,n,r){const o=void 0!==n?n:t.NullLogger;let s=0,a=0,_=0;const S="2.0",R=r?.maxParallelism??-1;let E,P=0;const k=new Map;let M;const I=new Map,q=new Map;let j,F,L=new h.LinkedMap,W=new Map,U=new Set,B=new Map,$=v.Off,z=b.Text,H=N.New;const G=new d.Emitter,V=new d.Emitter,K=new d.Emitter,Y=new d.Emitter,X=new d.Emitter,J=r&&r.cancellationStrategy?r.cancellationStrategy:x.Message;function Q(e){}function Z(){return H===N.Listening}function ee(){return H===N.Closed}function te(){return H===N.Disposed}function ie(){H!==N.New&&H!==N.Listening||(H=N.Closed,V.fire(void 0))}function ne(e){if(null===e)throw new Error("Can't send requests with id null since the response can't be correlated.");return"req-"+e.toString()}function re(){j||0===L.size||-1!==R&&P>=R||(j=(0,c.default)().timer.setImmediate(async()=>{if(j=void 0,0===L.size)return;if(-1!==R&&P>=R)return;const e=L.shift();let t;try{P++;const i=r?.messageStrategy;t=O.is(i)?i.handleMessage(e,oe):oe(e)}catch(e){o.error(`Processing message queue failed: ${e.toString()}`)}finally{t instanceof Promise?t.then(()=>{P--,re()}).catch(e=>{o.error(`Processing message queue failed: ${e.toString()}`)}):P--,re()}}))}async function oe(e){return u.Message.isRequest(e)?async function(e){if(te())return Promise.resolve();function t(t,n,r){const o={jsonrpc:S,id:e.id};return t instanceof u.ResponseError?o.error=t.toJson():o.result=void 0===t?null:t,le(o,n,r),i.write(o)}function n(t,n,r){const o={jsonrpc:S,id:e.id,error:t.toJson()};return le(o,n,r),i.write(o)}!function(e){if($!==v.Off&&F)if(z===b.Text){let t;$!==v.Verbose&&$!==v.Compact||!e.params||(t=`Params: ${ce(e.params)}`),F.log(`Received request '${e.method} - (${e.id})'.`,t)}else he("receive-request",e)}(e);const r=k.get(e.method);let o,s;r&&(o=r.type,s=r.handler);const a=Date.now();if(s||E){const i=e.id??String(Date.now()),r=C.is(J.receiver)?J.receiver.createCancellationTokenSource(i):J.receiver.createCancellationTokenSource(e);null!==e.id&&U.has(e.id)&&r.cancel(),null!==e.id&&B.set(i,r);try{let i;if(s)if(void 0===e.params){if(void 0!==o&&0!==o.numberOfParams)return n(new u.ResponseError(u.ErrorCodes.InvalidParams,`Request ${e.method} defines ${o.numberOfParams} params but received none.`),e.method,a);i=s(r.token)}else if(Array.isArray(e.params)){if(void 0!==o&&o.parameterStructures===u.ParameterStructures.byName)return n(new u.ResponseError(u.ErrorCodes.InvalidParams,`Request ${e.method} defines parameters by name but received parameters by position`),e.method,a);i=s(...e.params,r.token)}else{if(void 0!==o&&o.parameterStructures===u.ParameterStructures.byPosition)return n(new u.ResponseError(u.ErrorCodes.InvalidParams,`Request ${e.method} defines parameters by position but received parameters by name`),e.method,a);i=s(e.params,r.token)}else E&&(i=E(e.method,e.params,r.token));const c=await i;await t(c,e.method,a)}catch(i){i instanceof u.ResponseError?await t(i,e.method,a):i&&l.string(i.message)?await n(new u.ResponseError(u.ErrorCodes.InternalError,`Request ${e.method} failed with message: ${i.message}`),e.method,a):await n(new u.ResponseError(u.ErrorCodes.InternalError,`Request ${e.method} failed unexpectedly without providing any details.`),e.method,a)}finally{B.delete(i)}}else await n(new u.ResponseError(u.ErrorCodes.MethodNotFound,`Unhandled method ${e.method}`),e.method,a)}(e):u.Message.isNotification(e)?async function(e){if(te())return;let t,i;if(e.method===f.type.method){const t=e.params.id;return U.delete(t),void ue(e)}{const n=I.get(e.method);n&&(i=n.handler,t=n.type)}if(i||M)try{if(ue(e),i)if(void 0===e.params)void 0!==t&&0!==t.numberOfParams&&t.parameterStructures!==u.ParameterStructures.byName&&o.error(`Notification ${e.method} defines ${t.numberOfParams} params but received none.`),await i();else if(Array.isArray(e.params)){const n=e.params;e.method===m.type.method&&2===n.length&&g.is(n[0])?await i({token:n[0],value:n[1]}):(void 0!==t&&(t.parameterStructures===u.ParameterStructures.byName&&o.error(`Notification ${e.method} defines parameters by name but received parameters by position`),t.numberOfParams!==e.params.length&&o.error(`Notification ${e.method} defines ${t.numberOfParams} params but received ${n.length} arguments`)),await i(...n))}else void 0!==t&&t.parameterStructures===u.ParameterStructures.byPosition&&o.error(`Notification ${e.method} defines parameters by position but received parameters by name`),await i(e.params);else M&&await M(e.method,e.params)}catch(t){t.message?o.error(`Notification handler '${e.method}' failed with message: ${t.message}`):o.error(`Notification handler '${e.method}' failed unexpectedly.`)}else K.fire(e)}(e):u.Message.isResponse(e)?ae(e):function(e){if(!e)return void o.error("Received empty message.");o.error(`Received message which is neither a response nor a notification message:\n${JSON.stringify(e,null,4)}`);const t=e;if(l.string(t.id)||l.number(t.id)){const e=t.id,i=W.get(e);i&&i.reject(new Error("The received response has neither a result nor an error property."))}}(e)}e.onClose(ie),e.onError(function(e){G.fire([e,void 0,void 0])}),i.onClose(ie),i.onError(function(e){G.fire(e)});const se=e=>{try{if(u.Message.isNotification(e)&&e.method===f.type.method){const t=e.params.id,n=ne(t),s=L.get(n);if(u.Message.isRequest(s)){const a=r?.connectionStrategy,c=a&&a.cancelUndispatched?a.cancelUndispatched(s,Q):void 0;if(c&&(void 0!==c.error||void 0!==c.result))return L.delete(n),B.delete(t),c.id=s.id,le(c,e.method,Date.now()),void i.write(c).catch(()=>o.error("Sending response for canceled message failed."))}const a=B.get(t);if(void 0!==a)return a.cancel(),void ue(e);U.add(t)}!function(e,t){var i;u.Message.isRequest(t)?e.set(ne(t.id),t):u.Message.isResponse(t)?-1===R?e.set(null===(i=t.id)?"res-unknown-"+(++_).toString():"res-"+i.toString(),t):ae(t):e.set("not-"+(++a).toString(),t)}(L,e)}finally{re()}};function ae(e){if(!te())if(null===e.id)e.error?o.error(`Received response message without id: Error is: \n${JSON.stringify(e.error,void 0,4)}`):o.error("Received response message without id. No further error information provided.");else{const t=e.id,i=W.get(t);if(function(e,t){if($!==v.Off&&F)if(z===b.Text){let i;if($!==v.Verbose&&$!==v.Compact||(e.error&&e.error.data?i=`Error data: ${ce(e.error.data)}`:e.result?i=`Result: ${ce(e.result)}`:void 0===e.error&&(i="No result returned.")),t){const n=e.error?` Request failed: ${e.error.message} (${e.error.code}).`:"";F.log(`Received response '${t.method} - (${e.id})' in ${Date.now()-t.timerStart}ms.${n}`,i)}else F.log(`Received response ${e.id} without active response promise.`,i)}else he("receive-response",e)}(e,i),void 0!==i){W.delete(t);try{if(e.error){const t=e.error;i.reject(new u.ResponseError(t.code,t.message,t.data))}else{if(void 0===e.result)throw new Error("Should never happen.");i.resolve(e.result)}}catch(e){e.message?o.error(`Response handler '${i.method}' failed with message: ${e.message}`):o.error(`Response handler '${i.method}' failed unexpectedly.`)}}}}function ce(e){if(null!=e)switch($){case v.Verbose:return JSON.stringify(e,null,4);case v.Compact:return JSON.stringify(e);default:return}}function le(e,t,i){if($!==v.Off&&F)if(z===b.Text){let n;$!==v.Verbose&&$!==v.Compact||(e.error&&e.error.data?n=`Error data: ${ce(e.error.data)}`:e.result?n=`Result: ${ce(e.result)}`:void 0===e.error&&(n="No result returned.")),F.log(`Sending response '${t} - (${e.id})'. Processing request took ${Date.now()-i}ms`,n)}else he("send-response",e)}function ue(e){if($!==v.Off&&F&&e.method!==D.type.method)if(z===b.Text){let t;$!==v.Verbose&&$!==v.Compact||(t=e.params?`Params: ${ce(e.params)}`:"No parameters provided."),F.log(`Received notification '${e.method}'.`,t)}else he("receive-notification",e)}function he(e,t){if(!F||$===v.Off)return;const i={isLSPMessage:!0,type:e,message:t,timestamp:Date.now()};F.log(i)}function de(){if(ee())throw new A(T.Closed,"Connection is closed.");if(te())throw new A(T.Disposed,"Connection is disposed.")}function pe(e){return void 0===e?null:e}function fe(e){return null===e?void 0:e}function ge(e){return null!=e&&!Array.isArray(e)&&"object"==typeof e}function me(e,t){switch(e){case u.ParameterStructures.auto:return ge(t)?fe(t):[pe(t)];case u.ParameterStructures.byName:if(!ge(t))throw new Error("Received parameters by name but param is not an object literal.");return fe(t);case u.ParameterStructures.byPosition:return[pe(t)];default:throw new Error(`Unknown parameter structure ${e.toString()}`)}}function ye(e,t){let i;const n=e.numberOfParams;switch(n){case 0:i=void 0;break;case 1:i=me(e.parameterStructures,t[0]);break;default:i=[];for(let e=0;e<t.length&&e<n;e++)i.push(pe(t[e]));if(t.length<n)for(let e=t.length;e<n;e++)i.push(null)}return i}const ve={sendNotification:(e,...t)=>{let n,r;if(de(),l.string(e)){n=e;const i=t[0];let o=0,s=u.ParameterStructures.auto;u.ParameterStructures.is(i)&&(o=1,s=i);const a=t.length,c=a-o;switch(c){case 0:r=void 0;break;case 1:r=me(s,t[o]);break;default:if(s===u.ParameterStructures.byName)throw new Error(`Received ${c} parameters for 'by Name' notification parameter structure.`);r=t.slice(o,a).map(e=>pe(e))}}else{const i=t;n=e.method,r=ye(e,i)}const s={jsonrpc:S,method:n,params:r};return function(e){if($!==v.Off&&F)if(z===b.Text){let t;$!==v.Verbose&&$!==v.Compact||(t=e.params?`Params: ${ce(e.params)}`:"No parameters provided."),F.log(`Sending notification '${e.method}'.`,t)}else he("send-notification",e)}(s),i.write(s).catch(e=>{throw o.error("Sending notification failed."),e})},onNotification:(e,t)=>{let i;return de(),l.func(e)?M=e:t&&(l.string(e)?(i=e,I.set(e,{type:void 0,handler:t})):(i=e.method,I.set(e.method,{type:e,handler:t}))),{dispose:()=>{void 0!==i?I.get(i)?.handler===t&&I.delete(i):M===e&&(M=void 0)}}},onProgress:(e,t,i)=>{if(q.has(t))throw new Error(`Progress handler for token ${t} already registered`);return q.set(t,i),{dispose:()=>{q.get(t)===i&&q.delete(t)}}},sendProgress:(e,t,i)=>ve.sendNotification(m.type,{token:t,value:i}),onUnhandledProgress:Y.event,sendRequest:(e,...t)=>{function n(e,t){const i=J.sender.sendCancellation(e,t);void 0===i?o.log(`Received no promise from cancellation strategy when cancelling id ${t}`):i.catch(()=>{o.log(`Sending cancellation messages for id ${t} failed.`)})}let r,a,c;if(de(),function(){if(!Z())throw new Error("Call listen() first.")}(),l.string(e)){r=e;const i=t[0],n=t[t.length-1];let o=0,s=u.ParameterStructures.auto;u.ParameterStructures.is(i)&&(o=1,s=i);let l=t.length;p.CancellationToken.is(n)&&(l-=1,c=n);const h=l-o;switch(h){case 0:a=void 0;break;case 1:a=me(s,t[o]);break;default:if(s===u.ParameterStructures.byName)throw new Error(`Received ${h} parameters for 'by Name' request parameter structure.`);a=t.slice(o,l).map(e=>pe(e))}}else{const i=t;r=e.method,a=ye(e,i);const n=e.numberOfParams;c=p.CancellationToken.is(i[n])?i[n]:void 0}const h=s++;let d,f=!1;void 0!==c&&(c.isCancellationRequested?f=!0:d=c.onCancellationRequested(()=>{n(ve,h)}));const g={jsonrpc:S,id:h,method:r,params:a};return function(e){if($!==v.Off&&F)if(z===b.Text){let t;$!==v.Verbose&&$!==v.Compact||!e.params||(t=`Params: ${ce(e.params)}`),F.log(`Sending request '${e.method} - (${e.id})'.`,t)}else he("send-request",e)}(g),"function"==typeof J.sender.enableCancellation&&J.sender.enableCancellation(g),new Promise(async(e,t)=>{const s={method:r,timerStart:Date.now(),resolve:t=>{e(t),J.sender.cleanup(h),d?.dispose()},reject:e=>{t(e),J.sender.cleanup(h),d?.dispose()}};try{W.set(h,s),await i.write(g),f&&n(ve,h)}catch(e){throw W.delete(h),s.reject(new u.ResponseError(u.ErrorCodes.MessageWriteError,e.message?e.message:"Unknown reason")),o.error("Sending request failed."),e}})},onRequest:(e,t)=>{de();let i=null;return y.is(e)?(i=void 0,E=e):l.string(e)?(i=null,void 0!==t&&(i=e,k.set(e,{handler:t,type:void 0}))):void 0!==t&&(i=e.method,k.set(e.method,{type:e,handler:t})),{dispose:()=>{null!==i&&(void 0!==i?k.get(i)?.handler===t&&k.delete(i):E===e&&(E=void 0))}}},hasPendingResponse:()=>W.size>0,trace:async(e,t,i)=>{let n=!1,r=b.Text;void 0!==i&&(l.boolean(i)?n=i:(n=i.sendNotification||!1,r=i.traceFormat||b.Text)),$=e,z=r,F=$===v.Off?void 0:t,!n||ee()||te()||await ve.sendNotification(w.type,{value:v.toString(e)})},onError:G.event,onClose:V.event,onUnhandledNotification:K.event,onDispose:X.event,end:()=>{i.end()},dispose:()=>{if(te())return;H=N.Disposed,X.fire(void 0);const t=new u.ResponseError(u.ErrorCodes.PendingResponseRejected,"Pending response rejected since connection got disposed");for(const e of W.values())e.reject(t);W=new Map,B=new Map,U=new Set,L=new h.LinkedMap,l.func(i.dispose)&&i.dispose(),l.func(e.dispose)&&e.dispose()},listen:()=>{de(),function(){if(Z())throw new A(T.AlreadyListening,"Connection is already listening")}(),H=N.Listening,e.listen(se)},inspect:()=>{(0,c.default)().console.log("inspect")}};return ve.onNotification(D.type,e=>{if($===v.Off||!F)return;const t=$===v.Verbose||$===v.Compact;F.log(e.message,t?e.verbose:void 0)}),ve.onNotification(m.type,async e=>{const t=q.get(e.token);t?await t(e.value):Y.fire(e)}),ve};const c=a(i(9590)),l=s(i(8585)),u=i(6177),h=i(3352),d=i(2676),p=i(9850);var f,g,m,y,v,_,b,w,D,T,S,C,R,E,P,x,O,k,N;!function(e){e.type=new u.NotificationType("$/cancelRequest")}(f||(f={})),function(e){e.is=function(e){return"string"==typeof e||"number"==typeof e}}(g||(t.ProgressToken=g={})),function(e){e.type=new u.NotificationType("$/progress")}(m||(m={})),t.ProgressType=class{__;_pr;constructor(){}},function(e){e.is=function(e){return l.func(e)}}(y||(y={})),t.NullLogger=Object.freeze({error:()=>{},warn:()=>{},info:()=>{},log:()=>{}}),function(e){e[e.Off=0]="Off",e[e.Messages=1]="Messages",e[e.Compact=2]="Compact",e[e.Verbose=3]="Verbose"}(v||(t.Trace=v={})),function(e){e.Off="off",e.Messages="messages",e.Compact="compact",e.Verbose="verbose"}(_||(t.TraceValue=_={})),t.TraceValues=_,function(e){e.fromString=function(t){if(!l.string(t))return e.Off;switch(t=t.toLowerCase()){case"off":default:return e.Off;case"messages":return e.Messages;case"compact":return e.Compact;case"verbose":return e.Verbose}},e.toString=function(t){switch(t){case e.Off:return"off";case e.Messages:return"messages";case e.Compact:return"compact";case e.Verbose:return"verbose";default:return"off"}}}(v||(t.Trace=v={})),function(e){e.Text="text",e.JSON="json"}(b||(t.TraceFormat=b={})),function(e){e.fromString=function(t){return l.string(t)&&"json"===(t=t.toLowerCase())?e.JSON:e.Text}}(b||(t.TraceFormat=b={})),function(e){e.type=new u.NotificationType("$/setTrace")}(w||(t.SetTraceNotification=w={})),function(e){e.type=new u.NotificationType("$/logTrace")}(D||(t.LogTraceNotification=D={})),function(e){e[e.Closed=1]="Closed",e[e.Disposed=2]="Disposed",e[e.AlreadyListening=3]="AlreadyListening"}(T||(t.ConnectionErrors=T={}));class A extends Error{code;constructor(e,t){super(t),this.code=e,Object.setPrototypeOf(this,A.prototype)}}t.ConnectionError=A,function(e){e.is=function(e){const t=e;return t&&l.func(t.cancelUndispatched)}}(S||(t.ConnectionStrategy=S={})),function(e){e.is=function(e){const t=e;return t&&(void 0===t.kind||"id"===t.kind)&&l.func(t.createCancellationTokenSource)&&(void 0===t.dispose||l.func(t.dispose))}}(C||(t.IdCancellationReceiverStrategy=C={})),function(e){e.is=function(e){const t=e;return t&&"request"===t.kind&&l.func(t.createCancellationTokenSource)&&(void 0===t.dispose||l.func(t.dispose))}}(R||(t.RequestCancellationReceiverStrategy=R={})),function(e){e.Message=Object.freeze({createCancellationTokenSource:e=>new p.CancellationTokenSource}),e.is=function(e){return C.is(e)||R.is(e)}}(E||(t.CancellationReceiverStrategy=E={})),function(e){e.Message=Object.freeze({sendCancellation:(e,t)=>e.sendNotification(f.type,{id:t}),cleanup(e){}}),e.is=function(e){const t=e;return t&&l.func(t.sendCancellation)&&l.func(t.cleanup)}}(P||(t.CancellationSenderStrategy=P={})),function(e){e.Message=Object.freeze({receiver:E.Message,sender:P.Message}),e.is=function(e){const t=e;return t&&E.is(t.receiver)&&P.is(t.sender)}}(x||(t.CancellationStrategy=x={})),function(e){e.is=function(e){const t=e;return t&&l.func(t.handleMessage)}}(O||(t.MessageStrategy=O={})),function(e){e.is=function(e){const t=e;return t&&(x.is(t.cancellationStrategy)||S.is(t.connectionStrategy)||O.is(t.messageStrategy)||l.number(t.maxParallelism))}}(k||(t.ConnectionOptions=k={})),function(e){e[e.New=1]="New",e[e.Listening=2]="Listening",e[e.Closed=3]="Closed",e[e.Disposed=4]="Disposed"}(N||(N={}))},4019(e,t){"use strict";var i;t.Disposable=void 0,function(e){e.create=function(e){return{dispose:e}}}(i||(t.Disposable=i={}))},2676(e,t,i){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Emitter=t.Event=void 0;const r=n(i(9590));var o;!function(e){const t={dispose(){}};e.None=function(){return t}}(o||(t.Event=o={}));class s{_callbacks;_contexts;add(e,t=null,i){this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(e),this._contexts.push(t),Array.isArray(i)&&i.push({dispose:()=>this.remove(e,t)})}remove(e,t=null){if(!this._callbacks)return;let i=!1;for(let n=0,r=this._callbacks.length;n<r;n++)if(this._callbacks[n]===e){if(this._contexts[n]===t)return this._callbacks.splice(n,1),void this._contexts.splice(n,1);i=!0}if(i)throw new Error("When adding a listener with a context, you should remove it with the same context")}invoke(...e){if(!this._callbacks)return[];const t=[],i=this._callbacks.slice(0),n=this._contexts.slice(0);for(let o=0,s=i.length;o<s;o++)try{t.push(i[o].apply(n[o],e))}catch(e){(0,r.default)().console.error(e)}return t}isEmpty(){return!this._callbacks||0===this._callbacks.length}dispose(){this._callbacks=void 0,this._contexts=void 0}}class a{_options;static _noop=function(){};_event;_callbacks;constructor(e){this._options=e}get event(){return this._event||(this._event=(e,t,i)=>{this._callbacks||(this._callbacks=new s),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(e,t);const n={dispose:()=>{this._callbacks&&(this._callbacks.remove(e,t),n.dispose=a._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this))}};return Array.isArray(i)&&i.push(n),n}),this._event}fire(e){this._callbacks&&this._callbacks.invoke.call(this._callbacks,e)}dispose(){this._callbacks&&(this._callbacks.dispose(),this._callbacks=void 0)}}t.Emitter=a},8585(e,t){"use strict";function i(e){return"string"==typeof e||e instanceof String}function n(e){return Array.isArray(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.boolean=function(e){return!0===e||!1===e},t.string=i,t.number=function(e){return"number"==typeof e||e instanceof Number},t.error=function(e){return e instanceof Error},t.func=function(e){return"function"==typeof e},t.array=n,t.stringArray=function(e){return n(e)&&e.every(e=>i(e))}},3352(e,t){"use strict";var i;t.LRUCache=t.LinkedMap=t.Touch=void 0,function(e){e.None=0,e.First=1,e.AsOld=e.First,e.Last=2,e.AsNew=e.Last}(i||(t.Touch=i={}));class n{[Symbol.toStringTag]="LinkedMap";_map;_head;_tail;_size;_state;constructor(){this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0,this._state=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0,this._state++}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}get first(){return this._head?.value}get last(){return this._tail?.value}before(e){const t=this._map.get(e);return t?t.previous?.value:void 0}after(e){const t=this._map.get(e);return t?t.next?.value:void 0}has(e){return this._map.has(e)}get(e,t=i.None){const n=this._map.get(e);if(n)return t!==i.None&&this.touch(n,t),n.value}set(e,t,n=i.None){let r=this._map.get(e);if(r)r.value=t,n!==i.None&&this.touch(r,n);else{switch(r={key:e,value:t,next:void 0,previous:void 0},n){case i.None:this.addItemLast(r);break;case i.First:this.addItemFirst(r);break;case i.Last:default:this.addItemLast(r)}this._map.set(e,r),this._size++}return this}delete(e){return!!this.remove(e)}remove(e){const t=this._map.get(e);if(t)return this._map.delete(e),this.removeItem(t),this._size--,t.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");const e=this._head;return this._map.delete(e.key),this.removeItem(e),this._size--,e.value}forEach(e,t){const i=this._state;let n=this._head;for(;n;){if(t?e.bind(t)(n.value,n.key,this):e(n.value,n.key,this),this._state!==i)throw new Error("LinkedMap got modified during iteration.");n=n.next}}keys(){const e=this._state;let t=this._head;const i={[Symbol.iterator]:()=>i,next:()=>{if(this._state!==e)throw new Error("LinkedMap got modified during iteration.");if(t){const e={value:t.key,done:!1};return t=t.next,e}return{value:void 0,done:!0}}};return i}values(){const e=this._state;let t=this._head;const i={[Symbol.iterator]:()=>i,next:()=>{if(this._state!==e)throw new Error("LinkedMap got modified during iteration.");if(t){const e={value:t.value,done:!1};return t=t.next,e}return{value:void 0,done:!0}}};return i}entries(){const e=this._state;let t=this._head;const i={[Symbol.iterator]:()=>i,next:()=>{if(this._state!==e)throw new Error("LinkedMap got modified during iteration.");if(t){const e={value:[t.key,t.value],done:!1};return t=t.next,e}return{value:void 0,done:!0}}};return i}[Symbol.iterator](){return this.entries()}trimOld(e){if(e>=this.size)return;if(0===e)return void this.clear();let t=this._head,i=this.size;for(;t&&i>e;)this._map.delete(t.key),t=t.next,i--;this._head=t,this._size=i,t&&(t.previous=void 0),this._state++}addItemFirst(e){if(this._head||this._tail){if(!this._head)throw new Error("Invalid list");e.next=this._head,this._head.previous=e}else this._tail=e;this._head=e,this._state++}addItemLast(e){if(this._head||this._tail){if(!this._tail)throw new Error("Invalid list");e.previous=this._tail,this._tail.next=e}else this._head=e;this._tail=e,this._state++}removeItem(e){if(e===this._head&&e===this._tail)this._head=void 0,this._tail=void 0;else if(e===this._head){if(!e.next)throw new Error("Invalid list");e.next.previous=void 0,this._head=e.next}else if(e===this._tail){if(!e.previous)throw new Error("Invalid list");e.previous.next=void 0,this._tail=e.previous}else{const t=e.next,i=e.previous;if(!t||!i)throw new Error("Invalid list");t.previous=i,i.next=t}e.next=void 0,e.previous=void 0,this._state++}touch(e,t){if(!this._head||!this._tail)throw new Error("Invalid list");if(t===i.First||t===i.Last)if(t===i.First){if(e===this._head)return;const t=e.next,i=e.previous;e===this._tail?(i.next=void 0,this._tail=i):(t.previous=i,i.next=t),e.previous=void 0,e.next=this._head,this._head.previous=e,this._head=e,this._state++}else if(t===i.Last){if(e===this._tail)return;const t=e.next,i=e.previous;e===this._head?(t.previous=void 0,this._head=t):(t.previous=i,i.next=t),e.next=void 0,e.previous=this._tail,this._tail.next=e,this._tail=e,this._state++}}toJSON(){const e=[];return this.forEach((t,i)=>{e.push([i,t])}),e}fromJSON(e){this.clear();for(const[t,i]of e)this.set(t,i)}}t.LinkedMap=n,t.LRUCache=class extends n{_limit;_ratio;constructor(e,t=1){super(),this._limit=e,this._ratio=Math.min(Math.max(0,t),1)}get limit(){return this._limit}set limit(e){this._limit=e,this.checkTrim()}get ratio(){return this._ratio}set ratio(e){this._ratio=Math.min(Math.max(0,e),1),this.checkTrim()}get(e,t=i.AsNew){return super.get(e,t)}peek(e){return super.get(e,i.None)}set(e,t){return super.set(e,t,i.Last),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}}},9244(e,t){"use strict";t.AbstractMessageBuffer=void 0,t.AbstractMessageBuffer=class{_encoding;_chunks;_totalLength;constructor(e="utf-8"){this._encoding=e,this._chunks=[],this._totalLength=0}get encoding(){return this._encoding}append(e){const t="string"==typeof e?this.fromString(e,this._encoding):e;this._chunks.push(t),this._totalLength+=t.byteLength}tryReadHeaders(e=!1){if(0===this._chunks.length)return;let t=0,i=0,n=0,r=0;e:for(;i<this._chunks.length;){const e=this._chunks[i];for(n=0;n<e.length;){switch(e[n]){case 13:switch(t){case 0:t=1;break;case 2:t=3;break;default:t=0}break;case 10:switch(t){case 1:t=2;break;case 3:t=4,n++;break e;default:t=0}break;default:t=0}n++}r+=e.byteLength,i++}if(4!==t)return;const o=this._read(r+n),s=new Map,a=this.toString(o,"ascii").split("\r\n");if(a.length<2)return s;for(let t=0;t<a.length-2;t++){const i=a[t],n=i.indexOf(":");if(-1===n)throw new Error(`Message header must separate key and value using ':'\n${i}`);const r=i.substr(0,n),o=i.substr(n+1).trim();s.set(e?r.toLowerCase():r,o)}return s}tryReadBody(e){if(!(this._totalLength<e))return this._read(e)}get numberOfBytes(){return this._totalLength}_read(e){if(0===e)return this.emptyBuffer();if(e>this._totalLength)throw new Error("Cannot read so many bytes!");if(this._chunks[0].byteLength===e){const t=this._chunks[0];return this._chunks.shift(),this._totalLength-=e,this.asNative(t)}if(this._chunks[0].byteLength>e){const t=this._chunks[0],i=this.asNative(t,e);return this._chunks[0]=t.slice(e),this._totalLength-=e,i}const t=this.allocNative(e);let i=0;for(;e>0;){const n=this._chunks[0];if(n.byteLength>e){const r=n.slice(0,e);t.set(r,i),i+=e,this._chunks[0]=n.slice(e),this._totalLength-=e,e-=e}else t.set(n,i),i+=n.byteLength,this._chunks.shift(),this._totalLength-=n.byteLength,e-=n.byteLength}return t}}},9085(e,t,i){"use strict";var n,r=this&&this.__createBinding||(Object.create?function(e,t,i,n){void 0===n&&(n=i);var r=Object.getOwnPropertyDescriptor(t,i);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[i]}}),Object.defineProperty(e,n,r)}:function(e,t,i,n){void 0===n&&(n=i),e[n]=t[i]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||(n=function(e){return n=Object.getOwnPropertyNames||function(e){var t=[];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[t.length]=i);return t},n(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i=n(e),s=0;s<i.length;s++)"default"!==i[s]&&r(t,e,i[s]);return o(t,e),t}),a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ReadableStreamMessageReader=t.AbstractMessageReader=t.MessageReader=void 0;const c=a(i(9590)),l=s(i(8585)),u=i(2676),h=i(4323);var d,p;!function(e){e.is=function(e){const t=e;return t&&l.func(t.listen)&&l.func(t.dispose)&&l.func(t.onError)&&l.func(t.onClose)&&l.func(t.onPartialMessage)}}(d||(t.MessageReader=d={}));class f{errorEmitter;closeEmitter;partialMessageEmitter;constructor(){this.errorEmitter=new u.Emitter,this.closeEmitter=new u.Emitter,this.partialMessageEmitter=new u.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose(),this.partialMessageEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(e){this.errorEmitter.fire(this.asError(e))}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}get onPartialMessage(){return this.partialMessageEmitter.event}firePartialMessage(e){this.partialMessageEmitter.fire(e)}asError(e){return e instanceof Error?e:new Error(`Reader received error. Reason: ${l.string(e.message)?e.message:"unknown"}`)}}t.AbstractMessageReader=f,function(e){e.fromOptions=function(e){let t,i;const n=new Map;let r;const o=new Map;if(void 0===e||"string"==typeof e)t=e??"utf-8";else{if(t=e.charset??"utf-8",void 0!==e.contentDecoder&&(i=e.contentDecoder,n.set(i.name,i)),void 0!==e.contentDecoders)for(const t of e.contentDecoders)n.set(t.name,t);if(void 0!==e.contentTypeDecoder&&(r=e.contentTypeDecoder,o.set(r.name,r)),void 0!==e.contentTypeDecoders)for(const t of e.contentTypeDecoders)o.set(t.name,t)}return void 0===r&&(r=(0,c.default)().applicationJson.decoder,o.set(r.name,r)),{charset:t,contentDecoder:i,contentDecoders:n,contentTypeDecoder:r,contentTypeDecoders:o}}}(p||(p={})),t.ReadableStreamMessageReader=class extends f{readable;options;callback;nextMessageLength;messageToken;buffer;partialMessageTimer;_partialMessageTimeout;readSemaphore;constructor(e,t){super(),this.readable=e,this.options=p.fromOptions(t),this.buffer=(0,c.default)().messageBuffer.create(this.options.charset),this._partialMessageTimeout=1e4,this.nextMessageLength=-1,this.messageToken=0,this.readSemaphore=new h.Semaphore(1)}set partialMessageTimeout(e){this._partialMessageTimeout=e}get partialMessageTimeout(){return this._partialMessageTimeout}listen(e){this.nextMessageLength=-1,this.messageToken=0,this.partialMessageTimer=void 0,this.callback=e;const t=this.readable.onData(e=>{this.onData(e)});return this.readable.onError(e=>this.fireError(e)),this.readable.onClose(()=>this.fireClose()),t}onData(e){try{for(this.buffer.append(e);;){if(-1===this.nextMessageLength){const e=this.buffer.tryReadHeaders(!0);if(!e)return;const t=e.get("content-length");if(!t)return void this.fireError(new Error(`Header must provide a Content-Length property.\n${JSON.stringify(Object.fromEntries(e))}`));const i=parseInt(t);if(isNaN(i))return void this.fireError(new Error(`Content-Length value must be a number. Got ${t}`));this.nextMessageLength=i}const e=this.buffer.tryReadBody(this.nextMessageLength);if(void 0===e)return void this.setPartialMessageTimer();this.clearPartialMessageTimer(),this.nextMessageLength=-1,this.readSemaphore.lock(async()=>{const t=void 0!==this.options.contentDecoder?await this.options.contentDecoder.decode(e):e,i=await this.options.contentTypeDecoder.decode(t,this.options);this.callback(i)}).catch(e=>{this.fireError(e)})}}catch(e){this.fireError(e)}}clearPartialMessageTimer(){this.partialMessageTimer&&(this.partialMessageTimer.dispose(),this.partialMessageTimer=void 0)}setPartialMessageTimer(){this.clearPartialMessageTimer(),this._partialMessageTimeout<=0||(this.partialMessageTimer=(0,c.default)().timer.setTimeout((e,t)=>{this.partialMessageTimer=void 0,e===this.messageToken&&(this.firePartialMessage({messageToken:e,waitingTime:t}),this.setPartialMessageTimer())},this._partialMessageTimeout,this.messageToken,this._partialMessageTimeout))}}},3193(e,t,i){"use strict";var n,r=this&&this.__createBinding||(Object.create?function(e,t,i,n){void 0===n&&(n=i);var r=Object.getOwnPropertyDescriptor(t,i);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[i]}}),Object.defineProperty(e,n,r)}:function(e,t,i,n){void 0===n&&(n=i),e[n]=t[i]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||(n=function(e){return n=Object.getOwnPropertyNames||function(e){var t=[];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[t.length]=i);return t},n(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i=n(e),s=0;s<i.length;s++)"default"!==i[s]&&r(t,e,i[s]);return o(t,e),t}),a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.WriteableStreamMessageWriter=t.AbstractMessageWriter=t.MessageWriter=void 0;const c=a(i(9590)),l=s(i(8585)),u=i(4323),h=i(2676);var d,p;!function(e){e.is=function(e){const t=e;return t&&l.func(t.dispose)&&l.func(t.onClose)&&l.func(t.onError)&&l.func(t.write)}}(d||(t.MessageWriter=d={}));class f{errorEmitter;closeEmitter;constructor(){this.errorEmitter=new h.Emitter,this.closeEmitter=new h.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(e,t,i){this.errorEmitter.fire([this.asError(e),t,i])}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}asError(e){return e instanceof Error?e:new Error(`Writer received error. Reason: ${l.string(e.message)?e.message:"unknown"}`)}}t.AbstractMessageWriter=f,function(e){e.fromOptions=function(e){return void 0===e||"string"==typeof e?{charset:e??"utf-8",contentTypeEncoder:(0,c.default)().applicationJson.encoder}:{charset:e.charset??"utf-8",contentEncoder:e.contentEncoder,contentTypeEncoder:e.contentTypeEncoder??(0,c.default)().applicationJson.encoder}}}(p||(p={})),t.WriteableStreamMessageWriter=class extends f{writable;options;errorCount;writeSemaphore;constructor(e,t){super(),this.writable=e,this.options=p.fromOptions(t),this.errorCount=0,this.writeSemaphore=new u.Semaphore(1),this.writable.onError(e=>this.fireError(e)),this.writable.onClose(()=>this.fireClose())}async write(e){return this.writeSemaphore.lock(async()=>this.options.contentTypeEncoder.encode(e,this.options).then(e=>void 0!==this.options.contentEncoder?this.options.contentEncoder.encode(e):e).then(t=>{const i=[];return i.push("Content-Length: ",t.byteLength.toString(),"\r\n"),i.push("\r\n"),this.doWrite(e,i,t)},e=>{throw this.fireError(e),e}))}async doWrite(e,t,i){try{return await this.writable.write(t.join(""),"ascii"),this.writable.write(i)}catch(t){return this.handleError(t,e),Promise.reject(t)}}handleError(e,t){this.errorCount++,this.fireError(e,t,this.errorCount)}end(){this.writable.end()}}},6177(e,t,i){"use strict";var n,r=this&&this.__createBinding||(Object.create?function(e,t,i,n){void 0===n&&(n=i);var r=Object.getOwnPropertyDescriptor(t,i);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[i]}}),Object.defineProperty(e,n,r)}:function(e,t,i,n){void 0===n&&(n=i),e[n]=t[i]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||(n=function(e){return n=Object.getOwnPropertyNames||function(e){var t=[];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[t.length]=i);return t},n(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i=n(e),s=0;s<i.length;s++)"default"!==i[s]&&r(t,e,i[s]);return o(t,e),t});Object.defineProperty(t,"__esModule",{value:!0}),t.Message=t.NotificationType9=t.NotificationType8=t.NotificationType7=t.NotificationType6=t.NotificationType5=t.NotificationType4=t.NotificationType3=t.NotificationType2=t.NotificationType1=t.NotificationType0=t.NotificationType=t.RequestType9=t.RequestType8=t.RequestType7=t.RequestType6=t.RequestType5=t.RequestType4=t.RequestType3=t.RequestType2=t.RequestType1=t.RequestType=t.RequestType0=t.AbstractMessageSignature=t.ParameterStructures=t.ResponseError=t.ErrorCodes=void 0;const a=s(i(8585));var c,l;!function(e){e.ParseError=-32700,e.InvalidRequest=-32600,e.MethodNotFound=-32601,e.InvalidParams=-32602,e.InternalError=-32603,e.jsonrpcReservedErrorRangeStart=-32099,e.serverErrorStart=-32099,e.MessageWriteError=-32099,e.MessageReadError=-32098,e.PendingResponseRejected=-32097,e.ConnectionInactive=-32096,e.ServerNotInitialized=-32002,e.UnknownErrorCode=-32001,e.jsonrpcReservedErrorRangeEnd=-32e3,e.serverErrorEnd=-32e3}(c||(t.ErrorCodes=c={}));class u extends Error{code;data;constructor(e,t,i){super(t),this.code=a.number(e)?e:c.UnknownErrorCode,this.data=i,Object.setPrototypeOf(this,u.prototype)}toJson(){const e={code:this.code,message:this.message};return void 0!==this.data&&(e.data=this.data),e}}t.ResponseError=u;class h{kind;static auto=new h("auto");static byPosition=new h("byPosition");static byName=new h("byName");constructor(e){this.kind=e}static is(e){return e===h.auto||e===h.byName||e===h.byPosition}toString(){return this.kind}}t.ParameterStructures=h;class d{method;numberOfParams;constructor(e,t){this.method=e,this.numberOfParams=t}get parameterStructures(){return h.auto}}t.AbstractMessageSignature=d,t.RequestType0=class extends d{_;constructor(e){super(e,0)}},t.RequestType=class extends d{_parameterStructures;_;constructor(e,t=h.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}},t.RequestType1=class extends d{_parameterStructures;_;constructor(e,t=h.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}},t.RequestType2=class extends d{_;constructor(e){super(e,2)}},t.RequestType3=class extends d{_;constructor(e){super(e,3)}},t.RequestType4=class extends d{_;constructor(e){super(e,4)}},t.RequestType5=class extends d{_;constructor(e){super(e,5)}},t.RequestType6=class extends d{_;constructor(e){super(e,6)}},t.RequestType7=class extends d{_;constructor(e){super(e,7)}},t.RequestType8=class extends d{_;constructor(e){super(e,8)}},t.RequestType9=class extends d{_;constructor(e){super(e,9)}},t.NotificationType=class extends d{_parameterStructures;_;constructor(e,t=h.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}},t.NotificationType0=class extends d{_;constructor(e){super(e,0)}},t.NotificationType1=class extends d{_parameterStructures;_;constructor(e,t=h.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}},t.NotificationType2=class extends d{_;constructor(e){super(e,2)}},t.NotificationType3=class extends d{_;constructor(e){super(e,3)}},t.NotificationType4=class extends d{_;constructor(e){super(e,4)}},t.NotificationType5=class extends d{_;constructor(e){super(e,5)}},t.NotificationType6=class extends d{_;constructor(e){super(e,6)}},t.NotificationType7=class extends d{_;constructor(e){super(e,7)}},t.NotificationType8=class extends d{_;constructor(e){super(e,8)}},t.NotificationType9=class extends d{_;constructor(e){super(e,9)}},function(e){e.isRequest=function(e){const t=e;return t&&a.string(t.method)&&(a.string(t.id)||a.number(t.id))},e.isNotification=function(e){const t=e;return t&&a.string(t.method)&&void 0===e.id},e.isResponse=function(e){const t=e;return t&&(void 0!==t.result||!!t.error)&&(a.string(t.id)||a.number(t.id)||null===t.id)}}(l||(t.Message=l={}))},9590(e,t){"use strict";let i;function n(){if(void 0===i)throw new Error("No runtime abstraction layer installed");return i}Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.install=function(e){if(void 0===e)throw new Error("No runtime abstraction layer provided");i=e}}(n||(n={})),t.default=n},4323(e,t,i){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Semaphore=void 0;const r=n(i(9590));t.Semaphore=class{_capacity;_active;_waiting;constructor(e=1){if(e<=0)throw new Error("Capacity must be greater than 0");this._capacity=e,this._active=0,this._waiting=[]}lock(e){return new Promise((t,i)=>{this._waiting.push({thunk:e,resolve:t,reject:i}),this.runNext()})}get active(){return this._active}runNext(){0!==this._waiting.length&&this._active!==this._capacity&&(0,r.default)().timer.setImmediate(()=>this.doRunNext())}doRunNext(){if(0===this._waiting.length||this._active===this._capacity)return;const e=this._waiting.shift();if(this._active++,this._active>this._capacity)throw new Error("Too many thunks active");try{const t=e.thunk();t instanceof Promise?t.then(t=>{this._active--,e.resolve(t),this.runNext()},t=>{this._active--,e.reject(t),this.runNext()}):(this._active--,e.resolve(t),this.runNext())}catch(t){this._active--,e.reject(t),this.runNext()}}}},4996(e,t,i){"use strict";t.SharedArrayReceiverStrategy=t.SharedArraySenderStrategy=void 0;const n=i(9850);var r;!function(e){e.Continue=0,e.Cancelled=1}(r||(r={})),t.SharedArraySenderStrategy=class{buffers;constructor(){this.buffers=new Map}enableCancellation(e){if(null===e.id)return;const t=new SharedArrayBuffer(4);new Int32Array(t,0,1)[0]=r.Continue,this.buffers.set(e.id,t),e.$cancellationData=t}async sendCancellation(e,t){const i=this.buffers.get(t);if(void 0===i)return;const n=new Int32Array(i,0,1);Atomics.store(n,0,r.Cancelled)}cleanup(e){this.buffers.delete(e)}dispose(){this.buffers.clear()}};class o{data;constructor(e){this.data=new Int32Array(e,0,1)}get isCancellationRequested(){return Atomics.load(this.data,0)===r.Cancelled}get onCancellationRequested(){throw new Error("Cancellation over SharedArrayBuffer doesn't support cancellation events")}}class s{token;constructor(e){this.token=new o(e)}cancel(){}dispose(){}}t.SharedArrayReceiverStrategy=class{kind="request";createCancellationTokenSource(e){const t=e.$cancellationData;return void 0===t?new n.CancellationTokenSource:new s(t)}}},7123(e,t,i){"use strict";var n,r=this&&this.__createBinding||(Object.create?function(e,t,i,n){void 0===n&&(n=i);var r=Object.getOwnPropertyDescriptor(t,i);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[i]}}),Object.defineProperty(e,n,r)}:function(e,t,i,n){void 0===n&&(n=i),e[n]=t[i]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||(n=function(e){return n=Object.getOwnPropertyNames||function(e){var t=[];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[t.length]=i);return t},n(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i=n(e),s=0;s<i.length;s++)"default"!==i[s]&&r(t,e,i[s]);return o(t,e),t}),a=this&&this.__exportStar||function(e,t){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(t,i)||r(t,e,i)},c=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.StreamMessageWriter=t.StreamMessageReader=t.SocketMessageWriter=t.SocketMessageReader=t.PortMessageWriter=t.PortMessageReader=t.IPCMessageWriter=t.IPCMessageReader=void 0,t.generateRandomPipeName=function(){if("win32"===process.platform)return`\\\\.\\pipe\\lsp-${(0,p.randomBytes)(16).toString("hex")}-sock`;let e=32;const t=d.realpathSync(S??h.tmpdir()),i=C.get(process.platform);if(void 0!==i&&(e=Math.min(i-t.length-10,e)),e<16)throw new Error(`Unable to generate a random pipe name with ${e} characters.`);const n=(0,p.randomBytes)(Math.floor(e/2)).toString("hex");return u.join(t,`lsp-${n}.sock`)},t.createClientPipeTransport=function(e,t="utf-8"){let i;const n=new Promise((e,t)=>{i=e});return new Promise((r,o)=>{const s=(0,f.createServer)(e=>{s.close(),i([new b(e,t),new w(e,t)])});s.on("error",o),s.listen(e,()=>{s.removeListener("error",o),r({onConnected:()=>n})})})},t.createServerPipeTransport=function(e,t="utf-8"){const i=(0,f.createConnection)(e);return[new b(i,t),new w(i,t)]},t.createClientSocketTransport=function(e,t="utf-8"){let i;const n=new Promise((e,t)=>{i=e});return new Promise((r,o)=>{const s=(0,f.createServer)(e=>{s.close(),i([new b(e,t),new w(e,t)])});s.on("error",o),s.listen(e,"127.0.0.1",()=>{s.removeListener("error",o),r({onConnected:()=>n})})})},t.createServerSocketTransport=function(e,t="utf-8"){const i=(0,f.createConnection)(e,"127.0.0.1");return[new b(i,t),new w(i,t)]},t.createMessageConnection=function(e,t,i,n){i||(i=g.NullLogger);const r=function(e){const t=e;return void 0!==t.read&&void 0!==t.addListener}(e)?new D(e):e,o=function(e){const t=e;return void 0!==t.write&&void 0!==t.addListener}(t)?new T(t):t;return g.ConnectionStrategy.is(n)&&(n={connectionStrategy:n}),(0,g.createMessageConnection)(r,o,i,n)};const l=c(i(9571));l.default.install();const u=s(i(6928)),h=s(i(857)),d=s(i(9896)),p=i(6982),f=i(9278),g=i(3281);a(i(3281),t);class m extends g.AbstractMessageReader{process;constructor(e){super(),this.process=e;const t=this.process;t.on("error",e=>this.fireError(e)),t.on("close",()=>this.fireClose())}listen(e){return this.process.on("message",e),g.Disposable.create(()=>this.process.off("message",e))}}t.IPCMessageReader=m;class y extends g.AbstractMessageWriter{process;errorCount;constructor(e){super(),this.process=e,this.errorCount=0;const t=this.process;t.on("error",e=>this.fireError(e)),t.on("close",()=>this.fireClose)}write(e){try{return"function"==typeof this.process.send&&this.process.send(e,void 0,void 0,t=>{t?(this.errorCount++,this.handleError(t,e)):this.errorCount=0}),Promise.resolve()}catch(t){return this.handleError(t,e),Promise.reject(t)}}handleError(e,t){this.errorCount++,this.fireError(e,t,this.errorCount)}end(){}}t.IPCMessageWriter=y;class v extends g.AbstractMessageReader{onData;constructor(e){super(),this.onData=new g.Emitter,e.on("close",()=>this.fireClose),e.on("error",e=>this.fireError(e)),e.on("message",e=>{this.onData.fire(e)})}listen(e){return this.onData.event(e)}}t.PortMessageReader=v;class _ extends g.AbstractMessageWriter{port;errorCount;constructor(e){super(),this.port=e,this.errorCount=0,e.on("close",()=>this.fireClose()),e.on("error",e=>this.fireError(e))}write(e){try{return this.port.postMessage(e),Promise.resolve()}catch(t){return this.handleError(t,e),Promise.reject(t)}}handleError(e,t){this.errorCount++,this.fireError(e,t,this.errorCount)}end(){}}t.PortMessageWriter=_;class b extends g.ReadableStreamMessageReader{constructor(e,t="utf-8"){super((0,l.default)().stream.asReadableStream(e),t)}}t.SocketMessageReader=b;class w extends g.WriteableStreamMessageWriter{socket;constructor(e,t){super((0,l.default)().stream.asWritableStream(e),t),this.socket=e}dispose(){super.dispose(),this.socket.destroy()}}t.SocketMessageWriter=w;class D extends g.ReadableStreamMessageReader{constructor(e,t){super((0,l.default)().stream.asReadableStream(e),t)}}t.StreamMessageReader=D;class T extends g.WriteableStreamMessageWriter{constructor(e,t){super((0,l.default)().stream.asWritableStream(e),t)}}t.StreamMessageWriter=T;const S=process.env.XDG_RUNTIME_DIR,C=new Map([["linux",107],["darwin",102]])},9571(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(9023),r=i(3281);class o extends r.AbstractMessageBuffer{static emptyBuffer=Buffer.allocUnsafe(0);constructor(e="utf-8"){super(e)}emptyBuffer(){return o.emptyBuffer}fromString(e,t){return Buffer.from(e,t)}toString(e,t){return e instanceof Buffer?e.toString(t):new n.TextDecoder(t).decode(e)}asNative(e,t){return void 0===t?e instanceof Buffer?e:Buffer.from(e):e instanceof Buffer?e.slice(0,t):Buffer.from(e,0,t)}allocNative(e){return Buffer.allocUnsafe(e)}}class s{stream;constructor(e){this.stream=e}onClose(e){return this.stream.on("close",e),r.Disposable.create(()=>this.stream.off("close",e))}onError(e){return this.stream.on("error",e),r.Disposable.create(()=>this.stream.off("error",e))}onEnd(e){return this.stream.on("end",e),r.Disposable.create(()=>this.stream.off("end",e))}onData(e){return this.stream.on("data",e),r.Disposable.create(()=>this.stream.off("data",e))}}class a{stream;constructor(e){this.stream=e}onClose(e){return this.stream.on("close",e),r.Disposable.create(()=>this.stream.off("close",e))}onError(e){return this.stream.on("error",e),r.Disposable.create(()=>this.stream.off("error",e))}onEnd(e){return this.stream.on("end",e),r.Disposable.create(()=>this.stream.off("end",e))}write(e,t){return new Promise((i,n)=>{const r=e=>{null==e?i():n(e)};"string"==typeof e?this.stream.write(e,t,r):this.stream.write(e,r)})}end(){this.stream.end()}}const c=Object.freeze({messageBuffer:Object.freeze({create:e=>new o(e)}),applicationJson:Object.freeze({encoder:Object.freeze({name:"application/json",encode:(e,t)=>{try{return Promise.resolve(Buffer.from(JSON.stringify(e,void 0,0),t.charset))}catch(e){return Promise.reject(e)}}}),decoder:Object.freeze({name:"application/json",decode:(e,t)=>{try{return e instanceof Buffer?Promise.resolve(JSON.parse(e.toString(t.charset))):Promise.resolve(JSON.parse(new n.TextDecoder(t.charset).decode(e)))}catch(e){return Promise.reject(e)}}})}),stream:Object.freeze({asReadableStream:e=>new s(e),asWritableStream:e=>new a(e)}),console,timer:Object.freeze({setTimeout(e,t,...i){const n=setTimeout(e,t,...i);return{dispose:()=>clearTimeout(n)}},setImmediate(e,...t){const i=setImmediate(e,...t);return{dispose:()=>clearImmediate(i)}},setInterval(e,t,...i){const n=setInterval(e,t,...i);return{dispose:()=>clearInterval(n)}}})});function l(){return c}!function(e){e.install=function(){r.RAL.install(c)}}(l||(l={})),t.default=l},8766(e,t,i){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,i,n){void 0===n&&(n=i);var r=Object.getOwnPropertyDescriptor(t,i);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[i]}}),Object.defineProperty(e,n,r)}:function(e,t,i,n){void 0===n&&(n=i),e[n]=t[i]}),r=this&&this.__exportStar||function(e,t){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(t,i)||n(t,e,i)};Object.defineProperty(t,"__esModule",{value:!0}),t.LSPErrorCodes=t.createProtocolConnection=void 0,r(i(3281),t),r(i(6203),t),r(i(372),t),r(i(1560),t);var o,s=i(1580);Object.defineProperty(t,"createProtocolConnection",{enumerable:!0,get:function(){return s.createProtocolConnection}}),function(e){e.lspReservedErrorRangeStart=-32899,e.RequestFailed=-32803,e.ServerCancelled=-32802,e.ContentModified=-32801,e.RequestCancelled=-32800,e.lspReservedErrorRangeEnd=-32800}(o||(t.LSPErrorCodes=o={}))},1580(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createProtocolConnection=function(e,t,i,r){return n.ConnectionStrategy.is(r)&&(r={connectionStrategy:r}),(0,n.createMessageConnection)(e,t,i,r)};const n=i(3281)},372(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CM=t.ProtocolNotificationType=t.ProtocolNotificationType0=t.ProtocolRequestType=t.ProtocolRequestType0=t.RegistrationType=t.MessageDirection=void 0;const n=i(3281);var r,o;!function(e){e.clientToServer="clientToServer",e.serverToClient="serverToClient",e.both="both"}(r||(t.MessageDirection=r={})),t.RegistrationType=class{____;method;constructor(e){this.method=e}};class s extends n.RequestType0{__;___;____;_pr;constructor(e){super(e)}}t.ProtocolRequestType0=s;class a extends n.RequestType{__;___;____;_pr;constructor(e){super(e,n.ParameterStructures.byName)}}t.ProtocolRequestType=a;class c extends n.NotificationType0{___;____;constructor(e){super(e)}}t.ProtocolNotificationType0=c;class l extends n.NotificationType{___;____;constructor(e){super(e,n.ParameterStructures.byName)}}t.ProtocolNotificationType=l,function(e){e.create=function(e,t){return{client:e,server:t}}}(o||(t.CM=o={}))},8765(e,t,i){"use strict";t.CallHierarchyOutgoingCallsRequest=t.CallHierarchyIncomingCallsRequest=t.CallHierarchyPrepareRequest=void 0;const n=i(372);var r,o,s;!function(e){e.method="textDocument/prepareCallHierarchy",e.messageDirection=n.MessageDirection.clientToServer,e.type=new n.ProtocolRequestType(e.method),e.capabilities=n.CM.create("textDocument.callHierarchy","callHierarchyProvider")}(r||(t.CallHierarchyPrepareRequest=r={})),function(e){e.method="callHierarchy/incomingCalls",e.messageDirection=n.MessageDirection.clientToServer,e.type=new n.ProtocolRequestType(e.method),e.capabilities=n.CM.create("textDocument.callHierarchy","callHierarchyProvider")}(o||(t.CallHierarchyIncomingCallsRequest=o={})),function(e){e.method="callHierarchy/outgoingCalls",e.messageDirection=n.MessageDirection.clientToServer,e.type=new n.ProtocolRequestType(e.method),e.capabilities=n.CM.create("textDocument.callHierarchy","callHierarchyProvider")}(s||(t.CallHierarchyOutgoingCallsRequest=s={}))},7672(e,t,i){"use strict";t.ColorPresentationRequest=t.DocumentColorRequest=void 0;const n=i(372);var r,o;!function(e){e.method="textDocument/documentColor",e.messageDirection=n.MessageDirection.clientToServer,e.type=new n.ProtocolRequestType(e.method),e.capabilities=n.CM.create("textDocument.colorProvider","colorProvider")}(r||(t.DocumentColorRequest=r={})),function(e){e.method="textDocument/colorPresentation",e.messageDirection=n.MessageDirection.clientToServer,e.type=new n.ProtocolRequestType(e.method),e.capabilities=n.CM.create("textDocument.colorProvider","colorProvider")}(o||(t.ColorPresentationRequest=o={}))},1660(e,t,i){"use strict";t.ConfigurationRequest=void 0;const n=i(372);var r;!function(e){e.method="workspace/configuration",e.messageDirection=n.MessageDirection.serverToClient,e.type=new n.ProtocolRequestType(e.method),e.capabilities=n.CM.create("workspace.configuration",void 0)}(r||(t.ConfigurationRequest=r={}))},6914(e,t,i){"use strict";t.DeclarationRequest=void 0;const n=i(372);var r;!function(e){e.method="textDocument/declaration",e.messageDirection=n.MessageDirection.clientToServer,e.type=new n.ProtocolRequestType(e.method),e.capabilities=n.CM.create("textDocument.declaration","declarationProvider")}(r||(t.DeclarationRequest=r={}))},6011(e,t,i){"use strict";var n,r=this&&this.__createBinding||(Object.create?function(e,t,i,n){void 0===n&&(n=i);var r=Object.getOwnPropertyDescriptor(t,i);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[i]}}),Object.defineProperty(e,n,r)}:function(e,t,i,n){void 0===n&&(n=i),e[n]=t[i]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||(n=function(e){return n=Object.getOwnPropertyNames||function(e){var t=[];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[t.length]=i);return t},n(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i=n(e),s=0;s<i.length;s++)"default"!==i[s]&&r(t,e,i[s]);return o(t,e),t});Object.defineProperty(t,"__esModule",{value:!0}),t.DiagnosticRefreshRequest=t.WorkspaceDiagnosticRequest=t.DocumentDiagnosticRequest=t.DocumentDiagnosticReportKind=t.DiagnosticServerCancellationData=void 0;const a=i(3281),c=s(i(8598)),l=i(372);var u,h,d,p,f;!function(e){e.is=function(e){const t=e;return t&&c.boolean(t.retriggerRequest)}}(u||(t.DiagnosticServerCancellationData=u={})),function(e){e.Full="full",e.Unchanged="unchanged"}(h||(t.DocumentDiagnosticReportKind=h={})),function(e){e.method="textDocument/diagnostic",e.messageDirection=l.MessageDirection.clientToServer,e.type=new l.ProtocolRequestType(e.method),e.partialResult=new a.ProgressType,e.capabilities=l.CM.create("textDocument.diagnostic","diagnosticProvider")}(d||(t.DocumentDiagnosticRequest=d={})),function(e){e.method="workspace/diagnostic",e.messageDirection=l.MessageDirection.clientToServer,e.type=new l.ProtocolRequestType(e.method),e.partialResult=new a.ProgressType,e.capabilities=l.CM.create("workspace.diagnostics","diagnosticProvider.workspaceDiagnostics")}(p||(t.WorkspaceDiagnosticRequest=p={})),function(e){e.method="workspace/diagnostic/refresh",e.messageDirection=l.MessageDirection.serverToClient,e.type=new l.ProtocolRequestType0(e.method),e.capabilities=l.CM.create("workspace.diagnostics.refreshSupport",void 0)}(f||(t.DiagnosticRefreshRequest=f={}))},9840(e,t,i){"use strict";t.WillDeleteFilesRequest=t.DidDeleteFilesNotification=t.DidRenameFilesNotification=t.WillRenameFilesRequest=t.DidCreateFilesNotification=t.WillCreateFilesRequest=t.FileOperationPatternKind=void 0;const n=i(372);var r,o,s,a,c,l,u;!function(e){e.file="file",e.folder="folder"}(r||(t.FileOperationPatternKind=r={})),function(e){e.method="workspace/willCreateFiles",e.messageDirection=n.MessageDirection.clientToServer,e.type=new n.ProtocolRequestType(e.method),e.capabilities=n.CM.create("workspace.fileOperations.willCreate","workspace.fileOperations.willCreate")}(o||(t.WillCreateFilesRequest=o={})),function(e){e.method="workspace/didCreateFiles",e.messageDirection=n.MessageDirection.clientToServer,e.type=new n.ProtocolNotificationType(e.method),e.capabilities=n.CM.create("workspace.fileOperations.didCreate","workspace.fileOperations.didCreate")}(s||(t.DidCreateFilesNotification=s={})),function(e){e.method="workspace/willRenameFiles",e.messageDirection=n.MessageDirection.clientToServer,e.type=new n.ProtocolRequestType(e.method),e.capabilities=n.CM.create("workspace.fileOperations.willRename","workspace.fileOperations.willRename")}(a||(t.WillRenameFilesRequest=a={})),function(e){e.method="workspace/didRenameFiles",e.messageDirection=n.MessageDirection.clientToServer,e.type=new n.ProtocolNotificationType(e.method),e.capabilities=n.CM.create("workspace.fileOperations.didRename","workspace.fileOperations.didRename")}(c||(t.DidRenameFilesNotification=c={})),function(e){e.method="workspace/didDeleteFiles",e.messageDirection=n.MessageDirection.clientToServer,e.type=new n.ProtocolNotificationType(e.method),e.capabilities=n.CM.create("workspace.fileOperations.didDelete","workspace.fileOperations.didDelete")}(l||(t.DidDeleteFilesNotification=l={})),function(e){e.method="workspace/willDeleteFiles",e.messageDirection=n.MessageDirection.clientToServer,e.type=new n.ProtocolRequestType(e.method),e.capabilities=n.CM.create("workspace.fileOperations.willDelete","workspace.fileOperations.willDelete")}(u||(t.WillDeleteFilesRequest=u={}))},2874(e,t,i){"use strict";t.FoldingRangeRefreshRequest=t.FoldingRangeRequest=void 0;const n=i(372);var r,o;!function(e){e.method="textDocument/foldingRange",e.messageDirection=n.MessageDirection.clientToServer,e.type=new n.ProtocolRequestType(e.method),e.capabilities=n.CM.create("textDocument.foldingRange","foldingRangeProvider")}(r||(t.FoldingRangeRequest=r={})),function(e){e.method="workspace/foldingRange/refresh",e.messageDirection=n.MessageDirection.serverToClient,e.type=new n.ProtocolRequestType0(e.method),e.capabilities=n.CM.create("workspace.foldingRange.refreshSupport",void 0)}(o||(t.FoldingRangeRefreshRequest=o={}))},9574(e,t,i){"use strict";t.ImplementationRequest=void 0;const n=i(372);var r;!function(e){e.method="textDocument/implementation",e.messageDirection=n.MessageDirection.clientToServer,e.type=new n.ProtocolRequestType(e.method),e.capabilities=n.CM.create("textDocument.implementation","implementationProvider")}(r||(t.ImplementationRequest=r={}))},7752(e,t,i){"use strict";t.InlayHintRefreshRequest=t.InlayHintResolveRequest=t.InlayHintRequest=void 0;const n=i(372);var r,o,s;!function(e){e.method="textDocument/inlayHint",e.messageDirection=n.MessageDirection.clientToServer,e.type=new n.ProtocolRequestType(e.method),e.capabilities=n.CM.create("textDocument.inlayHint","inlayHintProvider")}(r||(t.InlayHintRequest=r={})),function(e){e.method="inlayHint/resolve",e.messageDirection=n.MessageDirection.clientToServer,e.type=new n.ProtocolRequestType(e.method),e.capabilities=n.CM.create("textDocument.inlayHint.resolveSupport","inlayHintProvider.resolveProvider")}(o||(t.InlayHintResolveRequest=o={})),function(e){e.method="workspace/inlayHint/refresh",e.messageDirection=n.MessageDirection.serverToClient,e.type=new n.ProtocolRequestType0(e.method),e.capabilities=n.CM.create("workspace.inlayHint.refreshSupport",void 0)}(s||(t.InlayHintRefreshRequest=s={}))},3307(e,t,i){"use strict";t.InlineCompletionRequest=void 0;const n=i(372);var r;!function(e){e.method="textDocument/inlineCompletion",e.messageDirection=n.MessageDirection.clientToServer,e.type=new n.ProtocolRequestType(e.method),e.capabilities=n.CM.create("textDocument.inlineCompletion","inlineCompletionProvider")}(r||(t.InlineCompletionRequest=r={}))},3124(e,t,i){"use strict";t.InlineValueRefreshRequest=t.InlineValueRequest=void 0;const n=i(372);var r,o;!function(e){e.method="textDocument/inlineValue",e.messageDirection=n.MessageDirection.clientToServer,e.type=new n.ProtocolRequestType(e.method),e.capabilities=n.CM.create("textDocument.inlineValue","inlineValueProvider")}(r||(t.InlineValueRequest=r={})),function(e){e.method="workspace/inlineValue/refresh",e.messageDirection=n.MessageDirection.serverToClient,e.type=new n.ProtocolRequestType0(e.method),e.capabilities=n.CM.create("workspace.inlineValue.refreshSupport",void 0)}(o||(t.InlineValueRefreshRequest=o={}))},1560(e,t,i){"use strict";var n,r=this&&this.__createBinding||(Object.create?function(e,t,i,n){void 0===n&&(n=i);var r=Object.getOwnPropertyDescriptor(t,i);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[i]}}),Object.defineProperty(e,n,r)}:function(e,t,i,n){void 0===n&&(n=i),e[n]=t[i]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||(n=function(e){return n=Object.getOwnPropertyNames||function(e){var t=[];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[t.length]=i);return t},n(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i=n(e),s=0;s<i.length;s++)"default"!==i[s]&&r(t,e,i[s]);return o(t,e),t});Object.defineProperty(t,"__esModule",{value:!0}),t.CodeActionRequest=t.DocumentSymbolRequest=t.DocumentHighlightRequest=t.ReferencesRequest=t.DefinitionRequest=t.SignatureHelpRequest=t.SignatureHelpTriggerKind=t.HoverRequest=t.CompletionResolveRequest=t.CompletionRequest=t.CompletionTriggerKind=t.PublishDiagnosticsNotification=t.WatchKind=t.GlobPattern=t.RelativePattern=t.FileChangeType=t.DidChangeWatchedFilesNotification=t.WillSaveTextDocumentWaitUntilRequest=t.WillSaveTextDocumentNotification=t.TextDocumentSaveReason=t.DidSaveTextDocumentNotification=t.DidCloseTextDocumentNotification=t.DidChangeTextDocumentNotification=t.TextDocumentContentChangeEvent=t.DidOpenTextDocumentNotification=t.TextDocumentSyncKind=t.TelemetryEventNotification=t.LogMessageNotification=t.ShowMessageRequest=t.ShowMessageNotification=t.MessageType=t.DidChangeConfigurationNotification=t.ExitNotification=t.ShutdownRequest=t.InitializedNotification=t.InitializeErrorCodes=t.InitializeRequest=t.WorkDoneProgressOptions=t.TextDocumentRegistrationOptions=t.StaticRegistrationOptions=t.PositionEncodingKind=t.RegularExpressionEngineKind=t.FailureHandlingKind=t.ResourceOperationKind=t.UnregistrationRequest=t.RegistrationRequest=t.DocumentSelector=t.NotebookCellTextDocumentFilter=t.NotebookDocumentFilter=t.TextDocumentFilter=void 0,t.UniquenessLevel=t.WillDeleteFilesRequest=t.DidDeleteFilesNotification=t.WillRenameFilesRequest=t.DidRenameFilesNotification=t.WillCreateFilesRequest=t.DidCreateFilesNotification=t.FileOperationPatternKind=t.LinkedEditingRangeRequest=t.ShowDocumentRequest=t.SemanticTokensRegistrationType=t.SemanticTokensRefreshRequest=t.SemanticTokensRangeRequest=t.SemanticTokensDeltaRequest=t.SemanticTokensRequest=t.TokenFormat=t.CallHierarchyPrepareRequest=t.CallHierarchyOutgoingCallsRequest=t.CallHierarchyIncomingCallsRequest=t.WorkDoneProgressCancelNotification=t.WorkDoneProgressCreateRequest=t.WorkDoneProgress=t.SelectionRangeRequest=t.DeclarationRequest=t.FoldingRangeRefreshRequest=t.FoldingRangeRequest=t.ColorPresentationRequest=t.DocumentColorRequest=t.ConfigurationRequest=t.DidChangeWorkspaceFoldersNotification=t.WorkspaceFoldersRequest=t.TypeDefinitionRequest=t.ImplementationRequest=t.ApplyWorkspaceEditRequest=t.ExecuteCommandRequest=t.PrepareRenameRequest=t.RenameRequest=t.PrepareSupportDefaultBehavior=t.DocumentOnTypeFormattingRequest=t.DocumentRangesFormattingRequest=t.DocumentRangeFormattingRequest=t.DocumentFormattingRequest=t.DocumentLinkResolveRequest=t.DocumentLinkRequest=t.CodeLensRefreshRequest=t.CodeLensResolveRequest=t.CodeLensRequest=t.WorkspaceSymbolResolveRequest=t.WorkspaceSymbolRequest=t.CodeActionResolveRequest=void 0,t.TextDocumentContentRefreshRequest=t.TextDocumentContentRequest=t.InlineCompletionRequest=t.DidCloseNotebookDocumentNotification=t.DidSaveNotebookDocumentNotification=t.DidChangeNotebookDocumentNotification=t.NotebookCellArrayChange=t.DidOpenNotebookDocumentNotification=t.NotebookDocumentSyncRegistrationType=t.NotebookDocument=t.NotebookCell=t.ExecutionSummary=t.NotebookCellKind=t.DiagnosticRefreshRequest=t.WorkspaceDiagnosticRequest=t.DocumentDiagnosticRequest=t.DocumentDiagnosticReportKind=t.DiagnosticServerCancellationData=t.InlayHintRefreshRequest=t.InlayHintResolveRequest=t.InlayHintRequest=t.InlineValueRefreshRequest=t.InlineValueRequest=t.TypeHierarchySupertypesRequest=t.TypeHierarchySubtypesRequest=t.TypeHierarchyPrepareRequest=t.MonikerRequest=t.MonikerKind=void 0;const a=i(372),c=i(6203),l=s(i(8598)),u=i(9574);Object.defineProperty(t,"ImplementationRequest",{enumerable:!0,get:function(){return u.ImplementationRequest}});const h=i(8461);Object.defineProperty(t,"TypeDefinitionRequest",{enumerable:!0,get:function(){return h.TypeDefinitionRequest}});const d=i(9935);Object.defineProperty(t,"WorkspaceFoldersRequest",{enumerable:!0,get:function(){return d.WorkspaceFoldersRequest}}),Object.defineProperty(t,"DidChangeWorkspaceFoldersNotification",{enumerable:!0,get:function(){return d.DidChangeWorkspaceFoldersNotification}});const p=i(1660);Object.defineProperty(t,"ConfigurationRequest",{enumerable:!0,get:function(){return p.ConfigurationRequest}});const f=i(7672);Object.defineProperty(t,"DocumentColorRequest",{enumerable:!0,get:function(){return f.DocumentColorRequest}}),Object.defineProperty(t,"ColorPresentationRequest",{enumerable:!0,get:function(){return f.ColorPresentationRequest}});const g=i(2874);Object.defineProperty(t,"FoldingRangeRequest",{enumerable:!0,get:function(){return g.FoldingRangeRequest}}),Object.defineProperty(t,"FoldingRangeRefreshRequest",{enumerable:!0,get:function(){return g.FoldingRangeRefreshRequest}});const m=i(6914);Object.defineProperty(t,"DeclarationRequest",{enumerable:!0,get:function(){return m.DeclarationRequest}});const y=i(3487);Object.defineProperty(t,"SelectionRangeRequest",{enumerable:!0,get:function(){return y.SelectionRangeRequest}});const v=i(2687);Object.defineProperty(t,"WorkDoneProgress",{enumerable:!0,get:function(){return v.WorkDoneProgress}}),Object.defineProperty(t,"WorkDoneProgressCreateRequest",{enumerable:!0,get:function(){return v.WorkDoneProgressCreateRequest}}),Object.defineProperty(t,"WorkDoneProgressCancelNotification",{enumerable:!0,get:function(){return v.WorkDoneProgressCancelNotification}});const _=i(8765);Object.defineProperty(t,"CallHierarchyIncomingCallsRequest",{enumerable:!0,get:function(){return _.CallHierarchyIncomingCallsRequest}}),Object.defineProperty(t,"CallHierarchyOutgoingCallsRequest",{enumerable:!0,get:function(){return _.CallHierarchyOutgoingCallsRequest}}),Object.defineProperty(t,"CallHierarchyPrepareRequest",{enumerable:!0,get:function(){return _.CallHierarchyPrepareRequest}});const b=i(2478);Object.defineProperty(t,"TokenFormat",{enumerable:!0,get:function(){return b.TokenFormat}}),Object.defineProperty(t,"SemanticTokensRequest",{enumerable:!0,get:function(){return b.SemanticTokensRequest}}),Object.defineProperty(t,"SemanticTokensDeltaRequest",{enumerable:!0,get:function(){return b.SemanticTokensDeltaRequest}}),Object.defineProperty(t,"SemanticTokensRangeRequest",{enumerable:!0,get:function(){return b.SemanticTokensRangeRequest}}),Object.defineProperty(t,"SemanticTokensRefreshRequest",{enumerable:!0,get:function(){return b.SemanticTokensRefreshRequest}}),Object.defineProperty(t,"SemanticTokensRegistrationType",{enumerable:!0,get:function(){return b.SemanticTokensRegistrationType}});const w=i(908);Object.defineProperty(t,"ShowDocumentRequest",{enumerable:!0,get:function(){return w.ShowDocumentRequest}});const D=i(5316);Object.defineProperty(t,"LinkedEditingRangeRequest",{enumerable:!0,get:function(){return D.LinkedEditingRangeRequest}});const T=i(9840);Object.defineProperty(t,"FileOperationPatternKind",{enumerable:!0,get:function(){return T.FileOperationPatternKind}}),Object.defineProperty(t,"DidCreateFilesNotification",{enumerable:!0,get:function(){return T.DidCreateFilesNotification}}),Object.defineProperty(t,"WillCreateFilesRequest",{enumerable:!0,get:function(){return T.WillCreateFilesRequest}}),Object.defineProperty(t,"DidRenameFilesNotification",{enumerable:!0,get:function(){return T.DidRenameFilesNotification}}),Object.defineProperty(t,"WillRenameFilesRequest",{enumerable:!0,get:function(){return T.WillRenameFilesRequest}}),Object.defineProperty(t,"DidDeleteFilesNotification",{enumerable:!0,get:function(){return T.DidDeleteFilesNotification}}),Object.defineProperty(t,"WillDeleteFilesRequest",{enumerable:!0,get:function(){return T.WillDeleteFilesRequest}});const S=i(9047);Object.defineProperty(t,"UniquenessLevel",{enumerable:!0,get:function(){return S.UniquenessLevel}}),Object.defineProperty(t,"MonikerKind",{enumerable:!0,get:function(){return S.MonikerKind}}),Object.defineProperty(t,"MonikerRequest",{enumerable:!0,get:function(){return S.MonikerRequest}});const C=i(645);Object.defineProperty(t,"TypeHierarchyPrepareRequest",{enumerable:!0,get:function(){return C.TypeHierarchyPrepareRequest}}),Object.defineProperty(t,"TypeHierarchySubtypesRequest",{enumerable:!0,get:function(){return C.TypeHierarchySubtypesRequest}}),Object.defineProperty(t,"TypeHierarchySupertypesRequest",{enumerable:!0,get:function(){return C.TypeHierarchySupertypesRequest}});const R=i(3124);Object.defineProperty(t,"InlineValueRequest",{enumerable:!0,get:function(){return R.InlineValueRequest}}),Object.defineProperty(t,"InlineValueRefreshRequest",{enumerable:!0,get:function(){return R.InlineValueRefreshRequest}});const E=i(7752);Object.defineProperty(t,"InlayHintRequest",{enumerable:!0,get:function(){return E.InlayHintRequest}}),Object.defineProperty(t,"InlayHintResolveRequest",{enumerable:!0,get:function(){return E.InlayHintResolveRequest}}),Object.defineProperty(t,"InlayHintRefreshRequest",{enumerable:!0,get:function(){return E.InlayHintRefreshRequest}});const P=i(6011);Object.defineProperty(t,"DiagnosticServerCancellationData",{enumerable:!0,get:function(){return P.DiagnosticServerCancellationData}}),Object.defineProperty(t,"DocumentDiagnosticReportKind",{enumerable:!0,get:function(){return P.DocumentDiagnosticReportKind}}),Object.defineProperty(t,"DocumentDiagnosticRequest",{enumerable:!0,get:function(){return P.DocumentDiagnosticRequest}}),Object.defineProperty(t,"WorkspaceDiagnosticRequest",{enumerable:!0,get:function(){return P.WorkspaceDiagnosticRequest}}),Object.defineProperty(t,"DiagnosticRefreshRequest",{enumerable:!0,get:function(){return P.DiagnosticRefreshRequest}});const x=i(3557);Object.defineProperty(t,"NotebookCellKind",{enumerable:!0,get:function(){return x.NotebookCellKind}}),Object.defineProperty(t,"ExecutionSummary",{enumerable:!0,get:function(){return x.ExecutionSummary}}),Object.defineProperty(t,"NotebookCell",{enumerable:!0,get:function(){return x.NotebookCell}}),Object.defineProperty(t,"NotebookDocument",{enumerable:!0,get:function(){return x.NotebookDocument}}),Object.defineProperty(t,"NotebookDocumentSyncRegistrationType",{enumerable:!0,get:function(){return x.NotebookDocumentSyncRegistrationType}}),Object.defineProperty(t,"DidOpenNotebookDocumentNotification",{enumerable:!0,get:function(){return x.DidOpenNotebookDocumentNotification}}),Object.defineProperty(t,"NotebookCellArrayChange",{enumerable:!0,get:function(){return x.NotebookCellArrayChange}}),Object.defineProperty(t,"DidChangeNotebookDocumentNotification",{enumerable:!0,get:function(){return x.DidChangeNotebookDocumentNotification}}),Object.defineProperty(t,"DidSaveNotebookDocumentNotification",{enumerable:!0,get:function(){return x.DidSaveNotebookDocumentNotification}}),Object.defineProperty(t,"DidCloseNotebookDocumentNotification",{enumerable:!0,get:function(){return x.DidCloseNotebookDocumentNotification}});const O=i(3307);Object.defineProperty(t,"InlineCompletionRequest",{enumerable:!0,get:function(){return O.InlineCompletionRequest}});const k=i(4289);var N,A,M,I,q,j,F,L,W,U,B,$,z,H,G,V,K,Y,X,J,Q,Z,ee,te,ie,ne,re,oe,se,ae,ce,le,ue,he,de,pe,fe,ge,me,ye,ve,_e,be,we,De,Te,Se,Ce,Re,Ee,Pe,xe,Oe,ke,Ne,Ae,Me,Ie,qe,je,Fe,Le,We,Ue,Be,$e,ze;Object.defineProperty(t,"TextDocumentContentRequest",{enumerable:!0,get:function(){return k.TextDocumentContentRequest}}),Object.defineProperty(t,"TextDocumentContentRefreshRequest",{enumerable:!0,get:function(){return k.TextDocumentContentRefreshRequest}}),function(e){e.is=function(e){const t=e;return l.string(t)||l.string(t.language)||l.string(t.scheme)||fe.is(t.pattern)}}(N||(t.TextDocumentFilter=N={})),function(e){e.is=function(e){const t=e;return l.objectLiteral(t)&&(l.string(t.notebookType)||l.string(t.scheme)||l.string(t.pattern))}}(A||(t.NotebookDocumentFilter=A={})),function(e){e.is=function(e){const t=e;return l.objectLiteral(t)&&(l.string(t.notebook)||A.is(t.notebook))&&(void 0===t.language||l.string(t.language))}}(M||(t.NotebookCellTextDocumentFilter=M={})),function(e){e.is=function(e){if(!Array.isArray(e))return!1;for(const t of e)if(!l.string(t)&&!N.is(t)&&!M.is(t))return!1;return!0}}(I||(t.DocumentSelector=I={})),function(e){e.method="client/registerCapability",e.messageDirection=a.MessageDirection.serverToClient,e.type=new a.ProtocolRequestType(e.method)}(q||(t.RegistrationRequest=q={})),function(e){e.method="client/unregisterCapability",e.messageDirection=a.MessageDirection.serverToClient,e.type=new a.ProtocolRequestType(e.method)}(j||(t.UnregistrationRequest=j={})),function(e){e.Create="create",e.Rename="rename",e.Delete="delete"}(F||(t.ResourceOperationKind=F={})),function(e){e.Abort="abort",e.Transactional="transactional",e.TextOnlyTransactional="textOnlyTransactional",e.Undo="undo"}(L||(t.FailureHandlingKind=L={})),function(e){e.ES2020="ES2020"}(W||(t.RegularExpressionEngineKind=W={})),function(e){e.UTF8="utf-8",e.UTF16="utf-16",e.UTF32="utf-32"}(U||(t.PositionEncodingKind=U={})),function(e){e.hasId=function(e){const t=e;return t&&l.string(t.id)&&t.id.length>0}}(B||(t.StaticRegistrationOptions=B={})),function(e){e.is=function(e){const t=e;return t&&(null===t.documentSelector||I.is(t.documentSelector))}}($||(t.TextDocumentRegistrationOptions=$={})),function(e){e.is=function(e){const t=e;return l.objectLiteral(t)&&(void 0===t.workDoneProgress||l.boolean(t.workDoneProgress))},e.hasWorkDoneProgress=function(e){const t=e;return t&&l.boolean(t.workDoneProgress)}}(z||(t.WorkDoneProgressOptions=z={})),function(e){e.method="initialize",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolRequestType(e.method)}(H||(t.InitializeRequest=H={})),function(e){e.unknownProtocolVersion=1}(G||(t.InitializeErrorCodes=G={})),function(e){e.method="initialized",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolNotificationType(e.method)}(V||(t.InitializedNotification=V={})),function(e){e.method="shutdown",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolRequestType0(e.method)}(K||(t.ShutdownRequest=K={})),function(e){e.method="exit",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolNotificationType0(e.method)}(Y||(t.ExitNotification=Y={})),function(e){e.method="workspace/didChangeConfiguration",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolNotificationType(e.method),e.capabilities=a.CM.create("workspace.didChangeConfiguration",void 0)}(X||(t.DidChangeConfigurationNotification=X={})),function(e){e.Error=1,e.Warning=2,e.Info=3,e.Log=4,e.Debug=5}(J||(t.MessageType=J={})),function(e){e.method="window/showMessage",e.messageDirection=a.MessageDirection.serverToClient,e.type=new a.ProtocolNotificationType(e.method),e.capabilities=a.CM.create("window.showMessage",void 0)}(Q||(t.ShowMessageNotification=Q={})),function(e){e.method="window/showMessageRequest",e.messageDirection=a.MessageDirection.serverToClient,e.type=new a.ProtocolRequestType(e.method),e.capabilities=a.CM.create("window.showMessage",void 0)}(Z||(t.ShowMessageRequest=Z={})),function(e){e.method="window/logMessage",e.messageDirection=a.MessageDirection.serverToClient,e.type=new a.ProtocolNotificationType(e.method)}(ee||(t.LogMessageNotification=ee={})),function(e){e.method="telemetry/event",e.messageDirection=a.MessageDirection.serverToClient,e.type=new a.ProtocolNotificationType(e.method)}(te||(t.TelemetryEventNotification=te={})),function(e){e.None=0,e.Full=1,e.Incremental=2}(ie||(t.TextDocumentSyncKind=ie={})),function(e){e.method="textDocument/didOpen",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolNotificationType(e.method),e.capabilities=a.CM.create("textDocument.synchronization","textDocumentSync.openClose")}(ne||(t.DidOpenTextDocumentNotification=ne={})),function(e){e.isIncremental=function(e){const t=e;return null!=t&&"string"==typeof t.text&&void 0!==t.range&&(void 0===t.rangeLength||"number"==typeof t.rangeLength)},e.isFull=function(e){const t=e;return null!=t&&"string"==typeof t.text&&void 0===t.range&&void 0===t.rangeLength}}(re||(t.TextDocumentContentChangeEvent=re={})),function(e){e.method="textDocument/didChange",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolNotificationType(e.method),e.capabilities=a.CM.create("textDocument.synchronization","textDocumentSync")}(oe||(t.DidChangeTextDocumentNotification=oe={})),function(e){e.method="textDocument/didClose",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolNotificationType(e.method),e.capabilities=a.CM.create("textDocument.synchronization","textDocumentSync.openClose")}(se||(t.DidCloseTextDocumentNotification=se={})),function(e){e.method="textDocument/didSave",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolNotificationType(e.method),e.capabilities=a.CM.create("textDocument.synchronization.didSave","textDocumentSync.save")}(ae||(t.DidSaveTextDocumentNotification=ae={})),function(e){e.Manual=1,e.AfterDelay=2,e.FocusOut=3}(ce||(t.TextDocumentSaveReason=ce={})),function(e){e.method="textDocument/willSave",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolNotificationType(e.method),e.capabilities=a.CM.create("textDocument.synchronization.willSave","textDocumentSync.willSave")}(le||(t.WillSaveTextDocumentNotification=le={})),function(e){e.method="textDocument/willSaveWaitUntil",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolRequestType(e.method),e.capabilities=a.CM.create("textDocument.synchronization.willSaveWaitUntil","textDocumentSync.willSaveWaitUntil")}(ue||(t.WillSaveTextDocumentWaitUntilRequest=ue={})),function(e){e.method="workspace/didChangeWatchedFiles",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolNotificationType(e.method),e.capabilities=a.CM.create("workspace.didChangeWatchedFiles",void 0)}(he||(t.DidChangeWatchedFilesNotification=he={})),function(e){e.Created=1,e.Changed=2,e.Deleted=3}(de||(t.FileChangeType=de={})),function(e){e.is=function(e){const t=e;return l.objectLiteral(t)&&(c.URI.is(t.baseUri)||c.WorkspaceFolder.is(t.baseUri))&&l.string(t.pattern)}}(pe||(t.RelativePattern=pe={})),function(e){e.is=function(e){const t=e;return l.string(t)||pe.is(t)}}(fe||(t.GlobPattern=fe={})),function(e){e.Create=1,e.Change=2,e.Delete=4}(ge||(t.WatchKind=ge={})),function(e){e.method="textDocument/publishDiagnostics",e.messageDirection=a.MessageDirection.serverToClient,e.type=new a.ProtocolNotificationType(e.method),e.capabilities=a.CM.create("textDocument.publishDiagnostics",void 0)}(me||(t.PublishDiagnosticsNotification=me={})),function(e){e.Invoked=1,e.TriggerCharacter=2,e.TriggerForIncompleteCompletions=3}(ye||(t.CompletionTriggerKind=ye={})),function(e){e.method="textDocument/completion",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolRequestType(e.method),e.capabilities=a.CM.create("textDocument.completion","completionProvider")}(ve||(t.CompletionRequest=ve={})),function(e){e.method="completionItem/resolve",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolRequestType(e.method),e.capabilities=a.CM.create("textDocument.completion.completionItem.resolveSupport","completionProvider.resolveProvider")}(_e||(t.CompletionResolveRequest=_e={})),function(e){e.method="textDocument/hover",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolRequestType(e.method),e.capabilities=a.CM.create("textDocument.hover","hoverProvider")}(be||(t.HoverRequest=be={})),function(e){e.Invoked=1,e.TriggerCharacter=2,e.ContentChange=3}(we||(t.SignatureHelpTriggerKind=we={})),function(e){e.method="textDocument/signatureHelp",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolRequestType(e.method),e.capabilities=a.CM.create("textDocument.signatureHelp","signatureHelpProvider")}(De||(t.SignatureHelpRequest=De={})),function(e){e.method="textDocument/definition",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolRequestType(e.method),e.capabilities=a.CM.create("textDocument.definition","definitionProvider")}(Te||(t.DefinitionRequest=Te={})),function(e){e.method="textDocument/references",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolRequestType(e.method),e.capabilities=a.CM.create("textDocument.references","referencesProvider")}(Se||(t.ReferencesRequest=Se={})),function(e){e.method="textDocument/documentHighlight",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolRequestType(e.method),e.capabilities=a.CM.create("textDocument.documentHighlight","documentHighlightProvider")}(Ce||(t.DocumentHighlightRequest=Ce={})),function(e){e.method="textDocument/documentSymbol",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolRequestType(e.method),e.capabilities=a.CM.create("textDocument.documentSymbol","documentSymbolProvider")}(Re||(t.DocumentSymbolRequest=Re={})),function(e){e.method="textDocument/codeAction",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolRequestType(e.method),e.capabilities=a.CM.create("textDocument.codeAction","codeActionProvider")}(Ee||(t.CodeActionRequest=Ee={})),function(e){e.method="codeAction/resolve",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolRequestType(e.method),e.capabilities=a.CM.create("textDocument.codeAction.resolveSupport","codeActionProvider.resolveProvider")}(Pe||(t.CodeActionResolveRequest=Pe={})),function(e){e.method="workspace/symbol",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolRequestType(e.method),e.capabilities=a.CM.create("workspace.symbol","workspaceSymbolProvider")}(xe||(t.WorkspaceSymbolRequest=xe={})),function(e){e.method="workspaceSymbol/resolve",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolRequestType(e.method),e.capabilities=a.CM.create("workspace.symbol.resolveSupport","workspaceSymbolProvider.resolveProvider")}(Oe||(t.WorkspaceSymbolResolveRequest=Oe={})),function(e){e.method="textDocument/codeLens",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolRequestType(e.method),e.capabilities=a.CM.create("textDocument.codeLens","codeLensProvider")}(ke||(t.CodeLensRequest=ke={})),function(e){e.method="codeLens/resolve",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolRequestType(e.method),e.capabilities=a.CM.create("textDocument.codeLens.resolveSupport","codeLensProvider.resolveProvider")}(Ne||(t.CodeLensResolveRequest=Ne={})),function(e){e.method="workspace/codeLens/refresh",e.messageDirection=a.MessageDirection.serverToClient,e.type=new a.ProtocolRequestType0(e.method),e.capabilities=a.CM.create("workspace.codeLens",void 0)}(Ae||(t.CodeLensRefreshRequest=Ae={})),function(e){e.method="textDocument/documentLink",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolRequestType(e.method),e.capabilities=a.CM.create("textDocument.documentLink","documentLinkProvider")}(Me||(t.DocumentLinkRequest=Me={})),function(e){e.method="documentLink/resolve",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolRequestType(e.method),e.capabilities=a.CM.create("textDocument.documentLink","documentLinkProvider.resolveProvider")}(Ie||(t.DocumentLinkResolveRequest=Ie={})),function(e){e.method="textDocument/formatting",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolRequestType(e.method),e.capabilities=a.CM.create("textDocument.formatting","documentFormattingProvider")}(qe||(t.DocumentFormattingRequest=qe={})),function(e){e.method="textDocument/rangeFormatting",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolRequestType(e.method),e.capabilities=a.CM.create("textDocument.rangeFormatting","documentRangeFormattingProvider")}(je||(t.DocumentRangeFormattingRequest=je={})),function(e){e.method="textDocument/rangesFormatting",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolRequestType(e.method),e.capabilities=a.CM.create("textDocument.rangeFormatting.rangesSupport","documentRangeFormattingProvider.rangesSupport")}(Fe||(t.DocumentRangesFormattingRequest=Fe={})),function(e){e.method="textDocument/onTypeFormatting",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolRequestType(e.method),e.capabilities=a.CM.create("textDocument.onTypeFormatting","documentOnTypeFormattingProvider")}(Le||(t.DocumentOnTypeFormattingRequest=Le={})),function(e){e.Identifier=1}(We||(t.PrepareSupportDefaultBehavior=We={})),function(e){e.method="textDocument/rename",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolRequestType(e.method),e.capabilities=a.CM.create("textDocument.rename","renameProvider")}(Ue||(t.RenameRequest=Ue={})),function(e){e.method="textDocument/prepareRename",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolRequestType(e.method),e.capabilities=a.CM.create("textDocument.rename.prepareSupport","renameProvider.prepareProvider")}(Be||(t.PrepareRenameRequest=Be={})),function(e){e.method="workspace/executeCommand",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolRequestType(e.method),e.capabilities=a.CM.create("workspace.executeCommand","executeCommandProvider")}($e||(t.ExecuteCommandRequest=$e={})),function(e){e.method="workspace/applyEdit",e.messageDirection=a.MessageDirection.serverToClient,e.type=new a.ProtocolRequestType("workspace/applyEdit"),e.capabilities=a.CM.create("workspace.applyEdit",void 0)}(ze||(t.ApplyWorkspaceEditRequest=ze={}))},5316(e,t,i){"use strict";t.LinkedEditingRangeRequest=void 0;const n=i(372);var r;!function(e){e.method="textDocument/linkedEditingRange",e.messageDirection=n.MessageDirection.clientToServer,e.type=new n.ProtocolRequestType(e.method),e.capabilities=n.CM.create("textDocument.linkedEditingRange","linkedEditingRangeProvider")}(r||(t.LinkedEditingRangeRequest=r={}))},9047(e,t,i){"use strict";t.MonikerRequest=t.MonikerKind=t.UniquenessLevel=void 0;const n=i(372);var r,o,s;!function(e){e.document="document",e.project="project",e.group="group",e.scheme="scheme",e.global="global"}(r||(t.UniquenessLevel=r={})),function(e){e.$import="import",e.$export="export",e.local="local"}(o||(t.MonikerKind=o={})),function(e){e.method="textDocument/moniker",e.messageDirection=n.MessageDirection.clientToServer,e.type=new n.ProtocolRequestType(e.method),e.capabilities=n.CM.create("textDocument.moniker","monikerProvider")}(s||(t.MonikerRequest=s={}))},3557(e,t,i){"use strict";var n,r=this&&this.__createBinding||(Object.create?function(e,t,i,n){void 0===n&&(n=i);var r=Object.getOwnPropertyDescriptor(t,i);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[i]}}),Object.defineProperty(e,n,r)}:function(e,t,i,n){void 0===n&&(n=i),e[n]=t[i]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||(n=function(e){return n=Object.getOwnPropertyNames||function(e){var t=[];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[t.length]=i);return t},n(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i=n(e),s=0;s<i.length;s++)"default"!==i[s]&&r(t,e,i[s]);return o(t,e),t});Object.defineProperty(t,"__esModule",{value:!0}),t.DidCloseNotebookDocumentNotification=t.DidSaveNotebookDocumentNotification=t.DidChangeNotebookDocumentNotification=t.NotebookCellArrayChange=t.DidOpenNotebookDocumentNotification=t.NotebookDocumentSyncRegistrationType=t.NotebookDocument=t.NotebookCell=t.ExecutionSummary=t.NotebookCellKind=void 0;const a=i(6203),c=s(i(8598)),l=i(372);var u,h,d,p,f,g,m,y,v,_;!function(e){e.Markup=1,e.Code=2,e.is=function(e){return 1===e||2===e}}(u||(t.NotebookCellKind=u={})),function(e){e.create=function(e,t){const i={executionOrder:e};return!0!==t&&!1!==t||(i.success=t),i},e.is=function(e){const t=e;return c.objectLiteral(t)&&a.uinteger.is(t.executionOrder)&&(void 0===t.success||c.boolean(t.success))},e.equals=function(e,t){return e===t||null!=e&&null!=t&&e.executionOrder===t.executionOrder&&e.success===t.success}}(h||(t.ExecutionSummary=h={})),function(e){function t(e,i){if(e===i)return!0;if(null==e||null==i)return!1;if(typeof e!=typeof i)return!1;if("object"!=typeof e)return!1;const n=Array.isArray(e),r=Array.isArray(i);if(n!==r)return!1;if(n&&r){if(e.length!==i.length)return!1;for(let n=0;n<e.length;n++)if(!t(e[n],i[n]))return!1}if(c.objectLiteral(e)&&c.objectLiteral(i)){const n=Object.keys(e),r=Object.keys(i);if(n.length!==r.length)return!1;if(n.sort(),r.sort(),!t(n,r))return!1;for(let r=0;r<n.length;r++){const o=n[r];if(!t(e[o],i[o]))return!1}}return!0}e.create=function(e,t){return{kind:e,document:t}},e.is=function(e){const t=e;return c.objectLiteral(t)&&u.is(t.kind)&&a.DocumentUri.is(t.document)&&(void 0===t.metadata||c.objectLiteral(t.metadata))},e.diff=function(e,i){const n=new Set;return e.document!==i.document&&n.add("document"),e.kind!==i.kind&&n.add("kind"),e.executionSummary!==i.executionSummary&&n.add("executionSummary"),void 0===e.metadata&&void 0===i.metadata||t(e.metadata,i.metadata)||n.add("metadata"),void 0===e.executionSummary&&void 0===i.executionSummary||h.equals(e.executionSummary,i.executionSummary)||n.add("executionSummary"),n}}(d||(t.NotebookCell=d={})),function(e){e.create=function(e,t,i,n){return{uri:e,notebookType:t,version:i,cells:n}},e.is=function(e){const t=e;return c.objectLiteral(t)&&c.string(t.uri)&&a.integer.is(t.version)&&c.typedArray(t.cells,d.is)}}(p||(t.NotebookDocument=p={})),function(e){e.method="notebookDocument/sync",e.messageDirection=l.MessageDirection.clientToServer,e.type=new l.RegistrationType(e.method)}(f||(t.NotebookDocumentSyncRegistrationType=f={})),function(e){e.method="notebookDocument/didOpen",e.messageDirection=l.MessageDirection.clientToServer,e.type=new l.ProtocolNotificationType(e.method),e.registrationMethod=f.method}(g||(t.DidOpenNotebookDocumentNotification=g={})),function(e){e.is=function(e){const t=e;return c.objectLiteral(t)&&a.uinteger.is(t.start)&&a.uinteger.is(t.deleteCount)&&(void 0===t.cells||c.typedArray(t.cells,d.is))},e.create=function(e,t,i){const n={start:e,deleteCount:t};return void 0!==i&&(n.cells=i),n}}(m||(t.NotebookCellArrayChange=m={})),function(e){e.method="notebookDocument/didChange",e.messageDirection=l.MessageDirection.clientToServer,e.type=new l.ProtocolNotificationType(e.method),e.registrationMethod=f.method}(y||(t.DidChangeNotebookDocumentNotification=y={})),function(e){e.method="notebookDocument/didSave",e.messageDirection=l.MessageDirection.clientToServer,e.type=new l.ProtocolNotificationType(e.method),e.registrationMethod=f.method}(v||(t.DidSaveNotebookDocumentNotification=v={})),function(e){e.method="notebookDocument/didClose",e.messageDirection=l.MessageDirection.clientToServer,e.type=new l.ProtocolNotificationType(e.method),e.registrationMethod=f.method}(_||(t.DidCloseNotebookDocumentNotification=_={}))},2687(e,t,i){"use strict";t.WorkDoneProgressCancelNotification=t.WorkDoneProgressCreateRequest=t.WorkDoneProgress=void 0;const n=i(3281),r=i(372);var o,s,a;!function(e){e.type=new n.ProgressType,e.is=function(t){return t===e.type}}(o||(t.WorkDoneProgress=o={})),function(e){e.method="window/workDoneProgress/create",e.messageDirection=r.MessageDirection.serverToClient,e.type=new r.ProtocolRequestType(e.method),e.capabilities=r.CM.create("window.workDoneProgress",void 0)}(s||(t.WorkDoneProgressCreateRequest=s={})),function(e){e.method="window/workDoneProgress/cancel",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolNotificationType(e.method)}(a||(t.WorkDoneProgressCancelNotification=a={}))},3487(e,t,i){"use strict";t.SelectionRangeRequest=void 0;const n=i(372);var r;!function(e){e.method="textDocument/selectionRange",e.messageDirection=n.MessageDirection.clientToServer,e.type=new n.ProtocolRequestType(e.method),e.capabilities=n.CM.create("textDocument.selectionRange","selectionRangeProvider")}(r||(t.SelectionRangeRequest=r={}))},2478(e,t,i){"use strict";t.SemanticTokensRefreshRequest=t.SemanticTokensRangeRequest=t.SemanticTokensDeltaRequest=t.SemanticTokensRequest=t.SemanticTokensRegistrationType=t.TokenFormat=void 0;const n=i(372);var r,o,s,a,c,l;!function(e){e.Relative="relative"}(r||(t.TokenFormat=r={})),function(e){e.method="textDocument/semanticTokens",e.type=new n.RegistrationType(e.method)}(o||(t.SemanticTokensRegistrationType=o={})),function(e){e.method="textDocument/semanticTokens/full",e.messageDirection=n.MessageDirection.clientToServer,e.type=new n.ProtocolRequestType(e.method),e.registrationMethod=o.method,e.capabilities=n.CM.create("textDocument.semanticTokens","semanticTokensProvider")}(s||(t.SemanticTokensRequest=s={})),function(e){e.method="textDocument/semanticTokens/full/delta",e.messageDirection=n.MessageDirection.clientToServer,e.type=new n.ProtocolRequestType(e.method),e.registrationMethod=o.method,e.capabilities=n.CM.create("textDocument.semanticTokens.requests.full.delta","semanticTokensProvider.full.delta")}(a||(t.SemanticTokensDeltaRequest=a={})),function(e){e.method="textDocument/semanticTokens/range",e.messageDirection=n.MessageDirection.clientToServer,e.type=new n.ProtocolRequestType(e.method),e.registrationMethod=o.method,e.capabilities=n.CM.create("textDocument.semanticTokens.requests.range","semanticTokensProvider.range")}(c||(t.SemanticTokensRangeRequest=c={})),function(e){e.method="workspace/semanticTokens/refresh",e.messageDirection=n.MessageDirection.serverToClient,e.type=new n.ProtocolRequestType0(e.method),e.capabilities=n.CM.create("workspace.semanticTokens.refreshSupport",void 0)}(l||(t.SemanticTokensRefreshRequest=l={}))},908(e,t,i){"use strict";t.ShowDocumentRequest=void 0;const n=i(372);var r;!function(e){e.method="window/showDocument",e.messageDirection=n.MessageDirection.serverToClient,e.type=new n.ProtocolRequestType(e.method),e.capabilities=n.CM.create("window.showDocument.support",void 0)}(r||(t.ShowDocumentRequest=r={}))},4289(e,t,i){"use strict";t.TextDocumentContentRefreshRequest=t.TextDocumentContentRequest=void 0;const n=i(372);var r,o;!function(e){e.method="workspace/textDocumentContent",e.messageDirection=n.MessageDirection.clientToServer,e.type=new n.ProtocolRequestType(e.method),e.capabilities=n.CM.create("workspace.textDocumentContent","workspace.textDocumentContent")}(r||(t.TextDocumentContentRequest=r={})),function(e){e.method="workspace/textDocumentContent/refresh",e.messageDirection=n.MessageDirection.serverToClient,e.type=new n.ProtocolRequestType(e.method)}(o||(t.TextDocumentContentRefreshRequest=o={}))},8461(e,t,i){"use strict";t.TypeDefinitionRequest=void 0;const n=i(372);var r;!function(e){e.method="textDocument/typeDefinition",e.messageDirection=n.MessageDirection.clientToServer,e.type=new n.ProtocolRequestType(e.method),e.capabilities=n.CM.create("textDocument.typeDefinition","typeDefinitionProvider")}(r||(t.TypeDefinitionRequest=r={}))},645(e,t,i){"use strict";t.TypeHierarchySubtypesRequest=t.TypeHierarchySupertypesRequest=t.TypeHierarchyPrepareRequest=void 0;const n=i(372);var r,o,s;!function(e){e.method="textDocument/prepareTypeHierarchy",e.messageDirection=n.MessageDirection.clientToServer,e.type=new n.ProtocolRequestType(e.method),e.capabilities=n.CM.create("textDocument.typeHierarchy","typeHierarchyProvider")}(r||(t.TypeHierarchyPrepareRequest=r={})),function(e){e.method="typeHierarchy/supertypes",e.messageDirection=n.MessageDirection.clientToServer,e.type=new n.ProtocolRequestType(e.method)}(o||(t.TypeHierarchySupertypesRequest=o={})),function(e){e.method="typeHierarchy/subtypes",e.messageDirection=n.MessageDirection.clientToServer,e.type=new n.ProtocolRequestType(e.method)}(s||(t.TypeHierarchySubtypesRequest=s={}))},9935(e,t,i){"use strict";t.DidChangeWorkspaceFoldersNotification=t.WorkspaceFoldersRequest=void 0;const n=i(372);var r,o;!function(e){e.method="workspace/workspaceFolders",e.messageDirection=n.MessageDirection.serverToClient,e.type=new n.ProtocolRequestType0(e.method),e.capabilities=n.CM.create("workspace.workspaceFolders","workspace.workspaceFolders")}(r||(t.WorkspaceFoldersRequest=r={})),function(e){e.method="workspace/didChangeWorkspaceFolders",e.messageDirection=n.MessageDirection.clientToServer,e.type=new n.ProtocolNotificationType(e.method),e.capabilities=n.CM.create(void 0,"workspace.workspaceFolders.changeNotifications")}(o||(t.DidChangeWorkspaceFoldersNotification=o={}))},8598(e,t){"use strict";function i(e){return"string"==typeof e||e instanceof String}function n(e){return Array.isArray(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.boolean=function(e){return!0===e||!1===e},t.string=i,t.number=function(e){return"number"==typeof e||e instanceof Number},t.error=function(e){return e instanceof Error},t.func=function(e){return"function"==typeof e},t.array=n,t.stringArray=function(e){return n(e)&&e.every(e=>i(e))},t.typedArray=function(e,t){return Array.isArray(e)&&e.every(t)},t.objectLiteral=function(e){return null!==e&&"object"==typeof e}},7354(e,t,i){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,i,n){void 0===n&&(n=i);var r=Object.getOwnPropertyDescriptor(t,i);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[i]}}),Object.defineProperty(e,n,r)}:function(e,t,i,n){void 0===n&&(n=i),e[n]=t[i]}),r=this&&this.__exportStar||function(e,t){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(t,i)||n(t,e,i)};Object.defineProperty(t,"__esModule",{value:!0}),t.createProtocolConnection=function(e,t,i,n){return(0,o.createMessageConnection)(e,t,i,n)};const o=i(7123);r(i(7123),t),r(i(8766),t)},2861(e,t,i){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,i,n){void 0===n&&(n=i);var r=Object.getOwnPropertyDescriptor(t,i);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[i]}}),Object.defineProperty(e,n,r)}:function(e,t,i,n){void 0===n&&(n=i),e[n]=t[i]}),r=this&&this.__exportStar||function(e,t){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(t,i)||n(t,e,i)};Object.defineProperty(t,"__esModule",{value:!0}),t.ProposedFeatures=t.NotebookDocuments=t.TextDocuments=t.SemanticTokensBuilder=void 0;const o=i(2655);Object.defineProperty(t,"SemanticTokensBuilder",{enumerable:!0,get:function(){return o.SemanticTokensBuilder}}),r(i(8766),t);const s=i(1662);Object.defineProperty(t,"TextDocuments",{enumerable:!0,get:function(){return s.TextDocuments}});const a=i(20);var c;Object.defineProperty(t,"NotebookDocuments",{enumerable:!0,get:function(){return a.NotebookDocuments}}),r(i(7874),t),function(e){e.all={__brand:"features"}}(c||(t.ProposedFeatures=c={}))},3918(e,t,i){"use strict";t.CallHierarchyFeature=void 0;const n=i(8766);t.CallHierarchyFeature=e=>class extends e{get callHierarchy(){return{onPrepare:e=>this.connection.onRequest(n.CallHierarchyPrepareRequest.type,(t,i)=>e(t,i,this.attachWorkDoneProgress(t),void 0)),onIncomingCalls:e=>{const t=n.CallHierarchyIncomingCallsRequest.type;return this.connection.onRequest(t,(i,n)=>e(i,n,this.attachWorkDoneProgress(i),this.attachPartialResultProgress(t,i)))},onOutgoingCalls:e=>{const t=n.CallHierarchyOutgoingCallsRequest.type;return this.connection.onRequest(t,(i,n)=>e(i,n,this.attachWorkDoneProgress(i),this.attachPartialResultProgress(t,i)))}}}}},8491(e,t,i){"use strict";var n,r=this&&this.__createBinding||(Object.create?function(e,t,i,n){void 0===n&&(n=i);var r=Object.getOwnPropertyDescriptor(t,i);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[i]}}),Object.defineProperty(e,n,r)}:function(e,t,i,n){void 0===n&&(n=i),e[n]=t[i]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||(n=function(e){return n=Object.getOwnPropertyNames||function(e){var t=[];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[t.length]=i);return t},n(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i=n(e),s=0;s<i.length;s++)"default"!==i[s]&&r(t,e,i[s]);return o(t,e),t});Object.defineProperty(t,"__esModule",{value:!0}),t.ConfigurationFeature=void 0;const a=i(8766),c=s(i(8867));t.ConfigurationFeature=e=>class extends e{getConfiguration(e){return e?c.string(e)?this._getConfiguration({section:e}):this._getConfiguration(e):this._getConfiguration({})}_getConfiguration(e){const t={items:Array.isArray(e)?e:[e]};return this.connection.sendRequest(a.ConfigurationRequest.type,t).then(t=>Array.isArray(t)?Array.isArray(e)?t:t[0]:Array.isArray(e)?[]:null)}}},493(e,t,i){"use strict";t.DiagnosticFeature=void 0;const n=i(8766);t.DiagnosticFeature=e=>class extends e{get diagnostics(){return{refresh:()=>this.connection.sendRequest(n.DiagnosticRefreshRequest.type),on:e=>this.connection.onRequest(n.DocumentDiagnosticRequest.type,(t,i)=>e(t,i,this.attachWorkDoneProgress(t),this.attachPartialResultProgress(n.DocumentDiagnosticRequest.partialResult,t))),onWorkspace:e=>this.connection.onRequest(n.WorkspaceDiagnosticRequest.type,(t,i)=>e(t,i,this.attachWorkDoneProgress(t),this.attachPartialResultProgress(n.WorkspaceDiagnosticRequest.partialResult,t)))}}}},2697(e,t,i){"use strict";t.FileOperationsFeature=void 0;const n=i(8766);t.FileOperationsFeature=e=>class extends e{onDidCreateFiles(e){return this.connection.onNotification(n.DidCreateFilesNotification.type,t=>e(t))}onDidRenameFiles(e){return this.connection.onNotification(n.DidRenameFilesNotification.type,t=>e(t))}onDidDeleteFiles(e){return this.connection.onNotification(n.DidDeleteFilesNotification.type,t=>e(t))}onWillCreateFiles(e){return this.connection.onRequest(n.WillCreateFilesRequest.type,(t,i)=>e(t,i))}onWillRenameFiles(e){return this.connection.onRequest(n.WillRenameFilesRequest.type,(t,i)=>e(t,i))}onWillDeleteFiles(e){return this.connection.onRequest(n.WillDeleteFilesRequest.type,(t,i)=>e(t,i))}}},6007(e,t,i){"use strict";t.FoldingRangeFeature=void 0;const n=i(8766);t.FoldingRangeFeature=e=>class extends e{get foldingRange(){return{refresh:()=>this.connection.sendRequest(n.FoldingRangeRefreshRequest.type),on:e=>{const t=n.FoldingRangeRequest.type;return this.connection.onRequest(t,(i,n)=>e(i,n,this.attachWorkDoneProgress(i),this.attachPartialResultProgress(t,i)))}}}}},4635(e,t,i){"use strict";t.InlayHintFeature=void 0;const n=i(8766);t.InlayHintFeature=e=>class extends e{get inlayHint(){return{refresh:()=>this.connection.sendRequest(n.InlayHintRefreshRequest.type),on:e=>this.connection.onRequest(n.InlayHintRequest.type,(t,i)=>e(t,i,this.attachWorkDoneProgress(t))),resolve:e=>this.connection.onRequest(n.InlayHintResolveRequest.type,(t,i)=>e(t,i))}}}},2534(e,t,i){"use strict";t.InlineCompletionFeature=void 0;const n=i(8766);t.InlineCompletionFeature=e=>class extends e{get inlineCompletion(){return{on:e=>this.connection.onRequest(n.InlineCompletionRequest.type,(t,i)=>e(t,i,this.attachWorkDoneProgress(t)))}}}},1815(e,t,i){"use strict";t.InlineValueFeature=void 0;const n=i(8766);t.InlineValueFeature=e=>class extends e{get inlineValue(){return{refresh:()=>this.connection.sendRequest(n.InlineValueRefreshRequest.type),on:e=>this.connection.onRequest(n.InlineValueRequest.type,(t,i)=>e(t,i,this.attachWorkDoneProgress(t)))}}}},8517(e,t,i){"use strict";t.LinkedEditingRangeFeature=void 0;const n=i(8766);t.LinkedEditingRangeFeature=e=>class extends e{onLinkedEditingRange(e){return this.connection.onRequest(n.LinkedEditingRangeRequest.type,(t,i)=>e(t,i,this.attachWorkDoneProgress(t),void 0))}}},2936(e,t,i){"use strict";t.MonikerFeature=void 0;const n=i(8766);t.MonikerFeature=e=>class extends e{get moniker(){return{on:e=>{const t=n.MonikerRequest.type;return this.connection.onRequest(t,(i,n)=>e(i,n,this.attachWorkDoneProgress(i),this.attachPartialResultProgress(t,i)))}}}}},20(e,t,i){"use strict";t.NotebookDocuments=t.NotebookSyncFeature=void 0;const n=i(8766),r=i(1662);t.NotebookSyncFeature=e=>class extends e{get synchronization(){return{onDidOpenNotebookDocument:e=>this.connection.onNotification(n.DidOpenNotebookDocumentNotification.type,t=>e(t)),onDidChangeNotebookDocument:e=>this.connection.onNotification(n.DidChangeNotebookDocumentNotification.type,t=>e(t)),onDidSaveNotebookDocument:e=>this.connection.onNotification(n.DidSaveNotebookDocumentNotification.type,t=>e(t)),onDidCloseNotebookDocument:e=>this.connection.onNotification(n.DidCloseNotebookDocumentNotification.type,t=>e(t))}}};class o{static NULL_DISPOSE=Object.freeze({dispose:()=>{}});openHandler;changeHandler;closeHandler;onDidOpenTextDocument(e){return this.openHandler=e,n.Disposable.create(()=>{this.openHandler=void 0})}openTextDocument(e){return this.openHandler&&this.openHandler(e)}onDidChangeTextDocument(e){return this.changeHandler=e,n.Disposable.create(()=>{this.changeHandler=e})}changeTextDocument(e){return this.changeHandler&&this.changeHandler(e)}onDidCloseTextDocument(e){return this.closeHandler=e,n.Disposable.create(()=>{this.closeHandler=void 0})}closeTextDocument(e){return this.closeHandler&&this.closeHandler(e)}onWillSaveTextDocument(){return o.NULL_DISPOSE}onWillSaveTextDocumentWaitUntil(){return o.NULL_DISPOSE}onDidSaveTextDocument(){return o.NULL_DISPOSE}}t.NotebookDocuments=class{notebookDocuments;notebookCellMap;_onDidOpen;_onDidSave;_onDidChange;_onDidClose;_cellTextDocuments;constructor(e){e instanceof r.TextDocuments?this._cellTextDocuments=e:this._cellTextDocuments=new r.TextDocuments(e),this.notebookDocuments=new Map,this.notebookCellMap=new Map,this._onDidOpen=new n.Emitter,this._onDidChange=new n.Emitter,this._onDidSave=new n.Emitter,this._onDidClose=new n.Emitter}get cellTextDocuments(){return this._cellTextDocuments}getCellTextDocument(e){return this._cellTextDocuments.get(e.document)}getNotebookDocument(e){return this.notebookDocuments.get(e)}getNotebookCell(e){const t=this.notebookCellMap.get(e);return t&&t[0]}findNotebookDocumentForCell(e){const t="string"==typeof e?e:e.document,i=this.notebookCellMap.get(t);return i&&i[1]}get onDidOpen(){return this._onDidOpen.event}get onDidSave(){return this._onDidSave.event}get onDidChange(){return this._onDidChange.event}get onDidClose(){return this._onDidClose.event}listen(e){const t=new o,i=[];return i.push(this.cellTextDocuments.listen(t)),i.push(e.notebooks.synchronization.onDidOpenNotebookDocument(async e=>{this.notebookDocuments.set(e.notebookDocument.uri,e.notebookDocument);for(const i of e.cellTextDocuments)await t.openTextDocument({textDocument:i});this.updateCellMap(e.notebookDocument),this._onDidOpen.fire(e.notebookDocument)})),i.push(e.notebooks.synchronization.onDidChangeNotebookDocument(async e=>{const i=this.notebookDocuments.get(e.notebookDocument.uri);if(void 0===i)return;i.version=e.notebookDocument.version;const n=i.metadata;let r=!1;const o=e.change;void 0!==o.metadata&&(r=!0,i.metadata=o.metadata);const s=[],a=[],c=[],l=[];if(void 0!==o.cells){const e=o.cells;if(void 0!==e.structure){const n=e.structure.array;if(i.cells.splice(n.start,n.deleteCount,...void 0!==n.cells?n.cells:[]),void 0!==e.structure.didOpen)for(const i of e.structure.didOpen)await t.openTextDocument({textDocument:i}),s.push(i.uri);if(e.structure.didClose)for(const i of e.structure.didClose)await t.closeTextDocument({textDocument:i}),a.push(i.uri)}if(void 0!==e.data){const t=new Map(e.data.map(e=>[e.document,e]));for(let e=0;e<=i.cells.length;e++){const n=t.get(i.cells[e].document);if(void 0!==n){const r=i.cells.splice(e,1,n);if(c.push({old:r[0],new:n}),t.delete(n.document),0===t.size)break}}}if(void 0!==e.textContent)for(const i of e.textContent)await t.changeTextDocument({textDocument:i.document,contentChanges:i.changes}),l.push(i.document.uri)}this.updateCellMap(i);const u={notebookDocument:i};r&&(u.metadata={old:n,new:i.metadata});const h=[];for(const e of s)h.push(this.getNotebookCell(e));const d=[];for(const e of a)d.push(this.getNotebookCell(e));const p=[];for(const e of l)p.push(this.getNotebookCell(e));(h.length>0||d.length>0||c.length>0||p.length>0)&&(u.cells={added:h,removed:d,changed:{data:c,textContent:p}}),void 0===u.metadata&&void 0===u.cells||this._onDidChange.fire(u)})),i.push(e.notebooks.synchronization.onDidSaveNotebookDocument(e=>{const t=this.notebookDocuments.get(e.notebookDocument.uri);void 0!==t&&this._onDidSave.fire(t)})),i.push(e.notebooks.synchronization.onDidCloseNotebookDocument(async e=>{const i=this.notebookDocuments.get(e.notebookDocument.uri);if(void 0!==i){this._onDidClose.fire(i);for(const i of e.cellTextDocuments)await t.closeTextDocument({textDocument:i});this.notebookDocuments.delete(e.notebookDocument.uri);for(const e of i.cells)this.notebookCellMap.delete(e.document)}})),n.Disposable.create(()=>{i.forEach(e=>e.dispose())})}updateCellMap(e){for(const t of e.cells)this.notebookCellMap.set(t.document,[t,e])}}},2938(e,t,i){"use strict";t.ProgressFeature=void 0,t.attachWorkDone=function(e,t){if(void 0===t||void 0===t.workDoneToken)return new a;const i=t.workDoneToken;return delete t.workDoneToken,new o(e,i)},t.attachPartialResult=function(e,t){if(void 0===t||void 0===t.partialResultToken)return;const i=t.partialResultToken;return delete t.partialResultToken,new u(e,i)};const n=i(8766),r=i(6116);class o{_connection;_token;static Instances=new Map;constructor(e,t){this._connection=e,this._token=t,o.Instances.set(this._token,this)}begin(e,t,i,r){const o={kind:"begin",title:e,message:i,cancellable:r};"number"==typeof t&&(o.percentage=Math.round(t)),this._connection.sendProgress(n.WorkDoneProgress.type,this._token,o)}report(e,t){const i={kind:"report"};"number"==typeof e?(i.percentage=Math.round(e),void 0!==t&&(i.message=t)):i.message=e,this._connection.sendProgress(n.WorkDoneProgress.type,this._token,i)}done(){o.Instances.delete(this._token),this._connection.sendProgress(n.WorkDoneProgress.type,this._token,{kind:"end"})}}class s extends o{_source;constructor(e,t){super(e,t),this._source=new n.CancellationTokenSource}get token(){return this._source.token}done(){this._source.dispose(),super.done()}cancel(){this._source.cancel()}}class a{constructor(){}begin(){}report(){}done(){}}class c extends a{_source;constructor(){super(),this._source=new n.CancellationTokenSource}get token(){return this._source.token}done(){this._source.dispose()}cancel(){this._source.cancel()}}var l;t.ProgressFeature=e=>class extends e{_progressSupported;constructor(){super(),this._progressSupported=!1}initialize(e){super.initialize(e),!0===e?.window?.workDoneProgress&&(this._progressSupported=!0,this.connection.onNotification(n.WorkDoneProgressCancelNotification.type,e=>{const t=o.Instances.get(e.token);(t instanceof s||t instanceof c)&&t.cancel()}))}attachWorkDoneProgress(e){return void 0===e?new a:new o(this.connection,e)}createWorkDoneProgress(){if(this._progressSupported){const e=(0,r.generateUuid)();return this.connection.sendRequest(n.WorkDoneProgressCreateRequest.type,{token:e}).then(()=>new s(this.connection,e))}return Promise.resolve(new c)}},function(e){e.type=new n.ProgressType}(l||(l={}));class u{_connection;_token;constructor(e,t){this._connection=e,this._token=t}report(e){this._connection.sendProgress(l.type,this._token,e)}}},2655(e,t,i){"use strict";t.SemanticTokensBuilder=t.SemanticTokensFeature=void 0;const n=i(8766);t.SemanticTokensFeature=e=>class extends e{get semanticTokens(){return{refresh:()=>this.connection.sendRequest(n.SemanticTokensRefreshRequest.type),on:e=>{const t=n.SemanticTokensRequest.type;return this.connection.onRequest(t,(i,n)=>e(i,n,this.attachWorkDoneProgress(i),this.attachPartialResultProgress(t,i)))},onDelta:e=>{const t=n.SemanticTokensDeltaRequest.type;return this.connection.onRequest(t,(i,n)=>e(i,n,this.attachWorkDoneProgress(i),this.attachPartialResultProgress(t,i)))},onRange:e=>{const t=n.SemanticTokensRangeRequest.type;return this.connection.onRequest(t,(i,n)=>e(i,n,this.attachWorkDoneProgress(i),this.attachPartialResultProgress(t,i)))}}}};class r{originalSequence;modifiedSequence;constructor(e,t){this.originalSequence=e,this.modifiedSequence=t}computeDiff(){const e=this.originalSequence.length,t=this.modifiedSequence.length;let i=0;for(;i<t&&i<e&&this.originalSequence[i]===this.modifiedSequence[i];)i++;if(i<t&&i<e){let n=e-1,r=t-1;for(;n>=i&&r>=i&&this.originalSequence[n]===this.modifiedSequence[r];)n--,r--;(n<i||r<i)&&(n++,r++);const o=n-i+1,s=this.modifiedSequence.slice(i,r+1);return 1===s.length&&s[0]===this.originalSequence[n]?[{start:i,deleteCount:o-1}]:[{start:i,deleteCount:o,data:s}]}return i<t?[{start:i,deleteCount:0,data:this.modifiedSequence.slice(i)}]:i<e?[{start:i,deleteCount:e-i}]:[]}}class o{_id;_prevLine;_prevChar;_dataIsSortedAndDeltaEncoded;_data;_dataNonDelta;_dataLen;_prevData;constructor(){this._prevData=void 0,this.initialize()}initialize(){this._id=Date.now(),this._prevLine=0,this._prevChar=0,this._data=[],this._dataNonDelta=[],this._dataLen=0,this._dataIsSortedAndDeltaEncoded=!0}push(e,t,i,n,r){this._dataIsSortedAndDeltaEncoded&&(e<this._prevLine||e===this._prevLine&&t<this._prevChar)&&(this._dataIsSortedAndDeltaEncoded=!1,this._dataNonDelta=o._deltaDecode(this._data));let s=e,a=t;this._dataIsSortedAndDeltaEncoded&&this._dataLen>0&&(s-=this._prevLine,0===s&&(a-=this._prevChar));const c=this._dataIsSortedAndDeltaEncoded?this._data:this._dataNonDelta;c[this._dataLen++]=s,c[this._dataLen++]=a,c[this._dataLen++]=i,c[this._dataLen++]=n,c[this._dataLen++]=r,this._prevLine=e,this._prevChar=t}get id(){return this._id.toString()}static _deltaDecode(e){const t=e.length/5|0;let i=0,n=0;const r=[];for(let o=0;o<t;o++){const t=5*o;let s=e[t],a=e[t+1];0===s?(s=i,a+=n):s+=i;const c=e[t+2],l=e[t+3],u=e[t+4];r[t+0]=s,r[t+1]=a,r[t+2]=c,r[t+3]=l,r[t+4]=u,i=s,n=a}return r}static _sortAndDeltaEncode(e){const t=[],i=e.length/5|0;for(let e=0;e<i;e++)t[e]=e;t.sort((t,i)=>{const n=e[5*t],r=e[5*i];return n===r?e[5*t+1]-e[5*i+1]:n-r});const n=[];let r=0,o=0;for(let s=0;s<i;s++){const i=5*t[s],a=e[i+0],c=e[i+1],l=e[i+2],u=e[i+3],h=e[i+4],d=a-r,p=0===d?c-o:c,f=5*s;n[f+0]=d,n[f+1]=p,n[f+2]=l,n[f+3]=u,n[f+4]=h,r=a,o=c}return n}getFinalDataDelta(){return this._dataIsSortedAndDeltaEncoded?this._data:o._sortAndDeltaEncode(this._dataNonDelta)}previousResult(e){this.id===e&&(this._prevData=this.getFinalDataDelta()),this.initialize()}build(){return this._prevData=void 0,{resultId:this.id,data:this.getFinalDataDelta()}}canBuildEdits(){return void 0!==this._prevData}buildEdits(){return void 0!==this._prevData?{resultId:this.id,edits:new r(this._prevData,this.getFinalDataDelta()).computeDiff()}:this.build()}}t.SemanticTokensBuilder=o},7874(e,t,i){"use strict";var n,r=this&&this.__createBinding||(Object.create?function(e,t,i,n){void 0===n&&(n=i);var r=Object.getOwnPropertyDescriptor(t,i);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[i]}}),Object.defineProperty(e,n,r)}:function(e,t,i,n){void 0===n&&(n=i),e[n]=t[i]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||(n=function(e){return n=Object.getOwnPropertyNames||function(e){var t=[];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[t.length]=i);return t},n(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i=n(e),s=0;s<i.length;s++)"default"!==i[s]&&r(t,e,i[s]);return o(t,e),t});Object.defineProperty(t,"__esModule",{value:!0}),t._NotebooksImpl=t._LanguagesImpl=t.BulkUnregistration=t.BulkRegistration=t.ErrorMessageTracker=void 0,t.combineConsoleFeatures=B,t.combineTelemetryFeatures=$,t.combineTracerFeatures=z,t.combineClientFeatures=H,t.combineWindowFeatures=G,t.combineWorkspaceFeatures=V,t.combineLanguagesFeatures=K,t.combineNotebooksFeatures=Y,t.combineFeatures=function(e,t){function i(e,t,i){return e&&t?i(e,t):e||t}return{__brand:"features",console:i(e.console,t.console,B),tracer:i(e.tracer,t.tracer,z),telemetry:i(e.telemetry,t.telemetry,$),client:i(e.client,t.client,H),window:i(e.window,t.window,G),workspace:i(e.workspace,t.workspace,V),languages:i(e.languages,t.languages,K),notebooks:i(e.notebooks,t.notebooks,Y)}},t.createConnection=function(e,t,i){const n=i&&i.console?new(i.console(P)):new P,r=e(n);n.rawAttach(r);const o=i&&i.tracer?new(i.tracer(q)):new q,s=i&&i.telemetry?new(i.telemetry(j)):new j,l=i&&i.client?new(i.client(M)):new M,h=i&&i.window?new(i.window(x)):new x,d=i&&i.workspace?new(i.workspace(I)):new I,p=i&&i.languages?new(i.languages(L)):new L,f=i&&i.notebooks?new(i.notebooks(U)):new U,g=[n,o,s,l,h,d,p,f];let m,y,v;const _={listen:()=>r.listen(),sendRequest:(e,...t)=>r.sendRequest(c.string(e)?e:e.method,...t),onRequest:(e,t)=>r.onRequest(e,t),sendNotification:(e,t)=>{const i=c.string(e)?e:e.method;return r.sendNotification(i,t)},onNotification:(e,t)=>r.onNotification(e,t),onProgress:r.onProgress,sendProgress:r.sendProgress,onInitialize:e=>(y=e,{dispose:()=>{y=void 0}}),onInitialized:e=>r.onNotification(a.InitializedNotification.type,e),onShutdown:e=>(m=e,{dispose:()=>{m=void 0}}),onExit:e=>(v=e,{dispose:()=>{v=void 0}}),get console(){return n},get telemetry(){return s},get tracer(){return o},get client(){return l},get window(){return h},get workspace(){return d},get languages(){return p},get notebooks(){return f},onDidChangeConfiguration:e=>r.onNotification(a.DidChangeConfigurationNotification.type,e),onDidChangeWatchedFiles:e=>r.onNotification(a.DidChangeWatchedFilesNotification.type,e),__textDocumentSync:void 0,onDidOpenTextDocument:e=>r.onNotification(a.DidOpenTextDocumentNotification.type,e),onDidChangeTextDocument:e=>r.onNotification(a.DidChangeTextDocumentNotification.type,e),onDidCloseTextDocument:e=>r.onNotification(a.DidCloseTextDocumentNotification.type,e),onWillSaveTextDocument:e=>r.onNotification(a.WillSaveTextDocumentNotification.type,e),onWillSaveTextDocumentWaitUntil:e=>r.onRequest(a.WillSaveTextDocumentWaitUntilRequest.type,e),onDidSaveTextDocument:e=>r.onNotification(a.DidSaveTextDocumentNotification.type,e),sendDiagnostics:e=>r.sendNotification(a.PublishDiagnosticsNotification.type,e),onHover:e=>r.onRequest(a.HoverRequest.type,(t,i)=>e(t,i,(0,u.attachWorkDone)(r,t),void 0)),onCompletion:e=>r.onRequest(a.CompletionRequest.type,(t,i)=>e(t,i,(0,u.attachWorkDone)(r,t),(0,u.attachPartialResult)(r,t))),onCompletionResolve:e=>r.onRequest(a.CompletionResolveRequest.type,e),onSignatureHelp:e=>r.onRequest(a.SignatureHelpRequest.type,(t,i)=>e(t,i,(0,u.attachWorkDone)(r,t),void 0)),onDeclaration:e=>r.onRequest(a.DeclarationRequest.type,(t,i)=>e(t,i,(0,u.attachWorkDone)(r,t),(0,u.attachPartialResult)(r,t))),onDefinition:e=>r.onRequest(a.DefinitionRequest.type,(t,i)=>e(t,i,(0,u.attachWorkDone)(r,t),(0,u.attachPartialResult)(r,t))),onTypeDefinition:e=>r.onRequest(a.TypeDefinitionRequest.type,(t,i)=>e(t,i,(0,u.attachWorkDone)(r,t),(0,u.attachPartialResult)(r,t))),onImplementation:e=>r.onRequest(a.ImplementationRequest.type,(t,i)=>e(t,i,(0,u.attachWorkDone)(r,t),(0,u.attachPartialResult)(r,t))),onReferences:e=>r.onRequest(a.ReferencesRequest.type,(t,i)=>e(t,i,(0,u.attachWorkDone)(r,t),(0,u.attachPartialResult)(r,t))),onDocumentHighlight:e=>r.onRequest(a.DocumentHighlightRequest.type,(t,i)=>e(t,i,(0,u.attachWorkDone)(r,t),(0,u.attachPartialResult)(r,t))),onDocumentSymbol:e=>r.onRequest(a.DocumentSymbolRequest.type,(t,i)=>e(t,i,(0,u.attachWorkDone)(r,t),(0,u.attachPartialResult)(r,t))),onWorkspaceSymbol:e=>r.onRequest(a.WorkspaceSymbolRequest.type,(t,i)=>e(t,i,(0,u.attachWorkDone)(r,t),(0,u.attachPartialResult)(r,t))),onWorkspaceSymbolResolve:e=>r.onRequest(a.WorkspaceSymbolResolveRequest.type,e),onCodeAction:e=>r.onRequest(a.CodeActionRequest.type,(t,i)=>e(t,i,(0,u.attachWorkDone)(r,t),(0,u.attachPartialResult)(r,t))),onCodeActionResolve:e=>r.onRequest(a.CodeActionResolveRequest.type,(t,i)=>e(t,i)),onCodeLens:e=>r.onRequest(a.CodeLensRequest.type,(t,i)=>e(t,i,(0,u.attachWorkDone)(r,t),(0,u.attachPartialResult)(r,t))),onCodeLensResolve:e=>r.onRequest(a.CodeLensResolveRequest.type,(t,i)=>e(t,i)),onDocumentFormatting:e=>r.onRequest(a.DocumentFormattingRequest.type,(t,i)=>e(t,i,(0,u.attachWorkDone)(r,t),void 0)),onDocumentRangeFormatting:e=>r.onRequest(a.DocumentRangeFormattingRequest.type,(t,i)=>e(t,i,(0,u.attachWorkDone)(r,t),void 0)),onDocumentOnTypeFormatting:e=>r.onRequest(a.DocumentOnTypeFormattingRequest.type,(t,i)=>e(t,i)),onRenameRequest:e=>r.onRequest(a.RenameRequest.type,(t,i)=>e(t,i,(0,u.attachWorkDone)(r,t),void 0)),onPrepareRename:e=>r.onRequest(a.PrepareRenameRequest.type,(t,i)=>e(t,i)),onDocumentLinks:e=>r.onRequest(a.DocumentLinkRequest.type,(t,i)=>e(t,i,(0,u.attachWorkDone)(r,t),(0,u.attachPartialResult)(r,t))),onDocumentLinkResolve:e=>r.onRequest(a.DocumentLinkResolveRequest.type,(t,i)=>e(t,i)),onDocumentColor:e=>r.onRequest(a.DocumentColorRequest.type,(t,i)=>e(t,i,(0,u.attachWorkDone)(r,t),(0,u.attachPartialResult)(r,t))),onColorPresentation:e=>r.onRequest(a.ColorPresentationRequest.type,(t,i)=>e(t,i,(0,u.attachWorkDone)(r,t),(0,u.attachPartialResult)(r,t))),onFoldingRanges:e=>r.onRequest(a.FoldingRangeRequest.type,(t,i)=>e(t,i,(0,u.attachWorkDone)(r,t),(0,u.attachPartialResult)(r,t))),onSelectionRanges:e=>r.onRequest(a.SelectionRangeRequest.type,(t,i)=>e(t,i,(0,u.attachWorkDone)(r,t),(0,u.attachPartialResult)(r,t))),onExecuteCommand:e=>r.onRequest(a.ExecuteCommandRequest.type,(t,i)=>e(t,i,(0,u.attachWorkDone)(r,t),void 0)),dispose:()=>r.dispose()};for(const e of g)e.attach(_);return r.onRequest(a.InitializeRequest.type,e=>{t.initialize(e),c.string(e.trace)&&(o.trace=a.Trace.fromString(e.trace));for(const t of g)t.initialize(e.capabilities);if(y){const t=y(e,(new a.CancellationTokenSource).token,(0,u.attachWorkDone)(r,e),void 0);return(i=t,i instanceof Promise?i:c.thenable(i)?new Promise((e,t)=>{i.then(t=>e(t),e=>t(e))}):Promise.resolve(i)).then(e=>{if(e instanceof a.ResponseError)return e;let t=e;t||(t={capabilities:{}});let i=t.capabilities;i||(i={},t.capabilities=i),void 0===i.textDocumentSync||null===i.textDocumentSync?i.textDocumentSync=c.number(_.__textDocumentSync)?_.__textDocumentSync:a.TextDocumentSyncKind.None:c.number(i.textDocumentSync)||c.number(i.textDocumentSync.change)||(i.textDocumentSync.change=c.number(_.__textDocumentSync)?_.__textDocumentSync:a.TextDocumentSyncKind.None);for(const e of g)e.fillServerCapabilities(i);return t})}{const e={capabilities:{textDocumentSync:a.TextDocumentSyncKind.None}};for(const t of g)t.fillServerCapabilities(e.capabilities);return e}var i}),r.onRequest(a.ShutdownRequest.type,()=>(t.shutdownReceived=!0,m?m((new a.CancellationTokenSource).token):void 0)),r.onNotification(a.ExitNotification.type,()=>{try{if(v)return v()}finally{t.shutdownReceived?t.exit(0):t.exit(1)}}),r.onNotification(a.SetTraceNotification.type,e=>{o.trace=a.Trace.fromString(e.value)}),_};const a=i(8766),c=s(i(8867)),l=s(i(6116)),u=i(2938),h=i(8491),d=i(2112),p=i(3918),f=i(2655),g=i(8817),m=i(2697),y=i(8517),v=i(5026),_=i(1815),b=i(6007),w=i(4635),D=i(493),T=i(20),S=i(2936),C=i(2534),R=i(9202);function E(e){if(null!==e)return e}t.ErrorMessageTracker=class{_messages;constructor(){this._messages=Object.create(null)}add(e){let t=this._messages[e];t||(t=0),t++,this._messages[e]=t}sendErrors(e){Object.keys(this._messages).forEach(t=>{e.window.showErrorMessage(t)})}};class P{_rawConnection;_connection;constructor(){}rawAttach(e){this._rawConnection=e}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}fillServerCapabilities(e){}initialize(e){}error(e){this.send(a.MessageType.Error,e)}warn(e){this.send(a.MessageType.Warning,e)}info(e){this.send(a.MessageType.Info,e)}log(e){this.send(a.MessageType.Log,e)}debug(e){this.send(a.MessageType.Debug,e)}send(e,t){this._rawConnection&&this._rawConnection.sendNotification(a.LogMessageNotification.type,{type:e,message:t}).catch(()=>{(0,a.RAL)().console.error("Sending log message failed")})}}const x=(0,g.ShowDocumentFeature)((0,u.ProgressFeature)(class{_connection;constructor(){}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}showErrorMessage(e,...t){const i={type:a.MessageType.Error,message:e,actions:t};return this.connection.sendRequest(a.ShowMessageRequest.type,i).then(E)}showWarningMessage(e,...t){const i={type:a.MessageType.Warning,message:e,actions:t};return this.connection.sendRequest(a.ShowMessageRequest.type,i).then(E)}showInformationMessage(e,...t){const i={type:a.MessageType.Info,message:e,actions:t};return this.connection.sendRequest(a.ShowMessageRequest.type,i).then(E)}}));var O,k;!function(e){e.create=function(){return new N}}(O||(t.BulkRegistration=O={}));class N{_registrations=[];_registered=new Set;add(e,t){const i=c.string(e)?e:e.method;if(this._registered.has(i))throw new Error(`${i} is already added to this registration`);const n=l.generateUuid();this._registrations.push({id:n,method:i,registerOptions:t||{}}),this._registered.add(i)}asRegistrationParams(){return{registrations:this._registrations}}}!function(e){e.create=function(){return new A(void 0,[])}}(k||(t.BulkUnregistration=k={}));class A{_connection;_unregistrations=new Map;constructor(e,t){this._connection=e,t.forEach(e=>{this._unregistrations.set(e.method,e)})}get isAttached(){return!!this._connection}attach(e){this._connection=e}add(e){this._unregistrations.set(e.method,e)}dispose(){const e=[];for(const t of this._unregistrations.values())e.push(t);const t={unregisterations:e};this._connection.sendRequest(a.UnregistrationRequest.type,t).catch(()=>{this._connection.console.info("Bulk unregistration failed.")})}disposeSingle(e){const t=c.string(e)?e:e.method,i=this._unregistrations.get(t);if(!i)return!1;const n={unregisterations:[i]};return this._connection.sendRequest(a.UnregistrationRequest.type,n).then(()=>{this._unregistrations.delete(t)},e=>{this._connection.console.info(`Un-registering request handler for ${i.id} failed.`)}),!0}}class M{_connection;attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}register(e,t,i){return e instanceof N?this.registerMany(e):e instanceof A?this.registerSingle1(e,t,i):this.registerSingle2(e,t)}registerSingle1(e,t,i){const n=c.string(t)?t:t.method,r=l.generateUuid(),o={registrations:[{id:r,method:n,registerOptions:i||{}}]};return e.isAttached||e.attach(this.connection),this.connection.sendRequest(a.RegistrationRequest.type,o).then(t=>(e.add({id:r,method:n}),e),e=>(this.connection.console.info(`Registering request handler for ${n} failed.`),Promise.reject(e)))}registerSingle2(e,t){const i=c.string(e)?e:e.method,n=l.generateUuid(),r={registrations:[{id:n,method:i,registerOptions:t||{}}]};return this.connection.sendRequest(a.RegistrationRequest.type,r).then(e=>a.Disposable.create(()=>{this.unregisterSingle(n,i).catch(()=>{this.connection.console.info(`Un-registering capability with id ${n} failed.`)})}),e=>(this.connection.console.info(`Registering request handler for ${i} failed.`),Promise.reject(e)))}unregisterSingle(e,t){const i={unregisterations:[{id:e,method:t}]};return this.connection.sendRequest(a.UnregistrationRequest.type,i).catch(()=>{this.connection.console.info(`Un-registering request handler for ${e} failed.`)})}registerMany(e){const t=e.asRegistrationParams();return this.connection.sendRequest(a.RegistrationRequest.type,t).then(()=>new A(this._connection,t.registrations.map(e=>({id:e.id,method:e.method}))),e=>(this.connection.console.info("Bulk registration failed."),Promise.reject(e)))}}const I=(0,R.TextDocumentContentFeature)((0,m.FileOperationsFeature)((0,d.WorkspaceFoldersFeature)((0,h.ConfigurationFeature)(class{_connection;constructor(){}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}applyEdit(e){const t=(i=e)&&i.edit?e:{edit:e};var i;return this.connection.sendRequest(a.ApplyWorkspaceEditRequest.type,t)}}))));class q{_trace;_connection;constructor(){this._trace=a.Trace.Off}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}set trace(e){this._trace=e}log(e,t){this._trace!==a.Trace.Off&&this.connection.sendNotification(a.LogTraceNotification.type,{message:e,verbose:this._trace===a.Trace.Verbose?t:void 0}).catch(()=>{})}}class j{_connection;constructor(){}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}logEvent(e){this.connection.sendNotification(a.TelemetryEventNotification.type,e).catch(()=>{this.connection.console.log("Sending TelemetryEventNotification failed")})}}class F{_connection;constructor(){}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}attachWorkDoneProgress(e){return(0,u.attachWorkDone)(this.connection,e)}attachPartialResultProgress(e,t){return(0,u.attachPartialResult)(this.connection,t)}}t._LanguagesImpl=F;const L=(0,C.InlineCompletionFeature)((0,b.FoldingRangeFeature)((0,S.MonikerFeature)((0,D.DiagnosticFeature)((0,w.InlayHintFeature)((0,_.InlineValueFeature)((0,v.TypeHierarchyFeature)((0,y.LinkedEditingRangeFeature)((0,f.SemanticTokensFeature)((0,p.CallHierarchyFeature)(F))))))))));class W{_connection;constructor(){}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}attachWorkDoneProgress(e){return(0,u.attachWorkDone)(this.connection,e)}attachPartialResultProgress(e,t){return(0,u.attachPartialResult)(this.connection,t)}}t._NotebooksImpl=W;const U=(0,T.NotebookSyncFeature)(W);function B(e,t){return function(i){return t(e(i))}}function $(e,t){return function(i){return t(e(i))}}function z(e,t){return function(i){return t(e(i))}}function H(e,t){return function(i){return t(e(i))}}function G(e,t){return function(i){return t(e(i))}}function V(e,t){return function(i){return t(e(i))}}function K(e,t){return function(i){return t(e(i))}}function Y(e,t){return function(i){return t(e(i))}}},8817(e,t,i){"use strict";t.ShowDocumentFeature=void 0;const n=i(8766);t.ShowDocumentFeature=e=>class extends e{showDocument(e){return this.connection.sendRequest(n.ShowDocumentRequest.type,e)}}},9202(e,t,i){"use strict";t.TextDocumentContentFeature=void 0;const n=i(8766);t.TextDocumentContentFeature=e=>class extends e{get textDocumentContent(){return{refresh:e=>this.connection.sendRequest(n.TextDocumentContentRefreshRequest.type,{uri:e}),on:e=>this.connection.onRequest(n.TextDocumentContentRequest.type,(t,i)=>e(t,i))}}}},1662(e,t,i){"use strict";t.TextDocuments=void 0;const n=i(8766);t.TextDocuments=class{_configuration;_syncedDocuments;_onDidChangeContent;_onDidOpen;_onDidClose;_onDidSave;_onWillSave;_willSaveWaitUntil;constructor(e){this._configuration=e,this._syncedDocuments=new Map,this._onDidChangeContent=new n.Emitter,this._onDidOpen=new n.Emitter,this._onDidClose=new n.Emitter,this._onDidSave=new n.Emitter,this._onWillSave=new n.Emitter}get onDidOpen(){return this._onDidOpen.event}get onDidChangeContent(){return this._onDidChangeContent.event}get onWillSave(){return this._onWillSave.event}onWillSaveWaitUntil(e){this._willSaveWaitUntil=e}get onDidSave(){return this._onDidSave.event}get onDidClose(){return this._onDidClose.event}get(e){return this._syncedDocuments.get(e)}all(){return Array.from(this._syncedDocuments.values())}keys(){return Array.from(this._syncedDocuments.keys())}listen(e){e.__textDocumentSync=n.TextDocumentSyncKind.Incremental;const t=[];return t.push(e.onDidOpenTextDocument(e=>{const t=e.textDocument,i=this._configuration.create(t.uri,t.languageId,t.version,t.text);this._syncedDocuments.set(t.uri,i);const n=Object.freeze({document:i});this._onDidOpen.fire(n),this._onDidChangeContent.fire(n)})),t.push(e.onDidChangeTextDocument(e=>{const t=e.textDocument,i=e.contentChanges;if(0===i.length)return;const{version:n}=t;if(null==n)throw new Error(`Received document change event for ${t.uri} without valid version identifier`);let r=this._syncedDocuments.get(t.uri);void 0!==r&&(r=this._configuration.update(r,i,n),this._syncedDocuments.set(t.uri,r),this._onDidChangeContent.fire(Object.freeze({document:r})))})),t.push(e.onDidCloseTextDocument(e=>{const t=this._syncedDocuments.get(e.textDocument.uri);void 0!==t&&(this._syncedDocuments.delete(e.textDocument.uri),this._onDidClose.fire(Object.freeze({document:t})))})),t.push(e.onWillSaveTextDocument(e=>{const t=this._syncedDocuments.get(e.textDocument.uri);void 0!==t&&this._onWillSave.fire(Object.freeze({document:t,reason:e.reason}))})),t.push(e.onWillSaveTextDocumentWaitUntil((e,t)=>{const i=this._syncedDocuments.get(e.textDocument.uri);return void 0!==i&&this._willSaveWaitUntil?this._willSaveWaitUntil(Object.freeze({document:i,reason:e.reason}),t):[]})),t.push(e.onDidSaveTextDocument(e=>{const t=this._syncedDocuments.get(e.textDocument.uri);void 0!==t&&this._onDidSave.fire(Object.freeze({document:t}))})),n.Disposable.create(()=>{t.forEach(e=>e.dispose())})}}},5026(e,t,i){"use strict";t.TypeHierarchyFeature=void 0;const n=i(8766);t.TypeHierarchyFeature=e=>class extends e{get typeHierarchy(){return{onPrepare:e=>this.connection.onRequest(n.TypeHierarchyPrepareRequest.type,(t,i)=>e(t,i,this.attachWorkDoneProgress(t),void 0)),onSupertypes:e=>{const t=n.TypeHierarchySupertypesRequest.type;return this.connection.onRequest(t,(i,n)=>e(i,n,this.attachWorkDoneProgress(i),this.attachPartialResultProgress(t,i)))},onSubtypes:e=>{const t=n.TypeHierarchySubtypesRequest.type;return this.connection.onRequest(t,(i,n)=>e(i,n,this.attachWorkDoneProgress(i),this.attachPartialResultProgress(t,i)))}}}}},8867(e,t){"use strict";function i(e){return"string"==typeof e||e instanceof String}function n(e){return"function"==typeof e}function r(e){return Array.isArray(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.boolean=function(e){return!0===e||!1===e},t.string=i,t.number=function(e){return"number"==typeof e||e instanceof Number},t.error=function(e){return e instanceof Error},t.func=n,t.array=r,t.stringArray=function(e){return r(e)&&e.every(e=>i(e))},t.typedArray=function(e,t){return Array.isArray(e)&&e.every(t)},t.thenable=function(e){return e&&n(e.then)}},6116(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.empty=void 0,t.v4=r,t.isUUID=s,t.parse=function(e){if(!s(e))throw new Error("invalid uuid");return new i(e)},t.generateUuid=function(){return r().asHex()};class i{_value;constructor(e){this._value=e}asHex(){return this._value}equals(e){return this.asHex()===e.asHex()}}class n extends i{static _chars=["0","1","2","3","4","5","6","6","7","8","9","a","b","c","d","e","f"];static _timeHighBits=["8","9","a","b"];static _oneOf(e){return e[Math.floor(e.length*Math.random())]}static _randomHex(){return n._oneOf(n._chars)}constructor(){super([n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),"-",n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),"-","4",n._randomHex(),n._randomHex(),n._randomHex(),"-",n._oneOf(n._timeHighBits),n._randomHex(),n._randomHex(),n._randomHex(),"-",n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex()].join(""))}}function r(){return new n}t.empty=new i("00000000-0000-0000-0000-000000000000");const o=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function s(e){return o.test(e)}},2112(e,t,i){"use strict";t.WorkspaceFoldersFeature=void 0;const n=i(8766);t.WorkspaceFoldersFeature=e=>class extends e{_onDidChangeWorkspaceFolders;_unregistration;_notificationIsAutoRegistered;constructor(){super(),this._notificationIsAutoRegistered=!1}initialize(e){super.initialize(e);const t=e.workspace;t&&t.workspaceFolders&&(this._onDidChangeWorkspaceFolders=new n.Emitter,this.connection.onNotification(n.DidChangeWorkspaceFoldersNotification.type,e=>{this._onDidChangeWorkspaceFolders.fire(e.event)}))}fillServerCapabilities(e){super.fillServerCapabilities(e);const t=e.workspace?.workspaceFolders?.changeNotifications;this._notificationIsAutoRegistered=!0===t||"string"==typeof t}getWorkspaceFolders(){return this.connection.sendRequest(n.WorkspaceFoldersRequest.type)}get onDidChangeWorkspaceFolders(){if(!this._onDidChangeWorkspaceFolders)throw new Error("Client doesn't support sending workspace folder change events.");return this._notificationIsAutoRegistered||this._unregistration||(this._unregistration=this.connection.client.register(n.DidChangeWorkspaceFoldersNotification.type)),this._onDidChangeWorkspaceFolders.event}}},3911(e,t,i){"use strict";var n,r=this&&this.__createBinding||(Object.create?function(e,t,i,n){void 0===n&&(n=i);var r=Object.getOwnPropertyDescriptor(t,i);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[i]}}),Object.defineProperty(e,n,r)}:function(e,t,i,n){void 0===n&&(n=i),e[n]=t[i]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||(n=function(e){return n=Object.getOwnPropertyNames||function(e){var t=[];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[t.length]=i);return t},n(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i=n(e),s=0;s<i.length;s++)"default"!==i[s]&&r(t,e,i[s]);return o(t,e),t});Object.defineProperty(t,"__esModule",{value:!0}),t.FileSystem=void 0,t.uriToFilePath=function(e){const t=a.parse(e);if("file:"!==t.protocol||!t.path)return;const i=t.path.split("/");for(let e=0,t=i.length;e<t;e++)i[e]=decodeURIComponent(i[e]);if("win32"===process.platform&&i.length>1){const e=i[0],t=i[1];0===e.length&&t.length>1&&":"===t[1]&&i.shift()}return c.normalize(i.join("/"))},t.resolve=d,t.resolveGlobalNodePath=p,t.resolveGlobalYarnPath=function(e){let t="yarn";const i={encoding:"utf8"};h()&&(t="yarn.cmd",i.shell=!0);const n=()=>{};try{process.on("SIGPIPE",n);const r=(0,u.spawnSync)(t,["global","dir","--json"],i),o=r.stdout;if(!o)return void(e&&(e("'yarn global dir' didn't return a value."),r.stderr&&e(r.stderr)));const s=o.trim().split(/\r?\n/);for(const e of s)try{const t=JSON.parse(e);if("log"===t.type)return c.join(t.data,"node_modules")}catch(e){}return}catch(e){return}finally{process.removeListener("SIGPIPE",n)}},t.resolveModulePath=function(e,t,i,n){return i?(c.isAbsolute(i)||(i=c.join(e,i)),d(t,i,i,n).then(e=>f.isParent(i,e)?e:Promise.reject(new Error(`Failed to load ${t} from node path location.`))).then(void 0,i=>d(t,p(n),e,n))):d(t,p(n),e,n)};const a=s(i(7016)),c=s(i(6928)),l=s(i(9896)),u=i(5317);function h(){return"win32"===process.platform}function d(e,t,i,n){const r="NODE_PATH",o=["var p = process;","p.on('message',function(m){","if(m.c==='e'){","p.exit(0);","}","else if(m.c==='rs'){","try{","var r=require.resolve(m.a);","p.send({c:'r',s:true,r:r});","}","catch(err){","p.send({c:'r',s:false});","}","}","});"].join("");return new Promise((s,a)=>{const h=process.env,d=Object.create(null);Object.keys(h).forEach(e=>d[e]=h[e]),t&&l.existsSync(t)&&(d[r]?d[r]=t+c.delimiter+d[r]:d[r]=t,n&&n(`NODE_PATH value is: ${d[r]}`)),d.ELECTRON_RUN_AS_NODE="1";try{const t=(0,u.fork)("",[],{cwd:i,env:d,execArgv:["-e",o]});if(void 0===t.pid)return void a(new Error(`Starting process to resolve node module ${e} failed`));t.on("error",e=>{a(e)}),t.on("message",i=>{"r"===i.c&&(t.send({c:"e"}),i.s?s(i.r):a(new Error(`Failed to resolve module: ${e}`)))});const n={c:"rs",a:e};t.send(n)}catch(e){a(e)}})}function p(e){let t="npm";const i=Object.create(null);Object.keys(process.env).forEach(e=>i[e]=process.env[e]),i.NO_UPDATE_NOTIFIER="true";const n={encoding:"utf8",env:i};h()&&(t="npm.cmd",n.shell=!0);const r=()=>{};try{process.on("SIGPIPE",r);const i=(0,u.spawnSync)(t,["config","get","prefix"],n).stdout;if(!i)return void(e&&e("'npm config get prefix' didn't return a value."));const o=i.trim();return e&&e(`'npm config get prefix' value is: ${o}`),o.length>0?h()?c.join(o,"node_modules"):c.join(o,"lib","node_modules"):void 0}catch(e){return}finally{process.removeListener("SIGPIPE",r)}}var f;!function(e){let t;function i(){return void 0!==t||(t=!("win32"===process.platform||l.existsSync(__filename.toUpperCase())&&l.existsSync(__filename.toLowerCase()))),t}e.isCaseSensitive=i,e.isParent=function(e,t){return i()?0===c.normalize(t).indexOf(c.normalize(e)):0===c.normalize(t).toLowerCase().indexOf(c.normalize(e).toLowerCase())}}(f||(t.FileSystem=f={}))},1327(e,t,i){"use strict";var n,r=this&&this.__createBinding||(Object.create?function(e,t,i,n){void 0===n&&(n=i);var r=Object.getOwnPropertyDescriptor(t,i);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[i]}}),Object.defineProperty(e,n,r)}:function(e,t,i,n){void 0===n&&(n=i),e[n]=t[i]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||(n=function(e){return n=Object.getOwnPropertyNames||function(e){var t=[];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[t.length]=i);return t},n(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i=n(e),s=0;s<i.length;s++)"default"!==i[s]&&r(t,e,i[s]);return o(t,e),t}),a=this&&this.__exportStar||function(e,t){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(t,i)||r(t,e,i)};Object.defineProperty(t,"__esModule",{value:!0}),t.Files=void 0,t.createConnection=function(e,t,i,n){let r,o,s,a;return void 0!==e&&"features"===e.__brand&&(r=e,e=t,t=i,i=n),d.ConnectionStrategy.is(e)||d.ConnectionOptions.is(e)?a=e:(o=e,s=t,a=i),function(e,t,i,n){let r=!1;if(!e&&!t&&process.argv.length>2){let i,n;const o=process.argv.slice(2);for(let s=0;s<o.length;s++){const a=o[s];if("--node-ipc"===a){e=new d.IPCMessageReader(process),t=new d.IPCMessageWriter(process);break}if("--stdio"===a){r=!0,e=process.stdin,t=process.stdout;break}if("--socket"===a){i=parseInt(o[s+1]);break}if("--pipe"===a){n=o[s+1];break}{const e=a.split("=");if("--socket"===e[0]){i=parseInt(e[1]);break}if("--pipe"===e[0]){n=e[1];break}}}if(i){const n=(0,d.createServerSocketTransport)(i);e=n[0],t=n[1]}else if(n){const i=(0,d.createServerPipeTransport)(n);e=i[0],t=i[1]}}const o="Use arguments of createConnection or set command line parameters: '--node-ipc', '--stdio' or '--socket={number}'";if(!e)throw new Error("Connection input stream is not set. "+o);if(!t)throw new Error("Connection output stream is not set. "+o);if(l.func(e.read)&&l.func(e.on)){const t=e;t.on("end",()=>{process.exit(g?0:1)}),t.on("close",()=>{process.exit(g?0:1)})}return(0,u.createConnection)(n=>{const o=(0,d.createProtocolConnection)(e,t,n,i);return r&&function(e){function t(e){return e.map(e=>"string"==typeof e?e:(0,c.inspect)(e)).join(" ")}const i=new Map;console.assert=function(i,...n){if(!i)if(0===n.length)e.error("Assertion failed");else{const[i,...r]=n;e.error(`Assertion failed: ${i} ${t(r)}`)}},console.count=function(t="default"){const n=String(t);let r=i.get(n)??0;r+=1,i.set(n,r),e.log(`${n}: ${n}`)},console.countReset=function(e){void 0===e?i.clear():i.delete(String(e))},console.debug=function(...i){e.log(t(i))},console.dir=function(t,i){e.log((0,c.inspect)(t,i))},console.log=function(...i){e.log(t(i))},console.error=function(...i){e.error(t(i))},console.trace=function(...i){const n=(new Error).stack.replace(/(.+\n){2}/,"");let r="Trace";0!==i.length&&(r+=`: ${t(i)}`),e.log(`${r}\n${n}`)},console.warn=function(...i){e.warn(t(i))}}(n),o},m,n)}(o,s,a,r)};const c=i(7975),l=s(i(8867)),u=i(7874),h=s(i(3911)),d=i(7354);var p;a(i(7354),t),a(i(2861),t),function(e){e.uriToFilePath=h.uriToFilePath,e.resolveGlobalNodePath=h.resolveGlobalNodePath,e.resolveGlobalYarnPath=h.resolveGlobalYarnPath,e.resolve=h.resolve,e.resolveModulePath=h.resolveModulePath}(p||(t.Files=p={}));let f,g=!1;!function(){const e="--clientProcessId";function t(e){try{const t=parseInt(e);isNaN(t)||(f=setInterval(()=>{try{process.kill(t,0)}catch(e){process.exit(g?0:1)}},3e3))}catch(e){}}for(let i=2;i<process.argv.length;i++){const n=process.argv[i];if(n===e&&i+1<process.argv.length)return void t(process.argv[i+1]);{const i=n.split("=");i[0]===e&&t(i[1])}}}();const m={initialize:e=>{const t=e.processId;l.number(t)&&void 0===f&&setInterval(()=>{try{process.kill(t,0)}catch(e){process.exit(g?0:1)}},3e3)},get shutdownReceived(){return g},set shutdownReceived(e){g=e},exit:e=>{process.exit(e)}}},8945(e){var t;t=()=>(()=>{"use strict";var e={975:e=>{function t(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}function i(e,t){for(var i,n="",r=0,o=-1,s=0,a=0;a<=e.length;++a){if(a<e.length)i=e.charCodeAt(a);else{if(47===i)break;i=47}if(47===i){if(o===a-1||1===s);else if(o!==a-1&&2===s){if(n.length<2||2!==r||46!==n.charCodeAt(n.length-1)||46!==n.charCodeAt(n.length-2))if(n.length>2){var c=n.lastIndexOf("/");if(c!==n.length-1){-1===c?(n="",r=0):r=(n=n.slice(0,c)).length-1-n.lastIndexOf("/"),o=a,s=0;continue}}else if(2===n.length||1===n.length){n="",r=0,o=a,s=0;continue}t&&(n.length>0?n+="/..":n="..",r=2)}else n.length>0?n+="/"+e.slice(o+1,a):n=e.slice(o+1,a),r=a-o-1;o=a,s=0}else 46===i&&-1!==s?++s:s=-1}return n}var n={resolve:function(){for(var e,n="",r=!1,o=arguments.length-1;o>=-1&&!r;o--){var s;o>=0?s=arguments[o]:(void 0===e&&(e=process.cwd()),s=e),t(s),0!==s.length&&(n=s+"/"+n,r=47===s.charCodeAt(0))}return n=i(n,!r),r?n.length>0?"/"+n:"/":n.length>0?n:"."},normalize:function(e){if(t(e),0===e.length)return".";var n=47===e.charCodeAt(0),r=47===e.charCodeAt(e.length-1);return 0!==(e=i(e,!n)).length||n||(e="."),e.length>0&&r&&(e+="/"),n?"/"+e:e},isAbsolute:function(e){return t(e),e.length>0&&47===e.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var e,i=0;i<arguments.length;++i){var r=arguments[i];t(r),r.length>0&&(void 0===e?e=r:e+="/"+r)}return void 0===e?".":n.normalize(e)},relative:function(e,i){if(t(e),t(i),e===i)return"";if((e=n.resolve(e))===(i=n.resolve(i)))return"";for(var r=1;r<e.length&&47===e.charCodeAt(r);++r);for(var o=e.length,s=o-r,a=1;a<i.length&&47===i.charCodeAt(a);++a);for(var c=i.length-a,l=s<c?s:c,u=-1,h=0;h<=l;++h){if(h===l){if(c>l){if(47===i.charCodeAt(a+h))return i.slice(a+h+1);if(0===h)return i.slice(a+h)}else s>l&&(47===e.charCodeAt(r+h)?u=h:0===h&&(u=0));break}var d=e.charCodeAt(r+h);if(d!==i.charCodeAt(a+h))break;47===d&&(u=h)}var p="";for(h=r+u+1;h<=o;++h)h!==o&&47!==e.charCodeAt(h)||(0===p.length?p+="..":p+="/..");return p.length>0?p+i.slice(a+u):(a+=u,47===i.charCodeAt(a)&&++a,i.slice(a))},_makeLong:function(e){return e},dirname:function(e){if(t(e),0===e.length)return".";for(var i=e.charCodeAt(0),n=47===i,r=-1,o=!0,s=e.length-1;s>=1;--s)if(47===(i=e.charCodeAt(s))){if(!o){r=s;break}}else o=!1;return-1===r?n?"/":".":n&&1===r?"//":e.slice(0,r)},basename:function(e,i){if(void 0!==i&&"string"!=typeof i)throw new TypeError('"ext" argument must be a string');t(e);var n,r=0,o=-1,s=!0;if(void 0!==i&&i.length>0&&i.length<=e.length){if(i.length===e.length&&i===e)return"";var a=i.length-1,c=-1;for(n=e.length-1;n>=0;--n){var l=e.charCodeAt(n);if(47===l){if(!s){r=n+1;break}}else-1===c&&(s=!1,c=n+1),a>=0&&(l===i.charCodeAt(a)?-1==--a&&(o=n):(a=-1,o=c))}return r===o?o=c:-1===o&&(o=e.length),e.slice(r,o)}for(n=e.length-1;n>=0;--n)if(47===e.charCodeAt(n)){if(!s){r=n+1;break}}else-1===o&&(s=!1,o=n+1);return-1===o?"":e.slice(r,o)},extname:function(e){t(e);for(var i=-1,n=0,r=-1,o=!0,s=0,a=e.length-1;a>=0;--a){var c=e.charCodeAt(a);if(47!==c)-1===r&&(o=!1,r=a+1),46===c?-1===i?i=a:1!==s&&(s=1):-1!==i&&(s=-1);else if(!o){n=a+1;break}}return-1===i||-1===r||0===s||1===s&&i===r-1&&i===n+1?"":e.slice(i,r)},format:function(e){if(null===e||"object"!=typeof e)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return function(e,t){var i=t.dir||t.root,n=t.base||(t.name||"")+(t.ext||"");return i?i===t.root?i+n:i+"/"+n:n}(0,e)},parse:function(e){t(e);var i={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return i;var n,r=e.charCodeAt(0),o=47===r;o?(i.root="/",n=1):n=0;for(var s=-1,a=0,c=-1,l=!0,u=e.length-1,h=0;u>=n;--u)if(47!==(r=e.charCodeAt(u)))-1===c&&(l=!1,c=u+1),46===r?-1===s?s=u:1!==h&&(h=1):-1!==s&&(h=-1);else if(!l){a=u+1;break}return-1===s||-1===c||0===h||1===h&&s===c-1&&s===a+1?-1!==c&&(i.base=i.name=0===a&&o?e.slice(1,c):e.slice(a,c)):(0===a&&o?(i.name=e.slice(1,s),i.base=e.slice(1,c)):(i.name=e.slice(a,s),i.base=e.slice(a,c)),i.ext=e.slice(s,c)),a>0?i.dir=e.slice(0,a-1):o&&(i.dir="/"),i},sep:"/",delimiter:":",win32:null,posix:null};n.posix=n,e.exports=n},70:(e,t)=>{if(Object.defineProperty(t,"__esModule",{value:!0}),t.isWindows=void 0,"object"==typeof process)t.isWindows="win32"===process.platform;else if("object"==typeof navigator){let e=navigator.userAgent;t.isWindows=e.indexOf("Windows")>=0}},231:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.uriToFsPath=t.URI=void 0;const n=i(70),r=/^\w[\w\d+.-]*$/,o=/^\//,s=/^\/\//;function a(e,t){if(!e.scheme&&t)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${e.authority}", path: "${e.path}", query: "${e.query}", fragment: "${e.fragment}"}`);if(e.scheme&&!r.test(e.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(e.path)if(e.authority){if(!o.test(e.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(s.test(e.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}const c="",l="/",u=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class h{static isUri(e){return e instanceof h||!!e&&"string"==typeof e.authority&&"string"==typeof e.fragment&&"string"==typeof e.path&&"string"==typeof e.query&&"string"==typeof e.scheme&&"string"==typeof e.fsPath&&"function"==typeof e.with&&"function"==typeof e.toString}scheme;authority;path;query;fragment;constructor(e,t,i,n,r,o=!1){"object"==typeof e?(this.scheme=e.scheme||c,this.authority=e.authority||c,this.path=e.path||c,this.query=e.query||c,this.fragment=e.fragment||c):(this.scheme=function(e,t){return e||t?e:"file"}(e,o),this.authority=t||c,this.path=function(e,t){switch(e){case"https":case"http":case"file":t?t[0]!==l&&(t=l+t):t=l}return t}(this.scheme,i||c),this.query=n||c,this.fragment=r||c,a(this,o))}get fsPath(){return y(this,!1)}with(e){if(!e)return this;let{scheme:t,authority:i,path:n,query:r,fragment:o}=e;return void 0===t?t=this.scheme:null===t&&(t=c),void 0===i?i=this.authority:null===i&&(i=c),void 0===n?n=this.path:null===n&&(n=c),void 0===r?r=this.query:null===r&&(r=c),void 0===o?o=this.fragment:null===o&&(o=c),t===this.scheme&&i===this.authority&&n===this.path&&r===this.query&&o===this.fragment?this:new p(t,i,n,r,o)}static parse(e,t=!1){const i=u.exec(e);return i?new p(i[2]||c,w(i[4]||c),w(i[5]||c),w(i[7]||c),w(i[9]||c),t):new p(c,c,c,c,c)}static file(e){let t=c;if(n.isWindows&&(e=e.replace(/\\/g,l)),e[0]===l&&e[1]===l){const i=e.indexOf(l,2);-1===i?(t=e.substring(2),e=l):(t=e.substring(2,i),e=e.substring(i)||l)}return new p("file",t,e,c,c)}static from(e){const t=new p(e.scheme,e.authority,e.path,e.query,e.fragment);return a(t,!0),t}toString(e=!1){return v(this,e)}toJSON(){return this}static revive(e){if(e){if(e instanceof h)return e;{const t=new p(e);return t._formatted=e.external,t._fsPath=e._sep===d?e.fsPath:null,t}}return e}}t.URI=h;const d=n.isWindows?1:void 0;class p extends h{_formatted=null;_fsPath=null;get fsPath(){return this._fsPath||(this._fsPath=y(this,!1)),this._fsPath}toString(e=!1){return e?v(this,!0):(this._formatted||(this._formatted=v(this,!1)),this._formatted)}toJSON(){const e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=d),this._formatted&&(e.external=this._formatted),this.path&&(e.path=this.path),this.scheme&&(e.scheme=this.scheme),this.authority&&(e.authority=this.authority),this.query&&(e.query=this.query),this.fragment&&(e.fragment=this.fragment),e}}const f={58:"%3A",47:"%2F",63:"%3F",35:"%23",91:"%5B",93:"%5D",64:"%40",33:"%21",36:"%24",38:"%26",39:"%27",40:"%28",41:"%29",42:"%2A",43:"%2B",44:"%2C",59:"%3B",61:"%3D",32:"%20"};function g(e,t,i){let n,r=-1;for(let o=0;o<e.length;o++){const s=e.charCodeAt(o);if(s>=97&&s<=122||s>=65&&s<=90||s>=48&&s<=57||45===s||46===s||95===s||126===s||t&&47===s||i&&91===s||i&&93===s||i&&58===s)-1!==r&&(n+=encodeURIComponent(e.substring(r,o)),r=-1),void 0!==n&&(n+=e.charAt(o));else{void 0===n&&(n=e.substr(0,o));const t=f[s];void 0!==t?(-1!==r&&(n+=encodeURIComponent(e.substring(r,o)),r=-1),n+=t):-1===r&&(r=o)}}return-1!==r&&(n+=encodeURIComponent(e.substring(r))),void 0!==n?n:e}function m(e){let t;for(let i=0;i<e.length;i++){const n=e.charCodeAt(i);35===n||63===n?(void 0===t&&(t=e.substr(0,i)),t+=f[n]):void 0!==t&&(t+=e[i])}return void 0!==t?t:e}function y(e,t){let i;return i=e.authority&&e.path.length>1&&"file"===e.scheme?`//${e.authority}${e.path}`:47===e.path.charCodeAt(0)&&(e.path.charCodeAt(1)>=65&&e.path.charCodeAt(1)<=90||e.path.charCodeAt(1)>=97&&e.path.charCodeAt(1)<=122)&&58===e.path.charCodeAt(2)?t?e.path.substr(1):e.path[1].toLowerCase()+e.path.substr(2):e.path,n.isWindows&&(i=i.replace(/\//g,"\\")),i}function v(e,t){const i=t?m:g;let n="",{scheme:r,authority:o,path:s,query:a,fragment:c}=e;if(r&&(n+=r,n+=":"),(o||"file"===r)&&(n+=l,n+=l),o){let e=o.indexOf("@");if(-1!==e){const t=o.substr(0,e);o=o.substr(e+1),e=t.lastIndexOf(":"),-1===e?n+=i(t,!1,!1):(n+=i(t.substr(0,e),!1,!1),n+=":",n+=i(t.substr(e+1),!1,!0)),n+="@"}o=o.toLowerCase(),e=o.lastIndexOf(":"),-1===e?n+=i(o,!1,!0):(n+=i(o.substr(0,e),!1,!0),n+=o.substr(e))}if(s){if(s.length>=3&&47===s.charCodeAt(0)&&58===s.charCodeAt(2)){const e=s.charCodeAt(1);e>=65&&e<=90&&(s=`/${String.fromCharCode(e+32)}:${s.substr(3)}`)}else if(s.length>=2&&58===s.charCodeAt(1)){const e=s.charCodeAt(0);e>=65&&e<=90&&(s=`${String.fromCharCode(e+32)}:${s.substr(2)}`)}n+=i(s,!0,!1)}return a&&(n+="?",n+=i(a,!1,!1)),c&&(n+="#",n+=t?c:g(c,!1,!1)),n}function _(e){try{return decodeURIComponent(e)}catch{return e.length>3?e.substr(0,3)+_(e.substr(3)):e}}t.uriToFsPath=y;const b=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function w(e){return e.match(b)?e.replace(b,e=>_(e)):e}},552:function(e,t,i){var n=this&&this.__createBinding||(Object.create?function(e,t,i,n){void 0===n&&(n=i);var r=Object.getOwnPropertyDescriptor(t,i);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[i]}}),Object.defineProperty(e,n,r)}:function(e,t,i,n){void 0===n&&(n=i),e[n]=t[i]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)"default"!==i&&Object.prototype.hasOwnProperty.call(e,i)&&n(t,e,i);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.Utils=void 0;const s=o(i(975)),a=s.posix||s,c="/";var l;!function(e){e.joinPath=function(e,...t){return e.with({path:a.join(e.path,...t)})},e.resolvePath=function(e,...t){let i=e.path,n=!1;i[0]!==c&&(i=c+i,n=!0);let r=a.resolve(i,...t);return n&&r[0]===c&&!e.authority&&(r=r.substring(1)),e.with({path:r})},e.dirname=function(e){if(0===e.path.length||e.path===c)return e;let t=a.dirname(e.path);return 1===t.length&&46===t.charCodeAt(0)&&(t=""),e.with({path:t})},e.basename=function(e){return a.basename(e.path)},e.extname=function(e){return a.extname(e.path)}}(l||(t.Utils=l={}))}},t={};function i(n){var r=t[n];if(void 0!==r)return r.exports;var o=t[n]={exports:{}};return e[n].call(o.exports,o,o.exports,i),o.exports}var n={};return(()=>{var e=n;Object.defineProperty(e,"__esModule",{value:!0}),e.Utils=e.URI=void 0;const t=i(231);Object.defineProperty(e,"URI",{enumerable:!0,get:function(){return t.URI}});const r=i(552);Object.defineProperty(e,"Utils",{enumerable:!0,get:function(){return r.Utils}})})(),n})(),e.exports=t()},3177(e,t){(function(){"use strict";t.stripBOM=function(e){return"\ufeff"===e[0]?e.substring(1):e}}).call(this)},6712(e,t,i){(function(){"use strict";var e,n,r,o,s,a={}.hasOwnProperty;e=i(9665),n=i(6465).defaults,o=function(e){return"string"==typeof e&&(e.indexOf("&")>=0||e.indexOf(">")>=0||e.indexOf("<")>=0)},s=function(e){return"<![CDATA["+r(e)+"]]>"},r=function(e){return e.replace("]]>","]]]]><![CDATA[>")},t.Builder=function(){function t(e){var t,i,r;for(t in this.options={},i=n[.2])a.call(i,t)&&(r=i[t],this.options[t]=r);for(t in e)a.call(e,t)&&(r=e[t],this.options[t]=r)}return t.prototype.buildObject=function(t){var i,r,c,l,u,h;return i=this.options.attrkey,r=this.options.charkey,1===Object.keys(t).length&&this.options.rootName===n[.2].rootName?t=t[u=Object.keys(t)[0]]:u=this.options.rootName,h=this,c=function(e,t){var n,l,u,d,p,f;if("object"!=typeof t)h.options.cdata&&o(t)?e.raw(s(t)):e.txt(t);else if(Array.isArray(t)){for(d in t)if(a.call(t,d))for(p in l=t[d])u=l[p],e=c(e.ele(p),u).up()}else for(p in t)if(a.call(t,p))if(l=t[p],p===i){if("object"==typeof l)for(n in l)f=l[n],e=e.att(n,f)}else if(p===r)e=h.options.cdata&&o(l)?e.raw(s(l)):e.txt(l);else if(Array.isArray(l))for(d in l)a.call(l,d)&&(e="string"==typeof(u=l[d])?h.options.cdata&&o(u)?e.ele(p).raw(s(u)).up():e.ele(p,u).up():c(e.ele(p),u).up());else"object"==typeof l?e=c(e.ele(p),l).up():"string"==typeof l&&h.options.cdata&&o(l)?e=e.ele(p).raw(s(l)).up():(null==l&&(l=""),e=e.ele(p,l.toString()).up());return e},l=e.create(u,this.options.xmldec,this.options.doctype,{headless:this.options.headless,allowSurrogateChars:this.options.allowSurrogateChars}),c(l,t).end(this.options.renderOpts)},t}()}).call(this)},6465(e,t){(function(){t.defaults={.1:{explicitCharkey:!1,trim:!0,normalize:!0,normalizeTags:!1,attrkey:"@",charkey:"#",explicitArray:!1,ignoreAttrs:!1,mergeAttrs:!1,explicitRoot:!1,validator:null,xmlns:!1,explicitChildren:!1,childkey:"@@",charsAsChildren:!1,includeWhiteChars:!1,async:!1,strict:!0,attrNameProcessors:null,attrValueProcessors:null,tagNameProcessors:null,valueProcessors:null,emptyTag:""},.2:{explicitCharkey:!1,trim:!1,normalize:!1,normalizeTags:!1,attrkey:"$",charkey:"_",explicitArray:!0,ignoreAttrs:!1,mergeAttrs:!1,explicitRoot:!0,validator:null,xmlns:!1,explicitChildren:!1,preserveChildrenOrder:!1,childkey:"$$",charsAsChildren:!1,includeWhiteChars:!1,async:!1,strict:!0,attrNameProcessors:null,attrValueProcessors:null,tagNameProcessors:null,valueProcessors:null,rootName:"root",xmldec:{version:"1.0",encoding:"UTF-8",standalone:!0},doctype:null,renderOpts:{pretty:!0,indent:" ",newline:"\n"},headless:!1,chunkSize:1e4,emptyTag:"",cdata:!1}}}).call(this)},1912(e,t,i){(function(){"use strict";var e,n,r,o,s,a,c,l,u,h=function(e,t){return function(){return e.apply(t,arguments)}},d={}.hasOwnProperty;l=i(4043),o=i(4434),e=i(3177),c=i(2114),u=i(5938).setImmediate,n=i(6465).defaults,s=function(e){return"object"==typeof e&&null!=e&&0===Object.keys(e).length},a=function(e,t,i){var n,r;for(n=0,r=e.length;n<r;n++)t=(0,e[n])(t,i);return t},r=function(e,t,i){var n;return(n=Object.create(null)).value=i,n.writable=!0,n.enumerable=!0,n.configurable=!0,Object.defineProperty(e,t,n)},t.Parser=function(i){function o(e){var i,r,o;if(this.parseStringPromise=h(this.parseStringPromise,this),this.parseString=h(this.parseString,this),this.reset=h(this.reset,this),this.assignOrPush=h(this.assignOrPush,this),this.processAsync=h(this.processAsync,this),!(this instanceof t.Parser))return new t.Parser(e);for(i in this.options={},r=n[.2])d.call(r,i)&&(o=r[i],this.options[i]=o);for(i in e)d.call(e,i)&&(o=e[i],this.options[i]=o);this.options.xmlns&&(this.options.xmlnskey=this.options.attrkey+"ns"),this.options.normalizeTags&&(this.options.tagNameProcessors||(this.options.tagNameProcessors=[]),this.options.tagNameProcessors.unshift(c.normalize)),this.reset()}return function(e,t){for(var i in t)d.call(t,i)&&(e[i]=t[i]);function n(){this.constructor=e}n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype}(o,i),o.prototype.processAsync=function(){var e,t;try{return this.remaining.length<=this.options.chunkSize?(e=this.remaining,this.remaining="",this.saxParser=this.saxParser.write(e),this.saxParser.close()):(e=this.remaining.substr(0,this.options.chunkSize),this.remaining=this.remaining.substr(this.options.chunkSize,this.remaining.length),this.saxParser=this.saxParser.write(e),u(this.processAsync))}catch(e){if(t=e,!this.saxParser.errThrown)return this.saxParser.errThrown=!0,this.emit(t)}},o.prototype.assignOrPush=function(e,t,i){return t in e?(e[t]instanceof Array||r(e,t,[e[t]]),e[t].push(i)):this.options.explicitArray?r(e,t,[i]):r(e,t,i)},o.prototype.reset=function(){var e,t,i,n,o;return this.removeAllListeners(),this.saxParser=l.parser(this.options.strict,{trim:!1,normalize:!1,xmlns:this.options.xmlns}),this.saxParser.errThrown=!1,this.saxParser.onerror=(o=this,function(e){if(o.saxParser.resume(),!o.saxParser.errThrown)return o.saxParser.errThrown=!0,o.emit("error",e)}),this.saxParser.onend=function(e){return function(){if(!e.saxParser.ended)return e.saxParser.ended=!0,e.emit("end",e.resultObject)}}(this),this.saxParser.ended=!1,this.EXPLICIT_CHARKEY=this.options.explicitCharkey,this.resultObject=null,n=[],e=this.options.attrkey,t=this.options.charkey,this.saxParser.onopentag=function(i){return function(o){var s,c,l,u,h;if((l={})[t]="",!i.options.ignoreAttrs)for(s in h=o.attributes)d.call(h,s)&&(e in l||i.options.mergeAttrs||(l[e]={}),c=i.options.attrValueProcessors?a(i.options.attrValueProcessors,o.attributes[s],s):o.attributes[s],u=i.options.attrNameProcessors?a(i.options.attrNameProcessors,s):s,i.options.mergeAttrs?i.assignOrPush(l,u,c):r(l[e],u,c));return l["#name"]=i.options.tagNameProcessors?a(i.options.tagNameProcessors,o.name):o.name,i.options.xmlns&&(l[i.options.xmlnskey]={uri:o.uri,local:o.local}),n.push(l)}}(this),this.saxParser.onclosetag=function(e){return function(){var i,o,c,l,u,h,p,f,g,m;if(h=n.pop(),u=h["#name"],e.options.explicitChildren&&e.options.preserveChildrenOrder||delete h["#name"],!0===h.cdata&&(i=h.cdata,delete h.cdata),g=n[n.length-1],h[t].match(/^\s*$/)&&!i?(o=h[t],delete h[t]):(e.options.trim&&(h[t]=h[t].trim()),e.options.normalize&&(h[t]=h[t].replace(/\s{2,}/g," ").trim()),h[t]=e.options.valueProcessors?a(e.options.valueProcessors,h[t],u):h[t],1===Object.keys(h).length&&t in h&&!e.EXPLICIT_CHARKEY&&(h=h[t])),s(h)&&(h="function"==typeof e.options.emptyTag?e.options.emptyTag():""!==e.options.emptyTag?e.options.emptyTag:o),null!=e.options.validator&&(m="/"+function(){var e,t,i;for(i=[],e=0,t=n.length;e<t;e++)l=n[e],i.push(l["#name"]);return i}().concat(u).join("/"),function(){var t;try{return h=e.options.validator(m,g&&g[u],h)}catch(i){return t=i,e.emit("error",t)}}()),e.options.explicitChildren&&!e.options.mergeAttrs&&"object"==typeof h)if(e.options.preserveChildrenOrder){if(g){for(c in g[e.options.childkey]=g[e.options.childkey]||[],p={},h)d.call(h,c)&&r(p,c,h[c]);g[e.options.childkey].push(p),delete h["#name"],1===Object.keys(h).length&&t in h&&!e.EXPLICIT_CHARKEY&&(h=h[t])}}else l={},e.options.attrkey in h&&(l[e.options.attrkey]=h[e.options.attrkey],delete h[e.options.attrkey]),!e.options.charsAsChildren&&e.options.charkey in h&&(l[e.options.charkey]=h[e.options.charkey],delete h[e.options.charkey]),Object.getOwnPropertyNames(h).length>0&&(l[e.options.childkey]=h),h=l;return n.length>0?e.assignOrPush(g,u,h):(e.options.explicitRoot&&(f=h,r(h={},u,f)),e.resultObject=h,e.saxParser.ended=!0,e.emit("end",e.resultObject))}}(this),i=function(e){return function(i){var r,o;if(o=n[n.length-1])return o[t]+=i,e.options.explicitChildren&&e.options.preserveChildrenOrder&&e.options.charsAsChildren&&(e.options.includeWhiteChars||""!==i.replace(/\\n/g,"").trim())&&(o[e.options.childkey]=o[e.options.childkey]||[],(r={"#name":"__text__"})[t]=i,e.options.normalize&&(r[t]=r[t].replace(/\s{2,}/g," ").trim()),o[e.options.childkey].push(r)),o}}(this),this.saxParser.ontext=i,this.saxParser.oncdata=function(e){var t;if(t=i(e))return t.cdata=!0}},o.prototype.parseString=function(t,i){var n;null!=i&&"function"==typeof i&&(this.on("end",function(e){return this.reset(),i(null,e)}),this.on("error",function(e){return this.reset(),i(e)}));try{return""===(t=t.toString()).trim()?(this.emit("end",null),!0):(t=e.stripBOM(t),this.options.async?(this.remaining=t,u(this.processAsync),this.saxParser):this.saxParser.write(t).close())}catch(e){if(n=e,!this.saxParser.errThrown&&!this.saxParser.ended)return this.emit("error",n),this.saxParser.errThrown=!0;if(this.saxParser.ended)throw n}},o.prototype.parseStringPromise=function(e){return new Promise((t=this,function(i,n){return t.parseString(e,function(e,t){return e?n(e):i(t)})}));var t},o}(o),t.parseString=function(e,i,n){var r,o;return null!=n?("function"==typeof n&&(r=n),"object"==typeof i&&(o=i)):("function"==typeof i&&(r=i),o={}),new t.Parser(o).parseString(e,r)},t.parseStringPromise=function(e,i){var n;return"object"==typeof i&&(n=i),new t.Parser(n).parseStringPromise(e)}}).call(this)},2114(e,t){(function(){"use strict";var e;e=new RegExp(/(?!xmlns)^.*:/),t.normalize=function(e){return e.toLowerCase()},t.firstCharLowerCase=function(e){return e.charAt(0).toLowerCase()+e.slice(1)},t.stripPrefix=function(t){return t.replace(e,"")},t.parseNumbers=function(e){return isNaN(e)||(e=e%1==0?parseInt(e,10):parseFloat(e)),e},t.parseBooleans=function(e){return/^(?:true|false)$/i.test(e)&&(e="true"===e.toLowerCase()),e}}).call(this)},8805(e,t,i){(function(){"use strict";var e,n,r,o,s={}.hasOwnProperty;n=i(6465),e=i(6712),r=i(1912),o=i(2114),t.defaults=n.defaults,t.processors=o,t.ValidationError=function(){function e(e){this.message=e}return function(e,t){for(var i in t)s.call(t,i)&&(e[i]=t[i]);function n(){this.constructor=e}n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype}(e,Error),e}(),t.Builder=e.Builder,t.Parser=r.Parser,t.parseString=r.parseString,t.parseStringPromise=r.parseStringPromise}).call(this)},4923(e){(function(){e.exports={Disconnected:1,Preceding:2,Following:4,Contains:8,ContainedBy:16,ImplementationSpecific:32}}).call(this)},1737(e){(function(){e.exports={Element:1,Attribute:2,Text:3,CData:4,EntityReference:5,EntityDeclaration:6,ProcessingInstruction:7,Comment:8,Document:9,DocType:10,DocumentFragment:11,NotationDeclaration:12,Declaration:201,Raw:202,AttributeDeclaration:203,ElementDeclaration:204,Dummy:205}}).call(this)},9241(e){(function(){var t,i,n,r,o,s,a,c=[].slice,l={}.hasOwnProperty;t=function(){var e,t,i,n,r,s;if(s=arguments[0],r=2<=arguments.length?c.call(arguments,1):[],o(Object.assign))Object.assign.apply(null,arguments);else for(e=0,i=r.length;e<i;e++)if(null!=(n=r[e]))for(t in n)l.call(n,t)&&(s[t]=n[t]);return s},o=function(e){return!!e&&"[object Function]"===Object.prototype.toString.call(e)},s=function(e){var t;return!!e&&("function"==(t=typeof e)||"object"===t)},n=function(e){return o(Array.isArray)?Array.isArray(e):"[object Array]"===Object.prototype.toString.call(e)},r=function(e){var t;if(n(e))return!e.length;for(t in e)if(l.call(e,t))return!1;return!0},a=function(e){var t,i;return s(e)&&(i=Object.getPrototypeOf(e))&&(t=i.constructor)&&"function"==typeof t&&t instanceof t&&Function.prototype.toString.call(t)===Function.prototype.toString.call(Object)},i=function(e){return o(e.valueOf)?e.valueOf():e},e.exports.assign=t,e.exports.isFunction=o,e.exports.isObject=s,e.exports.isArray=n,e.exports.isEmpty=r,e.exports.isPlainObject=a,e.exports.getValue=i}).call(this)},8753(e){(function(){e.exports={None:0,OpenTag:1,InsideTag:2,CloseTag:3}}).call(this)},4238(e,t,i){(function(){var t;t=i(1737),i(468),e.exports=function(){function e(e,i,n){if(this.parent=e,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),null==i)throw new Error("Missing attribute name. "+this.debugInfo(i));this.name=this.stringify.name(i),this.value=this.stringify.attValue(n),this.type=t.Attribute,this.isId=!1,this.schemaTypeInfo=null}return Object.defineProperty(e.prototype,"nodeType",{get:function(){return this.type}}),Object.defineProperty(e.prototype,"ownerElement",{get:function(){return this.parent}}),Object.defineProperty(e.prototype,"textContent",{get:function(){return this.value},set:function(e){return this.value=e||""}}),Object.defineProperty(e.prototype,"namespaceURI",{get:function(){return""}}),Object.defineProperty(e.prototype,"prefix",{get:function(){return""}}),Object.defineProperty(e.prototype,"localName",{get:function(){return this.name}}),Object.defineProperty(e.prototype,"specified",{get:function(){return!0}}),e.prototype.clone=function(){return Object.create(this)},e.prototype.toString=function(e){return this.options.writer.attribute(this,this.options.writer.filterOptions(e))},e.prototype.debugInfo=function(e){return null==(e=e||this.name)?"parent: <"+this.parent.name+">":"attribute: {"+e+"}, parent: <"+this.parent.name+">"},e.prototype.isEqualNode=function(e){return e.namespaceURI===this.namespaceURI&&e.prefix===this.prefix&&e.localName===this.localName&&e.value===this.value},e}()}).call(this)},2691(e,t,i){(function(){var t,n,r={}.hasOwnProperty;t=i(1737),n=i(7457),e.exports=function(e){function i(e,n){if(i.__super__.constructor.call(this,e),null==n)throw new Error("Missing CDATA text. "+this.debugInfo());this.name="#cdata-section",this.type=t.CData,this.value=this.stringify.cdata(n)}return function(e,t){for(var i in t)r.call(t,i)&&(e[i]=t[i]);function n(){this.constructor=e}n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype}(i,e),i.prototype.clone=function(){return Object.create(this)},i.prototype.toString=function(e){return this.options.writer.cdata(this,this.options.writer.filterOptions(e))},i}(n)}).call(this)},7457(e,t,i){(function(){var t,n={}.hasOwnProperty;t=i(468),e.exports=function(e){function t(e){t.__super__.constructor.call(this,e),this.value=""}return function(e,t){for(var i in t)n.call(t,i)&&(e[i]=t[i]);function r(){this.constructor=e}r.prototype=t.prototype,e.prototype=new r,e.__super__=t.prototype}(t,e),Object.defineProperty(t.prototype,"data",{get:function(){return this.value},set:function(e){return this.value=e||""}}),Object.defineProperty(t.prototype,"length",{get:function(){return this.value.length}}),Object.defineProperty(t.prototype,"textContent",{get:function(){return this.value},set:function(e){return this.value=e||""}}),t.prototype.clone=function(){return Object.create(this)},t.prototype.substringData=function(e,t){throw new Error("This DOM method is not implemented."+this.debugInfo())},t.prototype.appendData=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())},t.prototype.insertData=function(e,t){throw new Error("This DOM method is not implemented."+this.debugInfo())},t.prototype.deleteData=function(e,t){throw new Error("This DOM method is not implemented."+this.debugInfo())},t.prototype.replaceData=function(e,t,i){throw new Error("This DOM method is not implemented."+this.debugInfo())},t.prototype.isEqualNode=function(e){return!!t.__super__.isEqualNode.apply(this,arguments).isEqualNode(e)&&e.data===this.data},t}(t)}).call(this)},2679(e,t,i){(function(){var t,n,r={}.hasOwnProperty;t=i(1737),n=i(7457),e.exports=function(e){function i(e,n){if(i.__super__.constructor.call(this,e),null==n)throw new Error("Missing comment text. "+this.debugInfo());this.name="#comment",this.type=t.Comment,this.value=this.stringify.comment(n)}return function(e,t){for(var i in t)r.call(t,i)&&(e[i]=t[i]);function n(){this.constructor=e}n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype}(i,e),i.prototype.clone=function(){return Object.create(this)},i.prototype.toString=function(e){return this.options.writer.comment(this,this.options.writer.filterOptions(e))},i}(n)}).call(this)},3074(e,t,i){(function(){var t,n;t=i(5660),n=i(2527),e.exports=function(){function e(){this.defaultParams={"canonical-form":!1,"cdata-sections":!1,comments:!1,"datatype-normalization":!1,"element-content-whitespace":!0,entities:!0,"error-handler":new t,infoset:!0,"validate-if-schema":!1,namespaces:!0,"namespace-declarations":!0,"normalize-characters":!1,"schema-location":"","schema-type":"","split-cdata-sections":!0,validate:!1,"well-formed":!0},this.params=Object.create(this.defaultParams)}return Object.defineProperty(e.prototype,"parameterNames",{get:function(){return new n(Object.keys(this.defaultParams))}}),e.prototype.getParameter=function(e){return this.params.hasOwnProperty(e)?this.params[e]:null},e.prototype.canSetParameter=function(e,t){return!0},e.prototype.setParameter=function(e,t){return null!=t?this.params[e]=t:delete this.params[e]},e}()}).call(this)},5660(e){(function(){e.exports=function(){function e(){}return e.prototype.handleError=function(e){throw new Error(e)},e}()}).call(this)},7260(e){(function(){e.exports=function(){function e(){}return e.prototype.hasFeature=function(e,t){return!0},e.prototype.createDocumentType=function(e,t,i){throw new Error("This DOM method is not implemented.")},e.prototype.createDocument=function(e,t,i){throw new Error("This DOM method is not implemented.")},e.prototype.createHTMLDocument=function(e){throw new Error("This DOM method is not implemented.")},e.prototype.getFeature=function(e,t){throw new Error("This DOM method is not implemented.")},e}()}).call(this)},2527(e){(function(){e.exports=function(){function e(e){this.arr=e||[]}return Object.defineProperty(e.prototype,"length",{get:function(){return this.arr.length}}),e.prototype.item=function(e){return this.arr[e]||null},e.prototype.contains=function(e){return-1!==this.arr.indexOf(e)},e}()}).call(this)},4111(e,t,i){(function(){var t,n,r={}.hasOwnProperty;n=i(468),t=i(1737),e.exports=function(e){function i(e,n,r,o,s,a){if(i.__super__.constructor.call(this,e),null==n)throw new Error("Missing DTD element name. "+this.debugInfo());if(null==r)throw new Error("Missing DTD attribute name. "+this.debugInfo(n));if(!o)throw new Error("Missing DTD attribute type. "+this.debugInfo(n));if(!s)throw new Error("Missing DTD attribute default. "+this.debugInfo(n));if(0!==s.indexOf("#")&&(s="#"+s),!s.match(/^(#REQUIRED|#IMPLIED|#FIXED|#DEFAULT)$/))throw new Error("Invalid default value type; expected: #REQUIRED, #IMPLIED, #FIXED or #DEFAULT. "+this.debugInfo(n));if(a&&!s.match(/^(#FIXED|#DEFAULT)$/))throw new Error("Default value only applies to #FIXED or #DEFAULT. "+this.debugInfo(n));this.elementName=this.stringify.name(n),this.type=t.AttributeDeclaration,this.attributeName=this.stringify.name(r),this.attributeType=this.stringify.dtdAttType(o),a&&(this.defaultValue=this.stringify.dtdAttDefault(a)),this.defaultValueType=s}return function(e,t){for(var i in t)r.call(t,i)&&(e[i]=t[i]);function n(){this.constructor=e}n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype}(i,e),i.prototype.toString=function(e){return this.options.writer.dtdAttList(this,this.options.writer.filterOptions(e))},i}(n)}).call(this)},7696(e,t,i){(function(){var t,n,r={}.hasOwnProperty;n=i(468),t=i(1737),e.exports=function(e){function i(e,n,r){if(i.__super__.constructor.call(this,e),null==n)throw new Error("Missing DTD element name. "+this.debugInfo());r||(r="(#PCDATA)"),Array.isArray(r)&&(r="("+r.join(",")+")"),this.name=this.stringify.name(n),this.type=t.ElementDeclaration,this.value=this.stringify.dtdElementValue(r)}return function(e,t){for(var i in t)r.call(t,i)&&(e[i]=t[i]);function n(){this.constructor=e}n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype}(i,e),i.prototype.toString=function(e){return this.options.writer.dtdElement(this,this.options.writer.filterOptions(e))},i}(n)}).call(this)},5529(e,t,i){(function(){var t,n,r,o={}.hasOwnProperty;r=i(9241).isObject,n=i(468),t=i(1737),e.exports=function(e){function i(e,n,o,s){if(i.__super__.constructor.call(this,e),null==o)throw new Error("Missing DTD entity name. "+this.debugInfo(o));if(null==s)throw new Error("Missing DTD entity value. "+this.debugInfo(o));if(this.pe=!!n,this.name=this.stringify.name(o),this.type=t.EntityDeclaration,r(s)){if(!s.pubID&&!s.sysID)throw new Error("Public and/or system identifiers are required for an external entity. "+this.debugInfo(o));if(s.pubID&&!s.sysID)throw new Error("System identifier is required for a public external entity. "+this.debugInfo(o));if(this.internal=!1,null!=s.pubID&&(this.pubID=this.stringify.dtdPubID(s.pubID)),null!=s.sysID&&(this.sysID=this.stringify.dtdSysID(s.sysID)),null!=s.nData&&(this.nData=this.stringify.dtdNData(s.nData)),this.pe&&this.nData)throw new Error("Notation declaration is not allowed in a parameter entity. "+this.debugInfo(o))}else this.value=this.stringify.dtdEntityValue(s),this.internal=!0}return function(e,t){for(var i in t)o.call(t,i)&&(e[i]=t[i]);function n(){this.constructor=e}n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype}(i,e),Object.defineProperty(i.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(i.prototype,"systemId",{get:function(){return this.sysID}}),Object.defineProperty(i.prototype,"notationName",{get:function(){return this.nData||null}}),Object.defineProperty(i.prototype,"inputEncoding",{get:function(){return null}}),Object.defineProperty(i.prototype,"xmlEncoding",{get:function(){return null}}),Object.defineProperty(i.prototype,"xmlVersion",{get:function(){return null}}),i.prototype.toString=function(e){return this.options.writer.dtdEntity(this,this.options.writer.filterOptions(e))},i}(n)}).call(this)},8012(e,t,i){(function(){var t,n,r={}.hasOwnProperty;n=i(468),t=i(1737),e.exports=function(e){function i(e,n,r){if(i.__super__.constructor.call(this,e),null==n)throw new Error("Missing DTD notation name. "+this.debugInfo(n));if(!r.pubID&&!r.sysID)throw new Error("Public or system identifiers are required for an external entity. "+this.debugInfo(n));this.name=this.stringify.name(n),this.type=t.NotationDeclaration,null!=r.pubID&&(this.pubID=this.stringify.dtdPubID(r.pubID)),null!=r.sysID&&(this.sysID=this.stringify.dtdSysID(r.sysID))}return function(e,t){for(var i in t)r.call(t,i)&&(e[i]=t[i]);function n(){this.constructor=e}n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype}(i,e),Object.defineProperty(i.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(i.prototype,"systemId",{get:function(){return this.sysID}}),i.prototype.toString=function(e){return this.options.writer.dtdNotation(this,this.options.writer.filterOptions(e))},i}(n)}).call(this)},4130(e,t,i){(function(){var t,n,r,o={}.hasOwnProperty;r=i(9241).isObject,n=i(468),t=i(1737),e.exports=function(e){function i(e,n,o,s){var a;i.__super__.constructor.call(this,e),r(n)&&(n=(a=n).version,o=a.encoding,s=a.standalone),n||(n="1.0"),this.type=t.Declaration,this.version=this.stringify.xmlVersion(n),null!=o&&(this.encoding=this.stringify.xmlEncoding(o)),null!=s&&(this.standalone=this.stringify.xmlStandalone(s))}return function(e,t){for(var i in t)o.call(t,i)&&(e[i]=t[i]);function n(){this.constructor=e}n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype}(i,e),i.prototype.toString=function(e){return this.options.writer.declaration(this,this.options.writer.filterOptions(e))},i}(n)}).call(this)},6376(e,t,i){(function(){var t,n,r,o,s,a,c,l,u={}.hasOwnProperty;l=i(9241).isObject,c=i(468),t=i(1737),n=i(4111),o=i(5529),r=i(7696),s=i(8012),a=i(4797),e.exports=function(e){function i(e,n,r){var o,s,a,c,u,h;if(i.__super__.constructor.call(this,e),this.type=t.DocType,e.children)for(s=0,a=(c=e.children).length;s<a;s++)if((o=c[s]).type===t.Element){this.name=o.name;break}this.documentObject=e,l(n)&&(n=(u=n).pubID,r=u.sysID),null==r&&(r=(h=[n,r])[0],n=h[1]),null!=n&&(this.pubID=this.stringify.dtdPubID(n)),null!=r&&(this.sysID=this.stringify.dtdSysID(r))}return function(e,t){for(var i in t)u.call(t,i)&&(e[i]=t[i]);function n(){this.constructor=e}n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype}(i,e),Object.defineProperty(i.prototype,"entities",{get:function(){var e,i,n,r,o;for(r={},i=0,n=(o=this.children).length;i<n;i++)(e=o[i]).type!==t.EntityDeclaration||e.pe||(r[e.name]=e);return new a(r)}}),Object.defineProperty(i.prototype,"notations",{get:function(){var e,i,n,r,o;for(r={},i=0,n=(o=this.children).length;i<n;i++)(e=o[i]).type===t.NotationDeclaration&&(r[e.name]=e);return new a(r)}}),Object.defineProperty(i.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(i.prototype,"systemId",{get:function(){return this.sysID}}),Object.defineProperty(i.prototype,"internalSubset",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),i.prototype.element=function(e,t){var i;return i=new r(this,e,t),this.children.push(i),this},i.prototype.attList=function(e,t,i,r,o){var s;return s=new n(this,e,t,i,r,o),this.children.push(s),this},i.prototype.entity=function(e,t){var i;return i=new o(this,!1,e,t),this.children.push(i),this},i.prototype.pEntity=function(e,t){var i;return i=new o(this,!0,e,t),this.children.push(i),this},i.prototype.notation=function(e,t){var i;return i=new s(this,e,t),this.children.push(i),this},i.prototype.toString=function(e){return this.options.writer.docType(this,this.options.writer.filterOptions(e))},i.prototype.ele=function(e,t){return this.element(e,t)},i.prototype.att=function(e,t,i,n,r){return this.attList(e,t,i,n,r)},i.prototype.ent=function(e,t){return this.entity(e,t)},i.prototype.pent=function(e,t){return this.pEntity(e,t)},i.prototype.not=function(e,t){return this.notation(e,t)},i.prototype.up=function(){return this.root()||this.documentObject},i.prototype.isEqualNode=function(e){return!!i.__super__.isEqualNode.apply(this,arguments).isEqualNode(e)&&e.name===this.name&&e.publicId===this.publicId&&e.systemId===this.systemId},i}(c)}).call(this)},1933(e,t,i){(function(){var t,n,r,o,s,a,c,l={}.hasOwnProperty;c=i(9241).isPlainObject,r=i(7260),n=i(3074),o=i(468),t=i(1737),a=i(3976),s=i(382),e.exports=function(e){function i(e){i.__super__.constructor.call(this,null),this.name="#document",this.type=t.Document,this.documentURI=null,this.domConfig=new n,e||(e={}),e.writer||(e.writer=new s),this.options=e,this.stringify=new a(e)}return function(e,t){for(var i in t)l.call(t,i)&&(e[i]=t[i]);function n(){this.constructor=e}n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype}(i,e),Object.defineProperty(i.prototype,"implementation",{value:new r}),Object.defineProperty(i.prototype,"doctype",{get:function(){var e,i,n,r;for(i=0,n=(r=this.children).length;i<n;i++)if((e=r[i]).type===t.DocType)return e;return null}}),Object.defineProperty(i.prototype,"documentElement",{get:function(){return this.rootObject||null}}),Object.defineProperty(i.prototype,"inputEncoding",{get:function(){return null}}),Object.defineProperty(i.prototype,"strictErrorChecking",{get:function(){return!1}}),Object.defineProperty(i.prototype,"xmlEncoding",{get:function(){return 0!==this.children.length&&this.children[0].type===t.Declaration?this.children[0].encoding:null}}),Object.defineProperty(i.prototype,"xmlStandalone",{get:function(){return 0!==this.children.length&&this.children[0].type===t.Declaration&&"yes"===this.children[0].standalone}}),Object.defineProperty(i.prototype,"xmlVersion",{get:function(){return 0!==this.children.length&&this.children[0].type===t.Declaration?this.children[0].version:"1.0"}}),Object.defineProperty(i.prototype,"URL",{get:function(){return this.documentURI}}),Object.defineProperty(i.prototype,"origin",{get:function(){return null}}),Object.defineProperty(i.prototype,"compatMode",{get:function(){return null}}),Object.defineProperty(i.prototype,"characterSet",{get:function(){return null}}),Object.defineProperty(i.prototype,"contentType",{get:function(){return null}}),i.prototype.end=function(e){var t;return t={},e?c(e)&&(t=e,e=this.options.writer):e=this.options.writer,e.document(this,e.filterOptions(t))},i.prototype.toString=function(e){return this.options.writer.document(this,this.options.writer.filterOptions(e))},i.prototype.createElement=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())},i.prototype.createDocumentFragment=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},i.prototype.createTextNode=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())},i.prototype.createComment=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())},i.prototype.createCDATASection=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())},i.prototype.createProcessingInstruction=function(e,t){throw new Error("This DOM method is not implemented."+this.debugInfo())},i.prototype.createAttribute=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())},i.prototype.createEntityReference=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())},i.prototype.getElementsByTagName=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())},i.prototype.importNode=function(e,t){throw new Error("This DOM method is not implemented."+this.debugInfo())},i.prototype.createElementNS=function(e,t){throw new Error("This DOM method is not implemented."+this.debugInfo())},i.prototype.createAttributeNS=function(e,t){throw new Error("This DOM method is not implemented."+this.debugInfo())},i.prototype.getElementsByTagNameNS=function(e,t){throw new Error("This DOM method is not implemented."+this.debugInfo())},i.prototype.getElementById=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())},i.prototype.adoptNode=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())},i.prototype.normalizeDocument=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},i.prototype.renameNode=function(e,t,i){throw new Error("This DOM method is not implemented."+this.debugInfo())},i.prototype.getElementsByClassName=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())},i.prototype.createEvent=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())},i.prototype.createRange=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},i.prototype.createNodeIterator=function(e,t,i){throw new Error("This DOM method is not implemented."+this.debugInfo())},i.prototype.createTreeWalker=function(e,t,i){throw new Error("This DOM method is not implemented."+this.debugInfo())},i}(o)}).call(this)},400(e,t,i){(function(){var t,n,r,o,s,a,c,l,u,h,d,p,f,g,m,y,v,_,b,w,D,T,S,C={}.hasOwnProperty;S=i(9241),D=S.isObject,w=S.isFunction,T=S.isPlainObject,b=S.getValue,t=i(1737),p=i(1933),f=i(3906),o=i(2691),s=i(2679),m=i(1268),_=i(2535),g=i(5915),h=i(4130),d=i(6376),a=i(4111),l=i(5529),c=i(7696),u=i(8012),r=i(4238),v=i(3976),y=i(382),n=i(8753),e.exports=function(){function e(e,i,n){var r;this.name="?xml",this.type=t.Document,e||(e={}),r={},e.writer?T(e.writer)&&(r=e.writer,e.writer=new y):e.writer=new y,this.options=e,this.writer=e.writer,this.writerOptions=this.writer.filterOptions(r),this.stringify=new v(e),this.onDataCallback=i||function(){},this.onEndCallback=n||function(){},this.currentNode=null,this.currentLevel=-1,this.openTags={},this.documentStarted=!1,this.documentCompleted=!1,this.root=null}return e.prototype.createChildNode=function(e){var i,n,r,o,s,a,c,l;switch(e.type){case t.CData:this.cdata(e.value);break;case t.Comment:this.comment(e.value);break;case t.Element:for(n in r={},c=e.attribs)C.call(c,n)&&(i=c[n],r[n]=i.value);this.node(e.name,r);break;case t.Dummy:this.dummy();break;case t.Raw:this.raw(e.value);break;case t.Text:this.text(e.value);break;case t.ProcessingInstruction:this.instruction(e.target,e.value);break;default:throw new Error("This XML node type is not supported in a JS object: "+e.constructor.name)}for(s=0,a=(l=e.children).length;s<a;s++)o=l[s],this.createChildNode(o),o.type===t.Element&&this.up();return this},e.prototype.dummy=function(){return this},e.prototype.node=function(e,t,i){var n;if(null==e)throw new Error("Missing node name.");if(this.root&&-1===this.currentLevel)throw new Error("Document can only have one root node. "+this.debugInfo(e));return this.openCurrent(),e=b(e),null==t&&(t={}),t=b(t),D(t)||(i=(n=[t,i])[0],t=n[1]),this.currentNode=new f(this,e,t),this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,null!=i&&this.text(i),this},e.prototype.element=function(e,i,n){var r,o,s,a,c,l;if(this.currentNode&&this.currentNode.type===t.DocType)this.dtdElement.apply(this,arguments);else if(Array.isArray(e)||D(e)||w(e))for(a=this.options.noValidation,this.options.noValidation=!0,(l=new p(this.options).element("TEMP_ROOT")).element(e),this.options.noValidation=a,o=0,s=(c=l.children).length;o<s;o++)r=c[o],this.createChildNode(r),r.type===t.Element&&this.up();else this.node(e,i,n);return this},e.prototype.attribute=function(e,t){var i,n;if(!this.currentNode||this.currentNode.children)throw new Error("att() can only be used immediately after an ele() call in callback mode. "+this.debugInfo(e));if(null!=e&&(e=b(e)),D(e))for(i in e)C.call(e,i)&&(n=e[i],this.attribute(i,n));else w(t)&&(t=t.apply()),this.options.keepNullAttributes&&null==t?this.currentNode.attribs[e]=new r(this,e,""):null!=t&&(this.currentNode.attribs[e]=new r(this,e,t));return this},e.prototype.text=function(e){var t;return this.openCurrent(),t=new _(this,e),this.onData(this.writer.text(t,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},e.prototype.cdata=function(e){var t;return this.openCurrent(),t=new o(this,e),this.onData(this.writer.cdata(t,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},e.prototype.comment=function(e){var t;return this.openCurrent(),t=new s(this,e),this.onData(this.writer.comment(t,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},e.prototype.raw=function(e){var t;return this.openCurrent(),t=new m(this,e),this.onData(this.writer.raw(t,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},e.prototype.instruction=function(e,t){var i,n,r,o,s;if(this.openCurrent(),null!=e&&(e=b(e)),null!=t&&(t=b(t)),Array.isArray(e))for(i=0,o=e.length;i<o;i++)n=e[i],this.instruction(n);else if(D(e))for(n in e)C.call(e,n)&&(r=e[n],this.instruction(n,r));else w(t)&&(t=t.apply()),s=new g(this,e,t),this.onData(this.writer.processingInstruction(s,this.writerOptions,this.currentLevel+1),this.currentLevel+1);return this},e.prototype.declaration=function(e,t,i){var n;if(this.openCurrent(),this.documentStarted)throw new Error("declaration() must be the first node.");return n=new h(this,e,t,i),this.onData(this.writer.declaration(n,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},e.prototype.doctype=function(e,t,i){if(this.openCurrent(),null==e)throw new Error("Missing root node name.");if(this.root)throw new Error("dtd() must come before the root node.");return this.currentNode=new d(this,t,i),this.currentNode.rootNodeName=e,this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,this},e.prototype.dtdElement=function(e,t){var i;return this.openCurrent(),i=new c(this,e,t),this.onData(this.writer.dtdElement(i,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},e.prototype.attList=function(e,t,i,n,r){var o;return this.openCurrent(),o=new a(this,e,t,i,n,r),this.onData(this.writer.dtdAttList(o,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},e.prototype.entity=function(e,t){var i;return this.openCurrent(),i=new l(this,!1,e,t),this.onData(this.writer.dtdEntity(i,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},e.prototype.pEntity=function(e,t){var i;return this.openCurrent(),i=new l(this,!0,e,t),this.onData(this.writer.dtdEntity(i,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},e.prototype.notation=function(e,t){var i;return this.openCurrent(),i=new u(this,e,t),this.onData(this.writer.dtdNotation(i,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},e.prototype.up=function(){if(this.currentLevel<0)throw new Error("The document node has no parent.");return this.currentNode?(this.currentNode.children?this.closeNode(this.currentNode):this.openNode(this.currentNode),this.currentNode=null):this.closeNode(this.openTags[this.currentLevel]),delete this.openTags[this.currentLevel],this.currentLevel--,this},e.prototype.end=function(){for(;this.currentLevel>=0;)this.up();return this.onEnd()},e.prototype.openCurrent=function(){if(this.currentNode)return this.currentNode.children=!0,this.openNode(this.currentNode)},e.prototype.openNode=function(e){var i,r,o,s;if(!e.isOpen){if(this.root||0!==this.currentLevel||e.type!==t.Element||(this.root=e),r="",e.type===t.Element){for(o in this.writerOptions.state=n.OpenTag,r=this.writer.indent(e,this.writerOptions,this.currentLevel)+"<"+e.name,s=e.attribs)C.call(s,o)&&(i=s[o],r+=this.writer.attribute(i,this.writerOptions,this.currentLevel));r+=(e.children?">":"/>")+this.writer.endline(e,this.writerOptions,this.currentLevel),this.writerOptions.state=n.InsideTag}else this.writerOptions.state=n.OpenTag,r=this.writer.indent(e,this.writerOptions,this.currentLevel)+"<!DOCTYPE "+e.rootNodeName,e.pubID&&e.sysID?r+=' PUBLIC "'+e.pubID+'" "'+e.sysID+'"':e.sysID&&(r+=' SYSTEM "'+e.sysID+'"'),e.children?(r+=" [",this.writerOptions.state=n.InsideTag):(this.writerOptions.state=n.CloseTag,r+=">"),r+=this.writer.endline(e,this.writerOptions,this.currentLevel);return this.onData(r,this.currentLevel),e.isOpen=!0}},e.prototype.closeNode=function(e){var i;if(!e.isClosed)return"",this.writerOptions.state=n.CloseTag,i=e.type===t.Element?this.writer.indent(e,this.writerOptions,this.currentLevel)+"</"+e.name+">"+this.writer.endline(e,this.writerOptions,this.currentLevel):this.writer.indent(e,this.writerOptions,this.currentLevel)+"]>"+this.writer.endline(e,this.writerOptions,this.currentLevel),this.writerOptions.state=n.None,this.onData(i,this.currentLevel),e.isClosed=!0},e.prototype.onData=function(e,t){return this.documentStarted=!0,this.onDataCallback(e,t+1)},e.prototype.onEnd=function(){return this.documentCompleted=!0,this.onEndCallback()},e.prototype.debugInfo=function(e){return null==e?"":"node: <"+e+">"},e.prototype.ele=function(){return this.element.apply(this,arguments)},e.prototype.nod=function(e,t,i){return this.node(e,t,i)},e.prototype.txt=function(e){return this.text(e)},e.prototype.dat=function(e){return this.cdata(e)},e.prototype.com=function(e){return this.comment(e)},e.prototype.ins=function(e,t){return this.instruction(e,t)},e.prototype.dec=function(e,t,i){return this.declaration(e,t,i)},e.prototype.dtd=function(e,t,i){return this.doctype(e,t,i)},e.prototype.e=function(e,t,i){return this.element(e,t,i)},e.prototype.n=function(e,t,i){return this.node(e,t,i)},e.prototype.t=function(e){return this.text(e)},e.prototype.d=function(e){return this.cdata(e)},e.prototype.c=function(e){return this.comment(e)},e.prototype.r=function(e){return this.raw(e)},e.prototype.i=function(e,t){return this.instruction(e,t)},e.prototype.att=function(){return this.currentNode&&this.currentNode.type===t.DocType?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},e.prototype.a=function(){return this.currentNode&&this.currentNode.type===t.DocType?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},e.prototype.ent=function(e,t){return this.entity(e,t)},e.prototype.pent=function(e,t){return this.pEntity(e,t)},e.prototype.not=function(e,t){return this.notation(e,t)},e}()}).call(this)},1218(e,t,i){(function(){var t,n,r={}.hasOwnProperty;n=i(468),t=i(1737),e.exports=function(e){function i(e){i.__super__.constructor.call(this,e),this.type=t.Dummy}return function(e,t){for(var i in t)r.call(t,i)&&(e[i]=t[i]);function n(){this.constructor=e}n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype}(i,e),i.prototype.clone=function(){return Object.create(this)},i.prototype.toString=function(e){return""},i}(n)}).call(this)},3906(e,t,i){(function(){var t,n,r,o,s,a,c,l,u={}.hasOwnProperty;l=i(9241),c=l.isObject,a=l.isFunction,s=l.getValue,o=i(468),t=i(1737),n=i(4238),r=i(4797),e.exports=function(e){function i(e,n,r){var o,s,a,c;if(i.__super__.constructor.call(this,e),null==n)throw new Error("Missing element name. "+this.debugInfo());if(this.name=this.stringify.name(n),this.type=t.Element,this.attribs={},this.schemaTypeInfo=null,null!=r&&this.attribute(r),e.type===t.Document&&(this.isRoot=!0,this.documentObject=e,e.rootObject=this,e.children))for(s=0,a=(c=e.children).length;s<a;s++)if((o=c[s]).type===t.DocType){o.name=this.name;break}}return function(e,t){for(var i in t)u.call(t,i)&&(e[i]=t[i]);function n(){this.constructor=e}n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype}(i,e),Object.defineProperty(i.prototype,"tagName",{get:function(){return this.name}}),Object.defineProperty(i.prototype,"namespaceURI",{get:function(){return""}}),Object.defineProperty(i.prototype,"prefix",{get:function(){return""}}),Object.defineProperty(i.prototype,"localName",{get:function(){return this.name}}),Object.defineProperty(i.prototype,"id",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(i.prototype,"className",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(i.prototype,"classList",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(i.prototype,"attributes",{get:function(){return this.attributeMap&&this.attributeMap.nodes||(this.attributeMap=new r(this.attribs)),this.attributeMap}}),i.prototype.clone=function(){var e,t,i,n;for(t in(i=Object.create(this)).isRoot&&(i.documentObject=null),i.attribs={},n=this.attribs)u.call(n,t)&&(e=n[t],i.attribs[t]=e.clone());return i.children=[],this.children.forEach(function(e){var t;return(t=e.clone()).parent=i,i.children.push(t)}),i},i.prototype.attribute=function(e,t){var i,r;if(null!=e&&(e=s(e)),c(e))for(i in e)u.call(e,i)&&(r=e[i],this.attribute(i,r));else a(t)&&(t=t.apply()),this.options.keepNullAttributes&&null==t?this.attribs[e]=new n(this,e,""):null!=t&&(this.attribs[e]=new n(this,e,t));return this},i.prototype.removeAttribute=function(e){var t,i,n;if(null==e)throw new Error("Missing attribute name. "+this.debugInfo());if(e=s(e),Array.isArray(e))for(i=0,n=e.length;i<n;i++)t=e[i],delete this.attribs[t];else delete this.attribs[e];return this},i.prototype.toString=function(e){return this.options.writer.element(this,this.options.writer.filterOptions(e))},i.prototype.att=function(e,t){return this.attribute(e,t)},i.prototype.a=function(e,t){return this.attribute(e,t)},i.prototype.getAttribute=function(e){return this.attribs.hasOwnProperty(e)?this.attribs[e].value:null},i.prototype.setAttribute=function(e,t){throw new Error("This DOM method is not implemented."+this.debugInfo())},i.prototype.getAttributeNode=function(e){return this.attribs.hasOwnProperty(e)?this.attribs[e]:null},i.prototype.setAttributeNode=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())},i.prototype.removeAttributeNode=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())},i.prototype.getElementsByTagName=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())},i.prototype.getAttributeNS=function(e,t){throw new Error("This DOM method is not implemented."+this.debugInfo())},i.prototype.setAttributeNS=function(e,t,i){throw new Error("This DOM method is not implemented."+this.debugInfo())},i.prototype.removeAttributeNS=function(e,t){throw new Error("This DOM method is not implemented."+this.debugInfo())},i.prototype.getAttributeNodeNS=function(e,t){throw new Error("This DOM method is not implemented."+this.debugInfo())},i.prototype.setAttributeNodeNS=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())},i.prototype.getElementsByTagNameNS=function(e,t){throw new Error("This DOM method is not implemented."+this.debugInfo())},i.prototype.hasAttribute=function(e){return this.attribs.hasOwnProperty(e)},i.prototype.hasAttributeNS=function(e,t){throw new Error("This DOM method is not implemented."+this.debugInfo())},i.prototype.setIdAttribute=function(e,t){return this.attribs.hasOwnProperty(e)?this.attribs[e].isId:t},i.prototype.setIdAttributeNS=function(e,t,i){throw new Error("This DOM method is not implemented."+this.debugInfo())},i.prototype.setIdAttributeNode=function(e,t){throw new Error("This DOM method is not implemented."+this.debugInfo())},i.prototype.getElementsByTagName=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())},i.prototype.getElementsByTagNameNS=function(e,t){throw new Error("This DOM method is not implemented."+this.debugInfo())},i.prototype.getElementsByClassName=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())},i.prototype.isEqualNode=function(e){var t,n,r;if(!i.__super__.isEqualNode.apply(this,arguments).isEqualNode(e))return!1;if(e.namespaceURI!==this.namespaceURI)return!1;if(e.prefix!==this.prefix)return!1;if(e.localName!==this.localName)return!1;if(e.attribs.length!==this.attribs.length)return!1;for(t=n=0,r=this.attribs.length-1;0<=r?n<=r:n>=r;t=0<=r?++n:--n)if(!this.attribs[t].isEqualNode(e.attribs[t]))return!1;return!0},i}(o)}).call(this)},4797(e){(function(){e.exports=function(){function e(e){this.nodes=e}return Object.defineProperty(e.prototype,"length",{get:function(){return Object.keys(this.nodes).length||0}}),e.prototype.clone=function(){return this.nodes=null},e.prototype.getNamedItem=function(e){return this.nodes[e]},e.prototype.setNamedItem=function(e){var t;return t=this.nodes[e.nodeName],this.nodes[e.nodeName]=e,t||null},e.prototype.removeNamedItem=function(e){var t;return t=this.nodes[e],delete this.nodes[e],t||null},e.prototype.item=function(e){return this.nodes[Object.keys(this.nodes)[e]]||null},e.prototype.getNamedItemNS=function(e,t){throw new Error("This DOM method is not implemented.")},e.prototype.setNamedItemNS=function(e){throw new Error("This DOM method is not implemented.")},e.prototype.removeNamedItemNS=function(e,t){throw new Error("This DOM method is not implemented.")},e}()}).call(this)},468(e,t,i){(function(){var t,n,r,o,s,a,c,l,u,h,d,p,f,g,m,y,v,_={}.hasOwnProperty;v=i(9241),y=v.isObject,m=v.isFunction,g=v.isEmpty,f=v.getValue,l=null,r=null,o=null,s=null,a=null,d=null,p=null,h=null,c=null,n=null,u=null,t=null,e.exports=function(){function e(e){this.parent=e,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),this.value=null,this.children=[],this.baseURI=null,l||(l=i(3906),r=i(2691),o=i(2679),s=i(4130),a=i(6376),d=i(1268),p=i(2535),h=i(5915),c=i(1218),n=i(1737),u=i(6684),i(4797),t=i(4923))}return Object.defineProperty(e.prototype,"nodeName",{get:function(){return this.name}}),Object.defineProperty(e.prototype,"nodeType",{get:function(){return this.type}}),Object.defineProperty(e.prototype,"nodeValue",{get:function(){return this.value}}),Object.defineProperty(e.prototype,"parentNode",{get:function(){return this.parent}}),Object.defineProperty(e.prototype,"childNodes",{get:function(){return this.childNodeList&&this.childNodeList.nodes||(this.childNodeList=new u(this.children)),this.childNodeList}}),Object.defineProperty(e.prototype,"firstChild",{get:function(){return this.children[0]||null}}),Object.defineProperty(e.prototype,"lastChild",{get:function(){return this.children[this.children.length-1]||null}}),Object.defineProperty(e.prototype,"previousSibling",{get:function(){var e;return e=this.parent.children.indexOf(this),this.parent.children[e-1]||null}}),Object.defineProperty(e.prototype,"nextSibling",{get:function(){var e;return e=this.parent.children.indexOf(this),this.parent.children[e+1]||null}}),Object.defineProperty(e.prototype,"ownerDocument",{get:function(){return this.document()||null}}),Object.defineProperty(e.prototype,"textContent",{get:function(){var e,t,i,r,o;if(this.nodeType===n.Element||this.nodeType===n.DocumentFragment){for(o="",t=0,i=(r=this.children).length;t<i;t++)(e=r[t]).textContent&&(o+=e.textContent);return o}return null},set:function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),e.prototype.setParent=function(e){var t,i,n,r,o;for(this.parent=e,e&&(this.options=e.options,this.stringify=e.stringify),o=[],i=0,n=(r=this.children).length;i<n;i++)t=r[i],o.push(t.setParent(this));return o},e.prototype.element=function(e,t,i){var n,r,o,s,a,c,l,u,h,d,p;if(c=null,null===t&&null==i&&(t=(h=[{},null])[0],i=h[1]),null==t&&(t={}),t=f(t),y(t)||(i=(d=[t,i])[0],t=d[1]),null!=e&&(e=f(e)),Array.isArray(e))for(o=0,l=e.length;o<l;o++)r=e[o],c=this.element(r);else if(m(e))c=this.element(e.apply());else if(y(e)){for(a in e)if(_.call(e,a))if(p=e[a],m(p)&&(p=p.apply()),!this.options.ignoreDecorators&&this.stringify.convertAttKey&&0===a.indexOf(this.stringify.convertAttKey))c=this.attribute(a.substr(this.stringify.convertAttKey.length),p);else if(!this.options.separateArrayItems&&Array.isArray(p)&&g(p))c=this.dummy();else if(y(p)&&g(p))c=this.element(a);else if(this.options.keepNullNodes||null!=p)if(!this.options.separateArrayItems&&Array.isArray(p))for(s=0,u=p.length;s<u;s++)r=p[s],(n={})[a]=r,c=this.element(n);else y(p)?!this.options.ignoreDecorators&&this.stringify.convertTextKey&&0===a.indexOf(this.stringify.convertTextKey)?c=this.element(p):(c=this.element(a)).element(p):c=this.element(a,p);else c=this.dummy()}else c=this.options.keepNullNodes||null!==i?!this.options.ignoreDecorators&&this.stringify.convertTextKey&&0===e.indexOf(this.stringify.convertTextKey)?this.text(i):!this.options.ignoreDecorators&&this.stringify.convertCDataKey&&0===e.indexOf(this.stringify.convertCDataKey)?this.cdata(i):!this.options.ignoreDecorators&&this.stringify.convertCommentKey&&0===e.indexOf(this.stringify.convertCommentKey)?this.comment(i):!this.options.ignoreDecorators&&this.stringify.convertRawKey&&0===e.indexOf(this.stringify.convertRawKey)?this.raw(i):!this.options.ignoreDecorators&&this.stringify.convertPIKey&&0===e.indexOf(this.stringify.convertPIKey)?this.instruction(e.substr(this.stringify.convertPIKey.length),i):this.node(e,t,i):this.dummy();if(null==c)throw new Error("Could not create any elements with: "+e+". "+this.debugInfo());return c},e.prototype.insertBefore=function(e,t,i){var n,r,o,s,a;if(null!=e?e.type:void 0)return s=t,(o=e).setParent(this),s?(r=children.indexOf(s),a=children.splice(r),children.push(o),Array.prototype.push.apply(children,a)):children.push(o),o;if(this.isRoot)throw new Error("Cannot insert elements at root level. "+this.debugInfo(e));return r=this.parent.children.indexOf(this),a=this.parent.children.splice(r),n=this.parent.element(e,t,i),Array.prototype.push.apply(this.parent.children,a),n},e.prototype.insertAfter=function(e,t,i){var n,r,o;if(this.isRoot)throw new Error("Cannot insert elements at root level. "+this.debugInfo(e));return r=this.parent.children.indexOf(this),o=this.parent.children.splice(r+1),n=this.parent.element(e,t,i),Array.prototype.push.apply(this.parent.children,o),n},e.prototype.remove=function(){var e;if(this.isRoot)throw new Error("Cannot remove the root element. "+this.debugInfo());return e=this.parent.children.indexOf(this),[].splice.apply(this.parent.children,[e,e-e+1].concat([])),this.parent},e.prototype.node=function(e,t,i){var n,r;return null!=e&&(e=f(e)),t||(t={}),t=f(t),y(t)||(i=(r=[t,i])[0],t=r[1]),n=new l(this,e,t),null!=i&&n.text(i),this.children.push(n),n},e.prototype.text=function(e){var t;return y(e)&&this.element(e),t=new p(this,e),this.children.push(t),this},e.prototype.cdata=function(e){var t;return t=new r(this,e),this.children.push(t),this},e.prototype.comment=function(e){var t;return t=new o(this,e),this.children.push(t),this},e.prototype.commentBefore=function(e){var t,i;return t=this.parent.children.indexOf(this),i=this.parent.children.splice(t),this.parent.comment(e),Array.prototype.push.apply(this.parent.children,i),this},e.prototype.commentAfter=function(e){var t,i;return t=this.parent.children.indexOf(this),i=this.parent.children.splice(t+1),this.parent.comment(e),Array.prototype.push.apply(this.parent.children,i),this},e.prototype.raw=function(e){var t;return t=new d(this,e),this.children.push(t),this},e.prototype.dummy=function(){return new c(this)},e.prototype.instruction=function(e,t){var i,n,r,o,s;if(null!=e&&(e=f(e)),null!=t&&(t=f(t)),Array.isArray(e))for(o=0,s=e.length;o<s;o++)i=e[o],this.instruction(i);else if(y(e))for(i in e)_.call(e,i)&&(n=e[i],this.instruction(i,n));else m(t)&&(t=t.apply()),r=new h(this,e,t),this.children.push(r);return this},e.prototype.instructionBefore=function(e,t){var i,n;return i=this.parent.children.indexOf(this),n=this.parent.children.splice(i),this.parent.instruction(e,t),Array.prototype.push.apply(this.parent.children,n),this},e.prototype.instructionAfter=function(e,t){var i,n;return i=this.parent.children.indexOf(this),n=this.parent.children.splice(i+1),this.parent.instruction(e,t),Array.prototype.push.apply(this.parent.children,n),this},e.prototype.declaration=function(e,t,i){var r,o;return r=this.document(),o=new s(r,e,t,i),0===r.children.length?r.children.unshift(o):r.children[0].type===n.Declaration?r.children[0]=o:r.children.unshift(o),r.root()||r},e.prototype.dtd=function(e,t){var i,r,o,s,c,l,u,h,d;for(i=this.document(),r=new a(i,e,t),o=s=0,l=(h=i.children).length;s<l;o=++s)if(h[o].type===n.DocType)return i.children[o]=r,r;for(o=c=0,u=(d=i.children).length;c<u;o=++c)if(d[o].isRoot)return i.children.splice(o,0,r),r;return i.children.push(r),r},e.prototype.up=function(){if(this.isRoot)throw new Error("The root node has no parent. Use doc() if you need to get the document object.");return this.parent},e.prototype.root=function(){var e;for(e=this;e;){if(e.type===n.Document)return e.rootObject;if(e.isRoot)return e;e=e.parent}},e.prototype.document=function(){var e;for(e=this;e;){if(e.type===n.Document)return e;e=e.parent}},e.prototype.end=function(e){return this.document().end(e)},e.prototype.prev=function(){var e;if((e=this.parent.children.indexOf(this))<1)throw new Error("Already at the first node. "+this.debugInfo());return this.parent.children[e-1]},e.prototype.next=function(){var e;if(-1===(e=this.parent.children.indexOf(this))||e===this.parent.children.length-1)throw new Error("Already at the last node. "+this.debugInfo());return this.parent.children[e+1]},e.prototype.importDocument=function(e){var t;return(t=e.root().clone()).parent=this,t.isRoot=!1,this.children.push(t),this},e.prototype.debugInfo=function(e){var t,i;return null!=(e=e||this.name)||(null!=(t=this.parent)?t.name:void 0)?null==e?"parent: <"+this.parent.name+">":(null!=(i=this.parent)?i.name:void 0)?"node: <"+e+">, parent: <"+this.parent.name+">":"node: <"+e+">":""},e.prototype.ele=function(e,t,i){return this.element(e,t,i)},e.prototype.nod=function(e,t,i){return this.node(e,t,i)},e.prototype.txt=function(e){return this.text(e)},e.prototype.dat=function(e){return this.cdata(e)},e.prototype.com=function(e){return this.comment(e)},e.prototype.ins=function(e,t){return this.instruction(e,t)},e.prototype.doc=function(){return this.document()},e.prototype.dec=function(e,t,i){return this.declaration(e,t,i)},e.prototype.e=function(e,t,i){return this.element(e,t,i)},e.prototype.n=function(e,t,i){return this.node(e,t,i)},e.prototype.t=function(e){return this.text(e)},e.prototype.d=function(e){return this.cdata(e)},e.prototype.c=function(e){return this.comment(e)},e.prototype.r=function(e){return this.raw(e)},e.prototype.i=function(e,t){return this.instruction(e,t)},e.prototype.u=function(){return this.up()},e.prototype.importXMLBuilder=function(e){return this.importDocument(e)},e.prototype.replaceChild=function(e,t){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.removeChild=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.appendChild=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.hasChildNodes=function(){return 0!==this.children.length},e.prototype.cloneNode=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.normalize=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.isSupported=function(e,t){return!0},e.prototype.hasAttributes=function(){return 0!==this.attribs.length},e.prototype.compareDocumentPosition=function(e){var i,n;return(i=this)===e?0:this.document()!==e.document()?(n=t.Disconnected|t.ImplementationSpecific,Math.random()<.5?n|=t.Preceding:n|=t.Following,n):i.isAncestor(e)?t.Contains|t.Preceding:i.isDescendant(e)?t.Contains|t.Following:i.isPreceding(e)?t.Preceding:t.Following},e.prototype.isSameNode=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.lookupPrefix=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.isDefaultNamespace=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.lookupNamespaceURI=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.isEqualNode=function(e){var t,i,n;if(e.nodeType!==this.nodeType)return!1;if(e.children.length!==this.children.length)return!1;for(t=i=0,n=this.children.length-1;0<=n?i<=n:i>=n;t=0<=n?++i:--i)if(!this.children[t].isEqualNode(e.children[t]))return!1;return!0},e.prototype.getFeature=function(e,t){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.setUserData=function(e,t,i){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.getUserData=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.contains=function(e){return!!e&&(e===this||this.isDescendant(e))},e.prototype.isDescendant=function(e){var t,i,n,r;for(i=0,n=(r=this.children).length;i<n;i++){if(e===(t=r[i]))return!0;if(t.isDescendant(e))return!0}return!1},e.prototype.isAncestor=function(e){return e.isDescendant(this)},e.prototype.isPreceding=function(e){var t,i;return t=this.treePosition(e),i=this.treePosition(this),-1!==t&&-1!==i&&t<i},e.prototype.isFollowing=function(e){var t,i;return t=this.treePosition(e),i=this.treePosition(this),-1!==t&&-1!==i&&t>i},e.prototype.treePosition=function(e){var t,i;return i=0,t=!1,this.foreachTreeNode(this.document(),function(n){if(i++,!t&&n===e)return t=!0}),t?i:-1},e.prototype.foreachTreeNode=function(e,t){var i,n,r,o,s;for(e||(e=this.document()),n=0,r=(o=e.children).length;n<r;n++){if(s=t(i=o[n]))return s;if(s=this.foreachTreeNode(i,t))return s}},e}()}).call(this)},6684(e){(function(){e.exports=function(){function e(e){this.nodes=e}return Object.defineProperty(e.prototype,"length",{get:function(){return this.nodes.length||0}}),e.prototype.clone=function(){return this.nodes=null},e.prototype.item=function(e){return this.nodes[e]||null},e}()}).call(this)},5915(e,t,i){(function(){var t,n,r={}.hasOwnProperty;t=i(1737),n=i(7457),e.exports=function(e){function i(e,n,r){if(i.__super__.constructor.call(this,e),null==n)throw new Error("Missing instruction target. "+this.debugInfo());this.type=t.ProcessingInstruction,this.target=this.stringify.insTarget(n),this.name=this.target,r&&(this.value=this.stringify.insValue(r))}return function(e,t){for(var i in t)r.call(t,i)&&(e[i]=t[i]);function n(){this.constructor=e}n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype}(i,e),i.prototype.clone=function(){return Object.create(this)},i.prototype.toString=function(e){return this.options.writer.processingInstruction(this,this.options.writer.filterOptions(e))},i.prototype.isEqualNode=function(e){return!!i.__super__.isEqualNode.apply(this,arguments).isEqualNode(e)&&e.target===this.target},i}(n)}).call(this)},1268(e,t,i){(function(){var t,n,r={}.hasOwnProperty;t=i(1737),n=i(468),e.exports=function(e){function i(e,n){if(i.__super__.constructor.call(this,e),null==n)throw new Error("Missing raw text. "+this.debugInfo());this.type=t.Raw,this.value=this.stringify.raw(n)}return function(e,t){for(var i in t)r.call(t,i)&&(e[i]=t[i]);function n(){this.constructor=e}n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype}(i,e),i.prototype.clone=function(){return Object.create(this)},i.prototype.toString=function(e){return this.options.writer.raw(this,this.options.writer.filterOptions(e))},i}(n)}).call(this)},6775(e,t,i){(function(){var t,n,r,o={}.hasOwnProperty;t=i(1737),r=i(6286),n=i(8753),e.exports=function(e){function i(e,t){this.stream=e,i.__super__.constructor.call(this,t)}return function(e,t){for(var i in t)o.call(t,i)&&(e[i]=t[i]);function n(){this.constructor=e}n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype}(i,e),i.prototype.endline=function(e,t,r){return e.isLastRootNode&&t.state===n.CloseTag?"":i.__super__.endline.call(this,e,t,r)},i.prototype.document=function(e,t){var i,n,r,o,s,a,c,l,u;for(n=r=0,s=(c=e.children).length;r<s;n=++r)(i=c[n]).isLastRootNode=n===e.children.length-1;for(t=this.filterOptions(t),u=[],o=0,a=(l=e.children).length;o<a;o++)i=l[o],u.push(this.writeChildNode(i,t,0));return u},i.prototype.attribute=function(e,t,n){return this.stream.write(i.__super__.attribute.call(this,e,t,n))},i.prototype.cdata=function(e,t,n){return this.stream.write(i.__super__.cdata.call(this,e,t,n))},i.prototype.comment=function(e,t,n){return this.stream.write(i.__super__.comment.call(this,e,t,n))},i.prototype.declaration=function(e,t,n){return this.stream.write(i.__super__.declaration.call(this,e,t,n))},i.prototype.docType=function(e,t,i){var r,o,s,a;if(i||(i=0),this.openNode(e,t,i),t.state=n.OpenTag,this.stream.write(this.indent(e,t,i)),this.stream.write("<!DOCTYPE "+e.root().name),e.pubID&&e.sysID?this.stream.write(' PUBLIC "'+e.pubID+'" "'+e.sysID+'"'):e.sysID&&this.stream.write(' SYSTEM "'+e.sysID+'"'),e.children.length>0){for(this.stream.write(" ["),this.stream.write(this.endline(e,t,i)),t.state=n.InsideTag,o=0,s=(a=e.children).length;o<s;o++)r=a[o],this.writeChildNode(r,t,i+1);t.state=n.CloseTag,this.stream.write("]")}return t.state=n.CloseTag,this.stream.write(t.spaceBeforeSlash+">"),this.stream.write(this.endline(e,t,i)),t.state=n.None,this.closeNode(e,t,i)},i.prototype.element=function(e,i,r){var s,a,c,l,u,h,d,p,f;for(d in r||(r=0),this.openNode(e,i,r),i.state=n.OpenTag,this.stream.write(this.indent(e,i,r)+"<"+e.name),p=e.attribs)o.call(p,d)&&(s=p[d],this.attribute(s,i,r));if(l=0===(c=e.children.length)?null:e.children[0],0===c||e.children.every(function(e){return(e.type===t.Text||e.type===t.Raw)&&""===e.value}))i.allowEmpty?(this.stream.write(">"),i.state=n.CloseTag,this.stream.write("</"+e.name+">")):(i.state=n.CloseTag,this.stream.write(i.spaceBeforeSlash+"/>"));else if(!i.pretty||1!==c||l.type!==t.Text&&l.type!==t.Raw||null==l.value){for(this.stream.write(">"+this.endline(e,i,r)),i.state=n.InsideTag,u=0,h=(f=e.children).length;u<h;u++)a=f[u],this.writeChildNode(a,i,r+1);i.state=n.CloseTag,this.stream.write(this.indent(e,i,r)+"</"+e.name+">")}else this.stream.write(">"),i.state=n.InsideTag,i.suppressPrettyCount++,this.writeChildNode(l,i,r+1),i.suppressPrettyCount--,i.state=n.CloseTag,this.stream.write("</"+e.name+">");return this.stream.write(this.endline(e,i,r)),i.state=n.None,this.closeNode(e,i,r)},i.prototype.processingInstruction=function(e,t,n){return this.stream.write(i.__super__.processingInstruction.call(this,e,t,n))},i.prototype.raw=function(e,t,n){return this.stream.write(i.__super__.raw.call(this,e,t,n))},i.prototype.text=function(e,t,n){return this.stream.write(i.__super__.text.call(this,e,t,n))},i.prototype.dtdAttList=function(e,t,n){return this.stream.write(i.__super__.dtdAttList.call(this,e,t,n))},i.prototype.dtdElement=function(e,t,n){return this.stream.write(i.__super__.dtdElement.call(this,e,t,n))},i.prototype.dtdEntity=function(e,t,n){return this.stream.write(i.__super__.dtdEntity.call(this,e,t,n))},i.prototype.dtdNotation=function(e,t,n){return this.stream.write(i.__super__.dtdNotation.call(this,e,t,n))},i}(r)}).call(this)},382(e,t,i){(function(){var t,n={}.hasOwnProperty;t=i(6286),e.exports=function(e){function t(e){t.__super__.constructor.call(this,e)}return function(e,t){for(var i in t)n.call(t,i)&&(e[i]=t[i]);function r(){this.constructor=e}r.prototype=t.prototype,e.prototype=new r,e.__super__=t.prototype}(t,e),t.prototype.document=function(e,t){var i,n,r,o,s;for(t=this.filterOptions(t),o="",n=0,r=(s=e.children).length;n<r;n++)i=s[n],o+=this.writeChildNode(i,t,0);return t.pretty&&o.slice(-t.newline.length)===t.newline&&(o=o.slice(0,-t.newline.length)),o},t}(t)}).call(this)},3976(e){(function(){var t=function(e,t){return function(){return e.apply(t,arguments)}},i={}.hasOwnProperty;e.exports=function(){function e(e){var n,r,o;for(n in this.assertLegalName=t(this.assertLegalName,this),this.assertLegalChar=t(this.assertLegalChar,this),e||(e={}),this.options=e,this.options.version||(this.options.version="1.0"),r=e.stringify||{})i.call(r,n)&&(o=r[n],this[n]=o)}return e.prototype.name=function(e){return this.options.noValidation?e:this.assertLegalName(""+e||"")},e.prototype.text=function(e){return this.options.noValidation?e:this.assertLegalChar(this.textEscape(""+e||""))},e.prototype.cdata=function(e){return this.options.noValidation?e:(e=(e=""+e||"").replace("]]>","]]]]><![CDATA[>"),this.assertLegalChar(e))},e.prototype.comment=function(e){if(this.options.noValidation)return e;if((e=""+e||"").match(/--/))throw new Error("Comment text cannot contain double-hypen: "+e);return this.assertLegalChar(e)},e.prototype.raw=function(e){return this.options.noValidation?e:""+e||""},e.prototype.attValue=function(e){return this.options.noValidation?e:this.assertLegalChar(this.attEscape(e=""+e||""))},e.prototype.insTarget=function(e){return this.options.noValidation?e:this.assertLegalChar(""+e||"")},e.prototype.insValue=function(e){if(this.options.noValidation)return e;if((e=""+e||"").match(/\?>/))throw new Error("Invalid processing instruction value: "+e);return this.assertLegalChar(e)},e.prototype.xmlVersion=function(e){if(this.options.noValidation)return e;if(!(e=""+e||"").match(/1\.[0-9]+/))throw new Error("Invalid version number: "+e);return e},e.prototype.xmlEncoding=function(e){if(this.options.noValidation)return e;if(!(e=""+e||"").match(/^[A-Za-z](?:[A-Za-z0-9._-])*$/))throw new Error("Invalid encoding: "+e);return this.assertLegalChar(e)},e.prototype.xmlStandalone=function(e){return this.options.noValidation?e:e?"yes":"no"},e.prototype.dtdPubID=function(e){return this.options.noValidation?e:this.assertLegalChar(""+e||"")},e.prototype.dtdSysID=function(e){return this.options.noValidation?e:this.assertLegalChar(""+e||"")},e.prototype.dtdElementValue=function(e){return this.options.noValidation?e:this.assertLegalChar(""+e||"")},e.prototype.dtdAttType=function(e){return this.options.noValidation?e:this.assertLegalChar(""+e||"")},e.prototype.dtdAttDefault=function(e){return this.options.noValidation?e:this.assertLegalChar(""+e||"")},e.prototype.dtdEntityValue=function(e){return this.options.noValidation?e:this.assertLegalChar(""+e||"")},e.prototype.dtdNData=function(e){return this.options.noValidation?e:this.assertLegalChar(""+e||"")},e.prototype.convertAttKey="@",e.prototype.convertPIKey="?",e.prototype.convertTextKey="#text",e.prototype.convertCDataKey="#cdata",e.prototype.convertCommentKey="#comment",e.prototype.convertRawKey="#raw",e.prototype.assertLegalChar=function(e){var t,i;if(this.options.noValidation)return e;if(t="","1.0"===this.options.version){if(t=/[\0-\x08\x0B\f\x0E-\x1F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,i=e.match(t))throw new Error("Invalid character in string: "+e+" at index "+i.index)}else if("1.1"===this.options.version&&(t=/[\0\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,i=e.match(t)))throw new Error("Invalid character in string: "+e+" at index "+i.index);return e},e.prototype.assertLegalName=function(e){var t;if(this.options.noValidation)return e;if(this.assertLegalChar(e),t=/^([:A-Z_a-z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])([\x2D\.0-:A-Z_a-z\xB7\xC0-\xD6\xD8-\xF6\xF8-\u037D\u037F-\u1FFF\u200C\u200D\u203F\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])*$/,!e.match(t))throw new Error("Invalid character in name");return e},e.prototype.textEscape=function(e){var t;return this.options.noValidation?e:(t=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,e.replace(t,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\r/g,"&#xD;"))},e.prototype.attEscape=function(e){var t;return this.options.noValidation?e:(t=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,e.replace(t,"&amp;").replace(/</g,"&lt;").replace(/"/g,"&quot;").replace(/\t/g,"&#x9;").replace(/\n/g,"&#xA;").replace(/\r/g,"&#xD;"))},e}()}).call(this)},2535(e,t,i){(function(){var t,n,r={}.hasOwnProperty;t=i(1737),n=i(7457),e.exports=function(e){function i(e,n){if(i.__super__.constructor.call(this,e),null==n)throw new Error("Missing element text. "+this.debugInfo());this.name="#text",this.type=t.Text,this.value=this.stringify.text(n)}return function(e,t){for(var i in t)r.call(t,i)&&(e[i]=t[i]);function n(){this.constructor=e}n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype}(i,e),Object.defineProperty(i.prototype,"isElementContentWhitespace",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(i.prototype,"wholeText",{get:function(){var e,t,i;for(i="",t=this.previousSibling;t;)i=t.data+i,t=t.previousSibling;for(i+=this.data,e=this.nextSibling;e;)i+=e.data,e=e.nextSibling;return i}}),i.prototype.clone=function(){return Object.create(this)},i.prototype.toString=function(e){return this.options.writer.text(this,this.options.writer.filterOptions(e))},i.prototype.splitText=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())},i.prototype.replaceWholeText=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())},i}(n)}).call(this)},6286(e,t,i){(function(){var t,n,r,o={}.hasOwnProperty;r=i(9241).assign,t=i(1737),i(4130),i(6376),i(2691),i(2679),i(3906),i(1268),i(2535),i(5915),i(1218),i(4111),i(7696),i(5529),i(8012),n=i(8753),e.exports=function(){function e(e){var t,i,n;for(t in e||(e={}),this.options=e,i=e.writer||{})o.call(i,t)&&(n=i[t],this["_"+t]=this[t],this[t]=n)}return e.prototype.filterOptions=function(e){var t,i,o,s,a,c,l,u;return e||(e={}),e=r({},this.options,e),(t={writer:this}).pretty=e.pretty||!1,t.allowEmpty=e.allowEmpty||!1,t.indent=null!=(i=e.indent)?i:" ",t.newline=null!=(o=e.newline)?o:"\n",t.offset=null!=(s=e.offset)?s:0,t.dontPrettyTextNodes=null!=(a=null!=(c=e.dontPrettyTextNodes)?c:e.dontprettytextnodes)?a:0,t.spaceBeforeSlash=null!=(l=null!=(u=e.spaceBeforeSlash)?u:e.spacebeforeslash)?l:"",!0===t.spaceBeforeSlash&&(t.spaceBeforeSlash=" "),t.suppressPrettyCount=0,t.user={},t.state=n.None,t},e.prototype.indent=function(e,t,i){var n;return!t.pretty||t.suppressPrettyCount?"":t.pretty&&(n=(i||0)+t.offset+1)>0?new Array(n).join(t.indent):""},e.prototype.endline=function(e,t,i){return!t.pretty||t.suppressPrettyCount?"":t.newline},e.prototype.attribute=function(e,t,i){var n;return this.openAttribute(e,t,i),n=" "+e.name+'="'+e.value+'"',this.closeAttribute(e,t,i),n},e.prototype.cdata=function(e,t,i){var r;return this.openNode(e,t,i),t.state=n.OpenTag,r=this.indent(e,t,i)+"<![CDATA[",t.state=n.InsideTag,r+=e.value,t.state=n.CloseTag,r+="]]>"+this.endline(e,t,i),t.state=n.None,this.closeNode(e,t,i),r},e.prototype.comment=function(e,t,i){var r;return this.openNode(e,t,i),t.state=n.OpenTag,r=this.indent(e,t,i)+"\x3c!-- ",t.state=n.InsideTag,r+=e.value,t.state=n.CloseTag,r+=" --\x3e"+this.endline(e,t,i),t.state=n.None,this.closeNode(e,t,i),r},e.prototype.declaration=function(e,t,i){var r;return this.openNode(e,t,i),t.state=n.OpenTag,r=this.indent(e,t,i)+"<?xml",t.state=n.InsideTag,r+=' version="'+e.version+'"',null!=e.encoding&&(r+=' encoding="'+e.encoding+'"'),null!=e.standalone&&(r+=' standalone="'+e.standalone+'"'),t.state=n.CloseTag,r+=t.spaceBeforeSlash+"?>",r+=this.endline(e,t,i),t.state=n.None,this.closeNode(e,t,i),r},e.prototype.docType=function(e,t,i){var r,o,s,a,c;if(i||(i=0),this.openNode(e,t,i),t.state=n.OpenTag,a=this.indent(e,t,i),a+="<!DOCTYPE "+e.root().name,e.pubID&&e.sysID?a+=' PUBLIC "'+e.pubID+'" "'+e.sysID+'"':e.sysID&&(a+=' SYSTEM "'+e.sysID+'"'),e.children.length>0){for(a+=" [",a+=this.endline(e,t,i),t.state=n.InsideTag,o=0,s=(c=e.children).length;o<s;o++)r=c[o],a+=this.writeChildNode(r,t,i+1);t.state=n.CloseTag,a+="]"}return t.state=n.CloseTag,a+=t.spaceBeforeSlash+">",a+=this.endline(e,t,i),t.state=n.None,this.closeNode(e,t,i),a},e.prototype.element=function(e,i,r){var s,a,c,l,u,h,d,p,f,g,m,y,v,_;for(f in r||(r=0),g=!1,m="",this.openNode(e,i,r),i.state=n.OpenTag,m+=this.indent(e,i,r)+"<"+e.name,y=e.attribs)o.call(y,f)&&(s=y[f],m+=this.attribute(s,i,r));if(l=0===(c=e.children.length)?null:e.children[0],0===c||e.children.every(function(e){return(e.type===t.Text||e.type===t.Raw)&&""===e.value}))i.allowEmpty?(m+=">",i.state=n.CloseTag,m+="</"+e.name+">"+this.endline(e,i,r)):(i.state=n.CloseTag,m+=i.spaceBeforeSlash+"/>"+this.endline(e,i,r));else if(!i.pretty||1!==c||l.type!==t.Text&&l.type!==t.Raw||null==l.value){if(i.dontPrettyTextNodes)for(u=0,d=(v=e.children).length;u<d;u++)if(((a=v[u]).type===t.Text||a.type===t.Raw)&&null!=a.value){i.suppressPrettyCount++,g=!0;break}for(m+=">"+this.endline(e,i,r),i.state=n.InsideTag,h=0,p=(_=e.children).length;h<p;h++)a=_[h],m+=this.writeChildNode(a,i,r+1);i.state=n.CloseTag,m+=this.indent(e,i,r)+"</"+e.name+">",g&&i.suppressPrettyCount--,m+=this.endline(e,i,r),i.state=n.None}else m+=">",i.state=n.InsideTag,i.suppressPrettyCount++,g=!0,m+=this.writeChildNode(l,i,r+1),i.suppressPrettyCount--,g=!1,i.state=n.CloseTag,m+="</"+e.name+">"+this.endline(e,i,r);return this.closeNode(e,i,r),m},e.prototype.writeChildNode=function(e,i,n){switch(e.type){case t.CData:return this.cdata(e,i,n);case t.Comment:return this.comment(e,i,n);case t.Element:return this.element(e,i,n);case t.Raw:return this.raw(e,i,n);case t.Text:return this.text(e,i,n);case t.ProcessingInstruction:return this.processingInstruction(e,i,n);case t.Dummy:return"";case t.Declaration:return this.declaration(e,i,n);case t.DocType:return this.docType(e,i,n);case t.AttributeDeclaration:return this.dtdAttList(e,i,n);case t.ElementDeclaration:return this.dtdElement(e,i,n);case t.EntityDeclaration:return this.dtdEntity(e,i,n);case t.NotationDeclaration:return this.dtdNotation(e,i,n);default:throw new Error("Unknown XML node type: "+e.constructor.name)}},e.prototype.processingInstruction=function(e,t,i){var r;return this.openNode(e,t,i),t.state=n.OpenTag,r=this.indent(e,t,i)+"<?",t.state=n.InsideTag,r+=e.target,e.value&&(r+=" "+e.value),t.state=n.CloseTag,r+=t.spaceBeforeSlash+"?>",r+=this.endline(e,t,i),t.state=n.None,this.closeNode(e,t,i),r},e.prototype.raw=function(e,t,i){var r;return this.openNode(e,t,i),t.state=n.OpenTag,r=this.indent(e,t,i),t.state=n.InsideTag,r+=e.value,t.state=n.CloseTag,r+=this.endline(e,t,i),t.state=n.None,this.closeNode(e,t,i),r},e.prototype.text=function(e,t,i){var r;return this.openNode(e,t,i),t.state=n.OpenTag,r=this.indent(e,t,i),t.state=n.InsideTag,r+=e.value,t.state=n.CloseTag,r+=this.endline(e,t,i),t.state=n.None,this.closeNode(e,t,i),r},e.prototype.dtdAttList=function(e,t,i){var r;return this.openNode(e,t,i),t.state=n.OpenTag,r=this.indent(e,t,i)+"<!ATTLIST",t.state=n.InsideTag,r+=" "+e.elementName+" "+e.attributeName+" "+e.attributeType,"#DEFAULT"!==e.defaultValueType&&(r+=" "+e.defaultValueType),e.defaultValue&&(r+=' "'+e.defaultValue+'"'),t.state=n.CloseTag,r+=t.spaceBeforeSlash+">"+this.endline(e,t,i),t.state=n.None,this.closeNode(e,t,i),r},e.prototype.dtdElement=function(e,t,i){var r;return this.openNode(e,t,i),t.state=n.OpenTag,r=this.indent(e,t,i)+"<!ELEMENT",t.state=n.InsideTag,r+=" "+e.name+" "+e.value,t.state=n.CloseTag,r+=t.spaceBeforeSlash+">"+this.endline(e,t,i),t.state=n.None,this.closeNode(e,t,i),r},e.prototype.dtdEntity=function(e,t,i){var r;return this.openNode(e,t,i),t.state=n.OpenTag,r=this.indent(e,t,i)+"<!ENTITY",t.state=n.InsideTag,e.pe&&(r+=" %"),r+=" "+e.name,e.value?r+=' "'+e.value+'"':(e.pubID&&e.sysID?r+=' PUBLIC "'+e.pubID+'" "'+e.sysID+'"':e.sysID&&(r+=' SYSTEM "'+e.sysID+'"'),e.nData&&(r+=" NDATA "+e.nData)),t.state=n.CloseTag,r+=t.spaceBeforeSlash+">"+this.endline(e,t,i),t.state=n.None,this.closeNode(e,t,i),r},e.prototype.dtdNotation=function(e,t,i){var r;return this.openNode(e,t,i),t.state=n.OpenTag,r=this.indent(e,t,i)+"<!NOTATION",t.state=n.InsideTag,r+=" "+e.name,e.pubID&&e.sysID?r+=' PUBLIC "'+e.pubID+'" "'+e.sysID+'"':e.pubID?r+=' PUBLIC "'+e.pubID+'"':e.sysID&&(r+=' SYSTEM "'+e.sysID+'"'),t.state=n.CloseTag,r+=t.spaceBeforeSlash+">"+this.endline(e,t,i),t.state=n.None,this.closeNode(e,t,i),r},e.prototype.openNode=function(e,t,i){},e.prototype.closeNode=function(e,t,i){},e.prototype.openAttribute=function(e,t,i){},e.prototype.closeAttribute=function(e,t,i){},e}()}).call(this)},9665(e,t,i){(function(){var t,n,r,o,s,a,c,l,u,h;h=i(9241),l=h.assign,u=h.isFunction,r=i(7260),o=i(1933),s=i(400),c=i(382),a=i(6775),t=i(1737),n=i(8753),e.exports.create=function(e,t,i,n){var r,s;if(null==e)throw new Error("Root element needs a name.");return n=l({},t,i,n),s=(r=new o(n)).element(e),n.headless||(r.declaration(n),null==n.pubID&&null==n.sysID||r.dtd(n)),s},e.exports.begin=function(e,t,i){var n;return u(e)&&(t=(n=[e,t])[0],i=n[1],e={}),t?new s(e,t,i):new o(e)},e.exports.stringWriter=function(e){return new c(e)},e.exports.streamWriter=function(e,t){return new a(e,t)},e.exports.implementation=new r,e.exports.nodeType=t,e.exports.writerState=n}).call(this)},1424(e){e.exports="1.25.5"},5317(e){"use strict";e.exports=require("child_process")},4236(e){"use strict";e.exports=require("console")},6982(e){"use strict";e.exports=require("crypto")},4434(e){"use strict";e.exports=require("events")},9896(e){"use strict";e.exports=require("fs")},9278(e){"use strict";e.exports=require("net")},8474(e){"use strict";e.exports=require("node:events")},3024(e){"use strict";e.exports=require("node:fs")},1455(e){"use strict";e.exports=require("node:fs/promises")},6760(e){"use strict";e.exports=require("node:path")},7075(e){"use strict";e.exports=require("node:stream")},6193(e){"use strict";e.exports=require("node:string_decoder")},3136(e){"use strict";e.exports=require("node:url")},7975(e){"use strict";e.exports=require("node:util")},857(e){"use strict";e.exports=require("os")},6928(e){"use strict";e.exports=require("path")},2203(e){"use strict";e.exports=require("stream")},5938(e){"use strict";e.exports=require("timers")},7016(e){"use strict";e.exports=require("url")},9023(e){"use strict";e.exports=require("util")},878(e,t){"use strict";t.y=t.balanced=void 0,t.balanced=(e,n,r)=>{const o=e instanceof RegExp?i(e,r):e,s=n instanceof RegExp?i(n,r):n,a=null!==o&&null!=s&&(0,t.y)(o,s,r);return a&&{start:a[0],end:a[1],pre:r.slice(0,a[0]),body:r.slice(a[0]+o.length,a[1]),post:r.slice(a[1]+s.length)}};const i=(e,t)=>{const i=t.match(e);return i?i[0]:null};t.y=(e,t,i)=>{let n,r,o,s,a,c=i.indexOf(e),l=i.indexOf(t,c+1),u=c;if(c>=0&&l>0){if(e===t)return[c,l];for(n=[],o=i.length;u>=0&&!a;){if(u===c)n.push(u),c=i.indexOf(e,u+1);else if(1===n.length){const e=n.pop();void 0!==e&&(a=[e,l])}else r=n.pop(),void 0!==r&&r<o&&(o=r,s=l),l=i.indexOf(t,u+1);u=c<l&&c>=0?c:l}n.length&&void 0!==s&&(a=[o,s])}return a}},305(e,t,i){"use strict";t.M9=t.T4=void 0,t.expand=function(e,i={}){if(!e)return[];const{max:n=t.T4,maxLength:l=t.M9}=i;return"{}"===e.slice(0,2)&&(e="\\{\\}"+e.slice(2)),P(function(e){return e.replace(f,r).replace(g,o).replace(m,s).replace(y,a).replace(v,c)}(e),n,l,!0).map(b)};const n=i(878),r="\0SLASH"+Math.random()+"\0",o="\0OPEN"+Math.random()+"\0",s="\0CLOSE"+Math.random()+"\0",a="\0COMMA"+Math.random()+"\0",c="\0PERIOD"+Math.random()+"\0",l=new RegExp(r,"g"),u=new RegExp(o,"g"),h=new RegExp(s,"g"),d=new RegExp(a,"g"),p=new RegExp(c,"g"),f=/\\\\/g,g=/\\{/g,m=/\\}/g,y=/\\,/g,v=/\\\./g;function _(e){return isNaN(e)?e.charCodeAt(0):parseInt(e,10)}function b(e){return e.replace(l,"\\").replace(u,"{").replace(h,"}").replace(d,",").replace(p,".")}function w(e){if(!e)return[""];const t=[],i=(0,n.balanced)("{","}",e);if(!i)return e.split(",");const{pre:r,body:o,post:s}=i,a=r.split(",");a[a.length-1]+="{"+o+"}";const c=w(s);return s.length&&(a[a.length-1]+=c.shift(),a.push.apply(a,c)),t.push.apply(t,a),t}function D(e){return"{"+e+"}"}function T(e){return/^-?0\d/.test(e)}function S(e,t){return e<=t}function C(e,t){return e>=t}function R(e,t,i,n,r,o){const s=[];let a=0;for(let c=0;c<e.length;c++)for(let l=0;l<i.length;l++){if(s.length>=n)return s;const u=e[c]+t+i[l];if(!o||u){if(a+u.length>r)return s;s.push(u),a+=u.length}}return s}function E(e,t,i){const n=e.split(/\.\./),r=[];if(void 0===n[0]||void 0===n[1])return r;const o=_(n[0]),s=_(n[1]),a=Math.max(n[0].length,n[1].length);let c=3===n.length&&void 0!==n[2]?Math.max(Math.abs(_(n[2])),1):1,l=S;s<o&&(c*=-1,l=C);const u=n.some(T);for(let e=o;l(e,s)&&r.length<i;e+=c){let i;if(t)i=String.fromCharCode(e),"\\"===i&&(i="");else if(i=String(e),u){const t=a-i.length;if(t>0){const n=new Array(t+1).join("0");i=e<0?"-"+n+i.slice(1):n+i}}r.push(i)}return r}function P(e,t,i,r){let o=[""],a=!1,c=!0;for(;;){const l=(0,n.balanced)("{","}",e);if(!l)return R(o,e,[""],t,i,a);const u=l.pre;if(/\$$/.test(u)){if(o=R(o,u+"{"+l.body+"}",[""],t,i,a&&!l.post.length),c=!1,!l.post.length)break;e=l.post;continue}const h=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(l.body),d=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(l.body),p=h||d,f=l.body.indexOf(",")>=0;if(!p&&!f){if(l.post.match(/,(?!,).*\}/)){e=l.pre+"{"+l.body+s+l.post,r=!0;continue}return R(o,u+"{"+l.body+"}"+l.post,[""],t,i,a)}let g;if(c&&(a=r&&!p,c=!1),p)g=E(l.body,d,t);else{let n=w(l.body);if(1===n.length&&void 0!==n[0]&&(n=P(n[0],t,i,!1).map(D),1===n.length)){if(o=R(o,u+n[0],[""],t,i,a&&!l.post.length),!l.post.length)break;e=l.post;continue}g=[];for(let e=0;e<n.length;e++)g.push.apply(g,P(n[e],t,i,!1))}if(o=R(o,u,g,t,i,a&&!l.post.length),!l.post.length)break;e=l.post}return o}t.T4=1e5,t.M9=4e6},8862(e,t,i){"use strict";var n=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),r=n(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.range=e.balanced=void 0,e.balanced=(i,n,r)=>{let o=i instanceof RegExp?t(i,r):i,s=n instanceof RegExp?t(n,r):n,a=null!==o&&null!=s&&(0,e.range)(o,s,r);return a&&{start:a[0],end:a[1],pre:r.slice(0,a[0]),body:r.slice(a[0]+o.length,a[1]),post:r.slice(a[1]+s.length)}};var t=(e,t)=>{let i=t.match(e);return i?i[0]:null};e.range=(e,t,i)=>{let n,r,o,s,a,c=i.indexOf(e),l=i.indexOf(t,c+1),u=c;if(c>=0&&l>0){if(e===t)return[c,l];for(n=[],o=i.length;u>=0&&!a;){if(u===c)n.push(u),c=i.indexOf(e,u+1);else if(1===n.length){let e=n.pop();void 0!==e&&(a=[e,l])}else r=n.pop(),void 0!==r&&r<o&&(o=r,s=l),l=i.indexOf(t,u+1);u=c<l&&c>=0?c:l}n.length&&void 0!==s&&(a=[o,s])}return a}}),o=n(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.EXPANSION_MAX=void 0,e.expand=function(t,r={}){if(!t)return[];let{max:c=e.EXPANSION_MAX}=r;return"{}"===t.slice(0,2)&&(t="\\{\\}"+t.slice(2)),C(function(e){return e.replace(p,i).replace(f,n).replace(g,o).replace(m,s).replace(y,a)}(t),c,!0).map(_)};var t=r(),i="\0SLASH"+Math.random()+"\0",n="\0OPEN"+Math.random()+"\0",o="\0CLOSE"+Math.random()+"\0",s="\0COMMA"+Math.random()+"\0",a="\0PERIOD"+Math.random()+"\0",c=new RegExp(i,"g"),l=new RegExp(n,"g"),u=new RegExp(o,"g"),h=new RegExp(s,"g"),d=new RegExp(a,"g"),p=/\\\\/g,f=/\\{/g,g=/\\}/g,m=/\\,/g,y=/\\./g;function v(e){return isNaN(e)?e.charCodeAt(0):parseInt(e,10)}function _(e){return e.replace(c,"\\").replace(l,"{").replace(u,"}").replace(h,",").replace(d,".")}function b(e){if(!e)return[""];let i=[],n=(0,t.balanced)("{","}",e);if(!n)return e.split(",");let{pre:r,body:o,post:s}=n,a=r.split(",");a[a.length-1]+="{"+o+"}";let c=b(s);return s.length&&(a[a.length-1]+=c.shift(),a.push.apply(a,c)),i.push.apply(i,a),i}function w(e){return"{"+e+"}"}function D(e){return/^-?0\d/.test(e)}function T(e,t){return e<=t}function S(e,t){return e>=t}function C(e,i,n){let r=[],s=(0,t.balanced)("{","}",e);if(!s)return[e];let a=s.pre,c=s.post.length?C(s.post,i,!1):[""];if(/\$$/.test(s.pre))for(let e=0;e<c.length&&e<i;e++){let t=a+"{"+s.body+"}"+c[e];r.push(t)}else{let t,l,u=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(s.body),h=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(s.body),d=u||h,p=s.body.indexOf(",")>=0;if(!d&&!p)return s.post.match(/,(?!,).*\}/)?C(e=s.pre+"{"+s.body+o+s.post,i,!0):[e];if(d)t=s.body.split(/\.\./);else if(t=b(s.body),1===t.length&&void 0!==t[0]&&(t=C(t[0],i,!1).map(w),1===t.length))return c.map(e=>s.pre+t[0]+e);if(d&&void 0!==t[0]&&void 0!==t[1]){let e=v(t[0]),i=v(t[1]),n=Math.max(t[0].length,t[1].length),r=3===t.length&&void 0!==t[2]?Math.abs(v(t[2])):1,o=T;i<e&&(r*=-1,o=S);let s=t.some(D);l=[];for(let t=e;o(t,i);t+=r){let e;if(h)e=String.fromCharCode(t),"\\"===e&&(e="");else if(e=String(t),s){let i=n-e.length;if(i>0){let n=new Array(i+1).join("0");e=t<0?"-"+n+e.slice(1):n+e}}l.push(e)}}else{l=[];for(let e=0;e<t.length;e++)l.push.apply(l,C(t[e],i,!1))}for(let e=0;e<l.length;e++)for(let t=0;t<c.length&&r.length<i;t++){let i=a+l[e]+c[t];(!n||d||i)&&r.push(i)}}return r}e.EXPANSION_MAX=1e5}),s=n(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.assertValidPattern=void 0,e.assertValidPattern=e=>{if("string"!=typeof e)throw new TypeError("invalid pattern");if(e.length>65536)throw new TypeError("pattern is too long")}}),a=n(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.parseClass=void 0;var t={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},i=e=>e.replace(/[[\]\\-]/g,"\\$&"),n=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),r=e=>e.join("");e.parseClass=(e,o)=>{let s=o;if("["!==e.charAt(s))throw new Error("not in a brace expression");let a=[],c=[],l=s+1,u=!1,h=!1,d=!1,p=!1,f=s,g="";e:for(;l<e.length;){let n=e.charAt(l);if("!"!==n&&"^"!==n||l!==s+1){if("]"===n&&u&&!d){f=l+1;break}if(u=!0,"\\"!==n||d){if("["===n&&!d)for(let[i,[n,r,o]]of Object.entries(t))if(e.startsWith(i,l)){if(g)return["$.",!1,e.length-s,!0];l+=i.length,o?c.push(n):a.push(n),h=h||r;continue e}d=!1,g?(n>g?a.push(i(g)+"-"+i(n)):n===g&&a.push(i(n)),g="",l++):e.startsWith("-]",l+1)?(a.push(i(n+"-")),l+=2):e.startsWith("-",l+1)?(g=n,l+=2):(a.push(i(n)),l++)}else d=!0,l++}else p=!0,l++}if(f<l)return["",!1,0,!1];if(!a.length&&!c.length)return["$.",!1,e.length-s,!0];if(0===c.length&&1===a.length&&/^\\?.$/.test(a[0])&&!p){let e=2===a[0].length?a[0].slice(-1):a[0];return[n(e),!1,f-s,!1]}let m="["+(p?"^":"")+r(a)+"]",y="["+(p?"":"^")+r(c)+"]";return[a.length&&c.length?"("+m+"|"+y+")":a.length?m:y,h,f-s,!0]}}),c=n(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.unescape=void 0,e.unescape=(e,{windowsPathsNoEscape:t=!1,magicalBraces:i=!0}={})=>i?t?e.replace(/\[([^\/\\])\]/g,"$1"):e.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1"):t?e.replace(/\[([^\/\\{}])\]/g,"$1"):e.replace(/((?!\\).|^)\[([^\/\\{}])\]/g,"$1$2").replace(/\\([^\/{}])/g,"$1")}),l=n(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.AST=void 0;var t=a(),i=c(),n=new Set(["!","?","+","*","@"]),r=e=>n.has(e),o="(?!\\.)",s=new Set(["[","."]),l=new Set(["..","."]),u=new Set("().*{}+?[]^$\\!"),h=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),d="[^/]",p=d+"*?",f=d+"+?";e.AST=class e{type;#e;#t;#i=!1;#n=[];#r;#o;#s;#a=!1;#c;#l;#u=!1;constructor(e,t,i={}){this.type=e,e&&(this.#t=!0),this.#r=t,this.#e=this.#r?this.#r.#e:this,this.#c=this.#e===this?i:this.#e.#c,this.#s=this.#e===this?[]:this.#e.#s,"!"===e&&!this.#e.#a&&this.#s.push(this),this.#o=this.#r?this.#r.#n.length:0}get hasMagic(){if(void 0!==this.#t)return this.#t;for(let e of this.#n)if("string"!=typeof e&&(e.type||e.hasMagic))return this.#t=!0;return this.#t}toString(){return void 0!==this.#l?this.#l:this.type?this.#l=this.type+"("+this.#n.map(e=>String(e)).join("|")+")":this.#l=this.#n.map(e=>String(e)).join("")}#h(){if(this!==this.#e)throw new Error("should only call on root");if(this.#a)return this;let e;for(this.toString(),this.#a=!0;e=this.#s.pop();){if("!"!==e.type)continue;let t=e,i=t.#r;for(;i;){for(let n=t.#o+1;!i.type&&n<i.#n.length;n++)for(let t of e.#n){if("string"==typeof t)throw new Error("string part in extglob AST??");t.copyIn(i.#n[n])}t=i,i=t.#r}}return this}push(...t){for(let i of t)if(""!==i){if("string"!=typeof i&&!(i instanceof e&&i.#r===this))throw new Error("invalid part: "+i);this.#n.push(i)}}toJSON(){let e=null===this.type?this.#n.slice().map(e=>"string"==typeof e?e:e.toJSON()):[this.type,...this.#n.map(e=>e.toJSON())];return this.isStart()&&!this.type&&e.unshift([]),this.isEnd()&&(this===this.#e||this.#e.#a&&"!"===this.#r?.type)&&e.push({}),e}isStart(){if(this.#e===this)return!0;if(!this.#r?.isStart())return!1;if(0===this.#o)return!0;let t=this.#r;for(let i=0;i<this.#o;i++){let n=t.#n[i];if(!(n instanceof e&&"!"===n.type))return!1}return!0}isEnd(){if(this.#e===this||"!"===this.#r?.type)return!0;if(!this.#r?.isEnd())return!1;if(!this.type)return this.#r?.isEnd();let e=this.#r?this.#r.#n.length:0;return this.#o===e-1}copyIn(e){"string"==typeof e?this.push(e):this.push(e.clone(this))}clone(t){let i=new e(this.type,t);for(let e of this.#n)i.copyIn(e);return i}static#d(t,i,n,o){let s=!1,a=!1,c=-1,l=!1;if(null===i.type){let u=n,h="";for(;u<t.length;){let n=t.charAt(u++);if(s||"\\"===n)s=!s,h+=n;else if(a)u===c+1?("^"===n||"!"===n)&&(l=!0):"]"===n&&!(u===c+2&&l)&&(a=!1),h+=n;else if("["!==n){if(!o.noext&&r(n)&&"("===t.charAt(u)){i.push(h),h="";let r=new e(n,i);u=e.#d(t,r,u,o),i.push(r);continue}h+=n}else a=!0,c=u,l=!1,h+=n}return i.push(h),u}let u=n+1,h=new e(null,i),d=[],p="";for(;u<t.length;){let n=t.charAt(u++);if(s||"\\"===n)s=!s,p+=n;else if(a)u===c+1?("^"===n||"!"===n)&&(l=!0):"]"===n&&!(u===c+2&&l)&&(a=!1),p+=n;else if("["!==n){if(r(n)&&"("===t.charAt(u)){h.push(p),p="";let i=new e(n,h);h.push(i),u=e.#d(t,i,u,o);continue}if("|"!==n){if(")"===n)return""===p&&0===i.#n.length&&(i.#u=!0),h.push(p),p="",i.push(...d,h),u;p+=n}else h.push(p),p="",d.push(h),h=new e(null,i)}else a=!0,c=u,l=!1,p+=n}return i.type=null,i.#t=void 0,i.#n=[t.substring(n-1)],u}static fromGlob(t,i={}){let n=new e(null,void 0,i);return e.#d(t,n,0,i),n}toMMPattern(){if(this!==this.#e)return this.#e.toMMPattern();let e=this.toString(),[t,i,n,r]=this.toRegExpSource();if(!(n||this.#t||this.#c.nocase&&!this.#c.nocaseMagicOnly&&e.toUpperCase()!==e.toLowerCase()))return i;let o=(this.#c.nocase?"i":"")+(r?"u":"");return Object.assign(new RegExp(`^${t}$`,o),{_src:t,_glob:e})}get options(){return this.#c}toRegExpSource(t){let n=t??!!this.#c.dot;if(this.#e===this&&this.#h(),!this.type){let r=this.isStart()&&this.isEnd()&&!this.#n.some(e=>"string"!=typeof e),a=this.#n.map(i=>{let[n,o,s,a]="string"==typeof i?e.#p(i,this.#t,r):i.toRegExpSource(t);return this.#t=this.#t||s,this.#i=this.#i||a,n}).join(""),c="";if(this.isStart()&&"string"==typeof this.#n[0]&&(1!==this.#n.length||!l.has(this.#n[0]))){let e=s,i=n&&e.has(a.charAt(0))||a.startsWith("\\.")&&e.has(a.charAt(2))||a.startsWith("\\.\\.")&&e.has(a.charAt(4)),r=!n&&!t&&e.has(a.charAt(0));c=i?"(?!(?:^|/)\\.\\.?(?:$|/))":r?o:""}let u="";return this.isEnd()&&this.#e.#a&&"!"===this.#r?.type&&(u="(?:$|\\/)"),[c+a+u,(0,i.unescape)(a),this.#t=!!this.#t,this.#i]}let r="*"===this.type||"+"===this.type,a="!"===this.type?"(?:(?!(?:":"(?:",c=this.#f(n);if(this.isStart()&&this.isEnd()&&!c&&"!"!==this.type){let e=this.toString();return this.#n=[e],this.type=null,this.#t=void 0,[e,(0,i.unescape)(this.toString()),!1,!1]}let u=!r||t||n?"":this.#f(!0);u===c&&(u=""),u&&(c=`(?:${c})(?:${u})*?`);let h="";return h="!"===this.type&&this.#u?(this.isStart()&&!n?o:"")+f:a+c+("!"===this.type?"))"+(!this.isStart()||n||t?"":o)+p+")":"@"===this.type?")":"?"===this.type?")?":"+"===this.type&&u?")":"*"===this.type&&u?")?":`)${this.type}`),[h,(0,i.unescape)(c),this.#t=!!this.#t,this.#i]}#f(e){return this.#n.map(t=>{if("string"==typeof t)throw new Error("string type in extglob ast??");let[i,n,r,o]=t.toRegExpSource(e);return this.#i=this.#i||o,i}).filter(e=>!(this.isStart()&&this.isEnd()&&!e)).join("|")}static#p(e,n,r=!1){let o=!1,s="",a=!1,c=!1;for(let i=0;i<e.length;i++){let l=e.charAt(i);if(o)o=!1,s+=(u.has(l)?"\\":"")+l;else if("*"!==l)if(c=!1,"\\"!==l){if("["===l){let[r,o,c,l]=(0,t.parseClass)(e,i);if(c){s+=r,a=a||o,i+=c-1,n=n||l;continue}}"?"!==l?s+=h(l):(s+=d,n=!0)}else i===e.length-1?s+="\\\\":o=!0;else{if(c)continue;c=!0,s+=r&&/^[*]+$/.test(e)?f:p,n=!0}}return[s,(0,i.unescape)(e),!!n,a]}}}),u=n(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.escape=void 0,e.escape=(e,{windowsPathsNoEscape:t=!1,magicalBraces:i=!1}={})=>i?t?e.replace(/[?*()[\]{}]/g,"[$&]"):e.replace(/[?*()[\]\\{}]/g,"\\$&"):t?e.replace(/[?*()[\]]/g,"[$&]"):e.replace(/[?*()[\]\\]/g,"\\$&")}),h=n(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.unescape=e.escape=e.AST=e.Minimatch=e.match=e.makeRe=e.braceExpand=e.defaults=e.filter=e.GLOBSTAR=e.sep=e.minimatch=void 0;var t=o(),i=s(),n=l(),r=u(),a=c();e.minimatch=(e,t,n={})=>((0,i.assertValidPattern)(t),!(!n.nocomment&&"#"===t.charAt(0))&&new M(t,n).match(e));var h=/^\*+([^+@!?\*\[\(]*)$/,d=e=>t=>!t.startsWith(".")&&t.endsWith(e),p=e=>t=>t.endsWith(e),f=e=>(e=e.toLowerCase(),t=>!t.startsWith(".")&&t.toLowerCase().endsWith(e)),g=e=>(e=e.toLowerCase(),t=>t.toLowerCase().endsWith(e)),m=/^\*+\.\*+$/,y=e=>!e.startsWith(".")&&e.includes("."),v=e=>"."!==e&&".."!==e&&e.includes("."),_=/^\.\*+$/,b=e=>"."!==e&&".."!==e&&e.startsWith("."),w=/^\*+$/,D=e=>0!==e.length&&!e.startsWith("."),T=e=>0!==e.length&&"."!==e&&".."!==e,S=/^\?+([^+@!?\*\[\(]*)?$/,C=([e,t=""])=>{let i=x([e]);return t?(t=t.toLowerCase(),e=>i(e)&&e.toLowerCase().endsWith(t)):i},R=([e,t=""])=>{let i=O([e]);return t?(t=t.toLowerCase(),e=>i(e)&&e.toLowerCase().endsWith(t)):i},E=([e,t=""])=>{let i=O([e]);return t?e=>i(e)&&e.endsWith(t):i},P=([e,t=""])=>{let i=x([e]);return t?e=>i(e)&&e.endsWith(t):i},x=([e])=>{let t=e.length;return e=>e.length===t&&!e.startsWith(".")},O=([e])=>{let t=e.length;return e=>e.length===t&&"."!==e&&".."!==e},k="object"==typeof process&&process?"object"==typeof process.env&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix";e.sep="win32"===k?"\\":"/",e.minimatch.sep=e.sep,e.GLOBSTAR=Symbol("globstar **"),e.minimatch.GLOBSTAR=e.GLOBSTAR,e.filter=(t,i={})=>n=>(0,e.minimatch)(n,t,i),e.minimatch.filter=e.filter;var N=(e,t={})=>Object.assign({},e,t);e.defaults=t=>{if(!t||"object"!=typeof t||!Object.keys(t).length)return e.minimatch;let i=e.minimatch;return Object.assign((e,n,r={})=>i(e,n,N(t,r)),{Minimatch:class extends i.Minimatch{constructor(e,i={}){super(e,N(t,i))}static defaults(e){return i.defaults(N(t,e)).Minimatch}},AST:class extends i.AST{constructor(e,i,n={}){super(e,i,N(t,n))}static fromGlob(e,n={}){return i.AST.fromGlob(e,N(t,n))}},unescape:(e,n={})=>i.unescape(e,N(t,n)),escape:(e,n={})=>i.escape(e,N(t,n)),filter:(e,n={})=>i.filter(e,N(t,n)),defaults:e=>i.defaults(N(t,e)),makeRe:(e,n={})=>i.makeRe(e,N(t,n)),braceExpand:(e,n={})=>i.braceExpand(e,N(t,n)),match:(e,n,r={})=>i.match(e,n,N(t,r)),sep:i.sep,GLOBSTAR:e.GLOBSTAR})},e.minimatch.defaults=e.defaults,e.braceExpand=(e,n={})=>((0,i.assertValidPattern)(e),n.nobrace||!/\{(?:(?!\{).)*\}/.test(e)?[e]:(0,t.expand)(e,{max:n.braceExpandMax})),e.minimatch.braceExpand=e.braceExpand,e.makeRe=(e,t={})=>new M(e,t).makeRe(),e.minimatch.makeRe=e.makeRe,e.match=(e,t,i={})=>{let n=new M(t,i);return e=e.filter(e=>n.match(e)),n.options.nonull&&!e.length&&e.push(t),e},e.minimatch.match=e.match;var A=/[?*]|[+@!]\(.*?\)|\[|\]/,M=class{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;regexp;constructor(e,t={}){(0,i.assertValidPattern)(e),t=t||{},this.options=t,this.pattern=e,this.platform=t.platform||k,this.isWindows="win32"===this.platform,this.windowsPathsNoEscape=!!t.windowsPathsNoEscape||!1===t.allowWindowsEscape,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!t.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!t.nonegate,this.comment=!1,this.empty=!1,this.partial=!!t.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=void 0!==t.windowsNoMagicRoot?t.windowsNoMagicRoot:!(!this.isWindows||!this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(let e of this.set)for(let t of e)if("string"!=typeof t)return!0;return!1}debug(...e){}make(){let e=this.pattern,t=this.options;if(!t.nocomment&&"#"===e.charAt(0))return void(this.comment=!0);if(!e)return void(this.empty=!0);this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],t.debug&&(this.debug=(...e)=>console.error(...e)),this.debug(this.pattern,this.globSet);let i=this.globSet.map(e=>this.slashSplit(e));this.globParts=this.preprocess(i),this.debug(this.pattern,this.globParts);let n=this.globParts.map((e,t,i)=>{if(this.isWindows&&this.windowsNoMagicRoot){let t=!(""!==e[0]||""!==e[1]||"?"!==e[2]&&A.test(e[2])||A.test(e[3])),i=/^[a-z]:/i.test(e[0]);if(t)return[...e.slice(0,4),...e.slice(4).map(e=>this.parse(e))];if(i)return[e[0],...e.slice(1).map(e=>this.parse(e))]}return e.map(e=>this.parse(e))});if(this.debug(this.pattern,n),this.set=n.filter(e=>-1===e.indexOf(!1)),this.isWindows)for(let e=0;e<this.set.length;e++){let t=this.set[e];""===t[0]&&""===t[1]&&"?"===this.globParts[e][2]&&"string"==typeof t[3]&&/^[a-z]:$/i.test(t[3])&&(t[2]="?")}this.debug(this.pattern,this.set)}preprocess(e){if(this.options.noglobstar)for(let t=0;t<e.length;t++)for(let i=0;i<e[t].length;i++)"**"===e[t][i]&&(e[t][i]="*");let{optimizationLevel:t=1}=this.options;return t>=2?(e=this.firstPhasePreProcess(e),e=this.secondPhasePreProcess(e)):e=t>=1?this.levelOneOptimize(e):this.adjascentGlobstarOptimize(e),e}adjascentGlobstarOptimize(e){return e.map(e=>{let t=-1;for(;-1!==(t=e.indexOf("**",t+1));){let i=t;for(;"**"===e[i+1];)i++;i!==t&&e.splice(t,i-t)}return e})}levelOneOptimize(e){return e.map(e=>0===(e=e.reduce((e,t)=>{let i=e[e.length-1];return"**"===t&&"**"===i?e:".."===t&&i&&".."!==i&&"."!==i&&"**"!==i?(e.pop(),e):(e.push(t),e)},[])).length?[""]:e)}levelTwoFileOptimize(e){Array.isArray(e)||(e=this.slashSplit(e));let t=!1;do{if(t=!1,!this.preserveMultipleSlashes){for(let i=1;i<e.length-1;i++){let n=e[i];1===i&&""===n&&""===e[0]||("."===n||""===n)&&(t=!0,e.splice(i,1),i--)}"."===e[0]&&2===e.length&&("."===e[1]||""===e[1])&&(t=!0,e.pop())}let i=0;for(;-1!==(i=e.indexOf("..",i+1));){let n=e[i-1];n&&"."!==n&&".."!==n&&"**"!==n&&(t=!0,e.splice(i-1,2),i-=2)}}while(t);return 0===e.length?[""]:e}firstPhasePreProcess(e){let t=!1;do{t=!1;for(let i of e){let n=-1;for(;-1!==(n=i.indexOf("**",n+1));){let r=n;for(;"**"===i[r+1];)r++;r>n&&i.splice(n+1,r-n);let o=i[n+1],s=i[n+2],a=i[n+3];if(".."!==o||!s||"."===s||".."===s||!a||"."===a||".."===a)continue;t=!0,i.splice(n,1);let c=i.slice(0);c[n]="**",e.push(c),n--}if(!this.preserveMultipleSlashes){for(let e=1;e<i.length-1;e++){let n=i[e];1===e&&""===n&&""===i[0]||("."===n||""===n)&&(t=!0,i.splice(e,1),e--)}"."===i[0]&&2===i.length&&("."===i[1]||""===i[1])&&(t=!0,i.pop())}let r=0;for(;-1!==(r=i.indexOf("..",r+1));){let e=i[r-1];if(e&&"."!==e&&".."!==e&&"**"!==e){t=!0;let e=1===r&&"**"===i[r+1]?["."]:[];i.splice(r-1,2,...e),0===i.length&&i.push(""),r-=2}}}}while(t);return e}secondPhasePreProcess(e){for(let t=0;t<e.length-1;t++)for(let i=t+1;i<e.length;i++){let n=this.partsMatch(e[t],e[i],!this.preserveMultipleSlashes);if(n){e[t]=[],e[i]=n;break}}return e.filter(e=>e.length)}partsMatch(e,t,i=!1){let n=0,r=0,o=[],s="";for(;n<e.length&&r<t.length;)if(e[n]===t[r])o.push("b"===s?t[r]:e[n]),n++,r++;else if(i&&"**"===e[n]&&t[r]===e[n+1])o.push(e[n]),n++;else if(i&&"**"===t[r]&&e[n]===t[r+1])o.push(t[r]),r++;else if("*"!==e[n]||!t[r]||!this.options.dot&&t[r].startsWith(".")||"**"===t[r]){if("*"!==t[r]||!e[n]||!this.options.dot&&e[n].startsWith(".")||"**"===e[n])return!1;if("a"===s)return!1;s="b",o.push(t[r]),n++,r++}else{if("b"===s)return!1;s="a",o.push(e[n]),n++,r++}return e.length===t.length&&o}parseNegate(){if(this.nonegate)return;let e=this.pattern,t=!1,i=0;for(let n=0;n<e.length&&"!"===e.charAt(n);n++)t=!t,i++;i&&(this.pattern=e.slice(i)),this.negate=t}matchOne(t,i,n=!1){let r=this.options;if(this.isWindows){let e="string"==typeof t[0]&&/^[a-z]:$/i.test(t[0]),n=!e&&""===t[0]&&""===t[1]&&"?"===t[2]&&/^[a-z]:$/i.test(t[3]),r="string"==typeof i[0]&&/^[a-z]:$/i.test(i[0]),o=n?3:e?0:void 0,s=!r&&""===i[0]&&""===i[1]&&"?"===i[2]&&"string"==typeof i[3]&&/^[a-z]:$/i.test(i[3])?3:r?0:void 0;if("number"==typeof o&&"number"==typeof s){let[e,n]=[t[o],i[s]];e.toLowerCase()===n.toLowerCase()&&(i[s]=e,s>o?i=i.slice(s):o>s&&(t=t.slice(o)))}}let{optimizationLevel:o=1}=this.options;o>=2&&(t=this.levelTwoFileOptimize(t)),this.debug("matchOne",this,{file:t,pattern:i}),this.debug("matchOne",t.length,i.length);for(var s=0,a=0,c=t.length,l=i.length;s<c&&a<l;s++,a++){this.debug("matchOne loop");var u=i[a],h=t[s];if(this.debug(i,u,h),!1===u)return!1;if(u===e.GLOBSTAR){this.debug("GLOBSTAR",[i,u,h]);var d=s,p=a+1;if(p===l){for(this.debug("** at the end");s<c;s++)if("."===t[s]||".."===t[s]||!r.dot&&"."===t[s].charAt(0))return!1;return!0}for(;d<c;){var f=t[d];if(this.debug("\nglobstar while",t,d,i,p,f),this.matchOne(t.slice(d),i.slice(p),n))return this.debug("globstar found match!",d,c,f),!0;if("."===f||".."===f||!r.dot&&"."===f.charAt(0)){this.debug("dot detected!",t,d,i,p);break}this.debug("globstar swallow a segment, and continue"),d++}return!(!n||(this.debug("\n>>> no match, partial?",t,d,i,p),d!==c))}let o;if("string"==typeof u?(o=h===u,this.debug("string match",u,h,o)):(o=u.test(h),this.debug("pattern match",u,h,o)),!o)return!1}if(s===c&&a===l)return!0;if(s===c)return n;if(a===l)return s===c-1&&""===t[s];throw new Error("wtf?")}braceExpand(){return(0,e.braceExpand)(this.pattern,this.options)}parse(t){(0,i.assertValidPattern)(t);let r=this.options;if("**"===t)return e.GLOBSTAR;if(""===t)return"";let o,s=null;(o=t.match(w))?s=r.dot?T:D:(o=t.match(h))?s=(r.nocase?r.dot?g:f:r.dot?p:d)(o[1]):(o=t.match(S))?s=(r.nocase?r.dot?R:C:r.dot?E:P)(o):(o=t.match(m))?s=r.dot?v:y:(o=t.match(_))&&(s=b);let a=n.AST.fromGlob(t,this.options).toMMPattern();return s&&"object"==typeof a&&Reflect.defineProperty(a,"test",{value:s}),a}makeRe(){if(this.regexp||!1===this.regexp)return this.regexp;let t=this.set;if(!t.length)return this.regexp=!1,this.regexp;let i=this.options,n=i.noglobstar?"[^/]*?":i.dot?"(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?":"(?:(?!(?:\\/|^)\\.).)*?",r=new Set(i.nocase?["i"]:[]),o=t.map(t=>{let i=t.map(t=>{if(t instanceof RegExp)for(let e of t.flags.split(""))r.add(e);return"string"==typeof t?t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"):t===e.GLOBSTAR?e.GLOBSTAR:t._src});i.forEach((t,r)=>{let o=i[r+1],s=i[r-1];t!==e.GLOBSTAR||s===e.GLOBSTAR||(void 0===s?void 0!==o&&o!==e.GLOBSTAR?i[r+1]="(?:\\/|"+n+"\\/)?"+o:i[r]=n:void 0===o?i[r-1]=s+"(?:\\/|\\/"+n+")?":o!==e.GLOBSTAR&&(i[r-1]=s+"(?:\\/|\\/"+n+"\\/)"+o,i[r+1]=e.GLOBSTAR))});let o=i.filter(t=>t!==e.GLOBSTAR);if(this.partial&&o.length>=1){let e=[];for(let t=1;t<=o.length;t++)e.push(o.slice(0,t).join("/"));return"(?:"+e.join("|")+")"}return o.join("/")}).join("|"),[s,a]=t.length>1?["(?:",")"]:["",""];o="^"+s+o+a+"$",this.partial&&(o="^(?:\\/|"+s+o.slice(1,-1)+a+")$"),this.negate&&(o="^(?!"+o+").+$");try{this.regexp=new RegExp(o,[...r].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(e){return this.preserveMultipleSlashes?e.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(e)?["",...e.split(/\/+/)]:e.split(/\/+/)}match(e,t=this.partial){if(this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return""===e;if("/"===e&&t)return!0;let i=this.options;this.isWindows&&(e=e.split("\\").join("/"));let n=this.slashSplit(e);this.debug(this.pattern,"split",n);let r=this.set;this.debug(this.pattern,"set",r);let o=n[n.length-1];if(!o)for(let e=n.length-2;!o&&e>=0;e--)o=n[e];for(let e=0;e<r.length;e++){let s=r[e],a=n;if(i.matchBase&&1===s.length&&(a=[o]),this.matchOne(a,s,t))return!!i.flipNegate||!this.negate}return!i.flipNegate&&this.negate}static defaults(t){return e.minimatch.defaults(t).Minimatch}};e.Minimatch=M;var I=l();Object.defineProperty(e,"AST",{enumerable:!0,get:function(){return I.AST}});var q=u();Object.defineProperty(e,"escape",{enumerable:!0,get:function(){return q.escape}});var j=c();Object.defineProperty(e,"unescape",{enumerable:!0,get:function(){return j.unescape}}),e.minimatch.AST=n.AST,e.minimatch.Minimatch=M,e.minimatch.escape=r.escape,e.minimatch.unescape=a.unescape}),d=n(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.LRUCache=void 0;var t="object"==typeof performance&&performance&&"function"==typeof performance.now?performance:Date,i=new Set,n="object"==typeof process&&process?process:{},r=(e,t,i,r)=>{"function"==typeof n.emitWarning?n.emitWarning(e,t,i,r):console.error(`[${i}] ${t}: ${e}`)},o=globalThis.AbortController,s=globalThis.AbortSignal;if(typeof o>"u"){s=class{onabort;_onabort=[];reason;aborted=!1;addEventListener(e,t){this._onabort.push(t)}},o=class{constructor(){t()}signal=new s;abort(e){if(!this.signal.aborted){this.signal.reason=e,this.signal.aborted=!0;for(let t of this.signal._onabort)t(e);this.signal.onabort?.(e)}}};let e="1"!==n.env?.LRU_CACHE_IGNORE_AC_WARNING,t=()=>{e&&(e=!1,r("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",t))}}var a=e=>e&&e===Math.floor(e)&&e>0&&isFinite(e),c=e=>a(e)?e<=Math.pow(2,8)?Uint8Array:e<=Math.pow(2,16)?Uint16Array:e<=Math.pow(2,32)?Uint32Array:e<=Number.MAX_SAFE_INTEGER?l:null:null,l=class extends Array{constructor(e){super(e),this.fill(0)}},u=class e{heap;length;static#e=!1;static create(t){let i=c(t);if(!i)return[];e.#e=!0;let n=new e(t,i);return e.#e=!1,n}constructor(t,i){if(!e.#e)throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new i(t),this.length=0}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}},h=class e{#e;#t;#i;#n;#r;#o;#s;#a;get perf(){return this.#a}ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#c;#l;#u;#h;#d;#f;#p;#g;#m;#y;#v;#_;#b;#w;#D;#T;#S;#C;#R;static unsafeExposeInternals(e){return{starts:e.#b,ttls:e.#w,autopurgeTimers:e.#D,sizes:e.#_,keyMap:e.#u,keyList:e.#h,valList:e.#d,next:e.#f,prev:e.#p,get head(){return e.#g},get tail(){return e.#m},free:e.#y,isBackgroundFetch:t=>e.#E(t),backgroundFetch:(t,i,n,r)=>e.#P(t,i,n,r),moveToTail:t=>e.#x(t),indexes:t=>e.#O(t),rindexes:t=>e.#k(t),isStale:t=>e.#N(t)}}get max(){return this.#e}get maxSize(){return this.#t}get calculatedSize(){return this.#l}get size(){return this.#c}get fetchMethod(){return this.#o}get memoMethod(){return this.#s}get dispose(){return this.#i}get onInsert(){return this.#n}get disposeAfter(){return this.#r}constructor(n){let{max:o=0,ttl:s,ttlResolution:l=1,ttlAutopurge:h,updateAgeOnGet:d,updateAgeOnHas:p,allowStale:f,dispose:g,onInsert:m,disposeAfter:y,noDisposeOnSet:v,noUpdateTTL:_,maxSize:b=0,maxEntrySize:w=0,sizeCalculation:D,fetchMethod:T,memoMethod:S,noDeleteOnFetchRejection:C,noDeleteOnStaleGet:R,allowStaleOnFetchRejection:E,allowStaleOnFetchAbort:P,ignoreFetchAbort:x,perf:O}=n;if(void 0!==O&&"function"!=typeof O?.now)throw new TypeError("perf option must have a now() method if specified");if(this.#a=O??t,0!==o&&!a(o))throw new TypeError("max option must be a nonnegative integer");let k=o?c(o):Array;if(!k)throw new Error("invalid max value: "+o);if(this.#e=o,this.#t=b,this.maxEntrySize=w||this.#t,this.sizeCalculation=D,this.sizeCalculation){if(!this.#t&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if("function"!=typeof this.sizeCalculation)throw new TypeError("sizeCalculation set to non-function")}if(void 0!==S&&"function"!=typeof S)throw new TypeError("memoMethod must be a function if defined");if(this.#s=S,void 0!==T&&"function"!=typeof T)throw new TypeError("fetchMethod must be a function if specified");if(this.#o=T,this.#S=!!T,this.#u=new Map,this.#h=new Array(o).fill(void 0),this.#d=new Array(o).fill(void 0),this.#f=new k(o),this.#p=new k(o),this.#g=0,this.#m=0,this.#y=u.create(o),this.#c=0,this.#l=0,"function"==typeof g&&(this.#i=g),"function"==typeof m&&(this.#n=m),"function"==typeof y?(this.#r=y,this.#v=[]):(this.#r=void 0,this.#v=void 0),this.#T=!!this.#i,this.#R=!!this.#n,this.#C=!!this.#r,this.noDisposeOnSet=!!v,this.noUpdateTTL=!!_,this.noDeleteOnFetchRejection=!!C,this.allowStaleOnFetchRejection=!!E,this.allowStaleOnFetchAbort=!!P,this.ignoreFetchAbort=!!x,0!==this.maxEntrySize){if(0!==this.#t&&!a(this.#t))throw new TypeError("maxSize must be a positive integer if specified");if(!a(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#A()}if(this.allowStale=!!f,this.noDeleteOnStaleGet=!!R,this.updateAgeOnGet=!!d,this.updateAgeOnHas=!!p,this.ttlResolution=a(l)||0===l?l:1,this.ttlAutopurge=!!h,this.ttl=s||0,this.ttl){if(!a(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#M()}if(0===this.#e&&0===this.ttl&&0===this.#t)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#e&&!this.#t){let t="LRU_CACHE_UNBOUNDED";N=t,!i.has(N)&&(i.add(t),r("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",t,e))}var N}getRemainingTTL(e){return this.#u.has(e)?1/0:0}#M(){let e=new l(this.#e),t=new l(this.#e);this.#w=e,this.#b=t;let i=this.ttlAutopurge?new Array(this.#e):void 0;this.#D=i,this.#I=(n,r,o=this.#a.now())=>{if(t[n]=0!==r?o:0,e[n]=r,i?.[n]&&(clearTimeout(i[n]),i[n]=void 0),0!==r&&i){let e=setTimeout(()=>{this.#N(n)&&this.#q(this.#h[n],"expire")},r+1);e.unref&&e.unref(),i[n]=e}},this.#j=i=>{t[i]=0!==e[i]?this.#a.now():0},this.#F=(i,o)=>{if(e[o]){let s=e[o],a=t[o];if(!s||!a)return;i.ttl=s,i.start=a,i.now=n||r();let c=i.now-a;i.remainingTTL=s-c}};let n=0,r=()=>{let e=this.#a.now();if(this.ttlResolution>0){n=e;let t=setTimeout(()=>n=0,this.ttlResolution);t.unref&&t.unref()}return e};this.getRemainingTTL=i=>{let o=this.#u.get(i);if(void 0===o)return 0;let s=e[o],a=t[o];return s&&a?s-((n||r())-a):1/0},this.#N=i=>{let o=t[i],s=e[i];return!!s&&!!o&&(n||r())-o>s}}#j=()=>{};#F=()=>{};#I=()=>{};#N=()=>!1;#A(){let e=new l(this.#e);this.#l=0,this.#_=e,this.#L=t=>{this.#l-=e[t],e[t]=0},this.#W=(e,t,i,n)=>{if(this.#E(t))return 0;if(!a(i)){if(!n)throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");if("function"!=typeof n)throw new TypeError("sizeCalculation must be a function");if(i=n(t,e),!a(i))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}return i},this.#U=(t,i,n)=>{if(e[t]=i,this.#t){let i=this.#t-e[t];for(;this.#l>i;)this.#B(!0)}this.#l+=e[t],n&&(n.entrySize=i,n.totalCalculatedSize=this.#l)}}#L=e=>{};#U=(e,t,i)=>{};#W=(e,t,i,n)=>{if(i||n)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#O({allowStale:e=this.allowStale}={}){if(this.#c)for(let t=this.#m;this.#$(t)&&((e||!this.#N(t))&&(yield t),t!==this.#g);)t=this.#p[t]}*#k({allowStale:e=this.allowStale}={}){if(this.#c)for(let t=this.#g;this.#$(t)&&((e||!this.#N(t))&&(yield t),t!==this.#m);)t=this.#f[t]}#$(e){return void 0!==e&&this.#u.get(this.#h[e])===e}*entries(){for(let e of this.#O())void 0!==this.#d[e]&&void 0!==this.#h[e]&&!this.#E(this.#d[e])&&(yield[this.#h[e],this.#d[e]])}*rentries(){for(let e of this.#k())void 0!==this.#d[e]&&void 0!==this.#h[e]&&!this.#E(this.#d[e])&&(yield[this.#h[e],this.#d[e]])}*keys(){for(let e of this.#O()){let t=this.#h[e];void 0!==t&&!this.#E(this.#d[e])&&(yield t)}}*rkeys(){for(let e of this.#k()){let t=this.#h[e];void 0!==t&&!this.#E(this.#d[e])&&(yield t)}}*values(){for(let e of this.#O())void 0!==this.#d[e]&&!this.#E(this.#d[e])&&(yield this.#d[e])}*rvalues(){for(let e of this.#k())void 0!==this.#d[e]&&!this.#E(this.#d[e])&&(yield this.#d[e])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(e,t={}){for(let i of this.#O()){let n=this.#d[i],r=this.#E(n)?n.__staleWhileFetching:n;if(void 0!==r&&e(r,this.#h[i],this))return this.get(this.#h[i],t)}}forEach(e,t=this){for(let i of this.#O()){let n=this.#d[i],r=this.#E(n)?n.__staleWhileFetching:n;void 0!==r&&e.call(t,r,this.#h[i],this)}}rforEach(e,t=this){for(let i of this.#k()){let n=this.#d[i],r=this.#E(n)?n.__staleWhileFetching:n;void 0!==r&&e.call(t,r,this.#h[i],this)}}purgeStale(){let e=!1;for(let t of this.#k({allowStale:!0}))this.#N(t)&&(this.#q(this.#h[t],"expire"),e=!0);return e}info(e){let t=this.#u.get(e);if(void 0===t)return;let i=this.#d[t],n=this.#E(i)?i.__staleWhileFetching:i;if(void 0===n)return;let r={value:n};if(this.#w&&this.#b){let e=this.#w[t],i=this.#b[t];if(e&&i){let t=e-(this.#a.now()-i);r.ttl=t,r.start=Date.now()}}return this.#_&&(r.size=this.#_[t]),r}dump(){let e=[];for(let t of this.#O({allowStale:!0})){let i=this.#h[t],n=this.#d[t],r=this.#E(n)?n.__staleWhileFetching:n;if(void 0===r||void 0===i)continue;let o={value:r};if(this.#w&&this.#b){o.ttl=this.#w[t];let e=this.#a.now()-this.#b[t];o.start=Math.floor(Date.now()-e)}this.#_&&(o.size=this.#_[t]),e.unshift([i,o])}return e}load(e){this.clear();for(let[t,i]of e){if(i.start){let e=Date.now()-i.start;i.start=this.#a.now()-e}this.set(t,i.value,i)}}set(e,t,i={}){if(void 0===t)return this.delete(e),this;let{ttl:n=this.ttl,start:r,noDisposeOnSet:o=this.noDisposeOnSet,sizeCalculation:s=this.sizeCalculation,status:a}=i,{noUpdateTTL:c=this.noUpdateTTL}=i,l=this.#W(e,t,i.size||0,s);if(this.maxEntrySize&&l>this.maxEntrySize)return a&&(a.set="miss",a.maxEntrySizeExceeded=!0),this.#q(e,"set"),this;let u=0===this.#c?void 0:this.#u.get(e);if(void 0===u)u=0===this.#c?this.#m:0!==this.#y.length?this.#y.pop():this.#c===this.#e?this.#B(!1):this.#c,this.#h[u]=e,this.#d[u]=t,this.#u.set(e,u),this.#f[this.#m]=u,this.#p[u]=this.#m,this.#m=u,this.#c++,this.#U(u,l,a),a&&(a.set="add"),c=!1,this.#R&&this.#n?.(t,e,"add");else{this.#x(u);let i=this.#d[u];if(t!==i){if(this.#S&&this.#E(i)){i.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:t}=i;void 0!==t&&!o&&(this.#T&&this.#i?.(t,e,"set"),this.#C&&this.#v?.push([t,e,"set"]))}else o||(this.#T&&this.#i?.(i,e,"set"),this.#C&&this.#v?.push([i,e,"set"]));if(this.#L(u),this.#U(u,l,a),this.#d[u]=t,a){a.set="replace";let e=i&&this.#E(i)?i.__staleWhileFetching:i;void 0!==e&&(a.oldValue=e)}}else a&&(a.set="update");this.#R&&this.onInsert?.(t,e,t===i?"update":"replace")}if(0!==n&&!this.#w&&this.#M(),this.#w&&(c||this.#I(u,n,r),a&&this.#F(a,u)),!o&&this.#C&&this.#v){let e,t=this.#v;for(;e=t?.shift();)this.#r?.(...e)}return this}pop(){try{for(;this.#c;){let e=this.#d[this.#g];if(this.#B(!0),this.#E(e)){if(e.__staleWhileFetching)return e.__staleWhileFetching}else if(void 0!==e)return e}}finally{if(this.#C&&this.#v){let e,t=this.#v;for(;e=t?.shift();)this.#r?.(...e)}}}#B(e){let t=this.#g,i=this.#h[t],n=this.#d[t];return this.#S&&this.#E(n)?n.__abortController.abort(new Error("evicted")):(this.#T||this.#C)&&(this.#T&&this.#i?.(n,i,"evict"),this.#C&&this.#v?.push([n,i,"evict"])),this.#L(t),this.#D?.[t]&&(clearTimeout(this.#D[t]),this.#D[t]=void 0),e&&(this.#h[t]=void 0,this.#d[t]=void 0,this.#y.push(t)),1===this.#c?(this.#g=this.#m=0,this.#y.length=0):this.#g=this.#f[t],this.#u.delete(i),this.#c--,t}has(e,t={}){let{updateAgeOnHas:i=this.updateAgeOnHas,status:n}=t,r=this.#u.get(e);if(void 0!==r){let e=this.#d[r];if(this.#E(e)&&void 0===e.__staleWhileFetching)return!1;if(!this.#N(r))return i&&this.#j(r),n&&(n.has="hit",this.#F(n,r)),!0;n&&(n.has="stale",this.#F(n,r))}else n&&(n.has="miss");return!1}peek(e,t={}){let{allowStale:i=this.allowStale}=t,n=this.#u.get(e);if(void 0===n||!i&&this.#N(n))return;let r=this.#d[n];return this.#E(r)?r.__staleWhileFetching:r}#P(e,t,i,n){let r=void 0===t?void 0:this.#d[t];if(this.#E(r))return r;let s=new o,{signal:a}=i;a?.addEventListener("abort",()=>s.abort(a.reason),{signal:s.signal});let c={signal:s.signal,options:i,context:n},l=(n,r=!1)=>{let{aborted:o}=s.signal,a=i.ignoreFetchAbort&&void 0!==n,l=i.ignoreFetchAbort||!(!i.allowStaleOnFetchAbort||void 0===n);if(i.status&&(o&&!r?(i.status.fetchAborted=!0,i.status.fetchError=s.signal.reason,a&&(i.status.fetchAbortIgnored=!0)):i.status.fetchResolved=!0),o&&!a&&!r)return u(s.signal.reason,l);let d=h,p=this.#d[t];return(p===h||a&&r&&void 0===p)&&(void 0===n?void 0!==d.__staleWhileFetching?this.#d[t]=d.__staleWhileFetching:this.#q(e,"fetch"):(i.status&&(i.status.fetchUpdated=!0),this.set(e,n,c.options))),n},u=(n,r)=>{let{aborted:o}=s.signal,a=o&&i.allowStaleOnFetchAbort,c=a||i.allowStaleOnFetchRejection,l=c||i.noDeleteOnFetchRejection,u=h;if(this.#d[t]===h&&(!l||!r&&void 0===u.__staleWhileFetching?this.#q(e,"fetch"):a||(this.#d[t]=u.__staleWhileFetching)),c)return i.status&&void 0!==u.__staleWhileFetching&&(i.status.returnedStale=!0),u.__staleWhileFetching;if(u.__returned===u)throw n};i.status&&(i.status.fetchDispatched=!0);let h=new Promise((t,n)=>{let o=this.#o?.(e,r,c);o&&o instanceof Promise&&o.then(e=>t(void 0===e?void 0:e),n),s.signal.addEventListener("abort",()=>{(!i.ignoreFetchAbort||i.allowStaleOnFetchAbort)&&(t(void 0),i.allowStaleOnFetchAbort&&(t=e=>l(e,!0)))})}).then(l,e=>(i.status&&(i.status.fetchRejected=!0,i.status.fetchError=e),u(e,!1))),d=Object.assign(h,{__abortController:s,__staleWhileFetching:r,__returned:void 0});return void 0===t?(this.set(e,d,{...c.options,status:void 0}),t=this.#u.get(e)):this.#d[t]=d,d}#E(e){if(!this.#S)return!1;let t=e;return!!t&&t instanceof Promise&&t.hasOwnProperty("__staleWhileFetching")&&t.__abortController instanceof o}async fetch(e,t={}){let{allowStale:i=this.allowStale,updateAgeOnGet:n=this.updateAgeOnGet,noDeleteOnStaleGet:r=this.noDeleteOnStaleGet,ttl:o=this.ttl,noDisposeOnSet:s=this.noDisposeOnSet,size:a=0,sizeCalculation:c=this.sizeCalculation,noUpdateTTL:l=this.noUpdateTTL,noDeleteOnFetchRejection:u=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:h=this.allowStaleOnFetchRejection,ignoreFetchAbort:d=this.ignoreFetchAbort,allowStaleOnFetchAbort:p=this.allowStaleOnFetchAbort,context:f,forceRefresh:g=!1,status:m,signal:y}=t;if(!this.#S)return m&&(m.fetch="get"),this.get(e,{allowStale:i,updateAgeOnGet:n,noDeleteOnStaleGet:r,status:m});let v={allowStale:i,updateAgeOnGet:n,noDeleteOnStaleGet:r,ttl:o,noDisposeOnSet:s,size:a,sizeCalculation:c,noUpdateTTL:l,noDeleteOnFetchRejection:u,allowStaleOnFetchRejection:h,allowStaleOnFetchAbort:p,ignoreFetchAbort:d,status:m,signal:y},_=this.#u.get(e);if(void 0===_){m&&(m.fetch="miss");let t=this.#P(e,_,v,f);return t.__returned=t}{let t=this.#d[_];if(this.#E(t)){let e=i&&void 0!==t.__staleWhileFetching;return m&&(m.fetch="inflight",e&&(m.returnedStale=!0)),e?t.__staleWhileFetching:t.__returned=t}let r=this.#N(_);if(!g&&!r)return m&&(m.fetch="hit"),this.#x(_),n&&this.#j(_),m&&this.#F(m,_),t;let o=this.#P(e,_,v,f),s=void 0!==o.__staleWhileFetching&&i;return m&&(m.fetch=r?"stale":"refresh",s&&r&&(m.returnedStale=!0)),s?o.__staleWhileFetching:o.__returned=o}}async forceFetch(e,t={}){let i=await this.fetch(e,t);if(void 0===i)throw new Error("fetch() returned undefined");return i}memo(e,t={}){let i=this.#s;if(!i)throw new Error("no memoMethod provided to constructor");let{context:n,forceRefresh:r,...o}=t,s=this.get(e,o);if(!r&&void 0!==s)return s;let a=i(e,s,{options:o,context:n});return this.set(e,a,o),a}get(e,t={}){let{allowStale:i=this.allowStale,updateAgeOnGet:n=this.updateAgeOnGet,noDeleteOnStaleGet:r=this.noDeleteOnStaleGet,status:o}=t,s=this.#u.get(e);if(void 0!==s){let t=this.#d[s],a=this.#E(t);return o&&this.#F(o,s),this.#N(s)?(o&&(o.get="stale"),a?(o&&i&&void 0!==t.__staleWhileFetching&&(o.returnedStale=!0),i?t.__staleWhileFetching:void 0):(r||this.#q(e,"expire"),o&&i&&(o.returnedStale=!0),i?t:void 0)):(o&&(o.get="hit"),a?t.__staleWhileFetching:(this.#x(s),n&&this.#j(s),t))}o&&(o.get="miss")}#z(e,t){this.#p[t]=e,this.#f[e]=t}#x(e){e!==this.#m&&(e===this.#g?this.#g=this.#f[e]:this.#z(this.#p[e],this.#f[e]),this.#z(this.#m,e),this.#m=e)}delete(e){return this.#q(e,"delete")}#q(e,t){let i=!1;if(0!==this.#c){let n=this.#u.get(e);if(void 0!==n)if(this.#D?.[n]&&(clearTimeout(this.#D?.[n]),this.#D[n]=void 0),i=!0,1===this.#c)this.#H(t);else{this.#L(n);let i=this.#d[n];if(this.#E(i)?i.__abortController.abort(new Error("deleted")):(this.#T||this.#C)&&(this.#T&&this.#i?.(i,e,t),this.#C&&this.#v?.push([i,e,t])),this.#u.delete(e),this.#h[n]=void 0,this.#d[n]=void 0,n===this.#m)this.#m=this.#p[n];else if(n===this.#g)this.#g=this.#f[n];else{let e=this.#p[n];this.#f[e]=this.#f[n];let t=this.#f[n];this.#p[t]=this.#p[n]}this.#c--,this.#y.push(n)}}if(this.#C&&this.#v?.length){let e,t=this.#v;for(;e=t?.shift();)this.#r?.(...e)}return i}clear(){return this.#H("delete")}#H(e){for(let t of this.#k({allowStale:!0})){let i=this.#d[t];if(this.#E(i))i.__abortController.abort(new Error("deleted"));else{let n=this.#h[t];this.#T&&this.#i?.(i,n,e),this.#C&&this.#v?.push([i,n,e])}}if(this.#u.clear(),this.#d.fill(void 0),this.#h.fill(void 0),this.#w&&this.#b){this.#w.fill(0),this.#b.fill(0);for(let e of this.#D??[])void 0!==e&&clearTimeout(e);this.#D?.fill(void 0)}if(this.#_&&this.#_.fill(0),this.#g=0,this.#m=0,this.#y.length=0,this.#l=0,this.#c=0,this.#C&&this.#v){let e,t=this.#v;for(;e=t?.shift();)this.#r?.(...e)}}};e.LRUCache=h}),p=n(e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.Minipass=e.isWritable=e.isReadable=e.isStream=void 0;var n="object"==typeof process&&process?process:{stdout:null,stderr:null},r=i(8474),o=t(i(7075)),s=i(6193);e.isStream=t=>!!t&&"object"==typeof t&&(t instanceof B||t instanceof o.default||(0,e.isReadable)(t)||(0,e.isWritable)(t)),e.isReadable=e=>!!e&&"object"==typeof e&&e instanceof r.EventEmitter&&"function"==typeof e.pipe&&e.pipe!==o.default.Writable.prototype.pipe,e.isWritable=e=>!!e&&"object"==typeof e&&e instanceof r.EventEmitter&&"function"==typeof e.write&&"function"==typeof e.end;var a=Symbol("EOF"),c=Symbol("maybeEmitEnd"),l=Symbol("emittedEnd"),u=Symbol("emittingEnd"),h=Symbol("emittedError"),d=Symbol("closed"),p=Symbol("read"),f=Symbol("flush"),g=Symbol("flushChunk"),m=Symbol("encoding"),y=Symbol("decoder"),v=Symbol("flowing"),_=Symbol("paused"),b=Symbol("resume"),w=Symbol("buffer"),D=Symbol("pipes"),T=Symbol("bufferLength"),S=Symbol("bufferPush"),C=Symbol("bufferShift"),R=Symbol("objectMode"),E=Symbol("destroyed"),P=Symbol("error"),x=Symbol("emitData"),O=Symbol("emitEnd"),k=Symbol("emitEnd2"),N=Symbol("async"),A=Symbol("abort"),M=Symbol("aborted"),I=Symbol("signal"),q=Symbol("dataListeners"),j=Symbol("discarded"),F=e=>Promise.resolve().then(e),L=e=>e(),W=class{src;dest;opts;ondrain;constructor(e,t,i){this.src=e,this.dest=t,this.opts=i,this.ondrain=()=>e[b](),this.dest.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(e){}end(){this.unpipe(),this.opts.end&&this.dest.end()}},U=class extends W{unpipe(){this.src.removeListener("error",this.proxyErrors),super.unpipe()}constructor(e,t,i){super(e,t,i),this.proxyErrors=e=>this.dest.emit("error",e),e.on("error",this.proxyErrors)}},B=class extends r.EventEmitter{[v]=!1;[_]=!1;[D]=[];[w]=[];[R];[m];[N];[y];[a]=!1;[l]=!1;[u]=!1;[d]=!1;[h]=null;[T]=0;[E]=!1;[I];[M]=!1;[q]=0;[j]=!1;writable=!0;readable=!0;constructor(...e){let t=e[0]||{};if(super(),t.objectMode&&"string"==typeof t.encoding)throw new TypeError("Encoding and objectMode may not be used together");var i;t.objectMode?(this[R]=!0,this[m]=null):!(i=t).objectMode&&i.encoding&&"buffer"!==i.encoding?(this[m]=t.encoding,this[R]=!1):(this[R]=!1,this[m]=null),this[N]=!!t.async,this[y]=this[m]?new s.StringDecoder(this[m]):null,t&&!0===t.debugExposeBuffer&&Object.defineProperty(this,"buffer",{get:()=>this[w]}),t&&!0===t.debugExposePipes&&Object.defineProperty(this,"pipes",{get:()=>this[D]});let{signal:n}=t;n&&(this[I]=n,n.aborted?this[A]():n.addEventListener("abort",()=>this[A]()))}get bufferLength(){return this[T]}get encoding(){return this[m]}set encoding(e){throw new Error("Encoding must be set at instantiation time")}setEncoding(e){throw new Error("Encoding must be set at instantiation time")}get objectMode(){return this[R]}set objectMode(e){throw new Error("objectMode must be set at instantiation time")}get async(){return this[N]}set async(e){this[N]=this[N]||!!e}[A](){this[M]=!0,this.emit("abort",this[I]?.reason),this.destroy(this[I]?.reason)}get aborted(){return this[M]}set aborted(e){}write(e,t,i){if(this[M])return!1;if(this[a])throw new Error("write after end");if(this[E])return this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"})),!0;"function"==typeof t&&(i=t,t="utf8"),t||(t="utf8");let n=this[N]?F:L;if(!this[R]&&!Buffer.isBuffer(e))if(r=e,!Buffer.isBuffer(r)&&ArrayBuffer.isView(r))e=Buffer.from(e.buffer,e.byteOffset,e.byteLength);else if((e=>e instanceof ArrayBuffer||!!e&&"object"==typeof e&&e.constructor&&"ArrayBuffer"===e.constructor.name&&e.byteLength>=0)(e))e=Buffer.from(e);else if("string"!=typeof e)throw new Error("Non-contiguous data written to non-objectMode stream");var r;return this[R]?(this[v]&&0!==this[T]&&this[f](!0),this[v]?this.emit("data",e):this[S](e),0!==this[T]&&this.emit("readable"),i&&n(i),this[v]):e.length?("string"==typeof e&&!(t===this[m]&&!this[y]?.lastNeed)&&(e=Buffer.from(e,t)),Buffer.isBuffer(e)&&this[m]&&(e=this[y].write(e)),this[v]&&0!==this[T]&&this[f](!0),this[v]?this.emit("data",e):this[S](e),0!==this[T]&&this.emit("readable"),i&&n(i),this[v]):(0!==this[T]&&this.emit("readable"),i&&n(i),this[v])}read(e){if(this[E])return null;if(this[j]=!1,0===this[T]||0===e||e&&e>this[T])return this[c](),null;this[R]&&(e=null),this[w].length>1&&!this[R]&&(this[w]=[this[m]?this[w].join(""):Buffer.concat(this[w],this[T])]);let t=this[p](e||null,this[w][0]);return this[c](),t}[p](e,t){if(this[R])this[C]();else{let i=t;e===i.length||null===e?this[C]():"string"==typeof i?(this[w][0]=i.slice(e),t=i.slice(0,e),this[T]-=e):(this[w][0]=i.subarray(e),t=i.subarray(0,e),this[T]-=e)}return this.emit("data",t),!this[w].length&&!this[a]&&this.emit("drain"),t}end(e,t,i){return"function"==typeof e&&(i=e,e=void 0),"function"==typeof t&&(i=t,t="utf8"),void 0!==e&&this.write(e,t),i&&this.once("end",i),this[a]=!0,this.writable=!1,(this[v]||!this[_])&&this[c](),this}[b](){this[E]||(!this[q]&&!this[D].length&&(this[j]=!0),this[_]=!1,this[v]=!0,this.emit("resume"),this[w].length?this[f]():this[a]?this[c]():this.emit("drain"))}resume(){return this[b]()}pause(){this[v]=!1,this[_]=!0,this[j]=!1}get destroyed(){return this[E]}get flowing(){return this[v]}get paused(){return this[_]}[S](e){this[R]?this[T]+=1:this[T]+=e.length,this[w].push(e)}[C](){return this[R]?this[T]-=1:this[T]-=this[w][0].length,this[w].shift()}[f](e=!1){do{}while(this[g](this[C]())&&this[w].length);!e&&!this[w].length&&!this[a]&&this.emit("drain")}[g](e){return this.emit("data",e),this[v]}pipe(e,t){if(this[E])return e;this[j]=!1;let i=this[l];return t=t||{},e===n.stdout||e===n.stderr?t.end=!1:t.end=!1!==t.end,t.proxyErrors=!!t.proxyErrors,i?t.end&&e.end():(this[D].push(t.proxyErrors?new U(this,e,t):new W(this,e,t)),this[N]?F(()=>this[b]()):this[b]()),e}unpipe(e){let t=this[D].find(t=>t.dest===e);t&&(1===this[D].length?(this[v]&&0===this[q]&&(this[v]=!1),this[D]=[]):this[D].splice(this[D].indexOf(t),1),t.unpipe())}addListener(e,t){return this.on(e,t)}on(e,t){let i=super.on(e,t);if("data"===e)this[j]=!1,this[q]++,!this[D].length&&!this[v]&&this[b]();else if("readable"===e&&0!==this[T])super.emit("readable");else if("end"!==(n=e)&&"finish"!==n&&"prefinish"!==n||!this[l]){if("error"===e&&this[h]){let e=t;this[N]?F(()=>e.call(this,this[h])):e.call(this,this[h])}}else super.emit(e),this.removeAllListeners(e);var n;return i}removeListener(e,t){return this.off(e,t)}off(e,t){let i=super.off(e,t);return"data"===e&&(this[q]=this.listeners("data").length,0===this[q]&&!this[j]&&!this[D].length&&(this[v]=!1)),i}removeAllListeners(e){let t=super.removeAllListeners(e);return("data"===e||void 0===e)&&(this[q]=0,!this[j]&&!this[D].length&&(this[v]=!1)),t}get emittedEnd(){return this[l]}[c](){!this[u]&&!this[l]&&!this[E]&&0===this[w].length&&this[a]&&(this[u]=!0,this.emit("end"),this.emit("prefinish"),this.emit("finish"),this[d]&&this.emit("close"),this[u]=!1)}emit(e,...t){let i=t[0];if("error"!==e&&"close"!==e&&e!==E&&this[E])return!1;if("data"===e)return!(!this[R]&&!i)&&(this[N]?(F(()=>this[x](i)),!0):this[x](i));if("end"===e)return this[O]();if("close"===e){if(this[d]=!0,!this[l]&&!this[E])return!1;let e=super.emit("close");return this.removeAllListeners("close"),e}if("error"===e){this[h]=i,super.emit(P,i);let e=!(this[I]&&!this.listeners("error").length)&&super.emit("error",i);return this[c](),e}if("resume"===e){let e=super.emit("resume");return this[c](),e}if("finish"===e||"prefinish"===e){let t=super.emit(e);return this.removeAllListeners(e),t}let n=super.emit(e,...t);return this[c](),n}[x](e){for(let t of this[D])!1===t.dest.write(e)&&this.pause();let t=!this[j]&&super.emit("data",e);return this[c](),t}[O](){return!this[l]&&(this[l]=!0,this.readable=!1,this[N]?(F(()=>this[k]()),!0):this[k]())}[k](){if(this[y]){let e=this[y].end();if(e){for(let t of this[D])t.dest.write(e);this[j]||super.emit("data",e)}}for(let e of this[D])e.end();let e=super.emit("end");return this.removeAllListeners("end"),e}async collect(){let e=Object.assign([],{dataLength:0});this[R]||(e.dataLength=0);let t=this.promise();return this.on("data",t=>{e.push(t),this[R]||(e.dataLength+=t.length)}),await t,e}async concat(){if(this[R])throw new Error("cannot concat in objectMode");let e=await this.collect();return this[m]?e.join(""):Buffer.concat(e,e.dataLength)}async promise(){return new Promise((e,t)=>{this.on(E,()=>t(new Error("stream destroyed"))),this.on("error",e=>t(e)),this.on("end",()=>e())})}[Symbol.asyncIterator](){this[j]=!1;let e=!1,t=async()=>(this.pause(),e=!0,{value:void 0,done:!0});return{next:()=>{if(e)return t();let i=this.read();if(null!==i)return Promise.resolve({done:!1,value:i});if(this[a])return t();let n,r,o=e=>{this.off("data",s),this.off("end",c),this.off(E,l),t(),r(e)},s=e=>{this.off("error",o),this.off("end",c),this.off(E,l),this.pause(),n({value:e,done:!!this[a]})},c=()=>{this.off("error",o),this.off("data",s),this.off(E,l),t(),n({done:!0,value:void 0})},l=()=>o(new Error("stream destroyed"));return new Promise((e,t)=>{r=t,n=e,this.once(E,l),this.once("error",o),this.once("end",c),this.once("data",s)})},throw:t,return:t,[Symbol.asyncIterator](){return this},[Symbol.asyncDispose]:async()=>{}}}[Symbol.iterator](){this[j]=!1;let e=!1,t=()=>(this.pause(),this.off(P,t),this.off(E,t),this.off("end",t),e=!0,{done:!0,value:void 0});return this.once("end",t),this.once(P,t),this.once(E,t),{next:()=>{if(e)return t();let i=this.read();return null===i?t():{done:!1,value:i}},throw:t,return:t,[Symbol.iterator](){return this},[Symbol.dispose]:()=>{}}}destroy(e){return this[E]?(e?this.emit("error",e):this.emit(E),this):(this[E]=!0,this[j]=!0,this[w].length=0,this[T]=0,"function"==typeof this.close&&!this[d]&&this.close(),e?this.emit("error",e):this.emit(E),this)}static get isStream(){return e.isStream}};e.Minipass=B}),f=n(e=>{var t=e&&e.__createBinding||(Object.create?function(e,t,i,n){void 0===n&&(n=i);var r=Object.getOwnPropertyDescriptor(t,i);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[i]}}),Object.defineProperty(e,n,r)}:function(e,t,i,n){void 0===n&&(n=i),e[n]=t[i]}),n=e&&e.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=e&&e.__importStar||function(e){if(e&&e.__esModule)return e;var i={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&t(i,e,r);return n(i,e),i};Object.defineProperty(e,"__esModule",{value:!0}),e.PathScurry=e.Path=e.PathScurryDarwin=e.PathScurryPosix=e.PathScurryWin32=e.PathScurryBase=e.PathPosix=e.PathWin32=e.PathBase=e.ChildrenCache=e.ResolveCache=void 0;var o=d(),s=i(6760),a=i(3136),c=i(9896),l=r(i(3024)),u=c.realpathSync.native,h=i(1455),f=p(),g={lstatSync:c.lstatSync,readdir:c.readdir,readdirSync:c.readdirSync,readlinkSync:c.readlinkSync,realpathSync:u,promises:{lstat:h.lstat,readdir:h.readdir,readlink:h.readlink,realpath:h.realpath}},m=e=>e&&e!==g&&e!==l?{...g,...e,promises:{...g.promises,...e.promises||{}}}:g,y=/^\\\\\?\\([a-z]:)\\?$/i,v=/[\\\/]/,_=10,b=15,w=~b,D=128,T=e=>e.isFile()?8:e.isDirectory()?4:e.isSymbolicLink()?_:e.isCharacterDevice()?2:e.isBlockDevice()?6:e.isSocket()?12:e.isFIFO()?1:0,S=new o.LRUCache({max:4096}),C=e=>{let t=S.get(e);if(t)return t;let i=e.normalize("NFKD");return S.set(e,i),i},R=new o.LRUCache({max:4096}),E=e=>{let t=R.get(e);if(t)return t;let i=C(e.toLowerCase());return R.set(e,i),i},P=class extends o.LRUCache{constructor(){super({max:256})}};e.ResolveCache=P;var x=class extends o.LRUCache{constructor(e=16384){super({maxSize:e,sizeCalculation:e=>e.length+1})}};e.ChildrenCache=x;var O=Symbol("PathScurry setAsCwd"),k=class{name;root;roots;parent;nocase;isCWD=!1;#e;#t;get dev(){return this.#t}#i;get mode(){return this.#i}#n;get nlink(){return this.#n}#r;get uid(){return this.#r}#o;get gid(){return this.#o}#s;get rdev(){return this.#s}#a;get blksize(){return this.#a}#c;get ino(){return this.#c}#l;get size(){return this.#l}#u;get blocks(){return this.#u}#h;get atimeMs(){return this.#h}#d;get mtimeMs(){return this.#d}#f;get ctimeMs(){return this.#f}#p;get birthtimeMs(){return this.#p}#g;get atime(){return this.#g}#m;get mtime(){return this.#m}#y;get ctime(){return this.#y}#v;get birthtime(){return this.#v}#_;#b;#w;#D;#T;#S;#C;#R;#M;#j;get parentPath(){return(this.parent||this).fullpath()}get path(){return this.parentPath}constructor(e,t=0,i,n,r,o,s){this.name=e,this.#_=r?E(e):C(e),this.#C=1023&t,this.nocase=r,this.roots=n,this.root=i||this,this.#R=o,this.#w=s.fullpath,this.#T=s.relative,this.#S=s.relativePosix,this.parent=s.parent,this.parent?this.#e=this.parent.#e:this.#e=m(s.fs)}depth(){return void 0!==this.#b?this.#b:this.parent?this.#b=this.parent.depth()+1:this.#b=0}childrenCache(){return this.#R}resolve(e){if(!e)return this;let t=this.getRootString(e),i=e.substring(t.length).split(this.splitSep);return t?this.getRoot(t).#F(i):this.#F(i)}#F(e){let t=this;for(let i of e)t=t.child(i);return t}children(){let e=this.#R.get(this);if(e)return e;let t=Object.assign([],{provisional:0});return this.#R.set(this,t),this.#C&=-17,t}child(e,t){if(""===e||"."===e)return this;if(".."===e)return this.parent||this;let i=this.children(),n=this.nocase?E(e):C(e);for(let e of i)if(e.#_===n)return e;let r=this.parent?this.sep:"",o=this.#w?this.#w+r+e:void 0,s=this.newChild(e,0,{...t,parent:this,fullpath:o});return this.canReaddir()||(s.#C|=D),i.push(s),s}relative(){if(this.isCWD)return"";if(void 0!==this.#T)return this.#T;let e=this.name,t=this.parent;if(!t)return this.#T=this.name;let i=t.relative();return i+(i&&t.parent?this.sep:"")+e}relativePosix(){if("/"===this.sep)return this.relative();if(this.isCWD)return"";if(void 0!==this.#S)return this.#S;let e=this.name,t=this.parent;if(!t)return this.#S=this.fullpathPosix();let i=t.relativePosix();return i+(i&&t.parent?"/":"")+e}fullpath(){if(void 0!==this.#w)return this.#w;let e=this.name,t=this.parent;if(!t)return this.#w=this.name;let i=t.fullpath()+(t.parent?this.sep:"")+e;return this.#w=i}fullpathPosix(){if(void 0!==this.#D)return this.#D;if("/"===this.sep)return this.#D=this.fullpath();if(!this.parent){let e=this.fullpath().replace(/\\/g,"/");return/^[a-z]:\//i.test(e)?this.#D=`//?/${e}`:this.#D=e}let e=this.parent,t=e.fullpathPosix(),i=t+(t&&e.parent?"/":"")+this.name;return this.#D=i}isUnknown(){return 0===(this.#C&b)}isType(e){return this[`is${e}`]()}getType(){return this.isUnknown()?"Unknown":this.isDirectory()?"Directory":this.isFile()?"File":this.isSymbolicLink()?"SymbolicLink":this.isFIFO()?"FIFO":this.isCharacterDevice()?"CharacterDevice":this.isBlockDevice()?"BlockDevice":this.isSocket()?"Socket":"Unknown"}isFile(){return 8===(this.#C&b)}isDirectory(){return 4===(this.#C&b)}isCharacterDevice(){return 2===(this.#C&b)}isBlockDevice(){return 6===(this.#C&b)}isFIFO(){return 1===(this.#C&b)}isSocket(){return 12===(this.#C&b)}isSymbolicLink(){return(this.#C&_)===_}lstatCached(){return 32&this.#C?this:void 0}readlinkCached(){return this.#M}realpathCached(){return this.#j}readdirCached(){let e=this.children();return e.slice(0,e.provisional)}canReadlink(){if(this.#M)return!0;if(!this.parent)return!1;let e=this.#C&b;return!(0!==e&&e!==_||256&this.#C||this.#C&D)}calledReaddir(){return!!(16&this.#C)}isENOENT(){return!!(this.#C&D)}isNamed(e){return this.nocase?this.#_===E(e):this.#_===C(e)}async readlink(){let e=this.#M;if(e)return e;if(this.canReadlink()&&this.parent)try{let e=await this.#e.promises.readlink(this.fullpath()),t=(await this.parent.realpath())?.resolve(e);if(t)return this.#M=t}catch(e){return void this.#k(e.code)}}readlinkSync(){let e=this.#M;if(e)return e;if(this.canReadlink()&&this.parent)try{let e=this.#e.readlinkSync(this.fullpath()),t=this.parent.realpathSync()?.resolve(e);if(t)return this.#M=t}catch(e){return void this.#k(e.code)}}#I(e){this.#C|=16;for(let t=e.provisional;t<e.length;t++){let i=e[t];i&&i.#N()}}#N(){this.#C&D||(this.#C=(this.#C|D)&w,this.#A())}#A(){let e=this.children();e.provisional=0;for(let t of e)t.#N()}#L(){this.#C|=512,this.#U()}#U(){if(64&this.#C)return;let e=this.#C;4===(e&b)&&(e&=w),this.#C=64|e,this.#A()}#W(e=""){"ENOTDIR"===e||"EPERM"===e?this.#U():"ENOENT"===e?this.#N():this.children().provisional=0}#O(e=""){"ENOTDIR"===e?this.parent.#U():"ENOENT"===e&&this.#N()}#k(e=""){let t=this.#C;t|=256,"ENOENT"===e&&(t|=D),("EINVAL"===e||"UNKNOWN"===e)&&(t&=w),this.#C=t,"ENOTDIR"===e&&this.parent&&this.parent.#U()}#$(e,t){return this.#P(e,t)||this.#B(e,t)}#B(e,t){let i=T(e),n=this.newChild(e.name,i,{parent:this}),r=n.#C&b;return 4!==r&&r!==_&&0!==r&&(n.#C|=64),t.unshift(n),t.provisional++,n}#P(e,t){for(let i=t.provisional;i<t.length;i++){let n=t[i];if((this.nocase?E(e.name):C(e.name))===n.#_)return this.#E(e,n,i,t)}}#E(e,t,i,n){let r=t.name;return t.#C=t.#C&w|T(e),r!==e.name&&(t.name=e.name),i!==n.provisional&&(i===n.length-1?n.pop():n.splice(i,1),n.unshift(t)),n.provisional++,t}async lstat(){if(0===(this.#C&D))try{return this.#z(await this.#e.promises.lstat(this.fullpath())),this}catch(e){this.#O(e.code)}}lstatSync(){if(0===(this.#C&D))try{return this.#z(this.#e.lstatSync(this.fullpath())),this}catch(e){this.#O(e.code)}}#z(e){let{atime:t,atimeMs:i,birthtime:n,birthtimeMs:r,blksize:o,blocks:s,ctime:a,ctimeMs:c,dev:l,gid:u,ino:h,mode:d,mtime:p,mtimeMs:f,nlink:g,rdev:m,size:y,uid:v}=e;this.#g=t,this.#h=i,this.#v=n,this.#p=r,this.#a=o,this.#u=s,this.#y=a,this.#f=c,this.#t=l,this.#o=u,this.#c=h,this.#i=d,this.#m=p,this.#d=f,this.#n=g,this.#s=m,this.#l=y,this.#r=v;let b=T(e);this.#C=this.#C&w|b|32,0!==b&&4!==b&&b!==_&&(this.#C|=64)}#x=[];#q=!1;#H(e){this.#q=!1;let t=this.#x.slice();this.#x.length=0,t.forEach(t=>t(null,e))}readdirCB(e,t=!1){if(!this.canReaddir())return void(t?e(null,[]):queueMicrotask(()=>e(null,[])));let i=this.children();if(this.calledReaddir()){let n=i.slice(0,i.provisional);return void(t?e(null,n):queueMicrotask(()=>e(null,n)))}if(this.#x.push(e),this.#q)return;this.#q=!0;let n=this.fullpath();this.#e.readdir(n,{withFileTypes:!0},(e,t)=>{if(e)this.#W(e.code),i.provisional=0;else{for(let e of t)this.#$(e,i);this.#I(i)}this.#H(i.slice(0,i.provisional))})}#G;async readdir(){if(!this.canReaddir())return[];let e=this.children();if(this.calledReaddir())return e.slice(0,e.provisional);let t=this.fullpath();if(this.#G)await this.#G;else{let i=()=>{};this.#G=new Promise(e=>i=e);try{for(let i of await this.#e.promises.readdir(t,{withFileTypes:!0}))this.#$(i,e);this.#I(e)}catch(t){this.#W(t.code),e.provisional=0}this.#G=void 0,i()}return e.slice(0,e.provisional)}readdirSync(){if(!this.canReaddir())return[];let e=this.children();if(this.calledReaddir())return e.slice(0,e.provisional);let t=this.fullpath();try{for(let i of this.#e.readdirSync(t,{withFileTypes:!0}))this.#$(i,e);this.#I(e)}catch(t){this.#W(t.code),e.provisional=0}return e.slice(0,e.provisional)}canReaddir(){if(704&this.#C)return!1;let e=b&this.#C;return 0===e||4===e||e===_}shouldWalk(e,t){return!(4&~this.#C)&&!(704&this.#C)&&!e.has(this)&&(!t||t(this))}async realpath(){if(this.#j)return this.#j;if(!(896&this.#C))try{let e=await this.#e.promises.realpath(this.fullpath());return this.#j=this.resolve(e)}catch{this.#L()}}realpathSync(){if(this.#j)return this.#j;if(!(896&this.#C))try{let e=this.#e.realpathSync(this.fullpath());return this.#j=this.resolve(e)}catch{this.#L()}}[O](e){if(e===this)return;e.isCWD=!1,this.isCWD=!0;let t=new Set([]),i=[],n=this;for(;n&&n.parent;)t.add(n),n.#T=i.join(this.sep),n.#S=i.join("/"),n=n.parent,i.push("..");for(n=e;n&&n.parent&&!t.has(n);)n.#T=void 0,n.#S=void 0,n=n.parent}};e.PathBase=k;var N=class e extends k{sep="\\";splitSep=v;constructor(e,t=0,i,n,r,o,s){super(e,t,i,n,r,o,s)}newChild(t,i=0,n={}){return new e(t,i,this.root,this.roots,this.nocase,this.childrenCache(),n)}getRootString(e){return s.win32.parse(e).root}getRoot(e){if(e=(e=>e.replace(/\//g,"\\").replace(y,"$1\\"))(e.toUpperCase()),e===this.root.name)return this.root;for(let[t,i]of Object.entries(this.roots))if(this.sameRoot(e,t))return this.roots[e]=i;return this.roots[e]=new I(e,this).root}sameRoot(e,t=this.root.name){return(e=e.toUpperCase().replace(/\//g,"\\").replace(y,"$1\\"))===t}};e.PathWin32=N;var A=class e extends k{splitSep="/";sep="/";constructor(e,t=0,i,n,r,o,s){super(e,t,i,n,r,o,s)}getRootString(e){return e.startsWith("/")?"/":""}getRoot(e){return this.root}newChild(t,i=0,n={}){return new e(t,i,this.root,this.roots,this.nocase,this.childrenCache(),n)}};e.PathPosix=A;var M=class{root;rootPath;roots;cwd;#e;#t;#i;nocase;#n;constructor(e=process.cwd(),t,i,{nocase:n,childrenCacheSize:r=16384,fs:o=g}={}){this.#n=m(o),(e instanceof URL||e.startsWith("file://"))&&(e=(0,a.fileURLToPath)(e));let s=t.resolve(e);this.roots=Object.create(null),this.rootPath=this.parseRootPath(s),this.#e=new P,this.#t=new P,this.#i=new x(r);let c=s.substring(this.rootPath.length).split(i);if(1===c.length&&!c[0]&&c.pop(),void 0===n)throw new TypeError("must provide nocase setting to PathScurryBase ctor");this.nocase=n,this.root=this.newRoot(this.#n),this.roots[this.rootPath]=this.root;let l=this.root,u=c.length-1,h=t.sep,d=this.rootPath,p=!1;for(let e of c){let t=u--;l=l.child(e,{relative:new Array(t).fill("..").join(h),relativePosix:new Array(t).fill("..").join("/"),fullpath:d+=(p?"":h)+e}),p=!0}this.cwd=l}depth(e=this.cwd){return"string"==typeof e&&(e=this.cwd.resolve(e)),e.depth()}childrenCache(){return this.#i}resolve(...e){let t="";for(let i=e.length-1;i>=0;i--){let n=e[i];if(n&&"."!==n&&(t=t?`${n}/${t}`:n,this.isAbsolute(n)))break}let i=this.#e.get(t);if(void 0!==i)return i;let n=this.cwd.resolve(t).fullpath();return this.#e.set(t,n),n}resolvePosix(...e){let t="";for(let i=e.length-1;i>=0;i--){let n=e[i];if(n&&"."!==n&&(t=t?`${n}/${t}`:n,this.isAbsolute(n)))break}let i=this.#t.get(t);if(void 0!==i)return i;let n=this.cwd.resolve(t).fullpathPosix();return this.#t.set(t,n),n}relative(e=this.cwd){return"string"==typeof e&&(e=this.cwd.resolve(e)),e.relative()}relativePosix(e=this.cwd){return"string"==typeof e&&(e=this.cwd.resolve(e)),e.relativePosix()}basename(e=this.cwd){return"string"==typeof e&&(e=this.cwd.resolve(e)),e.name}dirname(e=this.cwd){return"string"==typeof e&&(e=this.cwd.resolve(e)),(e.parent||e).fullpath()}async readdir(e=this.cwd,t={withFileTypes:!0}){"string"==typeof e?e=this.cwd.resolve(e):e instanceof k||(t=e,e=this.cwd);let{withFileTypes:i}=t;if(e.canReaddir()){let t=await e.readdir();return i?t:t.map(e=>e.name)}return[]}readdirSync(e=this.cwd,t={withFileTypes:!0}){"string"==typeof e?e=this.cwd.resolve(e):e instanceof k||(t=e,e=this.cwd);let{withFileTypes:i=!0}=t;return e.canReaddir()?i?e.readdirSync():e.readdirSync().map(e=>e.name):[]}async lstat(e=this.cwd){return"string"==typeof e&&(e=this.cwd.resolve(e)),e.lstat()}lstatSync(e=this.cwd){return"string"==typeof e&&(e=this.cwd.resolve(e)),e.lstatSync()}async readlink(e=this.cwd,{withFileTypes:t}={withFileTypes:!1}){"string"==typeof e?e=this.cwd.resolve(e):e instanceof k||(t=e.withFileTypes,e=this.cwd);let i=await e.readlink();return t?i:i?.fullpath()}readlinkSync(e=this.cwd,{withFileTypes:t}={withFileTypes:!1}){"string"==typeof e?e=this.cwd.resolve(e):e instanceof k||(t=e.withFileTypes,e=this.cwd);let i=e.readlinkSync();return t?i:i?.fullpath()}async realpath(e=this.cwd,{withFileTypes:t}={withFileTypes:!1}){"string"==typeof e?e=this.cwd.resolve(e):e instanceof k||(t=e.withFileTypes,e=this.cwd);let i=await e.realpath();return t?i:i?.fullpath()}realpathSync(e=this.cwd,{withFileTypes:t}={withFileTypes:!1}){"string"==typeof e?e=this.cwd.resolve(e):e instanceof k||(t=e.withFileTypes,e=this.cwd);let i=e.realpathSync();return t?i:i?.fullpath()}async walk(e=this.cwd,t={}){"string"==typeof e?e=this.cwd.resolve(e):e instanceof k||(t=e,e=this.cwd);let{withFileTypes:i=!0,follow:n=!1,filter:r,walkFilter:o}=t,s=[];(!r||r(e))&&s.push(i?e:e.fullpath());let a=new Set,c=(e,t)=>{a.add(e),e.readdirCB((e,l)=>{if(e)return t(e);let u=l.length;if(!u)return t();let h=()=>{0===--u&&t()};for(let e of l)(!r||r(e))&&s.push(i?e:e.fullpath()),n&&e.isSymbolicLink()?e.realpath().then(e=>e?.isUnknown()?e.lstat():e).then(e=>e?.shouldWalk(a,o)?c(e,h):h()):e.shouldWalk(a,o)?c(e,h):h()},!0)},l=e;return new Promise((e,t)=>{c(l,i=>{if(i)return t(i);e(s)})})}walkSync(e=this.cwd,t={}){"string"==typeof e?e=this.cwd.resolve(e):e instanceof k||(t=e,e=this.cwd);let{withFileTypes:i=!0,follow:n=!1,filter:r,walkFilter:o}=t,s=[];(!r||r(e))&&s.push(i?e:e.fullpath());let a=new Set([e]);for(let e of a){let t=e.readdirSync();for(let e of t){(!r||r(e))&&s.push(i?e:e.fullpath());let t=e;if(e.isSymbolicLink()){if(!n||!(t=e.realpathSync()))continue;t.isUnknown()&&t.lstatSync()}t.shouldWalk(a,o)&&a.add(t)}}return s}[Symbol.asyncIterator](){return this.iterate()}iterate(e=this.cwd,t={}){return"string"==typeof e?e=this.cwd.resolve(e):e instanceof k||(t=e,e=this.cwd),this.stream(e,t)[Symbol.asyncIterator]()}[Symbol.iterator](){return this.iterateSync()}*iterateSync(e=this.cwd,t={}){"string"==typeof e?e=this.cwd.resolve(e):e instanceof k||(t=e,e=this.cwd);let{withFileTypes:i=!0,follow:n=!1,filter:r,walkFilter:o}=t;(!r||r(e))&&(yield i?e:e.fullpath());let s=new Set([e]);for(let e of s){let t=e.readdirSync();for(let e of t){(!r||r(e))&&(yield i?e:e.fullpath());let t=e;if(e.isSymbolicLink()){if(!n||!(t=e.realpathSync()))continue;t.isUnknown()&&t.lstatSync()}t.shouldWalk(s,o)&&s.add(t)}}}stream(e=this.cwd,t={}){"string"==typeof e?e=this.cwd.resolve(e):e instanceof k||(t=e,e=this.cwd);let{withFileTypes:i=!0,follow:n=!1,filter:r,walkFilter:o}=t,s=new f.Minipass({objectMode:!0});(!r||r(e))&&s.write(i?e:e.fullpath());let a=new Set,c=[e],l=0,u=()=>{let e=!1;for(;!e;){let t=c.shift();if(!t)return void(0===l&&s.end());l++,a.add(t);let h=(t,p,f=!1)=>{if(t)return s.emit("error",t);if(n&&!f){let e=[];for(let t of p)t.isSymbolicLink()&&e.push(t.realpath().then(e=>e?.isUnknown()?e.lstat():e));if(e.length)return void Promise.all(e).then(()=>h(null,p,!0))}for(let t of p)t&&(!r||r(t))&&(s.write(i?t:t.fullpath())||(e=!0));l--;for(let e of p){let t=e.realpathCached()||e;t.shouldWalk(a,o)&&c.push(t)}e&&!s.flowing?s.once("drain",u):d||u()},d=!0;t.readdirCB(h,!0),d=!1}};return u(),s}streamSync(e=this.cwd,t={}){"string"==typeof e?e=this.cwd.resolve(e):e instanceof k||(t=e,e=this.cwd);let{withFileTypes:i=!0,follow:n=!1,filter:r,walkFilter:o}=t,s=new f.Minipass({objectMode:!0}),a=new Set;(!r||r(e))&&s.write(i?e:e.fullpath());let c=[e],l=0,u=()=>{let e=!1;for(;!e;){let t=c.shift();if(!t)return void(0===l&&s.end());l++,a.add(t);let u=t.readdirSync();for(let t of u)(!r||r(t))&&(s.write(i?t:t.fullpath())||(e=!0));l--;for(let e of u){let t=e;if(e.isSymbolicLink()){if(!n||!(t=e.realpathSync()))continue;t.isUnknown()&&t.lstatSync()}t.shouldWalk(a,o)&&c.push(t)}}e&&!s.flowing&&s.once("drain",u)};return u(),s}chdir(e=this.cwd){let t=this.cwd;this.cwd="string"==typeof e?this.cwd.resolve(e):e,this.cwd[O](t)}};e.PathScurryBase=M;var I=class extends M{sep="\\";constructor(e=process.cwd(),t={}){let{nocase:i=!0}=t;super(e,s.win32,"\\",{...t,nocase:i}),this.nocase=i;for(let e=this.cwd;e;e=e.parent)e.nocase=this.nocase}parseRootPath(e){return s.win32.parse(e).root.toUpperCase()}newRoot(e){return new N(this.rootPath,4,void 0,this.roots,this.nocase,this.childrenCache(),{fs:e})}isAbsolute(e){return e.startsWith("/")||e.startsWith("\\")||/^[a-z]:(\/|\\)/i.test(e)}};e.PathScurryWin32=I;var q=class extends M{sep="/";constructor(e=process.cwd(),t={}){let{nocase:i=!1}=t;super(e,s.posix,"/",{...t,nocase:i}),this.nocase=i}parseRootPath(e){return"/"}newRoot(e){return new A(this.rootPath,4,void 0,this.roots,this.nocase,this.childrenCache(),{fs:e})}isAbsolute(e){return e.startsWith("/")}};e.PathScurryPosix=q;var j=class extends q{constructor(e=process.cwd(),t={}){let{nocase:i=!0}=t;super(e,{...t,nocase:i})}};e.PathScurryDarwin=j,e.Path="win32"===process.platform?N:A,e.PathScurry="win32"===process.platform?I:"darwin"===process.platform?j:q}),g=n(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Pattern=void 0;var t=h(),i=Symbol.for("nodejs.util.inspect.custom");e.Pattern=class e{#e;#t;#i;length;#n;#r;#o;#s;#a;#c;#l=!0;constructor(e,t,i,n){if(!(e=>e.length>=1)(e))throw new TypeError("empty pattern list");if(!(e=>e.length>=1)(t))throw new TypeError("empty glob list");if(t.length!==e.length)throw new TypeError("mismatched pattern list and glob list lengths");if(this.length=e.length,i<0||i>=this.length)throw new TypeError("index out of range");if(this.#e=e,this.#t=t,this.#i=i,this.#n=n,0===this.#i)if(this.isUNC()){let[e,t,i,n,...r]=this.#e,[o,s,a,c,...l]=this.#t;""===r[0]&&(r.shift(),l.shift());let u=[e,t,i,n,""].join("/"),h=[o,s,a,c,""].join("/");this.#e=[u,...r],this.#t=[h,...l],this.length=this.#e.length}else if(this.isDrive()||this.isAbsolute()){let[e,...t]=this.#e,[i,...n]=this.#t;""===t[0]&&(t.shift(),n.shift());let r=e+"/",o=i+"/";this.#e=[r,...t],this.#t=[o,...n],this.length=this.#e.length}}[i](){return"Pattern <"+this.#t.slice(this.#i).join("/")+">"}pattern(){return this.#e[this.#i]}isString(){return"string"==typeof this.#e[this.#i]}isGlobstar(){return this.#e[this.#i]===t.GLOBSTAR}isRegExp(){return this.#e[this.#i]instanceof RegExp}globString(){return this.#o=this.#o||(0===this.#i?this.isAbsolute()?this.#t[0]+this.#t.slice(1).join("/"):this.#t.join("/"):this.#t.slice(this.#i).join("/"))}hasMore(){return this.length>this.#i+1}rest(){return void 0!==this.#r?this.#r:this.hasMore()?(this.#r=new e(this.#e,this.#t,this.#i+1,this.#n),this.#r.#c=this.#c,this.#r.#a=this.#a,this.#r.#s=this.#s,this.#r):this.#r=null}isUNC(){let e=this.#e;return void 0!==this.#a?this.#a:this.#a="win32"===this.#n&&0===this.#i&&""===e[0]&&""===e[1]&&"string"==typeof e[2]&&!!e[2]&&"string"==typeof e[3]&&!!e[3]}isDrive(){let e=this.#e;return void 0!==this.#s?this.#s:this.#s="win32"===this.#n&&0===this.#i&&this.length>1&&"string"==typeof e[0]&&/^[a-z]:$/i.test(e[0])}isAbsolute(){let e=this.#e;return void 0!==this.#c?this.#c:this.#c=""===e[0]&&e.length>1||this.isDrive()||this.isUNC()}root(){let e=this.#e[0];return"string"==typeof e&&this.isAbsolute()&&0===this.#i?e:""}checkFollowGlobstar(){return!(0===this.#i||!this.isGlobstar()||!this.#l)}markFollowGlobstar(){return!(0===this.#i||!this.isGlobstar()||!this.#l||(this.#l=!1,0))}}}),m=n(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Ignore=void 0;var t=h(),i=g(),n="object"==typeof process&&process&&"string"==typeof process.platform?process.platform:"linux";e.Ignore=class{relative;relativeChildren;absolute;absoluteChildren;platform;mmopts;constructor(e,{nobrace:t,nocase:i,noext:r,noglobstar:o,platform:s=n}){this.relative=[],this.absolute=[],this.relativeChildren=[],this.absoluteChildren=[],this.platform=s,this.mmopts={dot:!0,nobrace:t,nocase:i,noext:r,noglobstar:o,optimizationLevel:2,platform:s,nocomment:!0,nonegate:!0};for(let t of e)this.add(t)}add(e){let n=new t.Minimatch(e,this.mmopts);for(let e=0;e<n.set.length;e++){let r=n.set[e],o=n.globParts[e];if(!r||!o)throw new Error("invalid pattern object");for(;"."===r[0]&&"."===o[0];)r.shift(),o.shift();let s=new i.Pattern(r,o,0,this.platform),a=new t.Minimatch(s.globString(),this.mmopts),c="**"===o[o.length-1],l=s.isAbsolute();l?this.absolute.push(a):this.relative.push(a),c&&(l?this.absoluteChildren.push(a):this.relativeChildren.push(a))}}ignored(e){let t=e.fullpath(),i=`${t}/`,n=e.relative()||".",r=`${n}/`;for(let e of this.relative)if(e.match(n)||e.match(r))return!0;for(let e of this.absolute)if(e.match(t)||e.match(i))return!0;return!1}childrenIgnored(e){let t=e.fullpath()+"/",i=(e.relative()||".")+"/";for(let e of this.relativeChildren)if(e.match(i))return!0;for(let e of this.absoluteChildren)if(e.match(t))return!0;return!1}}}),y=n(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Processor=e.SubWalks=e.MatchRecord=e.HasWalkedCache=void 0;var t=h(),i=class e{store;constructor(e=new Map){this.store=e}copy(){return new e(new Map(this.store))}hasWalked(e,t){return this.store.get(e.fullpath())?.has(t.globString())}storeWalked(e,t){let i=e.fullpath(),n=this.store.get(i);n?n.add(t.globString()):this.store.set(i,new Set([t.globString()]))}};e.HasWalkedCache=i;var n=class{store=new Map;add(e,t,i){let n=(t?2:0)|(i?1:0),r=this.store.get(e);this.store.set(e,void 0===r?n:n&r)}entries(){return[...this.store.entries()].map(([e,t])=>[e,!!(2&t),!!(1&t)])}};e.MatchRecord=n;var r=class{store=new Map;add(e,t){if(!e.canReaddir())return;let i=this.store.get(e);i?i.find(e=>e.globString()===t.globString())||i.push(t):this.store.set(e,[t])}get(e){let t=this.store.get(e);if(!t)throw new Error("attempting to walk unknown path");return t}entries(){return this.keys().map(e=>[e,this.store.get(e)])}keys(){return[...this.store.keys()].filter(e=>e.canReaddir())}};e.SubWalks=r,e.Processor=class e{hasWalkedCache;matches=new n;subwalks=new r;patterns;follow;dot;opts;constructor(e,t){this.opts=e,this.follow=!!e.follow,this.dot=!!e.dot,this.hasWalkedCache=t?t.copy():new i}processPatterns(e,i){this.patterns=i;let n=i.map(t=>[e,t]);for(let[e,i]of n){this.hasWalkedCache.storeWalked(e,i);let n=i.root(),r=i.isAbsolute()&&!1!==this.opts.absolute;if(n){e=e.resolve("/"===n&&void 0!==this.opts.root?this.opts.root:n);let t=i.rest();if(!t){this.matches.add(e,!0,!1);continue}i=t}if(e.isENOENT())continue;let o,s,a=!1;for(;"string"==typeof(o=i.pattern())&&(s=i.rest());)e=e.resolve(o),i=s,a=!0;if(o=i.pattern(),s=i.rest(),a){if(this.hasWalkedCache.hasWalked(e,i))continue;this.hasWalkedCache.storeWalked(e,i)}if("string"==typeof o){let t=".."===o||""===o||"."===o;this.matches.add(e.resolve(o),r,t);continue}if(o===t.GLOBSTAR){(!e.isSymbolicLink()||this.follow||i.checkFollowGlobstar())&&this.subwalks.add(e,i);let t=s?.pattern(),n=s?.rest();if(s&&(""!==t&&"."!==t||n)){if(".."===t){let t=e.parent||e;n?this.hasWalkedCache.hasWalked(t,n)||this.subwalks.add(t,n):this.matches.add(t,r,!0)}}else this.matches.add(e,r,""===t||"."===t)}else o instanceof RegExp&&this.subwalks.add(e,i)}return this}subwalkTargets(){return this.subwalks.keys()}child(){return new e(this.opts,this.hasWalkedCache)}filterEntries(e,i){let n=this.subwalks.get(e),r=this.child();for(let e of i)for(let i of n){let n=i.isAbsolute(),o=i.pattern(),s=i.rest();o===t.GLOBSTAR?r.testGlobstar(e,i,s,n):o instanceof RegExp?r.testRegExp(e,o,s,n):r.testString(e,o,s,n)}return r}testGlobstar(e,t,i,n){if((this.dot||!e.name.startsWith("."))&&(t.hasMore()||this.matches.add(e,n,!1),e.canReaddir()&&(this.follow||!e.isSymbolicLink()?this.subwalks.add(e,t):e.isSymbolicLink()&&(i&&t.checkFollowGlobstar()?this.subwalks.add(e,i):t.markFollowGlobstar()&&this.subwalks.add(e,t)))),i){let t=i.pattern();if("string"==typeof t&&".."!==t&&""!==t&&"."!==t)this.testString(e,t,i.rest(),n);else if(".."===t){let t=e.parent||e;this.subwalks.add(t,i)}else t instanceof RegExp&&this.testRegExp(e,t,i.rest(),n)}}testRegExp(e,t,i,n){t.test(e.name)&&(i?this.subwalks.add(e,i):this.matches.add(e,n,!1))}testString(e,t,i,n){e.isNamed(t)&&(i?this.subwalks.add(e,i):this.matches.add(e,n,!1))}}}),v=n(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.GlobStream=e.GlobWalker=e.GlobUtil=void 0;var t=p(),i=m(),n=y(),r=class{path;patterns;opts;seen=new Set;paused=!1;aborted=!1;#e=[];#t;#i;signal;maxDepth;includeChildMatches;constructor(e,t,n){if(this.patterns=e,this.path=t,this.opts=n,this.#i=n.posix||"win32"!==n.platform?"/":"\\",this.includeChildMatches=!1!==n.includeChildMatches,(n.ignore||!this.includeChildMatches)&&(this.#t=((e,t)=>"string"==typeof e?new i.Ignore([e],t):Array.isArray(e)?new i.Ignore(e,t):e)(n.ignore??[],n),!this.includeChildMatches&&"function"!=typeof this.#t.add))throw new Error("cannot ignore child matches, ignore lacks add() method.");this.maxDepth=n.maxDepth||1/0,n.signal&&(this.signal=n.signal,this.signal.addEventListener("abort",()=>{this.#e.length=0}))}#n(e){return this.seen.has(e)||!!this.#t?.ignored?.(e)}#r(e){return!!this.#t?.childrenIgnored?.(e)}pause(){this.paused=!0}resume(){if(this.signal?.aborted)return;let e;for(this.paused=!1;!this.paused&&(e=this.#e.shift());)e()}onResume(e){this.signal?.aborted||(this.paused?this.#e.push(e):e())}async matchCheck(e,t){if(t&&this.opts.nodir)return;let i;if(this.opts.realpath){if(i=e.realpathCached()||await e.realpath(),!i)return;e=i}let n=e.isUnknown()||this.opts.stat?await e.lstat():e;if(this.opts.follow&&this.opts.nodir&&n?.isSymbolicLink()){let e=await n.realpath();e&&(e.isUnknown()||this.opts.stat)&&await e.lstat()}return this.matchCheckTest(n,t)}matchCheckTest(e,t){return!e||!(this.maxDepth===1/0||e.depth()<=this.maxDepth)||t&&!e.canReaddir()||this.opts.nodir&&e.isDirectory()||this.opts.nodir&&this.opts.follow&&e.isSymbolicLink()&&e.realpathCached()?.isDirectory()||this.#n(e)?void 0:e}matchCheckSync(e,t){if(t&&this.opts.nodir)return;let i;if(this.opts.realpath){if(i=e.realpathCached()||e.realpathSync(),!i)return;e=i}let n=e.isUnknown()||this.opts.stat?e.lstatSync():e;if(this.opts.follow&&this.opts.nodir&&n?.isSymbolicLink()){let e=n.realpathSync();e&&(e?.isUnknown()||this.opts.stat)&&e.lstatSync()}return this.matchCheckTest(n,t)}matchFinish(e,t){if(this.#n(e))return;if(!this.includeChildMatches&&this.#t?.add){let t=`${e.relativePosix()}/**`;this.#t.add(t)}let i=void 0===this.opts.absolute?t:this.opts.absolute;this.seen.add(e);let n=this.opts.mark&&e.isDirectory()?this.#i:"";if(this.opts.withFileTypes)this.matchEmit(e);else if(i){let t=this.opts.posix?e.fullpathPosix():e.fullpath();this.matchEmit(t+n)}else{let t=this.opts.posix?e.relativePosix():e.relative(),i=this.opts.dotRelative&&!t.startsWith(".."+this.#i)?"."+this.#i:"";this.matchEmit(t?i+t+n:"."+n)}}async match(e,t,i){let n=await this.matchCheck(e,i);n&&this.matchFinish(n,t)}matchSync(e,t,i){let n=this.matchCheckSync(e,i);n&&this.matchFinish(n,t)}walkCB(e,t,i){this.signal?.aborted&&i(),this.walkCB2(e,t,new n.Processor(this.opts),i)}walkCB2(e,t,i,n){if(this.#r(e))return n();if(this.signal?.aborted&&n(),this.paused)return void this.onResume(()=>this.walkCB2(e,t,i,n));i.processPatterns(e,t);let r=1,o=()=>{0===--r&&n()};for(let[e,t,n]of i.matches.entries())this.#n(e)||(r++,this.match(e,t,n).then(()=>o()));for(let e of i.subwalkTargets()){if(this.maxDepth!==1/0&&e.depth()>=this.maxDepth)continue;r++;let t=e.readdirCached();e.calledReaddir()?this.walkCB3(e,t,i,o):e.readdirCB((t,n)=>this.walkCB3(e,n,i,o),!0)}o()}walkCB3(e,t,i,n){i=i.filterEntries(e,t);let r=1,o=()=>{0===--r&&n()};for(let[e,t,n]of i.matches.entries())this.#n(e)||(r++,this.match(e,t,n).then(()=>o()));for(let[e,t]of i.subwalks.entries())r++,this.walkCB2(e,t,i.child(),o);o()}walkCBSync(e,t,i){this.signal?.aborted&&i(),this.walkCB2Sync(e,t,new n.Processor(this.opts),i)}walkCB2Sync(e,t,i,n){if(this.#r(e))return n();if(this.signal?.aborted&&n(),this.paused)return void this.onResume(()=>this.walkCB2Sync(e,t,i,n));i.processPatterns(e,t);let r=1,o=()=>{0===--r&&n()};for(let[e,t,n]of i.matches.entries())this.#n(e)||this.matchSync(e,t,n);for(let e of i.subwalkTargets()){if(this.maxDepth!==1/0&&e.depth()>=this.maxDepth)continue;r++;let t=e.readdirSync();this.walkCB3Sync(e,t,i,o)}o()}walkCB3Sync(e,t,i,n){i=i.filterEntries(e,t);let r=1,o=()=>{0===--r&&n()};for(let[e,t,n]of i.matches.entries())this.#n(e)||this.matchSync(e,t,n);for(let[e,t]of i.subwalks.entries())r++,this.walkCB2Sync(e,t,i.child(),o);o()}};e.GlobUtil=r,e.GlobWalker=class extends r{matches=new Set;constructor(e,t,i){super(e,t,i)}matchEmit(e){this.matches.add(e)}async walk(){if(this.signal?.aborted)throw this.signal.reason;return this.path.isUnknown()&&await this.path.lstat(),await new Promise((e,t)=>{this.walkCB(this.path,this.patterns,()=>{this.signal?.aborted?t(this.signal.reason):e(this.matches)})}),this.matches}walkSync(){if(this.signal?.aborted)throw this.signal.reason;return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,()=>{if(this.signal?.aborted)throw this.signal.reason}),this.matches}},e.GlobStream=class extends r{results;constructor(e,i,n){super(e,i,n),this.results=new t.Minipass({signal:this.signal,objectMode:!0}),this.results.on("drain",()=>this.resume()),this.results.on("resume",()=>this.resume())}matchEmit(e){this.results.write(e),this.results.flowing||this.pause()}stream(){let e=this.path;return e.isUnknown()?e.lstat().then(()=>{this.walkCB(e,this.patterns,()=>this.results.end())}):this.walkCB(e,this.patterns,()=>this.results.end()),this.results}streamSync(){return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,()=>this.results.end()),this.results}}}),_=n(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Glob=void 0;var t=h(),n=i(3136),r=f(),o=g(),s=v(),a="object"==typeof process&&process&&"string"==typeof process.platform?process.platform:"linux",c=class{absolute;cwd;root;dot;dotRelative;follow;ignore;magicalBraces;mark;matchBase;maxDepth;nobrace;nocase;nodir;noext;noglobstar;pattern;platform;realpath;scurry;stat;signal;windowsPathsNoEscape;withFileTypes;includeChildMatches;opts;patterns;constructor(e,i){if(!i)throw new TypeError("glob options required");if(this.withFileTypes=!!i.withFileTypes,this.signal=i.signal,this.follow=!!i.follow,this.dot=!!i.dot,this.dotRelative=!!i.dotRelative,this.nodir=!!i.nodir,this.mark=!!i.mark,i.cwd?(i.cwd instanceof URL||i.cwd.startsWith("file://"))&&(i.cwd=(0,n.fileURLToPath)(i.cwd)):this.cwd="",this.cwd=i.cwd||"",this.root=i.root,this.magicalBraces=!!i.magicalBraces,this.nobrace=!!i.nobrace,this.noext=!!i.noext,this.realpath=!!i.realpath,this.absolute=i.absolute,this.includeChildMatches=!1!==i.includeChildMatches,this.noglobstar=!!i.noglobstar,this.matchBase=!!i.matchBase,this.maxDepth="number"==typeof i.maxDepth?i.maxDepth:1/0,this.stat=!!i.stat,this.ignore=i.ignore,this.withFileTypes&&void 0!==this.absolute)throw new Error("cannot set absolute and withFileTypes:true");if("string"==typeof e&&(e=[e]),this.windowsPathsNoEscape=!!i.windowsPathsNoEscape||!1===i.allowWindowsEscape,this.windowsPathsNoEscape&&(e=e.map(e=>e.replace(/\\/g,"/"))),this.matchBase){if(i.noglobstar)throw new TypeError("base matching requires globstar");e=e.map(e=>e.includes("/")?e:`./**/${e}`)}if(this.pattern=e,this.platform=i.platform||a,this.opts={...i,platform:this.platform},i.scurry){if(this.scurry=i.scurry,void 0!==i.nocase&&i.nocase!==i.scurry.nocase)throw new Error("nocase option contradicts provided scurry option")}else{let e="win32"===i.platform?r.PathScurryWin32:"darwin"===i.platform?r.PathScurryDarwin:i.platform?r.PathScurryPosix:r.PathScurry;this.scurry=new e(this.cwd,{nocase:i.nocase,fs:i.fs})}this.nocase=this.scurry.nocase;let s="darwin"===this.platform||"win32"===this.platform,c={braceExpandMax:1e4,...i,dot:this.dot,matchBase:this.matchBase,nobrace:this.nobrace,nocase:this.nocase,nocaseMagicOnly:s,nocomment:!0,noext:this.noext,nonegate:!0,optimizationLevel:2,platform:this.platform,windowsPathsNoEscape:this.windowsPathsNoEscape,debug:!!this.opts.debug},l=this.pattern.map(e=>new t.Minimatch(e,c)),[u,h]=l.reduce((e,t)=>(e[0].push(...t.set),e[1].push(...t.globParts),e),[[],[]]);this.patterns=u.map((e,t)=>{let i=h[t];if(!i)throw new Error("invalid pattern object");return new o.Pattern(e,i,0,this.platform)})}async walk(){return[...await new s.GlobWalker(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).walk()]}walkSync(){return[...new s.GlobWalker(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).walkSync()]}stream(){return new s.GlobStream(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).stream()}streamSync(){return new s.GlobStream(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).streamSync()}iterateSync(){return this.streamSync()[Symbol.iterator]()}[Symbol.iterator](){return this.iterateSync()}iterate(){return this.stream()[Symbol.asyncIterator]()}[Symbol.asyncIterator](){return this.iterate()}};e.Glob=c}),b=n(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.hasMagic=void 0;var t=h();e.hasMagic=(e,i={})=>{Array.isArray(e)||(e=[e]);for(let n of e)if(new t.Minimatch(n,i).hasMagic())return!0;return!1}});t.TI=t.OH=t.nl=t.qD=t.Td=t.Qo=void 0,t.globSync=R;var w=h(),D=_(),T=b();h(),_(),b(),m();function S(e,t={}){return new D.Glob(e,t).streamSync()}function C(e,t={}){return new D.Glob(e,t).stream()}function R(e,t={}){return new D.Glob(e,t).walkSync()}async function E(e,t={}){return new D.Glob(e,t).walk()}function P(e,t={}){return new D.Glob(e,t).iterateSync()}function x(e,t={}){return new D.Glob(e,t).iterate()}t.Qo=S,t.Td=Object.assign(C,{sync:S}),t.qD=P,t.nl=Object.assign(x,{sync:P}),t.OH=Object.assign(R,{stream:S,iterate:P}),t.TI=Object.assign(E,{glob:E,globSync:R,sync:t.OH,globStream:C,stream:t.Td,globStreamSync:S,streamSync:t.Qo,globIterate:x,iterate:t.nl,globIterateSync:P,iterateSync:t.qD,Glob:D.Glob,hasMagic:T.hasMagic,escape:w.escape,unescape:w.unescape}),t.TI.glob=t.TI},9274(e,t){"use strict";t.assertValidPattern=void 0,t.assertValidPattern=e=>{if("string"!=typeof e)throw new TypeError("invalid pattern");if(e.length>65536)throw new TypeError("pattern is too long")}},1674(e,t,i){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.AST=void 0;const r=i(3843),o=i(4116),s=new Set(["!","?","+","*","@"]),a=e=>s.has(e),c=e=>a(e.type),l=new Map([["!",["@"]],["?",["?","@"]],["@",["@"]],["*",["*","+","?","@"]],["+",["+","@"]]]),u=new Map([["!",["?"]],["@",["?"]],["+",["?","*"]]]),h=new Map([["!",["?","@"]],["?",["?","@"]],["@",["?","@"]],["*",["*","+","?","@"]],["+",["+","@","?","*"]]]),d=new Map([["!",new Map([["!","@"]])],["?",new Map([["*","*"],["+","*"]])],["@",new Map([["!","!"],["?","?"],["@","@"],["*","*"],["+","+"]])],["+",new Map([["?","*"],["*","*"]])]]),p="(?!\\.)",f=new Set(["[","."]),g=new Set(["..","."]),m=new Set("().*{}+?[]^$\\!"),y=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),v="[^/]",_=v+"*?",b=v+"+?";let w=0;class D{type;#V;#K;#Y=!1;#X=[];#J;#Q;#Z;#ee=!1;#te;#ie;#ne=!1;id=++w;get depth(){return(this.#J?.depth??-1)+1}[Symbol.for("nodejs.util.inspect.custom")](){return{"@@type":"AST",id:this.id,type:this.type,root:this.#V.id,parent:this.#J?.id,depth:this.depth,partsLength:this.#X.length,parts:this.#X}}constructor(e,t,i={}){this.type=e,e&&(this.#K=!0),this.#J=t,this.#V=this.#J?this.#J.#V:this,this.#te=this.#V===this?i:this.#V.#te,this.#Z=this.#V===this?[]:this.#V.#Z,"!"!==e||this.#V.#ee||this.#Z.push(this),this.#Q=this.#J?this.#J.#X.length:0}get hasMagic(){if(void 0!==this.#K)return this.#K;for(const e of this.#X)if("string"!=typeof e&&(e.type||e.hasMagic))return this.#K=!0;return this.#K}toString(){return void 0!==this.#ie?this.#ie:this.type?this.#ie=this.type+"("+this.#X.map(e=>String(e)).join("|")+")":this.#ie=this.#X.map(e=>String(e)).join("")}#re(){if(this!==this.#V)throw new Error("should only call on root");if(this.#ee)return this;let e;for(this.toString(),this.#ee=!0;e=this.#Z.pop();){if("!"!==e.type)continue;let t=e,i=t.#J;for(;i;){for(let n=t.#Q+1;!i.type&&n<i.#X.length;n++)for(const t of e.#X){if("string"==typeof t)throw new Error("string part in extglob AST??");t.copyIn(i.#X[n])}t=i,i=t.#J}}return this}push(...e){for(const t of e)if(""!==t){if("string"!=typeof t&&!(t instanceof n&&t.#J===this))throw new Error("invalid part: "+t);this.#X.push(t)}}toJSON(){const e=null===this.type?this.#X.slice().map(e=>"string"==typeof e?e:e.toJSON()):[this.type,...this.#X.map(e=>e.toJSON())];return this.isStart()&&!this.type&&e.unshift([]),this.isEnd()&&(this===this.#V||this.#V.#ee&&"!"===this.#J?.type)&&e.push({}),e}isStart(){if(this.#V===this)return!0;if(!this.#J?.isStart())return!1;if(0===this.#Q)return!0;const e=this.#J;for(let t=0;t<this.#Q;t++){const i=e.#X[t];if(!(i instanceof n&&"!"===i.type))return!1}return!0}isEnd(){if(this.#V===this)return!0;if("!"===this.#J?.type)return!0;if(!this.#J?.isEnd())return!1;if(!this.type)return this.#J?.isEnd();const e=this.#J?this.#J.#X.length:0;return this.#Q===e-1}copyIn(e){"string"==typeof e?this.push(e):this.push(e.clone(this))}clone(e){const t=new n(this.type,e);for(const e of this.#X)t.copyIn(e);return t}static#oe(e,t,i,r,o){const s=r.maxExtglobRecursion??2;let c=!1,l=!1,u=-1,h=!1;if(null===t.type){let d=i,p="";for(;d<e.length;){const i=e.charAt(d++);if(c||"\\"===i)c=!c,p+=i;else if(l)d===u+1?"^"!==i&&"!"!==i||(h=!0):"]"!==i||d===u+2&&h||(l=!1),p+=i;else if("["!==i){if(!r.noext&&a(i)&&"("===e.charAt(d)&&o<=s){t.push(p),p="";const s=new n(i,t);d=n.#oe(e,s,d,r,o+1),t.push(s);continue}p+=i}else l=!0,u=d,h=!1,p+=i}return t.push(p),d}let d=i+1,p=new n(null,t);const f=[];let g="";for(;d<e.length;){const i=e.charAt(d++);if(c||"\\"===i)c=!c,g+=i;else if(l)d===u+1?"^"!==i&&"!"!==i||(h=!0):"]"!==i||d===u+2&&h||(l=!1),g+=i;else if("["!==i){if(!r.noext&&a(i)&&"("===e.charAt(d)&&(o<=s||t&&t.#se(i))){const s=t&&t.#se(i)?0:1;p.push(g),g="";const a=new n(i,p);p.push(a),d=n.#oe(e,a,d,r,o+s);continue}if("|"!==i){if(")"===i)return""===g&&0===t.#X.length&&(t.#ne=!0),p.push(g),g="",t.push(...f,p),d;g+=i}else p.push(g),g="",f.push(p),p=new n(null,t)}else l=!0,u=d,h=!1,g+=i}return t.type=null,t.#K=void 0,t.#X=[e.substring(i-1)],d}#ae(e){return this.#ce(e,u)}#ce(e,t=l){if(!e||"object"!=typeof e||null!==e.type||1!==e.#X.length||null===this.type)return!1;const i=e.#X[0];return!(!i||"object"!=typeof i||null===i.type)&&this.#se(i.type,t)}#se(e,t=h){return!!t.get(this.type)?.includes(e)}#le(e,t){const i=e.#X[0],r=new n(null,i,this.options);r.#X.push(""),i.push(r),this.#ue(e,t)}#ue(e,t){const i=e.#X[0];this.#X.splice(t,1,...i.#X);for(const e of i.#X)"object"==typeof e&&(e.#J=this);this.#ie=void 0}#he(e){const t=d.get(this.type);return!!t?.has(e)}#de(e){if(!e||"object"!=typeof e||null!==e.type||1!==e.#X.length||null===this.type||1!==this.#X.length)return!1;const t=e.#X[0];return!(!t||"object"!=typeof t||null===t.type)&&this.#he(t.type)}#pe(e){const t=d.get(this.type),i=e.#X[0],n=t?.get(i.type);if(!n)return!1;this.#X=i.#X;for(const e of this.#X)"object"==typeof e&&(e.#J=this);this.type=n,this.#ie=void 0,this.#ne=!1}static fromGlob(e,t={}){const i=new n(null,void 0,t);return n.#oe(e,i,0,t,0),i}toMMPattern(){if(this!==this.#V)return this.#V.toMMPattern();const e=this.toString(),[t,i,n,r]=this.toRegExpSource();if(!(n||this.#K||this.#te.nocase&&!this.#te.nocaseMagicOnly&&e.toUpperCase()!==e.toLowerCase()))return i;const o=(this.#te.nocase?"i":"")+(r?"u":"");return Object.assign(new RegExp(`^${t}$`,o),{_src:t,_glob:e})}get options(){return this.#te}toRegExpSource(e){const t=e??!!this.#te.dot;if(this.#V===this&&(this.#fe(),this.#re()),!c(this)){const i=this.isStart()&&this.isEnd()&&!this.#X.some(e=>"string"!=typeof e),r=this.#X.map(t=>{const[r,o,s,a]="string"==typeof t?n.#ge(t,this.#K,i):t.toRegExpSource(e);return this.#K=this.#K||s,this.#Y=this.#Y||a,r}).join("");let s="";if(this.isStart()&&"string"==typeof this.#X[0]&&(1!==this.#X.length||!g.has(this.#X[0]))){const i=f,n=t&&i.has(r.charAt(0))||r.startsWith("\\.")&&i.has(r.charAt(2))||r.startsWith("\\.\\.")&&i.has(r.charAt(4)),o=!t&&!e&&i.has(r.charAt(0));s=n?"(?!(?:^|/)\\.\\.?(?:$|/))":o?p:""}let a="";return this.isEnd()&&this.#V.#ee&&"!"===this.#J?.type&&(a="(?:$|\\/)"),[s+r+a,(0,o.unescape)(r),this.#K=!!this.#K,this.#Y]}const i="*"===this.type||"+"===this.type,r="!"===this.type?"(?:(?!(?:":"(?:";let s=this.#me(t);if(this.isStart()&&this.isEnd()&&!s&&"!"!==this.type){const e=this.toString(),t=this;return t.#X=[e],t.type=null,t.#K=void 0,[e,(0,o.unescape)(this.toString()),!1,!1]}let a=!i||e||t?"":this.#me(!0);a===s&&(a=""),a&&(s=`(?:${s})(?:${a})*?`);let l="";return l="!"===this.type&&this.#ne?(this.isStart()&&!t?p:"")+b:r+s+("!"===this.type?"))"+(!this.isStart()||t||e?"":p)+_+")":"@"===this.type?")":"?"===this.type?")?":"+"===this.type&&a?")":"*"===this.type&&a?")?":`)${this.type}`),[l,(0,o.unescape)(s),this.#K=!!this.#K,this.#Y]}#fe(){if(c(this)){let e=0,t=!1;do{t=!0;for(let e=0;e<this.#X.length;e++){const i=this.#X[e];"object"==typeof i&&(i.#fe(),this.#ce(i)?(t=!1,this.#ue(i,e)):this.#ae(i)?(t=!1,this.#le(i,e)):this.#de(i)&&(t=!1,this.#pe(i)))}}while(!t&&++e<10)}else for(const e of this.#X)"object"==typeof e&&e.#fe();this.#ie=void 0}#me(e){return this.#X.map(t=>{if("string"==typeof t)throw new Error("string type in extglob ast??");const[i,n,r,o]=t.toRegExpSource(e);return this.#Y=this.#Y||o,i}).filter(e=>!(this.isStart()&&this.isEnd()&&!e)).join("|")}static#ge(e,t,i=!1){let n=!1,s="",a=!1,c=!1;for(let o=0;o<e.length;o++){const l=e.charAt(o);if(n)n=!1,s+=(m.has(l)?"\\":"")+l;else if("*"!==l)if(c=!1,"\\"!==l){if("["===l){const[i,n,c,l]=(0,r.parseClass)(e,o);if(c){s+=i,a=a||n,o+=c-1,t=t||l;continue}}"?"!==l?s+=y(l):(s+=v,t=!0)}else o===e.length-1?s+="\\\\":n=!0;else{if(c)continue;c=!0,s+=i&&/^[*]+$/.test(e)?b:_,t=!0}}return[s,(0,o.unescape)(e),!!t,a]}}t.AST=D,n=D},3843(e,t){"use strict";t.parseClass=void 0;const i={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},n=e=>e.replace(/[[\]\\-]/g,"\\$&"),r=e=>e.join("");t.parseClass=(e,t)=>{const o=t;if("["!==e.charAt(o))throw new Error("not in a brace expression");const s=[],a=[];let c=o+1,l=!1,u=!1,h=!1,d=!1,p=o,f="";e:for(;c<e.length;){const t=e.charAt(c);if("!"!==t&&"^"!==t||c!==o+1){if("]"===t&&l&&!h){p=c+1;break}if(l=!0,"\\"!==t||h){if("["===t&&!h)for(const[t,[n,r,l]]of Object.entries(i))if(e.startsWith(t,c)){if(f)return["$.",!1,e.length-o,!0];c+=t.length,l?a.push(n):s.push(n),u=u||r;continue e}h=!1,f?(t>f?s.push(n(f)+"-"+n(t)):t===f&&s.push(n(t)),f="",c++):e.startsWith("-]",c+1)?(s.push(n(t+"-")),c+=2):e.startsWith("-",c+1)?(f=t,c+=2):(s.push(n(t)),c++)}else h=!0,c++}else d=!0,c++}if(p<c)return["",!1,0,!1];if(!s.length&&!a.length)return["$.",!1,e.length-o,!0];if(0===a.length&&1===s.length&&/^\\?.$/.test(s[0])&&!d){return[(g=2===s[0].length?s[0].slice(-1):s[0],g.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")),!1,p-o,!1]}var g;const m="["+(d?"^":"")+r(s)+"]",y="["+(d?"":"^")+r(a)+"]";return[s.length&&a.length?"("+m+"|"+y+")":s.length?m:y,u,p-o,!0]}},2363(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.escape=void 0,t.escape=(e,{windowsPathsNoEscape:t=!1,magicalBraces:i=!1}={})=>i?t?e.replace(/[?*()[\]{}]/g,"[$&]"):e.replace(/[?*()[\]\\{}]/g,"\\$&"):t?e.replace(/[?*()[\]]/g,"[$&]"):e.replace(/[?*()[\]\\]/g,"\\$&")},8722(e,t,i){"use strict";t.YW=t.AC=t.KA=t.NT=t.pb=t.ZN=t.Vn=t.minimatch=void 0;const n=i(305),r=i(9274),o=i(1674),s=i(2363),a=i(4116);t.minimatch=(e,t,i={})=>((0,r.assertValidPattern)(t),!(!i.nocomment&&"#"===t.charAt(0))&&new k(t,i).match(e));const c=/^\*+([^+@!?*[(]*)$/,l=e=>t=>!t.startsWith(".")&&t.endsWith(e),u=e=>t=>t.endsWith(e),h=e=>(e=e.toLowerCase(),t=>!t.startsWith(".")&&t.toLowerCase().endsWith(e)),d=e=>(e=e.toLowerCase(),t=>t.toLowerCase().endsWith(e)),p=/^\*+\.\*+$/,f=e=>!e.startsWith(".")&&e.includes("."),g=e=>"."!==e&&".."!==e&&e.includes("."),m=/^\.\*+$/,y=e=>"."!==e&&".."!==e&&e.startsWith("."),v=/^\*+$/,_=e=>0!==e.length&&!e.startsWith("."),b=e=>0!==e.length&&"."!==e&&".."!==e,w=/^\?+([^+@!?*[(]*)?$/,D=([e,t=""])=>{const i=R([e]);return t?(t=t.toLowerCase(),e=>i(e)&&e.toLowerCase().endsWith(t)):i},T=([e,t=""])=>{const i=E([e]);return t?(t=t.toLowerCase(),e=>i(e)&&e.toLowerCase().endsWith(t)):i},S=([e,t=""])=>{const i=E([e]);return t?e=>i(e)&&e.endsWith(t):i},C=([e,t=""])=>{const i=R([e]);return t?e=>i(e)&&e.endsWith(t):i},R=([e])=>{const t=e.length;return e=>e.length===t&&!e.startsWith(".")},E=([e])=>{const t=e.length;return e=>e.length===t&&"."!==e&&".."!==e},P="object"==typeof process&&process?"object"==typeof process.env&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix";t.Vn="win32"===P?"\\":"/",t.minimatch.sep=t.Vn,t.ZN=Symbol("globstar **"),t.minimatch.GLOBSTAR=t.ZN,t.pb=(e,i={})=>n=>(0,t.minimatch)(n,e,i),t.minimatch.filter=t.pb;const x=(e,t={})=>Object.assign({},e,t);t.NT=e=>{if(!e||"object"!=typeof e||!Object.keys(e).length)return t.minimatch;const i=t.minimatch;return Object.assign((t,n,r={})=>i(t,n,x(e,r)),{Minimatch:class extends i.Minimatch{constructor(t,i={}){super(t,x(e,i))}static defaults(t){return i.defaults(x(e,t)).Minimatch}},AST:class extends i.AST{constructor(t,i,n={}){super(t,i,x(e,n))}static fromGlob(t,n={}){return i.AST.fromGlob(t,x(e,n))}},unescape:(t,n={})=>i.unescape(t,x(e,n)),escape:(t,n={})=>i.escape(t,x(e,n)),filter:(t,n={})=>i.filter(t,x(e,n)),defaults:t=>i.defaults(x(e,t)),makeRe:(t,n={})=>i.makeRe(t,x(e,n)),braceExpand:(t,n={})=>i.braceExpand(t,x(e,n)),match:(t,n,r={})=>i.match(t,n,x(e,r)),sep:i.sep,GLOBSTAR:t.ZN})},t.minimatch.defaults=t.NT,t.KA=(e,t={})=>((0,r.assertValidPattern)(e),t.nobrace||!/\{(?:(?!\{).)*\}/.test(e)?[e]:(0,n.expand)(e,{max:t.braceExpandMax})),t.minimatch.braceExpand=t.KA,t.AC=(e,t={})=>new k(e,t).makeRe(),t.minimatch.makeRe=t.AC,t.YW=(e,t,i={})=>{const n=new k(t,i);return e=e.filter(e=>n.match(e)),n.options.nonull&&!e.length&&e.push(t),e},t.minimatch.match=t.YW;const O=/[?*]|[+@!]\(.*?\)|\[|\]/;class k{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;maxGlobstarRecursion;regexp;constructor(e,t={}){(0,r.assertValidPattern)(e),t=t||{},this.options=t,this.maxGlobstarRecursion=t.maxGlobstarRecursion??200,this.pattern=e,this.platform=t.platform||P,this.isWindows="win32"===this.platform,this.windowsPathsNoEscape=!!t.windowsPathsNoEscape||!1===t.allowWindowsEscape,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!t.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!t.nonegate,this.comment=!1,this.empty=!1,this.partial=!!t.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=void 0!==t.windowsNoMagicRoot?t.windowsNoMagicRoot:!(!this.isWindows||!this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(const e of this.set)for(const t of e)if("string"!=typeof t)return!0;return!1}debug(...e){}make(){const e=this.pattern,t=this.options;if(!t.nocomment&&"#"===e.charAt(0))return void(this.comment=!0);if(!e)return void(this.empty=!0);this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],t.debug&&(this.debug=(...e)=>console.error(...e)),this.debug(this.pattern,this.globSet);const i=this.globSet.map(e=>this.slashSplit(e));this.globParts=this.preprocess(i),this.debug(this.pattern,this.globParts);let n=this.globParts.map((e,t,i)=>{if(this.isWindows&&this.windowsNoMagicRoot){const t=!(""!==e[0]||""!==e[1]||"?"!==e[2]&&O.test(e[2])||O.test(e[3])),i=/^[a-z]:/i.test(e[0]);if(t)return[...e.slice(0,4),...e.slice(4).map(e=>this.parse(e))];if(i)return[e[0],...e.slice(1).map(e=>this.parse(e))]}return e.map(e=>this.parse(e))});if(this.debug(this.pattern,n),this.set=n.filter(e=>-1===e.indexOf(!1)),this.isWindows)for(let e=0;e<this.set.length;e++){const t=this.set[e];""===t[0]&&""===t[1]&&"?"===this.globParts[e][2]&&"string"==typeof t[3]&&/^[a-z]:$/i.test(t[3])&&(t[2]="?")}this.debug(this.pattern,this.set)}preprocess(e){if(this.options.noglobstar)for(const t of e)for(let e=0;e<t.length;e++)"**"===t[e]&&(t[e]="*");const{optimizationLevel:t=1}=this.options;return t>=2?(e=this.firstPhasePreProcess(e),e=this.secondPhasePreProcess(e)):e=t>=1?this.levelOneOptimize(e):this.adjascentGlobstarOptimize(e),e}adjascentGlobstarOptimize(e){return e.map(e=>{let t=-1;for(;-1!==(t=e.indexOf("**",t+1));){let i=t;for(;"**"===e[i+1];)i++;i!==t&&e.splice(t,i-t)}return e})}levelOneOptimize(e){return e.map(e=>0===(e=e.reduce((e,t)=>{const i=e[e.length-1];return"**"===t&&"**"===i?e:".."===t&&i&&".."!==i&&"."!==i&&"**"!==i?(e.pop(),e):(e.push(t),e)},[])).length?[""]:e)}levelTwoFileOptimize(e){Array.isArray(e)||(e=this.slashSplit(e));let t=!1;do{if(t=!1,!this.preserveMultipleSlashes){for(let i=1;i<e.length-1;i++){const n=e[i];1===i&&""===n&&""===e[0]||"."!==n&&""!==n||(t=!0,e.splice(i,1),i--)}"."!==e[0]||2!==e.length||"."!==e[1]&&""!==e[1]||(t=!0,e.pop())}let i=0;for(;-1!==(i=e.indexOf("..",i+1));){const n=e[i-1];!n||"."===n||".."===n||"**"===n||this.isWindows&&/^[a-z]:$/i.test(n)||(t=!0,e.splice(i-1,2),i-=2)}}while(t);return 0===e.length?[""]:e}firstPhasePreProcess(e){let t=!1;do{t=!1;for(let i of e){let n=-1;for(;-1!==(n=i.indexOf("**",n+1));){let r=n;for(;"**"===i[r+1];)r++;r>n&&i.splice(n+1,r-n);let o=i[n+1];const s=i[n+2],a=i[n+3];if(".."!==o)continue;if(!s||"."===s||".."===s||!a||"."===a||".."===a)continue;t=!0,i.splice(n,1);const c=i.slice(0);c[n]="**",e.push(c),n--}if(!this.preserveMultipleSlashes){for(let e=1;e<i.length-1;e++){const n=i[e];1===e&&""===n&&""===i[0]||"."!==n&&""!==n||(t=!0,i.splice(e,1),e--)}"."!==i[0]||2!==i.length||"."!==i[1]&&""!==i[1]||(t=!0,i.pop())}let r=0;for(;-1!==(r=i.indexOf("..",r+1));){const e=i[r-1];if(e&&"."!==e&&".."!==e&&"**"!==e){t=!0;const e=1===r&&"**"===i[r+1]?["."]:[];i.splice(r-1,2,...e),0===i.length&&i.push(""),r-=2}}}}while(t);return e}secondPhasePreProcess(e){for(let t=0;t<e.length-1;t++)for(let i=t+1;i<e.length;i++){const n=this.partsMatch(e[t],e[i],!this.preserveMultipleSlashes);if(n){e[t]=[],e[i]=n;break}}return e.filter(e=>e.length)}partsMatch(e,t,i=!1){let n=0,r=0,o=[],s="";for(;n<e.length&&r<t.length;)if(e[n]===t[r])o.push("b"===s?t[r]:e[n]),n++,r++;else if(i&&"**"===e[n]&&t[r]===e[n+1])o.push(e[n]),n++;else if(i&&"**"===t[r]&&e[n]===t[r+1])o.push(t[r]),r++;else if("*"!==e[n]||!t[r]||!this.options.dot&&t[r].startsWith(".")||"**"===t[r]){if("*"!==t[r]||!e[n]||!this.options.dot&&e[n].startsWith(".")||"**"===e[n])return!1;if("a"===s)return!1;s="b",o.push(t[r]),n++,r++}else{if("b"===s)return!1;s="a",o.push(e[n]),n++,r++}return e.length===t.length&&o}parseNegate(){if(this.nonegate)return;const e=this.pattern;let t=!1,i=0;for(let n=0;n<e.length&&"!"===e.charAt(n);n++)t=!t,i++;i&&(this.pattern=e.slice(i)),this.negate=t}matchOne(e,i,n=!1){let r=0,o=0;if(this.isWindows){const t="string"==typeof e[0]&&/^[a-z]:$/i.test(e[0]),n=!t&&""===e[0]&&""===e[1]&&"?"===e[2]&&/^[a-z]:$/i.test(e[3]),s="string"==typeof i[0]&&/^[a-z]:$/i.test(i[0]),a=n?3:t?0:void 0,c=!s&&""===i[0]&&""===i[1]&&"?"===i[2]&&"string"==typeof i[3]&&/^[a-z]:$/i.test(i[3])?3:s?0:void 0;if("number"==typeof a&&"number"==typeof c){const[t,n]=[e[a],i[c]];t.toLowerCase()===n.toLowerCase()&&(i[c]=t,o=c,r=a)}}const{optimizationLevel:s=1}=this.options;return s>=2&&(e=this.levelTwoFileOptimize(e)),i.includes(t.ZN)?this.#ye(e,i,n,r,o):this.#ve(e,i,n,r,o)}#ye(e,i,n,r,o){const s=i.indexOf(t.ZN,o),a=i.lastIndexOf(t.ZN),[c,l,u]=n?[i.slice(o,s),i.slice(s+1),[]]:[i.slice(o,s),i.slice(s+1,a),i.slice(a+1)];if(c.length){const t=e.slice(r,r+c.length);if(!this.#ve(t,c,n,0,0))return!1;r+=c.length,o+=c.length}let h=0;if(u.length){if(u.length+r>e.length)return!1;let t=e.length-u.length;if(this.#ve(e,u,n,t,0))h=u.length;else{if(""!==e[e.length-1]||r+u.length===e.length)return!1;if(t--,!this.#ve(e,u,n,t,0))return!1;h=u.length+1}}if(!l.length){let t=!!h;for(let i=r;i<e.length-h;i++){const n=String(e[i]);if(t=!0,"."===n||".."===n||!this.options.dot&&n.startsWith("."))return!1}return n||t}const d=[[[],0]];let p=d[0],f=0;const g=[0];for(const e of l)e===t.ZN?(g.push(f),p=[[],0],d.push(p)):(p[0].push(e),f++);let m=d.length-1;const y=e.length-h;for(const e of d)e[1]=y-(g[m--]+e[0].length);return!!this.#_e(e,d,r,0,n,0,!!h)}#_e(e,t,i,n,r,o,s){const a=t[n];if(!a){for(let t=i;t<e.length;t++){s=!0;const i=e[t];if("."===i||".."===i||!this.options.dot&&i.startsWith("."))return!1}return s}const[c,l]=a;for(;i<=l;){if(this.#ve(e.slice(0,i+c.length),c,r,i,0)&&o<this.maxGlobstarRecursion){const a=this.#_e(e,t,i+c.length,n+1,r,o+1,s);if(!1!==a)return a}const a=e[i];if("."===a||".."===a||!this.options.dot&&a.startsWith("."))return!1;i++}return r||null}#ve(e,i,n,r,o){let s,a,c,l;for(s=r,a=o,l=e.length,c=i.length;s<l&&a<c;s++,a++){this.debug("matchOne loop");let n,r=i[a],o=e[s];if(this.debug(i,r,o),!1===r||r===t.ZN)return!1;if("string"==typeof r?(n=o===r,this.debug("string match",r,o,n)):(n=r.test(o),this.debug("pattern match",r,o,n)),!n)return!1}if(s===l&&a===c)return!0;if(s===l)return n;if(a===c)return s===l-1&&""===e[s];throw new Error("wtf?")}braceExpand(){return(0,t.KA)(this.pattern,this.options)}parse(e){(0,r.assertValidPattern)(e);const i=this.options;if("**"===e)return t.ZN;if(""===e)return"";let n,s=null;(n=e.match(v))?s=i.dot?b:_:(n=e.match(c))?s=(i.nocase?i.dot?d:h:i.dot?u:l)(n[1]):(n=e.match(w))?s=(i.nocase?i.dot?T:D:i.dot?S:C)(n):(n=e.match(p))?s=i.dot?g:f:(n=e.match(m))&&(s=y);const a=o.AST.fromGlob(e,this.options).toMMPattern();return s&&"object"==typeof a&&Reflect.defineProperty(a,"test",{value:s}),a}makeRe(){if(this.regexp||!1===this.regexp)return this.regexp;const e=this.set;if(!e.length)return this.regexp=!1,this.regexp;const i=this.options,n=i.noglobstar?"[^/]*?":i.dot?"(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?":"(?:(?!(?:\\/|^)\\.).)*?",r=new Set(i.nocase?["i"]:[]);let o=e.map(e=>{const i=e.map(e=>{if(e instanceof RegExp)for(const t of e.flags.split(""))r.add(t);return"string"==typeof e?e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"):e===t.ZN?t.ZN:e._src});i.forEach((e,r)=>{const o=i[r+1],s=i[r-1];e===t.ZN&&s!==t.ZN&&(void 0===s?void 0!==o&&o!==t.ZN?i[r+1]="(?:\\/|"+n+"\\/)?"+o:i[r]=n:void 0===o?i[r-1]=s+"(?:\\/|\\/"+n+")?":o!==t.ZN&&(i[r-1]=s+"(?:\\/|\\/"+n+"\\/)"+o,i[r+1]=t.ZN))});const o=i.filter(e=>e!==t.ZN);if(this.partial&&o.length>=1){const e=[];for(let t=1;t<=o.length;t++)e.push(o.slice(0,t).join("/"));return"(?:"+e.join("|")+")"}return o.join("/")}).join("|");const[s,a]=e.length>1?["(?:",")"]:["",""];o="^"+s+o+a+"$",this.partial&&(o="^(?:\\/|"+s+o.slice(1,-1)+a+")$"),this.negate&&(o="^(?!"+o+").+$");try{this.regexp=new RegExp(o,[...r].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(e){return this.preserveMultipleSlashes?e.split("/"):this.isWindows&&/^\/\/[^/]+/.test(e)?["",...e.split(/\/+/)]:e.split(/\/+/)}match(e,t=this.partial){if(this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return""===e;if("/"===e&&t)return!0;const i=this.options;this.isWindows&&(e=e.split("\\").join("/"));const n=this.slashSplit(e);this.debug(this.pattern,"split",n);const r=this.set;this.debug(this.pattern,"set",r);let o=n[n.length-1];if(!o)for(let e=n.length-2;!o&&e>=0;e--)o=n[e];for(const e of r){let r=n;if(i.matchBase&&1===e.length&&(r=[o]),this.matchOne(r,e,t))return!!i.flipNegate||!this.negate}return!i.flipNegate&&this.negate}static defaults(e){return t.minimatch.defaults(e).Minimatch}}i(1674),i(2363),i(4116);t.minimatch.AST=o.AST,t.minimatch.Minimatch=k,t.minimatch.escape=s.escape,t.minimatch.unescape=a.unescape},4116(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.unescape=void 0,t.unescape=(e,{windowsPathsNoEscape:t=!1,magicalBraces:i=!0}={})=>i?t?e.replace(/\[([^/\\])\]/g,"$1"):e.replace(/((?!\\).|^)\[([^/\\])\]/g,"$1$2").replace(/\\([^/])/g,"$1"):t?e.replace(/\[([^/\\{}])\]/g,"$1"):e.replace(/((?!\\).|^)\[([^/\\{}])\]/g,"$1$2").replace(/\\([^/{}])/g,"$1")},1431(e,t){"use strict";t.debounce=function(e,t,i){var n=(i||{}).atBegin;return function(e,t,i){var n,r=i||{},o=r.noTrailing,s=void 0!==o&&o,a=r.noLeading,c=void 0!==a&&a,l=r.debounceMode,u=void 0===l?void 0:l,h=!1,d=0;function p(){n&&clearTimeout(n)}function f(){for(var i=arguments.length,r=new Array(i),o=0;o<i;o++)r[o]=arguments[o];var a=this,l=Date.now()-d;function f(){d=Date.now(),t.apply(a,r)}function g(){n=void 0}h||(c||!u||n||f(),p(),void 0===u&&l>e?c?(d=Date.now(),s||(n=setTimeout(u?g:f,e))):f():!0!==s&&(n=setTimeout(u?g:f,void 0===u?e-l:e)))}return f.cancel=function(e){var t=(e||{}).upcomingOnly,i=void 0!==t&&t;p(),h=!i},f}(e,t,{debounceMode:!1!==(void 0!==n&&n)})}},5172(e,t,i){"use strict";i.d(t,{TextDocument:()=>r});class n{constructor(e,t,i,n){this._uri=e,this._languageId=t,this._version=i,this._content=n,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){const t=this.offsetAt(e.start),i=this.offsetAt(e.end);return this._content.substring(t,i)}return this._content}update(e,t){for(const t of e)if(n.isIncremental(t)){const e=c(t.range),i=this.offsetAt(e.start),n=this.offsetAt(e.end);this._content=this._content.substring(0,i)+t.text+this._content.substring(n,this._content.length);const r=Math.max(e.start.line,0),o=Math.max(e.end.line,0);let a=this._lineOffsets;const l=s(t.text,!1,i);if(o-r===l.length)for(let e=0,t=l.length;e<t;e++)a[e+r+1]=l[e];else l.length<1e4?a.splice(r+1,o-r,...l):this._lineOffsets=a=a.slice(0,r+1).concat(l,a.slice(o+1));const u=t.text.length-(n-i);if(0!==u)for(let e=r+1+l.length,t=a.length;e<t;e++)a[e]=a[e]+u}else{if(!n.isFull(t))throw new Error("Unknown change event received");this._content=t.text,this._lineOffsets=void 0}this._version=t}getLineOffsets(){return void 0===this._lineOffsets&&(this._lineOffsets=s(this._content,!0)),this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);const t=this.getLineOffsets();let i=0,n=t.length;if(0===n)return{line:0,character:e};for(;i<n;){const r=Math.floor((i+n)/2);t[r]>e?n=r:i=r+1}const r=i-1;return{line:r,character:(e=this.ensureBeforeEOL(e,t[r]))-t[r]}}offsetAt(e){const t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;const i=t[e.line];if(e.character<=0)return i;const n=e.line+1<t.length?t[e.line+1]:this._content.length,r=Math.min(i+e.character,n);return this.ensureBeforeEOL(r,i)}ensureBeforeEOL(e,t){for(;e>t&&a(this._content.charCodeAt(e-1));)e--;return e}get lineCount(){return this.getLineOffsets().length}static isIncremental(e){const t=e;return null!=t&&"string"==typeof t.text&&void 0!==t.range&&(void 0===t.rangeLength||"number"==typeof t.rangeLength)}static isFull(e){const t=e;return null!=t&&"string"==typeof t.text&&void 0===t.range&&void 0===t.rangeLength}}var r;function o(e,t){if(e.length<=1)return e;const i=e.length/2|0,n=e.slice(0,i),r=e.slice(i);o(n,t),o(r,t);let s=0,a=0,c=0;for(;s<n.length&&a<r.length;){const i=t(n[s],r[a]);e[c++]=i<=0?n[s++]:r[a++]}for(;s<n.length;)e[c++]=n[s++];for(;a<r.length;)e[c++]=r[a++];return e}function s(e,t,i=0){const n=t?[i]:[];for(let t=0;t<e.length;t++){const r=e.charCodeAt(t);a(r)&&(13===r&&t+1<e.length&&10===e.charCodeAt(t+1)&&t++,n.push(i+t+1))}return n}function a(e){return 13===e||10===e}function c(e){const t=e.start,i=e.end;return t.line>i.line||t.line===i.line&&t.character>i.character?{start:i,end:t}:e}function l(e){const t=c(e.range);return t!==e.range?{newText:e.newText,range:t}:e}!function(e){e.create=function(e,t,i,r){return new n(e,t,i,r)},e.update=function(e,t,i){if(e instanceof n)return e.update(t,i),e;throw new Error("TextDocument.update: document must be created by TextDocument.create")},e.applyEdits=function(e,t){const i=e.getText(),n=o(t.map(l),(e,t)=>{const i=e.range.start.line-t.range.start.line;return 0===i?e.range.start.character-t.range.start.character:i});let r=0;const s=[];for(const t of n){const n=e.offsetAt(t.range.start);if(n<r)throw new Error("Overlapping edit");n>r&&s.push(i.substring(r,n)),t.newText.length&&s.push(t.newText),r=e.offsetAt(t.range.end)}return s.push(i.substr(r)),s.join("")}}(r||(r={}))},6203(e,t,i){"use strict";var n,r,o,s,a,c,l,u,h,d,p,f,g,m,y,v,_,b,w,D,T,S,C,R,E,P,x,O,k,N,A,M,I,q,j,F,L,W,U,B,$,z,H,G,V,K,Y,X,J,Q,Z,ee,te,ie,ne,re,oe,se,ae,ce,le,ue,he,de,pe,fe,ge,me,ye,ve,_e,be,we,De,Te,Se,Ce,Re,Ee,Pe,xe,Oe,ke,Ne;i.r(t),i.d(t,{AnnotatedTextEdit:()=>C,ApplyKind:()=>z,ChangeAnnotation:()=>T,ChangeAnnotationIdentifier:()=>S,CodeAction:()=>le,CodeActionContext:()=>ae,CodeActionKind:()=>oe,CodeActionTag:()=>ce,CodeActionTriggerKind:()=>se,CodeDescription:()=>_,CodeLens:()=>ue,Color:()=>h,ColorInformation:()=>d,ColorPresentation:()=>p,Command:()=>w,CompletionItem:()=>G,CompletionItemKind:()=>L,CompletionItemLabelDetails:()=>H,CompletionItemTag:()=>U,CompletionList:()=>V,CreateFile:()=>E,DeleteFile:()=>x,Diagnostic:()=>b,DiagnosticRelatedInformation:()=>m,DiagnosticSeverity:()=>y,DiagnosticTag:()=>v,DocumentHighlight:()=>Z,DocumentHighlightKind:()=>Q,DocumentLink:()=>de,DocumentSymbol:()=>re,DocumentUri:()=>n,FoldingRange:()=>g,FoldingRangeKind:()=>f,FormattingOptions:()=>he,Hover:()=>Y,InlayHint:()=>Te,InlayHintKind:()=>we,InlayHintLabelPart:()=>De,InlineCompletionContext:()=>xe,InlineCompletionItem:()=>Ce,InlineCompletionList:()=>Re,InlineCompletionTriggerKind:()=>Ee,InlineValueContext:()=>be,InlineValueEvaluatableExpression:()=>_e,InlineValueText:()=>ye,InlineValueVariableLookup:()=>ve,InsertReplaceEdit:()=>B,InsertTextFormat:()=>W,InsertTextMode:()=>$,LanguageKind:()=>I,Location:()=>l,LocationLink:()=>u,MarkedString:()=>K,MarkupContent:()=>F,MarkupKind:()=>j,OptionalVersionedTextDocumentIdentifier:()=>M,ParameterInformation:()=>X,Position:()=>a,Range:()=>c,RenameFile:()=>P,SelectedCompletionInfo:()=>Pe,SelectionRange:()=>pe,SemanticTokenModifiers:()=>ge,SemanticTokenTypes:()=>fe,SemanticTokens:()=>me,SignatureInformation:()=>J,SnippetTextEdit:()=>k,StringValue:()=>Se,SymbolInformation:()=>ie,SymbolKind:()=>ee,SymbolTag:()=>te,TextDocument:()=>ke,TextDocumentEdit:()=>R,TextDocumentIdentifier:()=>N,TextDocumentItem:()=>q,TextEdit:()=>D,URI:()=>r,VersionedTextDocumentIdentifier:()=>A,WorkspaceChange:()=>Ie,WorkspaceEdit:()=>O,WorkspaceFolder:()=>Oe,WorkspaceSymbol:()=>ne,integer:()=>o,uinteger:()=>s}),function(e){e.is=function(e){return"string"==typeof e}}(n||(n={})),function(e){e.is=function(e){return"string"==typeof e}}(r||(r={})),function(e){e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647,e.is=function(t){return"number"==typeof t&&e.MIN_VALUE<=t&&t<=e.MAX_VALUE}}(o||(o={})),function(e){e.MIN_VALUE=0,e.MAX_VALUE=2147483647,e.is=function(t){return"number"==typeof t&&e.MIN_VALUE<=t&&t<=e.MAX_VALUE}}(s||(s={})),function(e){e.create=function(e,t){return e===Number.MAX_VALUE&&(e=s.MAX_VALUE),t===Number.MAX_VALUE&&(t=s.MAX_VALUE),{line:e,character:t}},e.is=function(e){const t=e;return Ne.objectLiteral(t)&&Ne.uinteger(t.line)&&Ne.uinteger(t.character)}}(a||(a={})),function(e){e.create=function(e,t,i,n){if(Ne.uinteger(e)&&Ne.uinteger(t)&&Ne.uinteger(i)&&Ne.uinteger(n))return{start:a.create(e,t),end:a.create(i,n)};if(a.is(e)&&a.is(t))return{start:e,end:t};throw new Error(`Range#create called with invalid arguments[${e}, ${t}, ${i}, ${n}]`)},e.is=function(e){const t=e;return Ne.objectLiteral(t)&&a.is(t.start)&&a.is(t.end)}}(c||(c={})),function(e){e.create=function(e,t){return{uri:e,range:t}},e.is=function(e){const t=e;return Ne.objectLiteral(t)&&c.is(t.range)&&(Ne.string(t.uri)||Ne.undefined(t.uri))}}(l||(l={})),function(e){e.create=function(e,t,i,n){return{targetUri:e,targetRange:t,targetSelectionRange:i,originSelectionRange:n}},e.is=function(e){const t=e;return Ne.objectLiteral(t)&&c.is(t.targetRange)&&Ne.string(t.targetUri)&&c.is(t.targetSelectionRange)&&(c.is(t.originSelectionRange)||Ne.undefined(t.originSelectionRange))}}(u||(u={})),function(e){e.create=function(e,t,i,n){return{red:e,green:t,blue:i,alpha:n}},e.is=function(e){const t=e;return Ne.objectLiteral(t)&&Ne.numberRange(t.red,0,1)&&Ne.numberRange(t.green,0,1)&&Ne.numberRange(t.blue,0,1)&&Ne.numberRange(t.alpha,0,1)}}(h||(h={})),function(e){e.create=function(e,t){return{range:e,color:t}},e.is=function(e){const t=e;return Ne.objectLiteral(t)&&c.is(t.range)&&h.is(t.color)}}(d||(d={})),function(e){e.create=function(e,t,i){return{label:e,textEdit:t,additionalTextEdits:i}},e.is=function(e){const t=e;return Ne.objectLiteral(t)&&Ne.string(t.label)&&(Ne.undefined(t.textEdit)||D.is(t))&&(Ne.undefined(t.additionalTextEdits)||Ne.typedArray(t.additionalTextEdits,D.is))}}(p||(p={})),function(e){e.Comment="comment",e.Imports="imports",e.Region="region"}(f||(f={})),function(e){e.create=function(e,t,i,n,r,o){const s={startLine:e,endLine:t};return Ne.defined(i)&&(s.startCharacter=i),Ne.defined(n)&&(s.endCharacter=n),Ne.defined(r)&&(s.kind=r),Ne.defined(o)&&(s.collapsedText=o),s},e.is=function(e){const t=e;return Ne.objectLiteral(t)&&Ne.uinteger(t.startLine)&&Ne.uinteger(t.startLine)&&(Ne.undefined(t.startCharacter)||Ne.uinteger(t.startCharacter))&&(Ne.undefined(t.endCharacter)||Ne.uinteger(t.endCharacter))&&(Ne.undefined(t.kind)||Ne.string(t.kind))}}(g||(g={})),function(e){e.create=function(e,t){return{location:e,message:t}},e.is=function(e){const t=e;return Ne.defined(t)&&l.is(t.location)&&Ne.string(t.message)}}(m||(m={})),function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4}(y||(y={})),function(e){e.Unnecessary=1,e.Deprecated=2}(v||(v={})),function(e){e.is=function(e){const t=e;return Ne.objectLiteral(t)&&Ne.string(t.href)}}(_||(_={})),function(e){e.create=function(e,t,i,n,r,o){const s={range:e,message:t};return Ne.defined(i)&&(s.severity=i),Ne.defined(n)&&(s.code=n),Ne.defined(r)&&(s.source=r),Ne.defined(o)&&(s.relatedInformation=o),s},e.is=function(e){var t;const i=e;return Ne.defined(i)&&c.is(i.range)&&(Ne.string(i.message)||F.is(i.message))&&(Ne.number(i.severity)||Ne.undefined(i.severity))&&(Ne.integer(i.code)||Ne.string(i.code)||Ne.undefined(i.code))&&(Ne.undefined(i.codeDescription)||Ne.string(null===(t=i.codeDescription)||void 0===t?void 0:t.href))&&(Ne.string(i.source)||Ne.undefined(i.source))&&(Ne.undefined(i.relatedInformation)||Ne.typedArray(i.relatedInformation,m.is))},e.is3_17=function(e){return Ne.string(e.message)},e.getMessageString=function(e){if(Ne.string(e.message))return e.message;if(F.is(e.message))return e.message.value;throw new Error("Unknown message type "+typeof e.message)}}(b||(b={})),function(e){e.create=function(e,t,...i){const n={title:e,command:t};return Ne.defined(i)&&i.length>0&&(n.arguments=i),n},e.is=function(e){const t=e;return Ne.defined(t)&&Ne.string(t.title)&&(void 0===t.tooltip||Ne.string(t.tooltip))&&Ne.string(t.command)}}(w||(w={})),function(e){e.replace=function(e,t){return{range:e,newText:t}},e.insert=function(e,t){return{range:{start:e,end:e},newText:t}},e.del=function(e){return{range:e,newText:""}},e.is=function(e){const t=e;return Ne.objectLiteral(t)&&Ne.string(t.newText)&&c.is(t.range)}}(D||(D={})),function(e){e.create=function(e,t,i){const n={label:e};return void 0!==t&&(n.needsConfirmation=t),void 0!==i&&(n.description=i),n},e.is=function(e){const t=e;return Ne.objectLiteral(t)&&Ne.string(t.label)&&(Ne.boolean(t.needsConfirmation)||void 0===t.needsConfirmation)&&(Ne.string(t.description)||void 0===t.description)}}(T||(T={})),function(e){e.is=function(e){const t=e;return Ne.string(t)}}(S||(S={})),function(e){e.replace=function(e,t,i){return{range:e,newText:t,annotationId:i}},e.insert=function(e,t,i){return{range:{start:e,end:e},newText:t,annotationId:i}},e.del=function(e,t){return{range:e,newText:"",annotationId:t}},e.is=function(e){const t=e;return D.is(t)&&(T.is(t.annotationId)||S.is(t.annotationId))}}(C||(C={})),function(e){e.create=function(e,t){return{textDocument:e,edits:t}},e.is=function(e){const t=e;return Ne.defined(t)&&M.is(t.textDocument)&&Array.isArray(t.edits)}}(R||(R={})),function(e){e.create=function(e,t,i){const n={kind:"create",uri:e};return void 0===t||void 0===t.overwrite&&void 0===t.ignoreIfExists||(n.options=t),void 0!==i&&(n.annotationId=i),n},e.is=function(e){const t=e;return t&&"create"===t.kind&&Ne.string(t.uri)&&(void 0===t.options||(void 0===t.options.overwrite||Ne.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||Ne.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||S.is(t.annotationId))}}(E||(E={})),function(e){e.create=function(e,t,i,n){const r={kind:"rename",oldUri:e,newUri:t};return void 0===i||void 0===i.overwrite&&void 0===i.ignoreIfExists||(r.options=i),void 0!==n&&(r.annotationId=n),r},e.is=function(e){const t=e;return t&&"rename"===t.kind&&Ne.string(t.oldUri)&&Ne.string(t.newUri)&&(void 0===t.options||(void 0===t.options.overwrite||Ne.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||Ne.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||S.is(t.annotationId))}}(P||(P={})),function(e){e.create=function(e,t,i){const n={kind:"delete",uri:e};return void 0===t||void 0===t.recursive&&void 0===t.ignoreIfNotExists||(n.options=t),void 0!==i&&(n.annotationId=i),n},e.is=function(e){const t=e;return t&&"delete"===t.kind&&Ne.string(t.uri)&&(void 0===t.options||(void 0===t.options.recursive||Ne.boolean(t.options.recursive))&&(void 0===t.options.ignoreIfNotExists||Ne.boolean(t.options.ignoreIfNotExists)))&&(void 0===t.annotationId||S.is(t.annotationId))}}(x||(x={})),function(e){e.is=function(e){const t=e;return t&&(void 0!==t.changes||void 0!==t.documentChanges)&&(void 0===t.documentChanges||t.documentChanges.every(e=>Ne.string(e.kind)?E.is(e)||P.is(e)||x.is(e):R.is(e)))}}(O||(O={}));class Ae{constructor(e,t){this.edits=e,this.changeAnnotations=t}insert(e,t,i){let n,r;if(void 0===i?n=D.insert(e,t):S.is(i)?(r=i,n=C.insert(e,t,i)):(this.assertChangeAnnotations(this.changeAnnotations),r=this.changeAnnotations.manage(i),n=C.insert(e,t,r)),this.edits.push(n),void 0!==r)return r}replace(e,t,i){let n,r;if(void 0===i?n=D.replace(e,t):S.is(i)?(r=i,n=C.replace(e,t,i)):(this.assertChangeAnnotations(this.changeAnnotations),r=this.changeAnnotations.manage(i),n=C.replace(e,t,r)),this.edits.push(n),void 0!==r)return r}delete(e,t){let i,n;if(void 0===t?i=D.del(e):S.is(t)?(n=t,i=C.del(e,t)):(this.assertChangeAnnotations(this.changeAnnotations),n=this.changeAnnotations.manage(t),i=C.del(e,n)),this.edits.push(i),void 0!==n)return n}add(e){this.edits.push(e)}all(){return this.edits}clear(){this.edits.splice(0,this.edits.length)}assertChangeAnnotations(e){if(void 0===e)throw new Error("Text edit change is not configured to manage change annotations.")}}!function(e){e.is=function(e){const t=e;return Ne.objectLiteral(t)&&c.is(t.range)&&Se.isSnippet(t.snippet)&&(void 0===t.annotationId||T.is(t.annotationId)||S.is(t.annotationId))}}(k||(k={}));class Me{constructor(e){this._annotations=void 0===e?Object.create(null):e,this._counter=0,this._size=0}all(){return this._annotations}get size(){return this._size}manage(e,t){let i;if(S.is(e)?i=e:(i=this.nextId(),t=e),void 0!==this._annotations[i])throw new Error(`Id ${i} is already in use.`);if(void 0===t)throw new Error(`No annotation provided for id ${i}`);return this._annotations[i]=t,this._size++,i}nextId(){return this._counter++,this._counter.toString()}}class Ie{constructor(e){this._textEditChanges=Object.create(null),void 0!==e?(this._workspaceEdit=e,e.documentChanges?(this._changeAnnotations=new Me(e.changeAnnotations),e.changeAnnotations=this._changeAnnotations.all(),e.documentChanges.forEach(e=>{if(R.is(e)){const t=new Ae(e.edits,this._changeAnnotations);this._textEditChanges[e.textDocument.uri]=t}})):e.changes&&Object.keys(e.changes).forEach(t=>{const i=new Ae(e.changes[t]);this._textEditChanges[t]=i})):this._workspaceEdit={}}get edit(){return this.initDocumentChanges(),void 0!==this._changeAnnotations&&(0===this._changeAnnotations.size?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit}getTextEditChange(e){if(M.is(e)){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");const t={uri:e.uri,version:e.version};let i=this._textEditChanges[t.uri];if(!i){const e=[],n={textDocument:t,edits:e};this._workspaceEdit.documentChanges.push(n),i=new Ae(e,this._changeAnnotations),this._textEditChanges[t.uri]=i}return i}{if(this.initChanges(),void 0===this._workspaceEdit.changes)throw new Error("Workspace edit is not configured for normal text edit changes.");let t=this._textEditChanges[e];if(!t){const i=[];this._workspaceEdit.changes[e]=i,t=new Ae(i),this._textEditChanges[e]=t}return t}}initDocumentChanges(){void 0===this._workspaceEdit.documentChanges&&void 0===this._workspaceEdit.changes&&(this._changeAnnotations=new Me,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())}initChanges(){void 0===this._workspaceEdit.documentChanges&&void 0===this._workspaceEdit.changes&&(this._workspaceEdit.changes=Object.create(null))}createFile(e,t,i){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");let n,r,o;if(T.is(t)||S.is(t)?n=t:i=t,void 0===n?r=E.create(e,i):(o=S.is(n)?n:this._changeAnnotations.manage(n),r=E.create(e,i,o)),this._workspaceEdit.documentChanges.push(r),void 0!==o)return o}renameFile(e,t,i,n){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");let r,o,s;if(T.is(i)||S.is(i)?r=i:n=i,void 0===r?o=P.create(e,t,n):(s=S.is(r)?r:this._changeAnnotations.manage(r),o=P.create(e,t,n,s)),this._workspaceEdit.documentChanges.push(o),void 0!==s)return s}deleteFile(e,t,i){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");let n,r,o;if(T.is(t)||S.is(t)?n=t:i=t,void 0===n?r=x.create(e,i):(o=S.is(n)?n:this._changeAnnotations.manage(n),r=x.create(e,i,o)),this._workspaceEdit.documentChanges.push(r),void 0!==o)return o}}!function(e){e.create=function(e){return{uri:e}},e.is=function(e){const t=e;return Ne.defined(t)&&Ne.string(t.uri)}}(N||(N={})),function(e){e.create=function(e,t){return{uri:e,version:t}},e.is=function(e){const t=e;return Ne.defined(t)&&Ne.string(t.uri)&&Ne.integer(t.version)}}(A||(A={})),function(e){e.create=function(e,t){return{uri:e,version:t}},e.is=function(e){const t=e;return Ne.defined(t)&&Ne.string(t.uri)&&(null===t.version||Ne.integer(t.version))}}(M||(M={})),function(e){e.ABAP="abap",e.WindowsBat="bat",e.BibTeX="bibtex",e.Clojure="clojure",e.Coffeescript="coffeescript",e.C="c",e.CPP="cpp",e.CSharp="csharp",e.CSS="css",e.D="d",e.Delphi="pascal",e.Diff="diff",e.Dart="dart",e.Dockerfile="dockerfile",e.Elixir="elixir",e.Erlang="erlang",e.FSharp="fsharp",e.GitCommit="git-commit",e.GitRebase="git-rebase",e.Go="go",e.Groovy="groovy",e.Handlebars="handlebars",e.Haskell="haskell",e.HTML="html",e.Ini="ini",e.Java="java",e.JavaScript="javascript",e.JavaScriptReact="javascriptreact",e.JSON="json",e.LaTeX="latex",e.Less="less",e.Lua="lua",e.Makefile="makefile",e.Markdown="markdown",e.ObjectiveC="objective-c",e.ObjectiveCPP="objective-cpp",e.Pascal="pascal",e.Perl="perl",e.Perl6="perl6",e.PHP="php",e.Plaintext="plaintext",e.Powershell="powershell",e.Pug="jade",e.Python="python",e.R="r",e.Razor="razor",e.Ruby="ruby",e.Rust="rust",e.SCSS="scss",e.SASS="sass",e.Scala="scala",e.ShaderLab="shaderlab",e.ShellScript="shellscript",e.SQL="sql",e.Swift="swift",e.TypeScript="typescript",e.TypeScriptReact="typescriptreact",e.TeX="tex",e.VisualBasic="vb",e.XML="xml",e.XSL="xsl",e.YAML="yaml"}(I||(I={})),function(e){e.create=function(e,t,i,n){return{uri:e,languageId:t,version:i,text:n}},e.is=function(e){const t=e;return Ne.defined(t)&&Ne.string(t.uri)&&Ne.string(t.languageId)&&Ne.integer(t.version)&&Ne.string(t.text)}}(q||(q={})),function(e){e.PlainText="plaintext",e.Markdown="markdown",e.is=function(t){const i=t;return i===e.PlainText||i===e.Markdown}}(j||(j={})),function(e){e.is=function(e){const t=e;return Ne.objectLiteral(e)&&j.is(t.kind)&&Ne.string(t.value)}}(F||(F={})),function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25}(L||(L={})),function(e){e.PlainText=1,e.Snippet=2}(W||(W={})),function(e){e.Deprecated=1}(U||(U={})),function(e){e.create=function(e,t,i){return{newText:e,insert:t,replace:i}},e.is=function(e){const t=e;return t&&Ne.string(t.newText)&&c.is(t.insert)&&c.is(t.replace)}}(B||(B={})),function(e){e.asIs=1,e.adjustIndentation=2}($||($={})),function(e){e.Replace=1,e.Merge=2}(z||(z={})),function(e){e.is=function(e){const t=e;return t&&(Ne.string(t.detail)||void 0===t.detail)&&(Ne.string(t.description)||void 0===t.description)}}(H||(H={})),function(e){e.create=function(e){return{label:e}}}(G||(G={})),function(e){e.create=function(e,t){return{items:e||[],isIncomplete:!!t}}}(V||(V={})),function(e){e.fromPlainText=function(e){return e.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")},e.is=function(e){const t=e;return Ne.string(t)||Ne.objectLiteral(t)&&Ne.string(t.language)&&Ne.string(t.value)}}(K||(K={})),function(e){e.is=function(e){const t=e;return!!t&&Ne.objectLiteral(t)&&(F.is(t.contents)||K.is(t.contents)||Ne.typedArray(t.contents,K.is))&&(void 0===e.range||c.is(e.range))}}(Y||(Y={})),function(e){e.create=function(e,t){return t?{label:e,documentation:t}:{label:e}}}(X||(X={})),function(e){e.create=function(e,t,...i){const n={label:e};return Ne.defined(t)&&(n.documentation=t),Ne.defined(i)?n.parameters=i:n.parameters=[],n}}(J||(J={})),function(e){e.Text=1,e.Read=2,e.Write=3}(Q||(Q={})),function(e){e.create=function(e,t){const i={range:e};return Ne.number(t)&&(i.kind=t),i}}(Z||(Z={})),function(e){e.File=1,e.Module=2,e.Namespace=3,e.Package=4,e.Class=5,e.Method=6,e.Property=7,e.Field=8,e.Constructor=9,e.Enum=10,e.Interface=11,e.Function=12,e.Variable=13,e.Constant=14,e.String=15,e.Number=16,e.Boolean=17,e.Array=18,e.Object=19,e.Key=20,e.Null=21,e.EnumMember=22,e.Struct=23,e.Event=24,e.Operator=25,e.TypeParameter=26}(ee||(ee={})),function(e){e.Deprecated=1}(te||(te={})),function(e){e.create=function(e,t,i,n,r){const o={name:e,kind:t,location:{uri:n,range:i}};return r&&(o.containerName=r),o}}(ie||(ie={})),function(e){e.create=function(e,t,i,n){return void 0!==n?{name:e,kind:t,location:{uri:i,range:n}}:{name:e,kind:t,location:{uri:i}}}}(ne||(ne={})),function(e){e.create=function(e,t,i,n,r,o){const s={name:e,detail:t,kind:i,range:n,selectionRange:r};return void 0!==o&&(s.children=o),s},e.is=function(e){const t=e;return t&&Ne.string(t.name)&&Ne.number(t.kind)&&c.is(t.range)&&c.is(t.selectionRange)&&(void 0===t.detail||Ne.string(t.detail))&&(void 0===t.deprecated||Ne.boolean(t.deprecated))&&(void 0===t.children||Array.isArray(t.children))&&(void 0===t.tags||Array.isArray(t.tags))}}(re||(re={})),function(e){e.Empty="",e.QuickFix="quickfix",e.Refactor="refactor",e.RefactorExtract="refactor.extract",e.RefactorInline="refactor.inline",e.RefactorMove="refactor.move",e.RefactorRewrite="refactor.rewrite",e.Source="source",e.SourceOrganizeImports="source.organizeImports",e.SourceFixAll="source.fixAll",e.Notebook="notebook"}(oe||(oe={})),function(e){e.Invoked=1,e.Automatic=2}(se||(se={})),function(e){e.create=function(e,t,i){const n={diagnostics:e};return null!=t&&(n.only=t),null!=i&&(n.triggerKind=i),n},e.is=function(e){const t=e;return Ne.defined(t)&&Ne.typedArray(t.diagnostics,b.is)&&(void 0===t.only||Ne.typedArray(t.only,Ne.string))&&(void 0===t.triggerKind||t.triggerKind===se.Invoked||t.triggerKind===se.Automatic)}}(ae||(ae={})),function(e){e.LLMGenerated=1,e.is=function(t){return Ne.defined(t)&&t===e.LLMGenerated}}(ce||(ce={})),function(e){e.create=function(e,t,i){const n={title:e};let r=!0;return"string"==typeof t?(r=!1,n.kind=t):w.is(t)?n.command=t:n.edit=t,r&&void 0!==i&&(n.kind=i),n},e.is=function(e){const t=e;return t&&Ne.string(t.title)&&(void 0===t.diagnostics||Ne.typedArray(t.diagnostics,b.is))&&(void 0===t.kind||Ne.string(t.kind))&&(void 0!==t.edit||void 0!==t.command)&&(void 0===t.command||w.is(t.command))&&(void 0===t.isPreferred||Ne.boolean(t.isPreferred))&&(void 0===t.edit||O.is(t.edit))&&(void 0===t.tags||Ne.typedArray(t.tags,ce.is))}}(le||(le={})),function(e){e.create=function(e,t){const i={range:e};return Ne.defined(t)&&(i.data=t),i},e.is=function(e){const t=e;return Ne.defined(t)&&c.is(t.range)&&(Ne.undefined(t.command)||w.is(t.command))}}(ue||(ue={})),function(e){e.create=function(e,t){return{tabSize:e,insertSpaces:t}},e.is=function(e){const t=e;return Ne.defined(t)&&Ne.uinteger(t.tabSize)&&Ne.boolean(t.insertSpaces)}}(he||(he={})),function(e){e.create=function(e,t,i){return{range:e,target:t,data:i}},e.is=function(e){const t=e;return Ne.defined(t)&&c.is(t.range)&&(Ne.undefined(t.target)||Ne.string(t.target))}}(de||(de={})),function(e){e.create=function(e,t){return{range:e,parent:t}},e.is=function(t){const i=t;return Ne.objectLiteral(i)&&c.is(i.range)&&(void 0===i.parent||e.is(i.parent))}}(pe||(pe={})),function(e){e.namespace="namespace",e.type="type",e.class="class",e.enum="enum",e.interface="interface",e.struct="struct",e.typeParameter="typeParameter",e.parameter="parameter",e.variable="variable",e.property="property",e.enumMember="enumMember",e.event="event",e.function="function",e.method="method",e.macro="macro",e.keyword="keyword",e.modifier="modifier",e.comment="comment",e.string="string",e.number="number",e.regexp="regexp",e.operator="operator",e.decorator="decorator",e.label="label"}(fe||(fe={})),function(e){e.declaration="declaration",e.definition="definition",e.readonly="readonly",e.static="static",e.deprecated="deprecated",e.abstract="abstract",e.async="async",e.modification="modification",e.documentation="documentation",e.defaultLibrary="defaultLibrary"}(ge||(ge={})),function(e){e.is=function(e){const t=e;return Ne.objectLiteral(t)&&(void 0===t.resultId||"string"==typeof t.resultId)&&Array.isArray(t.data)&&(0===t.data.length||"number"==typeof t.data[0])}}(me||(me={})),function(e){e.create=function(e,t){return{range:e,text:t}},e.is=function(e){const t=e;return null!=t&&c.is(t.range)&&Ne.string(t.text)}}(ye||(ye={})),function(e){e.create=function(e,t,i){return{range:e,variableName:t,caseSensitiveLookup:i}},e.is=function(e){const t=e;return null!=t&&c.is(t.range)&&Ne.boolean(t.caseSensitiveLookup)&&(Ne.string(t.variableName)||void 0===t.variableName)}}(ve||(ve={})),function(e){e.create=function(e,t){return{range:e,expression:t}},e.is=function(e){const t=e;return null!=t&&c.is(t.range)&&(Ne.string(t.expression)||void 0===t.expression)}}(_e||(_e={})),function(e){e.create=function(e,t){return{frameId:e,stoppedLocation:t}},e.is=function(e){const t=e;return Ne.defined(t)&&c.is(e.stoppedLocation)}}(be||(be={})),function(e){e.Type=1,e.Parameter=2,e.is=function(e){return 1===e||2===e}}(we||(we={})),function(e){e.create=function(e){return{value:e}},e.is=function(e){const t=e;return Ne.objectLiteral(t)&&(void 0===t.tooltip||Ne.string(t.tooltip)||F.is(t.tooltip))&&(void 0===t.location||l.is(t.location))&&(void 0===t.command||w.is(t.command))}}(De||(De={})),function(e){e.create=function(e,t,i){const n={position:e,label:t};return void 0!==i&&(n.kind=i),n},e.is=function(e){const t=e;return Ne.objectLiteral(t)&&a.is(t.position)&&(Ne.string(t.label)||Ne.typedArray(t.label,De.is))&&(void 0===t.kind||we.is(t.kind))&&void 0===t.textEdits||Ne.typedArray(t.textEdits,D.is)&&(void 0===t.tooltip||Ne.string(t.tooltip)||F.is(t.tooltip))&&(void 0===t.paddingLeft||Ne.boolean(t.paddingLeft))&&(void 0===t.paddingRight||Ne.boolean(t.paddingRight))}}(Te||(Te={})),function(e){e.createSnippet=function(e){return{kind:"snippet",value:e}},e.isSnippet=function(e){const t=e;return Ne.objectLiteral(t)&&"snippet"===t.kind&&Ne.string(t.value)}}(Se||(Se={})),function(e){e.create=function(e,t,i,n){return{insertText:e,filterText:t,range:i,command:n}}}(Ce||(Ce={})),function(e){e.create=function(e){return{items:e}}}(Re||(Re={})),function(e){e.Invoked=1,e.Automatic=2}(Ee||(Ee={})),function(e){e.create=function(e,t){return{range:e,text:t}}}(Pe||(Pe={})),function(e){e.create=function(e,t){return{triggerKind:e,selectedCompletionInfo:t}}}(xe||(xe={})),function(e){e.is=function(e){const t=e;return Ne.objectLiteral(t)&&r.is(t.uri)&&Ne.string(t.name)}}(Oe||(Oe={})),function(e){function t(e,i){if(e.length<=1)return e;const n=e.length/2|0,r=e.slice(0,n),o=e.slice(n);t(r,i),t(o,i);let s=0,a=0,c=0;for(;s<r.length&&a<o.length;){const t=i(r[s],o[a]);e[c++]=t<=0?r[s++]:o[a++]}for(;s<r.length;)e[c++]=r[s++];for(;a<o.length;)e[c++]=o[a++];return e}e.create=function(e,t,i,n){return new qe(e,t,i,n)},e.is=function(e){const t=e;return!!(Ne.defined(t)&&Ne.string(t.uri)&&(Ne.undefined(t.languageId)||Ne.string(t.languageId))&&Ne.uinteger(t.lineCount)&&Ne.func(t.getText)&&Ne.func(t.positionAt)&&Ne.func(t.offsetAt))},e.applyEdits=function(e,i){let n=e.getText();const r=t(i,(e,t)=>{const i=e.range.start.line-t.range.start.line;return 0===i?e.range.start.character-t.range.start.character:i});let o=n.length;for(let t=r.length-1;t>=0;t--){const i=r[t],s=e.offsetAt(i.range.start),a=e.offsetAt(i.range.end);if(!(a<=o))throw new Error("Overlapping edit");n=n.substring(0,s)+i.newText+n.substring(a,n.length),o=s}return n}}(ke||(ke={}));class qe{constructor(e,t,i,n){this._uri=e,this._languageId=t,this._version=i,this._content=n,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){const t=this.offsetAt(e.start),i=this.offsetAt(e.end);return this._content.substring(t,i)}return this._content}update(e,t){this._content=e.text,this._version=t,this._lineOffsets=void 0}getLineOffsets(){if(void 0===this._lineOffsets){const e=[],t=this._content;let i=!0;for(let n=0;n<t.length;n++){i&&(e.push(n),i=!1);const r=t.charAt(n);i="\r"===r||"\n"===r,"\r"===r&&n+1<t.length&&"\n"===t.charAt(n+1)&&n++}i&&t.length>0&&e.push(t.length),this._lineOffsets=e}return this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);const t=this.getLineOffsets();let i=0,n=t.length;if(0===n)return a.create(0,e);for(;i<n;){const r=Math.floor((i+n)/2);t[r]>e?n=r:i=r+1}const r=i-1;return a.create(r,e-t[r])}offsetAt(e){const t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;const i=t[e.line],n=e.line+1<t.length?t[e.line+1]:this._content.length;return Math.max(Math.min(i+e.character,n),i)}get lineCount(){return this.getLineOffsets().length}}!function(e){const t=Object.prototype.toString;e.defined=function(e){return void 0!==e},e.undefined=function(e){return void 0===e},e.boolean=function(e){return!0===e||!1===e},e.string=function(e){return"[object String]"===t.call(e)},e.number=function(e){return"[object Number]"===t.call(e)},e.numberRange=function(e,i,n){return"[object Number]"===t.call(e)&&i<=e&&e<=n},e.integer=function(e){return"[object Number]"===t.call(e)&&-2147483648<=e&&e<=2147483647},e.uinteger=function(e){return"[object Number]"===t.call(e)&&0<=e&&e<=2147483647},e.func=function(e){return"[object Function]"===t.call(e)},e.objectLiteral=function(e){return null!==e&&"object"==typeof e},e.typedArray=function(e,t){return Array.isArray(e)&&e.every(t)}}(Ne||(Ne={})),i.d(t,["EOL",0,["\n","\r\n","\r"]])}};const t={};function i(n){const r=t[n];if(void 0!==r)return r.exports;const o=t[n]={exports:{}};return e[n].call(o.exports,o,o.exports,i),o.exports}i.d=(e,t)=>{if(Array.isArray(t))for(var n=0;n<t.length;){var r=t[n++],o=t[n++];i.o(e,r)?0===o&&n++:0===o?Object.defineProperty(e,r,{enumerable:!0,value:t[n++]}):Object.defineProperty(e,r,{enumerable:!0,get:o})}else for(var r in t)i.o(t,r)&&!i.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};let n={};(()=>{"use strict";let e=n;Object.defineProperty(e,"__esModule",{value:!0}),i(2312).ExtensionState.getInstance().connect()})();const r=exports;for(var o in n)r[o]=n[o];n.__esModule&&Object.defineProperty(r,"__esModule",{value:!0})})();
3
3
  //# sourceMappingURL=server.js.map