????

Your IP : 3.138.119.75


Current Path : C:/Program Files/Azure Data Studio/resources/app/out/vs/platform/terminal/node/
Upload File :
Current File : C:/Program Files/Azure Data Studio/resources/app/out/vs/platform/terminal/node/ptyHostMain.js

/*!--------------------------------------------------------
 * Copyright (C) Microsoft Corporation. All rights reserved.
 *--------------------------------------------------------*/(function(){var ce=["require","exports","vs/base/common/platform","vs/base/common/lifecycle","vs/base/common/event","vs/base/common/uri","vs/base/common/errors","vs/base/common/path","vs/base/common/types","vs/base/common/async","vs/nls!vs/platform/terminal/node/ptyHostMain","vs/platform/log/common/log","vs/base/common/strings","vs/nls","vs/base/common/decorators","vs/base/common/process","vs/base/common/cancellation","vs/base/common/buffer","vs/base/common/network","os","vs/platform/instantiation/common/instantiation","vs/base/common/arrays","vs/base/common/resources","vs/base/node/pfs","child_process","vs/base/parts/ipc/common/ipc","vs/platform/terminal/common/terminal","vs/base/common/functional","vs/base/common/lazy","vs/base/common/map","vs/base/common/objects","vs/base/parts/sandbox/node/electronTypes","vs/base/common/extpath","vs/base/common/processes","vs/base/node/processes","vs/platform/contextkey/common/contextkey","vs/platform/terminal/common/environmentVariable","vs/platform/terminal/common/terminalEnvironment","vs/platform/terminal/node/childProcessMonitor","vs/platform/terminal/node/terminalEnvironment","vs/base/common/assert","vs/base/common/iterator","vs/base/common/linkedList","vs/base/common/normalization","vs/base/common/stopwatch","vs/base/common/cache","vs/base/common/stream","vs/base/common/hash","vs/base/common/symbols","vs/base/common/ternarySearchTree","vs/base/common/uuid","vs/nls!vs/base/common/date","vs/base/common/date","vs/nls!vs/base/common/errorMessage","vs/base/common/errorMessage","vs/nls!vs/base/common/platform","vs/base/common/console","vs/base/common/marshalling","vs/base/common/uriIpc","vs/base/node/powershell","vs/base/node/ps","vs/base/node/shell","vs/base/parts/ipc/node/ipc.cp","vs/base/parts/ipc/node/ipc.mp","vs/nls!vs/platform/contextkey/common/contextkey","vs/nls!vs/platform/contextkey/common/scanner","vs/nls!vs/platform/environment/node/argv","vs/nls!vs/platform/files/common/files","vs/nls!vs/platform/terminal/node/ptyService","vs/nls!vs/platform/terminal/node/terminalProcess","vs/platform/contextkey/common/scanner","vs/platform/environment/common/environmentService","vs/platform/environment/node/argv","vs/platform/environment/node/userDataPath","path","vs/platform/environment/node/environmentService","vs/platform/files/common/files","vs/platform/log/common/logIpc","vs/platform/log/common/logService","vs/platform/log/node/spdlogLog","vs/platform/log/node/loggerService","vs/platform/product/common/product","vs/platform/product/common/productService","vs/platform/registry/common/platform","vs/platform/terminal/common/capabilities/bufferMarkCapability","vs/platform/terminal/common/capabilities/commandDetectionCapability","vs/platform/terminal/common/capabilities/cwdDetectionCapability","vs/platform/terminal/common/capabilities/partialCommandDetectionCapability","vs/platform/terminal/common/capabilities/terminalCapabilityStore","vs/platform/terminal/common/environmentVariableCollection","vs/platform/terminal/common/environmentVariableShared","vs/platform/terminal/common/requestStore","vs/platform/terminal/common/terminalAutoResponder","vs/platform/terminal/common/terminalDataBuffering","vs/platform/terminal/common/terminalStrings","vs/platform/terminal/common/xterm/shellIntegrationAddon","vs/platform/terminal/node/heartbeatService","vs/platform/terminal/node/windowsShellHelper","vs/platform/terminal/node/terminalProcess","vs/platform/terminal/node/ptyService","fs","util","minimist","node-pty","xterm-headless","vs/base/common/performance","vs/platform/terminal/node/ptyHostMain"],he=function(oe){for(var e=[],w=0,I=oe.length;w<I;w++)e[w]=ce[oe[w]];return e};define(ce[14],he([0,1]),function(oe,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.throttle=e.debounce=e.memoize=void 0;function w(O){return(P,m,c)=>{let A=null,y=null;if(typeof c.value=="function"?(A="value",y=c.value):typeof c.get=="function"&&(A="get",y=c.get),!y)throw new Error("not supported");c[A]=O(y,m)}}function I(O,P,m){let c=null,A=null;if(typeof m.value=="function"?(c="value",A=m.value,A.length!==0&&console.warn("Memoize should only be used in functions with zero parameters")):typeof m.get=="function"&&(c="get",A=m.get),!A)throw new Error("not supported");const y=`$memoize$${P}`;m[c]=function(...L){return this.hasOwnProperty(y)||Object.defineProperty(this,y,{configurable:!1,enumerable:!1,writable:!1,value:A.apply(this,L)}),this[y]}}e.memoize=I;function b(O,P,m){return w((c,A)=>{const y=`$debounce$${A}`,L=`$debounce$result$${A}`;return function(...t){this[L]||(this[L]=m?m():void 0),clearTimeout(this[y]),P&&(this[L]=P(this[L],...t),t=[this[L]]),this[y]=setTimeout(()=>{c.apply(this,t),this[L]=m?m():void 0},O)}})}e.debounce=b;function k(O,P,m){return w((c,A)=>{const y=`$throttle$timer$${A}`,L=`$throttle$result$${A}`,t=`$throttle$lastRun$${A}`,u=`$throttle$pending$${A}`;return function(...a){if(this[L]||(this[L]=m?m():void 0),(this[t]===null||this[t]===void 0)&&(this[t]=-Number.MAX_VALUE),P&&(this[L]=P(this[L],...a)),this[u])return;const i=this[t]+O;i<=Date.now()?(this[t]=Date.now(),c.apply(this,[this[L]]),this[L]=m?m():void 0):(this[u]=!0,this[y]=setTimeout(()=>{this[u]=!1,this[t]=Date.now(),c.apply(this,[this[L]]),this[L]=m?m():void 0},i-Date.now()))}})}e.throttle=k}),define(ce[6],he([0,1]),function(oe,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BugIndicatingError=e.ErrorNoTelemetry=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.isSigPipeError=e.setUnexpectedErrorHandler=e.errorHandler=e.ErrorHandler=void 0;class w{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(h){setTimeout(()=>{throw h.stack?C.isErrorNoTelemetry(h)?new C(h.message+`

`+h.stack):new Error(h.message+`

`+h.stack):h},0)}}addListener(h){return this.listeners.push(h),()=>{this._removeListener(h)}}emit(h){this.listeners.forEach(S=>{S(h)})}_removeListener(h){this.listeners.splice(this.listeners.indexOf(h),1)}setUnexpectedErrorHandler(h){this.unexpectedErrorHandler=h}getUnexpectedErrorHandler(){return this.unexpectedErrorHandler}onUnexpectedError(h){this.unexpectedErrorHandler(h),this.emit(h)}onUnexpectedExternalError(h){this.unexpectedErrorHandler(h)}}e.ErrorHandler=w,e.errorHandler=new w;function I(n){e.errorHandler.setUnexpectedErrorHandler(n)}e.setUnexpectedErrorHandler=I;function b(n){if(!n||typeof n!="object")return!1;const h=n;return h.code==="EPIPE"&&h.syscall?.toUpperCase()==="WRITE"}e.isSigPipeError=b;function k(n){c(n)||e.errorHandler.onUnexpectedError(n)}e.onUnexpectedError=k;function O(n){c(n)||e.errorHandler.onUnexpectedExternalError(n)}e.onUnexpectedExternalError=O;function P(n){if(n instanceof Error){const{name:h,message:S}=n;let p=n.errorCode;const D=n.stacktrace||n.stack;return{$isError:!0,name:h,message:S,stack:D,errorCode:p,data:n.data}}return n}e.transformErrorForSerialization=P;const m="Canceled";function c(n){return n instanceof A?!0:n instanceof Error&&n.name===m&&n.message===m}e.isCancellationError=c;class A extends Error{constructor(){super(m),this.name=this.message}}e.CancellationError=A;function y(){const n=new Error(m);return n.name=n.message,n}e.canceled=y;function L(n){return n?new Error(`Illegal argument: ${n}`):new Error("Illegal argument")}e.illegalArgument=L;function t(n){return n?new Error(`Illegal state: ${n}`):new Error("Illegal state")}e.illegalState=t;function u(n){return n?new Error(`readonly property '${n} cannot be changed'`):new Error("readonly property cannot be changed")}e.readonly=u;function a(n){const h=new Error(`${n} has been disposed`);return h.name="DISPOSED",h}e.disposed=a;function i(n){return n?n.message?n.message:n.stack?n.stack.split(`
`)[0]:String(n):"Error"}e.getErrorMessage=i;class v extends Error{constructor(h){super("NotImplemented"),h&&(this.message=h)}}e.NotImplementedError=v;class r extends Error{constructor(h){super("NotSupported"),h&&(this.message=h)}}e.NotSupportedError=r;class _ extends Error{constructor(){super(...arguments),this.isExpected=!0}}e.ExpectedError=_;class C extends Error{constructor(h){super(h),this.name="CodeExpectedError"}static fromError(h){if(h instanceof C)return h;const S=new C;return S.message=h.message,S.stack=h.stack,S}static isErrorNoTelemetry(h){return h.name==="CodeExpectedError"}}e.ErrorNoTelemetry=C;class o extends Error{constructor(h){super(h||"An unexpected bug occurred."),Object.setPrototypeOf(this,o.prototype)}}e.BugIndicatingError=o}),define(ce[21],he([0,1,6]),function(oe,e,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CallbackIterable=e.ArrayQueue=e.findMaxIdxBy=e.findMinBy=e.findLastMaxBy=e.findMaxBy=e.reverseOrder=e.booleanComparator=e.numberComparator=e.tieBreakComparators=e.compareBy=e.CompareResult=e.splice=e.insertInto=e.mapFind=e.getRandomElement=e.asArray=e.mapArrayOrNot=e.pushMany=e.pushToEnd=e.pushToStart=e.shuffle=e.arrayInsert=e.remove=e.insert=e.index=e.range=e.flatten=e.commonPrefixLength=e.lastOrDefault=e.firstOrDefault=e.findLastIndex=e.findLast=e.uniqueFilter=e.distinct=e.isNonEmptyArray=e.isFalsyOrEmpty=e.move=e.coalesceInPlace=e.coalesce=e.topAsync=e.top=e.delta=e.sortedDiff=e.groupBy=e.quickSelect=e.findFirstInSorted=e.binarySearch2=e.binarySearch=e.removeFastWithoutKeepingOrder=e.equals=e.tail2=e.tail=void 0;function I(N,$=0){return N[N.length-(1+$)]}e.tail=I;function b(N){if(N.length===0)throw new Error("Invalid tail call");return[N.slice(0,N.length-1),N[N.length-1]]}e.tail2=b;function k(N,$,j=(X,ee)=>X===ee){if(N===$)return!0;if(!N||!$||N.length!==$.length)return!1;for(let X=0,ee=N.length;X<ee;X++)if(!j(N[X],$[X]))return!1;return!0}e.equals=k;function O(N,$){const j=N.length-1;$<j&&(N[$]=N[j]),N.pop()}e.removeFastWithoutKeepingOrder=O;function P(N,$,j){return m(N.length,X=>j(N[X],$))}e.binarySearch=P;function m(N,$){let j=0,X=N-1;for(;j<=X;){const ee=(j+X)/2|0,pe=$(ee);if(pe<0)j=ee+1;else if(pe>0)X=ee-1;else return ee}return-(j+1)}e.binarySearch2=m;function c(N,$){let j=0,X=N.length;if(X===0)return 0;for(;j<X;){const ee=Math.floor((j+X)/2);$(N[ee])?X=ee:j=ee+1}return j}e.findFirstInSorted=c;function A(N,$,j){if(N=N|0,N>=$.length)throw new TypeError("invalid index");const X=$[Math.floor($.length*Math.random())],ee=[],pe=[],_e=[];for(const we of $){const Ce=j(we,X);Ce<0?ee.push(we):Ce>0?pe.push(we):_e.push(we)}return N<ee.length?A(N,ee,j):N<ee.length+_e.length?_e[0]:A(N-(ee.length+_e.length),pe,j)}e.quickSelect=A;function y(N,$){const j=[];let X;for(const ee of N.slice(0).sort($))!X||$(X[0],ee)!==0?(X=[ee],j.push(X)):X.push(ee);return j}e.groupBy=y;function L(N,$,j){const X=[];function ee(we,Ce,be){if(Ce===0&&be.length===0)return;const Ee=X[X.length-1];Ee&&Ee.start+Ee.deleteCount===we?(Ee.deleteCount+=Ce,Ee.toInsert.push(...be)):X.push({start:we,deleteCount:Ce,toInsert:be})}let pe=0,_e=0;for(;;){if(pe===N.length){ee(pe,0,$.slice(_e));break}if(_e===$.length){ee(pe,N.length-pe,[]);break}const we=N[pe],Ce=$[_e],be=j(we,Ce);be===0?(pe+=1,_e+=1):be<0?(ee(pe,1,[]),pe+=1):be>0&&(ee(pe,0,[Ce]),_e+=1)}return X}e.sortedDiff=L;function t(N,$,j){const X=L(N,$,j),ee=[],pe=[];for(const _e of X)ee.push(...N.slice(_e.start,_e.start+_e.deleteCount)),pe.push(..._e.toInsert);return{removed:ee,added:pe}}e.delta=t;function u(N,$,j){if(j===0)return[];const X=N.slice(0,j).sort($);return i(N,$,X,j,N.length),X}e.top=u;function a(N,$,j,X,ee){return j===0?Promise.resolve([]):new Promise((pe,_e)=>{(async()=>{const we=N.length,Ce=N.slice(0,j).sort($);for(let be=j,Ee=Math.min(j+X,we);be<we;be=Ee,Ee=Math.min(Ee+X,we)){if(be>j&&await new Promise(Oe=>setTimeout(Oe)),ee&&ee.isCancellationRequested)throw new w.CancellationError;i(N,$,Ce,be,Ee)}return Ce})().then(pe,_e)})}e.topAsync=a;function i(N,$,j,X,ee){for(const pe=j.length;X<ee;X++){const _e=N[X];if($(_e,j[pe-1])<0){j.pop();const we=c(j,Ce=>$(_e,Ce)<0);j.splice(we,0,_e)}}}function v(N){return N.filter($=>!!$)}e.coalesce=v;function r(N){let $=0;for(let j=0;j<N.length;j++)N[j]&&(N[$]=N[j],$+=1);N.length=$}e.coalesceInPlace=r;function _(N,$,j){N.splice(j,0,N.splice($,1)[0])}e.move=_;function C(N){return!Array.isArray(N)||N.length===0}e.isFalsyOrEmpty=C;function o(N){return Array.isArray(N)&&N.length>0}e.isNonEmptyArray=o;function n(N,$=j=>j){const j=new Set;return N.filter(X=>{const ee=$(X);return j.has(ee)?!1:(j.add(ee),!0)})}e.distinct=n;function h(N){const $=new Set;return j=>{const X=N(j);return $.has(X)?!1:($.add(X),!0)}}e.uniqueFilter=h;function S(N,$){const j=p(N,$);if(j!==-1)return N[j]}e.findLast=S;function p(N,$){for(let j=N.length-1;j>=0;j--){const X=N[j];if($(X))return j}return-1}e.findLastIndex=p;function D(N,$){return N.length>0?N[0]:$}e.firstOrDefault=D;function f(N,$){return N.length>0?N[N.length-1]:$}e.lastOrDefault=f;function g(N,$,j=(X,ee)=>X===ee){let X=0;for(let ee=0,pe=Math.min(N.length,$.length);ee<pe&&j(N[ee],$[ee]);ee++)X++;return X}e.commonPrefixLength=g;function M(N){return[].concat(...N)}e.flatten=M;function F(N,$){let j=typeof $=="number"?N:0;typeof $=="number"?j=N:(j=0,$=N);const X=[];if(j<=$)for(let ee=j;ee<$;ee++)X.push(ee);else for(let ee=j;ee>$;ee--)X.push(ee);return X}e.range=F;function l(N,$,j){return N.reduce((X,ee)=>(X[$(ee)]=j?j(ee):ee,X),Object.create(null))}e.index=l;function E(N,$){return N.push($),()=>B(N,$)}e.insert=E;function B(N,$){const j=N.indexOf($);if(j>-1)return N.splice(j,1),$}e.remove=B;function V(N,$,j){const X=N.slice(0,$),ee=N.slice($);return X.concat(j,ee)}e.arrayInsert=V;function T(N,$){let j;if(typeof $=="number"){let X=$;j=()=>{const ee=Math.sin(X++)*179426549;return ee-Math.floor(ee)}}else j=Math.random;for(let X=N.length-1;X>0;X-=1){const ee=Math.floor(j()*(X+1)),pe=N[X];N[X]=N[ee],N[ee]=pe}}e.shuffle=T;function q(N,$){const j=N.indexOf($);j>-1&&(N.splice(j,1),N.unshift($))}e.pushToStart=q;function J(N,$){const j=N.indexOf($);j>-1&&(N.splice(j,1),N.push($))}e.pushToEnd=J;function x(N,$){for(const j of $)N.push(j)}e.pushMany=x;function Q(N,$){return Array.isArray(N)?N.map($):$(N)}e.mapArrayOrNot=Q;function ne(N){return Array.isArray(N)?N:[N]}e.asArray=ne;function ue(N){return N[Math.floor(Math.random()*N.length)]}e.getRandomElement=ue;function fe(N,$){for(const j of N){const X=$(j);if(X!==void 0)return X}}e.mapFind=fe;function K(N,$,j){const X=R(N,$),ee=N.length,pe=j.length;N.length=ee+pe;for(let _e=ee-1;_e>=X;_e--)N[_e+pe]=N[_e];for(let _e=0;_e<pe;_e++)N[_e+X]=j[_e]}e.insertInto=K;function z(N,$,j,X){const ee=R(N,$),pe=N.splice(ee,j);return K(N,ee,X),pe}e.splice=z;function R(N,$){return $<0?Math.max($+N.length,0):Math.min($,N.length)}var G;(function(N){function $(pe){return pe<0}N.isLessThan=$;function j(pe){return pe<=0}N.isLessThanOrEqual=j;function X(pe){return pe>0}N.isGreaterThan=X;function ee(pe){return pe===0}N.isNeitherLessOrGreaterThan=ee,N.greaterThan=1,N.lessThan=-1,N.neitherLessOrGreaterThan=0})(G||(e.CompareResult=G={}));function se(N,$){return(j,X)=>$(N(j),N(X))}e.compareBy=se;function te(...N){return($,j)=>{for(const X of N){const ee=X($,j);if(!G.isNeitherLessOrGreaterThan(ee))return ee}return G.neitherLessOrGreaterThan}}e.tieBreakComparators=te;const ge=(N,$)=>N-$;e.numberComparator=ge;const Z=(N,$)=>(0,e.numberComparator)(N?1:0,$?1:0);e.booleanComparator=Z;function s(N){return($,j)=>-N($,j)}e.reverseOrder=s;function d(N,$){if(N.length===0)return;let j=N[0];for(let X=1;X<N.length;X++){const ee=N[X];$(ee,j)>0&&(j=ee)}return j}e.findMaxBy=d;function W(N,$){if(N.length===0)return;let j=N[0];for(let X=1;X<N.length;X++){const ee=N[X];$(ee,j)>=0&&(j=ee)}return j}e.findLastMaxBy=W;function H(N,$){return d(N,(j,X)=>-$(j,X))}e.findMinBy=H;function ie(N,$){if(N.length===0)return-1;let j=0;for(let X=1;X<N.length;X++){const ee=N[X];$(ee,N[j])>0&&(j=X)}return j}e.findMaxIdxBy=ie;class ae{constructor($){this.items=$,this.firstIdx=0,this.lastIdx=this.items.length-1}get length(){return this.lastIdx-this.firstIdx+1}takeWhile($){let j=this.firstIdx;for(;j<this.items.length&&$(this.items[j]);)j++;const X=j===this.firstIdx?null:this.items.slice(this.firstIdx,j);return this.firstIdx=j,X}takeFromEndWhile($){let j=this.lastIdx;for(;j>=0&&$(this.items[j]);)j--;const X=j===this.lastIdx?null:this.items.slice(j+1,this.lastIdx+1);return this.lastIdx=j,X}peek(){if(this.length!==0)return this.items[this.firstIdx]}peekLast(){if(this.length!==0)return this.items[this.lastIdx]}dequeue(){const $=this.items[this.firstIdx];return this.firstIdx++,$}removeLast(){const $=this.items[this.lastIdx];return this.lastIdx--,$}takeCount($){const j=this.items.slice(this.firstIdx,this.firstIdx+$);return this.firstIdx+=$,j}}e.ArrayQueue=ae;class le{static{this.empty=new le($=>{})}constructor($){this.iterate=$}forEach($){this.iterate(j=>($(j),!0))}toArray(){const $=[];return this.iterate(j=>($.push(j),!0)),$}filter($){return new le(j=>this.iterate(X=>$(X)?j(X):!0))}map($){return new le(j=>this.iterate(X=>j($(X))))}some($){let j=!1;return this.iterate(X=>(j=$(X),!j)),j}findFirst($){let j;return this.iterate(X=>$(X)?(j=X,!1):!0),j}findLast($){let j;return this.iterate(X=>($(X)&&(j=X),!0)),j}findLastMaxBy($){let j,X=!0;return this.iterate(ee=>((X||G.isGreaterThan($(ee,j)))&&(X=!1,j=ee),!0)),j}}e.CallbackIterable=le}),define(ce[40],he([0,1,6]),function(oe,e,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.checkAdjacentItems=e.assertFn=e.assert=e.assertNever=e.ok=void 0;function I(m,c){if(!m)throw new Error(c?`Assertion failed (${c})`:"Assertion Failed")}e.ok=I;function b(m,c="Unreachable"){throw new Error(c)}e.assertNever=b;function k(m){if(!m)throw new w.BugIndicatingError("Assertion Failed")}e.assert=k;function O(m){if(!m()){debugger;m(),(0,w.onUnexpectedError)(new w.BugIndicatingError("Assertion Failed"))}}e.assertFn=O;function P(m,c){let A=0;for(;A<m.length-1;){const y=m[A],L=m[A+1];if(!c(y,L))return!1;A++}return!0}e.checkAdjacentItems=P}),define(ce[27],he([0,1]),function(oe,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.once=void 0;function w(I){const b=this;let k=!1,O;return function(){return k||(k=!0,O=I.apply(b,arguments)),O}}e.once=w}),define(ce[41],he([0,1]),function(oe,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Iterable=void 0;var w;(function(I){function b(C){return C&&typeof C=="object"&&typeof C[Symbol.iterator]=="function"}I.is=b;const k=Object.freeze([]);function O(){return k}I.empty=O;function*P(C){yield C}I.single=P;function m(C){return b(C)?C:P(C)}I.wrap=m;function c(C){return C||k}I.from=c;function A(C){return!C||C[Symbol.iterator]().next().done===!0}I.isEmpty=A;function y(C){return C[Symbol.iterator]().next().value}I.first=y;function L(C,o){for(const n of C)if(o(n))return!0;return!1}I.some=L;function t(C,o){for(const n of C)if(o(n))return n}I.find=t;function*u(C,o){for(const n of C)o(n)&&(yield n)}I.filter=u;function*a(C,o){let n=0;for(const h of C)yield o(h,n++)}I.map=a;function*i(...C){for(const o of C)for(const n of o)yield n}I.concat=i;function v(C,o,n){let h=n;for(const S of C)h=o(h,S);return h}I.reduce=v;function*r(C,o,n=C.length){for(o<0&&(o+=C.length),n<0?n+=C.length:n>C.length&&(n=C.length);o<n;o++)yield C[o]}I.slice=r;function _(C,o=Number.POSITIVE_INFINITY){const n=[];if(o===0)return[n,C];const h=C[Symbol.iterator]();for(let S=0;S<o;S++){const p=h.next();if(p.done)return[n,I.empty()];n.push(p.value)}return[n,{[Symbol.iterator](){return h}}]}I.consume=_})(w||(e.Iterable=w={}))}),define(ce[28],he([0,1]),function(oe,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Lazy=void 0;class w{constructor(b){this.executor=b,this._didRun=!1}get hasValue(){return this._didRun}get value(){if(!this._didRun)try{this._value=this.executor()}catch(b){this._error=b}finally{this._didRun=!0}if(this._error)throw this._error;return this._value}get rawValue(){return this._value}}e.Lazy=w}),define(ce[3],he([0,1,27,41]),function(oe,e,w,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DisposableMap=e.disposeOnReturn=e.ImmortalReference=e.AsyncReferenceCollection=e.ReferenceCollection=e.SafeDisposable=e.RefCountedDisposable=e.MutableDisposable=e.Disposable=e.DisposableStore=e.toDisposable=e.combinedDisposable=e.disposeIfDisposable=e.dispose=e.isDisposable=e.markAsSingleton=e.setDisposableTracker=void 0;const b=!1;let k=null;function O(f){k=f}if(e.setDisposableTracker=O,b){const f="__is_disposable_tracked__";O(new class{trackDisposable(g){const M=new Error("Potentially leaked disposable").stack;setTimeout(()=>{g[f]||console.log(M)},3e3)}setParent(g,M){if(g&&g!==r.None)try{g[f]=!0}catch{}}markAsDisposed(g){if(g&&g!==r.None)try{g[f]=!0}catch{}}markAsSingleton(g){}})}function P(f){return k?.trackDisposable(f),f}function m(f){k?.markAsDisposed(f)}function c(f,g){k?.setParent(f,g)}function A(f,g){if(k)for(const M of f)k.setParent(M,g)}function y(f){return k?.markAsSingleton(f),f}e.markAsSingleton=y;function L(f){return typeof f.dispose=="function"&&f.dispose.length===0}e.isDisposable=L;function t(f){if(I.Iterable.is(f)){const g=[];for(const M of f)if(M)try{M.dispose()}catch(F){g.push(F)}if(g.length===1)throw g[0];if(g.length>1)throw new AggregateError(g,"Encountered errors while disposing of store");return Array.isArray(f)?[]:f}else if(f)return f.dispose(),f}e.dispose=t;function u(f){for(const g of f)L(g)&&g.dispose();return[]}e.disposeIfDisposable=u;function a(...f){const g=i(()=>t(f));return A(f,g),g}e.combinedDisposable=a;function i(f){const g=P({dispose:(0,w.once)(()=>{m(g),f()})});return g}e.toDisposable=i;class v{static{this.DISABLE_DISPOSED_WARNING=!1}constructor(){this._toDispose=new Set,this._isDisposed=!1,P(this)}dispose(){this._isDisposed||(m(this),this._isDisposed=!0,this.clear())}get isDisposed(){return this._isDisposed}clear(){if(this._toDispose.size!==0)try{t(this._toDispose)}finally{this._toDispose.clear()}}add(g){if(!g)return g;if(g===this)throw new Error("Cannot register a disposable on itself!");return c(g,this),this._isDisposed?v.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(g),g}}e.DisposableStore=v;class r{static{this.None=Object.freeze({dispose(){}})}constructor(){this._store=new v,P(this),c(this._store,this)}dispose(){m(this),this._store.dispose()}_register(g){if(g===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(g)}}e.Disposable=r;class _{constructor(){this._isDisposed=!1,P(this)}get value(){return this._isDisposed?void 0:this._value}set value(g){this._isDisposed||g===this._value||(this._value?.dispose(),g&&c(g,this),this._value=g)}clear(){this.value=void 0}dispose(){this._isDisposed=!0,m(this),this._value?.dispose(),this._value=void 0}clearAndLeak(){const g=this._value;return this._value=void 0,g&&c(g,null),g}}e.MutableDisposable=_;class C{constructor(g){this._disposable=g,this._counter=1}acquire(){return this._counter++,this}release(){return--this._counter===0&&this._disposable.dispose(),this}}e.RefCountedDisposable=C;class o{constructor(){this.dispose=()=>{},this.unset=()=>{},this.isset=()=>!1,P(this)}set(g){let M=g;return this.unset=()=>M=void 0,this.isset=()=>M!==void 0,this.dispose=()=>{M&&(M(),M=void 0,m(this))},this}}e.SafeDisposable=o;class n{constructor(){this.references=new Map}acquire(g,...M){let F=this.references.get(g);F||(F={counter:0,object:this.createReferencedObject(g,...M)},this.references.set(g,F));const{object:l}=F,E=(0,w.once)(()=>{--F.counter===0&&(this.destroyReferencedObject(g,F.object),this.references.delete(g))});return F.counter++,{object:l,dispose:E}}}e.ReferenceCollection=n;class h{constructor(g){this.referenceCollection=g}async acquire(g,...M){const F=this.referenceCollection.acquire(g,...M);try{return{object:await F.object,dispose:()=>F.dispose()}}catch(l){throw F.dispose(),l}}}e.AsyncReferenceCollection=h;class S{constructor(g){this.object=g}dispose(){}}e.ImmortalReference=S;function p(f){const g=new v;try{f(g)}finally{g.dispose()}}e.disposeOnReturn=p;class D{constructor(){this._store=new Map,this._isDisposed=!1,P(this)}dispose(){m(this),this._isDisposed=!0,this.clearAndDisposeAll()}clearAndDisposeAll(){if(this._store.size)try{t(this._store.values())}finally{this._store.clear()}}has(g){return this._store.has(g)}get(g){return this._store.get(g)}set(g,M,F=!1){this._isDisposed&&console.warn(new Error("Trying to add a disposable to a DisposableMap that has already been disposed of. The added object will be leaked!").stack),F||this._store.get(g)?.dispose(),this._store.set(g,M)}deleteAndDispose(g){this._store.get(g)?.dispose(),this._store.delete(g)}[Symbol.iterator](){return this._store[Symbol.iterator]()}}e.DisposableMap=D}),define(ce[42],he([0,1]),function(oe,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LinkedList=void 0;class w{static{this.Undefined=new w(void 0)}constructor(k){this.element=k,this.next=w.Undefined,this.prev=w.Undefined}}class I{constructor(){this._first=w.Undefined,this._last=w.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===w.Undefined}clear(){let k=this._first;for(;k!==w.Undefined;){const O=k.next;k.prev=w.Undefined,k.next=w.Undefined,k=O}this._first=w.Undefined,this._last=w.Undefined,this._size=0}unshift(k){return this._insert(k,!1)}push(k){return this._insert(k,!0)}_insert(k,O){const P=new w(k);if(this._first===w.Undefined)this._first=P,this._last=P;else if(O){const c=this._last;this._last=P,P.prev=c,c.next=P}else{const c=this._first;this._first=P,P.next=c,c.prev=P}this._size+=1;let m=!1;return()=>{m||(m=!0,this._remove(P))}}shift(){if(this._first!==w.Undefined){const k=this._first.element;return this._remove(this._first),k}}pop(){if(this._last!==w.Undefined){const k=this._last.element;return this._remove(this._last),k}}_remove(k){if(k.prev!==w.Undefined&&k.next!==w.Undefined){const O=k.prev;O.next=k.next,k.next.prev=O}else k.prev===w.Undefined&&k.next===w.Undefined?(this._first=w.Undefined,this._last=w.Undefined):k.next===w.Undefined?(this._last=this._last.prev,this._last.next=w.Undefined):k.prev===w.Undefined&&(this._first=this._first.next,this._first.prev=w.Undefined);this._size-=1}*[Symbol.iterator](){let k=this._first;for(;k!==w.Undefined;)yield k.element,k=k.next}}e.LinkedList=I}),define(ce[29],he([0,1]),function(oe,e){"use strict";var w,I,b;Object.defineProperty(e,"__esModule",{value:!0}),e.CounterSet=e.LRUCache=e.LinkedMap=e.Touch=e.ResourceSet=e.ResourceMap=e.setToString=e.mapToString=e.getOrSet=void 0;function k(a,i,v){let r=a.get(i);return r===void 0&&(r=v,a.set(i,r)),r}e.getOrSet=k;function O(a){const i=[];return a.forEach((v,r)=>{i.push(`${r} => ${v}`)}),`Map(${a.size}) {${i.join(", ")}}`}e.mapToString=O;function P(a){const i=[];return a.forEach(v=>{i.push(v)}),`Set(${a.size}) {${i.join(", ")}}`}e.setToString=P;class m{constructor(i,v){this.uri=i,this.value=v}}class c{static{this.defaultToKey=i=>i.toString()}constructor(i,v){this[w]="ResourceMap",i instanceof c?(this.map=new Map(i.map),this.toKey=v??c.defaultToKey):(this.map=new Map,this.toKey=i??c.defaultToKey)}set(i,v){return this.map.set(this.toKey(i),new m(i,v)),this}get(i){return this.map.get(this.toKey(i))?.value}has(i){return this.map.has(this.toKey(i))}get size(){return this.map.size}clear(){this.map.clear()}delete(i){return this.map.delete(this.toKey(i))}forEach(i,v){typeof v<"u"&&(i=i.bind(v));for(const[r,_]of this.map)i(_.value,_.uri,this)}*values(){for(const i of this.map.values())yield i.value}*keys(){for(const i of this.map.values())yield i.uri}*entries(){for(const i of this.map.values())yield[i.uri,i.value]}*[(w=Symbol.toStringTag,Symbol.iterator)](){for(const[,i]of this.map)yield[i.uri,i.value]}}e.ResourceMap=c;class A{constructor(i,v){this[I]="ResourceSet",!i||typeof i=="function"?this._map=new c(i):(this._map=new c(v),i.forEach(this.add,this))}get size(){return this._map.size}add(i){return this._map.set(i,i),this}clear(){this._map.clear()}delete(i){return this._map.delete(i)}forEach(i,v){this._map.forEach((r,_)=>i.call(v,_,_,this))}has(i){return this._map.has(i)}entries(){return this._map.entries()}keys(){return this._map.keys()}values(){return this._map.keys()}[(I=Symbol.toStringTag,Symbol.iterator)](){return this.keys()}}e.ResourceSet=A;var y;(function(a){a[a.None=0]="None",a[a.AsOld=1]="AsOld",a[a.AsNew=2]="AsNew"})(y||(e.Touch=y={}));class L{constructor(){this[b]="LinkedMap",this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0,this._state=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0,this._state++}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}get first(){return this._head?.value}get last(){return this._tail?.value}has(i){return this._map.has(i)}get(i,v=0){const r=this._map.get(i);if(r)return v!==0&&this.touch(r,v),r.value}set(i,v,r=0){let _=this._map.get(i);if(_)_.value=v,r!==0&&this.touch(_,r);else{switch(_={key:i,value:v,next:void 0,previous:void 0},r){case 0:this.addItemLast(_);break;case 1:this.addItemFirst(_);break;case 2:this.addItemLast(_);break;default:this.addItemLast(_);break}this._map.set(i,_),this._size++}return this}delete(i){return!!this.remove(i)}remove(i){const v=this._map.get(i);if(v)return this._map.delete(i),this.removeItem(v),this._size--,v.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");const i=this._head;return this._map.delete(i.key),this.removeItem(i),this._size--,i.value}forEach(i,v){const r=this._state;let _=this._head;for(;_;){if(v?i.bind(v)(_.value,_.key,this):i(_.value,_.key,this),this._state!==r)throw new Error("LinkedMap got modified during iteration.");_=_.next}}keys(){const i=this,v=this._state;let r=this._head;const _={[Symbol.iterator](){return _},next(){if(i._state!==v)throw new Error("LinkedMap got modified during iteration.");if(r){const C={value:r.key,done:!1};return r=r.next,C}else return{value:void 0,done:!0}}};return _}values(){const i=this,v=this._state;let r=this._head;const _={[Symbol.iterator](){return _},next(){if(i._state!==v)throw new Error("LinkedMap got modified during iteration.");if(r){const C={value:r.value,done:!1};return r=r.next,C}else return{value:void 0,done:!0}}};return _}entries(){const i=this,v=this._state;let r=this._head;const _={[Symbol.iterator](){return _},next(){if(i._state!==v)throw new Error("LinkedMap got modified during iteration.");if(r){const C={value:[r.key,r.value],done:!1};return r=r.next,C}else return{value:void 0,done:!0}}};return _}[(b=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(i){if(i>=this.size)return;if(i===0){this.clear();return}let v=this._head,r=this.size;for(;v&&r>i;)this._map.delete(v.key),v=v.next,r--;this._head=v,this._size=r,v&&(v.previous=void 0),this._state++}addItemFirst(i){if(!this._head&&!this._tail)this._tail=i;else if(this._head)i.next=this._head,this._head.previous=i;else throw new Error("Invalid list");this._head=i,this._state++}addItemLast(i){if(!this._head&&!this._tail)this._head=i;else if(this._tail)i.previous=this._tail,this._tail.next=i;else throw new Error("Invalid list");this._tail=i,this._state++}removeItem(i){if(i===this._head&&i===this._tail)this._head=void 0,this._tail=void 0;else if(i===this._head){if(!i.next)throw new Error("Invalid list");i.next.previous=void 0,this._head=i.next}else if(i===this._tail){if(!i.previous)throw new Error("Invalid list");i.previous.next=void 0,this._tail=i.previous}else{const v=i.next,r=i.previous;if(!v||!r)throw new Error("Invalid list");v.previous=r,r.next=v}i.next=void 0,i.previous=void 0,this._state++}touch(i,v){if(!this._head||!this._tail)throw new Error("Invalid list");if(!(v!==1&&v!==2)){if(v===1){if(i===this._head)return;const r=i.next,_=i.previous;i===this._tail?(_.next=void 0,this._tail=_):(r.previous=_,_.next=r),i.previous=void 0,i.next=this._head,this._head.previous=i,this._head=i,this._state++}else if(v===2){if(i===this._tail)return;const r=i.next,_=i.previous;i===this._head?(r.previous=void 0,this._head=r):(r.previous=_,_.next=r),i.next=void 0,i.previous=this._tail,this._tail.next=i,this._tail=i,this._state++}}}toJSON(){const i=[];return this.forEach((v,r)=>{i.push([r,v])}),i}fromJSON(i){this.clear();for(const[v,r]of i)this.set(v,r)}}e.LinkedMap=L;class t extends L{constructor(i,v=1){super(),this._limit=i,this._ratio=Math.min(Math.max(0,v),1)}get limit(){return this._limit}set limit(i){this._limit=i,this.checkTrim()}get ratio(){return this._ratio}set ratio(i){this._ratio=Math.min(Math.max(0,i),1),this.checkTrim()}get(i,v=2){return super.get(i,v)}peek(i){return super.get(i,0)}set(i,v){return super.set(i,v,2),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}}e.LRUCache=t;class u{constructor(){this.map=new Map}add(i){return this.map.set(i,(this.map.get(i)||0)+1),this}delete(i){let v=this.map.get(i)||0;return v===0?!1:(v--,v===0?this.map.delete(i):this.map.set(i,v),!0)}has(i){return this.map.has(i)}}e.CounterSet=u}),define(ce[43],he([0,1,29]),function(oe,e,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.removeAccents=e.normalizeNFD=e.normalizeNFC=void 0;const I=new w.LRUCache(1e4);function b(c){return m(c,"NFC",I)}e.normalizeNFC=b;const k=new w.LRUCache(1e4);function O(c){return m(c,"NFD",k)}e.normalizeNFD=O;const P=/[^\u0000-\u0080]/;function m(c,A,y){if(!c)return c;const L=y.get(c);if(L)return L;let t;return P.test(c)?t=c.normalize(A):t=c,y.set(c,t),t}e.removeAccents=function(){const c=/[\u0300-\u036f]/g;return function(A){return O(A).replace(c,"")}}()}),function(){function oe(b){const k=[];typeof b=="number"&&k.push("code/timeOrigin",b);function O(m){k.push(m,Date.now())}function P(){const m=[];for(let c=0;c<k.length;c+=2)m.push({name:k[c],startTime:k[c+1]});return m}return{mark:O,getMarks:P}}function e(){if(typeof performance=="object"&&typeof performance.mark=="function"&&!performance.nodeTiming)return typeof performance.timeOrigin!="number"&&!performance.timing?oe():{mark(b){performance.mark(b)},getMarks(){let b=performance.timeOrigin;typeof b!="number"&&(b=performance.timing.navigationStart||performance.timing.redirectStart||performance.timing.fetchStart);const k=[{name:"code/timeOrigin",startTime:Math.round(b)}];for(const O of performance.getEntriesByType("mark"))k.push({name:O.name,startTime:Math.round(b+O.startTime)});return k}};if(typeof process=="object"){const b=performance?.timeOrigin??Math.round((require.__$__nodeRequire||require)("perf_hooks").performance.timeOrigin);return oe(b)}else return console.trace("perf-util loaded in UNKNOWN environment"),oe()}function w(b){return b.MonacoPerformanceMarks||(b.MonacoPerformanceMarks=e()),b.MonacoPerformanceMarks}var I;typeof global=="object"?I=global:typeof self=="object"?I=self:I={},typeof define=="function"?define("vs/base/common/performance",[],function(){return w(I)}):typeof module=="object"&&typeof module.exports=="object"?module.exports=w(I):(console.trace("perf-util defined in UNKNOWN context (neither requirejs or commonjs)"),I.perf=w(I))}(),define(ce[44],he([0,1]),function(oe,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StopWatch=void 0;const w=globalThis.performance&&typeof globalThis.performance.now=="function";class I{static create(k){return new I(k)}constructor(k){this._now=w&&k===!1?Date.now:globalThis.performance.now.bind(globalThis.performance),this._startTime=this._now(),this._stopTime=-1}stop(){this._stopTime=this._now()}reset(){this._startTime=this._now(),this._stopTime=-1}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}}e.StopWatch=I}),define(ce[4],he([0,1,6,27,3,42,44]),function(oe,e,w,I,b,k,O){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Relay=e.EventBufferer=e.DynamicListEventMultiplexer=e.EventMultiplexer=e.MicrotaskEmitter=e.DebounceEmitter=e.PauseableEmitter=e.AsyncEmitter=e.createEventDeliveryQueue=e.Emitter=e.setGlobalLeakWarningThreshold=e.EventProfiling=e.Event=void 0;const P=!1,m=!1;var c;(function(F){F.None=()=>b.Disposable.None;function l(le){if(m){const{onDidAddListener:N}=le,$=u.create();let j=0;le.onDidAddListener=()=>{++j===2&&(console.warn("snapshotted emitter LIKELY used public and SHOULD HAVE BEEN created with DisposableStore. snapshotted here"),$.print()),N?.()}}}function E(le,N){return ue(le,()=>{},0,void 0,!0,void 0,N)}F.defer=E;function B(le){return(N,$=null,j)=>{let X=!1,ee;return ee=le(pe=>{if(!X)return ee?ee.dispose():X=!0,N.call($,pe)},null,j),X&&ee.dispose(),ee}}F.once=B;function V(le,N,$){return ne((j,X=null,ee)=>le(pe=>j.call(X,N(pe)),null,ee),$)}F.map=V;function T(le,N,$){return ne((j,X=null,ee)=>le(pe=>{N(pe),j.call(X,pe)},null,ee),$)}F.forEach=T;function q(le,N,$){return ne((j,X=null,ee)=>le(pe=>N(pe)&&j.call(X,pe),null,ee),$)}F.filter=q;function J(le){return le}F.signal=J;function x(...le){return(N,$=null,j)=>(0,b.combinedDisposable)(...le.map(X=>X(ee=>N.call($,ee),null,j)))}F.any=x;function Q(le,N,$,j){let X=$;return V(le,ee=>(X=N(X,ee),X),j)}F.reduce=Q;function ne(le,N){let $;const j={onWillAddFirstListener(){$=le(X.fire,X)},onDidRemoveLastListener(){$?.dispose()}};N||l(j);const X=new _(j);return N?.add(X),X.event}function ue(le,N,$=100,j=!1,X=!1,ee,pe){let _e,we,Ce,be=0,Ee;const Oe={leakWarningThreshold:ee,onWillAddFirstListener(){_e=le(Ue=>{be++,we=N(we,Ue),j&&!Ce&&(Le.fire(we),we=void 0),Ee=()=>{const ze=we;we=void 0,Ce=void 0,(!j||be>1)&&Le.fire(ze),be=0},typeof $=="number"?(clearTimeout(Ce),Ce=setTimeout(Ee,$)):Ce===void 0&&(Ce=0,queueMicrotask(Ee))})},onWillRemoveListener(){X&&be>0&&Ee?.()},onDidRemoveLastListener(){Ee=void 0,_e.dispose()}};pe||l(Oe);const Le=new _(Oe);return pe?.add(Le),Le.event}F.debounce=ue;function fe(le,N=0,$){return F.debounce(le,(j,X)=>j?(j.push(X),j):[X],N,void 0,!0,void 0,$)}F.accumulate=fe;function K(le,N=(j,X)=>j===X,$){let j=!0,X;return q(le,ee=>{const pe=j||!N(ee,X);return j=!1,X=ee,pe},$)}F.latch=K;function z(le,N,$){return[F.filter(le,N,$),F.filter(le,j=>!N(j),$)]}F.split=z;function R(le,N=!1,$=[]){let j=$.slice(),X=le(_e=>{j?j.push(_e):pe.fire(_e)});const ee=()=>{j?.forEach(_e=>pe.fire(_e)),j=null},pe=new _({onWillAddFirstListener(){X||(X=le(_e=>pe.fire(_e)))},onDidAddFirstListener(){j&&(N?setTimeout(ee):ee())},onDidRemoveLastListener(){X&&X.dispose(),X=null}});return pe.event}F.buffer=R;class G{constructor(N){this.event=N,this.disposables=new b.DisposableStore}map(N){return new G(V(this.event,N,this.disposables))}forEach(N){return new G(T(this.event,N,this.disposables))}filter(N){return new G(q(this.event,N,this.disposables))}reduce(N,$){return new G(Q(this.event,N,$,this.disposables))}latch(){return new G(K(this.event,void 0,this.disposables))}debounce(N,$=100,j=!1,X=!1,ee){return new G(ue(this.event,N,$,j,X,ee,this.disposables))}on(N,$,j){return this.event(N,$,j)}once(N,$,j){return B(this.event)(N,$,j)}dispose(){this.disposables.dispose()}}function se(le){return new G(le)}F.chain=se;function te(le,N,$=j=>j){const j=(..._e)=>pe.fire($(..._e)),X=()=>le.on(N,j),ee=()=>le.removeListener(N,j),pe=new _({onWillAddFirstListener:X,onDidRemoveLastListener:ee});return pe.event}F.fromNodeEventEmitter=te;function ge(le,N,$=j=>j){const j=(..._e)=>pe.fire($(..._e)),X=()=>le.addEventListener(N,j),ee=()=>le.removeEventListener(N,j),pe=new _({onWillAddFirstListener:X,onDidRemoveLastListener:ee});return pe.event}F.fromDOMEventEmitter=ge;function Z(le){return new Promise(N=>B(le)(N))}F.toPromise=Z;function s(le){const N=new _;return le.then($=>{N.fire($)},()=>{N.fire(void 0)}).finally(()=>{N.dispose()}),N.event}F.fromPromise=s;function d(le,N){return N(void 0),le($=>N($))}F.runAndSubscribe=d;function W(le,N){let $=null;function j(ee){$?.dispose(),$=new b.DisposableStore,N(ee,$)}j(void 0);const X=le(ee=>j(ee));return(0,b.toDisposable)(()=>{X.dispose(),$?.dispose()})}F.runAndSubscribeWithStore=W;class H{constructor(N,$){this._observable=N,this._counter=0,this._hasChanged=!1;const j={onWillAddFirstListener:()=>{N.addObserver(this)},onDidRemoveLastListener:()=>{N.removeObserver(this)}};$||l(j),this.emitter=new _(j),$&&$.add(this.emitter)}beginUpdate(N){this._counter++}handlePossibleChange(N){}handleChange(N,$){this._hasChanged=!0}endUpdate(N){this._counter--,this._counter===0&&(this._observable.reportChanges(),this._hasChanged&&(this._hasChanged=!1,this.emitter.fire(this._observable.get())))}}function ie(le,N){return new H(le,N).emitter.event}F.fromObservable=ie;function ae(le){return N=>{let $=0,j=!1;const X={beginUpdate(){$++},endUpdate(){$--,$===0&&(le.reportChanges(),j&&(j=!1,N()))},handlePossibleChange(){},handleChange(){j=!0}};return le.addObserver(X),le.reportChanges(),{dispose(){le.removeObserver(X)}}}}F.fromObservableLight=ae})(c||(e.Event=c={}));class A{static{this.all=new Set}static{this._idPool=0}constructor(l){this.listenerCount=0,this.invocationCount=0,this.elapsedOverall=0,this.durations=[],this.name=`${l}_${A._idPool++}`,A.all.add(this)}start(l){this._stopWatch=new O.StopWatch,this.listenerCount=l}stop(){if(this._stopWatch){const l=this._stopWatch.elapsed();this.durations.push(l),this.elapsedOverall+=l,this.invocationCount+=1,this._stopWatch=void 0}}}e.EventProfiling=A;let y=-1;function L(F){const l=y;return y=F,{dispose(){y=l}}}e.setGlobalLeakWarningThreshold=L;class t{constructor(l,E=Math.random().toString(18).slice(2,5)){this.threshold=l,this.name=E,this._warnCountdown=0}dispose(){this._stacks?.clear()}check(l,E){const B=this.threshold;if(B<=0||E<B)return;this._stacks||(this._stacks=new Map);const V=this._stacks.get(l.value)||0;if(this._stacks.set(l.value,V+1),this._warnCountdown-=1,this._warnCountdown<=0){this._warnCountdown=B*.5;let T,q=0;for(const[J,x]of this._stacks)(!T||q<x)&&(T=J,q=x);console.warn(`[${this.name}] potential listener LEAK detected, having ${E} listeners already. MOST frequent listener (${q}):`),console.warn(T)}return()=>{const T=this._stacks.get(l.value)||0;this._stacks.set(l.value,T-1)}}}class u{static create(){return new u(new Error().stack??"")}constructor(l){this.value=l}print(){console.warn(this.value.split(`
`).slice(2).join(`
`))}}let a=0;class i{constructor(l){this.value=l,this.id=a++}}const v=2,r=(F,l)=>{if(F instanceof i)l(F);else for(let E=0;E<F.length;E++){const B=F[E];B&&l(B)}};class _{constructor(l){this._size=0,this._options=l,this._leakageMon=y>0||this._options?.leakWarningThreshold?new t(this._options?.leakWarningThreshold??y):void 0,this._perfMon=this._options?._profName?new A(this._options._profName):void 0,this._deliveryQueue=this._options?.deliveryQueue}dispose(){if(!this._disposed){if(this._disposed=!0,this._deliveryQueue?.current===this&&this._deliveryQueue.reset(),this._listeners){if(P){const l=this._listeners;queueMicrotask(()=>{r(l,E=>E.stack?.print())})}this._listeners=void 0,this._size=0}this._options?.onDidRemoveLastListener?.(),this._leakageMon?.dispose()}}get event(){return this._event??=(l,E,B)=>{if(this._disposed)return b.Disposable.None;E&&(l=l.bind(E));const V=new i(l);let T,q;this._leakageMon&&this._size>=Math.ceil(this._leakageMon.threshold*.2)&&(V.stack=u.create(),T=this._leakageMon.check(V.stack,this._size+1)),P&&(V.stack=q??u.create()),this._listeners?this._listeners instanceof i?(this._deliveryQueue??=new o,this._listeners=[this._listeners,V]):this._listeners.push(V):(this._options?.onWillAddFirstListener?.(this),this._listeners=V,this._options?.onDidAddFirstListener?.(this)),this._size++;const J=(0,b.toDisposable)(()=>{T?.(),this._removeListener(V)});return B instanceof b.DisposableStore?B.add(J):Array.isArray(B)&&B.push(J),J},this._event}_removeListener(l){if(this._options?.onWillRemoveListener?.(this),!this._listeners)return;if(this._size===1){this._listeners=void 0,this._options?.onDidRemoveLastListener?.(this),this._size=0;return}const E=this._listeners,B=E.indexOf(l);if(B===-1)throw console.log("disposed?",this._disposed),console.log("size?",this._size),console.log("arr?",JSON.stringify(this._listeners)),new Error("Attempted to dispose unknown listener");this._size--,E[B]=void 0;const V=this._deliveryQueue.current===this;if(this._size*v<=E.length){let T=0;for(let q=0;q<E.length;q++)E[q]?E[T++]=E[q]:V&&(this._deliveryQueue.end--,T<this._deliveryQueue.i&&this._deliveryQueue.i--);E.length=T}}_deliver(l,E){if(!l)return;const B=this._options?.onListenerError||w.onUnexpectedError;if(!B){l.value(E);return}try{l.value(E)}catch(V){B(V)}}_deliverQueue(l){const E=l.current._listeners;for(;l.i<l.end;)this._deliver(E[l.i++],l.value);l.reset()}fire(l){if(this._deliveryQueue?.current&&(this._deliverQueue(this._deliveryQueue),this._perfMon?.stop()),this._perfMon?.start(this._size),this._listeners)if(this._listeners instanceof i)this._deliver(this._listeners,l);else{const E=this._deliveryQueue;E.enqueue(this,l,this._listeners.length),this._deliverQueue(E)}this._perfMon?.stop()}hasListeners(){return this._size>0}}e.Emitter=_;const C=()=>new o;e.createEventDeliveryQueue=C;class o{constructor(){this.i=-1,this.end=0}enqueue(l,E,B){this.i=0,this.end=B,this.current=l,this.value=E}reset(){this.i=this.end,this.current=void 0,this.value=void 0}}class n extends _{async fireAsync(l,E,B){if(this._listeners)for(this._asyncDeliveryQueue||(this._asyncDeliveryQueue=new k.LinkedList),r(this._listeners,V=>this._asyncDeliveryQueue.push([V.value,l]));this._asyncDeliveryQueue.size>0&&!E.isCancellationRequested;){const[V,T]=this._asyncDeliveryQueue.shift(),q=[],J={...T,token:E,waitUntil:x=>{if(Object.isFrozen(q))throw new Error("waitUntil can NOT be called asynchronous");B&&(x=B(x,V)),q.push(x)}};try{V(J)}catch(x){(0,w.onUnexpectedError)(x);continue}Object.freeze(q),await Promise.allSettled(q).then(x=>{for(const Q of x)Q.status==="rejected"&&(0,w.onUnexpectedError)(Q.reason)})}}}e.AsyncEmitter=n;class h extends _{get isPaused(){return this._isPaused!==0}constructor(l){super(l),this._isPaused=0,this._eventQueue=new k.LinkedList,this._mergeFn=l?.merge}pause(){this._isPaused++}resume(){if(this._isPaused!==0&&--this._isPaused===0)if(this._mergeFn){if(this._eventQueue.size>0){const l=Array.from(this._eventQueue);this._eventQueue.clear(),super.fire(this._mergeFn(l))}}else for(;!this._isPaused&&this._eventQueue.size!==0;)super.fire(this._eventQueue.shift())}fire(l){this._size&&(this._isPaused!==0?this._eventQueue.push(l):super.fire(l))}}e.PauseableEmitter=h;class S extends h{constructor(l){super(l),this._delay=l.delay??100}fire(l){this._handle||(this.pause(),this._handle=setTimeout(()=>{this._handle=void 0,this.resume()},this._delay)),super.fire(l)}}e.DebounceEmitter=S;class p extends _{constructor(l){super(l),this._queuedEvents=[],this._mergeFn=l?.merge}fire(l){this.hasListeners()&&(this._queuedEvents.push(l),this._queuedEvents.length===1&&queueMicrotask(()=>{this._mergeFn?super.fire(this._mergeFn(this._queuedEvents)):this._queuedEvents.forEach(E=>super.fire(E)),this._queuedEvents=[]}))}}e.MicrotaskEmitter=p;class D{constructor(){this.hasListeners=!1,this.events=[],this.emitter=new _({onWillAddFirstListener:()=>this.onFirstListenerAdd(),onDidRemoveLastListener:()=>this.onLastListenerRemove()})}get event(){return this.emitter.event}add(l){const E={event:l,listener:null};this.events.push(E),this.hasListeners&&this.hook(E);const B=()=>{this.hasListeners&&this.unhook(E);const V=this.events.indexOf(E);this.events.splice(V,1)};return(0,b.toDisposable)((0,I.once)(B))}onFirstListenerAdd(){this.hasListeners=!0,this.events.forEach(l=>this.hook(l))}onLastListenerRemove(){this.hasListeners=!1,this.events.forEach(l=>this.unhook(l))}hook(l){l.listener=l.event(E=>this.emitter.fire(E))}unhook(l){l.listener&&l.listener.dispose(),l.listener=null}dispose(){this.emitter.dispose()}}e.EventMultiplexer=D;class f{constructor(l,E,B,V){this._store=new b.DisposableStore;const T=this._store.add(new D),q=this._store.add(new b.DisposableMap);function J(x){q.set(x,T.add(V(x)))}for(const x of l)J(x);this._store.add(E(x=>{J(x)})),this._store.add(B(x=>{q.deleteAndDispose(x)})),this.event=T.event}dispose(){this._store.dispose()}}e.DynamicListEventMultiplexer=f;class g{constructor(){this.buffers=[]}wrapEvent(l){return(E,B,V)=>l(T=>{const q=this.buffers[this.buffers.length-1];q?q.push(()=>E.call(B,T)):E.call(B,T)},void 0,V)}bufferEvents(l){const E=[];this.buffers.push(E);const B=l();return this.buffers.pop(),E.forEach(V=>V()),B}}e.EventBufferer=g;class M{constructor(){this.listening=!1,this.inputEvent=c.None,this.inputEventListener=b.Disposable.None,this.emitter=new _({onDidAddFirstListener:()=>{this.listening=!0,this.inputEventListener=this.inputEvent(this.emitter.fire,this.emitter)},onDidRemoveLastListener:()=>{this.listening=!1,this.inputEventListener.dispose()}}),this.event=this.emitter.event}set input(l){this.inputEvent=l,this.listening&&(this.inputEventListener.dispose(),this.inputEventListener=l(this.emitter.fire,this.emitter))}dispose(){this.inputEventListener.dispose(),this.emitter.dispose()}}e.Relay=M}),define(ce[16],he([0,1,4]),function(oe,e,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CancellationTokenSource=e.CancellationToken=void 0;const I=Object.freeze(function(P,m){const c=setTimeout(P.bind(m),0);return{dispose(){clearTimeout(c)}}});var b;(function(P){function m(c){return c===P.None||c===P.Cancelled||c instanceof k?!0:!c||typeof c!="object"?!1:typeof c.isCancellationRequested=="boolean"&&typeof c.onCancellationRequested=="function"}P.isCancellationToken=m,P.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:w.Event.None}),P.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:I})})(b||(e.CancellationToken=b={}));class k{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?I:(this._emitter||(this._emitter=new w.Emitter),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}}class O{constructor(m){this._token=void 0,this._parentListener=void 0,this._parentListener=m&&m.onCancellationRequested(this.cancel,this)}get token(){return this._token||(this._token=new k),this._token}cancel(){this._token?this._token instanceof k&&this._token.cancel():this._token=b.Cancelled}dispose(m=!1){m&&this.cancel(),this._parentListener?.dispose(),this._token?this._token instanceof k&&this._token.dispose():this._token=b.None}}e.CancellationTokenSource=O}),define(ce[45],he([0,1,16]),function(oe,e,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CachedFunction=e.LRUCachedFunction=e.Cache=void 0;class I{constructor(P){this.task=P,this.result=null}get(){if(this.result)return this.result;const P=new w.CancellationTokenSource,m=this.task(P.token);return this.result={promise:m,dispose:()=>{this.result=null,P.cancel(),P.dispose()}},this.result}}e.Cache=I;class b{constructor(P){this.fn=P,this.lastCache=void 0,this.lastArgKey=void 0}get(P){const m=JSON.stringify(P);return this.lastArgKey!==m&&(this.lastArgKey=m,this.lastCache=this.fn(P)),this.lastCache}}e.LRUCachedFunction=b;class k{get cachedValues(){return this._map}constructor(P){this.fn=P,this._map=new Map}get(P){if(this._map.has(P))return this._map.get(P);const m=this.fn(P);return this._map.set(P,m),m}}e.CachedFunction=k}),define(ce[46],he([0,1,6,3]),function(oe,e,w,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.prefixedStream=e.prefixedReadable=e.transform=e.toReadable=e.emptyStream=e.toStream=e.peekStream=e.listenStream=e.consumeStream=e.peekReadable=e.consumeReadable=e.newWriteableStream=e.isReadableBufferedStream=e.isReadableStream=e.isReadable=void 0;function b(C){const o=C;return o?typeof o.read=="function":!1}e.isReadable=b;function k(C){const o=C;return o?[o.on,o.pause,o.resume,o.destroy].every(n=>typeof n=="function"):!1}e.isReadableStream=k;function O(C){const o=C;return o?k(o.stream)&&Array.isArray(o.buffer)&&typeof o.ended=="boolean":!1}e.isReadableBufferedStream=O;function P(C,o){return new m(C,o)}e.newWriteableStream=P;class m{constructor(o,n){this.reducer=o,this.options=n,this.state={flowing:!1,ended:!1,destroyed:!1},this.buffer={data:[],error:[]},this.listeners={data:[],error:[],end:[]},this.pendingWritePromises=[]}pause(){this.state.destroyed||(this.state.flowing=!1)}resume(){this.state.destroyed||this.state.flowing||(this.state.flowing=!0,this.flowData(),this.flowErrors(),this.flowEnd())}write(o){if(!this.state.destroyed){if(this.state.flowing)this.emitData(o);else if(this.buffer.data.push(o),typeof this.options?.highWaterMark=="number"&&this.buffer.data.length>this.options.highWaterMark)return new Promise(n=>this.pendingWritePromises.push(n))}}error(o){this.state.destroyed||(this.state.flowing?this.emitError(o):this.buffer.error.push(o))}end(o){this.state.destroyed||(typeof o<"u"&&this.write(o),this.state.flowing?(this.emitEnd(),this.destroy()):this.state.ended=!0)}emitData(o){this.listeners.data.slice(0).forEach(n=>n(o))}emitError(o){this.listeners.error.length===0?(0,w.onUnexpectedError)(o):this.listeners.error.slice(0).forEach(n=>n(o))}emitEnd(){this.listeners.end.slice(0).forEach(o=>o())}on(o,n){if(!this.state.destroyed)switch(o){case"data":this.listeners.data.push(n),this.resume();break;case"end":this.listeners.end.push(n),this.state.flowing&&this.flowEnd()&&this.destroy();break;case"error":this.listeners.error.push(n),this.state.flowing&&this.flowErrors();break}}removeListener(o,n){if(this.state.destroyed)return;let h;switch(o){case"data":h=this.listeners.data;break;case"end":h=this.listeners.end;break;case"error":h=this.listeners.error;break}if(h){const S=h.indexOf(n);S>=0&&h.splice(S,1)}}flowData(){if(this.buffer.data.length>0){const o=this.reducer(this.buffer.data);this.emitData(o),this.buffer.data.length=0;const n=[...this.pendingWritePromises];this.pendingWritePromises.length=0,n.forEach(h=>h())}}flowErrors(){if(this.listeners.error.length>0){for(const o of this.buffer.error)this.emitError(o);this.buffer.error.length=0}}flowEnd(){return this.state.ended?(this.emitEnd(),this.listeners.end.length>0):!1}destroy(){this.state.destroyed||(this.state.destroyed=!0,this.state.ended=!0,this.buffer.data.length=0,this.buffer.error.length=0,this.listeners.data.length=0,this.listeners.error.length=0,this.listeners.end.length=0,this.pendingWritePromises.length=0)}}function c(C,o){const n=[];let h;for(;(h=C.read())!==null;)n.push(h);return o(n)}e.consumeReadable=c;function A(C,o,n){const h=[];let S;for(;(S=C.read())!==null&&h.length<n;)h.push(S);return S===null&&h.length>0?o(h):{read:()=>{if(h.length>0)return h.shift();if(typeof S<"u"){const p=S;return S=void 0,p}return C.read()}}}e.peekReadable=A;function y(C,o){return new Promise((n,h)=>{const S=[];L(C,{onData:p=>{o&&S.push(p)},onError:p=>{o?h(p):n(void 0)},onEnd:()=>{n(o?o(S):void 0)}})})}e.consumeStream=y;function L(C,o,n){C.on("error",h=>{n?.isCancellationRequested||o.onError(h)}),C.on("end",()=>{n?.isCancellationRequested||o.onEnd()}),C.on("data",h=>{n?.isCancellationRequested||o.onData(h)})}e.listenStream=L;function t(C,o){return new Promise((n,h)=>{const S=new I.DisposableStore,p=[],D=M=>{if(p.push(M),p.length>o)return S.dispose(),C.pause(),n({stream:C,buffer:p,ended:!1})},f=M=>h(M),g=()=>n({stream:C,buffer:p,ended:!0});S.add((0,I.toDisposable)(()=>C.removeListener("error",f))),C.on("error",f),S.add((0,I.toDisposable)(()=>C.removeListener("end",g))),C.on("end",g),S.add((0,I.toDisposable)(()=>C.removeListener("data",D))),C.on("data",D)})}e.peekStream=t;function u(C,o){const n=P(o);return n.end(C),n}e.toStream=u;function a(){const C=P(()=>{throw new Error("not supported")});return C.end(),C}e.emptyStream=a;function i(C){let o=!1;return{read:()=>o?null:(o=!0,C)}}e.toReadable=i;function v(C,o,n){const h=P(n);return L(C,{onData:S=>h.write(o.data(S)),onError:S=>h.error(o.error?o.error(S):S),onEnd:()=>h.end()}),h}e.transform=v;function r(C,o,n){let h=!1;return{read:()=>{const S=o.read();return h?S:(h=!0,S!==null?n([C,S]):C)}}}e.prefixedReadable=r;function _(C,o,n){let h=!1;const S=P(n);return L(o,{onData:p=>h?S.write(p):(h=!0,S.write(n([C,p]))),onError:p=>S.error(p),onEnd:()=>{h||(h=!0,S.write(C)),S.end()}}),S}e.prefixedStream=_}),define(ce[17],he([0,1,28,46]),function(oe,e,w,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.encodeBase64=e.decodeBase64=e.prefixedBufferStream=e.prefixedBufferReadable=e.newWriteableBufferStream=e.streamToBufferReadableStream=e.bufferToStream=e.bufferedStreamToBuffer=e.streamToBuffer=e.bufferToReadable=e.readableToBuffer=e.writeUInt8=e.readUInt8=e.writeUInt32LE=e.readUInt32LE=e.writeUInt32BE=e.readUInt32BE=e.writeUInt16LE=e.readUInt16LE=e.binaryIndexOf=e.VSBuffer=void 0;const b=typeof Buffer<"u",k=new w.Lazy(()=>new Uint8Array(256));let O,P;class m{static alloc(E){return b?new m(Buffer.allocUnsafe(E)):new m(new Uint8Array(E))}static wrap(E){return b&&!Buffer.isBuffer(E)&&(E=Buffer.from(E.buffer,E.byteOffset,E.byteLength)),new m(E)}static fromString(E,B){return!(B?.dontUseNodeBuffer||!1)&&b?new m(Buffer.from(E)):(O||(O=new TextEncoder),new m(O.encode(E)))}static fromByteArray(E){const B=m.alloc(E.length);for(let V=0,T=E.length;V<T;V++)B.buffer[V]=E[V];return B}static concat(E,B){if(typeof B>"u"){B=0;for(let q=0,J=E.length;q<J;q++)B+=E[q].byteLength}const V=m.alloc(B);let T=0;for(let q=0,J=E.length;q<J;q++){const x=E[q];V.set(x,T),T+=x.byteLength}return V}constructor(E){this.buffer=E,this.byteLength=this.buffer.byteLength}clone(){const E=m.alloc(this.byteLength);return E.set(this),E}toString(){return b?this.buffer.toString():(P||(P=new TextDecoder),P.decode(this.buffer))}slice(E,B){return new m(this.buffer.subarray(E,B))}set(E,B){if(E instanceof m)this.buffer.set(E.buffer,B);else if(E instanceof Uint8Array)this.buffer.set(E,B);else if(E instanceof ArrayBuffer)this.buffer.set(new Uint8Array(E),B);else if(ArrayBuffer.isView(E))this.buffer.set(new Uint8Array(E.buffer,E.byteOffset,E.byteLength),B);else throw new Error("Unknown argument 'array'")}readUInt32BE(E){return L(this.buffer,E)}writeUInt32BE(E,B){t(this.buffer,E,B)}readUInt32LE(E){return u(this.buffer,E)}writeUInt32LE(E,B){a(this.buffer,E,B)}readUInt8(E){return i(this.buffer,E)}writeUInt8(E,B){v(this.buffer,E,B)}indexOf(E,B=0){return c(this.buffer,E instanceof m?E.buffer:E,B)}}e.VSBuffer=m;function c(l,E,B=0){const V=E.byteLength,T=l.byteLength;if(V===0)return 0;if(V===1)return l.indexOf(E[0]);if(V>T-B)return-1;const q=k.value;q.fill(E.length);for(let ne=0;ne<E.length;ne++)q[E[ne]]=E.length-ne-1;let J=B+E.length-1,x=J,Q=-1;for(;J<T;)if(l[J]===E[x]){if(x===0){Q=J;break}J--,x--}else J+=Math.max(E.length-x,q[l[J]]),x=E.length-1;return Q}e.binaryIndexOf=c;function A(l,E){return l[E+0]<<0>>>0|l[E+1]<<8>>>0}e.readUInt16LE=A;function y(l,E,B){l[B+0]=E&255,E=E>>>8,l[B+1]=E&255}e.writeUInt16LE=y;function L(l,E){return l[E]*2**24+l[E+1]*2**16+l[E+2]*2**8+l[E+3]}e.readUInt32BE=L;function t(l,E,B){l[B+3]=E,E=E>>>8,l[B+2]=E,E=E>>>8,l[B+1]=E,E=E>>>8,l[B]=E}e.writeUInt32BE=t;function u(l,E){return l[E+0]<<0>>>0|l[E+1]<<8>>>0|l[E+2]<<16>>>0|l[E+3]<<24>>>0}e.readUInt32LE=u;function a(l,E,B){l[B+0]=E&255,E=E>>>8,l[B+1]=E&255,E=E>>>8,l[B+2]=E&255,E=E>>>8,l[B+3]=E&255}e.writeUInt32LE=a;function i(l,E){return l[E]}e.readUInt8=i;function v(l,E,B){l[B]=E}e.writeUInt8=v;function r(l){return I.consumeReadable(l,E=>m.concat(E))}e.readableToBuffer=r;function _(l){return I.toReadable(l)}e.bufferToReadable=_;function C(l){return I.consumeStream(l,E=>m.concat(E))}e.streamToBuffer=C;async function o(l){return l.ended?m.concat(l.buffer):m.concat([...l.buffer,await C(l.stream)])}e.bufferedStreamToBuffer=o;function n(l){return I.toStream(l,E=>m.concat(E))}e.bufferToStream=n;function h(l){return I.transform(l,{data:E=>typeof E=="string"?m.fromString(E):m.wrap(E)},E=>m.concat(E))}e.streamToBufferReadableStream=h;function S(l){return I.newWriteableStream(E=>m.concat(E),l)}e.newWriteableBufferStream=S;function p(l,E){return I.prefixedReadable(l,E,B=>m.concat(B))}e.prefixedBufferReadable=p;function D(l,E){return I.prefixedStream(l,E,B=>m.concat(B))}e.prefixedBufferStream=D;function f(l){let E=0,B=0,V=0;const T=new Uint8Array(Math.floor(l.length/4*3)),q=x=>{switch(B){case 3:T[V++]=E|x,B=0;break;case 2:T[V++]=E|x>>>2,E=x<<6,B=3;break;case 1:T[V++]=E|x>>>4,E=x<<4,B=2;break;default:E=x<<2,B=1}};for(let x=0;x<l.length;x++){const Q=l.charCodeAt(x);if(Q>=65&&Q<=90)q(Q-65);else if(Q>=97&&Q<=122)q(Q-97+26);else if(Q>=48&&Q<=57)q(Q-48+52);else if(Q===43||Q===45)q(62);else if(Q===47||Q===95)q(63);else{if(Q===61)break;throw new SyntaxError(`Unexpected base64 character ${l[x]}`)}}const J=V;for(;B>0;)q(0);return m.wrap(T).slice(0,J)}e.decodeBase64=f;const g="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",M="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_";function F({buffer:l},E=!0,B=!1){const V=B?M:g;let T="";const q=l.byteLength%3;let J=0;for(;J<l.byteLength-q;J+=3){const x=l[J+0],Q=l[J+1],ne=l[J+2];T+=V[x>>>2],T+=V[(x<<4|Q>>>4)&63],T+=V[(Q<<2|ne>>>6)&63],T+=V[ne&63]}if(q===1){const x=l[J+0];T+=V[x>>>2],T+=V[x<<4&63],E&&(T+="==")}else if(q===2){const x=l[J+0],Q=l[J+1];T+=V[x>>>2],T+=V[(x<<4|Q>>>4)&63],T+=V[Q<<2&63],E&&(T+="=")}return T}e.encodeBase64=F}),define(ce[12],he([0,1,45,28]),function(oe,e,w,I){"use strict";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.repeat=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.charCount=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.isAsciiDigit=e.compareSubstringIgnoreCase=e.compareIgnoreCase=e.compareSubstring=e.compare=e.replaceAsync=e.lastNonWhitespaceIndex=e.getLeadingWhitespace=e.firstNonWhitespaceIndex=e.splitLines=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 b(U){return!U||typeof U!="string"?!0:U.trim().length===0}e.isFalsyOrWhitespace=b;const k=/{(\d+)}/g;function O(U,...Y){return Y.length===0?U:U.replace(k,function(re,de){const ye=parseInt(de,10);return isNaN(ye)||ye<0||ye>=Y.length?re:Y[ye]})}e.format=O;const P=/{([^}]+)}/g;function m(U,Y){return U.replace(P,(re,de)=>Y[de]??re)}e.format2=m;function c(U){return U.replace(/[<>&]/g,function(Y){switch(Y){case"<":return"&lt;";case">":return"&gt;";case"&":return"&amp;";default:return Y}})}e.escape=c;function A(U){return U.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}e.escapeRegExpCharacters=A;function y(U,Y){let re=0;const de=Y.charCodeAt(0);for(let ye=U.length-1;ye>=0;ye--)U.charCodeAt(ye)===de&&re++;return re}e.count=y;function L(U,Y,re="\u2026"){return U.length<=Y?U:`${U.substr(0,Y)}${re}`}e.truncate=L;function t(U,Y=" "){const re=u(U,Y);return a(re,Y)}e.trim=t;function u(U,Y){if(!U||!Y)return U;const re=Y.length;if(re===0||U.length===0)return U;let de=0;for(;U.indexOf(Y,de)===de;)de=de+re;return U.substring(de)}e.ltrim=u;function a(U,Y){if(!U||!Y)return U;const re=Y.length,de=U.length;if(re===0||de===0)return U;let ye=de,ve=-1;for(;ve=U.lastIndexOf(Y,ye-1),!(ve===-1||ve+re!==ye);){if(ve===0)return"";ye=ve}return U.substring(0,ye)}e.rtrim=a;function i(U){return U.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}e.convertSimple2RegExpPattern=i;function v(U){return U.replace(/\*/g,"")}e.stripWildcards=v;function r(U,Y,re={}){if(!U)throw new Error("Cannot create regex from empty string");Y||(U=A(U)),re.wholeWord&&(/\B/.test(U.charAt(0))||(U="\\b"+U),/\B/.test(U.charAt(U.length-1))||(U=U+"\\b"));let de="";return re.global&&(de+="g"),re.matchCase||(de+="i"),re.multiline&&(de+="m"),re.unicode&&(de+="u"),new RegExp(U,de)}e.createRegExp=r;function _(U){return U.source==="^"||U.source==="^$"||U.source==="$"||U.source==="^\\s*$"?!1:!!(U.exec("")&&U.lastIndex===0)}e.regExpLeadsToEndlessLoop=_;function C(U){return U.split(/\r\n|\r|\n/)}e.splitLines=C;function o(U){for(let Y=0,re=U.length;Y<re;Y++){const de=U.charCodeAt(Y);if(de!==32&&de!==9)return Y}return-1}e.firstNonWhitespaceIndex=o;function n(U,Y=0,re=U.length){for(let de=Y;de<re;de++){const ye=U.charCodeAt(de);if(ye!==32&&ye!==9)return U.substring(Y,de)}return U.substring(Y,re)}e.getLeadingWhitespace=n;function h(U,Y=U.length-1){for(let re=Y;re>=0;re--){const de=U.charCodeAt(re);if(de!==32&&de!==9)return re}return-1}e.lastNonWhitespaceIndex=h;function S(U,Y,re){const de=[];let ye=0;for(const ve of U.matchAll(Y)){if(de.push(U.slice(ye,ve.index)),ve.index===void 0)throw new Error("match.index should be defined");ye=ve.index+ve[0].length,de.push(re(ve[0],...ve.slice(1),ve.index,U,ve.groups))}return de.push(U.slice(ye)),Promise.all(de).then(ve=>ve.join(""))}e.replaceAsync=S;function p(U,Y){return U<Y?-1:U>Y?1:0}e.compare=p;function D(U,Y,re=0,de=U.length,ye=0,ve=Y.length){for(;re<de&&ye<ve;re++,ye++){const De=U.charCodeAt(re),Ae=Y.charCodeAt(ye);if(De<Ae)return-1;if(De>Ae)return 1}const Pe=de-re,ke=ve-ye;return Pe<ke?-1:Pe>ke?1:0}e.compareSubstring=D;function f(U,Y){return g(U,Y,0,U.length,0,Y.length)}e.compareIgnoreCase=f;function g(U,Y,re=0,de=U.length,ye=0,ve=Y.length){for(;re<de&&ye<ve;re++,ye++){let De=U.charCodeAt(re),Ae=Y.charCodeAt(ye);if(De===Ae)continue;if(De>=128||Ae>=128)return D(U.toLowerCase(),Y.toLowerCase(),re,de,ye,ve);F(De)&&(De-=32),F(Ae)&&(Ae-=32);const Se=De-Ae;if(Se!==0)return Se}const Pe=de-re,ke=ve-ye;return Pe<ke?-1:Pe>ke?1:0}e.compareSubstringIgnoreCase=g;function M(U){return U>=48&&U<=57}e.isAsciiDigit=M;function F(U){return U>=97&&U<=122}e.isLowerAsciiLetter=F;function l(U){return U>=65&&U<=90}e.isUpperAsciiLetter=l;function E(U,Y){return U.length===Y.length&&g(U,Y)===0}e.equalsIgnoreCase=E;function B(U,Y){const re=Y.length;return Y.length>U.length?!1:g(U,Y,0,re)===0}e.startsWithIgnoreCase=B;function V(U,Y){const re=Math.min(U.length,Y.length);let de;for(de=0;de<re;de++)if(U.charCodeAt(de)!==Y.charCodeAt(de))return de;return re}e.commonPrefixLength=V;function T(U,Y){const re=Math.min(U.length,Y.length);let de;const ye=U.length-1,ve=Y.length-1;for(de=0;de<re;de++)if(U.charCodeAt(ye-de)!==Y.charCodeAt(ve-de))return de;return re}e.commonSuffixLength=T;function q(U){return 55296<=U&&U<=56319}e.isHighSurrogate=q;function J(U){return 56320<=U&&U<=57343}e.isLowSurrogate=J;function x(U,Y){return(U-55296<<10)+(Y-56320)+65536}e.computeCodePoint=x;function Q(U,Y,re){const de=U.charCodeAt(re);if(q(de)&&re+1<Y){const ye=U.charCodeAt(re+1);if(J(ye))return x(de,ye)}return de}e.getNextCodePoint=Q;function ne(U,Y){const re=U.charCodeAt(Y-1);if(J(re)&&Y>1){const de=U.charCodeAt(Y-2);if(q(de))return x(de,re)}return re}class ue{get offset(){return this._offset}constructor(Y,re=0){this._str=Y,this._len=Y.length,this._offset=re}setOffset(Y){this._offset=Y}prevCodePoint(){const Y=ne(this._str,this._offset);return this._offset-=Y>=65536?2:1,Y}nextCodePoint(){const Y=Q(this._str,this._len,this._offset);return this._offset+=Y>=65536?2:1,Y}eol(){return this._offset>=this._len}}e.CodePointIterator=ue;class fe{get offset(){return this._iterator.offset}constructor(Y,re=0){this._iterator=new ue(Y,re)}nextGraphemeLength(){const Y=Le.getInstance(),re=this._iterator,de=re.offset;let ye=Y.getGraphemeBreakType(re.nextCodePoint());for(;!re.eol();){const ve=re.offset,Pe=Y.getGraphemeBreakType(re.nextCodePoint());if(Ee(ye,Pe)){re.setOffset(ve);break}ye=Pe}return re.offset-de}prevGraphemeLength(){const Y=Le.getInstance(),re=this._iterator,de=re.offset;let ye=Y.getGraphemeBreakType(re.prevCodePoint());for(;re.offset>0;){const ve=re.offset,Pe=Y.getGraphemeBreakType(re.prevCodePoint());if(Ee(Pe,ye)){re.setOffset(ve);break}ye=Pe}return de-re.offset}eol(){return this._iterator.eol()}}e.GraphemeIterator=fe;function K(U,Y){return new fe(U,Y).nextGraphemeLength()}e.nextCharLength=K;function z(U,Y){return new fe(U,Y).prevGraphemeLength()}e.prevCharLength=z;function R(U,Y){Y>0&&J(U.charCodeAt(Y))&&Y--;const re=Y+K(U,Y);return[re-z(U,re),re]}e.getCharContainingOffset=R;function G(U){const Y=new fe(U);let re=0;for(;!Y.eol();)re++,Y.nextGraphemeLength();return re}e.charCount=G;let se;function te(){return/(?:[\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 ge(U){return se||(se=te()),se.test(U)}e.containsRTL=ge;const Z=/^[\t\n\r\x20-\x7E]*$/;function s(U){return Z.test(U)}e.isBasicASCII=s,e.UNUSUAL_LINE_TERMINATORS=/[\u2028\u2029]/;function d(U){return e.UNUSUAL_LINE_TERMINATORS.test(U)}e.containsUnusualLineTerminators=d;function W(U){return U>=11904&&U<=55215||U>=63744&&U<=64255||U>=65281&&U<=65374}e.isFullWidthCharacter=W;function H(U){return U>=127462&&U<=127487||U===8986||U===8987||U===9200||U===9203||U>=9728&&U<=10175||U===11088||U===11093||U>=127744&&U<=128591||U>=128640&&U<=128764||U>=128992&&U<=129008||U>=129280&&U<=129535||U>=129648&&U<=129782}e.isEmojiImprecise=H;function ie(U,Y){if(U.length<Y)return U;const re=/\b/g;let de=0;for(;re.test(U)&&!(U.length-re.lastIndex<Y);)de=re.lastIndex,re.lastIndex+=1;return U.substring(de).replace(/^\s/,"")}e.lcut=ie;const ae=/(:?\x1b\[|\x9B)[=?>!]?[\d;:]*["$#'* ]?[a-zA-Z@^`{}|~]/g,le=/\x1b\].*?\x07/g;function N(U){return U&&(U=U.replace(ae,"").replace(le,"")),U}e.removeAnsiEscapeCodes=N,e.UTF8_BOM_CHARACTER=String.fromCharCode(65279);function $(U){return!!(U&&U.length>0&&U.charCodeAt(0)===65279)}e.startsWithUTF8BOM=$;function j(U){return $(U)?U.substr(1):U}e.stripUTF8BOM=j;function X(U,Y){let re="";for(let de=0;de<Y;de++)re+=U;return re}e.repeat=X;function ee(U,Y){if(!U||!Y||U.length<Y.length)return!1;const re=Y.length,de=U.toLowerCase();let ye=0,ve=-1;for(;ye<re;){const Pe=de.indexOf(Y[ye],ve+1);if(Pe<0)return!1;ve=Pe,ye++}return!0}e.fuzzyContains=ee;function pe(U,Y=!1){return U?(Y&&(U=U.replace(/\\./g,"")),U.toLowerCase()!==U):!1}e.containsUppercaseCharacter=pe;function _e(U){return U.charAt(0).toUpperCase()+U.slice(1)}e.uppercaseFirstLetter=_e;function we(U,Y=1){if(Y===0)return"";let re=-1;do re=U.indexOf(`
`,re+1),Y--;while(Y>0&&re>=0);return re===-1?U:(U[re-1]==="\r"&&re--,U.substr(0,re))}e.getNLines=we;function Ce(U){return U=U%(2*26),U<26?String.fromCharCode(97+U):String.fromCharCode(65+U-26)}e.singleLetterHash=Ce;function be(U){return Le.getInstance().getGraphemeBreakType(U)}e.getGraphemeBreakType=be;function Ee(U,Y){return U===0?Y!==5&&Y!==7:U===2&&Y===3?!1:U===4||U===2||U===3||Y===4||Y===2||Y===3?!0:!(U===8&&(Y===8||Y===9||Y===11||Y===12)||(U===11||U===9)&&(Y===9||Y===10)||(U===12||U===10)&&Y===10||Y===5||Y===13||Y===7||U===1||U===13&&Y===14||U===6&&Y===6)}var Oe;(function(U){U[U.Other=0]="Other",U[U.Prepend=1]="Prepend",U[U.CR=2]="CR",U[U.LF=3]="LF",U[U.Control=4]="Control",U[U.Extend=5]="Extend",U[U.Regional_Indicator=6]="Regional_Indicator",U[U.SpacingMark=7]="SpacingMark",U[U.L=8]="L",U[U.V=9]="V",U[U.T=10]="T",U[U.LV=11]="LV",U[U.LVT=12]="LVT",U[U.ZWJ=13]="ZWJ",U[U.Extended_Pictographic=14]="Extended_Pictographic"})(Oe||(e.GraphemeBreakType=Oe={}));class Le{static{this._INSTANCE=null}static getInstance(){return Le._INSTANCE||(Le._INSTANCE=new Le),Le._INSTANCE}constructor(){this._data=Ue()}getGraphemeBreakType(Y){if(Y<32)return Y===10?3:Y===13?2:4;if(Y<127)return 0;const re=this._data,de=re.length/3;let ye=1;for(;ye<=de;)if(Y<re[3*ye])ye=2*ye;else if(Y>re[3*ye+1])ye=2*ye+1;else return re[3*ye+2];return 0}}function Ue(){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,44010,7,44033,44059,12,44089,44115,12,44145,44171,12,44201,44227,12,44257,44283,12,44313,44339,12,44369,44395,12,44425,44451,12,44481,44507,12,44537,44563,12,44593,44619,12,44649,44675,12,44705,44731,12,44761,44787,12,44817,44843,12,44873,44899,12,44929,44955,12,44985,45011,12,45041,45067,12,45097,45123,12,45153,45179,12,45209,45235,12,45265,45291,12,45321,45347,12,45377,45403,12,45433,45459,12,45489,45515,12,45545,45571,12,45601,45627,12,45657,45683,12,45713,45739,12,45769,45795,12,45825,45851,12,45881,45907,12,45937,45963,12,45993,46019,12,46049,46075,12,46105,46131,12,46161,46187,12,46217,46243,12,46273,46299,12,46329,46355,12,46385,46411,12,46441,46467,12,46497,46523,12,46553,46579,12,46609,46635,12,46665,46691,12,46721,46747,12,46777,46803,12,46833,46859,12,46889,46915,12,46945,46971,12,47001,47027,12,47057,47083,12,47113,47139,12,47169,47195,12,47225,47251,12,47281,47307,12,47337,47363,12,47393,47419,12,47449,47475,12,47505,47531,12,47561,47587,12,47617,47643,12,47673,47699,12,47729,47755,12,47785,47811,12,47841,47867,12,47897,47923,12,47953,47979,12,48009,48035,12,48065,48091,12,48121,48147,12,48177,48203,12,48233,48259,12,48289,48315,12,48345,48371,12,48401,48427,12,48457,48483,12,48513,48539,12,48569,48595,12,48625,48651,12,48681,48707,12,48737,48763,12,48793,48819,12,48849,48875,12,48905,48931,12,48961,48987,12,49017,49043,12,49073,49099,12,49129,49155,12,49185,49211,12,49241,49267,12,49297,49323,12,49353,49379,12,49409,49435,12,49465,49491,12,49521,49547,12,49577,49603,12,49633,49659,12,49689,49715,12,49745,49771,12,49801,49827,12,49857,49883,12,49913,49939,12,49969,49995,12,50025,50051,12,50081,50107,12,50137,50163,12,50193,50219,12,50249,50275,12,50305,50331,12,50361,50387,12,50417,50443,12,50473,50499,12,50529,50555,12,50585,50611,12,50641,50667,12,50697,50723,12,50753,50779,12,50809,50835,12,50865,50891,12,50921,50947,12,50977,51003,12,51033,51059,12,51089,51115,12,51145,51171,12,51201,51227,12,51257,51283,12,51313,51339,12,51369,51395,12,51425,51451,12,51481,51507,12,51537,51563,12,51593,51619,12,51649,51675,12,51705,51731,12,51761,51787,12,51817,51843,12,51873,51899,12,51929,51955,12,51985,52011,12,52041,52067,12,52097,52123,12,52153,52179,12,52209,52235,12,52265,52291,12,52321,52347,12,52377,52403,12,52433,52459,12,52489,52515,12,52545,52571,12,52601,52627,12,52657,52683,12,52713,52739,12,52769,52795,12,52825,52851,12,52881,52907,12,52937,52963,12,52993,53019,12,53049,53075,12,53105,53131,12,53161,53187,12,53217,53243,12,53273,53299,12,53329,53355,12,53385,53411,12,53441,53467,12,53497,53523,12,53553,53579,12,53609,53635,12,53665,53691,12,53721,53747,12,53777,53803,12,53833,53859,12,53889,53915,12,53945,53971,12,54001,54027,12,54057,54083,12,54113,54139,12,54169,54195,12,54225,54251,12,54281,54307,12,54337,54363,12,54393,54419,12,54449,54475,12,54505,54531,12,54561,54587,12,54617,54643,12,54673,54699,12,54729,54755,12,54785,54811,12,54841,54867,12,54897,54923,12,54953,54979,12,55009,55035,12,55065,55091,12,55121,55147,12,55177,55203,12,65024,65039,5,65520,65528,4,66422,66426,5,68152,68154,5,69291,69292,5,69633,69633,5,69747,69748,5,69811,69814,5,69826,69826,5,69932,69932,7,70016,70017,5,70079,70080,7,70095,70095,5,70196,70196,5,70367,70367,5,70402,70403,7,70464,70464,5,70487,70487,5,70709,70711,7,70725,70725,7,70833,70834,7,70843,70844,7,70849,70849,7,71090,71093,5,71103,71104,5,71227,71228,7,71339,71339,5,71344,71349,5,71458,71461,5,71727,71735,5,71985,71989,7,71998,71998,5,72002,72002,7,72154,72155,5,72193,72202,5,72251,72254,5,72281,72283,5,72344,72345,5,72766,72766,7,72874,72880,5,72885,72886,5,73023,73029,5,73104,73105,5,73111,73111,5,92912,92916,5,94095,94098,5,113824,113827,4,119142,119142,7,119155,119162,4,119362,119364,5,121476,121476,5,122888,122904,5,123184,123190,5,125252,125258,5,127183,127183,14,127340,127343,14,127377,127386,14,127491,127503,14,127548,127551,14,127744,127756,14,127761,127761,14,127769,127769,14,127773,127774,14,127780,127788,14,127796,127797,14,127820,127823,14,127869,127869,14,127894,127895,14,127902,127903,14,127943,127943,14,127947,127950,14,127972,127972,14,127988,127988,14,127992,127994,14,128009,128011,14,128019,128019,14,128023,128041,14,128064,128064,14,128102,128107,14,128174,128181,14,128238,128238,14,128246,128247,14,128254,128254,14,128264,128264,14,128278,128299,14,128329,128330,14,128348,128359,14,128371,128377,14,128392,128393,14,128401,128404,14,128421,128421,14,128433,128434,14,128450,128452,14,128476,128478,14,128483,128483,14,128495,128495,14,128506,128506,14,128519,128520,14,128528,128528,14,128534,128534,14,128538,128538,14,128540,128542,14,128544,128549,14,128552,128555,14,128557,128557,14,128560,128563,14,128565,128565,14,128567,128576,14,128581,128591,14,128641,128642,14,128646,128646,14,128648,128648,14,128650,128651,14,128653,128653,14,128655,128655,14,128657,128659,14,128661,128661,14,128663,128663,14,128665,128666,14,128674,128674,14,128676,128677,14,128679,128685,14,128690,128690,14,128694,128694,14,128697,128702,14,128704,128704,14,128710,128714,14,128716,128716,14,128720,128720,14,128723,128724,14,128726,128727,14,128733,128735,14,128742,128744,14,128746,128746,14,128749,128751,14,128753,128754,14,128756,128758,14,128761,128761,14,128763,128764,14,128884,128895,14,128992,129003,14,129008,129008,14,129036,129039,14,129114,129119,14,129198,129279,14,129293,129295,14,129305,129310,14,129312,129319,14,129328,129328,14,129331,129338,14,129343,129343,14,129351,129355,14,129357,129359,14,129375,129387,14,129393,129393,14,129395,129398,14,129401,129401,14,129403,129403,14,129408,129412,14,129426,129431,14,129443,129444,14,129451,129453,14,129456,129465,14,129472,129472,14,129475,129482,14,129484,129484,14,129488,129510,14,129536,129647,14,129652,129652,14,129656,129658,14,129661,129663,14,129667,129670,14,129680,129685,14,129705,129708,14,129712,129718,14,129723,129727,14,129731,129733,14,129744,129750,14,129754,129759,14,129768,129775,14,129783,129791,14,917504,917504,4,917506,917535,4,917632,917759,4,918000,921599,4,0,9,4,11,12,4,14,31,4,169,169,14,174,174,14,1155,1159,5,1425,1469,5,1473,1474,5,1479,1479,5,1552,1562,5,1611,1631,5,1750,1756,5,1759,1764,5,1770,1773,5,1809,1809,5,1958,1968,5,2045,2045,5,2075,2083,5,2089,2093,5,2192,2193,1,2250,2273,5,2275,2306,5,2362,2362,5,2364,2364,5,2369,2376,5,2381,2381,5,2385,2391,5,2433,2433,5,2492,2492,5,2495,2496,7,2503,2504,7,2509,2509,5,2530,2531,5,2561,2562,5,2620,2620,5,2625,2626,5,2635,2637,5,2672,2673,5,2689,2690,5,2748,2748,5,2753,2757,5,2761,2761,7,2765,2765,5,2810,2815,5,2818,2819,7,2878,2878,5,2880,2880,7,2887,2888,7,2893,2893,5,2903,2903,5,2946,2946,5,3007,3007,7,3009,3010,7,3018,3020,7,3031,3031,5,3073,3075,7,3132,3132,5,3137,3140,7,3146,3149,5,3170,3171,5,3202,3203,7,3262,3262,7,3264,3265,7,3267,3268,7,3271,3272,7,3276,3277,5,3298,3299,5,3330,3331,7,3390,3390,5,3393,3396,5,3402,3404,7,3406,3406,1,3426,3427,5,3458,3459,7,3535,3535,5,3538,3540,5,3544,3550,7,3570,3571,7,3635,3635,7,3655,3662,5,3763,3763,7,3784,3789,5,3893,3893,5,3897,3897,5,3953,3966,5,3968,3972,5,3981,3991,5,4038,4038,5,4145,4145,7,4153,4154,5,4157,4158,5,4184,4185,5,4209,4212,5,4228,4228,7,4237,4237,5,4352,4447,8,4520,4607,10,5906,5908,5,5938,5939,5,5970,5971,5,6068,6069,5,6071,6077,5,6086,6086,5,6089,6099,5,6155,6157,5,6159,6159,5,6313,6313,5,6435,6438,7,6441,6443,7,6450,6450,5,6457,6459,5,6681,6682,7,6741,6741,7,6743,6743,7,6752,6752,5,6757,6764,5,6771,6780,5,6832,6845,5,6847,6862,5,6916,6916,7,6965,6965,5,6971,6971,7,6973,6977,7,6979,6980,7,7040,7041,5,7073,7073,7,7078,7079,7,7082,7082,7,7142,7142,5,7144,7145,5,7149,7149,5,7151,7153,5,7204,7211,7,7220,7221,7,7376,7378,5,7393,7393,7,7405,7405,5,7415,7415,7,7616,7679,5,8204,8204,5,8206,8207,4,8233,8233,4,8252,8252,14,8288,8292,4,8294,8303,4,8413,8416,5,8418,8420,5,8482,8482,14,8596,8601,14,8986,8987,14,9096,9096,14,9193,9196,14,9199,9199,14,9201,9202,14,9208,9210,14,9642,9643,14,9664,9664,14,9728,9729,14,9732,9732,14,9735,9741,14,9743,9744,14,9746,9746,14,9750,9751,14,9753,9756,14,9758,9759,14,9761,9761,14,9764,9765,14,9767,9769,14,9771,9773,14,9775,9775,14,9784,9785,14,9787,9791,14,9793,9793,14,9795,9799,14,9812,9822,14,9824,9824,14,9827,9827,14,9829,9830,14,9832,9832,14,9851,9851,14,9854,9854,14,9856,9861,14,9874,9874,14,9876,9876,14,9878,9879,14,9881,9881,14,9883,9884,14,9888,9889,14,9895,9895,14,9898,9899,14,9904,9905,14,9917,9918,14,9924,9925,14,9928,9928,14,9934,9934,14,9936,9936,14,9938,9938,14,9940,9940,14,9961,9961,14,9963,9967,14,9970,9971,14,9973,9973,14,9975,9977,14,9979,9980,14,9982,9985,14,9987,9988,14,9992,9996,14,9998,9998,14,10000,10001,14,10004,10004,14,10013,10013,14,10024,10024,14,10052,10052,14,10060,10060,14,10067,10069,14,10083,10083,14,10085,10087,14,10145,10145,14,10175,10175,14,11013,11015,14,11088,11088,14,11503,11505,5,11744,11775,5,12334,12335,5,12349,12349,14,12951,12951,14,42607,42607,5,42612,42621,5,42736,42737,5,43014,43014,5,43043,43044,7,43047,43047,7,43136,43137,7,43204,43205,5,43263,43263,5,43335,43345,5,43360,43388,8,43395,43395,7,43444,43445,7,43450,43451,7,43454,43456,7,43561,43566,5,43569,43570,5,43573,43574,5,43596,43596,5,43644,43644,5,43698,43700,5,43710,43711,5,43755,43755,7,43758,43759,7,43766,43766,5,44005,44005,5,44008,44008,5,44012,44012,7,44032,44032,11,44060,44060,11,44088,44088,11,44116,44116,11,44144,44144,11,44172,44172,11,44200,44200,11,44228,44228,11,44256,44256,11,44284,44284,11,44312,44312,11,44340,44340,11,44368,44368,11,44396,44396,11,44424,44424,11,44452,44452,11,44480,44480,11,44508,44508,11,44536,44536,11,44564,44564,11,44592,44592,11,44620,44620,11,44648,44648,11,44676,44676,11,44704,44704,11,44732,44732,11,44760,44760,11,44788,44788,11,44816,44816,11,44844,44844,11,44872,44872,11,44900,44900,11,44928,44928,11,44956,44956,11,44984,44984,11,45012,45012,11,45040,45040,11,45068,45068,11,45096,45096,11,45124,45124,11,45152,45152,11,45180,45180,11,45208,45208,11,45236,45236,11,45264,45264,11,45292,45292,11,45320,45320,11,45348,45348,11,45376,45376,11,45404,45404,11,45432,45432,11,45460,45460,11,45488,45488,11,45516,45516,11,45544,45544,11,45572,45572,11,45600,45600,11,45628,45628,11,45656,45656,11,45684,45684,11,45712,45712,11,45740,45740,11,45768,45768,11,45796,45796,11,45824,45824,11,45852,45852,11,45880,45880,11,45908,45908,11,45936,45936,11,45964,45964,11,45992,45992,11,46020,46020,11,46048,46048,11,46076,46076,11,46104,46104,11,46132,46132,11,46160,46160,11,46188,46188,11,46216,46216,11,46244,46244,11,46272,46272,11,46300,46300,11,46328,46328,11,46356,46356,11,46384,46384,11,46412,46412,11,46440,46440,11,46468,46468,11,46496,46496,11,46524,46524,11,46552,46552,11,46580,46580,11,46608,46608,11,46636,46636,11,46664,46664,11,46692,46692,11,46720,46720,11,46748,46748,11,46776,46776,11,46804,46804,11,46832,46832,11,46860,46860,11,46888,46888,11,46916,46916,11,46944,46944,11,46972,46972,11,47000,47000,11,47028,47028,11,47056,47056,11,47084,47084,11,47112,47112,11,47140,47140,11,47168,47168,11,47196,47196,11,47224,47224,11,47252,47252,11,47280,47280,11,47308,47308,11,47336,47336,11,47364,47364,11,47392,47392,11,47420,47420,11,47448,47448,11,47476,47476,11,47504,47504,11,47532,47532,11,47560,47560,11,47588,47588,11,47616,47616,11,47644,47644,11,47672,47672,11,47700,47700,11,47728,47728,11,47756,47756,11,47784,47784,11,47812,47812,11,47840,47840,11,47868,47868,11,47896,47896,11,47924,47924,11,47952,47952,11,47980,47980,11,48008,48008,11,48036,48036,11,48064,48064,11,48092,48092,11,48120,48120,11,48148,48148,11,48176,48176,11,48204,48204,11,48232,48232,11,48260,48260,11,48288,48288,11,48316,48316,11,48344,48344,11,48372,48372,11,48400,48400,11,48428,48428,11,48456,48456,11,48484,48484,11,48512,48512,11,48540,48540,11,48568,48568,11,48596,48596,11,48624,48624,11,48652,48652,11,48680,48680,11,48708,48708,11,48736,48736,11,48764,48764,11,48792,48792,11,48820,48820,11,48848,48848,11,48876,48876,11,48904,48904,11,48932,48932,11,48960,48960,11,48988,48988,11,49016,49016,11,49044,49044,11,49072,49072,11,49100,49100,11,49128,49128,11,49156,49156,11,49184,49184,11,49212,49212,11,49240,49240,11,49268,49268,11,49296,49296,11,49324,49324,11,49352,49352,11,49380,49380,11,49408,49408,11,49436,49436,11,49464,49464,11,49492,49492,11,49520,49520,11,49548,49548,11,49576,49576,11,49604,49604,11,49632,49632,11,49660,49660,11,49688,49688,11,49716,49716,11,49744,49744,11,49772,49772,11,49800,49800,11,49828,49828,11,49856,49856,11,49884,49884,11,49912,49912,11,49940,49940,11,49968,49968,11,49996,49996,11,50024,50024,11,50052,50052,11,50080,50080,11,50108,50108,11,50136,50136,11,50164,50164,11,50192,50192,11,50220,50220,11,50248,50248,11,50276,50276,11,50304,50304,11,50332,50332,11,50360,50360,11,50388,50388,11,50416,50416,11,50444,50444,11,50472,50472,11,50500,50500,11,50528,50528,11,50556,50556,11,50584,50584,11,50612,50612,11,50640,50640,11,50668,50668,11,50696,50696,11,50724,50724,11,50752,50752,11,50780,50780,11,50808,50808,11,50836,50836,11,50864,50864,11,50892,50892,11,50920,50920,11,50948,50948,11,50976,50976,11,51004,51004,11,51032,51032,11,51060,51060,11,51088,51088,11,51116,51116,11,51144,51144,11,51172,51172,11,51200,51200,11,51228,51228,11,51256,51256,11,51284,51284,11,51312,51312,11,51340,51340,11,51368,51368,11,51396,51396,11,51424,51424,11,51452,51452,11,51480,51480,11,51508,51508,11,51536,51536,11,51564,51564,11,51592,51592,11,51620,51620,11,51648,51648,11,51676,51676,11,51704,51704,11,51732,51732,11,51760,51760,11,51788,51788,11,51816,51816,11,51844,51844,11,51872,51872,11,51900,51900,11,51928,51928,11,51956,51956,11,51984,51984,11,52012,52012,11,52040,52040,11,52068,52068,11,52096,52096,11,52124,52124,11,52152,52152,11,52180,52180,11,52208,52208,11,52236,52236,11,52264,52264,11,52292,52292,11,52320,52320,11,52348,52348,11,52376,52376,11,52404,52404,11,52432,52432,11,52460,52460,11,52488,52488,11,52516,52516,11,52544,52544,11,52572,52572,11,52600,52600,11,52628,52628,11,52656,52656,11,52684,52684,11,52712,52712,11,52740,52740,11,52768,52768,11,52796,52796,11,52824,52824,11,52852,52852,11,52880,52880,11,52908,52908,11,52936,52936,11,52964,52964,11,52992,52992,11,53020,53020,11,53048,53048,11,53076,53076,11,53104,53104,11,53132,53132,11,53160,53160,11,53188,53188,11,53216,53216,11,53244,53244,11,53272,53272,11,53300,53300,11,53328,53328,11,53356,53356,11,53384,53384,11,53412,53412,11,53440,53440,11,53468,53468,11,53496,53496,11,53524,53524,11,53552,53552,11,53580,53580,11,53608,53608,11,53636,53636,11,53664,53664,11,53692,53692,11,53720,53720,11,53748,53748,11,53776,53776,11,53804,53804,11,53832,53832,11,53860,53860,11,53888,53888,11,53916,53916,11,53944,53944,11,53972,53972,11,54000,54000,11,54028,54028,11,54056,54056,11,54084,54084,11,54112,54112,11,54140,54140,11,54168,54168,11,54196,54196,11,54224,54224,11,54252,54252,11,54280,54280,11,54308,54308,11,54336,54336,11,54364,54364,11,54392,54392,11,54420,54420,11,54448,54448,11,54476,54476,11,54504,54504,11,54532,54532,11,54560,54560,11,54588,54588,11,54616,54616,11,54644,54644,11,54672,54672,11,54700,54700,11,54728,54728,11,54756,54756,11,54784,54784,11,54812,54812,11,54840,54840,11,54868,54868,11,54896,54896,11,54924,54924,11,54952,54952,11,54980,54980,11,55008,55008,11,55036,55036,11,55064,55064,11,55092,55092,11,55120,55120,11,55148,55148,11,55176,55176,11,55216,55238,9,64286,64286,5,65056,65071,5,65438,65439,5,65529,65531,4,66272,66272,5,68097,68099,5,68108,68111,5,68159,68159,5,68900,68903,5,69446,69456,5,69632,69632,7,69634,69634,7,69744,69744,5,69759,69761,5,69808,69810,7,69815,69816,7,69821,69821,1,69837,69837,1,69927,69931,5,69933,69940,5,70003,70003,5,70018,70018,7,70070,70078,5,70082,70083,1,70094,70094,7,70188,70190,7,70194,70195,7,70197,70197,7,70206,70206,5,70368,70370,7,70400,70401,5,70459,70460,5,70463,70463,7,70465,70468,7,70475,70477,7,70498,70499,7,70512,70516,5,70712,70719,5,70722,70724,5,70726,70726,5,70832,70832,5,70835,70840,5,70842,70842,5,70845,70845,5,70847,70848,5,70850,70851,5,71088,71089,7,71096,71099,7,71102,71102,7,71132,71133,5,71219,71226,5,71229,71229,5,71231,71232,5,71340,71340,7,71342,71343,7,71350,71350,7,71453,71455,5,71462,71462,7,71724,71726,7,71736,71736,7,71984,71984,5,71991,71992,7,71997,71997,7,71999,71999,1,72001,72001,1,72003,72003,5,72148,72151,5,72156,72159,7,72164,72164,7,72243,72248,5,72250,72250,1,72263,72263,5,72279,72280,7,72324,72329,1,72343,72343,7,72751,72751,7,72760,72765,5,72767,72767,5,72873,72873,7,72881,72881,7,72884,72884,7,73009,73014,5,73020,73021,5,73030,73030,1,73098,73102,7,73107,73108,7,73110,73110,7,73459,73460,5,78896,78904,4,92976,92982,5,94033,94087,7,94180,94180,5,113821,113822,5,118528,118573,5,119141,119141,5,119143,119145,5,119150,119154,5,119163,119170,5,119210,119213,5,121344,121398,5,121461,121461,5,121499,121503,5,122880,122886,5,122907,122913,5,122918,122922,5,123566,123566,5,125136,125142,5,126976,126979,14,126981,127182,14,127184,127231,14,127279,127279,14,127344,127345,14,127374,127374,14,127405,127461,14,127489,127490,14,127514,127514,14,127538,127546,14,127561,127567,14,127570,127743,14,127757,127758,14,127760,127760,14,127762,127762,14,127766,127768,14,127770,127770,14,127772,127772,14,127775,127776,14,127778,127779,14,127789,127791,14,127794,127795,14,127798,127798,14,127819,127819,14,127824,127824,14,127868,127868,14,127870,127871,14,127892,127893,14,127896,127896,14,127900,127901,14,127904,127940,14,127942,127942,14,127944,127944,14,127946,127946,14,127951,127955,14,127968,127971,14,127973,127984,14,127987,127987,14,127989,127989,14,127991,127991,14,127995,127999,5,128008,128008,14,128012,128014,14,128017,128018,14,128020,128020,14,128022,128022,14,128042,128042,14,128063,128063,14,128065,128065,14,128101,128101,14,128108,128109,14,128173,128173,14,128182,128183,14,128236,128237,14,128239,128239,14,128245,128245,14,128248,128248,14,128253,128253,14,128255,128258,14,128260,128263,14,128265,128265,14,128277,128277,14,128300,128301,14,128326,128328,14,128331,128334,14,128336,128347,14,128360,128366,14,128369,128370,14,128378,128378,14,128391,128391,14,128394,128397,14,128400,128400,14,128405,128406,14,128420,128420,14,128422,128423,14,128425,128432,14,128435,128443,14,128445,128449,14,128453,128464,14,128468,128475,14,128479,128480,14,128482,128482,14,128484,128487,14,128489,128494,14,128496,128498,14,128500,128505,14,128507,128511,14,128513,128518,14,128521,128525,14,128527,128527,14,128529,128529,14,128533,128533,14,128535,128535,14,128537,128537,14]")}function ze(U,Y){if(U===0)return 0;const re=Be(U,Y);if(re!==void 0)return re;const de=new ue(Y,U);return de.prevCodePoint(),de.offset}e.getLeftDeleteOffset=ze;function Be(U,Y){const re=new ue(Y,U);let de=re.prevCodePoint();for(;$e(de)||de===65039||de===8419;){if(re.offset===0)return;de=re.prevCodePoint()}if(!H(de))return;let ye=re.offset;return ye>0&&re.prevCodePoint()===8205&&(ye=re.offset),ye}function $e(U){return 127995<=U&&U<=127999}var qe;(function(U){U[U.zwj=8205]="zwj",U[U.emojiVariantSelector=65039]="emojiVariantSelector",U[U.enclosingKeyCap=8419]="enclosingKeyCap"})(qe||(qe={})),e.noBreakWhitespace="\xA0";class Me{static{this.ambiguousCharacterData=new I.Lazy(()=>JSON.parse('{"_common":[8232,32,8233,32,5760,32,8192,32,8193,32,8194,32,8195,32,8196,32,8197,32,8198,32,8200,32,8201,32,8202,32,8287,32,8199,32,8239,32,2042,95,65101,95,65102,95,65103,95,8208,45,8209,45,8210,45,65112,45,1748,45,8259,45,727,45,8722,45,10134,45,11450,45,1549,44,1643,44,8218,44,184,44,42233,44,894,59,2307,58,2691,58,1417,58,1795,58,1796,58,5868,58,65072,58,6147,58,6153,58,8282,58,1475,58,760,58,42889,58,8758,58,720,58,42237,58,451,33,11601,33,660,63,577,63,2429,63,5038,63,42731,63,119149,46,8228,46,1793,46,1794,46,42510,46,68176,46,1632,46,1776,46,42232,46,1373,96,65287,96,8219,96,8242,96,1370,96,1523,96,8175,96,65344,96,900,96,8189,96,8125,96,8127,96,8190,96,697,96,884,96,712,96,714,96,715,96,756,96,699,96,701,96,700,96,702,96,42892,96,1497,96,2036,96,2037,96,5194,96,5836,96,94033,96,94034,96,65339,91,10088,40,10098,40,12308,40,64830,40,65341,93,10089,41,10099,41,12309,41,64831,41,10100,123,119060,123,10101,125,65342,94,8270,42,1645,42,8727,42,66335,42,5941,47,8257,47,8725,47,8260,47,9585,47,10187,47,10744,47,119354,47,12755,47,12339,47,11462,47,20031,47,12035,47,65340,92,65128,92,8726,92,10189,92,10741,92,10745,92,119311,92,119355,92,12756,92,20022,92,12034,92,42872,38,708,94,710,94,5869,43,10133,43,66203,43,8249,60,10094,60,706,60,119350,60,5176,60,5810,60,5120,61,11840,61,12448,61,42239,61,8250,62,10095,62,707,62,119351,62,5171,62,94015,62,8275,126,732,126,8128,126,8764,126,65372,124,65293,45,120784,50,120794,50,120804,50,120814,50,120824,50,130034,50,42842,50,423,50,1000,50,42564,50,5311,50,42735,50,119302,51,120785,51,120795,51,120805,51,120815,51,120825,51,130035,51,42923,51,540,51,439,51,42858,51,11468,51,1248,51,94011,51,71882,51,120786,52,120796,52,120806,52,120816,52,120826,52,130036,52,5070,52,71855,52,120787,53,120797,53,120807,53,120817,53,120827,53,130037,53,444,53,71867,53,120788,54,120798,54,120808,54,120818,54,120828,54,130038,54,11474,54,5102,54,71893,54,119314,55,120789,55,120799,55,120809,55,120819,55,120829,55,130039,55,66770,55,71878,55,2819,56,2538,56,2666,56,125131,56,120790,56,120800,56,120810,56,120820,56,120830,56,130040,56,547,56,546,56,66330,56,2663,57,2920,57,2541,57,3437,57,120791,57,120801,57,120811,57,120821,57,120831,57,130041,57,42862,57,11466,57,71884,57,71852,57,71894,57,9082,97,65345,97,119834,97,119886,97,119938,97,119990,97,120042,97,120094,97,120146,97,120198,97,120250,97,120302,97,120354,97,120406,97,120458,97,593,97,945,97,120514,97,120572,97,120630,97,120688,97,120746,97,65313,65,119808,65,119860,65,119912,65,119964,65,120016,65,120068,65,120120,65,120172,65,120224,65,120276,65,120328,65,120380,65,120432,65,913,65,120488,65,120546,65,120604,65,120662,65,120720,65,5034,65,5573,65,42222,65,94016,65,66208,65,119835,98,119887,98,119939,98,119991,98,120043,98,120095,98,120147,98,120199,98,120251,98,120303,98,120355,98,120407,98,120459,98,388,98,5071,98,5234,98,5551,98,65314,66,8492,66,119809,66,119861,66,119913,66,120017,66,120069,66,120121,66,120173,66,120225,66,120277,66,120329,66,120381,66,120433,66,42932,66,914,66,120489,66,120547,66,120605,66,120663,66,120721,66,5108,66,5623,66,42192,66,66178,66,66209,66,66305,66,65347,99,8573,99,119836,99,119888,99,119940,99,119992,99,120044,99,120096,99,120148,99,120200,99,120252,99,120304,99,120356,99,120408,99,120460,99,7428,99,1010,99,11429,99,43951,99,66621,99,128844,67,71922,67,71913,67,65315,67,8557,67,8450,67,8493,67,119810,67,119862,67,119914,67,119966,67,120018,67,120174,67,120226,67,120278,67,120330,67,120382,67,120434,67,1017,67,11428,67,5087,67,42202,67,66210,67,66306,67,66581,67,66844,67,8574,100,8518,100,119837,100,119889,100,119941,100,119993,100,120045,100,120097,100,120149,100,120201,100,120253,100,120305,100,120357,100,120409,100,120461,100,1281,100,5095,100,5231,100,42194,100,8558,68,8517,68,119811,68,119863,68,119915,68,119967,68,120019,68,120071,68,120123,68,120175,68,120227,68,120279,68,120331,68,120383,68,120435,68,5024,68,5598,68,5610,68,42195,68,8494,101,65349,101,8495,101,8519,101,119838,101,119890,101,119942,101,120046,101,120098,101,120150,101,120202,101,120254,101,120306,101,120358,101,120410,101,120462,101,43826,101,1213,101,8959,69,65317,69,8496,69,119812,69,119864,69,119916,69,120020,69,120072,69,120124,69,120176,69,120228,69,120280,69,120332,69,120384,69,120436,69,917,69,120492,69,120550,69,120608,69,120666,69,120724,69,11577,69,5036,69,42224,69,71846,69,71854,69,66182,69,119839,102,119891,102,119943,102,119995,102,120047,102,120099,102,120151,102,120203,102,120255,102,120307,102,120359,102,120411,102,120463,102,43829,102,42905,102,383,102,7837,102,1412,102,119315,70,8497,70,119813,70,119865,70,119917,70,120021,70,120073,70,120125,70,120177,70,120229,70,120281,70,120333,70,120385,70,120437,70,42904,70,988,70,120778,70,5556,70,42205,70,71874,70,71842,70,66183,70,66213,70,66853,70,65351,103,8458,103,119840,103,119892,103,119944,103,120048,103,120100,103,120152,103,120204,103,120256,103,120308,103,120360,103,120412,103,120464,103,609,103,7555,103,397,103,1409,103,119814,71,119866,71,119918,71,119970,71,120022,71,120074,71,120126,71,120178,71,120230,71,120282,71,120334,71,120386,71,120438,71,1292,71,5056,71,5107,71,42198,71,65352,104,8462,104,119841,104,119945,104,119997,104,120049,104,120101,104,120153,104,120205,104,120257,104,120309,104,120361,104,120413,104,120465,104,1211,104,1392,104,5058,104,65320,72,8459,72,8460,72,8461,72,119815,72,119867,72,119919,72,120023,72,120179,72,120231,72,120283,72,120335,72,120387,72,120439,72,919,72,120494,72,120552,72,120610,72,120668,72,120726,72,11406,72,5051,72,5500,72,42215,72,66255,72,731,105,9075,105,65353,105,8560,105,8505,105,8520,105,119842,105,119894,105,119946,105,119998,105,120050,105,120102,105,120154,105,120206,105,120258,105,120310,105,120362,105,120414,105,120466,105,120484,105,618,105,617,105,953,105,8126,105,890,105,120522,105,120580,105,120638,105,120696,105,120754,105,1110,105,42567,105,1231,105,43893,105,5029,105,71875,105,65354,106,8521,106,119843,106,119895,106,119947,106,119999,106,120051,106,120103,106,120155,106,120207,106,120259,106,120311,106,120363,106,120415,106,120467,106,1011,106,1112,106,65322,74,119817,74,119869,74,119921,74,119973,74,120025,74,120077,74,120129,74,120181,74,120233,74,120285,74,120337,74,120389,74,120441,74,42930,74,895,74,1032,74,5035,74,5261,74,42201,74,119844,107,119896,107,119948,107,120000,107,120052,107,120104,107,120156,107,120208,107,120260,107,120312,107,120364,107,120416,107,120468,107,8490,75,65323,75,119818,75,119870,75,119922,75,119974,75,120026,75,120078,75,120130,75,120182,75,120234,75,120286,75,120338,75,120390,75,120442,75,922,75,120497,75,120555,75,120613,75,120671,75,120729,75,11412,75,5094,75,5845,75,42199,75,66840,75,1472,108,8739,73,9213,73,65512,73,1633,108,1777,73,66336,108,125127,108,120783,73,120793,73,120803,73,120813,73,120823,73,130033,73,65321,73,8544,73,8464,73,8465,73,119816,73,119868,73,119920,73,120024,73,120128,73,120180,73,120232,73,120284,73,120336,73,120388,73,120440,73,65356,108,8572,73,8467,108,119845,108,119897,108,119949,108,120001,108,120053,108,120105,73,120157,73,120209,73,120261,73,120313,73,120365,73,120417,73,120469,73,448,73,120496,73,120554,73,120612,73,120670,73,120728,73,11410,73,1030,73,1216,73,1493,108,1503,108,1575,108,126464,108,126592,108,65166,108,65165,108,1994,108,11599,73,5825,73,42226,73,93992,73,66186,124,66313,124,119338,76,8556,76,8466,76,119819,76,119871,76,119923,76,120027,76,120079,76,120131,76,120183,76,120235,76,120287,76,120339,76,120391,76,120443,76,11472,76,5086,76,5290,76,42209,76,93974,76,71843,76,71858,76,66587,76,66854,76,65325,77,8559,77,8499,77,119820,77,119872,77,119924,77,120028,77,120080,77,120132,77,120184,77,120236,77,120288,77,120340,77,120392,77,120444,77,924,77,120499,77,120557,77,120615,77,120673,77,120731,77,1018,77,11416,77,5047,77,5616,77,5846,77,42207,77,66224,77,66321,77,119847,110,119899,110,119951,110,120003,110,120055,110,120107,110,120159,110,120211,110,120263,110,120315,110,120367,110,120419,110,120471,110,1400,110,1404,110,65326,78,8469,78,119821,78,119873,78,119925,78,119977,78,120029,78,120081,78,120185,78,120237,78,120289,78,120341,78,120393,78,120445,78,925,78,120500,78,120558,78,120616,78,120674,78,120732,78,11418,78,42208,78,66835,78,3074,111,3202,111,3330,111,3458,111,2406,111,2662,111,2790,111,3046,111,3174,111,3302,111,3430,111,3664,111,3792,111,4160,111,1637,111,1781,111,65359,111,8500,111,119848,111,119900,111,119952,111,120056,111,120108,111,120160,111,120212,111,120264,111,120316,111,120368,111,120420,111,120472,111,7439,111,7441,111,43837,111,959,111,120528,111,120586,111,120644,111,120702,111,120760,111,963,111,120532,111,120590,111,120648,111,120706,111,120764,111,11423,111,4351,111,1413,111,1505,111,1607,111,126500,111,126564,111,126596,111,65259,111,65260,111,65258,111,65257,111,1726,111,64428,111,64429,111,64427,111,64426,111,1729,111,64424,111,64425,111,64423,111,64422,111,1749,111,3360,111,4125,111,66794,111,71880,111,71895,111,66604,111,1984,79,2534,79,2918,79,12295,79,70864,79,71904,79,120782,79,120792,79,120802,79,120812,79,120822,79,130032,79,65327,79,119822,79,119874,79,119926,79,119978,79,120030,79,120082,79,120134,79,120186,79,120238,79,120290,79,120342,79,120394,79,120446,79,927,79,120502,79,120560,79,120618,79,120676,79,120734,79,11422,79,1365,79,11604,79,4816,79,2848,79,66754,79,42227,79,71861,79,66194,79,66219,79,66564,79,66838,79,9076,112,65360,112,119849,112,119901,112,119953,112,120005,112,120057,112,120109,112,120161,112,120213,112,120265,112,120317,112,120369,112,120421,112,120473,112,961,112,120530,112,120544,112,120588,112,120602,112,120646,112,120660,112,120704,112,120718,112,120762,112,120776,112,11427,112,65328,80,8473,80,119823,80,119875,80,119927,80,119979,80,120031,80,120083,80,120187,80,120239,80,120291,80,120343,80,120395,80,120447,80,929,80,120504,80,120562,80,120620,80,120678,80,120736,80,11426,80,5090,80,5229,80,42193,80,66197,80,119850,113,119902,113,119954,113,120006,113,120058,113,120110,113,120162,113,120214,113,120266,113,120318,113,120370,113,120422,113,120474,113,1307,113,1379,113,1382,113,8474,81,119824,81,119876,81,119928,81,119980,81,120032,81,120084,81,120188,81,120240,81,120292,81,120344,81,120396,81,120448,81,11605,81,119851,114,119903,114,119955,114,120007,114,120059,114,120111,114,120163,114,120215,114,120267,114,120319,114,120371,114,120423,114,120475,114,43847,114,43848,114,7462,114,11397,114,43905,114,119318,82,8475,82,8476,82,8477,82,119825,82,119877,82,119929,82,120033,82,120189,82,120241,82,120293,82,120345,82,120397,82,120449,82,422,82,5025,82,5074,82,66740,82,5511,82,42211,82,94005,82,65363,115,119852,115,119904,115,119956,115,120008,115,120060,115,120112,115,120164,115,120216,115,120268,115,120320,115,120372,115,120424,115,120476,115,42801,115,445,115,1109,115,43946,115,71873,115,66632,115,65331,83,119826,83,119878,83,119930,83,119982,83,120034,83,120086,83,120138,83,120190,83,120242,83,120294,83,120346,83,120398,83,120450,83,1029,83,1359,83,5077,83,5082,83,42210,83,94010,83,66198,83,66592,83,119853,116,119905,116,119957,116,120009,116,120061,116,120113,116,120165,116,120217,116,120269,116,120321,116,120373,116,120425,116,120477,116,8868,84,10201,84,128872,84,65332,84,119827,84,119879,84,119931,84,119983,84,120035,84,120087,84,120139,84,120191,84,120243,84,120295,84,120347,84,120399,84,120451,84,932,84,120507,84,120565,84,120623,84,120681,84,120739,84,11430,84,5026,84,42196,84,93962,84,71868,84,66199,84,66225,84,66325,84,119854,117,119906,117,119958,117,120010,117,120062,117,120114,117,120166,117,120218,117,120270,117,120322,117,120374,117,120426,117,120478,117,42911,117,7452,117,43854,117,43858,117,651,117,965,117,120534,117,120592,117,120650,117,120708,117,120766,117,1405,117,66806,117,71896,117,8746,85,8899,85,119828,85,119880,85,119932,85,119984,85,120036,85,120088,85,120140,85,120192,85,120244,85,120296,85,120348,85,120400,85,120452,85,1357,85,4608,85,66766,85,5196,85,42228,85,94018,85,71864,85,8744,118,8897,118,65366,118,8564,118,119855,118,119907,118,119959,118,120011,118,120063,118,120115,118,120167,118,120219,118,120271,118,120323,118,120375,118,120427,118,120479,118,7456,118,957,118,120526,118,120584,118,120642,118,120700,118,120758,118,1141,118,1496,118,71430,118,43945,118,71872,118,119309,86,1639,86,1783,86,8548,86,119829,86,119881,86,119933,86,119985,86,120037,86,120089,86,120141,86,120193,86,120245,86,120297,86,120349,86,120401,86,120453,86,1140,86,11576,86,5081,86,5167,86,42719,86,42214,86,93960,86,71840,86,66845,86,623,119,119856,119,119908,119,119960,119,120012,119,120064,119,120116,119,120168,119,120220,119,120272,119,120324,119,120376,119,120428,119,120480,119,7457,119,1121,119,1309,119,1377,119,71434,119,71438,119,71439,119,43907,119,71919,87,71910,87,119830,87,119882,87,119934,87,119986,87,120038,87,120090,87,120142,87,120194,87,120246,87,120298,87,120350,87,120402,87,120454,87,1308,87,5043,87,5076,87,42218,87,5742,120,10539,120,10540,120,10799,120,65368,120,8569,120,119857,120,119909,120,119961,120,120013,120,120065,120,120117,120,120169,120,120221,120,120273,120,120325,120,120377,120,120429,120,120481,120,5441,120,5501,120,5741,88,9587,88,66338,88,71916,88,65336,88,8553,88,119831,88,119883,88,119935,88,119987,88,120039,88,120091,88,120143,88,120195,88,120247,88,120299,88,120351,88,120403,88,120455,88,42931,88,935,88,120510,88,120568,88,120626,88,120684,88,120742,88,11436,88,11613,88,5815,88,42219,88,66192,88,66228,88,66327,88,66855,88,611,121,7564,121,65369,121,119858,121,119910,121,119962,121,120014,121,120066,121,120118,121,120170,121,120222,121,120274,121,120326,121,120378,121,120430,121,120482,121,655,121,7935,121,43866,121,947,121,8509,121,120516,121,120574,121,120632,121,120690,121,120748,121,1199,121,4327,121,71900,121,65337,89,119832,89,119884,89,119936,89,119988,89,120040,89,120092,89,120144,89,120196,89,120248,89,120300,89,120352,89,120404,89,120456,89,933,89,978,89,120508,89,120566,89,120624,89,120682,89,120740,89,11432,89,1198,89,5033,89,5053,89,42220,89,94019,89,71844,89,66226,89,119859,122,119911,122,119963,122,120015,122,120067,122,120119,122,120171,122,120223,122,120275,122,120327,122,120379,122,120431,122,120483,122,7458,122,43923,122,71876,122,66293,90,71909,90,65338,90,8484,90,8488,90,119833,90,119885,90,119937,90,119989,90,120041,90,120197,90,120249,90,120301,90,120353,90,120405,90,120457,90,918,90,120493,90,120551,90,120609,90,120667,90,120725,90,5059,90,42204,90,71849,90,65282,34,65284,36,65285,37,65286,38,65290,42,65291,43,65294,46,65295,47,65296,48,65297,49,65298,50,65299,51,65300,52,65301,53,65302,54,65303,55,65304,56,65305,57,65308,60,65309,61,65310,62,65312,64,65316,68,65318,70,65319,71,65324,76,65329,81,65330,82,65333,85,65334,86,65335,87,65343,95,65346,98,65348,100,65350,102,65355,107,65357,109,65358,110,65361,113,65362,114,65364,116,65365,117,65367,119,65370,122,65371,123,65373,125,119846,109],"_default":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"cs":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"de":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"es":[8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"fr":[65374,126,65306,58,65281,33,8216,96,8245,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"it":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"ja":[8211,45,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65292,44,65307,59],"ko":[8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"pl":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"pt-BR":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"qps-ploc":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"ru":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,305,105,921,73,1009,112,215,120,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"tr":[160,32,8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"zh-hans":[65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41],"zh-hant":[8211,45,65374,126,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65307,59]}'))}static{this.cache=new w.LRUCachedFunction(Y=>{function re(Se){const Re=new Map;for(let Ie=0;Ie<Se.length;Ie+=2)Re.set(Se[Ie],Se[Ie+1]);return Re}function de(Se,Re){const Ie=new Map(Se);for(const[Fe,We]of Re)Ie.set(Fe,We);return Ie}function ye(Se,Re){if(!Se)return Re;const Ie=new Map;for(const[Fe,We]of Se)Re.has(Fe)&&Ie.set(Fe,We);return Ie}const ve=this.ambiguousCharacterData.value;let Pe=Y.filter(Se=>!Se.startsWith("_")&&Se in ve);Pe.length===0&&(Pe=["_default"]);let ke;for(const Se of Pe){const Re=re(ve[Se]);ke=ye(ke,Re)}const De=re(ve._common),Ae=de(De,ke);return new Me(Ae)})}static getInstance(Y){return Me.cache.get(Array.from(Y))}static{this._locales=new I.Lazy(()=>Object.keys(Me.ambiguousCharacterData.value).filter(Y=>!Y.startsWith("_")))}static getLocales(){return Me._locales.value}constructor(Y){this.confusableDictionary=Y}isAmbiguous(Y){return this.confusableDictionary.has(Y)}getPrimaryConfusable(Y){return this.confusableDictionary.get(Y)}getConfusableCodePoints(){return new Set(this.confusableDictionary.keys())}}e.AmbiguousCharacters=Me;class Te{static getRawData(){return JSON.parse("[9,10,11,12,13,32,127,160,173,847,1564,4447,4448,6068,6069,6155,6156,6157,6158,7355,7356,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8203,8204,8205,8206,8207,8234,8235,8236,8237,8238,8239,8287,8288,8289,8290,8291,8292,8293,8294,8295,8296,8297,8298,8299,8300,8301,8302,8303,10240,12288,12644,65024,65025,65026,65027,65028,65029,65030,65031,65032,65033,65034,65035,65036,65037,65038,65039,65279,65440,65520,65521,65522,65523,65524,65525,65526,65527,65528,65532,78844,119155,119156,119157,119158,119159,119160,119161,119162,917504,917505,917506,917507,917508,917509,917510,917511,917512,917513,917514,917515,917516,917517,917518,917519,917520,917521,917522,917523,917524,917525,917526,917527,917528,917529,917530,917531,917532,917533,917534,917535,917536,917537,917538,917539,917540,917541,917542,917543,917544,917545,917546,917547,917548,917549,917550,917551,917552,917553,917554,917555,917556,917557,917558,917559,917560,917561,917562,917563,917564,917565,917566,917567,917568,917569,917570,917571,917572,917573,917574,917575,917576,917577,917578,917579,917580,917581,917582,917583,917584,917585,917586,917587,917588,917589,917590,917591,917592,917593,917594,917595,917596,917597,917598,917599,917600,917601,917602,917603,917604,917605,917606,917607,917608,917609,917610,917611,917612,917613,917614,917615,917616,917617,917618,917619,917620,917621,917622,917623,917624,917625,917626,917627,917628,917629,917630,917631,917760,917761,917762,917763,917764,917765,917766,917767,917768,917769,917770,917771,917772,917773,917774,917775,917776,917777,917778,917779,917780,917781,917782,917783,917784,917785,917786,917787,917788,917789,917790,917791,917792,917793,917794,917795,917796,917797,917798,917799,917800,917801,917802,917803,917804,917805,917806,917807,917808,917809,917810,917811,917812,917813,917814,917815,917816,917817,917818,917819,917820,917821,917822,917823,917824,917825,917826,917827,917828,917829,917830,917831,917832,917833,917834,917835,917836,917837,917838,917839,917840,917841,917842,917843,917844,917845,917846,917847,917848,917849,917850,917851,917852,917853,917854,917855,917856,917857,917858,917859,917860,917861,917862,917863,917864,917865,917866,917867,917868,917869,917870,917871,917872,917873,917874,917875,917876,917877,917878,917879,917880,917881,917882,917883,917884,917885,917886,917887,917888,917889,917890,917891,917892,917893,917894,917895,917896,917897,917898,917899,917900,917901,917902,917903,917904,917905,917906,917907,917908,917909,917910,917911,917912,917913,917914,917915,917916,917917,917918,917919,917920,917921,917922,917923,917924,917925,917926,917927,917928,917929,917930,917931,917932,917933,917934,917935,917936,917937,917938,917939,917940,917941,917942,917943,917944,917945,917946,917947,917948,917949,917950,917951,917952,917953,917954,917955,917956,917957,917958,917959,917960,917961,917962,917963,917964,917965,917966,917967,917968,917969,917970,917971,917972,917973,917974,917975,917976,917977,917978,917979,917980,917981,917982,917983,917984,917985,917986,917987,917988,917989,917990,917991,917992,917993,917994,917995,917996,917997,917998,917999]")}static{this._data=void 0}static getData(){return this._data||(this._data=new Set(Te.getRawData())),this._data}static isInvisibleCharacter(Y){return Te.getData().has(Y)}static get codePoints(){return Te.getData()}}e.InvisibleCharacters=Te}),define(ce[47],he([0,1,12]),function(oe,e,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StringSHA1=e.toHexString=e.Hasher=e.stringHash=e.numberHash=e.doHash=e.hash=void 0;function I(v){return b(v,0)}e.hash=I;function b(v,r){switch(typeof v){case"object":return v===null?k(349,r):Array.isArray(v)?m(v,r):c(v,r);case"string":return P(v,r);case"boolean":return O(v,r);case"number":return k(v,r);case"undefined":return k(937,r);default:return k(617,r)}}e.doHash=b;function k(v,r){return(r<<5)-r+v|0}e.numberHash=k;function O(v,r){return k(v?433:863,r)}function P(v,r){r=k(149417,r);for(let _=0,C=v.length;_<C;_++)r=k(v.charCodeAt(_),r);return r}e.stringHash=P;function m(v,r){return r=k(104579,r),v.reduce((_,C)=>b(C,_),r)}function c(v,r){return r=k(181387,r),Object.keys(v).sort().reduce((_,C)=>(_=P(C,_),b(v[C],_)),r)}class A{constructor(){this._value=0}get value(){return this._value}hash(r){return this._value=b(r,this._value),this._value}}e.Hasher=A;var y;(function(v){v[v.BLOCK_SIZE=64]="BLOCK_SIZE",v[v.UNICODE_REPLACEMENT=65533]="UNICODE_REPLACEMENT"})(y||(y={}));function L(v,r,_=32){const C=_-r,o=~((1<<C)-1);return(v<<r|(o&v)>>>C)>>>0}function t(v,r=0,_=v.byteLength,C=0){for(let o=0;o<_;o++)v[r+o]=C}function u(v,r,_="0"){for(;v.length<r;)v=_+v;return v}function a(v,r=32){return v instanceof ArrayBuffer?Array.from(new Uint8Array(v)).map(_=>_.toString(16).padStart(2,"0")).join(""):u((v>>>0).toString(16),r/4)}e.toHexString=a;class i{static{this._bigBlock32=new DataView(new ArrayBuffer(320))}constructor(){this._h0=1732584193,this._h1=4023233417,this._h2=2562383102,this._h3=271733878,this._h4=3285377520,this._buff=new Uint8Array(64+3),this._buffDV=new DataView(this._buff.buffer),this._buffLen=0,this._totalLen=0,this._leftoverHighSurrogate=0,this._finished=!1}update(r){const _=r.length;if(_===0)return;const C=this._buff;let o=this._buffLen,n=this._leftoverHighSurrogate,h,S;for(n!==0?(h=n,S=-1,n=0):(h=r.charCodeAt(0),S=0);;){let p=h;if(w.isHighSurrogate(h))if(S+1<_){const D=r.charCodeAt(S+1);w.isLowSurrogate(D)?(S++,p=w.computeCodePoint(h,D)):p=65533}else{n=h;break}else w.isLowSurrogate(h)&&(p=65533);if(o=this._push(C,o,p),S++,S<_)h=r.charCodeAt(S);else break}this._buffLen=o,this._leftoverHighSurrogate=n}_push(r,_,C){return C<128?r[_++]=C:C<2048?(r[_++]=192|(C&1984)>>>6,r[_++]=128|(C&63)>>>0):C<65536?(r[_++]=224|(C&61440)>>>12,r[_++]=128|(C&4032)>>>6,r[_++]=128|(C&63)>>>0):(r[_++]=240|(C&1835008)>>>18,r[_++]=128|(C&258048)>>>12,r[_++]=128|(C&4032)>>>6,r[_++]=128|(C&63)>>>0),_>=64&&(this._step(),_-=64,this._totalLen+=64,r[0]=r[64+0],r[1]=r[64+1],r[2]=r[64+2]),_}digest(){return this._finished||(this._finished=!0,this._leftoverHighSurrogate&&(this._leftoverHighSurrogate=0,this._buffLen=this._push(this._buff,this._buffLen,65533)),this._totalLen+=this._buffLen,this._wrapUp()),a(this._h0)+a(this._h1)+a(this._h2)+a(this._h3)+a(this._h4)}_wrapUp(){this._buff[this._buffLen++]=128,t(this._buff,this._buffLen),this._buffLen>56&&(this._step(),t(this._buff));const r=8*this._totalLen;this._buffDV.setUint32(56,Math.floor(r/4294967296),!1),this._buffDV.setUint32(60,r%4294967296,!1),this._step()}_step(){const r=i._bigBlock32,_=this._buffDV;for(let g=0;g<64;g+=4)r.setUint32(g,_.getUint32(g,!1),!1);for(let g=64;g<320;g+=4)r.setUint32(g,L(r.getUint32(g-12,!1)^r.getUint32(g-32,!1)^r.getUint32(g-56,!1)^r.getUint32(g-64,!1),1),!1);let C=this._h0,o=this._h1,n=this._h2,h=this._h3,S=this._h4,p,D,f;for(let g=0;g<80;g++)g<20?(p=o&n|~o&h,D=1518500249):g<40?(p=o^n^h,D=1859775393):g<60?(p=o&n|o&h|n&h,D=2400959708):(p=o^n^h,D=3395469782),f=L(C,5)+p+S+D+r.getUint32(g*4,!1)&4294967295,S=h,h=n,n=L(o,30),o=C,C=f;this._h0=this._h0+C&4294967295,this._h1=this._h1+o&4294967295,this._h2=this._h2+n&4294967295,this._h3=this._h3+h&4294967295,this._h4=this._h4+S&4294967295}}e.StringSHA1=i}),define(ce[48],he([0,1]),function(oe,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MicrotaskDelay=void 0,e.MicrotaskDelay=Symbol("MicrotaskDelay")}),define(ce[49],he([0,1,21,12]),function(oe,e,w,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TernarySearchTree=e.UriIterator=e.PathIterator=e.ConfigKeysIterator=e.StringIterator=void 0;class b{constructor(){this._value="",this._pos=0}reset(t){return this._value=t,this._pos=0,this}next(){return this._pos+=1,this}hasNext(){return this._pos<this._value.length-1}cmp(t){const u=t.charCodeAt(0),a=this._value.charCodeAt(this._pos);return u-a}value(){return this._value[this._pos]}}e.StringIterator=b;class k{constructor(t=!0){this._caseSensitive=t}reset(t){return this._value=t,this._from=0,this._to=0,this.next()}hasNext(){return this._to<this._value.length}next(){this._from=this._to;let t=!0;for(;this._to<this._value.length;this._to++)if(this._value.charCodeAt(this._to)===46)if(t)this._from++;else break;else t=!1;return this}cmp(t){return this._caseSensitive?(0,I.compareSubstring)(t,this._value,0,t.length,this._from,this._to):(0,I.compareSubstringIgnoreCase)(t,this._value,0,t.length,this._from,this._to)}value(){return this._value.substring(this._from,this._to)}}e.ConfigKeysIterator=k;class O{constructor(t=!0,u=!0){this._splitOnBackslash=t,this._caseSensitive=u}reset(t){this._from=0,this._to=0,this._value=t,this._valueLen=t.length;for(let u=t.length-1;u>=0;u--,this._valueLen--){const a=this._value.charCodeAt(u);if(!(a===47||this._splitOnBackslash&&a===92))break}return this.next()}hasNext(){return this._to<this._valueLen}next(){this._from=this._to;let t=!0;for(;this._to<this._valueLen;this._to++){const u=this._value.charCodeAt(this._to);if(u===47||this._splitOnBackslash&&u===92)if(t)this._from++;else break;else t=!1}return this}cmp(t){return this._caseSensitive?(0,I.compareSubstring)(t,this._value,0,t.length,this._from,this._to):(0,I.compareSubstringIgnoreCase)(t,this._value,0,t.length,this._from,this._to)}value(){return this._value.substring(this._from,this._to)}}e.PathIterator=O;var P;(function(L){L[L.Scheme=1]="Scheme",L[L.Authority=2]="Authority",L[L.Path=3]="Path",L[L.Query=4]="Query",L[L.Fragment=5]="Fragment"})(P||(P={}));class m{constructor(t,u){this._ignorePathCasing=t,this._ignoreQueryAndFragment=u,this._states=[],this._stateIdx=0}reset(t){return this._value=t,this._states=[],this._value.scheme&&this._states.push(1),this._value.authority&&this._states.push(2),this._value.path&&(this._pathIterator=new O(!1,!this._ignorePathCasing(t)),this._pathIterator.reset(t.path),this._pathIterator.value()&&this._states.push(3)),this._ignoreQueryAndFragment(t)||(this._value.query&&this._states.push(4),this._value.fragment&&this._states.push(5)),this._stateIdx=0,this}next(){return this._states[this._stateIdx]===3&&this._pathIterator.hasNext()?this._pathIterator.next():this._stateIdx+=1,this}hasNext(){return this._states[this._stateIdx]===3&&this._pathIterator.hasNext()||this._stateIdx<this._states.length-1}cmp(t){if(this._states[this._stateIdx]===1)return(0,I.compareIgnoreCase)(t,this._value.scheme);if(this._states[this._stateIdx]===2)return(0,I.compareIgnoreCase)(t,this._value.authority);if(this._states[this._stateIdx]===3)return this._pathIterator.cmp(t);if(this._states[this._stateIdx]===4)return(0,I.compare)(t,this._value.query);if(this._states[this._stateIdx]===5)return(0,I.compare)(t,this._value.fragment);throw new Error}value(){if(this._states[this._stateIdx]===1)return this._value.scheme;if(this._states[this._stateIdx]===2)return this._value.authority;if(this._states[this._stateIdx]===3)return this._pathIterator.value();if(this._states[this._stateIdx]===4)return this._value.query;if(this._states[this._stateIdx]===5)return this._value.fragment;throw new Error}}e.UriIterator=m;class c{constructor(){this.height=1}isEmpty(){return!this.left&&!this.mid&&!this.right&&!this.value}rotateLeft(){const t=this.right;return this.right=t.left,t.left=this,this.updateHeight(),t.updateHeight(),t}rotateRight(){const t=this.left;return this.left=t.right,t.right=this,this.updateHeight(),t.updateHeight(),t}updateHeight(){this.height=1+Math.max(this.heightLeft,this.heightRight)}balanceFactor(){return this.heightRight-this.heightLeft}get heightLeft(){return this.left?.height??0}get heightRight(){return this.right?.height??0}}var A;(function(L){L[L.Left=-1]="Left",L[L.Mid=0]="Mid",L[L.Right=1]="Right"})(A||(A={}));class y{static forUris(t=()=>!1,u=()=>!1){return new y(new m(t,u))}static forPaths(t=!1){return new y(new O(void 0,!t))}static forStrings(){return new y(new b)}static forConfigKeys(){return new y(new k)}constructor(t){this._iter=t}clear(){this._root=void 0}fill(t,u){if(u){const a=u.slice(0);(0,w.shuffle)(a);for(const i of a)this.set(i,t)}else{const a=t.slice(0);(0,w.shuffle)(a);for(const i of a)this.set(i[0],i[1])}}set(t,u){const a=this._iter.reset(t);let i;this._root||(this._root=new c,this._root.segment=a.value());const v=[];for(i=this._root;;){const _=a.cmp(i.segment);if(_>0)i.left||(i.left=new c,i.left.segment=a.value()),v.push([-1,i]),i=i.left;else if(_<0)i.right||(i.right=new c,i.right.segment=a.value()),v.push([1,i]),i=i.right;else if(a.hasNext())a.next(),i.mid||(i.mid=new c,i.mid.segment=a.value()),v.push([0,i]),i=i.mid;else break}const r=i.value;i.value=u,i.key=t;for(let _=v.length-1;_>=0;_--){const C=v[_][1];C.updateHeight();const o=C.balanceFactor();if(o<-1||o>1){const n=v[_][0],h=v[_+1][0];if(n===1&&h===1)v[_][1]=C.rotateLeft();else if(n===-1&&h===-1)v[_][1]=C.rotateRight();else if(n===1&&h===-1)C.right=v[_+1][1]=v[_+1][1].rotateRight(),v[_][1]=C.rotateLeft();else if(n===-1&&h===1)C.left=v[_+1][1]=v[_+1][1].rotateLeft(),v[_][1]=C.rotateRight();else throw new Error;if(_>0)switch(v[_-1][0]){case-1:v[_-1][1].left=v[_][1];break;case 1:v[_-1][1].right=v[_][1];break;case 0:v[_-1][1].mid=v[_][1];break}else this._root=v[0][1]}}return r}get(t){return this._getNode(t)?.value}_getNode(t){const u=this._iter.reset(t);let a=this._root;for(;a;){const i=u.cmp(a.segment);if(i>0)a=a.left;else if(i<0)a=a.right;else if(u.hasNext())u.next(),a=a.mid;else break}return a}has(t){const u=this._getNode(t);return!(u?.value===void 0&&u?.mid===void 0)}delete(t){return this._delete(t,!1)}deleteSuperstr(t){return this._delete(t,!0)}_delete(t,u){const a=this._iter.reset(t),i=[];let v=this._root;for(;v;){const r=a.cmp(v.segment);if(r>0)i.push([-1,v]),v=v.left;else if(r<0)i.push([1,v]),v=v.right;else if(a.hasNext())a.next(),i.push([0,v]),v=v.mid;else break}if(v){if(u?(v.left=void 0,v.mid=void 0,v.right=void 0,v.height=1):(v.key=void 0,v.value=void 0),!v.mid&&!v.value)if(v.left&&v.right){const r=this._min(v.right);if(r.key){const{key:_,value:C,segment:o}=r;this._delete(r.key,!1),v.key=_,v.value=C,v.segment=o}}else{const r=v.left??v.right;if(i.length>0){const[_,C]=i[i.length-1];switch(_){case-1:C.left=r;break;case 0:C.mid=r;break;case 1:C.right=r;break}}else this._root=r}for(let r=i.length-1;r>=0;r--){const _=i[r][1];_.updateHeight();const C=_.balanceFactor();if(C>1?(_.right.balanceFactor()>=0||(_.right=_.right.rotateRight()),i[r][1]=_.rotateLeft()):C<-1&&(_.left.balanceFactor()<=0||(_.left=_.left.rotateLeft()),i[r][1]=_.rotateRight()),r>0)switch(i[r-1][0]){case-1:i[r-1][1].left=i[r][1];break;case 1:i[r-1][1].right=i[r][1];break;case 0:i[r-1][1].mid=i[r][1];break}else this._root=i[0][1]}}}_min(t){for(;t.left;)t=t.left;return t}findSubstr(t){const u=this._iter.reset(t);let a=this._root,i;for(;a;){const v=u.cmp(a.segment);if(v>0)a=a.left;else if(v<0)a=a.right;else if(u.hasNext())u.next(),i=a.value||i,a=a.mid;else break}return a&&a.value||i}findSuperstr(t){return this._findSuperstrOrElement(t,!1)}_findSuperstrOrElement(t,u){const a=this._iter.reset(t);let i=this._root;for(;i;){const v=a.cmp(i.segment);if(v>0)i=i.left;else if(v<0)i=i.right;else if(a.hasNext())a.next(),i=i.mid;else return i.mid?this._entries(i.mid):u?i.value:void 0}}hasElementOrSubtree(t){return this._findSuperstrOrElement(t,!0)!==void 0}forEach(t){for(const[u,a]of this)t(a,u)}*[Symbol.iterator](){yield*this._entries(this._root)}_entries(t){const u=[];return this._dfsEntries(t,u),u[Symbol.iterator]()}_dfsEntries(t,u){t&&(t.left&&this._dfsEntries(t.left,u),t.value&&u.push([t.key,t.value]),t.mid&&this._dfsEntries(t.mid,u),t.right&&this._dfsEntries(t.right,u))}_isBalanced(){const t=u=>{if(!u)return!0;const a=u.balanceFactor();return a<-1||a>1?!1:t(u.left)&&t(u.right)};return t(this._root)}}e.TernarySearchTree=y}),define(ce[8],he([0,1]),function(oe,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.withNullAsUndefined=e.validateConstraint=e.validateConstraints=e.areFunctions=e.isFunction=e.isEmptyObject=e.assertAllDefined=e.assertIsDefined=e.assertType=e.isUndefinedOrNull=e.isDefined=e.isUndefined=e.isBoolean=e.isIterable=e.isNumber=e.isTypedArray=e.isObject=e.isStringArray=e.isString=void 0;function w(n){return typeof n=="string"}e.isString=w;function I(n){return Array.isArray(n)&&n.every(h=>w(h))}e.isStringArray=I;function b(n){return typeof n=="object"&&n!==null&&!Array.isArray(n)&&!(n instanceof RegExp)&&!(n instanceof Date)}e.isObject=b;function k(n){const h=Object.getPrototypeOf(Uint8Array);return typeof n=="object"&&n instanceof h}e.isTypedArray=k;function O(n){return typeof n=="number"&&!isNaN(n)}e.isNumber=O;function P(n){return!!n&&typeof n[Symbol.iterator]=="function"}e.isIterable=P;function m(n){return n===!0||n===!1}e.isBoolean=m;function c(n){return typeof n>"u"}e.isUndefined=c;function A(n){return!y(n)}e.isDefined=A;function y(n){return c(n)||n===null}e.isUndefinedOrNull=y;function L(n,h){if(!n)throw new Error(h?`Unexpected type, expected '${h}'`:"Unexpected type")}e.assertType=L;function t(n){if(y(n))throw new Error("Assertion Failed: argument is undefined or null");return n}e.assertIsDefined=t;function u(...n){const h=[];for(let S=0;S<n.length;S++){const p=n[S];if(y(p))throw new Error(`Assertion Failed: argument at index ${S} is undefined or null`);h.push(p)}return h}e.assertAllDefined=u;const a=Object.prototype.hasOwnProperty;function i(n){if(!b(n))return!1;for(const h in n)if(a.call(n,h))return!1;return!0}e.isEmptyObject=i;function v(n){return typeof n=="function"}e.isFunction=v;function r(...n){return n.length>0&&n.every(v)}e.areFunctions=r;function _(n,h){const S=Math.min(n.length,h.length);for(let p=0;p<S;p++)C(n[p],h[p])}e.validateConstraints=_;function C(n,h){if(w(h)){if(typeof n!==h)throw new Error(`argument does not match constraint: typeof ${h}`)}else if(v(h)){try{if(n instanceof h)return}catch{}if(!y(n)&&n.constructor===h||h.length===1&&h.call(void 0,n)===!0)return;throw new Error("argument does not match one of these constraints: arg instanceof constraint, arg.constructor === constraint, nor constraint(arg) === true")}}e.validateConstraint=C;function o(n){return n===null?void 0:n}e.withNullAsUndefined=o}),define(ce[30],he([0,1,8]),function(oe,e,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createProxyObject=e.getAllMethodNames=e.getAllPropertyNames=e.filter=e.getCaseInsensitive=e.distinct=e.getOrDefault=e.safeStringify=e.equals=e.mixin=e.cloneAndChange=e.deepFreeze=e.deepClone=void 0;function I(r){if(!r||typeof r!="object"||r instanceof RegExp)return r;const _=Array.isArray(r)?[]:{};return Object.entries(r).forEach(([C,o])=>{_[C]=o&&typeof o=="object"?I(o):o}),_}e.deepClone=I;function b(r){if(!r||typeof r!="object")return r;const _=[r];for(;_.length>0;){const C=_.shift();Object.freeze(C);for(const o in C)if(k.call(C,o)){const n=C[o];typeof n=="object"&&!Object.isFrozen(n)&&!(0,w.isTypedArray)(n)&&_.push(n)}}return r}e.deepFreeze=b;const k=Object.prototype.hasOwnProperty;function O(r,_){return P(r,_,new Set)}e.cloneAndChange=O;function P(r,_,C){if((0,w.isUndefinedOrNull)(r))return r;const o=_(r);if(typeof o<"u")return o;if(Array.isArray(r)){const n=[];for(const h of r)n.push(P(h,_,C));return n}if((0,w.isObject)(r)){if(C.has(r))throw new Error("Cannot clone recursive data-structure");C.add(r);const n={};for(const h in r)k.call(r,h)&&(n[h]=P(r[h],_,C));return C.delete(r),n}return r}function m(r,_,C=!0){return(0,w.isObject)(r)?((0,w.isObject)(_)&&Object.keys(_).forEach(o=>{o in r?C&&((0,w.isObject)(r[o])&&(0,w.isObject)(_[o])?m(r[o],_[o],C):r[o]=_[o]):r[o]=_[o]}),r):_}e.mixin=m;function c(r,_){if(r===_)return!0;if(r==null||_===null||_===void 0||typeof r!=typeof _||typeof r!="object"||Array.isArray(r)!==Array.isArray(_))return!1;let C,o;if(Array.isArray(r)){if(r.length!==_.length)return!1;for(C=0;C<r.length;C++)if(!c(r[C],_[C]))return!1}else{const n=[];for(o in r)n.push(o);n.sort();const h=[];for(o in _)h.push(o);if(h.sort(),!c(n,h))return!1;for(C=0;C<n.length;C++)if(!c(r[n[C]],_[n[C]]))return!1}return!0}e.equals=c;function A(r){const _=new Set;return JSON.stringify(r,(C,o)=>{if((0,w.isObject)(o)||Array.isArray(o)){if(_.has(o))return"[Circular]";_.add(o)}return o})}e.safeStringify=A;function y(r,_,C){const o=_(r);return typeof o>"u"?C:o}e.getOrDefault=y;function L(r,_){const C=Object.create(null);return!r||!_||Object.keys(_).forEach(n=>{const h=r[n],S=_[n];c(h,S)||(C[n]=S)}),C}e.distinct=L;function t(r,_){const C=_.toLowerCase(),o=Object.keys(r).find(n=>n.toLowerCase()===C);return o?r[o]:r[_]}e.getCaseInsensitive=t;function u(r,_){const C=Object.create(null);for(const[o,n]of Object.entries(r))_(o,n)&&(C[o]=n);return C}e.filter=u;function a(r){let _=[];for(;Object.prototype!==r;)_=_.concat(Object.getOwnPropertyNames(r)),r=Object.getPrototypeOf(r);return _}e.getAllPropertyNames=a;function i(r){const _=[];for(const C of a(r))typeof r[C]=="function"&&_.push(C);return _}e.getAllMethodNames=i;function v(r,_){const C=n=>function(){const h=Array.prototype.slice.call(arguments,0);return _(n,h)},o={};for(const n of r)o[n]=C(n);return o}e.createProxyObject=v}),define(ce[50],he([0,1]),function(oe,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.generateUuid=e.isUUID=void 0;const w=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function I(b){return w.test(b)}e.isUUID=I,e.generateUuid=function(){if(typeof crypto=="object"&&typeof crypto.randomUUID=="function")return crypto.randomUUID.bind(crypto);let b;typeof crypto=="object"&&typeof crypto.getRandomValues=="function"?b=crypto.getRandomValues.bind(crypto):b=function(P){for(let m=0;m<P.length;m++)P[m]=Math.floor(Math.random()*256);return P};const k=new Uint8Array(16),O=[];for(let P=0;P<256;P++)O.push(P.toString(16).padStart(2,"0"));return function(){b(k),k[6]=k[6]&15|64,k[8]=k[8]&63|128;let m=0,c="";return c+=O[k[m++]],c+=O[k[m++]],c+=O[k[m++]],c+=O[k[m++]],c+="-",c+=O[k[m++]],c+=O[k[m++]],c+="-",c+=O[k[m++]],c+=O[k[m++]],c+="-",c+=O[k[m++]],c+=O[k[m++]],c+="-",c+=O[k[m++]],c+=O[k[m++]],c+=O[k[m++]],c+=O[k[m++]],c+=O[k[m++]],c+=O[k[m++]],c}}()}),define(ce[31],he([0,1]),function(oe,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isUtilityProcess=void 0;function w(I){return!!I.parentPort}e.isUtilityProcess=w}),define(ce[51],he([13,10]),function(oe,e){return oe.create("vs/base/common/date",e)}),define(ce[52],he([0,1,51]),function(oe,e,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.toLocalISOString=e.fromNow=void 0;const I=60,b=I*60,k=b*24,O=k*7,P=k*30,m=k*365;function c(y,L,t,u){typeof y!="number"&&(y=y.getTime());const a=Math.round((new Date().getTime()-y)/1e3);if(a<-30)return(0,w.localize)(0,null,c(new Date().getTime()+a*1e3,!1));if(!u&&a<30)return(0,w.localize)(1,null);let i;return a<I?(i=a,L?i===1?t?(0,w.localize)(2,null,i):(0,w.localize)(3,null,i):t?(0,w.localize)(4,null,i):(0,w.localize)(5,null,i):i===1?t?(0,w.localize)(6,null,i):(0,w.localize)(7,null,i):t?(0,w.localize)(8,null,i):(0,w.localize)(9,null,i)):a<b?(i=Math.floor(a/I),L?i===1?t?(0,w.localize)(10,null,i):(0,w.localize)(11,null,i):t?(0,w.localize)(12,null,i):(0,w.localize)(13,null,i):i===1?t?(0,w.localize)(14,null,i):(0,w.localize)(15,null,i):t?(0,w.localize)(16,null,i):(0,w.localize)(17,null,i)):a<k?(i=Math.floor(a/b),L?i===1?t?(0,w.localize)(18,null,i):(0,w.localize)(19,null,i):t?(0,w.localize)(20,null,i):(0,w.localize)(21,null,i):i===1?t?(0,w.localize)(22,null,i):(0,w.localize)(23,null,i):t?(0,w.localize)(24,null,i):(0,w.localize)(25,null,i)):a<O?(i=Math.floor(a/k),L?i===1?(0,w.localize)(26,null,i):(0,w.localize)(27,null,i):i===1?(0,w.localize)(28,null,i):(0,w.localize)(29,null,i)):a<P?(i=Math.floor(a/O),L?i===1?t?(0,w.localize)(30,null,i):(0,w.localize)(31,null,i):t?(0,w.localize)(32,null,i):(0,w.localize)(33,null,i):i===1?t?(0,w.localize)(34,null,i):(0,w.localize)(35,null,i):t?(0,w.localize)(36,null,i):(0,w.localize)(37,null,i)):a<m?(i=Math.floor(a/P),L?i===1?t?(0,w.localize)(38,null,i):(0,w.localize)(39,null,i):t?(0,w.localize)(40,null,i):(0,w.localize)(41,null,i):i===1?t?(0,w.localize)(42,null,i):(0,w.localize)(43,null,i):t?(0,w.localize)(44,null,i):(0,w.localize)(45,null,i)):(i=Math.floor(a/m),L?i===1?t?(0,w.localize)(46,null,i):(0,w.localize)(47,null,i):t?(0,w.localize)(48,null,i):(0,w.localize)(49,null,i):i===1?t?(0,w.localize)(50,null,i):(0,w.localize)(51,null,i):t?(0,w.localize)(52,null,i):(0,w.localize)(53,null,i))}e.fromNow=c;function A(y){return y.getFullYear()+"-"+String(y.getMonth()+1).padStart(2,"0")+"-"+String(y.getDate()).padStart(2,"0")+"T"+String(y.getHours()).padStart(2,"0")+":"+String(y.getMinutes()).padStart(2,"0")+":"+String(y.getSeconds()).padStart(2,"0")+"."+(y.getMilliseconds()/1e3).toFixed(3).slice(2,5)+"Z"}e.toLocalISOString=A}),define(ce[53],he([13,10]),function(oe,e){return oe.create("vs/base/common/errorMessage",e)}),define(ce[54],he([0,1,21,8,53]),function(oe,e,w,I,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createErrorWithActions=e.isErrorWithActions=e.toErrorMessage=void 0;function k(y,L){return L&&(y.stack||y.stacktrace)?b.localize(0,null,P(y),O(y.stack)||O(y.stacktrace)):P(y)}function O(y){return Array.isArray(y)?y.join(`
`):y}function P(y){return y.code==="ERR_UNC_HOST_NOT_ALLOWED"?`${y.message}. Please update the 'security.allowedUNCHosts' setting if you want to allow this host.`:typeof y.code=="string"&&typeof y.errno=="number"&&typeof y.syscall=="string"?b.localize(1,null,y.message):y.message||b.localize(2,null)}function m(y=null,L=!1){if(!y)return b.localize(3,null);if(Array.isArray(y)){const t=w.coalesce(y),u=m(t[0],L);return t.length>1?b.localize(4,null,u,t.length):u}if(I.isString(y))return y;if(y.detail){const t=y.detail;if(t.error)return k(t.error,L);if(t.exception)return k(t.exception,L)}return y.stack?k(y,L):y.message?y.message:b.localize(5,null)}e.toErrorMessage=m;function c(y){const L=y;return L instanceof Error&&Array.isArray(L.actions)}e.isErrorWithActions=c;function A(y,L){let t;return typeof y=="string"?t=new Error(y):t=y,t.actions=L,t}e.createErrorWithActions=A}),define(ce[55],he([13,10]),function(oe,e){return oe.create("vs/base/common/platform",e)}),define(ce[2],he([0,1,55]),function(oe,e,w){"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.setTimeout0IsFaster=e.translationsConfigFile=e.platformLocale=e.locale=e.Language=e.language=e.userAgent=e.platform=e.isCI=e.isMobile=e.isIOS=e.isWebWorker=e.isWeb=e.isElectron=e.isNative=e.isLinuxSnap=e.isLinux=e.isMacintosh=e.isWindows=e.PlatformToString=e.Platform=e.globals=e.LANGUAGE_DEFAULT=void 0,e.LANGUAGE_DEFAULT="en";let I=!1,b=!1,k=!1,O=!1,P=!1,m=!1,c=!1,A=!1,y=!1,L=!1,t,u=e.LANGUAGE_DEFAULT,a=e.LANGUAGE_DEFAULT,i,v;e.globals=typeof self=="object"?self:typeof global=="object"?global:{};let r;typeof e.globals.vscode<"u"&&typeof e.globals.vscode.process<"u"?r=e.globals.vscode.process:typeof process<"u"&&(r=process);const _=typeof r?.versions?.electron=="string",C=_&&r?.type==="renderer";if(typeof navigator=="object"&&!C)v=navigator.userAgent,I=v.indexOf("Windows")>=0,b=v.indexOf("Macintosh")>=0,A=(v.indexOf("Macintosh")>=0||v.indexOf("iPad")>=0||v.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,k=v.indexOf("Linux")>=0,L=v?.indexOf("Mobi")>=0,m=!0,t=w.getConfiguredDefaultLocale(w.localize(0,null))||e.LANGUAGE_DEFAULT,u=t,a=navigator.language;else if(typeof r=="object"){I=r.platform==="win32",b=r.platform==="darwin",k=r.platform==="linux",O=k&&!!r.env.SNAP&&!!r.env.SNAP_REVISION,c=_,y=!!r.env.CI||!!r.env.BUILD_ARTIFACTSTAGINGDIRECTORY,t=e.LANGUAGE_DEFAULT,u=e.LANGUAGE_DEFAULT;const M=r.env.VSCODE_NLS_CONFIG;if(M)try{const F=JSON.parse(M),l=F.availableLanguages["*"];t=F.locale,a=F.osLocale,u=l||e.LANGUAGE_DEFAULT,i=F._translationsConfigFile}catch{}P=!0}else console.error("Unable to resolve platform.");var o;(function(M){M[M.Web=0]="Web",M[M.Mac=1]="Mac",M[M.Linux=2]="Linux",M[M.Windows=3]="Windows"})(o||(e.Platform=o={}));function n(M){switch(M){case 0:return"Web";case 1:return"Mac";case 2:return"Linux";case 3:return"Windows"}}e.PlatformToString=n;let h=0;b?h=1:I?h=3:k&&(h=2),e.isWindows=I,e.isMacintosh=b,e.isLinux=k,e.isLinuxSnap=O,e.isNative=P,e.isElectron=c,e.isWeb=m,e.isWebWorker=m&&typeof e.globals.importScripts=="function",e.isIOS=A,e.isMobile=L,e.isCI=y,e.platform=h,e.userAgent=v,e.language=u;var S;(function(M){function F(){return e.language}M.value=F;function l(){return e.language.length===2?e.language==="en":e.language.length>=3?e.language[0]==="e"&&e.language[1]==="n"&&e.language[2]==="-":!1}M.isDefaultVariant=l;function E(){return e.language==="en"}M.isDefault=E})(S||(e.Language=S={})),e.locale=t,e.platformLocale=a,e.translationsConfigFile=i,e.setTimeout0IsFaster=typeof e.globals.postMessage=="function"&&!e.globals.importScripts,e.setTimeout0=(()=>{if(e.setTimeout0IsFaster){const M=[];e.globals.addEventListener("message",l=>{if(l.data&&l.data.vscodeScheduleAsyncWork)for(let E=0,B=M.length;E<B;E++){const V=M[E];if(V.id===l.data.vscodeScheduleAsyncWork){M.splice(E,1),V.callback();return}}});let F=0;return l=>{const E=++F;M.push({id:E,callback:l}),e.globals.postMessage({vscodeScheduleAsyncWork:E},"*")}}return M=>setTimeout(M)})();var p;(function(M){M[M.Windows=1]="Windows",M[M.Macintosh=2]="Macintosh",M[M.Linux=3]="Linux"})(p||(e.OperatingSystem=p={})),e.OS=b||A?2:I?1:3;let D=!0,f=!1;function g(){if(!f){f=!0;const M=new Uint8Array(2);M[0]=1,M[1]=2,D=new Uint16Array(M.buffer)[0]===(2<<8)+1}return D}e.isLittleEndian=g,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(ce[15],he([0,1,2]),function(oe,e,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.arch=e.platform=e.env=e.cwd=void 0;let I;if(typeof w.globals.vscode<"u"&&typeof w.globals.vscode.process<"u"){const b=w.globals.vscode.process;I={get platform(){return b.platform},get arch(){return b.arch},get env(){return b.env},cwd(){return b.cwd()}}}else typeof process<"u"?I={get platform(){return process.platform},get arch(){return process.arch},get env(){return process.env},cwd(){return process.env.VSCODE_CWD||process.cwd()}}:I={get platform(){return w.isWindows?"win32":w.isMacintosh?"darwin":"linux"},get arch(){},get env(){return{}},cwd(){return"/"}};e.cwd=I.cwd,e.env=I.env,e.platform=I.platform,e.arch=I.arch}),define(ce[7],he([0,1,15]),function(oe,e,w){"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 I=65,b=97,k=90,O=122,P=46,m=47,c=92,A=58,y=63;class L extends Error{constructor(h,S,p){let D;typeof S=="string"&&S.indexOf("not ")===0?(D="must not be",S=S.replace(/^not /,"")):D="must be";const f=h.indexOf(".")!==-1?"property":"argument";let g=`The "${h}" ${f} ${D} of type ${S}`;g+=`. Received type ${typeof p}`,super(g),this.code="ERR_INVALID_ARG_TYPE"}}function t(n,h){if(n===null||typeof n!="object")throw new L(h,"Object",n)}function u(n,h){if(typeof n!="string")throw new L(h,"string",n)}const a=w.platform==="win32";function i(n){return n===m||n===c}function v(n){return n===m}function r(n){return n>=I&&n<=k||n>=b&&n<=O}function _(n,h,S,p){let D="",f=0,g=-1,M=0,F=0;for(let l=0;l<=n.length;++l){if(l<n.length)F=n.charCodeAt(l);else{if(p(F))break;F=m}if(p(F)){if(!(g===l-1||M===1))if(M===2){if(D.length<2||f!==2||D.charCodeAt(D.length-1)!==P||D.charCodeAt(D.length-2)!==P){if(D.length>2){const E=D.lastIndexOf(S);E===-1?(D="",f=0):(D=D.slice(0,E),f=D.length-1-D.lastIndexOf(S)),g=l,M=0;continue}else if(D.length!==0){D="",f=0,g=l,M=0;continue}}h&&(D+=D.length>0?`${S}..`:"..",f=2)}else D.length>0?D+=`${S}${n.slice(g+1,l)}`:D=n.slice(g+1,l),f=l-g-1;g=l,M=0}else F===P&&M!==-1?++M:M=-1}return D}function C(n,h){t(h,"pathObject");const S=h.dir||h.root,p=h.base||`${h.name||""}${h.ext||""}`;return S?S===h.root?`${S}${p}`:`${S}${n}${p}`:p}e.win32={resolve(...n){let h="",S="",p=!1;for(let D=n.length-1;D>=-1;D--){let f;if(D>=0){if(f=n[D],u(f,"path"),f.length===0)continue}else h.length===0?f=w.cwd():(f=w.env[`=${h}`]||w.cwd(),(f===void 0||f.slice(0,2).toLowerCase()!==h.toLowerCase()&&f.charCodeAt(2)===c)&&(f=`${h}\\`));const g=f.length;let M=0,F="",l=!1;const E=f.charCodeAt(0);if(g===1)i(E)&&(M=1,l=!0);else if(i(E))if(l=!0,i(f.charCodeAt(1))){let B=2,V=B;for(;B<g&&!i(f.charCodeAt(B));)B++;if(B<g&&B!==V){const T=f.slice(V,B);for(V=B;B<g&&i(f.charCodeAt(B));)B++;if(B<g&&B!==V){for(V=B;B<g&&!i(f.charCodeAt(B));)B++;(B===g||B!==V)&&(F=`\\\\${T}\\${f.slice(V,B)}`,M=B)}}}else M=1;else r(E)&&f.charCodeAt(1)===A&&(F=f.slice(0,2),M=2,g>2&&i(f.charCodeAt(2))&&(l=!0,M=3));if(F.length>0)if(h.length>0){if(F.toLowerCase()!==h.toLowerCase())continue}else h=F;if(p){if(h.length>0)break}else if(S=`${f.slice(M)}\\${S}`,p=l,l&&h.length>0)break}return S=_(S,!p,"\\",i),p?`${h}\\${S}`:`${h}${S}`||"."},normalize(n){u(n,"path");const h=n.length;if(h===0)return".";let S=0,p,D=!1;const f=n.charCodeAt(0);if(h===1)return v(f)?"\\":n;if(i(f))if(D=!0,i(n.charCodeAt(1))){let M=2,F=M;for(;M<h&&!i(n.charCodeAt(M));)M++;if(M<h&&M!==F){const l=n.slice(F,M);for(F=M;M<h&&i(n.charCodeAt(M));)M++;if(M<h&&M!==F){for(F=M;M<h&&!i(n.charCodeAt(M));)M++;if(M===h)return`\\\\${l}\\${n.slice(F)}\\`;M!==F&&(p=`\\\\${l}\\${n.slice(F,M)}`,S=M)}}}else S=1;else r(f)&&n.charCodeAt(1)===A&&(p=n.slice(0,2),S=2,h>2&&i(n.charCodeAt(2))&&(D=!0,S=3));let g=S<h?_(n.slice(S),!D,"\\",i):"";return g.length===0&&!D&&(g="."),g.length>0&&i(n.charCodeAt(h-1))&&(g+="\\"),p===void 0?D?`\\${g}`:g:D?`${p}\\${g}`:`${p}${g}`},isAbsolute(n){u(n,"path");const h=n.length;if(h===0)return!1;const S=n.charCodeAt(0);return i(S)||h>2&&r(S)&&n.charCodeAt(1)===A&&i(n.charCodeAt(2))},join(...n){if(n.length===0)return".";let h,S;for(let f=0;f<n.length;++f){const g=n[f];u(g,"path"),g.length>0&&(h===void 0?h=S=g:h+=`\\${g}`)}if(h===void 0)return".";let p=!0,D=0;if(typeof S=="string"&&i(S.charCodeAt(0))){++D;const f=S.length;f>1&&i(S.charCodeAt(1))&&(++D,f>2&&(i(S.charCodeAt(2))?++D:p=!1))}if(p){for(;D<h.length&&i(h.charCodeAt(D));)D++;D>=2&&(h=`\\${h.slice(D)}`)}return e.win32.normalize(h)},relative(n,h){if(u(n,"from"),u(h,"to"),n===h)return"";const S=e.win32.resolve(n),p=e.win32.resolve(h);if(S===p||(n=S.toLowerCase(),h=p.toLowerCase(),n===h))return"";let D=0;for(;D<n.length&&n.charCodeAt(D)===c;)D++;let f=n.length;for(;f-1>D&&n.charCodeAt(f-1)===c;)f--;const g=f-D;let M=0;for(;M<h.length&&h.charCodeAt(M)===c;)M++;let F=h.length;for(;F-1>M&&h.charCodeAt(F-1)===c;)F--;const l=F-M,E=g<l?g:l;let B=-1,V=0;for(;V<E;V++){const q=n.charCodeAt(D+V);if(q!==h.charCodeAt(M+V))break;q===c&&(B=V)}if(V!==E){if(B===-1)return p}else{if(l>E){if(h.charCodeAt(M+V)===c)return p.slice(M+V+1);if(V===2)return p.slice(M+V)}g>E&&(n.charCodeAt(D+V)===c?B=V:V===2&&(B=3)),B===-1&&(B=0)}let T="";for(V=D+B+1;V<=f;++V)(V===f||n.charCodeAt(V)===c)&&(T+=T.length===0?"..":"\\..");return M+=B,T.length>0?`${T}${p.slice(M,F)}`:(p.charCodeAt(M)===c&&++M,p.slice(M,F))},toNamespacedPath(n){if(typeof n!="string"||n.length===0)return n;const h=e.win32.resolve(n);if(h.length<=2)return n;if(h.charCodeAt(0)===c){if(h.charCodeAt(1)===c){const S=h.charCodeAt(2);if(S!==y&&S!==P)return`\\\\?\\UNC\\${h.slice(2)}`}}else if(r(h.charCodeAt(0))&&h.charCodeAt(1)===A&&h.charCodeAt(2)===c)return`\\\\?\\${h}`;return n},dirname(n){u(n,"path");const h=n.length;if(h===0)return".";let S=-1,p=0;const D=n.charCodeAt(0);if(h===1)return i(D)?n:".";if(i(D)){if(S=p=1,i(n.charCodeAt(1))){let M=2,F=M;for(;M<h&&!i(n.charCodeAt(M));)M++;if(M<h&&M!==F){for(F=M;M<h&&i(n.charCodeAt(M));)M++;if(M<h&&M!==F){for(F=M;M<h&&!i(n.charCodeAt(M));)M++;if(M===h)return n;M!==F&&(S=p=M+1)}}}}else r(D)&&n.charCodeAt(1)===A&&(S=h>2&&i(n.charCodeAt(2))?3:2,p=S);let f=-1,g=!0;for(let M=h-1;M>=p;--M)if(i(n.charCodeAt(M))){if(!g){f=M;break}}else g=!1;if(f===-1){if(S===-1)return".";f=S}return n.slice(0,f)},basename(n,h){h!==void 0&&u(h,"ext"),u(n,"path");let S=0,p=-1,D=!0,f;if(n.length>=2&&r(n.charCodeAt(0))&&n.charCodeAt(1)===A&&(S=2),h!==void 0&&h.length>0&&h.length<=n.length){if(h===n)return"";let g=h.length-1,M=-1;for(f=n.length-1;f>=S;--f){const F=n.charCodeAt(f);if(i(F)){if(!D){S=f+1;break}}else M===-1&&(D=!1,M=f+1),g>=0&&(F===h.charCodeAt(g)?--g===-1&&(p=f):(g=-1,p=M))}return S===p?p=M:p===-1&&(p=n.length),n.slice(S,p)}for(f=n.length-1;f>=S;--f)if(i(n.charCodeAt(f))){if(!D){S=f+1;break}}else p===-1&&(D=!1,p=f+1);return p===-1?"":n.slice(S,p)},extname(n){u(n,"path");let h=0,S=-1,p=0,D=-1,f=!0,g=0;n.length>=2&&n.charCodeAt(1)===A&&r(n.charCodeAt(0))&&(h=p=2);for(let M=n.length-1;M>=h;--M){const F=n.charCodeAt(M);if(i(F)){if(!f){p=M+1;break}continue}D===-1&&(f=!1,D=M+1),F===P?S===-1?S=M:g!==1&&(g=1):S!==-1&&(g=-1)}return S===-1||D===-1||g===0||g===1&&S===D-1&&S===p+1?"":n.slice(S,D)},format:C.bind(null,"\\"),parse(n){u(n,"path");const h={root:"",dir:"",base:"",ext:"",name:""};if(n.length===0)return h;const S=n.length;let p=0,D=n.charCodeAt(0);if(S===1)return i(D)?(h.root=h.dir=n,h):(h.base=h.name=n,h);if(i(D)){if(p=1,i(n.charCodeAt(1))){let B=2,V=B;for(;B<S&&!i(n.charCodeAt(B));)B++;if(B<S&&B!==V){for(V=B;B<S&&i(n.charCodeAt(B));)B++;if(B<S&&B!==V){for(V=B;B<S&&!i(n.charCodeAt(B));)B++;B===S?p=B:B!==V&&(p=B+1)}}}}else if(r(D)&&n.charCodeAt(1)===A){if(S<=2)return h.root=h.dir=n,h;if(p=2,i(n.charCodeAt(2))){if(S===3)return h.root=h.dir=n,h;p=3}}p>0&&(h.root=n.slice(0,p));let f=-1,g=p,M=-1,F=!0,l=n.length-1,E=0;for(;l>=p;--l){if(D=n.charCodeAt(l),i(D)){if(!F){g=l+1;break}continue}M===-1&&(F=!1,M=l+1),D===P?f===-1?f=l:E!==1&&(E=1):f!==-1&&(E=-1)}return M!==-1&&(f===-1||E===0||E===1&&f===M-1&&f===g+1?h.base=h.name=n.slice(g,M):(h.name=n.slice(g,f),h.base=n.slice(g,M),h.ext=n.slice(f,M))),g>0&&g!==p?h.dir=n.slice(0,g-1):h.dir=h.root,h},sep:"\\",delimiter:";",win32:null,posix:null};const o=(()=>{if(a){const n=/\\/g;return()=>{const h=w.cwd().replace(n,"/");return h.slice(h.indexOf("/"))}}return()=>w.cwd()})();e.posix={resolve(...n){let h="",S=!1;for(let p=n.length-1;p>=-1&&!S;p--){const D=p>=0?n[p]:o();u(D,"path"),D.length!==0&&(h=`${D}/${h}`,S=D.charCodeAt(0)===m)}return h=_(h,!S,"/",v),S?`/${h}`:h.length>0?h:"."},normalize(n){if(u(n,"path"),n.length===0)return".";const h=n.charCodeAt(0)===m,S=n.charCodeAt(n.length-1)===m;return n=_(n,!h,"/",v),n.length===0?h?"/":S?"./":".":(S&&(n+="/"),h?`/${n}`:n)},isAbsolute(n){return u(n,"path"),n.length>0&&n.charCodeAt(0)===m},join(...n){if(n.length===0)return".";let h;for(let S=0;S<n.length;++S){const p=n[S];u(p,"path"),p.length>0&&(h===void 0?h=p:h+=`/${p}`)}return h===void 0?".":e.posix.normalize(h)},relative(n,h){if(u(n,"from"),u(h,"to"),n===h||(n=e.posix.resolve(n),h=e.posix.resolve(h),n===h))return"";const S=1,p=n.length,D=p-S,f=1,g=h.length-f,M=D<g?D:g;let F=-1,l=0;for(;l<M;l++){const B=n.charCodeAt(S+l);if(B!==h.charCodeAt(f+l))break;B===m&&(F=l)}if(l===M)if(g>M){if(h.charCodeAt(f+l)===m)return h.slice(f+l+1);if(l===0)return h.slice(f+l)}else D>M&&(n.charCodeAt(S+l)===m?F=l:l===0&&(F=0));let E="";for(l=S+F+1;l<=p;++l)(l===p||n.charCodeAt(l)===m)&&(E+=E.length===0?"..":"/..");return`${E}${h.slice(f+F)}`},toNamespacedPath(n){return n},dirname(n){if(u(n,"path"),n.length===0)return".";const h=n.charCodeAt(0)===m;let S=-1,p=!0;for(let D=n.length-1;D>=1;--D)if(n.charCodeAt(D)===m){if(!p){S=D;break}}else p=!1;return S===-1?h?"/":".":h&&S===1?"//":n.slice(0,S)},basename(n,h){h!==void 0&&u(h,"ext"),u(n,"path");let S=0,p=-1,D=!0,f;if(h!==void 0&&h.length>0&&h.length<=n.length){if(h===n)return"";let g=h.length-1,M=-1;for(f=n.length-1;f>=0;--f){const F=n.charCodeAt(f);if(F===m){if(!D){S=f+1;break}}else M===-1&&(D=!1,M=f+1),g>=0&&(F===h.charCodeAt(g)?--g===-1&&(p=f):(g=-1,p=M))}return S===p?p=M:p===-1&&(p=n.length),n.slice(S,p)}for(f=n.length-1;f>=0;--f)if(n.charCodeAt(f)===m){if(!D){S=f+1;break}}else p===-1&&(D=!1,p=f+1);return p===-1?"":n.slice(S,p)},extname(n){u(n,"path");let h=-1,S=0,p=-1,D=!0,f=0;for(let g=n.length-1;g>=0;--g){const M=n.charCodeAt(g);if(M===m){if(!D){S=g+1;break}continue}p===-1&&(D=!1,p=g+1),M===P?h===-1?h=g:f!==1&&(f=1):h!==-1&&(f=-1)}return h===-1||p===-1||f===0||f===1&&h===p-1&&h===S+1?"":n.slice(h,p)},format:C.bind(null,"/"),parse(n){u(n,"path");const h={root:"",dir:"",base:"",ext:"",name:""};if(n.length===0)return h;const S=n.charCodeAt(0)===m;let p;S?(h.root="/",p=1):p=0;let D=-1,f=0,g=-1,M=!0,F=n.length-1,l=0;for(;F>=p;--F){const E=n.charCodeAt(F);if(E===m){if(!M){f=F+1;break}continue}g===-1&&(M=!1,g=F+1),E===P?D===-1?D=F:l!==1&&(l=1):D!==-1&&(l=-1)}if(g!==-1){const E=f===0&&S?1:f;D===-1||l===0||l===1&&D===g-1&&D===f+1?h.base=h.name=n.slice(E,g):(h.name=n.slice(E,D),h.base=n.slice(E,g),h.ext=n.slice(D,g))}return f>0?h.dir=n.slice(0,f-1):S&&(h.dir="/"),h},sep:"/",delimiter:":",win32:null,posix:null},e.posix.win32=e.win32.win32=e.win32,e.posix.posix=e.win32.posix=e.posix,e.normalize=a?e.win32.normalize:e.posix.normalize,e.isAbsolute=a?e.win32.isAbsolute:e.posix.isAbsolute,e.join=a?e.win32.join:e.posix.join,e.resolve=a?e.win32.resolve:e.posix.resolve,e.relative=a?e.win32.relative:e.posix.relative,e.dirname=a?e.win32.dirname:e.posix.dirname,e.basename=a?e.win32.basename:e.posix.basename,e.extname=a?e.win32.extname:e.posix.extname,e.format=a?e.win32.format:e.posix.format,e.parse=a?e.win32.parse:e.posix.parse,e.toNamespacedPath=a?e.win32.toNamespacedPath:e.posix.toNamespacedPath,e.sep=a?e.win32.sep:e.posix.sep,e.delimiter=a?e.win32.delimiter:e.posix.delimiter}),define(ce[32],he([0,1,7,2,12,8]),function(oe,e,w,I,b,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.randomPath=e.parseLineAndColumnAware=e.indexOfPath=e.getDriveLetter=e.hasDriveLetter=e.isRootOrDriveLetter=e.sanitizeFilePath=e.isWindowsDriveLetter=e.isEqualOrParent=e.isEqual=e.isValidBasename=e.isUNC=e.getRoot=e.toPosixPath=e.toSlashes=e.isPathSeparator=void 0;function O(f){return f===47||f===92}e.isPathSeparator=O;function P(f){return f.replace(/[\\/]/g,w.posix.sep)}e.toSlashes=P;function m(f){return f.indexOf("/")===-1&&(f=P(f)),/^[a-zA-Z]:(\/|$)/.test(f)&&(f="/"+f),f}e.toPosixPath=m;function c(f,g=w.posix.sep){if(!f)return"";const M=f.length,F=f.charCodeAt(0);if(O(F)){if(O(f.charCodeAt(1))&&!O(f.charCodeAt(2))){let E=3;const B=E;for(;E<M&&!O(f.charCodeAt(E));E++);if(B!==E&&!O(f.charCodeAt(E+1))){for(E+=1;E<M;E++)if(O(f.charCodeAt(E)))return f.slice(0,E+1).replace(/[\\/]/g,g)}}return g}else if(v(F)&&f.charCodeAt(1)===58)return O(f.charCodeAt(2))?f.slice(0,2)+g:f.slice(0,2);let l=f.indexOf("://");if(l!==-1){for(l+=3;l<M;l++)if(O(f.charCodeAt(l)))return f.slice(0,l+1)}return""}e.getRoot=c;function A(f){if(!I.isWindows||!f||f.length<5)return!1;let g=f.charCodeAt(0);if(g!==92||(g=f.charCodeAt(1),g!==92))return!1;let M=2;const F=M;for(;M<f.length&&(g=f.charCodeAt(M),g!==92);M++);return!(F===M||(g=f.charCodeAt(M+1),isNaN(g)||g===92))}e.isUNC=A;const y=/[\\/:\*\?"<>\|]/g,L=/[\\/]/g,t=/^(con|prn|aux|clock\$|nul|lpt[0-9]|com[0-9])(\.(.*?))?$/i;function u(f,g=I.isWindows){const M=g?y:L;return!(!f||f.length===0||/^\s+$/.test(f)||(M.lastIndex=0,M.test(f))||g&&t.test(f)||f==="."||f===".."||g&&f[f.length-1]==="."||g&&f.length!==f.trim().length||f.length>255)}e.isValidBasename=u;function a(f,g,M){const F=f===g;return!M||F?F:!f||!g?!1:(0,b.equalsIgnoreCase)(f,g)}e.isEqual=a;function i(f,g,M,F=w.sep){if(f===g)return!0;if(!f||!g||g.length>f.length)return!1;if(M){if(!(0,b.startsWithIgnoreCase)(f,g))return!1;if(g.length===f.length)return!0;let E=g.length;return g.charAt(g.length-1)===F&&E--,f.charAt(E)===F}return g.charAt(g.length-1)!==F&&(g+=F),f.indexOf(g)===0}e.isEqualOrParent=i;function v(f){return f>=65&&f<=90||f>=97&&f<=122}e.isWindowsDriveLetter=v;function r(f,g){return I.isWindows&&f.endsWith(":")&&(f+=w.sep),(0,w.isAbsolute)(f)||(f=(0,w.join)(g,f)),f=(0,w.normalize)(f),I.isWindows?(f=(0,b.rtrim)(f,w.sep),f.endsWith(":")&&(f+=w.sep)):(f=(0,b.rtrim)(f,w.sep),f||(f=w.sep)),f}e.sanitizeFilePath=r;function _(f){const g=(0,w.normalize)(f);return I.isWindows?f.length>3?!1:C(g)&&(f.length===2||g.charCodeAt(2)===92):g===w.posix.sep}e.isRootOrDriveLetter=_;function C(f,g=I.isWindows){return g?v(f.charCodeAt(0))&&f.charCodeAt(1)===58:!1}e.hasDriveLetter=C;function o(f,g=I.isWindows){return C(f,g)?f[0]:void 0}e.getDriveLetter=o;function n(f,g,M){return g.length>f.length?-1:f===g?0:(M&&(f=f.toLowerCase(),g=g.toLowerCase()),f.indexOf(g))}e.indexOfPath=n;function h(f){const g=f.split(":");let M,F,l;for(const E of g){const B=Number(E);(0,k.isNumber)(B)?F===void 0?F=B:l===void 0&&(l=B):M=M?[M,E].join(":"):E}if(!M)throw new Error("Format for `--goto` should be: `FILE:LINE(:COLUMN)`");return{path:M,line:F!==void 0?F:void 0,column:l!==void 0?l:F!==void 0?1:void 0}}e.parseLineAndColumnAware=h;const S="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",p="BDEFGHIJKMOQRSTUVWXYZbdefghijkmoqrstuvwxyz0123456789";function D(f,g,M=8){let F="";for(let E=0;E<M;E++){let B;E===0&&I.isWindows&&!g&&(M===3||M===4)?B=p:B=S,F+=B.charAt(Math.floor(Math.random()*B.length))}let l;return g?l=`${g}-${F}`:l=F,f?(0,w.join)(f,l):l}e.randomPath=D}),define(ce[33],he([0,1,2]),function(oe,e,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.removeDangerousEnvVariables=e.sanitizeProcessEnvironment=e.TerminateResponseCode=e.Source=void 0;var I;(function(P){P[P.stdout=0]="stdout",P[P.stderr=1]="stderr"})(I||(e.Source=I={}));var b;(function(P){P[P.Success=0]="Success",P[P.Unknown=1]="Unknown",P[P.AccessDenied=2]="AccessDenied",P[P.ProcessNotFound=3]="ProcessNotFound"})(b||(e.TerminateResponseCode=b={}));function k(P,...m){const c=m.reduce((L,t)=>(L[t]=!0,L),{}),A=[/^ELECTRON_.+$/,/^VSCODE_(?!(PORTABLE|SHELL_LOGIN|ENV_REPLACE|ENV_APPEND|ENV_PREPEND)).+$/,/^SNAP(|_.*)$/,/^GDK_PIXBUF_.+$/];Object.keys(P).filter(L=>!c[L]).forEach(L=>{for(let t=0;t<A.length;t++)if(L.search(A[t])!==-1){delete P[L];break}})}e.sanitizeProcessEnvironment=k;function O(P){P&&(delete P.DEBUG,w.isMacintosh&&delete P.DYLD_LIBRARY_PATH,w.isLinux&&delete P.LD_PRELOAD)}e.removeDangerousEnvVariables=O}),define(ce[5],he([0,1,7,2]),function(oe,e,w,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.uriToFsPath=e.isUriComponents=e.URI=void 0;const b=/^\w[\w\d+.-]*$/,k=/^\//,O=/^\/\//;function P(p,D){if(!p.scheme&&D)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${p.authority}", path: "${p.path}", query: "${p.query}", fragment: "${p.fragment}"}`);if(p.scheme&&!b.test(p.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(p.path){if(p.authority){if(!k.test(p.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(O.test(p.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}function m(p,D){return!p&&!D?"file":p}function c(p,D){switch(p){case"https":case"http":case"file":D?D[0]!==y&&(D=y+D):D=y;break}return D}const A="",y="/",L=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class t{static isUri(D){return D instanceof t?!0:D?typeof D.authority=="string"&&typeof D.fragment=="string"&&typeof D.path=="string"&&typeof D.query=="string"&&typeof D.scheme=="string"&&typeof D.fsPath=="string"&&typeof D.with=="function"&&typeof D.toString=="function":!1}constructor(D,f,g,M,F,l=!1){typeof D=="object"?(this.scheme=D.scheme||A,this.authority=D.authority||A,this.path=D.path||A,this.query=D.query||A,this.fragment=D.fragment||A):(this.scheme=m(D,l),this.authority=f||A,this.path=c(this.scheme,g||A),this.query=M||A,this.fragment=F||A,P(this,l))}get fsPath(){return C(this,!1)}with(D){if(!D)return this;let{scheme:f,authority:g,path:M,query:F,fragment:l}=D;return f===void 0?f=this.scheme:f===null&&(f=A),g===void 0?g=this.authority:g===null&&(g=A),M===void 0?M=this.path:M===null&&(M=A),F===void 0?F=this.query:F===null&&(F=A),l===void 0?l=this.fragment:l===null&&(l=A),f===this.scheme&&g===this.authority&&M===this.path&&F===this.query&&l===this.fragment?this:new i(f,g,M,F,l)}static parse(D,f=!1){const g=L.exec(D);return g?new i(g[2]||A,S(g[4]||A),S(g[5]||A),S(g[7]||A),S(g[9]||A),f):new i(A,A,A,A,A)}static file(D){let f=A;if(I.isWindows&&(D=D.replace(/\\/g,y)),D[0]===y&&D[1]===y){const g=D.indexOf(y,2);g===-1?(f=D.substring(2),D=y):(f=D.substring(2,g),D=D.substring(g)||y)}return new i("file",f,D,A,A)}static from(D,f){return new i(D.scheme,D.authority,D.path,D.query,D.fragment,f)}static joinPath(D,...f){if(!D.path)throw new Error("[UriError]: cannot call joinPath on URI without path");let g;return I.isWindows&&D.scheme==="file"?g=t.file(w.win32.join(C(D,!0),...f)).path:g=w.posix.join(D.path,...f),D.with({path:g})}toString(D=!1){return o(this,D)}toJSON(){return this}static revive(D){if(D){if(D instanceof t)return D;{const f=new i(D);return f._formatted=D.external??null,f._fsPath=D._sep===a?D.fsPath??null:null,f}}else return}}e.URI=t;function u(p){return!p||typeof p!="object"?!1:typeof p.scheme=="string"&&(typeof p.authority=="string"||typeof p.authority>"u")&&(typeof p.path=="string"||typeof p.path>"u")&&(typeof p.query=="string"||typeof p.query>"u")&&(typeof p.fragment=="string"||typeof p.fragment>"u")}e.isUriComponents=u;const a=I.isWindows?1:void 0;class i extends t{constructor(){super(...arguments),this._formatted=null,this._fsPath=null}get fsPath(){return this._fsPath||(this._fsPath=C(this,!1)),this._fsPath}toString(D=!1){return D?o(this,!0):(this._formatted||(this._formatted=o(this,!1)),this._formatted)}toJSON(){const D={$mid:1};return this._fsPath&&(D.fsPath=this._fsPath,D._sep=a),this._formatted&&(D.external=this._formatted),this.path&&(D.path=this.path),this.scheme&&(D.scheme=this.scheme),this.authority&&(D.authority=this.authority),this.query&&(D.query=this.query),this.fragment&&(D.fragment=this.fragment),D}}const v={[58]:"%3A",[47]:"%2F",[63]:"%3F",[35]:"%23",[91]:"%5B",[93]:"%5D",[64]:"%40",[33]:"%21",[36]:"%24",[38]:"%26",[39]:"%27",[40]:"%28",[41]:"%29",[42]:"%2A",[43]:"%2B",[44]:"%2C",[59]:"%3B",[61]:"%3D",[32]:"%20"};function r(p,D,f){let g,M=-1;for(let F=0;F<p.length;F++){const l=p.charCodeAt(F);if(l>=97&&l<=122||l>=65&&l<=90||l>=48&&l<=57||l===45||l===46||l===95||l===126||D&&l===47||f&&l===91||f&&l===93||f&&l===58)M!==-1&&(g+=encodeURIComponent(p.substring(M,F)),M=-1),g!==void 0&&(g+=p.charAt(F));else{g===void 0&&(g=p.substr(0,F));const E=v[l];E!==void 0?(M!==-1&&(g+=encodeURIComponent(p.substring(M,F)),M=-1),g+=E):M===-1&&(M=F)}}return M!==-1&&(g+=encodeURIComponent(p.substring(M))),g!==void 0?g:p}function _(p){let D;for(let f=0;f<p.length;f++){const g=p.charCodeAt(f);g===35||g===63?(D===void 0&&(D=p.substr(0,f)),D+=v[g]):D!==void 0&&(D+=p[f])}return D!==void 0?D:p}function C(p,D){let f;return p.authority&&p.path.length>1&&p.scheme==="file"?f=`//${p.authority}${p.path}`:p.path.charCodeAt(0)===47&&(p.path.charCodeAt(1)>=65&&p.path.charCodeAt(1)<=90||p.path.charCodeAt(1)>=97&&p.path.charCodeAt(1)<=122)&&p.path.charCodeAt(2)===58?D?f=p.path.substr(1):f=p.path[1].toLowerCase()+p.path.substr(2):f=p.path,I.isWindows&&(f=f.replace(/\//g,"\\")),f}e.uriToFsPath=C;function o(p,D){const f=D?_:r;let g="",{scheme:M,authority:F,path:l,query:E,fragment:B}=p;if(M&&(g+=M,g+=":"),(F||M==="file")&&(g+=y,g+=y),F){let V=F.indexOf("@");if(V!==-1){const T=F.substr(0,V);F=F.substr(V+1),V=T.lastIndexOf(":"),V===-1?g+=f(T,!1,!1):(g+=f(T.substr(0,V),!1,!1),g+=":",g+=f(T.substr(V+1),!1,!0)),g+="@"}F=F.toLowerCase(),V=F.lastIndexOf(":"),V===-1?g+=f(F,!1,!0):(g+=f(F.substr(0,V),!1,!0),g+=F.substr(V))}if(l){if(l.length>=3&&l.charCodeAt(0)===47&&l.charCodeAt(2)===58){const V=l.charCodeAt(1);V>=65&&V<=90&&(l=`/${String.fromCharCode(V+32)}:${l.substr(3)}`)}else if(l.length>=2&&l.charCodeAt(1)===58){const V=l.charCodeAt(0);V>=65&&V<=90&&(l=`${String.fromCharCode(V+32)}:${l.substr(2)}`)}g+=f(l,!0,!1)}return E&&(g+="?",g+=f(E,!1,!1)),B&&(g+="#",g+=D?B:r(B,!1,!1)),g}function n(p){try{return decodeURIComponent(p)}catch{return p.length>3?p.substr(0,3)+n(p.substr(3)):p}}const h=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function S(p){return p.match(h)?p.replace(h,D=>n(D)):p}}),define(ce[56],he([0,1,5]),function(oe,e,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.log=e.getFirstFrame=e.parse=e.isRemoteConsoleLog=void 0;function I(c){const A=c;return A&&typeof A.type=="string"&&typeof A.severity=="string"}e.isRemoteConsoleLog=I;function b(c){const A=[];let y;try{const L=JSON.parse(c.arguments),t=L[L.length-1];t&&t.__$stack&&(L.pop(),y=t.__$stack),A.push(...L)}catch{A.push("Unable to log remote console arguments",c.arguments)}return{args:A,stack:y}}e.parse=b;function k(c){if(typeof c!="string")return k(b(c).stack);const A=c;if(A){const y=O(A),L=/at [^\/]*((?:(?:[a-zA-Z]+:)|(?:[\/])|(?:\\\\))(?:.+)):(\d+):(\d+)/.exec(y||"");if(L&&L.length===4)return{uri:w.URI.file(L[1]),line:Number(L[2]),column:Number(L[3])}}}e.getFirstFrame=k;function O(c){if(!c)return c;const A=c.indexOf(`
`);return A===-1?c:c.substring(0,A)}function P(c,A){const{args:y,stack:L}=b(c),t=typeof y[0]=="string"&&y.length===1;let u=O(L);u&&(u=`(${u.trim()})`);let a=[];if(typeof y[0]=="string"?u&&t?a=[`%c[${A}] %c${y[0]} %c${u}`,m("blue"),m(""),m("grey")]:a=[`%c[${A}] %c${y[0]}`,m("blue"),m(""),...y.slice(1)]:a=[`%c[${A}]%`,m("blue"),...y],u&&!t&&a.push(u),typeof console[c.severity]!="function")throw new Error("Unknown console method");console[c.severity].apply(console,a)}e.log=P;function m(c){return`color: ${c}`}}),define(ce[57],he([0,1,17,5]),function(oe,e,w,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.revive=e.parse=e.stringify=void 0;function b(m){return JSON.stringify(m,O)}e.stringify=b;function k(m){let c=JSON.parse(m);return c=P(c),c}e.parse=k;function O(m,c){return c instanceof RegExp?{$mid:2,source:c.source,flags:c.flags}:c}function P(m,c=0){if(!m||c>200)return m;if(typeof m=="object"){switch(m.$mid){case 1:return I.URI.revive(m);case 2:return new RegExp(m.source,m.flags);case 16:return new Date(m.source)}if(m instanceof w.VSBuffer||m instanceof Uint8Array)return m;if(Array.isArray(m))for(let A=0;A<m.length;++A)m[A]=P(m[A],c+1);else for(const A in m)Object.hasOwnProperty.call(m,A)&&(m[A]=P(m[A],c+1))}return m}e.revive=P}),define(ce[18],he([0,1,6,2,5]),function(oe,e,w,I,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.COI=e.FileAccess=e.nodeModulesAsarUnpackedPath=e.nodeModulesAsarPath=e.nodeModulesPath=e.builtinExtensionsPath=e.RemoteAuthorities=e.connectionTokenQueryName=e.connectionTokenCookieName=e.Schemas=void 0;var k;(function(c){c.inMemory="inmemory",c.vscode="vscode",c.internal="private",c.walkThrough="walkThrough",c.walkThroughSnippet="walkThroughSnippet",c.http="http",c.https="https",c.file="file",c.mailto="mailto",c.untitled="untitled",c.data="data",c.attachment="attachment",c.command="command",c.vscodeRemote="vscode-remote",c.vscodeRemoteResource="vscode-remote-resource",c.vscodeManagedRemoteResource="vscode-managed-remote-resource",c.vscodeUserData="vscode-userdata",c.vscodeCustomEditor="vscode-custom-editor",c.vscodeNotebookCell="vscode-notebook-cell",c.vscodeNotebookCellMetadata="vscode-notebook-cell-metadata",c.vscodeNotebookCellOutput="vscode-notebook-cell-output",c.vscodeInteractiveInput="vscode-interactive-input",c.vscodeSettings="vscode-settings",c.vscodeWorkspaceTrust="vscode-workspace-trust",c.vscodeTerminal="vscode-terminal",c.vscodeChatSesssion="vscode-chat-editor",c.webviewPanel="webview-panel",c.vscodeWebview="vscode-webview",c.extension="extension",c.vscodeFileResource="vscode-file",c.tmp="tmp",c.vsls="vsls",c.vscodeSourceControl="vscode-scm"})(k||(e.Schemas=k={})),e.connectionTokenCookieName="vscode-tkn",e.connectionTokenQueryName="tkn";class O{constructor(){this._defaultWebPort=80,this._hosts=Object.create(null),this._ports=Object.create(null),this._connectionTokens=Object.create(null),this._preferredWebSchema="http",this._delegate=null,this._remoteResourcesPath=`/${k.vscodeRemoteResource}`}setPreferredWebSchema(A){this._preferredWebSchema=A}setDelegate(A){this._delegate=A}setServerRootPath(A){this._remoteResourcesPath=`${A}/${k.vscodeRemoteResource}`}set(A,y,L){this._hosts[A]=y,this._ports[A]=L}setConnectionToken(A,y){this._connectionTokens[A]=y}getPreferredWebSchema(){return this._preferredWebSchema}rewrite(A){if(this._delegate)try{return this._delegate(A)}catch(i){return w.onUnexpectedError(i),A}const y=A.authority;let L=this._hosts[y];L&&L.indexOf(":")!==-1&&L.indexOf("[")===-1&&(L=`[${L}]`);const t=this._ports[y],u=this._connectionTokens[y];let a=`path=${encodeURIComponent(A.path)}`;return typeof u=="string"&&(a+=`&${e.connectionTokenQueryName}=${encodeURIComponent(u)}`),b.URI.from({scheme:I.isWeb?this._preferredWebSchema:k.vscodeRemoteResource,authority:I.isWeb&&t===this._defaultWebPort?`${L}`:`${L}:${t}`,path:this._remoteResourcesPath,query:a})}}e.RemoteAuthorities=new O,e.builtinExtensionsPath="vs/../../extensions",e.nodeModulesPath="vs/../../node_modules",e.nodeModulesAsarPath="vs/../../node_modules.asar",e.nodeModulesAsarUnpackedPath="vs/../../node_modules.asar.unpacked";class P{static{this.FALLBACK_AUTHORITY="vscode-app"}asBrowserUri(A){const y=this.toUri(A,oe);return this.uriToBrowserUri(y)}uriToBrowserUri(A){return A.scheme===k.vscodeRemote?e.RemoteAuthorities.rewrite(A):A.scheme===k.file&&(I.isNative||I.isWebWorker&&I.globals.origin===`${k.vscodeFileResource}://${P.FALLBACK_AUTHORITY}`)?A.with({scheme:k.vscodeFileResource,authority:A.authority||P.FALLBACK_AUTHORITY,query:null,fragment:null}):A}asFileUri(A){const y=this.toUri(A,oe);return this.uriToFileUri(y)}uriToFileUri(A){return A.scheme===k.vscodeFileResource?A.with({scheme:k.file,authority:A.authority!==P.FALLBACK_AUTHORITY?A.authority:null,query:null,fragment:null}):A}toUri(A,y){return b.URI.isUri(A)?A:b.URI.parse(y.toUrl(A))}}e.FileAccess=new P;var m;(function(c){const A=new Map([["1",{"Cross-Origin-Opener-Policy":"same-origin"}],["2",{"Cross-Origin-Embedder-Policy":"require-corp"}],["3",{"Cross-Origin-Opener-Policy":"same-origin","Cross-Origin-Embedder-Policy":"require-corp"}]]);c.CoopAndCoep=Object.freeze(A.get("3"));const y="vscode-coi";function L(u){let a;typeof u=="string"?a=new URL(u).searchParams:u instanceof URL?a=u.searchParams:b.URI.isUri(u)&&(a=new URL(u.toString(!0)).searchParams);const i=a?.get(y);if(i)return A.get(i)}c.getHeadersFromQuery=L;function t(u,a,i){if(!globalThis.crossOriginIsolated)return;const v=a&&i?"3":i?"2":"1";u instanceof URLSearchParams?u.set(y,v):u[y]=v}c.addSearchParam=t})(m||(e.COI=m={}))}),define(ce[22],he([0,1,32,18,7,2,12,5]),function(oe,e,w,I,b,k,O,P){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.toLocalResource=e.DataUri=e.distinctParents=e.addTrailingPathSeparator=e.removeTrailingPathSeparator=e.hasTrailingPathSeparator=e.isEqualAuthority=e.isAbsolutePath=e.resolvePath=e.relativePath=e.normalizePath=e.joinPath=e.dirname=e.extname=e.basename=e.basenameOrAuthority=e.getComparisonKey=e.isEqualOrParent=e.isEqual=e.extUriIgnorePathCase=e.extUriBiasedIgnorePathCase=e.extUri=e.ExtUri=e.originalFSPath=void 0;function m(t){return(0,P.uriToFsPath)(t,!0)}e.originalFSPath=m;class c{constructor(u){this._ignorePathCasing=u}compare(u,a,i=!1){return u===a?0:(0,O.compare)(this.getComparisonKey(u,i),this.getComparisonKey(a,i))}isEqual(u,a,i=!1){return u===a?!0:!u||!a?!1:this.getComparisonKey(u,i)===this.getComparisonKey(a,i)}getComparisonKey(u,a=!1){return u.with({path:this._ignorePathCasing(u)?u.path.toLowerCase():void 0,fragment:a?null:void 0}).toString()}ignorePathCasing(u){return this._ignorePathCasing(u)}isEqualOrParent(u,a,i=!1){if(u.scheme===a.scheme){if(u.scheme===I.Schemas.file)return w.isEqualOrParent(m(u),m(a),this._ignorePathCasing(u))&&u.query===a.query&&(i||u.fragment===a.fragment);if((0,e.isEqualAuthority)(u.authority,a.authority))return w.isEqualOrParent(u.path,a.path,this._ignorePathCasing(u),"/")&&u.query===a.query&&(i||u.fragment===a.fragment)}return!1}joinPath(u,...a){return P.URI.joinPath(u,...a)}basenameOrAuthority(u){return(0,e.basename)(u)||u.authority}basename(u){return b.posix.basename(u.path)}extname(u){return b.posix.extname(u.path)}dirname(u){if(u.path.length===0)return u;let a;return u.scheme===I.Schemas.file?a=P.URI.file(b.dirname(m(u))).path:(a=b.posix.dirname(u.path),u.authority&&a.length&&a.charCodeAt(0)!==47&&(console.error(`dirname("${u.toString})) resulted in a relative path`),a="/")),u.with({path:a})}normalizePath(u){if(!u.path.length)return u;let a;return u.scheme===I.Schemas.file?a=P.URI.file(b.normalize(m(u))).path:a=b.posix.normalize(u.path),u.with({path:a})}relativePath(u,a){if(u.scheme!==a.scheme||!(0,e.isEqualAuthority)(u.authority,a.authority))return;if(u.scheme===I.Schemas.file){const r=b.relative(m(u),m(a));return k.isWindows?w.toSlashes(r):r}let i=u.path||"/";const v=a.path||"/";if(this._ignorePathCasing(u)){let r=0;for(const _=Math.min(i.length,v.length);r<_&&!(i.charCodeAt(r)!==v.charCodeAt(r)&&i.charAt(r).toLowerCase()!==v.charAt(r).toLowerCase());r++);i=v.substr(0,r)+i.substr(r)}return b.posix.relative(i,v)}resolvePath(u,a){if(u.scheme===I.Schemas.file){const i=P.URI.file(b.resolve(m(u),a));return u.with({authority:i.authority,path:i.path})}return a=w.toPosixPath(a),u.with({path:b.posix.resolve(u.path,a)})}isAbsolutePath(u){return!!u.path&&u.path[0]==="/"}isEqualAuthority(u,a){return u===a||u!==void 0&&a!==void 0&&(0,O.equalsIgnoreCase)(u,a)}hasTrailingPathSeparator(u,a=b.sep){if(u.scheme===I.Schemas.file){const i=m(u);return i.length>w.getRoot(i).length&&i[i.length-1]===a}else{const i=u.path;return i.length>1&&i.charCodeAt(i.length-1)===47&&!/^[a-zA-Z]:(\/$|\\$)/.test(u.fsPath)}}removeTrailingPathSeparator(u,a=b.sep){return(0,e.hasTrailingPathSeparator)(u,a)?u.with({path:u.path.substr(0,u.path.length-1)}):u}addTrailingPathSeparator(u,a=b.sep){let i=!1;if(u.scheme===I.Schemas.file){const v=m(u);i=v!==void 0&&v.length===w.getRoot(v).length&&v[v.length-1]===a}else{a="/";const v=u.path;i=v.length===1&&v.charCodeAt(v.length-1)===47}return!i&&!(0,e.hasTrailingPathSeparator)(u,a)?u.with({path:u.path+"/"}):u}}e.ExtUri=c,e.extUri=new c(()=>!1),e.extUriBiasedIgnorePathCase=new c(t=>t.scheme===I.Schemas.file?!k.isLinux:!0),e.extUriIgnorePathCase=new c(t=>!0),e.isEqual=e.extUri.isEqual.bind(e.extUri),e.isEqualOrParent=e.extUri.isEqualOrParent.bind(e.extUri),e.getComparisonKey=e.extUri.getComparisonKey.bind(e.extUri),e.basenameOrAuthority=e.extUri.basenameOrAuthority.bind(e.extUri),e.basename=e.extUri.basename.bind(e.extUri),e.extname=e.extUri.extname.bind(e.extUri),e.dirname=e.extUri.dirname.bind(e.extUri),e.joinPath=e.extUri.joinPath.bind(e.extUri),e.normalizePath=e.extUri.normalizePath.bind(e.extUri),e.relativePath=e.extUri.relativePath.bind(e.extUri),e.resolvePath=e.extUri.resolvePath.bind(e.extUri),e.isAbsolutePath=e.extUri.isAbsolutePath.bind(e.extUri),e.isEqualAuthority=e.extUri.isEqualAuthority.bind(e.extUri),e.hasTrailingPathSeparator=e.extUri.hasTrailingPathSeparator.bind(e.extUri),e.removeTrailingPathSeparator=e.extUri.removeTrailingPathSeparator.bind(e.extUri),e.addTrailingPathSeparator=e.extUri.addTrailingPathSeparator.bind(e.extUri);function A(t,u){const a=[];for(let i=0;i<t.length;i++){const v=u(t[i]);t.some((r,_)=>_===i?!1:(0,e.isEqualOrParent)(v,u(r)))||a.push(t[i])}return a}e.distinctParents=A;var y;(function(t){t.META_DATA_LABEL="label",t.META_DATA_DESCRIPTION="description",t.META_DATA_SIZE="size",t.META_DATA_MIME="mime";function u(a){const i=new Map;a.path.substring(a.path.indexOf(";")+1,a.path.lastIndexOf(";")).split(";").forEach(_=>{const[C,o]=_.split(":");C&&o&&i.set(C,o)});const r=a.path.substring(0,a.path.indexOf(";"));return r&&i.set(t.META_DATA_MIME,r),i}t.parseMetaData=u})(y||(e.DataUri=y={}));function L(t,u,a){if(u){let i=t.path;return i&&i[0]!==b.posix.sep&&(i=b.posix.sep+i),t.with({scheme:a,authority:u,path:i})}return t.with({scheme:a})}e.toLocalResource=L}),define(ce[9],he([0,1,16,6,4,3,22,2,48]),function(oe,e,w,I,b,k,O,P,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createCancelableAsyncIterable=e.CancelableAsyncIterableObject=e.AsyncIterableObject=e.Promises=e.DeferredPromise=e.IntervalCounter=e.TaskSequentializer=e.retry=e.IdleValue=e.runWhenIdle=e.ThrottledWorker=e.RunOnceWorker=e.ProcessTimeRunOnceScheduler=e.RunOnceScheduler=e.IntervalTimer=e.TimeoutTimer=e.ResourceQueue=e.LimitedQueue=e.Queue=e.Limiter=e.firstParallel=e.first=e.sequence=e.disposableTimeout=e.timeout=e.AutoOpenBarrier=e.Barrier=e.ThrottledDelayer=e.Delayer=e.SequencerByKey=e.Sequencer=e.Throttler=e.asPromise=e.raceTimeout=e.raceCancellablePromises=e.raceCancellationError=e.raceCancellation=e.createCancelablePromise=e.isThenable=void 0;function c(s){return!!s&&typeof s.then=="function"}e.isThenable=c;function A(s){const d=new w.CancellationTokenSource,W=s(d.token),H=new Promise((ie,ae)=>{const le=d.token.onCancellationRequested(()=>{le.dispose(),d.dispose(),ae(new I.CancellationError)});Promise.resolve(W).then(N=>{le.dispose(),d.dispose(),ie(N)},N=>{le.dispose(),d.dispose(),ae(N)})});return new class{cancel(){d.cancel()}then(ie,ae){return H.then(ie,ae)}catch(ie){return this.then(void 0,ie)}finally(ie){return H.finally(ie)}}}e.createCancelablePromise=A;function y(s,d,W){return new Promise((H,ie)=>{const ae=d.onCancellationRequested(()=>{ae.dispose(),H(W)});s.then(H,ie).finally(()=>ae.dispose())})}e.raceCancellation=y;function L(s,d){return new Promise((W,H)=>{const ie=d.onCancellationRequested(()=>{ie.dispose(),H(new I.CancellationError)});s.then(W,H).finally(()=>ie.dispose())})}e.raceCancellationError=L;async function t(s){let d=-1;const W=s.map((H,ie)=>H.then(ae=>(d=ie,ae)));try{return await Promise.race(W)}finally{s.forEach((H,ie)=>{ie!==d&&H.cancel()})}}e.raceCancellablePromises=t;function u(s,d,W){let H;const ie=setTimeout(()=>{H?.(void 0),W?.()},d);return Promise.race([s.finally(()=>clearTimeout(ie)),new Promise(ae=>H=ae)])}e.raceTimeout=u;function a(s){return new Promise((d,W)=>{const H=s();c(H)?H.then(d,W):d(H)})}e.asPromise=a;class i{constructor(){this.isDisposed=!1,this.activePromise=null,this.queuedPromise=null,this.queuedPromiseFactory=null}queue(d){if(this.isDisposed)throw new Error("Throttler is disposed");if(this.activePromise){if(this.queuedPromiseFactory=d,!this.queuedPromise){const W=()=>{if(this.queuedPromise=null,this.isDisposed)return;const H=this.queue(this.queuedPromiseFactory);return this.queuedPromiseFactory=null,H};this.queuedPromise=new Promise(H=>{this.activePromise.then(W,W).then(H)})}return new Promise((W,H)=>{this.queuedPromise.then(W,H)})}return this.activePromise=d(),new Promise((W,H)=>{this.activePromise.then(ie=>{this.activePromise=null,W(ie)},ie=>{this.activePromise=null,H(ie)})})}dispose(){this.isDisposed=!0}}e.Throttler=i;class v{constructor(){this.current=Promise.resolve(null)}queue(d){return this.current=this.current.then(()=>d(),()=>d())}}e.Sequencer=v;class r{constructor(){this.promiseMap=new Map}queue(d,W){const ie=(this.promiseMap.get(d)??Promise.resolve()).catch(()=>{}).then(W).finally(()=>{this.promiseMap.get(d)===ie&&this.promiseMap.delete(d)});return this.promiseMap.set(d,ie),ie}}e.SequencerByKey=r;const _=(s,d)=>{let W=!0;const H=setTimeout(()=>{W=!1,d()},s);return{isTriggered:()=>W,dispose:()=>{clearTimeout(H),W=!1}}},C=s=>{let d=!0;return queueMicrotask(()=>{d&&(d=!1,s())}),{isTriggered:()=>d,dispose:()=>{d=!1}}};class o{constructor(d){this.defaultDelay=d,this.deferred=null,this.completionPromise=null,this.doResolve=null,this.doReject=null,this.task=null}trigger(d,W=this.defaultDelay){this.task=d,this.cancelTimeout(),this.completionPromise||(this.completionPromise=new Promise((ie,ae)=>{this.doResolve=ie,this.doReject=ae}).then(()=>{if(this.completionPromise=null,this.doResolve=null,this.task){const ie=this.task;return this.task=null,ie()}}));const H=()=>{this.deferred=null,this.doResolve?.(null)};return this.deferred=W===m.MicrotaskDelay?C(H):_(W,H),this.completionPromise}isTriggered(){return!!this.deferred?.isTriggered()}cancel(){this.cancelTimeout(),this.completionPromise&&(this.doReject?.(new I.CancellationError),this.completionPromise=null)}cancelTimeout(){this.deferred?.dispose(),this.deferred=null}dispose(){this.cancel()}}e.Delayer=o;class n{constructor(d){this.delayer=new o(d),this.throttler=new i}trigger(d,W){return this.delayer.trigger(()=>this.throttler.queue(d),W)}isTriggered(){return this.delayer.isTriggered()}cancel(){this.delayer.cancel()}dispose(){this.delayer.dispose(),this.throttler.dispose()}}e.ThrottledDelayer=n;class h{constructor(){this._isOpen=!1,this._promise=new Promise((d,W)=>{this._completePromise=d})}isOpen(){return this._isOpen}open(){this._isOpen=!0,this._completePromise(!0)}wait(){return this._promise}}e.Barrier=h;class S extends h{constructor(d){super(),this._timeout=setTimeout(()=>this.open(),d)}open(){clearTimeout(this._timeout),super.open()}}e.AutoOpenBarrier=S;function p(s,d){return d?new Promise((W,H)=>{const ie=setTimeout(()=>{ae.dispose(),W()},s),ae=d.onCancellationRequested(()=>{clearTimeout(ie),ae.dispose(),H(new I.CancellationError)})}):A(W=>p(s,W))}e.timeout=p;function D(s,d=0){const W=setTimeout(s,d);return(0,k.toDisposable)(()=>clearTimeout(W))}e.disposableTimeout=D;function f(s){const d=[];let W=0;const H=s.length;function ie(){return W<H?s[W++]():null}function ae(le){le!=null&&d.push(le);const N=ie();return N?N.then(ae):Promise.resolve(d)}return Promise.resolve(null).then(ae)}e.sequence=f;function g(s,d=H=>!!H,W=null){let H=0;const ie=s.length,ae=()=>{if(H>=ie)return Promise.resolve(W);const le=s[H++];return Promise.resolve(le()).then($=>d($)?Promise.resolve($):ae())};return ae()}e.first=g;function M(s,d=H=>!!H,W=null){if(s.length===0)return Promise.resolve(W);let H=s.length;const ie=()=>{H=-1;for(const ae of s)ae.cancel?.()};return new Promise((ae,le)=>{for(const N of s)N.then($=>{--H>=0&&d($)?(ie(),ae($)):H===0&&ae(W)}).catch($=>{--H>=0&&(ie(),le($))})})}e.firstParallel=M;class F{constructor(d){this._size=0,this.maxDegreeOfParalellism=d,this.outstandingPromises=[],this.runningPromises=0,this._onDrained=new b.Emitter}get onDrained(){return this._onDrained.event}get size(){return this._size}queue(d){return this._size++,new Promise((W,H)=>{this.outstandingPromises.push({factory:d,c:W,e:H}),this.consume()})}consume(){for(;this.outstandingPromises.length&&this.runningPromises<this.maxDegreeOfParalellism;){const d=this.outstandingPromises.shift();this.runningPromises++;const W=d.factory();W.then(d.c,d.e),W.then(()=>this.consumed(),()=>this.consumed())}}consumed(){this._size--,this.runningPromises--,this.outstandingPromises.length>0?this.consume():this._onDrained.fire()}dispose(){this._onDrained.dispose()}}e.Limiter=F;class l extends F{constructor(){super(1)}}e.Queue=l;class E{constructor(){this.sequentializer=new fe,this.tasks=0}queue(d){return this.sequentializer.isRunning()?this.sequentializer.queue(()=>this.sequentializer.run(this.tasks++,d())):this.sequentializer.run(this.tasks++,d())}}e.LimitedQueue=E;class B{constructor(){this.queues=new Map,this.drainers=new Set}async whenDrained(){if(this.isDrained())return;const d=new R;return this.drainers.add(d),d.p}isDrained(){for(const[,d]of this.queues)if(d.size>0)return!1;return!0}queueFor(d,W=O.extUri){const H=W.getComparisonKey(d);let ie=this.queues.get(H);return ie||(ie=new l,b.Event.once(ie.onDrained)(()=>{ie?.dispose(),this.queues.delete(H),this.onDidQueueDrain()}),this.queues.set(H,ie)),ie}onDidQueueDrain(){this.isDrained()&&this.releaseDrainers()}releaseDrainers(){for(const d of this.drainers)d.complete();this.drainers.clear()}dispose(){for(const[,d]of this.queues)d.dispose();this.queues.clear(),this.releaseDrainers()}}e.ResourceQueue=B;class V{constructor(d,W){this._token=-1,typeof d=="function"&&typeof W=="number"&&this.setIfNotSet(d,W)}dispose(){this.cancel()}cancel(){this._token!==-1&&(clearTimeout(this._token),this._token=-1)}cancelAndSet(d,W){this.cancel(),this._token=setTimeout(()=>{this._token=-1,d()},W)}setIfNotSet(d,W){this._token===-1&&(this._token=setTimeout(()=>{this._token=-1,d()},W))}}e.TimeoutTimer=V;class T{constructor(){this._token=-1}dispose(){this.cancel()}cancel(){this._token!==-1&&(clearInterval(this._token),this._token=-1)}cancelAndSet(d,W){this.cancel(),this._token=setInterval(()=>{d()},W)}}e.IntervalTimer=T;class q{constructor(d,W){this.timeoutToken=-1,this.runner=d,this.timeout=W,this.timeoutHandler=this.onTimeout.bind(this)}dispose(){this.cancel(),this.runner=null}cancel(){this.isScheduled()&&(clearTimeout(this.timeoutToken),this.timeoutToken=-1)}schedule(d=this.timeout){this.cancel(),this.timeoutToken=setTimeout(this.timeoutHandler,d)}get delay(){return this.timeout}set delay(d){this.timeout=d}isScheduled(){return this.timeoutToken!==-1}flush(){this.isScheduled()&&(this.cancel(),this.doRun())}onTimeout(){this.timeoutToken=-1,this.runner&&this.doRun()}doRun(){this.runner?.()}}e.RunOnceScheduler=q;class J{constructor(d,W){W%1e3!==0&&console.warn(`ProcessTimeRunOnceScheduler resolution is 1s, ${W}ms is not a multiple of 1000ms.`),this.runner=d,this.timeout=W,this.counter=0,this.intervalToken=-1,this.intervalHandler=this.onInterval.bind(this)}dispose(){this.cancel(),this.runner=null}cancel(){this.isScheduled()&&(clearInterval(this.intervalToken),this.intervalToken=-1)}schedule(d=this.timeout){d%1e3!==0&&console.warn(`ProcessTimeRunOnceScheduler resolution is 1s, ${d}ms is not a multiple of 1000ms.`),this.cancel(),this.counter=Math.ceil(d/1e3),this.intervalToken=setInterval(this.intervalHandler,1e3)}isScheduled(){return this.intervalToken!==-1}onInterval(){this.counter--,!(this.counter>0)&&(clearInterval(this.intervalToken),this.intervalToken=-1,this.runner?.())}}e.ProcessTimeRunOnceScheduler=J;class x extends q{constructor(d,W){super(d,W),this.units=[]}work(d){this.units.push(d),this.isScheduled()||this.schedule()}doRun(){const d=this.units;this.units=[],this.runner?.(d)}dispose(){this.units=[],super.dispose()}}e.RunOnceWorker=x;class Q extends k.Disposable{constructor(d,W){super(),this.options=d,this.handler=W,this.pendingWork=[],this.throttler=this._register(new k.MutableDisposable),this.disposed=!1}get pending(){return this.pendingWork.length}work(d){if(this.disposed)return!1;if(typeof this.options.maxBufferedWork=="number"){if(this.throttler.value){if(this.pending+d.length>this.options.maxBufferedWork)return!1}else if(this.pending+d.length-this.options.maxWorkChunkSize>this.options.maxBufferedWork)return!1}for(const W of d)this.pendingWork.push(W);return this.throttler.value||this.doWork(),!0}doWork(){this.handler(this.pendingWork.splice(0,this.options.maxWorkChunkSize)),this.pendingWork.length>0&&(this.throttler.value=new q(()=>{this.throttler.clear(),this.doWork()},this.options.throttleDelay),this.throttler.value.schedule())}dispose(){super.dispose(),this.disposed=!0}}e.ThrottledWorker=Q,function(){typeof requestIdleCallback!="function"||typeof cancelIdleCallback!="function"?e.runWhenIdle=s=>{(0,P.setTimeout0)(()=>{if(d)return;const W=Date.now()+15;s(Object.freeze({didTimeout:!0,timeRemaining(){return Math.max(0,W-Date.now())}}))});let d=!1;return{dispose(){d||(d=!0)}}}:e.runWhenIdle=(s,d)=>{const W=requestIdleCallback(s,typeof d=="number"?{timeout:d}:void 0);let H=!1;return{dispose(){H||(H=!0,cancelIdleCallback(W))}}}}();class ne{constructor(d){this._didRun=!1,this._executor=()=>{try{this._value=d()}catch(W){this._error=W}finally{this._didRun=!0}},this._handle=(0,e.runWhenIdle)(()=>this._executor())}dispose(){this._handle.dispose()}get value(){if(this._didRun||(this._handle.dispose(),this._executor()),this._error)throw this._error;return this._value}get isInitialized(){return this._didRun}}e.IdleValue=ne;async function ue(s,d,W){let H;for(let ie=0;ie<W;ie++)try{return await s()}catch(ae){H=ae,await p(d)}throw H}e.retry=ue;class fe{isRunning(d){return typeof d=="number"?this._running?.taskId===d:!!this._running}get running(){return this._running?.promise}cancelRunning(){this._running?.cancel()}run(d,W,H){return this._running={taskId:d,cancel:()=>H?.(),promise:W},W.then(()=>this.doneRunning(d),()=>this.doneRunning(d)),W}doneRunning(d){this._running&&d===this._running.taskId&&(this._running=void 0,this.runQueued())}runQueued(){if(this._queued){const d=this._queued;this._queued=void 0,d.run().then(d.promiseResolve,d.promiseReject)}}queue(d){if(this._queued)this._queued.run=d;else{let W,H;const ie=new Promise((ae,le)=>{W=ae,H=le});this._queued={run:d,promise:ie,promiseResolve:W,promiseReject:H}}return this._queued.promise}hasQueued(){return!!this._queued}async join(){return this._queued?.promise??this._running?.promise}}e.TaskSequentializer=fe;class K{constructor(d,W=()=>Date.now()){this.interval=d,this.nowFn=W,this.lastIncrementTime=0,this.value=0}increment(){const d=this.nowFn();return d-this.lastIncrementTime>this.interval&&(this.lastIncrementTime=d,this.value=0),this.value++,this.value}}e.IntervalCounter=K;var z;(function(s){s[s.Resolved=0]="Resolved",s[s.Rejected=1]="Rejected"})(z||(z={}));class R{get isRejected(){return this.outcome?.outcome===1}get isResolved(){return this.outcome?.outcome===0}get isSettled(){return!!this.outcome}get value(){return this.outcome?.outcome===0?this.outcome?.value:void 0}constructor(){this.p=new Promise((d,W)=>{this.completeCallback=d,this.errorCallback=W})}complete(d){return new Promise(W=>{this.completeCallback(d),this.outcome={outcome:0,value:d},W()})}error(d){return new Promise(W=>{this.errorCallback(d),this.outcome={outcome:1,value:d},W()})}cancel(){return this.error(new I.CancellationError)}}e.DeferredPromise=R;var G;(function(s){async function d(H){let ie;const ae=await Promise.all(H.map(le=>le.then(N=>N,N=>{ie||(ie=N)})));if(typeof ie<"u")throw ie;return ae}s.settled=d;function W(H){return new Promise(async(ie,ae)=>{try{await H(ie,ae)}catch(le){ae(le)}})}s.withAsyncBody=W})(G||(e.Promises=G={}));var se;(function(s){s[s.Initial=0]="Initial",s[s.DoneOK=1]="DoneOK",s[s.DoneError=2]="DoneError"})(se||(se={}));class te{static fromArray(d){return new te(W=>{W.emitMany(d)})}static fromPromise(d){return new te(async W=>{W.emitMany(await d)})}static fromPromises(d){return new te(async W=>{await Promise.all(d.map(async H=>W.emitOne(await H)))})}static merge(d){return new te(async W=>{await Promise.all(d.map(async H=>{for await(const ie of H)W.emitOne(ie)}))})}static{this.EMPTY=te.fromArray([])}constructor(d){this._state=0,this._results=[],this._error=null,this._onStateChanged=new b.Emitter,queueMicrotask(async()=>{const W={emitOne:H=>this.emitOne(H),emitMany:H=>this.emitMany(H),reject:H=>this.reject(H)};try{await Promise.resolve(d(W)),this.resolve()}catch(H){this.reject(H)}finally{W.emitOne=void 0,W.emitMany=void 0,W.reject=void 0}})}[Symbol.asyncIterator](){let d=0;return{next:async()=>{do{if(this._state===2)throw this._error;if(d<this._results.length)return{done:!1,value:this._results[d++]};if(this._state===1)return{done:!0,value:void 0};await b.Event.toPromise(this._onStateChanged.event)}while(!0)}}}static map(d,W){return new te(async H=>{for await(const ie of d)H.emitOne(W(ie))})}map(d){return te.map(this,d)}static filter(d,W){return new te(async H=>{for await(const ie of d)W(ie)&&H.emitOne(ie)})}filter(d){return te.filter(this,d)}static coalesce(d){return te.filter(d,W=>!!W)}coalesce(){return te.coalesce(this)}static async toPromise(d){const W=[];for await(const H of d)W.push(H);return W}toPromise(){return te.toPromise(this)}emitOne(d){this._state===0&&(this._results.push(d),this._onStateChanged.fire())}emitMany(d){this._state===0&&(this._results=this._results.concat(d),this._onStateChanged.fire())}resolve(){this._state===0&&(this._state=1,this._onStateChanged.fire())}reject(d){this._state===0&&(this._state=2,this._error=d,this._onStateChanged.fire())}}e.AsyncIterableObject=te;class ge extends te{constructor(d,W){super(W),this._source=d}cancel(){this._source.cancel()}}e.CancelableAsyncIterableObject=ge;function Z(s){const d=new w.CancellationTokenSource,W=s(d.token);return new ge(d,async H=>{const ie=d.token.onCancellationRequested(()=>{ie.dispose(),d.dispose(),H.reject(new I.CancellationError)});try{for await(const ae of W){if(d.token.isCancellationRequested)return;H.emitOne(ae)}ie.dispose(),d.dispose()}catch(ae){ie.dispose(),d.dispose(),H.reject(ae)}})}e.createCancelableAsyncIterable=Z}),define(ce[58],he([0,1,17,5]),function(oe,e,w,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.transformAndReviveIncomingURIs=e.transformIncomingURIs=e.transformOutgoingURIs=e.DefaultURITransformer=e.URITransformer=void 0;function b(y){return y.toJSON()}class k{constructor(L){this._uriTransformer=L}transformIncoming(L){const t=this._uriTransformer.transformIncoming(L);return t===L?L:b(I.URI.from(t))}transformOutgoing(L){const t=this._uriTransformer.transformOutgoing(L);return t===L?L:b(I.URI.from(t))}transformOutgoingURI(L){const t=this._uriTransformer.transformOutgoing(L);return t===L?L:I.URI.from(t)}transformOutgoingScheme(L){return this._uriTransformer.transformOutgoingScheme(L)}}e.URITransformer=k,e.DefaultURITransformer=new class{transformIncoming(y){return y}transformOutgoing(y){return y}transformOutgoingURI(y){return y}transformOutgoingScheme(y){return y}};function O(y,L,t){if(!y||t>200)return null;if(typeof y=="object"){if(y instanceof I.URI)return L.transformOutgoing(y);for(const u in y)if(Object.hasOwnProperty.call(y,u)){const a=O(y[u],L,t+1);a!==null&&(y[u]=a)}}return null}function P(y,L){const t=O(y,L,0);return t===null?y:t}e.transformOutgoingURIs=P;function m(y,L,t,u){if(!y||u>200)return null;if(typeof y=="object"){if(y.$mid===1)return t?I.URI.revive(L.transformIncoming(y)):L.transformIncoming(y);if(y instanceof w.VSBuffer)return null;for(const a in y)if(Object.hasOwnProperty.call(y,a)){const i=m(y[a],L,t,u+1);i!==null&&(y[a]=i)}}return null}function c(y,L){const t=m(y,L,!1,0);return t===null?y:t}e.transformIncomingURIs=c;function A(y,L){const t=m(y,L,!0,0);return t===null?y:t}e.transformAndReviveIncomingURIs=A}),define(ce[23],he([0,1,100,19,101,9,32,43,7,2,22,5]),function(oe,e,w,I,b,k,O,P,m,c,A,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Promises=e.writeFileSync=e.configureFlushOnWrite=e.SymlinkSupport=e.whenDeleted=e.readdirSync=e.rimrafSync=e.RimRafMode=void 0;var L;(function(Q){Q[Q.UNLINK=0]="UNLINK",Q[Q.MOVE=1]="MOVE"})(L||(e.RimRafMode=L={}));async function t(Q,ne=L.UNLINK,ue){if((0,O.isRootOrDriveLetter)(Q))throw new Error("rimraf - will refuse to recursively delete root");return ne===L.UNLINK?a(Q):u(Q,ue)}async function u(Q,ne=(0,O.randomPath)((0,I.tmpdir)())){try{try{await w.promises.rename(Q,ne)}catch(ue){return ue.code==="ENOENT"?void 0:a(Q)}a(ne).catch(ue=>{})}catch(ue){if(ue.code!=="ENOENT")throw ue}}async function a(Q){return(0,b.promisify)(w.rm)(Q,{recursive:!0,force:!0,maxRetries:3})}function i(Q){if((0,O.isRootOrDriveLetter)(Q))throw new Error("rimraf - will refuse to recursively delete root");w.rmSync(Q,{recursive:!0,force:!0,maxRetries:3})}e.rimrafSync=i;async function v(Q,ne){return C(await(ne?r(Q):(0,b.promisify)(w.readdir)(Q)))}async function r(Q){try{return await(0,b.promisify)(w.readdir)(Q,{withFileTypes:!0})}catch(fe){console.warn("[node.js fs] readdir with filetypes failed with error: ",fe)}const ne=[],ue=await v(Q);for(const fe of ue){let K=!1,z=!1,R=!1;try{const G=await e.Promises.lstat((0,m.join)(Q,fe));K=G.isFile(),z=G.isDirectory(),R=G.isSymbolicLink()}catch(G){console.warn("[node.js fs] unexpected error from lstat after readdir: ",G)}ne.push({name:fe,isFile:()=>K,isDirectory:()=>z,isSymbolicLink:()=>R})}return ne}function _(Q){return C(w.readdirSync(Q))}e.readdirSync=_;function C(Q){return Q.map(ne=>typeof ne=="string"?c.isMacintosh?(0,P.normalizeNFC)(ne):ne:(ne.name=c.isMacintosh?(0,P.normalizeNFC)(ne.name):ne.name,ne))}async function o(Q){const ne=await v(Q),ue=[];for(const fe of ne)await h.existsDirectory((0,m.join)(Q,fe))&&ue.push(fe);return ue}function n(Q,ne=1e3){return new Promise(ue=>{let fe=!1;const K=setInterval(()=>{fe||(fe=!0,w.access(Q,z=>{fe=!1,z&&(clearInterval(K),ue(void 0))}))},ne)})}e.whenDeleted=n;var h;(function(Q){async function ne(K){let z;try{if(z=await e.Promises.lstat(K),!z.isSymbolicLink())return{stat:z}}catch{}try{return{stat:await e.Promises.stat(K),symbolicLink:z?.isSymbolicLink()?{dangling:!1}:void 0}}catch(R){if(R.code==="ENOENT"&&z)return{stat:z,symbolicLink:{dangling:!0}};if(c.isWindows&&R.code==="EACCES")try{return{stat:await e.Promises.stat(await e.Promises.readlink(K)),symbolicLink:{dangling:!1}}}catch(G){if(G.code==="ENOENT"&&z)return{stat:z,symbolicLink:{dangling:!0}};throw G}throw R}}Q.stat=ne;async function ue(K){try{const{stat:z,symbolicLink:R}=await Q.stat(K);return z.isFile()&&R?.dangling!==!0}catch{}return!1}Q.existsFile=ue;async function fe(K){try{const{stat:z,symbolicLink:R}=await Q.stat(K);return z.isDirectory()&&R?.dangling!==!0}catch{}return!1}Q.existsDirectory=fe})(h||(e.SymlinkSupport=h={}));const S=new k.ResourceQueue;function p(Q,ne,ue){return S.queueFor(y.URI.file(Q),A.extUriBiasedIgnorePathCase).queue(()=>{const fe=F(ue);return new Promise((K,z)=>g(Q,ne,fe,R=>R?z(R):K()))})}let D=!0;function f(Q){D=Q}e.configureFlushOnWrite=f;function g(Q,ne,ue,fe){if(!D)return w.writeFile(Q,ne,{mode:ue.mode,flag:ue.flag},fe);w.open(Q,ue.flag,ue.mode,(K,z)=>{if(K)return fe(K);w.writeFile(z,ne,R=>{if(R)return w.close(z,()=>fe(R));w.fdatasync(z,G=>(G&&(console.warn("[node.js fs] fdatasync is now disabled for this session because it failed: ",G),f(!1)),w.close(z,se=>fe(se))))})})}function M(Q,ne,ue){const fe=F(ue);if(!D)return w.writeFileSync(Q,ne,{mode:fe.mode,flag:fe.flag});const K=w.openSync(Q,fe.flag,fe.mode);try{w.writeFileSync(K,ne);try{w.fdatasyncSync(K)}catch(z){console.warn("[node.js fs] fdatasyncSync is now disabled for this session because it failed: ",z),f(!1)}}finally{w.closeSync(K)}}e.writeFileSync=M;function F(Q){return Q?{mode:typeof Q.mode=="number"?Q.mode:438,flag:typeof Q.flag=="string"?Q.flag:"w"}:{mode:438,flag:"w"}}async function l(Q,ne,ue=6e4){if(Q!==ne)try{c.isWindows&&typeof ue=="number"?await E(Q,ne,Date.now(),ue):await(0,b.promisify)(w.rename)(Q,ne)}catch(fe){if(Q.toLowerCase()!==ne.toLowerCase()&&fe.code==="EXDEV"||Q.endsWith("."))await B(Q,ne,{preserveSymlinks:!1}),await t(Q,L.MOVE);else throw fe}}async function E(Q,ne,ue,fe,K=0){try{return await(0,b.promisify)(w.rename)(Q,ne)}catch(z){if(z.code!=="EACCES"&&z.code!=="EPERM"&&z.code!=="EBUSY")throw z;if(Date.now()-ue>=fe)throw console.error(`[node.js fs] rename failed after ${K} retries with error: ${z}`),z;if(K===0){let R=!1;try{const{stat:G}=await h.stat(ne);G.isFile()||(R=!0)}catch{}if(R)throw z}return await(0,k.timeout)(Math.min(100,K*10)),E(Q,ne,ue,fe,K+1)}}async function B(Q,ne,ue){return T(Q,ne,{root:{source:Q,target:ne},options:ue,handledSourcePaths:new Set})}const V=511;async function T(Q,ne,ue){if(ue.handledSourcePaths.has(Q))return;ue.handledSourcePaths.add(Q);const{stat:fe,symbolicLink:K}=await h.stat(Q);if(K){if(ue.options.preserveSymlinks)try{return await x(Q,ne,ue)}catch(z){console.warn("[node.js fs] copy of symlink failed: ",z)}if(K.dangling)return}return fe.isDirectory()?q(Q,ne,fe.mode&V,ue):J(Q,ne,fe.mode&V)}async function q(Q,ne,ue,fe){await e.Promises.mkdir(ne,{recursive:!0,mode:ue});const K=await v(Q);for(const z of K)await T((0,m.join)(Q,z),(0,m.join)(ne,z),fe)}async function J(Q,ne,ue){await e.Promises.copyFile(Q,ne),await e.Promises.chmod(ne,ue)}async function x(Q,ne,ue){let fe=await e.Promises.readlink(Q);(0,O.isEqualOrParent)(fe,ue.root.source,!c.isLinux)&&(fe=(0,m.join)(ue.root.target,fe.substr(ue.root.source.length+1))),await e.Promises.symlink(fe,ne)}e.Promises=new class{get access(){return(0,b.promisify)(w.access)}get stat(){return(0,b.promisify)(w.stat)}get lstat(){return(0,b.promisify)(w.lstat)}get utimes(){return(0,b.promisify)(w.utimes)}get read(){return(Q,ne,ue,fe,K)=>new Promise((z,R)=>{w.read(Q,ne,ue,fe,K,(G,se,te)=>G?R(G):z({bytesRead:se,buffer:te}))})}get readFile(){return(0,b.promisify)(w.readFile)}get write(){return(Q,ne,ue,fe,K)=>new Promise((z,R)=>{w.write(Q,ne,ue,fe,K,(G,se,te)=>G?R(G):z({bytesWritten:se,buffer:te}))})}get appendFile(){return(0,b.promisify)(w.appendFile)}get fdatasync(){return(0,b.promisify)(w.fdatasync)}get truncate(){return(0,b.promisify)(w.truncate)}get copyFile(){return(0,b.promisify)(w.copyFile)}get open(){return(0,b.promisify)(w.open)}get close(){return(0,b.promisify)(w.close)}get symlink(){return(0,b.promisify)(w.symlink)}get readlink(){return(0,b.promisify)(w.readlink)}get chmod(){return(0,b.promisify)(w.chmod)}get mkdir(){return(0,b.promisify)(w.mkdir)}get unlink(){return(0,b.promisify)(w.unlink)}get rmdir(){return(0,b.promisify)(w.rmdir)}get realpath(){return(0,b.promisify)(w.realpath)}async exists(Q){try{return await e.Promises.access(Q),!0}catch{return!1}}get readdir(){return v}get readDirsInDir(){return o}get writeFile(){return p}get rm(){return t}get rename(){return l}get copy(){return B}}}),define(ce[59],he([0,1,19,7,23]),function(oe,e,w,I,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getFirstAvailablePowerShellInstallation=e.enumeratePowerShellInstallations=void 0;const k=/^\d+$/,O=/^Microsoft.PowerShell_.*/,P=/^Microsoft.PowerShellPreview_.*/;var m;(function(C){C[C.x64=0]="x64",C[C.x86=1]="x86",C[C.ARM=2]="ARM"})(m||(m={}));let c;switch(process.arch){case"ia32":c=1;break;case"arm":case"arm64":c=2;break;default:c=0;break}let A;process.env.PROCESSOR_ARCHITEW6432?A=process.env.PROCESSOR_ARCHITEW6432==="ARM64"?2:0:process.env.PROCESSOR_ARCHITECTURE==="ARM64"?A=2:process.env.PROCESSOR_ARCHITECTURE==="X86"?A=1:A=0;class y{constructor(o,n,h){this.exePath=o,this.displayName=n,this.knownToExist=h}async exists(){return this.knownToExist===void 0&&(this.knownToExist=await b.SymlinkSupport.existsFile(this.exePath)),this.knownToExist}}function L({useAlternateBitness:C=!1}={}){return C?c===0?process.env["ProgramFiles(x86)"]||null:A===0&&process.env.ProgramW6432||null:process.env.ProgramFiles||null}async function t({useAlternateBitness:C=!1,findPreview:o=!1}={}){const n=L({useAlternateBitness:C});if(!n)return null;const h=I.join(n,"PowerShell");if(!await b.SymlinkSupport.existsDirectory(h))return null;let S=-1,p=null;for(const g of await b.Promises.readdir(h)){let M=-1;if(o){const l=g.indexOf("-");if(l<0)continue;const E=g.substring(0,l);if(!k.test(E)||g.substring(l+1)!=="preview")continue;M=parseInt(E,10)}else{if(!k.test(g))continue;M=parseInt(g,10)}if(M<=S)continue;const F=I.join(h,g,"pwsh.exe");await b.SymlinkSupport.existsFile(F)&&(p=F,S=M)}if(!p)return null;const D=n.includes("x86")?" (x86)":"",f=o?" Preview":"";return new y(p,`PowerShell${f}${D}`,!0)}async function u({findPreview:C}={}){if(!process.env.LOCALAPPDATA)return null;const o=I.join(process.env.LOCALAPPDATA,"Microsoft","WindowsApps");if(!await b.SymlinkSupport.existsDirectory(o))return null;const{pwshMsixDirRegex:n,pwshMsixName:h}=C?{pwshMsixDirRegex:P,pwshMsixName:"PowerShell Preview (Store)"}:{pwshMsixDirRegex:O,pwshMsixName:"PowerShell (Store)"};for(const S of await b.Promises.readdir(o))if(n.test(S)){const p=I.join(o,S,"pwsh.exe");return new y(p,h)}return null}function a(){const C=I.join(w.homedir(),".dotnet","tools","pwsh.exe");return new y(C,".NET Core PowerShell Global Tool")}function i(){const C=I.join(process.env.windir,c===1&&A!==1?"SysNative":"System32","WindowsPowerShell","v1.0","powershell.exe");return new y(C,"Windows PowerShell",!0)}async function*v(){let C=await t();C&&(yield C),C=await t({useAlternateBitness:!0}),C&&(yield C),C=await u(),C&&(yield C),C=a(),C&&(yield C),C=await t({findPreview:!0}),C&&(yield C),C=await u({findPreview:!0}),C&&(yield C),C=await t({useAlternateBitness:!0,findPreview:!0}),C&&(yield C),C=i(),C&&(yield C)}async function*r(){for await(const C of v())await C.exists()&&(yield C)}e.enumeratePowerShellInstallations=r;async function _(){for await(const C of r())return C;return null}e.getFirstAvailablePowerShellInstallation=_}),define(ce[34],he([0,1,7,2,15,33,8,23]),function(oe,e,w,I,b,k,O,P){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.win32=e.createQueuedSender=e.getWindowsShell=e.TerminateResponseCode=e.Source=void 0,Object.defineProperty(e,"Source",{enumerable:!0,get:function(){return k.Source}}),Object.defineProperty(e,"TerminateResponseCode",{enumerable:!0,get:function(){return k.TerminateResponseCode}});function m(y=b.env){return y.comspec||"cmd.exe"}e.getWindowsShell=m;function c(y){let L=[],t=!1;const u=function(a){if(t){L.push(a);return}(!y.send(a,v=>{if(v&&console.error(v),t=!1,L.length>0){const r=L.slice(0);L=[],r.forEach(_=>u(_))}})||I.isWindows)&&(t=!0)};return{send:u}}e.createQueuedSender=c;var A;(function(y){async function L(t,u,a){if(w.isAbsolute(t))return t;if(u===void 0&&(u=b.cwd()),w.dirname(t)!=="."||(a===void 0&&O.isString(b.env.PATH)&&(a=b.env.PATH.split(w.delimiter)),a===void 0||a.length===0))return w.join(u,t);async function v(r){if(await P.Promises.exists(r)){let _;try{_=await P.Promises.stat(r)}catch(C){C.message.startsWith("EACCES")&&(_=await P.Promises.lstat(r))}return _?!_.isDirectory():!1}return!1}for(const r of a){let _;if(w.isAbsolute(r)?_=w.join(r,t):_=w.join(u,r,t),await v(_))return _;let C=_+".com";if(await v(C)||(C=_+".exe",await v(C)))return C}return w.join(u,t)}y.findExecutable=L})(A||(e.win32=A={}))}),define(ce[60],he([0,1,24,18]),function(oe,e,w,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.listProcesses=void 0;function b(O){return new Promise((P,m)=>{let c;const A=new Map;function y(t,u,a,i,v){const r=A.get(u);if(t===O||r){const _={name:L(a),cmd:a,pid:t,ppid:u,load:i,mem:v};A.set(t,_),t===O&&(c=_),r&&(r.children||(r.children=[]),r.children.push(_),r.children.length>1&&(r.children=r.children.sort((C,o)=>C.pid-o.pid)))}}function L(t){const u=/--utility-sub-type=network/i,a=/--crashes-directory/i,i=/\\pipe\\winpty-control/i,v=/conhost\.exe.+--headless/i,r=/--type=([a-zA-Z-]+)/;if(a.exec(t))return"electron-crash-reporter";if(i.exec(t))return"winpty-agent";if(v.exec(t))return"conpty-agent";let _=r.exec(t);if(_&&_.length===2)return _[1]==="renderer"?"window":_[1]==="utility"?u.exec(t)?"utility-network-service":"utility-process":_[1]==="extensionHost"?"extension-host":_[1];const C=/[a-zA-Z-]+\.js/g;let o="";do _=C.exec(t),_&&(o+=_+" ");while(_);return o&&t.indexOf("node ")<0&&t.indexOf("node.exe")<0?`electron-nodejs (${o})`:t}if(process.platform==="win32"){const t=u=>u.indexOf("\\\\?\\")===0||u.indexOf("\\??\\")===0?u.substring(4):u.indexOf('"\\\\?\\')===0||u.indexOf('"\\??\\')===0?'"'+u.substring(5):u;new Promise((u,a)=>{oe(["@vscode/windows-process-tree"],u,a)}).then(u=>{u.getProcessList(O,a=>{if(!a){m(new Error(`Root process ${O} not found`));return}u.getProcessCpuUsage(a,i=>{const v=new Map;i.forEach(r=>{const _=t(r.commandLine||"");v.set(r.pid,{name:L(_),cmd:_,pid:r.pid,ppid:r.ppid,load:r.cpu||0,mem:r.memory||0})}),c=v.get(O),c?(v.forEach(r=>{const _=v.get(r.ppid);_&&(_.children||(_.children=[]),_.children.push(r))}),v.forEach(r=>{r.children&&(r.children=r.children.sort((_,C)=>_.pid-C.pid))}),P(c)):m(new Error(`Root process ${O} not found`))})},u.ProcessDataFlag.CommandLine|u.ProcessDataFlag.Memory)})}else{let t=function(){let u=[c];const a=[];for(;u.length;){const v=u.shift();v&&(a.push(v.pid),v.children&&(u=u.concat(v.children)))}let i=JSON.stringify(I.FileAccess.asFileUri("vs/base/node/cpuUsage.sh").fsPath);i+=" "+a.join(" "),(0,w.exec)(i,{},(v,r,_)=>{if(v||_)m(v||new Error(_.toString()));else{const C=r.toString().split(`
`);for(let o=0;o<a.length;o++){const n=A.get(a[o]);n.load=parseFloat(C[o])}if(!c){m(new Error(`Root process ${O} not found`));return}P(c)}})};(0,w.exec)("which ps",{},(u,a,i)=>{if(u||i)if(process.platform!=="linux")m(u||new Error(i.toString()));else{const v=JSON.stringify(I.FileAccess.asFileUri("vs/base/node/ps.sh").fsPath);(0,w.exec)(v,{},(r,_,C)=>{r||C?m(r||new Error(C.toString())):(k(_,y),t())})}else{const v=a.toString().trim(),r="-ax -o pid=,ppid=,pcpu=,pmem=,command=";(0,w.exec)(`${v} ${r}`,{maxBuffer:1e3*1024,env:{LC_NUMERIC:"en_US.UTF-8"}},(_,C,o)=>{_||o&&!o.includes("screen size is bogus")?m(_||new Error(o.toString())):(k(C,y),process.platform==="linux"?t():c?P(c):m(new Error(`Root process ${O} not found`)))})}})}})}e.listProcesses=b;function k(O,P){const m=/^\s*([0-9]+)\s+([0-9]+)\s+([0-9]+\.[0-9]+)\s+([0-9]+\.[0-9]+)\s+(.+)$/,c=O.toString().split(`
`);for(const A of c){const y=m.exec(A.trim());y&&y.length===6&&P(parseInt(y[1]),parseInt(y[2]),y[5],parseFloat(y[3]),parseFloat(y[4]))}}}),define(ce[61],he([0,1,19,2,59,34]),function(oe,e,w,I,b,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getSystemShell=void 0;async function O(y,L){return y===1?I.isWindows?A():k.getWindowsShell(L):m(y,L)}e.getSystemShell=O;let P=null;function m(y,L){if(I.isLinux&&y===2||I.isMacintosh&&y===3)return"/bin/bash";if(!P){let t;if(I.isWindows)t="/bin/bash";else{if(t=L.SHELL,!t)try{t=(0,w.userInfo)().shell}catch{}t||(t="sh"),t==="/bin/false"&&(t="/bin/bash")}P=t}return P}let c=null;async function A(){return c||(c=(await(0,b.getFirstAvailablePowerShellInstallation)()).exePath),c}});var me=this&&this.__decorate||function(oe,e,w,I){var b=arguments.length,k=b<3?e:I===null?I=Object.getOwnPropertyDescriptor(e,w):I,O;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")k=Reflect.decorate(oe,e,w,I);else for(var P=oe.length-1;P>=0;P--)(O=oe[P])&&(k=(b<3?O(k):b>3?O(e,w,k):O(e,w))||k);return b>3&&k&&Object.defineProperty(e,w,k),k};define(ce[25],he([0,1,21,9,17,16,14,6,4,3,57,12,8]),function(oe,e,w,I,b,k,O,P,m,c,A,y,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IPCLogger=e.ProxyChannel=e.StaticRouter=e.getNextTickChannel=e.getDelayedChannel=e.IPCClient=e.IPCServer=e.ChannelClient=e.RequestInitiator=e.ChannelServer=e.deserialize=e.serialize=e.BufferWriter=e.BufferReader=void 0;var t;(function(K){K[K.Promise=100]="Promise",K[K.PromiseCancel=101]="PromiseCancel",K[K.EventListen=102]="EventListen",K[K.EventDispose=103]="EventDispose"})(t||(t={}));function u(K){switch(K){case 100:return"req";case 101:return"cancel";case 102:return"subscribe";case 103:return"unsubscribe"}}var a;(function(K){K[K.Initialize=200]="Initialize",K[K.PromiseSuccess=201]="PromiseSuccess",K[K.PromiseError=202]="PromiseError",K[K.PromiseErrorObj=203]="PromiseErrorObj",K[K.EventFire=204]="EventFire"})(a||(a={}));function i(K){switch(K){case 200:return"init";case 201:return"reply:";case 202:case 203:return"replyErr:";case 204:return"event:"}}var v;(function(K){K[K.Uninitialized=0]="Uninitialized",K[K.Idle=1]="Idle"})(v||(v={}));function r(K){let z=0;for(let R=0;;R+=7){const G=K.read(1);if(z|=(G.buffer[0]&127)<<R,!(G.buffer[0]&128))return z}}const _=S(0);function C(K,z){if(z===0){K.write(_);return}let R=0;for(let se=z;se!==0;se=se>>>7)R++;const G=b.VSBuffer.alloc(R);for(let se=0;z!==0;se++)G.buffer[se]=z&127,z=z>>>7,z>0&&(G.buffer[se]|=128);K.write(G)}class o{constructor(z){this.buffer=z,this.pos=0}read(z){const R=this.buffer.slice(this.pos,this.pos+z);return this.pos+=R.byteLength,R}}e.BufferReader=o;class n{constructor(){this.buffers=[]}get buffer(){return b.VSBuffer.concat(this.buffers)}write(z){this.buffers.push(z)}}e.BufferWriter=n;var h;(function(K){K[K.Undefined=0]="Undefined",K[K.String=1]="String",K[K.Buffer=2]="Buffer",K[K.VSBuffer=3]="VSBuffer",K[K.Array=4]="Array",K[K.Object=5]="Object",K[K.Int=6]="Int"})(h||(h={}));function S(K){const z=b.VSBuffer.alloc(1);return z.writeUInt8(K,0),z}const p={Undefined:S(h.Undefined),String:S(h.String),Buffer:S(h.Buffer),VSBuffer:S(h.VSBuffer),Array:S(h.Array),Object:S(h.Object),Uint:S(h.Int)},D=typeof Buffer<"u";function f(K,z){if(typeof z>"u")K.write(p.Undefined);else if(typeof z=="string"){const R=b.VSBuffer.fromString(z);K.write(p.String),C(K,R.byteLength),K.write(R)}else if(D&&Buffer.isBuffer(z)){const R=b.VSBuffer.wrap(z);K.write(p.Buffer),C(K,R.byteLength),K.write(R)}else if(z instanceof b.VSBuffer)K.write(p.VSBuffer),C(K,z.byteLength),K.write(z);else if(Array.isArray(z)){K.write(p.Array),C(K,z.length);for(const R of z)f(K,R)}else if(typeof z=="number"&&(z|0)===z)K.write(p.Uint),C(K,z);else{const R=b.VSBuffer.fromString(JSON.stringify(z));K.write(p.Object),C(K,R.byteLength),K.write(R)}}e.serialize=f;function g(K){switch(K.read(1).readUInt8(0)){case h.Undefined:return;case h.String:return K.read(r(K)).toString();case h.Buffer:return K.read(r(K)).buffer;case h.VSBuffer:return K.read(r(K));case h.Array:{const R=r(K),G=[];for(let se=0;se<R;se++)G.push(g(K));return G}case h.Object:return JSON.parse(K.read(r(K)).toString());case h.Int:return r(K)}}e.deserialize=g;class M{constructor(z,R,G=null,se=1e3){this.protocol=z,this.ctx=R,this.logger=G,this.timeoutDelay=se,this.channels=new Map,this.activeRequests=new Map,this.pendingRequests=new Map,this.protocolListener=this.protocol.onMessage(te=>this.onRawMessage(te)),this.sendResponse({type:200})}registerChannel(z,R){this.channels.set(z,R),setTimeout(()=>this.flushPendingRequests(z),0)}sendResponse(z){switch(z.type){case 200:{const R=this.send([z.type]);this.logger?.logOutgoing(R,0,1,i(z.type));return}case 201:case 202:case 204:case 203:{const R=this.send([z.type,z.id],z.data);this.logger?.logOutgoing(R,z.id,1,i(z.type),z.data);return}}}send(z,R=void 0){const G=new n;return f(G,z),f(G,R),this.sendBuffer(G.buffer)}sendBuffer(z){try{return this.protocol.send(z),z.byteLength}catch{return 0}}onRawMessage(z){const R=new o(z),G=g(R),se=g(R),te=G[0];switch(te){case 100:return this.logger?.logIncoming(z.byteLength,G[1],1,`${u(te)}: ${G[2]}.${G[3]}`,se),this.onPromise({type:te,id:G[1],channelName:G[2],name:G[3],arg:se});case 102:return this.logger?.logIncoming(z.byteLength,G[1],1,`${u(te)}: ${G[2]}.${G[3]}`,se),this.onEventListen({type:te,id:G[1],channelName:G[2],name:G[3],arg:se});case 101:return this.logger?.logIncoming(z.byteLength,G[1],1,`${u(te)}`),this.disposeActiveRequest({type:te,id:G[1]});case 103:return this.logger?.logIncoming(z.byteLength,G[1],1,`${u(te)}`),this.disposeActiveRequest({type:te,id:G[1]})}}onPromise(z){const R=this.channels.get(z.channelName);if(!R){this.collectPendingRequest(z);return}const G=new k.CancellationTokenSource;let se;try{se=R.call(this.ctx,z.name,z.arg,G.token)}catch(Z){se=Promise.reject(Z)}const te=z.id;se.then(Z=>{this.sendResponse({id:te,data:Z,type:201}),this.activeRequests.delete(z.id)},Z=>{Z instanceof Error?this.sendResponse({id:te,data:{message:Z.message,name:Z.name,stack:Z.stack?Z.stack.split?Z.stack.split(`
`):Z.stack:void 0},type:202}):this.sendResponse({id:te,data:Z,type:203}),this.activeRequests.delete(z.id)});const ge=(0,c.toDisposable)(()=>G.cancel());this.activeRequests.set(z.id,ge)}onEventListen(z){const R=this.channels.get(z.channelName);if(!R){this.collectPendingRequest(z);return}const G=z.id,te=R.listen(this.ctx,z.name,z.arg)(ge=>this.sendResponse({id:G,data:ge,type:204}));this.activeRequests.set(z.id,te)}disposeActiveRequest(z){const R=this.activeRequests.get(z.id);R&&(R.dispose(),this.activeRequests.delete(z.id))}collectPendingRequest(z){let R=this.pendingRequests.get(z.channelName);R||(R=[],this.pendingRequests.set(z.channelName,R));const G=setTimeout(()=>{console.error(`Unknown channel: ${z.channelName}`),z.type===100&&this.sendResponse({id:z.id,data:{name:"Unknown channel",message:`Channel name '${z.channelName}' timed out after ${this.timeoutDelay}ms`,stack:void 0},type:202})},this.timeoutDelay);R.push({request:z,timeoutTimer:G})}flushPendingRequests(z){const R=this.pendingRequests.get(z);if(R){for(const G of R)switch(clearTimeout(G.timeoutTimer),G.request.type){case 100:this.onPromise(G.request);break;case 102:this.onEventListen(G.request);break}this.pendingRequests.delete(z)}}dispose(){this.protocolListener&&(this.protocolListener.dispose(),this.protocolListener=null),(0,c.dispose)(this.activeRequests.values()),this.activeRequests.clear()}}e.ChannelServer=M;var F;(function(K){K[K.LocalSide=0]="LocalSide",K[K.OtherSide=1]="OtherSide"})(F||(e.RequestInitiator=F={}));class l{constructor(z,R=null){this.protocol=z,this.isDisposed=!1,this.state=v.Uninitialized,this.activeRequests=new Set,this.handlers=new Map,this.lastRequestId=0,this._onDidInitialize=new m.Emitter,this.onDidInitialize=this._onDidInitialize.event,this.protocolListener=this.protocol.onMessage(G=>this.onBuffer(G)),this.logger=R}getChannel(z){const R=this;return{call(G,se,te){return R.isDisposed?Promise.reject(new P.CancellationError):R.requestPromise(z,G,se,te)},listen(G,se){return R.isDisposed?m.Event.None:R.requestEvent(z,G,se)}}}requestPromise(z,R,G,se=k.CancellationToken.None){const te=this.lastRequestId++,Z={id:te,type:100,channelName:z,name:R,arg:G};if(se.isCancellationRequested)return Promise.reject(new P.CancellationError);let s;return new Promise((W,H)=>{if(se.isCancellationRequested)return H(new P.CancellationError);const ie=()=>{const $=j=>{switch(j.type){case 201:this.handlers.delete(te),W(j.data);break;case 202:{this.handlers.delete(te);const X=new Error(j.data.message);X.stack=Array.isArray(j.data.stack)?j.data.stack.join(`
`):j.data.stack,X.name=j.data.name,H(X);break}case 203:this.handlers.delete(te),H(j.data);break}};this.handlers.set(te,$),this.sendRequest(Z)};let ae=null;this.state===v.Idle?ie():(ae=(0,I.createCancelablePromise)($=>this.whenInitialized()),ae.then(()=>{ae=null,ie()}));const le=()=>{ae?(ae.cancel(),ae=null):this.sendRequest({id:te,type:101}),H(new P.CancellationError)},N=se.onCancellationRequested(le);s=(0,c.combinedDisposable)((0,c.toDisposable)(le),N),this.activeRequests.add(s)}).finally(()=>{this.activeRequests.delete(s)})}requestEvent(z,R,G){const se=this.lastRequestId++,ge={id:se,type:102,channelName:z,name:R,arg:G};let Z=null;const s=new m.Emitter({onWillAddFirstListener:()=>{Z=(0,I.createCancelablePromise)(W=>this.whenInitialized()),Z.then(()=>{Z=null,this.activeRequests.add(s),this.sendRequest(ge)})},onDidRemoveLastListener:()=>{Z?(Z.cancel(),Z=null):(this.activeRequests.delete(s),this.sendRequest({id:se,type:103}))}}),d=W=>s.fire(W.data);return this.handlers.set(se,d),s.event}sendRequest(z){switch(z.type){case 100:case 102:{const R=this.send([z.type,z.id,z.channelName,z.name],z.arg);this.logger?.logOutgoing(R,z.id,0,`${u(z.type)}: ${z.channelName}.${z.name}`,z.arg);return}case 101:case 103:{const R=this.send([z.type,z.id]);this.logger?.logOutgoing(R,z.id,0,u(z.type));return}}}send(z,R=void 0){const G=new n;return f(G,z),f(G,R),this.sendBuffer(G.buffer)}sendBuffer(z){try{return this.protocol.send(z),z.byteLength}catch{return 0}}onBuffer(z){const R=new o(z),G=g(R),se=g(R),te=G[0];switch(te){case 200:return this.logger?.logIncoming(z.byteLength,0,0,i(te)),this.onResponse({type:G[0]});case 201:case 202:case 204:case 203:return this.logger?.logIncoming(z.byteLength,G[1],0,i(te),se),this.onResponse({type:G[0],id:G[1],data:se})}}onResponse(z){if(z.type===200){this.state=v.Idle,this._onDidInitialize.fire();return}this.handlers.get(z.id)?.(z)}get onDidInitializePromise(){return m.Event.toPromise(this.onDidInitialize)}whenInitialized(){return this.state===v.Idle?Promise.resolve():this.onDidInitializePromise}dispose(){this.isDisposed=!0,this.protocolListener&&(this.protocolListener.dispose(),this.protocolListener=null),(0,c.dispose)(this.activeRequests.values()),this.activeRequests.clear()}}e.ChannelClient=l,me([O.memoize],l.prototype,"onDidInitializePromise",null);class E{get connections(){const z=[];return this._connections.forEach(R=>z.push(R)),z}constructor(z){this.channels=new Map,this._connections=new Set,this._onDidAddConnection=new m.Emitter,this.onDidAddConnection=this._onDidAddConnection.event,this._onDidRemoveConnection=new m.Emitter,this.onDidRemoveConnection=this._onDidRemoveConnection.event,z(({protocol:R,onDidClientDisconnect:G})=>{m.Event.once(R.onMessage)(te=>{const ge=new o(te),Z=g(ge),s=new M(R,Z),d=new l(R);this.channels.forEach((H,ie)=>s.registerChannel(ie,H));const W={channelServer:s,channelClient:d,ctx:Z};this._connections.add(W),this._onDidAddConnection.fire(W),G(()=>{s.dispose(),d.dispose(),this._connections.delete(W),this._onDidRemoveConnection.fire(W)})})})}getChannel(z,R){const G=this;return{call(se,te,ge){let Z;if((0,L.isFunction)(R)){const d=(0,w.getRandomElement)(G.connections.filter(R));Z=d?Promise.resolve(d):m.Event.toPromise(m.Event.filter(G.onDidAddConnection,R))}else Z=R.routeCall(G,se,te);const s=Z.then(d=>d.channelClient.getChannel(z));return V(s).call(se,te,ge)},listen(se,te){if((0,L.isFunction)(R))return G.getMulticastEvent(z,R,se,te);const ge=R.routeEvent(G,se,te).then(Z=>Z.channelClient.getChannel(z));return V(ge).listen(se,te)}}}getMulticastEvent(z,R,G,se){const te=this;let ge=new c.DisposableStore;const Z=new m.Emitter({onWillAddFirstListener:()=>{ge=new c.DisposableStore;const s=new m.EventMultiplexer,d=new Map,W=ie=>{const le=ie.channelClient.getChannel(z).listen(G,se),N=s.add(le);d.set(ie,N)},H=ie=>{const ae=d.get(ie);ae&&(ae.dispose(),d.delete(ie))};te.connections.filter(R).forEach(W),m.Event.filter(te.onDidAddConnection,R)(W,void 0,ge),te.onDidRemoveConnection(H,void 0,ge),s.event(Z.fire,Z,ge),ge.add(s)},onDidRemoveLastListener:()=>{ge.dispose()}});return Z.event}registerChannel(z,R){this.channels.set(z,R),this._connections.forEach(G=>{G.channelServer.registerChannel(z,R)})}dispose(){this.channels.clear(),this._connections.clear(),this._onDidAddConnection.dispose(),this._onDidRemoveConnection.dispose()}}e.IPCServer=E;class B{constructor(z,R,G=null){const se=new n;f(se,R),z.send(se.buffer),this.channelClient=new l(z,G),this.channelServer=new M(z,R,G)}getChannel(z){return this.channelClient.getChannel(z)}registerChannel(z,R){this.channelServer.registerChannel(z,R)}dispose(){this.channelClient.dispose(),this.channelServer.dispose()}}e.IPCClient=B;function V(K){return{call(z,R,G){return K.then(se=>se.call(z,R,G))},listen(z,R){const G=new m.Relay;return K.then(se=>G.input=se.listen(z,R)),G.event}}}e.getDelayedChannel=V;function T(K){let z=!1;return{call(R,G,se){return z?K.call(R,G,se):(0,I.timeout)(0).then(()=>z=!0).then(()=>K.call(R,G,se))},listen(R,G){if(z)return K.listen(R,G);const se=new m.Relay;return(0,I.timeout)(0).then(()=>z=!0).then(()=>se.input=K.listen(R,G)),se.event}}}e.getNextTickChannel=T;class q{constructor(z){this.fn=z}routeCall(z){return this.route(z)}routeEvent(z){return this.route(z)}async route(z){for(const R of z.connections)if(await Promise.resolve(this.fn(R.ctx)))return Promise.resolve(R);return await m.Event.toPromise(z.onDidAddConnection),await this.route(z)}}e.StaticRouter=q;var J;(function(K){function z(te,ge){const Z=te,s=ge&&ge.disableMarshalling,d=new Map;for(const W in Z)G(W)&&d.set(W,m.Event.buffer(Z[W],!0));return new class{listen(W,H,ie){const ae=d.get(H);if(ae)return ae;if(se(H)){const le=Z[H];if(typeof le=="function")return le.call(Z,ie)}throw new P.ErrorNoTelemetry(`Event not found: ${H}`)}call(W,H,ie){const ae=Z[H];if(typeof ae=="function"){if(!s&&Array.isArray(ie))for(let le=0;le<ie.length;le++)ie[le]=(0,A.revive)(ie[le]);return ae.apply(Z,ie)}throw new P.ErrorNoTelemetry(`Method not found: ${H}`)}}}K.fromService=z;function R(te,ge){const Z=ge&&ge.disableMarshalling;return new Proxy({},{get(s,d){if(typeof d=="string")return ge?.properties?.has(d)?ge.properties.get(d):se(d)?function(W){return te.listen(d,W)}:G(d)?te.listen(d):async function(...W){let H;ge&&!(0,L.isUndefinedOrNull)(ge.context)?H=[ge.context,...W]:H=W;const ie=await te.call(d,H);return Z?ie:(0,A.revive)(ie)};throw new P.ErrorNoTelemetry(`Property not found: ${String(d)}`)}})}K.toService=R;function G(te){return te[0]==="o"&&te[1]==="n"&&y.isUpperAsciiLetter(te.charCodeAt(2))}function se(te){return/^onDynamic/.test(te)&&y.isUpperAsciiLetter(te.charCodeAt(9))}})(J||(e.ProxyChannel=J={}));const x=[["#2977B1","#FC802D","#34A13A","#D3282F","#9366BA"],["#8B564C","#E177C0","#7F7F7F","#BBBE3D","#2EBECD"]];function Q(K){if(Array.isArray(K))return K;if(K&&typeof K=="object"&&typeof K.toString=="function"){const z=K.toString();if(z!=="[object Object]")return z}return K}function ne(K){return Array.isArray(K)?K.map(Q):Q(K)}function ue(K,z,R,G,se,te,ge){ge=ne(ge);const Z=x[se],s=Z[G%Z.length];let d=[`%c[${K}]%c[${String(z).padStart(7," ")}]%c[len: ${String(R).padStart(5," ")}]%c${String(G).padStart(5," ")} - ${te}`,"color: darkgreen","color: grey","color: grey",`color: ${s}`];/\($/.test(te)?(d=d.concat(ge),d.push(")")):d.push(ge),console.log.apply(console,d)}class fe{constructor(z,R){this._outgoingPrefix=z,this._incomingPrefix=R,this._totalIncoming=0,this._totalOutgoing=0}logOutgoing(z,R,G,se,te){this._totalOutgoing+=z,ue(this._outgoingPrefix,this._totalOutgoing,z,R,G,se,te)}logIncoming(z,R,G,se,te){this._totalIncoming+=z,ue(this._incomingPrefix,this._totalIncoming,z,R,G,se,te)}}e.IPCLogger=fe}),define(ce[62],he([0,1,24,9,17,16,56,6,4,3,30,34,33,25]),function(oe,e,w,I,b,k,O,P,m,c,A,y,L,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Client=e.Server=void 0;class u extends t.ChannelServer{constructor(v){super({send:r=>{try{process.send?.(r.buffer.toString("base64"))}catch{}},onMessage:m.Event.fromNodeEventEmitter(process,"message",r=>b.VSBuffer.wrap(Buffer.from(r,"base64")))},v),process.once("disconnect",()=>this.dispose())}}e.Server=u;class a{constructor(v,r){this.modulePath=v,this.options=r,this.activeRequests=new Set,this.channels=new Map,this._onDidProcessExit=new m.Emitter,this.onDidProcessExit=this._onDidProcessExit.event;const _=r&&r.timeout?r.timeout:6e4;this.disposeDelayer=new I.Delayer(_),this.child=null,this._client=null}getChannel(v){const r=this;return{call(_,C,o){return r.requestPromise(v,_,C,o)},listen(_,C){return r.requestEvent(v,_,C)}}}requestPromise(v,r,_,C=k.CancellationToken.None){if(!this.disposeDelayer)return Promise.reject(new Error("disposed"));if(C.isCancellationRequested)return Promise.reject(P.canceled());this.disposeDelayer.cancel();const o=this.getCachedChannel(v),n=(0,I.createCancelablePromise)(p=>o.call(r,_,p)),h=C.onCancellationRequested(()=>n.cancel()),S=(0,c.toDisposable)(()=>n.cancel());return this.activeRequests.add(S),n.finally(()=>{h.dispose(),this.activeRequests.delete(S),this.activeRequests.size===0&&this.disposeDelayer&&this.disposeDelayer.trigger(()=>this.disposeClient())}),n}requestEvent(v,r,_){if(!this.disposeDelayer)return m.Event.None;this.disposeDelayer.cancel();let C;const o=new m.Emitter({onWillAddFirstListener:()=>{C=this.getCachedChannel(v).listen(r,_)(o.fire,o),this.activeRequests.add(C)},onDidRemoveLastListener:()=>{this.activeRequests.delete(C),C.dispose(),this.activeRequests.size===0&&this.disposeDelayer&&this.disposeDelayer.trigger(()=>this.disposeClient())}});return o.event}get client(){if(!this._client){const v=this.options&&this.options.args?this.options.args:[],r=Object.create(null);r.env={...(0,A.deepClone)(process.env),VSCODE_PARENT_PID:String(process.pid)},this.options&&this.options.env&&(r.env={...r.env,...this.options.env}),this.options&&this.options.freshExecArgv&&(r.execArgv=[]),this.options&&typeof this.options.debug=="number"&&(r.execArgv=["--nolazy","--inspect="+this.options.debug]),this.options&&typeof this.options.debugBrk=="number"&&(r.execArgv=["--nolazy","--inspect-brk="+this.options.debugBrk]),r.execArgv===void 0&&(r.execArgv=process.execArgv.filter(D=>!/^--inspect(-brk)?=/.test(D)).filter(D=>!D.startsWith("--vscode-"))),(0,L.removeDangerousEnvVariables)(r.env),this.child=(0,w.fork)(this.modulePath,v,r);const _=new m.Emitter;m.Event.fromNodeEventEmitter(this.child,"message",D=>D)(D=>{if((0,O.isRemoteConsoleLog)(D)){(0,O.log)(D,`IPC Library: ${this.options.serverName}`);return}_.fire(b.VSBuffer.wrap(Buffer.from(D,"base64")))});const o=this.options.useQueue?(0,y.createQueuedSender)(this.child):this.child,n=D=>this.child&&this.child.connected&&o.send(D.buffer.toString("base64")),h=_.event,S={send:n,onMessage:h};this._client=new t.ChannelClient(S);const p=()=>this.disposeClient();process.once("exit",p),this.child.on("error",D=>console.warn('IPC "'+this.options.serverName+'" errored with '+D)),this.child.on("exit",(D,f)=>{process.removeListener("exit",p),this.activeRequests.forEach(g=>(0,c.dispose)(g)),this.activeRequests.clear(),D!==0&&f!=="SIGTERM"&&console.warn('IPC "'+this.options.serverName+'" crashed with exit code '+D+" and signal "+f),this.disposeDelayer?.cancel(),this.disposeClient(),this._onDidProcessExit.fire({code:D,signal:f})})}return this._client}getCachedChannel(v){let r=this.channels.get(v);return r||(r=this.client.getChannel(v),this.channels.set(v,r)),r}disposeClient(){this._client&&(this.child&&(this.child.kill(),this.child=null),this._client=null,this.channels.clear())}dispose(){this._onDidProcessExit.dispose(),this.disposeDelayer?.cancel(),this.disposeDelayer=void 0,this.disposeClient(),this.activeRequests.clear()}}e.Client=a}),define(ce[63],he([0,1,31,17,25,4,8,21]),function(oe,e,w,I,b,k,O,P){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.once=e.Server=void 0;class m{constructor(L){this.port=L,this.onMessage=k.Event.fromNodeEventEmitter(this.port,"message",t=>I.VSBuffer.wrap(t.data)),L.start()}send(L){this.port.postMessage(L.buffer)}disconnect(){this.port.close()}}class c extends b.IPCServer{static getOnDidClientConnect(L){(0,O.assertType)((0,w.isUtilityProcess)(process),"Electron Utility Process");const t=new k.Emitter;return process.parentPort.on("message",u=>{if(L?.handledClientConnection(u))return;const a=(0,P.firstOrDefault)(u.ports);a&&t.fire(a)}),k.Event.map(t.event,u=>({protocol:new m(u),onDidClientDisconnect:k.Event.fromNodeEventEmitter(u,"close")}))}constructor(L){super(c.getOnDidClientConnect(L))}}e.Server=c;function A(y,L,t){const u=a=>{a.data===L&&(y.removeListener("message",u),t())};y.on("message",u)}e.once=A}),define(ce[64],he([13,10]),function(oe,e){return oe.create("vs/platform/contextkey/common/contextkey",e)}),define(ce[65],he([13,10]),function(oe,e){return oe.create("vs/platform/contextkey/common/scanner",e)}),define(ce[66],he([13,10]),function(oe,e){return oe.create("vs/platform/environment/node/argv",e)}),define(ce[67],he([13,10]),function(oe,e){return oe.create("vs/platform/files/common/files",e)}),define(ce[68],he([13,10]),function(oe,e){return oe.create("vs/platform/terminal/node/ptyService",e)}),define(ce[69],he([13,10]),function(oe,e){return oe.create("vs/platform/terminal/node/terminalProcess",e)}),define(ce[70],he([0,1,6,65]),function(oe,e,w,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Scanner=e.TokenType=void 0;var b;(function(c){c[c.LParen=0]="LParen",c[c.RParen=1]="RParen",c[c.Neg=2]="Neg",c[c.Eq=3]="Eq",c[c.NotEq=4]="NotEq",c[c.Lt=5]="Lt",c[c.LtEq=6]="LtEq",c[c.Gt=7]="Gt",c[c.GtEq=8]="GtEq",c[c.RegexOp=9]="RegexOp",c[c.RegexStr=10]="RegexStr",c[c.True=11]="True",c[c.False=12]="False",c[c.In=13]="In",c[c.Not=14]="Not",c[c.And=15]="And",c[c.Or=16]="Or",c[c.Str=17]="Str",c[c.QuotedStr=18]="QuotedStr",c[c.Error=19]="Error",c[c.EOF=20]="EOF"})(b||(e.TokenType=b={}));function k(...c){switch(c.length){case 1:return(0,I.localize)(0,null,c[0]);case 2:return(0,I.localize)(1,null,c[0],c[1]);case 3:return(0,I.localize)(2,null,c[0],c[1],c[2]);default:return}}const O=(0,I.localize)(3,null),P=(0,I.localize)(4,null);class m{constructor(){this._input="",this._start=0,this._current=0,this._tokens=[],this._errors=[],this.stringRe=/[a-zA-Z0-9_<>\-\./\\:\*\?\+\[\]\^,#@;"%\$\p{L}-]+/uy}static getLexeme(A){switch(A.type){case 0:return"(";case 1:return")";case 2:return"!";case 3:return A.isTripleEq?"===":"==";case 4:return A.isTripleEq?"!==":"!=";case 5:return"<";case 6:return"<=";case 7:return">=";case 8:return">=";case 9:return"=~";case 10:return A.lexeme;case 11:return"true";case 12:return"false";case 13:return"in";case 14:return"not";case 15:return"&&";case 16:return"||";case 17:return A.lexeme;case 18:return A.lexeme;case 19:return A.lexeme;case 20:return"EOF";default:throw(0,w.illegalState)(`unhandled token type: ${JSON.stringify(A)}; have you forgotten to add a case?`)}}static{this._regexFlags=new Set(["i","g","s","m","y","u"].map(A=>A.charCodeAt(0)))}static{this._keywords=new Map([["not",14],["in",13],["false",12],["true",11]])}get errors(){return this._errors}reset(A){return this._input=A,this._start=0,this._current=0,this._tokens=[],this._errors=[],this}scan(){for(;!this._isAtEnd();)switch(this._start=this._current,this._advance()){case 40:this._addToken(0);break;case 41:this._addToken(1);break;case 33:if(this._match(61)){const y=this._match(61);this._tokens.push({type:4,offset:this._start,isTripleEq:y})}else this._addToken(2);break;case 39:this._quotedString();break;case 47:this._regex();break;case 61:if(this._match(61)){const y=this._match(61);this._tokens.push({type:3,offset:this._start,isTripleEq:y})}else this._match(126)?this._addToken(9):this._error(k("==","=~"));break;case 60:this._addToken(this._match(61)?6:5);break;case 62:this._addToken(this._match(61)?8:7);break;case 38:this._match(38)?this._addToken(15):this._error(k("&&"));break;case 124:this._match(124)?this._addToken(16):this._error(k("||"));break;case 32:case 13:case 9:case 10:case 160:break;default:this._string()}return this._start=this._current,this._addToken(20),Array.from(this._tokens)}_match(A){return this._isAtEnd()||this._input.charCodeAt(this._current)!==A?!1:(this._current++,!0)}_advance(){return this._input.charCodeAt(this._current++)}_peek(){return this._isAtEnd()?0:this._input.charCodeAt(this._current)}_addToken(A){this._tokens.push({type:A,offset:this._start})}_error(A){const y=this._start,L=this._input.substring(this._start,this._current),t={type:19,offset:this._start,lexeme:L};this._errors.push({offset:y,lexeme:L,additionalInfo:A}),this._tokens.push(t)}_string(){this.stringRe.lastIndex=this._start;const A=this.stringRe.exec(this._input);if(A){this._current=this._start+A[0].length;const y=this._input.substring(this._start,this._current),L=m._keywords.get(y);L?this._addToken(L):this._tokens.push({type:17,lexeme:y,offset:this._start})}}_quotedString(){for(;this._peek()!==39&&!this._isAtEnd();)this._advance();if(this._isAtEnd()){this._error(O);return}this._advance(),this._tokens.push({type:18,lexeme:this._input.substring(this._start+1,this._current-1),offset:this._start+1})}_regex(){let A=this._current,y=!1,L=!1;for(;;){if(A>=this._input.length){this._current=A,this._error(P);return}const u=this._input.charCodeAt(A);if(y)y=!1;else if(u===47&&!L){A++;break}else u===91?L=!0:u===92?y=!0:u===93&&(L=!1);A++}for(;A<this._input.length&&m._regexFlags.has(this._input.charCodeAt(A));)A++;this._current=A;const t=this._input.substring(this._start,this._current);this._tokens.push({type:10,lexeme:t,offset:this._start})}_isAtEnd(){return this._current>=this._input.length}}e.Scanner=m}),define(ce[71],he([0,1,52,14,18,7,15,22,5]),function(oe,e,w,I,b,k,O,P,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.parseDebugParams=e.parseExtensionHostDebugPort=e.AbstractNativeEnvironmentService=e.EXTENSION_IDENTIFIER_WITH_LOG_REGEX=void 0,e.EXTENSION_IDENTIFIER_WITH_LOG_REGEX=/^([^.]+\..+):(.+)$/;class c{get appRoot(){return(0,k.dirname)(b.FileAccess.asFileUri("").fsPath)}get userHome(){return m.URI.file(this.paths.homeDir)}get userDataPath(){return this.paths.userDataDir}get appSettingsHome(){return m.URI.file((0,k.join)(this.userDataPath,"User"))}get tmpDir(){return m.URI.file(this.paths.tmpDir)}get cacheHome(){return m.URI.file(this.userDataPath)}get stateResource(){return(0,P.joinPath)(this.appSettingsHome,"globalStorage","storage.json")}get userRoamingDataHome(){return this.appSettingsHome.with({scheme:b.Schemas.vscodeUserData})}get userDataSyncHome(){return(0,P.joinPath)(this.appSettingsHome,"sync")}get logsHome(){if(!this.args.logsPath){const t=(0,w.toLocalISOString)(new Date).replace(/-|:|\.\d+Z$/g,"");this.args.logsPath=(0,k.join)(this.userDataPath,"logs",t)}return m.URI.file(this.args.logsPath)}get sync(){return this.args.sync}get machineSettingsResource(){return(0,P.joinPath)(m.URI.file((0,k.join)(this.userDataPath,"Machine")),"settings.json")}get workspaceStorageHome(){return(0,P.joinPath)(this.appSettingsHome,"workspaceStorage")}get localHistoryHome(){return(0,P.joinPath)(this.appSettingsHome,"History")}get keyboardLayoutResource(){return(0,P.joinPath)(this.userRoamingDataHome,"keyboardLayout.json")}get argvResource(){const t=O.env.VSCODE_PORTABLE;return t?m.URI.file((0,k.join)(t,"argv.json")):(0,P.joinPath)(this.userHome,this.productService.dataFolderName,"argv.json")}get isExtensionDevelopment(){return!!this.args.extensionDevelopmentPath}get untitledWorkspacesHome(){return m.URI.file((0,k.join)(this.userDataPath,"Workspaces"))}get builtinExtensionsPath(){const t=this.args["builtin-extensions-dir"];return t?(0,k.resolve)(t):(0,k.normalize)((0,k.join)(b.FileAccess.asFileUri("").fsPath,"..","extensions"))}get extensionsDownloadLocation(){const t=this.args["extensions-download-dir"];return t?m.URI.file((0,k.resolve)(t)):m.URI.file((0,k.join)(this.userDataPath,"CachedExtensionVSIXs"))}get extensionsPath(){const t=this.args["extensions-dir"];if(t)return(0,k.resolve)(t);const u=O.env.ADS_EXTENSIONS||O.env.VSCODE_EXTENSIONS;if(u)return u;const a=O.env.VSCODE_PORTABLE;return a?(0,k.join)(a,"extensions"):(0,P.joinPath)(this.userHome,this.productService.dataFolderName,"extensions").fsPath}get extensionDevelopmentLocationURI(){const t=this.args.extensionDevelopmentPath;if(Array.isArray(t))return t.map(u=>/^[^:/?#]+?:\/\//.test(u)?m.URI.parse(u):m.URI.file((0,k.normalize)(u)))}get extensionDevelopmentKind(){return this.args.extensionDevelopmentKind?.map(t=>t==="ui"||t==="workspace"||t==="web"?t:"workspace")}get extensionTestsLocationURI(){const t=this.args.extensionTestsPath;if(t)return/^[^:/?#]+?:\/\//.test(t)?m.URI.parse(t):m.URI.file((0,k.normalize)(t))}get disableExtensions(){if(this.args["disable-extensions"])return!0;const t=this.args["disable-extension"];if(t){if(typeof t=="string")return[t];if(Array.isArray(t)&&t.length>0)return t}return!1}get debugExtensionHost(){return A(this.args,this.isBuilt)}get debugRenderer(){return!!this.args.debugRenderer}get isBuilt(){return!O.env.VSCODE_DEV}get verbose(){return!!this.args.verbose}get logLevel(){return this.args.log?.find(t=>!e.EXTENSION_IDENTIFIER_WITH_LOG_REGEX.test(t))}get extensionLogLevel(){const t=[];for(const u of this.args.log||[]){const a=e.EXTENSION_IDENTIFIER_WITH_LOG_REGEX.exec(u);a&&a[1]&&a[2]&&t.push([a[1],a[2]])}return t.length?t:void 0}get serviceMachineIdResource(){return(0,P.joinPath)(m.URI.file(this.userDataPath),"machineid")}get crashReporterId(){return this.args["crash-reporter-id"]}get crashReporterDirectory(){return this.args["crash-reporter-directory"]}get disableTelemetry(){return!!this.args["disable-telemetry"]}get disableWorkspaceTrust(){return!!this.args["disable-workspace-trust"]}get disableKeytar(){return!!this.args["disable-keytar"]}get policyFile(){if(this.args["__enable-file-policy"]){const t=O.env.VSCODE_PORTABLE;return t?m.URI.file((0,k.join)(t,"policy.json")):(0,P.joinPath)(this.userHome,this.productService.dataFolderName,"policy.json")}}get continueOn(){return this.args.continueOn}set continueOn(t){this.args.continueOn=t}get args(){return this._args}constructor(t,u,a){this._args=t,this.paths=u,this.productService=a,this.editSessionId=this.args.editSessionId}}e.AbstractNativeEnvironmentService=c,me([I.memoize],c.prototype,"appRoot",null),me([I.memoize],c.prototype,"userHome",null),me([I.memoize],c.prototype,"userDataPath",null),me([I.memoize],c.prototype,"appSettingsHome",null),me([I.memoize],c.prototype,"tmpDir",null),me([I.memoize],c.prototype,"cacheHome",null),me([I.memoize],c.prototype,"stateResource",null),me([I.memoize],c.prototype,"userRoamingDataHome",null),me([I.memoize],c.prototype,"userDataSyncHome",null),me([I.memoize],c.prototype,"sync",null),me([I.memoize],c.prototype,"machineSettingsResource",null),me([I.memoize],c.prototype,"workspaceStorageHome",null),me([I.memoize],c.prototype,"localHistoryHome",null),me([I.memoize],c.prototype,"keyboardLayoutResource",null),me([I.memoize],c.prototype,"argvResource",null),me([I.memoize],c.prototype,"isExtensionDevelopment",null),me([I.memoize],c.prototype,"untitledWorkspacesHome",null),me([I.memoize],c.prototype,"builtinExtensionsPath",null),me([I.memoize],c.prototype,"extensionsPath",null),me([I.memoize],c.prototype,"extensionDevelopmentLocationURI",null),me([I.memoize],c.prototype,"extensionDevelopmentKind",null),me([I.memoize],c.prototype,"extensionTestsLocationURI",null),me([I.memoize],c.prototype,"debugExtensionHost",null),me([I.memoize],c.prototype,"logLevel",null),me([I.memoize],c.prototype,"extensionLogLevel",null),me([I.memoize],c.prototype,"serviceMachineIdResource",null),me([I.memoize],c.prototype,"disableTelemetry",null),me([I.memoize],c.prototype,"disableWorkspaceTrust",null),me([I.memoize],c.prototype,"disableKeytar",null),me([I.memoize],c.prototype,"policyFile",null);function A(L,t){return y(L["inspect-extensions"],L["inspect-brk-extensions"],5870,t,L.debugId,L.extensionEnvironment)}e.parseExtensionHostDebugPort=A;function y(L,t,u,a,i,v){const _=Number(t||L)||(a?null:u),C=_?!!t:!1;let o;if(v)try{o=JSON.parse(v)}catch{}return{port:_,break:C,debugId:i,env:o}}e.parseDebugParams=y}),define(ce[72],he([0,1,102,2,66]),function(oe,e,w,I,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.buildVersionMessage=e.buildHelpMessage=e.formatOptions=e.parseArgs=e.OPTIONS=e.NATIVE_CLI_COMMANDS=void 0;const k={o:(0,b.localize)(0,null),e:(0,b.localize)(1,null),t:(0,b.localize)(2,null)};e.NATIVE_CLI_COMMANDS=["tunnel","serve-web"],e.OPTIONS={tunnel:{type:"subcommand",description:"Make the current machine accessible from vscode.dev or other machines through a secure tunnel",options:{"cli-data-dir":{type:"string",args:"dir",description:(0,b.localize)(3,null)},"disable-telemetry":{type:"boolean"},"telemetry-level":{type:"string"},user:{type:"subcommand",options:{login:{type:"subcommand",options:{provider:{type:"string"},"access-token":{type:"string"}}}}}}},"serve-web":{type:"subcommand",description:"Make the current machine accessible from vscode.dev or other machines through a secure tunnel",options:{"cli-data-dir":{type:"string",args:"dir",description:(0,b.localize)(4,null)},"disable-telemetry":{type:"boolean"},"telemetry-level":{type:"string"}}},diff:{type:"boolean",cat:"o",alias:"d",args:["file","file"],description:(0,b.localize)(5,null)},merge:{type:"boolean",cat:"o",alias:"m",args:["path1","path2","base","result"],description:(0,b.localize)(6,null)},add:{type:"boolean",cat:"o",alias:"a",args:"folder",description:(0,b.localize)(7,null)},goto:{type:"boolean",cat:"o",alias:"g",args:"file:line[:character]",description:(0,b.localize)(8,null)},"new-window":{type:"boolean",cat:"o",alias:"n",description:(0,b.localize)(9,null)},"reuse-window":{type:"boolean",cat:"o",alias:"r",description:(0,b.localize)(10,null)},wait:{type:"boolean",cat:"o",alias:"w",description:(0,b.localize)(11,null)},waitMarkerFilePath:{type:"string"},locale:{type:"string",cat:"o",args:"locale",description:(0,b.localize)(12,null)},"user-data-dir":{type:"string",cat:"o",args:"dir",description:(0,b.localize)(13,null)},profile:{type:"string",cat:"o",args:"profileName",description:(0,b.localize)(14,null)},help:{type:"boolean",cat:"o",alias:"h",description:(0,b.localize)(15,null)},"extensions-dir":{type:"string",deprecates:["extensionHomePath"],cat:"e",args:"dir",description:(0,b.localize)(16,null)},"extensions-download-dir":{type:"string"},"builtin-extensions-dir":{type:"string"},"list-extensions":{type:"boolean",cat:"e",description:(0,b.localize)(17,null)},"show-versions":{type:"boolean",cat:"e",description:(0,b.localize)(18,null)},category:{type:"string",allowEmptyValue:!0,cat:"e",description:(0,b.localize)(19,null),args:"category"},"install-extension":{type:"string[]",cat:"e",args:"ext-id | path",description:(0,b.localize)(20,null)},"pre-release":{type:"boolean",cat:"e",description:(0,b.localize)(21,null)},"uninstall-extension":{type:"string[]",cat:"e",args:"ext-id",description:(0,b.localize)(22,null)},"enable-proposed-api":{type:"string[]",allowEmptyValue:!0,cat:"e",args:"ext-id",description:(0,b.localize)(23,null)},version:{type:"boolean",cat:"t",alias:"v",description:(0,b.localize)(24,null)},verbose:{type:"boolean",cat:"t",global:!0,description:(0,b.localize)(25,null)},log:{type:"string[]",cat:"t",args:"level",global:!0,description:(0,b.localize)(26,null)},status:{type:"boolean",alias:"s",cat:"t",description:(0,b.localize)(27,null)},"prof-startup":{type:"boolean",cat:"t",description:(0,b.localize)(28,null)},"prof-append-timers":{type:"string"},"prof-duration-markers":{type:"string[]"},"prof-duration-markers-file":{type:"string"},"no-cached-data":{type:"boolean"},"prof-startup-prefix":{type:"string"},"prof-v8-extensions":{type:"boolean"},"disable-extensions":{type:"boolean",deprecates:["disableExtensions"],cat:"t",description:(0,b.localize)(29,null)},"disable-extension":{type:"string[]",cat:"t",args:"ext-id",description:(0,b.localize)(30,null)},sync:{type:"string",cat:"t",description:(0,b.localize)(31,null),args:["on | off"]},"inspect-extensions":{type:"string",allowEmptyValue:!0,deprecates:["debugPluginHost"],args:"port",cat:"t",description:(0,b.localize)(32,null)},"inspect-brk-extensions":{type:"string",allowEmptyValue:!0,deprecates:["debugBrkPluginHost"],args:"port",cat:"t",description:(0,b.localize)(33,null)},"disable-gpu":{type:"boolean",cat:"t",description:(0,b.localize)(34,null)},"disable-chromium-sandbox":{type:"boolean",cat:"t",description:(0,b.localize)(35,null)},telemetry:{type:"boolean",cat:"t",description:(0,b.localize)(36,null)},remote:{type:"string",allowEmptyValue:!0},"folder-uri":{type:"string[]",cat:"o",args:"uri"},"file-uri":{type:"string[]",cat:"o",args:"uri"},"locate-extension":{type:"string[]"},extensionDevelopmentPath:{type:"string[]"},extensionDevelopmentKind:{type:"string[]"},extensionTestsPath:{type:"string"},extensionEnvironment:{type:"string"},debugId:{type:"string"},debugRenderer:{type:"boolean"},"inspect-ptyhost":{type:"string",allowEmptyValue:!0},"inspect-brk-ptyhost":{type:"string",allowEmptyValue:!0},"inspect-search":{type:"string",deprecates:["debugSearch"],allowEmptyValue:!0},"inspect-brk-search":{type:"string",deprecates:["debugBrkSearch"],allowEmptyValue:!0},"inspect-sharedprocess":{type:"string",allowEmptyValue:!0},"inspect-brk-sharedprocess":{type:"string",allowEmptyValue:!0},"export-default-configuration":{type:"string"},"install-source":{type:"string"},"enable-smoke-test-driver":{type:"boolean"},logExtensionHostCommunication:{type:"boolean"},"skip-release-notes":{type:"boolean"},"skip-welcome":{type:"boolean"},"disable-telemetry":{type:"boolean"},"disable-updates":{type:"boolean"},"disable-keytar":{type:"boolean"},"password-store":{type:"string"},"disable-workspace-trust":{type:"boolean"},"disable-crash-reporter":{type:"boolean"},"crash-reporter-directory":{type:"string"},"crash-reporter-id":{type:"string"},"skip-add-to-recently-opened":{type:"boolean"},"unity-launch":{type:"boolean"},"open-url":{type:"boolean"},"file-write":{type:"boolean"},"file-chmod":{type:"boolean"},"install-builtin-extension":{type:"string[]"},force:{type:"boolean"},"do-not-sync":{type:"boolean"},trace:{type:"boolean"},"trace-category-filter":{type:"string"},"trace-options":{type:"string"},"force-user-env":{type:"boolean"},"force-disable-user-env":{type:"boolean"},"open-devtools":{type:"boolean"},"disable-gpu-sandbox":{type:"boolean"},logsPath:{type:"string"},"__enable-file-policy":{type:"boolean"},editSessionId:{type:"string"},continueOn:{type:"string"},"locate-shell-integration-path":{type:"string",args:["bash","pwsh","zsh","fish"]},"enable-coi":{type:"boolean"},aad:{type:"boolean",cat:"o",description:(0,b.localize)(37,null)},applicationName:{type:"string",alias:"A",cat:"o",allowEmptyValue:!0,description:(0,b.localize)(38,null)},authenticationType:{type:"string",alias:"T",cat:"o",allowEmptyValue:!0,deprecates:["aad","integrated"],description:(0,b.localize)(39,null)},command:{type:"string",alias:"c",cat:"o",args:"command-name",allowEmptyValue:!0,description:(0,b.localize)(40,null)},connectionProperties:{type:"string",alias:"Z",cat:"o",allowEmptyValue:!0,description:(0,b.localize)(41,null)},database:{type:"string",alias:"D",cat:"o",args:"database",allowEmptyValue:!0,description:(0,b.localize)(42,null)},integrated:{type:"boolean",alias:"E",cat:"o",description:(0,b.localize)(43,null)},provider:{type:"string",alias:"P",cat:"o",allowEmptyValue:!0,description:(0,b.localize)(44,null)},server:{type:"string",alias:"S",cat:"o",args:"server",allowEmptyValue:!0,description:(0,b.localize)(45,null)},showDashboard:{type:"boolean",cat:"o",description:(0,b.localize)(46,null)},user:{type:"string",alias:"U",cat:"o",args:"user-name",allowEmptyValue:!0,description:(0,b.localize)(47,null)},"no-proxy-server":{type:"boolean"},"no-sandbox":{type:"boolean",alias:"sandbox"},"proxy-server":{type:"string"},"proxy-bypass-list":{type:"string"},"proxy-pac-url":{type:"string"},"js-flags":{type:"string"},inspect:{type:"string",allowEmptyValue:!0},"inspect-brk":{type:"string",allowEmptyValue:!0},nolazy:{type:"boolean"},"force-device-scale-factor":{type:"string"},"force-renderer-accessibility":{type:"boolean"},"ignore-certificate-errors":{type:"boolean"},"allow-insecure-localhost":{type:"boolean"},"log-net-log":{type:"string"},vmodule:{type:"string"},_urls:{type:"string[]"},"disable-dev-shm-usage":{type:"boolean"},"profile-temp":{type:"boolean"},_:{type:"string[]"}};const O={onUnknownOption:()=>{},onMultipleValues:()=>{},onEmptyValue:()=>{},onDeprecatedOption:()=>{}};function P(a,i,v=O){const r=a.find(f=>f.length>0&&f[0]!=="-"),_={},C=["_"],o=[],n={};let h;for(const f in i){const g=i[f];g.type==="subcommand"?f===r&&(h=g):(g.alias&&(_[f]=g.alias),g.type==="string"||g.type==="string[]"?(C.push(f),g.deprecates&&C.push(...g.deprecates)):g.type==="boolean"&&(o.push(f),g.deprecates&&o.push(...g.deprecates)),g.global&&(n[f]=g))}if(h&&r){const f=n;for(const l in h.options)f[l]=h.options[l];const g=a.filter(l=>l!==r),M=v.getSubcommandReporter?v.getSubcommandReporter(r):void 0,F=P(g,f,M);return{[r]:F,_:[]}}const S=w(a,{string:C,boolean:o,alias:_}),p={},D=S;p._=S._.map(f=>String(f)).filter(f=>f.length>0),delete D._;for(const f in i){const g=i[f];if(g.type==="subcommand")continue;g.alias&&delete D[g.alias];let M=D[f];if(g.deprecates)for(const F of g.deprecates)D.hasOwnProperty(F)&&(M||(M=D[F],M&&v.onDeprecatedOption(F,g.deprecationMessage||(0,b.localize)(48,null,f))),delete D[F]);if(typeof M<"u"){if(g.type==="string[]"){if(Array.isArray(M)||(M=[M]),!g.allowEmptyValue){const F=M.filter(l=>l.length>0);F.length!==M.length&&(v.onEmptyValue(f),M=F.length>0?F:void 0)}}else g.type==="string"&&(Array.isArray(M)?(M=M.pop(),v.onMultipleValues(f,M)):!M&&!g.allowEmptyValue&&(v.onEmptyValue(f),M=void 0));p[f]=M,g.deprecationMessage&&v.onDeprecatedOption(f,g.deprecationMessage)}delete D[f]}for(const f in D)v.onUnknownOption(f);return p}e.parseArgs=P;function m(a,i){let v="";return i.args&&(Array.isArray(i.args)?v=` <${i.args.join("> <")}>`:v=` <${i.args}>`),i.alias?`-${i.alias} --${a}${v}`:`--${a}${v}`}function c(a,i){const v=[];for(const r in a){const _=a[r],C=m(r,_);v.push([C,_.description])}return A(v,i)}e.formatOptions=c;function A(a,i){const r=a.reduce((o,n)=>Math.max(o,n[0].length),12)+2+1;if(i-r<25)return a.reduce((o,n)=>o.concat([`  ${n[0]}`,`      ${n[1]}`]),[]);const _=i-r-1,C=[];for(const o of a){const n=o[0],h=L(o[1],_),S=y(r-n.length-2);C.push("  "+n+S+h[0]);for(let p=1;p<h.length;p++)C.push(y(r)+h[p])}return C}function y(a){return" ".repeat(a)}function L(a,i){const v=[];for(;a.length;){const r=a.length<i?a.length:a.lastIndexOf(" ",i),_=a.slice(0,r).trim();a=a.slice(r),v.push(_)}return v}function t(a,i,v,r,_){const C=process.stdout.isTTY&&process.stdout.columns||80,o=_?.noInputFiles!==!0?`[${(0,b.localize)(49,null)}...]`:"",n=[`${a} ${v}`];n.push(""),n.push(`${(0,b.localize)(50,null)}: ${i} [${(0,b.localize)(51,null)}]${o}`),n.push(""),_?.noPipe!==!0&&(I.isWindows?n.push((0,b.localize)(52,null,i)):n.push((0,b.localize)(53,null,i)),n.push(""));const h={},S=[];for(const p in r){const D=r[p];if(D.type==="subcommand")D.description&&S.push({command:p,description:D.description});else if(D.description&&D.cat){let f=h[D.cat];f||(h[D.cat]=f={}),f[p]=D}}for(const p in h){const D=p,f=h[D];f&&(n.push(k[D]),n.push(...c(f,C)),n.push(""))}return S.length&&(n.push((0,b.localize)(54,null)),n.push(...A(S.map(p=>[p.command,p.description]),C)),n.push("")),n.join(`
`)}e.buildHelpMessage=t;function u(a,i){return`${a||(0,b.localize)(55,null)}
${i||(0,b.localize)(56,null)}
${process.arch}`}e.buildVersionMessage=u}),function(){"use strict";function oe(e,w,I){function b(O,P){const m=k(O,P),c=[m];return e.isAbsolute(m)||c.unshift(I),e.resolve(...c)}function k(O,P){process.env.VSCODE_DEV&&(P="code-oss-dev");const m=process.env.VSCODE_PORTABLE;if(m)return e.join(m,"user-data");let c=process.env.VSCODE_APPDATA;if(c)return e.join(c,P);const A=O["user-data-dir"];if(A)return A;switch(process.platform){case"win32":if(c=process.env.APPDATA,!c){const y=process.env.USERPROFILE;if(typeof y!="string")throw new Error("Windows: Unexpected undefined %USERPROFILE% environment variable");c=e.join(y,"AppData","Roaming")}break;case"darwin":c=e.join(w.homedir(),"Library","Application Support");break;case"linux":c=process.env.XDG_CONFIG_HOME||e.join(w.homedir(),".config");break;default:throw new Error("Platform not supported")}return e.join(c,"azuredatastudio")}return{getUserDataPath:b}}if(typeof define=="function")define(ce[73],he([74,19,15]),function(e,w,I){return oe(e,w,I.cwd())});else if(typeof module=="object"&&typeof module.exports=="object"){const e=require("path"),w=require("os");module.exports=oe(e,w,process.env.VSCODE_CWD||process.cwd())}else throw new Error("Unknown context")}(),define(ce[75],he([0,1,19,71,73]),function(oe,e,w,I,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.parseSharedProcessDebugPort=e.parsePtyHostDebugPort=e.NativeEnvironmentService=void 0;class k extends I.AbstractNativeEnvironmentService{constructor(c,A){super(c,{homeDir:(0,w.homedir)(),tmpDir:(0,w.tmpdir)(),userDataDir:(0,b.getUserDataPath)(c,A.nameShort)},A)}}e.NativeEnvironmentService=k;function O(m,c){return(0,I.parseDebugParams)(m["inspect-ptyhost"],m["inspect-brk-ptyhost"],5877,c,m.extensionEnvironment)}e.parsePtyHostDebugPort=O;function P(m,c){return(0,I.parseDebugParams)(m["inspect-sharedprocess"],m["inspect-brk-sharedprocess"],5879,c,m.extensionEnvironment)}e.parseSharedProcessDebugPort=P}),define(ce[20],he([0,1]),function(oe,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.refineServiceDecorator=e.createDecorator=e.IInstantiationService=e._util=void 0;var w;(function(O){O.serviceIds=new Map,O.DI_TARGET="$di$target",O.DI_DEPENDENCIES="$di$dependencies";function P(m){return m[O.DI_DEPENDENCIES]||[]}O.getServiceDependencies=P})(w||(e._util=w={})),e.IInstantiationService=b("instantiationService");function I(O,P,m){P[w.DI_TARGET]===P?P[w.DI_DEPENDENCIES].push({id:O,index:m}):(P[w.DI_DEPENDENCIES]=[{id:O,index:m}],P[w.DI_TARGET]=P)}function b(O){if(w.serviceIds.has(O))return w.serviceIds.get(O);const P=function(m,c,A){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");I(P,m,A)};return P.toString=()=>O,w.serviceIds.set(O,P),P}e.createDecorator=b;function k(O){return O}e.refineServiceDecorator=k}),define(ce[35],he([0,1,2,12,70,20,64,6]),function(oe,e,w,I,b,k,O,P){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.implies=e.IContextKeyService=e.RawContextKey=e.ContextKeyOrExpr=e.ContextKeyAndExpr=e.ContextKeyNotRegexExpr=e.ContextKeyRegexExpr=e.ContextKeySmallerEqualsExpr=e.ContextKeySmallerExpr=e.ContextKeyGreaterEqualsExpr=e.ContextKeyGreaterExpr=e.ContextKeyNotExpr=e.ContextKeyNotEqualsExpr=e.ContextKeyNotInExpr=e.ContextKeyInExpr=e.ContextKeyEqualsExpr=e.ContextKeyDefinedExpr=e.ContextKeyTrueExpr=e.ContextKeyFalseExpr=e.expressionsAreEqualWithConstantSubstitution=e.validateWhenClauses=e.ContextKeyExpr=e.Parser=e.ContextKeyExprType=e.setConstant=void 0;const m=new Map;m.set("false",!1),m.set("true",!0),m.set("isMac",w.isMacintosh),m.set("isLinux",w.isLinux),m.set("isWindows",w.isWindows),m.set("isWeb",w.isWeb),m.set("isMacNative",w.isMacintosh&&!w.isWeb),m.set("isEdge",w.isEdge),m.set("isFirefox",w.isFirefox),m.set("isChrome",w.isChrome),m.set("isSafari",w.isSafari);function c(Z,s){if(m.get(Z)!==void 0)throw(0,P.illegalArgument)("contextkey.setConstant(k, v) invoked with already set constant `k`");m.set(Z,s)}e.setConstant=c;const A=Object.prototype.hasOwnProperty;var y;(function(Z){Z[Z.False=0]="False",Z[Z.True=1]="True",Z[Z.Defined=2]="Defined",Z[Z.Not=3]="Not",Z[Z.Equals=4]="Equals",Z[Z.NotEquals=5]="NotEquals",Z[Z.And=6]="And",Z[Z.Regex=7]="Regex",Z[Z.NotRegex=8]="NotRegex",Z[Z.Or=9]="Or",Z[Z.In=10]="In",Z[Z.NotIn=11]="NotIn",Z[Z.Greater=12]="Greater",Z[Z.GreaterEquals=13]="GreaterEquals",Z[Z.Smaller=14]="Smaller",Z[Z.SmallerEquals=15]="SmallerEquals"})(y||(e.ContextKeyExprType=y={}));const L={regexParsingWithErrorRecovery:!0},t=(0,O.localize)(0,null),u=(0,O.localize)(1,null),a=(0,O.localize)(2,null),i=(0,O.localize)(3,null),v=(0,O.localize)(4,null),r=(0,O.localize)(5,null),_=(0,O.localize)(6,null),C=(0,O.localize)(7,null);class o{static{this._parseError=new Error}get lexingErrors(){return this._scanner.errors}get parsingErrors(){return this._parsingErrors}constructor(s=L){this._config=s,this._scanner=new b.Scanner,this._tokens=[],this._current=0,this._parsingErrors=[],this._flagsGYRe=/g|y/g}parse(s){if(s===""){this._parsingErrors.push({message:t,offset:0,lexeme:"",additionalInfo:u});return}this._tokens=this._scanner.reset(s).scan(),this._current=0,this._parsingErrors=[];try{const d=this._expr();if(!this._isAtEnd()){const W=this._peek(),H=W.type===17?r:void 0;throw this._parsingErrors.push({message:v,offset:W.offset,lexeme:b.Scanner.getLexeme(W),additionalInfo:H}),o._parseError}return d}catch(d){if(d!==o._parseError)throw d;return}}_expr(){return this._or()}_or(){const s=[this._and()];for(;this._matchOne(16);){const d=this._and();s.push(d)}return s.length===1?s[0]:n.or(...s)}_and(){const s=[this._term()];for(;this._matchOne(15);){const d=this._term();s.push(d)}return s.length===1?s[0]:n.and(...s)}_term(){if(this._matchOne(2)){const s=this._peek();switch(s.type){case 11:return this._advance(),D.INSTANCE;case 12:return this._advance(),f.INSTANCE;case 0:{this._advance();const d=this._expr();return this._consume(1,i),d?.negate()}case 17:return this._advance(),B.create(s.lexeme);default:throw this._errExpectedButGot("KEY | true | false | '(' expression ')'",s)}}return this._primary()}_primary(){const s=this._peek();switch(s.type){case 11:return this._advance(),n.true();case 12:return this._advance(),n.false();case 0:{this._advance();const d=this._expr();return this._consume(1,i),d}case 17:{const d=s.lexeme;if(this._advance(),this._matchOne(9)){const H=this._peek();if(!this._config.regexParsingWithErrorRecovery){if(this._advance(),H.type!==10)throw this._errExpectedButGot("REGEX",H);const ie=H.lexeme,ae=ie.lastIndexOf("/"),le=ae===ie.length-1?void 0:this._removeFlagsGY(ie.substring(ae+1));let N;try{N=new RegExp(ie.substring(1,ae),le)}catch{throw this._errExpectedButGot("REGEX",H)}return Q.create(d,N)}switch(H.type){case 10:case 19:{const ie=[H.lexeme];this._advance();let ae=this._peek(),le=0;for(let ee=0;ee<H.lexeme.length;ee++)H.lexeme.charCodeAt(ee)===40?le++:H.lexeme.charCodeAt(ee)===41&&le--;for(;!this._isAtEnd()&&ae.type!==15&&ae.type!==16;){switch(ae.type){case 0:le++;break;case 1:le--;break;case 10:case 18:for(let ee=0;ee<ae.lexeme.length;ee++)ae.lexeme.charCodeAt(ee)===40?le++:H.lexeme.charCodeAt(ee)===41&&le--}if(le<0)break;ie.push(b.Scanner.getLexeme(ae)),this._advance(),ae=this._peek()}const N=ie.join(""),$=N.lastIndexOf("/"),j=$===N.length-1?void 0:this._removeFlagsGY(N.substring($+1));let X;try{X=new RegExp(N.substring(1,$),j)}catch{throw this._errExpectedButGot("REGEX",H)}return n.regex(d,X)}case 18:{const ie=H.lexeme;this._advance();let ae=null;if(!(0,I.isFalsyOrWhitespace)(ie)){const le=ie.indexOf("/"),N=ie.lastIndexOf("/");if(le!==N&&le>=0){const $=ie.slice(le+1,N),j=ie[N+1]==="i"?"i":"";try{ae=new RegExp($,j)}catch{throw this._errExpectedButGot("REGEX",H)}}}if(ae===null)throw this._errExpectedButGot("REGEX",H);return Q.create(d,ae)}default:throw this._errExpectedButGot("REGEX",this._peek())}}if(this._matchOne(14)){this._consume(13,a);const H=this._value();return n.notIn(d,H)}switch(this._peek().type){case 3:{this._advance();const H=this._value();if(this._previous().type===18)return n.equals(d,H);switch(H){case"true":return n.has(d);case"false":return n.not(d);default:return n.equals(d,H)}}case 4:{this._advance();const H=this._value();if(this._previous().type===18)return n.notEquals(d,H);switch(H){case"true":return n.not(d);case"false":return n.has(d);default:return n.notEquals(d,H)}}case 5:return this._advance(),J.create(d,this._value());case 6:return this._advance(),x.create(d,this._value());case 7:return this._advance(),T.create(d,this._value());case 8:return this._advance(),q.create(d,this._value());case 13:return this._advance(),n.in(d,this._value());default:return n.has(d)}}case 20:throw this._parsingErrors.push({message:_,offset:s.offset,lexeme:"",additionalInfo:C}),o._parseError;default:throw this._errExpectedButGot(`true | false | KEY 
	| KEY '=~' REGEX 
	| KEY ('==' | '!=' | '<' | '<=' | '>' | '>=' | 'in' | 'not' 'in') value`,this._peek())}}_value(){const s=this._peek();switch(s.type){case 17:case 18:return this._advance(),s.lexeme;case 11:return this._advance(),"true";case 12:return this._advance(),"false";case 13:return this._advance(),"in";default:return""}}_removeFlagsGY(s){return s.replaceAll(this._flagsGYRe,"")}_previous(){return this._tokens[this._current-1]}_matchOne(s){return this._check(s)?(this._advance(),!0):!1}_advance(){return this._isAtEnd()||this._current++,this._previous()}_consume(s,d){if(this._check(s))return this._advance();throw this._errExpectedButGot(d,this._peek())}_errExpectedButGot(s,d,W){const H=(0,O.localize)(8,null,s,b.Scanner.getLexeme(d)),ie=d.offset,ae=b.Scanner.getLexeme(d);return this._parsingErrors.push({message:H,offset:ie,lexeme:ae,additionalInfo:W}),o._parseError}_check(s){return this._peek().type===s}_peek(){return this._tokens[this._current]}_isAtEnd(){return this._peek().type===20}}e.Parser=o;class n{static false(){return D.INSTANCE}static true(){return f.INSTANCE}static has(s){return g.create(s)}static equals(s,d){return M.create(s,d)}static notEquals(s,d){return E.create(s,d)}static regex(s,d){return Q.create(s,d)}static in(s,d){return F.create(s,d)}static notIn(s,d){return l.create(s,d)}static not(s){return B.create(s)}static and(...s){return fe.create(s,null,!0)}static or(...s){return K.create(s,null,!0)}static greater(s,d){return T.create(s,d)}static greaterEquals(s,d){return q.create(s,d)}static smaller(s,d){return J.create(s,d)}static smallerEquals(s,d){return x.create(s,d)}static{this._parser=new o({regexParsingWithErrorRecovery:!1})}static deserialize(s){return s==null?void 0:this._parser.parse(s)}}e.ContextKeyExpr=n;function h(Z){const s=new o({regexParsingWithErrorRecovery:!1});return Z.map(d=>(s.parse(d),s.lexingErrors.length>0?s.lexingErrors.map(W=>({errorMessage:W.additionalInfo?(0,O.localize)(9,null,W.additionalInfo):(0,O.localize)(10,null),offset:W.offset,length:W.lexeme.length})):s.parsingErrors.length>0?s.parsingErrors.map(W=>({errorMessage:W.additionalInfo?`${W.message}. ${W.additionalInfo}`:W.message,offset:W.offset,length:W.lexeme.length})):[]))}e.validateWhenClauses=h;function S(Z,s){const d=Z?Z.substituteConstants():void 0,W=s?s.substituteConstants():void 0;return!d&&!W?!0:!d||!W?!1:d.equals(W)}e.expressionsAreEqualWithConstantSubstitution=S;function p(Z,s){return Z.cmp(s)}class D{static{this.INSTANCE=new D}constructor(){this.type=0}cmp(s){return this.type-s.type}equals(s){return s.type===this.type}substituteConstants(){return this}evaluate(s){return!1}serialize(){return"false"}keys(){return[]}map(s){return this}negate(){return f.INSTANCE}}e.ContextKeyFalseExpr=D;class f{static{this.INSTANCE=new f}constructor(){this.type=1}cmp(s){return this.type-s.type}equals(s){return s.type===this.type}substituteConstants(){return this}evaluate(s){return!0}serialize(){return"true"}keys(){return[]}map(s){return this}negate(){return D.INSTANCE}}e.ContextKeyTrueExpr=f;class g{static create(s,d=null){const W=m.get(s);return typeof W=="boolean"?W?f.INSTANCE:D.INSTANCE:new g(s,d)}constructor(s,d){this.key=s,this.negated=d,this.type=2}cmp(s){return s.type!==this.type?this.type-s.type:R(this.key,s.key)}equals(s){return s.type===this.type?this.key===s.key:!1}substituteConstants(){const s=m.get(this.key);return typeof s=="boolean"?s?f.INSTANCE:D.INSTANCE:this}evaluate(s){return!!s.getValue(this.key)}serialize(){return this.key}keys(){return[this.key]}map(s){return s.mapDefined(this.key)}negate(){return this.negated||(this.negated=B.create(this.key,this)),this.negated}}e.ContextKeyDefinedExpr=g;class M{static create(s,d,W=null){if(typeof d=="boolean")return d?g.create(s,W):B.create(s,W);const H=m.get(s);return typeof H=="boolean"?d===(H?"true":"false")?f.INSTANCE:D.INSTANCE:new M(s,d,W)}constructor(s,d,W){this.key=s,this.value=d,this.negated=W,this.type=4}cmp(s){return s.type!==this.type?this.type-s.type:G(this.key,this.value,s.key,s.value)}equals(s){return s.type===this.type?this.key===s.key&&this.value===s.value:!1}substituteConstants(){const s=m.get(this.key);if(typeof s=="boolean"){const d=s?"true":"false";return this.value===d?f.INSTANCE:D.INSTANCE}return this}evaluate(s){return s.getValue(this.key)==this.value}serialize(){return`${this.key} == '${this.value}'`}keys(){return[this.key]}map(s){return s.mapEquals(this.key,this.value)}negate(){return this.negated||(this.negated=E.create(this.key,this.value,this)),this.negated}}e.ContextKeyEqualsExpr=M;class F{static create(s,d){return new F(s,d)}constructor(s,d){this.key=s,this.valueKey=d,this.type=10,this.negated=null}cmp(s){return s.type!==this.type?this.type-s.type:G(this.key,this.valueKey,s.key,s.valueKey)}equals(s){return s.type===this.type?this.key===s.key&&this.valueKey===s.valueKey:!1}substituteConstants(){return this}evaluate(s){const d=s.getValue(this.valueKey),W=s.getValue(this.key);return Array.isArray(d)?d.includes(W):typeof W=="string"&&typeof d=="object"&&d!==null?A.call(d,W):!1}serialize(){return`${this.key} in '${this.valueKey}'`}keys(){return[this.key,this.valueKey]}map(s){return s.mapIn(this.key,this.valueKey)}negate(){return this.negated||(this.negated=l.create(this.key,this.valueKey)),this.negated}}e.ContextKeyInExpr=F;class l{static create(s,d){return new l(s,d)}constructor(s,d){this.key=s,this.valueKey=d,this.type=11,this._negated=F.create(s,d)}cmp(s){return s.type!==this.type?this.type-s.type:this._negated.cmp(s._negated)}equals(s){return s.type===this.type?this._negated.equals(s._negated):!1}substituteConstants(){return this}evaluate(s){return!this._negated.evaluate(s)}serialize(){return`${this.key} not in '${this.valueKey}'`}keys(){return this._negated.keys()}map(s){return s.mapNotIn(this.key,this.valueKey)}negate(){return this._negated}}e.ContextKeyNotInExpr=l;class E{static create(s,d,W=null){if(typeof d=="boolean")return d?B.create(s,W):g.create(s,W);const H=m.get(s);return typeof H=="boolean"?d===(H?"true":"false")?D.INSTANCE:f.INSTANCE:new E(s,d,W)}constructor(s,d,W){this.key=s,this.value=d,this.negated=W,this.type=5}cmp(s){return s.type!==this.type?this.type-s.type:G(this.key,this.value,s.key,s.value)}equals(s){return s.type===this.type?this.key===s.key&&this.value===s.value:!1}substituteConstants(){const s=m.get(this.key);if(typeof s=="boolean"){const d=s?"true":"false";return this.value===d?D.INSTANCE:f.INSTANCE}return this}evaluate(s){return s.getValue(this.key)!=this.value}serialize(){return`${this.key} != '${this.value}'`}keys(){return[this.key]}map(s){return s.mapNotEquals(this.key,this.value)}negate(){return this.negated||(this.negated=M.create(this.key,this.value,this)),this.negated}}e.ContextKeyNotEqualsExpr=E;class B{static create(s,d=null){const W=m.get(s);return typeof W=="boolean"?W?D.INSTANCE:f.INSTANCE:new B(s,d)}constructor(s,d){this.key=s,this.negated=d,this.type=3}cmp(s){return s.type!==this.type?this.type-s.type:R(this.key,s.key)}equals(s){return s.type===this.type?this.key===s.key:!1}substituteConstants(){const s=m.get(this.key);return typeof s=="boolean"?s?D.INSTANCE:f.INSTANCE:this}evaluate(s){return!s.getValue(this.key)}serialize(){return`!${this.key}`}keys(){return[this.key]}map(s){return s.mapNot(this.key)}negate(){return this.negated||(this.negated=g.create(this.key,this)),this.negated}}e.ContextKeyNotExpr=B;function V(Z,s){if(typeof Z=="string"){const d=parseFloat(Z);isNaN(d)||(Z=d)}return typeof Z=="string"||typeof Z=="number"?s(Z):D.INSTANCE}class T{static create(s,d,W=null){return V(d,H=>new T(s,H,W))}constructor(s,d,W){this.key=s,this.value=d,this.negated=W,this.type=12}cmp(s){return s.type!==this.type?this.type-s.type:G(this.key,this.value,s.key,s.value)}equals(s){return s.type===this.type?this.key===s.key&&this.value===s.value:!1}substituteConstants(){return this}evaluate(s){return typeof this.value=="string"?!1:parseFloat(s.getValue(this.key))>this.value}serialize(){return`${this.key} > ${this.value}`}keys(){return[this.key]}map(s){return s.mapGreater(this.key,this.value)}negate(){return this.negated||(this.negated=x.create(this.key,this.value,this)),this.negated}}e.ContextKeyGreaterExpr=T;class q{static create(s,d,W=null){return V(d,H=>new q(s,H,W))}constructor(s,d,W){this.key=s,this.value=d,this.negated=W,this.type=13}cmp(s){return s.type!==this.type?this.type-s.type:G(this.key,this.value,s.key,s.value)}equals(s){return s.type===this.type?this.key===s.key&&this.value===s.value:!1}substituteConstants(){return this}evaluate(s){return typeof this.value=="string"?!1:parseFloat(s.getValue(this.key))>=this.value}serialize(){return`${this.key} >= ${this.value}`}keys(){return[this.key]}map(s){return s.mapGreaterEquals(this.key,this.value)}negate(){return this.negated||(this.negated=J.create(this.key,this.value,this)),this.negated}}e.ContextKeyGreaterEqualsExpr=q;class J{static create(s,d,W=null){return V(d,H=>new J(s,H,W))}constructor(s,d,W){this.key=s,this.value=d,this.negated=W,this.type=14}cmp(s){return s.type!==this.type?this.type-s.type:G(this.key,this.value,s.key,s.value)}equals(s){return s.type===this.type?this.key===s.key&&this.value===s.value:!1}substituteConstants(){return this}evaluate(s){return typeof this.value=="string"?!1:parseFloat(s.getValue(this.key))<this.value}serialize(){return`${this.key} < ${this.value}`}keys(){return[this.key]}map(s){return s.mapSmaller(this.key,this.value)}negate(){return this.negated||(this.negated=q.create(this.key,this.value,this)),this.negated}}e.ContextKeySmallerExpr=J;class x{static create(s,d,W=null){return V(d,H=>new x(s,H,W))}constructor(s,d,W){this.key=s,this.value=d,this.negated=W,this.type=15}cmp(s){return s.type!==this.type?this.type-s.type:G(this.key,this.value,s.key,s.value)}equals(s){return s.type===this.type?this.key===s.key&&this.value===s.value:!1}substituteConstants(){return this}evaluate(s){return typeof this.value=="string"?!1:parseFloat(s.getValue(this.key))<=this.value}serialize(){return`${this.key} <= ${this.value}`}keys(){return[this.key]}map(s){return s.mapSmallerEquals(this.key,this.value)}negate(){return this.negated||(this.negated=T.create(this.key,this.value,this)),this.negated}}e.ContextKeySmallerEqualsExpr=x;class Q{static create(s,d){return new Q(s,d)}constructor(s,d){this.key=s,this.regexp=d,this.type=7,this.negated=null}cmp(s){if(s.type!==this.type)return this.type-s.type;if(this.key<s.key)return-1;if(this.key>s.key)return 1;const d=this.regexp?this.regexp.source:"",W=s.regexp?s.regexp.source:"";return d<W?-1:d>W?1:0}equals(s){if(s.type===this.type){const d=this.regexp?this.regexp.source:"",W=s.regexp?s.regexp.source:"";return this.key===s.key&&d===W}return!1}substituteConstants(){return this}evaluate(s){const d=s.getValue(this.key);return this.regexp?this.regexp.test(d):!1}serialize(){const s=this.regexp?`/${this.regexp.source}/${this.regexp.flags}`:"/invalid/";return`${this.key} =~ ${s}`}keys(){return[this.key]}map(s){return s.mapRegex(this.key,this.regexp)}negate(){return this.negated||(this.negated=ne.create(this)),this.negated}}e.ContextKeyRegexExpr=Q;class ne{static create(s){return new ne(s)}constructor(s){this._actual=s,this.type=8}cmp(s){return s.type!==this.type?this.type-s.type:this._actual.cmp(s._actual)}equals(s){return s.type===this.type?this._actual.equals(s._actual):!1}substituteConstants(){return this}evaluate(s){return!this._actual.evaluate(s)}serialize(){return`!(${this._actual.serialize()})`}keys(){return this._actual.keys()}map(s){return new ne(this._actual.map(s))}negate(){return this._actual}}e.ContextKeyNotRegexExpr=ne;function ue(Z){let s=null;for(let d=0,W=Z.length;d<W;d++){const H=Z[d].substituteConstants();if(Z[d]!==H&&s===null){s=[];for(let ie=0;ie<d;ie++)s[ie]=Z[ie]}s!==null&&(s[d]=H)}return s===null?Z:s}class fe{static create(s,d,W){return fe._normalizeArr(s,d,W)}constructor(s,d){this.expr=s,this.negated=d,this.type=6}cmp(s){if(s.type!==this.type)return this.type-s.type;if(this.expr.length<s.expr.length)return-1;if(this.expr.length>s.expr.length)return 1;for(let d=0,W=this.expr.length;d<W;d++){const H=p(this.expr[d],s.expr[d]);if(H!==0)return H}return 0}equals(s){if(s.type===this.type){if(this.expr.length!==s.expr.length)return!1;for(let d=0,W=this.expr.length;d<W;d++)if(!this.expr[d].equals(s.expr[d]))return!1;return!0}return!1}substituteConstants(){const s=ue(this.expr);return s===this.expr?this:fe.create(s,this.negated,!1)}evaluate(s){for(let d=0,W=this.expr.length;d<W;d++)if(!this.expr[d].evaluate(s))return!1;return!0}static _normalizeArr(s,d,W){const H=[];let ie=!1;for(const ae of s)if(ae){if(ae.type===1){ie=!0;continue}if(ae.type===0)return D.INSTANCE;if(ae.type===6){H.push(...ae.expr);continue}H.push(ae)}if(H.length===0&&ie)return f.INSTANCE;if(H.length!==0){if(H.length===1)return H[0];H.sort(p);for(let ae=1;ae<H.length;ae++)H[ae-1].equals(H[ae])&&(H.splice(ae,1),ae--);if(H.length===1)return H[0];for(;H.length>1;){const ae=H[H.length-1];if(ae.type!==9)break;H.pop();const le=H.pop(),N=H.length===0,$=K.create(ae.expr.map(j=>fe.create([j,le],null,W)),null,N);$&&(H.push($),H.sort(p))}if(H.length===1)return H[0];if(W){for(let ae=0;ae<H.length;ae++)for(let le=ae+1;le<H.length;le++)if(H[ae].negate().equals(H[le]))return D.INSTANCE;if(H.length===1)return H[0]}return new fe(H,d)}}serialize(){return this.expr.map(s=>s.serialize()).join(" && ")}keys(){const s=[];for(const d of this.expr)s.push(...d.keys());return s}map(s){return new fe(this.expr.map(d=>d.map(s)),null)}negate(){if(!this.negated){const s=[];for(const d of this.expr)s.push(d.negate());this.negated=K.create(s,this,!0)}return this.negated}}e.ContextKeyAndExpr=fe;class K{static create(s,d,W){return K._normalizeArr(s,d,W)}constructor(s,d){this.expr=s,this.negated=d,this.type=9}cmp(s){if(s.type!==this.type)return this.type-s.type;if(this.expr.length<s.expr.length)return-1;if(this.expr.length>s.expr.length)return 1;for(let d=0,W=this.expr.length;d<W;d++){const H=p(this.expr[d],s.expr[d]);if(H!==0)return H}return 0}equals(s){if(s.type===this.type){if(this.expr.length!==s.expr.length)return!1;for(let d=0,W=this.expr.length;d<W;d++)if(!this.expr[d].equals(s.expr[d]))return!1;return!0}return!1}substituteConstants(){const s=ue(this.expr);return s===this.expr?this:K.create(s,this.negated,!1)}evaluate(s){for(let d=0,W=this.expr.length;d<W;d++)if(this.expr[d].evaluate(s))return!0;return!1}static _normalizeArr(s,d,W){let H=[],ie=!1;if(s){for(let ae=0,le=s.length;ae<le;ae++){const N=s[ae];if(N){if(N.type===0){ie=!0;continue}if(N.type===1)return f.INSTANCE;if(N.type===9){H=H.concat(N.expr);continue}H.push(N)}}if(H.length===0&&ie)return D.INSTANCE;H.sort(p)}if(H.length!==0){if(H.length===1)return H[0];for(let ae=1;ae<H.length;ae++)H[ae-1].equals(H[ae])&&(H.splice(ae,1),ae--);if(H.length===1)return H[0];if(W){for(let ae=0;ae<H.length;ae++)for(let le=ae+1;le<H.length;le++)if(H[ae].negate().equals(H[le]))return f.INSTANCE;if(H.length===1)return H[0]}return new K(H,d)}}serialize(){return this.expr.map(s=>s.serialize()).join(" || ")}keys(){const s=[];for(const d of this.expr)s.push(...d.keys());return s}map(s){return new K(this.expr.map(d=>d.map(s)),null)}negate(){if(!this.negated){const s=[];for(const d of this.expr)s.push(d.negate());for(;s.length>1;){const d=s.shift(),W=s.shift(),H=[];for(const ie of ge(d))for(const ae of ge(W))H.push(fe.create([ie,ae],null,!1));s.unshift(K.create(H,null,!1))}this.negated=K.create(s,this,!0)}return this.negated}}e.ContextKeyOrExpr=K;class z extends g{static{this._info=[]}static all(){return z._info.values()}constructor(s,d,W){super(s,null),this._defaultValue=d,typeof W=="object"?z._info.push({...W,key:s}):W!==!0&&z._info.push({key:s,description:W,type:d!=null?typeof d:void 0})}bindTo(s){return s.createKey(this.key,this._defaultValue)}getValue(s){return s.getContextKeyValue(this.key)}toNegated(){return this.negate()}isEqualTo(s){return M.create(this.key,s)}notEqualsTo(s){return E.create(this.key,s)}}e.RawContextKey=z,e.IContextKeyService=(0,k.createDecorator)("contextKeyService");function R(Z,s){return Z<s?-1:Z>s?1:0}function G(Z,s,d,W){return Z<d?-1:Z>d?1:s<W?-1:s>W?1:0}function se(Z,s){if(Z.type===0||s.type===1)return!0;if(Z.type===9)return s.type===9?te(Z.expr,s.expr):!1;if(s.type===9){for(const d of s.expr)if(se(Z,d))return!0;return!1}if(Z.type===6){if(s.type===6)return te(s.expr,Z.expr);for(const d of Z.expr)if(se(d,s))return!0;return!1}return Z.equals(s)}e.implies=se;function te(Z,s){let d=0,W=0;for(;d<Z.length&&W<s.length;){const H=Z[d].cmp(s[W]);if(H<0)return!1;H===0&&d++,W++}return d===Z.length}function ge(Z){return Z.type===9?Z.expr:[Z]}}),define(ce[76],he([0,1,49,7,12,8,5,67,20,2,18]),function(oe,e,w,I,b,k,O,P,m,c,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getLargeFileConfirmationLimit=e.ByteSize=e.whenProviderRegistered=e.etag=e.ETAG_DISABLED=e.FileKind=e.FILES_READONLY_FROM_PERMISSIONS_CONFIG=e.FILES_READONLY_EXCLUDE_CONFIG=e.FILES_READONLY_INCLUDE_CONFIG=e.FILES_EXCLUDE_CONFIG=e.FILES_ASSOCIATIONS_CONFIG=e.HotExitConfiguration=e.AutoSaveConfiguration=e.FileOperationResult=e.NotModifiedSinceFileOperationError=e.TooLargeFileOperationError=e.FileOperationError=e.isParent=e.FileChangesEvent=e.FileChangeType=e.FileOperationEvent=e.FileOperation=e.toFileOperationResult=e.toFileSystemProviderErrorCode=e.markAsFileSystemProviderError=e.ensureFileSystemProviderError=e.createFileSystemProviderError=e.FileSystemProviderError=e.FileSystemProviderErrorCode=e.hasReadonlyCapability=e.hasFileAtomicDeleteCapability=e.hasFileAtomicWriteCapability=e.hasFileAtomicReadCapability=e.hasFileReadStreamCapability=e.hasOpenReadWriteCloseCapability=e.hasFileCloneCapability=e.hasFileFolderCopyCapability=e.hasReadWriteCapability=e.FileSystemProviderCapabilities=e.FilePermission=e.FileType=e.isFileOpenForWriteOptions=e.IFileService=void 0,e.IFileService=(0,m.createDecorator)("fileService");function y(R){return R.create===!0}e.isFileOpenForWriteOptions=y;var L;(function(R){R[R.Unknown=0]="Unknown",R[R.File=1]="File",R[R.Directory=2]="Directory",R[R.SymbolicLink=64]="SymbolicLink"})(L||(e.FileType=L={}));var t;(function(R){R[R.Readonly=1]="Readonly",R[R.Locked=2]="Locked"})(t||(e.FilePermission=t={}));var u;(function(R){R[R.None=0]="None",R[R.FileReadWrite=2]="FileReadWrite",R[R.FileOpenReadWriteClose=4]="FileOpenReadWriteClose",R[R.FileReadStream=16]="FileReadStream",R[R.FileFolderCopy=8]="FileFolderCopy",R[R.PathCaseSensitive=1024]="PathCaseSensitive",R[R.Readonly=2048]="Readonly",R[R.Trash=4096]="Trash",R[R.FileWriteUnlock=8192]="FileWriteUnlock",R[R.FileAtomicRead=16384]="FileAtomicRead",R[R.FileAtomicWrite=32768]="FileAtomicWrite",R[R.FileAtomicDelete=65536]="FileAtomicDelete",R[R.FileClone=131072]="FileClone"})(u||(e.FileSystemProviderCapabilities=u={}));function a(R){return!!(R.capabilities&2)}e.hasReadWriteCapability=a;function i(R){return!!(R.capabilities&8)}e.hasFileFolderCopyCapability=i;function v(R){return!!(R.capabilities&131072)}e.hasFileCloneCapability=v;function r(R){return!!(R.capabilities&4)}e.hasOpenReadWriteCloseCapability=r;function _(R){return!!(R.capabilities&16)}e.hasFileReadStreamCapability=_;function C(R){return a(R)?!!(R.capabilities&16384):!1}e.hasFileAtomicReadCapability=C;function o(R){return a(R)?!!(R.capabilities&32768):!1}e.hasFileAtomicWriteCapability=o;function n(R){return!!(R.capabilities&65536)}e.hasFileAtomicDeleteCapability=n;function h(R){return!!(R.capabilities&2048)}e.hasReadonlyCapability=h;var S;(function(R){R.FileExists="EntryExists",R.FileNotFound="EntryNotFound",R.FileNotADirectory="EntryNotADirectory",R.FileIsADirectory="EntryIsADirectory",R.FileExceedsStorageQuota="EntryExceedsStorageQuota",R.FileTooLarge="EntryTooLarge",R.FileWriteLocked="EntryWriteLocked",R.NoPermissions="NoPermissions",R.Unavailable="Unavailable",R.Unknown="Unknown"})(S||(e.FileSystemProviderErrorCode=S={}));class p extends Error{static create(G,se){const te=new p(G.toString(),se);return g(te,se),te}constructor(G,se){super(G),this.code=se}}e.FileSystemProviderError=p;function D(R,G){return p.create(R,G)}e.createFileSystemProviderError=D;function f(R){return R||D((0,P.localize)(0,null),S.Unknown)}e.ensureFileSystemProviderError=f;function g(R,G){return R.name=G?`${G} (FileSystemError)`:"FileSystemError",R}e.markAsFileSystemProviderError=g;function M(R){if(!R)return S.Unknown;if(R instanceof p)return R.code;const G=/^(.+) \(FileSystemError\)$/.exec(R.name);if(!G)return S.Unknown;switch(G[1]){case S.FileExists:return S.FileExists;case S.FileIsADirectory:return S.FileIsADirectory;case S.FileNotADirectory:return S.FileNotADirectory;case S.FileNotFound:return S.FileNotFound;case S.FileTooLarge:return S.FileTooLarge;case S.FileWriteLocked:return S.FileWriteLocked;case S.NoPermissions:return S.NoPermissions;case S.Unavailable:return S.Unavailable}return S.Unknown}e.toFileSystemProviderErrorCode=M;function F(R){if(R instanceof q)return R.fileOperationResult;switch(M(R)){case S.FileNotFound:return 1;case S.FileIsADirectory:return 0;case S.FileNotADirectory:return 9;case S.FileWriteLocked:return 5;case S.NoPermissions:return 6;case S.FileExists:return 4;case S.FileTooLarge:return 7;default:return 10}}e.toFileOperationResult=F;var l;(function(R){R[R.CREATE=0]="CREATE",R[R.DELETE=1]="DELETE",R[R.MOVE=2]="MOVE",R[R.COPY=3]="COPY",R[R.WRITE=4]="WRITE"})(l||(e.FileOperation=l={}));class E{constructor(G,se,te){this.resource=G,this.operation=se,this.target=te}isOperation(G){return this.operation===G}}e.FileOperationEvent=E;var B;(function(R){R[R.UPDATED=0]="UPDATED",R[R.ADDED=1]="ADDED",R[R.DELETED=2]="DELETED"})(B||(e.FileChangeType=B={}));class V{constructor(G,se){this.added=void 0,this.updated=void 0,this.deleted=void 0,this.rawAdded=[],this.rawUpdated=[],this.rawDeleted=[];const te=new Map;for(const ge of G){const Z=te.get(ge.type);switch(Z?Z.push([ge.resource,ge]):te.set(ge.type,[[ge.resource,ge]]),ge.type){case 1:this.rawAdded.push(ge.resource);break;case 0:this.rawUpdated.push(ge.resource);break;case 2:this.rawDeleted.push(ge.resource);break}}for(const[ge,Z]of te)switch(ge){case 1:this.added=w.TernarySearchTree.forUris(()=>se),this.added.fill(Z);break;case 0:this.updated=w.TernarySearchTree.forUris(()=>se),this.updated.fill(Z);break;case 2:this.deleted=w.TernarySearchTree.forUris(()=>se),this.deleted.fill(Z);break}}contains(G,...se){return this.doContains(G,{includeChildren:!1},...se)}affects(G,...se){return this.doContains(G,{includeChildren:!0},...se)}doContains(G,se,...te){if(!G)return!1;const ge=te.length>0;return!!((!ge||te.includes(1))&&(this.added?.get(G)||se.includeChildren&&this.added?.findSuperstr(G))||(!ge||te.includes(0))&&(this.updated?.get(G)||se.includeChildren&&this.updated?.findSuperstr(G))||(!ge||te.includes(2))&&(this.deleted?.findSubstr(G)||se.includeChildren&&this.deleted?.findSuperstr(G)))}gotAdded(){return!!this.added}gotDeleted(){return!!this.deleted}gotUpdated(){return!!this.updated}}e.FileChangesEvent=V;function T(R,G,se){return!R||!G||R===G||G.length>R.length?!1:(G.charAt(G.length-1)!==I.sep&&(G+=I.sep),se?(0,b.startsWithIgnoreCase)(R,G):R.indexOf(G)===0)}e.isParent=T;class q extends Error{constructor(G,se,te){super(G),this.fileOperationResult=se,this.options=te}}e.FileOperationError=q;class J extends q{constructor(G,se,te,ge){super(G,se,ge),this.fileOperationResult=se,this.size=te}}e.TooLargeFileOperationError=J;class x extends q{constructor(G,se,te){super(G,2,te),this.stat=se}}e.NotModifiedSinceFileOperationError=x;var Q;(function(R){R[R.FILE_IS_DIRECTORY=0]="FILE_IS_DIRECTORY",R[R.FILE_NOT_FOUND=1]="FILE_NOT_FOUND",R[R.FILE_NOT_MODIFIED_SINCE=2]="FILE_NOT_MODIFIED_SINCE",R[R.FILE_MODIFIED_SINCE=3]="FILE_MODIFIED_SINCE",R[R.FILE_MOVE_CONFLICT=4]="FILE_MOVE_CONFLICT",R[R.FILE_WRITE_LOCKED=5]="FILE_WRITE_LOCKED",R[R.FILE_PERMISSION_DENIED=6]="FILE_PERMISSION_DENIED",R[R.FILE_TOO_LARGE=7]="FILE_TOO_LARGE",R[R.FILE_INVALID_PATH=8]="FILE_INVALID_PATH",R[R.FILE_NOT_DIRECTORY=9]="FILE_NOT_DIRECTORY",R[R.FILE_OTHER_ERROR=10]="FILE_OTHER_ERROR"})(Q||(e.FileOperationResult=Q={})),e.AutoSaveConfiguration={OFF:"off",AFTER_DELAY:"afterDelay",ON_FOCUS_CHANGE:"onFocusChange",ON_WINDOW_CHANGE:"onWindowChange"},e.HotExitConfiguration={OFF:"off",ON_EXIT:"onExit",ON_EXIT_AND_WINDOW_CLOSE:"onExitAndWindowClose"},e.FILES_ASSOCIATIONS_CONFIG="files.associations",e.FILES_EXCLUDE_CONFIG="files.exclude",e.FILES_READONLY_INCLUDE_CONFIG="files.readonlyInclude",e.FILES_READONLY_EXCLUDE_CONFIG="files.readonlyExclude",e.FILES_READONLY_FROM_PERMISSIONS_CONFIG="files.readonlyFromPermissions";var ne;(function(R){R[R.FILE=0]="FILE",R[R.FOLDER=1]="FOLDER",R[R.ROOT_FOLDER=2]="ROOT_FOLDER"})(ne||(e.FileKind=ne={})),e.ETAG_DISABLED="";function ue(R){if(!(typeof R.size!="number"||typeof R.mtime!="number"))return R.mtime.toString(29)+R.size.toString(31)}e.etag=ue;async function fe(R,G){if(!G.hasProvider(O.URI.from({scheme:R.scheme})))return new Promise(se=>{const te=G.onDidChangeFileSystemProviderRegistrations(ge=>{ge.scheme===R.scheme&&ge.added&&(te.dispose(),se())})})}e.whenProviderRegistered=fe;class K{static{this.KB=1024}static{this.MB=K.KB*K.KB}static{this.GB=K.MB*K.KB}static{this.TB=K.GB*K.KB}static formatSize(G){return(0,k.isNumber)(G)||(G=0),G<K.KB?(0,P.localize)(1,null,G.toFixed(0)):G<K.MB?(0,P.localize)(2,null,(G/K.KB).toFixed(2)):G<K.GB?(0,P.localize)(3,null,(G/K.MB).toFixed(2)):G<K.TB?(0,P.localize)(4,null,(G/K.GB).toFixed(2)):(0,P.localize)(5,null,(G/K.TB).toFixed(2))}}e.ByteSize=K;function z(R){const G=typeof R=="string"||R?.scheme===A.Schemas.vscodeRemote;return typeof R!="string"&&R?.scheme===A.Schemas.file?1024*K.MB:G?10*K.MB:c.isWeb?50*K.MB:1024*K.MB}e.getLargeFileConfirmationLimit=z}),define(ce[11],he([0,1,54,4,47,3,29,2,22,8,5,35,20]),function(oe,e,w,I,b,k,O,P,m,c,A,y,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CONTEXT_LOG_LEVEL=e.parseLogLevel=e.LogLevelToString=e.getLogLevel=e.NullLogService=e.NullLogger=e.AbstractLoggerService=e.MultiplexLogger=e.AdapterLogger=e.ConsoleLogger=e.ConsoleMainLogger=e.AbstractMessageLogger=e.AbstractLogger=e.log=e.DEFAULT_LOG_LEVEL=e.LogLevel=e.isLogLevel=e.ILoggerService=e.ILogService=void 0,e.ILogService=(0,L.createDecorator)("logService"),e.ILoggerService=(0,L.createDecorator)("loggerService");function t(){return new Date().toISOString()}function u(F){return(0,c.isNumber)(F)}e.isLogLevel=u;var a;(function(F){F[F.Off=0]="Off",F[F.Trace=1]="Trace",F[F.Debug=2]="Debug",F[F.Info=3]="Info",F[F.Warning=4]="Warning",F[F.Error=5]="Error"})(a||(e.LogLevel=a={})),e.DEFAULT_LOG_LEVEL=a.Info;function i(F,l,E){switch(l){case a.Trace:F.trace(E);break;case a.Debug:F.debug(E);break;case a.Info:F.info(E);break;case a.Warning:F.warn(E);break;case a.Error:F.error(E);break;case a.Off:break;default:throw new Error(`Invalid log level ${l}`)}}e.log=i;function v(F,l=!1){let E="";for(let B=0;B<F.length;B++){let V=F[B];if(V instanceof Error&&(V=(0,w.toErrorMessage)(V,l)),typeof V=="object")try{V=JSON.stringify(V)}catch{}E+=(B>0?" ":"")+V}return E}class r extends k.Disposable{constructor(){super(...arguments),this.level=e.DEFAULT_LOG_LEVEL,this._onDidChangeLogLevel=this._register(new I.Emitter),this.onDidChangeLogLevel=this._onDidChangeLogLevel.event}setLevel(l){this.level!==l&&(this.level=l,this._onDidChangeLogLevel.fire(this.level))}getLevel(){return this.level}checkLogLevel(l){return this.level!==a.Off&&this.level<=l}}e.AbstractLogger=r;class _ extends r{constructor(l){super(),this.logAlways=l}checkLogLevel(l){return this.logAlways||super.checkLogLevel(l)}trace(l,...E){this.checkLogLevel(a.Trace)&&this.log(a.Trace,v([l,...E],!0))}debug(l,...E){this.checkLogLevel(a.Debug)&&this.log(a.Debug,v([l,...E]))}info(l,...E){this.checkLogLevel(a.Info)&&this.log(a.Info,v([l,...E]))}warn(l,...E){this.checkLogLevel(a.Warning)&&this.log(a.Warning,v([l,...E]))}error(l,...E){if(this.checkLogLevel(a.Error))if(l instanceof Error){const B=Array.prototype.slice.call(arguments);B[0]=l.stack,this.log(a.Error,v(B))}else this.log(a.Error,v([l,...E]))}flush(){}}e.AbstractMessageLogger=_;class C extends r{constructor(l=e.DEFAULT_LOG_LEVEL){super(),this.setLevel(l),this.useColors=!P.isWindows}trace(l,...E){this.checkLogLevel(a.Trace)&&(this.useColors?console.log(`\x1B[90m[main ${t()}]\x1B[0m`,l,...E):console.log(`[main ${t()}]`,l,...E))}debug(l,...E){this.checkLogLevel(a.Debug)&&(this.useColors?console.log(`\x1B[90m[main ${t()}]\x1B[0m`,l,...E):console.log(`[main ${t()}]`,l,...E))}info(l,...E){this.checkLogLevel(a.Info)&&(this.useColors?console.log(`\x1B[90m[main ${t()}]\x1B[0m`,l,...E):console.log(`[main ${t()}]`,l,...E))}warn(l,...E){this.checkLogLevel(a.Warning)&&(this.useColors?console.warn(`\x1B[93m[main ${t()}]\x1B[0m`,l,...E):console.warn(`[main ${t()}]`,l,...E))}error(l,...E){this.checkLogLevel(a.Error)&&(this.useColors?console.error(`\x1B[91m[main ${t()}]\x1B[0m`,l,...E):console.error(`[main ${t()}]`,l,...E))}dispose(){}flush(){}}e.ConsoleMainLogger=C;class o extends r{constructor(l=e.DEFAULT_LOG_LEVEL,E=!0){super(),this.useColors=E,this.setLevel(l)}trace(l,...E){this.checkLogLevel(a.Trace)&&(this.useColors?console.log("%cTRACE","color: #888",l,...E):console.log(l,...E))}debug(l,...E){this.checkLogLevel(a.Debug)&&(this.useColors?console.log("%cDEBUG","background: #eee; color: #888",l,...E):console.log(l,...E))}info(l,...E){this.checkLogLevel(a.Info)&&(this.useColors?console.log("%c INFO","color: #33f",l,...E):console.log(l,...E))}warn(l,...E){this.checkLogLevel(a.Warning)&&(this.useColors?console.log("%c WARN","color: #993",l,...E):console.log(l,...E))}error(l,...E){this.checkLogLevel(a.Error)&&(this.useColors?console.log("%c  ERR","color: #f33",l,...E):console.error(l,...E))}dispose(){}flush(){}}e.ConsoleLogger=o;class n extends r{constructor(l,E=e.DEFAULT_LOG_LEVEL){super(),this.adapter=l,this.setLevel(E)}trace(l,...E){this.checkLogLevel(a.Trace)&&this.adapter.log(a.Trace,[this.extractMessage(l),...E])}debug(l,...E){this.checkLogLevel(a.Debug)&&this.adapter.log(a.Debug,[this.extractMessage(l),...E])}info(l,...E){this.checkLogLevel(a.Info)&&this.adapter.log(a.Info,[this.extractMessage(l),...E])}warn(l,...E){this.checkLogLevel(a.Warning)&&this.adapter.log(a.Warning,[this.extractMessage(l),...E])}error(l,...E){this.checkLogLevel(a.Error)&&this.adapter.log(a.Error,[this.extractMessage(l),...E])}extractMessage(l){return typeof l=="string"?l:(0,w.toErrorMessage)(l,this.checkLogLevel(a.Trace))}dispose(){}flush(){}}e.AdapterLogger=n;class h extends r{constructor(l){super(),this.loggers=l,l.length&&this.setLevel(l[0].getLevel())}setLevel(l){for(const E of this.loggers)E.setLevel(l);super.setLevel(l)}trace(l,...E){for(const B of this.loggers)B.trace(l,...E)}debug(l,...E){for(const B of this.loggers)B.debug(l,...E)}info(l,...E){for(const B of this.loggers)B.info(l,...E)}warn(l,...E){for(const B of this.loggers)B.warn(l,...E)}error(l,...E){for(const B of this.loggers)B.error(l,...E)}flush(){for(const l of this.loggers)l.flush()}dispose(){for(const l of this.loggers)l.dispose()}}e.MultiplexLogger=h;class S extends k.Disposable{constructor(l,E,B){if(super(),this.logLevel=l,this.logsHome=E,this._loggers=new O.ResourceMap,this._onDidChangeLoggers=this._register(new I.Emitter),this.onDidChangeLoggers=this._onDidChangeLoggers.event,this._onDidChangeLogLevel=this._register(new I.Emitter),this.onDidChangeLogLevel=this._onDidChangeLogLevel.event,this._onDidChangeVisibility=this._register(new I.Emitter),this.onDidChangeVisibility=this._onDidChangeVisibility.event,B)for(const V of B)this._loggers.set(V.resource,{logger:void 0,info:V})}getLoggerEntry(l){return(0,c.isString)(l)?[...this._loggers.values()].find(E=>E.info.id===l):this._loggers.get(l)}getLogger(l){return this.getLoggerEntry(l)?.logger}createLogger(l,E){const B=this.toResource(l),V=(0,c.isString)(l)?l:E?.id??(0,b.hash)(B.toString()).toString(16);let T=this._loggers.get(B)?.logger;const q=E?.logLevel==="always"?a.Trace:E?.logLevel;T||(T=this.doCreateLogger(B,q??this.getLogLevel(B)??this.logLevel,{...E,id:V}));const J={logger:T,info:{resource:B,id:V,logLevel:q,name:E?.name,hidden:E?.hidden,extensionId:E?.extensionId,when:E?.when}};return this.registerLogger(J.info),this._loggers.set(B,J),T}toResource(l){return(0,c.isString)(l)?(0,m.joinPath)(this.logsHome,`${l}.log`):l}setLogLevel(l,E){if(A.URI.isUri(l)){const B=l,V=E,T=this._loggers.get(B);T&&V!==T.info.logLevel&&(T.info.logLevel=V===this.logLevel?void 0:V,T.logger?.setLevel(V),this._loggers.set(T.info.resource,T),this._onDidChangeLogLevel.fire([B,V]))}else{this.logLevel=l;for(const[B,V]of this._loggers.entries())this._loggers.get(B)?.info.logLevel===void 0&&V.logger?.setLevel(this.logLevel);this._onDidChangeLogLevel.fire(this.logLevel)}}setVisibility(l,E){const B=this.getLoggerEntry(l);B&&E!==!B.info.hidden&&(B.info.hidden=!E,this._loggers.set(B.info.resource,B),this._onDidChangeVisibility.fire([B.info.resource,E]))}getLogLevel(l){let E;return l&&(E=this._loggers.get(l)?.info.logLevel),E??this.logLevel}registerLogger(l){const E=this._loggers.get(l.resource);E?E.info.hidden!==l.hidden&&this.setVisibility(l.resource,!l.hidden):(this._loggers.set(l.resource,{info:l,logger:void 0}),this._onDidChangeLoggers.fire({added:[l],removed:[]}))}deregisterLogger(l){const E=this._loggers.get(l);E&&(E.logger&&E.logger.dispose(),this._loggers.delete(l),this._onDidChangeLoggers.fire({added:[],removed:[E.info]}))}*getRegisteredLoggers(){for(const l of this._loggers.values())yield l.info}getRegisteredLogger(l){return this._loggers.get(l)?.info}dispose(){this._loggers.forEach(l=>l.logger?.dispose()),this._loggers.clear(),super.dispose()}}e.AbstractLoggerService=S;class p{constructor(){this.onDidChangeLogLevel=new I.Emitter().event}setLevel(l){}getLevel(){return a.Info}trace(l,...E){}debug(l,...E){}info(l,...E){}warn(l,...E){}error(l,...E){}critical(l,...E){}dispose(){}flush(){}}e.NullLogger=p;class D extends p{}e.NullLogService=D;function f(F){if(F.verbose)return a.Trace;if(typeof F.logLevel=="string"){const l=M(F.logLevel.toLowerCase());if(l!==void 0)return l}return e.DEFAULT_LOG_LEVEL}e.getLogLevel=f;function g(F){switch(F){case a.Trace:return"trace";case a.Debug:return"debug";case a.Info:return"info";case a.Warning:return"warn";case a.Error:return"error";case a.Off:return"off"}}e.LogLevelToString=g;function M(F){switch(F){case"trace":return a.Trace;case"debug":return a.Debug;case"info":return a.Info;case"warn":return a.Warning;case"error":return a.Error;case"critical":return a.Error;case"off":return a.Off}}e.parseLogLevel=M,e.CONTEXT_LOG_LEVEL=new y.RawContextKey("logLevel",g(a.Info))}),define(ce[77],he([0,1,5,4,11,3]),function(oe,e,w,I,b,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RemoteLoggerChannelClient=e.LoggerChannel=e.LoggerChannelClient=void 0;class O extends b.AbstractLoggerService{constructor(y,L,t,u,a){super(L,t,u),this.windowId=y,this.channel=a,this._register(a.listen("onDidChangeLogLevel",y)(i=>{(0,b.isLogLevel)(i)?super.setLogLevel(i):super.setLogLevel(w.URI.revive(i[0]),i[1])})),this._register(a.listen("onDidChangeVisibility",y)(([i,v])=>super.setVisibility(w.URI.revive(i),v))),this._register(a.listen("onDidChangeLoggers",y)(({added:i,removed:v})=>{for(const r of i)super.registerLogger({...r,resource:w.URI.revive(r.resource)});for(const r of v)super.deregisterLogger(r.resource)}))}createConsoleMainLogger(){return new b.AdapterLogger({log:(y,L)=>{this.channel.call("consoleLog",[y,L])}})}registerLogger(y){super.registerLogger(y),this.channel.call("registerLogger",[y,this.windowId])}deregisterLogger(y){super.deregisterLogger(y),this.channel.call("deregisterLogger",[y,this.windowId])}setLogLevel(y,L){super.setLogLevel(y,L),this.channel.call("setLogLevel",[y,L])}setVisibility(y,L){super.setVisibility(y,L),this.channel.call("setVisibility",[this.toResource(y),L])}doCreateLogger(y,L,t){return new P(this.channel,y,L,t,this.windowId)}static setLogLevel(y,L,t){return y.call("setLogLevel",[L,t])}}e.LoggerChannelClient=O;class P extends b.AbstractMessageLogger{constructor(y,L,t,u,a){super(u?.logLevel==="always"),this.channel=y,this.file=L,this.isLoggerCreated=!1,this.buffer=[],this.setLevel(t),this.channel.call("createLogger",[L,u,a]).then(()=>{this.doLog(this.buffer),this.isLoggerCreated=!0})}log(y,L){const t=[[y,L]];this.isLoggerCreated?this.doLog(t):this.buffer.push(...t)}doLog(y){this.channel.call("log",[this.file,y])}}class m{constructor(y,L){this.loggerService=y,this.getUriTransformer=L}listen(y,L){const t=this.getUriTransformer(y);switch(L){case"onDidChangeLoggers":return I.Event.map(this.loggerService.onDidChangeLoggers,u=>({added:[...u.added].map(a=>this.transformLogger(a,t)),removed:[...u.removed].map(a=>this.transformLogger(a,t))}));case"onDidChangeVisibility":return I.Event.map(this.loggerService.onDidChangeVisibility,u=>[t.transformOutgoingURI(u[0]),u[1]]);case"onDidChangeLogLevel":return I.Event.map(this.loggerService.onDidChangeLogLevel,u=>(0,b.isLogLevel)(u)?u:[t.transformOutgoingURI(u[0]),u[1]])}throw new Error(`Event not found: ${L}`)}async call(y,L,t){const u=this.getUriTransformer(y);switch(L){case"setLogLevel":return(0,b.isLogLevel)(t[0])?this.loggerService.setLogLevel(t[0]):this.loggerService.setLogLevel(w.URI.revive(u.transformIncoming(t[0][0])),t[0][1]);case"getRegisteredLoggers":return Promise.resolve([...this.loggerService.getRegisteredLoggers()].map(a=>this.transformLogger(a,u)))}throw new Error(`Call not found: ${L}`)}transformLogger(y,L){return{...y,resource:L.transformOutgoingURI(y.resource)}}}e.LoggerChannel=m;class c extends k.Disposable{constructor(y,L){super(),L.call("setLogLevel",[y.getLogLevel()]),this._register(y.onDidChangeLogLevel(t=>L.call("setLogLevel",[t]))),L.call("getRegisteredLoggers").then(t=>{for(const u of t)y.registerLogger({...u,resource:w.URI.revive(u.resource)})}),this._register(L.listen("onDidChangeVisibility")(([t,u])=>y.setVisibility(w.URI.revive(t),u))),this._register(L.listen("onDidChangeLoggers")(({added:t,removed:u})=>{for(const a of t)y.registerLogger({...a,resource:w.URI.revive(a.resource)});for(const a of u)y.deregisterLogger(a.resource)}))}}e.RemoteLoggerChannelClient=c}),define(ce[78],he([0,1,3,11]),function(oe,e,w,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LogService=void 0;class b extends w.Disposable{constructor(O,P=[]){super(),this.logger=new I.MultiplexLogger([O,...P]),this._register(O.onDidChangeLogLevel(m=>this.setLevel(m)))}get onDidChangeLogLevel(){return this.logger.onDidChangeLogLevel}setLevel(O){this.logger.setLevel(O)}getLevel(){return this.logger.getLevel()}trace(O,...P){this.logger.trace(O,...P)}debug(O,...P){this.logger.debug(O,...P)}info(O,...P){this.logger.info(O,...P)}warn(O,...P){this.logger.warn(O,...P)}error(O,...P){this.logger.error(O,...P)}flush(){this.logger.flush()}}e.LogService=b}),define(ce[79],he([0,1,76,11]),function(oe,e,w,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SpdLogLogger=void 0;var b;(function(c){c[c.Trace=0]="Trace",c[c.Debug=1]="Debug",c[c.Info=2]="Info",c[c.Warning=3]="Warning",c[c.Error=4]="Error",c[c.Critical=5]="Critical",c[c.Off=6]="Off"})(b||(b={}));async function k(c,A,y,L,t){try{const u=await new Promise((i,v)=>{oe(["@vscode/spdlog"],i,v)});u.setFlushOn(b.Trace);const a=await u.createAsyncRotatingLogger(c,A,y,L);return t?a.clearFormatters():a.setPattern("%Y-%m-%d %H:%M:%S.%e [%l] %v"),a}catch(u){console.error(u)}return null}function O(c,A,y){switch(A){case I.LogLevel.Trace:c.trace(y);break;case I.LogLevel.Debug:c.debug(y);break;case I.LogLevel.Info:c.info(y);break;case I.LogLevel.Warning:c.warn(y);break;case I.LogLevel.Error:c.error(y);break;case I.LogLevel.Off:break;default:throw new Error(`Invalid log level ${A}`)}}function P(c,A){switch(A){case I.LogLevel.Trace:c.setLevel(b.Trace);break;case I.LogLevel.Debug:c.setLevel(b.Debug);break;case I.LogLevel.Info:c.setLevel(b.Info);break;case I.LogLevel.Warning:c.setLevel(b.Warning);break;case I.LogLevel.Error:c.setLevel(b.Error);break;case I.LogLevel.Off:c.setLevel(b.Off);break;default:throw new Error(`Invalid log level ${A}`)}}class m extends I.AbstractMessageLogger{constructor(A,y,L,t,u){super(),this.buffer=[],this.setLevel(u),this._loggerCreationPromise=this._createSpdLogLogger(A,y,L,t),this._register(this.onDidChangeLogLevel(a=>{this._logger&&P(this._logger,a)}))}async _createSpdLogLogger(A,y,L,t){const u=L?6:1,a=30/u*w.ByteSize.MB,i=await k(A,y,a,u,t);if(i){this._logger=i,P(this._logger,this.getLevel());for(const{level:v,message:r}of this.buffer)O(this._logger,v,r);this.buffer=[]}}log(A,y){this._logger?O(this._logger,A,y):this.getLevel()<=A&&this.buffer.push({level:A,message:y})}flush(){this._logger?this._logger.flush():this._loggerCreationPromise.then(()=>this.flush())}dispose(){this._logger?this.disposeLogger():this._loggerCreationPromise.then(()=>this.disposeLogger())}disposeLogger(){this._logger&&(this._logger.drop(),this._logger=void 0)}}e.SpdLogLogger=m}),define(ce[80],he([0,1,50,11,79]),function(oe,e,w,I,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LoggerService=void 0;class k extends I.AbstractLoggerService{doCreateLogger(P,m,c){return new b.SpdLogLogger((0,w.generateUuid)(),P.fsPath,!c?.donotRotate,!!c?.donotUseFormatters,m)}}e.LoggerService=k}),define(ce[81],he([0,1,2,15]),function(oe,e,w,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0});let b;if(typeof w.globals.vscode<"u"&&typeof w.globals.vscode.context<"u"){const k=w.globals.vscode.context.configuration();if(k)b=k.product;else throw new Error("Sandbox: unable to resolve product configuration from preload script.")}else if(globalThis._VSCODE_PRODUCT_JSON&&globalThis._VSCODE_PACKAGE_JSON){if(b=globalThis._VSCODE_PRODUCT_JSON,I.env.VSCODE_DEV&&Object.assign(b,{nameShort:`${b.nameShort} Dev`,nameLong:`${b.nameLong} Dev`,dataFolderName:`${b.dataFolderName}-dev`,serverDataFolderName:b.serverDataFolderName?`${b.serverDataFolderName}-dev`:void 0}),!b.version){const k=globalThis._VSCODE_PACKAGE_JSON;Object.assign(b,{version:k.version})}}else b={},Object.keys(b).length===0&&Object.assign(b,{version:"1.78.0-dev",nameShort:"Azure Data Studio Dev",nameLong:"Azure Data Studio Dev",applicationName:"azuredatastudio-oss",dataFolderName:"azuredatastudio-oss",urlProtocol:"azuredatastudio-oss",reportIssueUrl:"https://github.com/microsoft/azuredatastudio/issues/new",licenseName:"MIT",licenseUrl:"https://github.com/microsoft/vscode/blob/main/LICENSE.txt",serverLicenseUrl:"https://github.com/microsoft/vscode/blob/main/LICENSE.txt"});e.default=b}),define(ce[82],he([0,1,20]),function(oe,e,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.productSchemaId=e.IProductService=void 0,e.IProductService=(0,w.createDecorator)("productService"),e.productSchemaId="vscode://schemas/vscode-product"}),define(ce[83],he([0,1,40,8]),function(oe,e,w,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Registry=void 0;class b{constructor(){this.data=new Map}add(O,P){w.ok(I.isString(O)),w.ok(I.isObject(P)),w.ok(!this.data.has(O),"There is already an extension with this id"),this.data.set(O,P)}knows(O){return this.data.has(O)}as(O){return this.data.get(O)||null}}e.Registry=new b}),define(ce[84],he([0,1,4,3]),function(oe,e,w,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BufferMarkCapability=void 0;class b extends I.Disposable{constructor(O){super(),this._terminal=O,this.type=4,this._idToMarkerMap=new Map,this._anonymousMarkers=new Map,this._onMarkAdded=this._register(new w.Emitter),this.onMarkAdded=this._onMarkAdded.event}*markers(){for(const O of this._idToMarkerMap.values())yield O;for(const O of this._anonymousMarkers.values())yield O}addMark(O){const P=O?.marker||this._terminal.registerMarker(),m=O?.id;P&&(m?(this._idToMarkerMap.set(m,P),P.onDispose(()=>this._idToMarkerMap.delete(m))):(this._anonymousMarkers.set(P.id,P),P.onDispose(()=>this._anonymousMarkers.delete(P.id))),this._onMarkAdded.fire({marker:P,id:m,hidden:O?.hidden,hoverMessage:O?.hoverMessage}))}getMark(O){return this._idToMarkerMap.get(O)}}e.BufferMarkCapability=b}),define(ce[85],he([0,1,9,14,4,3]),function(oe,e,w,I,b,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getLinesForCommand=e.CommandDetectionCapability=void 0;class O extends k.Disposable{get commands(){return this._commands}get executingCommand(){return this._currentCommand.command}get executingCommandObject(){if(this._currentCommand.commandStartMarker)return{marker:this._currentCommand.commandStartMarker}}get currentCommand(){return this._currentCommand}get cwd(){return this._cwd}get _isInputting(){return!!(this._currentCommand.commandStartMarker&&!this._currentCommand.commandExecutedMarker)}get hasInput(){if(!(!this._isInputting||!this._currentCommand?.commandStartMarker)){if(this._terminal.buffer.active.baseY+this._terminal.buffer.active.cursorY===this._currentCommand.commandStartMarker?.line){const t=this._terminal.buffer.active.getLine(this._terminal.buffer.active.cursorY)?.translateToString(!0,this._currentCommand.commandStartX);return t===void 0?void 0:t.length>0}return!0}}constructor(t,u){super(),this._terminal=t,this._logService=u,this.type=2,this._commands=[],this._currentCommand={},this._isWindowsPty=!1,this._commandMarkers=[],this.__isCommandStorageDisabled=!1,this._onCommandStarted=this._register(new b.Emitter),this.onCommandStarted=this._onCommandStarted.event,this._onBeforeCommandFinished=this._register(new b.Emitter),this.onBeforeCommandFinished=this._onBeforeCommandFinished.event,this._onCommandFinished=this._register(new b.Emitter),this.onCommandFinished=this._onCommandFinished.event,this._onCommandExecuted=this._register(new b.Emitter),this.onCommandExecuted=this._onCommandExecuted.event,this._onCommandInvalidated=this._register(new b.Emitter),this.onCommandInvalidated=this._onCommandInvalidated.event,this._onCurrentCommandInvalidated=this._register(new b.Emitter),this.onCurrentCommandInvalidated=this._onCurrentCommandInvalidated.event,this._dimensions={cols:this._terminal.cols,rows:this._terminal.rows},this._register(this._terminal.onResize(a=>this._handleResize(a))),this._register(this._terminal.onCursorMove(()=>this._handleCursorMove())),this._setupClearListeners()}_handleResize(t){this._isWindowsPty&&this._preHandleResizeWindows(t),this._dimensions.cols=t.cols,this._dimensions.rows=t.rows}_handleCursorMove(){this._terminal.buffer.active===this._terminal.buffer.normal&&this._currentCommand.commandStartMarker&&this._terminal.buffer.active.baseY+this._terminal.buffer.active.cursorY<this._currentCommand.commandStartMarker.line&&(this._clearCommandsInViewport(),this._currentCommand.isInvalid=!0,this._onCurrentCommandInvalidated.fire({reason:"windows"}))}_setupClearListeners(){this.onBeforeCommandFinished(t=>{this._isWindowsPty&&(t.command.trim().toLowerCase()==="clear"||t.command.trim().toLowerCase()==="cls")&&(this._clearCommandsInViewport(),this._currentCommand.isInvalid=!0,this._onCurrentCommandInvalidated.fire({reason:"windows"}))}),this._terminal.parser.registerCsiHandler({final:"J"},t=>(this._isWindowsPty||t.length>=1&&(t[0]===2||t[0]===3)&&this._clearCommandsInViewport(),!1))}_preHandleResizeWindows(t){const u=this._terminal.buffer.active.baseY,a=t.rows-this._dimensions.rows;a>0&&this._waitForCursorMove().then(()=>{const i=Math.min(a,u);for(let v=this.commands.length-1;v>=0;v--){const r=this.commands[v];if(!r.marker||r.marker.line<u||r.commandStartLineContent===void 0)break;const _=this._terminal.buffer.active.getLine(r.marker.line);if(!_||_.translateToString(!0)===r.commandStartLineContent)continue;const C=r.marker.line-i;this._terminal.buffer.active.getLine(C)?.translateToString(!0)===r.commandStartLineContent&&this._terminal._core._bufferService.buffer.lines.onDeleteEmitter.fire({index:this._terminal.buffer.active.baseY,amount:i})}})}_clearCommandsInViewport(){let t=0;for(let u=this._commands.length-1;u>=0;u--){const a=this._commands[u].marker?.line;if(a&&a<this._terminal.buffer.active.baseY)break;t++}t>0&&this._onCommandInvalidated.fire(this._commands.splice(this._commands.length-t,t))}_waitForCursorMove(){const t=this._terminal.buffer.active.cursorX,u=this._terminal.buffer.active.cursorY;let a=0;return new Promise((i,v)=>{const r=setInterval(()=>{if(t!==this._terminal.buffer.active.cursorX||u!==this._terminal.buffer.active.cursorY){i(),clearInterval(r);return}a+=10,a>1e3&&(clearInterval(r),i())},10)})}setCwd(t){this._cwd=t}setIsWindowsPty(t){this._isWindowsPty=t}setIsCommandStorageDisabled(){this.__isCommandStorageDisabled=!0}getCwdForLine(t){return this._currentCommand.promptStartMarker&&t>=this._currentCommand.promptStartMarker?.line?this._cwd:[...this._commands].reverse().find(a=>a.marker.line<=t-1)?.cwd}handlePromptStart(t){this._currentCommand.promptStartMarker=t?.marker||this._terminal.registerMarker(0),this._logService.debug("CommandDetectionCapability#handlePromptStart",this._terminal.buffer.active.cursorX,this._currentCommand.promptStartMarker?.line)}handleContinuationStart(){this._currentCommand.currentContinuationMarker=this._terminal.registerMarker(0),this._logService.debug("CommandDetectionCapability#handleContinuationStart",this._currentCommand.currentContinuationMarker)}handleContinuationEnd(){if(!this._currentCommand.currentContinuationMarker){this._logService.warn("CommandDetectionCapability#handleContinuationEnd Received continuation end without start");return}this._currentCommand.continuations||(this._currentCommand.continuations=[]),this._currentCommand.continuations.push({marker:this._currentCommand.currentContinuationMarker,end:this._terminal.buffer.active.cursorX}),this._currentCommand.currentContinuationMarker=void 0,this._logService.debug("CommandDetectionCapability#handleContinuationEnd",this._currentCommand.continuations[this._currentCommand.continuations.length-1])}handleRightPromptStart(){this._currentCommand.commandRightPromptStartX=this._terminal.buffer.active.cursorX,this._logService.debug("CommandDetectionCapability#handleRightPromptStart",this._currentCommand.commandRightPromptStartX)}handleRightPromptEnd(){this._currentCommand.commandRightPromptEndX=this._terminal.buffer.active.cursorX,this._logService.debug("CommandDetectionCapability#handleRightPromptEnd",this._currentCommand.commandRightPromptEndX)}handleCommandStart(t){if(this._handleCommandStartOptions=t,this._currentCommand.commandStartMarker=t?.marker||this._currentCommand.commandStartMarker,this._currentCommand.commandStartMarker?.line===this._terminal.buffer.active.cursorY){this._currentCommand.commandStartX=this._terminal.buffer.active.cursorX,this._logService.debug("CommandDetectionCapability#handleCommandStart",this._currentCommand.commandStartX,this._currentCommand.commandStartMarker?.line);return}if(this._isWindowsPty){this._handleCommandStartWindows();return}this._currentCommand.commandStartX=this._terminal.buffer.active.cursorX,this._currentCommand.commandStartMarker=t?.marker||this._terminal.registerMarker(0),this._currentCommand.commandExecutedMarker?.dispose(),this._currentCommand.commandExecutedMarker=void 0,this._currentCommand.commandExecutedX=void 0;for(const u of this._commandMarkers)u.dispose();this._commandMarkers.length=0,this._onCommandStarted.fire({marker:t?.marker||this._currentCommand.commandStartMarker,markProperties:t?.markProperties}),this._logService.debug("CommandDetectionCapability#handleCommandStart",this._currentCommand.commandStartX,this._currentCommand.commandStartMarker?.line)}_handleCommandStartWindows(){this._currentCommand.commandStartX=this._terminal.buffer.active.cursorX,this._commandMarkers.length=0,(0,w.timeout)(0).then(()=>{if(this._currentCommand.commandExecutedMarker||(this._onCursorMoveListener=this._terminal.onCursorMove(()=>{if(this._commandMarkers.length===0||this._commandMarkers[this._commandMarkers.length-1].line!==this._terminal.buffer.active.cursorY){const t=this._terminal.registerMarker(0);t&&this._commandMarkers.push(t)}})),this._currentCommand.commandStartMarker=this._terminal.registerMarker(0),this._currentCommand.commandStartMarker){const t=this._terminal.buffer.active.getLine(this._currentCommand.commandStartMarker.line);t&&(this._currentCommand.commandStartLineContent=t.translateToString(!0))}this._onCommandStarted.fire({marker:this._currentCommand.commandStartMarker}),this._logService.debug("CommandDetectionCapability#_handleCommandStartWindows",this._currentCommand.commandStartX,this._currentCommand.commandStartMarker?.line)})}handleGenericCommand(t){t?.markProperties?.disableCommandStorage&&this.setIsCommandStorageDisabled(),this.handlePromptStart(t),this.handleCommandStart(t),this.handleCommandExecuted(t),this.handleCommandFinished(void 0,t)}handleCommandExecuted(t){if(this._isWindowsPty){this._handleCommandExecutedWindows();return}if(this._currentCommand.commandExecutedMarker=t?.marker||this._terminal.registerMarker(0),this._currentCommand.commandExecutedX=this._terminal.buffer.active.cursorX,this._logService.debug("CommandDetectionCapability#handleCommandExecuted",this._currentCommand.commandExecutedX,this._currentCommand.commandExecutedMarker?.line),!this._currentCommand.commandStartMarker||!this._currentCommand.commandExecutedMarker||this._currentCommand.commandStartX===void 0)return;this._currentCommand.command=this.__isCommandStorageDisabled?"":this._terminal.buffer.active.getLine(this._currentCommand.commandStartMarker.line)?.translateToString(!0,this._currentCommand.commandStartX,this._currentCommand.commandRightPromptStartX).trim();let u=this._currentCommand.commandStartMarker.line+1;const a=this._currentCommand.commandExecutedMarker.line;for(;u<a;u++){const i=this._terminal.buffer.active.getLine(u);if(i){const v=this._currentCommand.continuations?.find(_=>_.marker.line===u);v&&(this._currentCommand.command+=`
`);const r=v?.end??0;this._currentCommand.command+=i.translateToString(!0,r)}}u===a&&(this._currentCommand.command+=this._terminal.buffer.active.getLine(a)?.translateToString(!0,void 0,this._currentCommand.commandExecutedX)||""),this._onCommandExecuted.fire()}_handleCommandExecutedWindows(){this._onCursorMoveListener?.dispose(),this._onCursorMoveListener=void 0,this._evaluateCommandMarkersWindows(),this._currentCommand.commandExecutedX=this._terminal.buffer.active.cursorX,this._onCommandExecuted.fire(),this._logService.debug("CommandDetectionCapability#handleCommandExecuted",this._currentCommand.commandExecutedX,this._currentCommand.commandExecutedMarker?.line)}invalidateCurrentCommand(t){this._currentCommand.isInvalid=!0,this._onCurrentCommandInvalidated.fire(t)}handleCommandFinished(t,u){this._isWindowsPty&&this._preHandleCommandFinishedWindows(),this._currentCommand.commandFinishedMarker=u?.marker||this._terminal.registerMarker(0);let a=this._currentCommand.command;if(this._logService.debug("CommandDetectionCapability#handleCommandFinished",this._terminal.buffer.active.cursorX,this._currentCommand.commandFinishedMarker?.line,this._currentCommand.command,this._currentCommand),this._exitCode=t,this._exitCode===void 0){const i=this.commands.length>0?this.commands[this.commands.length-1]:void 0;a&&a.length>0&&i?.command===a&&(this._exitCode=i.exitCode)}if(!(this._currentCommand.commandStartMarker===void 0||!this._terminal.buffer.active)){if(this._exitCode===void 0&&a===void 0&&(a=""),a!==void 0&&!a.startsWith("\\")||this._handleCommandStartOptions?.ignoreCommandLine){const i=this._terminal.buffer.active,v=Date.now(),r=this._currentCommand.commandExecutedMarker,_=this._currentCommand.commandFinishedMarker,C={command:this._handleCommandStartOptions?.ignoreCommandLine?"":a||"",isTrusted:!!this._currentCommand.isTrusted,marker:this._currentCommand.commandStartMarker,endMarker:_,executedMarker:r,timestamp:v,cwd:this._cwd,exitCode:this._exitCode,commandStartLineContent:this._currentCommand.commandStartLineContent,hasOutput:()=>!r?.isDisposed&&!_?.isDisposed&&!!(r&&_&&r?.line<_.line),getOutput:()=>P(r,_,i),getOutputMatch:o=>m(this._isWindowsPty&&r?.line===_?.line?this._currentCommand.commandStartMarker:r,_,i,this._terminal.cols,o),markProperties:u?.markProperties};this._commands.push(C),this._logService.debug("CommandDetectionCapability#onCommandFinished",C),this._onBeforeCommandFinished.fire(C),this._currentCommand.isInvalid||this._onCommandFinished.fire(C)}this._currentCommand.previousCommandMarker=this._currentCommand.commandStartMarker,this._currentCommand={},this._handleCommandStartOptions=void 0}}_preHandleCommandFinishedWindows(){this._currentCommand.commandExecutedMarker||(this._commandMarkers.length===0&&(this._currentCommand.commandStartMarker||(this._currentCommand.commandStartMarker=this._terminal.registerMarker(0)),this._currentCommand.commandStartMarker&&this._commandMarkers.push(this._currentCommand.commandStartMarker)),this._evaluateCommandMarkersWindows())}_evaluateCommandMarkersWindows(){if(this._commandMarkers.length!==0){if(this._commandMarkers=this._commandMarkers.sort((t,u)=>t.line-u.line),this._currentCommand.commandStartMarker=this._commandMarkers[0],this._currentCommand.commandStartMarker){const t=this._terminal.buffer.active.getLine(this._currentCommand.commandStartMarker.line);t&&(this._currentCommand.commandStartLineContent=t.translateToString(!0))}this._currentCommand.commandExecutedMarker=this._commandMarkers[this._commandMarkers.length-1]}}setCommandLine(t,u){this._logService.debug("CommandDetectionCapability#setCommandLine",t,u),this._currentCommand.command=t,this._currentCommand.isTrusted=u}serialize(){const t=this.commands.map(u=>({startLine:u.marker?.line,startX:void 0,endLine:u.endMarker?.line,executedLine:u.executedMarker?.line,command:this.__isCommandStorageDisabled?"":u.command,isTrusted:u.isTrusted,cwd:u.cwd,exitCode:u.exitCode,commandStartLineContent:u.commandStartLineContent,timestamp:u.timestamp,markProperties:u.markProperties,aliases:u.aliases}));return this._currentCommand.commandStartMarker&&t.push({startLine:this._currentCommand.commandStartMarker.line,startX:this._currentCommand.commandStartX,endLine:void 0,executedLine:void 0,command:"",isTrusted:!0,cwd:this._cwd,exitCode:void 0,commandStartLineContent:void 0,timestamp:0,markProperties:void 0}),{isWindowsPty:this._isWindowsPty,commands:t}}deserialize(t){t.isWindowsPty&&this.setIsWindowsPty(t.isWindowsPty);const u=this._terminal.buffer.normal;for(const a of t.commands){const i=a.startLine!==void 0?this._terminal.registerMarker(a.startLine-(u.baseY+u.cursorY)):void 0;if(!i)continue;if(!a.endLine){this._currentCommand.commandStartMarker=i,this._currentCommand.commandStartX=a.startX,this._cwd=a.cwd,this._onCommandStarted.fire({marker:i});continue}const v=a.endLine!==void 0?this._terminal.registerMarker(a.endLine-(u.baseY+u.cursorY)):void 0,r=a.executedLine!==void 0?this._terminal.registerMarker(a.executedLine-(u.baseY+u.cursorY)):void 0,_={command:this.__isCommandStorageDisabled?"":a.command,isTrusted:a.isTrusted,marker:i,endMarker:v,executedMarker:r,timestamp:a.timestamp,cwd:a.cwd,commandStartLineContent:a.commandStartLineContent,exitCode:a.exitCode,hasOutput:()=>!r?.isDisposed&&!v?.isDisposed&&!!(r&&v&&r.line<v.line),getOutput:()=>P(r,v,u),getOutputMatch:C=>m(this._isWindowsPty&&r?.line===v?.line?i:r,v,u,this._terminal.cols,C),markProperties:a.markProperties,wasReplayed:!0};this._commands.push(_),this._logService.debug("CommandDetectionCapability#onCommandFinished",_),this._onCommandFinished.fire(_)}}}e.CommandDetectionCapability=O,me([(0,I.debounce)(500)],O.prototype,"_handleCursorMove",null);function P(L,t,u){if(!L||!t)return;const a=L.line,i=t.line;if(a===i)return;let v="",r;for(let _=a;_<i;_++)r=u.getLine(_),r&&(v+=r.translateToString(!r.isWrapped)+(r.isWrapped?"":`
`));return v===""?void 0:v}function m(L,t,u,a,i){if(!L||!t)return;const v=t.line;if(v===-1)return;const r=Math.max(L.line,0),_=i.lineMatcher,C=typeof _=="string"?1:i.length||y(_),o=[];let n;if(i.anchor==="bottom")for(let h=v-(i.offset||0);h>=r;h--){let S=h;const p=h;for(;S>=r&&u.getLine(S)?.isWrapped;)S--;if(h=S,o.unshift(A(u,S,p,a)),n||(n=o[0].match(_)),o.length>=C)break}else for(let h=r+(i.offset||0);h<v;h++){const S=h;let p=h;for(;p+1<v&&u.getLine(p+1)?.isWrapped;)p++;if(h=p,o.push(A(u,S,p,a)),n||(n=o[o.length-1].match(_)),o.length>=C)break}return n?{regexMatch:n,outputLines:o}:void 0}function c(L,t,u,a){if(!a)return;const i=t.executedMarker,v=t.endMarker;if(!i||!v)return;const r=i.line,_=v.line,C=a.length,o=[];if(a.anchor==="bottom")for(let n=_-(a.offset||0);n>=r;n--){let h=n;const S=n;for(;h>=r&&L.getLine(h)?.isWrapped;)h--;n=h,o.unshift(A(L,h,S,u)),o.length>C&&o.pop()}else for(let n=r+(a.offset||0);n<_;n++){const h=n;let S=n;for(;S+1<_&&L.getLine(S+1)?.isWrapped;)S++;n=S,o.push(A(L,h,S,u)),o.length===C&&o.shift()}return o}e.getLinesForCommand=c;function A(L,t,u,a){const i=Math.max(2048/a*2);u=Math.min(u,t+i);let v="";for(let r=t;r<=u;r++){const _=L.getLine(r);_&&(v+=_.translateToString(!0,0,a))}return v}function y(L){if(!L.multiline)return 1;const t=L.source;let u=1,a=t.indexOf("\\n");for(;a!==-1;)u++,a=t.indexOf("\\n",a+1);return u}}),define(ce[86],he([0,1,4,3]),function(oe,e,w,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CwdDetectionCapability=void 0;class b extends I.Disposable{constructor(){super(...arguments),this.type=0,this._cwd="",this._cwds=new Map,this._onDidChangeCwd=this._register(new w.Emitter),this.onDidChangeCwd=this._onDidChangeCwd.event}get cwds(){return Array.from(this._cwds.keys())}getCwd(){return this._cwd}updateCwd(O){const P=this._cwd!==O;this._cwd=O;const m=this._cwds.get(this._cwd)||0;this._cwds.delete(this._cwd),this._cwds.set(this._cwd,m+1),P&&this._onDidChangeCwd.fire(O)}}e.CwdDetectionCapability=b}),define(ce[87],he([0,1,4]),function(oe,e,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PartialCommandDetectionCapability=void 0;var I;(function(k){k[k.MinimumPromptLength=2]="MinimumPromptLength"})(I||(I={}));class b{get commands(){return this._commands}constructor(O){this._terminal=O,this.type=3,this._commands=[],this._onCommandFinished=new w.Emitter,this.onCommandFinished=this._onCommandFinished.event,this._terminal.onData(P=>this._onData(P)),this._terminal.parser.registerCsiHandler({final:"J"},P=>(P.length>=1&&(P[0]===2||P[0]===3)&&this._clearCommandsInViewport(),!1))}_onData(O){O==="\r"&&this._onEnter()}_onEnter(){if(this._terminal&&this._terminal.buffer.active.cursorX>=2){const O=this._terminal.registerMarker(0);O&&(this._commands.push(O),this._onCommandFinished.fire(O))}}_clearCommandsInViewport(){let O=0;for(let P=this._commands.length-1;P>=0&&!(this._commands[P].line<this._terminal.buffer.active.baseY);P--)O++;this._commands.splice(this._commands.length-O,O)}}e.PartialCommandDetectionCapability=b}),define(ce[88],he([0,1,4,3]),function(oe,e,w,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TerminalCapabilityStoreMultiplexer=e.TerminalCapabilityStore=void 0;class b extends I.Disposable{constructor(){super(...arguments),this._map=new Map,this._onDidRemoveCapabilityType=this._register(new w.Emitter),this.onDidRemoveCapabilityType=this._onDidRemoveCapabilityType.event,this._onDidAddCapabilityType=this._register(new w.Emitter),this.onDidAddCapabilityType=this._onDidAddCapabilityType.event,this._onDidRemoveCapability=this._register(new w.Emitter),this.onDidRemoveCapability=this._onDidRemoveCapability.event,this._onDidAddCapability=this._register(new w.Emitter),this.onDidAddCapability=this._onDidAddCapability.event}get items(){return this._map.keys()}add(P,m){this._map.set(P,m),this._onDidAddCapabilityType.fire(P),this._onDidAddCapability.fire({id:P,capability:m})}get(P){return this._map.get(P)}remove(P){const m=this._map.get(P);m&&(this._map.delete(P),this._onDidRemoveCapabilityType.fire(P),this._onDidAddCapability.fire({id:P,capability:m}))}has(P){return this._map.has(P)}}e.TerminalCapabilityStore=b;class k extends I.Disposable{constructor(){super(...arguments),this._stores=[],this._onDidRemoveCapabilityType=this._register(new w.Emitter),this.onDidRemoveCapabilityType=this._onDidRemoveCapabilityType.event,this._onDidAddCapabilityType=this._register(new w.Emitter),this.onDidAddCapabilityType=this._onDidAddCapabilityType.event,this._onDidRemoveCapability=this._register(new w.Emitter),this.onDidRemoveCapability=this._onDidRemoveCapability.event,this._onDidAddCapability=this._register(new w.Emitter),this.onDidAddCapability=this._onDidAddCapability.event}get items(){return this._items()}*_items(){for(const P of this._stores)for(const m of P.items)yield m}has(P){for(const m of this._stores)for(const c of m.items)if(c===P)return!0;return!1}get(P){for(const m of this._stores){const c=m.get(P);if(c)return c}}add(P){this._stores.push(P);for(const m of P.items)this._onDidAddCapabilityType.fire(m),this._onDidAddCapability.fire({id:m,capability:P.get(m)});P.onDidAddCapabilityType(m=>this._onDidAddCapabilityType.fire(m)),P.onDidAddCapability(m=>this._onDidAddCapability.fire(m)),P.onDidRemoveCapabilityType(m=>this._onDidRemoveCapabilityType.fire(m)),P.onDidRemoveCapability(m=>this._onDidRemoveCapability.fire(m))}}e.TerminalCapabilityStoreMultiplexer=k}),define(ce[36],he([0,1]),function(oe,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EnvironmentVariableMutatorType=void 0;var w;(function(I){I[I.Replace=1]="Replace",I[I.Append=2]="Append",I[I.Prepend=3]="Prepend"})(w||(e.EnvironmentVariableMutatorType=w={}))}),define(ce[89],he([0,1,2,36]),function(oe,e,w,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MergedEnvironmentVariableCollection=void 0;const b=new Map([[I.EnvironmentVariableMutatorType.Append,"APPEND"],[I.EnvironmentVariableMutatorType.Prepend,"PREPEND"],[I.EnvironmentVariableMutatorType.Replace,"REPLACE"]]);class k{constructor(A){this.collections=A,this.map=new Map,this.descriptionMap=new Map,A.forEach((y,L)=>{this.populateDescriptionMap(y,L);const t=y.map.entries();let u=t.next();for(;!u.done;){const a=u.value[1],i=u.value[0];let v=this.map.get(i);if(v||(v=[],this.map.set(i,v)),v.length>0&&v[0].type===I.EnvironmentVariableMutatorType.Replace){u=t.next();continue}const r={extensionIdentifier:L,value:a.value,type:a.type,scope:a.scope,variable:a.variable,options:a.options};r.scope||delete r.scope,v.unshift(r),u=t.next()}})}async applyToProcessEnvironment(A,y,L){let t;w.isWindows&&(t={},Object.keys(A).forEach(u=>t[u.toLowerCase()]=u));for(const[u,a]of this.getVariableMap(y)){const i=w.isWindows&&t[u.toLowerCase()]||u;for(const v of a){const r=L?await L(v.value):v.value;if(v.options?.applyAtProcessCreation??!0)switch(v.type){case I.EnvironmentVariableMutatorType.Append:A[i]=(A[i]||"")+r;break;case I.EnvironmentVariableMutatorType.Prepend:A[i]=r+(A[i]||"");break;case I.EnvironmentVariableMutatorType.Replace:A[i]=r;break}if(v.options?.applyAtShellIntegration??!1){const _=`VSCODE_ENV_${b.get(v.type)}`;A[_]=(A[_]?A[_]+":":"")+u+"="+this._encodeColons(r)}}}}_encodeColons(A){return A.replaceAll(":","\\x3a")}diff(A,y){const L=new Map,t=new Map,u=new Map;if(A.getVariableMap(y).forEach((a,i)=>{const v=this.getVariableMap(y).get(i),r=P(a,v);r&&L.set(i,r)}),this.getVariableMap(y).forEach((a,i)=>{const v=A.getVariableMap(y).get(i),r=P(a,v);r&&u.set(i,r)}),this.getVariableMap(y).forEach((a,i)=>{const v=A.getVariableMap(y).get(i),r=m(a,v);r&&t.set(i,r)}),!(L.size===0&&t.size===0&&u.size===0))return{added:L,changed:t,removed:u}}getVariableMap(A){const y=new Map;for(const L of this.map.values()){const t=L.filter(u=>O(u,A));t.length>0&&y.set(t[0].variable,t)}return y}getDescriptionMap(A){const y=new Map;for(const L of this.descriptionMap.values()){const t=L.filter(u=>O(u,A,!0));for(const u of t)y.set(u.extensionIdentifier,u.description)}return y}populateDescriptionMap(A,y){if(!A.descriptionMap)return;const L=A.descriptionMap.entries();let t=L.next();for(;!t.done;){const u=t.value[1],a=t.value[0];let i=this.descriptionMap.get(a);i||(i=[],this.descriptionMap.set(a,i));const v={extensionIdentifier:y,scope:u.scope,description:u.description};v.scope||delete v.scope,i.push(v),t=L.next()}}}e.MergedEnvironmentVariableCollection=k;function O(c,A,y=!1){return c.scope?!!(c.scope.workspaceFolder&&A?.workspaceFolder&&c.scope.workspaceFolder.index===A.workspaceFolder.index):y?A===c.scope:!0}function P(c,A){if(!A)return c;const y=new Set;A.forEach(t=>y.add(t.extensionIdentifier));const L=[];return c.forEach(t=>{y.has(t.extensionIdentifier)||L.push(t)}),L.length===0?void 0:L}function m(c,A){if(!A)return;const y=new Map;A.forEach(t=>y.set(t.extensionIdentifier,t));const L=[];return c.forEach(t=>{const u=y.get(t.extensionIdentifier);u&&(t.type!==u.type||t.value!==u.value||t.scope?.workspaceFolder?.index!==u.scope?.workspaceFolder?.index)&&L.push(u)}),L.length===0?void 0:L}}),define(ce[90],he([0,1]),function(oe,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.deserializeEnvironmentVariableCollections=e.serializeEnvironmentVariableCollections=e.deserializeEnvironmentDescriptionMap=e.deserializeEnvironmentVariableCollection=e.serializeEnvironmentDescriptionMap=e.serializeEnvironmentVariableCollection=void 0;function w(m){return[...m.entries()]}e.serializeEnvironmentVariableCollection=w;function I(m){return m?[...m.entries()]:[]}e.serializeEnvironmentDescriptionMap=I;function b(m){return new Map(m)}e.deserializeEnvironmentVariableCollection=b;function k(m){return new Map(m??[])}e.deserializeEnvironmentDescriptionMap=k;function O(m){return Array.from(m.entries()).map(c=>[c[0],w(c[1].map),I(c[1].descriptionMap)])}e.serializeEnvironmentVariableCollections=O;function P(m){return new Map(m.map(c=>[c[0],{map:b(c[1]),descriptionMap:k(c[2])}]))}e.deserializeEnvironmentVariableCollections=P});var Ne=this&&this.__param||function(oe,e){return function(w,I){e(w,I,oe)}};define(ce[91],he([0,1,9,16,4,3,11]),function(oe,e,w,I,b,k,O){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RequestStore=void 0;let P=class extends k.Disposable{constructor(c,A){super(),this._logService=A,this._lastRequestId=0,this._pendingRequests=new Map,this._pendingRequestDisposables=new Map,this._onCreateRequest=this._register(new b.Emitter),this.onCreateRequest=this._onCreateRequest.event,this._timeout=c===void 0?15e3:c}createRequest(c){return new Promise((A,y)=>{const L=++this._lastRequestId;this._pendingRequests.set(L,A),this._onCreateRequest.fire({requestId:L,...c});const t=new I.CancellationTokenSource;(0,w.timeout)(this._timeout,t.token).then(()=>y(`Request ${L} timed out (${this._timeout}ms)`)),this._pendingRequestDisposables.set(L,[(0,k.toDisposable)(()=>t.cancel())])})}acceptReply(c,A){const y=this._pendingRequests.get(c);y?(this._pendingRequests.delete(c),(0,k.dispose)(this._pendingRequestDisposables.get(c)||[]),this._pendingRequestDisposables.delete(c),y(A)):this._logService.warn(`RequestStore#acceptReply was called without receiving a matching request ${c}`)}};e.RequestStore=P,e.RequestStore=P=me([Ne(1,O.ILogService)],P)}),define(ce[26],he([0,1,20,35,83]),function(oe,e,w,I,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ITerminalLogService=e.ILocalPtyService=e.TerminalExtensions=e.TerminalExitReason=e.ShellIntegrationStatus=e.ProfileSource=e.FlowControlConstants=e.LocalReconnectConstants=e.TerminalLocationString=e.TerminalLocation=e.HeartbeatConstants=e.IPtyService=e.ProcessPropertyType=e.TerminalIpcChannels=e.TitleEventSource=e.WindowsShellType=e.PosixShellType=e.TerminalSettingId=e.TerminalSettingPrefix=e.terminalTabFocusModeContextKey=void 0,e.terminalTabFocusModeContextKey=new I.RawContextKey("terminalTabFocusMode",!1,!0);var k;(function(o){o.DefaultProfile="terminal.integrated.defaultProfile.",o.Profiles="terminal.integrated.profiles."})(k||(e.TerminalSettingPrefix=k={}));var O;(function(o){o.SendKeybindingsToShell="terminal.integrated.sendKeybindingsToShell",o.AutomationProfileLinux="terminal.integrated.automationProfile.linux",o.AutomationProfileMacOs="terminal.integrated.automationProfile.osx",o.AutomationProfileWindows="terminal.integrated.automationProfile.windows",o.ProfilesWindows="terminal.integrated.profiles.windows",o.ProfilesMacOs="terminal.integrated.profiles.osx",o.ProfilesLinux="terminal.integrated.profiles.linux",o.DefaultProfileLinux="terminal.integrated.defaultProfile.linux",o.DefaultProfileMacOs="terminal.integrated.defaultProfile.osx",o.DefaultProfileWindows="terminal.integrated.defaultProfile.windows",o.UseWslProfiles="terminal.integrated.useWslProfiles",o.TabsDefaultColor="terminal.integrated.tabs.defaultColor",o.TabsDefaultIcon="terminal.integrated.tabs.defaultIcon",o.TabsEnabled="terminal.integrated.tabs.enabled",o.TabsEnableAnimation="terminal.integrated.tabs.enableAnimation",o.TabsHideCondition="terminal.integrated.tabs.hideCondition",o.TabsShowActiveTerminal="terminal.integrated.tabs.showActiveTerminal",o.TabsShowActions="terminal.integrated.tabs.showActions",o.TabsLocation="terminal.integrated.tabs.location",o.TabsFocusMode="terminal.integrated.tabs.focusMode",o.MacOptionIsMeta="terminal.integrated.macOptionIsMeta",o.MacOptionClickForcesSelection="terminal.integrated.macOptionClickForcesSelection",o.AltClickMovesCursor="terminal.integrated.altClickMovesCursor",o.CopyOnSelection="terminal.integrated.copyOnSelection",o.EnableMultiLinePasteWarning="terminal.integrated.enableMultiLinePasteWarning",o.DrawBoldTextInBrightColors="terminal.integrated.drawBoldTextInBrightColors",o.FontFamily="terminal.integrated.fontFamily",o.FontSize="terminal.integrated.fontSize",o.LetterSpacing="terminal.integrated.letterSpacing",o.LineHeight="terminal.integrated.lineHeight",o.MinimumContrastRatio="terminal.integrated.minimumContrastRatio",o.TabStopWidth="terminal.integrated.tabStopWidth",o.FastScrollSensitivity="terminal.integrated.fastScrollSensitivity",o.MouseWheelScrollSensitivity="terminal.integrated.mouseWheelScrollSensitivity",o.BellDuration="terminal.integrated.bellDuration",o.FontWeight="terminal.integrated.fontWeight",o.FontWeightBold="terminal.integrated.fontWeightBold",o.CursorBlinking="terminal.integrated.cursorBlinking",o.CursorStyle="terminal.integrated.cursorStyle",o.CursorStyleInactive="terminal.integrated.cursorStyleInactive",o.CursorWidth="terminal.integrated.cursorWidth",o.Scrollback="terminal.integrated.scrollback",o.DetectLocale="terminal.integrated.detectLocale",o.DefaultLocation="terminal.integrated.defaultLocation",o.GpuAcceleration="terminal.integrated.gpuAcceleration",o.TerminalTitleSeparator="terminal.integrated.tabs.separator",o.TerminalTitle="terminal.integrated.tabs.title",o.TerminalDescription="terminal.integrated.tabs.description",o.RightClickBehavior="terminal.integrated.rightClickBehavior",o.Cwd="terminal.integrated.cwd",o.ConfirmOnExit="terminal.integrated.confirmOnExit",o.ConfirmOnKill="terminal.integrated.confirmOnKill",o.EnableBell="terminal.integrated.enableBell",o.CommandsToSkipShell="terminal.integrated.commandsToSkipShell",o.AllowChords="terminal.integrated.allowChords",o.AllowMnemonics="terminal.integrated.allowMnemonics",o.TabFocusMode="terminal.integrated.tabFocusMode",o.EnvMacOs="terminal.integrated.env.osx",o.EnvLinux="terminal.integrated.env.linux",o.EnvWindows="terminal.integrated.env.windows",o.EnvironmentChangesIndicator="terminal.integrated.environmentChangesIndicator",o.EnvironmentChangesRelaunch="terminal.integrated.environmentChangesRelaunch",o.ShowExitAlert="terminal.integrated.showExitAlert",o.SplitCwd="terminal.integrated.splitCwd",o.WindowsEnableConpty="terminal.integrated.windowsEnableConpty",o.WordSeparators="terminal.integrated.wordSeparators",o.EnableFileLinks="terminal.integrated.enableFileLinks",o.UnicodeVersion="terminal.integrated.unicodeVersion",o.LocalEchoLatencyThreshold="terminal.integrated.localEchoLatencyThreshold",o.LocalEchoEnabled="terminal.integrated.localEchoEnabled",o.LocalEchoExcludePrograms="terminal.integrated.localEchoExcludePrograms",o.LocalEchoStyle="terminal.integrated.localEchoStyle",o.EnablePersistentSessions="terminal.integrated.enablePersistentSessions",o.PersistentSessionReviveProcess="terminal.integrated.persistentSessionReviveProcess",o.HideOnStartup="terminal.integrated.hideOnStartup",o.CustomGlyphs="terminal.integrated.customGlyphs",o.PersistentSessionScrollback="terminal.integrated.persistentSessionScrollback",o.InheritEnv="terminal.integrated.inheritEnv",o.ShowLinkHover="terminal.integrated.showLinkHover",o.IgnoreProcessNames="terminal.integrated.ignoreProcessNames",o.AutoReplies="terminal.integrated.autoReplies",o.ShellIntegrationEnabled="terminal.integrated.shellIntegration.enabled",o.ShellIntegrationShowWelcome="terminal.integrated.shellIntegration.showWelcome",o.ShellIntegrationDecorationsEnabled="terminal.integrated.shellIntegration.decorationsEnabled",o.ShellIntegrationCommandHistory="terminal.integrated.shellIntegration.history",o.ShellIntegrationSuggestEnabled="terminal.integrated.shellIntegration.suggestEnabled",o.EnableImages="terminal.integrated.enableImages",o.SmoothScrolling="terminal.integrated.smoothScrolling",o.IgnoreBracketedPasteMode="terminal.integrated.ignoreBracketedPasteMode",o.FocusAfterRun="terminal.integrated.focusAfterRun",o.DeveloperPtyHostLatency="terminal.integrated.developer.ptyHost.latency",o.DeveloperPtyHostStartupDelay="terminal.integrated.developer.ptyHost.startupDelay",o.DevMode="terminal.integrated.developer.devMode"})(O||(e.TerminalSettingId=O={}));var P;(function(o){o.PowerShell="pwsh",o.Bash="bash",o.Fish="fish",o.Sh="sh",o.Csh="csh",o.Ksh="ksh",o.Zsh="zsh"})(P||(e.PosixShellType=P={}));var m;(function(o){o.CommandPrompt="cmd",o.PowerShell="pwsh",o.Wsl="wsl",o.GitBash="gitbash"})(m||(e.WindowsShellType=m={}));var c;(function(o){o[o.Api=0]="Api",o[o.Process=1]="Process",o[o.Sequence=2]="Sequence",o[o.Config=3]="Config"})(c||(e.TitleEventSource=c={}));var A;(function(o){o.LocalPty="localPty",o.PtyHost="ptyHost",o.PtyHostWindow="ptyHostWindow",o.Logger="logger",o.Heartbeat="heartbeat"})(A||(e.TerminalIpcChannels=A={}));var y;(function(o){o.Cwd="cwd",o.InitialCwd="initialCwd",o.FixedDimensions="fixedDimensions",o.Title="title",o.ShellType="shellType",o.HasChildProcesses="hasChildProcesses",o.ResolvedShellLaunchConfig="resolvedShellLaunchConfig",o.OverrideDimensions="overrideDimensions",o.FailedShellIntegrationActivation="failedShellIntegrationActivation",o.UsedShellIntegrationInjection="usedShellIntegrationInjection"})(y||(e.ProcessPropertyType=y={})),e.IPtyService=(0,w.createDecorator)("ptyService");var L;(function(o){o[o.BeatInterval=5e3]="BeatInterval",o[o.ConnectingBeatInterval=2e4]="ConnectingBeatInterval",o[o.FirstWaitMultiplier=1.2]="FirstWaitMultiplier",o[o.SecondWaitMultiplier=1]="SecondWaitMultiplier",o[o.CreateProcessTimeout=5e3]="CreateProcessTimeout"})(L||(e.HeartbeatConstants=L={}));var t;(function(o){o[o.Panel=1]="Panel",o[o.Editor=2]="Editor"})(t||(e.TerminalLocation=t={}));var u;(function(o){o.TerminalView="view",o.Editor="editor"})(u||(e.TerminalLocationString=u={}));var a;(function(o){o[o.GraceTime=6e4]="GraceTime",o[o.ShortGraceTime=6e3]="ShortGraceTime"})(a||(e.LocalReconnectConstants=a={}));var i;(function(o){o[o.HighWatermarkChars=1e5]="HighWatermarkChars",o[o.LowWatermarkChars=5e3]="LowWatermarkChars",o[o.CharCountAckSize=5e3]="CharCountAckSize"})(i||(e.FlowControlConstants=i={}));var v;(function(o){o.GitBash="Git Bash",o.Pwsh="PowerShell"})(v||(e.ProfileSource=v={}));var r;(function(o){o[o.Off=0]="Off",o[o.FinalTerm=1]="FinalTerm",o[o.VSCode=2]="VSCode"})(r||(e.ShellIntegrationStatus=r={}));var _;(function(o){o[o.Unknown=0]="Unknown",o[o.Shutdown=1]="Shutdown",o[o.Process=2]="Process",o[o.User=3]="User",o[o.Extension=4]="Extension"})(_||(e.TerminalExitReason=_={})),e.TerminalExtensions={Backend:"workbench.contributions.terminal.processBackend"};class C{constructor(){this._backends=new Map}get backends(){return this._backends}registerTerminalBackend(n){const h=this._sanitizeRemoteAuthority(n.remoteAuthority);if(this._backends.has(h))throw new Error(`A terminal backend with remote authority '${h}' was already registered.`);this._backends.set(h,n)}getTerminalBackend(n){return this._backends.get(this._sanitizeRemoteAuthority(n))}_sanitizeRemoteAuthority(n){return n?.toLowerCase()??""}}b.Registry.add(e.TerminalExtensions.Backend,new C),e.ILocalPtyService=(0,w.createDecorator)("localPtyService"),e.ITerminalLogService=(0,w.createDecorator)("terminalLogService")}),define(ce[92],he([0,1,9,3,2]),function(oe,e,w,I,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TerminalAutoResponder=void 0;class k extends I.Disposable{constructor(P,m,c,A){super(),this._pointer=0,this._paused=!1,this._throttled=!1,this._register(P.onProcessData(y=>{if(this._paused||this._throttled)return;const L=typeof y=="string"?y:y.data;for(let t=0;t<L.length;t++)L[t]===m[this._pointer]?this._pointer++:this._reset(),this._pointer===m.length&&(A.debug(`Auto reply match: "${m}", response: "${c}"`),P.input(c),this._throttled=!0,(0,w.timeout)(1e3).then(()=>this._throttled=!1),this._reset())}))}_reset(){this._pointer=0}handleResize(){b.isWindows&&(this._paused=!0)}handleInput(){this._paused=!1}}e.TerminalAutoResponder=k}),define(ce[93],he([0,1]),function(oe,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TerminalDataBufferer=void 0;class w{constructor(b){this._callback=b,this._terminalBufferMap=new Map}dispose(){for(const b of this._terminalBufferMap.values())b.dispose()}startBuffering(b,k,O=5){const P=k(m=>{const c=typeof m=="string"?m:m.data;let A=this._terminalBufferMap.get(b);if(A){A.data.push(c);return}const y=setTimeout(()=>this.flushBuffer(b),O);A={data:[c],timeoutId:y,dispose:()=>{clearTimeout(y),this.flushBuffer(b),P.dispose()}},this._terminalBufferMap.set(b,A)});return P}stopBuffering(b){this._terminalBufferMap.get(b)?.dispose()}flushBuffer(b){const k=this._terminalBufferMap.get(b);k&&(this._terminalBufferMap.delete(b),this._callback(b,k.data.join("")))}}e.TerminalDataBufferer=w}),define(ce[37],he([0,1,2]),function(oe,e,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.sanitizeCwd=e.collapseTildePath=e.escapeNonWindowsPath=void 0;function I(O){let P=O;P.includes("\\")&&(P=P.replace(/\\/g,"\\\\"));const m=/[\`\$\|\&\>\~\#\!\^\*\;\<\"\']/g;return P=P.replace(m,""),`'${P}'`}e.escapeNonWindowsPath=I;function b(O,P,m){if(!O)return"";if(!P)return O;P.match(/[\/\\]$/)&&(P=P.slice(0,P.length-1));const c=O.replace(/\\/g,"/").toLowerCase(),A=P.replace(/\\/g,"/").toLowerCase();return c.includes(A)?`~${m}${O.slice(P.length+1)}`:O}e.collapseTildePath=b;function k(O){return O.match(/^['"].*['"]$/)&&(O=O.substring(1,O.length-1)),w.OS===1&&O&&O[1]===":"?O[0].toUpperCase()+O.substring(1):O}e.sanitizeCwd=k}),define(ce[94],he([0,1]),function(oe,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.formatMessageForTerminal=void 0;function w(I,b={}){let k="";return b.excludeLeadingNewLine||(k+=`\r
`),k+="\x1B[0m\x1B[7m * ",b.loudFormatting?k+="\x1B[0;104m":k+="\x1B[0m",k+=` ${I} \x1B[0m
\r`,k}e.formatMessageForTerminal=w}),define(ce[95],he([0,1,3,88,85,86,87,4,84,5,37]),function(oe,e,w,I,b,k,O,P,m,c,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.parseMarkSequence=e.parseKeyValueAssignment=e.deserializeMessage=e.ShellIntegrationAddon=void 0;var y;(function(r){r[r.FinalTerm=133]="FinalTerm",r[r.VSCode=633]="VSCode",r[r.ITerm=1337]="ITerm",r[r.SetCwd=7]="SetCwd",r[r.SetWindowsFriendlyCwd=9]="SetWindowsFriendlyCwd"})(y||(y={}));var L;(function(r){r.PromptStart="A",r.CommandStart="B",r.CommandExecuted="C",r.CommandFinished="D",r.CommandLine="E",r.ContinuationStart="F",r.ContinuationEnd="G",r.RightPromptStart="H",r.RightPromptEnd="I",r.Property="P",r.SetMark="SetMark"})(L||(L={}));var t;(function(r){r.SetMark="SetMark",r.CurrentDir="CurrentDir"})(t||(t={}));class u extends w.Disposable{get status(){return this._status}constructor(_,C,o,n){super(),this._nonce=_,this._disableTelemetry=C,this._telemetryService=o,this._logService=n,this.capabilities=new I.TerminalCapabilityStore,this._hasUpdatedTelemetry=!1,this._commonProtocolDisposables=[],this._status=0,this._onDidChangeStatus=new P.Emitter,this.onDidChangeStatus=this._onDidChangeStatus.event,this._register((0,w.toDisposable)(()=>{this._clearActivationTimeout(),this._disposeCommonProtocol()}))}_disposeCommonProtocol(){(0,w.dispose)(this._commonProtocolDisposables),this._commonProtocolDisposables.length=0}activate(_){this._terminal=_,this.capabilities.add(3,new O.PartialCommandDetectionCapability(this._terminal)),this._register(_.parser.registerOscHandler(633,C=>this._handleVSCodeSequence(C))),this._register(_.parser.registerOscHandler(1337,C=>this._doHandleITermSequence(C))),this._commonProtocolDisposables.push(_.parser.registerOscHandler(133,C=>this._handleFinalTermSequence(C))),this._register(_.parser.registerOscHandler(7,C=>this._doHandleSetCwd(C))),this._register(_.parser.registerOscHandler(9,C=>this._doHandleSetWindowsFriendlyCwd(C))),this._ensureCapabilitiesOrAddFailureTelemetry()}getMarkerId(_,C){this._createOrGetBufferMarkDetection(_).getMark(C)}_handleFinalTermSequence(_){const C=this._doHandleFinalTermSequence(_);return this._status===0&&(this._status=1,this._onDidChangeStatus.fire(this._status)),C}_doHandleFinalTermSequence(_){if(!this._terminal)return!1;const[C,...o]=_.split(";");switch(C){case"A":return this._createOrGetCommandDetection(this._terminal).handlePromptStart(),!0;case"B":return this._createOrGetCommandDetection(this._terminal).handleCommandStart({ignoreCommandLine:!0}),!0;case"C":return this._createOrGetCommandDetection(this._terminal).handleCommandExecuted(),!0;case"D":{const n=o.length===1?parseInt(o[0]):void 0;return this._createOrGetCommandDetection(this._terminal).handleCommandFinished(n),!0}}return!1}_handleVSCodeSequence(_){const C=this._doHandleVSCodeSequence(_);return!this._hasUpdatedTelemetry&&C&&(this._telemetryService?.publicLog2("terminal/shellIntegrationActivationSucceeded"),this._hasUpdatedTelemetry=!0,this._clearActivationTimeout()),this._status!==2&&(this._status=2,this._onDidChangeStatus.fire(this._status)),C}async _ensureCapabilitiesOrAddFailureTelemetry(){!this._telemetryService||this._disableTelemetry||(this._activationTimeout=setTimeout(()=>{!this.capabilities.get(2)&&!this.capabilities.get(0)&&(this._telemetryService?.publicLog2("terminal/shellIntegrationActivationTimeout"),this._logService.warn("Shell integration failed to add capabilities within 10 seconds")),this._hasUpdatedTelemetry=!0},1e4))}_clearActivationTimeout(){this._activationTimeout!==void 0&&(clearTimeout(this._activationTimeout),this._activationTimeout=void 0)}_doHandleVSCodeSequence(_){if(!this._terminal)return!1;const C=_.indexOf(";"),o=C===-1?_:_.substring(0,C),n=C===-1?[]:_.substring(C+1).split(";");switch(o){case"A":return this._createOrGetCommandDetection(this._terminal).handlePromptStart(),!0;case"B":return this._createOrGetCommandDetection(this._terminal).handleCommandStart(),!0;case"C":return this._createOrGetCommandDetection(this._terminal).handleCommandExecuted(),!0;case"D":{const h=n[0],S=h!==void 0?parseInt(h):void 0;return this._createOrGetCommandDetection(this._terminal).handleCommandFinished(S),!0}case"E":{const h=n[0],S=n[1];let p;return h!==void 0?p=a(h):p="",this._createOrGetCommandDetection(this._terminal).setCommandLine(p,S===this._nonce),!0}case"F":return this._createOrGetCommandDetection(this._terminal).handleContinuationStart(),!0;case"G":return this._createOrGetCommandDetection(this._terminal).handleContinuationEnd(),!0;case"H":return this._createOrGetCommandDetection(this._terminal).handleRightPromptStart(),!0;case"I":return this._createOrGetCommandDetection(this._terminal).handleRightPromptEnd(),!0;case"P":{const h=n[0],S=h!==void 0?a(h):"",{key:p,value:D}=i(S);if(D===void 0)return!0;switch(p){case"Cwd":return this._updateCwd(D),!0;case"IsWindows":return this._createOrGetCommandDetection(this._terminal).setIsWindowsPty(D==="True"),!0;case"Task":return this._createOrGetBufferMarkDetection(this._terminal),this.capabilities.get(2)?.setIsCommandStorageDisabled(),!0}}case"SetMark":return this._createOrGetBufferMarkDetection(this._terminal).addMark(v(n)),!0}return!1}_updateCwd(_){_=(0,A.sanitizeCwd)(_),this._createOrGetCwdDetection().updateCwd(_),this.capabilities.get(2)?.setCwd(_)}_doHandleITermSequence(_){if(!this._terminal)return!1;const[C]=_.split(";");switch(C){case"SetMark":this._createOrGetBufferMarkDetection(this._terminal).addMark();default:{const{key:o,value:n}=i(C);if(n===void 0)return!0;switch(o){case"CurrentDir":return this._updateCwd(n),!0}}}return!1}_doHandleSetWindowsFriendlyCwd(_){if(!this._terminal)return!1;const[C,...o]=_.split(";");switch(C){case"9":return o.length&&this._updateCwd(o[0]),!0}return!1}_doHandleSetCwd(_){if(!this._terminal)return!1;const[C]=_.split(";");if(C.match(/^file:\/\/.*\//)){const o=c.URI.parse(C);if(o.path&&o.path.length>0)return this._updateCwd(o.path),!0}return!1}serialize(){return!this._terminal||!this.capabilities.has(2)?{isWindowsPty:!1,commands:[]}:this._createOrGetCommandDetection(this._terminal).serialize()}deserialize(_){if(!this._terminal)throw new Error("Cannot restore commands before addon is activated");this._createOrGetCommandDetection(this._terminal).deserialize(_)}_createOrGetCwdDetection(){let _=this.capabilities.get(0);return _||(_=this._register(new k.CwdDetectionCapability),this.capabilities.add(0,_)),_}_createOrGetCommandDetection(_){let C=this.capabilities.get(2);return C||(C=this._register(new b.CommandDetectionCapability(_,this._logService)),this.capabilities.add(2,C)),C}_createOrGetBufferMarkDetection(_){let C=this.capabilities.get(4);return C||(C=this._register(new m.BufferMarkCapability(_)),this.capabilities.add(4,C)),C}}e.ShellIntegrationAddon=u;function a(r){return r.replaceAll(/\\(\\|x([0-9a-f]{2}))/gi,(_,C,o)=>o?String.fromCharCode(parseInt(o,16)):C)}e.deserializeMessage=a;function i(r){const _=r.indexOf("=");return _===-1?{key:r,value:void 0}:{key:r.substring(0,_),value:r.substring(1+_)}}e.parseKeyValueAssignment=i;function v(r){let _,C=!1;for(const o of r)o!==void 0&&(o==="Hidden"&&(C=!0),o.startsWith("Id=")&&(_=o.substring(3)));return{id:_,hidden:C}}e.parseMarkSequence=v}),define(ce[38],he([0,1,7,14,4,3,60,11]),function(oe,e,w,I,b,k,O,P){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ChildProcessMonitor=e.ignoreProcessNames=void 0;var m;(function(A){A[A.InactiveThrottleDuration=5e3]="InactiveThrottleDuration",A[A.ActiveDebounceDuration=1e3]="ActiveDebounceDuration"})(m||(m={})),e.ignoreProcessNames=[];let c=class extends k.Disposable{set hasChildProcesses(y){this._hasChildProcesses!==y&&(this._hasChildProcesses=y,this._logService.debug("ChildProcessMonitor: Has child processes changed",y),this._onDidChangeHasChildProcesses.fire(y))}get hasChildProcesses(){return this._hasChildProcesses}constructor(y,L){super(),this._pid=y,this._logService=L,this._isDisposed=!1,this._hasChildProcesses=!1,this._onDidChangeHasChildProcesses=this._register(new b.Emitter),this.onDidChangeHasChildProcesses=this._onDidChangeHasChildProcesses.event}dispose(){this._isDisposed=!0,super.dispose()}handleInput(){this._refreshActive()}handleOutput(){this._refreshInactive()}async _refreshActive(){if(!this._isDisposed)try{const y=await(0,O.listProcesses)(this._pid);this.hasChildProcesses=this._processContainsChildren(y)}catch(y){this._logService.debug("ChildProcessMonitor: Fetching process tree failed",y)}}_refreshInactive(){this._refreshActive()}_processContainsChildren(y){if(!y.children)return!1;if(y.children.length===1){const L=y.children[0];let t;if(L.cmd.startsWith('"'))t=L.cmd.substring(1,L.cmd.indexOf('"',1));else{const u=L.cmd.indexOf(" ");u===-1?t=L.cmd:t=L.cmd.substring(0,u)}return e.ignoreProcessNames.indexOf((0,w.parse)(t).name)===-1}return y.children.length>0}};e.ChildProcessMonitor=c,me([(0,I.debounce)(1e3)],c.prototype,"_refreshActive",null),me([(0,I.throttle)(5e3)],c.prototype,"_refreshInactive",null),e.ChildProcessMonitor=c=me([Ne(1,P.ILogService)],c)}),define(ce[96],he([0,1,4,3,26]),function(oe,e,w,I,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HeartbeatService=void 0;class k extends I.Disposable{constructor(){super(),this._onBeat=this._register(new w.Emitter),this.onBeat=this._onBeat.event;const P=setInterval(()=>{this._onBeat.fire()},b.HeartbeatConstants.BeatInterval);this._register((0,I.toDisposable)(()=>clearInterval(P)))}}e.HeartbeatService=k}),define(ce[39],he([0,1,19,18,30,7,2,15,12,8,23,36,90,89]),function(oe,e,w,I,b,k,O,P,m,c,A,y,L,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getShellIntegrationInjection=e.findExecutable=e.getWindowsBuildNumber=void 0;function u(){const p=/(\d+)\.(\d+)\.(\d+)/g.exec(w.release());let D=0;return p&&p.length===4&&(D=parseInt(p[3])),D}e.getWindowsBuildNumber=u;async function a(p,D,f,g=P.env,M=A.Promises.exists){if(k.isAbsolute(p))return await M(p)?p:void 0;if(D===void 0&&(D=P.cwd()),k.dirname(p)!=="."){const B=k.join(D,p);return await M(B)?B:void 0}const l=(0,b.getCaseInsensitive)(g,"PATH");if(f===void 0&&(0,c.isString)(l)&&(f=l.split(k.delimiter)),f===void 0||f.length===0){const B=k.join(D,p);return await M(B)?B:void 0}for(const B of f){let V;if(k.isAbsolute(B)?V=k.join(B,p):V=k.join(D,B,p),await M(V))return V;if(O.isWindows){let T=V+".com";if(await M(T)||(T=V+".exe",await M(T)))return T}}const E=k.join(D,p);return await M(E)?E:void 0}e.findExecutable=a;function i(p,D,f,g,M){const F=O.isWindows&&(!D.windowsEnableConpty||u()<18309);if(!D.shellIntegration.enabled||!p.executable||p.isFeatureTerminal||p.hideFromUser||p.ignoreShellIntegration||F)return;const l=p.args,E=P.platform==="win32"?k.basename(p.executable).toLowerCase():k.basename(p.executable),B=k.dirname(I.FileAccess.asFileUri("").fsPath);let V;const T={VSCODE_INJECTION:"1"};if(D.shellIntegration.nonce&&(T.VSCODE_NONCE=D.shellIntegration.nonce),O.isWindows){if(E==="pwsh.exe"||E==="powershell.exe")return!l||h(l)?V=_.get(r.WindowsPwsh):n(l)&&(V=_.get(r.WindowsPwshLogin)),V?(V=[...V],V[V.length-1]=(0,m.format)(V[V.length-1],B,""),{newArgs:V,envMixin:T}):void 0;g.warn(`Shell integration cannot be enabled for executable "${p.executable}" and args`,p.args);return}switch(E){case"bash":return!l||l.length===0?V=_.get(r.Bash):S(l)&&(T.VSCODE_SHELL_LOGIN="1",v(D,T),V=_.get(r.Bash)),V?(V=[...V],V[V.length-1]=(0,m.format)(V[V.length-1],B),{newArgs:V,envMixin:T}):void 0;case"fish":return;case"pwsh":return!l||h(l)?V=_.get(r.Pwsh):n(l)&&(V=_.get(r.PwshLogin)),V?(V=[...V],V[V.length-1]=(0,m.format)(V[V.length-1],B,""),{newArgs:V,envMixin:T}):void 0;case"zsh":{if(!l||l.length===0?V=_.get(r.Zsh):S(l)?(V=_.get(r.ZshLogin),v(D,T)):(l===_.get(r.Zsh)||l===_.get(r.ZshLogin))&&(V=l),!V)return;V=[...V],V[V.length-1]=(0,m.format)(V[V.length-1],B);let q;try{q=w.userInfo().username}catch{q="unknown"}const J=k.join(w.tmpdir(),`${q}-${M.applicationName}-zsh`);T.ZDOTDIR=J;const x=f?.ZDOTDIR??w.homedir()??"~";T.USER_ZDOTDIR=x;const Q=[];return Q.push({source:k.join(B,"out/vs/workbench/contrib/terminal/browser/media/shellIntegration-rc.zsh"),dest:k.join(J,".zshrc")}),Q.push({source:k.join(B,"out/vs/workbench/contrib/terminal/browser/media/shellIntegration-profile.zsh"),dest:k.join(J,".zprofile")}),Q.push({source:k.join(B,"out/vs/workbench/contrib/terminal/browser/media/shellIntegration-env.zsh"),dest:k.join(J,".zshenv")}),Q.push({source:k.join(B,"out/vs/workbench/contrib/terminal/browser/media/shellIntegration-login.zsh"),dest:k.join(J,".zlogin")}),{newArgs:V,envMixin:T,filesToCopy:Q}}}g.warn(`Shell integration cannot be enabled for executable "${p.executable}" and args`,p.args)}e.getShellIntegrationInjection=i;function v(p,D){if(O.isMacintosh&&p.environmentVariableCollections){const f=(0,L.deserializeEnvironmentVariableCollections)(p.environmentVariableCollections),M=new t.MergedEnvironmentVariableCollection(f).getVariableMap({workspaceFolder:p.workspaceFolder}).get("PATH"),F=[];if(M)for(const l of M)l.type===y.EnvironmentVariableMutatorType.Prepend&&F.push(l.value);F.length>0&&(D.VSCODE_PATH_PREFIX=F.join(""))}}var r;(function(p){p.WindowsPwsh="windows-pwsh",p.WindowsPwshLogin="windows-pwsh-login",p.Pwsh="pwsh",p.PwshLogin="pwsh-login",p.Zsh="zsh",p.ZshLogin="zsh-login",p.Bash="bash"})(r||(r={}));const _=new Map;_.set(r.WindowsPwsh,["-noexit","-command",'try { . "{0}\\out\\vs\\workbench\\contrib\\terminal\\browser\\media\\shellIntegration.ps1" } catch {}{1}']),_.set(r.WindowsPwshLogin,["-l","-noexit","-command",'try { . "{0}\\out\\vs\\workbench\\contrib\\terminal\\browser\\media\\shellIntegration.ps1" } catch {}{1}']),_.set(r.Pwsh,["-noexit","-command",'. "{0}/out/vs/workbench/contrib/terminal/browser/media/shellIntegration.ps1"{1}']),_.set(r.PwshLogin,["-l","-noexit","-command",'. "{0}/out/vs/workbench/contrib/terminal/browser/media/shellIntegration.ps1"']),_.set(r.Zsh,["-i"]),_.set(r.ZshLogin,["-il"]),_.set(r.Bash,["--init-file","{0}/out/vs/workbench/contrib/terminal/browser/media/shellIntegration-bash.sh"]);const C=["-login","-l"],o=["-nol","-nologo"];function n(p){return typeof p=="string"?C.includes(p.toLowerCase()):p.length===1&&C.includes(p[0].toLowerCase())||p.length===2&&(C.includes(p[0].toLowerCase())||C.includes(p[1].toLowerCase()))&&(o.includes(p[0].toLowerCase())||o.includes(p[1].toLowerCase()))}function h(p){return typeof p=="string"?o.includes(p.toLowerCase()):p.length===0||p?.length===1&&o.includes(p[0].toLowerCase())}function S(p){return p==="string"&&C.includes(p.toLowerCase())||typeof p!="string"&&p.length===1&&C.includes(p[0].toLowerCase())}}),define(ce[97],he([0,1,9,14,4,3,2]),function(oe,e,w,I,b,k,O){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WindowsShellHelper=void 0;const P=["cmd.exe","powershell.exe","pwsh.exe","bash.exe","wsl.exe","ubuntu.exe","ubuntu1804.exe","kali.exe","debian.exe","opensuse-42.exe","sles-12.exe"];let m;class c extends k.Disposable{get shellType(){return this._shellType}get shellTitle(){return this._shellTitle}get onShellNameChanged(){return this._onShellNameChanged.event}get onShellTypeChanged(){return this._onShellTypeChanged.event}constructor(y){if(super(),this._rootProcessId=y,this._shellTitle="",this._onShellNameChanged=new b.Emitter,this._onShellTypeChanged=new b.Emitter,!O.isWindows)throw new Error(`WindowsShellHelper cannot be instantiated on ${O.platform}`);this._isDisposed=!1,this._startMonitoringShell()}async _startMonitoringShell(){this._isDisposed||this.checkShell()}async checkShell(){O.isWindows&&(await(0,w.timeout)(300),this.getShellName().then(y=>{const L=this.getShellType(y);L!==this._shellType&&(this._onShellTypeChanged.fire(L),this._onShellNameChanged.fire(y),this._shellType=L,this._shellTitle=y)}))}traverseTree(y){if(!y)return"";if(P.indexOf(y.name)===-1||!y.children||y.children.length===0)return y.name;let L=0;for(;L<y.children.length;L++){const t=y.children[L];if(!t.children||t.children.length===0||t.children[0].name!=="conhost.exe")break}return L>=y.children.length?y.name:this.traverseTree(y.children[L])}dispose(){this._isDisposed=!0,super.dispose()}async getShellName(){return this._isDisposed?Promise.resolve(""):this._currentRequest?this._currentRequest:(m||(m=await new Promise((y,L)=>{oe(["@vscode/windows-process-tree"],y,L)})),this._currentRequest=new Promise(y=>{m.getProcessTree(this._rootProcessId,L=>{const t=this.traverseTree(L);this._currentRequest=void 0,y(t)})}),this._currentRequest)}getShellType(y){switch(y.toLowerCase()){case"cmd.exe":return"cmd";case"powershell.exe":case"pwsh.exe":return"pwsh";case"bash.exe":case"git-cmd.exe":return"gitbash";case"wsl.exe":case"ubuntu.exe":case"ubuntu1804.exe":case"kali.exe":case"debian.exe":case"opensuse-42.exe":case"sles-12.exe":return"wsl";default:return}}}e.WindowsShellHelper=c,me([(0,I.debounce)(500)],c.prototype,"checkShell",null)}),define(ce[98],he([0,1,24,9,4,3,7,2,5,23,69,11,82,38,39,97,103]),function(oe,e,w,I,b,k,O,P,m,c,A,y,L,t,u,a,i){"use strict";var v;Object.defineProperty(e,"__esModule",{value:!0}),e.TerminalProcess=void 0;var r;(function(h){h[h.DataFlushTimeout=250]="DataFlushTimeout",h[h.MaximumShutdownTime=5e3]="MaximumShutdownTime"})(r||(r={}));var _;(function(h){h[h.KillSpawnThrottleInterval=250]="KillSpawnThrottleInterval",h[h.KillSpawnSpacingDuration=50]="KillSpawnSpacingDuration",h[h.WriteMaxChunkSize=50]="WriteMaxChunkSize",h[h.WriteInterval=5]="WriteInterval"})(_||(_={}));const C=new Map([["bash","bash"],["csh","csh"],["fish","fish"],["ksh","ksh"],["sh","sh"],["pwsh","pwsh"],["zsh","zsh"]]);let o=class extends k.Disposable{static{v=this}static{this._lastKillOrStart=0}get exitMessage(){return this._exitMessage}get currentTitle(){return this._windowsShellHelper?.shellTitle||this._currentTitle}get shellType(){return P.isWindows?this._windowsShellHelper?.shellType:C.get(this._currentTitle)}get hasChildProcesses(){return this._childProcessMonitor?.hasChildProcesses||!1}constructor(S,p,D,f,g,M,F,l,E){super(),this.shellLaunchConfig=S,this._executableEnv=M,this._options=F,this._logService=l,this._productService=E,this.id=0,this.shouldPersist=!1,this._properties={cwd:"",initialCwd:"",fixedDimensions:{cols:void 0,rows:void 0},title:"",shellType:void 0,hasChildProcesses:!0,resolvedShellLaunchConfig:{},overrideDimensions:void 0,failedShellIntegrationActivation:!1,usedShellIntegrationInjection:void 0},this._currentTitle="",this._isDisposed=!1,this._titleInterval=null,this._writeQueue=[],this._isPtyPaused=!1,this._unacknowledgedCharCount=0,this._onProcessData=this._register(new b.Emitter),this.onProcessData=this._onProcessData.event,this._onProcessReady=this._register(new b.Emitter),this.onProcessReady=this._onProcessReady.event,this._onDidChangeProperty=this._register(new b.Emitter),this.onDidChangeProperty=this._onDidChangeProperty.event,this._onProcessExit=this._register(new b.Emitter),this.onProcessExit=this._onProcessExit.event;let B;P.isWindows?B=O.basename(this.shellLaunchConfig.executable||""):B="xterm-256color",this._initialCwd=p,this._properties.initialCwd=this._initialCwd,this._properties.cwd=this._initialCwd;const V=this._options.windowsEnableConpty&&process.platform==="win32"&&(0,u.getWindowsBuildNumber)()>=18309;this._ptyOptions={name:B,cwd:p,env:g,cols:D,rows:f,useConpty:V,conptyInheritCursor:V&&!!S.initialText},P.isWindows&&(V&&D===0&&f===0&&this.shellLaunchConfig.executable?.endsWith("Git\\bin\\bash.exe")&&(this._delayedResizer=new n,this._register(this._delayedResizer.onTrigger(T=>{this._delayedResizer?.dispose(),this._delayedResizer=void 0,T.cols&&T.rows&&this.resize(T.cols,T.rows)}))),this.onProcessReady(T=>{this._windowsShellHelper=this._register(new a.WindowsShellHelper(T.pid)),this._register(this._windowsShellHelper.onShellTypeChanged(q=>this._onDidChangeProperty.fire({type:"shellType",value:q}))),this._register(this._windowsShellHelper.onShellNameChanged(q=>this._onDidChangeProperty.fire({type:"title",value:q})))}))}async start(){const p=(await Promise.all([this._validateCwd(),this._validateExecutable()])).find(f=>f!==void 0);if(p)return p;let D;if(this._options.shellIntegration.enabled)if(D=(0,u.getShellIntegrationInjection)(this.shellLaunchConfig,this._options,this._ptyOptions.env,this._logService,this._productService),D){if(this._onDidChangeProperty.fire({type:"usedShellIntegrationInjection",value:!0}),D.envMixin)for(const[f,g]of Object.entries(D.envMixin))this._ptyOptions.env||={},this._ptyOptions.env[f]=g;if(D.filesToCopy)for(const f of D.filesToCopy){await c.Promises.mkdir(O.dirname(f.dest),{recursive:!0});try{await c.Promises.copyFile(f.source,f.dest)}catch{}}}else this._onDidChangeProperty.fire({type:"failedShellIntegrationActivation",value:!0});try{return await this.setupPtyProcess(this.shellLaunchConfig,this._ptyOptions,D),D?.newArgs?{injectedArgs:D.newArgs}:void 0}catch(f){return this._logService.trace("node-pty.node-pty.IPty#spawn native exception",f),{message:`A native exception occurred during launch (${f.message})`}}}async _validateCwd(){try{if(!(await c.Promises.stat(this._initialCwd)).isDirectory())return{message:(0,A.localize)(0,null,this._initialCwd.toString())}}catch(S){if(S?.code==="ENOENT")return{message:(0,A.localize)(1,null,this._initialCwd.toString())}}this._onDidChangeProperty.fire({type:"initialCwd",value:this._initialCwd})}async _validateExecutable(){const S=this.shellLaunchConfig;if(!S.executable)throw new Error("IShellLaunchConfig.executable not set");const p=S.cwd instanceof m.URI?S.cwd.path:S.cwd,D=S.env&&S.env.PATH?S.env.PATH.split(O.delimiter):void 0,f=await(0,u.findExecutable)(S.executable,p,D,this._executableEnv);if(!f)return{message:(0,A.localize)(2,null,S.executable)};try{const g=await c.Promises.stat(f);if(!g.isFile()&&!g.isSymbolicLink())return{message:(0,A.localize)(3,null,S.executable)};S.executable=f}catch(g){if(g?.code!=="EACCES")throw g}}async setupPtyProcess(S,p,D){const f=D?.newArgs||S.args||[];await this._throttleKillSpawn(),this._logService.trace("node-pty.IPty#spawn",S.executable,f,p);const g=(0,i.spawn)(S.executable,f,p);this._ptyProcess=g,this._childProcessMonitor=this._register(new t.ChildProcessMonitor(g.pid,this._logService)),this._childProcessMonitor.onDidChangeHasChildProcesses(M=>this._onDidChangeProperty.fire({type:"hasChildProcesses",value:M})),this._processStartupComplete=new Promise(M=>{this.onProcessReady(()=>M())}),g.onData(M=>{this._unacknowledgedCharCount+=M.length,!this._isPtyPaused&&this._unacknowledgedCharCount>1e5&&(this._logService.trace(`Flow control: Pause (${this._unacknowledgedCharCount} > 100000)`),this._isPtyPaused=!0,g.pause()),this._logService.trace("node-pty.IPty#onData",M),this._onProcessData.fire(M),this._closeTimeout&&this._queueProcessExit(),this._windowsShellHelper?.checkShell(),this._childProcessMonitor?.handleOutput()}),g.onExit(M=>{this._exitCode=M.exitCode,this._queueProcessExit()}),this._sendProcessId(g.pid),this._setupTitlePolling(g)}dispose(){this._isDisposed=!0,this._titleInterval&&clearInterval(this._titleInterval),this._titleInterval=null,super.dispose()}_setupTitlePolling(S){setTimeout(()=>this._sendProcessTitle(S)),P.isWindows||(this._titleInterval=setInterval(()=>{this._currentTitle!==S.process&&this._sendProcessTitle(S)},200))}_queueProcessExit(){this._logService.getLevel()===y.LogLevel.Trace&&this._logService.trace("TerminalProcess#_queueProcessExit",new Error().stack?.replace(/^Error/,"")),this._closeTimeout&&clearTimeout(this._closeTimeout),this._closeTimeout=setTimeout(()=>{this._closeTimeout=void 0,this._kill()},250)}async _kill(){if(await this._processStartupComplete,!this._isDisposed){try{this._ptyProcess&&(await this._throttleKillSpawn(),this._logService.trace("node-pty.IPty#kill"),this._ptyProcess.kill())}catch{}this._onProcessExit.fire(this._exitCode||0),this.dispose()}}async _throttleKillSpawn(){if(!(!P.isWindows||!("useConpty"in this._ptyOptions)||!this._ptyOptions.useConpty)){for(;Date.now()-v._lastKillOrStart<250;)this._logService.trace("Throttling kill/spawn call"),await(0,I.timeout)(250-(Date.now()-v._lastKillOrStart)+50);v._lastKillOrStart=Date.now()}}_sendProcessId(S){this._onProcessReady.fire({pid:S,cwd:this._initialCwd,windowsPty:this.getWindowsPty()})}_sendProcessTitle(S){if(this._isDisposed)return;this._currentTitle=S.process,this._onDidChangeProperty.fire({type:"title",value:this._currentTitle});const p=this.currentTitle.replace(/ \(figterm\)$/g,"");this._onDidChangeProperty.fire({type:"shellType",value:C.get(p)})}shutdown(S){this._logService.getLevel()===y.LogLevel.Trace&&this._logService.trace("TerminalProcess#shutdown",new Error().stack?.replace(/^Error/,"")),S&&!P.isWindows?this._kill():!this._closeTimeout&&!this._isDisposed&&(this._queueProcessExit(),setTimeout(()=>{this._closeTimeout&&!this._isDisposed&&(this._closeTimeout=void 0,this._kill())},5e3))}input(S,p){if(!(this._isDisposed||!this._ptyProcess)){for(let D=0;D<=Math.floor(S.length/50);D++){const f={isBinary:p||!1,data:S.substr(D*50,50)};this._writeQueue.push(f)}this._startWrite()}}async processBinary(S){this.input(S,!0)}async refreshProperty(S){switch(S){case"cwd":{const p=await this.getCwd();return p!==this._properties.cwd&&(this._properties.cwd=p,this._onDidChangeProperty.fire({type:"cwd",value:this._properties.cwd})),p}case"initialCwd":{const p=await this.getInitialCwd();return p!==this._properties.initialCwd&&(this._properties.initialCwd=p,this._onDidChangeProperty.fire({type:"initialCwd",value:this._properties.initialCwd})),p}case"title":return this.currentTitle;default:return this.shellType}}async updateProperty(S,p){S==="fixedDimensions"&&(this._properties.fixedDimensions=p)}_startWrite(){if(!(this._writeTimeout!==void 0||this._writeQueue.length===0)){if(this._doWrite(),this._writeQueue.length===0){this._writeTimeout=void 0;return}this._writeTimeout=setTimeout(()=>{this._writeTimeout=void 0,this._startWrite()},5)}}_doWrite(){const S=this._writeQueue.shift();this._logService.trace("node-pty.IPty#write",S.data),S.isBinary?this._ptyProcess.write(Buffer.from(S.data,"binary")):this._ptyProcess.write(S.data),this._childProcessMonitor?.handleInput()}resize(S,p){if(!this._isDisposed&&!(typeof S!="number"||typeof p!="number"||isNaN(S)||isNaN(p))&&this._ptyProcess){if(S=Math.max(S,1),p=Math.max(p,1),this._delayedResizer){this._delayedResizer.cols=S,this._delayedResizer.rows=p;return}this._logService.trace("node-pty.IPty#resize",S,p);try{this._ptyProcess.resize(S,p)}catch(D){if(this._logService.trace("node-pty.IPty#resize exception "+D.message),this._exitCode!==void 0&&D.message!=="ioctl(2) failed, EBADF"&&D.message!=="Cannot resize a pty that has already exited")throw D}}}clearBuffer(){this._ptyProcess?.clear()}acknowledgeDataEvent(S){this._unacknowledgedCharCount=Math.max(this._unacknowledgedCharCount-S,0),this._logService.trace(`Flow control: Ack ${S} chars (unacknowledged: ${this._unacknowledgedCharCount})`),this._isPtyPaused&&this._unacknowledgedCharCount<5e3&&(this._logService.trace(`Flow control: Resume (${this._unacknowledgedCharCount} < 5000)`),this._ptyProcess?.resume(),this._isPtyPaused=!1)}clearUnacknowledgedChars(){this._unacknowledgedCharCount=0,this._logService.trace("Flow control: Cleared all unacknowledged chars, forcing resume"),this._isPtyPaused&&(this._ptyProcess?.resume(),this._isPtyPaused=!1)}async setUnicodeVersion(S){}getInitialCwd(){return Promise.resolve(this._initialCwd)}async getCwd(){if(P.isMacintosh)return new Promise(S=>{if(!this._ptyProcess){S(this._initialCwd);return}this._logService.trace("node-pty.IPty#pid"),(0,w.exec)("lsof -OPln -p "+this._ptyProcess.pid+" | grep cwd",{env:{...process.env,LANG:"en_US.UTF-8"}},(p,D,f)=>{!p&&D!==""?S(D.substring(D.indexOf("/"),D.length-1)):(this._logService.error("lsof did not run successfully, it may not be on the $PATH?",p,D,f),S(this._initialCwd))})});if(P.isLinux){if(!this._ptyProcess)return this._initialCwd;this._logService.trace("node-pty.IPty#pid");try{return await c.Promises.readlink(`/proc/${this._ptyProcess.pid}/cwd`)}catch{return this._initialCwd}}return this._initialCwd}getWindowsPty(){return P.isWindows?{backend:"useConpty"in this._ptyOptions&&this._ptyOptions.useConpty?"conpty":"winpty",buildNumber:(0,u.getWindowsBuildNumber)()}:void 0}};e.TerminalProcess=o,e.TerminalProcess=o=v=me([Ne(7,y.ILogService),Ne(8,L.IProductService)],o);class n extends k.Disposable{get onTrigger(){return this._onTrigger.event}constructor(){super(),this._onTrigger=this._register(new b.Emitter),this._timeout=setTimeout(()=>{this._onTrigger.fire({rows:this.rows,cols:this.cols})},1e3),this._register({dispose:()=>{clearTimeout(this._timeout)}})}dispose(){super.dispose(),clearTimeout(this._timeout)}}}),define(ce[99],he([0,1,24,9,4,3,2,61,11,91,26,93,37,104,39,98,68,38,92,6,95,94,74,14,105]),function(oe,e,w,I,b,k,O,P,m,c,A,y,L,t,u,a,i,v,r,_,C,o,n,h,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PtyService=e.traceRpc=void 0;function p(V,T,q){if(typeof q.value!="function")throw new Error("not supported");const J="value",x=q.value;q[J]=async function(...Q){this.traceRpcArgs.logService.getLevel()===m.LogLevel.Trace&&this.traceRpcArgs.logService.trace(`[RPC Request] PtyService#${x.name}(${Q.map(ue=>JSON.stringify(ue)).join(", ")})`),this.traceRpcArgs.simulatedLatency&&await(0,I.timeout)(this.traceRpcArgs.simulatedLatency);let ne;try{ne=await x.apply(this,Q)}catch(ue){throw this.traceRpcArgs.logService.error(`[RPC Response] PtyService#${x.name}`,ue),ue}return this.traceRpcArgs.logService.getLevel()===m.LogLevel.Trace&&this.traceRpcArgs.logService.trace(`[RPC Response] PtyService#${x.name}`,ne),ne}}e.traceRpc=p;let D,f;class g extends k.Disposable{_traceEvent(T,q){return q(J=>{this._logService.getLevel()===m.LogLevel.Trace&&this._logService.trace(`[RPC Event] PtyService#${T}.fire(${JSON.stringify(J)})`)}),q}get traceRpcArgs(){return{logService:this._logService,simulatedLatency:this._simulatedLatency}}constructor(T,q,J,x){super(),this._logService=T,this._productService=q,this._reconnectConstants=J,this._simulatedLatency=x,this._ptys=new Map,this._workspaceLayoutInfos=new Map,this._revivedPtyIdMap=new Map,this._autoReplies=new Map,this._lastPtyId=0,this._onHeartbeat=this._register(new b.Emitter),this.onHeartbeat=this._traceEvent("_onHeartbeat",this._onHeartbeat.event),this._onProcessData=this._register(new b.Emitter),this.onProcessData=this._traceEvent("_onProcessData",this._onProcessData.event),this._onProcessReplay=this._register(new b.Emitter),this.onProcessReplay=this._traceEvent("_onProcessReplay",this._onProcessReplay.event),this._onProcessReady=this._register(new b.Emitter),this.onProcessReady=this._traceEvent("_onProcessReady",this._onProcessReady.event),this._onProcessExit=this._register(new b.Emitter),this.onProcessExit=this._traceEvent("_onProcessExit",this._onProcessExit.event),this._onProcessOrphanQuestion=this._register(new b.Emitter),this.onProcessOrphanQuestion=this._traceEvent("_onProcessOrphanQuestion",this._onProcessOrphanQuestion.event),this._onDidRequestDetach=this._register(new b.Emitter),this.onDidRequestDetach=this._traceEvent("_onDidRequestDetach",this._onDidRequestDetach.event),this._onDidChangeProperty=this._register(new b.Emitter),this.onDidChangeProperty=this._traceEvent("_onDidChangeProperty",this._onDidChangeProperty.event),this._register((0,k.toDisposable)(()=>{for(const Q of this._ptys.values())Q.shutdown(!0);this._ptys.clear()})),this._detachInstanceRequestStore=this._register(new c.RequestStore(void 0,this._logService)),this._detachInstanceRequestStore.onCreateRequest(this._onDidRequestDetach.fire,this._onDidRequestDetach)}async refreshIgnoreProcessNames(T){v.ignoreProcessNames.length=0,v.ignoreProcessNames.push(...T)}async requestDetachInstance(T,q){return this._detachInstanceRequestStore.createRequest({workspaceId:T,instanceId:q})}async acceptDetachInstanceReply(T,q){let J;const x=this._ptys.get(q);x&&(J=await this._buildProcessDetails(q,x)),this._detachInstanceRequestStore.acceptReply(T,J)}async freePortKillProcess(T){const J=(await new Promise((x,Q)=>{(0,w.exec)(O.isWindows?`netstat -ano | findstr "${T}"`:`lsof -nP -iTCP -sTCP:LISTEN | grep ${T}`,{},(ne,ue)=>{if(ne)return Q("Problem occurred when listing active processes");x(ue)})})).split(/\r?\n/).filter(x=>!!x.trim());if(J.length>=1){const x=/\s+(\d+)(?:\s+|$)/,Q=J[0].match(x)?.[1];if(Q)try{process.kill(Number.parseInt(Q))}catch{}else throw new Error(`Processes for port ${T} were not found`);return{port:T,processId:Q}}throw new Error(`Could not kill process with port ${T}`)}async serializeTerminalState(T){const q=[];for(const[x,Q]of this._ptys.entries())Q.hasWrittenData&&T.indexOf(x)!==-1&&q.push(I.Promises.withAsyncBody(async ne=>{ne({id:x,shellLaunchConfig:Q.shellLaunchConfig,processDetails:await this._buildProcessDetails(x,Q),processLaunchConfig:Q.processLaunchOptions,unicodeVersion:Q.unicodeVersion,replayEvent:await Q.serializeNormalBuffer(),timestamp:Date.now()})}));const J={version:1,state:await Promise.all(q)};return JSON.stringify(J)}async reviveTerminalProcesses(T,q,J){const x=[];for(const Q of q)x.push(this._reviveTerminalProcess(T,Q));await Promise.all(x)}async _reviveTerminalProcess(T,q){const J=(0,i.localize)(0,null),x=await this.createProcess({...q.shellLaunchConfig,cwd:q.processDetails.cwd,color:q.processDetails.color,icon:q.processDetails.icon,name:q.processDetails.titleSource===A.TitleEventSource.Api?q.processDetails.title:void 0,initialText:q.replayEvent.events[0].data+(0,o.formatMessageForTerminal)(J,{loudFormatting:!0})},q.processDetails.cwd,q.replayEvent.events[0].cols,q.replayEvent.events[0].rows,q.unicodeVersion,q.processLaunchConfig.env,q.processLaunchConfig.executableEnv,q.processLaunchConfig.options,!0,q.processDetails.workspaceId,q.processDetails.workspaceName,!0,q.replayEvent.events[0].data),Q=this._getRevivingProcessId(T,q.id);this._revivedPtyIdMap.set(Q,{newId:x,state:q}),this._logService.info(`Revived process, old id ${Q} -> new id ${x}`)}async shutdownAll(){this.dispose()}async createProcess(T,q,J,x,Q,ne,ue,fe,K,z,R,G,se){if(T.attachPersistentProcess)throw new Error("Attempt to create a process when attach object was provided");const te=++this._lastPtyId,ge=new a.TerminalProcess(T,q,J,x,ne,ue,fe,this._logService,this._productService),Z={env:ne,executableEnv:ue,options:fe},s=new F(te,ge,z,R,K,J,x,Z,Q,this._reconnectConstants,this._logService,G&&typeof T.initialText=="string"?T.initialText:void 0,se,T.icon,T.color,T.name,T.fixedDimensions);return ge.onProcessExit(d=>{s.dispose(),this._ptys.delete(te),this._onProcessExit.fire({id:te,event:d})}),s.onProcessData(d=>this._onProcessData.fire({id:te,event:d})),s.onProcessReplay(d=>this._onProcessReplay.fire({id:te,event:d})),s.onProcessReady(d=>this._onProcessReady.fire({id:te,event:d})),s.onProcessOrphanQuestion(()=>this._onProcessOrphanQuestion.fire({id:te})),s.onDidChangeProperty(d=>this._onDidChangeProperty.fire({id:te,property:d})),s.onPersistentProcessReady(()=>{for(const d of this._autoReplies.entries())s.installAutoReply(d[0],d[1])}),this._ptys.set(te,s),te}async attachToProcess(T){try{await this._throwIfNoPty(T).attach(),this._logService.info(`Persistent process reconnection "${T}"`)}catch(q){throw this._logService.warn(`Persistent process reconnection "${T}" failed`,q.message),q}}async updateTitle(T,q,J){this._throwIfNoPty(T).setTitle(q,J)}async updateIcon(T,q,J,x){this._throwIfNoPty(T).setIcon(q,J,x)}async clearBuffer(T){this._throwIfNoPty(T).clearBuffer()}async refreshProperty(T,q){return this._throwIfNoPty(T).refreshProperty(q)}async updateProperty(T,q,J){return this._throwIfNoPty(T).updateProperty(q,J)}async detachFromProcess(T,q){return this._throwIfNoPty(T).detach(q)}async reduceConnectionGraceTime(){for(const T of this._ptys.values())T.reduceGraceTime()}async listProcesses(){const T=Array.from(this._ptys.entries()).filter(([x,Q])=>Q.shouldPersistTerminal);this._logService.info(`Listing ${T.length} persistent terminals, ${this._ptys.size} total terminals`);const q=T.map(async([x,Q])=>this._buildProcessDetails(x,Q));return(await Promise.all(q)).filter(x=>x.isOrphan)}async getPerformanceMarks(){return S.getMarks()}async start(T){const q=this._ptys.get(T);return q?q.start():{message:`Could not find pty with id "${T}"`}}async shutdown(T,q){return this._ptys.get(T)?.shutdown(q)}async input(T,q){return this._throwIfNoPty(T).input(q)}async processBinary(T,q){return this._throwIfNoPty(T).writeBinary(q)}async resize(T,q,J){return this._throwIfNoPty(T).resize(q,J)}async getInitialCwd(T){return this._throwIfNoPty(T).getInitialCwd()}async getCwd(T){return this._throwIfNoPty(T).getCwd()}async acknowledgeDataEvent(T,q){return this._throwIfNoPty(T).acknowledgeDataEvent(q)}async setUnicodeVersion(T,q){return this._throwIfNoPty(T).setUnicodeVersion(q)}async getLatency(){return[]}async orphanQuestionReply(T){return this._throwIfNoPty(T).orphanQuestionReply()}async installAutoReply(T,q){this._autoReplies.set(T,q);for(const J of this._ptys.values())J.installAutoReply(T,q)}async uninstallAllAutoReplies(){for(const T of this._autoReplies.keys())for(const q of this._ptys.values())q.uninstallAutoReply(T)}async uninstallAutoReply(T){for(const q of this._ptys.values())q.uninstallAutoReply(T)}async getDefaultSystemShell(T=O.OS){return(0,P.getSystemShell)(T,process.env)}async getEnvironment(){return{...process.env}}async getWslPath(T,q){if(q==="win-to-unix"){if(!O.isWindows)return T;if((0,u.getWindowsBuildNumber)()<17063)return T.replace(/\\/g,"/");const J=this._getWSLExecutablePath();return J?new Promise(x=>{(0,w.execFile)(J,["-e","wslpath",T],{},(ne,ue,fe)=>{x(ne?T:(0,L.escapeNonWindowsPath)(ue.trim()))}).stdin.end()}):T}if(q==="unix-to-win"&&O.isWindows){if((0,u.getWindowsBuildNumber)()<17063)return T;const J=this._getWSLExecutablePath();return J?new Promise(x=>{(0,w.execFile)(J,["-e","wslpath","-w",T],{},(ne,ue,fe)=>{x(ne?T:ue.trim())}).stdin.end()}):T}return T}_getWSLExecutablePath(){const T=(0,u.getWindowsBuildNumber)()>=16299,q=process.env.hasOwnProperty("PROCESSOR_ARCHITEW6432"),J=process.env.SystemRoot;if(J)return(0,n.join)(J,q?"Sysnative":"System32",T?"wsl.exe":"bash.exe")}async getRevivedPtyNewId(T,q){try{return this._revivedPtyIdMap.get(this._getRevivingProcessId(T,q))?.newId}catch(J){this._logService.warn(`Couldn't find terminal ID ${T}-${q}`,J.message)}}async setTerminalLayoutInfo(T){this._workspaceLayoutInfos.set(T.workspaceId,T)}async getTerminalLayoutInfo(T){S.mark("code/willGetTerminalLayoutInfo");const q=this._workspaceLayoutInfos.get(T.workspaceId);if(q){const J=new Set,Q=(await Promise.all(q.tabs.map(async ne=>this._expandTerminalTab(T.workspaceId,ne,J)))).filter(ne=>ne.terminals.length>0);return S.mark("code/didGetTerminalLayoutInfo"),{tabs:Q}}S.mark("code/didGetTerminalLayoutInfo")}async _expandTerminalTab(T,q,J){const Q=(await Promise.all(q.terminals.map(ne=>this._expandTerminalInstance(T,ne,J)))).filter(ne=>ne.terminal!==null);return{isActive:q.isActive,activePersistentProcessId:q.activePersistentProcessId,terminals:Q}}async _expandTerminalInstance(T,q,J){try{const x=this._getRevivingProcessId(T,q.terminal),Q=this._revivedPtyIdMap.get(x)?.newId;this._logService.info(`Expanding terminal instance, old id ${x} -> new id ${Q}`),this._revivedPtyIdMap.delete(x);const ne=Q??q.terminal;if(J.has(ne))throw new Error(`Terminal ${ne} has already been expanded`);J.add(ne);const ue=this._throwIfNoPty(ne);return{terminal:{...ue&&await this._buildProcessDetails(q.terminal,ue,Q!==void 0),id:ne},relativeSize:q.relativeSize}}catch(x){return this._logService.warn("Couldn't get layout info, a terminal was probably disconnected",x.message),this._logService.debug("Reattach to wrong terminal debug info - layout info by id",q),this._logService.debug("Reattach to wrong terminal debug info - _revivePtyIdMap",Array.from(this._revivedPtyIdMap.values())),this._logService.debug("Reattach to wrong terminal debug info - _ptys ids",Array.from(this._ptys.keys())),{terminal:null,relativeSize:q.relativeSize}}}_getRevivingProcessId(T,q){return`${T}-${q}`}async _buildProcessDetails(T,q,J=!1){S.mark(`code/willBuildProcessDetails/${T}`);const[x,Q]=await Promise.all([q.getCwd(),J?!0:q.isOrphaned()]),ne={id:T,title:q.title,titleSource:q.titleSource,pid:q.pid,workspaceId:q.workspaceId,workspaceName:q.workspaceName,cwd:x,isOrphan:Q,icon:q.icon,color:q.color,fixedDimensions:q.fixedDimensions,environmentVariableCollections:q.processLaunchOptions.options.environmentVariableCollections,reconnectionProperties:q.shellLaunchConfig.reconnectionProperties,waitOnExit:q.shellLaunchConfig.waitOnExit,hideFromUser:q.shellLaunchConfig.hideFromUser,isFeatureTerminal:q.shellLaunchConfig.isFeatureTerminal,type:q.shellLaunchConfig.type,hasChildProcesses:q.hasChildProcesses,shellIntegrationNonce:q.processLaunchOptions.options.shellIntegration.nonce};return S.mark(`code/didBuildProcessDetails/${T}`),ne}_throwIfNoPty(T){const q=this._ptys.get(T);if(!q)throw new _.ErrorNoTelemetry("Could not find pty on pty host");return q}}e.PtyService=g,me([h.memoize],g.prototype,"traceRpcArgs",null),me([p],g.prototype,"refreshIgnoreProcessNames",null),me([p],g.prototype,"requestDetachInstance",null),me([p],g.prototype,"acceptDetachInstanceReply",null),me([p],g.prototype,"freePortKillProcess",null),me([p],g.prototype,"serializeTerminalState",null),me([p],g.prototype,"reviveTerminalProcesses",null),me([p],g.prototype,"shutdownAll",null),me([p],g.prototype,"createProcess",null),me([p],g.prototype,"attachToProcess",null),me([p],g.prototype,"updateTitle",null),me([p],g.prototype,"updateIcon",null),me([p],g.prototype,"clearBuffer",null),me([p],g.prototype,"refreshProperty",null),me([p],g.prototype,"updateProperty",null),me([p],g.prototype,"detachFromProcess",null),me([p],g.prototype,"reduceConnectionGraceTime",null),me([p],g.prototype,"listProcesses",null),me([p],g.prototype,"getPerformanceMarks",null),me([p],g.prototype,"start",null),me([p],g.prototype,"shutdown",null),me([p],g.prototype,"input",null),me([p],g.prototype,"processBinary",null),me([p],g.prototype,"resize",null),me([p],g.prototype,"getInitialCwd",null),me([p],g.prototype,"getCwd",null),me([p],g.prototype,"acknowledgeDataEvent",null),me([p],g.prototype,"setUnicodeVersion",null),me([p],g.prototype,"getLatency",null),me([p],g.prototype,"orphanQuestionReply",null),me([p],g.prototype,"installAutoReply",null),me([p],g.prototype,"uninstallAllAutoReplies",null),me([p],g.prototype,"uninstallAutoReply",null),me([p],g.prototype,"getDefaultSystemShell",null),me([p],g.prototype,"getEnvironment",null),me([p],g.prototype,"getWslPath",null),me([p],g.prototype,"getRevivedPtyNewId",null),me([p],g.prototype,"setTerminalLayoutInfo",null),me([p],g.prototype,"getTerminalLayoutInfo",null);var M;(function(V){V.None="None",V.ReplayOnly="ReplayOnly",V.Session="Session"})(M||(M={}));class F extends k.Disposable{get pid(){return this._pid}get shellLaunchConfig(){return this._terminalProcess.shellLaunchConfig}get hasWrittenData(){return this._interactionState.value!=="None"}get title(){return this._title||this._terminalProcess.currentTitle}get titleSource(){return this._titleSource}get icon(){return this._icon}get color(){return this._color}get fixedDimensions(){return this._fixedDimensions}get hasChildProcesses(){return this._terminalProcess.hasChildProcesses}setTitle(T,q){q===A.TitleEventSource.Api&&(this._interactionState.setValue("Session","setTitle"),this._serializer.freeRawReviveBuffer()),this._title=T,this._titleSource=q}setIcon(T,q,J){(!this._icon||"id"in q&&"id"in this._icon&&q.id!==this._icon.id||!this.color||J!==this._color)&&(this._serializer.freeRawReviveBuffer(),T&&this._interactionState.setValue("Session","setIcon")),this._icon=q,this._color=J}_setFixedDimensions(T){this._fixedDimensions=T}constructor(T,q,J,x,Q,ne,ue,fe,K,z,R,G,se,te,ge,Z,s){super(),this._persistentProcessId=T,this._terminalProcess=q,this.workspaceId=J,this.workspaceName=x,this.shouldPersistTerminal=Q,this.processLaunchOptions=fe,this.unicodeVersion=K,this._logService=R,this._icon=te,this._color=ge,this._autoReplies=new Map,this._pendingCommands=new Map,this._isStarted=!1,this._orphanRequestQueue=new I.Queue,this._onProcessReplay=this._register(new b.Emitter),this.onProcessReplay=this._onProcessReplay.event,this._onProcessReady=this._register(new b.Emitter),this.onProcessReady=this._onProcessReady.event,this._onPersistentProcessReady=this._register(new b.Emitter),this.onPersistentProcessReady=this._onPersistentProcessReady.event,this._onProcessData=this._register(new b.Emitter),this.onProcessData=this._onProcessData.event,this._onProcessOrphanQuestion=this._register(new b.Emitter),this.onProcessOrphanQuestion=this._onProcessOrphanQuestion.event,this._onDidChangeProperty=this._register(new b.Emitter),this.onDidChangeProperty=this._onDidChangeProperty.event,this._inReplay=!1,this._pid=-1,this._cwd="",this._titleSource=A.TitleEventSource.Process,this._interactionState=new l(`Persistent process "${this._persistentProcessId}" interaction state`,"None",this._logService),this._wasRevived=G!==void 0,this._serializer=new E(ne,ue,z.scrollback,K,G,fe.options.shellIntegration.nonce,Q?se:void 0,this._logService),Z&&this.setTitle(Z,A.TitleEventSource.Api),this._fixedDimensions=s,this._orphanQuestionBarrier=null,this._orphanQuestionReplyTime=0,this._disconnectRunner1=this._register(new I.ProcessTimeRunOnceScheduler(()=>{this._logService.info(`Persistent process "${this._persistentProcessId}": The reconnection grace time of ${B(z.graceTime)} has expired, shutting down pid "${this._pid}"`),this.shutdown(!0)},z.graceTime)),this._disconnectRunner2=this._register(new I.ProcessTimeRunOnceScheduler(()=>{this._logService.info(`Persistent process "${this._persistentProcessId}": The short reconnection grace time of ${B(z.shortGraceTime)} has expired, shutting down pid ${this._pid}`),this.shutdown(!0)},z.shortGraceTime)),this._register(this._terminalProcess.onProcessExit(()=>this._bufferer.stopBuffering(this._persistentProcessId))),this._register(this._terminalProcess.onProcessReady(d=>{this._pid=d.pid,this._cwd=d.cwd,this._onProcessReady.fire(d)})),this._register(this._terminalProcess.onDidChangeProperty(d=>{this._onDidChangeProperty.fire(d)})),this._bufferer=new y.TerminalDataBufferer((d,W)=>this._onProcessData.fire(W)),this._register(this._bufferer.startBuffering(this._persistentProcessId,this._terminalProcess.onProcessData)),this._register(this.onProcessData(d=>this._serializer.handleData(d))),this._register((0,k.toDisposable)(()=>{for(const d of this._autoReplies.values())d.dispose();this._autoReplies.clear()}))}async attach(){!this._disconnectRunner1.isScheduled()&&!this._disconnectRunner2.isScheduled()&&this._logService.warn(`Persistent process "${this._persistentProcessId}": Process had no disconnect runners but was an orphan`),this._disconnectRunner1.cancel(),this._disconnectRunner2.cancel()}async detach(T){this.shouldPersistTerminal&&(this._interactionState.value!=="None"||T)?this._disconnectRunner1.schedule():this.shutdown(!0)}serializeNormalBuffer(){return this._serializer.generateReplayEvent(!0,this._interactionState.value!=="Session")}async refreshProperty(T){return this._terminalProcess.refreshProperty(T)}async updateProperty(T,q){if(T==="fixedDimensions")return this._setFixedDimensions(q)}async start(){if(!this._isStarted){const T=await this._terminalProcess.start();return T&&"message"in T||(this._isStarted=!0,this._wasRevived?this.triggerReplay():this._onPersistentProcessReady.fire()),T}this._onProcessReady.fire({pid:this._pid,cwd:this._cwd,windowsPty:this._terminalProcess.getWindowsPty()}),this._onDidChangeProperty.fire({type:"title",value:this._terminalProcess.currentTitle}),this._onDidChangeProperty.fire({type:"shellType",value:this._terminalProcess.shellType}),this.triggerReplay()}shutdown(T){return this._terminalProcess.shutdown(T)}input(T){if(this._interactionState.setValue("Session","input"),this._serializer.freeRawReviveBuffer(),!this._inReplay){for(const q of this._autoReplies.values())q.handleInput();return this._terminalProcess.input(T)}}writeBinary(T){return this._terminalProcess.processBinary(T)}resize(T,q){if(!this._inReplay){this._serializer.handleResize(T,q),this._bufferer.flushBuffer(this._persistentProcessId);for(const J of this._autoReplies.values())J.handleResize();return this._terminalProcess.resize(T,q)}}async clearBuffer(){this._serializer.clearBuffer(),this._terminalProcess.clearBuffer()}setUnicodeVersion(T){this.unicodeVersion=T,this._serializer.setUnicodeVersion?.(T)}acknowledgeDataEvent(T){if(!this._inReplay)return this._terminalProcess.acknowledgeDataEvent(T)}getInitialCwd(){return this._terminalProcess.getInitialCwd()}getCwd(){return this._terminalProcess.getCwd()}async triggerReplay(){this._interactionState.value==="None"&&this._interactionState.setValue("ReplayOnly","triggerReplay");const T=await this._serializer.generateReplayEvent();let q=0;for(const J of T.events)q+=J.data.length;this._logService.info(`Persistent process "${this._persistentProcessId}": Replaying ${q} chars and ${T.events.length} size events`),this._onProcessReplay.fire(T),this._terminalProcess.clearUnacknowledgedChars(),this._onPersistentProcessReady.fire()}installAutoReply(T,q){this._autoReplies.get(T)?.dispose(),this._autoReplies.set(T,new r.TerminalAutoResponder(this._terminalProcess,T,q,this._logService))}uninstallAutoReply(T){this._autoReplies.get(T)?.dispose(),this._autoReplies.delete(T)}sendCommandResult(T,q,J){this._pendingCommands.get(T)&&this._pendingCommands.delete(T)}orphanQuestionReply(){if(this._orphanQuestionReplyTime=Date.now(),this._orphanQuestionBarrier){const T=this._orphanQuestionBarrier;this._orphanQuestionBarrier=null,T.open()}}reduceGraceTime(){this._disconnectRunner2.isScheduled()||this._disconnectRunner1.isScheduled()&&this._disconnectRunner2.schedule()}async isOrphaned(){return await this._orphanRequestQueue.queue(async()=>this._isOrphaned())}async _isOrphaned(){return this._disconnectRunner1.isScheduled()||this._disconnectRunner2.isScheduled()?!0:(this._orphanQuestionBarrier||(this._orphanQuestionBarrier=new I.AutoOpenBarrier(4e3),this._orphanQuestionReplyTime=0,this._onProcessOrphanQuestion.fire()),await this._orphanQuestionBarrier.wait(),Date.now()-this._orphanQuestionReplyTime>500)}}class l{get value(){return this._value}setValue(T,q){this._value!==T&&(this._value=T,this._log(q))}constructor(T,q,J){this._name=T,this._value=q,this._logService=J,this._log("initialized")}_log(T){this._logService.debug(`MutationLogger "${this._name}" set to "${this._value}", reason: ${T}`)}}class E{constructor(T,q,J,x,Q,ne,ue,fe){this._rawReviveBuffer=ue,this._xterm=new t.Terminal({cols:T,rows:q,scrollback:J,allowProposedApi:!0}),Q&&this._xterm.writeln(Q),this.setUnicodeVersion(x),this._shellIntegrationAddon=new C.ShellIntegrationAddon(ne,!0,void 0,fe),this._xterm.loadAddon(this._shellIntegrationAddon)}freeRawReviveBuffer(){this._rawReviveBuffer=void 0}handleData(T){this._xterm.write(T)}handleResize(T,q){this._xterm.resize(T,q)}clearBuffer(){this._xterm.clear()}async generateReplayEvent(T,q){const J=new(await this._getSerializeConstructor());this._xterm.loadAddon(J);const x={scrollback:this._xterm.options.scrollback};T&&(x.excludeAltBuffer=!0,x.excludeModes=!0);let Q;return q&&this._rawReviveBuffer?Q=this._rawReviveBuffer:Q=J.serialize(x),{events:[{cols:this._xterm.cols,rows:this._xterm.rows,data:Q}],commands:this._shellIntegrationAddon.serialize()}}async setUnicodeVersion(T){this._xterm.unicode.activeVersion!==T&&(T==="11"?(this._unicodeAddon=new(await this._getUnicode11Constructor()),this._xterm.loadAddon(this._unicodeAddon)):(this._unicodeAddon?.dispose(),this._unicodeAddon=void 0),this._xterm.unicode.activeVersion=T)}async _getUnicode11Constructor(){return f||(f=(await new Promise((T,q)=>{oe(["xterm-addon-unicode11"],T,q)})).Unicode11Addon),f}async _getSerializeConstructor(){return D||(D=(await new Promise((T,q)=>{oe(["xterm-addon-serialize"],T,q)})).SerializeAddon),D}}function B(V){let T=0,q=0,J=0;V>=1e3&&(J=Math.floor(V/1e3),V-=J*1e3),J>=60&&(q=Math.floor(J/60),J-=q*60),q>=60&&(T=Math.floor(q/60),q-=T*60);const x=T?`${T}h`:"",Q=q?`${q}m`:"",ne=J?`${J}s`:"",ue=V?`${V}ms`:"";return`${x}${Q}${ne}${ue}`}}),define(ce[106],he([0,1,58,25,62,63,10,72,75,11,77,78,80,81,26,96,99,31,9]),function(oe,e,w,I,b,k,O,P,m,c,A,y,L,t,u,a,i,v,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),_();async function _(){const C=parseInt(process.env.VSCODE_STARTUP_DELAY??"0"),o=parseInt(process.env.VSCODE_LATENCY??"0"),n={graceTime:parseInt(process.env.VSCODE_RECONNECT_GRACE_TIME||"0"),shortGraceTime:parseInt(process.env.VSCODE_RECONNECT_SHORT_GRACE_TIME||"0"),scrollback:parseInt(process.env.VSCODE_RECONNECT_SCROLLBACK||"100")};delete process.env.VSCODE_RECONNECT_GRACE_TIME,delete process.env.VSCODE_RECONNECT_SHORT_GRACE_TIME,delete process.env.VSCODE_RECONNECT_SCROLLBACK,delete process.env.VSCODE_LATENCY,delete process.env.VSCODE_STARTUP_DELAY,C&&await(0,r.timeout)(C);const h=(0,v.isUtilityProcess)(process);let S;h?S=new k.Server:S=new b.Server(u.TerminalIpcChannels.PtyHost);const p={_serviceBrand:void 0,...t.default},D=new m.NativeEnvironmentService((0,P.parseArgs)(process.argv,P.OPTIONS),p),f=new L.LoggerService((0,c.getLogLevel)(D),D.logsHome);S.registerChannel(u.TerminalIpcChannels.Logger,new A.LoggerChannel(f,()=>w.DefaultURITransformer));const g=f.createLogger("ptyhost",{name:(0,O.localize)(0,null)}),M=new y.LogService(g);C&&M.warn(`Pty Host startup is delayed ${C}ms`),o&&M.warn(`Pty host is simulating ${o}ms latency`);const F=new a.HeartbeatService;S.registerChannel(u.TerminalIpcChannels.Heartbeat,I.ProxyChannel.fromService(F));const l=new i.PtyService(M,p,n,o),E=I.ProxyChannel.fromService(l);S.registerChannel(u.TerminalIpcChannels.PtyHost,E),h&&S.registerChannel(u.TerminalIpcChannels.PtyHostWindow,E),process.once("exit",()=>{M.trace("Pty host exiting"),M.dispose(),F.dispose(),l.dispose()})}})}).call(this);

//# sourceMappingURL=https://sqlopsbuilds.blob.core.windows.net/sourcemaps/82e35eb142bf0f4567ff8c6dd4f16f33abfc2d50/core/vs/platform/terminal/node/ptyHostMain.js.map