code-server
Version:
Run VS Code on a remote server.
2 lines • 324 kB
JavaScript
(()=>{var e={2775:(e,t,n)=>{(()=>{var e={46:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,{signal:n}={}){return new Promise(((r,o)=>{function i(){null==n||n.removeEventListener("abort",i),e.removeListener(t,s),e.removeListener("error",a)}function s(...e){i(),r(e)}function a(e){i(),o(e)}null==n||n.addEventListener("abort",i),e.on(t,s),e.on("error",a)}))}},54:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};const o=n(361),i=r(n(374)),s=r(n(304)),a=i.default("agent-base");function c(){const{stack:e}=new Error;return"string"==typeof e&&e.split("\n").some((e=>-1!==e.indexOf("(https.js:")||-1!==e.indexOf("node:https:")))}function u(e,t){return new u.Agent(e,t)}!function(e){class t extends o.EventEmitter{constructor(e,t){super();let n=t;"function"==typeof e?this.callback=e:e&&(n=e),this.timeout=null,n&&"number"==typeof n.timeout&&(this.timeout=n.timeout),this.maxFreeSockets=1,this.maxSockets=1,this.maxTotalSockets=1/0,this.sockets={},this.freeSockets={},this.requests={},this.options={}}get defaultPort(){return"number"==typeof this.explicitDefaultPort?this.explicitDefaultPort:c()?443:80}set defaultPort(e){this.explicitDefaultPort=e}get protocol(){return"string"==typeof this.explicitProtocol?this.explicitProtocol:c()?"https:":"http:"}set protocol(e){this.explicitProtocol=e}callback(e,t,n){throw new Error('"agent-base" has no default implementation, you must subclass and override `callback()`')}addRequest(e,t){const n=Object.assign({},t);"boolean"!=typeof n.secureEndpoint&&(n.secureEndpoint=c()),null==n.host&&(n.host="localhost"),null==n.port&&(n.port=n.secureEndpoint?443:80),null==n.protocol&&(n.protocol=n.secureEndpoint?"https:":"http:"),n.host&&n.path&&delete n.path,delete n.agent,delete n.hostname,delete n._defaultAgent,delete n.defaultPort,delete n.createConnection,e._last=!0,e.shouldKeepAlive=!1;let r=!1,o=null;const i=n.timeout||this.timeout,u=t=>{e._hadError||(e.emit("error",t),e._hadError=!0)},l=()=>{o=null,r=!0;const e=new Error(`A "socket" was not created for HTTP request before ${i}ms`);e.code="ETIMEOUT",u(e)},d=e=>{r||(null!==o&&(clearTimeout(o),o=null),u(e))},f=t=>{if(r)return;if(null!=o&&(clearTimeout(o),o=null),i=t,Boolean(i)&&"function"==typeof i.addRequest)return a("Callback returned another Agent instance %o",t.constructor.name),void t.addRequest(e,n);var i;if(t)return t.once("free",(()=>{this.freeSocket(t,n)})),void e.onSocket(t);const s=new Error(`no Duplex stream was returned to agent-base for \`${e.method} ${e.path}\``);u(s)};if("function"==typeof this.callback){this.promisifiedCallback||(this.callback.length>=3?(a("Converting legacy callback function to promise"),this.promisifiedCallback=s.default(this.callback)):this.promisifiedCallback=this.callback),"number"==typeof i&&i>0&&(o=setTimeout(l,i)),"port"in n&&"number"!=typeof n.port&&(n.port=Number(n.port));try{a("Resolving socket for %o request: %o",n.protocol,`${e.method} ${e.path}`),Promise.resolve(this.promisifiedCallback(e,n)).then(f,d)}catch(e){Promise.reject(e).catch(d)}}else u(new Error("`callback` is not defined"))}freeSocket(e,t){a("Freeing socket %o %o",e.constructor.name,t),e.destroy()}destroy(){a("Destroying agent %o",this.constructor.name)}}e.Agent=t,e.prototype=e.Agent.prototype}(u||(u={})),e.exports=u},304:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return function(t,n){return new Promise(((r,o)=>{e.call(this,t,n,((e,t)=>{e?o(e):r(t)}))}))}}},370:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{c(r.next(e))}catch(e){i(e)}}function a(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((r=r.apply(e,t||[])).next())}))},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=o(n(808)),s=o(n(404)),a=o(n(310)),c=o(n(374)),u=o(n(46)),l=n(54),d=(0,c.default)("http-proxy-agent");class f extends l.Agent{constructor(e){let t;if(t="string"==typeof e?a.default.parse(e):e,!t)throw new Error("an HTTP(S) proxy server `host` and `port` must be specified!");d("Creating new HttpProxyAgent instance: %o",t),super(t);const n=Object.assign({},t);var r;this.secureProxy=t.secureProxy||"string"==typeof(r=n.protocol)&&/^https:?$/i.test(r),n.host=n.hostname||n.host,"string"==typeof n.port&&(n.port=parseInt(n.port,10)),!n.port&&n.host&&(n.port=this.secureProxy?443:80),n.host&&n.path&&(delete n.path,delete n.pathname),this.proxy=n}callback(e,t){return r(this,void 0,void 0,(function*(){const{proxy:n,secureProxy:r}=this,o=a.default.parse(e.path);let c;if(o.protocol||(o.protocol="http:"),o.hostname||(o.hostname=t.hostname||t.host||null),null==o.port&&(t.port,1)&&(o.port=String(t.port)),"80"===o.port&&(o.port=""),e.path=a.default.format(o),n.auth&&e.setHeader("Proxy-Authorization",`Basic ${Buffer.from(n.auth).toString("base64")}`),r?(d("Creating `tls.Socket`: %o",n),c=s.default.connect(n)):(d("Creating `net.Socket`: %o",n),c=i.default.connect(n)),e._header){let t,n;d("Regenerating stored HTTP header string for request"),e._header=null,e._implicitHeader(),e.output&&e.output.length>0?(d("Patching connection write() output buffer with updated header"),t=e.output[0],n=t.indexOf("\r\n\r\n")+4,e.output[0]=e._header+t.substring(n),d("Output buffer: %o",e.output)):e.outputData&&e.outputData.length>0&&(d("Patching connection write() output buffer with updated header"),t=e.outputData[0].data,n=t.indexOf("\r\n\r\n")+4,e.outputData[0].data=e._header+t.substring(n),d("Output buffer: %o",e.outputData[0].data))}return yield(0,u.default)(c,"connect"),c}))}}t.default=f},201:function(e,t,n){"use strict";const r=(this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(n(370));function o(e){return new r.default(e)}!function(e){e.HttpProxyAgent=r.default,e.prototype=r.default.prototype}(o||(o={})),e.exports=o},146:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{c(r.next(e))}catch(e){i(e)}}function a(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((r=r.apply(e,t||[])).next())}))},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=o(n(808)),s=o(n(404)),a=o(n(310)),c=o(n(491)),u=o(n(374)),l=n(54),d=o(n(829)),f=u.default("https-proxy-agent:agent");class h extends l.Agent{constructor(e){let t;if(t="string"==typeof e?a.default.parse(e):e,!t)throw new Error("an HTTP(S) proxy server `host` and `port` must be specified!");f("creating new HttpsProxyAgent instance: %o",t),super(t);const n=Object.assign({},t);var r;this.secureProxy=t.secureProxy||"string"==typeof(r=n.protocol)&&/^https:?$/i.test(r),n.host=n.hostname||n.host,"string"==typeof n.port&&(n.port=parseInt(n.port,10)),!n.port&&n.host&&(n.port=this.secureProxy?443:80),this.secureProxy&&!("ALPNProtocols"in n)&&(n.ALPNProtocols=["http 1.1"]),n.host&&n.path&&(delete n.path,delete n.pathname),this.proxy=n}callback(e,t){return r(this,void 0,void 0,(function*(){const{proxy:n,secureProxy:r}=this;let o;r?(f("Creating `tls.Socket`: %o",n),o=s.default.connect(n)):(f("Creating `net.Socket`: %o",n),o=i.default.connect(n));const a=Object.assign({},n.headers);let u=`CONNECT ${t.host}:${t.port} HTTP/1.1\r\n`;n.auth&&(a["Proxy-Authorization"]=`Basic ${Buffer.from(n.auth).toString("base64")}`);let{host:l,port:h,secureEndpoint:m}=t;(function(e,t){return Boolean(!t&&80===e||t&&443===e)})(h,m)||(l+=`:${h}`),a.Host=l,a.Connection="close";for(const e of Object.keys(a))u+=`${e}: ${a[e]}\r\n`;const g=d.default(o);o.write(`${u}\r\n`);const{statusCode:y,buffered:v}=yield g;if(200===y){if(e.once("socket",p),t.secureEndpoint){const e=t.servername||t.host;if(!e)throw new Error('Could not determine "servername"');return f("Upgrading socket connection to TLS"),s.default.connect(Object.assign(Object.assign({},function(e,...t){const n={};let r;for(r in e)t.includes(r)||(n[r]=e[r]);return n}(t,"host","hostname","path","port")),{socket:o,servername:e}))}return o}o.destroy();const b=new i.default.Socket;return b.readable=!0,e.once("socket",(e=>{f("replaying proxy buffer for failed request"),c.default(e.listenerCount("data")>0),e.push(v),e.push(null)})),b}))}}function p(e){e.resume()}t.default=h},18:function(e,t,n){"use strict";const r=(this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(n(146));function o(e){return new r.default(e)}!function(e){e.HttpsProxyAgent=r.default,e.prototype=r.default.prototype}(o||(o={})),e.exports=o},829:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const o=r(n(374)).default("https-proxy-agent:parse-proxy-response");t.default=function(e){return new Promise(((t,n)=>{let r=0;const i=[];function s(){const n=e.read();n?function(e){i.push(e),r+=e.length;const n=Buffer.concat(i,r);if(-1===n.indexOf("\r\n\r\n"))return o("have not received end of HTTP headers yet..."),void s();const a=n.toString("ascii",0,n.indexOf("\r\n")),c=+a.split(" ")[1];o("got proxy server response: %o",a),t({statusCode:c,buffered:n})}(n):e.once("readable",s)}function a(e){o("onclose had error %o",e)}function c(){o("onend")}e.on("error",(function t(r){e.removeListener("end",c),e.removeListener("error",t),e.removeListener("close",a),e.removeListener("readable",s),o("onerror %o",r),n(r)})),e.on("close",a),e.on("end",c),s()}))}},539:function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.getErrorStatusDescription=t.xhr=t.configure=void 0;var o=n(310),i=n(687),s=n(685),a=n(796),c=n(472),u=n(18),l=n(201);if(process.env.VSCODE_NLS_CONFIG){var d=process.env.VSCODE_NLS_CONFIG;c.config(JSON.parse(d))}var f=c.loadMessageBundle(),h=void 0,p=!0;function m(e){var t;return new Promise((function(n,r){var a=(0,o.parse)(e.url),c={hostname:a.hostname,agent:!!e.agent&&e.agent,port:a.port?parseInt(a.port):"https:"===a.protocol?443:80,path:a.path,method:e.type||"GET",headers:e.headers,rejectUnauthorized:"boolean"!=typeof e.strictSSL||e.strictSSL};e.user&&e.password&&(c.auth=e.user+":"+e.password);var u=function(r){if(r.statusCode>=300&&r.statusCode<400&&e.followRedirects&&e.followRedirects>0&&r.headers.location){var i=r.headers.location;i.startsWith("/")&&(i=(0,o.format)({protocol:a.protocol,hostname:a.hostname,port:a.port,pathname:i})),n(m(function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return t.forEach((function(t){return Object.keys(t).forEach((function(n){return e[n]=t[n]}))})),e}({},e,{url:i,followRedirects:e.followRedirects-1})))}else n({req:t,res:r})};(t="https:"===a.protocol?i.request(c,u):s.request(c,u)).on("error",r),e.timeout&&t.setTimeout(e.timeout),e.data&&t.write(e.data),t.end()}))}t.configure=function(e,t){h=e,p=t},t.xhr=function(e){return"boolean"!=typeof(e=r({},e)).strictSSL&&(e.strictSSL=p),e.agent||(e.agent=function(e,t){void 0===t&&(t={});var n=(0,o.parse)(e),r=t.proxyUrl||function(e){return"http:"===e.protocol?process.env.HTTP_PROXY||process.env.http_proxy||null:"https:"===e.protocol&&(process.env.HTTPS_PROXY||process.env.https_proxy||process.env.HTTP_PROXY||process.env.http_proxy)||null}(n);if(!r)return null;var i=(0,o.parse)(r);if(!/^https?:$/.test(i.protocol))return null;var s={host:i.hostname,port:Number(i.port),auth:i.auth,rejectUnauthorized:"boolean"!=typeof t.strictSSL||t.strictSSL,protocol:i.protocol};return"http:"===n.protocol?l(s):u(s)}(e.url,{proxyUrl:h,strictSSL:p})),"number"!=typeof e.followRedirects&&(e.followRedirects=5),m(e).then((function(n){return new Promise((function(r,i){var s,c,u=n.res,l=u,d=!1,h=u.headers&&u.headers["content-encoding"];if(h&&(s=e.type,c=n.res.statusCode,!("HEAD"===s||c>=100&&c<200||204===c||304===c))){var p={flush:a.constants.Z_SYNC_FLUSH,finishFlush:a.constants.Z_SYNC_FLUSH};if("gzip"===h){var m=a.createGunzip(p);u.pipe(m),l=m}else if("deflate"===h){var g=a.createInflate(p);u.pipe(g),l=g}}var y=[];l.on("data",(function(e){return y.push(e)})),l.on("end",(function(){if(!d){if(d=!0,e.followRedirects>0&&(u.statusCode>=300&&u.statusCode<=303||307===u.statusCode)){var n=u.headers.location;if(n.startsWith("/")){var s=(0,o.parse)(e.url);n=(0,o.format)({protocol:s.protocol,hostname:s.hostname,port:s.port,pathname:n})}if(n){var a={type:e.type,url:n,user:e.user,password:e.password,headers:e.headers,timeout:e.timeout,followRedirects:e.followRedirects-1,data:e.data};return void(0,t.xhr)(a).then(r,i)}}var c=Buffer.concat(y),l={responseText:c.toString(),body:c,status:u.statusCode,headers:u.headers||{}};u.statusCode>=200&&u.statusCode<300||1223===u.statusCode?r(l):i(l)}})),l.on("error",(function(t){var n={responseText:f("error","Unable to access {0}. Error: {1}",e.url,t.message),body:Buffer.concat(y),status:500,headers:{}};d=!0,i(n)}))}))}),(function(t){var n;return n=e.agent?f("error.cannot.connect.proxy","Unable to connect to {0} through a proxy. Error: {1}",e.url,t.message):f("error.cannot.connect","Unable to connect to {0}. Error: {1}",e.url,t.message),Promise.reject({responseText:n,body:Buffer.concat([]),status:404,headers:{}})}))},t.getErrorStatusDescription=function(e){if(!(e<400))switch(e){case 400:return f("status.400","Bad request. The request cannot be fulfilled due to bad syntax.");case 401:return f("status.401","Unauthorized. The server is refusing to respond.");case 403:return f("status.403","Forbidden. The server is refusing to respond.");case 404:return f("status.404","Not Found. The requested location could not be found.");case 405:return f("status.405","Method not allowed. A request was made using a request method not supported by that location.");case 406:return f("status.406","Not Acceptable. The server can only generate a response that is not accepted by the client.");case 407:return f("status.407","Proxy Authentication Required. The client must first authenticate itself with the proxy.");case 408:return f("status.408","Request Timeout. The server timed out waiting for the request.");case 409:return f("status.409","Conflict. The request could not be completed because of a conflict in the request.");case 410:return f("status.410","Gone. The requested page is no longer available.");case 411:return f("status.411",'Length Required. The "Content-Length" is not defined.');case 412:return f("status.412","Precondition Failed. The precondition given in the request evaluated to false by the server.");case 413:return f("status.413","Request Entity Too Large. The server will not accept the request, because the request entity is too large.");case 414:return f("status.414","Request-URI Too Long. The server will not accept the request, because the URL is too long.");case 415:return f("status.415","Unsupported Media Type. The server will not accept the request, because the media type is not supported.");case 500:return f("status.500","Internal Server Error.");case 501:return f("status.501","Not Implemented. The server either does not recognize the request method, or it lacks the ability to fulfill the request.");case 503:return f("status.503","Service Unavailable. The server is currently unavailable (overloaded or down).");default:return f("status.416","HTTP status code {0}",e)}}},800:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.config=t.loadMessageBundle=t.localize=t.format=t.setPseudo=t.isPseudo=t.isDefined=t.BundleFormat=t.MessageFormat=void 0;var r,o,i,s=n(926);function a(e){return void 0!==e}function c(e,n){return t.isPseudo&&(e="["+e.replace(/[aouei]/g,"$&$&")+"]"),0===n.length?e:e.replace(/\{(\d+)\}/g,(function(e,t){var r=t[0],o=n[r],i=e;return"string"==typeof o?i=o:"number"!=typeof o&&"boolean"!=typeof o&&null!=o||(i=String(o)),i}))}(i=t.MessageFormat||(t.MessageFormat={})).file="file",i.bundle="bundle",i.both="both",(o=t.BundleFormat||(t.BundleFormat={})).standalone="standalone",o.languagePack="languagePack",function(e){e.is=function(e){var t=e;return t&&a(t.key)&&a(t.comment)}}(r||(r={})),t.isDefined=a,t.isPseudo=!1,t.setPseudo=function(e){t.isPseudo=e},t.format=c,t.localize=function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return c(t,n)},t.loadMessageBundle=function(e){return s.default().loadMessageBundle(e)},t.config=function(e){return s.default().config(e)}},926:(e,t)=>{"use strict";var n;function r(){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}}(r||(r={})),t.default=r},472:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.config=t.loadMessageBundle=void 0;var r=n(17),o=n(147),i=n(926),s=n(800),a=n(800);Object.defineProperty(t,"MessageFormat",{enumerable:!0,get:function(){return a.MessageFormat}}),Object.defineProperty(t,"BundleFormat",{enumerable:!0,get:function(){return a.BundleFormat}});var c,u,l=Object.prototype.toString;function d(e){return"[object Number]"===l.call(e)}function f(e){return"[object String]"===l.call(e)}function h(e){return JSON.parse(o.readFileSync(e,"utf8"))}function p(e){return function(t,n){for(var r=[],o=2;o<arguments.length;o++)r[o-2]=arguments[o];return d(t)?t>=e.length?void console.error("Broken localize call found. Index out of bounds. Stacktrace is\n: "+new Error("").stack):s.format(e[t],r):f(n)?(console.warn("Message "+n+" didn't get externalized correctly."),s.format(n,r)):void console.error("Broken localize call found. Stacktrace is\n: "+new Error("").stack)}}function m(e,t){return c[e]=t,t}function g(e){try{return function(e){var t=h(r.join(e,"nls.metadata.json")),n=Object.create(null);for(var o in t){var i=t[o];n[o]=i.messages}return n}(e)}catch(e){return void console.log("Generating default bundle from meta data failed.",e)}}function y(e,t){var n;if(!0===u.languagePackSupport&&void 0!==u.cacheRoot&&void 0!==u.languagePackId&&void 0!==u.translationsConfigFile&&void 0!==u.translationsConfig)try{n=function(e,t){var n,i,s,a=r.join(u.cacheRoot,e.id+"-"+e.hash+".json"),c=!1,l=!1;try{return n=JSON.parse(o.readFileSync(a,{encoding:"utf8",flag:"r"})),i=a,s=new Date,o.utimes(i,s,s,(function(){})),n}catch(e){if("ENOENT"===e.code)l=!0;else{if(!(e instanceof SyntaxError))throw e;console.log("Syntax error parsing message bundle: "+e.message+"."),o.unlink(a,(function(e){e&&console.error("Deleting corrupted bundle "+a+" failed.")})),c=!0}}if(!(n=function(e,t){var n=u.translationsConfig[e.id];if(n){var o=h(n).contents,i=h(r.join(t,"nls.metadata.json")),s=Object.create(null);for(var a in i){var c=i[a],l=o[e.outDir+"/"+a];if(l){for(var d=[],p=0;p<c.keys.length;p++){var m=c.keys[p],g=l[f(m)?m:m.key];void 0===g&&(g=c.messages[p]),d.push(g)}s[a]=d}else s[a]=c.messages}return s}}(e,t))||c)return n;if(l)try{o.writeFileSync(a,JSON.stringify(n),{encoding:"utf8",flag:"wx"})}catch(e){if("EEXIST"===e.code)return n;throw e}return n}(e,t)}catch(e){console.log("Load or create bundle failed ",e)}if(!n){if(u.languagePackSupport)return g(t);var i=function(e){for(var t=u.language;t;){var n=r.join(e,"nls.bundle."+t+".json");if(o.existsSync(n))return n;var i=t.lastIndexOf("-");t=i>0?t.substring(0,i):void 0}if(void 0===t&&(n=r.join(e,"nls.bundle.json"),o.existsSync(n)))return n}(t);if(i)try{return h(i)}catch(e){console.log("Loading in the box message bundle failed.",e)}n=g(t)}return n}function v(e){if(!e)return s.localize;var t=r.extname(e);if(t&&(e=e.substr(0,e.length-t.length)),u.messageFormat===s.MessageFormat.both||u.messageFormat===s.MessageFormat.bundle){var n=function(e){for(var t,n=r.dirname(e);t=r.join(n,"nls.metadata.header.json"),!o.existsSync(t);){var i=r.dirname(n);if(i===n){t=void 0;break}n=i}return t}(e);if(n){var i=r.dirname(n),a=c[i];if(void 0===a)try{var l=JSON.parse(o.readFileSync(n,"utf8"));try{var d=y(l,i);a=m(i,d?{header:l,nlsBundle:d}:null)}catch(e){console.error("Failed to load nls bundle",e),a=m(i,null)}}catch(e){console.error("Failed to read header file",e),a=m(i,null)}if(a){var f=e.substr(i.length+1).replace(/\\/g,"/"),g=a.nlsBundle[f];return void 0===g?(console.error("Messages for file "+e+" not found. See console for details."),function(){return"Messages not found."}):p(g)}}}if(u.messageFormat===s.MessageFormat.both||u.messageFormat===s.MessageFormat.file)try{var v=h(function(e){var t;if(u.cacheLanguageResolution&&t)t=t;else{if(s.isPseudo||!u.language)t=".nls.json";else for(var n=u.language;n;){var r=".nls."+n+".json";if(o.existsSync(e+r)){t=r;break}var i=n.lastIndexOf("-");i>0?n=n.substring(0,i):(t=".nls.json",n=null)}u.cacheLanguageResolution&&(t=t)}return e+t}(e));return Array.isArray(v)?p(v):s.isDefined(v.messages)&&s.isDefined(v.keys)?p(v.messages):(console.error("String bundle '"+e+"' uses an unsupported format."),function(){return"File bundle has unsupported format. See console for details"})}catch(e){"ENOENT"!==e.code&&console.error("Failed to load single file bundle",e)}return console.error("Failed to load message bundle for file "+e),function(){return"Failed to load message bundle. See console for details."}}function b(e){return e&&(f(e.locale)&&(u.locale=e.locale.toLowerCase(),u.language=u.locale,c=Object.create(null)),void 0!==e.messageFormat&&(u.messageFormat=e.messageFormat),e.bundleFormat===s.BundleFormat.standalone&&!0===u.languagePackSupport&&(u.languagePackSupport=!1)),s.setPseudo("pseudo"===u.locale),v}!function(){if(u={locale:void 0,language:void 0,languagePackSupport:!1,cacheLanguageResolution:!0,messageFormat:s.MessageFormat.bundle},f(process.env.VSCODE_NLS_CONFIG))try{var e=JSON.parse(process.env.VSCODE_NLS_CONFIG),t=void 0;if(e.availableLanguages){var n=e.availableLanguages["*"];f(n)&&(t=n)}if(f(e.locale)&&(u.locale=e.locale.toLowerCase()),void 0===t?u.language=u.locale:"en"!==t&&(u.language=t),function(e){return!0===e||!1===e}(e._languagePackSupport)&&(u.languagePackSupport=e._languagePackSupport),f(e._cacheRoot)&&(u.cacheRoot=e._cacheRoot),f(e._languagePackId)&&(u.languagePackId=e._languagePackId),f(e._translationsConfigFile)){u.translationsConfigFile=e._translationsConfigFile;try{u.translationsConfig=h(u.translationsConfigFile)}catch(t){if(e._corruptedFile){var i=r.dirname(e._corruptedFile);o.exists(i,(function(t){t&&o.writeFile(e._corruptedFile,"corrupted","utf8",(function(e){console.error(e)}))}))}}}}catch(e){}s.setPseudo("pseudo"===u.locale),c=Object.create(null)}(),t.loadMessageBundle=v,t.config=b,i.default.install(Object.freeze({loadMessageBundle:v,config:b}))},374:(e,t)=>{function n(){}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return n}},491:e=>{"use strict";e.exports=n(2357)},361:e=>{"use strict";e.exports=n(8614)},147:e=>{"use strict";e.exports=n(5747)},685:e=>{"use strict";e.exports=n(8605)},687:e=>{"use strict";e.exports=n(7211)},808:e=>{"use strict";e.exports=n(1631)},17:e=>{"use strict";e.exports=n(5622)},404:e=>{"use strict";e.exports=n(4016)},310:e=>{"use strict";e.exports=n(8835)},796:e=>{"use strict";e.exports=n(8761)}},r={},o=function t(n){var o=r[n];if(void 0!==o)return o.exports;var i=r[n]={exports:{}};return e[n].call(i.exports,i,i.exports,t),i.exports}(539),i=t;for(var s in o)i[s]=o[s];o.__esModule&&Object.defineProperty(i,"__esModule",{value:!0})})()},8735:(e,t,n)=>{"use strict";function r(e,t){void 0===t&&(t=!1);var n=e.length,r=0,a="",c=0,u=16,l=0,d=0,f=0,h=0,p=0;function m(t,n){for(var o=0,i=0;o<t||!n;){var s=e.charCodeAt(r);if(s>=48&&s<=57)i=16*i+s-48;else if(s>=65&&s<=70)i=16*i+s-65+10;else{if(!(s>=97&&s<=102))break;i=16*i+s-97+10}r++,o++}return o<t&&(i=-1),i}function g(){if(a="",p=0,c=r,d=l,h=f,r>=n)return c=n,u=17;var t=e.charCodeAt(r);if(o(t)){do{r++,a+=String.fromCharCode(t),t=e.charCodeAt(r)}while(o(t));return u=15}if(i(t))return r++,a+=String.fromCharCode(t),13===t&&10===e.charCodeAt(r)&&(r++,a+="\n"),l++,f=r,u=14;switch(t){case 123:return r++,u=1;case 125:return r++,u=2;case 91:return r++,u=3;case 93:return r++,u=4;case 58:return r++,u=6;case 44:return r++,u=5;case 34:return r++,a=function(){for(var t="",o=r;;){if(r>=n){t+=e.substring(o,r),p=2;break}var s=e.charCodeAt(r);if(34===s){t+=e.substring(o,r),r++;break}if(92!==s){if(s>=0&&s<=31){if(i(s)){t+=e.substring(o,r),p=2;break}p=6}r++}else{if(t+=e.substring(o,r),++r>=n){p=2;break}switch(e.charCodeAt(r++)){case 34:t+='"';break;case 92:t+="\\";break;case 47:t+="/";break;case 98:t+="\b";break;case 102:t+="\f";break;case 110:t+="\n";break;case 114:t+="\r";break;case 116:t+="\t";break;case 117:var a=m(4,!0);a>=0?t+=String.fromCharCode(a):p=4;break;default:p=5}o=r}}return t}(),u=10;case 47:var g=r-1;if(47===e.charCodeAt(r+1)){for(r+=2;r<n&&!i(e.charCodeAt(r));)r++;return a=e.substring(g,r),u=12}if(42===e.charCodeAt(r+1)){r+=2;for(var v=n-1,b=!1;r<v;){var R=e.charCodeAt(r);if(42===R&&47===e.charCodeAt(r+1)){r+=2,b=!0;break}r++,i(R)&&(13===R&&10===e.charCodeAt(r)&&r++,l++,f=r)}return b||(r++,p=1),a=e.substring(g,r),u=13}return a+=String.fromCharCode(t),r++,u=16;case 45:if(a+=String.fromCharCode(t),++r===n||!s(e.charCodeAt(r)))return u=16;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return a+=function(){var t=r;if(48===e.charCodeAt(r))r++;else for(r++;r<e.length&&s(e.charCodeAt(r));)r++;if(r<e.length&&46===e.charCodeAt(r)){if(!(++r<e.length&&s(e.charCodeAt(r))))return p=3,e.substring(t,r);for(r++;r<e.length&&s(e.charCodeAt(r));)r++}var n=r;if(r<e.length&&(69===e.charCodeAt(r)||101===e.charCodeAt(r)))if((++r<e.length&&43===e.charCodeAt(r)||45===e.charCodeAt(r))&&r++,r<e.length&&s(e.charCodeAt(r))){for(r++;r<e.length&&s(e.charCodeAt(r));)r++;n=r}else p=3;return e.substring(t,n)}(),u=11;default:for(;r<n&&y(t);)r++,t=e.charCodeAt(r);if(c!==r){switch(a=e.substring(c,r)){case"true":return u=8;case"false":return u=9;case"null":return u=7}return u=16}return a+=String.fromCharCode(t),r++,u=16}}function y(e){if(o(e)||i(e))return!1;switch(e){case 125:case 93:case 123:case 91:case 34:case 58:case 44:case 47:return!1}return!0}return{setPosition:function(e){r=e,a="",c=0,u=16,p=0},getPosition:function(){return r},scan:t?function(){var e;do{e=g()}while(e>=12&&e<=15);return e}:g,getToken:function(){return u},getTokenValue:function(){return a},getTokenOffset:function(){return c},getTokenLength:function(){return r-c},getTokenStartLine:function(){return d},getTokenStartCharacter:function(){return c-h},getTokenError:function(){return p}}}function o(e){return 32===e||9===e}function i(e){return 10===e||13===e}function s(e){return e>=48&&e<=57}function a(e,t){for(var n="",r=0;r<t;r++)n+=e;return n}function c(e,t){return-1!=="\r\n".indexOf(e.charAt(t))}var u;n.r(t),n.d(t,{ClientCapabilities:()=>Ke,CodeAction:()=>Te,CodeActionContext:()=>Se,CodeActionKind:()=>xe,Color:()=>v,ColorInformation:()=>b,ColorPresentation:()=>R,Command:()=>_,CompletionItem:()=>ue,CompletionItemKind:()=>re,CompletionItemTag:()=>ie,CompletionList:()=>le,Diagnostic:()=>P,DiagnosticSeverity:()=>S,DocumentHighlight:()=>ge,DocumentHighlightKind:()=>me,DocumentLink:()=>_e,DocumentSymbol:()=>ke,DocumentUri:()=>l,ErrorCode:()=>Be,FoldingRange:()=>x,FoldingRangeKind:()=>k,Hover:()=>fe,InsertTextFormat:()=>oe,Location:()=>g,MarkedString:()=>de,MarkupContent:()=>ne,MarkupKind:()=>te,Position:()=>p,Range:()=>m,SelectionRange:()=>De,SymbolInformation:()=>be,SymbolKind:()=>ye,TextDocument:()=>ze,TextDocumentEdit:()=>N,TextEdit:()=>D,VersionedTextDocumentIdentifier:()=>Y,WorkspaceEdit:()=>I,getLanguageService:()=>nn}),function(e){e.DEFAULT={allowTrailingComma:!1}}(u||(u={}));var l,d,f,h,p,m,g,y,v,b,R,k,x,C,S,T,w,P,_,D,E,O,q,N,A,j,M,I,F=r,L=function(e,t,n){void 0===t&&(t=[]),void 0===n&&(n=u.DEFAULT);var o=null,i=[],s=[];function a(e){Array.isArray(i)?i.push(e):null!==o&&(i[o]=e)}return function(e,t,n){void 0===n&&(n=u.DEFAULT);var o=r(e,!1),i=[];function s(e){return e?function(){return e(o.getTokenOffset(),o.getTokenLength(),o.getTokenStartLine(),o.getTokenStartCharacter())}:function(){return!0}}function a(e){return e?function(){return e(o.getTokenOffset(),o.getTokenLength(),o.getTokenStartLine(),o.getTokenStartCharacter(),(function(){return i.slice()}))}:function(){return!0}}function c(e){return e?function(t){return e(t,o.getTokenOffset(),o.getTokenLength(),o.getTokenStartLine(),o.getTokenStartCharacter())}:function(){return!0}}function l(e){return e?function(t){return e(t,o.getTokenOffset(),o.getTokenLength(),o.getTokenStartLine(),o.getTokenStartCharacter(),(function(){return i.slice()}))}:function(){return!0}}var d=a(t.onObjectBegin),f=l(t.onObjectProperty),h=s(t.onObjectEnd),p=a(t.onArrayBegin),m=s(t.onArrayEnd),g=l(t.onLiteralValue),y=c(t.onSeparator),v=s(t.onComment),b=c(t.onError),R=n&&n.disallowComments,k=n&&n.allowTrailingComma;function x(){for(;;){var e=o.scan();switch(o.getTokenError()){case 4:C(14);break;case 5:C(15);break;case 3:C(13);break;case 1:R||C(11);break;case 2:C(12);break;case 6:C(16)}switch(e){case 12:case 13:R?C(10):v();break;case 16:C(1);break;case 15:case 14:break;default:return e}}}function C(e,t,n){if(void 0===t&&(t=[]),void 0===n&&(n=[]),b(e),t.length+n.length>0)for(var r=o.getToken();17!==r;){if(-1!==t.indexOf(r)){x();break}if(-1!==n.indexOf(r))break;r=x()}}function S(e){var t=o.getTokenValue();return e?g(t):(f(t),i.push(t)),x(),!0}x(),17===o.getToken()?!!n.allowEmptyContent||C(4,[],[]):function e(){switch(o.getToken()){case 3:return function(){p(),x();for(var t=!0,n=!1;4!==o.getToken()&&17!==o.getToken();){if(5===o.getToken()){if(n||C(4,[],[]),y(","),x(),4===o.getToken()&&k)break}else n&&C(6,[],[]);t?(i.push(0),t=!1):i[i.length-1]++,e()||C(4,[],[4,5]),n=!0}return m(),t||i.pop(),4!==o.getToken()?C(8,[4],[]):x(),!0}();case 1:return function(){d(),x();for(var t=!1;2!==o.getToken()&&17!==o.getToken();){if(5===o.getToken()){if(t||C(4,[],[]),y(","),x(),2===o.getToken()&&k)break}else t&&C(6,[],[]);(10!==o.getToken()?(C(3,[],[2,5]),0):(S(!1),6===o.getToken()?(y(":"),x(),e()||C(4,[],[2,5])):C(5,[],[2,5]),i.pop(),1))||C(4,[],[2,5]),t=!0}return h(),2!==o.getToken()?C(7,[2],[]):x(),!0}();case 10:return S(!0);default:return function(){switch(o.getToken()){case 11:var e=o.getTokenValue(),t=Number(e);isNaN(t)&&(C(2),t=0),g(t);break;case 7:g(null);break;case 8:g(!0);break;case 9:g(!1);break;default:return!1}return x(),!0}()}}()?17!==o.getToken()&&C(9,[],[]):C(4,[],[])}(e,{onObjectBegin:function(){var e={};a(e),s.push(i),i=e,o=null},onObjectProperty:function(e){o=e},onObjectEnd:function(){i=s.pop()},onArrayBegin:function(){var e=[];a(e),s.push(i),i=e,o=null},onArrayEnd:function(){i=s.pop()},onLiteralValue:a,onError:function(e,n,r){t.push({error:e,offset:n,length:r})}},n),i[0]},W=function e(t,n,r){if(void 0===r&&(r=!1),function(e,t,n){return void 0===n&&(n=!1),t>=e.offset&&t<e.offset+e.length||n&&t===e.offset+e.length}(t,n,r)){var o=t.children;if(Array.isArray(o))for(var i=0;i<o.length&&o[i].offset<=n;i++){var s=e(o[i],n,r);if(s)return s}return t}},$=function e(t){if(!t.parent||!t.parent.children)return[];var n=e(t.parent);if("property"===t.parent.type){var r=t.parent.children[0].value;n.push(r)}else if("array"===t.parent.type){var o=t.parent.children.indexOf(t);-1!==o&&n.push(o)}return n},V=function e(t){switch(t.type){case"array":return t.children.map(e);case"object":for(var n=Object.create(null),r=0,o=t.children;r<o.length;r++){var i=o[r],s=i.children[1];s&&(n[i.children[0].value]=e(s))}return n;case"null":case"string":case"number":case"boolean":return t.value;default:return}};function U(e,t){if(e===t)return!0;if(null==e||null==t)return!1;if(typeof e!=typeof t)return!1;if("object"!=typeof e)return!1;if(Array.isArray(e)!==Array.isArray(t))return!1;var n,r;if(Array.isArray(e)){if(e.length!==t.length)return!1;for(n=0;n<e.length;n++)if(!U(e[n],t[n]))return!1}else{var o=[];for(r in e)o.push(r);o.sort();var i=[];for(r in t)i.push(r);if(i.sort(),!U(o,i))return!1;for(n=0;n<o.length;n++)if(!U(e[o[n]],t[o[n]]))return!1}return!0}function H(e){return"number"==typeof e}function z(e){return void 0!==e}function B(e){return"boolean"==typeof e}function K(e){return"string"==typeof e}function J(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}function G(e,t){const n=e.length-t.length;return n>0?e.lastIndexOf(t)===n:0===n&&e===t}function X(e){let t="";(function(e,t){if(e.length<t.length)return!1;for(let n=0;n<t.length;n++)if(e[n]!==t[n])return!1;return!0})(e,"(?i)")&&(e=e.substring(4),t="i");try{return new RegExp(e,t+"u")}catch(n){try{return new RegExp(e,t)}catch(e){return}}}!function(e){e.is=function(e){return"string"==typeof e}}(l||(l={})),function(e){e.is=function(e){return"string"==typeof e}}(d||(d={})),function(e){e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647,e.is=function(t){return"number"==typeof t&&e.MIN_VALUE<=t&&t<=e.MAX_VALUE}}(f||(f={})),function(e){e.MIN_VALUE=0,e.MAX_VALUE=2147483647,e.is=function(t){return"number"==typeof t&&e.MIN_VALUE<=t&&t<=e.MAX_VALUE}}(h||(h={})),function(e){e.create=function(e,t){return e===Number.MAX_VALUE&&(e=h.MAX_VALUE),t===Number.MAX_VALUE&&(t=h.MAX_VALUE),{line:e,character:t}},e.is=function(e){var t=e;return He.objectLiteral(t)&&He.uinteger(t.line)&&He.uinteger(t.character)}}(p||(p={})),function(e){e.create=function(e,t,n,r){if(He.uinteger(e)&&He.uinteger(t)&&He.uinteger(n)&&He.uinteger(r))return{start:p.create(e,t),end:p.create(n,r)};if(p.is(e)&&p.is(t))return{start:e,end:t};throw new Error("Range#create called with invalid arguments[".concat(e,", ").concat(t,", ").concat(n,", ").concat(r,"]"))},e.is=function(e){var t=e;return He.objectLiteral(t)&&p.is(t.start)&&p.is(t.end)}}(m||(m={})),function(e){e.create=function(e,t){return{uri:e,range:t}},e.is=function(e){var t=e;return He.defined(t)&&m.is(t.range)&&(He.string(t.uri)||He.undefined(t.uri))}}(g||(g={})),function(e){e.create=function(e,t,n,r){return{targetUri:e,targetRange:t,targetSelectionRange:n,originSelectionRange:r}},e.is=function(e){var t=e;return He.defined(t)&&m.is(t.targetRange)&&He.string(t.targetUri)&&m.is(t.targetSelectionRange)&&(m.is(t.originSelectionRange)||He.undefined(t.originSelectionRange))}}(y||(y={})),function(e){e.create=function(e,t,n,r){return{red:e,green:t,blue:n,alpha:r}},e.is=function(e){var t=e;return He.objectLiteral(t)&&He.numberRange(t.red,0,1)&&He.numberRange(t.green,0,1)&&He.numberRange(t.blue,0,1)&&He.numberRange(t.alpha,0,1)}}(v||(v={})),function(e){e.create=function(e,t){return{range:e,color:t}},e.is=function(e){var t=e;return He.objectLiteral(t)&&m.is(t.range)&&v.is(t.color)}}(b||(b={})),function(e){e.create=function(e,t,n){return{label:e,textEdit:t,additionalTextEdits:n}},e.is=function(e){var t=e;return He.objectLiteral(t)&&He.string(t.label)&&(He.undefined(t.textEdit)||D.is(t))&&(He.undefined(t.additionalTextEdits)||He.typedArray(t.additionalTextEdits,D.is))}}(R||(R={})),function(e){e.Comment="comment",e.Imports="imports",e.Region="region"}(k||(k={})),function(e){e.create=function(e,t,n,r,o,i){var s={startLine:e,endLine:t};return He.defined(n)&&(s.startCharacter=n),He.defined(r)&&(s.endCharacter=r),He.defined(o)&&(s.kind=o),He.defined(i)&&(s.collapsedText=i),s},e.is=function(e){var t=e;return He.objectLiteral(t)&&He.uinteger(t.startLine)&&He.uinteger(t.startLine)&&(He.undefined(t.startCharacter)||He.uinteger(t.startCharacter))&&(He.undefined(t.endCharacter)||He.uinteger(t.endCharacter))&&(He.undefined(t.kind)||He.string(t.kind))}}(x||(x={})),function(e){e.create=function(e,t){return{location:e,message:t}},e.is=function(e){var t=e;return He.defined(t)&&g.is(t.location)&&He.string(t.message)}}(C||(C={})),function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4}(S||(S={})),function(e){e.Unnecessary=1,e.Deprecated=2}(T||(T={})),function(e){e.is=function(e){var t=e;return He.objectLiteral(t)&&He.string(t.href)}}(w||(w={})),function(e){e.create=function(e,t,n,r,o,i){var s={range:e,message:t};return He.defined(n)&&(s.severity=n),He.defined(r)&&(s.code=r),He.defined(o)&&(s.source=o),He.defined(i)&&(s.relatedInformation=i),s},e.is=function(e){var t,n=e;return He.defined(n)&&m.is(n.range)&&He.string(n.message)&&(He.number(n.severity)||He.undefined(n.severity))&&(He.integer(n.code)||He.string(n.code)||He.undefined(n.code))&&(He.undefined(n.codeDescription)||He.string(null===(t=n.codeDescription)||void 0===t?void 0:t.href))&&(He.string(n.source)||He.undefined(n.source))&&(He.undefined(n.relatedInformation)||He.typedArray(n.relatedInformation,C.is))}}(P||(P={})),function(e){e.create=function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var o={title:e,command:t};return He.defined(n)&&n.length>0&&(o.arguments=n),o},e.is=function(e){var t=e;return He.defined(t)&&He.string(t.title)&&He.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 He.objectLiteral(t)&&He.string(t.newText)&&m.is(t.range)}}(D||(D={})),function(e){e.create=function(e,t,n){var r={label:e};return void 0!==t&&(r.needsConfirmation=t),void 0!==n&&(r.description=n),r},e.is=function(e){var t=e;return He.objectLiteral(t)&&He.string(t.label)&&(He.boolean(t.needsConfirmation)||void 0===t.needsConfirmation)&&(He.string(t.description)||void 0===t.description)}}(E||(E={})),function(e){e.is=function(e){var t=e;return He.string(t)}}(O||(O={})),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 D.is(t)&&(E.is(t.annotationId)||O.is(t.annotationId))}}(q||(q={})),function(e){e.create=function(e,t){return{textDocument:e,edits:t}},e.is=function(e){var t=e;return He.defined(t)&&Q.is(t.textDocument)&&Array.isArray(t.edits)}}(N||(N={})),function(e){e.create=function(e,t,n){var r={kind:"create",uri:e};return void 0===t||void 0===t.overwrite&&void 0===t.ignoreIfExists||(r.options=t),void 0!==n&&(r.annotationId=n),r},e.is=function(e){var t=e;return t&&"create"===t.kind&&He.string(t.uri)&&(void 0===t.options||(void 0===t.options.overwrite||He.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||He.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||O.is(t.annotationId))}}(A||(A={})),function(e){e.create=function(e,t,n,r){var o={kind:"rename",oldUri:e,newUri:t};return void 0===n||void 0===n.overwrite&&void 0===n.ignoreIfExists||(o.options=n),void 0!==r&&(o.annotationId=r),o},e.is=function(e){var t=e;return t&&"rename"===t.kind&&He.string(t.oldUri)&&He.string(t.newUri)&&(void 0===t.options||(void 0===t.options.overwrite||He.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||He.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||O.is(t.annotationId))}}(j||(j={})),function(e){e.create=function(e,t,n){var r={kind:"delete",uri:e};return void 0===t||void 0===t.recursive&&void 0===t.ignoreIfNotExists||(r.options=t),void 0!==n&&(r.annotationId=n),r},e.is=function(e){var t=e;return t&&"delete"===t.kind&&He.string(t.uri)&&(void 0===t.options||(void 0===t.options.recursive||He.boolean(t.options.recursive))&&(void 0===t.options.ignoreIfNotExists||He.boolean(t.options.ignoreIfNotExists)))&&(void 0===t.annotationId||O.is(t.annotationId))}}(M||(M={})),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 He.string(e.kind)?A.is(e)||j.is(e)||M.is(e):N.is(e)})))}}(I||(I={}));var Z,Y,Q,ee,te,ne,re,oe,ie,se,ae,ce,ue,le,de,fe,he,pe,me,ge,ye,ve,be,Re,ke,xe,Ce,Se,Te,we,Pe,_e,De,Ee,Oe,qe,Ne,Ae,je,Me,Ie,Fe,Le,We,$e,Ve=function(){function e(e,t){this.edits=e,this.changeAnnotations=t}return e.prototype.insert=function(e,t,n){var r,o;if(void 0===n?r=D.insert(e,t):O.is(n)?(o=n,r=q.insert(e,t,n)):(this.assertChangeAnnotations(this.changeAnnotations),o=this.changeAnnotations.manage(n),r=q.insert(e,t,o)),this.edits.push(r),void 0!==o)return o},e.prototype.replace=function(e,t,n){var r,o;if(void 0===n?r=D.replace(e,t):O.is(n)?(o=n,r=q.replace(e,t,n)):(this.assertChangeAnnotations(this.changeAnnotations),o=this.changeAnnotations.manage(n),r=q.replace(e,t,o)),this.edits.push(r),void 0!==o)return o},e.prototype.delete=function(e,t){var n,r;if(void 0===t?n=D.del(e):O.is(t)?(r=t,n=q.del(e,t)):(this.assertChangeAnnotations(this.changeAnnotations),r=this.changeAnnotations.manage(t),n=q.del(e,r)),this.edits.push(n),void 0!==r)return r},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}(),Ue=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(O.is(e)?n=e:(n=this.nextId(),t=e),void 0!==this._annotations[n])throw new Error("Id ".concat(n," is already in use."));if(void 0===t)throw new Error("No annotation provided for id ".concat(n));return this._annotations[n]=t,this._size++,n},e.prototype.nextId=function(){return this._counter++,this._counter.toString()},e}();!function(){function e(e){var t=this;this._textEditChanges=Object.create(null),void 0!==e?(this._workspaceEdit=e,e.documentChanges?(this._changeAnnotations=new Ue(e.changeAnnotations),e.changeAnnotations=this._changeAnnotations.all(),e.documentChanges.forEach((function(e){if(N.is(e)){var n=new Ve(e.edits,t._changeAnnotations);t._textEditChanges[e.textDocument.uri]=n}}))):e.changes&&Object.keys(e.changes).forEach((function(n){var r=new Ve(e.changes[n]);t._textEditChanges[n]=r}))):this._workspaceEdit={}}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(Q.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(!(r=this._textEditChanges[t.uri])){var n={textDocument:t,edits:o=[]};this._workspaceEdit.documentChanges.push(n),r=new Ve(o,this._changeAnnotations),this._textEditChanges[t.uri]=r}return r}if(this.initChanges(),void 0===this._workspaceEdit.changes)throw new Error("Workspace edit is not configured for normal text edit changes.");var r;if(!(r=this._textEditChanges[e])){var o=[];this._workspaceEdit.changes[e]=o,r=new Ve(o),this._textEditChanges[e]=r}return r},e.prototype.initDocumentChanges=function(){void 0===this._workspaceEdit.documentChanges&&void 0===this._workspaceEdit.changes&&(this._changeAnnotations=new Ue,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 r,o,i;if(E.is(t)||O.is(t)?r=t:n=t,void 0===r?o=A.create(e,n):(i=O.is(r)?r:this._changeAnnotations.manage(r),o=A.create(e,n,i)),this._workspaceEdit.documentChanges.push(o),void 0!==i)return i},e.prototype.renameFile=function(e,t,n,r){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");var o,i,s;if(E.is(n)||O.is(n)?o=n:r=n,void 0===o?i=j.create(e,t,r):(s=O.is(o)?o:this._changeAnnotations.manage(o),i=j.create(e,t,r,s)),this._workspaceEdit.documentChanges.push(i),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 r,o,i;if(E.is(t)||O.is(t)?r=t:n=t,void 0===r?o=M.create(e,n):(i=O.is(r)?r:this._changeAnnotations.manage(r),o=M.create(e,n,i)),this._workspaceEdit.documentChanges.push(o),void 0!==i)return i}}(),function(e){e.create=function(e){return{uri:e}},e.is=function(e){var t=e;return He.defined(t)&&He.string(t.uri)}}(Z||(Z={})),function(e){e.create=function(e,t){return{uri:e,version:t}},e.is=function(e){var t=e;return He.defined(t)&&He.string(t.uri)&&He.integer(t.version)}}(Y||(Y={})),function(e){e.create=function(e,t){return{uri:e,version:t}},e.is=function(e){var t=e;return He.defined(t)&&He.string(t.uri)&&(null===t.version||He.integer(t.version))}}(Q||(Q={})),function(e){e.create=function(e,t,n,r){return{uri:e,languageId:t,version:n,text:r}},e.is=function(e){var t=e;return He.defined(t)&&He.string(t.uri)&&He.string(t.languageId)&&He.integer(t.version)&&He.string(t.text)}}(ee||(ee={})),function(e){e.PlainText="plaintext",e.Markdown="markdown",e.is=function(t){var n=t;return n===e.PlainText||n===e.Markdown}}(te||(te={})),function(e){e.is=function(e){var t=e;return He.objectLiteral(e)&&te.is(t.kind)&&He.string(t.value)}}(ne||(ne={})),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}(re||(re={})),function(e){e.PlainText=1,e.Snippet=2}(oe||(oe={})),function(e){e.Deprecated=1}(ie||(ie={})),function(e){e.create=function(e,t,n){return{newText:e,insert:t,replace:n}},e.is=function(e){var t=e;return t&&He.string(t.newText)&&m.is(t.insert)&&m.is(t.replace)}}(se||(se={})),function(e){e.asIs=1,e.adjustIndentation=2}(ae||(ae={})),function(e){e.is=function(e){var t=e;return t&&(He.string(t.detail)||void 0===t.detail)&&(He.string(t.description)||void 0===t.description)}}(ce||(ce={})),function(e){e.create=function(e){return{label:e}}}(ue||(ue={})),function(e){e.create=function(e,t){return{items:e||[],isIncomplete:!!t}}}(le||(le={})),function(e){e.fromPlainText=function(e){return e.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")},e.is=function(e){var t=e;return He.string(t)||He.objectLiteral(t)&&He.string(t.language)&&He.string(t.value)}}(de||(de={})),function(e){e.is=function(e){var t=e;return!!t&&He.objectLiteral(t)&&(ne.is(t.contents)||de.is(t.contents)||He.typedArray(t.contents,de.is))&&(void 0===e.range||m.is(e.range))}}(fe||(fe={})),function(e){e.create=function(e,t){return t?{label:e,documentation:t}:{label:e}}}(he||(he={})),function(e){e.create=function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var o={label:e};return He.defined(t)&&(o.documentation=t),He.defined(n)?o.parameters=n:o.parameters=[],o}}(pe||(pe={})),function(e){e.Text=1,e.Read=2,e.Write=3}(me||(me={})),function(e){e.create=function(e,t){var n={range:e};return He.number(t)&&(n.kind=t),n}}(ge||(ge={})),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}(ye||(ye={})),function(e){e.Deprecated=1}(ve||(ve={})),function(e){e.create=function(e,t,n,r,o){var i={name:e,kind:t,location:{uri:r,range:n}};return o&&(i.containerName=o),i}}(be||(be={})),function(e){e.create=function(e,t,n,r){return void 0!==r?{name:e,kind:t,location:{uri:n,range:r}}:{name:e,kind:t,location:{uri:n}}}}(Re||(Re={})),function(e){e.create=function(e,t,n,r,o,i){var s={name:e,detail:t,kind:n,range:r,selectionRange:o};return void 0!==i&&(s.children=i),s},e.is=function(e){var t=e;return t&&He.string(t.name)&&He.number(t.kind)&&m.is(t.range)&&m.is(t.selectionRange)&&(void 0===t.detail||He.string(t.detail))&&(void 0===t.deprecated||He.boolean(t.deprecated))&&(void 0===t.children||Array.isArray(t.children))&&(void 0===t.tags||Array.isArray(t.tags))}}(ke||(ke={})),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"}(xe||(xe={})),function(e){e.Invoked=1,e.Automatic=2}(Ce||(Ce={})),function(e){e.create=function(e,t,n){var r={diagnostics:e};return null!=t&&(r.only=t),null!=n&&(r.triggerKind=n),r},e.is=function(e){var t=e;return He.defined(t)&&He.typedArray(t.diagnostics,P.is)&&(void 0===t.only||He.typedArray(t.only,He.string))&&(void 0===t.triggerKind||t.triggerKind===Ce.Invoked||t.triggerKind===Ce.Automatic)}}(Se||(Se={})),function(e){e.create=function(e,t,n){var r={title:e},o=!0;return"string"==typeof t?(o=!1,r.kind=t):_.is(t)?r.command=t:r.edit=t,o&&void 0!==n&&(r.kind=n),r},e.is=function(e){var t=e;return t&&He.string(t.title)&&(void 0===t.diagnostics||He.typedArray(t.diagnostics,P.is))&&(void 0===t.kind||He.string(t.kind))&&(void 0!==t.edit||void 0!==t.command)&&(void 0===t.command||_.is(t.command))&&(void 0===t.isPreferred||He.boolean(t.isPreferred))&&(void 0===t.edit||I.is(t.edit))}}(Te||(Te={})),function(e){e.create=function(e,t){var n={range:e};return He.defined(t)&&(n.data=t),n},e.is=function(e){var t=e;return He.defined(t)&&m.is(t.range)&&(He.undefined(t.command)||_.is(t.command))}}(we||(we={})),function(e){e.create=function(e,t){return{tabSize:e,insertSpaces:t}},e.is=function(e){var t=e;return He.defined(t)&&He.uinteger(t.tabSize)&&He.boolean(t.insertSpaces)}}(Pe||(Pe={})),function(e){e.create=function(e,t,n){return{range:e,target:t,data:n}},e.is=function(e){var t=e;return He.defined(t)&&m.is(t.range)&&(He.undefined(t.target)||He.string(t.target))}}(_e||(_e={})),function(e){e.create=function(e,t){return{range:e,parent:t}},e.is=function(t){var n=t;return He.objectLiteral(n)&&m.is(n.range)&&(void 0===n.parent||e.is(n.parent))}}(De||(De={})),function(e){e.namespace="namespace",e.type="type",e.class="class",e.enum="enum",e.interface="interface",e.struct="struct",e.typeParameter="typeParameter",e.parameter="parameter",e.variable="variable",e.property="property",e.enumMember="enumMember",e.event="event",e.function="function",e.method="method",e.macro="macro",e.keyword="keyword",e.modifier="modifier",e.comment="comment",e.string="string",e.number="number",e.regexp="regexp",e.operator="operator",e.decorator="decorator"}(Ee||(Ee={})),function(e){e.declaration="declaration",e.definition="definition",e.readonly="readonly",e.static="static",e.deprecated="deprecated",e.abstract="abstract",e.async="async",e.modification="modification",e.documentation="documentation",e.defaultLibrary="defaultLibrary"}(Oe||(Oe={})),function(e){e.is=function(e){var t=e;return He.objectLiteral(t)&&(void 0===t.resultId||"string"==typeof t.resultId)&&Array.isArray(t.data)&&(0===t.data.length||"number"==typeof t.data[0])}}(qe||(qe={})),function(e){e.create=function(e,t){return{range:e,text:t}},e.is=function(e){var t=e;return null!=t&&m.is(t.range)&&He.string(t.text)}}(Ne||(Ne={})),function(e){e.create=function(e,t,n){return{range:e,variableName:t,caseSensitiveLookup:n}},e.is=function(e){var t=e;return null!=t&&m.is(t.range)&&He.boolean(t.caseSensitiveLookup)&&(He.string(t.variableName)||void 0===t.variableName)}}(Ae||(Ae={})),function(e){e.create=function(e,t){return{range:e,expression:t}},e.is=function(e){var t=e;return null!=t&&m.is(t.range)&&(He.string(t.expression)||void 0===t.expression)}}(je||(je={})),function(e){e.create=function(e,t){return{frameId:e,stoppedLocation:t}},e.is=function(e){var t=e;return He.defined(t)&&m.is(e.stoppedLocation)}}(Me||(Me={})),function(e){e.Type=1,e.Parameter=2,e.is=function(e){return 1===e||2===e}}(Ie||(Ie={})),function(e){e.create=function(e){return{value:e}},e.is=function(e){var t=e;return He.objectLiteral(t)&&(void 0===t.tooltip||He.string(t.tooltip)||ne.is(t.tooltip))&&(void 0===t.location||g.is(t.location))&&(void 0===t.command||_.is(t.command))}}(Fe||(Fe={})),function(e){e.create=function(e,t,n){var r={position:e,label:t};return void 0!==n&&(r.kind=n),r},e.is=function(e){var t=e;return He.objectLiteral(t)&&p.is(t.position)&&(He.string(t.label)||He.typedArray(t.label,Fe.is))&&(void 0===t.kind||Ie.is(t.kind))&&void 0===t.textEdits||He.typedArray(t.textEdits,D.is)&&(void 0===t.tooltip||He.string(t.tooltip)||ne.is(t.tooltip))&&(void 0===t.paddingLeft||He.boolean(t.paddingLeft))&&(void 0===t.paddingRight||He.boolean(t.paddingRight))}}(Le||(Le={})),function(e){e.is=function(e){var t=e;return He.objectLiteral(t)&&d.is(t.uri)&&He.string(t.name)}}(We||(We={})),function(e){function t(e,n){if(e.length<=1)return e;var r=e.length/2|0,o=e.slice(0,r),i=e.slice(r);t(o,n),t(i,n);for(var s=0,a=0,c=0;s<o.length&&a<i.length;){var u=n(o[s],i[a]);e[c++]=u<=0?o[s++]:i[a++]}for(;s<o.length;)e[c++]=o[s++];for(;a<i.length;)e[c++]=i[a++];return e}e.create=function(e,t,n,r){return new Je(e,t,n,r)},e.is=function(e){var t=e;return!!(He.defined(t)&&He.string(t.uri)&&(He.undefined(t.languageId)||He.string(t.languageId))&&He.uinteger(t.lineCount)&&He.func(t.getText)&&He.func(t.positionAt)&&He.func(t.offsetAt))},e.applyEdits=function(e,n){for(var r=e.getText(),o=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})),i=r.length,s=o.length-1;s>=0;s--){var a=o[s],c=e.offsetAt(a.range.start),u=e.offsetAt(a.range.end);if(!(u<=i))throw new Error("Overlapping edit");r=r.substring(0,c)+a.newText+r.substring(u,r.length),i=c}return r}}($e||($e={}));var He,ze,Be,Ke,Je=function(){function e(e,t,n,r){this._uri=e,this._languageId=t,this._version=n,this._content=r,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,r=0;r<t.length;r++){n&&(e.push(r),n=!1);var o=t.charAt(r);n="\r"===o||"\n"===o,"\r"===o&&r+1<t.length&&"\n"===t.charAt(r+1)&&r++}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,r=t.length;if(0===r)return p.create(0,e);for(;n<r;){var o=Math.floor((n+r)/2);t[o]>e?r=o:n=o+1}var i=n-1;return p.create(i,e-t[i])},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],r=e.line+1<t.length?t[e.line+1]:this._content.length;return Math.max(Math.min(n+e.character,r),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,r){return"[object Number]"===t.call(e)&&n<=e&&e<=r},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)}}(He||(He={}));class Ge{constructor(e,t,n,r){this._uri=e,this._languageId=t,this._version=n,this._content=r,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){const t=this.offsetAt(e.start),n=this.offsetAt(e.end);return this._content.substring(t,n)}return this._content}update(e,t){for(let t of e)if(Ge.isIncremental(t)){const e=Ye(t.range),n=this.offsetAt(e.start),r=this.offsetAt(e.end);this._content=this._content.substring(0,n)+t.text+this._content.substring(r,this._content.length);const o=Math.max(e.start.line,0),i=Math.max(e.end.line,0);let s=this._lineOffsets;const a=Ze(t.text,!1,n);if(i-o===a.length)for(let e=0,t=a.length;e<t;e++)s[e+o+1]=a[e];else a.length<1e4?s.splice(o+1,i-o,...a):this._lineOffsets=s=s.slice(0,o+1).concat(a,s.slice(i+1));const c=t.text.length-(r-n);if(0!==c)for(let e=o+1+a.length,t=s.length;e<t;e++)s[e]=s[e]+c}else{if(!Ge.isFull(t))throw new Error("Unknown change event received");this._content=t.text,this._lineOffsets=void 0}this._version=t}getLineOffsets(){return void 0===this._lineOffsets&&(this._lineOffsets=Ze(this._content,!0)),this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let t=this.getLineOffsets(),n=0,r=t.length;if(0===r)return{line:0,character:e};for(;n<r;){let o=Math.floor((n+r)/2);t[o]>e?r=o:n=o+1}let o=n-1;return{line:o,character:e-t[o]}}offsetAt(e){let t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;let n=t[e.line],r=e.line+1<t.length?t[e.line+1]:this._content.length;return Math.max(Math.min(n+e.character,r),n)}get lineCount(){return this.getLineOffsets().length}static isIncremental(e){let t=e;return null!=t&&"string"==typeof t.text&&void 0!==t.range&&(void 0===t.rangeLength||"number"==typeof t.rangeLength)}static isFull(e){let t=e;return null!=t&&"string"==typeof t.text&&void 0===t.range&&void 0===t.rangeLength}}function Xe(e,t){if(e.length<=1)return e;const n=e.length/2|0,r=e.slice(0,n),o=e.slice(n);Xe(r,t),Xe(o,t);let i=0,s=0,a=0;for(;i<r.length&&s<o.length;){let n=t(r[i],o[s]);e[a++]=n<=0?r[i++]:o[s++]}for(;i<r.length;)e[a++]=r[i++];for(;s<o.length;)e[a++]=o[s++];return e}function Ze(e,t,n=0){const r=t?[n]:[];for(let t=0;t<e.length;t++){let o=e.charCodeAt(t);13!==o&&10!==o||(13===o&&t+1<e.length&&10===e.charCodeAt(t+1)&&t++,r.push(n+t+1))}return r}function Ye(e){const 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 Qe(e){const t=Ye(e.range);return t!==e.range?{newText:e.newText,range:t}:e}!function(e){e.create=function(e,t,n,r){return new Ge(e,t,n,r)},e.update=function(e,t,n){if(e instanceof Ge)return e.update(t,n),e;throw new Error("TextDocument.update: document must be created by TextDocument.create")},e.applyEdits=function(e,t){let n=e.getText(),r=Xe(t.map(Qe),((e,t)=>{let n=e.range.start.line-t.range.start.line;return 0===n?e.range.start.character-t.range.start.character:n})),o=0;const i=[];for(const t of r){let r=e.offsetAt(t.range.start);if(r<o)throw new Error("Overlapping edit");r>o&&i.push(n.substring(o,r)),t.newText.length&&i.push(t.newText),o=e.offsetAt(t.range.end)}return i.push(n.substr(o)),i.join("")}}(ze||(ze={})),function(e){e[e.Undefined=0]="Undefined",e[e.EnumValueMismatch=1]="EnumValueMismatch",e[e.Deprecated=2]="Deprecated",e[e.UnexpectedEndOfComment=257]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=258]="UnexpectedEndOfString",e[e.UnexpectedEndOfNumber=259]="UnexpectedEndOfNumber",e[e.InvalidUnicode=260]="InvalidUnicode",e[e.InvalidEscapeCharacter=261]="InvalidEscapeCharacter",e[e.InvalidCharacter=262]="InvalidCharacter",e[e.PropertyExpected=513]="PropertyExpected",e[e.CommaExpected=514]="CommaExpected",e[e.ColonExpected=515]="ColonExpected",e[e.ValueExpected=516]="ValueExpected",e[e.CommaOrCloseBacketExpected=517]="CommaOrCloseBacketExpected",e[e.CommaOrCloseBraceExpected=518]="CommaOrCloseBraceExpected",e[e.TrailingComma=519]="TrailingComma",e[e.DuplicateKey=520]="DuplicateKey",e[e.CommentNotPermitted=521]="CommentNotPermitted",e[e.SchemaResolveError=768]="SchemaResolveError",e[e.SchemaUnsupportedFeature=769]="SchemaUnsupportedFeature"}(Be||(Be={})),function(e){e.LATEST={textDocument:{completion:{completionItem:{documentationFormat:[te.Markdown,te.PlainText],commitCharactersSupport:!0}}}}}(Ke||(Ke={}));var et=n(8472);const tt=et.LV(),nt={"color-hex":{errorMessage:tt("colorHexFormatWarning","Invalid color format. Use #RGB, #RGBA, #RRGGBB or #RRGGBBAA."),pattern:/^#([0-9A-Fa-f]{3,4}|([0-9A-Fa-f]{2}){3,4})$/},"date-time":{errorMessage:tt("dateTimeFormatWarning","String is not a RFC3339 date-time."),pattern:/^(\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]|60)(\.[0-9]+)?(Z|(\+|-)([01][0-9]|2[0-3]):([0-5][0-9]))$/i},date:{errorMessage:tt("dateFormatWarning","String is not a RFC3339 date."),pattern:/^(\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/i},time:{errorMessage:tt("timeFormatWarning","String is not a RFC3339 time."),pattern:/^([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]|60)(\.[0-9]+)?(Z|(\+|-)([01][0-9]|2[0-3]):([0-5][0-9]))$/i},email:{errorMessage:tt("emailFormatWarning","String is not an e-mail address."),pattern:/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z0-9-]+\.)+[a-zA-Z]{2,}))$/},hostname:{errorMessage:tt("hostnameFormatWarning","String is not a hostname."),pattern:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i},ipv4:{errorMessage:tt("ipv4FormatWarning","String is not an IPv4 address."),pattern:/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/},ipv6:{errorMessage:tt("ipv6FormatWarning","String is not an IPv6 address."),pattern:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i}};class rt{constructor(e,t,n=0){this.offset=t,this.length=n,this.parent=e}get children(){return[]}toString(){return"type: "+this.type+" ("+this.offset+"/"+this.length+")"+(this.parent?" parent: {"+this.parent.toString()+"}":"")}}class ot extends rt{constructor(e,t){super(e,t),this.type="null",this.value=null}}class it extends rt{constructor(e,t,n){super(e,n),this.type="boolean",this.value=t}}class st extends rt{constructor(e,t){super(e,t),this.type="array",this.items=[]}get children(){return this.items}}class at extends rt{constructor(e,t){super(e,t),this.type="number",this.isInteger=!0,this.value=Number.NaN}}class ct extends rt{constructor(e,t,n){super(e,t,n),this.type="string",this.value=""}}class ut extends rt{constructor(e,t,n){super(e,t),this.type="property",this.colonOffset=-1,this.keyNode=n}get children(){return this.valueNode?[this.keyNode,this.valueNode]:[this.keyNode]}}class lt extends rt{constructor(e,t){super(e,t),this.type="object",this.properties=[]}get children(){return this.properties}}function dt(e){return B(e)?e?{}:{not:{}}:e}var ft;!function(e){e[e.Key=0]="Key",e[e.Enum=1]="Enum"}(ft||(ft={}));class ht{constructor(e=-1,t){this.focusOffset=e,this.exclude=t,this.schemas=[]}add(e){this.schemas.push(e)}merge(e){Array.prototype.push.apply(this.schemas,e.schemas)}include(e){return(-1===this.focusOffset||vt(e,this.focusOffset))&&e!==this.exclude}newSub(){return new ht(-1,this.exclude)}}class pt{constructor(){}get schemas(){return[]}add(e){}merge(e){}include(e){return!0}newSub(){return this}}pt.instance=new pt;class mt{constructor(){this.problems=[],this.propertiesMatches=0,this.processedProperties=new Set,this.propertiesValueMatches=0,this.primaryValueMatches=0,this.enumValueMatch=!1,this.enumValues=void 0}hasProblems(){return!!this.problems.length}mergeAll(e){for(const t of e)this.merge(t)}merge(e){this.problems=this.problems.concat(e.problems)}mergeEnumValues(e){if(!this.enumValueMatch&&!e.enumValueMatch&&this.enumValues&&e.enumValues){this.enumValues=this.enumValues.concat(e.enumValues);for(const e of this.problems)e.code===Be.EnumValueMismatch&&(e.message=tt("enumWarning","Value is not accepted. Valid values: {0}.",this.enumValues.map((e=>JSON.stringify(e))).join(", ")))}}mergePropertyMatch(e){this.merge(e),this.propertiesMatches++,(e.enumValueMatch||!e.hasProblems()&&e.propertiesMatches)&&this.propertiesValueMatches++,e.enumValueMatch&&e.enumValues&&1===e.enumValues.length&&this.primaryValueMatches++}mergeProcessedProperties(e){e.processedProperties.forEach((e=>this.processedProperties.add(e)))}compare(e){const t=this.hasProblems();return t!==e.hasProblems()?t?-1:1:this.enumValueMatch!==e.enumValueMatch?e.enumValueMatch?-1:1:this.primaryValueMatches!==e.primaryValueMatches?this.primaryValueMatches-e.primaryValueMatches:this.propertiesValueMatches!==e.propertiesValueMatches?this.propertiesValueMatches-e.propertiesValueMatches:this.propertiesMatches-e.propertiesMatches}}function gt(e){return V(e)}function yt(e){return $(e)}function vt(e,t,n=!1){return t>=e.offset&&t<e.offset+e.length||n&&t===e.offset+e.length}class bt{constructor(e,t=[],n=[]){this.root=e,this.syntaxErrors=t,this.comments=n}getNodeFromOffset(e,t=!1){if(this.root)return W(this.root,e,t)}visit(e){if(this.root){const t=n=>{let r=e(n);const o=n.children;if(Array.isArray(o))for(let e=0;e<o.length&&r;e++)r=t(o[e]);return r};t(this.root)}}validate(e,t,n=S.Warning){if(this.root&&t){const r=new mt;return Rt(this.root,t,r,pt.instance),r.problems.map((t=>{const r=m.create(e.positionAt(t.location.offset),e.positionAt(t.location.offset+t.location.length));return P.create(r,t.message,t.severity??n,t.code)}))}}getMatchingSchemas(e,t=-1,n){const r=new ht(t,n);return this.root&&e&&Rt(this.root,e,new mt,r),r.schemas}}function Rt(e,t,n,r){if(!e||!r.include(e))return;if("property"===e.type)return Rt(e.valueNode,t,n,r);const o=e;switch(function(){function e(e){return o.type===e||"integer"===e&&"number"===o.type&&o.isInteger}if(Array.isArray(t.type)?t.type.some(e)||n.problems.push({location:{offset:o.offset,length:o.length},message:t.errorMessage||tt("typeArrayMismatchWarning","Incorrect type. Expected one of {0}.",t.type.join(", "))}):t.type&&(e(t.type)||n.problems.push({location:{offset:o.offset,length:o.length},message:t.errorMessage||tt("typeMismatchWarning",'Incorrect type. Expected "{0}".',t.type)})),Array.isArray(t.allOf))for(const e of t.allOf)Rt(o,dt(e),n,r);const i=dt(t.not);if(i){const e=new mt,t=r.newSub();Rt(o,i,e,t),e.hasProblems()||n.problems.push({location:{offset:o.offset,length:o.length},message:tt("notSchemaWarning","Matches a schema that is not allowed.")});for(const e of t.schemas)e.inverted=!e.inverted,r.add(e)}const s=(e,t)=>{const i=[];let s;for(const n of e){const e=dt(n),a=new mt,c=r.newSub();if(Rt(o,e,a,c),a.hasProblems()||i.push(e),s)if(t||a.hasProblems()||s.validationResult.hasProblems()){const t=a.compare(s.validationResult);t>0?s={schema:e,validationResult:a,matchingSchemas:c}:0===t&&(s.matchingSchemas.merge(c),s.validationResult.mergeEnumValues(a))}else s.matchingSchemas.merge(c),s.validationResult.propertiesMatches+=a.propertiesMatches,s.validationResult.propertiesValueMatches+=a.propertiesValueMatches,s.validationResult.mergeProcessedProperties(a);else s={schema:e,validationResult:a,matchingSchemas:c}}return i.length>1&&t&&n.problems.push({location:{offset:o.offset,length:1},message:tt("oneOfWarning","Matches multiple schemas when only one must validate.")}),s&&(n.merge(s.validationResult),n.propertiesMatches+=s.validationResult.propertiesMatches,n.propertiesValueMatches+=s.validationResult.propertiesValueMatches,n.mergeProcessedProperties(s.validationResult),r.merge(s.matchingSchemas)),i.length};Array.isArray(t.anyOf)&&s(t.anyOf,!1),Array.isArray(t.oneOf)&&s(t.oneOf,!0);const a=e=>{const t=new mt,i=r.newSub();Rt(o,dt(e),t,i),n.merge(t),n.propertiesMatches+=t.propertiesMatches,n.propertiesValueMatches+=t.propertiesValueMatches,n.mergeProcessedProperties(t),r.merge(i)},c=dt(t.if);if(c&&((e,t,i)=>{const s=dt(e),c=new mt,u=r.newSub();Rt(o,s,c,u),r.merge(u),n.mergeProcessedProperties(c),c.hasProblems()?i&&a(i):t&&a(t)})(c,dt(t.then),dt(t.else)),Array.isArray(t.enum)){const e=gt(o);let r=!1;for(const n of t.enum)if(U(e,n)){r=!0;break}n.enumValues=t.enum,n.enumValueMatch=r,r||n.problems.push({location:{offset:o.offset,length:o.length},code:Be.EnumValueMismatch,message:t.errorMessage||tt("enumWarning","Value is not accepted. Valid values: {0}.",t.enum.map((e=>JSON.stringify(e))).join(", "))})}z(t.const)&&(U(gt(o),t.const)?n.enumValueMatch=!0:(n.problems.push({location:{offset:o.offset,length:o.length},code:Be.EnumValueMismatch,message:t.errorMessage||tt("constWarning","Value must be {0}.",JSON.stringify(t.const))}),n.enumValueMatch=!1),n.enumValues=[t.const]);let u=t.deprecationMessage;(u||t.deprecated)&&o.parent&&(u=u||tt("deprecated","Value is deprecated"),n.problems.push({location:{offset:o.parent.offset,length:o.parent.length},severity:S.Warning,message:u,code:Be.Deprecated}))}(),o.type){case"object":!function(e){const o=Object.create(null),i=new Set;for(const t of e.properties){const e=t.keyNode.value;o[e]=t.valueNode,i.add(e)}if(Array.isArray(t.required))for(const r of t.required)if(!o[r]){const t=e.parent&&"property"===e.parent.type&&e.parent.keyNode,o=t?{offset:t.offset,length:t.length}:{offset:e.offset,length:1};n.problems.push({location:o,message:tt("MissingRequiredPropWarning",'Missing property "{0}".',r)})}const s=e=>{i.delete(e),n.processedProperties.add(e)};if(t.properties)for(const e of Object.keys(t.properties)){s(e);const i=t.properties[e],a=o[e];if(a)if(B(i))if(i)n.propertiesMatches++,n.propertiesValueMatches++;else{const r=a.parent;n.problems.push({location:{offset:r.keyNode.offset,length:r.keyNode.length},message:t.errorMessage||tt("DisallowedExtraPropWarning","Property {0} is not allowed.",e)})}else{const e=new mt;Rt(a,i,e,r),n.mergePropertyMatch(e)}}if(t.patternProperties)for(const e of Object.keys(t.patternProperties)){const a=X(e);if(a){const c=[];for(const s of i)if(a.test(s)){c.push(s);const i=o[s];if(i){const o=t.patternProperties[e];if(B(o))if(o)n.propertiesMatches++,n.propertiesValueMatches++;else{const e=i.parent;n.problems.push({location:{offset:e.keyNode.offset,length:e.keyNode.length},message:t.errorMessage||tt("DisallowedExtraPropWarning","Property {0} is not allowed.",s)})}else{const e=new mt;Rt(i,o,e,r),n.mergePropertyMatch(e)}}}c.forEach(s)}}const a=t.additionalProperties;if(void 0!==a&&!0!==a)for(const e of i){s(e);const i=o[e];if(i)if(!1===a){const r=i.parent;n.problems.push({location:{offset:r.keyNode.offset,length:r.keyNode.length},message:t.errorMessage||tt("DisallowedExtraPropWarning","Property {0} is not allowed.",e)})}else{const e=new mt;Rt(i,a,e,r),n.mergePropertyMatch(e)}}const c=t.unevaluatedProperties;if(void 0!==c&&!0!==c){const e=[];for(const s of i)if(!n.processedProperties.has(s)){e.push(s);const i=o[s];if(i)if(!1===c){const e=i.parent;n.problems.push({location:{offset:e.keyNode.offset,length:e.keyNode.length},message:t.errorMessage||tt("DisallowedExtraPropWarning","Property {0} is not allowed.",s)})}else{const e=new mt;Rt(i,c,e,r),n.mergePropertyMatch(e)}}e.forEach(s)}if(H(t.maxProperties)&&e.properties.length>t.maxProperties&&n.problems.push({location:{offset:e.offset,length:e.length},message:tt("MaxPropWarning","Object has more properties than limit of {0}.",t.maxProperties)}),H(t.minProperties)&&e.properties.length<t.minProperties&&n.problems.push({location:{offset:e.offset,length:e.length},message:tt("MinPropWarning","Object has fewer properties than the required number of {0}",t.minProperties)}),t.dependentRequired)for(const e in t.dependentRequired){const n=o[e],r=t.dependentRequired[e];n&&Array.isArray(r)&&l(e,r)}if(t.dependentSchemas)for(const e in t.dependentSchemas){const n=o[e],r=t.dependentSchemas[e];n&&J(r)&&l(e,r)}if(t.dependencies)for(const e in t.dependencies)o[e]&&l(e,t.dependencies[e]);const u=dt(t.propertyNames);if(u)for(const t of e.properties){const e=t.keyNode;e&&Rt(e,u,n,pt.instance)}function l(t,i){if(Array.isArray(i))for(const r of i)o[r]?n.propertiesValueMatches++:n.problems.push({location:{offset:e.offset,length:e.length},message:tt("RequiredDependentPropWarning","Object is missing property {0} required by property {1}.",r,t)});else{const t=dt(i);if(t){const o=new mt;Rt(e,t,o,r),n.mergePropertyMatch(o)}}}}(o);break;case"array":!function(e){let o,i,s=Array.isArray(t.prefixItems)||void 0!==t.items&&!Array.isArray(t.items)&&void 0===t.additionalItems;s?(o=t.prefixItems,i=Array.isArray(t.items)?void 0:t.items):(o=Array.isArray(t.items)?t.items:void 0,i=Array.isArray(t.items)?t.additionalItems:t.items);let a=0;if(void 0!==o){const t=Math.min(o.length,e.items.length);for(;a<t;a++){const t=dt(o[a]),i=new mt,s=e.items[a];s&&(Rt(s,t,i,r),n.mergePropertyMatch(i)),n.processedProperties.add(String(a))}}if(void 0!==i&&a<e.items.length)if("boolean"==typeof i)for(!1===i&&n.problems.push({location:{offset:e.offset,length:e.length},message:tt("additionalItemsWarning","Array has too many items according to schema. Expected {0} or fewer.",a)});a<e.items.length;a++)n.processedProperties.add(String(a)),n.propertiesValueMatches++;else for(;a<e.items.length;a++){const t=new mt;Rt(e.items[a],i,t,r),n.mergePropertyMatch(t),n.processedProperties.add(String(a))}const c=dt(t.contains);if(c){let r=0;for(let t=0;t<e.items.length;t++){const o=e.items[t],i=new mt;Rt(o,c,i,pt.instance),i.hasProblems()||(r++,s&&n.processedProperties.add(String(t)))}0!==r||H(t.minContains)||n.problems.push({location:{offset:e.offset,length:e.length},message:t.errorMessage||tt("requiredItemMissingWarning","Array does not contain required item.")}),H(t.minContains)&&r<t.minContains&&n.problems.push({location:{offset:e.offset,length:e.length},message:tt("minContainsWarning","Array has too few items that match the contains contraint. Expected {0} or more.",t.minContains)}),H(t.maxContains)&&r>t.maxContains&&n.problems.push({location:{offset:e.offset,length:e.length},message:tt("maxContainsWarning","Array has too many items that match the contains contraint. Expected {0} or less.",t.maxContains)})}const u=t.unevaluatedItems;if(void 0!==u)for(let o=0;o<e.items.length;o++){if(!n.processedProperties.has(String(o)))if(!1===u)n.problems.push({location:{offset:e.offset,length:e.length},message:tt("unevaluatedItemsWarning","Item does not match any validation rule from the array.")});else{const i=new mt;Rt(e.items[o],t.additionalItems,i,r),n.mergePropertyMatch(i)}n.processedProperties.add(String(o)),n.propertiesValueMatches++}if(H(t.minItems)&&e.items.length<t.minItems&&n.problems.push({location:{offset:e.offset,length:e.length},message:tt("minItemsWarning","Array has too few items. Expected {0} or more.",t.minItems)}),H(t.maxItems)&&e.items.length>t.maxItems&&n.problems.push({location:{offset:e.offset,length:e.length},message:tt("maxItemsWarning","Array has too many items. Expected {0} or fewer.",t.maxItems)}),!0===t.uniqueItems){const t=gt(e);t.some(((e,n)=>n!==t.lastIndexOf(e)))&&n.problems.push({location:{offset:e.offset,length:e.length},message:tt("uniqueItemsWarning","Array has duplicate items.")})}}(o);break;case"string":!function(e){if(H(t.minLength)&&e.value.length<t.minLength&&n.problems.push({location:{offset:e.offset,length:e.length},message:tt("minLengthWarning","String is shorter than the minimum length of {0}.",t.minLength)}),H(t.maxLength)&&e.value.length>t.maxLength&&n.problems.push({location:{offset:e.offset,length:e.length},message:tt("maxLengthWarning","String is longer than the maximum length of {0}.",t.maxLength)}),K(t.pattern)&&(X(t.pattern)?.test(e.value)||n.problems.push({location:{offset:e.offset,length:e.length},message:t.patternErrorMessage||t.errorMessage||tt("patternWarning",'String does not match the pattern of "{0}".',t.pattern)})),t.format)switch(t.format){case"uri":case"uri-reference":{let r;if(e.value){const n=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/.exec(e.value);n?n[2]||"uri"!==t.format||(r=tt("uriSchemeMissing","URI with a scheme is expected.")):r=tt("uriMissing","URI is expected.")}else r=tt("uriEmpty","URI expected.");r&&n.problems.push({location:{offset:e.offset,length:e.length},message:t.patternErrorMessage||t.errorMessage||tt("uriFormatWarning","String is not a URI: {0}",r)})}break;case"color-hex":case"date-time":case"date":case"time":case"email":case"hostname":case"ipv4":case"ipv6":const r=nt[t.format];e.value&&r.pattern.exec(e.value)||n.problems.push({location:{offset:e.offset,length:e.length},message:t.patternErrorMessage||t.errorMessage||r.errorMessage})}}(o);break;case"number":!function(e){const r=e.value;function o(e){const t=/^(-?\d+)(?:\.(\d+))?(?:e([-+]\d+))?$/.exec(e.toString());return t&&{value:Number(t[1]+(t[2]||"")),multiplier:(t[2]?.length||0)-(parseInt(t[3])||0)}}if(H(t.multipleOf)){let i=-1;if(Number.isInteger(t.multipleOf))i=r%t.multipleOf;else{let e=o(t.multipleOf),n=o(r);if(e&&n){const t=10**Math.abs(n.multiplier-e.multiplier);n.multiplier<e.multiplier?n.value*=t:e.value*=t,i=n.value%e.value}}0!==i&&n.problems.push({location:{offset:e.offset,length:e.length},message:tt("multipleOfWarning","Value is not divisible by {0}.",t.multipleOf)})}function i(e,t){return H(t)?t:B(t)&&t?e:void 0}function s(e,t){if(!B(t)||!t)return e}const a=i(t.minimum,t.exclusiveMinimum);H(a)&&r<=a&&n.problems.push({location:{offset:e.offset,length:e.length},message:tt("exclusiveMinimumWarning","Value is below the exclusive minimum of {0}.",a)});const c=i(t.maximum,t.exclusiveMaximum);H(c)&&r>=c&&n.problems.push({location:{offset:e.offset,length:e.length},message:tt("exclusiveMaximumWarning","Value is above the exclusive maximum of {0}.",c)});const u=s(t.minimum,t.exclusiveMinimum);H(u)&&r<u&&n.problems.push({location:{offset:e.offset,length:e.length},message:tt("minimumWarning","Value is below the minimum of {0}.",u)});const l=s(t.maximum,t.exclusiveMaximum);H(l)&&r>l&&n.problems.push({location:{offset:e.offset,length:e.length},message:tt("maximumWarning","Value is above the maximum of {0}.",l)})}(o)}r.add({node:o,schema:t})}function kt(e,t,n){if(null!==e&&"object"==typeof e){const r=t+"\t";if(Array.isArray(e)){if(0===e.length)return"[]";let o="[\n";for(let t=0;t<e.length;t++)o+=r+kt(e[t],r,n),t<e.length-1&&(o+=","),o+="\n";return o+=t+"]",o}{const o=Object.keys(e);if(0===o.length)return"{}";let i="{\n";for(let t=0;t<o.length;t++){const s=o[t];i+=r+JSON.stringify(s)+": "+kt(e[s],r,n),t<o.length-1&&(i+=","),i+="\n"}return i+=t+"}",i}}return n(e)}const xt=et.LV();class Ct{constructor(e,t=[],n=Promise,r={}){this.schemaService=e,this.contributions=t,this.promiseConstructor=n,this.clientCapabilities=r}doResolve(e){for(let t=this.contributions.length-1;t>=0;t--){const n=this.contributions[t].resolveCompletion;if(n){const t=n(e);if(t)return t}}return this.promiseConstructor.resolve(e)}doComplete(e,t,n){const r={items:[],isIncomplete:!1},o=e.getText(),i=e.offsetAt(t);let s=n.getNodeFromOffset(i,!0);if(this.isInComment(e,s?s.offset:0,i))return Promise.resolve(r);if(s&&i===s.offset+s.length&&i>0){const e=o[i-1];("object"===s.type&&"}"===e||"array"===s.type&&"]"===e)&&(s=s.parent)}const a=this.getCurrentWord(e,i);let c;if(!s||"string"!==s.type&&"number"!==s.type&&"boolean"!==s.type&&"null"!==s.type){let n=i-a.length;n>0&&'"'===o[n-1]&&n--,c=m.create(e.positionAt(n),t)}else c=m.create(e.positionAt(s.offset),e.positionAt(s.offset+s.length));const u={},l={add:e=>{let t=e.label;const n=u[t];if(n)n.documentation||(n.documentation=e.documentation),n.detail||(n.detail=e.detail);else{if(t=t.replace(/[\n]/g,"↵"),t.length>60){const e=t.substr(0,57).trim()+"...";u[e]||(t=e)}c&&void 0!==e.insertText&&(e.textEdit=D.replace(c,e.insertText)),e.label=t,u[t]=e,r.items.push(e)}},setAsIncomplete:()=>{r.isIncomplete=!0},error:e=>{console.error(e)},log:e=>{console.log(e)},getNumberOfProposals:()=>r.items.length};return this.schemaService.getSchemaForResource(e.uri,n).then((t=>{const d=[];let f,h=!0,p="";if(s&&"string"===s.type){const e=s.parent;e&&"property"===e.type&&e.keyNode===s&&(h=!e.valueNode,f=e,p=o.substr(s.offset+1,s.length-2),e&&(s=e.parent))}if(s&&"object"===s.type){if(s.offset===i)return r;s.properties.forEach((e=>{f&&f===e||(u[e.keyNode.value]=ue.create("__"))}));let m="";h&&(m=this.evaluateSeparatorAfter(e,e.offsetAt(c.end))),t?this.getPropertyCompletions(t,n,s,h,m,l):this.getSchemaLessPropertyCompletions(n,s,p,l);const g=yt(s);this.contributions.forEach((t=>{const n=t.collectPropertyCompletions(e.uri,g,a,h,""===m,l);n&&d.push(n)})),!t&&a.length>0&&'"'!==o.charAt(i-a.length-1)&&(l.add({kind:re.Property,label:this.getLabelForValue(a),insertText:this.getInsertTextForProperty(a,void 0,!1,m),insertTextFormat:oe.Snippet,documentation:""}),l.setAsIncomplete())}const m={};return t?this.getValueCompletions(t,n,s,i,e,l,m):this.getSchemaLessValueCompletions(n,s,i,e,l),this.contributions.length>0&&this.getContributedValueCompletions(n,s,i,e,l,d),this.promiseConstructor.all(d).then((()=>{if(0===l.getNumberOfProposals()){let t=i;!s||"string"!==s.type&&"number"!==s.type&&"boolean"!==s.type&&"null"!==s.type||(t=s.offset+s.length);const n=this.evaluateSeparatorAfter(e,t);this.addFillerValueCompletions(m,n,l)}return r}))}))}getPropertyCompletions(e,t,n,r,o,i){t.getMatchingSchemas(e.schema,n.offset).forEach((e=>{if(e.node===n&&!e.inverted){const t=e.schema.properties;t&&Object.keys(t).forEach((e=>{const n=t[e];if("object"==typeof n&&!n.deprecationMessage&&!n.doNotSuggest){const t={kind:re.Property,label:e,insertText:this.getInsertTextForProperty(e,n,r,o),insertTextFormat:oe.Snippet,filterText:this.getFilterTextForValue(e),documentation:this.fromMarkup(n.markdownDescription)||n.description||""};void 0!==n.suggestSortText&&(t.sortText=n.suggestSortText),t.insertText&&G(t.insertText,`$1${o}`)&&(t.command={title:"Suggest",command:"editor.action.triggerSuggest"}),i.add(t)}}));const n=e.schema.propertyNames;if("object"==typeof n&&!n.deprecationMessage&&!n.doNotSuggest){const e=(e,t)=>{const s={kind:re.Property,label:e,insertText:this.getInsertTextForProperty(e,void 0,r,o),insertTextFormat:oe.Snippet,filterText:this.getFilterTextForValue(e),documentation:t||this.fromMarkup(n.markdownDescription)||n.description||""};void 0!==n.suggestSortText&&(s.sortText=n.suggestSortText),s.insertText&&G(s.insertText,`$1${o}`)&&(s.command={title:"Suggest",command:"editor.action.triggerSuggest"}),i.add(s)};if(n.enum)for(let t=0;t<n.enum.length;t++){let r;n.markdownEnumDescriptions&&t<n.markdownEnumDescriptions.length?r=this.fromMarkup(n.markdownEnumDescriptions[t]):n.enumDescriptions&&t<n.enumDescriptions.length&&(r=n.enumDescriptions[t]),e(n.enum[t],r)}n.const&&e(n.const)}}}))}getSchemaLessPropertyCompletions(e,t,n,r){const o=e=>{e.properties.forEach((e=>{const t=e.keyNode.value;r.add({kind:re.Property,label:t,insertText:this.getInsertTextForValue(t,""),insertTextFormat:oe.Snippet,filterText:this.getFilterTextForValue(t),documentation:""})}))};if(t.parent)if("property"===t.parent.type){const n=t.parent.keyNode.value;e.visit((e=>("property"===e.type&&e!==t.parent&&e.keyNode.value===n&&e.valueNode&&"object"===e.valueNode.type&&o(e.valueNode),!0)))}else"array"===t.parent.type&&t.parent.items.forEach((e=>{"object"===e.type&&e!==t&&o(e)}));else"object"===t.type&&r.add({kind:re.Property,label:"$schema",insertText:this.getInsertTextForProperty("$schema",void 0,!0,""),insertTextFormat:oe.Snippet,documentation:"",filterText:this.getFilterTextForValue("$schema")})}getSchemaLessValueCompletions(e,t,n,r,o){let i=n;if(!t||"string"!==t.type&&"number"!==t.type&&"boolean"!==t.type&&"null"!==t.type||(i=t.offset+t.length,t=t.parent),!t)return o.add({kind:this.getSuggestionKind("object"),label:"Empty object",insertText:this.getInsertTextForValue({},""),insertTextFormat:oe.Snippet,documentation:""}),void o.add({kind:this.getSuggestionKind("array"),label:"Empty array",insertText:this.getInsertTextForValue([],""),insertTextFormat:oe.Snippet,documentation:""});const s=this.evaluateSeparatorAfter(r,i),a=e=>{e.parent&&!vt(e.parent,n,!0)&&o.add({kind:this.getSuggestionKind(e.type),label:this.getLabelTextForMatchingNode(e,r),insertText:this.getInsertTextForMatchingNode(e,r,s),insertTextFormat:oe.Snippet,documentation:""}),"boolean"===e.type&&this.addBooleanValueCompletion(!e.value,s,o)};if("property"===t.type&&n>(t.colonOffset||0)){const r=t.valueNode;if(r&&(n>r.offset+r.length||"object"===r.type||"array"===r.type))return;const i=t.keyNode.value;e.visit((e=>("property"===e.type&&e.keyNode.value===i&&e.valueNode&&a(e.valueNode),!0))),"$schema"===i&&t.parent&&!t.parent.parent&&this.addDollarSchemaCompletions(s,o)}if("array"===t.type)if(t.parent&&"property"===t.parent.type){const n=t.parent.keyNode.value;e.visit((e=>("property"===e.type&&e.keyNode.value===n&&e.valueNode&&"array"===e.valueNode.type&&e.valueNode.items.forEach(a),!0)))}else t.items.forEach(a)}getValueCompletions(e,t,n,r,o,i,s){let a,c,u=r;if(!n||"string"!==n.type&&"number"!==n.type&&"boolean"!==n.type&&"null"!==n.type||(u=n.offset+n.length,c=n,n=n.parent),n){if("property"===n.type&&r>(n.colonOffset||0)){const e=n.valueNode;if(e&&r>e.offset+e.length)return;a=n.keyNode.value,n=n.parent}if(n&&(void 0!==a||"array"===n.type)){const l=this.evaluateSeparatorAfter(o,u),d=t.getMatchingSchemas(e.schema,n.offset,c);for(const e of d)if(e.node===n&&!e.inverted&&e.schema){if("array"===n.type&&e.schema.items)if(Array.isArray(e.schema.items)){const t=this.findItemAtOffset(n,o,r);t<e.schema.items.length&&this.addSchemaValueCompletions(e.schema.items[t],l,i,s)}else this.addSchemaValueCompletions(e.schema.items,l,i,s);if(void 0!==a){let t=!1;if(e.schema.properties){const n=e.schema.properties[a];n&&(t=!0,this.addSchemaValueCompletions(n,l,i,s))}if(e.schema.patternProperties&&!t)for(const n of Object.keys(e.schema.patternProperties))if(X(n)?.test(a)){t=!0;const r=e.schema.patternProperties[n];this.addSchemaValueCompletions(r,l,i,s)}if(e.schema.additionalProperties&&!t){const t=e.schema.additionalProperties;this.addSchemaValueCompletions(t,l,i,s)}}}"$schema"!==a||n.parent||this.addDollarSchemaCompletions(l,i),s.boolean&&(this.addBooleanValueCompletion(!0,l,i),this.addBooleanValueCompletion(!1,l,i)),s.null&&this.addNullValueCompletion(l,i)}}else this.addSchemaValueCompletions(e.schema,"",i,s)}getContributedValueCompletions(e,t,n,r,o,i){if(t){if("string"!==t.type&&"number"!==t.type&&"boolean"!==t.type&&"null"!==t.type||(t=t.parent),t&&"property"===t.type&&n>(t.colonOffset||0)){const e=t.keyNode.value,s=t.valueNode;if((!s||n<=s.offset+s.length)&&t.parent){const n=yt(t.parent);this.contributions.forEach((t=>{const s=t.collectValueCompletions(r.uri,n,e,o);s&&i.push(s)}))}}}else this.contributions.forEach((e=>{const t=e.collectDefaultCompletions(r.uri,o);t&&i.push(t)}))}addSchemaValueCompletions(e,t,n,r){"object"==typeof e&&(this.addEnumValueCompletions(e,t,n),this.addDefaultValueCompletions(e,t,n),this.collectTypes(e,r),Array.isArray(e.allOf)&&e.allOf.forEach((e=>this.addSchemaValueCompletions(e,t,n,r))),Array.isArray(e.anyOf)&&e.anyOf.forEach((e=>this.addSchemaValueCompletions(e,t,n,r))),Array.isArray(e.oneOf)&&e.oneOf.forEach((e=>this.addSchemaValueCompletions(e,t,n,r))))}addDefaultValueCompletions(e,t,n,r=0){let o=!1;if(z(e.default)){let i=e.type,s=e.default;for(let e=r;e>0;e--)s=[s],i="array";n.add({kind:this.getSuggestionKind(i),label:this.getLabelForValue(s),insertText:this.getInsertTextForValue(s,t),insertTextFormat:oe.Snippet,detail:xt("json.suggest.default","Default value")}),o=!0}Array.isArray(e.examples)&&e.examples.forEach((i=>{let s=e.type,a=i;for(let e=r;e>0;e--)a=[a],s="array";n.add({kind:this.getSuggestionKind(s),label:this.getLabelForValue(a),insertText:this.getInsertTextForValue(a,t),insertTextFormat:oe.Snippet}),o=!0})),Array.isArray(e.defaultSnippets)&&e.defaultSnippets.forEach((i=>{let s,a,c=e.type,u=i.body,l=i.label;if(z(u)){let n=e.type;for(let e=r;e>0;e--)u=[u],n="array";s=this.getInsertTextForSnippetValue(u,t),a=this.getFilterTextForSnippetValue(u),l=l||this.getLabelForSnippetValue(u)}else{if("string"!=typeof i.bodyText)return;{let e="",n="",o="";for(let t=r;t>0;t--)e=e+o+"[\n",n=n+"\n"+o+"]",o+="\t",c="array";s=e+o+i.bodyText.split("\n").join("\n"+o)+n+t,l=l||s,a=s.replace(/[\n]/g,"")}}n.add({kind:this.getSuggestionKind(c),label:l,documentation:this.fromMarkup(i.markdownDescription)||i.description,insertText:s,insertTextFormat:oe.Snippet,filterText:a}),o=!0})),!o&&"object"==typeof e.items&&!Array.isArray(e.items)&&r<5&&this.addDefaultValueCompletions(e.items,t,n,r+1)}addEnumValueCompletions(e,t,n){if(z(e.const)&&n.add({kind:this.getSuggestionKind(e.type),label:this.getLabelForValue(e.const),insertText:this.getInsertTextForValue(e.const,t),insertTextFormat:oe.Snippet,documentation:this.fromMarkup(e.markdownDescription)||e.description}),Array.isArray(e.enum))for(let r=0,o=e.enum.length;r<o;r++){const o=e.enum[r];let i=this.fromMarkup(e.markdownDescription)||e.description;e.markdownEnumDescriptions&&r<e.markdownEnumDescriptions.length&&this.doesSupportMarkdown()?i=this.fromMarkup(e.markdownEnumDescriptions[r]):e.enumDescriptions&&r<e.enumDescriptions.length&&(i=e.enumDescriptions[r]),n.add({kind:this.getSuggestionKind(e.type),label:this.getLabelForValue(o),insertText:this.getInsertTextForValue(o,t),insertTextFormat:oe.Snippet,documentation:i})}}collectTypes(e,t){if(Array.isArray(e.enum)||z(e.const))return;const n=e.type;Array.isArray(n)?n.forEach((e=>t[e]=!0)):n&&(t[n]=!0)}addFillerValueCompletions(e,t,n){e.object&&n.add({kind:this.getSuggestionKind("object"),label:"{}",insertText:this.getInsertTextForGuessedValue({},t),insertTextFormat:oe.Snippet,detail:xt("defaults.object","New object"),documentation:""}),e.array&&n.add({kind:this.getSuggestionKind("array"),label:"[]",insertText:this.getInsertTextForGuessedValue([],t),insertTextFormat:oe.Snippet,detail:xt("defaults.array","New array"),documentation:""})}addBooleanValueCompletion(e,t,n){n.add({kind:this.getSuggestionKind("boolean"),label:e?"true":"false",insertText:this.getInsertTextForValue(e,t),insertTextFormat:oe.Snippet,documentation:""})}addNullValueCompletion(e,t){t.add({kind:this.getSuggestionKind("null"),label:"null",insertText:"null"+e,insertTextFormat:oe.Snippet,documentation:""})}addDollarSchemaCompletions(e,t){this.schemaService.getRegisteredSchemaIds((e=>"http"===e||"https"===e)).forEach((n=>t.add({kind:re.Module,label:this.getLabelForValue(n),filterText:this.getFilterTextForValue(n),insertText:this.getInsertTextForValue(n,e),insertTextFormat:oe.Snippet,documentation:""})))}getLabelForValue(e){return JSON.stringify(e)}getFilterTextForValue(e){return JSON.stringify(e)}getFilterTextForSnippetValue(e){return JSON.stringify(e).replace(/\$\{\d+:([^}]+)\}|\$\d+/g,"$1")}getLabelForSnippetValue(e){return JSON.stringify(e).replace(/\$\{\d+:([^}]+)\}|\$\d+/g,"$1")}getInsertTextForPlainText(e){return e.replace(/[\\\$\}]/g,"\\$&")}getInsertTextForValue(e,t){var n=JSON.stringify(e,null,"\t");return"{}"===n?"{$1}"+t:"[]"===n?"[$1]"+t:this.getInsertTextForPlainText(n+t)}getInsertTextForSnippetValue(e,t){return kt(e,"",(e=>"string"==typeof e&&"^"===e[0]?e.substr(1):JSON.stringify(e)))+t}getInsertTextForGuessedValue(e,t){switch(typeof e){case"object":return null===e?"${1:null}"+t:this.getInsertTextForValue(e,t);case"string":let n=JSON.stringify(e);return n=n.substr(1,n.length-2),n=this.getInsertTextForPlainText(n),'"${1:'+n+'}"'+t;case"number":case"boolean":return"${1:"+JSON.stringify(e)+"}"+t}return this.getInsertTextForValue(e,t)}getSuggestionKind(e){if(Array.isArray(e)){const t=e;e=t.length>0?t[0]:void 0}if(!e)return re.Value;switch(e){case"string":return re.Value;case"object":return re.Module;case"property":return re.Property;default:return re.Value}}getLabelTextForMatchingNode(e,t){switch(e.type){case"array":return"[]";case"object":return"{}";default:return t.getText().substr(e.offset,e.length)}}getInsertTextForMatchingNode(e,t,n){switch(e.type){case"array":return this.getInsertTextForValue([],n);case"object":return this.getInsertTextForValue({},n);default:const r=t.getText().substr(e.offset,e.length)+n;return this.getInsertTextForPlainText(r)}}getInsertTextForProperty(e,t,n,r){const o=this.getInsertTextForValue(e,"");if(!n)return o;const i=o+": ";let s,a=0;if(t){if(Array.isArray(t.defaultSnippets)){if(1===t.defaultSnippets.length){const e=t.defaultSnippets[0].body;z(e)&&(s=this.getInsertTextForSnippetValue(e,""))}a+=t.defaultSnippets.length}if(t.enum&&(s||1!==t.enum.length||(s=this.getInsertTextForGuessedValue(t.enum[0],"")),a+=t.enum.length),z(t.const)&&(s||(s=this.getInsertTextForGuessedValue(t.const,"")),a++),z(t.default)&&(s||(s=this.getInsertTextForGuessedValue(t.default,"")),a++),Array.isArray(t.examples)&&t.examples.length&&(s||(s=this.getInsertTextForGuessedValue(t.examples[0],"")),a+=t.examples.length),0===a){var c=Array.isArray(t.type)?t.type[0]:t.type;switch(c||(t.properties?c="object":t.items&&(c="array")),c){case"boolean":s="$1";break;case"string":s='"$1"';break;case"object":s="{$1}";break;case"array":s="[$1]";break;case"number":case"integer":s="${1:0}";break;case"null":s="${1:null}";break;default:return o}}}return(!s||a>1)&&(s="$1"),i+s+r}getCurrentWord(e,t){for(var n=t-1,r=e.getText();n>=0&&-1===' \t\n\r\v":{[,]}'.indexOf(r.charAt(n));)n--;return r.substring(n+1,t)}evaluateSeparatorAfter(e,t){const n=F(e.getText(),!0);switch(n.setPosition(t),n.scan()){case 5:case 2:case 4:case 17:return"";default:return","}}findItemAtOffset(e,t,n){const r=F(t.getText(),!0),o=e.items;for(let e=o.length-1;e>=0;e--){const t=o[e];if(n>t.offset+t.length)return r.setPosition(t.offset+t.length),5===r.scan()&&n>=r.getTokenOffset()+r.getTokenLength()?e+1:e;if(n>=t.offset)return e}return 0}isInComment(e,t,n){const r=F(e.getText(),!1);r.setPosition(t);let o=r.scan();for(;17!==o&&r.getTokenOffset()+r.getTokenLength()<n;)o=r.scan();return(12===o||13===o)&&r.getTokenOffset()<=n}fromMarkup(e){if(e&&this.doesSupportMarkdown())return{kind:te.Markdown,value:e}}doesSupportMarkdown(){if(!z(this.supportsMarkdown)){const e=this.clientCapabilities.textDocument&&this.clientCapabilities.textDocument.completion;this.supportsMarkdown=e&&e.completionItem&&Array.isArray(e.completionItem.documentationFormat)&&-1!==e.completionItem.documentationFormat.indexOf(te.Markdown)}return this.supportsMarkdown}doesSupportsCommitCharacters(){if(!z(this.supportsCommitCharacters)){const e=this.clientCapabilities.textDocument&&this.clientCapabilities.textDocument.completion;this.supportsCommitCharacters=e&&e.completionItem&&!!e.completionItem.commitCharactersSupport}return this.supportsCommitCharacters}}class St{constructor(e,t=[],n){this.schemaService=e,this.contributions=t,this.promise=n||Promise}doHover(e,t,n){const r=e.offsetAt(t);let o=n.getNodeFromOffset(r);if(!o||("object"===o.type||"array"===o.type)&&r>o.offset+1&&r<o.offset+o.length-1)return this.promise.resolve(null);const i=o;if("string"===o.type){const e=o.parent;if(e&&"property"===e.type&&e.keyNode===o&&(o=e.valueNode,!o))return this.promise.resolve(null)}const s=m.create(e.positionAt(i.offset),e.positionAt(i.offset+i.length));var a=e=>({contents:e,range:s});const c=yt(o);for(let t=this.contributions.length-1;t>=0;t--){const n=this.contributions[t].getInfoContribution(e.uri,c);if(n)return n.then((e=>a(e)))}return this.schemaService.getSchemaForResource(e.uri,n).then((e=>{if(e&&o){let r,i,s,c;n.getMatchingSchemas(e.schema,o.offset).every((e=>{if(e.node===o&&!e.inverted&&e.schema&&(r=r||e.schema.title,i=i||e.schema.markdownDescription||Tt(e.schema.description),e.schema.enum)){const t=e.schema.enum.indexOf(gt(o));e.schema.markdownEnumDescriptions?s=e.schema.markdownEnumDescriptions[t]:e.schema.enumDescriptions&&(s=Tt(e.schema.enumDescriptions[t])),s&&(c=e.schema.enum[t],"string"!=typeof c&&(c=JSON.stringify(c)))}return!0}));let u="";return r&&(u=Tt(r)),i&&(u.length>0&&(u+="\n\n"),u+=i),s&&(u.length>0&&(u+="\n\n"),u+=`\`${t=c,-1!==t.indexOf("`")?"`` "+t+" ``":t}\`: ${s}`),a([u])}var t;return null}))}}function Tt(e){if(e)return e.replace(/([^\n\r])(\r?\n)([^\n\r])/gm,"$1\n\n$3").replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}const wt=et.LV();class Pt{constructor(e,t){this.jsonSchemaService=e,this.promise=t,this.validationEnabled=!0}configure(e){e&&(this.validationEnabled=!1!==e.validate,this.commentSeverity=e.allowComments?void 0:S.Error)}doValidation(e,t,n,r){if(!this.validationEnabled)return this.promise.resolve([]);const o=[],i={},s=e=>{const t=e.range.start.line+" "+e.range.start.character+" "+e.message;i[t]||(i[t]=!0,o.push(e))},a=r=>{let i=n?.trailingCommas?Ot(n.trailingCommas):S.Error,a=n?.comments?Ot(n.comments):this.commentSeverity,c=n?.schemaValidation?Ot(n.schemaValidation):S.Warning,u=n?.schemaRequest?Ot(n.schemaRequest):S.Warning;if(r){const n=(n,r)=>{if(t.root&&u){const o=t.root,i="object"===o.type?o.properties[0]:void 0;if(i&&"$schema"===i.keyNode.value){const t=i.valueNode||i,o=m.create(e.positionAt(t.offset),e.positionAt(t.offset+t.length));s(P.create(o,n,u,r))}else{const t=m.create(e.positionAt(o.offset),e.positionAt(o.offset+1));s(P.create(t,n,u,r))}}};if(r.errors.length)n(r.errors[0],Be.SchemaResolveError);else if(c){for(const e of r.warnings)n(e,Be.SchemaUnsupportedFeature);const o=t.validate(e,r.schema,c);o&&o.forEach(s)}Dt(r.schema)&&(a=void 0),Et(r.schema)&&(i=void 0)}for(const e of t.syntaxErrors){if(e.code===Be.TrailingComma){if("number"!=typeof i)continue;e.severity=i}s(e)}if("number"==typeof a){const e=wt("InvalidCommentToken","Comments are not permitted in JSON.");t.comments.forEach((t=>{s(P.create(t,e,a,Be.CommentNotPermitted))}))}return o};if(r){const e=r.id||"schemaservice://untitled/"+_t++;return this.jsonSchemaService.registerExternalSchema(e,[],r).getResolvedSchema().then((e=>a(e)))}return this.jsonSchemaService.getSchemaForResource(e.uri,t).then((e=>a(e)))}getLanguageStatus(e,t){return{schemas:this.jsonSchemaService.getSchemaURIsForResource(e.uri,t)}}}let _t=0;function Dt(e){if(e&&"object"==typeof e){if(B(e.allowComments))return e.allowComments;if(e.allOf)for(const t of e.allOf){const e=Dt(t);if(B(e))return e}}}function Et(e){if(e&&"object"==typeof e){if(B(e.allowTrailingCommas))return e.allowTrailingCommas;const t=e;if(B(t.allowsTrailingCommas))return t.allowsTrailingCommas;if(e.allOf)for(const t of e.allOf){const e=Et(t);if(B(e))return e}}}function Ot(e){switch(e){case"error":return S.Error;case"warning":return S.Warning;case"ignore":return}}function qt(e){return e<48?0:e<=57?e-48:(e<97&&(e+=32),e>=97&&e<=102?e-97+10:0)}function Nt(e){if("#"===e[0])switch(e.length){case 4:return{red:17*qt(e.charCodeAt(1))/255,green:17*qt(e.charCodeAt(2))/255,blue:17*qt(e.charCodeAt(3))/255,alpha:1};case 5:return{red:17*qt(e.charCodeAt(1))/255,green:17*qt(e.charCodeAt(2))/255,blue:17*qt(e.charCodeAt(3))/255,alpha:17*qt(e.charCodeAt(4))/255};case 7:return{red:(16*qt(e.charCodeAt(1))+qt(e.charCodeAt(2)))/255,green:(16*qt(e.charCodeAt(3))+qt(e.charCodeAt(4)))/255,blue:(16*qt(e.charCodeAt(5))+qt(e.charCodeAt(6)))/255,alpha:1};case 9:return{red:(16*qt(e.charCodeAt(1))+qt(e.charCodeAt(2)))/255,green:(16*qt(e.charCodeAt(3))+qt(e.charCodeAt(4)))/255,blue:(16*qt(e.charCodeAt(5))+qt(e.charCodeAt(6)))/255,alpha:(16*qt(e.charCodeAt(7))+qt(e.charCodeAt(8)))/255}}}class At{constructor(e){this.schemaService=e}findDocumentSymbols(e,t,n={resultLimit:Number.MAX_VALUE}){const r=t.root;if(!r)return[];let o=n.resultLimit||Number.MAX_VALUE;const i=e.uri;if(("vscode://defaultsettings/keybindings.json"===i||G(i.toLowerCase(),"/user/keybindings.json"))&&"array"===r.type){const t=[];for(const s of r.items)if("object"===s.type)for(const r of s.properties)if("key"===r.keyNode.value&&r.valueNode){const a=g.create(e.uri,jt(e,s));if(t.push({name:gt(r.valueNode),kind:ye.Function,location:a}),o--,o<=0)return n&&n.onResultLimitExceeded&&n.onResultLimitExceeded(i),t}return t}const s=[{node:r,containerName:""}];let a=0,c=!1;const u=[],l=(t,n)=>{"array"===t.type?t.items.forEach((e=>{e&&s.push({node:e,containerName:n})})):"object"===t.type&&t.properties.forEach((t=>{const r=t.valueNode;if(r)if(o>0){o--;const i=g.create(e.uri,jt(e,t)),a=n?n+"."+t.keyNode.value:t.keyNode.value;u.push({name:this.getKeyLabel(t),kind:this.getSymbolKind(r.type),location:i,containerName:n}),s.push({node:r,containerName:a})}else c=!0}))};for(;a<s.length;){const e=s[a++];l(e.node,e.containerName)}return c&&n&&n.onResultLimitExceeded&&n.onResultLimitExceeded(i),u}findDocumentSymbols2(e,t,n={resultLimit:Number.MAX_VALUE}){const r=t.root;if(!r)return[];let o=n.resultLimit||Number.MAX_VALUE;const i=e.uri;if(("vscode://defaultsettings/keybindings.json"===i||G(i.toLowerCase(),"/user/keybindings.json"))&&"array"===r.type){const t=[];for(const s of r.items)if("object"===s.type)for(const r of s.properties)if("key"===r.keyNode.value&&r.valueNode){const a=jt(e,s),c=jt(e,r.keyNode);if(t.push({name:gt(r.valueNode),kind:ye.Function,range:a,selectionRange:c}),o--,o<=0)return n&&n.onResultLimitExceeded&&n.onResultLimitExceeded(i),t}return t}const s=[],a=[{node:r,result:s}];let c=0,u=!1;const l=(t,n)=>{"array"===t.type?t.items.forEach(((t,r)=>{if(t)if(o>0){o--;const i=jt(e,t),s=i,c={name:String(r),kind:this.getSymbolKind(t.type),range:i,selectionRange:s,children:[]};n.push(c),a.push({result:c.children,node:t})}else u=!0})):"object"===t.type&&t.properties.forEach((t=>{const r=t.valueNode;if(r)if(o>0){o--;const i=jt(e,t),s=jt(e,t.keyNode),c=[],u={name:this.getKeyLabel(t),kind:this.getSymbolKind(r.type),range:i,selectionRange:s,children:c,detail:this.getDetail(r)};n.push(u),a.push({result:c,node:r})}else u=!0}))};for(;c<a.length;){const e=a[c++];l(e.node,e.result)}return u&&n&&n.onResultLimitExceeded&&n.onResultLimitExceeded(i),s}getSymbolKind(e){switch(e){case"object":return ye.Module;case"string":return ye.String;case"number":return ye.Number;case"array":return ye.Array;case"boolean":return ye.Boolean;default:return ye.Variable}}getKeyLabel(e){let t=e.keyNode.value;return t&&(t=t.replace(/[\n]/g,"↵")),t&&t.trim()?t:`"${t}"`}getDetail(e){if(e)return"boolean"===e.type||"number"===e.type||"null"===e.type||"string"===e.type?String(e.value):"array"===e.type?e.children.length?void 0:"[]":"object"===e.type?e.children.length?void 0:"{}":void 0}findDocumentColors(e,t,n){return this.schemaService.getSchemaForResource(e.uri,t).then((r=>{const o=[];if(r){let i=n&&"number"==typeof n.resultLimit?n.resultLimit:Number.MAX_VALUE;const s=t.getMatchingSchemas(r.schema),a={};for(const t of s)if(!t.inverted&&t.schema&&("color"===t.schema.format||"color-hex"===t.schema.format)&&t.node&&"string"===t.node.type){const r=String(t.node.offset);if(!a[r]){const s=Nt(gt(t.node));if(s){const n=jt(e,t.node);o.push({color:s,range:n})}if(a[r]=!0,i--,i<=0)return n&&n.onResultLimitExceeded&&n.onResultLimitExceeded(e.uri),o}}}return o}))}getColorPresentations(e,t,n,r){const o=[],i=Math.round(255*n.red),s=Math.round(255*n.green),a=Math.round(255*n.blue);function c(e){const t=e.toString(16);return 2!==t.length?"0"+t:t}let u;return u=1===n.alpha?`#${c(i)}${c(s)}${c(a)}`:`#${c(i)}${c(s)}${c(a)}${c(Math.round(255*n.alpha))}`,o.push({label:u,textEdit:D.replace(r,JSON.stringify(u))}),o}}function jt(e,t){return m.create(e.positionAt(t.offset),e.positionAt(t.offset+t.length))}const Mt=et.LV(),It={schemaAssociations:[],schemas:{"http://json-schema.org/schema#":{$ref:"http://json-schema.org/draft-07/schema#"},"http://json-schema.org/draft-04/schema#":{$schema:"http://json-schema.org/draft-04/schema#",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},positiveInteger:{type:"integer",minimum:0},positiveIntegerDefault0:{allOf:[{$ref:"#/definitions/positiveInteger"},{default:0}]},simpleTypes:{type:"string",enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0}},type:"object",properties:{id:{type:"string",format:"uri"},$schema:{type:"string",format:"uri"},title:{type:"string"},description:{type:"string"},default:{},multipleOf:{type:"number",minimum:0,exclusiveMinimum:!0},maximum:{type:"number"},exclusiveMaximum:{type:"boolean",default:!1},minimum:{type:"number"},exclusiveMinimum:{type:"boolean",default:!1},maxLength:{allOf:[{$ref:"#/definitions/positiveInteger"}]},minLength:{allOf:[{$ref:"#/definitions/positiveIntegerDefault0"}]},pattern:{type:"string",format:"regex"},additionalItems:{anyOf:[{type:"boolean"},{$ref:"#"}],default:{}},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:{}},maxItems:{allOf:[{$ref:"#/definitions/positiveInteger"}]},minItems:{allOf:[{$ref:"#/definitions/positiveIntegerDefault0"}]},uniqueItems:{type:"boolean",default:!1},maxProperties:{allOf:[{$ref:"#/definitions/positiveInteger"}]},minProperties:{allOf:[{$ref:"#/definitions/positiveIntegerDefault0"}]},required:{allOf:[{$ref:"#/definitions/stringArray"}]},additionalProperties:{anyOf:[{type:"boolean"},{$ref:"#"}],default:{}},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},enum:{type:"array",minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{anyOf:[{type:"string",enum:["date-time","uri","email","hostname","ipv4","ipv6","regex"]},{type:"string"}]},allOf:{allOf:[{$ref:"#/definitions/schemaArray"}]},anyOf:{allOf:[{$ref:"#/definitions/schemaArray"}]},oneOf:{allOf:[{$ref:"#/definitions/schemaArray"}]},not:{allOf:[{$ref:"#"}]}},dependencies:{exclusiveMaximum:["maximum"],exclusiveMinimum:["minimum"]},default:{}},"http://json-schema.org/draft-07/schema#":{definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0}}},Ft={id:Mt("schema.json.id","A unique identifier for the schema."),$schema:Mt("schema.json.$schema","The schema to verify this document against."),title:Mt("schema.json.title","A descriptive title of the element."),description:Mt("schema.json.description","A long description of the element. Used in hover menus and suggestions."),default:Mt("schema.json.default","A default value. Used by suggestions."),multipleOf:Mt("schema.json.multipleOf","A number that should cleanly divide the current value (i.e. have no remainder)."),maximum:Mt("schema.json.maximum","The maximum numerical value, inclusive by default."),exclusiveMaximum:Mt("schema.json.exclusiveMaximum","Makes the maximum property exclusive."),minimum:Mt("schema.json.minimum","The minimum numerical value, inclusive by default."),exclusiveMinimum:Mt("schema.json.exclusiveMininum","Makes the minimum property exclusive."),maxLength:Mt("schema.json.maxLength","The maximum length of a string."),minLength:Mt("schema.json.minLength","The minimum length of a string."),pattern:Mt("schema.json.pattern","A regular expression to match the string against. It is not implicitly anchored."),additionalItems:Mt("schema.json.additionalItems","For arrays, only when items is set as an array. If it is a schema, then this schema validates items after the ones specified by the items array. If it is false, then additional items will cause validation to fail."),items:Mt("schema.json.items","For arrays. Can either be a schema to validate every element against or an array of schemas to validate each item against in order (the first schema will validate the first element, the second schema will validate the second element, and so on."),maxItems:Mt("schema.json.maxItems","The maximum number of items that can be inside an array. Inclusive."),minItems:Mt("schema.json.minItems","The minimum number of items that can be inside an array. Inclusive."),uniqueItems:Mt("schema.json.uniqueItems","If all of the items in the array must be unique. Defaults to false."),maxProperties:Mt("schema.json.maxProperties","The maximum number of properties an object can have. Inclusive."),minProperties:Mt("schema.json.minProperties","The minimum number of properties an object can have. Inclusive."),required:Mt("schema.json.required","An array of strings that lists the names of all properties required on this object."),additionalProperties:Mt("schema.json.additionalProperties","Either a schema or a boolean. If a schema, then used to validate all properties not matched by 'properties' or 'patternProperties'. If false, then any properties not matched by either will cause this schema to fail."),definitions:Mt("schema.json.definitions","Not used for validation. Place subschemas here that you wish to reference inline with $ref."),properties:Mt("schema.json.properties","A map of property names to schemas for each property."),patternProperties:Mt("schema.json.patternProperties","A map of regular expressions on property names to schemas for matching properties."),dependencies:Mt("schema.json.dependencies","A map of property names to either an array of property names or a schema. An array of property names means the property named in the key depends on the properties in the array being present in the object in order to be valid. If the value is a schema, then the schema is only applied to the object if the property in the key exists on the object."),enum:Mt("schema.json.enum","The set of literal values that are valid."),type:Mt("schema.json.type","Either a string of one of the basic schema types (number, integer, null, array, object, boolean, string) or an array of strings specifying a subset of those types."),format:Mt("schema.json.format","Describes the format expected for the value."),allOf:Mt("schema.json.allOf","An array of schemas, all of which must match."),anyOf:Mt("schema.json.anyOf","An array of schemas, where at least one must match."),oneOf:Mt("schema.json.oneOf","An array of schemas, exactly one of which must match."),not:Mt("schema.json.not","A schema which must not match."),$id:Mt("schema.json.$id","A unique identifier for the schema."),$ref:Mt("schema.json.$ref","Reference a definition hosted on any location."),$comment:Mt("schema.json.$comment","Comments from schema authors to readers or maintainers of the schema."),readOnly:Mt("schema.json.readOnly","Indicates that the value of the instance is managed exclusively by the owning authority."),examples:Mt("schema.json.examples","Sample JSON values associated with a particular schema, for the purpose of illustrating usage."),contains:Mt("schema.json.contains",'An array instance is valid against "contains" if at least one of its elements is valid against the given schema.'),propertyNames:Mt("schema.json.propertyNames","If the instance is an object, this keyword validates if every property name in the instance validates against the provided schema."),const:Mt("schema.json.const","An instance validates successfully against this keyword if its value is equal to the value of the keyword."),contentMediaType:Mt("schema.json.contentMediaType","Describes the media type of a string property."),contentEncoding:Mt("schema.json.contentEncoding","Describes the content encoding of a string property."),if:Mt("schema.json.if",'The validation outcome of the "if" subschema controls which of the "then" or "else" keywords are evaluated.'),then:Mt("schema.json.then",'The "if" subschema is used for validation when the "if" subschema succeeds.'),else:Mt("schema.json.else",'The "else" subschema is used for validation when the "if" subschema fails.')};for(const e in It.schemas){const t=It.schemas[e];for(const e in t.properties){let n=t.properties[e];"boolean"==typeof n&&(n=t.properties[e]={});const r=Ft[e];r?n.description=r:console.log(`${e}: localize('schema.json.${e}', "")`)}}var Lt=n(7373);function Wt(e,t){if("string"!=typeof e)throw new TypeError("Expected a string");const n=String(e);let r="";const o=!!t&&!!t.extended,i=!!t&&!!t.globstar;let s=!1;const a=t&&"string"==typeof t.flags?t.flags:"";let c;for(let e=0,t=n.length;e<t;e++)switch(c=n[e],c){case"/":case"$":case"^":case"+":case".":case"(":case")":case"=":case"!":case"|":r+="\\"+c;break;case"?":if(o){r+=".";break}case"[":case"]":if(o){r+=c;break}case"{":if(o){s=!0,r+="(";break}case"}":if(o){s=!1,r+=")";break}case",":if(s){r+="|";break}r+="\\"+c;break;case"*":const t=n[e-1];let a=1;for(;"*"===n[e+1];)a++,e++;const u=n[e+1];i?!(a>1)||"/"!==t&&void 0!==t&&"{"!==t&&","!==t||"/"!==u&&void 0!==u&&","!==u&&"}"!==u?r+="([^/]*)":("/"===u?e++:"/"===t&&r.endsWith("\\/")&&(r=r.substr(0,r.length-2)),r+="((?:[^/]*(?:/|$))*)"):r+=".*";break;default:r+=c}return a&&~a.indexOf("g")||(r="^"+r+"$"),new RegExp(r,a)}const $t=et.LV();class Vt{constructor(e,t){this.globWrappers=[];try{for(let t of e){const e="!"!==t[0];e||(t=t.substring(1)),t.length>0&&("/"===t[0]&&(t=t.substring(1)),this.globWrappers.push({regexp:Wt("**/"+t,{extended:!0,globstar:!0}),include:e}))}this.uris=t}catch(e){this.globWrappers.length=0,this.uris=[]}}matchesPattern(e){let t=!1;for(const{regexp:n,include:r}of this.globWrappers)n.test(e)&&(t=r);return t}getURIs(){return this.uris}}class Ut{constructor(e,t,n){this.service=e,this.uri=t,this.dependencies=new Set,this.anchors=void 0,n&&(this.unresolvedSchema=this.service.promise.resolve(new Ht(n)))}getUnresolvedSchema(){return this.unresolvedSchema||(this.unresolvedSchema=this.service.loadSchema(this.uri)),this.unresolvedSchema}getResolvedSchema(){return this.resolvedSchema||(this.resolvedSchema=this.getUnresolvedSchema().then((e=>this.service.resolveSchemaContent(e,this)))),this.resolvedSchema}clearSchema(){const e=!!this.unresolvedSchema;return this.resolvedSchema=void 0,this.unresolvedSchema=void 0,this.dependencies.clear(),this.anchors=void 0,e}}class Ht{constructor(e,t=[]){this.schema=e,this.errors=t}}class zt{constructor(e,t=[],n=[],r){this.schema=e,this.errors=t,this.warnings=n,this.schemaDraft=r}getSection(e){const t=this.getSectionRecursive(e,this.schema);if(t)return dt(t)}getSectionRecursive(e,t){if(!t||"boolean"==typeof t||0===e.length)return t;const n=e.shift();if(t.properties&&(t.properties[n],1))return this.getSectionRecursive(e,t.properties[n]);if(t.patternProperties){for(const r of Object.keys(t.patternProperties))if(X(r)?.test(n))return this.getSectionRecursive(e,t.patternProperties[r])}else{if("object"==typeof t.additionalProperties)return this.getSectionRecursive(e,t.additionalProperties);if(n.match("[0-9]+"))if(Array.isArray(t.items)){const r=parseInt(n,10);if(!isNaN(r)&&t.items[r])return this.getSectionRecursive(e,t.items[r])}else if(t.items)return this.getSectionRecursive(e,t.items)}}}class Bt{constructor(e,t,n){this.contextService=t,this.requestService=e,this.promiseConstructor=n||Promise,this.callOnDispose=[],this.contributionSchemas={},this.contributionAssociations=[],this.schemasById={},this.filePatternAssociations=[],this.registeredSchemasIds={}}getRegisteredSchemaIds(e){return Object.keys(this.registeredSchemasIds).filter((t=>{const n=Lt.URI.parse(t).scheme;return"schemaservice"!==n&&(!e||e(n))}))}get promise(){return this.promiseConstructor}dispose(){for(;this.callOnDispose.length>0;)this.callOnDispose.pop()()}onResourceChange(e){this.cachedSchemaForResource=void 0;let t=!1;const n=[e=Jt(e)],r=Object.keys(this.schemasById).map((e=>this.schemasById[e]));for(;n.length;){const e=n.pop();for(let o=0;o<r.length;o++){const i=r[o];i&&(i.uri===e||i.dependencies.has(e))&&(i.uri!==e&&n.push(i.uri),i.clearSchema()&&(t=!0),r[o]=void 0)}}return t}setSchemaContributions(e){if(e.schemas){const t=e.schemas;for(const e in t){const n=Jt(e);this.contributionSchemas[n]=this.addSchemaHandle(n,t[e])}}if(Array.isArray(e.schemaAssociations)){const t=e.schemaAssociations;for(let e of t){const t=e.uris.map(Jt),n=this.addFilePatternAssociation(e.pattern,t);this.contributionAssociations.push(n)}}}addSchemaHandle(e,t){const n=new Ut(this,e,t);return this.schemasById[e]=n,n}getOrAddSchemaHandle(e,t){return this.schemasById[e]||this.addSchemaHandle(e,t)}addFilePatternAssociation(e,t){const n=new Vt(e,t);return this.filePatternAssociations.push(n),n}registerExternalSchema(e,t,n){const r=Jt(e);return this.registeredSchemasIds[r]=!0,this.cachedSchemaForResource=void 0,t&&this.addFilePatternAssociation(t,[r]),n?this.addSchemaHandle(r,n):this.getOrAddSchemaHandle(r)}clearExternalSchemas(){this.schemasById={},this.filePatternAssociations=[],this.registeredSchemasIds={},this.cachedSchemaForResource=void 0;for(const e in this.contributionSchemas)this.schemasById[e]=this.contributionSchemas[e],this.registeredSchemasIds[e]=!0;for(const e of this.contributionAssociations)this.filePatternAssociations.push(e)}getResolvedSchema(e){const t=Jt(e),n=this.schemasById[t];return n?n.getResolvedSchema():this.promise.resolve(void 0)}loadSchema(e){if(!this.requestService){const t=$t("json.schema.norequestservice","Unable to load schema from '{0}'. No schema request service available",Gt(e));return this.promise.resolve(new Ht({},[t]))}return this.requestService(e).then((t=>{if(!t){const t=$t("json.schema.nocontent","Unable to load schema from '{0}': No content.",Gt(e));return new Ht({},[t])}let n={};const r=[];n=L(t,r);const o=r.length?[$t("json.schema.invalidFormat","Unable to parse content from '{0}': Parse error at offset {1}.",Gt(e),r[0].offset)]:[];return new Ht(n,o)}),(t=>{let n=t.toString();const r=t.toString().split("Error: ");return r.length>1&&(n=r[1]),G(n,".")&&(n=n.substr(0,n.length-1)),new Ht({},[$t("json.schema.nocontent","Unable to load schema from '{0}': {1}.",Gt(e),n)])}))}resolveSchemaContent(e,t){const n=e.errors.slice(0),r=e.schema;let o=r.$schema?Jt(r.$schema):void 0;if("http://json-schema.org/draft-03/schema"===o)return this.promise.resolve(new zt({},[$t("json.schema.draft03.notsupported","Draft-03 schemas are not supported.")],[],o));let i=new Set;const s=this.contextService,a=(e,t,r,o)=>{let i;i=void 0===o||0===o.length?t:"/"===o.charAt(0)?((e,t)=>{t=decodeURIComponent(t);let n=e;return"/"===t[0]&&(t=t.substring(1)),t.split("/").some((e=>(e=e.replace(/~1/g,"/").replace(/~0/g,"~"),n=n[e],!n))),n})(t,o):((e,t,n)=>(t.anchors||(t.anchors=l(e)),t.anchors.get(n)))(t,r,o),i?((e,t)=>{for(const n in t)t.hasOwnProperty(n)&&!e.hasOwnProperty(n)&&"id"!==n&&"$id"!==n&&(e[n]=t[n])})(e,i):n.push($t("json.schema.invalidid","$ref '{0}' in '{1}' can not be resolved.",o,r.uri))},c=(e,t,r,o)=>{s&&!/^[A-Za-z][A-Za-z0-9+\-.+]*:\/\/.*/.test(t)&&(t=s.resolveRelativePath(t,o.uri)),t=Jt(t);const i=this.getOrAddSchemaHandle(t);return i.getUnresolvedSchema().then((s=>{if(o.dependencies.add(t),s.errors.length){const e=r?t+"#"+r:t;n.push($t("json.schema.problemloadingref","Problems loading reference '{0}': {1}",e,s.errors[0]))}return a(e,s.schema,i,r),u(e,s.schema,i)}))},u=(e,t,n)=>{const r=[];return this.traverseNodes(e,(e=>{const o=new Set;for(;e.$ref;){const i=e.$ref,s=i.split("#",2);if(delete e.$ref,s[0].length>0)return void r.push(c(e,s[0],s[1],n));if(!o.has(i)){const r=s[1];a(e,t,n,r),o.add(i)}}e.$recursiveRef&&i.add("$recursiveRef"),e.$dynamicRef&&i.add("$dynamicRef")})),this.promise.all(r)},l=e=>{const t=new Map;return this.traverseNodes(e,(e=>{const r=e.$id||e.id,o=K(r)&&"#"===r.charAt(0)?r.substring(1):e.$anchor;o&&(t.has(o)?n.push($t("json.schema.duplicateid","Duplicate anchor declaration: '{0}'",o)):t.set(o,e)),e.$recursiveAnchor&&i.add("$recursiveAnchor"),e.$dynamicAnchor&&i.add("$dynamicAnchor")})),t};return u(r,r,t).then((e=>{let t=[];return i.size&&t.push($t("json.schema.warnings","The schema uses meta-schema features ({0}) that are not yet supported by the validator.",Array.from(i.keys()).join(", "))),new zt(r,n,t,o)}))}traverseNodes(e,t){if(!e||"object"!=typeof e)return Promise.resolve(null);const n=new Set,r=(...e)=>{for(const t of e)J(t)&&a.push(t)},o=(...e)=>{for(const t of e)if(J(t))for(const e in t){const n=t[e];J(n)&&a.push(n)}},i=(...e)=>{for(const t of e)if(Array.isArray(t))for(const e of t)J(e)&&a.push(e)},s=e=>{if(Array.isArray(e))for(const t of e)J(t)&&a.push(t);else J(e)&&a.push(e)},a=[e];let c=a.pop();for(;c;)n.has(c)||(n.add(c),t(c),r(c.additionalItems,c.additionalProperties,c.not,c.contains,c.propertyNames,c.if,c.then,c.else,c.unevaluatedItems,c.unevaluatedProperties),o(c.definitions,c.$defs,c.properties,c.patternProperties,c.dependencies,c.dependentSchemas),i(c.anyOf,c.allOf,c.oneOf,c.prefixItems),s(c.items)),c=a.pop()}getSchemaFromProperty(e,t){if("object"===t.root?.type)for(const n of t.root.properties)if("$schema"===n.keyNode.value&&"string"===n.valueNode?.type){let t=n.valueNode.value;return this.contextService&&!/^\w[\w\d+.-]*:/.test(t)&&(t=this.contextService.resolveRelativePath(t,e)),t}}getAssociatedSchemas(e){const t=Object.create(null),n=[],r=function(e){try{return Lt.URI.parse(e).with({fragment:null,query:null}).toString(!0)}catch(t){return e}}(e);for(const e of this.filePatternAssociations)if(e.matchesPattern(r))for(const r of e.getURIs())t[r]||(n.push(r),t[r]=!0);return n}getSchemaURIsForResource(e,t){let n=t&&this.getSchemaFromProperty(e,t);return n?[n]:this.getAssociatedSchemas(e)}getSchemaForResource(e,t){if(t){let n=this.getSchemaFromProperty(e,t);if(n){const e=Jt(n);return this.getOrAddSchemaHandle(e).getResolvedSchema()}}if(this.cachedSchemaForResource&&this.cachedSchemaForResource.resource===e)return this.cachedSchemaForResource.resolvedSchema;const n=this.getAssociatedSchemas(e),r=n.length>0?this.createCombinedSchema(e,n).getResolvedSchema():this.promise.resolve(void 0);return this.cachedSchemaForResource={resource:e,resolvedSchema:r},r}createCombinedSchema(e,t){if(1===t.length)return this.getOrAddSchemaHandle(t[0]);{const n="schemaservice://combinedSchema/"+encodeURIComponent(e),r={allOf:t.map((e=>({$ref:e})))};return this.addSchemaHandle(n,r)}}getMatchingSchemas(e,t,n){if(n){const e=n.id||"schemaservice://untitled/matchingSchemas/"+Kt++;return this.addSchemaHandle(e,n).getResolvedSchema().then((e=>t.getMatchingSchemas(e.schema).filter((e=>!e.inverted))))}return this.getSchemaForResource(e.uri,t).then((e=>e?t.getMatchingSchemas(e.schema).filter((e=>!e.inverted)):[]))}}let Kt=0;function Jt(e){try{return Lt.URI.parse(e).toString(!0)}catch(t){return e}}function Gt(e){try{const t=Lt.URI.parse(e);if("file"===t.scheme)return t.fsPath}catch(e){}return e}function Xt(e,t){const n=[],r=[],o=[];let i=-1;const s=F(e.getText(),!1);let a=s.scan();function c(e){n.push(e),r.push(o.length)}for(;17!==a;){switch(a){case 1:case 3:{const t=e.positionAt(s.getTokenOffset()).line,n={startLine:t,endLine:t,kind:1===a?"object":"array"};o.push(n);break}case 2:case 4:{const t=2===a?"object":"array";if(o.length>0&&o[o.length-1].kind===t){const t=o.pop(),n=e.positionAt(s.getTokenOffset()).line;t&&n>t.startLine+1&&i!==t.startLine&&(t.endLine=n-1,c(t),i=t.startLine)}break}case 13:{const t=e.positionAt(s.getTokenOffset()).line,n=e.positionAt(s.getTokenOffset()+s.getTokenLength()).line;1===s.getTokenError()&&t+1<e.lineCount?s.setPosition(e.offsetAt(p.create(t+1,0))):t<n&&(c({startLine:t,endLine:n,kind:k.Comment}),i=t);break}case 12:{const t=e.getText().substr(s.getTokenOffset(),s.getTokenLength()).match(/^\/\/\s*#(region\b)|(endregion\b)/);if(t){const n=e.positionAt(s.getTokenOffset()).line;if(t[1]){const e={startLine:n,endLine:n,kind:k.Region};o.push(e)}else{let e=o.length-1;for(;e>=0&&o[e].kind!==k.Region;)e--;if(e>=0){const t=o[e];o.length=e,n>t.startLine&&i!==t.startLine&&(t.endLine=n,c(t),i=t.startLine)}}}break}}a=s.scan()}const u=t&&t.rangeLimit;if("number"!=typeof u||n.length<=u)return n;t&&t.onRangeLimitExceeded&&t.onRangeLimitExceeded(e.uri);const l=[];for(let e of r)e<30&&(l[e]=(l[e]||0)+1);let d=0,f=0;for(let e=0;e<l.length;e++){const t=l[e];if(t){if(t+d>u){f=e;break}d+=t}}const h=[];for(let e=0;e<n.length;e++){const t=r[e];"number"==typeof t&&(t<f||t===f&&d++<u)&&h.push(n[e])}return h}function Zt(e,t,n){function r(t,n){return m.create(e.positionAt(t),e.positionAt(n))}const o=F(e.getText(),!0);function i(e,t){return o.setPosition(e),o.scan()===t?o.getTokenOffset()+o.getTokenLength():-1}return t.map((function(t){let o=e.offsetAt(t),s=n.getNodeFromOffset(o,!0);const a=[];for(;s;){switch(s.type){case"string":case"object":case"array":const e=s.offset+1,t=s.offset+s.length-1;e<t&&o>=e&&o<=t&&a.push(r(e,t)),a.push(r(s.offset,s.offset+s.length));break;case"number":case"boolean":case"null":case"property":a.push(r(s.offset,s.offset+s.length))}if("property"===s.type||s.parent&&"array"===s.parent.type){const e=i(s.offset+s.length,5);-1!==e&&a.push(r(s.offset,e))}s=s.parent}let c;for(let e=a.length-1;e>=0;e--)c=De.create(a[e],c);return c||(c=De.create(m.create(t,t))),c}))}function Yt(e,t){const n=[];return t.visit((r=>{if("property"===r.type&&"$ref"===r.keyNode.value&&"string"===r.valueNode?.type){const o=r.valueNode.value,i=function(e,t){const n=function(e){return"#"===e?[]:"#"!==e[0]||"/"!==e[1]?null:e.substring(2).split(/\//).map(tn)}(t);return n?en(n,e.root):null}(t,o);if(i){const t=e.positionAt(i.offset);n.push({target:`${e.uri}#${t.line+1},${t.character+1}`,range:Qt(e,r.valueNode)})}}return!0})),Promise.resolve(n)}function Qt(e,t){return m.create(e.positionAt(t.offset+1),e.positionAt(t.offset+t.length-1))}function en(e,t){if(!t)return null;if(0===e.length)return t;const n=e.shift();if(t&&"object"===t.type){const r=t.properties.find((e=>e.keyNode.value===n));return r?en(e,r.valueNode):null}if(t&&"array"===t.type&&n.match(/^(0|[1-9][0-9]*)$/)){const r=Number.parseInt(n),o=t.items[r];return o?en(e,o):null}return null}function tn(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function nn(e){const t=e.promiseConstructor||Promise,n=new Bt(e.schemaRequestService,e.workspaceContext,t);n.setSchemaContributions(It);const o=new Ct(n,e.contributions,t,e.clientCapabilities),i=new St(n,e.contributions,t),s=new At(n),u=new Pt(n,t);return{configure:e=>{n.clearExternalSchemas(),e.schemas&&e.schemas.forEach((e=>{n.registerExternalSchema(e.uri,e.fileMatch,e.schema)})),u.configure(e)},resetSchema:e=>n.onResourceChange(e),doValidation:u.doValidation.bind(u),getLanguageStatus:u.getLanguageStatus.bind(u),parseJSONDocument:e=>function(e,t){const n=[];let r=-1;const o=e.getText(),i=F(o,!1),s=t&&t.collectComments?[]:void 0;function a(){for(;;){const t=i.scan();switch(l(),t){case 12:case 13:Array.isArray(s)&&s.push(m.create(e.positionAt(i.getTokenOffset()),e.positionAt(i.getTokenOffset()+i.getTokenLength())));break;case 15:case 14:break;default:return t}}}function c(t,o,i,s,a=S.Error){if(0===n.length||i!==r){const c=m.create(e.positionAt(i),e.positionAt(s));n.push(P.create(c,t,a,o,e.languageId)),r=i}}function u(e,t,n,r=[],s=[]){let u=i.getTokenOffset(),l=i.getTokenOffset()+i.getTokenLength();if(u===l&&u>0){for(u--;u>0&&/\s/.test(o.charAt(u));)u--;l=u+1}if(c(e,t,u,l),n&&d(n,!1),r.length+s.length>0){let e=i.getToken();for(;17!==e;){if(-1!==r.indexOf(e)){a();break}if(-1!==s.indexOf(e))break;e=a()}}return n}function l(){switch(i.getTokenError()){case 4:return u(tt("InvalidUnicode","Invalid unicode sequence in string."),Be.InvalidUnicode),!0;case 5:return u(tt("InvalidEscapeCharacter","Invalid escape character in string."),Be.InvalidEscapeCharacter),!0;case 3:return u(tt("UnexpectedEndOfNumber","Unexpected end of number."),Be.UnexpectedEndOfNumber),!0;case 1:return u(tt("UnexpectedEndOfComment","Unexpected end of comment."),Be.UnexpectedEndOfComment),!0;case 2:return u(tt("UnexpectedEndOfString","Unexpected end of string."),Be.UnexpectedEndOfString),!0;case 6:return u(tt("InvalidCharacter","Invalid characters in string. Control characters must be escaped."),Be.InvalidCharacter),!0}return!1}function d(e,t){return e.length=i.getTokenOffset()+i.getTokenLength()-e.offset,t&&a(),e}const f=new ct(void 0,0,0);function h(t,n){const r=new ut(t,i.getTokenOffset(),f);let o=p(r);if(!o){if(16!==i.getToken())return;{u(tt("DoubleQuotesExpected","Property keys must be doublequoted"),Be.Undefined);const e=new ct(r,i.getTokenOffset(),i.getTokenLength());e.value=i.getTokenValue(),o=e,a()}}if(r.keyNode=o,"//"!==o.value){const e=n[o.value];e?(c(tt("DuplicateKeyWarning","Duplicate object key"),Be.DuplicateKey,r.keyNode.offset,r.keyNode.offset+r.keyNode.length,S.Warning),J(e)&&c(tt("DuplicateKeyWarning","Duplicate object key"),Be.DuplicateKey,e.keyNode.offset,e.keyNode.offset+e.keyNode.length,S.Warning),n[o.value]=!0):n[o.value]=r}if(6===i.getToken())r.colonOffset=i.getTokenOffset(),a();else if(u(tt("ColonExpected","Colon expected"),Be.ColonExpected),10===i.getToken()&&e.positionAt(o.offset+o.length).line<e.positionAt(i.getTokenOffset()).line)return r.length=o.length,r;const s=g(r);return s?(r.valueNode=s,r.length=s.offset+s.length-r.offset,r):u(tt("ValueExpected","Value expected"),Be.ValueExpected,r,[],[2,5])}function p(e){if(10!==i.getToken())return;const t=new ct(e,i.getTokenOffset());return t.value=i.getTokenValue(),d(t,!0)}function g(e){return function(e){if(3!==i.getToken())return;const t=new st(e,i.getTokenOffset());a();let n=!1;for(;4!==i.getToken()&&17!==i.getToken();){if(5===i.getToken()){n||u(tt("ValueExpected","Value expected"),Be.ValueExpected);const e=i.getTokenOffset();if(a(),4===i.getToken()){n&&c(tt("TrailingComma","Trailing comma"),Be.TrailingComma,e,e+1);continue}}else n&&u(tt("ExpectedComma","Expected comma"),Be.CommaExpected);const e=g(t);e?t.items.push(e):u(tt("PropertyExpected","Value expected"),Be.ValueExpected,void 0,[],[4,5]),n=!0}return 4!==i.getToken()?u(tt("ExpectedCloseBracket","Expected comma or closing bracket"),Be.CommaOrCloseBacketExpected,t):d(t,!0)}(e)||function(e){if(1!==i.getToken())return;const t=new lt(e,i.getTokenOffset()),n=Object.create(null);a();let r=!1;for(;2!==i.getToken()&&17!==i.getToken();){if(5===i.getToken()){r||u(tt("PropertyExpected","Property expected"),Be.PropertyExpected);const e=i.getTokenOffset();if(a(),2===i.getToken()){r&&c(tt("TrailingComma","Trailing comma"),Be.TrailingComma,e,e+1);continue}}else r&&u(tt("ExpectedComma","Expected comma"),Be.CommaExpected);const e=h(t,n);e?t.properties.push(e):u(tt("PropertyExpected","Property expected"),Be.PropertyExpected,void 0,[],[2,5]),r=!0}return 2!==i.getToken()?u(tt("ExpectedCloseBrace","Expected comma or closing brace"),Be.CommaOrCloseBraceExpected,t):d(t,!0)}(e)||p(e)||function(e){if(11!==i.getToken())return;const t=new at(e,i.getTokenOffset());if(0===i.getTokenError()){const e=i.getTokenValue();try{const n=JSON.parse(e);if(!H(n))return u(tt("InvalidNumberFormat","Invalid number format."),Be.Undefined,t);t.value=n}catch(e){return u(tt("InvalidNumberFormat","Invalid number format."),Be.Undefined,t)}t.isInteger=-1===e.indexOf(".")}return d(t,!0)}(e)||function(e){switch(i.getToken()){case 7:return d(new ot(e,i.getTokenOffset()),!0);case 8:return d(new it(e,!0,i.getTokenOffset()),!0);case 9:return d(new it(e,!1,i.getTokenOffset()),!0);default:return}}(e)}let y;return 17!==a()&&(y=g(y),y?17!==i.getToken()&&u(tt("End of file expected","End of file expected."),Be.Undefined):u(tt("Invalid symbol","Expected a JSON object, array or literal."),Be.Undefined)),new bt(y,n,s)}(e,{collectComments:!0}),newJSONDocument:(e,t)=>function(e,t=[]){return new bt(e,t,[])}(e,t),getMatchingSchemas:n.getMatchingSchemas.bind(n),doResolve:o.doResolve.bind(o),doComplete:o.doComplete.bind(o),findDocumentSymbols:s.findDocumentSymbols.bind(s),findDocumentSymbols2:s.findDocumentSymbols2.bind(s),findDocumentColors:s.findDocumentColors.bind(s),getColorPresentations:s.getColorPresentations.bind(s),doHover:i.doHover.bind(i),getFoldingRanges:Xt,getSelectionRanges:Zt,findDefinition:()=>Promise.resolve([]),findLinks:Yt,format:(e,t,n)=>{let o;if(t){const n=e.offsetAt(t.start);o={offset:n,length:e.offsetAt(t.end)-n}}const i={tabSize:n?n.tabSize:4,insertSpaces:!0===n?.insertSpaces,insertFinalNewline:!0===n?.insertFinalNewline,eol:"\n",keepLines:!0===n?.keepLines};return function(e,t,n){return function(e,t,n){var o,i,s,u,l;if(t){for(u=t.offset,l=u+t.length,s=u;s>0&&!c(e,s-1);)s--;for(var d=l;d<e.length&&!c(e,d);)d++;i=e.substring(s,d),o=function(e,t){for(var n=0,r=0,o=t.tabSize||4;n<e.length;){var i=e.charAt(n);if(" "===i)r++;else{if("\t"!==i)break;r+=o}n++}return Math.floor(r/o)}(i,n)}else i=e,o=0,s=0,u=0,l=e.length;var f,h=function(e,t){for(var n=0;n<t.length;n++){var r=t.charAt(n);if("\r"===r)return n+1<t.length&&"\n"===t.charAt(n+1)?"\r\n":"\r";if("\n"===r)return"\n"}return e&&e.eol||"\n"}(n,e),p=0,m=0;f=n.insertSpaces?a(" ",n.tabSize||4):"\t";var g=r(i,!1),y=!1;function v(){return p>1?a(h,p)+a(f,o+m):h+a(f,o+m)}function b(){var e=g.scan();for(p=0;15===e||14===e;)14===e&&n.keepLines?p+=1:14===e&&(p=1),e=g.scan();return y=16===e||0!==g.getTokenError(),e}var R=[];function k(n,r,o){y||t&&!(r<l&&o>u)||e.substring(r,o)===n||R.push({offset:r,length:o-r,content:n})}var x=b();if(n.keepLines&&p>0&&k(a(h,p),0,0),17!==x){var C=g.getTokenOffset()+s;k(a(f,o),s,C)}for(;17!==x;){for(var S=g.getTokenOffset()+g.getTokenLength()+s,T=b(),w="",P=!1;0===p&&(12===T||13===T);)k(" ",S,g.getTokenOffset()+s),S=g.getTokenOffset()+g.getTokenLength()+s,w=(P=12===T)?v():"",T=b();if(2===T)1!==x&&m--,n.keepLines&&p>0||!n.keepLines&&1!==x?w=v():n.keepLines&&(w=" ");else if(4===T)3!==x&&m--,n.keepLines&&p>0||!n.keepLines&&3!==x?w=v():n.keepLines&&(w=" ");else{switch(x){case 3:case 1:m++,w=n.keepLines&&p>0||!n.keepLines?v():" ";break;case 5:w=n.keepLines&&p>0||!n.keepLines?v():" ";break;case 12:w=v();break;case 13:p>0?w=v():P||(w=" ");break;case 6:n.keepLines&&p>0?w=v():P||(w=" ");break;case 10:n.keepLines&&p>0?w=v():6!==T||P||(w="");break;case 7:case 8:case 9:case 11:case 2:case 4:n.keepLines&&p>0?w=v():12!==T&&13!==T||P?5!==T&&17!==T&&(y=!0):w=" ";break;case 16:y=!0}p>0&&(12===T||13===T)&&(w=v())}17===T&&(w=n.keepLines&&p>0?v():n.insertFinalNewline?h:""),k(w,S,g.getTokenOffset()+s),x=T}return R}(e,t,n)}(e.getText(),o,i).map((t=>D.replace(m.create(e.positionAt(t.offset),e.positionAt(t.offset+t.length)),t.content)))}}}},3870:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TraceFormat=t.TraceValues=t.Trace=t.ProgressType=t.ProgressToken=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.LRUCache=t.Touch=t.LinkedMap=t.ParameterStructures=t.NotificationType9=t.NotificationType8=t.NotificationType7=t.NotificationType6=t.NotificationType5=t.NotificationType4=t.NotificationType3=t.NotificationType2=t.NotificationType1=t.NotificationType0=t.NotificationType=t.ErrorCodes=t.ResponseError=t.RequestType9=t.RequestType8=t.RequestType7=t.RequestType6=t.RequestType5=t.RequestType4=t.RequestType3=t.RequestType2=t.RequestType1=t.RequestType0=t.RequestType=t.Message=t.RAL=void 0,t.CancellationStrategy=t.CancellationSenderStrategy=t.CancellationReceiverStrategy=t.ConnectionError=t.ConnectionErrors=t.LogTraceNotification=t.SetTraceNotification=void 0;const r=n(839);Object.defineProperty(t,"Message",{enumerable:!0,get:function(){return r.Message}}),Object.defineProperty(t,"RequestType",{enumerable:!0,get:function(){return r.RequestType}}),Object.defineProperty(t,"RequestType0",{enumerable:!0,get:function(){return r.RequestType0}}),Object.defineProperty(t,"RequestType1",{enumerable:!0,get:function(){return r.RequestType1}}),Object.defineProperty(t,"RequestType2",{enumerable:!0,get:function(){return r.RequestType2}}),Object.defineProperty(t,"RequestType3",{enumerable:!0,get:function(){return r.RequestType3}}),Object.defineProperty(t,"RequestType4",{enumerable:!0,get:function(){return r.RequestType4}}),Object.defineProperty(t,"RequestType5",{enumerable:!0,get:function(){return r.RequestType5}}),Object.defineProperty(t,"RequestType6",{enumerable:!0,get:function(){return r.RequestType6}}),Object.defineProperty(t,"RequestType7",{enumerable:!0,get:function(){return r.RequestType7}}),Object.defineProperty(t,"RequestType8",{enumerable:!0,get:function(){return r.RequestType8}}),Object.defineProperty(t,"RequestType9",{enumerable:!0,get:function(){return r.RequestType9}}),Object.defineProperty(t,"ResponseError",{enumerable:!0,get:function(){return r.ResponseError}}),Object.defineProperty(t,"ErrorCodes",{enumerable:!0,get:function(){return r.ErrorCodes}}),Object.defineProperty(t,"NotificationType",{enumerable:!0,get:function(){return r.NotificationType}}),Object.defineProperty(t,"NotificationType0",{enumerable:!0,get:function(){return r.NotificationType0}}),Object.defineProperty(t,"NotificationType1",{enumerable:!0,get:function(){return r.NotificationType1}}),Object.defineProperty(t,"NotificationType2",{enumerable:!0,get:function(){return r.NotificationType2}}),Object.defineProperty(t,"NotificationType3",{enumerable:!0,get:function(){return r.NotificationType3}}),Object.defineProperty(t,"NotificationType4",{enumerable:!0,get:function(){return r.NotificationType4}}),Object.defineProperty(t,"NotificationType5",{enumerable:!0,get:function(){return r.NotificationType5}}),Object.defineProperty(t,"NotificationType6",{enumerable:!0,get:function(){return r.NotificationType6}}),Object.defineProperty(t,"NotificationType7",{enumerable:!0,get:function(){return r.NotificationType7}}),Object.defineProperty(t,"NotificationType8",{enumerable:!0,get:function(){return r.NotificationType8}}),Object.defineProperty(t,"NotificationType9",{enumerable:!0,get:function(){return r.NotificationType9}}),Object.defineProperty(t,"ParameterStructures",{enumerable:!0,get:function(){return r.ParameterStructures}});const o=n(6184);Object.defineProperty(t,"LinkedMap",{enumerable:!0,get:function(){return o.LinkedMap}}),Object.defineProperty(t,"LRUCache",{enumerable:!0,get:function(){return o.LRUCache}}),Object.defineProperty(t,"Touch",{enumerable:!0,get:function(){return o.Touch}});const i=n(3911);Object.defineProperty(t,"Disposable",{enumerable:!0,get:function(){return i.Disposable}});const s=n(7135);Object.defineProperty(t,"Event",{enumerable:!0,get:function(){return s.Event}}),Object.defineProperty(t,"Emitter",{enumerable:!0,get:function(){return s.Emitter}});const a=n(3881);Object.defineProperty(t,"CancellationTokenSource",{enumerable:!0,get:function(){return a.CancellationTokenSource}}),Object.defineProperty(t,"CancellationToken",{enumerable:!0,get:function(){return a.CancellationToken}});const c=n(6525);Object.defineProperty(t,"MessageReader",{enumerable:!0,get:function(){return c.MessageReader}}),Object.defineProperty(t,"AbstractMessageReader",{enumerable:!0,get:function(){return c.AbstractMessageReader}}),Object.defineProperty(t,"ReadableStreamMessageReader",{enumerable:!0,get:function(){return c.ReadableStreamMessageReader}});const u=n(6654);Object.defineProperty(t,"MessageWriter",{enumerable:!0,get:function(){return u.MessageWriter}}),Object.defineProperty(t,"AbstractMessageWriter",{enumerable:!0,get:function(){return u.AbstractMessageWriter}}),Object.defineProperty(t,"WriteableStreamMessageWriter",{enumerable:!0,get:function(){return u.WriteableStreamMessageWriter}});const l=n(1343);Object.defineProperty(t,"ConnectionStrategy",{enumerable:!0,get:function(){return l.ConnectionStrategy}}),Object.defineProperty(t,"ConnectionOptions",{enumerable:!0,get:function(){return l.ConnectionOptions}}),Object.defineProperty(t,"NullLogger",{enumerable:!0,get:function(){return l.NullLogger}}),Object.defineProperty(t,"createMessageConnection",{enumerable:!0,get:function(){return l.createMessageConnection}}),Object.defineProperty(t,"ProgressToken",{enumerable:!0,get:function(){return l.ProgressToken}}),Object.defineProperty(t,"ProgressType",{enumerable:!0,get:function(){return l.ProgressType}}),Object.defineProperty(t,"Trace",{enumerable:!0,get:function(){return l.Trace}}),Object.defineProperty(t,"TraceValues",{enumerable:!0,get:function(){return l.TraceValues}}),Object.defineProperty(t,"TraceFormat",{enumerable:!0,get:function(){return l.TraceFormat}}),Object.defineProperty(t,"SetTraceNotification",{enumerable:!0,get:function(){return l.SetTraceNotification}}),Object.defineProperty(t,"LogTraceNotification",{enumerable:!0,get:function(){return l.LogTraceNotification}}),Object.defineProperty(t,"ConnectionErrors",{enumerable:!0,get:function(){return l.ConnectionErrors}}),Object.defineProperty(t,"ConnectionError",{enumerable:!0,get:function(){return l.ConnectionError}}),Object.defineProperty(t,"CancellationReceiverStrategy",{enumerable:!0,get:function(){return l.CancellationReceiverStrategy}}),Object.defineProperty(t,"CancellationSenderStrategy",{enumerable:!0,get:function(){return l.CancellationSenderStrategy}}),Object.defineProperty(t,"CancellationStrategy",{enumerable:!0,get:function(){return l.CancellationStrategy}});const d=n(147);t.RAL=d.default},3881:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CancellationTokenSource=t.CancellationToken=void 0;const r=n(147),o=n(7574),i=n(7135);var s;!function(e){e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:i.Event.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:i.Event.None}),e.is=function(t){const n=t;return n&&(n===e.None||n===e.Cancelled||o.boolean(n.isCancellationRequested)&&!!n.onCancellationRequested)}}(s=t.CancellationToken||(t.CancellationToken={}));const a=Object.freeze((function(e,t){const n=(0,r.default)().timer.setTimeout(e.bind(t),0);return{dispose(){n.dispose()}}}));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 i.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)=>{"use strict";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.TraceValues=t.Trace=t.NullLogger=t.ProgressType=t.ProgressToken=void 0;const r=n(147),o=n(7574),i=n(839),s=n(6184),a=n(7135),c=n(3881);var u,l,d,f,h,p,m,g,y,v,b,R,k,x,C;!function(e){e.type=new i.NotificationType("$/cancelRequest")}(u||(u={})),function(e){e.is=function(e){return"string"==typeof e||"number"==typeof e}}(l=t.ProgressToken||(t.ProgressToken={})),function(e){e.type=new i.NotificationType("$/progress")}(d||(d={})),t.ProgressType=class{constructor(){}},function(e){e.is=function(e){return o.func(e)}}(f||(f={})),t.NullLogger=Object.freeze({error:()=>{},warn:()=>{},info:()=>{},log:()=>{}}),function(e){e[e.Off=0]="Off",e[e.Messages=1]="Messages",e[e.Compact=2]="Compact",e[e.Verbose=3]="Verbose"}(h=t.Trace||(t.Trace={})),(C=t.TraceValues||(t.TraceValues={})).Off="off",C.Messages="messages",C.Compact="compact",C.Verbose="verbose",function(e){e.fromString=function(t){if(!o.string(t))return e.Off;switch(t=t.toLowerCase()){case"off":return e.Off;case"messages":return e.Messages;case"compact":return e.Compact;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.Compact:return"compact";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 o.string(t)&&"json"===(t=t.toLowerCase())?e.JSON:e.Text}}(p=t.TraceFormat||(t.TraceFormat={})),function(e){e.type=new i.NotificationType("$/setTrace")}(m=t.SetTraceNotification||(t.SetTraceNotification={})),function(e){e.type=new i.NotificationType("$/logTrace")}(g=t.LogTraceNotification||(t.LogTraceNotification={})),function(e){e[e.Closed=1]="Closed",e[e.Disposed=2]="Disposed",e[e.AlreadyListening=3]="AlreadyListening"}(y=t.ConnectionErrors||(t.ConnectionErrors={}));class S extends Error{constructor(e,t){super(t),this.code=e,Object.setPrototypeOf(this,S.prototype)}}t.ConnectionError=S,function(e){e.is=function(e){const t=e;return t&&o.func(t.cancelUndispatched)}}(v=t.ConnectionStrategy||(t.ConnectionStrategy={})),function(e){e.Message=Object.freeze({createCancellationTokenSource:e=>new c.CancellationTokenSource}),e.is=function(e){const t=e;return t&&o.func(t.createCancellationTokenSource)}}(b=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&&o.func(t.sendCancellation)&&o.func(t.cleanup)}}(R=t.CancellationSenderStrategy||(t.CancellationSenderStrategy={})),function(e){e.Message=Object.freeze({receiver:b.Message,sender:R.Message}),e.is=function(e){const t=e;return t&&b.is(t.receiver)&&R.is(t.sender)}}(k=t.CancellationStrategy||(t.CancellationStrategy={})),(t.ConnectionOptions||(t.ConnectionOptions={})).is=function(e){const t=e;return t&&(k.is(t.cancellationStrategy)||v.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"}(x||(x={})),t.createMessageConnection=function(e,n,v,b){const R=void 0!==v?v:t.NullLogger;let C=0,T=0,w=0;const P="2.0";let _;const D=new Map;let E;const O=new Map,q=new Map;let N,A,j=new s.LinkedMap,M=new Map,I=new Set,F=new Map,L=h.Off,W=p.Text,$=x.New;const V=new a.Emitter,U=new a.Emitter,H=new a.Emitter,z=new a.Emitter,B=new a.Emitter,K=b&&b.cancellationStrategy?b.cancellationStrategy:k.Message;function J(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 G(e){}function X(){return $===x.Listening}function Z(){return $===x.Closed}function Y(){return $===x.Disposed}function Q(){$!==x.New&&$!==x.Listening||($=x.Closed,U.fire(void 0))}function ee(){N||0===j.size||(N=(0,r.default)().timer.setImmediate((()=>{N=void 0,function(){if(0===j.size)return;const e=j.shift();try{i.Message.isRequest(e)?function(e){if(Y())return;function t(t,r,o){const s={jsonrpc:P,id:e.id};t instanceof i.ResponseError?s.error=t.toJson():s.result=void 0===t?null:t,re(s,r,o),n.write(s).catch((()=>R.error("Sending response failed.")))}function r(t,r,o){const i={jsonrpc:P,id:e.id,error:t.toJson()};re(i,r,o),n.write(i).catch((()=>R.error("Sending response failed.")))}!function(e){if(L!==h.Off&&A)if(W===p.Text){let t;L!==h.Verbose&&L!==h.Compact||!e.params||(t=`Params: ${ne(e.params)}\n\n`),A.log(`Received request '${e.method} - (${e.id})'.`,t)}else ie("receive-request",e)}(e);const s=D.get(e.method);let a,c;s&&(a=s.type,c=s.handler);const u=Date.now();if(c||_){const s=e.id??String(Date.now()),l=K.receiver.createCancellationTokenSource(s);null!==e.id&&I.has(e.id)&&l.cancel(),null!==e.id&&F.set(s,l);try{let d;if(c)if(void 0===e.params){if(void 0!==a&&0!==a.numberOfParams)return void r(new i.ResponseError(i.ErrorCodes.InvalidParams,`Request ${e.method} defines ${a.numberOfParams} params but received none.`),e.method,u);d=c(l.token)}else if(Array.isArray(e.params)){if(void 0!==a&&a.parameterStructures===i.ParameterStructures.byName)return void r(new i.ResponseError(i.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===i.ParameterStructures.byPosition)return void r(new i.ResponseError(i.ErrorCodes.InvalidParams,`Request ${e.method} defines parameters by position but received parameters by name`),e.method,u);d=c(e.params,l.token)}else _&&(d=_(e.method,e.params,l.token));const f=d;d?f.then?f.then((n=>{F.delete(s),t(n,e.method,u)}),(t=>{F.delete(s),t instanceof i.ResponseError?r(t,e.method,u):t&&o.string(t.message)?r(new i.ResponseError(i.ErrorCodes.InternalError,`Request ${e.method} failed with message: ${t.message}`),e.method,u):r(new i.ResponseError(i.ErrorCodes.InternalError,`Request ${e.method} failed unexpectedly without providing any details.`),e.method,u)})):(F.delete(s),t(d,e.method,u)):(F.delete(s),function(t,r,o){void 0===t&&(t=null);const i={jsonrpc:P,id:e.id,result:t};re(i,r,o),n.write(i).catch((()=>R.error("Sending response failed.")))}(d,e.method,u))}catch(n){F.delete(s),n instanceof i.ResponseError?t(n,e.method,u):n&&o.string(n.message)?r(new i.ResponseError(i.ErrorCodes.InternalError,`Request ${e.method} failed with message: ${n.message}`),e.method,u):r(new i.ResponseError(i.ErrorCodes.InternalError,`Request ${e.method} failed unexpectedly without providing any details.`),e.method,u)}}else r(new i.ResponseError(i.ErrorCodes.MethodNotFound,`Unhandled method ${e.method}`),e.method,u)}(e):i.Message.isNotification(e)?function(e){if(Y())return;let t,n;if(e.method===u.type.method){const t=e.params.id;return I.delete(t),void oe(e)}{const r=O.get(e.method);r&&(n=r.handler,t=r.type)}if(n||E)try{if(oe(e),n)if(void 0===e.params)void 0!==t&&0!==t.numberOfParams&&t.parameterStructures!==i.ParameterStructures.byName&&R.error(`Notification ${e.method} defines ${t.numberOfParams} params but received none.`),n();else if(Array.isArray(e.params)){const r=e.params;e.method===d.type.method&&2===r.length&&l.is(r[0])?n({token:r[0],value:r[1]}):(void 0!==t&&(t.parameterStructures===i.ParameterStructures.byName&&R.error(`Notification ${e.method} defines parameters by name but received parameters by position`),t.numberOfParams!==e.params.length&&R.error(`Notification ${e.method} defines ${t.numberOfParams} params but received ${r.length} arguments`)),n(...r))}else void 0!==t&&t.parameterStructures===i.ParameterStructures.byPosition&&R.error(`Notification ${e.method} defines parameters by position but received parameters by name`),n(e.params);else E&&E(e.method,e.params)}catch(t){t.message?R.error(`Notification handler '${e.method}' failed with message: ${t.message}`):R.error(`Notification handler '${e.method}' failed unexpectedly.`)}else H.fire(e)}(e):i.Message.isResponse(e)?function(e){if(!Y())if(null===e.id)e.error?R.error(`Received response message without id: Error is: \n${JSON.stringify(e.error,void 0,4)}`):R.error("Received response message without id. No further error information provided.");else{const t=e.id,n=M.get(t);if(function(e,t){if(L!==h.Off&&A)if(W===p.Text){let n;if(L!==h.Verbose&&L!==h.Compact||(e.error&&e.error.data?n=`Error data: ${ne(e.error.data)}\n\n`:e.result?n=`Result: ${ne(e.result)}\n\n`:void 0===e.error&&(n="No result returned.\n\n")),t){const r=e.error?` Request failed: ${e.error.message} (${e.error.code}).`:"";A.log(`Received response '${t.method} - (${e.id})' in ${Date.now()-t.timerStart}ms.${r}`,n)}else A.log(`Received response ${e.id} without active response promise.`,n)}else ie("receive-response",e)}(e,n),void 0!==n){M.delete(t);try{if(e.error){const t=e.error;n.reject(new i.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?R.error(`Response handler '${n.method}' failed with message: ${e.message}`):R.error(`Response handler '${n.method}' failed unexpectedly.`)}}}}(e):function(e){if(!e)return void R.error("Received empty message.");R.error(`Received message which is neither a response nor a notification message:\n${JSON.stringify(e,null,4)}`);const t=e;if(o.string(t.id)||o.number(t.id)){const e=t.id,n=M.get(e);n&&n.reject(new Error("The received response has neither a result nor an error property."))}}(e)}finally{ee()}}()})))}e.onClose(Q),e.onError((function(e){V.fire([e,void 0,void 0])})),n.onClose(Q),n.onError((function(e){V.fire(e)}));const te=e=>{try{if(i.Message.isNotification(e)&&e.method===u.type.method){const t=e.params.id,r=J(t),o=j.get(r);if(i.Message.isRequest(o)){const i=b?.connectionStrategy,s=i&&i.cancelUndispatched?i.cancelUndispatched(o,G):void 0;if(s&&(void 0!==s.error||void 0!==s.result))return j.delete(r),F.delete(t),s.id=o.id,re(s,e.method,Date.now()),void n.write(s).catch((()=>R.error("Sending response for canceled message failed.")))}const s=F.get(t);if(void 0!==s)return s.cancel(),void oe(e);I.add(t)}!function(e,t){var n;i.Message.isRequest(t)?e.set(J(t.id),t):i.Message.isResponse(t)?e.set(null===(n=t.id)?"res-unknown-"+(++w).toString():"res-"+n.toString(),t):e.set("not-"+(++T).toString(),t)}(j,e)}finally{ee()}};function ne(e){if(null!=e)switch(L){case h.Verbose:return JSON.stringify(e,null,4);case h.Compact:return JSON.stringify(e);default:return}}function re(e,t,n){if(L!==h.Off&&A)if(W===p.Text){let r;L!==h.Verbose&&L!==h.Compact||(e.error&&e.error.data?r=`Error data: ${ne(e.error.data)}\n\n`:e.result?r=`Result: ${ne(e.result)}\n\n`:void 0===e.error&&(r="No result returned.\n\n")),A.log(`Sending response '${t} - (${e.id})'. Processing request took ${Date.now()-n}ms`,r)}else ie("send-response",e)}function oe(e){if(L!==h.Off&&A&&e.method!==g.type.method)if(W===p.Text){let t;L!==h.Verbose&&L!==h.Compact||(t=e.params?`Params: ${ne(e.params)}\n\n`:"No parameters provided.\n\n"),A.log(`Received notification '${e.method}'.`,t)}else ie("receive-notification",e)}function ie(e,t){if(!A||L===h.Off)return;const n={isLSPMessage:!0,type:e,message:t,timestamp:Date.now()};A.log(n)}function se(){if(Z())throw new S(y.Closed,"Connection is closed.");if(Y())throw new S(y.Disposed,"Connection is disposed.")}function ae(e){return void 0===e?null:e}function ce(e){return null===e?void 0:e}function ue(e){return null!=e&&!Array.isArray(e)&&"object"==typeof e}function le(e,t){switch(e){case i.ParameterStructures.auto:return ue(t)?ce(t):[ae(t)];case i.ParameterStructures.byName:if(!ue(t))throw new Error("Received parameters by name but param is not an object literal.");return ce(t);case i.ParameterStructures.byPosition:return[ae(t)];default:throw new Error(`Unknown parameter structure ${e.toString()}`)}}function de(e,t){let n;const r=e.numberOfParams;switch(r){case 0:n=void 0;break;case 1:n=le(e.parameterStructures,t[0]);break;default:n=[];for(let e=0;e<t.length&&e<r;e++)n.push(ae(t[e]));if(t.length<r)for(let e=t.length;e<r;e++)n.push(null)}return n}const fe={sendNotification:(e,...t)=>{let r,s;if(se(),o.string(e)){r=e;const n=t[0];let o=0,a=i.ParameterStructures.auto;i.ParameterStructures.is(n)&&(o=1,a=n);let c=t.length;const u=c-o;switch(u){case 0:s=void 0;break;case 1:s=le(a,t[o]);break;default:if(a===i.ParameterStructures.byName)throw new Error(`Received ${u} parameters for 'by Name' notification parameter structure.`);s=t.slice(o,c).map((e=>ae(e)))}}else{const n=t;r=e.method,s=de(e,n)}const a={jsonrpc:P,method:r,params:s};return function(e){if(L!==h.Off&&A)if(W===p.Text){let t;L!==h.Verbose&&L!==h.Compact||(t=e.params?`Params: ${ne(e.params)}\n\n`:"No parameters provided.\n\n"),A.log(`Sending notification '${e.method}'.`,t)}else ie("send-notification",e)}(a),n.write(a).catch((()=>R.error("Sending notification failed.")))},onNotification:(e,t)=>{let n;return se(),o.func(e)?E=e:t&&(o.string(e)?(n=e,O.set(e,{type:void 0,handler:t})):(n=e.method,O.set(e.method,{type:e,handler:t}))),{dispose:()=>{void 0!==n?O.delete(n):E=void 0}}},onProgress:(e,t,n)=>{if(q.has(t))throw new Error(`Progress handler for token ${t} already registered`);return q.set(t,n),{dispose:()=>{q.delete(t)}}},sendProgress:(e,t,n)=>fe.sendNotification(d.type,{token:t,value:n}),onUnhandledProgress:z.event,sendRequest:(e,...t)=>{let r,s,a;if(se(),function(){if(!X())throw new Error("Call listen() first.")}(),o.string(e)){r=e;const n=t[0],o=t[t.length-1];let u=0,l=i.ParameterStructures.auto;i.ParameterStructures.is(n)&&(u=1,l=n);let d=t.length;c.CancellationToken.is(o)&&(d-=1,a=o);const f=d-u;switch(f){case 0:s=void 0;break;case 1:s=le(l,t[u]);break;default:if(l===i.ParameterStructures.byName)throw new Error(`Received ${f} parameters for 'by Name' request parameter structure.`);s=t.slice(u,d).map((e=>ae(e)))}}else{const n=t;r=e.method,s=de(e,n);const o=e.numberOfParams;a=c.CancellationToken.is(n[o])?n[o]:void 0}const u=C++;let l;return a&&(l=a.onCancellationRequested((()=>{const e=K.sender.sendCancellation(fe,u);return void 0===e?(R.log(`Received no promise from cancellation strategy when cancelling id ${u}`),Promise.resolve()):e.catch((()=>{R.log(`Sending cancellation messages for id ${u} failed`)}))}))),new Promise(((e,t)=>{const o={jsonrpc:P,id:u,method:r,params:s};let a={method:r,timerStart:Date.now(),resolve:t=>{e(t),K.sender.cleanup(u),l?.dispose()},reject:e=>{t(e),K.sender.cleanup(u),l?.dispose()}};!function(e){if(L!==h.Off&&A)if(W===p.Text){let t;L!==h.Verbose&&L!==h.Compact||!e.params||(t=`Params: ${ne(e.params)}\n\n`),A.log(`Sending request '${e.method} - (${e.id})'.`,t)}else ie("send-request",e)}(o);try{n.write(o).catch((()=>R.error("Sending request failed.")))}catch(e){a.reject(new i.ResponseError(i.ErrorCodes.MessageWriteError,e.message?e.message:"Unknown reason")),a=null}a&&M.set(u,a)}))},onRequest:(e,t)=>{se();let n=null;return f.is(e)?(n=void 0,_=e):o.string(e)?(n=null,void 0!==t&&(n=e,D.set(e,{handler:t,type:void 0}))):void 0!==t&&(n=e.method,D.set(e.method,{type:e,handler:t})),{dispose:()=>{null!==n&&(void 0!==n?D.delete(n):_=void 0)}}},hasPendingResponse:()=>M.size>0,trace:async(e,t,n)=>{let r=!1,i=p.Text;void 0!==n&&(o.boolean(n)?r=n:(r=n.sendNotification||!1,i=n.traceFormat||p.Text)),L=e,W=i,A=L===h.Off?void 0:t,!r||Z()||Y()||await fe.sendNotification(m.type,{value:h.toString(e)})},onError:V.event,onClose:U.event,onUnhandledNotification:H.event,onDispose:B.event,end:()=>{n.end()},dispose:()=>{if(Y())return;$=x.Disposed,B.fire(void 0);const t=new i.ResponseError(i.ErrorCodes.PendingResponseRejected,"Pending response rejected since connection got disposed");for(const e of M.values())e.reject(t);M=new Map,F=new Map,I=new Set,j=new s.LinkedMap,o.func(n.dispose)&&n.dispose(),o.func(e.dispose)&&e.dispose()},listen:()=>{se(),function(){if(X())throw new S(y.AlreadyListening,"Connection is already listening")}(),$=x.Listening,e.listen(te)},inspect:()=>{(0,r.default)().console.log("inspect")}};return fe.onNotification(g.type,(e=>{if(L===h.Off||!A)return;const t=L===h.Verbose||L===h.Compact;A.log(e.message,t?e.verbose:void 0)})),fe.onNotification(d.type,(e=>{const t=q.get(e.token);t?t(e.value):z.fire(e)})),fe}},3911:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Disposable=void 0,(t.Disposable||(t.Disposable={})).create=function(e){return{dispose:e}}},7135:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Emitter=t.Event=void 0;const r=n(147);!function(e){const t={dispose(){}};e.None=function(){return t}}(t.Event||(t.Event={}));class o{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 r=0,o=this._callbacks.length;r<o;r++)if(this._callbacks[r]===e){if(this._contexts[r]===t)return this._callbacks.splice(r,1),void this._contexts.splice(r,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),o=this._contexts.slice(0);for(let i=0,s=n.length;i<s;i++)try{t.push(n[i].apply(o[i],e))}catch(e){(0,r.default)().console.error(e)}return t}isEmpty(){return!this._callbacks||0===this._callbacks.length}dispose(){this._callbacks=void 0,this._contexts=void 0}}class i{constructor(e){this._options=e}get event(){return this._event||(this._event=(e,t,n)=>{this._callbacks||(this._callbacks=new o),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(e,t);const r={dispose:()=>{this._callbacks&&(this._callbacks.remove(e,t),r.dispose=i._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this))}};return Array.isArray(n)&&n.push(r),r}),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=i,i._noop=function(){}},7574:(e,t)=>{"use strict";function n(e){return"string"==typeof e||e instanceof String}function r(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=r,t.stringArray=function(e){return r(e)&&e.every((e=>n(e)))}},6184:(e,t)=>{"use strict";var n,r;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}(r=t.Touch||(t.Touch={}));class o{constructor(){this[n]="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(){return this._head?.value}get last(){return this._tail?.value}has(e){return this._map.has(e)}get(e,t=r.None){const n=this._map.get(e);if(n)return t!==r.None&&this.touch(n,t),n.value}set(e,t,n=r.None){let o=this._map.get(e);if(o)o.value=t,n!==r.None&&this.touch(o,n);else{switch(o={key:e,value:t,next:void 0,previous:void 0},n){case r.None:this.addItemLast(o);break;case r.First:this.addItemFirst(o);break;case r.Last:default:this.addItemLast(o)}this._map.set(e,o),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 r=this._head;for(;r;){if(t?e.bind(t)(r.value,r.key,this):e(r.value,r.key,this),this._state!==n)throw new Error("LinkedMap got modified during iteration.");r=r.next}}keys(){const e=this._state;let t=this._head;const n={[Symbol.iterator]:()=>n,next:()=>{if(this._state!==e)throw new Error("LinkedMap got modified during iteration.");if(t){const e={value:t.key,done:!1};return t=t.next,e}return{value:void 0,done:!0}}};return n}values(){const e=this._state;let t=this._head;const n={[Symbol.iterator]:()=>n,next:()=>{if(this._state!==e)throw new Error("LinkedMap got modified during iteration.");if(t){const e={value:t.value,done:!1};return t=t.next,e}return{value:void 0,done:!0}}};return n}entries(){const e=this._state;let t=this._head;const n={[Symbol.iterator]:()=>n,next:()=>{if(this._state!==e)throw new Error("LinkedMap got modified during iteration.");if(t){const e={value:[t.key,t.value],done:!1};return t=t.next,e}return{value:void 0,done:!0}}};return n}[(n=Symbol.toStringTag,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===r.First||t===r.Last)if(t===r.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===r.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=o,t.LRUCache=class extends o{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=r.AsNew){return super.get(e,t)}peek(e){return super.get(e,r.None)}set(e,t){return super.set(e,t,r.Last),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}}},5530:(e,t)=>{"use strict";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,r=0;e:for(;t<this._chunks.length;){const o=this._chunks[t];for(n=0;n<o.length;){switch(o[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++}r+=o.byteLength,t++}if(4!==e)return;const o=this._read(r+n),i=new Map,s=this.toString(o,"ascii").split("\r\n");if(s.length<2)return i;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 r=t.substr(0,n),o=t.substr(n+1).trim();i.set(r,o)}return i}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 r=this._chunks[0];if(r.byteLength>e){const o=r.slice(0,e);t.set(o,n),n+=e,this._chunks[0]=r.slice(e),this._totalLength-=e,e-=e}else t.set(r,n),n+=r.byteLength,this._chunks.shift(),this._totalLength-=r.byteLength,e-=r.byteLength}return t}}},6525:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ReadableStreamMessageReader=t.AbstractMessageReader=t.MessageReader=void 0;const r=n(147),o=n(7574),i=n(7135);var s;(t.MessageReader||(t.MessageReader={})).is=function(e){let t=e;return t&&o.func(t.listen)&&o.func(t.dispose)&&o.func(t.onError)&&o.func(t.onClose)&&o.func(t.onPartialMessage)};class a{constructor(){this.errorEmitter=new i.Emitter,this.closeEmitter=new i.Emitter,this.partialMessageEmitter=new i.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: ${o.string(e.message)?e.message:"unknown"}`)}}t.AbstractMessageReader=a,function(e){e.fromOptions=function(e){let t,n;const o=new Map;let i;const s=new Map;if(void 0===e||"string"==typeof e)t=e??"utf-8";else{if(t=e.charset??"utf-8",void 0!==e.contentDecoder&&(n=e.contentDecoder,o.set(n.name,n)),void 0!==e.contentDecoders)for(const t of e.contentDecoders)o.set(t.name,t);if(void 0!==e.contentTypeDecoder&&(i=e.contentTypeDecoder,s.set(i.name,i)),void 0!==e.contentTypeDecoders)for(const t of e.contentTypeDecoders)s.set(t.name,t)}return void 0===i&&(i=(0,r.default)().applicationJson.decoder,s.set(i.name,i)),{charset:t,contentDecoder:n,contentDecoders:o,contentTypeDecoder:i,contentTypeDecoders:s}}}(s||(s={})),t.ReadableStreamMessageReader=class extends a{constructor(e,t){super(),this.readable=e,this.options=s.fromOptions(t),this.buffer=(0,r.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&&(this.partialMessageTimer.dispose(),this.partialMessageTimer=void 0)}setPartialMessageTimer(){this.clearPartialMessageTimer(),this._partialMessageTimeout<=0||(this.partialMessageTimer=(0,r.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)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WriteableStreamMessageWriter=t.AbstractMessageWriter=t.MessageWriter=void 0;const r=n(147),o=n(7574),i=n(142),s=n(7135);var a;(t.MessageWriter||(t.MessageWriter={})).is=function(e){let t=e;return t&&o.func(t.dispose)&&o.func(t.onClose)&&o.func(t.onError)&&o.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: ${o.string(e.message)?e.message:"unknown"}`)}}t.AbstractMessageWriter=c,function(e){e.fromOptions=function(e){return void 0===e||"string"==typeof e?{charset:e??"utf-8",contentTypeEncoder:(0,r.default)().applicationJson.encoder}:{charset:e.charset??"utf-8",contentEncoder:e.contentEncoder,contentTypeEncoder:e.contentTypeEncoder??(0,r.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 i.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)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Message=t.NotificationType9=t.NotificationType8=t.NotificationType7=t.NotificationType6=t.NotificationType5=t.NotificationType4=t.NotificationType3=t.NotificationType2=t.NotificationType1=t.NotificationType0=t.NotificationType=t.RequestType9=t.RequestType8=t.RequestType7=t.RequestType6=t.RequestType5=t.RequestType4=t.RequestType3=t.RequestType2=t.RequestType1=t.RequestType=t.RequestType0=t.AbstractMessageSignature=t.ParameterStructures=t.ResponseError=t.ErrorCodes=void 0;const r=n(7574);var o,i;!function(e){e.ParseError=-32700,e.InvalidRequest=-32600,e.MethodNotFound=-32601,e.InvalidParams=-32602,e.InternalError=-32603,e.jsonrpcReservedErrorRangeStart=-32099,e.serverErrorStart=-32099,e.MessageWriteError=-32099,e.MessageReadError=-32098,e.PendingResponseRejected=-32097,e.ConnectionInactive=-32096,e.ServerNotInitialized=-32002,e.UnknownErrorCode=-32001,e.jsonrpcReservedErrorRangeEnd=-32e3,e.serverErrorEnd=-32e3}(o=t.ErrorCodes||(t.ErrorCodes={}));class s extends Error{constructor(e,t,n){super(t),this.code=r.number(e)?e:o.UnknownErrorCode,this.data=n,Object.setPrototypeOf(this,s.prototype)}toJson(){const e={code:this.code,message:this.message};return void 0!==this.data&&(e.data=this.data),e}}t.ResponseError=s;class a{constructor(e){this.kind=e}static is(e){return e===a.auto||e===a.byName||e===a.byPosition}toString(){return this.kind}}t.ParameterStructures=a,a.auto=new a("auto"),a.byPosition=new a("byPosition"),a.byName=new a("byName");class c{constructor(e,t){this.method=e,this.numberOfParams=t}get parameterStructures(){return a.auto}}t.AbstractMessageSignature=c,t.RequestType0=class extends c{constructor(e){super(e,0)}},t.RequestType=class extends c{constructor(e,t=a.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}},t.RequestType1=class extends c{constructor(e,t=a.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}},t.RequestType2=class extends c{constructor(e){super(e,2)}},t.RequestType3=class extends c{constructor(e){super(e,3)}},t.RequestType4=class extends c{constructor(e){super(e,4)}},t.RequestType5=class extends c{constructor(e){super(e,5)}},t.RequestType6=class extends c{constructor(e){super(e,6)}},t.RequestType7=class extends c{constructor(e){super(e,7)}},t.RequestType8=class extends c{constructor(e){super(e,8)}},t.RequestType9=class extends c{constructor(e){super(e,9)}},t.NotificationType=class extends c{constructor(e,t=a.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}},t.NotificationType0=class extends c{constructor(e){super(e,0)}},t.NotificationType1=class extends c{constructor(e,t=a.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}},t.NotificationType2=class extends c{constructor(e){super(e,2)}},t.NotificationType3=class extends c{constructor(e){super(e,3)}},t.NotificationType4=class extends c{constructor(e){super(e,4)}},t.NotificationType5=class extends c{constructor(e){super(e,5)}},t.NotificationType6=class extends c{constructor(e){super(e,6)}},t.NotificationType7=class extends c{constructor(e){super(e,7)}},t.NotificationType8=class extends c{constructor(e){super(e,8)}},t.NotificationType9=class extends c{constructor(e){super(e,9)}},(i=t.Message||(t.Message={})).isRequest=function(e){const t=e;return t&&r.string(t.method)&&(r.string(t.id)||r.number(t.id))},i.isNotification=function(e){const t=e;return t&&r.string(t.method)&&void 0===e.id},i.isResponse=function(e){const t=e;return t&&(void 0!==t.result||!!t.error)&&(r.string(t.id)||r.number(t.id)||null===t.id)}},147:(e,t)=>{"use strict";let n;function r(){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}}(r||(r={})),t.default=r},142:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Semaphore=void 0;const r=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&&(0,r.default)().timer.setImmediate((()=>this.doRunNext()))}doRunNext(){if(0===this._waiting.length||this._active===this._capacity)return;const e=this._waiting.shift();if(this._active++,this._active>this._capacity)throw new Error("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){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(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 i=n(3034);i.default.install();const s=n(3870),a=n(5622),c=n(2087),u=n(6417),l=n(1631);o(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 f 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=f;class h extends s.ReadableStreamMessageReader{constructor(e,t="utf-8"){super((0,i.default)().stream.asReadableStream(e),t)}}t.SocketMessageReader=h;class p extends s.WriteableStreamMessageWriter{constructor(e,t){super((0,i.default)().stream.asWritableStream(e),t),this.socket=e}dispose(){super.dispose(),this.socket.destroy()}}t.SocketMessageWriter=p;class m extends s.ReadableStreamMessageReader{constructor(e,t){super((0,i.default)().stream.asReadableStream(e),t)}}t.StreamMessageReader=m;class g extends s.WriteableStreamMessageWriter{constructor(e,t){super((0,i.default)().stream.asWritableStream(e),t)}}t.StreamMessageWriter=g;const y=process.env.XDG_RUNTIME_DIR,v=new Map([["linux",107],["darwin",103]]);t.generateRandomPipeName=function(){const e=(0,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&&(0,i.default)().console.warn(`WARNING: IPC handle "${t}" is longer than ${n} characters.`),t},t.createClientPipeTransport=function(e,t="utf-8"){let n;const r=new Promise(((e,t)=>{n=e}));return new Promise(((o,i)=>{let s=(0,l.createServer)((e=>{s.close(),n([new h(e,t),new p(e,t)])}));s.on("error",i),s.listen(e,(()=>{s.removeListener("error",i),o({onConnected:()=>r})}))}))},t.createServerPipeTransport=function(e,t="utf-8"){const n=(0,l.createConnection)(e);return[new h(n,t),new p(n,t)]},t.createClientSocketTransport=function(e,t="utf-8"){let n;const r=new Promise(((e,t)=>{n=e}));return new Promise(((o,i)=>{const s=(0,l.createServer)((e=>{s.close(),n([new h(e,t),new p(e,t)])}));s.on("error",i),s.listen(e,"127.0.0.1",(()=>{s.removeListener("error",i),o({onConnected:()=>r})}))}))},t.createServerSocketTransport=function(e,t="utf-8"){const n=(0,l.createConnection)(e,"127.0.0.1");return[new h(n,t),new p(n,t)]},t.createMessageConnection=function(e,t,n,r){n||(n=s.NullLogger);const o=function(e){const t=e;return void 0!==t.read&&void 0!==t.addListener}(e)?new m(e):e,i=function(e){const t=e;return void 0!==t.write&&void 0!==t.addListener}(t)?new g(t):t;return s.ConnectionStrategy.is(r)&&(r={connectionStrategy:r}),(0,s.createMessageConnection)(o,i,n,r)}},3034:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(147),o=n(1669),i=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 o.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),i.Disposable.create((()=>this.stream.off("close",e)))}onError(e){return this.stream.on("error",e),i.Disposable.create((()=>this.stream.off("error",e)))}onEnd(e){return this.stream.on("end",e),i.Disposable.create((()=>this.stream.off("end",e)))}onData(e){return this.stream.on("data",e),i.Disposable.create((()=>this.stream.off("data",e)))}}class u{constructor(e){this.stream=e}onClose(e){return this.stream.on("close",e),i.Disposable.create((()=>this.stream.off("close",e)))}onError(e){return this.stream.on("error",e),i.Disposable.create((()=>this.stream.off("error",e)))}onEnd(e){return this.stream.on("end",e),i.Disposable.create((()=>this.stream.off("end",e)))}write(e,t){return new Promise(((n,r)=>{const o=e=>{null==e?n():r(e)};"string"==typeof e?this.stream.write(e,t,o):this.stream.write(e,o)}))}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 o.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){const r=setTimeout(e,t,...n);return{dispose:()=>clearTimeout(r)}},setImmediate(e,...t){const n=setImmediate(e,...t);return{dispose:()=>clearImmediate(n)}},setInterval(e,t,...n){const r=setInterval(e,t,...n);return{dispose:()=>clearInterval(r)}}})});function d(){return l}!function(e){e.install=function(){r.default.install(l)}}(d||(d={})),t.default=d},5028:(e,t,n)=>{"use strict";e.exports=n(4389)},1661:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.LSPErrorCodes=t.createProtocolConnection=void 0,o(n(4389),t),o(n(5882),t),o(n(6140),t),o(n(542),t);var i,s=n(3767);Object.defineProperty(t,"createProtocolConnection",{enumerable:!0,get:function(){return s.createProtocolConnection}}),(i=t.LSPErrorCodes||(t.LSPErrorCodes={})).lspReservedErrorRangeStart=-32899,i.RequestFailed=-32803,i.ServerCancelled=-32802,i.ContentModified=-32801,i.RequestCancelled=-32800,i.lspReservedErrorRangeEnd=-32800},3767:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createProtocolConnection=void 0;const r=n(4389);t.createProtocolConnection=function(e,t,n,o){return r.ConnectionStrategy.is(o)&&(o={connectionStrategy:o}),(0,r.createMessageConnection)(e,t,n,o)}},6140:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProtocolNotificationType=t.ProtocolNotificationType0=t.ProtocolRequestType=t.ProtocolRequestType0=t.RegistrationType=void 0;const r=n(4389);t.RegistrationType=class{constructor(e){this.method=e}};class o extends r.RequestType0{constructor(e){super(e)}}t.ProtocolRequestType0=o;class i extends r.RequestType{constructor(e){super(e,r.ParameterStructures.byName)}}t.ProtocolRequestType=i;class s extends r.NotificationType0{constructor(e){super(e)}}t.ProtocolNotificationType0=s;class a extends r.NotificationType{constructor(e){super(e,r.ParameterStructures.byName)}}t.ProtocolNotificationType=a},2918:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CallHierarchyOutgoingCallsRequest=t.CallHierarchyIncomingCallsRequest=t.CallHierarchyPrepareRequest=void 0;const r=n(6140);var o,i,s;(s=t.CallHierarchyPrepareRequest||(t.CallHierarchyPrepareRequest={})).method="textDocument/prepareCallHierarchy",s.type=new r.ProtocolRequestType(s.method),(i=t.CallHierarchyIncomingCallsRequest||(t.CallHierarchyIncomingCallsRequest={})).method="callHierarchy/incomingCalls",i.type=new r.ProtocolRequestType(i.method),(o=t.CallHierarchyOutgoingCallsRequest||(t.CallHierarchyOutgoingCallsRequest={})).method="callHierarchy/outgoingCalls",o.type=new r.ProtocolRequestType(o.method)},3390:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ColorPresentationRequest=t.DocumentColorRequest=void 0;const r=n(6140);var o;(o=t.DocumentColorRequest||(t.DocumentColorRequest={})).method="textDocument/documentColor",o.type=new r.ProtocolRequestType(o.method),(t.ColorPresentationRequest||(t.ColorPresentationRequest={})).type=new r.ProtocolRequestType("textDocument/colorPresentation")},5934:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ConfigurationRequest=void 0;const r=n(6140);(t.ConfigurationRequest||(t.ConfigurationRequest={})).type=new r.ProtocolRequestType("workspace/configuration")},764:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DeclarationRequest=void 0;const r=n(6140);var o;(o=t.DeclarationRequest||(t.DeclarationRequest={})).method="textDocument/declaration",o.type=new r.ProtocolRequestType(o.method)},9824:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DiagnosticRefreshRequest=t.WorkspaceDiagnosticRequest=t.DocumentDiagnosticRequest=t.DocumentDiagnosticReportKind=t.DiagnosticServerCancellationData=void 0;const r=n(4389),o=n(9533),i=n(6140);var s,a,c,u;(t.DiagnosticServerCancellationData||(t.DiagnosticServerCancellationData={})).is=function(e){const t=e;return t&&o.boolean(t.retriggerRequest)},(u=t.DocumentDiagnosticReportKind||(t.DocumentDiagnosticReportKind={})).Full="full",u.Unchanged="unchanged",(c=t.DocumentDiagnosticRequest||(t.DocumentDiagnosticRequest={})).method="textDocument/diagnostic",c.type=new i.ProtocolRequestType(c.method),c.partialResult=new r.ProgressType,(a=t.WorkspaceDiagnosticRequest||(t.WorkspaceDiagnosticRequest={})).method="workspace/diagnostic",a.type=new i.ProtocolRequestType(a.method),a.partialResult=new r.ProgressType,(s=t.DiagnosticRefreshRequest||(t.DiagnosticRefreshRequest={})).method="workspace/diagnostic/refresh",s.type=new i.ProtocolRequestType0(s.method)},7846:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WillDeleteFilesRequest=t.DidDeleteFilesNotification=t.DidRenameFilesNotification=t.WillRenameFilesRequest=t.DidCreateFilesNotification=t.WillCreateFilesRequest=t.FileOperationPatternKind=void 0;const r=n(6140);var o,i,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 r.ProtocolRequestType(u.method),(c=t.DidCreateFilesNotification||(t.DidCreateFilesNotification={})).method="workspace/didCreateFiles",c.type=new r.ProtocolNotificationType(c.method),(a=t.WillRenameFilesRequest||(t.WillRenameFilesRequest={})).method="workspace/willRenameFiles",a.type=new r.ProtocolRequestType(a.method),(s=t.DidRenameFilesNotification||(t.DidRenameFilesNotification={})).method="workspace/didRenameFiles",s.type=new r.ProtocolNotificationType(s.method),(i=t.DidDeleteFilesNotification||(t.DidDeleteFilesNotification={})).method="workspace/didDeleteFiles",i.type=new r.ProtocolNotificationType(i.method),(o=t.WillDeleteFilesRequest||(t.WillDeleteFilesRequest={})).method="workspace/willDeleteFiles",o.type=new r.ProtocolRequestType(o.method)},3394:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FoldingRangeRequest=void 0;const r=n(6140);var o;(o=t.FoldingRangeRequest||(t.FoldingRangeRequest={})).method="textDocument/foldingRange",o.type=new r.ProtocolRequestType(o.method)},2122:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ImplementationRequest=void 0;const r=n(6140);var o;(o=t.ImplementationRequest||(t.ImplementationRequest={})).method="textDocument/implementation",o.type=new r.ProtocolRequestType(o.method)},9999:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InlayHintRefreshRequest=t.InlayHintResolveRequest=t.InlayHintRequest=void 0;const r=n(6140);var o,i,s;(s=t.InlayHintRequest||(t.InlayHintRequest={})).method="textDocument/inlayHint",s.type=new r.ProtocolRequestType(s.method),(i=t.InlayHintResolveRequest||(t.InlayHintResolveRequest={})).method="inlayHint/resolve",i.type=new r.ProtocolRequestType(i.method),(o=t.InlayHintRefreshRequest||(t.InlayHintRefreshRequest={})).method="workspace/inlayHint/refresh",o.type=new r.ProtocolRequestType0(o.method)},5246:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InlineValueRefreshRequest=t.InlineValueRequest=void 0;const r=n(6140);var o,i;(i=t.InlineValueRequest||(t.InlineValueRequest={})).method="textDocument/inlineValue",i.type=new r.ProtocolRequestType(i.method),(o=t.InlineValueRefreshRequest||(t.InlineValueRefreshRequest={})).method="workspace/inlineValue/refresh",o.type=new r.ProtocolRequestType0(o.method)},542:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),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.RelativePattern=t.FileChangeType=t.DidChangeWatchedFilesNotification=t.WillSaveTextDocumentWaitUntilRequest=t.WillSaveTextDocumentNotification=t.TextDocumentSaveReason=t.DidSaveTextDocumentNotification=t.DidCloseTextDocumentNotification=t.DidChangeTextDocumentNotification=t.TextDocumentContentChangeEvent=t.DidOpenTextDocumentNotification=t.TextDocumentSyncKind=t.TelemetryEventNotification=t.LogMessageNotification=t.ShowMessageRequest=t.ShowMessageNotification=t.MessageType=t.DidChangeConfigurationNotification=t.ExitNotification=t.ShutdownRequest=t.InitializedNotification=t.InitializeErrorCodes=t.InitializeRequest=t.WorkDoneProgressOptions=t.TextDocumentRegistrationOptions=t.StaticRegistrationOptions=t.PositionEncodingKind=t.FailureHandlingKind=t.ResourceOperationKind=t.UnregistrationRequest=t.RegistrationRequest=t.DocumentSelector=t.NotebookCellTextDocumentFilter=t.NotebookDocumentFilter=t.TextDocumentFilter=void 0,t.TypeHierarchySubtypesRequest=t.TypeHierarchyPrepareRequest=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.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=t.DocumentLinkRequest=t.CodeLensRefreshRequest=t.CodeLensResolveRequest=t.CodeLensRequest=t.WorkspaceSymbolResolveRequest=void 0,t.DidCloseNotebookDocumentNotification=t.DidSaveNotebookDocumentNotification=t.DidChangeNotebookDocumentNotification=t.NotebookCellArrayChange=t.DidOpenNotebookDocumentNotification=t.NotebookDocumentSyncRegistrationType=t.NotebookDocument=t.NotebookCell=t.ExecutionSummary=t.NotebookCellKind=t.DiagnosticRefreshRequest=t.WorkspaceDiagnosticRequest=t.DocumentDiagnosticRequest=t.DocumentDiagnosticReportKind=t.DiagnosticServerCancellationData=t.InlayHintRefreshRequest=t.InlayHintResolveRequest=t.InlayHintRequest=t.InlineValueRefreshRequest=t.InlineValueRequest=t.TypeHierarchySupertypesRequest=void 0;const r=n(6140),o=n(5882),i=n(9533),s=n(2122);Object.defineProperty(t,"ImplementationRequest",{enumerable:!0,get:function(){return s.ImplementationRequest}});const a=n(1589);Object.defineProperty(t,"TypeDefinitionRequest",{enumerable:!0,get:function(){return a.TypeDefinitionRequest}});const c=n(8744);Object.defineProperty(t,"WorkspaceFoldersRequest",{enumerable:!0,get:function(){return c.WorkspaceFoldersRequest}}),Object.defineProperty(t,"DidChangeWorkspaceFoldersNotification",{enumerable:!0,get:function(){return c.DidChangeWorkspaceFoldersNotification}});const u=n(5934);Object.defineProperty(t,"ConfigurationRequest",{enumerable:!0,get:function(){return u.ConfigurationRequest}});const l=n(3390);Object.defineProperty(t,"DocumentColorRequest",{enumerable:!0,get:function(){return l.DocumentColorRequest}}),Object.defineProperty(t,"ColorPresentationRequest",{enumerable:!0,get:function(){return l.ColorPresentationRequest}});const d=n(3394);Object.defineProperty(t,"FoldingRangeRequest",{enumerable:!0,get:function(){return d.FoldingRangeRequest}});const f=n(764);Object.defineProperty(t,"DeclarationRequest",{enumerable:!0,get:function(){return f.DeclarationRequest}});const h=n(5206);Object.defineProperty(t,"SelectionRangeRequest",{enumerable:!0,get:function(){return h.SelectionRangeRequest}});const p=n(1862);Object.defineProperty(t,"WorkDoneProgress",{enumerable:!0,get:function(){return p.WorkDoneProgress}}),Object.defineProperty(t,"WorkDoneProgressCreateRequest",{enumerable:!0,get:function(){return p.WorkDoneProgressCreateRequest}}),Object.defineProperty(t,"WorkDoneProgressCancelNotification",{enumerable:!0,get:function(){return p.WorkDoneProgressCancelNotification}});const m=n(2918);Object.defineProperty(t,"CallHierarchyIncomingCallsRequest",{enumerable:!0,get:function(){return m.CallHierarchyIncomingCallsRequest}}),Object.defineProperty(t,"CallHierarchyOutgoingCallsRequest",{enumerable:!0,get:function(){return m.CallHierarchyOutgoingCallsRequest}}),Object.defineProperty(t,"CallHierarchyPrepareRequest",{enumerable:!0,get:function(){return m.CallHierarchyPrepareRequest}});const g=n(9434);Object.defineProperty(t,"TokenFormat",{enumerable:!0,get:function(){return g.TokenFormat}}),Object.defineProperty(t,"SemanticTokensRequest",{enumerable:!0,get:function(){return g.SemanticTokensRequest}}),Object.defineProperty(t,"SemanticTokensDeltaRequest",{enumerable:!0,get:function(){return g.SemanticTokensDeltaRequest}}),Object.defineProperty(t,"SemanticTokensRangeRequest",{enumerable:!0,get:function(){return g.SemanticTokensRangeRequest}}),Object.defineProperty(t,"SemanticTokensRefreshRequest",{enumerable:!0,get:function(){return g.SemanticTokensRefreshRequest}}),Object.defineProperty(t,"SemanticTokensRegistrationType",{enumerable:!0,get:function(){return g.SemanticTokensRegistrationType}});const y=n(5726);Object.defineProperty(t,"ShowDocumentRequest",{enumerable:!0,get:function(){return y.ShowDocumentRequest}});const v=n(6305);Object.defineProperty(t,"LinkedEditingRangeRequest",{enumerable:!0,get:function(){return v.LinkedEditingRangeRequest}});const b=n(7846);Object.defineProperty(t,"FileOperationPatternKind",{enumerable:!0,get:function(){return b.FileOperationPatternKind}}),Object.defineProperty(t,"DidCreateFilesNotification",{enumerable:!0,get:function(){return b.DidCreateFilesNotification}}),Object.defineProperty(t,"WillCreateFilesRequest",{enumerable:!0,get:function(){return b.WillCreateFilesRequest}}),Object.defineProperty(t,"DidRenameFilesNotification",{enumerable:!0,get:function(){return b.DidRenameFilesNotification}}),Object.defineProperty(t,"WillRenameFilesRequest",{enumerable:!0,get:function(){return b.WillRenameFilesRequest}}),Object.defineProperty(t,"DidDeleteFilesNotification",{enumerable:!0,get:function(){return b.DidDeleteFilesNotification}}),Object.defineProperty(t,"WillDeleteFilesRequest",{enumerable:!0,get:function(){return b.WillDeleteFilesRequest}});const R=n(3443);Object.defineProperty(t,"UniquenessLevel",{enumerable:!0,get:function(){return R.UniquenessLevel}}),Object.defineProperty(t,"MonikerKind",{enumerable:!0,get:function(){return R.MonikerKind}}),Object.defineProperty(t,"MonikerRequest",{enumerable:!0,get:function(){return R.MonikerRequest}});const k=n(3693);Object.defineProperty(t,"TypeHierarchyPrepareRequest",{enumerable:!0,get:function(){return k.TypeHierarchyPrepareRequest}}),Object.defineProperty(t,"TypeHierarchySubtypesRequest",{enumerable:!0,get:function(){return k.TypeHierarchySubtypesRequest}}),Object.defineProperty(t,"TypeHierarchySupertypesRequest",{enumerable:!0,get:function(){return k.TypeHierarchySupertypesRequest}});const x=n(5246);Object.defineProperty(t,"InlineValueRequest",{enumerable:!0,get:function(){return x.InlineValueRequest}}),Object.defineProperty(t,"InlineValueRefreshRequest",{enumerable:!0,get:function(){return x.InlineValueRefreshRequest}});const C=n(9999);Object.defineProperty(t,"InlayHintRequest",{enumerable:!0,get:function(){return C.InlayHintRequest}}),Object.defineProperty(t,"InlayHintResolveRequest",{enumerable:!0,get:function(){return C.InlayHintResolveRequest}}),Object.defineProperty(t,"InlayHintRefreshRequest",{enumerable:!0,get:function(){return C.InlayHintRefreshRequest}});const S=n(9824);Object.defineProperty(t,"DiagnosticServerCancellationData",{enumerable:!0,get:function(){return S.DiagnosticServerCancellationData}}),Object.defineProperty(t,"DocumentDiagnosticReportKind",{enumerable:!0,get:function(){return S.DocumentDiagnosticReportKind}}),Object.defineProperty(t,"DocumentDiagnosticRequest",{enumerable:!0,get:function(){return S.DocumentDiagnosticRequest}}),Object.defineProperty(t,"WorkspaceDiagnosticRequest",{enumerable:!0,get:function(){return S.WorkspaceDiagnosticRequest}}),Object.defineProperty(t,"DiagnosticRefreshRequest",{enumerable:!0,get:function(){return S.DiagnosticRefreshRequest}});const T=n(7169);var w,P,_,D,E,O,q,N,A,j,M,I,F,L,W,$,V,U,H,z,B,K,J,G,X,Z,Y,Q,ee,te,ne,re,oe,ie,se,ae,ce,ue,le,de,fe,he,pe,me;Object.defineProperty(t,"NotebookCellKind",{enumerable:!0,get:function(){return T.NotebookCellKind}}),Object.defineProperty(t,"ExecutionSummary",{enumerable:!0,get:function(){return T.ExecutionSummary}}),Object.defineProperty(t,"NotebookCell",{enumerable:!0,get:function(){return T.NotebookCell}}),Object.defineProperty(t,"NotebookDocument",{enumerable:!0,get:function(){return T.NotebookDocument}}),Object.defineProperty(t,"NotebookDocumentSyncRegistrationType",{enumerable:!0,get:function(){return T.NotebookDocumentSyncRegistrationType}}),Object.defineProperty(t,"DidOpenNotebookDocumentNotification",{enumerable:!0,get:function(){return T.DidOpenNotebookDocumentNotification}}),Object.defineProperty(t,"NotebookCellArrayChange",{enumerable:!0,get:function(){return T.NotebookCellArrayChange}}),Object.defineProperty(t,"DidChangeNotebookDocumentNotification",{enumerable:!0,get:function(){return T.DidChangeNotebookDocumentNotification}}),Object.defineProperty(t,"DidSaveNotebookDocumentNotification",{enumerable:!0,get:function(){return T.DidSaveNotebookDocumentNotification}}),Object.defineProperty(t,"DidCloseNotebookDocumentNotification",{enumerable:!0,get:function(){return T.DidCloseNotebookDocumentNotification}}),function(e){e.is=function(e){const t=e;return i.string(t.language)||i.string(t.scheme)||i.string(t.pattern)}}(w=t.TextDocumentFilter||(t.TextDocumentFilter={})),function(e){e.is=function(e){const t=e;return i.objectLiteral(t)&&(i.string(t.notebookType)||i.string(t.scheme)||i.string(t.pattern))}}(P=t.NotebookDocumentFilter||(t.NotebookDocumentFilter={})),function(e){e.is=function(e){const t=e;return i.objectLiteral(t)&&(i.string(t.notebook)||P.is(t.notebook))&&(void 0===t.language||i.string(t.language))}}(_=t.NotebookCellTextDocumentFilter||(t.NotebookCellTextDocumentFilter={})),function(e){e.is=function(e){if(!Array.isArray(e))return!1;for(let t of e)if(!i.string(t)&&!w.is(t)&&!_.is(t))return!1;return!0}}(D=t.DocumentSelector||(t.DocumentSelector={})),(t.RegistrationRequest||(t.RegistrationRequest={})).type=new r.ProtocolRequestType("client/registerCapability"),(t.UnregistrationRequest||(t.UnregistrationRequest={})).type=new r.ProtocolRequestType("client/unregisterCapability"),(me=t.ResourceOperationKind||(t.ResourceOperationKind={})).Create="create",me.Rename="rename",me.Delete="delete",(pe=t.FailureHandlingKind||(t.FailureHandlingKind={})).Abort="abort",pe.Transactional="transactional",pe.TextOnlyTransactional="textOnlyTransactional",pe.Undo="undo",(he=t.PositionEncodingKind||(t.PositionEncodingKind={})).UTF8="utf-8",he.UTF16="utf-16",he.UTF32="utf-32",(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||D.is(t.documentSelector))},(fe=t.WorkDoneProgressOptions||(t.WorkDoneProgressOptions={})).is=function(e){const t=e;return i.objectLiteral(t)&&(void 0===t.workDoneProgress||i.boolean(t.workDoneProgress))},fe.hasWorkDoneProgress=function(e){const t=e;return t&&i.boolean(t.workDoneProgress)},(t.InitializeRequest||(t.InitializeRequest={})).type=new r.ProtocolRequestType("initialize"),(t.InitializeErrorCodes||(t.InitializeErrorCodes={})).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"),(de=t.MessageType||(t.MessageType={})).Error=1,de.Warning=2,de.Info=3,de.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"),(le=t.TextDocumentSyncKind||(t.TextDocumentSyncKind={})).None=0,le.Full=1,le.Incremental=2,(ue=t.DidOpenTextDocumentNotification||(t.DidOpenTextDocumentNotification={})).method="textDocument/didOpen",ue.type=new r.ProtocolNotificationType(ue.method),(ce=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)},ce.isFull=function(e){let t=e;return null!=t&&"string"==typeof t.text&&void 0===t.range&&void 0===t.rangeLength},(ae=t.DidChangeTextDocumentNotification||(t.DidChangeTextDocumentNotification={})).method="textDocument/didChange",ae.type=new r.ProtocolNotificationType(ae.method),(se=t.DidCloseTextDocumentNotification||(t.DidCloseTextDocumentNotification={})).method="textDocument/didClose",se.type=new r.ProtocolNotificationType(se.method),(ie=t.DidSaveTextDocumentNotification||(t.DidSaveTextDocumentNotification={})).method="textDocument/didSave",ie.type=new r.ProtocolNotificationType(ie.method),(oe=t.TextDocumentSaveReason||(t.TextDocumentSaveReason={})).Manual=1,oe.AfterDelay=2,oe.FocusOut=3,(re=t.WillSaveTextDocumentNotification||(t.WillSaveTextDocumentNotification={})).method="textDocument/willSave",re.type=new r.ProtocolNotificationType(re.method),(ne=t.WillSaveTextDocumentWaitUntilRequest||(t.WillSaveTextDocumentWaitUntilRequest={})).method="textDocument/willSaveWaitUntil",ne.type=new r.ProtocolRequestType(ne.method),(t.DidChangeWatchedFilesNotification||(t.DidChangeWatchedFilesNotification={})).type=new r.ProtocolNotificationType("workspace/didChangeWatchedFiles"),(te=t.FileChangeType||(t.FileChangeType={})).Created=1,te.Changed=2,te.Deleted=3,(t.RelativePattern||(t.RelativePattern={})).is=function(e){const t=e;return i.objectLiteral(t)&&(o.URI.is(t.baseUri)||o.WorkspaceFolder.is(t.baseUri))&&i.string(t.pattern)},(ee=t.WatchKind||(t.WatchKind={})).Create=1,ee.Change=2,ee.Delete=4,(t.PublishDiagnosticsNotification||(t.PublishDiagnosticsNotification={})).type=new r.ProtocolNotificationType("textDocument/publishDiagnostics"),(Q=t.CompletionTriggerKind||(t.CompletionTriggerKind={})).Invoked=1,Q.TriggerCharacter=2,Q.TriggerForIncompleteCompletions=3,(Y=t.CompletionRequest||(t.CompletionRequest={})).method="textDocument/completion",Y.type=new r.ProtocolRequestType(Y.method),(Z=t.CompletionResolveRequest||(t.CompletionResolveRequest={})).method="completionItem/resolve",Z.type=new r.ProtocolRequestType(Z.method),(X=t.HoverRequest||(t.HoverRequest={})).method="textDocument/hover",X.type=new r.ProtocolRequestType(X.method),(G=t.SignatureHelpTriggerKind||(t.SignatureHelpTriggerKind={})).Invoked=1,G.TriggerCharacter=2,G.ContentChange=3,(J=t.SignatureHelpRequest||(t.SignatureHelpRequest={})).method="textDocument/signatureHelp",J.type=new r.ProtocolRequestType(J.method),(K=t.DefinitionRequest||(t.DefinitionRequest={})).method="textDocument/definition",K.type=new r.ProtocolRequestType(K.method),(B=t.ReferencesRequest||(t.ReferencesRequest={})).method="textDocument/references",B.type=new r.ProtocolRequestType(B.method),(z=t.DocumentHighlightRequest||(t.DocumentHighlightRequest={})).method="textDocument/documentHighlight",z.type=new r.ProtocolRequestType(z.method),(H=t.DocumentSymbolRequest||(t.DocumentSymbolRequest={})).method="textDocument/documentSymbol",H.type=new r.ProtocolRequestType(H.method),(U=t.CodeActionRequest||(t.CodeActionRequest={})).method="textDocument/codeAction",U.type=new r.ProtocolRequestType(U.method),(V=t.CodeActionResolveRequest||(t.CodeActionResolveRequest={})).method="codeAction/resolve",V.type=new r.ProtocolRequestType(V.method),($=t.WorkspaceSymbolRequest||(t.WorkspaceSymbolRequest={})).method="workspace/symbol",$.type=new r.ProtocolRequestType($.method),(W=t.WorkspaceSymbolResolveRequest||(t.WorkspaceSymbolResolveRequest={})).method="workspaceSymbol/resolve",W.type=new r.ProtocolRequestType(W.method),(L=t.CodeLensRequest||(t.CodeLensRequest={})).method="textDocument/codeLens",L.type=new r.ProtocolRequestType(L.method),(F=t.CodeLensResolveRequest||(t.CodeLensResolveRequest={})).method="codeLens/resolve",F.type=new r.ProtocolRequestType(F.method),(I=t.CodeLensRefreshRequest||(t.CodeLensRefreshRequest={})).method="workspace/codeLens/refresh",I.type=new r.ProtocolRequestType0(I.method),(M=t.DocumentLinkRequest||(t.DocumentLinkRequest={})).method="textDocument/documentLink",M.type=new r.ProtocolRequestType(M.method),(j=t.DocumentLinkResolveRequest||(t.DocumentLinkResolveRequest={})).method="documentLink/resolve",j.type=new r.ProtocolRequestType(j.method),(A=t.DocumentFormattingRequest||(t.DocumentFormattingRequest={})).method="textDocument/formatting",A.type=new r.ProtocolRequestType(A.method),(N=t.DocumentRangeFormattingRequest||(t.DocumentRangeFormattingRequest={})).method="textDocument/rangeFormatting",N.type=new r.ProtocolRequestType(N.method),(q=t.DocumentOnTypeFormattingRequest||(t.DocumentOnTypeFormattingRequest={})).method="textDocument/onTypeFormatting",q.type=new r.ProtocolRequestType(q.method),(t.PrepareSupportDefaultBehavior||(t.PrepareSupportDefaultBehavior={})).Identifier=1,(O=t.RenameRequest||(t.RenameRequest={})).method="textDocument/rename",O.type=new r.ProtocolRequestType(O.method),(E=t.PrepareRenameRequest||(t.PrepareRenameRequest={})).method="textDocument/prepareRename",E.type=new r.ProtocolRequestType(E.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)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LinkedEditingRangeRequest=void 0;const r=n(6140);var o;(o=t.LinkedEditingRangeRequest||(t.LinkedEditingRangeRequest={})).method="textDocument/linkedEditingRange",o.type=new r.ProtocolRequestType(o.method)},3443:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MonikerRequest=t.MonikerKind=t.UniquenessLevel=void 0;const r=n(6140);var o,i,s;(s=t.UniquenessLevel||(t.UniquenessLevel={})).document="document",s.project="project",s.group="group",s.scheme="scheme",s.global="global",(i=t.MonikerKind||(t.MonikerKind={})).$import="import",i.$export="export",i.local="local",(o=t.MonikerRequest||(t.MonikerRequest={})).method="textDocument/moniker",o.type=new r.ProtocolRequestType(o.method)},7169:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DidCloseNotebookDocumentNotification=t.DidSaveNotebookDocumentNotification=t.DidChangeNotebookDocumentNotification=t.NotebookCellArrayChange=t.DidOpenNotebookDocumentNotification=t.NotebookDocumentSyncRegistrationType=t.NotebookDocument=t.NotebookCell=t.ExecutionSummary=t.NotebookCellKind=void 0;const r=n(5882),o=n(9533),i=n(6140);var s,a,c,u,l,d,f,h,p,m;!function(e){e.Markup=1,e.Code=2,e.is=function(e){return 1===e||2===e}}(s=t.NotebookCellKind||(t.NotebookCellKind={})),function(e){e.create=function(e,t){const n={executionOrder:e};return!0!==t&&!1!==t||(n.success=t),n},e.is=function(e){const t=e;return o.objectLiteral(t)&&r.uinteger.is(t.executionOrder)&&(void 0===t.success||o.boolean(t.success))},e.equals=function(e,t){return e===t||null!=e&&null!=t&&e.executionOrder===t.executionOrder&&e.success===t.success}}(a=t.ExecutionSummary||(t.ExecutionSummary={})),function(e){function t(e,n){if(e===n)return!0;if(null==e||null==n)return!1;if(typeof e!=typeof n)return!1;if("object"!=typeof e)return!1;const r=Array.isArray(e),i=Array.isArray(n);if(r!==i)return!1;if(r&&i){if(e.length!==n.length)return!1;for(let r=0;r<e.length;r++)if(!t(e[r],n[r]))return!1}if(o.objectLiteral(e)&&o.objectLiteral(n)){const r=Object.keys(e),o=Object.keys(n);if(r.length!==o.length)return!1;if(r.sort(),o.sort(),!t(r,o))return!1;for(let o=0;o<r.length;o++){const i=r[o];if(!t(e[i],n[i]))return!1}}return!0}e.create=function(e,t){return{kind:e,document:t}},e.is=function(e){const t=e;return o.objectLiteral(t)&&s.is(t.kind)&&r.DocumentUri.is(t.document)&&(void 0===t.metadata||o.objectLiteral(t.metadata))},e.diff=function(e,n){const r=new Set;return e.document!==n.document&&r.add("document"),e.kind!==n.kind&&r.add("kind"),e.executionSummary!==n.executionSummary&&r.add("executionSummary"),void 0===e.metadata&&void 0===n.metadata||t(e.metadata,n.metadata)||r.add("metadata"),void 0===e.executionSummary&&void 0===n.executionSummary||a.equals(e.executionSummary,n.executionSummary)||r.add("executionSummary"),r}}(c=t.NotebookCell||(t.NotebookCell={})),(m=t.NotebookDocument||(t.NotebookDocument={})).create=function(e,t,n,r){return{uri:e,notebookType:t,version:n,cells:r}},m.is=function(e){const t=e;return o.objectLiteral(t)&&o.string(t.uri)&&r.integer.is(t.version)&&o.typedArray(t.cells,c.is)},(p=t.NotebookDocumentSyncRegistrationType||(t.NotebookDocumentSyncRegistrationType={})).method="notebookDocument/sync",p.type=new i.RegistrationType(p.method),(h=t.DidOpenNotebookDocumentNotification||(t.DidOpenNotebookDocumentNotification={})).method="notebookDocument/didOpen",h.type=new i.ProtocolNotificationType(h.method),(f=t.NotebookCellArrayChange||(t.NotebookCellArrayChange={})).is=function(e){const t=e;return o.objectLiteral(t)&&r.uinteger.is(t.start)&&r.uinteger.is(t.deleteCount)&&(void 0===t.cells||o.typedArray(t.cells,c.is))},f.create=function(e,t,n){const r={start:e,deleteCount:t};return void 0!==n&&(r.cells=n),r},(d=t.DidChangeNotebookDocumentNotification||(t.DidChangeNotebookDocumentNotification={})).method="notebookDocument/didChange",d.type=new i.ProtocolNotificationType(d.method),(l=t.DidSaveNotebookDocumentNotification||(t.DidSaveNotebookDocumentNotification={})).method="notebookDocument/didSave",l.type=new i.ProtocolNotificationType(l.method),(u=t.DidCloseNotebookDocumentNotification||(t.DidCloseNotebookDocumentNotification={})).method="notebookDocument/didClose",u.type=new i.ProtocolNotificationType(u.method)},1862:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WorkDoneProgressCancelNotification=t.WorkDoneProgressCreateRequest=t.WorkDoneProgress=void 0;const r=n(4389),o=n(6140);var i,s,a;(a=t.WorkDoneProgress||(t.WorkDoneProgress={})).type=new r.ProgressType,a.is=function(e){return e===a.type},(s=t.WorkDoneProgressCreateRequest||(t.WorkDoneProgressCreateRequest={})).method="window/workDoneProgress/create",s.type=new o.ProtocolRequestType(s.method),(i=t.WorkDoneProgressCancelNotification||(t.WorkDoneProgressCancelNotification={})).method="window/workDoneProgress/cancel",i.type=new o.ProtocolNotificationType(i.method)},5206:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SelectionRangeRequest=void 0;const r=n(6140);var o;(o=t.SelectionRangeRequest||(t.SelectionRangeRequest={})).method="textDocument/selectionRange",o.type=new r.ProtocolRequestType(o.method)},9434:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SemanticTokensRefreshRequest=t.SemanticTokensRangeRequest=t.SemanticTokensDeltaRequest=t.SemanticTokensRequest=t.SemanticTokensRegistrationType=t.TokenFormat=void 0;const r=n(6140);var o,i,s,a,c;(t.TokenFormat||(t.TokenFormat={})).Relative="relative",(c=t.SemanticTokensRegistrationType||(t.SemanticTokensRegistrationType={})).method="textDocument/semanticTokens",c.type=new r.RegistrationType(c.method),(a=t.SemanticTokensRequest||(t.SemanticTokensRequest={})).method="textDocument/semanticTokens/full",a.type=new r.ProtocolRequestType(a.method),(s=t.SemanticTokensDeltaRequest||(t.SemanticTokensDeltaRequest={})).method="textDocument/semanticTokens/full/delta",s.type=new r.ProtocolRequestType(s.method),(i=t.SemanticTokensRangeRequest||(t.SemanticTokensRangeRequest={})).method="textDocument/semanticTokens/range",i.type=new r.ProtocolRequestType(i.method),(o=t.SemanticTokensRefreshRequest||(t.SemanticTokensRefreshRequest={})).method="workspace/semanticTokens/refresh",o.type=new r.ProtocolRequestType0(o.method)},5726:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ShowDocumentRequest=void 0;const r=n(6140);var o;(o=t.ShowDocumentRequest||(t.ShowDocumentRequest={})).method="window/showDocument",o.type=new r.ProtocolRequestType(o.method)},1589:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TypeDefinitionRequest=void 0;const r=n(6140);var o;(o=t.TypeDefinitionRequest||(t.TypeDefinitionRequest={})).method="textDocument/typeDefinition",o.type=new r.ProtocolRequestType(o.method)},3693:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TypeHierarchySubtypesRequest=t.TypeHierarchySupertypesRequest=t.TypeHierarchyPrepareRequest=void 0;const r=n(6140);var o,i,s;(s=t.TypeHierarchyPrepareRequest||(t.TypeHierarchyPrepareRequest={})).method="textDocument/prepareTypeHierarchy",s.type=new r.ProtocolRequestType(s.method),(i=t.TypeHierarchySupertypesRequest||(t.TypeHierarchySupertypesRequest={})).method="typeHierarchy/supertypes",i.type=new r.ProtocolRequestType(i.method),(o=t.TypeHierarchySubtypesRequest||(t.TypeHierarchySubtypesRequest={})).method="typeHierarchy/subtypes",o.type=new r.ProtocolRequestType(o.method)},8744:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DidChangeWorkspaceFoldersNotification=t.WorkspaceFoldersRequest=void 0;const r=n(6140);(t.WorkspaceFoldersRequest||(t.WorkspaceFoldersRequest={})).type=new r.ProtocolRequestType0("workspace/workspaceFolders"),(t.DidChangeWorkspaceFoldersNotification||(t.DidChangeWorkspaceFoldersNotification={})).type=new r.ProtocolNotificationType("workspace/didChangeWorkspaceFolders")},9533:(e,t)=>{"use strict";function n(e){return"string"==typeof e||e instanceof String}function r(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=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.objectLiteral=function(e){return null!==e&&"object"==typeof e}},273:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.createProtocolConnection=void 0;const i=n(5028);o(n(5028),t),o(n(1661),t),t.createProtocolConnection=function(e,t,n,r){return(0,i.createMessageConnection)(e,t,n,r)}},6560:(e,t,n)=>{"use strict";e.exports=n(273)},5882:(e,t,n)=>{"use strict";var r,o,i,s,a,c,u,l,d,f,h,p,m,g,y,v,b,R,k,x,C,S,T,w,P,_,D,E;n.r(t),n.d(t,{DocumentUri:()=>r,URI:()=>o,integer:()=>i,uinteger:()=>s,Position:()=>a,Range:()=>c,Location:()=>u,LocationLink:()=>l,Color:()=>d,ColorInformation:()=>f,ColorPresentation:()=>h,FoldingRangeKind:()=>p,FoldingRange:()=>m,DiagnosticRelatedInformation:()=>g,DiagnosticSeverity:()=>y,DiagnosticTag:()=>v,CodeDescription:()=>b,Diagnostic:()=>R,Command:()=>k,TextEdit:()=>x,ChangeAnnotation:()=>C,ChangeAnnotationIdentifier:()=>S,AnnotatedTextEdit:()=>T,TextDocumentEdit:()=>w,CreateFile:()=>P,RenameFile:()=>_,DeleteFile:()=>D,WorkspaceEdit:()=>E,WorkspaceChange:()=>Ce,TextDocumentIdentifier:()=>O,VersionedTextDocumentIdentifier:()=>q,OptionalVersionedTextDocumentIdentifier:()=>N,TextDocumentItem:()=>A,MarkupKind:()=>j,MarkupContent:()=>M,CompletionItemKind:()=>I,InsertTextFormat:()=>F,CompletionItemTag:()=>L,InsertReplaceEdit:()=>W,InsertTextMode:()=>$,CompletionItemLabelDetails:()=>V,CompletionItem:()=>U,CompletionList:()=>H,MarkedString:()=>z,Hover:()=>B,ParameterInformation:()=>K,SignatureInformation:()=>J,DocumentHighlightKind:()=>G,DocumentHighlight:()=>X,SymbolKind:()=>Z,SymbolTag:()=>Y,SymbolInformation:()=>Q,WorkspaceSymbol:()=>ee,DocumentSymbol:()=>te,CodeActionKind:()=>ne,CodeActionTriggerKind:()=>re,CodeActionContext:()=>oe,CodeAction:()=>ie,CodeLens:()=>se,FormattingOptions:()=>ae,DocumentLink:()=>ce,SelectionRange:()=>ue,SemanticTokenTypes:()=>le,SemanticTokenModifiers:()=>de,SemanticTokens:()=>fe,InlineValueText:()=>he,InlineValueVariableLookup:()=>pe,InlineValueEvaluatableExpression:()=>me,InlineValueContext:()=>ge,InlayHintKind:()=>ye,InlayHintLabelPart:()=>ve,InlayHint:()=>be,WorkspaceFolder:()=>Re,EOL:()=>Te,TextDocument:()=>Se}),function(e){e.is=function(e){return"string"==typeof e}}(r||(r={})),function(e){e.is=function(e){return"string"==typeof e}}(o||(o={})),function(e){e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647,e.is=function(t){return"number"==typeof t&&e.MIN_VALUE<=t&&t<=e.MAX_VALUE}}(i||(i={})),function(e){e.MIN_VALUE=0,e.MAX_VALUE=2147483647,e.is=function(t){return"number"==typeof t&&e.MIN_VALUE<=t&&t<=e.MAX_VALUE}}(s||(s={})),function(e){e.create=function(e,t){return e===Number.MAX_VALUE&&(e=s.MAX_VALUE),t===Number.MAX_VALUE&&(t=s.MAX_VALUE),{line:e,character:t}},e.is=function(e){var t=e;return we.objectLiteral(t)&&we.uinteger(t.line)&&we.uinteger(t.character)}}(a||(a={})),function(e){e.create=function(e,t,n,r){if(we.uinteger(e)&&we.uinteger(t)&&we.uinteger(n)&&we.uinteger(r))return{start:a.create(e,t),end:a.create(n,r)};if(a.is(e)&&a.is(t))return{start:e,end:t};throw new Error("Range#create called with invalid arguments[".concat(e,", ").concat(t,", ").concat(n,", ").concat(r,"]"))},e.is=function(e){var t=e;return we.objectLiteral(t)&&a.is(t.start)&&a.is(t.end)}}(c||(c={})),function(e){e.create=function(e,t){return{uri:e,range:t}},e.is=function(e){var t=e;return we.defined(t)&&c.is(t.range)&&(we.string(t.uri)||we.undefined(t.uri))}}(u||(u={})),function(e){e.create=function(e,t,n,r){return{targetUri:e,targetRange:t,targetSelectionRange:n,originSelectionRange:r}},e.is=function(e){var t=e;return we.defined(t)&&c.is(t.targetRange)&&we.string(t.targetUri)&&c.is(t.targetSelectionRange)&&(c.is(t.originSelectionRange)||we.undefined(t.originSelectionRange))}}(l||(l={})),function(e){e.create=function(e,t,n,r){return{red:e,green:t,blue:n,alpha:r}},e.is=function(e){var t=e;return we.objectLiteral(t)&&we.numberRange(t.red,0,1)&&we.numberRange(t.green,0,1)&&we.numberRange(t.blue,0,1)&&we.numberRange(t.alpha,0,1)}}(d||(d={})),function(e){e.create=function(e,t){return{range:e,color:t}},e.is=function(e){var t=e;return we.objectLiteral(t)&&c.is(t.range)&&d.is(t.color)}}(f||(f={})),function(e){e.create=function(e,t,n){return{label:e,textEdit:t,additionalTextEdits:n}},e.is=function(e){var t=e;return we.objectLiteral(t)&&we.string(t.label)&&(we.undefined(t.textEdit)||x.is(t))&&(we.undefined(t.additionalTextEdits)||we.typedArray(t.additionalTextEdits,x.is))}}(h||(h={})),function(e){e.Comment="comment",e.Imports="imports",e.Region="region"}(p||(p={})),function(e){e.create=function(e,t,n,r,o,i){var s={startLine:e,endLine:t};return we.defined(n)&&(s.startCharacter=n),we.defined(r)&&(s.endCharacter=r),we.defined(o)&&(s.kind=o),we.defined(i)&&(s.collapsedText=i),s},e.is=function(e){var t=e;return we.objectLiteral(t)&&we.uinteger(t.startLine)&&we.uinteger(t.startLine)&&(we.undefined(t.startCharacter)||we.uinteger(t.startCharacter))&&(we.undefined(t.endCharacter)||we.uinteger(t.endCharacter))&&(we.undefined(t.kind)||we.string(t.kind))}}(m||(m={})),function(e){e.create=function(e,t){return{location:e,message:t}},e.is=function(e){var t=e;return we.defined(t)&&u.is(t.location)&&we.string(t.message)}}(g||(g={})),function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4}(y||(y={})),function(e){e.Unnecessary=1,e.Deprecated=2}(v||(v={})),function(e){e.is=function(e){var t=e;return we.objectLiteral(t)&&we.string(t.href)}}(b||(b={})),function(e){e.create=function(e,t,n,r,o,i){var s={range:e,message:t};return we.defined(n)&&(s.severity=n),we.defined(r)&&(s.code=r),we.defined(o)&&(s.source=o),we.defined(i)&&(s.relatedInformation=i),s},e.is=function(e){var t,n=e;return we.defined(n)&&c.is(n.range)&&we.string(n.message)&&(we.number(n.severity)||we.undefined(n.severity))&&(we.integer(n.code)||we.string(n.code)||we.undefined(n.code))&&(we.undefined(n.codeDescription)||we.string(null===(t=n.codeDescription)||void 0===t?void 0:t.href))&&(we.string(n.source)||we.undefined(n.source))&&(we.undefined(n.relatedInformation)||we.typedArray(n.relatedInformation,g.is))}}(R||(R={})),function(e){e.create=function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var o={title:e,command:t};return we.defined(n)&&n.length>0&&(o.arguments=n),o},e.is=function(e){var t=e;return we.defined(t)&&we.string(t.title)&&we.string(t.command)}}(k||(k={})),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 we.objectLiteral(t)&&we.string(t.newText)&&c.is(t.range)}}(x||(x={})),function(e){e.create=function(e,t,n){var r={label:e};return void 0!==t&&(r.needsConfirmation=t),void 0!==n&&(r.description=n),r},e.is=function(e){var t=e;return we.objectLiteral(t)&&we.string(t.label)&&(we.boolean(t.needsConfirmation)||void 0===t.needsConfirmation)&&(we.string(t.description)||void 0===t.description)}}(C||(C={})),function(e){e.is=function(e){var t=e;return we.string(t)}}(S||(S={})),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 x.is(t)&&(C.is(t.annotationId)||S.is(t.annotationId))}}(T||(T={})),function(e){e.create=function(e,t){return{textDocument:e,edits:t}},e.is=function(e){var t=e;return we.defined(t)&&N.is(t.textDocument)&&Array.isArray(t.edits)}}(w||(w={})),function(e){e.create=function(e,t,n){var r={kind:"create",uri:e};return void 0===t||void 0===t.overwrite&&void 0===t.ignoreIfExists||(r.options=t),void 0!==n&&(r.annotationId=n),r},e.is=function(e){var t=e;return t&&"create"===t.kind&&we.string(t.uri)&&(void 0===t.options||(void 0===t.options.overwrite||we.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||we.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||S.is(t.annotationId))}}(P||(P={})),function(e){e.create=function(e,t,n,r){var o={kind:"rename",oldUri:e,newUri:t};return void 0===n||void 0===n.overwrite&&void 0===n.ignoreIfExists||(o.options=n),void 0!==r&&(o.annotationId=r),o},e.is=function(e){var t=e;return t&&"rename"===t.kind&&we.string(t.oldUri)&&we.string(t.newUri)&&(void 0===t.options||(void 0===t.options.overwrite||we.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||we.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||S.is(t.annotationId))}}(_||(_={})),function(e){e.create=function(e,t,n){var r={kind:"delete",uri:e};return void 0===t||void 0===t.recursive&&void 0===t.ignoreIfNotExists||(r.options=t),void 0!==n&&(r.annotationId=n),r},e.is=function(e){var t=e;return t&&"delete"===t.kind&&we.string(t.uri)&&(void 0===t.options||(void 0===t.options.recursive||we.boolean(t.options.recursive))&&(void 0===t.options.ignoreIfNotExists||we.boolean(t.options.ignoreIfNotExists)))&&(void 0===t.annotationId||S.is(t.annotationId))}}(D||(D={})),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 we.string(e.kind)?P.is(e)||_.is(e)||D.is(e):w.is(e)})))}}(E||(E={}));var O,q,N,A,j,M,I,F,L,W,$,V,U,H,z,B,K,J,G,X,Z,Y,Q,ee,te,ne,re,oe,ie,se,ae,ce,ue,le,de,fe,he,pe,me,ge,ye,ve,be,Re,ke=function(){function e(e,t){this.edits=e,this.changeAnnotations=t}return e.prototype.insert=function(e,t,n){var r,o;if(void 0===n?r=x.insert(e,t):S.is(n)?(o=n,r=T.insert(e,t,n)):(this.assertChangeAnnotations(this.changeAnnotations),o=this.changeAnnotations.manage(n),r=T.insert(e,t,o)),this.edits.push(r),void 0!==o)return o},e.prototype.replace=function(e,t,n){var r,o;if(void 0===n?r=x.replace(e,t):S.is(n)?(o=n,r=T.replace(e,t,n)):(this.assertChangeAnnotations(this.changeAnnotations),o=this.changeAnnotations.manage(n),r=T.replace(e,t,o)),this.edits.push(r),void 0!==o)return o},e.prototype.delete=function(e,t){var n,r;if(void 0===t?n=x.del(e):S.is(t)?(r=t,n=T.del(e,t)):(this.assertChangeAnnotations(this.changeAnnotations),r=this.changeAnnotations.manage(t),n=T.del(e,r)),this.edits.push(n),void 0!==r)return r},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}(),xe=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(S.is(e)?n=e:(n=this.nextId(),t=e),void 0!==this._annotations[n])throw new Error("Id ".concat(n," is already in use."));if(void 0===t)throw new Error("No annotation provided for id ".concat(n));return this._annotations[n]=t,this._size++,n},e.prototype.nextId=function(){return this._counter++,this._counter.toString()},e}(),Ce=function(){function e(e){var t=this;this._textEditChanges=Object.create(null),void 0!==e?(this._workspaceEdit=e,e.documentChanges?(this._changeAnnotations=new xe(e.changeAnnotations),e.changeAnnotations=this._changeAnnotations.all(),e.documentChanges.forEach((function(e){if(w.is(e)){var n=new ke(e.edits,t._changeAnnotations);t._textEditChanges[e.textDocument.uri]=n}}))):e.changes&&Object.keys(e.changes).forEach((function(n){var r=new ke(e.changes[n]);t._textEditChanges[n]=r}))):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(N.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(!(r=this._textEditChanges[t.uri])){var n={textDocument:t,edits:o=[]};this._workspaceEdit.documentChanges.push(n),r=new ke(o,this._changeAnnotations),this._textEditChanges[t.uri]=r}return r}if(this.initChanges(),void 0===this._workspaceEdit.changes)throw new Error("Workspace edit is not configured for normal text edit changes.");var r;if(!(r=this._textEditChanges[e])){var o=[];this._workspaceEdit.changes[e]=o,r=new ke(o),this._textEditChanges[e]=r}return r},e.prototype.initDocumentChanges=function(){void 0===this._workspaceEdit.documentChanges&&void 0===this._workspaceEdit.changes&&(this._changeAnnotations=new xe,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 r,o,i;if(C.is(t)||S.is(t)?r=t:n=t,void 0===r?o=P.create(e,n):(i=S.is(r)?r:this._changeAnnotations.manage(r),o=P.create(e,n,i)),this._workspaceEdit.documentChanges.push(o),void 0!==i)return i},e.prototype.renameFile=function(e,t,n,r){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");var o,i,s;if(C.is(n)||S.is(n)?o=n:r=n,void 0===o?i=_.create(e,t,r):(s=S.is(o)?o:this._changeAnnotations.manage(o),i=_.create(e,t,r,s)),this._workspaceEdit.documentChanges.push(i),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 r,o,i;if(C.is(t)||S.is(t)?r=t:n=t,void 0===r?o=D.create(e,n):(i=S.is(r)?r:this._changeAnnotations.manage(r),o=D.create(e,n,i)),this._workspaceEdit.documentChanges.push(o),void 0!==i)return i},e}();!function(e){e.create=function(e){return{uri:e}},e.is=function(e){var t=e;return we.defined(t)&&we.string(t.uri)}}(O||(O={})),function(e){e.create=function(e,t){return{uri:e,version:t}},e.is=function(e){var t=e;return we.defined(t)&&we.string(t.uri)&&we.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 we.defined(t)&&we.string(t.uri)&&(null===t.version||we.integer(t.version))}}(N||(N={})),function(e){e.create=function(e,t,n,r){return{uri:e,languageId:t,version:n,text:r}},e.is=function(e){var t=e;return we.defined(t)&&we.string(t.uri)&&we.string(t.languageId)&&we.integer(t.version)&&we.string(t.text)}}(A||(A={})),function(e){e.PlainText="plaintext",e.Markdown="markdown",e.is=function(t){var n=t;return n===e.PlainText||n===e.Markdown}}(j||(j={})),function(e){e.is=function(e){var t=e;return we.objectLiteral(e)&&j.is(t.kind)&&we.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}(I||(I={})),function(e){e.PlainText=1,e.Snippet=2}(F||(F={})),function(e){e.Deprecated=1}(L||(L={})),function(e){e.create=function(e,t,n){return{newText:e,insert:t,replace:n}},e.is=function(e){var t=e;return t&&we.string(t.newText)&&c.is(t.insert)&&c.is(t.replace)}}(W||(W={})),function(e){e.asIs=1,e.adjustIndentation=2}($||($={})),function(e){e.is=function(e){var t=e;return t&&(we.string(t.detail)||void 0===t.detail)&&(we.string(t.description)||void 0===t.description)}}(V||(V={})),function(e){e.create=function(e){return{label:e}}}(U||(U={})),function(e){e.create=function(e,t){return{items:e||[],isIncomplete:!!t}}}(H||(H={})),function(e){e.fromPlainText=function(e){return e.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")},e.is=function(e){var t=e;return we.string(t)||we.objectLiteral(t)&&we.string(t.language)&&we.string(t.value)}}(z||(z={})),function(e){e.is=function(e){var t=e;return!!t&&we.objectLiteral(t)&&(M.is(t.contents)||z.is(t.contents)||we.typedArray(t.contents,z.is))&&(void 0===e.range||c.is(e.range))}}(B||(B={})),function(e){e.create=function(e,t){return t?{label:e,documentation:t}:{label:e}}}(K||(K={})),function(e){e.create=function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var o={label:e};return we.defined(t)&&(o.documentation=t),we.defined(n)?o.parameters=n:o.parameters=[],o}}(J||(J={})),function(e){e.Text=1,e.Read=2,e.Write=3}(G||(G={})),function(e){e.create=function(e,t){var n={range:e};return we.number(t)&&(n.kind=t),n}}(X||(X={})),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}(Z||(Z={})),function(e){e.Deprecated=1}(Y||(Y={})),function(e){e.create=function(e,t,n,r,o){var i={name:e,kind:t,location:{uri:r,range:n}};return o&&(i.containerName=o),i}}(Q||(Q={})),function(e){e.create=function(e,t,n,r){return void 0!==r?{name:e,kind:t,location:{uri:n,range:r}}:{name:e,kind:t,location:{uri:n}}}}(ee||(ee={})),function(e){e.create=function(e,t,n,r,o,i){var s={name:e,detail:t,kind:n,range:r,selectionRange:o};return void 0!==i&&(s.children=i),s},e.is=function(e){var t=e;return t&&we.string(t.name)&&we.number(t.kind)&&c.is(t.range)&&c.is(t.selectionRange)&&(void 0===t.detail||we.string(t.detail))&&(void 0===t.deprecated||we.boolean(t.deprecated))&&(void 0===t.children||Array.isArray(t.children))&&(void 0===t.tags||Array.isArray(t.tags))}}(te||(te={})),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"}(ne||(ne={})),function(e){e.Invoked=1,e.Automatic=2}(re||(re={})),function(e){e.create=function(e,t,n){var r={diagnostics:e};return null!=t&&(r.only=t),null!=n&&(r.triggerKind=n),r},e.is=function(e){var t=e;return we.defined(t)&&we.typedArray(t.diagnostics,R.is)&&(void 0===t.only||we.typedArray(t.only,we.string))&&(void 0===t.triggerKind||t.triggerKind===re.Invoked||t.triggerKind===re.Automatic)}}(oe||(oe={})),function(e){e.create=function(e,t,n){var r={title:e},o=!0;return"string"==typeof t?(o=!1,r.kind=t):k.is(t)?r.command=t:r.edit=t,o&&void 0!==n&&(r.kind=n),r},e.is=function(e){var t=e;return t&&we.string(t.title)&&(void 0===t.diagnostics||we.typedArray(t.diagnostics,R.is))&&(void 0===t.kind||we.string(t.kind))&&(void 0!==t.edit||void 0!==t.command)&&(void 0===t.command||k.is(t.command))&&(void 0===t.isPreferred||we.boolean(t.isPreferred))&&(void 0===t.edit||E.is(t.edit))}}(ie||(ie={})),function(e){e.create=function(e,t){var n={range:e};return we.defined(t)&&(n.data=t),n},e.is=function(e){var t=e;return we.defined(t)&&c.is(t.range)&&(we.undefined(t.command)||k.is(t.command))}}(se||(se={})),function(e){e.create=function(e,t){return{tabSize:e,insertSpaces:t}},e.is=function(e){var t=e;return we.defined(t)&&we.uinteger(t.tabSize)&&we.boolean(t.insertSpaces)}}(ae||(ae={})),function(e){e.create=function(e,t,n){return{range:e,target:t,data:n}},e.is=function(e){var t=e;return we.defined(t)&&c.is(t.range)&&(we.undefined(t.target)||we.string(t.target))}}(ce||(ce={})),function(e){e.create=function(e,t){return{range:e,parent:t}},e.is=function(t){var n=t;return we.objectLiteral(n)&&c.is(n.range)&&(void 0===n.parent||e.is(n.parent))}}(ue||(ue={})),function(e){e.namespace="namespace",e.type="type",e.class="class",e.enum="enum",e.interface="interface",e.struct="struct",e.typeParameter="typeParameter",e.parameter="parameter",e.variable="variable",e.property="property",e.enumMember="enumMember",e.event="event",e.function="function",e.method="method",e.macro="macro",e.keyword="keyword",e.modifier="modifier",e.comment="comment",e.string="string",e.number="number",e.regexp="regexp",e.operator="operator",e.decorator="decorator"}(le||(le={})),function(e){e.declaration="declaration",e.definition="definition",e.readonly="readonly",e.static="static",e.deprecated="deprecated",e.abstract="abstract",e.async="async",e.modification="modification",e.documentation="documentation",e.defaultLibrary="defaultLibrary"}(de||(de={})),function(e){e.is=function(e){var t=e;return we.objectLiteral(t)&&(void 0===t.resultId||"string"==typeof t.resultId)&&Array.isArray(t.data)&&(0===t.data.length||"number"==typeof t.data[0])}}(fe||(fe={})),function(e){e.create=function(e,t){return{range:e,text:t}},e.is=function(e){var t=e;return null!=t&&c.is(t.range)&&we.string(t.text)}}(he||(he={})),function(e){e.create=function(e,t,n){return{range:e,variableName:t,caseSensitiveLookup:n}},e.is=function(e){var t=e;return null!=t&&c.is(t.range)&&we.boolean(t.caseSensitiveLookup)&&(we.string(t.variableName)||void 0===t.variableName)}}(pe||(pe={})),function(e){e.create=function(e,t){return{range:e,expression:t}},e.is=function(e){var t=e;return null!=t&&c.is(t.range)&&(we.string(t.expression)||void 0===t.expression)}}(me||(me={})),function(e){e.create=function(e,t){return{frameId:e,stoppedLocation:t}},e.is=function(e){var t=e;return we.defined(t)&&c.is(e.stoppedLocation)}}(ge||(ge={})),function(e){e.Type=1,e.Parameter=2,e.is=function(e){return 1===e||2===e}}(ye||(ye={})),function(e){e.create=function(e){return{value:e}},e.is=function(e){var t=e;return we.objectLiteral(t)&&(void 0===t.tooltip||we.string(t.tooltip)||M.is(t.tooltip))&&(void 0===t.location||u.is(t.location))&&(void 0===t.command||k.is(t.command))}}(ve||(ve={})),function(e){e.create=function(e,t,n){var r={position:e,label:t};return void 0!==n&&(r.kind=n),r},e.is=function(e){var t=e;return we.objectLiteral(t)&&a.is(t.position)&&(we.string(t.label)||we.typedArray(t.label,ve.is))&&(void 0===t.kind||ye.is(t.kind))&&void 0===t.textEdits||we.typedArray(t.textEdits,x.is)&&(void 0===t.tooltip||we.string(t.tooltip)||M.is(t.tooltip))&&(void 0===t.paddingLeft||we.boolean(t.paddingLeft))&&(void 0===t.paddingRight||we.boolean(t.paddingRight))}}(be||(be={})),function(e){e.is=function(e){var t=e;return we.objectLiteral(t)&&o.is(t.uri)&&we.string(t.name)}}(Re||(Re={}));var Se,Te=["\n","\r\n","\r"];!function(e){function t(e,n){if(e.length<=1)return e;var r=e.length/2|0,o=e.slice(0,r),i=e.slice(r);t(o,n),t(i,n);for(var s=0,a=0,c=0;s<o.length&&a<i.length;){var u=n(o[s],i[a]);e[c++]=u<=0?o[s++]:i[a++]}for(;s<o.length;)e[c++]=o[s++];for(;a<i.length;)e[c++]=i[a++];return e}e.create=function(e,t,n,r){return new Pe(e,t,n,r)},e.is=function(e){var t=e;return!!(we.defined(t)&&we.string(t.uri)&&(we.undefined(t.languageId)||we.string(t.languageId))&&we.uinteger(t.lineCount)&&we.func(t.getText)&&we.func(t.positionAt)&&we.func(t.offsetAt))},e.applyEdits=function(e,n){for(var r=e.getText(),o=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})),i=r.length,s=o.length-1;s>=0;s--){var a=o[s],c=e.offsetAt(a.range.start),u=e.offsetAt(a.range.end);if(!(u<=i))throw new Error("Overlapping edit");r=r.substring(0,c)+a.newText+r.substring(u,r.length),i=c}return r}}(Se||(Se={}));var we,Pe=function(){function e(e,t,n,r){this._uri=e,this._languageId=t,this._version=n,this._content=r,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,r=0;r<t.length;r++){n&&(e.push(r),n=!1);var o=t.charAt(r);n="\r"===o||"\n"===o,"\r"===o&&r+1<t.length&&"\n"===t.charAt(r+1)&&r++}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,r=t.length;if(0===r)return a.create(0,e);for(;n<r;){var o=Math.floor((n+r)/2);t[o]>e?r=o:n=o+1}var i=n-1;return a.create(i,e-t[i])},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],r=e.line+1<t.length?t[e.line+1]:this._content.length;return Math.max(Math.min(n+e.character,r),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,r){return"[object Number]"===t.call(e)&&n<=e&&e<=r},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)}}(we||(we={}))},6265:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.ProposedFeatures=t.NotebookDocuments=t.TextDocuments=t.SemanticTokensBuilder=void 0;const i=n(9817);Object.defineProperty(t,"SemanticTokensBuilder",{enumerable:!0,get:function(){return i.SemanticTokensBuilder}}),o(n(273),t);const s=n(8382);Object.defineProperty(t,"TextDocuments",{enumerable:!0,get:function(){return s.TextDocuments}});const a=n(9748);Object.defineProperty(t,"NotebookDocuments",{enumerable:!0,get:function(){return a.NotebookDocuments}}),o(n(9891),t),(t.ProposedFeatures||(t.ProposedFeatures={})).all={__brand:"features"}},7985:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CallHierarchyFeature=void 0;const r=n(273);t.CallHierarchyFeature=e=>class extends e{get callHierarchy(){return{onPrepare:e=>this.connection.onRequest(r.CallHierarchyPrepareRequest.type,((t,n)=>e(t,n,this.attachWorkDoneProgress(t),void 0))),onIncomingCalls:e=>{const t=r.CallHierarchyIncomingCallsRequest.type;return this.connection.onRequest(t,((n,r)=>e(n,r,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(t,n))))},onOutgoingCalls:e=>{const t=r.CallHierarchyOutgoingCallsRequest.type;return this.connection.onRequest(t,((n,r)=>e(n,r,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(t,n))))}}}}},2507:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ConfigurationFeature=void 0;const r=n(273),o=n(289);t.ConfigurationFeature=e=>class extends e{getConfiguration(e){return e?o.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(r.ConfigurationRequest.type,t).then((t=>Array.isArray(t)?Array.isArray(e)?t:t[0]:Array.isArray(e)?[]:null))}}},6634:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DiagnosticFeature=void 0;const r=n(273);t.DiagnosticFeature=e=>class extends e{get diagnostics(){return{refresh:()=>this.connection.sendRequest(r.DiagnosticRefreshRequest.type),on:e=>this.connection.onRequest(r.DocumentDiagnosticRequest.type,((t,n)=>e(t,n,this.attachWorkDoneProgress(t),this.attachPartialResultProgress(r.DocumentDiagnosticRequest.partialResult,t)))),onWorkspace:e=>this.connection.onRequest(r.WorkspaceDiagnosticRequest.type,((t,n)=>e(t,n,this.attachWorkDoneProgress(t),this.attachPartialResultProgress(r.WorkspaceDiagnosticRequest.partialResult,t))))}}}},828:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileOperationsFeature=void 0;const r=n(273);t.FileOperationsFeature=e=>class extends e{onDidCreateFiles(e){return this.connection.onNotification(r.DidCreateFilesNotification.type,(t=>{e(t)}))}onDidRenameFiles(e){return this.connection.onNotification(r.DidRenameFilesNotification.type,(t=>{e(t)}))}onDidDeleteFiles(e){return this.connection.onNotification(r.DidDeleteFilesNotification.type,(t=>{e(t)}))}onWillCreateFiles(e){return this.connection.onRequest(r.WillCreateFilesRequest.type,((t,n)=>e(t,n)))}onWillRenameFiles(e){return this.connection.onRequest(r.WillRenameFilesRequest.type,((t,n)=>e(t,n)))}onWillDeleteFiles(e){return this.connection.onRequest(r.WillDeleteFilesRequest.type,((t,n)=>e(t,n)))}}},6507:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InlayHintFeature=void 0;const r=n(273);t.InlayHintFeature=e=>class extends e{get inlayHint(){return{refresh:()=>this.connection.sendRequest(r.InlayHintRefreshRequest.type),on:e=>this.connection.onRequest(r.InlayHintRequest.type,((t,n)=>e(t,n,this.attachWorkDoneProgress(t)))),resolve:e=>this.connection.onRequest(r.InlayHintResolveRequest.type,((t,n)=>e(t,n)))}}}},8970:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InlineValueFeature=void 0;const r=n(273);t.InlineValueFeature=e=>class extends e{get inlineValue(){return{refresh:()=>this.connection.sendRequest(r.InlineValueRefreshRequest.type),on:e=>this.connection.onRequest(r.InlineValueRequest.type,((t,n)=>e(t,n,this.attachWorkDoneProgress(t))))}}}},2776:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LinkedEditingRangeFeature=void 0;const r=n(273);t.LinkedEditingRangeFeature=e=>class extends e{onLinkedEditingRange(e){return this.connection.onRequest(r.LinkedEditingRangeRequest.type,((t,n)=>e(t,n,this.attachWorkDoneProgress(t),void 0)))}}},8120:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MonikerFeature=void 0;const r=n(273);t.MonikerFeature=e=>class extends e{get moniker(){return{on:e=>{const t=r.MonikerRequest.type;return this.connection.onRequest(t,((n,r)=>e(n,r,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(t,n))))}}}}},9748:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NotebookDocuments=t.NotebookSyncFeature=void 0;const r=n(273),o=n(8382);t.NotebookSyncFeature=e=>class extends e{get synchronization(){return{onDidOpenNotebookDocument:e=>this.connection.onNotification(r.DidOpenNotebookDocumentNotification.type,(t=>{e(t)})),onDidChangeNotebookDocument:e=>this.connection.onNotification(r.DidChangeNotebookDocumentNotification.type,(t=>{e(t)})),onDidSaveNotebookDocument:e=>this.connection.onNotification(r.DidSaveNotebookDocumentNotification.type,(t=>{e(t)})),onDidCloseNotebookDocument:e=>this.connection.onNotification(r.DidCloseNotebookDocumentNotification.type,(t=>{e(t)}))}}};class i{onDidOpenTextDocument(e){return this.openHandler=e,r.Disposable.create((()=>{this.openHandler=void 0}))}openTextDocument(e){this.openHandler&&this.openHandler(e)}onDidChangeTextDocument(e){return this.changeHandler=e,r.Disposable.create((()=>{this.changeHandler=e}))}changeTextDocument(e){this.changeHandler&&this.changeHandler(e)}onDidCloseTextDocument(e){return this.closeHandler=e,r.Disposable.create((()=>{this.closeHandler=void 0}))}closeTextDocument(e){this.closeHandler&&this.closeHandler(e)}onWillSaveTextDocument(){return i.NULL_DISPOSE}onWillSaveTextDocumentWaitUntil(){return i.NULL_DISPOSE}onDidSaveTextDocument(){return i.NULL_DISPOSE}}i.NULL_DISPOSE=Object.freeze({dispose:()=>{}}),t.NotebookDocuments=class{constructor(e){e instanceof o.TextDocuments?this._cellTextDocuments=e:this._cellTextDocuments=new o.TextDocuments(e),this.notebookDocuments=new Map,this.notebookCellMap=new Map,this._onDidOpen=new r.Emitter,this._onDidChange=new r.Emitter,this._onDidSave=new r.Emitter,this._onDidClose=new r.Emitter}get cellTextDocuments(){return this._cellTextDocuments}getCellTextDocument(e){return this._cellTextDocuments.get(e.document)}getNotebookDocument(e){return this.notebookDocuments.get(e)}getNotebookCell(e){const t=this.notebookCellMap.get(e);return t&&t[0]}findNotebookDocumentForCell(e){const t="string"==typeof e?e:e.document,n=this.notebookCellMap.get(t);return n&&n[1]}get onDidOpen(){return this._onDidOpen.event}get onDidSave(){return this._onDidSave.event}get onDidChange(){return this._onDidChange.event}get onDidClose(){return this._onDidClose.event}listen(e){const t=new i,n=[];return n.push(this.cellTextDocuments.listen(t)),n.push(e.notebooks.synchronization.onDidOpenNotebookDocument((e=>{this.notebookDocuments.set(e.notebookDocument.uri,e.notebookDocument);for(const n of e.cellTextDocuments)t.openTextDocument({textDocument:n});this.updateCellMap(e.notebookDocument),this._onDidOpen.fire(e.notebookDocument)}))),n.push(e.notebooks.synchronization.onDidChangeNotebookDocument((e=>{const n=this.notebookDocuments.get(e.notebookDocument.uri);if(void 0===n)return;n.version=e.notebookDocument.version;const r=n.metadata;let o=!1;const i=e.change;void 0!==i.metadata&&(o=!0,n.metadata=i.metadata);const s=[],a=[],c=[],u=[];if(void 0!==i.cells){const e=i.cells;if(void 0!==e.structure){const r=e.structure.array;if(n.cells.splice(r.start,r.deleteCount,...void 0!==r.cells?r.cells:[]),void 0!==e.structure.didOpen)for(const n of e.structure.didOpen)t.openTextDocument({textDocument:n}),s.push(n.uri);if(e.structure.didClose)for(const n of e.structure.didClose)t.closeTextDocument({textDocument:n}),a.push(n.uri)}if(void 0!==e.data){const t=new Map(e.data.map((e=>[e.document,e])));for(let e=0;e<=n.cells.length;e++){const r=t.get(n.cells[e].document);if(void 0!==r){const o=n.cells.splice(e,1,r);if(c.push({old:o[0],new:r}),t.delete(r.document),0===t.size)break}}}if(void 0!==e.textContent)for(const n of e.textContent)t.changeTextDocument({textDocument:n.document,contentChanges:n.changes}),u.push(n.document.uri)}this.updateCellMap(n);const l={notebookDocument:n};o&&(l.metadata={old:r,new:n.metadata});const d=[];for(const e of s)d.push(this.getNotebookCell(e));const f=[];for(const e of a)f.push(this.getNotebookCell(e));const h=[];for(const e of u)h.push(this.getNotebookCell(e));(d.length>0||f.length>0||c.length>0||h.length>0)&&(l.cells={added:d,removed:f,changed:{data:c,textContent:h}}),void 0===l.metadata&&void 0===l.cells||this._onDidChange.fire(l)}))),n.push(e.notebooks.synchronization.onDidSaveNotebookDocument((e=>{const t=this.notebookDocuments.get(e.notebookDocument.uri);void 0!==t&&this._onDidSave.fire(t)}))),n.push(e.notebooks.synchronization.onDidCloseNotebookDocument((e=>{const n=this.notebookDocuments.get(e.notebookDocument.uri);if(void 0!==n){this._onDidClose.fire(n);for(const n of e.cellTextDocuments)t.closeTextDocument({textDocument:n});this.notebookDocuments.delete(e.notebookDocument.uri);for(const e of n.cells)this.notebookCellMap.delete(e.document)}}))),r.Disposable.create((()=>{n.forEach((e=>e.dispose()))}))}updateCellMap(e){for(const t of e.cells)this.notebookCellMap.set(t.document,[t,e])}}},2731:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.attachPartialResult=t.ProgressFeature=t.attachWorkDone=void 0;const r=n(273),o=n(7560);class i{constructor(e,t){this._connection=e,this._token=t,i.Instances.set(this._token,this)}begin(e,t,n,o){let i={kind:"begin",title:e,percentage:t,message:n,cancellable:o};this._connection.sendProgress(r.WorkDoneProgress.type,this._token,i)}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(r.WorkDoneProgress.type,this._token,n)}done(){i.Instances.delete(this._token),this._connection.sendProgress(r.WorkDoneProgress.type,this._token,{kind:"end"})}}i.Instances=new Map;class s extends i{constructor(e,t){super(e,t),this._source=new r.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 r.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 i(e,n)},t.ProgressFeature=e=>class extends e{constructor(){super(),this._progressSupported=!1}initialize(e){super.initialize(e),!0===e?.window?.workDoneProgress&&(this._progressSupported=!0,this.connection.onNotification(r.WorkDoneProgressCancelNotification.type,(e=>{let t=i.Instances.get(e.token);(t instanceof s||t instanceof c)&&t.cancel()})))}attachWorkDoneProgress(e){return void 0===e?new a:new i(this.connection,e)}createWorkDoneProgress(){if(this._progressSupported){const e=(0,o.generateUuid)();return this.connection.sendRequest(r.WorkDoneProgressCreateRequest.type,{token:e}).then((()=>new s(this.connection,e)))}return Promise.resolve(new c)}},function(e){e.type=new r.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)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SemanticTokensBuilder=t.SemanticTokensDiff=t.SemanticTokensFeature=void 0;const r=n(273);t.SemanticTokensFeature=e=>class extends e{get semanticTokens(){return{refresh:()=>this.connection.sendRequest(r.SemanticTokensRefreshRequest.type),on:e=>{const t=r.SemanticTokensRequest.type;return this.connection.onRequest(t,((n,r)=>e(n,r,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(t,n))))},onDelta:e=>{const t=r.SemanticTokensDeltaRequest.type;return this.connection.onRequest(t,((n,r)=>e(n,r,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(t,n))))},onRange:e=>{const t=r.SemanticTokensRangeRequest.type;return this.connection.onRequest(t,((n,r)=>e(n,r,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(t,n))))}}}};class o{constructor(e,t){this.originalSequence=e,this.modifiedSequence=t}computeDiff(){const e=this.originalSequence.length,t=this.modifiedSequence.length;let n=0;for(;n<t&&n<e&&this.originalSequence[n]===this.modifiedSequence[n];)n++;if(n<t&&n<e){let r=e-1,o=t-1;for(;r>=n&&o>=n&&this.originalSequence[r]===this.modifiedSequence[o];)r--,o--;(r<n||o<n)&&(r++,o++);const i=r-n+1,s=this.modifiedSequence.slice(n,o+1);return 1===s.length&&s[0]===this.originalSequence[r]?[{start:n,deleteCount:i-1}]:[{start:n,deleteCount:i,data:s}]}return n<t?[{start:n,deleteCount:0,data:this.modifiedSequence.slice(n)}]:n<e?[{start:n,deleteCount:e-n}]:[]}}t.SemanticTokensDiff=o,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,r,o){let i=e,s=t;this._dataLen>0&&(i-=this._prevLine,0===i&&(s-=this._prevChar)),this._data[this._dataLen++]=i,this._data[this._dataLen++]=s,this._data[this._dataLen++]=n,this._data[this._dataLen++]=r,this._data[this._dataLen++]=o,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(){return void 0!==this._prevData?{resultId:this.id,edits:new o(this._prevData,this._data).computeDiff()}:this.build()}}},9891:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createConnection=t.combineFeatures=t.combineNotebooksFeatures=t.combineLanguagesFeatures=t.combineWorkspaceFeatures=t.combineWindowFeatures=t.combineClientFeatures=t.combineTracerFeatures=t.combineTelemetryFeatures=t.combineConsoleFeatures=t._NotebooksImpl=t._LanguagesImpl=t.BulkUnregistration=t.BulkRegistration=t.ErrorMessageTracker=void 0;const r=n(273),o=n(289),i=n(7560),s=n(2731),a=n(2507),c=n(1836),u=n(7985),l=n(9817),d=n(5421),f=n(828),h=n(2776),p=n(4606),m=n(8970),g=n(6507),y=n(6634),v=n(9748),b=n(8120);function R(e){if(null!==e)return e}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 k{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(r.MessageType.Error,e)}warn(e){this.send(r.MessageType.Warning,e)}info(e){this.send(r.MessageType.Info,e)}log(e){this.send(r.MessageType.Log,e)}send(e,t){this._rawConnection&&this._rawConnection.sendNotification(r.LogMessageNotification.type,{type:e,message:t}).catch((()=>{(0,r.RAL)().console.error("Sending log message failed")}))}}const x=(0,d.ShowDocumentFeature)((0,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:r.MessageType.Error,message:e,actions:t};return this.connection.sendRequest(r.ShowMessageRequest.type,n).then(R)}showWarningMessage(e,...t){let n={type:r.MessageType.Warning,message:e,actions:t};return this.connection.sendRequest(r.ShowMessageRequest.type,n).then(R)}showInformationMessage(e,...t){let n={type:r.MessageType.Info,message:e,actions:t};return this.connection.sendRequest(r.ShowMessageRequest.type,n).then(R)}}));(t.BulkRegistration||(t.BulkRegistration={})).create=function(){return new C};class C{constructor(){this._registrations=[],this._registered=new Set}add(e,t){const n=o.string(e)?e:e.method;if(this._registered.has(n))throw new Error(`${n} is already added to this registration`);const r=i.generateUuid();this._registrations.push({id:r,method:n,registerOptions:t||{}}),this._registered.add(n)}asRegistrationParams(){return{registrations:this._registrations}}}(t.BulkUnregistration||(t.BulkUnregistration={})).create=function(){return new S(void 0,[])};class S{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(r.UnregistrationRequest.type,t).catch((()=>{this._connection.console.info("Bulk unregistration failed.")}))}disposeSingle(e){const t=o.string(e)?e:e.method,n=this._unregistrations.get(t);if(!n)return!1;let i={unregisterations:[n]};return this._connection.sendRequest(r.UnregistrationRequest.type,i).then((()=>{this._unregistrations.delete(t)}),(e=>{this._connection.console.info(`Un-registering request handler for ${n.id} failed.`)})),!0}}class T{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 C?this.registerMany(e):e instanceof S?this.registerSingle1(e,t,n):this.registerSingle2(e,t)}registerSingle1(e,t,n){const s=o.string(t)?t:t.method,a=i.generateUuid();let c={registrations:[{id:a,method:s,registerOptions:n||{}}]};return e.isAttached||e.attach(this.connection),this.connection.sendRequest(r.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=o.string(e)?e:e.method,s=i.generateUuid();let a={registrations:[{id:s,method:n,registerOptions:t||{}}]};return this.connection.sendRequest(r.RegistrationRequest.type,a).then((e=>r.Disposable.create((()=>{this.unregisterSingle(s,n).catch((()=>{this.connection.console.info(`Un-registering capability with id ${s} failed.`)}))}))),(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(r.UnregistrationRequest.type,n).catch((()=>{this.connection.console.info(`Un-registering request handler for ${e} failed.`)}))}registerMany(e){let t=e.asRegistrationParams();return this.connection.sendRequest(r.RegistrationRequest.type,t).then((()=>new S(this._connection,t.registrations.map((e=>({id:e.id,method:e.method}))))),(e=>(this.connection.console.info("Bulk registration failed."),Promise.reject(e))))}}const w=(0,f.FileOperationsFeature)((0,c.WorkspaceFoldersFeature)((0,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(r.ApplyWorkspaceEditRequest.type,t)}})));class P{constructor(){this._trace=r.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!==r.Trace.Off&&this.connection.sendNotification(r.LogTraceNotification.type,{message:e,verbose:this._trace===r.Trace.Verbose?t:void 0}).catch((()=>{}))}}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){}logEvent(e){this.connection.sendNotification(r.TelemetryEventNotification.type,e).catch((()=>{this.connection.console.log("Sending TelemetryEventNotification failed")}))}}class D{constructor(){}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}attachWorkDoneProgress(e){return(0,s.attachWorkDone)(this.connection,e)}attachPartialResultProgress(e,t){return(0,s.attachPartialResult)(this.connection,t)}}t._LanguagesImpl=D;const E=(0,b.MonikerFeature)((0,y.DiagnosticFeature)((0,g.InlayHintFeature)((0,m.InlineValueFeature)((0,p.TypeHierarchyFeature)((0,h.LinkedEditingRangeFeature)((0,l.SemanticTokensFeature)((0,u.CallHierarchyFeature)(D))))))));class O{constructor(){}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}attachWorkDoneProgress(e){return(0,s.attachWorkDone)(this.connection,e)}attachPartialResultProgress(e,t){return(0,s.attachPartialResult)(this.connection,t)}}t._NotebooksImpl=O;const q=(0,v.NotebookSyncFeature)(O);function N(e,t){return function(n){return t(e(n))}}function A(e,t){return function(n){return t(e(n))}}function j(e,t){return function(n){return t(e(n))}}function M(e,t){return function(n){return t(e(n))}}function I(e,t){return function(n){return t(e(n))}}function F(e,t){return function(n){return t(e(n))}}function L(e,t){return function(n){return t(e(n))}}function W(e,t){return function(n){return t(e(n))}}t.combineConsoleFeatures=N,t.combineTelemetryFeatures=A,t.combineTracerFeatures=j,t.combineClientFeatures=M,t.combineWindowFeatures=I,t.combineWorkspaceFeatures=F,t.combineLanguagesFeatures=L,t.combineNotebooksFeatures=W,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,N),tracer:n(e.tracer,t.tracer,j),telemetry:n(e.telemetry,t.telemetry,A),client:n(e.client,t.client,M),window:n(e.window,t.window,I),workspace:n(e.workspace,t.workspace,F),languages:n(e.languages,t.languages,L),notebooks:n(e.notebooks,t.notebooks,W)}},t.createConnection=function(e,t,n){const i=n&&n.console?new(n.console(k)):new k,a=e(i);i.rawAttach(a);const c=n&&n.tracer?new(n.tracer(P)):new P,u=n&&n.telemetry?new(n.telemetry(_)):new _,l=n&&n.client?new(n.client(T)):new T,d=n&&n.window?new(n.window(x)):new x,f=n&&n.workspace?new(n.workspace(w)):new w,h=n&&n.languages?new(n.languages(E)):new E,p=n&&n.notebooks?new(n.notebooks(q)):new q,m=[i,c,u,l,d,f,h,p];function g(e){return e instanceof Promise?e:o.thenable(e)?new Promise(((t,n)=>{e.then((e=>t(e)),(e=>n(e)))})):Promise.resolve(e)}let y,v,b,R={listen:()=>a.listen(),sendRequest:(e,...t)=>a.sendRequest(o.string(e)?e:e.method,...t),onRequest:(e,t)=>a.onRequest(e,t),sendNotification:(e,t)=>{const n=o.string(e)?e:e.method;return 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=>(v=e,{dispose:()=>{v=void 0}}),onInitialized:e=>a.onNotification(r.InitializedNotification.type,e),onShutdown:e=>(y=e,{dispose:()=>{y=void 0}}),onExit:e=>(b=e,{dispose:()=>{b=void 0}}),get console(){return i},get telemetry(){return u},get tracer(){return c},get client(){return l},get window(){return d},get workspace(){return f},get languages(){return h},get notebooks(){return p},onDidChangeConfiguration:e=>a.onNotification(r.DidChangeConfigurationNotification.type,e),onDidChangeWatchedFiles:e=>a.onNotification(r.DidChangeWatchedFilesNotification.type,e),__textDocumentSync:void 0,onDidOpenTextDocument:e=>a.onNotification(r.DidOpenTextDocumentNotification.type,e),onDidChangeTextDocument:e=>a.onNotification(r.DidChangeTextDocumentNotification.type,e),onDidCloseTextDocument:e=>a.onNotification(r.DidCloseTextDocumentNotification.type,e),onWillSaveTextDocument:e=>a.onNotification(r.WillSaveTextDocumentNotification.type,e),onWillSaveTextDocumentWaitUntil:e=>a.onRequest(r.WillSaveTextDocumentWaitUntilRequest.type,e),onDidSaveTextDocument:e=>a.onNotification(r.DidSaveTextDocumentNotification.type,e),sendDiagnostics:e=>a.sendNotification(r.PublishDiagnosticsNotification.type,e),onHover:e=>a.onRequest(r.HoverRequest.type,((t,n)=>e(t,n,(0,s.attachWorkDone)(a,t),void 0))),onCompletion:e=>a.onRequest(r.CompletionRequest.type,((t,n)=>e(t,n,(0,s.attachWorkDone)(a,t),(0,s.attachPartialResult)(a,t)))),onCompletionResolve:e=>a.onRequest(r.CompletionResolveRequest.type,e),onSignatureHelp:e=>a.onRequest(r.SignatureHelpRequest.type,((t,n)=>e(t,n,(0,s.attachWorkDone)(a,t),void 0))),onDeclaration:e=>a.onRequest(r.DeclarationRequest.type,((t,n)=>e(t,n,(0,s.attachWorkDone)(a,t),(0,s.attachPartialResult)(a,t)))),onDefinition:e=>a.onRequest(r.DefinitionRequest.type,((t,n)=>e(t,n,(0,s.attachWorkDone)(a,t),(0,s.attachPartialResult)(a,t)))),onTypeDefinition:e=>a.onRequest(r.TypeDefinitionRequest.type,((t,n)=>e(t,n,(0,s.attachWorkDone)(a,t),(0,s.attachPartialResult)(a,t)))),onImplementation:e=>a.onRequest(r.ImplementationRequest.type,((t,n)=>e(t,n,(0,s.attachWorkDone)(a,t),(0,s.attachPartialResult)(a,t)))),onReferences:e=>a.onRequest(r.ReferencesRequest.type,((t,n)=>e(t,n,(0,s.attachWorkDone)(a,t),(0,s.attachPartialResult)(a,t)))),onDocumentHighlight:e=>a.onRequest(r.DocumentHighlightRequest.type,((t,n)=>e(t,n,(0,s.attachWorkDone)(a,t),(0,s.attachPartialResult)(a,t)))),onDocumentSymbol:e=>a.onRequest(r.DocumentSymbolRequest.type,((t,n)=>e(t,n,(0,s.attachWorkDone)(a,t),(0,s.attachPartialResult)(a,t)))),onWorkspaceSymbol:e=>a.onRequest(r.WorkspaceSymbolRequest.type,((t,n)=>e(t,n,(0,s.attachWorkDone)(a,t),(0,s.attachPartialResult)(a,t)))),onWorkspaceSymbolResolve:e=>a.onRequest(r.WorkspaceSymbolResolveRequest.type,e),onCodeAction:e=>a.onRequest(r.CodeActionRequest.type,((t,n)=>e(t,n,(0,s.attachWorkDone)(a,t),(0,s.attachPartialResult)(a,t)))),onCodeActionResolve:e=>a.onRequest(r.CodeActionResolveRequest.type,((t,n)=>e(t,n))),onCodeLens:e=>a.onRequest(r.CodeLensRequest.type,((t,n)=>e(t,n,(0,s.attachWorkDone)(a,t),(0,s.attachPartialResult)(a,t)))),onCodeLensResolve:e=>a.onRequest(r.CodeLensResolveRequest.type,((t,n)=>e(t,n))),onDocumentFormatting:e=>a.onRequest(r.DocumentFormattingRequest.type,((t,n)=>e(t,n,(0,s.attachWorkDone)(a,t),void 0))),onDocumentRangeFormatting:e=>a.onRequest(r.DocumentRangeFormattingRequest.type,((t,n)=>e(t,n,(0,s.attachWorkDone)(a,t),void 0))),onDocumentOnTypeFormatting:e=>a.onRequest(r.DocumentOnTypeFormattingRequest.type,((t,n)=>e(t,n))),onRenameRequest:e=>a.onRequest(r.RenameRequest.type,((t,n)=>e(t,n,(0,s.attachWorkDone)(a,t),void 0))),onPrepareRename:e=>a.onRequest(r.PrepareRenameRequest.type,((t,n)=>e(t,n))),onDocumentLinks:e=>a.onRequest(r.DocumentLinkRequest.type,((t,n)=>e(t,n,(0,s.attachWorkDone)(a,t),(0,s.attachPartialResult)(a,t)))),onDocumentLinkResolve:e=>a.onRequest(r.DocumentLinkResolveRequest.type,((t,n)=>e(t,n))),onDocumentColor:e=>a.onRequest(r.DocumentColorRequest.type,((t,n)=>e(t,n,(0,s.attachWorkDone)(a,t),(0,s.attachPartialResult)(a,t)))),onColorPresentation:e=>a.onRequest(r.ColorPresentationRequest.type,((t,n)=>e(t,n,(0,s.attachWorkDone)(a,t),(0,s.attachPartialResult)(a,t)))),onFoldingRanges:e=>a.onRequest(r.FoldingRangeRequest.type,((t,n)=>e(t,n,(0,s.attachWorkDone)(a,t),(0,s.attachPartialResult)(a,t)))),onSelectionRanges:e=>a.onRequest(r.SelectionRangeRequest.type,((t,n)=>e(t,n,(0,s.attachWorkDone)(a,t),(0,s.attachPartialResult)(a,t)))),onExecuteCommand:e=>a.onRequest(r.ExecuteCommandRequest.type,((t,n)=>e(t,n,(0,s.attachWorkDone)(a,t),void 0))),dispose:()=>a.dispose()};for(let e of m)e.attach(R);return a.onRequest(r.InitializeRequest.type,(e=>{t.initialize(e),o.string(e.trace)&&(c.trace=r.Trace.fromString(e.trace));for(let t of m)t.initialize(e.capabilities);if(v)return g(v(e,(new r.CancellationTokenSource).token,(0,s.attachWorkDone)(a,e),void 0)).then((e=>{if(e instanceof r.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=o.number(R.__textDocumentSync)?R.__textDocumentSync:r.TextDocumentSyncKind.None:o.number(n.textDocumentSync)||o.number(n.textDocumentSync.change)||(n.textDocumentSync.change=o.number(R.__textDocumentSync)?R.__textDocumentSync:r.TextDocumentSyncKind.None);for(let e of m)e.fillServerCapabilities(n);return t}));{let e={capabilities:{textDocumentSync:r.TextDocumentSyncKind.None}};for(let t of m)t.fillServerCapabilities(e.capabilities);return e}})),a.onRequest(r.ShutdownRequest.type,(()=>(t.shutdownReceived=!0,y?y((new r.CancellationTokenSource).token):void 0))),a.onNotification(r.ExitNotification.type,(()=>{try{b&&b()}finally{t.shutdownReceived?t.exit(0):t.exit(1)}})),a.onNotification(r.SetTraceNotification.type,(e=>{c.trace=r.Trace.fromString(e.value)})),R}},5421:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ShowDocumentFeature=void 0;const r=n(273);t.ShowDocumentFeature=e=>class extends e{showDocument(e){return this.connection.sendRequest(r.ShowDocumentRequest.type,e)}}},8382:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TextDocuments=void 0;const r=n(273);t.TextDocuments=class{constructor(e){this._configuration=e,this._syncedDocuments=new Map,this._onDidChangeContent=new r.Emitter,this._onDidOpen=new r.Emitter,this._onDidClose=new r.Emitter,this._onDidSave=new r.Emitter,this._onWillSave=new r.Emitter}get onDidOpen(){return this._onDidOpen.event}get onDidChangeContent(){return this._onDidChangeContent.event}get onWillSave(){return this._onWillSave.event}onWillSaveWaitUntil(e){this._willSaveWaitUntil=e}get onDidSave(){return this._onDidSave.event}get onDidClose(){return this._onDidClose.event}get(e){return this._syncedDocuments.get(e)}all(){return Array.from(this._syncedDocuments.values())}keys(){return Array.from(this._syncedDocuments.keys())}listen(e){e.__textDocumentSync=r.TextDocumentSyncKind.Incremental;const t=[];return t.push(e.onDidOpenTextDocument((e=>{const t=e.textDocument,n=this._configuration.create(t.uri,t.languageId,t.version,t.text);this._syncedDocuments.set(t.uri,n);const r=Object.freeze({document:n});this._onDidOpen.fire(r),this._onDidChangeContent.fire(r)}))),t.push(e.onDidChangeTextDocument((e=>{const t=e.textDocument,n=e.contentChanges;if(0===n.length)return;const{version:r}=t;if(null==r)throw new Error(`Received document change event for ${t.uri} without valid version identifier`);let o=this._syncedDocuments.get(t.uri);void 0!==o&&(o=this._configuration.update(o,n,r),this._syncedDocuments.set(t.uri,o),this._onDidChangeContent.fire(Object.freeze({document:o})))}))),t.push(e.onDidCloseTextDocument((e=>{let t=this._syncedDocuments.get(e.textDocument.uri);void 0!==t&&(this._syncedDocuments.delete(e.textDocument.uri),this._onDidClose.fire(Object.freeze({document:t})))}))),t.push(e.onWillSaveTextDocument((e=>{let t=this._syncedDocuments.get(e.textDocument.uri);void 0!==t&&this._onWillSave.fire(Object.freeze({document:t,reason:e.reason}))}))),t.push(e.onWillSaveTextDocumentWaitUntil(((e,t)=>{let n=this._syncedDocuments.get(e.textDocument.uri);return void 0!==n&&this._willSaveWaitUntil?this._willSaveWaitUntil(Object.freeze({document:n,reason:e.reason}),t):[]}))),t.push(e.onDidSaveTextDocument((e=>{let t=this._syncedDocuments.get(e.textDocument.uri);void 0!==t&&this._onDidSave.fire(Object.freeze({document:t}))}))),r.Disposable.create((()=>{t.forEach((e=>e.dispose()))}))}}},4606:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TypeHierarchyFeature=void 0;const r=n(273);t.TypeHierarchyFeature=e=>class extends e{get typeHierarchy(){return{onPrepare:e=>this.connection.onRequest(r.TypeHierarchyPrepareRequest.type,((t,n)=>e(t,n,this.attachWorkDoneProgress(t),void 0))),onSupertypes:e=>{const t=r.TypeHierarchySupertypesRequest.type;return this.connection.onRequest(t,((n,r)=>e(n,r,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(t,n))))},onSubtypes:e=>{const t=r.TypeHierarchySubtypesRequest.type;return this.connection.onRequest(t,((n,r)=>e(n,r,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(t,n))))}}}}},289:(e,t)=>{"use strict";function n(e){return"string"==typeof e||e instanceof String}function r(e){return"function"==typeof e}function o(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=r,t.array=o,t.stringArray=function(e){return o(e)&&e.every((e=>n(e)))},t.typedArray=function(e,t){return Array.isArray(e)&&e.every(t)},t.thenable=function(e){return e&&r(e.then)}},7560:(e,t)=>{"use strict";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 r extends n{constructor(){super([r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),"-",r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),"-","4",r._randomHex(),r._randomHex(),r._randomHex(),"-",r._oneOf(r._timeHighBits),r._randomHex(),r._randomHex(),r._randomHex(),"-",r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex()].join(""))}static _oneOf(e){return e[Math.floor(e.length*Math.random())]}static _randomHex(){return r._oneOf(r._chars)}}function o(){return new r}r._chars=["0","1","2","3","4","5","6","6","7","8","9","a","b","c","d","e","f"],r._timeHighBits=["8","9","a","b"],t.empty=new n("00000000-0000-0000-0000-000000000000"),t.v4=o;const i=/^[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 i.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 o().asHex()}},1836:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WorkspaceFoldersFeature=void 0;const r=n(273);t.WorkspaceFoldersFeature=e=>class extends e{constructor(){super(),this._notificationIsAutoRegistered=!1}initialize(e){super.initialize(e);let t=e.workspace;t&&t.workspaceFolders&&(this._onDidChangeWorkspaceFolders=new r.Emitter,this.connection.onNotification(r.DidChangeWorkspaceFoldersNotification.type,(e=>{this._onDidChangeWorkspaceFolders.fire(e.event)})))}fillServerCapabilities(e){super.fillServerCapabilities(e);const t=e.workspace?.workspaceFolders?.changeNotifications;this._notificationIsAutoRegistered=!0===t||"string"==typeof t}getWorkspaceFolders(){return this.connection.sendRequest(r.WorkspaceFoldersRequest.type)}get onDidChangeWorkspaceFolders(){if(!this._onDidChangeWorkspaceFolders)throw new Error("Client doesn't support sending workspace folder change events.");return this._notificationIsAutoRegistered||this._unregistration||(this._unregistration=this.connection.client.register(r.DidChangeWorkspaceFoldersNotification.type)),this._onDidChangeWorkspaceFolders.event}}},7613:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resolveModulePath=t.FileSystem=t.resolveGlobalYarnPath=t.resolveGlobalNodePath=t.resolve=t.uriToFilePath=void 0;const r=n(8835),o=n(5622),i=n(5747),s=n(3129);function a(){return"win32"===process.platform}function c(e,t,n,r){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&&i.existsSync(t)&&(d.NODE_PATH?d.NODE_PATH=t+o.delimiter+d.NODE_PATH:d.NODE_PATH=t,r&&r(`NODE_PATH value is: ${d.NODE_PATH}`)),d.ELECTRON_RUN_AS_NODE="1";try{let t=(0,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 r={c:"rs",a:e};t.send(r)}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 r={encoding:"utf8",env:n};a()&&(t="npm.cmd",r.shell=!0);let i=()=>{};try{process.on("SIGPIPE",i);let n=(0,s.spawnSync)(t,["config","get","prefix"],r).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()?o.join(c,"node_modules"):o.join(c,"lib","node_modules"):void 0}catch(e){return}finally{process.removeListener("SIGPIPE",i)}}var l;t.uriToFilePath=function(e){let t=r.parse(e);if("file:"!==t.protocol||!t.path)return;let n=t.path.split("/");for(var i=0,s=n.length;i<s;i++)n[i]=decodeURIComponent(n[i]);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 o.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 r=()=>{};try{process.on("SIGPIPE",r);let i=(0,s.spawnSync)(t,["global","dir","--json"],n),a=i.stdout;if(!a)return void(e&&(e("'yarn global dir' didn't return a value."),i.stderr&&e(i.stderr)));let c=a.trim().split(/\r?\n/);for(let e of c)try{let t=JSON.parse(e);if("log"===t.type)return o.join(t.data,"node_modules")}catch(e){}return}catch(e){return}finally{process.removeListener("SIGPIPE",r)}},function(e){let t;function n(){return void 0!==t||(t=!("win32"===process.platform||i.existsSync(__filename.toUpperCase())&&i.existsSync(__filename.toLowerCase()))),t}e.isCaseSensitive=n,e.isParent=function(e,t){return n()?0===o.normalize(t).indexOf(o.normalize(e)):0===o.normalize(t).toLowerCase().indexOf(o.normalize(e).toLowerCase())}}(l=t.FileSystem||(t.FileSystem={})),t.resolveModulePath=function(e,t,n,r){return n?(o.isAbsolute(n)||(n=o.join(e,n)),c(t,n,n,r).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(r),e,r)))):c(t,u(r),e,r)}},5809:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.createConnection=t.Files=void 0;const i=n(289),s=n(9891),a=n(7613),c=n(6560);var u;o(n(6560),t),o(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 r=process.argv[n];if(r===e&&n+1<process.argv.length)return void t(process.argv[n+1]);{let n=r.split("=");n[0]===e&&t(n[1])}}}();const f={initialize:e=>{const t=e.processId;i.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,r){let o,a,u,l;return void 0!==e&&"features"===e.__brand&&(o=e,e=t,t=n,n=r),c.ConnectionStrategy.is(e)||c.ConnectionOptions.is(e)?l=e:(a=e,u=t,l=n),function(e,t,n,r){if(!e&&!t&&process.argv.length>2){let n,r,i=process.argv.slice(2);for(let s=0;s<i.length;s++){let a=i[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(i[s+1]);break}if("--pipe"===a){r=i[s+1];break}var o=a.split("=");if("--socket"===o[0]){n=parseInt(o[1]);break}if("--pipe"===o[0]){r=o[1];break}}if(n){let r=(0,c.createServerSocketTransport)(n);e=r[0],t=r[1]}else if(r){let n=(0,c.createServerPipeTransport)(r);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(i.func(e.read)&&i.func(e.on)){let t=e;t.on("end",(()=>{process.exit(d?0:1)})),t.on("close",(()=>{process.exit(d?0:1)}))}return(0,s.createConnection)((r=>(0,c.createProtocolConnection)(e,t,r,n)),f,r)}(a,u,l,o)}},8212:(e,t,n)=>{"use strict";e.exports=n(5809)},800:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.config=t.loadMessageBundle=t.localize=t.format=t.setPseudo=t.isPseudo=t.isDefined=t.BundleFormat=t.MessageFormat=void 0;var r,o,i,s=n(1926);function a(e){return void 0!==e}function c(e,n){return t.isPseudo&&(e="["+e.replace(/[aouei]/g,"$&$&")+"]"),0===n.length?e:e.replace(/\{(\d+)\}/g,(function(e,t){var r=t[0],o=n[r],i=e;return"string"==typeof o?i=o:"number"!=typeof o&&"boolean"!=typeof o&&null!=o||(i=String(o)),i}))}(i=t.MessageFormat||(t.MessageFormat={})).file="file",i.bundle="bundle",i.both="both",(o=t.BundleFormat||(t.BundleFormat={})).standalone="standalone",o.languagePack="languagePack",function(e){e.is=function(e){var t=e;return t&&a(t.key)&&a(t.comment)}}(r||(r={})),t.isDefined=a,t.isPseudo=!1,t.setPseudo=function(e){t.isPseudo=e},t.format=c,t.localize=function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return c(t,n)},t.loadMessageBundle=function(e){return(0,s.default)().loadMessageBundle(e)},t.config=function(e){return(0,s.default)().config(e)}},1926:(e,t)=>{"use strict";var n;function r(){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}}(r||(r={})),t.default=r},8472:(e,t,n)=>{"use strict";t.LV=void 0;var r,o,i=n(5622),s=n(5747),a=n(1926),c=n(800),u=(n(800),Object.prototype.toString);function l(e){return"[object Number]"===u.call(e)}function d(e){return"[object String]"===u.call(e)}function f(e){return JSON.parse(s.readFileSync(e,"utf8"))}function h(e){return function(t,n){for(var r=[],o=2;o<arguments.length;o++)r[o-2]=arguments[o];return l(t)?t>=e.length?void console.error("Broken localize call found. Index out of bounds. Stacktrace is\n: ".concat(new Error("").stack)):(0,c.format)(e[t],r):d(n)?(console.warn("Message ".concat(n," didn't get externalized correctly.")),(0,c.format)(n,r)):void console.error("Broken localize call found. Stacktrace is\n: ".concat(new Error("").stack))}}function p(e,t){return r[e]=t,t}function m(e){try{return function(e){var t=f(i.join(e,"nls.metadata.json")),n=Object.create(null);for(var r in t){var o=t[r];n[r]=o.messages}return n}(e)}catch(e){return void console.log("Generating default bundle from meta data failed.",e)}}function g(e,t){var n;if(!0===o.languagePackSupport&&void 0!==o.cacheRoot&&void 0!==o.languagePackId&&void 0!==o.translationsConfigFile&&void 0!==o.translationsConfig)try{n=function(e,t){var n,r,a,c=i.join(o.cacheRoot,"".concat(e.id,"-").concat(e.hash,".json")),u=!1,l=!1;try{return n=JSON.parse(s.readFileSync(c,{encoding:"utf8",flag:"r"})),r=c,a=new Date,s.utimes(r,a,a,(function(){})),n}catch(e){if("ENOENT"===e.code)l=!0;else{if(!(e instanceof SyntaxError))throw e;console.log("Syntax error parsing message bundle: ".concat(e.message,".")),s.unlink(c,(function(e){e&&console.error("Deleting corrupted bundle ".concat(c," failed."))})),u=!0}}if(!(n=function(e,t){var n=o.translationsConfig[e.id];if(n){var r=f(n).contents,s=f(i.join(t,"nls.metadata.json")),a=Object.create(null);for(var c in s){var u=s[c],l=r["".concat(e.outDir,"/").concat(c)];if(l){for(var h=[],p=0;p<u.keys.length;p++){var m=u.keys[p],g=l[d(m)?m:m.key];void 0===g&&(g=u.messages[p]),h.push(g)}a[c]=h}else a[c]=u.messages}return a}}(e,t))||u)return n;if(l)try{s.writeFileSync(c,JSON.stringify(n),{encoding:"utf8",flag:"wx"})}catch(e){if("EEXIST"===e.code)return n;throw e}return n}(e,t)}catch(e){console.log("Load or create bundle failed ",e)}if(!n){if(o.languagePackSupport)return m(t);var r=function(e){for(var t=o.language;t;){var n=i.join(e,"nls.bundle.".concat(t,".json"));if(s.existsSync(n))return n;var r=t.lastIndexOf("-");t=r>0?t.substring(0,r):void 0}if(void 0===t&&(n=i.join(e,"nls.bundle.json"),s.existsSync(n)))return n}(t);if(r)try{return f(r)}catch(e){console.log("Loading in the box message bundle failed.",e)}n=m(t)}return n}function y(e){if(!e)return c.localize;var t=i.extname(e);if(t&&(e=e.substr(0,e.length-t.length)),o.messageFormat===c.MessageFormat.both||o.messageFormat===c.MessageFormat.bundle){var n=function(e){for(var t,n=i.dirname(e);t=i.join(n,"nls.metadata.header.json"),!s.existsSync(t);){var r=i.dirname(n);if(r===n){t=void 0;break}n=r}return t}(e);if(n){var a=i.dirname(n),u=r[a];if(void 0===u)try{var l=JSON.parse(s.readFileSync(n,"utf8"));try{var d=g(l,a);u=p(a,d?{header:l,nlsBundle:d}:null)}catch(e){console.error("Failed to load nls bundle",e),u=p(a,null)}}catch(e){console.error("Failed to read header file",e),u=p(a,null)}if(u){var m=e.substr(a.length+1).replace(/\\/g,"/"),y=u.nlsBundle[m];return void 0===y?(console.error("Messages for file ".concat(e," not found. See console for details.")),function(){return"Messages not found."}):h(y)}}}if(o.messageFormat===c.MessageFormat.both||o.messageFormat===c.MessageFormat.file)try{var v=f(function(e){var t;if(o.cacheLanguageResolution&&t)t=t;else{if(c.isPseudo||!o.language)t=".nls.json";else for(var n=o.language;n;){var r=".nls."+n+".json";if(s.existsSync(e+r)){t=r;break}var i=n.lastIndexOf("-");i>0?n=n.substring(0,i):(t=".nls.json",n=null)}o.cacheLanguageResolution&&(t=t)}return e+t}(e));return Array.isArray(v)?h(v):(0,c.isDefined)(v.messages)&&(0,c.isDefined)(v.keys)?h(v.messages):(console.error("String bundle '".concat(e,"' uses an unsupported format.")),function(){return"File bundle has unsupported format. See console for details"})}catch(e){"ENOENT"!==e.code&&console.error("Failed to load single file bundle",e)}return console.error("Failed to load message bundle for file ".concat(e)),function(){return"Failed to load message bundle. See console for details."}}!function(){if(o={locale:void 0,language:void 0,languagePackSupport:!1,cacheLanguageResolution:!0,messageFormat:c.MessageFormat.bundle},d(process.env.VSCODE_NLS_CONFIG))try{var e=JSON.parse(process.env.VSCODE_NLS_CONFIG),t=void 0;if(e.availableLanguages){var n=e.availableLanguages["*"];d(n)&&(t=n)}if(d(e.locale)&&(o.locale=e.locale.toLowerCase()),void 0===t?o.language=o.locale:"en"!==t&&(o.language=t),function(e){return!0===e||!1===e}(e._languagePackSupport)&&(o.languagePackSupport=e._languagePackSupport),d(e._cacheRoot)&&(o.cacheRoot=e._cacheRoot),d(e._languagePackId)&&(o.languagePackId=e._languagePackId),d(e._translationsConfigFile)){o.translationsConfigFile=e._translationsConfigFile;try{o.translationsConfig=f(o.translationsConfigFile)}catch(t){if(e._corruptedFile){var a=i.dirname(e._corruptedFile);s.exists(a,(function(t){t&&s.writeFile(e._corruptedFile,"corrupted","utf8",(function(e){console.error(e)}))}))}}}}catch(e){}(0,c.setPseudo)("pseudo"===o.locale),r=Object.create(null)}(),t.LV=y,a.default.install(Object.freeze({loadMessageBundle:y,config:function(e){return e&&(d(e.locale)&&(o.locale=e.locale.toLowerCase(),o.language=o.locale,r=Object.create(null)),void 0!==e.messageFormat&&(o.messageFormat=e.messageFormat),e.bundleFormat===c.BundleFormat.standalone&&!0===o.languagePackSupport&&(o.languagePackSupport=!1)),(0,c.setPseudo)("pseudo"===o.locale),y}}))},7373:(e,t,n)=>{"use strict";var r;n.r(t),n.d(t,{URI:()=>o,Utils:()=>i}),r=(()=>{var e={470:e=>{function t(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}function n(e,t){for(var n,r="",o=0,i=-1,s=0,a=0;a<=e.length;++a){if(a<e.length)n=e.charCodeAt(a);else{if(47===n)break;n=47}if(47===n){if(i===a-1||1===s);else if(i!==a-1&&2===s){if(r.length<2||2!==o||46!==r.charCodeAt(r.length-1)||46!==r.charCodeAt(r.length-2))if(r.length>2){var c=r.lastIndexOf("/");if(c!==r.length-1){-1===c?(r="",o=0):o=(r=r.slice(0,c)).length-1-r.lastIndexOf("/"),i=a,s=0;continue}}else if(2===r.length||1===r.length){r="",o=0,i=a,s=0;continue}t&&(r.length>0?r+="/..":r="..",o=2)}else r.length>0?r+="/"+e.slice(i+1,a):r=e.slice(i+1,a),o=a-i-1;i=a,s=0}else 46===n&&-1!==s?++s:s=-1}return r}var r={resolve:function(){for(var e,r="",o=!1,i=arguments.length-1;i>=-1&&!o;i--){var s;i>=0?s=arguments[i]:(void 0===e&&(e=process.cwd()),s=e),t(s),0!==s.length&&(r=s+"/"+r,o=47===s.charCodeAt(0))}return r=n(r,!o),o?r.length>0?"/"+r:"/":r.length>0?r:"."},normalize:function(e){if(t(e),0===e.length)return".";var r=47===e.charCodeAt(0),o=47===e.charCodeAt(e.length-1);return 0!==(e=n(e,!r)).length||r||(e="."),e.length>0&&o&&(e+="/"),r?"/"+e:e},isAbsolute:function(e){return t(e),e.length>0&&47===e.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var e,n=0;n<arguments.length;++n){var o=arguments[n];t(o),o.length>0&&(void 0===e?e=o:e+="/"+o)}return void 0===e?".":r.normalize(e)},relative:function(e,n){if(t(e),t(n),e===n)return"";if((e=r.resolve(e))===(n=r.resolve(n)))return"";for(var o=1;o<e.length&&47===e.charCodeAt(o);++o);for(var i=e.length,s=i-o,a=1;a<n.length&&47===n.charCodeAt(a);++a);for(var c=n.length-a,u=s<c?s:c,l=-1,d=0;d<=u;++d){if(d===u){if(c>u){if(47===n.charCodeAt(a+d))return n.slice(a+d+1);if(0===d)return n.slice(a+d)}else s>u&&(47===e.charCodeAt(o+d)?l=d:0===d&&(l=0));break}var f=e.charCodeAt(o+d);if(f!==n.charCodeAt(a+d))break;47===f&&(l=d)}var h="";for(d=o+l+1;d<=i;++d)d!==i&&47!==e.charCodeAt(d)||(0===h.length?h+="..":h+="/..");return h.length>0?h+n.slice(a+l):(a+=l,47===n.charCodeAt(a)&&++a,n.slice(a))},_makeLong:function(e){return e},dirname:function(e){if(t(e),0===e.length)return".";for(var n=e.charCodeAt(0),r=47===n,o=-1,i=!0,s=e.length-1;s>=1;--s)if(47===(n=e.charCodeAt(s))){if(!i){o=s;break}}else i=!1;return-1===o?r?"/":".":r&&1===o?"//":e.slice(0,o)},basename:function(e,n){if(void 0!==n&&"string"!=typeof n)throw new TypeError('"ext" argument must be a string');t(e);var r,o=0,i=-1,s=!0;if(void 0!==n&&n.length>0&&n.length<=e.length){if(n.length===e.length&&n===e)return"";var a=n.length-1,c=-1;for(r=e.length-1;r>=0;--r){var u=e.charCodeAt(r);if(47===u){if(!s){o=r+1;break}}else-1===c&&(s=!1,c=r+1),a>=0&&(u===n.charCodeAt(a)?-1==--a&&(i=r):(a=-1,i=c))}return o===i?i=c:-1===i&&(i=e.length),e.slice(o,i)}for(r=e.length-1;r>=0;--r)if(47===e.charCodeAt(r)){if(!s){o=r+1;break}}else-1===i&&(s=!1,i=r+1);return-1===i?"":e.slice(o,i)},extname:function(e){t(e);for(var n=-1,r=0,o=-1,i=!0,s=0,a=e.length-1;a>=0;--a){var c=e.charCodeAt(a);if(47!==c)-1===o&&(i=!1,o=a+1),46===c?-1===n?n=a:1!==s&&(s=1):-1!==n&&(s=-1);else if(!i){r=a+1;break}}return-1===n||-1===o||0===s||1===s&&n===o-1&&n===r+1?"":e.slice(n,o)},format:function(e){if(null===e||"object"!=typeof e)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return function(e,t){var n=t.dir||t.root,r=t.base||(t.name||"")+(t.ext||"");return n?n===t.root?n+r:n+"/"+r:r}(0,e)},parse:function(e){t(e);var n={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return n;var r,o=e.charCodeAt(0),i=47===o;i?(n.root="/",r=1):r=0;for(var s=-1,a=0,c=-1,u=!0,l=e.length-1,d=0;l>=r;--l)if(47!==(o=e.charCodeAt(l)))-1===c&&(u=!1,c=l+1),46===o?-1===s?s=l:1!==d&&(d=1):-1!==s&&(d=-1);else if(!u){a=l+1;break}return-1===s||-1===c||0===d||1===d&&s===c-1&&s===a+1?-1!==c&&(n.base=n.name=0===a&&i?e.slice(1,c):e.slice(a,c)):(0===a&&i?(n.name=e.slice(1,s),n.base=e.slice(1,c)):(n.name=e.slice(a,s),n.base=e.slice(a,c)),n.ext=e.slice(s,c)),a>0?n.dir=e.slice(0,a-1):i&&(n.dir="/"),n},sep:"/",delimiter:":",win32:null,posix:null};r.posix=r,e.exports=r},447:(e,t,n)=>{var r;if(n.r(t),n.d(t,{URI:()=>m,Utils:()=>w}),"object"==typeof process)r="win32"===process.platform;else if("object"==typeof navigator){var o=navigator.userAgent;r=o.indexOf("Windows")>=0}var i,s,a=(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)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),c=/^\w[\w\d+.-]*$/,u=/^\//,l=/^\/\//;function d(e,t){if(!e.scheme&&t)throw new Error('[UriError]: Scheme is missing: {scheme: "", authority: "'.concat(e.authority,'", path: "').concat(e.path,'", query: "').concat(e.query,'", fragment: "').concat(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 ("//")')}var f="",h="/",p=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/,m=function(){function e(e,t,n,r,o,i){void 0===i&&(i=!1),"object"==typeof e?(this.scheme=e.scheme||f,this.authority=e.authority||f,this.path=e.path||f,this.query=e.query||f,this.fragment=e.fragment||f):(this.scheme=function(e,t){return e||t?e:"file"}(e,i),this.authority=t||f,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||f),this.query=r||f,this.fragment=o||f,d(this,i))}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&&"string"==typeof t.fsPath&&"function"==typeof t.with&&"function"==typeof t.toString},Object.defineProperty(e.prototype,"fsPath",{get:function(){return k(this,!1)},enumerable:!1,configurable:!0}),e.prototype.with=function(e){if(!e)return this;var t=e.scheme,n=e.authority,r=e.path,o=e.query,i=e.fragment;return void 0===t?t=this.scheme:null===t&&(t=f),void 0===n?n=this.authority:null===n&&(n=f),void 0===r?r=this.path:null===r&&(r=f),void 0===o?o=this.query:null===o&&(o=f),void 0===i?i=this.fragment:null===i&&(i=f),t===this.scheme&&n===this.authority&&r===this.path&&o===this.query&&i===this.fragment?this:new y(t,n,r,o,i)},e.parse=function(e,t){void 0===t&&(t=!1);var n=p.exec(e);return n?new y(n[2]||f,T(n[4]||f),T(n[5]||f),T(n[7]||f),T(n[9]||f),t):new y(f,f,f,f,f)},e.file=function(e){var t=f;if(r&&(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 y("file",t,e,f,f)},e.from=function(e){var t=new y(e.scheme,e.authority,e.path,e.query,e.fragment);return d(t,!0),t},e.prototype.toString=function(e){return void 0===e&&(e=!1),x(this,e)},e.prototype.toJSON=function(){return this},e.revive=function(t){if(t){if(t instanceof e)return t;var n=new y(t);return n._formatted=t.external,n._fsPath=t._sep===g?t.fsPath:null,n}return t},e}(),g=r?1:void 0,y=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._formatted=null,t._fsPath=null,t}return a(t,e),Object.defineProperty(t.prototype,"fsPath",{get:function(){return this._fsPath||(this._fsPath=k(this,!1)),this._fsPath},enumerable:!1,configurable:!0}),t.prototype.toString=function(e){return void 0===e&&(e=!1),e?x(this,!0):(this._formatted||(this._formatted=x(this,!1)),this._formatted)},t.prototype.toJSON=function(){var e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=g),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}(m),v=((s={})[58]="%3A",s[47]="%2F",s[63]="%3F",s[35]="%23",s[91]="%5B",s[93]="%5D",s[64]="%40",s[33]="%21",s[36]="%24",s[38]="%26",s[39]="%27",s[40]="%28",s[41]="%29",s[42]="%2A",s[43]="%2B",s[44]="%2C",s[59]="%3B",s[61]="%3D",s[32]="%20",s);function b(e,t){for(var n=void 0,r=-1,o=0;o<e.length;o++){var i=e.charCodeAt(o);if(i>=97&&i<=122||i>=65&&i<=90||i>=48&&i<=57||45===i||46===i||95===i||126===i||t&&47===i)-1!==r&&(n+=encodeURIComponent(e.substring(r,o)),r=-1),void 0!==n&&(n+=e.charAt(o));else{void 0===n&&(n=e.substr(0,o));var s=v[i];void 0!==s?(-1!==r&&(n+=encodeURIComponent(e.substring(r,o)),r=-1),n+=s):-1===r&&(r=o)}}return-1!==r&&(n+=encodeURIComponent(e.substring(r))),void 0!==n?n:e}function R(e){for(var t=void 0,n=0;n<e.length;n++){var r=e.charCodeAt(n);35===r||63===r?(void 0===t&&(t=e.substr(0,n)),t+=v[r]):void 0!==t&&(t+=e[n])}return void 0!==t?t:e}function k(e,t){var n;return n=e.authority&&e.path.length>1&&"file"===e.scheme?"//".concat(e.authority).concat(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,r&&(n=n.replace(/\//g,"\\")),n}function x(e,t){var n=t?R:b,r="",o=e.scheme,i=e.authority,s=e.path,a=e.query,c=e.fragment;if(o&&(r+=o,r+=":"),(i||"file"===o)&&(r+=h,r+=h),i){var u=i.indexOf("@");if(-1!==u){var l=i.substr(0,u);i=i.substr(u+1),-1===(u=l.indexOf(":"))?r+=n(l,!1):(r+=n(l.substr(0,u),!1),r+=":",r+=n(l.substr(u+1),!1)),r+="@"}-1===(u=(i=i.toLowerCase()).indexOf(":"))?r+=n(i,!1):(r+=n(i.substr(0,u),!1),r+=i.substr(u))}if(s){if(s.length>=3&&47===s.charCodeAt(0)&&58===s.charCodeAt(2))(d=s.charCodeAt(1))>=65&&d<=90&&(s="/".concat(String.fromCharCode(d+32),":").concat(s.substr(3)));else if(s.length>=2&&58===s.charCodeAt(1)){var d;(d=s.charCodeAt(0))>=65&&d<=90&&(s="".concat(String.fromCharCode(d+32),":").concat(s.substr(2)))}r+=n(s,!0)}return a&&(r+="?",r+=n(a,!1)),c&&(r+="#",r+=t?c:b(c,!1)),r}function C(e){try{return decodeURIComponent(e)}catch(t){return e.length>3?e.substr(0,3)+C(e.substr(3)):e}}var S=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function T(e){return e.match(S)?e.replace(S,(function(e){return C(e)})):e}var w,P=n(470),_=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))},D=P.posix||P;!function(e){e.joinPath=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return e.with({path:D.join.apply(D,_([e.path],t,!1))})},e.resolvePath=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=e.path||"/";return e.with({path:D.resolve.apply(D,_([r],t,!1))})},e.dirname=function(e){var t=D.dirname(e.path);return 1===t.length&&46===t.charCodeAt(0)?e:e.with({path:t})},e.basename=function(e){return D.basename(e.path)},e.extname=function(e){return D.extname(e.path)}}(w||(w={}))}},t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={exports:{}};return e[r](o,o.exports,n),o.exports}return n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},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(447)})();const{URI:o,Utils:i}=r},1785:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.startServer=void 0;const r=n(5809),o=n(7090),i=n(2585),s=n(8735),a=n(8571),c=n(7373);var u,l,d,f,h;!function(e){e.type=new r.NotificationType("json/schemaAssociations")}(u||(u={})),function(e){e.type=new r.RequestType("vscode/content")}(l||(l={})),function(e){e.type=new r.NotificationType("json/schemaContent")}(d||(d={})),function(e){e.type=new r.RequestType("json/validate")}(f||(f={})),function(e){e.type=new r.RequestType("json/languageStatus")}(h||(h={}));const p={resolveRelativePath:(e,t)=>{const n=t.substring(0,t.lastIndexOf("/")+1);return c.Utils.resolvePath(c.URI.parse(n),e).toString()}};function m(e){return s.Range.create(s.Position.create(0,0),e.positionAt(e.getText().length))}t.startServer=function(e,t){function n(n=["https","http","file"]){const r={};for(const e of n)"file"===e?r[e]=t.file:"http"!==e&&"https"!==e||(r[e]=t.http);return t=>{const n=t.substr(0,t.indexOf(":")),o=r[n];return o?o.getContent(t):e.sendRequest(l.type,t).then((e=>e),(e=>Promise.reject(e.message)))}}let c=(0,s.getLanguageService)({workspaceContext:p,contributions:[],clientCapabilities:s.ClientCapabilities.LATEST});const g=new r.TextDocuments(s.TextDocument);g.listen(e);let y,v,b,R=!1,k=!1,x=!1,C=Number.MAX_VALUE,S=Number.MAX_VALUE,T=Number.MAX_VALUE,w=Number.MAX_VALUE;e.onInitialize((o=>{const a=o.initializationOptions||{},u=a?.handledSchemaProtocols;function l(e,t){const n=e.split(".");let r=o.capabilities;for(let e=0;r&&e<n.length;e++){if(!r.hasOwnProperty(n[e]))return t;r=r[n[e]]}return r}c=(0,s.getLanguageService)({schemaRequestService:n(u),workspaceContext:p,contributions:[],clientCapabilities:o.capabilities}),R=l("textDocument.completion.completionItem.snippetSupport",!1),k=l("textDocument.rangeFormatting.dynamicRegistration",!1)&&"boolean"!=typeof a.provideFormatter,C=l("textDocument.foldingRange.rangeLimit",Number.MAX_VALUE),x=l("textDocument.documentSymbol.hierarchicalDocumentSymbolSupport",!1),w=a.customCapabilities?.rangeFormatting?.editLimit||Number.MAX_VALUE;const d=l("textDocument.diagnostic",void 0);return y=void 0===d?(0,i.registerDiagnosticsPushSupport)(g,e,t,O):(0,i.registerDiagnosticsPullSupport)(g,e,t,O),{capabilities:{textDocumentSync:r.TextDocumentSyncKind.Incremental,completionProvider:R?{resolveProvider:!1,triggerCharacters:['"',":"]}:void 0,hoverProvider:!0,documentSymbolProvider:!0,documentRangeFormattingProvider:!0===a.provideFormatter,documentFormattingProvider:!0===a.provideFormatter,colorProvider:{},foldingRangeProvider:!0,selectionRangeProvider:!0,documentLinkProvider:{},diagnosticProvider:{documentSelector:null,interFileDependencies:!1,workspaceDiagnostics:!1}}}}));let P=null,_=!0,D=!1;function E(){const e={validate:_,allowComments:!0,schemas:new Array};if(b)if(Array.isArray(b))Array.prototype.push.apply(e.schemas,b);else for(const t in b){const n=b[t];Array.isArray(n)&&n.forEach((n=>{e.schemas.push({uri:n,fileMatch:[t]})}))}v&&v.forEach(((t,n)=>{let r=t.url;!r&&t.schema&&(r=t.schema.id||`vscode://schemas/custom/${n}`),r&&e.schemas.push({uri:r,fileMatch:t.fileMatch,schema:t.schema})})),c.configure(e),y?.requestRefresh()}async function O(e){if(0===e.getText().length)return[];const t=N(e),n="jsonc"===e.languageId?{comments:"ignore",trailingCommas:"warning"}:{comments:"error",trailingCommas:"error"};return await c.doValidation(e,t,n)}e.onDidChangeConfiguration((n=>{const o=n.settings;if(t.configureHttpRequests?.(o?.http?.proxy,!!o.http?.proxyStrictSSL),v=o.json?.schemas,_=!!o.json?.validate?.enable,D=o.json?.keepLines?.enable||!1,E(),S=Math.trunc(Math.max(o.json?.resultLimit||C,0)),T=Math.trunc(Math.max(o.json?.resultLimit||Number.MAX_VALUE,0)),k){const t=o.json?.format?.enable;if(t){if(!P){const t=[{language:"json"},{language:"jsonc"}];P=[e.client.register(r.DocumentRangeFormattingRequest.type,{documentSelector:t}),e.client.register(r.DocumentFormattingRequest.type,{documentSelector:t})]}}else P&&(P.forEach((e=>e.then((e=>e.dispose())))),P=null)}})),e.onNotification(u.type,(e=>{b=e,E()})),e.onNotification(d.type,(e=>{let t=!1;if(Array.isArray(e))for(const n of e)c.resetSchema(n)&&(t=!0);else t=c.resetSchema(e);t&&y?.requestRefresh()})),e.onRequest(f.type,(async e=>{const t=g.get(e);return t?(E(),await O(t)):[]})),e.onRequest(h.type,(async e=>{const t=g.get(e);if(t){const e=N(t);return c.getLanguageStatus(t,e)}return{schemas:[]}})),e.onDidChangeWatchedFiles((e=>{let t=!1;e.changes.forEach((e=>{c.resetSchema(e.uri)&&(t=!0)})),t&&y?.requestRefresh()}));const q=(0,a.getLanguageModelCache)(10,60,(e=>c.parseJSONDocument(e)));function N(e){return q.get(e)}function A(e,t,n){n.keepLines=D;const o=g.get(e.uri);if(o){const e=c.format(o,t??m(o),n);if(e.length>w){const t=s.TextDocument.applyEdits(o,e);return[r.TextEdit.replace(m(o),t)]}return e}return[]}g.onDidClose((e=>{q.onDocumentRemoved(e.document)})),e.onShutdown((()=>{q.dispose()})),e.onCompletion(((e,n)=>(0,o.runSafeAsync)(t,(async()=>{const t=g.get(e.textDocument.uri);if(t){const n=N(t);return c.doComplete(t,e.position,n)}return null}),null,`Error while computing completions for ${e.textDocument.uri}`,n))),e.onHover(((e,n)=>(0,o.runSafeAsync)(t,(async()=>{const t=g.get(e.textDocument.uri);if(t){const n=N(t);return c.doHover(t,e.position,n)}return null}),null,`Error while computing hover for ${e.textDocument.uri}`,n))),e.onDocumentSymbol(((e,n)=>(0,o.runSafe)(t,(()=>{const t=g.get(e.textDocument.uri);if(t){const e=N(t);return x?c.findDocumentSymbols2(t,e,{resultLimit:T}):c.findDocumentSymbols(t,e,{resultLimit:T})}return[]}),[],`Error while computing document symbols for ${e.textDocument.uri}`,n))),e.onDocumentRangeFormatting(((e,n)=>(0,o.runSafe)(t,(()=>A(e.textDocument,e.range,e.options)),[],`Error while formatting range for ${e.textDocument.uri}`,n))),e.onDocumentFormatting(((e,n)=>(0,o.runSafe)(t,(()=>A(e.textDocument,void 0,e.options)),[],`Error while formatting ${e.textDocument.uri}`,n))),e.onDocumentColor(((e,n)=>(0,o.runSafeAsync)(t,(async()=>{const t=g.get(e.textDocument.uri);if(t){const e=N(t);return c.findDocumentColors(t,e,{resultLimit:T})}return[]}),[],`Error while computing document colors for ${e.textDocument.uri}`,n))),e.onColorPresentation(((e,n)=>(0,o.runSafe)(t,(()=>{const t=g.get(e.textDocument.uri);if(t){const n=N(t);return c.getColorPresentations(t,n,e.color,e.range)}return[]}),[],`Error while computing color presentations for ${e.textDocument.uri}`,n))),e.onFoldingRanges(((e,n)=>(0,o.runSafe)(t,(()=>{const t=g.get(e.textDocument.uri);return t?c.getFoldingRanges(t,{rangeLimit:S}):null}),null,`Error while computing folding ranges for ${e.textDocument.uri}`,n))),e.onSelectionRanges(((e,n)=>(0,o.runSafe)(t,(()=>{const t=g.get(e.textDocument.uri);if(t){const n=N(t);return c.getSelectionRanges(t,e.positions,n)}return[]}),[],`Error while computing selection ranges for ${e.textDocument.uri}`,n))),e.onDocumentLinks(((e,n)=>(0,o.runSafeAsync)(t,(async()=>{const t=g.get(e.textDocument.uri);if(t){const e=N(t);return c.findLinks(t,e)}return[]}),[],`Error while computing links for ${e.textDocument.uri}`,n))),e.listen()}},8571:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getLanguageModelCache=void 0,t.getLanguageModelCache=function(e,t,n){let r,o={},i=0;return t>0&&(r=setInterval((()=>{const e=Date.now()-1e3*t,n=Object.keys(o);for(const t of n)o[t].cTime<e&&(delete o[t],i--)}),1e3*t)),{get(t){const r=t.version,s=t.languageId,a=o[t.uri];if(a&&a.version===r&&a.languageId===s)return a.cTime=Date.now(),a.languageModel;const c=n(t);if(o[t.uri]={languageModel:c,version:r,languageId:s,cTime:Date.now()},a||i++,i===e){let e=Number.MAX_VALUE,t=null;for(const n in o){const r=o[n];r.cTime<e&&(t=n,e=r.cTime)}t&&(delete o[t],i--)}return c},onDocumentRemoved(e){const t=e.uri;o[t]&&(delete o[t],i--)},dispose(){void 0!==r&&(clearInterval(r),r=void 0,o={},i=0)}}}},7090:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.runSafe=t.runSafeAsync=t.formatError=void 0;const r=n(5809);function o(e,t){if(t instanceof Error){const n=t;return`${e}: ${n.message}\n${n.stack}`}return"string"==typeof t?`${e}: ${t}`:t?`${e}: ${t.toString()}`:e}function i(){return console.log("cancelled"),new r.ResponseError(r.LSPErrorCodes.RequestCancelled,"Request cancelled")}t.formatError=o,t.runSafeAsync=function(e,t,n,r,s){return new Promise((a=>{e.timer.setImmediate((()=>{if(!s.isCancellationRequested)return t().then((e=>{s.isCancellationRequested?a(i()):a(e)}),(e=>{console.error(o(r,e)),a(n)}));a(i())}))}))},t.runSafe=function(e,t,n,r,s){return new Promise((a=>{e.timer.setImmediate((()=>{if(s.isCancellationRequested)a(i());else try{const e=t();if(s.isCancellationRequested)return void a(i());a(e)}catch(e){console.error(o(r,e)),a(n)}}))}))}},2585:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.registerDiagnosticsPullSupport=t.registerDiagnosticsPushSupport=void 0;const r=n(5809),o=n(7090);t.registerDiagnosticsPushSupport=function(e,t,n,r){const i={},s=[];function a(e){const t=i[e.uri];t&&(t.dispose(),delete i[e.uri])}function c(e){a(e);const s=i[e.uri]=n.timer.setTimeout((async()=>{if(s===i[e.uri])try{const n=await r(e);s===i[e.uri]&&t.sendDiagnostics({uri:e.uri,diagnostics:n}),delete i[e.uri]}catch(n){t.console.error((0,o.formatError)(`Error while validating ${e.uri}`,n))}}),500)}return e.onDidChangeContent((e=>{c(e.document)}),void 0,s),e.onDidClose((e=>{a(e.document),t.sendDiagnostics({uri:e.document.uri,diagnostics:[]})}),void 0,s),{requestRefresh:()=>{e.all().forEach(c)},dispose:()=>{s.forEach((e=>e.dispose())),s.length=0;const e=Object.keys(i);for(const t of e)i[t].dispose(),delete i[t]}}},t.registerDiagnosticsPullSupport=function(e,t,n,i){function s(e){return{kind:r.DocumentDiagnosticReportKind.Full,items:e}}const a=t.languages.diagnostics.on((async(t,r)=>(0,o.runSafeAsync)(n,(async()=>{const n=e.get(t.textDocument.uri);return s(n?await i(n):[])}),s([]),`Error while computing diagnostics for ${t.textDocument.uri}`,r)));return{requestRefresh:function(){t.languages.diagnostics.refresh()},dispose:()=>{a.dispose()}}}},2357:e=>{"use strict";e.exports=require("assert")},3129:e=>{"use strict";e.exports=require("child_process")},6417:e=>{"use strict";e.exports=require("crypto")},8614:e=>{"use strict";e.exports=require("events")},5747:e=>{"use strict";e.exports=require("fs")},8605:e=>{"use strict";e.exports=require("http")},7211:e=>{"use strict";e.exports=require("https")},1631:e=>{"use strict";e.exports=require("net")},2087:e=>{"use strict";e.exports=require("os")},5622:e=>{"use strict";e.exports=require("path")},4016:e=>{"use strict";e.exports=require("tls")},8835:e=>{"use strict";e.exports=require("url")},1669:e=>{"use strict";e.exports=require("util")},8761:e=>{"use strict";e.exports=require("zlib")}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r].call(i.exports,i,i.exports,n),i.exports}n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},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})};var r={};(()=>{"use strict";var e=r;Object.defineProperty(e,"__esModule",{value:!0});const t=n(8212),o=n(7090),i=n(1785),s=n(2775),a=n(7373),c=n(5747),u=(0,t.createConnection)();console.log=u.console.log.bind(u.console),console.error=u.console.error.bind(u.console),process.on("unhandledRejection",(e=>{u.console.error((0,o.formatError)("Unhandled exception",e))}));const l={timer:{setImmediate(e,...t){const n=setImmediate(e,...t);return{dispose:()=>clearImmediate(n)}},setTimeout(e,t,...n){const r=setTimeout(e,t,...n);return{dispose:()=>clearTimeout(r)}}},file:{getContent:(e,t)=>new Promise(((n,r)=>{const o=a.URI.parse(e);c.readFile(o.fsPath,t,((e,t)=>{if(e)return r(e);n(t.toString())}))}))},http:{getContent:(e,t)=>(0,s.xhr)({url:e,followRedirects:5,headers:{"Accept-Encoding":"gzip, deflate"}}).then((e=>e.responseText),(e=>Promise.reject(e.responseText||(0,s.getErrorStatusDescription)(e.status)||e.toString())))},configureHttpRequests:s.configure};(0,i.startServer)(u,l)})();var o=exports;for(var i in r)o[i]=r[i];r.__esModule&&Object.defineProperty(o,"__esModule",{value:!0})})();
//# sourceMappingURL=https://ticino.blob.core.windows.net/sourcemaps/e4503b30fc78200f846c62cf8091b76ff5547662/extensions/json-language-features/server/dist/node/jsonServerMain.js.map