code-server
Version:
Run VS Code on a remote server.
26 lines (18 loc) • 147 kB
JavaScript
"use strict";/*!--------------------------------------------------------
* Copyright (C) Microsoft Corporation. All rights reserved.
*--------------------------------------------------------*/var H1=function(e,t){return H1=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},H1(e,t)};export function __extends(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");H1(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}export var __assign=function(){return __assign=Object.assign||function(t){for(var r,n=1,i=arguments.length;n<i;n++){r=arguments[n];for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(t[s]=r[s])}return t},__assign.apply(this,arguments)};export function __rest(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r}export function __decorate(e,t,r,n){var i=arguments.length,s=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(i<3?o(s):i>3?o(t,r,s):o(t,r))||s);return i>3&&s&&Object.defineProperty(t,r,s),s}export function __param(e,t){return function(r,n){t(r,n,e)}}export function __esDecorate(e,t,r,n,i,s){function o(D){if(D!==void 0&&typeof D!="function")throw new TypeError("Function expected");return D}for(var a=n.kind,u=a==="getter"?"get":a==="setter"?"set":"value",l=!t&&e?n.static?e:e.prototype:null,h=t||(l?Object.getOwnPropertyDescriptor(l,n.name):{}),c,d=!1,w=r.length-1;w>=0;w--){var A={};for(var S in n)A[S]=S==="access"?{}:n[S];for(var S in n.access)A.access[S]=n.access[S];A.addInitializer=function(D){if(d)throw new TypeError("Cannot add initializers after decoration has completed");s.push(o(D||null))};var P=(0,r[w])(a==="accessor"?{get:h.get,set:h.set}:h[u],A);if(a==="accessor"){if(P===void 0)continue;if(P===null||typeof P!="object")throw new TypeError("Object expected");(c=o(P.get))&&(h.get=c),(c=o(P.set))&&(h.set=c),(c=o(P.init))&&i.unshift(c)}else(c=o(P))&&(a==="field"?i.unshift(c):h[u]=c)}l&&Object.defineProperty(l,n.name,h),d=!0}export function __runInitializers(e,t,r){for(var n=arguments.length>2,i=0;i<t.length;i++)r=n?t[i].call(e,r):t[i].call(e);return n?r:void 0}export function __propKey(e){return typeof e=="symbol"?e:"".concat(e)}export function __setFunctionName(e,t,r){return typeof t=="symbol"&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(e,"name",{configurable:!0,value:r?"".concat(r," ",t):t})}export function __metadata(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}export function __awaiter(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(h){try{l(n.next(h))}catch(c){o(c)}}function u(h){try{l(n.throw(h))}catch(c){o(c)}}function l(h){h.done?s(h.value):i(h.value).then(a,u)}l((n=n.apply(e,t||[])).next())})}export function __generator(e,t){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,o;return o={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(l){return function(h){return u([l,h])}}function u(l){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,l[0]&&(r=0)),r;)try{if(n=1,i&&(s=l[0]&2?i.return:l[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,l[1])).done)return s;switch(i=0,s&&(l=[l[0]&2,s.value]),l[0]){case 0:case 1:s=l;break;case 4:return r.label++,{value:l[1],done:!1};case 5:r.label++,i=l[1],l=[0];continue;case 7:l=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(l[0]===6||l[0]===2)){r=0;continue}if(l[0]===3&&(!s||l[1]>s[0]&&l[1]<s[3])){r.label=l[1];break}if(l[0]===6&&r.label<s[1]){r.label=s[1],s=l;break}if(s&&r.label<s[2]){r.label=s[2],r.ops.push(l);break}s[2]&&r.ops.pop(),r.trys.pop();continue}l=t.call(e,r)}catch(h){l=[6,h],i=0}finally{n=s=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}export var __createBinding=Object.create?function(e,t,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]};export function __exportStar(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&__createBinding(t,e,r)}export function __values(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}export function __read(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s}export function __spread(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(__read(arguments[t]));return e}export function __spreadArrays(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;for(var n=Array(e),i=0,t=0;t<r;t++)for(var s=arguments[t],o=0,a=s.length;o<a;o++,i++)n[i]=s[o];return n}export function __spreadArray(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,s;n<i;n++)(s||!(n in t))&&(s||(s=Array.prototype.slice.call(t,0,n)),s[n]=t[n]);return e.concat(s||Array.prototype.slice.call(t))}export function __await(e){return this instanceof __await?(this.v=e,this):new __await(e)}export function __asyncGenerator(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=r.apply(e,t||[]),i,s=[];return i={},a("next"),a("throw"),a("return",o),i[Symbol.asyncIterator]=function(){return this},i;function o(w){return function(A){return Promise.resolve(A).then(w,c)}}function a(w,A){n[w]&&(i[w]=function(S){return new Promise(function(P,D){s.push([w,S,P,D])>1||u(w,S)})},A&&(i[w]=A(i[w])))}function u(w,A){try{l(n[w](A))}catch(S){d(s[0][3],S)}}function l(w){w.value instanceof __await?Promise.resolve(w.value.v).then(h,c):d(s[0][2],w)}function h(w){u("next",w)}function c(w){u("throw",w)}function d(w,A){w(A),s.shift(),s.length&&u(s[0][0],s[0][1])}}export function __asyncDelegator(e){var t,r;return t={},n("next"),n("throw",function(i){throw i}),n("return"),t[Symbol.iterator]=function(){return this},t;function n(i,s){t[i]=e[i]?function(o){return(r=!r)?{value:__await(e[i](o)),done:!1}:s?s(o):o}:s}}export function __asyncValues(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],r;return t?t.call(e):(e=typeof __values=="function"?__values(e):e[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(s){r[s]=e[s]&&function(o){return new Promise(function(a,u){o=e[s](o),i(a,u,o.done,o.value)})}}function i(s,o,a,u){Promise.resolve(u).then(function(l){s({value:l,done:a})},o)}}export function __makeTemplateObject(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var _t=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};export function __importStar(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&__createBinding(t,e,r);return _t(t,e),t}export function __importDefault(e){return e&&e.__esModule?e:{default:e}}export function __classPrivateFieldGet(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)}export function __classPrivateFieldSet(e,t,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(e,r):i?i.value=r:t.set(e,r),r}export function __classPrivateFieldIn(e,t){if(t===null||typeof t!="object"&&typeof t!="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof e=="function"?t===e:e.has(t)}export function __addDisposableResource(e,t,r){if(t!=null){if(typeof t!="object"&&typeof t!="function")throw new TypeError("Object expected.");var n,i;if(r){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");n=t[Symbol.asyncDispose]}if(n===void 0){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");n=t[Symbol.dispose],r&&(i=n)}if(typeof n!="function")throw new TypeError("Object not disposable.");i&&(n=function(){try{i.call(this)}catch(s){return Promise.reject(s)}}),e.stack.push({value:t,dispose:n,async:r})}else r&&e.stack.push({async:!0});return t}var xt=typeof SuppressedError=="function"?SuppressedError:function(e,t,r){var n=new Error(r);return n.name="SuppressedError",n.error=e,n.suppressed=t,n};export function __disposeResources(e){function t(n){e.error=e.hasError?new xt(n,e.error,"An error was suppressed during disposal."):n,e.hasError=!0}function r(){for(;e.stack.length;){var n=e.stack.pop();try{var i=n.dispose&&n.dispose.call(n.value);if(n.async)return Promise.resolve(i).then(r,function(s){return t(s),r()})}catch(s){t(s)}}if(e.hasError)throw e.error}return r()}export default{__extends,__assign,__rest,__decorate,__param,__metadata,__awaiter,__generator,__createBinding,__exportStar,__values,__read,__spread,__spreadArrays,__spreadArray,__await,__asyncGenerator,__asyncDelegator,__asyncValues,__makeTemplateObject,__importStar,__importDefault,__classPrivateFieldGet,__classPrivateFieldSet,__classPrivateFieldIn,__addDisposableResource,__disposeResources};var St=class{constructor(){this.b=[],this.a=function(e){setTimeout(()=>{throw e.stack?B1.isErrorNoTelemetry(e)?new B1(e.message+`
`+e.stack):new Error(e.message+`
`+e.stack):e},0)}}addListener(e){return this.b.push(e),()=>{this.d(e)}}c(e){this.b.forEach(t=>{t(e)})}d(e){this.b.splice(this.b.indexOf(e),1)}setUnexpectedErrorHandler(e){this.a=e}getUnexpectedErrorHandler(){return this.a}onUnexpectedError(e){this.a(e),this.c(e)}onUnexpectedExternalError(e){this.a(e)}},Pt=new St;function _1(e){Ot(e)||Pt.onUnexpectedError(e)}function J1(e){if(e instanceof Error){const{name:t,message:r,cause:n}=e,i=e.stacktrace||e.stack;return{$isError:!0,name:t,message:r,stack:i,noTelemetry:B1.isErrorNoTelemetry(e),cause:n?J1(n):void 0,code:e.code}}return e}var K1="Canceled";function Ot(e){return e instanceof kt?!0:e instanceof Error&&e.name===K1&&e.message===K1}var kt=class extends Error{constructor(){super(K1),this.name=this.message}},B1=class fe extends Error{constructor(t){super(t),this.name="CodeExpectedError"}static fromError(t){if(t instanceof fe)return t;const r=new fe;return r.message=t.message,r.stack=t.stack,r}static isErrorNoTelemetry(t){return t.name==="CodeExpectedError"}};function ge(){return globalThis._VSCODE_NLS_LANGUAGE}var D2=ge()==="pseudo"||typeof document<"u"&&document.location&&typeof document.location.hash=="string"&&document.location.hash.indexOf("pseudo=true")>=0,h1="en",x1=!1,S1=!1,b1=!1,Rt=!1,be=!1,Z1=!1,Tt=!1,Mt=!1,jt=!1,It=!1,P1=void 0,O1=h1,pe=h1,Ut=void 0,Q=void 0,G=globalThis,V=void 0;typeof G.vscode<"u"&&typeof G.vscode.process<"u"?V=G.vscode.process:typeof process<"u"&&typeof process?.versions?.node=="string"&&(V=process);var we=typeof V?.versions?.electron=="string",Dt=we&&V?.type==="renderer";if(typeof V=="object"){x1=V.platform==="win32",S1=V.platform==="darwin",b1=V.platform==="linux",Rt=b1&&!!V.env.SNAP&&!!V.env.SNAP_REVISION,Tt=we,jt=!!V.env.CI||!!V.env.BUILD_ARTIFACTSTAGINGDIRECTORY,P1=h1,O1=h1;const e=V.env.VSCODE_NLS_CONFIG;if(e)try{const t=JSON.parse(e);P1=t.userLocale,pe=t.osLocale,O1=t.resolvedLanguage||h1,Ut=t.languagePack?.translationsConfigFile}catch{}be=!0}else typeof navigator=="object"&&!Dt?(Q=navigator.userAgent,x1=Q.indexOf("Windows")>=0,S1=Q.indexOf("Macintosh")>=0,Mt=(Q.indexOf("Macintosh")>=0||Q.indexOf("iPad")>=0||Q.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,b1=Q.indexOf("Linux")>=0,It=Q?.indexOf("Mobi")>=0,Z1=!0,O1=ge()||h1,P1=navigator.language.toLowerCase(),pe=P1):console.error("Unable to resolve platform.");var ye;(function(e){e[e.Web=0]="Web",e[e.Mac=1]="Mac",e[e.Linux=2]="Linux",e[e.Windows=3]="Windows"})(ye||(ye={}));var Q1=0;S1?Q1=1:x1?Q1=3:b1&&(Q1=2);var f1=x1,qt=S1,zt=b1,Wt=be,G1=Z1,Ft=Z1&&typeof G.importScripts=="function",Vt=Ft?G.origin:void 0,B=Q,n1=O1,Ce;(function(e){function t(){return n1}e.value=t;function r(){return n1.length===2?n1==="en":n1.length>=3?n1[0]==="e"&&n1[1]==="n"&&n1[2]==="-":!1}e.isDefaultVariant=r;function n(){return n1==="en"}e.isDefault=n})(Ce||(Ce={}));var Ht=typeof G.postMessage=="function"&&!G.importScripts,Jt=(()=>{if(Ht){const e=[];G.addEventListener("message",r=>{if(r.data&&r.data.vscodeScheduleAsyncWork)for(let n=0,i=e.length;n<i;n++){const s=e[n];if(s.id===r.data.vscodeScheduleAsyncWork){e.splice(n,1),s.callback();return}}});let t=0;return r=>{const n=++t;e.push({id:n,callback:r}),G.postMessage({vscodeScheduleAsyncWork:n},"*")}}return e=>setTimeout(e)})(),Le;(function(e){e[e.Windows=1]="Windows",e[e.Macintosh=2]="Macintosh",e[e.Linux=3]="Linux"})(Le||(Le={}));var Kt=!!(B&&B.indexOf("Chrome")>=0),q2=!!(B&&B.indexOf("Firefox")>=0),z2=!!(!Kt&&B&&B.indexOf("Safari")>=0),W2=!!(B&&B.indexOf("Edg/")>=0),F2=!!(B&&B.indexOf("Android")>=0),Ae;function Bt(e,t){const r=Object.create(null);for(const n of e){const i=t(n);let s=r[i];s||(s=r[i]=[]),s.push(n)}return r}var V2=class{static{Ae=Symbol.toStringTag}constructor(e,t){this.b=t,this.a=new Map,this[Ae]="SetWithKey";for(const r of e)this.add(r)}get size(){return this.a.size}add(e){const t=this.b(e);return this.a.set(t,e),this}delete(e){return this.a.delete(this.b(e))}has(e){return this.a.has(this.b(e))}*entries(){for(const e of this.a.values())yield[e,e]}keys(){return this.values()}*values(){for(const e of this.a.values())yield e}clear(){this.a.clear()}forEach(e,t){this.a.forEach(r=>e.call(t,r,r,this))}[Symbol.iterator](){return this.values()}};function Zt(e,t){const r=this;let n=!1,i;return function(){if(n)return i;if(n=!0,t)try{i=e.apply(r,arguments)}finally{t()}else i=e.apply(r,arguments);return i}}function Qt(e,t,r=0,n=e.length){let i=r,s=n;for(;i<s;){const o=Math.floor((i+s)/2);t(e[o])?i=o+1:s=o}return i-1}var H2=class vt{static{this.assertInvariants=!1}constructor(t){this.e=t,this.c=0}findLastMonotonous(t){if(vt.assertInvariants){if(this.d){for(const n of this.e)if(this.d(n)&&!t(n))throw new Error("MonotonousArray: current predicate must be weaker than (or equal to) the previous predicate.")}this.d=t}const r=Qt(this.e,t,this.c);return this.c=r+1,r===-1?void 0:this.e[r]}},X1;(function(e){function t(s){return s<0}e.isLessThan=t;function r(s){return s<=0}e.isLessThanOrEqual=r;function n(s){return s>0}e.isGreaterThan=n;function i(s){return s===0}e.isNeitherLessOrGreaterThan=i,e.greaterThan=1,e.lessThan=-1,e.neitherLessOrGreaterThan=0})(X1||(X1={}));function Gt(e,t){return(r,n)=>t(e(r),e(n))}var Xt=(e,t)=>e-t,J2=class q1{static{this.empty=new q1(t=>{})}constructor(t){this.iterate=t}forEach(t){this.iterate(r=>(t(r),!0))}toArray(){const t=[];return this.iterate(r=>(t.push(r),!0)),t}filter(t){return new q1(r=>this.iterate(n=>t(n)?r(n):!0))}map(t){return new q1(r=>this.iterate(n=>r(t(n))))}some(t){let r=!1;return this.iterate(n=>(r=t(n),!r)),r}findFirst(t){let r;return this.iterate(n=>t(n)?(r=n,!1):!0),r}findLast(t){let r;return this.iterate(n=>(t(n)&&(r=n),!0)),r}findLastMaxBy(t){let r,n=!0;return this.iterate(i=>((n||X1.isGreaterThan(t(i,r)))&&(n=!1,r=i),!0)),r}},Ne,Ee,$e,Yt=class{constructor(e,t){this.uri=e,this.value=t}};function er(e){return Array.isArray(e)}var _e=class y1{static{this.c=t=>t.toString()}constructor(t,r){if(this[Ne]="ResourceMap",t instanceof y1)this.d=new Map(t.d),this.e=r??y1.c;else if(er(t)){this.d=new Map,this.e=r??y1.c;for(const[n,i]of t)this.set(n,i)}else this.d=new Map,this.e=t??y1.c}set(t,r){return this.d.set(this.e(t),new Yt(t,r)),this}get(t){return this.d.get(this.e(t))?.value}has(t){return this.d.has(this.e(t))}get size(){return this.d.size}clear(){this.d.clear()}delete(t){return this.d.delete(this.e(t))}forEach(t,r){typeof r<"u"&&(t=t.bind(r));for(const[n,i]of this.d)t(i.value,i.uri,this)}*values(){for(const t of this.d.values())yield t.value}*keys(){for(const t of this.d.values())yield t.uri}*entries(){for(const t of this.d.values())yield[t.uri,t.value]}*[(Ne=Symbol.toStringTag,Symbol.iterator)](){for(const[,t]of this.d)yield[t.uri,t.value]}},K2=class{constructor(e,t){this[Ee]="ResourceSet",!e||typeof e=="function"?this.c=new _e(e):(this.c=new _e(t),e.forEach(this.add,this))}get size(){return this.c.size}add(e){return this.c.set(e,e),this}clear(){this.c.clear()}delete(e){return this.c.delete(e)}forEach(e,t){this.c.forEach((r,n)=>e.call(t,n,n,this))}has(e){return this.c.has(e)}entries(){return this.c.entries()}keys(){return this.c.keys()}values(){return this.c.keys()}[(Ee=Symbol.toStringTag,Symbol.iterator)](){return this.keys()}},xe;(function(e){e[e.None=0]="None",e[e.AsOld=1]="AsOld",e[e.AsNew=2]="AsNew"})(xe||(xe={}));var B2=class{constructor(){this[$e]="LinkedMap",this.c=new Map,this.d=void 0,this.e=void 0,this.f=0,this.g=0}clear(){this.c.clear(),this.d=void 0,this.e=void 0,this.f=0,this.g++}isEmpty(){return!this.d&&!this.e}get size(){return this.f}get first(){return this.d?.value}get last(){return this.e?.value}has(e){return this.c.has(e)}get(e,t=0){const r=this.c.get(e);if(r)return t!==0&&this.n(r,t),r.value}set(e,t,r=0){let n=this.c.get(e);if(n)n.value=t,r!==0&&this.n(n,r);else{switch(n={key:e,value:t,next:void 0,previous:void 0},r){case 0:this.l(n);break;case 1:this.k(n);break;case 2:this.l(n);break;default:this.l(n);break}this.c.set(e,n),this.f++}return this}delete(e){return!!this.remove(e)}remove(e){const t=this.c.get(e);if(t)return this.c.delete(e),this.m(t),this.f--,t.value}shift(){if(!this.d&&!this.e)return;if(!this.d||!this.e)throw new Error("Invalid list");const e=this.d;return this.c.delete(e.key),this.m(e),this.f--,e.value}forEach(e,t){const r=this.g;let n=this.d;for(;n;){if(t?e.bind(t)(n.value,n.key,this):e(n.value,n.key,this),this.g!==r)throw new Error("LinkedMap got modified during iteration.");n=n.next}}keys(){const e=this,t=this.g;let r=this.d;const n={[Symbol.iterator](){return n},next(){if(e.g!==t)throw new Error("LinkedMap got modified during iteration.");if(r){const i={value:r.key,done:!1};return r=r.next,i}else return{value:void 0,done:!0}}};return n}values(){const e=this,t=this.g;let r=this.d;const n={[Symbol.iterator](){return n},next(){if(e.g!==t)throw new Error("LinkedMap got modified during iteration.");if(r){const i={value:r.value,done:!1};return r=r.next,i}else return{value:void 0,done:!0}}};return n}entries(){const e=this,t=this.g;let r=this.d;const n={[Symbol.iterator](){return n},next(){if(e.g!==t)throw new Error("LinkedMap got modified during iteration.");if(r){const i={value:[r.key,r.value],done:!1};return r=r.next,i}else return{value:void 0,done:!0}}};return n}[($e=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}h(e){if(e>=this.size)return;if(e===0){this.clear();return}let t=this.d,r=this.size;for(;t&&r>e;)this.c.delete(t.key),t=t.next,r--;this.d=t,this.f=r,t&&(t.previous=void 0),this.g++}j(e){if(e>=this.size)return;if(e===0){this.clear();return}let t=this.e,r=this.size;for(;t&&r>e;)this.c.delete(t.key),t=t.previous,r--;this.e=t,this.f=r,t&&(t.next=void 0),this.g++}k(e){if(!this.d&&!this.e)this.e=e;else if(this.d)e.next=this.d,this.d.previous=e;else throw new Error("Invalid list");this.d=e,this.g++}l(e){if(!this.d&&!this.e)this.d=e;else if(this.e)e.previous=this.e,this.e.next=e;else throw new Error("Invalid list");this.e=e,this.g++}m(e){if(e===this.d&&e===this.e)this.d=void 0,this.e=void 0;else if(e===this.d){if(!e.next)throw new Error("Invalid list");e.next.previous=void 0,this.d=e.next}else if(e===this.e){if(!e.previous)throw new Error("Invalid list");e.previous.next=void 0,this.e=e.previous}else{const t=e.next,r=e.previous;if(!t||!r)throw new Error("Invalid list");t.previous=r,r.next=t}e.next=void 0,e.previous=void 0,this.g++}n(e,t){if(!this.d||!this.e)throw new Error("Invalid list");if(!(t!==1&&t!==2)){if(t===1){if(e===this.d)return;const r=e.next,n=e.previous;e===this.e?(n.next=void 0,this.e=n):(r.previous=n,n.next=r),e.previous=void 0,e.next=this.d,this.d.previous=e,this.d=e,this.g++}else if(t===2){if(e===this.e)return;const r=e.next,n=e.previous;e===this.d?(r.previous=void 0,this.d=r):(r.previous=n,n.next=r),e.next=void 0,e.previous=this.e,this.e.next=e,this.e=e,this.g++}}}toJSON(){const e=[];return this.forEach((t,r)=>{e.push([r,t])}),e}fromJSON(e){this.clear();for(const[t,r]of e)this.set(t,r)}},tr=class{constructor(){this.c=new Map}add(e,t){let r=this.c.get(e);r||(r=new Set,this.c.set(e,r)),r.add(t)}delete(e,t){const r=this.c.get(e);r&&(r.delete(t),r.size===0&&this.c.delete(e))}forEach(e,t){const r=this.c.get(e);r&&r.forEach(t)}get(e){const t=this.c.get(e);return t||new Set}};function rr(e){return!!e&&typeof e[Symbol.iterator]=="function"}var k1;(function(e){function t(p){return p&&typeof p=="object"&&typeof p[Symbol.iterator]=="function"}e.is=t;const r=Object.freeze([]);function n(){return r}e.empty=n;function*i(p){yield p}e.single=i;function s(p){return t(p)?p:i(p)}e.wrap=s;function o(p){return p||r}e.from=o;function*a(p){for(let L=p.length-1;L>=0;L--)yield p[L]}e.reverse=a;function u(p){return!p||p[Symbol.iterator]().next().done===!0}e.isEmpty=u;function l(p){return p[Symbol.iterator]().next().value}e.first=l;function h(p,L){let _=0;for(const z of p)if(L(z,_++))return!0;return!1}e.some=h;function c(p,L){for(const _ of p)if(L(_))return _}e.find=c;function*d(p,L){for(const _ of p)L(_)&&(yield _)}e.filter=d;function*w(p,L){let _=0;for(const z of p)yield L(z,_++)}e.map=w;function*A(p,L){let _=0;for(const z of p)yield*L(z,_++)}e.flatMap=A;function*S(...p){for(const L of p)rr(L)?yield*L:yield L}e.concat=S;function P(p,L,_){let z=_;for(const u1 of p)z=L(z,u1);return z}e.reduce=P;function D(p){let L=0;for(const _ of p)L++;return L}e.length=D;function*r1(p,L,_=p.length){for(L<-p.length&&(L=0),L<0&&(L+=p.length),_<0?_+=p.length:_>p.length&&(_=p.length);L<_;L++)yield p[L]}e.slice=r1;function j(p,L=Number.POSITIVE_INFINITY){const _=[];if(L===0)return[_,p];const z=p[Symbol.iterator]();for(let u1=0;u1<L;u1++){const N1=z.next();if(N1.done)return[_,e.empty()];_.push(N1.value)}return[_,{[Symbol.iterator](){return z}}]}e.consume=j;async function V1(p){const L=[];for await(const _ of p)L.push(_);return Promise.resolve(L)}e.asyncToArray=V1})(k1||(k1={}));var nr=!1,d1=null,Z2=class gt{constructor(){this.b=new Map}static{this.a=0}c(t){let r=this.b.get(t);return r||(r={parent:null,source:null,isSingleton:!1,value:t,idx:gt.a++},this.b.set(t,r)),r}trackDisposable(t){const r=this.c(t);r.source||(r.source=new Error().stack)}setParent(t,r){const n=this.c(t);n.parent=r}markAsDisposed(t){this.b.delete(t)}markAsSingleton(t){this.c(t).isSingleton=!0}f(t,r){const n=r.get(t);if(n)return n;const i=t.parent?this.f(this.c(t.parent),r):t;return r.set(t,i),i}getTrackedDisposables(){const t=new Map;return[...this.b.entries()].filter(([,n])=>n.source!==null&&!this.f(n,t).isSingleton).flatMap(([n])=>n)}computeLeakingDisposables(t=10,r){let n;if(r)n=r;else{const u=new Map,l=[...this.b.values()].filter(c=>c.source!==null&&!this.f(c,u).isSingleton);if(l.length===0)return;const h=new Set(l.map(c=>c.value));if(n=l.filter(c=>!(c.parent&&h.has(c.parent))),n.length===0)throw new Error("There are cyclic diposable chains!")}if(!n)return;function i(u){function l(c,d){for(;c.length>0&&d.some(w=>typeof w=="string"?w===c[0]:c[0].match(w));)c.shift()}const h=u.source.split(`
`).map(c=>c.trim().replace("at ","")).filter(c=>c!=="");return l(h,["Error",/^trackDisposable \(.*\)$/,/^DisposableTracker.trackDisposable \(.*\)$/]),h.reverse()}const s=new tr;for(const u of n){const l=i(u);for(let h=0;h<=l.length;h++)s.add(l.slice(0,h).join(`
`),u)}n.sort(Gt(u=>u.idx,Xt));let o="",a=0;for(const u of n.slice(0,t)){a++;const l=i(u),h=[];for(let c=0;c<l.length;c++){let d=l[c];d=`(shared with ${s.get(l.slice(0,c+1).join(`
`)).size}/${n.length} leaks) at ${d}`;const A=s.get(l.slice(0,c).join(`
`)),S=Bt([...A].map(P=>i(P)[c]),P=>P);delete S[l[c]];for(const[P,D]of Object.entries(S))h.unshift(` - stacktraces of ${D.length} other leaks continue with ${P}`);h.unshift(d)}o+=`
==================== Leaking disposable ${a}/${n.length}: ${u.value.constructor.name} ====================
${h.join(`
`)}
============================================================
`}return n.length>t&&(o+=`
... and ${n.length-t} more leaking disposables
`),{leaks:n,details:o}}};function ir(e){d1=e}if(nr){const e="__is_disposable_tracked__";ir(new class{trackDisposable(t){const r=new Error("Potentially leaked disposable").stack;setTimeout(()=>{t[e]||console.log(r)},3e3)}setParent(t,r){if(t&&t!==p1.None)try{t[e]=!0}catch{}}markAsDisposed(t){if(t&&t!==p1.None)try{t[e]=!0}catch{}}markAsSingleton(t){}})}function Y1(e){return d1?.trackDisposable(e),e}function ee(e){d1?.markAsDisposed(e)}function te(e,t){d1?.setParent(e,t)}function sr(e,t){if(d1)for(const r of e)d1.setParent(r,t)}function Se(e){if(k1.is(e)){const t=[];for(const r of e)if(r)try{r.dispose()}catch(n){t.push(n)}if(t.length===1)throw t[0];if(t.length>1)throw new AggregateError(t,"Encountered errors while disposing of store");return Array.isArray(e)?[]:e}else if(e)return e.dispose(),e}function or(...e){const t=Pe(()=>Se(e));return sr(e,t),t}function Pe(e){const t=Y1({dispose:Zt(()=>{ee(t),e()})});return t}var re=class bt{static{this.DISABLE_DISPOSED_WARNING=!1}constructor(){this.f=new Set,this.g=!1,Y1(this)}dispose(){this.g||(ee(this),this.g=!0,this.clear())}get isDisposed(){return this.g}clear(){if(this.f.size!==0)try{Se(this.f)}finally{this.f.clear()}}add(t){if(!t)return t;if(t===this)throw new Error("Cannot register a disposable on itself!");return te(t,this),this.g?bt.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this.f.add(t),t}delete(t){if(t){if(t===this)throw new Error("Cannot dispose a disposable on itself!");this.f.delete(t),t.dispose()}}deleteAndLeak(t){t&&this.f.has(t)&&(this.f.delete(t),te(t,null))}},p1=class{static{this.None=Object.freeze({dispose(){}})}constructor(){this.q=new re,Y1(this),te(this.q,this)}dispose(){ee(this),this.q.dispose()}B(e){if(e===this)throw new Error("Cannot register a disposable on itself!");return this.q.add(e)}},O=class z1{static{this.Undefined=new z1(void 0)}constructor(t){this.element=t,this.next=z1.Undefined,this.prev=z1.Undefined}},ar=class{constructor(){this.a=O.Undefined,this.b=O.Undefined,this.c=0}get size(){return this.c}isEmpty(){return this.a===O.Undefined}clear(){let e=this.a;for(;e!==O.Undefined;){const t=e.next;e.prev=O.Undefined,e.next=O.Undefined,e=t}this.a=O.Undefined,this.b=O.Undefined,this.c=0}unshift(e){return this.d(e,!1)}push(e){return this.d(e,!0)}d(e,t){const r=new O(e);if(this.a===O.Undefined)this.a=r,this.b=r;else if(t){const i=this.b;this.b=r,r.prev=i,i.next=r}else{const i=this.a;this.a=r,r.next=i,i.prev=r}this.c+=1;let n=!1;return()=>{n||(n=!0,this.e(r))}}shift(){if(this.a!==O.Undefined){const e=this.a.element;return this.e(this.a),e}}pop(){if(this.b!==O.Undefined){const e=this.b.element;return this.e(this.b),e}}e(e){if(e.prev!==O.Undefined&&e.next!==O.Undefined){const t=e.prev;t.next=e.next,e.next.prev=t}else e.prev===O.Undefined&&e.next===O.Undefined?(this.a=O.Undefined,this.b=O.Undefined):e.next===O.Undefined?(this.b=this.b.prev,this.b.next=O.Undefined):e.prev===O.Undefined&&(this.a=this.a.next,this.a.prev=O.Undefined);this.c-=1}*[Symbol.iterator](){let e=this.a;for(;e!==O.Undefined;)yield e.element,e=e.next}},lr=globalThis.performance&&typeof globalThis.performance.now=="function",Oe=class pt{static create(t){return new pt(t)}constructor(t){this.c=lr&&t===!1?Date.now:globalThis.performance.now.bind(globalThis.performance),this.a=this.c(),this.b=-1}stop(){this.b=this.c()}reset(){this.a=this.c(),this.b=-1}elapsed(){return this.b!==-1?this.b-this.a:this.c()-this.a}},ke=!1,ur=!1,R1;(function(e){e.None=()=>p1.None;function t(g){if(ur){const{onDidAddListener:f}=g,v=ne.create();let m=0;g.onDidAddListener=()=>{++m===2&&(console.warn("snapshotted emitter LIKELY used public and SHOULD HAVE BEEN created with DisposableStore. snapshotted here"),v.print()),f?.()}}}function r(g,f){return w(g,()=>{},0,void 0,!0,void 0,f)}e.defer=r;function n(g){return(f,v=null,m)=>{let b=!1,C;return C=g(E=>{if(!b)return C?C.dispose():b=!0,f.call(v,E)},null,m),b&&C.dispose(),C}}e.once=n;function i(g,f){return e.once(e.filter(g,f))}e.onceIf=i;function s(g,f,v){return c((m,b=null,C)=>g(E=>m.call(b,f(E)),null,C),v)}e.map=s;function o(g,f,v){return c((m,b=null,C)=>g(E=>{f(E),m.call(b,E)},null,C),v)}e.forEach=o;function a(g,f,v){return c((m,b=null,C)=>g(E=>f(E)&&m.call(b,E),null,C),v)}e.filter=a;function u(g){return g}e.signal=u;function l(...g){return(f,v=null,m)=>{const b=or(...g.map(C=>C(E=>f.call(v,E))));return d(b,m)}}e.any=l;function h(g,f,v,m){let b=v;return s(g,C=>(b=f(b,C),b),m)}e.reduce=h;function c(g,f){let v;const m={onWillAddFirstListener(){v=g(b.fire,b)},onDidRemoveLastListener(){v?.dispose()}};f||t(m);const b=new Z(m);return f?.add(b),b.event}function d(g,f){return f instanceof Array?f.push(g):f&&f.add(g),g}function w(g,f,v=100,m=!1,b=!1,C,E){let I,q,c1,E1=0,g1;const ve={leakWarningThreshold:C,onWillAddFirstListener(){I=g(Et=>{E1++,q=f(q,Et),m&&!c1&&($1.fire(q),q=void 0),g1=()=>{const $t=q;q=void 0,c1=void 0,(!m||E1>1)&&$1.fire($t),E1=0},typeof v=="number"?(clearTimeout(c1),c1=setTimeout(g1,v)):c1===void 0&&(c1=0,queueMicrotask(g1))})},onWillRemoveListener(){b&&E1>0&&g1?.()},onDidRemoveLastListener(){g1=void 0,I.dispose()}};E||t(ve);const $1=new Z(ve);return E?.add($1),$1.event}e.debounce=w;function A(g,f=0,v){return e.debounce(g,(m,b)=>m?(m.push(b),m):[b],f,void 0,!0,void 0,v)}e.accumulate=A;function S(g,f=(m,b)=>m===b,v){let m=!0,b;return a(g,C=>{const E=m||!f(C,b);return m=!1,b=C,E},v)}e.latch=S;function P(g,f,v){return[e.filter(g,f,v),e.filter(g,m=>!f(m),v)]}e.split=P;function D(g,f=!1,v=[],m){let b=v.slice(),C=g(q=>{b?b.push(q):I.fire(q)});m&&m.add(C);const E=()=>{b?.forEach(q=>I.fire(q)),b=null},I=new Z({onWillAddFirstListener(){C||(C=g(q=>I.fire(q)),m&&m.add(C))},onDidAddFirstListener(){b&&(f?setTimeout(E):E())},onDidRemoveLastListener(){C&&C.dispose(),C=null}});return m&&m.add(I),I.event}e.buffer=D;function r1(g,f){return(m,b,C)=>{const E=f(new V1);return g(function(I){const q=E.evaluate(I);q!==j&&m.call(b,q)},void 0,C)}}e.chain=r1;const j=Symbol("HaltChainable");class V1{constructor(){this.f=[]}map(f){return this.f.push(f),this}forEach(f){return this.f.push(v=>(f(v),v)),this}filter(f){return this.f.push(v=>f(v)?v:j),this}reduce(f,v){let m=v;return this.f.push(b=>(m=f(m,b),m)),this}latch(f=(v,m)=>v===m){let v=!0,m;return this.f.push(b=>{const C=v||!f(b,m);return v=!1,m=b,C?b:j}),this}evaluate(f){for(const v of this.f)if(f=v(f),f===j)break;return f}}function p(g,f,v=m=>m){const m=(...I)=>E.fire(v(...I)),b=()=>g.on(f,m),C=()=>g.removeListener(f,m),E=new Z({onWillAddFirstListener:b,onDidRemoveLastListener:C});return E.event}e.fromNodeEventEmitter=p;function L(g,f,v=m=>m){const m=(...I)=>E.fire(v(...I)),b=()=>g.addEventListener(f,m),C=()=>g.removeEventListener(f,m),E=new Z({onWillAddFirstListener:b,onDidRemoveLastListener:C});return E.event}e.fromDOMEventEmitter=L;function _(g,f){return new Promise(v=>n(g)(v,null,f))}e.toPromise=_;function z(g){const f=new Z;return g.then(v=>{f.fire(v)},()=>{f.fire(void 0)}).finally(()=>{f.dispose()}),f.event}e.fromPromise=z;function u1(g,f){return g(v=>f.fire(v))}e.forward=u1;function N1(g,f,v){return f(v),g(m=>f(m))}e.runAndSubscribe=N1;class Lt{constructor(f,v){this._observable=f,this.f=0,this.g=!1;const m={onWillAddFirstListener:()=>{f.addObserver(this),this._observable.reportChanges()},onDidRemoveLastListener:()=>{f.removeObserver(this)}};v||t(m),this.emitter=new Z(m),v&&v.add(this.emitter)}beginUpdate(f){this.f++}handlePossibleChange(f){}handleChange(f,v){this.g=!0}endUpdate(f){this.f--,this.f===0&&(this._observable.reportChanges(),this.g&&(this.g=!1,this.emitter.fire(this._observable.get())))}}function At(g,f){return new Lt(g,f).emitter.event}e.fromObservable=At;function Nt(g){return(f,v,m)=>{let b=0,C=!1;const E={beginUpdate(){b++},endUpdate(){b--,b===0&&(g.reportChanges(),C&&(C=!1,f.call(v)))},handlePossibleChange(){},handleChange(){C=!0}};g.addObserver(E),g.reportChanges();const I={dispose(){g.removeObserver(E)}};return m instanceof re?m.add(I):Array.isArray(m)&&m.push(I),I}}e.fromObservableLight=Nt})(R1||(R1={}));var cr=class de{static{this.all=new Set}static{this.f=0}constructor(t){this.listenerCount=0,this.invocationCount=0,this.elapsedOverall=0,this.durations=[],this.name=`${t}_${de.f++}`,de.all.add(this)}start(t){this.g=new Oe,this.listenerCount=t}stop(){if(this.g){const t=this.g.elapsed();this.durations.push(t),this.elapsedOverall+=t,this.invocationCount+=1,this.g=void 0}}},Re=-1,hr=class wt{static{this.f=1}constructor(t,r,n=(wt.f++).toString(16).padStart(3,"0")){this.j=t,this.threshold=r,this.name=n,this.h=0}dispose(){this.g?.clear()}check(t,r){const n=this.threshold;if(n<=0||r<n)return;this.g||(this.g=new Map);const i=this.g.get(t.value)||0;if(this.g.set(t.value,i+1),this.h-=1,this.h<=0){this.h=n*.5;const[s,o]=this.getMostFrequentStack(),a=`[${this.name}] potential listener LEAK detected, having ${r} listeners already. MOST frequent listener (${o}):`;console.warn(a),console.warn(s);const u=new fr(a,s);this.j(u)}return()=>{const s=this.g.get(t.value)||0;this.g.set(t.value,s-1)}}getMostFrequentStack(){if(!this.g)return;let t,r=0;for(const[n,i]of this.g)(!t||r<i)&&(t=[n,i],r=i);return t}},ne=class yt{static create(){const t=new Error;return new yt(t.stack??"")}constructor(t){this.value=t}print(){console.warn(this.value.split(`
`).slice(2).join(`
`))}},fr=class extends Error{constructor(e,t){super(e),this.name="ListenerLeakError",this.stack=t}},dr=class extends Error{constructor(e,t){super(e),this.name="ListenerRefusalError",this.stack=t}},mr=0,T1=class{constructor(e){this.value=e,this.id=mr++}},vr=2,gr=(e,t)=>{if(e instanceof T1)t(e);else for(let r=0;r<e.length;r++){const n=e[r];n&&t(n)}},Z=class{constructor(e){this.z=0,this.f=e,this.g=Re>0||this.f?.leakWarningThreshold?new hr(e?.onListenerError??_1,this.f?.leakWarningThreshold??Re):void 0,this.j=this.f?._profName?new cr(this.f._profName):void 0,this.w=this.f?.deliveryQueue}dispose(){if(!this.m){if(this.m=!0,this.w?.current===this&&this.w.reset(),this.u){if(ke){const e=this.u;queueMicrotask(()=>{gr(e,t=>t.stack?.print())})}this.u=void 0,this.z=0}this.f?.onDidRemoveLastListener?.(),this.g?.dispose()}}get event(){return this.q??=(e,t,r)=>{if(this.g&&this.z>this.g.threshold**2){const a=`[${this.g.name}] REFUSES to accept new listeners because it exceeded its threshold by far (${this.z} vs ${this.g.threshold})`;console.warn(a);const u=this.g.getMostFrequentStack()??["UNKNOWN stack",-1],l=new dr(`${a}. HINT: Stack shows most frequent listener (${u[1]}-times)`,u[0]);return(this.f?.onListenerError||_1)(l),p1.None}if(this.m)return p1.None;t&&(e=e.bind(t));const n=new T1(e);let i,s;this.g&&this.z>=Math.ceil(this.g.threshold*.2)&&(n.stack=ne.create(),i=this.g.check(n.stack,this.z+1)),ke&&(n.stack=s??ne.create()),this.u?this.u instanceof T1?(this.w??=new br,this.u=[this.u,n]):this.u.push(n):(this.f?.onWillAddFirstListener?.(this),this.u=n,this.f?.onDidAddFirstListener?.(this)),this.f?.onDidAddListener?.(this),this.z++;const o=Pe(()=>{i?.(),this.A(n)});return r instanceof re?r.add(o):Array.isArray(r)&&r.push(o),o},this.q}A(e){if(this.f?.onWillRemoveListener?.(this),!this.u)return;if(this.z===1){this.u=void 0,this.f?.onDidRemoveLastListener?.(this),this.z=0;return}const t=this.u,r=t.indexOf(e);if(r===-1)throw console.log("disposed?",this.m),console.log("size?",this.z),console.log("arr?",JSON.stringify(this.u)),new Error("Attempted to dispose unknown listener");this.z--,t[r]=void 0;const n=this.w.current===this;if(this.z*vr<=t.length){let i=0;for(let s=0;s<t.length;s++)t[s]?t[i++]=t[s]:n&&i<this.w.end&&(this.w.end--,i<this.w.i&&this.w.i--);t.length=i}}B(e,t){if(!e)return;const r=this.f?.onListenerError||_1;if(!r){e.value(t);return}try{e.value(t)}catch(n){r(n)}}C(e){const t=e.current.u;for(;e.i<e.end;)this.B(t[e.i++],e.value);e.reset()}fire(e){if(this.w?.current&&(this.C(this.w),this.j?.stop()),this.j?.start(this.z),this.u)if(this.u instanceof T1)this.B(this.u,e);else{const t=this.w;t.enqueue(this,e,this.u.length),this.C(t)}this.j?.stop()}hasListeners(){return this.z>0}},br=class{constructor(){this.i=-1,this.end=0}enqueue(e,t,r){this.i=0,this.end=r,this.current=e,this.value=t}reset(){this.i=this.end,this.current=void 0,this.value=void 0}},Te=Object.freeze(function(e,t){const r=setTimeout(e.bind(t),0);return{dispose(){clearTimeout(r)}}}),Me;(function(e){function t(r){return r===e.None||r===e.Cancelled||r instanceof pr?!0:!r||typeof r!="object"?!1:typeof r.isCancellationRequested=="boolean"&&typeof r.onCancellationRequested=="function"}e.isCancellationToken=t,e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:R1.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:Te})})(Me||(Me={}));var pr=class{constructor(){this.a=!1,this.b=null}cancel(){this.a||(this.a=!0,this.b&&(this.b.fire(void 0),this.dispose()))}get isCancellationRequested(){return this.a}get onCancellationRequested(){return this.a?Te:(this.b||(this.b=new Z),this.b.event)}dispose(){this.b&&(this.b.dispose(),this.b=null)}};function wr(e){return e}var yr=class{constructor(e,t){this.a=void 0,this.b=void 0,typeof e=="function"?(this.c=e,this.d=wr):(this.c=t,this.d=e.getCacheKey)}get(e){const t=this.d(e);return this.b!==t&&(this.b=t,this.a=this.c(e)),this.a}},je=class{constructor(e){this.d=e,this.a=!1}get hasValue(){return this.a}get value(){if(!this.a)try{this.b=this.d()}catch(e){this.c=e}finally{this.a=!0}if(this.c)throw this.c;return this.b}get rawValue(){return this.b}};function Cr(e){return e.split(/\r\n|\r|\n/)}function Lr(e,t){return e<t?-1:e>t?1:0}function Ar(e,t,r=0,n=e.length,i=0,s=t.length){for(;r<n&&i<s;r++,i++){const u=e.charCodeAt(r),l=t.charCodeAt(i);if(u<l)return-1;if(u>l)return 1}const o=n-r,a=s-i;return o<a?-1:o>a?1:0}function Ie(e,t,r=0,n=e.length,i=0,s=t.length){for(;r<n&&i<s;r++,i++){let u=e.charCodeAt(r),l=t.charCodeAt(i);if(u===l)continue;if(u>=128||l>=128)return Ar(e.toLowerCase(),t.toLowerCase(),r,n,i,s);Ue(u)&&(u-=32),Ue(l)&&(l-=32);const h=u-l;if(h!==0)return h}const o=n-r,a=s-i;return o<a?-1:o>a?1:0}function Ue(e){return e>=97&&e<=122}function De(e){return e>=65&&e<=90}function Nr(e,t){return e.length===t.length&&Ie(e,t)===0}function Er(e,t){const r=t.length;return t.length>e.length?!1:Ie(e,t,0,r)===0}var $r=/(?:\x1b\[|\x9b)[=?>!]?[\d;:]*["$#'* ]?[a-zA-Z@^`{}|~]/,_r=/(?:\x1b\]|\x9d).*?(?:\x1b\\|\x07|\x9c)/,xr=/\x1b(?:[ #%\(\)\*\+\-\.\/]?[a-zA-Z0-9\|}~@])/,Q2=new RegExp("(?:"+[$r.source,_r.source,xr.source].join("|")+")","g"),G2="\uFEFF",qe;(function(e){e[e.Other=0]="Other",e[e.Prepend=1]="Prepend",e[e.CR=2]="CR",e[e.LF=3]="LF",e[e.Control=4]="Control",e[e.Extend=5]="Extend",e[e.Regional_Indicator=6]="Regional_Indicator",e[e.SpacingMark=7]="SpacingMark",e[e.L=8]="L",e[e.V=9]="V",e[e.T=10]="T",e[e.LV=11]="LV",e[e.LVT=12]="LVT",e[e.ZWJ=13]="ZWJ",e[e.Extended_Pictographic=14]="Extended_Pictographic"})(qe||(qe={}));var X2=class C1{static{this.c=null}static getInstance(){return C1.c||(C1.c=new C1),C1.c}constructor(){this.d=Sr()}getGraphemeBreakType(t){if(t<32)return t===10?3:t===13?2:4;if(t<127)return 0;const r=this.d,n=r.length/3;let i=1;for(;i<=n;)if(t<r[3*i])i=2*i;else if(t>r[3*i+1])i=2*i+1;else return r[3*i+2];return 0}};function Sr(){return JSON.parse("[0,0,0,51229,51255,12,44061,44087,12,127462,127487,6,7083,7085,5,47645,47671,12,54813,54839,12,128678,128678,14,3270,3270,5,9919,9923,14,45853,45879,12,49437,49463,12,53021,53047,12,71216,71218,7,128398,128399,14,129360,129374,14,2519,2519,5,4448,4519,9,9742,9742,14,12336,12336,14,44957,44983,12,46749,46775,12,48541,48567,12,50333,50359,12,52125,52151,12,53917,53943,12,69888,69890,5,73018,73018,5,127990,127990,14,128558,128559,14,128759,128760,14,129653,129655,14,2027,2035,5,2891,2892,7,3761,3761,5,6683,6683,5,8293,8293,4,9825,9826,14,9999,9999,14,43452,43453,5,44509,44535,12,45405,45431,12,46301,46327,12,47197,47223,12,48093,48119,12,48989,49015,12,49885,49911,12,50781,50807,12,51677,51703,12,52573,52599,12,53469,53495,12,54365,54391,12,65279,65279,4,70471,70472,7,72145,72147,7,119173,119179,5,127799,127818,14,128240,128244,14,128512,128512,14,128652,128652,14,128721,128722,14,129292,129292,14,129445,129450,14,129734,129743,14,1476,1477,5,2366,2368,7,2750,2752,7,3076,3076,5,3415,3415,5,4141,4144,5,6109,6109,5,6964,6964,5,7394,7400,5,9197,9198,14,9770,9770,14,9877,9877,14,9968,9969,14,10084,10084,14,43052,43052,5,43713,43713,5,44285,44311,12,44733,44759,12,45181,45207,12,45629,45655,12,46077,46103,12,46525,46551,12,46973,46999,12,47421,47447,12,47869,47895,12,48317,48343,12,48765,48791,12,49213,49239,12,49661,49687,12,50109,50135,12,50557,50583,12,51005,51031,12,51453,51479,12,51901,51927,12,52349,52375,12,52797,52823,12,53245,53271,12,53693,53719,12,54141,54167,12,54589,54615,12,55037,55063,12,69506,69509,5,70191,70193,5,70841,70841,7,71463,71467,5,72330,72342,5,94031,94031,5,123628,123631,5,127763,127765,14,127941,127941,14,128043,128062,14,128302,128317,14,128465,128467,14,128539,128539,14,128640,128640,14,128662,128662,14,128703,128703,14,128745,128745,14,129004,129007,14,129329,129330,14,129402,129402,14,129483,129483,14,129686,129704,14,130048,131069,14,173,173,4,1757,1757,1,2200,2207,5,2434,2435,7,2631,2632,5,2817,2817,5,3008,3008,5,3201,3201,5,3387,3388,5,3542,3542,5,3902,3903,7,4190,4192,5,6002,6003,5,6439,6440,5,6765,6770,7,7019,7027,5,7154,7155,7,8205,8205,13,8505,8505,14,9654,9654,14,9757,9757,14,9792,9792,14,9852,9853,14,9890,9894,14,9937,9937,14,9981,9981,14,10035,10036,14,11035,11036,14,42654,42655,5,43346,43347,7,43587,43587,5,44006,44007,7,44173,44199,12,44397,44423,12,44621,44647,12,44845,44871,12,45069,45095,12,45293,45319,12,45517,45543,12,45741,45767,12,45965,45991,12,46189,46215,12,46413,46439,12,46637,46663,12,46861,46887,12,47085,47111,12,47309,47335,12,47533,47559,12,47757,47783,12,47981,48007,12,48205,48231,12,48429,48455,12,48653,48679,12,48877,48903,12,49101,49127,12,49325,49351,12,49549,49575,12,49773,49799,12,49997,50023,12,50221,50247,12,50445,50471,12,50669,50695,12,50893,50919,12,51117,51143,12,51341,51367,12,51565,51591,12,51789,51815,12,52013,52039,12,52237,52263,12,52461,52487,12,52685,52711,12,52909,52935,12,53133,53159,12,53357,53383,12,53581,53607,12,53805,53831,12,54029,54055,12,54253,54279,12,54477,54503,12,54701,54727,12,54925,54951,12,55149,55175,12,68101,68102,5,69762,69762,7,70067,70069,7,70371,70378,5,70720,70721,7,71087,71087,5,71341,71341,5,71995,71996,5,72249,72249,7,72850,72871,5,73109,73109,5,118576,118598,5,121505,121519,5,127245,127247,14,127568,127569,14,127777,127777,14,127872,127891,14,127956,127967,14,128015,128016,14,128110,128172,14,128259,128259,14,128367,128368,14,128424,128424,14,128488,128488,14,128530,128532,14,128550,128551,14,128566,128566,14,128647,128647,14,128656,128656,14,128667,128673,14,128691,128693,14,128715,128715,14,128728,128732,14,128752,128752,14,128765,128767,14,129096,129103,14,129311,129311,14,129344,129349,14,129394,129394,14,129413,129425,14,129466,129471,14,129511,129535,14,129664,129666,14,129719,129722,14,129760,129767,14,917536,917631,5,13,13,2,1160,1161,5,1564,1564,4,1807,1807,1,2085,2087,5,2307,2307,7,2382,2383,7,2497,2500,5,2563,2563,7,2677,2677,5,2763,2764,7,2879,2879,5,2914,2915,5,3021,3021,5,3142,3144,5,3263,3263,5,3285,3286,5,3398,3400,7,3530,3530,5,3633,3633,5,3864,3865,5,3974,3975,5,4155,4156,7,4229,4230,5,5909,5909,7,6078,6085,7,6277,6278,5,6451,6456,7,6744,6750,5,6846,6846,5,6972,6972,5,7074,7077,5,7146,7148,7,7222,7223,5,7416,7417,5,8234,8238,4,8417,8417,5,9000,9000,14,9203,9203,14,9730,9731,14,9748,9749,14,9762,9763,14,9776,9783,14,9800,9811,14,9831,9831,14,9872,9873,14,9882,9882,14,9900,9903,14,9929,9933,14,9941,9960,14,9974,9974,14,9989,9989,14,10006,10006,14,10062,10062,14,10160,10160,14,11647,11647,5,12953,12953,14,43019,43019,5,43232,43249,5,43443,43443,5,43567,43568,7,43696,43696,5,43765,43765,7,44013,44013,5,44117,44143,12,44229,44255,12,44341,44367,12,44453,44479,12,44565,44591,12,44677,44703,12,44789,44815,12,44901,44927,12,45013,45039,12,45125,45151,12,45237,45263,12,45349,45375,12,45461,45487,12,45573,45599,12,45685,45711,12,45797,45823,12,45909,45935,12,46021,46047,12,46133,46159,12,46245,46271,12,46357,46383,12,46469,46495,12,46581,46607,12,46693,46719,12,46805,46831,12,46917,46943,12,47029,47055,12,47141,47167,12,47253,47279,12,47365,47391,12,47477,47503,12,47589,47615,12,47701,47727,12,47813,47839,12,47925,47951,12,48037,48063,12,48149,48175,12,48261,48287,12,48373,48399,12,48485,48511,12,48597,48623,12,48709,48735,12,48821,48847,12,48933,48959,12,49045,49071,12,49157,49183,12,49269,49295,12,49381,49407,12,49493,49519,12,49605,49631,12,49717,49743,12,49829,49855,12,49941,49967,12,50053,50079,12,50165,50191,12,50277,50303,12,50389,50415,12,50501,50527,12,50613,50639,12,50725,50751,12,50837,50863,12,50949,50975,12,51061,51087,12,51173,51199,12,51285,51311,12,51397,51423,12,51509,51535,12,51621,51647,12,51733,51759,12,51845,51871,12,51957,51983,12,52069,52095,12,52181,52207,12,52293,52319,12,52405,52431,12,52517,52543,12,52629,52655,12,52741,52767,12,52853,52879,12,52965,52991,12,53077,53103,12,53189,53215,12,53301,53327,12,53413,53439,12,53525,53551,12,53637,53663,12,53749,53775,12,53861,53887,12,53973,53999,12,54085,54111,12,54197,54223,12,54309,54335,12,54421,54447,12,54533,54559,12,54645,54671,12,54757,54783,12,54869,54895,12,54981,55007,12,55093,55119,12,55243,55291,10,66045,66045,5,68325,68326,5,69688,69702,5,69817,69818,5,69957,69958,7,70089,70092,5,70198,70199,5,70462,70462,5,70502,70508,5,70750,70750,5,70846,70846,7,71100,71101,5,71230,71230,7,71351,71351,5,71737,71738,5,72000,72000,7,72160,72160,5,72273,72278,5,72752,72758,5,72882,72883,5,73031,73031,5,73461,73462,7,94192,94193,7,119149,119149,7,121403,121452,5,122915,122916,5,126980,126980,14,127358,127359,14,127535,127535,14,127759,127759,14,127771,127771,14,127792,127793,14,127825,127867,14,127897,127899,14,127945,127945,14,127985,127986,14,128000,128007,14,128021,128021,14,128066,128100,14,128184,128235,14,128249,128252,14,128266,128276,14,128335,128335,14,128379,128390,14,128407,128419,14,128444,128444,14,128481,128481,14,128499,128499,14,128526,128526,14,128536,128536,14,128543,128543,14,128556,128556,14,128564,128564,14,128577,128580,14,128643,128645,14,128649,128649,14,128654,128654,14,128660,128660,14,128664,128664,14,128675,128675,14,128686,128689,14,128695,128696,14,128705,128709,14,128717,128719,14,128725,128725,14,128736,128741,14,128747,128748,14,128755,128755,14,128762,128762,14,128981,128991,14,129009,129023,14,129160,129167,14,129296,129304,14,129320,129327,14,129340,129342,14,129356,129356,14,129388,129392,14,129399,129400,14,129404,129407,14,129432,129442,14,129454,129455,14,129473,129474,14,129485,129487,14,129648,129651,14,129659,129660,14,129671,129679,14,129709,129711,14,129728,129730,14,129751,129753,14,129776,129782,14,917505,917505,4,917760,917999,5,10,10,3,127,159,4,768,879,5,1471,1471,5,1536,1541,1,1648,1648,5,1767,1768,5,1840,1866,5,2070,2073,5,2137,2139,5,2274,2274,1,2363,2363,7,2377,2380,7,2402,2403,5,2494,2494,5,2507,2508,7,2558,2558,5,2622,2624,7,2641,2641,5,2691,2691,7,2759,2760,5,2786,2787,5,2876,2876,5,2881,2884,5,2901,2902,5,3006,3006,5,3014,3016,7,3072,3072,5,3134,3136,5,3157,3158,5,3260,3260,5,3266,3266,5,3274,3275,7,3328,3329,5,3391,3392,7,3405,3405,5,3457,3457,5,3536,3537,7,3551,3551,5,3636,3642,5,3764,3772,5,3895,3895,5,3967,3967,7,3993,4028,5,4146,4151,5,4182,4183,7,4226,4226,5,4253,4253,5,4957,4959,5,5940,5940,7,6070,6070,7,6087,6088,7,6158,6158,4,6432,6434,5,6448,6449,7,6679,6680,5,6742,6742,5,6754,6754,5,6783,6783,5,6912,6915,5,6966,6970,5,6978,6978,5,7042,7042,7,7080,7081,5,7143,7143,7,7150,7150,7,7212,7219,5,7380,7392,5,7412,7412,5,8203,8203,4,8232,8232,4,8265,8265,14,8400,8412,5,8421,8432,5,8617,8618,14,9167,9167,14,9200,9200,14,9410,9410,14,9723,9726,14,9733,9733,14,9745,9745,14,9752,9752,14,9760,9760,14,9766,9766,14,9774,9774,14,9786,9786,14,9794,9794,14,9823,9823,14,9828,9828,14,9833,9850,14,9855,9855,14,9875,9875,14,9880,9880,14,9885,9887,14,9896,9897,14,9906,9916,14,9926,9927,14,9935,9935,14,9939,9939,14,9962,9962,14,9972,9972,14,9978,9978,14,9986,9986,14,9997,9997,14,10002,10002,14,10017,10017,14,10055,10055,14,10071,10071,14,10133,10135,14,10548,10549,14,11093,11093,14,12330,12333,5,12441,12442,5,42608,42610,5,43010,43010,5,43045,43046,5,43188,43203,7,43302,43309,5,43392,43394,5,43446,43449,5,43493,43493,5,43571,43572,7,43597,43597,7,43703,43704,5,43756,43757,5,44003,44004,7,44009,440