2 lines
No EOL
178 KiB
JavaScript
2 lines
No EOL
178 KiB
JavaScript
!function(e,t){for(var n in t)e[n]=t[n];t.__esModule&&Object.defineProperty(e,"__esModule",{value:!0})}(exports,(()=>{"use strict";var e={5232:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.LcsDiff=t.Debug=t.stringDiff=void 0,t.stringDiff=function(e,t,i){return new a(new n(e),new n(t)).ComputeDiff(i).changes};class n{constructor(e){this.source=e}getElements(){const e=this.source,t=new Int32Array(e.length);for(let n=0,i=e.length;n<i;n++)t[n]=e.charCodeAt(n);return t}}class i{constructor(e,t,n,i){this.originalStart=e,this.originalLength=t,this.modifiedStart=n,this.modifiedLength=i}getOriginalEnd(){return this.originalStart+this.originalLength}getModifiedEnd(){return this.modifiedStart+this.modifiedLength}}class r{static Assert(e,t){if(!e)throw new Error(t)}}t.Debug=r;class o{static Copy(e,t,n,i,r){for(let o=0;o<r;o++)n[i+o]=e[t+o]}static Copy2(e,t,n,i,r){for(let o=0;o<r;o++)n[i+o]=e[t+o]}}class s{constructor(){this.m_changes=[],this.m_originalStart=1073741824,this.m_modifiedStart=1073741824,this.m_originalCount=0,this.m_modifiedCount=0}MarkNextChange(){(this.m_originalCount>0||this.m_modifiedCount>0)&&this.m_changes.push(new i(this.m_originalStart,this.m_originalCount,this.m_modifiedStart,this.m_modifiedCount)),this.m_originalCount=0,this.m_modifiedCount=0,this.m_originalStart=1073741824,this.m_modifiedStart=1073741824}AddOriginalElement(e,t){this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,t),this.m_originalCount++}AddModifiedElement(e,t){this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,t),this.m_modifiedCount++}getChanges(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes}getReverseChanges(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes.reverse(),this.m_changes}}class a{constructor(e,t,n=null){this.ContinueProcessingPredicate=n;const[i,r,o]=a._getElements(e),[s,c,u]=a._getElements(t);this._hasStrings=o&&u,this._originalStringElements=i,this._originalElementsOrHash=r,this._modifiedStringElements=s,this._modifiedElementsOrHash=c,this.m_forwardHistory=[],this.m_reverseHistory=[]}static _getElements(e){const t=e.getElements();return t instanceof Int32Array?[[],t,!1]:[[],new Int32Array(t),!1]}ElementsAreEqual(e,t){return this._originalElementsOrHash[e]===this._modifiedElementsOrHash[t]&&(!this._hasStrings||this._originalStringElements[e]===this._modifiedStringElements[t])}OriginalElementsAreEqual(e,t){return this._originalElementsOrHash[e]===this._originalElementsOrHash[t]&&(!this._hasStrings||this._originalStringElements[e]===this._originalStringElements[t])}ModifiedElementsAreEqual(e,t){return this._modifiedElementsOrHash[e]===this._modifiedElementsOrHash[t]&&(!this._hasStrings||this._modifiedStringElements[e]===this._modifiedStringElements[t])}ComputeDiff(e){return this._ComputeDiff(0,this._originalElementsOrHash.length-1,0,this._modifiedElementsOrHash.length-1,e)}_ComputeDiff(e,t,n,i,r){const o=[!1];let s=this.ComputeDiffRecursive(e,t,n,i,o);return r&&(s=this.PrettifyChanges(s)),{quitEarly:o[0],changes:s}}ComputeDiffRecursive(e,t,n,o,s){for(s[0]=!1;e<=t&&n<=o&&this.ElementsAreEqual(e,n);)e++,n++;for(;t>=e&&o>=n&&this.ElementsAreEqual(t,o);)t--,o--;if(e>t||n>o){let s;return n<=o?(r.Assert(e===t+1,"originalStart should only be one more than originalEnd"),s=[new i(e,0,n,o-n+1)]):e<=t?(r.Assert(n===o+1,"modifiedStart should only be one more than modifiedEnd"),s=[new i(e,t-e+1,n,0)]):(r.Assert(e===t+1,"originalStart should only be one more than originalEnd"),r.Assert(n===o+1,"modifiedStart should only be one more than modifiedEnd"),s=[]),s}const a=[0],c=[0],u=this.ComputeRecursionPoint(e,t,n,o,a,c,s),l=a[0],d=c[0];if(null!==u)return u;if(!s[0]){const r=this.ComputeDiffRecursive(e,l,n,d,s);let a=[];return a=s[0]?[new i(l+1,t-(l+1)+1,d+1,o-(d+1)+1)]:this.ComputeDiffRecursive(l+1,t,d+1,o,s),this.ConcatenateChanges(r,a)}return[new i(e,t-e+1,n,o-n+1)]}WALKTRACE(e,t,n,r,o,a,c,u,l,d,h,f,g,p,m,y,v,_){let b=null,R=null,w=new s,C=t,T=n,S=g[0]-y[0]-r,k=-1073741824,x=this.m_forwardHistory.length-1;do{const t=S+e;t===C||t<T&&l[t-1]<l[t+1]?(p=(h=l[t+1])-S-r,h<k&&w.MarkNextChange(),k=h,w.AddModifiedElement(h+1,p),S=t+1-e):(p=(h=l[t-1]+1)-S-r,h<k&&w.MarkNextChange(),k=h-1,w.AddOriginalElement(h,p+1),S=t-1-e),x>=0&&(e=(l=this.m_forwardHistory[x])[0],C=1,T=l.length-1)}while(--x>=-1);if(b=w.getReverseChanges(),_[0]){let e=g[0]+1,t=y[0]+1;if(null!==b&&b.length>0){const n=b[b.length-1];e=Math.max(e,n.getOriginalEnd()),t=Math.max(t,n.getModifiedEnd())}R=[new i(e,f-e+1,t,m-t+1)]}else{w=new s,C=a,T=c,S=g[0]-y[0]-u,k=1073741824,x=v?this.m_reverseHistory.length-1:this.m_reverseHistory.length-2;do{const e=S+o;e===C||e<T&&d[e-1]>=d[e+1]?(p=(h=d[e+1]-1)-S-u,h>k&&w.MarkNextChange(),k=h+1,w.AddOriginalElement(h+1,p+1),S=e+1-o):(p=(h=d[e-1])-S-u,h>k&&w.MarkNextChange(),k=h,w.AddModifiedElement(h+1,p+1),S=e-1-o),x>=0&&(o=(d=this.m_reverseHistory[x])[0],C=1,T=d.length-1)}while(--x>=-1);R=w.getChanges()}return this.ConcatenateChanges(b,R)}ComputeRecursionPoint(e,t,n,r,s,a,c){let u=0,l=0,d=0,h=0,f=0,g=0;e--,n--,s[0]=0,a[0]=0,this.m_forwardHistory=[],this.m_reverseHistory=[];const p=t-e+(r-n),m=p+1,y=new Int32Array(m),v=new Int32Array(m),_=r-n,b=t-e,R=e-n,w=t-r,C=(b-_)%2==0;y[_]=e,v[b]=t,c[0]=!1;for(let T=1;T<=p/2+1;T++){let p=0,S=0;d=this.ClipDiagonalBound(_-T,T,_,m),h=this.ClipDiagonalBound(_+T,T,_,m);for(let e=d;e<=h;e+=2){u=e===d||e<h&&y[e-1]<y[e+1]?y[e+1]:y[e-1]+1,l=u-(e-_)-R;const n=u;for(;u<t&&l<r&&this.ElementsAreEqual(u+1,l+1);)u++,l++;if(y[e]=u,u+l>p+S&&(p=u,S=l),!C&&Math.abs(e-b)<=T-1&&u>=v[e])return s[0]=u,a[0]=l,n<=v[e]&&T<=1448?this.WALKTRACE(_,d,h,R,b,f,g,w,y,v,u,t,s,l,r,a,C,c):null}const k=(p-e+(S-n)-T)/2;if(null!==this.ContinueProcessingPredicate&&!this.ContinueProcessingPredicate(p,k))return c[0]=!0,s[0]=p,a[0]=S,k>0&&T<=1448?this.WALKTRACE(_,d,h,R,b,f,g,w,y,v,u,t,s,l,r,a,C,c):(e++,n++,[new i(e,t-e+1,n,r-n+1)]);f=this.ClipDiagonalBound(b-T,T,b,m),g=this.ClipDiagonalBound(b+T,T,b,m);for(let i=f;i<=g;i+=2){u=i===f||i<g&&v[i-1]>=v[i+1]?v[i+1]-1:v[i-1],l=u-(i-b)-w;const o=u;for(;u>e&&l>n&&this.ElementsAreEqual(u,l);)u--,l--;if(v[i]=u,C&&Math.abs(i-_)<=T&&u<=y[i])return s[0]=u,a[0]=l,o>=y[i]&&T<=1448?this.WALKTRACE(_,d,h,R,b,f,g,w,y,v,u,t,s,l,r,a,C,c):null}if(T<=1447){let e=new Int32Array(h-d+2);e[0]=_-d+1,o.Copy2(y,d,e,1,h-d+1),this.m_forwardHistory.push(e),e=new Int32Array(g-f+2),e[0]=b-f+1,o.Copy2(v,f,e,1,g-f+1),this.m_reverseHistory.push(e)}}return this.WALKTRACE(_,d,h,R,b,f,g,w,y,v,u,t,s,l,r,a,C,c)}PrettifyChanges(e){for(let t=0;t<e.length;t++){const n=e[t],i=t<e.length-1?e[t+1].originalStart:this._originalElementsOrHash.length,r=t<e.length-1?e[t+1].modifiedStart:this._modifiedElementsOrHash.length,o=n.originalLength>0,s=n.modifiedLength>0;for(;n.originalStart+n.originalLength<i&&n.modifiedStart+n.modifiedLength<r&&(!o||this.OriginalElementsAreEqual(n.originalStart,n.originalStart+n.originalLength))&&(!s||this.ModifiedElementsAreEqual(n.modifiedStart,n.modifiedStart+n.modifiedLength));)n.originalStart++,n.modifiedStart++;let a=[null];t<e.length-1&&this.ChangesOverlap(e[t],e[t+1],a)&&(e[t]=a[0],e.splice(t+1,1),t--)}for(let t=e.length-1;t>=0;t--){const n=e[t];let i=0,r=0;if(t>0){const n=e[t-1];n.originalLength>0&&(i=n.originalStart+n.originalLength),n.modifiedLength>0&&(r=n.modifiedStart+n.modifiedLength)}const o=n.originalLength>0,s=n.modifiedLength>0;let a=0,c=this._boundaryScore(n.originalStart,n.originalLength,n.modifiedStart,n.modifiedLength);for(let e=1;;e++){const t=n.originalStart-e,u=n.modifiedStart-e;if(t<i||u<r)break;if(o&&!this.OriginalElementsAreEqual(t,t+n.originalLength))break;if(s&&!this.ModifiedElementsAreEqual(u,u+n.modifiedLength))break;const l=this._boundaryScore(t,n.originalLength,u,n.modifiedLength);l>c&&(c=l,a=e)}n.originalStart-=a,n.modifiedStart-=a}return e}_OriginalIsBoundary(e){return e<=0||e>=this._originalElementsOrHash.length-1||this._hasStrings&&/^\s*$/.test(this._originalStringElements[e])}_OriginalRegionIsBoundary(e,t){if(this._OriginalIsBoundary(e)||this._OriginalIsBoundary(e-1))return!0;if(t>0){const n=e+t;if(this._OriginalIsBoundary(n-1)||this._OriginalIsBoundary(n))return!0}return!1}_ModifiedIsBoundary(e){return e<=0||e>=this._modifiedElementsOrHash.length-1||this._hasStrings&&/^\s*$/.test(this._modifiedStringElements[e])}_ModifiedRegionIsBoundary(e,t){if(this._ModifiedIsBoundary(e)||this._ModifiedIsBoundary(e-1))return!0;if(t>0){const n=e+t;if(this._ModifiedIsBoundary(n-1)||this._ModifiedIsBoundary(n))return!0}return!1}_boundaryScore(e,t,n,i){return(this._OriginalRegionIsBoundary(e,t)?1:0)+(this._ModifiedRegionIsBoundary(n,i)?1:0)}ConcatenateChanges(e,t){let n=[];if(0===e.length||0===t.length)return t.length>0?t:e;if(this.ChangesOverlap(e[e.length-1],t[0],n)){const i=new Array(e.length+t.length-1);return o.Copy(e,0,i,0,e.length-1),i[e.length-1]=n[0],o.Copy(t,1,i,e.length,t.length-1),i}{const n=new Array(e.length+t.length);return o.Copy(e,0,n,0,e.length),o.Copy(t,0,n,e.length,t.length),n}}ChangesOverlap(e,t,n){if(r.Assert(e.originalStart<=t.originalStart,"Left change is not less than or equal to right change"),r.Assert(e.modifiedStart<=t.modifiedStart,"Left change is not less than or equal to right change"),e.originalStart+e.originalLength>=t.originalStart||e.modifiedStart+e.modifiedLength>=t.modifiedStart){const r=e.originalStart;let o=e.originalLength;const s=e.modifiedStart;let a=e.modifiedLength;return e.originalStart+e.originalLength>=t.originalStart&&(o=t.originalStart+t.originalLength-e.originalStart),e.modifiedStart+e.modifiedLength>=t.modifiedStart&&(a=t.modifiedStart+t.modifiedLength-e.modifiedStart),n[0]=new i(r,o,s,a),!0}return n[0]=null,!1}ClipDiagonalBound(e,t,n,i){if(e>=0&&e<i)return e;const r=t%2==0;return e<0?r===(n%2==0)?0:1:r===((i-n-1)%2==0)?i-1:i-2}}t.LcsDiff=a},3816:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0});const i=n(8212),r=n(6813),o=n(7373),s=n(5622),a=n(5747),c=n(3129),u=n(2087),l=n(5232),d=n(572);var h,f,g,p,m,y,v,_,b,R,w,C,T,S,k,x,P,D,q;!function(e){const t=Object.prototype.toString;e.boolean=function(e){return!0===e||!1===e},e.nullOrUndefined=function(e){return null==e},e.string=function(e){return"[object String]"===t.call(e)}}(h||(h={})),function(e){e.applySingleFix="eslint.applySingleFix",e.applySuggestion="eslint.applySuggestion",e.applySameFixes="eslint.applySameFixes",e.applyAllFixes="eslint.applyAllFixes",e.applyDisableLine="eslint.applyDisableLine",e.applyDisableFile="eslint.applyDisableFile",e.openRuleDoc="eslint.openRuleDoc"}(f||(f={})),function(e){e[e.ok=1]="ok",e[e.warn=2]="warn",e[e.error=3]="error"}(g||(g={})),function(e){e.type=new i.NotificationType("eslint/status")}(p||(p={})),function(e){e.type=new i.RequestType("eslint/noConfig")}(m||(m={})),function(e){e.type=new i.RequestType("eslint/noLibrary")}(y||(y={})),function(e){e.type=new i.RequestType("eslint/openDoc")}(v||(v={})),function(e){e.type=new i.RequestType("eslint/probeFailed")}(_||(_={})),function(e){e.type=new i.NotificationType0("eslint/showOutputChannel")}(b||(b={})),function(e){e.auto="auto",e.location="location"}(R||(R={})),function(e){e.is=function(t){return t===e.auto||t===e.location}}(R||(R={})),function(e){e.is=function(e){const t=e;return t&&R.is(t.mode)}}(w||(w={})),function(e){e.is=function(e){const t=e;return t&&h.string(t.directory)&&(h.boolean(t["!cwd"])||void 0===t["!cwd"])}}(C||(C={})),function(e){e.on="on",e.off="off",e.probe="probe"}(T||(T={})),function(e){e.off="off",e.warn="warn",e.error="error"}(S||(S={})),function(e){e.all="all",e.problems="problems"}(k||(k={})),function(e){e.info="info",e.warn="warn",e.error="error",e.off="off",e.default="default",e.downgrade="downgrade",e.upgrade="upgrade"}(x||(x={})),function(e){e.hasLibrary=function(e){return void 0!==e.library}}(P||(P={})),function(e){e.hasMetaType=function(e){return void 0!==e&&void 0!==e.meta&&void 0!==e.meta.type}}(D||(D={})),function(e){e.hasRule=function(e){return void 0!==e.getRules}}(q||(q={}));const E=new d.LRUCache(1024);let O;function N(e,t){return e.startsWith("!")?!new RegExp(`^${e.slice(1).replace(/\*/g,".*")}$`,"g").test(t):new RegExp(`^${e.replace(/\*/g,".*")}$`,"g").test(t)}function M(e,t){if(E.has(e))return E.get(e);let n;for(const i of t)N(i.rule,e)&&(n=i.severity);return E.set(e,n),n}var j,F,A;function L(e){const t=e.range;return`[${t.start.line},${t.start.character},${t.end.line},${t.end.character}]-${e.code}`}!function(e){e.isFixable=function(e){return void 0!==e.edit},e.hasSuggestions=function(e){return void 0!==e.suggestions}}(j||(j={})),function(e){e.createTextEdit=function(e,t){return i.TextEdit.replace(i.Range.create(e.positionAt(t.edit.range[0]),e.positionAt(t.edit.range[1])),t.edit.text||"")}}(F||(F={})),function(e){e.createTextEdit=function(e,t){return i.TextEdit.replace(i.Range.create(e.positionAt(t.fix.range[0]),e.positionAt(t.fix.range[1])),t.fix.text||"")}}(A||(A={}));const I=new Map;function W(e,t,n){if(!n.ruleId)return;const i=e.uri;let r=I.get(i);void 0===r&&(r=new Map,I.set(i,r)),r.set(L(t),{label:`Fix this ${n.ruleId} problem`,documentVersion:e.version,ruleId:n.ruleId,line:n.line,diagnostic:t,edit:n.fix,suggestions:n.suggestions})}function $(e,t){switch(t){case x.off:case x.info:case x.warn:case x.error:return t;case x.downgrade:switch(H(e)){case i.DiagnosticSeverity.Error:return x.warn;case i.DiagnosticSeverity.Warning:case i.DiagnosticSeverity.Information:return x.info}case x.upgrade:switch(H(e)){case i.DiagnosticSeverity.Information:return x.warn;case i.DiagnosticSeverity.Warning:case i.DiagnosticSeverity.Error:return x.error}default:return e}}function H(e){switch(e){case 1:case x.warn:return i.DiagnosticSeverity.Warning;case 2:case x.error:return i.DiagnosticSeverity.Error;case x.info:return i.DiagnosticSeverity.Information;default:return i.DiagnosticSeverity.Error}}function U(e){if("win32"!==process.platform)return!1;if(!e||e.length<5)return!1;let t=e.charCodeAt(0);if(92!==t)return!1;if(t=e.charCodeAt(1),92!==t)return!1;let n=2;const i=n;for(;n<e.length&&(t=e.charCodeAt(n),92!==t);n++);return i!==n&&(t=e.charCodeAt(n+1),!isNaN(t)&&92!==t)}function z(e){if(!e)return;const t=h.string(e)?o.URI.parse(e):e instanceof o.URI?e:o.URI.parse(e.uri);return"file"===t.scheme?function(e){let t=e.fsPath;if("win32"===process.platform&&t.length>=2&&":"===t[1]&&(t=t[0].toUpperCase()+t.substr(1)),"win32"===process.platform||"darwin"===process.platform){const e=a.realpathSync.native(t);e.toLowerCase()===t.toLowerCase()&&(t=e)}return t}(t):void 0}const B=new i.NotificationType("eslint/exitCalled"),K=process.exit;process.exit=e=>{const t=new Error("stack");V.sendNotification(B,[e||0,t.stack]),setTimeout((()=>{K(e)}),1e3)},process.on("uncaughtException",(e=>{let t;if(e&&("string"==typeof e.stack?t=e.stack:"string"==typeof e.message?t=e.message:"string"==typeof e&&(t=e),void 0===t||0===t.length))try{t=JSON.stringify(e,void 0,4)}catch(e){}console.error("Uncaught exception received."),t&&console.error(t)}));const V=i.createConnection({cancelUndispatched:e=>{if(function(e){const t=e;return t&&"string"==typeof t.method&&("string"==typeof t.id||"number"==typeof t.id)}(e)&&"textDocument/codeAction"===e.method)return{jsonrpc:e.jsonrpc,id:e.id,result:null}}});let J;V.console.info(`ESLint server running in node ${process.version}`);const G={yarn:{cache:void 0,get:()=>i.Files.resolveGlobalYarnPath(de)},npm:{cache:void 0,get:()=>i.Files.resolveGlobalNodePath(de)},pnpm:{cache:void 0,get:()=>c.execSync("pnpm root -g").toString().trim()}},X=new Map([["javascript","js"],["javascriptreact","jsx"],["typescript","ts"],["typescriptreact","tsx"],["html","html"],["vue","vue"]]),Q=function(){const e=new Map,t=/\/@typescript-eslint\/parser\//,n=/\/babel-eslint\/lib\/index.js$/;return e.set("typescript",[t,n]),e.set("typescriptreact",[t,n]),e.set("html",[/\/@angular-eslint\/template-parser\//]),e}(),Y=function(){const e=new Map;return e.set("typescript",{regExps:[/vue-eslint-parser\/.*\.js$/],parsers:new Set(["@typescript-eslint/parser"]),parserRegExps:[/@typescript-eslint\/parser\/.*\.js$/]}),e}(),Z=new Map([["html","html"],["vue","vue"],["markdown","markdown"]]),ee=new Set(["javascript","javascriptreact"]),te=new Map,ne=new Map,ie=[["package.json",!0],[".eslintignore",!0],[".eslintrc",!1],[".eslintrc.json",!1],[".eslintrc.js",!1],[".eslintrc.yaml",!1],[".eslintrc.yml",!1]];function re(e){const t=e.uri;let n=ne.get(t);return n||(n=V.workspace.getConfiguration({scopeUri:t,section:""}).then((n=>{var r;const c=Object.assign({},n,{silent:!1,library:void 0,resolvedGlobalPackageManagerPath:void 0},{workingDirectory:void 0});if(c.validate===T.off)return c;c.resolvedGlobalPackageManagerPath=function(e){const t=G[e];if(t)return void 0===t.cache&&(t.cache=t.get()),t.cache}(c.packageManager);const u=z(e),l=void 0!==c.workspaceFolder?z(c.workspaceFolder.uri):void 0,d=void 0!==n.workingDirectory,h=null!==(r=n.workingDirectory)&&void 0!==r?r:{mode:R.location};if(w.is(h)){let e;h.mode===R.location?void 0!==l?e=l:void 0===u||U(u)||(e=s.dirname(u)):h.mode===R.auto&&(void 0!==l?e=function(e,t){if(void 0===t||U(t))return e;if(-1!==t.indexOf(`${s.sep}node_modules${s.sep}`))return e;let n=e,i=s.dirname(t);e:for(;void 0!==i&&i.startsWith(e);){for(const e of ie)if(a.existsSync(s.join(i,e[0]))){if(n=i,e[1])break e;break}const e=s.dirname(i);i=e!==i?e:void 0}return n}(l,u):void 0===u||U(u)||(e=s.dirname(u))),void 0!==e&&a.existsSync(e)&&(c.workingDirectory={directory:e})}else c.workingDirectory=h;let f,g,p;if(null!==c.nodePath&&(g=c.nodePath,!s.isAbsolute(g)&&void 0!==c.workspaceFolder)){const e=z(c.workspaceFolder.uri);void 0!==e&&(g=s.join(e,g))}return d||void 0===u||(p=s.dirname(u)),void 0!==p||void 0===c.workingDirectory||c.workingDirectory["!cwd"]||(p=c.workingDirectory.directory),f=void 0!==g?i.Files.resolve("eslint",g,g,de).then(void 0,(()=>i.Files.resolve("eslint",c.resolvedGlobalPackageManagerPath,p,de))):i.Files.resolve("eslint",c.resolvedGlobalPackageManagerPath,p,de),c.silent=c.validate===T.probe,f.then((n=>{var r;let a=te.get(n);if(void 0===a?(a=function(e){const t=require;try{return t(e)}catch(e){V.console.error(e.stack.toString())}}(n),void 0===a?(c.validate=T.off,c.silent||V.console.error(`Failed to load eslint library from ${n}. See output panel for more information.`)):void 0===a.CLIEngine?(c.validate=T.off,V.console.error(`The eslint library loaded from ${n} doesn't export a CLIEngine. You need at least eslint@1.0.0`)):(V.console.info(`ESLint library loaded from: ${n}`),c.library=a,te.set(n,a))):c.library=a,c.validate===T.probe&&P.hasLibrary(c)){c.validate=T.off;const t=o.URI.parse(e.uri);let n=z(e);if(void 0===n&&"untitled"===t.scheme&&void 0!==c.workspaceFolder){const t=X.get(e.languageId),i=z(c.workspaceFolder.uri);void 0!==i&&void 0!==t&&(n=s.join(i,`test${t}`))}if(void 0!==n){const t=Q.get(e.languageId),i=Z.get(e.languageId),o=Y.get(e.languageId);if(ee.has(e.languageId))c.validate=T.on;else if(void 0!==t||void 0!==i||void 0!==o){const e=me((e=>{try{return"function"==typeof e.getConfigForFile?e.getConfigForFile(n):void 0}catch(e){return}}),c);if(void 0!==e){const n=null!==e.parser?"win32"===process.platform?e.parser.replace(/\\/g,"/"):e.parser:void 0;if(void 0!==n){if(void 0!==t)for(const e of t)if(e.test(n)){c.validate=T.on;break}if(c.validate!==T.on&&void 0!==o&&"string"==typeof(null===(r=e.parserOptions)||void 0===r?void 0:r.parser))for(const t of o.regExps)if(t.test(n)&&(o.parsers.has(e.parserOptions.parser)||void 0!==o.parserRegExps&&o.parserRegExps.some((t=>t.test(e.parserOptions.parser))))){c.validate=T.on;break}}if(c.validate!==T.on&&Array.isArray(e.plugins)&&e.plugins.length>0&&void 0!==i)for(const t of e.plugins)if(t===i){c.validate=T.on;break}}}}if(c.validate===T.off){const t={textDocument:{uri:e.uri}};V.sendRequest(_.type,t)}}if(c.format&&c.validate===T.on&&P.hasLibrary(c)){const e=o.URI.parse(t),n="file"===e.scheme;let r=n?e.fsPath.replace(/\\/g,"/"):e.fsPath;r=r.replace(/[\[\]\{\}]/g,"?");const s={documentSelector:[{scheme:e.scheme,pattern:r}]};if(n){const e=z(t);me((n=>{n.isPathIgnored(e)||ce.set(t,V.client.register(i.DocumentFormattingRequest.type,s))}),c)}else ce.set(t,V.client.register(i.DocumentFormattingRequest.type,s))}return c}),(()=>(c.validate=T.off,c.silent||V.sendRequest(y.type,{source:{uri:e.uri}}),c)))})),ne.set(t,n),n)}var oe,se;!function(e){e.is=function(e){const t=e;return t&&void 0!==t.token&&void 0!==t.resolve&&void 0!==t.reject}}(oe||(oe={})),function(e){e.is=function(e){return e&&"function"==typeof e.then}}(se||(se={}));const ae=new class{constructor(e){this.connection=e,this.queue=[],this.requestHandlers=new Map,this.notificationHandlers=new Map}registerRequest(e,t,n){this.connection.onRequest(e,((t,i)=>new Promise(((r,o)=>{this.queue.push({method:e.method,params:t,documentVersion:n?n(t):void 0,resolve:r,reject:o,token:i}),this.trigger()})))),this.requestHandlers.set(e.method,{handler:t,versionProvider:n})}registerNotification(e,t,n){V.onNotification(e,(t=>{this.queue.push({method:e.method,params:t,documentVersion:n?n(t):void 0}),this.trigger()})),this.notificationHandlers.set(e.method,{handler:t,versionProvider:n})}addNotificationMessage(e,t,n){this.queue.push({method:e.method,params:t,documentVersion:n}),this.trigger()}onNotification(e,t,n){this.notificationHandlers.set(e.method,{handler:t,versionProvider:n})}trigger(){this.timer||0===this.queue.length||(this.timer=setImmediate((()=>{this.timer=void 0,this.processQueue(),this.trigger()})))}processQueue(){const e=this.queue.shift();if(e)if(oe.is(e)){const t=e;if(t.token.isCancellationRequested)return void t.reject(new i.ResponseError(i.LSPErrorCodes.RequestCancelled,"Request got cancelled"));const n=this.requestHandlers.get(t.method);if(void 0===n)throw new Error("No handler registered");if(n.versionProvider&&void 0!==t.documentVersion&&t.documentVersion!==n.versionProvider(t.params))return void t.reject(new i.ResponseError(i.LSPErrorCodes.RequestCancelled,"Request got cancelled"));const r=n.handler(t.params,t.token);se.is(r)?r.then((e=>{t.resolve(e)}),(e=>{t.reject(e)})):t.resolve(r)}else{const t=e,n=this.notificationHandlers.get(t.method);if(void 0===n)throw new Error("No handler registered");if(n.versionProvider&&void 0!==t.documentVersion&&t.documentVersion!==n.versionProvider(t.params))return;n.handler(t.params)}}}(V),ce=new Map;var ue;function le(){ne.clear();for(let e of J.all())ae.addNotificationMessage(ue.type,e,e.version);for(const e of ce.values())e.then((e=>e.dispose()));ce.clear()}function de(e,t){V.tracer.log(e,t)}!function(e){e.type=new i.NotificationType("eslint/validate")}(ue||(ue={})),ae.onNotification(ue.type,(e=>{!function(e,t=!0){if(!J.get(e.uri))return Promise.resolve(void 0);re(e).then((n=>{if(n.validate===T.on&&P.hasLibrary(n))try{!function(e,t,n=!0){const r=Object.assign(Object.create(null),t.options);let o;if(Array.isArray(r.fixTypes)&&r.fixTypes.length>0){o=new Set;for(let e of r.fixTypes)pe.has(e)&&o.add(e);0===o.size&&(o=void 0)}const s=JSON.stringify(t.rulesCustomizations);O!==s&&(O=s,E.clear());const a=e.getText(),c=e.uri,u=z(e);me((r=>{I.delete(c);const s=r.executeOnText(a,u,t.onIgnoredFiles!==S.off);q.hasRule(r)&&!ge.handled.has(c)&&(ge.handled.add(c),r.getRules().forEach(((e,t)=>{e.meta&&e.meta.docs&&h.string(e.meta.docs.url)&&ge.urls.set(t,e.meta.docs.url)})));const l=[];if(s&&s.results&&Array.isArray(s.results)&&s.results.length>0){const n=s.results[0];n.messages&&Array.isArray(n.messages)&&n.messages.forEach((n=>{if(n){if(M(n.ruleId,t.rulesCustomizations)===x.off)return;const s=H(n.severity)===i.DiagnosticSeverity.Warning;if(t.quiet&&s)return;const a=function(e,t){const n=t.message,r=h.nullOrUndefined(t.line)?0:Math.max(0,t.line-1),o=h.nullOrUndefined(t.column)?0:Math.max(0,t.column-1),s=h.nullOrUndefined(t.endLine)?r:Math.max(0,t.endLine-1),a=h.nullOrUndefined(t.endColumn)?o:Math.max(0,t.endColumn-1),c={message:n,severity:(u=t.severity,l=M(t.ruleId,e.rulesCustomizations),H($(u,l))),source:"eslint",range:{start:{line:r,character:o},end:{line:s,character:a}}};var u,l;if(t.ruleId){const e=ge.urls.get(t.ruleId);c.code=t.ruleId,void 0!==e&&(c.codeDescription={href:e}),"no-unused-vars"===t.ruleId&&(c.tags=[i.DiagnosticTag.Unnecessary])}return c}(t,n);if(l.push(a),void 0!==o&&q.hasRule(r)&&void 0!==n.ruleId&&void 0!==n.fix){const t=r.getRules().get(n.ruleId);D.hasMetaType(t)&&o.has(t.meta.type)&&W(e,a,n)}else W(e,a,n)}}))}n&&V.sendDiagnostics({uri:c,diagnostics:l})}),t)}(e,n,t),V.sendNotification(p.type,{uri:e.uri,state:g.ok})}catch(t){if(V.sendDiagnostics({uri:e.uri,diagnostics:[]}),n.silent)V.console.info(fe(t,e)),V.sendNotification(p.type,{uri:e.uri,state:g.ok});else{let i;for(let r of he)if(i=r(t,e,n.library),i)break;i=i||g.error,V.sendNotification(p.type,{uri:e.uri,state:i})}}}))}(e,!0)}),(e=>e.version)),V.onInitialize(((e,t,n)=>{n.begin("Initializing ESLint Server");const o=i.TextDocumentSyncKind.Incremental;return J=new i.TextDocuments(r.TextDocument),J.listen(V),J.onDidOpen((e=>{re(e.document).then((t=>{t.validate===T.on&&P.hasLibrary(t)&&"onSave"===t.run&&ae.addNotificationMessage(ue.type,e.document,e.document.version)}))})),J.onDidChangeContent((e=>{const t=e.document.uri;I.delete(t),re(e.document).then((t=>{t.validate===T.on&&"onType"===t.run&&ae.addNotificationMessage(ue.type,e.document,e.document.version)}))})),J.onDidSave((e=>{re(e.document).then((t=>{t.validate===T.on&&"onSave"===t.run&&ae.addNotificationMessage(ue.type,e.document,e.document.version)}))})),J.onDidClose((e=>{re(e.document).then((t=>{const n=e.document.uri;ne.delete(n),I.delete(n);const i=ce.get(e.document.uri);void 0!==i&&(i.then((e=>e.dispose())),ce.delete(e.document.uri)),t.validate===T.on&&V.sendDiagnostics({uri:n,diagnostics:[]})}))})),n.done(),{capabilities:{textDocumentSync:{openClose:!0,change:o,willSaveWaitUntil:!1,save:{includeText:!1}},workspace:{workspaceFolders:{supported:!0}},codeActionProvider:{codeActionKinds:[i.CodeActionKind.QuickFix,`${i.CodeActionKind.SourceFixAll}.eslint`]},executeCommandProvider:{commands:[f.applySingleFix,f.applySuggestion,f.applySameFixes,f.applyAllFixes,f.applyDisableLine,f.applyDisableFile,f.openRuleDoc]}}}})),V.onInitialized((()=>{V.client.register(i.DidChangeConfigurationNotification.type,void 0),V.client.register(i.DidChangeWorkspaceFoldersNotification.type,void 0)})),ae.registerNotification(i.DidChangeConfigurationNotification.type,(e=>{le()})),ae.registerNotification(i.DidChangeWorkspaceFoldersNotification.type,(e=>{le()}));const he=[function(e,t,n){if(function(e){const t=e;return"no-config-found"===t.messageTemplate||"No ESLint configuration found."===t.message}(e))return ye.has(t.uri)||(V.sendRequest(m.type,{message:fe(e,t),document:{uri:t.uri}}).then(void 0,(()=>{})),ye.set(t.uri,n)),g.warn},function(e,t,n){if(!e.message)return;function i(i){return ve.has(i)||(V.console.error(fe(e,t)),J.get(o.URI.file(i).toString())||V.window.showInformationMessage(fe(e,t)),ve.set(i,n)),g.warn}let r=/Cannot read config file:\s+(.*)\nError:\s+(.*)/.exec(e.message);return r&&3===r.length?i(r[1]):(r=/(.*):\n\s*Configuration for rule \"(.*)\" is /.exec(e.message),r&&3===r.length?i(r[1]):(r=/Cannot find module '([^']*)'\nReferenced from:\s+(.*)/.exec(e.message),r&&3===r.length?i(r[2]):void 0))},function(e,t,n){if(!e.message)return;const i=/Failed to load plugin (.*): Cannot find module (.*)/.exec(e.message);return i&&3===i.length?function(e,i,r){if(!_e.has(e)){const o=z(t);_e.set(e,n),"plugin-missing"===r.messageTemplate?V.console.error(["",`${r.message.toString()}`,`Happened while validating ${o||t.uri}`,"This can happen for a couple of reasons:","1. The plugin name is spelled incorrectly in an ESLint configuration file (e.g. .eslintrc).",`2. If ESLint is installed globally, then make sure ${i} is installed globally as well.`,`3. If ESLint is installed locally, then ${i} isn't installed correctly.`,"",`Consider running eslint --debug ${o||t.uri} from a terminal to obtain a trace about the configuration files used.`].join("\n")):V.console.error([`${r.message.toString()}`,`Happened while validating ${o||t.uri}`].join("\n"))}return g.warn}(i[1],i[2],e):void 0},function(e,t){return V.window.showErrorMessage(`ESLint: ${fe(e,t)}. Please see the 'ESLint' output channel for details.`,{title:"Open Output",id:1}).then((e=>{void 0!==e&&1===e.id&&V.sendNotification(b.type)})),h.string(e.stack)&&(V.console.error("ESLint stack trace:"),V.console.error(e.stack)),g.error}];function fe(e,t){let n;return"string"==typeof e.message||e.message instanceof String?(n=e.message,n=n.replace(/\r?\n/g," "),/^CLI: /.test(n)&&(n=n.substr(5))):n=`An unknown error occurred while validating document: ${t.uri}`,n}const ge={handled:new Set,urls:new Map},pe=new Set(["problem","suggestion","layout"]);function me(e,t,n){const i=void 0===n?Object.assign(Object.create(null),t.options):Object.assign(Object.create(null),t.options,n),r=process.cwd();try{return t.workingDirectory&&(i.cwd=function(e){return"win32"!==process.platform||e.length<2||":"!==e[1]?e:e[0].toUpperCase()+e.substr(1)}(t.workingDirectory.directory),!0!==t.workingDirectory["!cwd"]&&a.existsSync(t.workingDirectory.directory)&&process.chdir(t.workingDirectory.directory)),e(new t.library.CLIEngine(i))}finally{r!==process.cwd()&&process.chdir(r)}}const ye=new Map,ve=new Map,_e=new Map;ae.registerNotification(i.DidChangeWatchedFilesNotification.type,(e=>{ge.handled.clear(),ge.urls.clear(),ye.clear(),_e.clear(),ne.clear(),e.changes.forEach((e=>{const t=z(e.uri);if(void 0===t||0===t.length||U(t))return;const n=s.dirname(t);if(n){const e=ve.get(t);if(void 0!==e){const i=new e.CLIEngine({});try{i.executeOnText("",s.join(n,"___test___.js")),ve.delete(t)}catch(e){}}}})),function(e){e.forEach((e=>{ae.addNotificationMessage(ue.type,e,e.version)}))}(J.all())}));class be{constructor(e){this.edits=e}static overlaps(e,t){return void 0!==e&&e.edit.range[1]>t.edit.range[0]}static isSame(e,t){return e.edit.range[0]===t.edit.range[0]&&e.edit.range[1]===t.edit.range[1]&&e.edit.text===t.edit.text}isEmpty(){return 0===this.edits.size}getDocumentVersion(){if(this.isEmpty())throw new Error("No edits recorded.");return this.edits.values().next().value.documentVersion}getScoped(e){const t=[];for(let n of e){const e=L(n),i=this.edits.get(e);i&&t.push(i)}return t}getAllSorted(){const e=[];return this.edits.forEach((t=>{j.isFixable(t)&&e.push(t)})),e.sort(((e,t)=>{const n=e.edit.range[0]-t.edit.range[0];if(0!==n)return n;const i=e.edit.range[1]-e.edit.range[0];if(0===i)return-1;const r=t.edit.range[1]-t.edit.range[0];return 0===r?1:i-r}))}getApplicable(){const e=this.getAllSorted();if(e.length<=1)return e;const t=[];let n=e[0];t.push(n);for(let i=1;i<e.length;i++){let r=e[i];be.overlaps(n,r)||be.isSame(n,r)||(t.push(r),n=r)}return t}}class Re{constructor(){this._actions=new Map}get(e){let t=this._actions.get(e);return void 0===t&&(t={fixes:[],suggestions:[]},this._actions.set(e,t)),t}get fixAll(){return void 0===this._fixAll&&(this._fixAll=[]),this._fixAll}all(){const e=[];for(let t of this._actions.values())e.push(...t.fixes),e.push(...t.suggestions),t.disable&&e.push(t.disable),t.fixAll&&e.push(t.fixAll),t.disableFile&&e.push(t.disableFile),t.showDocumentation&&e.push(t.showDocumentation);return void 0!==this._fixAll&&e.push(...this._fixAll),e}get length(){let e=0;for(let t of this._actions.values())e+=t.fixes.length;return e}}var we;!function(e){e.create=function(e,t,n){return{uri:e.uri,version:e.version,ruleId:t,sequence:n}},e.hasRuleId=function(e){return void 0!==e.ruleId}}(we||(we={}));const Ce=new class{constructor(){this.values=new Map,this.uri=void 0,this.version=void 0}clear(e){void 0===e?(this.uri=void 0,this.version=void 0):(this.uri=e.uri,this.version=e.version),this.values.clear()}isUsable(e,t){return this.uri===e&&this.version===t}set(e,t){this.values.set(e,t)}get(e){return this.values.get(e)}},Te=`${i.CodeActionKind.SourceFixAll}.eslint`;var Se;function ke(e,t){const n=e.uri,i=J.get(n);if(void 0!==i&&e.version===i.version)return re(i).then((e=>{if(e.validate!==T.on||!P.hasLibrary(e)||t===Se.format&&!e.format)return[];const o=z(i);return me((s=>{const a=I.get(n),c=i.getText();let u;const d=[];let h=Date.now();if(t===Se.onSave&&void 0!==a&&a.size>0){const e=new be(a).getApplicable();e.length>0&&(u=e.map((e=>F.createTextEdit(i,e))))}if(t===Se.onSave&&e.codeActionOnSave.mode===k.problems)V.tracer.log(`Computing all fixes took: ${Date.now()-h} ms.`),void 0!==u&&d.push(...u);else{let e;e=void 0!==u?r.TextDocument.applyEdits(i,u):c;const t=s.executeOnText(e,o);if(V.tracer.log(`Computing all fixes took: ${Date.now()-h} ms.`),Array.isArray(t.results)&&1===t.results.length&&void 0!==t.results[0].output){const e=t.results[0].output;h=Date.now();const n=l.stringDiff(c,e,!1);V.tracer.log(`Computing minimal edits took: ${Date.now()-h} ms.`);for(let t of n)d.push({range:{start:i.positionAt(t.originalStart),end:i.positionAt(t.originalStart+t.originalLength)},newText:e.substr(t.modifiedStart,t.modifiedLength)})}else void 0!==u&&d.push(...u)}return d}),e,{fix:!0})}))}ae.registerRequest(i.CodeActionRequest.type,(e=>{const t=new Re,n=e.textDocument.uri,r=J.get(n);if(void 0===r)return Ce.clear(r),t.all();function o(e,t,n,r,o){const s=i.Command.create(e,n,r),a=i.CodeAction.create(e,s,t);return void 0!==o&&(a.diagnostics=[o]),a}function s(e,t){return i.TextEdit.insert(i.Position.create(e.line-1,0),`${t}// eslint-disable-next-line ${e.ruleId}${u.EOL}`)}function a(e){return i.TextEdit.insert(i.Position.create(e.line-1,2147483647),` // eslint-disable-line ${e.ruleId}`)}function c(e){const t="#!"===(null==r?void 0:r.getText(i.Range.create(i.Position.create(0,0),i.Position.create(0,2))))?1:0;return i.TextEdit.insert(i.Position.create(t,0),`/* eslint-disable ${e.ruleId} */${u.EOL}`)}function l(e){const t=e.length;if(0!==t)return e[t-1]}return re(r).then((async u=>{if(u.validate!==T.on||!P.hasLibrary(u))return t.all();const d=I.get(n);if(void 0===d&&"onType"===u.run)return t.all();const h=void 0!==e.context.only&&e.context.only.length>0?e.context.only[0]:void 0,g=h===i.CodeActionKind.Source,p=h===Te||h===i.CodeActionKind.SourceFixAll;if(p||g){if(p&&u.codeActionOnSave.enable){const e={uri:r.uri,version:r.version},n=await ke(e,Se.onSave);void 0!==n&&t.fixAll.push(i.CodeAction.create("Fix all ESLint auto-fixable problems",{documentChanges:[i.TextDocumentEdit.create(e,n)]},Te))}else g&&t.fixAll.push(o("Fix all ESLint auto-fixable problems",i.CodeActionKind.Source,f.applyAllFixes,we.create(r)));return t.all()}if(void 0===d)return t.all();const m=new be(d);if(m.isEmpty())return t.all();let y=-1;const v=[],_=null!=h?h:i.CodeActionKind.QuickFix;for(let l of m.getScoped(e.context.diagnostics)){y=l.documentVersion;const e=l.ruleId;if(v.push(e),j.isFixable(l)){const s=new i.WorkspaceChange;s.getTextEditChange({uri:n,version:y}).add(F.createTextEdit(r,l)),Ce.set(`${f.applySingleFix}:${e}`,s);const a=o(l.label,_,f.applySingleFix,we.create(r,e),l.diagnostic);a.isPreferred=!0,t.get(e).fixes.push(a)}if(j.hasSuggestions(l)&&l.suggestions.forEach(((s,a)=>{const c=new i.WorkspaceChange;c.getTextEditChange({uri:n,version:y}).add(A.createTextEdit(r,s)),Ce.set(`${f.applySuggestion}:${e}:${a}`,c);const u=o(`${s.desc} (${l.ruleId})`,i.CodeActionKind.QuickFix,f.applySuggestion,we.create(r,e,a),l.diagnostic);t.get(e).suggestions.push(u)})),u.codeAction.disableRuleComment.enable){let d=new i.WorkspaceChange;if("sameLine"===u.codeAction.disableRuleComment.location)d.getTextEditChange({uri:n,version:y}).add(a(l));else{const e=r.getText(i.Range.create(i.Position.create(l.line-1,0),i.Position.create(l.line-1,2147483647))),t=/^([ \t]*)/.exec(e),o=null!==t&&t.length>0?t[1]:"";d.getTextEditChange({uri:n,version:y}).add(s(l,o))}Ce.set(`${f.applyDisableLine}:${e}`,d),t.get(e).disable=o(`Disable ${e} for this line`,_,f.applyDisableLine,we.create(r,e)),void 0===t.get(e).disableFile&&(d=new i.WorkspaceChange,d.getTextEditChange({uri:n,version:y}).add(c(l)),Ce.set(`${f.applyDisableFile}:${e}`,d),t.get(e).disableFile=o(`Disable ${e} for the entire file`,_,f.applyDisableFile,we.create(r,e)))}u.codeAction.showDocumentation.enable&&void 0===t.get(e).showDocumentation&&ge.urls.has(e)&&(t.get(e).showDocumentation=o(`Show documentation for ${e}`,_,f.openRuleDoc,we.create(r,e)))}if(t.length>0){const e=new Map(v.map((e=>[e,[]])));for(let t of m.getAllSorted())if(-1===y&&(y=t.documentVersion),e.has(t.ruleId)){const n=e.get(t.ruleId);be.overlaps(l(n),t)||n.push(t)}e.forEach(((e,s)=>{if(e.length>1){const a=new i.WorkspaceChange,c=a.getTextEditChange({uri:n,version:y});e.map((e=>F.createTextEdit(r,e))).forEach((e=>c.add(e))),Ce.set(f.applySameFixes,a),t.get(s).fixAll=o(`Fix all ${s} problems`,_,f.applySameFixes,we.create(r))}})),t.fixAll.push(o("Fix all auto-fixable problems",_,f.applyAllFixes,we.create(r)))}return t.all()}))}),(e=>{const t=J.get(e.textDocument.uri);return void 0!==t?t.version:void 0})),function(e){e.onSave="onsave",e.format="format",e.command="command"}(Se||(Se={})),ae.registerRequest(i.ExecuteCommandRequest.type,(async e=>{let t;const n=e.arguments[0];if(e.command===f.applyAllFixes){const e=await ke(n,Se.command);if(void 0!==e){t=new i.WorkspaceChange;const r=t.getTextEditChange(n);e.forEach((e=>r.add(e)))}}else if(-1!==[f.applySingleFix,f.applyDisableLine,f.applyDisableFile].indexOf(e.command))t=Ce.get(`${e.command}:${n.ruleId}`);else if(-1!==[f.applySuggestion].indexOf(e.command))t=Ce.get(`${e.command}:${n.ruleId}:${n.sequence}`);else if(e.command===f.openRuleDoc&&we.hasRuleId(n)){const e=ge.urls.get(n.ruleId);e&&V.sendRequest(v.type,{url:e})}else t=Ce.get(e.command);return void 0===t?{}:V.workspace.applyEdit(t.edit).then((t=>(t.applied||V.console.error(`Failed to apply command: ${e.command}`),{})),(()=>{V.console.error(`Failed to apply command: ${e.command}`)}))}),(e=>{const t=e.arguments[0];return Ce.isUsable(t.uri,t.version)?t.version:void 0})),ae.registerRequest(i.DocumentFormattingRequest.type,(e=>{const t=J.get(e.textDocument.uri);return void 0===t?[]:ke({uri:t.uri,version:t.version},Se.format)}),(e=>{const t=J.get(e.textDocument.uri);return void 0!==t?t.version:void 0})),V.listen()},572:(e,t)=>{var n;Object.defineProperty(t,"__esModule",{value:!0}),t.LRUCache=t.LinkedMap=t.Touch=void 0,function(e){e.None=0,e.First=1,e.AsOld=e.First,e.Last=2,e.AsNew=e.Last}(n=t.Touch||(t.Touch={}));class i{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 e;return null===(e=this._head)||void 0===e?void 0:e.value}get last(){var e;return null===(e=this._tail)||void 0===e?void 0:e.value}has(e){return this._map.has(e)}get(e,t=n.None){const i=this._map.get(e);if(i)return t!==n.None&&this.touch(i,t),i.value}set(e,t,i=n.None){let r=this._map.get(e);if(r)r.value=t,i!==n.None&&this.touch(r,i);else{switch(r={key:e,value:t,next:void 0,previous:void 0},i){case n.None:this.addItemLast(r);break;case n.First:this.addItemFirst(r);break;case n.Last:default:this.addItemLast(r)}this._map.set(e,r),this._size++}return this}delete(e){return!!this.remove(e)}remove(e){const t=this._map.get(e);if(t)return this._map.delete(e),this.removeItem(t),this._size--,t.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");const e=this._head;return this._map.delete(e.key),this.removeItem(e),this._size--,e.value}forEach(e,t){const n=this._state;let i=this._head;for(;i;){if(t?e.bind(t)(i.value,i.key,this):e(i.value,i.key,this),this._state!==n)throw new Error("LinkedMap got modified during iteration.");i=i.next}}keys(){const e=this,t=this._state;let n=this._head;const i={[Symbol.iterator]:()=>i,next(){if(e._state!==t)throw new Error("LinkedMap got modified during iteration.");if(n){const e={value:n.key,done:!1};return n=n.next,e}return{value:void 0,done:!0}}};return i}values(){const e=this,t=this._state;let n=this._head;const i={[Symbol.iterator]:()=>i,next(){if(e._state!==t)throw new Error("LinkedMap got modified during iteration.");if(n){const e={value:n.value,done:!1};return n=n.next,e}return{value:void 0,done:!0}}};return i}entries(){const e=this,t=this._state;let n=this._head;const i={[Symbol.iterator]:()=>i,next(){if(e._state!==t)throw new Error("LinkedMap got modified during iteration.");if(n){const e={value:[n.key,n.value],done:!1};return n=n.next,e}return{value:void 0,done:!0}}};return i}[Symbol.iterator](){return this.entries()}trimOld(e){if(e>=this.size)return;if(0===e)return void this.clear();let t=this._head,n=this.size;for(;t&&n>e;)this._map.delete(t.key),t=t.next,n--;this._head=t,this._size=n,t&&(t.previous=void 0),this._state++}addItemFirst(e){if(this._head||this._tail){if(!this._head)throw new Error("Invalid list");e.next=this._head,this._head.previous=e}else this._tail=e;this._head=e,this._state++}addItemLast(e){if(this._head||this._tail){if(!this._tail)throw new Error("Invalid list");e.previous=this._tail,this._tail.next=e}else this._head=e;this._tail=e,this._state++}removeItem(e){if(e===this._head&&e===this._tail)this._head=void 0,this._tail=void 0;else if(e===this._head){if(!e.next)throw new Error("Invalid list");e.next.previous=void 0,this._head=e.next}else if(e===this._tail){if(!e.previous)throw new Error("Invalid list");e.previous.next=void 0,this._tail=e.previous}else{const t=e.next,n=e.previous;if(!t||!n)throw new Error("Invalid list");t.previous=n,n.next=t}e.next=void 0,e.previous=void 0,this._state++}touch(e,t){if(!this._head||!this._tail)throw new Error("Invalid list");if(t===n.First||t===n.Last)if(t===n.First){if(e===this._head)return;const t=e.next,n=e.previous;e===this._tail?(n.next=void 0,this._tail=n):(t.previous=n,n.next=t),e.previous=void 0,e.next=this._head,this._head.previous=e,this._head=e,this._state++}else if(t===n.Last){if(e===this._tail)return;const t=e.next,n=e.previous;e===this._head?(t.previous=void 0,this._head=t):(t.previous=n,n.next=t),e.next=void 0,e.previous=this._tail,this._tail.next=e,this._tail=e,this._state++}}toJSON(){const e=[];return this.forEach(((t,n)=>{e.push([n,t])})),e}fromJSON(e){this.clear();for(const[t,n]of e)this.set(t,n)}}t.LinkedMap=i,t.LRUCache=class extends i{constructor(e,t=1){super(),this._limit=e,this._ratio=Math.min(Math.max(0,t),1)}get limit(){return this._limit}set limit(e){this._limit=e,this.checkTrim()}get ratio(){return this._ratio}set ratio(e){this._ratio=Math.min(Math.max(0,e),1),this.checkTrim()}get(e,t=n.AsNew){return super.get(e,t)}peek(e){return super.get(e,n.None)}set(e,t){return super.set(e,t,n.Last),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}}},3870:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CancellationSenderStrategy=t.CancellationReceiverStrategy=t.ConnectionError=t.ConnectionErrors=t.LogTraceNotification=t.SetTraceNotification=t.TraceFormat=t.Trace=t.ProgressType=t.createMessageConnection=t.NullLogger=t.ConnectionOptions=t.ConnectionStrategy=t.WriteableStreamMessageWriter=t.AbstractMessageWriter=t.MessageWriter=t.ReadableStreamMessageReader=t.AbstractMessageReader=t.MessageReader=t.CancellationToken=t.CancellationTokenSource=t.Emitter=t.Event=t.Disposable=t.ParameterStructures=t.NotificationType9=t.NotificationType8=t.NotificationType7=t.NotificationType6=t.NotificationType5=t.NotificationType4=t.NotificationType3=t.NotificationType2=t.NotificationType1=t.NotificationType0=t.NotificationType=t.ErrorCodes=t.ResponseError=t.RequestType9=t.RequestType8=t.RequestType7=t.RequestType6=t.RequestType5=t.RequestType4=t.RequestType3=t.RequestType2=t.RequestType1=t.RequestType0=t.RequestType=t.RAL=void 0,t.CancellationStrategy=void 0;const i=n(839);Object.defineProperty(t,"RequestType",{enumerable:!0,get:function(){return i.RequestType}}),Object.defineProperty(t,"RequestType0",{enumerable:!0,get:function(){return i.RequestType0}}),Object.defineProperty(t,"RequestType1",{enumerable:!0,get:function(){return i.RequestType1}}),Object.defineProperty(t,"RequestType2",{enumerable:!0,get:function(){return i.RequestType2}}),Object.defineProperty(t,"RequestType3",{enumerable:!0,get:function(){return i.RequestType3}}),Object.defineProperty(t,"RequestType4",{enumerable:!0,get:function(){return i.RequestType4}}),Object.defineProperty(t,"RequestType5",{enumerable:!0,get:function(){return i.RequestType5}}),Object.defineProperty(t,"RequestType6",{enumerable:!0,get:function(){return i.RequestType6}}),Object.defineProperty(t,"RequestType7",{enumerable:!0,get:function(){return i.RequestType7}}),Object.defineProperty(t,"RequestType8",{enumerable:!0,get:function(){return i.RequestType8}}),Object.defineProperty(t,"RequestType9",{enumerable:!0,get:function(){return i.RequestType9}}),Object.defineProperty(t,"ResponseError",{enumerable:!0,get:function(){return i.ResponseError}}),Object.defineProperty(t,"ErrorCodes",{enumerable:!0,get:function(){return i.ErrorCodes}}),Object.defineProperty(t,"NotificationType",{enumerable:!0,get:function(){return i.NotificationType}}),Object.defineProperty(t,"NotificationType0",{enumerable:!0,get:function(){return i.NotificationType0}}),Object.defineProperty(t,"NotificationType1",{enumerable:!0,get:function(){return i.NotificationType1}}),Object.defineProperty(t,"NotificationType2",{enumerable:!0,get:function(){return i.NotificationType2}}),Object.defineProperty(t,"NotificationType3",{enumerable:!0,get:function(){return i.NotificationType3}}),Object.defineProperty(t,"NotificationType4",{enumerable:!0,get:function(){return i.NotificationType4}}),Object.defineProperty(t,"NotificationType5",{enumerable:!0,get:function(){return i.NotificationType5}}),Object.defineProperty(t,"NotificationType6",{enumerable:!0,get:function(){return i.NotificationType6}}),Object.defineProperty(t,"NotificationType7",{enumerable:!0,get:function(){return i.NotificationType7}}),Object.defineProperty(t,"NotificationType8",{enumerable:!0,get:function(){return i.NotificationType8}}),Object.defineProperty(t,"NotificationType9",{enumerable:!0,get:function(){return i.NotificationType9}}),Object.defineProperty(t,"ParameterStructures",{enumerable:!0,get:function(){return i.ParameterStructures}});const r=n(3911);Object.defineProperty(t,"Disposable",{enumerable:!0,get:function(){return r.Disposable}});const o=n(7135);Object.defineProperty(t,"Event",{enumerable:!0,get:function(){return o.Event}}),Object.defineProperty(t,"Emitter",{enumerable:!0,get:function(){return o.Emitter}});const s=n(3881);Object.defineProperty(t,"CancellationTokenSource",{enumerable:!0,get:function(){return s.CancellationTokenSource}}),Object.defineProperty(t,"CancellationToken",{enumerable:!0,get:function(){return s.CancellationToken}});const a=n(6525);Object.defineProperty(t,"MessageReader",{enumerable:!0,get:function(){return a.MessageReader}}),Object.defineProperty(t,"AbstractMessageReader",{enumerable:!0,get:function(){return a.AbstractMessageReader}}),Object.defineProperty(t,"ReadableStreamMessageReader",{enumerable:!0,get:function(){return a.ReadableStreamMessageReader}});const c=n(6654);Object.defineProperty(t,"MessageWriter",{enumerable:!0,get:function(){return c.MessageWriter}}),Object.defineProperty(t,"AbstractMessageWriter",{enumerable:!0,get:function(){return c.AbstractMessageWriter}}),Object.defineProperty(t,"WriteableStreamMessageWriter",{enumerable:!0,get:function(){return c.WriteableStreamMessageWriter}});const u=n(1343);Object.defineProperty(t,"ConnectionStrategy",{enumerable:!0,get:function(){return u.ConnectionStrategy}}),Object.defineProperty(t,"ConnectionOptions",{enumerable:!0,get:function(){return u.ConnectionOptions}}),Object.defineProperty(t,"NullLogger",{enumerable:!0,get:function(){return u.NullLogger}}),Object.defineProperty(t,"createMessageConnection",{enumerable:!0,get:function(){return u.createMessageConnection}}),Object.defineProperty(t,"ProgressType",{enumerable:!0,get:function(){return u.ProgressType}}),Object.defineProperty(t,"Trace",{enumerable:!0,get:function(){return u.Trace}}),Object.defineProperty(t,"TraceFormat",{enumerable:!0,get:function(){return u.TraceFormat}}),Object.defineProperty(t,"SetTraceNotification",{enumerable:!0,get:function(){return u.SetTraceNotification}}),Object.defineProperty(t,"LogTraceNotification",{enumerable:!0,get:function(){return u.LogTraceNotification}}),Object.defineProperty(t,"ConnectionErrors",{enumerable:!0,get:function(){return u.ConnectionErrors}}),Object.defineProperty(t,"ConnectionError",{enumerable:!0,get:function(){return u.ConnectionError}}),Object.defineProperty(t,"CancellationReceiverStrategy",{enumerable:!0,get:function(){return u.CancellationReceiverStrategy}}),Object.defineProperty(t,"CancellationSenderStrategy",{enumerable:!0,get:function(){return u.CancellationSenderStrategy}}),Object.defineProperty(t,"CancellationStrategy",{enumerable:!0,get:function(){return u.CancellationStrategy}});const l=n(147);t.RAL=l.default},3881:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CancellationTokenSource=t.CancellationToken=void 0;const i=n(147),r=n(7574),o=n(7135);var s;!function(e){e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:o.Event.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:o.Event.None}),e.is=function(t){const n=t;return n&&(n===e.None||n===e.Cancelled||r.boolean(n.isCancellationRequested)&&!!n.onCancellationRequested)}}(s=t.CancellationToken||(t.CancellationToken={}));const a=Object.freeze((function(e,t){const n=i.default().timer.setTimeout(e.bind(t),0);return{dispose(){i.default().timer.clearTimeout(n)}}}));class c{constructor(){this._isCancelled=!1}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?a:(this._emitter||(this._emitter=new o.Emitter),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=void 0)}}t.CancellationTokenSource=class{get token(){return this._token||(this._token=new c),this._token}cancel(){this._token?this._token.cancel():this._token=s.Cancelled}dispose(){this._token?this._token instanceof c&&this._token.dispose():this._token=s.None}}},1343:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.createMessageConnection=t.ConnectionOptions=t.CancellationStrategy=t.CancellationSenderStrategy=t.CancellationReceiverStrategy=t.ConnectionStrategy=t.ConnectionError=t.ConnectionErrors=t.LogTraceNotification=t.SetTraceNotification=t.TraceFormat=t.Trace=t.NullLogger=t.ProgressType=void 0;const i=n(147),r=n(7574),o=n(839),s=n(6184),a=n(7135),c=n(3881);var u,l,d,h,f,g,p,m,y,v,_,b,R;!function(e){e.type=new o.NotificationType("$/cancelRequest")}(u||(u={})),function(e){e.type=new o.NotificationType("$/progress")}(l||(l={})),t.ProgressType=class{constructor(){}},function(e){e.is=function(e){return r.func(e)}}(d||(d={})),t.NullLogger=Object.freeze({error:()=>{},warn:()=>{},info:()=>{},log:()=>{}}),function(e){e[e.Off=0]="Off",e[e.Messages=1]="Messages",e[e.Verbose=2]="Verbose"}(h=t.Trace||(t.Trace={})),function(e){e.fromString=function(t){if(!r.string(t))return e.Off;switch(t=t.toLowerCase()){case"off":return e.Off;case"messages":return e.Messages;case"verbose":return e.Verbose;default:return e.Off}},e.toString=function(t){switch(t){case e.Off:return"off";case e.Messages:return"messages";case e.Verbose:return"verbose";default:return"off"}}}(h=t.Trace||(t.Trace={})),function(e){e.Text="text",e.JSON="json"}(t.TraceFormat||(t.TraceFormat={})),function(e){e.fromString=function(t){return"json"===(t=t.toLowerCase())?e.JSON:e.Text}}(f=t.TraceFormat||(t.TraceFormat={})),function(e){e.type=new o.NotificationType("$/setTrace")}(g=t.SetTraceNotification||(t.SetTraceNotification={})),function(e){e.type=new o.NotificationType("$/logTrace")}(p=t.LogTraceNotification||(t.LogTraceNotification={})),function(e){e[e.Closed=1]="Closed",e[e.Disposed=2]="Disposed",e[e.AlreadyListening=3]="AlreadyListening"}(m=t.ConnectionErrors||(t.ConnectionErrors={}));class w extends Error{constructor(e,t){super(t),this.code=e,Object.setPrototypeOf(this,w.prototype)}}t.ConnectionError=w,function(e){e.is=function(e){const t=e;return t&&r.func(t.cancelUndispatched)}}(y=t.ConnectionStrategy||(t.ConnectionStrategy={})),function(e){e.Message=Object.freeze({createCancellationTokenSource:e=>new c.CancellationTokenSource}),e.is=function(e){const t=e;return t&&r.func(t.createCancellationTokenSource)}}(v=t.CancellationReceiverStrategy||(t.CancellationReceiverStrategy={})),function(e){e.Message=Object.freeze({sendCancellation(e,t){e.sendNotification(u.type,{id:t})},cleanup(e){}}),e.is=function(e){const t=e;return t&&r.func(t.sendCancellation)&&r.func(t.cleanup)}}(_=t.CancellationSenderStrategy||(t.CancellationSenderStrategy={})),function(e){e.Message=Object.freeze({receiver:v.Message,sender:_.Message}),e.is=function(e){const t=e;return t&&v.is(t.receiver)&&_.is(t.sender)}}(b=t.CancellationStrategy||(t.CancellationStrategy={})),(t.ConnectionOptions||(t.ConnectionOptions={})).is=function(e){const t=e;return t&&(b.is(t.cancellationStrategy)||y.is(t.connectionStrategy))},function(e){e[e.New=1]="New",e[e.Listening=2]="Listening",e[e.Closed=3]="Closed",e[e.Disposed=4]="Disposed"}(R||(R={})),t.createMessageConnection=function(e,n,y,v){const _=void 0!==y?y:t.NullLogger;let C=0,T=0,S=0;const k="2.0";let x;const P=Object.create(null);let D;const q=Object.create(null),E=new Map;let O,N,M=new s.LinkedMap,j=Object.create(null),F=Object.create(null),A=h.Off,L=f.Text,I=R.New;const W=new a.Emitter,$=new a.Emitter,H=new a.Emitter,U=new a.Emitter,z=new a.Emitter,B=v&&v.cancellationStrategy?v.cancellationStrategy:b.Message;function K(e){if(null===e)throw new Error("Can't send requests with id null since the response can't be correlated.");return"req-"+e.toString()}function V(e){}function J(){return I===R.Listening}function G(){return I===R.Closed}function X(){return I===R.Disposed}function Q(){I!==R.New&&I!==R.Listening||(I=R.Closed,$.fire(void 0))}function Y(){O||0===M.size||(O=i.default().timer.setImmediate((()=>{O=void 0,function(){if(0===M.size)return;const e=M.shift();try{o.isRequestMessage(e)?function(e){if(X())return;function t(t,i,r){const s={jsonrpc:k,id:e.id};t instanceof o.ResponseError?s.error=t.toJson():s.result=void 0===t?null:t,ee(s,i,r),n.write(s)}function i(t,i,r){const o={jsonrpc:k,id:e.id,error:t.toJson()};ee(o,i,r),n.write(o)}!function(e){if(A!==h.Off&&N)if(L===f.Text){let t;A===h.Verbose&&e.params&&(t=`Params: ${JSON.stringify(e.params,null,4)}\n\n`),N.log(`Received request '${e.method} - (${e.id})'.`,t)}else te("receive-request",e)}(e);const s=P[e.method];let a,c;s&&(a=s.type,c=s.handler);const u=Date.now();if(c||x){const s=String(e.id),l=B.receiver.createCancellationTokenSource(s);F[s]=l;try{let d;if(c)if(void 0===e.params){if(void 0!==a&&0!==a.numberOfParams)return void i(new o.ResponseError(o.ErrorCodes.InvalidParams,`Request ${e.method} defines ${a.numberOfParams} params but recevied none.`),e.method,u);d=c(l.token)}else if(Array.isArray(e.params)){if(void 0!==a&&a.parameterStructures===o.ParameterStructures.byName)return void i(new o.ResponseError(o.ErrorCodes.InvalidParams,`Request ${e.method} defines parameters by name but received parameters by position`),e.method,u);d=c(...e.params,l.token)}else{if(void 0!==a&&a.parameterStructures===o.ParameterStructures.byPosition)return void i(new o.ResponseError(o.ErrorCodes.InvalidParams,`Request ${e.method} defines parameters by position but received parameters by name`),e.method,u);d=c(e.params,l.token)}else x&&(d=x(e.method,e.params,l.token));const h=d;d?h.then?h.then((n=>{delete F[s],t(n,e.method,u)}),(t=>{delete F[s],t instanceof o.ResponseError?i(t,e.method,u):t&&r.string(t.message)?i(new o.ResponseError(o.ErrorCodes.InternalError,`Request ${e.method} failed with message: ${t.message}`),e.method,u):i(new o.ResponseError(o.ErrorCodes.InternalError,`Request ${e.method} failed unexpectedly without providing any details.`),e.method,u)})):(delete F[s],t(d,e.method,u)):(delete F[s],function(t,i,r){void 0===t&&(t=null);const o={jsonrpc:k,id:e.id,result:t};ee(o,i,r),n.write(o)}(d,e.method,u))}catch(n){delete F[s],n instanceof o.ResponseError?t(n,e.method,u):n&&r.string(n.message)?i(new o.ResponseError(o.ErrorCodes.InternalError,`Request ${e.method} failed with message: ${n.message}`),e.method,u):i(new o.ResponseError(o.ErrorCodes.InternalError,`Request ${e.method} failed unexpectedly without providing any details.`),e.method,u)}}else i(new o.ResponseError(o.ErrorCodes.MethodNotFound,`Unhandled method ${e.method}`),e.method,u)}(e):o.isNotificationMessage(e)?function(e){if(X())return;let t,n;if(e.method===u.type.method)n=e=>{const t=e.id,n=F[String(t)];n&&n.cancel()};else{const i=q[e.method];i&&(n=i.handler,t=i.type)}if(n||D)try{!function(e){if(A!==h.Off&&N&&e.method!==p.type.method)if(L===f.Text){let t;A===h.Verbose&&(t=e.params?`Params: ${JSON.stringify(e.params,null,4)}\n\n`:"No parameters provided.\n\n"),N.log(`Received notification '${e.method}'.`,t)}else te("receive-notification",e)}(e),n?void 0===e.params?(void 0!==t&&0!==t.numberOfParams&&t.parameterStructures!==o.ParameterStructures.byName&&_.error(`Notification ${e.method} defines ${t.numberOfParams} params but recevied none.`),n()):Array.isArray(e.params)?(void 0!==t&&(t.parameterStructures===o.ParameterStructures.byName&&_.error(`Notification ${e.method} defines parameters by name but received parameters by position`),t.numberOfParams!==e.params.length&&_.error(`Notification ${e.method} defines ${t.numberOfParams} params but received ${e.params.length} argumennts`)),n(...e.params)):(void 0!==t&&t.parameterStructures===o.ParameterStructures.byPosition&&_.error(`Notification ${e.method} defines parameters by position but received parameters by name`),n(e.params)):D&&D(e.method,e.params)}catch(t){t.message?_.error(`Notification handler '${e.method}' failed with message: ${t.message}`):_.error(`Notification handler '${e.method}' failed unexpectedly.`)}else H.fire(e)}(e):o.isResponseMessage(e)?function(e){if(!X())if(null===e.id)e.error?_.error(`Received response message without id: Error is: \n${JSON.stringify(e.error,void 0,4)}`):_.error("Received response message without id. No further error information provided.");else{const t=String(e.id),n=j[t];if(function(e,t){if(A!==h.Off&&N)if(L===f.Text){let n;if(A===h.Verbose&&(e.error&&e.error.data?n=`Error data: ${JSON.stringify(e.error.data,null,4)}\n\n`:e.result?n=`Result: ${JSON.stringify(e.result,null,4)}\n\n`:void 0===e.error&&(n="No result returned.\n\n")),t){const i=e.error?` Request failed: ${e.error.message} (${e.error.code}).`:"";N.log(`Received response '${t.method} - (${e.id})' in ${Date.now()-t.timerStart}ms.${i}`,n)}else N.log(`Received response ${e.id} without active response promise.`,n)}else te("receive-response",e)}(e,n),n){delete j[t];try{if(e.error){const t=e.error;n.reject(new o.ResponseError(t.code,t.message,t.data))}else{if(void 0===e.result)throw new Error("Should never happen.");n.resolve(e.result)}}catch(e){e.message?_.error(`Response handler '${n.method}' failed with message: ${e.message}`):_.error(`Response handler '${n.method}' failed unexpectedly.`)}}}}(e):function(e){if(!e)return void _.error("Received empty message.");_.error(`Received message which is neither a response nor a notification message:\n${JSON.stringify(e,null,4)}`);const t=e;if(r.string(t.id)||r.number(t.id)){const e=String(t.id),n=j[e];n&&n.reject(new Error("The received response has neither a result nor an error property."))}}(e)}finally{Y()}}()})))}e.onClose(Q),e.onError((function(e){W.fire([e,void 0,void 0])})),n.onClose(Q),n.onError((function(e){W.fire(e)}));const Z=e=>{try{if(o.isNotificationMessage(e)&&e.method===u.type.method){const t=K(e.params.id),i=M.get(t);if(o.isRequestMessage(i)){const r=null==v?void 0:v.connectionStrategy,o=r&&r.cancelUndispatched?r.cancelUndispatched(i,V):void 0;if(o&&(void 0!==o.error||void 0!==o.result))return M.delete(t),o.id=i.id,ee(o,e.method,Date.now()),void n.write(o)}}!function(e,t){var n;o.isRequestMessage(t)?e.set(K(t.id),t):o.isResponseMessage(t)?e.set(null===(n=t.id)?"res-unknown-"+(++S).toString():"res-"+n.toString(),t):e.set("not-"+(++T).toString(),t)}(M,e)}finally{Y()}};function ee(e,t,n){if(A!==h.Off&&N)if(L===f.Text){let i;A===h.Verbose&&(e.error&&e.error.data?i=`Error data: ${JSON.stringify(e.error.data,null,4)}\n\n`:e.result?i=`Result: ${JSON.stringify(e.result,null,4)}\n\n`:void 0===e.error&&(i="No result returned.\n\n")),N.log(`Sending response '${t} - (${e.id})'. Processing request took ${Date.now()-n}ms`,i)}else te("send-response",e)}function te(e,t){if(!N||A===h.Off)return;const n={isLSPMessage:!0,type:e,message:t,timestamp:Date.now()};N.log(n)}function ne(){if(G())throw new w(m.Closed,"Connection is closed.");if(X())throw new w(m.Disposed,"Connection is disposed.")}function ie(e){return void 0===e?null:e}function re(e){return null===e?void 0:e}function oe(e){return null!=e&&!Array.isArray(e)&&"object"==typeof e}function se(e,t){switch(e){case o.ParameterStructures.auto:return oe(t)?re(t):[ie(t)];case o.ParameterStructures.byName:if(!oe(t))throw new Error("Recevied parameters by name but param is not an object literal.");return re(t);case o.ParameterStructures.byPosition:return[ie(t)];default:throw new Error(`Unknown parameter structure ${e.toString()}`)}}function ae(e,t){let n;const i=e.numberOfParams;switch(i){case 0:n=void 0;break;case 1:n=se(e.parameterStructures,t[0]);break;default:n=[];for(let e=0;e<t.length&&e<i;e++)n.push(ie(t[e]));if(t.length<i)for(let e=t.length;e<i;e++)n.push(null)}return n}const ce={sendNotification:(e,...t)=>{let i,s;if(ne(),r.string(e)){i=e;const n=t[0];let r=0,a=o.ParameterStructures.auto;o.ParameterStructures.is(n)&&(r=1,a=n);let c=t.length;const u=c-r;switch(u){case 0:s=void 0;break;case 1:s=se(a,t[r]);break;default:if(a===o.ParameterStructures.byName)throw new Error(`Recevied ${u} parameters for 'by Name' notification parameter structure.`);s=t.slice(r,c).map((e=>ie(e)))}}else{const n=t;i=e.method,s=ae(e,n)}const a={jsonrpc:k,method:i,params:s};!function(e){if(A!==h.Off&&N)if(L===f.Text){let t;A===h.Verbose&&(t=e.params?`Params: ${JSON.stringify(e.params,null,4)}\n\n`:"No parameters provided.\n\n"),N.log(`Sending notification '${e.method}'.`,t)}else te("send-notification",e)}(a),n.write(a)},onNotification:(e,t)=>{let n;return ne(),r.func(e)?D=e:t&&(r.string(e)?(n=e,q[e]={type:void 0,handler:t}):(n=e.method,q[e.method]={type:e,handler:t})),{dispose:()=>{void 0!==n?delete q[n]:D=void 0}}},onProgress:(e,t,n)=>{if(E.has(t))throw new Error(`Progress handler for token ${t} already registered`);return E.set(t,n),{dispose:()=>{E.delete(t)}}},sendProgress:(e,t,n)=>{ce.sendNotification(l.type,{token:t,value:n})},onUnhandledProgress:U.event,sendRequest:(e,...t)=>{let i,s,a;if(ne(),function(){if(!J())throw new Error("Call listen() first.")}(),r.string(e)){i=e;const n=t[0],r=t[t.length-1];let u=0,l=o.ParameterStructures.auto;o.ParameterStructures.is(n)&&(u=1,l=n);let d=t.length;c.CancellationToken.is(r)&&(d-=1,a=r);const h=d-u;switch(h){case 0:s=void 0;break;case 1:s=se(l,t[u]);break;default:if(l===o.ParameterStructures.byName)throw new Error(`Recevied ${h} parameters for 'by Name' request parameter structure.`);s=t.slice(u,d).map((e=>ie(e)))}}else{const n=t;i=e.method,s=ae(e,n);const r=e.numberOfParams;a=c.CancellationToken.is(n[r])?n[r]:void 0}const u=C++;let l;return a&&(l=a.onCancellationRequested((()=>{B.sender.sendCancellation(ce,u)}))),new Promise(((e,t)=>{const r={jsonrpc:k,id:u,method:i,params:s};let a={method:i,timerStart:Date.now(),resolve:t=>{e(t),B.sender.cleanup(u),null==l||l.dispose()},reject:e=>{t(e),B.sender.cleanup(u),null==l||l.dispose()}};!function(e){if(A!==h.Off&&N)if(L===f.Text){let t;A===h.Verbose&&e.params&&(t=`Params: ${JSON.stringify(e.params,null,4)}\n\n`),N.log(`Sending request '${e.method} - (${e.id})'.`,t)}else te("send-request",e)}(r);try{n.write(r)}catch(e){a.reject(new o.ResponseError(o.ErrorCodes.MessageWriteError,e.message?e.message:"Unknown reason")),a=null}a&&(j[String(u)]=a)}))},onRequest:(e,t)=>{ne();let n=null;return d.is(e)?(n=void 0,x=e):r.string(e)?(n=null,void 0!==t&&(n=e,P[e]={handler:t,type:void 0})):void 0!==t&&(n=e.method,P[e.method]={type:e,handler:t}),{dispose:()=>{null!==n&&(void 0!==n?delete P[n]:x=void 0)}}},trace:(e,t,n)=>{let i=!1,o=f.Text;void 0!==n&&(r.boolean(n)?i=n:(i=n.sendNotification||!1,o=n.traceFormat||f.Text)),A=e,L=o,N=A===h.Off?void 0:t,!i||G()||X()||ce.sendNotification(g.type,{value:h.toString(e)})},onError:W.event,onClose:$.event,onUnhandledNotification:H.event,onDispose:z.event,end:()=>{n.end()},dispose:()=>{if(X())return;I=R.Disposed,z.fire(void 0);const t=new Error("Connection got disposed.");Object.keys(j).forEach((e=>{j[e].reject(t)})),j=Object.create(null),F=Object.create(null),M=new s.LinkedMap,r.func(n.dispose)&&n.dispose(),r.func(e.dispose)&&e.dispose()},listen:()=>{ne(),function(){if(J())throw new w(m.AlreadyListening,"Connection is already listening")}(),I=R.Listening,e.listen(Z)},inspect:()=>{i.default().console.log("inspect")}};return ce.onNotification(p.type,(e=>{A!==h.Off&&N&&N.log(e.message,A===h.Verbose?e.verbose:void 0)})),ce.onNotification(l.type,(e=>{const t=E.get(e.token);t?t(e.value):U.fire(e)})),ce}},3911:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Disposable=void 0,(t.Disposable||(t.Disposable={})).create=function(e){return{dispose:e}}},7135:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Emitter=t.Event=void 0;const i=n(147);!function(e){const t={dispose(){}};e.None=function(){return t}}(t.Event||(t.Event={}));class r{add(e,t=null,n){this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(e),this._contexts.push(t),Array.isArray(n)&&n.push({dispose:()=>this.remove(e,t)})}remove(e,t=null){if(!this._callbacks)return;let n=!1;for(let i=0,r=this._callbacks.length;i<r;i++)if(this._callbacks[i]===e){if(this._contexts[i]===t)return this._callbacks.splice(i,1),void this._contexts.splice(i,1);n=!0}if(n)throw new Error("When adding a listener with a context, you should remove it with the same context")}invoke(...e){if(!this._callbacks)return[];const t=[],n=this._callbacks.slice(0),r=this._contexts.slice(0);for(let o=0,s=n.length;o<s;o++)try{t.push(n[o].apply(r[o],e))}catch(e){i.default().console.error(e)}return t}isEmpty(){return!this._callbacks||0===this._callbacks.length}dispose(){this._callbacks=void 0,this._contexts=void 0}}class o{constructor(e){this._options=e}get event(){return this._event||(this._event=(e,t,n)=>{this._callbacks||(this._callbacks=new r),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(e,t);const i={dispose:()=>{this._callbacks&&(this._callbacks.remove(e,t),i.dispose=o._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this))}};return Array.isArray(n)&&n.push(i),i}),this._event}fire(e){this._callbacks&&this._callbacks.invoke.call(this._callbacks,e)}dispose(){this._callbacks&&(this._callbacks.dispose(),this._callbacks=void 0)}}t.Emitter=o,o._noop=function(){}},7574:(e,t)=>{function n(e){return"string"==typeof e||e instanceof String}function i(e){return Array.isArray(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.stringArray=t.array=t.func=t.error=t.number=t.string=t.boolean=void 0,t.boolean=function(e){return!0===e||!1===e},t.string=n,t.number=function(e){return"number"==typeof e||e instanceof Number},t.error=function(e){return e instanceof Error},t.func=function(e){return"function"==typeof e},t.array=i,t.stringArray=function(e){return i(e)&&e.every((e=>n(e)))}},6184:(e,t)=>{var n;Object.defineProperty(t,"__esModule",{value:!0}),t.LRUCache=t.LinkedMap=t.Touch=void 0,function(e){e.None=0,e.First=1,e.AsOld=e.First,e.Last=2,e.AsNew=e.Last}(n=t.Touch||(t.Touch={}));class i{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 e;return null===(e=this._head)||void 0===e?void 0:e.value}get last(){var e;return null===(e=this._tail)||void 0===e?void 0:e.value}has(e){return this._map.has(e)}get(e,t=n.None){const i=this._map.get(e);if(i)return t!==n.None&&this.touch(i,t),i.value}set(e,t,i=n.None){let r=this._map.get(e);if(r)r.value=t,i!==n.None&&this.touch(r,i);else{switch(r={key:e,value:t,next:void 0,previous:void 0},i){case n.None:this.addItemLast(r);break;case n.First:this.addItemFirst(r);break;case n.Last:default:this.addItemLast(r)}this._map.set(e,r),this._size++}return this}delete(e){return!!this.remove(e)}remove(e){const t=this._map.get(e);if(t)return this._map.delete(e),this.removeItem(t),this._size--,t.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");const e=this._head;return this._map.delete(e.key),this.removeItem(e),this._size--,e.value}forEach(e,t){const n=this._state;let i=this._head;for(;i;){if(t?e.bind(t)(i.value,i.key,this):e(i.value,i.key,this),this._state!==n)throw new Error("LinkedMap got modified during iteration.");i=i.next}}keys(){const e=this,t=this._state;let n=this._head;const i={[Symbol.iterator]:()=>i,next(){if(e._state!==t)throw new Error("LinkedMap got modified during iteration.");if(n){const e={value:n.key,done:!1};return n=n.next,e}return{value:void 0,done:!0}}};return i}values(){const e=this,t=this._state;let n=this._head;const i={[Symbol.iterator]:()=>i,next(){if(e._state!==t)throw new Error("LinkedMap got modified during iteration.");if(n){const e={value:n.value,done:!1};return n=n.next,e}return{value:void 0,done:!0}}};return i}entries(){const e=this,t=this._state;let n=this._head;const i={[Symbol.iterator]:()=>i,next(){if(e._state!==t)throw new Error("LinkedMap got modified during iteration.");if(n){const e={value:[n.key,n.value],done:!1};return n=n.next,e}return{value:void 0,done:!0}}};return i}[Symbol.iterator](){return this.entries()}trimOld(e){if(e>=this.size)return;if(0===e)return void this.clear();let t=this._head,n=this.size;for(;t&&n>e;)this._map.delete(t.key),t=t.next,n--;this._head=t,this._size=n,t&&(t.previous=void 0),this._state++}addItemFirst(e){if(this._head||this._tail){if(!this._head)throw new Error("Invalid list");e.next=this._head,this._head.previous=e}else this._tail=e;this._head=e,this._state++}addItemLast(e){if(this._head||this._tail){if(!this._tail)throw new Error("Invalid list");e.previous=this._tail,this._tail.next=e}else this._head=e;this._tail=e,this._state++}removeItem(e){if(e===this._head&&e===this._tail)this._head=void 0,this._tail=void 0;else if(e===this._head){if(!e.next)throw new Error("Invalid list");e.next.previous=void 0,this._head=e.next}else if(e===this._tail){if(!e.previous)throw new Error("Invalid list");e.previous.next=void 0,this._tail=e.previous}else{const t=e.next,n=e.previous;if(!t||!n)throw new Error("Invalid list");t.previous=n,n.next=t}e.next=void 0,e.previous=void 0,this._state++}touch(e,t){if(!this._head||!this._tail)throw new Error("Invalid list");if(t===n.First||t===n.Last)if(t===n.First){if(e===this._head)return;const t=e.next,n=e.previous;e===this._tail?(n.next=void 0,this._tail=n):(t.previous=n,n.next=t),e.previous=void 0,e.next=this._head,this._head.previous=e,this._head=e,this._state++}else if(t===n.Last){if(e===this._tail)return;const t=e.next,n=e.previous;e===this._head?(t.previous=void 0,this._head=t):(t.previous=n,n.next=t),e.next=void 0,e.previous=this._tail,this._tail.next=e,this._tail=e,this._state++}}toJSON(){const e=[];return this.forEach(((t,n)=>{e.push([n,t])})),e}fromJSON(e){this.clear();for(const[t,n]of e)this.set(t,n)}}t.LinkedMap=i,t.LRUCache=class extends i{constructor(e,t=1){super(),this._limit=e,this._ratio=Math.min(Math.max(0,t),1)}get limit(){return this._limit}set limit(e){this._limit=e,this.checkTrim()}get ratio(){return this._ratio}set ratio(e){this._ratio=Math.min(Math.max(0,e),1),this.checkTrim()}get(e,t=n.AsNew){return super.get(e,t)}peek(e){return super.get(e,n.None)}set(e,t){return super.set(e,t,n.Last),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}}},5530:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.AbstractMessageBuffer=void 0,t.AbstractMessageBuffer=class{constructor(e="utf-8"){this._encoding=e,this._chunks=[],this._totalLength=0}get encoding(){return this._encoding}append(e){const t="string"==typeof e?this.fromString(e,this._encoding):e;this._chunks.push(t),this._totalLength+=t.byteLength}tryReadHeaders(){if(0===this._chunks.length)return;let e=0,t=0,n=0,i=0;e:for(;t<this._chunks.length;){const r=this._chunks[t];for(n=0;n<r.length;){switch(r[n]){case 13:switch(e){case 0:e=1;break;case 2:e=3;break;default:e=0}break;case 10:switch(e){case 1:e=2;break;case 3:e=4,n++;break e;default:e=0}break;default:e=0}n++}i+=r.byteLength,t++}if(4!==e)return;const r=this._read(i+n),o=new Map,s=this.toString(r,"ascii").split("\r\n");if(s.length<2)return o;for(let e=0;e<s.length-2;e++){const t=s[e],n=t.indexOf(":");if(-1===n)throw new Error("Message header must separate key and value using :");const i=t.substr(0,n),r=t.substr(n+1).trim();o.set(i,r)}return o}tryReadBody(e){if(!(this._totalLength<e))return this._read(e)}get numberOfBytes(){return this._totalLength}_read(e){if(0===e)return this.emptyBuffer();if(e>this._totalLength)throw new Error("Cannot read so many bytes!");if(this._chunks[0].byteLength===e){const t=this._chunks[0];return this._chunks.shift(),this._totalLength-=e,this.asNative(t)}if(this._chunks[0].byteLength>e){const t=this._chunks[0],n=this.asNative(t,e);return this._chunks[0]=t.slice(e),this._totalLength-=e,n}const t=this.allocNative(e);let n=0;for(;e>0;){const i=this._chunks[0];if(i.byteLength>e){const r=i.slice(0,e);t.set(r,n),n+=e,this._chunks[0]=i.slice(e),this._totalLength-=e,e-=e}else t.set(i,n),n+=i.byteLength,this._chunks.shift(),this._totalLength-=i.byteLength,e-=i.byteLength}return t}}},6525:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ReadableStreamMessageReader=t.AbstractMessageReader=t.MessageReader=void 0;const i=n(147),r=n(7574),o=n(7135);var s;(t.MessageReader||(t.MessageReader={})).is=function(e){let t=e;return t&&r.func(t.listen)&&r.func(t.dispose)&&r.func(t.onError)&&r.func(t.onClose)&&r.func(t.onPartialMessage)};class a{constructor(){this.errorEmitter=new o.Emitter,this.closeEmitter=new o.Emitter,this.partialMessageEmitter=new o.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(e){this.errorEmitter.fire(this.asError(e))}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}get onPartialMessage(){return this.partialMessageEmitter.event}firePartialMessage(e){this.partialMessageEmitter.fire(e)}asError(e){return e instanceof Error?e:new Error(`Reader received error. Reason: ${r.string(e.message)?e.message:"unknown"}`)}}t.AbstractMessageReader=a,function(e){e.fromOptions=function(e){var t;let n,r;const o=new Map;let s;const a=new Map;if(void 0===e||"string"==typeof e)n=null!=e?e:"utf-8";else{if(n=null!==(t=e.charset)&&void 0!==t?t:"utf-8",void 0!==e.contentDecoder&&(r=e.contentDecoder,o.set(r.name,r)),void 0!==e.contentDecoders)for(const t of e.contentDecoders)o.set(t.name,t);if(void 0!==e.contentTypeDecoder&&(s=e.contentTypeDecoder,a.set(s.name,s)),void 0!==e.contentTypeDecoders)for(const t of e.contentTypeDecoders)a.set(t.name,t)}return void 0===s&&(s=i.default().applicationJson.decoder,a.set(s.name,s)),{charset:n,contentDecoder:r,contentDecoders:o,contentTypeDecoder:s,contentTypeDecoders:a}}}(s||(s={})),t.ReadableStreamMessageReader=class extends a{constructor(e,t){super(),this.readable=e,this.options=s.fromOptions(t),this.buffer=i.default().messageBuffer.create(this.options.charset),this._partialMessageTimeout=1e4,this.nextMessageLength=-1,this.messageToken=0}set partialMessageTimeout(e){this._partialMessageTimeout=e}get partialMessageTimeout(){return this._partialMessageTimeout}listen(e){this.nextMessageLength=-1,this.messageToken=0,this.partialMessageTimer=void 0,this.callback=e;const t=this.readable.onData((e=>{this.onData(e)}));return this.readable.onError((e=>this.fireError(e))),this.readable.onClose((()=>this.fireClose())),t}onData(e){for(this.buffer.append(e);;){if(-1===this.nextMessageLength){const e=this.buffer.tryReadHeaders();if(!e)return;const t=e.get("Content-Length");if(!t)throw new Error("Header must provide a Content-Length property.");const n=parseInt(t);if(isNaN(n))throw new Error("Content-Length value must be a number.");this.nextMessageLength=n}const e=this.buffer.tryReadBody(this.nextMessageLength);if(void 0===e)return void this.setPartialMessageTimer();let t;this.clearPartialMessageTimer(),this.nextMessageLength=-1,t=void 0!==this.options.contentDecoder?this.options.contentDecoder.decode(e):Promise.resolve(e),t.then((e=>{this.options.contentTypeDecoder.decode(e,this.options).then((e=>{this.callback(e)}),(e=>{this.fireError(e)}))}),(e=>{this.fireError(e)}))}}clearPartialMessageTimer(){this.partialMessageTimer&&(i.default().timer.clearTimeout(this.partialMessageTimer),this.partialMessageTimer=void 0)}setPartialMessageTimer(){this.clearPartialMessageTimer(),this._partialMessageTimeout<=0||(this.partialMessageTimer=i.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))}}},6654:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.WriteableStreamMessageWriter=t.AbstractMessageWriter=t.MessageWriter=void 0;const i=n(147),r=n(7574),o=n(142),s=n(7135);var a;(t.MessageWriter||(t.MessageWriter={})).is=function(e){let t=e;return t&&r.func(t.dispose)&&r.func(t.onClose)&&r.func(t.onError)&&r.func(t.write)};class c{constructor(){this.errorEmitter=new s.Emitter,this.closeEmitter=new s.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(e,t,n){this.errorEmitter.fire([this.asError(e),t,n])}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: ${r.string(e.message)?e.message:"unknown"}`)}}t.AbstractMessageWriter=c,function(e){e.fromOptions=function(e){var t,n;return void 0===e||"string"==typeof e?{charset:null!=e?e:"utf-8",contentTypeEncoder:i.default().applicationJson.encoder}:{charset:null!==(t=e.charset)&&void 0!==t?t:"utf-8",contentEncoder:e.contentEncoder,contentTypeEncoder:null!==(n=e.contentTypeEncoder)&&void 0!==n?n:i.default().applicationJson.encoder}}}(a||(a={})),t.WriteableStreamMessageWriter=class extends c{constructor(e,t){super(),this.writable=e,this.options=a.fromOptions(t),this.errorCount=0,this.writeSemaphore=new o.Semaphore(1),this.writable.onError((e=>this.fireError(e))),this.writable.onClose((()=>this.fireClose()))}async write(e){return this.writeSemaphore.lock((async()=>this.options.contentTypeEncoder.encode(e,this.options).then((e=>void 0!==this.options.contentEncoder?this.options.contentEncoder.encode(e):e)).then((t=>{const n=[];return n.push("Content-Length: ",t.byteLength.toString(),"\r\n"),n.push("\r\n"),this.doWrite(e,n,t)}),(e=>{throw this.fireError(e),e}))))}async doWrite(e,t,n){try{return await this.writable.write(t.join(""),"ascii"),this.writable.write(n)}catch(t){return this.handleError(t,e),Promise.reject(t)}}handleError(e,t){this.errorCount++,this.fireError(e,t,this.errorCount)}end(){this.writable.end()}}},839:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.isResponseMessage=t.isNotificationMessage=t.isRequestMessage=t.NotificationType9=t.NotificationType8=t.NotificationType7=t.NotificationType6=t.NotificationType5=t.NotificationType4=t.NotificationType3=t.NotificationType2=t.NotificationType1=t.NotificationType0=t.NotificationType=t.RequestType9=t.RequestType8=t.RequestType7=t.RequestType6=t.RequestType5=t.RequestType4=t.RequestType3=t.RequestType2=t.RequestType1=t.RequestType=t.RequestType0=t.AbstractMessageSignature=t.ParameterStructures=t.ResponseError=t.ErrorCodes=void 0;const i=n(7574);var r;!function(e){e.ParseError=-32700,e.InvalidRequest=-32600,e.MethodNotFound=-32601,e.InvalidParams=-32602,e.InternalError=-32603,e.jsonrpcReservedErrorRangeStart=-32099,e.serverErrorStart=e.jsonrpcReservedErrorRangeStart,e.MessageWriteError=-32099,e.MessageReadError=-32098,e.ServerNotInitialized=-32002,e.UnknownErrorCode=-32001,e.jsonrpcReservedErrorRangeEnd=-32e3,e.serverErrorEnd=e.jsonrpcReservedErrorRangeEnd}(r=t.ErrorCodes||(t.ErrorCodes={}));class o extends Error{constructor(e,t,n){super(t),this.code=i.number(e)?e:r.UnknownErrorCode,this.data=n,Object.setPrototypeOf(this,o.prototype)}toJson(){return{code:this.code,message:this.message,data:this.data}}}t.ResponseError=o;class s{constructor(e){this.kind=e}static is(e){return e===s.auto||e===s.byName||e===s.byPosition}toString(){return this.kind}}t.ParameterStructures=s,s.auto=new s("auto"),s.byPosition=new s("byPosition"),s.byName=new s("byName");class a{constructor(e,t){this.method=e,this.numberOfParams=t}get parameterStructures(){return s.auto}}t.AbstractMessageSignature=a,t.RequestType0=class extends a{constructor(e){super(e,0)}},t.RequestType=class extends a{constructor(e,t=s.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}},t.RequestType1=class extends a{constructor(e,t=s.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}},t.RequestType2=class extends a{constructor(e){super(e,2)}},t.RequestType3=class extends a{constructor(e){super(e,3)}},t.RequestType4=class extends a{constructor(e){super(e,4)}},t.RequestType5=class extends a{constructor(e){super(e,5)}},t.RequestType6=class extends a{constructor(e){super(e,6)}},t.RequestType7=class extends a{constructor(e){super(e,7)}},t.RequestType8=class extends a{constructor(e){super(e,8)}},t.RequestType9=class extends a{constructor(e){super(e,9)}},t.NotificationType=class extends a{constructor(e,t=s.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}},t.NotificationType0=class extends a{constructor(e){super(e,0)}},t.NotificationType1=class extends a{constructor(e,t=s.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}},t.NotificationType2=class extends a{constructor(e){super(e,2)}},t.NotificationType3=class extends a{constructor(e){super(e,3)}},t.NotificationType4=class extends a{constructor(e){super(e,4)}},t.NotificationType5=class extends a{constructor(e){super(e,5)}},t.NotificationType6=class extends a{constructor(e){super(e,6)}},t.NotificationType7=class extends a{constructor(e){super(e,7)}},t.NotificationType8=class extends a{constructor(e){super(e,8)}},t.NotificationType9=class extends a{constructor(e){super(e,9)}},t.isRequestMessage=function(e){const t=e;return t&&i.string(t.method)&&(i.string(t.id)||i.number(t.id))},t.isNotificationMessage=function(e){const t=e;return t&&i.string(t.method)&&void 0===e.id},t.isResponseMessage=function(e){const t=e;return t&&(void 0!==t.result||!!t.error)&&(i.string(t.id)||i.number(t.id)||null===t.id)}},147:(e,t)=>{let n;function i(){if(void 0===n)throw new Error("No runtime abstraction layer installed");return n}Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.install=function(e){if(void 0===e)throw new Error("No runtime abstraction layer provided");n=e}}(i||(i={})),t.default=i},142:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Semaphore=void 0;const i=n(147);t.Semaphore=class{constructor(e=1){if(e<=0)throw new Error("Capacity must be greater than 0");this._capacity=e,this._active=0,this._waiting=[]}lock(e){return new Promise(((t,n)=>{this._waiting.push({thunk:e,resolve:t,reject:n}),this.runNext()}))}get active(){return this._active}runNext(){0!==this._waiting.length&&this._active!==this._capacity&&i.default().timer.setImmediate((()=>this.doRunNext()))}doRunNext(){if(0===this._waiting.length||this._active===this._capacity)return;const e=this._waiting.shift();if(this._active++,this._active>this._capacity)throw new Error("To many thunks active");try{const t=e.thunk();t instanceof Promise?t.then((t=>{this._active--,e.resolve(t),this.runNext()}),(t=>{this._active--,e.reject(t),this.runNext()})):(this._active--,e.resolve(t),this.runNext())}catch(t){this._active--,e.reject(t),this.runNext()}}}},4389:function(e,t,n){var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n),Object.defineProperty(e,i,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||i(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.createMessageConnection=t.createServerSocketTransport=t.createClientSocketTransport=t.createServerPipeTransport=t.createClientPipeTransport=t.generateRandomPipeName=t.StreamMessageWriter=t.StreamMessageReader=t.SocketMessageWriter=t.SocketMessageReader=t.IPCMessageWriter=t.IPCMessageReader=void 0;const o=n(3034);o.default.install();const s=n(3870),a=n(5622),c=n(2087),u=n(6417),l=n(1631);r(n(3870),t);class d extends s.AbstractMessageReader{constructor(e){super(),this.process=e;let t=this.process;t.on("error",(e=>this.fireError(e))),t.on("close",(()=>this.fireClose()))}listen(e){return this.process.on("message",e),s.Disposable.create((()=>this.process.off("message",e)))}}t.IPCMessageReader=d;class h extends s.AbstractMessageWriter{constructor(e){super(),this.process=e,this.errorCount=0;let t=this.process;t.on("error",(e=>this.fireError(e))),t.on("close",(()=>this.fireClose))}write(e){try{return"function"==typeof this.process.send&&this.process.send(e,void 0,void 0,(t=>{t?(this.errorCount++,this.handleError(t,e)):this.errorCount=0})),Promise.resolve()}catch(t){return this.handleError(t,e),Promise.reject(t)}}handleError(e,t){this.errorCount++,this.fireError(e,t,this.errorCount)}end(){}}t.IPCMessageWriter=h;class f extends s.ReadableStreamMessageReader{constructor(e,t="utf-8"){super(o.default().stream.asReadableStream(e),t)}}t.SocketMessageReader=f;class g extends s.WriteableStreamMessageWriter{constructor(e,t){super(o.default().stream.asWritableStream(e),t),this.socket=e}dispose(){super.dispose(),this.socket.destroy()}}t.SocketMessageWriter=g;class p extends s.ReadableStreamMessageReader{constructor(e,t){super(o.default().stream.asReadableStream(e),t)}}t.StreamMessageReader=p;class m extends s.WriteableStreamMessageWriter{constructor(e,t){super(o.default().stream.asWritableStream(e),t)}}t.StreamMessageWriter=m;const y=process.env.XDG_RUNTIME_DIR,v=new Map([["linux",107],["darwin",103]]);t.generateRandomPipeName=function(){const e=u.randomBytes(21).toString("hex");if("win32"===process.platform)return`\\\\.\\pipe\\vscode-jsonrpc-${e}-sock`;let t;t=y?a.join(y,`vscode-ipc-${e}.sock`):a.join(c.tmpdir(),`vscode-${e}.sock`);const n=v.get(process.platform);return void 0!==n&&t.length>=n&&o.default().console.warn(`WARNING: IPC handle "${t}" is longer than ${n} characters.`),t},t.createClientPipeTransport=function(e,t="utf-8"){let n;const i=new Promise(((e,t)=>{n=e}));return new Promise(((r,o)=>{let s=l.createServer((e=>{s.close(),n([new f(e,t),new g(e,t)])}));s.on("error",o),s.listen(e,(()=>{s.removeListener("error",o),r({onConnected:()=>i})}))}))},t.createServerPipeTransport=function(e,t="utf-8"){const n=l.createConnection(e);return[new f(n,t),new g(n,t)]},t.createClientSocketTransport=function(e,t="utf-8"){let n;const i=new Promise(((e,t)=>{n=e}));return new Promise(((r,o)=>{const s=l.createServer((e=>{s.close(),n([new f(e,t),new g(e,t)])}));s.on("error",o),s.listen(e,"127.0.0.1",(()=>{s.removeListener("error",o),r({onConnected:()=>i})}))}))},t.createServerSocketTransport=function(e,t="utf-8"){const n=l.createConnection(e,"127.0.0.1");return[new f(n,t),new g(n,t)]},t.createMessageConnection=function(e,t,n,i){n||(n=s.NullLogger);const r=function(e){const t=e;return void 0!==t.read&&void 0!==t.addListener}(e)?new p(e):e,o=function(e){const t=e;return void 0!==t.write&&void 0!==t.addListener}(t)?new m(t):t;return s.ConnectionStrategy.is(i)&&(i={connectionStrategy:i}),s.createMessageConnection(r,o,n,i)}},3034:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0});const i=n(147),r=n(1669),o=n(3911),s=n(5530);class a extends s.AbstractMessageBuffer{constructor(e="utf-8"){super(e)}emptyBuffer(){return a.emptyBuffer}fromString(e,t){return Buffer.from(e,t)}toString(e,t){return e instanceof Buffer?e.toString(t):new r.TextDecoder(t).decode(e)}asNative(e,t){return void 0===t?e instanceof Buffer?e:Buffer.from(e):e instanceof Buffer?e.slice(0,t):Buffer.from(e,0,t)}allocNative(e){return Buffer.allocUnsafe(e)}}a.emptyBuffer=Buffer.allocUnsafe(0);class c{constructor(e){this.stream=e}onClose(e){return this.stream.on("close",e),o.Disposable.create((()=>this.stream.off("close",e)))}onError(e){return this.stream.on("error",e),o.Disposable.create((()=>this.stream.off("error",e)))}onEnd(e){return this.stream.on("end",e),o.Disposable.create((()=>this.stream.off("end",e)))}onData(e){return this.stream.on("data",e),o.Disposable.create((()=>this.stream.off("data",e)))}}class u{constructor(e){this.stream=e}onClose(e){return this.stream.on("close",e),o.Disposable.create((()=>this.stream.off("close",e)))}onError(e){return this.stream.on("error",e),o.Disposable.create((()=>this.stream.off("error",e)))}onEnd(e){return this.stream.on("end",e),o.Disposable.create((()=>this.stream.off("end",e)))}write(e,t){return new Promise(((n,i)=>{const r=e=>{null==e?n():i(e)};"string"==typeof e?this.stream.write(e,t,r):this.stream.write(e,r)}))}end(){this.stream.end()}}const l=Object.freeze({messageBuffer:Object.freeze({create:e=>new a(e)}),applicationJson:Object.freeze({encoder:Object.freeze({name:"application/json",encode:(e,t)=>{try{return Promise.resolve(Buffer.from(JSON.stringify(e,void 0,0),t.charset))}catch(e){return Promise.reject(e)}}}),decoder:Object.freeze({name:"application/json",decode:(e,t)=>{try{return e instanceof Buffer?Promise.resolve(JSON.parse(e.toString(t.charset))):Promise.resolve(JSON.parse(new r.TextDecoder(t.charset).decode(e)))}catch(e){return Promise.reject(e)}}})}),stream:Object.freeze({asReadableStream:e=>new c(e),asWritableStream:e=>new u(e)}),console,timer:Object.freeze({setTimeout:(e,t,...n)=>setTimeout(e,t,...n),clearTimeout(e){clearTimeout(e)},setImmediate:(e,...t)=>setImmediate(e,...t),clearImmediate(e){clearImmediate(e)}})});function d(){return l}!function(e){e.install=function(){i.default.install(l)}}(d||(d={})),t.default=d},5028:(e,t,n)=>{e.exports=n(4389)},1661:function(e,t,n){var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n),Object.defineProperty(e,i,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||i(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.LSPErrorCodes=t.createProtocolConnection=void 0,r(n(4389),t),r(n(1674),t),r(n(6140),t),r(n(542),t);var o,s=n(3767);Object.defineProperty(t,"createProtocolConnection",{enumerable:!0,get:function(){return s.createProtocolConnection}}),(o=t.LSPErrorCodes||(t.LSPErrorCodes={})).lspReservedErrorRangeStart=-32899,o.ContentModified=-32801,o.RequestCancelled=-32800,o.lspReservedErrorRangeEnd=-32800},3767:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.createProtocolConnection=void 0;const i=n(4389);t.createProtocolConnection=function(e,t,n,r){return i.ConnectionStrategy.is(r)&&(r={connectionStrategy:r}),i.createMessageConnection(e,t,n,r)}},6140:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ProtocolNotificationType=t.ProtocolNotificationType0=t.ProtocolRequestType=t.ProtocolRequestType0=t.RegistrationType=void 0;const i=n(4389);t.RegistrationType=class{constructor(e){this.method=e}};class r extends i.RequestType0{constructor(e){super(e)}}t.ProtocolRequestType0=r;class o extends i.RequestType{constructor(e){super(e,i.ParameterStructures.byName)}}t.ProtocolRequestType=o;class s extends i.NotificationType0{constructor(e){super(e)}}t.ProtocolNotificationType0=s;class a extends i.NotificationType{constructor(e){super(e,i.ParameterStructures.byName)}}t.ProtocolNotificationType=a},2918:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CallHierarchyOutgoingCallsRequest=t.CallHierarchyIncomingCallsRequest=t.CallHierarchyPrepareRequest=void 0;const i=n(6140);var r,o,s;(s=t.CallHierarchyPrepareRequest||(t.CallHierarchyPrepareRequest={})).method="textDocument/prepareCallHierarchy",s.type=new i.ProtocolRequestType(s.method),(o=t.CallHierarchyIncomingCallsRequest||(t.CallHierarchyIncomingCallsRequest={})).method="callHierarchy/incomingCalls",o.type=new i.ProtocolRequestType(o.method),(r=t.CallHierarchyOutgoingCallsRequest||(t.CallHierarchyOutgoingCallsRequest={})).method="callHierarchy/outgoingCalls",r.type=new i.ProtocolRequestType(r.method)},3390:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ColorPresentationRequest=t.DocumentColorRequest=void 0;const i=n(6140);var r;(r=t.DocumentColorRequest||(t.DocumentColorRequest={})).method="textDocument/documentColor",r.type=new i.ProtocolRequestType(r.method),(t.ColorPresentationRequest||(t.ColorPresentationRequest={})).type=new i.ProtocolRequestType("textDocument/colorPresentation")},5934:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ConfigurationRequest=void 0;const i=n(6140);(t.ConfigurationRequest||(t.ConfigurationRequest={})).type=new i.ProtocolRequestType("workspace/configuration")},764:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DeclarationRequest=void 0;const i=n(6140);var r;(r=t.DeclarationRequest||(t.DeclarationRequest={})).method="textDocument/declaration",r.type=new i.ProtocolRequestType(r.method)},7846:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.WillDeleteFilesRequest=t.DidDeleteFilesNotification=t.DidRenameFilesNotification=t.WillRenameFilesRequest=t.DidCreateFilesNotification=t.WillCreateFilesRequest=t.FileOperationPatternKind=void 0;const i=n(6140);var r,o,s,a,c,u,l;(l=t.FileOperationPatternKind||(t.FileOperationPatternKind={})).file="file",l.folder="folder",(u=t.WillCreateFilesRequest||(t.WillCreateFilesRequest={})).method="workspace/willCreateFiles",u.type=new i.ProtocolRequestType(u.method),(c=t.DidCreateFilesNotification||(t.DidCreateFilesNotification={})).method="workspace/didCreateFiles",c.type=new i.ProtocolNotificationType(c.method),(a=t.WillRenameFilesRequest||(t.WillRenameFilesRequest={})).method="workspace/willRenameFiles",a.type=new i.ProtocolRequestType(a.method),(s=t.DidRenameFilesNotification||(t.DidRenameFilesNotification={})).method="workspace/didRenameFiles",s.type=new i.ProtocolNotificationType(s.method),(o=t.DidDeleteFilesNotification||(t.DidDeleteFilesNotification={})).method="workspace/didDeleteFiles",o.type=new i.ProtocolNotificationType(o.method),(r=t.WillDeleteFilesRequest||(t.WillDeleteFilesRequest={})).method="workspace/willDeleteFiles",r.type=new i.ProtocolRequestType(r.method)},3394:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.FoldingRangeRequest=t.FoldingRangeKind=void 0;const i=n(6140);var r,o;(o=t.FoldingRangeKind||(t.FoldingRangeKind={})).Comment="comment",o.Imports="imports",o.Region="region",(r=t.FoldingRangeRequest||(t.FoldingRangeRequest={})).method="textDocument/foldingRange",r.type=new i.ProtocolRequestType(r.method)},2122:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ImplementationRequest=void 0;const i=n(6140);var r;(r=t.ImplementationRequest||(t.ImplementationRequest={})).method="textDocument/implementation",r.type=new i.ProtocolRequestType(r.method)},542:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DocumentLinkRequest=t.CodeLensRefreshRequest=t.CodeLensResolveRequest=t.CodeLensRequest=t.WorkspaceSymbolRequest=t.CodeActionResolveRequest=t.CodeActionRequest=t.DocumentSymbolRequest=t.DocumentHighlightRequest=t.ReferencesRequest=t.DefinitionRequest=t.SignatureHelpRequest=t.SignatureHelpTriggerKind=t.HoverRequest=t.CompletionResolveRequest=t.CompletionRequest=t.CompletionTriggerKind=t.PublishDiagnosticsNotification=t.WatchKind=t.FileChangeType=t.DidChangeWatchedFilesNotification=t.WillSaveTextDocumentWaitUntilRequest=t.WillSaveTextDocumentNotification=t.TextDocumentSaveReason=t.DidSaveTextDocumentNotification=t.DidCloseTextDocumentNotification=t.DidChangeTextDocumentNotification=t.TextDocumentContentChangeEvent=t.DidOpenTextDocumentNotification=t.TextDocumentSyncKind=t.TelemetryEventNotification=t.LogMessageNotification=t.ShowMessageRequest=t.ShowMessageNotification=t.MessageType=t.DidChangeConfigurationNotification=t.ExitNotification=t.ShutdownRequest=t.InitializedNotification=t.InitializeError=t.InitializeRequest=t.WorkDoneProgressOptions=t.TextDocumentRegistrationOptions=t.StaticRegistrationOptions=t.FailureHandlingKind=t.ResourceOperationKind=t.UnregistrationRequest=t.RegistrationRequest=t.DocumentSelector=t.DocumentFilter=void 0,t.MonikerRequest=t.MonikerKind=t.UniquenessLevel=t.WillDeleteFilesRequest=t.DidDeleteFilesNotification=t.WillRenameFilesRequest=t.DidRenameFilesNotification=t.WillCreateFilesRequest=t.DidCreateFilesNotification=t.FileOperationPatternKind=t.LinkedEditingRangeRequest=t.ShowDocumentRequest=t.SemanticTokensRegistrationType=t.SemanticTokensRefreshRequest=t.SemanticTokensRangeRequest=t.SemanticTokensDeltaRequest=t.SemanticTokensRequest=t.TokenFormat=t.SemanticTokens=t.SemanticTokenModifiers=t.SemanticTokenTypes=t.CallHierarchyPrepareRequest=t.CallHierarchyOutgoingCallsRequest=t.CallHierarchyIncomingCallsRequest=t.WorkDoneProgressCancelNotification=t.WorkDoneProgressCreateRequest=t.WorkDoneProgress=t.SelectionRangeRequest=t.DeclarationRequest=t.FoldingRangeRequest=t.ColorPresentationRequest=t.DocumentColorRequest=t.ConfigurationRequest=t.DidChangeWorkspaceFoldersNotification=t.WorkspaceFoldersRequest=t.TypeDefinitionRequest=t.ImplementationRequest=t.ApplyWorkspaceEditRequest=t.ExecuteCommandRequest=t.PrepareRenameRequest=t.RenameRequest=t.PrepareSupportDefaultBehavior=t.DocumentOnTypeFormattingRequest=t.DocumentRangeFormattingRequest=t.DocumentFormattingRequest=t.DocumentLinkResolveRequest=void 0;const i=n(9533),r=n(6140),o=n(2122);Object.defineProperty(t,"ImplementationRequest",{enumerable:!0,get:function(){return o.ImplementationRequest}});const s=n(1589);Object.defineProperty(t,"TypeDefinitionRequest",{enumerable:!0,get:function(){return s.TypeDefinitionRequest}});const a=n(9795);Object.defineProperty(t,"WorkspaceFoldersRequest",{enumerable:!0,get:function(){return a.WorkspaceFoldersRequest}}),Object.defineProperty(t,"DidChangeWorkspaceFoldersNotification",{enumerable:!0,get:function(){return a.DidChangeWorkspaceFoldersNotification}});const c=n(5934);Object.defineProperty(t,"ConfigurationRequest",{enumerable:!0,get:function(){return c.ConfigurationRequest}});const u=n(3390);Object.defineProperty(t,"DocumentColorRequest",{enumerable:!0,get:function(){return u.DocumentColorRequest}}),Object.defineProperty(t,"ColorPresentationRequest",{enumerable:!0,get:function(){return u.ColorPresentationRequest}});const l=n(3394);Object.defineProperty(t,"FoldingRangeRequest",{enumerable:!0,get:function(){return l.FoldingRangeRequest}});const d=n(764);Object.defineProperty(t,"DeclarationRequest",{enumerable:!0,get:function(){return d.DeclarationRequest}});const h=n(5206);Object.defineProperty(t,"SelectionRangeRequest",{enumerable:!0,get:function(){return h.SelectionRangeRequest}});const f=n(1862);Object.defineProperty(t,"WorkDoneProgress",{enumerable:!0,get:function(){return f.WorkDoneProgress}}),Object.defineProperty(t,"WorkDoneProgressCreateRequest",{enumerable:!0,get:function(){return f.WorkDoneProgressCreateRequest}}),Object.defineProperty(t,"WorkDoneProgressCancelNotification",{enumerable:!0,get:function(){return f.WorkDoneProgressCancelNotification}});const g=n(2918);Object.defineProperty(t,"CallHierarchyIncomingCallsRequest",{enumerable:!0,get:function(){return g.CallHierarchyIncomingCallsRequest}}),Object.defineProperty(t,"CallHierarchyOutgoingCallsRequest",{enumerable:!0,get:function(){return g.CallHierarchyOutgoingCallsRequest}}),Object.defineProperty(t,"CallHierarchyPrepareRequest",{enumerable:!0,get:function(){return g.CallHierarchyPrepareRequest}});const p=n(9434);Object.defineProperty(t,"SemanticTokenTypes",{enumerable:!0,get:function(){return p.SemanticTokenTypes}}),Object.defineProperty(t,"SemanticTokenModifiers",{enumerable:!0,get:function(){return p.SemanticTokenModifiers}}),Object.defineProperty(t,"SemanticTokens",{enumerable:!0,get:function(){return p.SemanticTokens}}),Object.defineProperty(t,"TokenFormat",{enumerable:!0,get:function(){return p.TokenFormat}}),Object.defineProperty(t,"SemanticTokensRequest",{enumerable:!0,get:function(){return p.SemanticTokensRequest}}),Object.defineProperty(t,"SemanticTokensDeltaRequest",{enumerable:!0,get:function(){return p.SemanticTokensDeltaRequest}}),Object.defineProperty(t,"SemanticTokensRangeRequest",{enumerable:!0,get:function(){return p.SemanticTokensRangeRequest}}),Object.defineProperty(t,"SemanticTokensRefreshRequest",{enumerable:!0,get:function(){return p.SemanticTokensRefreshRequest}}),Object.defineProperty(t,"SemanticTokensRegistrationType",{enumerable:!0,get:function(){return p.SemanticTokensRegistrationType}});const m=n(5726);Object.defineProperty(t,"ShowDocumentRequest",{enumerable:!0,get:function(){return m.ShowDocumentRequest}});const y=n(6305);Object.defineProperty(t,"LinkedEditingRangeRequest",{enumerable:!0,get:function(){return y.LinkedEditingRangeRequest}});const v=n(7846);Object.defineProperty(t,"FileOperationPatternKind",{enumerable:!0,get:function(){return v.FileOperationPatternKind}}),Object.defineProperty(t,"DidCreateFilesNotification",{enumerable:!0,get:function(){return v.DidCreateFilesNotification}}),Object.defineProperty(t,"WillCreateFilesRequest",{enumerable:!0,get:function(){return v.WillCreateFilesRequest}}),Object.defineProperty(t,"DidRenameFilesNotification",{enumerable:!0,get:function(){return v.DidRenameFilesNotification}}),Object.defineProperty(t,"WillRenameFilesRequest",{enumerable:!0,get:function(){return v.WillRenameFilesRequest}}),Object.defineProperty(t,"DidDeleteFilesNotification",{enumerable:!0,get:function(){return v.DidDeleteFilesNotification}}),Object.defineProperty(t,"WillDeleteFilesRequest",{enumerable:!0,get:function(){return v.WillDeleteFilesRequest}});const _=n(3443);var b,R,w,C,T,S,k,x,P,D,q,E,O,N,M,j,F,A,L,I,W,$,H,U,z,B,K,V,J,G,X,Q,Y,Z,ee,te,ne,ie,re,oe;Object.defineProperty(t,"UniquenessLevel",{enumerable:!0,get:function(){return _.UniquenessLevel}}),Object.defineProperty(t,"MonikerKind",{enumerable:!0,get:function(){return _.MonikerKind}}),Object.defineProperty(t,"MonikerRequest",{enumerable:!0,get:function(){return _.MonikerRequest}}),function(e){e.is=function(e){const t=e;return i.string(t.language)||i.string(t.scheme)||i.string(t.pattern)}}(b=t.DocumentFilter||(t.DocumentFilter={})),function(e){e.is=function(e){if(!Array.isArray(e))return!1;for(let t of e)if(!i.string(t)&&!b.is(t))return!1;return!0}}(R=t.DocumentSelector||(t.DocumentSelector={})),(t.RegistrationRequest||(t.RegistrationRequest={})).type=new r.ProtocolRequestType("client/registerCapability"),(t.UnregistrationRequest||(t.UnregistrationRequest={})).type=new r.ProtocolRequestType("client/unregisterCapability"),(oe=t.ResourceOperationKind||(t.ResourceOperationKind={})).Create="create",oe.Rename="rename",oe.Delete="delete",(re=t.FailureHandlingKind||(t.FailureHandlingKind={})).Abort="abort",re.Transactional="transactional",re.TextOnlyTransactional="textOnlyTransactional",re.Undo="undo",(t.StaticRegistrationOptions||(t.StaticRegistrationOptions={})).hasId=function(e){const t=e;return t&&i.string(t.id)&&t.id.length>0},(t.TextDocumentRegistrationOptions||(t.TextDocumentRegistrationOptions={})).is=function(e){const t=e;return t&&(null===t.documentSelector||R.is(t.documentSelector))},(ie=t.WorkDoneProgressOptions||(t.WorkDoneProgressOptions={})).is=function(e){const t=e;return i.objectLiteral(t)&&(void 0===t.workDoneProgress||i.boolean(t.workDoneProgress))},ie.hasWorkDoneProgress=function(e){const t=e;return t&&i.boolean(t.workDoneProgress)},(t.InitializeRequest||(t.InitializeRequest={})).type=new r.ProtocolRequestType("initialize"),(t.InitializeError||(t.InitializeError={})).unknownProtocolVersion=1,(t.InitializedNotification||(t.InitializedNotification={})).type=new r.ProtocolNotificationType("initialized"),(t.ShutdownRequest||(t.ShutdownRequest={})).type=new r.ProtocolRequestType0("shutdown"),(t.ExitNotification||(t.ExitNotification={})).type=new r.ProtocolNotificationType0("exit"),(t.DidChangeConfigurationNotification||(t.DidChangeConfigurationNotification={})).type=new r.ProtocolNotificationType("workspace/didChangeConfiguration"),(ne=t.MessageType||(t.MessageType={})).Error=1,ne.Warning=2,ne.Info=3,ne.Log=4,(t.ShowMessageNotification||(t.ShowMessageNotification={})).type=new r.ProtocolNotificationType("window/showMessage"),(t.ShowMessageRequest||(t.ShowMessageRequest={})).type=new r.ProtocolRequestType("window/showMessageRequest"),(t.LogMessageNotification||(t.LogMessageNotification={})).type=new r.ProtocolNotificationType("window/logMessage"),(t.TelemetryEventNotification||(t.TelemetryEventNotification={})).type=new r.ProtocolNotificationType("telemetry/event"),(te=t.TextDocumentSyncKind||(t.TextDocumentSyncKind={})).None=0,te.Full=1,te.Incremental=2,(ee=t.DidOpenTextDocumentNotification||(t.DidOpenTextDocumentNotification={})).method="textDocument/didOpen",ee.type=new r.ProtocolNotificationType(ee.method),(Z=t.TextDocumentContentChangeEvent||(t.TextDocumentContentChangeEvent={})).isIncremental=function(e){let t=e;return null!=t&&"string"==typeof t.text&&void 0!==t.range&&(void 0===t.rangeLength||"number"==typeof t.rangeLength)},Z.isFull=function(e){let t=e;return null!=t&&"string"==typeof t.text&&void 0===t.range&&void 0===t.rangeLength},(Y=t.DidChangeTextDocumentNotification||(t.DidChangeTextDocumentNotification={})).method="textDocument/didChange",Y.type=new r.ProtocolNotificationType(Y.method),(Q=t.DidCloseTextDocumentNotification||(t.DidCloseTextDocumentNotification={})).method="textDocument/didClose",Q.type=new r.ProtocolNotificationType(Q.method),(X=t.DidSaveTextDocumentNotification||(t.DidSaveTextDocumentNotification={})).method="textDocument/didSave",X.type=new r.ProtocolNotificationType(X.method),(G=t.TextDocumentSaveReason||(t.TextDocumentSaveReason={})).Manual=1,G.AfterDelay=2,G.FocusOut=3,(J=t.WillSaveTextDocumentNotification||(t.WillSaveTextDocumentNotification={})).method="textDocument/willSave",J.type=new r.ProtocolNotificationType(J.method),(V=t.WillSaveTextDocumentWaitUntilRequest||(t.WillSaveTextDocumentWaitUntilRequest={})).method="textDocument/willSaveWaitUntil",V.type=new r.ProtocolRequestType(V.method),(t.DidChangeWatchedFilesNotification||(t.DidChangeWatchedFilesNotification={})).type=new r.ProtocolNotificationType("workspace/didChangeWatchedFiles"),(K=t.FileChangeType||(t.FileChangeType={})).Created=1,K.Changed=2,K.Deleted=3,(B=t.WatchKind||(t.WatchKind={})).Create=1,B.Change=2,B.Delete=4,(t.PublishDiagnosticsNotification||(t.PublishDiagnosticsNotification={})).type=new r.ProtocolNotificationType("textDocument/publishDiagnostics"),(z=t.CompletionTriggerKind||(t.CompletionTriggerKind={})).Invoked=1,z.TriggerCharacter=2,z.TriggerForIncompleteCompletions=3,(U=t.CompletionRequest||(t.CompletionRequest={})).method="textDocument/completion",U.type=new r.ProtocolRequestType(U.method),(H=t.CompletionResolveRequest||(t.CompletionResolveRequest={})).method="completionItem/resolve",H.type=new r.ProtocolRequestType(H.method),($=t.HoverRequest||(t.HoverRequest={})).method="textDocument/hover",$.type=new r.ProtocolRequestType($.method),(W=t.SignatureHelpTriggerKind||(t.SignatureHelpTriggerKind={})).Invoked=1,W.TriggerCharacter=2,W.ContentChange=3,(I=t.SignatureHelpRequest||(t.SignatureHelpRequest={})).method="textDocument/signatureHelp",I.type=new r.ProtocolRequestType(I.method),(L=t.DefinitionRequest||(t.DefinitionRequest={})).method="textDocument/definition",L.type=new r.ProtocolRequestType(L.method),(A=t.ReferencesRequest||(t.ReferencesRequest={})).method="textDocument/references",A.type=new r.ProtocolRequestType(A.method),(F=t.DocumentHighlightRequest||(t.DocumentHighlightRequest={})).method="textDocument/documentHighlight",F.type=new r.ProtocolRequestType(F.method),(j=t.DocumentSymbolRequest||(t.DocumentSymbolRequest={})).method="textDocument/documentSymbol",j.type=new r.ProtocolRequestType(j.method),(M=t.CodeActionRequest||(t.CodeActionRequest={})).method="textDocument/codeAction",M.type=new r.ProtocolRequestType(M.method),(N=t.CodeActionResolveRequest||(t.CodeActionResolveRequest={})).method="codeAction/resolve",N.type=new r.ProtocolRequestType(N.method),(O=t.WorkspaceSymbolRequest||(t.WorkspaceSymbolRequest={})).method="workspace/symbol",O.type=new r.ProtocolRequestType(O.method),(E=t.CodeLensRequest||(t.CodeLensRequest={})).method="textDocument/codeLens",E.type=new r.ProtocolRequestType(E.method),(q=t.CodeLensResolveRequest||(t.CodeLensResolveRequest={})).method="codeLens/resolve",q.type=new r.ProtocolRequestType(q.method),(D=t.CodeLensRefreshRequest||(t.CodeLensRefreshRequest={})).method="workspace/codeLens/refresh",D.type=new r.ProtocolRequestType0(D.method),(P=t.DocumentLinkRequest||(t.DocumentLinkRequest={})).method="textDocument/documentLink",P.type=new r.ProtocolRequestType(P.method),(x=t.DocumentLinkResolveRequest||(t.DocumentLinkResolveRequest={})).method="documentLink/resolve",x.type=new r.ProtocolRequestType(x.method),(k=t.DocumentFormattingRequest||(t.DocumentFormattingRequest={})).method="textDocument/formatting",k.type=new r.ProtocolRequestType(k.method),(S=t.DocumentRangeFormattingRequest||(t.DocumentRangeFormattingRequest={})).method="textDocument/rangeFormatting",S.type=new r.ProtocolRequestType(S.method),(T=t.DocumentOnTypeFormattingRequest||(t.DocumentOnTypeFormattingRequest={})).method="textDocument/onTypeFormatting",T.type=new r.ProtocolRequestType(T.method),(t.PrepareSupportDefaultBehavior||(t.PrepareSupportDefaultBehavior={})).Identifier=1,(C=t.RenameRequest||(t.RenameRequest={})).method="textDocument/rename",C.type=new r.ProtocolRequestType(C.method),(w=t.PrepareRenameRequest||(t.PrepareRenameRequest={})).method="textDocument/prepareRename",w.type=new r.ProtocolRequestType(w.method),(t.ExecuteCommandRequest||(t.ExecuteCommandRequest={})).type=new r.ProtocolRequestType("workspace/executeCommand"),(t.ApplyWorkspaceEditRequest||(t.ApplyWorkspaceEditRequest={})).type=new r.ProtocolRequestType("workspace/applyEdit")},6305:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.LinkedEditingRangeRequest=void 0;const i=n(6140);var r;(r=t.LinkedEditingRangeRequest||(t.LinkedEditingRangeRequest={})).method="textDocument/linkedEditingRange",r.type=new i.ProtocolRequestType(r.method)},3443:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.MonikerRequest=t.MonikerKind=t.UniquenessLevel=void 0;const i=n(6140);var r,o,s;(s=t.UniquenessLevel||(t.UniquenessLevel={})).document="document",s.project="project",s.group="group",s.scheme="scheme",s.global="global",(o=t.MonikerKind||(t.MonikerKind={})).import="import",o.export="export",o.local="local",(r=t.MonikerRequest||(t.MonikerRequest={})).method="textDocument/moniker",r.type=new i.ProtocolRequestType(r.method)},1862:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.WorkDoneProgressCancelNotification=t.WorkDoneProgressCreateRequest=t.WorkDoneProgress=void 0;const i=n(4389),r=n(6140);var o;(o=t.WorkDoneProgress||(t.WorkDoneProgress={})).type=new i.ProgressType,o.is=function(e){return e===o.type},(t.WorkDoneProgressCreateRequest||(t.WorkDoneProgressCreateRequest={})).type=new r.ProtocolRequestType("window/workDoneProgress/create"),(t.WorkDoneProgressCancelNotification||(t.WorkDoneProgressCancelNotification={})).type=new r.ProtocolNotificationType("window/workDoneProgress/cancel")},5206:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SelectionRangeRequest=void 0;const i=n(6140);var r;(r=t.SelectionRangeRequest||(t.SelectionRangeRequest={})).method="textDocument/selectionRange",r.type=new i.ProtocolRequestType(r.method)},9434:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SemanticTokensRefreshRequest=t.SemanticTokensRangeRequest=t.SemanticTokensDeltaRequest=t.SemanticTokensRequest=t.SemanticTokensRegistrationType=t.TokenFormat=t.SemanticTokens=t.SemanticTokenModifiers=t.SemanticTokenTypes=void 0;const i=n(6140);var r,o,s,a,c,u,l;(l=t.SemanticTokenTypes||(t.SemanticTokenTypes={})).namespace="namespace",l.type="type",l.class="class",l.enum="enum",l.interface="interface",l.struct="struct",l.typeParameter="typeParameter",l.parameter="parameter",l.variable="variable",l.property="property",l.enumMember="enumMember",l.event="event",l.function="function",l.method="method",l.macro="macro",l.keyword="keyword",l.modifier="modifier",l.comment="comment",l.string="string",l.number="number",l.regexp="regexp",l.operator="operator",(u=t.SemanticTokenModifiers||(t.SemanticTokenModifiers={})).declaration="declaration",u.definition="definition",u.readonly="readonly",u.static="static",u.deprecated="deprecated",u.abstract="abstract",u.async="async",u.modification="modification",u.documentation="documentation",u.defaultLibrary="defaultLibrary",(t.SemanticTokens||(t.SemanticTokens={})).is=function(e){const t=e;return void 0!==t&&(void 0===t.resultId||"string"==typeof t.resultId)&&Array.isArray(t.data)&&(0===t.data.length||"number"==typeof t.data[0])},(t.TokenFormat||(t.TokenFormat={})).Relative="relative",(c=t.SemanticTokensRegistrationType||(t.SemanticTokensRegistrationType={})).method="textDocument/semanticTokens",c.type=new i.RegistrationType(c.method),(a=t.SemanticTokensRequest||(t.SemanticTokensRequest={})).method="textDocument/semanticTokens/full",a.type=new i.ProtocolRequestType(a.method),(s=t.SemanticTokensDeltaRequest||(t.SemanticTokensDeltaRequest={})).method="textDocument/semanticTokens/full/delta",s.type=new i.ProtocolRequestType(s.method),(o=t.SemanticTokensRangeRequest||(t.SemanticTokensRangeRequest={})).method="textDocument/semanticTokens/range",o.type=new i.ProtocolRequestType(o.method),(r=t.SemanticTokensRefreshRequest||(t.SemanticTokensRefreshRequest={})).method="workspace/semanticTokens/refresh",r.type=new i.ProtocolRequestType0(r.method)},5726:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ShowDocumentRequest=void 0;const i=n(6140);var r;(r=t.ShowDocumentRequest||(t.ShowDocumentRequest={})).method="window/showDocument",r.type=new i.ProtocolRequestType(r.method)},1589:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TypeDefinitionRequest=void 0;const i=n(6140);var r;(r=t.TypeDefinitionRequest||(t.TypeDefinitionRequest={})).method="textDocument/typeDefinition",r.type=new i.ProtocolRequestType(r.method)},9795:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DidChangeWorkspaceFoldersNotification=t.WorkspaceFoldersRequest=void 0;const i=n(6140);(t.WorkspaceFoldersRequest||(t.WorkspaceFoldersRequest={})).type=new i.ProtocolRequestType0("workspace/workspaceFolders"),(t.DidChangeWorkspaceFoldersNotification||(t.DidChangeWorkspaceFoldersNotification={})).type=new i.ProtocolNotificationType("workspace/didChangeWorkspaceFolders")},9533:(e,t)=>{function n(e){return"string"==typeof e||e instanceof String}function i(e){return Array.isArray(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.objectLiteral=t.typedArray=t.stringArray=t.array=t.func=t.error=t.number=t.string=t.boolean=void 0,t.boolean=function(e){return!0===e||!1===e},t.string=n,t.number=function(e){return"number"==typeof e||e instanceof Number},t.error=function(e){return e instanceof Error},t.func=function(e){return"function"==typeof e},t.array=i,t.stringArray=function(e){return i(e)&&e.every((e=>n(e)))},t.typedArray=function(e,t){return Array.isArray(e)&&e.every(t)},t.objectLiteral=function(e){return null!==e&&"object"==typeof e}},273:function(e,t,n){var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n),Object.defineProperty(e,i,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||i(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.createProtocolConnection=void 0;const o=n(5028);r(n(5028),t),r(n(1661),t),t.createProtocolConnection=function(e,t,n,i){return o.createMessageConnection(e,t,n,i)}},6560:(e,t,n)=>{e.exports=n(273)},6813:(e,t,n)=>{n.r(t),n.d(t,{TextDocument:()=>i});var i,r=function(){function e(e,t,n,i){this._uri=e,this._languageId=t,this._version=n,this._content=i,this._lineOffsets=void 0}return Object.defineProperty(e.prototype,"uri",{get:function(){return this._uri},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"languageId",{get:function(){return this._languageId},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"version",{get:function(){return this._version},enumerable:!0,configurable:!0}),e.prototype.getText=function(e){if(e){var t=this.offsetAt(e.start),n=this.offsetAt(e.end);return this._content.substring(t,n)}return this._content},e.prototype.update=function(t,n){for(var i=0,r=t;i<r.length;i++){var o=r[i];if(e.isIncremental(o)){var c=a(o.range),u=this.offsetAt(c.start),l=this.offsetAt(c.end);this._content=this._content.substring(0,u)+o.text+this._content.substring(l,this._content.length);var d=Math.max(c.start.line,0),h=Math.max(c.end.line,0),f=this._lineOffsets,g=s(o.text,!1,u);if(h-d===g.length)for(var p=0,m=g.length;p<m;p++)f[p+d+1]=g[p];else g.length<1e4?f.splice.apply(f,[d+1,h-d].concat(g)):this._lineOffsets=f=f.slice(0,d+1).concat(g,f.slice(h+1));var y=o.text.length-(l-u);if(0!==y)for(p=d+1+g.length,m=f.length;p<m;p++)f[p]=f[p]+y}else{if(!e.isFull(o))throw new Error("Unknown change event received");this._content=o.text,this._lineOffsets=void 0}}this._version=n},e.prototype.getLineOffsets=function(){return void 0===this._lineOffsets&&(this._lineOffsets=s(this._content,!0)),this._lineOffsets},e.prototype.positionAt=function(e){e=Math.max(Math.min(e,this._content.length),0);var t=this.getLineOffsets(),n=0,i=t.length;if(0===i)return{line:0,character:e};for(;n<i;){var r=Math.floor((n+i)/2);t[r]>e?i=r:n=r+1}var o=n-1;return{line:o,character:e-t[o]}},e.prototype.offsetAt=function(e){var t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;var n=t[e.line],i=e.line+1<t.length?t[e.line+1]:this._content.length;return Math.max(Math.min(n+e.character,i),n)},Object.defineProperty(e.prototype,"lineCount",{get:function(){return this.getLineOffsets().length},enumerable:!0,configurable:!0}),e.isIncremental=function(e){var t=e;return null!=t&&"string"==typeof t.text&&void 0!==t.range&&(void 0===t.rangeLength||"number"==typeof t.rangeLength)},e.isFull=function(e){var t=e;return null!=t&&"string"==typeof t.text&&void 0===t.range&&void 0===t.rangeLength},e}();function o(e,t){if(e.length<=1)return e;var n=e.length/2|0,i=e.slice(0,n),r=e.slice(n);o(i,t),o(r,t);for(var s=0,a=0,c=0;s<i.length&&a<r.length;){var u=t(i[s],r[a]);e[c++]=u<=0?i[s++]:r[a++]}for(;s<i.length;)e[c++]=i[s++];for(;a<r.length;)e[c++]=r[a++];return e}function s(e,t,n){void 0===n&&(n=0);for(var i=t?[n]:[],r=0;r<e.length;r++){var o=e.charCodeAt(r);13!==o&&10!==o||(13===o&&r+1<e.length&&10===e.charCodeAt(r+1)&&r++,i.push(n+r+1))}return i}function a(e){var t=e.start,n=e.end;return t.line>n.line||t.line===n.line&&t.character>n.character?{start:n,end:t}:e}function c(e){var t=a(e.range);return t!==e.range?{newText:e.newText,range:t}:e}!function(e){e.create=function(e,t,n,i){return new r(e,t,n,i)},e.update=function(e,t,n){if(e instanceof r)return e.update(t,n),e;throw new Error("TextDocument.update: document must be created by TextDocument.create")},e.applyEdits=function(e,t){for(var n=e.getText(),i=0,r=[],s=0,a=o(t.map(c),(function(e,t){var n=e.range.start.line-t.range.start.line;return 0===n?e.range.start.character-t.range.start.character:n}));s<a.length;s++){var u=a[s],l=e.offsetAt(u.range.start);if(l<i)throw new Error("Overlapping edit");l>i&&r.push(n.substring(i,l)),u.newText.length&&r.push(u.newText),i=e.offsetAt(u.range.end)}return r.push(n.substr(i)),r.join("")}}(i||(i={}))},1674:(e,t,n)=>{var i,r,o,s,a,c,u,l,d,h,f,g,p,m,y,v,_,b,R,w,C,T,S,k,x,P;n.r(t),n.d(t,{integer:()=>i,uinteger:()=>r,Position:()=>o,Range:()=>s,Location:()=>a,LocationLink:()=>c,Color:()=>u,ColorInformation:()=>l,ColorPresentation:()=>d,FoldingRangeKind:()=>h,FoldingRange:()=>f,DiagnosticRelatedInformation:()=>g,DiagnosticSeverity:()=>p,DiagnosticTag:()=>m,CodeDescription:()=>y,Diagnostic:()=>v,Command:()=>_,TextEdit:()=>b,ChangeAnnotation:()=>R,ChangeAnnotationIdentifier:()=>w,AnnotatedTextEdit:()=>C,TextDocumentEdit:()=>T,CreateFile:()=>S,RenameFile:()=>k,DeleteFile:()=>x,WorkspaceEdit:()=>P,WorkspaceChange:()=>ae,TextDocumentIdentifier:()=>D,VersionedTextDocumentIdentifier:()=>q,OptionalVersionedTextDocumentIdentifier:()=>E,TextDocumentItem:()=>O,MarkupKind:()=>N,MarkupContent:()=>M,CompletionItemKind:()=>j,InsertTextFormat:()=>F,CompletionItemTag:()=>A,InsertReplaceEdit:()=>L,InsertTextMode:()=>I,CompletionItem:()=>W,CompletionList:()=>$,MarkedString:()=>H,Hover:()=>U,ParameterInformation:()=>z,SignatureInformation:()=>B,DocumentHighlightKind:()=>K,DocumentHighlight:()=>V,SymbolKind:()=>J,SymbolTag:()=>G,SymbolInformation:()=>X,DocumentSymbol:()=>Q,CodeActionKind:()=>Y,CodeActionContext:()=>Z,CodeAction:()=>ee,CodeLens:()=>te,FormattingOptions:()=>ne,DocumentLink:()=>ie,SelectionRange:()=>re,EOL:()=>ue,TextDocument:()=>ce}),function(e){e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647}(i||(i={})),function(e){e.MIN_VALUE=0,e.MAX_VALUE=2147483647}(r||(r={})),function(e){e.create=function(e,t){return e===Number.MAX_VALUE&&(e=r.MAX_VALUE),t===Number.MAX_VALUE&&(t=r.MAX_VALUE),{line:e,character:t}},e.is=function(e){var t=e;return le.objectLiteral(t)&&le.uinteger(t.line)&&le.uinteger(t.character)}}(o||(o={})),function(e){e.create=function(e,t,n,i){if(le.uinteger(e)&&le.uinteger(t)&&le.uinteger(n)&&le.uinteger(i))return{start:o.create(e,t),end:o.create(n,i)};if(o.is(e)&&o.is(t))return{start:e,end:t};throw new Error("Range#create called with invalid arguments["+e+", "+t+", "+n+", "+i+"]")},e.is=function(e){var t=e;return le.objectLiteral(t)&&o.is(t.start)&&o.is(t.end)}}(s||(s={})),function(e){e.create=function(e,t){return{uri:e,range:t}},e.is=function(e){var t=e;return le.defined(t)&&s.is(t.range)&&(le.string(t.uri)||le.undefined(t.uri))}}(a||(a={})),function(e){e.create=function(e,t,n,i){return{targetUri:e,targetRange:t,targetSelectionRange:n,originSelectionRange:i}},e.is=function(e){var t=e;return le.defined(t)&&s.is(t.targetRange)&&le.string(t.targetUri)&&(s.is(t.targetSelectionRange)||le.undefined(t.targetSelectionRange))&&(s.is(t.originSelectionRange)||le.undefined(t.originSelectionRange))}}(c||(c={})),function(e){e.create=function(e,t,n,i){return{red:e,green:t,blue:n,alpha:i}},e.is=function(e){var t=e;return le.numberRange(t.red,0,1)&&le.numberRange(t.green,0,1)&&le.numberRange(t.blue,0,1)&&le.numberRange(t.alpha,0,1)}}(u||(u={})),function(e){e.create=function(e,t){return{range:e,color:t}},e.is=function(e){var t=e;return s.is(t.range)&&u.is(t.color)}}(l||(l={})),function(e){e.create=function(e,t,n){return{label:e,textEdit:t,additionalTextEdits:n}},e.is=function(e){var t=e;return le.string(t.label)&&(le.undefined(t.textEdit)||b.is(t))&&(le.undefined(t.additionalTextEdits)||le.typedArray(t.additionalTextEdits,b.is))}}(d||(d={})),function(e){e.Comment="comment",e.Imports="imports",e.Region="region"}(h||(h={})),function(e){e.create=function(e,t,n,i,r){var o={startLine:e,endLine:t};return le.defined(n)&&(o.startCharacter=n),le.defined(i)&&(o.endCharacter=i),le.defined(r)&&(o.kind=r),o},e.is=function(e){var t=e;return le.uinteger(t.startLine)&&le.uinteger(t.startLine)&&(le.undefined(t.startCharacter)||le.uinteger(t.startCharacter))&&(le.undefined(t.endCharacter)||le.uinteger(t.endCharacter))&&(le.undefined(t.kind)||le.string(t.kind))}}(f||(f={})),function(e){e.create=function(e,t){return{location:e,message:t}},e.is=function(e){var t=e;return le.defined(t)&&a.is(t.location)&&le.string(t.message)}}(g||(g={})),function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4}(p||(p={})),function(e){e.Unnecessary=1,e.Deprecated=2}(m||(m={})),function(e){e.is=function(e){var t=e;return null!=t&&le.string(t.href)}}(y||(y={})),function(e){e.create=function(e,t,n,i,r,o){var s={range:e,message:t};return le.defined(n)&&(s.severity=n),le.defined(i)&&(s.code=i),le.defined(r)&&(s.source=r),le.defined(o)&&(s.relatedInformation=o),s},e.is=function(e){var t,n=e;return le.defined(n)&&s.is(n.range)&&le.string(n.message)&&(le.number(n.severity)||le.undefined(n.severity))&&(le.integer(n.code)||le.string(n.code)||le.undefined(n.code))&&(le.undefined(n.codeDescription)||le.string(null===(t=n.codeDescription)||void 0===t?void 0:t.href))&&(le.string(n.source)||le.undefined(n.source))&&(le.undefined(n.relatedInformation)||le.typedArray(n.relatedInformation,g.is))}}(v||(v={})),function(e){e.create=function(e,t){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];var r={title:e,command:t};return le.defined(n)&&n.length>0&&(r.arguments=n),r},e.is=function(e){var t=e;return le.defined(t)&&le.string(t.title)&&le.string(t.command)}}(_||(_={})),function(e){e.replace=function(e,t){return{range:e,newText:t}},e.insert=function(e,t){return{range:{start:e,end:e},newText:t}},e.del=function(e){return{range:e,newText:""}},e.is=function(e){var t=e;return le.objectLiteral(t)&&le.string(t.newText)&&s.is(t.range)}}(b||(b={})),function(e){e.create=function(e,t,n){var i={label:e};return void 0!==t&&(i.needsConfirmation=t),void 0!==n&&(i.description=n),i},e.is=function(e){var t=e;return void 0!==t&&le.objectLiteral(t)&&le.string(t.label)&&(le.boolean(t.needsConfirmation)||void 0===t.needsConfirmation)&&(le.string(t.description)||void 0===t.description)}}(R||(R={})),function(e){e.is=function(e){return"string"==typeof e}}(w||(w={})),function(e){e.replace=function(e,t,n){return{range:e,newText:t,annotationId:n}},e.insert=function(e,t,n){return{range:{start:e,end:e},newText:t,annotationId:n}},e.del=function(e,t){return{range:e,newText:"",annotationId:t}},e.is=function(e){var t=e;return b.is(t)&&(R.is(t.annotationId)||w.is(t.annotationId))}}(C||(C={})),function(e){e.create=function(e,t){return{textDocument:e,edits:t}},e.is=function(e){var t=e;return le.defined(t)&&E.is(t.textDocument)&&Array.isArray(t.edits)}}(T||(T={})),function(e){e.create=function(e,t,n){var i={kind:"create",uri:e};return void 0===t||void 0===t.overwrite&&void 0===t.ignoreIfExists||(i.options=t),void 0!==n&&(i.annotationId=n),i},e.is=function(e){var t=e;return t&&"create"===t.kind&&le.string(t.uri)&&(void 0===t.options||(void 0===t.options.overwrite||le.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||le.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||w.is(t.annotationId))}}(S||(S={})),function(e){e.create=function(e,t,n,i){var r={kind:"rename",oldUri:e,newUri:t};return void 0===n||void 0===n.overwrite&&void 0===n.ignoreIfExists||(r.options=n),void 0!==i&&(r.annotationId=i),r},e.is=function(e){var t=e;return t&&"rename"===t.kind&&le.string(t.oldUri)&&le.string(t.newUri)&&(void 0===t.options||(void 0===t.options.overwrite||le.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||le.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||w.is(t.annotationId))}}(k||(k={})),function(e){e.create=function(e,t,n){var i={kind:"delete",uri:e};return void 0===t||void 0===t.recursive&&void 0===t.ignoreIfNotExists||(i.options=t),void 0!==n&&(i.annotationId=n),i},e.is=function(e){var t=e;return t&&"delete"===t.kind&&le.string(t.uri)&&(void 0===t.options||(void 0===t.options.recursive||le.boolean(t.options.recursive))&&(void 0===t.options.ignoreIfNotExists||le.boolean(t.options.ignoreIfNotExists)))&&(void 0===t.annotationId||w.is(t.annotationId))}}(x||(x={})),function(e){e.is=function(e){var t=e;return t&&(void 0!==t.changes||void 0!==t.documentChanges)&&(void 0===t.documentChanges||t.documentChanges.every((function(e){return le.string(e.kind)?S.is(e)||k.is(e)||x.is(e):T.is(e)})))}}(P||(P={}));var D,q,E,O,N,M,j,F,A,L,I,W,$,H,U,z,B,K,V,J,G,X,Q,Y,Z,ee,te,ne,ie,re,oe=function(){function e(e,t){this.edits=e,this.changeAnnotations=t}return e.prototype.insert=function(e,t,n){var i,r;if(void 0===n?i=b.insert(e,t):w.is(n)?(r=n,i=C.insert(e,t,n)):(this.assertChangeAnnotations(this.changeAnnotations),r=this.changeAnnotations.manage(n),i=C.insert(e,t,r)),this.edits.push(i),void 0!==r)return r},e.prototype.replace=function(e,t,n){var i,r;if(void 0===n?i=b.replace(e,t):w.is(n)?(r=n,i=C.replace(e,t,n)):(this.assertChangeAnnotations(this.changeAnnotations),r=this.changeAnnotations.manage(n),i=C.replace(e,t,r)),this.edits.push(i),void 0!==r)return r},e.prototype.delete=function(e,t){var n,i;if(void 0===t?n=b.del(e):w.is(t)?(i=t,n=C.del(e,t)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(t),n=C.del(e,i)),this.edits.push(n),void 0!==i)return i},e.prototype.add=function(e){this.edits.push(e)},e.prototype.all=function(){return this.edits},e.prototype.clear=function(){this.edits.splice(0,this.edits.length)},e.prototype.assertChangeAnnotations=function(e){if(void 0===e)throw new Error("Text edit change is not configured to manage change annotations.")},e}(),se=function(){function e(e){this._annotations=void 0===e?Object.create(null):e,this._counter=0,this._size=0}return e.prototype.all=function(){return this._annotations},Object.defineProperty(e.prototype,"size",{get:function(){return this._size},enumerable:!1,configurable:!0}),e.prototype.manage=function(e,t){var n;if(w.is(e)?n=e:(n=this.nextId(),t=e),void 0!==this._annotations[n])throw new Error("Id "+n+" is already in use.");if(void 0===t)throw new Error("No annotation provided for id "+n);return this._annotations[n]=t,this._size++,n},e.prototype.nextId=function(){return this._counter++,this._counter.toString()},e}(),ae=function(){function e(e){var t=this;this._textEditChanges=Object.create(null),void 0!==e?(this._workspaceEdit=e,e.documentChanges?(this._changeAnnotations=new se(e.changeAnnotations),e.changeAnnotations=this._changeAnnotations.all(),e.documentChanges.forEach((function(e){if(T.is(e)){var n=new oe(e.edits,t._changeAnnotations);t._textEditChanges[e.textDocument.uri]=n}}))):e.changes&&Object.keys(e.changes).forEach((function(n){var i=new oe(e.changes[n]);t._textEditChanges[n]=i}))):this._workspaceEdit={}}return Object.defineProperty(e.prototype,"edit",{get:function(){return this.initDocumentChanges(),void 0!==this._changeAnnotations&&(0===this._changeAnnotations.size?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit},enumerable:!1,configurable:!0}),e.prototype.getTextEditChange=function(e){if(E.is(e)){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");var t={uri:e.uri,version:e.version};if(!(i=this._textEditChanges[t.uri])){var n={textDocument:t,edits:r=[]};this._workspaceEdit.documentChanges.push(n),i=new oe(r,this._changeAnnotations),this._textEditChanges[t.uri]=i}return i}if(this.initChanges(),void 0===this._workspaceEdit.changes)throw new Error("Workspace edit is not configured for normal text edit changes.");var i;if(!(i=this._textEditChanges[e])){var r=[];this._workspaceEdit.changes[e]=r,i=new oe(r),this._textEditChanges[e]=i}return i},e.prototype.initDocumentChanges=function(){void 0===this._workspaceEdit.documentChanges&&void 0===this._workspaceEdit.changes&&(this._changeAnnotations=new se,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())},e.prototype.initChanges=function(){void 0===this._workspaceEdit.documentChanges&&void 0===this._workspaceEdit.changes&&(this._workspaceEdit.changes=Object.create(null))},e.prototype.createFile=function(e,t,n){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");var i,r,o;if(R.is(t)||w.is(t)?i=t:n=t,void 0===i?r=S.create(e,n):(o=w.is(i)?i:this._changeAnnotations.manage(i),r=S.create(e,n,o)),this._workspaceEdit.documentChanges.push(r),void 0!==o)return o},e.prototype.renameFile=function(e,t,n,i){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");var r,o,s;if(R.is(n)||w.is(n)?r=n:i=n,void 0===r?o=k.create(e,t,i):(s=w.is(r)?r:this._changeAnnotations.manage(r),o=k.create(e,t,i,s)),this._workspaceEdit.documentChanges.push(o),void 0!==s)return s},e.prototype.deleteFile=function(e,t,n){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");var i,r,o;if(R.is(t)||w.is(t)?i=t:n=t,void 0===i?r=x.create(e,n):(o=w.is(i)?i:this._changeAnnotations.manage(i),r=x.create(e,n,o)),this._workspaceEdit.documentChanges.push(r),void 0!==o)return o},e}();!function(e){e.create=function(e){return{uri:e}},e.is=function(e){var t=e;return le.defined(t)&&le.string(t.uri)}}(D||(D={})),function(e){e.create=function(e,t){return{uri:e,version:t}},e.is=function(e){var t=e;return le.defined(t)&&le.string(t.uri)&&le.integer(t.version)}}(q||(q={})),function(e){e.create=function(e,t){return{uri:e,version:t}},e.is=function(e){var t=e;return le.defined(t)&&le.string(t.uri)&&(null===t.version||le.integer(t.version))}}(E||(E={})),function(e){e.create=function(e,t,n,i){return{uri:e,languageId:t,version:n,text:i}},e.is=function(e){var t=e;return le.defined(t)&&le.string(t.uri)&&le.string(t.languageId)&&le.integer(t.version)&&le.string(t.text)}}(O||(O={})),function(e){e.PlainText="plaintext",e.Markdown="markdown"}(N||(N={})),function(e){e.is=function(t){var n=t;return n===e.PlainText||n===e.Markdown}}(N||(N={})),function(e){e.is=function(e){var t=e;return le.objectLiteral(e)&&N.is(t.kind)&&le.string(t.value)}}(M||(M={})),function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25}(j||(j={})),function(e){e.PlainText=1,e.Snippet=2}(F||(F={})),function(e){e.Deprecated=1}(A||(A={})),function(e){e.create=function(e,t,n){return{newText:e,insert:t,replace:n}},e.is=function(e){var t=e;return t&&le.string(t.newText)&&s.is(t.insert)&&s.is(t.replace)}}(L||(L={})),function(e){e.asIs=1,e.adjustIndentation=2}(I||(I={})),function(e){e.create=function(e){return{label:e}}}(W||(W={})),function(e){e.create=function(e,t){return{items:e||[],isIncomplete:!!t}}}($||($={})),function(e){e.fromPlainText=function(e){return e.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")},e.is=function(e){var t=e;return le.string(t)||le.objectLiteral(t)&&le.string(t.language)&&le.string(t.value)}}(H||(H={})),function(e){e.is=function(e){var t=e;return!!t&&le.objectLiteral(t)&&(M.is(t.contents)||H.is(t.contents)||le.typedArray(t.contents,H.is))&&(void 0===e.range||s.is(e.range))}}(U||(U={})),function(e){e.create=function(e,t){return t?{label:e,documentation:t}:{label:e}}}(z||(z={})),function(e){e.create=function(e,t){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];var r={label:e};return le.defined(t)&&(r.documentation=t),le.defined(n)?r.parameters=n:r.parameters=[],r}}(B||(B={})),function(e){e.Text=1,e.Read=2,e.Write=3}(K||(K={})),function(e){e.create=function(e,t){var n={range:e};return le.number(t)&&(n.kind=t),n}}(V||(V={})),function(e){e.File=1,e.Module=2,e.Namespace=3,e.Package=4,e.Class=5,e.Method=6,e.Property=7,e.Field=8,e.Constructor=9,e.Enum=10,e.Interface=11,e.Function=12,e.Variable=13,e.Constant=14,e.String=15,e.Number=16,e.Boolean=17,e.Array=18,e.Object=19,e.Key=20,e.Null=21,e.EnumMember=22,e.Struct=23,e.Event=24,e.Operator=25,e.TypeParameter=26}(J||(J={})),function(e){e.Deprecated=1}(G||(G={})),function(e){e.create=function(e,t,n,i,r){var o={name:e,kind:t,location:{uri:i,range:n}};return r&&(o.containerName=r),o}}(X||(X={})),function(e){e.create=function(e,t,n,i,r,o){var s={name:e,detail:t,kind:n,range:i,selectionRange:r};return void 0!==o&&(s.children=o),s},e.is=function(e){var t=e;return t&&le.string(t.name)&&le.number(t.kind)&&s.is(t.range)&&s.is(t.selectionRange)&&(void 0===t.detail||le.string(t.detail))&&(void 0===t.deprecated||le.boolean(t.deprecated))&&(void 0===t.children||Array.isArray(t.children))&&(void 0===t.tags||Array.isArray(t.tags))}}(Q||(Q={})),function(e){e.Empty="",e.QuickFix="quickfix",e.Refactor="refactor",e.RefactorExtract="refactor.extract",e.RefactorInline="refactor.inline",e.RefactorRewrite="refactor.rewrite",e.Source="source",e.SourceOrganizeImports="source.organizeImports",e.SourceFixAll="source.fixAll"}(Y||(Y={})),function(e){e.create=function(e,t){var n={diagnostics:e};return null!=t&&(n.only=t),n},e.is=function(e){var t=e;return le.defined(t)&&le.typedArray(t.diagnostics,v.is)&&(void 0===t.only||le.typedArray(t.only,le.string))}}(Z||(Z={})),function(e){e.create=function(e,t,n){var i={title:e},r=!0;return"string"==typeof t?(r=!1,i.kind=t):_.is(t)?i.command=t:i.edit=t,r&&void 0!==n&&(i.kind=n),i},e.is=function(e){var t=e;return t&&le.string(t.title)&&(void 0===t.diagnostics||le.typedArray(t.diagnostics,v.is))&&(void 0===t.kind||le.string(t.kind))&&(void 0!==t.edit||void 0!==t.command)&&(void 0===t.command||_.is(t.command))&&(void 0===t.isPreferred||le.boolean(t.isPreferred))&&(void 0===t.edit||P.is(t.edit))}}(ee||(ee={})),function(e){e.create=function(e,t){var n={range:e};return le.defined(t)&&(n.data=t),n},e.is=function(e){var t=e;return le.defined(t)&&s.is(t.range)&&(le.undefined(t.command)||_.is(t.command))}}(te||(te={})),function(e){e.create=function(e,t){return{tabSize:e,insertSpaces:t}},e.is=function(e){var t=e;return le.defined(t)&&le.uinteger(t.tabSize)&&le.boolean(t.insertSpaces)}}(ne||(ne={})),function(e){e.create=function(e,t,n){return{range:e,target:t,data:n}},e.is=function(e){var t=e;return le.defined(t)&&s.is(t.range)&&(le.undefined(t.target)||le.string(t.target))}}(ie||(ie={})),function(e){e.create=function(e,t){return{range:e,parent:t}},e.is=function(t){var n=t;return void 0!==n&&s.is(n.range)&&(void 0===n.parent||e.is(n.parent))}}(re||(re={}));var ce,ue=["\n","\r\n","\r"];!function(e){function t(e,n){if(e.length<=1)return e;var i=e.length/2|0,r=e.slice(0,i),o=e.slice(i);t(r,n),t(o,n);for(var s=0,a=0,c=0;s<r.length&&a<o.length;){var u=n(r[s],o[a]);e[c++]=u<=0?r[s++]:o[a++]}for(;s<r.length;)e[c++]=r[s++];for(;a<o.length;)e[c++]=o[a++];return e}e.create=function(e,t,n,i){return new de(e,t,n,i)},e.is=function(e){var t=e;return!!(le.defined(t)&&le.string(t.uri)&&(le.undefined(t.languageId)||le.string(t.languageId))&&le.uinteger(t.lineCount)&&le.func(t.getText)&&le.func(t.positionAt)&&le.func(t.offsetAt))},e.applyEdits=function(e,n){for(var i=e.getText(),r=t(n,(function(e,t){var n=e.range.start.line-t.range.start.line;return 0===n?e.range.start.character-t.range.start.character:n})),o=i.length,s=r.length-1;s>=0;s--){var a=r[s],c=e.offsetAt(a.range.start),u=e.offsetAt(a.range.end);if(!(u<=o))throw new Error("Overlapping edit");i=i.substring(0,c)+a.newText+i.substring(u,i.length),o=c}return i}}(ce||(ce={}));var le,de=function(){function e(e,t,n,i){this._uri=e,this._languageId=t,this._version=n,this._content=i,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(e){if(e){var t=this.offsetAt(e.start),n=this.offsetAt(e.end);return this._content.substring(t,n)}return this._content},e.prototype.update=function(e,t){this._content=e.text,this._version=t,this._lineOffsets=void 0},e.prototype.getLineOffsets=function(){if(void 0===this._lineOffsets){for(var e=[],t=this._content,n=!0,i=0;i<t.length;i++){n&&(e.push(i),n=!1);var r=t.charAt(i);n="\r"===r||"\n"===r,"\r"===r&&i+1<t.length&&"\n"===t.charAt(i+1)&&i++}n&&t.length>0&&e.push(t.length),this._lineOffsets=e}return this._lineOffsets},e.prototype.positionAt=function(e){e=Math.max(Math.min(e,this._content.length),0);var t=this.getLineOffsets(),n=0,i=t.length;if(0===i)return o.create(0,e);for(;n<i;){var r=Math.floor((n+i)/2);t[r]>e?i=r:n=r+1}var s=n-1;return o.create(s,e-t[s])},e.prototype.offsetAt=function(e){var t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;var n=t[e.line],i=e.line+1<t.length?t[e.line+1]:this._content.length;return Math.max(Math.min(n+e.character,i),n)},Object.defineProperty(e.prototype,"lineCount",{get:function(){return this.getLineOffsets().length},enumerable:!1,configurable:!0}),e}();!function(e){var t=Object.prototype.toString;e.defined=function(e){return void 0!==e},e.undefined=function(e){return void 0===e},e.boolean=function(e){return!0===e||!1===e},e.string=function(e){return"[object String]"===t.call(e)},e.number=function(e){return"[object Number]"===t.call(e)},e.numberRange=function(e,n,i){return"[object Number]"===t.call(e)&&n<=e&&e<=i},e.integer=function(e){return"[object Number]"===t.call(e)&&-2147483648<=e&&e<=2147483647},e.uinteger=function(e){return"[object Number]"===t.call(e)&&0<=e&&e<=2147483647},e.func=function(e){return"[object Function]"===t.call(e)},e.objectLiteral=function(e){return null!==e&&"object"==typeof e},e.typedArray=function(e,t){return Array.isArray(e)&&e.every(t)}}(le||(le={}))},6265:function(e,t,n){var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n),Object.defineProperty(e,i,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||i(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.ProposedFeatures=t.SemanticTokensBuilder=void 0;const o=n(9817);Object.defineProperty(t,"SemanticTokensBuilder",{enumerable:!0,get:function(){return o.SemanticTokensBuilder}}),r(n(273),t),r(n(9891),t),(t.ProposedFeatures||(t.ProposedFeatures={})).all={__brand:"features"}},7985:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CallHierarchyFeature=void 0;const i=n(273);t.CallHierarchyFeature=e=>class extends e{get callHierarchy(){return{onPrepare:e=>{this.connection.onRequest(i.CallHierarchyPrepareRequest.type,((t,n)=>e(t,n,this.attachWorkDoneProgress(t),void 0)))},onIncomingCalls:e=>{const t=i.CallHierarchyIncomingCallsRequest.type;this.connection.onRequest(t,((n,i)=>e(n,i,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(t,n))))},onOutgoingCalls:e=>{const t=i.CallHierarchyOutgoingCallsRequest.type;this.connection.onRequest(t,((n,i)=>e(n,i,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(t,n))))}}}}},2507:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ConfigurationFeature=void 0;const i=n(273),r=n(289);t.ConfigurationFeature=e=>class extends e{getConfiguration(e){return e?r.string(e)?this._getConfiguration({section:e}):this._getConfiguration(e):this._getConfiguration({})}_getConfiguration(e){let t={items:Array.isArray(e)?e:[e]};return this.connection.sendRequest(i.ConfigurationRequest.type,t).then((t=>Array.isArray(e)?t:t[0]))}}},828:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.FileOperationsFeature=void 0;const i=n(273);t.FileOperationsFeature=e=>class extends e{onDidCreateFiles(e){this.connection.onNotification(i.DidCreateFilesNotification.type,(t=>{e(t)}))}onDidRenameFiles(e){this.connection.onNotification(i.DidRenameFilesNotification.type,(t=>{e(t)}))}onDidDeleteFiles(e){this.connection.onNotification(i.DidDeleteFilesNotification.type,(t=>{e(t)}))}onWillCreateFiles(e){return this.connection.onRequest(i.WillCreateFilesRequest.type,((t,n)=>e(t,n)))}onWillRenameFiles(e){return this.connection.onRequest(i.WillRenameFilesRequest.type,((t,n)=>e(t,n)))}onWillDeleteFiles(e){return this.connection.onRequest(i.WillDeleteFilesRequest.type,((t,n)=>e(t,n)))}}},2776:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.LinkedEditingRangeFeature=void 0;const i=n(273);t.LinkedEditingRangeFeature=e=>class extends e{onLinkedEditingRange(e){this.connection.onRequest(i.LinkedEditingRangeRequest.type,((t,n)=>e(t,n,this.attachWorkDoneProgress(t),void 0)))}}},8120:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.MonikerFeature=void 0;const i=n(273);t.MonikerFeature=e=>class extends e{get moniker(){return{on:e=>{const t=i.MonikerRequest.type;this.connection.onRequest(t,((n,i)=>e(n,i,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(t,n))))}}}}},2731:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.attachPartialResult=t.ProgressFeature=t.attachWorkDone=void 0;const i=n(273),r=n(7560);class o{constructor(e,t){this._connection=e,this._token=t,o.Instances.set(this._token,this)}begin(e,t,n,r){let o={kind:"begin",title:e,percentage:t,message:n,cancellable:r};this._connection.sendProgress(i.WorkDoneProgress.type,this._token,o)}report(e,t){let n={kind:"report"};"number"==typeof e?(n.percentage=e,void 0!==t&&(n.message=t)):n.message=e,this._connection.sendProgress(i.WorkDoneProgress.type,this._token,n)}done(){o.Instances.delete(this._token),this._connection.sendProgress(i.WorkDoneProgress.type,this._token,{kind:"end"})}}o.Instances=new Map;class s extends o{constructor(e,t){super(e,t),this._source=new i.CancellationTokenSource}get token(){return this._source.token}done(){this._source.dispose(),super.done()}cancel(){this._source.cancel()}}class a{constructor(){}begin(){}report(){}done(){}}class c extends a{constructor(){super(),this._source=new i.CancellationTokenSource}get token(){return this._source.token}done(){this._source.dispose()}cancel(){this._source.cancel()}}var u;t.attachWorkDone=function(e,t){if(void 0===t||void 0===t.workDoneToken)return new a;const n=t.workDoneToken;return delete t.workDoneToken,new o(e,n)},t.ProgressFeature=e=>class extends e{constructor(){super(),this._progressSupported=!1}initialize(e){var t;!0===(null===(t=null==e?void 0:e.window)||void 0===t?void 0:t.workDoneProgress)&&(this._progressSupported=!0,this.connection.onNotification(i.WorkDoneProgressCancelNotification.type,(e=>{let t=o.Instances.get(e.token);(t instanceof s||t instanceof c)&&t.cancel()})))}attachWorkDoneProgress(e){return void 0===e?new a:new o(this.connection,e)}createWorkDoneProgress(){if(this._progressSupported){const e=r.generateUuid();return this.connection.sendRequest(i.WorkDoneProgressCreateRequest.type,{token:e}).then((()=>new s(this.connection,e)))}return Promise.resolve(new c)}},function(e){e.type=new i.ProgressType}(u||(u={}));class l{constructor(e,t){this._connection=e,this._token=t}report(e){this._connection.sendProgress(u.type,this._token,e)}}t.attachPartialResult=function(e,t){if(void 0===t||void 0===t.partialResultToken)return;const n=t.partialResultToken;return delete t.partialResultToken,new l(e,n)}},9817:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SemanticTokensBuilder=t.SemanticTokensFeature=void 0;const i=n(273);t.SemanticTokensFeature=e=>class extends e{get semanticTokens(){return{on:e=>{const t=i.SemanticTokensRequest.type;this.connection.onRequest(t,((n,i)=>e(n,i,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(t,n))))},onDelta:e=>{const t=i.SemanticTokensDeltaRequest.type;this.connection.onRequest(t,((n,i)=>e(n,i,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(t,n))))},onRange:e=>{const t=i.SemanticTokensRangeRequest.type;this.connection.onRequest(t,((n,i)=>e(n,i,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(t,n))))}}}},t.SemanticTokensBuilder=class{constructor(){this._prevData=void 0,this.initialize()}initialize(){this._id=Date.now(),this._prevLine=0,this._prevChar=0,this._data=[],this._dataLen=0}push(e,t,n,i,r){let o=e,s=t;this._dataLen>0&&(o-=this._prevLine,0===o&&(s-=this._prevChar)),this._data[this._dataLen++]=o,this._data[this._dataLen++]=s,this._data[this._dataLen++]=n,this._data[this._dataLen++]=i,this._data[this._dataLen++]=r,this._prevLine=e,this._prevChar=t}get id(){return this._id.toString()}previousResult(e){this.id===e&&(this._prevData=this._data),this.initialize()}build(){return this._prevData=void 0,{resultId:this.id,data:this._data}}canBuildEdits(){return void 0!==this._prevData}buildEdits(){if(void 0!==this._prevData){const e=this._prevData.length,t=this._data.length;let n=0;for(;n<t&&n<e&&this._prevData[n]===this._data[n];)n++;if(n<t&&n<e){let i=0;for(;i<t&&i<e&&this._prevData[e-1-i]===this._data[t-1-i];)i++;const r=this._data.slice(n,t-i);return{resultId:this.id,edits:[{start:n,deleteCount:e-i-n,data:r}]}}return n<t?{resultId:this.id,edits:[{start:n,deleteCount:0,data:this._data.slice(n)}]}:n<e?{resultId:this.id,edits:[{start:n,deleteCount:e-n}]}:{resultId:this.id,edits:[]}}return this.build()}}},9891:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.createConnection=t.combineFeatures=t.combineLanguagesFeatures=t.combineWorkspaceFeatures=t.combineWindowFeatures=t.combineClientFeatures=t.combineTracerFeatures=t.combineTelemetryFeatures=t.combineConsoleFeatures=t._LanguagesImpl=t.BulkUnregistration=t.BulkRegistration=t.ErrorMessageTracker=t.TextDocuments=void 0;const i=n(273),r=n(289),o=n(7560),s=n(2731),a=n(2507),c=n(8634),u=n(7985),l=n(9817),d=n(5421),h=n(828),f=n(2776),g=n(8120);function p(e){if(null!==e)return e}t.TextDocuments=class{constructor(e){this._documents=Object.create(null),this._configuration=e,this._onDidChangeContent=new i.Emitter,this._onDidOpen=new i.Emitter,this._onDidClose=new i.Emitter,this._onDidSave=new i.Emitter,this._onWillSave=new i.Emitter}get onDidChangeContent(){return this._onDidChangeContent.event}get onDidOpen(){return this._onDidOpen.event}get onWillSave(){return this._onWillSave.event}onWillSaveWaitUntil(e){this._willSaveWaitUntil=e}get onDidSave(){return this._onDidSave.event}get onDidClose(){return this._onDidClose.event}get(e){return this._documents[e]}all(){return Object.keys(this._documents).map((e=>this._documents[e]))}keys(){return Object.keys(this._documents)}listen(e){e.__textDocumentSync=i.TextDocumentSyncKind.Full,e.onDidOpenTextDocument((e=>{let t=e.textDocument,n=this._configuration.create(t.uri,t.languageId,t.version,t.text);this._documents[t.uri]=n;let i=Object.freeze({document:n});this._onDidOpen.fire(i),this._onDidChangeContent.fire(i)})),e.onDidChangeTextDocument((e=>{let t=e.textDocument,n=e.contentChanges;if(0===n.length)return;let i=this._documents[t.uri];const{version:r}=t;if(null==r)throw new Error(`Received document change event for ${t.uri} without valid version identifier`);i=this._configuration.update(i,n,r),this._documents[t.uri]=i,this._onDidChangeContent.fire(Object.freeze({document:i}))})),e.onDidCloseTextDocument((e=>{let t=this._documents[e.textDocument.uri];t&&(delete this._documents[e.textDocument.uri],this._onDidClose.fire(Object.freeze({document:t})))})),e.onWillSaveTextDocument((e=>{let t=this._documents[e.textDocument.uri];t&&this._onWillSave.fire(Object.freeze({document:t,reason:e.reason}))})),e.onWillSaveTextDocumentWaitUntil(((e,t)=>{let n=this._documents[e.textDocument.uri];return n&&this._willSaveWaitUntil?this._willSaveWaitUntil(Object.freeze({document:n,reason:e.reason}),t):[]})),e.onDidSaveTextDocument((e=>{let t=this._documents[e.textDocument.uri];t&&this._onDidSave.fire(Object.freeze({document:t}))}))}},t.ErrorMessageTracker=class{constructor(){this._messages=Object.create(null)}add(e){let t=this._messages[e];t||(t=0),t++,this._messages[e]=t}sendErrors(e){Object.keys(this._messages).forEach((t=>{e.window.showErrorMessage(t)}))}};class m{constructor(){}rawAttach(e){this._rawConnection=e}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}fillServerCapabilities(e){}initialize(e){}error(e){this.send(i.MessageType.Error,e)}warn(e){this.send(i.MessageType.Warning,e)}info(e){this.send(i.MessageType.Info,e)}log(e){this.send(i.MessageType.Log,e)}send(e,t){this._rawConnection&&this._rawConnection.sendNotification(i.LogMessageNotification.type,{type:e,message:t})}}const y=d.ShowDocumentFeature(s.ProgressFeature(class{constructor(){}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}showErrorMessage(e,...t){let n={type:i.MessageType.Error,message:e,actions:t};return this.connection.sendRequest(i.ShowMessageRequest.type,n).then(p)}showWarningMessage(e,...t){let n={type:i.MessageType.Warning,message:e,actions:t};return this.connection.sendRequest(i.ShowMessageRequest.type,n).then(p)}showInformationMessage(e,...t){let n={type:i.MessageType.Info,message:e,actions:t};return this.connection.sendRequest(i.ShowMessageRequest.type,n).then(p)}}));(t.BulkRegistration||(t.BulkRegistration={})).create=function(){return new v};class v{constructor(){this._registrations=[],this._registered=new Set}add(e,t){const n=r.string(e)?e:e.method;if(this._registered.has(n))throw new Error(`${n} is already added to this registration`);const i=o.generateUuid();this._registrations.push({id:i,method:n,registerOptions:t||{}}),this._registered.add(n)}asRegistrationParams(){return{registrations:this._registrations}}}(t.BulkUnregistration||(t.BulkUnregistration={})).create=function(){return new _(void 0,[])};class _{constructor(e,t){this._connection=e,this._unregistrations=new Map,t.forEach((e=>{this._unregistrations.set(e.method,e)}))}get isAttached(){return!!this._connection}attach(e){this._connection=e}add(e){this._unregistrations.set(e.method,e)}dispose(){let e=[];for(let t of this._unregistrations.values())e.push(t);let t={unregisterations:e};this._connection.sendRequest(i.UnregistrationRequest.type,t).then(void 0,(e=>{this._connection.console.info("Bulk unregistration failed.")}))}disposeSingle(e){const t=r.string(e)?e:e.method,n=this._unregistrations.get(t);if(!n)return!1;let o={unregisterations:[n]};return this._connection.sendRequest(i.UnregistrationRequest.type,o).then((()=>{this._unregistrations.delete(t)}),(e=>{this._connection.console.info(`Un-registering request handler for ${n.id} failed.`)})),!0}}class b{attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}register(e,t,n){return e instanceof v?this.registerMany(e):e instanceof _?this.registerSingle1(e,t,n):this.registerSingle2(e,t)}registerSingle1(e,t,n){const s=r.string(t)?t:t.method,a=o.generateUuid();let c={registrations:[{id:a,method:s,registerOptions:n||{}}]};return e.isAttached||e.attach(this.connection),this.connection.sendRequest(i.RegistrationRequest.type,c).then((t=>(e.add({id:a,method:s}),e)),(e=>(this.connection.console.info(`Registering request handler for ${s} failed.`),Promise.reject(e))))}registerSingle2(e,t){const n=r.string(e)?e:e.method,s=o.generateUuid();let a={registrations:[{id:s,method:n,registerOptions:t||{}}]};return this.connection.sendRequest(i.RegistrationRequest.type,a).then((e=>i.Disposable.create((()=>{this.unregisterSingle(s,n)}))),(e=>(this.connection.console.info(`Registering request handler for ${n} failed.`),Promise.reject(e))))}unregisterSingle(e,t){let n={unregisterations:[{id:e,method:t}]};return this.connection.sendRequest(i.UnregistrationRequest.type,n).then(void 0,(t=>{this.connection.console.info(`Un-registering request handler for ${e} failed.`)}))}registerMany(e){let t=e.asRegistrationParams();return this.connection.sendRequest(i.RegistrationRequest.type,t).then((()=>new _(this._connection,t.registrations.map((e=>({id:e.id,method:e.method}))))),(e=>(this.connection.console.info("Bulk registration failed."),Promise.reject(e))))}}const R=h.FileOperationsFeature(c.WorkspaceFoldersFeature(a.ConfigurationFeature(class{constructor(){}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}applyEdit(e){let t=(n=e)&&n.edit?e:{edit:e};var n;return this.connection.sendRequest(i.ApplyWorkspaceEditRequest.type,t)}})));class w{constructor(){this._trace=i.Trace.Off}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}set trace(e){this._trace=e}log(e,t){this._trace!==i.Trace.Off&&this.connection.sendNotification(i.LogTraceNotification.type,{message:e,verbose:this._trace===i.Trace.Verbose?t:void 0})}}class C{constructor(){}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}logEvent(e){this.connection.sendNotification(i.TelemetryEventNotification.type,e)}}class T{constructor(){}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}attachWorkDoneProgress(e){return s.attachWorkDone(this.connection,e)}attachPartialResultProgress(e,t){return s.attachPartialResult(this.connection,t)}}t._LanguagesImpl=T;const S=g.MonikerFeature(f.LinkedEditingRangeFeature(l.SemanticTokensFeature(u.CallHierarchyFeature(T))));function k(e,t){return function(n){return t(e(n))}}function x(e,t){return function(n){return t(e(n))}}function P(e,t){return function(n){return t(e(n))}}function D(e,t){return function(n){return t(e(n))}}function q(e,t){return function(n){return t(e(n))}}function E(e,t){return function(n){return t(e(n))}}t.combineConsoleFeatures=k,t.combineTelemetryFeatures=x,t.combineTracerFeatures=P,t.combineClientFeatures=D,t.combineWindowFeatures=q,t.combineWorkspaceFeatures=E,t.combineLanguagesFeatures=function(e,t){return function(n){return t(e(n))}},t.combineFeatures=function(e,t){function n(e,t,n){return e&&t?n(e,t):e||t}return{__brand:"features",console:n(e.console,t.console,k),tracer:n(e.tracer,t.tracer,P),telemetry:n(e.telemetry,t.telemetry,x),client:n(e.client,t.client,D),window:n(e.window,t.window,q),workspace:n(e.workspace,t.workspace,E)}},t.createConnection=function(e,t,n){const o=n&&n.console?new(n.console(m)):new m,a=e(o);o.rawAttach(a);const c=n&&n.tracer?new(n.tracer(w)):new w,u=n&&n.telemetry?new(n.telemetry(C)):new C,l=n&&n.client?new(n.client(b)):new b,d=n&&n.window?new(n.window(y)):new y,h=n&&n.workspace?new(n.workspace(R)):new R,f=n&&n.languages?new(n.languages(S)):new S,g=[o,c,u,l,d,h,f];function p(e){return e instanceof Promise?e:r.thenable(e)?new Promise(((t,n)=>{e.then((e=>t(e)),(e=>n(e)))})):Promise.resolve(e)}let v,_,T,k={listen:()=>a.listen(),sendRequest:(e,...t)=>a.sendRequest(r.string(e)?e:e.method,...t),onRequest:(e,t)=>a.onRequest(e,t),sendNotification:(e,t)=>{const n=r.string(e)?e:e.method;1===arguments.length?a.sendNotification(n):a.sendNotification(n,t)},onNotification:(e,t)=>a.onNotification(e,t),onProgress:a.onProgress,sendProgress:a.sendProgress,onInitialize:e=>_=e,onInitialized:e=>a.onNotification(i.InitializedNotification.type,e),onShutdown:e=>v=e,onExit:e=>T=e,get console(){return o},get telemetry(){return u},get tracer(){return c},get client(){return l},get window(){return d},get workspace(){return h},get languages(){return f},onDidChangeConfiguration:e=>a.onNotification(i.DidChangeConfigurationNotification.type,e),onDidChangeWatchedFiles:e=>a.onNotification(i.DidChangeWatchedFilesNotification.type,e),__textDocumentSync:void 0,onDidOpenTextDocument:e=>a.onNotification(i.DidOpenTextDocumentNotification.type,e),onDidChangeTextDocument:e=>a.onNotification(i.DidChangeTextDocumentNotification.type,e),onDidCloseTextDocument:e=>a.onNotification(i.DidCloseTextDocumentNotification.type,e),onWillSaveTextDocument:e=>a.onNotification(i.WillSaveTextDocumentNotification.type,e),onWillSaveTextDocumentWaitUntil:e=>a.onRequest(i.WillSaveTextDocumentWaitUntilRequest.type,e),onDidSaveTextDocument:e=>a.onNotification(i.DidSaveTextDocumentNotification.type,e),sendDiagnostics:e=>a.sendNotification(i.PublishDiagnosticsNotification.type,e),onHover:e=>a.onRequest(i.HoverRequest.type,((t,n)=>e(t,n,s.attachWorkDone(a,t),void 0))),onCompletion:e=>a.onRequest(i.CompletionRequest.type,((t,n)=>e(t,n,s.attachWorkDone(a,t),s.attachPartialResult(a,t)))),onCompletionResolve:e=>a.onRequest(i.CompletionResolveRequest.type,e),onSignatureHelp:e=>a.onRequest(i.SignatureHelpRequest.type,((t,n)=>e(t,n,s.attachWorkDone(a,t),void 0))),onDeclaration:e=>a.onRequest(i.DeclarationRequest.type,((t,n)=>e(t,n,s.attachWorkDone(a,t),s.attachPartialResult(a,t)))),onDefinition:e=>a.onRequest(i.DefinitionRequest.type,((t,n)=>e(t,n,s.attachWorkDone(a,t),s.attachPartialResult(a,t)))),onTypeDefinition:e=>a.onRequest(i.TypeDefinitionRequest.type,((t,n)=>e(t,n,s.attachWorkDone(a,t),s.attachPartialResult(a,t)))),onImplementation:e=>a.onRequest(i.ImplementationRequest.type,((t,n)=>e(t,n,s.attachWorkDone(a,t),s.attachPartialResult(a,t)))),onReferences:e=>a.onRequest(i.ReferencesRequest.type,((t,n)=>e(t,n,s.attachWorkDone(a,t),s.attachPartialResult(a,t)))),onDocumentHighlight:e=>a.onRequest(i.DocumentHighlightRequest.type,((t,n)=>e(t,n,s.attachWorkDone(a,t),s.attachPartialResult(a,t)))),onDocumentSymbol:e=>a.onRequest(i.DocumentSymbolRequest.type,((t,n)=>e(t,n,s.attachWorkDone(a,t),s.attachPartialResult(a,t)))),onWorkspaceSymbol:e=>a.onRequest(i.WorkspaceSymbolRequest.type,((t,n)=>e(t,n,s.attachWorkDone(a,t),s.attachPartialResult(a,t)))),onCodeAction:e=>a.onRequest(i.CodeActionRequest.type,((t,n)=>e(t,n,s.attachWorkDone(a,t),s.attachPartialResult(a,t)))),onCodeActionResolve:e=>a.onRequest(i.CodeActionResolveRequest.type,((t,n)=>e(t,n))),onCodeLens:e=>a.onRequest(i.CodeLensRequest.type,((t,n)=>e(t,n,s.attachWorkDone(a,t),s.attachPartialResult(a,t)))),onCodeLensResolve:e=>a.onRequest(i.CodeLensResolveRequest.type,((t,n)=>e(t,n))),onDocumentFormatting:e=>a.onRequest(i.DocumentFormattingRequest.type,((t,n)=>e(t,n,s.attachWorkDone(a,t),void 0))),onDocumentRangeFormatting:e=>a.onRequest(i.DocumentRangeFormattingRequest.type,((t,n)=>e(t,n,s.attachWorkDone(a,t),void 0))),onDocumentOnTypeFormatting:e=>a.onRequest(i.DocumentOnTypeFormattingRequest.type,((t,n)=>e(t,n))),onRenameRequest:e=>a.onRequest(i.RenameRequest.type,((t,n)=>e(t,n,s.attachWorkDone(a,t),void 0))),onPrepareRename:e=>a.onRequest(i.PrepareRenameRequest.type,((t,n)=>e(t,n))),onDocumentLinks:e=>a.onRequest(i.DocumentLinkRequest.type,((t,n)=>e(t,n,s.attachWorkDone(a,t),s.attachPartialResult(a,t)))),onDocumentLinkResolve:e=>a.onRequest(i.DocumentLinkResolveRequest.type,((t,n)=>e(t,n))),onDocumentColor:e=>a.onRequest(i.DocumentColorRequest.type,((t,n)=>e(t,n,s.attachWorkDone(a,t),s.attachPartialResult(a,t)))),onColorPresentation:e=>a.onRequest(i.ColorPresentationRequest.type,((t,n)=>e(t,n,s.attachWorkDone(a,t),s.attachPartialResult(a,t)))),onFoldingRanges:e=>a.onRequest(i.FoldingRangeRequest.type,((t,n)=>e(t,n,s.attachWorkDone(a,t),s.attachPartialResult(a,t)))),onSelectionRanges:e=>a.onRequest(i.SelectionRangeRequest.type,((t,n)=>e(t,n,s.attachWorkDone(a,t),s.attachPartialResult(a,t)))),onExecuteCommand:e=>a.onRequest(i.ExecuteCommandRequest.type,((t,n)=>e(t,n,s.attachWorkDone(a,t),void 0))),dispose:()=>a.dispose()};for(let e of g)e.attach(k);return a.onRequest(i.InitializeRequest.type,(e=>{t.initialize(e),r.string(e.trace)&&(c.trace=i.Trace.fromString(e.trace));for(let t of g)t.initialize(e.capabilities);if(_)return p(_(e,(new i.CancellationTokenSource).token,s.attachWorkDone(a,e),void 0)).then((e=>{if(e instanceof i.ResponseError)return e;let t=e;t||(t={capabilities:{}});let n=t.capabilities;n||(n={},t.capabilities=n),void 0===n.textDocumentSync||null===n.textDocumentSync?n.textDocumentSync=r.number(k.__textDocumentSync)?k.__textDocumentSync:i.TextDocumentSyncKind.None:r.number(n.textDocumentSync)||r.number(n.textDocumentSync.change)||(n.textDocumentSync.change=r.number(k.__textDocumentSync)?k.__textDocumentSync:i.TextDocumentSyncKind.None);for(let e of g)e.fillServerCapabilities(n);return t}));{let e={capabilities:{textDocumentSync:i.TextDocumentSyncKind.None}};for(let t of g)t.fillServerCapabilities(e.capabilities);return e}})),a.onRequest(i.ShutdownRequest.type,(()=>(t.shutdownReceived=!0,v?v((new i.CancellationTokenSource).token):void 0))),a.onNotification(i.ExitNotification.type,(()=>{try{T&&T()}finally{t.shutdownReceived?t.exit(0):t.exit(1)}})),a.onNotification(i.SetTraceNotification.type,(e=>{c.trace=i.Trace.fromString(e.value)})),k}},5421:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ShowDocumentFeature=void 0;const i=n(273);t.ShowDocumentFeature=e=>class extends e{showDocument(e){return this.connection.sendRequest(i.ShowDocumentRequest.type,e)}}},289:(e,t)=>{function n(e){return"string"==typeof e||e instanceof String}function i(e){return"function"==typeof e}function r(e){return Array.isArray(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.thenable=t.typedArray=t.stringArray=t.array=t.func=t.error=t.number=t.string=t.boolean=void 0,t.boolean=function(e){return!0===e||!1===e},t.string=n,t.number=function(e){return"number"==typeof e||e instanceof Number},t.error=function(e){return e instanceof Error},t.func=i,t.array=r,t.stringArray=function(e){return r(e)&&e.every((e=>n(e)))},t.typedArray=function(e,t){return Array.isArray(e)&&e.every(t)},t.thenable=function(e){return e&&i(e.then)}},7560:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.generateUuid=t.parse=t.isUUID=t.v4=t.empty=void 0;class n{constructor(e){this._value=e}asHex(){return this._value}equals(e){return this.asHex()===e.asHex()}}class i extends n{constructor(){super([i._randomHex(),i._randomHex(),i._randomHex(),i._randomHex(),i._randomHex(),i._randomHex(),i._randomHex(),i._randomHex(),"-",i._randomHex(),i._randomHex(),i._randomHex(),i._randomHex(),"-","4",i._randomHex(),i._randomHex(),i._randomHex(),"-",i._oneOf(i._timeHighBits),i._randomHex(),i._randomHex(),i._randomHex(),"-",i._randomHex(),i._randomHex(),i._randomHex(),i._randomHex(),i._randomHex(),i._randomHex(),i._randomHex(),i._randomHex(),i._randomHex(),i._randomHex(),i._randomHex(),i._randomHex()].join(""))}static _oneOf(e){return e[Math.floor(e.length*Math.random())]}static _randomHex(){return i._oneOf(i._chars)}}function r(){return new i}i._chars=["0","1","2","3","4","5","6","6","7","8","9","a","b","c","d","e","f"],i._timeHighBits=["8","9","a","b"],t.empty=new n("00000000-0000-0000-0000-000000000000"),t.v4=r;const o=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function s(e){return o.test(e)}t.isUUID=s,t.parse=function(e){if(!s(e))throw new Error("invalid uuid");return new n(e)},t.generateUuid=function(){return r().asHex()}},8634:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.WorkspaceFoldersFeature=void 0;const i=n(273);t.WorkspaceFoldersFeature=e=>class extends e{initialize(e){let t=e.workspace;t&&t.workspaceFolders&&(this._onDidChangeWorkspaceFolders=new i.Emitter,this.connection.onNotification(i.DidChangeWorkspaceFoldersNotification.type,(e=>{this._onDidChangeWorkspaceFolders.fire(e.event)})))}getWorkspaceFolders(){return this.connection.sendRequest(i.WorkspaceFoldersRequest.type)}get onDidChangeWorkspaceFolders(){if(!this._onDidChangeWorkspaceFolders)throw new Error("Client doesn't support sending workspace folder change events.");return this._unregistration||(this._unregistration=this.connection.client.register(i.DidChangeWorkspaceFoldersNotification.type)),this._onDidChangeWorkspaceFolders.event}}},7613:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.resolveModulePath=t.FileSystem=t.resolveGlobalYarnPath=t.resolveGlobalNodePath=t.resolve=t.uriToFilePath=void 0;const i=n(8835),r=n(5622),o=n(5747),s=n(3129);function a(){return"win32"===process.platform}function c(e,t,n,i){const a=["var p = process;","p.on('message',function(m){","if(m.c==='e'){","p.exit(0);","}","else if(m.c==='rs'){","try{","var r=require.resolve(m.a);","p.send({c:'r',s:true,r:r});","}","catch(err){","p.send({c:'r',s:false});","}","}","});"].join("");return new Promise(((c,u)=>{let l=process.env,d=Object.create(null);Object.keys(l).forEach((e=>d[e]=l[e])),t&&o.existsSync(t)&&(d.NODE_PATH?d.NODE_PATH=t+r.delimiter+d.NODE_PATH:d.NODE_PATH=t,i&&i(`NODE_PATH value is: ${d.NODE_PATH}`)),d.ELECTRON_RUN_AS_NODE="1";try{let t=s.fork("",[],{cwd:n,env:d,execArgv:["-e",a]});if(void 0===t.pid)return void u(new Error(`Starting process to resolve node module ${e} failed`));t.on("error",(e=>{u(e)})),t.on("message",(n=>{"r"===n.c&&(t.send({c:"e"}),n.s?c(n.r):u(new Error(`Failed to resolve module: ${e}`)))}));let i={c:"rs",a:e};t.send(i)}catch(e){u(e)}}))}function u(e){let t="npm";const n=Object.create(null);Object.keys(process.env).forEach((e=>n[e]=process.env[e])),n.NO_UPDATE_NOTIFIER="true";const i={encoding:"utf8",env:n};a()&&(t="npm.cmd",i.shell=!0);let o=()=>{};try{process.on("SIGPIPE",o);let n=s.spawnSync(t,["config","get","prefix"],i).stdout;if(!n)return void(e&&e("'npm config get prefix' didn't return a value."));let c=n.trim();return e&&e(`'npm config get prefix' value is: ${c}`),c.length>0?a()?r.join(c,"node_modules"):r.join(c,"lib","node_modules"):void 0}catch(e){return}finally{process.removeListener("SIGPIPE",o)}}var l;t.uriToFilePath=function(e){let t=i.parse(e);if("file:"!==t.protocol||!t.path)return;let n=t.path.split("/");for(var o=0,s=n.length;o<s;o++)n[o]=decodeURIComponent(n[o]);if("win32"===process.platform&&n.length>1){let e=n[0],t=n[1];0===e.length&&t.length>1&&":"===t[1]&&n.shift()}return r.normalize(n.join("/"))},t.resolve=c,t.resolveGlobalNodePath=u,t.resolveGlobalYarnPath=function(e){let t="yarn",n={encoding:"utf8"};a()&&(t="yarn.cmd",n.shell=!0);let i=()=>{};try{process.on("SIGPIPE",i);let o=s.spawnSync(t,["global","dir","--json"],n),a=o.stdout;if(!a)return void(e&&(e("'yarn global dir' didn't return a value."),o.stderr&&e(o.stderr)));let c=a.trim().split(/\r?\n/);for(let e of c)try{let t=JSON.parse(e);if("log"===t.type)return r.join(t.data,"node_modules")}catch(e){}return}catch(e){return}finally{process.removeListener("SIGPIPE",i)}},function(e){let t;function n(){return void 0!==t||(t=!("win32"===process.platform||o.existsSync(__filename.toUpperCase())&&o.existsSync(__filename.toLowerCase()))),t}e.isCaseSensitive=n,e.isParent=function(e,t){return n()?0===r.normalize(t).indexOf(r.normalize(e)):0===r.normalize(t).toLowerCase().indexOf(r.normalize(e).toLowerCase())}}(l=t.FileSystem||(t.FileSystem={})),t.resolveModulePath=function(e,t,n,i){return n?(r.isAbsolute(n)||(n=r.join(e,n)),c(t,n,n,i).then((e=>l.isParent(n,e)?e:Promise.reject(new Error(`Failed to load ${t} from node path location.`)))).then(void 0,(n=>c(t,u(i),e,i)))):c(t,u(i),e,i)}},5809:function(e,t,n){var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n),Object.defineProperty(e,i,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||i(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.createConnection=t.Files=void 0;const o=n(289),s=n(9891),a=n(7613),c=n(6560);var u;r(n(6560),t),r(n(6265),t),(u=t.Files||(t.Files={})).uriToFilePath=a.uriToFilePath,u.resolveGlobalNodePath=a.resolveGlobalNodePath,u.resolveGlobalYarnPath=a.resolveGlobalYarnPath,u.resolve=a.resolve,u.resolveModulePath=a.resolveModulePath;let l,d=!1;!function(){const e="--clientProcessId";function t(e){try{let t=parseInt(e);isNaN(t)||(l=setInterval((()=>{try{process.kill(t,0)}catch(e){process.exit(d?0:1)}}),3e3))}catch(e){}}for(let n=2;n<process.argv.length;n++){let i=process.argv[n];if(i===e&&n+1<process.argv.length)return void t(process.argv[n+1]);{let n=i.split("=");n[0]===e&&t(n[1])}}}();const h={initialize:e=>{const t=e.processId;o.number(t)&&void 0===l&&setInterval((()=>{try{process.kill(t,0)}catch(e){process.exit(d?0:1)}}),3e3)},get shutdownReceived(){return d},set shutdownReceived(e){d=e},exit:e=>{process.exit(e)}};t.createConnection=function(e,t,n,i){let r,a,u,l;return void 0!==e&&"features"===e.__brand&&(r=e,e=t,t=n,n=i),c.ConnectionStrategy.is(e)||c.ConnectionOptions.is(e)?l=e:(a=e,u=t,l=n),function(e,t,n,i){if(!e&&!t&&process.argv.length>2){let n,i,o=process.argv.slice(2);for(let s=0;s<o.length;s++){let a=o[s];if("--node-ipc"===a){e=new c.IPCMessageReader(process),t=new c.IPCMessageWriter(process);break}if("--stdio"===a){e=process.stdin,t=process.stdout;break}if("--socket"===a){n=parseInt(o[s+1]);break}if("--pipe"===a){i=o[s+1];break}var r=a.split("=");if("--socket"===r[0]){n=parseInt(r[1]);break}if("--pipe"===r[0]){i=r[1];break}}if(n){let i=c.createServerSocketTransport(n);e=i[0],t=i[1]}else if(i){let n=c.createServerPipeTransport(i);e=n[0],t=n[1]}}var a="Use arguments of createConnection or set command line parameters: '--node-ipc', '--stdio' or '--socket={number}'";if(!e)throw new Error("Connection input stream is not set. "+a);if(!t)throw new Error("Connection output stream is not set. "+a);if(o.func(e.read)&&o.func(e.on)){let t=e;t.on("end",(()=>{process.exit(d?0:1)})),t.on("close",(()=>{process.exit(d?0:1)}))}return s.createConnection((i=>c.createProtocolConnection(e,t,i,n)),h,i)}(a,u,l,r)}},8212:(e,t,n)=>{e.exports=n(5809)},7373:(e,t,n)=>{n.r(t),n.d(t,{URI:()=>g,uriToFsPath:()=>b});var i,r,o,s=(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});if("object"==typeof process)o="win32"===process.platform;else if("object"==typeof navigator){var a=navigator.userAgent;o=a.indexOf("Windows")>=0}var c=/^\w[\w\d+.-]*$/,u=/^\//,l=/^\/\//,d="",h="/",f=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/,g=function(){function e(e,t,n,i,r,o){void 0===o&&(o=!1),"object"==typeof e?(this.scheme=e.scheme||d,this.authority=e.authority||d,this.path=e.path||d,this.query=e.query||d,this.fragment=e.fragment||d):(this.scheme=function(e,t){return e||t?e:"file"}(e,o),this.authority=t||d,this.path=function(e,t){switch(e){case"https":case"http":case"file":t?t[0]!==h&&(t=h+t):t=h}return t}(this.scheme,n||d),this.query=i||d,this.fragment=r||d,function(e,t){if(!e.scheme&&t)throw new Error('[UriError]: Scheme is missing: {scheme: "", authority: "'+e.authority+'", path: "'+e.path+'", query: "'+e.query+'", fragment: "'+e.fragment+'"}');if(e.scheme&&!c.test(e.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(e.path)if(e.authority){if(!u.test(e.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(l.test(e.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}(this,o))}return e.isUri=function(t){return t instanceof e||!!t&&"string"==typeof t.authority&&"string"==typeof t.fragment&&"string"==typeof t.path&&"string"==typeof t.query&&"string"==typeof t.scheme&&"function"==typeof t.fsPath&&"function"==typeof t.with&&"function"==typeof t.toString},Object.defineProperty(e.prototype,"fsPath",{get:function(){return b(this,!1)},enumerable:!0,configurable:!0}),e.prototype.with=function(e){if(!e)return this;var t=e.scheme,n=e.authority,i=e.path,r=e.query,o=e.fragment;return void 0===t?t=this.scheme:null===t&&(t=d),void 0===n?n=this.authority:null===n&&(n=d),void 0===i?i=this.path:null===i&&(i=d),void 0===r?r=this.query:null===r&&(r=d),void 0===o?o=this.fragment:null===o&&(o=d),t===this.scheme&&n===this.authority&&i===this.path&&r===this.query&&o===this.fragment?this:new m(t,n,i,r,o)},e.parse=function(e,t){void 0===t&&(t=!1);var n=f.exec(e);return n?new m(n[2]||d,T(n[4]||d),T(n[5]||d),T(n[7]||d),T(n[9]||d),t):new m(d,d,d,d,d)},e.file=function(e){var t=d;if(o&&(e=e.replace(/\\/g,h)),e[0]===h&&e[1]===h){var n=e.indexOf(h,2);-1===n?(t=e.substring(2),e=h):(t=e.substring(2,n),e=e.substring(n)||h)}return new m("file",t,e,d,d)},e.from=function(e){return new m(e.scheme,e.authority,e.path,e.query,e.fragment)},e.prototype.toString=function(e){return void 0===e&&(e=!1),R(this,e)},e.prototype.toJSON=function(){return this},e.revive=function(t){if(t){if(t instanceof e)return t;var n=new m(t);return n._formatted=t.external,n._fsPath=t._sep===p?t.fsPath:null,n}return t},e}(),p=o?1:void 0,m=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._formatted=null,t._fsPath=null,t}return s(t,e),Object.defineProperty(t.prototype,"fsPath",{get:function(){return this._fsPath||(this._fsPath=b(this,!1)),this._fsPath},enumerable:!0,configurable:!0}),t.prototype.toString=function(e){return void 0===e&&(e=!1),e?R(this,!0):(this._formatted||(this._formatted=R(this,!1)),this._formatted)},t.prototype.toJSON=function(){var e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=p),this._formatted&&(e.external=this._formatted),this.path&&(e.path=this.path),this.scheme&&(e.scheme=this.scheme),this.authority&&(e.authority=this.authority),this.query&&(e.query=this.query),this.fragment&&(e.fragment=this.fragment),e},t}(g),y=((r={})[58]="%3A",r[47]="%2F",r[63]="%3F",r[35]="%23",r[91]="%5B",r[93]="%5D",r[64]="%40",r[33]="%21",r[36]="%24",r[38]="%26",r[39]="%27",r[40]="%28",r[41]="%29",r[42]="%2A",r[43]="%2B",r[44]="%2C",r[59]="%3B",r[61]="%3D",r[32]="%20",r);function v(e,t){for(var n=void 0,i=-1,r=0;r<e.length;r++){var o=e.charCodeAt(r);if(o>=97&&o<=122||o>=65&&o<=90||o>=48&&o<=57||45===o||46===o||95===o||126===o||t&&47===o)-1!==i&&(n+=encodeURIComponent(e.substring(i,r)),i=-1),void 0!==n&&(n+=e.charAt(r));else{void 0===n&&(n=e.substr(0,r));var s=y[o];void 0!==s?(-1!==i&&(n+=encodeURIComponent(e.substring(i,r)),i=-1),n+=s):-1===i&&(i=r)}}return-1!==i&&(n+=encodeURIComponent(e.substring(i))),void 0!==n?n:e}function _(e){for(var t=void 0,n=0;n<e.length;n++){var i=e.charCodeAt(n);35===i||63===i?(void 0===t&&(t=e.substr(0,n)),t+=y[i]):void 0!==t&&(t+=e[n])}return void 0!==t?t:e}function b(e,t){var n;return n=e.authority&&e.path.length>1&&"file"===e.scheme?"//"+e.authority+e.path:47===e.path.charCodeAt(0)&&(e.path.charCodeAt(1)>=65&&e.path.charCodeAt(1)<=90||e.path.charCodeAt(1)>=97&&e.path.charCodeAt(1)<=122)&&58===e.path.charCodeAt(2)?t?e.path.substr(1):e.path[1].toLowerCase()+e.path.substr(2):e.path,o&&(n=n.replace(/\//g,"\\")),n}function R(e,t){var n=t?_:v,i="",r=e.scheme,o=e.authority,s=e.path,a=e.query,c=e.fragment;if(r&&(i+=r,i+=":"),(o||"file"===r)&&(i+=h,i+=h),o){var u=o.indexOf("@");if(-1!==u){var l=o.substr(0,u);o=o.substr(u+1),-1===(u=l.indexOf(":"))?i+=n(l,!1):(i+=n(l.substr(0,u),!1),i+=":",i+=n(l.substr(u+1),!1)),i+="@"}-1===(u=(o=o.toLowerCase()).indexOf(":"))?i+=n(o,!1):(i+=n(o.substr(0,u),!1),i+=o.substr(u))}if(s){if(s.length>=3&&47===s.charCodeAt(0)&&58===s.charCodeAt(2))(d=s.charCodeAt(1))>=65&&d<=90&&(s="/"+String.fromCharCode(d+32)+":"+s.substr(3));else if(s.length>=2&&58===s.charCodeAt(1)){var d;(d=s.charCodeAt(0))>=65&&d<=90&&(s=String.fromCharCode(d+32)+":"+s.substr(2))}i+=n(s,!0)}return a&&(i+="?",i+=n(a,!1)),c&&(i+="#",i+=t?c:v(c,!1)),i}function w(e){try{return decodeURIComponent(e)}catch(t){return e.length>3?e.substr(0,3)+w(e.substr(3)):e}}var C=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function T(e){return e.match(C)?e.replace(C,(function(e){return w(e)})):e}},3129:e=>{e.exports=require("child_process")},6417:e=>{e.exports=require("crypto")},5747:e=>{e.exports=require("fs")},1631:e=>{e.exports=require("net")},2087:e=>{e.exports=require("os")},5622:e=>{e.exports=require("path")},8835:e=>{e.exports=require("url")},1669:e=>{e.exports=require("util")}},t={};function n(i){if(t[i])return t[i].exports;var r=t[i]={exports:{}};return e[i].call(r.exports,r,r.exports,n),r.exports}return n.d=(e,t)=>{for(var i in t)n.o(t,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n(3816)})());
|
|
//# sourceMappingURL=eslintServer.js.map
|