nvim/coc/extensions/node_modules/coc-json/lib/index.js

35 lines
169 KiB
JavaScript
Raw Normal View History

2021-03-09 22:18:08 +00:00
var us=Object.create,At=Object.defineProperty,ls=Object.getPrototypeOf,fs=Object.prototype.hasOwnProperty,ds=Object.getOwnPropertyNames,ps=Object.getOwnPropertyDescriptor;var Ir=e=>At(e,"__esModule",{value:!0});var M=(e,t)=>()=>(t||(t={exports:{}},e(t.exports,t)),t.exports),Lr=(e,t)=>{Ir(e);for(var r in t)At(e,r,{get:t[r],enumerable:!0})},hs=(e,t,r)=>{if(Ir(e),t&&typeof t=="object"||typeof t=="function")for(let n of ds(t))!fs.call(e,n)&&n!=="default"&&At(e,n,{get:()=>t[n],enumerable:!(r=ps(t,n))||r.enumerable});return e},Ve=e=>e&&e.__esModule?e:hs(At(e!=null?us(ls(e)):{},"default",{value:e,enumerable:!0}),e);var Jr=M((Vu,Fr)=>{"use strict";Fr.exports=e=>{if(typeof e!="string")throw new TypeError(`Expected a string, got ${typeof e}`);return e.charCodeAt(0)===65279?e.slice(1):e}});var Re=M(an=>{"use strict";Object.defineProperty(an,"__esModule",{value:!0});var cn;function un(){if(cn===void 0)throw new Error("No runtime abstraction layer installed");return cn}(function(e){function t(r){if(r===void 0)throw new Error("No runtime abstraction layer provided");cn=r}e.install=t})(un||(un={}));an.default=un});var ln=M(dt=>{"use strict";Object.defineProperty(dt,"__esModule",{value:!0});dt.Disposable=void 0;var ms;(function(e){function t(r){return{dispose:r}}e.create=t})(ms=dt.Disposable||(dt.Disposable={}))});var zr=M(It=>{"use strict";Object.defineProperty(It,"__esModule",{value:!0});It.AbstractMessageBuffer=void 0;var gs=13,ys=10,js=`\r
`,Wr=class{constructor(t="utf-8"){this._encoding=t,this._chunks=[],this._totalLength=0}get encoding(){return this._encoding}append(t){let r=typeof t=="string"?this.fromString(t,this._encoding):t;this._chunks.push(r),this._totalLength+=r.byteLength}tryReadHeaders(){if(this._chunks.length===0)return;let t=0,r=0,n=0,o=0;e:for(;r<this._chunks.length;){let g=this._chunks[r];n=0;t:for(;n<g.length;){switch(g[n]){case gs:switch(t){case 0:t=1;break;case 2:t=3;break;default:t=0}break;case ys:switch(t){case 1:t=2;break;case 3:t=4,n++;break e;default:t=0}break;default:t=0}n++}o+=g.byteLength,r++}if(t!==4)return;let s=this._read(o+n),c=new Map,p=this.toString(s,"ascii").split(js);if(p.length<2)return c;for(let g=0;g<p.length-2;g++){let m=p[g],b=m.indexOf(":");if(b===-1)throw new Error("Message header must separate key and value using :");let _=m.substr(0,b),S=m.substr(b+1).trim();c.set(_,S)}return c}tryReadBody(t){if(!(this._totalLength<t))return this._read(t)}get numberOfBytes(){return this._totalLength}_read(t){if(t===0)return this.emptyBuffer();if(t>this._totalLength)throw new Error("Cannot read so many bytes!");if(this._chunks[0].byteLength===t){let s=this._chunks[0];return this._chunks.shift(),this._totalLength-=t,this.asNative(s)}if(this._chunks[0].byteLength>t){let s=this._chunks[0],c=this.asNative(s,t);return this._chunks[0]=s.slice(t),this._totalLength-=t,c}let r=this.allocNative(t),n=0,o=0;for(;t>0;){let s=this._chunks[o];if(s.byteLength>t){let c=s.slice(0,t);r.set(c,n),n+=t,this._chunks[o]=s.slice(t),this._totalLength-=t,t-=t}else r.set(s,n),n+=s.byteLength,this._chunks.shift(),this._totalLength-=s.byteLength,t-=s.byteLength}return r}};It.AbstractMessageBuffer=Wr});var Gr=M(fn=>{"use strict";Object.defineProperty(fn,"__esModule",{value:!0});var bs=Re(),$r=require("util"),Le=ln(),vs=zr(),pt=class extends vs.AbstractMessageBuffer{constructor(t="utf-8"){super(t)}emptyBuffer(){return pt.emptyBuffer}fromString(t,r){return Buffer.from(t,r)}toString(t,r){return t instanceof Buffer?t.toString(r):new $r.TextDecoder(r).decode(t)}asNative(t,r){return r===void 0?t instanceof Buffer?t:Buffer.from(t):t instanceof Buffer?t.slice(0,r):Buffer.from(t,0,r)}allocNative(t){return Buffer.allocUnsafe(t)}};pt.emptyBuffer=Buffer.allocUnsafe(0);var Br=class{constructor(t){this.stream=t}onClose(t){return this.stream.on("close",t),Le.Disposable.create(()=>this.stream.off("close",t))}onError(t){return this.stream.on("error",t),Le.Disposable.create(()=>this.stream.off("error",t))}onEnd(t){return this.stream.on("end",t),Le.Disposable.create(()=>this.stream.off("end",t))}onData(t){return this.stream.on("data",t),Le.Disposable.create(()=>this.stream.off("data",t))}},Ur=class{constructor(t){this.stream=t}onClose(t){return this.stream.on("close",t),Le.Disposable.create(()=>this.stream.off("close",t))}onError(t){return this.stream.on("error",t),Le.Disposable.create(()=>this.stream.off("error",t))}onEnd(t){return this.stream.on("end",t),Le.Disposable.create(()=>this.stream.off("end",t))}write(t,r){return new Promise((n,o)=>{let s=c=>{c==null?n():o(c)};typeof t=="string"?this.stream.write(t,r,s):this.stream.write(t,s)})}end(){this.stream.end()}},Hr=Object.freeze({messageBuffer:Object.freeze({create:e=>new pt(e)}),applicationJson:Object.freeze({encoder:Object.freeze({name:"application/json",encode:(e,t)=>{try{return Promise.resolve(Buffer.from(JSON.stringify(e,void 0,0),t.charset))}catch(r){return Promise.reject(r)}}}),decoder:Object.freeze({name:"application/json",decode:(e,t)=>{try{return e instanceof Buffer?Promise.resolve(JSON.parse(e.toString(t.charset))):Promise.resolve(JSON.parse(new $r.TextDecoder(t.charset).decode(e)))}catch(r){return Promise.reject(r)}}})}),stream:Object.freeze({asReadableStream:e=>new Br(e),asWritableStream:e=>new Ur(e)}),console,timer:Object.freeze({setTimeout(e,t,...r){return setTimeout(e,t,...r)},clearTimeout(e){clearTimeout(e)},setImmediate(e,...t){return setImmediate(e,...t)},clearImmediate(e){clearImmediate(e)}})});function dn(){return Hr}(function(e){function t(){bs.default.install(Hr)}e.install=t})(dn||(dn={}));fn.default=dn
`,Is;(function(e){function t(r){let n=r;return n&&mt.func(n.dispose)&&mt.func(n.onClose)&&mt.func(n.onError)&&mt.func(n.write)}e.is=t})(Is=_e.MessageWriter||(_e.MessageWriter={}));var Sn=class{constructor(){this.errorEmitter=new Po.Emitter,this.closeEmitter=new Po.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(t,r,n){this.errorEmitter.fire([this.asError(t),r,n])}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}asError(t){return t instanceof Error?t:new Error(`Writer received error. Reason: ${mt.string(t.message)?t.message:"unknown"}`)}};_e.AbstractMessageWriter=Sn;var Rn;(function(e){function t(r){var n,o;return r===void 0||typeof r=="string"?{charset:r!=null?r:"utf-8",contentTypeEncoder:Co.default().applicationJson.encoder}:{charset:(n=r.charset)!==null&&n!==void 0?n:"utf-8",contentEncoder:r.contentEncoder,contentTypeEncoder:(o=r.contentTypeEncoder)!==null&&o!==void 0?o:Co.default().applicationJson.encoder}}e.fromOptions=t})(Rn||(Rn={}));var No=class extends Sn{constructor(t,r){super();this.writable=t,this.options=Rn.fromOptions(r),this.errorCount=0,this.writeSemaphore=new Es.Semaphore(1),this.writable.onError(n=>this.fireError(n)),this.writable.onClose(()=>this.fireClose())}async write(t){return this.writeSemaphore.lock(async()=>this.options.contentTypeEncoder.encode(t,this.options).then(n=>this.options.contentEncoder!==void 0?this.options.contentEncoder.encode(n):n).then(n=>{let o=[];return o.push(As,n.byteLength.toString(),To),o.push(To),this.doWrite(t,o,n)},n=>{throw this.fireError(n),n}))}async doWrite(t,r,n){try{return await this.writable.write(r.join(""),"ascii"),this.writable.write(n)}catch(o){return this.handleError(o,t),Promise.reject(o)}}handleError(t,r){this.errorCount++,this.fireError(t,r,this.errorCount)}end(){this.writable.end()}};_e.WriteableStreamMessageWriter=No});var Oo=M(ke=>{"use strict";Object.defineProperty(ke,"__esModule",{value:!0});ke.LRUCache=ke.LinkedMap=ke.Touch=void 0;var ne;(function(e){e.None=0,e.First=1,e.AsOld=e.First,e.Last=2,e.AsNew=e.Last})(ne=ke.Touch||(ke.Touch={}));var wn=class{constructor(){this[Symbol.toStringTag]="LinkedMap",this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0,this._state=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0,this._state++}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}get first(){var t;return(t=this._head)===null||t===void 0?void 0:t.value}get last(){var t;return(t=this._tail)===null||t===void 0?void 0:t.value}has(t){return this._map.has(t)}get(t,r=ne.None){let n=this._map.get(t);if(!!n)return r!==ne.None&&this.touch(n,r),n.value}set(t,r,n=ne.None){let o=this._map.get(t);if(o)o.value=r,n!==ne.None&&this.touch(o,n);else{switch(o={key:t,value:r,next:void 0,previous:void 0},n){case ne.None:this.addItemLast(o);break;case ne.First:this.addItemFirst(o);break;case ne.Last:this.addItemLast(o);break;default:this.addItemLast(o);break}this._map.set(t,o),this._size++}return this}delete(t){return!!this.remove(t)}remove(t){let r=this._map.get(t);if(!!r)return this._map.delete(t),this.removeItem(r),this._size--,r.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");let t=this._head;return this._map.delete(t.key),this.removeItem(t),this._size--,t.value}forEach(t,r){let n=this._state,o=this._head;for(;o;){if(r?t.bind(r)(o.value,o.key,this):t(o.value,o.key,this),this._state!==n)throw new Error("LinkedMap got modified during iteration.");o=o.next}}keys(){let t=this,r=this._state,n=this._head,o={[Symbol.iterator](){return o},next(){if(t._state!==r)throw new Error("LinkedMap got modified during iteration.");if(n){let s={value:n.key,done:!1};return n=n.next,s}else return{value:void 0,done:!0}}};return o}values(){let t=this,r=this._state,n=this._head,o={[Symbol.iterator](){return o},next(){if(t._state!==r)throw new Error("LinkedMap got modified during iteration.");if(n){let s={value:n.value,done:!1};return n=n.next,s}else return{valu
${JSON.stringify(a.error,void 0,4)}`):o.error("Received response message without id. No further error information provided.");else{let l=String(a.id),d=C[l];if(ss(a,d),d){delete C[l];try{if(a.error){let j=a.error;d.reject(new v.ResponseError(j.code,j.message,j.data))}else if(a.result!==void 0)d.resolve(a.result);else throw new Error("Should never happen.")}catch(j){j.message?o.error(`Response handler '${d.method}' failed with message: ${j.message}`):o.error(`Response handler '${d.method}' failed unexpectedly.`)}}}}function es(a){if(Ue())return;let l,d;if(a.method===yt.type.method)d=j=>{let P=j.id,z=F[String(P)];z&&z.cancel()};else{let j=S[a.method];j&&(d=j.handler,l=j.type)}if(d||_)try{is(a),d?a.params===void 0?(l!==void 0&&l.numberOfParams!==0&&l.parameterStructures!==v.ParameterStructures.byName&&o.error(`Notification ${a.method} defines ${l.numberOfParams} params but recevied none.`),d()):Array.isArray(a.params)?(l!==void 0&&(l.parameterStructures===v.ParameterStructures.byName&&o.error(`Notification ${a.method} defines parameters by name but received parameters by position`),l.numberOfParams!==a.params.length&&o.error(`Notification ${a.method} defines ${l.numberOfParams} params but received ${a.params.length} argumennts`)),d(...a.params)):(l!==void 0&&l.parameterStructures===v.ParameterStructures.byPosition&&o.error(`Notification ${a.method} defines parameters by position but received parameters by name`),d(a.params)):_&&_(a.method,a.params)}catch(j){j.message?o.error(`Notification handler '${a.method}' failed with message: ${j.message}`):o.error(`Notification handler '${a.method}' failed unexpectedly.`)}else Ee.fire(a)}function ts(a){if(!a){o.error("Received empty message.");return}o.error(`Received message which is neither a response nor a notification message:
${JSON.stringify(a,null,4)}`);let l=a;if(Q.string(l.id)||Q.number(l.id)){let d=String(l.id),j=C[d];j&&j.reject(new Error("The received response has neither a result nor an error property."))}}function ns(a){if(!(O===U.Off||!D))if(oe===le.Text){let l;O===U.Verbose&&a.params&&(l=`Params: ${JSON.stringify(a.params,null,4)}
`),D.log(`Sending request '${a.method} - (${a.id})'.`,l)}else He("send-request",a)}function rs(a){if(!(O===U.Off||!D))if(oe===le.Text){let l;O===U.Verbose&&(a.params?l=`Params: ${JSON.stringify(a.params,null,4)}
`:l=`No parameters provided.
`),D.log(`Sending notification '${a.method}'.`,l)}else He("send-notification",a)}function Et(a,l,d){if(!(O===U.Off||!D))if(oe===le.Text){let j;O===U.Verbose&&(a.error&&a.error.data?j=`Error data: ${JSON.stringify(a.error.data,null,4)}
`:a.result?j=`Result: ${JSON.stringify(a.result,null,4)}
`:a.error===void 0&&(j=`No result returned.
`)),D.log(`Sending response '${l} - (${a.id})'. Processing request took ${Date.now()-d}ms`,j)}else He("send-response",a)}function os(a){if(!(O===U.Off||!D))if(oe===le.Text){let l;O===U.Verbose&&a.params&&(l=`Params: ${JSON.stringify(a.params,null,4)}
`),D.log(`Received request '${a.method} - (${a.id})'.`,l)}else He("receive-request",a)}function is(a){if(!(O===U.Off||!D||a.method===Mn.type.method))if(oe===le.Text){let l;O===U.Verbose&&(a.params?l=`Params: ${JSON.stringify(a.params,null,4)}
`:l=`No parameters provided.
`),D.log(`Received notification '${a.method}'.`,l)}else He("receive-notification",a)}function ss(a,l){if(!(O===U.Off||!D))if(oe===le.Text){let d;if(O===U.Verbose&&(a.error&&a.error.data?d=`Error data: ${JSON.stringify(a.error.data,null,4)}
`:a.result?d=`Result: ${JSON.stringify(a.result,null,4)}
`:a.error===void 0&&(d=`No result returned.
`)),l){let j=a.error?` Request failed: ${a.error.message} (${a.error.code}).`:"";D.log(`Received response '${l.method} - (${a.id})' in ${Date.now()-l.timerStart}ms.${j}`,d)}else D.log(`Received response ${a.id} without active response promise.`,d)}else He("receive-response",a)}function He(a,l){if(!D||O===U.Off)return;let d={isLSPMessage:!0,type:a,message:l,timestamp:Date.now()};D.log(d)}function lt(){if(xr())throw new ze(zt.Closed,"Connection is closed.");if(Ue())throw new ze(zt.Disposed,"Connection is disposed.")}function as(){if(Nr())throw new ze(zt.AlreadyListening,"Connection is already listening")}function cs(){if(!Nr())throw new Error("Call listen() first.")}function ft(a){return a===void 0?null:a}function Dr(a){if(a!==null)return a}function Er(a){return a!=null&&!Array.isArray(a)&&typeof a=="object"}function sn(a,l){switch(a){case v.ParameterStructures.auto:if(Er(l))return Dr(l);return[ft(l)];break;case v.ParameterStructures.byName:if(!Er(l))throw new Error("Recevied parameters by name but param is not an object literal.");return Dr(l);case v.ParameterStructures.byPosition:return[ft(l)];default:throw new Error(`Unknown parameter structure ${a.toString()}`)}}function Ar(a,l){let d,j=a.numberOfParams;switch(j){case 0:d=void 0;break;case 1:d=sn(a.parameterStructures,l[0]);break;default:d=[];for(let P=0;P<l.length&&P<j;P++)d.push(ft(l[P]));if(l.length<j)for(let P=l.length;P<j;P++)d.push(null);break}return d}let Ge={sendNotification:(a,...l)=>{lt();let d,j;if(Q.string(a)){d=a;let z=l[0],G=0,Y=v.ParameterStructures.auto;v.ParameterStructures.is(z)&&(G=1,Y=z);let N=l.length,$=N-G;switch($){case 0:j=void 0;break;case 1:j=sn(Y,l[G]);break;default:if(Y===v.ParameterStructures.byName)throw new Error(`Recevied ${$} parameters for 'by Name' notification parameter structure.`);j=l.slice(G,N).map(x=>ft(x));break}}else{let z=l;d=a.method,j=Ar(a,z)}let P={jsonrpc:g,method:d,params:j};rs(P),t.write(P)},onNotification:(a,l)=>{lt();let d;return Q.func(a)?_=a:l&&(Q.string(a)?(d=a,S[a]={type:void 0,handler:l}):(d=a.method,S[a.method]={type:a,handler:l})),{dispose:()=>{d!==void 0?delete S[d]:_=void 0}}},onProgress:(a,l,d)=>{if(h.has(l))throw new Error(`Progress handler for token ${l} already registered`);return h.set(l,d),{dispose:()=>{h.delete(l)}}},sendProgress:(a,l,d)=>{Ge.sendNotification(Wt.type,{token:l,value:d})},onUnhandledProgress:Ae.event,sendRequest:(a,...l)=>{lt(),cs();let d,j,P;if(Q.string(a)){d=a;let N=l[0],$=l[l.length-1],x=0,V=v.ParameterStructures.auto;v.ParameterStructures.is(N)&&(x=1,V=N);let se=l.length;_n.CancellationToken.is($)&&(se=se-1,P=$);let Ie=se-x;switch(Ie){case 0:j=void 0;break;case 1:j=sn(V,l[x]);break;default:if(V===v.ParameterStructures.byName)throw new Error(`Recevied ${Ie} parameters for 'by Name' request parameter structure.`);j=l.slice(x,se).map(Ne=>ft(Ne));break}}else{let N=l;d=a.method,j=Ar(a,N);let $=a.numberOfParams;P=_n.CancellationToken.is(N[$])?N[$]:void 0}let z=s++,G;return P&&(G=P.onCancellationRequested(()=>{Se.sender.sendCancellation(Ge,z)})),new Promise((N,$)=>{let x={jsonrpc:g,id:z,method:d,params:j},V=Ne=>{N(Ne),Se.sender.cleanup(z),G==null||G.dispose()},se=Ne=>{$(Ne),Se.sender.cleanup(z),G==null||G.dispose()},Ie={method:d,timerStart:Date.now(),resolve:V,reject:se};ns(x);try{t.write(x)}catch(Ne){Ie.reject(new v.ResponseError(v.ErrorCodes.MessageWriteError,Ne.message?Ne.message:"Unknown reason")),Ie=null}Ie&&(C[String(z)]=Ie)})},onRequest:(a,l)=>{lt();let d=null;return kn.is(a)?(d=void 0,m=a):Q.string(a)?(d=null,l!==void 0&&(d=a,b[a]={handler:l,type:void 0})):l!==void 0&&(d=a.method,b[a.method]={type:a,handler:l}),{dispose:()=>{d!==null&&(d!==void 0?delete b[d]:m=void 0)}}},trace:(a,l,d)=>{let j=!1,P=le.Text;d!==void 0&&(Q.boolean(d)?j=d:(j=d.sendNotification||!1,P=d.traceFormat||le.Text)),O=a,oe=P,O===U.Off?D=void 0:D=l,j&&!xr()&&!Ue()&&Ge.sendNotification(Io.type,{value:U.toString(a)})},onError:ce.event,onClose:ye.event,onUnhandledNotification:Ee.event,onDispose:ve.event,end:()=>{t.end()},dispose:()=>{if(Ue())return;ie=fe.Disposed,ve.fire(void 0);let a=new Error("Connection got dispo
`,`\r
`,"\r"],yr;(function(e){function t(s,c,p,g){return new oa(s,c,p,g)}e.create=t;function r(s){var c=s;return!!(u.defined(c)&&u.string(c.uri)&&(u.undefined(c.languageId)||u.string(c.languageId))&&u.uinteger(c.lineCount)&&u.func(c.getText)&&u.func(c.positionAt)&&u.func(c.offsetAt))}e.is=r;function n(s,c){for(var p=s.getText(),g=o(c,function(A,q){var C=A.range.start.line-q.range.start.line;return C===0?A.range.start.character-q.range.start.character:C}),m=p.length,b=g.length-1;b>=0;b--){var _=g[b],S=s.offsetAt(_.range.start),h=s.offsetAt(_.range.end);if(h<=m)p=p.substring(0,S)+_.newText+p.substring(h,p.length);else throw new Error("Overlapping edit");m=S}return p}e.applyEdits=n;function o(s,c){if(s.length<=1)return s;var p=s.length/2|0,g=s.slice(0,p),m=s.slice(p);o(g,c),o(m,c);for(var b=0,_=0,S=0;b<g.length&&_<m.length;){var h=c(g[b],m[_]);h<=0?s[S++]=g[b++]:s[S++]=m[_++]}for(;b<g.length;)s[S++]=g[b++];for(;_<m.length;)s[S++]=m[_++];return s}})(yr||(yr={}));var oa=function(){function e(t,r,n,o){this._uri=t,this._languageId=r,this._version=n,this._content=o,this._lineOffsets=void 0}return Object.defineProperty(e.prototype,"uri",{get:function(){return this._uri},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"languageId",{get:function(){return this._languageId},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"version",{get:function(){return this._version},enumerable:!1,configurable:!0}),e.prototype.getText=function(t){if(t){var r=this.offsetAt(t.start),n=this.offsetAt(t.end);return this._content.substring(r,n)}return this._content},e.prototype.update=function(t,r){this._content=t.text,this._version=r,this._lineOffsets=void 0},e.prototype.getLineOffsets=function(){if(this._lineOffsets===void 0){for(var t=[],r=this._content,n=!0,o=0;o<r.length;o++){n&&(t.push(o),n=!1);var s=r.charAt(o);n=s==="\r"||s===`
`,s==="\r"&&o+1<r.length&&r.charAt(o+1)===`
`&&o++}n&&r.length>0&&t.push(r.length),this._lineOffsets=t}return this._lineOffsets},e.prototype.positionAt=function(t){t=Math.max(Math.min(t,this._content.length),0);var r=this.getLineOffsets(),n=0,o=r.length;if(o===0)return de.create(0,t);for(;n<o;){var s=Math.floor((n+o)/2);r[s]>t?o=s:n=s+1}var c=n-1;return de.create(c,t-r[c])},e.prototype.offsetAt=function(t){var r=this.getLineOffsets();if(t.line>=r.length)return this._content.length;if(t.line<0)return 0;var n=r[t.line],o=t.line+1<r.length?r[t.line+1]:this._content.length;return Math.max(Math.min(n+t.character,o),n)},Object.defineProperty(e.prototype,"lineCount",{get:function(){return this.getLineOffsets().length},enumerable:!1,configurable:!0}),e}(),u;(function(e){var t=Object.prototype.toString;function r(h){return typeof h!="undefined"}e.defined=r;function n(h){return typeof h=="undefined"}e.undefined=n;function o(h){return h===!0||h===!1}e.boolean=o;function s(h){return t.call(h)==="[object String]"}e.string=s;function c(h){return t.call(h)==="[object Number]"}e.number=c;function p(h,A,q){return t.call(h)==="[object Number]"&&A<=h&&h<=q}e.numberRange=p;function g(h){return t.call(h)==="[object Number]"&&-2147483648<=h&&h<=2147483647}e.integer=g;function m(h){return t.call(h)==="[object Number]"&&0<=h&&h<=2147483647}e.uinteger=m;function b(h){return t.call(h)==="[object Function]"}e.func=b;function _(h){return h!==null&&typeof h=="object"}e.objectLiteral=_;function S(h,A){return Array.isArray(h)&&h.every(A)}e.typedArray=S})(u||(u={}))});var Z=M(ue=>{"use strict";Object.defineProperty(ue,"__esModule",{value:!0});ue.ProtocolNotificationType=ue.ProtocolNotificationType0=ue.ProtocolRequestType=ue.ProtocolRequestType0=ue.RegistrationType=void 0;var at=tt(),Yo=class{constructor(t){this.method=t}};ue.RegistrationType=Yo;var Qo=class extends at.RequestType0{constructor(t){super(t)}};ue.ProtocolRequestType0=Qo;var Xo=class extends at.RequestType{constructor(t){super(t,at.ParameterStructures.byName)}};ue.ProtocolRequestType=Xo;var Zo=class extends at.NotificationType0{constructor(t){super(t)}};ue.ProtocolNotificationType0=Zo;var Ko=class extends at.NotificationType{constructor(t){super(t,at.ParameterStructures.byName)}};ue.ProtocolNotificationType=Ko});var ni=M(H=>{"use strict";Object.defineProperty(H,"__esModule",{value:!0});H.objectLiteral=H.typedArray=H.stringArray=H.array=H.func=H.error=H.number=H.string=H.boolean=void 0;function ia(e){return e===!0||e===!1}H.boolean=ia;function ei(e){return typeof e=="string"||e instanceof String}H.string=ei;function sa(e){return typeof e=="number"||e instanceof Number}H.number=sa;function aa(e){return e instanceof Error}H.error=aa;function ca(e){return typeof e=="function"}H.func=ca;function ti(e){return Array.isArray(e)}H.array=ti;function ua(e){return ti(e)&&e.every(t=>ei(t))}H.stringArray=ua;function la(e,t){return Array.isArray(e)&&e.every(t)}H.typedArray=la;function fa(e){return e!==null&&typeof e=="object"}H.objectLiteral=fa});var ri=M(wt=>{"use strict";Object.defineProperty(wt,"__esModule",{value:!0});wt.ImplementationRequest=void 0;var da=Z(),pa;(function(e){e.method="textDocument/implementation",e.type=new da.ProtocolRequestType(e.method)})(pa=wt.ImplementationRequest||(wt.ImplementationRequest={}))});var oi=M(_t=>{"use strict";Object.defineProperty(_t,"__esModule",{value:!0});_t.TypeDefinitionRequest=void 0;var ha=Z(),ma;(function(e){e.method="textDocument/typeDefinition",e.type=new ha.ProtocolRequestType(e.method)})(ma=_t.TypeDefinitionRequest||(_t.TypeDefinitionRequest={}))});var si=M(xe=>{"use strict";Object.defineProperty(xe,"__esModule",{value:!0});xe.DidChangeWorkspaceFoldersNotification=xe.WorkspaceFoldersRequest=void 0;var ii=Z(),ga;(function(e){e.type=new ii.ProtocolRequestType0("workspace/workspaceFolders")})(ga=xe.WorkspaceFoldersRequest||(xe.WorkspaceFoldersRequest={}));var ya;(function(e){e.type=new ii.ProtocolNotificationType("workspace/didChangeWorkspaceFolders")})(ya=xe.DidChangeWorkspaceFoldersNotification||(xe.DidChangeWorkspaceFoldersNotification={}))});var ai=M(kt=>{"use strict";Object.defineProperty(kt,
//# sourceMappingURL=index.js.map