full PC config setup

shifting towards manual symlinks for more complex setup than laptop, allows for GUI settings changes to actually apply, and is much easier than nix-ifying every config
This commit is contained in:
greyweather committed 2026-07-12 04:01:28 +01:00
1 parent 19e8f0a6d5
commit 0f018cd2e3
149 files changed
+9539 -478

No files matched your search

@@ -0,0 +1,86 @@
var oT=Object.create;var ca=Object.defineProperty;var aT=Object.getOwnPropertyDescriptor;var cT=Object.getOwnPropertyNames;var uT=Object.getPrototypeOf,lT=Object.prototype.hasOwnProperty;var T=(n,e)=>()=>(e||n((e={exports:{}}).exports,e),e.exports),dT=(n,e)=>{for(var t in e)ca(n,t,{get:e[t],enumerable:!0})},Kg=(n,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of cT(e))!lT.call(n,r)&&r!==t&&ca(n,r,{get:()=>e[r],enumerable:!(i=aT(e,r))||i.enumerable});return n};var bl=(n,e,t)=>(t=n!=null?oT(uT(n)):{},Kg(e||!n||!n.__esModule?ca(t,"default",{value:n,enumerable:!0}):t,n)),pT=n=>Kg(ca({},"__esModule",{value:!0}),n);var Xg=T((NL,Vg)=>{var Gg=require("stream").Stream,fT=require("util");Vg.exports=Bn;function Bn(){this.source=null,this.dataSize=0,this.maxDataSize=1024*1024,this.pauseStream=!0,this._maxDataSizeExceeded=!1,this._released=!1,this._bufferedEvents=[]}fT.inherits(Bn,Gg);Bn.create=function(n,e){var t=new this;e=e||{};for(var i in e)t[i]=e[i];t.source=n;var r=n.emit;return n.emit=function(){return t._handleEmit(arguments),r.apply(n,arguments)},n.on("error",function(){}),t.pauseStream&&n.pause(),t};Object.defineProperty(Bn.prototype,"readable",{configurable:!0,enumerable:!0,get:function(){return this.source.readable}});Bn.prototype.setEncoding=function(){return this.source.setEncoding.apply(this.source,arguments)};Bn.prototype.resume=function(){this._released||this.release(),this.source.resume()};Bn.prototype.pause=function(){this.source.pause()};Bn.prototype.release=function(){this._released=!0,this._bufferedEvents.forEach(function(n){this.emit.apply(this,n)}.bind(this)),this._bufferedEvents=[]};Bn.prototype.pipe=function(){var n=Gg.prototype.pipe.apply(this,arguments);return this.resume(),n};Bn.prototype._handleEmit=function(n){if(this._released){this.emit.apply(this,n);return}n[0]==="data"&&(this.dataSize+=n[1].length,this._checkIfMaxDataSizeExceeded()),this._bufferedEvents.push(n)};Bn.prototype._checkIfMaxDataSizeExceeded=function(){if(!this._maxDataSizeExceeded&&!(this.dataSize<=this.maxDataSize)){this._maxDataSizeExceeded=!0;var n="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this.emit("error",new Error(n))}}});var Zg=T((AL,Qg)=>{var hT=require("util"),Yg=require("stream").Stream,Jg=Xg();Qg.exports=dt;function dt(){this.writable=!1,this.readable=!0,this.dataSize=0,this.maxDataSize=2*1024*1024,this.pauseStreams=!0,this._released=!1,this._streams=[],this._currentStream=null,this._insideLoop=!1,this._pendingNext=!1}hT.inherits(dt,Yg);dt.create=function(n){var e=new this;n=n||{};for(var t in n)e[t]=n[t];return e};dt.isStreamLike=function(n){return typeof n!="function"&&typeof n!="string"&&typeof n!="boolean"&&typeof n!="number"&&!Buffer.isBuffer(n)};dt.prototype.append=function(n){var e=dt.isStreamLike(n);if(e){if(!(n instanceof Jg)){var t=Jg.create(n,{maxDataSize:1/0,pauseStream:this.pauseStreams});n.on("data",this._checkDataSize.bind(this)),n=t}this._handleErrors(n),this.pauseStreams&&n.pause()}return this._streams.push(n),this};dt.prototype.pipe=function(n,e){return Yg.prototype.pipe.call(this,n,e),this.resume(),n};dt.prototype._getNext=function(){if(this._currentStream=null,this._insideLoop){this._pendingNext=!0;return}this._insideLoop=!0;try{do this._pendingNext=!1,this._realGetNext();while(this._pendingNext)}finally{this._insideLoop=!1}};dt.prototype._realGetNext=function(){var n=this._streams.shift();if(typeof n>"u"){this.end();return}if(typeof n!="function"){this._pipeNext(n);return}var e=n;e(function(t){var i=dt.isStreamLike(t);i&&(t.on("data",this._checkDataSize.bind(this)),this._handleErrors(t)),this._pipeNext(t)}.bind(this))};dt.prototype._pipeNext=function(n){this._currentStream=n;var e=dt.isStreamLike(n);if(e){n.on("end",this._getNext.bind(this)),n.pipe(this,{end:!1});return}var t=n;this.write(t),this._getNext()};dt.prototype._handleErrors=function(n){var e=this;n.on("error",function(t){e._emitError(t)})};dt.prototype.write=function(n){this.emit("data",n)};dt.prototype.pause=function(){this.pauseStreams&&(this.pauseStreams&&this._currentStream&&typeof this._currentStream.pause=="function"&&this._currentStream.pause(),this.emit("pause"))};dt.prototype.resume=function(){this._released||(this._released=!0,this.writable=!0,this._getNext()),this.pauseStreams&&this._currentStream&&typeof this._currentStream.resume=="function"&&this._currentStream.resume(),this.emit("resume")};dt.prototype.end=function(){this._reset(),this.emit("end")};dt.prototype.destroy=function(){this._reset(),this.emit("close")};dt.prototype._reset=function(){this.writable=!1,this._streams=[],this._currentStream=null};dt.prototype._checkDataSize=function(){if(this._updateDataSize(),!(this.dataSize<=this.maxDataSize)){var n="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this._emitError(new Error(n))}};dt.prototype._updateDataSize=function(){this.dataSize=0;var n=this;this._streams.forEach(function(e){e.dataSize&&(n.dataSize+=e.dataSize)}),this._currentStream&&this._cLine truncated
`;Te.DEFAULT_CONTENT_TYPE="application/octet-stream";Te.prototype.append=function(n,e,t){t=t||{},typeof t=="string"&&(t={filename:t});var i=kl.prototype.append.bind(this);if(typeof e=="number"&&(e=""+e),Rv.isArray(e)){this._error(new Error("Arrays are not supported."));return}var r=this._multiPartHeader(n,e,t),s=this._multiPartFooter();i(r),i(e),i(s),this._trackLength(r,e,t)};Te.prototype._trackLength=function(n,e,t){var i=0;t.knownLength!=null?i+=+t.knownLength:Buffer.isBuffer(e)?i=e.length:typeof e=="string"&&(i=Buffer.byteLength(e)),this._valueLength+=i,this._overheadLength+=Buffer.byteLength(n)+Te.LINE_BREAK.length,!(!e||!e.path&&!(e.readable&&e.hasOwnProperty("httpVersion"))&&!(e instanceof GT))&&(t.knownLength||this._valuesToMeasure.push(e))};Te.prototype._lengthRetriever=function(n,e){n.hasOwnProperty("fd")?n.end!=null&&n.end!=1/0&&n.start!=null?e(null,n.end+1-(n.start?n.start:0)):KT.stat(n.path,function(t,i){var r;if(t){e(t);return}r=i.size-(n.start?n.start:0),e(null,r)}):n.hasOwnProperty("httpVersion")?e(null,+n.headers["content-length"]):n.hasOwnProperty("httpModule")?(n.on("response",function(t){n.pause(),e(null,+t.headers["content-length"])}),n.resume()):e("Unknown stream")};Te.prototype._multiPartHeader=function(n,e,t){if(typeof t.header=="string")return t.header;var i=this._getContentDisposition(e,t),r=this._getContentType(e,t),s="",o={"Content-Disposition":["form-data",'name="'+n+'"'].concat(i||[]),"Content-Type":[].concat(r||[])};typeof t.header=="object"&&Pl(o,t.header);var a;for(var c in o)o.hasOwnProperty(c)&&(a=o[c],a!=null&&(Array.isArray(a)||(a=[a]),a.length&&(s+=c+": "+a.join("; ")+Te.LINE_BREAK)));return"--"+this.getBoundary()+Te.LINE_BREAK+s+Te.LINE_BREAK};Te.prototype._getContentDisposition=function(n,e){var t,i;return typeof e.filepath=="string"?t=Tl.normalize(e.filepath).replace(/\\/g,"/"):e.filename||n.name||n.path?t=Tl.basename(e.filename||n.name||n.path):n.readable&&n.hasOwnProperty("httpVersion")&&(t=Tl.basename(n.client._httpMessage.path||"")),t&&(i='filename="'+t+'"'),i};Te.prototype._getContentType=function(n,e){var t=e.contentType;return!t&&n.name&&(t=El.lookup(n.name)),!t&&n.path&&(t=El.lookup(n.path)),!t&&n.readable&&n.hasOwnProperty("httpVersion")&&(t=n.headers["content-type"]),!t&&(e.filepath||e.filename)&&(t=El.lookup(e.filepath||e.filename)),!t&&typeof n=="object"&&(t=Te.DEFAULT_CONTENT_TYPE),t};Te.prototype._multiPartFooter=function(){return function(n){var e=Te.LINE_BREAK,t=this._streams.length===0;t&&(e+=this._lastBoundary()),n(e)}.bind(this)};Te.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+Te.LINE_BREAK};Te.prototype.getHeaders=function(n){var e,t={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(e in n)n.hasOwnProperty(e)&&(t[e.toLowerCase()]=n[e]);return t};Te.prototype.setBoundary=function(n){this._boundary=n};Te.prototype.getBoundary=function(){return this._boundary||this._generateBoundary(),this._boundary};Te.prototype.getBuffer=function(){for(var n=new Buffer.alloc(0),e=this.getBoundary(),t=0,i=this._streams.length;t<i;t++)typeof this._streams[t]!="function"&&(Buffer.isBuffer(this._streams[t])?n=Buffer.concat([n,this._streams[t]]):n=Buffer.concat([n,Buffer.from(this._streams[t])]),(typeof this._streams[t]!="string"||this._streams[t].substring(2,e.length+2)!==e)&&(n=Buffer.concat([n,Buffer.from(Te.LINE_BREAK)])));return Buffer.concat([n,Buffer.from(this._lastBoundary())])};Te.prototype._generateBoundary=function(){for(var n="--------------------------",e=0;e<24;e++)n+=Math.floor(Math.random()*10).toString(16);this._boundary=n};Te.prototype.getLengthSync=function(){var n=this._overheadLength+this._valueLength;return this._streams.length&&(n+=this._lastBoundary().length),this.hasKnownLength()||this._error(new Error("Cannot calculate proper length in synchronous way.")),n};Te.prototype.hasKnownLength=function(){var n=!0;return this._valuesToMeasure.length&&(n=!1),n};Te.prototype.getLength=function(n){var e=this._overheadLength+this._valueLength;if(this._streams.length&&(e+=this._lastBoundary().length),!this._valuesToMeasure.length){process.nextTick(n.bind(this,null,e));return}VT.parallel(this._valuesToMeasure,this._lengthRetriever,function(t,i){if(t){n(t);return}i.forEach(function(r){e+=r}),n(null,e)})};Te.prototype.submit=function(n,e){var t,i,r={method:"post"};return typeof n=="string"?(n=WT(n),i=Pl({port:n.port,path:n.pathname,host:n.hostname,protocol:n.protocol},r)):(i=Pl(n,r),i.port||(i.port=i.protocol=="https:"?443:80)),i.headers=this.getHeaders(n.headers),i.protocol=="https:"?t=BT.request(i):t=HT.request(i),this.getLength(function(s,o){if(s&&s!=="Unknown stream"){this._error(s);return}if(o&&t.setHeader("Content-Length",o),this.pipe(t),e){var a,c=function(u,l){return t.removeListener("error",c),t.removeListener("response",a),e.call(this,u,l)};a=c.bind(this,null),t.on("error",c),t.on("response",a)}}.bind(this)),t};Te.prototype._error=function(n){this.error||(this.error=n,this.pause(),this.emit("error",n))}; Line truncated
`).forEach(function(o){r=o.indexOf(":"),t=o.substring(0,r).trim().toLowerCase(),i=o.substring(r+1).trim(),!(!t||e[t]&&SP[t])&&(t==="set-cookie"?e[t]?e[t].push(i):e[t]=[i]:e[t]=e[t]?e[t]+", "+i:i)}),e},$v=Symbol("internals");function Vs(n){return n&&String(n).trim().toLowerCase()}function pa(n){return n===!1||n==null?n:q.isArray(n)?n.map(pa):String(n)}function RP(n){let e=Object.create(null),t=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g,i;for(;i=t.exec(n);)e[i[1]]=i[2];return e}var DP=n=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(n.trim());function Bl(n,e,t,i,r){if(q.isFunction(i))return i.call(this,e,t);if(r&&(e=t),!!q.isString(e)){if(q.isString(i))return e.indexOf(i)!==-1;if(q.isRegExp(i))return i.test(e)}}function TP(n){return n.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,i)=>t.toUpperCase()+i)}function EP(n,e){let t=q.toCamelCase(" "+e);["get","set","has"].forEach(i=>{Object.defineProperty(n,i+t,{value:function(r,s,o){return this[i].call(this,e,r,s,o)},configurable:!0})})}var zr=class{constructor(e){e&&this.set(e)}set(e,t,i){let r=this;function s(a,c,u){let l=Vs(c);if(!l)throw new Error("header name must be a non-empty string");let p=q.findKey(r,l);(!p||r[p]===void 0||u===!0||u===void 0&&r[p]!==!1)&&(r[p||c]=pa(a))}let o=(a,c)=>q.forEach(a,(u,l)=>s(u,l,c));if(q.isPlainObject(e)||e instanceof this.constructor)o(e,t);else if(q.isString(e)&&(e=e.trim())&&!DP(e))o(CP(e),t);else if(q.isHeaders(e))for(let[a,c]of e.entries())s(c,a,i);else e!=null&&s(t,e,i);return this}get(e,t){if(e=Vs(e),e){let i=q.findKey(this,e);if(i){let r=this[i];if(!t)return r;if(t===!0)return RP(r);if(q.isFunction(t))return t.call(this,r,i);if(q.isRegExp(t))return t.exec(r);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=Vs(e),e){let i=q.findKey(this,e);return!!(i&&this[i]!==void 0&&(!t||Bl(this,this[i],i,t)))}return!1}delete(e,t){let i=this,r=!1;function s(o){if(o=Vs(o),o){let a=q.findKey(i,o);a&&(!t||Bl(i,i[a],a,t))&&(delete i[a],r=!0)}}return q.isArray(e)?e.forEach(s):s(e),r}clear(e){let t=Object.keys(this),i=t.length,r=!1;for(;i--;){let s=t[i];(!e||Bl(this,this[s],s,e,!0))&&(delete this[s],r=!0)}return r}normalize(e){let t=this,i={};return q.forEach(this,(r,s)=>{let o=q.findKey(i,s);if(o){t[o]=pa(r),delete t[s];return}let a=e?TP(s):String(s).trim();a!==s&&delete t[s],t[a]=pa(r),i[a]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){let t=Object.create(null);return q.forEach(this,(i,r)=>{i!=null&&i!==!1&&(t[r]=e&&q.isArray(i)?i.join(", "):i)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join(`
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){let i=new this(e);return t.forEach(r=>i.set(r)),i}static accessor(e){let i=(this[$v]=this[$v]={accessors:{}}).accessors,r=this.prototype;function s(o){let a=Vs(o);i[a]||(EP(r,o),i[a]=!0)}return q.isArray(e)?e.forEach(s):s(e),this}};zr.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);q.reduceDescriptors(zr.prototype,({value:n},e)=>{let t=e[0].toUpperCase()+e.slice(1);return{get:()=>n,set(i){this[t]=i}}});q.freezeMethods(zr);var rn=zr;function Wl(n,e){let t=this||ld,i=e||t,r=rn.from(i.headers),s=i.data;return q.forEach(n,function(a){s=a.call(t,s,r.normalize(),e?e.status:void 0)}),r.normalize(),s}function yx(n){return!!(n&&n.__CANCEL__)}function Mi(n,e,t){V.call(this,n??"canceled",V.ERR_CANCELED,e,t),this.name="CanceledError"}q.inherits(Mi,V,{__CANCEL__:!0});function Ur(n,e,t){let i=t.config.validateStatus;!t.status||!i||i(t.status)?n(t):e(new V("Request failed with status code "+t.status,[V.ERR_BAD_REQUEST,V.ERR_BAD_RESPONSE][Math.floor(t.status/100)-4],t.config,t.request,t))}function PP(n){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(n)}function kP(n,e){return e?n.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):n}function dd(n,e){return n&&!PP(e)?kP(n,e):e}var ma="1.7.9";function bx(n){let e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(n);return e&&e[1]||""}var OP=/^(?:([^;]+);)?(?:[^;]+;)?(base64|),([\s\S]*)$/;function qP(n,e,t){let i=t&&t.Blob||bt.classes.Blob,r=bx(n);if(e===void 0&&i&&(e=!0),r==="data"){n=r.length?n.slice(r.length+1):n;let s=OP.exec(n);if(!s)throw new V("Invalid URL",V.ERR_INVALID_URL);let o=s[1],a=s[2],c=s[3],u=Buffer.from(decodeURIComponent(c),a?"base64":"utf8");if(e){if(!i)throw new V("Blob is not supported",V.ERR_NOT_SUPPORT);return new i([u],{type:o})}return u}throw new V("Unsupported protocol "+r,V.ERR_NOT_SUPPORT)}var Kl=Symbol("internals"),Ql=class extends Ii.default.Transform{constructor(e){e=q.toFlatObject(e,{maxRate:0,chunkSize:64*1024,minChunkSize:100,timeWindow:500,ticksRate:2,samplesCount:15},null,(i,r)=>!q.isUndefined(r[i])),super({readableHighWaterMark:e.chunkSize});let t=this[Kl]={timeWindow:e.timeWindow,chunkSize:e.chunkSize,maxRate:e.maxRate,minChunkSize:e.minChunkSize,bytesSeen:0,isCaptured:!1,notifiedBytesLoaded:0,ts:Date.now(),bytes:0,onReadCallback:null};this.on("newListener",i=>{i==="progress"&&(t.isCaptured||(t.isCaptured=!0))})}_read(e){let t=this[Kl];return t.onReadCallback&&t.onReadCallback(),super._read(e)}_transform(e,t,i){let r=this[Kl],s=r.maxRate,o=this.readableHighWaterMark,a=r.timeWindow,c=1e3/a,u=s/c,l=r.minChunkSize!==!1?Math.max(r.minChunkSize,u*.01):0,p=(x,f)=>{let y=Buffer.byteLength(x);r.bytesSeen+=y,r.bytes+=y,r.isCaptured&&this.emit("progress",r.bytesSeen),this.push(x)?process.nextTick(f):r.onReadCallback=()=>{r.onReadCallback=null,process.nextTick(f)}},h=(x,f)=>{let y=Buffer.byteLength(x),w=null,S=o,O,k=0;if(s){let N=Date.now();(!r.ts||(k=N-r.ts)>=a)&&(r.ts=N,O=u-r.bytes,r.bytes=O<0?-O:0,k=0),O=u-r.bytes}if(s){if(O<=0)return setTimeout(()=>{f(null,x)},a-k);O<S&&(S=O)}S&&y>S&&y-S>l&&(w=x.subarray(S),x=x.subarray(0,S)),p(x,w?()=>{process.nextTick(f,null,w)}:f)};h(e,function x(f,y){if(f)return i(f);y?h(y,x):i(null)})}},Hv=Ql,{asyncIterator:Bv}=Symbol,FP=async function*(n){n.stream?yield*n.stream():n.arrayBuffer?yield await n.arrayBuffer():n[Bv]?yield*n[Bv]():yield n},wx=FP,NP=q.ALPHABET.ALPHA_DIGIT+"-_",Js=typeof TextEncoder=="function"?new TextEncoder:new rx.default.TextEncoder,ji=`\r
`,AP=Js.encode(ji),IP=2,Zl=class{constructor(e,t){let{escapeName:i}=this.constructor,r=q.isString(t),s=`Content-Disposition: form-data; name="${i(e)}"${!r&&t.name?`; filename="${i(t.name)}"`:""}${ji}`;r?t=Js.encode(String(t).replace(/\r?\n|\r\n?/g,ji)):s+=`Content-Type: ${t.type||"application/octet-stream"}${ji}`,this.headers=Js.encode(s+ji),this.contentLength=r?t.byteLength:t.size,this.size=this.headers.byteLength+this.contentLength+IP,this.name=e,this.value=t}async*encode(){yield this.headers;let{value:e}=this;q.isTypedArray(e)?yield e:yield*wx(e),yield AP}static escapeName(e){return String(e).replace(/[\r\n"]/g,t=>({"\r":"%0D","\n":"%0A",'"':"%22"})[t])}},jP=(n,e,t)=>{let{tag:i="form-data-boundary",size:r=25,boundary:s=i+"-"+q.generateString(r,NP)}=t||{};if(!q.isFormData(n))throw TypeError("FormData instance required");if(s.length<1||s.length>70)throw Error("boundary must be 10-70 characters long");let o=Js.encode("--"+s+ji),a=Js.encode("--"+s+"--"+ji+ji),c=a.byteLength,u=Array.from(n.entries()).map(([p,h])=>{let x=new Zl(p,h);return c+=x.size,x});c+=o.byteLength*u.length,c=q.toFiniteNumber(c);let l={"Content-Type":`multipart/form-data; boundary=${s}`};return Number.isFinite(c)&&(l["Content-Length"]=c),e&&e(l),nx.Readable.from(async function*(){for(let p of u)yield o,yield*p.encode();yield a}())},LP=jP,ed=class extends Ii.default.Transform{__transform(e,t,i){this.push(e),i()}_transform(e,t,i){if(e.length!==0&&(this._transform=this.__transform,e[0]!==120)){let r=Buffer.alloc(2);r[0]=120,r[1]=156,this.push(r,t)}this.__transform(e,t,i)}},MP=ed,UP=(n,e)=>q.isAsyncFn(n)?function(...t){let i=t.pop();n.apply(this,t).then(r=>{try{e?i(null,...e(r)):i(null,r)}catch(s){i(s)}},i)}:n,zP=UP;function $P(n,e){n=n||10;let t=new Array(n),i=new Array(n),r=0,s=0,o;return e=e!==void 0?e:1e3,function(c){let u=Date.now(),l=i[s];o||(o=u),t[r]=c,i[r]=u;let p=s,h=0;for(;p!==r;)h+=t[p++],p=p%n;if(r=(r+1)%n,r===s&&(s=(s+1)%n),u-o<e)return;let x=l&&u-l;return x?Math.round(h*1e3/x):void 0}}function HP(n,e){let t=0,i=1e3/e,r,s,o=(u,l=Date.now())=>{t=l,r=null,s&&(clearTimeout(s),s=null),n.apply(null,u)};return[(...u)=>{let l=Date.now(),p=l-t;p>=i?o(u,l):(r=u,s||(s=setTimeout(()=>{s=null,o(r)},i-p)))},()=>r&&o(r)]}var $r=(n,e,t=3)=>{let i=0,r=$P(50,250);return HP(s=>{let o=s.loaded,a=s.lengthComputable?s.total:void 0,c=o-i,u=r(c),l=o<=a;i=o;let p={loaded:o,total:a,progress:a?o/a:void 0,bytes:c,rate:u||void 0,estimated:u&&a&&l?(a-o)/u:void 0,event:s,lengthComputable:a!=null,[e?"download":"upload"]:!0};n(p)},t)},ga=(n,e)=>{let t=n!=null;return[i=>e[0]({lengthComputable:t,total:n,loaded:i}),e[1]]},va=n=>(...e)=>q.asap(()=>n(...e)),Wv={flush:Li.default.constants.Z_SYNC_FLUSH,finishFlush:Li.default.constants.Z_SYNC_FLUSH},BP={flush:Li.default.constants.BROTLI_OPERATION_FLUSH,finishFlush:Li.default.constants.BROTLI_OPERATION_FLUSH},Kv=q.isFunction(Li.default.createBrotliDecompress),{http:WP,https:KP}=CE.default,GP=/https:?/,Gv=bt.protocols.map(n=>n+":"),Vv=(n,[e,t])=>(n.on("end",t).on("error",t),e);function VP(n,e){n.beforeRedirects.proxy&&n.beforeRedirects.proxy(n),n.beforeRedirects.config&&n.beforeRedirects.config(n,e)}function _x(n,e,t){let i=e;if(!i&&i!==!1){let r=wE.default.getProxyForUrl(t);r&&(i=new URL(r))}if(i){if(i.username&&(i.auth=(i.username||"")+":"+(i.password||"")),i.auth){(i.auth.username||i.auth.password)&&(i.auth=(i.auth.username||"")+":"+(i.auth.password||""));let s=Buffer.from(i.auth,"utf8").toString("base64");n.headers["Proxy-Authorization"]="Basic "+s}n.headers.host=n.hostname+(n.port?":"+n.port:"");let r=i.hostname||i.host;n.hostname=r,n.host=r,n.port=i.port,n.path=t,i.protocol&&(n.protocol=i.protocol.includes(":")?i.protocol:`${i.protocol}:`)}n.beforeRedirects.proxy=function(s){_x(s,e,s.href)}}var XP=typeof process<"u"&&q.kindOf(process)==="process",JP=n=>new Promise((e,t)=>{let i,r,s=(c,u)=>{r||(r=!0,i&&i(c,u))},o=c=>{s(c),e(c)},a=c=>{s(c,!0),t(c)};n(o,a,c=>i=c).catch(a)}),YP=({address:n,family:e})=>{if(!q.isString(n))throw TypeError("address must be a string");return{address:n,family:e||(n.indexOf(".")<0?6:4)}},Xv=(n,e)=>YP(q.isObject(n)?n:{address:n,family:e}),QP=XP&&function(e){return JP(async function(i,r,s){let{data:o,lookup:a,family:c}=e,{responseType:u,responseEncoding:l}=e,p=e.method.toUpperCase(),h,x=!1,f;if(a){let se=zP(a,ie=>q.isArray(ie)?ie:[ie]);a=(ie,de,ut)=>{se(ie,de,(Re,Ke,Sn)=>{if(Re)return ut(Re);let gt=q.isArray(Ke)?Ke.map(it=>Xv(it)):[Xv(Ke,Sn)];de.all?ut(Re,gt):ut(Re,gt[0].address,gt[0].family)})}}let y=new yE.EventEmitter,w=()=>{e.cancelToken&&e.cancelToken.unsubscribe(S),e.signal&&e.signal.removeEventListener("abort",S),y.removeAllListeners()};s((se,ie)=>{h=!0,ie&&(x=!0,w())});function S(se){y.emit("abort",!se||se.type?new Mi(null,e,f):se)}y.once("abort",r),(e.cancelToken||e.signal)&&(e.cancelToken&&e.cancelToken.subscribe(S),e.signal&&(e.signal.aborted?S():e.signal.addEventListener("abort",S)));let O=dd(e.baseURL,e.url),k=new URL(O,bt.hasBrowserEnv?bt.origin:void 0),N=k.protocol||Gv[0];if(N== Line truncated
`+s.map(Zv).join(`
`):" "+Zv(s[0]):"as no adapter specified";throw new V("There is no suitable adapter to dispatch the request "+o,"ERR_NOT_SUPPORT")}return i},adapters:nd};function Gl(n){if(n.cancelToken&&n.cancelToken.throwIfRequested(),n.signal&&n.signal.aborted)throw new Mi(null,n)}function ex(n){return Gl(n),n.headers=rn.from(n.headers),n.data=Wl.call(n,n.transformRequest),["post","put","patch"].indexOf(n.method)!==-1&&n.headers.setContentType("application/x-www-form-urlencoded",!1),Dx.getAdapter(n.adapter||ld.adapter)(n).then(function(i){return Gl(n),i.data=Wl.call(n,n.transformResponse,i),i.headers=rn.from(i.headers),i},function(i){return yx(i)||(Gl(n),i&&i.response&&(i.response.data=Wl.call(n,n.transformResponse,i.response),i.response.headers=rn.from(i.response.headers))),Promise.reject(i)})}var Ca={};["object","boolean","number","function","string","symbol"].forEach((n,e)=>{Ca[n]=function(i){return typeof i===n||"a"+(e<1?"n ":" ")+n}});var tx={};Ca.transitional=function(e,t,i){function r(s,o){return"[Axios v"+ma+"] Transitional option '"+s+"'"+o+(i?". "+i:"")}return(s,o,a)=>{if(e===!1)throw new V(r(o," has been removed"+(t?" in "+t:"")),V.ERR_DEPRECATED);return t&&!tx[o]&&(tx[o]=!0,console.warn(r(o," has been deprecated since v"+t+" and will be removed in the near future"))),e?e(s,o,a):!0}};Ca.spelling=function(e){return(t,i)=>(console.warn(`${i} is likely a misspelling of ${e}`),!0)};function hk(n,e,t){if(typeof n!="object")throw new V("options must be an object",V.ERR_BAD_OPTION_VALUE);let i=Object.keys(n),r=i.length;for(;r-- >0;){let s=i[r],o=e[s];if(o){let a=n[s],c=a===void 0||o(a,s,n);if(c!==!0)throw new V("option "+s+" must be "+c,V.ERR_BAD_OPTION_VALUE);continue}if(t!==!0)throw new V("Unknown option "+s,V.ERR_BAD_OPTION)}}var fa={assertOptions:hk,validators:Ca},si=fa.validators,Hr=class{constructor(e){this.defaults=e,this.interceptors={request:new zv,response:new zv}}async request(e,t){try{return await this._request(e,t)}catch(i){if(i instanceof Error){let r={};Error.captureStackTrace?Error.captureStackTrace(r):r=new Error;let s=r.stack?r.stack.replace(/^.+\n/,""):"";try{i.stack?s&&!String(i.stack).endsWith(s.replace(/^.+\n.+\n/,""))&&(i.stack+=`
`+s):i.stack=s}catch{}}throw i}}_request(e,t){typeof e=="string"?(t=t||{},t.url=e):t=e||{},t=yr(this.defaults,t);let{transitional:i,paramsSerializer:r,headers:s}=t;i!==void 0&&fa.assertOptions(i,{silentJSONParsing:si.transitional(si.boolean),forcedJSONParsing:si.transitional(si.boolean),clarifyTimeoutError:si.transitional(si.boolean)},!1),r!=null&&(q.isFunction(r)?t.paramsSerializer={serialize:r}:fa.assertOptions(r,{encode:si.function,serialize:si.function},!0)),fa.assertOptions(t,{baseUrl:si.spelling("baseURL"),withXsrfToken:si.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let o=s&&q.merge(s.common,s[t.method]);s&&q.forEach(["delete","get","head","post","put","patch","common"],f=>{delete s[f]}),t.headers=rn.concat(o,s);let a=[],c=!0;this.interceptors.request.forEach(function(y){typeof y.runWhen=="function"&&y.runWhen(t)===!1||(c=c&&y.synchronous,a.unshift(y.fulfilled,y.rejected))});let u=[];this.interceptors.response.forEach(function(y){u.push(y.fulfilled,y.rejected)});let l,p=0,h;if(!c){let f=[ex.bind(this),void 0];for(f.unshift.apply(f,a),f.push.apply(f,u),h=f.length,l=Promise.resolve(t);p<h;)l=l.then(f[p++],f[p++]);return l}h=a.length;let x=t;for(p=0;p<h;){let f=a[p++],y=a[p++];try{x=f(x)}catch(w){y.call(this,w);break}}try{l=ex.call(this,x)}catch(f){return Promise.reject(f)}for(p=0,h=u.length;p<h;)l=l.then(u[p++],u[p++]);return l}getUri(e){e=yr(this.defaults,e);let t=dd(e.baseURL,e.url);return od(t,e.params,e.paramsSerializer)}};q.forEach(["delete","get","head","options"],function(e){Hr.prototype[e]=function(t,i){return this.request(yr(i||{},{method:e,url:t,data:(i||{}).data}))}});q.forEach(["post","put","patch"],function(e){function t(i){return function(s,o,a){return this.request(yr(a||{},{method:e,headers:i?{"Content-Type":"multipart/form-data"}:{},url:s,data:o}))}}Hr.prototype[e]=t(),Hr.prototype[e+"Form"]=t(!0)});var ha=Hr,id=class n{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let t;this.promise=new Promise(function(s){t=s});let i=this;this.promise.then(r=>{if(!i._listeners)return;let s=i._listeners.length;for(;s-- >0;)i._listeners[s](r);i._listeners=null}),this.promise.then=r=>{let s,o=new Promise(a=>{i.subscribe(a),s=a}).then(r);return o.cancel=function(){i.unsubscribe(s)},o},e(function(s,o,a){i.reason||(i.reason=new Mi(s,o,a),t(i.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;let t=this._listeners.indexOf(e);t!==-1&&this._listeners.splice(t,1)}toAbortSignal(){let e=new AbortController,t=i=>{e.abort(i)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;return{token:new n(function(r){e=r}),cancel:e}}},mk=id;function gk(n){return function(t){return n.apply(null,t)}}function vk(n){return q.isObject(n)&&n.isAxiosError===!0}var rd={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(rd).forEach(([n,e])=>{rd[e]=n});var xk=rd;function Tx(n){let e=new ha(n),t=sx(ha.prototype.request,e);return q.extend(t,ha.prototype,e,{allOwnKeys:!0}),q.extend(t,e,null,{allOwnKeys:!0}),t.create=function(r){return Tx(yr(n,r))},t}var wt=Tx(ld);wt.Axios=ha;wt.CanceledError=Mi;wt.CancelToken=mk;wt.isCancel=yx;wt.VERSION=ma;wt.toFormData=_a;wt.AxiosError=V;wt.Cancel=wt.CanceledError;wt.all=function(e){return Promise.all(e)};wt.spread=gk;wt.isAxiosError=vk;wt.mergeConfig=yr;wt.AxiosHeaders=rn;wt.formToJSON=n=>xx(q.isHTMLForm(n)?new FormData(n):n);wt.getAdapter=Dx.getAdapter;wt.HttpStatusCode=xk;wt.default=wt;Ex.exports=wt});var Nx=T((tM,Fx)=>{"use strict";Fx.exports=Ox;function Ox(n,e,t){n instanceof RegExp&&(n=kx(n,t)),e instanceof RegExp&&(e=kx(e,t));var i=qx(n,e,t);return i&&{star Line truncated
globstar while`,e,h,t,x,f),this.matchOne(e.slice(h),t.slice(x),i))return this.debug("globstar found match!",h,c,f),!0;if(f==="."||f===".."||!r.dot&&f.charAt(0)==="."){this.debug("dot detected!",e,h,t,x);break}this.debug("globstar swallow a segment, and continue"),h++}return!!(i&&(this.debug(`
>>> no match, partial?`,e,h,t,x),h===c))}let y;if(typeof l=="string"?(y=p===l,this.debug("string match",l,p,y)):(y=l.test(p),this.debug("pattern match",l,p,y)),!y)return!1}if(o===c&&a===u)return!0;if(o===c)return i;if(a===u)return o===c-1&&e[o]==="";throw new Error("wtf?")}braceExpand(){return(0,ee.braceExpand)(this.pattern,this.options)}parse(e){(0,Fa.assertValidPattern)(e);let t=this.options;if(e==="**")return ee.GLOBSTAR;if(e==="")return"";let i,r=null;(i=e.match(tO))?r=t.dot?iO:nO:(i=e.match(Wk))?r=(t.nocase?t.dot?Xk:Vk:t.dot?Gk:Kk)(i[1]):(i=e.match(rO))?r=(t.nocase?t.dot?oO:sO:t.dot?aO:cO)(i):(i=e.match(Jk))?r=t.dot?Qk:Yk:(i=e.match(Zk))&&(r=eO);let s=Yx.AST.fromGlob(e,this.options).toMMPattern();return r&&typeof s=="object"&&Reflect.defineProperty(s,"test",{value:r}),s}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let e=this.set;if(!e.length)return this.regexp=!1,this.regexp;let t=this.options,i=t.noglobstar?lO:t.dot?dO:pO,r=new Set(t.nocase?["i"]:[]),s=e.map(c=>{let u=c.map(l=>{if(l instanceof RegExp)for(let p of l.flags.split(""))r.add(p);return typeof l=="string"?xO(l):l===ee.GLOBSTAR?ee.GLOBSTAR:l._src});return u.forEach((l,p)=>{let h=u[p+1],x=u[p-1];l!==ee.GLOBSTAR||x===ee.GLOBSTAR||(x===void 0?h!==void 0&&h!==ee.GLOBSTAR?u[p+1]="(?:\\/|"+i+"\\/)?"+h:u[p]=i:h===void 0?u[p-1]=x+"(?:\\/|"+i+")?":h!==ee.GLOBSTAR&&(u[p-1]=x+"(?:\\/|\\/"+i+"\\/)"+h,u[p+1]=ee.GLOBSTAR))}),u.filter(l=>l!==ee.GLOBSTAR).join("/")}).join("|"),[o,a]=e.length>1?["(?:",")"]:["",""];s="^"+o+s+a+"$",this.negate&&(s="^(?!"+s+").+$");try{this.regexp=new RegExp(s,[...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 r=this.slashSplit(e);this.debug(this.pattern,"split",r);let s=this.set;this.debug(this.pattern,"set",s);let o=r[r.length-1];if(!o)for(let a=r.length-2;!o&&a>=0;a--)o=r[a];for(let a=0;a<s.length;a++){let c=s[a],u=r;if(i.matchBase&&c.length===1&&(u=[o]),this.matchOne(u,c,t))return i.flipNegate?!0:!this.negate}return i.flipNegate?!1:this.negate}static defaults(e){return ee.minimatch.defaults(e).Minimatch}};ee.Minimatch=br;var yO=gd();Object.defineProperty(ee,"AST",{enumerable:!0,get:function(){return yO.AST}});var bO=vd();Object.defineProperty(ee,"escape",{enumerable:!0,get:function(){return bO.escape}});var wO=Ea();Object.defineProperty(ee,"unescape",{enumerable:!0,get:function(){return wO.unescape}});ee.minimatch.AST=Yx.AST;ee.minimatch.Minimatch=br;ee.minimatch.escape=$k.escape;ee.minimatch.unescape=Hk.unescape});var sy=T(Aa=>{"use strict";Object.defineProperty(Aa,"__esModule",{value:!0});Aa.LRUCache=void 0;var Wr=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,ny=new Set,xd=typeof process=="object"&&process?process:{},iy=(n,e,t,i)=>{typeof xd.emitWarning=="function"?xd.emitWarning(n,e,t,i):console.error(`[${t}] ${e}: ${n}`)},Na=globalThis.AbortController,ty=globalThis.AbortSignal;if(typeof Na>"u"){ty=class{onabort;_onabort=[];reason;aborted=!1;addEventListener(i,r){this._onabort.push(r)}},Na=class{constructor(){e()}signal=new ty;abort(i){if(!this.signal.aborted){this.signal.reason=i,this.signal.aborted=!0;for(let r of this.signal._onabort)r(i);this.signal.onabort?.(i)}}};let n=xd.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1",e=()=>{n&&(n=!1,iy("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",e))}}var _O=n=>!ny.has(n),fM=Symbol("type"),zi=n=>n&&n===Math.floor(n)&&n>0&&isFinite(n),ry=n=>zi(n)?n<=Math.pow(2,8)?Uint8Array:n<=Math.pow(2,16)?Uint16Array:n<=Math.pow(2,32)?Uint32Array:n<=Number.MAX_SAFE_INTEGER?Kr:null:null,Kr=class extends Array{constructor(e){super(e),this.fill(0)}},yd=class n{heap;length;static#e=!1;static create(e){let t=ry(e);if(!t)return[];n.#e=!0;let i=new n(e,t);return n.#e=!1,i}constructor(e,t){if(!n.#e)throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new t(e),this.length=0}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}},bd=class n{#e;#n;#s;#i;#a;ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#u;#d;#c;#o;#t;#m;#v;#f;#p;#b;#g;#R;#D;#w;#y;#E;#h;static unsafeExposeInternals(e){r Line truncated
`;o.forEach(c=>{a+=c}),a+=`
Correct usage: new Package("my-binary", "https://example.com/binary/download.tar.gz", {"my-binary": "my-binary"})`,wo(a)}this.url=t,this.name=e,this.filename=i,this.zipExt=r,this.installDirectory=wc(__dirname,"node_modules",".bin_real"),this.binaries=s,Zd(this.installDirectory)||Sb(this.installDirectory,{recursive:!0})}exists(){for(let e in this.binaries){let t=this.binaries[e],i=wc(this.installDirectory,t);if(!Zd(i))return!1}return!0}install(e,t=!1){return this.exists()?(t||console.error(`${this.name} is already installed, skipping installation.`),Promise.resolve()):(Zd(this.installDirectory)&&T1.sync(this.installDirectory),Sb(this.installDirectory,{recursive:!0}),t||console.error(`Downloading release from ${this.url}`),D1({...e,url:this.url,responseType:"stream"}).then(i=>new Promise((r,s)=>{S1(`${E1}${C1}`,(o,a)=>{let c=wc(a,this.filename),u=i.data.pipe(_1(c));u.on("error",l=>s(l)),u.on("close",()=>{if(/\.tar\.*/.test(this.zipExt)){let l=ep("tar",["xf",c,"--strip-components","1","-C",this.installDirectory]);l.status==0?r():l.error?s(l.error):s(new Error(`An error occurred untarring the artifact: stdout: ${l.stdout}; stderr: ${l.stderr}`))}else if(this.zipExt==".zip"){let l=ep("unzip",["-q",c,"-d",this.installDirectory]);l.status==0?r():l.error?s(l.error):s(new Error(`An error occurred unzipping the artifact: stdout: ${l.stdout}; stderr: ${l.stderr}`))}else s(new Error(`Unrecognized file extension: ${this.zipExt}`))})})})).then(()=>{t||console.error(`${this.name} has been installed!`)}).catch(i=>{wo(`Error fetching release: ${i.message}`)}))}run(e,t){(this.exists()?Promise.resolve():this.install(t,!0)).then(()=>{let[,,...r]=process.argv,s={cwd:process.cwd(),stdio:"inherit"},o=this.binaries[e];o||wo(`${e} is not a known binary in ${this.name}`);let a=wc(this.installDirectory,o),c=ep(a,r,s);c.error&&wo(c.error),process.exit(c.status)}).catch(r=>{wo(r.message),process.exit(1)})}};Cb.exports.Package=tp});var Db=T((zM,_c)=>{var P1=function(){"use strict";function n(o,a,c,u){var l;typeof a=="object"&&(c=a.depth,u=a.prototype,l=a.filter,a=a.circular);var p=[],h=[],x=typeof Buffer<"u";typeof a>"u"&&(a=!0),typeof c>"u"&&(c=1/0);function f(y,w){if(y===null)return null;if(w==0)return y;var S,O;if(typeof y!="object")return y;if(n.__isArray(y))S=[];else if(n.__isRegExp(y))S=new RegExp(y.source,s(y)),y.lastIndex&&(S.lastIndex=y.lastIndex);else if(n.__isDate(y))S=new Date(y.getTime());else{if(x&&Buffer.isBuffer(y))return Buffer.allocUnsafe?S=Buffer.allocUnsafe(y.length):S=new Buffer(y.length),y.copy(S),S;typeof u>"u"?(O=Object.getPrototypeOf(y),S=Object.create(O)):(S=Object.create(u),O=u)}if(a){var k=p.indexOf(y);if(k!=-1)return h[k];p.push(y),h.push(S)}for(var N in y){var j;O&&(j=Object.getOwnPropertyDescriptor(O,N)),!(j&&j.set==null)&&(S[N]=f(y[N],w-1))}return S}return f(o,c)}n.clonePrototype=function(a){if(a===null)return null;var c=function(){};return c.prototype=a,new c};function e(o){return Object.prototype.toString.call(o)}n.__objToStr=e;function t(o){return typeof o=="object"&&e(o)==="[object Date]"}n.__isDate=t;function i(o){return typeof o=="object"&&e(o)==="[object Array]"}n.__isArray=i;function r(o){return typeof o=="object"&&e(o)==="[object RegExp]"}n.__isRegExp=r;function s(o){var a="";return o.global&&(a+="g"),o.ignoreCase&&(a+="i"),o.multiline&&(a+="m"),a}return n.__getRegExpFlags=s,n}();typeof _c=="object"&&_c.exports&&(_c.exports=P1)});var Eb=T(($M,Tb)=>{var k1=Db();Tb.exports=function(n,e){return n=n||{},Object.keys(e).forEach(function(t){typeof n[t]>"u"&&(n[t]=k1(e[t]))}),n}});var kb=T((HM,Pb)=>{Pb.exports=[[768,879],[1155,1158],[1160,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1539],[1552,1557],[1611,1630],[1648,1648],[1750,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2305,2306],[2364,2364],[2369,2376],[2381,2381],[2385,2388],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2672,2673],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2817,2817],[2876,2876],[2879,2879],[2881,2883],[2893,2893],[2902,2902],[2946,2946],[3008,3008],[3021,3021],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3393,3395],[3405,3405],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3769],[3771,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3984,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4146],[4150,4151],[4153,4153],[4184,4185],[4448,4607],[4959,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6157],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7616,7626],[7678,7679],[8203,8207],[8234,8238],[8288,8291],[8298,8303],[8400 Line truncated
`}),i};Me.prototype.toString=function(){var n=this.columns(),e=new Me;return e.separator=this.separator,n.forEach(function(t){e.cell(t,t)}),e.newRow(),e.pushDelimeter(n),e.rows=e.rows.concat(this.rows),this.totals&&this.rows.length&&(e.pushDelimeter(n),this.forEachTotal(e.cell.bind(e)),e.newRow()),e.print()};Me.prototype.pushDelimeter=function(n){return n=n||this.columns(),n.forEach(function(e){this.cell(e,void 0,op("-"))},this),this.newRow()};Me.prototype.forEachTotal=function(n){for(var e in this.totals){var t=this.totals[e],i=t.init,r=this.rows.length;this.rows.forEach(function(s,o){i=t.reduce.call(s,i,s[e],o,r)}),n(e,i,t.printer)}};Me.prototype.printTransposed=function(n){n=n||{};var e=new Me;return e.separator=n.separator||this.separator,this.columns().forEach(function(t){e.cell(0,t,n.namePrinter),this.rows.forEach(function(i,r){e.cell(r+1,i[t],i.__printers[t])}),e.newRow()},this),e.print()};Me.prototype.sort=function(n){if(typeof n=="function")return this.rows.sort(n),this;var e=Array.isArray(n)?n:this.columns(),t=e.map(function(i){var r="asc",s=/(.*)\|\s*(asc|des)\s*$/.exec(i);return s&&(i=s[1],r=s[2]),function(o,a){return r=="asc"?rp(o[i],a[i]):rp(a[i],o[i])}});return this.sort(function(i,r){for(var s=0;s<t.length;s++){var o=t[s](i,r);if(o!=0)return o}return 0})};function rp(n,e){return n===e?0:n===void 0?1:e===void 0?-1:n===null?1:e===null?-1:n>e?1:n<e?-1:rp(String(n),String(e))}Me.prototype.total=function(n,e){return e=e||{},this.totals=this.totals||{},this.totals[n]={reduce:e.reduce||Me.aggr.sum,printer:e.printer||ap,init:e.init==null?0:e.init},this};Me.aggr={};Me.aggr.printer=function(n,e){return e=e||So,function(t,i){return ap(n+e(t),i)}};Me.aggr.sum=function(n,e){return n+e};Me.aggr.avg=function(n,e,t,i){return n=n+e,t+1==i?n/i:n};Me.print=function(n,e,t){var i=e||{};e=typeof e=="function"?e:function(o,a){for(var c in o)if(o.hasOwnProperty(c)){var u=i[c]||{};a(u.name||c,o[c],u.printer)}};var r=new Me,s=r.cell.bind(r);return Array.isArray(n)?(t=t||function(o){return o.toString()},n.forEach(function(o){e(o,s),r.newRow()})):(t=t||function(o){return o.printTransposed({separator:" : "})},e(n,s),r.newRow()),t(r)};Me.log=function(n,e,t){console.log(Me.print(n,e,t))};Me.prototype.log=function(){console.log(this.toString())}});var Ub=T((KM,Mb)=>{(function(){"use strict";function n(){if(typeof console>"u")throw new Error("Weird, console object is undefined");if(typeof console.table=="function"&&console.table===x)return;function e(f,y){return typeof y===f}var t=e.bind(null,"string");function i(f,y){return Array.isArray(y)&&y.every(f)}var r=i.bind(null,t),s=i.bind(null,Array.isArray),o=Lb();function a(f){var y=new o;return f.forEach(function(w){typeof w=="string"||typeof w=="number"?y.cell("item",w):Object.keys(w).forEach(function(S){y.cell(S,w[S])}),y.newRow()}),y.toString()}function c(f,y,w){var S=new o;y.forEach(function(k){k.forEach(function(N,j){S.cell(f[j],N)}),S.newRow()});var O=S.toString();return w?O:console.log(O)}function u(f,y){var w=a(y),S=w.indexOf(`
`);if(S>0){f.length>S&&(S=f.length),console.log(f);var O="-",k,N="";for(k=0;k<S;k+=1)N+=O;console.log(N)}console.log(w)}function l(f,y){var w=a(y),S=w.indexOf(`
`),O="";if(S>0){f.length>S&&(S=f.length),O+=f+`
`;var k="-",N,j="";for(N=0;N<S;N+=1)j+=k;O+=j+`
`}return O+w}function p(f){var y=Object.keys(f);return y.map(function(w){return{key:w,value:f[w]}})}function h(f){return a(p(f))}function x(){var f=Array.prototype.slice.call(arguments);if(f.length===2&&typeof f[0]=="string"&&Array.isArray(f[1]))return u(f[0],f[1]);if(f.length===2&&r(f[0])&&s(f[1]))return c(f[0],f[1]);f.forEach(function(y){if(typeof y=="string")return console.log(y);Array.isArray(y)?console.log(a(y)):typeof y=="object"&&console.log(h(y))})}Mb.exports.getTable=function(){var f=Array.prototype.slice.call(arguments),y="";return f.length===2&&typeof f[0]=="string"&&Array.isArray(f[1])?l(f[0],f[1]):f.length===2&&r(f[0])&&s(f[1])?c(f[0],f[1],!0):(f.forEach(function(w,S){if(typeof w=="string"){y+=w,S!==f.length-1&&(y+=`
`);return}else Array.isArray(w)?y+=a(w)+`
`:typeof w=="object"&&(y+=h(w))}),y)},console.table=x}n()})()});var Hb=T((GM,$b)=>{"use strict";var zb=()=>process.platform==="linux",Sc=null,N1=()=>{if(!Sc)if(zb()&&process.report){let n=process.report.excludeNetwork;process.report.excludeNetwork=!0,Sc=process.report.getReport(),process.report.excludeNetwork=n}else Sc={};return Sc};$b.exports={isLinux:zb,getReport:N1}});var Kb=T((VM,Wb)=>{"use strict";var Bb=require("fs"),A1="/usr/bin/ldd",I1=n=>Bb.readFileSync(n,"utf-8"),j1=n=>new Promise((e,t)=>{Bb.readFile(n,"utf-8",(i,r)=>{i?t(i):e(r)})});Wb.exports={LDD_PATH:A1,readFileSync:I1,readFile:j1}});var lw=T((XM,uw)=>{"use strict";var Vb=require("child_process"),{isLinux:as,getReport:Xb}=Hb(),{LDD_PATH:Cc,readFile:Jb,readFileSync:Yb}=Kb(),ui,li,Qb="getconf GNU_LIBC_VERSION 2>&1 || true; ldd --version 2>&1 || true",Yi="",Zb=()=>Yi||new Promise(n=>{Vb.exec(Qb,(e,t)=>{Yi=e?" ":t,n(Yi)})}),ew=()=>{if(!Yi)try{Yi=Vb.execSync(Qb,{encoding:"utf8"})}catch{Yi=" "}return Yi},Qi="glibc",tw=/LIBC[a-z0-9 \-).]*?(\d+\.\d+)/i,os="musl",L1=n=>n.includes("libc.musl-")||n.includes("ld-musl-"),nw=()=>{let n=Xb();return n.header&&n.header.glibcVersionRuntime?Qi:Array.isArray(n.sharedObjects)&&n.sharedObjects.some(L1)?os:null},iw=n=>{let[e,t]=n.split(/[\r\n]+/);return e&&e.includes(Qi)?Qi:t&&t.includes(os)?os:null},rw=n=>n.includes("musl")?os:n.includes("GNU C Library")?Qi:null,M1=async()=>{if(ui!==void 0)return ui;ui=null;try{let n=await Jb(Cc);ui=rw(n)}catch{}return ui},U1=()=>{if(ui!==void 0)return ui;ui=null;try{let n=Yb(Cc);ui=rw(n)}catch{}return ui},sw=async()=>{let n=null;if(as()&&(n=await M1(),n||(n=nw()),!n)){let e=await Zb();n=iw(e)}return n},ow=()=>{let n=null;if(as()&&(n=U1(),n||(n=nw()),!n)){let e=ew();n=iw(e)}return n},z1=async()=>as()&&await sw()!==Qi,$1=()=>as()&&ow()!==Qi,H1=async()=>{if(li!==void 0)return li;li=null;try{let e=(await Jb(Cc)).match(tw);e&&(li=e[1])}catch{}return li},B1=()=>{if(li!==void 0)return li;li=null;try{let e=Yb(Cc).match(tw);e&&(li=e[1])}catch{}return li},aw=()=>{let n=Xb();return n.header&&n.header.glibcVersionRuntime?n.header.glibcVersionRuntime:null},Gb=n=>n.trim().split(/\s+/)[1],cw=n=>{let[e,t,i]=n.split(/[\r\n]+/);return e&&e.includes(Qi)?Gb(e):t&&i&&t.includes(os)?Gb(i):null},W1=async()=>{let n=null;if(as()&&(n=await H1(),n||(n=aw()),!n)){let e=await Zb();n=cw(e)}return n},K1=()=>{let n=null;if(as()&&(n=B1(),n||(n=aw()),!n)){let e=ew();n=cw(e)}return n};uw.exports={GLIBC:Qi,MUSL:os,family:sw,familySync:ow,isNonGlibcLinux:z1,isNonGlibcLinuxSync:$1,version:W1,versionSync:K1}});var pw=T(Rc=>{"use strict";Object.defineProperty(Rc,"__esModule",{value:!0});Rc.getProxyEnv=void 0;var dw=n=>n.replace(/^\.*/,".").toLowerCase(),G1=n=>{n=n.trim();let e=n.split(":",2),t=dw(e[0]),i=e[1],r=n.indexOf(":")>-1;return{hostname:t,port:i,hasPort:r}},V1=(n,e)=>{let t=n.port||(n.protocol==="https:"?"443":"80"),i=dw(n.hostname);return e.split(",").map(G1).some(s=>{let o=i.indexOf(s.hostname),a=o>-1&&o===i.length-s.hostname.length;return s.hasPort?t===s.port&&a:a})},X1=n=>{let e=process.env.NO_PROXY||process.env.no_proxy||"";return e==="*"||e!==""&&V1(n,e)?null:n.protocol=="http:"?process.env.HTTP_PROXY||process.env.http_proxy||null:n.protocol=="https:"&&(process.env.HTTPS_PROXY||process.env.https_proxy)||null};Rc.getProxyEnv=X1});var gw=T(cs=>{"use strict";var YM=require("net"),J1=require("tls"),cp=require("http"),fw=require("https"),Y1=require("events"),QM=require("assert"),Q1=require("util");cs.httpOverHttp=Z1;cs.httpsOverHttp=eF;cs.httpOverHttps=tF;cs.httpsOverHttps=nF;function Z1(n){var e=new Si(n);return e.request=cp.request,e}function eF(n){var e=new Si(n);return e.request=cp.request,e.createSocket=hw,e.defaultPort=443,e}function tF(n){var e=new Si(n);return e.request=fw.request,e}function nF(n){var e=new Si(n);return e.request=fw.request,e.createSocket=hw,e.defaultPort=443,e}function Si(n){var e=this;e.options=n||{},e.proxyOptions=e.options.proxy||{},e.maxSockets=e.options.maxSockets||cp.Agent.defaultMaxSockets,e.requests=[],e.sockets=[],e.on("free",function(i,r,s,o){for(var a=mw(r,s,o),c=0,u=e.requests.length;c<u;++c){var l=e.requests[c];if(l.host===a.host&&l.port===a.port){e.requests.splice(c,1),l.request.onSocket(i);return}}i.destroy(),e.removeSocket(i)})}Q1.inherits(Si,Y1.EventEmitter);Si.prototype.addRequest=function(e,t,i,r){var s=this,o=up({request:e},s.options,mw(t,i,r));if(s.sockets.length>=this.maxSockets){s.requests.push(o);return}s.createSocket(o,function(a){a.on("free",c),a.on("close",u),a.on("agentRemove",u),e.onSocket(a);function c(){s.emit("free",a,o)}function u(l){s.removeSocket(a),a.removeListener("free",c),a.removeListener("close",u),a.removeListener("agentRemove",u)}})};Si.prototype.createSocket=function(e,t){var i=this,r={};i.sockets.push(r);var s=up({},i.proxyOptions,{method:"CONNECT",path:e.host+":"+e.port,agent:!1,headers:{host:e.host+":"+e.port}});e.localAddress&&(s.localAddress=e.localAddress),s.proxyAuth&&(s.headers=s.headers||{},s.headers["Proxy-Authorization"]="Basic "+n Line truncated
`,p.message,p.stack);var h=new Error("tunneling socket could not be established, cause="+p.message);h.code="ECONNRESET",e.request.emit("error",h),i.removeSocket(r)}};Si.prototype.removeSocket=function(e){var t=this.sockets.indexOf(e);if(t!==-1){this.sockets.splice(t,1);var i=this.requests.shift();i&&this.createSocket(i,function(r){i.request.onSocket(r)})}};function hw(n,e){var t=this;Si.prototype.createSocket.call(t,n,function(i){var r=n.request.getHeader("host"),s=up({},t.options,{socket:i,servername:r?r.replace(/:.*$/,""):n.host}),o=J1.connect(0,s);t.sockets[t.sockets.indexOf(i)]=o,e(o)})}function mw(n,e,t){return typeof n=="string"?{host:n,port:e,localAddress:t}:n}function up(n){for(var e=1,t=arguments.length;e<t;++e){var i=arguments[e];if(typeof i=="object")for(var r=Object.keys(i),s=0,o=r.length;s<o;++s){var a=r[s];i[a]!==void 0&&(n[a]=i[a])}}return n}var Zi;process.env.NODE_DEBUG&&/\btunnel\b/.test(process.env.NODE_DEBUG)?Zi=function(){var n=Array.prototype.slice.call(arguments);typeof n[0]=="string"?n[0]="TUNNEL: "+n[0]:n.unshift("TUNNEL:"),console.error.apply(console,n)}:Zi=function(){};cs.debug=Zi});var xw=T((e2,vw)=>{vw.exports=gw()});var yw=T(Dc=>{"use strict";Object.defineProperty(Dc,"__esModule",{value:!0});Dc.configureProxy=void 0;var iF=pw(),rF=xw(),sF=n=>{let e=new URL(n),t=(0,iF.getProxyEnv)(e);if(!t)return null;let{hostname:i,port:r,protocol:s,username:o,password:a}=new URL(t);return e.protocol==="https:"&&s==="http:"?{proxy:!1,httpsAgent:(0,rF.httpsOverHttp)({proxy:{host:i,port:parseInt(r)}})}:{proxy:{protocol:s,hostname:i,port:parseInt(r),auth:{username:o,password:a}}}};Dc.configureProxy=sF});var bw=T(Tc=>{"use strict";Object.defineProperty(Tc,"__esModule",{value:!0});Tc.configureProxy=void 0;var oF=yw();Object.defineProperty(Tc,"configureProxy",{enumerable:!0,get:function(){return oF.configureProxy}})});var ww=T((i2,aF)=>{aF.exports={artifactDownloadUrl:"https://github.com/kdl-org/kdl-rs/releases/download/v6.3.2",bin:{"kdl-lsp":"run-kdl-lsp.js"},contributors:["Kat March\xE1n <kzm@zkat.tech>","KDL Community"],dependencies:{axios:"^1.7.9","axios-proxy-builder":"^0.1.2","console.table":"^0.10.0","detect-libc":"^2.0.3",rimraf:"^5.0.8"},description:"LSP Server for the KDL Document Language",devDependencies:{prettier:"^3.4.2"},engines:{node:">=14",npm:">=6"},glibcMinimum:{major:2,series:31},homepage:"https://kdl.dev",keywords:["kdl","document","config","lsp","language-server"],license:"Apache-2.0",name:"kdl-lsp",preferUnplugged:!0,repository:"https://github.com/kdl-org/kdl-rs",scripts:{fmt:"prettier --write **/*.js","fmt:check":"prettier --check **/*.js",postinstall:"node ./install.js"},supportedPlatforms:{"aarch64-apple-darwin":{artifactName:"kdl-lsp-aarch64-apple-darwin.tar.xz",bins:{"kdl-lsp":"kdl-lsp"},zipExt:".tar.xz"},"aarch64-pc-windows-gnu":{artifactName:"kdl-lsp-aarch64-pc-windows-msvc.zip",bins:{"kdl-lsp":"kdl-lsp.exe"},zipExt:".zip"},"aarch64-pc-windows-msvc":{artifactName:"kdl-lsp-aarch64-pc-windows-msvc.zip",bins:{"kdl-lsp":"kdl-lsp.exe"},zipExt:".zip"},"aarch64-unknown-linux-gnu":{artifactName:"kdl-lsp-aarch64-unknown-linux-gnu.tar.xz",bins:{"kdl-lsp":"kdl-lsp"},zipExt:".tar.xz"},"x86_64-apple-darwin":{artifactName:"kdl-lsp-x86_64-apple-darwin.tar.xz",bins:{"kdl-lsp":"kdl-lsp"},zipExt:".tar.xz"},"x86_64-pc-windows-gnu":{artifactName:"kdl-lsp-x86_64-pc-windows-msvc.zip",bins:{"kdl-lsp":"kdl-lsp.exe"},zipExt:".zip"},"x86_64-pc-windows-msvc":{artifactName:"kdl-lsp-x86_64-pc-windows-msvc.zip",bins:{"kdl-lsp":"kdl-lsp.exe"},zipExt:".zip"},"x86_64-unknown-linux-gnu":{artifactName:"kdl-lsp-x86_64-unknown-linux-gnu.tar.xz",bins:{"kdl-lsp":"kdl-lsp"},zipExt:".tar.xz"}},version:"6.3.2",volta:{node:"18.14.1",npm:"9.5.0"}}});var Ew=T((s2,Tw)=>{var{Package:cF}=Rb(),_w=require("os"),r2=Ub(),lp=lw(),{configureProxy:Cw}=bw(),uF=n=>{console.error(n),process.exit(1)},{name:Rw,artifactDownloadUrl:dp,supportedPlatforms:Sw,glibcMinimum:Dw}=ww(),lF=Dw.major,dF=Dw.series,pF=()=>{let n=_w.type(),e=_w.arch(),t="";switch(n){case"Windows_NT":t="pc-windows-msvc";break;case"Darwin":t="apple-darwin";break;case"Linux":t="unknown-linux-gnu";break}let i="";switch(e){case"x64":i="x86_64";break;case"arm64":i="aarch64";break}if(n==="Linux")if(lp.familySync()=="musl")t="unknown-linux-musl-dynamic";else if(lp.isNonGlibcLinuxSync())console.warn("Your libc is neither glibc nor musl; trying static musl binary instead"),t="unknown-linux-musl-static";else{let a=lp.versionSync().split("."),c=a[0],u=a[1];(c!=lF||u<dF)&&(console.warn("Your glibc isn't compatible; trying static musl binary instead"),t="unknown-linux-musl-static")}let r=`${i}-${t}`,s=Sw[r];return s||uF(`Platform with type "${n}" and architecture "${e}" is not supported by ${Rw}.
Your system must be one of the following:
${Object.keys(Sw).join(",")}`),s},pp=()=>{let n=pF(),e=`${dp}/${n.artifactName}`,t=n.artifactName,i=n.zipExt;return new cF(Rw,e,t,i,n.bins)},fF=n=>{if(!dp||dp.length===0){console.warn("in demo mode, not installing binaries");return}let e=pp(),t=Cw(e.url);return e.install(t,n)},hF=n=>{let e=pp(),t=Cw(e.url);e.run(n,t)};Tw.exports={install:fF,run:hF,getPackage:pp}});var kw=T(Ec=>{"use strict";Object.defineProperty(Ec,"__esModule",{value:!0});Ec.getProxyEnv=void 0;var Pw=n=>n.replace(/^\.*/,".").toLowerCase(),mF=n=>{n=n.trim();let e=n.split(":",2),t=Pw(e[0]),i=e[1],r=n.indexOf(":")>-1;return{hostname:t,port:i,hasPort:r}},gF=(n,e)=>{let t=n.port||(n.protocol==="https:"?"443":"80"),i=Pw(n.hostname);return e.split(",").map(mF).some(s=>{let o=i.indexOf(s.hostname),a=o>-1&&o===i.length-s.hostname.length;return s.hasPort?t===s.port&&a:a})},vF=n=>{let e=process.env.NO_PROXY||process.env.no_proxy||"";return e==="*"||e!==""&&gF(n,e)?null:n.protocol=="http:"?process.env.HTTP_PROXY||process.env.http_proxy||null:n.protocol=="https:"&&(process.env.HTTPS_PROXY||process.env.https_proxy)||null};Ec.getProxyEnv=vF});var Nw=T(us=>{"use strict";var a2=require("net"),xF=require("tls"),fp=require("http"),Ow=require("https"),yF=require("events"),c2=require("assert"),bF=require("util");us.httpOverHttp=wF;us.httpsOverHttp=_F;us.httpOverHttps=SF;us.httpsOverHttps=CF;function wF(n){var e=new Ci(n);return e.request=fp.request,e}function _F(n){var e=new Ci(n);return e.request=fp.request,e.createSocket=qw,e.defaultPort=443,e}function SF(n){var e=new Ci(n);return e.request=Ow.request,e}function CF(n){var e=new Ci(n);return e.request=Ow.request,e.createSocket=qw,e.defaultPort=443,e}function Ci(n){var e=this;e.options=n||{},e.proxyOptions=e.options.proxy||{},e.maxSockets=e.options.maxSockets||fp.Agent.defaultMaxSockets,e.requests=[],e.sockets=[],e.on("free",function(i,r,s,o){for(var a=Fw(r,s,o),c=0,u=e.requests.length;c<u;++c){var l=e.requests[c];if(l.host===a.host&&l.port===a.port){e.requests.splice(c,1),l.request.onSocket(i);return}}i.destroy(),e.removeSocket(i)})}bF.inherits(Ci,yF.EventEmitter);Ci.prototype.addRequest=function(e,t,i,r){var s=this,o=hp({request:e},s.options,Fw(t,i,r));if(s.sockets.length>=this.maxSockets){s.requests.push(o);return}s.createSocket(o,function(a){a.on("free",c),a.on("close",u),a.on("agentRemove",u),e.onSocket(a);function c(){s.emit("free",a,o)}function u(l){s.removeSocket(a),a.removeListener("free",c),a.removeListener("close",u),a.removeListener("agentRemove",u)}})};Ci.prototype.createSocket=function(e,t){var i=this,r={};i.sockets.push(r);var s=hp({},i.proxyOptions,{method:"CONNECT",path:e.host+":"+e.port,agent:!1,headers:{host:e.host+":"+e.port}});e.localAddress&&(s.localAddress=e.localAddress),s.proxyAuth&&(s.headers=s.headers||{},s.headers["Proxy-Authorization"]="Basic "+new Buffer(s.proxyAuth).toString("base64")),er("making CONNECT request");var o=i.request(s);o.useChunkedEncodingByDefault=!1,o.once("response",a),o.once("upgrade",c),o.once("connect",u),o.once("error",l),o.end();function a(p){p.upgrade=!0}function c(p,h,x){process.nextTick(function(){u(p,h,x)})}function u(p,h,x){if(o.removeAllListeners(),h.removeAllListeners(),p.statusCode!==200){er("tunneling socket could not be established, statusCode=%d",p.statusCode),h.destroy();var f=new Error("tunneling socket could not be established, statusCode="+p.statusCode);f.code="ECONNRESET",e.request.emit("error",f),i.removeSocket(r);return}if(x.length>0){er("got illegal response body from proxy"),h.destroy();var f=new Error("got illegal response body from proxy");f.code="ECONNRESET",e.request.emit("error",f),i.removeSocket(r);return}return er("tunneling connection has established"),i.sockets[i.sockets.indexOf(r)]=h,t(h)}function l(p){o.removeAllListeners(),er(`tunneling socket could not be established, cause=%s
`,p.message,p.stack);var h=new Error("tunneling socket could not be established, cause="+p.message);h.code="ECONNRESET",e.request.emit("error",h),i.removeSocket(r)}};Ci.prototype.removeSocket=function(e){var t=this.sockets.indexOf(e);if(t!==-1){this.sockets.splice(t,1);var i=this.requests.shift();i&&this.createSocket(i,function(r){i.request.onSocket(r)})}};function qw(n,e){var t=this;Ci.prototype.createSocket.call(t,n,function(i){var r=n.request.getHeader("host"),s=hp({},t.options,{socket:i,servername:r?r.replace(/:.*$/,""):n.host}),o=xF.connect(0,s);t.sockets[t.sockets.indexOf(i)]=o,e(o)})}function Fw(n,e,t){return typeof n=="string"?{host:n,port:e,localAddress:t}:n}function hp(n){for(var e=1,t=arguments.length;e<t;++e){var i=arguments[e];if(typeof i=="object")for(var r=Object.keys(i),s=0,o=r.length;s<o;++s){var a=r[s];i[a]!==void 0&&(n[a]=i[a])}}return n}var er;process.env.NODE_DEBUG&&/\btunnel\b/.test(process.env.NODE_DEBUG)?er=function(){var n=Array.prototype.slice.call(arguments);typeof n[0]=="string"?n[0]="TUNNEL: "+n[0]:n.unshift("TUNNEL:"),console.error.apply(console,n)}:er=function(){};us.debug=er});var Iw=T((l2,Aw)=>{Aw.exports=Nw()});var jw=T(Pc=>{"use strict";Object.defineProperty(Pc,"__esModule",{value:!0});Pc.configureProxy=void 0;var RF=kw(),DF=Iw(),TF=n=>{let e=new URL(n),t=(0,RF.getProxyEnv)(e);if(!t)return null;let{hostname:i,port:r,protocol:s,username:o,password:a}=new URL(t);return e.protocol==="https:"&&s==="http:"?{proxy:!1,httpsAgent:(0,DF.httpsOverHttp)({proxy:{host:i,port:parseInt(r)}})}:{proxy:{protocol:s,hostname:i,port:parseInt(r),auth:{username:o,password:a}}}};Pc.configureProxy=TF});var Lw=T(kc=>{"use strict";Object.defineProperty(kc,"__esModule",{value:!0});kc.configureProxy=void 0;var EF=jw();Object.defineProperty(kc,"configureProxy",{enumerable:!0,get:function(){return EF.configureProxy}})});var qn=T(pt=>{"use strict";Object.defineProperty(pt,"__esModule",{value:!0});pt.asPromise=pt.thenable=pt.typedArray=pt.stringArray=pt.array=pt.func=pt.error=pt.number=pt.string=pt.boolean=void 0;function PF(n){return n===!0||n===!1}pt.boolean=PF;function Mw(n){return typeof n=="string"||n instanceof String}pt.string=Mw;function kF(n){return typeof n=="number"||n instanceof Number}pt.number=kF;function OF(n){return n instanceof Error}pt.error=OF;function Uw(n){return typeof n=="function"}pt.func=Uw;function zw(n){return Array.isArray(n)}pt.array=zw;function qF(n){return zw(n)&&n.every(e=>Mw(e))}pt.stringArray=qF;function FF(n,e){return Array.isArray(n)&&n.every(e)}pt.typedArray=FF;function $w(n){return n&&Uw(n.then)}pt.thenable=$w;function NF(n){return n instanceof Promise?n:$w(n)?new Promise((e,t)=>{n.then(i=>e(i),i=>t(i))}):Promise.resolve(n)}pt.asPromise=NF});var ls=T(Ut=>{"use strict";Object.defineProperty(Ut,"__esModule",{value:!0});Ut.stringArray=Ut.array=Ut.func=Ut.error=Ut.number=Ut.string=Ut.boolean=void 0;function AF(n){return n===!0||n===!1}Ut.boolean=AF;function Hw(n){return typeof n=="string"||n instanceof String}Ut.string=Hw;function IF(n){return typeof n=="number"||n instanceof Number}Ut.number=IF;function jF(n){return n instanceof Error}Ut.error=jF;function LF(n){return typeof n=="function"}Ut.func=LF;function Bw(n){return Array.isArray(n)}Ut.array=Bw;function MF(n){return Bw(n)&&n.every(e=>Hw(e))}Ut.stringArray=MF});var Mp=T(ne=>{"use strict";Object.defineProperty(ne,"__esModule",{value:!0});ne.Message=ne.NotificationType9=ne.NotificationType8=ne.NotificationType7=ne.NotificationType6=ne.NotificationType5=ne.NotificationType4=ne.NotificationType3=ne.NotificationType2=ne.NotificationType1=ne.NotificationType0=ne.NotificationType=ne.RequestType9=ne.RequestType8=ne.RequestType7=ne.RequestType6=ne.RequestType5=ne.RequestType4=ne.RequestType3=ne.RequestType2=ne.RequestType1=ne.RequestType=ne.RequestType0=ne.AbstractMessageSignature=ne.ParameterStructures=ne.ResponseError=ne.ErrorCodes=void 0;var Cr=ls(),mp;(function(n){n.ParseError=-32700,n.InvalidRequest=-32600,n.MethodNotFound=-32601,n.InvalidParams=-32602,n.InternalError=-32603,n.jsonrpcReservedErrorRangeStart=-32099,n.serverErrorStart=-32099,n.MessageWriteError=-32099,n.MessageReadError=-32098,n.PendingResponseRejected=-32097,n.ConnectionInactive=-32096,n.ServerNotInitialized=-32002,n.UnknownErrorCode=-32001,n.jsonrpcReservedErrorRangeEnd=-32e3,n.serverErrorEnd=-32e3})(mp||(ne.ErrorCodes=mp={}));var gp=class n extends Error{constructor(e,t,i){super(t),this.code=Cr.number(e)?e:mp.UnknownErrorCode,this.data=i,Object.setPrototypeOf(this,n.prototype)}toJson(){let e={code:this.code,message:this.message};return this.data!==void 0&&(e.data=this.data),e}};ne.ResponseError=gp;var sn=class n{constructor(e){this.kind=e}static is(e){return e===n.auto||e===n.byName||e===n.byPosition}toString(){return this.kind}};ne.ParameterStructures=sn;sn.auto=new sn("auto");sn.byPosition=new sn("byPosition");sn.byName=new sn("byName");var Xe=class{constructor(e,t){this.method=e,this.numberOfParams=t}get parameterStructures(){return sn.auto}};ne.Abs Line truncated
${JSON.stringify(Object.fromEntries(i))}`));return}let s=parseInt(r);if(isNaN(s)){this.fireError(new Error(`Content-Length value must be a number. Got ${r}`));return}this.nextMessageLength=s}let t=this.buffer.tryReadBody(this.nextMessageLength);if(t===void 0){this.setPartialMessageTimer();return}this.clearPartialMessageTimer(),this.nextMessageLength=-1,this.readSemaphore.lock(async()=>{let i=this.options.contentDecoder!==void 0?await this.options.contentDecoder.decode(t):t,r=await this.options.contentTypeDecoder.decode(i,this.options);this.callback(r)}).catch(i=>{this.fireError(i)})}}catch(t){this.fireError(t)}}clearPartialMessageTimer(){this.partialMessageTimer&&(this.partialMessageTimer.dispose(),this.partialMessageTimer=void 0)}setPartialMessageTimer(){this.clearPartialMessageTimer(),!(this._partialMessageTimeout<=0)&&(this.partialMessageTimer=(0,tf.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))}};ir.ReadableStreamMessageReader=rf});var i_=T(rr=>{"use strict";Object.defineProperty(rr,"__esModule",{value:!0});rr.WriteableStreamMessageWriter=rr.AbstractMessageWriter=rr.MessageWriter=void 0;var Zw=nr(),Ro=ls(),GF=Zp(),e_=ps(),VF="Content-Length: ",t_=`\r
`,n_;(function(n){function e(t){let i=t;return i&&Ro.func(i.dispose)&&Ro.func(i.onClose)&&Ro.func(i.onError)&&Ro.func(i.write)}n.is=e})(n_||(rr.MessageWriter=n_={}));var Mc=class{constructor(){this.errorEmitter=new e_.Emitter,this.closeEmitter=new e_.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: ${Ro.string(e.message)?e.message:"unknown"}`)}};rr.AbstractMessageWriter=Mc;var sf;(function(n){function e(t){return t===void 0||typeof t=="string"?{charset:t??"utf-8",contentTypeEncoder:(0,Zw.default)().applicationJson.encoder}:{charset:t.charset??"utf-8",contentEncoder:t.contentEncoder,contentTypeEncoder:t.contentTypeEncoder??(0,Zw.default)().applicationJson.encoder}}n.fromOptions=e})(sf||(sf={}));var of=class extends Mc{constructor(e,t){super(),this.writable=e,this.options=sf.fromOptions(t),this.errorCount=0,this.writeSemaphore=new GF.Semaphore(1),this.writable.onError(i=>this.fireError(i)),this.writable.onClose(()=>this.fireClose())}async write(e){return this.writeSemaphore.lock(async()=>this.options.contentTypeEncoder.encode(e,this.options).then(i=>this.options.contentEncoder!==void 0?this.options.contentEncoder.encode(i):i).then(i=>{let r=[];return r.push(VF,i.byteLength.toString(),t_),r.push(t_),this.doWrite(e,r,i)},i=>{throw this.fireError(i),i}))}async doWrite(e,t,i){try{return await this.writable.write(t.join(""),"ascii"),this.writable.write(i)}catch(r){return this.handleError(r,e),Promise.reject(r)}}handleError(e,t){this.errorCount++,this.fireError(e,t,this.errorCount)}end(){this.writable.end()}};rr.WriteableStreamMessageWriter=of});var r_=T(Uc=>{"use strict";Object.defineProperty(Uc,"__esModule",{value:!0});Uc.AbstractMessageBuffer=void 0;var XF=13,JF=10,YF=`\r
`,af=class{constructor(e="utf-8"){this._encoding=e,this._chunks=[],this._totalLength=0}get encoding(){return this._encoding}append(e){let t=typeof e=="string"?this.fromString(e,this._encoding):e;this._chunks.push(t),this._totalLength+=t.byteLength}tryReadHeaders(e=!1){if(this._chunks.length===0)return;let t=0,i=0,r=0,s=0;e:for(;i<this._chunks.length;){let u=this._chunks[i];for(r=0;r<u.length;){switch(u[r]){case XF:switch(t){case 0:t=1;break;case 2:t=3;break;default:t=0}break;case JF:switch(t){case 1:t=2;break;case 3:t=4,r++;break e;default:t=0}break;default:t=0}r++}s+=u.byteLength,i++}if(t!==4)return;let o=this._read(s+r),a=new Map,c=this.toString(o,"ascii").split(YF);if(c.length<2)return a;for(let u=0;u<c.length-2;u++){let l=c[u],p=l.indexOf(":");if(p===-1)throw new Error(`Message header must separate key and value using ':'
${l}`);let h=l.substr(0,p),x=l.substr(p+1).trim();a.set(e?h.toLowerCase():h,x)}return a}tryReadBody(e){if(!(this._totalLength<e))return this._read(e)}get numberOfBytes(){return this._totalLength}_read(e){if(e===0)return this.emptyBuffer();if(e>this._totalLength)throw new Error("Cannot read so many bytes!");if(this._chunks[0].byteLength===e){let s=this._chunks[0];return this._chunks.shift(),this._totalLength-=e,this.asNative(s)}if(this._chunks[0].byteLength>e){let s=this._chunks[0],o=this.asNative(s,e);return this._chunks[0]=s.slice(e),this._totalLength-=e,o}let t=this.allocNative(e),i=0,r=0;for(;e>0;){let s=this._chunks[r];if(s.byteLength>e){let o=s.slice(0,e);t.set(o,i),i+=e,this._chunks[r]=s.slice(e),this._totalLength-=e,e-=e}else t.set(s,i),i+=s.byteLength,this._chunks.shift(),this._totalLength-=s.byteLength,e-=s.byteLength}return t}};Uc.AbstractMessageBuffer=af});var u_=T(pe=>{"use strict";Object.defineProperty(pe,"__esModule",{value:!0});pe.createMessageConnection=pe.ConnectionOptions=pe.MessageStrategy=pe.CancellationStrategy=pe.CancellationSenderStrategy=pe.CancellationReceiverStrategy=pe.RequestCancellationReceiverStrategy=pe.IdCancellationReceiverStrategy=pe.ConnectionStrategy=pe.ConnectionError=pe.ConnectionErrors=pe.LogTraceNotification=pe.SetTraceNotification=pe.TraceFormat=pe.TraceValues=pe.Trace=pe.NullLogger=pe.ProgressType=pe.ProgressToken=void 0;var s_=nr(),rt=ls(),oe=Mp(),o_=zp(),Do=ps(),cf=Ic(),Po;(function(n){n.type=new oe.NotificationType("$/cancelRequest")})(Po||(Po={}));var uf;(function(n){function e(t){return typeof t=="string"||typeof t=="number"}n.is=e})(uf||(pe.ProgressToken=uf={}));var To;(function(n){n.type=new oe.NotificationType("$/progress")})(To||(To={}));var lf=class{constructor(){}};pe.ProgressType=lf;var df;(function(n){function e(t){return rt.func(t)}n.is=e})(df||(df={}));pe.NullLogger=Object.freeze({error:()=>{},warn:()=>{},info:()=>{},log:()=>{}});var qe;(function(n){n[n.Off=0]="Off",n[n.Messages=1]="Messages",n[n.Compact=2]="Compact",n[n.Verbose=3]="Verbose"})(qe||(pe.Trace=qe={}));var a_;(function(n){n.Off="off",n.Messages="messages",n.Compact="compact",n.Verbose="verbose"})(a_||(pe.TraceValues=a_={}));(function(n){function e(i){if(!rt.string(i))return n.Off;switch(i=i.toLowerCase(),i){case"off":return n.Off;case"messages":return n.Messages;case"compact":return n.Compact;case"verbose":return n.Verbose;default:return n.Off}}n.fromString=e;function t(i){switch(i){case n.Off:return"off";case n.Messages:return"messages";case n.Compact:return"compact";case n.Verbose:return"verbose";default:return"off"}}n.toString=t})(qe||(pe.Trace=qe={}));var vn;(function(n){n.Text="text",n.JSON="json"})(vn||(pe.TraceFormat=vn={}));(function(n){function e(t){return rt.string(t)?(t=t.toLowerCase(),t==="json"?n.JSON:n.Text):n.Text}n.fromString=e})(vn||(pe.TraceFormat=vn={}));var pf;(function(n){n.type=new oe.NotificationType("$/setTrace")})(pf||(pe.SetTraceNotification=pf={}));var zc;(function(n){n.type=new oe.NotificationType("$/logTrace")})(zc||(pe.LogTraceNotification=zc={}));var Eo;(function(n){n[n.Closed=1]="Closed",n[n.Disposed=2]="Disposed",n[n.AlreadyListening=3]="AlreadyListening"})(Eo||(pe.ConnectionErrors=Eo={}));var gs=class n extends Error{constructor(e,t){super(t),this.code=e,Object.setPrototypeOf(this,n.prototype)}};pe.ConnectionError=gs;var ff;(function(n){function e(t){let i=t;return i&&rt.func(i.cancelUndispatched)}n.is=e})(ff||(pe.ConnectionStrategy=ff={}));var $c;(function(n){function e(t){let i=t;return i&&(i.kind===void 0||i.kind==="id")&&rt.func(i.createCancellationTokenSource)&&(i.dispose===void 0||rt.func(i.dispose))}n.is=e})($c||(pe.IdCancellationReceiverStrategy=$c={}));var hf;(function(n){function e(t){let i=t;return i&&i.kind==="request"&&rt.func(i.createCancellationTokenSource)&&(i.dispose===void 0||rt.func(i.dispose))}n.is=e})(hf||(pe.RequestCancellationReceiverStrategy=hf={}));var Hc;(function(n){n.Message=Object.freeze({createCancellationTokenSource(t){return new cf.CancellationTokenSource}});function e(t){return $c.is(t)||hf.is(t)}n.is=e})(Hc||(pe.CancellationReceiverStrategy=Hc={}));var Bc;(function(n){n.Message=Object.freeze({sendCancellation(t,i){return t.sendNotification(Po.type,{id:i})},cleanup(t){}});function e(t){let i=t;return i&&rt.func(i.sendCancellation)&&rt.func(i.cleanup)}n.is=e})(Bc||(pe.CancellationSenderStrategy=Bc={}));var Wc;(function(n){n.Message=Object.freeze({receiver:Hc.Message,sender:Bc.Message});function e(t){let i=t;return i&&Hc.is(i.receiver)&&Bc.is(i.sender)}n.is=e})(Wc||(pe.CancellationStrategy=Wc={}));var Kc;(function(n){function e(t){let i=t;return i&&rt.func(i.handleMessage)}n.is=e})(Kc||(pe.MessageStrategy=Kc={}));var c_;(function(n){function e(t){let i=t;return i&&(Wc.is(i.cancellationStrategy)||ff.is(i.connectionStrategy)||Kc.is(i.messageStrategy))}n.is=e})(c_||(pe.ConnectionOptions=c_={}));var Vn;(function(n){n[n.New=1]="New",n[n.Listening=2]="Listening",n[n.Closed=3]="Closed",n[n.Disposed=4]="Disposed"})(Vn||(Vn={}));fun Line truncated
${JSON.stringify(C.error,void 0,4)}`):r.error("Received response message without id. No further error information provided.");else{let L=C.id,B=w.get(L);if(ti(C,B),B!==void 0){w.delete(L);try{if(C.error){let K=C.error;B.reject(new oe.ResponseError(K.code,K.message,K.data))}else if(C.result!==void 0)B.resolve(C.result);else throw new Error("Should never happen.")}catch(K){K.message?r.error(`Response handler '${B.method}' failed with message: ${K.message}`):r.error(`Response handler '${B.method}' failed unexpectedly.`)}}}}function Un(C){if(ut())return;let L,B;if(C.method===Po.type.method){let K=C.params.id;S.delete(K),Tn(C);return}else{let K=h.get(C.method);K&&(B=K.handler,L=K.type)}if(B||p)try{if(Tn(C),B)if(C.params===void 0)L!==void 0&&L.numberOfParams!==0&&L.parameterStructures!==oe.ParameterStructures.byName&&r.error(`Notification ${C.method} defines ${L.numberOfParams} params but received none.`),B();else if(Array.isArray(C.params)){let K=C.params;C.method===To.type.method&&K.length===2&&uf.is(K[0])?B({token:K[0],value:K[1]}):(L!==void 0&&(L.parameterStructures===oe.ParameterStructures.byName&&r.error(`Notification ${C.method} defines parameters by name but received parameters by position`),L.numberOfParams!==C.params.length&&r.error(`Notification ${C.method} defines ${L.numberOfParams} params but received ${K.length} arguments`)),B(...K))}else L!==void 0&&L.parameterStructures===oe.ParameterStructures.byPosition&&r.error(`Notification ${C.method} defines parameters by position but received parameters by name`),B(C.params);else p&&p(C.method,C.params)}catch(K){K.message?r.error(`Notification handler '${C.method}' failed with message: ${K.message}`):r.error(`Notification handler '${C.method}' failed unexpectedly.`)}else te.fire(C)}function ei(C){if(!C){r.error("Received empty message.");return}r.error(`Received message which is neither a response nor a notification message:
${JSON.stringify(C,null,4)}`);let L=C;if(rt.string(L.id)||rt.number(L.id)){let B=L.id,K=w.get(B);K&&K.reject(new Error("The received response has neither a result nor an error property."))}}function yt(C){if(C!=null)switch(k){case qe.Verbose:return JSON.stringify(C,null,4);case qe.Compact:return JSON.stringify(C);default:return}}function mi(C){if(!(k===qe.Off||!j))if(N===vn.Text){let L;(k===qe.Verbose||k===qe.Compact)&&C.params&&(L=`Params: ${yt(C.params)}
`),j.log(`Sending request '${C.method} - (${C.id})'.`,L)}else vt("send-request",C)}function zn(C){if(!(k===qe.Off||!j))if(N===vn.Text){let L;(k===qe.Verbose||k===qe.Compact)&&(C.params?L=`Params: ${yt(C.params)}
`:L=`No parameters provided.
`),j.log(`Sending notification '${C.method}'.`,L)}else vt("send-notification",C)}function Dn(C,L,B){if(!(k===qe.Off||!j))if(N===vn.Text){let K;(k===qe.Verbose||k===qe.Compact)&&(C.error&&C.error.data?K=`Error data: ${yt(C.error.data)}
`:C.result?K=`Result: ${yt(C.result)}
`:C.error===void 0&&(K=`No result returned.
`)),j.log(`Sending response '${L} - (${C.id})'. Processing request took ${Date.now()-B}ms`,K)}else vt("send-response",C)}function Fi(C){if(!(k===qe.Off||!j))if(N===vn.Text){let L;(k===qe.Verbose||k===qe.Compact)&&C.params&&(L=`Params: ${yt(C.params)}
`),j.log(`Received request '${C.method} - (${C.id})'.`,L)}else vt("receive-request",C)}function Tn(C){if(!(k===qe.Off||!j||C.method===zc.type.method))if(N===vn.Text){let L;(k===qe.Verbose||k===qe.Compact)&&(C.params?L=`Params: ${yt(C.params)}
`:L=`No parameters provided.
`),j.log(`Received notification '${C.method}'.`,L)}else vt("receive-notification",C)}function ti(C,L){if(!(k===qe.Off||!j))if(N===vn.Text){let B;if((k===qe.Verbose||k===qe.Compact)&&(C.error&&C.error.data?B=`Error data: ${yt(C.error.data)}
`:C.result?B=`Result: ${yt(C.result)}
`:C.error===void 0&&(B=`No result returned.
`)),L){let K=C.error?` Request failed: ${C.error.message} (${C.error.code}).`:"";j.log(`Received response '${L.method} - (${C.id})' in ${Date.now()-L.timerStart}ms.${K}`,B)}else j.log(`Received response ${C.id} without active response promise.`,B)}else vt("receive-response",C)}function vt(C,L){if(!j||k===qe.Off)return;let B={isLSPMessage:!0,type:C,message:L,timestamp:Date.now()};j.log(B)}function Lt(){if(de())throw new gs(Eo.Closed,"Connection is closed.");if(ut())throw new gs(Eo.Disposed,"Connection is disposed.")}function Nt(){if(ie())throw new gs(Eo.AlreadyListening,"Connection is already listening")}function fn(){if(!ie())throw new Error("Call listen() first.")}function Zt(C){return C===void 0?null:C}function ni(C){if(C!==null)return C}function gi(C){return C!=null&&!Array.isArray(C)&&typeof C=="object"}function $n(C,L){switch(C){case oe.ParameterStructures.auto:return gi(L)?ni(L):[Zt(L)];case oe.ParameterStructures.byName:if(!gi(L))throw new Error("Received parameters by name but param is not an object literal.");return ni(L);case oe.ParameterStructures.byPosition:return[Zt(L)];default:throw new Error(`Unknown parameter structure ${C.toString()}`)}}function vi(C,L){let B,K=C.numberOfParams;switch(K){case 0:B=void 0;break;case 1:B=$n(C.parameterStructures,L[0]);break;default:B=[];for(let De=0;De<L.length&&De<K;De++)B.push(Zt(L[De]));if(L.length<K)for(let De=L.length;De<K;De++)B.push(null);break}return B}let Gt={sendNotification:(C,...L)=>{Lt();let B,K;if(rt.string(C)){B=C;let Se=L[0],Ae=0,Ue=oe.ParameterStructures.auto;oe.ParameterStructures.is(Se)&&(Ae=1,Ue=Se);let me=L.length,Pe=me-Ae;switch(Pe){case 0:K=void 0;break;case 1:K=$n(Ue,L[Ae]);break;default:if(Ue===oe.ParameterStructures.byName)throw new Error(`Received ${Pe} parameters for 'by Name' notification parameter structure.`);K=L.slice(Ae,me).map(ye=>Zt(ye));break}}else{let Se=L;B=C.method,K=vi(C,Se)}let De={jsonrpc:c,method:B,params:K};return zn(De),e.write(De).catch(Se=>{throw r.error("Sending notification failed."),Se})},onNotification:(C,L)=>{Lt();let B;return rt.func(C)?p=C:L&&(rt.string(C)?(B=C,h.set(C,{type:void 0,handler:L})):(B=C.method,h.set(C.method,{type:C,handler:L}))),{dispose:()=>{B!==void 0?h.delete(B):p=void 0}}},onProgress:(C,L,B)=>{if(x.has(L))throw new Error(`Progress handler for token ${L} already registered`);return x.set(L,B),{dispose:()=>{x.delete(L)}}},sendProgress:(C,L,B)=>Gt.sendNotification(To.type,{token:L,value:B}),onUnhandledProgress:Oe.event,sendRequest:(C,...L)=>{Lt(),fn();let B,K,De;if(rt.string(C)){B=C;let me=L[0],Pe=L[L.length-1],ye=0,ze=oe.ParameterStructures.auto;oe.ParameterStructures.is(me)&&(ye=1,ze=me);let lt=L.length;cf.CancellationToken.is(Pe)&&(lt=lt-1,De=Pe);let Dt=lt-ye;switch(Dt){case 0:K=void 0;break;case 1:K=$n(ze,L[ye]);break;default:if(ze===oe.ParameterStructures.byName)throw new Error(`Received ${Dt} parameters for 'by Name' request parameter structure.`);K=L.slice(ye,lt).map(Ni=>Zt(Ni));break}}else{let me=L;B=C.method,K=vi(C,me);let Pe=C.numberOfParams;De=cf.CancellationToken.is(me[Pe])?me[Pe]:void 0}let Se=s++,Ae;De&&(Ae=De.onCancellationRequested(()=>{let me=We.sender.sendCancellation(Gt,Se);return me===void 0?(r.log(`Received no promise from cancellation strategy when cancelling id ${Se}`),Promise.resolve()):me.catch(()=>{r.log(`Sending cancellation messages for id ${Se} failed`)})}));let Ue={jsonrpc:c,id:Se,method:B,params:K};return mi(Ue),typeof We.sender.enableCancellation=="function"&&We.sender.enableCancellation(Ue),new Promise(async(me,Pe)=>{let ye=Dt=>{me(Dt),We.sender.cleanup(Se),Ae?.dispose()},ze=Dt=>{Pe(Dt),We.sender.cleanup(Se),Ae?.dispose()},lt={method:B,timerStart:Date.now(),resolve:ye,reject:ze};try{await e.write(Ue),w.set(Se,lt)}catch(Dt){throw r.error("Sending request failed."),lt.reject(new oe.ResponseError(oe.ErrorCodes.MessageWriteError,Dt.message?Dt.message:"Unknown reason")),Dt}})},onRequest:(C,L)=>{Lt();let B=null;return df.is(C)?(B=void 0,u=C):rt.string(C)?(B=null,L!==void 0&&(B=C,l.set(C,{handler:L,type:void 0}))):L!==void 0&&(B=C.method,l.set(C.method,{type:C,handler:L})),{dispose:()=>{B!==null&&(B!==void 0?l.delete(B):u=void 0)}}},hasPendingResponse:()=>w.size>0,trace:async(C,L,B)=>{let K=!1,De=vn.Text;B!==void 0&&(rt.boolean(B)?K=B:(K=B.sendNotification||!1,De=B.traceFormat||vn.Text)),k=C,N=De,k===qe.Off?j=void 0:j=L,K&&!de()&&!ut()&&await Gt.sendNotification(pf.type,{value:qe.toString(C)})},onError:$.event,onClose:Q.event,onUnhandledNotification:te.event,onDispose:Ye.event,end:()=>{e.end()},dispose:()=>{if(ut())return;G=Vn.Disposed,Ye.fire(void 0);let C=new oe.ResponseError(oe.ErrorCodes.PendingResponseRejected,"Pending response rejected since connection got disposed");for(let L of w.values())L.reject(C);w=new Map,O=new Map,S=new Set,y=new o_.LinkedMap,rt.func(e.dispose)&&e.dispose(),rt.func(n.dispose)&&n.dispose()},listen:()=>{Lt(),Nt(),G=Vn.Listening,n.listen(Rn)},inspect:()=>{(0,s_.default)().console.log("inspect")}};return Gt.onNotification(zc.type,C=>{if(k= Line truncated
`,`\r
`,"\r"];var Y;(function(v){function R(F,M,ce,Qe){return new ke(F,M,ce,Qe)}v.create=R;function D(F){var M=F;return!!(P.defined(M)&&P.string(M.uri)&&(P.undefined(M.languageId)||P.string(M.languageId))&&P.uinteger(M.lineCount)&&P.func(M.getText)&&P.func(M.positionAt)&&P.func(M.offsetAt))}v.is=D;function b(F,M){for(var ce=F.getText(),Qe=m(M,function(ii,d){var E=ii.range.start.line-d.range.start.line;return E===0?ii.range.start.character-d.range.start.character:E}),$e=ce.length,en=Qe.length-1;en>=0;en--){var hn=Qe[en],Hn=F.offsetAt(hn.range.start),xe=F.offsetAt(hn.range.end);if(xe<=$e)ce=ce.substring(0,Hn)+hn.newText+ce.substring(xe,ce.length);else throw new Error("Overlapping edit");$e=Hn}return ce}v.applyEdits=b;function m(F,M){if(F.length<=1)return F;var ce=F.length/2|0,Qe=F.slice(0,ce),$e=F.slice(ce);m(Qe,M),m($e,M);for(var en=0,hn=0,Hn=0;en<Qe.length&&hn<$e.length;){var xe=M(Qe[en],$e[hn]);xe<=0?F[Hn++]=Qe[en++]:F[Hn++]=$e[hn++]}for(;en<Qe.length;)F[Hn++]=Qe[en++];for(;hn<$e.length;)F[Hn++]=$e[hn++];return F}})(Y||(e.TextDocument=Y={}));var ke=function(){function v(R,D,b,m){this._uri=R,this._languageId=D,this._version=b,this._content=m,this._lineOffsets=void 0}return Object.defineProperty(v.prototype,"uri",{get:function(){return this._uri},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"languageId",{get:function(){return this._languageId},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"version",{get:function(){return this._version},enumerable:!1,configurable:!0}),v.prototype.getText=function(R){if(R){var D=this.offsetAt(R.start),b=this.offsetAt(R.end);return this._content.substring(D,b)}return this._content},v.prototype.update=function(R,D){this._content=R.text,this._version=D,this._lineOffsets=void 0},v.prototype.getLineOffsets=function(){if(this._lineOffsets===void 0){for(var R=[],D=this._content,b=!0,m=0;m<D.length;m++){b&&(R.push(m),b=!1);var F=D.charAt(m);b=F==="\r"||F===`
`,F==="\r"&&m+1<D.length&&D.charAt(m+1)===`
`&&m++}b&&D.length>0&&R.push(D.length),this._lineOffsets=R}return this._lineOffsets},v.prototype.positionAt=function(R){R=Math.max(Math.min(R,this._content.length),0);var D=this.getLineOffsets(),b=0,m=D.length;if(m===0)return o.create(0,R);for(;b<m;){var F=Math.floor((b+m)/2);D[F]>R?m=F:b=F+1}var M=b-1;return o.create(M,R-D[M])},v.prototype.offsetAt=function(R){var D=this.getLineOffsets();if(R.line>=D.length)return this._content.length;if(R.line<0)return 0;var b=D[R.line],m=R.line+1<D.length?D[R.line+1]:this._content.length;return Math.max(Math.min(b+R.character,m),b)},Object.defineProperty(v.prototype,"lineCount",{get:function(){return this.getLineOffsets().length},enumerable:!1,configurable:!0}),v}(),P;(function(v){var R=Object.prototype.toString;function D(xe){return typeof xe<"u"}v.defined=D;function b(xe){return typeof xe>"u"}v.undefined=b;function m(xe){return xe===!0||xe===!1}v.boolean=m;function F(xe){return R.call(xe)==="[object String]"}v.string=F;function M(xe){return R.call(xe)==="[object Number]"}v.number=M;function ce(xe,ii,d){return R.call(xe)==="[object Number]"&&ii<=xe&&xe<=d}v.numberRange=ce;function Qe(xe){return R.call(xe)==="[object Number]"&&-2147483648<=xe&&xe<=2147483647}v.integer=Qe;function $e(xe){return R.call(xe)==="[object Number]"&&0<=xe&&xe<=2147483647}v.uinteger=$e;function en(xe){return R.call(xe)==="[object Function]"}v.func=en;function hn(xe){return xe!==null&&typeof xe=="object"}v.objectLiteral=hn;function Hn(xe,ii){return Array.isArray(xe)&&xe.every(ii)}v.typedArray=Hn})(P||(P={}))})});var et=T(on=>{"use strict";Object.defineProperty(on,"__esModule",{value:!0});on.ProtocolNotificationType=on.ProtocolNotificationType0=on.ProtocolRequestType=on.ProtocolRequestType0=on.RegistrationType=on.MessageDirection=void 0;var xs=Tr(),b_;(function(n){n.clientToServer="clientToServer",n.serverToClient="serverToClient",n.both="both"})(b_||(on.MessageDirection=b_={}));var Tf=class{constructor(e){this.method=e}};on.RegistrationType=Tf;var Ef=class extends xs.RequestType0{constructor(e){super(e)}};on.ProtocolRequestType0=Ef;var Pf=class extends xs.RequestType{constructor(e){super(e,xs.ParameterStructures.byName)}};on.ProtocolRequestType=Pf;var kf=class extends xs.NotificationType0{constructor(e){super(e)}};on.ProtocolNotificationType0=kf;var Of=class extends xs.NotificationType{constructor(e){super(e,xs.ParameterStructures.byName)}};on.ProtocolNotificationType=Of});var eu=T(St=>{"use strict";Object.defineProperty(St,"__esModule",{value:!0});St.objectLiteral=St.typedArray=St.stringArray=St.array=St.func=St.error=St.number=St.string=St.boolean=void 0;function mN(n){return n===!0||n===!1}St.boolean=mN;function w_(n){return typeof n=="string"||n instanceof String}St.string=w_;function gN(n){return typeof n=="number"||n instanceof Number}St.number=gN;function vN(n){return n instanceof Error}St.error=vN;function xN(n){return typeof n=="function"}St.func=xN;function __(n){return Array.isArray(n)}St.array=__;function yN(n){return __(n)&&n.every(e=>w_(e))}St.stringArray=yN;function bN(n,e){return Array.isArray(n)&&n.every(e)}St.typedArray=bN;function wN(n){return n!==null&&typeof n=="object"}St.objectLiteral=wN});var R_=T(tu=>{"use strict";Object.defineProperty(tu,"__esModule",{value:!0});tu.ImplementationRequest=void 0;var S_=et(),C_;(function(n){n.method="textDocument/implementation",n.messageDirection=S_.MessageDirection.clientToServer,n.type=new S_.ProtocolRequestType(n.method)})(C_||(tu.ImplementationRequest=C_={}))});var E_=T(nu=>{"use strict";Object.defineProperty(nu,"__esModule",{value:!0});nu.TypeDefinitionRequest=void 0;var D_=et(),T_;(function(n){n.method="textDocument/typeDefinition",n.messageDirection=D_.MessageDirection.clientToServer,n.type=new D_.ProtocolRequestType(n.method)})(T_||(nu.TypeDefinitionRequest=T_={}))});var O_=T(ys=>{"use strict";Object.defineProperty(ys,"__esModule",{value:!0});ys.DidChangeWorkspaceFoldersNotification=ys.WorkspaceFoldersRequest=void 0;var iu=et(),P_;(function(n){n.method="workspace/workspaceFolders",n.messageDirection=iu.MessageDirection.serverToClient,n.type=new iu.ProtocolRequestType0(n.method)})(P_||(ys.WorkspaceFoldersRequest=P_={}));var k_;(function(n){n.method="workspace/didChangeWorkspaceFolders",n.messageDirection=iu.MessageDirection.clientToServer,n.type=new iu.ProtocolNotificationType(n.method)})(k_||(ys.DidChangeWorkspaceFoldersNotification=k_={}))});var N_=T(ru=>{"use strict";Object.defineProperty(ru,"__esModule",{value:!0});ru.ConfigurationRequest=void 0;var q_=et(),F_;(function(n){n.method="workspace/configuration",n.messageDirection=q_.MessageDirection.serverToClient,n.type=new q_.ProtocolRequestType(n.method)})(F_||(ru.ConfigurationRequest=F_={}))});var j_=T(bs=>{"use strict";Object.defineProperty(bs,"__esModule",{value:!0});bs.ColorPresentationRequest=bs.DocumentColorRequest=void 0;var su=et(),A_;(function(n){n.method="textDocument/documentColor",n.messageDirection=su.MessageDirection.clientToServer,n.type=new su.ProtocolRequestType( Line truncated
${JSON.stringify(Le,void 0,4)}`)},E)}else if(d.changes){let At=d.changes;await Ee.forEach(Object.keys(At),Le=>{Tt.set(r(Le),mt(At[Le]))},E)}return Tt}function C(d){if(d!==void 0)return{label:d.label,needsConfirmation:!!d.needsConfirmation,description:d.description}}function L(d){let E=f(d.range),U=d.target?s(d.target):void 0,Z=new aA.default(E,U);return d.tooltip!==void 0&&(Z.tooltip=d.tooltip),d.data!==void 0&&d.data!==null&&(Z.data=d.data),Z}async function B(d,E){if(d)return Ee.map(d,L,E)}function K(d){return new W.Color(d.red,d.green,d.blue,d.alpha)}function De(d){return new W.ColorInformation(f(d.range),K(d.color))}async function Se(d,E){if(d)return Ee.map(d,De,E)}function Ae(d){let E=new W.ColorPresentation(d.label);return E.additionalTextEdits=mt(d.additionalTextEdits),d.textEdit&&(E.textEdit=Ne(d.textEdit)),E}async function Ue(d,E){if(d)return Ee.map(d,Ae,E)}function me(d){if(d)switch(d){case ae.FoldingRangeKind.Comment:return W.FoldingRangeKind.Comment;case ae.FoldingRangeKind.Imports:return W.FoldingRangeKind.Imports;case ae.FoldingRangeKind.Region:return W.FoldingRangeKind.Region}}function Pe(d){return new W.FoldingRange(d.startLine,d.endLine,me(d.kind))}async function ye(d,E){if(d)return Ee.map(d,Pe,E)}function ze(d){return new W.SelectionRange(f(d.range),d.parent?ze(d.parent):void 0)}async function lt(d,E){return Array.isArray(d)?Ee.map(d,ze,E):[]}function Dt(d){return ae.InlineValueText.is(d)?new W.InlineValueText(f(d.range),d.text):ae.InlineValueVariableLookup.is(d)?new W.InlineValueVariableLookup(f(d.range),d.variableName,d.caseSensitiveLookup):new W.InlineValueEvaluatableExpression(f(d.range),d.expression)}async function Ni(d,E){return Array.isArray(d)?Ee.map(d,Dt,E):[]}async function Ai(d,E){let U=typeof d.label=="string"?d.label:await Ee.map(d.label,g,E),Z=new pA.default(x(d.position),U);return d.kind!==void 0&&(Z.kind=d.kind),d.textEdits!==void 0&&(Z.textEdits=await ct(d.textEdits,E)),d.tooltip!==void 0&&(Z.tooltip=A(d.tooltip)),d.paddingLeft!==void 0&&(Z.paddingLeft=d.paddingLeft),d.paddingRight!==void 0&&(Z.paddingRight=d.paddingRight),d.data!==void 0&&(Z.data=d.data),Z}function g(d){let E=new W.InlayHintLabelPart(d.value);return d.location!==void 0&&(E.location=Ke(d.location)),d.tooltip!==void 0&&(E.tooltip=A(d.tooltip)),d.command!==void 0&&(E.command=vt(d.command)),E}function A(d){return typeof d=="string"?d:k(d)}async function Y(d,E){if(Array.isArray(d))return Ee.mapAsync(d,Ai,E)}function ke(d){if(d===null)return;let E=new uA.default(yt(d.kind),d.name,d.detail||"",s(d.uri),f(d.range),f(d.selectionRange),d.data);return d.tags!==void 0&&(E.tags=zn(d.tags)),E}async function P(d,E){if(d!==null)return Ee.map(d,ke,E)}async function v(d,E){return new W.CallHierarchyIncomingCall(ke(d.from),await y(d.fromRanges,E))}async function R(d,E){if(d!==null)return Ee.mapAsync(d,v,E)}async function D(d,E){return new W.CallHierarchyOutgoingCall(ke(d.to),await y(d.fromRanges,E))}async function b(d,E){if(d!==null)return Ee.mapAsync(d,D,E)}async function m(d,E){if(d!=null)return new W.SemanticTokens(new Uint32Array(d.data),d.resultId)}function F(d){return new W.SemanticTokensEdit(d.start,d.deleteCount,d.data!==void 0?new Uint32Array(d.data):void 0)}async function M(d,E){if(d!=null)return new W.SemanticTokensEdits(d.edits.map(F),d.resultId)}function ce(d){return d}async function Qe(d,E){if(d!=null)return new W.LinkedEditingRanges(await y(d.ranges,E),$e(d.wordPattern))}function $e(d){if(d!=null)return new RegExp(d)}function en(d){if(d===null)return;let E=new lA.default(yt(d.kind),d.name,d.detail||"",s(d.uri),f(d.range),f(d.selectionRange),d.data);return d.tags!==void 0&&(E.tags=zn(d.tags)),E}async function hn(d,E){if(d!==null)return Ee.map(d,en,E)}function Hn(d){if(An.string(d))return d;if(ae.RelativePattern.is(d)){if(ae.URI.is(d.baseUri))return new W.RelativePattern(s(d.baseUri),d.pattern);if(ae.WorkspaceFolder.is(d.baseUri)){let E=W.workspace.getWorkspaceFolder(s(d.baseUri.uri));return E!==void 0?new W.RelativePattern(E,d.pattern):void 0}}}async function xe(d,E){if(!d)return;if(Array.isArray(d))return Ee.map(d,Tt=>ii(Tt),E);let U=d,Z=await Ee.map(U.items,Tt=>ii(Tt),E);return new W.InlineCompletionList(Z)}function ii(d){let E;typeof d.insertText=="string"?E=d.insertText:E=new W.SnippetString(d.insertText.value);let U;d.command&&(U=vt(d.command));let Z=new W.InlineCompletionItem(E,f(d.range),U);return d.filterText&&(Z.filterText=d.filterText),Z}return{asUri:s,asDocumentSelector:o,asDiagnostics:a,asDiagnostic:u,asRange:f,asRanges:y,asPosition:x,asDiagnosticSeverity:w,asDiagnosticTag:h,asHover:N,asCompletionResult:j,asCompletionItem:Oe,asTextEdit:Ne,asTextEdits:ct,asSignatureHelp:se,asSignatureInformations:ie,asSignatureInformation:de,asParameterInformations:ut,asParameterInformation:Re,asDeclarationResult:Sn,asDefinitionResult:gt,asLocation:Ke,asReferences:Rn,asDocumentHighlights:Ge,asDocumentHighlight:Mn,asDocumentHighlightKind:Un,asSymbolKind:yt,asSymbolTag:mi,asSymbolTags:zn,asSymbolInformations:ei,asSymb Line truncated
globstar while`,e,p,t,h,x),this.matchOne(e.slice(p),t.slice(h),i))return this.debug("globstar found match!",p,a,x),!0;if(x==="."||x===".."||!r.dot&&x.charAt(0)==="."){this.debug("dot detected!",e,p,t,h);break}this.debug("globstar swallow a segment, and continue"),p++}return!!(i&&(this.debug(`
>>> no match, partial?`,e,p,t,h),p===a))}var f;if(typeof u=="string"?(f=l===u,this.debug("string match",u,l,f)):(f=l.match(u),this.debug("pattern match",u,l,f)),!f)return!1}if(s===a&&o===c)return!0;if(s===a)return i;if(o===c)return s===a-1&&e[s]==="";throw new Error("wtf?")}braceExpand(){return eR(this.pattern,this.options)}parse(e,t){Su(e);let i=this.options;if(e==="**")if(i.noglobstar)e="*";else return Jn;if(e==="")return"";let r="",s=!1,o=!1,a=[],c=[],u,l=!1,p=-1,h=-1,x,f,y,w=e.charAt(0)===".",S=i.dot||w,O=()=>w?"":S?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)",k=$=>$.charAt(0)==="."?"":i.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)",N=()=>{if(u){switch(u){case"*":r+=Ph,s=!0;break;case"?":r+=qh,s=!0;break;default:r+="\\"+u;break}this.debug("clearStateChar %j %j",u,r),u=!1}};for(let $=0,Q;$<e.length&&(Q=e.charAt($));$++){if(this.debug("%s %s %s %j",e,$,r,Q),o){if(Q==="/")return!1;Y0[Q]&&(r+="\\"),r+=Q,o=!1;continue}switch(Q){case"/":return!1;case"\\":if(l&&e.charAt($+1)==="-"){r+=Q;continue}N(),o=!0;continue;case"?":case"*":case"+":case"@":case"!":if(this.debug("%s %s %s %j <-- stateChar",e,$,r,Q),l){this.debug(" in class"),Q==="!"&&$===h+1&&(Q="^"),r+=Q;continue}this.debug("call clearStateChar %j",u),N(),u=Q,i.noext&&N();continue;case"(":{if(l){r+="(";continue}if(!u){r+="\\(";continue}let te={type:u,start:$-1,reStart:r.length,open:J0[u].open,close:J0[u].close};this.debug(this.pattern," ",te),a.push(te),r+=te.open,te.start===0&&te.type!=="!"&&(w=!0,r+=k(e.slice($+1))),this.debug("plType %j %j",u,r),u=!1;continue}case")":{let te=a[a.length-1];if(l||!te){r+="\\)";continue}a.pop(),N(),s=!0,f=te,r+=f.close,f.type==="!"&&c.push(Object.assign(f,{reEnd:r.length}));continue}case"|":{let te=a[a.length-1];if(l||!te){r+="\\|";continue}N(),r+="|",te.start===0&&te.type!=="!"&&(w=!0,r+=k(e.slice($+1)));continue}case"[":if(N(),l){r+="\\"+Q;continue}l=!0,h=$,p=r.length,r+=Q;continue;case"]":if($===h+1||!l){r+="\\"+Q;continue}x=e.substring(h+1,$);try{RegExp("["+NA(qA(x))+"]"),r+=Q}catch{r=r.substring(0,p)+"(?:$.)"}s=!0,l=!1;continue;default:N(),Y0[Q]&&!(Q==="^"&&l)&&(r+="\\"),r+=Q;break}}for(l&&(x=e.slice(h+1),y=this.parse(x,kh),r=r.substring(0,p)+"\\["+y[0],s=s||y[1]),f=a.pop();f;f=a.pop()){let $;$=r.slice(f.reStart+f.open.length),this.debug("setting tail",r,f),$=$.replace(/((?:\\{2}){0,64})(\\?)\|/g,(te,Oe,Ye)=>(Ye||(Ye="\\"),Oe+Oe+Ye+"|")),this.debug(`tail=%j
%s`,$,$,f,r);let Q=f.type==="*"?Ph:f.type==="?"?qh:"\\"+f.type;s=!0,r=r.slice(0,f.reStart)+Q+"\\("+$}N(),o&&(r+="\\\\");let j=PA[r.charAt(0)];for(let $=c.length-1;$>-1;$--){let Q=c[$],te=r.slice(0,Q.reStart),Oe=r.slice(Q.reStart,Q.reEnd-8),Ye=r.slice(Q.reEnd),We=r.slice(Q.reEnd-8,Q.reEnd)+Ye,Kt=te.split(")").length,Ne=te.split("(").length-Kt,ct=Ye;for(let se=0;se<Ne;se++)ct=ct.replace(/\)[+*?]?/,"");Ye=ct;let mt=Ye===""&&t!==kh?"(?:$|\\/)":"";r=te+Oe+Ye+mt+We}if(r!==""&&s&&(r="(?=.)"+r),j&&(r=O()+r),t===kh)return[r,s];if(i.nocase&&!s&&(s=e.toUpperCase()!==e.toLowerCase()),!s)return OA(e);let G=i.nocase?"i":"";try{return Object.assign(new RegExp("^"+r+"$",G),{_glob:e,_src:r})}catch{return new RegExp("$.")}}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let e=this.set;if(!e.length)return this.regexp=!1,this.regexp;let t=this.options,i=t.noglobstar?Ph:t.dot?TA:EA,r=t.nocase?"i":"",s=e.map(o=>(o=o.map(a=>typeof a=="string"?FA(a):a===Jn?Jn:a._src).reduce((a,c)=>(a[a.length-1]===Jn&&c===Jn||a.push(c),a),[]),o.forEach((a,c)=>{a!==Jn||o[c-1]===Jn||(c===0?o.length>1?o[c+1]="(?:\\/|"+i+"\\/)?"+o[c+1]:o[c]=i:c===o.length-1?o[c-1]+="(?:\\/|"+i+")?":(o[c-1]+="(?:\\/|\\/"+i+"\\/)"+o[c+1],o[c+1]=Jn))}),o.filter(a=>a!==Jn).join("/"))).join("|");s="^(?:"+s+")$",this.negate&&(s="^(?!"+s+").*$");try{this.regexp=new RegExp(s,r)}catch{this.regexp=!1}return this.regexp}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;Oh.sep!=="/"&&(e=e.split(Oh.sep).join("/")),e=e.split(Q0),this.debug(this.pattern,"split",e);let r=this.set;this.debug(this.pattern,"set",r);let s;for(let o=e.length-1;o>=0&&(s=e[o],!s);o--);for(let o=0;o<r.length;o++){let a=r[o],c=e;if(i.matchBase&&a.length===1&&(c=[s]),this.matchOne(c,a,t))return i.flipNegate?!0:!this.negate}return i.flipNegate?!1:this.negate}static defaults(e){return yn.defaults(e).Minimatch}};yn.Minimatch=ks});var zh=T(dr=>{"use strict";Object.defineProperty(dr,"__esModule",{value:!0});dr.DiagnosticFeature=dr.DiagnosticPullMode=dr.vsdiag=void 0;var AA=Cu(),be=require("vscode"),ht=ue(),IA=tt(),Nh=Ce();function Ru(n,e){return n[e]===void 0&&(n[e]={}),n[e]}var jn;(function(n){let e;(function(t){t.full="full",t.unChanged="unChanged"})(e=n.DocumentDiagnosticReportKind||(n.DocumentDiagnosticReportKind={}))})(jn||(dr.vsdiag=jn={}));var Du;(function(n){n.onType="onType",n.onSave="onSave"})(Du||(dr.DiagnosticPullMode=Du={}));var Bt;(function(n){n.active="open",n.reschedule="reschedule",n.outDated="drop"})(Bt||(Bt={}));var Ah=class n{constructor(){this.open=new Set,this._onOpen=new be.EventEmitter,this._onClose=new be.EventEmitter,n.fillTabResources(this.open);let e=t=>{if(t.closed.length===0&&t.opened.length===0)return;let i=this.open,r=new Set;n.fillTabResources(r);let s=new Set,o=new Set(r);for(let a of i.values())r.has(a)?o.delete(a):s.add(a);if(this.open=r,s.size>0){let a=new Set;for(let c of s)a.add(be.Uri.parse(c));this._onClose.fire(a)}if(o.size>0){let a=new Set;for(let c of o)a.add(be.Uri.parse(c));this._onOpen.fire(a)}};be.window.tabGroups.onDidChangeTabs!==void 0?this.disposable=be.window.tabGroups.onDidChangeTabs(e):this.disposable={dispose:()=>{}}}get onClose(){return this._onClose.event}get onOpen(){return this._onOpen.event}dispose(){this.disposable.dispose()}isActive(e){return e instanceof be.Uri?be.window.activeTextEditor?.document.uri===e:be.window.activeTextEditor?.document===e}isVisible(e){let t=e instanceof be.Uri?e:e.uri;return this.open.has(t.toString())}getTabResources(){let e=new Set;return n.fillTabResources(new Set,e),e}static fillTabResources(e,t){let i=e??new Set;for(let r of be.window.tabGroups.all)for(let s of r.tabs){let o=s.input,a;o instanceof be.TabInputText?a=o.uri:o instanceof be.TabInputTextDiff?a=o.modified:o instanceof be.TabInputCustom&&(a=o.uri),a!==void 0&&!i.has(a.toString())&&(i.add(a.toString()),t!==void 0&&t.add(a))}}},Rt;(function(n){n[n.document=1]="document",n[n.workspace=2]="workspace"})(Rt||(Rt={}));var Ti;(function(n){function e(t){return t instanceof be.Uri?t.toString():t.uri.toString()}n.asKey=e})(Ti||(Ti={}));var Ih=class{constructor(){this.documentPullStates=new Map,this.workspacePullStates=new Map}track(e,t,i){let r=e===Rt.document?this.documentPullStates:this.workspacePullStates,[s,o,a]=t instanceof be.Uri?[t.toString(),t,i]:[t.uri.toString(),t.uri,t.version],c=r.get(s);return c===void 0&&(c={document:o,pulledVersion:a,resultId:void 0},r.set(s,c)),c}update(e,t,i,r){let s=e===Rt.document?this.documentPullStates:this.workspacePullStates,[o,a,c,u]=t instanceof be.Uri?[t.toString(),t,i,r]:[t.uri.toString(),t.uri,t.version,i],l=s.get(o);l===void 0?(l={document:a,pulledVersion:c,resultId:u},s.set(o,l)):(l.pulledVersion=c,l.resultId=u)}unTrack(e,t){let i=Ti.asKey(t);(e===Rt.document?this.documentPullStates:this.workspacePullStates).delete(i)}tracks(e,t){let i=Ti.asKey(t);return(e===Rt.document?this.documentPullStates:this.workspacePu Line truncated
Code: ${t.code} ${t.data?`
`+t.data.toString():""}`}return e instanceof Error?Zn.string(e.stack)?e.stack:e.message:Zn.string(e)?e:e.toString()}debug(e,t,i=!0){this.logOutputMessage(z.MessageType.Debug,jr.Debug,"Debug",e,t,i)}info(e,t,i=!0){this.logOutputMessage(z.MessageType.Info,jr.Info,"Info",e,t,i)}warn(e,t,i=!0){this.logOutputMessage(z.MessageType.Warning,jr.Warn,"Warn",e,t,i)}error(e,t,i=!0){this.logOutputMessage(z.MessageType.Error,jr.Error,"Error",e,t,i)}logOutputMessage(e,t,i,r,s,o){this.outputChannel.appendLine(`[${i.padEnd(5)} - ${new Date().toLocaleTimeString()}] ${r}`),s!=null&&this.outputChannel.appendLine(this.data2String(s)),(o==="force"||o&&this._clientOptions.revealOutputChannelOn<=t)&&this.showNotificationMessage(e,r)}showNotificationMessage(e,t){t=t??"A request has failed. See the output for more information.",(e===z.MessageType.Error?je.window.showErrorMessage:e===z.MessageType.Warning?je.window.showWarningMessage:je.window.showInformationMessage)(t,"Go to output").then(r=>{r!==void 0&&this.outputChannel.show(!0)})}logTrace(e,t){this.traceOutputChannel.appendLine(`[Trace - ${new Date().toLocaleTimeString()}] ${e}`),t&&this.traceOutputChannel.appendLine(this.data2String(t))}logObjectTrace(e){e.isLSPMessage&&e.type?this.traceOutputChannel.append(`[LSP - ${new Date().toLocaleTimeString()}] `):this.traceOutputChannel.append(`[Trace - ${new Date().toLocaleTimeString()}] `),e&&this.traceOutputChannel.appendLine(`${JSON.stringify(e)}`)}needsStart(){return this.$state===ve.Initial||this.$state===ve.Stopping||this.$state===ve.Stopped}needsStop(){return this.$state===ve.Starting||this.$state===ve.Running}activeConnection(){return this.$state===ve.Running&&this._connection!==void 0?this._connection:void 0}isRunning(){return this.$state===ve.Running}async start(){if(this._disposed==="disposing"||this._disposed==="disposed")throw new Error("Client got disposed and can't be restarted.");if(this.$state===ve.Stopping)throw new Error("Client is currently stopping. Can only restart a full stopped client");if(this._onStart!==void 0)return this._onStart;let[e,t,i]=this.createOnStartPromise();this._onStart=e,this._diagnostics===void 0&&(this._diagnostics=this._clientOptions.diagnosticCollectionName?je.languages.createDiagnosticCollection(this._clientOptions.diagnosticCollectionName):je.languages.createDiagnosticCollection());for(let[r,s]of this._notificationHandlers)this._pendingNotificationHandlers.has(r)||this._pendingNotificationHandlers.set(r,s);for(let[r,s]of this._requestHandlers)this._pendingRequestHandlers.has(r)||this._pendingRequestHandlers.set(r,s);for(let[r,s]of this._progressHandlers)this._pendingProgressHandlers.has(r)||this._pendingProgressHandlers.set(r,s);this.$state=ve.Starting;try{let r=await this.createConnection();r.onNotification(z.LogMessageNotification.type,s=>{switch(s.type){case z.MessageType.Error:this.error(s.message,void 0,!1);break;case z.MessageType.Warning:this.warn(s.message,void 0,!1);break;case z.MessageType.Info:this.info(s.message,void 0,!1);break;case z.MessageType.Debug:this.debug(s.message,void 0,!1);break;default:this.outputChannel.appendLine(s.message)}}),r.onNotification(z.ShowMessageNotification.type,s=>{switch(s.type){case z.MessageType.Error:je.window.showErrorMessage(s.message);break;case z.MessageType.Warning:je.window.showWarningMessage(s.message);break;case z.MessageType.Info:je.window.showInformationMessage(s.message);break;default:je.window.showInformationMessage(s.message)}}),r.onRequest(z.ShowMessageRequest.type,s=>{let o;switch(s.type){case z.MessageType.Error:o=je.window.showErrorMessage;break;case z.MessageType.Warning:o=je.window.showWarningMessage;break;case z.MessageType.Info:o=je.window.showInformationMessage;break;default:o=je.window.showInformationMessage}let a=s.actions||[];return o(s.message,...a)}),r.onNotification(z.TelemetryEventNotification.type,s=>{this._telemetryEmitter.fire(s)}),r.onRequest(z.ShowDocumentRequest.type,async s=>{let o=async c=>{let u=this.protocol2CodeConverter.asUri(c.uri);try{if(c.external===!0)return{success:await je.env.openExternal(u)};{let l={};return c.selection!==void 0&&(l.selection=this.protocol2CodeConverter.asRange(c.selection)),c.takeFocus===void 0||c.takeFocus===!1?l.preserveFocus=!0:c.takeFocus===!0&&(l.preserveFocus=!1),await je.window.showTextDocument(u,l),{success:!0}}}catch{return{success:!1}}},a=this._clientOptions.middleware.window?.showDocument;return a!==void 0?a(s,o):o(s)}),r.listen(),await this.initialize(r),t()}catch(r){this.$state=ve.StartFailed,this.error(`${this._name} client: couldn't create connection to server.`,r,"force"),i(r)}return this._onStart}createOnStartPromise(){let e,t;return[new Promise((r,s)=>{e=r,t=s}),e,t]}async initialize(e){this.refreshTrace(e,!1);let t=this._clientOptions.initializationOptions,[i,r]=this._clientOptions.workspaceFolder!==void 0?[this._clientOptions.workspaceFolder.uri.fsPath,[{uri:this._c2p.asUri(this._clientOptions.workspaceFolder.uri),name:this._clientOptions.workspaceFolder.name}Line truncated
${e.message}
Shutting down server.`,void 0,r.handled===!0?!1:"force"),this.stop().catch(s=>{this.error("Stopping server failed",s,!1)})):this.error(r.message??`Client ${this._name}: connection to server is erroring.
${e.message}`,void 0,r.handled===!0?!1:"force")}hookConfigurationChanged(e){this._listeners.push(je.workspace.onDidChangeConfiguration(()=>{this.refreshTrace(e,!0)}))}refreshTrace(e,t=!1){let i=je.workspace.getConfiguration(this._id),r=z.Trace.Off,s=z.TraceFormat.Text;if(i){let o=i.get("trace.server","off");typeof o=="string"?r=z.Trace.fromString(o):(r=z.Trace.fromString(i.get("trace.server.verbosity","off")),s=z.TraceFormat.fromString(i.get("trace.server.format","text")))}this._trace=r,this._traceFormat=s,e.trace(this._trace,this._tracer,{sendNotification:t,traceFormat:this._traceFormat}).catch(o=>{this.error("Updating trace failed with error",o,!1)})}hookFileEvents(e){let t=this._clientOptions.synchronize.fileEvents;if(!t)return;let i;Zn.array(t)?i=t:i=[t],i&&this._dynamicFeatures.get(z.DidChangeWatchedFilesNotification.type.method).registerRaw(VR.generateUuid(),i)}registerFeatures(e){for(let t of e)this.registerFeature(t)}registerFeature(e){if(this._features.push(e),Qn.DynamicFeature.is(e)){let t=e.registrationType;this._dynamicFeatures.set(t.method,e)}}getFeature(e){return this._dynamicFeatures.get(e)}hasDedicatedTextSynchronizationFeature(e){let t=this.getFeature(z.NotebookDocumentSyncRegistrationType.method);return t===void 0||!(t instanceof XR.NotebookDocumentSyncFeature)?!1:t.handles(e)}registerBuiltinFeatures(){let e=new Map;this.registerFeature(new JR.ConfigurationFeature(this)),this.registerFeature(new Ms.DidOpenTextDocumentFeature(this,this._syncedDocuments)),this._didChangeTextDocumentFeature=new Ms.DidChangeTextDocumentFeature(this,e),this._didChangeTextDocumentFeature.onPendingChangeAdded(()=>{this.triggerPendingChangeDelivery()}),this.registerFeature(this._didChangeTextDocumentFeature),this.registerFeature(new Ms.WillSaveFeature(this)),this.registerFeature(new Ms.WillSaveWaitUntilFeature(this)),this.registerFeature(new Ms.DidSaveTextDocumentFeature(this)),this.registerFeature(new Ms.DidCloseTextDocumentFeature(this,this._syncedDocuments,e)),this.registerFeature(new GI.FileSystemWatcherFeature(this,t=>this.notifyFileEvent(t))),this.registerFeature(new NI.CompletionItemFeature(this)),this.registerFeature(new AI.HoverFeature(this)),this.registerFeature(new jI.SignatureHelpFeature(this)),this.registerFeature(new II.DefinitionFeature(this)),this.registerFeature(new zI.ReferencesFeature(this)),this.registerFeature(new LI.DocumentHighlightFeature(this)),this.registerFeature(new MI.DocumentSymbolFeature(this)),this.registerFeature(new UI.WorkspaceSymbolFeature(this)),this.registerFeature(new $I.CodeActionFeature(this)),this.registerFeature(new HI.CodeLensFeature(this)),this.registerFeature(new vg.DocumentFormattingFeature(this)),this.registerFeature(new vg.DocumentRangeFormattingFeature(this)),this.registerFeature(new vg.DocumentOnTypeFormattingFeature(this)),this.registerFeature(new BI.RenameFeature(this)),this.registerFeature(new WI.DocumentLinkFeature(this)),this.registerFeature(new KI.ExecuteCommandFeature(this)),this.registerFeature(new JR.SyncConfigurationFeature(this)),this.registerFeature(new JI.TypeDefinitionFeature(this)),this.registerFeature(new XI.ImplementationFeature(this)),this.registerFeature(new VI.ColorProviderFeature(this)),this.clientOptions.workspaceFolder===void 0&&this.registerFeature(new YI.WorkspaceFoldersFeature(this)),this.registerFeature(new QI.FoldingRangeFeature(this)),this.registerFeature(new ZI.DeclarationFeature(this)),this.registerFeature(new ej.SelectionRangeFeature(this)),this.registerFeature(new tj.ProgressFeature(this)),this.registerFeature(new nj.CallHierarchyFeature(this)),this.registerFeature(new ij.SemanticTokensFeature(this)),this.registerFeature(new rj.LinkedEditingFeature(this)),this.registerFeature(new Us.DidCreateFilesFeature(this)),this.registerFeature(new Us.DidRenameFilesFeature(this)),this.registerFeature(new Us.DidDeleteFilesFeature(this)),this.registerFeature(new Us.WillCreateFilesFeature(this)),this.registerFeature(new Us.WillRenameFilesFeature(this)),this.registerFeature(new Us.WillDeleteFilesFeature(this)),this.registerFeature(new sj.TypeHierarchyFeature(this)),this.registerFeature(new oj.InlineValueFeature(this)),this.registerFeature(new aj.InlayHintsFeature(this)),this.registerFeature(new FI.DiagnosticFeature(this)),this.registerFeature(new XR.NotebookDocumentSyncFeature(this))}registerProposedFeatures(){this.registerFeatures(wg.createAll(this))}fillInitializeParams(e){for(let t of this._features)Zn.func(t.fillInitializeParams)&&t.fillInitializeParams(e)}computeClientCapabilities(){let e={};(0,Qn.ensure)(e,"workspace").applyEdit=!0;let t=(0,Qn.ensure)((0,Qn.ensure)(e,"workspace"),"workspaceEdit");t.documentChanges=!0,t.resourceOperations=[z.ResourceOperationKind.Create,z.ResourceOperationKind.Rename,z.ResourceOperationKind.Delete],t.failureHandling=z.FailureHandlingKind.TextOnlyTransactional,t.normalizesLineEndings=!0,t.changeAnnotationSupport={groupsOnLabel:!0};let i=(0,Qn.ensure)((0,Qn.ensure)(e,"textDocument"),"publishDiagnostics");i.rela Line truncated
/*! Bundled license information:
mime-db/index.js:
(*!
* mime-db
* Copyright(c) 2014 Jonathan Ong
* Copyright(c) 2015-2022 Douglas Christopher Wilson
* MIT Licensed
*)
mime-types/index.js:
(*!
* mime-types
* Copyright(c) 2014 Jonathan Ong
* Copyright(c) 2015 Douglas Christopher Wilson
* MIT Licensed
*)
*/