UNPKG

@coder/code-server-pr

Version:

Run VS Code on a remote server.

9 lines (8 loc) • 126 kB
/*!-------------------------------------------------------- * Copyright (C) Microsoft Corporation. All rights reserved. *--------------------------------------------------------*/(function(){var Y=["require","exports","vs/base/common/platform","vs/base/common/functional","vs/base/common/process","vs/base/common/path","vs/base/common/extpath","fs","vs/base/common/errors","vs/base/common/iterator","vs/base/common/lazy","vs/base/common/lifecycle","vs/base/common/linkedList","vs/base/common/stopwatch","vs/base/common/event","vs/base/common/cancellation","vs/base/common/cache","vs/base/common/strings","vs/base/common/types","vs/base/node/terminalEncoding","child_process","vs/nls!vs/platform/environment/node/argv","vs/platform/environment/node/argv","vs/platform/environment/node/stdin","os","vs/platform/environment/node/wait","vs/nls","vs/nls!vs/server/node/server.cli","minimist","vs/server/node/server.cli","url","http"],X=function(Q){for(var e=[],g=0,A=Q.length;g<A;g++)e[g]=Y[Q[g]];return e};define(Y[8],X([0,1]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createErrorWithActions=e.isErrorWithActions=e.ExpectedError=e.NotSupportedError=e.NotImplementedError=e.getErrorMessage=e.disposed=e.readonly=e.illegalState=e.illegalArgument=e.canceled=e.CancellationError=e.isCancellationError=e.transformErrorForSerialization=e.onUnexpectedExternalError=e.onUnexpectedError=e.setUnexpectedErrorHandler=e.errorHandler=e.ErrorHandler=void 0;class g{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(s){setTimeout(()=>{throw s.stack?new Error(s.message+` `+s.stack):s},0)}}addListener(s){return this.listeners.push(s),()=>{this._removeListener(s)}}emit(s){this.listeners.forEach(a=>{a(s)})}_removeListener(s){this.listeners.splice(this.listeners.indexOf(s),1)}setUnexpectedErrorHandler(s){this.unexpectedErrorHandler=s}getUnexpectedErrorHandler(){return this.unexpectedErrorHandler}onUnexpectedError(s){this.unexpectedErrorHandler(s),this.emit(s)}onUnexpectedExternalError(s){this.unexpectedErrorHandler(s)}}e.ErrorHandler=g,e.errorHandler=new g;function A(n){e.errorHandler.setUnexpectedErrorHandler(n)}e.setUnexpectedErrorHandler=A;function m(n){L(n)||e.errorHandler.onUnexpectedError(n)}e.onUnexpectedError=m;function y(n){L(n)||e.errorHandler.onUnexpectedExternalError(n)}e.onUnexpectedExternalError=y;function D(n){if(n instanceof Error){let{name:s,message:a}=n;const c=n.stacktrace||n.stack;return{$isError:!0,name:s,message:a,stack:c}}return n}e.transformErrorForSerialization=D;const _="Canceled";function L(n){return n instanceof E?!0:n instanceof Error&&n.name===_&&n.message===_}e.isCancellationError=L;class E extends Error{constructor(){super(_);this.name=this.message}}e.CancellationError=E;function T(){const n=new Error(_);return n.name=n.message,n}e.canceled=T;function j(n){return n?new Error(`Illegal argument: ${n}`):new Error("Illegal argument")}e.illegalArgument=j;function k(n){return n?new Error(`Illegal state: ${n}`):new Error("Illegal state")}e.illegalState=k;function R(n){return n?new Error(`readonly property '${n} cannot be changed'`):new Error("readonly property cannot be changed")}e.readonly=R;function C(n){const s=new Error(`${n} has been disposed`);return s.name="DISPOSED",s}e.disposed=C;function O(n){return n?n.message?n.message:n.stack?n.stack.split(` `)[0]:String(n):"Error"}e.getErrorMessage=O;class F extends Error{constructor(s){super("NotImplemented");s&&(this.message=s)}}e.NotImplementedError=F;class W extends Error{constructor(s){super("NotSupported");s&&(this.message=s)}}e.NotSupportedError=W;class q extends Error{constructor(){super(...arguments);this.isExpected=!0}}e.ExpectedError=q;function l(n){const s=n;return s instanceof Error&&Array.isArray(s.actions)}e.isErrorWithActions=l;function r(n,s=Object.create(null)){const a=new Error(n);return s.actions&&(a.actions=s.actions),a}e.createErrorWithActions=r}),define(Y[3],X([0,1]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.once=void 0;function g(A){const m=this;let y=!1,D;return function(){return y||(y=!0,D=A.apply(m,arguments)),D}}e.once=g}),define(Y[9],X([0,1]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Iterable=void 0;var g;(function(A){function m(n){return n&&typeof n=="object"&&typeof n[Symbol.iterator]=="function"}A.is=m;const y=Object.freeze([]);function D(){return y}A.empty=D;function*_(n){yield n}A.single=_;function L(n){return n||y}A.from=L;function E(n){return!n||n[Symbol.iterator]().next().done===!0}A.isEmpty=E;function T(n){return n[Symbol.iterator]().next().value}A.first=T;function j(n,s){for(const a of n)if(s(a))return!0;return!1}A.some=j;function k(n,s){for(const a of n)if(s(a))return a}A.find=k;function*R(n,s){for(const a of n)s(a)&&(yield a)}A.filter=R;function*C(n,s){let a=0;for(const c of n)yield s(c,a++)}A.map=C;function*O(...n){for(const s of n)for(const a of s)yield a}A.concat=O;function*F(n){for(const s of n)for(const a of s)yield a}A.concatNested=F;function W(n,s,a){let c=a;for(const u of n)c=s(c,u);return c}A.reduce=W;function*q(n,s,a=n.length){for(s<0&&(s+=n.length),a<0?a+=n.length:a>n.length&&(a=n.length);s<a;s++)yield n[s]}A.slice=q;function l(n,s=Number.POSITIVE_INFINITY){const a=[];if(s===0)return[a,n];const c=n[Symbol.iterator]();for(let u=0;u<s;u++){const t=c.next();if(t.done)return[a,A.empty()];a.push(t.value)}return[a,{[Symbol.iterator](){return c}}]}A.consume=l;function r(n,s,a=(c,u)=>c===u){const c=n[Symbol.iterator](),u=s[Symbol.iterator]();for(;;){const t=c.next(),o=u.next();if(t.done!==o.done)return!1;if(t.done)return!0;if(!a(t.value,o.value))return!1}}A.equals=r})(g=e.Iterable||(e.Iterable={}))}),define(Y[10],X([0,1]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Lazy=void 0;class g{constructor(m){this.executor=m,this._didRun=!1}hasValue(){return this._didRun}getValue(){if(!this._didRun)try{this._value=this.executor()}catch(m){this._error=m}finally{this._didRun=!0}if(this._error)throw this._error;return this._value}get rawValue(){return this._value}map(m){return new g(()=>m(this.getValue()))}}e.Lazy=g}),define(Y[11],X([0,1,3,9]),function(Q,e,g,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.disposeOnReturn=e.ImmortalReference=e.AsyncReferenceCollection=e.ReferenceCollection=e.RefCountedDisposable=e.MutableDisposable=e.Disposable=e.DisposableStore=e.toDisposable=e.combinedDisposable=e.dispose=e.isDisposable=e.MultiDisposeError=e.markAsSingleton=e.setDisposableTracker=void 0;const m=!1;let y=null;function D(u){y=u}if(e.setDisposableTracker=D,m){const u="__is_disposable_tracked__";D(new class{trackDisposable(t){const o=new Error("Potentially leaked disposable").stack;setTimeout(()=>{t[u]||console.log(o)},3e3)}setParent(t,o){if(t&&t!==q.None)try{t[u]=!0}catch{}}markAsDisposed(t){if(t&&t!==q.None)try{t[u]=!0}catch{}}markAsSingleton(t){}})}function _(u){return y?.trackDisposable(u),u}function L(u){y?.markAsDisposed(u)}function E(u,t){y?.setParent(u,t)}function T(u,t){if(!!y)for(const o of u)y.setParent(o,t)}function j(u){return y?.markAsSingleton(u),u}e.markAsSingleton=j;class k extends Error{constructor(t){super(`Encountered errors while disposing of store. Errors: [${t.join(", ")}]`);this.errors=t}}e.MultiDisposeError=k;function R(u){return typeof u.dispose=="function"&&u.dispose.length===0}e.isDisposable=R;function C(u){if(A.Iterable.is(u)){let t=[];for(const o of u)if(o)try{o.dispose()}catch(f){t.push(f)}if(t.length===1)throw t[0];if(t.length>1)throw new k(t);return Array.isArray(u)?[]:u}else if(u)return u.dispose(),u}e.dispose=C;function O(...u){const t=F(()=>C(u));return T(u,t),t}e.combinedDisposable=O;function F(u){const t=_({dispose:(0,g.once)(()=>{L(t),u()})});return t}e.toDisposable=F;class W{constructor(){this._toDispose=new Set,this._isDisposed=!1,_(this)}dispose(){this._isDisposed||(L(this),this._isDisposed=!0,this.clear())}get isDisposed(){return this._isDisposed}clear(){try{C(this._toDispose.values())}finally{this._toDispose.clear()}}add(t){if(!t)return t;if(t===this)throw new Error("Cannot register a disposable on itself!");return E(t,this),this._isDisposed?W.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._toDispose.add(t),t}}e.DisposableStore=W,W.DISABLE_DISPOSED_WARNING=!1;class q{constructor(){this._store=new W,_(this),E(this._store,this)}dispose(){L(this),this._store.dispose()}_register(t){if(t===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(t)}}e.Disposable=q,q.None=Object.freeze({dispose(){}});class l{constructor(){this._isDisposed=!1,_(this)}get value(){return this._isDisposed?void 0:this._value}set value(t){this._isDisposed||t===this._value||(this._value?.dispose(),t&&E(t,this),this._value=t)}clear(){this.value=void 0}dispose(){this._isDisposed=!0,L(this),this._value?.dispose(),this._value=void 0}clearAndLeak(){const t=this._value;return this._value=void 0,t&&E(t,null),t}}e.MutableDisposable=l;class r{constructor(t){this._disposable=t,this._counter=1}acquire(){return this._counter++,this}release(){return--this._counter==0&&this._disposable.dispose(),this}}e.RefCountedDisposable=r;class n{constructor(){this.references=new Map}acquire(t,...o){let f=this.references.get(t);f||(f={counter:0,object:this.createReferencedObject(t,...o)},this.references.set(t,f));const{object:w}=f,v=(0,g.once)(()=>{--f.counter==0&&(this.destroyReferencedObject(t,f.object),this.references.delete(t))});return f.counter++,{object:w,dispose:v}}}e.ReferenceCollection=n;class s{constructor(t){this.referenceCollection=t}async acquire(t,...o){const f=this.referenceCollection.acquire(t,...o);try{return{object:await f.object,dispose:()=>f.dispose()}}catch(w){throw f.dispose(),w}}}e.AsyncReferenceCollection=s;class a{constructor(t){this.object=t}dispose(){}}e.ImmortalReference=a;function c(u){const t=new W;try{u(t)}finally{t.dispose()}}e.disposeOnReturn=c}),define(Y[12],X([0,1]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LinkedList=void 0;class g{constructor(y){this.element=y,this.next=g.Undefined,this.prev=g.Undefined}}g.Undefined=new g(void 0);class A{constructor(){this._first=g.Undefined,this._last=g.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===g.Undefined}clear(){let y=this._first;for(;y!==g.Undefined;){const D=y.next;y.prev=g.Undefined,y.next=g.Undefined,y=D}this._first=g.Undefined,this._last=g.Undefined,this._size=0}unshift(y){return this._insert(y,!1)}push(y){return this._insert(y,!0)}_insert(y,D){const _=new g(y);if(this._first===g.Undefined)this._first=_,this._last=_;else if(D){const E=this._last;this._last=_,_.prev=E,E.next=_}else{const E=this._first;this._first=_,_.next=E,E.prev=_}this._size+=1;let L=!1;return()=>{L||(L=!0,this._remove(_))}}shift(){if(this._first!==g.Undefined){const y=this._first.element;return this._remove(this._first),y}}pop(){if(this._last!==g.Undefined){const y=this._last.element;return this._remove(this._last),y}}_remove(y){if(y.prev!==g.Undefined&&y.next!==g.Undefined){const D=y.prev;D.next=y.next,y.next.prev=D}else y.prev===g.Undefined&&y.next===g.Undefined?(this._first=g.Undefined,this._last=g.Undefined):y.next===g.Undefined?(this._last=this._last.prev,this._last.next=g.Undefined):y.prev===g.Undefined&&(this._first=this._first.next,this._first.prev=g.Undefined);this._size-=1}*[Symbol.iterator](){let y=this._first;for(;y!==g.Undefined;)yield y.element,y=y.next}}e.LinkedList=A}),define(Y[2],X([0,1]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isAndroid=e.isEdge=e.isSafari=e.isFirefox=e.isChrome=e.isLittleEndian=e.OS=e.OperatingSystem=e.setTimeout0=e.translationsConfigFile=e.locale=e.Language=e.language=e.userAgent=e.platform=e.isIOS=e.isWeb=e.isElectron=e.isNative=e.isLinuxSnap=e.isLinux=e.isMacintosh=e.isWindows=e.PlatformToString=e.Platform=e.isElectronSandboxed=e.globals=void 0;const g="en";let A=!1,m=!1,y=!1,D=!1,_=!1,L=!1,E=!1,T=!1,j,k=g,R,C;e.globals=typeof self=="object"?self:typeof global=="object"?global:{};let O;typeof e.globals.vscode!="undefined"&&typeof e.globals.vscode.process!="undefined"?O=e.globals.vscode.process:typeof process!="undefined"&&(O=process);const F=typeof O?.versions?.electron=="string",W=F&&O?.type==="renderer";if(e.isElectronSandboxed=W&&O?.sandboxed,typeof navigator=="object"&&!W){C=navigator.userAgent,A=C.indexOf("Windows")>=0,m=C.indexOf("Macintosh")>=0,T=(C.indexOf("Macintosh")>=0||C.indexOf("iPad")>=0||C.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,y=C.indexOf("Linux")>=0,L=!0,j=navigator.language,k=j;const t=typeof document!="undefined"&&document.getElementById("vscode-remote-nls-configuration"),o=t&&t.getAttribute("data-settings");if(o)try{const f=JSON.parse(o);j=f.locale,R=f._translationsConfigFile,k=f.availableLanguages["*"]||g}catch{}}else if(typeof O=="object"){A=O.platform==="win32",m=O.platform==="darwin",y=O.platform==="linux",D=y&&!!O.env.SNAP&&!!O.env.SNAP_REVISION,E=F,j=g,k=g;const t=O.env.VSCODE_NLS_CONFIG;if(t)try{const o=JSON.parse(t),f=o.availableLanguages["*"];j=o.locale,k=f||g,R=o._translationsConfigFile}catch{}_=!0}else console.error("Unable to resolve platform.");var q;(function(t){t[t.Web=0]="Web",t[t.Mac=1]="Mac",t[t.Linux=2]="Linux",t[t.Windows=3]="Windows"})(q=e.Platform||(e.Platform={}));function l(t){switch(t){case 0:return"Web";case 1:return"Mac";case 2:return"Linux";case 3:return"Windows"}}e.PlatformToString=l;let r=0;m?r=1:A?r=3:y&&(r=2),e.isWindows=A,e.isMacintosh=m,e.isLinux=y,e.isLinuxSnap=D,e.isNative=_,e.isElectron=E,e.isWeb=L,e.isIOS=T,e.platform=r,e.userAgent=C,e.language=k;var n;(function(t){function o(){return e.language}t.value=o;function f(){return e.language.length===2?e.language==="en":e.language.length>=3?e.language[0]==="e"&&e.language[1]==="n"&&e.language[2]==="-":!1}t.isDefaultVariant=f;function w(){return e.language==="en"}t.isDefault=w})(n=e.Language||(e.Language={})),e.locale=j,e.translationsConfigFile=R,e.setTimeout0=(()=>{if(typeof e.globals.postMessage=="function"&&!e.globals.importScripts){let t=[];e.globals.addEventListener("message",f=>{if(f.data&&f.data.vscodeScheduleAsyncWork)for(let w=0,v=t.length;w<v;w++){const p=t[w];if(p.id===f.data.vscodeScheduleAsyncWork){t.splice(w,1),p.callback();return}}});let o=0;return f=>{const w=++o;t.push({id:w,callback:f}),e.globals.postMessage({vscodeScheduleAsyncWork:w},"*")}}return t=>setTimeout(t)})();var s;(function(t){t[t.Windows=1]="Windows",t[t.Macintosh=2]="Macintosh",t[t.Linux=3]="Linux"})(s=e.OperatingSystem||(e.OperatingSystem={})),e.OS=m||T?2:A?1:3;let a=!0,c=!1;function u(){if(!c){c=!0;const t=new Uint8Array(2);t[0]=1,t[1]=2,a=new Uint16Array(t.buffer)[0]===(2<<8)+1}return a}e.isLittleEndian=u,e.isChrome=!!(e.userAgent&&e.userAgent.indexOf("Chrome")>=0),e.isFirefox=!!(e.userAgent&&e.userAgent.indexOf("Firefox")>=0),e.isSafari=!!(!e.isChrome&&e.userAgent&&e.userAgent.indexOf("Safari")>=0),e.isEdge=!!(e.userAgent&&e.userAgent.indexOf("Edg/")>=0),e.isAndroid=!!(e.userAgent&&e.userAgent.indexOf("Android")>=0)}),define(Y[4],X([0,1,2]),function(Q,e,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.arch=e.platform=e.env=e.cwd=void 0;let A;if(typeof g.globals.vscode!="undefined"&&typeof g.globals.vscode.process!="undefined"){const m=g.globals.vscode.process;A={get platform(){return m.platform},get arch(){return m.arch},get env(){return m.env},cwd(){return m.cwd()}}}else typeof process!="undefined"?A={get platform(){return process.platform},get arch(){return process.arch},get env(){return process.env},cwd(){return process.env.VSCODE_CWD||process.cwd()}}:A={get platform(){return g.isWindows?"win32":g.isMacintosh?"darwin":"linux"},get arch(){},get env(){return{}},cwd(){return"/"}};e.cwd=A.cwd,e.env=A.env,e.platform=A.platform,e.arch=A.arch}),define(Y[5],X([0,1,4]),function(Q,e,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.delimiter=e.sep=e.toNamespacedPath=e.parse=e.format=e.extname=e.basename=e.dirname=e.relative=e.resolve=e.join=e.isAbsolute=e.normalize=e.posix=e.win32=void 0;const A=65,m=97,y=90,D=122,_=46,L=47,E=92,T=58,j=63;class k extends Error{constructor(r,n,s){let a;typeof n=="string"&&n.indexOf("not ")===0?(a="must not be",n=n.replace(/^not /,"")):a="must be";const c=r.indexOf(".")!==-1?"property":"argument";let u=`The "${r}" ${c} ${a} of type ${n}`;u+=`. Received type ${typeof s}`;super(u);this.code="ERR_INVALID_ARG_TYPE"}}function R(l,r){if(typeof l!="string")throw new k(r,"string",l)}function C(l){return l===L||l===E}function O(l){return l===L}function F(l){return l>=A&&l<=y||l>=m&&l<=D}function W(l,r,n,s){let a="",c=0,u=-1,t=0,o=0;for(let f=0;f<=l.length;++f){if(f<l.length)o=l.charCodeAt(f);else{if(s(o))break;o=L}if(s(o)){if(!(u===f-1||t===1))if(t===2){if(a.length<2||c!==2||a.charCodeAt(a.length-1)!==_||a.charCodeAt(a.length-2)!==_){if(a.length>2){const w=a.lastIndexOf(n);w===-1?(a="",c=0):(a=a.slice(0,w),c=a.length-1-a.lastIndexOf(n)),u=f,t=0;continue}else if(a.length!==0){a="",c=0,u=f,t=0;continue}}r&&(a+=a.length>0?`${n}..`:"..",c=2)}else a.length>0?a+=`${n}${l.slice(u+1,f)}`:a=l.slice(u+1,f),c=f-u-1;u=f,t=0}else o===_&&t!==-1?++t:t=-1}return a}function q(l,r){if(r===null||typeof r!="object")throw new k("pathObject","Object",r);const n=r.dir||r.root,s=r.base||`${r.name||""}${r.ext||""}`;return n?n===r.root?`${n}${s}`:`${n}${l}${s}`:s}e.win32={resolve(...l){let r="",n="",s=!1;for(let a=l.length-1;a>=-1;a--){let c;if(a>=0){if(c=l[a],R(c,"path"),c.length===0)continue}else r.length===0?c=g.cwd():(c=g.env[`=${r}`]||g.cwd(),(c===void 0||c.slice(0,2).toLowerCase()!==r.toLowerCase()&&c.charCodeAt(2)===E)&&(c=`${r}\\`));const u=c.length;let t=0,o="",f=!1;const w=c.charCodeAt(0);if(u===1)C(w)&&(t=1,f=!0);else if(C(w))if(f=!0,C(c.charCodeAt(1))){let v=2,p=v;for(;v<u&&!C(c.charCodeAt(v));)v++;if(v<u&&v!==p){const e1=c.slice(p,v);for(p=v;v<u&&C(c.charCodeAt(v));)v++;if(v<u&&v!==p){for(p=v;v<u&&!C(c.charCodeAt(v));)v++;(v===u||v!==p)&&(o=`\\\\${e1}\\${c.slice(p,v)}`,t=v)}}}else t=1;else F(w)&&c.charCodeAt(1)===T&&(o=c.slice(0,2),t=2,u>2&&C(c.charCodeAt(2))&&(f=!0,t=3));if(o.length>0)if(r.length>0){if(o.toLowerCase()!==r.toLowerCase())continue}else r=o;if(s){if(r.length>0)break}else if(n=`${c.slice(t)}\\${n}`,s=f,f&&r.length>0)break}return n=W(n,!s,"\\",C),s?`${r}\\${n}`:`${r}${n}`||"."},normalize(l){R(l,"path");const r=l.length;if(r===0)return".";let n=0,s,a=!1;const c=l.charCodeAt(0);if(r===1)return O(c)?"\\":l;if(C(c))if(a=!0,C(l.charCodeAt(1))){let t=2,o=t;for(;t<r&&!C(l.charCodeAt(t));)t++;if(t<r&&t!==o){const f=l.slice(o,t);for(o=t;t<r&&C(l.charCodeAt(t));)t++;if(t<r&&t!==o){for(o=t;t<r&&!C(l.charCodeAt(t));)t++;if(t===r)return`\\\\${f}\\${l.slice(o)}\\`;t!==o&&(s=`\\\\${f}\\${l.slice(o,t)}`,n=t)}}}else n=1;else F(c)&&l.charCodeAt(1)===T&&(s=l.slice(0,2),n=2,r>2&&C(l.charCodeAt(2))&&(a=!0,n=3));let u=n<r?W(l.slice(n),!a,"\\",C):"";return u.length===0&&!a&&(u="."),u.length>0&&C(l.charCodeAt(r-1))&&(u+="\\"),s===void 0?a?`\\${u}`:u:a?`${s}\\${u}`:`${s}${u}`},isAbsolute(l){R(l,"path");const r=l.length;if(r===0)return!1;const n=l.charCodeAt(0);return C(n)||r>2&&F(n)&&l.charCodeAt(1)===T&&C(l.charCodeAt(2))},join(...l){if(l.length===0)return".";let r,n;for(let c=0;c<l.length;++c){const u=l[c];R(u,"path"),u.length>0&&(r===void 0?r=n=u:r+=`\\${u}`)}if(r===void 0)return".";let s=!0,a=0;if(typeof n=="string"&&C(n.charCodeAt(0))){++a;const c=n.length;c>1&&C(n.charCodeAt(1))&&(++a,c>2&&(C(n.charCodeAt(2))?++a:s=!1))}if(s){for(;a<r.length&&C(r.charCodeAt(a));)a++;a>=2&&(r=`\\${r.slice(a)}`)}return e.win32.normalize(r)},relative(l,r){if(R(l,"from"),R(r,"to"),l===r)return"";const n=e.win32.resolve(l),s=e.win32.resolve(r);if(n===s||(l=n.toLowerCase(),r=s.toLowerCase(),l===r))return"";let a=0;for(;a<l.length&&l.charCodeAt(a)===E;)a++;let c=l.length;for(;c-1>a&&l.charCodeAt(c-1)===E;)c--;const u=c-a;let t=0;for(;t<r.length&&r.charCodeAt(t)===E;)t++;let o=r.length;for(;o-1>t&&r.charCodeAt(o-1)===E;)o--;const f=o-t,w=u<f?u:f;let v=-1,p=0;for(;p<w;p++){const H=l.charCodeAt(a+p);if(H!==r.charCodeAt(t+p))break;H===E&&(v=p)}if(p!==w){if(v===-1)return s}else{if(f>w){if(r.charCodeAt(t+p)===E)return s.slice(t+p+1);if(p===2)return s.slice(t+p)}u>w&&(l.charCodeAt(a+p)===E?v=p:p===2&&(v=3)),v===-1&&(v=0)}let e1="";for(p=a+v+1;p<=c;++p)(p===c||l.charCodeAt(p)===E)&&(e1+=e1.length===0?"..":"\\..");return t+=v,e1.length>0?`${e1}${s.slice(t,o)}`:(s.charCodeAt(t)===E&&++t,s.slice(t,o))},toNamespacedPath(l){if(typeof l!="string")return l;if(l.length===0)return"";const r=e.win32.resolve(l);if(r.length<=2)return l;if(r.charCodeAt(0)===E){if(r.charCodeAt(1)===E){const n=r.charCodeAt(2);if(n!==j&&n!==_)return`\\\\?\\UNC\\${r.slice(2)}`}}else if(F(r.charCodeAt(0))&&r.charCodeAt(1)===T&&r.charCodeAt(2)===E)return`\\\\?\\${r}`;return l},dirname(l){R(l,"path");const r=l.length;if(r===0)return".";let n=-1,s=0;const a=l.charCodeAt(0);if(r===1)return C(a)?l:".";if(C(a)){if(n=s=1,C(l.charCodeAt(1))){let t=2,o=t;for(;t<r&&!C(l.charCodeAt(t));)t++;if(t<r&&t!==o){for(o=t;t<r&&C(l.charCodeAt(t));)t++;if(t<r&&t!==o){for(o=t;t<r&&!C(l.charCodeAt(t));)t++;if(t===r)return l;t!==o&&(n=s=t+1)}}}}else F(a)&&l.charCodeAt(1)===T&&(n=r>2&&C(l.charCodeAt(2))?3:2,s=n);let c=-1,u=!0;for(let t=r-1;t>=s;--t)if(C(l.charCodeAt(t))){if(!u){c=t;break}}else u=!1;if(c===-1){if(n===-1)return".";c=n}return l.slice(0,c)},basename(l,r){r!==void 0&&R(r,"ext"),R(l,"path");let n=0,s=-1,a=!0,c;if(l.length>=2&&F(l.charCodeAt(0))&&l.charCodeAt(1)===T&&(n=2),r!==void 0&&r.length>0&&r.length<=l.length){if(r===l)return"";let u=r.length-1,t=-1;for(c=l.length-1;c>=n;--c){const o=l.charCodeAt(c);if(C(o)){if(!a){n=c+1;break}}else t===-1&&(a=!1,t=c+1),u>=0&&(o===r.charCodeAt(u)?--u==-1&&(s=c):(u=-1,s=t))}return n===s?s=t:s===-1&&(s=l.length),l.slice(n,s)}for(c=l.length-1;c>=n;--c)if(C(l.charCodeAt(c))){if(!a){n=c+1;break}}else s===-1&&(a=!1,s=c+1);return s===-1?"":l.slice(n,s)},extname(l){R(l,"path");let r=0,n=-1,s=0,a=-1,c=!0,u=0;l.length>=2&&l.charCodeAt(1)===T&&F(l.charCodeAt(0))&&(r=s=2);for(let t=l.length-1;t>=r;--t){const o=l.charCodeAt(t);if(C(o)){if(!c){s=t+1;break}continue}a===-1&&(c=!1,a=t+1),o===_?n===-1?n=t:u!==1&&(u=1):n!==-1&&(u=-1)}return n===-1||a===-1||u===0||u===1&&n===a-1&&n===s+1?"":l.slice(n,a)},format:q.bind(null,"\\"),parse(l){R(l,"path");const r={root:"",dir:"",base:"",ext:"",name:""};if(l.length===0)return r;const n=l.length;let s=0,a=l.charCodeAt(0);if(n===1)return C(a)?(r.root=r.dir=l,r):(r.base=r.name=l,r);if(C(a)){if(s=1,C(l.charCodeAt(1))){let v=2,p=v;for(;v<n&&!C(l.charCodeAt(v));)v++;if(v<n&&v!==p){for(p=v;v<n&&C(l.charCodeAt(v));)v++;if(v<n&&v!==p){for(p=v;v<n&&!C(l.charCodeAt(v));)v++;v===n?s=v:v!==p&&(s=v+1)}}}}else if(F(a)&&l.charCodeAt(1)===T){if(n<=2)return r.root=r.dir=l,r;if(s=2,C(l.charCodeAt(2))){if(n===3)return r.root=r.dir=l,r;s=3}}s>0&&(r.root=l.slice(0,s));let c=-1,u=s,t=-1,o=!0,f=l.length-1,w=0;for(;f>=s;--f){if(a=l.charCodeAt(f),C(a)){if(!o){u=f+1;break}continue}t===-1&&(o=!1,t=f+1),a===_?c===-1?c=f:w!==1&&(w=1):c!==-1&&(w=-1)}return t!==-1&&(c===-1||w===0||w===1&&c===t-1&&c===u+1?r.base=r.name=l.slice(u,t):(r.name=l.slice(u,c),r.base=l.slice(u,t),r.ext=l.slice(c,t))),u>0&&u!==s?r.dir=l.slice(0,u-1):r.dir=r.root,r},sep:"\\",delimiter:";",win32:null,posix:null},e.posix={resolve(...l){let r="",n=!1;for(let s=l.length-1;s>=-1&&!n;s--){const a=s>=0?l[s]:g.cwd();R(a,"path"),a.length!==0&&(r=`${a}/${r}`,n=a.charCodeAt(0)===L)}return r=W(r,!n,"/",O),n?`/${r}`:r.length>0?r:"."},normalize(l){if(R(l,"path"),l.length===0)return".";const r=l.charCodeAt(0)===L,n=l.charCodeAt(l.length-1)===L;return l=W(l,!r,"/",O),l.length===0?r?"/":n?"./":".":(n&&(l+="/"),r?`/${l}`:l)},isAbsolute(l){return R(l,"path"),l.length>0&&l.charCodeAt(0)===L},join(...l){if(l.length===0)return".";let r;for(let n=0;n<l.length;++n){const s=l[n];R(s,"path"),s.length>0&&(r===void 0?r=s:r+=`/${s}`)}return r===void 0?".":e.posix.normalize(r)},relative(l,r){if(R(l,"from"),R(r,"to"),l===r||(l=e.posix.resolve(l),r=e.posix.resolve(r),l===r))return"";const n=1,s=l.length,a=s-n,c=1,u=r.length-c,t=a<u?a:u;let o=-1,f=0;for(;f<t;f++){const v=l.charCodeAt(n+f);if(v!==r.charCodeAt(c+f))break;v===L&&(o=f)}if(f===t)if(u>t){if(r.charCodeAt(c+f)===L)return r.slice(c+f+1);if(f===0)return r.slice(c+f)}else a>t&&(l.charCodeAt(n+f)===L?o=f:f===0&&(o=0));let w="";for(f=n+o+1;f<=s;++f)(f===s||l.charCodeAt(f)===L)&&(w+=w.length===0?"..":"/..");return`${w}${r.slice(c+o)}`},toNamespacedPath(l){return l},dirname(l){if(R(l,"path"),l.length===0)return".";const r=l.charCodeAt(0)===L;let n=-1,s=!0;for(let a=l.length-1;a>=1;--a)if(l.charCodeAt(a)===L){if(!s){n=a;break}}else s=!1;return n===-1?r?"/":".":r&&n===1?"//":l.slice(0,n)},basename(l,r){r!==void 0&&R(r,"ext"),R(l,"path");let n=0,s=-1,a=!0,c;if(r!==void 0&&r.length>0&&r.length<=l.length){if(r===l)return"";let u=r.length-1,t=-1;for(c=l.length-1;c>=0;--c){const o=l.charCodeAt(c);if(o===L){if(!a){n=c+1;break}}else t===-1&&(a=!1,t=c+1),u>=0&&(o===r.charCodeAt(u)?--u==-1&&(s=c):(u=-1,s=t))}return n===s?s=t:s===-1&&(s=l.length),l.slice(n,s)}for(c=l.length-1;c>=0;--c)if(l.charCodeAt(c)===L){if(!a){n=c+1;break}}else s===-1&&(a=!1,s=c+1);return s===-1?"":l.slice(n,s)},extname(l){R(l,"path");let r=-1,n=0,s=-1,a=!0,c=0;for(let u=l.length-1;u>=0;--u){const t=l.charCodeAt(u);if(t===L){if(!a){n=u+1;break}continue}s===-1&&(a=!1,s=u+1),t===_?r===-1?r=u:c!==1&&(c=1):r!==-1&&(c=-1)}return r===-1||s===-1||c===0||c===1&&r===s-1&&r===n+1?"":l.slice(r,s)},format:q.bind(null,"/"),parse(l){R(l,"path");const r={root:"",dir:"",base:"",ext:"",name:""};if(l.length===0)return r;const n=l.charCodeAt(0)===L;let s;n?(r.root="/",s=1):s=0;let a=-1,c=0,u=-1,t=!0,o=l.length-1,f=0;for(;o>=s;--o){const w=l.charCodeAt(o);if(w===L){if(!t){c=o+1;break}continue}u===-1&&(t=!1,u=o+1),w===_?a===-1?a=o:f!==1&&(f=1):a!==-1&&(f=-1)}if(u!==-1){const w=c===0&&n?1:c;a===-1||f===0||f===1&&a===u-1&&a===c+1?r.base=r.name=l.slice(w,u):(r.name=l.slice(w,a),r.base=l.slice(w,u),r.ext=l.slice(a,u))}return c>0?r.dir=l.slice(0,c-1):n&&(r.dir="/"),r},sep:"/",delimiter:":",win32:null,posix:null},e.posix.win32=e.win32.win32=e.win32,e.posix.posix=e.win32.posix=e.posix,e.normalize=g.platform==="win32"?e.win32.normalize:e.posix.normalize,e.isAbsolute=g.platform==="win32"?e.win32.isAbsolute:e.posix.isAbsolute,e.join=g.platform==="win32"?e.win32.join:e.posix.join,e.resolve=g.platform==="win32"?e.win32.resolve:e.posix.resolve,e.relative=g.platform==="win32"?e.win32.relative:e.posix.relative,e.dirname=g.platform==="win32"?e.win32.dirname:e.posix.dirname,e.basename=g.platform==="win32"?e.win32.basename:e.posix.basename,e.extname=g.platform==="win32"?e.win32.extname:e.posix.extname,e.format=g.platform==="win32"?e.win32.format:e.posix.format,e.parse=g.platform==="win32"?e.win32.parse:e.posix.parse,e.toNamespacedPath=g.platform==="win32"?e.win32.toNamespacedPath:e.posix.toNamespacedPath,e.sep=g.platform==="win32"?e.win32.sep:e.posix.sep,e.delimiter=g.platform==="win32"?e.win32.delimiter:e.posix.delimiter}),define(Y[13],X([0,1,2]),function(Q,e,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StopWatch=void 0;const A=g.globals.performance&&typeof g.globals.performance.now=="function";class m{constructor(D){this._highResolution=A&&D,this._startTime=this._now(),this._stopTime=-1}static create(D=!0){return new m(D)}stop(){this._stopTime=this._now()}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}_now(){return this._highResolution?g.globals.performance.now():Date.now()}}e.StopWatch=m}),define(Y[14],X([0,1,8,3,11,12,13]),function(Q,e,g,A,m,y,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Relay=e.EventBufferer=e.EventMultiplexer=e.MicrotaskEmitter=e.DebounceEmitter=e.PauseableEmitter=e.AsyncEmitter=e.Emitter=e.setGlobalLeakWarningThreshold=e.Event=void 0;var _;(function(r){r.None=()=>m.Disposable.None;function n($){return(S,M=null,U)=>{let V=!1,z;return z=$(P=>{if(!V)return z?z.dispose():V=!0,S.call(M,P)},null,U),V&&z.dispose(),z}}r.once=n;function s($,S){return f((M,U=null,V)=>$(z=>M.call(U,S(z)),null,V))}r.map=s;function a($,S){return f((M,U=null,V)=>$(z=>{S(z),M.call(U,z)},null,V))}r.forEach=a;function c($,S){return f((M,U=null,V)=>$(z=>S(z)&&M.call(U,z),null,V))}r.filter=c;function u($){return $}r.signal=u;function t(...$){return(S,M=null,U)=>(0,m.combinedDisposable)(...$.map(V=>V(z=>S.call(M,z),null,U)))}r.any=t;function o($,S,M){let U=M;return s($,V=>(U=S(U,V),U))}r.reduce=o;function f($){let S;const M=new k({onFirstListenerAdd(){S=$(M.fire,M)},onLastListenerRemove(){S.dispose()}});return M.event}function w($,S,M,U=100,V=!1){let z,P,B=0;return $(G=>{B++,z=M(z,G),V&&!P&&(S(z),z=void 0),clearTimeout(P),P=setTimeout(()=>{const r1=z;z=void 0,P=void 0,(!V||B>1)&&S(r1),B=0},U)})}r.debouncedListener=w;function v($,S,M=100,U=!1,V){let z,P,B,G=0;const r1=new k({leakWarningThreshold:V,onFirstListenerAdd(){z=$(o1=>{G++,P=S(P,o1),U&&!B&&(r1.fire(P),P=void 0),clearTimeout(B),B=setTimeout(()=>{const g1=P;P=void 0,B=void 0,(!U||G>1)&&r1.fire(g1),G=0},M)})},onLastListenerRemove(){z.dispose()}});return r1.event}r.debounce=v;function p($,S=(M,U)=>M===U){let M=!0,U;return c($,V=>{const z=M||!S(V,U);return M=!1,U=V,z})}r.latch=p;function e1($,S){return[r.filter($,S),r.filter($,M=>!S(M))]}r.split=e1;function H($,S=!1,M=[]){let U=M.slice(),V=$(B=>{U?U.push(B):P.fire(B)});const z=()=>{U&&U.forEach(B=>P.fire(B)),U=null},P=new k({onFirstListenerAdd(){V||(V=$(B=>P.fire(B)))},onFirstListenerDidAdd(){U&&(S?setTimeout(z):z())},onLastListenerRemove(){V&&V.dispose(),V=null}});return P.event}r.buffer=H;class K{constructor(S){this.event=S}map(S){return new K(s(this.event,S))}forEach(S){return new K(a(this.event,S))}filter(S){return new K(c(this.event,S))}reduce(S,M){return new K(o(this.event,S,M))}latch(){return new K(p(this.event))}debounce(S,M=100,U=!1,V){return new K(v(this.event,S,M,U,V))}on(S,M,U){return this.event(S,M,U)}once(S,M,U){return n(this.event)(S,M,U)}}function t1($){return new K($)}r.chain=t1;function i1($,S,M=U=>U){const U=(...B)=>P.fire(M(...B)),V=()=>$.on(S,U),z=()=>$.removeListener(S,U),P=new k({onFirstListenerAdd:V,onLastListenerRemove:z});return P.event}r.fromNodeEventEmitter=i1;function l1($,S,M=U=>U){const U=(...B)=>P.fire(M(...B)),V=()=>$.addEventListener(S,U),z=()=>$.removeEventListener(S,U),P=new k({onFirstListenerAdd:V,onLastListenerRemove:z});return P.event}r.fromDOMEventEmitter=l1;function N($){return new Promise(S=>n($)(S))}r.toPromise=N;function Z($,S){return S(void 0),$(M=>S(M))}r.runAndSubscribe=Z;function s1($,S){let M=null;function U(z){M?.dispose(),M=new m.DisposableStore,S(z,M)}U(void 0);const V=$(z=>U(z));return(0,m.toDisposable)(()=>{V.dispose(),M?.dispose()})}r.runAndSubscribeWithStore=s1})(_=e.Event||(e.Event={}));class L{constructor(n){this._listenerCount=0,this._invocationCount=0,this._elapsedOverall=0,this._name=`${n}_${L._idPool++}`}start(n){this._stopWatch=new D.StopWatch(!0),this._listenerCount=n}stop(){if(this._stopWatch){const n=this._stopWatch.elapsed();this._elapsedOverall+=n,this._invocationCount+=1,console.info(`did FIRE ${this._name}: elapsed_ms: ${n.toFixed(5)}, listener: ${this._listenerCount} (elapsed_overall: ${this._elapsedOverall.toFixed(2)}, invocations: ${this._invocationCount})`),this._stopWatch=void 0}}}L._idPool=0;let E=-1;function T(r){const n=E;return E=r,{dispose(){E=n}}}e.setGlobalLeakWarningThreshold=T;class j{constructor(n,s=Math.random().toString(18).slice(2,5)){this.customThreshold=n,this.name=s,this._warnCountdown=0}dispose(){this._stacks&&this._stacks.clear()}check(n){let s=E;if(typeof this.customThreshold=="number"&&(s=this.customThreshold),s<=0||n<s)return;this._stacks||(this._stacks=new Map);const a=new Error().stack.split(` `).slice(3).join(` `),c=this._stacks.get(a)||0;if(this._stacks.set(a,c+1),this._warnCountdown-=1,this._warnCountdown<=0){this._warnCountdown=s*.5;let u,t=0;for(const[o,f]of this._stacks)(!u||t<f)&&(u=o,t=f);console.warn(`[${this.name}] potential listener LEAK detected, having ${n} listeners already. MOST frequent listener (${t}):`),console.warn(u)}return()=>{const u=this._stacks.get(a)||0;this._stacks.set(a,u-1)}}}class k{constructor(n){this._disposed=!1,this._options=n,this._leakageMon=E>0?new j(this._options&&this._options.leakWarningThreshold):void 0,this._perfMon=this._options?._profName?new L(this._options._profName):void 0}get event(){return this._event||(this._event=(n,s,a)=>{this._listeners||(this._listeners=new y.LinkedList);const c=this._listeners.isEmpty();c&&this._options&&this._options.onFirstListenerAdd&&this._options.onFirstListenerAdd(this);const u=this._listeners.push(s?[n,s]:n);c&&this._options&&this._options.onFirstListenerDidAdd&&this._options.onFirstListenerDidAdd(this),this._options&&this._options.onListenerDidAdd&&this._options.onListenerDidAdd(this,n,s);const t=this._leakageMon?.check(this._listeners.size),o=(0,m.toDisposable)(()=>{t&&t(),this._disposed||(u(),this._options&&this._options.onLastListenerRemove&&(this._listeners&&!this._listeners.isEmpty()||this._options.onLastListenerRemove(this)))});return a instanceof m.DisposableStore?a.add(o):Array.isArray(a)&&a.push(o),o}),this._event}fire(n){if(this._listeners){this._deliveryQueue||(this._deliveryQueue=new y.LinkedList);for(let s of this._listeners)this._deliveryQueue.push([s,n]);for(this._perfMon?.start(this._deliveryQueue.size);this._deliveryQueue.size>0;){const[s,a]=this._deliveryQueue.shift();try{typeof s=="function"?s.call(void 0,a):s[0].call(s[1],a)}catch(c){(0,g.onUnexpectedError)(c)}}this._perfMon?.stop()}}dispose(){this._disposed||(this._disposed=!0,this._listeners?.clear(),this._deliveryQueue?.clear(),this._options?.onLastListenerRemove?.(),this._leakageMon?.dispose())}}e.Emitter=k;class R extends k{async fireAsync(n,s,a){if(!!this._listeners){this._asyncDeliveryQueue||(this._asyncDeliveryQueue=new y.LinkedList);for(const c of this._listeners)this._asyncDeliveryQueue.push([c,n]);for(;this._asyncDeliveryQueue.size>0&&!s.isCancellationRequested;){const[c,u]=this._asyncDeliveryQueue.shift(),t=[],o={...u,token:s,waitUntil:f=>{if(Object.isFrozen(t))throw new Error("waitUntil can NOT be called asynchronous");a&&(f=a(f,typeof c=="function"?c:c[0])),t.push(f)}};try{typeof c=="function"?c.call(void 0,o):c[0].call(c[1],o)}catch(f){(0,g.onUnexpectedError)(f);continue}Object.freeze(t),await Promise.allSettled(t).then(f=>{for(const w of f)w.status==="rejected"&&(0,g.onUnexpectedError)(w.reason)})}}}}e.AsyncEmitter=R;class C extends k{constructor(n){super(n);this._isPaused=0,this._eventQueue=new y.LinkedList,this._mergeFn=n?.merge}pause(){this._isPaused++}resume(){if(this._isPaused!==0&&--this._isPaused==0)if(this._mergeFn){const n=Array.from(this._eventQueue);this._eventQueue.clear(),super.fire(this._mergeFn(n))}else for(;!this._isPaused&&this._eventQueue.size!==0;)super.fire(this._eventQueue.shift())}fire(n){this._listeners&&(this._isPaused!==0?this._eventQueue.push(n):super.fire(n))}}e.PauseableEmitter=C;class O extends C{constructor(n){super(n);this._delay=n.delay??100}fire(n){this._handle||(this.pause(),this._handle=setTimeout(()=>{this._handle=void 0,this.resume()},this._delay)),super.fire(n)}}e.DebounceEmitter=O;class F extends k{constructor(n){super(n);this._queuedEvents=[],this._mergeFn=n?.merge}fire(n){this._queuedEvents.push(n),this._queuedEvents.length===1&&queueMicrotask(()=>{this._mergeFn?super.fire(this._mergeFn(this._queuedEvents)):this._queuedEvents.forEach(s=>super.fire(s)),this._queuedEvents=[]})}}e.MicrotaskEmitter=F;class W{constructor(){this.hasListeners=!1,this.events=[],this.emitter=new k({onFirstListenerAdd:()=>this.onFirstListenerAdd(),onLastListenerRemove:()=>this.onLastListenerRemove()})}get event(){return this.emitter.event}add(n){const s={event:n,listener:null};this.events.push(s),this.hasListeners&&this.hook(s);const a=()=>{this.hasListeners&&this.unhook(s);const c=this.events.indexOf(s);this.events.splice(c,1)};return(0,m.toDisposable)((0,A.once)(a))}onFirstListenerAdd(){this.hasListeners=!0,this.events.forEach(n=>this.hook(n))}onLastListenerRemove(){this.hasListeners=!1,this.events.forEach(n=>this.unhook(n))}hook(n){n.listener=n.event(s=>this.emitter.fire(s))}unhook(n){n.listener&&n.listener.dispose(),n.listener=null}dispose(){this.emitter.dispose()}}e.EventMultiplexer=W;class q{constructor(){this.buffers=[]}wrapEvent(n){return(s,a,c)=>n(u=>{const t=this.buffers[this.buffers.length-1];t?t.push(()=>s.call(a,u)):s.call(a,u)},void 0,c)}bufferEvents(n){const s=[];this.buffers.push(s);const a=n();return this.buffers.pop(),s.forEach(c=>c()),a}}e.EventBufferer=q;class l{constructor(){this.listening=!1,this.inputEvent=_.None,this.inputEventListener=m.Disposable.None,this.emitter=new k({onFirstListenerDidAdd:()=>{this.listening=!0,this.inputEventListener=this.inputEvent(this.emitter.fire,this.emitter)},onLastListenerRemove:()=>{this.listening=!1,this.inputEventListener.dispose()}}),this.event=this.emitter.event}set input(n){this.inputEvent=n,this.listening&&(this.inputEventListener.dispose(),this.inputEventListener=n(this.emitter.fire,this.emitter))}dispose(){this.inputEventListener.dispose(),this.emitter.dispose()}}e.Relay=l}),define(Y[15],X([0,1,14]),function(Q,e,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CancellationTokenSource=e.CancellationToken=void 0;const A=Object.freeze(function(_,L){const E=setTimeout(_.bind(L),0);return{dispose(){clearTimeout(E)}}});var m;(function(_){function L(E){return E===_.None||E===_.Cancelled||E instanceof y?!0:!E||typeof E!="object"?!1:typeof E.isCancellationRequested=="boolean"&&typeof E.onCancellationRequested=="function"}_.isCancellationToken=L,_.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:g.Event.None}),_.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:A})})(m=e.CancellationToken||(e.CancellationToken={}));class y{constructor(){this._isCancelled=!1,this._emitter=null}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 g.Emitter),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}}class D{constructor(L){this._token=void 0,this._parentListener=void 0,this._parentListener=L&&L.onCancellationRequested(this.cancel,this)}get token(){return this._token||(this._token=new y),this._token}cancel(){this._token?this._token instanceof y&&this._token.cancel():this._token=m.Cancelled}dispose(L=!1){L&&this.cancel(),this._parentListener&&this._parentListener.dispose(),this._token?this._token instanceof y&&this._token.dispose():this._token=m.None}}e.CancellationTokenSource=D}),define(Y[16],X([0,1,15]),function(Q,e,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LRUCachedComputed=e.Cache=void 0;class A{constructor(D){this.task=D,this.result=null}get(){if(this.result)return this.result;const D=new g.CancellationTokenSource,_=this.task(D.token);return this.result={promise:_,dispose:()=>{this.result=null,D.cancel(),D.dispose()}},this.result}}e.Cache=A;class m{constructor(D){this.computeFn=D,this.lastCache=void 0,this.lastArgKey=void 0}get(D){const _=JSON.stringify(D);return this.lastArgKey!==_&&(this.lastArgKey=_,this.lastCache=this.computeFn(D)),this.lastCache}}e.LRUCachedComputed=m}),define(Y[17],X([0,1,16,10]),function(Q,e,g,A){"use strict";var m;Object.defineProperty(e,"__esModule",{value:!0}),e.InvisibleCharacters=e.AmbiguousCharacters=e.noBreakWhitespace=e.getLeftDeleteOffset=e.GraphemeBreakType=e.getGraphemeBreakType=e.singleLetterHash=e.getNLines=e.uppercaseFirstLetter=e.containsUppercaseCharacter=e.fuzzyContains=e.stripUTF8BOM=e.startsWithUTF8BOM=e.UTF8_BOM_CHARACTER=e.removeAnsiEscapeCodes=e.lcut=e.isEmojiImprecise=e.isFullWidthCharacter=e.containsUnusualLineTerminators=e.UNUSUAL_LINE_TERMINATORS=e.isBasicASCII=e.containsRTL=e.getCharContainingOffset=e.prevCharLength=e.nextCharLength=e.GraphemeIterator=e.CodePointIterator=e.getNextCodePoint=e.computeCodePoint=e.isLowSurrogate=e.isHighSurrogate=e.commonSuffixLength=e.commonPrefixLength=e.startsWithIgnoreCase=e.equalsIgnoreCase=e.isUpperAsciiLetter=e.isLowerAsciiLetter=e.compareSubstringIgnoreCase=e.compareIgnoreCase=e.compareSubstring=e.compare=e.lastNonWhitespaceIndex=e.getLeadingWhitespace=e.firstNonWhitespaceIndex=e.splitLines=e.regExpFlags=e.regExpContainsBackreference=e.regExpLeadsToEndlessLoop=e.createRegExp=e.stripWildcards=e.convertSimple2RegExpPattern=e.rtrim=e.ltrim=e.trim=e.truncate=e.count=e.escapeRegExpCharacters=e.escape=e.format2=e.format=e.isFalsyOrWhitespace=void 0;function y(i){return!i||typeof i!="string"?!0:i.trim().length===0}e.isFalsyOrWhitespace=y;const D=/{(\d+)}/g;function _(i,...d){return d.length===0?i:i.replace(D,function(h,b){const I=parseInt(b,10);return isNaN(I)||I<0||I>=d.length?h:d[I]})}e.format=_;const L=/{([^}]+)}/g;function E(i,d){return i.replace(L,(h,b)=>d[b]??h)}e.format2=E;function T(i){return i.replace(/[<>&]/g,function(d){switch(d){case"<":return"&lt;";case">":return"&gt;";case"&":return"&amp;";default:return d}})}e.escape=T;function j(i){return i.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}e.escapeRegExpCharacters=j;function k(i,d){let h=0;const b=d.charCodeAt(0);for(let I=i.length-1;I>=0;I--)i.charCodeAt(I)===b&&h++;return h}e.count=k;function R(i,d,h="\u2026"){return i.length<=d?i:`${i.substr(0,d)}${h}`}e.truncate=R;function C(i,d=" "){const h=O(i,d);return F(h,d)}e.trim=C;function O(i,d){if(!i||!d)return i;const h=d.length;if(h===0||i.length===0)return i;let b=0;for(;i.indexOf(d,b)===b;)b=b+h;return i.substring(b)}e.ltrim=O;function F(i,d){if(!i||!d)return i;const h=d.length,b=i.length;if(h===0||b===0)return i;let I=b,J=-1;for(;J=i.lastIndexOf(d,I-1),!(J===-1||J+h!==I);){if(J===0)return"";I=J}return i.substring(0,I)}e.rtrim=F;function W(i){return i.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}e.convertSimple2RegExpPattern=W;function q(i){return i.replace(/\*/g,"")}e.stripWildcards=q;function l(i,d,h={}){if(!i)throw new Error("Cannot create regex from empty string");d||(i=j(i)),h.wholeWord&&(/\B/.test(i.charAt(0))||(i="\\b"+i),/\B/.test(i.charAt(i.length-1))||(i=i+"\\b"));let b="";return h.global&&(b+="g"),h.matchCase||(b+="i"),h.multiline&&(b+="m"),h.unicode&&(b+="u"),new RegExp(i,b)}e.createRegExp=l;function r(i){return i.source==="^"||i.source==="^$"||i.source==="$"||i.source==="^\\s*$"?!1:!!(i.exec("")&&i.lastIndex===0)}e.regExpLeadsToEndlessLoop=r;function n(i){return!!i.match(/([^\\]|^)(\\\\)*\\\d+/)}e.regExpContainsBackreference=n;function s(i){return(i.global?"g":"")+(i.ignoreCase?"i":"")+(i.multiline?"m":"")+(i.unicode?"u":"")}e.regExpFlags=s;function a(i){return i.split(/\r\n|\r|\n/)}e.splitLines=a;function c(i){for(let d=0,h=i.length;d<h;d++){const b=i.charCodeAt(d);if(b!==32&&b!==9)return d}return-1}e.firstNonWhitespaceIndex=c;function u(i,d=0,h=i.length){for(let b=d;b<h;b++){const I=i.charCodeAt(b);if(I!==32&&I!==9)return i.substring(d,b)}return i.substring(d,h)}e.getLeadingWhitespace=u;function t(i,d=i.length-1){for(let h=d;h>=0;h--){const b=i.charCodeAt(h);if(b!==32&&b!==9)return h}return-1}e.lastNonWhitespaceIndex=t;function o(i,d){return i<d?-1:i>d?1:0}e.compare=o;function f(i,d,h=0,b=i.length,I=0,J=d.length){for(;h<b&&I<J;h++,I++){let u1=i.charCodeAt(h),x=d.charCodeAt(I);if(u1<x)return-1;if(u1>x)return 1}const n1=b-h,h1=J-I;return n1<h1?-1:n1>h1?1:0}e.compareSubstring=f;function w(i,d){return v(i,d,0,i.length,0,d.length)}e.compareIgnoreCase=w;function v(i,d,h=0,b=i.length,I=0,J=d.length){for(;h<b&&I<J;h++,I++){let u1=i.charCodeAt(h),x=d.charCodeAt(I);if(u1===x)continue;if(u1>=128||x>=128)return f(i.toLowerCase(),d.toLowerCase(),h,b,I,J);p(u1)&&(u1-=32),p(x)&&(x-=32);const a1=u1-x;if(a1!==0)return a1}const n1=b-h,h1=J-I;return n1<h1?-1:n1>h1?1:0}e.compareSubstringIgnoreCase=v;function p(i){return i>=97&&i<=122}e.isLowerAsciiLetter=p;function e1(i){return i>=65&&i<=90}e.isUpperAsciiLetter=e1;function H(i,d){return i.length===d.length&&v(i,d)===0}e.equalsIgnoreCase=H;function K(i,d){const h=d.length;return d.length>i.length?!1:v(i,d,0,h)===0}e.startsWithIgnoreCase=K;function t1(i,d){let h,b=Math.min(i.length,d.length);for(h=0;h<b;h++)if(i.charCodeAt(h)!==d.charCodeAt(h))return h;return b}e.commonPrefixLength=t1;function i1(i,d){let h,b=Math.min(i.length,d.length);const I=i.length-1,J=d.length-1;for(h=0;h<b;h++)if(i.charCodeAt(I-h)!==d.charCodeAt(J-h))return h;return b}e.commonSuffixLength=i1;function l1(i){return 55296<=i&&i<=56319}e.isHighSurrogate=l1;function N(i){return 56320<=i&&i<=57343}e.isLowSurrogate=N;function Z(i,d){return(i-55296<<10)+(d-56320)+65536}e.computeCodePoint=Z;function s1(i,d,h){const b=i.charCodeAt(h);if(l1(b)&&h+1<d){const I=i.charCodeAt(h+1);if(N(I))return Z(b,I)}return b}e.getNextCodePoint=s1;function $(i,d){const h=i.charCodeAt(d-1);if(N(h)&&d>1){const b=i.charCodeAt(d-2);if(l1(b))return Z(b,h)}return h}class S{constructor(d,h=0){this._str=d,this._len=d.length,this._offset=h}get offset(){return this._offset}setOffset(d){this._offset=d}prevCodePoint(){const d=$(this._str,this._offset);return this._offset-=d>=65536?2:1,d}nextCodePoint(){const d=s1(this._str,this._len,this._offset);return this._offset+=d>=65536?2:1,d}eol(){return this._offset>=this._len}}e.CodePointIterator=S;class M{constructor(d,h=0){this._iterator=new S(d,h)}get offset(){return this._iterator.offset}nextGraphemeLength(){const d=d1.getInstance(),h=this._iterator,b=h.offset;let I=d.getGraphemeBreakType(h.nextCodePoint());for(;!h.eol();){const J=h.offset,n1=d.getGraphemeBreakType(h.nextCodePoint());if(A1(I,n1)){h.setOffset(J);break}I=n1}return h.offset-b}prevGraphemeLength(){const d=d1.getInstance(),h=this._iterator,b=h.offset;let I=d.getGraphemeBreakType(h.prevCodePoint());for(;h.offset>0;){const J=h.offset,n1=d.getGraphemeBreakType(h.prevCodePoint());if(A1(n1,I)){h.setOffset(J);break}I=n1}return b-h.offset}eol(){return this._iterator.eol()}}e.GraphemeIterator=M;function U(i,d){return new M(i,d).nextGraphemeLength()}e.nextCharLength=U;function V(i,d){return new M(i,d).prevGraphemeLength()}e.prevCharLength=V;function z(i,d){d>0&&N(i.charCodeAt(d))&&d--;const h=d+U(i,d);return[h-V(i,h),h]}e.getCharContainingOffset=z;const P=/(?:[\u05BE\u05C0\u05C3\u05C6\u05D0-\u05F4\u0608\u060B\u060D\u061B-\u064A\u066D-\u066F\u0671-\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u0710\u0712-\u072F\u074D-\u07A5\u07B1-\u07EA\u07F4\u07F5\u07FA\u07FE-\u0815\u081A\u0824\u0828\u0830-\u0858\u085E-\u088E\u08A0-\u08C9\u200F\uFB1D\uFB1F-\uFB28\uFB2A-\uFD3D\uFD50-\uFDC7\uFDF0-\uFDFC\uFE70-\uFEFC]|\uD802[\uDC00-\uDD1B\uDD20-\uDE00\uDE10-\uDE35\uDE40-\uDEE4\uDEEB-\uDF35\uDF40-\uDFFF]|\uD803[\uDC00-\uDD23\uDE80-\uDEA9\uDEAD-\uDF45\uDF51-\uDF81\uDF86-\uDFF6]|\uD83A[\uDC00-\uDCCF\uDD00-\uDD43\uDD4B-\uDFFF]|\uD83B[\uDC00-\uDEBB])/;function B(i){return P.test(i)}e.containsRTL=B;const G=/^[\t\n\r\x20-\x7E]*$/;function r1(i){return G.test(i)}e.isBasicASCII=r1,e.UNUSUAL_LINE_TERMINATORS=/[\u2028\u2029]/;function o1(i){return e.UNUSUAL_LINE_TERMINATORS.test(i)}e.containsUnusualLineTerminators=o1;function g1(i){return i>=11904&&i<=55215||i>=63744&&i<=64255||i>=65281&&i<=65374}e.isFullWidthCharacter=g1;function w1(i){return i>=127462&&i<=127487||i===8986||i===8987||i===9200||i===9203||i>=9728&&i<=10175||i===11088||i===11093||i>=127744&&i<=128591||i>=128640&&i<=128764||i>=128992&&i<=129008||i>=129280&&i<=129535||i>=129648&&i<=129782}e.isEmojiImprecise=w1;function b1(i,d){if(i.length<d)return i;const h=/\b/g;let b=0;for(;h.test(i)&&!(i.length-h.lastIndex<d);)b=h.lastIndex,h.lastIndex+=1;return i.substring(b).replace(/^\s/,"")}e.lcut=b1;const E1=/\x1B\x5B[12]?K/g,p1=/\x1b\[\d+m/g,L1=/\x1b\[0?m/g;function D1(i){return i&&(i=i.replace(E1,""),i=i.replace(p1,""),i=i.replace(L1,"")),i}e.removeAnsiEscapeCodes=D1,e.UTF8_BOM_CHARACTER=String.fromCharCode(65279);function y1(i){return!!(i&&i.length>0&&i.charCodeAt(0)===65279)}e.startsWithUTF8BOM=y1;function O1(i){return y1(i)?i.substr(1):i}e.stripUTF8BOM=O1;function S1(i,d){if(!i||!d||i.length<d.length)return!1;const h=d.length,b=i.toLowerCase();let I=0,J=-1;for(;I<h;){const n1=b.indexOf(d[I],J+1);if(n1<0)return!1;J=n1,I++}return!0}e.fuzzyContains=S1;function P1(i,d=!1){return i?(d&&(i=i.replace(/\\./g,"")),i.toLowerCase()!==i):!1}e.containsUppercaseCharacter=P1;function F1(i){return i.charAt(0).toUpperCase()+i.slice(1)}e.uppercaseFirstLetter=F1;function N1(i,d=1){if(d===0)return"";let h=-1;do h=i.indexOf(` `,h+1),d--;while(d>0&&h>=0);return h===-1?i:(i[h-1]==="\r"&&h--,i.substr(0,h))}e.getNLines=N1;function I1(i){const d=90-65+1;return i=i%(2*d),i<d?String.fromCharCode(97+i):String.fromCharCode(65+i-d)}e.singleLetterHash=I1;function R1(i){return d1.getInstance().getGraphemeBreakType(i)}e.getGraphemeBreakType=R1;function A1(i,d){return i===0?d!==5&&d!==7:i===2&&d===3?!1:i===4||i===2||i===3||d===4||d===2||d===3?!0:!(i===8&&(d===8||d===9||d===11||d===12)||(i===11||i===9)&&(d===9||d===10)||(i===12||i===10)&&d===10||d===5||d===13||d===7||i===1||i===13&&d===14||i===6&&d===6)}var M1;(function(i){i[i.Other=0]="Other",i[i.Prepend=1]="Prepend",i[i.CR=2]="CR",i[i.LF=3]="LF",i[i.Control=4]="Control",i[i.Extend=5]="Extend",i[i.Regional_Indicator=6]="Regional_Indicator",i[i.SpacingMark=7]="SpacingMark",i[i.L=8]="L",i[i.V=9]="V",i[i.T=10]="T",i[i.LV=11]="LV",i[i.LVT=12]="LVT",i[i.ZWJ=13]="ZWJ",i[i.Extended_Pictographic=14]="Extended_Pictographic"})(M1=e.GraphemeBreakType||(e.GraphemeBreakType={}));class d1{constructor(){this._data=$1()}static getInstance(){return d1._INSTANCE||(d1._INSTANCE=new d1),d1._INSTANCE}getGraphemeBreakType(d){if(d<32)return d===10?3:d===13?2:4;if(d<127)return 0;const h=this._data,b=h.length/3;let I=1;for(;I<=b;)if(d<h[3*I])I=2*I;else if(d>h[3*I+1])I=2*I+1;else return h[3*I+