code-server
Version:
Run VS Code on a remote server.
80 lines • 978 kB
JavaScript
/*!--------------------------------------------------------
* Copyright (C) Microsoft Corporation. All rights reserved.
*--------------------------------------------------------*/(function(){var Ee=["exports","require","vs/base/common/uri","vs/platform/instantiation/common/instantiation","vs/workbench/api/common/extHost.protocol","vs/base/common/event","vs/base/common/lifecycle","vs/workbench/api/common/extHostTypes","vs/workbench/api/common/extHostTypeConverters","vs/base/common/network","vs/base/common/strings","vs/base/common/types","vs/platform/log/common/log","vs/base/common/async","vs/workbench/api/common/extHostRpcService","vs/base/common/errors","vs/base/common/arrays","vs/base/common/path","vs/nls","vs/nls!vs/workbench/api/worker/extensionHostWorker","vs/base/common/cancellation","vs/base/common/buffer","vs/base/common/map","vs/base/common/platform","vs/base/common/resources","vs/platform/extensions/common/extensions","vs/base/common/objects","vs/workbench/api/common/extHostInitDataService","vs/workbench/services/extensions/common/extensions","vs/base/common/glob","vs/workbench/api/common/extHostFileSystemInfo","vs/workbench/api/common/extHostWorkspace","vs/workbench/api/common/extHostConfiguration","vs/workbench/api/common/extHostExtensionService","vs/base/common/severity","vs/base/common/extpath","vs/base/common/uuid","vs/platform/registry/common/platform","vs/workbench/services/extensions/common/proxyIdentifier","vs/workbench/api/common/extHostCommands","vs/workbench/api/common/extHostTerminalService","vs/workbench/services/search/common/search","vs/base/common/assert","vs/base/common/errorMessage","vs/platform/contextkey/common/contextkey","vs/platform/files/common/files","vs/platform/workspace/common/workspace","vs/workbench/api/common/extHostTestingPrivateApi","vs/editor/common/core/range","vs/workbench/api/common/extHostDocumentsAndEditors","vs/workbench/api/common/extHostFileSystemConsumer","vs/workbench/api/common/extHostWebview","vs/base/common/decorators","vs/base/common/idGenerator","vs/base/common/marshalling","vs/platform/instantiation/common/extensions","vs/platform/instantiation/common/serviceCollection","vs/platform/theme/common/themeService","vs/workbench/api/common/cache","vs/workbench/api/common/extHostTunnelService","vs/workbench/api/common/extHostUriTransformerService","vs/workbench/common/webview","vs/workbench/contrib/testing/common/testCollection","vs/workbench/contrib/testing/common/testId","vs/workbench/api/common/exHostSecretState","vs/workbench/api/common/extHostApiDeprecationService","vs/workbench/api/common/extHostEditorTabs","vs/workbench/api/common/extHostStorage","vs/workbench/api/common/extHostStoragePaths","vs/base/common/performance","vs/base/common/collections","vs/base/common/mime","vs/base/common/htmlContent","vs/base/common/labels","vs/editor/common/languageSelector","vs/editor/common/services/semanticTokensDto","vs/platform/instantiation/common/descriptors","vs/platform/configuration/common/configuration","vs/platform/markers/common/markers","vs/platform/opener/common/opener","vs/platform/configuration/common/configurationRegistry","vs/platform/remote/common/remoteAuthorityResolver","vs/platform/remote/common/remoteHosts","vs/workbench/api/common/extHostTelemetry","vs/workbench/api/common/extHostDocumentData","vs/workbench/contrib/notebook/common/notebookCommon","vs/base/common/process","vs/workbench/services/editor/common/editorGroupsService","vs/editor/common/languages","vs/workbench/api/common/extHostNotebookEditor","vs/workbench/api/common/extHostTextEditor","vs/workbench/services/extensions/common/extensionHostProtocol","vs/workbench/api/common/extHostDecorations","vs/base/common/hash","vs/workbench/api/common/extHostOutput","vs/workbench/api/common/extHostWindow","vs/workbench/services/search/common/searchExtTypes","vs/workbench/api/common/extHostTask","vs/workbench/api/common/extHostDebugService","vs/workbench/api/common/extHostSearch","vs/base/common/json","vs/base/common/marked/marked","vs/base/common/numbers","vs/base/common/stream","vs/base/common/filters","vs/base/common/iconLabels","vs/base/common/codicons","vs/base/common/comparers","vs/base/common/uriIpc","vs/editor/common/core/textModelDefaults","vs/editor/common/languages/languageConfiguration","vs/nls!vs/base/common/date","vs/base/common/date","vs/nls!vs/base/common/errorMessage","vs/nls!vs/editor/common/config/editorOptions","vs/editor/common/config/editorOptions","vs/editor/common/core/wordHelper","vs/nls!vs/platform/configuration/common/configurationRegistry","vs/nls!vs/platform/extensions/common/extensionValidator","vs/nls!vs/platform/files/common/files","vs/nls!vs/platform/markers/common/markers","vs/nls!vs/platform/workspace/common/workspace","vs/nls!vs/workbench/api/common/extHostDiagnostics","vs/nls!vs/workbench/api/common/extHostExtensionService","vs/nls!vs/workbench/api/common/extHostProgress","vs/nls!vs/workbench/api/common/extHostStatusBar","vs/nls!vs/workbench/api/common/extHostTerminalService","vs/nls!vs/workbench/api/common/extHostTreeViews","vs/nls!vs/workbench/api/common/extHostWorkspace","vs/nls!vs/workbench/common/editor","vs/nls!vs/workbench/contrib/debug/common/abstractDebugAdapter","vs/nls!vs/workbench/contrib/debug/common/debug","vs/nls!vs/workbench/contrib/tasks/common/taskService","vs/nls!vs/workbench/services/configurationResolver/common/variableResolver","vs/nls!vs/workbench/services/search/common/queryBuilder","vs/platform/editor/common/editor","vs/platform/extensions/common/extensionValidator","vs/platform/instantiation/common/graph","vs/platform/environment/common/environment","vs/platform/instantiation/common/instantiationService","vs/platform/notification/common/notification","vs/platform/progress/common/progress","vs/platform/jsonschemas/common/jsonContributionRegistry","vs/platform/configuration/common/configurationModels","vs/platform/extensionManagement/common/extensionManagementUtil","vs/platform/terminal/common/terminalDataBuffering","vs/platform/theme/common/theme","vs/platform/tunnel/common/tunnel","vs/platform/workspace/common/virtualWorkspace","vs/workbench/api/common/extHostMemento","vs/workbench/api/common/extHostNotebookDocuments","vs/workbench/api/common/extHostSecrets","vs/workbench/api/common/extHostNotebookConcatDocument","vs/workbench/api/common/extHostTheming","vs/workbench/api/common/extHostWebviewMessaging","vs/workbench/api/common/shared/treeDataTransfer","vs/workbench/common/editor","vs/workbench/api/common/extHostCodeInsets","vs/workbench/contrib/debug/common/abstractDebugAdapter","vs/workbench/contrib/debug/common/debug","vs/workbench/contrib/debug/common/debugUtils","vs/base/common/iterator","vs/workbench/contrib/notebook/common/notebookExecutionService","vs/workbench/contrib/output/common/output","vs/workbench/contrib/tasks/common/taskService","vs/workbench/contrib/terminal/common/environmentVariableShared","vs/workbench/services/configurationResolver/common/variableResolver","vs/workbench/services/editor/common/editorService","vs/workbench/api/common/extHostDocumentSaveParticipant","vs/workbench/api/common/extHostNotebookDocument","vs/workbench/api/common/extHostProgress","vs/workbench/contrib/testing/common/ownedTestCollection","vs/workbench/services/environment/common/environmentService","vs/workbench/services/extensions/common/extensionDescriptionRegistry","vs/workbench/api/common/extHostExtensionActivator","vs/workbench/api/common/extHostLogService","vs/workbench/services/extensions/common/lazyPromise","vs/workbench/api/common/extHostAuthentication","vs/workbench/api/common/extHostBulkEdits","vs/workbench/api/common/extHostClipboard","vs/workbench/api/common/extHostApiCommands","vs/workbench/api/common/extHostComments","vs/workbench/api/common/extHostDiagnostics","vs/workbench/api/common/extHostDialogs","vs/workbench/api/common/extHostDocumentContentProviders","vs/workbench/api/common/extHostDocuments","vs/workbench/api/common/extHostFileSystem","vs/workbench/api/common/extHostFileSystemEventService","vs/workbench/api/common/extHostInteractive","vs/workbench/api/common/extHostLabelService","vs/workbench/api/common/extHostLanguageFeatures","vs/base/common/stopwatch","vs/workbench/api/common/extHostLanguages","vs/workbench/api/common/extHostLoggerService","vs/workbench/api/common/extHostMessageService","vs/workbench/api/common/extHostNotebook","vs/workbench/api/common/extHostNotebookEditors","vs/workbench/api/common/extHostNotebookKernels","vs/workbench/api/common/extHostNotebookRenderers","vs/workbench/api/common/extHostQuickOpen","vs/workbench/api/common/extHostSCM","vs/workbench/api/common/extHostStatusBar","vs/workbench/api/common/extHostTesting","vs/workbench/api/common/extHostTextEditors","vs/workbench/api/common/extHostTimeline","vs/workbench/api/common/extHostUriOpener","vs/workbench/api/common/extHostUrls","vs/workbench/api/common/extHostCustomEditors","vs/workbench/api/common/extHostWebviewPanels","vs/workbench/api/common/extHostWebviewView","vs/workbench/services/extensions/common/rpcProtocol","vs/workbench/services/extensions/worker/polyfillNestedWorker","vs/workbench/services/remote/common/remoteAgentService","vs/workbench/services/path/common/pathService","vs/workbench/services/search/common/fileSearchManager","vs/workbench/services/search/common/queryBuilder","vs/workbench/services/extensions/common/workspaceContains","vs/workbench/api/common/extHostRequireInterceptor","vs/workbench/api/common/extensionHostMain","vs/workbench/services/search/common/textSearchManager","vs/workbench/api/common/extHost.common.services","vs/workbench/services/views/common/treeViewsService","vs/workbench/api/common/extHostTreeViews","vs/workbench/api/common/extHost.api.impl","vs/workbench/api/worker/extHostExtensionService","vs/workbench/api/worker/extHost.worker.services","vs/editor/common/model/mirrorTextModel","vs/editor/common/model/prefixSumComputer","vs/base/common/linkedList","vs/editor/common/core/position","vs/base/common/lazy","vs/editor/common/languages/linkComputer","vs/editor/common/core/selection","vs/base/common/functional","vs/editor/common/model/textModelSearch","vs/editor/common/model","vs/workbench/api/worker/extensionHostWorker"],we=function(J){for(var e=[],o=0,k=J.length;o<k;o++)e[o]=Ee[J[o]];return e};define(Ee[42],we([1,0]),function(J,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ok=void 0;function o(k,w){if(!k)throw new Error(w?`Assertion failed (${w})`:"Assertion Failed")}e.ok=o}),define(Ee[70],we([1,0]),function(J,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SetMap=e.diffMaps=e.diffSets=e.fromMap=e.groupBy=e.forEach=e.values=void 0;const o=Object.prototype.hasOwnProperty;function k(L){const v=[];for(let u in L)o.call(L,u)&&v.push(L[u]);return v}e.values=k;function w(L,v){for(let u in L)if(o.call(L,u)&&v({key:u,value:L[u]},function(){delete L[u]})===!1)return}e.forEach=w;function B(L,v){const u=Object.create(null);for(const m of L){const s=v(m);let n=u[s];n||(n=u[s]=[]),n.push(m)}return u}e.groupBy=B;function S(L){const v=Object.create(null);return L&&L.forEach((u,m)=>{v[m]=u}),v}e.fromMap=S;function A(L,v){const u=[],m=[];for(let s of L)v.has(s)||u.push(s);for(let s of v)L.has(s)||m.push(s);return{removed:u,added:m}}e.diffSets=A;function y(L,v){const u=[],m=[];for(let[s,n]of L)v.has(s)||u.push(n);for(let[s,n]of v)L.has(s)||m.push(n);return{removed:u,added:m}}e.diffMaps=y;class M{constructor(){this.map=new Map}add(v,u){let m=this.map.get(v);m||(m=new Set,this.map.set(v,m)),m.add(u)}delete(v,u){const m=this.map.get(v);!m||(m.delete(u),m.size===0&&this.map.delete(v))}forEach(v,u){const m=this.map.get(v);!m||m.forEach(u)}}e.SetMap=M}),define(Ee[52],we([1,0]),function(J,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.throttle=e.debounce=e.memoize=e.createDecorator=void 0;function o(S){return(A,y,M)=>{let L=null,v=null;if(typeof M.value=="function"?(L="value",v=M.value):typeof M.get=="function"&&(L="get",v=M.get),!v)throw new Error("not supported");M[L]=S(v,y)}}e.createDecorator=o;function k(S,A,y){let M=null,L=null;if(typeof y.value=="function"?(M="value",L=y.value,L.length!==0&&console.warn("Memoize should only be used in functions with zero parameters")):typeof y.get=="function"&&(M="get",L=y.get),!L)throw new Error("not supported");const v=`$memoize$${A}`;y[M]=function(...u){return this.hasOwnProperty(v)||Object.defineProperty(this,v,{configurable:!1,enumerable:!1,writable:!1,value:L.apply(this,u)}),this[v]}}e.memoize=k;function w(S,A,y){return o((M,L)=>{const v=`$debounce$${L}`,u=`$debounce$result$${L}`;return function(...m){this[u]||(this[u]=y?y():void 0),clearTimeout(this[v]),A&&(this[u]=A(this[u],...m),m=[this[u]]),this[v]=setTimeout(()=>{M.apply(this,m),this[u]=y?y():void 0},S)}})}e.debounce=w;function B(S,A,y){return o((M,L)=>{const v=`$throttle$timer$${L}`,u=`$throttle$result$${L}`,m=`$throttle$lastRun$${L}`,s=`$throttle$pending$${L}`;return function(...n){if(this[u]||(this[u]=y?y():void 0),(this[m]===null||this[m]===void 0)&&(this[m]=-Number.MAX_VALUE),A&&(this[u]=A(this[u],...n)),this[s])return;const f=this[m]+S;f<=Date.now()?(this[m]=Date.now(),M.apply(this,[this[u]]),this[u]=y?y():void 0):(this[s]=!0,this[v]=setTimeout(()=>{this[s]=!1,this[m]=Date.now(),M.apply(this,[this[u]]),this[u]=y?y():void 0},f-Date.now()))}})}e.throttle=B}),define(Ee[53],we([1,0]),function(J,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.defaultGenerator=e.IdGenerator=void 0;class o{constructor(w){this._prefix=w,this._lastId=0}nextId(){return this._prefix+ ++this._lastId}}e.IdGenerator=o,e.defaultGenerator=new o("id#")}),define(Ee[100],we([1,0]),function(J,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getNodeType=e.stripComments=e.visit=e.findNodeAtOffset=e.contains=e.getNodeValue=e.getNodePath=e.findNodeAtLocation=e.parseTree=e.parse=e.getLocation=e.createScanner=e.ParseOptions=e.ParseErrorCode=e.SyntaxKind=e.ScanError=void 0;var o;(function(l){l[l.None=0]="None",l[l.UnexpectedEndOfComment=1]="UnexpectedEndOfComment",l[l.UnexpectedEndOfString=2]="UnexpectedEndOfString",l[l.UnexpectedEndOfNumber=3]="UnexpectedEndOfNumber",l[l.InvalidUnicode=4]="InvalidUnicode",l[l.InvalidEscapeCharacter=5]="InvalidEscapeCharacter",l[l.InvalidCharacter=6]="InvalidCharacter"})(o=e.ScanError||(e.ScanError={}));var k;(function(l){l[l.OpenBraceToken=1]="OpenBraceToken",l[l.CloseBraceToken=2]="CloseBraceToken",l[l.OpenBracketToken=3]="OpenBracketToken",l[l.CloseBracketToken=4]="CloseBracketToken",l[l.CommaToken=5]="CommaToken",l[l.ColonToken=6]="ColonToken",l[l.NullKeyword=7]="NullKeyword",l[l.TrueKeyword=8]="TrueKeyword",l[l.FalseKeyword=9]="FalseKeyword",l[l.StringLiteral=10]="StringLiteral",l[l.NumericLiteral=11]="NumericLiteral",l[l.LineCommentTrivia=12]="LineCommentTrivia",l[l.BlockCommentTrivia=13]="BlockCommentTrivia",l[l.LineBreakTrivia=14]="LineBreakTrivia",l[l.Trivia=15]="Trivia",l[l.Unknown=16]="Unknown",l[l.EOF=17]="EOF"})(k=e.SyntaxKind||(e.SyntaxKind={}));var w;(function(l){l[l.InvalidSymbol=1]="InvalidSymbol",l[l.InvalidNumberFormat=2]="InvalidNumberFormat",l[l.PropertyNameExpected=3]="PropertyNameExpected",l[l.ValueExpected=4]="ValueExpected",l[l.ColonExpected=5]="ColonExpected",l[l.CommaExpected=6]="CommaExpected",l[l.CloseBraceExpected=7]="CloseBraceExpected",l[l.CloseBracketExpected=8]="CloseBracketExpected",l[l.EndOfFileExpected=9]="EndOfFileExpected",l[l.InvalidCommentToken=10]="InvalidCommentToken",l[l.UnexpectedEndOfComment=11]="UnexpectedEndOfComment",l[l.UnexpectedEndOfString=12]="UnexpectedEndOfString",l[l.UnexpectedEndOfNumber=13]="UnexpectedEndOfNumber",l[l.InvalidUnicode=14]="InvalidUnicode",l[l.InvalidEscapeCharacter=15]="InvalidEscapeCharacter",l[l.InvalidCharacter=16]="InvalidCharacter"})(w=e.ParseErrorCode||(e.ParseErrorCode={}));var B;(function(l){l.DEFAULT={allowTrailingComma:!0}})(B=e.ParseOptions||(e.ParseOptions={}));function S(l,I=!1){let r=0,i=l.length,c="",t=0,a=16,p=0;function h(V){let W=0,Q=0;for(;W<V;){const K=l.charCodeAt(r);if(K>=48&&K<=57)Q=Q*16+K-48;else if(K>=65&&K<=70)Q=Q*16+K-65+10;else if(K>=97&&K<=102)Q=Q*16+K-97+10;else break;r++,W++}return W<V&&(Q=-1),Q}function _(V){r=V,c="",t=0,a=16,p=0}function P(){const V=r;if(l.charCodeAt(r)===48)r++;else for(r++;r<l.length&&M(l.charCodeAt(r));)r++;if(r<l.length&&l.charCodeAt(r)===46)if(r++,r<l.length&&M(l.charCodeAt(r)))for(r++;r<l.length&&M(l.charCodeAt(r));)r++;else return p=3,l.substring(V,r);let W=r;if(r<l.length&&(l.charCodeAt(r)===69||l.charCodeAt(r)===101))if(r++,(r<l.length&&l.charCodeAt(r)===43||l.charCodeAt(r)===45)&&r++,r<l.length&&M(l.charCodeAt(r))){for(r++;r<l.length&&M(l.charCodeAt(r));)r++;W=r}else p=3;return l.substring(V,W)}function R(){let V="",W=r;for(;;){if(r>=i){V+=l.substring(W,r),p=2;break}const Q=l.charCodeAt(r);if(Q===34){V+=l.substring(W,r),r++;break}if(Q===92){if(V+=l.substring(W,r),r++,r>=i){p=2;break}switch(l.charCodeAt(r++)){case 34:V+='"';break;case 92:V+="\\";break;case 47:V+="/";break;case 98:V+="\b";break;case 102:V+="\f";break;case 110:V+=`
`;break;case 114:V+="\r";break;case 116:V+=" ";break;case 117:{const H=h(4);H>=0?V+=String.fromCharCode(H):p=4;break}default:p=5}W=r;continue}if(Q>=0&&Q<=31)if(y(Q)){V+=l.substring(W,r),p=2;break}else p=6;r++}return V}function $(){if(c="",p=0,t=r,r>=i)return t=i,a=17;let V=l.charCodeAt(r);if(A(V)){do r++,c+=String.fromCharCode(V),V=l.charCodeAt(r);while(A(V));return a=15}if(y(V))return r++,c+=String.fromCharCode(V),V===13&&l.charCodeAt(r)===10&&(r++,c+=`
`),a=14;switch(V){case 123:return r++,a=1;case 125:return r++,a=2;case 91:return r++,a=3;case 93:return r++,a=4;case 58:return r++,a=6;case 44:return r++,a=5;case 34:return r++,c=R(),a=10;case 47:{const W=r-1;if(l.charCodeAt(r+1)===47){for(r+=2;r<i&&!y(l.charCodeAt(r));)r++;return c=l.substring(W,r),a=12}if(l.charCodeAt(r+1)===42){r+=2;const Q=i-1;let K=!1;for(;r<Q;){if(l.charCodeAt(r)===42&&l.charCodeAt(r+1)===47){r+=2,K=!0;break}r++}return K||(r++,p=1),c=l.substring(W,r),a=13}return c+=String.fromCharCode(V),r++,a=16}case 45:if(c+=String.fromCharCode(V),r++,r===i||!M(l.charCodeAt(r)))return a=16;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return c+=P(),a=11;default:for(;r<i&&E(V);)r++,V=l.charCodeAt(r);if(t!==r){switch(c=l.substring(t,r),c){case"true":return a=8;case"false":return a=9;case"null":return a=7}return a=16}return c+=String.fromCharCode(V),r++,a=16}}function E(V){if(A(V)||y(V))return!1;switch(V){case 125:case 93:case 123:case 91:case 34:case 58:case 44:case 47:return!1}return!0}function z(){let V;do V=$();while(V>=12&&V<=15);return V}return{setPosition:_,getPosition:()=>r,scan:I?z:$,getToken:()=>a,getTokenValue:()=>c,getTokenOffset:()=>t,getTokenLength:()=>r-t,getTokenError:()=>p}}e.createScanner=S;function A(l){return l===32||l===9||l===11||l===12||l===160||l===5760||l>=8192&&l<=8203||l===8239||l===8287||l===12288||l===65279}function y(l){return l===10||l===13||l===8232||l===8233}function M(l){return l>=48&&l<=57}var L;(function(l){l[l.nullCharacter=0]="nullCharacter",l[l.maxAsciiCharacter=127]="maxAsciiCharacter",l[l.lineFeed=10]="lineFeed",l[l.carriageReturn=13]="carriageReturn",l[l.lineSeparator=8232]="lineSeparator",l[l.paragraphSeparator=8233]="paragraphSeparator",l[l.nextLine=133]="nextLine",l[l.space=32]="space",l[l.nonBreakingSpace=160]="nonBreakingSpace",l[l.enQuad=8192]="enQuad",l[l.emQuad=8193]="emQuad",l[l.enSpace=8194]="enSpace",l[l.emSpace=8195]="emSpace",l[l.threePerEmSpace=8196]="threePerEmSpace",l[l.fourPerEmSpace=8197]="fourPerEmSpace",l[l.sixPerEmSpace=8198]="sixPerEmSpace",l[l.figureSpace=8199]="figureSpace",l[l.punctuationSpace=8200]="punctuationSpace",l[l.thinSpace=8201]="thinSpace",l[l.hairSpace=8202]="hairSpace",l[l.zeroWidthSpace=8203]="zeroWidthSpace",l[l.narrowNoBreakSpace=8239]="narrowNoBreakSpace",l[l.ideographicSpace=12288]="ideographicSpace",l[l.mathematicalSpace=8287]="mathematicalSpace",l[l.ogham=5760]="ogham",l[l._=95]="_",l[l.$=36]="$",l[l._0=48]="_0",l[l._1=49]="_1",l[l._2=50]="_2",l[l._3=51]="_3",l[l._4=52]="_4",l[l._5=53]="_5",l[l._6=54]="_6",l[l._7=55]="_7",l[l._8=56]="_8",l[l._9=57]="_9",l[l.a=97]="a",l[l.b=98]="b",l[l.c=99]="c",l[l.d=100]="d",l[l.e=101]="e",l[l.f=102]="f",l[l.g=103]="g",l[l.h=104]="h",l[l.i=105]="i",l[l.j=106]="j",l[l.k=107]="k",l[l.l=108]="l",l[l.m=109]="m",l[l.n=110]="n",l[l.o=111]="o",l[l.p=112]="p",l[l.q=113]="q",l[l.r=114]="r",l[l.s=115]="s",l[l.t=116]="t",l[l.u=117]="u",l[l.v=118]="v",l[l.w=119]="w",l[l.x=120]="x",l[l.y=121]="y",l[l.z=122]="z",l[l.A=65]="A",l[l.B=66]="B",l[l.C=67]="C",l[l.D=68]="D",l[l.E=69]="E",l[l.F=70]="F",l[l.G=71]="G",l[l.H=72]="H",l[l.I=73]="I",l[l.J=74]="J",l[l.K=75]="K",l[l.L=76]="L",l[l.M=77]="M",l[l.N=78]="N",l[l.O=79]="O",l[l.P=80]="P",l[l.Q=81]="Q",l[l.R=82]="R",l[l.S=83]="S",l[l.T=84]="T",l[l.U=85]="U",l[l.V=86]="V",l[l.W=87]="W",l[l.X=88]="X",l[l.Y=89]="Y",l[l.Z=90]="Z",l[l.ampersand=38]="ampersand",l[l.asterisk=42]="asterisk",l[l.at=64]="at",l[l.backslash=92]="backslash",l[l.bar=124]="bar",l[l.caret=94]="caret",l[l.closeBrace=125]="closeBrace",l[l.closeBracket=93]="closeBracket",l[l.closeParen=41]="closeParen",l[l.colon=58]="colon",l[l.comma=44]="comma",l[l.dot=46]="dot",l[l.doubleQuote=34]="doubleQuote",l[l.equals=61]="equals",l[l.exclamation=33]="exclamation",l[l.greaterThan=62]="greaterThan",l[l.lessThan=60]="lessThan",l[l.minus=45]="minus",l[l.openBrace=123]="openBrace",l[l.openBracket=91]="openBracket",l[l.openParen=40]="openParen",l[l.percent=37]="percent",l[l.plus=43]="plus",l[l.question=63]="question",l[l.semicolon=59]="semicolon",l[l.singleQuote=39]="singleQuote",l[l.slash=47]="slash",l[l.tilde=126]="tilde",l[l.backspace=8]="backspace",l[l.formFeed=12]="formFeed",l[l.byteOrderMark=65279]="byteOrderMark",l[l.tab=9]="tab",l[l.verticalTab=11]="verticalTab"})(L||(L={}));function v(l,I){const r=[],i=new Object;let c;const t={value:{},offset:0,length:0,type:"object",parent:void 0};let a=!1;function p(h,_,P,R){t.value=h,t.offset=_,t.length=P,t.type=R,t.colonOffset=void 0,c=t}try{d(l,{onObjectBegin:(h,_)=>{if(I<=h)throw i;c=void 0,a=I>h,r.push("")},onObjectProperty:(h,_,P)=>{if(I<_||(p(h,_,P,"property"),r[r.length-1]=h,I<=_+P))throw i},onObjectEnd:(h,_)=>{if(I<=h)throw i;c=void 0,r.pop()},onArrayBegin:(h,_)=>{if(I<=h)throw i;c=void 0,r.push(0)},onArrayEnd:(h,_)=>{if(I<=h)throw i;c=void 0,r.pop()},onLiteralValue:(h,_,P)=>{if(I<_||(p(h,_,P,b(h)),I<=_+P))throw i},onSeparator:(h,_,P)=>{if(I<=_)throw i;if(h===":"&&c&&c.type==="property")c.colonOffset=_,a=!1,c=void 0;else if(h===","){const R=r[r.length-1];typeof R=="number"?r[r.length-1]=R+1:(a=!0,r[r.length-1]=""),c=void 0}}})}catch(h){if(h!==i)throw h}return{path:r,previousNode:c,isAtPropertyKey:a,matches:h=>{let _=0;for(let P=0;_<h.length&&P<r.length;P++)if(h[_]===r[P]||h[_]==="*")_++;else if(h[_]!=="**")return!1;return _===h.length}}}e.getLocation=v;function u(l,I=[],r=B.DEFAULT){let i=null,c=[];const t=[];function a(h){Array.isArray(c)?c.push(h):i!==null&&(c[i]=h)}return d(l,{onObjectBegin:()=>{const h={};a(h),t.push(c),c=h,i=null},onObjectProperty:h=>{i=h},onObjectEnd:()=>{c=t.pop()},onArrayBegin:()=>{const h=[];a(h),t.push(c),c=h,i=null},onArrayEnd:()=>{c=t.pop()},onLiteralValue:a,onError:(h,_,P)=>{I.push({error:h,offset:_,length:P})}},r),c[0]}e.parse=u;function m(l,I=[],r=B.DEFAULT){let i={type:"array",offset:-1,length:-1,children:[],parent:void 0};function c(h){i.type==="property"&&(i.length=h-i.offset,i=i.parent)}function t(h){return i.children.push(h),h}d(l,{onObjectBegin:h=>{i=t({type:"object",offset:h,length:-1,parent:i,children:[]})},onObjectProperty:(h,_,P)=>{i=t({type:"property",offset:_,length:-1,parent:i,children:[]}),i.children.push({type:"string",value:h,offset:_,length:P,parent:i})},onObjectEnd:(h,_)=>{i.length=h+_-i.offset,i=i.parent,c(h+_)},onArrayBegin:(h,_)=>{i=t({type:"array",offset:h,length:-1,parent:i,children:[]})},onArrayEnd:(h,_)=>{i.length=h+_-i.offset,i=i.parent,c(h+_)},onLiteralValue:(h,_,P)=>{t({type:b(h),offset:_,length:P,parent:i,value:h}),c(_+P)},onSeparator:(h,_,P)=>{i.type==="property"&&(h===":"?i.colonOffset=_:h===","&&c(_))},onError:(h,_,P)=>{I.push({error:h,offset:_,length:P})}},r);const p=i.children[0];return p&&delete p.parent,p}e.parseTree=m;function s(l,I){if(!l)return;let r=l;for(let i of I)if(typeof i=="string"){if(r.type!=="object"||!Array.isArray(r.children))return;let c=!1;for(const t of r.children)if(Array.isArray(t.children)&&t.children[0].value===i){r=t.children[1],c=!0;break}if(!c)return}else{const c=i;if(r.type!=="array"||c<0||!Array.isArray(r.children)||c>=r.children.length)return;r=r.children[c]}return r}e.findNodeAtLocation=s;function n(l){if(!l.parent||!l.parent.children)return[];const I=n(l.parent);if(l.parent.type==="property"){const r=l.parent.children[0].value;I.push(r)}else if(l.parent.type==="array"){const r=l.parent.children.indexOf(l);r!==-1&&I.push(r)}return I}e.getNodePath=n;function f(l){switch(l.type){case"array":return l.children.map(f);case"object":{const I=Object.create(null);for(let r of l.children){const i=r.children[1];i&&(I[r.children[0].value]=f(i))}return I}case"null":case"string":case"number":case"boolean":return l.value;default:return}}e.getNodeValue=f;function D(l,I,r=!1){return I>=l.offset&&I<l.offset+l.length||r&&I===l.offset+l.length}e.contains=D;function T(l,I,r=!1){if(D(l,I,r)){const i=l.children;if(Array.isArray(i))for(let c=0;c<i.length&&i[c].offset<=I;c++){const t=T(i[c],I,r);if(t)return t}return l}}e.findNodeAtOffset=T;function d(l,I,r=B.DEFAULT){const i=S(l,!1);function c(Se){return Se?()=>Se(i.getTokenOffset(),i.getTokenLength()):()=>!0}function t(Se){return Se?fe=>Se(fe,i.getTokenOffset(),i.getTokenLength()):()=>!0}const a=c(I.onObjectBegin),p=t(I.onObjectProperty),h=c(I.onObjectEnd),_=c(I.onArrayBegin),P=c(I.onArrayEnd),R=t(I.onLiteralValue),$=t(I.onSeparator),E=c(I.onComment),z=t(I.onError),V=r&&r.disallowComments,W=r&&r.allowTrailingComma;function Q(){for(;;){const Se=i.scan();switch(i.getTokenError()){case 4:K(14);break;case 5:K(15);break;case 3:K(13);break;case 1:V||K(11);break;case 2:K(12);break;case 6:K(16);break}switch(Se){case 12:case 13:V?K(10):E();break;case 16:K(1);break;case 15:case 14:break;default:return Se}}}function K(Se,fe=[],ne=[]){if(z(Se),fe.length+ne.length>0){let me=i.getToken();for(;me!==17;){if(fe.indexOf(me)!==-1){Q();break}else if(ne.indexOf(me)!==-1)break;me=Q()}}}function H(Se){const fe=i.getTokenValue();return Se?R(fe):p(fe),Q(),!0}function te(){switch(i.getToken()){case 11:{let Se=0;try{Se=JSON.parse(i.getTokenValue()),typeof Se!="number"&&(K(2),Se=0)}catch{K(2)}R(Se);break}case 7:R(null);break;case 8:R(!0);break;case 9:R(!1);break;default:return!1}return Q(),!0}function ae(){return i.getToken()!==10?(K(3,[],[2,5]),!1):(H(!1),i.getToken()===6?($(":"),Q(),de()||K(4,[],[2,5])):K(5,[],[2,5]),!0)}function ee(){a(),Q();let Se=!1;for(;i.getToken()!==2&&i.getToken()!==17;){if(i.getToken()===5){if(Se||K(4,[],[]),$(","),Q(),i.getToken()===2&&W)break}else Se&&K(6,[],[]);ae()||K(4,[],[2,5]),Se=!0}return h(),i.getToken()!==2?K(7,[2],[]):Q(),!0}function ce(){_(),Q();let Se=!1;for(;i.getToken()!==4&&i.getToken()!==17;){if(i.getToken()===5){if(Se||K(4,[],[]),$(","),Q(),i.getToken()===4&&W)break}else Se&&K(6,[],[]);de()||K(4,[],[4,5]),Se=!0}return P(),i.getToken()!==4?K(8,[4],[]):Q(),!0}function de(){switch(i.getToken()){case 3:return ce();case 1:return ee();case 10:return H(!0);default:return te()}}return Q(),i.getToken()===17?r.allowEmptyContent?!0:(K(4,[],[]),!1):de()?(i.getToken()!==17&&K(9,[],[]),!0):(K(4,[],[]),!1)}e.visit=d;function g(l,I){let r=S(l),i=[],c,t=0,a;do switch(a=r.getPosition(),c=r.scan(),c){case 12:case 13:case 17:t!==a&&i.push(l.substring(t,a)),I!==void 0&&i.push(r.getTokenValue().replace(/[^\r\n]/g,I)),t=r.getPosition();break}while(c!==17);return i.join("")}e.stripComments=g;function b(l){switch(typeof l){case"boolean":return"boolean";case"number":return"number";case"string":return"string";case"object":{if(l){if(Array.isArray(l))return"array"}else return"null";return"object"}default:return"null"}}e.getNodeType=b}),function(J,e){typeof exports=="object"&&typeof module!="undefined"?e(exports):typeof define=="function"&&define.amd?define(Ee[101],we([0]),e):(J=typeof globalThis!="undefined"?globalThis:J||self,e(J.marked={}))}(this,function(J){"use strict";function e(ge,ue){for(var N=0;N<ue.length;N++){var F=ue[N];F.enumerable=F.enumerable||!1,F.configurable=!0,"value"in F&&(F.writable=!0),Object.defineProperty(ge,F.key,F)}}function o(ge,ue,N){return ue&&e(ge.prototype,ue),N&&e(ge,N),Object.defineProperty(ge,"prototype",{writable:!1}),ge}function k(ge,ue){if(!!ge){if(typeof ge=="string")return w(ge,ue);var N=Object.prototype.toString.call(ge).slice(8,-1);if(N==="Object"&&ge.constructor&&(N=ge.constructor.name),N==="Map"||N==="Set")return Array.from(ge);if(N==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(N))return w(ge,ue)}}function w(ge,ue){(ue==null||ue>ge.length)&&(ue=ge.length);for(var N=0,F=new Array(ue);N<ue;N++)F[N]=ge[N];return F}function B(ge,ue){var N=typeof Symbol!="undefined"&&ge[Symbol.iterator]||ge["@@iterator"];if(N)return(N=N.call(ge)).next.bind(N);if(Array.isArray(ge)||(N=k(ge))||ue&&ge&&typeof ge.length=="number"){N&&(ge=N);var F=0;return function(){return F>=ge.length?{done:!0}:{done:!1,value:ge[F++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function S(){return{baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}J.defaults=S();function A(ge){J.defaults=ge}var y=/[&<>"']/,M=/[&<>"']/g,L=/[<>"']|&(?!#?\w+;)/,v=/[<>"']|&(?!#?\w+;)/g,u={"&":"&","<":"<",">":">",'"':""","'":"'"},m=function(ue){return u[ue]};function s(ge,ue){if(ue){if(y.test(ge))return ge.replace(M,m)}else if(L.test(ge))return ge.replace(v,m);return ge}var n=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function f(ge){return ge.replace(n,function(ue,N){return N=N.toLowerCase(),N==="colon"?":":N.charAt(0)==="#"?N.charAt(1)==="x"?String.fromCharCode(parseInt(N.substring(2),16)):String.fromCharCode(+N.substring(1)):""})}var D=/(^|[^\[])\^/g;function T(ge,ue){ge=ge.source||ge,ue=ue||"";var N={replace:function(C,O){return O=O.source||O,O=O.replace(D,"$1"),ge=ge.replace(C,O),N},getRegex:function(){return new RegExp(ge,ue)}};return N}var d=/[^\w:]/g,g=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function b(ge,ue,N){if(ge){var F;try{F=decodeURIComponent(f(N)).replace(d,"").toLowerCase()}catch{return null}if(F.indexOf("javascript:")===0||F.indexOf("vbscript:")===0||F.indexOf("data:")===0)return null}ue&&!g.test(N)&&(N=c(ue,N));try{N=encodeURI(N).replace(/%25/g,"%")}catch{return null}return N}var l={},I=/^[^:]+:\/*[^/]*$/,r=/^([^:]+:)[\s\S]*$/,i=/^([^:]+:\/*[^/]*)[\s\S]*$/;function c(ge,ue){l[" "+ge]||(I.test(ge)?l[" "+ge]=ge+"/":l[" "+ge]=h(ge,"/",!0)),ge=l[" "+ge];var N=ge.indexOf(":")===-1;return ue.substring(0,2)==="//"?N?ue:ge.replace(r,"$1")+ue:ue.charAt(0)==="/"?N?ue:ge.replace(i,"$1")+ue:ge+ue}var t={exec:function(){}};function a(ge){for(var ue=1,N,F;ue<arguments.length;ue++){N=arguments[ue];for(F in N)Object.prototype.hasOwnProperty.call(N,F)&&(ge[F]=N[F])}return ge}function p(ge,ue){var N=ge.replace(/\|/g,function(O,x,X){for(var re=!1,ve=x;--ve>=0&&X[ve]==="\\";)re=!re;return re?"|":" |"}),F=N.split(/ \|/),C=0;if(F[0].trim()||F.shift(),F[F.length-1].trim()||F.pop(),F.length>ue)F.splice(ue);else for(;F.length<ue;)F.push("");for(;C<F.length;C++)F[C]=F[C].trim().replace(/\\\|/g,"|");return F}function h(ge,ue,N){var F=ge.length;if(F===0)return"";for(var C=0;C<F;){var O=ge.charAt(F-C-1);if(O===ue&&!N)C++;else if(O!==ue&&N)C++;else break}return ge.substr(0,F-C)}function _(ge,ue){if(ge.indexOf(ue[1])===-1)return-1;for(var N=ge.length,F=0,C=0;C<N;C++)if(ge[C]==="\\")C++;else if(ge[C]===ue[0])F++;else if(ge[C]===ue[1]&&(F--,F<0))return C;return-1}function P(ge){ge&&ge.sanitize&&!ge.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}function R(ge,ue){if(ue<1)return"";for(var N="";ue>1;)ue&1&&(N+=ge),ue>>=1,ge+=ge;return N+ge}function $(ge,ue,N,F){var C=ue.href,O=ue.title?s(ue.title):null,x=ge[1].replace(/\\([\[\]])/g,"$1");if(ge[0].charAt(0)!=="!"){F.state.inLink=!0;var X={type:"link",raw:N,href:C,title:O,text:x,tokens:F.inlineTokens(x,[])};return F.state.inLink=!1,X}else return{type:"image",raw:N,href:C,title:O,text:s(x)}}function E(ge,ue){var N=ge.match(/^(\s+)(?:```)/);if(N===null)return ue;var F=N[1];return ue.split(`
`).map(function(C){var O=C.match(/^\s+/);if(O===null)return C;var x=O[0];return x.length>=F.length?C.slice(F.length):C}).join(`
`)}var z=function(){function ge(N){this.options=N||J.defaults}var ue=ge.prototype;return ue.space=function(F){var C=this.rules.block.newline.exec(F);if(C&&C[0].length>0)return{type:"space",raw:C[0]}},ue.code=function(F){var C=this.rules.block.code.exec(F);if(C){var O=C[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:C[0],codeBlockStyle:"indented",text:this.options.pedantic?O:h(O,`
`)}}},ue.fences=function(F){var C=this.rules.block.fences.exec(F);if(C){var O=C[0],x=E(O,C[3]||"");return{type:"code",raw:O,lang:C[2]?C[2].trim():C[2],text:x}}},ue.heading=function(F){var C=this.rules.block.heading.exec(F);if(C){var O=C[2].trim();if(/#$/.test(O)){var x=h(O,"#");(this.options.pedantic||!x||/ $/.test(x))&&(O=x.trim())}var X={type:"heading",raw:C[0],depth:C[1].length,text:O,tokens:[]};return this.lexer.inline(X.text,X.tokens),X}},ue.hr=function(F){var C=this.rules.block.hr.exec(F);if(C)return{type:"hr",raw:C[0]}},ue.blockquote=function(F){var C=this.rules.block.blockquote.exec(F);if(C){var O=C[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:C[0],tokens:this.lexer.blockTokens(O,[]),text:O}}},ue.list=function(F){var C=this.rules.block.list.exec(F);if(C){var O,x,X,re,ve,Ie,Me,Le,ze,xe,Re,Qe,tt=C[1].trim(),Te=tt.length>1,it={type:"list",raw:"",ordered:Te,start:Te?+tt.slice(0,-1):"",loose:!1,items:[]};tt=Te?"\\d{1,9}\\"+tt.slice(-1):"\\"+tt,this.options.pedantic&&(tt=Te?tt:"[*+-]");for(var G=new RegExp("^( {0,3}"+tt+")((?: [^\\n]*)?(?:\\n|$))");F&&(Qe=!1,!(!(C=G.exec(F))||this.rules.block.hr.test(F)));){if(O=C[0],F=F.substring(O.length),Le=C[2].split(`
`,1)[0],ze=F.split(`
`,1)[0],this.options.pedantic?(re=2,Re=Le.trimLeft()):(re=C[2].search(/[^ ]/),re=re>4?1:re,Re=Le.slice(re),re+=C[1].length),Ie=!1,!Le&&/^ *$/.test(ze)&&(O+=ze+`
`,F=F.substring(ze.length+1),Qe=!0),!Qe)for(var Y=new RegExp("^ {0,"+Math.min(3,re-1)+"}(?:[*+-]|\\d{1,9}[.)])");F&&(xe=F.split(`
`,1)[0],Le=xe,this.options.pedantic&&(Le=Le.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),!Y.test(Le));){if(Le.search(/[^ ]/)>=re||!Le.trim())Re+=`
`+Le.slice(re);else if(!Ie)Re+=`
`+Le;else break;!Ie&&!Le.trim()&&(Ie=!0),O+=xe+`
`,F=F.substring(xe.length+1)}it.loose||(Me?it.loose=!0:/\n *\n *$/.test(O)&&(Me=!0)),this.options.gfm&&(x=/^\[[ xX]\] /.exec(Re),x&&(X=x[0]!=="[ ] ",Re=Re.replace(/^\[[ xX]\] +/,""))),it.items.push({type:"list_item",raw:O,task:!!x,checked:X,loose:!1,text:Re}),it.raw+=O}it.items[it.items.length-1].raw=O.trimRight(),it.items[it.items.length-1].text=Re.trimRight(),it.raw=it.raw.trimRight();var le=it.items.length;for(ve=0;ve<le;ve++){this.lexer.state.top=!1,it.items[ve].tokens=this.lexer.blockTokens(it.items[ve].text,[]);var Oe=it.items[ve].tokens.filter(function(Ge){return Ge.type==="space"}),We=Oe.every(function(Ge){for(var Je=Ge.raw.split(""),ft=0,It=B(Je),St;!(St=It()).done;){var kt=St.value;if(kt===`
`&&(ft+=1),ft>1)return!0}return!1});!it.loose&&Oe.length&&We&&(it.loose=!0,it.items[ve].loose=!0)}return it}},ue.html=function(F){var C=this.rules.block.html.exec(F);if(C){var O={type:"html",raw:C[0],pre:!this.options.sanitizer&&(C[1]==="pre"||C[1]==="script"||C[1]==="style"),text:C[0]};return this.options.sanitize&&(O.type="paragraph",O.text=this.options.sanitizer?this.options.sanitizer(C[0]):s(C[0]),O.tokens=[],this.lexer.inline(O.text,O.tokens)),O}},ue.def=function(F){var C=this.rules.block.def.exec(F);if(C){C[3]&&(C[3]=C[3].substring(1,C[3].length-1));var O=C[1].toLowerCase().replace(/\s+/g," ");return{type:"def",tag:O,raw:C[0],href:C[2],title:C[3]}}},ue.table=function(F){var C=this.rules.block.table.exec(F);if(C){var O={type:"table",header:p(C[1]).map(function(Me){return{text:Me}}),align:C[2].replace(/^ *|\| *$/g,"").split(/ *\| */),rows:C[3]?C[3].replace(/\n[ \t]*$/,"").split(`
`):[]};if(O.header.length===O.align.length){O.raw=C[0];var x=O.align.length,X,re,ve,Ie;for(X=0;X<x;X++)/^ *-+: *$/.test(O.align[X])?O.align[X]="right":/^ *:-+: *$/.test(O.align[X])?O.align[X]="center":/^ *:-+ *$/.test(O.align[X])?O.align[X]="left":O.align[X]=null;for(x=O.rows.length,X=0;X<x;X++)O.rows[X]=p(O.rows[X],O.header.length).map(function(Me){return{text:Me}});for(x=O.header.length,re=0;re<x;re++)O.header[re].tokens=[],this.lexer.inlineTokens(O.header[re].text,O.header[re].tokens);for(x=O.rows.length,re=0;re<x;re++)for(Ie=O.rows[re],ve=0;ve<Ie.length;ve++)Ie[ve].tokens=[],this.lexer.inlineTokens(Ie[ve].text,Ie[ve].tokens);return O}}},ue.lheading=function(F){var C=this.rules.block.lheading.exec(F);if(C){var O={type:"heading",raw:C[0],depth:C[2].charAt(0)==="="?1:2,text:C[1],tokens:[]};return this.lexer.inline(O.text,O.tokens),O}},ue.paragraph=function(F){var C=this.rules.block.paragraph.exec(F);if(C){var O={type:"paragraph",raw:C[0],text:C[1].charAt(C[1].length-1)===`
`?C[1].slice(0,-1):C[1],tokens:[]};return this.lexer.inline(O.text,O.tokens),O}},ue.text=function(F){var C=this.rules.block.text.exec(F);if(C){var O={type:"text",raw:C[0],text:C[0],tokens:[]};return this.lexer.inline(O.text,O.tokens),O}},ue.escape=function(F){var C=this.rules.inline.escape.exec(F);if(C)return{type:"escape",raw:C[0],text:s(C[1])}},ue.tag=function(F){var C=this.rules.inline.tag.exec(F);if(C)return!this.lexer.state.inLink&&/^<a /i.test(C[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&/^<\/a>/i.test(C[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(C[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(C[0])&&(this.lexer.state.inRawBlock=!1),{type:this.options.sanitize?"text":"html",raw:C[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(C[0]):s(C[0]):C[0]}},ue.link=function(F){var C=this.rules.inline.link.exec(F);if(C){var O=C[2].trim();if(!this.options.pedantic&&/^</.test(O)){if(!/>$/.test(O))return;var x=h(O.slice(0,-1),"\\");if((O.length-x.length)%2==0)return}else{var X=_(C[2],"()");if(X>-1){var re=C[0].indexOf("!")===0?5:4,ve=re+C[1].length+X;C[2]=C[2].substring(0,X),C[0]=C[0].substring(0,ve).trim(),C[3]=""}}var Ie=C[2],Me="";if(this.options.pedantic){var Le=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(Ie);Le&&(Ie=Le[1],Me=Le[3])}else Me=C[3]?C[3].slice(1,-1):"";return Ie=Ie.trim(),/^</.test(Ie)&&(this.options.pedantic&&!/>$/.test(O)?Ie=Ie.slice(1):Ie=Ie.slice(1,-1)),$(C,{href:Ie&&Ie.replace(this.rules.inline._escapes,"$1"),title:Me&&Me.replace(this.rules.inline._escapes,"$1")},C[0],this.lexer)}},ue.reflink=function(F,C){var O;if((O=this.rules.inline.reflink.exec(F))||(O=this.rules.inline.nolink.exec(F))){var x=(O[2]||O[1]).replace(/\s+/g," ");if(x=C[x.toLowerCase()],!x||!x.href){var X=O[0].charAt(0);return{type:"text",raw:X,text:X}}return $(O,x,O[0],this.lexer)}},ue.emStrong=function(F,C,O){O===void 0&&(O="");var x=this.rules.inline.emStrong.lDelim.exec(F);if(!!x&&!(x[3]&&O.match(/(?:[0-9A-Za-z\xAA\xB2\xB3\xB5\xB9\xBA\xBC-\xBE\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u0660-\u0669\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07C0-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0966-\u096F\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09E6-\u09F1\u09F4-\u09F9\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A66-\u0A6F\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AE6-\u0AEF\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B66-\u0B6F\u0B71-\u0B77\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0BE6-\u0BF2\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C66-\u0C6F\u0C78-\u0C7E\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CE6-\u0CEF\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D58-\u0D61\u0D66-\u0D78\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DE6-\u0DEF\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F20-\u0F33\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F-\u1049\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u1090-\u1099\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1369-\u137C\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u17E0-\u17E9\u17F0-\u17F9\u1810-\u1819\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A16\u1A20-\u1A54\u1A80-\u1A89\u1A90-\u1A99\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B50-\u1B59\u1B83-\u1BA0\u1BAE-\u1BE5\u1C00-\u1C23\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2070\u2071\u2074-\u2079\u207F-\u2089\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2150-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2CFD\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u3192-\u3195\u31A0-\u31BF\u31F0-\u31FF\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA830-\uA835\uA840-\uA873\uA882-\uA8B3\uA8D0-\uA8D9\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA900-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF-\uA9D9\uA9E0-\uA9E4\uA9E6-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA50-\uAA59\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD07-\uDD33\uDD40-\uDD78\uDD8A\uDD8B\uDE80-\uDE9C\uDEA0-\uDED0\uDEE1-\uDEFB\uDF00-\uDF23\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC58-\uDC76\uDC79-\uDC9E\uDCA7-\uDCAF\uDCE0-\uDCF2\uDCF4\uDCF5\uDCFB-\uDD1B\uDD20-\uDD39\uDD80-\uDDB7\uDDBC-\uDDCF\uDDD2-\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE40-\uDE48\uDE60-\uDE7E\uDE80-\uDE9F\uDEC0-\uDEC7\uDEC9-\uDEE4\uDEEB-\uDEEF\uDF00-\uDF35\uDF40-\uDF55\uDF58-\uDF72\uDF78-\uDF91\uDFA9-\uDFAF]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDCFA-\uDD23\uDD30-\uDD39\uDE60-\uDE7E\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF27\uDF30-\uDF45\uDF51-\uDF54\uDF70-\uDF81\uDFB0-\uDFCB\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC52-\uDC6F\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD03-\uDD26\uDD36-\uDD3F\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDD0-\uDDDA\uDDDC\uDDE1-\uDDF4\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDEF0-\uDEF9\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC50-\uDC59\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE50-\uDE59\uDE80-\uDEAA\uDEB8\uDEC0-\uDEC9\uDF00-\uDF1A\uDF30-\uDF3B\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCF2\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDD50-\uDD59\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC50-\uDC6C\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD50-\uDD59\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDDA0-\uDDA9\uDEE0-\uDEF2\uDFB0\uDFC0-\uDFD4]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDE70-\uDEBE\uDEC0-\uDEC9\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF50-\uDF59\uDF5B-\uDF61\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE96\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD50-\uDD52\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD834[\uDEE0-\uDEF3\uDF60-\uDF78]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD837[\uDF00-\uDF1E]|\uD838[\uDD00-\uDD2C\uDD37-\uDD3D\uDD40-\uDD49\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB\uDEF0-\uDEF9]|\uD839[\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDCC7-\uDCCF\uDD00-\uDD43\uDD4B\uDD50-\uDD59]|\uD83B[\uDC71-\uDCAB\uDCAD-\uDCAF\uDCB1-\uDCB4\uDD01-\uDD2D\uDD2F-\uDD3D\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD83C[\uDD00-\uDD0C]|\uD83E[\uDFF0-\uDFF9]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF38\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A])/))){var X=x[1]||x[2]||"";if(!X||X&&(O===""||this.rules.inline.punctuation.exec(O))){var re=x[0].length-1,ve,Ie,Me=re,Le=0,ze=x[0][0]==="*"?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(ze.lastIndex=0,C=C.slice(-1*F.length+re);(x=ze.exec(C))!=null;)if(ve=x[1]||x[2]||x[3]||x[4]||x[5]||x[6],!!ve){if(Ie=ve.length,x[3]||x[4]){Me+=Ie;continue}else if((x[5]||x[6])&&re%3&&!((re+Ie)%3)){Le+=Ie;continue}if(Me-=Ie,!(Me>0)){if(Ie=Math.min(Ie,Ie+Me+Le),Math.min(re,Ie)%2){var xe=F.slice(1,re+x.index+Ie);return{type:"em",raw:F.slice(0,re+x.index+Ie+1),text:xe,tokens:this.lexer.inlineTokens(xe,[])}}var Re=F.slice(2,re+x.index+Ie-1);return{type:"strong",raw:F.slice(0,re+x.index+Ie+1),text:Re,tokens:this.lexer.inlineTokens(Re,[])}}}}}},ue.codespan=function(F){var C=this.rules.inline.code.exec(F);if(C){var O=C[2].replace(/\n/g," "),x=/[^ ]/.test(O),X=/^ /.test(O)&&/ $/.test(O);return x&&X&&(O=O.substring(1,O.length-1)),O=s(O,!0),{type:"codespan",raw:C[0],text:O}}},ue.br=function(F){var C=this.rules.inline.br.exec(F);if(C)return{type:"br",raw:C[0]}},ue.del=function(F){var C=this.rules.inline.del.exec(F);if(C)return{type:"del",raw:C[0],text:C[2],tokens:this.lexer.inlineTokens(C[2],[])}},ue.autolink=function(F,C){var O=this.rules.inline.autolink.exec(F);if(O){var x,X;return O[2]==="@"?(x=s(this.options.mangle?C(O[1]):O[1]),X="mailto:"+x):(x=s(O[1]),X=x),{type:"link",raw:O[0],text:x,href:X,tokens:[{type:"text",raw:x,text:x}]}}},ue.url=function(F,C){var O;if(O=this.rules.inline.url.exec(F)){var x,X;if(O[2]==="@")x=s(this.options.mangle?C(O[0]):O[0]),X="mailto:"+x;else{var re;do re=O[0],O[0]=this.rules.inline._backpedal.exec(O[0])[0];while(re!==O[0]);x=s(O[0]),O[1]==="www."?X="http://"+x:X=x}return{type:"link",raw:O[0],text:x,href:X,tokens:[{type:"text",raw:x,text:x}]}}},ue.inlineText=function(F,C){var O=this.rules.inline.text.exec(F);if(O){var x;return this.lexer.state.inRawBlock?x=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(O[0]):s(O[0]):O[0]:x=s(this.options.smartypants?C(O[0]):O[0]),{type:"text",raw:O[0],text:x}}},ge}(),V={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hr:/^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3}bull)( [^\n]+?)?(?:\n|$)/,html:"^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))",def:/^ {0,3}\[(label)\]: *(?:\n *)?<?([^\s>]+)>?(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/,table:t,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,text:/^[^\n]+/};V._label=/(?!\s*\])(?:\\.|[^\[\]\\])+/,V._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,V.def=T(V.def).replace("label",V._label).replace("title",V._title).getRegex(),V.bullet=/(?:[*+-]|\d{1,9}[.)])/,V.listItemStart=T(/^( *)(bull) */).replace("bull",V.bullet).getRegex(),V.list=T(V.list).replace(/bull/g,V.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+V.def.source+")").getRegex(),V._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",V._comment=/<!--(?!-?>)[\s\S]*?(?:-->|$)/,V.html=T(V.html,"i").replace("comment",V._comment).replace("tag",V._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),V.paragraph=T(V._paragraph).replace("hr",V.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",V._tag).getRegex(),V.blockquote=T(V.blockquote).replace("paragraph",V.paragraph).getRegex(),V.normal=a({},V),V.gfm=a({},V.normal,{table:"^ *([^\\n ].*\\|.*)\\n {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)(?:\\| *)?(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),V.gfm.table=T(V.gfm.table).replace("hr",V.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",V._tag).getRegex(),V.gfm.paragraph=T(V._paragraph).replace("hr",V.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("table",V.gfm.table).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",V._tag).getRegex(),V.pedantic=a({},V.normal,{html:T(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",V._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:t,paragraph:T(V.normal._paragraph).replace("hr",V.hr).replace("heading",` *#{1,6} *[^
]`).replace("lheading",V.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var W={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:t,tag:"^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(ref)\]/,nolink:/^!?\[(ref)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",emStrong:{lDelim:/^(?:\*+(?:([punct_])|[^\s*]))|^_+(?:([punct*])|([^\s_]))/,rDelimAst:/^[^_*]*?\_\_[^_*]*?\*[^_*]*?(?=\_\_)|[punct_](\*+)(?=[\s]|$)|[^punct*_\s](\*+)(?=[punct_\s]|$)|[punct_\s](\*+)(?=[^punct*_\s])|[\s](\*+)(?=[punct_])|[punct_](\*+)(?=[punct_])|[^punct*_\s](\*+)(?=[^punct*_\s])/,rDelimUnd:/^[^_*]*?\*\*[^_*]*?\_[^_*]*?(?=\*\*)|[punct*](\_+)(?=[\s]|$)|[^punct*_\s](\_+)(?=[punct*\s]|$)|[punct*\s](\_+)(?=[^punct*_\s])|[\s](\_+)(?=[punct*])|[punct*](\_+)(?=[punct*])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:t,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,punctuation:/^([\spunctuation])/};W._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",W.punctuation=T(W.punctuation).replace(/punctuation/g,W._punctuation).getRegex(),W.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g,W.escapedEmSt=/\\\*|\\_/g,W._comment=T(V._comment).replace("(?:-->|$)","-->").getRegex(),W.emStrong.lDelim=T(W.emStrong.lDelim).replace(/punct/g,W._punctuation).getRegex(),W.emStrong.rDelimAst=T(W.emStrong.rDelimAst,"g").replace(/punct/g,W._punctuation).getRegex(),W.emStrong.rDelimUnd=T(W.emStrong.rDelimUnd,"g").replace(/punct/g,W._punctuation).getRegex(),W._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,W._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,W._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,W.autolink=T(W.autolink).replace("scheme",W._scheme).replace("email",W._email).getRegex(),W._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,W.tag=T(W.tag).replace("comment",W._comment).replace("attribute",W._attribute).getRegex(),W._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,W._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,W._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,W.link=T(W.link).replace("label",W._label).replace("href",W._href).replace("title",W._title).getRegex(),W.reflink=T(W.reflink).replace("label",W._label).replace("ref",V._label).getRegex(),W.nolink=T(W.nolink).replace("ref",V._label).getRegex(),W.reflinkSearch=T(W.reflinkSearch,"g").replace("reflink",W.reflink).replace("nolink",W.nolink).getRegex(),W.normal=a({},W),W.pedantic=a({},W.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:T(/^!?\[(label)\]\((.*?)\)/).replace("label",W._label).getRegex(),reflink:T(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",W._label).getRegex()}),W.gfm=a({},W.normal,{escape:T(W.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/}),W.gfm.url=T(W.gfm.url,"i").replace("email",W.gfm._extended_email).getRegex(),W.breaks=a({},W.gfm,{br:T(W.br).replace("{2,}","*").getRegex(),text:T(W.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});function Q(ge){return ge.replace(/---/g,"\u2014").replace(/--/g,"\u2013").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1\u2018").replace(/'/g,"\u2019").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1\u201C").replace(/"/g,"\u201D").replace(/\.{3}/g,"\u2026")}function K(ge){var ue="",N,F,C=ge.length;for(N=0;N<C;N++)F=ge.charCodeAt(N),Math.random()>.5&&(F="x"+F.toString(16)),ue+="&#"+F+";";return ue}var H=function(){function ge(N){this.tokens=[],this.tokens.links=Object.create(null),this.options=N||J.defaults,this.options.tokenizer=this.options.tokenizer||new z,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};var F={block:V.normal,inline:W.normal};this.options.pedantic?(F.block=V.pedantic,F.inline=W.pedantic):this.options.gfm&&(F.block=V.gfm,this.options.breaks?F.inline=W.breaks:F.inline=W.gfm),this.tokenizer.rules=F}ge.lex=function(F,C){var O=new ge(C);return O.lex(F)},ge.lexInline=function(F,C){var O=new ge(C);return O.inlineTokens(F)};var ue=ge.prototype;return ue.lex=function(F){F=F.replace(/\r\n|\r/g,`
`).replace(/\t/g," "),this.blockTokens(F,this.tokens);for(var C;C=this.inlineQueue.shift();)this.inlineTokens(C.src,C.tokens);return this.tokens},ue.blockTokens=function(F,C){var O=this;C===void 0&&(C=[]),this.options.pedantic&&(F=F.replace(/^ +$/gm,""));for(var x,X,re,ve;F;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(function(Me){return(x=Me.call({lexer:O},F,C))?(F=F.substring(x.raw.length),C.push(x),!0):!1}))){if(x=this.tokenizer.space(F)){F=F.substring(x.raw.length),x.raw.length===1&&C.length>0?C[C.length-1].raw+=`
`:C.push(x);continue}if(x=this.tokenizer.code(F)){F=F.substring(x.raw.length),X=C[C.length-1],X&&(X.type==="paragraph"||X.type==="text")?(X.raw+=`
`+x.raw,X.text+=`
`+x.text,this.inlineQueue[this.inlineQueue.length-1].src=X.text):C.push(x);continue}if(x=this.tokenizer.fences(F)){F=F.substring(x.raw.length),C.push(x);continue}if(x=this.tokenizer.heading(F)){F=F.substring(x.raw.length),C.push(x);continue}if(x=this.tokenizer.hr(F)){F=F.substring(x.raw.length),C.push(x);continue}if(x=this.tokenizer.blockquote(F)){F=F.substring(x.raw.length),C.push(x);continue}if(x=this.tokenizer.list(F)){F=F.substring(x.raw.length),C.push(x);continue}if(x=this.tokenizer.html(F)){F=F.substring(x.raw.length),C.push(x);continue}if(x=this.tokenizer.def(F)){F=F.substring(x.raw.length),X=C[C.length-1],X&&(X.type==="paragraph"||X.type==="text")?(X.raw+=`
`+x.raw,X.text+=`
`+x.raw,this.inlineQueue[this.inlineQueue.length-1].src=X.text):this.tokens.links[x.tag]||(this.tokens.links[x.tag]={href:x.href,title:x.title});continue}if(x=this.tokenizer.table(F)){F=F.substring(x.raw.length),C.push(x);continue}if(x=this.tokenizer.lheading(F)){F=F.substring(x.raw.length),C.push(x);continue}if(re=F,this.options.extensions&&this.options.extensions.startBlock&&function(){var Me=1/0,Le=F.slice(1),ze=void 0;O.options.extensions.startBlock.forEach(function(xe){ze=xe.call({lexer:this},Le),typeof ze=="number"&&ze>=0&&(Me=Math.min(Me,ze))}),Me<1/0&&Me>=0&&(re=F.substring(0,Me+1))}(),this.state.top&&(x=this.tokenizer.paragraph(re))){X=C[C.length-1],ve&&X.type==="paragraph"?(X.raw+=`
`+x.raw,X.text+=`
`+x.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=X.text):C.push(x),ve=re.length!==F.length,F=F.substring(x.raw.length);continue}if(x=this.tokenizer.text(F)){F=F.substring(x.raw.length),X=C[C.length-1],X&&X.type==="text"?(X.raw+=`
`+x.raw,X.text+=`
`+x.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=X.text):C.push(x);continue}if(F){var Ie="Infinite loop on byte: "+F.charCodeAt(0);if(this.options.silent){console.error(Ie);break}else throw new Error(Ie)}}return this.state.top=!0,C},ue.inline=function(F,C){this.inlineQueue.push({src:F,tokens:C})},ue.inlineTokens=function(F,C){var O=this;C===void 0&&(C=[]);var x,X,re,ve=F,Ie,Me,Le;if(this.tokens.links){var ze=Object.keys(this.tokens.links);if(ze.length>0)for(;(Ie=this.tokenizer.rules.inline.reflinkSearch.exec(ve))!=null;)ze.includes(Ie[0].slice(Ie[0].lastIndexOf("[")+1,-1))&&(ve=ve.slice(0,Ie.index)+"["+R("a",Ie[0].length-2)+"]"+ve.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(Ie=this.tokenizer.rules.inline.blockSkip.exec(ve))!=null;)ve=ve.slice(0,Ie.index)+"["+R("a",Ie[0].length-2)+"]"+ve.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(Ie=this.tokenizer.rules.inline.escapedEmSt.exec(ve))!=null;)ve=ve.slice(0,Ie.index)+"++"+ve.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex);for(;F;)if(Me||(Le=""),Me=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(function(Re){return(x=Re.call({lexer:O},F,C))?(F=F.substring(x.raw.length),C.push(x),!0):!1}))){if(x=this.tokenizer.escape(F)){F=F.substring(x.raw.length),C.push(x);continue}if(x=this.tokenizer.tag(F)){F=F.substring(x.raw.length),X=C[C.length-1],X&&x.type==="text"&&X.type==="text"?(X.raw+=x.raw,X.text+=x.text):C.push(x);continue}if(x=this.tokenizer.link(F)){F=F.substring(x.raw.length),C.push(x);continue}if(x=this.tokenizer.reflink(F,this.tokens.links)){F=F.substring(x.raw.length),X=C[C.length-1],X&&x.type==="text"&&X.type==="text"?(X.raw+=x.raw,X.text+=x.text):C.push(x);continue}if(x=this.tokenizer.emStrong(F,ve,Le)){F=F.substring(x.raw.length),C.push(x);continue}if(x=this.tokenizer.codespan(F)){F=F.substring(x.raw.length),C.push(x);continue}if(x=this.tokenizer.br(F)){F=F.substring(x.raw.length),C.push(x);continue}if(x=this.tokenizer.del(F)){F=F.substring(x.raw.length),C.push(x);continue}if(x=this.tokenizer.autolink(F,K)){F=F.substring(x.raw.length),C.push(x);continue}if(!this.state.inLink&&(x=this.tokenizer.url(F,K))){F=F.substring(x.raw.length),C.push(x);continue}if(re=F,this.options.extensions&&this.options.extensions.startInline&&function(){var Re=1/0,Qe=F.slice(1),tt=void 0;O.options.extensions.startInline.forEach(function(Te){tt=Te.call({lexer:this},Qe),typeof tt=="number"&&tt>=0&&(Re=Math.min(Re,tt))}),Re<1/0&&Re>=0&&(re=F.substring(0,Re+1))}(),x=this.tokenizer.inlineText(re,Q)){F=F.substring(x.raw.length),x.raw.slice(-1)!=="_"&&(Le=x.raw.slice(-1)),Me=!0,X=C[C.length-1],X&&X.type==="text"?(X.raw+=x.raw,X.text+=x.text):C.push(x);continue}if(F){var xe="Infinite loop on byte: "+F.charCodeAt(0);if(this.options.silent){console.error(xe);break}else throw new Error(xe)}}return C},o(ge,null,[{key:"rules",get:function(){return{block:V,inline:W}}}]),ge}(),te=function(){function ge(N){this.options=N||J.defaults}var ue=ge.prototype;return ue.code=function(F,C,O){var x=(C||"").match(/\S*/)[0];if(this.options.highlight){var X=this.options.highlight(F,x);X!=null&&X!==F&&(O=!0,F=X)}return F=F.replace(/\n$/,"")+`
`,x?'<pre><code class="'+this.options.langPrefix+s(x,!0)+'">'+(O?F:s(F,!0))+`</code></pre>
`:"<pre><code>"+(O?F:s(F,!0))+`</code></pre>
`},ue.blockquote=function(F){return`<blockquote>
`+F+`</blockquote>
`},ue.html=function(F){return F},ue.heading=function(F,C,O,x){return this.options.headerIds?"<h"+C+' id="'+this.options.headerPrefix+x.slug(O)+'">'+F+"</h"+C+`>
`:"<h"+C+">"+F+"</h"+C+`>
`},ue.hr=function(){return this.options.xhtml?`<hr/>
`:`<hr>
`},ue.list=function(F,C,O){var x=C?"ol":"ul",X=C&&O!==1?' start="'+O+'"':"";return"<"+x+X+`>
`+F+"</"+x+`>
`},ue.listitem=function(F){return"<li>"+F+`</li>
`},ue.checkbox=function(F){return"<input "+(F?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},ue.paragraph=function(F){return"<p>"+F+`</p>
`},ue.table=function(F,C){return C&&(C="<tbody>"+C+"</tbody>"),`<table>
<thead>
`+F+`</thead>
`+C+`</table>
`},ue.tablerow=function(F){return`<tr>
`+F+`</tr>
`},ue.tablecell=function(F,C){var O=C.header?"th":"td",x=C.align?"<"+O+' align="'+C.align+'">':"<"+O+">";return x+F+"</"+O+`>
`},ue.strong=function(F){return"<strong>"+F+"</strong>"},ue.em=function(F){return"<em>"+F+"</em>"},ue.codespan=function(F){return"<code>"+F+"</code>"},ue.br=function(){return this.options.xhtml?"<br/>":"<br>"},ue.del=function(F){return"<del>"+F+"</del>"},ue.link=function(F,C,O){if(F=b(this.options.sanitize,this.options.baseUrl,F),F===null)return O;var x='<a href="'+s(F)+'"';return C&&(x+=' title="'+C+'"'),x+=">"+O+"</a>",x},ue.image=function(F,C,O){if(F=b(this.options.sanitize,this.options.baseUrl,F),F===null)return O;var x='<img src="'+F+'" alt="'+O+'"';return C&&(x+=' title="'+C+'"'),x+=this.options.xhtml?"/>":">",x},ue.text=function(F){return F},ge}(),ae=function(){function ge(){}var ue=ge.prototype;return ue.strong=function(F){return F},ue.em=function(F){return F},ue.codespan=function(F){return F},ue.del=function(F){return F},ue.html=function(F){return F},ue.text=function(F){return F},ue.link=function(F,C,O){return""+O},ue.image=function(F,C,O){return""+O},ue.br=function(){return""},ge}(),ee=function(){function ge(){this.seen={}}var ue=ge.prototype;return ue.serialize=function(F){return F.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")},ue.getNextSafeSlug=function(F,C){var O=F,x=0;if(this.seen.hasOwnProperty(O)){x=this.seen[F];do x++,O=F+"-"+x;while(this.seen.hasOwnProperty(O))}return C||(this.seen[F]=x,this.seen[O]=0),O},ue.slug=function(F,C){C===void 0&&(C={});var O=this.serialize(F);return this.getNextSafeSlug(O,C.dryrun)},ge}(),ce=function(){function ge(N){this.options=N||J.defaults,this.options.renderer=this.options.renderer||new te,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new ae,this.slugger=new ee}ge.parse=function(F,C){var O=new ge(C);return O.parse(F)},ge.parseInline=function(F,C){var O=new ge(C);return O.parseInline(F)};var ue=ge.prototype;return ue.parse=function(F,C){C===void 0&&(C=!0);var O="",x,X,re,ve,Ie,Me,Le,ze,xe,Re,Qe,tt,Te,it,G,Y,le,Oe,We,Ge=F.length;for(x=0;x<Ge;x++){if(Re=F[x],this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[Re.type]&&(We=this.options.extensions.renderers[Re.type].call({parser:this},Re),We!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(Re.type))){O+=We||"";continue}switch(Re.type){case"space":continue;case"hr":{O+=this.renderer.hr();continue}case"heading":{O+=this.renderer.heading(this.parseInline(Re.tokens),Re.depth,f(this.parseInline(Re.tokens,this.textRenderer)),this.slugger);continue}case"code":{O+=this.renderer.code(Re.text,Re.lang,Re.escaped);continue}case"table":{for(ze="",Le="",ve=Re.header.length,X=0;X<ve;X++)Le+=this.renderer.tablecell(this.parseInline(Re.header[X].tokens),{header:!0,align:Re.align[X]});for(ze+=this.renderer.tablerow(Le),xe="",ve=Re.rows.length,X=0;X<ve;X++){for(Me=Re.rows[X],Le="",Ie=Me.length,re=0;re<Ie;re++)Le+=this.renderer.tablecell(this.parseInline(Me[re].tokens),{header:!1,align:Re.align[re]});xe+=this.renderer.tablerow(Le)}O+=this.renderer.table(ze,xe);continue}case"blockquote":{xe=this.parse(Re.tokens),O+=this.renderer.blockquote(xe);continue}case"list":{for(Qe=Re.ordered,tt=Re.start,Te=Re.loose,ve=Re.items.length,xe="",X=0;X<ve;X++)G=Re.items[X],Y=G.checked,le=G.task,it="",G.task&&(Oe=this.renderer.checkbox(Y),Te?G.tokens.length>0&&G.tokens[0].type==="paragraph"?(G.tokens[0].text=Oe+" "+G.tokens[0].text,G.tokens[0].tokens&&G.tokens[0].tokens.length>0&&G.tokens[0].tokens[0].type==="text"&&(G.tokens[0].tokens[0].text=Oe+" "+G.tokens[0].tokens[0].text)):G.tokens.unshift({type:"text",text:Oe}):it+=Oe),it+=this.parse(G.tokens,Te),xe+=this.renderer.listitem(it,le,Y);O+=this.renderer.list(xe,Qe,tt);continue}case"html":{O+=this.renderer.html(Re.text);continue}case"paragraph":{O+=this.renderer.paragraph(this.parseInline(Re.tokens));continue}case"text":{for(xe=Re.tokens?this.parseInline(Re.tokens):Re.text;x+1<Ge&&F[x+1].type==="text";)Re=F[++x],xe+=`
`+(Re.tokens?this.parseInline(Re.tokens):Re.text);O+=C?this.renderer.paragraph(xe):xe;continue}default:{var Je='Token with "'+Re.type+'" type was not found.';if(this.options.silent){console.error(Je);return}else throw new Error(Je)}}}return O},ue.parseInline=function(F,C){C=C||this.renderer;var O="",x,X,re,ve=F.length;for(x=0;x<ve;x++){if(X=F[x],this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[X.type]&&(re=this.options.extensions.renderers[X.type].call({parser:this},X),re!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(X.type))){O+=re||"";continue}switch(X.type){case"escape":{O+=C.text(X.text);break}case"html":{O+=C.html(X.text);break}case"link":{O+=C.link(X.href,X.title,this.parseInline(X.tokens,C));break}case"image":{O+=C.image(X.href,X.title,X.text);break}case"strong":{O+=C.strong(this.parseInline(X.tokens,C));break}case"em":{O+=C.em(this.parseInline(X.tokens,C));break}case"codespan":{O+=C.codespan(X.text);break}case"br":{O+=C.br();break}case"del":{O+=C.del(this.parseInline(X.tokens,C));break}case"text":{O+=C.text(X.text);break}default:{var Ie='Token with "'+X.type+'" type was not found.';if(this.options.silent){console.error(Ie);return}else throw new Error(Ie)}}}return O},ge}();function de(ge,ue,N){if(typeof ge=="undefined"||ge===null)throw new Error("marked(): input parameter is undefined or null");if(typeof ge!="string")throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(ge)+", string expected");if(typeof ue=="function"&&(N=ue,ue=null),ue=a({},de.defaults,ue||{}),P(ue),N){var F=ue.highlight,C;try{C=H.lex(ge,ue)}catch(re){return N(re)}var O=function(ve){var Ie;if(!ve)try{ue.walkTokens&&de.walkTokens(C,ue.walkTokens),Ie=ce.parse(C,ue)}catch(Me){ve=Me}return ue.highlight=F,ve?N(ve):N(null,Ie)};if(!F||F.length<3||(delete ue.highlight,!C.length))return O();var x=0;de.walkTokens(C,function(re){re.type==="code"&&(x++,setTimeout(function(){F(re.text,re.lang,function(ve,Ie){if(ve)return O(ve);Ie!=null&&Ie!==re.text&&(re.text=Ie,re.escaped=!0),x--,x===0&&O()})},0))}),x===0&&O();return}try{var X=H.lex(ge,ue);return ue.walkTokens&&de.walkTokens(X,ue.walkTokens),ce.parse(X,ue)}catch(re){if(re.message+=`
Please report this to https://github.com/markedjs/marked.`,ue.silent)return"<p>An error occurred:</p><pre>"+s(re.message+"",!0)+"</pre>";throw re}}de.options=de.setOptions=function(ge){return a(de.defaults,ge),A(de.defaults),de},de.getDefaults=S,de.defaults=J.defaults,de.use=function(){for(var ge=arguments.length,ue=new Array(ge),N=0;N<ge;N++)ue[N]=arguments[N];var F=a.apply(void 0,[{}].concat(ue)),C=de.defaults.extensions||{renderers:{},childTokens:{}},O;ue.forEach(function(x){if(x.extensions&&(O=!0,x.extensions.forEach(function(re){if(!re.name)throw new Error("extension name required");if(re.renderer){var ve=C.renderers?C.renderers[re.name]:null;ve?C.renderers[re.name]=function(){for(var Ie=arguments.length,Me=new Array(Ie),Le=0;Le<Ie;Le++)Me[Le]=arguments[Le];var ze=re.renderer.apply(this,Me);return ze===!1&&(ze=ve.apply(this,Me)),ze}:C.renderers[re.name]=re.renderer}if(re.tokenizer){if(!re.level||re.level!=="block"&&re.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");C[re.level]?C[re.level].unshift(re.tokenizer):C[re.level]=[re.tokenizer],re.start&&(re.level==="block"?C.startBlock?C.startBlock.push(re.start):C.startBlock=[re.start]:re.level==="inline"&&(C.startInline?C.startInline.push(re.start):C.startInline=[re.start]))}re.childTokens&&(C.childTokens[re.name]=re.childTokens)})),x.renderer&&function(){var re=de.defaults.renderer||new te,ve=function(Le){var ze=re[Le];re[Le]=function(){for(var xe=arguments.length,Re=new Array(xe),Qe=0;Qe<xe;Qe++)Re[Qe]=arguments[Qe];var tt=x.renderer[Le].apply(re,Re);return tt===!1&&(tt=ze.apply(re,Re)),tt}};for(var Ie in x.renderer)ve(Ie);F.renderer=re}(),x.tokenizer&&function(){var re=de.defaults.tokenizer||new z,ve=function(Le){var ze=re[Le];re[Le]=function(){for(var xe=arguments.length,Re=new Array(xe),Qe=0;Qe<xe;Qe++)Re[Qe]=arguments[Qe];var tt=x.tokenizer[Le].apply(re,Re);return tt===!1&&(tt=ze.apply(re,Re)),tt}};for(var Ie in x.tokenizer)ve(Ie);F.tokenizer=re}(),x.walkTokens){var X=de.defaults.walkTokens;F.walkTokens=function(re){x.walkTokens.call(this,re),X&&X.call(this,re)}}O&&(F.extensions=C),de.setOptions(F)})},de.walkTokens=function(ge,ue){for(var N=function(){var x=C.value;switch(ue.call(de,x),x.type){case"table":{for(var X=B(x.header),re;!(re=X()).done;){var ve=re.value;de.walkTokens(ve.tokens,ue)}for(var Ie=B(x.rows),Me;!(Me=Ie()).done;)for(var Le=Me.value,ze=B(Le),xe;!(xe=ze()).done;){var Re=xe.value;de.walkTokens(Re.tokens,ue)}break}case"list":{de.walkTokens(x.items,ue);break}default:de.defaults.extensions&&de.defaults.extensions.childTokens&&de.defaults.extensions.childTokens[x.type]?de.defaults.extensions.childTokens[x.type].forEach(function(Qe){de.walkTokens(x[Qe],ue)}):x.tokens&&de.walkTokens(x.tokens,ue)}},F=B(ge),C;!(C=F()).done;)N()},de.parseInline=function(ge,ue){if(typeof ge=="undefined"||ge===null)throw new Error("marked.parseInline(): input parameter is undefined or null");if(typeof ge!="string")throw new Error("marked.parseInline(): input parameter is of type "+Object.prototype.toString.call(ge)+", string expected");ue=a({},de.defaults,ue||{}),P(ue);try{var N=H.lexInline(ge,ue);return ue.walkTokens&&de.walkTokens(N,ue.walkTokens),ce.parseInline(N,ue)}catch(F){if(F.message+=`
Please report this to https://github.com/markedjs/marked.`,ue.silent)return"<p>An error occurred:</p><pre>"+s(F.message+"",!0)+"</pre>";throw F}},de.Parser=ce,de.parser=ce.parse,de.Renderer=te,de.TextRenderer=ae,de.Lexer=H,de.lexer=H.lex,de.Tokenizer=z,de.Slugger=ee,de.parse=de;var Se=de.options,fe=de.setOptions,ne=de.use,me=de.walkTokens,ke=de.parseInline,Ae=de,Be=ce.parse,Xe=H.lex;J.Lexer=H,J.Parser=ce,J.Renderer=te,J.Slugger=ee,J.TextRenderer=ae,J.Tokenizer=z,J.getDefaults=S,J.lexer=Xe,J.marked=de,J.options=Se,J.parse=Ae,J.parseInline=ke,J.parser=Be,J.setOptions=fe,J.use=ne,J.walkTokens=me,Object.defineProperty(J,"__esModule",{value:!0})}),define(Ee[102],we([1,0]),function(J,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SlidingWindowAverage=e.MovingAverage=e.Counter=e.rot=e.clamp=void 0;function o(A,y,M){return Math.min(Math.max(A,y),M)}e.clamp=o;function k(A,y){return(y+A%y)%y}e.rot=k;class w{constructor(){this._next=0}getNext(){return this._next++}}e.Counter=w;class B{constructor(){this._n=1,this._val=0}update(y){return this._val=this._val+(y-this._val)/this._n,this._n+=1,this._val}get value(){return this._val}}e.MovingAverage=B;class S{constructor(y){this._n=0,this._val=0,this._values=[],this._index=0,this._sum=0,this._values=new Array(y),this._values.fill(0,0,y)}update(y){const M=this._values[this._index];return this._values[this._index]=y,this._index=(this._index+1)%this._values.length,this._sum-=M,this._sum+=y,this._n<this._values.length&&(this._n+=1),this._val=this._sum/this._n,this._val}get value(){return this._val}}e.SlidingWindowAverage=S}),function(){function J(w){const B=[];typeof w=="number"&&B.push("code/timeOrigin",w);function S(y){B.push(y,Date.now())}function A(){const y=[];for(let M=0;M<B.length;M+=2)y.push({name:B[M],startTime:B[M+1]});return y}return{mark:S,getMarks:A}}function e(){if(typeof performance=="object"&&typeof performance.mark=="function"&&!performance.nodeTiming)return typeof performance.timeOrigin!="number"&&!performance.timing?J():{mark(w){performance.mark(w)},getMarks(){let w=performance.timeOrigin;typeof w!="number"&&(w=performance.timing.navigationStart||performance.timing.redirectStart||performance.timing.fetchStart);const B=[{name:"code/timeOrigin",startTime:Math.round(w)}];for(const S of performance.getEntriesByType("mark"))B.push({name:S.name,startTime:Math.round(w+S.startTime)});return B}};if(typeof process=="object"){const w=Math.round((require.nodeRequire||require)("perf_hooks").performance.timeOrigin);return J(w)}else return console.trace("perf-util loaded in UNKNOWN environment"),J()}function o(w){return w.MonacoPerformanceMarks||(w.MonacoPerformanceMarks=e()),w.MonacoPerformanceMarks}var k;typeof global=="object"?k=global:typeof self=="object"?k=self:k={},typeof define=="function"?define("vs/base/common/performance",[],function(){return o(k)}):typeof module=="object"&&typeof module.exports=="object"?module.exports=o(k):(console.trace("perf-util defined in UNKNOWN context (neither requirejs or commonjs)"),k.perf=o(k))}(),define(Ee[71],we([1,0,17]),function(J,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.normalizeMimeType=e.getExtensionForMimeType=e.getMediaMime=e.getMediaOrTextMime=e.Mimes=void 0;var k;(function(v){v.text="text/plain",v.binary="application/octet-stream",v.unknown="application/unknown",v.markdown="text/markdown",v.latex="text/latex",v.uriList="text/uri-list"})(k=e.Mimes||(e.Mimes={}));const w={".css":"text/css",".csv":"text/csv",".htm":"text/html",".html":"text/html",".ics":"text/calendar",".js":"text/javascript",".mjs":"text/javascript",".txt":"text/plain",".xml":"text/xml"},B={".aac":"audio/x-aac",".avi":"video/x-msvideo",".bmp":"image/bmp",".flv":"video/x-flv",".gif":"image/gif",".ico":"image/x-icon",".jpe":"image/jpg",".jpeg":"image/jpg",".jpg":"image/jpg",".m1v":"video/mpeg",".m2a":"audio/mpeg",".m2v":"video/mpeg",".m3a":"audio/mpeg",".mid":"audio/midi",".midi":"audio/midi",".mk3d":"video/x-matroska",".mks":"video/x-matroska",".mkv":"video/x-matroska",".mov":"video/quicktime",".movie":"video/x-sgi-movie",".mp2":"audio/mpeg",".mp2a":"audio/mpeg",".mp3":"audio/mpeg",".mp4":"video/mp4",".mp4a":"audio/mp4",".mp4v":"video/mp4",".mpe":"video/mpeg",".mpeg":"video/mpeg",".mpg":"video/mpeg",".mpg4":"video/mp4",".mpga":"audio/mpeg",".oga":"audio/ogg",".ogg":"audio/ogg",".opus":"audio/opus",".ogv":"video/ogg",".png":"image/png",".psd":"image/vnd.adobe.photoshop",".qt":"video/quicktime",".spx":"audio/ogg",".svg":"image/svg+xml",".tga":"image/x-tga",".tif":"image/tiff",".tiff":"image/tiff",".wav":"audio/x-wav",".webm":"video/webm",".webp":"image/webp",".wma":"audio/x-ms-wma",".wmv":"video/x-ms-wmv",".woff":"application/font-woff"};function S(v){const u=(0,o.extname)(v),m=w[u.toLowerCase()];return m!==void 0?m:A(v)}e.getMediaOrTextMime=S;function A(v){const u=(0,o.extname)(v);return B[u.toLowerCase()]}e.getMediaMime=A;function y(v){for(const u in B)if(B[u]===v)return u}e.getExtensionForMimeType=y;const M=/^(.+)\/(.+?)(;.+)?$/;function L(v,u){const m=M.exec(v);return m?`${m[1].toLowerCase()}/${m[2].toLowerCase()}${m[3]??""}`:u?void 0:v}e.normalizeMimeType=L}),define(Ee[103],we([1,0,15,6]),function(J,e,o,k){"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=void 0;function w(d){const g=d;return g?[g.on,g.pause,g.resume,g.destroy].every(b=>typeof b=="function"):!1}e.isReadableStream=w;function B(d){const g=d;return g?w(g.stream)&&Array.isArray(g.buffer)&&typeof g.ended=="boolean":!1}e.isReadableBufferedStream=B;function S(d,g){return new A(d,g)}e.newWriteableStream=S;class A{constructor(g,b){this.reducer=g,this.options=b,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(g){if(!this.state.destroyed){if(this.state.flowing)this.emitData(g);else if(this.buffer.data.push(g),typeof this.options?.highWaterMark=="number"&&this.buffer.data.length>this.options.highWaterMark)return new Promise(b=>this.pendingWritePromises.push(b))}}error(g){this.state.destroyed||(this.state.flowing?this.emitError(g):this.buffer.error.push(g))}end(g){this.state.destroyed||(typeof g!="undefined"&&this.write(g),this.state.flowing?(this.emitEnd(),this.destroy()):this.state.ended=!0)}emitData(g){this.listeners.data.slice(0).forEach(b=>b(g))}emitError(g){this.listeners.error.length===0?(0,o.onUnexpectedError)(g):this.listeners.error.slice(0).forEach(b=>b(g))}emitEnd(){this.listeners.end.slice(0).forEach(g=>g())}on(g,b){if(!this.state.destroyed)switch(g){case"data":this.listeners.data.push(b),this.resume();break;case"end":this.listeners.end.push(b),this.state.flowing&&this.flowEnd()&&this.destroy();break;case"error":this.listeners.error.push(b),this.state.flowing&&this.flowErrors();break}}removeListener(g,b){if(this.state.destroyed)return;let l;switch(g){case"data":l=this.listeners.data;break;case"end":l=this.listeners.end;break;case"error":l=this.listeners.error;break}if(l){const I=l.indexOf(b);I>=0&&l.splice(I,1)}}flowData(){if(this.buffer.data.length>0){const g=this.reducer(this.buffer.data);this.emitData(g),this.buffer.data.length=0;const b=[...this.pendingWritePromises];this.pendingWritePromises.length=0,b.forEach(l=>l())}}flowErrors(){if(this.listeners.error.length>0){for(const g of this.buffer.error)this.emitError(g);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 y(d,g){const b=[];let l;for(;(l=d.read())!==null;)b.push(l);return g(b)}e.consumeReadable=y;function M(d,g,b){const l=[];let I;for(;(I=d.read())!==null&&l.length<b;)l.push(I);return I===null&&l.length>0?g(l):{read:()=>{if(l.length>0)return l.shift();if(typeof I!="undefined"){const r=I;return I=void 0,r}return d.read()}}}e.peekReadable=M;function L(d,g){return new Promise((b,l)=>{const I=[];v(d,{onData:r=>{g&&I.push(r)},onError:r=>{g?l(r):b(void 0)},onEnd:()=>{b(g?g(I):void 0)}})})}e.consumeStream=L;function v(d,g){let b=!1;return d.on("error",l=>{b||g.onError(l)}),d.on("end",()=>{b||g.onEnd()}),d.on("data",l=>{b||g.onData(l)}),(0,k.toDisposable)(()=>b=!0)}e.listenStream=v;function u(d,g){return new Promise((b,l)=>{const I=new k.DisposableStore,r=[],i=a=>{if(r.push(a),r.length>g)return I.dispose(),d.pause(),b({stream:d,buffer:r,ended:!1})},c=a=>l(a),t=()=>b({stream:d,buffer:r,ended:!0});I.add((0,k.toDisposable)(()=>d.removeListener("error",c))),d.on("error",c),I.add((0,k.toDisposable)(()=>d.removeListener("end",t))),d.on("end",t),I.add((0,k.toDisposable)(()=>d.removeListener("data",i))),d.on("data",i)})}e.peekStream=u;function m(d,g){const b=S(g);return b.end(d),b}e.toStream=m;function s(){const d=S(()=>{throw new Error("not supported")});return d.end(),d}e.emptyStream=s;function n(d){let g=!1;return{read:()=>g?null:(g=!0,d)}}e.toReadable=n;function f(d,g,b){const l=S(b);return v(d,{onData:I=>l.write(g.data(I)),onError:I=>l.error(g.error?g.error(I):I),onEnd:()=>l.end()}),l}e.transform=f;function D(d,g,b){let l=!1;return{read:()=>{const I=g.read();return l?I:(l=!0,I!==null?b([d,I]):d)}}}e.prefixedReadable=D;function T(d,g,b){let l=!1;const I=S(b);return v(g,{onData:r=>l?I.write(r):(l=!0,I.write(b([d,r]))),onError:r=>I.error(r),onEnd:()=>{l||(l=!0,I.write(d)),I.end()}}),I}e.prefixedStream=T}),define(Ee[21],we([1,0,103]),function(J,e,o){"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.VSBuffer=void 0;const k=typeof Buffer!="undefined";let w,B;class S{constructor(p){this.buffer=p,this.byteLength=this.buffer.byteLength}static alloc(p){return k?new S(Buffer.allocUnsafe(p)):new S(new Uint8Array(p))}static wrap(p){return k&&!Buffer.isBuffer(p)&&(p=Buffer.from(p.buffer,p.byteOffset,p.byteLength)),new S(p)}static fromString(p,h){return!(h?.dontUseNodeBuffer||!1)&&k?new S(Buffer.from(p)):(w||(w=new TextEncoder),new S(w.encode(p)))}static fromByteArray(p){const h=S.alloc(p.length);for(let _=0,P=p.length;_<P;_++)h.buffer[_]=p[_];return h}static concat(p,h){if(typeof h=="undefined"){h=0;for(let R=0,$=p.length;R<$;R++)h+=p[R].byteLength}const _=S.alloc(h);let P=0;for(let R=0,$=p.length;R<$;R++){const E=p[R];_.set(E,P),P+=E.byteLength}return _}clone(){const p=S.alloc(this.byteLength);return p.set(this),p}toString(){return k?this.buffer.toString():(B||(B=new TextDecoder),B.decode(this.buffer))}slice(p,h){return new S(this.buffer.subarray(p,h))}set(p,h){if(p instanceof S)this.buffer.set(p.buffer,h);else if(p instanceof Uint8Array)this.buffer.set(p,h);else if(p instanceof ArrayBuffer)this.buffer.set(new Uint8Array(p),h);else if(ArrayBuffer.isView(p))this.buffer.set(new Uint8Array(p.buffer,p.byteOffset,p.byteLength),h);else throw new Error("Unknown argument 'array'")}readUInt32BE(p){return M(this.buffer,p)}writeUInt32BE(p,h){L(this.buffer,p,h)}readUInt32LE(p){return v(this.buffer,p)}writeUInt32LE(p,h){u(this.buffer,p,h)}readUInt8(p){return m(this.buffer,p)}writeUInt8(p,h){s(this.buffer,p,h)}}e.VSBuffer=S;function A(a,p){return a[p+0]<<0>>>0|a[p+1]<<8>>>0}e.readUInt16LE=A;function y(a,p,h){a[h+0]=p&255,p=p>>>8,a[h+1]=p&255}e.writeUInt16LE=y;function M(a,p){return a[p]*2**24+a[p+1]*2**16+a[p+2]*2**8+a[p+3]}e.readUInt32BE=M;function L(a,p,h){a[h+3]=p,p=p>>>8,a[h+2]=p,p=p>>>8,a[h+1]=p,p=p>>>8,a[h]=p}e.writeUInt32BE=L;function v(a,p){return a[p+0]<<0>>>0|a[p+1]<<8>>>0|a[p+2]<<16>>>0|a[p+3]<<24>>>0}e.readUInt32LE=v;function u(a,p,h){a[h+0]=p&255,p=p>>>8,a[h+1]=p&255,p=p>>>8,a[h+2]=p&255,p=p>>>8,a[h+3]=p&255}e.writeUInt32LE=u;function m(a,p){return a[p]}e.readUInt8=m;function s(a,p,h){a[h]=p}e.writeUInt8=s;function n(a){return o.consumeReadable(a,p=>S.concat(p))}e.readableToBuffer=n;function f(a){return o.toReadable(a)}e.bufferToReadable=f;function D(a){return o.consumeStream(a,p=>S.concat(p))}e.streamToBuffer=D;async function T(a){return a.ended?S.concat(a.buffer):S.concat([...a.buffer,await D(a.stream)])}e.bufferedStreamToBuffer=T;function d(a){return o.toStream(a,p=>S.concat(p))}e.bufferToStream=d;function g(a){return o.transform(a,{data:p=>typeof p=="string"?S.fromString(p):S.wrap(p)},p=>S.concat(p))}e.streamToBufferReadableStream=g;function b(a){return o.newWriteableStream(p=>S.concat(p),a)}e.newWriteableBufferStream=b;function l(a,p){return o.prefixedReadable(a,p,h=>S.concat(h))}e.prefixedBufferReadable=l;function I(a,p){return o.prefixedStream(a,p,h=>S.concat(h))}e.prefixedBufferStream=I;function r(a){let p=0,h=0,_=0;const P=new Uint8Array(Math.floor(a.length/4*3)),R=E=>{switch(h){case 3:P[_++]=p|E,h=0;break;case 2:P[_++]=p|E>>>2,p=E<<6,h=3;break;case 1:P[_++]=p|E>>>4,p=E<<4,h=2;break;default:p=E<<2,h=1}};for(let E=0;E<a.length;E++){const z=a.charCodeAt(E);if(z>=65&&z<=90)R(z-65);else if(z>=97&&z<=122)R(z-97+26);else if(z>=48&&z<=57)R(z-48+52);else if(z===43||z===45)R(62);else if(z===47||z===95)R(63);else{if(z===61)break;throw new SyntaxError(`Unexpected base64 character ${a[E]}`)}}const $=_;for(;h>0;)R(0);return S.wrap(P).slice(0,$)}e.decodeBase64=r;const i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_";function t({buffer:a},p=!0,h=!1){const _=h?c:i;let P="";const R=a.byteLength%3;let $=0;for(;$<a.byteLength-R;$+=3){const E=a[$+0],z=a[$+1],V=a[$+2];P+=_[E>>>2],P+=_[(E<<4|z>>>4)&63],P+=_[(z<<2|V>>>6)&63],P+=_[V&63]}if(R===1){const E=a[$+0];P+=_[E>>>2],P+=_[E<<4&63],p&&(P+="==")}else if(R===2){const E=a[$+0],z=a[$+1];P+=_[E>>>2],P+=_[(E<<4|z>>>4)&63],P+=_[z<<2&63],p&&(P+="=")}return P}e.encodeBase64=t});var je=this&&this.__classPrivateFieldSet||function(J,e,o,k,w){if(k==="m")throw new TypeError("Private method is not writable");if(k==="a"&&!w)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?J!==e||!w:!e.has(J))throw new TypeError("Cannot write private member to an object whose class did not declare it");return k==="a"?w.call(J,o):w?w.value=o:e.set(J,o),o},De=this&&this.__classPrivateFieldGet||function(J,e,o,k){if(o==="a"&&!k)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?J!==e||!k:!e.has(J))throw new TypeError("Cannot read private member from an object whose class did not declare it");return o==="m"?k:o==="a"?k.call(J):k?k.value:e.get(J)};define(Ee[22],we([1,0,16,10]),function(J,e,o,k){"use strict";var w,B,S;Object.defineProperty(e,"__esModule",{value:!0}),e.ReadonlyMapView=e.LRUCache=e.LinkedMap=e.Touch=e.ResourceMap=e.TernarySearchTree=e.UriIterator=e.PathIterator=e.ConfigKeysIterator=e.StringIterator=e.setToString=e.mapToString=e.getOrSet=void 0;function A(r,i,c){let t=r.get(i);return t===void 0&&(t=c,r.set(i,t)),t}e.getOrSet=A;function y(r){const i=[];return r.forEach((c,t)=>{i.push(`${t} => ${c}`)}),`Map(${r.size}) {${i.join(", ")}}`}e.mapToString=y;function M(r){const i=[];return r.forEach(c=>{i.push(c)}),`Set(${r.size}) {${i.join(", ")}}`}e.setToString=M;class L{constructor(){this._value="",this._pos=0}reset(i){return this._value=i,this._pos=0,this}next(){return this._pos+=1,this}hasNext(){return this._pos<this._value.length-1}cmp(i){const c=i.charCodeAt(0),t=this._value.charCodeAt(this._pos);return c-t}value(){return this._value[this._pos]}}e.StringIterator=L;class v{constructor(i=!0){this._caseSensitive=i}reset(i){return this._value=i,this._from=0,this._to=0,this.next()}hasNext(){return this._to<this._value.length}next(){this._from=this._to;let i=!0;for(;this._to<this._value.length;this._to++)if(this._value.charCodeAt(this._to)===46)if(i)this._from++;else break;else i=!1;return this}cmp(i){return this._caseSensitive?(0,k.compareSubstring)(i,this._value,0,i.length,this._from,this._to):(0,k.compareSubstringIgnoreCase)(i,this._value,0,i.length,this._from,this._to)}value(){return this._value.substring(this._from,this._to)}}e.ConfigKeysIterator=v;class u{constructor(i=!0,c=!0){this._splitOnBackslash=i,this._caseSensitive=c}reset(i){this._from=0,this._to=0,this._value=i,this._valueLen=i.length;for(let c=i.length-1;c>=0;c--,this._valueLen--){const t=this._value.charCodeAt(c);if(!(t===47||this._splitOnBackslash&&t===92))break}return this.next()}hasNext(){return this._to<this._valueLen}next(){this._from=this._to;let i=!0;for(;this._to<this._valueLen;this._to++){const c=this._value.charCodeAt(this._to);if(c===47||this._splitOnBackslash&&c===92)if(i)this._from++;else break;else i=!1}return this}cmp(i){return this._caseSensitive?(0,k.compareSubstring)(i,this._value,0,i.length,this._from,this._to):(0,k.compareSubstringIgnoreCase)(i,this._value,0,i.length,this._from,this._to)}value(){return this._value.substring(this._from,this._to)}}e.PathIterator=u;var m;(function(r){r[r.Scheme=1]="Scheme",r[r.Authority=2]="Authority",r[r.Path=3]="Path",r[r.Query=4]="Query",r[r.Fragment=5]="Fragment"})(m||(m={}));class s{constructor(i){this._ignorePathCasing=i,this._states=[],this._stateIdx=0}reset(i){return this._value=i,this._states=[],this._value.scheme&&this._states.push(1),this._value.authority&&this._states.push(2),this._value.path&&(this._pathIterator=new u(!1,!this._ignorePathCasing(i)),this._pathIterator.reset(i.path),this._pathIterator.value()&&this._states.push(3)),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(i){if(this._states[this._stateIdx]===1)return(0,k.compareIgnoreCase)(i,this._value.scheme);if(this._states[this._stateIdx]===2)return(0,k.compareIgnoreCase)(i,this._value.authority);if(this._states[this._stateIdx]===3)return this._pathIterator.cmp(i);if(this._states[this._stateIdx]===4)return(0,k.compare)(i,this._value.query);if(this._states[this._stateIdx]===5)return(0,k.compare)(i,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=s;class n{constructor(){this.height=1}isEmpty(){return!this.left&&!this.mid&&!this.right&&!this.value}rotateLeft(){const i=this.right;return this.right=i.left,i.left=this,this.updateHeight(),i.updateHeight(),i}rotateRight(){const i=this.left;return this.left=i.right,i.right=this,this.updateHeight(),i.updateHeight(),i}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 f;(function(r){r[r.Left=-1]="Left",r[r.Mid=0]="Mid",r[r.Right=1]="Right"})(f||(f={}));class D{constructor(i){this._iter=i}static forUris(i=()=>!1){return new D(new s(i))}static forPaths(i=!1){return new D(new u(void 0,!i))}static forStrings(){return new D(new L)}static forConfigKeys(){return new D(new v)}clear(){this._root=void 0}fill(i,c){if(c){const t=c.slice(0);(0,o.shuffle)(t);for(let a of t)this.set(a,i)}else{const t=i.slice(0);(0,o.shuffle)(t);for(let a of t)this.set(a[0],a[1])}}set(i,c){const t=this._iter.reset(i);let a;this._root||(this._root=new n,this._root.segment=t.value());const p=[];for(a=this._root;;){const _=t.cmp(a.segment);if(_>0)a.left||(a.left=new n,a.left.segment=t.value()),p.push([-1,a]),a=a.left;else if(_<0)a.right||(a.right=new n,a.right.segment=t.value()),p.push([1,a]),a=a.right;else if(t.hasNext())t.next(),a.mid||(a.mid=new n,a.mid.segment=t.value()),p.push([0,a]),a=a.mid;else break}const h=a.value;a.value=c,a.key=i;for(let _=p.length-1;_>=0;_--){const P=p[_][1];P.updateHeight();const R=P.balanceFactor();if(R<-1||R>1){const $=p[_][0],E=p[_+1][0];if($===1&&E===1)p[_][1]=P.rotateLeft();else if($===-1&&E===-1)p[_][1]=P.rotateRight();else if($===1&&E===-1)P.right=p[_+1][1]=p[_+1][1].rotateRight(),p[_][1]=P.rotateLeft();else if($===-1&&E===1)P.left=p[_+1][1]=p[_+1][1].rotateLeft(),p[_][1]=P.rotateRight();else throw new Error;if(_>0)switch(p[_-1][0]){case-1:p[_-1][1].left=p[_][1];break;case 1:p[_-1][1].right=p[_][1];break;case 0:p[_-1][1].mid=p[_][1];break}else this._root=p[0][1]}}return h}get(i){return this._getNode(i)?.value}_getNode(i){const c=this._iter.reset(i);let t=this._root;for(;t;){const a=c.cmp(t.segment);if(a>0)t=t.left;else if(a<0)t=t.right;else if(c.hasNext())c.next(),t=t.mid;else break}return t}has(i){const c=this._getNode(i);return!(c?.value===void 0&&c?.mid===void 0)}delete(i){return this._delete(i,!1)}deleteSuperstr(i){return this._delete(i,!0)}_delete(i,c){const t=this._iter.reset(i),a=[];let p=this._root;for(;p;){const h=t.cmp(p.segment);if(h>0)a.push([-1,p]),p=p.left;else if(h<0)a.push([1,p]),p=p.right;else if(t.hasNext())t.next(),a.push([0,p]),p=p.mid;else break}if(!!p){if(c?(p.left=void 0,p.mid=void 0,p.right=void 0,p.height=1):(p.key=void 0,p.value=void 0),!p.mid&&!p.value)if(p.left&&p.right){const h=this._min(p.right),{key:_,value:P,segment:R}=h;this._delete(h.key,!1),p.key=_,p.value=P,p.segment=R}else{const h=p.left??p.right;if(a.length>0){const[_,P]=a[a.length-1];switch(_){case-1:P.left=h;break;case 0:P.mid=h;break;case 1:P.right=h;break}}else this._root=h}for(let h=a.length-1;h>=0;h--){const _=a[h][1];_.updateHeight();const P=_.balanceFactor();if(P>1?(_.right.balanceFactor()>=0||(_.right=_.right.rotateRight()),a[h][1]=_.rotateLeft()):P<-1&&(_.left.balanceFactor()<=0||(_.left=_.left.rotateLeft()),a[h][1]=_.rotateRight()),h>0)switch(a[h-1][0]){case-1:a[h-1][1].left=a[h][1];break;case 1:a[h-1][1].right=a[h][1];break;case 0:a[h-1][1].mid=a[h][1];break}else this._root=a[0][1]}}}_min(i){for(;i.left;)i=i.left;return i}findSubstr(i){const c=this._iter.reset(i);let t=this._root,a;for(;t;){const p=c.cmp(t.segment);if(p>0)t=t.left;else if(p<0)t=t.right;else if(c.hasNext())c.next(),a=t.value||a,t=t.mid;else break}return t&&t.value||a}findSuperstr(i){const c=this._iter.reset(i);let t=this._root;for(;t;){const a=c.cmp(t.segment);if(a>0)t=t.left;else if(a<0)t=t.right;else if(c.hasNext())c.next(),t=t.mid;else return t.mid?this._entries(t.mid):void 0}}forEach(i){for(const[c,t]of this)i(t,c)}*[Symbol.iterator](){yield*this._entries(this._root)}*_entries(i){!i||(i.left&&(yield*this._entries(i.left)),i.value&&(yield[i.key,i.value]),i.mid&&(yield*this._entries(i.mid)),i.right&&(yield*this._entries(i.right)))}_isBalanced(){const i=c=>{if(!c)return!0;const t=c.balanceFactor();return t<-1||t>1?!1:i(c.left)&&i(c.right)};return i(this._root)}}e.TernarySearchTree=D;class T{constructor(i,c){this.uri=i,this.value=c}}class d{constructor(i,c){this[w]="ResourceMap",i instanceof d?(this.map=new Map(i.map),this.toKey=c??d.defaultToKey):(this.map=new Map,this.toKey=i??d.defaultToKey)}set(i,c){return this.map.set(this.toKey(i),new T(i,c)),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,c){typeof c!="undefined"&&(i=i.bind(c));for(let[t,a]of this.map)i(a.value,a.uri,this)}*values(){for(let i of this.map.values())yield i.value}*keys(){for(let i of this.map.values())yield i.uri}*entries(){for(let i of this.map.values())yield[i.uri,i.value]}*[(w=Symbol.toStringTag,Symbol.iterator)](){for(let[,i]of this.map)yield[i.uri,i.value]}}e.ResourceMap=d,d.defaultToKey=r=>r.toString();var g;(function(r){r[r.None=0]="None",r[r.AsOld=1]="AsOld",r[r.AsNew=2]="AsNew"})(g=e.Touch||(e.Touch={}));class b{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,c=0){const t=this._map.get(i);if(!!t)return c!==0&&this.touch(t,c),t.value}set(i,c,t=0){let a=this._map.get(i);if(a)a.value=c,t!==0&&this.touch(a,t);else{switch(a={key:i,value:c,next:void 0,previous:void 0},t){case 0:this.addItemLast(a);break;case 1:this.addItemFirst(a);break;case 2:this.addItemLast(a);break;default:this.addItemLast(a);break}this._map.set(i,a),this._size++}return this}delete(i){return!!this.remove(i)}remove(i){const c=this._map.get(i);if(!!c)return this._map.delete(i),this.removeItem(c),this._size--,c.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,c){const t=this._state;let a=this._head;for(;a;){if(c?i.bind(c)(a.value,a.key,this):i(a.value,a.key,this),this._state!==t)throw new Error("LinkedMap got modified during iteration.");a=a.next}}keys(){const i=this,c=this._state;let t=this._head;const a={[Symbol.iterator](){return a},next(){if(i._state!==c)throw new Error("LinkedMap got modified during iteration.");if(t){const p={value:t.key,done:!1};return t=t.next,p}else return{value:void 0,done:!0}}};return a}values(){const i=this,c=this._state;let t=this._head;const a={[Symbol.iterator](){return a},next(){if(i._state!==c)throw new Error("LinkedMap got modified during iteration.");if(t){const p={value:t.value,done:!1};return t=t.next,p}else return{value:void 0,done:!0}}};return a}entries(){const i=this,c=this._state;let t=this._head;const a={[Symbol.iterator](){return a},next(){if(i._state!==c)throw new Error("LinkedMap got modified during iteration.");if(t){const p={value:[t.key,t.value],done:!1};return t=t.next,p}else return{value:void 0,done:!0}}};return a}[(B=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(i){if(i>=this.size)return;if(i===0){this.clear();return}let c=this._head,t=this.size;for(;c&&t>i;)this._map.delete(c.key),c=c.next,t--;this._head=c,this._size=t,c&&(c.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 c=i.next,t=i.previous;if(!c||!t)throw new Error("Invalid list");c.previous=t,t.next=c}i.next=void 0,i.previous=void 0,this._state++}touch(i,c){if(!this._head||!this._tail)throw new Error("Invalid list");if(!(c!==1&&c!==2)){if(c===1){if(i===this._head)return;const t=i.next,a=i.previous;i===this._tail?(a.next=void 0,this._tail=a):(t.previous=a,a.next=t),i.previous=void 0,i.next=this._head,this._head.previous=i,this._head=i,this._state++}else if(c===2){if(i===this._tail)return;const t=i.next,a=i.previous;i===this._head?(t.previous=void 0,this._head=t):(t.previous=a,a.next=t),i.next=void 0,i.previous=this._tail,this._tail.next=i,this._tail=i,this._state++}}}toJSON(){const i=[];return this.forEach((c,t)=>{i.push([t,c])}),i}fromJSON(i){this.clear();for(const[c,t]of i)this.set(c,t)}}e.LinkedMap=b;class l extends b{constructor(i,c=1){super();this._limit=i,this._ratio=Math.min(Math.max(0,c),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,c=2){return super.get(i,c)}peek(i){return super.get(i,0)}set(i,c){return super.set(i,c,2),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}}e.LRUCache=l;class I{constructor(i){S.set(this,void 0),je(this,S,i,"f")}get size(){return De(this,S,"f").size}forEach(i,c){De(this,S,"f").forEach(i,c)}get(i){return De(this,S,"f").get(i)}has(i){return De(this,S,"f").has(i)}entries(){return De(this,S,"f").entries()}keys(){return De(this,S,"f").keys()}values(){return De(this,S,"f").values()}[(S=new WeakMap,Symbol.iterator)](){return De(this,S,"f").entries()}}e.ReadonlyMapView=I}),define(Ee[104],we([1,0,22,10]),function(J,e,o,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.fuzzyScoreGraceful=e.fuzzyScoreGracefulAggressive=e.fuzzyScore=e.FuzzyScore=e.isPatternInWord=e.createMatches=e.anyScore=e.matchesFuzzy2=e.matchesFuzzy=e.matchesWords=e.matchesCamelCase=e.isUpper=e.matchesSubString=e.matchesContiguousSubString=e.matchesPrefix=e.matchesStrictPrefix=e.or=void 0;function w(...C){return function(O,x){for(let X=0,re=C.length;X<re;X++){const ve=C[X](O,x);if(ve)return ve}return null}}e.or=w,e.matchesStrictPrefix=B.bind(void 0,!1),e.matchesPrefix=B.bind(void 0,!0);function B(C,O,x){if(!x||x.length<O.length)return null;let X;return C?X=k.startsWithIgnoreCase(x,O):X=x.indexOf(O)===0,X?O.length>0?[{start:0,end:O.length}]:[]:null}function S(C,O){const x=O.toLowerCase().indexOf(C.toLowerCase());return x===-1?null:[{start:x,end:x+C.length}]}e.matchesContiguousSubString=S;function A(C,O){return y(C.toLowerCase(),O.toLowerCase(),0,0)}e.matchesSubString=A;function y(C,O,x,X){if(x===C.length)return[];if(X===O.length)return null;if(C[x]===O[X]){let re=null;return(re=y(C,O,x+1,X+1))?D({start:X,end:X+1},re):null}return y(C,O,x,X+1)}function M(C){return 97<=C&&C<=122}function L(C){return 65<=C&&C<=90}e.isUpper=L;function v(C){return 48<=C&&C<=57}function u(C){return C===32||C===9||C===10||C===13}const m=new Set;"()[]{}<>`'\"-/;:,.?!".split("").forEach(C=>m.add(C.charCodeAt(0)));function s(C){return u(C)||m.has(C)}function n(C,O){return C===O||s(C)&&s(O)}function f(C){return M(C)||L(C)||v(C)}function D(C,O){return O.length===0?O=[C]:C.end===O[0].start?O[0].start=C.start:O.unshift(C),O}function T(C,O){for(let x=O;x<C.length;x++){const X=C.charCodeAt(x);if(L(X)||v(X)||x>0&&!f(C.charCodeAt(x-1)))return x}return C.length}function d(C,O,x,X){if(x===C.length)return[];if(X===O.length)return null;if(C[x]!==O[X].toLowerCase())return null;{let re=null,ve=X+1;for(re=d(C,O,x+1,X+1);!re&&(ve=T(O,ve))<O.length;)re=d(C,O,x+1,ve),ve++;return re===null?null:D({start:X,end:X+1},re)}}function g(C){let O=0,x=0,X=0,re=0,ve=0;for(let xe=0;xe<C.length;xe++)ve=C.charCodeAt(xe),L(ve)&&O++,M(ve)&&x++,f(ve)&&X++,v(ve)&&re++;const Ie=O/C.length,Me=x/C.length,Le=X/C.length,ze=re/C.length;return{upperPercent:Ie,lowerPercent:Me,alphaPercent:Le,numericPercent:ze}}function b(C){const{upperPercent:O,lowerPercent:x}=C;return x===0&&O>.6}function l(C){const{upperPercent:O,lowerPercent:x,alphaPercent:X,numericPercent:re}=C;return x>.2&&O<.8&&X>.6&&re<.2}function I(C){let O=0,x=0,X=0,re=0;for(let ve=0;ve<C.length;ve++)X=C.charCodeAt(ve),L(X)&&O++,M(X)&&x++,u(X)&&re++;return(O===0||x===0)&&re===0?C.length<=30:O<=5}function r(C,O){if(!O||(O=O.trim(),O.length===0)||!I(C)||O.length>60)return null;const x=g(O);if(!l(x)){if(!b(x))return null;O=O.toLowerCase()}let X=null,re=0;for(C=C.toLowerCase();re<O.length&&(X=d(C,O,0,re))===null;)re=T(O,re+1);return X}e.matchesCamelCase=r;function i(C,O,x=!1){if(!O||O.length===0)return null;let X=null,re=0;for(C=C.toLowerCase(),O=O.toLowerCase();re<O.length&&(X=c(C,O,0,re,x))===null;)re=t(O,re+1);return X}e.matchesWords=i;function c(C,O,x,X,re){if(x===C.length)return[];if(X===O.length)return null;if(n(C.charCodeAt(x),O.charCodeAt(X))){let ve=null,Ie=X+1;if(ve=c(C,O,x+1,X+1,re),!re)for(;!ve&&(Ie=t(O,Ie))<O.length;)ve=c(C,O,x+1,Ie,re),Ie++;return ve===null?null:D({start:X,end:X+1},ve)}else return null}function t(C,O){for(let x=O;x<C.length;x++)if(s(C.charCodeAt(x))||x>0&&s(C.charCodeAt(x-1)))return x;return C.length}const a=w(e.matchesPrefix,r,S),p=w(e.matchesPrefix,r,A),h=new o.LRUCache(1e4);function _(C,O,x=!1){if(typeof C!="string"||typeof O!="string")return null;let X=h.get(C);X||(X=new RegExp(k.convertSimple2RegExpPattern(C),"i"),h.set(C,X));const re=X.exec(O);return re?[{start:re.index,end:re.index+re[0].length}]:x?p(C,O):a(C,O)}e.matchesFuzzy=_;function P(C,O){const x=Ae(C,C.toLowerCase(),0,O,O.toLowerCase(),0,!0);return x?$(x):null}e.matchesFuzzy2=P;function R(C,O,x,X,re,ve){const Ie=Math.min(13,C.length);for(;x<Ie;x++){const Me=Ae(C,O,x,X,re,ve,!1);if(Me)return Me}return[0,ve]}e.anyScore=R;function $(C){if(typeof C=="undefined")return[];const O=[],x=C[1];for(let X=C.length-1;X>1;X--){const re=C[X]+x,ve=O[O.length-1];ve&&ve.end===re?ve.end=re+1:O.push({start:re,end:re+1})}return O}e.createMatches=$;const E=128;function z(){const C=[],O=[];for(let x=0;x<=E;x++)O[x]=0;for(let x=0;x<=E;x++)C.push(O.slice(0));return C}function V(C){const O=[];for(let x=0;x<=C;x++)O[x]=0;return O}const W=V(2*E),Q=V(2*E),K=z(),H=z(),te=z(),ae=!1;function ee(C,O,x,X,re){function ve(Me,Le,ze=" "){for(;Me.length<Le;)Me=ze+Me;return Me}let Ie=` | |${X.split("").map(Me=>ve(Me,3)).join("|")}
`;for(let Me=0;Me<=x;Me++)Me===0?Ie+=" |":Ie+=`${O[Me-1]}|`,Ie+=C[Me].slice(0,re+1).map(Le=>ve(Le.toString(),3)).join("|")+`
`;return Ie}function ce(C,O,x,X){C=C.substr(O),x=x.substr(X),console.log(ee(H,C,C.length,x,x.length)),console.log(ee(te,C,C.length,x,x.length)),console.log(ee(K,C,C.length,x,x.length))}function de(C,O){if(O<0||O>=C.length)return!1;const x=C.codePointAt(O);switch(x){case 95:case 45:case 46:case 32:case 47:case 92:case 39:case 34:case 58:case 36:case 60:case 40:case 91:return!0;case void 0:return!1;default:return!!k.isEmojiImprecise(x)}}function Se(C,O){if(O<0||O>=C.length)return!1;switch(C.charCodeAt(O)){case 32:case 9:return!0;default:return!1}}function fe(C,O,x){return O[C]!==x[C]}function ne(C,O,x,X,re,ve,Ie=!1){for(;O<x&&re<ve;)C[O]===X[re]&&(Ie&&(W[O]=re),O+=1),re+=1;return O===x}e.isPatternInWord=ne;var me;(function(C){C[C.Diag=1]="Diag",C[C.Left=2]="Left",C[C.LeftLeft=3]="LeftLeft"})(me||(me={}));var ke;(function(C){C.Default=[-100,0];function O(x){return!x||x.length===2&&x[0]===-100&&x[1]===0}C.isDefault=O})(ke=e.FuzzyScore||(e.FuzzyScore={}));function Ae(C,O,x,X,re,ve,Ie){const Me=C.length>E?E:C.length,Le=X.length>E?E:X.length;if(x>=Me||ve>=Le||Me-x>Le-ve||!ne(O,x,Me,re,ve,Le,!0))return;Be(Me,Le,x,ve,O,re);let ze=1,xe=1,Re=x,Qe=ve;const tt=[!1];for(ze=1,Re=x;Re<Me;ze++,Re++){const le=W[Re],Oe=Q[Re],We=Re+1<Me?Q[Re+1]:Le;for(xe=le-ve+1,Qe=le;Qe<We;xe++,Qe++){let Ge=Number.MIN_SAFE_INTEGER,Je=!1;Qe<=Oe&&(Ge=Xe(C,O,Re,x,X,re,Qe,Le,ve,K[ze-1][xe-1]===0,tt));let ft=0;Ge!==Number.MAX_SAFE_INTEGER&&(Je=!0,ft=Ge+H[ze-1][xe-1]);const It=Qe>le,St=It?H[ze][xe-1]+(K[ze][xe-1]>0?-5:0):0,kt=Qe>le+1&&K[ze][xe-1]>0,qe=kt?H[ze][xe-2]+(K[ze][xe-2]>0?-5:0):0;if(kt&&(!It||qe>=St)&&(!Je||qe>=ft))H[ze][xe]=qe,te[ze][xe]=3,K[ze][xe]=0;else if(It&&(!Je||St>=ft))H[ze][xe]=St,te[ze][xe]=2,K[ze][xe]=0;else if(Je)H[ze][xe]=ft,te[ze][xe]=1,K[ze][xe]=K[ze-1][xe-1]+1;else throw new Error("not possible")}}if(ae&&ce(C,x,X,ve),!tt[0]&&!Ie)return;ze--,xe--;const Te=[H[ze][xe],ve];let it=0,G=0;for(;ze>=1;){let le=xe;do{const Oe=te[ze][le];if(Oe===3)le=le-2;else if(Oe===2)le=le-1;else break}while(le>=1);it>1&&O[x+ze-1]===re[ve+xe-1]&&!fe(le+ve-1,X,re)&&it+1>K[ze][le]&&(le=xe),le===xe?it++:it=1,G||(G=le),ze--,xe=le-1,Te.push(xe)}Le===Me&&(Te[0]+=2);const Y=G-Me;return Te[0]-=Y,Te}e.fuzzyScore=Ae;function Be(C,O,x,X,re,ve){let Ie=C-1,Me=O-1;for(;Ie>=x&&Me>=X;)re[Ie]===ve[Me]&&(Q[Ie]=Me,Ie--),Me--}function Xe(C,O,x,X,re,ve,Ie,Me,Le,ze,xe){if(O[x]!==ve[Ie])return Number.MIN_SAFE_INTEGER;let Re=1,Qe=!1;return Ie===x-X?Re=C[x]===re[Ie]?7:5:fe(Ie,re,ve)&&(Ie===0||!fe(Ie-1,re,ve))?(Re=C[x]===re[Ie]?7:5,Qe=!0):de(ve,Ie)&&(Ie===0||!de(ve,Ie-1))?Re=5:(de(ve,Ie-1)||Se(ve,Ie-1))&&(Re=5,Qe=!0),Re>1&&x===X&&(xe[0]=!0),Qe||(Qe=fe(Ie,re,ve)||de(ve,Ie-1)||Se(ve,Ie-1)),x===X?Ie>Le&&(Re-=Qe?3:5):ze?Re+=Qe?2:0:Re+=Qe?0:1,Ie+1===Me&&(Re-=Qe?3:5),Re}function ge(C,O,x,X,re,ve,Ie){return N(C,O,x,X,re,ve,!0,Ie)}e.fuzzyScoreGracefulAggressive=ge;function ue(C,O,x,X,re,ve,Ie){return N(C,O,x,X,re,ve,!1,Ie)}e.fuzzyScoreGraceful=ue;function N(C,O,x,X,re,ve,Ie,Me){let Le=Ae(C,O,x,X,re,ve,Me);if(Le&&!Ie)return Le;if(C.length>=3){const ze=Math.min(7,C.length-1);for(let xe=x+1;xe<ze;xe++){const Re=F(C,xe);if(Re){const Qe=Ae(Re,Re.toLowerCase(),x,X,re,ve,Me);Qe&&(Qe[0]-=3,(!Le||Qe[0]>Le[0])&&(Le=Qe))}}}return Le}function F(C,O){if(O+1>=C.length)return;const x=C[O],X=C[O+1];if(x!==X)return C.slice(0,O)+X+x+C.slice(O+2)}}),define(Ee[105],we([1,0,106,104,10]),function(J,e,o,k,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.matchesFuzzyIconAware=e.parseLabelWithIcons=e.stripIcons=e.markdownEscapeEscapedIcons=e.escapeIcons=e.iconStartMarker=void 0,e.iconStartMarker="$(";const B=new RegExp(`\\$\\(${o.CSSIcon.iconNameExpression}(?:${o.CSSIcon.iconModifierExpression})?\\)`,"g"),S=new RegExp(o.CSSIcon.iconNameCharacter),A=new RegExp(`(\\\\)?${B.source}`,"g");function y(f){return f.replace(A,(D,T)=>T?D:`\\${D}`)}e.escapeIcons=y;const M=new RegExp(`\\\\${B.source}`,"g");function L(f){return f.replace(M,D=>`\\${D}`)}e.markdownEscapeEscapedIcons=L;const v=new RegExp(`(\\s)?(\\\\)?${B.source}(\\s)?`,"g");function u(f){return f.indexOf(e.iconStartMarker)===-1?f:f.replace(v,(D,T,d,g)=>d?D:T||g||"")}e.stripIcons=u;function m(f){const D=f.indexOf(e.iconStartMarker);return D===-1?{text:f}:s(f,D)}e.parseLabelWithIcons=m;function s(f,D){const T=[];let d="";function g(a){if(a){d+=a;for(const p of a)T.push(I)}}let b=-1,l="",I=0,r,i,c=D;const t=f.length;for(g(f.substr(0,D));c<t;)r=f[c],i=f[c+1],r===e.iconStartMarker[0]&&i===e.iconStartMarker[1]?(b=c,g(l),l=e.iconStartMarker,c++):r===")"&&b!==-1?(I+=c-b+1,b=-1,l=""):b!==-1?S.test(r)?l+=r:(g(l),b=-1,l=""):g(r),c++;return g(l),{text:d,iconOffsets:T}}function n(f,D,T=!1){const{text:d,iconOffsets:g}=D;if(!g||g.length===0)return(0,k.matchesFuzzy)(f,d,T);const b=(0,w.ltrim)(d," "),l=d.length-b.length,I=(0,k.matchesFuzzy)(f,b,T);if(I)for(const r of I){const i=g[r.start+l]+l;r.start+=i,r.end+=i}return I}e.matchesFuzzyIconAware=n}),define(Ee[34],we([1,0,10]),function(J,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var k;(function(w){w[w.Ignore=0]="Ignore",w[w.Info=1]="Info",w[w.Warning=2]="Warning",w[w.Error=3]="Error"})(k||(k={})),function(w){const B="error",S="warning",A="warn",y="info",M="ignore";function L(u){return u?o.equalsIgnoreCase(B,u)?w.Error:o.equalsIgnoreCase(S,u)||o.equalsIgnoreCase(A,u)?w.Warning:o.equalsIgnoreCase(y,u)?w.Info:w.Ignore:w.Ignore}w.fromValue=L;function v(u){switch(u){case w.Error:return B;case w.Warning:return S;case w.Info:return y;default:return M}}w.toString=v}(k||(k={})),e.default=k}),define(Ee[35],we([1,0,17,23,10,11]),function(J,e,o,k,w,B){"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 S(c){return c===47||c===92}e.isPathSeparator=S;function A(c){return c.replace(/[\\/]/g,o.posix.sep)}e.toSlashes=A;function y(c){return c.indexOf("/")===-1&&(c=A(c)),/^[a-zA-Z]:(\/|$)/.test(c)&&(c="/"+c),c}e.toPosixPath=y;function M(c,t=o.posix.sep){if(!c)return"";const a=c.length,p=c.charCodeAt(0);if(S(p)){if(S(c.charCodeAt(1))&&!S(c.charCodeAt(2))){let _=3;const P=_;for(;_<a&&!S(c.charCodeAt(_));_++);if(P!==_&&!S(c.charCodeAt(_+1))){for(_+=1;_<a;_++)if(S(c.charCodeAt(_)))return c.slice(0,_+1).replace(/[\\/]/g,t)}}return t}else if(D(p)&&c.charCodeAt(1)===58)return S(c.charCodeAt(2))?c.slice(0,2)+t:c.slice(0,2);let h=c.indexOf("://");if(h!==-1){for(h+=3;h<a;h++)if(S(c.charCodeAt(h)))return c.slice(0,h+1)}return""}e.getRoot=M;function L(c){if(!k.isWindows||!c||c.length<5)return!1;let t=c.charCodeAt(0);if(t!==92||(t=c.charCodeAt(1),t!==92))return!1;let a=2;const p=a;for(;a<c.length&&(t=c.charCodeAt(a),t!==92);a++);return!(p===a||(t=c.charCodeAt(a+1),isNaN(t)||t===92))}e.isUNC=L;const v=/[\\/:\*\?"<>\|]/g,u=/[\\/]/g,m=/^(con|prn|aux|clock\$|nul|lpt[0-9]|com[0-9])(\.(.*?))?$/i;function s(c,t=k.isWindows){const a=t?v:u;return!(!c||c.length===0||/^\s+$/.test(c)||(a.lastIndex=0,a.test(c))||t&&m.test(c)||c==="."||c===".."||t&&c[c.length-1]==="."||t&&c.length!==c.trim().length||c.length>255)}e.isValidBasename=s;function n(c,t,a){const p=c===t;return!a||p?p:!c||!t?!1:(0,w.equalsIgnoreCase)(c,t)}e.isEqual=n;function f(c,t,a,p=o.sep){if(c===t)return!0;if(!c||!t||t.length>c.length)return!1;if(a){if(!(0,w.startsWithIgnoreCase)(c,t))return!1;if(t.length===c.length)return!0;let _=t.length;return t.charAt(t.length-1)===p&&_--,c.charAt(_)===p}return t.charAt(t.length-1)!==p&&(t+=p),c.indexOf(t)===0}e.isEqualOrParent=f;function D(c){return c>=65&&c<=90||c>=97&&c<=122}e.isWindowsDriveLetter=D;function T(c,t){return k.isWindows&&c.endsWith(":")&&(c+=o.sep),(0,o.isAbsolute)(c)||(c=(0,o.join)(t,c)),c=(0,o.normalize)(c),k.isWindows?(c=(0,w.rtrim)(c,o.sep),c.endsWith(":")&&(c+=o.sep)):(c=(0,w.rtrim)(c,o.sep),c||(c=o.sep)),c}e.sanitizeFilePath=T;function d(c){const t=(0,o.normalize)(c);return k.isWindows?c.length>3?!1:g(t)&&(c.length===2||t.charCodeAt(2)===92):t===o.posix.sep}e.isRootOrDriveLetter=d;function g(c,t){return(t!==void 0?t:k.isWindows)?D(c.charCodeAt(0))&&c.charCodeAt(1)===58:!1}e.hasDriveLetter=g;function b(c){return g(c)?c[0]:void 0}e.getDriveLetter=b;function l(c,t,a){return t.length>c.length?-1:c===t?0:(a&&(c=c.toLowerCase(),t=t.toLowerCase()),c.indexOf(t))}e.indexOfPath=l;function I(c){const t=c.split(":");let a,p,h;for(const _ of t){const P=Number(_);(0,B.isNumber)(P)?p===void 0?p=P:h===void 0&&(h=P):a=a?[a,_].join(":"):_}if(!a)throw new Error("Format for `--goto` should be: `FILE:LINE(:COLUMN)`");return{path:a,line:p!==void 0?p:void 0,column:h!==void 0?h:p!==void 0?1:void 0}}e.parseLineAndColumnAware=I;const r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";function i(c,t,a=8){let p="";for(let _=0;_<a;_++)p+=r.charAt(Math.floor(Math.random()*r.length));let h;return t?h=`${t}-${p}`:h=p,c?(0,o.join)(c,h):h}e.randomPath=i}),define(Ee[54],we([1,0,21,10,2]),function(J,e,o,k,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.revive=e.parse=e.stringify=void 0;function B(M){return JSON.stringify(M,A)}e.stringify=B;function S(M){let L=JSON.parse(M);return L=y(L),L}e.parse=S;function A(M,L){return L instanceof RegExp?{$mid:2,source:L.source,flags:(0,k.regExpFlags)(L)}:L}function y(M,L=0){if(!M||L>200)return M;if(typeof M=="object"){switch(M.$mid){case 1:return w.URI.revive(M);case 2:return new RegExp(M.source,M.flags);case 14:return new Date(M.source)}if(M instanceof o.VSBuffer||M instanceof Uint8Array)return M;if(Array.isArray(M))for(let v=0;v<M.length;++v)M[v]=y(M[v],L+1);else for(const v in M)Object.hasOwnProperty.call(M,v)&&(M[v]=y(M[v],L+1))}return M}e.revive=y}),define(Ee[9],we([1,0,23,2]),function(J,e,o,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FileAccess=e.RemoteAuthorities=e.connectionTokenQueryName=e.connectionTokenCookieName=e.Schemas=void 0;var w;(function(A){A.inMemory="inmemory",A.vscode="vscode",A.internal="private",A.walkThrough="walkThrough",A.walkThroughSnippet="walkThroughSnippet",A.http="http",A.https="https",A.file="file",A.mailto="mailto",A.untitled="untitled",A.data="data",A.command="command",A.vscodeRemote="vscode-remote",A.vscodeRemoteResource="vscode-remote-resource",A.userData="vscode-userdata",A.vscodeCustomEditor="vscode-custom-editor",A.vscodeNotebook="vscode-notebook",A.vscodeNotebookCell="vscode-notebook-cell",A.vscodeNotebookCellMetadata="vscode-notebook-cell-metadata",A.vscodeNotebookCellOutput="vscode-notebook-cell-output",A.vscodeInteractive="vscode-interactive",A.vscodeInteractiveInput="vscode-interactive-input",A.vscodeSettings="vscode-settings",A.vscodeWorkspaceTrust="vscode-workspace-trust",A.vscodeTerminal="vscode-terminal",A.webviewPanel="webview-panel",A.vscodeWebview="vscode-webview",A.extension="extension",A.vscodeFileResource="vscode-file",A.tmp="tmp",A.vsls="vsls"})(w=e.Schemas||(e.Schemas={})),e.connectionTokenCookieName="vscode-tkn",e.connectionTokenQueryName="tkn";class B{constructor(){this._hosts=Object.create(null),this._ports=Object.create(null),this._connectionTokens=Object.create(null),this._preferredWebSchema="http",this._delegate=null}setPreferredWebSchema(y){this._preferredWebSchema=y}setDelegate(y){this._delegate=y}set(y,M,L){this._hosts[y]=M,this._ports[y]=L}setConnectionToken(y,M){this._connectionTokens[y]=M}getPreferredWebSchema(){return this._preferredWebSchema}rewrite(y){if(this._delegate)return this._delegate(y);const M=y.authority;let L=this._hosts[M];L&&L.indexOf(":")!==-1&&(L=`[${L}]`);const v=this._ports[M],u=this._connectionTokens[M];let m=`path=${encodeURIComponent(y.path)}`;return typeof u=="string"&&(m+=`&${e.connectionTokenQueryName}=${encodeURIComponent(u)}`),k.URI.from({scheme:o.isWeb?this._preferredWebSchema:w.vscodeRemoteResource,authority:o.isWeb?window.location.host:`${L}:${v}`,path:o.isWeb?k.URI.joinPath(k.URI.parse(window.location.href),"/vscode-remote-resource").path:"/vscode-remote-resource",query:m})}}e.RemoteAuthorities=new B;class S{asBrowserUri(y,M){const L=this.toUri(y,M);return L.scheme===w.vscodeRemote?e.RemoteAuthorities.rewrite(L):L.scheme===w.file&&(o.isNative||o.isWebWorker&&o.globals.origin===`${w.vscodeFileResource}://${S.FALLBACK_AUTHORITY}`)?L.with({scheme:w.vscodeFileResource,authority:L.authority||S.FALLBACK_AUTHORITY,query:null,fragment:null}):L}asFileUri(y,M){const L=this.toUri(y,M);return L.scheme===w.vscodeFileResource?L.with({scheme:w.file,authority:L.authority!==S.FALLBACK_AUTHORITY?L.authority:null,query:null,fragment:null}):L}toUri(y,M){return k.URI.isUri(y)?y:k.URI.parse(M.toUrl(y))}}S.FALLBACK_AUTHORITY="vscode-app",e.FileAccess=new S}),define(Ee[24],we([1,0,35,9,17,23,10,2]),function(J,e,o,k,w,B,S,A){"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 y(m){return(0,A.uriToFsPath)(m,!0)}e.originalFSPath=y;class M{constructor(s){this._ignorePathCasing=s}compare(s,n,f=!1){return s===n?0:(0,S.compare)(this.getComparisonKey(s,f),this.getComparisonKey(n,f))}isEqual(s,n,f=!1){return s===n?!0:!s||!n?!1:this.getComparisonKey(s,f)===this.getComparisonKey(n,f)}getComparisonKey(s,n=!1){return s.with({path:this._ignorePathCasing(s)?s.path.toLowerCase():void 0,fragment:n?null:void 0}).toString()}ignorePathCasing(s){return this._ignorePathCasing(s)}isEqualOrParent(s,n,f=!1){if(s.scheme===n.scheme){if(s.scheme===k.Schemas.file)return o.isEqualOrParent(y(s),y(n),this._ignorePathCasing(s))&&s.query===n.query&&(f||s.fragment===n.fragment);if((0,e.isEqualAuthority)(s.authority,n.authority))return o.isEqualOrParent(s.path,n.path,this._ignorePathCasing(s),"/")&&s.query===n.query&&(f||s.fragment===n.fragment)}return!1}joinPath(s,...n){return A.URI.joinPath(s,...n)}basenameOrAuthority(s){return(0,e.basename)(s)||s.authority}basename(s){return w.posix.basename(s.path)}extname(s){return w.posix.extname(s.path)}dirname(s){if(s.path.length===0)return s;let n;return s.scheme===k.Schemas.file?n=A.URI.file(w.dirname(y(s))).path:(n=w.posix.dirname(s.path),s.authority&&n.length&&n.charCodeAt(0)!==47&&(console.error(`dirname("${s.toString})) resulted in a relative path`),n="/")),s.with({path:n})}normalizePath(s){if(!s.path.length)return s;let n;return s.scheme===k.Schemas.file?n=A.URI.file(w.normalize(y(s))).path:n=w.posix.normalize(s.path),s.with({path:n})}relativePath(s,n){if(s.scheme!==n.scheme||!(0,e.isEqualAuthority)(s.authority,n.authority))return;if(s.scheme===k.Schemas.file){const T=w.relative(y(s),y(n));return B.isWindows?o.toSlashes(T):T}let f=s.path||"/",D=n.path||"/";if(this._ignorePathCasing(s)){let T=0;for(const d=Math.min(f.length,D.length);T<d&&!(f.charCodeAt(T)!==D.charCodeAt(T)&&f.charAt(T).toLowerCase()!==D.charAt(T).toLowerCase());T++);f=D.substr(0,T)+f.substr(T)}return w.posix.relative(f,D)}resolvePath(s,n){if(s.scheme===k.Schemas.file){const f=A.URI.file(w.resolve(y(s),n));return s.with({authority:f.authority,path:f.path})}return n=o.toPosixPath(n),s.with({path:w.posix.resolve(s.path,n)})}isAbsolutePath(s){return!!s.path&&s.path[0]==="/"}isEqualAuthority(s,n){return s===n||s!==void 0&&n!==void 0&&(0,S.equalsIgnoreCase)(s,n)}hasTrailingPathSeparator(s,n=w.sep){if(s.scheme===k.Schemas.file){const f=y(s);return f.length>o.getRoot(f).length&&f[f.length-1]===n}else{const f=s.path;return f.length>1&&f.charCodeAt(f.length-1)===47&&!/^[a-zA-Z]:(\/$|\\$)/.test(s.fsPath)}}removeTrailingPathSeparator(s,n=w.sep){return(0,e.hasTrailingPathSeparator)(s,n)?s.with({path:s.path.substr(0,s.path.length-1)}):s}addTrailingPathSeparator(s,n=w.sep){let f=!1;if(s.scheme===k.Schemas.file){const D=y(s);f=D!==void 0&&D.length===o.getRoot(D).length&&D[D.length-1]===n}else{n="/";const D=s.path;f=D.length===1&&D.charCodeAt(D.length-1)===47}return!f&&!(0,e.hasTrailingPathSeparator)(s,n)?s.with({path:s.path+"/"}):s}}e.ExtUri=M,e.extUri=new M(()=>!1),e.extUriBiasedIgnorePathCase=new M(m=>m.scheme===k.Schemas.file?!B.isLinux:!0),e.extUriIgnorePathCase=new M(m=>!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 L(m,s){const n=[];for(let f=0;f<m.length;f++){const D=s(m[f]);m.some((T,d)=>d===f?!1:(0,e.isEqualOrParent)(D,s(T)))||n.push(m[f])}return n}e.distinctParents=L;var v;(function(m){m.META_DATA_LABEL="label",m.META_DATA_DESCRIPTION="description",m.META_DATA_SIZE="size",m.META_DATA_MIME="mime";function s(n){const f=new Map;n.path.substring(n.path.indexOf(";")+1,n.path.lastIndexOf(";")).split(";").forEach(d=>{const[g,b]=d.split(":");g&&b&&f.set(g,b)});const T=n.path.substring(0,n.path.indexOf(";"));return T&&f.set(m.META_DATA_MIME,T),f}m.parseMetaData=s})(v=e.DataUri||(e.DataUri={}));function u(m,s,n){if(s){let f=m.path;return f&&f[0]!==w.posix.sep&&(f=w.posix.sep+f),m.with({scheme:n,authority:s,path:f})}return m.with({scheme:n})}e.toLocalResource=u}),define(Ee[13],we([1,0,20,15,5,6,24,23]),function(J,e,o,k,w,B,S,A){"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.Queue=e.Limiter=e.firstParallel=e.first=e.sequence=e.disposableTimeout=e.timeout=e.AutoOpenBarrier=e.Barrier=e.ThrottledDelayer=e.Delayer=e.MicrotaskDelay=e.SequencerByKey=e.Sequencer=e.Throttler=e.asPromise=e.raceTimeout=e.raceCancellablePromises=e.raceCancellationError=e.raceCancellation=e.createCancelablePromise=e.isThenable=void 0;function y(fe){return!!fe&&typeof fe.then=="function"}e.isThenable=y;function M(fe){const ne=new o.CancellationTokenSource,me=fe(ne.token),ke=new Promise((Ae,Be)=>{const Xe=ne.token.onCancellationRequested(()=>{Xe.dispose(),ne.dispose(),Be(new k.CancellationError)});Promise.resolve(me).then(ge=>{Xe.dispose(),ne.dispose(),Ae(ge)},ge=>{Xe.dispose(),ne.dispose(),Be(ge)})});return new class{cancel(){ne.cancel()}then(Ae,Be){return ke.then(Ae,Be)}catch(Ae){return this.then(void 0,Ae)}finally(Ae){return ke.finally(Ae)}}}e.createCancelablePromise=M;function L(fe,ne,me){return new Promise((ke,Ae)=>{const Be=ne.onCancellationRequested(()=>{Be.dispose(),ke(me)});fe.then(ke,Ae).finally(()=>Be.dispose())})}e.raceCancellation=L;function v(fe,ne){return new Promise((me,ke)=>{const Ae=ne.onCancellationRequested(()=>{Ae.dispose(),ke(new k.CancellationError)});fe.then(me,ke).finally(()=>Ae.dispose())})}e.raceCancellationError=v;async function u(fe){let ne=-1;const me=fe.map((Ae,Be)=>Ae.then(Xe=>(ne=Be,Xe))),ke=await Promise.race(me);return fe.forEach((Ae,Be)=>{Be!==ne&&Ae.cancel()}),ke}e.raceCancellablePromises=u;function m(fe,ne,me){let ke;const Ae=setTimeout(()=>{ke?.(void 0),me?.()},ne);return Promise.race([fe.finally(()=>clearTimeout(Ae)),new Promise(Be=>ke=Be)])}e.raceTimeout=m;function s(fe){return new Promise((ne,me)=>{const ke=fe();y(ke)?ke.then(ne,me):ne(ke)})}e.asPromise=s;class n{constructor(){this.activePromise=null,this.queuedPromise=null,this.queuedPromiseFactory=null}queue(ne){if(this.activePromise){if(this.queuedPromiseFactory=ne,!this.queuedPromise){const me=()=>{this.queuedPromise=null;const ke=this.queue(this.queuedPromiseFactory);return this.queuedPromiseFactory=null,ke};this.queuedPromise=new Promise(ke=>{this.activePromise.then(me,me).then(ke)})}return new Promise((me,ke)=>{this.queuedPromise.then(me,ke)})}return this.activePromise=ne(),new Promise((me,ke)=>{this.activePromise.then(Ae=>{this.activePromise=null,me(Ae)},Ae=>{this.activePromise=null,ke(Ae)})})}}e.Throttler=n;class f{constructor(){this.current=Promise.resolve(null)}queue(ne){return this.current=this.current.then(()=>ne(),()=>ne())}}e.Sequencer=f;class D{constructor(){this.promiseMap=new Map}queue(ne,me){const Ae=(this.promiseMap.get(ne)??Promise.resolve()).catch(()=>{}).then(me).finally(()=>{this.promiseMap.get(ne)===Ae&&this.promiseMap.delete(ne)});return this.promiseMap.set(ne,Ae),Ae}}e.SequencerByKey=D;const T=(fe,ne)=>{let me=!0;const ke=setTimeout(()=>{me=!1,ne()},fe);return{isTriggered:()=>me,dispose:()=>{clearTimeout(ke),me=!1}}},d=fe=>{let ne=!0;return queueMicrotask(()=>{ne&&(ne=!1,fe())}),{isTriggered:()=>ne,dispose:()=>{ne=!1}}};e.MicrotaskDelay=Symbol("MicrotaskDelay");class g{constructor(ne){this.defaultDelay=ne,this.deferred=null,this.completionPromise=null,this.doResolve=null,this.doReject=null,this.task=null}trigger(ne,me=this.defaultDelay){this.task=ne,this.cancelTimeout(),this.completionPromise||(this.completionPromise=new Promise((Ae,Be)=>{this.doResolve=Ae,this.doReject=Be}).then(()=>{if(this.completionPromise=null,this.doResolve=null,this.task){const Ae=this.task;return this.task=null,Ae()}}));const ke=()=>{this.deferred=null,this.doResolve?.(null)};return this.deferred=me===e.MicrotaskDelay?d(ke):T(me,ke),this.completionPromise}isTriggered(){return!!this.deferred?.isTriggered()}cancel(){this.cancelTimeout(),this.completionPromise&&(this.doReject&&this.doReject(new k.CancellationError),this.completionPromise=null)}cancelTimeout(){this.deferred?.dispose(),this.deferred=null}dispose(){this.cancel()}}e.Delayer=g;class b{constructor(ne){this.delayer=new g(ne),this.throttler=new n}trigger(ne,me){return this.delayer.trigger(()=>this.throttler.queue(ne),me)}isTriggered(){return this.delayer.isTriggered()}cancel(){this.delayer.cancel()}dispose(){this.delayer.dispose()}}e.ThrottledDelayer=b;class l{constructor(){this._isOpen=!1,this._promise=new Promise((ne,me)=>{this._completePromise=ne})}isOpen(){return this._isOpen}open(){this._isOpen=!0,this._completePromise(!0)}wait(){return this._promise}}e.Barrier=l;class I extends l{constructor(ne){super();this._timeout=setTimeout(()=>this.open(),ne)}open(){clearTimeout(this._timeout),super.open()}}e.AutoOpenBarrier=I;function r(fe,ne){return ne?new Promise((me,ke)=>{const Ae=setTimeout(()=>{Be.dispose(),me()},fe),Be=ne.onCancellationRequested(()=>{clearTimeout(Ae),Be.dispose(),ke(new k.CancellationError)})}):M(me=>r(fe,me))}e.timeout=r;function i(fe,ne=0){const me=setTimeout(fe,ne);return(0,B.toDisposable)(()=>clearTimeout(me))}e.disposableTimeout=i;function c(fe){const ne=[];let me=0;const ke=fe.length;function Ae(){return me<ke?fe[me++]():null}function Be(Xe){Xe!=null&&ne.push(Xe);const ge=Ae();return ge?ge.then(Be):Promise.resolve(ne)}return Promise.resolve(null).then(Be)}e.sequence=c;function t(fe,ne=ke=>!!ke,me=null){let ke=0;const Ae=fe.length,Be=()=>{if(ke>=Ae)return Promise.resolve(me);const Xe=fe[ke++];return Promise.resolve(Xe()).then(ue=>ne(ue)?Promise.resolve(ue):Be())};return Be()}e.first=t;function a(fe,ne=ke=>!!ke,me=null){if(fe.length===0)return Promise.resolve(me);let ke=fe.length;const Ae=()=>{ke=-1;for(const Be of fe)Be.cancel?.()};return new Promise((Be,Xe)=>{for(const ge of fe)ge.then(ue=>{--ke>=0&&ne(ue)?(Ae(),Be(ue)):ke===0&&Be(me)}).catch(ue=>{--ke>=0&&(Ae(),Xe(ue))})})}e.firstParallel=a;class p{constructor(ne){this._size=0,this.maxDegreeOfParalellism=ne,this.outstandingPromises=[],this.runningPromises=0,this._onFinished=new w.Emitter}get onFinished(){return this._onFinished.event}get size(){return this._size}queue(ne){return this._size++,new Promise((me,ke)=>{this.outstandingPromises.push({factory:ne,c:me,e:ke}),this.consume()})}consume(){for(;this.outstandingPromises.length&&this.runningPromises<this.maxDegreeOfParalellism;){const ne=this.outstandingPromises.shift();this.runningPromises++;const me=ne.factory();me.then(ne.c,ne.e),me.then(()=>this.consumed(),()=>this.consumed())}}consumed(){this._size--,this.runningPromises--,this.outstandingPromises.length>0?this.consume():this._onFinished.fire()}dispose(){this._onFinished.dispose()}}e.Limiter=p;class h extends p{constructor(){super(1)}}e.Queue=h;class _{constructor(){this.queues=new Map,this.drainers=new Set}async whenDrained(){if(this.isDrained())return;const ne=new te;return this.drainers.add(ne),ne.p}isDrained(){for(const[,ne]of this.queues)if(ne.size>0)return!1;return!0}queueFor(ne,me=S.extUri){const ke=me.getComparisonKey(ne);let Ae=this.queues.get(ke);return Ae||(Ae=new h,w.Event.once(Ae.onFinished)(()=>{Ae?.dispose(),this.queues.delete(ke),this.onDidQueueFinish()}),this.queues.set(ke,Ae)),Ae}onDidQueueFinish(){!this.isDrained()||this.releaseDrainers()}releaseDrainers(){for(const ne of this.drainers)ne.complete();this.drainers.clear()}dispose(){for(const[,ne]of this.queues)ne.dispose();this.queues.clear(),this.releaseDrainers()}}e.ResourceQueue=_;class P{constructor(ne,me){this._token=-1,typeof ne=="function"&&typeof me=="number"&&this.setIfNotSet(ne,me)}dispose(){this.cancel()}cancel(){this._token!==-1&&(clearTimeout(this._token),this._token=-1)}cancelAndSet(ne,me){this.cancel(),this._token=setTimeout(()=>{this._token=-1,ne()},me)}setIfNotSet(ne,me){this._token===-1&&(this._token=setTimeout(()=>{this._token=-1,ne()},me))}}e.TimeoutTimer=P;class R{constructor(){this._token=-1}dispose(){this.cancel()}cancel(){this._token!==-1&&(clearInterval(this._token),this._token=-1)}cancelAndSet(ne,me){this.cancel(),this._token=setInterval(()=>{ne()},me)}}e.IntervalTimer=R;class ${constructor(ne,me){this.timeoutToken=-1,this.runner=ne,this.timeout=me,this.timeoutHandler=this.onTimeout.bind(this)}dispose(){this.cancel(),this.runner=null}cancel(){this.isScheduled()&&(clearTimeout(this.timeoutToken),this.timeoutToken=-1)}schedule(ne=this.timeout){this.cancel(),this.timeoutToken=setTimeout(this.timeoutHandler,ne)}get delay(){return this.timeout}set delay(ne){this.timeout=ne}isScheduled(){return this.timeoutToken!==-1}onTimeout(){this.timeoutToken=-1,this.runner&&this.doRun()}doRun(){this.runner&&this.runner()}}e.RunOnceScheduler=$;class E{constructor(ne,me){me%1e3!=0&&console.warn(`ProcessTimeRunOnceScheduler resolution is 1s, ${me}ms is not a multiple of 1000ms.`),this.runner=ne,this.timeout=me,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(ne=this.timeout){ne%1e3!=0&&console.warn(`ProcessTimeRunOnceScheduler resolution is 1s, ${ne}ms is not a multiple of 1000ms.`),this.cancel(),this.counter=Math.ceil(ne/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&&this.runner())}}e.ProcessTimeRunOnceScheduler=E;class z extends ${constructor(ne,me){super(ne,me);this.units=[]}work(ne){this.units.push(ne),this.isScheduled()||this.schedule()}doRun(){const ne=this.units;this.units=[],this.runner&&this.runner(ne)}dispose(){this.units=[],super.dispose()}}e.RunOnceWorker=z;class V extends B.Disposable{constructor(ne,me){super();this.options=ne,this.handler=me,this.pendingWork=[],this.throttler=this._register(new B.MutableDisposable),this.disposed=!1}get pending(){return this.pendingWork.length}work(ne){if(this.disposed)return!1;if(typeof this.options.maxBufferedWork=="number"){if(this.throttler.value){if(this.pending+ne.length>this.options.maxBufferedWork)return!1}else if(this.pending+ne.length-this.options.maxWorkChunkSize>this.options.maxBufferedWork)return!1}return this.pendingWork.push(...ne),this.throttler.value||this.doWork(),!0}doWork(){this.handler(this.pendingWork.splice(0,this.options.maxWorkChunkSize)),this.pendingWork.length>0&&(this.throttler.value=new $(()=>{this.throttler.clear(),this.doWork()},this.options.throttleDelay),this.throttler.value.schedule())}dispose(){super.dispose(),this.disposed=!0}}e.ThrottledWorker=V,function(){typeof requestIdleCallback!="function"||typeof cancelIdleCallback!="function"?e.runWhenIdle=fe=>{(0,A.setTimeout0)(()=>{if(ne)return;const me=Date.now()+15;fe(Object.freeze({didTimeout:!0,timeRemaining(){return Math.max(0,me-Date.now())}}))});let ne=!1;return{dispose(){ne||(ne=!0)}}}:e.runWhenIdle=(fe,ne)=>{const me=requestIdleCallback(fe,typeof ne=="number"?{timeout:ne}:void 0);let ke=!1;return{dispose(){ke||(ke=!0,cancelIdleCallback(me))}}}}();class W{constructor(ne){this._didRun=!1,this._executor=()=>{try{this._value=ne()}catch(me){this._error=me}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=W;async function Q(fe,ne,me){let ke;for(let Ae=0;Ae<me;Ae++)try{return await fe()}catch(Be){ke=Be,await r(ne)}throw ke}e.retry=Q;class K{hasPending(ne){return this._pending?typeof ne=="number"?this._pending.taskId===ne:!!this._pending:!1}get pending(){return this._pending?this._pending.promise:void 0}cancelPending(){this._pending?.cancel()}setPending(ne,me,ke){return this._pending={taskId:ne,cancel:()=>ke?.(),promise:me},me.then(()=>this.donePending(ne),()=>this.donePending(ne)),me}donePending(ne){this._pending&&ne===this._pending.taskId&&(this._pending=void 0,this.triggerNext())}triggerNext(){if(this._next){const ne=this._next;this._next=void 0,ne.run().then(ne.promiseResolve,ne.promiseReject)}}setNext(ne){if(this._next)this._next.run=ne;else{let me,ke;const Ae=new Promise((Be,Xe)=>{me=Be,ke=Xe});this._next={run:ne,promise:Ae,promiseResolve:me,promiseReject:ke}}return this._next.promise}}e.TaskSequentializer=K;class H{constructor(ne,me=()=>Date.now()){this.interval=ne,this.nowFn=me,this.lastIncrementTime=0,this.value=0}increment(){const ne=this.nowFn();return ne-this.lastIncrementTime>this.interval&&(this.lastIncrementTime=ne,this.value=0),this.value++,this.value}}e.IntervalCounter=H;class te{constructor(){this.rejected=!1,this.resolved=!1,this.p=new Promise((ne,me)=>{this.completeCallback=ne,this.errorCallback=me})}get isRejected(){return this.rejected}get isResolved(){return this.resolved}get isSettled(){return this.rejected||this.resolved}complete(ne){return new Promise(me=>{this.completeCallback(ne),this.resolved=!0,me()})}error(ne){return new Promise(me=>{this.errorCallback(ne),this.rejected=!0,me()})}cancel(){new Promise(ne=>{this.errorCallback(new k.CancellationError),this.rejected=!0,ne()})}}e.DeferredPromise=te;var ae;(function(fe){async function ne(ke){let Ae;const Be=await Promise.all(ke.map(Xe=>Xe.then(ge=>ge,ge=>{Ae||(Ae=ge)})));if(typeof Ae!="undefined")throw Ae;return Be}fe.settled=ne;function me(ke){return new Promise(async(Ae,Be)=>{try{await ke(Ae,Be)}catch(Xe){Be(Xe)}})}fe.withAsyncBody=me})(ae=e.Promises||(e.Promises={}));var ee;(function(fe){fe[fe.Initial=0]="Initial",fe[fe.DoneOK=1]="DoneOK",fe[fe.DoneError=2]="DoneError"})(ee||(ee={}));class ce{constructor(ne){this._state=0,this._results=[],this._error=null,this._onStateChanged=new w.Emitter,queueMicrotask(async()=>{const me={emitOne:ke=>this.emitOne(ke),emitMany:ke=>this.emitMany(ke),reject:ke=>this.reject(ke)};try{await Promise.resolve(ne(me)),this.resolve()}catch(ke){this.reject(ke)}finally{me.emitOne=void 0,me.emitMany=void 0,me.reject=void 0}})}static fromArray(ne){return new ce(me=>{me.emitMany(ne)})}static fromPromise(ne){return new ce(async me=>{me.emitMany(await ne)})}static fromPromises(ne){return new ce(async me=>{await Promise.all(ne.map(async ke=>me.emitOne(await ke)))})}static merge(ne){return new ce(async me=>{await Promise.all(ne.map(async ke=>{for await(const Ae of ke)me.emitOne(Ae)}))})}[Symbol.asyncIterator](){let ne=0;return{next:async()=>{do{if(this._state===2)throw this._error;if(ne<this._results.length)return{done:!1,value:this._results[ne++]};if(this._state===1)return{done:!0,value:void 0};await w.Event.toPromise(this._onStateChanged.event)}while(!0)}}}static map(ne,me){return new ce(async ke=>{for await(const Ae of ne)ke.emitOne(me(Ae))})}map(ne){return ce.map(this,ne)}static filter(ne,me){return new ce(async ke=>{for await(const Ae of ne)me(Ae)&&ke.emitOne(Ae)})}filter(ne){return ce.filter(this,ne)}static coalesce(ne){return ce.filter(ne,me=>!!me)}coalesce(){return ce.coalesce(this)}static async toPromise(ne){const me=[];for await(const ke of ne)me.push(ke);return me}toPromise(){return ce.toPromise(this)}emitOne(ne){this._state===0&&(this._results.push(ne),this._onStateChanged.fire())}emitMany(ne){this._state===0&&(this._results=this._results.concat(ne),this._onStateChanged.fire())}resolve(){this._state===0&&(this._state=1,this._onStateChanged.fire())}reject(ne){this._state===0&&(this._state=2,this._error=ne,this._onStateChanged.fire())}}e.AsyncIterableObject=ce,ce.EMPTY=ce.fromArray([]);class de extends ce{constructor(ne,me){super(me);this._source=ne}cancel(){this._source.cancel()}}e.CancelableAsyncIterableObject=de;function Se(fe){const ne=new o.CancellationTokenSource,me=fe(ne.token);return new de(ne,async ke=>{const Ae=ne.token.onCancellationRequested(()=>{Ae.dispose(),ne.dispose(),ke.reject(new k.CancellationError)});try{for await(const Be of me){if(ne.token.isCancellationRequested)return;ke.emitOne(Be)}Ae.dispose(),ne.dispose()}catch(Be){Ae.dispose(),ne.dispose(),ke.reject(Be)}})}e.createCancelableAsyncIterable=Se}),define(Ee[107],we([1,0,13,17]),function(J,e,o,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.compareByPrefix=e.compareAnything=e.comparePaths=e.compareFileExtensionsUnicode=e.compareFileExtensionsLower=e.compareFileExtensionsUpper=e.compareFileExtensionsDefault=e.compareFileExtensions=e.noIntlCompareFileNames=e.compareFileNamesUnicode=e.compareFileNamesLower=e.compareFileNamesUpper=e.compareFileNamesDefault=e.compareFileNames=void 0;const w=new o.IdleValue(()=>{const h=new Intl.Collator(void 0,{numeric:!0,sensitivity:"base"});return{collator:h,collatorIsNumeric:h.resolvedOptions().numeric}}),B=new o.IdleValue(()=>({collator:new Intl.Collator(void 0,{numeric:!0})})),S=new o.IdleValue(()=>({collator:new Intl.Collator(void 0,{numeric:!0,sensitivity:"accent"})}));function A(h,_,P=!1){const R=h||"",$=_||"",E=w.value.collator.compare(R,$);return w.value.collatorIsNumeric&&E===0&&R!==$?R<$?-1:1:E}e.compareFileNames=A;function y(h,_){const P=B.value.collator;return h=h||"",_=_||"",b(P,h,_)}e.compareFileNamesDefault=y;function M(h,_){const P=B.value.collator;return h=h||"",_=_||"",i(h,_)||b(P,h,_)}e.compareFileNamesUpper=M;function L(h,_){const P=B.value.collator;return h=h||"",_=_||"",r(h,_)||b(P,h,_)}e.compareFileNamesLower=L;function v(h,_){return h=h||"",_=_||"",h===_?0:h<_?-1:1}e.compareFileNamesUnicode=v;function u(h,_,P=!1){P||(h=h&&h.toLowerCase(),_=_&&_.toLowerCase());const[R,$]=d(h),[E,z]=d(_);return R!==E?R<E?-1:1:$===z?0:$<z?-1:1}e.noIntlCompareFileNames=u;function m(h,_){const[P,R]=d(h),[$,E]=d(_);let z=w.value.collator.compare(R,E);if(z===0){if(w.value.collatorIsNumeric&&R!==E)return R<E?-1:1;if(z=w.value.collator.compare(P,$),w.value.collatorIsNumeric&&z===0&&P!==$)return P<$?-1:1}return z}e.compareFileExtensions=m;function s(h,_){h=h||"",_=_||"";const P=g(h),R=g(_),$=B.value.collator,E=S.value.collator;return b(E,P,R)||b($,h,_)}e.compareFileExtensionsDefault=s;function n(h,_){h=h||"",_=_||"";const P=g(h),R=g(_),$=B.value.collator,E=S.value.collator;return b(E,P,R)||i(h,_)||b($,h,_)}e.compareFileExtensionsUpper=n;function f(h,_){h=h||"",_=_||"";const P=g(h),R=g(_),$=B.value.collator,E=S.value.collator;return b(E,P,R)||r(h,_)||b($,h,_)}e.compareFileExtensionsLower=f;function D(h,_){h=h||"",_=_||"";const P=g(h).toLowerCase(),R=g(_).toLowerCase();return P!==R?P<R?-1:1:h!==_?h<_?-1:1:0}e.compareFileExtensionsUnicode=D;const T=/^(.*?)(\.([^.]*))?$/;function d(h,_=!1){const P=h?T.exec(h):[];let R=[P&&P[1]||"",P&&P[3]||""];return _&&(!R[0]&&R[1]||R[0]&&R[0].charAt(0)===".")&&(R=[R[0]+"."+R[1],""]),R}function g(h){const _=h?T.exec(h):[];return _&&_[1]&&_[1].charAt(0)!=="."&&_[3]||""}function b(h,_,P){let R=h.compare(_,P);return R!==0?R:_.length!==P.length?_.length<P.length?-1:1:0}function l(h){const _=h.charAt(0);return _.toLocaleUpperCase()!==_}function I(h){const _=h.charAt(0);return _.toLocaleLowerCase()!==_}function r(h,_){return l(h)&&I(_)?-1:I(h)&&l(_)?1:0}function i(h,_){return I(h)&&l(_)?-1:l(h)&&I(_)?1:0}function c(h,_,P=!1){return P||(h=h&&h.toLowerCase(),_=_&&_.toLowerCase()),h===_?0:h<_?-1:1}function t(h,_,P=!1){const R=h.split(k.sep),$=_.split(k.sep),E=R.length-1,z=$.length-1;let V,W;for(let Q=0;;Q++){if(V=E===Q,W=z===Q,V&&W)return A(R[Q],$[Q],P);if(V)return-1;if(W)return 1;const K=c(R[Q],$[Q],P);if(K!==0)return K}}e.comparePaths=t;function a(h,_,P){const R=h.toLowerCase(),$=_.toLowerCase(),E=p(h,_,P);if(E)return E;const z=R.endsWith(P),V=$.endsWith(P);if(z!==V)return z?-1:1;const W=A(R,$);return W!==0?W:R.localeCompare($)}e.compareAnything=a;function p(h,_,P){const R=h.toLowerCase(),$=_.toLowerCase(),E=R.startsWith(P),z=$.startsWith(P);if(E!==z)return E?-1:1;if(E&&z){if(R.length<$.length)return-1;if(R.length>$.length)return 1}return 0}e.compareByPrefix=p}),define(Ee[29],we([1,0,13,35,22,17,23,10]),function(J,e,o,k,w,B,S,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getPathTerms=e.getBasenameTerms=e.isRelativePattern=e.hasSiblingFn=e.hasSiblingPromiseFn=e.parse=e.match=e.splitGlobAware=e.GLOB_SPLIT=e.GLOBSTAR=e.getEmptyExpression=void 0;function y(){return Object.create(null)}e.getEmptyExpression=y,e.GLOBSTAR="**",e.GLOB_SPLIT="/";const M="[/\\\\]",L="[^/\\\\]",v=/\//g;function u(te){switch(te){case 0:return"";case 1:return`${L}*?`;default:return`(?:${M}|${L}+${M}|${M}${L}+)*?`}}function m(te,ae){if(!te)return[];const ee=[];let ce=!1,de=!1,Se="";for(const fe of te){switch(fe){case ae:if(!ce&&!de){ee.push(Se),Se="";continue}break;case"{":ce=!0;break;case"}":ce=!1;break;case"[":de=!0;break;case"]":de=!1;break}Se+=fe}return Se&&ee.push(Se),ee}e.splitGlobAware=m;function s(te){if(!te)return"";let ae="";const ee=m(te,e.GLOB_SPLIT);if(ee.every(ce=>ce===e.GLOBSTAR))ae=".*";else{let ce=!1;ee.forEach((de,Se)=>{if(de===e.GLOBSTAR){ce||(ae+=u(2),ce=!0);return}let fe=!1,ne="",me=!1,ke="";for(const Ae of de){if(Ae!=="}"&&fe){ne+=Ae;continue}if(me&&(Ae!=="]"||!ke)){let Be;Ae==="-"?Be=Ae:(Ae==="^"||Ae==="!")&&!ke?Be="^":Ae===e.GLOB_SPLIT?Be="":Be=(0,A.escapeRegExpCharacters)(Ae),ke+=Be;continue}switch(Ae){case"{":fe=!0;continue;case"[":me=!0;continue;case"}":{ae+=`(?:${m(ne,",").map(ge=>s(ge)).join("|")})`,fe=!1,ne="";break}case"]":ae+="["+ke+"]",me=!1,ke="";break;case"?":ae+=L;continue;case"*":ae+=u(1);continue;default:ae+=(0,A.escapeRegExpCharacters)(Ae)}}Se<ee.length-1&&(ee[Se+1]!==e.GLOBSTAR||Se+2<ee.length)&&(ae+=M),ce=!1})}return ae}const n=/^\*\*\/\*\.[\w\.-]+$/,f=/^\*\*\/([\w\.-]+)\/?$/,D=/^{\*\*\/\*?[\w\.-]+\/?(,\*\*\/\*?[\w\.-]+\/?)*}$/,T=/^{\*\*\/\*?[\w\.-]+(\/(\*\*)?)?(,\*\*\/\*?[\w\.-]+(\/(\*\*)?)?)*}$/,d=/^\*\*((\/[\w\.-]+)+)\/?$/,g=/^([\w\.-]+(\/[\w\.-]+)*)\/?$/,b=new w.LRUCache(1e4),l=function(){return!1},I=function(){return null};function r(te,ae){if(!te)return I;let ee;typeof te!="string"?ee=te.pattern:ee=te,ee=ee.trim();const ce=`${ee}_${!!ae.trimForExclusions}`;let de=b.get(ce);if(de)return i(de,te);let Se;if(n.test(ee)){const fe=ee.substr(4);de=function(ne,me){return typeof ne=="string"&&ne.endsWith(fe)?ee:null}}else(Se=f.exec(c(ee,ae)))?de=t(Se[1],ee):(ae.trimForExclusions?T:D).test(ee)?de=a(ee,ae):(Se=d.exec(c(ee,ae)))?de=p(Se[1].substr(1),ee,!0):(Se=g.exec(c(ee,ae)))?de=p(Se[1],ee,!1):de=h(ee);return b.set(ce,de),i(de,te)}function i(te,ae){return typeof ae=="string"?te:function(ee,ce){return(0,k.isEqualOrParent)(ee,ae.base,!S.isLinux)?te(ee.substr(ae.base.length+1),ce):null}}function c(te,ae){return ae.trimForExclusions&&te.endsWith("/**")?te.substr(0,te.length-2):te}function t(te,ae){const ee=`/${te}`,ce=`\\${te}`,de=function(fe,ne){return typeof fe!="string"?null:ne?ne===te?ae:null:fe===te||fe.endsWith(ee)||fe.endsWith(ce)?ae:null},Se=[te];return de.basenames=Se,de.patterns=[ae],de.allBasenames=Se,de}function a(te,ae){const ee=H(te.slice(1,-1).split(",").map(ne=>r(ne,ae)).filter(ne=>ne!==I),te),ce=ee.length;if(!ce)return I;if(ce===1)return ee[0];const de=function(ne,me){for(let ke=0,Ae=ee.length;ke<Ae;ke++)if(ee[ke](ne,me))return te;return null},Se=ee.find(ne=>!!ne.allBasenames);Se&&(de.allBasenames=Se.allBasenames);const fe=ee.reduce((ne,me)=>me.allPaths?ne.concat(me.allPaths):ne,[]);return fe.length&&(de.allPaths=fe),de}function p(te,ae,ee){const ce=B.sep===B.posix.sep,de=ce?te:te.replace(v,B.sep),Se=B.sep+de,fe=B.posix.sep+te,ne=ee?function(me,ke){return typeof me=="string"&&(me===de||me.endsWith(Se)||!ce&&(me===te||me.endsWith(fe)))?ae:null}:function(me,ke){return typeof me=="string"&&(me===de||!ce&&me===te)?ae:null};return ne.allPaths=[(ee?"*/":"./")+te],ne}function h(te){try{const ae=new RegExp(`^${s(te)}$`);return function(ee){return ae.lastIndex=0,typeof ee=="string"&&ae.test(ee)?te:null}}catch{return I}}function _(te,ae,ee){return!te||typeof ae!="string"?!1:P(te)(ae,void 0,ee)}e.match=_;function P(te,ae={}){if(!te)return l;if(typeof te=="string"||z(te)){const ee=r(te,ae);if(ee===I)return l;const ce=function(de,Se){return!!ee(de,Se)};return ee.allBasenames&&(ce.allBasenames=ee.allBasenames),ee.allPaths&&(ce.allPaths=ee.allPaths),ce}return Q(te,ae)}e.parse=P;function R(te){if(!te)return;let ae;return ee=>(ae||(ae=(te()||Promise.resolve([])).then(ce=>ce?E(ce):{})),ae.then(ce=>!!ce[ee]))}e.hasSiblingPromiseFn=R;function $(te){if(!te)return;let ae;return ee=>{if(!ae){const ce=te();ae=ce?E(ce):{}}return!!ae[ee]}}e.hasSiblingFn=$;function E(te){const ae={};for(const ee of te)ae[ee]=!0;return ae}function z(te){const ae=te;return ae?typeof ae.base=="string"&&typeof ae.pattern=="string":!1}e.isRelativePattern=z;function V(te){return te.allBasenames||[]}e.getBasenameTerms=V;function W(te){return te.allPaths||[]}e.getPathTerms=W;function Q(te,ae){const ee=H(Object.getOwnPropertyNames(te).map(ne=>K(ne,te[ne],ae)).filter(ne=>ne!==I)),ce=ee.length;if(!ce)return I;if(!ee.some(ne=>!!ne.requiresSiblings)){if(ce===1)return ee[0];const ne=function(Ae,Be){for(let Xe=0,ge=ee.length;Xe<ge;Xe++){const ue=ee[Xe](Ae,Be);if(ue)return ue}return null},me=ee.find(Ae=>!!Ae.allBasenames);me&&(ne.allBasenames=me.allBasenames);const ke=ee.reduce((Ae,Be)=>Be.allPaths?Ae.concat(Be.allPaths):Ae,[]);return ke.length&&(ne.allPaths=ke),ne}const de=function(ne,me,ke){let Ae;for(let Be=0,Xe=ee.length;Be<Xe;Be++){const ge=ee[Be];ge.requiresSiblings&&ke&&(me||(me=(0,B.basename)(ne)),Ae||(Ae=me.substr(0,me.length-(0,B.extname)(ne).length)));const ue=ge(ne,me,Ae,ke);if(ue)return ue}return null},Se=ee.find(ne=>!!ne.allBasenames);Se&&(de.allBasenames=Se.allBasenames);const fe=ee.reduce((ne,me)=>me.allPaths?ne.concat(me.allPaths):ne,[]);return fe.length&&(de.allPaths=fe),de}function K(te,ae,ee){if(ae===!1)return I;const ce=r(te,ee);if(ce===I)return I;if(typeof ae=="boolean")return ce;if(ae){const de=ae.when;if(typeof de=="string"){const Se=(fe,ne,me,ke)=>{if(!ke||!ce(fe,ne))return null;const Ae=de.replace("$(basename)",me),Be=ke(Ae);return(0,o.isThenable)(Be)?Be.then(Xe=>Xe?te:null):Be?te:null};return Se.requiresSiblings=!0,Se}}return ce}function H(te,ae){const ee=te.filter(ne=>!!ne.basenames);if(ee.length<2)return te;const ce=ee.reduce((ne,me)=>{const ke=me.basenames;return ke?ne.concat(ke):ne},[]);let de;if(ae){de=[];for(let ne=0,me=ce.length;ne<me;ne++)de.push(ae)}else de=ee.reduce((ne,me)=>{const ke=me.patterns;return ke?ne.concat(ke):ne},[]);const Se=function(ne,me){if(typeof ne!="string")return null;if(!me){let Ae;for(Ae=ne.length;Ae>0;Ae--){const Be=ne.charCodeAt(Ae-1);if(Be===47||Be===92)break}me=ne.substr(Ae)}const ke=ce.indexOf(me);return ke!==-1?de[ke]:null};Se.basenames=ce,Se.patterns=de,Se.allBasenames=ce;const fe=te.filter(ne=>!ne.basenames);return fe.push(Se),fe}}),define(Ee[72],we([1,0,15,105,24,2]),function(J,e,o,k,w,B){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.parseHrefAndDimensions=e.removeMarkdownEscapes=e.escapeMarkdownSyntaxTokens=e.markdownStringEqual=e.isMarkdownString=e.isEmptyMarkdownString=e.MarkdownString=e.MarkdownStringTextNewlineStyle=void 0;var S;(function(s){s[s.Paragraph=0]="Paragraph",s[s.Break=1]="Break"})(S=e.MarkdownStringTextNewlineStyle||(e.MarkdownStringTextNewlineStyle={}));class A{constructor(n="",f=!1){if(this.value=n,typeof this.value!="string")throw(0,o.illegalArgument)("value");typeof f=="boolean"?(this.isTrusted=f,this.supportThemeIcons=!1,this.supportHtml=!1):(this.isTrusted=f.isTrusted??void 0,this.supportThemeIcons=f.supportThemeIcons??!1,this.supportHtml=f.supportHtml??!1)}appendText(n,f=0){return this.value+=v(this.supportThemeIcons?(0,k.escapeIcons)(n):n).replace(/([ \t]+)/g,(D,T)=>" ".repeat(T.length)).replace(/\>/gm,"\\>").replace(/\n/g,f===1?`\\
`:`
`),this}appendMarkdown(n){return this.value+=n,this}appendCodeblock(n,f){return this.value+="\n```",this.value+=n,this.value+=`
`,this.value+=f,this.value+="\n```\n",this}}e.MarkdownString=A;function y(s){return M(s)?!s.value:Array.isArray(s)?s.every(y):!0}e.isEmptyMarkdownString=y;function M(s){return s instanceof A?!0:s&&typeof s=="object"?typeof s.value=="string"&&(typeof s.isTrusted=="boolean"||s.isTrusted===void 0)&&(typeof s.supportThemeIcons=="boolean"||s.supportThemeIcons===void 0):!1}e.isMarkdownString=M;function L(s,n){return s===n?!0:!s||!n?!1:s.value===n.value&&s.isTrusted===n.isTrusted&&s.supportThemeIcons===n.supportThemeIcons&&s.supportHtml===n.supportHtml&&(s.baseUri===n.baseUri||!!s.baseUri&&!!n.baseUri&&(0,w.isEqual)(B.URI.from(s.baseUri),B.URI.from(n.baseUri)))}e.markdownStringEqual=L;function v(s){return s.replace(/[\\`*_{}[\]()#+\-!]/g,"\\$&")}e.escapeMarkdownSyntaxTokens=v;function u(s){return s&&s.replace(/\\([\\`*_{}[\]()#+\-.!])/g,"$1")}e.removeMarkdownEscapes=u;function m(s){const n=[],f=s.split("|").map(T=>T.trim());s=f[0];const D=f[1];if(D){const T=/height=(\d+)/.exec(D),d=/width=(\d+)/.exec(D),g=T?T[1]:"",b=d?d[1]:"",l=isFinite(parseInt(b)),I=isFinite(parseInt(g));l&&n.push(`width="${b}"`),I&&n.push(`height="${g}"`)}return{href:s,dimensions:n}}e.parseHrefAndDimensions=m}),define(Ee[73],we([1,0,35,9,17,23,24,10,2]),function(J,e,o,k,w,B,S,A,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.splitName=e.unmnemonicLabel=e.mnemonicButtonLabel=e.mnemonicMenuLabel=e.template=e.shorten=e.untildify=e.tildify=e.normalizeDriveLetter=e.getBaseLabel=e.getPathLabel=void 0;function M(i,c,t){if(typeof i=="string"&&(i=y.URI.file(i)),t){const p=t.getWorkspaceFolder(i);if(p){const h=t.getWorkspace().folders.length>1;let _;if((0,S.isEqual)(p.uri,i)?_="":_=(0,S.relativePath)(p.uri,i),h){const P=p.name?p.name:(0,S.basename)(p.uri);_=_?P+" \u2022 "+_:P}return _}}if(i.scheme!==k.Schemas.file&&i.scheme!==k.Schemas.untitled)return i.with({query:null,fragment:null}).toString(!0);if((0,o.hasDriveLetter)(i.fsPath))return(0,w.normalize)(v(i.fsPath));let a=(0,w.normalize)(i.fsPath);return!B.isWindows&&c?.userHome&&(a=m(a,c.userHome.fsPath)),a}e.getPathLabel=M;function L(i){if(!i)return;typeof i=="string"&&(i=y.URI.file(i));const c=(0,S.basename)(i)||(i.scheme===k.Schemas.file?i.fsPath:i.path);return B.isWindows&&(0,o.isRootOrDriveLetter)(c)?v(c):c}e.getBaseLabel=L;function v(i,c){return(0,o.hasDriveLetter)(i,c)?i.charAt(0).toUpperCase()+i.slice(1):i}e.normalizeDriveLetter=v;let u=Object.create(null);function m(i,c){if(B.isWindows||!i||!c)return i;let t=u.original===c?u.normalized:void 0;return t||(t=`${(0,A.rtrim)(c,w.posix.sep)}${w.posix.sep}`,u={original:c,normalized:t}),(B.isLinux?i.startsWith(t):(0,A.startsWithIgnoreCase)(i,t))&&(i=`~/${i.substr(t.length)}`),i}e.tildify=m;function s(i,c){return i.replace(/^~($|\/|\\)/,`${c}$1`)}e.untildify=s;const n="\u2026",f="\\\\",D="~";function T(i,c=w.sep){const t=new Array(i.length);let a=!1;for(let p=0;p<i.length;p++){let h=i[p];if(h===""){t[p]=`.${c}`;continue}if(!h){t[p]=h;continue}a=!0;let _="";h.indexOf(f)===0?(_=h.substr(0,h.indexOf(f)+f.length),h=h.substr(h.indexOf(f)+f.length)):h.indexOf(c)===0?(_=h.substr(0,h.indexOf(c)+c.length),h=h.substr(h.indexOf(c)+c.length)):h.indexOf(D)===0&&(_=h.substr(0,h.indexOf(D)+D.length),h=h.substr(h.indexOf(D)+D.length));const P=h.split(c);for(let R=1;a&&R<=P.length;R++)for(let $=P.length-R;a&&$>=0;$--){a=!1;let E=P.slice($,$+R).join(c);for(let z=0;!a&&z<i.length;z++)if(z!==p&&i[z]&&i[z].indexOf(E)>-1){const V=$+R===P.length,W=$>0&&i[z].indexOf(c)>-1?c+E:E,Q=i[z].endsWith(W);a=!V||Q}if(!a){let z="";(P[0].endsWith(":")||_!=="")&&($===1&&($=0,R++,E=P[0]+c+E),$>0&&(z=P[0]+c),z=_+z),$>0&&(z=z+n+c),z=z+E,$+R<P.length&&(z=z+c+n),t[p]=z}}a&&(t[p]=h)}return t}e.shorten=T;var d;(function(i){i[i.TEXT=0]="TEXT",i[i.VARIABLE=1]="VARIABLE",i[i.SEPARATOR=2]="SEPARATOR"})(d||(d={}));function g(i,c=Object.create(null)){const t=[];let a=!1,p="";for(const h of i)if(h==="$"||a&&h==="{")p&&t.push({value:p,type:d.TEXT}),p="",a=!0;else if(h==="}"&&a){const _=c[p];if(typeof _=="string")_.length&&t.push({value:_,type:d.VARIABLE});else if(_){const P=t[t.length-1];(!P||P.type!==d.SEPARATOR)&&t.push({value:_.label,type:d.SEPARATOR})}p="",a=!1}else p+=h;return p&&!a&&t.push({value:p,type:d.TEXT}),t.filter((h,_)=>{if(h.type===d.SEPARATOR){const P=t[_-1],R=t[_+1];return[P,R].every($=>$&&($.type===d.VARIABLE||$.type===d.TEXT)&&$.value.length>0)}return!0}).map(h=>h.value).join("")}e.template=g;function b(i,c){return B.isMacintosh||c?i.replace(/\(&&\w\)|&&/g,"").replace(/&/g,B.isMacintosh?"&":"&&"):i.replace(/&&|&/g,t=>t==="&"?"&&":"&")}e.mnemonicMenuLabel=b;function l(i,c){return B.isMacintosh||c?i.replace(/\(&&\w\)|&&/g,""):B.isWindows?i.replace(/&&|&/g,t=>t==="&"?"&&":"&"):i.replace(/&&/g,"_")}e.mnemonicButtonLabel=l;function I(i){return i.replace(/&/g,"&&")}e.unmnemonicLabel=I;function r(i){const c=i.indexOf("/")!==-1?w.posix:w.win32,t=c.basename(i),a=c.dirname(i);return t.length?{name:t,parentPath:a}:{name:a,parentPath:""}}e.splitName=r}),define(Ee[108],we([1,0,2]),function(J,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.transformAndReviveIncomingURIs=e.transformIncomingURIs=e.transformOutgoingURIs=e.DefaultURITransformer=e.URITransformer=void 0;function k(L){return L.toJSON()}class w{constructor(v){this._uriTransformer=v}transformIncoming(v){const u=this._uriTransformer.transformIncoming(v);return u===v?v:k(o.URI.from(u))}transformOutgoing(v){const u=this._uriTransformer.transformOutgoing(v);return u===v?v:k(o.URI.from(u))}transformOutgoingURI(v){const u=this._uriTransformer.transformOutgoing(v);return u===v?v:o.URI.from(u)}transformOutgoingScheme(v){return this._uriTransformer.transformOutgoingScheme(v)}}e.URITransformer=w,e.DefaultURITransformer=new class{transformIncoming(L){return L}transformOutgoing(L){return L}transformOutgoingURI(L){return L}transformOutgoingScheme(L){return L}};function B(L,v,u){if(!L||u>200)return null;if(typeof L=="object"){if(L instanceof o.URI)return v.transformOutgoing(L);for(let m in L)if(Object.hasOwnProperty.call(L,m)){const s=B(L[m],v,u+1);s!==null&&(L[m]=s)}}return null}function S(L,v){const u=B(L,v,0);return u===null?L:u}e.transformOutgoingURIs=S;function A(L,v,u,m){if(!L||m>200)return null;if(typeof L=="object"){if(L.$mid===1)return u?o.URI.revive(v.transformIncoming(L)):v.transformIncoming(L);for(let s in L)if(Object.hasOwnProperty.call(L,s)){const n=A(L[s],v,u,m+1);n!==null&&(L[s]=n)}}return null}function y(L,v){const u=A(L,v,!1,0);return u===null?L:u}e.transformIncomingURIs=y;function M(L,v){const u=A(L,v,!0,0);return u===null?L:u}e.transformAndReviveIncomingURIs=M}),define(Ee[36],we([1,0]),function(J,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.generateUuid=e.isUUID=void 0;const o=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function k(y){return o.test(y)}e.isUUID=k;const w=new Uint8Array(16),B=[];for(let y=0;y<256;y++)B.push(y.toString(16).padStart(2,"0"));let S;typeof crypto=="object"&&typeof crypto.getRandomValues=="function"?S=crypto.getRandomValues.bind(crypto):S=function(y){for(let M=0;M<y.length;M++)y[M]=Math.floor(Math.random()*256);return y};function A(){S(w),w[6]=w[6]&15|64,w[8]=w[8]&63|128;let y=0,M="";return M+=B[w[y++]],M+=B[w[y++]],M+=B[w[y++]],M+=B[w[y++]],M+="-",M+=B[w[y++]],M+=B[w[y++]],M+="-",M+=B[w[y++]],M+=B[w[y++]],M+="-",M+=B[w[y++]],M+=B[w[y++]],M+="-",M+=B[w[y++]],M+=B[w[y++]],M+=B[w[y++]],M+=B[w[y++]],M+=B[w[y++]],M+=B[w[y++]],M}e.generateUuid=A}),define(Ee[109],we([1,0]),function(J,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EDITOR_MODEL_DEFAULTS=void 0,e.EDITOR_MODEL_DEFAULTS={tabSize:4,indentSize:4,insertSpaces:!0,detectIndentation:!0,trimAutoWhitespace:!0,largeFileOptimizations:!0,bracketPairColorizationOptions:{enabled:!1}}}),define(Ee[74],we([1,0,29,17]),function(J,e,o,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.score=void 0;function w(B,S,A,y,M){if(Array.isArray(B)){let L=0;for(const v of B){const u=w(v,S,A,y,M);if(u===10)return u;u>L&&(L=u)}return L}else{if(typeof B=="string")return y?B==="*"?5:B===A?10:0:0;if(B){const{language:L,pattern:v,scheme:u,hasAccessToAllModels:m,notebookType:s}=B;if(!y&&!m)return 0;let n=0;if(u)if(u===S.scheme)n=10;else if(u==="*")n=5;else return 0;if(L)if(L===A)n=10;else if(L==="*")n=Math.max(n,5);else return 0;if(s)if(s===M)n=10;else if(s==="*")n=Math.max(n,5);else return 0;if(v){let f;if(typeof v=="string"?f=v:f={...v,base:(0,k.normalize)(v.base)},f===S.fsPath||(0,o.match)(f,S.fsPath))n=10;else return 0}return n}else return 0}}e.score=w}),define(Ee[110],we([1,0]),function(J,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AutoClosingPairs=e.StandardAutoClosingPairConditional=e.IndentAction=void 0;var o;(function(S){S[S.None=0]="None",S[S.Indent=1]="Indent",S[S.IndentOutdent=2]="IndentOutdent",S[S.Outdent=3]="Outdent"})(o=e.IndentAction||(e.IndentAction={}));class k{constructor(A){if(this._neutralCharacter=null,this._neutralCharacterSearched=!1,this.open=A.open,this.close=A.close,this._inString=!0,this._inComment=!0,this._inRegEx=!0,Array.isArray(A.notIn))for(let y=0,M=A.notIn.length;y<M;y++)switch(A.notIn[y]){case"string":this._inString=!1;break;case"comment":this._inComment=!1;break;case"regex":this._inRegEx=!1;break}}isOK(A){switch(A){case 0:return!0;case 1:return this._inComment;case 2:return this._inString;case 3:return this._inRegEx}}shouldAutoClose(A,y){if(A.getTokenCount()===0)return!0;const M=A.findTokenIndexAtOffset(y-2),L=A.getStandardTokenType(M);return this.isOK(L)}_findNeutralCharacterInRange(A,y){for(let M=A;M<=y;M++){const L=String.fromCharCode(M);if(!this.open.includes(L)&&!this.close.includes(L))return L}return null}findNeutralCharacter(){return this._neutralCharacterSearched||(this._neutralCharacterSearched=!0,this._neutralCharacter||(this._neutralCharacter=this._findNeutralCharacterInRange(48,57)),this._neutralCharacter||(this._neutralCharacter=this._findNeutralCharacterInRange(97,122)),this._neutralCharacter||(this._neutralCharacter=this._findNeutralCharacterInRange(65,90))),this._neutralCharacter}}e.StandardAutoClosingPairConditional=k;class w{constructor(A){this.autoClosingPairsOpenByStart=new Map,this.autoClosingPairsOpenByEnd=new Map,this.autoClosingPairsCloseByStart=new Map,this.autoClosingPairsCloseByEnd=new Map,this.autoClosingPairsCloseSingleChar=new Map;for(const y of A)B(this.autoClosingPairsOpenByStart,y.open.charAt(0),y),B(this.autoClosingPairsOpenByEnd,y.open.charAt(y.open.length-1),y),B(this.autoClosingPairsCloseByStart,y.close.charAt(0),y),B(this.autoClosingPairsCloseByEnd,y.close.charAt(y.close.length-1),y),y.close.length===1&&y.open.length===1&&B(this.autoClosingPairsCloseSingleChar,y.close,y)}}e.AutoClosingPairs=w;function B(S,A,y){S.has(A)?S.get(A).push(y):S.set(A,[y])}}),define(Ee[75],we([1,0,21,23]),function(J,e,o,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.decodeSemanticTokensDto=e.encodeSemanticTokensDto=void 0;var w;(function(v){v[v.Full=1]="Full",v[v.Delta=2]="Delta"})(w||(w={}));function B(v){for(let u=0,m=v.length;u<m;u+=4){const s=v[u+0],n=v[u+1],f=v[u+2],D=v[u+3];v[u+0]=D,v[u+1]=f,v[u+2]=n,v[u+3]=s}}function S(v){const u=new Uint8Array(v.buffer,v.byteOffset,v.length*4);return k.isLittleEndian()||B(u),o.VSBuffer.wrap(u)}function A(v){const u=v.buffer;if(k.isLittleEndian()||B(u),u.byteOffset%4==0)return new Uint32Array(u.buffer,u.byteOffset,u.length/4);{const m=new Uint8Array(u.byteLength);return m.set(u),new Uint32Array(m.buffer,m.byteOffset,m.length/4)}}function y(v){const u=new Uint32Array(M(v));let m=0;if(u[m++]=v.id,v.type==="full")u[m++]=1,u[m++]=v.data.length,u.set(v.data,m),m+=v.data.length;else{u[m++]=2,u[m++]=v.deltas.length;for(const s of v.deltas)u[m++]=s.start,u[m++]=s.deleteCount,s.data?(u[m++]=s.data.length,u.set(s.data,m),m+=s.data.length):u[m++]=0}return S(u)}e.encodeSemanticTokensDto=y;function M(v){let u=0;if(u+=1+1,v.type==="full")u+=1+v.data.length;else{u+=1,u+=(1+1+1)*v.deltas.length;for(const m of v.deltas)m.data&&(u+=m.data.length)}return u}function L(v){const u=A(v);let m=0;const s=u[m++];if(u[m++]===1){const T=u[m++],d=u.subarray(m,m+T);return m+=T,{id:s,type:"full",data:d}}const f=u[m++],D=[];for(let T=0;T<f;T++){const d=u[m++],g=u[m++],b=u[m++];let l;b>0&&(l=u.subarray(m,m+b),m+=b),D[T]={start:d,deleteCount:g,data:l}}return{id:s,type:"delta",deltas:D}}e.decodeSemanticTokensDto=L}),define(Ee[111],we([18,19]),function(J,e){return J.create("vs/base/common/date",e)}),define(Ee[112],we([1,0,111]),function(J,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.toLocalISOString=e.fromNow=void 0;const k=60,w=k*60,B=w*24,S=B*7,A=B*30,y=B*365;function M(v,u,m){typeof v!="number"&&(v=v.getTime());const s=Math.round((new Date().getTime()-v)/1e3);if(s<-30)return(0,o.localize)(0,null,M(new Date().getTime()+s*1e3,!1));if(s<30)return(0,o.localize)(1,null);let n;return s<k?(n=s,u?n===1?m?(0,o.localize)(2,null,n):(0,o.localize)(3,null,n):m?(0,o.localize)(4,null,n):(0,o.localize)(5,null,n):n===1?m?(0,o.localize)(6,null,n):(0,o.localize)(7,null,n):m?(0,o.localize)(8,null,n):(0,o.localize)(9,null,n)):s<w?(n=Math.floor(s/k),u?n===1?m?(0,o.localize)(10,null,n):(0,o.localize)(11,null,n):m?(0,o.localize)(12,null,n):(0,o.localize)(13,null,n):n===1?m?(0,o.localize)(14,null,n):(0,o.localize)(15,null,n):m?(0,o.localize)(16,null,n):(0,o.localize)(17,null,n)):s<B?(n=Math.floor(s/w),u?n===1?m?(0,o.localize)(18,null,n):(0,o.localize)(19,null,n):m?(0,o.localize)(20,null,n):(0,o.localize)(21,null,n):n===1?m?(0,o.localize)(22,null,n):(0,o.localize)(23,null,n):m?(0,o.localize)(24,null,n):(0,o.localize)(25,null,n)):s<S?(n=Math.floor(s/B),u?n===1?(0,o.localize)(26,null,n):(0,o.localize)(27,null,n):n===1?(0,o.localize)(28,null,n):(0,o.localize)(29,null,n)):s<A?(n=Math.floor(s/S),u?n===1?m?(0,o.localize)(30,null,n):(0,o.localize)(31,null,n):m?(0,o.localize)(32,null,n):(0,o.localize)(33,null,n):n===1?m?(0,o.localize)(34,null,n):(0,o.localize)(35,null,n):m?(0,o.localize)(36,null,n):(0,o.localize)(37,null,n)):s<y?(n=Math.floor(s/A),u?n===1?m?(0,o.localize)(38,null,n):(0,o.localize)(39,null,n):m?(0,o.localize)(40,null,n):(0,o.localize)(41,null,n):n===1?m?(0,o.localize)(42,null,n):(0,o.localize)(43,null,n):m?(0,o.localize)(44,null,n):(0,o.localize)(45,null,n)):(n=Math.floor(s/y),u?n===1?m?(0,o.localize)(46,null,n):(0,o.localize)(47,null,n):m?(0,o.localize)(48,null,n):(0,o.localize)(49,null,n):n===1?m?(0,o.localize)(50,null,n):(0,o.localize)(51,null,n):m?(0,o.localize)(52,null,n):(0,o.localize)(53,null,n))}e.fromNow=M;function L(v){return v.getFullYear()+"-"+String(v.getMonth()+1).padStart(2,"0")+"-"+String(v.getDate()).padStart(2,"0")+"T"+String(v.getHours()).padStart(2,"0")+":"+String(v.getMinutes()).padStart(2,"0")+":"+String(v.getSeconds()).padStart(2,"0")+"."+(v.getMilliseconds()/1e3).toFixed(3).slice(2,5)+"Z"}e.toLocalISOString=L}),define(Ee[113],we([18,19]),function(J,e){return J.create("vs/base/common/errorMessage",e)}),define(Ee[43],we([1,0,16,11,113]),function(J,e,o,k,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createErrorWithActions=e.isErrorWithActions=e.toErrorMessage=void 0;function B(v,u){return u&&(v.stack||v.stacktrace)?w.localize(0,null,A(v),S(v.stack)||S(v.stacktrace)):A(v)}function S(v){return Array.isArray(v)?v.join(`
`):v}function A(v){return typeof v.code=="string"&&typeof v.errno=="number"&&typeof v.syscall=="string"?w.localize(1,null,v.message):v.message||w.localize(2,null)}function y(v=null,u=!1){if(!v)return w.localize(3,null);if(Array.isArray(v)){const m=o.coalesce(v),s=y(m[0],u);return m.length>1?w.localize(4,null,s,m.length):s}if(k.isString(v))return v;if(v.detail){const m=v.detail;if(m.error)return B(m.error,u);if(m.exception)return B(m.exception,u)}return v.stack?B(v,u):v.message?v.message:w.localize(5,null)}e.toErrorMessage=y;function M(v){const u=v;return u instanceof Error&&Array.isArray(u.actions)}e.isErrorWithActions=M;function L(v,u=Object.create(null)){const m=new Error(v);return u.actions&&(m.actions=u.actions),m}e.createErrorWithActions=L}),define(Ee[114],we([18,19]),function(J,e){return J.create("vs/editor/common/config/editorOptions",e)}),define(Ee[115],we([1,0,114,23,116,16,26,109]),function(J,e,o,k,w,B,S,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorOptions=e.EditorOption=e.editorOptionsRegistry=e.EDITOR_FONT_DEFAULTS=e.WrappingIndent=e.unicodeHighlightConfigKeys=e.inUntrustedWorkspace=e.filterValidationDecorations=e.RenderLineNumbersType=e.EditorLayoutInfoComputer=e.RenderMinimap=e.EditorFontLigatures=e.cursorStyleToString=e.TextEditorCursorStyle=e.TextEditorCursorBlinkingStyle=e.stringSet=e.clampedInt=e.boolean=e.ApplyUpdateResult=e.ComputeOptionsMemory=e.ConfigurationChangedEvent=e.MINIMAP_GUTTER_WIDTH=e.EditorAutoIndentStrategy=void 0;var y;(function(G){G[G.None=0]="None",G[G.Keep=1]="Keep",G[G.Brackets=2]="Brackets",G[G.Advanced=3]="Advanced",G[G.Full=4]="Full"})(y=e.EditorAutoIndentStrategy||(e.EditorAutoIndentStrategy={})),e.MINIMAP_GUTTER_WIDTH=8;class M{constructor(Y){this._values=Y}hasChanged(Y){return this._values[Y]}}e.ConfigurationChangedEvent=M;class L{constructor(){this.stableMinimapLayoutInput=null,this.stableFitMaxMinimapScale=0,this.stableFitRemainingWidth=0}}e.ComputeOptionsMemory=L;class v{constructor(Y,le,Oe,We){this.id=Y,this.name=le,this.defaultValue=Oe,this.schema=We}applyUpdate(Y,le){return m(Y,le)}compute(Y,le,Oe){return Oe}}class u{constructor(Y,le){this.newValue=Y,this.didChange=le}}e.ApplyUpdateResult=u;function m(G,Y){if(typeof G!="object"||typeof Y!="object"||!G||!Y)return new u(Y,G!==Y);if(Array.isArray(G)||Array.isArray(Y)){const Oe=Array.isArray(G)&&Array.isArray(Y)&&B.equals(G,Y);return new u(Y,Oe)}let le=!1;for(const Oe in Y)if(Y.hasOwnProperty(Oe)){const We=m(G[Oe],Y[Oe]);We.didChange&&(G[Oe]=We.newValue,le=!0)}return new u(G,le)}class s{constructor(Y){this.schema=void 0,this.id=Y,this.name="_never_",this.defaultValue=void 0}applyUpdate(Y,le){return m(Y,le)}validate(Y){return this.defaultValue}}class n{constructor(Y,le,Oe,We){this.id=Y,this.name=le,this.defaultValue=Oe,this.schema=We}applyUpdate(Y,le){return m(Y,le)}validate(Y){return typeof Y=="undefined"?this.defaultValue:Y}compute(Y,le,Oe){return Oe}}function f(G,Y){return typeof G=="undefined"?Y:G==="false"?!1:Boolean(G)}e.boolean=f;class D extends n{constructor(Y,le,Oe,We=void 0){typeof We!="undefined"&&(We.type="boolean",We.default=Oe);super(Y,le,Oe,We)}validate(Y){return f(Y,this.defaultValue)}}function T(G,Y,le,Oe){if(typeof G=="undefined")return Y;let We=parseInt(G,10);return isNaN(We)?Y:(We=Math.max(le,We),We=Math.min(Oe,We),We|0)}e.clampedInt=T;class d extends n{constructor(Y,le,Oe,We,Ge,Je=void 0){typeof Je!="undefined"&&(Je.type="integer",Je.default=Oe,Je.minimum=We,Je.maximum=Ge);super(Y,le,Oe,Je);this.minimum=We,this.maximum=Ge}static clampedInt(Y,le,Oe,We){return T(Y,le,Oe,We)}validate(Y){return d.clampedInt(Y,this.defaultValue,this.minimum,this.maximum)}}class g extends n{constructor(Y,le,Oe,We,Ge){typeof Ge!="undefined"&&(Ge.type="number",Ge.default=Oe);super(Y,le,Oe,Ge);this.validationFn=We}static clamp(Y,le,Oe){return Y<le?le:Y>Oe?Oe:Y}static float(Y,le){if(typeof Y=="number")return Y;if(typeof Y=="undefined")return le;const Oe=parseFloat(Y);return isNaN(Oe)?le:Oe}validate(Y){return this.validationFn(g.float(Y,this.defaultValue))}}class b extends n{static string(Y,le){return typeof Y!="string"?le:Y}constructor(Y,le,Oe,We=void 0){typeof We!="undefined"&&(We.type="string",We.default=Oe);super(Y,le,Oe,We)}validate(Y){return b.string(Y,this.defaultValue)}}function l(G,Y,le){return typeof G!="string"||le.indexOf(G)===-1?Y:G}e.stringSet=l;class I extends n{constructor(Y,le,Oe,We,Ge=void 0){typeof Ge!="undefined"&&(Ge.type="string",Ge.enum=We,Ge.default=Oe);super(Y,le,Oe,Ge);this._allowedValues=We}validate(Y){return l(Y,this.defaultValue,this._allowedValues)}}class r extends v{constructor(Y,le,Oe,We,Ge,Je,ft=void 0){typeof ft!="undefined"&&(ft.type="string",ft.enum=Ge,ft.default=We);super(Y,le,Oe,ft);this._allowedValues=Ge,this._convert=Je}validate(Y){return typeof Y!="string"?this.defaultValue:this._allowedValues.indexOf(Y)===-1?this.defaultValue:this._convert(Y)}}function i(G){switch(G){case"none":return 0;case"keep":return 1;case"brackets":return 2;case"advanced":return 3;case"full":return 4}}class c extends v{constructor(){super(2,"accessibilitySupport",0,{type:"string",enum:["auto","on","off"],enumDescriptions:[o.localize(0,null),o.localize(1,null),o.localize(2,null)],default:"auto",description:o.localize(3,null)})}validate(Y){switch(Y){case"auto":return 0;case"off":return 1;case"on":return 2}return this.defaultValue}compute(Y,le,Oe){return Oe===0?Y.accessibilitySupport:Oe}}class t extends v{constructor(){const Y={insertSpace:!0,ignoreEmptyLines:!0};super(19,"comments",Y,{"editor.comments.insertSpace":{type:"boolean",default:Y.insertSpace,description:o.localize(4,null)},"editor.comments.ignoreEmptyLines":{type:"boolean",default:Y.ignoreEmptyLines,description:o.localize(5,null)}})}validate(Y){if(!Y||typeof Y!="object")return this.defaultValue;const le=Y;return{insertSpace:f(le.insertSpace,this.defaultValue.insertSpace),ignoreEmptyLines:f(le.ignoreEmptyLines,this.defaultValue.ignoreEmptyLines)}}}var a;(function(G){G[G.Hidden=0]="Hidden",G[G.Blink=1]="Blink",G[G.Smooth=2]="Smooth",G[G.Phase=3]="Phase",G[G.Expand=4]="Expand",G[G.Solid=5]="Solid"})(a=e.TextEditorCursorBlinkingStyle||(e.TextEditorCursorBlinkingStyle={}));function p(G){switch(G){case"blink":return 1;case"smooth":return 2;case"phase":return 3;case"expand":return 4;case"solid":return 5}}var h;(function(G){G[G.Line=1]="Line",G[G.Block=2]="Block",G[G.Underline=3]="Underline",G[G.LineThin=4]="LineThin",G[G.BlockOutline=5]="BlockOutline",G[G.UnderlineThin=6]="UnderlineThin"})(h=e.TextEditorCursorStyle||(e.TextEditorCursorStyle={}));function _(G){switch(G){case h.Line:return"line";case h.Block:return"block";case h.Underline:return"underline";case h.LineThin:return"line-thin";case h.BlockOutline:return"block-outline";case h.UnderlineThin:return"underline-thin"}}e.cursorStyleToString=_;function P(G){switch(G){case"line":return h.Line;case"block":return h.Block;case"underline":return h.Underline;case"line-thin":return h.LineThin;case"block-outline":return h.BlockOutline;case"underline-thin":return h.UnderlineThin}}class R extends s{constructor(){super(128)}compute(Y,le,Oe){const We=["monaco-editor"];return le.get(33)&&We.push(le.get(33)),Y.extraEditorClassName&&We.push(Y.extraEditorClassName),le.get(66)==="default"?We.push("mouse-default"):le.get(66)==="copy"&&We.push("mouse-copy"),le.get(100)&&We.push("showUnused"),le.get(126)&&We.push("showDeprecated"),We.join(" ")}}class $ extends D{constructor(){super(32,"emptySelectionClipboard",!0,{description:o.localize(6,null)})}compute(Y,le,Oe){return Oe&&Y.emptySelectionClipboard}}class E extends v{constructor(){const Y={cursorMoveOnType:!0,seedSearchStringFromSelection:"always",autoFindInSelection:"never",globalFindClipboard:!1,addExtraSpaceOnTop:!0,loop:!0};super(35,"find",Y,{"editor.find.cursorMoveOnType":{type:"boolean",default:Y.cursorMoveOnType,description:o.localize(7,null)},"editor.find.seedSearchStringFromSelection":{type:"string",enum:["never","always","selection"],default:Y.seedSearchStringFromSelection,enumDescriptions:[o.localize(8,null),o.localize(9,null),o.localize(10,null)],description:o.localize(11,null)},"editor.find.autoFindInSelection":{type:"string",enum:["never","always","multiline"],default:Y.autoFindInSelection,enumDescriptions:[o.localize(12,null),o.localize(13,null),o.localize(14,null)],description:o.localize(15,null)},"editor.find.globalFindClipboard":{type:"boolean",default:Y.globalFindClipboard,description:o.localize(16,null),included:k.isMacintosh},"editor.find.addExtraSpaceOnTop":{type:"boolean",default:Y.addExtraSpaceOnTop,description:o.localize(17,null)},"editor.find.loop":{type:"boolean",default:Y.loop,description:o.localize(18,null)}})}validate(Y){if(!Y||typeof Y!="object")return this.defaultValue;const le=Y;return{cursorMoveOnType:f(le.cursorMoveOnType,this.defaultValue.cursorMoveOnType),seedSearchStringFromSelection:typeof Y.seedSearchStringFromSelection=="boolean"?Y.seedSearchStringFromSelection?"always":"never":l(le.seedSearchStringFromSelection,this.defaultValue.seedSearchStringFromSelection,["never","always","selection"]),autoFindInSelection:typeof Y.autoFindInSelection=="boolean"?Y.autoFindInSelection?"always":"never":l(le.autoFindInSelection,this.defaultValue.autoFindInSelection,["never","always","multiline"]),globalFindClipboard:f(le.globalFindClipboard,this.defaultValue.globalFindClipboard),addExtraSpaceOnTop:f(le.addExtraSpaceOnTop,this.defaultValue.addExtraSpaceOnTop),loop:f(le.loop,this.defaultValue.loop)}}}class z extends v{constructor(){super(45,"fontLigatures",z.OFF,{anyOf:[{type:"boolean",description:o.localize(19,null)},{type:"string",description:o.localize(20,null)}],description:o.localize(21,null),default:!1})}validate(Y){return typeof Y=="undefined"?this.defaultValue:typeof Y=="string"?Y==="false"?z.OFF:Y==="true"?z.ON:Y:Boolean(Y)?z.ON:z.OFF}}e.EditorFontLigatures=z,z.OFF='"liga" off, "calt" off',z.ON='"liga" on, "calt" on';class V extends s{constructor(){super(44)}compute(Y,le,Oe){return Y.fontInfo}}class W extends n{constructor(){super(46,"fontSize",e.EDITOR_FONT_DEFAULTS.fontSize,{type:"number",minimum:6,maximum:100,default:e.EDITOR_FONT_DEFAULTS.fontSize,description:o.localize(22,null)})}validate(Y){const le=g.float(Y,this.defaultValue);return le===0?e.EDITOR_FONT_DEFAULTS.fontSize:g.clamp(le,6,100)}compute(Y,le,Oe){return Y.fontInfo.fontSize}}class Q extends v{constructor(){super(47,"fontWeight",e.EDITOR_FONT_DEFAULTS.fontWeight,{anyOf:[{type:"number",minimum:Q.MINIMUM_VALUE,maximum:Q.MAXIMUM_VALUE,errorMessage:o.localize(23,null)},{type:"string",pattern:"^(normal|bold|1000|[1-9][0-9]{0,2})$"},{enum:Q.SUGGESTION_VALUES}],default:e.EDITOR_FONT_DEFAULTS.fontWeight,description:o.localize(24,null)})}validate(Y){return Y==="normal"||Y==="bold"?Y:String(d.clampedInt(Y,e.EDITOR_FONT_DEFAULTS.fontWeight,Q.MINIMUM_VALUE,Q.MAXIMUM_VALUE))}}Q.SUGGESTION_VALUES=["normal","bold","100","200","300","400","500","600","700","800","900"],Q.MINIMUM_VALUE=1,Q.MAXIMUM_VALUE=1e3;class K extends v{constructor(){const Y={multiple:"peek",multipleDefinitions:"peek",multipleTypeDefinitions:"peek",multipleDeclarations:"peek",multipleImplementations:"peek",multipleReferences:"peek",alternativeDefinitionCommand:"editor.action.goToReferences",alternativeTypeDefinitionCommand:"editor.action.goToReferences",alternativeDeclarationCommand:"editor.action.goToReferences",alternativeImplementationCommand:"",alternativeReferenceCommand:""},le={type:"string",enum:["peek","gotoAndPeek","goto"],default:Y.multiple,enumDescriptions:[o.localize(25,null),o.localize(26,null),o.localize(27,null)]},Oe=["","editor.action.referenceSearch.trigger","editor.action.goToReferences","editor.action.peekImplementation","editor.action.goToImplementation","editor.action.peekTypeDefinition","editor.action.goToTypeDefinition","editor.action.peekDeclaration","editor.action.revealDeclaration","editor.action.peekDefinition","editor.action.revealDefinitionAside","editor.action.revealDefinition"];super(51,"gotoLocation",Y,{"editor.gotoLocation.multiple":{deprecationMessage:o.localize(28,null)},"editor.gotoLocation.multipleDefinitions":{description:o.localize(29,null),...le},"editor.gotoLocation.multipleTypeDefinitions":{description:o.localize(30,null),...le},"editor.gotoLocation.multipleDeclarations":{description:o.localize(31,null),...le},"editor.gotoLocation.multipleImplementations":{description:o.localize(32,null),...le},"editor.gotoLocation.multipleReferences":{description:o.localize(33,null),...le},"editor.gotoLocation.alternativeDefinitionCommand":{type:"string",default:Y.alternativeDefinitionCommand,enum:Oe,description:o.localize(34,null)},"editor.gotoLocation.alternativeTypeDefinitionCommand":{type:"string",default:Y.alternativeTypeDefinitionCommand,enum:Oe,description:o.localize(35,null)},"editor.gotoLocation.alternativeDeclarationCommand":{type:"string",default:Y.alternativeDeclarationCommand,enum:Oe,description:o.localize(36,null)},"editor.gotoLocation.alternativeImplementationCommand":{type:"string",default:Y.alternativeImplementationCommand,enum:Oe,description:o.localize(37,null)},"editor.gotoLocation.alternativeReferenceCommand":{type:"string",default:Y.alternativeReferenceCommand,enum:Oe,description:o.localize(38,null)}})}validate(Y){if(!Y||typeof Y!="object")return this.defaultValue;const le=Y;return{multiple:l(le.multiple,this.defaultValue.multiple,["peek","gotoAndPeek","goto"]),multipleDefinitions:le.multipleDefinitions??l(le.multipleDefinitions,"peek",["peek","gotoAndPeek","goto"]),multipleTypeDefinitions:le.multipleTypeDefinitions??l(le.multipleTypeDefinitions,"peek",["peek","gotoAndPeek","goto"]),multipleDeclarations:le.multipleDeclarations??l(le.multipleDeclarations,"peek",["peek","gotoAndPeek","goto"]),multipleImplementations:le.multipleImplementations??l(le.multipleImplementations,"peek",["peek","gotoAndPeek","goto"]),multipleReferences:le.multipleReferences??l(le.multipleReferences,"peek",["peek","gotoAndPeek","goto"]),alternativeDefinitionCommand:b.string(le.alternativeDefinitionCommand,this.defaultValue.alternativeDefinitionCommand),alternativeTypeDefinitionCommand:b.string(le.alternativeTypeDefinitionCommand,this.defaultValue.alternativeTypeDefinitionCommand),alternativeDeclarationCommand:b.string(le.alternativeDeclarationCommand,this.defaultValue.alternativeDeclarationCommand),alternativeImplementationCommand:b.string(le.alternativeImplementationCommand,this.defaultValue.alternativeImplementationCommand),alternativeReferenceCommand:b.string(le.alternativeReferenceCommand,this.defaultValue.alternativeReferenceCommand)}}}class H extends v{constructor(){const Y={enabled:!0,delay:300,sticky:!0,above:!0};super(53,"hover",Y,{"editor.hover.enabled":{type:"boolean",default:Y.enabled,description:o.localize(39,null)},"editor.hover.delay":{type:"number",default:Y.delay,minimum:0,maximum:1e4,description:o.localize(40,null)},"editor.hover.sticky":{type:"boolean",default:Y.sticky,description:o.localize(41,null)},"editor.hover.above":{type:"boolean",default:Y.above,description:o.localize(42,null)}})}validate(Y){if(!Y||typeof Y!="object")return this.defaultValue;const le=Y;return{enabled:f(le.enabled,this.defaultValue.enabled),delay:d.clampedInt(le.delay,this.defaultValue.delay,0,1e4),sticky:f(le.sticky,this.defaultValue.sticky),above:f(le.above,this.defaultValue.above)}}}var te;(function(G){G[G.None=0]="None",G[G.Text=1]="Text",G[G.Blocks=2]="Blocks"})(te=e.RenderMinimap||(e.RenderMinimap={}));class ae extends s{constructor(){super(131)}compute(Y,le,Oe){return ae.computeLayout(le,{memory:Y.memory,outerWidth:Y.outerWidth,outerHeight:Y.outerHeight,isDominatedByLongLines:Y.isDominatedByLongLines,lineHeight:Y.fontInfo.lineHeight,viewLineCount:Y.viewLineCount,lineNumbersDigitCount:Y.lineNumbersDigitCount,typicalHalfwidthCharacterWidth:Y.fontInfo.typicalHalfwidthCharacterWidth,maxDigitWidth:Y.fontInfo.maxDigitWidth,pixelRatio:Y.pixelRatio})}static computeContainedMinimapLineCount(Y){const le=Y.height/Y.lineHeight,Oe=Y.scrollBeyondLastLine?le-1:0,We=(Y.viewLineCount+Oe)/(Y.pixelRatio*Y.height),Ge=Math.floor(Y.viewLineCount/We);return{typicalViewportLineCount:le,extraLinesBeyondLastLine:Oe,desiredRatio:We,minimapLineCount:Ge}}static _computeMinimapLayout(Y,le){const Oe=Y.outerWidth,We=Y.outerHeight,Ge=Y.pixelRatio;if(!Y.minimap.enabled)return{renderMinimap:0,minimapLeft:0,minimapWidth:0,minimapHeightIsEditorHeight:!1,minimapIsSampling:!1,minimapScale:1,minimapLineHeight:1,minimapCanvasInnerWidth:0,minimapCanvasInnerHeight:Math.floor(Ge*We),minimapCanvasOuterWidth:0,minimapCanvasOuterHeight:We};const Je=le.stableMinimapLayoutInput,ft=Je&&Y.outerHeight===Je.outerHeight&&Y.lineHeight===Je.lineHeight&&Y.typicalHalfwidthCharacterWidth===Je.typicalHalfwidthCharacterWidth&&Y.pixelRatio===Je.pixelRatio&&Y.scrollBeyondLastLine===Je.scrollBeyondLastLine&&Y.minimap.enabled===Je.minimap.enabled&&Y.minimap.side===Je.minimap.side&&Y.minimap.size===Je.minimap.size&&Y.minimap.showSlider===Je.minimap.showSlider&&Y.minimap.renderCharacters===Je.minimap.renderCharacters&&Y.minimap.maxColumn===Je.minimap.maxColumn&&Y.minimap.scale===Je.minimap.scale&&Y.verticalScrollbarWidth===Je.verticalScrollbarWidth&&Y.isViewportWrapping===Je.isViewportWrapping,It=Y.lineHeight,St=Y.typicalHalfwidthCharacterWidth,kt=Y.scrollBeyondLastLine,qe=Y.minimap.renderCharacters;let vt=Ge>=2?Math.round(Y.minimap.scale*2):Y.minimap.scale;const Nt=Y.minimap.maxColumn,nt=Y.minimap.size,ut=Y.minimap.side,At=Y.verticalScrollbarWidth,Tt=Y.viewLineCount,bt=Y.remainingWidth,dt=Y.isViewportWrapping,Rt=qe?2:3;let Lt=Math.floor(Ge*We);const Ft=Lt/Ge;let Ue=!1,he=!1,pe=Rt*vt,oe=vt/Ge,q=1;if(nt==="fill"||nt==="fit"){const{typicalViewportLineCount:Et,extraLinesBeyondLastLine:rt,desiredRatio:at,minimapLineCount:ot}=ae.computeContainedMinimapLineCount({viewLineCount:Tt,scrollBeyondLastLine:kt,height:We,lineHeight:It,pixelRatio:Ge});if(Tt/ot>1)Ue=!0,he=!0,vt=1,pe=1,oe=vt/Ge;else{let mt=!1,Dt=vt+1;if(nt==="fit"){const Ut=Math.ceil((Tt+rt)*pe);dt&&ft&&bt<=le.stableFitRemainingWidth?(mt=!0,Dt=le.stableFitMaxMinimapScale):mt=Ut>Lt}if(nt==="fill"||mt){Ue=!0;const Ut=vt;pe=Math.min(It*Ge,Math.max(1,Math.floor(1/at))),dt&&ft&&bt<=le.stableFitRemainingWidth&&(Dt=le.stableFitMaxMinimapScale),vt=Math.min(Dt,Math.max(1,Math.floor(pe/Rt))),vt>Ut&&(q=Math.min(2,vt/Ut)),oe=vt/Ge/q,Lt=Math.ceil(Math.max(Et,Tt+rt)*pe),dt?(le.stableMinimapLayoutInput=Y,le.stableFitRemainingWidth=bt,le.stableFitMaxMinimapScale=vt):(le.stableMinimapLayoutInput=null,le.stableFitRemainingWidth=0)}}}const _e=Math.floor(Nt*oe),Ce=Math.min(_e,Math.max(0,Math.floor((bt-At-2)*oe/(St+oe)))+e.MINIMAP_GUTTER_WIDTH);let $e=Math.floor(Ge*Ce);const Ve=$e/Ge;$e=Math.floor($e*q);const lt=qe?1:2,gt=ut==="left"?0:Oe-Ce-At;return{renderMinimap:lt,minimapLeft:gt,minimapWidth:Ce,minimapHeightIsEditorHeight:Ue,minimapIsSampling:he,minimapScale:vt,minimapLineHeight:pe,minimapCanvasInnerWidth:$e,minimapCanvasInnerHeight:Lt,minimapCanvasOuterWidth:Ve,minimapCanvasOuterHeight:Ft}}static computeLayout(Y,le){const Oe=le.outerWidth|0,We=le.outerHeight|0,Ge=le.lineHeight|0,Je=le.lineNumbersDigitCount|0,ft=le.typicalHalfwidthCharacterWidth,It=le.maxDigitWidth,St=le.pixelRatio,kt=le.viewLineCount,qe=Y.get(123),vt=qe==="inherit"?Y.get(122):qe,Nt=vt==="inherit"?Y.get(118):vt,nt=Y.get(121),ut=Y.get(2),At=le.isDominatedByLongLines,Tt=Y.get(50),bt=Y.get(60).renderType!==0,dt=Y.get(61),Rt=Y.get(94),Lt=Y.get(65),Ft=Y.get(92),Ue=Ft.verticalScrollbarSize,he=Ft.verticalHasArrows,pe=Ft.arrowSize,oe=Ft.horizontalScrollbarSize,q=Y.get(58),_e=Y.get(37);let Ce;if(typeof q=="string"&&/^\d+(\.\d+)?ch$/.test(q)){const Wt=parseFloat(q.substr(0,q.length-2));Ce=d.clampedInt(Wt*ft,0,0,1e3)}else Ce=d.clampedInt(q,0,0,1e3);_e&&(Ce+=16);let $e=0;if(bt){const Wt=Math.max(Je,dt);$e=Math.round(Wt*It)}let Ve=0;Tt&&(Ve=Ge);let lt=0,gt=lt+Ve,Et=gt+$e,rt=Et+Ce;const at=Oe-Ve-$e-Ce;let ot=!1,Mt=!1,mt=-1;ut!==2&&(vt==="inherit"&&At?(ot=!0,Mt=!0):Nt==="on"||Nt==="bounded"?Mt=!0:Nt==="wordWrapColumn"&&(mt=nt));const Dt=ae._computeMinimapLayout({outerWidth:Oe,outerHeight:We,lineHeight:Ge,typicalHalfwidthCharacterWidth:ft,pixelRatio:St,scrollBeyondLastLine:Rt,minimap:Lt,verticalScrollbarWidth:Ue,viewLineCount:kt,remainingWidth:at,isViewportWrapping:Mt},le.memory||new L);Dt.renderMinimap!==0&&Dt.minimapLeft===0&&(lt+=Dt.minimapWidth,gt+=Dt.minimapWidth,Et+=Dt.minimapWidth,rt+=Dt.minimapWidth);const Ut=at-Dt.minimapWidth,wt=Math.max(1,Math.floor((Ut-Ue-2)/ft)),Bt=he?pe:0;return Mt&&(mt=Math.max(1,wt),Nt==="bounded"&&(mt=Math.min(mt,nt))),{width:Oe,height:We,glyphMarginLeft:lt,glyphMarginWidth:Ve,lineNumbersLeft:gt,lineNumbersWidth:$e,decorationsLeft:Et,decorationsWidth:Ce,contentLeft:rt,contentWidth:Ut,minimap:Dt,viewportColumn:wt,isWordWrapMinified:ot,isViewportWrapping:Mt,wrappingColumn:mt,verticalScrollbarWidth:Ue,horizontalScrollbarHeight:oe,overviewRuler:{top:Bt,width:Ue,height:We-2*Bt,right:0}}}}e.EditorLayoutInfoComputer=ae;class ee extends v{constructor(){const Y={enabled:!0};super(57,"lightbulb",Y,{"editor.lightbulb.enabled":{type:"boolean",default:Y.enabled,description:o.localize(43,null)}})}validate(Y){return!Y||typeof Y!="object"?this.defaultValue:{enabled:f(Y.enabled,this.defaultValue.enabled)}}}class ce extends v{constructor(){const Y={enabled:!0,fontSize:0,fontFamily:""};super(127,"inlayHints",Y,{"editor.inlayHints.enabled":{type:"boolean",default:Y.enabled,description:o.localize(44,null)},"editor.inlayHints.fontSize":{type:"number",default:Y.fontSize,markdownDescription:o.localize(45,null)},"editor.inlayHints.fontFamily":{type:"string",default:Y.fontFamily,markdownDescription:o.localize(46,null)}})}validate(Y){if(!Y||typeof Y!="object")return this.defaultValue;const le=Y;return{enabled:f(le.enabled,this.defaultValue.enabled),fontSize:d.clampedInt(le.fontSize,this.defaultValue.fontSize,0,100),fontFamily:b.string(le.fontFamily,this.defaultValue.fontFamily)}}}class de extends g{constructor(){super(59,"lineHeight",e.EDITOR_FONT_DEFAULTS.lineHeight,Y=>g.clamp(Y,0,150),{markdownDescription:o.localize(47,null)})}compute(Y,le,Oe){return Y.fontInfo.lineHeight}}class Se extends v{constructor(){const Y={enabled:!0,size:"proportional",side:"right",showSlider:"mouseover",renderCharacters:!0,maxColumn:120,scale:1};super(65,"minimap",Y,{"editor.minimap.enabled":{type:"boolean",default:Y.enabled,description:o.localize(48,null)},"editor.minimap.size":{type:"string",enum:["proportional","fill","fit"],enumDescriptions:[o.localize(49,null),o.localize(50,null),o.localize(51,null)],default:Y.size,description:o.localize(52,null)},"editor.minimap.side":{type:"string",enum:["left","right"],default:Y.side,description:o.localize(53,null)},"editor.minimap.showSlider":{type:"string",enum:["always","mouseover"],default:Y.showSlider,description:o.localize(54,null)},"editor.minimap.scale":{type:"number",default:Y.scale,minimum:1,maximum:3,enum:[1,2,3],description:o.localize(55,null)},"editor.minimap.renderCharacters":{type:"boolean",default:Y.renderCharacters,description:o.localize(56,null)},"editor.minimap.maxColumn":{type:"number",default:Y.maxColumn,description:o.localize(57,null)}})}validate(Y){if(!Y||typeof Y!="object")return this.defaultValue;const le=Y;return{enabled:f(le.enabled,this.defaultValue.enabled),size:l(le.size,this.defaultValue.size,["proportional","fill","fit"]),side:l(le.side,this.defaultValue.side,["right","left"]),showSlider:l(le.showSlider,this.defaultValue.showSlider,["always","mouseover"]),renderCharacters:f(le.renderCharacters,this.defaultValue.renderCharacters),scale:d.clampedInt(le.scale,1,1,3),maxColumn:d.clampedInt(le.maxColumn,this.defaultValue.maxColumn,1,1e4)}}}function fe(G){return G==="ctrlCmd"?k.isMacintosh?"metaKey":"ctrlKey":"altKey"}class ne extends v{constructor(){super(75,"padding",{top:0,bottom:0},{"editor.padding.top":{type:"number",default:0,minimum:0,maximum:1e3,description:o.localize(58,null)},"editor.padding.bottom":{type:"number",default:0,minimum:0,maximum:1e3,description:o.localize(59,null)}})}validate(Y){if(!Y||typeof Y!="object")return this.defaultValue;const le=Y;return{top:d.clampedInt(le.top,0,0,1e3),bottom:d.clampedInt(le.bottom,0,0,1e3)}}}class me extends v{constructor(){const Y={enabled:!0,cycle:!1};super(76,"parameterHints",Y,{"editor.parameterHints.enabled":{type:"boolean",default:Y.enabled,description:o.localize(60,null)},"editor.parameterHints.cycle":{type:"boolean",default:Y.cycle,description:o.localize(61,null)}})}validate(Y){if(!Y||typeof Y!="object")return this.defaultValue;const le=Y;return{enabled:f(le.enabled,this.defaultValue.enabled),cycle:f(le.cycle,this.defaultValue.cycle)}}}class ke extends s{constructor(){super(129)}compute(Y,le,Oe){return Y.pixelRatio}}class Ae extends v{constructor(){const Y={other:!0,comments:!1,strings:!1};super(79,"quickSuggestions",Y,{anyOf:[{type:"boolean"},{type:"object",properties:{strings:{type:"boolean",default:Y.strings,description:o.localize(62,null)},comments:{type:"boolean",default:Y.comments,description:o.localize(63,null)},other:{type:"boolean",default:Y.other,description:o.localize(64,null)}}}],default:Y,description:o.localize(65,null)});this.defaultValue=Y}validate(Y){if(typeof Y=="boolean")return Y;if(Y&&typeof Y=="object"){const le=Y,Oe={other:f(le.other,this.defaultValue.other),comments:f(le.comments,this.defaultValue.comments),strings:f(le.strings,this.defaultValue.strings)};return Oe.other&&Oe.comments&&Oe.strings?!0:!Oe.other&&!Oe.comments&&!Oe.strings?!1:Oe}return this.defaultValue}}var Be;(function(G){G[G.Off=0]="Off",G[G.On=1]="On",G[G.Relative=2]="Relative",G[G.Interval=3]="Interval",G[G.Custom=4]="Custom"})(Be=e.RenderLineNumbersType||(e.RenderLineNumbersType={}));class Xe extends v{constructor(){super(60,"lineNumbers",{renderType:1,renderFn:null},{type:"string",enum:["off","on","relative","interval"],enumDescriptions:[o.localize(66,null),o.localize(67,null),o.localize(68,null),o.localize(69,null)],default:"on",description:o.localize(70,null)})}validate(Y){let le=this.defaultValue.renderType,Oe=this.defaultValue.renderFn;return typeof Y!="undefined"&&(typeof Y=="function"?(le=4,Oe=Y):Y==="interval"?le=3:Y==="relative"?le=2:Y==="on"?le=1:le=0),{renderType:le,renderFn:Oe}}}function ge(G){const Y=G.get(87);return Y==="editable"?G.get(81):Y!=="on"}e.filterValidationDecorations=ge;class ue extends v{constructor(){const Y=[],le={type:"number",description:o.localize(71,null)};super(91,"rulers",Y,{type:"array",items:{anyOf:[le,{type:["object"],properties:{column:le,color:{type:"string",description:o.localize(72,null),format:"color-hex"}}}]},default:Y,description:o.localize(73,null)})}validate(Y){if(Array.isArray(Y)){const le=[];for(let Oe of Y)if(typeof Oe=="number")le.push({column:d.clampedInt(Oe,0,0,1e4),color:null});else if(Oe&&typeof Oe=="object"){const We=Oe;le.push({column:d.clampedInt(We.column,0,0,1e4),color:We.color})}return le.sort((Oe,We)=>Oe.column-We.column),le}return this.defaultValue}}function N(G,Y){if(typeof G!="string")return Y;switch(G){case"hidden":return 2;case"visible":return 3;default:return 1}}class F extends v{constructor(){const Y={vertical:1,horizontal:1,arrowSize:11,useShadows:!0,verticalHasArrows:!1,horizontalHasArrows:!1,horizontalScrollbarSize:12,horizontalSliderSize:12,verticalScrollbarSize:14,verticalSliderSize:14,handleMouseWheel:!0,alwaysConsumeMouseWheel:!0,scrollByPage:!1};super(92,"scrollbar",Y,{"editor.scrollbar.vertical":{type:"string",enum:["auto","visible","hidden"],enumDescriptions:[o.localize(74,null),o.localize(75,null),o.localize(76,null)],default:"auto",description:o.localize(77,null)},"editor.scrollbar.horizontal":{type:"string",enum:["auto","visible","hidden"],enumDescriptions:[o.localize(78,null),o.localize(79,null),o.localize(80,null)],default:"auto",description:o.localize(81,null)},"editor.scrollbar.verticalScrollbarSize":{type:"number",default:Y.verticalScrollbarSize,description:o.localize(82,null)},"editor.scrollbar.horizontalScrollbarSize":{type:"number",default:Y.horizontalScrollbarSize,description:o.localize(83,null)},"editor.scrollbar.scrollByPage":{type:"boolean",default:Y.scrollByPage,description:o.localize(84,null)}})}validate(Y){if(!Y||typeof Y!="object")return this.defaultValue;const le=Y,Oe=d.clampedInt(le.horizontalScrollbarSize,this.defaultValue.horizontalScrollbarSize,0,1e3),We=d.clampedInt(le.verticalScrollbarSize,this.defaultValue.verticalScrollbarSize,0,1e3);return{arrowSize:d.clampedInt(le.arrowSize,this.defaultValue.arrowSize,0,1e3),vertical:N(le.vertical,this.defaultValue.vertical),horizontal:N(le.horizontal,this.defaultValue.horizontal),useShadows:f(le.useShadows,this.defaultValue.useShadows),verticalHasArrows:f(le.verticalHasArrows,this.defaultValue.verticalHasArrows),horizontalHasArrows:f(le.horizontalHasArrows,this.defaultValue.horizontalHasArrows),handleMouseWheel:f(le.handleMouseWheel,this.defaultValue.handleMouseWheel),alwaysConsumeMouseWheel:f(le.alwaysConsumeMouseWheel,this.defaultValue.alwaysConsumeMouseWheel),horizontalScrollbarSize:Oe,horizontalSliderSize:d.clampedInt(le.horizontalSliderSize,Oe,0,1e3),verticalScrollbarSize:We,verticalSliderSize:d.clampedInt(le.verticalSliderSize,We,0,1e3),scrollByPage:f(le.scrollByPage,this.defaultValue.scrollByPage)}}}e.inUntrustedWorkspace="inUntrustedWorkspace",e.unicodeHighlightConfigKeys={allowedCharacters:"editor.unicodeHighlight.allowedCharacters",invisibleCharacters:"editor.unicodeHighlight.invisibleCharacters",nonBasicASCII:"editor.unicodeHighlight.nonBasicASCII",ambiguousCharacters:"editor.unicodeHighlight.ambiguousCharacters",includeComments:"editor.unicodeHighlight.includeComments",includeStrings:"editor.unicodeHighlight.includeStrings",allowedLocales:"editor.unicodeHighlight.allowedLocales"};class C extends v{constructor(){const Y={nonBasicASCII:e.inUntrustedWorkspace,invisibleCharacters:!0,ambiguousCharacters:!0,includeComments:e.inUntrustedWorkspace,includeStrings:!0,allowedCharacters:{},allowedLocales:{_os:!0,_vscode:!0}};super(113,"unicodeHighlight",Y,{[e.unicodeHighlightConfigKeys.nonBasicASCII]:{restricted:!0,type:["boolean","string"],enum:[!0,!1,e.inUntrustedWorkspace],default:Y.nonBasicASCII,description:o.localize(85,null)},[e.unicodeHighlightConfigKeys.invisibleCharacters]:{restricted:!0,type:"boolean",default:Y.invisibleCharacters,description:o.localize(86,null)},[e.unicodeHighlightConfigKeys.ambiguousCharacters]:{restricted:!0,type:"boolean",default:Y.ambiguousCharacters,description:o.localize(87,null)},[e.unicodeHighlightConfigKeys.includeComments]:{restricted:!0,type:["boolean","string"],enum:[!0,!1,e.inUntrustedWorkspace],default:Y.includeComments,description:o.localize(88,null)},[e.unicodeHighlightConfigKeys.includeStrings]:{restricted:!0,type:["boolean","string"],enum:[!0,!1,e.inUntrustedWorkspace],default:Y.includeStrings,description:o.localize(89,null)},[e.unicodeHighlightConfigKeys.allowedCharacters]:{restricted:!0,type:"object",default:Y.allowedCharacters,description:o.localize(90,null),additionalProperties:{type:"boolean"}},[e.unicodeHighlightConfigKeys.allowedLocales]:{restricted:!0,type:"object",additionalProperties:{type:"boolean"},default:Y.allowedLocales,description:o.localize(91,null)}})}applyUpdate(Y,le){let Oe=!1;le.allowedCharacters&&(S.equals(Y.allowedCharacters,le.allowedCharacters)||(Y={...Y,allowedCharacters:le.allowedCharacters},Oe=!0)),le.allowedLocales&&(S.equals(Y.allowedLocales,le.allowedLocales)||(Y={...Y,allowedLocales:le.allowedLocales},Oe=!0));const We=super.applyUpdate(Y,le);return Oe?new u(We.newValue,!0):We}validate(Y){if(!Y||typeof Y!="object")return this.defaultValue;const le=Y;return{nonBasicASCII:re(le.nonBasicASCII,e.inUntrustedWorkspace,[!0,!1,e.inUntrustedWorkspace]),invisibleCharacters:f(le.invisibleCharacters,this.defaultValue.invisibleCharacters),ambiguousCharacters:f(le.ambiguousCharacters,this.defaultValue.ambiguousCharacters),includeComments:re(le.includeComments,e.inUntrustedWorkspace,[!0,!1,e.inUntrustedWorkspace]),includeStrings:re(le.includeStrings,e.inUntrustedWorkspace,[!0,!1,e.inUntrustedWorkspace]),allowedCharacters:this.validateBooleanMap(Y.allowedCharacters,this.defaultValue.allowedCharacters),allowedLocales:this.validateBooleanMap(Y.allowedLocales,this.defaultValue.allowedLocales)}}validateBooleanMap(Y,le){if(typeof Y!="object"||!Y)return le;const Oe={};for(const[We,Ge]of Object.entries(Y))Ge===!0&&(Oe[We]=!0);return Oe}}class O extends v{constructor(){const Y={enabled:!0,mode:"subwordSmart"};super(55,"inlineSuggest",Y,{"editor.inlineSuggest.enabled":{type:"boolean",default:Y.enabled,description:o.localize(92,null)}})}validate(Y){if(!Y||typeof Y!="object")return this.defaultValue;const le=Y;return{enabled:f(le.enabled,this.defaultValue.enabled),mode:l(le.mode,this.defaultValue.mode,["prefix","subword","subwordSmart"])}}}class x extends v{constructor(){const Y={enabled:A.EDITOR_MODEL_DEFAULTS.bracketPairColorizationOptions.enabled};super(12,"bracketPairColorization",Y,{"editor.bracketPairColorization.enabled":{type:"boolean",default:Y.enabled,description:o.localize(93,null)}})}validate(Y){return!Y||typeof Y!="object"?this.defaultValue:{enabled:f(Y.enabled,this.defaultValue.enabled)}}}class X extends v{constructor(){const Y={bracketPairs:!1,bracketPairsHorizontal:"active",highlightActiveBracketPair:!0,indentation:!0,highlightActiveIndentation:!0};super(13,"guides",Y,{"editor.guides.bracketPairs":{type:["boolean","string"],enum:[!0,"active",!1],enumDescriptions:[o.localize(94,null),o.localize(95,null),o.localize(96,null)],default:Y.bracketPairs,description:o.localize(97,null)},"editor.guides.bracketPairsHorizontal":{type:["boolean","string"],enum:[!0,"active",!1],enumDescriptions:[o.localize(98,null),o.localize(99,null),o.localize(100,null)],default:Y.bracketPairsHorizontal,description:o.localize(101,null)},"editor.guides.highlightActiveBracketPair":{type:"boolean",default:Y.highlightActiveBracketPair,description:o.localize(102,null)},"editor.guides.indentation":{type:"boolean",default:Y.indentation,description:o.localize(103,null)},"editor.guides.highlightActiveIndentation":{type:"boolean",default:Y.highlightActiveIndentation,description:o.localize(104,null)}})}validate(Y){if(!Y||typeof Y!="object")return this.defaultValue;const le=Y;return{bracketPairs:re(le.bracketPairs,this.defaultValue.bracketPairs,[!0,!1,"active"]),bracketPairsHorizontal:re(le.bracketPairsHorizontal,this.defaultValue.bracketPairsHorizontal,[!0,!1,"active"]),highlightActiveBracketPair:f(le.highlightActiveBracketPair,this.defaultValue.highlightActiveBracketPair),indentation:f(le.indentation,this.defaultValue.indentation),highlightActiveIndentation:f(le.highlightActiveIndentation,this.defaultValue.highlightActiveIndentation)}}}function re(G,Y,le){const Oe=le.indexOf(G);return Oe===-1?Y:le[Oe]}class ve extends v{constructor(){const Y={insertMode:"insert",filterGraceful:!0,snippetsPreventQuickSuggestions:!0,localityBonus:!1,shareSuggestSelections:!1,showIcons:!0,showStatusBar:!1,preview:!1,previewMode:"subwordSmart",showInlineDetails:!0,showMethods:!0,showFunctions:!0,showConstructors:!0,showDeprecated:!0,showFields:!0,showVariables:!0,showClasses:!0,showStructs:!0,showInterfaces:!0,showModules:!0,showProperties:!0,showEvents:!0,showOperators:!0,showUnits:!0,showValues:!0,showConstants:!0,showEnums:!0,showEnumMembers:!0,showKeywords:!0,showWords:!0,showColors:!0,showFiles:!0,showReferences:!0,showFolders:!0,showTypeParameters:!0,showSnippets:!0,showUsers:!0,showIssues:!0};super(106,"suggest",Y,{"editor.suggest.insertMode":{type:"string",enum:["insert","replace"],enumDescriptions:[o.localize(105,null),o.localize(106,null)],default:Y.insertMode,description:o.localize(107,null)},"editor.suggest.filterGraceful":{type:"boolean",default:Y.filterGraceful,description:o.localize(108,null)},"editor.suggest.localityBonus":{type:"boolean",default:Y.localityBonus,description:o.localize(109,null)},"editor.suggest.shareSuggestSelections":{type:"boolean",default:Y.shareSuggestSelections,markdownDescription:o.localize(110,null)},"editor.suggest.snippetsPreventQuickSuggestions":{type:"boolean",default:Y.snippetsPreventQuickSuggestions,description:o.localize(111,null)},"editor.suggest.showIcons":{type:"boolean",default:Y.showIcons,description:o.localize(112,null)},"editor.suggest.showStatusBar":{type:"boolean",default:Y.showStatusBar,description:o.localize(113,null)},"editor.suggest.preview":{type:"boolean",default:Y.preview,description:o.localize(114,null)},"editor.suggest.showInlineDetails":{type:"boolean",default:Y.showInlineDetails,description:o.localize(115,null)},"editor.suggest.maxVisibleSuggestions":{type:"number",deprecationMessage:o.localize(116,null)},"editor.suggest.filteredTypes":{type:"object",deprecationMessage:o.localize(117,null)},"editor.suggest.showMethods":{type:"boolean",default:!0,markdownDescription:o.localize(118,null)},"editor.suggest.showFunctions":{type:"boolean",default:!0,markdownDescription:o.localize(119,null)},"editor.suggest.showConstructors":{type:"boolean",default:!0,markdownDescription:o.localize(120,null)},"editor.suggest.showDeprecated":{type:"boolean",default:!0,markdownDescription:o.localize(121,null)},"editor.suggest.showFields":{type:"boolean",default:!0,markdownDescription:o.localize(122,null)},"editor.suggest.showVariables":{type:"boolean",default:!0,markdownDescription:o.localize(123,null)},"editor.suggest.showClasses":{type:"boolean",default:!0,markdownDescription:o.localize(124,null)},"editor.suggest.showStructs":{type:"boolean",default:!0,markdownDescription:o.localize(125,null)},"editor.suggest.showInterfaces":{type:"boolean",default:!0,markdownDescription:o.localize(126,null)},"editor.suggest.showModules":{type:"boolean",default:!0,markdownDescription:o.localize(127,null)},"editor.suggest.showProperties":{type:"boolean",default:!0,markdownDescription:o.localize(128,null)},"editor.suggest.showEvents":{type:"boolean",default:!0,markdownDescription:o.localize(129,null)},"editor.suggest.showOperators":{type:"boolean",default:!0,markdownDescription:o.localize(130,null)},"editor.suggest.showUnits":{type:"boolean",default:!0,markdownDescription:o.localize(131,null)},"editor.suggest.showValues":{type:"boolean",default:!0,markdownDescription:o.localize(132,null)},"editor.suggest.showConstants":{type:"boolean",default:!0,markdownDescription:o.localize(133,null)},"editor.suggest.showEnums":{type:"boolean",default:!0,markdownDescription:o.localize(134,null)},"editor.suggest.showEnumMembers":{type:"boolean",default:!0,markdownDescription:o.localize(135,null)},"editor.suggest.showKeywords":{type:"boolean",default:!0,markdownDescription:o.localize(136,null)},"editor.suggest.showWords":{type:"boolean",default:!0,markdownDescription:o.localize(137,null)},"editor.suggest.showColors":{type:"boolean",default:!0,markdownDescription:o.localize(138,null)},"editor.suggest.showFiles":{type:"boolean",default:!0,markdownDescription:o.localize(139,null)},"editor.suggest.showReferences":{type:"boolean",default:!0,markdownDescription:o.localize(140,null)},"editor.suggest.showCustomcolors":{type:"boolean",default:!0,markdownDescription:o.localize(141,null)},"editor.suggest.showFolders":{type:"boolean",default:!0,markdownDescription:o.localize(142,null)},"editor.suggest.showTypeParameters":{type:"boolean",default:!0,markdownDescription:o.localize(143,null)},"editor.suggest.showSnippets":{type:"boolean",default:!0,markdownDescription:o.localize(144,null)},"editor.suggest.showUsers":{type:"boolean",default:!0,markdownDescription:o.localize(145,null)},"editor.suggest.showIssues":{type:"boolean",default:!0,markdownDescription:o.localize(146,null)}})}validate(Y){if(!Y||typeof Y!="object")return this.defaultValue;const le=Y;return{insertMode:l(le.insertMode,this.defaultValue.insertMode,["insert","replace"]),filterGraceful:f(le.filterGraceful,this.defaultValue.filterGraceful),snippetsPreventQuickSuggestions:f(le.snippetsPreventQuickSuggestions,this.defaultValue.filterGraceful),localityBonus:f(le.localityBonus,this.defaultValue.localityBonus),shareSuggestSelections:f(le.shareSuggestSelections,this.defaultValue.shareSuggestSelections),showIcons:f(le.showIcons,this.defaultValue.showIcons),showStatusBar:f(le.showStatusBar,this.defaultValue.showStatusBar),preview:f(le.preview,this.defaultValue.preview),previewMode:l(le.previewMode,this.defaultValue.previewMode,["prefix","subword","subwordSmart"]),showInlineDetails:f(le.showInlineDetails,this.defaultValue.showInlineDetails),showMethods:f(le.showMethods,this.defaultValue.showMethods),showFunctions:f(le.showFunctions,this.defaultValue.showFunctions),showConstructors:f(le.showConstructors,this.defaultValue.showConstructors),showDeprecated:f(le.showDeprecated,this.defaultValue.showDeprecated),showFields:f(le.showFields,this.defaultValue.showFields),showVariables:f(le.showVariables,this.defaultValue.showVariables),showClasses:f(le.showClasses,this.defaultValue.showClasses),showStructs:f(le.showStructs,this.defaultValue.showStructs),showInterfaces:f(le.showInterfaces,this.defaultValue.showInterfaces),showModules:f(le.showModules,this.defaultValue.showModules),showProperties:f(le.showProperties,this.defaultValue.showProperties),showEvents:f(le.showEvents,this.defaultValue.showEvents),showOperators:f(le.showOperators,this.defaultValue.showOperators),showUnits:f(le.showUnits,this.defaultValue.showUnits),showValues:f(le.showValues,this.defaultValue.showValues),showConstants:f(le.showConstants,this.defaultValue.showConstants),showEnums:f(le.showEnums,this.defaultValue.showEnums),showEnumMembers:f(le.showEnumMembers,this.defaultValue.showEnumMembers),showKeywords:f(le.showKeywords,this.defaultValue.showKeywords),showWords:f(le.showWords,this.defaultValue.showWords),showColors:f(le.showColors,this.defaultValue.showColors),showFiles:f(le.showFiles,this.defaultValue.showFiles),showReferences:f(le.showReferences,this.defaultValue.showReferences),showFolders:f(le.showFolders,this.defaultValue.showFolders),showTypeParameters:f(le.showTypeParameters,this.defaultValue.showTypeParameters),showSnippets:f(le.showSnippets,this.defaultValue.showSnippets),showUsers:f(le.showUsers,this.defaultValue.showUsers),showIssues:f(le.showIssues,this.defaultValue.showIssues)}}}class Ie extends v{constructor(){super(102,"smartSelect",{selectLeadingAndTrailingWhitespace:!0},{"editor.smartSelect.selectLeadingAndTrailingWhitespace":{description:o.localize(147,null),default:!0,type:"boolean"}})}validate(Y){return!Y||typeof Y!="object"?this.defaultValue:{selectLeadingAndTrailingWhitespace:f(Y.selectLeadingAndTrailingWhitespace,this.defaultValue.selectLeadingAndTrailingWhitespace)}}}class Me extends s{constructor(){super(130)}compute(Y,le,Oe){return le.get(81)?!0:Y.tabFocusMode}}var Le;(function(G){G[G.None=0]="None",G[G.Same=1]="Same",G[G.Indent=2]="Indent",G[G.DeepIndent=3]="DeepIndent"})(Le=e.WrappingIndent||(e.WrappingIndent={}));function ze(G){switch(G){case"none":return 0;case"same":return 1;case"indent":return 2;case"deepIndent":return 3}}class xe extends s{constructor(){super(132)}compute(Y,le,Oe){const We=le.get(131);return{isDominatedByLongLines:Y.isDominatedByLongLines,isWordWrapMinified:We.isWordWrapMinified,isViewportWrapping:We.isViewportWrapping,wrappingColumn:We.wrappingColumn}}}const Re="Consolas, 'Courier New', monospace",Qe="Menlo, Monaco, 'Courier New', monospace",tt="'Droid Sans Mono', 'monospace', monospace";e.EDITOR_FONT_DEFAULTS={fontFamily:k.isMacintosh?Qe:k.isLinux?tt:Re,fontWeight:"normal",fontSize:k.isMacintosh?12:14,lineHeight:0,letterSpacing:0},e.editorOptionsRegistry=[];function Te(G){return e.editorOptionsRegistry[G.id]=G,G}var it;(function(G){G[G.acceptSuggestionOnCommitCharacter=0]="acceptSuggestionOnCommitCharacter",G[G.acceptSuggestionOnEnter=1]="acceptSuggestionOnEnter",G[G.accessibilitySupport=2]="accessibilitySupport",G[G.accessibilityPageSize=3]="accessibilityPageSize",G[G.ariaLabel=4]="ariaLabel",G[G.autoClosingBrackets=5]="autoClosingBrackets",G[G.autoClosingDelete=6]="autoClosingDelete",G[G.autoClosingOvertype=7]="autoClosingOvertype",G[G.autoClosingQuotes=8]="autoClosingQuotes",G[G.autoIndent=9]="autoIndent",G[G.automaticLayout=10]="automaticLayout",G[G.autoSurround=11]="autoSurround",G[G.bracketPairColorization=12]="bracketPairColorization",G[G.guides=13]="guides",G[G.codeLens=14]="codeLens",G[G.codeLensFontFamily=15]="codeLensFontFamily",G[G.codeLensFontSize=16]="codeLensFontSize",G[G.colorDecorators=17]="colorDecorators",G[G.columnSelection=18]="columnSelection",G[G.comments=19]="comments",G[G.contextmenu=20]="contextmenu",G[G.copyWithSyntaxHighlighting=21]="copyWithSyntaxHighlighting",G[G.cursorBlinking=22]="cursorBlinking",G[G.cursorSmoothCaretAnimation=23]="cursorSmoothCaretAnimation",G[G.cursorStyle=24]="cursorStyle",G[G.cursorSurroundingLines=25]="cursorSurroundingLines",G[G.cursorSurroundingLinesStyle=26]="cursorSurroundingLinesStyle",G[G.cursorWidth=27]="cursorWidth",G[G.disableLayerHinting=28]="disableLayerHinting",G[G.disableMonospaceOptimizations=29]="disableMonospaceOptimizations",G[G.domReadOnly=30]="domReadOnly",G[G.dragAndDrop=31]="dragAndDrop",G[G.emptySelectionClipboard=32]="emptySelectionClipboard",G[G.extraEditorClassName=33]="extraEditorClassName",G[G.fastScrollSensitivity=34]="fastScrollSensitivity",G[G.find=35]="find",G[G.fixedOverflowWidgets=36]="fixedOverflowWidgets",G[G.folding=37]="folding",G[G.foldingStrategy=38]="foldingStrategy",G[G.foldingHighlight=39]="foldingHighlight",G[G.foldingImportsByDefault=40]="foldingImportsByDefault",G[G.foldingMaximumRegions=41]="foldingMaximumRegions",G[G.unfoldOnClickAfterEndOfLine=42]="unfoldOnClickAfterEndOfLine",G[G.fontFamily=43]="fontFamily",G[G.fontInfo=44]="fontInfo",G[G.fontLigatures=45]="fontLigatures",G[G.fontSize=46]="fontSize",G[G.fontWeight=47]="fontWeight",G[G.formatOnPaste=48]="formatOnPaste",G[G.formatOnType=49]="formatOnType",G[G.glyphMargin=50]="glyphMargin",G[G.gotoLocation=51]="gotoLocation",G[G.hideCursorInOverviewRuler=52]="hideCursorInOverviewRuler",G[G.hover=53]="hover",G[G.inDiffEditor=54]="inDiffEditor",G[G.inlineSuggest=55]="inlineSuggest",G[G.letterSpacing=56]="letterSpacing",G[G.lightbulb=57]="lightbulb",G[G.lineDecorationsWidth=58]="lineDecorationsWidth",G[G.lineHeight=59]="lineHeight",G[G.lineNumbers=60]="lineNumbers",G[G.lineNumbersMinChars=61]="lineNumbersMinChars",G[G.linkedEditing=62]="linkedEditing",G[G.links=63]="links",G[G.matchBrackets=64]="matchBrackets",G[G.minimap=65]="minimap",G[G.mouseStyle=66]="mouseStyle",G[G.mouseWheelScrollSensitivity=67]="mouseWheelScrollSensitivity",G[G.mouseWheelZoom=68]="mouseWheelZoom",G[G.multiCursorMergeOverlapping=69]="multiCursorMergeOverlapping",G[G.multiCursorModifier=70]="multiCursorModifier",G[G.multiCursorPaste=71]="multiCursorPaste",G[G.occurrencesHighlight=72]="occurrencesHighlight",G[G.overviewRulerBorder=73]="overviewRulerBorder",G[G.overviewRulerLanes=74]="overviewRulerLanes",G[G.padding=75]="padding",G[G.parameterHints=76]="parameterHints",G[G.peekWidgetDefaultFocus=77]="peekWidgetDefaultFocus",G[G.definitionLinkOpensInPeek=78]="definitionLinkOpensInPeek",G[G.quickSuggestions=79]="quickSuggestions",G[G.quickSuggestionsDelay=80]="quickSuggestionsDelay",G[G.readOnly=81]="readOnly",G[G.renameOnType=82]="renameOnType",G[G.renderControlCharacters=83]="renderControlCharacters",G[G.renderFinalNewline=84]="renderFinalNewline",G[G.renderLineHighlight=85]="renderLineHighlight",G[G.renderLineHighlightOnlyWhenFocus=86]="renderLineHighlightOnlyWhenFocus",G[G.renderValidationDecorations=87]="renderValidationDecorations",G[G.renderWhitespace=88]="renderWhitespace",G[G.revealHorizontalRightPadding=89]="revealHorizontalRightPadding",G[G.roundedSelection=90]="roundedSelection",G[G.rulers=91]="rulers",G[G.scrollbar=92]="scrollbar",G[G.scrollBeyondLastColumn=93]="scrollBeyondLastColumn",G[G.scrollBeyondLastLine=94]="scrollBeyondLastLine",G[G.scrollPredominantAxis=95]="scrollPredominantAxis",G[G.selectionClipboard=96]="selectionClipboard",G[G.selectionHighlight=97]="selectionHighlight",G[G.selectOnLineNumbers=98]="selectOnLineNumbers",G[G.showFoldingControls=99]="showFoldingControls",G[G.showUnused=100]="showUnused",G[G.snippetSuggestions=101]="snippetSuggestions",G[G.smartSelect=102]="smartSelect",G[G.smoothScrolling=103]="smoothScrolling",G[G.stickyTabStops=104]="stickyTabStops",G[G.stopRenderingLineAfter=105]="stopRenderingLineAfter",G[G.suggest=106]="suggest",G[G.suggestFontSize=107]="suggestFontSize",G[G.suggestLineHeight=108]="suggestLineHeight",G[G.suggestOnTriggerCharacters=109]="suggestOnTriggerCharacters",G[G.suggestSelection=110]="suggestSelection",G[G.tabCompletion=111]="tabCompletion",G[G.tabIndex=112]="tabIndex",G[G.unicodeHighlighting=113]="unicodeHighlighting",G[G.unusualLineTerminators=114]="unusualLineTerminators",G[G.useShadowDOM=115]="useShadowDOM",G[G.useTabStops=116]="useTabStops",G[G.wordSeparators=117]="wordSeparators",G[G.wordWrap=118]="wordWrap",G[G.wordWrapBreakAfterCharacters=119]="wordWrapBreakAfterCharacters",G[G.wordWrapBreakBeforeCharacters=120]="wordWrapBreakBeforeCharacters",G[G.wordWrapColumn=121]="wordWrapColumn",G[G.wordWrapOverride1=122]="wordWrapOverride1",G[G.wordWrapOverride2=123]="wordWrapOverride2",G[G.wrappingIndent=124]="wrappingIndent",G[G.wrappingStrategy=125]="wrappingStrategy",G[G.showDeprecated=126]="showDeprecated",G[G.inlayHints=127]="inlayHints",G[G.editorClassName=128]="editorClassName",G[G.pixelRatio=129]="pixelRatio",G[G.tabFocusMode=130]="tabFocusMode",G[G.layoutInfo=131]="layoutInfo",G[G.wrappingInfo=132]="wrappingInfo"})(it=e.EditorOption||(e.EditorOption={})),e.EditorOptions={acceptSuggestionOnCommitCharacter:Te(new D(0,"acceptSuggestionOnCommitCharacter",!0,{markdownDescription:o.localize(148,null)})),acceptSuggestionOnEnter:Te(new I(1,"acceptSuggestionOnEnter","on",["on","smart","off"],{markdownEnumDescriptions:["",o.localize(149,null),""],markdownDescription:o.localize(150,null)})),accessibilitySupport:Te(new c),accessibilityPageSize:Te(new d(3,"accessibilityPageSize",10,1,1073741824,{description:o.localize(151,null)})),ariaLabel:Te(new b(4,"ariaLabel",o.localize(152,null))),autoClosingBrackets:Te(new I(5,"autoClosingBrackets","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",o.localize(153,null),o.localize(154,null),""],description:o.localize(155,null)})),autoClosingDelete:Te(new I(6,"autoClosingDelete","auto",["always","auto","never"],{enumDescriptions:["",o.localize(156,null),""],description:o.localize(157,null)})),autoClosingOvertype:Te(new I(7,"autoClosingOvertype","auto",["always","auto","never"],{enumDescriptions:["",o.localize(158,null),""],description:o.localize(159,null)})),autoClosingQuotes:Te(new I(8,"autoClosingQuotes","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",o.localize(160,null),o.localize(161,null),""],description:o.localize(162,null)})),autoIndent:Te(new r(9,"autoIndent",4,"full",["none","keep","brackets","advanced","full"],i,{enumDescriptions:[o.localize(163,null),o.localize(164,null),o.localize(165,null),o.localize(166,null),o.localize(167,null)],description:o.localize(168,null)})),automaticLayout:Te(new D(10,"automaticLayout",!1)),autoSurround:Te(new I(11,"autoSurround","languageDefined",["languageDefined","quotes","brackets","never"],{enumDescriptions:[o.localize(169,null),o.localize(170,null),o.localize(171,null),""],description:o.localize(172,null)})),bracketPairColorization:Te(new x),bracketPairGuides:Te(new X),stickyTabStops:Te(new D(104,"stickyTabStops",!1,{description:o.localize(173,null)})),codeLens:Te(new D(14,"codeLens",!0,{description:o.localize(174,null)})),codeLensFontFamily:Te(new b(15,"codeLensFontFamily","",{description:o.localize(175,null)})),codeLensFontSize:Te(new d(16,"codeLensFontSize",0,0,100,{type:"number",default:0,minimum:0,maximum:100,markdownDescription:o.localize(176,null)})),colorDecorators:Te(new D(17,"colorDecorators",!0,{description:o.localize(177,null)})),columnSelection:Te(new D(18,"columnSelection",!1,{description:o.localize(178,null)})),comments:Te(new t),contextmenu:Te(new D(20,"contextmenu",!0)),copyWithSyntaxHighlighting:Te(new D(21,"copyWithSyntaxHighlighting",!0,{description:o.localize(179,null)})),cursorBlinking:Te(new r(22,"cursorBlinking",1,"blink",["blink","smooth","phase","expand","solid"],p,{description:o.localize(180,null)})),cursorSmoothCaretAnimation:Te(new D(23,"cursorSmoothCaretAnimation",!1,{description:o.localize(181,null)})),cursorStyle:Te(new r(24,"cursorStyle",h.Line,"line",["line","block","underline","line-thin","block-outline","underline-thin"],P,{description:o.localize(182,null)})),cursorSurroundingLines:Te(new d(25,"cursorSurroundingLines",0,0,1073741824,{description:o.localize(183,null)})),cursorSurroundingLinesStyle:Te(new I(26,"cursorSurroundingLinesStyle","default",["default","all"],{enumDescriptions:[o.localize(184,null),o.localize(185,null)],description:o.localize(186,null)})),cursorWidth:Te(new d(27,"cursorWidth",0,0,1073741824,{markdownDescription:o.localize(187,null)})),disableLayerHinting:Te(new D(28,"disableLayerHinting",!1)),disableMonospaceOptimizations:Te(new D(29,"disableMonospaceOptimizations",!1)),domReadOnly:Te(new D(30,"domReadOnly",!1)),dragAndDrop:Te(new D(31,"dragAndDrop",!0,{description:o.localize(188,null)})),emptySelectionClipboard:Te(new $),extraEditorClassName:Te(new b(33,"extraEditorClassName","")),fastScrollSensitivity:Te(new g(34,"fastScrollSensitivity",5,G=>G<=0?5:G,{markdownDescription:o.localize(189,null)})),find:Te(new E),fixedOverflowWidgets:Te(new D(36,"fixedOverflowWidgets",!1)),folding:Te(new D(37,"folding",!0,{description:o.localize(190,null)})),foldingStrategy:Te(new I(38,"foldingStrategy","auto",["auto","indentation"],{enumDescriptions:[o.localize(191,null),o.localize(192,null)],description:o.localize(193,null)})),foldingHighlight:Te(new D(39,"foldingHighlight",!0,{description:o.localize(194,null)})),foldingImportsByDefault:Te(new D(40,"foldingImportsByDefault",!1,{description:o.localize(195,null)})),foldingMaximumRegions:Te(new d(41,"foldingMaximumRegions",5e3,10,65e3,{description:o.localize(196,null)})),unfoldOnClickAfterEndOfLine:Te(new D(42,"unfoldOnClickAfterEndOfLine",!1,{description:o.localize(197,null)})),fontFamily:Te(new b(43,"fontFamily",e.EDITOR_FONT_DEFAULTS.fontFamily,{description:o.localize(198,null)})),fontInfo:Te(new V),fontLigatures2:Te(new z),fontSize:Te(new W),fontWeight:Te(new Q),formatOnPaste:Te(new D(48,"formatOnPaste",!1,{description:o.localize(199,null)})),formatOnType:Te(new D(49,"formatOnType",!1,{description:o.localize(200,null)})),glyphMargin:Te(new D(50,"glyphMargin",!0,{description:o.localize(201,null)})),gotoLocation:Te(new K),hideCursorInOverviewRuler:Te(new D(52,"hideCursorInOverviewRuler",!1,{description:o.localize(202,null)})),hover:Te(new H),inDiffEditor:Te(new D(54,"inDiffEditor",!1)),letterSpacing:Te(new g(56,"letterSpacing",e.EDITOR_FONT_DEFAULTS.letterSpacing,G=>g.clamp(G,-5,20),{description:o.localize(203,null)})),lightbulb:Te(new ee),lineDecorationsWidth:Te(new n(58,"lineDecorationsWidth",10)),lineHeight:Te(new de),lineNumbers:Te(new Xe),lineNumbersMinChars:Te(new d(61,"lineNumbersMinChars",5,1,300)),linkedEditing:Te(new D(62,"linkedEditing",!1,{description:o.localize(204,null)})),links:Te(new D(63,"links",!0,{description:o.localize(205,null)})),matchBrackets:Te(new I(64,"matchBrackets","always",["always","near","never"],{description:o.localize(206,null)})),minimap:Te(new Se),mouseStyle:Te(new I(66,"mouseStyle","text",["text","default","copy"])),mouseWheelScrollSensitivity:Te(new g(67,"mouseWheelScrollSensitivity",1,G=>G===0?1:G,{markdownDescription:o.localize(207,null)})),mouseWheelZoom:Te(new D(68,"mouseWheelZoom",!1,{markdownDescription:o.localize(208,null)})),multiCursorMergeOverlapping:Te(new D(69,"multiCursorMergeOverlapping",!0,{description:o.localize(209,null)})),multiCursorModifier:Te(new r(70,"multiCursorModifier","altKey","alt",["ctrlCmd","alt"],fe,{markdownEnumDescriptions:[o.localize(210,null),o.localize(211,null)],markdownDescription:o.localize(212,null)})),multiCursorPaste:Te(new I(71,"multiCursorPaste","spread",["spread","full"],{markdownEnumDescriptions:[o.localize(213,null),o.localize(214,null)],markdownDescription:o.localize(215,null)})),occurrencesHighlight:Te(new D(72,"occurrencesHighlight",!0,{description:o.localize(216,null)})),overviewRulerBorder:Te(new D(73,"overviewRulerBorder",!0,{description:o.localize(217,null)})),overviewRulerLanes:Te(new d(74,"overviewRulerLanes",3,0,3)),padding:Te(new ne),parameterHints:Te(new me),peekWidgetDefaultFocus:Te(new I(77,"peekWidgetDefaultFocus","tree",["tree","editor"],{enumDescriptions:[o.localize(218,null),o.localize(219,null)],description:o.localize(220,null)})),definitionLinkOpensInPeek:Te(new D(78,"definitionLinkOpensInPeek",!1,{description:o.localize(221,null)})),quickSuggestions:Te(new Ae),quickSuggestionsDelay:Te(new d(80,"quickSuggestionsDelay",10,0,1073741824,{description:o.localize(222,null)})),readOnly:Te(new D(81,"readOnly",!1)),renameOnType:Te(new D(82,"renameOnType",!1,{description:o.localize(223,null),markdownDeprecationMessage:o.localize(224,null)})),renderControlCharacters:Te(new D(83,"renderControlCharacters",!0,{description:o.localize(225,null),restricted:!0})),renderFinalNewline:Te(new D(84,"renderFinalNewline",!0,{description:o.localize(226,null)})),renderLineHighlight:Te(new I(85,"renderLineHighlight","line",["none","gutter","line","all"],{enumDescriptions:["","","",o.localize(227,null)],description:o.localize(228,null)})),renderLineHighlightOnlyWhenFocus:Te(new D(86,"renderLineHighlightOnlyWhenFocus",!1,{description:o.localize(229,null)})),renderValidationDecorations:Te(new I(87,"renderValidationDecorations","editable",["editable","on","off"])),renderWhitespace:Te(new I(88,"renderWhitespace","selection",["none","boundary","selection","trailing","all"],{enumDescriptions:["",o.localize(230,null),o.localize(231,null),o.localize(232,null),""],description:o.localize(233,null)})),revealHorizontalRightPadding:Te(new d(89,"revealHorizontalRightPadding",30,0,1e3)),roundedSelection:Te(new D(90,"roundedSelection",!0,{description:o.localize(234,null)})),rulers:Te(new ue),scrollbar:Te(new F),scrollBeyondLastColumn:Te(new d(93,"scrollBeyondLastColumn",5,0,1073741824,{description:o.localize(235,null)})),scrollBeyondLastLine:Te(new D(94,"scrollBeyondLastLine",!0,{description:o.localize(236,null)})),scrollPredominantAxis:Te(new D(95,"scrollPredominantAxis",!0,{description:o.localize(237,null)})),selectionClipboard:Te(new D(96,"selectionClipboard",!0,{description:o.localize(238,null),included:k.isLinux})),selectionHighlight:Te(new D(97,"selectionHighlight",!0,{description:o.localize(239,null)})),selectOnLineNumbers:Te(new D(98,"selectOnLineNumbers",!0)),showFoldingControls:Te(new I(99,"showFoldingControls","mouseover",["always","mouseover"],{enumDescriptions:[o.localize(240,null),o.localize(241,null)],description:o.localize(242,null)})),showUnused:Te(new D(100,"showUnused",!0,{description:o.localize(243,null)})),showDeprecated:Te(new D(126,"showDeprecated",!0,{description:o.localize(244,null)})),inlayHints:Te(new ce),snippetSuggestions:Te(new I(101,"snippetSuggestions","inline",["top","bottom","inline","none"],{enumDescriptions:[o.localize(245,null),o.localize(246,null),o.localize(247,null),o.localize(248,null)],description:o.localize(249,null)})),smartSelect:Te(new Ie),smoothScrolling:Te(new D(103,"smoothScrolling",!1,{description:o.localize(250,null)})),stopRenderingLineAfter:Te(new d(105,"stopRenderingLineAfter",1e4,-1,1073741824)),suggest:Te(new ve),inlineSuggest:Te(new O),suggestFontSize:Te(new d(107,"suggestFontSize",0,0,1e3,{markdownDescription:o.localize(251,null)})),suggestLineHeight:Te(new d(108,"suggestLineHeight",0,0,1e3,{markdownDescription:o.localize(252,null)})),suggestOnTriggerCharacters:Te(new D(109,"suggestOnTriggerCharacters",!0,{description:o.localize(253,null)})),suggestSelection:Te(new I(110,"suggestSelection","first",["first","recentlyUsed","recentlyUsedByPrefix"],{markdownEnumDescriptions:[o.localize(254,null),o.localize(255,null),o.localize(256,null)],description:o.localize(257,null)})),tabCompletion:Te(new I(111,"tabCompletion","off",["on","off","onlySnippets"],{enumDescriptions:[o.localize(258,null),o.localize(259,null),o.localize(260,null)],description:o.localize(261,null)})),tabIndex:Te(new d(112,"tabIndex",0,-1,1073741824)),unicodeHighlight:Te(new C),unusualLineTerminators:Te(new I(114,"unusualLineTerminators","prompt",["auto","off","prompt"],{enumDescriptions:[o.localize(262,null),o.localize(263,null),o.localize(264,null)],description:o.localize(265,null)})),useShadowDOM:Te(new D(115,"useShadowDOM",!0)),useTabStops:Te(new D(116,"useTabStops",!0,{description:o.localize(266,null)})),wordSeparators:Te(new b(117,"wordSeparators",w.USUAL_WORD_SEPARATORS,{description:o.localize(267,null)})),wordWrap:Te(new I(118,"wordWrap","off",["off","on","wordWrapColumn","bounded"],{markdownEnumDescriptions:[o.localize(268,null),o.localize(269,null),o.localize(270,null),o.localize(271,null)],description:o.localize(272,null)})),wordWrapBreakAfterCharacters:Te(new b(119,"wordWrapBreakAfterCharacters"," })]?|/&.,;\xA2\xB0\u2032\u2033\u2030\u2103\u3001\u3002\uFF61\uFF64\uFFE0\uFF0C\uFF0E\uFF1A\uFF1B\uFF1F\uFF01\uFF05\u30FB\uFF65\u309D\u309E\u30FD\u30FE\u30FC\u30A1\u30A3\u30A5\u30A7\u30A9\u30C3\u30E3\u30E5\u30E7\u30EE\u30F5\u30F6\u3041\u3043\u3045\u3047\u3049\u3063\u3083\u3085\u3087\u308E\u3095\u3096\u31F0\u31F1\u31F2\u31F3\u31F4\u31F5\u31F6\u31F7\u31F8\u31F9\u31FA\u31FB\u31FC\u31FD\u31FE\u31FF\u3005\u303B\uFF67\uFF68\uFF69\uFF6A\uFF6B\uFF6C\uFF6D\uFF6E\uFF6F\uFF70\u201D\u3009\u300B\u300D\u300F\u3011\u3015\uFF09\uFF3D\uFF5D\uFF63")),wordWrapBreakBeforeCharacters:Te(new b(120,"wordWrapBreakBeforeCharacters","([{\u2018\u201C\u3008\u300A\u300C\u300E\u3010\u3014\uFF08\uFF3B\uFF5B\uFF62\xA3\xA5\uFF04\uFFE1\uFFE5+\uFF0B")),wordWrapColumn:Te(new d(121,"wordWrapColumn",80,1,1073741824,{markdownDescription:o.localize(273,null)})),wordWrapOverride1:Te(new I(122,"wordWrapOverride1","inherit",["off","on","inherit"])),wordWrapOverride2:Te(new I(123,"wordWrapOverride2","inherit",["off","on","inherit"])),wrappingIndent:Te(new r(124,"wrappingIndent",1,"same",["none","same","indent","deepIndent"],ze,{enumDescriptions:[o.localize(274,null),o.localize(275,null),o.localize(276,null),o.localize(277,null)],description:o.localize(278,null)})),wrappingStrategy:Te(new I(125,"wrappingStrategy","simple",["simple","advanced"],{enumDescriptions:[o.localize(279,null),o.localize(280,null)],description:o.localize(281,null)})),editorClassName:Te(new R),pixelRatio:Te(new ke),tabFocusMode:Te(new Me),layoutInfo:Te(new ae),wrappingInfo:Te(new xe)}}),define(Ee[117],we([18,19]),function(J,e){return J.create("vs/platform/configuration/common/configurationRegistry",e)}),define(Ee[118],we([18,19]),function(J,e){return J.create("vs/platform/extensions/common/extensionValidator",e)}),define(Ee[119],we([18,19]),function(J,e){return J.create("vs/platform/files/common/files",e)}),define(Ee[120],we([18,19]),function(J,e){return J.create("vs/platform/markers/common/markers",e)}),define(Ee[121],we([18,19]),function(J,e){return J.create("vs/platform/workspace/common/workspace",e)}),define(Ee[122],we([18,19]),function(J,e){return J.create("vs/workbench/api/common/extHostDiagnostics",e)}),define(Ee[123],we([18,19]),function(J,e){return J.create("vs/workbench/api/common/extHostExtensionService",e)}),define(Ee[124],we([18,19]),function(J,e){return J.create("vs/workbench/api/common/extHostProgress",e)}),define(Ee[125],we([18,19]),function(J,e){return J.create("vs/workbench/api/common/extHostStatusBar",e)}),define(Ee[126],we([18,19]),function(J,e){return J.create("vs/workbench/api/common/extHostTerminalService",e)}),define(Ee[127],we([18,19]),function(J,e){return J.create("vs/workbench/api/common/extHostTreeViews",e)}),define(Ee[128],we([18,19]),function(J,e){return J.create("vs/workbench/api/common/extHostWorkspace",e)}),define(Ee[129],we([18,19]),function(J,e){return J.create("vs/workbench/common/editor",e)}),define(Ee[130],we([18,19]),function(J,e){return J.create("vs/workbench/contrib/debug/common/abstractDebugAdapter",e)}),define(Ee[131],we([18,19]),function(J,e){return J.create("vs/workbench/contrib/debug/common/debug",e)}),define(Ee[132],we([18,19]),function(J,e){return J.create("vs/workbench/contrib/tasks/common/taskService",e)}),define(Ee[133],we([18,19]),function(J,e){return J.create("vs/workbench/services/configurationResolver/common/variableResolver",e)}),define(Ee[134],we([18,19]),function(J,e){return J.create("vs/workbench/services/search/common/queryBuilder",e)}),define(Ee[135],we([1,0]),function(J,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TextEditorSelectionSource=e.TextEditorSelectionRevealType=e.EditorOpenSource=e.EditorResolution=e.EditorActivation=void 0;var o;(function(A){A[A.ACTIVATE=1]="ACTIVATE",A[A.RESTORE=2]="RESTORE",A[A.PRESERVE=3]="PRESERVE"})(o=e.EditorActivation||(e.EditorActivation={}));var k;(function(A){A[A.PICK=0]="PICK",A[A.DISABLED=1]="DISABLED",A[A.EXCLUSIVE_ONLY=2]="EXCLUSIVE_ONLY"})(k=e.EditorResolution||(e.EditorResolution={}));var w;(function(A){A[A.API=0]="API",A[A.USER=1]="USER"})(w=e.EditorOpenSource||(e.EditorOpenSource={}));var B;(function(A){A[A.Center=0]="Center",A[A.CenterIfOutsideViewport=1]="CenterIfOutsideViewport",A[A.NearTop=2]="NearTop",A[A.NearTopIfOutsideViewport=3]="NearTopIfOutsideViewport"})(B=e.TextEditorSelectionRevealType||(e.TextEditorSelectionRevealType={}));var S;(function(A){A.PROGRAMMATIC="api",A.NAVIGATION="code.navigation",A.JUMP="code.jump"})(S=e.TextEditorSelectionSource||(e.TextEditorSelectionSource={}))}),define(Ee[136],we([1,0,118]),function(J,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isEngineValid=e.isValidExtensionVersion=e.isValidVersion=e.normalizeVersion=e.parseVersion=e.isValidVersionStr=void 0;const k=/^(\^|>=)?((\d+)|x)\.((\d+)|x)\.((\d+)|x)(\-.*)?$/,w=/^-(\d{4})(\d{2})(\d{2})$/;function B(u){return u=u.trim(),u==="*"||k.test(u)}e.isValidVersionStr=B;function S(u){if(!B(u))return null;if(u=u.trim(),u==="*")return{hasCaret:!1,hasGreaterEquals:!1,majorBase:0,majorMustEqual:!1,minorBase:0,minorMustEqual:!1,patchBase:0,patchMustEqual:!1,preRelease:null};let m=u.match(k);return m?{hasCaret:m[1]==="^",hasGreaterEquals:m[1]===">=",majorBase:m[2]==="x"?0:parseInt(m[2],10),majorMustEqual:m[2]!=="x",minorBase:m[4]==="x"?0:parseInt(m[4],10),minorMustEqual:m[4]!=="x",patchBase:m[6]==="x"?0:parseInt(m[6],10),patchMustEqual:m[6]!=="x",preRelease:m[8]||null}:null}e.parseVersion=S;function A(u){if(!u)return null;let m=u.majorBase,s=u.majorMustEqual,n=u.minorBase,f=u.minorMustEqual,D=u.patchBase,T=u.patchMustEqual;u.hasCaret&&(m===0||(f=!1),T=!1);let d=0;if(u.preRelease){const g=w.exec(u.preRelease);if(g){const[,b,l,I]=g;d=Date.UTC(Number(b),Number(l)-1,Number(I))}}return{majorBase:m,majorMustEqual:s,minorBase:n,minorMustEqual:f,patchBase:D,patchMustEqual:T,isMinimum:u.hasGreaterEquals,notBefore:d}}e.normalizeVersion=A;function y(u,m,s){let n;typeof u=="string"?n=A(S(u)):n=u;let f;m instanceof Date?f=m.getTime():typeof m=="string"&&(f=new Date(m).getTime());let D;if(typeof s=="string"?D=A(S(s)):D=s,!n||!D)return!1;let T=n.majorBase,d=n.minorBase,g=n.patchBase,b=D.majorBase,l=D.minorBase,I=D.patchBase,r=D.notBefore,i=D.majorMustEqual,c=D.minorMustEqual,t=D.patchMustEqual;return D.isMinimum?T>b?!0:T<b?!1:d>l?!0:d<l||f&&f<r?!1:g>=I:(T===1&&b===0&&(!i||!c||!t)&&(b=1,l=0,I=0,i=!0,c=!1,t=!1),T<b?!1:T>b?!i:d<l?!1:d>l?!c:g<I?!1:g>I?!t:!(f&&f<r))}e.isValidVersion=y;function M(u,m,s,n){return s.isBuiltin||typeof s.main=="undefined"?!0:v(u,m,s.engines.vscode,n)}e.isValidExtensionVersion=M;function L(u,m,s){return u==="*"||v(m,s,u)}e.isEngineValid=L;function v(u,m,s,n=[]){let f=A(S(s));if(!f)return n.push(o.localize(0,null,s)),!1;if(f.majorBase===0){if(!f.majorMustEqual||!f.minorMustEqual)return n.push(o.localize(1,null,s)),!1}else if(!f.majorMustEqual)return n.push(o.localize(2,null,s)),!1;return y(u,m,f)?!0:(n.push(o.localize(3,null,u,s)),!1)}}),define(Ee[76],we([1,0]),function(J,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SyncDescriptor=void 0;class o{constructor(w,B=[],S=!1){this.ctor=w,this.staticArguments=B,this.supportsDelayedInstantiation=S}}e.SyncDescriptor=o}),define(Ee[55],we([1,0,76]),function(J,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getSingletonServiceDescriptors=e.registerSingleton=void 0;const k=[];function w(S,A,y){A instanceof o.SyncDescriptor||(A=new o.SyncDescriptor(A,[],y)),k.push([S,A])}e.registerSingleton=w;function B(){return k}e.getSingletonServiceDescriptors=B}),define(Ee[137],we([1,0]),function(J,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Graph=e.Node=void 0;class o{constructor(B){this.incoming=new Map,this.outgoing=new Map,this.data=B}}e.Node=o;class k{constructor(B){this._hashFn=B,this._nodes=new Map}roots(){const B=[];for(let S of this._nodes.values())S.outgoing.size===0&&B.push(S);return B}insertEdge(B,S){const A=this.lookupOrInsertNode(B),y=this.lookupOrInsertNode(S);A.outgoing.set(this._hashFn(S),y),y.incoming.set(this._hashFn(B),A)}removeNode(B){const S=this._hashFn(B);this._nodes.delete(S);for(let A of this._nodes.values())A.outgoing.delete(S),A.incoming.delete(S)}lookupOrInsertNode(B){const S=this._hashFn(B);let A=this._nodes.get(S);return A||(A=new o(B),this._nodes.set(S,A)),A}lookup(B){return this._nodes.get(this._hashFn(B))}isEmpty(){return this._nodes.size===0}toString(){let B=[];for(let[S,A]of this._nodes)B.push(`${S}, (incoming)[${[...A.incoming.keys()].join(", ")}], (outgoing)[${[...A.outgoing.keys()].join(",")}]`);return B.join(`
`)}findCycleSlow(){for(let[B,S]of this._nodes){const A=new Set([B]),y=this._findCycle(S,A);if(y)return y}}_findCycle(B,S){for(let[A,y]of B.outgoing){if(S.has(A))return[...S,A].join(" -> ");S.add(A);const M=this._findCycle(y,S);if(M)return M;S.delete(A)}}}e.Graph=k}),define(Ee[3],we([1,0]),function(J,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.refineServiceDecorator=e.createDecorator=e.IInstantiationService=e._util=void 0;var o;(function(S){S.serviceIds=new Map,S.DI_TARGET="$di$target",S.DI_DEPENDENCIES="$di$dependencies";function A(y){return y[S.DI_DEPENDENCIES]||[]}S.getServiceDependencies=A})(o=e._util||(e._util={})),e.IInstantiationService=w("instantiationService");function k(S,A,y){A[o.DI_TARGET]===A?A[o.DI_DEPENDENCIES].push({id:S,index:y}):(A[o.DI_DEPENDENCIES]=[{id:S,index:y}],A[o.DI_TARGET]=A)}function w(S){if(o.serviceIds.has(S))return o.serviceIds.get(S);const A=function(y,M,L){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");k(A,y,L)};return A.toString=()=>S,o.serviceIds.set(S,A),A}e.createDecorator=w;function B(S){return S}e.refineServiceDecorator=B}),define(Ee[77],we([1,0,11,2,3]),function(J,e,o,k,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getMigratedSettingValue=e.merge=e.getConfigurationValue=e.removeFromValueTree=e.addToValueTree=e.toValuesTree=e.ConfigurationTargetToString=e.ConfigurationTarget=e.isConfigurationUpdateOverrides=e.isConfigurationOverrides=e.IConfigurationService=void 0,e.IConfigurationService=(0,w.createDecorator)("configurationService");function B(f){return f&&typeof f=="object"&&(!f.overrideIdentifier||typeof f.overrideIdentifier=="string")&&(!f.resource||f.resource instanceof k.URI)}e.isConfigurationOverrides=B;function S(f){return f&&typeof f=="object"&&(!f.overrideIdentifiers||o.isArray(f.overrideIdentifiers))&&!f.overrideIdentifier&&(!f.resource||f.resource instanceof k.URI)}e.isConfigurationUpdateOverrides=S;var A;(function(f){f[f.USER=1]="USER",f[f.USER_LOCAL=2]="USER_LOCAL",f[f.USER_REMOTE=3]="USER_REMOTE",f[f.WORKSPACE=4]="WORKSPACE",f[f.WORKSPACE_FOLDER=5]="WORKSPACE_FOLDER",f[f.DEFAULT=6]="DEFAULT",f[f.MEMORY=7]="MEMORY"})(A=e.ConfigurationTarget||(e.ConfigurationTarget={}));function y(f){switch(f){case 1:return"USER";case 2:return"USER_LOCAL";case 3:return"USER_REMOTE";case 4:return"WORKSPACE";case 5:return"WORKSPACE_FOLDER";case 6:return"DEFAULT";case 7:return"MEMORY"}}e.ConfigurationTargetToString=y;function M(f,D){const T=Object.create(null);for(let d in f)L(T,d,f[d],D);return T}e.toValuesTree=M;function L(f,D,T,d){const g=D.split("."),b=g.pop();let l=f;for(let I=0;I<g.length;I++){let r=g[I],i=l[r];switch(typeof i){case"undefined":i=l[r]=Object.create(null);break;case"object":break;default:d(`Ignoring ${D} as ${g.slice(0,I+1).join(".")} is ${JSON.stringify(i)}`);return}l=i}if(typeof l=="object"&&l!==null)try{l[b]=T}catch{d(`Ignoring ${D} as ${g.join(".")} is ${JSON.stringify(l)}`)}else d(`Ignoring ${D} as ${g.join(".")} is ${JSON.stringify(l)}`)}e.addToValueTree=L;function v(f,D){const T=D.split(".");u(f,T)}e.removeFromValueTree=v;function u(f,D){const T=D.shift();if(D.length===0){delete f[T];return}if(Object.keys(f).indexOf(T)!==-1){const d=f[T];typeof d=="object"&&!Array.isArray(d)&&(u(d,D),Object.keys(d).length===0&&delete f[T])}}function m(f,D,T){function d(l,I){let r=l;for(const i of I){if(typeof r!="object"||r===null)return;r=r[i]}return r}const g=D.split("."),b=d(f,g);return typeof b=="undefined"?T:b}e.getConfigurationValue=m;function s(f,D,T){Object.keys(D).forEach(d=>{d!=="__proto__"&&(d in f?o.isObject(f[d])&&o.isObject(D[d])?s(f[d],D[d],T):T&&(f[d]=D[d]):f[d]=D[d])})}e.merge=s;function n(f,D,T){const d=f.inspect(D),g=f.inspect(T);return typeof d.userValue!="undefined"||typeof d.workspaceValue!="undefined"||typeof d.workspaceFolderValue!="undefined"?d.value:typeof g.userValue!="undefined"||typeof g.workspaceValue!="undefined"||typeof g.workspaceFolderValue!="undefined"?g.value:d.defaultValue}e.getMigratedSettingValue=n}),define(Ee[44],we([1,0,23,10,3]),function(J,e,o,k,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.implies=e.SET_CONTEXT_COMMAND_ID=e.IContextKeyService=e.RawContextKey=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.ContextKeyExpr=e.ContextKeyExprType=void 0;const B=new Map;B.set("false",!1),B.set("true",!0),B.set("isMac",o.isMacintosh),B.set("isLinux",o.isLinux),B.set("isWindows",o.isWindows),B.set("isWeb",o.isWeb),B.set("isMacNative",o.isMacintosh&&!o.isWeb),B.set("isEdge",o.isEdge),B.set("isFirefox",o.isFirefox),B.set("isChrome",o.isChrome),B.set("isSafari",o.isSafari);const S=Object.prototype.hasOwnProperty;var A;(function($){$[$.False=0]="False",$[$.True=1]="True",$[$.Defined=2]="Defined",$[$.Not=3]="Not",$[$.Equals=4]="Equals",$[$.NotEquals=5]="NotEquals",$[$.And=6]="And",$[$.Regex=7]="Regex",$[$.NotRegex=8]="NotRegex",$[$.Or=9]="Or",$[$.In=10]="In",$[$.NotIn=11]="NotIn",$[$.Greater=12]="Greater",$[$.GreaterEquals=13]="GreaterEquals",$[$.Smaller=14]="Smaller",$[$.SmallerEquals=15]="SmallerEquals"})(A=e.ContextKeyExprType||(e.ContextKeyExprType={}));class y{static false(){return v.INSTANCE}static true(){return u.INSTANCE}static has(E){return m.create(E)}static equals(E,z){return s.create(E,z)}static notEquals(E,z){return D.create(E,z)}static regex(E,z){return r.create(E,z)}static in(E,z){return n.create(E,z)}static not(E){return T.create(E)}static and(...E){return t.create(E,null)}static or(...E){return a.create(E,null,!0)}static greater(E,z){return g.create(E,z)}static greaterEquals(E,z){return b.create(E,z)}static smaller(E,z){return l.create(E,z)}static smallerEquals(E,z){return I.create(E,z)}static deserialize(E,z=!1){if(!!E)return this._deserializeOrExpression(E,z)}static _deserializeOrExpression(E,z){let V=E.split("||");return a.create(V.map(W=>this._deserializeAndExpression(W,z)),null,!0)}static _deserializeAndExpression(E,z){let V=E.split("&&");return t.create(V.map(W=>this._deserializeOne(W,z)),null)}static _deserializeOne(E,z){if(E=E.trim(),E.indexOf("!=")>=0){let V=E.split("!=");return D.create(V[0].trim(),this._deserializeValue(V[1],z))}if(E.indexOf("==")>=0){let V=E.split("==");return s.create(V[0].trim(),this._deserializeValue(V[1],z))}if(E.indexOf("=~")>=0){let V=E.split("=~");return r.create(V[0].trim(),this._deserializeRegexValue(V[1],z))}if(E.indexOf(" in ")>=0){let V=E.split(" in ");return n.create(V[0].trim(),V[1].trim())}if(/^[^<=>]+>=[^<=>]+$/.test(E)){const V=E.split(">=");return b.create(V[0].trim(),V[1].trim())}if(/^[^<=>]+>[^<=>]+$/.test(E)){const V=E.split(">");return g.create(V[0].trim(),V[1].trim())}if(/^[^<=>]+<=[^<=>]+$/.test(E)){const V=E.split("<=");return I.create(V[0].trim(),V[1].trim())}if(/^[^<=>]+<[^<=>]+$/.test(E)){const V=E.split("<");return l.create(V[0].trim(),V[1].trim())}return/^\!\s*/.test(E)?T.create(E.substr(1).trim()):m.create(E)}static _deserializeValue(E,z){if(E=E.trim(),E==="true")return!0;if(E==="false")return!1;let V=/^'([^']*)'$/.exec(E);return V?V[1].trim():E}static _deserializeRegexValue(E,z){if((0,k.isFalsyOrWhitespace)(E)){if(z)throw new Error("missing regexp-value for =~-expression");return console.warn("missing regexp-value for =~-expression"),null}let V=E.indexOf("/"),W=E.lastIndexOf("/");if(V===W||V<0){if(z)throw new Error(`bad regexp-value '${E}', missing /-enclosure`);return console.warn(`bad regexp-value '${E}', missing /-enclosure`),null}let Q=E.slice(V+1,W),K=E[W+1]==="i"?"i":"";try{return new RegExp(Q,K)}catch(H){if(z)throw new Error(`bad regexp-value '${E}', parse error: ${H}`);return console.warn(`bad regexp-value '${E}', parse error: ${H}`),null}}}e.ContextKeyExpr=y;function M($,E){const z=$?$.substituteConstants():void 0,V=E?E.substituteConstants():void 0;return!z&&!V?!0:!z||!V?!1:z.equals(V)}e.expressionsAreEqualWithConstantSubstitution=M;function L($,E){return $.cmp(E)}class v{constructor(){this.type=0}cmp(E){return this.type-E.type}equals(E){return E.type===this.type}substituteConstants(){return this}evaluate(E){return!1}serialize(){return"false"}keys(){return[]}map(E){return this}negate(){return u.INSTANCE}}e.ContextKeyFalseExpr=v,v.INSTANCE=new v;class u{constructor(){this.type=1}cmp(E){return this.type-E.type}equals(E){return E.type===this.type}substituteConstants(){return this}evaluate(E){return!0}serialize(){return"true"}keys(){return[]}map(E){return this}negate(){return v.INSTANCE}}e.ContextKeyTrueExpr=u,u.INSTANCE=new u;class m{constructor(E,z){this.key=E,this.negated=z,this.type=2}static create(E,z=null){const V=B.get(E);return typeof V=="boolean"?V?u.INSTANCE:v.INSTANCE:new m(E,z)}cmp(E){return E.type!==this.type?this.type-E.type:h(this.key,E.key)}equals(E){return E.type===this.type?this.key===E.key:!1}substituteConstants(){const E=B.get(this.key);return typeof E=="boolean"?E?u.INSTANCE:v.INSTANCE:this}evaluate(E){return!!E.getValue(this.key)}serialize(){return this.key}keys(){return[this.key]}map(E){return E.mapDefined(this.key)}negate(){return this.negated||(this.negated=T.create(this.key,this)),this.negated}}e.ContextKeyDefinedExpr=m;class s{constructor(E,z,V){this.key=E,this.value=z,this.negated=V,this.type=4}static create(E,z,V=null){if(typeof z=="boolean")return z?m.create(E,V):T.create(E,V);const W=B.get(E);return typeof W=="boolean"?z===(W?"true":"false")?u.INSTANCE:v.INSTANCE:new s(E,z,V)}cmp(E){return E.type!==this.type?this.type-E.type:_(this.key,this.value,E.key,E.value)}equals(E){return E.type===this.type?this.key===E.key&&this.value===E.value:!1}substituteConstants(){const E=B.get(this.key);if(typeof E=="boolean"){const z=E?"true":"false";return this.value===z?u.INSTANCE:v.INSTANCE}return this}evaluate(E){return E.getValue(this.key)==this.value}serialize(){return`${this.key} == '${this.value}'`}keys(){return[this.key]}map(E){return E.mapEquals(this.key,this.value)}negate(){return this.negated||(this.negated=D.create(this.key,this.value,this)),this.negated}}e.ContextKeyEqualsExpr=s;class n{constructor(E,z){this.key=E,this.valueKey=z,this.type=10,this.negated=null}static create(E,z){return new n(E,z)}cmp(E){return E.type!==this.type?this.type-E.type:_(this.key,this.valueKey,E.key,E.valueKey)}equals(E){return E.type===this.type?this.key===E.key&&this.valueKey===E.valueKey:!1}substituteConstants(){return this}evaluate(E){const z=E.getValue(this.valueKey),V=E.getValue(this.key);return Array.isArray(z)?z.indexOf(V)>=0:typeof V=="string"&&typeof z=="object"&&z!==null?S.call(z,V):!1}serialize(){return`${this.key} in '${this.valueKey}'`}keys(){return[this.key,this.valueKey]}map(E){return E.mapIn(this.key,this.valueKey)}negate(){return this.negated||(this.negated=f.create(this)),this.negated}}e.ContextKeyInExpr=n;class f{constructor(E){this._actual=E,this.type=11}static create(E){return new f(E)}cmp(E){return E.type!==this.type?this.type-E.type:this._actual.cmp(E._actual)}equals(E){return E.type===this.type?this._actual.equals(E._actual):!1}substituteConstants(){return this}evaluate(E){return!this._actual.evaluate(E)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}map(E){return new f(this._actual.map(E))}negate(){return this._actual}}e.ContextKeyNotInExpr=f;class D{constructor(E,z,V){this.key=E,this.value=z,this.negated=V,this.type=5}static create(E,z,V=null){if(typeof z=="boolean")return z?T.create(E,V):m.create(E,V);const W=B.get(E);return typeof W=="boolean"?z===(W?"true":"false")?v.INSTANCE:u.INSTANCE:new D(E,z,V)}cmp(E){return E.type!==this.type?this.type-E.type:_(this.key,this.value,E.key,E.value)}equals(E){return E.type===this.type?this.key===E.key&&this.value===E.value:!1}substituteConstants(){const E=B.get(this.key);if(typeof E=="boolean"){const z=E?"true":"false";return this.value===z?v.INSTANCE:u.INSTANCE}return this}evaluate(E){return E.getValue(this.key)!=this.value}serialize(){return`${this.key} != '${this.value}'`}keys(){return[this.key]}map(E){return E.mapNotEquals(this.key,this.value)}negate(){return this.negated||(this.negated=s.create(this.key,this.value,this)),this.negated}}e.ContextKeyNotEqualsExpr=D;class T{constructor(E,z){this.key=E,this.negated=z,this.type=3}static create(E,z=null){const V=B.get(E);return typeof V=="boolean"?V?v.INSTANCE:u.INSTANCE:new T(E,z)}cmp(E){return E.type!==this.type?this.type-E.type:h(this.key,E.key)}equals(E){return E.type===this.type?this.key===E.key:!1}substituteConstants(){const E=B.get(this.key);return typeof E=="boolean"?E?v.INSTANCE:u.INSTANCE:this}evaluate(E){return!E.getValue(this.key)}serialize(){return`!${this.key}`}keys(){return[this.key]}map(E){return E.mapNot(this.key)}negate(){return this.negated||(this.negated=m.create(this.key,this)),this.negated}}e.ContextKeyNotExpr=T;function d($,E){if(typeof $=="string"){const z=parseFloat($);isNaN(z)||($=z)}return typeof $=="string"||typeof $=="number"?E($):v.INSTANCE}class g{constructor(E,z,V){this.key=E,this.value=z,this.negated=V,this.type=12}static create(E,z,V=null){return d(z,W=>new g(E,W,V))}cmp(E){return E.type!==this.type?this.type-E.type:_(this.key,this.value,E.key,E.value)}equals(E){return E.type===this.type?this.key===E.key&&this.value===E.value:!1}substituteConstants(){return this}evaluate(E){return typeof this.value=="string"?!1:parseFloat(E.getValue(this.key))>this.value}serialize(){return`${this.key} > ${this.value}`}keys(){return[this.key]}map(E){return E.mapGreater(this.key,this.value)}negate(){return this.negated||(this.negated=I.create(this.key,this.value,this)),this.negated}}e.ContextKeyGreaterExpr=g;class b{constructor(E,z,V){this.key=E,this.value=z,this.negated=V,this.type=13}static create(E,z,V=null){return d(z,W=>new b(E,W,V))}cmp(E){return E.type!==this.type?this.type-E.type:_(this.key,this.value,E.key,E.value)}equals(E){return E.type===this.type?this.key===E.key&&this.value===E.value:!1}substituteConstants(){return this}evaluate(E){return typeof this.value=="string"?!1:parseFloat(E.getValue(this.key))>=this.value}serialize(){return`${this.key} >= ${this.value}`}keys(){return[this.key]}map(E){return E.mapGreaterEquals(this.key,this.value)}negate(){return this.negated||(this.negated=l.create(this.key,this.value,this)),this.negated}}e.ContextKeyGreaterEqualsExpr=b;class l{constructor(E,z,V){this.key=E,this.value=z,this.negated=V,this.type=14}static create(E,z,V=null){return d(z,W=>new l(E,W,V))}cmp(E){return E.type!==this.type?this.type-E.type:_(this.key,this.value,E.key,E.value)}equals(E){return E.type===this.type?this.key===E.key&&this.value===E.value:!1}substituteConstants(){return this}evaluate(E){return typeof this.value=="string"?!1:parseFloat(E.getValue(this.key))<this.value}serialize(){return`${this.key} < ${this.value}`}keys(){return[this.key]}map(E){return E.mapSmaller(this.key,this.value)}negate(){return this.negated||(this.negated=b.create(this.key,this.value,this)),this.negated}}e.ContextKeySmallerExpr=l;class I{constructor(E,z,V){this.key=E,this.value=z,this.negated=V,this.type=15}static create(E,z,V=null){return d(z,W=>new I(E,W,V))}cmp(E){return E.type!==this.type?this.type-E.type:_(this.key,this.value,E.key,E.value)}equals(E){return E.type===this.type?this.key===E.key&&this.value===E.value:!1}substituteConstants(){return this}evaluate(E){return typeof this.value=="string"?!1:parseFloat(E.getValue(this.key))<=this.value}serialize(){return`${this.key} <= ${this.value}`}keys(){return[this.key]}map(E){return E.mapSmallerEquals(this.key,this.value)}negate(){return this.negated||(this.negated=g.create(this.key,this.value,this)),this.negated}}e.ContextKeySmallerEqualsExpr=I;class r{constructor(E,z){this.key=E,this.regexp=z,this.type=7,this.negated=null}static create(E,z){return new r(E,z)}cmp(E){if(E.type!==this.type)return this.type-E.type;if(this.key<E.key)return-1;if(this.key>E.key)return 1;const z=this.regexp?this.regexp.source:"",V=E.regexp?E.regexp.source:"";return z<V?-1:z>V?1:0}equals(E){if(E.type===this.type){const z=this.regexp?this.regexp.source:"",V=E.regexp?E.regexp.source:"";return this.key===E.key&&z===V}return!1}substituteConstants(){return this}evaluate(E){let z=E.getValue(this.key);return this.regexp?this.regexp.test(z):!1}serialize(){const E=this.regexp?`/${this.regexp.source}/${this.regexp.ignoreCase?"i":""}`:"/invalid/";return`${this.key} =~ ${E}`}keys(){return[this.key]}map(E){return E.mapRegex(this.key,this.regexp)}negate(){return this.negated||(this.negated=i.create(this)),this.negated}}e.ContextKeyRegexExpr=r;class i{constructor(E){this._actual=E,this.type=8}static create(E){return new i(E)}cmp(E){return E.type!==this.type?this.type-E.type:this._actual.cmp(E._actual)}equals(E){return E.type===this.type?this._actual.equals(E._actual):!1}substituteConstants(){return this}evaluate(E){return!this._actual.evaluate(E)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}map(E){return new i(this._actual.map(E))}negate(){return this._actual}}e.ContextKeyNotRegexExpr=i;function c($){let E=null;for(let z=0,V=$.length;z<V;z++){const W=$[z].substituteConstants();if($[z]!==W&&E===null){E=[];for(let Q=0;Q<z;Q++)E[Q]=$[Q]}E!==null&&(E[z]=W)}return E===null?$:E}class t{constructor(E,z){this.expr=E,this.negated=z,this.type=6}static create(E,z){return t._normalizeArr(E,z)}cmp(E){if(E.type!==this.type)return this.type-E.type;if(this.expr.length<E.expr.length)return-1;if(this.expr.length>E.expr.length)return 1;for(let z=0,V=this.expr.length;z<V;z++){const W=L(this.expr[z],E.expr[z]);if(W!==0)return W}return 0}equals(E){if(E.type===this.type){if(this.expr.length!==E.expr.length)return!1;for(let z=0,V=this.expr.length;z<V;z++)if(!this.expr[z].equals(E.expr[z]))return!1;return!0}return!1}substituteConstants(){const E=c(this.expr);return E===this.expr?this:t.create(E,this.negated)}evaluate(E){for(let z=0,V=this.expr.length;z<V;z++)if(!this.expr[z].evaluate(E))return!1;return!0}static _normalizeArr(E,z){const V=[];let W=!1;for(const Q of E)if(!!Q){if(Q.type===1){W=!0;continue}if(Q.type===0)return v.INSTANCE;if(Q.type===6){V.push(...Q.expr);continue}V.push(Q)}if(V.length===0&&W)return u.INSTANCE;if(V.length!==0){if(V.length===1)return V[0];V.sort(L);for(let Q=1;Q<V.length;Q++)V[Q-1].equals(V[Q])&&(V.splice(Q,1),Q--);if(V.length===1)return V[0];for(;V.length>1;){const Q=V[V.length-1];if(Q.type!==9)break;V.pop();const K=V.pop(),H=V.length===0,te=a.create(Q.expr.map(ae=>t.create([ae,K],null)),null,H);te&&(V.push(te),V.sort(L))}return V.length===1?V[0]:new t(V,z)}}serialize(){return this.expr.map(E=>E.serialize()).join(" && ")}keys(){const E=[];for(let z of this.expr)E.push(...z.keys());return E}map(E){return new t(this.expr.map(z=>z.map(E)),null)}negate(){if(!this.negated){const E=[];for(let z of this.expr)E.push(z.negate());this.negated=a.create(E,this,!0)}return this.negated}}class a{constructor(E,z){this.expr=E,this.negated=z,this.type=9}static create(E,z,V){return a._normalizeArr(E,z,V)}cmp(E){if(E.type!==this.type)return this.type-E.type;if(this.expr.length<E.expr.length)return-1;if(this.expr.length>E.expr.length)return 1;for(let z=0,V=this.expr.length;z<V;z++){const W=L(this.expr[z],E.expr[z]);if(W!==0)return W}return 0}equals(E){if(E.type===this.type){if(this.expr.length!==E.expr.length)return!1;for(let z=0,V=this.expr.length;z<V;z++)if(!this.expr[z].equals(E.expr[z]))return!1;return!0}return!1}substituteConstants(){const E=c(this.expr);return E===this.expr?this:a.create(E,this.negated,!1)}evaluate(E){for(let z=0,V=this.expr.length;z<V;z++)if(this.expr[z].evaluate(E))return!0;return!1}static _normalizeArr(E,z,V){let W=[],Q=!1;if(E){for(let K=0,H=E.length;K<H;K++){const te=E[K];if(!!te){if(te.type===0){Q=!0;continue}if(te.type===1)return u.INSTANCE;if(te.type===9){W=W.concat(te.expr);continue}W.push(te)}}if(W.length===0&&Q)return v.INSTANCE;W.sort(L)}if(W.length!==0){if(W.length===1)return W[0];for(let K=1;K<W.length;K++)W[K-1].equals(W[K])&&(W.splice(K,1),K--);if(W.length===1)return W[0];if(V){for(let K=0;K<W.length;K++)for(let H=K+1;H<W.length;H++)P(W[K],W[H])&&(W.splice(H,1),H--);if(W.length===1)return W[0]}return new a(W,z)}}serialize(){return this.expr.map(E=>E.serialize()).join(" || ")}keys(){const E=[];for(let z of this.expr)E.push(...z.keys());return E}map(E){return new a(this.expr.map(z=>z.map(E)),null)}negate(){if(!this.negated){let E=[];for(let z of this.expr)E.push(z.negate());for(;E.length>1;){const z=E.shift(),V=E.shift(),W=[];for(const K of R(z))for(const H of R(V))W.push(t.create([K,H],null));const Q=E.length===0;E.unshift(a.create(W,null,Q))}this.negated=E[0]}return this.negated}}class p extends m{constructor(E,z,V){super(E,null);this._defaultValue=z,typeof V=="object"?p._info.push({...V,key:E}):V!==!0&&p._info.push({key:E,description:V,type:z!=null?typeof z:void 0})}static all(){return p._info.values()}bindTo(E){return E.createKey(this.key,this._defaultValue)}getValue(E){return E.getContextKeyValue(this.key)}toNegated(){return this.negate()}isEqualTo(E){return s.create(this.key,E)}notEqualsTo(E){return D.create(this.key,E)}}e.RawContextKey=p,p._info=[],e.IContextKeyService=(0,w.createDecorator)("contextKeyService"),e.SET_CONTEXT_COMMAND_ID="setContext";function h($,E){return $<E?-1:$>E?1:0}function _($,E,z,V){return $<z?-1:$>z?1:E<V?-1:E>V?1:0}function P($,E){if(E.type===6&&$.type!==9&&$.type!==6){for(const W of E.expr)if($.equals(W))return!0}const z=$.negate(),V=R(z).concat(R(E));V.sort(L);for(let W=0;W<V.length;W++){const K=V[W].negate();for(let H=W+1;H<V.length;H++){const te=V[H];if(K.equals(te))return!0}}return!1}e.implies=P;function R($){return $.type===9?$.expr:[$]}}),define(Ee[138],we([1,0,3]),function(J,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.INativeEnvironmentService=e.IEnvironmentService=void 0,e.IEnvironmentService=(0,o.createDecorator)("environmentService"),e.INativeEnvironmentService=(0,o.refineServiceDecorator)(e.IEnvironmentService)}),define(Ee[45],we([1,0,15,22,17,10,11,2,119,3]),function(J,e,o,k,w,B,S,A,y,M){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getPlatformLimits=e.Arch=e.ByteSize=e.FALLBACK_MAX_MEMORY_SIZE_MB=e.MIN_MAX_MEMORY_SIZE_MB=e.whenProviderRegistered=e.etag=e.ETAG_DISABLED=e.FileKind=e.FILES_EXCLUDE_CONFIG=e.FILES_ASSOCIATIONS_CONFIG=e.HotExitConfiguration=e.AutoSaveConfiguration=e.FileOperationResult=e.NotModifiedSinceFileOperationError=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.hasFileAtomicReadCapability=e.hasFileReadStreamCapability=e.hasOpenReadWriteCloseCapability=e.hasFileFolderCopyCapability=e.hasReadWriteCapability=e.FileSystemProviderCapabilities=e.FilePermission=e.FileType=e.isFileOpenForWriteOptions=e.IFileService=void 0,e.IFileService=(0,M.createDecorator)("fileService");function L(K){return K.create===!0}e.isFileOpenForWriteOptions=L;var v;(function(K){K[K.Unknown=0]="Unknown",K[K.File=1]="File",K[K.Directory=2]="Directory",K[K.SymbolicLink=64]="SymbolicLink"})(v=e.FileType||(e.FileType={}));var u;(function(K){K[K.Readonly=1]="Readonly"})(u=e.FilePermission||(e.FilePermission={}));var m;(function(K){K[K.FileReadWrite=2]="FileReadWrite",K[K.FileOpenReadWriteClose=4]="FileOpenReadWriteClose",K[K.FileReadStream=16]="FileReadStream",K[K.FileFolderCopy=8]="FileFolderCopy",K[K.PathCaseSensitive=1024]="PathCaseSensitive",K[K.Readonly=2048]="Readonly",K[K.Trash=4096]="Trash",K[K.FileWriteUnlock=8192]="FileWriteUnlock",K[K.FileAtomicRead=16384]="FileAtomicRead"})(m=e.FileSystemProviderCapabilities||(e.FileSystemProviderCapabilities={}));function s(K){return!!(K.capabilities&2)}e.hasReadWriteCapability=s;function n(K){return!!(K.capabilities&8)}e.hasFileFolderCopyCapability=n;function f(K){return!!(K.capabilities&4)}e.hasOpenReadWriteCloseCapability=f;function D(K){return!!(K.capabilities&16)}e.hasFileReadStreamCapability=D;function T(K){return s(K)?!!(K.capabilities&16384):!1}e.hasFileAtomicReadCapability=T;var d;(function(K){K.FileExists="EntryExists",K.FileNotFound="EntryNotFound",K.FileNotADirectory="EntryNotADirectory",K.FileIsADirectory="EntryIsADirectory",K.FileExceedsMemoryLimit="EntryExceedsMemoryLimit",K.FileTooLarge="EntryTooLarge",K.FileWriteLocked="EntryWriteLocked",K.NoPermissions="NoPermissions",K.Unavailable="Unavailable",K.Unknown="Unknown"})(d=e.FileSystemProviderErrorCode||(e.FileSystemProviderErrorCode={}));class g extends Error{constructor(H,te){super(H);this.code=te}}e.FileSystemProviderError=g;function b(K,H){const te=new g(K.toString(),H);return I(te,H),te}e.createFileSystemProviderError=b;function l(K){return K||b((0,y.localize)(0,null),d.Unknown)}e.ensureFileSystemProviderError=l;function I(K,H){return K.name=H?`${H} (FileSystemError)`:"FileSystemError",K}e.markAsFileSystemProviderError=I;function r(K){if(!K)return d.Unknown;if(K instanceof g)return K.code;const H=/^(.+) \(FileSystemError\)$/.exec(K.name);if(!H)return d.Unknown;switch(H[1]){case d.FileExists:return d.FileExists;case d.FileIsADirectory:return d.FileIsADirectory;case d.FileNotADirectory:return d.FileNotADirectory;case d.FileNotFound:return d.FileNotFound;case d.FileExceedsMemoryLimit:return d.FileExceedsMemoryLimit;case d.FileTooLarge:return d.FileTooLarge;case d.FileWriteLocked:return d.FileWriteLocked;case d.NoPermissions:return d.NoPermissions;case d.Unavailable:return d.Unavailable}return d.Unknown}e.toFileSystemProviderErrorCode=r;function i(K){if(K instanceof _)return K.fileOperationResult;switch(r(K)){case d.FileNotFound:return 1;case d.FileIsADirectory:return 0;case d.FileNotADirectory:return 10;case d.FileWriteLocked:return 5;case d.NoPermissions:return 6;case d.FileExists:return 4;case d.FileExceedsMemoryLimit:return 9;case d.FileTooLarge:return 7;default:return 11}}e.toFileOperationResult=i;var c;(function(K){K[K.CREATE=0]="CREATE",K[K.DELETE=1]="DELETE",K[K.MOVE=2]="MOVE",K[K.COPY=3]="COPY",K[K.WRITE=4]="WRITE"})(c=e.FileOperation||(e.FileOperation={}));class t{constructor(H,te,ae){this.resource=H,this.operation=te,this.target=ae}isOperation(H){return this.operation===H}}e.FileOperationEvent=t;var a;(function(K){K[K.UPDATED=0]="UPDATED",K[K.ADDED=1]="ADDED",K[K.DELETED=2]="DELETED"})(a=e.FileChangeType||(e.FileChangeType={}));class p{constructor(H,te){this.added=void 0,this.updated=void 0,this.deleted=void 0,this.rawChanges=[],this.rawAdded=[],this.rawUpdated=[],this.rawDeleted=[],this.rawChanges=H;const ae=new Map;for(const ee of H){const ce=ae.get(ee.type);switch(ce?ce.push([ee.resource,ee]):ae.set(ee.type,[[ee.resource,ee]]),ee.type){case 1:this.rawAdded.push(ee.resource);break;case 0:this.rawUpdated.push(ee.resource);break;case 2:this.rawDeleted.push(ee.resource);break}}for(const[ee,ce]of ae)switch(ee){case 1:this.added=k.TernarySearchTree.forUris(()=>te),this.added.fill(ce);break;case 0:this.updated=k.TernarySearchTree.forUris(()=>te),this.updated.fill(ce);break;case 2:this.deleted=k.TernarySearchTree.forUris(()=>te),this.deleted.fill(ce);break}}contains(H,...te){return this.doContains(H,{includeChildren:!1},...te)}affects(H,...te){return this.doContains(H,{includeChildren:!0},...te)}doContains(H,te,...ae){if(!H)return!1;const ee=ae.length>0;return!!((!ee||ae.includes(1))&&(this.added?.get(H)||te.includeChildren&&this.added?.findSuperstr(H))||(!ee||ae.includes(0))&&(this.updated?.get(H)||te.includeChildren&&this.updated?.findSuperstr(H))||(!ee||ae.includes(2))&&(this.deleted?.findSubstr(H)||te.includeChildren&&this.deleted?.findSuperstr(H)))}gotAdded(){return!!this.added}gotDeleted(){return!!this.deleted}gotUpdated(){return!!this.updated}}e.FileChangesEvent=p;function h(K,H,te){return!K||!H||K===H||H.length>K.length?!1:(H.charAt(H.length-1)!==w.sep&&(H+=w.sep),te?(0,B.startsWithIgnoreCase)(K,H):K.indexOf(H)===0)}e.isParent=h;class _ extends o.ErrorNoTelemetry{constructor(H,te,ae){super(H);this.fileOperationResult=te,this.options=ae}}e.FileOperationError=_;class P extends _{constructor(H,te,ae){super(H,2,ae);this.stat=te}}e.NotModifiedSinceFileOperationError=P;var R;(function(K){K[K.FILE_IS_DIRECTORY=0]="FILE_IS_DIRECTORY",K[K.FILE_NOT_FOUND=1]="FILE_NOT_FOUND",K[K.FILE_NOT_MODIFIED_SINCE=2]="FILE_NOT_MODIFIED_SINCE",K[K.FILE_MODIFIED_SINCE=3]="FILE_MODIFIED_SINCE",K[K.FILE_MOVE_CONFLICT=4]="FILE_MOVE_CONFLICT",K[K.FILE_WRITE_LOCKED=5]="FILE_WRITE_LOCKED",K[K.FILE_PERMISSION_DENIED=6]="FILE_PERMISSION_DENIED",K[K.FILE_TOO_LARGE=7]="FILE_TOO_LARGE",K[K.FILE_INVALID_PATH=8]="FILE_INVALID_PATH",K[K.FILE_EXCEEDS_MEMORY_LIMIT=9]="FILE_EXCEEDS_MEMORY_LIMIT",K[K.FILE_NOT_DIRECTORY=10]="FILE_NOT_DIRECTORY",K[K.FILE_OTHER_ERROR=11]="FILE_OTHER_ERROR"})(R=e.FileOperationResult||(e.FileOperationResult={})),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";var $;(function(K){K[K.FILE=0]="FILE",K[K.FOLDER=1]="FOLDER",K[K.ROOT_FOLDER=2]="ROOT_FOLDER"})($=e.FileKind||(e.FileKind={})),e.ETAG_DISABLED="";function E(K){if(!(typeof K.size!="number"||typeof K.mtime!="number"))return K.mtime.toString(29)+K.size.toString(31)}e.etag=E;async function z(K,H){if(!H.hasProvider(A.URI.from({scheme:K.scheme})))return new Promise(te=>{const ae=H.onDidChangeFileSystemProviderRegistrations(ee=>{ee.scheme===K.scheme&&ee.added&&(ae.dispose(),te())})})}e.whenProviderRegistered=z,e.MIN_MAX_MEMORY_SIZE_MB=2048,e.FALLBACK_MAX_MEMORY_SIZE_MB=4096;class V{static formatSize(H){return(0,S.isNumber)(H)||(H=0),H<V.KB?(0,y.localize)(1,null,H.toFixed(0)):H<V.MB?(0,y.localize)(2,null,(H/V.KB).toFixed(2)):H<V.GB?(0,y.localize)(3,null,(H/V.MB).toFixed(2)):H<V.TB?(0,y.localize)(4,null,(H/V.GB).toFixed(2)):(0,y.localize)(5,null,(H/V.TB).toFixed(2))}}e.ByteSize=V,V.KB=1024,V.MB=V.KB*V.KB,V.GB=V.MB*V.KB,V.TB=V.GB*V.KB;var W;(function(K){K[K.IA32=0]="IA32",K[K.OTHER=1]="OTHER"})(W=e.Arch||(e.Arch={}));function Q(K){return{maxFileSize:K===0?300*V.MB:16*V.GB,maxHeapSize:K===0?700*V.MB:2*700*V.MB}}e.getPlatformLimits=Q}),define(Ee[56],we([1,0]),function(J,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ServiceCollection=void 0;class o{constructor(...w){this._entries=new Map;for(let[B,S]of w)this.set(B,S)}set(w,B){const S=this._entries.get(w);return this._entries.set(w,B),S}has(w){return this._entries.has(w)}get(w){return this._entries.get(w)}}e.ServiceCollection=o}),define(Ee[139],we([1,0,13,15,76,137,3,56]),function(J,e,o,k,w,B,S,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Trace=e.InstantiationService=void 0;const y=!1;class M extends Error{constructor(s){super("cyclic dependency between services");this.message=s.findCycleSlow()??`UNABLE to detect cycle, dumping graph:
${s.toString()}`}}class L{constructor(s=new A.ServiceCollection,n=!1,f){this._activeInstantiations=new Set,this._services=s,this._strict=n,this._parent=f,this._services.set(S.IInstantiationService,this)}createChild(s){return new L(s,this._strict,this)}invokeFunction(s,...n){let f=u.traceInvocation(s),D=!1;try{return s({get:d=>{if(D)throw(0,k.illegalState)("service accessor is only valid during the invocation of its target method");const g=this._getOrCreateServiceInstance(d,f);if(!g)throw new Error(`[invokeFunction] unknown service '${d}'`);return g}},...n)}finally{D=!0,f.stop()}}createInstance(s,...n){let f,D;return s instanceof w.SyncDescriptor?(f=u.traceCreation(s.ctor),D=this._createInstance(s.ctor,s.staticArguments.concat(n),f)):(f=u.traceCreation(s),D=this._createInstance(s,n,f)),f.stop(),D}_createInstance(s,n=[],f){let D=S._util.getServiceDependencies(s).sort((g,b)=>g.index-b.index),T=[];for(const g of D){let b=this._getOrCreateServiceInstance(g.id,f);b||this._throwIfStrict(`[createInstance] ${s.name} depends on UNKNOWN service ${g.id}.`,!1),T.push(b)}let d=D.length>0?D[0].index:n.length;if(n.length!==d){console.warn(`[createInstance] First service dependency of ${s.name} at position ${d+1} conflicts with ${n.length} static arguments`);let g=d-n.length;g>0?n=n.concat(new Array(g)):n=n.slice(0,d)}return new s(...[...n,...T])}_setServiceInstance(s,n){if(this._services.get(s)instanceof w.SyncDescriptor)this._services.set(s,n);else if(this._parent)this._parent._setServiceInstance(s,n);else throw new Error("illegalState - setting UNKNOWN service instance")}_getServiceInstanceOrDescriptor(s){let n=this._services.get(s);return!n&&this._parent?this._parent._getServiceInstanceOrDescriptor(s):n}_getOrCreateServiceInstance(s,n){let f=this._getServiceInstanceOrDescriptor(s);return f instanceof w.SyncDescriptor?this._safeCreateAndCacheServiceInstance(s,f,n.branch(s,!0)):(n.branch(s,!1),f)}_safeCreateAndCacheServiceInstance(s,n,f){if(this._activeInstantiations.has(s))throw new Error(`illegal state - RECURSIVELY instantiating service '${s}'`);this._activeInstantiations.add(s);try{return this._createAndCacheServiceInstance(s,n,f)}finally{this._activeInstantiations.delete(s)}}_createAndCacheServiceInstance(s,n,f){const D=new B.Graph(g=>g.id.toString());let T=0;const d=[{id:s,desc:n,_trace:f}];for(;d.length;){const g=d.pop();if(D.lookupOrInsertNode(g),T++>1e3)throw new M(D);for(let b of S._util.getServiceDependencies(g.desc.ctor)){let l=this._getServiceInstanceOrDescriptor(b.id);if(l||this._throwIfStrict(`[createInstance] ${s} depends on ${b.id} which is NOT registered.`,!0),l instanceof w.SyncDescriptor){const I={id:b.id,desc:l,_trace:g._trace.branch(b.id,!0)};D.insertEdge(g,I),d.push(I)}}}for(;;){const g=D.roots();if(g.length===0){if(!D.isEmpty())throw new M(D);break}for(const{data:b}of g){if(this._getServiceInstanceOrDescriptor(b.id)instanceof w.SyncDescriptor){const I=this._createServiceInstanceWithOwner(b.id,b.desc.ctor,b.desc.staticArguments,b.desc.supportsDelayedInstantiation,b._trace);this._setServiceInstance(b.id,I)}D.removeNode(b)}}return this._getServiceInstanceOrDescriptor(s)}_createServiceInstanceWithOwner(s,n,f=[],D,T){if(this._services.get(s)instanceof w.SyncDescriptor)return this._createServiceInstance(n,f,D,T);if(this._parent)return this._parent._createServiceInstanceWithOwner(s,n,f,D,T);throw new Error(`illegalState - creating UNKNOWN service instance ${n.name}`)}_createServiceInstance(s,n=[],f,D){if(f){const T=new o.IdleValue(()=>this._createInstance(s,n,D));return new Proxy(Object.create(null),{get(d,g){if(g in d)return d[g];let b=T.value,l=b[g];return typeof l!="function"||(l=l.bind(b),d[g]=l),l},set(d,g,b){return T.value[g]=b,!0}})}else return this._createInstance(s,n,D)}_throwIfStrict(s,n){if(n&&console.warn(n),this._strict)throw new Error(s)}}e.InstantiationService=L;var v;(function(m){m[m.Creation=0]="Creation",m[m.Invocation=1]="Invocation",m[m.Branch=2]="Branch"})(v||(v={}));class u{constructor(s,n){this.type=s,this.name=n,this._start=Date.now(),this._dep=[]}static traceInvocation(s){return y?new u(1,s.name||s.toString().substring(0,42).replace(/\n/g,"")):u._None}static traceCreation(s){return y?new u(0,s.name):u._None}branch(s,n){let f=new u(2,s.toString());return this._dep.push([s,n,f]),f}stop(){let s=Date.now()-this._start;u._totals+=s;let n=!1;function f(T,d){let g=[],b=new Array(T+1).join(" ");for(const[l,I,r]of d._dep)if(I&&r){n=!0,g.push(`${b}CREATES -> ${l}`);let i=f(T+1,r);i&&g.push(i)}else g.push(`${b}uses -> ${l}`);return g.join(`
`)}let D=[`${this.type===0?"CREATE":"CALL"} ${this.name}`,`${f(1,this)}`,`DONE, took ${s.toFixed(2)}ms (grand total ${u._totals.toFixed(2)}ms)`];(s>2||n)&&console.log(D.join(`
`))}}e.Trace=u,u._None=new class extends u{constructor(){super(-1,null)}stop(){}branch(){return this}},u._totals=0}),define(Ee[12],we([1,0,43,5,6,23,3]),function(J,e,o,k,w,B,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LogLevelToString=e.parseLogLevel=e.getLogLevel=e.NullLogService=e.AbstractLoggerService=e.LogService=e.MultiplexLogService=e.AdapterLogger=e.ConsoleLogger=e.ConsoleMainLogger=e.AbstractMessageLogger=e.AbstractLogger=e.format=e.log=e.DEFAULT_LOG_LEVEL=e.LogLevel=e.ILoggerService=e.ILogService=void 0,e.ILogService=(0,S.createDecorator)("logService"),e.ILoggerService=(0,S.createDecorator)("loggerService");function A(){return new Date().toISOString()}var y;(function(I){I[I.Trace=0]="Trace",I[I.Debug=1]="Debug",I[I.Info=2]="Info",I[I.Warning=3]="Warning",I[I.Error=4]="Error",I[I.Critical=5]="Critical",I[I.Off=6]="Off"})(y=e.LogLevel||(e.LogLevel={})),e.DEFAULT_LOG_LEVEL=y.Info;function M(I,r,i){switch(r){case y.Trace:I.trace(i);break;case y.Debug:I.debug(i);break;case y.Info:I.info(i);break;case y.Warning:I.warn(i);break;case y.Error:I.error(i);break;case y.Critical:I.critical(i);break;default:throw new Error("Invalid log level")}}e.log=M;function L(I){let r="";for(let i=0;i<I.length;i++){let c=I[i];if(typeof c=="object")try{c=JSON.stringify(c)}catch{}r+=(i>0?" ":"")+c}return r}e.format=L;class v extends w.Disposable{constructor(){super(...arguments);this.level=e.DEFAULT_LOG_LEVEL,this._onDidChangeLogLevel=this._register(new k.Emitter),this.onDidChangeLogLevel=this._onDidChangeLogLevel.event}setLevel(r){this.level!==r&&(this.level=r,this._onDidChangeLogLevel.fire(this.level))}getLevel(){return this.level}}e.AbstractLogger=v;class u extends v{constructor(r){super();this.logAlways=r}checkLogLevel(r){return this.logAlways||this.getLevel()<=r}trace(r,...i){this.checkLogLevel(y.Trace)&&this.log(y.Trace,L([r,...i]))}debug(r,...i){this.checkLogLevel(y.Debug)&&this.log(y.Debug,L([r,...i]))}info(r,...i){this.checkLogLevel(y.Info)&&this.log(y.Info,L([r,...i]))}warn(r,...i){this.checkLogLevel(y.Warning)&&this.log(y.Warning,L([r,...i]))}error(r,...i){if(this.checkLogLevel(y.Error))if(r instanceof Error){const c=Array.prototype.slice.call(arguments);c[0]=r.stack,this.log(y.Error,L(c))}else this.log(y.Error,L([r,...i]))}critical(r,...i){this.checkLogLevel(y.Critical)&&this.log(y.Critical,L([r,...i]))}flush(){}}e.AbstractMessageLogger=u;class m extends v{constructor(r=e.DEFAULT_LOG_LEVEL){super();this.setLevel(r),this.useColors=!B.isWindows}trace(r,...i){this.getLevel()<=y.Trace&&(this.useColors?console.log(`[90m[main ${A()}][0m`,r,...i):console.log(`[main ${A()}]`,r,...i))}debug(r,...i){this.getLevel()<=y.Debug&&(this.useColors?console.log(`[90m[main ${A()}][0m`,r,...i):console.log(`[main ${A()}]`,r,...i))}info(r,...i){this.getLevel()<=y.Info&&(this.useColors?console.log(`[90m[main ${A()}][0m`,r,...i):console.log(`[main ${A()}]`,r,...i))}warn(r,...i){this.getLevel()<=y.Warning&&(this.useColors?console.warn(`[93m[main ${A()}][0m`,r,...i):console.warn(`[main ${A()}]`,r,...i))}error(r,...i){this.getLevel()<=y.Error&&(this.useColors?console.error(`[91m[main ${A()}][0m`,r,...i):console.error(`[main ${A()}]`,r,...i))}critical(r,...i){this.getLevel()<=y.Critical&&(this.useColors?console.error(`[90m[main ${A()}][0m`,r,...i):console.error(`[main ${A()}]`,r,...i))}dispose(){}flush(){}}e.ConsoleMainLogger=m;class s extends v{constructor(r=e.DEFAULT_LOG_LEVEL){super();this.setLevel(r)}trace(r,...i){this.getLevel()<=y.Trace&&console.log("%cTRACE","color: #888",r,...i)}debug(r,...i){this.getLevel()<=y.Debug&&console.log("%cDEBUG","background: #eee; color: #888",r,...i)}info(r,...i){this.getLevel()<=y.Info&&console.log("%c INFO","color: #33f",r,...i)}warn(r,...i){this.getLevel()<=y.Warning&&console.log("%c WARN","color: #993",r,...i)}error(r,...i){this.getLevel()<=y.Error&&console.log("%c ERR","color: #f33",r,...i)}critical(r,...i){this.getLevel()<=y.Critical&&console.log("%cCRITI","background: #f33; color: white",r,...i)}dispose(){}flush(){}}e.ConsoleLogger=s;class n extends v{constructor(r,i=e.DEFAULT_LOG_LEVEL){super();this.adapter=r,this.setLevel(i)}trace(r,...i){this.getLevel()<=y.Trace&&this.adapter.log(y.Trace,[this.extractMessage(r),...i])}debug(r,...i){this.getLevel()<=y.Debug&&this.adapter.log(y.Debug,[this.extractMessage(r),...i])}info(r,...i){this.getLevel()<=y.Info&&this.adapter.log(y.Info,[this.extractMessage(r),...i])}warn(r,...i){this.getLevel()<=y.Warning&&this.adapter.log(y.Warning,[this.extractMessage(r),...i])}error(r,...i){this.getLevel()<=y.Error&&this.adapter.log(y.Error,[this.extractMessage(r),...i])}critical(r,...i){this.getLevel()<=y.Critical&&this.adapter.log(y.Critical,[this.extractMessage(r),...i])}extractMessage(r){return typeof r=="string"?r:(0,o.toErrorMessage)(r,this.getLevel()<=y.Trace)}dispose(){}flush(){}}e.AdapterLogger=n;class f extends v{constructor(r){super();this.logServices=r,r.length&&this.setLevel(r[0].getLevel())}setLevel(r){for(const i of this.logServices)i.setLevel(r);super.setLevel(r)}trace(r,...i){for(const c of this.logServices)c.trace(r,...i)}debug(r,...i){for(const c of this.logServices)c.debug(r,...i)}info(r,...i){for(const c of this.logServices)c.info(r,...i)}warn(r,...i){for(const c of this.logServices)c.warn(r,...i)}error(r,...i){for(const c of this.logServices)c.error(r,...i)}critical(r,...i){for(const c of this.logServices)c.critical(r,...i)}flush(){for(const r of this.logServices)r.flush()}dispose(){for(const r of this.logServices)r.dispose()}}e.MultiplexLogService=f;class D extends w.Disposable{constructor(r){super();this.logger=r,this._register(r)}get onDidChangeLogLevel(){return this.logger.onDidChangeLogLevel}setLevel(r){this.logger.setLevel(r)}getLevel(){return this.logger.getLevel()}trace(r,...i){this.logger.trace(r,...i)}debug(r,...i){this.logger.debug(r,...i)}info(r,...i){this.logger.info(r,...i)}warn(r,...i){this.logger.warn(r,...i)}error(r,...i){this.logger.error(r,...i)}critical(r,...i){this.logger.critical(r,...i)}flush(){this.logger.flush()}}e.LogService=D;class T extends w.Disposable{constructor(r,i){super();this.logLevel=r,this.loggers=new Map,this.logLevelChangeableLoggers=[],this._register(i(c=>{this.logLevel=c,this.logLevelChangeableLoggers.forEach(t=>t.setLevel(c))}))}getLogger(r){return this.loggers.get(r.toString())}createLogger(r,i){let c=this.loggers.get(r.toString());return c||(c=this.doCreateLogger(r,i?.always?y.Trace:this.logLevel,i),this.loggers.set(r.toString(),c),i?.always||this.logLevelChangeableLoggers.push(c)),c}dispose(){this.logLevelChangeableLoggers.splice(0,this.logLevelChangeableLoggers.length),this.loggers.forEach(r=>r.dispose()),this.loggers.clear(),super.dispose()}}e.AbstractLoggerService=T;class d{constructor(){this.onDidChangeLogLevel=new k.Emitter().event}setLevel(r){}getLevel(){return y.Info}trace(r,...i){}debug(r,...i){}info(r,...i){}warn(r,...i){}error(r,...i){}critical(r,...i){}dispose(){}flush(){}}e.NullLogService=d;function g(I){if(I.verbose)return y.Trace;if(typeof I.logLevel=="string"){const r=b(I.logLevel.toLowerCase());if(r!==void 0)return r}return e.DEFAULT_LOG_LEVEL}e.getLogLevel=g;function b(I){switch(I){case"trace":return y.Trace;case"debug":return y.Debug;case"info":return y.Info;case"warn":return y.Warning;case"error":return y.Error;case"critical":return y.Critical;case"off":return y.Off}}e.parseLogLevel=b;function l(I){switch(I){case y.Trace:return"trace";case y.Debug:return"debug";case y.Info:return"info";case y.Warning:return"warn";case y.Error:return"error";case y.Critical:return"critical";case y.Off:return"off"}}e.LogLevelToString=l}),define(Ee[78],we([1,0,34,120,3]),function(J,e,o,k,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IMarkerService=e.IMarkerData=e.MarkerSeverity=e.MarkerTag=void 0;var B;(function(y){y[y.Unnecessary=1]="Unnecessary",y[y.Deprecated=2]="Deprecated"})(B=e.MarkerTag||(e.MarkerTag={}));var S;(function(y){y[y.Hint=1]="Hint",y[y.Info=2]="Info",y[y.Warning=4]="Warning",y[y.Error=8]="Error"})(S=e.MarkerSeverity||(e.MarkerSeverity={})),function(y){function M(s,n){return n-s}y.compare=M;const L=Object.create(null);L[y.Error]=(0,k.localize)(0,null),L[y.Warning]=(0,k.localize)(1,null),L[y.Info]=(0,k.localize)(2,null);function v(s){return L[s]||""}y.toString=v;function u(s){switch(s){case o.default.Error:return y.Error;case o.default.Warning:return y.Warning;case o.default.Info:return y.Info;case o.default.Ignore:return y.Hint}}y.fromSeverity=u;function m(s){switch(s){case y.Error:return o.default.Error;case y.Warning:return o.default.Warning;case y.Info:return o.default.Info;case y.Hint:return o.default.Ignore}}y.toSeverity=m}(S=e.MarkerSeverity||(e.MarkerSeverity={}));var A;(function(y){const M="";function L(u){return v(u,!0)}y.makeKey=L;function v(u,m){let s=[M];return u.source?s.push(u.source.replace("\xA6","\\\xA6")):s.push(M),u.code?typeof u.code=="string"?s.push(u.code.replace("\xA6","\\\xA6")):s.push(u.code.value.replace("\xA6","\\\xA6")):s.push(M),u.severity!==void 0&&u.severity!==null?s.push(S.toString(u.severity)):s.push(M),u.message&&m?s.push(u.message.replace("\xA6","\\\xA6")):s.push(M),u.startLineNumber!==void 0&&u.startLineNumber!==null?s.push(u.startLineNumber.toString()):s.push(M),u.startColumn!==void 0&&u.startColumn!==null?s.push(u.startColumn.toString()):s.push(M),u.endLineNumber!==void 0&&u.endLineNumber!==null?s.push(u.endLineNumber.toString()):s.push(M),u.endColumn!==void 0&&u.endColumn!==null?s.push(u.endColumn.toString()):s.push(M),s.push(M),s.join("\xA6")}y.makeKeyOptionalMessage=v})(A=e.IMarkerData||(e.IMarkerData={})),e.IMarkerService=(0,w.createDecorator)("markerService")}),define(Ee[140],we([1,0,5,34,3]),function(J,e,o,k,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NoOpProgress=e.NoOpNotification=e.NotificationsFilter=e.NeverShowAgainScope=e.INotificationService=e.Severity=void 0,e.Severity=k.default,e.INotificationService=(0,w.createDecorator)("notificationService");var B;(function(M){M[M.WORKSPACE=0]="WORKSPACE",M[M.GLOBAL=1]="GLOBAL"})(B=e.NeverShowAgainScope||(e.NeverShowAgainScope={}));var S;(function(M){M[M.OFF=0]="OFF",M[M.SILENT=1]="SILENT",M[M.ERROR=2]="ERROR"})(S=e.NotificationsFilter||(e.NotificationsFilter={}));class A{constructor(){this.progress=new y,this.onDidClose=o.Event.None,this.onDidChangeVisibility=o.Event.None}updateSeverity(L){}updateMessage(L){}updateActions(L){}close(){}}e.NoOpNotification=A;class y{infinite(){}done(){}total(L){}worked(L){}}e.NoOpProgress=y}),define(Ee[79],we([1,0,6,10,2,3]),function(J,e,o,k,w,B){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.extractSelection=e.withSelection=e.matchesSomeScheme=e.matchesScheme=e.NullOpenerService=e.IOpenerService=void 0,e.IOpenerService=(0,B.createDecorator)("openerService"),e.NullOpenerService=Object.freeze({_serviceBrand:void 0,registerOpener(){return o.Disposable.None},registerValidator(){return o.Disposable.None},registerExternalUriResolver(){return o.Disposable.None},setDefaultExternalOpener(){},registerExternalOpener(){return o.Disposable.None},async open(){return!1},async resolveExternalUri(L){return{resolved:L,dispose(){}}}});function S(L,v){return w.URI.isUri(L)?(0,k.equalsIgnoreCase)(L.scheme,v):(0,k.startsWithIgnoreCase)(L,v+":")}e.matchesScheme=S;function A(L,...v){return v.some(u=>S(L,u))}e.matchesSomeScheme=A;function y(L,v){return L.with({fragment:`${v.startLineNumber},${v.startColumn}${v.endLineNumber?`-${v.endLineNumber}${v.endColumn?`,${v.endColumn}`:""}`:""}`})}e.withSelection=y;function M(L){let v;const u=/^L?(\d+)(?:,(\d+))?(-L?(\d+)(?:,(\d+))?)?/.exec(L.fragment);return u&&(v={startLineNumber:parseInt(u[1]),startColumn:u[2]?parseInt(u[2]):1,endLineNumber:u[4]?parseInt(u[4]):void 0,endColumn:u[4]?u[5]?parseInt(u[5]):1:void 0},L=L.with({fragment:""})),{selection:v,uri:L}}e.extractSelection=M});var Fe=this&&this.__decorate||function(J,e,o,k){var w=arguments.length,B=w<3?e:k===null?k=Object.getOwnPropertyDescriptor(e,o):k,S;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")B=Reflect.decorate(J,e,o,k);else for(var A=J.length-1;A>=0;A--)(S=J[A])&&(B=(w<3?S(B):w>3?S(e,o,B):S(e,o))||B);return w>3&&B&&Object.defineProperty(e,o,B),B},Ne=this&&this.__param||function(J,e){return function(o,k){e(o,k,J)}};define(Ee[141],we([1,0,13,20,6,3]),function(J,e,o,k,w,B){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IEditorProgressService=e.LongRunningOperation=e.UnmanagedProgress=e.Progress=e.emptyProgressRunner=e.ProgressLocation=e.IProgressService=void 0,e.IProgressService=(0,B.createDecorator)("progressService");var S;(function(L){L[L.Explorer=1]="Explorer",L[L.Scm=3]="Scm",L[L.Extensions=5]="Extensions",L[L.Window=10]="Window",L[L.Notification=15]="Notification",L[L.Dialog=20]="Dialog"})(S=e.ProgressLocation||(e.ProgressLocation={})),e.emptyProgressRunner=Object.freeze({total(){},worked(){},done(){}});class A{constructor(v){this.callback=v}get value(){return this._value}report(v){this._value=v,this.callback(this._value)}}e.Progress=A,A.None=Object.freeze({report(){}});let y=class extends w.Disposable{constructor(v,u){super();this.deferred=new o.DeferredPromise,u.withProgress(v,m=>(this.reporter=m,this.lastStep&&m.report(this.lastStep),this.deferred.p)),this._register((0,w.toDisposable)(()=>this.deferred.complete()))}report(v){this.reporter?this.reporter.report(v):this.lastStep=v}};y=Fe([Ne(1,e.IProgressService)],y),e.UnmanagedProgress=y;class M extends w.Disposable{constructor(v){super();this.progressIndicator=v,this.currentOperationId=0,this.currentOperationDisposables=this._register(new w.DisposableStore)}start(v){this.stop();const u=++this.currentOperationId,m=new k.CancellationTokenSource;return this.currentProgressTimeout=setTimeout(()=>{u===this.currentOperationId&&(this.currentProgressRunner=this.progressIndicator.show(!0))},v),this.currentOperationDisposables.add((0,w.toDisposable)(()=>clearTimeout(this.currentProgressTimeout))),this.currentOperationDisposables.add((0,w.toDisposable)(()=>m.cancel())),this.currentOperationDisposables.add((0,w.toDisposable)(()=>this.currentProgressRunner?this.currentProgressRunner.done():void 0)),{id:u,token:m.token,stop:()=>this.doStop(u),isCurrent:()=>this.currentOperationId===u}}stop(){this.doStop(this.currentOperationId)}doStop(v){this.currentOperationId===v&&this.currentOperationDisposables.clear()}}e.LongRunningOperation=M,e.IEditorProgressService=(0,B.createDecorator)("editorProgressService")}),define(Ee[37],we([1,0,42,11]),function(J,e,o,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Registry=void 0;class w{constructor(){this.data=new Map}add(S,A){o.ok(k.isString(S)),o.ok(k.isObject(A)),o.ok(!this.data.has(S),"There is already an extension with this id"),this.data.set(S,A)}knows(S){return this.data.has(S)}as(S){return this.data.get(S)||null}}e.Registry=new w}),define(Ee[142],we([1,0,5,37]),function(J,e,o,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Extensions=void 0,e.Extensions={JSONContribution:"base.contributions.json"};function w(A){return A.length>0&&A.charAt(A.length-1)==="#"?A.substring(0,A.length-1):A}class B{constructor(){this._onDidChangeSchema=new o.Emitter,this.onDidChangeSchema=this._onDidChangeSchema.event,this.schemasById={}}registerSchema(y,M){this.schemasById[w(y)]=M,this._onDidChangeSchema.fire(y)}notifySchemaChanged(y){this._onDidChangeSchema.fire(y)}getSchemaContributions(){return{schemas:this.schemasById}}}const S=new B;k.Registry.add(e.Extensions.JSONContribution,S)}),define(Ee[80],we([1,0,16,5,11,117,142,37]),function(J,e,o,k,w,B,S,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getScopes=e.validateProperty=e.getDefaultValue=e.keyFromOverrideIdentifiers=e.overrideIdentifiersFromKey=e.OVERRIDE_PROPERTY_REGEX=e.OVERRIDE_PROPERTY_PATTERN=e.configurationDefaultsSchemaId=e.resourceLanguageSettingsSchemaId=e.resourceSettings=e.windowSettings=e.machineOverridableSettings=e.machineSettings=e.applicationSettings=e.allSettings=e.ConfigurationScope=e.Extensions=e.EditPresentationTypes=void 0;var y;(function(g){g.Multiline="multilineText",g.Singleline="singlelineText"})(y=e.EditPresentationTypes||(e.EditPresentationTypes={})),e.Extensions={Configuration:"base.contributions.configuration"};var M;(function(g){g[g.APPLICATION=1]="APPLICATION",g[g.MACHINE=2]="MACHINE",g[g.WINDOW=3]="WINDOW",g[g.RESOURCE=4]="RESOURCE",g[g.LANGUAGE_OVERRIDABLE=5]="LANGUAGE_OVERRIDABLE",g[g.MACHINE_OVERRIDABLE=6]="MACHINE_OVERRIDABLE"})(M=e.ConfigurationScope||(e.ConfigurationScope={})),e.allSettings={properties:{},patternProperties:{}},e.applicationSettings={properties:{},patternProperties:{}},e.machineSettings={properties:{},patternProperties:{}},e.machineOverridableSettings={properties:{},patternProperties:{}},e.windowSettings={properties:{},patternProperties:{}},e.resourceSettings={properties:{},patternProperties:{}},e.resourceLanguageSettingsSchemaId="vscode://schemas/settings/resourceLanguage",e.configurationDefaultsSchemaId="vscode://schemas/settings/configurationDefaults";const L=A.Registry.as(S.Extensions.JSONContribution);class v{constructor(){this.overrideIdentifiers=new Set,this._onDidSchemaChange=new k.Emitter,this.onDidSchemaChange=this._onDidSchemaChange.event,this._onDidUpdateConfiguration=new k.Emitter,this.onDidUpdateConfiguration=this._onDidUpdateConfiguration.event,this.configurationDefaultsOverrides=new Map,this.defaultLanguageConfigurationOverridesNode={id:"defaultOverrides",title:B.localize(0,null),properties:{}},this.configurationContributors=[this.defaultLanguageConfigurationOverridesNode],this.resourceLanguageSettingsSchema={properties:{},patternProperties:{},additionalProperties:!1,errorMessage:"Unknown editor configuration setting",allowTrailingCommas:!0,allowComments:!0},this.configurationProperties={},this.excludedConfigurationProperties={},L.registerSchema(e.resourceLanguageSettingsSchemaId,this.resourceLanguageSettingsSchema),this.registerOverridePropertyPatternKey()}registerConfiguration(b,l=!0){this.registerConfigurations([b],l)}registerConfigurations(b,l=!0){const I=this.doRegisterConfigurations(b,l);L.registerSchema(e.resourceLanguageSettingsSchemaId,this.resourceLanguageSettingsSchema),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire({properties:I})}deregisterConfigurations(b){const l=this.doDeregisterConfigurations(b);L.registerSchema(e.resourceLanguageSettingsSchemaId,this.resourceLanguageSettingsSchema),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire({properties:l})}updateConfigurations({add:b,remove:l}){const I=[];I.push(...this.doDeregisterConfigurations(l)),I.push(...this.doRegisterConfigurations(b,!1)),L.registerSchema(e.resourceLanguageSettingsSchemaId,this.resourceLanguageSettingsSchema),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire({properties:(0,o.distinct)(I)})}registerDefaultConfigurations(b){const l=[],I=[];for(const{overrides:r,source:i}of b)for(const c in r)if(l.push(c),e.OVERRIDE_PROPERTY_REGEX.test(c)){const t={...this.configurationDefaultsOverrides.get(c)?.value||{},...r[c]};this.configurationDefaultsOverrides.set(c,{source:i,value:t});const a={type:"object",default:t,description:B.localize(1,null,c),$ref:e.resourceLanguageSettingsSchemaId,defaultDefaultValue:t,source:w.isString(i)?void 0:i};I.push(...s(c)),this.configurationProperties[c]=a,this.defaultLanguageConfigurationOverridesNode.properties[c]=a}else{this.configurationDefaultsOverrides.set(c,{value:r[c],source:i});const t=this.configurationProperties[c];t&&(this.updatePropertyDefaultValue(c,t),this.updateSchema(c,t))}this.registerOverrideIdentifiers(I),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire({properties:l,defaultsOverrides:!0})}deregisterDefaultConfigurations(b){const l=[];for(const{overrides:I,source:r}of b)for(const i in I){const c=this.configurationDefaultsOverrides.get(i),t=w.isString(r)?r:r?.id,a=w.isString(c?.source)?c?.source:c?.source?.id;if(t===a)if(l.push(i),this.configurationDefaultsOverrides.delete(i),e.OVERRIDE_PROPERTY_REGEX.test(i))delete this.configurationProperties[i],delete this.defaultLanguageConfigurationOverridesNode.properties[i];else{const p=this.configurationProperties[i];p&&(this.updatePropertyDefaultValue(i,p),this.updateSchema(i,p))}}this.updateOverridePropertyPatternKey(),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire({properties:l,defaultsOverrides:!0})}notifyConfigurationSchemaUpdated(...b){this._onDidSchemaChange.fire()}registerOverrideIdentifiers(b){for(const l of b)this.overrideIdentifiers.add(l);this.updateOverridePropertyPatternKey()}doRegisterConfigurations(b,l){const I=[];return b.forEach(r=>{I.push(...this.validateAndRegisterProperties(r,l,r.extensionInfo,r.restrictedProperties)),this.configurationContributors.push(r),this.registerJSONConfiguration(r)}),I}doDeregisterConfigurations(b){const l=[],I=r=>{if(r.properties)for(const i in r.properties)l.push(i),delete this.configurationProperties[i],this.removeFromSchema(i,r.properties[i]);r.allOf&&r.allOf.forEach(i=>I(i))};for(const r of b){I(r);const i=this.configurationContributors.indexOf(r);i!==-1&&this.configurationContributors.splice(i,1)}return l}validateAndRegisterProperties(b,l=!0,I,r,i=3){i=w.isUndefinedOrNull(b.scope)?i:b.scope;let c=[],t=b.properties;if(t)for(let p in t){if(l&&T(p)){delete t[p];continue}const h=t[p];if(h.source=I,h.defaultDefaultValue=t[p].default,this.updatePropertyDefaultValue(p,h),e.OVERRIDE_PROPERTY_REGEX.test(p)?h.scope=void 0:(h.scope=w.isUndefinedOrNull(h.scope)?i:h.scope,h.restricted=w.isUndefinedOrNull(h.restricted)?!!r?.includes(p):h.restricted),t[p].hasOwnProperty("included")&&!t[p].included){this.excludedConfigurationProperties[p]=t[p],delete t[p];continue}else this.configurationProperties[p]=t[p];!t[p].deprecationMessage&&t[p].markdownDeprecationMessage&&(t[p].deprecationMessage=t[p].markdownDeprecationMessage),c.push(p)}let a=b.allOf;if(a)for(let p of a)c.push(...this.validateAndRegisterProperties(p,l,I,r,i));return c}getConfigurations(){return this.configurationContributors}getConfigurationProperties(){return this.configurationProperties}getExcludedConfigurationProperties(){return this.excludedConfigurationProperties}getConfigurationDefaultsOverrides(){return this.configurationDefaultsOverrides}registerJSONConfiguration(b){const l=I=>{let r=I.properties;if(r)for(const c in r)this.updateSchema(c,r[c]);let i=I.allOf;i&&i.forEach(l)};l(b)}updateSchema(b,l){switch(e.allSettings.properties[b]=l,l.scope){case 1:e.applicationSettings.properties[b]=l;break;case 2:e.machineSettings.properties[b]=l;break;case 6:e.machineOverridableSettings.properties[b]=l;break;case 3:e.windowSettings.properties[b]=l;break;case 4:e.resourceSettings.properties[b]=l;break;case 5:e.resourceSettings.properties[b]=l,this.resourceLanguageSettingsSchema.properties[b]=l;break}}removeFromSchema(b,l){switch(delete e.allSettings.properties[b],l.scope){case 1:delete e.applicationSettings.properties[b];break;case 2:delete e.machineSettings.properties[b];break;case 6:delete e.machineOverridableSettings.properties[b];break;case 3:delete e.windowSettings.properties[b];break;case 4:case 5:delete e.resourceSettings.properties[b],delete this.resourceLanguageSettingsSchema.properties[b];break}}updateOverridePropertyPatternKey(){for(const b of this.overrideIdentifiers.values()){const l=`[${b}]`,I={type:"object",description:B.localize(2,null),errorMessage:B.localize(3,null),$ref:e.resourceLanguageSettingsSchemaId};this.updatePropertyDefaultValue(l,I),e.allSettings.properties[l]=I,e.applicationSettings.properties[l]=I,e.machineSettings.properties[l]=I,e.machineOverridableSettings.properties[l]=I,e.windowSettings.properties[l]=I,e.resourceSettings.properties[l]=I}this._onDidSchemaChange.fire()}registerOverridePropertyPatternKey(){const b={type:"object",description:B.localize(4,null),errorMessage:B.localize(5,null),$ref:e.resourceLanguageSettingsSchemaId};e.allSettings.patternProperties[e.OVERRIDE_PROPERTY_PATTERN]=b,e.applicationSettings.patternProperties[e.OVERRIDE_PROPERTY_PATTERN]=b,e.machineSettings.patternProperties[e.OVERRIDE_PROPERTY_PATTERN]=b,e.machineOverridableSettings.patternProperties[e.OVERRIDE_PROPERTY_PATTERN]=b,e.windowSettings.patternProperties[e.OVERRIDE_PROPERTY_PATTERN]=b,e.resourceSettings.patternProperties[e.OVERRIDE_PROPERTY_PATTERN]=b,this._onDidSchemaChange.fire()}updatePropertyDefaultValue(b,l){const I=this.configurationDefaultsOverrides.get(b);let r=I?.value,i=I?.source;w.isUndefined(r)&&(r=l.defaultDefaultValue,i=void 0),w.isUndefined(r)&&(r=f(l.type)),l.default=r,l.defaultValueSource=i}}const u="\\[([^\\]]+)\\]",m=new RegExp(u,"g");e.OVERRIDE_PROPERTY_PATTERN=`^(${u})+$`,e.OVERRIDE_PROPERTY_REGEX=new RegExp(e.OVERRIDE_PROPERTY_PATTERN);function s(g){const b=[];if(e.OVERRIDE_PROPERTY_REGEX.test(g)){let l=m.exec(g);for(;l?.length;){const I=l[1].trim();I&&b.push(I),l=m.exec(g)}}return(0,o.distinct)(b)}e.overrideIdentifiersFromKey=s;function n(g){return g.reduce((b,l)=>`${b}[${l}]`,"")}e.keyFromOverrideIdentifiers=n;function f(g){switch(Array.isArray(g)?g[0]:g){case"boolean":return!1;case"integer":case"number":return 0;case"string":return"";case"array":return[];case"object":return{};default:return null}}e.getDefaultValue=f;const D=new v;A.Registry.add(e.Extensions.Configuration,D);function T(g){return g.trim()?e.OVERRIDE_PROPERTY_REGEX.test(g)?B.localize(7,null,g):D.getConfigurationProperties()[g]!==void 0?B.localize(8,null,g):null:B.localize(6,null)}e.validateProperty=T;function d(){const g=[],b=D.getConfigurationProperties();for(const l of Object.keys(b))g.push([l,b[l].scope]);return g.push(["launch",4]),g.push(["task",4]),g}e.getScopes=d}),define(Ee[143],we([1,0,16,5,100,6,22,26,11,2,77,80,37]),function(J,e,o,k,w,B,S,A,y,M,L,v,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AllKeysConfigurationChangeEvent=e.ConfigurationChangeEvent=e.mergeChanges=e.Configuration=e.UserSettings=e.ConfigurationModelParser=e.DefaultConfigurationModel=e.ConfigurationModel=void 0;class m{constructor(r={},i=[],c=[]){this._contents=r,this._keys=i,this._overrides=c,this.isFrozen=!1,this.overrideConfigurations=new Map}get contents(){return this.checkAndFreeze(this._contents)}get overrides(){return this.checkAndFreeze(this._overrides)}get keys(){return this.checkAndFreeze(this._keys)}isEmpty(){return this._keys.length===0&&Object.keys(this._contents).length===0&&this._overrides.length===0}getValue(r){return r?(0,L.getConfigurationValue)(this.contents,r):this.contents}getOverrideValue(r,i){const c=this.getContentsForOverrideIdentifer(i);return c?r?(0,L.getConfigurationValue)(c,r):c:void 0}getKeysForOverrideIdentifier(r){const i=[];for(const c of this.overrides)c.identifiers.includes(r)&&i.push(...c.keys);return o.distinct(i)}getAllOverrideIdentifiers(){const r=[];for(const i of this.overrides)r.push(...i.identifiers);return o.distinct(r)}override(r){let i=this.overrideConfigurations.get(r);return i||(i=this.createOverrideConfigurationModel(r),this.overrideConfigurations.set(r,i)),i}merge(...r){const i=A.deepClone(this.contents),c=A.deepClone(this.overrides),t=[...this.keys];for(const a of r){this.mergeContents(i,a.contents);for(const p of a.overrides){const[h]=c.filter(_=>o.equals(_.identifiers,p.identifiers));h?(this.mergeContents(h.contents,p.contents),h.keys.push(...p.keys),h.keys=o.distinct(h.keys)):c.push(A.deepClone(p))}for(const p of a.keys)t.indexOf(p)===-1&&t.push(p)}return new m(i,t,c)}freeze(){return this.isFrozen=!0,this}createOverrideConfigurationModel(r){const i=this.getContentsForOverrideIdentifer(r);if(!i||typeof i!="object"||!Object.keys(i).length)return this;let c={};for(const t of o.distinct([...Object.keys(this.contents),...Object.keys(i)])){let a=this.contents[t],p=i[t];p&&(typeof a=="object"&&typeof p=="object"?(a=A.deepClone(a),this.mergeContents(a,p)):a=p),c[t]=a}return new m(c,this.keys,this.overrides)}mergeContents(r,i){for(const c of Object.keys(i)){if(c in r&&y.isObject(r[c])&&y.isObject(i[c])){this.mergeContents(r[c],i[c]);continue}r[c]=A.deepClone(i[c])}}checkAndFreeze(r){return this.isFrozen&&!Object.isFrozen(r)?A.deepFreeze(r):r}getContentsForOverrideIdentifer(r){let i=null,c=null;const t=a=>{a&&(c?this.mergeContents(c,a):c=A.deepClone(a))};for(const a of this.overrides)o.equals(a.identifiers,[r])?i=a.contents:a.identifiers.includes(r)&&t(a.contents);return t(i),c}toJSON(){return{contents:this.contents,overrides:this.overrides,keys:this.keys}}setValue(r,i){this.addKey(r),(0,L.addToValueTree)(this.contents,r,i,c=>{throw new Error(c)})}removeValue(r){this.removeKey(r)&&(0,L.removeFromValueTree)(this.contents,r)}addKey(r){let i=this.keys.length;for(let c=0;c<i;c++)r.indexOf(this.keys[c])===0&&(i=c);this.keys.splice(i,1,r)}removeKey(r){let i=this.keys.indexOf(r);return i!==-1?(this.keys.splice(i,1),!0):!1}}e.ConfigurationModel=m;class s extends m{constructor(r={}){const i=u.Registry.as(v.Extensions.Configuration).getConfigurationProperties(),c=Object.keys(i),t=Object.create(null),a=[];for(const p in i){const h=r[p],_=h!==void 0?h:i[p].default;(0,L.addToValueTree)(t,p,_,P=>console.error(`Conflict in default settings: ${P}`))}for(const p of Object.keys(t))v.OVERRIDE_PROPERTY_REGEX.test(p)&&a.push({identifiers:(0,v.overrideIdentifiersFromKey)(p),keys:Object.keys(t[p]),contents:(0,L.toValuesTree)(t[p],h=>console.error(`Conflict in default settings file: ${h}`))});super(t,c,a)}}e.DefaultConfigurationModel=s;class n{constructor(r){this._name=r,this._raw=null,this._configurationModel=null,this._restrictedConfigurations=[],this._parseErrors=[]}get configurationModel(){return this._configurationModel||new m}get restrictedConfigurations(){return this._restrictedConfigurations}get errors(){return this._parseErrors}parse(r,i){if(!y.isUndefinedOrNull(r)){const c=this.doParseContent(r);this.parseRaw(c,i)}}reparse(r){this._raw&&this.parseRaw(this._raw,r)}parseRaw(r,i){this._raw=r;const{contents:c,keys:t,overrides:a,restricted:p}=this.doParseRaw(r,i);this._configurationModel=new m(c,t,a),this._restrictedConfigurations=p||[]}doParseContent(r){let i={},c=null,t=[],a=[],p=[];function h(P){Array.isArray(t)?t.push(P):c!==null&&(t[c]=P)}let _={onObjectBegin:()=>{let P={};h(P),a.push(t),t=P,c=null},onObjectProperty:P=>{c=P},onObjectEnd:()=>{t=a.pop()},onArrayBegin:()=>{let P=[];h(P),a.push(t),t=P,c=null},onArrayEnd:()=>{t=a.pop()},onLiteralValue:h,onError:(P,R,$)=>{p.push({error:P,offset:R,length:$})}};if(r)try{w.visit(r,_),i=t[0]||{}}catch(P){console.error(`Error while parsing settings file ${this._name}: ${P}`),this._parseErrors=[P]}return i}doParseRaw(r,i){const c=u.Registry.as(v.Extensions.Configuration).getConfigurationProperties(),t=this.filter(r,c,!0,i);r=t.raw;const a=(0,L.toValuesTree)(r,_=>console.error(`Conflict in settings file ${this._name}: ${_}`)),p=Object.keys(r),h=this.toOverrides(r,_=>console.error(`Conflict in settings file ${this._name}: ${_}`));return{contents:a,keys:p,overrides:h,restricted:t.restricted}}filter(r,i,c,t){if(!t?.scopes&&!t?.skipRestricted)return{raw:r,restricted:[]};const a={},p=[];for(let h in r)if(v.OVERRIDE_PROPERTY_REGEX.test(h)&&c){const _=this.filter(r[h],i,!1,t);a[h]=_.raw,p.push(..._.restricted)}else{const _=i[h],P=_?typeof _.scope!="undefined"?_.scope:3:void 0;_?.restricted&&p.push(h),(P===void 0||t.scopes===void 0||t.scopes.includes(P))&&(t.skipRestricted&&_?.restricted||(a[h]=r[h]))}return{raw:a,restricted:p}}toOverrides(r,i){const c=[];for(const t of Object.keys(r))if(v.OVERRIDE_PROPERTY_REGEX.test(t)){const a={};for(const p in r[t])a[p]=r[t][p];c.push({identifiers:(0,v.overrideIdentifiersFromKey)(t),keys:Object.keys(a),contents:(0,L.toValuesTree)(a,i)})}return c}}e.ConfigurationModelParser=n;class f extends B.Disposable{constructor(r,i,c,t){super();this.userSettingsResource=r,this.scopes=i,this.fileService=t,this._onDidChange=this._register(new k.Emitter),this.onDidChange=this._onDidChange.event,this.parser=new n(this.userSettingsResource.toString()),this.parseOptions={scopes:this.scopes},this._register(this.fileService.watch(c.dirname(this.userSettingsResource))),this._register(this.fileService.watch(this.userSettingsResource)),this._register(k.Event.any(k.Event.filter(this.fileService.onDidFilesChange,a=>a.contains(this.userSettingsResource)),k.Event.filter(this.fileService.onDidRunOperation,a=>(a.isOperation(0)||a.isOperation(1)||a.isOperation(4))&&c.isEqual(a.resource,r)))(()=>this._onDidChange.fire()))}async loadConfiguration(){try{const r=await this.fileService.readFile(this.userSettingsResource);return this.parser.parse(r.value.toString()||"{}",this.parseOptions),this.parser.configurationModel}catch{return new m}}reparse(){return this.parser.reparse(this.parseOptions),this.parser.configurationModel}getRestrictedSettings(){return this.parser.restrictedConfigurations}}e.UserSettings=f;class D{constructor(r,i,c=new m,t=new m,a=new S.ResourceMap,p=new m,h=new S.ResourceMap,_=!0){this._defaultConfiguration=r,this._localUserConfiguration=i,this._remoteUserConfiguration=c,this._workspaceConfiguration=t,this._folderConfigurations=a,this._memoryConfiguration=p,this._memoryConfigurationByResource=h,this._freeze=_,this._workspaceConsolidatedConfiguration=null,this._foldersConsolidatedConfigurations=new S.ResourceMap,this._userConfiguration=null}getValue(r,i,c){return this.getConsolidateConfigurationModel(i,c).getValue(r)}updateValue(r,i,c={}){let t;c.resource?(t=this._memoryConfigurationByResource.get(c.resource),t||(t=new m,this._memoryConfigurationByResource.set(c.resource,t))):t=this._memoryConfiguration,i===void 0?t.removeValue(r):t.setValue(r,i),c.resource||(this._workspaceConsolidatedConfiguration=null)}inspect(r,i,c){const t=this.getConsolidateConfigurationModel(i,c),a=this.getFolderConfigurationModelForResource(i.resource,c),p=i.resource?this._memoryConfigurationByResource.get(i.resource)||this._memoryConfiguration:this._memoryConfiguration,h=i.overrideIdentifier?this._defaultConfiguration.freeze().override(i.overrideIdentifier).getValue(r):this._defaultConfiguration.freeze().getValue(r),_=i.overrideIdentifier?this.userConfiguration.freeze().override(i.overrideIdentifier).getValue(r):this.userConfiguration.freeze().getValue(r),P=i.overrideIdentifier?this.localUserConfiguration.freeze().override(i.overrideIdentifier).getValue(r):this.localUserConfiguration.freeze().getValue(r),R=i.overrideIdentifier?this.remoteUserConfiguration.freeze().override(i.overrideIdentifier).getValue(r):this.remoteUserConfiguration.freeze().getValue(r),$=c?i.overrideIdentifier?this._workspaceConfiguration.freeze().override(i.overrideIdentifier).getValue(r):this._workspaceConfiguration.freeze().getValue(r):void 0,E=a?i.overrideIdentifier?a.freeze().override(i.overrideIdentifier).getValue(r):a.freeze().getValue(r):void 0,z=i.overrideIdentifier?p.override(i.overrideIdentifier).getValue(r):p.getValue(r),V=t.getValue(r),W=o.distinct(o.flatten(t.overrides.map(Q=>Q.identifiers))).filter(Q=>t.getOverrideValue(r,Q)!==void 0);return{defaultValue:h,userValue:_,userLocalValue:P,userRemoteValue:R,workspaceValue:$,workspaceFolderValue:E,memoryValue:z,value:V,default:h!==void 0?{value:this._defaultConfiguration.freeze().getValue(r),override:i.overrideIdentifier?this._defaultConfiguration.freeze().getOverrideValue(r,i.overrideIdentifier):void 0}:void 0,user:_!==void 0?{value:this.userConfiguration.freeze().getValue(r),override:i.overrideIdentifier?this.userConfiguration.freeze().getOverrideValue(r,i.overrideIdentifier):void 0}:void 0,userLocal:P!==void 0?{value:this.localUserConfiguration.freeze().getValue(r),override:i.overrideIdentifier?this.localUserConfiguration.freeze().getOverrideValue(r,i.overrideIdentifier):void 0}:void 0,userRemote:R!==void 0?{value:this.remoteUserConfiguration.freeze().getValue(r),override:i.overrideIdentifier?this.remoteUserConfiguration.freeze().getOverrideValue(r,i.overrideIdentifier):void 0}:void 0,workspace:$!==void 0?{value:this._workspaceConfiguration.freeze().getValue(r),override:i.overrideIdentifier?this._workspaceConfiguration.freeze().getOverrideValue(r,i.overrideIdentifier):void 0}:void 0,workspaceFolder:E!==void 0?{value:a?.freeze().getValue(r),override:i.overrideIdentifier?a?.freeze().getOverrideValue(r,i.overrideIdentifier):void 0}:void 0,memory:z!==void 0?{value:p.getValue(r),override:i.overrideIdentifier?p.getOverrideValue(r,i.overrideIdentifier):void 0}:void 0,overrideIdentifiers:W.length?W:void 0}}keys(r){const i=this.getFolderConfigurationModelForResource(void 0,r);return{default:this._defaultConfiguration.freeze().keys,user:this.userConfiguration.freeze().keys,workspace:this._workspaceConfiguration.freeze().keys,workspaceFolder:i?i.freeze().keys:[]}}updateDefaultConfiguration(r){this._defaultConfiguration=r,this._workspaceConsolidatedConfiguration=null,this._foldersConsolidatedConfigurations.clear()}updateLocalUserConfiguration(r){this._localUserConfiguration=r,this._userConfiguration=null,this._workspaceConsolidatedConfiguration=null,this._foldersConsolidatedConfigurations.clear()}updateRemoteUserConfiguration(r){this._remoteUserConfiguration=r,this._userConfiguration=null,this._workspaceConsolidatedConfiguration=null,this._foldersConsolidatedConfigurations.clear()}updateWorkspaceConfiguration(r){this._workspaceConfiguration=r,this._workspaceConsolidatedConfiguration=null,this._foldersConsolidatedConfigurations.clear()}updateFolderConfiguration(r,i){this._folderConfigurations.set(r,i),this._foldersConsolidatedConfigurations.delete(r)}deleteFolderConfiguration(r){this.folderConfigurations.delete(r),this._foldersConsolidatedConfigurations.delete(r)}compareAndUpdateDefaultConfiguration(r,i){const c=[];if(!i){const{added:t,updated:a,removed:p}=b(this._defaultConfiguration,r);i=[...t,...a,...p]}for(const t of i)for(const a of(0,v.overrideIdentifiersFromKey)(t)){const p=this._defaultConfiguration.getKeysForOverrideIdentifier(a),h=r.getKeysForOverrideIdentifier(a),_=[...h.filter(P=>p.indexOf(P)===-1),...p.filter(P=>h.indexOf(P)===-1),...p.filter(P=>!A.equals(this._defaultConfiguration.override(a).getValue(P),r.override(a).getValue(P)))];c.push([a,_])}return this.updateDefaultConfiguration(r),{keys:i,overrides:c}}compareAndUpdateLocalUserConfiguration(r){const{added:i,updated:c,removed:t,overrides:a}=b(this.localUserConfiguration,r),p=[...i,...c,...t];return p.length&&this.updateLocalUserConfiguration(r),{keys:p,overrides:a}}compareAndUpdateRemoteUserConfiguration(r){const{added:i,updated:c,removed:t,overrides:a}=b(this.remoteUserConfiguration,r);let p=[...i,...c,...t];return p.length&&this.updateRemoteUserConfiguration(r),{keys:p,overrides:a}}compareAndUpdateWorkspaceConfiguration(r){const{added:i,updated:c,removed:t,overrides:a}=b(this.workspaceConfiguration,r);let p=[...i,...c,...t];return p.length&&this.updateWorkspaceConfiguration(r),{keys:p,overrides:a}}compareAndUpdateFolderConfiguration(r,i){const c=this.folderConfigurations.get(r),{added:t,updated:a,removed:p,overrides:h}=b(c,i);let _=[...t,...a,...p];return(_.length||!c)&&this.updateFolderConfiguration(r,i),{keys:_,overrides:h}}compareAndDeleteFolderConfiguration(r){const i=this.folderConfigurations.get(r);if(!i)throw new Error("Unknown folder");this.deleteFolderConfiguration(r);const{added:c,updated:t,removed:a,overrides:p}=b(i,void 0);return{keys:[...c,...t,...a],overrides:p}}get defaults(){return this._defaultConfiguration}get userConfiguration(){return this._userConfiguration||(this._userConfiguration=this._remoteUserConfiguration.isEmpty()?this._localUserConfiguration:this._localUserConfiguration.merge(this._remoteUserConfiguration),this._freeze&&this._userConfiguration.freeze()),this._userConfiguration}get localUserConfiguration(){return this._localUserConfiguration}get remoteUserConfiguration(){return this._remoteUserConfiguration}get workspaceConfiguration(){return this._workspaceConfiguration}get folderConfigurations(){return this._folderConfigurations}getConsolidateConfigurationModel(r,i){let c=this.getConsolidatedConfigurationModelForResource(r,i);return r.overrideIdentifier?c.override(r.overrideIdentifier):c}getConsolidatedConfigurationModelForResource({resource:r},i){let c=this.getWorkspaceConsolidatedConfiguration();if(i&&r){const t=i.getFolder(r);t&&(c=this.getFolderConsolidatedConfiguration(t.uri)||c);const a=this._memoryConfigurationByResource.get(r);a&&(c=c.merge(a))}return c}getWorkspaceConsolidatedConfiguration(){return this._workspaceConsolidatedConfiguration||(this._workspaceConsolidatedConfiguration=this._defaultConfiguration.merge(this.userConfiguration,this._workspaceConfiguration,this._memoryConfiguration),this._freeze&&(this._workspaceConfiguration=this._workspaceConfiguration.freeze())),this._workspaceConsolidatedConfiguration}getFolderConsolidatedConfiguration(r){let i=this._foldersConsolidatedConfigurations.get(r);if(!i){const c=this.getWorkspaceConsolidatedConfiguration(),t=this._folderConfigurations.get(r);t?(i=c.merge(t),this._freeze&&(i=i.freeze()),this._foldersConsolidatedConfigurations.set(r,i)):i=c}return i}getFolderConfigurationModelForResource(r,i){if(i&&r){const c=i.getFolder(r);if(c)return this._folderConfigurations.get(c.uri)}}toData(){return{defaults:{contents:this._defaultConfiguration.contents,overrides:this._defaultConfiguration.overrides,keys:this._defaultConfiguration.keys},user:{contents:this.userConfiguration.contents,overrides:this.userConfiguration.overrides,keys:this.userConfiguration.keys},workspace:{contents:this._workspaceConfiguration.contents,overrides:this._workspaceConfiguration.overrides,keys:this._workspaceConfiguration.keys},folders:[...this._folderConfigurations.keys()].reduce((r,i)=>{const{contents:c,overrides:t,keys:a}=this._folderConfigurations.get(i);return r.push([i,{contents:c,overrides:t,keys:a}]),r},[])}}allKeys(){const r=new Set;return this._defaultConfiguration.freeze().keys.forEach(i=>r.add(i)),this.userConfiguration.freeze().keys.forEach(i=>r.add(i)),this._workspaceConfiguration.freeze().keys.forEach(i=>r.add(i)),this._folderConfigurations.forEach(i=>i.freeze().keys.forEach(c=>r.add(c))),[...r.values()]}allOverrideIdentifiers(){const r=new Set;return this._defaultConfiguration.freeze().getAllOverrideIdentifiers().forEach(i=>r.add(i)),this.userConfiguration.freeze().getAllOverrideIdentifiers().forEach(i=>r.add(i)),this._workspaceConfiguration.freeze().getAllOverrideIdentifiers().forEach(i=>r.add(i)),this._folderConfigurations.forEach(i=>i.freeze().getAllOverrideIdentifiers().forEach(c=>r.add(c))),[...r.values()]}getAllKeysForOverrideIdentifier(r){const i=new Set;return this._defaultConfiguration.getKeysForOverrideIdentifier(r).forEach(c=>i.add(c)),this.userConfiguration.getKeysForOverrideIdentifier(r).forEach(c=>i.add(c)),this._workspaceConfiguration.getKeysForOverrideIdentifier(r).forEach(c=>i.add(c)),this._folderConfigurations.forEach(c=>c.getKeysForOverrideIdentifier(r).forEach(t=>i.add(t))),[...i.values()]}static parse(r){const i=this.parseConfigurationModel(r.defaults),c=this.parseConfigurationModel(r.user),t=this.parseConfigurationModel(r.workspace),a=r.folders.reduce((p,h)=>(p.set(M.URI.revive(h[0]),this.parseConfigurationModel(h[1])),p),new S.ResourceMap);return new D(i,c,new m,t,a,new m,new S.ResourceMap,!1)}static parseConfigurationModel(r){return new m(r.contents,r.keys,r.overrides).freeze()}}e.Configuration=D;function T(...I){if(I.length===0)return{keys:[],overrides:[]};if(I.length===1)return I[0];const r=new Set,i=new Map;for(const t of I)t.keys.forEach(a=>r.add(a)),t.overrides.forEach(([a,p])=>{const h=(0,S.getOrSet)(i,a,new Set);p.forEach(_=>h.add(_))});const c=[];return i.forEach((t,a)=>c.push([a,[...t.values()]])),{keys:[...r.values()],overrides:c}}e.mergeChanges=T;class d{constructor(r,i,c,t){this.change=r,this.previous=i,this.currentConfiguraiton=c,this.currentWorkspace=t,this._previousConfiguration=void 0;const a=new Set;r.keys.forEach(h=>a.add(h)),r.overrides.forEach(([,h])=>h.forEach(_=>a.add(_))),this.affectedKeys=[...a.values()];const p=new m;this.affectedKeys.forEach(h=>p.setValue(h,{})),this.affectedKeysTree=p.contents}get previousConfiguration(){return!this._previousConfiguration&&this.previous&&(this._previousConfiguration=D.parse(this.previous.data)),this._previousConfiguration}affectsConfiguration(r,i){if(this.doesAffectedKeysTreeContains(this.affectedKeysTree,r)){if(i){const c=this.previousConfiguration?this.previousConfiguration.getValue(r,i,this.previous?.workspace):void 0,t=this.currentConfiguraiton.getValue(r,i,this.currentWorkspace);return!A.equals(c,t)}return!0}return!1}doesAffectedKeysTreeContains(r,i){let c=(0,L.toValuesTree)({[i]:!0},()=>{}),t;for(;typeof c=="object"&&(t=Object.keys(c)[0]);){if(r=r[t],!r)return!1;c=c[t]}return!0}}e.ConfigurationChangeEvent=d;class g extends d{constructor(r,i,c,t){super({keys:r.allKeys(),overrides:[]},void 0,r,i);this.source=c,this.sourceConfig=t}}e.AllKeysConfigurationChangeEvent=g;function b(I,r){const{added:i,removed:c,updated:t}=l(r,I),a=[],p=I?.getAllOverrideIdentifiers()||[],h=r?.getAllOverrideIdentifiers()||[];if(r){const _=h.filter(P=>!p.includes(P));for(const P of _)a.push([P,r.getKeysForOverrideIdentifier(P)])}if(I){const _=p.filter(P=>!h.includes(P));for(const P of _)a.push([P,I.getKeysForOverrideIdentifier(P)])}if(r&&I){for(const _ of p)if(h.includes(_)){const P=l({contents:I.getOverrideValue(void 0,_)||{},keys:I.getKeysForOverrideIdentifier(_)},{contents:r.getOverrideValue(void 0,_)||{},keys:r.getKeysForOverrideIdentifier(_)});a.push([_,[...P.added,...P.removed,...P.updated]])}}return{added:i,removed:c,updated:t,overrides:a}}function l(I,r){const i=I?r?I.keys.filter(a=>r.keys.indexOf(a)===-1):[...I.keys]:[],c=r?I?r.keys.filter(a=>I.keys.indexOf(a)===-1):[...r.keys]:[],t=[];if(I&&r){for(const a of r.keys)if(I.keys.indexOf(a)!==-1){const p=(0,L.getConfigurationValue)(r.contents,a),h=(0,L.getConfigurationValue)(I.contents,a);A.equals(p,h)||t.push(a)}}return{added:i,removed:c,updated:t}}}),define(Ee[81],we([1,0,3]),function(J,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RemoteAuthorityResolverError=e.RemoteAuthorityResolverErrorCode=e.IRemoteAuthorityResolverService=void 0,e.IRemoteAuthorityResolverService=(0,o.createDecorator)("remoteAuthorityResolverService");var k;(function(B){B.Unknown="Unknown",B.NotAvailable="NotAvailable",B.TemporarilyNotAvailable="TemporarilyNotAvailable",B.NoResolverFound="NoResolverFound"})(k=e.RemoteAuthorityResolverErrorCode||(e.RemoteAuthorityResolverErrorCode={}));class w extends Error{constructor(S,A=k.Unknown,y){super(S);this._message=S,this._code=A,this._detail=y,this.isHandled=A===k.NotAvailable&&y===!0,typeof Object.setPrototypeOf=="function"&&Object.setPrototypeOf(this,w.prototype)}static isTemporarilyNotAvailable(S){return S instanceof w&&S._code===k.TemporarilyNotAvailable}static isNoResolverFound(S){return S instanceof w&&S._code===k.NoResolverFound}static isHandled(S){return S instanceof w&&S.isHandled}}e.RemoteAuthorityResolverError=w}),define(Ee[82],we([1,0,9]),function(J,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getRemoteName=e.getRemoteAuthority=void 0;function k(B){return B.scheme===o.Schemas.vscodeRemote?B.authority:void 0}e.getRemoteAuthority=k;function w(B){if(!B)return;const S=B.indexOf("+");return S<0?B:B.substr(0,S)}e.getRemoteName=w}),define(Ee[25],we([1,0,10,3,82]),function(J,e,o,k,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IBuiltinExtensionsScannerService=e.isResolverExtension=e.isAuthenticationProviderExtension=e.isLanguagePackExtension=e.ExtensionIdentifier=e.ExtensionType=e.EXTENSION_CATEGORIES=e.isIExtensionIdentifier=e.getWorkspaceSupportTypeMessage=e.ALL_EXTENSION_KINDS=e.UNDEFINED_PUBLISHER=e.BUILTIN_MANIFEST_CACHE_FILE=e.USER_MANIFEST_CACHE_FILE=e.MANIFEST_CACHE_FOLDER=void 0,e.MANIFEST_CACHE_FOLDER="CachedExtensions",e.USER_MANIFEST_CACHE_FILE="user",e.BUILTIN_MANIFEST_CACHE_FILE="builtin",e.UNDEFINED_PUBLISHER="undefined_publisher",e.ALL_EXTENSION_KINDS=["ui","workspace","web"];function B(u){if(typeof u=="object"&&u!==null&&u.supported!==!0)return u.description}e.getWorkspaceSupportTypeMessage=B;function S(u){return u&&typeof u=="object"&&typeof u.id=="string"&&(!u.uuid||typeof u.uuid=="string")}e.isIExtensionIdentifier=S,e.EXTENSION_CATEGORIES=["Azure","Data Science","Debuggers","Extension Packs","Education","Formatters","Keymaps","Language Packs","Linters","Machine Learning","Notebooks","Programming Languages","SCM Providers","Snippets","Testing","Themes","Visualization","Other"];var A;(function(u){u[u.System=0]="System",u[u.User=1]="User"})(A=e.ExtensionType||(e.ExtensionType={}));class y{constructor(m){this.value=m,this._lower=m.toLowerCase()}static equals(m,s){if(typeof m=="undefined"||m===null)return typeof s=="undefined"||s===null;if(typeof s=="undefined"||s===null)return!1;if(typeof m=="string"||typeof s=="string"){let n=typeof m=="string"?m:m.value,f=typeof s=="string"?s:s.value;return o.equalsIgnoreCase(n,f)}return m._lower===s._lower}static toKey(m){return typeof m=="string"?m.toLowerCase():m._lower}}e.ExtensionIdentifier=y;function M(u){return u.contributes&&u.contributes.localizations?u.contributes.localizations.length>0:!1}e.isLanguagePackExtension=M;function L(u){return u.contributes&&u.contributes.authentication?u.contributes.authentication.length>0:!1}e.isAuthenticationProviderExtension=L;function v(u,m){if(m){const s=`onResolveRemoteAuthority:${(0,w.getRemoteName)(m)}`;return u.activationEvents?.indexOf(s)!==-1}return!1}e.isResolverExtension=v,e.IBuiltinExtensionsScannerService=(0,k.createDecorator)("IBuiltinExtensionsScannerService")}),define(Ee[144],we([1,0,10,25]),function(J,e,o,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getExtensionDependencies=e.getMaliciousExtensionsSet=e.BetterMergeId=e.getGalleryExtensionTelemetryData=e.getLocalExtensionTelemetryData=e.groupByExtension=e.getGalleryExtensionId=e.adoptToGalleryExtensionId=e.getExtensionId=e.ExtensionIdentifierWithVersion=e.areSameExtensions=void 0;function w(s,n){return s.uuid&&n.uuid?s.uuid===n.uuid:s.id===n.id?!0:(0,o.compareIgnoreCase)(s.id,n.id)===0}e.areSameExtensions=w;class B{constructor(n,f){this.version=f,this.id=n.id,this.uuid=n.uuid}key(){return`${this.id}-${this.version}`}equals(n){return n instanceof B?w(this,n)&&this.version===n.version:!1}}e.ExtensionIdentifierWithVersion=B;function S(s,n){return`${s}.${n}`}e.getExtensionId=S;function A(s){return s.toLocaleLowerCase()}e.adoptToGalleryExtensionId=A;function y(s,n){return A(S(s,n))}e.getGalleryExtensionId=y;function M(s,n){const f=[],D=T=>{for(const d of f)if(d.some(g=>w(n(g),n(T))))return d;return null};for(const T of s){const d=D(T);d?d.push(T):f.push([T])}return f}e.groupByExtension=M;function L(s){return{id:s.identifier.id,name:s.manifest.name,galleryId:null,publisherId:s.publisherId,publisherName:s.manifest.publisher,publisherDisplayName:s.publisherDisplayName,dependencies:s.manifest.extensionDependencies&&s.manifest.extensionDependencies.length>0}}e.getLocalExtensionTelemetryData=L;function v(s){return{id:s.identifier.id,name:s.name,galleryId:s.identifier.uuid,publisherId:s.publisherId,publisherName:s.publisher,publisherDisplayName:s.publisherDisplayName,isPreReleaseVersion:s.properties.isPreReleaseVersion,dependencies:!!(s.properties.dependencies&&s.properties.dependencies.length>0),...s.telemetryData}}e.getGalleryExtensionTelemetryData=v,e.BetterMergeId=new k.ExtensionIdentifier("pprice.better-merge");function u(s){const n=new Set;if(s.malicious)for(const f of s.malicious)n.add(f.id);return n}e.getMaliciousExtensionsSet=u;function m(s,n){const f=[],D=n.manifest.extensionDependencies?.slice(0)??[];for(;D.length;){const T=D.shift();if(T&&f.every(d=>!w(d.identifier,{id:T}))){const d=s.filter(g=>w(g.identifier,{id:T}));d.length===1&&(f.push(d[0]),D.push(...d[0].manifest.extensionDependencies?.slice(0)??[]))}}return f}e.getExtensionDependencies=m}),define(Ee[145],we([1,0]),function(J,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TerminalDataBufferer=void 0;class o{constructor(w){this._callback=w,this._terminalBufferMap=new Map}dispose(){for(const w of this._terminalBufferMap.values())w.dispose()}startBuffering(w,B,S=5){let A;return A=B(y=>{const M=typeof y=="string"?y:y.data;let L=this._terminalBufferMap.get(w);if(L){L.data.push(M);return}const v=setTimeout(()=>this.flushBuffer(w),S);L={data:[M],timeoutId:v,dispose:()=>{clearTimeout(v),this.flushBuffer(w),A.dispose()}},this._terminalBufferMap.set(w,L)}),A}stopBuffering(w){const B=this._terminalBufferMap.get(w);B&&B.dispose()}flushBuffer(w){const B=this._terminalBufferMap.get(w);B&&(this._terminalBufferMap.delete(w),this._callback(w,B.data.join("")))}}e.TerminalDataBufferer=o}),define(Ee[146],we([1,0]),function(J,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ColorScheme=void 0;var o;(function(k){k.DARK="dark",k.LIGHT="light",k.HIGH_CONTRAST="hc"})(o=e.ColorScheme||(e.ColorScheme={}))}),define(Ee[57],we([1,0,106,5,6,3,37,146]),function(J,e,o,k,w,B,S,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Themable=e.registerThemingParticipant=e.Extensions=e.getThemeTypeSelector=e.FolderThemeIcon=e.FileThemeIcon=e.ThemeIcon=e.themeColorFromId=e.ThemeColor=e.IThemeService=void 0,e.IThemeService=(0,B.createDecorator)("themeService");var y;(function(f){function D(T){return T&&typeof T=="object"&&typeof T.id=="string"}f.isThemeColor=D})(y=e.ThemeColor||(e.ThemeColor={}));function M(f){return{id:f}}e.themeColorFromId=M;var L;(function(f){function D(i){return i&&typeof i=="object"&&typeof i.id=="string"&&(typeof i.color=="undefined"||y.isThemeColor(i.color))}f.isThemeIcon=D;const T=new RegExp(`^\\$\\((${o.CSSIcon.iconNameExpression}(?:${o.CSSIcon.iconModifierExpression})?)\\)$`);function d(i){const c=T.exec(i);if(!c)return;let[,t]=c;return{id:t}}f.fromString=d;function g(i){return{id:i}}f.fromId=g;function b(i,c){let t=i.id;const a=t.lastIndexOf("~");return a!==-1&&(t=t.substring(0,a)),c&&(t=`${t}~${c}`),{id:t}}f.modify=b;function l(i){const c=i.id.lastIndexOf("~");if(c!==-1)return i.id.substring(c+1)}f.getModifier=l;function I(i,c){return i.id===c.id&&i.color?.id===c.color?.id}f.isEqual=I;function r(i,c){return{id:i.id,color:c?M(c):void 0}}f.asThemeIcon=r,f.asClassNameArray=o.CSSIcon.asClassNameArray,f.asClassName=o.CSSIcon.asClassName,f.asCSSSelector=o.CSSIcon.asCSSSelector})(L=e.ThemeIcon||(e.ThemeIcon={})),e.FileThemeIcon=o.Codicon.file,e.FolderThemeIcon=o.Codicon.folder;function v(f){switch(f){case A.ColorScheme.DARK:return"vs-dark";case A.ColorScheme.HIGH_CONTRAST:return"hc-black";default:return"vs"}}e.getThemeTypeSelector=v,e.Extensions={ThemingContribution:"base.contributions.theming"};class u{constructor(){this.themingParticipants=[],this.themingParticipants=[],this.onThemingParticipantAddedEmitter=new k.Emitter}onColorThemeChange(D){return this.themingParticipants.push(D),this.onThemingParticipantAddedEmitter.fire(D),(0,w.toDisposable)(()=>{const T=this.themingParticipants.indexOf(D);this.themingParticipants.splice(T,1)})}get onThemingParticipantAdded(){return this.onThemingParticipantAddedEmitter.event}getThemingParticipants(){return this.themingParticipants}}let m=new u;S.Registry.add(e.Extensions.ThemingContribution,m);function s(f){return m.onColorThemeChange(f)}e.registerThemingParticipant=s;class n extends w.Disposable{constructor(D){super();this.themeService=D,this.theme=D.getColorTheme(),this._register(this.themeService.onDidColorThemeChange(T=>this.onThemeChange(T)))}onThemeChange(D){this.theme=D,this.updateStyles()}updateStyles(){}getColor(D,T){let d=this.theme.getColor(D);return d&&T&&(d=T(d,this.theme)),d?d.toString():null}}e.Themable=n}),define(Ee[147],we([1,0,5,23,3,12]),function(J,e,o,k,w,B){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractTunnelService=e.isPortPrivileged=e.isAllInterfaces=e.ALL_INTERFACES_ADDRESSES=e.isLocalhost=e.LOCALHOST_ADDRESSES=e.extractLocalHostUriMetaDataForPortMapping=e.ProvidedOnAutoForward=e.TunnelPrivacyId=e.TunnelProtocol=e.ISharedTunnelsService=e.ITunnelService=void 0,e.ITunnelService=(0,w.createDecorator)("tunnelService"),e.ISharedTunnelsService=(0,w.createDecorator)("sharedTunnelsService");var S;(function(s){s.Http="http",s.Https="https"})(S=e.TunnelProtocol||(e.TunnelProtocol={}));var A;(function(s){s.ConstantPrivate="constantPrivate",s.Private="private",s.Public="public"})(A=e.TunnelPrivacyId||(e.TunnelPrivacyId={}));var y;(function(s){s[s.Notify=1]="Notify",s[s.OpenBrowser=2]="OpenBrowser",s[s.OpenPreview=3]="OpenPreview",s[s.Silent=4]="Silent",s[s.Ignore=5]="Ignore",s[s.OpenBrowserOnce=6]="OpenBrowserOnce"})(y=e.ProvidedOnAutoForward||(e.ProvidedOnAutoForward={}));function M(s){if(s.scheme!=="http"&&s.scheme!=="https")return;const n=/^(localhost|127\.0\.0\.1|0\.0\.0\.0):(\d+)$/.exec(s.authority);if(!!n)return{address:n[1],port:+n[2]}}e.extractLocalHostUriMetaDataForPortMapping=M,e.LOCALHOST_ADDRESSES=["localhost","127.0.0.1","0:0:0:0:0:0:0:1","::1"];function L(s){return e.LOCALHOST_ADDRESSES.indexOf(s)>=0}e.isLocalhost=L,e.ALL_INTERFACES_ADDRESSES=["0.0.0.0","0:0:0:0:0:0:0:0","::"];function v(s){return e.ALL_INTERFACES_ADDRESSES.indexOf(s)>=0}e.isAllInterfaces=v;function u(s,n){return n?n!==1&&s<1024:!k.isWindows&&s<1024}e.isPortPrivileged=u;let m=class{constructor(n){this.logService=n,this._onTunnelOpened=new o.Emitter,this.onTunnelOpened=this._onTunnelOpened.event,this._onTunnelClosed=new o.Emitter,this.onTunnelClosed=this._onTunnelClosed.event,this._onAddedTunnelProvider=new o.Emitter,this.onAddedTunnelProvider=this._onAddedTunnelProvider.event,this._tunnels=new Map,this._canElevate=!1,this._privacyOptions=[]}get hasTunnelProvider(){return!!this._tunnelProvider}setTunnelProvider(n){return this._tunnelProvider=n,n?(this._onAddedTunnelProvider.fire(),{dispose:()=>{this._tunnelProvider=void 0,this._canElevate=!1,this._privacyOptions=[]}}):(this._canElevate=!1,this._privacyOptions=[],this._onAddedTunnelProvider.fire(),{dispose:()=>{}})}setTunnelFeatures(n){this._canElevate=n.elevation,this._privacyOptions=n.privacyOptions}get canElevate(){return this._canElevate}get canChangePrivacy(){return this._privacyOptions.length>0}get privacyOptions(){return this._privacyOptions}get tunnels(){return this.getTunnels()}async getTunnels(){const n=[],f=Array.from(this._tunnels.values());for(let D of f){const T=Array.from(D.values());for(let d of T){const g=await d.value;g&&n.push(g)}}return n}async dispose(){for(const n of this._tunnels.values()){for(const{value:f}of n.values())await f.then(D=>D?.dispose());n.clear()}this._tunnels.clear()}openTunnel(n,f,D,T,d=!1,g=A.Private,b){if(this.logService.trace(`ForwardedPorts: (TunnelService) openTunnel request for ${f}:${D} on local port ${T}.`),!n)return;f||(f="localhost");const l=this.retainOrCreateTunnel(n,f,D,T,d,g,b);return l?l.then(I=>{if(!I){this.logService.trace("ForwardedPorts: (TunnelService) New tunnel is undefined."),this.removeEmptyTunnelFromMap(f,D);return}this.logService.trace("ForwardedPorts: (TunnelService) New tunnel established.");const r=this.makeTunnel(I);return(I.tunnelRemoteHost!==f||I.tunnelRemotePort!==D)&&this.logService.warn("ForwardedPorts: (TunnelService) Created tunnel does not match requirements of requested tunnel. Host or port mismatch."),this._onTunnelOpened.fire(r),r}):(this.logService.trace("ForwardedPorts: (TunnelService) Tunnel was not created."),l)}makeTunnel(n){return{tunnelRemotePort:n.tunnelRemotePort,tunnelRemoteHost:n.tunnelRemoteHost,tunnelLocalPort:n.tunnelLocalPort,localAddress:n.localAddress,privacy:n.privacy,protocol:n.protocol,dispose:async()=>{this.logService.trace(`ForwardedPorts: (TunnelService) dispose request for ${n.tunnelRemoteHost}:${n.tunnelRemotePort} `);const f=this._tunnels.get(n.tunnelRemoteHost);if(f){const D=f.get(n.tunnelRemotePort);D&&(D.refcount--,await this.tryDisposeTunnel(n.tunnelRemoteHost,n.tunnelRemotePort,D))}}}}async tryDisposeTunnel(n,f,D){if(D.refcount<=0){this.logService.trace(`ForwardedPorts: (TunnelService) Tunnel is being disposed ${n}:${f}.`);const T=D.value.then(async d=>{d&&(await d.dispose(!0),this._onTunnelClosed.fire({host:d.tunnelRemoteHost,port:d.tunnelRemotePort}))});return this._tunnels.has(n)&&this._tunnels.get(n).delete(f),T}}async closeTunnel(n,f){this.logService.trace(`ForwardedPorts: (TunnelService) close request for ${n}:${f} `);const D=this._tunnels.get(n);if(D&&D.has(f)){const T=D.get(f);T.refcount=0,await this.tryDisposeTunnel(n,f,T)}}addTunnelToMap(n,f,D){this._tunnels.has(n)||this._tunnels.set(n,new Map),this._tunnels.get(n).set(f,{refcount:1,value:D})}async removeEmptyTunnelFromMap(n,f){const D=this._tunnels.get(n);D&&(await D.get(f)||D.delete(f),D.size===0&&this._tunnels.delete(n))}getTunnelFromMap(n,f){let D=[n];L(n)?(D.push(...e.LOCALHOST_ADDRESSES),D.push(...e.ALL_INTERFACES_ADDRESSES)):v(n)&&D.push(...e.ALL_INTERFACES_ADDRESSES);const T=D.map(d=>this._tunnels.get(d));for(const d of T){const g=d?.get(f);if(g)return g}}canTunnel(n){return!!M(n)}createWithProvider(n,f,D,T,d,g,b){this.logService.trace(`ForwardedPorts: (TunnelService) Creating tunnel with provider ${f}:${D} on local port ${T}.`);const I={elevationRequired:d?u(T===void 0?D:T):!1},r={remoteAddress:{host:f,port:D},localAddressPort:T,privacy:g,public:g!==A.Private,protocol:b},i=n.forwardPort(r,I);return this.logService.trace("ForwardedPorts: (TunnelService) Tunnel created by provider."),i&&this.addTunnelToMap(f,D,i),i}};m=Fe([Ne(0,B.ILogService)],m),e.AbstractTunnelService=m}),define(Ee[148],we([1,0,9]),function(J,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isVirtualWorkspace=e.getVirtualWorkspaceScheme=e.getVirtualWorkspaceLocation=e.isVirtualResource=void 0;function k(A){return A.scheme!==o.Schemas.file&&A.scheme!==o.Schemas.vscodeRemote}e.isVirtualResource=k;function w(A){if(A.folders.length)return A.folders.every(y=>k(y.uri))?A.folders[0].uri:void 0;if(A.configuration&&k(A.configuration))return A.configuration}e.getVirtualWorkspaceLocation=w;function B(A){return w(A)?.scheme}e.getVirtualWorkspaceScheme=B;function S(A){return w(A)!==void 0}e.isVirtualWorkspace=S}),define(Ee[46],we([1,0,121,17,22,24,2,3,9]),function(J,e,o,k,w,B,S,A,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.hasWorkspaceFileExtension=e.isTemporaryWorkspace=e.isUntitledWorkspace=e.UNTITLED_WORKSPACE_NAME=e.WORKSPACE_FILTER=e.WORKSPACE_EXTENSION=e.toWorkspaceFolder=e.WorkspaceFolder=e.Workspace=e.isWorkspaceFolder=e.isWorkspace=e.WorkbenchState=e.reviveIdentifier=e.isWorkspaceIdentifier=e.toWorkspaceIdentifier=e.isSingleFolderWorkspaceIdentifier=e.IWorkspaceContextService=void 0,e.IWorkspaceContextService=(0,A.createDecorator)("contextService");function M(I){const r=I;return typeof r?.id=="string"&&S.URI.isUri(r.uri)}e.isSingleFolderWorkspaceIdentifier=M;function L(I){if(I.configuration)return{id:I.id,configPath:I.configuration};if(I.folders.length===1)return{id:I.id,uri:I.folders[0].uri}}e.toWorkspaceIdentifier=L;function v(I){const r=I;return typeof r?.id=="string"&&S.URI.isUri(r.configPath)}e.isWorkspaceIdentifier=v;function u(I){const r=I;if(r?.uri)return{id:r.id,uri:S.URI.revive(r.uri)};const i=I;if(i?.configPath)return{id:i.id,configPath:S.URI.revive(i.configPath)};if(I?.id)return{id:I.id}}e.reviveIdentifier=u;var m;(function(I){I[I.EMPTY=1]="EMPTY",I[I.FOLDER=2]="FOLDER",I[I.WORKSPACE=3]="WORKSPACE"})(m=e.WorkbenchState||(e.WorkbenchState={}));function s(I){const r=I;return!!(r&&typeof r=="object"&&typeof r.id=="string"&&Array.isArray(r.folders))}e.isWorkspace=s;function n(I){const r=I;return!!(r&&typeof r=="object"&&S.URI.isUri(r.uri)&&typeof r.name=="string"&&typeof r.toResource=="function")}e.isWorkspaceFolder=n;class f{constructor(r,i,c,t,a){this._id=r,this._transient=c,this._configuration=t,this._ignorePathCasing=a,this._foldersMap=w.TernarySearchTree.forUris(this._ignorePathCasing),this.folders=i}update(r){this._id=r.id,this._configuration=r.configuration,this._transient=r.transient,this._ignorePathCasing=r._ignorePathCasing,this.folders=r.folders}get folders(){return this._folders}set folders(r){this._folders=r,this.updateFoldersMap()}get id(){return this._id}get transient(){return this._transient}get configuration(){return this._configuration}set configuration(r){this._configuration=r}getFolder(r){return r&&this._foldersMap.findSubstr(r.with({scheme:r.scheme,authority:r.authority,path:r.path}))||null}updateFoldersMap(){this._foldersMap=w.TernarySearchTree.forUris(this._ignorePathCasing);for(const r of this.folders)this._foldersMap.set(r.uri,r)}toJSON(){return{id:this.id,folders:this.folders,transient:this.transient,configuration:this.configuration}}}e.Workspace=f;class D{constructor(r,i){this.raw=i,this.uri=r.uri,this.index=r.index,this.name=r.name}toResource(r){return(0,B.joinPath)(this.uri,r)}toJSON(){return{uri:this.uri,name:this.name,index:this.index}}}e.WorkspaceFolder=D;function T(I){return new D({uri:I,index:0,name:(0,B.basenameOrAuthority)(I)},{uri:I.toString()})}e.toWorkspaceFolder=T,e.WORKSPACE_EXTENSION="code-workspace";const d=`.${e.WORKSPACE_EXTENSION}`;e.WORKSPACE_FILTER=[{name:(0,o.localize)(0,null),extensions:[e.WORKSPACE_EXTENSION]}],e.UNTITLED_WORKSPACE_NAME="workspace.json";function g(I,r){return B.extUriBiasedIgnorePathCase.isEqualOrParent(I,r.untitledWorkspacesHome)}e.isUntitledWorkspace=g;function b(I){let r;return S.URI.isUri(I)?r=I:r=I.configuration,r?.scheme===y.Schemas.tmp}e.isTemporaryWorkspace=b;function l(I){return(typeof I=="string"?(0,k.extname)(I):(0,B.extname)(I))===d}e.hasWorkspaceFileExtension=l}),define(Ee[58],we([1,0]),function(J,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Cache=void 0;class o{constructor(w){this.id=w,this._data=new Map,this._idPool=1}add(w){const B=this._idPool++;return this._data.set(B,w),this.logDebugInfo(),B}get(w,B){return this._data.has(w)?this._data.get(w)[B]:void 0}delete(w){this._data.delete(w),this.logDebugInfo()}logDebugInfo(){!o.enableDebugLogging||console.log(`${this.id} cache size - ${this._data.size}`)}}e.Cache=o,o.enableDebugLogging=!1}),define(Ee[30],we([1,0,9,24,3]),function(J,e,o,k,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IExtHostFileSystemInfo=e.ExtHostFileSystemInfo=void 0;class B{constructor(){this._systemSchemes=new Set(Object.keys(o.Schemas)),this._providerInfo=new Map,this.extUri=new k.ExtUri(A=>{const y=this._providerInfo.get(A.scheme);return!(y===void 0||y&1024)})}$acceptProviderInfos(A,y){y===null?this._providerInfo.delete(A.scheme):this._providerInfo.set(A.scheme,y)}isFreeScheme(A){return!this._providerInfo.has(A)&&!this._systemSchemes.has(A)}getCapabilities(A){return this._providerInfo.get(A)}}e.ExtHostFileSystemInfo=B,e.IExtHostFileSystemInfo=(0,w.createDecorator)("IExtHostFileSystemInfo")}),define(Ee[27],we([1,0,3]),function(J,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IExtHostInitDataService=void 0,e.IExtHostInitDataService=(0,o.createDecorator)("IExtHostInitDataService")}),define(Ee[149],we([1,0,13]),function(J,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtensionGlobalMemento=e.ExtensionMemento=void 0;class k{constructor(S,A,y){this._deferredPromises=new Map,this._id=S,this._shared=A,this._storage=y,this._init=this._storage.initializeExtensionStorage(this._shared,this._id,Object.create(null)).then(M=>(this._value=M,this)),this._storageListener=this._storage.onDidChangeStorage(M=>{M.shared===this._shared&&M.key===this._id&&(this._value=M.value)}),this._scheduler=new o.RunOnceScheduler(()=>{const M=this._deferredPromises;this._deferredPromises=new Map,(async()=>{try{await this._storage.setValue(this._shared,this._id,this._value);for(const L of M.values())L.complete()}catch(L){for(const v of M.values())v.error(L)}})()},0)}keys(){return Object.entries(this._value??{}).filter(([,S])=>S!==void 0).map(([S])=>S)}get whenReady(){return this._init}get(S,A){let y=this._value[S];return typeof y=="undefined"&&(y=A),y}update(S,A){this._value[S]=A;let y=this._deferredPromises.get(S);if(y!==void 0)return y.p;const M=new o.DeferredPromise;return this._deferredPromises.set(S,M),this._scheduler.isScheduled()||this._scheduler.schedule(),M.p}dispose(){this._storageListener.dispose()}}e.ExtensionMemento=k;class w extends k{constructor(S,A){super(S.identifier.value,!0,A);this._extension=S}setKeysForSync(S){this._storage.registerExtensionStorageKeysToSync({id:this._id,version:this._extension.version},S)}}e.ExtensionGlobalMemento=w}),define(Ee[150],we([1,0,5,2,12]),function(J,e,o,k,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtHostNotebookDocuments=void 0;let B=class{constructor(A,y){this._logService=A,this._notebooksAndEditors=y,this._onDidChangeNotebookDocumentMetadata=new o.Emitter,this.onDidChangeNotebookDocumentMetadata=this._onDidChangeNotebookDocumentMetadata.event,this._onDidSaveNotebookDocument=new o.Emitter,this.onDidSaveNotebookDocument=this._onDidSaveNotebookDocument.event}$acceptModelChanged(A,y,M){this._notebooksAndEditors.getNotebookDocument(k.URI.revive(A)).acceptModelChanged(y.value,M)}$acceptDirtyStateChanged(A,y){this._notebooksAndEditors.getNotebookDocument(k.URI.revive(A)).acceptDirty(y)}$acceptModelSaved(A){const y=this._notebooksAndEditors.getNotebookDocument(k.URI.revive(A));this._onDidSaveNotebookDocument.fire(y.apiNotebook)}$acceptDocumentPropertiesChanged(A,y){this._logService.debug("ExtHostNotebook#$acceptDocumentPropertiesChanged",A.path,y);const M=this._notebooksAndEditors.getNotebookDocument(k.URI.revive(A));M.acceptDocumentPropertiesChanged(y),y.metadata&&this._onDidChangeNotebookDocumentMetadata.fire({document:M.apiNotebook})}};B=Fe([Ne(0,w.ILogService)],B),e.ExtHostNotebookDocuments=B}),define(Ee[14],we([1,0,3]),function(J,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtHostRpcService=e.IExtHostRpcService=void 0,e.IExtHostRpcService=(0,o.createDecorator)("IExtHostRpcService");class k{constructor(B){this.getProxy=B.getProxy.bind(B),this.set=B.set.bind(B),this.assertRegistered=B.assertRegistered.bind(B),this.drain=B.drain.bind(B)}}e.ExtHostRpcService=k});var je=this&&this.__classPrivateFieldSet||function(J,e,o,k,w){if(k==="m")throw new TypeError("Private method is not writable");if(k==="a"&&!w)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?J!==e||!w:!e.has(J))throw new TypeError("Cannot write private member to an object whose class did not declare it");return k==="a"?w.call(J,o):w?w.value=o:e.set(J,o),o},De=this&&this.__classPrivateFieldGet||function(J,e,o,k){if(o==="a"&&!k)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?J!==e||!k:!e.has(J))throw new TypeError("Cannot read private member from an object whose class did not declare it");return o==="m"?k:o==="a"?k.call(J):k?k.value:e.get(J)};define(Ee[151],we([1,0,25,5]),function(J,e,o,k){"use strict";var w;Object.defineProperty(e,"__esModule",{value:!0}),e.ExtensionSecrets=void 0;class B{constructor(A,y){w.set(this,void 0),this._onDidChange=new k.Emitter,this.onDidChange=this._onDidChange.event,this._id=o.ExtensionIdentifier.toKey(A.identifier),je(this,w,y,"f"),De(this,w,"f").onDidChangePassword(M=>{M.extensionId===this._id&&this._onDidChange.fire({key:M.key})})}get(A){return De(this,w,"f").get(this._id,A)}store(A,y){return De(this,w,"f").store(this._id,A,y)}delete(A){return De(this,w,"f").delete(this._id,A)}}e.ExtensionSecrets=B,w=new WeakMap}),define(Ee[83],we([1,0,3,5]),function(J,e,o,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IExtHostTelemetry=e.ExtHostTelemetry=void 0;class w{constructor(){this._onDidChangeTelemetryEnabled=new k.Emitter,this.onDidChangeTelemetryEnabled=this._onDidChangeTelemetryEnabled.event,this._onDidChangeTelemetryConfiguration=new k.Emitter,this.onDidChangeTelemetryConfiguration=this._onDidChangeTelemetryConfiguration.event,this._level=0}getTelemetryConfiguration(){return this._level===3}getTelemetryDetails(){return{isCrashEnabled:this._level>=1,isErrorsEnabled:this._level>=2,isUsageEnabled:this._level>=3}}$initializeTelemetryLevel(S){this._level=S}$onDidChangeTelemetryLevel(S){this._oldTelemetryEnablement=this.getTelemetryConfiguration(),this._level=S,this._oldTelemetryEnablement!==this.getTelemetryConfiguration()&&this._onDidChangeTelemetryEnabled.fire(this.getTelemetryConfiguration()),this._onDidChangeTelemetryConfiguration.fire(this.getTelemetryDetails())}}e.ExtHostTelemetry=w,e.IExtHostTelemetry=(0,o.createDecorator)("IExtHostTelemetry")}),define(Ee[47],we([1,0]),function(J,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TestItemRootImpl=e.TestItemImpl=e.MixedTestItemController=e.InvalidTestItemError=e.DuplicateTestItemError=e.diffTestItems=e.getPrivateApiFor=e.createPrivateApiFor=e.ExtHostTestItemEventOp=void 0;var o;(function(T){T[T.Upsert=0]="Upsert",T[T.RemoveChild=1]="RemoveChild",T[T.Invalidated=2]="Invalidated",T[T.SetProp=3]="SetProp",T[T.Bulk=4]="Bulk"})(o=e.ExtHostTestItemEventOp||(e.ExtHostTestItemEventOp={}));const k=new WeakMap,w=(T,d)=>{const g={controllerId:d};return k.set(T,g),g};e.createPrivateApiFor=w;const B=T=>k.get(T);e.getPrivateApiFor=B;const S=(T,d,g,b)=>{let l=g;return{enumerable:!0,configurable:!1,get(){return l},set(I){if(!b(l,I)){const r=l;l=I,T.listener?.({op:3,key:d,value:I,previous:r})}}}},A=(T,d)=>T===d,y={range:(T,d)=>T===d?!0:!T||!d?!1:T.isEqual(d),label:A,description:A,sortText:A,busy:A,error:A,canResolveChildren:A,tags:(T,d)=>!(T.length!==d.length||T.some(g=>!d.find(b=>g.id===b.id)))},M=Object.keys(y),L=(T,d)=>({range:S(T,"range",void 0,y.range),label:S(T,"label",d,y.label),description:S(T,"description",void 0,y.description),sortText:S(T,"sortText",void 0,y.sortText),canResolveChildren:S(T,"canResolveChildren",!1,y.canResolveChildren),busy:S(T,"busy",!1,y.busy),error:S(T,"error",void 0,y.error),tags:S(T,"tags",[],y.tags)}),v=(T,d)=>{const g=new Map;for(const b of M)y[b](T[b],d[b])||g.set(b,d[b]);return g};e.diffTestItems=v;class u extends Error{constructor(d){super(`Attempted to insert a duplicate test item ID ${d}`)}}e.DuplicateTestItemError=u;class m extends Error{constructor(d){super(`TestItem with ID "${d}" is invalid. Make sure to create it from the createTestItem method.`)}}e.InvalidTestItemError=m;class s extends Error{constructor(d,g,b){super(`TestItem with ID "${d}" is from controller "${g}" and cannot be added as a child of an item from controller "${b}".`)}}e.MixedTestItemController=s;const n=T=>{const d=(0,e.getPrivateApiFor)(T);let g=new Map;return{get size(){return g.size},forEach(b,l){for(const I of g.values())b.call(l,I,this)},replace(b){const l=new Map,I=new Set(g.keys()),r={op:4,ops:[]};for(const i of b){if(!(i instanceof f))throw new m(i.id);const c=(0,e.getPrivateApiFor)(i).controllerId;if(c!==d.controllerId)throw new s(i.id,c,d.controllerId);if(l.has(i.id))throw new u(i.id);l.set(i.id,i),I.delete(i.id),r.ops.push({op:0,item:i})}for(const i of I.keys())r.ops.push({op:1,id:i});d.listener?.(r),g=l},add(b){if(!(b instanceof f))throw new m(b.id);g.set(b.id,b),d.listener?.({op:0,item:b})},delete(b){g.delete(b)&&d.listener?.({op:1,id:b})},get(b){return g.get(b)},toJSON(){return Array.from(g.values())},[Symbol.iterator](){return g.values()}}};class f{constructor(d,g,b,l){if(g.includes("\0"))throw new Error(`Test IDs may not include the ${JSON.stringify(g)} symbol`);const I=(0,e.createPrivateApiFor)(this,d);Object.defineProperties(this,{id:{value:g,enumerable:!0,writable:!1},uri:{value:l,enumerable:!0,writable:!1},parent:{enumerable:!1,get(){return I.parent instanceof D?void 0:I.parent}},children:{value:n(this),enumerable:!0,writable:!1},...L(I,b)})}invalidateResults(){(0,e.getPrivateApiFor)(this).listener?.({op:2})}}e.TestItemImpl=f;class D extends f{constructor(d,g){super(d,d,g,void 0)}}e.TestItemRootImpl=D}),define(Ee[59],we([1,0,3,147,5,14]),function(J,e,o,k,w,B){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtHostTunnelService=e.IExtHostTunnelService=e.TunnelDtoConverter=void 0;var S;(function(y){function M(v){return{remoteAddress:v.remoteAddress,localAddress:v.localAddress,public:!!v.public,privacy:v.privacy??(v.public?k.TunnelPrivacyId.Public:k.TunnelPrivacyId.Private),protocol:v.protocol}}y.fromApiTunnel=M;function L(v){return{remoteAddress:{host:v.tunnelRemoteHost,port:v.tunnelRemotePort},localAddress:v.localAddress,public:v.privacy!==k.TunnelPrivacyId.ConstantPrivate&&v.privacy!==k.TunnelPrivacyId.ConstantPrivate,privacy:v.privacy,protocol:v.protocol}}y.fromServiceTunnel=L})(S=e.TunnelDtoConverter||(e.TunnelDtoConverter={})),e.IExtHostTunnelService=(0,o.createDecorator)("IExtHostTunnelService");let A=class{constructor(M){this.onDidChangeTunnels=new w.Emitter().event}async $applyCandidateFilter(M){return M}async openTunnel(M,L){}async getTunnels(){return[]}async setTunnelFactory(M){return{dispose:()=>{}}}registerPortsAttributesProvider(M,L){return{dispose:()=>{}}}async $providePortAttributes(M,L,v,u,m){return[]}async $forwardPort(M,L){}async $closeTunnel(M){}async $onDidTunnelsChange(){}async $registerCandidateFinder(){}};A=Fe([Ne(0,B.IExtHostRpcService)],A),e.ExtHostTunnelService=A});var je=this&&this.__classPrivateFieldSet||function(J,e,o,k,w){if(k==="m")throw new TypeError("Private method is not writable");if(k==="a"&&!w)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?J!==e||!w:!e.has(J))throw new TypeError("Cannot write private member to an object whose class did not declare it");return k==="a"?w.call(J,o):w?w.value=o:e.set(J,o),o},De=this&&this.__classPrivateFieldGet||function(J,e,o,k){if(o==="a"&&!k)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?J!==e||!k:!e.has(J))throw new TypeError("Cannot read private member from an object whose class did not declare it");return o==="m"?k:o==="a"?k.call(J):k?k.value:e.get(J)};define(Ee[7],we([1,0,16,15,72,22,71,10,11,2,36,45,81]),function(J,e,o,k,w,B,S,A,y,M,L,v,u){"use strict";var m,s,n,f,D,T,d,g,b,l,I,r,i,c,t,a,p,h,_,P;Object.defineProperty(e,"__esModule",{value:!0}),e.TypeHierarchyItem=e.PortAutoForwardAction=e.WorkspaceTrustState=e.ExternalUriOpenerPriority=e.FunctionCoverage=e.BranchCoverage=e.StatementCoverage=e.FileCoverage=e.CoveredCount=e.TestTag=e.TestMessage=e.TestRunRequest=e.TestRunProfileKind=e.TestResultState=e.PortAttributes=e.LinkedEditingRanges=e.StandardTokenType=e.ExtensionRuntime=e.ExtensionMode=e.TimelineItem=e.NotebookRendererScript=e.NotebookControllerAffinity=e.NotebookCellStatusBarItem=e.NotebookEditorRevealType=e.NotebookCellStatusBarAlignment=e.NotebookCellExecutionState=e.NotebookCellKind=e.NotebookCellOutput=e.NotebookCellOutputItem=e.NotebookData=e.NotebookCellData=e.NotebookRange=e.ColorThemeKind=e.ColorTheme=e.FileDecoration=e.ExtensionKind=e.QuickPickItemKind=e.QuickInputButtons=e.DebugConsoleMode=e.SemanticTokensEdits=e.SemanticTokensEdit=e.SemanticTokens=e.SemanticTokensBuilder=e.SemanticTokensLegend=e.CommentThreadState=e.CommentMode=e.CommentThreadCollapsibleState=e.FoldingRangeKind=e.FoldingRange=e.FileSystemError=e.FileChangeType=e.InlineValueContext=e.InlineValueEvaluatableExpression=e.InlineValueVariableLookup=e.InlineValueText=e.InlineCompletionTriggerKind=e.EvaluatableExpression=e.DebugAdapterInlineImplementation=e.DebugAdapterNamedPipeServer=e.DebugAdapterServer=e.DebugAdapterExecutable=e.DataBreakpoint=e.FunctionBreakpoint=e.SourceBreakpoint=e.Breakpoint=e.RelativePattern=e.ConfigurationTarget=e.ThemeColor=e.ThemeIcon=e.TreeDataTransfer=e.TreeDataTransferItem=e.TreeItemCollapsibleState=e.TreeItem=e.ProgressLocation=e.Task=e.CustomExecution=e.TaskScope=e.ShellQuoting=e.ShellExecution=e.ProcessExecution=e.TaskGroup=e.TaskPanelKind=e.TaskRevealKind=e.TerminalProfile=e.TerminalLocation=e.TerminalLink=e.SourceControlInputBoxValidationType=e.ColorFormat=e.ColorPresentation=e.ColorInformation=e.Color=e.DocumentLink=e.DecorationRangeBehavior=e.TextDocumentChangeReason=e.TextEditorSelectionChangeKind=e.TextEditorRevealType=e.TextDocumentSaveReason=e.TextEditorLineNumbersStyle=e.StatusBarAlignment=e.ViewColumn=e.InlineSuggestions=e.InlineSuggestion=e.CompletionList=e.CompletionItem=e.CompletionItemTag=e.CompletionItemKind=e.CompletionTriggerKind=e.InlayHint=e.InlayHintLabelPart=e.InlayHintKind=e.SignatureHelpTriggerKind=e.SignatureHelp=e.SignatureInformation=e.ParameterInformation=e.MarkdownString=e.CodeLens=e.LanguageStatusSeverity=e.CallHierarchyOutgoingCall=e.CallHierarchyIncomingCall=e.CallHierarchyItem=e.SelectionRange=e.CodeActionKind=e.CodeAction=e.CodeActionTriggerKind=e.DocumentSymbol=e.SymbolInformation=e.SymbolTag=e.SymbolKind=e.DocumentHighlight=e.DocumentHighlightKind=e.Hover=e.Diagnostic=e.DiagnosticRelatedInformation=e.Location=e.DiagnosticSeverity=e.DiagnosticTag=e.SnippetString=e.WorkspaceEdit=e.FileEditType=e.TextEdit=e.EnvironmentVariableMutatorType=e.EndOfLine=e.RemoteAuthorityResolverError=e.ResolvedAuthority=e.Selection=e.Range=e.Position=e.Disposable=void 0;function R(j){function U(){return Reflect.construct(j,arguments,this.constructor)}return Object.defineProperty(U,"name",Object.getOwnPropertyDescriptor(j,"name")),Object.setPrototypeOf(U,j),Object.setPrototypeOf(U.prototype,j.prototype),U}let $=D=class{constructor(U){m.set(this,void 0),je(this,m,U,"f")}static from(...U){let ie=U;return new D(function(){if(ie){for(const be of ie)be&&typeof be.dispose=="function"&&be.dispose();ie=void 0}})}dispose(){typeof De(this,m,"f")=="function"&&(De(this,m,"f").call(this),je(this,m,void 0,"f"))}};m=new WeakMap,$=D=Fe([R],$),e.Disposable=$;let E=T=class{constructor(U,ie){if(U<0)throw(0,k.illegalArgument)("line must be non-negative");if(ie<0)throw(0,k.illegalArgument)("character must be non-negative");this._line=U,this._character=ie}static Min(...U){if(U.length===0)throw new TypeError;let ie=U[0];for(let be=1;be<U.length;be++){const He=U[be];He.isBefore(ie)&&(ie=He)}return ie}static Max(...U){if(U.length===0)throw new TypeError;let ie=U[0];for(let be=1;be<U.length;be++){const He=U[be];He.isAfter(ie)&&(ie=He)}return ie}static isPosition(U){if(!U)return!1;if(U instanceof T)return!0;let{line:ie,character:be}=U;return typeof ie=="number"&&typeof be=="number"}static of(U){if(U instanceof T)return U;if(this.isPosition(U))return new T(U.line,U.character);throw new Error("Invalid argument, is NOT a position-like object")}get line(){return this._line}get character(){return this._character}isBefore(U){return this._line<U._line?!0:U._line<this._line?!1:this._character<U._character}isBeforeOrEqual(U){return this._line<U._line?!0:U._line<this._line?!1:this._character<=U._character}isAfter(U){return!this.isBeforeOrEqual(U)}isAfterOrEqual(U){return!this.isBefore(U)}isEqual(U){return this._line===U._line&&this._character===U._character}compareTo(U){return this._line<U._line?-1:this._line>U.line?1:this._character<U._character?-1:this._character>U._character?1:0}translate(U,ie=0){if(U===null||ie===null)throw(0,k.illegalArgument)();let be;return typeof U=="undefined"?be=0:typeof U=="number"?be=U:(be=typeof U.lineDelta=="number"?U.lineDelta:0,ie=typeof U.characterDelta=="number"?U.characterDelta:0),be===0&&ie===0?this:new T(this.line+be,this.character+ie)}with(U,ie=this.character){if(U===null||ie===null)throw(0,k.illegalArgument)();let be;return typeof U=="undefined"?be=this.line:typeof U=="number"?be=U:(be=typeof U.line=="number"?U.line:this.line,ie=typeof U.character=="number"?U.character:this.character),be===this.line&&ie===this.character?this:new T(be,ie)}toJSON(){return{line:this.line,character:this.character}}};E=T=Fe([R],E),e.Position=E;let z=d=class{constructor(U,ie,be,He){let Ke,Ye;if(typeof U=="number"&&typeof ie=="number"&&typeof be=="number"&&typeof He=="number"?(Ke=new E(U,ie),Ye=new E(be,He)):E.isPosition(U)&&E.isPosition(ie)&&(Ke=E.of(U),Ye=E.of(ie)),!Ke||!Ye)throw new Error("Invalid arguments");Ke.isBefore(Ye)?(this._start=Ke,this._end=Ye):(this._start=Ye,this._end=Ke)}static isRange(U){return U instanceof d?!0:U?E.isPosition(U.start)&&E.isPosition(U.end):!1}static of(U){if(U instanceof d)return U;if(this.isRange(U))return new d(U.start,U.end);throw new Error("Invalid argument, is NOT a range-like object")}get start(){return this._start}get end(){return this._end}contains(U){return d.isRange(U)?this.contains(U.start)&&this.contains(U.end):E.isPosition(U)?!(E.of(U).isBefore(this._start)||this._end.isBefore(U)):!1}isEqual(U){return this._start.isEqual(U._start)&&this._end.isEqual(U._end)}intersection(U){const ie=E.Max(U.start,this._start),be=E.Min(U.end,this._end);if(!ie.isAfter(be))return new d(ie,be)}union(U){if(this.contains(U))return this;if(U.contains(this))return U;const ie=E.Min(U.start,this._start),be=E.Max(U.end,this.end);return new d(ie,be)}get isEmpty(){return this._start.isEqual(this._end)}get isSingleLine(){return this._start.line===this._end.line}with(U,ie=this.end){if(U===null||ie===null)throw(0,k.illegalArgument)();let be;return U?E.isPosition(U)?be=U:(be=U.start||this.start,ie=U.end||this.end):be=this.start,be.isEqual(this._start)&&ie.isEqual(this.end)?this:new d(be,ie)}toJSON(){return[this.start,this.end]}};z=d=Fe([R],z),e.Range=z;let V=g=class extends z{constructor(U,ie,be,He){let Ke,Ye;if(typeof U=="number"&&typeof ie=="number"&&typeof be=="number"&&typeof He=="number"?(Ke=new E(U,ie),Ye=new E(be,He)):E.isPosition(U)&&E.isPosition(ie)&&(Ke=E.of(U),Ye=E.of(ie)),!Ke||!Ye)throw new Error("Invalid arguments");super(Ke,Ye);this._anchor=Ke,this._active=Ye}static isSelection(U){return U instanceof g?!0:U?z.isRange(U)&&E.isPosition(U.anchor)&&E.isPosition(U.active)&&typeof U.isReversed=="boolean":!1}get anchor(){return this._anchor}get active(){return this._active}get isReversed(){return this._anchor===this._end}toJSON(){return{start:this.start,end:this.end,active:this.active,anchor:this.anchor}}};V=g=Fe([R],V),e.Selection=V;class W{constructor(U,ie,be){if(typeof U!="string"||U.length===0)throw(0,k.illegalArgument)("host");if(typeof ie!="number"||ie===0||Math.round(ie)!==ie)throw(0,k.illegalArgument)("port");if(typeof be!="undefined"&&(typeof be!="string"||be.length===0||!/^[0-9A-Za-z\-]+$/.test(be)))throw(0,k.illegalArgument)("connectionToken");this.host=U,this.port=Math.round(ie),this.connectionToken=be}}e.ResolvedAuthority=W;class Q extends Error{constructor(U,ie=u.RemoteAuthorityResolverErrorCode.Unknown,be){super(U);this._message=U,this._code=ie,this._detail=be,typeof Object.setPrototypeOf=="function"&&Object.setPrototypeOf(this,Q.prototype)}static NotAvailable(U,ie){return new Q(U,u.RemoteAuthorityResolverErrorCode.NotAvailable,ie)}static TemporarilyNotAvailable(U){return new Q(U,u.RemoteAuthorityResolverErrorCode.TemporarilyNotAvailable)}}e.RemoteAuthorityResolverError=Q;var K;(function(j){j[j.LF=1]="LF",j[j.CRLF=2]="CRLF"})(K=e.EndOfLine||(e.EndOfLine={}));var H;(function(j){j[j.Replace=1]="Replace",j[j.Append=2]="Append",j[j.Prepend=3]="Prepend"})(H=e.EnvironmentVariableMutatorType||(e.EnvironmentVariableMutatorType={}));let te=b=class{constructor(U,ie){this._range=U,this._newText=ie}static isTextEdit(U){return U instanceof b?!0:U?z.isRange(U)&&typeof U.newText=="string":!1}static replace(U,ie){return new b(U,ie)}static insert(U,ie){return b.replace(new z(U,U),ie)}static delete(U){return b.replace(U,"")}static setEndOfLine(U){const ie=new b(new z(new E(0,0),new E(0,0)),"");return ie.newEol=U,ie}get range(){return this._range}set range(U){if(U&&!z.isRange(U))throw(0,k.illegalArgument)("range");this._range=U}get newText(){return this._newText||""}set newText(U){if(U&&typeof U!="string")throw(0,k.illegalArgument)("newText");this._newText=U}get newEol(){return this._newEol}set newEol(U){if(U&&typeof U!="number")throw(0,k.illegalArgument)("newEol");this._newEol=U}toJSON(){return{range:this.range,newText:this.newText,newEol:this._newEol}}};te=b=Fe([R],te),e.TextEdit=te;var ae;(function(j){j[j.File=1]="File",j[j.Text=2]="Text",j[j.Cell=3]="Cell",j[j.CellReplace=5]="CellReplace"})(ae=e.FileEditType||(e.FileEditType={}));let ee=class{constructor(){this._edits=[]}_allEntries(){return this._edits}renameFile(U,ie,be,He){this._edits.push({_type:1,from:U,to:ie,options:be,metadata:He})}createFile(U,ie,be){this._edits.push({_type:1,from:void 0,to:U,options:ie,metadata:be})}deleteFile(U,ie,be){this._edits.push({_type:1,from:U,to:void 0,options:ie,metadata:be})}replaceNotebookMetadata(U,ie,be){this._edits.push({_type:3,metadata:be,uri:U,edit:{editType:5,metadata:ie},notebookMetadata:ie})}replaceNotebookCells(U,ie,be,He,Ke){let Ye,et,_t=[],Pt;if(Gt.isNotebookRange(ie)&&Pe.isNotebookCellDataArray(be)&&!Pe.isNotebookCellDataArray(He)?(Ye=ie.start,et=ie.end,_t=be,Pt=He):typeof ie=="number"&&typeof be=="number"&&Pe.isNotebookCellDataArray(He)&&(Ye=ie,et=be,_t=He,Pt=Ke),Ye===void 0||et===void 0)throw new Error("Invalid arguments");(Ye!==et||_t.length>0)&&this._edits.push({_type:5,uri:U,index:Ye,count:et-Ye,cells:_t,metadata:Pt})}replaceNotebookCellMetadata(U,ie,be,He){this._edits.push({_type:3,metadata:He,uri:U,edit:{editType:8,index:ie,metadata:be}})}replace(U,ie,be,He){this._edits.push({_type:2,uri:U,edit:new te(ie,be),metadata:He})}insert(U,ie,be,He){this.replace(U,new z(ie,ie),be,He)}delete(U,ie,be){this.replace(U,ie,"",be)}has(U){return this._edits.some(ie=>ie._type===2&&ie.uri.toString()===U.toString())}set(U,ie){if(ie)for(const be of ie)be&&this._edits.push({_type:2,uri:U,edit:be});else{for(let be=0;be<this._edits.length;be++){const He=this._edits[be];He._type===2&&He.uri.toString()===U.toString()&&(this._edits[be]=void 0)}(0,o.coalesceInPlace)(this._edits)}}get(U){const ie=[];for(let be of this._edits)be._type===2&&be.uri.toString()===U.toString()&&ie.push(be.edit);return ie}entries(){const U=new B.ResourceMap;for(let ie of this._edits)if(ie._type===2){let be=U.get(ie.uri);be||(be=[ie.uri,[]],U.set(ie.uri,be)),be[1].push(ie.edit)}return[...U.values()]}get size(){return this.entries().length}toJSON(){return this.entries()}};ee=Fe([R],ee),e.WorkspaceEdit=ee;let ce=l=class{constructor(U){this._tabstop=1,this.value=U||""}static isSnippetString(U){return U instanceof l?!0:U?typeof U.value=="string":!1}static _escape(U){return U.replace(/\$|}|\\/g,"\\$&")}appendText(U){return this.value+=l._escape(U),this}appendTabstop(U=this._tabstop++){return this.value+="$",this.value+=U,this}appendPlaceholder(U,ie=this._tabstop++){if(typeof U=="function"){const be=new l;be._tabstop=this._tabstop,U(be),this._tabstop=be._tabstop,U=be.value}else U=l._escape(U);return this.value+="${",this.value+=ie,this.value+=":",this.value+=U,this.value+="}",this}appendChoice(U,ie=this._tabstop++){const be=U.map(He=>He.replace(/\$|}|\\|,/g,"\\$&")).join(",");return this.value+="${",this.value+=ie,this.value+="|",this.value+=be,this.value+="|}",this}appendVariable(U,ie){if(typeof ie=="function"){const be=new l;be._tabstop=this._tabstop,ie(be),this._tabstop=be._tabstop,ie=be.value}else typeof ie=="string"&&(ie=ie.replace(/\$|}/g,"\\$&"));return this.value+="${",this.value+=U,ie&&(this.value+=":",this.value+=ie),this.value+="}",this}};ce=l=Fe([R],ce),e.SnippetString=ce;var de;(function(j){j[j.Unnecessary=1]="Unnecessary",j[j.Deprecated=2]="Deprecated"})(de=e.DiagnosticTag||(e.DiagnosticTag={}));var Se;(function(j){j[j.Hint=3]="Hint",j[j.Information=2]="Information",j[j.Warning=1]="Warning",j[j.Error=0]="Error"})(Se=e.DiagnosticSeverity||(e.DiagnosticSeverity={}));let fe=I=class{constructor(U,ie){if(this.uri=U,ie)if(z.isRange(ie))this.range=z.of(ie);else if(E.isPosition(ie))this.range=new z(ie,ie);else throw new Error("Illegal argument")}static isLocation(U){return U instanceof I?!0:U?z.isRange(U.range)&&M.URI.isUri(U.uri):!1}toJSON(){return{uri:this.uri,range:this.range}}};fe=I=Fe([R],fe),e.Location=fe;let ne=class{constructor(U,ie){this.location=U,this.message=ie}static is(U){return U?typeof U.message=="string"&&U.location&&z.isRange(U.location.range)&&M.URI.isUri(U.location.uri):!1}static isEqual(U,ie){return U===ie?!0:!U||!ie?!1:U.message===ie.message&&U.location.range.isEqual(ie.location.range)&&U.location.uri.toString()===ie.location.uri.toString()}};ne=Fe([R],ne),e.DiagnosticRelatedInformation=ne;let me=class{constructor(U,ie,be=Se.Error){if(!z.isRange(U))throw new TypeError("range must be set");if(!ie)throw new TypeError("message must be set");this.range=U,this.message=ie,this.severity=be}toJSON(){return{severity:Se[this.severity],message:this.message,range:this.range,source:this.source,code:this.code}}static isEqual(U,ie){return U===ie?!0:!U||!ie?!1:U.message===ie.message&&U.severity===ie.severity&&U.code===ie.code&&U.severity===ie.severity&&U.source===ie.source&&U.range.isEqual(ie.range)&&(0,o.equals)(U.tags,ie.tags)&&(0,o.equals)(U.relatedInformation,ie.relatedInformation,ne.isEqual)}};me=Fe([R],me),e.Diagnostic=me;let ke=class{constructor(U,ie){if(!U)throw new Error("Illegal argument, contents must be defined");Array.isArray(U)?this.contents=U:this.contents=[U],this.range=ie}};ke=Fe([R],ke),e.Hover=ke;var Ae;(function(j){j[j.Text=0]="Text",j[j.Read=1]="Read",j[j.Write=2]="Write"})(Ae=e.DocumentHighlightKind||(e.DocumentHighlightKind={}));let Be=class{constructor(U,ie=Ae.Text){this.range=U,this.kind=ie}toJSON(){return{range:this.range,kind:Ae[this.kind]}}};Be=Fe([R],Be),e.DocumentHighlight=Be;var Xe;(function(j){j[j.File=0]="File",j[j.Module=1]="Module",j[j.Namespace=2]="Namespace",j[j.Package=3]="Package",j[j.Class=4]="Class",j[j.Method=5]="Method",j[j.Property=6]="Property",j[j.Field=7]="Field",j[j.Constructor=8]="Constructor",j[j.Enum=9]="Enum",j[j.Interface=10]="Interface",j[j.Function=11]="Function",j[j.Variable=12]="Variable",j[j.Constant=13]="Constant",j[j.String=14]="String",j[j.Number=15]="Number",j[j.Boolean=16]="Boolean",j[j.Array=17]="Array",j[j.Object=18]="Object",j[j.Key=19]="Key",j[j.Null=20]="Null",j[j.EnumMember=21]="EnumMember",j[j.Struct=22]="Struct",j[j.Event=23]="Event",j[j.Operator=24]="Operator",j[j.TypeParameter=25]="TypeParameter"})(Xe=e.SymbolKind||(e.SymbolKind={}));var ge;(function(j){j[j.Deprecated=1]="Deprecated"})(ge=e.SymbolTag||(e.SymbolTag={}));let ue=r=class{constructor(U,ie,be,He,Ke){this.name=U,this.kind=ie,this.containerName=Ke,typeof be=="string"&&(this.containerName=be),He instanceof fe?this.location=He:be instanceof z&&(this.location=new fe(He,be)),r.validate(this)}static validate(U){if(!U.name)throw new Error("name must not be falsy")}toJSON(){return{name:this.name,kind:Xe[this.kind],location:this.location,containerName:this.containerName}}};ue=r=Fe([R],ue),e.SymbolInformation=ue;let N=i=class{constructor(U,ie,be,He,Ke){this.name=U,this.detail=ie,this.kind=be,this.range=He,this.selectionRange=Ke,this.children=[],i.validate(this)}static validate(U){if(!U.name)throw new Error("name must not be falsy");if(!U.range.contains(U.selectionRange))throw new Error("selectionRange must be contained in fullRange");U.children&&U.children.forEach(i.validate)}};N=i=Fe([R],N),e.DocumentSymbol=N;var F;(function(j){j[j.Invoke=1]="Invoke",j[j.Automatic=2]="Automatic"})(F=e.CodeActionTriggerKind||(e.CodeActionTriggerKind={}));let C=class{constructor(U,ie){this.title=U,this.kind=ie}};C=Fe([R],C),e.CodeAction=C;let O=c=class{constructor(U){this.value=U}append(U){return new c(this.value?this.value+c.sep+U:U)}intersects(U){return this.contains(U)||U.contains(this)}contains(U){return this.value===U.value||U.value.startsWith(this.value+c.sep)}};O.sep=".",O=c=Fe([R],O),e.CodeActionKind=O,O.Empty=new O(""),O.QuickFix=O.Empty.append("quickfix"),O.Refactor=O.Empty.append("refactor"),O.RefactorExtract=O.Refactor.append("extract"),O.RefactorInline=O.Refactor.append("inline"),O.RefactorRewrite=O.Refactor.append("rewrite"),O.Source=O.Empty.append("source"),O.SourceOrganizeImports=O.Source.append("organizeImports"),O.SourceFixAll=O.Source.append("fixAll");let x=class{constructor(U,ie){if(this.range=U,this.parent=ie,ie&&!ie.range.contains(this.range))throw new Error("Invalid argument: parent must contain this range")}};x=Fe([R],x),e.SelectionRange=x;class X{constructor(U,ie,be,He,Ke,Ye){this.kind=U,this.name=ie,this.detail=be,this.uri=He,this.range=Ke,this.selectionRange=Ye}}e.CallHierarchyItem=X;class re{constructor(U,ie){this.fromRanges=ie,this.from=U}}e.CallHierarchyIncomingCall=re;class ve{constructor(U,ie){this.fromRanges=ie,this.to=U}}e.CallHierarchyOutgoingCall=ve;var Ie;(function(j){j[j.Information=0]="Information",j[j.Warning=1]="Warning",j[j.Error=2]="Error"})(Ie=e.LanguageStatusSeverity||(e.LanguageStatusSeverity={}));let Me=class{constructor(U,ie){this.range=U,this.command=ie}get isResolved(){return!!this.command}};Me=Fe([R],Me),e.CodeLens=Me;let Le=t=class{constructor(U,ie=!1){s.set(this,void 0),je(this,s,new w.MarkdownString(U,{supportThemeIcons:ie}),"f")}static isMarkdownString(U){return U instanceof t?!0:U&&U.appendCodeblock&&U.appendMarkdown&&U.appendText&&U.value!==void 0}get value(){return De(this,s,"f").value}set value(U){De(this,s,"f").value=U}get isTrusted(){return De(this,s,"f").isTrusted}set isTrusted(U){De(this,s,"f").isTrusted=U}get supportThemeIcons(){return De(this,s,"f").supportThemeIcons}set supportThemeIcons(U){De(this,s,"f").supportThemeIcons=U}get supportHtml(){return De(this,s,"f").supportHtml}set supportHtml(U){De(this,s,"f").supportHtml=U}get baseUri(){return De(this,s,"f").baseUri}set baseUri(U){De(this,s,"f").baseUri=U}appendText(U){return De(this,s,"f").appendText(U),this}appendMarkdown(U){return De(this,s,"f").appendMarkdown(U),this}appendCodeblock(U,ie){return De(this,s,"f").appendCodeblock(ie??"",U),this}};s=new WeakMap,Le=t=Fe([R],Le),e.MarkdownString=Le;let ze=class{constructor(U,ie){this.label=U,this.documentation=ie}};ze=Fe([R],ze),e.ParameterInformation=ze;let xe=class{constructor(U,ie){this.label=U,this.documentation=ie,this.parameters=[]}};xe=Fe([R],xe),e.SignatureInformation=xe;let Re=class{constructor(){this.activeSignature=0,this.activeParameter=0,this.signatures=[]}};Re=Fe([R],Re),e.SignatureHelp=Re;var Qe;(function(j){j[j.Invoke=1]="Invoke",j[j.TriggerCharacter=2]="TriggerCharacter",j[j.ContentChange=3]="ContentChange"})(Qe=e.SignatureHelpTriggerKind||(e.SignatureHelpTriggerKind={}));var tt;(function(j){j[j.Type=1]="Type",j[j.Parameter=2]="Parameter"})(tt=e.InlayHintKind||(e.InlayHintKind={}));let Te=class{constructor(U){this.value=U}};Te=Fe([R],Te),e.InlayHintLabelPart=Te;let it=class{constructor(U,ie,be){this.position=U,this.label=ie,this.kind=be}};it=Fe([R],it),e.InlayHint=it;var G;(function(j){j[j.Invoke=0]="Invoke",j[j.TriggerCharacter=1]="TriggerCharacter",j[j.TriggerForIncompleteCompletions=2]="TriggerForIncompleteCompletions"})(G=e.CompletionTriggerKind||(e.CompletionTriggerKind={}));var Y;(function(j){j[j.Text=0]="Text",j[j.Method=1]="Method",j[j.Function=2]="Function",j[j.Constructor=3]="Constructor",j[j.Field=4]="Field",j[j.Variable=5]="Variable",j[j.Class=6]="Class",j[j.Interface=7]="Interface",j[j.Module=8]="Module",j[j.Property=9]="Property",j[j.Unit=10]="Unit",j[j.Value=11]="Value",j[j.Enum=12]="Enum",j[j.Keyword=13]="Keyword",j[j.Snippet=14]="Snippet",j[j.Color=15]="Color",j[j.File=16]="File",j[j.Reference=17]="Reference",j[j.Folder=18]="Folder",j[j.EnumMember=19]="EnumMember",j[j.Constant=20]="Constant",j[j.Struct=21]="Struct",j[j.Event=22]="Event",j[j.Operator=23]="Operator",j[j.TypeParameter=24]="TypeParameter",j[j.User=25]="User",j[j.Issue=26]="Issue"})(Y=e.CompletionItemKind||(e.CompletionItemKind={}));var le;(function(j){j[j.Deprecated=1]="Deprecated"})(le=e.CompletionItemTag||(e.CompletionItemTag={}));let Oe=class{constructor(U,ie){this.label=U,this.kind=ie}toJSON(){return{label:this.label,kind:this.kind&&Y[this.kind],detail:this.detail,documentation:this.documentation,sortText:this.sortText,filterText:this.filterText,preselect:this.preselect,insertText:this.insertText,textEdit:this.textEdit}}};Oe=Fe([R],Oe),e.CompletionItem=Oe;let We=class{constructor(U=[],ie=!1){this.items=U,this.isIncomplete=ie}};We=Fe([R],We),e.CompletionList=We;let Ge=class{constructor(U,ie,be){this.insertText=U,this.range=ie,this.command=be}};Ge=Fe([R],Ge),e.InlineSuggestion=Ge;let Je=class{constructor(U){this.items=U}};Je=Fe([R],Je),e.InlineSuggestions=Je;var ft;(function(j){j[j.Active=-1]="Active",j[j.Beside=-2]="Beside",j[j.One=1]="One",j[j.Two=2]="Two",j[j.Three=3]="Three",j[j.Four=4]="Four",j[j.Five=5]="Five",j[j.Six=6]="Six",j[j.Seven=7]="Seven",j[j.Eight=8]="Eight",j[j.Nine=9]="Nine"})(ft=e.ViewColumn||(e.ViewColumn={}));var It;(function(j){j[j.Left=1]="Left",j[j.Right=2]="Right"})(It=e.StatusBarAlignment||(e.StatusBarAlignment={}));var St;(function(j){j[j.Off=0]="Off",j[j.On=1]="On",j[j.Relative=2]="Relative"})(St=e.TextEditorLineNumbersStyle||(e.TextEditorLineNumbersStyle={}));var kt;(function(j){j[j.Manual=1]="Manual",j[j.AfterDelay=2]="AfterDelay",j[j.FocusOut=3]="FocusOut"})(kt=e.TextDocumentSaveReason||(e.TextDocumentSaveReason={}));var qe;(function(j){j[j.Default=0]="Default",j[j.InCenter=1]="InCenter",j[j.InCenterIfOutsideViewport=2]="InCenterIfOutsideViewport",j[j.AtTop=3]="AtTop"})(qe=e.TextEditorRevealType||(e.TextEditorRevealType={}));var vt;(function(j){j[j.Keyboard=1]="Keyboard",j[j.Mouse=2]="Mouse",j[j.Command=3]="Command"})(vt=e.TextEditorSelectionChangeKind||(e.TextEditorSelectionChangeKind={}));var Nt;(function(j){j[j.Undo=1]="Undo",j[j.Redo=2]="Redo"})(Nt=e.TextDocumentChangeReason||(e.TextDocumentChangeReason={}));var nt;(function(j){j[j.OpenOpen=0]="OpenOpen",j[j.ClosedClosed=1]="ClosedClosed",j[j.OpenClosed=2]="OpenClosed",j[j.ClosedOpen=3]="ClosedOpen"})(nt=e.DecorationRangeBehavior||(e.DecorationRangeBehavior={})),function(j){function U(ie){switch(ie){case"keyboard":return j.Keyboard;case"mouse":return j.Mouse;case"api":return j.Command}}j.fromValue=U}(vt=e.TextEditorSelectionChangeKind||(e.TextEditorSelectionChangeKind={}));let ut=class{constructor(U,ie){if(ie&&!M.URI.isUri(ie))throw(0,k.illegalArgument)("target");if(!z.isRange(U)||U.isEmpty)throw(0,k.illegalArgument)("range");this.range=U,this.target=ie}};ut=Fe([R],ut),e.DocumentLink=ut;let At=class{constructor(U,ie,be,He){this.red=U,this.green=ie,this.blue=be,this.alpha=He}};At=Fe([R],At),e.Color=At;let Tt=class{constructor(U,ie){if(ie&&!(ie instanceof At))throw(0,k.illegalArgument)("color");if(!z.isRange(U)||U.isEmpty)throw(0,k.illegalArgument)("range");this.range=U,this.color=ie}};Tt=Fe([R],Tt),e.ColorInformation=Tt;let bt=class{constructor(U){if(!U||typeof U!="string")throw(0,k.illegalArgument)("label");this.label=U}};bt=Fe([R],bt),e.ColorPresentation=bt;var dt;(function(j){j[j.RGB=0]="RGB",j[j.HEX=1]="HEX",j[j.HSL=2]="HSL"})(dt=e.ColorFormat||(e.ColorFormat={}));var Rt;(function(j){j[j.Error=0]="Error",j[j.Warning=1]="Warning",j[j.Information=2]="Information"})(Rt=e.SourceControlInputBoxValidationType||(e.SourceControlInputBoxValidationType={}));class Lt{constructor(U,ie,be){if(this.startIndex=U,this.length=ie,this.tooltip=be,typeof U!="number"||U<0)throw(0,k.illegalArgument)("startIndex");if(typeof ie!="number"||ie<1)throw(0,k.illegalArgument)("length");if(be!==void 0&&typeof be!="string")throw(0,k.illegalArgument)("tooltip")}}e.TerminalLink=Lt;var Ft;(function(j){j[j.Panel=1]="Panel",j[j.Editor=2]="Editor"})(Ft=e.TerminalLocation||(e.TerminalLocation={}));class Ue{constructor(U){this.options=U,typeof U!="object"&&(0,k.illegalArgument)("options")}}e.TerminalProfile=Ue;var he;(function(j){j[j.Always=1]="Always",j[j.Silent=2]="Silent",j[j.Never=3]="Never"})(he=e.TaskRevealKind||(e.TaskRevealKind={}));var pe;(function(j){j[j.Shared=1]="Shared",j[j.Dedicated=2]="Dedicated",j[j.New=3]="New"})(pe=e.TaskPanelKind||(e.TaskPanelKind={}));let oe=a=class{constructor(U,ie){if(this.label=ie,typeof U!="string"||typeof ie!="string")throw(0,k.illegalArgument)("name");this._id=U}static from(U){switch(U){case"clean":return a.Clean;case"build":return a.Build;case"rebuild":return a.Rebuild;case"test":return a.Test;default:return}}get id(){return this._id}};oe.Clean=new a("clean","Clean"),oe.Build=new a("build","Build"),oe.Rebuild=new a("rebuild","Rebuild"),oe.Test=new a("test","Test"),oe=a=Fe([R],oe),e.TaskGroup=oe;function q(j){let U="";for(let ie=0;ie<j.length;ie++)U+=j[ie].replace(/,/g,",,")+",";return U}let _e=class{constructor(U,ie,be){if(typeof U!="string")throw(0,k.illegalArgument)("process");this._args=[],this._process=U,ie!==void 0&&(Array.isArray(ie)?(this._args=ie,this._options=be):this._options=ie)}get process(){return this._process}set process(U){if(typeof U!="string")throw(0,k.illegalArgument)("process");this._process=U}get args(){return this._args}set args(U){Array.isArray(U)||(U=[]),this._args=U}get options(){return this._options}set options(U){this._options=U}computeId(){const U=[];if(U.push("process"),this._process!==void 0&&U.push(this._process),this._args&&this._args.length>0)for(let ie of this._args)U.push(ie);return q(U)}};_e=Fe([R],_e),e.ProcessExecution=_e;let Ce=class{constructor(U,ie,be){if(this._args=[],Array.isArray(ie)){if(!U)throw(0,k.illegalArgument)("command can't be undefined or null");if(typeof U!="string"&&typeof U.value!="string")throw(0,k.illegalArgument)("command");this._command=U,this._args=ie,this._options=be}else{if(typeof U!="string")throw(0,k.illegalArgument)("commandLine");this._commandLine=U,this._options=ie}}get commandLine(){return this._commandLine}set commandLine(U){if(typeof U!="string")throw(0,k.illegalArgument)("commandLine");this._commandLine=U}get command(){return this._command?this._command:""}set command(U){if(typeof U!="string"&&typeof U.value!="string")throw(0,k.illegalArgument)("command");this._command=U}get args(){return this._args}set args(U){this._args=U||[]}get options(){return this._options}set options(U){this._options=U}computeId(){const U=[];if(U.push("shell"),this._commandLine!==void 0&&U.push(this._commandLine),this._command!==void 0&&U.push(typeof this._command=="string"?this._command:this._command.value),this._args&&this._args.length>0)for(let ie of this._args)U.push(typeof ie=="string"?ie:ie.value);return q(U)}};Ce=Fe([R],Ce),e.ShellExecution=Ce;var $e;(function(j){j[j.Escape=1]="Escape",j[j.Strong=2]="Strong",j[j.Weak=3]="Weak"})($e=e.ShellQuoting||(e.ShellQuoting={}));var Ve;(function(j){j[j.Global=1]="Global",j[j.Workspace=2]="Workspace"})(Ve=e.TaskScope||(e.TaskScope={}));class lt{constructor(U){this._callback=U}computeId(){return"customExecution"+(0,L.generateUuid)()}set callback(U){this._callback=U}get callback(){return this._callback}}e.CustomExecution=lt;let gt=p=class{constructor(U,ie,be,He,Ke,Ye){this.__deprecated=!1,this._definition=this.definition=U;let et;typeof ie=="string"?(this._name=this.name=ie,this._source=this.source=be,this.execution=He,et=Ke,this.__deprecated=!0):ie===Ve.Global||ie===Ve.Workspace?(this.target=ie,this._name=this.name=be,this._source=this.source=He,this.execution=Ke,et=Ye):(this.target=ie,this._name=this.name=be,this._source=this.source=He,this.execution=Ke,et=Ye),typeof et=="string"?(this._problemMatchers=[et],this._hasDefinedMatchers=!0):Array.isArray(et)?(this._problemMatchers=et,this._hasDefinedMatchers=!0):(this._problemMatchers=[],this._hasDefinedMatchers=!1),this._isBackground=!1,this._presentationOptions=Object.create(null),this._runOptions=Object.create(null)}get _id(){return this.__id}set _id(U){this.__id=U}get _deprecated(){return this.__deprecated}clear(){this.__id!==void 0&&(this.__id=void 0,this._scope=void 0,this.computeDefinitionBasedOnExecution())}computeDefinitionBasedOnExecution(){this._execution instanceof _e?this._definition={type:p.ProcessType,id:this._execution.computeId()}:this._execution instanceof Ce?this._definition={type:p.ShellType,id:this._execution.computeId()}:this._execution instanceof lt?this._definition={type:p.ExtensionCallbackType,id:this._execution.computeId()}:this._definition={type:p.EmptyType,id:(0,L.generateUuid)()}}get definition(){return this._definition}set definition(U){if(U==null)throw(0,k.illegalArgument)("Kind can't be undefined or null");this.clear(),this._definition=U}get scope(){return this._scope}set target(U){this.clear(),this._scope=U}get name(){return this._name}set name(U){if(typeof U!="string")throw(0,k.illegalArgument)("name");this.clear(),this._name=U}get execution(){return this._execution}set execution(U){U===null&&(U=void 0),this.clear(),this._execution=U;const ie=this._definition.type;(p.EmptyType===ie||p.ProcessType===ie||p.ShellType===ie||p.ExtensionCallbackType===ie)&&this.computeDefinitionBasedOnExecution()}get problemMatchers(){return this._problemMatchers}set problemMatchers(U){if(Array.isArray(U))this.clear(),this._problemMatchers=U,this._hasDefinedMatchers=!0;else{this.clear(),this._problemMatchers=[],this._hasDefinedMatchers=!1;return}}get hasDefinedMatchers(){return this._hasDefinedMatchers}get isBackground(){return this._isBackground}set isBackground(U){U!==!0&&U!==!1&&(U=!1),this.clear(),this._isBackground=U}get source(){return this._source}set source(U){if(typeof U!="string"||U.length===0)throw(0,k.illegalArgument)("source must be a string of length > 0");this.clear(),this._source=U}get group(){return this._group}set group(U){U===null&&(U=void 0),this.clear(),this._group=U}get detail(){return this._detail}set detail(U){U===null&&(U=void 0),this._detail=U}get presentationOptions(){return this._presentationOptions}set presentationOptions(U){U==null&&(U=Object.create(null)),this.clear(),this._presentationOptions=U}get runOptions(){return this._runOptions}set runOptions(U){U==null&&(U=Object.create(null)),this.clear(),this._runOptions=U}};gt.ExtensionCallbackType="customExecution",gt.ProcessType="process",gt.ShellType="shell",gt.EmptyType="$empty",gt=p=Fe([R],gt),e.Task=gt;var Et;(function(j){j[j.SourceControl=1]="SourceControl",j[j.Window=10]="Window",j[j.Notification=15]="Notification"})(Et=e.ProgressLocation||(e.ProgressLocation={}));let rt=class{constructor(U,ie=at.None){this.collapsibleState=ie,M.URI.isUri(U)?this.resourceUri=U:this.label=U}};rt=Fe([R],rt),e.TreeItem=rt;var at;(function(j){j[j.None=0]="None",j[j.Collapsed=1]="Collapsed",j[j.Expanded=2]="Expanded"})(at=e.TreeItemCollapsibleState||(e.TreeItemCollapsibleState={}));let ot=class{constructor(U){this.value=U}async asString(){return typeof this.value=="string"?this.value:JSON.stringify(this.value)}};ot=Fe([R],ot),e.TreeDataTransferItem=ot;let Mt=class{constructor(){this._items=new Map}get(U){return this._items.get(U)}set(U,ie){this._items.set(U,ie)}forEach(U){this._items.forEach(U)}};Mt=Fe([R],Mt),e.TreeDataTransfer=Mt;let mt=class{constructor(U,ie){this.id=U,this.color=ie}};mt=Fe([R],mt),e.ThemeIcon=mt,mt.File=new mt("file"),mt.Folder=new mt("folder");let Dt=class{constructor(U){this.id=U}};Dt=Fe([R],Dt),e.ThemeColor=Dt;var Ut;(function(j){j[j.Global=1]="Global",j[j.Workspace=2]="Workspace",j[j.WorkspaceFolder=3]="WorkspaceFolder"})(Ut=e.ConfigurationTarget||(e.ConfigurationTarget={}));let wt=class{constructor(U,ie){if(typeof U!="string"&&(!U||!M.URI.isUri(U)&&!M.URI.isUri(U.uri)))throw(0,k.illegalArgument)("base");if(typeof ie!="string")throw(0,k.illegalArgument)("pattern");typeof U=="string"?this.baseUri=M.URI.file(U):M.URI.isUri(U)?this.baseUri=U:this.baseUri=U.uri,this.pattern=ie}get base(){return this._base}set base(U){this._base=U,this._baseUri=M.URI.file(U)}get baseUri(){return this._baseUri}set baseUri(U){this._baseUri=U,this._base=U.fsPath}toJSON(){return{pattern:this.pattern,base:this.base,baseUri:this.baseUri.toJSON()}}};wt=Fe([R],wt),e.RelativePattern=wt;let Bt=class{constructor(U,ie,be,He){this.enabled=typeof U=="boolean"?U:!0,typeof ie=="string"&&(this.condition=ie),typeof be=="string"&&(this.hitCondition=be),typeof He=="string"&&(this.logMessage=He)}get id(){return this._id||(this._id=(0,L.generateUuid)()),this._id}};Bt=Fe([R],Bt),e.Breakpoint=Bt;let Wt=class extends Bt{constructor(U,ie,be,He,Ke){super(ie,be,He,Ke);if(U===null)throw(0,k.illegalArgument)("location");this.location=U}};Wt=Fe([R],Wt),e.SourceBreakpoint=Wt;let pt=class extends Bt{constructor(U,ie,be,He,Ke){super(ie,be,He,Ke);this.functionName=U}};pt=Fe([R],pt),e.FunctionBreakpoint=pt;let ei=class extends Bt{constructor(U,ie,be,He,Ke,Ye,et){super(He,Ke,Ye,et);if(!ie)throw(0,k.illegalArgument)("dataId");this.label=U,this.dataId=ie,this.canPersist=be}};ei=Fe([R],ei),e.DataBreakpoint=ei;let Xt=class{constructor(U,ie,be){this.command=U,this.args=ie||[],this.options=be}};Xt=Fe([R],Xt),e.DebugAdapterExecutable=Xt;let ti=class{constructor(U,ie){this.port=U,this.host=ie}};ti=Fe([R],ti),e.DebugAdapterServer=ti;let ai=class{constructor(U){this.path=U}};ai=Fe([R],ai),e.DebugAdapterNamedPipeServer=ai;let Ct=class{constructor(U){this.implementation=U}};Ct=Fe([R],Ct),e.DebugAdapterInlineImplementation=Ct;let ii=class{constructor(U,ie){this.range=U,this.expression=ie}};ii=Fe([R],ii),e.EvaluatableExpression=ii;var bi;(function(j){j[j.Automatic=0]="Automatic",j[j.Explicit=1]="Explicit"})(bi=e.InlineCompletionTriggerKind||(e.InlineCompletionTriggerKind={}));let qt=class{constructor(U,ie){this.range=U,this.text=ie}};qt=Fe([R],qt),e.InlineValueText=qt;let Kt=class{constructor(U,ie,be=!0){this.range=U,this.variableName=ie,this.caseSensitiveLookup=be}};Kt=Fe([R],Kt),e.InlineValueVariableLookup=Kt;let st=class{constructor(U,ie){this.range=U,this.expression=ie}};st=Fe([R],st),e.InlineValueEvaluatableExpression=st;let li=class{constructor(U,ie){this.frameId=U,this.stoppedLocation=ie}};li=Fe([R],li),e.InlineValueContext=li;var Ht;(function(j){j[j.Changed=1]="Changed",j[j.Created=2]="Created",j[j.Deleted=3]="Deleted"})(Ht=e.FileChangeType||(e.FileChangeType={}));let zt=h=class extends Error{constructor(U,ie=v.FileSystemProviderErrorCode.Unknown,be){super(M.URI.isUri(U)?U.toString(!0):U);this.code=be?.name??"Unknown",(0,v.markAsFileSystemProviderError)(this,ie),typeof Object.setPrototypeOf=="function"&&Object.setPrototypeOf(this,h.prototype),typeof Error.captureStackTrace=="function"&&typeof be=="function"&&Error.captureStackTrace(this,be)}static FileExists(U){return new h(U,v.FileSystemProviderErrorCode.FileExists,h.FileExists)}static FileNotFound(U){return new h(U,v.FileSystemProviderErrorCode.FileNotFound,h.FileNotFound)}static FileNotADirectory(U){return new h(U,v.FileSystemProviderErrorCode.FileNotADirectory,h.FileNotADirectory)}static FileIsADirectory(U){return new h(U,v.FileSystemProviderErrorCode.FileIsADirectory,h.FileIsADirectory)}static NoPermissions(U){return new h(U,v.FileSystemProviderErrorCode.NoPermissions,h.NoPermissions)}static Unavailable(U){return new h(U,v.FileSystemProviderErrorCode.Unavailable,h.Unavailable)}};zt=h=Fe([R],zt),e.FileSystemError=zt;let ni=class{constructor(U,ie,be){this.start=U,this.end=ie,this.kind=be}};ni=Fe([R],ni),e.FoldingRange=ni;var _i;(function(j){j[j.Comment=1]="Comment",j[j.Imports=2]="Imports",j[j.Region=3]="Region"})(_i=e.FoldingRangeKind||(e.FoldingRangeKind={}));var fi;(function(j){j[j.Collapsed=0]="Collapsed",j[j.Expanded=1]="Expanded"})(fi=e.CommentThreadCollapsibleState||(e.CommentThreadCollapsibleState={}));var Si;(function(j){j[j.Editing=0]="Editing",j[j.Preview=1]="Preview"})(Si=e.CommentMode||(e.CommentMode={}));var mi;(function(j){j[j.Unresolved=0]="Unresolved",j[j.Resolved=1]="Resolved"})(mi=e.CommentThreadState||(e.CommentThreadState={}));class ri{constructor(U,ie=[]){this.tokenTypes=U,this.tokenModifiers=ie}}e.SemanticTokensLegend=ri;function yi(j){return typeof j=="undefined"||(0,y.isStringArray)(j)}class Qt{constructor(U){if(this._prevLine=0,this._prevChar=0,this._dataIsSortedAndDeltaEncoded=!0,this._data=[],this._dataLen=0,this._tokenTypeStrToInt=new Map,this._tokenModifierStrToInt=new Map,this._hasLegend=!1,U){this._hasLegend=!0;for(let ie=0,be=U.tokenTypes.length;ie<be;ie++)this._tokenTypeStrToInt.set(U.tokenTypes[ie],ie);for(let ie=0,be=U.tokenModifiers.length;ie<be;ie++)this._tokenModifierStrToInt.set(U.tokenModifiers[ie],ie)}}push(U,ie,be,He,Ke){if(typeof U=="number"&&typeof ie=="number"&&typeof be=="number"&&typeof He=="number"&&(typeof Ke=="number"||typeof Ke=="undefined"))return typeof Ke=="undefined"&&(Ke=0),this._pushEncoded(U,ie,be,He,Ke);if(z.isRange(U)&&typeof ie=="string"&&yi(be))return this._push(U,ie,be);throw(0,k.illegalArgument)()}_push(U,ie,be){if(!this._hasLegend)throw new Error("Legend must be provided in constructor");if(U.start.line!==U.end.line)throw new Error("`range` cannot span multiple lines");if(!this._tokenTypeStrToInt.has(ie))throw new Error("`tokenType` is not in the provided legend");const He=U.start.line,Ke=U.start.character,Ye=U.end.character-U.start.character,et=this._tokenTypeStrToInt.get(ie);let _t=0;if(be)for(const Pt of be){if(!this._tokenModifierStrToInt.has(Pt))throw new Error("`tokenModifier` is not in the provided legend");const xt=this._tokenModifierStrToInt.get(Pt);_t|=1<<xt>>>0}this._pushEncoded(He,Ke,Ye,et,_t)}_pushEncoded(U,ie,be,He,Ke){if(this._dataIsSortedAndDeltaEncoded&&(U<this._prevLine||U===this._prevLine&&ie<this._prevChar)){this._dataIsSortedAndDeltaEncoded=!1;const _t=this._data.length/5|0;let Pt=0,xt=0;for(let $t=0;$t<_t;$t++){let Vt=this._data[5*$t],di=this._data[5*$t+1];Vt===0?(Vt=Pt,di+=xt):Vt+=Pt,this._data[5*$t]=Vt,this._data[5*$t+1]=di,Pt=Vt,xt=di}}let Ye=U,et=ie;this._dataIsSortedAndDeltaEncoded&&this._dataLen>0&&(Ye-=this._prevLine,Ye===0&&(et-=this._prevChar)),this._data[this._dataLen++]=Ye,this._data[this._dataLen++]=et,this._data[this._dataLen++]=be,this._data[this._dataLen++]=He,this._data[this._dataLen++]=Ke,this._prevLine=U,this._prevChar=ie}static _sortAndDeltaEncode(U){let ie=[];const be=U.length/5|0;for(let et=0;et<be;et++)ie[et]=et;ie.sort((et,_t)=>{const Pt=U[5*et],xt=U[5*_t];if(Pt===xt){const $t=U[5*et+1],Vt=U[5*_t+1];return $t-Vt}return Pt-xt});const He=new Uint32Array(U.length);let Ke=0,Ye=0;for(let et=0;et<be;et++){const _t=5*ie[et],Pt=U[_t+0],xt=U[_t+1],$t=U[_t+2],Vt=U[_t+3],di=U[_t+4],zi=Pt-Ke,Ji=zi===0?xt-Ye:xt,hi=5*et;He[hi+0]=zi,He[hi+1]=Ji,He[hi+2]=$t,He[hi+3]=Vt,He[hi+4]=di,Ke=Pt,Ye=xt}return He}build(U){return this._dataIsSortedAndDeltaEncoded?new Yt(new Uint32Array(this._data),U):new Yt(Qt._sortAndDeltaEncode(this._data),U)}}e.SemanticTokensBuilder=Qt;class Yt{constructor(U,ie){this.resultId=ie,this.data=U}}e.SemanticTokens=Yt;class Di{constructor(U,ie,be){this.start=U,this.deleteCount=ie,this.data=be}}e.SemanticTokensEdit=Di;class Ci{constructor(U,ie){this.resultId=ie,this.edits=U}}e.SemanticTokensEdits=Ci;var Jt;(function(j){j[j.Separate=0]="Separate",j[j.MergeWithParent=1]="MergeWithParent"})(Jt=e.DebugConsoleMode||(e.DebugConsoleMode={}));let si=class{constructor(){}};si.Back={iconPath:new mt("arrow-left")},si=Fe([R],si),e.QuickInputButtons=si;var Ii;(function(j){j[j.Separator=-1]="Separator",j[j.Default=0]="Default"})(Ii=e.QuickPickItemKind||(e.QuickPickItemKind={}));var ki;(function(j){j[j.UI=1]="UI",j[j.Workspace=2]="Workspace"})(ki=e.ExtensionKind||(e.ExtensionKind={}));class Ti{constructor(U,ie,be){this.badge=U,this.tooltip=ie,this.color=be}static validate(U){if(U.badge){let ie=(0,A.nextCharLength)(U.badge,0);if(ie<U.badge.length&&(ie+=(0,A.nextCharLength)(U.badge,ie)),U.badge.length>ie)throw new Error("The 'badge'-property must be undefined or a short character")}if(!U.color&&!U.badge&&!U.tooltip)throw new Error("The decoration is empty");return!0}}e.FileDecoration=Ti;let Zt=class{constructor(U){this.kind=U}};Zt=Fe([R],Zt),e.ColorTheme=Zt;var gi;(function(j){j[j.Light=1]="Light",j[j.Dark=2]="Dark",j[j.HighContrast=3]="HighContrast"})(gi=e.ColorThemeKind||(e.ColorThemeKind={}));class Gt{constructor(U,ie){if(U<0)throw(0,k.illegalArgument)("start must be positive");if(ie<0)throw(0,k.illegalArgument)("end must be positive");U<=ie?(this._start=U,this._end=ie):(this._start=ie,this._end=U)}static isNotebookRange(U){return U instanceof Gt?!0:U?typeof U.start=="number"&&typeof U.end=="number":!1}get start(){return this._start}get end(){return this._end}get isEmpty(){return this._start===this._end}with(U){let ie=this._start,be=this._end;return U.start!==void 0&&(ie=U.start),U.end!==void 0&&(be=U.end),ie===this._start&&be===this._end?this:new Gt(ie,be)}}e.NotebookRange=Gt;class Pe{constructor(U,ie,be,He,Ke,Ye,et){this.kind=U,this.value=ie,this.languageId=be,this.mime=He,this.outputs=Ke??[],this.metadata=Ye,this.executionSummary=et,Pe.validate(this)}static validate(U){if(typeof U.kind!="number")throw new Error("NotebookCellData MUST have 'kind' property");if(typeof U.value!="string")throw new Error("NotebookCellData MUST have 'value' property");if(typeof U.languageId!="string")throw new Error("NotebookCellData MUST have 'languageId' property")}static isNotebookCellDataArray(U){return Array.isArray(U)&&U.every(ie=>Pe.isNotebookCellData(ie))}static isNotebookCellData(U){return!0}}e.NotebookCellData=Pe;class ci{constructor(U){this.cells=U}}e.NotebookData=ci;class Ot{constructor(U,ie){this.data=U,this.mime=ie;const be=(0,S.normalizeMimeType)(ie,!0);if(!be)throw new Error(`INVALID mime type: ${ie}. Must be in the format "type/subtype[;optionalparameter]"`);this.mime=be}static isNotebookCellOutputItem(U){return U instanceof Ot?!0:U?typeof U.mime=="string"&&U.data instanceof Uint8Array:!1}static error(U){const ie={name:U.name,message:U.message,stack:U.stack};return Ot.json(ie,"application/vnd.code.notebook.error")}static stdout(U){return Ot.text(U,"application/vnd.code.notebook.stdout")}static stderr(U){return Ot.text(U,"application/vnd.code.notebook.stderr")}static bytes(U,ie="application/octet-stream"){return new Ot(U,ie)}static text(U,ie=S.Mimes.text){const be=De(Ot,n,"f",f).encode(String(U));return new Ot(be,ie)}static json(U,ie="application/json"){const be=JSON.stringify(U,void 0," ");return Ot.text(be,ie)}}e.NotebookCellOutputItem=Ot,n=Ot,f={value:new TextEncoder};class ct{constructor(U,ie,be){this.items=ct.ensureUniqueMimeTypes(U,!0),typeof ie=="string"?(this.id=ie,this.metadata=be):(this.id=(0,L.generateUuid)(),this.metadata=ie??be)}static isNotebookCellOutput(U){return U instanceof ct?!0:!U||typeof U!="object"?!1:typeof U.id=="string"&&(0,y.isArray)(U.items)}static ensureUniqueMimeTypes(U,ie=!1){const be=new Set,He=new Set;for(let Ke=0;Ke<U.length;Ke++){const Ye=U[Ke],et=(0,S.normalizeMimeType)(Ye.mime);if(!be.has(et)){be.add(et);continue}He.add(Ke),ie&&console.warn(`DUPLICATED mime type '${Ye.mime}' will be dropped`)}return He.size===0?U:U.filter((Ke,Ye)=>!He.has(Ye))}}e.NotebookCellOutput=ct;var Pi;(function(j){j[j.Markup=1]="Markup",j[j.Code=2]="Code"})(Pi=e.NotebookCellKind||(e.NotebookCellKind={}));var Ai;(function(j){j[j.Idle=1]="Idle",j[j.Pending=2]="Pending",j[j.Executing=3]="Executing"})(Ai=e.NotebookCellExecutionState||(e.NotebookCellExecutionState={}));var pi;(function(j){j[j.Left=1]="Left",j[j.Right=2]="Right"})(pi=e.NotebookCellStatusBarAlignment||(e.NotebookCellStatusBarAlignment={}));var vi;(function(j){j[j.Default=0]="Default",j[j.InCenter=1]="InCenter",j[j.InCenterIfOutsideViewport=2]="InCenterIfOutsideViewport",j[j.AtTop=3]="AtTop"})(vi=e.NotebookEditorRevealType||(e.NotebookEditorRevealType={}));class Ri{constructor(U,ie){this.text=U,this.alignment=ie}}e.NotebookCellStatusBarItem=Ri;var Oi;(function(j){j[j.Default=1]="Default",j[j.Preferred=2]="Preferred"})(Oi=e.NotebookControllerAffinity||(e.NotebookControllerAffinity={}));class Fi{constructor(U,ie=[]){this.uri=U,this.provides=(0,o.asArray)(ie)}}e.NotebookRendererScript=Fi;let ui=class{constructor(U,ie){this.label=U,this.timestamp=ie}};ui=Fe([R],ui),e.TimelineItem=ui;var Ei;(function(j){j[j.Production=1]="Production",j[j.Development=2]="Development",j[j.Test=3]="Test"})(Ei=e.ExtensionMode||(e.ExtensionMode={}));var Mi;(function(j){j[j.Node=1]="Node",j[j.Webworker=2]="Webworker"})(Mi=e.ExtensionRuntime||(e.ExtensionRuntime={}));var Ni;(function(j){j[j.Other=0]="Other",j[j.Comment=1]="Comment",j[j.String=2]="String",j[j.RegEx=3]="RegEx"})(Ni=e.StandardTokenType||(e.StandardTokenType={}));class Li{constructor(U,ie){this.ranges=U,this.wordPattern=ie}}e.LinkedEditingRanges=Li;class Ui{constructor(U,ie){this._port=U,this._autoForwardAction=ie}get port(){return this._port}get autoForwardAction(){return this._autoForwardAction}}e.PortAttributes=Ui;var Bi;(function(j){j[j.Queued=1]="Queued",j[j.Running=2]="Running",j[j.Passed=3]="Passed",j[j.Failed=4]="Failed",j[j.Skipped=5]="Skipped",j[j.Errored=6]="Errored"})(Bi=e.TestResultState||(e.TestResultState={}));var Z;(function(j){j[j.Run=1]="Run",j[j.Debug=2]="Debug",j[j.Coverage=3]="Coverage"})(Z=e.TestRunProfileKind||(e.TestRunProfileKind={}));let se=class{constructor(U=void 0,ie=void 0,be=void 0){this.include=U,this.exclude=ie,this.profile=be}};se=Fe([R],se),e.TestRunRequest=se;let ye=_=class{constructor(U){this.message=U}static diff(U,ie,be){const He=new _(U);return He.expectedOutput=ie,He.actualOutput=be,He}};ye=_=Fe([R],ye),e.TestMessage=ye;let Ze=class{constructor(U){this.id=U}};Ze=Fe([R],Ze),e.TestTag=Ze;let ht=class{constructor(U,ie){this.covered=U,this.total=ie}};ht=Fe([R],ht),e.CoveredCount=ht;let yt=P=class{constructor(U,ie,be,He){this.uri=U,this.statementCoverage=ie,this.branchCoverage=be,this.functionCoverage=He}static fromDetails(U,ie){const be=new ht(0,0),He=new ht(0,0),Ke=new ht(0,0);for(const et of ie)if("branches"in et){be.total+=1,be.covered+=et.executionCount>0?1:0;for(const _t of et.branches)He.total+=1,He.covered+=_t.executionCount>0?1:0}else Ke.total+=1,Ke.covered+=et.executionCount>0?1:0;const Ye=new P(U,be,He.total>0?He:void 0,Ke.total>0?Ke:void 0);return Ye.detailedCoverage=ie,Ye}};yt=P=Fe([R],yt),e.FileCoverage=yt;let xi=class{constructor(U,ie,be=[]){this.executionCount=U,this.location=ie,this.branches=be}};xi=Fe([R],xi),e.StatementCoverage=xi;let $i=class{constructor(U,ie){this.executionCount=U,this.location=ie}};$i=Fe([R],$i),e.BranchCoverage=$i;let Wi=class{constructor(U,ie){this.executionCount=U,this.location=ie}};Wi=Fe([R],Wi),e.FunctionCoverage=Wi;var Gi;(function(j){j[j.None=0]="None",j[j.Option=1]="Option",j[j.Default=2]="Default",j[j.Preferred=3]="Preferred"})(Gi=e.ExternalUriOpenerPriority||(e.ExternalUriOpenerPriority={}));var Xi;(function(j){j[j.Untrusted=0]="Untrusted",j[j.Trusted=1]="Trusted",j[j.Unspecified=2]="Unspecified"})(Xi=e.WorkspaceTrustState||(e.WorkspaceTrustState={}));var Qi;(function(j){j[j.Notify=1]="Notify",j[j.OpenBrowser=2]="OpenBrowser",j[j.OpenPreview=3]="OpenPreview",j[j.Silent=4]="Silent",j[j.Ignore=5]="Ignore",j[j.OpenBrowserOnce=6]="OpenBrowserOnce"})(Qi=e.PortAutoForwardAction||(e.PortAutoForwardAction={}));class Yi{constructor(U,ie,be,He,Ke,Ye){this.kind=U,this.name=ie,this.detail=be,this.uri=He,this.range=Ke,this.selectionRange=Ye}}e.TypeHierarchyItem=Yi}),define(Ee[84],we([1,0,42,9,10,226,116,7,16]),function(J,e,o,k,w,B,S,A,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtHostDocumentLine=e.ExtHostDocumentData=e.getWordDefinitionFor=e.setWordDefinitionFor=void 0;const M=new Map;function L(s,n){n?M.set(s,n):M.delete(s)}e.setWordDefinitionFor=L;function v(s){return M.get(s)}e.getWordDefinitionFor=v;class u extends B.MirrorTextModel{constructor(n,f,D,T,d,g,b,l){super(f,D,T,d);this._proxy=n,this._languageId=g,this._isDirty=b,this._notebook=l,this._isDisposed=!1}dispose(){(0,o.ok)(!this._isDisposed),this._isDisposed=!0,this._isDirty=!1}equalLines(n){return(0,y.equals)(this._lines,n)}get document(){if(!this._document){const n=this;this._document={get uri(){return n._uri},get fileName(){return n._uri.fsPath},get isUntitled(){return n._uri.scheme===k.Schemas.untitled},get languageId(){return n._languageId},get version(){return n._versionId},get isClosed(){return n._isDisposed},get isDirty(){return n._isDirty},get notebook(){return n._notebook},save(){return n._save()},getText(f){return f?n._getTextInRange(f):n.getText()},get eol(){return n._eol===`
`?A.EndOfLine.LF:A.EndOfLine.CRLF},get lineCount(){return n._lines.length},lineAt(f){return n._lineAt(f)},offsetAt(f){return n._offsetAt(f)},positionAt(f){return n._positionAt(f)},validateRange(f){return n._validateRange(f)},validatePosition(f){return n._validatePosition(f)},getWordRangeAtPosition(f,D){return n._getWordRangeAtPosition(f,D)}}}return Object.freeze(this._document)}_acceptLanguageId(n){(0,o.ok)(!this._isDisposed),this._languageId=n}_acceptIsDirty(n){(0,o.ok)(!this._isDisposed),this._isDirty=n}_save(){return this._isDisposed?Promise.reject(new Error("Document has been closed")):this._proxy.$trySaveDocument(this._uri)}_getTextInRange(n){const f=this._validateRange(n);if(f.isEmpty)return"";if(f.isSingleLine)return this._lines[f.start.line].substring(f.start.character,f.end.character);const D=this._eol,T=f.start.line,d=f.end.line,g=[];g.push(this._lines[T].substring(f.start.character));for(let b=T+1;b<d;b++)g.push(this._lines[b]);return g.push(this._lines[d].substring(0,f.end.character)),g.join(D)}_lineAt(n){let f;if(n instanceof A.Position?f=n.line:typeof n=="number"&&(f=n),typeof f!="number"||f<0||f>=this._lines.length||Math.floor(f)!==f)throw new Error("Illegal value for `line`");return new m(f,this._lines[f],f===this._lines.length-1)}_offsetAt(n){return n=this._validatePosition(n),this._ensureLineStarts(),this._lineStarts.getPrefixSum(n.line-1)+n.character}_positionAt(n){n=Math.floor(n),n=Math.max(0,n),this._ensureLineStarts();const f=this._lineStarts.getIndexOf(n),D=this._lines[f.index].length;return new A.Position(f.index,Math.min(f.remainder,D))}_validateRange(n){if(!(n instanceof A.Range))throw new Error("Invalid argument");const f=this._validatePosition(n.start),D=this._validatePosition(n.end);return f===n.start&&D===n.end?n:new A.Range(f.line,f.character,D.line,D.character)}_validatePosition(n){if(!(n instanceof A.Position))throw new Error("Invalid argument");if(this._lines.length===0)return n.with(0,0);let{line:f,character:D}=n,T=!1;if(f<0)f=0,D=0,T=!0;else if(f>=this._lines.length)f=this._lines.length-1,D=this._lines[f].length,T=!0;else{const d=this._lines[f].length;D<0?(D=0,T=!0):D>d&&(D=d,T=!0)}return T?new A.Position(f,D):n}_getWordRangeAtPosition(n,f){const D=this._validatePosition(n);if(!f)f=v(this._languageId);else if((0,w.regExpLeadsToEndlessLoop)(f))throw new Error(`[getWordRangeAtPosition]: ignoring custom regexp '${f.source}' because it matches the empty string.`);const T=(0,S.getWordAtText)(D.character+1,(0,S.ensureValidWordDefinition)(f),this._lines[D.line],0);if(T)return new A.Range(D.line,T.startColumn-1,D.line,T.endColumn-1)}}e.ExtHostDocumentData=u;class m{constructor(n,f,D){this._line=n,this._text=f,this._isLastLine=D}get lineNumber(){return this._line}get text(){return this._text}get range(){return new A.Range(this._line,0,this._line,this._text.length)}get rangeIncludingLineBreak(){return this._isLastLine?this.range:new A.Range(this._line,0,this._line+1,0)}get firstNonWhitespaceCharacterIndex(){return/^(\s*)/.exec(this._text)[1].length}get isEmptyOrWhitespace(){return this.firstNonWhitespaceCharacterIndex===this._text.length}}e.ExtHostDocumentLine=m}),define(Ee[152],we([1,0,7,5,227,6,74,22,2,36]),function(J,e,o,k,w,B,S,A,y,M){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtHostNotebookConcatDocument=void 0;class L{constructor(u,m,s,n){this._notebook=s,this._selector=n,this._disposables=new B.DisposableStore,this._isClosed=!1,this._versionId=0,this._onDidChange=new k.Emitter,this.onDidChange=this._onDidChange.event,this.uri=y.URI.from({scheme:"vscode-concat-doc",path:(0,M.generateUuid)()}),this._init(),this._disposables.add(m.onDidChangeDocument(D=>{const T=this._cellUris.get(D.document.uri);T!==void 0&&(this._cellLengths.setValue(T,this._cells[T].document.getText().length+1),this._cellLines.setValue(T,this._cells[T].document.lineCount),this._versionId+=1,this._onDidChange.fire(void 0))}));const f=D=>{D===this._notebook&&(this._init(),this._versionId+=1,this._onDidChange.fire(void 0))};this._disposables.add(u.onDidChangeNotebookCells(D=>f(D.document)))}dispose(){this._disposables.dispose(),this._isClosed=!0}get isClosed(){return this._isClosed}_init(){this._cells=[],this._cellUris=new A.ResourceMap;const u=[],m=[];for(const s of this._notebook.getCells())s.kind===o.NotebookCellKind.Code&&(!this._selector||(0,S.score)(this._selector,s.document.uri,s.document.languageId,!0,void 0))&&(this._cellUris.set(s.document.uri,this._cells.length),this._cells.push(s),u.push(s.document.getText().length+1),m.push(s.document.lineCount));this._cellLengths=new w.PrefixSumComputer(new Uint32Array(u)),this._cellLines=new w.PrefixSumComputer(new Uint32Array(m))}get version(){return this._versionId}getText(u){if(!u){let T="";for(const d of this._cells)T+=d.document.getText()+`
`;return T=T.slice(0,-1),T}if(u.isEmpty)return"";const m=this.locationAt(u.start),s=this.locationAt(u.end),n=this._cellUris.get(m.uri),f=this._cellUris.get(s.uri);if(n===void 0||f===void 0)return"";if(n===f)return this._cells[n].document.getText(new o.Range(m.range.start,s.range.end));const D=[this._cells[n].document.getText(new o.Range(m.range.start,new o.Position(this._cells[n].document.lineCount,0)))];for(let T=n+1;T<f;T++)D.push(this._cells[T].document.getText());return D.push(this._cells[f].document.getText(new o.Range(new o.Position(0,0),s.range.end))),D.join(`
`)}offsetAt(u){const m=this._cellLines.getIndexOf(u.line),s=this._cellLengths.getPrefixSum(m.index-1),n=this._cells[m.index].document.offsetAt(u.with(m.remainder));return s+n}positionAt(u){if(typeof u=="number"){const s=this._cellLengths.getIndexOf(u),n=this._cellLines.getPrefixSum(s.index-1);return this._cells[s.index].document.positionAt(s.remainder).translate(n)}const m=this._cellUris.get(u.uri);if(m!==void 0){const s=this._cellLines.getPrefixSum(m-1);return new o.Position(s+u.range.start.line,u.range.start.character)}return new o.Position(0,0)}locationAt(u){o.Range.isRange(u)||(u=new o.Range(u,u));const m=this._cellLines.getIndexOf(u.start.line);let s=m;u.isEmpty||(s=this._cellLines.getIndexOf(u.end.line));const n=new o.Position(m.remainder,u.start.character),f=new o.Position(s.remainder,u.end.character),D=new o.Range(n,f),T=this._cells[m.index];return new o.Location(T.document.uri,T.document.validateRange(D))}contains(u){return this._cellUris.has(u)}validateRange(u){const m=this.validatePosition(u.start),s=this.validatePosition(u.end);return u.with(m,s)}validatePosition(u){const m=this._cellLines.getIndexOf(u.line),s=new o.Position(m.remainder,u.character),n=this._cells[m.index].document.validatePosition(s),f=this._cellLines.getPrefixSum(m.index-1);return new o.Position(f+n.line,n.character)}}e.ExtHostNotebookConcatDocument=L}),define(Ee[153],we([1,0,7,14,5]),function(J,e,o,k,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtHostTheming=void 0;let B=class{constructor(A){this._actual=new o.ColorTheme(o.ColorThemeKind.Dark),this._onDidChangeActiveColorTheme=new w.Emitter}get activeColorTheme(){return this._actual}$onColorThemeChange(A){let y=A==="light"?o.ColorThemeKind.Light:A==="dark"?o.ColorThemeKind.Dark:o.ColorThemeKind.HighContrast;this._actual=new o.ColorTheme(y),this._onDidChangeActiveColorTheme.fire(this._actual)}get onDidChangeActiveColorTheme(){return this._onDidChangeActiveColorTheme.event}};B=Fe([Ne(0,k.IExtHostRpcService)],B),e.ExtHostTheming=B}),define(Ee[60],we([1,0,3]),function(J,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.URITransformerService=e.IURITransformerService=void 0,e.IURITransformerService=(0,o.createDecorator)("IURITransformerService");class k{constructor(B){B?(this.transformIncoming=B.transformIncoming.bind(B),this.transformOutgoing=B.transformOutgoing.bind(B),this.transformOutgoingURI=B.transformOutgoingURI.bind(B),this.transformOutgoingScheme=B.transformOutgoingScheme.bind(B)):(this.transformIncoming=S=>S,this.transformOutgoing=S=>S,this.transformOutgoingURI=S=>S,this.transformOutgoingScheme=S=>S)}}e.URITransformerService=k}),define(Ee[154],we([1,0,21]),function(J,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.deserializeWebviewMessage=e.serializeWebviewMessage=void 0;class k{constructor(){this.buffers=[]}add(y){let M=this.buffers.indexOf(y);return M<0&&(M=this.buffers.length,this.buffers.push(y)),M}}function w(A,y){if(y.serializeBuffersForPostMessage){const M=new k,L=(m,s)=>{if(s instanceof ArrayBuffer){const n=M.add(s);return{$$vscode_array_buffer_reference$$:!0,index:n}}else if(ArrayBuffer.isView(s)){const n=B(s);if(n){const f=M.add(s.buffer);return{$$vscode_array_buffer_reference$$:!0,index:f,view:{type:n,byteLength:s.byteLength,byteOffset:s.byteOffset}}}}return s},v=JSON.stringify(A,L),u=M.buffers.map(m=>{const s=new Uint8Array(m);return o.VSBuffer.wrap(s)});return{message:v,buffers:u}}else return{message:JSON.stringify(A),buffers:[]}}e.serializeWebviewMessage=w;function B(A){switch(A.constructor.name){case"Int8Array":return 1;case"Uint8Array":return 2;case"Uint8ClampedArray":return 3;case"Int16Array":return 4;case"Uint16Array":return 5;case"Int32Array":return 6;case"Uint32Array":return 7;case"Float32Array":return 8;case"Float64Array":return 9;case"BigInt64Array":return 10;case"BigUint64Array":return 11}}function S(A,y){const M=y.map(u=>{const m=new ArrayBuffer(u.byteLength);return new Uint8Array(m).set(u.buffer),m}),L=y.length?(u,m)=>{if(m&&typeof m=="object"&&m.$$vscode_array_buffer_reference$$){const s=m,{index:n}=s,f=M[n];if(s.view)switch(s.view.type){case 1:return new Int8Array(f,s.view.byteOffset,s.view.byteLength/Int8Array.BYTES_PER_ELEMENT);case 2:return new Uint8Array(f,s.view.byteOffset,s.view.byteLength/Uint8Array.BYTES_PER_ELEMENT);case 3:return new Uint8ClampedArray(f,s.view.byteOffset,s.view.byteLength/Uint8ClampedArray.BYTES_PER_ELEMENT);case 4:return new Int16Array(f,s.view.byteOffset,s.view.byteLength/Int16Array.BYTES_PER_ELEMENT);case 5:return new Uint16Array(f,s.view.byteOffset,s.view.byteLength/Uint16Array.BYTES_PER_ELEMENT);case 6:return new Int32Array(f,s.view.byteOffset,s.view.byteLength/Int32Array.BYTES_PER_ELEMENT);case 7:return new Uint32Array(f,s.view.byteOffset,s.view.byteLength/Uint32Array.BYTES_PER_ELEMENT);case 8:return new Float32Array(f,s.view.byteOffset,s.view.byteLength/Float32Array.BYTES_PER_ELEMENT);case 9:return new Float64Array(f,s.view.byteOffset,s.view.byteLength/Float64Array.BYTES_PER_ELEMENT);case 10:return new BigInt64Array(f,s.view.byteOffset,s.view.byteLength/BigInt64Array.BYTES_PER_ELEMENT);case 11:return new BigUint64Array(f,s.view.byteOffset,s.view.byteLength/BigUint64Array.BYTES_PER_ELEMENT);default:throw new Error("Unknown array buffer view type")}return f}return m}:void 0;return{message:JSON.parse(A,L),arrayBuffers:M}}e.deserializeWebviewMessage=S}),define(Ee[155],we([1,0]),function(J,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TreeDataTransferConverter=void 0;var o;(function(k){function w(S){const A=new Map;return S.types.forEach((y,M)=>{A.set(y,{asString:async()=>S.items[M].asString,value:void 0})}),A}k.toITreeDataTransfer=w;async function B(S){const A={types:[],items:[]},y=Array.from(S.entries());for(const M of y)A.types.push(M[0]),A.items.push({asString:await M[1].asString()});return A}k.toTreeDataTransferDTO=B})(o=e.TreeDataTransferConverter||(e.TreeDataTransferConverter={}))}),define(Ee[156],we([1,0,129,11,2,6,3,37,45,16,9]),function(J,e,o,k,w,B,S,A,y,M,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorsOrder=e.pathsToEditors=e.CloseDirection=e.EditorResourceAccessor=e.SideBySideEditor=e.GroupModelChangeKind=e.EditorCloseContext=e.isEditorIdentifier=e.isEditorInputWithOptionsAndGroup=e.isEditorInputWithOptions=e.isDiffEditorInput=e.isSideBySideEditorInput=e.isEditorInput=e.AbstractEditorInput=e.EditorInputCapabilities=e.SaveReason=e.Verbosity=e.isUntitledResourceEditorInput=e.isResourceSideBySideEditorInput=e.isResourceDiffEditorInput=e.isResourceEditorInput=e.findViewStateForEditor=e.isEditorPaneWithSelection=e.EditorPaneSelectionCompareResult=e.EditorPaneSelectionChangeReason=e.BINARY_DIFF_EDITOR_ID=e.TEXT_DIFF_EDITOR_ID=e.SIDE_BY_SIDE_EDITOR_ID=e.DEFAULT_EDITOR_ASSOCIATION=e.EditorExtensions=void 0,e.EditorExtensions={EditorPane:"workbench.contributions.editors",EditorFactory:"workbench.contributions.editor.inputFactories"},e.DEFAULT_EDITOR_ASSOCIATION={id:"default",displayName:(0,o.localize)(0,null),providerDisplayName:(0,o.localize)(1,null)},e.SIDE_BY_SIDE_EDITOR_ID="workbench.editor.sidebysideEditor",e.TEXT_DIFF_EDITOR_ID="workbench.editors.textDiffEditor",e.BINARY_DIFF_EDITOR_ID="workbench.editors.binaryResourceDiffEditor";var v;(function(W){W[W.PROGRAMMATIC=1]="PROGRAMMATIC",W[W.USER=2]="USER",W[W.EDIT=3]="EDIT",W[W.NAVIGATION=4]="NAVIGATION",W[W.JUMP=5]="JUMP"})(v=e.EditorPaneSelectionChangeReason||(e.EditorPaneSelectionChangeReason={}));var u;(function(W){W[W.IDENTICAL=1]="IDENTICAL",W[W.SIMILAR=2]="SIMILAR",W[W.DIFFERENT=3]="DIFFERENT"})(u=e.EditorPaneSelectionCompareResult||(e.EditorPaneSelectionCompareResult={}));function m(W){const Q=W;return!!Q&&typeof Q.getSelection=="function"&&!!Q.onDidChangeSelection}e.isEditorPaneWithSelection=m;function s(W,Q,K){for(const H of K.visibleEditorPanes)if(H.group.id===Q&&W.matches(H.input))return H.getViewState()}e.findViewStateForEditor=s;function n(W){if(I(W))return!1;const Q=W;return w.URI.isUri(Q?.resource)}e.isResourceEditorInput=n;function f(W){if(I(W))return!1;const Q=W;return Q?.original!==void 0&&Q.modified!==void 0}e.isResourceDiffEditorInput=f;function D(W){if(I(W)||f(W))return!1;const Q=W;return Q?.primary!==void 0&&Q.secondary!==void 0}e.isResourceSideBySideEditorInput=D;function T(W){if(I(W))return!1;const Q=W;return Q?Q.resource===void 0||Q.resource.scheme===L.Schemas.untitled||Q.forceUntitled===!0:!1}e.isUntitledResourceEditorInput=T;var d;(function(W){W[W.SHORT=0]="SHORT",W[W.MEDIUM=1]="MEDIUM",W[W.LONG=2]="LONG"})(d=e.Verbosity||(e.Verbosity={}));var g;(function(W){W[W.EXPLICIT=1]="EXPLICIT",W[W.AUTO=2]="AUTO",W[W.FOCUS_CHANGE=3]="FOCUS_CHANGE",W[W.WINDOW_CHANGE=4]="WINDOW_CHANGE"})(g=e.SaveReason||(e.SaveReason={}));var b;(function(W){W[W.None=0]="None",W[W.Readonly=2]="Readonly",W[W.Untitled=4]="Untitled",W[W.Singleton=8]="Singleton",W[W.RequiresTrust=16]="RequiresTrust",W[W.CanSplitInGroup=32]="CanSplitInGroup",W[W.ForceDescription=64]="ForceDescription"})(b=e.EditorInputCapabilities||(e.EditorInputCapabilities={}));class l extends B.Disposable{}e.AbstractEditorInput=l;function I(W){return W instanceof l}e.isEditorInput=I;function r(W){const Q=W;return w.URI.isUri(Q?.preferredResource)}function i(W){const Q=W;return I(Q?.primary)&&I(Q?.secondary)}e.isSideBySideEditorInput=i;function c(W){const Q=W;return I(Q?.modified)&&I(Q?.original)}e.isDiffEditorInput=c;function t(W){return I(W?.editor)}e.isEditorInputWithOptions=t;function a(W){const Q=W;return t(W)&&Q?.group!==void 0}e.isEditorInputWithOptionsAndGroup=a;function p(W){const Q=W;return typeof Q?.groupId=="number"&&I(Q.editor)}e.isEditorIdentifier=p;var h;(function(W){W[W.UNKNOWN=0]="UNKNOWN",W[W.REPLACE=1]="REPLACE",W[W.MOVE=2]="MOVE",W[W.UNPIN=3]="UNPIN"})(h=e.EditorCloseContext||(e.EditorCloseContext={}));var _;(function(W){W[W.GROUP_ACTIVE=0]="GROUP_ACTIVE",W[W.GROUP_INDEX=1]="GROUP_INDEX",W[W.GROUP_LOCKED=2]="GROUP_LOCKED",W[W.EDITOR_OPEN=3]="EDITOR_OPEN",W[W.EDITOR_CLOSE=4]="EDITOR_CLOSE",W[W.EDITOR_MOVE=5]="EDITOR_MOVE",W[W.EDITOR_ACTIVE=6]="EDITOR_ACTIVE",W[W.EDITOR_LABEL=7]="EDITOR_LABEL",W[W.EDITOR_CAPABILITIES=8]="EDITOR_CAPABILITIES",W[W.EDITOR_PIN=9]="EDITOR_PIN",W[W.EDITOR_STICKY=10]="EDITOR_STICKY",W[W.EDITOR_DIRTY=11]="EDITOR_DIRTY",W[W.EDITOR_WILL_DISPOSE=12]="EDITOR_WILL_DISPOSE"})(_=e.GroupModelChangeKind||(e.GroupModelChangeKind={}));var P;(function(W){W[W.PRIMARY=1]="PRIMARY",W[W.SECONDARY=2]="SECONDARY",W[W.BOTH=3]="BOTH",W[W.ANY=4]="ANY"})(P=e.SideBySideEditor||(e.SideBySideEditor={}));class R{getOriginalUri(Q,K){if(!Q)return;if(K?.supportSideBySide){const{primary:te,secondary:ae}=this.getSideEditors(Q);if(te&&ae){if(K?.supportSideBySide===P.BOTH)return{primary:this.getOriginalUri(te,{filterByScheme:K.filterByScheme}),secondary:this.getOriginalUri(ae,{filterByScheme:K.filterByScheme})};if(K?.supportSideBySide===P.ANY)return this.getOriginalUri(te,{filterByScheme:K.filterByScheme})??this.getOriginalUri(ae,{filterByScheme:K.filterByScheme});Q=K.supportSideBySide===P.PRIMARY?te:ae}}if(f(Q)||D(Q))return;const H=r(Q)?Q.preferredResource:Q.resource;return!H||!K||!K.filterByScheme?H:this.filterUri(H,K.filterByScheme)}getSideEditors(Q){return i(Q)||D(Q)?{primary:Q.primary,secondary:Q.secondary}:c(Q)||f(Q)?{primary:Q.modified,secondary:Q.original}:{primary:void 0,secondary:void 0}}getCanonicalUri(Q,K){if(!Q)return;if(K?.supportSideBySide){const{primary:te,secondary:ae}=this.getSideEditors(Q);if(te&&ae){if(K?.supportSideBySide===P.BOTH)return{primary:this.getCanonicalUri(te,{filterByScheme:K.filterByScheme}),secondary:this.getCanonicalUri(ae,{filterByScheme:K.filterByScheme})};if(K?.supportSideBySide===P.ANY)return this.getCanonicalUri(te,{filterByScheme:K.filterByScheme})??this.getCanonicalUri(ae,{filterByScheme:K.filterByScheme});Q=K.supportSideBySide===P.PRIMARY?te:ae}}if(f(Q)||D(Q))return;const H=Q.resource;return!H||!K||!K.filterByScheme?H:this.filterUri(H,K.filterByScheme)}filterUri(Q,K){if(Array.isArray(K)){if(K.some(H=>Q.scheme===H))return Q}else if(K===Q.scheme)return Q}}e.EditorResourceAccessor=new R;var $;(function(W){W[W.LEFT=0]="LEFT",W[W.RIGHT=1]="RIGHT"})($=e.CloseDirection||(e.CloseDirection={}));class E{constructor(){this.editorSerializerConstructors=new Map,this.editorSerializerInstances=new Map}start(Q){const K=this.instantiationService=Q.get(S.IInstantiationService);for(const[H,te]of this.editorSerializerConstructors)this.createEditorSerializer(H,te,K);this.editorSerializerConstructors.clear()}createEditorSerializer(Q,K,H){const te=H.createInstance(K);this.editorSerializerInstances.set(Q,te)}registerFileEditorFactory(Q){if(this.fileEditorFactory)throw new Error("Can only register one file editor factory.");this.fileEditorFactory=Q}getFileEditorFactory(){return(0,k.assertIsDefined)(this.fileEditorFactory)}registerEditorSerializer(Q,K){if(this.editorSerializerConstructors.has(Q)||this.editorSerializerInstances.has(Q))throw new Error(`A editor serializer with type ID '${Q}' was already registered.`);return this.instantiationService?this.createEditorSerializer(Q,K,this.instantiationService):this.editorSerializerConstructors.set(Q,K),(0,B.toDisposable)(()=>{this.editorSerializerConstructors.delete(Q),this.editorSerializerInstances.delete(Q)})}getEditorSerializer(Q){return this.editorSerializerInstances.get(typeof Q=="string"?Q:Q.typeId)}}A.Registry.add(e.EditorExtensions.EditorFactory,new E);async function z(W,Q){if(!W||!W.length)return[];const K=await Promise.all(W.map(async H=>{const te=w.URI.revive(H.fileUri);if(!te||!await Q.canHandleResource(te))return;let ee=H.exists,ce=H.type;if(typeof ee!="boolean"||typeof ce!="number")try{ce=(await Q.stat(te)).isDirectory?y.FileType.Directory:y.FileType.Unknown,ee=!0}catch{ee=!1}if(!ee&&H.openOnlyIfExists||ce===y.FileType.Directory)return;const de={selection:ee?H.selection:void 0,pinned:!0,override:H.editorOverrideId};let Se;return ee?Se={resource:te,options:de}:Se={resource:te,options:de,forceUntitled:!0},Se}));return(0,M.coalesce)(K)}e.pathsToEditors=z;var V;(function(W){W[W.MOST_RECENTLY_ACTIVE=0]="MOST_RECENTLY_ACTIVE",W[W.SEQUENTIAL=1]="SEQUENTIAL"})(V=e.EditorsOrder||(e.EditorsOrder={}))}),define(Ee[61],we([1,0,9,2]),function(J,e,o,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.decodeAuthority=e.asWebviewUri=e.webviewGenericCspSource=e.webviewRootResourceAuthority=e.webviewResourceBaseHost=void 0,e.webviewResourceBaseHost="vscode-webview.net",e.webviewRootResourceAuthority=`vscode-resource.${e.webviewResourceBaseHost}`,e.webviewGenericCspSource=`'self' https://*.${e.webviewResourceBaseHost}`;function w(A,y){return A.scheme===o.Schemas.http||A.scheme===o.Schemas.https?A:(y&&y.authority&&y.isRemote&&A.scheme===o.Schemas.file&&(A=k.URI.from({scheme:o.Schemas.vscodeRemote,authority:y.authority,path:A.path})),k.URI.from({scheme:o.Schemas.https,authority:`${A.scheme}+${B(A.authority)}.${e.webviewRootResourceAuthority}`,path:A.path,fragment:A.fragment,query:A.query}))}e.asWebviewUri=w;function B(A){return A.replace(/./g,y=>{const M=y.charCodeAt(0);return M>=97&&M<=122||M>=65&&M<=90||M>=48&&M<=57?y:"-"+M.toString(16).padStart(4,"0")})}function S(A){return A.replace(/-([0-9a-f]{4})/g,(y,M)=>String.fromCharCode(parseInt(M,16)))}e.decodeAuthority=S}),define(Ee[157],we([1,0,5,6,61]),function(J,e,o,k,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtHostEditorInsets=void 0;class B{constructor(A,y,M){this._proxy=A,this._editors=y,this._initData=M,this._handlePool=0,this._disposables=new k.DisposableStore,this._insets=new Map,this._disposables.add(y.onDidChangeVisibleTextEditors(()=>{const L=y.getVisibleTextEditors();for(const v of this._insets.values())L.indexOf(v.editor)<0&&v.inset.dispose()}))}dispose(){this._insets.forEach(A=>A.inset.dispose()),this._disposables.dispose()}createWebviewEditorInset(A,y,M,L,v){let u;for(const d of this._editors.getVisibleTextEditors(!0))if(d.value===A){u=d;break}if(!u)throw new Error("not a visible editor");const m=this,s=this._handlePool++,n=new o.Emitter,f=new o.Emitter,D=new class{constructor(){this._html="",this._options=Object.create(null)}asWebviewUri(d){return(0,w.asWebviewUri)(d,m._initData.remote)}get cspSource(){return w.webviewGenericCspSource}set options(d){this._options=d,m._proxy.$setOptions(s,d)}get options(){return this._options}set html(d){this._html=d,m._proxy.$setHtml(s,d)}get html(){return this._html}get onDidReceiveMessage(){return n.event}postMessage(d){return m._proxy.$postMessage(s,d)}},T=new class{constructor(){this.editor=A,this.line=y,this.height=M,this.webview=D,this.onDidDispose=f.event}dispose(){m._insets.has(s)&&(m._insets.delete(s),m._proxy.$disposeEditorInset(s),f.fire(),f.dispose(),n.dispose())}};return this._proxy.$createEditorInset(s,u.id,u.value.document.uri,y+1,M,L||{},v.identifier,v.extensionLocation),this._insets.set(s,{editor:A,inset:T,onDidReceiveMessage:n}),T}$onDidDispose(A){const y=this._insets.get(A);y&&y.inset.dispose()}$onDidReceiveMessage(A,y){const M=this._insets.get(A);M&&M.onDidReceiveMessage.fire(y)}}e.ExtHostEditorInsets=B}),define(Ee[158],we([1,0,5,13,130]),function(J,e,o,k,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractDebugAdapter=void 0;class B{constructor(){this.pendingRequests=new Map,this.queue=[],this._onError=new o.Emitter,this._onExit=new o.Emitter,this.sequence=1}get onError(){return this._onError.event}get onExit(){return this._onExit.event}onMessage(A){this.messageCallback&&this._onError.fire(new Error("attempt to set more than one 'Message' callback")),this.messageCallback=A}onEvent(A){this.eventCallback&&this._onError.fire(new Error("attempt to set more than one 'Event' callback")),this.eventCallback=A}onRequest(A){this.requestCallback&&this._onError.fire(new Error("attempt to set more than one 'Request' callback")),this.requestCallback=A}sendResponse(A){A.seq>0?this._onError.fire(new Error(`attempt to send more than one response for command ${A.command}`)):this.internalSend("response",A)}sendRequest(A,y,M,L){const v={command:A};if(y&&Object.keys(y).length>0&&(v.arguments=y),this.internalSend("request",v),typeof L=="number"){const u=setTimeout(()=>{clearTimeout(u);const m=this.pendingRequests.get(v.seq);if(m){this.pendingRequests.delete(v.seq);const s={type:"response",seq:0,request_seq:v.seq,success:!1,command:A,message:(0,w.localize)(0,null,L,A)};m(s)}},L)}return M&&this.pendingRequests.set(v.seq,M),v.seq}acceptMessage(A){this.messageCallback?this.messageCallback(A):(this.queue.push(A),this.queue.length===1&&this.processQueue())}needsTaskBoundaryBetween(A,y){return A.type!=="event"||y.type!=="event"}async processQueue(){let A;for(;this.queue.length;){if((!A||this.needsTaskBoundaryBetween(this.queue[0],A))&&await(0,k.timeout)(0),A=this.queue.shift(),!A)return;switch(A.type){case"event":this.eventCallback&&this.eventCallback(A);break;case"request":this.requestCallback&&this.requestCallback(A);break;case"response":{const y=A,M=this.pendingRequests.get(y.request_seq);M&&(this.pendingRequests.delete(y.request_seq),M(y));break}}}}internalSend(A,y){y.type=A,y.seq=this.sequence++,this.sendMessage(y)}async cancelPendingRequests(){if(this.pendingRequests.size===0)return Promise.resolve();const A=new Map;this.pendingRequests.forEach((y,M)=>A.set(M,y)),await(0,k.timeout)(500),A.forEach((y,M)=>{y({type:"response",seq:0,request_seq:M,success:!1,command:"canceled",message:"canceled"}),this.pendingRequests.delete(M)})}getPendingRequestIds(){return Array.from(this.pendingRequests.keys())}dispose(){this.queue=[]}}e.AbstractDebugAdapter=B}),define(Ee[159],we([1,0,131,44,3]),function(J,e,o,k,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BreakpointWidgetContext=e.IDebugService=e.DebugConfigurationProviderTriggerKind=e.DEBUG_MEMORY_SCHEME=e.MemoryRangeType=e.getStateLabel=e.State=e.INTERNAL_CONSOLE_OPTIONS_SCHEMA=e.DEBUG_SCHEME=e.BREAKPOINT_EDITOR_CONTRIBUTION_ID=e.EDITOR_CONTRIBUTION_ID=e.debuggerDisabledMessage=e.CONTEXT_FOCUSED_STACK_FRAME_HAS_INSTRUCTION_POINTER_REFERENCE=e.CONTEXT_LANGUAGE_SUPPORTS_DISASSEMBLE_REQUEST=e.CONTEXT_DISASSEMBLY_VIEW_FOCUS=e.CONTEXT_DISASSEMBLE_REQUEST_SUPPORTED=e.CONTEXT_MULTI_SESSION_DEBUG=e.CONTEXT_MULTI_SESSION_REPL=e.CONTEXT_EXCEPTION_WIDGET_VISIBLE=e.CONTEXT_VARIABLE_IS_READONLY=e.CONTEXT_VARIABLE_EVALUATE_NAME_PRESENT=e.CONTEXT_TERMINATE_DEBUGGEE_SUPPORTED=e.CONTEXT_BREAK_WHEN_VALUE_IS_READ_SUPPORTED=e.CONTEXT_BREAK_WHEN_VALUE_IS_ACCESSED_SUPPORTED=e.CONTEXT_BREAK_WHEN_VALUE_CHANGES_SUPPORTED=e.CONTEXT_SET_EXPRESSION_SUPPORTED=e.CONTEXT_SET_VARIABLE_SUPPORTED=e.CONTEXT_DEBUG_PROTOCOL_VARIABLE_MENU_CONTEXT=e.CONTEXT_DEBUG_EXTENSION_AVAILABLE=e.CONTEXT_DEBUGGERS_AVAILABLE=e.CONTEXT_BREAKPOINTS_EXIST=e.CONTEXT_STEP_INTO_TARGETS_SUPPORTED=e.CONTEXT_JUMP_TO_CURSOR_SUPPORTED=e.CONTEXT_STACK_FRAME_SUPPORTS_RESTART=e.CONTEXT_RESTART_FRAME_SUPPORTED=e.CONTEXT_STEP_BACK_SUPPORTED=e.CONTEXT_FOCUSED_SESSION_IS_ATTACH=e.CONTEXT_LOADED_SCRIPTS_ITEM_TYPE=e.CONTEXT_LOADED_SCRIPTS_SUPPORTED=e.CONTEXT_BREAKPOINT_SUPPORTS_CONDITION=e.CONTEXT_BREAKPOINT_ACCESS_TYPE=e.CONTEXT_BREAKPOINT_ITEM_TYPE=e.CONTEXT_CAN_VIEW_MEMORY=e.CONTEXT_WATCH_ITEM_TYPE=e.CONTEXT_CALLSTACK_SESSION_HAS_ONE_THREAD=e.CONTEXT_CALLSTACK_ITEM_STOPPED=e.CONTEXT_CALLSTACK_SESSION_IS_ATTACH=e.CONTEXT_CALLSTACK_ITEM_TYPE=e.CONTEXT_BREAKPOINT_INPUT_FOCUSED=e.CONTEXT_EXPRESSION_SELECTED=e.CONTEXT_VARIABLES_FOCUSED=e.CONTEXT_WATCH_EXPRESSIONS_EXIST=e.CONTEXT_WATCH_EXPRESSIONS_FOCUSED=e.CONTEXT_BREAKPOINTS_FOCUSED=e.CONTEXT_IN_BREAKPOINT_WIDGET=e.CONTEXT_BREAKPOINT_WIDGET_VISIBLE=e.CONTEXT_IN_DEBUG_REPL=e.CONTEXT_IN_DEBUG_MODE=e.CONTEXT_DEBUG_UX=e.CONTEXT_DEBUG_UX_KEY=e.CONTEXT_DEBUG_STATE=e.CONTEXT_DEBUG_CONFIGURATION_TYPE=e.CONTEXT_DEBUG_TYPE=e.DEBUG_SERVICE_ID=e.REPL_VIEW_ID=e.DEBUG_PANEL_ID=e.DISASSEMBLY_VIEW_ID=e.BREAKPOINTS_VIEW_ID=e.LOADED_SCRIPTS_VIEW_ID=e.CALLSTACK_VIEW_ID=e.WATCH_VIEW_ID=e.VARIABLES_VIEW_ID=e.VIEWLET_ID=void 0,e.VIEWLET_ID="workbench.view.debug",e.VARIABLES_VIEW_ID="workbench.debug.variablesView",e.WATCH_VIEW_ID="workbench.debug.watchExpressionsView",e.CALLSTACK_VIEW_ID="workbench.debug.callStackView",e.LOADED_SCRIPTS_VIEW_ID="workbench.debug.loadedScriptsView",e.BREAKPOINTS_VIEW_ID="workbench.debug.breakPointsView",e.DISASSEMBLY_VIEW_ID="workbench.debug.disassemblyView",e.DEBUG_PANEL_ID="workbench.panel.repl",e.REPL_VIEW_ID="workbench.panel.repl.view",e.DEBUG_SERVICE_ID="debugService",e.CONTEXT_DEBUG_TYPE=new k.RawContextKey("debugType",void 0,{type:"string",description:o.localize(0,null)}),e.CONTEXT_DEBUG_CONFIGURATION_TYPE=new k.RawContextKey("debugConfigurationType",void 0,{type:"string",description:o.localize(1,null)}),e.CONTEXT_DEBUG_STATE=new k.RawContextKey("debugState","inactive",{type:"string",description:o.localize(2,null)}),e.CONTEXT_DEBUG_UX_KEY="debugUx",e.CONTEXT_DEBUG_UX=new k.RawContextKey(e.CONTEXT_DEBUG_UX_KEY,"default",{type:"string",description:o.localize(3,null)}),e.CONTEXT_IN_DEBUG_MODE=new k.RawContextKey("inDebugMode",!1,{type:"boolean",description:o.localize(4,null)}),e.CONTEXT_IN_DEBUG_REPL=new k.RawContextKey("inDebugRepl",!1,{type:"boolean",description:o.localize(5,null)}),e.CONTEXT_BREAKPOINT_WIDGET_VISIBLE=new k.RawContextKey("breakpointWidgetVisible",!1,{type:"boolean",description:o.localize(6,null)}),e.CONTEXT_IN_BREAKPOINT_WIDGET=new k.RawContextKey("inBreakpointWidget",!1,{type:"boolean",description:o.localize(7,null)}),e.CONTEXT_BREAKPOINTS_FOCUSED=new k.RawContextKey("breakpointsFocused",!0,{type:"boolean",description:o.localize(8,null)}),e.CONTEXT_WATCH_EXPRESSIONS_FOCUSED=new k.RawContextKey("watchExpressionsFocused",!0,{type:"boolean",description:o.localize(9,null)}),e.CONTEXT_WATCH_EXPRESSIONS_EXIST=new k.RawContextKey("watchExpressionsExist",!1,{type:"boolean",description:o.localize(10,null)}),e.CONTEXT_VARIABLES_FOCUSED=new k.RawContextKey("variablesFocused",!0,{type:"boolean",description:o.localize(11,null)}),e.CONTEXT_EXPRESSION_SELECTED=new k.RawContextKey("expressionSelected",!1,{type:"boolean",description:o.localize(12,null)}),e.CONTEXT_BREAKPOINT_INPUT_FOCUSED=new k.RawContextKey("breakpointInputFocused",!1,{type:"boolean",description:o.localize(13,null)}),e.CONTEXT_CALLSTACK_ITEM_TYPE=new k.RawContextKey("callStackItemType",void 0,{type:"string",description:o.localize(14,null)}),e.CONTEXT_CALLSTACK_SESSION_IS_ATTACH=new k.RawContextKey("callStackSessionIsAttach",!1,{type:"boolean",description:o.localize(15,null)}),e.CONTEXT_CALLSTACK_ITEM_STOPPED=new k.RawContextKey("callStackItemStopped",!1,{type:"boolean",description:o.localize(16,null)}),e.CONTEXT_CALLSTACK_SESSION_HAS_ONE_THREAD=new k.RawContextKey("callStackSessionHasOneThread",!1,{type:"boolean",description:o.localize(17,null)}),e.CONTEXT_WATCH_ITEM_TYPE=new k.RawContextKey("watchItemType",void 0,{type:"string",description:o.localize(18,null)}),e.CONTEXT_CAN_VIEW_MEMORY=new k.RawContextKey("canViewMemory",void 0,{type:"boolean",description:o.localize(19,null)}),e.CONTEXT_BREAKPOINT_ITEM_TYPE=new k.RawContextKey("breakpointItemType",void 0,{type:"string",description:o.localize(20,null)}),e.CONTEXT_BREAKPOINT_ACCESS_TYPE=new k.RawContextKey("breakpointAccessType",void 0,{type:"string",description:o.localize(21,null)}),e.CONTEXT_BREAKPOINT_SUPPORTS_CONDITION=new k.RawContextKey("breakpointSupportsCondition",!1,{type:"boolean",description:o.localize(22,null)}),e.CONTEXT_LOADED_SCRIPTS_SUPPORTED=new k.RawContextKey("loadedScriptsSupported",!1,{type:"boolean",description:o.localize(23,null)}),e.CONTEXT_LOADED_SCRIPTS_ITEM_TYPE=new k.RawContextKey("loadedScriptsItemType",void 0,{type:"string",description:o.localize(24,null)}),e.CONTEXT_FOCUSED_SESSION_IS_ATTACH=new k.RawContextKey("focusedSessionIsAttach",!1,{type:"boolean",description:o.localize(25,null)}),e.CONTEXT_STEP_BACK_SUPPORTED=new k.RawContextKey("stepBackSupported",!1,{type:"boolean",description:o.localize(26,null)}),e.CONTEXT_RESTART_FRAME_SUPPORTED=new k.RawContextKey("restartFrameSupported",!1,{type:"boolean",description:o.localize(27,null)}),e.CONTEXT_STACK_FRAME_SUPPORTS_RESTART=new k.RawContextKey("stackFrameSupportsRestart",!1,{type:"boolean",description:o.localize(28,null)}),e.CONTEXT_JUMP_TO_CURSOR_SUPPORTED=new k.RawContextKey("jumpToCursorSupported",!1,{type:"boolean",description:o.localize(29,null)}),e.CONTEXT_STEP_INTO_TARGETS_SUPPORTED=new k.RawContextKey("stepIntoTargetsSupported",!1,{type:"boolean",description:o.localize(30,null)}),e.CONTEXT_BREAKPOINTS_EXIST=new k.RawContextKey("breakpointsExist",!1,{type:"boolean",description:o.localize(31,null)}),e.CONTEXT_DEBUGGERS_AVAILABLE=new k.RawContextKey("debuggersAvailable",!1,{type:"boolean",description:o.localize(32,null)}),e.CONTEXT_DEBUG_EXTENSION_AVAILABLE=new k.RawContextKey("debugExtensionAvailable",!1,{type:"boolean",description:o.localize(33,null)}),e.CONTEXT_DEBUG_PROTOCOL_VARIABLE_MENU_CONTEXT=new k.RawContextKey("debugProtocolVariableMenuContext",void 0,{type:"string",description:o.localize(34,null)}),e.CONTEXT_SET_VARIABLE_SUPPORTED=new k.RawContextKey("debugSetVariableSupported",!1,{type:"boolean",description:o.localize(35,null)}),e.CONTEXT_SET_EXPRESSION_SUPPORTED=new k.RawContextKey("debugSetExpressionSupported",!1,{type:"boolean",description:o.localize(36,null)}),e.CONTEXT_BREAK_WHEN_VALUE_CHANGES_SUPPORTED=new k.RawContextKey("breakWhenValueChangesSupported",!1,{type:"boolean",description:o.localize(37,null)}),e.CONTEXT_BREAK_WHEN_VALUE_IS_ACCESSED_SUPPORTED=new k.RawContextKey("breakWhenValueIsAccessedSupported",!1,{type:"boolean",description:o.localize(38,null)}),e.CONTEXT_BREAK_WHEN_VALUE_IS_READ_SUPPORTED=new k.RawContextKey("breakWhenValueIsReadSupported",!1,{type:"boolean",description:o.localize(39,null)}),e.CONTEXT_TERMINATE_DEBUGGEE_SUPPORTED=new k.RawContextKey("terminateDebuggeeSupported",!1,{type:"boolean",description:o.localize(40,null)}),e.CONTEXT_VARIABLE_EVALUATE_NAME_PRESENT=new k.RawContextKey("variableEvaluateNamePresent",!1,{type:"boolean",description:o.localize(41,null)}),e.CONTEXT_VARIABLE_IS_READONLY=new k.RawContextKey("variableIsReadonly",!1,{type:"boolean",description:o.localize(42,null)}),e.CONTEXT_EXCEPTION_WIDGET_VISIBLE=new k.RawContextKey("exceptionWidgetVisible",!1,{type:"boolean",description:o.localize(43,null)}),e.CONTEXT_MULTI_SESSION_REPL=new k.RawContextKey("multiSessionRepl",!1,{type:"boolean",description:o.localize(44,null)}),e.CONTEXT_MULTI_SESSION_DEBUG=new k.RawContextKey("multiSessionDebug",!1,{type:"boolean",description:o.localize(45,null)}),e.CONTEXT_DISASSEMBLE_REQUEST_SUPPORTED=new k.RawContextKey("disassembleRequestSupported",!1,{type:"boolean",description:o.localize(46,null)}),e.CONTEXT_DISASSEMBLY_VIEW_FOCUS=new k.RawContextKey("disassemblyViewFocus",!1,{type:"boolean",description:o.localize(47,null)}),e.CONTEXT_LANGUAGE_SUPPORTS_DISASSEMBLE_REQUEST=new k.RawContextKey("languageSupportsDisassembleRequest",!1,{type:"boolean",description:o.localize(48,null)}),e.CONTEXT_FOCUSED_STACK_FRAME_HAS_INSTRUCTION_POINTER_REFERENCE=new k.RawContextKey("focusedStackFrameHasInstructionReference",!1,{type:"boolean",description:o.localize(49,null)});const B=v=>o.localize(50,null,v);e.debuggerDisabledMessage=B,e.EDITOR_CONTRIBUTION_ID="editor.contrib.debug",e.BREAKPOINT_EDITOR_CONTRIBUTION_ID="editor.contrib.breakpoint",e.DEBUG_SCHEME="debug",e.INTERNAL_CONSOLE_OPTIONS_SCHEMA={enum:["neverOpen","openOnSessionStart","openOnFirstSessionStart"],default:"openOnFirstSessionStart",description:o.localize(51,null)};var S;(function(v){v[v.Inactive=0]="Inactive",v[v.Initializing=1]="Initializing",v[v.Stopped=2]="Stopped",v[v.Running=3]="Running"})(S=e.State||(e.State={}));function A(v){switch(v){case 1:return"initializing";case 2:return"stopped";case 3:return"running";default:return"inactive"}}e.getStateLabel=A;var y;(function(v){v[v.Valid=0]="Valid",v[v.Unreadable=1]="Unreadable",v[v.Error=2]="Error"})(y=e.MemoryRangeType||(e.MemoryRangeType={})),e.DEBUG_MEMORY_SCHEME="vscode-debug-memory";var M;(function(v){v[v.Initial=1]="Initial",v[v.Dynamic=2]="Dynamic"})(M=e.DebugConfigurationProviderTriggerKind||(e.DebugConfigurationProviderTriggerKind={})),e.IDebugService=(0,w.createDecorator)(e.DEBUG_SERVICE_ID);var L;(function(v){v[v.CONDITION=0]="CONDITION",v[v.HIT_COUNT=1]="HIT_COUNT",v[v.LOG_MESSAGE=2]="LOG_MESSAGE"})(L=e.BreakpointWidgetContext||(e.BreakpointWidgetContext={}))}),define(Ee[160],we([1,0,10,2,17,26,9]),function(J,e,o,k,w,B,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.saveAllBeforeDebugStart=e.getVisibleAndSorted=e.convertToVSCPaths=e.convertToDAPaths=e.isUri=e.getExactExpressionStartAndEnd=e.isDebuggerMainContribution=e.getExtensionHostDebugSession=e.isSessionAttach=e.filterExceptionsFromTelemetry=e.formatPII=void 0;const A=/{([^}]+)}/g;function y(r,i,c){return r.replace(A,function(t,a){return i&&a.length>0&&a[0]!=="_"?t:c&&c.hasOwnProperty(a)?c[a]:t})}e.formatPII=y;function M(r){const i={};for(const c of Object.keys(r))c.startsWith("!")||(i[c]=r[c]);return i}e.filterExceptionsFromTelemetry=M;function L(r){return r.configuration.request==="attach"&&!v(r)&&(!r.parentSession||L(r.parentSession))}e.isSessionAttach=L;function v(r){let i=r.configuration.type;if(!!i)return i==="vslsShare"&&(i=r.configuration.adapterProxy.configuration.type),(0,o.equalsIgnoreCase)(i,"extensionhost")||(0,o.equalsIgnoreCase)(i,"pwa-extensionhost")?r:r.parentSession?v(r.parentSession):void 0}e.getExtensionHostDebugSession=v;function u(r){return r.type&&(r.label||r.program||r.runtime)}e.isDebuggerMainContribution=u;function m(r,i,c){let t,a=0;const p=/([^()\[\]{}<>\s+\-/%~#^;=|,`!]|\->)+/g;let h=null;for(;h=p.exec(r);){const _=h.index+1,P=_+h[0].length;if(_<=i&&P>=c){t=h[0],a=_;break}}if(t){const _=/\w+/g;let P=null;for(;(P=_.exec(t))&&!(P.index+1+a+P[0].length>=c););P&&(t=t.substring(0,_.lastIndex))}return t?{start:a,end:a+t.length-1}:{start:0,end:0}}e.getExactExpressionStartAndEnd=m;const s=/^[a-zA-Z][a-zA-Z0-9\+\-\.]+:/;function n(r){return!!(r&&r.match(s))}e.isUri=n;function f(r){if(typeof r.path=="string"&&!(typeof r.sourceReference=="number"&&r.sourceReference>0)){if(n(r.path))return k.URI.parse(r.path);if((0,w.isAbsolute)(r.path))return k.URI.file(r.path)}return r.path}function D(r){if(typeof r.path=="object"){const i=k.URI.revive(r.path);if(i)return i.scheme===S.Schemas.file?i.fsPath:i.toString()}return r.path}function T(r,i){const c=i?f:D,t=(0,B.deepClone)(r);return g(t,(a,p)=>{a&&p&&(p.path=c(p))}),t}e.convertToDAPaths=T;function d(r,i){const c=i?f:D,t=(0,B.deepClone)(r);return g(t,(a,p)=>{!a&&p&&(p.path=c(p))}),t}e.convertToVSCPaths=d;function g(r,i){switch(r.type){case"event":{const c=r;switch(c.event){case"output":i(!1,c.body.source);break;case"loadedSource":i(!1,c.body.source);break;case"breakpoint":i(!1,c.body.breakpoint.source);break;default:break}break}case"request":{const c=r;switch(c.command){case"setBreakpoints":i(!0,c.arguments.source);break;case"breakpointLocations":i(!0,c.arguments.source);break;case"source":i(!0,c.arguments.source);break;case"gotoTargets":i(!0,c.arguments.source);break;case"launchVSCode":c.arguments.args.forEach(t=>i(!1,t));break;default:break}break}case"response":{const c=r;if(c.success&&c.body)switch(c.command){case"stackTrace":c.body.stackFrames.forEach(t=>i(!1,t.source));break;case"loadedSources":c.body.sources.forEach(t=>i(!1,t));break;case"scopes":c.body.scopes.forEach(t=>i(!1,t.source));break;case"setFunctionBreakpoints":c.body.breakpoints.forEach(t=>i(!1,t.source));break;case"setBreakpoints":c.body.breakpoints.forEach(t=>i(!1,t.source));break;case"disassemble":{const t=c;t.body&&t.body.instructions.forEach(a=>i(!1,a.location))}break;default:break}break}}}function b(r){return r.filter(i=>!i.presentation?.hidden).sort((i,c)=>i.presentation?c.presentation?i.presentation.group?c.presentation.group?i.presentation.group!==c.presentation.group?i.presentation.group.localeCompare(c.presentation.group):l(i.presentation.order,c.presentation.order):-1:c.presentation.group?1:l(i.presentation.order,c.presentation.order):-1:c.presentation?1:0)}e.getVisibleAndSorted=b;function l(r,i){return typeof r!="number"?typeof i!="number"?0:1:typeof i!="number"?-1:r-i}async function I(r,i){const c=r.getValue("debug.saveBeforeStart",{overrideIdentifier:i.activeTextEditorLanguageId});if(c!=="none"&&(await i.saveAll(),c==="allEditorsInActiveGroup")){const t=i.activeEditorPane;t&&t.input.resource?.scheme===S.Schemas.untitled&&await i.save({editor:t.input,groupId:t.group.id})}await r.reloadConfiguration()}e.saveAllBeforeDebugStart=I}),define(Ee[85],we([1,0,29,161,71,9,17,23,44]),function(J,e,o,k,w,B,S,A,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NotebookWorkingCopyTypeIdentifier=e.CellStatusbarAlignment=e.NotebookSetting=e.CellSequence=e.notebookDocumentFilterMatch=e.isDocumentExcludePattern=e.NotebookEditorPriority=e.NOTEBOOK_EDITOR_CURSOR_BOUNDARY=e.diff=e.MimeTypeDisplayOrder=e.CellUri=e.CellEditType=e.SelectionStateType=e.NotebookCellsChangeType=e.RendererMessagingSpec=e.NotebookRendererMatch=e.NotebookCellExecutionState=e.NotebookRunState=e.RENDERER_NOT_AVAILABLE=e.RENDERER_EQUIVALENT_EXTENSIONS=e.ACCESSIBLE_NOTEBOOK_DISPLAY_ORDER=e.NOTEBOOK_DISPLAY_ORDER=e.CellKind=e.NOTEBOOK_DIFF_EDITOR_ID=e.NOTEBOOK_EDITOR_ID=void 0,e.NOTEBOOK_EDITOR_ID="workbench.editor.notebook",e.NOTEBOOK_DIFF_EDITOR_ID="workbench.editor.notebookTextDiffEditor";var M;(function(t){t[t.Markup=1]="Markup",t[t.Code=2]="Code"})(M=e.CellKind||(e.CellKind={})),e.NOTEBOOK_DISPLAY_ORDER=["application/json","application/javascript","text/html","image/svg+xml",w.Mimes.latex,w.Mimes.markdown,"image/png","image/jpeg",w.Mimes.text],e.ACCESSIBLE_NOTEBOOK_DISPLAY_ORDER=[w.Mimes.latex,w.Mimes.markdown,"application/json",w.Mimes.text,"text/html","image/svg+xml","image/png","image/jpeg"],e.RENDERER_EQUIVALENT_EXTENSIONS=new Map([["ms-toolsai.jupyter",new Set(["jupyter-notebook","interactive"])],["ms-toolsai.jupyter-renderers",new Set(["jupyter-notebook","interactive"])]]),e.RENDERER_NOT_AVAILABLE="_notAvailable";var L;(function(t){t[t.Running=1]="Running",t[t.Idle=2]="Idle"})(L=e.NotebookRunState||(e.NotebookRunState={}));var v;(function(t){t[t.Unconfirmed=1]="Unconfirmed",t[t.Pending=2]="Pending",t[t.Executing=3]="Executing"})(v=e.NotebookCellExecutionState||(e.NotebookCellExecutionState={}));var u;(function(t){t[t.WithHardKernelDependency=0]="WithHardKernelDependency",t[t.WithOptionalKernelDependency=1]="WithOptionalKernelDependency",t[t.Pure=2]="Pure",t[t.Never=3]="Never"})(u=e.NotebookRendererMatch||(e.NotebookRendererMatch={}));var m;(function(t){t.Always="always",t.Never="never",t.Optional="optional"})(m=e.RendererMessagingSpec||(e.RendererMessagingSpec={}));var s;(function(t){t[t.ModelChange=1]="ModelChange",t[t.Move=2]="Move",t[t.ChangeLanguage=5]="ChangeLanguage",t[t.Initialize=6]="Initialize",t[t.ChangeCellMetadata=7]="ChangeCellMetadata",t[t.Output=8]="Output",t[t.OutputItem=9]="OutputItem",t[t.ChangeCellContent=10]="ChangeCellContent",t[t.ChangeDocumentMetadata=11]="ChangeDocumentMetadata",t[t.ChangeCellInternalMetadata=12]="ChangeCellInternalMetadata",t[t.ChangeCellMime=13]="ChangeCellMime",t[t.Unknown=100]="Unknown"})(s=e.NotebookCellsChangeType||(e.NotebookCellsChangeType={}));var n;(function(t){t[t.Handle=0]="Handle",t[t.Index=1]="Index"})(n=e.SelectionStateType||(e.SelectionStateType={}));var f;(function(t){t[t.Replace=1]="Replace",t[t.Output=2]="Output",t[t.Metadata=3]="Metadata",t[t.CellLanguage=4]="CellLanguage",t[t.DocumentMetadata=5]="DocumentMetadata",t[t.Move=6]="Move",t[t.OutputItems=7]="OutputItems",t[t.PartialMetadata=8]="PartialMetadata",t[t.PartialInternalMetadata=9]="PartialInternalMetadata"})(f=e.CellEditType||(e.CellEditType={}));var D;(function(t){t.scheme=B.Schemas.vscodeNotebookCell;const a=/^ch(\d{7,})/;function p(E,z){return E.with({scheme:t.scheme,fragment:`ch${z.toString().padStart(7,"0")}${E.scheme!==B.Schemas.file?E.scheme:""}`})}t.generate=p;function h(E){if(E.scheme!==t.scheme)return;const z=a.exec(E.fragment);return z?{handle:Number(z[1]),notebook:E.with({scheme:E.fragment.substring(z[0].length)||B.Schemas.file,fragment:null})}:void 0}t.parse=h;function _(E,z){return E.with({scheme:B.Schemas.vscodeNotebookCellOutput,fragment:`op${z??""},${E.scheme!==B.Schemas.file?E.scheme:""}`})}t.generateCellOutputUri=_;function P(E){if(E.scheme!==B.Schemas.vscodeNotebookCellOutput)return;const z=/^op([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})?\,(.*)$/i.exec(E.fragment);if(!z)return;const V=z[1]&&z[1]!==""?z[1]:void 0,W=z[2];return{outputId:V,notebook:E.with({scheme:W||B.Schemas.file,fragment:null})}}t.parseCellOutputUri=P;function R(E,z,V){return E.with({scheme:V,fragment:`ch${z.toString().padStart(7,"0")}${E.scheme!==B.Schemas.file?E.scheme:""}`})}t.generateCellUri=R;function $(E,z){if(E.scheme!==z)return;const V=a.exec(E.fragment);return V?{handle:Number(V[1]),notebook:E.with({scheme:E.fragment.substring(V[0].length)||B.Schemas.file,fragment:null})}:void 0}t.parseCellUri=$})(D=e.CellUri||(e.CellUri={}));const T=t=>A.isWindows?t.replace(/\//g,"\\"):t;class d{constructor(a=[],p=e.NOTEBOOK_DISPLAY_ORDER){this.defaultOrder=p,this.order=[...new Set(a)].map(h=>({pattern:h,matches:o.parse(T(h))}))}sort(a){const p=new Map(k.Iterable.map(a,_=>[_,T(_)]));let h=[];for(const{matches:_}of this.order)for(const[P,R]of p)if(_(R)){h.push(P),p.delete(P);break}return p.size&&(h=h.concat([...p.keys()].sort((_,P)=>this.defaultOrder.indexOf(_)-this.defaultOrder.indexOf(P)))),h}prioritize(a,p){const h=this.findIndex(a);if(h===-1){this.order.unshift({pattern:a,matches:o.parse(T(a))});return}const _=new Set(p.map(R=>this.findIndex(R,h)));_.delete(-1);const P=Array.from(_).sort();this.order.splice(h+1,0,...P.map(R=>this.order[R]));for(let R=P.length-1;R>=0;R--)this.order.splice(P[R],1)}toArray(){return this.order.map(a=>a.pattern)}findIndex(a,p=this.order.length){const h=T(a);for(let _=0;_<p;_++)if(this.order[_].matches(h))return _;return-1}}e.MimeTypeDisplayOrder=d;function g(t,a,p,h=(_,P)=>_===P){const _=[];function P(E,z,V){if(z===0&&V.length===0)return;const W=_[_.length-1];W&&W.start+W.deleteCount===E?(W.deleteCount+=z,W.toInsert.push(...V)):_.push({start:E,deleteCount:z,toInsert:V})}let R=0,$=0;for(;;){if(R===t.length){P(R,0,a.slice($));break}if($===a.length){P(R,t.length-R,[]);break}const E=t[R],z=a[$];if(h(E,z)){R+=1,$+=1;continue}p(z)?(P(R,1,[]),R+=1):(P(R,0,[z]),$+=1)}return _}e.diff=g,e.NOTEBOOK_EDITOR_CURSOR_BOUNDARY=new y.RawContextKey("notebookEditorCursorAtBoundary","none");var b;(function(t){t.default="default",t.option="option"})(b=e.NotebookEditorPriority||(e.NotebookEditorPriority={}));function l(t){const a=t;return!!((typeof a.include=="string"||o.isRelativePattern(a.include))&&(typeof a.exclude=="string"||o.isRelativePattern(a.exclude)))}e.isDocumentExcludePattern=l;function I(t,a,p){if(Array.isArray(t.viewType)&&t.viewType.indexOf(a)>=0||t.viewType===a)return!0;if(t.filenamePattern){const h=l(t.filenamePattern)?t.filenamePattern.include:t.filenamePattern,_=l(t.filenamePattern)?t.filenamePattern.exclude:void 0;if(o.match(h,(0,S.basename)(p.fsPath).toLowerCase()))return!(_&&o.match(_,(0,S.basename)(p.fsPath).toLowerCase()))}return!1}e.notebookDocumentFilterMatch=I;class r{constructor(a){this.textModel=a}getElements(){const a=new Int32Array(this.textModel.cells.length);for(let p=0;p<this.textModel.cells.length;p++)a[p]=this.textModel.cells[p].getHashValue();return a}}e.CellSequence=r,e.NotebookSetting={displayOrder:"notebook.displayOrder",cellToolbarLocation:"notebook.cellToolbarLocation",cellToolbarVisibility:"notebook.cellToolbarVisibility",showCellStatusBar:"notebook.showCellStatusBar",textDiffEditorPreview:"notebook.diff.enablePreview",experimentalInsertToolbarAlignment:"notebook.experimental.insertToolbarAlignment",compactView:"notebook.compactView",focusIndicator:"notebook.cellFocusIndicator",insertToolbarLocation:"notebook.insertToolbarLocation",globalToolbar:"notebook.globalToolbar",undoRedoPerCell:"notebook.undoRedoPerCell",consolidatedOutputButton:"notebook.consolidatedOutputButton",showFoldingControls:"notebook.showFoldingControls",dragAndDropEnabled:"notebook.dragAndDropEnabled",cellEditorOptionsCustomizations:"notebook.editorOptionsCustomizations",consolidatedRunButton:"notebook.consolidatedRunButton",openGettingStarted:"notebook.experimental.openGettingStarted",textOutputLineLimit:"notebook.output.textLineLimit",globalToolbarShowLabel:"notebook.globalToolbarShowLabel",markupFontSize:"notebook.markup.fontSize",interactiveWindowCollapseCodeCells:"interactiveWindow.collapseCellInputCode"};var i;(function(t){t[t.Left=1]="Left",t[t.Right=2]="Right"})(i=e.CellStatusbarAlignment||(e.CellStatusbarAlignment={}));class c{static create(a){return`${c._prefix}${a}`}static parse(a){if(a.startsWith(c._prefix))return a.substring(c._prefix.length)}}e.NotebookWorkingCopyTypeIdentifier=c,c._prefix="notebook/"}),define(Ee[162],we([1,0,3]),function(J,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.INotebookExecutionService=e.CellExecutionUpdateType=void 0;var k;(function(w){w[w.Output=1]="Output",w[w.OutputItems=2]="OutputItems",w[w.ExecutionState=3]="ExecutionState"})(k=e.CellExecutionUpdateType||(e.CellExecutionUpdateType={})),e.INotebookExecutionService=(0,o.createDecorator)("INotebookExecutionService")}),define(Ee[163],we([1,0,3,44]),function(J,e,o,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OutputChannelUpdateMode=e.IOutputService=e.CONTEXT_OUTPUT_SCROLL_LOCK=e.CONTEXT_ACTIVE_LOG_OUTPUT=e.CONTEXT_IN_OUTPUT=e.MAX_OUTPUT_LENGTH=e.OUTPUT_SERVICE_ID=e.OUTPUT_VIEW_ID=e.LOG_MODE_ID=e.LOG_SCHEME=e.LOG_MIME=e.OUTPUT_MODE_ID=e.OUTPUT_SCHEME=e.OUTPUT_MIME=void 0,e.OUTPUT_MIME="text/x-code-output",e.OUTPUT_SCHEME="output",e.OUTPUT_MODE_ID="Log",e.LOG_MIME="text/x-code-log-output",e.LOG_SCHEME="log",e.LOG_MODE_ID="log",e.OUTPUT_VIEW_ID="workbench.panel.output",e.OUTPUT_SERVICE_ID="outputService",e.MAX_OUTPUT_LENGTH=1e4*100,e.CONTEXT_IN_OUTPUT=new k.RawContextKey("inOutput",!1),e.CONTEXT_ACTIVE_LOG_OUTPUT=new k.RawContextKey("activeLogOutput",!1),e.CONTEXT_OUTPUT_SCROLL_LOCK=new k.RawContextKey("outputView.scrollLock",!1),e.IOutputService=(0,o.createDecorator)(e.OUTPUT_SERVICE_ID);var w;(function(B){B[B.Append=1]="Append",B[B.Replace=2]="Replace",B[B.Clear=3]="Clear"})(w=e.OutputChannelUpdateMode||(e.OutputChannelUpdateMode={}))}),define(Ee[164],we([1,0,132,3,44]),function(J,e,o,k,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.USER_TASKS_GROUP_KEY=e.ITaskService=e.ProcessExecutionSupportedContext=e.ShellExecutionSupportedContext=e.CustomExecutionSupportedContext=void 0,e.CustomExecutionSupportedContext=new w.RawContextKey("customExecutionSupported",!0,o.localize(0,null)),e.ShellExecutionSupportedContext=new w.RawContextKey("shellExecutionSupported",!1,o.localize(1,null)),e.ProcessExecutionSupportedContext=new w.RawContextKey("processExecutionSupported",!1,o.localize(2,null)),e.ITaskService=(0,k.createDecorator)("taskService"),e.USER_TASKS_GROUP_KEY="settings"}),define(Ee[165],we([1,0]),function(J,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.deserializeEnvironmentVariableCollection=e.serializeEnvironmentVariableCollection=void 0;function o(w){return[...w.entries()]}e.serializeEnvironmentVariableCollection=o;function k(w){return new Map(w)}e.deserializeEnvironmentVariableCollection=k}),define(Ee[62],we([1,0,2,48]),function(J,e,o,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractIncrementalTestCollection=e.IncrementalChangeCollector=e.TestsDiffOp=e.TestDiffOpType=e.DetailType=e.TestResultItem=e.applyTestItemUpdate=e.ITestItemUpdate=e.InternalTestItem=e.TestItemExpandState=e.ITestItem=e.denamespaceTestTag=e.namespaceTestTag=e.ITestTaskState=e.ITestMessage=e.ITestOutputMessage=e.ITestErrorMessage=e.TestMessageType=e.IRichLocation=e.testRunProfileBitsetList=e.TestRunProfileBitset=e.TestResultState=void 0;var w;(function(c){c[c.Unset=0]="Unset",c[c.Queued=1]="Queued",c[c.Running=2]="Running",c[c.Passed=3]="Passed",c[c.Failed=4]="Failed",c[c.Skipped=5]="Skipped",c[c.Errored=6]="Errored"})(w=e.TestResultState||(e.TestResultState={}));var B;(function(c){c[c.Run=2]="Run",c[c.Debug=4]="Debug",c[c.Coverage=8]="Coverage",c[c.HasNonDefaultProfile=16]="HasNonDefaultProfile",c[c.HasConfigurable=32]="HasConfigurable"})(B=e.TestRunProfileBitset||(e.TestRunProfileBitset={})),e.testRunProfileBitsetList=[2,4,8,16];var S;(function(c){c.serialize=t=>({range:t.range.toJSON(),uri:t.uri.toJSON()}),c.deserialize=t=>({range:k.Range.lift(t.range),uri:o.URI.revive(t.uri)})})(S=e.IRichLocation||(e.IRichLocation={}));var A;(function(c){c[c.Error=0]="Error",c[c.Info=1]="Info"})(A=e.TestMessageType||(e.TestMessageType={}));var y;(function(c){c.serialize=t=>({message:t.message,type:0,expected:t.expected,actual:t.actual,location:t.location&&S.serialize(t.location)}),c.deserialize=t=>({message:t.message,type:0,expected:t.expected,actual:t.actual,location:t.location&&S.deserialize(t.location)})})(y=e.ITestErrorMessage||(e.ITestErrorMessage={}));var M;(function(c){c.serialize=t=>({message:t.message,type:1,offset:t.offset,location:t.location&&S.serialize(t.location)}),c.deserialize=t=>({message:t.message,type:1,offset:t.offset,location:t.location&&S.deserialize(t.location)})})(M=e.ITestOutputMessage||(e.ITestOutputMessage={}));var L;(function(c){c.serialize=t=>t.type===0?y.serialize(t):M.serialize(t),c.deserialize=t=>t.type===0?y.deserialize(t):M.deserialize(t)})(L=e.ITestMessage||(e.ITestMessage={}));var v;(function(c){c.serialize=t=>({state:t.state,duration:t.duration,messages:t.messages.map(L.serialize)}),c.deserialize=t=>({state:t.state,duration:t.duration,messages:t.messages.map(L.deserialize)})})(v=e.ITestTaskState||(e.ITestTaskState={}));const u="\0",m=(c,t)=>c+u+t;e.namespaceTestTag=m;const s=c=>{const t=c.indexOf(u);return{ctrlId:c.slice(0,t),tagId:c.slice(t+1)}};e.denamespaceTestTag=s;var n;(function(c){c.serialize=t=>({extId:t.extId,label:t.label,tags:t.tags,busy:t.busy,children:void 0,uri:t.uri?.toJSON(),range:t.range?.toJSON()||null,description:t.description,error:t.error,sortText:t.sortText}),c.deserialize=t=>({extId:t.extId,label:t.label,tags:t.tags,busy:t.busy,children:void 0,uri:t.uri?o.URI.revive(t.uri):void 0,range:t.range?k.Range.lift(t.range):null,description:t.description,error:t.error,sortText:t.sortText})})(n=e.ITestItem||(e.ITestItem={}));var f;(function(c){c[c.NotExpandable=0]="NotExpandable",c[c.Expandable=1]="Expandable",c[c.BusyExpanding=2]="BusyExpanding",c[c.Expanded=3]="Expanded"})(f=e.TestItemExpandState||(e.TestItemExpandState={}));var D;(function(c){c.serialize=t=>({controllerId:t.controllerId,expand:t.expand,parent:t.parent,item:n.serialize(t.item)}),c.deserialize=t=>({controllerId:t.controllerId,expand:t.expand,parent:t.parent,item:n.deserialize(t.item)})})(D=e.InternalTestItem||(e.InternalTestItem={}));var T;(function(c){c.serialize=t=>{let a;return t.item&&(a={},t.item.label!==void 0&&(a.label=t.item.label),t.item.tags!==void 0&&(a.tags=t.item.tags),t.item.busy!==void 0&&(a.busy=t.item.busy),t.item.uri!==void 0&&(a.uri=t.item.uri?.toJSON()),t.item.range!==void 0&&(a.range=t.item.range?.toJSON()),t.item.description!==void 0&&(a.description=t.item.description),t.item.error!==void 0&&(a.error=t.item.error),t.item.sortText!==void 0&&(a.sortText=t.item.sortText)),{extId:t.extId,expand:t.expand,item:a}},c.deserialize=t=>{let a;return t.item&&(a={},t.item.label!==void 0&&(a.label=t.item.label),t.item.tags!==void 0&&(a.tags=t.item.tags),t.item.busy!==void 0&&(a.busy=t.item.busy),t.item.range!==void 0&&(a.range=t.item.range?k.Range.lift(t.item.range):null),t.item.description!==void 0&&(a.description=t.item.description),t.item.error!==void 0&&(a.error=t.item.error),t.item.sortText!==void 0&&(a.sortText=t.item.sortText)),{extId:t.extId,expand:t.expand,item:a}}})(T=e.ITestItemUpdate||(e.ITestItemUpdate={}));const d=(c,t)=>{t.expand!==void 0&&(c.expand=t.expand),t.item!==void 0&&(c.item=c.item?Object.assign(c.item,t.item):t.item)};e.applyTestItemUpdate=d;var g;(function(c){c.serialize=(t,a)=>({...D.serialize(t),children:a,ownComputedState:t.ownComputedState,computedState:t.computedState,tasks:t.tasks.map(v.serialize)})})(g=e.TestResultItem||(e.TestResultItem={}));var b;(function(c){c[c.Function=0]="Function",c[c.Statement=1]="Statement"})(b=e.DetailType||(e.DetailType={}));var l;(function(c){c[c.Add=0]="Add",c[c.Update=1]="Update",c[c.Remove=2]="Remove",c[c.IncrementPendingExtHosts=3]="IncrementPendingExtHosts",c[c.Retire=4]="Retire",c[c.AddTag=5]="AddTag",c[c.RemoveTag=6]="RemoveTag"})(l=e.TestDiffOpType||(e.TestDiffOpType={}));var I;(function(c){c.deserialize=t=>t.op===0?{op:t.op,item:D.deserialize(t.item)}:t.op===1?{op:t.op,item:T.deserialize(t.item)}:t,c.serialize=t=>t.op===0?{op:t.op,item:D.serialize(t.item)}:t.op===1?{op:t.op,item:T.serialize(t.item)}:t})(I=e.TestsDiffOp||(e.TestsDiffOp={}));class r{add(t){}update(t){}remove(t,a){}complete(){}}e.IncrementalChangeCollector=r;class i{constructor(){this._tags=new Map,this.items=new Map,this.roots=new Set,this.busyControllerCount=0,this.pendingRootCount=0,this.tags=this._tags}apply(t){const a=this.createChangeCollector();for(const p of t)switch(p.op){case 0:{const h=D.deserialize(p.item);if(h.parent){if(this.items.has(h.parent)){const _=this.items.get(h.parent);_.children.add(h.item.extId);const P=this.createItem(h,_);this.items.set(h.item.extId,P),a.add(P)}}else{const _=this.createItem(h);this.roots.add(_),this.items.set(h.item.extId,_),a.add(_)}h.expand===2&&this.busyControllerCount++;break}case 1:{const h=T.deserialize(p.item),_=this.items.get(h.extId);if(!_)break;h.expand!==void 0&&(_.expand===2&&this.busyControllerCount--,h.expand===2&&this.busyControllerCount++),(0,e.applyTestItemUpdate)(_,h),a.update(_);break}case 2:{const h=this.items.get(p.itemId);if(!h)break;h.parent?this.items.get(h.parent).children.delete(h.item.extId):this.roots.delete(h);const _=[[p.itemId]];for(;_.length;)for(const P of _.pop()){const R=this.items.get(P);R&&(_.push(R.children),this.items.delete(P),a.remove(R,R!==h),R.expand===2&&this.busyControllerCount--)}break}case 4:this.retireTest(p.itemId);break;case 3:this.updatePendingRoots(p.amount);break;case 5:this._tags.set(p.tag.id,p.tag);break;case 6:this._tags.delete(p.id);break}a.complete()}retireTest(t){}updatePendingRoots(t){this.pendingRootCount+=t}createChangeCollector(){return new r}}e.AbstractIncrementalTestCollection=i}),define(Ee[63],we([1,0]),function(J,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TestId=e.TestPosition=e.TestIdPathParts=void 0;var o;(function(B){B.Delimiter="\0"})(o=e.TestIdPathParts||(e.TestIdPathParts={}));var k;(function(B){B[B.IsSame=0]="IsSame",B[B.Disconnected=1]="Disconnected",B[B.IsChild=2]="IsChild",B[B.IsParent=3]="IsParent"})(k=e.TestPosition||(e.TestPosition={}));class w{constructor(S,A=S.length){if(this.path=S,this.viewEnd=A,S.length===0||A<1)throw new Error("cannot create test with empty path")}static fromExtHostTestItem(S,A,y=S.parent){if(S.id===A)return new w([A]);let M=[S.id];for(let L=y;L&&L.id!==A;L=L.parent)M.push(L.id);return M.push(A),new w(M.reverse())}static isRoot(S){return!S.includes("\0")}static root(S){const A=S.indexOf("\0");return A===-1?S:S.slice(0,A)}static fromString(S){return new w(S.split("\0"))}static join(S,A){return new w([...S.path,A])}static joinToString(S,A){return S.toString()+"\0"+A}static compare(S,A){return S===A?0:A.startsWith(S+"\0")?2:S.startsWith(A+"\0")?3:1}get parentId(){return this.viewEnd>1?new w(this.path,this.viewEnd-1):this}get localId(){return this.path[this.viewEnd-1]}get controllerId(){return this.path[0]}get isRoot(){return this.viewEnd===1}*idsFromRoot(){for(let S=1;S<=this.viewEnd;S++)yield new w(this.path,S)}compare(S){if(typeof S=="string")return w.compare(this.toString(),S);for(let A=0;A<S.viewEnd&&A<this.viewEnd;A++)if(S.path[A]!==this.path[A])return 1;return S.viewEnd>this.viewEnd?2:S.viewEnd<this.viewEnd?3:0}toJSON(){return this.toString()}toString(){if(!this.stringifed){this.stringifed=this.path[0];for(let S=1;S<this.viewEnd;S++)this.stringifed+="\0",this.stringifed+=this.path[S]}return this.stringifed}}e.TestId=w}),define(Ee[166],we([1,0,17,86,11,26,23,73,133]),function(J,e,o,k,w,B,S,A,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractVariableResolverService=void 0;class M{constructor(v,u,m,s){this._contributedVariables=new Map,this._context=v,this._labelService=u,this._userHomePromise=m,s&&(this._envVariablesPromise=s.then(n=>this.prepareEnv(n)))}prepareEnv(v){if(S.isWindows){const u=Object.create(null);return Object.keys(v).forEach(m=>{u[m.toLowerCase()]=v[m]}),u}return v}resolveWithEnvironment(v,u,m){return this.recursiveResolve({env:this.prepareEnv(v)},u?u.uri:void 0,m)}async resolveAsync(v,u){const m={env:await this._envVariablesPromise,userHome:await this._userHomePromise};return this.recursiveResolve(m,v?v.uri:void 0,u)}async resolveAnyBase(v,u,m,s){const n=B.deepClone(u);S.isWindows&&n.windows?Object.keys(n.windows).forEach(D=>n[D]=n.windows[D]):S.isMacintosh&&n.osx?Object.keys(n.osx).forEach(D=>n[D]=n.osx[D]):S.isLinux&&n.linux&&Object.keys(n.linux).forEach(D=>n[D]=n.linux[D]),delete n.windows,delete n.osx,delete n.linux;const f={env:await this._envVariablesPromise,userHome:await this._userHomePromise};return this.recursiveResolve(f,v?v.uri:void 0,n,m,s)}async resolveAnyAsync(v,u,m){return this.resolveAnyBase(v,u,m)}async resolveAnyMap(v,u,m){const s=new Map;return{newConfig:await this.resolveAnyBase(v,u,m,s),resolvedVariables:s}}resolveWithInteractionReplace(v,u,m,s){throw new Error("resolveWithInteractionReplace not implemented.")}resolveWithInteraction(v,u,m,s){throw new Error("resolveWithInteraction not implemented.")}contributeVariable(v,u){if(this._contributedVariables.has(v))throw new Error("Variable "+v+" is contributed twice.");this._contributedVariables.set(v,u)}recursiveResolve(v,u,m,s,n){if(w.isString(m))return this.resolveString(v,u,m,s,n);if(w.isArray(m))return m.map(f=>this.recursiveResolve(v,u,f,s,n));if(w.isObject(m)){let f=Object.create(null);return Object.keys(m).forEach(D=>{const T=this.resolveString(v,u,D,s,n);f[T]=this.recursiveResolve(v,u,m[D],s,n)}),f}return m}resolveString(v,u,m,s,n){return m.replace(M.VARIABLE_REGEXP,(D,T)=>{if(T.includes(M.VARIABLE_LHS))return D;let d=this.evaluateSingleVariable(v,D,T,u,s);return n&&n.set(T,d),d!==D&&w.isString(d)&&d.match(M.VARIABLE_REGEXP)&&(d=this.resolveString(v,u,d,s,n)),d})}fsPath(v){return this._labelService?this._labelService.getUriLabel(v,{noPrefix:!0}):v.fsPath}evaluateSingleVariable(v,u,m,s,n){let f;const D=m.split(":");D.length>1&&(m=D[0],f=D[1]);const T=()=>{const b=this._context.getFilePath();if(b)return b;throw new Error((0,y.localize)(0,null,u))},d=()=>{const b=T();if(this._context.getWorkspaceFolderPathForFile){const l=this._context.getWorkspaceFolderPathForFile();if(l)return l}throw new Error((0,y.localize)(1,null,u,o.basename(b)))},g=()=>{if(f){const b=this._context.getFolderUri(f);if(b)return b;throw new Error((0,y.localize)(2,null,u,f))}if(s)return s;throw this._context.getWorkspaceFolderCount()>1?new Error((0,y.localize)(3,null,u)):new Error((0,y.localize)(4,null,u))};switch(m){case"env":if(f){if(v.env){const b=v.env[S.isWindows?f.toLowerCase():f];if(w.isString(b))return b}return""}throw new Error((0,y.localize)(5,null,u));case"config":if(f){const b=this._context.getConfigurationValue(s,f);if(w.isUndefinedOrNull(b))throw new Error((0,y.localize)(6,null,u,f));if(w.isObject(b))throw new Error((0,y.localize)(7,null,u,f));return b}throw new Error((0,y.localize)(8,null,u));case"command":return this.resolveFromMap(u,f,n,"command");case"input":return this.resolveFromMap(u,f,n,"input");default:switch(m){case"workspaceRoot":case"workspaceFolder":return(0,A.normalizeDriveLetter)(this.fsPath(g()));case"cwd":return s||f?(0,A.normalizeDriveLetter)(this.fsPath(g())):k.cwd();case"workspaceRootFolderName":case"workspaceFolderBasename":return o.basename(this.fsPath(g()));case"userHome":{if(v.userHome)return v.userHome;throw new Error((0,y.localize)(9,null,u))}case"lineNumber":{const b=this._context.getLineNumber();if(b)return b;throw new Error((0,y.localize)(10,null,u))}case"selectedText":{const b=this._context.getSelectedText();if(b)return b;throw new Error((0,y.localize)(11,null,u))}case"file":return T();case"fileWorkspaceFolder":return d();case"relativeFile":return s||f?o.relative(this.fsPath(g()),T()):T();case"relativeFileDirname":{const b=o.dirname(T());if(s||f){const l=o.relative(this.fsPath(g()),b);return l.length===0?".":l}return b}case"fileDirname":return o.dirname(T());case"fileExtname":return o.extname(T());case"fileBasename":return o.basename(T());case"fileBasenameNoExtension":{const b=o.basename(T());return b.slice(0,b.length-o.extname(b).length)}case"fileDirnameBasename":return o.basename(o.dirname(T()));case"execPath":{const b=this._context.getExecPath();return b||u}case"execInstallFolder":{const b=this._context.getAppRoot();return b||u}case"pathSeparator":return o.sep;default:try{const b=f?`${m}:${f}`:m;return this.resolveFromMap(u,b,n,void 0)}catch{return u}}}}resolveFromMap(v,u,m,s){if(u&&m){const n=s===void 0?m[u]:m[s+":"+u];if(typeof n=="string")return n;throw new Error((0,y.localize)(12,null,v))}return v}}e.AbstractVariableResolverService=M,M.VARIABLE_LHS="${",M.VARIABLE_REGEXP=/\$\{(.*?)\}/g}),define(Ee[87],we([1,0,3,156]),function(J,e,o,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.preferredSideBySideGroupDirection=e.isEditorGroup=e.OpenEditorContext=e.GroupsOrder=e.isEditorReplacement=e.MergeGroupMode=e.GroupsArrangement=e.GroupLocation=e.GroupOrientation=e.GroupDirection=e.IEditorGroupsService=void 0,e.IEditorGroupsService=(0,o.createDecorator)("editorGroupsService");var w;(function(s){s[s.UP=0]="UP",s[s.DOWN=1]="DOWN",s[s.LEFT=2]="LEFT",s[s.RIGHT=3]="RIGHT"})(w=e.GroupDirection||(e.GroupDirection={}));var B;(function(s){s[s.HORIZONTAL=0]="HORIZONTAL",s[s.VERTICAL=1]="VERTICAL"})(B=e.GroupOrientation||(e.GroupOrientation={}));var S;(function(s){s[s.FIRST=0]="FIRST",s[s.LAST=1]="LAST",s[s.NEXT=2]="NEXT",s[s.PREVIOUS=3]="PREVIOUS"})(S=e.GroupLocation||(e.GroupLocation={}));var A;(function(s){s[s.MINIMIZE_OTHERS=0]="MINIMIZE_OTHERS",s[s.EVEN=1]="EVEN",s[s.TOGGLE=2]="TOGGLE"})(A=e.GroupsArrangement||(e.GroupsArrangement={}));var y;(function(s){s[s.COPY_EDITORS=0]="COPY_EDITORS",s[s.MOVE_EDITORS=1]="MOVE_EDITORS"})(y=e.MergeGroupMode||(e.MergeGroupMode={}));function M(s){const n=s;return(0,k.isEditorInput)(n?.editor)&&(0,k.isEditorInput)(n?.replacement)}e.isEditorReplacement=M;var L;(function(s){s[s.CREATION_TIME=0]="CREATION_TIME",s[s.MOST_RECENTLY_ACTIVE=1]="MOST_RECENTLY_ACTIVE",s[s.GRID_APPEARANCE=2]="GRID_APPEARANCE"})(L=e.GroupsOrder||(e.GroupsOrder={}));var v;(function(s){s[s.NEW_EDITOR=1]="NEW_EDITOR",s[s.MOVE_EDITOR=2]="MOVE_EDITOR",s[s.COPY_EDITOR=3]="COPY_EDITOR"})(v=e.OpenEditorContext||(e.OpenEditorContext={}));function u(s){const n=s;return!!n&&typeof n.id=="number"&&Array.isArray(n.editors)}e.isEditorGroup=u;function m(s){return s.getValue("workbench.editor.openSideBySideDirection")==="down"?1:3}e.preferredSideBySideGroupDirection=m}),define(Ee[167],we([1,0,3,87]),function(J,e,o,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isPreferredGroup=e.SIDE_GROUP=e.ACTIVE_GROUP=e.IEditorService=void 0,e.IEditorService=(0,o.createDecorator)("editorService"),e.ACTIVE_GROUP=-1,e.SIDE_GROUP=-2;function w(B){const S=B;return typeof B=="number"||(0,k.isEditorGroup)(S)}e.isPreferredGroup=w}),define(Ee[8],we([1,0,16,21,72,101,54,26,11,2,48,88,135,78,47,85,62,63,167,7]),function(J,e,o,k,w,B,S,A,y,M,L,v,u,m,s,n,f,D,T,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TypeHierarchyItem=e.CodeActionTriggerKind=e.TestCoverage=e.TestResults=e.TestItem=e.TestTag=e.TestMessage=e.NotebookRendererScript=e.NotebookDocumentContentOptions=e.NotebookStatusBarItem=e.NotebookDecorationRenderOptions=e.NotebookExclusiveDocumentPattern=e.NotebookCellOutput=e.NotebookCellOutputItem=e.NotebookCellData=e.NotebookData=e.NotebookCellKind=e.NotebookCellExecutionState=e.NotebookCellExecutionSummary=e.NotebookRange=e.LanguageSelector=e.GlobPattern=e.TextEditorOpenOptions=e.FoldingRangeKind=e.FoldingRange=e.ProgressLocation=e.EndOfLine=e.TextEditorLineNumbersStyle=e.TextDocumentSaveReason=e.SelectionRange=e.Color=e.ColorPresentation=e.DocumentLink=e.InlayHintKind=e.InlayHintLabelPart=e.InlayHint=e.SignatureHelp=e.SignatureInformation=e.ParameterInformation=e.CompletionItem=e.CompletionItemKind=e.CompletionItemTag=e.CompletionContext=e.CompletionTriggerKind=e.DocumentHighlight=e.InlineValueContext=e.InlineValue=e.EvaluatableExpression=e.Hover=e.DefinitionLink=e.location=e.CallHierarchyOutgoingCall=e.CallHierarchyIncomingCall=e.CallHierarchyItem=e.DocumentSymbol=e.WorkspaceSymbol=e.SymbolTag=e.SymbolKind=e.WorkspaceEdit=e.TextEdit=e.DecorationRenderOptions=e.DecorationRangeBehavior=e.ThemableDecorationRenderOptions=e.ThemableDecorationAttachmentRenderOptions=e.pathOrURIToURI=e.fromRangeOrRangeWithMessage=e.MarkdownString=e.isDecorationOptionsArr=e.ViewColumn=e.DiagnosticSeverity=e.DiagnosticRelatedInformation=e.Diagnostic=e.DiagnosticTag=e.DocumentSelector=e.Position=e.TokenType=e.Range=e.Selection=void 0;var g;(function(he){function pe(q){const{selectionStartLineNumber:_e,selectionStartColumn:Ce,positionLineNumber:$e,positionColumn:Ve}=q,lt=new d.Position(_e-1,Ce-1),gt=new d.Position($e-1,Ve-1);return new d.Selection(lt,gt)}he.to=pe;function oe(q){const{anchor:_e,active:Ce}=q;return{selectionStartLineNumber:_e.line+1,selectionStartColumn:_e.character+1,positionLineNumber:Ce.line+1,positionColumn:Ce.character+1}}he.from=oe})(g=e.Selection||(e.Selection={}));var b;(function(he){function pe(q){if(!q)return;const{start:_e,end:Ce}=q;return{startLineNumber:_e.line+1,startColumn:_e.character+1,endLineNumber:Ce.line+1,endColumn:Ce.character+1}}he.from=pe;function oe(q){if(!q)return;const{startLineNumber:_e,startColumn:Ce,endLineNumber:$e,endColumn:Ve}=q;return new d.Range(_e-1,Ce-1,$e-1,Ve-1)}he.to=oe})(b=e.Range||(e.Range={}));var l;(function(he){function pe(oe){switch(oe){case 1:return d.StandardTokenType.Comment;case 0:return d.StandardTokenType.Other;case 3:return d.StandardTokenType.RegEx;case 2:return d.StandardTokenType.String}}he.to=pe})(l=e.TokenType||(e.TokenType={}));var I;(function(he){function pe(q){return new d.Position(q.lineNumber-1,q.column-1)}he.to=pe;function oe(q){return{lineNumber:q.line+1,column:q.character+1}}he.from=oe})(I=e.Position||(e.Position={}));var r;(function(he){function pe(_e,Ce){return(0,o.coalesce)((0,o.asArray)(_e).map($e=>oe($e,Ce)))}he.from=pe;function oe(_e,Ce){if(typeof _e=="string")return{$serialized:!0,language:_e};if(_e)return{$serialized:!0,language:_e.language,scheme:q(_e.scheme,Ce),pattern:le.from(_e.pattern)??void 0,exclusive:_e.exclusive,notebookType:_e.notebookType}}function q(_e,Ce){return Ce&&typeof _e=="string"?Ce.transformOutgoingScheme(_e):_e}})(r=e.DocumentSelector||(e.DocumentSelector={}));var i;(function(he){function pe(q){switch(q){case d.DiagnosticTag.Unnecessary:return 1;case d.DiagnosticTag.Deprecated:return 2}}he.from=pe;function oe(q){switch(q){case 1:return d.DiagnosticTag.Unnecessary;case 2:return d.DiagnosticTag.Deprecated;default:return}}he.to=oe})(i=e.DiagnosticTag||(e.DiagnosticTag={}));var c;(function(he){function pe(q){let _e;return q.code&&((0,y.isString)(q.code)||(0,y.isNumber)(q.code)?_e=String(q.code):_e={value:String(q.code.value),target:q.code.target}),{...b.from(q.range),message:q.message,source:q.source,code:_e,severity:a.from(q.severity),relatedInformation:q.relatedInformation&&q.relatedInformation.map(t.from),tags:Array.isArray(q.tags)?(0,o.coalesce)(q.tags.map(i.from)):void 0}}he.from=pe;function oe(q){const _e=new d.Diagnostic(b.to(q),q.message,a.to(q.severity));return _e.source=q.source,_e.code=(0,y.isString)(q.code)?q.code:q.code?.value,_e.relatedInformation=q.relatedInformation&&q.relatedInformation.map(t.to),_e.tags=q.tags&&(0,o.coalesce)(q.tags.map(i.to)),_e}he.to=oe})(c=e.Diagnostic||(e.Diagnostic={}));var t;(function(he){function pe(q){return{...b.from(q.location.range),message:q.message,resource:q.location.uri}}he.from=pe;function oe(q){return new d.DiagnosticRelatedInformation(new d.Location(q.resource,b.to(q)),q.message)}he.to=oe})(t=e.DiagnosticRelatedInformation||(e.DiagnosticRelatedInformation={}));var a;(function(he){function pe(q){switch(q){case d.DiagnosticSeverity.Error:return m.MarkerSeverity.Error;case d.DiagnosticSeverity.Warning:return m.MarkerSeverity.Warning;case d.DiagnosticSeverity.Information:return m.MarkerSeverity.Info;case d.DiagnosticSeverity.Hint:return m.MarkerSeverity.Hint}return m.MarkerSeverity.Error}he.from=pe;function oe(q){switch(q){case m.MarkerSeverity.Info:return d.DiagnosticSeverity.Information;case m.MarkerSeverity.Warning:return d.DiagnosticSeverity.Warning;case m.MarkerSeverity.Error:return d.DiagnosticSeverity.Error;case m.MarkerSeverity.Hint:return d.DiagnosticSeverity.Hint;default:return d.DiagnosticSeverity.Error}}he.to=oe})(a=e.DiagnosticSeverity||(e.DiagnosticSeverity={}));var p;(function(he){function pe(q){return typeof q=="number"&&q>=d.ViewColumn.One?q-1:q===d.ViewColumn.Beside?T.SIDE_GROUP:T.ACTIVE_GROUP}he.from=pe;function oe(q){if(typeof q=="number"&&q>=0)return q+1;throw new Error("invalid 'EditorGroupColumn'")}he.to=oe})(p=e.ViewColumn||(e.ViewColumn={}));function h(he){return typeof he.range!="undefined"}function _(he){return he.length===0?!0:!!h(he[0])}e.isDecorationOptionsArr=_;var P;(function(he){function pe(Ve){return Ve.map(he.from)}he.fromMany=pe;function oe(Ve){return Ve&&typeof Ve=="object"&&typeof Ve.language=="string"&&typeof Ve.value=="string"}function q(Ve){let lt;if(oe(Ve)){const{language:at,value:ot}=Ve;lt={value:"```"+at+`
`+ot+"\n```\n"}}else d.MarkdownString.isMarkdownString(Ve)?lt={value:Ve.value,isTrusted:Ve.isTrusted,supportThemeIcons:Ve.supportThemeIcons,supportHtml:Ve.supportHtml,baseUri:Ve.baseUri}:typeof Ve=="string"?lt={value:Ve}:lt={value:""};const gt=Object.create(null);lt.uris=gt;const Et=at=>{try{let ot=M.URI.parse(at,!0);ot=ot.with({query:_e(ot.query,gt)}),gt[at]=ot}catch{}return""},rt=new B.marked.Renderer;return rt.link=Et,rt.image=at=>typeof at=="string"?Et(w.parseHrefAndDimensions(at).href):"",(0,B.marked)(lt.value,{renderer:rt}),lt}he.from=q;function _e(Ve,lt){if(!Ve)return Ve;let gt;try{gt=(0,S.parse)(Ve)}catch{}if(!gt)return Ve;let Et=!1;return gt=(0,A.cloneAndChange)(gt,rt=>{if(M.URI.isUri(rt)){const at=`__uri_${Math.random().toString(16).slice(2,8)}`;return lt[at]=rt,Et=!0,at}else return}),Et?JSON.stringify(gt):Ve}function Ce(Ve){const lt=new d.MarkdownString(Ve.value,Ve.supportThemeIcons);return lt.isTrusted=Ve.isTrusted,lt.supportHtml=Ve.supportHtml,lt.baseUri=Ve.baseUri?M.URI.from(Ve.baseUri):void 0,lt}he.to=Ce;function $e(Ve){if(!!Ve)return typeof Ve=="string"?Ve:he.from(Ve)}he.fromStrict=$e})(P=e.MarkdownString||(e.MarkdownString={}));function R(he){return _(he)?he.map(pe=>({range:b.from(pe.range),hoverMessage:Array.isArray(pe.hoverMessage)?P.fromMany(pe.hoverMessage):pe.hoverMessage?P.from(pe.hoverMessage):void 0,renderOptions:pe.renderOptions})):he.map(pe=>({range:b.from(pe)}))}e.fromRangeOrRangeWithMessage=R;function $(he){return typeof he=="undefined"?he:typeof he=="string"?M.URI.file(he):he}e.pathOrURIToURI=$;var E;(function(he){function pe(oe){return typeof oe=="undefined"?oe:{contentText:oe.contentText,contentIconPath:oe.contentIconPath?$(oe.contentIconPath):void 0,border:oe.border,borderColor:oe.borderColor,fontStyle:oe.fontStyle,fontWeight:oe.fontWeight,textDecoration:oe.textDecoration,color:oe.color,backgroundColor:oe.backgroundColor,margin:oe.margin,width:oe.width,height:oe.height}}he.from=pe})(E=e.ThemableDecorationAttachmentRenderOptions||(e.ThemableDecorationAttachmentRenderOptions={}));var z;(function(he){function pe(oe){return typeof oe=="undefined"?oe:{backgroundColor:oe.backgroundColor,outline:oe.outline,outlineColor:oe.outlineColor,outlineStyle:oe.outlineStyle,outlineWidth:oe.outlineWidth,border:oe.border,borderColor:oe.borderColor,borderRadius:oe.borderRadius,borderSpacing:oe.borderSpacing,borderStyle:oe.borderStyle,borderWidth:oe.borderWidth,fontStyle:oe.fontStyle,fontWeight:oe.fontWeight,textDecoration:oe.textDecoration,cursor:oe.cursor,color:oe.color,opacity:oe.opacity,letterSpacing:oe.letterSpacing,gutterIconPath:oe.gutterIconPath?$(oe.gutterIconPath):void 0,gutterIconSize:oe.gutterIconSize,overviewRulerColor:oe.overviewRulerColor,before:oe.before?E.from(oe.before):void 0,after:oe.after?E.from(oe.after):void 0}}he.from=pe})(z=e.ThemableDecorationRenderOptions||(e.ThemableDecorationRenderOptions={}));var V;(function(he){function pe(oe){if(typeof oe=="undefined")return oe;switch(oe){case d.DecorationRangeBehavior.OpenOpen:return 0;case d.DecorationRangeBehavior.ClosedClosed:return 1;case d.DecorationRangeBehavior.OpenClosed:return 2;case d.DecorationRangeBehavior.ClosedOpen:return 3}}he.from=pe})(V=e.DecorationRangeBehavior||(e.DecorationRangeBehavior={}));var W;(function(he){function pe(oe){return{isWholeLine:oe.isWholeLine,rangeBehavior:oe.rangeBehavior?V.from(oe.rangeBehavior):void 0,overviewRulerLane:oe.overviewRulerLane,light:oe.light?z.from(oe.light):void 0,dark:oe.dark?z.from(oe.dark):void 0,backgroundColor:oe.backgroundColor,outline:oe.outline,outlineColor:oe.outlineColor,outlineStyle:oe.outlineStyle,outlineWidth:oe.outlineWidth,border:oe.border,borderColor:oe.borderColor,borderRadius:oe.borderRadius,borderSpacing:oe.borderSpacing,borderStyle:oe.borderStyle,borderWidth:oe.borderWidth,fontStyle:oe.fontStyle,fontWeight:oe.fontWeight,textDecoration:oe.textDecoration,cursor:oe.cursor,color:oe.color,opacity:oe.opacity,letterSpacing:oe.letterSpacing,gutterIconPath:oe.gutterIconPath?$(oe.gutterIconPath):void 0,gutterIconSize:oe.gutterIconSize,overviewRulerColor:oe.overviewRulerColor,before:oe.before?E.from(oe.before):void 0,after:oe.after?E.from(oe.after):void 0}}he.from=pe})(W=e.DecorationRenderOptions||(e.DecorationRenderOptions={}));var Q;(function(he){function pe(q){return{text:q.newText,eol:q.newEol&&tt.from(q.newEol),range:b.from(q.range)}}he.from=pe;function oe(q){const _e=new d.TextEdit(b.to(q.range),q.text);return _e.newEol=typeof q.eol=="undefined"?void 0:tt.to(q.eol),_e}he.to=oe})(Q=e.TextEdit||(e.TextEdit={}));var K;(function(he){function pe(q,_e){const Ce={edits:[]};if(q instanceof d.WorkspaceEdit)for(let $e of q._allEntries())$e._type===1?Ce.edits.push({_type:1,oldUri:$e.from,newUri:$e.to,options:$e.options,metadata:$e.metadata}):$e._type===2?Ce.edits.push({_type:2,resource:$e.uri,edit:Q.from($e.edit),modelVersionId:_e?.getTextDocumentVersion($e.uri),metadata:$e.metadata}):$e._type===3?Ce.edits.push({_type:3,metadata:$e.metadata,resource:$e.uri,edit:$e.edit,notebookMetadata:$e.notebookMetadata,notebookVersionId:_e?.getNotebookDocumentVersion($e.uri)}):$e._type===5&&Ce.edits.push({_type:3,metadata:$e.metadata,resource:$e.uri,notebookVersionId:_e?.getNotebookDocumentVersion($e.uri),edit:{editType:1,index:$e.index,count:$e.count,cells:$e.cells.map(St.from)}});return Ce}he.from=pe;function oe(q){const _e=new d.WorkspaceEdit;for(const Ce of q.edits)Ce.edit?_e.replace(M.URI.revive(Ce.resource),b.to(Ce.edit.range),Ce.edit.text):_e.renameFile(M.URI.revive(Ce.oldUri),M.URI.revive(Ce.newUri),Ce.options);return _e}he.to=oe})(K=e.WorkspaceEdit||(e.WorkspaceEdit={}));var H;(function(he){const pe=Object.create(null);pe[d.SymbolKind.File]=0,pe[d.SymbolKind.Module]=1,pe[d.SymbolKind.Namespace]=2,pe[d.SymbolKind.Package]=3,pe[d.SymbolKind.Class]=4,pe[d.SymbolKind.Method]=5,pe[d.SymbolKind.Property]=6,pe[d.SymbolKind.Field]=7,pe[d.SymbolKind.Constructor]=8,pe[d.SymbolKind.Enum]=9,pe[d.SymbolKind.Interface]=10,pe[d.SymbolKind.Function]=11,pe[d.SymbolKind.Variable]=12,pe[d.SymbolKind.Constant]=13,pe[d.SymbolKind.String]=14,pe[d.SymbolKind.Number]=15,pe[d.SymbolKind.Boolean]=16,pe[d.SymbolKind.Array]=17,pe[d.SymbolKind.Object]=18,pe[d.SymbolKind.Key]=19,pe[d.SymbolKind.Null]=20,pe[d.SymbolKind.EnumMember]=21,pe[d.SymbolKind.Struct]=22,pe[d.SymbolKind.Event]=23,pe[d.SymbolKind.Operator]=24,pe[d.SymbolKind.TypeParameter]=25;function oe(_e){return typeof pe[_e]=="number"?pe[_e]:6}he.from=oe;function q(_e){for(const Ce in pe)if(pe[Ce]===_e)return Number(Ce);return d.SymbolKind.Property}he.to=q})(H=e.SymbolKind||(e.SymbolKind={}));var te;(function(he){function pe(q){switch(q){case d.SymbolTag.Deprecated:return 1}}he.from=pe;function oe(q){switch(q){case 1:return d.SymbolTag.Deprecated}}he.to=oe})(te=e.SymbolTag||(e.SymbolTag={}));var ae;(function(he){function pe(q){return{name:q.name,kind:H.from(q.kind),tags:q.tags&&q.tags.map(te.from),containerName:q.containerName,location:fe.from(q.location)}}he.from=pe;function oe(q){const _e=new d.SymbolInformation(q.name,H.to(q.kind),q.containerName,fe.to(q.location));return _e.tags=q.tags&&q.tags.map(te.to),_e}he.to=oe})(ae=e.WorkspaceSymbol||(e.WorkspaceSymbol={}));var ee;(function(he){function pe(q){const _e={name:q.name||"!!MISSING: name!!",detail:q.detail,range:b.from(q.range),selectionRange:b.from(q.selectionRange),kind:H.from(q.kind),tags:q.tags?.map(te.from)??[]};return q.children&&(_e.children=q.children.map(pe)),_e}he.from=pe;function oe(q){const _e=new d.DocumentSymbol(q.name,q.detail,H.to(q.kind),b.to(q.range),b.to(q.selectionRange));return(0,o.isNonEmptyArray)(q.tags)&&(_e.tags=q.tags.map(te.to)),q.children&&(_e.children=q.children.map(oe)),_e}he.to=oe})(ee=e.DocumentSymbol||(e.DocumentSymbol={}));var ce;(function(he){function pe(q){const _e=new d.CallHierarchyItem(H.to(q.kind),q.name,q.detail||"",M.URI.revive(q.uri),b.to(q.range),b.to(q.selectionRange));return _e._sessionId=q._sessionId,_e._itemId=q._itemId,_e}he.to=pe;function oe(q,_e,Ce){if(_e=_e??q._sessionId,Ce=Ce??q._itemId,_e===void 0||Ce===void 0)throw new Error("invalid item");return{_sessionId:_e,_itemId:Ce,name:q.name,detail:q.detail,kind:H.from(q.kind),uri:q.uri,range:b.from(q.range),selectionRange:b.from(q.selectionRange),tags:q.tags?.map(te.from)}}he.from=oe})(ce=e.CallHierarchyItem||(e.CallHierarchyItem={}));var de;(function(he){function pe(oe){return new d.CallHierarchyIncomingCall(ce.to(oe.from),oe.fromRanges.map(q=>b.to(q)))}he.to=pe})(de=e.CallHierarchyIncomingCall||(e.CallHierarchyIncomingCall={}));var Se;(function(he){function pe(oe){return new d.CallHierarchyOutgoingCall(ce.to(oe.to),oe.fromRanges.map(q=>b.to(q)))}he.to=pe})(Se=e.CallHierarchyOutgoingCall||(e.CallHierarchyOutgoingCall={}));var fe;(function(he){function pe(q){return{range:q.range&&b.from(q.range),uri:q.uri}}he.from=pe;function oe(q){return new d.Location(M.URI.revive(q.uri),b.to(q.range))}he.to=oe})(fe=e.location||(e.location={}));var ne;(function(he){function pe(q){const _e=q,Ce=q;return{originSelectionRange:_e.originSelectionRange?b.from(_e.originSelectionRange):void 0,uri:_e.targetUri?_e.targetUri:Ce.uri,range:b.from(_e.targetRange?_e.targetRange:Ce.range),targetSelectionRange:_e.targetSelectionRange?b.from(_e.targetSelectionRange):void 0}}he.from=pe;function oe(q){return{targetUri:M.URI.revive(q.uri),targetRange:b.to(q.range),targetSelectionRange:q.targetSelectionRange?b.to(q.targetSelectionRange):void 0,originSelectionRange:q.originSelectionRange?b.to(q.originSelectionRange):void 0}}he.to=oe})(ne=e.DefinitionLink||(e.DefinitionLink={}));var me;(function(he){function pe(q){return{range:b.from(q.range),contents:P.fromMany(q.contents)}}he.from=pe;function oe(q){return new d.Hover(q.contents.map(P.to),b.to(q.range))}he.to=oe})(me=e.Hover||(e.Hover={}));var ke;(function(he){function pe(q){return{range:b.from(q.range),expression:q.expression}}he.from=pe;function oe(q){return new d.EvaluatableExpression(b.to(q.range),q.expression)}he.to=oe})(ke=e.EvaluatableExpression||(e.EvaluatableExpression={}));var Ae;(function(he){function pe(q){if(q instanceof d.InlineValueText)return{type:"text",range:b.from(q.range),text:q.text};if(q instanceof d.InlineValueVariableLookup)return{type:"variable",range:b.from(q.range),variableName:q.variableName,caseSensitiveLookup:q.caseSensitiveLookup};if(q instanceof d.InlineValueEvaluatableExpression)return{type:"expression",range:b.from(q.range),expression:q.expression};throw new Error("Unknown 'InlineValue' type")}he.from=pe;function oe(q){switch(q.type){case"text":return{range:b.to(q.range),text:q.text};case"variable":return{range:b.to(q.range),variableName:q.variableName,caseSensitiveLookup:q.caseSensitiveLookup};case"expression":return{range:b.to(q.range),expression:q.expression}}}he.to=oe})(Ae=e.InlineValue||(e.InlineValue={}));var Be;(function(he){function pe(q){return{frameId:q.frameId,stoppedLocation:b.from(q.stoppedLocation)}}he.from=pe;function oe(q){return new d.InlineValueContext(q.frameId,b.to(q.stoppedLocation))}he.to=oe})(Be=e.InlineValueContext||(e.InlineValueContext={}));var Xe;(function(he){function pe(q){return{range:b.from(q.range),kind:q.kind}}he.from=pe;function oe(q){return new d.DocumentHighlight(b.to(q.range),q.kind)}he.to=oe})(Xe=e.DocumentHighlight||(e.DocumentHighlight={}));var ge;(function(he){function pe(oe){switch(oe){case 1:return d.CompletionTriggerKind.TriggerCharacter;case 2:return d.CompletionTriggerKind.TriggerForIncompleteCompletions;case 0:default:return d.CompletionTriggerKind.Invoke}}he.to=pe})(ge=e.CompletionTriggerKind||(e.CompletionTriggerKind={}));var ue;(function(he){function pe(oe){return{triggerKind:ge.to(oe.triggerKind),triggerCharacter:oe.triggerCharacter}}he.to=pe})(ue=e.CompletionContext||(e.CompletionContext={}));var N;(function(he){function pe(q){switch(q){case d.CompletionItemTag.Deprecated:return 1}}he.from=pe;function oe(q){switch(q){case 1:return d.CompletionItemTag.Deprecated}}he.to=oe})(N=e.CompletionItemTag||(e.CompletionItemTag={}));var F;(function(he){const pe=new Map([[d.CompletionItemKind.Method,0],[d.CompletionItemKind.Function,1],[d.CompletionItemKind.Constructor,2],[d.CompletionItemKind.Field,3],[d.CompletionItemKind.Variable,4],[d.CompletionItemKind.Class,5],[d.CompletionItemKind.Interface,7],[d.CompletionItemKind.Struct,6],[d.CompletionItemKind.Module,8],[d.CompletionItemKind.Property,9],[d.CompletionItemKind.Unit,12],[d.CompletionItemKind.Value,13],[d.CompletionItemKind.Constant,14],[d.CompletionItemKind.Enum,15],[d.CompletionItemKind.EnumMember,16],[d.CompletionItemKind.Keyword,17],[d.CompletionItemKind.Snippet,27],[d.CompletionItemKind.Text,18],[d.CompletionItemKind.Color,19],[d.CompletionItemKind.File,20],[d.CompletionItemKind.Reference,21],[d.CompletionItemKind.Folder,23],[d.CompletionItemKind.Event,10],[d.CompletionItemKind.Operator,11],[d.CompletionItemKind.TypeParameter,24],[d.CompletionItemKind.Issue,26],[d.CompletionItemKind.User,25]]);function oe(Ce){return pe.get(Ce)??9}he.from=oe;const q=new Map([[0,d.CompletionItemKind.Method],[1,d.CompletionItemKind.Function],[2,d.CompletionItemKind.Constructor],[3,d.CompletionItemKind.Field],[4,d.CompletionItemKind.Variable],[5,d.CompletionItemKind.Class],[7,d.CompletionItemKind.Interface],[6,d.CompletionItemKind.Struct],[8,d.CompletionItemKind.Module],[9,d.CompletionItemKind.Property],[12,d.CompletionItemKind.Unit],[13,d.CompletionItemKind.Value],[14,d.CompletionItemKind.Constant],[15,d.CompletionItemKind.Enum],[16,d.CompletionItemKind.EnumMember],[17,d.CompletionItemKind.Keyword],[27,d.CompletionItemKind.Snippet],[18,d.CompletionItemKind.Text],[19,d.CompletionItemKind.Color],[20,d.CompletionItemKind.File],[21,d.CompletionItemKind.Reference],[23,d.CompletionItemKind.Folder],[10,d.CompletionItemKind.Event],[11,d.CompletionItemKind.Operator],[24,d.CompletionItemKind.TypeParameter],[25,d.CompletionItemKind.User],[26,d.CompletionItemKind.Issue]]);function _e(Ce){return q.get(Ce)??d.CompletionItemKind.Property}he.to=_e})(F=e.CompletionItemKind||(e.CompletionItemKind={}));var C;(function(he){function pe(oe,q){const _e=new d.CompletionItem(oe.label);return _e.insertText=oe.insertText,_e.kind=F.to(oe.kind),_e.tags=oe.tags?.map(N.to),_e.detail=oe.detail,_e.documentation=w.isMarkdownString(oe.documentation)?P.to(oe.documentation):oe.documentation,_e.sortText=oe.sortText,_e.filterText=oe.filterText,_e.preselect=oe.preselect,_e.commitCharacters=oe.commitCharacters,L.Range.isIRange(oe.range)?_e.range=b.to(oe.range):typeof oe.range=="object"&&(_e.range={inserting:b.to(oe.range.insert),replacing:b.to(oe.range.replace)}),_e.keepWhitespace=typeof oe.insertTextRules=="undefined"?!1:Boolean(oe.insertTextRules&1),typeof oe.insertTextRules!="undefined"&&oe.insertTextRules&4?_e.insertText=new d.SnippetString(oe.insertText):(_e.insertText=oe.insertText,_e.textEdit=_e.range instanceof d.Range?new d.TextEdit(_e.range,_e.insertText):void 0),oe.additionalTextEdits&&oe.additionalTextEdits.length>0&&(_e.additionalTextEdits=oe.additionalTextEdits.map(Ce=>Q.to(Ce))),_e.command=q&&oe.command?q.fromInternal(oe.command):void 0,_e}he.to=pe})(C=e.CompletionItem||(e.CompletionItem={}));var O;(function(he){function pe(q){return{label:q.label,documentation:P.fromStrict(q.documentation)}}he.from=pe;function oe(q){return{label:q.label,documentation:w.isMarkdownString(q.documentation)?P.to(q.documentation):q.documentation}}he.to=oe})(O=e.ParameterInformation||(e.ParameterInformation={}));var x;(function(he){function pe(q){return{label:q.label,documentation:P.fromStrict(q.documentation),parameters:Array.isArray(q.parameters)?q.parameters.map(O.from):[],activeParameter:q.activeParameter}}he.from=pe;function oe(q){return{label:q.label,documentation:w.isMarkdownString(q.documentation)?P.to(q.documentation):q.documentation,parameters:Array.isArray(q.parameters)?q.parameters.map(O.to):[],activeParameter:q.activeParameter}}he.to=oe})(x=e.SignatureInformation||(e.SignatureInformation={}));var X;(function(he){function pe(q){return{activeSignature:q.activeSignature,activeParameter:q.activeParameter,signatures:Array.isArray(q.signatures)?q.signatures.map(x.from):[]}}he.from=pe;function oe(q){return{activeSignature:q.activeSignature,activeParameter:q.activeParameter,signatures:Array.isArray(q.signatures)?q.signatures.map(x.to):[]}}he.to=oe})(X=e.SignatureHelp||(e.SignatureHelp={}));var re;(function(he){function pe(oe,q){const _e=new d.InlayHint(I.to(q.position),typeof q.label=="string"?q.label:q.label.map(ve.to.bind(void 0,oe)),q.kind&&Ie.to(q.kind));return _e.tooltip=w.isMarkdownString(q.tooltip)?P.to(q.tooltip):q.tooltip,_e.paddingLeft=q.paddingLeft,_e.paddingRight=q.paddingRight,_e}he.to=pe})(re=e.InlayHint||(e.InlayHint={}));var ve;(function(he){function pe(oe,q){const _e=new d.InlayHintLabelPart(q.label);return _e.tooltip=w.isMarkdownString(q.tooltip)?P.to(q.tooltip):q.tooltip,v.Command.is(q.command)&&(_e.command=oe.fromInternal(q.command)),q.location&&(_e.location=fe.to(q.location)),_e}he.to=pe})(ve=e.InlayHintLabelPart||(e.InlayHintLabelPart={}));var Ie;(function(he){function pe(q){return q}he.from=pe;function oe(q){return q}he.to=oe})(Ie=e.InlayHintKind||(e.InlayHintKind={}));var Me;(function(he){function pe(q){return{range:b.from(q.range),url:q.target,tooltip:q.tooltip}}he.from=pe;function oe(q){let _e;if(q.url)try{_e=typeof q.url=="string"?M.URI.parse(q.url,!0):M.URI.revive(q.url)}catch{}return new d.DocumentLink(b.to(q.range),_e)}he.to=oe})(Me=e.DocumentLink||(e.DocumentLink={}));var Le;(function(he){function pe(q){const _e=new d.ColorPresentation(q.label);return q.textEdit&&(_e.textEdit=Q.to(q.textEdit)),q.additionalTextEdits&&(_e.additionalTextEdits=q.additionalTextEdits.map(Ce=>Q.to(Ce))),_e}he.to=pe;function oe(q){return{label:q.label,textEdit:q.textEdit?Q.from(q.textEdit):void 0,additionalTextEdits:q.additionalTextEdits?q.additionalTextEdits.map(_e=>Q.from(_e)):void 0}}he.from=oe})(Le=e.ColorPresentation||(e.ColorPresentation={}));var ze;(function(he){function pe(q){return new d.Color(q[0],q[1],q[2],q[3])}he.to=pe;function oe(q){return[q.red,q.green,q.blue,q.alpha]}he.from=oe})(ze=e.Color||(e.Color={}));var xe;(function(he){function pe(q){return{range:b.from(q.range)}}he.from=pe;function oe(q){return new d.SelectionRange(b.to(q.range))}he.to=oe})(xe=e.SelectionRange||(e.SelectionRange={}));var Re;(function(he){function pe(oe){switch(oe){case 2:return d.TextDocumentSaveReason.AfterDelay;case 1:return d.TextDocumentSaveReason.Manual;case 3:case 4:return d.TextDocumentSaveReason.FocusOut}}he.to=pe})(Re=e.TextDocumentSaveReason||(e.TextDocumentSaveReason={}));var Qe;(function(he){function pe(q){switch(q){case d.TextEditorLineNumbersStyle.Off:return 0;case d.TextEditorLineNumbersStyle.Relative:return 2;case d.TextEditorLineNumbersStyle.On:default:return 1}}he.from=pe;function oe(q){switch(q){case 0:return d.TextEditorLineNumbersStyle.Off;case 2:return d.TextEditorLineNumbersStyle.Relative;case 1:default:return d.TextEditorLineNumbersStyle.On}}he.to=oe})(Qe=e.TextEditorLineNumbersStyle||(e.TextEditorLineNumbersStyle={}));var tt;(function(he){function pe(q){if(q===d.EndOfLine.CRLF)return 1;if(q===d.EndOfLine.LF)return 0}he.from=pe;function oe(q){if(q===1)return d.EndOfLine.CRLF;if(q===0)return d.EndOfLine.LF}he.to=oe})(tt=e.EndOfLine||(e.EndOfLine={}));var Te;(function(he){function pe(oe){if(typeof oe=="object")return oe.viewId;switch(oe){case d.ProgressLocation.SourceControl:return 3;case d.ProgressLocation.Window:return 10;case d.ProgressLocation.Notification:return 15}throw new Error("Unknown 'ProgressLocation'")}he.from=pe})(Te=e.ProgressLocation||(e.ProgressLocation={}));var it;(function(he){function pe(oe){const q={start:oe.start+1,end:oe.end+1};return oe.kind&&(q.kind=G.from(oe.kind)),q}he.from=pe})(it=e.FoldingRange||(e.FoldingRange={}));var G;(function(he){function pe(oe){if(oe)switch(oe){case d.FoldingRangeKind.Comment:return v.FoldingRangeKind.Comment;case d.FoldingRangeKind.Imports:return v.FoldingRangeKind.Imports;case d.FoldingRangeKind.Region:return v.FoldingRangeKind.Region}}he.from=pe})(G=e.FoldingRangeKind||(e.FoldingRangeKind={}));var Y;(function(he){function pe(oe){if(oe)return{pinned:typeof oe.preview=="boolean"?!oe.preview:void 0,inactive:oe.background,preserveFocus:oe.preserveFocus,selection:typeof oe.selection=="object"?b.from(oe.selection):void 0,override:typeof oe.override=="boolean"?u.EditorResolution.DISABLED:void 0}}he.from=pe})(Y=e.TextEditorOpenOptions||(e.TextEditorOpenOptions={}));var le;(function(he){function pe(Ce){return Ce instanceof d.RelativePattern?Ce.toJSON():typeof Ce=="string"?Ce:oe(Ce)||q(Ce)?new d.RelativePattern(Ce.baseUri??Ce.base,Ce.pattern).toJSON():Ce}he.from=pe;function oe(Ce){const $e=Ce;return $e?M.URI.isUri($e.baseUri)&&typeof $e.pattern=="string":!1}function q(Ce){const $e=Ce;return $e?typeof $e.base=="string"&&typeof $e.pattern=="string":!1}function _e(Ce){return typeof Ce=="string"?Ce:new d.RelativePattern(M.URI.revive(Ce.baseUri),Ce.pattern)}he.to=_e})(le=e.GlobPattern||(e.GlobPattern={}));var Oe;(function(he){function pe(oe){if(oe){if(Array.isArray(oe))return oe.map(pe);if(typeof oe=="string")return oe;{const q=oe;return{language:q.language,scheme:q.scheme,pattern:le.from(q.pattern),exclusive:q.exclusive}}}else return}he.from=pe})(Oe=e.LanguageSelector||(e.LanguageSelector={}));var We;(function(he){function pe(q){return{start:q.start,end:q.end}}he.from=pe;function oe(q){return new d.NotebookRange(q.start,q.end)}he.to=oe})(We=e.NotebookRange||(e.NotebookRange={}));var Ge;(function(he){function pe(q){return{timing:typeof q.runStartTime=="number"&&typeof q.runEndTime=="number"?{startTime:q.runStartTime,endTime:q.runEndTime}:void 0,executionOrder:q.executionOrder,success:q.lastRunSuccess}}he.to=pe;function oe(q){return{lastRunSuccess:q.success,runStartTime:q.timing?.startTime,runEndTime:q.timing?.endTime,executionOrder:q.executionOrder}}he.from=oe})(Ge=e.NotebookCellExecutionSummary||(e.NotebookCellExecutionSummary={}));var Je;(function(he){function pe(oe){if(oe===n.NotebookCellExecutionState.Executing)return d.NotebookCellExecutionState.Executing;if(oe===n.NotebookCellExecutionState.Pending)return d.NotebookCellExecutionState.Pending;if(oe===n.NotebookCellExecutionState.Unconfirmed)return d.NotebookCellExecutionState.Pending;throw new Error(`Unknown state: ${oe}`)}he.to=pe})(Je=e.NotebookCellExecutionState||(e.NotebookCellExecutionState={}));var ft;(function(he){function pe(q){switch(q){case d.NotebookCellKind.Markup:return n.CellKind.Markup;case d.NotebookCellKind.Code:default:return n.CellKind.Code}}he.from=pe;function oe(q){switch(q){case n.CellKind.Markup:return d.NotebookCellKind.Markup;case n.CellKind.Code:default:return d.NotebookCellKind.Code}}he.to=oe})(ft=e.NotebookCellKind||(e.NotebookCellKind={}));var It;(function(he){function pe(q){const _e={metadata:q.metadata??Object.create(null),cells:[]};for(let Ce of q.cells)d.NotebookCellData.validate(Ce),_e.cells.push(St.from(Ce));return _e}he.from=pe;function oe(q){const _e=new d.NotebookData(q.cells.map(St.to));return(0,y.isEmptyObject)(q.metadata)||(_e.metadata=q.metadata),_e}he.to=oe})(It=e.NotebookData||(e.NotebookData={}));var St;(function(he){function pe(q){return{cellKind:ft.from(q.kind),language:q.languageId,mime:q.mime,source:q.value,metadata:q.metadata,internalMetadata:Ge.from(q.executionSummary??{}),outputs:q.outputs?q.outputs.map(qe.from):[]}}he.from=pe;function oe(q){return new d.NotebookCellData(ft.to(q.cellKind),q.source,q.language,q.mime,q.outputs?q.outputs.map(qe.to):void 0,q.metadata,q.internalMetadata?Ge.to(q.internalMetadata):void 0)}he.to=oe})(St=e.NotebookCellData||(e.NotebookCellData={}));var kt;(function(he){function pe(q){return{mime:q.mime,valueBytes:k.VSBuffer.wrap(q.data)}}he.from=pe;function oe(q){return new d.NotebookCellOutputItem(q.valueBytes.buffer,q.mime)}he.to=oe})(kt=e.NotebookCellOutputItem||(e.NotebookCellOutputItem={}));var qe;(function(he){function pe(q){return{outputId:q.id,items:q.items.map(kt.from),metadata:q.metadata}}he.from=pe;function oe(q){const _e=q.items.map(kt.to);return new d.NotebookCellOutput(_e,q.outputId,q.metadata)}he.to=oe})(qe=e.NotebookCellOutput||(e.NotebookCellOutput={}));var vt;(function(he){function pe(_e){return q(_e)?{include:(0,y.withNullAsUndefined)(le.from(_e.include)),exclude:(0,y.withNullAsUndefined)(le.from(_e.exclude))}:(0,y.withNullAsUndefined)(le.from(_e))}he.from=pe;function oe(_e){return q(_e)?{include:le.to(_e.include),exclude:le.to(_e.exclude)}:le.to(_e)}he.to=oe;function q(_e){const Ce=_e;return Ce?!!Ce.include&&!!Ce.exclude:!1}})(vt=e.NotebookExclusiveDocumentPattern||(e.NotebookExclusiveDocumentPattern={}));var Nt;(function(he){function pe(oe){return{backgroundColor:oe.backgroundColor,borderColor:oe.borderColor,top:oe.top?E.from(oe.top):void 0}}he.from=pe})(Nt=e.NotebookDecorationRenderOptions||(e.NotebookDecorationRenderOptions={}));var nt;(function(he){function pe(oe,q,_e){const Ce=typeof oe.command=="string"?{title:"",command:oe.command}:oe.command;return{alignment:oe.alignment===d.NotebookCellStatusBarAlignment.Left?1:2,command:q.toInternal(Ce,_e),text:oe.text,tooltip:oe.tooltip,accessibilityInformation:oe.accessibilityInformation,priority:oe.priority}}he.from=pe})(nt=e.NotebookStatusBarItem||(e.NotebookStatusBarItem={}));var ut;(function(he){function pe(oe){return{transientOutputs:oe?.transientOutputs??!1,transientCellMetadata:oe?.transientCellMetadata??{},transientDocumentMetadata:oe?.transientDocumentMetadata??{}}}he.from=pe})(ut=e.NotebookDocumentContentOptions||(e.NotebookDocumentContentOptions={}));var At;(function(he){function pe(q){return{uri:q.uri,provides:q.provides}}he.from=pe;function oe(q){return new d.NotebookRendererScript(M.URI.revive(q.uri),q.provides)}he.to=oe})(At=e.NotebookRendererScript||(e.NotebookRendererScript={}));var Tt;(function(he){function pe(q){return{message:P.fromStrict(q.message)||"",type:0,expected:q.expectedOutput,actual:q.actualOutput,location:q.location&&{range:b.from(q.location.range),uri:q.location.uri}}}he.from=pe;function oe(q){const _e=new d.TestMessage(typeof q.message=="string"?q.message:P.to(q.message));return _e.actualOutput=q.actual,_e.expectedOutput=q.expected,_e.location=q.location?fe.to(q.location):void 0,_e}he.to=oe})(Tt=e.TestMessage||(e.TestMessage={}));var bt;(function(he){he.namespace=f.namespaceTestTag,he.denamespace=f.denamespaceTestTag})(bt=e.TestTag||(e.TestTag={}));var dt;(function(he){function pe(Ce){const $e=(0,s.getPrivateApiFor)(Ce).controllerId;return{extId:D.TestId.fromExtHostTestItem(Ce,$e).toString(),label:Ce.label,uri:M.URI.revive(Ce.uri),busy:!1,tags:Ce.tags.map(Ve=>bt.namespace($e,Ve.id)),range:L.Range.lift(b.from(Ce.range)),description:Ce.description||null,sortText:Ce.sortText||null,error:Ce.error&&P.fromStrict(Ce.error)||null}}he.from=pe;function oe(Ce){return{parent:void 0,error:void 0,id:D.TestId.fromString(Ce.extId).localId,label:Ce.label,uri:M.URI.revive(Ce.uri),tags:(Ce.tags||[]).map($e=>{const{tagId:Ve}=bt.denamespace($e);return new d.TestTag(Ve)}),range:b.to(Ce.range||void 0),invalidateResults:()=>{},canResolveChildren:!1,busy:!1,description:Ce.description||void 0,sortText:Ce.sortText||void 0}}he.toPlain=oe;function q(Ce){const $e=D.TestId.fromString(Ce.extId),Ve=new s.TestItemImpl($e.controllerId,$e.localId,Ce.label,M.URI.revive(Ce.uri)||void 0);return Ve.range=b.to(Ce.range||void 0),Ve.description=Ce.description||void 0,Ve.sortText=Ce.sortText||void 0,Ve}function _e(Ce){let $e;for(const Ve of Ce.tests){const lt=q(Ve.item);(0,s.getPrivateApiFor)(lt).parent=$e,$e=lt}return $e}he.toItemFromContext=_e})(dt=e.TestItem||(e.TestItem={})),function(he){function pe(q){return{id:q.id}}he.from=pe;function oe(q){return new d.TestTag(q.id)}he.to=oe}(bt=e.TestTag||(e.TestTag={}));var Rt;(function(he){const pe=(q,_e)=>{const Ce={...dt.toPlain(q.item),parent:void 0,taskStates:q.tasks.map($e=>({state:$e.state,duration:$e.duration,messages:$e.messages.filter(Ve=>Ve.type===0).map(Tt.to)})),children:q.children.map($e=>_e.get($e)).filter(y.isDefined).map($e=>pe($e,_e))};for(const $e of Ce.children)$e.parent=Ce;return Ce};function oe(q){const _e=[],Ce=new Map;for(const $e of q.items)Ce.set($e.item.extId,$e),q.request.targets.some(Ve=>Ve.controllerId===$e.controllerId&&Ve.testIds.includes($e.item.extId))&&_e.push($e);return{completedAt:q.completedAt,results:_e.map($e=>pe($e,Ce))}}he.to=oe})(Rt=e.TestResults||(e.TestResults={}));var Lt;(function(he){function pe(Ce){return{covered:Ce.covered,total:Ce.covered}}function oe(Ce){return"line"in Ce?I.from(Ce):b.from(Ce)}function q(Ce){return"branches"in Ce?{count:Ce.executionCount,location:oe(Ce.location),type:1,branches:Ce.branches.length?Ce.branches.map($e=>({count:$e.executionCount,location:$e.location&&oe($e.location)})):void 0}:{type:0,count:Ce.executionCount,location:oe(Ce.location)}}he.fromDetailed=q;function _e(Ce){return{uri:Ce.uri,statement:pe(Ce.statementCoverage),branch:Ce.branchCoverage&&pe(Ce.branchCoverage),function:Ce.functionCoverage&&pe(Ce.functionCoverage),details:Ce.detailedCoverage?.map(q)}}he.fromFile=_e})(Lt=e.TestCoverage||(e.TestCoverage={}));var Ft;(function(he){function pe(oe){switch(oe){case 1:return d.CodeActionTriggerKind.Invoke;case 2:return d.CodeActionTriggerKind.Automatic}}he.to=pe})(Ft=e.CodeActionTriggerKind||(e.CodeActionTriggerKind={}));var Ue;(function(he){function pe(q){const _e=new d.TypeHierarchyItem(H.to(q.kind),q.name,q.detail||"",M.URI.revive(q.uri),b.to(q.range),b.to(q.selectionRange));return _e._sessionId=q._sessionId,_e._itemId=q._itemId,_e}he.to=pe;function oe(q,_e,Ce){if(_e=_e??q._sessionId,Ce=Ce??q._itemId,_e===void 0||Ce===void 0)throw new Error("invalid item");return{_sessionId:_e,_itemId:Ce,kind:H.from(q.kind),name:q.name,detail:q.detail??"",uri:q.uri,range:b.from(q.range),selectionRange:b.from(q.selectionRange),tags:q.tags?.map(te.from)}}he.from=oe})(Ue=e.TypeHierarchyItem||(e.TypeHierarchyItem={}))}),define(Ee[168],we([1,0,2,15,7,8,228]),function(J,e,o,k,w,B,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtHostDocumentSaveParticipant=void 0;class A{constructor(M,L,v,u={timeout:1500,errors:3}){this._logService=M,this._documents=L,this._mainThreadBulkEdits=v,this._thresholds=u,this._callbacks=new S.LinkedList,this._badListeners=new WeakMap}dispose(){this._callbacks.clear()}getOnWillSaveTextDocumentEvent(M){return(L,v,u)=>{const s={dispose:this._callbacks.push([L,v,M])};return Array.isArray(u)&&u.push(s),s}}async $participateInSave(M,L){const v=o.URI.revive(M);let u=!1;const m=setTimeout(()=>u=!0,this._thresholds.timeout),s=[];try{for(let n of[...this._callbacks]){if(u)break;const f=this._documents.getDocument(v),D=await this._deliverEventAsyncAndBlameBadListeners(n,{document:f,reason:B.TextDocumentSaveReason.to(L)});s.push(D)}}finally{clearTimeout(m)}return s}_deliverEventAsyncAndBlameBadListeners([M,L,v],u){const m=this._badListeners.get(M);return typeof m=="number"&&m>this._thresholds.errors?Promise.resolve(!1):this._deliverEventAsync(v,M,L,u).then(()=>!0,s=>{if(this._logService.error(`onWillSaveTextDocument-listener from extension '${v.identifier.value}' threw ERROR`),this._logService.error(s),!(s instanceof Error)||s.message!=="concurrent_edits"){const n=this._badListeners.get(M);this._badListeners.set(M,n?n+1:1),typeof n=="number"&&n>this._thresholds.errors&&this._logService.info(`onWillSaveTextDocument-listener from extension '${v.identifier.value}' will now be IGNORED because of timeouts and/or errors`)}return!1})}_deliverEventAsync(M,L,v,u){const m=[],s=Date.now(),{document:n,reason:f}=u,{version:D}=n,T=Object.freeze({document:n,reason:f,waitUntil(d){if(Object.isFrozen(m))throw(0,k.illegalState)("waitUntil can not be called async");m.push(Promise.resolve(d))}});try{L.apply(v,[T])}catch(d){return Promise.reject(d)}return Object.freeze(m),new Promise((d,g)=>{const b=setTimeout(()=>g(new Error("timeout")),this._thresholds.timeout);return Promise.all(m).then(l=>{this._logService.debug(`onWillSaveTextDocument-listener from extension '${M.identifier.value}' finished after ${Date.now()-s}ms`),clearTimeout(b),d(l)}).catch(l=>{clearTimeout(b),g(l)})}).then(d=>{const g={edits:[]};for(const b of d)if(Array.isArray(b)&&b.every(l=>l instanceof w.TextEdit))for(const{newText:l,newEol:I,range:r}of b)g.edits.push({_type:2,resource:n.uri,edit:{range:r&&B.Range.from(r),text:l,eol:I&&B.EndOfLine.from(I)}});if(g.edits.length!==0)return D===n.version?this._mainThreadBulkEdits.$tryApplyWorkspaceEdit(g):Promise.reject(new Error("concurrent_edits"))})}}e.ExtHostDocumentSaveParticipant=A}),define(Ee[169],we([1,0,9,26,2,8,85]),function(J,e,o,k,w,B,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtHostNotebookDocument=e.ExtHostCell=void 0;class A{constructor(v,u,m,s){this.start=v,this.deletedCount=u,this.deletedItems=m,this.items=s}static asApiEvents(v){return v.map(u=>({start:u.start,deletedCount:u.deletedCount,deletedItems:u.deletedItems,items:u.items.map(m=>m.apiCell)}))}}class y{constructor(v,u,m){this.notebook=v,this._extHostDocument=u,this._cellData=m,this.handle=m.handle,this.uri=w.URI.revive(m.uri),this.cellKind=m.cellKind,this._outputs=m.outputs.map(B.NotebookCellOutput.to),this._internalMetadata=m.internalMetadata??{},this._metadata=Object.freeze(m.metadata??{}),this._previousResult=Object.freeze(B.NotebookCellExecutionSummary.to(m.internalMetadata??{}))}static asModelAddData(v,u){return{EOL:u.eol,lines:u.source,languageId:u.language,uri:u.uri,isDirty:!1,versionId:1,notebook:v}}get internalMetadata(){return this._internalMetadata}get apiCell(){if(!this._apiCell){const v=this,u=this._extHostDocument.getDocument(this.uri);if(!u)throw new Error(`MISSING extHostDocument for notebook cell: ${this.uri}`);this._apiCell=Object.freeze({get index(){return v.notebook.getCellIndex(v)},notebook:v.notebook.apiNotebook,kind:B.NotebookCellKind.to(this._cellData.cellKind),document:u.document,get mime(){return v._mime},set mime(m){v._mime=m},get outputs(){return v._outputs.slice(0)},get metadata(){return v._metadata},get executionSummary(){return v._previousResult}})}return this._apiCell}setOutputs(v){this._outputs=v.map(B.NotebookCellOutput.to)}setOutputItems(v,u,m){const s=m.map(B.NotebookCellOutputItem.to),n=this._outputs.find(f=>f.id===v);n&&(u||(n.items.length=0),n.items.push(...s))}setMetadata(v){this._metadata=Object.freeze(v)}setInternalMetadata(v){this._internalMetadata=v,this._previousResult=Object.freeze(B.NotebookCellExecutionSummary.to(v))}setMime(v){}}e.ExtHostCell=y;class M{constructor(v,u,m,s,n,f){this._proxy=v,this._textDocumentsAndEditors=u,this._textDocuments=m,this._emitter=s,this.uri=n,this.handle=M._handlePool++,this._cells=[],this._versionId=0,this._isDirty=!1,this._disposed=!1,this._notebookType=f.viewType,this._metadata=Object.freeze(f.metadata??Object.create(null)),this._spliceNotebookCells([[0,0,f.cells]],!0),this._versionId=f.versionId}dispose(){this._disposed=!0}get apiNotebook(){if(!this._notebook){const v=this;this._notebook={get uri(){return v.uri},get version(){return v._versionId},get notebookType(){return v._notebookType},get isDirty(){return v._isDirty},get isUntitled(){return v.uri.scheme===o.Schemas.untitled},get isClosed(){return v._disposed},get metadata(){return v._metadata},get cellCount(){return v._cells.length},cellAt(u){return u=v._validateIndex(u),v._cells[u].apiCell},getCells(u){return(u?v._getCells(u):v._cells).map(s=>s.apiCell)},save(){return v._save()}}}return this._notebook}updateBackup(v){this._backup?.delete(),this._backup=v}disposeBackup(){this._backup?.delete(),this._backup=void 0}acceptDocumentPropertiesChanged(v){v.metadata&&(this._metadata=Object.freeze({...this._metadata,...v.metadata}))}acceptDirty(v){this._isDirty=v}acceptModelChanged(v,u){this._versionId=v.versionId,this._isDirty=u;for(const m of v.rawEvents)m.kind===S.NotebookCellsChangeType.ModelChange?this._spliceNotebookCells(m.changes,!1):m.kind===S.NotebookCellsChangeType.Move?this._moveCell(m.index,m.newIdx):m.kind===S.NotebookCellsChangeType.Output?this._setCellOutputs(m.index,m.outputs):m.kind===S.NotebookCellsChangeType.OutputItem?this._setCellOutputItems(m.index,m.outputId,m.append,m.outputItems):m.kind===S.NotebookCellsChangeType.ChangeLanguage?this._changeCellLanguage(m.index,m.language):m.kind===S.NotebookCellsChangeType.ChangeCellMime?this._changeCellMime(m.index,m.mime):m.kind===S.NotebookCellsChangeType.ChangeCellMetadata?this._changeCellMetadata(m.index,m.metadata):m.kind===S.NotebookCellsChangeType.ChangeCellInternalMetadata&&this._changeCellInternalMetadata(m.index,m.internalMetadata)}_validateIndex(v){return v=v|0,v<0?0:v>=this._cells.length?this._cells.length-1:v}_validateRange(v){let u=v.start|0,m=v.end|0;return u<0&&(u=0),m>this._cells.length&&(m=this._cells.length),v.with({start:u,end:m})}_getCells(v){v=this._validateRange(v);const u=[];for(let m=v.start;m<v.end;m++)u.push(this._cells[m]);return u}async _save(){return this._disposed?Promise.reject(new Error("Notebook has been closed")):this._proxy.$trySaveNotebook(this.uri)}_spliceNotebookCells(v,u){if(this._disposed)return;const m=[],s=[],n=[];v.reverse().forEach(f=>{const T=f[2].map(b=>{const l=new y(this,this._textDocumentsAndEditors,b);return u||s.push(y.asModelAddData(this.apiNotebook,b)),l}),d=new A(f[0],f[1],[],T),g=this._cells.splice(f[0],f[1],...T);for(const b of g)n.push(b.uri),d.deletedItems.push(b.apiCell);m.push(d)}),this._textDocumentsAndEditors.acceptDocumentsAndEditorsDelta({addedDocuments:s,removedDocuments:n}),u||this._emitter.emitModelChange((0,k.deepFreeze)({document:this.apiNotebook,changes:A.asApiEvents(m)}))}_moveCell(v,u){const m=this._cells.splice(v,1);this._cells.splice(u,0,...m);const s=[new A(v,1,m.map(n=>n.apiCell),[]),new A(u,0,[],m)];this._emitter.emitModelChange((0,k.deepFreeze)({document:this.apiNotebook,changes:A.asApiEvents(s)}))}_setCellOutputs(v,u){const m=this._cells[v];m.setOutputs(u),this._emitter.emitCellOutputsChange((0,k.deepFreeze)({document:this.apiNotebook,cells:[m.apiCell]}))}_setCellOutputItems(v,u,m,s){const n=this._cells[v];n.setOutputItems(u,m,s),this._emitter.emitCellOutputsChange((0,k.deepFreeze)({document:this.apiNotebook,cells:[n.apiCell]}))}_changeCellLanguage(v,u){const m=this._cells[v];m.apiCell.document.languageId!==u&&this._textDocuments.$acceptModelLanguageChanged(m.uri,u)}_changeCellMime(v,u){const m=this._cells[v];m.apiCell.mime=u}_changeCellMetadata(v,u){const m=this._cells[v],s=m.apiCell.metadata;m.setMetadata(u);const n=m.apiCell.metadata;(0,k.equals)(s,n)||this._emitter.emitCellMetadataChange((0,k.deepFreeze)({document:this.apiNotebook,cell:m.apiCell}))}_changeCellInternalMetadata(v,u){this._cells[v].setInternalMetadata(u)}getCellFromApiCell(v){return this._cells.find(u=>u.apiCell===v)}getCellFromIndex(v){return this._cells[v]}getCell(v){return this._cells.find(u=>u.handle===v)}getCellIndex(v){return this._cells.indexOf(v)}}e.ExtHostNotebookDocument=M,M._handlePool=0}),define(Ee[89],we([1,0,7,8,15]),function(J,e,o,k,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtHostNotebookEditor=void 0;class B{constructor(y){this._finalized=!1,this._collectedEdits=[],this._documentVersionId=y}finalize(){return this._finalized=!0,{documentVersionId:this._documentVersionId,cellEdits:this._collectedEdits}}_throwIfFinalized(){if(this._finalized)throw new Error("Edit is only valid while callback runs")}replaceMetadata(y){this._throwIfFinalized(),this._collectedEdits.push({editType:5,metadata:y})}replaceCellMetadata(y,M){this._throwIfFinalized(),this._collectedEdits.push({editType:8,index:y,metadata:M})}replaceCells(y,M,L){this._throwIfFinalized(),!(y===M&&L.length===0)&&this._collectedEdits.push({editType:1,index:y,count:M-y,cells:L.map(k.NotebookCellData.from)})}}class S{constructor(y,M,L,v,u,m){this.id=y,this._proxy=M,this.notebookData=L,this._selections=[],this._visibleRanges=[],this._visible=!1,this._hasDecorationsForKey=new Set,this._selections=u,this._visibleRanges=v,this._viewColumn=m}get apiEditor(){if(!this._editor){const y=this;this._editor={get document(){return y.notebookData.apiNotebook},get selections(){return y._selections},set selections(M){if(!Array.isArray(M)||!M.every(o.NotebookRange.isNotebookRange))throw(0,w.illegalArgument)("selections");y._selections=M,y._trySetSelections(M)},get visibleRanges(){return y._visibleRanges},revealRange(M,L){y._proxy.$tryRevealRange(y.id,k.NotebookRange.from(M),L??o.NotebookEditorRevealType.Default)},get viewColumn(){return y._viewColumn},edit(M){const L=new B(this.document.version);return M(L),y._applyEdit(L.finalize())},setDecorations(M,L){return y.setDecorations(M,L)}},S.apiEditorsToExtHost.set(this._editor,this)}return this._editor}get visible(){return this._visible}_acceptVisibility(y){this._visible=y}_acceptVisibleRanges(y){this._visibleRanges=y}_acceptSelections(y){this._selections=y}_trySetSelections(y){this._proxy.$trySetSelections(this.id,y.map(k.NotebookRange.from))}_acceptViewColumn(y){this._viewColumn=y}_applyEdit(y){if(y.cellEdits.length===0)return Promise.resolve(!0);const M=[];let L=-1;for(let v=0;v<y.cellEdits.length;v++){if(L<0){M.push(y.cellEdits[v]),L++;continue}const m=M[L],s=y.cellEdits[v];if(m.editType===1&&s.editType===1&&m.index===s.index){m.cells.push(...y.cellEdits[v].cells),m.count+=y.cellEdits[v].count;continue}M.push(y.cellEdits[v]),L++}return this._proxy.$tryApplyEdits(this.id,y.documentVersionId,M)}setDecorations(y,M){if(!(M.isEmpty&&!this._hasDecorationsForKey.has(y.key)))return M.isEmpty?this._hasDecorationsForKey.delete(y.key):this._hasDecorationsForKey.add(y.key),this._proxy.$trySetDecorations(this.id,k.NotebookRange.from(M),y.key)}}e.ExtHostNotebookEditor=S,S.apiEditorsToExtHost=new WeakMap}),define(Ee[170],we([1,0,8,141,124,20,52,15]),function(J,e,o,k,w,B,S,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtHostProgress=void 0;class y{constructor(u){this._handles=0,this._mapHandleToCancellationSource=new Map,this._proxy=u}async withProgress(u,m,s){const n=this._handles++,{title:f,location:D,cancellable:T}=m,d={label:(0,w.localize)(0,null,u.displayName||u.name),id:u.identifier.value};return this._proxy.$startProgress(n,{location:o.ProgressLocation.from(D),title:f,source:d,cancellable:T},u.isUnderDevelopment?void 0:u.identifier.value).catch(A.onUnexpectedExternalError),this._withProgress(n,s,!!T)}_withProgress(u,m,s){let n;s&&(n=new B.CancellationTokenSource,this._mapHandleToCancellationSource.set(u,n));const f=T=>{this._proxy.$progressEnd(T),this._mapHandleToCancellationSource.delete(T),n&&n.dispose()};let D;try{D=m(new L(this._proxy,u),s&&n?n.token:B.CancellationToken.None)}catch(T){throw f(u),T}return D.then(T=>f(u),T=>f(u)),D}$acceptProgressCanceled(u){const m=this._mapHandleToCancellationSource.get(u);m&&(m.cancel(),this._mapHandleToCancellationSource.delete(u))}}e.ExtHostProgress=y;function M(v,u){return v.message=u.message,typeof u.increment=="number"&&(typeof v.increment=="number"?v.increment+=u.increment:v.increment=u.increment),v}class L extends k.Progress{constructor(u,m){super(s=>this.throttledReport(s));this._proxy=u,this._handle=m}throttledReport(u){this._proxy.$progressReport(this._handle,u)}}Fe([(0,S.throttle)(100,(v,u)=>M(v,u),()=>Object.create(null))],L.prototype,"throttledReport",null)}),define(Ee[90],we([1,0,42,15,53,8,7]),function(J,e,o,k,w,B,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtHostTextEditor=e.ExtHostTextEditorOptions=e.TextEditorEdit=e.TextEditorDecorationType=void 0;class A{constructor(u,m,s){const n=A._Keys.nextId();u.$registerTextEditorDecorationType(m.identifier,n,B.DecorationRenderOptions.from(s)),this.value=Object.freeze({key:n,dispose(){u.$removeTextEditorDecorationType(n)}})}}e.TextEditorDecorationType=A,A._Keys=new w.IdGenerator("TextEditorDecorationType");class y{constructor(u,m){this._collectedEdits=[],this._setEndOfLine=void 0,this._finalized=!1,this._document=u,this._documentVersionId=u.version,this._undoStopBefore=m.undoStopBefore,this._undoStopAfter=m.undoStopAfter}finalize(){return this._finalized=!0,{documentVersionId:this._documentVersionId,edits:this._collectedEdits,setEndOfLine:this._setEndOfLine,undoStopBefore:this._undoStopBefore,undoStopAfter:this._undoStopAfter}}_throwIfFinalized(){if(this._finalized)throw new Error("Edit is only valid while callback runs")}replace(u,m){this._throwIfFinalized();let s=null;if(u instanceof S.Position)s=new S.Range(u,u);else if(u instanceof S.Range)s=u;else throw new Error("Unrecognized location");this._pushEdit(s,m,!1)}insert(u,m){this._throwIfFinalized(),this._pushEdit(new S.Range(u,u),m,!0)}delete(u){this._throwIfFinalized();let m=null;if(u instanceof S.Range)m=u;else throw new Error("Unrecognized location");this._pushEdit(m,null,!0)}_pushEdit(u,m,s){const n=this._document.validateRange(u);this._collectedEdits.push({range:n,text:m,forceMoveMarkers:s})}setEndOfLine(u){if(this._throwIfFinalized(),u!==S.EndOfLine.LF&&u!==S.EndOfLine.CRLF)throw(0,k.illegalArgument)("endOfLine");this._setEndOfLine=u}}e.TextEditorEdit=y;class M{constructor(u,m,s,n){this._proxy=u,this._id=m,this._accept(s),this._logService=n;const f=this;this.value={get tabSize(){return f._tabSize},set tabSize(D){f._setTabSize(D)},get insertSpaces(){return f._insertSpaces},set insertSpaces(D){f._setInsertSpaces(D)},get cursorStyle(){return f._cursorStyle},set cursorStyle(D){f._setCursorStyle(D)},get lineNumbers(){return f._lineNumbers},set lineNumbers(D){f._setLineNumbers(D)}}}_accept(u){this._tabSize=u.tabSize,this._insertSpaces=u.insertSpaces,this._cursorStyle=u.cursorStyle,this._lineNumbers=B.TextEditorLineNumbersStyle.to(u.lineNumbers)}_validateTabSize(u){if(u==="auto")return"auto";if(typeof u=="number"){const m=Math.floor(u);return m>0?m:null}if(typeof u=="string"){const m=parseInt(u,10);return isNaN(m)?null:m>0?m:null}return null}_setTabSize(u){const m=this._validateTabSize(u);if(m!==null){if(typeof m=="number"){if(this._tabSize===m)return;this._tabSize=m}this._warnOnError("setTabSize",this._proxy.$trySetOptions(this._id,{tabSize:m}))}}_validateInsertSpaces(u){return u==="auto"?"auto":u==="false"?!1:Boolean(u)}_setInsertSpaces(u){const m=this._validateInsertSpaces(u);if(typeof m=="boolean"){if(this._insertSpaces===m)return;this._insertSpaces=m}this._warnOnError("setInsertSpaces",this._proxy.$trySetOptions(this._id,{insertSpaces:m}))}_setCursorStyle(u){this._cursorStyle!==u&&(this._cursorStyle=u,this._warnOnError("setCursorStyle",this._proxy.$trySetOptions(this._id,{cursorStyle:u})))}_setLineNumbers(u){this._lineNumbers!==u&&(this._lineNumbers=u,this._warnOnError("setLineNumbers",this._proxy.$trySetOptions(this._id,{lineNumbers:B.TextEditorLineNumbersStyle.from(u)})))}assign(u){const m={};let s=!1;if(typeof u.tabSize!="undefined"){const n=this._validateTabSize(u.tabSize);n==="auto"?(s=!0,m.tabSize=n):typeof n=="number"&&this._tabSize!==n&&(this._tabSize=n,s=!0,m.tabSize=n)}if(typeof u.insertSpaces!="undefined"){const n=this._validateInsertSpaces(u.insertSpaces);n==="auto"?(s=!0,m.insertSpaces=n):this._insertSpaces!==n&&(this._insertSpaces=n,s=!0,m.insertSpaces=n)}typeof u.cursorStyle!="undefined"&&this._cursorStyle!==u.cursorStyle&&(this._cursorStyle=u.cursorStyle,s=!0,m.cursorStyle=u.cursorStyle),typeof u.lineNumbers!="undefined"&&this._lineNumbers!==u.lineNumbers&&(this._lineNumbers=u.lineNumbers,s=!0,m.lineNumbers=B.TextEditorLineNumbersStyle.from(u.lineNumbers)),s&&this._warnOnError("setOptions",this._proxy.$trySetOptions(this._id,m))}_warnOnError(u,m){m.catch(s=>{this._logService.warn(`ExtHostTextEditorOptions '${u}' failed:'`),this._logService.warn(s)})}}e.ExtHostTextEditorOptions=M;class L{constructor(u,m,s,n,f,D,T,d){this.id=u,this._proxy=m,this._logService=s,this._disposed=!1,this._hasDecorationsForKey=new Set,this._selections=f,this._options=new M(this._proxy,this.id,D,s),this._visibleRanges=T,this._viewColumn=d;const g=this;this.value=Object.freeze({get document(){return n.getValue()},set document(b){throw(0,k.readonly)("document")},get selection(){return g._selections&&g._selections[0]},set selection(b){if(!(b instanceof S.Selection))throw(0,k.illegalArgument)("selection");g._selections=[b],g._trySetSelection()},get selections(){return g._selections},set selections(b){if(!Array.isArray(b)||b.some(l=>!(l instanceof S.Selection)))throw(0,k.illegalArgument)("selections");g._selections=b,g._trySetSelection()},get visibleRanges(){return g._visibleRanges},set visibleRanges(b){throw(0,k.readonly)("visibleRanges")},get options(){return g._options.value},set options(b){g._disposed||g._options.assign(b)},get viewColumn(){return g._viewColumn},set viewColumn(b){throw(0,k.readonly)("viewColumn")},edit(b,l={undoStopBefore:!0,undoStopAfter:!0}){if(g._disposed)return Promise.reject(new Error("TextEditor#edit not possible on closed editors"));const I=new y(n.getValue(),l);return b(I),g._applyEdit(I)},insertSnippet(b,l,I={undoStopBefore:!0,undoStopAfter:!0}){if(g._disposed)return Promise.reject(new Error("TextEditor#insertSnippet not possible on closed editors"));let r;if(!l||Array.isArray(l)&&l.length===0)r=g._selections.map(i=>B.Range.from(i));else if(l instanceof S.Position){const{lineNumber:i,column:c}=B.Position.from(l);r=[{startLineNumber:i,startColumn:c,endLineNumber:i,endColumn:c}]}else if(l instanceof S.Range)r=[B.Range.from(l)];else{r=[];for(const i of l)if(i instanceof S.Range)r.push(B.Range.from(i));else{const{lineNumber:c,column:t}=B.Position.from(i);r.push({startLineNumber:c,startColumn:t,endLineNumber:c,endColumn:t})}}return m.$tryInsertSnippet(u,b.value,r,I)},setDecorations(b,l){const I=l.length===0;I&&!g._hasDecorationsForKey.has(b.key)||(I?g._hasDecorationsForKey.delete(b.key):g._hasDecorationsForKey.add(b.key),g._runOnProxy(()=>{if(B.isDecorationOptionsArr(l))return m.$trySetDecorations(u,b.key,B.fromRangeOrRangeWithMessage(l));{const r=new Array(4*l.length);for(let i=0,c=l.length;i<c;i++){const t=l[i];r[4*i]=t.start.line+1,r[4*i+1]=t.start.character+1,r[4*i+2]=t.end.line+1,r[4*i+3]=t.end.character+1}return m.$trySetDecorationsFast(u,b.key,r)}}))},revealRange(b,l){g._runOnProxy(()=>m.$tryRevealRange(u,B.Range.from(b),l||S.TextEditorRevealType.Default))},show(b){m.$tryShowEditor(u,B.ViewColumn.from(b))},hide(){m.$tryHideEditor(u)}})}dispose(){(0,o.ok)(!this._disposed),this._disposed=!0}_acceptOptions(u){(0,o.ok)(!this._disposed),this._options._accept(u)}_acceptVisibleRanges(u){(0,o.ok)(!this._disposed),this._visibleRanges=u}_acceptViewColumn(u){(0,o.ok)(!this._disposed),this._viewColumn=u}_acceptSelections(u){(0,o.ok)(!this._disposed),this._selections=u}async _trySetSelection(){const u=this._selections.map(B.Selection.from);return await this._runOnProxy(()=>this._proxy.$trySetSelections(this.id,u)),this.value}_applyEdit(u){const m=u.finalize();if(m.edits.length===0&&!m.setEndOfLine)return Promise.resolve(!0);const s=m.edits.map(f=>f.range);s.sort((f,D)=>f.end.line===D.end.line?f.end.character===D.end.character?f.start.line===D.start.line?f.start.character-D.start.character:f.start.line-D.start.line:f.end.character-D.end.character:f.end.line-D.end.line);for(let f=0,D=s.length-1;f<D;f++){const T=s[f].end;if(s[f+1].start.isBefore(T))return Promise.reject(new Error("Overlapping ranges are not allowed!"))}const n=m.edits.map(f=>({range:B.Range.from(f.range),text:f.text,forceMoveMarkers:f.forceMoveMarkers}));return this._proxy.$tryApplyEdits(this.id,m.documentVersionId,n,{setEndOfLine:typeof m.setEndOfLine=="number"?B.EndOfLine.from(m.setEndOfLine):void 0,undoStopBefore:m.undoStopBefore,undoStopAfter:m.undoStopAfter})}_runOnProxy(u){return this._disposed?(this._logService.warn("TextEditor is closed/disposed"),Promise.resolve(void 0)):u().then(()=>this,m=>(m instanceof Error&&m.name==="DISPOSED"||this._logService.warn(m),null))}}e.ExtHostTextEditor=L}),define(Ee[171],we([1,0,13,5,6,11,47,8,62,63,48]),function(J,e,o,k,w,B,S,A,y,M,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SingleUseTestCollection=void 0;class v extends w.Disposable{constructor(m){super();this.controllerId=m,this.debounceSendDiff=this._register(new o.RunOnceScheduler(()=>this.flushDiff(),200)),this.diffOpEmitter=this._register(new k.Emitter),this.root=new S.TestItemRootImpl(this.controllerId,this.controllerId),this.tree=new Map,this.tags=new Map,this.diff=[],this.onDidGenerateDiff=this.diffOpEmitter.event,this.root.canResolveChildren=!0,this.upsertItem(this.root,void 0)}set resolveHandler(m){this._resolveHandler=m;for(const s of this.tree.values())this.updateExpandability(s)}collectDiff(){const m=this.diff;return this.diff=[],m}pushDiff(m){const s=this.diff[this.diff.length-1];if(s&&m.op===1){if(s.op===1&&s.item.extId===m.item.extId){(0,y.applyTestItemUpdate)(s.item,m.item);return}if(s.op===0&&s.item.item.extId===m.item.extId){(0,y.applyTestItemUpdate)(s.item,m.item);return}}this.diff.push(m),this.debounceSendDiff.isScheduled()||this.debounceSendDiff.schedule()}expand(m,s){const n=this.tree.get(m);if(!!n){if((n.expandLevels===void 0||s>n.expandLevels)&&(n.expandLevels=s),n.expand===1){const f=this.resolveChildren(n);return f.isOpen()?this.expandChildren(n,s-1):f.wait().then(()=>this.expandChildren(n,s-1))}else if(n.expand===3)return n.resolveBarrier?.isOpen()===!1?n.resolveBarrier.wait().then(()=>this.expandChildren(n,s-1)):this.expandChildren(n,s-1)}}dispose(){for(const m of this.tree.values())(0,S.getPrivateApiFor)(m.actual).listener=void 0;this.tree.clear(),this.diff=[],super.dispose()}onTestItemEvent(m,s){switch(s.op){case 2:this.pushDiff({op:4,itemId:m.fullId.toString()});break;case 1:this.removeItem(M.TestId.joinToString(m.fullId,s.id));break;case 0:this.upsertItem(s.item,m);break;case 4:for(const n of s.ops)this.onTestItemEvent(m,n);break;case 3:{const{key:n,value:f,previous:D}=s,T=m.fullId.toString();switch(n){case"canResolveChildren":this.updateExpandability(m);break;case"tags":this.diffTagRefs(f,D,T);break;case"range":this.pushDiff({op:1,item:{extId:T,item:{range:L.Range.lift(A.Range.from(f))}}});break;case"error":this.pushDiff({op:1,item:{extId:T,item:{error:A.MarkdownString.fromStrict(f)||null}}});break;default:this.pushDiff({op:1,item:{extId:T,item:{[n]:f??null}}});break}break}default:(0,B.assertNever)(s)}}upsertItem(m,s){if(!(m instanceof S.TestItemImpl))throw new Error(`TestItems provided to the VS Code API must extend \`vscode.TestItem\`, but ${m.id} did not`);const n=M.TestId.fromExtHostTestItem(m,this.root.id,s?.actual),f=(0,S.getPrivateApiFor)(m);f.parent&&f.parent!==s?.actual&&f.parent.children.delete(m.id);let D=this.tree.get(n.toString());if(!D){D={fullId:n,actual:m,parent:s?n.parentId:null,expandLevels:s?.expandLevels?s.expandLevels-1:void 0,expand:0},m.tags.forEach(this.incrementTagRefs,this),this.tree.set(D.fullId.toString(),D),this.setItemParent(m,s),this.pushDiff({op:0,item:{parent:D.parent&&D.parent.toString(),controllerId:this.controllerId,expand:D.expand,item:A.TestItem.from(m)}}),this.connectItemAndChildren(m,D,s);return}if(D.actual===m){this.connectItem(m,D,s);return}const T=D.actual.children,d=D.actual,g=(0,S.diffTestItems)(d,m);(0,S.getPrivateApiFor)(d).listener=void 0,D.actual=m,D.expand=0;for(const[b,l]of g)this.onTestItemEvent(D,{op:3,key:b,value:l,previous:d[b]});this.connectItemAndChildren(m,D,s);for(const b of T)m.children.get(b.id)||this.removeItem(M.TestId.joinToString(n,b.id))}diffTagRefs(m,s,n){const f=new Set(s.map(D=>D.id));for(const D of m)f.delete(D.id)||this.incrementTagRefs(D);this.pushDiff({op:1,item:{extId:n,item:{tags:m.map(D=>A.TestTag.namespace(this.controllerId,D.id))}}}),f.forEach(this.decrementTagRefs,this)}incrementTagRefs(m){const s=this.tags.get(m.id);s?s.refCount++:(this.tags.set(m.id,{refCount:1}),this.pushDiff({op:5,tag:{id:A.TestTag.namespace(this.controllerId,m.id),ctrlLabel:this.root.label}}))}decrementTagRefs(m){const s=this.tags.get(m);s&&!--s.refCount&&(this.tags.delete(m),this.pushDiff({op:6,id:(0,y.namespaceTestTag)(this.controllerId,m)}))}setItemParent(m,s){(0,S.getPrivateApiFor)(m).parent=s&&s.actual!==this.root?s.actual:void 0}connectItem(m,s,n){this.setItemParent(m,n);const f=(0,S.getPrivateApiFor)(m);f.parent=n?.actual,f.listener=D=>this.onTestItemEvent(s,D),this.updateExpandability(s)}connectItemAndChildren(m,s,n){this.connectItem(m,s,n);for(const f of m.children)this.upsertItem(f,s)}updateExpandability(m){let s;this._resolveHandler?m.resolveBarrier?s=m.resolveBarrier.isOpen()?3:2:s=m.actual.canResolveChildren?1:0:s=0,s!==m.expand&&(m.expand=s,this.pushDiff({op:1,item:{extId:m.fullId.toString(),expand:s}}),s===1&&m.expandLevels!==void 0&&this.resolveChildren(m))}expandChildren(m,s){if(s<0)return;const n=[];for(const f of m.actual.children){const D=this.expand(M.TestId.joinToString(m.fullId,f.id),s);(0,o.isThenable)(D)&&n.push(D)}if(n.length)return Promise.all(n).then(()=>{})}resolveChildren(m){if(m.resolveBarrier)return m.resolveBarrier;if(!this._resolveHandler){const D=new o.Barrier;return D.open(),D}m.expand=2,this.pushExpandStateUpdate(m);const s=m.resolveBarrier=new o.Barrier,n=D=>{console.error(`Unhandled error in resolveHandler of test controller "${this.controllerId}"`),m.actual!==this.root&&(m.actual.error=D.stack||D.message||String(D))};let f;try{f=this._resolveHandler(m.actual===this.root?void 0:m.actual)}catch(D){n(D)}return(0,o.isThenable)(f)?f.catch(n).then(()=>{s.open(),this.updateExpandability(m)}):(s.open(),this.updateExpandability(m)),m.resolveBarrier}pushExpandStateUpdate(m){this.pushDiff({op:1,item:{extId:m.fullId.toString(),expand:m.expand}})}removeItem(m){const s=this.tree.get(m);if(!s)throw new Error("attempting to remove non-existent child");this.pushDiff({op:2,itemId:m});const n=[s];for(;n.length;){const f=n.pop();if(!!f){(0,S.getPrivateApiFor)(f.actual).listener=void 0;for(const D of f.actual.tags)this.decrementTagRefs(D.id);this.tree.delete(f.fullId.toString());for(const D of f.actual.children)n.push(this.tree.get(M.TestId.joinToString(f.fullId,D.id)))}}}flushDiff(){const m=this.collectDiff();m.length&&this.diffOpEmitter.fire(m)}}e.SingleUseTestCollection=v}),define(Ee[172],we([1,0,3,138]),function(J,e,o,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IWorkbenchEnvironmentService=void 0,e.IWorkbenchEnvironmentService=(0,o.refineServiceDecorator)(k.IEnvironmentService)}),define(Ee[173],we([1,0,25,5,17]),function(J,e,o,k,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtensionDescriptionRegistry=e.DeltaExtensionsResult=void 0;class B{constructor(L){this.removedDueToLooping=L}}e.DeltaExtensionsResult=B;class S{constructor(L){this._onDidChange=new k.Emitter,this.onDidChange=this._onDidChange.event,this._extensionDescriptions=L,this._initialize()}_initialize(){this._extensionDescriptions.sort(y),this._extensionsMap=new Map,this._extensionsArr=[],this._activationMap=new Map;for(const L of this._extensionDescriptions){if(this._extensionsMap.has(o.ExtensionIdentifier.toKey(L.identifier))){console.error("Extension `"+L.identifier.value+"` is already registered");continue}if(this._extensionsMap.set(o.ExtensionIdentifier.toKey(L.identifier),L),this._extensionsArr.push(L),Array.isArray(L.activationEvents))for(let v of L.activationEvents)v==="onUri"&&(v=`onUri:${o.ExtensionIdentifier.toKey(L.identifier)}`),this._activationMap.has(v)||this._activationMap.set(v,[]),this._activationMap.get(v).push(L)}}keepOnly(L){const v=new Set;L.forEach(u=>v.add(o.ExtensionIdentifier.toKey(u))),this._extensionDescriptions=this._extensionDescriptions.filter(u=>v.has(o.ExtensionIdentifier.toKey(u.identifier))),this._initialize(),this._onDidChange.fire(void 0)}deltaExtensions(L,v){L.length>0&&(this._extensionDescriptions=this._extensionDescriptions.concat(L));const u=S._findLoopingExtensions(this._extensionDescriptions);if(v=v.concat(u.map(m=>m.identifier)),v.length>0){const m=new Set;v.forEach(s=>m.add(o.ExtensionIdentifier.toKey(s))),this._extensionDescriptions=this._extensionDescriptions.filter(s=>!m.has(o.ExtensionIdentifier.toKey(s.identifier)))}return this._initialize(),this._onDidChange.fire(void 0),new B(u)}static _findLoopingExtensions(L){const v=new class{constructor(){this._arcs=new Map,this._nodesSet=new Set,this._nodesArr=[]}addNode(f){this._nodesSet.has(f)||(this._nodesSet.add(f),this._nodesArr.push(f))}addArc(f,D){this.addNode(f),this.addNode(D),this._arcs.has(f)?this._arcs.get(f).push(D):this._arcs.set(f,[D])}getArcs(f){return this._arcs.has(f)?this._arcs.get(f):[]}hasOnlyGoodArcs(f,D){const T=v.getArcs(f);for(let d=0;d<T.length;d++)if(!D.has(T[d]))return!1;return!0}getNodes(){return this._nodesArr}};let u=new Map;for(let f of L){const D=o.ExtensionIdentifier.toKey(f.identifier);if(u.set(D,f),f.extensionDependencies)for(let T of f.extensionDependencies){const d=o.ExtensionIdentifier.toKey(T);v.addArc(D,d)}}let m=new Set;v.getNodes().filter(f=>v.getArcs(f).length===0).forEach(f=>m.add(f));let s=v.getNodes().filter(f=>!m.has(f)),n;do{n=!1;for(let f=0;f<s.length;f++){const D=s[f];v.hasOnlyGoodArcs(D,m)&&(s.splice(f,1),f--,m.add(D),n=!0)}}while(n);return s.map(f=>u.get(f))}containsActivationEvent(L){return this._activationMap.has(L)}containsExtension(L){return this._extensionsMap.has(o.ExtensionIdentifier.toKey(L))}getExtensionDescriptionsForActivationEvent(L){const v=this._activationMap.get(L);return v?v.slice(0):[]}getAllExtensionDescriptions(){return this._extensionsArr.slice(0)}getExtensionDescription(L){const v=this._extensionsMap.get(o.ExtensionIdentifier.toKey(L));return v||void 0}}e.ExtensionDescriptionRegistry=S;var A;(function(M){M[M.Builtin=0]="Builtin",M[M.User=1]="User",M[M.Dev=2]="Dev"})(A||(A={}));function y(M,L){const v=M.isBuiltin?0:M.isUnderDevelopment?2:1,u=L.isBuiltin?0:L.isUnderDevelopment?2:1;if(v!==u)return v-u;const m=w.posix.basename(M.extensionLocation.path),s=w.posix.basename(L.extensionLocation.path);return m<s?-1:m>s?1:0}}),define(Ee[91],we([1,0,21]),function(J,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isMessageOfType=e.createMessageOfType=e.MessageType=e.ExtensionHostExitCode=e.UIKind=void 0;var k;(function(y){y[y.Desktop=1]="Desktop",y[y.Web=2]="Web"})(k=e.UIKind||(e.UIKind={}));var w;(function(y){y[y.VersionMismatch=55]="VersionMismatch",y[y.UnexpectedError=81]="UnexpectedError"})(w=e.ExtensionHostExitCode||(e.ExtensionHostExitCode={}));var B;(function(y){y[y.Initialized=0]="Initialized",y[y.Ready=1]="Ready",y[y.Terminate=2]="Terminate"})(B=e.MessageType||(e.MessageType={}));function S(y){const M=o.VSBuffer.alloc(1);switch(y){case 0:M.writeUInt8(1,0);break;case 1:M.writeUInt8(2,0);break;case 2:M.writeUInt8(3,0);break}return M}e.createMessageOfType=S;function A(y,M){if(y.byteLength!==1)return!1;switch(y.readUInt8(0)){case 1:return M===0;case 2:return M===1;case 3:return M===2;default:return!1}}e.isMessageOfType=A}),define(Ee[28],we([1,0,5,2,3,25,144]),function(J,e,o,k,w,B,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NullExtensionService=e.toExtensionDescription=e.toExtension=e.ActivationKind=e.ExtensionHostLogFileName=e.ExtensionPointContribution=e.ActivationTimes=e.checkProposedApiEnabled=e.isProposedApiEnabled=e.extensionHostKindToString=e.ExtensionHostKind=e.MissingExtensionDependency=e.extensionRunningLocationToString=e.ExtensionRunningLocation=e.IExtensionService=e.webWorkerExtHostConfig=e.nullExtensionDescription=void 0,e.nullExtensionDescription=Object.freeze({identifier:new B.ExtensionIdentifier("nullExtensionDescription"),name:"Null Extension Description",version:"0.0.0",publisher:"vscode",engines:{vscode:""},extensionLocation:k.URI.parse("void:location"),isBuiltin:!1}),e.webWorkerExtHostConfig="extensions.webWorker",e.IExtensionService=(0,w.createDecorator)("extensionService");var A;(function(g){g[g.None=0]="None",g[g.LocalProcess=1]="LocalProcess",g[g.LocalWebWorker=2]="LocalWebWorker",g[g.Remote=3]="Remote"})(A=e.ExtensionRunningLocation||(e.ExtensionRunningLocation={}));function y(g){switch(g){case 0:return"None";case 1:return"LocalProcess";case 2:return"LocalWebWorker";case 3:return"Remote"}}e.extensionRunningLocationToString=y;class M{constructor(b){this.dependency=b}}e.MissingExtensionDependency=M;var L;(function(g){g[g.LocalProcess=0]="LocalProcess",g[g.LocalWebWorker=1]="LocalWebWorker",g[g.Remote=2]="Remote"})(L=e.ExtensionHostKind||(e.ExtensionHostKind={}));function v(g){switch(g){case 0:return"LocalProcess";case 1:return"LocalWebWorker";case 2:return"Remote"}}e.extensionHostKindToString=v;function u(g,b){return!0}e.isProposedApiEnabled=u;function m(g,b){if(!u(g,b))throw new Error(`Extension '${g.identifier.value}' CANNOT use API proposal: ${b}.
Its package.json#enabledApiProposals-property declares: ${g.enabledApiProposals?.join(", ")??"[]"} but NOT ${b}.
The missing proposal MUST be added and you must start in extension development mode or use the following command line switch: --enable-proposed-api ${g.identifier.value}`)}e.checkProposedApiEnabled=m;class s{constructor(b,l,I,r){this.codeLoadingTime=b,this.activateCallTime=l,this.activateResolvedTime=I,this.activationReason=r}}e.ActivationTimes=s;class n{constructor(b,l){this.description=b,this.value=l}}e.ExtensionPointContribution=n,e.ExtensionHostLogFileName="exthost";var f;(function(g){g[g.Normal=0]="Normal",g[g.Immediate=1]="Immediate"})(f=e.ActivationKind||(e.ActivationKind={}));function D(g){return{type:g.isBuiltin?0:1,isBuiltin:g.isBuiltin||g.isUserBuiltin,identifier:{id:(0,S.getGalleryExtensionId)(g.publisher,g.name),uuid:g.uuid},manifest:g,location:g.extensionLocation}}e.toExtension=D;function T(g,b){return{identifier:new B.ExtensionIdentifier((0,S.getExtensionId)(g.manifest.publisher,g.manifest.name)),isBuiltin:g.type===0,isUserBuiltin:g.type===1&&g.isBuiltin,isUnderDevelopment:!!b,extensionLocation:g.location,...g.manifest,uuid:g.identifier.uuid}}e.toExtensionDescription=T;class d{constructor(){this.onDidRegisterExtensions=o.Event.None,this.onDidChangeExtensionsStatus=o.Event.None,this.onDidChangeExtensions=o.Event.None,this.onWillActivateByEvent=o.Event.None,this.onDidChangeResponsiveChange=o.Event.None}activateByEvent(b){return Promise.resolve(void 0)}activationEventIsDone(b){return!1}whenInstalledExtensionsRegistered(){return Promise.resolve(!0)}getExtensions(){return Promise.resolve([])}getExtension(){return Promise.resolve(void 0)}readExtensionPointContributions(b){return Promise.resolve(Object.create(null))}getExtensionsStatus(){return Object.create(null)}getInspectPort(b){return Promise.resolve(0)}stopExtensionHosts(){}async restartExtensionHost(){}async startExtensionHosts(){}async setRemoteEnvironment(b){}canAddExtension(){return!1}canRemoveExtension(){return!1}_activateById(b,l){return Promise.resolve()}}e.NullExtensionService=d}),define(Ee[174],we([1,0,15,25,28,12]),function(J,e,o,k,w,B){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtensionsActivator=e.FailedExtension=e.HostExtension=e.EmptyExtension=e.ActivatedExtension=e.ExtensionActivationTimesBuilder=e.ExtensionActivationTimes=void 0;const S=Promise.resolve(void 0);class A{constructor(n,f,D,T){this.startup=n,this.codeLoadingTime=f,this.activateCallTime=D,this.activateResolvedTime=T}}e.ExtensionActivationTimes=A,A.NONE=new A(!1,-1,-1,-1);class y{constructor(n){this._startup=n,this._codeLoadingStart=-1,this._codeLoadingStop=-1,this._activateCallStart=-1,this._activateCallStop=-1,this._activateResolveStart=-1,this._activateResolveStop=-1}_delta(n,f){return n===-1||f===-1?-1:f-n}build(){return new A(this._startup,this._delta(this._codeLoadingStart,this._codeLoadingStop),this._delta(this._activateCallStart,this._activateCallStop),this._delta(this._activateResolveStart,this._activateResolveStop))}codeLoadingStart(){this._codeLoadingStart=Date.now()}codeLoadingStop(){this._codeLoadingStop=Date.now()}activateCallStart(){this._activateCallStart=Date.now()}activateCallStop(){this._activateCallStop=Date.now()}activateResolveStart(){this._activateResolveStart=Date.now()}activateResolveStop(){this._activateResolveStop=Date.now()}}e.ExtensionActivationTimesBuilder=y;class M{constructor(n,f,D,T,d,g){this.activationFailed=n,this.activationFailedError=f,this.activationTimes=D,this.module=T,this.exports=d,this.subscriptions=g}}e.ActivatedExtension=M;class L extends M{constructor(n){super(!1,null,n,{activate:void 0,deactivate:void 0},void 0,[])}}e.EmptyExtension=L;class v extends M{constructor(){super(!1,null,A.NONE,{activate:void 0,deactivate:void 0},void 0,[])}}e.HostExtension=v;class u extends M{constructor(n){super(!0,n,A.NONE,{activate:void 0,deactivate:void 0},void 0,[])}}e.FailedExtension=u;let m=class{constructor(n,f,D,T,d){this._logService=d,this._isDisposed=!1,this._registry=n,this._resolvedExtensionsSet=new Set,f.forEach(g=>this._resolvedExtensionsSet.add(k.ExtensionIdentifier.toKey(g))),this._hostExtensionsMap=new Map,D.forEach(g=>this._hostExtensionsMap.set(k.ExtensionIdentifier.toKey(g),g)),this._host=T,this._activatingExtensions=new Map,this._activatedExtensions=new Map,this._alreadyActivatedEvents=Object.create(null)}dispose(){this._isDisposed=!0}isActivated(n){const f=k.ExtensionIdentifier.toKey(n);return this._activatedExtensions.has(f)}getActivatedExtension(n){const f=k.ExtensionIdentifier.toKey(n),D=this._activatedExtensions.get(f);if(!D)throw new Error("Extension `"+n.value+"` is not known or not activated");return D}activateByEvent(n,f){if(this._alreadyActivatedEvents[n])return S;const D=this._registry.getExtensionDescriptionsForActivationEvent(n);return this._activateExtensions(D.map(T=>({id:T.identifier,reason:{startup:f,extensionId:T.identifier,activationEvent:n}}))).then(()=>{this._alreadyActivatedEvents[n]=!0})}activateById(n,f){const D=this._registry.getExtensionDescription(n);if(!D)throw new Error("Extension `"+n+"` is not known");return this._activateExtensions([{id:D.identifier,reason:f}])}_handleActivateRequest(n,f,D){if(this._hostExtensionsMap.has(k.ExtensionIdentifier.toKey(n.id))){f[k.ExtensionIdentifier.toKey(n.id)]=n;return}const T=this._registry.getExtensionDescription(n.id);if(!T){const b=new Error(`Cannot activate unknown extension '${n.id.value}'`);this._host.onExtensionActivationError(n.id,b,new w.MissingExtensionDependency(n.id.value)),this._activatedExtensions.set(k.ExtensionIdentifier.toKey(n.id),new u(b));return}const d=typeof T.extensionDependencies=="undefined"?[]:T.extensionDependencies;let g=!0;for(let b=0,l=d.length;b<l;b++){const I=d[b];if(this._resolvedExtensionsSet.has(k.ExtensionIdentifier.toKey(I)))continue;const r=this._activatedExtensions.get(k.ExtensionIdentifier.toKey(I));if(r&&!r.activationFailed)continue;if(r&&r.activationFailed){const a=T.displayName||T.identifier.value,p=this._registry.getExtensionDescription(I),h=p&&p.displayName||I,_=new Error(`Cannot activate the '${a}' extension because its dependency '${h}' failed to activate`);_.detail=r.activationFailedError,this._host.onExtensionActivationError(T.identifier,_,null),this._activatedExtensions.set(k.ExtensionIdentifier.toKey(T.identifier),new u(_));return}if(this._hostExtensionsMap.has(k.ExtensionIdentifier.toKey(I))){g=!1,f[k.ExtensionIdentifier.toKey(I)]={id:this._hostExtensionsMap.get(k.ExtensionIdentifier.toKey(I)),reason:n.reason};continue}const i=this._registry.getExtensionDescription(I);if(i){if(!i.main&&!i.browser)continue;g=!1,f[k.ExtensionIdentifier.toKey(I)]={id:i.identifier,reason:n.reason};continue}const c=T.displayName||T.identifier.value,t=new Error(`Cannot activate the '${c}' extension because it depends on unknown extension '${I}'`);this._host.onExtensionActivationError(T.identifier,t,new w.MissingExtensionDependency(I)),this._activatedExtensions.set(k.ExtensionIdentifier.toKey(T.identifier),new u(t));return}g?f[k.ExtensionIdentifier.toKey(T.identifier)]=n:D.push(n)}_activateExtensions(n){if(n.length===0||(n=n.filter(d=>!this._activatedExtensions.has(k.ExtensionIdentifier.toKey(d.id))),n.length===0))return Promise.resolve(void 0);const f=Object.create(null),D=[];for(let d=0,g=n.length;d<g;d++)this._handleActivateRequest(n[d],f,D);for(let d=0,g=D.length;d<g;d++){const b=k.ExtensionIdentifier.toKey(D[d].id);f[b]&&delete f[b]}const T=Object.keys(f).map(d=>f[d]);return D.length===0?Promise.all(T.map(d=>this._activateExtension(d.id,d.reason))).then(d=>{}):this._activateExtensions(T).then(d=>this._activateExtensions(D))}_activateExtension(n,f){const D=k.ExtensionIdentifier.toKey(n);if(this._activatedExtensions.has(D))return Promise.resolve(void 0);const T=this._activatingExtensions.get(D);if(T)return T;const d=this._host.actualActivateExtension(n,f).then(void 0,g=>{const b=new Error;return g&&g.name&&(b.name=g.name),g&&g.message?b.message=`Activating extension '${n.value}' failed: ${g.message}.`:b.message=`Activating extension '${n.value}' failed: ${g}.`,g&&g.stack&&(b.stack=g.stack),this._isDisposed&&o.isCancellationError(g)?new u(g):(this._host.onExtensionActivationError(n,b,null),this._logService.error(`Activating extension ${n.value} failed due to an error:`),this._logService.error(g),new u(g))}).then(g=>{this._activatedExtensions.set(D,g),this._activatingExtensions.delete(D)});return this._activatingExtensions.set(D,d),d}};m=Fe([Ne(4,B.ILogService)],m),e.ExtensionsActivator=m}),define(Ee[175],we([1,0,12,27,28]),function(J,e,o,k,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtHostLogService=void 0;let B=class extends o.LogService{constructor(A,y){super(A.createLogger(y.logFile,{name:w.ExtensionHostLogFileName}))}};B=Fe([Ne(0,o.ILoggerService),Ne(1,k.IExtHostInitDataService)],B),e.ExtHostLogService=B}),define(Ee[176],we([1,0,15]),function(J,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LazyPromise=void 0;class k{constructor(){this._actual=null,this._actualOk=null,this._actualErr=null,this._hasValue=!1,this._value=null,this._hasErr=!1,this._err=null}get[Symbol.toStringTag](){return this.toString()}_ensureActual(){return this._actual||(this._actual=new Promise((B,S)=>{this._actualOk=B,this._actualErr=S,this._hasValue&&this._actualOk(this._value),this._hasErr&&this._actualErr(this._err)})),this._actual}resolveOk(B){this._hasValue||this._hasErr||(this._hasValue=!0,this._value=B,this._actual&&this._actualOk(B))}resolveErr(B){this._hasValue||this._hasErr||(this._hasErr=!0,this._err=B,this._actual?this._actualErr(B):(0,o.onUnexpectedError)(B))}then(B,S){return this._ensureActual().then(B,S)}catch(B){return this._ensureActual().then(void 0,B)}finally(B){return this._ensureActual().finally(B)}}e.LazyPromise=k}),define(Ee[38],we([1,0]),function(J,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SerializableObjectWithBuffers=e.getStringIdentifierForProxy=e.createProxyIdentifier=e.ProxyIdentifier=void 0;class o{constructor(y){this._proxyIdentifierBrand=void 0,this.sid=y,this.nid=++o.count}}e.ProxyIdentifier=o,o.count=0;const k=[];function w(A){const y=new o(A);return k[y.nid]=y,y}e.createProxyIdentifier=w;function B(A){return k[A].sid}e.getStringIdentifierForProxy=B;class S{constructor(y){this.value=y}}e.SerializableObjectWithBuffers=S}),define(Ee[4],we([1,0,54,2,38]),function(J,e,o,k,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtHostContext=e.MainContext=e.ExtHostTestingResource=e.reviveWorkspaceEditDto=e.WorkspaceEditType=e.ISuggestResultDtoField=e.ISuggestDataDtoField=e.IdObject=e.CandidatePortSource=e.NotebookEditorRevealType=e.CellOutputKind=e.WebviewMessageArrayBufferViewType=e.WebviewEditorCapabilities=e.TabKind=e.TextEditorRevealType=void 0;var B;(function(T){T[T.Default=0]="Default",T[T.InCenter=1]="InCenter",T[T.InCenterIfOutsideViewport=2]="InCenterIfOutsideViewport",T[T.AtTop=3]="AtTop"})(B=e.TextEditorRevealType||(e.TextEditorRevealType={}));var S;(function(T){T[T.Singular=0]="Singular",T[T.Diff=1]="Diff",T[T.SidebySide=2]="SidebySide",T[T.Other=3]="Other"})(S=e.TabKind||(e.TabKind={}));var A;(function(T){T[T.Editable=0]="Editable",T[T.SupportsHotExit=1]="SupportsHotExit"})(A=e.WebviewEditorCapabilities||(e.WebviewEditorCapabilities={}));var y;(function(T){T[T.Int8Array=1]="Int8Array",T[T.Uint8Array=2]="Uint8Array",T[T.Uint8ClampedArray=3]="Uint8ClampedArray",T[T.Int16Array=4]="Int16Array",T[T.Uint16Array=5]="Uint16Array",T[T.Int32Array=6]="Int32Array",T[T.Uint32Array=7]="Uint32Array",T[T.Float32Array=8]="Float32Array",T[T.Float64Array=9]="Float64Array",T[T.BigInt64Array=10]="BigInt64Array",T[T.BigUint64Array=11]="BigUint64Array"})(y=e.WebviewMessageArrayBufferViewType||(e.WebviewMessageArrayBufferViewType={}));var M;(function(T){T[T.Text=1]="Text",T[T.Error=2]="Error",T[T.Rich=3]="Rich"})(M=e.CellOutputKind||(e.CellOutputKind={}));var L;(function(T){T[T.Default=0]="Default",T[T.InCenter=1]="InCenter",T[T.InCenterIfOutsideViewport=2]="InCenterIfOutsideViewport",T[T.AtTop=3]="AtTop"})(L=e.NotebookEditorRevealType||(e.NotebookEditorRevealType={}));var v;(function(T){T[T.None=0]="None",T[T.Process=1]="Process",T[T.Output=2]="Output"})(v=e.CandidatePortSource||(e.CandidatePortSource={}));class u{static mixin(d){return d._id=u._n++,d}}e.IdObject=u,u._n=0;var m;(function(T){T.label="a",T.kind="b",T.detail="c",T.documentation="d",T.sortText="e",T.filterText="f",T.preselect="g",T.insertText="h",T.insertTextRules="i",T.range="j",T.commitCharacters="k",T.additionalTextEdits="l",T.command="m",T.kindModifier="n"})(m=e.ISuggestDataDtoField||(e.ISuggestDataDtoField={}));var s;(function(T){T.defaultRanges="a",T.completions="b",T.isIncomplete="c",T.duration="d"})(s=e.ISuggestResultDtoField||(e.ISuggestResultDtoField={}));var n;(function(T){T[T.File=1]="File",T[T.Text=2]="Text",T[T.Cell=3]="Cell"})(n=e.WorkspaceEditType||(e.WorkspaceEditType={}));function f(T){if(T&&T.edits)for(const d of T.edits)typeof d.resource=="object"?d.resource=k.URI.revive(d.resource):(d.newUri=k.URI.revive(d.newUri),d.oldUri=k.URI.revive(d.oldUri)),d.metadata&&d.metadata.iconPath&&(d.metadata=(0,o.revive)(d.metadata));return T}e.reviveWorkspaceEditDto=f;var D;(function(T){T[T.Workspace=0]="Workspace",T[T.TextDocument=1]="TextDocument"})(D=e.ExtHostTestingResource||(e.ExtHostTestingResource={})),e.MainContext={MainThreadAuthentication:(0,w.createProxyIdentifier)("MainThreadAuthentication"),MainThreadBulkEdits:(0,w.createProxyIdentifier)("MainThreadBulkEdits"),MainThreadClipboard:(0,w.createProxyIdentifier)("MainThreadClipboard"),MainThreadCommands:(0,w.createProxyIdentifier)("MainThreadCommands"),MainThreadComments:(0,w.createProxyIdentifier)("MainThreadComments"),MainThreadConfiguration:(0,w.createProxyIdentifier)("MainThreadConfiguration"),MainThreadConsole:(0,w.createProxyIdentifier)("MainThreadConsole"),MainThreadDebugService:(0,w.createProxyIdentifier)("MainThreadDebugService"),MainThreadDecorations:(0,w.createProxyIdentifier)("MainThreadDecorations"),MainThreadDiagnostics:(0,w.createProxyIdentifier)("MainThreadDiagnostics"),MainThreadDialogs:(0,w.createProxyIdentifier)("MainThreadDiaglogs"),MainThreadDocuments:(0,w.createProxyIdentifier)("MainThreadDocuments"),MainThreadDocumentContentProviders:(0,w.createProxyIdentifier)("MainThreadDocumentContentProviders"),MainThreadTextEditors:(0,w.createProxyIdentifier)("MainThreadTextEditors"),MainThreadEditorInsets:(0,w.createProxyIdentifier)("MainThreadEditorInsets"),MainThreadEditorTabs:(0,w.createProxyIdentifier)("MainThreadEditorTabs"),MainThreadErrors:(0,w.createProxyIdentifier)("MainThreadErrors"),MainThreadTreeViews:(0,w.createProxyIdentifier)("MainThreadTreeViews"),MainThreadDownloadService:(0,w.createProxyIdentifier)("MainThreadDownloadService"),MainThreadKeytar:(0,w.createProxyIdentifier)("MainThreadKeytar"),MainThreadLanguageFeatures:(0,w.createProxyIdentifier)("MainThreadLanguageFeatures"),MainThreadLanguages:(0,w.createProxyIdentifier)("MainThreadLanguages"),MainThreadLogger:(0,w.createProxyIdentifier)("MainThreadLogger"),MainThreadMessageService:(0,w.createProxyIdentifier)("MainThreadMessageService"),MainThreadOutputService:(0,w.createProxyIdentifier)("MainThreadOutputService"),MainThreadProgress:(0,w.createProxyIdentifier)("MainThreadProgress"),MainThreadQuickOpen:(0,w.createProxyIdentifier)("MainThreadQuickOpen"),MainThreadStatusBar:(0,w.createProxyIdentifier)("MainThreadStatusBar"),MainThreadSecretState:(0,w.createProxyIdentifier)("MainThreadSecretState"),MainThreadStorage:(0,w.createProxyIdentifier)("MainThreadStorage"),MainThreadTelemetry:(0,w.createProxyIdentifier)("MainThreadTelemetry"),MainThreadTerminalService:(0,w.createProxyIdentifier)("MainThreadTerminalService"),MainThreadWebviews:(0,w.createProxyIdentifier)("MainThreadWebviews"),MainThreadWebviewPanels:(0,w.createProxyIdentifier)("MainThreadWebviewPanels"),MainThreadWebviewViews:(0,w.createProxyIdentifier)("MainThreadWebviewViews"),MainThreadCustomEditors:(0,w.createProxyIdentifier)("MainThreadCustomEditors"),MainThreadUrls:(0,w.createProxyIdentifier)("MainThreadUrls"),MainThreadUriOpeners:(0,w.createProxyIdentifier)("MainThreadUriOpeners"),MainThreadWorkspace:(0,w.createProxyIdentifier)("MainThreadWorkspace"),MainThreadFileSystem:(0,w.createProxyIdentifier)("MainThreadFileSystem"),MainThreadExtensionService:(0,w.createProxyIdentifier)("MainThreadExtensionService"),MainThreadSCM:(0,w.createProxyIdentifier)("MainThreadSCM"),MainThreadSearch:(0,w.createProxyIdentifier)("MainThreadSearch"),MainThreadTask:(0,w.createProxyIdentifier)("MainThreadTask"),MainThreadWindow:(0,w.createProxyIdentifier)("MainThreadWindow"),MainThreadLabelService:(0,w.createProxyIdentifier)("MainThreadLabelService"),MainThreadNotebook:(0,w.createProxyIdentifier)("MainThreadNotebook"),MainThreadNotebookDocuments:(0,w.createProxyIdentifier)("MainThreadNotebookDocumentsShape"),MainThreadNotebookEditors:(0,w.createProxyIdentifier)("MainThreadNotebookEditorsShape"),MainThreadNotebookKernels:(0,w.createProxyIdentifier)("MainThreadNotebookKernels"),MainThreadNotebookRenderers:(0,w.createProxyIdentifier)("MainThreadNotebookRenderers"),MainThreadInteractive:(0,w.createProxyIdentifier)("MainThreadInteractive"),MainThreadTheming:(0,w.createProxyIdentifier)("MainThreadTheming"),MainThreadTunnelService:(0,w.createProxyIdentifier)("MainThreadTunnelService"),MainThreadTimeline:(0,w.createProxyIdentifier)("MainThreadTimeline"),MainThreadTesting:(0,w.createProxyIdentifier)("MainThreadTesting")},e.ExtHostContext={ExtHostCommands:(0,w.createProxyIdentifier)("ExtHostCommands"),ExtHostConfiguration:(0,w.createProxyIdentifier)("ExtHostConfiguration"),ExtHostDiagnostics:(0,w.createProxyIdentifier)("ExtHostDiagnostics"),ExtHostDebugService:(0,w.createProxyIdentifier)("ExtHostDebugService"),ExtHostDecorations:(0,w.createProxyIdentifier)("ExtHostDecorations"),ExtHostDocumentsAndEditors:(0,w.createProxyIdentifier)("ExtHostDocumentsAndEditors"),ExtHostDocuments:(0,w.createProxyIdentifier)("ExtHostDocuments"),ExtHostDocumentContentProviders:(0,w.createProxyIdentifier)("ExtHostDocumentContentProviders"),ExtHostDocumentSaveParticipant:(0,w.createProxyIdentifier)("ExtHostDocumentSaveParticipant"),ExtHostEditors:(0,w.createProxyIdentifier)("ExtHostEditors"),ExtHostTreeViews:(0,w.createProxyIdentifier)("ExtHostTreeViews"),ExtHostFileSystem:(0,w.createProxyIdentifier)("ExtHostFileSystem"),ExtHostFileSystemInfo:(0,w.createProxyIdentifier)("ExtHostFileSystemInfo"),ExtHostFileSystemEventService:(0,w.createProxyIdentifier)("ExtHostFileSystemEventService"),ExtHostLanguages:(0,w.createProxyIdentifier)("ExtHostLanguages"),ExtHostLanguageFeatures:(0,w.createProxyIdentifier)("ExtHostLanguageFeatures"),ExtHostQuickOpen:(0,w.createProxyIdentifier)("ExtHostQuickOpen"),ExtHostExtensionService:(0,w.createProxyIdentifier)("ExtHostExtensionService"),ExtHostLogLevelServiceShape:(0,w.createProxyIdentifier)("ExtHostLogLevelServiceShape"),ExtHostTerminalService:(0,w.createProxyIdentifier)("ExtHostTerminalService"),ExtHostSCM:(0,w.createProxyIdentifier)("ExtHostSCM"),ExtHostSearch:(0,w.createProxyIdentifier)("ExtHostSearch"),ExtHostTask:(0,w.createProxyIdentifier)("ExtHostTask"),ExtHostWorkspace:(0,w.createProxyIdentifier)("ExtHostWorkspace"),ExtHostWindow:(0,w.createProxyIdentifier)("ExtHostWindow"),ExtHostWebviews:(0,w.createProxyIdentifier)("ExtHostWebviews"),ExtHostWebviewPanels:(0,w.createProxyIdentifier)("ExtHostWebviewPanels"),ExtHostCustomEditors:(0,w.createProxyIdentifier)("ExtHostCustomEditors"),ExtHostWebviewViews:(0,w.createProxyIdentifier)("ExtHostWebviewViews"),ExtHostEditorInsets:(0,w.createProxyIdentifier)("ExtHostEditorInsets"),ExtHostEditorTabs:(0,w.createProxyIdentifier)("ExtHostEditorTabs"),ExtHostProgress:(0,w.createProxyIdentifier)("ExtHostProgress"),ExtHostComments:(0,w.createProxyIdentifier)("ExtHostComments"),ExtHostSecretState:(0,w.createProxyIdentifier)("ExtHostSecretState"),ExtHostStorage:(0,w.createProxyIdentifier)("ExtHostStorage"),ExtHostUrls:(0,w.createProxyIdentifier)("ExtHostUrls"),ExtHostUriOpeners:(0,w.createProxyIdentifier)("ExtHostUriOpeners"),ExtHostOutputService:(0,w.createProxyIdentifier)("ExtHostOutputService"),ExtHosLabelService:(0,w.createProxyIdentifier)("ExtHostLabelService"),ExtHostNotebook:(0,w.createProxyIdentifier)("ExtHostNotebook"),ExtHostNotebookDocuments:(0,w.createProxyIdentifier)("ExtHostNotebookDocuments"),ExtHostNotebookEditors:(0,w.createProxyIdentifier)("ExtHostNotebookEditors"),ExtHostNotebookKernels:(0,w.createProxyIdentifier)("ExtHostNotebookKernels"),ExtHostNotebookRenderers:(0,w.createProxyIdentifier)("ExtHostNotebookRenderers"),ExtHostInteractive:(0,w.createProxyIdentifier)("ExtHostInteractive"),ExtHostTheming:(0,w.createProxyIdentifier)("ExtHostTheming"),ExtHostTunnelService:(0,w.createProxyIdentifier)("ExtHostTunnelService"),ExtHostAuthentication:(0,w.createProxyIdentifier)("ExtHostAuthentication"),ExtHostTimeline:(0,w.createProxyIdentifier)("ExtHostTimeline"),ExtHostTesting:(0,w.createProxyIdentifier)("ExtHostTesting"),ExtHostTelemetry:(0,w.createProxyIdentifier)("ExtHostTelemetry")}}),define(Ee[64],we([1,0,4,5,3]),function(J,e,o,k,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IExtHostSecretState=e.ExtHostSecretState=void 0;class B{constructor(A){this._onDidChangePassword=new k.Emitter,this.onDidChangePassword=this._onDidChangePassword.event,this._proxy=A.getProxy(o.MainContext.MainThreadSecretState)}async $onDidChangePassword(A){this._onDidChangePassword.fire(A)}get(A,y){return this._proxy.$getPassword(A,y)}store(A,y,M){return this._proxy.$setPassword(A,y,M)}delete(A,y){return this._proxy.$deletePassword(A,y)}}e.ExtHostSecretState=B,e.IExtHostSecretState=(0,w.createDecorator)("IExtHostSecretState")}),define(Ee[65],we([1,0,3,12,4,14]),function(J,e,o,k,w,B){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NullApiDeprecationService=e.ExtHostApiDeprecationService=e.IExtHostApiDeprecationService=void 0,e.IExtHostApiDeprecationService=(0,o.createDecorator)("IExtHostApiDeprecationService");let S=class{constructor(y,M){this._extHostLogService=M,this._reportedUsages=new Set,this._telemetryShape=y.getProxy(w.MainContext.MainThreadTelemetry)}report(y,M,L){const v=this.getUsageKey(y,M);this._reportedUsages.has(v)||(this._reportedUsages.add(v),M.isUnderDevelopment&&this._extHostLogService.warn(`[Deprecation Warning] '${y}' is deprecated. ${L}`),this._telemetryShape.$publicLog2("extHostDeprecatedApiUsage",{extensionId:M.identifier.value,apiId:y}))}getUsageKey(y,M){return`${y}-${M.identifier.value}`}};S=Fe([Ne(0,B.IExtHostRpcService),Ne(1,k.ILogService)],S),e.ExtHostApiDeprecationService=S,e.NullApiDeprecationService=Object.freeze(new class{report(A,y,M){}})}),define(Ee[177],we([1,0,5,4,7,25]),function(J,e,o,k,w,B){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtHostAuthentication=void 0;class S{constructor(y){this._authenticationProviders=new Map,this._providers=[],this._onDidChangeSessions=new o.Emitter,this.onDidChangeSessions=this._onDidChangeSessions.event,this._inFlightRequests=new Map,this._proxy=y.getProxy(k.MainContext.MainThreadAuthentication)}$setProviders(y){return this._providers=y,Promise.resolve()}async getSession(y,M,L,v={}){const u=B.ExtensionIdentifier.toKey(y.identifier),m=this._inFlightRequests.get(u)||[],s=[...L].sort().join(" ");let n=m.find(f=>f.scopes===s);if(n)return n.result;{const f=this._getSession(y,u,M,L,v);n={scopes:s,result:f},m.push(n),this._inFlightRequests.set(u,m);try{await f}finally{const D=m.findIndex(T=>T.scopes===s);D>-1&&(m.splice(D),this._inFlightRequests.set(u,m))}return f}}async _getSession(y,M,L,v,u={}){await this._proxy.$ensureProvider(L);const m=y.displayName||y.name;return this._proxy.$getSession(L,v,M,m,u)}async removeSession(y,M){const L=this._authenticationProviders.get(y);return L?L.provider.removeSession(M):this._proxy.$removeSession(y,M)}registerAuthenticationProvider(y,M,L,v){if(this._authenticationProviders.get(y))throw new Error(`An authentication provider with id '${y}' is already registered.`);this._authenticationProviders.set(y,{label:M,provider:L,options:v??{supportsMultipleAccounts:!1}}),this._providers.find(m=>m.id===y)||this._providers.push({id:y,label:M});const u=L.onDidChangeSessions(m=>{this._proxy.$sendDidChangeSessions(y,{added:m.added??[],changed:m.changed??[],removed:m.removed??[]})});return this._proxy.$registerAuthenticationProvider(y,M,v?.supportsMultipleAccounts??!1),new w.Disposable(()=>{u.dispose(),this._authenticationProviders.delete(y);const m=this._providers.findIndex(s=>s.id===y);m>-1&&this._providers.splice(m),this._proxy.$unregisterAuthenticationProvider(y)})}$createSession(y,M){const L=this._authenticationProviders.get(y);if(L)return Promise.resolve(L.provider.createSession(M));throw new Error(`Unable to find authentication provider with handle: ${y}`)}$removeSession(y,M){const L=this._authenticationProviders.get(y);if(L)return Promise.resolve(L.provider.removeSession(M));throw new Error(`Unable to find authentication provider with handle: ${y}`)}$getSessions(y,M){const L=this._authenticationProviders.get(y);if(L)return Promise.resolve(L.provider.getSessions(M));throw new Error(`Unable to find authentication provider with handle: ${y}`)}$onDidChangeAuthenticationSessions(y,M){return this._onDidChangeSessions.fire({provider:{id:y,label:M}}),Promise.resolve()}}e.ExtHostAuthentication=S}),define(Ee[178],we([1,0,4,14,8]),function(J,e,o,k,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtHostBulkEdits=void 0;let B=class{constructor(A,y){this._proxy=A.getProxy(o.MainContext.MainThreadBulkEdits),this._versionInformationProvider={getTextDocumentVersion:M=>y.getDocument(M)?.version,getNotebookDocumentVersion:()=>{}}}applyWorkspaceEdit(A){const y=w.WorkspaceEdit.from(A,this._versionInformationProvider);return this._proxy.$tryApplyWorkspaceEdit(y)}};B=Fe([Ne(0,k.IExtHostRpcService)],B),e.ExtHostBulkEdits=B}),define(Ee[179],we([1,0,4]),function(J,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtHostClipboard=void 0;class k{constructor(B){const S=B.getProxy(o.MainContext.MainThreadClipboard);this.value=Object.freeze({readText(){return S.$readText()},writeText(A){return S.$writeText(A)}})}}e.ExtHostClipboard=k});var je=this&&this.__classPrivateFieldSet||function(J,e,o,k,w){if(k==="m")throw new TypeError("Private method is not writable");if(k==="a"&&!w)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?J!==e||!w:!e.has(J))throw new TypeError("Cannot write private member to an object whose class did not declare it");return k==="a"?w.call(J,o):w?w.value=o:e.set(J,o),o},De=this&&this.__classPrivateFieldGet||function(J,e,o,k){if(o==="a"&&!k)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?J!==e||!k:!e.has(J))throw new TypeError("Cannot read private member from an object whose class did not declare it");return o==="m"?k:o==="a"?k.call(J):k?k.value:e.get(J)};define(Ee[39],we([1,0,11,7,8,26,4,16,12,54,48,229,2,6,3,14,47,21,38,43]),function(J,e,o,k,w,B,S,A,y,M,L,v,u,m,s,n,f,D,T,d){"use strict";var g;Object.defineProperty(e,"__esModule",{value:!0}),e.ApiCommand=e.ApiCommandResult=e.ApiCommandArgument=e.CommandsConverter=e.IExtHostCommands=e.ExtHostCommands=void 0;let b=class{constructor(t,a){g.set(this,void 0),this._commands=new Map,this._apiCommands=new Map,je(this,g,t.getProxy(S.MainContext.MainThreadCommands),"f"),this._logService=a,this.converter=new l(this,p=>{const h=this._apiCommands.get(p);return h?.result===r.Void?h:void 0},a),this._argumentProcessors=[{processArgument(p){return(0,M.revive)(p)}},{processArgument(p){return(0,B.cloneAndChange)(p,function(h){if(L.Range.isIRange(h))return w.Range.to(h);if(v.Position.isIPosition(h))return w.Position.to(h);if(L.Range.isIRange(h.range)&&u.URI.isUri(h.uri))return w.location.to(h);if(h instanceof D.VSBuffer)return h.buffer.buffer;if(!Array.isArray(h))return h})}}]}registerArgumentProcessor(t){this._argumentProcessors.push(t)}registerApiCommand(t){const a=this.registerCommand(!1,t.id,async(...p)=>{const h=t.args.map((P,R)=>{if(!P.validate(p[R]))throw new Error(`Invalid argument '${P.name}' when running '${t.id}', received: ${p[R]}`);return P.convert(p[R])}),_=await this.executeCommand(t.internalId,...h);return t.result.convert(_,p,this.converter)},void 0,{description:t.description,args:t.args,returns:t.result.description});return this._apiCommands.set(t.id,t),new k.Disposable(()=>{a.dispose(),this._apiCommands.delete(t.id)})}registerCommand(t,a,p,h,_,P){if(this._logService.trace("ExtHostCommands#registerCommand",a),!a.trim().length)throw new Error("invalid id");if(this._commands.has(a))throw new Error(`command '${a}' already exists`);return this._commands.set(a,{callback:p,thisArg:h,description:_,extension:P}),t&&De(this,g,"f").$registerCommand(a),new k.Disposable(()=>{this._commands.delete(a)&&t&&De(this,g,"f").$unregisterCommand(a)})}executeCommand(t,...a){return this._logService.trace("ExtHostCommands#executeCommand",t),this._doExecuteCommand(t,a,!0)}async _doExecuteCommand(t,a,p){if(this._commands.has(t))return this._executeContributedCommand(t,a,!1);{let h=!1;const _=(0,B.cloneAndChange)(a,function(P){if(P instanceof k.Position)return w.Position.from(P);if(P instanceof k.Range)return w.Range.from(P);if(P instanceof k.Location)return w.location.from(P);if(k.NotebookRange.isNotebookRange(P))return w.NotebookRange.from(P);if(P instanceof ArrayBuffer)return h=!0,D.VSBuffer.wrap(new Uint8Array(P));if(P instanceof Uint8Array)return h=!0,D.VSBuffer.wrap(P);if(!Array.isArray(P))return P});try{const P=await De(this,g,"f").$executeCommand(t,h?new T.SerializableObjectWithBuffers(_):_,p);return(0,M.revive)(P)}catch(P){if(P instanceof Error&&P.message==="$executeCommand:retry")return this._doExecuteCommand(t,a,!1);throw P}}}async _executeContributedCommand(t,a,p){const h=this._commands.get(t);if(!h)throw new Error("Unknown command");let{callback:_,thisArg:P,description:R}=h;if(R)for(let $=0;$<R.args.length;$++)try{(0,o.validateConstraint)(a[$],R.args[$].constraint)}catch{throw new Error(`Running the contributed command: '${t}' failed. Illegal argument '${R.args[$].name}' - ${R.args[$].description}`)}try{return await _.apply(P,a)}catch($){if(t===this.converter.delegatingCommandId){const E=this.converter.getActualCommand(...a);E&&(t=E.command)}throw this._logService.error($,t,h.extension?.identifier),p?new class extends Error{constructor(){super((0,d.toErrorMessage)($));this.id=t,this.source=h.extension?.displayName??h.extension?.name}}:$}}$executeContributedCommand(t,...a){return this._logService.trace("ExtHostCommands#$executeContributedCommand",t),this._commands.has(t)?(a=a.map(p=>this._argumentProcessors.reduce((h,_)=>_.processArgument(h),p)),this._executeContributedCommand(t,a,!0)):Promise.reject(new Error(`Contributed command '${t}' does not exist.`))}getCommands(t=!1){return this._logService.trace("ExtHostCommands#getCommands",t),De(this,g,"f").$getCommands().then(a=>(t&&(a=a.filter(p=>p[0]!=="_")),a))}$getContributedCommandHandlerDescriptions(){const t=Object.create(null);for(let[a,p]of this._commands){let{description:h}=p;h&&(t[a]=h)}return Promise.resolve(t)}};g=new WeakMap,b=Fe([Ne(0,n.IExtHostRpcService),Ne(1,y.ILogService)],b),e.ExtHostCommands=b,e.IExtHostCommands=(0,s.createDecorator)("IExtHostCommands");class l{constructor(t,a,p){this._commands=t,this._lookupApiCommand=a,this._logService=p,this.delegatingCommandId=`_vscode_delegate_cmd_${Date.now().toString(36)}`,this._cache=new Map,this._cachIdPool=0,this._commands.registerCommand(!0,this.delegatingCommandId,this._executeConvertedCommand,this)}toInternal(t,a){if(!t)return;const p={$ident:void 0,id:t.command,title:t.title,tooltip:t.tooltip};if(!t.command)return p;const h=this._lookupApiCommand(t.command);if(h)p.id=h.internalId,p.arguments=h.args.map((_,P)=>_.convert(t.arguments&&t.arguments[P]));else if((0,A.isNonEmptyArray)(t.arguments)){const _=++this._cachIdPool;this._cache.set(_,t),a.add((0,m.toDisposable)(()=>{this._cache.delete(_),this._logService.trace("CommandsConverter#DISPOSE",_)})),p.$ident=_,p.id=this.delegatingCommandId,p.arguments=[_],this._logService.trace("CommandsConverter#CREATE",t.command,_)}return p}fromInternal(t){return typeof t.$ident=="number"?this._cache.get(t.$ident):{command:t.id,title:t.title,arguments:t.arguments}}getActualCommand(...t){return this._cache.get(t[0])}_executeConvertedCommand(...t){const a=this.getActualCommand(...t);return this._logService.trace("CommandsConverter#EXECUTE",t[0],a?a.command:"MISSING"),a?this._commands.executeCommand(a.command,...a.arguments||[]):Promise.reject("actual command NOT FOUND")}}e.CommandsConverter=l;class I{constructor(t,a,p,h){this.name=t,this.description=a,this.validate=p,this.convert=h}optional(){return new I(this.name,`(optional) ${this.description}`,t=>t==null||this.validate(t),t=>t===void 0?void 0:t===null?null:this.convert(t))}with(t,a){return new I(t??this.name,a??this.description,this.validate,this.convert)}}e.ApiCommandArgument=I,I.Uri=new I("uri","Uri of a text document",c=>u.URI.isUri(c),c=>c),I.Position=new I("position","A position in a text document",c=>k.Position.isPosition(c),w.Position.from),I.Range=new I("range","A range in a text document",c=>k.Range.isRange(c),w.Range.from),I.Selection=new I("selection","A selection in a text document",c=>k.Selection.isSelection(c),w.Selection.from),I.Number=new I("number","",c=>typeof c=="number",c=>c),I.String=new I("string","",c=>typeof c=="string",c=>c),I.CallHierarchyItem=new I("item","A call hierarchy item",c=>c instanceof k.CallHierarchyItem,w.CallHierarchyItem.from),I.TypeHierarchyItem=new I("item","A type hierarchy item",c=>c instanceof k.TypeHierarchyItem,w.TypeHierarchyItem.from),I.TestItem=new I("testItem","A VS Code TestItem",c=>c instanceof f.TestItemImpl,w.TestItem.from);class r{constructor(t,a){this.description=t,this.convert=a}}e.ApiCommandResult=r,r.Void=new r("no result",c=>c);class i{constructor(t,a,p,h,_){this.id=t,this.internalId=a,this.description=p,this.args=h,this.result=_}}e.ApiCommand=i}),define(Ee[180],we([1,0,2,8,7,88,39,16,75,79,9]),function(J,e,o,k,w,B,S,A,y,M,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtHostApiCommands=void 0;const v=[new S.ApiCommand("vscode.executeDocumentHighlights","_executeDocumentHighlights","Execute document highlight provider.",[S.ApiCommandArgument.Uri,S.ApiCommandArgument.Position],new S.ApiCommandResult("A promise that resolves to an array of DocumentHighlight-instances.",m(k.DocumentHighlight.to))),new S.ApiCommand("vscode.executeDocumentSymbolProvider","_executeDocumentSymbolProvider","Execute document symbol provider.",[S.ApiCommandArgument.Uri],new S.ApiCommandResult("A promise that resolves to an array of SymbolInformation and DocumentSymbol instances.",(n,f)=>{if((0,A.isFalsyOrEmpty)(n))return;class D extends w.SymbolInformation{static to(d){const g=new D(d.name,k.SymbolKind.to(d.kind),d.containerName||"",new w.Location(f[0],k.Range.to(d.range)));return g.detail=d.detail,g.range=g.location.range,g.selectionRange=k.Range.to(d.selectionRange),g.children=d.children?d.children.map(D.to):[],g}}return n.map(D.to)})),new S.ApiCommand("vscode.executeFormatDocumentProvider","_executeFormatDocumentProvider","Execute document format provider.",[S.ApiCommandArgument.Uri,new S.ApiCommandArgument("options","Formatting options",n=>!0,n=>n)],new S.ApiCommandResult("A promise that resolves to an array of TextEdits.",m(k.TextEdit.to))),new S.ApiCommand("vscode.executeFormatRangeProvider","_executeFormatRangeProvider","Execute range format provider.",[S.ApiCommandArgument.Uri,S.ApiCommandArgument.Range,new S.ApiCommandArgument("options","Formatting options",n=>!0,n=>n)],new S.ApiCommandResult("A promise that resolves to an array of TextEdits.",m(k.TextEdit.to))),new S.ApiCommand("vscode.executeFormatOnTypeProvider","_executeFormatOnTypeProvider","Execute format on type provider.",[S.ApiCommandArgument.Uri,S.ApiCommandArgument.Position,new S.ApiCommandArgument("ch","Trigger character",n=>typeof n=="string",n=>n),new S.ApiCommandArgument("options","Formatting options",n=>!0,n=>n)],new S.ApiCommandResult("A promise that resolves to an array of TextEdits.",m(k.TextEdit.to))),new S.ApiCommand("vscode.executeDefinitionProvider","_executeDefinitionProvider","Execute all definition providers.",[S.ApiCommandArgument.Uri,S.ApiCommandArgument.Position],new S.ApiCommandResult("A promise that resolves to an array of Location or LocationLink instances.",s)),new S.ApiCommand("vscode.executeTypeDefinitionProvider","_executeTypeDefinitionProvider","Execute all type definition providers.",[S.ApiCommandArgument.Uri,S.ApiCommandArgument.Position],new S.ApiCommandResult("A promise that resolves to an array of Location or LocationLink instances.",s)),new S.ApiCommand("vscode.executeDeclarationProvider","_executeDeclarationProvider","Execute all declaration providers.",[S.ApiCommandArgument.Uri,S.ApiCommandArgument.Position],new S.ApiCommandResult("A promise that resolves to an array of Location or LocationLink instances.",s)),new S.ApiCommand("vscode.executeImplementationProvider","_executeImplementationProvider","Execute all implementation providers.",[S.ApiCommandArgument.Uri,S.ApiCommandArgument.Position],new S.ApiCommandResult("A promise that resolves to an array of Location or LocationLink instances.",s)),new S.ApiCommand("vscode.executeReferenceProvider","_executeReferenceProvider","Execute all reference providers.",[S.ApiCommandArgument.Uri,S.ApiCommandArgument.Position],new S.ApiCommandResult("A promise that resolves to an array of Location-instances.",m(k.location.to))),new S.ApiCommand("vscode.executeHoverProvider","_executeHoverProvider","Execute all hover providers.",[S.ApiCommandArgument.Uri,S.ApiCommandArgument.Position],new S.ApiCommandResult("A promise that resolves to an array of Hover-instances.",m(k.Hover.to))),new S.ApiCommand("vscode.executeSelectionRangeProvider","_executeSelectionRangeProvider","Execute selection range provider.",[S.ApiCommandArgument.Uri,new S.ApiCommandArgument("position","A position in a text document",n=>Array.isArray(n)&&n.every(f=>w.Position.isPosition(f)),n=>n.map(k.Position.from))],new S.ApiCommandResult("A promise that resolves to an array of ranges.",n=>n.map(f=>{let D;for(const T of f.reverse())D=new w.SelectionRange(k.Range.to(T),D);return D}))),new S.ApiCommand("vscode.executeWorkspaceSymbolProvider","_executeWorkspaceSymbolProvider","Execute all workspace symbol providers.",[S.ApiCommandArgument.String.with("query","Search string")],new S.ApiCommandResult("A promise that resolves to an array of SymbolInformation-instances.",n=>n.map(k.WorkspaceSymbol.to))),new S.ApiCommand("vscode.prepareCallHierarchy","_executePrepareCallHierarchy","Prepare call hierarchy at a position inside a document",[S.ApiCommandArgument.Uri,S.ApiCommandArgument.Position],new S.ApiCommandResult("A CallHierarchyItem or undefined",n=>n.map(k.CallHierarchyItem.to))),new S.ApiCommand("vscode.provideIncomingCalls","_executeProvideIncomingCalls","Compute incoming calls for an item",[S.ApiCommandArgument.CallHierarchyItem],new S.ApiCommandResult("A CallHierarchyItem or undefined",n=>n.map(k.CallHierarchyIncomingCall.to))),new S.ApiCommand("vscode.provideOutgoingCalls","_executeProvideOutgoingCalls","Compute outgoing calls for an item",[S.ApiCommandArgument.CallHierarchyItem],new S.ApiCommandResult("A CallHierarchyItem or undefined",n=>n.map(k.CallHierarchyOutgoingCall.to))),new S.ApiCommand("vscode.prepareRename","_executePrepareRename","Execute the prepareRename of rename provider.",[S.ApiCommandArgument.Uri,S.ApiCommandArgument.Position],new S.ApiCommandResult("A promise that resolves to a range and placeholder text.",n=>{if(!!n)return{range:k.Range.to(n.range),placeholder:n.text}})),new S.ApiCommand("vscode.executeDocumentRenameProvider","_executeDocumentRenameProvider","Execute rename provider.",[S.ApiCommandArgument.Uri,S.ApiCommandArgument.Position,S.ApiCommandArgument.String.with("newName","The new symbol name")],new S.ApiCommandResult("A promise that resolves to a WorkspaceEdit.",n=>{if(!!n){if(n.rejectReason)throw new Error(n.rejectReason);return k.WorkspaceEdit.to(n)}})),new S.ApiCommand("vscode.executeLinkProvider","_executeLinkProvider","Execute document link provider.",[S.ApiCommandArgument.Uri,S.ApiCommandArgument.Number.with("linkResolveCount","Number of links that should be resolved, only when links are unresolved.").optional()],new S.ApiCommandResult("A promise that resolves to an array of DocumentLink-instances.",n=>n.map(k.DocumentLink.to))),new S.ApiCommand("vscode.provideDocumentSemanticTokensLegend","_provideDocumentSemanticTokensLegend","Provide semantic tokens legend for a document",[S.ApiCommandArgument.Uri],new S.ApiCommandResult("A promise that resolves to SemanticTokensLegend.",n=>{if(!!n)return new w.SemanticTokensLegend(n.tokenTypes,n.tokenModifiers)})),new S.ApiCommand("vscode.provideDocumentSemanticTokens","_provideDocumentSemanticTokens","Provide semantic tokens for a document",[S.ApiCommandArgument.Uri],new S.ApiCommandResult("A promise that resolves to SemanticTokens.",n=>{if(!n)return;const f=(0,y.decodeSemanticTokensDto)(n);if(f.type==="full")return new w.SemanticTokens(f.data,void 0)})),new S.ApiCommand("vscode.provideDocumentRangeSemanticTokensLegend","_provideDocumentRangeSemanticTokensLegend","Provide semantic tokens legend for a document range",[S.ApiCommandArgument.Uri,S.ApiCommandArgument.Range.optional()],new S.ApiCommandResult("A promise that resolves to SemanticTokensLegend.",n=>{if(!!n)return new w.SemanticTokensLegend(n.tokenTypes,n.tokenModifiers)})),new S.ApiCommand("vscode.provideDocumentRangeSemanticTokens","_provideDocumentRangeSemanticTokens","Provide semantic tokens for a document range",[S.ApiCommandArgument.Uri,S.ApiCommandArgument.Range],new S.ApiCommandResult("A promise that resolves to SemanticTokens.",n=>{if(!n)return;const f=(0,y.decodeSemanticTokensDto)(n);if(f.type==="full")return new w.SemanticTokens(f.data,void 0)})),new S.ApiCommand("vscode.executeCompletionItemProvider","_executeCompletionItemProvider","Execute completion item provider.",[S.ApiCommandArgument.Uri,S.ApiCommandArgument.Position,S.ApiCommandArgument.String.with("triggerCharacter","Trigger completion when the user types the character, like `,` or `(`").optional(),S.ApiCommandArgument.Number.with("itemResolveCount","Number of completions to resolve (too large numbers slow down completions)").optional()],new S.ApiCommandResult("A promise that resolves to a CompletionList-instance.",(n,f,D)=>{if(!n)return new w.CompletionList([]);const T=n.suggestions.map(d=>k.CompletionItem.to(d,D));return new w.CompletionList(T,n.incomplete)})),new S.ApiCommand("vscode.executeSignatureHelpProvider","_executeSignatureHelpProvider","Execute signature help provider.",[S.ApiCommandArgument.Uri,S.ApiCommandArgument.Position,S.ApiCommandArgument.String.with("triggerCharacter","Trigger signature help when the user types the character, like `,` or `(`").optional()],new S.ApiCommandResult("A promise that resolves to SignatureHelp.",n=>{if(n)return k.SignatureHelp.to(n)})),new S.ApiCommand("vscode.executeCodeLensProvider","_executeCodeLensProvider","Execute code lens provider.",[S.ApiCommandArgument.Uri,S.ApiCommandArgument.Number.with("itemResolveCount","Number of lenses that should be resolved and returned. Will only return resolved lenses, will impact performance)").optional()],new S.ApiCommandResult("A promise that resolves to an array of CodeLens-instances.",(n,f,D)=>m(T=>new w.CodeLens(k.Range.to(T.range),T.command&&D.fromInternal(T.command)))(n))),new S.ApiCommand("vscode.executeCodeActionProvider","_executeCodeActionProvider","Execute code action provider.",[S.ApiCommandArgument.Uri,new S.ApiCommandArgument("rangeOrSelection","Range in a text document. Some refactoring provider requires Selection object.",n=>w.Range.isRange(n),n=>w.Selection.isSelection(n)?k.Selection.from(n):k.Range.from(n)),S.ApiCommandArgument.String.with("kind","Code action kind to return code actions for").optional(),S.ApiCommandArgument.Number.with("itemResolveCount","Number of code actions to resolve (too large numbers slow down code actions)").optional()],new S.ApiCommandResult("A promise that resolves to an array of Command-instances.",(n,f,D)=>m(T=>{if(T._isSynthetic){if(!T.command)throw new Error("Synthetic code actions must have a command");return D.fromInternal(T.command)}else{const d=new w.CodeAction(T.title,T.kind?new w.CodeActionKind(T.kind):void 0);return T.edit&&(d.edit=k.WorkspaceEdit.to(T.edit)),T.command&&(d.command=D.fromInternal(T.command)),d.isPreferred=T.isPreferred,d}})(n))),new S.ApiCommand("vscode.executeDocumentColorProvider","_executeDocumentColorProvider","Execute document color provider.",[S.ApiCommandArgument.Uri],new S.ApiCommandResult("A promise that resolves to an array of ColorInformation objects.",n=>n?n.map(f=>new w.ColorInformation(k.Range.to(f.range),k.Color.to(f.color))):[])),new S.ApiCommand("vscode.executeColorPresentationProvider","_executeColorPresentationProvider","Execute color presentation provider.",[new S.ApiCommandArgument("color","The color to show and insert",n=>n instanceof w.Color,k.Color.from),new S.ApiCommandArgument("context","Context object with uri and range",n=>!0,n=>({uri:n.uri,range:k.Range.from(n.range)}))],new S.ApiCommandResult("A promise that resolves to an array of ColorPresentation objects.",n=>n?n.map(k.ColorPresentation.to):[])),new S.ApiCommand("vscode.executeInlayHintProvider","_executeInlayHintProvider","Execute inlay hints provider",[S.ApiCommandArgument.Uri,S.ApiCommandArgument.Range],new S.ApiCommandResult("A promise that resolves to an array of Inlay objects",(n,f,D)=>n.map(k.InlayHint.to.bind(void 0,D)))),new S.ApiCommand("vscode.resolveNotebookContentProviders","_resolveNotebookContentProvider","Resolve Notebook Content Providers",[],new S.ApiCommandResult("A promise that resolves to an array of NotebookContentProvider static info objects.",m(n=>({viewType:n.viewType,displayName:n.displayName,options:{transientOutputs:n.options.transientOutputs,transientCellMetadata:n.options.transientCellMetadata,transientDocumentMetadata:n.options.transientDocumentMetadata},filenamePattern:n.filenamePattern.map(f=>k.NotebookExclusiveDocumentPattern.to(f))})))),new S.ApiCommand("vscode.executeInlineValueProvider","_executeInlineValueProvider","Execute inline value provider",[S.ApiCommandArgument.Uri,S.ApiCommandArgument.Range],new S.ApiCommandResult("A promise that resolves to an array of InlineValue objects",n=>n.map(k.InlineValue.to))),new S.ApiCommand("vscode.open","_workbench.open","Opens the provided resource in the editor. Can be a text or binary file, or an http(s) URL. If you need more control over the options for opening a text file, use vscode.window.showTextDocument instead.",[new S.ApiCommandArgument("uriOrString","Uri-instance or string (only http/https)",n=>o.URI.isUri(n)||typeof n=="string"&&(0,M.matchesSomeScheme)(n,L.Schemas.http,L.Schemas.https),n=>n),new S.ApiCommandArgument("columnOrOptions","Either the column in which to open or editor options, see vscode.TextDocumentShowOptions",n=>n===void 0||typeof n=="number"||typeof n=="object",n=>n&&(typeof n=="number"?[k.ViewColumn.from(n),void 0]:[k.ViewColumn.from(n.viewColumn),k.TextEditorOpenOptions.from(n)])).optional(),S.ApiCommandArgument.String.with("label","").optional()],S.ApiCommandResult.Void),new S.ApiCommand("vscode.openWith","_workbench.openWith","Opens the provided resource with a specific editor.",[S.ApiCommandArgument.Uri.with("resource","Resource to open"),S.ApiCommandArgument.String.with("viewId","Custom editor view id or 'default' to use VS Code's default editor"),new S.ApiCommandArgument("columnOrOptions","Either the column in which to open or editor options, see vscode.TextDocumentShowOptions",n=>n===void 0||typeof n=="number"||typeof n=="object",n=>n&&(typeof n=="number"?[k.ViewColumn.from(n),void 0]:[k.ViewColumn.from(n.viewColumn),k.TextEditorOpenOptions.from(n)])).optional()],S.ApiCommandResult.Void),new S.ApiCommand("vscode.diff","_workbench.diff","Opens the provided resources in the diff editor to compare their contents.",[S.ApiCommandArgument.Uri.with("left","Left-hand side resource of the diff editor"),S.ApiCommandArgument.Uri.with("right","Right-hand side resource of the diff editor"),S.ApiCommandArgument.String.with("title","Human readable title for the diff editor").optional(),new S.ApiCommandArgument("columnOrOptions","Either the column in which to open or editor options, see vscode.TextDocumentShowOptions",n=>n===void 0||typeof n=="object",n=>n&&[k.ViewColumn.from(n.viewColumn),k.TextEditorOpenOptions.from(n)]).optional()],S.ApiCommandResult.Void),new S.ApiCommand("vscode.prepareTypeHierarchy","_executePrepareTypeHierarchy","Prepare type hierarchy at a position inside a document",[S.ApiCommandArgument.Uri,S.ApiCommandArgument.Position],new S.ApiCommandResult("A TypeHierarchyItem or undefined",n=>n.map(k.TypeHierarchyItem.to))),new S.ApiCommand("vscode.provideSupertypes","_executeProvideSupertypes","Compute supertypes for an item",[S.ApiCommandArgument.TypeHierarchyItem],new S.ApiCommandResult("A TypeHierarchyItem or undefined",n=>n.map(k.TypeHierarchyItem.to))),new S.ApiCommand("vscode.provideSubtypes","_executeProvideSubtypes","Compute subtypes for an item",[S.ApiCommandArgument.TypeHierarchyItem],new S.ApiCommandResult("A TypeHierarchyItem or undefined",n=>n.map(k.TypeHierarchyItem.to))),new S.ApiCommand("vscode.revealTestInExplorer","_revealTestInExplorer","Reveals a test instance in the explorer",[S.ApiCommandArgument.TestItem],S.ApiCommandResult.Void)];class u{static register(f){v.forEach(f.registerApiCommand,f)}}e.ExtHostApiCommands=u;function m(n){return f=>{if(Array.isArray(f))return f.map(n)}}function s(n){if(!Array.isArray(n))return;const f=[];for(const D of n)B.isLocationLink(D)?f.push(k.DefinitionLink.to(D)):f.push(k.location.to(D));return f}}),define(Ee[181],we([1,0,13,52,5,6,2,88,25,8,7,4]),function(J,e,o,k,w,B,S,A,y,M,L,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createExtHostComments=void 0;function u(m,s,n){const f=m.getProxy(v.MainContext.MainThreadComments);class D{constructor(){this._commentControllers=new Map,this._commentControllersByExtension=new Map,s.registerArgumentProcessor({processArgument:i=>{if(i&&i.$mid===6){const c=this._commentControllers.get(i.handle);return c||i}else if(i&&i.$mid===7){const c=this._commentControllers.get(i.commentControlHandle);if(!c)return i;const t=c.getCommentThread(i.commentThreadHandle);return t||i}else if(i&&i.$mid===8){const c=this._commentControllers.get(i.thread.commentControlHandle);if(!c)return i;const t=c.getCommentThread(i.thread.commentThreadHandle);return t?{thread:t,text:i.text}:i}else if(i&&i.$mid===9){const c=this._commentControllers.get(i.thread.commentControlHandle);if(!c)return i;const t=c.getCommentThread(i.thread.commentThreadHandle);if(!t)return i;let a=i.commentUniqueId,p=t.getCommentByUniqueId(a);return p||i}else if(i&&i.$mid===10){const c=this._commentControllers.get(i.thread.commentControlHandle);if(!c)return i;const t=c.getCommentThread(i.thread.commentThreadHandle);if(!t)return i;let a=i.text,p=i.commentUniqueId,h=t.getCommentByUniqueId(p);return h?(h.body=a,h):i}return i}})}createCommentController(i,c,t){const a=D.handlePool++,p=new d(i,a,c,t);this._commentControllers.set(p.handle,p);const h=this._commentControllersByExtension.get(y.ExtensionIdentifier.toKey(i.identifier))||[];return h.push(p),this._commentControllersByExtension.set(y.ExtensionIdentifier.toKey(i.identifier),h),p.value}$createCommentThreadTemplate(i,c,t){const a=this._commentControllers.get(i);!a||a.$createCommentThreadTemplate(c,t)}async $updateCommentThreadTemplate(i,c,t){const a=this._commentControllers.get(i);!a||a.$updateCommentThreadTemplate(c,t)}$deleteCommentThread(i,c){const t=this._commentControllers.get(i);t&&t.$deleteCommentThread(c)}$provideCommentingRanges(i,c,t){const a=this._commentControllers.get(i);if(!a||!a.commentingRangeProvider)return Promise.resolve(void 0);const p=n.getDocument(S.URI.revive(c));return(0,o.asPromise)(()=>a.commentingRangeProvider.provideCommentingRanges(p,t)).then(h=>h?h.map(_=>M.Range.from(_)):void 0)}$toggleReaction(i,c,t,a,p){const h=this._commentControllers.get(i);return!h||!h.reactionHandler?Promise.resolve(void 0):(0,o.asPromise)(()=>{const _=h.getCommentThread(c);if(_){const P=_.getCommentByUniqueId(a.uniqueIdInThread);if(h!==void 0&&P&&h.reactionHandler)return h.reactionHandler(P,l(p))}return Promise.resolve(void 0)})}dispose(){}}D.handlePool=0;class T{constructor(i,c,t,a,p,h,_){this._commentControllerHandle=c,this._id=t,this._uri=a,this._range=p,this._comments=h,this.extensionDescription=_,this.handle=T._handlePool++,this.commentHandle=0,this.modifications=Object.create(null),this._onDidUpdateCommentThread=new w.Emitter,this.onDidUpdateCommentThread=this._onDidUpdateCommentThread.event,this._canReply=!0,this._commentsMap=new Map,this._acceptInputDisposables=new B.MutableDisposable,this._acceptInputDisposables.value=new B.DisposableStore,this._id===void 0&&(this._id=`${i}.${this.handle}`),f.$createCommentThread(c,this.handle,this._id,this._uri,M.Range.from(this._range),_.identifier),this._localDisposables=[],this._isDiposed=!1,this._localDisposables.push(this.onDidUpdateCommentThread(()=>{this.eventuallyUpdateCommentThread()})),this.comments=h,this._localDisposables.push({dispose:()=>{f.$deleteCommentThread(c,this.handle)}});const P=this;this.value={get uri(){return P.uri},get range(){return P.range},set range(R){P.range=R},get comments(){return P.comments},set comments(R){P.comments=R},get collapsibleState(){return P.collapsibleState},set collapsibleState(R){P.collapsibleState=R},get canReply(){return P.canReply},set canReply(R){P.canReply=R},get contextValue(){return P.contextValue},set contextValue(R){P.contextValue=R},get label(){return P.label},set label(R){P.label=R},dispose:()=>{P.dispose()}}}set threadId(i){this._id=i}get threadId(){return this._id}get id(){return this._id}get resource(){return this._uri}get uri(){return this._uri}set range(i){i.isEqual(this._range)||(this._range=i,this.modifications.range=i,this._onDidUpdateCommentThread.fire())}get range(){return this._range}set canReply(i){this._canReply!==i&&(this._canReply=i,this.modifications.canReply=i,this._onDidUpdateCommentThread.fire())}get canReply(){return this._canReply}get label(){return this._label}set label(i){this._label=i,this.modifications.label=i,this._onDidUpdateCommentThread.fire()}get contextValue(){return this._contextValue}set contextValue(i){this._contextValue=i,this.modifications.contextValue=i,this._onDidUpdateCommentThread.fire()}get comments(){return this._comments}set comments(i){this._comments=i,this.modifications.comments=i,this._onDidUpdateCommentThread.fire()}get collapsibleState(){return this._collapseState}set collapsibleState(i){this._collapseState=i,this.modifications.collapsibleState=i,this._onDidUpdateCommentThread.fire()}get isDisposed(){return this._isDiposed}eventuallyUpdateCommentThread(){if(this._isDiposed)return;this._acceptInputDisposables.value||(this._acceptInputDisposables.value=new B.DisposableStore);const i=t=>Object.prototype.hasOwnProperty.call(this.modifications,t),c={};i("range")&&(c.range=M.Range.from(this._range)),i("label")&&(c.label=this.label),i("contextValue")&&(c.contextValue=this.contextValue??null),i("comments")&&(c.comments=this._comments.map(t=>g(this,t,this._commentsMap))),i("collapsibleState")&&(c.collapseState=I(this._collapseState)),i("canReply")&&(c.canReply=this.canReply),this.modifications={},f.$updateCommentThread(this._commentControllerHandle,this.handle,this._id,this._uri,c)}getCommentByUniqueId(i){for(let c of this._commentsMap){let t=c[0],a=c[1];if(i===a)return t}}dispose(){this._isDiposed=!0,this._acceptInputDisposables.dispose(),this._localDisposables.forEach(i=>i.dispose())}}T._handlePool=0,Fe([(0,k.debounce)(100)],T.prototype,"eventuallyUpdateCommentThread",null);class d{constructor(i,c,t,a){this._extension=i,this._handle=c,this._id=t,this._label=a,this._threads=new Map,f.$registerCommentController(this.handle,t,a);const p=this;this.value=Object.freeze({id:p.id,label:p.label,get options(){return p.options},set options(h){p.options=h},get commentingRangeProvider(){return p.commentingRangeProvider},set commentingRangeProvider(h){p.commentingRangeProvider=h},get reactionHandler(){return p.reactionHandler},set reactionHandler(h){p.reactionHandler=h},createCommentThread(h,_,P){return p.createCommentThread(h,_,P).value},dispose:()=>{p.dispose()}}),this._localDisposables=[],this._localDisposables.push({dispose:()=>{f.$unregisterCommentController(this.handle)}})}get id(){return this._id}get label(){return this._label}get handle(){return this._handle}get commentingRangeProvider(){return this._commentingRangeProvider}set commentingRangeProvider(i){this._commentingRangeProvider=i,f.$updateCommentingRanges(this.handle)}get reactionHandler(){return this._reactionHandler}set reactionHandler(i){this._reactionHandler=i,f.$updateCommentControllerFeatures(this.handle,{reactionHandler:!!i})}get options(){return this._options}set options(i){this._options=i,f.$updateCommentControllerFeatures(this.handle,{options:this._options})}createCommentThread(i,c,t,a){if(typeof i=="string"){const p=new T(this.id,this.handle,i,c,t,a,this._extension);return this._threads.set(p.handle,p),p}else{const p=new T(this.id,this.handle,void 0,i,c,t,this._extension);return this._threads.set(p.handle,p),p}}$createCommentThreadTemplate(i,c){const t=new T(this.id,this.handle,void 0,S.URI.revive(i),M.Range.to(c),[],this._extension);return t.collapsibleState=A.CommentThreadCollapsibleState.Expanded,this._threads.set(t.handle,t),t}$updateCommentThreadTemplate(i,c){let t=this._threads.get(i);t&&(t.range=M.Range.to(c))}$deleteCommentThread(i){let c=this._threads.get(i);c&&c.dispose(),this._threads.delete(i)}getCommentThread(i){return this._threads.get(i)}dispose(){this._threads.forEach(i=>{i.dispose()}),this._localDisposables.forEach(i=>i.dispose())}}function g(r,i,c){let t=c.get(i);t||(t=++r.commentHandle,c.set(i,t));const a=i.author&&i.author.iconPath?i.author.iconPath.toString():void 0;return{mode:i.mode,contextValue:i.contextValue,uniqueIdInThread:t,body:typeof i.body=="string"?i.body:M.MarkdownString.from(i.body),userName:i.author.name,userIconPath:a,label:i.label,commentReactions:i.reactions?i.reactions.map(p=>b(p)):void 0,timestamp:i.timestamp?.toJSON()}}function b(r){return{label:r.label,iconPath:r.iconPath?M.pathOrURIToURI(r.iconPath):void 0,count:r.count,hasReacted:r.authorHasReacted}}function l(r){return{label:r.label||"",count:r.count||0,iconPath:r.iconPath?S.URI.revive(r.iconPath):"",authorHasReacted:r.hasReacted||!1}}function I(r){if(r!==void 0)switch(r){case L.CommentThreadCollapsibleState.Expanded:return A.CommentThreadCollapsibleState.Expanded;case L.CommentThreadCollapsibleState.Collapsed:return A.CommentThreadCollapsibleState.Collapsed}return A.CommentThreadCollapsibleState.Collapsed}return new D}e.createExtHostComments=u}),define(Ee[92],we([1,0,2,4,7,3,14,12,16,10,17]),function(J,e,o,k,w,B,S,A,y,M,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IExtHostDecorations=e.ExtHostDecorations=void 0;let v=class wi{constructor(m,s){this._logService=s,this._provider=new Map,this._proxy=m.getProxy(k.MainContext.MainThreadDecorations)}registerFileDecorationProvider(m,s){const n=wi._handlePool++;this._provider.set(n,{provider:m,extensionId:s}),this._proxy.$registerDecorationProvider(n,s.value);const f=m.onDidChangeFileDecorations&&m.onDidChangeFileDecorations(D=>{if(!D){this._proxy.$onDidChange(n,null);return}let T=(0,y.asArray)(D);if(T.length<=wi._maxEventSize){this._proxy.$onDidChange(n,T);return}this._logService.warn("[Decorations] CAPPING events from decorations provider",s.value,T.length);const d=T.map(l=>({uri:l,rank:(0,M.count)(l.path,"/")})),g=(0,y.groupBy)(d,(l,I)=>l.rank-I.rank||(0,M.compare)(l.uri.path,I.uri.path));let b=[];e:for(let l of g){let I;for(let r of l){let i=(0,L.dirname)(r.uri.path);if(I!==i&&(I=i,b.push(r.uri)>=wi._maxEventSize))break e}}this._proxy.$onDidChange(n,b)});return new w.Disposable(()=>{f?.dispose(),this._proxy.$unregisterDecorationProvider(n),this._provider.delete(n)})}async $provideDecorations(m,s,n){if(!this._provider.has(m))return Object.create(null);const f=Object.create(null),{provider:D,extensionId:T}=this._provider.get(m);return await Promise.all(s.map(async d=>{try{const{uri:g,id:b}=d,l=await Promise.resolve(D.provideFileDecoration(o.URI.revive(g),n));if(!l)return;try{w.FileDecoration.validate(l),f[b]=[l.propagate,l.tooltip,l.badge,l.color]}catch(I){this._logService.warn(`INVALID decoration from extension '${T.value}': ${I}`)}}catch(g){this._logService.error(g)}})),f}};v._handlePool=0,v._maxEventSize=250,v=Fe([Ne(0,S.IExtHostRpcService),Ne(1,A.ILogService)],v),e.ExtHostDecorations=v,e.IExtHostDecorations=(0,B.createDecorator)("IExtHostDecorations")});var je=this&&this.__classPrivateFieldSet||function(J,e,o,k,w){if(k==="m")throw new TypeError("Private method is not writable");if(k==="a"&&!w)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?J!==e||!w:!e.has(J))throw new TypeError("Cannot write private member to an object whose class did not declare it");return k==="a"?w.call(J,o):w?w.value=o:e.set(J,o),o},De=this&&this.__classPrivateFieldGet||function(J,e,o,k){if(o==="a"&&!k)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?J!==e||!k:!e.has(J))throw new TypeError("Cannot read private member from an object whose class did not declare it");return o==="m"?k:o==="a"?k.call(J):k?k.value:e.get(J)};define(Ee[182],we([1,0,122,78,2,4,7,8,5,12,22,30]),function(J,e,o,k,w,B,S,A,y,M,L,v){"use strict";var u,m,s;Object.defineProperty(e,"__esModule",{value:!0}),e.ExtHostDiagnostics=e.DiagnosticCollection=void 0;class n{constructor(T,d,g,b,l,I){this._name=T,this._owner=d,this._maxDiagnosticsPerFile=g,u.set(this,void 0),m.set(this,void 0),s.set(this,void 0),this._isDisposed=!1,je(this,s,new L.ResourceMap(r=>b.getComparisonKey(r)),"f"),je(this,u,l,"f"),je(this,m,I,"f")}dispose(){this._isDisposed||(De(this,m,"f").fire([...De(this,s,"f").keys()]),De(this,u,"f")&&De(this,u,"f").$clear(this._owner),De(this,s,"f").clear(),this._isDisposed=!0)}get name(){return this._checkDisposed(),this._name}set(T,d){if(!T){this.clear();return}this._checkDisposed();let g=[];if(w.URI.isUri(T)){if(!d){this.delete(T);return}De(this,s,"f").set(T,d.slice()),g=[T]}else if(Array.isArray(T)){g=[];let l;T=[...T].sort(n._compareIndexedTuplesByUri);for(const I of T){const[r,i]=I;if((!l||r.toString()!==l.toString())&&(l&&De(this,s,"f").get(l).length===0&&De(this,s,"f").delete(l),l=r,g.push(r),De(this,s,"f").set(r,[])),i){const c=De(this,s,"f").get(r);c&&c.push(...i)}else{const c=De(this,s,"f").get(r);c&&(c.length=0)}}}if(De(this,m,"f").fire(g),!De(this,u,"f"))return;const b=[];for(let l of g){let I=[];const r=De(this,s,"f").get(l);if(r)if(r.length>this._maxDiagnosticsPerFile){I=[];const i=[S.DiagnosticSeverity.Error,S.DiagnosticSeverity.Warning,S.DiagnosticSeverity.Information,S.DiagnosticSeverity.Hint];e:for(let c=0;c<4;c++)for(let t of r)if(t.severity===i[c]&&I.push(A.Diagnostic.from(t))===this._maxDiagnosticsPerFile)break e;I.push({severity:k.MarkerSeverity.Info,message:(0,o.localize)(0,null,r.length-this._maxDiagnosticsPerFile),startLineNumber:I[I.length-1].startLineNumber,startColumn:I[I.length-1].startColumn,endLineNumber:I[I.length-1].endLineNumber,endColumn:I[I.length-1].endColumn})}else I=r.map(i=>A.Diagnostic.from(i));b.push([l,I])}De(this,u,"f").$changeMany(this._owner,b)}delete(T){this._checkDisposed(),De(this,m,"f").fire([T]),De(this,s,"f").delete(T),De(this,u,"f")&&De(this,u,"f").$changeMany(this._owner,[[T,void 0]])}clear(){this._checkDisposed(),De(this,m,"f").fire([...De(this,s,"f").keys()]),De(this,s,"f").clear(),De(this,u,"f")&&De(this,u,"f").$clear(this._owner)}forEach(T,d){this._checkDisposed();for(let g of De(this,s,"f").keys())T.apply(d,[g,this.get(g),this])}get(T){this._checkDisposed();const d=De(this,s,"f").get(T);return Array.isArray(d)?Object.freeze(d.slice(0)):[]}has(T){return this._checkDisposed(),Array.isArray(De(this,s,"f").get(T))}_checkDisposed(){if(this._isDisposed)throw new Error("illegal state - object is disposed")}static _compareIndexedTuplesByUri(T,d){return T[0].toString()<d[0].toString()?-1:T[0].toString()>d[0].toString()?1:0}}e.DiagnosticCollection=n,u=new WeakMap,m=new WeakMap,s=new WeakMap;let f=class oi{constructor(T,d,g){this._logService=d,this._fileSystemInfoService=g,this._collections=new Map,this._onDidChangeDiagnostics=new y.DebounceEmitter({merge:b=>b.flat(),delay:50}),this.onDidChangeDiagnostics=y.Event.map(this._onDidChangeDiagnostics.event,oi._mapper),this._proxy=T.getProxy(B.MainContext.MainThreadDiagnostics)}static _mapper(T){const d=new L.ResourceMap;for(const g of T)d.set(g,g);return{uris:Object.freeze(Array.from(d.values()))}}createDiagnosticCollection(T,d){const{_collections:g,_proxy:b,_onDidChangeDiagnostics:l,_logService:I,_fileSystemInfoService:r}=this,i=new class{$changeMany(a,p){b.$changeMany(a,p),I.trace("[DiagnosticCollection] change many (extension, owner, uris)",T.value,a,p.length===0?"CLEARING":p)}$clear(a){b.$clear(a),I.trace("[DiagnosticCollection] remove all (extension, owner)",T.value,a)}dispose(){b.dispose()}};let c;if(!d)d="_generated_diagnostic_collection_name_#"+oi._idPool++,c=d;else if(!g.has(d))c=d;else{this._logService.warn(`DiagnosticCollection with name '${d}' does already exist.`);do c=d+oi._idPool++;while(g.has(c))}return new class extends n{constructor(){super(d,c,oi._maxDiagnosticsPerFile,r.extUri,i,l);g.set(c,this)}dispose(){super.dispose(),g.delete(c)}}}getDiagnostics(T){if(T)return this._getDiagnostics(T);{const d=new Map,g=[];for(const b of this._collections.values())b.forEach((l,I)=>{let r=d.get(l.toString());typeof r=="undefined"&&(r=g.length,d.set(l.toString(),r),g.push([l,[]])),g[r][1]=g[r][1].concat(...I)});return g}}_getDiagnostics(T){let d=[];for(let g of this._collections.values())g.has(T)&&(d=d.concat(g.get(T)));return d}$acceptMarkersChange(T){if(!this._mirrorCollection){const d="_generated_mirror",g=new n(d,d,oi._maxDiagnosticsPerFile,this._fileSystemInfoService.extUri,void 0,this._onDidChangeDiagnostics);this._collections.set(d,g),this._mirrorCollection=g}for(const[d,g]of T)this._mirrorCollection.set(w.URI.revive(d),g.map(A.Diagnostic.to))}};f._idPool=0,f._maxDiagnosticsPerFile=1e3,f=Fe([Ne(1,M.ILogService),Ne(2,v.IExtHostFileSystemInfo)],f),e.ExtHostDiagnostics=f}),define(Ee[183],we([1,0,2,4]),function(J,e,o,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtHostDialogs=void 0;class w{constructor(S){this._proxy=S.getProxy(k.MainContext.MainThreadDialogs)}showOpenDialog(S){return this._proxy.$showOpenDialog(S).then(A=>A?A.map(y=>o.URI.revive(y)):void 0)}showSaveDialog(S){return this._proxy.$showSaveDialog(S).then(A=>A?o.URI.revive(A):void 0)}}e.ExtHostDialogs=w}),define(Ee[184],we([1,0,15,2,7,4,9,20,10]),function(J,e,o,k,w,B,S,A,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtHostDocumentContentProvider=void 0;class M{constructor(v,u,m){this._documentsAndEditors=u,this._logService=m,this._documentContentProviders=new Map,this._proxy=v.getProxy(B.MainContext.MainThreadDocumentContentProviders)}registerTextDocumentContentProvider(v,u){if(Object.keys(S.Schemas).indexOf(v)>=0)throw new Error(`scheme '${v}' already registered`);const m=M._handlePool++;this._documentContentProviders.set(m,u),this._proxy.$registerTextContentProvider(m,v);let s;return typeof u.onDidChange=="function"&&(s=u.onDidChange(n=>{if(n.scheme!==v){this._logService.warn(`Provider for scheme '${v}' is firing event for schema '${n.scheme}' which will be IGNORED`);return}this._documentsAndEditors.getDocument(n)&&this.$provideTextDocumentContent(m,n).then(f=>{if(!f&&typeof f!="string")return;const D=this._documentsAndEditors.getDocument(n);if(!D)return;const T=(0,y.splitLines)(f);if(!D.equalLines(T))return this._proxy.$onVirtualDocumentChange(n,f)},o.onUnexpectedError)})),new w.Disposable(()=>{this._documentContentProviders.delete(m)&&this._proxy.$unregisterTextContentProvider(m),s&&(s.dispose(),s=void 0)})}$provideTextDocumentContent(v,u){const m=this._documentContentProviders.get(v);return m?Promise.resolve(m.provideTextDocumentContent(k.URI.revive(u),A.CancellationToken.None)):Promise.reject(new Error(`unsupported uri-scheme: ${u.scheme}`))}}e.ExtHostDocumentContentProvider=M,M._handlePool=0}),define(Ee[185],we([1,0,5,6,2,4,84,8,11,26,7]),function(J,e,o,k,w,B,S,A,y,M,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtHostDocuments=void 0;class v{constructor(m,s){this._onDidAddDocument=new o.Emitter,this._onDidRemoveDocument=new o.Emitter,this._onDidChangeDocument=new o.Emitter,this._onDidSaveDocument=new o.Emitter,this.onDidAddDocument=this._onDidAddDocument.event,this.onDidRemoveDocument=this._onDidRemoveDocument.event,this.onDidChangeDocument=this._onDidChangeDocument.event,this.onDidSaveDocument=this._onDidSaveDocument.event,this._toDispose=new k.DisposableStore,this._documentLoader=new Map,this._proxy=m.getProxy(B.MainContext.MainThreadDocuments),this._documentsAndEditors=s,this._documentsAndEditors.onDidRemoveDocuments(n=>{for(const f of n)this._onDidRemoveDocument.fire(f.document)},void 0,this._toDispose),this._documentsAndEditors.onDidAddDocuments(n=>{for(const f of n)this._onDidAddDocument.fire(f.document)},void 0,this._toDispose)}dispose(){this._toDispose.dispose()}getAllDocumentData(){return[...this._documentsAndEditors.allDocuments()]}getDocumentData(m){if(!m)return;const s=this._documentsAndEditors.getDocument(m);if(s)return s}getDocument(m){const s=this.getDocumentData(m);if(!s?.document)throw new Error(`Unable to retrieve document from URI '${m}'`);return s.document}ensureDocumentData(m){const s=this._documentsAndEditors.getDocument(m);if(s)return Promise.resolve(s);let n=this._documentLoader.get(m.toString());return n||(n=this._proxy.$tryOpenDocument(m).then(f=>{this._documentLoader.delete(m.toString());const D=w.URI.revive(f);return(0,y.assertIsDefined)(this._documentsAndEditors.getDocument(D))},f=>(this._documentLoader.delete(m.toString()),Promise.reject(f))),this._documentLoader.set(m.toString(),n)),n}createDocumentData(m){return this._proxy.$tryCreateDocument(m).then(s=>w.URI.revive(s))}$acceptModelLanguageChanged(m,s){const n=w.URI.revive(m),f=this._documentsAndEditors.getDocument(n);if(!f)throw new Error("unknown document");this._onDidRemoveDocument.fire(f.document),f._acceptLanguageId(s),this._onDidAddDocument.fire(f.document)}$acceptModelSaved(m){const s=w.URI.revive(m),n=this._documentsAndEditors.getDocument(s);if(!n)throw new Error("unknown document");this.$acceptDirtyStateChanged(m,!1),this._onDidSaveDocument.fire(n.document)}$acceptDirtyStateChanged(m,s){const n=w.URI.revive(m),f=this._documentsAndEditors.getDocument(n);if(!f)throw new Error("unknown document");f._acceptIsDirty(s),this._onDidChangeDocument.fire({document:f.document,contentChanges:[],reason:void 0})}$acceptModelChanged(m,s,n){const f=w.URI.revive(m),D=this._documentsAndEditors.getDocument(f);if(!D)throw new Error("unknown document");D._acceptIsDirty(n),D.onEvents(s);let T;s.isUndoing?T=L.TextDocumentChangeReason.Undo:s.isRedoing&&(T=L.TextDocumentChangeReason.Redo),this._onDidChangeDocument.fire((0,M.deepFreeze)({document:D.document,contentChanges:s.changes.map(d=>({range:A.Range.to(d.range),rangeOffset:d.rangeOffset,rangeLength:d.rangeLength,text:d.text})),reason:T}))}setWordDefinitionFor(m,s){(0,S.setWordDefinitionFor)(m,s)}}e.ExtHostDocuments=v}),define(Ee[49],we([1,0,42,5,6,2,3,4,84,14,90,8,12,22,9,161,230]),function(J,e,o,k,w,B,S,A,y,M,L,v,u,m,s,n,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IExtHostDocumentsAndEditors=e.ExtHostDocumentsAndEditors=void 0;class D{constructor(g){this.value=g,this._count=0}ref(){this._count++}unref(){return--this._count==0}}let T=class{constructor(g,b){this._extHostRpc=g,this._logService=b,this._activeEditorId=null,this._editors=new Map,this._documents=new m.ResourceMap,this._onDidAddDocuments=new k.Emitter,this._onDidRemoveDocuments=new k.Emitter,this._onDidChangeVisibleTextEditors=new k.Emitter,this._onDidChangeActiveTextEditor=new k.Emitter,this.onDidAddDocuments=this._onDidAddDocuments.event,this.onDidRemoveDocuments=this._onDidRemoveDocuments.event,this.onDidChangeVisibleTextEditors=this._onDidChangeVisibleTextEditors.event,this.onDidChangeActiveTextEditor=this._onDidChangeActiveTextEditor.event}$acceptDocumentsAndEditorsDelta(g){this.acceptDocumentsAndEditorsDelta(g)}acceptDocumentsAndEditorsDelta(g){const b=[],l=[],I=[];if(g.removedDocuments)for(const r of g.removedDocuments){const i=B.URI.revive(r),c=this._documents.get(i);c?.unref()&&(this._documents.delete(i),b.push(c.value))}if(g.addedDocuments)for(const r of g.addedDocuments){const i=B.URI.revive(r.uri);let c=this._documents.get(i);if(c&&i.scheme!==s.Schemas.vscodeNotebookCell&&i.scheme!==s.Schemas.vscodeInteractiveInput)throw new Error(`document '${i} already exists!'`);c||(c=new D(new y.ExtHostDocumentData(this._extHostRpc.getProxy(A.MainContext.MainThreadDocuments),i,r.lines,r.EOL,r.versionId,r.languageId,r.isDirty,r.notebook)),this._documents.set(i,c),l.push(c.value)),c.ref()}if(g.removedEditors)for(const r of g.removedEditors){const i=this._editors.get(r);this._editors.delete(r),i&&I.push(i)}if(g.addedEditors)for(const r of g.addedEditors){const i=B.URI.revive(r.documentUri);o.ok(this._documents.has(i),`document '${i}' does not exist`),o.ok(!this._editors.has(r.id),`editor '${r.id}' already exists!`);const c=this._documents.get(i).value,t=new L.ExtHostTextEditor(r.id,this._extHostRpc.getProxy(A.MainContext.MainThreadTextEditors),this._logService,new f.Lazy(()=>c.document),r.selections.map(v.Selection.to),r.options,r.visibleRanges.map(a=>v.Range.to(a)),typeof r.editorPosition=="number"?v.ViewColumn.to(r.editorPosition):void 0);this._editors.set(r.id,t)}g.newActiveEditor!==void 0&&(o.ok(g.newActiveEditor===null||this._editors.has(g.newActiveEditor),`active editor '${g.newActiveEditor}' does not exist`),this._activeEditorId=g.newActiveEditor),(0,w.dispose)(b),(0,w.dispose)(I),g.removedDocuments&&this._onDidRemoveDocuments.fire(b),g.addedDocuments&&this._onDidAddDocuments.fire(l),(g.removedEditors||g.addedEditors)&&this._onDidChangeVisibleTextEditors.fire(this.allEditors().map(r=>r.value)),g.newActiveEditor!==void 0&&this._onDidChangeActiveTextEditor.fire(this.activeEditor())}getDocument(g){return this._documents.get(g)?.value}allDocuments(){return n.Iterable.map(this._documents.values(),g=>g.value)}getEditor(g){return this._editors.get(g)}activeEditor(g){if(!this._activeEditorId)return;const b=this._editors.get(this._activeEditorId);return g?b:b?.value}allEditors(){return[...this._editors.values()]}};T=Fe([Ne(0,M.IExtHostRpcService),Ne(1,u.ILogService)],T),e.ExtHostDocumentsAndEditors=T,e.IExtHostDocumentsAndEditors=(0,S.createDecorator)("IExtHostDocumentsAndEditors")}),define(Ee[66],we([1,0,8,4,2,5,3,14]),function(J,e,o,k,w,B,S,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtHostEditorTabs=e.IExtHostEditorTabs=void 0,e.IExtHostEditorTabs=(0,S.createDecorator)("IExtHostEditorTabs");let y=class{constructor(L){this._onDidChangeTabGroup=new B.Emitter,this.onDidChangeTabGroup=this._onDidChangeTabGroup.event,this._tabGroups={all:[],onDidChangeTabGroup:this._onDidChangeTabGroup.event},this._proxy=L.getProxy(k.MainContext.MainThreadEditorTabs)}get tabGroups(){return this._tabGroups}$acceptEditorTabModel(L){this._tabGroups.all.length=0;for(const v of L){let u;const m=v.tabs.map(s=>{const n=this.createExtHostTabObject(s);return s.isActive&&(u=n),n});this._tabGroups.all.push(Object.freeze({isActive:v.isActive,viewColumn:o.ViewColumn.to(v.viewColumn),activeTab:u,tabs:m}))}this._onDidChangeTabGroup.fire()}createExtHostTabObject(L){return Object.freeze({label:L.label,viewColumn:o.ViewColumn.to(L.viewColumn),resource:w.URI.revive(L.resource),additionalResourcesAndViewIds:L.additionalResourcesAndViewIds.map(({resource:v,viewId:u})=>({resource:w.URI.revive(v),viewId:u})),viewId:L.editorId,isActive:L.isActive,kind:L.kind,isDirty:L.isDirty,isPinned:L.isPinned,move:async(v,u)=>{this._proxy.$moveTab(L,v,o.ViewColumn.from(u))},close:async()=>{await this._proxy.$closeTab(L)}})}};y=Fe([Ne(0,A.IExtHostRpcService)],y),e.ExtHostEditorTabs=y}),define(Ee[186],we([1,0,2,4,6,7,8,231,10,21,28]),function(J,e,o,k,w,B,S,A,y,M,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtHostFileSystem=void 0;class v{constructor(){this._schemes=[]}add(s){this._stateMachine=void 0,this._schemes.push(s)}delete(s){const n=this._schemes.indexOf(s);n>=0&&(this._schemes.splice(n,1),this._stateMachine=void 0)}_initStateMachine(){if(!this._stateMachine){const s=this._schemes.sort(),n=[];let f,D,T=14,d=14;for(const g of s){let b=f?(0,y.commonPrefixLength)(f,g):0;for(b===0?D=1:D=d;b<g.length;b++)b+1===g.length?(T=d,d=9):d+=1,n.push([D,g.toUpperCase().charCodeAt(b),d]),n.push([D,g.toLowerCase().charCodeAt(b),d]),D=d;f=g,d=T}n.push([9,58,10]),n.push([10,47,12]),this._stateMachine=new A.StateMachine(n)}}provideDocumentLinks(s){this._initStateMachine();const n=[],f=A.LinkComputer.computeLinks({getLineContent(D){return s.lineAt(D-1).text},getLineCount(){return s.lineCount}},this._stateMachine);for(const D of f){const T=S.DocumentLink.to(D);T.target&&n.push(T)}return n}}class u{constructor(s,n){this._extHostLanguageFeatures=n,this._linkProvider=new v,this._fsProvider=new Map,this._registeredSchemes=new Set,this._watches=new Map,this._handlePool=0,this._proxy=s.getProxy(k.MainContext.MainThreadFileSystem)}dispose(){this._linkProviderRegistration?.dispose()}registerFileSystemProvider(s,n,f,D={}){if(this._registeredSchemes.has(n))throw new Error(`a provider for the scheme '${n}' is already registered`);this._linkProviderRegistration||(this._linkProviderRegistration=this._extHostLanguageFeatures.registerDocumentLinkProvider(s,"*",this._linkProvider));const T=this._handlePool++;this._linkProvider.add(n),this._registeredSchemes.add(n),this._fsProvider.set(T,f);let d=2;D.isCaseSensitive&&(d+=1024),D.isReadonly&&(d+=2048),typeof f.copy=="function"&&(d+=8),typeof f.open=="function"&&typeof f.close=="function"&&typeof f.read=="function"&&typeof f.write=="function"&&((0,L.checkProposedApiEnabled)(s,"fsChunks"),d+=4),this._proxy.$registerFileSystemProvider(T,n,d).catch(b=>{console.error(`FAILED to register filesystem provider of ${s.identifier.value}-extension for the scheme ${n}`),console.error(b)});const g=f.onDidChangeFile(b=>{const l=[];for(const I of b){let{uri:r,type:i}=I;if(r.scheme!==n)continue;let c;switch(i){case B.FileChangeType.Changed:c=0;break;case B.FileChangeType.Created:c=1;break;case B.FileChangeType.Deleted:c=2;break;default:throw new Error("Unknown FileChangeType")}l.push({resource:r,type:c})}this._proxy.$onFileSystemChange(T,l)});return(0,w.toDisposable)(()=>{g.dispose(),this._linkProvider.delete(n),this._registeredSchemes.delete(n),this._fsProvider.delete(T),this._proxy.$unregisterProvider(T)})}static _asIStat(s){const{type:n,ctime:f,mtime:D,size:T,permissions:d}=s;return{type:n,ctime:f,mtime:D,size:T,permissions:d}}$stat(s,n){return Promise.resolve(this._getFsProvider(s).stat(o.URI.revive(n))).then(f=>u._asIStat(f))}$readdir(s,n){return Promise.resolve(this._getFsProvider(s).readDirectory(o.URI.revive(n)))}$readFile(s,n){return Promise.resolve(this._getFsProvider(s).readFile(o.URI.revive(n))).then(f=>M.VSBuffer.wrap(f))}$writeFile(s,n,f,D){return Promise.resolve(this._getFsProvider(s).writeFile(o.URI.revive(n),f.buffer,D))}$delete(s,n,f){return Promise.resolve(this._getFsProvider(s).delete(o.URI.revive(n),f))}$rename(s,n,f,D){return Promise.resolve(this._getFsProvider(s).rename(o.URI.revive(n),o.URI.revive(f),D))}$copy(s,n,f,D){const T=this._getFsProvider(s);if(!T.copy)throw new Error('FileSystemProvider does not implement "copy"');return Promise.resolve(T.copy(o.URI.revive(n),o.URI.revive(f),D))}$mkdir(s,n){return Promise.resolve(this._getFsProvider(s).createDirectory(o.URI.revive(n)))}$watch(s,n,f,D){const T=this._getFsProvider(s).watch(o.URI.revive(f),D);this._watches.set(n,T)}$unwatch(s,n){const f=this._watches.get(n);f&&(f.dispose(),this._watches.delete(n))}$open(s,n,f){const D=this._getFsProvider(s);if(!D.open)throw new Error('FileSystemProvider does not implement "open"');return Promise.resolve(D.open(o.URI.revive(n),f))}$close(s,n){const f=this._getFsProvider(s);if(!f.close)throw new Error('FileSystemProvider does not implement "close"');return Promise.resolve(f.close(n))}$read(s,n,f,D){const T=this._getFsProvider(s);if(!T.read)throw new Error('FileSystemProvider does not implement "read"');const d=M.VSBuffer.alloc(D);return Promise.resolve(T.read(n,f,d.buffer,0,D)).then(g=>d.slice(0,g))}$write(s,n,f,D){const T=this._getFsProvider(s);if(!T.write)throw new Error('FileSystemProvider does not implement "write"');return Promise.resolve(T.write(n,f,D.buffer,0,D.byteLength))}_getFsProvider(s){const n=this._fsProvider.get(s);if(!n){const f=new Error;throw f.name="ENOPRO",f.message="no provider",f}return n}}e.ExtHostFileSystem=u}),define(Ee[50],we([1,0,4,45,7,21,3,14,30,6]),function(J,e,o,k,w,B,S,A,y,M){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IExtHostConsumerFileSystem=e.ExtHostConsumerFileSystem=void 0;let L=class jt{constructor(u,m){this._fileSystemProvider=new Map,this._proxy=u.getProxy(o.MainContext.MainThreadFileSystem);const s=this;this.value=Object.freeze({async stat(n){try{const f=s._fileSystemProvider.get(n.scheme);if(!f)return await s._proxy.$stat(n);await s._proxy.$ensureActivation(n.scheme);const D=await f.stat(n);return{type:D.type,ctime:D.ctime,mtime:D.mtime,size:D.size,permissions:D.permissions}}catch(f){jt._handleError(f)}},async readDirectory(n){try{const f=s._fileSystemProvider.get(n.scheme);return f?(await s._proxy.$ensureActivation(n.scheme),(await f.readDirectory(n)).slice()):await s._proxy.$readdir(n)}catch(f){return jt._handleError(f)}},async createDirectory(n){try{return await s._proxy.$mkdir(n)}catch(f){return jt._handleError(f)}},async readFile(n){try{const f=s._fileSystemProvider.get(n.scheme);return f?(await s._proxy.$ensureActivation(n.scheme),(await f.readFile(n)).slice()):(await s._proxy.$readFile(n)).buffer}catch(f){return jt._handleError(f)}},async writeFile(n,f){try{return await s._proxy.$writeFile(n,B.VSBuffer.wrap(f))}catch(D){return jt._handleError(D)}},async delete(n,f){try{const D=s._fileSystemProvider.get(n.scheme);return D?(await s._proxy.$ensureActivation(n.scheme),await D.delete(n,{recursive:!1,...f})):await s._proxy.$delete(n,{recursive:!1,useTrash:!1,...f})}catch(D){return jt._handleError(D)}},async rename(n,f,D){try{return await s._proxy.$rename(n,f,{overwrite:!1,...D})}catch(T){return jt._handleError(T)}},async copy(n,f,D){try{return await s._proxy.$copy(n,f,{overwrite:!1,...D})}catch(T){return jt._handleError(T)}},isWritableFileSystem(n){const f=m.getCapabilities(n);if(typeof f=="number")return!(f&2048)}})}static _handleError(u){if(u instanceof w.FileSystemError)throw u;if(!(u instanceof Error))throw new w.FileSystemError(String(u));if(u.name==="ENOPRO")throw w.FileSystemError.Unavailable(u.message);switch(u.name){case k.FileSystemProviderErrorCode.FileExists:throw w.FileSystemError.FileExists(u.message);case k.FileSystemProviderErrorCode.FileNotFound:throw w.FileSystemError.FileNotFound(u.message);case k.FileSystemProviderErrorCode.FileNotADirectory:throw w.FileSystemError.FileNotADirectory(u.message);case k.FileSystemProviderErrorCode.FileIsADirectory:throw w.FileSystemError.FileIsADirectory(u.message);case k.FileSystemProviderErrorCode.NoPermissions:throw w.FileSystemError.NoPermissions(u.message);case k.FileSystemProviderErrorCode.Unavailable:throw w.FileSystemError.Unavailable(u.message);default:throw new w.FileSystemError(u.message,u.name)}}addFileSystemProvider(u,m){return this._fileSystemProvider.set(u,m),(0,M.toDisposable)(()=>this._fileSystemProvider.delete(u))}};L=Fe([Ne(0,A.IExtHostRpcService),Ne(1,y.IExtHostFileSystemInfo)],L),e.ExtHostConsumerFileSystem=L,e.IExtHostConsumerFileSystem=(0,S.createDecorator)("IExtHostConsumerFileSystem")}),define(Ee[187],we([1,0,5,29,2,4,8,7]),function(J,e,o,k,w,B,S,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtHostFileSystemEventService=void 0;class y{constructor(v,u,m,s,n,f,D,T){this._onDidCreate=new o.Emitter,this._onDidChange=new o.Emitter,this._onDidDelete=new o.Emitter;const d=this.ensureWatching(v,m,n);this._config=0,f&&(this._config+=1),D&&(this._config+=2),T&&(this._config+=4);const g=(0,k.parse)(n),b=typeof n=="string",l=s(I=>{if(!f)for(let r of I.created){const i=w.URI.revive(r);g(i.fsPath)&&(!b||u.getWorkspaceFolder(i))&&this._onDidCreate.fire(i)}if(!D)for(let r of I.changed){const i=w.URI.revive(r);g(i.fsPath)&&(!b||u.getWorkspaceFolder(i))&&this._onDidChange.fire(i)}if(!T)for(let r of I.deleted){const i=w.URI.revive(r);g(i.fsPath)&&(!b||u.getWorkspaceFolder(i))&&this._onDidDelete.fire(i)}});this._disposable=A.Disposable.from(d,this._onDidCreate,this._onDidChange,this._onDidDelete,l)}get ignoreCreateEvents(){return Boolean(this._config&1)}get ignoreChangeEvents(){return Boolean(this._config&2)}get ignoreDeleteEvents(){return Boolean(this._config&4)}ensureWatching(v,u,m){let s=A.Disposable.from();if(typeof m=="string")return s;const n=v.getProxy(B.MainContext.MainThreadFileSystem);let f=!1;(m.pattern.includes(k.GLOBSTAR)||m.pattern.includes(k.GLOB_SPLIT))&&(f=!0);const D=Math.random();return n.$watch(u.identifier.value,D,m.baseUri,{recursive:f,excludes:[]}),A.Disposable.from({dispose:()=>n.$unwatch(D)})}dispose(){this._disposable.dispose()}get onDidCreate(){return this._onDidCreate.event}get onDidChange(){return this._onDidChange.event}get onDidDelete(){return this._onDidDelete.event}}class M{constructor(v,u,m){this._mainContext=v,this._logService=u,this._extHostDocumentsAndEditors=m,this._onFileSystemEvent=new o.Emitter,this._onDidRenameFile=new o.Emitter,this._onDidCreateFile=new o.Emitter,this._onDidDeleteFile=new o.Emitter,this._onWillRenameFile=new o.AsyncEmitter,this._onWillCreateFile=new o.AsyncEmitter,this._onWillDeleteFile=new o.AsyncEmitter,this.onDidRenameFile=this._onDidRenameFile.event,this.onDidCreateFile=this._onDidCreateFile.event,this.onDidDeleteFile=this._onDidDeleteFile.event}createFileSystemWatcher(v,u,m,s,n,f){return new y(this._mainContext,v,u,this._onFileSystemEvent.event,S.GlobPattern.from(m),s,n,f)}$onFileEvent(v){this._onFileSystemEvent.fire(v)}$onDidRunFileOperation(v,u){switch(v){case 2:this._onDidRenameFile.fire(Object.freeze({files:u.map(m=>({oldUri:w.URI.revive(m.source),newUri:w.URI.revive(m.target)}))}));break;case 1:this._onDidDeleteFile.fire(Object.freeze({files:u.map(m=>w.URI.revive(m.target))}));break;case 0:this._onDidCreateFile.fire(Object.freeze({files:u.map(m=>w.URI.revive(m.target))}));break;default:}}getOnWillRenameFileEvent(v){return this._createWillExecuteEvent(v,this._onWillRenameFile)}getOnWillCreateFileEvent(v){return this._createWillExecuteEvent(v,this._onWillCreateFile)}getOnWillDeleteFileEvent(v){return this._createWillExecuteEvent(v,this._onWillDeleteFile)}_createWillExecuteEvent(v,u){return(m,s,n)=>{const f=function(T){m.call(s,T)};return f.extension=v,u.event(f,void 0,n)}}async $onWillRunFileOperation(v,u,m,s){switch(v){case 2:return await this._fireWillEvent(this._onWillRenameFile,{files:u.map(n=>({oldUri:w.URI.revive(n.source),newUri:w.URI.revive(n.target)}))},m,s);case 1:return await this._fireWillEvent(this._onWillDeleteFile,{files:u.map(n=>w.URI.revive(n.target))},m,s);case 0:return await this._fireWillEvent(this._onWillCreateFile,{files:u.map(n=>w.URI.revive(n.target))},m,s)}}async _fireWillEvent(v,u,m,s){const n=new Set,f=[];if(await v.fireAsync(u,s,async(T,d)=>{const g=Date.now(),b=await Promise.resolve(T);b instanceof A.WorkspaceEdit&&(f.push(b),n.add(d.extension.displayName??d.extension.identifier.value)),Date.now()-g>m&&this._logService.warn("SLOW file-participant",d.extension.identifier)}),s.isCancellationRequested||f.length===0)return;const D={edits:[]};for(let T of f){let{edits:d}=S.WorkspaceEdit.from(T,{getTextDocumentVersion:g=>this._extHostDocumentsAndEditors.getDocument(g)?.version,getNotebookDocumentVersion:()=>{}});D.edits=D.edits.concat(d)}return{edit:D,extensionNames:Array.from(n)}}}e.ExtHostFileSystemEventService=M}),define(Ee[188],we([1,0,2,39]),function(J,e,o,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtHostInteractive=void 0;class w{constructor(S,A,y,M){this._extHostNotebooks=A,this._textDocumentsAndEditors=y,this._commands=M;const L=new k.ApiCommand("interactive.open","_interactive.open","Open interactive window and return notebook editor and input URI",[new k.ApiCommandArgument("showOptions","Show Options",v=>!0,v=>v),new k.ApiCommandArgument("resource","Interactive resource Uri",v=>!0,v=>v),new k.ApiCommandArgument("controllerId","Notebook controller Id",v=>!0,v=>v),new k.ApiCommandArgument("title","Interactive editor title",v=>!0,v=>v)],new k.ApiCommandResult("Notebook and input URI",v=>{if(v.notebookEditorId!==void 0){const u=this._extHostNotebooks.getEditorById(v.notebookEditorId);return{notebookUri:o.URI.revive(v.notebookUri),inputUri:o.URI.revive(v.inputUri),notebookEditor:u.apiEditor}}return{notebookUri:o.URI.revive(v.notebookUri),inputUri:o.URI.revive(v.inputUri)}}));this._commands.registerApiCommand(L)}$willAddInteractiveDocument(S,A,y,M){this._textDocumentsAndEditors.acceptDocumentsAndEditorsDelta({addedDocuments:[{EOL:A,lines:[""],languageId:y,uri:S,isDirty:!1,versionId:1,notebook:this._extHostNotebooks.getNotebookDocument(o.URI.revive(M))?.apiNotebook}]})}$willRemoveInteractiveDocument(S,A){this._textDocumentsAndEditors.acceptDocumentsAndEditorsDelta({removedDocuments:[S]})}}e.ExtHostInteractive=w}),define(Ee[189],we([1,0,6,4]),function(J,e,o,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtHostLabelService=void 0;class w{constructor(S){this._handlePool=0,this._proxy=S.getProxy(k.MainContext.MainThreadLabelService)}$registerResourceLabelFormatter(S){const A=this._handlePool++;return this._proxy.$registerResourceLabelFormatter(A,S),(0,o.toDisposable)(()=>{this._proxy.$unregisterResourceLabelFormatter(A)})}}e.ExtHostLabelService=w}),define(Ee[190],we([1,0,2,26,8,7,4,10,48,16,11,232,20,6,75,53,58,191,15,5,13]),function(J,e,o,k,w,B,S,A,y,M,L,v,u,m,s,n,f,D,T,d,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtHostLanguageFeatures=e.InlineCompletionController=e.DocumentRangeSemanticTokensAdapter=e.DocumentSemanticTokensAdapter=void 0;class b{constructor(N,F){this._documents=N,this._provider=F}async provideDocumentSymbols(N,F){const C=this._documents.getDocument(N),O=await this._provider.provideDocumentSymbols(C,F);if(!(0,M.isFalsyOrEmpty)(O))return O[0]instanceof B.DocumentSymbol?O.map(w.DocumentSymbol.from):b._asDocumentSymbolTree(O)}static _asDocumentSymbolTree(N){N=N.slice(0).sort((O,x)=>{let X=O.location.range.start.compareTo(x.location.range.start);return X===0&&(X=x.location.range.end.compareTo(O.location.range.end)),X});const F=[],C=[];for(const O of N){const x={name:O.name||"!!MISSING: name!!",kind:w.SymbolKind.from(O.kind),tags:O.tags?.map(w.SymbolTag.from)||[],detail:"",containerName:O.containerName,range:w.Range.from(O.location.range),selectionRange:w.Range.from(O.location.range),children:[]};for(;;){if(C.length===0){C.push(x),F.push(x);break}const X=C[C.length-1];if(y.Range.containsRange(X.range,x.range)&&!y.Range.equalsRange(X.range,x.range)){X.children&&X.children.push(x),C.push(x);break}C.pop()}}return F}}class l{constructor(N,F,C){this._documents=N,this._commands=F,this._provider=C,this._cache=new f.Cache("CodeLens"),this._disposables=new Map}async provideCodeLenses(N,F){const C=this._documents.getDocument(N),O=await this._provider.provideCodeLenses(C,F);if(!O||F.isCancellationRequested)return;const x=this._cache.add(O),X=new m.DisposableStore;this._disposables.set(x,X);const re={cacheId:x,lenses:[]};for(let ve=0;ve<O.length;ve++)re.lenses.push({cacheId:[x,ve],range:w.Range.from(O[ve].range),command:this._commands.toInternal(O[ve].command,X)});return re}async resolveCodeLens(N,F){const C=N.cacheId&&this._cache.get(...N.cacheId);if(!C)return;let O;if(typeof this._provider.resolveCodeLens!="function"||C.isResolved?O=C:O=await this._provider.resolveCodeLens(C,F),O||(O=C),F.isCancellationRequested)return;const x=N.cacheId&&this._disposables.get(N.cacheId[0]);if(!!x)return N.command=this._commands.toInternal(O.command??l._badCmd,x),N}releaseCodeLenses(N){this._disposables.get(N)?.dispose(),this._disposables.delete(N),this._cache.delete(N)}}l._badCmd={command:"missing",title:"!!MISSING: command!!"};function I(ue){return Array.isArray(ue)?ue.map(w.DefinitionLink.from):ue?[w.DefinitionLink.from(ue)]:[]}class r{constructor(N,F){this._documents=N,this._provider=F}async provideDefinition(N,F,C){const O=this._documents.getDocument(N),x=w.Position.to(F),X=await this._provider.provideDefinition(O,x,C);return I(X)}}class i{constructor(N,F){this._documents=N,this._provider=F}async provideDeclaration(N,F,C){const O=this._documents.getDocument(N),x=w.Position.to(F),X=await this._provider.provideDeclaration(O,x,C);return I(X)}}class c{constructor(N,F){this._documents=N,this._provider=F}async provideImplementation(N,F,C){const O=this._documents.getDocument(N),x=w.Position.to(F),X=await this._provider.provideImplementation(O,x,C);return I(X)}}class t{constructor(N,F){this._documents=N,this._provider=F}async provideTypeDefinition(N,F,C){const O=this._documents.getDocument(N),x=w.Position.to(F),X=await this._provider.provideTypeDefinition(O,x,C);return I(X)}}class a{constructor(N,F){this._documents=N,this._provider=F}async provideHover(N,F,C){const O=this._documents.getDocument(N),x=w.Position.to(F),X=await this._provider.provideHover(O,x,C);if(!(!X||(0,M.isFalsyOrEmpty)(X.contents)))return X.range||(X.range=O.getWordRangeAtPosition(x)),X.range||(X.range=new B.Range(x,x)),w.Hover.from(X)}}class p{constructor(N,F){this._documents=N,this._provider=F}async provideEvaluatableExpression(N,F,C){const O=this._documents.getDocument(N),x=w.Position.to(F),X=await this._provider.provideEvaluatableExpression(O,x,C);if(X)return w.EvaluatableExpression.from(X)}}class h{constructor(N,F){this._documents=N,this._provider=F}async provideInlineValues(N,F,C,O){const x=this._documents.getDocument(N),X=await this._provider.provideInlineValues(x,w.Range.to(F),w.InlineValueContext.to(C),O);if(Array.isArray(X))return X.map(re=>w.InlineValue.from(re))}}class _{constructor(N,F){this._documents=N,this._provider=F}async provideDocumentHighlights(N,F,C){const O=this._documents.getDocument(N),x=w.Position.to(F),X=await this._provider.provideDocumentHighlights(O,x,C);if(Array.isArray(X))return X.map(w.DocumentHighlight.from)}}class P{constructor(N,F){this._documents=N,this._provider=F}async provideLinkedEditingRanges(N,F,C){const O=this._documents.getDocument(N),x=w.Position.to(F),X=await this._provider.provideLinkedEditingRanges(O,x,C);if(X&&Array.isArray(X.ranges))return{ranges:(0,M.coalesce)(X.ranges.map(w.Range.from)),wordPattern:X.wordPattern}}}class R{constructor(N,F){this._documents=N,this._provider=F}async provideReferences(N,F,C,O){const x=this._documents.getDocument(N),X=w.Position.to(F),re=await this._provider.provideReferences(x,X,C,O);if(Array.isArray(re))return re.map(w.location.from)}}class ${constructor(N,F,C,O,x,X,re){this._documents=N,this._commands=F,this._diagnostics=C,this._provider=O,this._logService=x,this._extension=X,this._apiDeprecation=re,this._cache=new f.Cache("CodeAction"),this._disposables=new Map}async provideCodeActions(N,F,C,O){const x=this._documents.getDocument(N),X=v.Selection.isISelection(F)?w.Selection.to(F):w.Range.to(F),re=[];for(const xe of this._diagnostics.getDiagnostics(N))if(X.intersection(xe.range)&&re.push(xe)>$._maxCodeActionsPerFile)break;const ve={diagnostics:re,only:C.only?new B.CodeActionKind(C.only):void 0,triggerKind:w.CodeActionTriggerKind.to(C.trigger)},Ie=await this._provider.provideCodeActions(x,X,ve,O);if(!(0,M.isNonEmptyArray)(Ie)||O.isCancellationRequested)return;const Me=this._cache.add(Ie),Le=new m.DisposableStore;this._disposables.set(Me,Le);const ze=[];for(let xe=0;xe<Ie.length;xe++){const Re=Ie[xe];!Re||($._isCommand(Re)?(this._apiDeprecation.report("CodeActionProvider.provideCodeActions - return commands",this._extension,"Return 'CodeAction' instances instead."),ze.push({_isSynthetic:!0,title:Re.title,command:this._commands.toInternal(Re,Le)})):(ve.only&&(Re.kind?ve.only.contains(Re.kind)||this._logService.warn(`${this._extension.identifier.value} - Code actions of kind '${ve.only.value} 'requested but returned code action is of kind '${Re.kind.value}'. Code action will be dropped. Please check 'CodeActionContext.only' to only return requested code actions.`):this._logService.warn(`${this._extension.identifier.value} - Code actions of kind '${ve.only.value} 'requested but returned code action does not have a 'kind'. Code action will be dropped. Please set 'CodeAction.kind'.`)),ze.push({cacheId:[Me,xe],title:Re.title,command:Re.command&&this._commands.toInternal(Re.command,Le),diagnostics:Re.diagnostics&&Re.diagnostics.map(w.Diagnostic.from),edit:Re.edit&&w.WorkspaceEdit.from(Re.edit),kind:Re.kind&&Re.kind.value,isPreferred:Re.isPreferred,disabled:Re.disabled?.reason})))}return{cacheId:Me,actions:ze}}async resolveCodeAction(N,F){const[C,O]=N,x=this._cache.get(C,O);if(!x||$._isCommand(x)||!this._provider.resolveCodeAction)return;const X=await this._provider.resolveCodeAction(x,F)??x;return X?.edit?w.WorkspaceEdit.from(X.edit):void 0}releaseCodeActions(N){this._disposables.get(N)?.dispose(),this._disposables.delete(N),this._cache.delete(N)}static _isCommand(N){return typeof N.command=="string"&&typeof N.title=="string"}}$._maxCodeActionsPerFile=1e3;class E{constructor(N,F){this._documents=N,this._provider=F}async provideDocumentFormattingEdits(N,F,C){const O=this._documents.getDocument(N),x=await this._provider.provideDocumentFormattingEdits(O,F,C);if(Array.isArray(x))return x.map(w.TextEdit.from)}}class z{constructor(N,F){this._documents=N,this._provider=F}async provideDocumentRangeFormattingEdits(N,F,C,O){const x=this._documents.getDocument(N),X=w.Range.to(F),re=await this._provider.provideDocumentRangeFormattingEdits(x,X,C,O);if(Array.isArray(re))return re.map(w.TextEdit.from)}}class V{constructor(N,F){this._documents=N,this._provider=F,this.autoFormatTriggerCharacters=[]}async provideOnTypeFormattingEdits(N,F,C,O,x){const X=this._documents.getDocument(N),re=w.Position.to(F),ve=await this._provider.provideOnTypeFormattingEdits(X,re,C,O,x);if(Array.isArray(ve))return ve.map(w.TextEdit.from)}}class W{constructor(N,F){this._provider=N,this._logService=F,this._cache=new f.Cache("WorkspaceSymbols")}async provideWorkspaceSymbols(N,F){const C=await this._provider.provideWorkspaceSymbols(N,F);if(!(0,M.isNonEmptyArray)(C))return{symbols:[]};const O=this._cache.add(C),x={cacheId:O,symbols:[]};for(let X=0;X<C.length;X++){const re=C[X];if(!re||!re.name){this._logService.warn("INVALID SymbolInformation",re);continue}x.symbols.push({...w.WorkspaceSymbol.from(re),cacheId:[O,X]})}return x}async resolveWorkspaceSymbol(N,F){if(typeof this._provider.resolveWorkspaceSymbol!="function"||!N.cacheId)return N;const C=this._cache.get(...N.cacheId);if(C){const O=await this._provider.resolveWorkspaceSymbol(C,F);return O&&(0,k.mixin)(N,w.WorkspaceSymbol.from(O),!0)}}releaseWorkspaceSymbols(N){this._cache.delete(N)}}class Q{constructor(N,F,C){this._documents=N,this._provider=F,this._logService=C}static supportsResolving(N){return typeof N.prepareRename=="function"}async provideRenameEdits(N,F,C,O){const x=this._documents.getDocument(N),X=w.Position.to(F);try{const re=await this._provider.provideRenameEdits(x,X,C,O);return re?w.WorkspaceEdit.from(re):void 0}catch(re){const ve=Q._asMessage(re);return ve?{rejectReason:ve,edits:void 0}:Promise.reject(re)}}async resolveRenameLocation(N,F,C){if(typeof this._provider.prepareRename!="function")return Promise.resolve(void 0);const O=this._documents.getDocument(N),x=w.Position.to(F);try{const X=await this._provider.prepareRename(O,x,C);let re,ve;if(B.Range.isRange(X)?(re=X,ve=O.getText(X)):(0,L.isObject)(X)&&(re=X.range,ve=X.placeholder),!re||!ve)return;if(re.start.line>x.line||re.end.line<x.line){this._logService.warn("INVALID rename location: position line must be within range start/end lines");return}return{range:w.Range.from(re),text:ve}}catch(X){const re=Q._asMessage(X);return re?{rejectReason:re,range:void 0,text:void 0}:Promise.reject(X)}}static _asMessage(N){return typeof N=="string"?N:N instanceof Error&&typeof N.message=="string"?N.message:void 0}}class K{constructor(N,F){this.resultId=N,this.tokens=F}}class H{constructor(N,F){this._documents=N,this._provider=F,this._nextResultId=1,this._previousResults=new Map}async provideDocumentSemanticTokens(N,F,C){const O=this._documents.getDocument(N),x=F!==0?this._previousResults.get(F):null;let X=typeof x?.resultId=="string"&&typeof this._provider.provideDocumentSemanticTokensEdits=="function"?await this._provider.provideDocumentSemanticTokensEdits(O,x.resultId,C):await this._provider.provideDocumentSemanticTokens(O,C);return x&&this._previousResults.delete(F),X?(X=H._fixProvidedSemanticTokens(X),this._send(H._convertToEdits(x,X),X)):null}async releaseDocumentSemanticColoring(N){this._previousResults.delete(N)}static _fixProvidedSemanticTokens(N){return H._isSemanticTokens(N)?H._isCorrectSemanticTokens(N)?N:new B.SemanticTokens(new Uint32Array(N.data),N.resultId):H._isSemanticTokensEdits(N)?H._isCorrectSemanticTokensEdits(N)?N:new B.SemanticTokensEdits(N.edits.map(F=>new B.SemanticTokensEdit(F.start,F.deleteCount,F.data?new Uint32Array(F.data):F.data)),N.resultId):N}static _isSemanticTokens(N){return N&&!!N.data}static _isCorrectSemanticTokens(N){return N.data instanceof Uint32Array}static _isSemanticTokensEdits(N){return N&&Array.isArray(N.edits)}static _isCorrectSemanticTokensEdits(N){for(const F of N.edits)if(!(F.data instanceof Uint32Array))return!1;return!0}static _convertToEdits(N,F){if(!H._isSemanticTokens(F)||!N||!N.tokens)return F;const C=N.tokens,O=C.length,x=F.data,X=x.length;let re=0;const ve=Math.min(O,X);for(;re<ve&&C[re]===x[re];)re++;if(re===O&&re===X)return new B.SemanticTokensEdits([],F.resultId);let Ie=0;const Me=ve-re;for(;Ie<Me&&C[O-Ie-1]===x[X-Ie-1];)Ie++;return new B.SemanticTokensEdits([{start:re,deleteCount:O-re-Ie,data:x.subarray(re,X-Ie)}],F.resultId)}_send(N,F){if(H._isSemanticTokens(N)){const C=this._nextResultId++;return this._previousResults.set(C,new K(N.resultId,N.data)),(0,s.encodeSemanticTokensDto)({id:C,type:"full",data:N.data})}if(H._isSemanticTokensEdits(N)){const C=this._nextResultId++;return H._isSemanticTokens(F)?this._previousResults.set(C,new K(F.resultId,F.data)):this._previousResults.set(C,new K(N.resultId)),(0,s.encodeSemanticTokensDto)({id:C,type:"delta",deltas:(N.edits||[]).map(O=>({start:O.start,deleteCount:O.deleteCount,data:O.data}))})}return null}}e.DocumentSemanticTokensAdapter=H;class te{constructor(N,F){this._documents=N,this._provider=F}async provideDocumentRangeSemanticTokens(N,F,C){const O=this._documents.getDocument(N),x=await this._provider.provideDocumentRangeSemanticTokens(O,w.Range.to(F),C);return x?this._send(x):null}_send(N){return(0,s.encodeSemanticTokensDto)({id:0,type:"full",data:N.data})}}e.DocumentRangeSemanticTokensAdapter=te;class ae{constructor(N,F,C,O,x){this._documents=N,this._commands=F,this._provider=C,this._apiDeprecation=O,this._extension=x,this._cache=new f.Cache("CompletionItem"),this._disposables=new Map}static supportsResolving(N){return typeof N.resolveCompletionItem=="function"}async provideCompletionItems(N,F,C,O){const x=this._documents.getDocument(N),X=w.Position.to(F),re=x.getWordRangeAtPosition(X)||new B.Range(X,X),ve=re.with({end:X}),Ie=new D.StopWatch(!0),Me=await this._provider.provideCompletionItems(x,X,O,w.CompletionContext.to(C));if(!Me||O.isCancellationRequested)return;const Le=Array.isArray(Me)?new B.CompletionList(Me):Me,ze=ae.supportsResolving(this._provider)?this._cache.add(Le.items):this._cache.add([]),xe=new m.DisposableStore;this._disposables.set(ze,xe);const Re=[],Qe={x:ze,b:Re,a:{replace:w.Range.from(re),insert:w.Range.from(ve)},c:Le.isIncomplete||void 0,d:Ie.elapsed()};for(let tt=0;tt<Le.items.length;tt++){const Te=Le.items[tt],it=this._convertCompletionItem(Te,[ze,tt],ve,re);Re.push(it)}return Qe}async resolveCompletionItem(N,F){if(typeof this._provider.resolveCompletionItem!="function")return;const C=this._cache.get(...N);if(!C)return;const O=await this._provider.resolveCompletionItem(C,F);if(!!O)return this._convertCompletionItem(O,N)}releaseCompletionItems(N){this._disposables.get(N)?.dispose(),this._disposables.delete(N),this._cache.delete(N)}_convertCompletionItem(N,F,C,O){const x=this._disposables.get(F[0]);if(!x)throw Error("DisposableStore is missing...");const X={x:F,a:N.label,b:N.kind!==void 0?w.CompletionItemKind.from(N.kind):void 0,n:N.tags&&N.tags.map(w.CompletionItemTag.from),c:N.detail,d:typeof N.documentation=="undefined"?void 0:w.MarkdownString.fromStrict(N.documentation),e:N.sortText!==N.label?N.sortText:void 0,f:N.filterText!==N.label?N.filterText:void 0,g:N.preselect||void 0,i:N.keepWhitespace?1:0,k:N.commitCharacters,l:N.additionalTextEdits&&N.additionalTextEdits.map(w.TextEdit.from),m:this._commands.toInternal(N.command,x)};N.textEdit?(this._apiDeprecation.report("CompletionItem.textEdit",this._extension,"Use 'CompletionItem.insertText' and 'CompletionItem.range' instead."),X.h=N.textEdit.newText):typeof N.insertText=="string"?X.h=N.insertText:N.insertText instanceof B.SnippetString&&(X.h=N.insertText.value,X.i|=4);let re;return N.textEdit?re=N.textEdit.range:N.range&&(re=N.range),B.Range.isRange(re)?X.j=w.Range.from(re):re&&(!C?.isEqual(re.inserting)||!O?.isEqual(re.replacing))&&(X.j={insert:w.Range.from(re.inserting),replace:w.Range.from(re.replacing)}),X}}class ee{constructor(N,F,C){this._documents=N,this._provider=F,this._commands=C,this._cache=new f.Cache("InlineCompletionItem"),this._disposables=new Map}async provideInlineCompletions(N,F,C,O){const x=this._documents.getDocument(N),X=w.Position.to(F),re=await this._provider.provideInlineCompletionItems(x,X,{selectedCompletionInfo:C.selectedSuggestionInfo?{range:w.Range.to(C.selectedSuggestionInfo.range),text:C.selectedSuggestionInfo.text,isSnippetText:C.selectedSuggestionInfo.isSnippetText,completionKind:w.CompletionItemKind.to(C.selectedSuggestionInfo.completionKind)}:void 0,triggerKind:C.triggerKind},O);if(!re||O.isCancellationRequested)return;const ve=(0,L.isArray)(re)?re:re.items,Ie=this._cache.add(ve);let Me;return{pid:Ie,items:ve.map((Le,ze)=>{let xe;Le.command&&(Me||(Me=new m.DisposableStore,this._disposables.set(Ie,Me)),xe=this._commands.toInternal(Le.command,Me));const Re=Le.insertText??Le.text;if(Re===void 0)throw new Error("text or insertText must be defined");return{text:Re,range:Le.range?w.Range.from(Le.range):void 0,command:xe,idx:ze,completeBracketPairs:Le.completeBracketPairs}})}}disposeCompletions(N){this._cache.delete(N);const F=this._disposables.get(N);F&&F.clear(),this._disposables.delete(N)}handleDidShowCompletionItem(N,F){const C=this._cache.get(N,F);C&&ce.get(this._provider).fireOnDidShowCompletionItem({completionItem:C})}}class ce{constructor(){this._onDidShowCompletionItemEmitter=new d.Emitter,this.onDidShowCompletionItem=this._onDidShowCompletionItemEmitter.event}static get(N){let F=ce.map.get(N);return F||(F=new ce,ce.map.set(N,F)),F}fireOnDidShowCompletionItem(N){this._onDidShowCompletionItemEmitter.fire(N)}}e.InlineCompletionController=ce,ce.map=new WeakMap;class de{constructor(N,F){this._documents=N,this._provider=F,this._cache=new f.Cache("SignatureHelp")}async provideSignatureHelp(N,F,C,O){const x=this._documents.getDocument(N),X=w.Position.to(F),re=this.reviveContext(C),ve=await this._provider.provideSignatureHelp(x,X,O,re);if(ve){const Ie=this._cache.add([ve]);return{...w.SignatureHelp.from(ve),id:Ie}}}reviveContext(N){let F;if(N.activeSignatureHelp){const C=w.SignatureHelp.to(N.activeSignatureHelp),O=this._cache.get(N.activeSignatureHelp.id,0);O?(F=O,F.activeSignature=C.activeSignature,F.activeParameter=C.activeParameter):F=C}return{...N,activeSignatureHelp:F}}releaseSignatureHelp(N){this._cache.delete(N)}}class Se{constructor(N,F,C,O,x){this._documents=N,this._commands=F,this._provider=C,this._logService=O,this._extension=x,this._cache=new f.Cache("InlayHints"),this._disposables=new Map}async provideInlayHints(N,F,C){const O=this._documents.getDocument(N),x=w.Range.to(F),X=await this._provider.provideInlayHints(O,x,C);if(!Array.isArray(X)||X.length===0){this._logService.trace(`[InlayHints] NO inlay hints from '${this._extension.identifier.value}' for ${F}`);return}if(C.isCancellationRequested)return;const re=this._cache.add(X);this._disposables.set(re,new m.DisposableStore);const ve={hints:[],cacheId:re};for(let Ie=0;Ie<X.length;Ie++)this._isValidInlayHint(X[Ie],x)&&ve.hints.push(this._convertInlayHint(X[Ie],[re,Ie]));return this._logService.trace(`[InlayHints] ${ve.hints.length} inlay hints from '${this._extension.identifier.value}' for ${F}`),ve}async resolveInlayHint(N,F){if(typeof this._provider.resolveInlayHint!="function")return;const C=this._cache.get(...N);if(!C)return;const O=await this._provider.resolveInlayHint(C,F);if(!!O&&!!this._isValidInlayHint(O))return this._convertInlayHint(O,N)}releaseHints(N){this._disposables.get(N)?.dispose(),this._disposables.delete(N),this._cache.delete(N)}_isValidInlayHint(N,F){return N.label.length===0||Array.isArray(N.label)&&N.label.every(C=>C.value.length===0)?(console.log("INVALID inlay hint, empty label",N),!1):!(F&&!F.contains(N.position))}_convertInlayHint(N,F){const C=this._disposables.get(F[0]);if(!C)throw Error("DisposableStore is missing...");const O={label:"",cacheId:F,tooltip:w.MarkdownString.fromStrict(N.tooltip),position:w.Position.from(N.position),kind:N.kind&&w.InlayHintKind.from(N.kind),paddingLeft:N.paddingLeft,paddingRight:N.paddingRight};return typeof N.label=="string"?O.label=N.label:O.label=N.label.map(x=>{let X={label:x.value};return X.tooltip=w.MarkdownString.fromStrict(x.tooltip),B.Location.isLocation(x.location)&&(X.location=w.location.from(x.location)),x.command&&(X.command=this._commands.toInternal(x.command,C)),X}),O}}class fe{constructor(N,F){this._documents=N,this._provider=F,this._cache=new f.Cache("DocumentLink")}async provideLinks(N,F){const C=this._documents.getDocument(N),O=await this._provider.provideDocumentLinks(C,F);if(!(!Array.isArray(O)||O.length===0)&&!F.isCancellationRequested){if(typeof this._provider.resolveDocumentLink!="function")return{links:O.filter(fe._validateLink).map(w.DocumentLink.from)};{const x=this._cache.add(O),X={links:[],cacheId:x};for(let re=0;re<O.length;re++){if(!fe._validateLink(O[re]))continue;const ve=w.DocumentLink.from(O[re]);ve.cacheId=[x,re],X.links.push(ve)}return X}}}static _validateLink(N){return N.target&&N.target.path.length>5e4?(console.warn("DROPPING link because it is too long"),!1):!0}async resolveLink(N,F){if(typeof this._provider.resolveDocumentLink!="function")return;const C=this._cache.get(...N);if(!C)return;const O=await this._provider.resolveDocumentLink(C,F);if(!(!O||!fe._validateLink(O)))return w.DocumentLink.from(O)}releaseLinks(N){this._cache.delete(N)}}class ne{constructor(N,F){this._documents=N,this._provider=F}async provideColors(N,F){const C=this._documents.getDocument(N),O=await this._provider.provideDocumentColors(C,F);return Array.isArray(O)?O.map(X=>({color:w.Color.from(X.color),range:w.Range.from(X.range)})):[]}async provideColorPresentations(N,F,C){const O=this._documents.getDocument(N),x=w.Range.to(F.range),X=w.Color.to(F.color),re=await this._provider.provideColorPresentations(X,{document:O,range:x},C);if(!!Array.isArray(re))return re.map(w.ColorPresentation.from)}}class me{constructor(N,F){this._documents=N,this._provider=F}async provideFoldingRanges(N,F,C){const O=this._documents.getDocument(N),x=await this._provider.provideFoldingRanges(O,F,C);if(!!Array.isArray(x))return x.map(w.FoldingRange.from)}}class ke{constructor(N,F,C){this._documents=N,this._provider=F,this._logService=C}async provideSelectionRanges(N,F,C){const O=this._documents.getDocument(N),x=F.map(w.Position.to),X=await this._provider.provideSelectionRanges(O,x,C);if(!(0,M.isNonEmptyArray)(X))return[];if(X.length!==x.length)return this._logService.warn("BAD selection ranges, provider must return ranges for each position"),[];const re=[];for(let ve=0;ve<x.length;ve++){const Ie=[];re.push(Ie);let Me=x[ve],Le=X[ve];for(;;){if(!Le.range.contains(Me))throw new Error("INVALID selection range, must contain the previous range");if(Ie.push(w.SelectionRange.from(Le)),!Le.parent)break;Me=Le.range,Le=Le.parent}}return re}}class Ae{constructor(N,F){this._documents=N,this._provider=F,this._idPool=new n.IdGenerator(""),this._cache=new Map}async prepareSession(N,F,C){const O=this._documents.getDocument(N),x=w.Position.to(F),X=await this._provider.prepareCallHierarchy(O,x,C);if(!X)return;const re=this._idPool.nextId();return this._cache.set(re,new Map),Array.isArray(X)?X.map(ve=>this._cacheAndConvertItem(re,ve)):[this._cacheAndConvertItem(re,X)]}async provideCallsTo(N,F,C){const O=this._itemFromCache(N,F);if(!O)throw new Error("missing call hierarchy item");const x=await this._provider.provideCallHierarchyIncomingCalls(O,C);if(!!x)return x.map(X=>({from:this._cacheAndConvertItem(N,X.from),fromRanges:X.fromRanges.map(re=>w.Range.from(re))}))}async provideCallsFrom(N,F,C){const O=this._itemFromCache(N,F);if(!O)throw new Error("missing call hierarchy item");const x=await this._provider.provideCallHierarchyOutgoingCalls(O,C);if(!!x)return x.map(X=>({to:this._cacheAndConvertItem(N,X.to),fromRanges:X.fromRanges.map(re=>w.Range.from(re))}))}releaseSession(N){this._cache.delete(N)}_cacheAndConvertItem(N,F){const C=this._cache.get(N),O=w.CallHierarchyItem.from(F,N,C.size.toString(36));return C.set(O._itemId,F),O}_itemFromCache(N,F){return this._cache.get(N)?.get(F)}}class Be{constructor(N,F){this._documents=N,this._provider=F,this._idPool=new n.IdGenerator(""),this._cache=new Map}async prepareSession(N,F,C){const O=this._documents.getDocument(N),x=w.Position.to(F),X=await this._provider.prepareTypeHierarchy(O,x,C);if(!X)return;const re=this._idPool.nextId();return this._cache.set(re,new Map),Array.isArray(X)?X.map(ve=>this._cacheAndConvertItem(re,ve)):[this._cacheAndConvertItem(re,X)]}async provideSupertypes(N,F,C){const O=this._itemFromCache(N,F);if(!O)throw new Error("missing type hierarchy item");const x=await this._provider.provideTypeHierarchySupertypes(O,C);if(!!x)return x.map(X=>this._cacheAndConvertItem(N,X))}async provideSubtypes(N,F,C){const O=this._itemFromCache(N,F);if(!O)throw new Error("missing type hierarchy item");const x=await this._provider.provideTypeHierarchySubtypes(O,C);if(!!x)return x.map(X=>this._cacheAndConvertItem(N,X))}releaseSession(N){this._cache.delete(N)}_cacheAndConvertItem(N,F){const C=this._cache.get(N),O=w.TypeHierarchyItem.from(F,N,C.size.toString(36));return C.set(O._itemId,F),O}_itemFromCache(N,F){return this._cache.get(N)?.get(F)}}class Xe{constructor(N,F){this.adapter=N,this.extension=F}}class ge{constructor(N,F,C,O,x,X,re){this._adapter=new Map,this._uriTransformer=F,this._proxy=N.getProxy(S.MainContext.MainThreadLanguageFeatures),this._documents=C,this._commands=O,this._diagnostics=x,this._logService=X,this._apiDeprecation=re}_transformDocumentSelector(N){return w.DocumentSelector.from(N,this._uriTransformer)}_createDisposable(N){return new B.Disposable(()=>{this._adapter.delete(N),this._proxy.$unregister(N)})}_nextHandle(){return ge._handlePool++}async _withAdapter(N,F,C,O,x){const X=this._adapter.get(N);if(!X||!(X.adapter instanceof F))return O;const re=Date.now();this._logService.trace(`[${X.extension.identifier.value}] INVOKE provider '${C.toString().replace(/[\r\n]/g,"")}'`);const ve=C(X.adapter,X.extension);return Promise.resolve(ve).catch(Ie=>{(0,T.isCancellationError)(Ie)||(this._logService.error(`[${X.extension.identifier.value}] provider FAILED`),this._logService.error(Ie))}).finally(()=>{this._logService.trace(`[${X.extension.identifier.value}] provider DONE after ${Date.now()-re}ms`)}),u.CancellationToken.isCancellationToken(x)?(0,g.raceCancellationError)(ve,x):ve}_addNewAdapter(N,F){const C=this._nextHandle();return this._adapter.set(C,new Xe(N,F)),C}static _extLabel(N){return N.displayName||N.name}registerDocumentSymbolProvider(N,F,C,O){const x=this._addNewAdapter(new b(this._documents,C),N),X=O&&O.label||ge._extLabel(N);return this._proxy.$registerDocumentSymbolProvider(x,this._transformDocumentSelector(F),X),this._createDisposable(x)}$provideDocumentSymbols(N,F,C){return this._withAdapter(N,b,O=>O.provideDocumentSymbols(o.URI.revive(F),C),void 0,C)}registerCodeLensProvider(N,F,C){const O=this._nextHandle(),x=typeof C.onDidChangeCodeLenses=="function"?this._nextHandle():void 0;this._adapter.set(O,new Xe(new l(this._documents,this._commands.converter,C),N)),this._proxy.$registerCodeLensSupport(O,this._transformDocumentSelector(F),x);let X=this._createDisposable(O);if(x!==void 0){const re=C.onDidChangeCodeLenses(ve=>this._proxy.$emitCodeLensEvent(x));X=B.Disposable.from(X,re)}return X}$provideCodeLenses(N,F,C){return this._withAdapter(N,l,O=>O.provideCodeLenses(o.URI.revive(F),C),void 0,C)}$resolveCodeLens(N,F,C){return this._withAdapter(N,l,O=>O.resolveCodeLens(F,C),void 0,void 0)}$releaseCodeLenses(N,F){this._withAdapter(N,l,C=>Promise.resolve(C.releaseCodeLenses(F)),void 0,void 0)}registerDefinitionProvider(N,F,C){const O=this._addNewAdapter(new r(this._documents,C),N);return this._proxy.$registerDefinitionSupport(O,this._transformDocumentSelector(F)),this._createDisposable(O)}$provideDefinition(N,F,C,O){return this._withAdapter(N,r,x=>x.provideDefinition(o.URI.revive(F),C,O),[],O)}registerDeclarationProvider(N,F,C){const O=this._addNewAdapter(new i(this._documents,C),N);return this._proxy.$registerDeclarationSupport(O,this._transformDocumentSelector(F)),this._createDisposable(O)}$provideDeclaration(N,F,C,O){return this._withAdapter(N,i,x=>x.provideDeclaration(o.URI.revive(F),C,O),[],O)}registerImplementationProvider(N,F,C){const O=this._addNewAdapter(new c(this._documents,C),N);return this._proxy.$registerImplementationSupport(O,this._transformDocumentSelector(F)),this._createDisposable(O)}$provideImplementation(N,F,C,O){return this._withAdapter(N,c,x=>x.provideImplementation(o.URI.revive(F),C,O),[],O)}registerTypeDefinitionProvider(N,F,C){const O=this._addNewAdapter(new t(this._documents,C),N);return this._proxy.$registerTypeDefinitionSupport(O,this._transformDocumentSelector(F)),this._createDisposable(O)}$provideTypeDefinition(N,F,C,O){return this._withAdapter(N,t,x=>x.provideTypeDefinition(o.URI.revive(F),C,O),[],O)}registerHoverProvider(N,F,C,O){const x=this._addNewAdapter(new a(this._documents,C),N);return this._proxy.$registerHoverProvider(x,this._transformDocumentSelector(F)),this._createDisposable(x)}$provideHover(N,F,C,O){return this._withAdapter(N,a,x=>x.provideHover(o.URI.revive(F),C,O),void 0,O)}registerEvaluatableExpressionProvider(N,F,C,O){const x=this._addNewAdapter(new p(this._documents,C),N);return this._proxy.$registerEvaluatableExpressionProvider(x,this._transformDocumentSelector(F)),this._createDisposable(x)}$provideEvaluatableExpression(N,F,C,O){return this._withAdapter(N,p,x=>x.provideEvaluatableExpression(o.URI.revive(F),C,O),void 0,O)}registerInlineValuesProvider(N,F,C,O){const x=typeof C.onDidChangeInlineValues=="function"?this._nextHandle():void 0,X=this._addNewAdapter(new h(this._documents,C),N);this._proxy.$registerInlineValuesProvider(X,this._transformDocumentSelector(F),x);let re=this._createDisposable(X);if(x!==void 0){const ve=C.onDidChangeInlineValues(Ie=>this._proxy.$emitInlineValuesEvent(x));re=B.Disposable.from(re,ve)}return re}$provideInlineValues(N,F,C,O,x){return this._withAdapter(N,h,X=>X.provideInlineValues(o.URI.revive(F),C,O,x),void 0,x)}registerDocumentHighlightProvider(N,F,C){const O=this._addNewAdapter(new _(this._documents,C),N);return this._proxy.$registerDocumentHighlightProvider(O,this._transformDocumentSelector(F)),this._createDisposable(O)}$provideDocumentHighlights(N,F,C,O){return this._withAdapter(N,_,x=>x.provideDocumentHighlights(o.URI.revive(F),C,O),void 0,O)}registerLinkedEditingRangeProvider(N,F,C){const O=this._addNewAdapter(new P(this._documents,C),N);return this._proxy.$registerLinkedEditingRangeProvider(O,this._transformDocumentSelector(F)),this._createDisposable(O)}$provideLinkedEditingRanges(N,F,C,O){return this._withAdapter(N,P,async x=>{const X=await x.provideLinkedEditingRanges(o.URI.revive(F),C,O);if(X)return{ranges:X.ranges,wordPattern:X.wordPattern?ge._serializeRegExp(X.wordPattern):void 0}},void 0,O)}registerReferenceProvider(N,F,C){const O=this._addNewAdapter(new R(this._documents,C),N);return this._proxy.$registerReferenceSupport(O,this._transformDocumentSelector(F)),this._createDisposable(O)}$provideReferences(N,F,C,O,x){return this._withAdapter(N,R,X=>X.provideReferences(o.URI.revive(F),C,O,x),void 0,x)}registerCodeActionProvider(N,F,C,O){const x=new m.DisposableStore,X=this._addNewAdapter(new $(this._documents,this._commands.converter,this._diagnostics,C,this._logService,N,this._apiDeprecation),N);return this._proxy.$registerQuickFixSupport(X,this._transformDocumentSelector(F),{providedKinds:O?.providedCodeActionKinds?.map(re=>re.value),documentation:O?.documentation?.map(re=>({kind:re.kind.value,command:this._commands.converter.toInternal(re.command,x)}))},ge._extLabel(N),Boolean(C.resolveCodeAction)),x.add(this._createDisposable(X)),x}$provideCodeActions(N,F,C,O,x){return this._withAdapter(N,$,X=>X.provideCodeActions(o.URI.revive(F),C,O,x),void 0,x)}$resolveCodeAction(N,F,C){return this._withAdapter(N,$,O=>O.resolveCodeAction(F,C),void 0,void 0)}$releaseCodeActions(N,F){this._withAdapter(N,$,C=>Promise.resolve(C.releaseCodeActions(F)),void 0,void 0)}registerDocumentFormattingEditProvider(N,F,C){const O=this._addNewAdapter(new E(this._documents,C),N);return this._proxy.$registerDocumentFormattingSupport(O,this._transformDocumentSelector(F),N.identifier,N.displayName||N.name),this._createDisposable(O)}$provideDocumentFormattingEdits(N,F,C,O){return this._withAdapter(N,E,x=>x.provideDocumentFormattingEdits(o.URI.revive(F),C,O),void 0,O)}registerDocumentRangeFormattingEditProvider(N,F,C){const O=this._addNewAdapter(new z(this._documents,C),N);return this._proxy.$registerRangeFormattingSupport(O,this._transformDocumentSelector(F),N.identifier,N.displayName||N.name),this._createDisposable(O)}$provideDocumentRangeFormattingEdits(N,F,C,O,x){return this._withAdapter(N,z,X=>X.provideDocumentRangeFormattingEdits(o.URI.revive(F),C,O,x),void 0,x)}registerOnTypeFormattingEditProvider(N,F,C,O){const x=this._addNewAdapter(new V(this._documents,C),N);return this._proxy.$registerOnTypeFormattingSupport(x,this._transformDocumentSelector(F),O,N.identifier),this._createDisposable(x)}$provideOnTypeFormattingEdits(N,F,C,O,x,X){return this._withAdapter(N,V,re=>re.provideOnTypeFormattingEdits(o.URI.revive(F),C,O,x,X),void 0,X)}registerWorkspaceSymbolProvider(N,F){const C=this._addNewAdapter(new W(F,this._logService),N);return this._proxy.$registerNavigateTypeSupport(C,typeof F.resolveWorkspaceSymbol=="function"),this._createDisposable(C)}$provideWorkspaceSymbols(N,F,C){return this._withAdapter(N,W,O=>O.provideWorkspaceSymbols(F,C),{symbols:[]},C)}$resolveWorkspaceSymbol(N,F,C){return this._withAdapter(N,W,O=>O.resolveWorkspaceSymbol(F,C),void 0,void 0)}$releaseWorkspaceSymbols(N,F){this._withAdapter(N,W,C=>C.releaseWorkspaceSymbols(F),void 0,void 0)}registerRenameProvider(N,F,C){const O=this._addNewAdapter(new Q(this._documents,C,this._logService),N);return this._proxy.$registerRenameSupport(O,this._transformDocumentSelector(F),Q.supportsResolving(C)),this._createDisposable(O)}$provideRenameEdits(N,F,C,O,x){return this._withAdapter(N,Q,X=>X.provideRenameEdits(o.URI.revive(F),C,O,x),void 0,x)}$resolveRenameLocation(N,F,C,O){return this._withAdapter(N,Q,x=>x.resolveRenameLocation(o.URI.revive(F),C,O),void 0,O)}registerDocumentSemanticTokensProvider(N,F,C,O){const x=this._addNewAdapter(new H(this._documents,C),N),X=typeof C.onDidChangeSemanticTokens=="function"?this._nextHandle():void 0;this._proxy.$registerDocumentSemanticTokensProvider(x,this._transformDocumentSelector(F),O,X);let re=this._createDisposable(x);if(X){const ve=C.onDidChangeSemanticTokens(Ie=>this._proxy.$emitDocumentSemanticTokensEvent(X));re=B.Disposable.from(re,ve)}return re}$provideDocumentSemanticTokens(N,F,C,O){return this._withAdapter(N,H,x=>x.provideDocumentSemanticTokens(o.URI.revive(F),C,O),null,O)}$releaseDocumentSemanticTokens(N,F){this._withAdapter(N,H,C=>C.releaseDocumentSemanticColoring(F),void 0,void 0)}registerDocumentRangeSemanticTokensProvider(N,F,C,O){const x=this._addNewAdapter(new te(this._documents,C),N);return this._proxy.$registerDocumentRangeSemanticTokensProvider(x,this._transformDocumentSelector(F),O),this._createDisposable(x)}$provideDocumentRangeSemanticTokens(N,F,C,O){return this._withAdapter(N,te,x=>x.provideDocumentRangeSemanticTokens(o.URI.revive(F),C,O),null,O)}registerCompletionItemProvider(N,F,C,O){const x=this._addNewAdapter(new ae(this._documents,this._commands.converter,C,this._apiDeprecation,N),N);return this._proxy.$registerSuggestSupport(x,this._transformDocumentSelector(F),O,ae.supportsResolving(C),`${N.identifier.value}(${O.join("")})`),this._createDisposable(x)}$provideCompletionItems(N,F,C,O,x){return this._withAdapter(N,ae,X=>X.provideCompletionItems(o.URI.revive(F),C,O,x),void 0,x)}$resolveCompletionItem(N,F,C){return this._withAdapter(N,ae,O=>O.resolveCompletionItem(F,C),void 0,C)}$releaseCompletionItems(N,F){this._withAdapter(N,ae,C=>C.releaseCompletionItems(F),void 0,void 0)}registerInlineCompletionsProvider(N,F,C){const O=this._addNewAdapter(new ee(this._documents,C,this._commands.converter),N);return this._proxy.$registerInlineCompletionsSupport(O,this._transformDocumentSelector(F)),this._createDisposable(O)}$provideInlineCompletions(N,F,C,O,x){return this._withAdapter(N,ee,X=>X.provideInlineCompletions(o.URI.revive(F),C,O,x),void 0,x)}$handleInlineCompletionDidShow(N,F,C){this._withAdapter(N,ee,async O=>{O.handleDidShowCompletionItem(F,C)},void 0,void 0)}$freeInlineCompletionsList(N,F){this._withAdapter(N,ee,async C=>{C.disposeCompletions(F)},void 0,void 0)}registerSignatureHelpProvider(N,F,C,O){const x=Array.isArray(O)?{triggerCharacters:O,retriggerCharacters:[]}:O,X=this._addNewAdapter(new de(this._documents,C),N);return this._proxy.$registerSignatureHelpProvider(X,this._transformDocumentSelector(F),x),this._createDisposable(X)}$provideSignatureHelp(N,F,C,O,x){return this._withAdapter(N,de,X=>X.provideSignatureHelp(o.URI.revive(F),C,O,x),void 0,x)}$releaseSignatureHelp(N,F){this._withAdapter(N,de,C=>C.releaseSignatureHelp(F),void 0,void 0)}registerInlayHintsProvider(N,F,C){const O=typeof C.onDidChangeInlayHints=="function"?this._nextHandle():void 0,x=this._addNewAdapter(new Se(this._documents,this._commands.converter,C,this._logService,N),N);this._proxy.$registerInlayHintsProvider(x,this._transformDocumentSelector(F),typeof C.resolveInlayHint=="function",O,ge._extLabel(N));let X=this._createDisposable(x);if(O!==void 0){const re=C.onDidChangeInlayHints(ve=>this._proxy.$emitInlayHintsEvent(O));X=B.Disposable.from(X,re)}return X}$provideInlayHints(N,F,C,O){return this._withAdapter(N,Se,x=>x.provideInlayHints(o.URI.revive(F),C,O),void 0,O)}$resolveInlayHint(N,F,C){return this._withAdapter(N,Se,O=>O.resolveInlayHint(F,C),void 0,C)}$releaseInlayHints(N,F){this._withAdapter(N,Se,C=>C.releaseHints(F),void 0,void 0)}registerDocumentLinkProvider(N,F,C){const O=this._addNewAdapter(new fe(this._documents,C),N);return this._proxy.$registerDocumentLinkProvider(O,this._transformDocumentSelector(F),typeof C.resolveDocumentLink=="function"),this._createDisposable(O)}$provideDocumentLinks(N,F,C){return this._withAdapter(N,fe,O=>O.provideLinks(o.URI.revive(F),C),void 0,C)}$resolveDocumentLink(N,F,C){return this._withAdapter(N,fe,O=>O.resolveLink(F,C),void 0,void 0)}$releaseDocumentLinks(N,F){this._withAdapter(N,fe,C=>C.releaseLinks(F),void 0,void 0)}registerColorProvider(N,F,C){const O=this._addNewAdapter(new ne(this._documents,C),N);return this._proxy.$registerDocumentColorProvider(O,this._transformDocumentSelector(F)),this._createDisposable(O)}$provideDocumentColors(N,F,C){return this._withAdapter(N,ne,O=>O.provideColors(o.URI.revive(F),C),[],C)}$provideColorPresentations(N,F,C,O){return this._withAdapter(N,ne,x=>x.provideColorPresentations(o.URI.revive(F),C,O),void 0,O)}registerFoldingRangeProvider(N,F,C){const O=this._nextHandle(),x=typeof C.onDidChangeFoldingRanges=="function"?this._nextHandle():void 0;this._adapter.set(O,new Xe(new me(this._documents,C),N)),this._proxy.$registerFoldingRangeProvider(O,this._transformDocumentSelector(F),x);let X=this._createDisposable(O);if(x!==void 0){const re=C.onDidChangeFoldingRanges(()=>this._proxy.$emitFoldingRangeEvent(x));X=B.Disposable.from(X,re)}return X}$provideFoldingRanges(N,F,C,O){return this._withAdapter(N,me,x=>x.provideFoldingRanges(o.URI.revive(F),C,O),void 0,O)}registerSelectionRangeProvider(N,F,C){const O=this._addNewAdapter(new ke(this._documents,C,this._logService),N);return this._proxy.$registerSelectionRangeProvider(O,this._transformDocumentSelector(F)),this._createDisposable(O)}$provideSelectionRanges(N,F,C,O){return this._withAdapter(N,ke,x=>x.provideSelectionRanges(o.URI.revive(F),C,O),[],O)}registerCallHierarchyProvider(N,F,C){const O=this._addNewAdapter(new Ae(this._documents,C),N);return this._proxy.$registerCallHierarchyProvider(O,this._transformDocumentSelector(F)),this._createDisposable(O)}$prepareCallHierarchy(N,F,C,O){return this._withAdapter(N,Ae,x=>Promise.resolve(x.prepareSession(o.URI.revive(F),C,O)),void 0,O)}$provideCallHierarchyIncomingCalls(N,F,C,O){return this._withAdapter(N,Ae,x=>x.provideCallsTo(F,C,O),void 0,O)}$provideCallHierarchyOutgoingCalls(N,F,C,O){return this._withAdapter(N,Ae,x=>x.provideCallsFrom(F,C,O),void 0,O)}$releaseCallHierarchy(N,F){this._withAdapter(N,Ae,C=>Promise.resolve(C.releaseSession(F)),void 0,void 0)}registerTypeHierarchyProvider(N,F,C){const O=this._addNewAdapter(new Be(this._documents,C),N);return this._proxy.$registerTypeHierarchyProvider(O,this._transformDocumentSelector(F)),this._createDisposable(O)}$prepareTypeHierarchy(N,F,C,O){return this._withAdapter(N,Be,x=>Promise.resolve(x.prepareSession(o.URI.revive(F),C,O)),void 0,O)}$provideTypeHierarchySupertypes(N,F,C,O){return this._withAdapter(N,Be,x=>x.provideSupertypes(F,C,O),void 0,O)}$provideTypeHierarchySubtypes(N,F,C,O){return this._withAdapter(N,Be,x=>x.provideSubtypes(F,C,O),void 0,O)}$releaseTypeHierarchy(N,F){this._withAdapter(N,Be,C=>Promise.resolve(C.releaseSession(F)),void 0,void 0)}static _serializeRegExp(N){return{pattern:N.source,flags:(0,A.regExpFlags)(N)}}static _serializeIndentationRule(N){return{decreaseIndentPattern:ge._serializeRegExp(N.decreaseIndentPattern),increaseIndentPattern:ge._serializeRegExp(N.increaseIndentPattern),indentNextLinePattern:N.indentNextLinePattern?ge._serializeRegExp(N.indentNextLinePattern):void 0,unIndentedLinePattern:N.unIndentedLinePattern?ge._serializeRegExp(N.unIndentedLinePattern):void 0}}static _serializeOnEnterRule(N){return{beforeText:ge._serializeRegExp(N.beforeText),afterText:N.afterText?ge._serializeRegExp(N.afterText):void 0,previousLineText:N.previousLineText?ge._serializeRegExp(N.previousLineText):void 0,action:N.action}}static _serializeOnEnterRules(N){return N.map(ge._serializeOnEnterRule)}setLanguageConfiguration(N,F,C){let{wordPattern:O}=C;if(O&&(0,A.regExpLeadsToEndlessLoop)(O))throw new Error(`Invalid language configuration: wordPattern '${O}' is not allowed to match the empty string.`);O?this._documents.setWordDefinitionFor(F,O):this._documents.setWordDefinitionFor(F,void 0),C.__electricCharacterSupport&&this._apiDeprecation.report("LanguageConfiguration.__electricCharacterSupport",N,"Do not use."),C.__characterPairSupport&&this._apiDeprecation.report("LanguageConfiguration.__characterPairSupport",N,"Do not use.");const x=this._nextHandle(),X={comments:C.comments,brackets:C.brackets,wordPattern:C.wordPattern?ge._serializeRegExp(C.wordPattern):void 0,indentationRules:C.indentationRules?ge._serializeIndentationRule(C.indentationRules):void 0,onEnterRules:C.onEnterRules?ge._serializeOnEnterRules(C.onEnterRules):void 0,__electricCharacterSupport:C.__electricCharacterSupport,__characterPairSupport:C.__characterPairSupport};return this._proxy.$setLanguageConfiguration(x,F,X),this._createDisposable(x)}$setWordDefinitions(N){for(const F of N)this._documents.setWordDefinitionFor(F.languageId,new RegExp(F.regexSource,F.regexFlags))}}e.ExtHostLanguageFeatures=ge,ge._handlePool=0}),define(Ee[192],we([1,0,4,8,7,34,13,6]),function(J,e,o,k,w,B,S,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtHostLanguages=void 0;class y{constructor(L,v,u,m){this._documents=v,this._commands=u,this._uriTransformer=m,this._languageIds=[],this._handlePool=0,this._ids=new Set,this._proxy=L.getProxy(o.MainContext.MainThreadLanguages)}$acceptLanguageIds(L){this._languageIds=L}async getLanguages(){return this._languageIds.slice(0)}async changeLanguage(L,v){await this._proxy.$changeLanguage(L,v);const u=this._documents.getDocumentData(L);if(!u)throw new Error(`document '${L.toString()}' NOT found`);return u.document}async tokenAtPosition(L,v){const u=L.version,m=k.Position.from(v),s=await this._proxy.$tokensAtPosition(L.uri,m),n={type:w.StandardTokenType.Other,range:L.getWordRangeAtPosition(v)??new w.Range(v.line,v.character,v.line,v.character)};if(!s)return n;const f={range:k.Range.to(s.range),type:k.TokenType.to(s.type)};return!f.range.contains(v)||u!==L.version?n:f}createLanguageStatusItem(L,v,u){const m=this._handlePool++,s=this._proxy,n=this._ids,f=`${L.identifier.value}/${v}`;if(n.has(f))throw new Error(`LanguageStatusItem with id '${v}' ALREADY exists`);n.add(f);const D={selector:u,id:v,name:L.displayName??L.name,severity:w.LanguageStatusSeverity.Information,command:void 0,text:"",detail:"",busy:!1};let T,d=new A.DisposableStore;const g=()=>{T?.dispose(),T=(0,S.disposableTimeout)(()=>{d.clear(),this._proxy.$setLanguageStatus(m,{id:f,name:D.name??L.displayName??L.name,source:L.displayName??L.name,selector:k.DocumentSelector.from(D.selector,this._uriTransformer),label:D.text,detail:D.detail??"",severity:D.severity===w.LanguageStatusSeverity.Error?B.default.Error:D.severity===w.LanguageStatusSeverity.Warning?B.default.Warning:B.default.Info,command:D.command&&this._commands.toInternal(D.command,d),accessibilityInfo:D.accessibilityInformation,busy:D.busy})},0)},b={dispose(){d.dispose(),T?.dispose(),s.$removeLanguageStatus(m),n.delete(f)},get id(){return D.id},get name(){return D.name},set name(l){D.name=l,g()},get selector(){return D.selector},set selector(l){D.selector=l,g()},get text(){return D.text},set text(l){D.text=l,g()},get detail(){return D.detail},set detail(l){D.detail=l,g()},get severity(){return D.severity},set severity(l){D.severity=l,g()},get accessibilityInformation(){return D.accessibilityInformation},set accessibilityInformation(l){D.accessibilityInformation=l,g()},get command(){return D.command},set command(l){D.command=l,g()},get busy(){return D.busy},set busy(l){D.busy=l,g()}};return g(),b}}e.ExtHostLanguages=y}),define(Ee[193],we([1,0,12,4,27,14,5]),function(J,e,o,k,w,B,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtHostLoggerService=void 0;let A=class extends o.AbstractLoggerService{constructor(L,v){const u=new S.Emitter;super(v.logLevel,u.event);this._proxy=L.getProxy(k.MainContext.MainThreadLogger),this._onDidChangeLogLevel=this._register(u)}$setLevel(L){this._onDidChangeLogLevel.fire(L)}doCreateLogger(L,v,u){return new y(this._proxy,L,v,u)}};A=Fe([Ne(0,B.IExtHostRpcService),Ne(1,w.IExtHostInitDataService)],A),e.ExtHostLoggerService=A;class y extends o.AbstractMessageLogger{constructor(L,v,u,m){super(m?.always);this.proxy=L,this.file=v,this.isLoggerCreated=!1,this.buffer=[],this.setLevel(u),this.proxy.$createLogger(v,m).then(()=>{this.doLog(this.buffer),this.isLoggerCreated=!0})}log(L,v){const u=[[L,v]];this.isLoggerCreated?this.doLog(u):this.buffer.push(...u)}doLog(L){this.proxy.$log(this.file,L)}}}),define(Ee[194],we([1,0,4,12,28]),function(J,e,o,k,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtHostMessageService=void 0;function B(A){return A&&A.title}let S=class{constructor(y,M){this._logService=M,this._proxy=y.getProxy(o.MainContext.MainThreadMessageService)}showMessage(y,M,L,v,u){const m={source:{identifier:y.identifier,label:y.displayName||y.name}};let s;typeof v=="string"||B(v)?s=[v,...u]:(m.modal=v?.modal,m.useCustom=v?.useCustom,m.detail=v?.detail,s=u),m.useCustom&&(0,w.checkProposedApiEnabled)(y,"resolvers");const n=[];for(let f=0;f<s.length;f++){const D=s[f];if(typeof D=="string")n.push({title:D,handle:f,isCloseAffordance:!1});else if(typeof D=="object"){let{title:T,isCloseAffordance:d}=D;n.push({title:T,isCloseAffordance:!!d,handle:f})}else this._logService.warn("Invalid message item:",D)}return this._proxy.$showMessage(M,L,m,n).then(f=>{if(typeof f=="number")return s[f]})}};S=Fe([Ne(1,k.ILogService)],S),e.ExtHostMessageService=S}),define(Ee[195],we([1,0,21,5,93,6,22,10,11,2,58,4,8,7,38,169,89]),function(J,e,o,k,w,B,S,A,y,M,L,v,u,m,s,n,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtHostNotebookController=void 0;class D{constructor(d,g,b,l,I){this._textDocumentsAndEditors=b,this._textDocuments=l,this._extensionStoragePaths=I,this._notebookContentProviders=new Map,this._notebookStatusBarItemProviders=new Map,this._documents=new S.ResourceMap,this._editors=new Map,this._onDidChangeNotebookCells=new k.Emitter,this.onDidChangeNotebookCells=this._onDidChangeNotebookCells.event,this._onDidChangeCellOutputs=new k.Emitter,this.onDidChangeCellOutputs=this._onDidChangeCellOutputs.event,this._onDidChangeCellMetadata=new k.Emitter,this.onDidChangeCellMetadata=this._onDidChangeCellMetadata.event,this._onDidChangeActiveNotebookEditor=new k.Emitter,this.onDidChangeActiveNotebookEditor=this._onDidChangeActiveNotebookEditor.event,this._visibleNotebookEditors=[],this._onDidOpenNotebookDocument=new k.Emitter,this.onDidOpenNotebookDocument=this._onDidOpenNotebookDocument.event,this._onDidCloseNotebookDocument=new k.Emitter,this.onDidCloseNotebookDocument=this._onDidCloseNotebookDocument.event,this._onDidChangeVisibleNotebookEditors=new k.Emitter,this.onDidChangeVisibleNotebookEditors=this._onDidChangeVisibleNotebookEditors.event,this._statusBarCache=new L.Cache("NotebookCellStatusBarCache"),this._handlePool=0,this._notebookSerializer=new Map,this._backupIdPool=0,this._notebookProxy=d.getProxy(v.MainContext.MainThreadNotebook),this._notebookDocumentsProxy=d.getProxy(v.MainContext.MainThreadNotebookDocuments),this._notebookEditorsProxy=d.getProxy(v.MainContext.MainThreadNotebookEditors),this._commandsConverter=g.converter,g.registerArgumentProcessor({processArgument:r=>{if(r&&r.$mid===12){const i=r.notebookEditor?.notebookUri,c=r.cell.handle,a=this._documents.get(i)?.getCell(c);if(a)return a.apiCell}return r}})}get activeNotebookEditor(){return this._activeNotebookEditor?.apiEditor}get visibleNotebookEditors(){return this._visibleNotebookEditors.map(d=>d.apiEditor)}getEditorById(d){const g=this._editors.get(d);if(!g)throw new Error(`unknown text editor: ${d}. known editors: ${[...this._editors.keys()]} `);return g}getIdByEditor(d){for(const[g,b]of this._editors)if(b.apiEditor===d)return g}get notebookDocuments(){return[...this._documents.values()]}getNotebookDocument(d,g){const b=this._documents.get(d);if(!b&&!g)throw new Error(`NO notebook document for '${d}'`);return b}_getProviderData(d){const g=this._notebookContentProviders.get(d);if(!g)throw new Error(`NO provider for '${d}'`);return g}registerNotebookContentProvider(d,g,b,l,I){if((0,A.isFalsyOrWhitespace)(g))throw new Error("viewType cannot be empty or just whitespace");if(this._notebookContentProviders.has(g))throw new Error(`Notebook provider for '${g}' already registered`);this._notebookContentProviders.set(g,{extension:d,provider:b});let r;return b.onDidChangeNotebookContentOptions&&(r=b.onDidChangeNotebookContentOptions(()=>{const i=u.NotebookDocumentContentOptions.from(b.options);this._notebookProxy.$updateNotebookProviderOptions(g,i)})),this._notebookProxy.$registerNotebookProvider({id:d.identifier,location:d.extensionLocation},g,u.NotebookDocumentContentOptions.from(l),D._convertNotebookRegistrationData(d,I)),new m.Disposable(()=>{r?.dispose(),this._notebookContentProviders.delete(g),this._notebookProxy.$unregisterNotebookProvider(g)})}static _convertNotebookRegistrationData(d,g){if(!g)return;const b=g.filenamePattern.map(l=>u.NotebookExclusiveDocumentPattern.from(l)).filter(l=>l!==void 0);if(g.filenamePattern&&!b){console.warn(`Notebook content provider view options file name pattern is invalid ${g.filenamePattern}`);return}return{extension:d.identifier,providerDisplayName:d.displayName||d.name,displayName:g.displayName,filenamePattern:b,exclusive:g.exclusive||!1}}registerNotebookCellStatusBarItemProvider(d,g,b){const l=D._notebookStatusBarItemProviderHandlePool++,I=typeof b.onDidChangeCellStatusBarItems=="function"?D._notebookStatusBarItemProviderHandlePool++:void 0;this._notebookStatusBarItemProviders.set(l,b),this._notebookProxy.$registerNotebookCellStatusBarItemProvider(l,I,g);let r;return I!==void 0&&(r=b.onDidChangeCellStatusBarItems(i=>this._notebookProxy.$emitCellStatusBarEvent(I))),new m.Disposable(()=>{this._notebookStatusBarItemProviders.delete(l),this._notebookProxy.$unregisterNotebookCellStatusBarItemProvider(l,I),r&&r.dispose()})}async createNotebookDocument(d){const g=await this._notebookDocumentsProxy.$tryCreateNotebook({viewType:d.viewType,content:d.content&&u.NotebookData.from(d.content)});return M.URI.revive(g)}async openNotebookDocument(d){const g=this._documents.get(d);if(g)return g.apiNotebook;const b=await this._notebookDocumentsProxy.$tryOpenNotebook(d),l=this._documents.get(M.URI.revive(b));return(0,y.assertIsDefined)(l?.apiNotebook)}async showNotebookDocument(d,g){M.URI.isUri(d)&&(d=await this.openNotebookDocument(d));let b;typeof g=="object"?b={position:u.ViewColumn.from(g.viewColumn),preserveFocus:g.preserveFocus,selections:g.selections&&g.selections.map(u.NotebookRange.from),pinned:typeof g.preview=="boolean"?!g.preview:void 0}:b={preserveFocus:!1};const l=await this._notebookEditorsProxy.$tryShowNotebookDocument(d.uri,d.notebookType,b),I=l&&this._editors.get(l)?.apiEditor;if(I)return I;throw l?new Error(`Could NOT open editor for "${d.uri.toString()}" because another editor opened in the meantime.`):new Error(`Could NOT open editor for "${d.uri.toString()}".`)}async $provideNotebookCellStatusBarItems(d,g,b,l){const I=this._notebookStatusBarItemProviders.get(d),r=M.URI.revive(g),i=this._documents.get(r);if(!i||!I)return;const c=i.getCellFromIndex(b);if(!c)return;const t=await I.provideCellStatusBarItems(c.apiCell,l);if(!t)return;const a=new B.DisposableStore,p=this._statusBarCache.add([a]),_=(Array.isArray(t)?t:[t]).map(P=>u.NotebookStatusBarItem.from(P,this._commandsConverter,a));return{cacheId:p,items:_}}$releaseNotebookCellStatusBarItems(d){this._statusBarCache.delete(d)}registerNotebookSerializer(d,g,b,l,I){if((0,A.isFalsyOrWhitespace)(g))throw new Error("viewType cannot be empty or just whitespace");const r=this._handlePool++;return this._notebookSerializer.set(r,b),this._notebookProxy.$registerNotebookSerializer(r,{id:d.identifier,location:d.extensionLocation},g,u.NotebookDocumentContentOptions.from(l),D._convertNotebookRegistrationData(d,I)),(0,B.toDisposable)(()=>{this._notebookProxy.$unregisterNotebookSerializer(r)})}async $dataToNotebook(d,g,b){const l=this._notebookSerializer.get(d);if(!l)throw new Error("NO serializer found");const I=await l.deserializeNotebook(g.buffer,b);return new s.SerializableObjectWithBuffers(u.NotebookData.from(I))}async $notebookToData(d,g,b){const l=this._notebookSerializer.get(d);if(!l)throw new Error("NO serializer found");const I=await l.serializeNotebook(u.NotebookData.to(g.value),b);return o.VSBuffer.wrap(I)}async $openNotebook(d,g,b,l,I){const{provider:r}=this._getProviderData(d),i=await r.openNotebook(M.URI.revive(g),{backupId:b,untitledDocumentData:l?.buffer},I);return new s.SerializableObjectWithBuffers({metadata:i.metadata??Object.create(null),cells:i.cells.map(u.NotebookCellData.from)})}async $saveNotebook(d,g,b){const l=this.getNotebookDocument(M.URI.revive(g)),{provider:I}=this._getProviderData(d);return await I.saveNotebook(l.apiNotebook,b),!0}async $saveNotebookAs(d,g,b,l){const I=this.getNotebookDocument(M.URI.revive(g)),{provider:r}=this._getProviderData(d);return await r.saveNotebookAs(M.URI.revive(b),I.apiNotebook,l),!0}async $backupNotebook(d,g,b){const l=this.getNotebookDocument(M.URI.revive(g)),I=this._getProviderData(d),r=this._extensionStoragePaths.workspaceValue(I.extension)??this._extensionStoragePaths.globalValue(I.extension),i=String((0,w.hash)([l.uri.toString(),this._backupIdPool++])),c=M.URI.joinPath(r,i),t=await I.provider.backupNotebook(l.apiNotebook,{destination:c},b);return l.updateBackup(t),t.id}_createExtHostEditor(d,g,b){if(this._editors.has(g))throw new Error(`editor with id ALREADY EXSIST: ${g}`);const l=new f.ExtHostNotebookEditor(g,this._notebookEditorsProxy,d,b.visibleRanges.map(u.NotebookRange.to),b.selections.map(u.NotebookRange.to),typeof b.viewColumn=="number"?u.ViewColumn.to(b.viewColumn):void 0);this._editors.set(g,l)}$acceptDocumentAndEditorsDelta(d){if(d.value.removedDocuments)for(const b of d.value.removedDocuments){const l=M.URI.revive(b),I=this._documents.get(l);I&&(I.dispose(),this._documents.delete(l),this._textDocumentsAndEditors.$acceptDocumentsAndEditorsDelta({removedDocuments:I.apiNotebook.getCells().map(r=>r.document.uri)}),this._onDidCloseNotebookDocument.fire(I.apiNotebook));for(const r of this._editors.values())r.notebookData.uri.toString()===l.toString()&&this._editors.delete(r.id)}if(d.value.addedDocuments){const b=[];for(const l of d.value.addedDocuments){const I=M.URI.revive(l.uri);if(this._documents.has(I))throw new Error(`adding EXISTING notebook ${I} `);const r=this,i=new n.ExtHostNotebookDocument(this._notebookDocumentsProxy,this._textDocumentsAndEditors,this._textDocuments,{emitModelChange(c){r._onDidChangeNotebookCells.fire(c)},emitCellOutputsChange(c){r._onDidChangeCellOutputs.fire(c)},emitCellMetadataChange(c){r._onDidChangeCellMetadata.fire(c)}},I,l);b.push(...l.cells.map(c=>n.ExtHostCell.asModelAddData(i.apiNotebook,c))),this._documents.get(I)?.dispose(),this._documents.set(I,i),this._textDocumentsAndEditors.$acceptDocumentsAndEditorsDelta({addedDocuments:b}),this._onDidOpenNotebookDocument.fire(i.apiNotebook)}}if(d.value.addedEditors)for(const b of d.value.addedEditors){if(this._editors.has(b.id))return;const l=M.URI.revive(b.documentUri),I=this._documents.get(l);I&&this._createExtHostEditor(I,b.id,b)}const g=[];if(d.value.removedEditors)for(const b of d.value.removedEditors){const l=this._editors.get(b);l&&(this._editors.delete(b),this._activeNotebookEditor?.id===l.id&&(this._activeNotebookEditor=void 0),g.push(l))}if(d.value.visibleEditors){this._visibleNotebookEditors=d.value.visibleEditors.map(l=>this._editors.get(l)).filter(l=>!!l);const b=new Set;this._visibleNotebookEditors.forEach(l=>b.add(l.id));for(const l of this._editors.values()){const I=b.has(l.id);l._acceptVisibility(I)}this._visibleNotebookEditors=[...this._editors.values()].map(l=>l).filter(l=>l.visible),this._onDidChangeVisibleNotebookEditors.fire(this.visibleNotebookEditors)}d.value.newActiveEditor===null?this._activeNotebookEditor=void 0:d.value.newActiveEditor&&(this._activeNotebookEditor=this._editors.get(d.value.newActiveEditor)),d.value.newActiveEditor!==void 0&&this._onDidChangeActiveNotebookEditor.fire(this._activeNotebookEditor?.apiEditor)}}e.ExtHostNotebookController=D,D._notebookStatusBarItemProviderHandlePool=0}),define(Ee[196],we([1,0,5,53,12,4,14,8]),function(J,e,o,k,w,B,S,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtHostNotebookEditors=void 0;class y{constructor(v,u){const m=y._Keys.nextId();v.$registerNotebookEditorDecorationType(m,A.NotebookDecorationRenderOptions.from(u)),this.value={key:m,dispose(){v.$removeNotebookEditorDecorationType(m)}}}}y._Keys=new k.IdGenerator("NotebookEditorDecorationType");let M=class{constructor(v,u,m){this._logService=v,this._extHostRpc=u,this._notebooksAndEditors=m,this._onDidChangeNotebookEditorSelection=new o.Emitter,this._onDidChangeNotebookEditorVisibleRanges=new o.Emitter,this.onDidChangeNotebookEditorSelection=this._onDidChangeNotebookEditorSelection.event,this.onDidChangeNotebookEditorVisibleRanges=this._onDidChangeNotebookEditorVisibleRanges.event}createNotebookEditorDecorationType(v){return new y(this._extHostRpc.getProxy(B.MainContext.MainThreadNotebookEditors),v).value}$acceptEditorPropertiesChanged(v,u){this._logService.debug("ExtHostNotebook#$acceptEditorPropertiesChanged",v,u);const m=this._notebooksAndEditors.getEditorById(v);u.visibleRanges&&m._acceptVisibleRanges(u.visibleRanges.ranges.map(A.NotebookRange.to)),u.selections&&m._acceptSelections(u.selections.selections.map(A.NotebookRange.to)),u.visibleRanges&&this._onDidChangeNotebookEditorVisibleRanges.fire({notebookEditor:m.apiEditor,visibleRanges:m.apiEditor.visibleRanges}),u.selections&&this._onDidChangeNotebookEditorSelection.fire(Object.freeze({notebookEditor:m.apiEditor,selections:m.apiEditor.selections}))}$acceptEditorViewColumns(v){for(const u in v)this._notebooksAndEditors.getEditorById(u)._acceptViewColumn(A.ViewColumn.to(v[u]))}};M=Fe([Ne(0,w.ILogService),Ne(1,S.IExtHostRpcService)],M),e.ExtHostNotebookEditors=M}),define(Ee[197],we([1,0,16,13,20,5,6,22,2,25,12,4,39,8,7,61,162,28,38]),function(J,e,o,k,w,B,S,A,y,M,L,v,u,m,s,n,f,D,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtHostNotebookKernels=void 0;let d=class{constructor(i,c,t,a,p){this._initData=c,this._extHostNotebook=t,this._commands=a,this._logService=p,this._activeExecutions=new A.ResourceMap,this._kernelData=new Map,this._handlePool=0,this._onDidChangeCellExecutionState=new B.Emitter,this.onDidChangeNotebookCellExecutionState=this._onDidChangeCellExecutionState.event,this._proxy=i.getProxy(v.MainContext.MainThreadNotebookKernels);const h=new u.ApiCommand("notebook.selectKernel","_notebook.selectKernel","Trigger kernel picker for specified notebook editor widget",[new u.ApiCommandArgument("options","Select kernel options",_=>!0,_=>{if(_&&"notebookEditor"in _&&"id"in _){const P=this._extHostNotebook.getIdByEditor(_.notebookEditor);return{id:_.id,extension:_.extension,notebookEditorId:P}}else if(_&&"notebookEditor"in _){const P=this._extHostNotebook.getIdByEditor(_.notebookEditor);if(P===void 0)throw new Error(`Cannot invoke 'notebook.selectKernel' for unrecognized notebook editor ${_.notebookEditor.document.uri.toString()}`);return{notebookEditorId:P}}return _})],u.ApiCommandResult.Void);this._commands.registerApiCommand(h)}createNotebookController(i,c,t,a,p,h){for(const ce of this._kernelData.values())if(ce.controller.id===c&&M.ExtensionIdentifier.equals(i.identifier,ce.extensionId))throw new Error(`notebook controller with id '${c}' ALREADY exist`);const _=this._handlePool++,P=this;this._logService.trace(`NotebookController[${_}], CREATED by ${i.identifier.value}, ${c}`);const R=()=>console.warn(`NO execute handler from notebook controller '${W.id}' of extension: '${i.identifier}'`);let $=!1;const E=new S.DisposableStore,z=new B.Emitter,V=new B.Emitter,W={id:I(i,c),notebookType:t,extensionId:i.identifier,extensionLocation:i.extensionLocation,label:a||i.identifier.value,preloads:h?h.map(m.NotebookRendererScript.from):[]};let Q=p??R,K;this._proxy.$addKernel(_,W).catch(ce=>{console.log(ce),$=!0});let H=0;const te=()=>{if($)return;const ce=++H;Promise.resolve().then(()=>{ce===H&&this._proxy.$updateKernel(_,W)})},ae=new A.ResourceMap,ee={get id(){return c},get notebookType(){return W.notebookType},onDidChangeSelectedNotebooks:z.event,get label(){return W.label},set label(ce){W.label=ce??i.displayName??i.name,te()},get detail(){return W.detail??""},set detail(ce){W.detail=ce,te()},get description(){return W.description??""},set description(ce){W.description=ce,te()},get kind(){return(0,D.checkProposedApiEnabled)(i,"notebookControllerKind"),W.kind??""},set kind(ce){(0,D.checkProposedApiEnabled)(i,"notebookControllerKind"),W.kind=ce,te()},get supportedLanguages(){return W.supportedLanguages},set supportedLanguages(ce){W.supportedLanguages=ce,te()},get supportsExecutionOrder(){return W.supportsExecutionOrder??!1},set supportsExecutionOrder(ce){W.supportsExecutionOrder=ce,te()},get rendererScripts(){return W.preloads?W.preloads.map(m.NotebookRendererScript.to):[]},get executeHandler(){return Q},set executeHandler(ce){Q=ce??R},get interruptHandler(){return K},set interruptHandler(ce){K=ce,W.supportsInterrupt=Boolean(ce),te()},createNotebookCellExecution(ce){if($)throw new Error("notebook controller is DISPOSED");if(!ae.has(ce.notebook.uri))throw P._logService.trace(`NotebookController[${_}] NOT associated to notebook, associated to THESE notebooks:`,Array.from(ae.keys()).map(de=>de.toString())),new Error(`notebook controller is NOT associated to notebook: ${ce.notebook.uri.toString()}`);return P._createNotebookCellExecution(ce,I(i,this.id))},dispose:()=>{$||(this._logService.trace(`NotebookController[${_}], DISPOSED`),$=!0,this._kernelData.delete(_),E.dispose(),z.dispose(),V.dispose(),this._proxy.$removeKernel(_))},updateNotebookAffinity(ce,de){P._proxy.$updateNotebookPriority(_,ce.uri,de)},onDidReceiveMessage:V.event,postMessage(ce,de){return(0,D.checkProposedApiEnabled)(i,"notebookMessaging"),P._proxy.$postMessage(_,de&&P._extHostNotebook.getIdByEditor(de),ce)},asWebviewUri(ce){return(0,D.checkProposedApiEnabled)(i,"notebookMessaging"),(0,n.asWebviewUri)(ce,P._initData.remote)}};return this._kernelData.set(_,{extensionId:i.identifier,controller:ee,onDidReceiveMessage:V,onDidChangeSelection:z,associatedNotebooks:ae}),ee}$acceptNotebookAssociation(i,c,t){const a=this._kernelData.get(i);if(a){const p=this._extHostNotebook.getNotebookDocument(y.URI.revive(c));t?a.associatedNotebooks.set(p.uri,!0):a.associatedNotebooks.delete(p.uri),this._logService.trace(`NotebookController[${i}] ASSOCIATE notebook`,p.uri.toString(),t),a.onDidChangeSelection.fire({selected:t,notebook:p.apiNotebook})}}async $executeCells(i,c,t){const a=this._kernelData.get(i);if(!a)return;const p=this._extHostNotebook.getNotebookDocument(y.URI.revive(c)),h=[];for(const _ of t){const P=p.getCell(_);P&&h.push(P.apiCell)}try{this._logService.trace(`NotebookController[${i}] EXECUTE cells`,p.uri.toString(),h.length),await a.controller.executeHandler.call(a.controller,h,p.apiNotebook,a.controller)}catch(_){this._logService.error(`NotebookController[${i}] execute cells FAILED`,_),console.error(_)}}async $cancelCells(i,c,t){const a=this._kernelData.get(i);if(!a)return;const p=this._extHostNotebook.getNotebookDocument(y.URI.revive(c));if(a.controller.interruptHandler)await a.controller.interruptHandler.call(a.controller,p.apiNotebook);else for(const h of t){const _=p.getCell(h);_&&this._activeExecutions.get(_.uri)?.cancel()}}$acceptKernelMessageFromRenderer(i,c,t){const a=this._kernelData.get(i);if(!a)return;const p=this._extHostNotebook.getEditorById(c);a.onDidReceiveMessage.fire(Object.freeze({editor:p.apiEditor,message:t}))}$cellExecutionChanged(i,c,t){const p=this._extHostNotebook.getNotebookDocument(y.URI.revive(i)).getCell(c);p&&this._onDidChangeCellExecutionState.fire({cell:p.apiCell,state:t?m.NotebookCellExecutionState.to(t):s.NotebookCellExecutionState.Idle})}_createNotebookCellExecution(i,c){if(i.index<0)throw new Error("CANNOT execute cell that has been REMOVED from notebook");const a=this._extHostNotebook.getNotebookDocument(i.notebook.uri).getCellFromApiCell(i);if(!a)throw new Error("invalid cell");if(this._activeExecutions.has(a.uri))throw new Error(`duplicate execution for ${a.uri}`);const p=new b(c,a,this._proxy);this._activeExecutions.set(a.uri,p);const h=p.onDidChangeState(()=>{p.state===g.Resolved&&(p.dispose(),h.dispose(),this._activeExecutions.delete(a.uri))});return p.asApiObject()}};d=Fe([Ne(4,L.ILogService)],d),e.ExtHostNotebookKernels=d;var g;(function(r){r[r.Init=0]="Init",r[r.Started=1]="Started",r[r.Resolved=2]="Resolved"})(g||(g={}));class b extends S.Disposable{constructor(i,c,t){super();this._cell=c,this._proxy=t,this._handle=b.HANDLE++,this._onDidChangeState=new B.Emitter,this.onDidChangeState=this._onDidChangeState.event,this._state=g.Init,this._tokenSource=this._register(new w.CancellationTokenSource),this._collector=new l(10,a=>this.update(a)),this._executionOrder=c.internalMetadata.executionOrder,this._proxy.$createExecution(this._handle,i,this._cell.notebook.uri,this._cell.handle)}get state(){return this._state}cancel(){this._tokenSource.cancel()}async updateSoon(i){await this._collector.addItem(i)}async update(i){const c=Array.isArray(i)?i:[i];return this._proxy.$updateExecution(this._handle,new T.SerializableObjectWithBuffers(c))}verifyStateForOutput(){if(this._state===g.Init)throw new Error("Must call start before modifying cell output");if(this._state===g.Resolved)throw new Error("Cannot modify cell output after calling resolve")}validateAndConvertOutputs(i){return i.map(c=>{const t=s.NotebookCellOutput.ensureUniqueMimeTypes(c.items,!0);return t===c.items?m.NotebookCellOutput.from(c):m.NotebookCellOutput.from({items:t,id:c.id,metadata:c.metadata})})}async updateOutputs(i,c,t){const a=this.validateAndConvertOutputs((0,o.asArray)(i));return this.updateSoon({editType:f.CellExecutionUpdateType.Output,append:t,outputs:a})}async updateOutputItems(i,c,t){return i=s.NotebookCellOutput.ensureUniqueMimeTypes((0,o.asArray)(i),!0),this.updateSoon({editType:f.CellExecutionUpdateType.OutputItems,items:i.map(m.NotebookCellOutputItem.from),outputId:c.id,append:t})}asApiObject(){const i=this;return Object.freeze({get token(){return i._tokenSource.token},get cell(){return i._cell.apiCell},get executionOrder(){return i._executionOrder},set executionOrder(t){i._executionOrder=t,i.update([{editType:f.CellExecutionUpdateType.ExecutionState,executionOrder:i._executionOrder}])},start(t){if(i._state===g.Resolved||i._state===g.Started)throw new Error("Cannot call start again");i._state=g.Started,i._onDidChangeState.fire(),i.update({editType:f.CellExecutionUpdateType.ExecutionState,runStartTime:t})},end(t,a){if(i._state===g.Resolved)throw new Error("Cannot call resolve twice");i._state=g.Resolved,i._onDidChangeState.fire(),i._collector.flush(),i._proxy.$completeExecution(i._handle,new T.SerializableObjectWithBuffers({runEndTime:a,lastRunSuccess:t}))},clearOutput(t){return i.verifyStateForOutput(),i.updateOutputs([],t,!1)},appendOutput(t,a){return i.verifyStateForOutput(),i.updateOutputs(t,a,!0)},replaceOutput(t,a){return i.verifyStateForOutput(),i.updateOutputs(t,a,!1)},appendOutputItems(t,a){return i.verifyStateForOutput(),i.updateOutputItems(t,a,!0)},replaceOutputItems(t,a){return i.verifyStateForOutput(),i.updateOutputItems(t,a,!1)}})}}b.HANDLE=0;class l{constructor(i,c){this.delay=i,this.callback=c,this.batch=[],this.startedTimer=Date.now()}addItem(i){return this.batch.push(i),this.currentDeferred||(this.currentDeferred=new k.DeferredPromise,this.startedTimer=Date.now(),(0,k.timeout)(this.delay).then(()=>this.flush())),Date.now()-this.startedTimer>this.delay?this.flush():this.currentDeferred.p}flush(){if(this.batch.length===0||!this.currentDeferred)return Promise.resolve();const i=this.currentDeferred;this.currentDeferred=void 0;const c=this.batch;return this.batch=[],this.callback(c).finally(()=>i.complete())}}function I(r,i){return`${r.identifier.value}/${i}`}}),define(Ee[198],we([1,0,5,4,89,28]),function(J,e,o,k,w,B){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtHostNotebookRenderers=void 0;class S{constructor(y,M){this._extHostNotebook=M,this._rendererMessageEmitters=new Map,this.proxy=y.getProxy(k.MainContext.MainThreadNotebookRenderers)}$postRendererMessage(y,M,L){const v=this._extHostNotebook.getEditorById(y);this._rendererMessageEmitters.get(M)?.fire({editor:v.apiEditor,message:L})}createRendererMessaging(y,M){if(!y.contributes?.notebookRenderer?.some(m=>m.id===M))throw new Error(`Extensions may only call createRendererMessaging() for renderers they contribute (got ${M})`);const L=(0,B.isProposedApiEnabled)(y,"notebookEditor"),v=new WeakMap;return{onDidReceiveMessage:(m,s,n)=>{const f=L?m:D=>{const T={};v.set(T,D.editor),m({editor:T,message:D.message})};return this.getOrCreateEmitterFor(M).event(f,s,n)},postMessage:(m,s)=>{w.ExtHostNotebookEditor.apiEditorsToExtHost.has(m)&&([m,s]=[s,m]);const n=L?s:v.get(s),f=n&&w.ExtHostNotebookEditor.apiEditorsToExtHost.get(n);return this.proxy.$postMessage(f?.id,M,m)}}}getOrCreateEmitterFor(y){let M=this._rendererMessageEmitters.get(y);return M||(M=new o.Emitter({onLastListenerRemove:()=>{M?.dispose(),this._rendererMessageEmitters.delete(y)}}),this._rendererMessageEmitters.set(y,M),M)}}e.ExtHostNotebookRenderers=S}),define(Ee[94],we([1,0,4,6,3,14,12,163,50,27,30,112,21,11]),function(J,e,o,k,w,B,S,A,y,M,L,v,u,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IExtHostOutputService=e.ExtHostOutputService=e.ExtHostOutputChannel=void 0;class s extends k.Disposable{constructor(D,T,d,g){super();this.id=D,this.name=T,this.logger=d,this.proxy=g,this.offset=0,this.visible=!1,this._disposed=!1}get disposed(){return this._disposed}appendLine(D){this.append(D+`
`)}append(D){this.write(D),this.visible&&(this.logger.flush(),this.proxy.$update(this.id,A.OutputChannelUpdateMode.Append))}clear(){const D=this.offset;this.logger.flush(),this.proxy.$update(this.id,A.OutputChannelUpdateMode.Clear,D)}replace(D){const T=this.offset;this.write(D),this.proxy.$update(this.id,A.OutputChannelUpdateMode.Replace,T),this.visible&&this.logger.flush()}show(D,T){this.logger.flush(),this.proxy.$reveal(this.id,!!(typeof D=="boolean"?D:T))}hide(){this.proxy.$close(this.id)}write(D){this.offset+=u.VSBuffer.fromString(D).byteLength,this.logger.info(D)}dispose(){super.dispose(),this._disposed||(this.proxy.$dispose(this.id),this._disposed=!0)}}e.ExtHostOutputChannel=s;let n=class{constructor(D,T,d,g,b){this.extHostFileSystem=d,this.extHostFileSystemInfo=g,this.loggerService=b,this.namePool=1,this.channels=new Map,this.visibleChannelId=null,this.proxy=D.getProxy(o.MainContext.MainThreadOutputService),this.outputsLocation=this.extHostFileSystemInfo.extUri.joinPath(T.logsLocation,`output_logging_${(0,v.toLocalISOString)(new Date).replace(/-|:|\.\d+Z$/g,"")}`)}$setVisibleChannel(D){this.visibleChannelId=D;for(const[T,d]of this.channels)d.visible=T===this.visibleChannelId}createOutputChannel(D,T,d){if(D=D.trim(),!D)throw new Error("illegal argument `name`. must not be falsy");if((0,m.isString)(T)&&!T.trim())throw new Error("illegal argument `languageId`. must not be empty");const g=this.doCreateOutputChannel(D,T,d);return g.then(b=>{this.channels.set(b.id,b),b.visible=b.id===this.visibleChannelId}),this.createExtHostOutputChannel(D,g)}async doCreateOutputChannel(D,T,d){const g=await this.createOutputDirectory(),b=this.extHostFileSystemInfo.extUri.joinPath(g,`${this.namePool++}-${D.replace(/[\\/:\*\?"<>\|]/g,"")}.log`),l=this.loggerService.createLogger(b,{always:!0,donotRotate:!0,donotUseFormatters:!0}),I=await this.proxy.$register(D,!1,b,T,d.identifier.value);return new s(I,D,l,this.proxy)}createOutputDirectory(){return this.outputDirectoryPromise||(this.outputDirectoryPromise=this.extHostFileSystem.value.createDirectory(this.outputsLocation).then(()=>this.outputsLocation)),this.outputDirectoryPromise}createExtHostOutputChannel(D,T){let d=!1;const g=()=>{if(d)throw new Error("Channel has been closed")};return{get name(){return D},append(b){g(),T.then(l=>l.append(b))},appendLine(b){g(),T.then(l=>l.appendLine(b))},clear(){g(),T.then(b=>b.clear())},replace(b){g(),T.then(l=>l.replace(b))},show(b,l){g(),T.then(I=>I.show(b,l))},hide(){g(),T.then(b=>b.hide())},dispose(){d=!0,T.then(b=>b.dispose())}}}};n=Fe([Ne(0,B.IExtHostRpcService),Ne(1,M.IExtHostInitDataService),Ne(2,y.IExtHostConsumerFileSystem),Ne(3,L.IExtHostFileSystemInfo),Ne(4,S.ILoggerService)],n),e.ExtHostOutputService=n,e.IExtHostOutputService=(0,w.createDecorator)("IExtHostOutputService")}),define(Ee[199],we([1,0,13,20,5,6,4,2,7,15,16,34,57]),function(J,e,o,k,w,B,S,A,y,M,L,v,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createExtHostQuickOpen=void 0;function m(s,n,f){const D=s.getProxy(S.MainContext.MainThreadQuickOpen);class T{constructor(t,a){this._sessions=new Map,this._instances=0,this._workspace=t,this._commands=a}showQuickPick(t,a,p=k.CancellationToken.None){this._onDidSelectItem=void 0;const h=Promise.resolve(t),_=++this._instances,P=D.$show(_,{title:a?.title,placeHolder:a?.placeHolder,matchOnDescription:a?.matchOnDescription,matchOnDetail:a?.matchOnDetail,ignoreFocusLost:a?.ignoreFocusOut,canPickMany:a?.canPickMany},p),R={},$=P.then(()=>R);return Promise.race([$,h]).then(E=>{if(E!==R)return h.then(z=>{const V=[];for(let W=0;W<z.length;W++){const Q=z[W];typeof Q=="string"?V.push({label:Q,handle:W}):Q.kind===y.QuickPickItemKind.Separator?V.push({type:"separator",label:Q.label}):V.push({label:Q.label,description:Q.description,detail:Q.detail,picked:Q.picked,alwaysShow:Q.alwaysShow,handle:W})}return a&&typeof a.onDidSelectItem=="function"&&(this._onDidSelectItem=W=>{a.onDidSelectItem(z[W])}),D.$setItems(_,V),P.then(W=>{if(typeof W=="number")return z[W];if(Array.isArray(W))return W.map(Q=>z[Q])})})}).then(void 0,E=>{if(!(0,M.isCancellationError)(E))return D.$setError(_,E),Promise.reject(E)})}$onItemSelected(t){this._onDidSelectItem&&this._onDidSelectItem(t)}showInput(t,a=k.CancellationToken.None){return this._validateInput=t?t.validateInput:void 0,D.$input(t,typeof this._validateInput=="function",a).then(void 0,p=>{if(!(0,M.isCancellationError)(p))return Promise.reject(p)})}$validateInput(t){return this._validateInput?(0,o.asPromise)(()=>this._validateInput(t)):Promise.resolve(void 0)}async showWorkspaceFolderPick(t,a=k.CancellationToken.None){const p=await this._commands.executeCommand("_workbench.pickWorkspaceFolder",[t]);if(!p)return;const h=await this._workspace.getWorkspaceFolders2();if(!!h)return h.find(_=>_.uri.toString()===p.uri.toString())}createQuickPick(t){const a=new r(t,()=>this._sessions.delete(a._id));return this._sessions.set(a._id,a),a}createInputBox(t){const a=new i(t,()=>this._sessions.delete(a._id));return this._sessions.set(a._id,a),a}$onDidChangeValue(t,a){const p=this._sessions.get(t);p&&p._fireDidChangeValue(a)}$onDidAccept(t){const a=this._sessions.get(t);a&&a._fireDidAccept()}$onDidChangeActive(t,a){const p=this._sessions.get(t);p instanceof r&&p._fireDidChangeActive(a)}$onDidChangeSelection(t,a){const p=this._sessions.get(t);p instanceof r&&p._fireDidChangeSelection(a)}$onDidTriggerButton(t,a){const p=this._sessions.get(t);p&&p._fireDidTriggerButton(a)}$onDidTriggerItemButton(t,a,p){const h=this._sessions.get(t);h instanceof r&&h._fireDidTriggerItemButton(a,p)}$onDidHide(t){const a=this._sessions.get(t);a&&a._fireDidHide()}}class d{constructor(t,a){this._extensionId=t,this._onDidDispose=a,this._id=r._nextId++,this._visible=!1,this._expectingHide=!1,this._enabled=!0,this._busy=!1,this._ignoreFocusOut=!0,this._value="",this._buttons=[],this._handlesToButtons=new Map,this._onDidAcceptEmitter=new w.Emitter,this._onDidChangeValueEmitter=new w.Emitter,this._onDidTriggerButtonEmitter=new w.Emitter,this._onDidHideEmitter=new w.Emitter,this._pendingUpdate={id:this._id},this._disposed=!1,this._disposables=[this._onDidTriggerButtonEmitter,this._onDidHideEmitter,this._onDidAcceptEmitter,this._onDidChangeValueEmitter],this.onDidChangeValue=this._onDidChangeValueEmitter.event,this.onDidAccept=this._onDidAcceptEmitter.event,this.onDidTriggerButton=this._onDidTriggerButtonEmitter.event,this.onDidHide=this._onDidHideEmitter.event}get title(){return this._title}set title(t){this._title=t,this.update({title:t})}get step(){return this._steps}set step(t){this._steps=t,this.update({step:t})}get totalSteps(){return this._totalSteps}set totalSteps(t){this._totalSteps=t,this.update({totalSteps:t})}get enabled(){return this._enabled}set enabled(t){this._enabled=t,this.update({enabled:t})}get busy(){return this._busy}set busy(t){this._busy=t,this.update({busy:t})}get ignoreFocusOut(){return this._ignoreFocusOut}set ignoreFocusOut(t){this._ignoreFocusOut=t,this.update({ignoreFocusOut:t})}get value(){return this._value}set value(t){this._value=t,this.update({value:t})}get placeholder(){return this._placeholder}set placeholder(t){this._placeholder=t,this.update({placeholder:t})}get buttons(){return this._buttons}set buttons(t){this._buttons=t.slice(),this._handlesToButtons.clear(),t.forEach((a,p)=>{const h=a===y.QuickInputButtons.Back?-1:p;this._handlesToButtons.set(h,a)}),this.update({buttons:t.map((a,p)=>({...I(a),tooltip:a.tooltip,handle:a===y.QuickInputButtons.Back?-1:p}))})}show(){this._visible=!0,this._expectingHide=!0,this.update({visible:!0})}hide(){this._visible=!1,this.update({visible:!1})}_fireDidAccept(){this._onDidAcceptEmitter.fire()}_fireDidChangeValue(t){this._value=t,this._onDidChangeValueEmitter.fire(t)}_fireDidTriggerButton(t){const a=this._handlesToButtons.get(t);a&&this._onDidTriggerButtonEmitter.fire(a)}_fireDidHide(){this._expectingHide&&(this._expectingHide=this._visible,this._onDidHideEmitter.fire())}dispose(){this._disposed||(this._disposed=!0,this._fireDidHide(),this._disposables=(0,B.dispose)(this._disposables),this._updateTimeout&&(clearTimeout(this._updateTimeout),this._updateTimeout=void 0),this._onDidDispose(),D.$dispose(this._id))}update(t){if(!this._disposed){for(const a of Object.keys(t)){const p=t[a];this._pendingUpdate[a]=p===void 0?null:p}"visible"in this._pendingUpdate?(this._updateTimeout&&(clearTimeout(this._updateTimeout),this._updateTimeout=void 0),this.dispatchUpdate()):this._visible&&!this._updateTimeout&&(this._updateTimeout=setTimeout(()=>{this._updateTimeout=void 0,this.dispatchUpdate()},0))}}dispatchUpdate(){D.$createOrUpdate(this._pendingUpdate),this._pendingUpdate={id:this._id}}}d._nextId=1;function g(c){if(c instanceof y.ThemeIcon)return{id:c.id};const t=l(c),a=b(c);return{dark:typeof t=="string"?A.URI.file(t):t,light:typeof a=="string"?A.URI.file(a):a}}function b(c){return typeof c=="object"&&"light"in c?c.light:c}function l(c){return typeof c=="object"&&"dark"in c?c.dark:c}function I(c){const t=g(c.iconPath);let a,p;return"id"in t?p=u.ThemeIcon.asClassName(t):a=t,{iconPath:a,iconClass:p}}class r extends d{constructor(t,a){super(t.identifier,a);this._items=[],this._handlesToItems=new Map,this._itemsToHandles=new Map,this._canSelectMany=!1,this._matchOnDescription=!0,this._matchOnDetail=!0,this._sortByLabel=!0,this._keepScrollPosition=!1,this._activeItems=[],this._onDidChangeActiveEmitter=new w.Emitter,this._selectedItems=[],this._onDidChangeSelectionEmitter=new w.Emitter,this._onDidTriggerItemButtonEmitter=new w.Emitter,this.onDidChangeActive=this._onDidChangeActiveEmitter.event,this.onDidChangeSelection=this._onDidChangeSelectionEmitter.event,this.onDidTriggerItemButton=this._onDidTriggerItemButtonEmitter.event,this._disposables.push(this._onDidChangeActiveEmitter,this._onDidChangeSelectionEmitter,this._onDidTriggerItemButtonEmitter),this.update({type:"quickPick"})}get items(){return this._items}set items(t){this._items=t.slice(),this._handlesToItems.clear(),this._itemsToHandles.clear(),t.forEach((p,h)=>{this._handlesToItems.set(h,p),this._itemsToHandles.set(p,h)});const a=[];for(let p=0;p<t.length;p++){const h=t[p];h.kind===y.QuickPickItemKind.Separator?a.push({type:"separator",label:h.label}):a.push({handle:p,label:h.label,description:h.description,detail:h.detail,picked:h.picked,alwaysShow:h.alwaysShow,buttons:h.buttons?.map((_,P)=>({...I(_),tooltip:_.tooltip,handle:P}))})}this.update({items:a})}get canSelectMany(){return this._canSelectMany}set canSelectMany(t){this._canSelectMany=t,this.update({canSelectMany:t})}get matchOnDescription(){return this._matchOnDescription}set matchOnDescription(t){this._matchOnDescription=t,this.update({matchOnDescription:t})}get matchOnDetail(){return this._matchOnDetail}set matchOnDetail(t){this._matchOnDetail=t,this.update({matchOnDetail:t})}get sortByLabel(){return this._sortByLabel}set sortByLabel(t){this._sortByLabel=t,this.update({sortByLabel:t})}get keepScrollPosition(){return this._keepScrollPosition}set keepScrollPosition(t){this._keepScrollPosition=t,this.update({keepScrollPosition:t})}get activeItems(){return this._activeItems}set activeItems(t){this._activeItems=t.filter(a=>this._itemsToHandles.has(a)),this.update({activeItems:this._activeItems.map(a=>this._itemsToHandles.get(a))})}get selectedItems(){return this._selectedItems}set selectedItems(t){this._selectedItems=t.filter(a=>this._itemsToHandles.has(a)),this.update({selectedItems:this._selectedItems.map(a=>this._itemsToHandles.get(a))})}_fireDidChangeActive(t){const a=(0,L.coalesce)(t.map(p=>this._handlesToItems.get(p)));this._activeItems=a,this._onDidChangeActiveEmitter.fire(a)}_fireDidChangeSelection(t){const a=(0,L.coalesce)(t.map(p=>this._handlesToItems.get(p)));this._selectedItems=a,this._onDidChangeSelectionEmitter.fire(a)}_fireDidTriggerItemButton(t,a){const p=this._handlesToItems.get(t);if(!p||!p.buttons||!p.buttons.length)return;const h=p.buttons[a];h&&this._onDidTriggerItemButtonEmitter.fire({button:h,item:p})}}class i extends d{constructor(t,a){super(t,a);this._password=!1,this.update({type:"inputBox"})}get password(){return this._password}set password(t){this._password=t,this.update({password:t})}get prompt(){return this._prompt}set prompt(t){this._prompt=t,this.update({prompt:t})}get validationMessage(){return this._validationMessage}set validationMessage(t){this._validationMessage=t,this.update({validationMessage:t,severity:t?v.default.Error:v.default.Ignore})}}return new T(n,f)}e.createExtHostQuickOpen=m});var je=this&&this.__classPrivateFieldSet||function(J,e,o,k,w){if(k==="m")throw new TypeError("Private method is not writable");if(k==="a"&&!w)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?J!==e||!w:!e.has(J))throw new TypeError("Cannot write private member to an object whose class did not declare it");return k==="a"?w.call(J,o):w?w.value=o:e.set(J,o),o},De=this&&this.__classPrivateFieldGet||function(J,e,o,k){if(o==="a"&&!k)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?J!==e||!k:!e.has(J))throw new TypeError("Cannot read private member from an object whose class did not declare it");return o==="m"?k:o==="a"?k.call(J):k?k.value:e.get(J)};define(Ee[200],we([1,0,2,5,52,6,13,4,16,107,12,25,57,8,28]),function(J,e,o,k,w,B,S,A,y,M,L,v,u,m,s){"use strict";var n,f;Object.defineProperty(e,"__esModule",{value:!0}),e.ExtHostSCM=e.ExtHostSCMInputBox=void 0;function D(p){if(p)return typeof p.iconPath=="string"?o.URI.file(p.iconPath):o.URI.isUri(p.iconPath)||u.ThemeIcon.isThemeIcon(p.iconPath)?p.iconPath:void 0}function T(p,h){if(!p.iconPath&&!h.iconPath)return 0;if(p.iconPath){if(!h.iconPath)return 1}else return-1;const _=typeof p.iconPath=="string"?p.iconPath:o.URI.isUri(p.iconPath)?p.iconPath.fsPath:p.iconPath.id,P=typeof h.iconPath=="string"?h.iconPath:o.URI.isUri(h.iconPath)?h.iconPath.fsPath:h.iconPath.id;return(0,M.comparePaths)(_,P)}function d(p,h){let _=0;if(p.strikeThrough!==h.strikeThrough)return p.strikeThrough?1:-1;if(p.faded!==h.faded)return p.faded?1:-1;if(p.tooltip!==h.tooltip)return(p.tooltip||"").localeCompare(h.tooltip||"");if(_=T(p,h),_!==0)return _;if(p.light&&h.light)_=T(p.light,h.light);else{if(p.light)return 1;if(h.light)return-1}if(_!==0)return _;if(p.dark&&h.dark)_=T(p.dark,h.dark);else{if(p.dark)return 1;if(h.dark)return-1}return _}function g(p,h){if(p.command!==h.command)return p.command<h.command?-1:1;if(p.title!==h.title)return p.title<h.title?-1:1;if(p.tooltip!==h.tooltip){if(p.tooltip!==void 0&&h.tooltip!==void 0)return p.tooltip<h.tooltip?-1:1;if(p.tooltip!==void 0)return 1;if(h.tooltip!==void 0)return-1}if(p.arguments===h.arguments)return 0;if(p.arguments)if(h.arguments){if(p.arguments.length!==h.arguments.length)return p.arguments.length-h.arguments.length}else return 1;else return-1;for(let _=0;_<p.arguments.length;_++){const P=p.arguments[_],R=h.arguments[_];if(P!==R)return P<R?-1:1}return 0}function b(p,h){let _=(0,M.comparePaths)(p.resourceUri.fsPath,h.resourceUri.fsPath,!0);if(_!==0)return _;if(p.command&&h.command)_=g(p.command,h.command);else{if(p.command)return 1;if(h.command)return-1}if(_!==0)return _;if(p.decorations&&h.decorations)_=d(p.decorations,h.decorations);else{if(p.decorations)return 1;if(h.decorations)return-1}return _}function l(p,h){for(let _=0;_<p.length;_++)if(p[_]!==h[_])return!1;return!0}function I(p,h){return p.command===h.command&&p.title===h.title&&p.tooltip===h.tooltip&&(p.arguments&&h.arguments?l(p.arguments,h.arguments):p.arguments===h.arguments)}function r(p,h){return(0,y.equals)(p,h,I)}class i{constructor(h,_,P){this._extension=h,this._sourceControlHandle=P,n.set(this,void 0),this._value="",this._onDidChange=new k.Emitter,this._placeholder="",this._visible=!0,je(this,n,_,"f")}get value(){return this._value}set value(h){h=h??"",De(this,n,"f").$setInputBoxValue(this._sourceControlHandle,h),this.updateValue(h)}get onDidChange(){return this._onDidChange.event}get placeholder(){return this._placeholder}set placeholder(h){De(this,n,"f").$setInputBoxPlaceholder(this._sourceControlHandle,h),this._placeholder=h}get validateInput(){return(0,s.checkProposedApiEnabled)(this._extension,"scmValidation"),this._validateInput}set validateInput(h){if((0,s.checkProposedApiEnabled)(this._extension,"scmValidation"),h&&typeof h!="function")throw new Error(`[${this._extension.identifier.value}]: Invalid SCM input box validation function`);this._validateInput=h,De(this,n,"f").$setValidationProviderIsEnabled(this._sourceControlHandle,!!h)}get visible(){return this._visible}set visible(h){h=!!h,this._visible!==h&&(this._visible=h,De(this,n,"f").$setInputBoxVisibility(this._sourceControlHandle,h))}showValidationMessage(h,_){(0,s.checkProposedApiEnabled)(this._extension,"scmValidation"),De(this,n,"f").$showValidationMessage(this._sourceControlHandle,h,_)}$onInputBoxValueChange(h){this.updateValue(h)}updateValue(h){this._value=h,this._onDidChange.fire(h)}}e.ExtHostSCMInputBox=i,n=new WeakMap;class c{constructor(h,_,P,R,$){this._proxy=h,this._commands=_,this._sourceControlHandle=P,this._id=R,this._label=$,this._resourceHandlePool=0,this._resourceStates=[],this._resourceStatesMap=new Map,this._resourceStatesCommandsMap=new Map,this._resourceStatesDisposablesMap=new Map,this._onDidUpdateResourceStates=new k.Emitter,this.onDidUpdateResourceStates=this._onDidUpdateResourceStates.event,this._disposed=!1,this._onDidDispose=new k.Emitter,this.onDidDispose=this._onDidDispose.event,this._handlesSnapshot=[],this._resourceSnapshot=[],this._hideWhenEmpty=void 0,this.handle=c._handlePool++}get disposed(){return this._disposed}get id(){return this._id}get label(){return this._label}set label(h){this._label=h,this._proxy.$updateGroupLabel(this._sourceControlHandle,this.handle,h)}get hideWhenEmpty(){return this._hideWhenEmpty}set hideWhenEmpty(h){this._hideWhenEmpty=h,this._proxy.$updateGroup(this._sourceControlHandle,this.handle,this.features)}get features(){return{hideWhenEmpty:this.hideWhenEmpty}}get resourceStates(){return[...this._resourceStates]}set resourceStates(h){this._resourceStates=[...h],this._onDidUpdateResourceStates.fire()}getResourceState(h){return this._resourceStatesMap.get(h)}$executeResourceCommand(h,_){const P=this._resourceStatesCommandsMap.get(h);return P?(0,S.asPromise)(()=>this._commands.executeCommand(P.command,...P.arguments||[],_)):Promise.resolve(void 0)}_takeResourceStateSnapshot(){const h=[...this._resourceStates].sort(b),P=(0,y.sortedDiff)(this._resourceSnapshot,h,b).map(E=>{const z=E.toInsert.map(V=>{const W=this._resourceHandlePool++;this._resourceStatesMap.set(W,V);const Q=V.resourceUri;let K;if(V.command)if(V.command.command==="vscode.open"||V.command.command==="vscode.diff"){const me=new B.DisposableStore;K=this._commands.converter.toInternal(V.command,me),this._resourceStatesDisposablesMap.set(W,me)}else this._resourceStatesCommandsMap.set(W,V.command);const H=D(V.decorations),te=V.decorations&&D(V.decorations.light)||H,ae=V.decorations&&D(V.decorations.dark)||H,ee=[te,ae],ce=V.decorations&&V.decorations.tooltip||"",de=V.decorations&&!!V.decorations.strikeThrough,Se=V.decorations&&!!V.decorations.faded,fe=V.contextValue||"";return{rawResource:[W,Q,ee,ce,de,Se,fe,K],handle:W}});return{start:E.start,deleteCount:E.deleteCount,toInsert:z}}),R=P.map(({start:E,deleteCount:z,toInsert:V})=>[E,z,V.map(W=>W.rawResource)]),$=P.reverse();for(const{start:E,deleteCount:z,toInsert:V}of $){const W=V.map(K=>K.handle),Q=this._handlesSnapshot.splice(E,z,...W);for(const K of Q)this._resourceStatesMap.delete(K),this._resourceStatesCommandsMap.delete(K),this._resourceStatesDisposablesMap.get(K)?.dispose(),this._resourceStatesDisposablesMap.delete(K)}return this._resourceSnapshot=h,R}dispose(){this._disposed=!0,this._onDidDispose.fire()}}c._handlePool=0;class t{constructor(h,_,P,R,$,E){this._extension=h,this._commands=P,this._id=R,this._label=$,this._rootUri=E,f.set(this,void 0),this._groups=new Map,this._count=void 0,this._quickDiffProvider=void 0,this._commitTemplate=void 0,this._acceptInputDisposables=new B.MutableDisposable,this._acceptInputCommand=void 0,this._actionButtonDisposables=new B.MutableDisposable,this._statusBarDisposables=new B.MutableDisposable,this._statusBarCommands=void 0,this._selected=!1,this._onDidChangeSelection=new k.Emitter,this.onDidChangeSelection=this._onDidChangeSelection.event,this.handle=t._handlePool++,this.createdResourceGroups=new Map,this.updatedResourceGroups=new Set,je(this,f,_,"f"),this._inputBox=new i(h,De(this,f,"f"),this.handle),De(this,f,"f").$registerSourceControl(this.handle,R,$,E)}get id(){return this._id}get label(){return this._label}get rootUri(){return this._rootUri}get inputBox(){return this._inputBox}get count(){return this._count}set count(h){this._count!==h&&(this._count=h,De(this,f,"f").$updateSourceControl(this.handle,{count:h}))}get quickDiffProvider(){return this._quickDiffProvider}set quickDiffProvider(h){this._quickDiffProvider=h,De(this,f,"f").$updateSourceControl(this.handle,{hasQuickDiffProvider:!!h})}get commitTemplate(){return this._commitTemplate}set commitTemplate(h){h!==this._commitTemplate&&(this._commitTemplate=h,De(this,f,"f").$updateSourceControl(this.handle,{commitTemplate:h}))}get acceptInputCommand(){return this._acceptInputCommand}set acceptInputCommand(h){this._acceptInputDisposables.value=new B.DisposableStore,this._acceptInputCommand=h;const _=this._commands.converter.toInternal(h,this._acceptInputDisposables.value);De(this,f,"f").$updateSourceControl(this.handle,{acceptInputCommand:_})}get actionButton(){return(0,s.checkProposedApiEnabled)(this._extension,"scmActionButton"),this._actionButton}set actionButton(h){(0,s.checkProposedApiEnabled)(this._extension,"scmActionButton"),this._actionButtonDisposables.value=new B.DisposableStore,this._actionButton=h;const _=h!==void 0?{command:this._commands.converter.toInternal(h.command,this._actionButtonDisposables.value),description:h.description}:void 0;De(this,f,"f").$updateSourceControl(this.handle,{actionButton:_??null})}get statusBarCommands(){return this._statusBarCommands}set statusBarCommands(h){if(this._statusBarCommands&&h&&r(this._statusBarCommands,h))return;this._statusBarDisposables.value=new B.DisposableStore,this._statusBarCommands=h;const _=(h||[]).map(P=>this._commands.converter.toInternal(P,this._statusBarDisposables.value));De(this,f,"f").$updateSourceControl(this.handle,{statusBarCommands:_})}get selected(){return this._selected}createResourceGroup(h,_){const P=new c(De(this,f,"f"),this._commands,this.handle,h,_),R=k.Event.once(P.onDidDispose)(()=>this.createdResourceGroups.delete(P));return this.createdResourceGroups.set(P,R),this.eventuallyAddResourceGroups(),P}eventuallyAddResourceGroups(){const h=[],_=[];for(const[P,R]of this.createdResourceGroups){R.dispose();const $=P.onDidUpdateResourceStates(()=>{this.updatedResourceGroups.add(P),this.eventuallyUpdateResourceStates()});k.Event.once(P.onDidDispose)(()=>{this.updatedResourceGroups.delete(P),$.dispose(),this._groups.delete(P.handle),De(this,f,"f").$unregisterGroup(this.handle,P.handle)}),h.push([P.handle,P.id,P.label,P.features]);const E=P._takeResourceStateSnapshot();E.length>0&&_.push([P.handle,E]),this._groups.set(P.handle,P)}De(this,f,"f").$registerGroups(this.handle,h,_),this.createdResourceGroups.clear()}eventuallyUpdateResourceStates(){const h=[];this.updatedResourceGroups.forEach(_=>{const P=_._takeResourceStateSnapshot();P.length!==0&&h.push([_.handle,P])}),h.length>0&&De(this,f,"f").$spliceResourceStates(this.handle,h),this.updatedResourceGroups.clear()}getResourceGroup(h){return this._groups.get(h)}setSelectionState(h){this._selected=h,this._onDidChangeSelection.fire(h)}dispose(){this._acceptInputDisposables.dispose(),this._actionButtonDisposables.dispose(),this._statusBarDisposables.dispose(),this._groups.forEach(h=>h.dispose()),De(this,f,"f").$unregisterSourceControl(this.handle)}}f=new WeakMap,t._handlePool=0,Fe([(0,w.debounce)(100)],t.prototype,"eventuallyAddResourceGroups",null),Fe([(0,w.debounce)(100)],t.prototype,"eventuallyUpdateResourceStates",null);let a=class Vi{constructor(h,_,P){this._commands=_,this.logService=P,this._sourceControls=new Map,this._sourceControlsByExtension=new Map,this._onDidChangeActiveProvider=new k.Emitter,this._proxy=h.getProxy(A.MainContext.MainThreadSCM),this._telemetry=h.getProxy(A.MainContext.MainThreadTelemetry),_.registerArgumentProcessor({processArgument:R=>{if(R&&R.$mid===3){const $=this._sourceControls.get(R.sourceControlHandle);if(!$)return R;const E=$.getResourceGroup(R.groupHandle);return E?E.getResourceState(R.handle):R}else if(R&&R.$mid===4){const $=this._sourceControls.get(R.sourceControlHandle);return $?$.getResourceGroup(R.groupHandle):R}else if(R&&R.$mid===5){const $=this._sourceControls.get(R.handle);return $||R}return R}})}get onDidChangeActiveProvider(){return this._onDidChangeActiveProvider.event}createSourceControl(h,_,P,R){this.logService.trace("ExtHostSCM#createSourceControl",h.identifier.value,_,P,R),this._telemetry.$publicLog2("api/scm/createSourceControl",{extensionId:h.identifier.value});const $=Vi._handlePool++,E=new t(h,this._proxy,this._commands,_,P,R);this._sourceControls.set($,E);const z=this._sourceControlsByExtension.get(v.ExtensionIdentifier.toKey(h.identifier))||[];return z.push(E),this._sourceControlsByExtension.set(v.ExtensionIdentifier.toKey(h.identifier),z),E}getLastInputBox(h){this.logService.trace("ExtHostSCM#getLastInputBox",h.identifier.value);const _=this._sourceControlsByExtension.get(v.ExtensionIdentifier.toKey(h.identifier)),P=_&&_[_.length-1];return P&&P.inputBox}$provideOriginalResource(h,_,P){const R=o.URI.revive(_);this.logService.trace("ExtHostSCM#$provideOriginalResource",h,R.toString());const $=this._sourceControls.get(h);return!$||!$.quickDiffProvider||!$.quickDiffProvider.provideOriginalResource?Promise.resolve(null):(0,S.asPromise)(()=>$.quickDiffProvider.provideOriginalResource(R,P)).then(E=>E||null)}$onInputBoxValueChange(h,_){this.logService.trace("ExtHostSCM#$onInputBoxValueChange",h);const P=this._sourceControls.get(h);return P&&P.inputBox.$onInputBoxValueChange(_),Promise.resolve(void 0)}$executeResourceCommand(h,_,P,R){this.logService.trace("ExtHostSCM#$executeResourceCommand",h,_,P);const $=this._sourceControls.get(h);if(!$)return Promise.resolve(void 0);const E=$.getResourceGroup(_);return E?E.$executeResourceCommand(P,R):Promise.resolve(void 0)}$validateInput(h,_,P){this.logService.trace("ExtHostSCM#$validateInput",h);const R=this._sourceControls.get(h);return!R||!R.inputBox.validateInput?Promise.resolve(void 0):(0,S.asPromise)(()=>R.inputBox.validateInput(_,P)).then($=>{if(!$)return Promise.resolve(void 0);const E=m.MarkdownString.fromStrict($.message);return E?Promise.resolve([E,$.type]):Promise.resolve(void 0)})}$setSelectedSourceControl(h){return this.logService.trace("ExtHostSCM#$setSelectedSourceControl",h),h!==void 0&&this._sourceControls.get(h)?.setSelectionState(!0),this._selectedSourceControlHandle!==void 0&&this._sourceControls.get(this._selectedSourceControlHandle)?.setSelectionState(!1),this._selectedSourceControlHandle=h,Promise.resolve(void 0)}};a._handlePool=0,a=Fe([Ne(2,L.ILogService)],a),e.ExtHostSCM=a});var je=this&&this.__classPrivateFieldSet||function(J,e,o,k,w){if(k==="m")throw new TypeError("Private method is not writable");if(k==="a"&&!w)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?J!==e||!w:!e.has(J))throw new TypeError("Cannot write private member to an object whose class did not declare it");return k==="a"?w.call(J,o):w?w.value=o:e.set(J,o),o},De=this&&this.__classPrivateFieldGet||function(J,e,o,k){if(o==="a"&&!k)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?J!==e||!k:!e.has(J))throw new TypeError("Cannot read private member from an object whose class did not declare it");return o==="m"?k:o==="a"?k.call(J):k?k.value:e.get(J)};define(Ee[201],we([1,0,7,4,125,6,8,11]),function(J,e,o,k,w,B,S,A){"use strict";var y,M;Object.defineProperty(e,"__esModule",{value:!0}),e.ExtHostStatusBar=e.ExtHostStatusBarEntry=void 0;class L{constructor(s,n,f,D,T=o.StatusBarAlignment.Left,d){y.set(this,void 0),M.set(this,void 0),this._disposed=!1,this._visible=!1,this._text="",this._internalCommandRegistration=new B.DisposableStore,je(this,y,s,"f"),je(this,M,n,"f"),this._entryId=L.ID_GEN++,this._extension=f,this._id=D,this._alignment=T,this._priority=this.validatePriority(d)}validatePriority(s){if(!!(0,A.isNumber)(s))return s===Number.POSITIVE_INFINITY?Number.MAX_VALUE:s===Number.NEGATIVE_INFINITY?-Number.MAX_VALUE:s}get id(){return this._id??this._extension.identifier.value}get alignment(){return this._alignment}get priority(){return this._priority}get text(){return this._text}get name(){return this._name}get tooltip(){return this._tooltip}get color(){return this._color}get backgroundColor(){return this._backgroundColor}get command(){return this._command?.fromApi}get accessibilityInformation(){return this._accessibilityInformation}set text(s){this._text=s,this.update()}set name(s){this._name=s,this.update()}set tooltip(s){this._tooltip=s,this.update()}set color(s){this._color=s,this.update()}set backgroundColor(s){s&&!L.ALLOWED_BACKGROUND_COLORS.has(s.id)&&(s=void 0),this._backgroundColor=s,this.update()}set command(s){this._command?.fromApi!==s&&(this._internalCommandRegistration.clear(),typeof s=="string"?this._command={fromApi:s,internal:De(this,M,"f").toInternal({title:"",command:s},this._internalCommandRegistration)}:s?this._command={fromApi:s,internal:De(this,M,"f").toInternal(s,this._internalCommandRegistration)}:this._command=void 0,this.update())}set accessibilityInformation(s){this._accessibilityInformation=s,this.update()}show(){this._visible=!0,this.update()}hide(){clearTimeout(this._timeoutHandle),this._visible=!1,De(this,y,"f").$dispose(this._entryId)}update(){this._disposed||!this._visible||(clearTimeout(this._timeoutHandle),this._timeoutHandle=setTimeout(()=>{this._timeoutHandle=void 0;let s;this._extension?this._id?s=`${this._extension.identifier.value}.${this._id}`:s=this._extension.identifier.value:s=this._id;let n;this._name?n=this._name:n=(0,w.localize)(0,null,this._extension.displayName||this._extension.name);let f=this._color;this._backgroundColor&&(f=L.ALLOWED_BACKGROUND_COLORS.get(this._backgroundColor.id));const D=S.MarkdownString.fromStrict(this._tooltip);De(this,y,"f").$setEntry(this._entryId,s,n,this._text,D,this._command?.internal,f,this._backgroundColor,this._alignment===o.StatusBarAlignment.Left,this._priority,this._accessibilityInformation)},0))}dispose(){this.hide(),this._disposed=!0}}e.ExtHostStatusBarEntry=L,y=new WeakMap,M=new WeakMap,L.ID_GEN=0,L.ALLOWED_BACKGROUND_COLORS=new Map([["statusBarItem.errorBackground",new o.ThemeColor("statusBarItem.errorForeground")],["statusBarItem.warningBackground",new o.ThemeColor("statusBarItem.warningForeground")]]);class v{constructor(s){this._messages=[],this._item=s.createStatusBarEntry(void 0,"status.extensionMessage",o.StatusBarAlignment.Left,Number.MIN_VALUE),this._item.name=(0,w.localize)(1,null)}dispose(){this._messages.length=0,this._item.dispose()}setMessage(s){const n={message:s};return this._messages.unshift(n),this._update(),new o.Disposable(()=>{const f=this._messages.indexOf(n);f>=0&&(this._messages.splice(f,1),this._update())})}_update(){this._messages.length>0?(this._item.text=this._messages[0].message,this._item.show()):this._item.hide()}}class u{constructor(s,n){this._proxy=s.getProxy(k.MainContext.MainThreadStatusBar),this._commands=n,this._statusMessage=new v(this)}createStatusBarEntry(s,n,f,D){return new L(this._proxy,this._commands,s,n,f,D)}setStatusBarMessage(s,n){const f=this._statusMessage.setMessage(s);let D;return typeof n=="number"?D=setTimeout(()=>f.dispose(),n):typeof n!="undefined"&&n.then(()=>f.dispose(),()=>f.dispose()),new o.Disposable(()=>{f.dispose(),clearTimeout(D)})}}e.ExtHostStatusBar=u}),define(Ee[67],we([1,0,4,5,3]),function(J,e,o,k,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IExtHostStorage=e.ExtHostStorage=void 0;class B{constructor(A){this._onDidChangeStorage=new k.Emitter,this.onDidChangeStorage=this._onDidChangeStorage.event,this._proxy=A.getProxy(o.MainContext.MainThreadStorage)}registerExtensionStorageKeysToSync(A,y){this._proxy.$registerExtensionStorageKeysToSync(A,y)}initializeExtensionStorage(A,y,M){return this._proxy.$initializeExtensionStorage(A,y).then(L=>L||M)}setValue(A,y,M){return this._proxy.$setValue(A,y,M)}$acceptValue(A,y,M){this._onDidChangeStorage.fire({shared:A,key:y,value:M})}}e.ExtHostStorage=B,e.IExtHostStorage=(0,w.createDecorator)("IExtHostStorage")}),define(Ee[68],we([1,0,3,27,12,50,2]),function(J,e,o,k,w,B,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtensionStoragePaths=e.IExtensionStoragePaths=void 0,e.IExtensionStoragePaths=(0,o.createDecorator)("IExtensionStoragePaths");let A=class{constructor(M,L,v){this._logService=L,this._extHostFileSystem=v,this._workspace=M.workspace??void 0,this._environment=M.environment,this.whenReady=this._getOrCreateWorkspaceStoragePath().then(u=>this._value=u)}async _getWorkspaceStorageURI(M){return S.URI.joinPath(this._environment.workspaceStorageHome,M)}async _getOrCreateWorkspaceStoragePath(){if(!this._workspace)return Promise.resolve(void 0);const M=this._workspace.id,L=await this._getWorkspaceStorageURI(M);try{return await this._extHostFileSystem.value.stat(L),this._logService.trace("[ExtHostStorage] storage dir already exists",L),L}catch{}try{return this._logService.trace("[ExtHostStorage] creating dir and metadata-file",L),await this._extHostFileSystem.value.createDirectory(L),await this._extHostFileSystem.value.writeFile(S.URI.joinPath(L,"meta.json"),new TextEncoder().encode(JSON.stringify({id:this._workspace.id,configuration:S.URI.revive(this._workspace.configuration)?.toString(),name:this._workspace.name},void 0,2))),L}catch(v){this._logService.error("[ExtHostStorage]",v);return}}workspaceValue(M){if(this._value)return S.URI.joinPath(this._value,M.identifier.value)}globalValue(M){return S.URI.joinPath(this._environment.globalStorageHome,M.identifier.value.toLowerCase())}onWillDeactivateAll(){}};A=Fe([Ne(0,k.IExtHostInitDataService),Ne(1,w.ILogService),Ne(2,B.IExtHostConsumerFileSystem)],A),e.ExtensionStoragePaths=A}),define(Ee[40],we([1,0,5,4,3,2,14,6,7,126,15,165,20,36,145,57,11,13]),function(J,e,o,k,w,B,S,A,y,M,L,v,u,m,s,n,f,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WorkerExtHostTerminalService=e.EnvironmentVariableCollection=e.BaseExtHostTerminalService=e.ExtHostPseudoterminal=e.ExtHostTerminal=e.IExtHostTerminalService=void 0,e.IExtHostTerminalService=(0,w.createDecorator)("IExtHostTerminalService");class T{constructor(t,a,p,h){this._proxy=t,this._id=a,this._creationOptions=p,this._name=h,this._disposed=!1,this._state={isInteractedWith:!1},this.isOpen=!1,this._creationOptions=Object.freeze(this._creationOptions),this._pidPromise=new Promise(P=>this._pidPromiseComplete=P);const _=this;this.value={get name(){return _._name||""},get processId(){return _._pidPromise},get creationOptions(){return _._creationOptions},get exitStatus(){return _._exitStatus},get state(){return _._state},sendText(P,R=!0){_._checkDisposed(),_._proxy.$sendText(_._id,P,R)},show(P){_._checkDisposed(),_._proxy.$show(_._id,P)},hide(){_._checkDisposed(),_._proxy.$hide(_._id)},dispose(){_._disposed||(_._disposed=!0,_._proxy.$dispose(_._id))},get dimensions(){if(!(_._cols===void 0||_._rows===void 0))return{columns:_._cols,rows:_._rows}}}}async create(t,a){if(typeof this._id!="string")throw new Error("Terminal has already been created");await this._proxy.$createTerminal(this._id,{name:t.name,shellPath:(0,f.withNullAsUndefined)(t.shellPath),shellArgs:(0,f.withNullAsUndefined)(t.shellArgs),cwd:(0,f.withNullAsUndefined)(t.cwd),env:(0,f.withNullAsUndefined)(t.env),icon:(0,f.withNullAsUndefined)(r(t.iconPath)),color:n.ThemeColor.isThemeColor(t.color)?t.color.id:void 0,initialText:(0,f.withNullAsUndefined)(t.message),strictEnv:(0,f.withNullAsUndefined)(t.strictEnv),hideFromUser:(0,f.withNullAsUndefined)(t.hideFromUser),isFeatureTerminal:(0,f.withNullAsUndefined)(a?.isFeatureTerminal),isExtensionOwnedTerminal:!0,useShellEnvironment:(0,f.withNullAsUndefined)(a?.useShellEnvironment),location:a?.location||this._serializeParentTerminal(t.location,a?.resolvedExtHostIdentifier),isTransient:(0,f.withNullAsUndefined)(t.isTransient)})}async createExtensionTerminal(t,a,p,h){if(typeof this._id!="string")throw new Error("Terminal has already been created");if(await this._proxy.$createTerminal(this._id,{name:this._name,isExtensionCustomPtyTerminal:!0,icon:p,color:n.ThemeColor.isThemeColor(h)?h.id:void 0,location:this._serializeParentTerminal(t,a),isTransient:!0}),typeof this._id=="string")throw new Error("Terminal creation failed");return this._id}_serializeParentTerminal(t,a){return typeof t=="object"?"parentTerminal"in t&&t.parentTerminal&&a?{parentTerminal:a}:"viewColumn"in t?{viewColumn:t.viewColumn,preserveFocus:t.preserveFocus}:void 0:t}_checkDisposed(){if(this._disposed)throw new Error("Terminal has already been disposed")}set name(t){this._name=t}setExitCode(t){this._exitStatus=Object.freeze({code:t})}setDimensions(t,a){return t===this._cols&&a===this._rows||t===0||a===0?!1:(this._cols=t,this._rows=a,!0)}setInteractedWith(){return this._state.isInteractedWith?!1:(this._state={isInteractedWith:!0},!0)}_setProcessId(t){this._pidPromiseComplete?(this._pidPromiseComplete(t),this._pidPromiseComplete=void 0):this._pidPromise.then(a=>{a!==t&&(this._pidPromise=Promise.resolve(t))})}}e.ExtHostTerminal=T;class d{constructor(t){this._pty=t,this.id=0,this.shouldPersist=!1,this._onProcessData=new o.Emitter,this.onProcessData=this._onProcessData.event,this._onProcessReady=new o.Emitter,this._onDidChangeProperty=new o.Emitter,this.onDidChangeProperty=this._onDidChangeProperty.event,this._onProcessExit=new o.Emitter,this.onProcessExit=this._onProcessExit.event}get onProcessReady(){return this._onProcessReady.event}refreshProperty(t){throw new Error(`refreshProperty is not suppported in extension owned terminals. property: ${t}`)}updateProperty(t,a){throw new Error(`updateProperty is not suppported in extension owned terminals. property: ${t}, value: ${a}`)}async start(){}shutdown(){this._pty.close()}input(t){this._pty.handleInput?.(t)}resize(t,a){this._pty.setDimensions?.({columns:t,rows:a})}async processBinary(t){}acknowledgeDataEvent(t){}async setUnicodeVersion(t){}getInitialCwd(){return Promise.resolve("")}getCwd(){return Promise.resolve("")}getLatency(){return Promise.resolve(0)}startSendingEvents(t){this._pty.onDidWrite(a=>this._onProcessData.fire(a)),this._pty.onDidClose?.((a=void 0)=>{this._onProcessExit.fire(a===void 0?void 0:a)}),this._pty.onDidOverrideDimensions?.(a=>{a&&this._onDidChangeProperty.fire({type:"overrideDimensions",value:{cols:a.columns,rows:a.rows}})}),this._pty.onDidChangeName?.(a=>{this._onDidChangeProperty.fire({type:"title",value:a})}),this._pty.open(t||void 0),t&&this._pty.setDimensions?.(t),this._onProcessReady.fire({pid:-1,cwd:""})}}e.ExtHostPseudoterminal=d;let g=1,b=class extends A.Disposable{constructor(t,a){super();this._terminals=[],this._terminalProcesses=new Map,this._terminalProcessDisposables={},this._extensionTerminalAwaitingStart={},this._getTerminalPromises={},this._environmentVariableCollections=new Map,this._linkProviders=new Set,this._profileProviders=new Map,this._terminalLinkCache=new Map,this._terminalLinkCancellationSource=new Map,this._onDidCloseTerminal=new o.Emitter,this.onDidCloseTerminal=this._onDidCloseTerminal.event,this._onDidOpenTerminal=new o.Emitter,this.onDidOpenTerminal=this._onDidOpenTerminal.event,this._onDidChangeActiveTerminal=new o.Emitter,this.onDidChangeActiveTerminal=this._onDidChangeActiveTerminal.event,this._onDidChangeTerminalDimensions=new o.Emitter,this.onDidChangeTerminalDimensions=this._onDidChangeTerminalDimensions.event,this._onDidChangeTerminalState=new o.Emitter,this.onDidChangeTerminalState=this._onDidChangeTerminalState.event,this._proxy=a.getProxy(k.MainContext.MainThreadTerminalService),this._bufferer=new s.TerminalDataBufferer(this._proxy.$sendProcessData),this._onDidWriteTerminalData=new o.Emitter({onFirstListenerAdd:()=>this._proxy.$startSendingDataEvents(),onLastListenerRemove:()=>this._proxy.$stopSendingDataEvents()}),this._proxy.$registerProcessSupport(t),this._register({dispose:()=>{for(const[p,h]of this._terminalProcesses)h.shutdown(!0)}})}get activeTerminal(){return this._activeTerminal?.value}get terminals(){return this._terminals.map(t=>t.value)}get onDidWriteTerminalData(){return this._onDidWriteTerminalData.event}getDefaultShell(t){return(t?this._defaultAutomationProfile:this._defaultProfile)?.path||""}getDefaultShellArgs(t){return(t?this._defaultAutomationProfile:this._defaultProfile)?.args||[]}createExtensionTerminal(t,a){const p=new T(this._proxy,(0,m.generateUuid)(),t,t.name),h=new d(t.pty);return p.createExtensionTerminal(t.location,this._serializeParentTerminal(t,a).resolvedExtHostIdentifier,r(t.iconPath),i(t.color)).then(_=>{const P=this._setupExtHostProcessListeners(_,h);this._terminalProcessDisposables[_]=P}),this._terminals.push(p),p.value}_serializeParentTerminal(t,a){if(a=a||{},t.location&&typeof t.location=="object"&&"parentTerminal"in t.location){const p=t.location.parentTerminal;if(p){const h=this._terminals.find(_=>_.value===p);h&&(a.resolvedExtHostIdentifier=h._id)}}else t.location&&typeof t.location!="object"?a.location=t.location:a.location&&typeof a.location=="object"&&"splitActiveTerminal"in a.location&&(a.location={splitActiveTerminal:!0});return a}attachPtyToTerminal(t,a){if(!this._getTerminalById(t))throw new Error(`Cannot resolve terminal with id ${t} for virtual process`);const h=new d(a),_=this._setupExtHostProcessListeners(t,h);this._terminalProcessDisposables[t]=_}async $acceptActiveTerminalChanged(t){const a=this._activeTerminal;if(t===null){this._activeTerminal=void 0,a!==this._activeTerminal&&this._onDidChangeActiveTerminal.fire(this._activeTerminal);return}const p=this._getTerminalById(t);p&&(this._activeTerminal=p,a!==this._activeTerminal&&this._onDidChangeActiveTerminal.fire(this._activeTerminal.value))}async $acceptTerminalProcessData(t,a){const p=this._getTerminalById(t);p&&this._onDidWriteTerminalData.fire({terminal:p.value,data:a})}async $acceptTerminalDimensions(t,a,p){const h=this._getTerminalById(t);h&&h.setDimensions(a,p)&&this._onDidChangeTerminalDimensions.fire({terminal:h.value,dimensions:h.value.dimensions})}async $acceptTerminalMaximumDimensions(t,a,p){this._terminalProcesses.get(t)?.resize(a,p)}async $acceptTerminalTitleChange(t,a){const p=this._getTerminalById(t);p&&(p.name=a)}async $acceptTerminalClosed(t,a){const p=this._getTerminalObjectIndexById(this._terminals,t);if(p!==null){const h=this._terminals.splice(p,1)[0];h.setExitCode(a),this._onDidCloseTerminal.fire(h.value)}}$acceptTerminalOpened(t,a,p,h){if(a){const R=this._getTerminalObjectIndexById(this._terminals,a);if(R!==null){this._terminals[R]._id=t,this._onDidOpenTerminal.fire(this.terminals[R]),this._terminals[R].isOpen=!0;return}}const _={name:h.name,shellPath:h.executable,shellArgs:h.args,cwd:typeof h.cwd=="string"?h.cwd:B.URI.revive(h.cwd),env:h.env,hideFromUser:h.hideFromUser},P=new T(this._proxy,t,_,p);this._terminals.push(P),this._onDidOpenTerminal.fire(P.value),P.isOpen=!0}async $acceptTerminalProcessId(t,a){const p=this._getTerminalById(t);p&&p._setProcessId(a)}async $startExtensionTerminal(t,a){const p=this._getTerminalById(t);if(!p)return{message:(0,M.localize)(0,null,t)};p.isOpen||await new Promise(_=>{const P=this.onDidOpenTerminal(async R=>{R===p.value&&(P.dispose(),_())})});const h=this._terminalProcesses.get(t);h?h.startSendingEvents(a):this._extensionTerminalAwaitingStart[t]={initialDimensions:a}}_setupExtHostProcessListeners(t,a){const p=new A.DisposableStore;p.add(a.onProcessReady(_=>this._proxy.$sendProcessReady(t,_.pid,_.cwd))),p.add(a.onDidChangeProperty(_=>this._proxy.$sendProcessProperty(t,_))),this._bufferer.startBuffering(t,a.onProcessData),p.add(a.onProcessExit(_=>this._onProcessExit(t,_))),this._terminalProcesses.set(t,a);const h=this._extensionTerminalAwaitingStart[t];return h&&a instanceof d&&(a.startSendingEvents(h.initialDimensions),delete this._extensionTerminalAwaitingStart[t]),p}$acceptProcessAckDataEvent(t,a){this._terminalProcesses.get(t)?.acknowledgeDataEvent(a)}$acceptProcessInput(t,a){this._terminalProcesses.get(t)?.input(a)}$acceptTerminalInteraction(t){const a=this._getTerminalById(t);a?.setInteractedWith()&&this._onDidChangeTerminalState.fire(a.value)}$acceptProcessResize(t,a,p){try{this._terminalProcesses.get(t)?.resize(a,p)}catch(h){if(h.code!=="EPIPE"&&h.code!=="ERR_IPC_CHANNEL_CLOSED")throw h}}$acceptProcessShutdown(t,a){this._terminalProcesses.get(t)?.shutdown(a)}$acceptProcessRequestInitialCwd(t){this._terminalProcesses.get(t)?.getInitialCwd().then(a=>this._proxy.$sendProcessProperty(t,{type:"initialCwd",value:a}))}$acceptProcessRequestCwd(t){this._terminalProcesses.get(t)?.getCwd().then(a=>this._proxy.$sendProcessProperty(t,{type:"cwd",value:a}))}$acceptProcessRequestLatency(t){return Promise.resolve(t)}registerLinkProvider(t){return this._linkProviders.add(t),this._linkProviders.size===1&&this._proxy.$startLinkProvider(),new y.Disposable(()=>{this._linkProviders.delete(t),this._linkProviders.size===0&&this._proxy.$stopLinkProvider()})}registerProfileProvider(t,a,p){if(this._profileProviders.has(a))throw new Error(`Terminal profile provider "${a}" already registered`);return this._profileProviders.set(a,p),this._proxy.$registerProfileProvider(a,t.identifier.value),new y.Disposable(()=>{this._profileProviders.delete(a),this._proxy.$unregisterProfileProvider(a)})}async $createContributedProfileTerminal(t,a){const p=new u.CancellationTokenSource().token;let h=await this._profileProviders.get(t)?.provideTerminalProfile(p);if(!p.isCancellationRequested){if(h&&!("options"in h)&&(h={options:h}),!h||!("options"in h))throw new Error(`No terminal profile options provided for id "${t}"`);if("pty"in h.options){this.createExtensionTerminal(h.options,a);return}this.createTerminalFromOptions(h.options,a)}}async $provideLinks(t,a){const p=this._getTerminalById(t);if(!p)return[];this._terminalLinkCache.delete(t);const h=this._terminalLinkCancellationSource.get(t);h&&h.dispose(!0);const _=new u.CancellationTokenSource;this._terminalLinkCancellationSource.set(t,_);const P=[],R={terminal:p.value,line:a},$=[];for(const V of this._linkProviders)$.push(D.Promises.withAsyncBody(async W=>{_.token.onCancellationRequested(()=>W({provider:V,links:[]}));const Q=await V.provideTerminalLinks(R,_.token)||[];_.token.isCancellationRequested||W({provider:V,links:Q})}));const E=await Promise.all($);if(_.token.isCancellationRequested)return[];const z=new Map;for(const V of E)V&&V.links.length>0&&P.push(...V.links.map(W=>{const Q={id:g++,startIndex:W.startIndex,length:W.length,label:W.tooltip};return z.set(Q.id,{provider:V.provider,link:W}),Q}));return this._terminalLinkCache.set(t,z),P}$activateLink(t,a){const p=this._terminalLinkCache.get(t)?.get(a);!p||p.provider.handleTerminalLink(p.link)}_onProcessExit(t,a){this._bufferer.stopBuffering(t),this._terminalProcesses.delete(t),delete this._extensionTerminalAwaitingStart[t];const p=this._terminalProcessDisposables[t];p&&(p.dispose(),delete this._terminalProcessDisposables[t]),this._proxy.$sendProcessExit(t,a)}_getTerminalById(t){return this._getTerminalObjectById(this._terminals,t)}_getTerminalObjectById(t,a){const p=this._getTerminalObjectIndexById(t,a);return p!==null?t[p]:null}_getTerminalObjectIndexById(t,a){let p=null;return t.some((h,_)=>h._id===a?(p=_,!0):!1),p}getEnvironmentVariableCollection(t){let a=this._environmentVariableCollections.get(t.identifier.value);return a||(a=new l,this._setEnvironmentVariableCollection(t.identifier.value,a)),a}_syncEnvironmentVariableCollection(t,a){const p=(0,v.serializeEnvironmentVariableCollection)(a.map);this._proxy.$setEnvironmentVariableCollection(t,a.persistent,p.length===0?void 0:p)}$initEnvironmentVariableCollections(t){t.forEach(a=>{const p=a[0],h=new l(a[1]);this._setEnvironmentVariableCollection(p,h)})}$acceptDefaultProfile(t,a){this._defaultProfile=t,this._defaultAutomationProfile=a}_setEnvironmentVariableCollection(t,a){this._environmentVariableCollections.set(t,a),a.onDidChangeCollection(()=>{this._syncEnvironmentVariableCollection(t,a)})}};b=Fe([Ne(1,S.IExtHostRpcService)],b),e.BaseExtHostTerminalService=b;class l{constructor(t){this.map=new Map,this._persistent=!0,this._onDidChangeCollection=new o.Emitter,this.map=new Map(t)}get persistent(){return this._persistent}set persistent(t){this._persistent=t,this._onDidChangeCollection.fire()}get onDidChangeCollection(){return this._onDidChangeCollection&&this._onDidChangeCollection.event}get size(){return this.map.size}replace(t,a){this._setIfDiffers(t,{value:a,type:y.EnvironmentVariableMutatorType.Replace})}append(t,a){this._setIfDiffers(t,{value:a,type:y.EnvironmentVariableMutatorType.Append})}prepend(t,a){this._setIfDiffers(t,{value:a,type:y.EnvironmentVariableMutatorType.Prepend})}_setIfDiffers(t,a){const p=this.map.get(t);(!p||p.value!==a.value||p.type!==a.type)&&(this.map.set(t,a),this._onDidChangeCollection.fire())}get(t){return this.map.get(t)}forEach(t,a){this.map.forEach((p,h)=>t.call(a,h,p,this))}delete(t){this.map.delete(t),this._onDidChangeCollection.fire()}clear(){this.map.clear(),this._onDidChangeCollection.fire()}}e.EnvironmentVariableCollection=l;let I=class extends b{constructor(t){super(!1,t)}createTerminal(t,a,p){throw new L.NotSupportedError}createTerminalFromOptions(t,a){throw new L.NotSupportedError}};I=Fe([Ne(0,S.IExtHostRpcService)],I),e.WorkerExtHostTerminalService=I;function r(c){if(!(!c||typeof c=="string"))return"id"in c?{id:c.id,color:c.color}:c}function i(c){return n.ThemeColor.isThemeColor(c)?c:void 0}});var je=this&&this.__classPrivateFieldSet||function(J,e,o,k,w){if(k==="m")throw new TypeError("Private method is not writable");if(k==="a"&&!w)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?J!==e||!w:!e.has(J))throw new TypeError("Cannot write private member to an object whose class did not declare it");return k==="a"?w.call(J,o):w?w.value=o:e.set(J,o),o},De=this&&this.__classPrivateFieldGet||function(J,e,o,k){if(o==="a"&&!k)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?J!==e||!k:!e.has(J))throw new TypeError("Cannot read private member from an object whose class did not declare it");return o==="m"?k:o==="a"?k.call(J):k?k.value:e.get(J)};define(Ee[202],we([1,0,16,21,20,5,233,93,6,26,11,36,4,14,47,8,7,171,62,63]),function(J,e,o,k,w,B,S,A,y,M,L,v,u,m,s,n,f,D,T,d){"use strict";var g;Object.defineProperty(e,"__esModule",{value:!0}),e.TestRunProfileImpl=e.MirroredTestCollection=e.TestRunDto=e.TestRunCoordinator=e.ExtHostTesting=void 0;let b=class{constructor(R,$){this.resultsChangedEmitter=new B.Emitter,this.controllers=new Map,this.onResultsChanged=this.resultsChangedEmitter.event,this.results=[],this.proxy=R.getProxy(u.MainContext.MainThreadTesting),this.observer=new p(this.proxy),this.runTracker=new I(this.proxy),$.registerArgumentProcessor({processArgument:E=>E?.$mid===13?n.TestItem.toItemFromContext(E):E})}createTestController(R,$,E){if(this.controllers.has(R))throw new Error(`Attempt to insert a duplicate controller with ID "${R}"`);const z=new y.DisposableStore,V=z.add(new D.SingleUseTestCollection(R));V.root.label=$;const W=new Map,Q=this.proxy,K={items:V.root.children,get label(){return $},set label(te){$=te,V.root.label=te,Q.$updateController(R,{label:$})},get refreshHandler(){return E},set refreshHandler(te){E=te,Q.$updateController(R,{canRefresh:!!te})},get id(){return R},createRunProfile:(te,ae,ee,ce,de)=>{let Se=(0,A.hash)(te);for(;W.has(Se);)Se++;const fe=new h(this.proxy,R,Se,te,ae,ee,ce,de);return W.set(Se,fe),fe},createTestItem(te,ae,ee){return new s.TestItemImpl(R,te,ae,ee)},createTestRun:(te,ae,ee=!0)=>this.runTracker.createTestRun(R,V,te,ae,ee),set resolveHandler(te){V.resolveHandler=te},get resolveHandler(){return V.resolveHandler},dispose:()=>{z.dispose()}};Q.$registerTestController(R,$,!!E),z.add((0,y.toDisposable)(()=>Q.$unregisterTestController(R)));const H={controller:K,collection:V,profiles:W};return this.controllers.set(R,H),z.add((0,y.toDisposable)(()=>this.controllers.delete(R))),z.add(V.onDidGenerateDiff(te=>Q.$publishDiff(R,te.map(T.TestsDiffOp.serialize)))),K}createTestObserver(){return this.observer.checkout()}async runTests(R,$=w.CancellationToken.None){const E=r(R);if(!E)throw new Error("The request passed to `vscode.test.runTests` must include a profile");const z=this.controllers.get(E.controllerId);if(!z)throw new Error("Controller not found");await this.proxy.$runTests({isUiTriggered:!1,targets:[{testIds:R.include?.map(V=>V.id)??[z.collection.root.id],profileGroup:_[E.kind],profileId:E.profileId,controllerId:E.controllerId}],exclude:R.exclude?.map(V=>V.id)},$)}$provideFileCoverage(R,$,E){return(0,o.mapFind)(this.runTracker.trackers,V=>V.id===R?V.getCoverage($):void 0)?.provideFileCoverage(E)??Promise.resolve([])}$resolveFileCoverage(R,$,E,z){return(0,o.mapFind)(this.runTracker.trackers,W=>W.id===R?W.getCoverage($):void 0)?.resolveFileCoverage(E,z)??Promise.resolve([])}$configureRunProfile(R,$){this.controllers.get(R)?.profiles.get($)?.configureHandler?.()}async $refreshTests(R,$){await this.controllers.get(R)?.controller.refreshHandler?.($)}$publishTestResults(R){this.results=Object.freeze(R.map($=>(0,M.deepFreeze)(n.TestResults.to($))).concat(this.results).sort(($,E)=>E.completedAt-$.completedAt).slice(0,32)),this.resultsChangedEmitter.fire()}async $expandTest(R,$){const E=this.controllers.get(d.TestId.fromString(R).controllerId)?.collection;E&&(await E.expand(R,$<0?1/0:$),E.flushDiff())}$acceptDiff(R){this.observer.applyDiff(R.map(T.TestsDiffOp.deserialize))}async $runControllerTests(R,$){const E=this.controllers.get(R.controllerId);if(!E)return;const{collection:z,profiles:V}=E,W=V.get(R.profileId);if(!W)return;const Q=R.testIds.map(ae=>z.tree.get(ae)).filter(L.isDefined),K=R.excludeExtIds.map(ae=>E.collection.tree.get(ae)).filter(L.isDefined).filter(ae=>Q.some(ee=>ee.fullId.compare(ae.fullId)===2));if(!Q.length)return;const H=new f.TestRunRequest(Q.some(ae=>ae.actual instanceof s.TestItemRootImpl)?void 0:Q.map(ae=>ae.actual),K.map(ae=>ae.actual),W),te=this.runTracker.prepareForMainThreadTestRun(H,i.fromInternal(R,E.collection),$);try{await W.runHandler(H,$)}finally{te.isRunning&&!$.isCancellationRequested&&await B.Event.toPromise(te.onEnd),te.dispose()}}$cancelExtensionTestRun(R){R===void 0?this.runTracker.cancelAllRuns():this.runTracker.cancelRunById(R)}};b=Fe([Ne(0,m.IExtHostRpcService)],b),e.ExtHostTesting=b;class l extends y.Disposable{constructor(R,$,E){super();this.dto=R,this.proxy=$,this.tasks=new Map,this.sharedTestIds=new Set,this.endEmitter=this._register(new B.Emitter),this.disposed=!1,this.onEnd=this.endEmitter.event,this.cts=this._register(new w.CancellationTokenSource(E)),this._register(this.cts.token.onCancellationRequested(()=>{for(const{run:z}of this.tasks.values())z.end()}))}get isRunning(){return this.tasks.size>0}get id(){return this.dto.id}getCoverage(R){return this.tasks.get(R)?.coverage}createRun(R){const $=this.dto.id,E=this.dto.controllerId,z=(0,v.generateUuid)(),V=new c(this.proxy,$,z),W=te=>(ae,...ee)=>{if(K){console.warn(`Setting the state of test "${ae.id}" is a no-op after the run ends.`);return}!this.dto.isIncluded(ae)||(this.ensureTestIsKnown(ae),te(ae,...ee))},Q=(te,ae)=>{const ee=ae instanceof Array?ae.map(n.TestMessage.from):[n.TestMessage.from(ae)];if(te.uri&&te.range){const ce={range:n.Range.from(te.range),uri:te.uri};for(const de of ee)de.location=de.location||ce}this.proxy.$appendTestMessagesInRun($,z,d.TestId.fromExtHostTestItem(te,E).toString(),ee)};let K=!1;const H={isPersisted:this.dto.isPersisted,token:this.cts.token,name:R,get coverageProvider(){return V.coverageProvider},set coverageProvider(te){V.coverageProvider=te},enqueued:W(te=>{this.proxy.$updateTestStateInRun($,z,d.TestId.fromExtHostTestItem(te,E).toString(),1)}),skipped:W(te=>{this.proxy.$updateTestStateInRun($,z,d.TestId.fromExtHostTestItem(te,E).toString(),5)}),started:W(te=>{this.proxy.$updateTestStateInRun($,z,d.TestId.fromExtHostTestItem(te,E).toString(),2)}),errored:W((te,ae,ee)=>{Q(te,ae),this.proxy.$updateTestStateInRun($,z,d.TestId.fromExtHostTestItem(te,E).toString(),6,ee)}),failed:W((te,ae,ee)=>{Q(te,ae),this.proxy.$updateTestStateInRun($,z,d.TestId.fromExtHostTestItem(te,E).toString(),4,ee)}),passed:W((te,ae)=>{this.proxy.$updateTestStateInRun($,z,d.TestId.fromExtHostTestItem(te,this.dto.controllerId).toString(),3,ae)}),appendOutput:(te,ae,ee)=>{K||(ee&&(this.dto.isIncluded(ee)?this.ensureTestIsKnown(ee):ee=void 0),this.proxy.$appendOutputToRun($,z,k.VSBuffer.fromString(te),ae&&n.location.from(ae),ee&&d.TestId.fromExtHostTestItem(ee,E).toString()))},end:()=>{K||(K=!0,this.proxy.$finishedTestRunTask($,z),this.tasks.delete(z),this.isRunning||this.dispose())}};return this.tasks.set(z,{run:H,coverage:V}),this.proxy.$startedTestRunTask($,{id:z,name:R,running:!0}),H}dispose(){this.disposed||(this.disposed=!0,this.endEmitter.fire(),this.cts.cancel(),super.dispose())}ensureTestIsKnown(R){if(!(R instanceof s.TestItemImpl))throw new s.InvalidTestItemError(R.id);if(this.sharedTestIds.has(d.TestId.fromExtHostTestItem(R,this.dto.controllerId).toString()))return;const $=[],E=this.dto.colllection.root;for(;;){const z=n.TestItem.from(R);if($.unshift(z),this.sharedTestIds.has(z.extId)||(this.sharedTestIds.add(z.extId),R===E))break;R=R.parent||E}this.proxy.$addTestsToRun(this.dto.controllerId,this.dto.id,$)}}class I{constructor(R){this.proxy=R,this.tracked=new Map}get trackers(){return this.tracked.values()}prepareForMainThreadTestRun(R,$,E){return this.getTracker(R,$,E)}cancelRunById(R){for(const $ of this.tracked.values())if($.id===R){$.dispose();return}}cancelAllRuns(){for(const R of this.tracked.values())R.dispose()}createTestRun(R,$,E,z,V){const W=this.tracked.get(E);if(W)return W.createRun(z);const Q=i.fromPublic(R,$,E,V),K=r(E);this.proxy.$startedExtensionTestRun({controllerId:R,profile:K&&{group:_[K.kind],id:K.profileId},exclude:E.exclude?.map(te=>te.id)??[],id:Q.id,include:E.include?.map(te=>te.id)??[$.root.id],persist:V});const H=this.getTracker(E,Q);return H.onEnd(()=>this.proxy.$finishedExtensionTestRun(Q.id)),H.createRun(z)}getTracker(R,$,E){const z=new l($,this.proxy,E);return this.tracked.set(R,z),z.onEnd(()=>this.tracked.delete(R)),z}}e.TestRunCoordinator=I;const r=P=>{if(!!P.profile){if(!(P.profile instanceof h))throw new Error("TestRunRequest.profile is not an instance created from TestController.createRunProfile");return P.profile}};class i{constructor(R,$,E,z,V,W){this.controllerId=R,this.id=$,this.isPersisted=V,this.colllection=W,this.includePrefix=E.map(Q=>Q+"\0"),this.excludePrefix=z.map(Q=>Q+"\0")}static fromPublic(R,$,E,z){return new i(R,(0,v.generateUuid)(),E.include?.map(V=>d.TestId.fromExtHostTestItem(V,R).toString())??[R],E.exclude?.map(V=>d.TestId.fromExtHostTestItem(V,R).toString())??[],z,$)}static fromInternal(R,$){return new i(R.controllerId,R.runId,R.testIds,R.excludeExtIds,!0,$)}isIncluded(R){const $=d.TestId.fromExtHostTestItem(R,this.controllerId).toString()+"\0";for(const E of this.excludePrefix)if($===E||$.startsWith(E))return!1;for(const E of this.includePrefix)if($===E||$.startsWith(E))return!0;return!1}}e.TestRunDto=i;class c{constructor(R,$,E){this.proxy=R,this.runId=$,this.taskId=E}set coverageProvider(R){if(this._coverageProvider)throw new Error("The TestCoverageProvider cannot be replaced after being provided");!R||(this._coverageProvider=R,this.proxy.$signalCoverageAvailable(this.runId,this.taskId))}get coverageProvider(){return this._coverageProvider}async provideFileCoverage(R){if(!this._coverageProvider)return[];this.fileCoverage||(this.fileCoverage=(async()=>this._coverageProvider.provideFileCoverage(R))());try{return(await this.fileCoverage)?.map(n.TestCoverage.fromFile)??[]}catch($){throw this.fileCoverage=void 0,$}}async resolveFileCoverage(R,$){const E=await this.fileCoverage;let z=E?.[R];return!this._coverageProvider||!E||!z?[]:(z.detailedCoverage||(z=E[R]=await this._coverageProvider.resolveFileCoverage?.(z,$)??z),z.detailedCoverage?.map(n.TestCoverage.fromDetailed)??[])}}class t extends T.IncrementalChangeCollector{constructor(R){super();this.emitter=R,this.added=new Set,this.updated=new Set,this.removed=new Set,this.alreadyRemoved=new Set}get isEmpty(){return this.added.size===0&&this.removed.size===0&&this.updated.size===0}add(R){this.added.add(R)}update(R){Object.assign(R.revived,n.TestItem.toPlain(R.item)),this.added.has(R)||this.updated.add(R)}remove(R){if(this.added.has(R)){this.added.delete(R);return}if(this.updated.delete(R),R.parent&&this.alreadyRemoved.has(R.parent)){this.alreadyRemoved.add(R.item.extId);return}this.removed.add(R)}getChangeEvent(){const{added:R,updated:$,removed:E}=this;return{get added(){return[...R].map(z=>z.revived)},get updated(){return[...$].map(z=>z.revived)},get removed(){return[...E].map(z=>z.revived)}}}complete(){this.isEmpty||this.emitter.fire(this.getChangeEvent())}}class a extends T.AbstractIncrementalTestCollection{constructor(){super(...arguments);this.changeEmitter=new B.Emitter,this.onDidChangeTests=this.changeEmitter.event}get rootTests(){return super.roots}getMirroredTestDataById(R){return this.items.get(R)}getMirroredTestDataByReference(R){return this.items.get(R.id)}createItem(R,$){return{...R,revived:n.TestItem.toPlain(R.item),depth:$?$.depth+1:0,children:new Set}}createChangeCollector(){return new t(this.changeEmitter)}}e.MirroredTestCollection=a;class p{constructor(R){this.proxy=R}checkout(){this.current||(this.current=this.createObserverData());const R=this.current;return R.observers++,{onDidChangeTest:R.tests.onDidChangeTests,get tests(){return[...R.tests.rootTests].map($=>$.revived)},dispose:(0,S.once)(()=>{--R.observers==0&&(this.proxy.$unsubscribeFromDiffs(),this.current=void 0)})}}getMirroredTestDataByReference(R){return this.current?.tests.getMirroredTestDataByReference(R)}applyDiff(R){this.current?.tests.apply(R)}createObserverData(){const R=new a;return this.proxy.$subscribeToDiffs(),{observers:0,tests:R}}}class h{constructor(R,$,E,z,V,W,Q=!1,K=void 0){this.controllerId=$,this.profileId=E,this._label=z,this.kind=V,this.runHandler=W,this._isDefault=Q,this._tag=K,g.set(this,void 0),je(this,g,R,"f");const H=_[V];if(typeof H!="number")throw new Error(`Unknown TestRunProfile.group ${V}`);De(this,g,"f").$publishTestRunProfile({profileId:E,controllerId:$,tag:K?n.TestTag.namespace(this.controllerId,K.id):null,label:z,group:H,isDefault:Q,hasConfigurationHandler:!1})}get label(){return this._label}set label(R){R!==this._label&&(this._label=R,De(this,g,"f").$updateTestRunConfig(this.controllerId,this.profileId,{label:R}))}get isDefault(){return this._isDefault}set isDefault(R){R!==this._isDefault&&(this._isDefault=R,De(this,g,"f").$updateTestRunConfig(this.controllerId,this.profileId,{isDefault:R}))}get tag(){return this._tag}set tag(R){R?.id!==this._tag?.id&&(this._tag=R,De(this,g,"f").$updateTestRunConfig(this.controllerId,this.profileId,{tag:R?n.TestTag.namespace(this.controllerId,R.id):null}))}get configureHandler(){return this._configureHandler}set configureHandler(R){R!==this._configureHandler&&(this._configureHandler=R,De(this,g,"f").$updateTestRunConfig(this.controllerId,this.profileId,{hasConfigurationHandler:!!R}))}dispose(){De(this,g,"f").$removeTestProfile(this.controllerId,this.profileId)}}e.TestRunProfileImpl=h,g=new WeakMap;const _={[f.TestRunProfileKind.Coverage]:8,[f.TestRunProfileKind.Debug]:4,[f.TestRunProfileKind.Run]:2}}),define(Ee[203],we([1,0,5,16,4,90,8,7]),function(J,e,o,k,w,B,S,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtHostEditors=void 0;class y{constructor(L,v){this._extHostDocumentsAndEditors=v,this._onDidChangeTextEditorSelection=new o.Emitter,this._onDidChangeTextEditorOptions=new o.Emitter,this._onDidChangeTextEditorVisibleRanges=new o.Emitter,this._onDidChangeTextEditorViewColumn=new o.Emitter,this._onDidChangeActiveTextEditor=new o.Emitter,this._onDidChangeVisibleTextEditors=new o.Emitter,this.onDidChangeTextEditorSelection=this._onDidChangeTextEditorSelection.event,this.onDidChangeTextEditorOptions=this._onDidChangeTextEditorOptions.event,this.onDidChangeTextEditorVisibleRanges=this._onDidChangeTextEditorVisibleRanges.event,this.onDidChangeTextEditorViewColumn=this._onDidChangeTextEditorViewColumn.event,this.onDidChangeActiveTextEditor=this._onDidChangeActiveTextEditor.event,this.onDidChangeVisibleTextEditors=this._onDidChangeVisibleTextEditors.event,this._proxy=L.getProxy(w.MainContext.MainThreadTextEditors),this._extHostDocumentsAndEditors.onDidChangeVisibleTextEditors(u=>this._onDidChangeVisibleTextEditors.fire(u)),this._extHostDocumentsAndEditors.onDidChangeActiveTextEditor(u=>this._onDidChangeActiveTextEditor.fire(u))}getActiveTextEditor(){return this._extHostDocumentsAndEditors.activeEditor()}getVisibleTextEditors(L){const v=this._extHostDocumentsAndEditors.allEditors();return L?v:v.map(u=>u.value)}async showTextDocument(L,v,u){let m;typeof v=="number"?m={position:S.ViewColumn.from(v),preserveFocus:u}:typeof v=="object"?m={position:S.ViewColumn.from(v.viewColumn),preserveFocus:v.preserveFocus,selection:typeof v.selection=="object"?S.Range.from(v.selection):void 0,pinned:typeof v.preview=="boolean"?!v.preview:void 0}:m={preserveFocus:!1};const s=await this._proxy.$tryShowTextDocument(L.uri,m),n=s&&this._extHostDocumentsAndEditors.getEditor(s);if(n)return n.value;throw s?new Error(`Could NOT open editor for "${L.uri.toString()}" because another editor opened in the meantime.`):new Error(`Could NOT open editor for "${L.uri.toString()}".`)}createTextEditorDecorationType(L,v){return new B.TextEditorDecorationType(this._proxy,L,v).value}$acceptEditorPropertiesChanged(L,v){const u=this._extHostDocumentsAndEditors.getEditor(L);if(!u)throw new Error("unknown text editor");if(v.options&&u._acceptOptions(v.options),v.selections){const m=v.selections.selections.map(S.Selection.to);u._acceptSelections(m)}if(v.visibleRanges){const m=k.coalesce(v.visibleRanges.map(S.Range.to));u._acceptVisibleRanges(m)}if(v.options&&this._onDidChangeTextEditorOptions.fire({textEditor:u.value,options:{...v.options,lineNumbers:S.TextEditorLineNumbersStyle.to(v.options.lineNumbers)}}),v.selections){const m=A.TextEditorSelectionChangeKind.fromValue(v.selections.source),s=v.selections.selections.map(S.Selection.to);this._onDidChangeTextEditorSelection.fire({textEditor:u.value,selections:s,kind:m})}if(v.visibleRanges){const m=k.coalesce(v.visibleRanges.map(S.Range.to));this._onDidChangeTextEditorVisibleRanges.fire({textEditor:u.value,visibleRanges:m})}}$acceptEditorPositionData(L){for(const v in L){const u=this._extHostDocumentsAndEditors.getEditor(v);if(!u)throw new Error("Unknown text editor");const m=S.ViewColumn.to(L[v]);u.value.viewColumn!==m&&(u._acceptViewColumn(m),this._onDidChangeTextEditorViewColumn.fire({textEditor:u.value,viewColumn:m}))}}getDiffInformation(L){return Promise.resolve(this._proxy.$getDiffInformation(L))}}e.ExtHostEditors=y}),define(Ee[204],we([1,0,2,3,4,6,7,8,11]),function(J,e,o,k,w,B,S,A,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtHostTimeline=e.IExtHostTimeline=void 0,e.IExtHostTimeline=(0,k.createDecorator)("IExtHostTimeline");class M{constructor(u,m){this._providers=new Map,this._itemsBySourceAndUriMap=new Map,this._proxy=u.getProxy(w.MainContext.MainThreadTimeline),m.registerArgumentProcessor({processArgument:s=>{if(s&&s.$mid===11){const n=s.uri===void 0?void 0:o.URI.revive(s.uri);return this._itemsBySourceAndUriMap.get(s.source)?.get(L(n))?.get(s.handle)}return s}})}async $getTimeline(u,m,s,n,f){return this._providers.get(u)?.provideTimeline(o.URI.revive(m),s,n,f)}registerTimelineProvider(u,m,s,n){const f=new B.DisposableStore,D=this.convertTimelineItem(m.id,n,f).bind(this);let T;m.onDidChange&&(T=m.onDidChange(g=>this._proxy.$emitTimelineChangeEvent({uri:void 0,reset:!0,...g,id:m.id}),this));const d=this._itemsBySourceAndUriMap;return this.registerTimelineProviderCore({...m,scheme:u,onDidChange:void 0,async provideTimeline(g,b,l,I){I?.resetCache&&(f.clear(),d.get(m.id)?.clear());const r=await m.provideTimeline(g,b,l);if(r==null)return;const i=D(g,I);return{...r,source:m.id,items:r.items.map(i)}},dispose(){for(const g of d.values())g.get(m.id)?.clear();T?.dispose(),f.dispose()}})}convertTimelineItem(u,m,s){return(n,f)=>{let D;if(f?.cacheResults){let T=this._itemsBySourceAndUriMap.get(u);T===void 0&&(T=new Map,this._itemsBySourceAndUriMap.set(u,T));const d=L(n);D=T.get(d),D===void 0&&(D=new Map,T.set(d,D))}return T=>{const{iconPath:d,...g}=T,b=`${u}|${T.id??T.timestamp}`;D?.set(b,T);let l,I,r;T.iconPath&&(d instanceof S.ThemeIcon?r={id:d.id,color:d.color}:o.URI.isUri(d)?(l=d,I=d):{light:l,dark:I}=d);let i;return S.MarkdownString.isMarkdownString(g.detail)?i=A.MarkdownString.from(g.detail):(0,y.isString)(g.detail)&&(i=g.detail),{...g,id:g.id??void 0,handle:b,source:u,command:T.command?m.toInternal(T.command,s):void 0,icon:l,iconDark:I,themeIcon:r,detail:i,accessibilityInformation:T.accessibilityInformation}}}}registerTimelineProviderCore(u){if(this._providers.get(u.id))throw new Error(`Timeline Provider ${u.id} already exists.`);return this._proxy.$registerTimelineProvider({id:u.id,label:u.label,scheme:u.scheme}),this._providers.set(u.id,u),(0,B.toDisposable)(()=>{for(const s of this._itemsBySourceAndUriMap.values())s.get(u.id)?.clear();this._providers.delete(u.id),this._proxy.$unregisterTimelineProvider(u.id),u.dispose()})}}e.ExtHostTimeline=M;function L(v){return v?.toString()}}),define(Ee[205],we([1,0,6,9,2,4]),function(J,e,o,k,w,B){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtHostUriOpeners=void 0;class S{constructor(y){this._openers=new Map,this._proxy=y.getProxy(B.MainContext.MainThreadUriOpeners)}registerExternalUriOpener(y,M,L,v){if(this._openers.has(M))throw new Error(`Opener with id '${M}' already registered`);const u=v.schemes.find(m=>!S.supportedSchemes.has(m));if(u)throw new Error(`Scheme '${u}' is not supported. Only http and https are currently supported.`);return this._openers.set(M,L),this._proxy.$registerUriOpener(M,v.schemes,y,v.label),(0,o.toDisposable)(()=>{this._openers.delete(M),this._proxy.$unregisterUriOpener(M)})}async $canOpenUri(y,M,L){const v=this._openers.get(y);if(!v)throw new Error(`Unknown opener with id: ${y}`);const u=w.URI.revive(M);return v.canOpenExternalUri(u,L)}async $openUri(y,M,L){const v=this._openers.get(y);if(!v)throw new Error(`Unknown opener id: '${y}'`);return v.openExternalUri(w.URI.revive(M.resolvedUri),{sourceUri:w.URI.revive(M.sourceUri)},L)}}e.ExtHostUriOpeners=S,S.supportedSchemes=new Set([k.Schemas.http,k.Schemas.https])}),define(Ee[206],we([1,0,4,2,6,15,25]),function(J,e,o,k,w,B,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtHostUrls=void 0;class A{constructor(M){this.handles=new Set,this.handlers=new Map,this._proxy=M.getProxy(o.MainContext.MainThreadUrls)}registerUriHandler(M,L){if(this.handles.has(S.ExtensionIdentifier.toKey(M)))throw new Error(`Protocol handler already registered for extension ${M}`);const v=A.HandlePool++;return this.handles.add(S.ExtensionIdentifier.toKey(M)),this.handlers.set(v,L),this._proxy.$registerUriHandler(v,M),(0,w.toDisposable)(()=>{this.handles.delete(S.ExtensionIdentifier.toKey(M)),this.handlers.delete(v),this._proxy.$unregisterUriHandler(v)})}$handleExternalUri(M,L){const v=this.handlers.get(M);if(!v)return Promise.resolve(void 0);try{v.handleUri(k.URI.revive(L))}catch(u){(0,B.onUnexpectedError)(u)}return Promise.resolve(void 0)}async createAppUri(M){return k.URI.revive(await this._proxy.$createAppUri(M))}}e.ExtHostUrls=A,A.HandlePool=0});var je=this&&this.__classPrivateFieldSet||function(J,e,o,k,w){if(k==="m")throw new TypeError("Private method is not writable");if(k==="a"&&!w)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?J!==e||!w:!e.has(J))throw new TypeError("Cannot write private member to an object whose class did not declare it");return k==="a"?w.call(J,o):w?w.value=o:e.set(J,o),o},De=this&&this.__classPrivateFieldGet||function(J,e,o,k){if(o==="a"&&!k)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?J!==e||!k:!e.has(J))throw new TypeError("Cannot read private member from an object whose class did not declare it");return o==="m"?k:o==="a"?k.call(J):k?k.value:e.get(J)};define(Ee[51],we([1,0,5,9,2,136,154,61,4]),function(J,e,o,k,w,B,S,A,y){"use strict";var M,L,v,u,m,s,n,f,D,T,d,g;Object.defineProperty(e,"__esModule",{value:!0}),e.reviveOptions=e.serializeWebviewOptions=e.toExtensionData=e.ExtHostWebviews=e.shouldSerializeBuffersForPostMessage=e.ExtHostWebview=void 0;class b{constructor(p,h,_,P,R,$,E){M.set(this,void 0),L.set(this,void 0),v.set(this,void 0),u.set(this,void 0),m.set(this,void 0),s.set(this,void 0),n.set(this,""),f.set(this,void 0),D.set(this,!1),T.set(this,!1),d.set(this,!1),this._onMessageEmitter=new o.Emitter,this.onDidReceiveMessage=this._onMessageEmitter.event,g.set(this,new o.Emitter),this._onDidDispose=De(this,g,"f").event,je(this,M,p,"f"),je(this,L,h,"f"),je(this,f,_,"f"),je(this,u,P,"f"),je(this,m,R,"f"),je(this,s,$,"f"),je(this,d,l($),"f"),je(this,v,E,"f")}dispose(){je(this,D,!0,"f"),De(this,g,"f").fire(),De(this,g,"f").dispose(),this._onMessageEmitter.dispose()}asWebviewUri(p){return je(this,T,!0,"f"),(0,A.asWebviewUri)(p,De(this,u,"f").remote)}get cspSource(){const p=De(this,s,"f").extensionLocation;if(p.scheme===k.Schemas.https||p.scheme===k.Schemas.http){let h=p.toString();return h.endsWith("/")||(h+="/"),h+" "+A.webviewGenericCspSource}return A.webviewGenericCspSource}get html(){return this.assertNotDisposed(),De(this,n,"f")}set html(p){this.assertNotDisposed(),De(this,n,"f")!==p&&(je(this,n,p,"f"),!De(this,T,"f")&&/(["'])vscode-resource:([^\s'"]+?)(["'])/i.test(p)&&(je(this,T,!0,"f"),De(this,v,"f").report("Webview vscode-resource: uris",De(this,s,"f"),"Please migrate to use the 'webview.asWebviewUri' api instead: https://aka.ms/vscode-webview-use-aswebviewuri")),De(this,L,"f").$setHtml(De(this,M,"f"),p))}get options(){return this.assertNotDisposed(),De(this,f,"f")}set options(p){this.assertNotDisposed(),De(this,L,"f").$setOptions(De(this,M,"f"),i(De(this,s,"f"),De(this,m,"f"),p)),je(this,f,p,"f")}async postMessage(p){if(De(this,D,"f"))return!1;const h=(0,S.serializeWebviewMessage)(p,{serializeBuffersForPostMessage:De(this,d,"f")});return De(this,L,"f").$postMessage(De(this,M,"f"),h.message,...h.buffers)}assertNotDisposed(){if(De(this,D,"f"))throw new Error("Webview is disposed")}}e.ExtHostWebview=b,M=new WeakMap,L=new WeakMap,v=new WeakMap,u=new WeakMap,m=new WeakMap,s=new WeakMap,n=new WeakMap,f=new WeakMap,D=new WeakMap,T=new WeakMap,d=new WeakMap,g=new WeakMap;function l(a){try{const p=(0,B.normalizeVersion)((0,B.parseVersion)(a.engines.vscode));return!!p&&p.majorBase>=1&&p.minorBase>=57}catch{return!1}}e.shouldSerializeBuffersForPostMessage=l;class I{constructor(p,h,_,P,R){this.initData=h,this.workspace=_,this._logService=P,this._deprecationService=R,this._webviews=new Map,this._webviewProxy=p.getProxy(y.MainContext.MainThreadWebviews)}$onMessage(p,h,_){const P=this.getWebview(p);if(P){const{message:R}=(0,S.deserializeWebviewMessage)(h,_.value);P._onMessageEmitter.fire(R)}}$onMissingCsp(p,h){this._logService.warn(`${h} created a webview without a content security policy: https://aka.ms/vscode-webview-missing-csp`)}createNewWebview(p,h,_){const P=new b(p,this._webviewProxy,c(h),this.initData,this.workspace,_,this._deprecationService);return this._webviews.set(p,P),P._onDidDispose(()=>{this._webviews.delete(p)}),P}deleteWebview(p){this._webviews.delete(p)}getWebview(p){return this._webviews.get(p)}}e.ExtHostWebviews=I;function r(a){return{id:a.identifier,location:a.extensionLocation}}e.toExtensionData=r;function i(a,p,h){return{enableCommandUris:h.enableCommandUris,enableScripts:h.enableScripts,enableForms:h.enableForms,portMapping:h.portMapping,localResourceRoots:h.localResourceRoots||t(a,p)}}e.serializeWebviewOptions=i;function c(a){return{enableCommandUris:a.enableCommandUris,enableScripts:a.enableScripts,enableForms:a.enableForms,portMapping:a.portMapping,localResourceRoots:a.localResourceRoots?.map(p=>w.URI.from(p))}}e.reviveOptions=c;function t(a,p){return[...(p?.getWorkspaceFolders()||[]).map(h=>h.uri),a.extensionLocation]}}),define(Ee[207],we([1,0,20,93,6,9,24,2,8,51,58,4,7]),function(J,e,o,k,w,B,S,A,y,M,L,v,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtHostCustomEditors=void 0;class m{constructor(l,I){this.document=l,this._storagePath=I,this._backupCounter=1,this._edits=new L.Cache("custom documents")}addEdit(l){return this._edits.add([l])}async undo(l,I){await this.getEdit(l).undo(),I||this.disposeBackup()}async redo(l,I){await this.getEdit(l).redo(),I||this.disposeBackup()}disposeEdits(l){for(const I of l)this._edits.delete(I)}getNewBackupUri(){if(!this._storagePath)throw new Error("Backup requires a valid storage path");const l=g(this.document.uri)+this._backupCounter++;return(0,S.joinPath)(this._storagePath,l)}updateBackup(l){this._backup?.delete(),this._backup=l}disposeBackup(){this._backup?.delete(),this._backup=void 0}getEdit(l){const I=this._edits.get(l,0);if(!I)throw new Error("No edit found");return I}}class s{constructor(){this._documents=new Map}get(l,I){return this._documents.get(this.key(l,I))}add(l,I,r){const i=this.key(l,I.uri);if(this._documents.has(i))throw new Error(`Document already exists for viewType:${l} resource:${I.uri}`);const c=new m(I,r);return this._documents.set(i,c),c}delete(l,I){const r=this.key(l,I.uri);this._documents.delete(r)}key(l,I){return`${l}@@@${I}`}}var n;(function(b){b[b.Text=0]="Text",b[b.Custom=1]="Custom"})(n||(n={}));class f{constructor(){this._providers=new Map}addTextProvider(l,I,r){return this.add(0,l,I,r)}addCustomProvider(l,I,r){return this.add(1,l,I,r)}get(l){return this._providers.get(l)}add(l,I,r,i){if(this._providers.has(I))throw new Error(`Provider for viewType:${I} already registered`);return this._providers.set(I,{type:l,extension:r,provider:i}),new u.Disposable(()=>this._providers.delete(I))}}class D{constructor(l,I,r,i,c){this._extHostDocuments=I,this._extensionStoragePaths=r,this._extHostWebview=i,this._extHostWebviewPanels=c,this._editorProviders=new f,this._documents=new s,this._proxy=l.getProxy(v.MainContext.MainThreadCustomEditors)}registerCustomEditorProvider(l,I,r,i){const c=new w.DisposableStore;return T(r)?(c.add(this._editorProviders.addTextProvider(I,l,r)),this._proxy.$registerTextEditorProvider((0,M.toExtensionData)(l),I,i.webviewOptions||{},{supportsMove:!!r.moveCustomTextEditor},(0,M.shouldSerializeBuffersForPostMessage)(l))):(c.add(this._editorProviders.addCustomProvider(I,l,r)),this.supportEditing(r)&&c.add(r.onDidChangeCustomDocument(t=>{const a=this.getCustomDocumentEntry(I,t.document.uri);if(d(t)){const p=a.addEdit(t);this._proxy.$onDidEdit(t.document.uri,I,p,t.label)}else this._proxy.$onContentChange(t.document.uri,I)})),this._proxy.$registerCustomEditorProvider((0,M.toExtensionData)(l),I,i.webviewOptions||{},!!i.supportsMultipleEditorsPerDocument,(0,M.shouldSerializeBuffersForPostMessage)(l))),u.Disposable.from(c,new u.Disposable(()=>{this._proxy.$unregisterEditorProvider(I)}))}async $createCustomDocument(l,I,r,i,c){const t=this._editorProviders.get(I);if(!t)throw new Error(`No provider found for '${I}'`);if(t.type!==1)throw new Error(`Invalid provide type for '${I}'`);const a=A.URI.revive(l),p=await t.provider.openCustomDocument(a,{backupId:r,untitledDocumentData:i?.buffer},c);let h;return this.supportEditing(t.provider)&&this._extensionStoragePaths&&(h=this._extensionStoragePaths.workspaceValue(t.extension)??this._extensionStoragePaths.globalValue(t.extension)),this._documents.add(I,p,h),{editable:this.supportEditing(t.provider)}}async $disposeCustomDocument(l,I){const r=this._editorProviders.get(I);if(!r)throw new Error(`No provider found for '${I}'`);if(r.type!==1)throw new Error(`Invalid provider type for '${I}'`);const i=A.URI.revive(l),{document:c}=this.getCustomDocumentEntry(I,i);this._documents.delete(I,c),c.dispose()}async $resolveWebviewEditor(l,I,r,i,c,t){const a=this._editorProviders.get(r);if(!a)throw new Error(`No provider found for '${r}'`);const p=y.ViewColumn.to(c),h=this._extHostWebview.createNewWebview(I,i.webviewOptions,a.extension),_=this._extHostWebviewPanels.createNewWebviewPanel(I,r,i.title,p,i.panelOptions,h),P=A.URI.revive(l);switch(a.type){case 1:{const{document:R}=this.getCustomDocumentEntry(r,P);return a.provider.resolveCustomEditor(R,_,t)}case 0:{const R=this._extHostDocuments.getDocument(P);return a.provider.resolveCustomTextEditor(R,_,t)}default:throw new Error("Unknown webview provider type")}}$disposeEdits(l,I,r){this.getCustomDocumentEntry(I,l).disposeEdits(r)}async $onMoveCustomEditor(l,I,r){const i=this._editorProviders.get(r);if(!i)throw new Error(`No provider found for '${r}'`);if(!i.provider.moveCustomTextEditor)throw new Error(`Provider does not implement move '${r}'`);const c=this._extHostWebviewPanels.getWebviewPanel(l);if(!c)throw new Error("No webview found");const t=A.URI.revive(I),a=this._extHostDocuments.getDocument(t);await i.provider.moveCustomTextEditor(a,c,o.CancellationToken.None)}async $undo(l,I,r,i){return this.getCustomDocumentEntry(I,l).undo(r,i)}async $redo(l,I,r,i){return this.getCustomDocumentEntry(I,l).redo(r,i)}async $revert(l,I,r){const i=this.getCustomDocumentEntry(I,l);await this.getCustomEditorProvider(I).revertCustomDocument(i.document,r),i.disposeBackup()}async $onSave(l,I,r){const i=this.getCustomDocumentEntry(I,l);await this.getCustomEditorProvider(I).saveCustomDocument(i.document,r),i.disposeBackup()}async $onSaveAs(l,I,r,i){const c=this.getCustomDocumentEntry(I,l);return this.getCustomEditorProvider(I).saveCustomDocumentAs(c.document,A.URI.revive(r),i)}async $backup(l,I,r){const i=this.getCustomDocumentEntry(I,l),t=await this.getCustomEditorProvider(I).backupCustomDocument(i.document,{destination:i.getNewBackupUri()},r);return i.updateBackup(t),t.id}getCustomDocumentEntry(l,I){const r=this._documents.get(l,A.URI.revive(I));if(!r)throw new Error("No custom document found");return r}getCustomEditorProvider(l){const r=this._editorProviders.get(l)?.provider;if(!r||!this.supportEditing(r))throw new Error("Custom document is not editable");return r}supportEditing(l){return!!l.onDidChangeCustomDocument}}e.ExtHostCustomEditors=D;function T(b){return typeof b.resolveCustomTextEditor=="function"}function d(b){return typeof b.undo=="function"&&typeof b.redo=="function"}function g(b){const l=b.scheme===B.Schemas.file||b.scheme===B.Schemas.untitled?b.fsPath:b.toString();return(0,k.hash)(l)+""}});var je=this&&this.__classPrivateFieldSet||function(J,e,o,k,w){if(k==="m")throw new TypeError("Private method is not writable");if(k==="a"&&!w)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?J!==e||!w:!e.has(J))throw new TypeError("Cannot write private member to an object whose class did not declare it");return k==="a"?w.call(J,o):w?w.value=o:e.set(J,o),o},De=this&&this.__classPrivateFieldGet||function(J,e,o,k){if(o==="a"&&!k)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?J!==e||!k:!e.has(J))throw new TypeError("Cannot read private member from an object whose class did not declare it");return o==="m"?k:o==="a"?k.call(J):k?k.value:e.get(J)};define(Ee[208],we([1,0,5,6,2,36,8,51,4,7]),function(J,e,o,k,w,B,S,A,y,M){"use strict";var L,v,u,m,s,n,f,D,T,d,g,b,l;Object.defineProperty(e,"__esModule",{value:!0}),e.ExtHostWebviewPanels=void 0;class I extends k.Disposable{constructor(t,a,p,h,_,P,R){super();L.set(this,void 0),v.set(this,void 0),u.set(this,void 0),m.set(this,void 0),s.set(this,void 0),n.set(this,void 0),f.set(this,void 0),D.set(this,void 0),T.set(this,!0),d.set(this,!0),g.set(this,!1),b.set(this,this._register(new o.Emitter)),this.onDidDispose=De(this,b,"f").event,l.set(this,this._register(new o.Emitter)),this.onDidChangeViewState=De(this,l,"f").event,je(this,L,t,"f"),je(this,v,a,"f"),je(this,u,p,"f"),je(this,s,P,"f"),je(this,D,_,"f"),je(this,n,h,"f"),je(this,m,R,"f")}dispose(){De(this,g,"f")||(je(this,g,!0,"f"),De(this,b,"f").fire(),De(this,v,"f").$disposeWebview(De(this,L,"f")),De(this,m,"f").dispose(),super.dispose())}get webview(){return this.assertNotDisposed(),De(this,m,"f")}get viewType(){return this.assertNotDisposed(),De(this,u,"f")}get title(){return this.assertNotDisposed(),De(this,n,"f")}set title(t){this.assertNotDisposed(),De(this,n,"f")!==t&&(je(this,n,t,"f"),De(this,v,"f").$setTitle(De(this,L,"f"),t))}get iconPath(){return this.assertNotDisposed(),De(this,f,"f")}set iconPath(t){this.assertNotDisposed(),De(this,f,"f")!==t&&(je(this,f,t,"f"),De(this,v,"f").$setIconPath(De(this,L,"f"),w.URI.isUri(t)?{light:t,dark:t}:t))}get options(){return De(this,s,"f")}get viewColumn(){if(this.assertNotDisposed(),!(typeof De(this,D,"f")=="number"&&De(this,D,"f")<0))return De(this,D,"f")}get active(){return this.assertNotDisposed(),De(this,d,"f")}get visible(){return this.assertNotDisposed(),De(this,T,"f")}_updateViewState(t){De(this,g,"f")||(this.active!==t.active||this.visible!==t.visible||this.viewColumn!==t.viewColumn)&&(je(this,d,t.active,"f"),je(this,T,t.visible,"f"),je(this,D,t.viewColumn,"f"),De(this,l,"f").fire({webviewPanel:this}))}reveal(t,a){this.assertNotDisposed(),De(this,v,"f").$reveal(De(this,L,"f"),{viewColumn:typeof t=="undefined"?void 0:S.ViewColumn.from(t),preserveFocus:!!a})}assertNotDisposed(){if(De(this,g,"f"))throw new Error("Webview is disposed")}}L=new WeakMap,v=new WeakMap,u=new WeakMap,m=new WeakMap,s=new WeakMap,n=new WeakMap,f=new WeakMap,D=new WeakMap,T=new WeakMap,d=new WeakMap,g=new WeakMap,b=new WeakMap,l=new WeakMap;class r{constructor(t,a,p){this.webviews=a,this.workspace=p,this._webviewPanels=new Map,this._serializers=new Map,this._proxy=t.getProxy(y.MainContext.MainThreadWebviewPanels)}static newHandle(){return(0,B.generateUuid)()}createWebviewPanel(t,a,p,h,_={}){const P=typeof h=="object"?h.viewColumn:h,R={viewColumn:S.ViewColumn.from(P),preserveFocus:typeof h=="object"&&!!h.preserveFocus},$=(0,A.shouldSerializeBuffersForPostMessage)(t),E=r.newHandle();this._proxy.$createWebviewPanel((0,A.toExtensionData)(t),E,a,{title:p,panelOptions:i(_),webviewOptions:(0,A.serializeWebviewOptions)(t,this.workspace,_),serializeBuffersForPostMessage:$},R);const z=this.webviews.createNewWebview(E,_,t);return this.createNewWebviewPanel(E,a,p,P,_,z)}$onDidChangeWebviewPanelViewStates(t){const a=Object.keys(t);a.sort((p,h)=>{const _=t[p],P=t[h];return _.active?1:P.active?-1:+_.visible-+P.visible});for(const p of a){const h=this.getWebviewPanel(p);if(!h)continue;const _=t[p];h._updateViewState({active:_.active,visible:_.visible,viewColumn:S.ViewColumn.to(_.position)})}}async $onDidDisposeWebviewPanel(t){this.getWebviewPanel(t)?.dispose(),this._webviewPanels.delete(t),this.webviews.deleteWebview(t)}registerWebviewPanelSerializer(t,a,p){if(this._serializers.has(a))throw new Error(`Serializer for '${a}' already registered`);return this._serializers.set(a,{serializer:p,extension:t}),this._proxy.$registerSerializer(a,{serializeBuffersForPostMessage:(0,A.shouldSerializeBuffersForPostMessage)(t)}),new M.Disposable(()=>{this._serializers.delete(a),this._proxy.$unregisterSerializer(a)})}async $deserializeWebviewPanel(t,a,p,h){const _=this._serializers.get(a);if(!_)throw new Error(`No serializer found for '${a}'`);const{serializer:P,extension:R}=_,$=this.webviews.createNewWebview(t,p.webviewOptions,R),E=this.createNewWebviewPanel(t,a,p.title,h,p.panelOptions,$);await P.deserializeWebviewPanel(E,p.state)}createNewWebviewPanel(t,a,p,h,_,P){const R=new I(t,this._proxy,a,p,h,_,P);return this._webviewPanels.set(t,R),R}getWebviewPanel(t){return this._webviewPanels.get(t)}}e.ExtHostWebviewPanels=r;function i(c){return{enableFindWidget:c.enableFindWidget,retainContextWhenHidden:c.retainContextWhenHidden}}});var je=this&&this.__classPrivateFieldSet||function(J,e,o,k,w){if(k==="m")throw new TypeError("Private method is not writable");if(k==="a"&&!w)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?J!==e||!w:!e.has(J))throw new TypeError("Cannot write private member to an object whose class did not declare it");return k==="a"?w.call(J,o):w?w.value=o:e.set(J,o),o},De=this&&this.__classPrivateFieldGet||function(J,e,o,k){if(o==="a"&&!k)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?J!==e||!k:!e.has(J))throw new TypeError("Cannot read private member from an object whose class did not declare it");return o==="m"?k:o==="a"?k.call(J):k?k.value:e.get(J)};define(Ee[209],we([1,0,5,6,51,4,7]),function(J,e,o,k,w,B,S){"use strict";var A,y,M,L,v,u,m,s,n,f;Object.defineProperty(e,"__esModule",{value:!0}),e.ExtHostWebviewViews=void 0;class D extends k.Disposable{constructor(g,b,l,I,r,i){super();A.set(this,void 0),y.set(this,void 0),M.set(this,void 0),L.set(this,void 0),v.set(this,!1),u.set(this,void 0),m.set(this,void 0),s.set(this,void 0),n.set(this,this._register(new o.Emitter)),this.onDidChangeVisibility=De(this,n,"f").event,f.set(this,this._register(new o.Emitter)),this.onDidDispose=De(this,f,"f").event,je(this,M,l,"f"),je(this,m,I,"f"),je(this,A,g,"f"),je(this,y,b,"f"),je(this,L,r,"f"),je(this,u,i,"f")}dispose(){De(this,v,"f")||(je(this,v,!0,"f"),De(this,f,"f").fire(),De(this,L,"f").dispose(),super.dispose())}get title(){return this.assertNotDisposed(),De(this,m,"f")}set title(g){this.assertNotDisposed(),De(this,m,"f")!==g&&(je(this,m,g,"f"),De(this,y,"f").$setWebviewViewTitle(De(this,A,"f"),g))}get description(){return this.assertNotDisposed(),De(this,s,"f")}set description(g){this.assertNotDisposed(),De(this,s,"f")!==g&&(je(this,s,g,"f"),De(this,y,"f").$setWebviewViewDescription(De(this,A,"f"),g))}get visible(){return De(this,u,"f")}get webview(){return De(this,L,"f")}get viewType(){return De(this,M,"f")}_setVisible(g){g===De(this,u,"f")||De(this,v,"f")||(je(this,u,g,"f"),De(this,n,"f").fire())}show(g){this.assertNotDisposed(),De(this,y,"f").$show(De(this,A,"f"),!!g)}assertNotDisposed(){if(De(this,v,"f"))throw new Error("Webview is disposed")}}A=new WeakMap,y=new WeakMap,M=new WeakMap,L=new WeakMap,v=new WeakMap,u=new WeakMap,m=new WeakMap,s=new WeakMap,n=new WeakMap,f=new WeakMap;class T{constructor(g,b){this._extHostWebview=b,this._viewProviders=new Map,this._webviewViews=new Map,this._proxy=g.getProxy(B.MainContext.MainThreadWebviewViews)}registerWebviewViewProvider(g,b,l,I){if(this._viewProviders.has(b))throw new Error(`View provider for '${b}' already registered`);return this._viewProviders.set(b,{provider:l,extension:g}),this._proxy.$registerWebviewViewProvider((0,w.toExtensionData)(g),b,{retainContextWhenHidden:I?.retainContextWhenHidden,serializeBuffersForPostMessage:!1}),new S.Disposable(()=>{this._viewProviders.delete(b),this._proxy.$unregisterWebviewViewProvider(b)})}async $resolveWebviewView(g,b,l,I,r){const i=this._viewProviders.get(b);if(!i)throw new Error(`No view provider found for '${b}'`);const{provider:c,extension:t}=i,a=this._extHostWebview.createNewWebview(g,{},t),p=new D(g,this._proxy,b,l,a,!0);this._webviewViews.set(g,p),await c.resolveWebviewView(p,{state:I},r)}async $onDidChangeWebviewViewVisibility(g,b){this.getWebviewView(g)._setVisible(b)}async $disposeWebviewView(g){const b=this.getWebviewView(g);this._webviewViews.delete(g),b.dispose(),this._extHostWebview.deleteWebview(g)}getWebviewView(g){const b=this._webviewViews.get(g);if(!b)throw new Error("No webview found");return b}}e.ExtHostWebviewViews=T}),define(Ee[95],we([1,0,5,4,2,9,10,3,14]),function(J,e,o,k,w,B,S,A,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IExtHostWindow=e.ExtHostWindow=void 0;let M=class ji{constructor(v){this._onDidChangeWindowState=new o.Emitter,this.onDidChangeWindowState=this._onDidChangeWindowState.event,this._state=ji.InitialState,this._proxy=v.getProxy(k.MainContext.MainThreadWindow),this._proxy.$getWindowVisibility().then(u=>this.$onDidChangeWindowFocus(u))}get state(){return this._state}$onDidChangeWindowFocus(v){v!==this._state.focused&&(this._state={...this._state,focused:v},this._onDidChangeWindowState.fire(this._state))}openUri(v,u){let m;if(typeof v=="string"){m=v;try{v=w.URI.parse(v)}catch{return Promise.reject(`Invalid uri - '${v}'`)}}return(0,S.isFalsyOrWhitespace)(v.scheme)?Promise.reject("Invalid scheme - cannot be empty"):v.scheme===B.Schemas.command?Promise.reject(`Invalid scheme '${v.scheme}'`):this._proxy.$openUri(v,m,u)}async asExternalUri(v,u){if((0,S.isFalsyOrWhitespace)(v.scheme))return Promise.reject("Invalid scheme - cannot be empty");const m=await this._proxy.$asExternalUri(v,u);return w.URI.from(m)}};M.InitialState={focused:!0},M=Fe([Ne(0,y.IExtHostRpcService)],M),e.ExtHostWindow=M,e.IExtHostWindow=(0,A.createDecorator)("IExtHostWindow")}),define(Ee[210],we([1,0,13,21,20,15,5,6,108,176,38]),function(J,e,o,k,w,B,S,A,y,M,L){"use strict";var v;Object.defineProperty(e,"__esModule",{value:!0}),e.RPCProtocol=e.ResponsiveState=e.RequestInitiator=e.parseJsonAndRestoreBufferRefs=e.stringifyJsonWithBufferRefs=void 0;function u(_,P){try{return JSON.stringify(_,P)}catch{return"null"}}const m="$$ref$$",s={[m]:-1};class n{constructor(P,R){this.jsonString=P,this.referencedBuffers=R}}function f(_,P=null,R=!1){const $=[];return{jsonString:(R?u:JSON.stringify)(_,(z,V)=>{if(typeof V=="undefined")return s;if(typeof V=="object"){if(V instanceof k.VSBuffer){const W=$.push(V)-1;return{[m]:W}}if(P)return P(z,V)}return V}),referencedBuffers:$}}e.stringifyJsonWithBufferRefs=f;function D(_,P,R){return JSON.parse(_,($,E)=>{if(E){const z=E[m];if(typeof z=="number")return P[z];if(R&&E.$mid===1)return R.transformIncoming(E)}return E})}e.parseJsonAndRestoreBufferRefs=D;function T(_,P){return JSON.stringify(_,P)}function d(_){return _?(P,R)=>R&&R.$mid===1?_.transformOutgoing(R):R:null}var g;(function(_){_[_.LocalSide=0]="LocalSide",_[_.OtherSide=1]="OtherSide"})(g=e.RequestInitiator||(e.RequestInitiator={}));var b;(function(_){_[_.Responsive=0]="Responsive",_[_.Unresponsive=1]="Unresponsive"})(b=e.ResponsiveState||(e.ResponsiveState={}));const l=()=>{},I=Symbol.for("rpcProtocol"),r=Symbol.for("rpcProxy");class i extends A.Disposable{constructor(P,R=null,$=null){super();this[v]=!0,this._onDidChangeResponsiveState=this._register(new S.Emitter),this.onDidChangeResponsiveState=this._onDidChangeResponsiveState.event,this._protocol=P,this._logger=R,this._uriTransformer=$,this._uriReplacer=d(this._uriTransformer),this._isDisposed=!1,this._locals=[],this._proxies=[];for(let E=0,z=L.ProxyIdentifier.count;E<z;E++)this._locals[E]=null,this._proxies[E]=null;this._lastMessageId=0,this._cancelInvokedHandlers=Object.create(null),this._pendingRPCReplies={},this._responsiveState=0,this._unacknowledgedCount=0,this._unresponsiveTime=0,this._asyncCheckUresponsive=this._register(new o.RunOnceScheduler(()=>this._checkUnresponsive(),1e3)),this._protocol.onMessage(E=>this._receiveOneMessage(E))}dispose(){this._isDisposed=!0,Object.keys(this._pendingRPCReplies).forEach(P=>{this._pendingRPCReplies[P].resolveErr(B.canceled())})}drain(){return typeof this._protocol.drain=="function"?this._protocol.drain():Promise.resolve()}_onWillSendRequest(P){this._unacknowledgedCount===0&&(this._unresponsiveTime=Date.now()+i.UNRESPONSIVE_TIME),this._unacknowledgedCount++,this._asyncCheckUresponsive.isScheduled()||this._asyncCheckUresponsive.schedule()}_onDidReceiveAcknowledge(P){this._unresponsiveTime=Date.now()+i.UNRESPONSIVE_TIME,this._unacknowledgedCount--,this._unacknowledgedCount===0&&this._asyncCheckUresponsive.cancel(),this._setResponsiveState(0)}_checkUnresponsive(){this._unacknowledgedCount!==0&&(Date.now()>this._unresponsiveTime?this._setResponsiveState(1):this._asyncCheckUresponsive.schedule())}_setResponsiveState(P){this._responsiveState!==P&&(this._responsiveState=P,this._onDidChangeResponsiveState.fire(this._responsiveState))}get responsiveState(){return this._responsiveState}transformIncomingURIs(P){return this._uriTransformer?(0,y.transformIncomingURIs)(P,this._uriTransformer):P}getProxy(P){const{nid:R,sid:$}=P;return this._proxies[R]||(this._proxies[R]=this._createProxy(R,$)),this._proxies[R]}_createProxy(P,R){let $={get:(E,z)=>(typeof z=="string"&&!E[z]&&z.charCodeAt(0)===36&&(E[z]=(...V)=>this._remoteCall(P,z,V)),z===r?R:E[z])};return new Proxy(Object.create(null),$)}set(P,R){return this._locals[P.nid]=R,R}assertRegistered(P){for(let R=0,$=P.length;R<$;R++){const E=P[R];if(!this._locals[E.nid])throw new Error(`Missing proxy instance ${E.sid}`)}}_receiveOneMessage(P){if(this._isDisposed)return;const R=P.byteLength,$=c.read(P,0),E=$.readUInt8(),z=$.readUInt32();switch(E){case 1:case 2:{let{rpcId:V,method:W,args:Q}=a.deserializeRequestJSONArgs($);this._uriTransformer&&(Q=(0,y.transformIncomingURIs)(Q,this._uriTransformer)),this._receiveRequest(R,z,V,W,Q,E===2);break}case 3:case 4:{let{rpcId:V,method:W,args:Q}=a.deserializeRequestMixedArgs($);this._uriTransformer&&(Q=(0,y.transformIncomingURIs)(Q,this._uriTransformer)),this._receiveRequest(R,z,V,W,Q,E===4);break}case 5:{this._logger&&this._logger.logIncoming(R,z,0,"ack"),this._onDidReceiveAcknowledge(z);break}case 6:{this._receiveCancel(R,z);break}case 7:{this._receiveReply(R,z,void 0);break}case 9:{let V=a.deserializeReplyOKJSON($);this._uriTransformer&&(V=(0,y.transformIncomingURIs)(V,this._uriTransformer)),this._receiveReply(R,z,V);break}case 10:{const V=a.deserializeReplyOKJSONWithBuffers($,this._uriTransformer);this._receiveReply(R,z,V);break}case 8:{let V=a.deserializeReplyOKVSBuffer($);this._receiveReply(R,z,V);break}case 11:{let V=a.deserializeReplyErrError($);this._uriTransformer&&(V=(0,y.transformIncomingURIs)(V,this._uriTransformer)),this._receiveReplyErr(R,z,V);break}case 12:{this._receiveReplyErr(R,z,void 0);break}default:console.error("received unexpected message"),console.error(P)}}_receiveRequest(P,R,$,E,z,V){this._logger&&this._logger.logIncoming(P,R,1,`receiveRequest ${(0,L.getStringIdentifierForProxy)($)}.${E}(`,z);const W=String(R);let Q,K;if(V){const te=new w.CancellationTokenSource;z.push(te.token),Q=this._invokeHandler($,E,z),K=()=>te.cancel()}else Q=this._invokeHandler($,E,z),K=l;this._cancelInvokedHandlers[W]=K;const H=a.serializeAcknowledged(R);this._logger&&this._logger.logOutgoing(H.byteLength,R,1,"ack"),this._protocol.send(H),Q.then(te=>{delete this._cancelInvokedHandlers[W];const ae=a.serializeReplyOK(R,te,this._uriReplacer);this._logger&&this._logger.logOutgoing(ae.byteLength,R,1,"reply:",te),this._protocol.send(ae)},te=>{delete this._cancelInvokedHandlers[W];const ae=a.serializeReplyErr(R,te);this._logger&&this._logger.logOutgoing(ae.byteLength,R,1,"replyErr:",te),this._protocol.send(ae)})}_receiveCancel(P,R){this._logger&&this._logger.logIncoming(P,R,1,"receiveCancel");const $=String(R);this._cancelInvokedHandlers[$]&&this._cancelInvokedHandlers[$]()}_receiveReply(P,R,$){this._logger&&this._logger.logIncoming(P,R,0,"receiveReply:",$);const E=String(R);if(!this._pendingRPCReplies.hasOwnProperty(E))return;const z=this._pendingRPCReplies[E];delete this._pendingRPCReplies[E],z.resolveOk($)}_receiveReplyErr(P,R,$){this._logger&&this._logger.logIncoming(P,R,0,"receiveReplyErr:",$);const E=String(R);if(!this._pendingRPCReplies.hasOwnProperty(E))return;const z=this._pendingRPCReplies[E];delete this._pendingRPCReplies[E];let V;$&&($.$isError?(V=new Error,V.name=$.name,V.message=$.message,V.stack=$.stack):V=$),z.resolveErr(V)}_invokeHandler(P,R,$){try{return Promise.resolve(this._doInvokeHandler(P,R,$))}catch(E){return Promise.reject(E)}}_doInvokeHandler(P,R,$){const E=this._locals[P];if(!E)throw new Error("Unknown actor "+(0,L.getStringIdentifierForProxy)(P));let z=E[R];if(typeof z!="function")throw new Error("Unknown method "+R+" on actor "+(0,L.getStringIdentifierForProxy)(P));return z.apply(E,$)}_remoteCall(P,R,$){if(this._isDisposed)return Promise.reject(B.canceled());let E=null;if($.length>0&&w.CancellationToken.isCancellationToken($[$.length-1])&&(E=$.pop()),E&&E.isCancellationRequested)return Promise.reject(B.canceled());const z=a.serializeRequestArguments($,this._uriReplacer),V=++this._lastMessageId,W=String(V),Q=new M.LazyPromise;E&&E.onCancellationRequested(()=>{const H=a.serializeCancel(V);this._logger&&this._logger.logOutgoing(H.byteLength,V,0,"cancel"),this._protocol.send(a.serializeCancel(V))}),this._pendingRPCReplies[W]=Q,this._onWillSendRequest(V);const K=a.serializeRequest(V,P,R,z,!!E);return this._logger&&this._logger.logOutgoing(K.byteLength,V,0,`request: ${(0,L.getStringIdentifierForProxy)(P)}.${R}(`,$),this._protocol.send(K),Q}}e.RPCProtocol=i,v=I,i.UNRESPONSIVE_TIME=3*1e3;class c{constructor(P,R){this._buff=P,this._offset=R}static alloc(P,R,$){let E=new c(k.VSBuffer.alloc($+1+4),0);return E.writeUInt8(P),E.writeUInt32(R),E}static read(P,R){return new c(P,R)}get buffer(){return this._buff}static sizeUInt8(){return 1}writeUInt8(P){this._buff.writeUInt8(P,this._offset),this._offset+=1}readUInt8(){const P=this._buff.readUInt8(this._offset);return this._offset+=1,P}writeUInt32(P){this._buff.writeUInt32BE(P,this._offset),this._offset+=4}readUInt32(){const P=this._buff.readUInt32BE(this._offset);return this._offset+=4,P}static sizeShortString(P){return 1+P.byteLength}writeShortString(P){this._buff.writeUInt8(P.byteLength,this._offset),this._offset+=1,this._buff.set(P,this._offset),this._offset+=P.byteLength}readShortString(){const P=this._buff.readUInt8(this._offset);this._offset+=1;const $=this._buff.slice(this._offset,this._offset+P).toString();return this._offset+=P,$}static sizeLongString(P){return 4+P.byteLength}writeLongString(P){this._buff.writeUInt32BE(P.byteLength,this._offset),this._offset+=4,this._buff.set(P,this._offset),this._offset+=P.byteLength}readLongString(){const P=this._buff.readUInt32BE(this._offset);this._offset+=4;const $=this._buff.slice(this._offset,this._offset+P).toString();return this._offset+=P,$}writeBuffer(P){this._buff.writeUInt32BE(P.byteLength,this._offset),this._offset+=4,this._buff.set(P,this._offset),this._offset+=P.byteLength}static sizeVSBuffer(P){return 4+P.byteLength}writeVSBuffer(P){this._buff.writeUInt32BE(P.byteLength,this._offset),this._offset+=4,this._buff.set(P,this._offset),this._offset+=P.byteLength}readVSBuffer(){const P=this._buff.readUInt32BE(this._offset);this._offset+=4;const R=this._buff.slice(this._offset,this._offset+P);return this._offset+=P,R}static sizeMixedArray(P){let R=0;R+=1;for(let $=0,E=P.length;$<E;$++){const z=P[$];switch(R+=1,z.type){case 1:R+=this.sizeLongString(z.value);break;case 2:R+=this.sizeVSBuffer(z.value);break;case 3:R+=this.sizeUInt32,R+=this.sizeLongString(z.value);for(let V=0;V<z.buffers.length;++V)R+=this.sizeVSBuffer(z.buffers[V]);break;case 4:break}}return R}writeMixedArray(P){this._buff.writeUInt8(P.length,this._offset),this._offset+=1;for(let R=0,$=P.length;R<$;R++){const E=P[R];switch(E.type){case 1:this.writeUInt8(1),this.writeLongString(E.value);break;case 2:this.writeUInt8(2),this.writeVSBuffer(E.value);break;case 3:this.writeUInt8(3),this.writeUInt32(E.buffers.length),this.writeLongString(E.value);for(let z=0;z<E.buffers.length;++z)this.writeBuffer(E.buffers[z]);break;case 4:this.writeUInt8(4);break}}}readMixedArray(){const P=this._buff.readUInt8(this._offset);this._offset+=1;let R=new Array(P);for(let $=0;$<P;$++)switch(this.readUInt8()){case 1:R[$]=this.readLongString();break;case 2:R[$]=this.readVSBuffer();break;case 3:{const z=this.readUInt32(),V=this.readLongString(),W=[];for(let Q=0;Q<z;++Q)W.push(this.readVSBuffer());R[$]=new L.SerializableObjectWithBuffers(D(V,W,null));break}case 4:R[$]=void 0;break}return R}}c.sizeUInt32=4;var t;(function(_){_[_.Simple=0]="Simple",_[_.Mixed=1]="Mixed"})(t||(t={}));class a{static _useMixedArgSerialization(P){for(let R=0,$=P.length;R<$;R++)if(P[R]instanceof k.VSBuffer||P[R]instanceof L.SerializableObjectWithBuffers||typeof P[R]=="undefined")return!0;return!1}static serializeRequestArguments(P,R){if(this._useMixedArgSerialization(P)){const $=[];for(let E=0,z=P.length;E<z;E++){const V=P[E];if(V instanceof k.VSBuffer)$[E]={type:2,value:V};else if(typeof V=="undefined")$[E]={type:4};else if(V instanceof L.SerializableObjectWithBuffers){const{jsonString:W,referencedBuffers:Q}=f(V.value,R);$[E]={type:3,value:k.VSBuffer.fromString(W),buffers:Q}}else $[E]={type:1,value:k.VSBuffer.fromString(T(V,R))}}return{type:1,args:$}}return{type:0,args:T(P,R)}}static serializeRequest(P,R,$,E,z){switch(E.type){case 0:return this._requestJSONArgs(P,R,$,E.args,z);case 1:return this._requestMixedArgs(P,R,$,E.args,z)}}static _requestJSONArgs(P,R,$,E,z){const V=k.VSBuffer.fromString($),W=k.VSBuffer.fromString(E);let Q=0;Q+=c.sizeUInt8(),Q+=c.sizeShortString(V),Q+=c.sizeLongString(W);let K=c.alloc(z?2:1,P,Q);return K.writeUInt8(R),K.writeShortString(V),K.writeLongString(W),K.buffer}static deserializeRequestJSONArgs(P){const R=P.readUInt8(),$=P.readShortString(),E=P.readLongString();return{rpcId:R,method:$,args:JSON.parse(E)}}static _requestMixedArgs(P,R,$,E,z){const V=k.VSBuffer.fromString($);let W=0;W+=c.sizeUInt8(),W+=c.sizeShortString(V),W+=c.sizeMixedArray(E);let Q=c.alloc(z?4:3,P,W);return Q.writeUInt8(R),Q.writeShortString(V),Q.writeMixedArray(E),Q.buffer}static deserializeRequestMixedArgs(P){const R=P.readUInt8(),$=P.readShortString(),E=P.readMixedArray(),z=new Array(E.length);for(let V=0,W=E.length;V<W;V++){const Q=E[V];typeof Q=="string"?z[V]=JSON.parse(Q):z[V]=Q}return{rpcId:R,method:$,args:z}}static serializeAcknowledged(P){return c.alloc(5,P,0).buffer}static serializeCancel(P){return c.alloc(6,P,0).buffer}static serializeReplyOK(P,R,$){if(typeof R=="undefined")return this._serializeReplyOKEmpty(P);if(R instanceof k.VSBuffer)return this._serializeReplyOKVSBuffer(P,R);if(R instanceof L.SerializableObjectWithBuffers){const{jsonString:E,referencedBuffers:z}=f(R.value,$,!0);return this._serializeReplyOKJSONWithBuffers(P,E,z)}else return this._serializeReplyOKJSON(P,u(R,$))}static _serializeReplyOKEmpty(P){return c.alloc(7,P,0).buffer}static _serializeReplyOKVSBuffer(P,R){let $=0;$+=c.sizeVSBuffer(R);let E=c.alloc(8,P,$);return E.writeVSBuffer(R),E.buffer}static deserializeReplyOKVSBuffer(P){return P.readVSBuffer()}static _serializeReplyOKJSON(P,R){const $=k.VSBuffer.fromString(R);let E=0;E+=c.sizeLongString($);let z=c.alloc(9,P,E);return z.writeLongString($),z.buffer}static _serializeReplyOKJSONWithBuffers(P,R,$){const E=k.VSBuffer.fromString(R);let z=0;z+=c.sizeUInt32,z+=c.sizeLongString(E);for(const W of $)z+=c.sizeVSBuffer(W);let V=c.alloc(10,P,z);V.writeUInt32($.length),V.writeLongString(E);for(const W of $)V.writeBuffer(W);return V.buffer}static deserializeReplyOKJSON(P){const R=P.readLongString();return JSON.parse(R)}static deserializeReplyOKJSONWithBuffers(P,R){const $=P.readUInt32(),E=P.readLongString(),z=[];for(let V=0;V<$;++V)z.push(P.readVSBuffer());return new L.SerializableObjectWithBuffers(D(E,z,R))}static serializeReplyErr(P,R){return R?this._serializeReplyErrEror(P,R):this._serializeReplyErrEmpty(P)}static _serializeReplyErrEror(P,R){const $=k.VSBuffer.fromString(u(B.transformErrorForSerialization(R),null));let E=0;E+=c.sizeLongString($);let z=c.alloc(11,P,E);return z.writeLongString($),z.buffer}static deserializeReplyErrError(P){const R=P.readLongString();return JSON.parse(R)}static _serializeReplyErrEmpty(P){return c.alloc(12,P,0).buffer}}var p;(function(_){_[_.RequestJSONArgs=1]="RequestJSONArgs",_[_.RequestJSONArgsWithCancellation=2]="RequestJSONArgsWithCancellation",_[_.RequestMixedArgs=3]="RequestMixedArgs",_[_.RequestMixedArgsWithCancellation=4]="RequestMixedArgsWithCancellation",_[_.Acknowledged=5]="Acknowledged",_[_.Cancel=6]="Cancel",_[_.ReplyOKEmpty=7]="ReplyOKEmpty",_[_.ReplyOKVSBuffer=8]="ReplyOKVSBuffer",_[_.ReplyOKJSON=9]="ReplyOKJSON",_[_.ReplyOKJSONWithBuffers=10]="ReplyOKJSONWithBuffers",_[_.ReplyErrError=11]="ReplyErrError",_[_.ReplyErrEmpty=12]="ReplyErrEmpty"})(p||(p={}));var h;(function(_){_[_.String=1]="String",_[_.VSBuffer=2]="VSBuffer",_[_.SerializedObjectWithBuffers=3]="SerializedObjectWithBuffers",_[_.Undefined=4]="Undefined"})(h||(h={}))}),define(Ee[211],we([1,0]),function(J,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NestedWorker=void 0;const o=function(B){const S=A=>{self.removeEventListener("message",S);const y=A.data;Object.defineProperties(self,{postMessage:{value(M,L){y.postMessage(M,L)}},onmessage:{get(){return y.onmessage},set(M){y.onmessage=M}}}),y.addEventListener("message",M=>{self.dispatchEvent(new MessageEvent("message",{data:M.data}))}),y.start(),self.Worker=class{constructor(){throw new TypeError("Nested workers from within nested worker are NOT supported.")}},importScripts(B)};self.addEventListener("message",S)}.toString();class k extends EventTarget{constructor(B,S,A){super();this.onmessage=null,this.onmessageerror=null,this.onerror=null;const y=`((${o})('${S}'))`,M=new Blob([y],{type:"application/javascript"}),L=URL.createObjectURL(M),v=new MessageChannel,u=L,m={type:"_newWorker",id:u,port:v.port2,url:L,options:A};B(m,[v.port2]),this.postMessage=v.port1.postMessage.bind(v.port1),this.terminate=()=>{const s={type:"_terminateWorker",id:u};v.port1.postMessage(s),URL.revokeObjectURL(L),v.port1.close(),v.port2.close()},Object.defineProperties(this,{onmessage:{get(){return v.port1.onmessage},set(s){v.port1.onmessage=s}},onmessageerror:{get(){return v.port1.onmessageerror},set(s){v.port1.onmessageerror=s}}}),v.port1.addEventListener("messageerror",s=>{const n=new MessageEvent("messageerror",{data:s.data});this.dispatchEvent(n)}),v.port1.addEventListener("message",s=>{const n=new MessageEvent("message",{data:s.data});this.dispatchEvent(n)}),v.port1.start()}}e.NestedWorker=k}),define(Ee[212],we([1,0,3]),function(J,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IRemoteAgentService=e.RemoteExtensionLogFileName=void 0,e.RemoteExtensionLogFileName="remoteagent",e.IRemoteAgentService=(0,o.createDecorator)("remoteAgentService")}),define(Ee[213],we([1,0,35,9,17,23,24,2,3,148,46,172,212]),function(J,e,o,k,w,B,S,A,y,M,L,v,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractPathService=e.IPathService=void 0,e.IPathService=(0,y.createDecorator)("pathService");let m=class qi{constructor(n,f,D,T){this.localUserHome=n,this.remoteAgentService=f,this.environmentService=D,this.contextService=T,this.resolveOS=(async()=>(await this.remoteAgentService.getEnvironment())?.os||B.OS)(),this.resolveUserHome=(async()=>{const d=await this.remoteAgentService.getEnvironment();return this.maybeUnresolvedUserHome=d?.userHome||n})()}hasValidBasename(n,f,D){return typeof f=="string"||typeof f=="undefined"?this.resolveOS.then(T=>this.doHasValidBasename(n,T,f)):this.doHasValidBasename(n,f,D)}doHasValidBasename(n,f,D){return n.scheme===k.Schemas.file||n.scheme===k.Schemas.vscodeRemote?(0,o.isValidBasename)(D??(0,S.basename)(n),f===1):!0}get defaultUriScheme(){return qi.findDefaultUriScheme(this.environmentService,this.contextService)}static findDefaultUriScheme(n,f){if(n.remoteAuthority)return k.Schemas.vscodeRemote;const D=(0,M.getVirtualWorkspaceScheme)(f.getWorkspace());if(D)return D;const T=f.getWorkspace().folders[0];if(T)return T.uri.scheme;const d=f.getWorkspace().configuration;return d?d.scheme:k.Schemas.file}async userHome(n){return n?.preferLocal?this.localUserHome:this.resolveUserHome}get resolvedUserHome(){return this.maybeUnresolvedUserHome}get path(){return this.resolveOS.then(n=>n===1?w.win32:w.posix)}async fileURI(n){let f="";if(await this.resolveOS===1&&(n=n.replace(/\\/g,"/")),n[0]==="/"&&n[1]==="/"){const T=n.indexOf("/",2);T===-1?(f=n.substring(2),n="/"):(f=n.substring(2,T),n=n.substring(T)||"/")}return A.URI.from({scheme:k.Schemas.file,authority:f,path:n,query:"",fragment:""})}};m=Fe([Ne(1,u.IRemoteAgentService),Ne(2,v.IWorkbenchEnvironmentService),Ne(3,L.IWorkspaceContextService)],m),e.AbstractPathService=m}),define(Ee[96],we([1,0]),function(J,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TextSearchCompleteMessageType=e.Range=e.Position=void 0;class o{constructor(S,A){this.line=S,this.character=A}isBefore(S){return!1}isBeforeOrEqual(S){return!1}isAfter(S){return!1}isAfterOrEqual(S){return!1}isEqual(S){return!1}compareTo(S){return 0}translate(S,A){return new o(0,0)}with(S){return new o(0,0)}}e.Position=o;class k{constructor(S,A,y,M){this.isEmpty=!1,this.isSingleLine=!1,this.start=new o(S,A),this.end=new o(y,M)}contains(S){return!1}isEqual(S){return!1}intersection(S){}union(S){return new k(0,0,0,0)}with(S){return new k(0,0,0,0)}}e.Range=k;var w;(function(B){B[B.Information=1]="Information",B[B.Warning=2]="Warning"})(w=e.TextSearchCompleteMessageType||(e.TextSearchCompleteMessageType={}))}),define(Ee[41],we([1,0,16,29,26,35,10,3,17,15,96,13]),function(J,e,o,k,w,B,S,A,y,M,L,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.QueryGlobTester=e.resolvePatternsForProvider=e.SerializableFileMatch=e.isFilePatternMatch=e.isSerializedFileMatch=e.isSerializedSearchSuccess=e.isSerializedSearchComplete=e.serializeSearchError=e.deserializeSearchError=e.SearchError=e.SearchErrorCode=e.pathIncludedInQuery=e.getExcludes=e.SearchSortOrder=e.OneLineRange=e.SearchRange=e.TextSearchMatch=e.FileMatch=e.SearchCompletionExitCode=e.isProgressMessage=e.isFileMatch=e.resultIsMatch=e.QueryType=e.SearchProviderType=e.ISearchService=e.SEARCH_EXCLUDE_CONFIG=e.VIEW_ID=e.PANEL_ID=e.VIEWLET_ID=e.TextSearchCompleteMessageType=void 0,Object.defineProperty(e,"TextSearchCompleteMessageType",{enumerable:!0,get:function(){return L.TextSearchCompleteMessageType}}),e.VIEWLET_ID="workbench.view.search",e.PANEL_ID="workbench.panel.search",e.VIEW_ID="workbench.view.search",e.SEARCH_EXCLUDE_CONFIG="search.exclude";const u="\u27EA ",m=" characters skipped \u27EB",s=(u.length+m.length+5)*2;e.ISearchService=(0,A.createDecorator)("searchService");var n;(function(H){H[H.file=0]="file",H[H.text=1]="text"})(n=e.SearchProviderType||(e.SearchProviderType={}));var f;(function(H){H[H.File=1]="File",H[H.Text=2]="Text"})(f=e.QueryType||(e.QueryType={}));function D(H){return!!H.preview}e.resultIsMatch=D;function T(H){return!!H.resource}e.isFileMatch=T;function d(H){return!!H.message}e.isProgressMessage=d;var g;(function(H){H[H.Normal=0]="Normal",H[H.NewSearchStarted=1]="NewSearchStarted"})(g=e.SearchCompletionExitCode||(e.SearchCompletionExitCode={}));class b{constructor(te){this.resource=te,this.results=[]}}e.FileMatch=b;class l{constructor(te,ae,ee){this.ranges=ae;const ce=Array.isArray(ae)?ae:[ae];if(ee&&ee.matchLines===1&&I(ce)){te=(0,S.getNLines)(te,ee.matchLines);let de="",Se=0,fe=0;const ne=Math.floor(ee.charsPerLine/5),me=[];for(const ke of ce){const Ae=Math.max(ke.startColumn-ne,0),Be=ke.startColumn+ee.charsPerLine;if(Ae>fe+ne+s){const Xe=u+(Ae-fe)+m;de+=Xe+te.slice(Ae,Be),Se+=Ae-(fe+Xe.length)}else de+=te.slice(fe,Be);me.push(new i(0,ke.startColumn-Se,ke.endColumn-Se)),fe=Be}this.preview={text:de,matches:Array.isArray(this.ranges)?me:me[0]}}else{const de=Array.isArray(ae)?ae[0].startLineNumber:ae.startLineNumber;this.preview={text:te,matches:(0,o.mapArrayOrNot)(ae,Se=>new r(Se.startLineNumber-de,Se.startColumn,Se.endLineNumber-de,Se.endColumn))}}}}e.TextSearchMatch=l;function I(H){const te=H[0].startLineNumber;for(const ae of H)if(ae.startLineNumber!==te||ae.endLineNumber!==te)return!1;return!0}class r{constructor(te,ae,ee,ce){this.startLineNumber=te,this.startColumn=ae,this.endLineNumber=ee,this.endColumn=ce}}e.SearchRange=r;class i extends r{constructor(te,ae,ee){super(te,ae,te,ee)}}e.OneLineRange=i;var c;(function(H){H.Default="default",H.FileNames="fileNames",H.Type="type",H.Modified="modified",H.CountDescending="countDescending",H.CountAscending="countAscending"})(c=e.SearchSortOrder||(e.SearchSortOrder={}));function t(H,te=!0){const ae=H&&H.files&&H.files.exclude,ee=te&&H&&H.search&&H.search.exclude;if(!ae&&!ee)return;if(!ae||!ee)return ae||ee;let ce=Object.create(null);return ce=w.mixin(ce,w.deepClone(ae)),ce=w.mixin(ce,w.deepClone(ee),!0),ce}e.getExcludes=t;function a(H,te){return H.excludePattern&&k.match(H.excludePattern,te)?!1:H.includePattern||H.usingSearchPaths?H.includePattern&&k.match(H.includePattern,te)?!0:H.usingSearchPaths?!!H.folderQueries&&H.folderQueries.some(ae=>{const ee=ae.folder.fsPath;if(B.isEqualOrParent(te,ee)){const ce=y.relative(ee,te);return!ae.includePattern||!!k.match(ae.includePattern,ce)}else return!1}):!1:!0}e.pathIncludedInQuery=a;var p;(function(H){H[H.unknownEncoding=1]="unknownEncoding",H[H.regexParseError=2]="regexParseError",H[H.globParseError=3]="globParseError",H[H.invalidLiteral=4]="invalidLiteral",H[H.rgProcessError=5]="rgProcessError",H[H.other=6]="other",H[H.canceled=7]="canceled"})(p=e.SearchErrorCode||(e.SearchErrorCode={}));class h extends Error{constructor(te,ae){super(te);this.code=ae}}e.SearchError=h;function _(H){const te=H.message;if((0,M.isCancellationError)(H))return new h(te,p.canceled);try{const ae=JSON.parse(te);return new h(ae.message,ae.code)}catch{return new h(te,p.other)}}e.deserializeSearchError=_;function P(H){const te={message:H.message,code:H.code};return new Error(JSON.stringify(te))}e.serializeSearchError=P;function R(H){return H.type==="error"?!0:H.type==="success"}e.isSerializedSearchComplete=R;function $(H){return H.type==="success"}e.isSerializedSearchSuccess=$;function E(H){return!!H.path}e.isSerializedFileMatch=E;function z(H,te){const ae=H.searchPath?H.searchPath:H.relativePath;return(0,S.fuzzyContains)(ae,te)}e.isFilePatternMatch=z;class V{constructor(te){this.path=te,this.results=[]}addMatch(te){this.results.push(te)}serialize(){return{path:this.path,results:this.results,numMatches:this.results.length}}}e.SerializableFileMatch=V;function W(H,te){const ae={...H||{},...te||{}};return Object.keys(ae).filter(ee=>{const ce=ae[ee];return typeof ce=="boolean"&&ce})}e.resolvePatternsForProvider=W;class Q{constructor(te,ae){this._parsedIncludeExpression=null,this._excludeExpression={...te.excludePattern||{},...ae.excludePattern||{}},this._parsedExcludeExpression=k.parse(this._excludeExpression);let ee=te.includePattern;ae.includePattern&&(ee?ee={...ee,...ae.includePattern}:ee=ae.includePattern),ee&&(this._parsedIncludeExpression=k.parse(ee))}matchesExcludesSync(te,ae,ee){return!!(this._parsedExcludeExpression&&this._parsedExcludeExpression(te,ae,ee))}includedInQuerySync(te,ae,ee){return!(this._parsedExcludeExpression&&this._parsedExcludeExpression(te,ae,ee)||this._parsedIncludeExpression&&!this._parsedIncludeExpression(te,ae,ee))}includedInQuery(te,ae,ee){const ce=this._parsedExcludeExpression(te,ae,ee),de=()=>this._parsedIncludeExpression?!!this._parsedIncludeExpression(te,ae,ee):!0;return(0,v.isThenable)(ce)?ce.then(Se=>Se?!1:de()):de()}hasSiblingExcludeClauses(){return K(this._excludeExpression)}}e.QueryGlobTester=Q;function K(H){for(const te in H)if(typeof H[te]!="boolean")return!0;return!1}}),define(Ee[31],we([1,0,16,13,20,5,22,9,102,24,10,11,2,128,3,12,140,46,30,27,14,8,7,41,4]),function(J,e,o,k,w,B,S,A,y,M,L,v,u,m,s,n,f,D,T,d,g,b,l,I,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IExtHostWorkspace=e.ExtHostWorkspace=void 0;function i(R,$,E){return new M.ExtUri(z=>p(z,E)).isEqual(R,$)}function c(R,$,E){return i(R.uri,$.uri,E)?0:(0,L.compare)(R.uri.toString(),$.uri.toString())}function t(R,$,E){return R.index!==$.index?R.index<$.index?-1:1:i(R.uri,$.uri,E)?(0,L.compare)(R.name,$.name):(0,L.compare)(R.uri.toString(),$.uri.toString())}function a(R,$,E,z){const V=R.slice(0).sort((Q,K)=>E(Q,K,z)),W=$.slice(0).sort((Q,K)=>E(Q,K,z));return(0,o.delta)(V,W,(Q,K)=>E(Q,K,z))}function p(R,$){const E=$.getCapabilities(R.scheme);return!(E&&E&1024)}class h extends D.Workspace{constructor($,E,z,V,W,Q,K){super($,z.map(H=>new D.WorkspaceFolder(H)),V,W,K);this._name=E,this._isUntitled=Q,this._workspaceFolders=[],this._structure=S.TernarySearchTree.forUris(K),z.forEach(H=>{this._workspaceFolders.push(H),this._structure.set(H.uri,H)})}static toExtHostWorkspace($,E,z,V){if(!$)return{workspace:null,added:[],removed:[]};const{id:W,name:Q,folders:K,configuration:H,transient:te,isUntitled:ae}=$,ee=[],ce=E;E?K.forEach((ne,me)=>{const ke=u.URI.revive(ne.uri),Ae=h._findFolder(z||E,ke,V);Ae?(Ae.name=ne.name,Ae.index=ne.index,ee.push(Ae)):ee.push({uri:ke,name:ne.name,index:me})}):ee.push(...K.map(({uri:ne,name:me,index:ke})=>({uri:u.URI.revive(ne),name:me,index:ke}))),ee.sort((ne,me)=>ne.index<me.index?-1:1);const de=new h(W,Q,ee,!!te,H?u.URI.revive(H):null,!!ae,ne=>p(ne,V)),{added:Se,removed:fe}=a(ce?ce.workspaceFolders:[],de.workspaceFolders,c,V);return{workspace:de,added:Se,removed:fe}}static _findFolder($,E,z){for(let V=0;V<$.folders.length;V++){const W=$.workspaceFolders[V];if(i(W.uri,E,z))return W}}get name(){return this._name}get isUntitled(){return this._isUntitled}get workspaceFolders(){return this._workspaceFolders.slice(0)}getWorkspaceFolder($,E){return E&&this._structure.get($)&&($=(0,M.dirname)($)),this._structure.findSubstr($)}resolveWorkspaceFolder($){return this._structure.get($)}}let _=class{constructor($,E,z,V){this._onDidChangeWorkspace=new B.Emitter,this.onDidChangeWorkspace=this._onDidChangeWorkspace.event,this._onDidGrantWorkspaceTrust=new B.Emitter,this.onDidGrantWorkspaceTrust=this._onDidGrantWorkspaceTrust.event,this._activeSearchCallbacks=[],this._trusted=!1,this._logService=V,this._extHostFileSystemInfo=z,this._requestIdProvider=new y.Counter,this._barrier=new k.Barrier,this._proxy=$.getProxy(r.MainContext.MainThreadWorkspace),this._messageService=$.getProxy(r.MainContext.MainThreadMessageService);const W=E.workspace;this._confirmedWorkspace=W?new h(W.id,W.name,[],!!W.transient,W.configuration?u.URI.revive(W.configuration):null,!!W.isUntitled,Q=>p(Q,z)):void 0}$initializeWorkspace($,E){this._trusted=E,this.$acceptWorkspaceData($),this._barrier.open()}waitForInitializeCall(){return this._barrier.wait()}get workspace(){return this._actualWorkspace}get name(){return this._actualWorkspace?this._actualWorkspace.name:void 0}get workspaceFile(){if(this._actualWorkspace&&this._actualWorkspace.configuration)return this._actualWorkspace.isUntitled?u.URI.from({scheme:A.Schemas.untitled,path:(0,M.basename)((0,M.dirname)(this._actualWorkspace.configuration))}):this._actualWorkspace.configuration}get _actualWorkspace(){return this._unconfirmedWorkspace||this._confirmedWorkspace}getWorkspaceFolders(){if(!!this._actualWorkspace)return this._actualWorkspace.workspaceFolders.slice(0)}async getWorkspaceFolders2(){if(await this._barrier.wait(),!!this._actualWorkspace)return this._actualWorkspace.workspaceFolders.slice(0)}updateWorkspaceFolders($,E,z,...V){const W=[];if(Array.isArray(V)&&V.forEach(ae=>{u.URI.isUri(ae.uri)&&!W.some(ee=>i(ee.uri,ae.uri,this._extHostFileSystemInfo))&&W.push({uri:ae.uri,name:ae.name||(0,M.basenameOrAuthority)(ae.uri)})}),this._unconfirmedWorkspace||[E,z].some(ae=>typeof ae!="number"||ae<0)||z===0&&W.length===0)return!1;const Q=this._actualWorkspace?this._actualWorkspace.workspaceFolders:[];if(E+z>Q.length)return!1;const K=Q.slice(0);K.splice(E,z,...W.map(ae=>({uri:ae.uri,name:ae.name||(0,M.basenameOrAuthority)(ae.uri),index:void 0})));for(let ae=0;ae<K.length;ae++){const ee=K[ae];if(K.some((ce,de)=>de!==ae&&i(ee.uri,ce.uri,this._extHostFileSystemInfo)))return!1}K.forEach((ae,ee)=>ae.index=ee);const{added:H,removed:te}=a(Q,K,t,this._extHostFileSystemInfo);if(H.length===0&&te.length===0)return!1;if(this._proxy){const ae=$.displayName||$.name;this._proxy.$updateWorkspaceFolders(ae,E,z,W).then(void 0,ee=>{this._unconfirmedWorkspace=void 0;const ce={source:{identifier:$.identifier,label:$.displayName||$.name}};this._messageService.$showMessage(f.Severity.Error,(0,m.localize)(0,null,ae,ee.toString()),ce,[])})}return this.trySetWorkspaceFolders(K),!0}getWorkspaceFolder($,E){if(!!this._actualWorkspace)return this._actualWorkspace.getWorkspaceFolder($,E)}async getWorkspaceFolder2($,E){if(await this._barrier.wait(),!!this._actualWorkspace)return this._actualWorkspace.getWorkspaceFolder($,E)}async resolveWorkspaceFolder($){if(await this._barrier.wait(),!!this._actualWorkspace)return this._actualWorkspace.resolveWorkspaceFolder($)}getPath(){if(!this._actualWorkspace)return;const{folders:$}=this._actualWorkspace;if($.length!==0)return $[0].uri.fsPath}getRelativePath($,E){let z,V="";if(typeof $=="string"?(z=u.URI.file($),V=$):typeof $!="undefined"&&(z=$,V=$.fsPath),!z)return V;const W=this.getWorkspaceFolder(z,!0);if(!W)return V;typeof E=="undefined"&&this._actualWorkspace&&(E=this._actualWorkspace.folders.length>1);let Q=(0,M.relativePath)(W.uri,z);return E&&W.name&&(Q=`${W.name}/${Q}`),Q}trySetWorkspaceFolders($){this._actualWorkspace&&(this._unconfirmedWorkspace=h.toExtHostWorkspace({id:this._actualWorkspace.id,name:this._actualWorkspace.name,configuration:this._actualWorkspace.configuration,folders:$,isUntitled:this._actualWorkspace.isUntitled},this._actualWorkspace,void 0,this._extHostFileSystemInfo).workspace||void 0)}$acceptWorkspaceData($){const{workspace:E,added:z,removed:V}=h.toExtHostWorkspace($,this._confirmedWorkspace,this._unconfirmedWorkspace,this._extHostFileSystemInfo);this._confirmedWorkspace=E||void 0,this._unconfirmedWorkspace=void 0,this._onDidChangeWorkspace.fire(Object.freeze({added:z,removed:V}))}findFiles($,E,z,V,W=w.CancellationToken.None){this._logService.trace(`extHostWorkspace#findFiles: fileSearch, extension: ${V.value}, entryPoint: findFiles`);let Q;if(E===null?Q=!1:E&&(typeof E=="string"?Q=E:Q=E.pattern),W&&W.isCancellationRequested)return Promise.resolve([]);const{includePattern:K,folder:H}=P(b.GlobPattern.from($));return this._proxy.$startFileSearch((0,v.withUndefinedAsNull)(K),(0,v.withUndefinedAsNull)(H),(0,v.withUndefinedAsNull)(Q),(0,v.withUndefinedAsNull)(z),W).then(te=>Array.isArray(te)?te.map(ae=>u.URI.revive(ae)):[])}async findTextInFiles($,E,z,V,W=w.CancellationToken.None){this._logService.trace(`extHostWorkspace#findTextInFiles: textSearch, extension: ${V.value}, entryPoint: findTextInFiles`);const Q=this._requestIdProvider.getNext(),K=typeof E.previewOptions=="undefined"?{matchLines:100,charsPerLine:1e4}:E.previewOptions,{includePattern:H,folder:te}=P(b.GlobPattern.from(E.include)),ae=typeof E.exclude=="string"?E.exclude:E.exclude?E.exclude.pattern:void 0,ee={ignoreSymlinks:typeof E.followSymlinks=="boolean"?!E.followSymlinks:void 0,disregardIgnoreFiles:typeof E.useIgnoreFiles=="boolean"?!E.useIgnoreFiles:void 0,disregardGlobalIgnoreFiles:typeof E.useGlobalIgnoreFiles=="boolean"?!E.useGlobalIgnoreFiles:void 0,disregardParentIgnoreFiles:typeof E.useParentIgnoreFiles=="boolean"?!E.useParentIgnoreFiles:void 0,disregardExcludeSettings:typeof E.useDefaultExcludes=="boolean"?!E.useDefaultExcludes:!0,fileEncoding:E.encoding,maxResults:E.maxResults,previewOptions:K,afterContext:E.afterContext,beforeContext:E.beforeContext,includePattern:H,excludePattern:ae},ce=!1;if(this._activeSearchCallbacks[Q]=de=>{if(ce)return;const Se=u.URI.revive(de.resource);de.results.forEach(fe=>{(0,I.resultIsMatch)(fe)?z({uri:Se,preview:{text:fe.preview.text,matches:(0,o.mapArrayOrNot)(fe.preview.matches,ne=>new l.Range(ne.startLineNumber,ne.startColumn,ne.endLineNumber,ne.endColumn))},ranges:(0,o.mapArrayOrNot)(fe.ranges,ne=>new l.Range(ne.startLineNumber,ne.startColumn,ne.endLineNumber,ne.endColumn))}):z({uri:Se,text:fe.text,lineNumber:fe.lineNumber})})},W.isCancellationRequested)return{};try{const de=await this._proxy.$startTextSearch($,(0,v.withUndefinedAsNull)(te),ee,Q,W);return delete this._activeSearchCallbacks[Q],de||{}}catch(de){throw delete this._activeSearchCallbacks[Q],de}}$handleTextSearchResult($,E){this._activeSearchCallbacks[E]&&this._activeSearchCallbacks[E]($)}saveAll($){return this._proxy.$saveAll($)}resolveProxy($){return this._proxy.$resolveProxy($)}get trusted(){return this._trusted}requestWorkspaceTrust($){return this._proxy.$requestWorkspaceTrust($)}$onDidGrantWorkspaceTrust(){this._trusted||(this._trusted=!0,this._onDidGrantWorkspaceTrust.fire())}};_=Fe([Ne(0,g.IExtHostRpcService),Ne(1,d.IExtHostInitDataService),Ne(2,T.IExtHostFileSystemInfo),Ne(3,n.ILogService)],_),e.ExtHostWorkspace=_,e.IExtHostWorkspace=(0,s.createDecorator)("IExtHostWorkspace");function P(R){let $,E;return R&&(typeof R=="string"?$=R:($=R.pattern,E=u.URI.revive(R.baseUri))),{includePattern:$,folder:E}}}),define(Ee[32],we([1,0,26,5,31,4,7,143,80,11,13,3,14,12,2]),function(J,e,o,k,w,B,S,A,y,M,L,v,u,m,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IExtHostConfiguration=e.ExtHostConfigProvider=e.ExtHostConfiguration=void 0;function n(I,r){if(r){const i=r.split(".");let c=I;for(let t=0;c&&t<i.length;t++)c=c[i[t]];return c}}function f(I){return I instanceof s.URI}function D(I){return I&&I.uri instanceof s.URI&&I.languageId&&typeof I.languageId=="string"}function T(I){return I&&!I.uri&&I.languageId&&typeof I.languageId=="string"}function d(I){return I&&I.uri instanceof s.URI&&(!I.name||typeof I.name=="string")&&(!I.index||typeof I.index=="number")}function g(I){if(f(I))return{resource:I};if(D(I))return{resource:I.uri,overrideIdentifier:I.languageId};if(T(I))return{overrideIdentifier:I.languageId};if(d(I))return{resource:I.uri};if(I===null)return{resource:null}}let b=class{constructor(r,i,c){this._proxy=r.getProxy(B.MainContext.MainThreadConfiguration),this._extHostWorkspace=i,this._logService=c,this._barrier=new L.Barrier,this._actual=null}getConfigProvider(){return this._barrier.wait().then(r=>this._actual)}$initializeConfiguration(r){this._actual=new l(this._proxy,this._extHostWorkspace,r,this._logService),this._barrier.open()}$acceptConfigurationChanged(r,i){this.getConfigProvider().then(c=>c.$acceptConfigurationChanged(r,i))}};b=Fe([Ne(0,u.IExtHostRpcService),Ne(1,w.IExtHostWorkspace),Ne(2,m.ILogService)],b),e.ExtHostConfiguration=b;class l{constructor(r,i,c,t){this._onDidChangeConfiguration=new k.Emitter,this._proxy=r,this._logService=t,this._extHostWorkspace=i,this._configuration=A.Configuration.parse(c),this._configurationScopes=this._toMap(c.configurationScopes)}get onDidChangeConfiguration(){return this._onDidChangeConfiguration&&this._onDidChangeConfiguration.event}$acceptConfigurationChanged(r,i){const c={data:this._configuration.toData(),workspace:this._extHostWorkspace.workspace};this._configuration=A.Configuration.parse(r),this._configurationScopes=this._toMap(r.configurationScopes),this._onDidChangeConfiguration.fire(this._toConfigurationChangeEvent(i,c))}getConfiguration(r,i,c){const t=g(i)||{},a=this._toReadonlyValue(r?n(this._configuration.getValue(void 0,t,this._extHostWorkspace.workspace),r):this._configuration.getValue(void 0,t,this._extHostWorkspace.workspace));r&&this._validateConfigurationAccess(r,t,c?.identifier);function p(_){if(_==null)return null;if(typeof _=="boolean")return _?1:4;switch(_){case S.ConfigurationTarget.Global:return 1;case S.ConfigurationTarget.Workspace:return 4;case S.ConfigurationTarget.WorkspaceFolder:return 5}}const h={has(_){return typeof n(a,_)!="undefined"},get:(_,P)=>{this._validateConfigurationAccess(r?`${r}.${_}`:_,t,c?.identifier);let R=n(a,_);if(typeof R=="undefined")R=P;else{let $;const E=(z,V)=>{let W;const Q=()=>{$=$||(0,o.deepClone)(a),W=W||n($,V)};return(0,M.isObject)(z)?new Proxy(z,{get:(K,H)=>{if(typeof H=="string"&&H.toLowerCase()==="tojson")return Q(),()=>W;if($)return W=W||n($,V),W[H];const te=K[H];return typeof H=="string"?E(te,`${V}.${H}`):te},set:(K,H,te)=>(Q(),W&&(W[H]=te),!0),deleteProperty:(K,H)=>(Q(),W&&delete W[H],!0),defineProperty:(K,H,te)=>(Q(),W&&Object.defineProperty(W,H,te),!0)}):z};R=E(R,_)}return R},update:(_,P,R,$)=>{_=r?`${r}.${_}`:_;const E=p(R);return P!==void 0?this._proxy.$updateConfigurationOption(E,_,P,t,$):this._proxy.$removeConfigurationOption(E,_,t,$)},inspect:_=>{_=r?`${r}.${_}`:_;const P=(0,o.deepClone)(this._configuration.inspect(_,t,this._extHostWorkspace.workspace));if(P)return{key:_,defaultValue:P.default?.value,globalValue:P.user?.value,workspaceValue:P.workspace?.value,workspaceFolderValue:P.workspaceFolder?.value,defaultLanguageValue:P.default?.override,globalLanguageValue:P.user?.override,workspaceLanguageValue:P.workspace?.override,workspaceFolderLanguageValue:P.workspaceFolder?.override,languageIds:P.overrideIdentifiers}}};return typeof a=="object"&&(0,o.mixin)(h,a,!1),Object.freeze(h)}_toReadonlyValue(r){const i=c=>(0,M.isObject)(c)?new Proxy(c,{get:(t,a)=>i(t[a]),set:(t,a,p)=>{throw new Error(`TypeError: Cannot assign to read only property '${String(a)}' of object`)},deleteProperty:(t,a)=>{throw new Error(`TypeError: Cannot delete read only property '${String(a)}' of object`)},defineProperty:(t,a)=>{throw new Error(`TypeError: Cannot define property '${String(a)}' for a readonly object`)},setPrototypeOf:t=>{throw new Error("TypeError: Cannot set prototype for a readonly object")},isExtensible:()=>!1,preventExtensions:()=>!0}):c;return i(r)}_validateConfigurationAccess(r,i,c){const t=y.OVERRIDE_PROPERTY_REGEX.test(r)?4:this._configurationScopes.get(r),a=c?`[${c.value}] `:"";if(t===4){typeof i?.resource=="undefined"&&this._logService.warn(`${a}Accessing a resource scoped configuration without providing a resource is not expected. To get the effective value for '${r}', provide the URI of a resource or 'null' for any resource.`);return}if(t===3){i?.resource&&this._logService.warn(`${a}Accessing a window scoped configuration for a resource is not expected. To associate '${r}' to a resource, define its scope to 'resource' in configuration contributions in 'package.json'.`);return}}_toConfigurationChangeEvent(r,i){const c=new A.ConfigurationChangeEvent(r,i,this._configuration,this._extHostWorkspace.workspace);return Object.freeze({affectsConfiguration:(t,a)=>c.affectsConfiguration(t,g(a))})}_toMap(r){return r.reduce((i,c)=>(i.set(c[0],c[1]),i),new Map)}}e.ExtHostConfigProvider=l,e.IExtHostConfiguration=(0,v.createDecorator)("IExtHostConfiguration")});var je=this&&this.__classPrivateFieldSet||function(J,e,o,k,w){if(k==="m")throw new TypeError("Private method is not writable");if(k==="a"&&!w)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?J!==e||!w:!e.has(J))throw new TypeError("Cannot write private member to an object whose class did not declare it");return k==="a"?w.call(J,o):w?w.value=o:e.set(J,o),o},De=this&&this.__classPrivateFieldGet||function(J,e,o,k){if(o==="a"&&!k)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?J!==e||!k:!e.has(J))throw new TypeError("Cannot read private member from an object whose class did not declare it");return o==="m"?k:o==="a"?k.call(J):k?k.value:e.get(J)};define(Ee[97],we([1,0,2,13,5,4,7,31,49,32,20,40,14,27,3,9,23,12,65,164,15]),function(J,e,o,k,w,B,S,A,y,M,L,v,u,m,s,n,f,D,T,d,g){"use strict";var b;Object.defineProperty(e,"__esModule",{value:!0}),e.IExtHostTask=e.WorkerExtHostTask=e.ExtHostTaskBase=e.TaskExecutionDTO=e.TaskFilterDTO=e.TaskDTO=e.TaskGroupDTO=e.TaskHandleDTO=e.CustomExecutionDTO=e.ShellExecutionDTO=e.ShellExecutionOptionsDTO=e.ProcessExecutionDTO=e.ProcessExecutionOptionsDTO=e.TaskPresentationOptionsDTO=e.TaskDefinitionDTO=void 0;var l;(function(V){function W(K){if(K!=null)return K}V.from=W;function Q(K){if(K!=null)return K}V.to=Q})(l=e.TaskDefinitionDTO||(e.TaskDefinitionDTO={}));var I;(function(V){function W(K){if(K!=null)return K}V.from=W;function Q(K){if(K!=null)return K}V.to=Q})(I=e.TaskPresentationOptionsDTO||(e.TaskPresentationOptionsDTO={}));var r;(function(V){function W(K){if(K!=null)return K}V.from=W;function Q(K){if(K!=null)return K}V.to=Q})(r=e.ProcessExecutionOptionsDTO||(e.ProcessExecutionOptionsDTO={}));var i;(function(V){function W(H){if(H){const te=H;return te&&!!te.process}else return!1}V.is=W;function Q(H){if(H==null)return;const te={process:H.process,args:H.args};return H.options&&(te.options=r.from(H.options)),te}V.from=Q;function K(H){if(H!=null)return new S.ProcessExecution(H.process,H.args,H.options)}V.to=K})(i=e.ProcessExecutionDTO||(e.ProcessExecutionDTO={}));var c;(function(V){function W(K){if(K!=null)return K}V.from=W;function Q(K){if(K!=null)return K}V.to=Q})(c=e.ShellExecutionOptionsDTO||(e.ShellExecutionOptionsDTO={}));var t;(function(V){function W(H){if(H){const te=H;return te&&(!!te.commandLine||!!te.command)}else return!1}V.is=W;function Q(H){if(H==null)return;const te={};return H.commandLine!==void 0?te.commandLine=H.commandLine:(te.command=H.command,te.args=H.args),H.options&&(te.options=c.from(H.options)),te}V.from=Q;function K(H){if(!(H==null||H.command===void 0&&H.commandLine===void 0))return H.commandLine?new S.ShellExecution(H.commandLine,H.options):new S.ShellExecution(H.command,H.args?H.args:[],H.options)}V.to=K})(t=e.ShellExecutionDTO||(e.ShellExecutionDTO={}));var a;(function(V){function W(H){if(H){let te=H;return te&&te.customExecution==="customExecution"}else return!1}V.is=W;function Q(H){return{customExecution:"customExecution"}}V.from=Q;function K(H,te){return te.get(H)}V.to=K})(a=e.CustomExecutionDTO||(e.CustomExecutionDTO={}));var p;(function(V){function W(Q,K){let H;return Q.scope!==void 0&&typeof Q.scope!="number"?H=Q.scope.uri:Q.scope!==void 0&&typeof Q.scope=="number"&&(Q.scope===S.TaskScope.Workspace&&K&&K.workspaceFile?H=K.workspaceFile:H=d.USER_TASKS_GROUP_KEY),{id:Q._id,workspaceFolder:H}}V.from=W})(p=e.TaskHandleDTO||(e.TaskHandleDTO={}));var h;(function(V){function W(Q){if(Q!=null)return{_id:Q.id,isDefault:Q.isDefault}}V.from=W})(h=e.TaskGroupDTO||(e.TaskGroupDTO={}));var _;(function(V){function W(H,te){if(H==null)return[];const ae=[];for(let ee of H){const ce=Q(ee,te);ce&&ae.push(ce)}return ae}V.fromMany=W;function Q(H,te){if(H==null)return;let ae;H.execution instanceof S.ProcessExecution?ae=i.from(H.execution):H.execution instanceof S.ShellExecution?ae=t.from(H.execution):H.execution&&H.execution instanceof S.CustomExecution&&(ae=a.from(H.execution));const ee=l.from(H.definition);let ce;return H.scope?typeof H.scope=="number"?ce=H.scope:ce=H.scope.uri:ce=S.TaskScope.Workspace,!ee||!ce?void 0:{_id:H._id,definition:ee,name:H.name,source:{extensionId:te.identifier.value,label:H.source,scope:ce},execution:ae,isBackground:H.isBackground,group:h.from(H.group),presentationOptions:I.from(H.presentationOptions),problemMatchers:H.problemMatchers,hasDefinedMatchers:H.hasDefinedMatchers,runOptions:H.runOptions?H.runOptions:{reevaluateOnRerun:!0},detail:H.detail}}V.from=Q;async function K(H,te,ae){if(H==null)return;let ee;i.is(H.execution)?ee=i.to(H.execution):t.is(H.execution)?ee=t.to(H.execution):a.is(H.execution)&&(ee=a.to(H._id,ae));const ce=l.to(H.definition);let de;if(H.source&&(H.source.scope!==void 0?typeof H.source.scope=="number"?de=H.source.scope:de=await te.resolveWorkspaceFolder(o.URI.revive(H.source.scope)):de=S.TaskScope.Workspace),!ce||!de)return;const Se=new S.Task(ce,de,H.name,H.source.label,ee,H.problemMatchers);return H.isBackground!==void 0&&(Se.isBackground=H.isBackground),H.group!==void 0&&(Se.group=S.TaskGroup.from(H.group._id),Se.group&&H.group.isDefault&&(Se.group=new S.TaskGroup(Se.group.id,Se.group.label),H.group.isDefault&&(Se.group.isDefault=H.group.isDefault))),H.presentationOptions&&(Se.presentationOptions=I.to(H.presentationOptions)),H._id&&(Se._id=H._id),H.detail&&(Se.detail=H.detail),Se}V.to=K})(_=e.TaskDTO||(e.TaskDTO={}));var P;(function(V){function W(K){return K}V.from=W;function Q(K){if(!!K)return Object.assign(Object.create(null),K)}V.to=Q})(P=e.TaskFilterDTO||(e.TaskFilterDTO={}));class R{constructor(W,Q,K){this._id=Q,this._task=K,b.set(this,void 0),je(this,b,W,"f")}get task(){return this._task}terminate(){De(this,b,"f").terminateTask(this)}fireDidStartProcess(W){}fireDidEndProcess(W){}}b=new WeakMap;var $;(function(V){function W(Q){return{id:Q._id,task:void 0}}V.from=W})($=e.TaskExecutionDTO||(e.TaskExecutionDTO={}));let E=class{constructor(W,Q,K,H,te,ae,ee,ce){this._onDidExecuteTask=new w.Emitter,this._onDidTerminateTask=new w.Emitter,this._onDidTaskProcessStarted=new w.Emitter,this._onDidTaskProcessEnded=new w.Emitter,this._proxy=W.getProxy(B.MainContext.MainThreadTask),this._workspaceProvider=K,this._editorService=H,this._configurationService=te,this._terminalService=ae,this._handleCounter=0,this._handlers=new Map,this._taskExecutions=new Map,this._taskExecutionPromises=new Map,this._providedCustomExecutions2=new Map,this._notProvidedCustomExecutions=new Set,this._activeCustomExecutions2=new Map,this._logService=ee,this._deprecationService=ce,this._proxy.$registerSupportedExecutions(!0)}registerTaskProvider(W,Q,K){if(!K)return new S.Disposable(()=>{});const H=this.nextHandle();return this._handlers.set(H,{type:Q,provider:K,extension:W}),this._proxy.$registerTaskProvider(H,Q),new S.Disposable(()=>{this._handlers.delete(H),this._proxy.$unregisterTaskProvider(H)})}registerTaskSystem(W,Q){this._proxy.$registerTaskSystem(W,Q)}fetchTasks(W){return this._proxy.$fetchTasks(P.from(W)).then(async Q=>{const K=[];for(let H of Q){const te=await _.to(H,this._workspaceProvider,this._providedCustomExecutions2);te&&K.push(te)}return K})}get taskExecutions(){const W=[];return this._taskExecutions.forEach(Q=>W.push(Q)),W}terminateTask(W){if(!(W instanceof R))throw new Error("No valid task execution provided");return this._proxy.$terminateTask(W._id)}get onDidStartTask(){return this._onDidExecuteTask.event}async $onDidStartTask(W,Q,K){const H=this._providedCustomExecutions2.get(W.id);H&&(this._activeCustomExecutions2.set(W.id,H),this._terminalService.attachPtyToTerminal(Q,await H.callback(K))),this._lastStartedTask=W.id,this._onDidExecuteTask.fire({execution:await this.getTaskExecution(W)})}get onDidEndTask(){return this._onDidTerminateTask.event}async $OnDidEndTask(W){const Q=await this.getTaskExecution(W);this._taskExecutionPromises.delete(W.id),this._taskExecutions.delete(W.id),this.customExecutionComplete(W),this._onDidTerminateTask.fire({execution:Q})}get onDidStartTaskProcess(){return this._onDidTaskProcessStarted.event}async $onDidStartTaskProcess(W){const Q=await this.getTaskExecution(W.id);this._onDidTaskProcessStarted.fire({execution:Q,processId:W.processId})}get onDidEndTaskProcess(){return this._onDidTaskProcessEnded.event}async $onDidEndTaskProcess(W){const Q=await this.getTaskExecution(W.id);this._onDidTaskProcessEnded.fire({execution:Q,exitCode:W.exitCode})}$provideTasks(W,Q){const K=this._handlers.get(W);if(!K)return Promise.reject(new Error("no handler found"));const H=[],te=(0,k.asPromise)(()=>K.provider.provideTasks(L.CancellationToken.None)).then(ae=>this.provideTasksInternal(Q,H,K,ae));return new Promise(ae=>{te.then(ee=>{Promise.all(H).then(()=>{ae(ee)})})})}async $resolveTask(W,Q){const K=this._handlers.get(W);if(!K)return Promise.reject(new Error("no handler found"));if(Q.definition.type!==K.type)throw new Error(`Unexpected: Task of type [${Q.definition.type}] cannot be resolved by provider of type [${K.type}].`);const H=await _.to(Q,this._workspaceProvider,this._providedCustomExecutions2);if(!H)throw new Error("Unexpected: Task cannot be resolved.");const te=await K.provider.resolveTask(H,L.CancellationToken.None);if(!te)return;this.checkDeprecation(te,K);const ae=_.from(te,K.extension);if(!ae)throw new Error("Unexpected: Task cannot be resolved.");if(te.definition!==H.definition)throw new Error("Unexpected: The resolved task definition must be the same object as the original task definition. The task definition cannot be changed.");return a.is(ae.execution)&&await this.addCustomExecution(ae,te,!0),await this.resolveTaskInternal(ae)}nextHandle(){return this._handleCounter++}async addCustomExecution(W,Q,K){const H=await this._proxy.$createTaskId(W);!K&&!this._providedCustomExecutions2.has(H)&&(this._notProvidedCustomExecutions.add(H),this._activeCustomExecutions2.set(H,Q.execution)),this._providedCustomExecutions2.set(H,Q.execution)}async getTaskExecution(W,Q){if(typeof W=="string"){const te=this._taskExecutionPromises.get(W);if(!te)throw new Error("Unexpected: The specified task is missing an execution");return te}let K=this._taskExecutionPromises.get(W.id);if(K)return K;const H=new Promise((te,ae)=>{function ee(ce,de,Se){Se?te(new R(ce,de.id,Se)):ae("Unexpected: Task does not exist.")}Q?ee(this,W,Q):_.to(W.task,this._workspaceProvider,this._providedCustomExecutions2).then(ce=>ee(this,W,ce))});return this._taskExecutionPromises.set(W.id,H),H.then(te=>(this._taskExecutions.set(W.id,te),te),te=>Promise.reject(te))}checkDeprecation(W,Q){W._deprecated&&this._deprecationService.report("Task.constructor",Q.extension,"Use the Task constructor that takes a `scope` instead.")}customExecutionComplete(W){this._activeCustomExecutions2.get(W.id)&&this._activeCustomExecutions2.delete(W.id),this._notProvidedCustomExecutions.has(W.id)&&this._lastStartedTask!==W.id&&(this._providedCustomExecutions2.delete(W.id),this._notProvidedCustomExecutions.delete(W.id));let K=this._notProvidedCustomExecutions.values(),H=K.next();for(;!H.done;)!this._activeCustomExecutions2.has(H.value)&&this._lastStartedTask!==H.value&&(this._providedCustomExecutions2.delete(H.value),this._notProvidedCustomExecutions.delete(H.value)),H=K.next()}};E=Fe([Ne(0,u.IExtHostRpcService),Ne(1,m.IExtHostInitDataService),Ne(2,A.IExtHostWorkspace),Ne(3,y.IExtHostDocumentsAndEditors),Ne(4,M.IExtHostConfiguration),Ne(5,v.IExtHostTerminalService),Ne(6,D.ILogService),Ne(7,T.IExtHostApiDeprecationService)],E),e.ExtHostTaskBase=E;let z=class extends E{constructor(W,Q,K,H,te,ae,ee,ce){super(W,Q,K,H,te,ae,ee,ce);this.registerTaskSystem(n.Schemas.vscodeRemote,{scheme:n.Schemas.vscodeRemote,authority:"",platform:f.PlatformToString(0)})}async executeTask(W,Q){if(!Q.execution)throw new Error("Tasks to execute must include an execution");const K=_.from(Q,W);if(K===void 0)throw new Error("Task is not valid");if(a.is(K.execution))await this.addCustomExecution(K,Q,!1);else throw new g.NotSupportedError;const H=await this.getTaskExecution(await this._proxy.$getTaskExecution(K),Q);return this._proxy.$executeTask(K).catch(te=>{throw new Error(te)}),H}provideTasksInternal(W,Q,K,H){const te=[];if(H)for(let ae of H){this.checkDeprecation(ae,K),(!ae.definition||!W[ae.definition.type])&&this._logService.warn(`The task [${ae.source}, ${ae.name}] uses an undefined task type. The task will be ignored in the future.`);const ee=_.from(ae,K.extension);ee&&a.is(ee.execution)?(te.push(ee),Q.push(this.addCustomExecution(ee,ae,!0))):this._logService.warn("Only custom execution tasks supported.")}return{tasks:te,extension:K.extension}}async resolveTaskInternal(W){if(a.is(W.execution))return W;this._logService.warn("Only custom execution tasks supported.")}async $resolveVariables(W,Q){return{process:void 0,variables:Object.create(null)}}async $jsonTasksSupported(){return!1}async $findExecutable(W,Q,K){}};z=Fe([Ne(0,u.IExtHostRpcService),Ne(1,m.IExtHostInitDataService),Ne(2,A.IExtHostWorkspace),Ne(3,y.IExtHostDocumentsAndEditors),Ne(4,M.IExtHostConfiguration),Ne(5,v.IExtHostTerminalService),Ne(6,D.ILogService),Ne(7,T.IExtHostApiDeprecationService)],z),e.WorkerExtHostTask=z,e.IExtHostTask=(0,s.createDecorator)("IExtHostTask")}),define(Ee[214],we([1,0,17,20,43,29,24,191,41]),function(J,e,o,k,w,B,S,A,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FileSearchManager=void 0;class M{constructor(u,m,s){this.config=u,this.provider=m,this.sessionToken=s,this.isLimitHit=!1,this.resultCount=0,this.isCanceled=!1,this.filePattern=u.filePattern,this.includePattern=u.includePattern&&B.parse(u.includePattern),this.maxResults=u.maxResults||void 0,this.exists=u.exists,this.activeCancellationTokens=new Set,this.globalExcludePattern=u.excludePattern&&B.parse(u.excludePattern)}cancel(){this.isCanceled=!0,this.activeCancellationTokens.forEach(u=>u.cancel()),this.activeCancellationTokens=new Set}search(u){const m=this.config.folderQueries||[];return new Promise((s,n)=>{const f=D=>{this.resultCount++,u(D)};if(this.isCanceled)return s({limitHit:this.isLimitHit});this.config.extraFileResources&&this.config.extraFileResources.forEach(D=>{const T=D.toString(),d=o.basename(T);this.globalExcludePattern&&this.globalExcludePattern(T,d)||this.matchFile(f,{base:D,basename:d})}),Promise.all(m.map(D=>this.searchInFolder(D,f))).then(D=>{s({limitHit:this.isLimitHit,stats:D[0]||void 0})},D=>{n(new Error((0,w.toErrorMessage)(D)))})})}async searchInFolder(u,m){const s=new k.CancellationTokenSource,n=this.getSearchOptionsForFolder(u),f=this.initDirectoryTree(),D=new y.QueryGlobTester(this.config,u),T=!D.hasSiblingExcludeClauses();let d;try{this.activeCancellationTokens.add(s),d=A.StopWatch.create();const g=await this.provider.provideFileSearchResults({pattern:this.config.filePattern||""},n,s.token),b=d.elapsed(),l=A.StopWatch.create();return this.isCanceled&&!this.isLimitHit||(g&&g.forEach(I=>{const r=o.posix.relative(u.folder.path,I.path);if(T){const i=o.basename(I.path);this.matchFile(m,{base:u.folder,relativePath:r,basename:i});return}this.addDirectoryEntries(f,u.folder,r,m)}),this.isCanceled&&!this.isLimitHit)?null:(this.matchDirectoryTree(f,D,m),{providerTime:b,postProcessTime:l.elapsed()})}finally{s.dispose(),this.activeCancellationTokens.delete(s)}}getSearchOptionsForFolder(u){const m=(0,y.resolvePatternsForProvider)(this.config.includePattern,u.includePattern),s=(0,y.resolvePatternsForProvider)(this.config.excludePattern,u.excludePattern);return{folder:u.folder,excludes:s,includes:m,useIgnoreFiles:!u.disregardIgnoreFiles,useGlobalIgnoreFiles:!u.disregardGlobalIgnoreFiles,useParentIgnoreFiles:!u.disregardParentIgnoreFiles,followSymlinks:!u.ignoreSymlinks,maxResults:this.config.maxResults,session:this.sessionToken}}initDirectoryTree(){const u={rootEntries:[],pathToEntries:Object.create(null)};return u.pathToEntries["."]=u.rootEntries,u}addDirectoryEntries({pathToEntries:u},m,s,n){if(s===this.filePattern){const D=o.basename(this.filePattern);this.matchFile(n,{base:m,relativePath:this.filePattern,basename:D})}function f(D){const T=o.basename(D),d=o.dirname(D);let g=u[d];g||(g=u[d]=[],f(d)),g.push({base:m,relativePath:D,basename:T})}f(s)}matchDirectoryTree({rootEntries:u,pathToEntries:m},s,n){const f=this,D=this.filePattern;function T(d){const g=B.hasSiblingFn(()=>d.map(b=>b.basename));for(let b=0,l=d.length;b<l;b++){const I=d[b],{relativePath:r,basename:i}=I;if(s.matchesExcludesSync(r,i,D!==i?g:void 0))continue;const c=m[r];if(c)T(c);else{if(r===D)continue;f.matchFile(n,I)}if(f.isLimitHit)break}}T(u)}matchFile(u,m){(!this.includePattern||m.relativePath&&this.includePattern(m.relativePath,m.basename))&&((this.exists||this.maxResults&&this.resultCount>=this.maxResults)&&(this.isLimitHit=!0,this.cancel()),this.isLimitHit||u(m))}}class L{constructor(){this.sessions=new Map}fileSearch(u,m,s,n){const f=this.getSessionTokenSource(u.cacheKey),D=new M(u,m,f&&f.token);let T=0;const d=g=>{T+=g.length,s(g.map(b=>this.rawMatchToSearchItem(b)))};return this.doSearch(D,L.BATCH_SIZE,d,n).then(g=>({limitHit:g.limitHit,stats:{fromCache:!1,type:"fileSearchProvider",resultCount:T,detailStats:g.stats}}))}clearCache(u){const m=this.getSessionTokenSource(u);m&&m.cancel()}getSessionTokenSource(u){if(!!u)return this.sessions.has(u)||this.sessions.set(u,new k.CancellationTokenSource),this.sessions.get(u)}rawMatchToSearchItem(u){return u.relativePath?{resource:S.joinPath(u.base,u.relativePath)}:{resource:u.base}}doSearch(u,m,s,n){n.onCancellationRequested(()=>{u.cancel()});const f=T=>{T&&(D.push(T),m>0&&D.length>=m&&(s(D),D=[]))};let D=[];return u.search(f).then(T=>(D.length&&s(D),T),T=>(D.length&&s(D),Promise.reject(T)))}}e.FileSearchManager=L,L.BATCH_SIZE=512}),define(Ee[215],we([1,0,16,70,29,73,22,9,17,24,10,11,2,234,134,77,12,46,87,213,41]),function(J,e,o,k,w,B,S,A,y,M,L,v,u,m,s,n,f,D,T,d,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.resolveResourcesForSearchIncludes=e.QueryBuilder=void 0;let b=class{constructor(h,_,P,R,$){this.configurationService=h,this.workspaceContextService=_,this.editorGroupsService=P,this.logService=R,this.pathService=$}text(h,_,P={}){h=this.getContentPattern(h,P);const R=this.configurationService.getValue(),$=_&&_.some(z=>!this.configurationService.getValue({resource:z}).search.useRipgrep);return{...this.commonQuery(_?.map(D.toWorkspaceFolder),P),type:2,contentPattern:h,previewOptions:P.previewOptions,maxFileSize:P.maxFileSize,usePCRE2:R.search.usePCRE2||$||!1,beforeContext:P.beforeContext,afterContext:P.afterContext,userDisabledExcludesAndIgnoreFiles:P.disregardExcludeSettings&&P.disregardIgnoreFiles}}getContentPattern(h,_){const P=this.configurationService.getValue();h.isRegExp&&(h.pattern=h.pattern.replace(/\r?\n/g,"\\n"));const R={...h,wordSeparators:P.editor.wordSeparators};return this.isCaseSensitive(h,_)&&(R.isCaseSensitive=!0),this.isMultiline(h)&&(R.isMultiline=!0),R}file(h,_={}){return{...this.commonQuery(h,_),type:1,filePattern:_.filePattern?_.filePattern.trim():_.filePattern,exists:_.exists,sortByScore:_.sortByScore,cacheKey:_.cacheKey}}handleIncludeExclude(h,_){return h?(h=Array.isArray(h)?h.map(c):c(h),_?this.parseSearchPaths(h):{pattern:I(...Array.isArray(h)?h:[h])}):{}}commonQuery(h=[],_={}){const P=this.handleIncludeExclude(_.includePattern,_.expandPatterns),R=this.handleIncludeExclude(_.excludePattern,_.expandPatterns),$=h.length>1,E=(P.searchPaths&&P.searchPaths.length?P.searchPaths.map(W=>this.getFolderQueryForSearchPath(W,_,R)):h.map(W=>this.getFolderQueryForRoot(W,_,R,$))).filter(W=>!!W),z={_reason:_._reason,folderQueries:E,usingSearchPaths:!!(P.searchPaths&&P.searchPaths.length),extraFileResources:_.extraFileResources,excludePattern:R.pattern,includePattern:P.pattern,onlyOpenEditors:_.onlyOpenEditors,maxResults:_.maxResults};if(_.onlyOpenEditors){const W=o.coalesce(o.flatten(this.editorGroupsService.groups.map(H=>H.editors.map(te=>te.resource))));this.logService.trace("QueryBuilder#commonQuery - openEditor URIs",JSON.stringify(W));const Q=W.filter(H=>(0,g.pathIncludedInQuery)(z,H.fsPath)),K=this.commonQueryFromFileList(Q);return this.logService.trace("QueryBuilder#commonQuery - openEditor Query",JSON.stringify(K)),{...z,...K}}const V=_.extraFileResources&&_.extraFileResources.filter(W=>(0,g.pathIncludedInQuery)(z,W.fsPath));return z.extraFileResources=V&&V.length?V:void 0,z}commonQueryFromFileList(h){const _=[],P=new S.ResourceMap,R={};let $=!1;return h.forEach(E=>{if(E.scheme===A.Schemas.walkThrough)return;if((0,M.isAbsolutePath)(E)){const V=this.workspaceContextService.getWorkspaceFolder(E)?.uri??E.with({path:y.dirname(E.fsPath)});let W=P.get(V);W||($=!0,W={folder:V,includePattern:{}},_.push(W),P.set(V,W));const Q=y.relative(V.fsPath,E.fsPath);(0,v.assertIsDefined)(W.includePattern)[Q.replace(/\\/g,"/")]=!0}else E.fsPath&&($=!0,R[E.fsPath]=!0)}),{folderQueries:_,includePattern:R,usingSearchPaths:!0,excludePattern:$?void 0:{"**/*":!0}}}isCaseSensitive(h,_){if(_.isSmartCase){if(h.isRegExp){if(L.containsUppercaseCharacter(h.pattern,!0))return!0}else if(L.containsUppercaseCharacter(h.pattern))return!0}return!!h.isCaseSensitive}isMultiline(h){return h.isMultiline||h.isRegExp&&(0,m.isMultilineRegexSource)(h.pattern)||h.pattern.indexOf(`
`)>=0?!0:!!h.isMultiline}parseSearchPaths(h){const _=K=>y.isAbsolute(K)||/^\.\.?([\/\\]|$)/.test(K),R=(Array.isArray(h)?h:r(h)).map(K=>{const H=this.pathService.resolvedUserHome;return H?(0,B.untildify)(K,H.scheme===A.Schemas.file?H.fsPath:H.path):K}),$=k.groupBy(R,K=>_(K)?"searchPaths":"exprSegments"),E=($.exprSegments||[]).map(K=>L.rtrim(K,"/")).map(K=>L.rtrim(K,"\\")).map(K=>(K[0]==="."&&(K="*"+K),i(K))),z={},V=this.expandSearchPathPatterns($.searchPaths||[]);V&&V.length&&(z.searchPaths=V);const W=o.flatten(E),Q=I(...W);return Q&&(z.pattern=Q),z}getExcludesForFolder(h,_){return _.disregardExcludeSettings?void 0:(0,g.getExcludes)(h,!_.disregardSearchExcludeSettings)}expandSearchPathPatterns(h){if(!h||!h.length)return[];const _=o.flatten(h.map(R=>{let{pathPortion:$,globPortion:E}=l(R);E&&(E=t(E));const z=this.expandOneSearchPath($);return o.flatten(z.map(V=>this.resolveOneSearchPathPattern(V,E)))})),P=new Map;return _.forEach(R=>{const $=R.searchPath.toString(),E=P.get($);E?R.pattern&&(E.pattern=E.pattern||{},E.pattern[R.pattern]=!0):P.set($,{searchPath:R.searchPath,pattern:R.pattern?I(R.pattern):void 0})}),Array.from(P.values())}expandOneSearchPath(h){if(y.isAbsolute(h)){const _=this.workspaceContextService.getWorkspace().folders;return _[0]&&_[0].uri.scheme!==A.Schemas.file?[{searchPath:_[0].uri.with({path:h})}]:[{searchPath:u.URI.file(y.normalize(h))}]}if(this.workspaceContextService.getWorkbenchState()===2){const _=this.workspaceContextService.getWorkspace().folders[0].uri;if(h=c(h),h.startsWith("../")||h===".."){const R=y.posix.resolve(_.path,h);return[{searchPath:_.with({path:R})}]}const P=t(h);return[{searchPath:_,pattern:P}]}else{if(h==="./"||h===".\\")return[];{const _=h.replace(/^\.[\/\\]/,""),R=this.workspaceContextService.getWorkspace().folders.map($=>{const E=_.match(new RegExp(`^${L.escapeRegExpCharacters($.name)}(?:/(.*)|$)`));return E?{match:E,folder:$}:null}).filter(v.isDefined);if(R.length)return R.map($=>{const E=$.match[1];return{searchPath:$.folder.uri,pattern:E&&t(E)}});{const $=h.match(/\.[\/\\](.+)[\/\\]?/),E=$?$[1]:h,z=s.localize(0,null,E);throw new Error(z)}}}}resolveOneSearchPathPattern(h,_){const P=h.pattern&&_?`${h.pattern}/${_}`:h.pattern||_,R=[{searchPath:h.searchPath,pattern:P}];return P&&!P.endsWith("**")&&R.push({searchPath:h.searchPath,pattern:P+"/**"}),R}getFolderQueryForSearchPath(h,_,P){const R=this.getFolderQueryForRoot((0,D.toWorkspaceFolder)(h.searchPath),_,P,!1);return R?{...R,includePattern:h.pattern}:null}getFolderQueryForRoot(h,_,P,R){let $;const E=u.URI.isUri(h)?h:h.uri;if(P.searchPaths){const K=P.searchPaths.filter(H=>(0,M.isEqual)(H.searchPath,E))[0];if(K&&!K.pattern)return null;K&&($=K.pattern)}const z=this.configurationService.getValue({resource:E}),W={...this.getExcludesForFolder(z,_)||{},...$||{}},Q=u.URI.isUri(h)?(0,M.basename)(h):h.name;return{folder:E,folderName:R?Q:void 0,excludePattern:Object.keys(W).length>0?W:void 0,fileEncoding:z.files&&z.files.encoding,disregardIgnoreFiles:typeof _.disregardIgnoreFiles=="boolean"?_.disregardIgnoreFiles:!z.search.useIgnoreFiles,disregardGlobalIgnoreFiles:typeof _.disregardGlobalIgnoreFiles=="boolean"?_.disregardGlobalIgnoreFiles:!z.search.useGlobalIgnoreFiles,disregardParentIgnoreFiles:typeof _.disregardParentIgnoreFiles=="boolean"?_.disregardParentIgnoreFiles:!z.search.useParentIgnoreFiles,ignoreSymlinks:typeof _.ignoreSymlinks=="boolean"?_.ignoreSymlinks:!z.search.followSymlinks}}};b=Fe([Ne(0,n.IConfigurationService),Ne(1,D.IWorkspaceContextService),Ne(2,T.IEditorGroupsService),Ne(3,f.ILogService),Ne(4,d.IPathService)],b),e.QueryBuilder=b;function l(p){const h=p.match(/[\*\{\}\(\)\[\]\?]/);if(h){const _=h.index,P=p.substr(0,_).match(/[/|\\][^/\\]*$/);if(P){let R=p.substr(0,P.index);return R.match(/[/\\]/)||(R+="/"),{pathPortion:R,globPortion:p.substr((P.index||0)+1)}}}return{pathPortion:p}}function I(...p){return p.length?p.reduce((h,_)=>(h[_]=!0,h),Object.create(null)):void 0}function r(p){return w.splitGlobAware(p,",").map(h=>h.trim()).filter(h=>!!h.length)}function i(p){return[`**/${p}/**`,`**/${p}`].map(_=>_.replace(/\*\*\/\*\*/g,"**"))}function c(p){return p.replace(/\\/g,"/")}function t(p){return c(p).replace(/^\.\//,"").replace(/\/+$/g,"")}function a(p,h){p=o.distinct(p,R=>R.toString());const _=[],P=h.getWorkspace();return p&&p.forEach(R=>{let $;if(h.getWorkbenchState()===2)$=(0,M.relativePath)(P.folders[0].uri,R),$&&$!=="."&&($="./"+$);else{const E=h.getWorkspaceFolder(R);if(E){const z=E.name;if(P.folders.filter(W=>W.name===z).length===1){const W=(0,M.relativePath)(E.uri,R);W===""?$=`./${E.name}`:$=`./${E.name}/${W}`}else $=R.fsPath}}$&&_.push($)}),_}e.resolveResourcesForSearchIncludes=a}),define(Ee[216],we([1,0,24,2,20,15,3,215,41,46]),function(J,e,o,k,w,B,S,A,y,M){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.checkGlobFileExists=e.checkActivateWorkspaceContainsExtension=void 0;const L=7e3;function v(n,f){const D=f.activationEvents;if(!D)return Promise.resolve(void 0);const T=[],d=[];for(const i of D)if(/^workspaceContains:/.test(i)){const c=i.substr("workspaceContains:".length);c.indexOf("*")>=0||c.indexOf("?")>=0||n.forceUsingSearch?d.push(c):T.push(c)}if(T.length===0&&d.length===0)return Promise.resolve(void 0);let g;const b=new Promise((i,c)=>{g=i}),l=i=>g({activationEvent:i}),I=Promise.all(T.map(i=>u(n,i,l))).then(()=>{}),r=m(n,f.identifier,d,l);return Promise.all([I,r]).then(()=>{g(void 0)}),b}e.checkActivateWorkspaceContainsExtension=v;async function u(n,f,D){for(const T of n.folders)if(await n.exists(o.joinPath(k.URI.revive(T),f))){D(`workspaceContains:${f}`);return}}async function m(n,f,D,T){if(D.length===0)return Promise.resolve(void 0);const d=new w.CancellationTokenSource,g=n.checkExists(n.folders,D,d.token),b=setTimeout(async()=>{d.cancel(),n.logService.info(`Not activating extension '${f.value}': Timed out while searching for 'workspaceContains' pattern ${D.join(",")}`)},L);let l=!1;try{l=await g}catch(I){B.isCancellationError(I)||B.onUnexpectedError(I)}d.dispose(),clearTimeout(b),l&&T(`workspaceContains:${D.join(",")}`)}function s(n,f,D,T){const d=n.get(S.IInstantiationService),g=n.get(y.ISearchService),l=d.createInstance(A.QueryBuilder).file(f.map(I=>(0,M.toWorkspaceFolder)(k.URI.revive(I))),{_reason:"checkExists",includePattern:D,exists:!0});return g.fileSearch(l,T).then(I=>!!I.limitHit,I=>B.isCancellationError(I)?!1:Promise.reject(I))}e.checkGlobFileExists=s});var je=this&&this.__classPrivateFieldSet||function(J,e,o,k,w){if(k==="m")throw new TypeError("Private method is not writable");if(k==="a"&&!w)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?J!==e||!w:!e.has(J))throw new TypeError("Cannot write private member to an object whose class did not declare it");return k==="a"?w.call(J,o):w?w.value=o:e.set(J,o),o},De=this&&this.__classPrivateFieldGet||function(J,e,o,k){if(o==="a"&&!k)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?J!==e||!k:!e.has(J))throw new TypeError("Cannot read private member from an object whose class did not declare it");return o==="m"?k:o==="a"?k.call(J):k?k.value:e.get(J)};define(Ee[33],we([1,0,123,17,69,24,13,6,22,2,12,4,32,174,67,31,28,173,15,25,21,149,7,81,3,27,68,14,56,59,40,5,216,64,151,9]),function(J,e,o,k,w,B,S,A,y,M,L,v,u,m,s,n,f,D,T,d,g,b,l,I,r,i,c,t,a,p,h,_,P,R,$,E){"use strict";var z,V,W;Object.defineProperty(e,"__esModule",{value:!0}),e.Extension=e.IExtHostExtensionService=e.AbstractExtHostExtensionService=e.IHostUtils=void 0,e.IHostUtils=(0,r.createDecorator)("IHostUtils");let Q=class Ki extends A.Disposable{constructor(ee,ce,de,Se,fe,ne,me,ke,Ae,Be){super();this._onDidChangeRemoteConnectionData=this._register(new _.Emitter),this.onDidChangeRemoteConnectionData=this._onDidChangeRemoteConnectionData.event,this._hostUtils=ce,this._extHostContext=de,this._initData=me,this._extHostWorkspace=Se,this._extHostConfiguration=fe,this._logService=ne,this._extHostTunnelService=Ae,this._extHostTerminalService=Be,this._mainThreadWorkspaceProxy=this._extHostContext.getProxy(v.MainContext.MainThreadWorkspace),this._mainThreadTelemetryProxy=this._extHostContext.getProxy(v.MainContext.MainThreadTelemetry),this._mainThreadExtensionsProxy=this._extHostContext.getProxy(v.MainContext.MainThreadExtensionService),this._almostReadyToRunExtensions=new S.Barrier,this._readyToStartExtensionHost=new S.Barrier,this._readyToRunExtensions=new S.Barrier,this._eagerExtensionsActivated=new S.Barrier,this._registry=new D.ExtensionDescriptionRegistry(this._initData.extensions),this._storage=new s.ExtHostStorage(this._extHostContext),this._secretState=new R.ExtHostSecretState(this._extHostContext),this._storagePath=ke,this._instaService=ee.createChild(new a.ServiceCollection([s.IExtHostStorage,this._storage],[R.IExtHostSecretState,this._secretState]));const Xe=new Set;this._initData.hostExtensions.forEach(ge=>Xe.add(d.ExtensionIdentifier.toKey(ge))),this._activator=this._register(new m.ExtensionsActivator(this._registry,this._initData.resolvedExtensions,this._initData.hostExtensions,{onExtensionActivationError:(ge,ue,N)=>{this._mainThreadExtensionsProxy.$onExtensionActivationError(ge,T.transformErrorForSerialization(ue),N)},actualActivateExtension:async(ge,ue)=>{if(Xe.has(d.ExtensionIdentifier.toKey(ge)))return await this._mainThreadExtensionsProxy.$activateExtension(ge,ue),new m.HostExtension;const N=this._registry.getExtensionDescription(ge);return this._activateExtension(N,ue)}},this._logService)),this._extensionPathIndex=null,this._resolvers=Object.create(null),this._started=!1,this._remoteConnectionData=this._initData.remote.connectionData}getRemoteConnectionData(){return this._remoteConnectionData}async initialize(){try{await this._beforeAlmostReadyToRunExtensions(),this._almostReadyToRunExtensions.open(),await this._extHostWorkspace.waitForInitializeCall(),w.mark("code/extHost/ready"),this._readyToStartExtensionHost.open(),this._initData.autoStart&&this._startExtensionHost()}catch(ee){T.onUnexpectedError(ee)}}async deactivateAll(){this._storagePath.onWillDeactivateAll();let ee=[];try{ee=this._registry.getAllExtensionDescriptions().map(fe=>fe.identifier).filter(fe=>this.isActivated(fe)).map(fe=>this._deactivate(fe))}catch{}await Promise.all(ee)}isActivated(ee){return this._readyToRunExtensions.isOpen()?this._activator.isActivated(ee):!1}_activateByEvent(ee,ce){return this._activator.activateByEvent(ee,ce)}_activateById(ee,ce){return this._activator.activateById(ee,ce)}activateByIdWithErrors(ee,ce){return this._activateById(ee,ce).then(()=>{const de=this._activator.getActivatedExtension(ee);if(de.activationFailed)return Promise.reject(de.activationFailedError)})}getExtensionRegistry(){return this._readyToRunExtensions.wait().then(ee=>this._registry)}getExtensionExports(ee){return this._readyToRunExtensions.isOpen()?this._activator.getActivatedExtension(ee).exports:null}async _realPathExtensionUri(ee){if(ee.scheme!==E.Schemas.file)return ee;const ce=await this._hostUtils.realpath(ee.fsPath);return M.URI.file(ce)}async getExtensionPathIndex(){return this._extensionPathIndex||(this._extensionPathIndex=(async()=>{const ee=y.TernarySearchTree.forUris(ce=>B.extUriBiasedIgnorePathCase.ignorePathCasing(ce));for(const ce of this._registry.getAllExtensionDescriptions())if(this._getEntryPoint(ce)){const de=await this._realPathExtensionUri(ce.extensionLocation);ee.set(de,ce)}return ee})()),this._extensionPathIndex}_deactivate(ee){let ce=Promise.resolve(void 0);if(!this._readyToRunExtensions.isOpen()||!this._activator.isActivated(ee))return ce;const de=this._activator.getActivatedExtension(ee);if(!de)return ce;try{typeof de.module.deactivate=="function"&&(ce=Promise.resolve(de.module.deactivate()).then(void 0,Se=>(this._logService.error(Se),Promise.resolve(void 0))))}catch(Se){this._logService.error(`An error occurred when deactivating the extension '${ee.value}':`),this._logService.error(Se)}try{(0,A.dispose)(de.subscriptions)}catch(Se){this._logService.error(`An error occurred when deactivating the subscriptions for extension '${ee.value}':`),this._logService.error(Se)}return ce}async _activateExtension(ee,ce){return this._initData.remote.isRemote?this._mainThreadExtensionsProxy.$onWillActivateExtension(ee.identifier):await this._mainThreadExtensionsProxy.$onWillActivateExtension(ee.identifier),this._doActivateExtension(ee,ce).then(de=>{const Se=de.activationTimes;return this._mainThreadExtensionsProxy.$onDidActivateExtension(ee.identifier,Se.codeLoadingTime,Se.activateCallTime,Se.activateResolvedTime,ce),this._logExtensionActivationTimes(ee,ce,"success",Se),de},de=>{throw this._logExtensionActivationTimes(ee,ce,"failure"),de})}_logExtensionActivationTimes(ee,ce,de,Se){const fe=K(ee,ce);this._mainThreadTelemetryProxy.$publicLog2("extensionActivationTimes",{...fe,...Se||{},outcome:de})}_doActivateExtension(ee,ce){const de=K(ee,ce);this._mainThreadTelemetryProxy.$publicLog2("activatePlugin",de);const Se=this._getEntryPoint(ee);if(!Se)return Promise.resolve(new m.EmptyExtension(m.ExtensionActivationTimes.NONE));this._logService.info(`ExtensionService#_doActivateExtension ${ee.identifier.value}, startup: ${ce.startup}, activationEvent: '${ce.activationEvent}'${ee.identifier.value!==ce.extensionId.value?`, root cause: ${ce.extensionId.value}`:""}`),this._logService.flush();const fe=new m.ExtensionActivationTimesBuilder(ce.startup);return Promise.all([this._loadCommonJSModule(ee.identifier,(0,B.joinPath)(ee.extensionLocation,Se),fe),this._loadExtensionContext(ee)]).then(ne=>(w.mark(`code/extHost/willActivateExtension/${ee.identifier.value}`),Ki._callActivate(this._logService,ee.identifier,ne[0],ne[1],fe))).then(ne=>(w.mark(`code/extHost/didActivateExtension/${ee.identifier.value}`),ne))}_loadExtensionContext(ee){const ce=new b.ExtensionGlobalMemento(ee,this._storage),de=new b.ExtensionMemento(ee.identifier.value,!1,this._storage),Se=new $.ExtensionSecrets(ee,this._secretState),fe=ee.isUnderDevelopment?this._initData.environment.extensionTestsLocationURI?l.ExtensionMode.Test:l.ExtensionMode.Development:l.ExtensionMode.Production,ne=this._initData.remote.isRemote?l.ExtensionKind.Workspace:l.ExtensionKind.UI;return this._logService.trace(`ExtensionService#loadExtensionContext ${ee.identifier.value}`),Promise.all([ce.whenReady,de.whenReady,this._storagePath.whenReady]).then(()=>{const me=this;let ke,Ae;const Be=(0,f.isProposedApiEnabled)(ee,"ipc")?this._initData.messagePorts?.get(d.ExtensionIdentifier.toKey(ee.identifier)):void 0;return Object.freeze({globalState:ce,workspaceState:de,secrets:Se,subscriptions:[],get extensionUri(){return ee.extensionLocation},get extensionPath(){return ee.extensionLocation.fsPath},asAbsolutePath(Xe){return k.join(ee.extensionLocation.fsPath,Xe)},get storagePath(){return me._storagePath.workspaceValue(ee)?.fsPath},get globalStoragePath(){return me._storagePath.globalValue(ee).fsPath},get logPath(){return k.join(me._initData.logsLocation.fsPath,ee.identifier.value)},get logUri(){return M.URI.joinPath(me._initData.logsLocation,ee.identifier.value)},get storageUri(){return me._storagePath.workspaceValue(ee)},get globalStorageUri(){return me._storagePath.globalValue(ee)},get extensionMode(){return fe},get extension(){return ke===void 0&&(ke=new H(me,ee.identifier,ee,ne)),ke},get extensionRuntime(){return(0,f.checkProposedApiEnabled)(ee,"extensionRuntime"),me.extensionRuntime},get environmentVariableCollection(){return me._extHostTerminalService.getEnvironmentVariableCollection(ee)},get messagePassingProtocol(){if(!Ae){if(!Be)return;const Xe=_.Event.buffer(_.Event.fromDOMEventEmitter(Be,"message",ge=>ge.data));Be.start(),Ae={onDidReceiveMessage:Xe,postMessage:Be.postMessage.bind(Be)}}return Ae}})})}static _callActivate(ee,ce,de,Se,fe){return de=de||{activate:void 0,deactivate:void 0},this._callActivateOptional(ee,ce,de,Se,fe).then(ne=>new m.ActivatedExtension(!1,null,fe.build(),de,ne,Se.subscriptions))}static _callActivateOptional(ee,ce,de,Se,fe){if(typeof de.activate=="function")try{fe.activateCallStart(),ee.trace(`ExtensionService#_callActivateOptional ${ce.value}`);const ne=typeof global=="object"?global:self,me=de.activate.apply(ne,[Se]);return fe.activateCallStop(),fe.activateResolveStart(),Promise.resolve(me).then(ke=>(fe.activateResolveStop(),ke))}catch(ne){return Promise.reject(ne)}else return Promise.resolve(de)}_activateOneStartupFinished(ee,ce){this._activateById(ee.identifier,{startup:!1,extensionId:ee.identifier,activationEvent:ce}).then(void 0,de=>{this._logService.error(de)})}_activateAllStartupFinished(){this._mainThreadExtensionsProxy.$setPerformanceMarks(w.getMarks());for(const ee of this._registry.getAllExtensionDescriptions())if(ee.activationEvents)for(const ce of ee.activationEvents)ce==="onStartupFinished"&&this._activateOneStartupFinished(ee,ce)}_handleEagerExtensions(){const ee=this._activateByEvent("*",!0).then(void 0,fe=>{this._logService.error(fe)});this._register(this._extHostWorkspace.onDidChangeWorkspace(fe=>this._handleWorkspaceContainsEagerExtensions(fe.added)));const ce=this._extHostWorkspace.workspace?this._extHostWorkspace.workspace.folders:[],de=this._handleWorkspaceContainsEagerExtensions(ce),Se=Promise.all([ee,de]).then(()=>{});return Promise.race([Se,(0,S.timeout)(1e4)]).then(()=>{this._activateAllStartupFinished()}),Se}_handleWorkspaceContainsEagerExtensions(ee){return ee.length===0?Promise.resolve(void 0):Promise.all(this._registry.getAllExtensionDescriptions().map(ce=>this._handleWorkspaceContainsEagerExtension(ee,ce))).then(()=>{})}async _handleWorkspaceContainsEagerExtension(ee,ce){if(this.isActivated(ce.identifier))return;const de=!this._initData.remote.isRemote&&!!this._initData.remote.authority,Se={logService:this._logService,folders:ee.map(ne=>ne.uri),forceUsingSearch:de,exists:ne=>this._hostUtils.exists(ne.fsPath),checkExists:(ne,me,ke)=>this._mainThreadWorkspaceProxy.$checkExists(ne,me,ke)},fe=await(0,P.checkActivateWorkspaceContainsExtension)(Se,ce);if(!!fe)return this._activateById(ce.identifier,{startup:!0,extensionId:ce.identifier,activationEvent:fe.activationEvent}).then(void 0,ne=>this._logService.error(ne))}async $extensionTestsExecute(){await this._eagerExtensionsActivated.wait();try{return await this._doHandleExtensionTests()}catch(ee){throw console.error(ee),ee}}async _doHandleExtensionTests(){const{extensionDevelopmentLocationURI:ee,extensionTestsLocationURI:ce}=this._initData.environment;if(!ee||!ce)throw new Error(o.localize(0,null));const de=await this._loadCommonJSModule(null,ce,new m.ExtensionActivationTimesBuilder(!1));if(!de||typeof de.run!="function")throw new Error(o.localize(1,null,ce.toString()));return new Promise((Se,fe)=>{const ne=(Ae,Be)=>{Ae?fe(Ae):Se(typeof Be=="number"&&Be>0?1:0)},me=(0,B.originalFSPath)(ce),ke=de.run(me,ne);ke&&ke.then&&ke.then(()=>{Se(0)}).catch(Ae=>{fe(Ae instanceof Error&&Ae.stack?Ae.stack:String(Ae))})})}async $extensionTestsExit(ee){this._logService.info(`Extension host terminating: test runner requested exit with code ${ee}`),this._hostUtils.pid&&this._logService.info(`Extension host with pid ${this._hostUtils.pid} exiting with code ${ee}`),this._logService.flush(),this._hostUtils.exit(ee)}_startExtensionHost(){if(this._started)throw new Error("Extension host is already started!");return this._started=!0,this._readyToStartExtensionHost.wait().then(()=>this._readyToRunExtensions.open()).then(()=>this._handleEagerExtensions()).then(()=>{this._eagerExtensionsActivated.open(),this._logService.info("Eager extensions activated")})}registerRemoteAuthorityResolver(ee,ce){return this._resolvers[ee]=ce,(0,A.toDisposable)(()=>{delete this._resolvers[ee]})}async _activateAndGetResolver(ee){const ce=ee.indexOf("+");if(ce===-1)throw new Error("Not an authority that can be resolved!");const de=ee.substr(0,ce);return await this._almostReadyToRunExtensions.wait(),await this._activateByEvent(`onResolveRemoteAuthority:${de}`,!1),{authorityPrefix:de,resolver:this._resolvers[de]}}async $resolveAuthority(ee,ce){this._logService.info(`$resolveAuthority invoked for authority (${te(ee)})`);const{authorityPrefix:de,resolver:Se}=await this._activateAndGetResolver(ee);if(!Se)return{type:"error",error:{code:I.RemoteAuthorityResolverErrorCode.NoResolverFound,message:`No remote extension installed to resolve ${de}.`,detail:void 0}};try{this._register(await this._extHostTunnelService.setTunnelFactory(Se)),w.mark(`code/extHost/willResolveAuthority/${de}`);const fe=await Se.resolve(ee,{resolveAttempt:ce});w.mark(`code/extHost/didResolveAuthorityOK/${de}`);const ne={authority:ee,host:fe.host,port:fe.port,connectionToken:fe.connectionToken},me={extensionHostEnv:fe.extensionHostEnv,isTrusted:fe.isTrusted,authenticationSession:fe.authenticationSessionForInitializingExtensions?{id:fe.authenticationSessionForInitializingExtensions.id,providerId:fe.authenticationSessionForInitializingExtensions.providerId}:void 0};return{type:"ok",value:{authority:ne,options:me,tunnelInformation:{environmentTunnels:fe.environmentTunnels,features:fe.tunnelFeatures}}}}catch(fe){if(w.mark(`code/extHost/didResolveAuthorityError/${de}`),fe instanceof l.RemoteAuthorityResolverError)return{type:"error",error:{code:fe._code,message:fe._message,detail:fe._detail}};throw fe}}async $getCanonicalURI(ee,ce){this._logService.info(`$getCanonicalURI invoked for authority (${te(ee)})`);const{authorityPrefix:de,resolver:Se}=await this._activateAndGetResolver(ee);if(!Se)throw new Error(`Cannot get canonical URI because no remote extension is installed to resolve ${de}`);const fe=M.URI.revive(ce);if(typeof Se.getCanonicalURI=="undefined")return fe;const ne=await(0,S.asPromise)(()=>Se.getCanonicalURI(fe));return ne||fe}$startExtensionHost(ee){return this._registry.keepOnly(ee),this._startExtensionHost()}$activateByEvent(ee,ce){return ce===1?this._activateByEvent(ee,!1):this._readyToRunExtensions.wait().then(de=>this._activateByEvent(ee,!1))}async $activate(ee,ce){return await this._readyToRunExtensions.wait(),this._registry.getExtensionDescription(ee)?(await this._activateById(ee,ce),!0):!1}async $deltaExtensions(ee,ce){ee.forEach(Se=>Se.extensionLocation=M.URI.revive(Se.extensionLocation));const de=await this.getExtensionPathIndex();return await Promise.all(ce.map(async Se=>{const fe=this._registry.getExtensionDescription(Se);fe&&de.delete(await this._realPathExtensionUri(fe.extensionLocation))})),await Promise.all(ee.map(async Se=>{const fe=await this._realPathExtensionUri(Se.extensionLocation);de.set(fe,Se)})),this._registry.deltaExtensions(ee,ce),Promise.resolve(void 0)}async $test_latency(ee){return ee}async $test_up(ee){return ee.byteLength}async $test_down(ee){let ce=g.VSBuffer.alloc(ee),de=Math.random()%256;for(let Se=0;Se<ee;Se++)ce.writeUInt8(de,Se);return ce}async $updateRemoteConnectionData(ee){this._remoteConnectionData=ee,this._onDidChangeRemoteConnectionData.fire()}};Q=Fe([Ne(0,r.IInstantiationService),Ne(1,e.IHostUtils),Ne(2,t.IExtHostRpcService),Ne(3,n.IExtHostWorkspace),Ne(4,u.IExtHostConfiguration),Ne(5,L.ILogService),Ne(6,i.IExtHostInitDataService),Ne(7,c.IExtensionStoragePaths),Ne(8,p.IExtHostTunnelService),Ne(9,h.IExtHostTerminalService)],Q),e.AbstractExtHostExtensionService=Q;function K(ae,ee){return{id:ae.identifier.value,name:ae.name,extensionVersion:ae.version,publisherDisplayName:ae.publisher,activationEvents:ae.activationEvents?ae.activationEvents.join(","):null,isBuiltin:ae.isBuiltin,reason:ee.activationEvent,reasonId:ee.extensionId.value}}e.IExtHostExtensionService=(0,r.createDecorator)("IExtHostExtensionService");class H{constructor(ee,ce,de,Se){z.set(this,void 0),V.set(this,void 0),W.set(this,void 0),je(this,z,ee,"f"),je(this,V,ce,"f"),je(this,W,de.identifier,"f"),this.id=de.identifier.value,this.extensionUri=de.extensionLocation,this.extensionPath=k.normalize((0,B.originalFSPath)(de.extensionLocation)),this.packageJSON=de,this.extensionKind=Se}get isActive(){return De(this,z,"f").isActivated(De(this,W,"f"))}get exports(){if(this.packageJSON.api!=="none")return De(this,z,"f").getExtensionExports(De(this,W,"f"))}activate(){return De(this,z,"f").activateByIdWithErrors(De(this,W,"f"),{startup:!1,extensionId:De(this,V,"f"),activationEvent:"api"}).then(()=>this.exports)}}e.Extension=H,z=new WeakMap,V=new WeakMap,W=new WeakMap;function te(ae){const ee=ae.indexOf("+");return ee===-1?ae:ae.substring(0,ee)}}),define(Ee[98],we([1,0,17,2,5,13,4,7,158,31,33,49,166,32,160,14,3,11,86,66]),function(J,e,o,k,w,B,S,A,y,M,L,v,u,m,s,n,f,D,T,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WorkerExtHostDebugService=e.ExtHostVariableResolverService=e.ExtHostDebugConsole=e.ExtHostDebugSession=e.ExtHostDebugServiceBase=e.IExtHostDebugService=void 0,e.IExtHostDebugService=(0,f.createDecorator)("IExtHostDebugService");let g=class{constructor(a,p,h,_,P,R){this._workspaceService=p,this._extensionService=h,this._editorsService=_,this._configurationService=P,this._editorTabs=R,this._debugSessions=new Map,this._configProviderHandleCounter=0,this._configProviders=[],this._adapterFactoryHandleCounter=0,this._adapterFactories=[],this._trackerFactoryHandleCounter=0,this._trackerFactories=[],this._debugAdapters=new Map,this._debugAdaptersTrackers=new Map,this._onDidStartDebugSession=new w.Emitter,this._onDidTerminateDebugSession=new w.Emitter,this._onDidChangeActiveDebugSession=new w.Emitter,this._onDidReceiveDebugSessionCustomEvent=new w.Emitter,this._debugServiceProxy=a.getProxy(S.MainContext.MainThreadDebugService),this._onDidChangeBreakpoints=new w.Emitter({onFirstListenerAdd:()=>{this.startBreakpoints()}}),this._activeDebugConsole=new l(this._debugServiceProxy),this._breakpoints=new Map,this._breakpointEventsActive=!1,this._extensionService.getExtensionRegistry().then($=>{$.onDidChange(E=>{this.registerAllDebugTypes($)}),this.registerAllDebugTypes($)})}get onDidStartDebugSession(){return this._onDidStartDebugSession.event}get onDidTerminateDebugSession(){return this._onDidTerminateDebugSession.event}get onDidChangeActiveDebugSession(){return this._onDidChangeActiveDebugSession.event}get activeDebugSession(){return this._activeDebugSession}get onDidReceiveDebugSessionCustomEvent(){return this._onDidReceiveDebugSessionCustomEvent.event}get activeDebugConsole(){return this._activeDebugConsole.value}asDebugSourceUri(a,p){const h=a;if(typeof h.sourceReference=="number"&&h.sourceReference>0){let _=`debug:${encodeURIComponent(h.path||"")}`,P="?";return p&&(_+=`${P}session=${encodeURIComponent(p.id)}`,P="&"),_+=`${P}ref=${h.sourceReference}`,k.URI.parse(_)}else{if(h.path)return k.URI.file(h.path);throw new Error("cannot create uri from DAP 'source' object; properties 'path' and 'sourceReference' are both missing.")}}registerAllDebugTypes(a){const p=[];for(const h of a.getAllExtensionDescriptions())if(h.contributes){const _=h.contributes.debuggers;if(_&&_.length>0)for(const P of _)(0,s.isDebuggerMainContribution)(P)&&p.push(P.type)}this._debugServiceProxy.$registerDebugTypes(p)}get onDidChangeBreakpoints(){return this._onDidChangeBreakpoints.event}get breakpoints(){this.startBreakpoints();const a=[];return this._breakpoints.forEach(p=>a.push(p)),a}addBreakpoints(a){this.startBreakpoints();const p=a.filter(P=>{const R=P.id;return this._breakpoints.has(R)?!1:(this._breakpoints.set(R,P),!0)});this.fireBreakpointChanges(p,[],[]);const h=[],_=new Map;for(const P of p)if(P instanceof A.SourceBreakpoint){let R=_.get(P.location.uri.toString());R||(R={type:"sourceMulti",uri:P.location.uri,lines:[]},_.set(P.location.uri.toString(),R),h.push(R)),R.lines.push({id:P.id,enabled:P.enabled,condition:P.condition,hitCondition:P.hitCondition,logMessage:P.logMessage,line:P.location.range.start.line,character:P.location.range.start.character})}else P instanceof A.FunctionBreakpoint&&h.push({type:"function",id:P.id,enabled:P.enabled,hitCondition:P.hitCondition,logMessage:P.logMessage,condition:P.condition,functionName:P.functionName});return this._debugServiceProxy.$registerBreakpoints(h)}removeBreakpoints(a){this.startBreakpoints();const p=a.filter(R=>this._breakpoints.delete(R.id));this.fireBreakpointChanges([],p,[]);const h=p.filter(R=>R instanceof A.SourceBreakpoint).map(R=>R.id),_=p.filter(R=>R instanceof A.FunctionBreakpoint).map(R=>R.id),P=p.filter(R=>R instanceof A.DataBreakpoint).map(R=>R.id);return this._debugServiceProxy.$unregisterBreakpoints(h,_,P)}startDebugging(a,p,h){return this._debugServiceProxy.$startDebugging(a?a.uri:void 0,p,{parentSessionID:h.parentSession?h.parentSession.id:void 0,lifecycleManagedByParent:h.lifecycleManagedByParent,repl:h.consoleMode===A.DebugConsoleMode.MergeWithParent?"mergeWithParent":"separate",noDebug:h.noDebug,compact:h.compact,debugUI:h.debugUI,suppressSaveBeforeStart:h.suppressSaveBeforeStart})}stopDebugging(a){return this._debugServiceProxy.$stopDebugging(a?a.id:void 0)}registerDebugConfigurationProvider(a,p,h){if(!p)return new A.Disposable(()=>{});const _=this._configProviderHandleCounter++;return this._configProviders.push({type:a,handle:_,provider:p}),this._debugServiceProxy.$registerDebugConfigurationProvider(a,h,!!p.provideDebugConfigurations,!!p.resolveDebugConfiguration,!!p.resolveDebugConfigurationWithSubstitutedVariables,_),new A.Disposable(()=>{this._configProviders=this._configProviders.filter(P=>P.provider!==p),this._debugServiceProxy.$unregisterDebugConfigurationProvider(_)})}registerDebugAdapterDescriptorFactory(a,p,h){if(!h)return new A.Disposable(()=>{});if(!this.definesDebugType(a,p))throw new Error(`a DebugAdapterDescriptorFactory can only be registered from the extension that defines the '${p}' debugger.`);if(this.getAdapterDescriptorFactoryByType(p))throw new Error("a DebugAdapterDescriptorFactory can only be registered once per a type.");const _=this._adapterFactoryHandleCounter++;return this._adapterFactories.push({type:p,handle:_,factory:h}),this._debugServiceProxy.$registerDebugAdapterDescriptorFactory(p,_),new A.Disposable(()=>{this._adapterFactories=this._adapterFactories.filter(P=>P.factory!==h),this._debugServiceProxy.$unregisterDebugAdapterDescriptorFactory(_)})}registerDebugAdapterTrackerFactory(a,p){if(!p)return new A.Disposable(()=>{});const h=this._trackerFactoryHandleCounter++;return this._trackerFactories.push({type:a,handle:h,factory:p}),new A.Disposable(()=>{this._trackerFactories=this._trackerFactories.filter(_=>_.factory!==p)})}async $runInTerminal(a,p){return Promise.resolve(void 0)}async $substituteVariables(a,p){if(!this._variableResolver){const[P,R]=await Promise.all([this._workspaceService.getWorkspaceFolders2(),this._configurationService.getConfigProvider()]);this._variableResolver=this.createVariableResolver(P||[],this._editorsService,R)}let h;const _=await this.getFolder(a);return _&&(h={uri:_.uri,name:_.name,index:_.index,toResource:()=>{throw new Error("Not implemented")}}),this._variableResolver.resolveAnyAsync(h,p)}createDebugAdapter(a,p){if(a.type==="implementation")return new i(a.implementation)}createSignService(){}async $startDASession(a,p){const h=this,_=await this.getSession(p);return this.getAdapterDescriptor(this.getAdapterDescriptorFactoryByType(_.type),_).then(P=>{if(!P)throw new Error(`Couldn't find a debug adapter descriptor for debug type '${_.type}' (extension might have failed to activate)`);const R=this.convertToDto(P),$=this.createDebugAdapter(R,_);if(!$)throw new Error(`Couldn't create a debug adapter for type '${_.type}'.`);const E=$;return this._debugAdapters.set(a,E),this.getDebugAdapterTrackers(_).then(z=>(z&&this._debugAdaptersTrackers.set(a,z),E.onMessage(async V=>{if(V.type==="request"&&V.command==="handshake"){const W=V,Q={type:"response",seq:0,command:W.command,request_seq:W.seq,success:!0};this._signService||(this._signService=this.createSignService());try{if(this._signService){const K=await this._signService.sign(W.arguments.value);Q.body={signature:K},E.sendResponse(Q)}else throw new Error("no signer")}catch(K){Q.success=!1,Q.message=K.message,E.sendResponse(Q)}}else z&&z.onDidSendMessage&&z.onDidSendMessage(V),V=(0,s.convertToVSCPaths)(V,!0),h._debugServiceProxy.$acceptDAMessage(a,V)}),E.onError(V=>{z&&z.onError&&z.onError(V),this._debugServiceProxy.$acceptDAError(a,V.name,V.message,V.stack)}),E.onExit(V=>{z&&z.onExit&&z.onExit((0,D.withNullAsUndefined)(V),void 0),this._debugServiceProxy.$acceptDAExit(a,(0,D.withNullAsUndefined)(V),void 0)}),z&&z.onWillStartSession&&z.onWillStartSession(),E.startSession()))})}$sendDAMessage(a,p){p=(0,s.convertToDAPaths)(p,!1);const h=this._debugAdaptersTrackers.get(a);h&&h.onWillReceiveMessage&&h.onWillReceiveMessage(p);const _=this._debugAdapters.get(a);_&&_.sendMessage(p)}$stopDASession(a){const p=this._debugAdaptersTrackers.get(a);this._debugAdaptersTrackers.delete(a),p&&p.onWillStopSession&&p.onWillStopSession();const h=this._debugAdapters.get(a);return this._debugAdapters.delete(a),h?h.stopSession():Promise.resolve(void 0)}$acceptBreakpointsDelta(a){const p=[],h=[],_=[];if(a.added)for(const P of a.added){const R=P.id;if(R&&!this._breakpoints.has(R)){let $;if(P.type==="function")$=new A.FunctionBreakpoint(P.functionName,P.enabled,P.condition,P.hitCondition,P.logMessage);else if(P.type==="data")$=new A.DataBreakpoint(P.label,P.dataId,P.canPersist,P.enabled,P.hitCondition,P.condition,P.logMessage);else{const E=k.URI.revive(P.uri);$=new A.SourceBreakpoint(new A.Location(E,new A.Position(P.line,P.character)),P.enabled,P.condition,P.hitCondition,P.logMessage)}$._id=R,this._breakpoints.set(R,$),p.push($)}}if(a.removed)for(const P of a.removed){const R=this._breakpoints.get(P);R&&(this._breakpoints.delete(P),h.push(R))}if(a.changed){for(const P of a.changed)if(P.id){const R=this._breakpoints.get(P.id);if(R){if(R instanceof A.FunctionBreakpoint&&P.type==="function"){const $=R;$.enabled=P.enabled,$.condition=P.condition,$.hitCondition=P.hitCondition,$.logMessage=P.logMessage,$.functionName=P.functionName}else if(R instanceof A.SourceBreakpoint&&P.type==="source"){const $=R;$.enabled=P.enabled,$.condition=P.condition,$.hitCondition=P.hitCondition,$.logMessage=P.logMessage,$.location=new A.Location(k.URI.revive(P.uri),new A.Position(P.line,P.character))}_.push(R)}}}this.fireBreakpointChanges(p,h,_)}$provideDebugConfigurations(a,p,h){return(0,B.asPromise)(async()=>{const _=this.getConfigProviderByHandle(a);if(!_)throw new Error("no DebugConfigurationProvider found");if(!_.provideDebugConfigurations)throw new Error("DebugConfigurationProvider has no method provideDebugConfigurations");const P=await this.getFolder(p);return _.provideDebugConfigurations(P,h)}).then(_=>{if(!_)throw new Error("nothing returned from DebugConfigurationProvider.provideDebugConfigurations");return _})}$resolveDebugConfiguration(a,p,h,_){return(0,B.asPromise)(async()=>{const P=this.getConfigProviderByHandle(a);if(!P)throw new Error("no DebugConfigurationProvider found");if(!P.resolveDebugConfiguration)throw new Error("DebugConfigurationProvider has no method resolveDebugConfiguration");const R=await this.getFolder(p);return P.resolveDebugConfiguration(R,h,_)})}$resolveDebugConfigurationWithSubstitutedVariables(a,p,h,_){return(0,B.asPromise)(async()=>{const P=this.getConfigProviderByHandle(a);if(!P)throw new Error("no DebugConfigurationProvider found");if(!P.resolveDebugConfigurationWithSubstitutedVariables)throw new Error("DebugConfigurationProvider has no method resolveDebugConfigurationWithSubstitutedVariables");const R=await this.getFolder(p);return P.resolveDebugConfigurationWithSubstitutedVariables(R,h,_)})}async $provideDebugAdapter(a,p){const h=this.getAdapterDescriptorFactoryByHandle(a);if(!h)return Promise.reject(new Error("no adapter descriptor factory found for handle"));const _=await this.getSession(p);return this.getAdapterDescriptor(h,_).then(P=>{if(!P)throw new Error(`Couldn't find a debug adapter descriptor for debug type '${_.type}'`);return this.convertToDto(P)})}async $acceptDebugSessionStarted(a){const p=await this.getSession(a);this._onDidStartDebugSession.fire(p)}async $acceptDebugSessionTerminated(a){const p=await this.getSession(a);p&&(this._onDidTerminateDebugSession.fire(p),this._debugSessions.delete(p.id))}async $acceptDebugSessionActiveChanged(a){this._activeDebugSession=a?await this.getSession(a):void 0,this._onDidChangeActiveDebugSession.fire(this._activeDebugSession)}async $acceptDebugSessionNameChanged(a,p){const h=await this.getSession(a);h&&h._acceptNameChanged(p)}async $acceptDebugSessionCustomEvent(a,p){const _={session:await this.getSession(a),event:p.event,body:p.body};this._onDidReceiveDebugSessionCustomEvent.fire(_)}convertToDto(a){if(a instanceof A.DebugAdapterExecutable)return{type:"executable",command:a.command,args:a.args,options:a.options};if(a instanceof A.DebugAdapterServer)return{type:"server",port:a.port,host:a.host};if(a instanceof A.DebugAdapterNamedPipeServer)return{type:"pipeServer",path:a.path};if(a instanceof A.DebugAdapterInlineImplementation)return{type:"implementation",implementation:a.implementation};throw new Error("convertToDto unexpected type")}getAdapterDescriptorFactoryByType(a){const p=this._adapterFactories.filter(h=>h.type===a);if(p.length>0)return p[0].factory}getAdapterDescriptorFactoryByHandle(a){const p=this._adapterFactories.filter(h=>h.handle===a);if(p.length>0)return p[0].factory}getConfigProviderByHandle(a){const p=this._configProviders.filter(h=>h.handle===a);if(p.length>0)return p[0].provider}definesDebugType(a,p){if(a.contributes){const h=a.contributes.debuggers;if(h&&h.length>0){for(const _ of h)if(_.label&&_.type&&_.type===p)return!0}}return!1}getDebugAdapterTrackers(a){const h=a.configuration.type,_=this._trackerFactories.filter(P=>P.type===h||P.type==="*").map(P=>(0,B.asPromise)(()=>P.factory.createDebugAdapterTracker(a)).then(R=>R,R=>null));return Promise.race([Promise.all(_).then(P=>{const R=P.filter($=>!!$);if(R.length>0)return new r(R)}),new Promise((P,R)=>{const $=setTimeout(()=>{clearTimeout($),R(new Error("timeout"))},1e3)})]).catch(P=>{})}async getAdapterDescriptor(a,p){const h=p.configuration.debugServer;if(typeof h=="number")return Promise.resolve(new A.DebugAdapterServer(h));if(a){const P=await this._extensionService.getExtensionRegistry();return(0,B.asPromise)(()=>a.createDebugAdapterDescriptor(p,this.daExecutableFromPackage(p,P))).then(R=>{if(R)return R})}const _=await this._extensionService.getExtensionRegistry();return Promise.resolve(this.daExecutableFromPackage(p,_))}daExecutableFromPackage(a,p){}startBreakpoints(){this._breakpointEventsActive||(this._breakpointEventsActive=!0,this._debugServiceProxy.$startBreakpointEvents())}fireBreakpointChanges(a,p,h){(a.length>0||p.length>0||h.length>0)&&this._onDidChangeBreakpoints.fire(Object.freeze({added:a,removed:p,changed:h}))}async getSession(a){if(a)if(typeof a=="string"){const p=this._debugSessions.get(a);if(p)return p}else{let p=this._debugSessions.get(a.id);if(!p){const h=await this.getFolder(a.folderUri),_=a.parent?this._debugSessions.get(a.parent):void 0;p=new b(this._debugServiceProxy,a.id,a.type,a.name,h,a.configuration,_),this._debugSessions.set(p.id,p),this._debugServiceProxy.$sessionCached(p.id)}return p}throw new Error("cannot find session")}getFolder(a){if(a){const p=k.URI.revive(a);return this._workspaceService.resolveWorkspaceFolder(p)}return Promise.resolve(void 0)}};g=Fe([Ne(0,n.IExtHostRpcService),Ne(1,M.IExtHostWorkspace),Ne(2,L.IExtHostExtensionService),Ne(3,v.IExtHostDocumentsAndEditors),Ne(4,m.IExtHostConfiguration),Ne(5,d.IExtHostEditorTabs)],g),e.ExtHostDebugServiceBase=g;class b{constructor(a,p,h,_,P,R,$){this._debugServiceProxy=a,this._id=p,this._type=h,this._name=_,this._workspaceFolder=P,this._configuration=R,this._parentSession=$}get id(){return this._id}get type(){return this._type}get name(){return this._name}set name(a){this._name=a,this._debugServiceProxy.$setDebugSessionName(this._id,a)}get parentSession(){return this._parentSession}_acceptNameChanged(a){this._name=a}get workspaceFolder(){return this._workspaceFolder}get configuration(){return this._configuration}customRequest(a,p){return this._debugServiceProxy.$customDebugAdapterRequest(this._id,a,p)}getDebugProtocolBreakpoint(a){return this._debugServiceProxy.$getDebugProtocolBreakpoint(this._id,a.id)}}e.ExtHostDebugSession=b;class l{constructor(a){this.value=Object.freeze({append(p){a.$appendDebugConsole(p)},appendLine(p){this.append(p+`
`)}})}}e.ExtHostDebugConsole=l;class I extends u.AbstractVariableResolverService{constructor(a,p,h,_,P,R){function $(){if(p){const E=p.activeEditor();if(E)return E.document.uri;const z=_.tabGroups.all.find(V=>V.isActive)?.activeTab;if(z!==void 0){const V=z.resource;return V&&(V.primary||V.secondary)?V.primary??V.secondary:z.resource}}}super({getFolderUri:E=>{const z=a.filter(V=>V.name===E);if(z&&z.length>0)return z[0].uri},getWorkspaceFolderCount:()=>a.length,getConfigurationValue:(E,z)=>h.getConfiguration(void 0,E).get(z),getAppRoot:()=>T.cwd(),getExecPath:()=>T.env.VSCODE_EXEC_PATH,getFilePath:()=>{const E=$();if(E)return o.normalize(E.fsPath)},getWorkspaceFolderPathForFile:()=>{if(P){const E=$();if(E){const z=P.getWorkspaceFolder(E);if(z)return o.normalize(z.uri.fsPath)}}},getSelectedText:()=>{if(p){const E=p.activeEditor();if(E&&!E.selection.isEmpty)return E.document.getText(E.selection)}},getLineNumber:()=>{if(p){const E=p.activeEditor();if(E)return String(E.selection.end.line+1)}}},void 0,R?Promise.resolve(R):void 0,Promise.resolve(T.env))}}e.ExtHostVariableResolverService=I;class r{constructor(a){this.trackers=a}onWillStartSession(){this.trackers.forEach(a=>a.onWillStartSession?a.onWillStartSession():void 0)}onWillReceiveMessage(a){this.trackers.forEach(p=>p.onWillReceiveMessage?p.onWillReceiveMessage(a):void 0)}onDidSendMessage(a){this.trackers.forEach(p=>p.onDidSendMessage?p.onDidSendMessage(a):void 0)}onWillStopSession(){this.trackers.forEach(a=>a.onWillStopSession?a.onWillStopSession():void 0)}onError(a){this.trackers.forEach(p=>p.onError?p.onError(a):void 0)}onExit(a,p){this.trackers.forEach(h=>h.onExit?h.onExit(a,p):void 0)}}class i extends y.AbstractDebugAdapter{constructor(a){super();this.implementation=a,a.onDidSendMessage(p=>{this.acceptMessage(p)})}startSession(){return Promise.resolve(void 0)}sendMessage(a){this.implementation.handleMessage(a)}stopSession(){return this.implementation.dispose(),Promise.resolve(void 0)}}let c=class extends g{constructor(a,p,h,_,P,R){super(a,p,h,_,P,R)}createVariableResolver(a,p,h){return new I(a,p,h,this._editorTabs)}};c=Fe([Ne(0,n.IExtHostRpcService),Ne(1,M.IExtHostWorkspace),Ne(2,L.IExtHostExtensionService),Ne(3,v.IExtHostDocumentsAndEditors),Ne(4,m.IExtHostConfiguration),Ne(5,d.IExtHostEditorTabs)],c),e.WorkerExtHostDebugService=c}),define(Ee[217],we([1,0,69,2,4,32,28,25,14,27,3,33,86,12,10]),function(J,e,o,k,w,B,S,A,y,M,L,v,u,m,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RequireInterceptor=void 0;let n=class{constructor(b,l,I,r,i,c,t){this._apiFactory=b,this._extensionRegistry=l,this._instaService=I,this._extHostConfiguration=r,this._extHostExtensionService=i,this._initData=c,this._logService=t,this._factories=new Map,this._alternatives=[]}async install(){this._installInterceptor(),o.mark("code/extHost/willWaitForConfig");const b=await this._extHostConfiguration.getConfigProvider();o.mark("code/extHost/didWaitForConfig");const l=await this._extHostExtensionService.getExtensionPathIndex();this.register(new D(this._apiFactory,l,this._extensionRegistry,b,this._logService)),this.register(this._instaService.createInstance(T,l)),this.register(this._instaService.createInstance(f)),this._initData.remote.isRemote&&this.register(this._instaService.createInstance(d,l,this._initData.environment.appUriScheme))}register(b){if("nodeModuleName"in b)if(Array.isArray(b.nodeModuleName))for(let l of b.nodeModuleName)this._factories.set(l,b);else this._factories.set(b.nodeModuleName,b);typeof b.alternativeModuleName=="function"&&this._alternatives.push(l=>b.alternativeModuleName(l))}};n=Fe([Ne(2,L.IInstantiationService),Ne(3,B.IExtHostConfiguration),Ne(4,v.IExtHostExtensionService),Ne(5,M.IExtHostInitDataService),Ne(6,m.ILogService)],n),e.RequireInterceptor=n;let f=class Hi{constructor(b){if(b.environment.appRoot&&Hi.aliased.size){const l=(0,s.escapeRegExpCharacters)(this.forceForwardSlashes(b.environment.appRoot.fsPath)),I="[a-z0-9_.-]",r=`@${I}+\\/${I}+|${I}+`,i="node_modules|node_modules\\.asar(?:\\.unpacked)?";this.re=new RegExp(`^(${l}/${i}\\/)(${r})(.*)$`,"i")}}alternativeModuleName(b){if(!this.re)return;const l=this.re.exec(this.forceForwardSlashes(b));if(!l)return;const[,I,r,i]=l,c=Hi.aliased.get(r);if(c!==void 0)return console.warn(`${r} as been renamed to ${c}, please update your imports`),I+c+i}forceForwardSlashes(b){return b.replace(/\\/g,"/")}};f.aliased=new Map([["vscode-ripgrep","@vscode/ripgrep"],["vscode-windows-registry","@vscode/windows-registry"]]),f=Fe([Ne(0,M.IExtHostInitDataService)],f);class D{constructor(b,l,I,r,i){this._apiFactory=b,this._extensionPaths=l,this._extensionRegistry=I,this._configProvider=r,this._logService=i,this.nodeModuleName="vscode",this._extApiImpl=new Map}load(b,l){const I=this._extensionPaths.findSubstr(l);if(I){let r=this._extApiImpl.get(A.ExtensionIdentifier.toKey(I.identifier));return r||(r=this._apiFactory(I,this._extensionRegistry,this._configProvider),this._extApiImpl.set(A.ExtensionIdentifier.toKey(I.identifier),r)),r}if(!this._defaultApiImpl){let r="";this._extensionPaths.forEach((i,c)=>r+=` ${c} -> ${i.identifier.value}
`),this._logService.warn(`Could not identify extension for 'vscode' require call from ${l}. These are the extension path mappings:
${r}`),this._defaultApiImpl=this._apiFactory(S.nullExtensionDescription,this._extensionRegistry,this._configProvider)}return this._defaultApiImpl}}let T=class{constructor(b,l,I){this._extensionPaths=b,this.nodeModuleName="keytar",this._mainThreadTelemetry=l.getProxy(w.MainContext.MainThreadTelemetry);const{environment:r}=I,i=l.getProxy(w.MainContext.MainThreadKeytar);if(r.appRoot){let c=r.appRoot.fsPath;u.platform==="win32"&&(c=c.replace(/\\/g,"/")),c[c.length-1]==="/"&&(c=c.substr(0,c.length-1)),this.alternativeNames=new Set,this.alternativeNames.add(`${c}/node_modules.asar/keytar`),this.alternativeNames.add(`${c}/node_modules/keytar`)}this._impl={getPassword:(c,t)=>i.$getPassword(c,t),setPassword:(c,t,a)=>i.$setPassword(c,t,a),deletePassword:(c,t)=>i.$deletePassword(c,t),findPassword:c=>i.$findPassword(c),findCredentials(c){return i.$findCredentials(c)}}}load(b,l){const I=this._extensionPaths.findSubstr(l);return this._mainThreadTelemetry.$publicLog2("shimming.keytar",{extension:I?.identifier.value??"unknown_extension"}),this._impl}alternativeModuleName(b){const l=b.length;if(l<=7||!this.alternativeNames)return;const I=l-7;if((b.charAt(I)==="/"||b.charAt(I)==="\\")&&b.endsWith("keytar")&&(b=b.replace(/\\/g,"/"),this.alternativeNames.has(b)))return"keytar"}};T=Fe([Ne(1,y.IExtHostRpcService),Ne(2,M.IExtHostInitDataService)],T);let d=class{constructor(b,l,I){this._extensionPaths=b,this._appUriScheme=l,this.nodeModuleName=["open","opn"],this._mainThreadTelemetry=I.getProxy(w.MainContext.MainThreadTelemetry);const r=I.getProxy(w.MainContext.MainThreadWindow);this._impl=(i,c)=>{const t=k.URI.parse(i);return c?this.callOriginal(i,c):t.scheme==="http"||t.scheme==="https"?r.$openUri(t,i,{allowTunneling:!0}):t.scheme==="mailto"||t.scheme===this._appUriScheme?r.$openUri(t,i,{}):this.callOriginal(i,c)}}load(b,l,I){const r=this._extensionPaths.findSubstr(l);return r&&(this._extensionId=r.identifier.value,this.sendShimmingTelemetry()),this._original=I(b),this._impl}callOriginal(b,l){return this.sendNoForwardTelemetry(),this._original(b,l)}sendShimmingTelemetry(){!this._extensionId||this._mainThreadTelemetry.$publicLog2("shimming.open",{extension:this._extensionId})}sendNoForwardTelemetry(){!this._extensionId||this._mainThreadTelemetry.$publicLog2("shimming.open.call.noForward",{extension:this._extensionId})}};d=Fe([Ne(2,y.IExtHostRpcService)],d)}),define(Ee[218],we([1,0,13,15,69,6,2,4,210,12,55,56,27,139,14,60,33,40]),function(J,e,o,k,w,B,S,A,y,M,L,v,u,m,s,n,f,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtensionHostMain=void 0;class T{constructor(g,b,l,I,r){this._disposables=new B.DisposableStore,this._isTerminating=!1,this._hostUtils=l,this._rpcProtocol=new y.RPCProtocol(g,null,I),b=T._transform(b,this._rpcProtocol);const i=new v.ServiceCollection(...(0,L.getSingletonServiceDescriptors)());i.set(u.IExtHostInitDataService,{_serviceBrand:void 0,...b,messagePorts:r}),i.set(s.IExtHostRpcService,new s.ExtHostRpcService(this._rpcProtocol)),i.set(n.IURITransformerService,new n.URITransformerService(I)),i.set(f.IHostUtils,l);const c=new m.InstantiationService(i,!0);this._disposables.add(c.invokeFunction(h=>h.get(D.IExtHostTerminalService))),this._disposables.add(c.invokeFunction(h=>h.get(f.IExtHostExtensionService))),this._logService=c.invokeFunction(h=>h.get(M.ILogService)),w.mark("code/extHost/didCreateServices"),this._hostUtils.pid?this._logService.info(`Extension host with pid ${this._hostUtils.pid} started`):this._logService.info("Extension host started"),this._logService.trace("initData",b),this._extensionService=c.invokeFunction(h=>h.get(f.IExtHostExtensionService)),this._extensionService.initialize(),Error.stackTraceLimit=100;const t=new WeakMap;this._extensionService.getExtensionPathIndex().then(h=>{Error.prepareStackTrace=(_,P)=>{let R="",$,E;for(const z of P)R+=`
at ${z.toString()}`,E=z.getFileName(),!$&&E&&($=h.findSubstr(S.URI.file(E)));return t.set(_,$),`${_.name||"Error"}: ${_.message||""}${R}`}});const a=this._rpcProtocol.getProxy(A.MainContext.MainThreadExtensionService),p=this._rpcProtocol.getProxy(A.MainContext.MainThreadErrors);k.setUnexpectedErrorHandler(h=>{const _=k.transformErrorForSerialization(h),P=t.get(h);P?a.$onExtensionRuntimeError(P.identifier,_):p.$onUnexpectedError(_)})}async asBrowserUri(g){const b=this._rpcProtocol.getProxy(A.MainContext.MainThreadExtensionService);return S.URI.revive(await b.$asBrowserUri(g))}terminate(g){if(this._isTerminating)return;this._isTerminating=!0,this._logService.info(`extension host terminating: ${g}`),this._logService.flush(),this._disposables.dispose(),k.setUnexpectedErrorHandler(l=>{this._logService.error(l)}),this._rpcProtocol.dispose();const b=this._extensionService.deactivateAll();Promise.race([(0,o.timeout)(5e3),b]).finally(()=>{this._hostUtils.pid?this._logService.info(`Extension host with pid ${this._hostUtils.pid} exiting with code 0`):this._logService.info("Extension host exiting with code 0"),this._logService.flush(),this._logService.dispose(),this._hostUtils.exit(0)})}static _transform(g,b){g.extensions.forEach(I=>I.extensionLocation=S.URI.revive(b.transformIncomingURIs(I.extensionLocation))),g.environment.appRoot=S.URI.revive(b.transformIncomingURIs(g.environment.appRoot));const l=g.environment.extensionDevelopmentLocationURI;return l&&(g.environment.extensionDevelopmentLocationURI=l.map(I=>S.URI.revive(b.transformIncomingURIs(I)))),g.environment.extensionTestsLocationURI=S.URI.revive(b.transformIncomingURIs(g.environment.extensionTestsLocationURI)),g.environment.globalStorageHome=S.URI.revive(b.transformIncomingURIs(g.environment.globalStorageHome)),g.environment.workspaceStorageHome=S.URI.revive(b.transformIncomingURIs(g.environment.workspaceStorageHome)),g.logsLocation=S.URI.revive(b.transformIncomingURIs(g.logsLocation)),g.logFile=S.URI.revive(b.transformIncomingURIs(g.logFile)),g.workspace=b.transformIncomingURIs(g.workspace),g}}e.ExtensionHostMain=T}),define(Ee[219],we([1,0,16,13,20,43,29,9,17,24,11,2,41]),function(J,e,o,k,w,B,S,A,y,M,L,v,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BatchedCollector=e.extensionResultIsMatch=e.TextSearchResultsCollector=e.TextSearchManager=void 0;class m{constructor(g,b,l,I){this.query=g,this.provider=b,this.fileUtils=l,this.processType=I,this.collector=null,this.isLimitHit=!1,this.resultCount=0}search(g,b){const l=this.query.folderQueries||[],I=new w.CancellationTokenSource;return b.onCancellationRequested(()=>I.cancel()),new Promise((r,i)=>{this.collector=new n(g);let c=!1;const t=(a,p)=>{if(!c&&!this.isLimitHit){const h=this.resultSize(a);D(a)&&typeof this.query.maxResults=="number"&&this.resultCount+h>this.query.maxResults&&(this.isLimitHit=!0,c=!0,I.cancel(),a=this.trimResultToSize(a,this.query.maxResults-this.resultCount));const _=this.resultSize(a);this.resultCount+=_,(_>0||!D(a))&&this.collector.add(a,p)}};Promise.all(l.map((a,p)=>this.searchInFolder(a,h=>t(h,p),I.token))).then(a=>{I.dispose(),this.collector.flush();const p=a.some(h=>!!h&&!!h.limitHit);r({limitHit:this.isLimitHit||p,messages:(0,o.flatten)(a.map(h=>h?.message?(0,L.isArray)(h.message)?h.message:[h.message]:[])),stats:{type:this.processType}})},a=>{I.dispose();const p=(0,B.toErrorMessage)(a);i(new Error(p))})})}resultSize(g){return D(g)?Array.isArray(g.ranges)?g.ranges.length:1:0}trimResultToSize(g,b){const l=Array.isArray(g.ranges)?g.ranges:[g.ranges],I=Array.isArray(g.preview.matches)?g.preview.matches:[g.preview.matches];return{ranges:l.slice(0,b),preview:{matches:I.slice(0,b),text:g.preview.text},uri:g.uri}}async searchInFolder(g,b,l){const I=new u.QueryGlobTester(this.query,g),r=[],i={report:a=>{if(!this.validateProviderResult(a))return;const p=g.folder.scheme===A.Schemas.file?S.hasSiblingPromiseFn(()=>this.fileUtils.readdir(M.dirname(a.uri))):void 0,h=M.relativePath(g.folder,a.uri);if(h){const _=I.includedInQuery(h,y.basename(h),p);(0,k.isThenable)(_)?r.push(_.then(P=>{P&&b(a)})):_&&b(a)}}},c=this.getSearchOptionsForFolder(g),t=await this.provider.provideTextSearchResults(s(this.query.contentPattern),c,i,l);return r.length&&await Promise.all(r),t}validateProviderResult(g){if(D(g)){if(Array.isArray(g.ranges)){if(!Array.isArray(g.preview.matches))return console.warn("INVALID - A text search provider match's`ranges` and`matches` properties must have the same type."),!1;if(g.preview.matches.length!==g.ranges.length)return console.warn("INVALID - A text search provider match's`ranges` and`matches` properties must have the same length."),!1}else if(Array.isArray(g.preview.matches))return console.warn("INVALID - A text search provider match's`ranges` and`matches` properties must have the same length."),!1}return!0}getSearchOptionsForFolder(g){const b=(0,u.resolvePatternsForProvider)(this.query.includePattern,g.includePattern),l=(0,u.resolvePatternsForProvider)(this.query.excludePattern,g.excludePattern),I={folder:v.URI.from(g.folder),excludes:l,includes:b,useIgnoreFiles:!g.disregardIgnoreFiles,useGlobalIgnoreFiles:!g.disregardGlobalIgnoreFiles,useParentIgnoreFiles:!g.disregardParentIgnoreFiles,followSymlinks:!g.ignoreSymlinks,encoding:g.fileEncoding&&this.fileUtils.toCanonicalName(g.fileEncoding),maxFileSize:this.query.maxFileSize,maxResults:this.query.maxResults,previewOptions:this.query.previewOptions,afterContext:this.query.afterContext,beforeContext:this.query.beforeContext};return I.usePCRE2=this.query.usePCRE2,I}}e.TextSearchManager=m;function s(d){return{isCaseSensitive:d.isCaseSensitive||!1,isRegExp:d.isRegExp||!1,isWordMatch:d.isWordMatch||!1,isMultiline:d.isMultiline||!1,pattern:d.pattern}}class n{constructor(g){this._onResult=g,this._currentFolderIdx=-1,this._currentFileMatch=null,this._batchedCollector=new T(512,b=>this.sendItems(b))}add(g,b){this._currentFileMatch&&(this._currentFolderIdx!==b||!M.isEqual(this._currentUri,g.uri))&&(this.pushToCollector(),this._currentFileMatch=null),this._currentFileMatch||(this._currentFolderIdx=b,this._currentFileMatch={resource:g.uri,results:[]}),this._currentFileMatch.results.push(f(g))}pushToCollector(){const g=this._currentFileMatch&&this._currentFileMatch.results?this._currentFileMatch.results.length:0;this._batchedCollector.addItem(this._currentFileMatch,g)}flush(){this.pushToCollector(),this._batchedCollector.flush()}sendItems(g){this._onResult(g)}}e.TextSearchResultsCollector=n;function f(d){return D(d)?{preview:{matches:(0,o.mapArrayOrNot)(d.preview.matches,g=>({startLineNumber:g.start.line,startColumn:g.start.character,endLineNumber:g.end.line,endColumn:g.end.character})),text:d.preview.text},ranges:(0,o.mapArrayOrNot)(d.ranges,g=>({startLineNumber:g.start.line,startColumn:g.start.character,endLineNumber:g.end.line,endColumn:g.end.character}))}:{text:d.text,lineNumber:d.lineNumber}}function D(d){return!!d.preview}e.extensionResultIsMatch=D;class T{constructor(g,b){this.maxBatchSize=g,this.cb=b,this.totalNumberCompleted=0,this.batch=[],this.batchSize=0}addItem(g,b){!g||this.addItemToBatch(g,b)}addItems(g,b){!g||this.addItemsToBatch(g,b)}addItemToBatch(g,b){this.batch.push(g),this.batchSize+=b,this.onUpdate()}addItemsToBatch(g,b){this.batch=this.batch.concat(g),this.batchSize+=b,this.onUpdate()}onUpdate(){this.totalNumberCompleted<T.START_BATCH_AFTER_COUNT?this.flush():this.batchSize>=this.maxBatchSize?this.flush():this.timeoutHandle||(this.timeoutHandle=setTimeout(()=>{this.flush()},T.TIMEOUT))}flush(){this.batchSize&&(this.totalNumberCompleted+=this.batchSize,this.cb(this.batch),this.batch=[],this.batchSize=0,this.timeoutHandle&&(clearTimeout(this.timeoutHandle),this.timeoutHandle=0))}}e.BatchedCollector=T,T.TIMEOUT=4e3,T.START_BATCH_AFTER_COUNT=50}),define(Ee[99],we([1,0,6,4,3,214,14,60,12,2,219]),function(J,e,o,k,w,B,S,A,y,M,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.reviveQuery=e.ExtHostSearch=e.IExtHostSearch=void 0,e.IExtHostSearch=(0,w.createDecorator)("IExtHostSearch");let v=class{constructor(n,f,D){this.extHostRpc=n,this._uriTransformer=f,this._logService=D,this._proxy=this.extHostRpc.getProxy(k.MainContext.MainThreadSearch),this._handlePool=0,this._textSearchProvider=new Map,this._textSearchUsedSchemes=new Set,this._fileSearchProvider=new Map,this._fileSearchUsedSchemes=new Set,this._fileSearchManager=new B.FileSearchManager}_transformScheme(n){return this._uriTransformer.transformOutgoingScheme(n)}registerTextSearchProvider(n,f){if(this._textSearchUsedSchemes.has(n))throw new Error(`a text search provider for the scheme '${n}' is already registered`);this._textSearchUsedSchemes.add(n);const D=this._handlePool++;return this._textSearchProvider.set(D,f),this._proxy.$registerTextSearchProvider(D,this._transformScheme(n)),(0,o.toDisposable)(()=>{this._textSearchUsedSchemes.delete(n),this._textSearchProvider.delete(D),this._proxy.$unregisterProvider(D)})}registerFileSearchProvider(n,f){if(this._fileSearchUsedSchemes.has(n))throw new Error(`a file search provider for the scheme '${n}' is already registered`);this._fileSearchUsedSchemes.add(n);const D=this._handlePool++;return this._fileSearchProvider.set(D,f),this._proxy.$registerFileSearchProvider(D,this._transformScheme(n)),(0,o.toDisposable)(()=>{this._fileSearchUsedSchemes.delete(n),this._fileSearchProvider.delete(D),this._proxy.$unregisterProvider(D)})}$provideFileSearchResults(n,f,D,T){const d=u(D),g=this._fileSearchProvider.get(n);if(g)return this._fileSearchManager.fileSearch(d,g,b=>{this._proxy.$handleFileMatch(n,f,b.map(l=>l.resource))},T);throw new Error("unknown provider: "+n)}$clearCache(n){return this._fileSearchManager.clearCache(n),Promise.resolve(void 0)}$provideTextSearchResults(n,f,D,T){const d=this._textSearchProvider.get(n);if(!d||!d.provideTextSearchResults)throw new Error(`Unknown provider ${n}`);const g=u(D);return this.createTextSearchManager(g,d).search(l=>this._proxy.$handleTextMatch(n,f,l),T)}$enableExtensionHostSearch(){}createTextSearchManager(n,f){return new L.TextSearchManager(n,f,{readdir:D=>Promise.resolve([]),toCanonicalName:D=>D},"textSearchProvider")}};v=Fe([Ne(0,S.IExtHostRpcService),Ne(1,A.IURITransformerService),Ne(2,y.ILogService)],v),e.ExtHostSearch=v;function u(s){return{...s,folderQueries:s.folderQueries&&s.folderQueries.map(m),extraFileResources:s.extraFileResources&&s.extraFileResources.map(n=>M.URI.revive(n))}}e.reviveQuery=u;function m(s){return{...s,folder:M.URI.revive(s.folder)}}}),define(Ee[220],we([1,0,55,94,31,92,32,39,49,40,97,98,99,67,59,65,95,50,30,64,83,66,193,12,175]),function(J,e,o,k,w,B,S,A,y,M,L,v,u,m,s,n,f,D,T,d,g,b,l,I,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),(0,o.registerSingleton)(I.ILoggerService,l.ExtHostLoggerService),(0,o.registerSingleton)(I.ILogService,r.ExtHostLogService),(0,o.registerSingleton)(n.IExtHostApiDeprecationService,n.ExtHostApiDeprecationService),(0,o.registerSingleton)(A.IExtHostCommands,A.ExtHostCommands),(0,o.registerSingleton)(S.IExtHostConfiguration,S.ExtHostConfiguration),(0,o.registerSingleton)(D.IExtHostConsumerFileSystem,D.ExtHostConsumerFileSystem),(0,o.registerSingleton)(v.IExtHostDebugService,v.WorkerExtHostDebugService),(0,o.registerSingleton)(B.IExtHostDecorations,B.ExtHostDecorations),(0,o.registerSingleton)(y.IExtHostDocumentsAndEditors,y.ExtHostDocumentsAndEditors),(0,o.registerSingleton)(T.IExtHostFileSystemInfo,T.ExtHostFileSystemInfo),(0,o.registerSingleton)(k.IExtHostOutputService,k.ExtHostOutputService),(0,o.registerSingleton)(u.IExtHostSearch,u.ExtHostSearch),(0,o.registerSingleton)(m.IExtHostStorage,m.ExtHostStorage),(0,o.registerSingleton)(L.IExtHostTask,L.WorkerExtHostTask),(0,o.registerSingleton)(M.IExtHostTerminalService,M.WorkerExtHostTerminalService),(0,o.registerSingleton)(s.IExtHostTunnelService,s.ExtHostTunnelService),(0,o.registerSingleton)(f.IExtHostWindow,f.ExtHostWindow),(0,o.registerSingleton)(w.IExtHostWorkspace,w.ExtHostWorkspace),(0,o.registerSingleton)(d.IExtHostSecretState,d.ExtHostSecretState),(0,o.registerSingleton)(g.IExtHostTelemetry,g.ExtHostTelemetry),(0,o.registerSingleton)(b.IExtHostEditorTabs,b.ExtHostEditorTabs)}),define(Ee[221],we([1,0]),function(J,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TreeviewsService=void 0;class o{constructor(){this._dragOperations=new Map,this._renderedElements=new Map}removeDragOperationTransfer(w){if(w&&this._dragOperations.has(w)){const B=this._dragOperations.get(w);return this._dragOperations.delete(w),B}}addDragOperationTransfer(w,B){this._dragOperations.set(w,B)}getRenderedTreeElement(w){if(this._renderedElements.has(w))return this._renderedElements.get(w)}addRenderedTreeItemElement(w,B){this._renderedElements.set(w,B)}removeRenderedTreeItemElement(w){this._renderedElements.has(w)&&this._renderedElements.delete(w)}}e.TreeviewsService=o}),define(Ee[222],we([1,0,127,24,2,5,6,13,7,11,16,8,20,155,221]),function(J,e,o,k,w,B,S,A,y,M,L,v,u,m,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtHostTreeViews=void 0;function n(T,d){if((0,M.isString)(T))return{label:T};if(T&&typeof T=="object"&&typeof T.label=="string"){let g;return Array.isArray(T.highlights)&&(g=T.highlights.filter(b=>b.length===2&&typeof b[0]=="number"&&typeof b[1]=="number"),g=g.length?g:void 0),{label:T.label,highlights:g}}}class f{constructor(d,g,b){this._proxy=d,this.commands=g,this.logService=b,this.treeViews=new Map,this.treeDragAndDropService=new s.TreeviewsService;function l(I){return I&&I.$treeViewId&&I.$treeItemHandle}g.registerArgumentProcessor({processArgument:I=>l(I)?this.convertArgument(I):Array.isArray(I)&&I.length>0?I.map(r=>l(r)?this.convertArgument(r):r):I})}registerTreeDataProvider(d,g,b){const l=this.createTreeView(d,{treeDataProvider:g},b);return{dispose:()=>l.dispose()}}createTreeView(d,g,b){if(!g||!g.treeDataProvider)throw new Error("Options with treeDataProvider is mandatory");const l=g.dragAndDropController?.dropMimeTypes??[],I=g.dragAndDropController?.dragMimeTypes??[],r=!!g.dragAndDropController?.handleDrag,i=!!g.dragAndDropController?.handleDrop,c=this._proxy.$registerTreeViewDataProvider(d,{showCollapseAll:!!g.showCollapseAll,canSelectMany:!!g.canSelectMany,dropMimeTypes:l,dragMimeTypes:I,hasHandleDrag:r,hasHandleDrop:i}),t=this.createExtHostTreeView(d,g,b);return{get onDidCollapseElement(){return t.onDidCollapseElement},get onDidExpandElement(){return t.onDidExpandElement},get selection(){return t.selectedElements},get onDidChangeSelection(){return t.onDidChangeSelection},get visible(){return t.visible},get onDidChangeVisibility(){return t.onDidChangeVisibility},get message(){return t.message},set message(a){t.message=a},get title(){return t.title},set title(a){t.title=a},get description(){return t.description},set description(a){t.description=a},reveal:(a,p)=>t.reveal(a,p),dispose:async()=>{await c,this.treeViews.delete(d),t.dispose()}}}$getChildren(d,g){const b=this.treeViews.get(d);return b?b.getChildren(g):Promise.reject(new Error((0,o.localize)(0,null,d)))}async $handleDrop(d,g,b,l,I,r,i){const c=this.treeViews.get(d);if(!c)return Promise.reject(new Error((0,o.localize)(1,null,d)));const t=m.TreeDataTransferConverter.toITreeDataTransfer(g);return r===d&&i&&await this.addAdditionalTransferItems(t,c,i,l,I),c.onDrop(t,b,l)}async addAdditionalTransferItems(d,g,b,l,I){const r=this.treeDragAndDropService.removeDragOperationTransfer(I);if(r)(await r)?.forEach((i,c)=>{i&&d.set(c,i)});else if(I&&g.handleDrag){const i=g.handleDrag(b,d,l);this.treeDragAndDropService.addDragOperationTransfer(I,i),await i}return d}async $handleDrag(d,g,b,l){const I=this.treeViews.get(d);if(!I)return Promise.reject(new Error((0,o.localize)(2,null,d)));const r=await this.addAdditionalTransferItems(new Map,I,g,l,b);if(!!r)return m.TreeDataTransferConverter.toTreeDataTransferDTO(r)}async $hasResolve(d){const g=this.treeViews.get(d);if(!g)throw new Error((0,o.localize)(3,null,d));return g.hasResolve}$resolve(d,g,b){const l=this.treeViews.get(d);if(!l)throw new Error((0,o.localize)(4,null,d));return l.resolveTreeItem(g,b)}$setExpanded(d,g,b){const l=this.treeViews.get(d);if(!l)throw new Error((0,o.localize)(5,null,d));l.setExpanded(g,b)}$setSelection(d,g){const b=this.treeViews.get(d);if(!b)throw new Error((0,o.localize)(6,null,d));b.setSelection(g)}$setVisible(d,g){const b=this.treeViews.get(d);if(!b)throw new Error((0,o.localize)(7,null,d));b.setVisible(g)}createExtHostTreeView(d,g,b){const l=new D(d,g,this._proxy,this.commands.converter,this.logService,b);return this.treeViews.set(d,l),l}convertArgument(d){const g=this.treeViews.get(d.$treeViewId);return g?g.getExtensionElement(d.$treeItemHandle):null}}e.ExtHostTreeViews=f;class D extends S.Disposable{constructor(d,g,b,l,I,r){super();if(this.viewId=d,this.proxy=b,this.commands=l,this.logService=I,this.extension=r,this.roots=void 0,this.elements=new Map,this.nodes=new Map,this._visible=!1,this._selectedHandles=[],this._onDidExpandElement=this._register(new B.Emitter),this.onDidExpandElement=this._onDidExpandElement.event,this._onDidCollapseElement=this._register(new B.Emitter),this.onDidCollapseElement=this._onDidCollapseElement.event,this._onDidChangeSelection=this._register(new B.Emitter),this.onDidChangeSelection=this._onDidChangeSelection.event,this._onDidChangeVisibility=this._register(new B.Emitter),this.onDidChangeVisibility=this._onDidChangeVisibility.event,this._onDidChangeData=this._register(new B.Emitter),this.refreshPromise=Promise.resolve(),this.refreshQueue=Promise.resolve(),this._message="",this._title="",this._refreshCancellationSource=new u.CancellationTokenSource,r.contributes&&r.contributes.views)for(const t in r.contributes.views)for(const a of r.contributes.views[t])a.id===d&&(this._title=a.name);this.dataProvider=g.treeDataProvider,this.dndController=g.dragAndDropController,this.dataProvider.onDidChangeTreeData2?this._register(this.dataProvider.onDidChangeTreeData2(t=>this._onDidChangeData.fire({message:!1,element:t}))):this.dataProvider.onDidChangeTreeData&&this._register(this.dataProvider.onDidChangeTreeData(t=>this._onDidChangeData.fire({message:!1,element:t})));let i,c;this._register(B.Event.debounce(this._onDidChangeData.event,(t,a)=>(t||(t={message:!1,elements:[]}),a.element!==!1&&(i||(i=new Promise(p=>c=p),this.refreshPromise=this.refreshPromise.then(()=>i)),Array.isArray(a.element)?t.elements.push(...a.element):t.elements.push(a.element)),a.message&&(t.message=!0),t),200,!0)(({message:t,elements:a})=>{a.length&&(this.refreshQueue=this.refreshQueue.then(()=>{const p=c;return i=null,this.refresh(a).then(()=>p())})),t&&this.proxy.$setMessage(this.viewId,this._message)}))}get visible(){return this._visible}get selectedElements(){return this._selectedHandles.map(d=>this.getExtensionElement(d)).filter(d=>!(0,M.isUndefinedOrNull)(d))}async getChildren(d){const g=d?this.getExtensionElement(d):void 0;if(d&&!g)return this.logService.error(`No tree item with id '${d}' found.`),Promise.resolve([]);let b=this.getChildrenNodes(d);return b||(b=await this.fetchChildrenNodes(g)),b?b.map(l=>l.item):void 0}getExtensionElement(d){return this.elements.get(d)}reveal(d,g){g=g||{select:!0,focus:!1};const b=(0,M.isUndefinedOrNull)(g.select)?!0:g.select,l=(0,M.isUndefinedOrNull)(g.focus)?!1:g.focus,I=(0,M.isUndefinedOrNull)(g.expand)?!1:g.expand;return typeof this.dataProvider.getParent!="function"?Promise.reject(new Error("Required registered TreeDataProvider to implement 'getParent' method to access 'reveal' method")):d?this.refreshPromise.then(()=>this.resolveUnknownParentChain(d)).then(r=>this.resolveTreeNode(d,r[r.length-1]).then(i=>this.proxy.$reveal(this.viewId,{item:i.item,parentChain:r.map(c=>c.item)},{select:b,focus:l,expand:I})),r=>this.logService.error(r)):this.proxy.$reveal(this.viewId,void 0,{select:b,focus:l,expand:I})}get message(){return this._message}set message(d){this._message=d,this._onDidChangeData.fire({message:!0,element:!1})}get title(){return this._title}set title(d){this._title=d,this.proxy.$setTitle(this.viewId,d,this._description)}get description(){return this._description}set description(d){this._description=d,this.proxy.$setTitle(this.viewId,this._title,d)}setExpanded(d,g){const b=this.getExtensionElement(d);b&&(g?this._onDidExpandElement.fire(Object.freeze({element:b})):this._onDidCollapseElement.fire(Object.freeze({element:b})))}setSelection(d){(0,L.equals)(this._selectedHandles,d)||(this._selectedHandles=d,this._onDidChangeSelection.fire(Object.freeze({selection:this.selectedElements})))}setVisible(d){d!==this._visible&&(this._visible=d,this._onDidChangeVisibility.fire(Object.freeze({visible:this._visible})))}async handleDrag(d,g,b){const l=[];for(const I of d){const r=this.getExtensionElement(I);r&&l.push(r)}if(!(!this.dndController?.handleDrag||l.length===0))return await this.dndController.handleDrag(l,g,b),g}get hasHandleDrag(){return!!this.dndController?.handleDrag}async onDrop(d,g,b){const l=this.getExtensionElement(g);if(!(!l||!this.dndController?.handleDrop))return(0,A.asPromise)(()=>this.dndController?.handleDrop?this.dndController.handleDrop(l,d,b):void 0)}get hasResolve(){return!!this.dataProvider.resolveTreeItem}async resolveTreeItem(d,g){if(!this.dataProvider.resolveTreeItem)return;const b=this.elements.get(d);if(b){const l=this.nodes.get(b);if(l){const I=await this.dataProvider.resolveTreeItem(l.extensionItem,b,g)??l.extensionItem;return l.item.tooltip=this.getTooltip(I.tooltip),l.item.command=this.getCommand(l.disposableStore,I.command),l.item}}}resolveUnknownParentChain(d){return this.resolveParent(d).then(g=>g?this.resolveUnknownParentChain(g).then(b=>this.resolveTreeNode(g,b[b.length-1]).then(l=>(b.push(l),b))):Promise.resolve([]))}resolveParent(d){const g=this.nodes.get(d);return g?Promise.resolve(g.parent?this.elements.get(g.parent.item.handle):void 0):(0,A.asPromise)(()=>this.dataProvider.getParent(d))}resolveTreeNode(d,g){const b=this.nodes.get(d);return b?Promise.resolve(b):(0,A.asPromise)(()=>this.dataProvider.getTreeItem(d)).then(l=>this.createHandle(d,l,g,!0)).then(l=>this.getChildren(g?g.item.handle:void 0).then(()=>{const I=this.getExtensionElement(l);if(I){const r=this.nodes.get(I);if(r)return Promise.resolve(r)}throw new Error(`Cannot resolve tree item for element ${l}`)}))}getChildrenNodes(d){if(d){let g;if(typeof d=="string"){const b=this.getExtensionElement(d);g=b?this.nodes.get(b):void 0}else g=d;return g&&g.children||void 0}return this.roots}async fetchChildrenNodes(d){this.clearChildren(d);const g=new u.CancellationTokenSource(this._refreshCancellationSource.token);try{const b=d?this.nodes.get(d):void 0,l=await this.dataProvider.getChildren(d);if(g.token.isCancellationRequested)return;const I=await Promise.all((0,L.coalesce)(l||[]).map(async r=>{const i=await this.dataProvider.getTreeItem(r);return i&&!g.token.isCancellationRequested?this.createAndRegisterTreeNode(r,i,b):null}));return g.token.isCancellationRequested?void 0:(0,L.coalesce)(I)}finally{g.dispose()}}refresh(d){if(d.some(b=>!b))return this._refreshCancellationSource.dispose(!0),this._refreshCancellationSource=new u.CancellationTokenSource,this.clearAll(),this.proxy.$refresh(this.viewId);{const b=this.getHandlesToRefresh(d);if(b.length)return this.refreshHandles(b)}return Promise.resolve(void 0)}getHandlesToRefresh(d){const g=new Set,b=d.map(I=>this.nodes.get(I));for(const I of b)if(I&&!g.has(I.item.handle)){let r=I;for(;r&&r.parent&&b.findIndex(i=>r&&r.parent&&i&&i.item.handle===r.parent.item.handle)===-1;){const i=this.elements.get(r.parent.item.handle);r=i?this.nodes.get(i):void 0}r&&!r.parent&&g.add(I.item.handle)}const l=[];return g.forEach(I=>{const r=this.elements.get(I);if(r){const i=this.nodes.get(r);i&&(!i.parent||!g.has(i.parent.item.handle))&&l.push(I)}}),l}refreshHandles(d){const g={};return Promise.all(d.map(b=>this.refreshNode(b).then(l=>{l&&(g[b]=l.item)}))).then(()=>Object.keys(g).length?this.proxy.$refresh(this.viewId,g):void 0)}refreshNode(d){const g=this.getExtensionElement(d);if(g){const b=this.nodes.get(g);if(b)return this.clearChildren(g),(0,A.asPromise)(()=>this.dataProvider.getTreeItem(g)).then(l=>{if(l){const I=this.createTreeNode(g,l,b.parent);return this.updateNodeCache(g,I,b,b.parent),b.dispose(),I}return null})}return Promise.resolve(null)}createAndRegisterTreeNode(d,g,b){const l=this.createTreeNode(d,g,b);if(g.id&&this.elements.has(l.item.handle))throw new Error((0,o.localize)(8,null,g.id));return this.addNodeToCache(d,l),this.addNodeToParentCache(l,b),l}getTooltip(d){return y.MarkdownString.isMarkdownString(d)?v.MarkdownString.from(d):d}getCommand(d,g){return g?this.commands.toInternal(g,d):void 0}createTreeNode(d,g,b){const l=new S.DisposableStore,I=this.createHandle(d,g,b),r=this.getLightIconPath(g);return{item:{handle:I,parentHandle:b?b.item.handle:void 0,label:n(g.label,this.extension),description:g.description,resourceUri:g.resourceUri,tooltip:this.getTooltip(g.tooltip),command:this.getCommand(l,g.command),contextValue:g.contextValue,icon:r,iconDark:this.getDarkIconPath(g)||r,themeIcon:this.getThemeIcon(g),collapsibleState:(0,M.isUndefinedOrNull)(g.collapsibleState)?y.TreeItemCollapsibleState.None:g.collapsibleState,accessibilityInformation:g.accessibilityInformation},extensionItem:g,parent:b,children:void 0,disposableStore:l,dispose(){l.dispose()}}}getThemeIcon(d){return d.iconPath instanceof y.ThemeIcon?d.iconPath:void 0}createHandle(d,{id:g,label:b,resourceUri:l},I,r){if(g)return`${D.ID_HANDLE_PREFIX}/${g}`;const i=n(b,this.extension),c=I?I.item.handle:D.LABEL_HANDLE_PREFIX;let t=i?i.label:l?(0,k.basename)(l):"";t=t.indexOf("/")!==-1?t.replace("/","//"):t;const a=this.nodes.has(d)?this.nodes.get(d).item.handle:void 0,p=this.getChildrenNodes(I)||[];let h,_=0;do{if(h=`${c}/${_}:${t}`,r||!this.elements.has(h)||a===h)break;_++}while(_<=p.length);return h}getLightIconPath(d){if(d.iconPath&&!(d.iconPath instanceof y.ThemeIcon))return typeof d.iconPath=="string"||w.URI.isUri(d.iconPath)?this.getIconPath(d.iconPath):this.getIconPath(d.iconPath.light)}getDarkIconPath(d){if(d.iconPath&&!(d.iconPath instanceof y.ThemeIcon)&&d.iconPath.dark)return this.getIconPath(d.iconPath.dark)}getIconPath(d){return w.URI.isUri(d)?d:w.URI.file(d)}addNodeToCache(d,g){this.elements.set(g.item.handle,d),this.nodes.set(d,g)}updateNodeCache(d,g,b,l){this.elements.delete(g.item.handle),this.nodes.delete(d),g.item.handle!==b.item.handle&&this.elements.delete(b.item.handle),this.addNodeToCache(d,g);const I=this.getChildrenNodes(l)||[],r=I.filter(i=>i.item.handle===b.item.handle)[0];r&&I.splice(I.indexOf(r),1,g)}addNodeToParentCache(d,g){g?(g.children||(g.children=[]),g.children.push(d)):(this.roots||(this.roots=[]),this.roots.push(d))}clearChildren(d){if(d){const g=this.nodes.get(d);if(g){if(g.children)for(const b of g.children){const l=this.elements.get(b.item.handle);l&&this.clear(l)}g.children=void 0}}else this.clearAll()}clear(d){const g=this.nodes.get(d);if(g){if(g.children)for(const b of g.children){const l=this.elements.get(b.item.handle);l&&this.clear(l)}this.nodes.delete(d),this.elements.delete(g.item.handle),g.dispose()}}clearAll(){this.roots=void 0,this.elements.clear(),this.nodes.forEach(d=>d.dispose()),this.nodes.clear()}dispose(){this._refreshCancellationSource.dispose(),this.clearAll()}}D.LABEL_HANDLE_PREFIX="0",D.ID_HANDLE_PREFIX="1"}),define(Ee[223],we([1,0,20,15,5,34,2,115,235,110,74,45,4,91,180,179,39,181,32,182,183,184,168,185,49,33,186,187,190,192,194,94,170,199,200,201,67,40,203,222,8,7,206,51,95,31,70,157,189,82,92,97,98,99,12,60,14,27,195,153,59,65,177,204,152,68,50,209,207,208,178,30,202,205,64,66,83,197,96,198,9,79,196,150,188,6,28,159]),function(J,e,o,k,w,B,S,A,y,M,L,v,u,m,s,n,f,D,T,d,g,b,l,I,r,i,c,t,a,p,h,_,P,R,$,E,z,V,W,Q,K,H,te,ae,ee,ce,de,Se,fe,ne,me,ke,Ae,Be,Xe,ge,ue,N,F,C,O,x,X,re,ve,Ie,Me,Le,ze,xe,Re,Qe,tt,Te,it,G,Y,le,Oe,We,Ge,Je,ft,It,St,kt,qe,vt){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createApiFactoryAndRegisterActors=void 0;function Nt(nt){const ut=nt.get(N.IExtHostInitDataService),At=nt.get(Qe.IExtHostFileSystemInfo),Tt=nt.get(Me.IExtHostConsumerFileSystem),bt=nt.get(i.IExtHostExtensionService),dt=nt.get(ce.IExtHostWorkspace),Rt=nt.get(Y.IExtHostTelemetry),Lt=nt.get(T.IExtHostConfiguration),Ft=nt.get(ge.IURITransformerService),Ue=nt.get(ue.IExtHostRpcService),he=nt.get(z.IExtHostStorage),pe=nt.get(Ie.IExtensionStoragePaths),oe=nt.get(Xe.ILoggerService),q=nt.get(Xe.ILogService),_e=nt.get(O.IExtHostTunnelService),Ce=nt.get(x.IExtHostApiDeprecationService),$e=nt.get(ee.IExtHostWindow),Ve=nt.get(it.IExtHostSecretState),lt=nt.get(G.IExtHostEditorTabs);Ue.set(u.ExtHostContext.ExtHostFileSystemInfo,At),Ue.set(u.ExtHostContext.ExtHostLogLevelServiceShape,oe),Ue.set(u.ExtHostContext.ExtHostWorkspace,dt),Ue.set(u.ExtHostContext.ExtHostConfiguration,Lt),Ue.set(u.ExtHostContext.ExtHostExtensionService,bt),Ue.set(u.ExtHostContext.ExtHostStorage,he),Ue.set(u.ExtHostContext.ExtHostTunnelService,_e),Ue.set(u.ExtHostContext.ExtHostWindow,$e),Ue.set(u.ExtHostContext.ExtHostSecretState,Ve),Ue.set(u.ExtHostContext.ExtHostTelemetry,Rt),Ue.set(u.ExtHostContext.ExtHostEditorTabs,lt);const gt=Ue.set(u.ExtHostContext.ExtHostDecorations,nt.get(me.IExtHostDecorations)),Et=Ue.set(u.ExtHostContext.ExtHostDocumentsAndEditors,nt.get(r.IExtHostDocumentsAndEditors)),rt=Ue.set(u.ExtHostContext.ExtHostCommands,nt.get(f.IExtHostCommands)),at=Ue.set(u.ExtHostContext.ExtHostTerminalService,nt.get(V.IExtHostTerminalService)),ot=Ue.set(u.ExtHostContext.ExtHostDebugService,nt.get(Ae.IExtHostDebugService)),Mt=Ue.set(u.ExtHostContext.ExtHostSearch,nt.get(Be.IExtHostSearch)),mt=Ue.set(u.ExtHostContext.ExtHostTask,nt.get(ke.IExtHostTask)),Dt=Ue.set(u.ExtHostContext.ExtHostOutputService,nt.get(_.IExtHostOutputService)),Ut=Ue.set(u.ExtHostContext.ExtHostUrls,new te.ExtHostUrls(Ue)),wt=Ue.set(u.ExtHostContext.ExtHostDocuments,new I.ExtHostDocuments(Ue,Et)),Bt=Ue.set(u.ExtHostContext.ExtHostDocumentContentProviders,new b.ExtHostDocumentContentProvider(Ue,Et,q)),Wt=Ue.set(u.ExtHostContext.ExtHostDocumentSaveParticipant,new l.ExtHostDocumentSaveParticipant(q,wt,Ue.getProxy(u.MainContext.MainThreadBulkEdits))),pt=Ue.set(u.ExtHostContext.ExtHostNotebook,new F.ExtHostNotebookController(Ue,rt,Et,wt,pe)),ei=Ue.set(u.ExtHostContext.ExtHostNotebookDocuments,new It.ExtHostNotebookDocuments(q,pt)),Xt=Ue.set(u.ExtHostContext.ExtHostNotebookEditors,new ft.ExtHostNotebookEditors(q,Ue,pt)),ti=Ue.set(u.ExtHostContext.ExtHostNotebookKernels,new le.ExtHostNotebookKernels(Ue,ut,pt,rt,q)),ai=Ue.set(u.ExtHostContext.ExtHostNotebookRenderers,new We.ExtHostNotebookRenderers(Ue,pt)),Ct=Ue.set(u.ExtHostContext.ExtHostEditors,new W.ExtHostEditors(Ue,Et)),ii=Ue.set(u.ExtHostContext.ExtHostTreeViews,new Q.ExtHostTreeViews(Ue.getProxy(u.MainContext.MainThreadTreeViews),rt,q)),bi=Ue.set(u.ExtHostContext.ExtHostEditorInsets,new Se.ExtHostEditorInsets(Ue.getProxy(u.MainContext.MainThreadEditorInsets),Ct,ut)),qt=Ue.set(u.ExtHostContext.ExtHostDiagnostics,new d.ExtHostDiagnostics(Ue,q,At)),Kt=Ue.set(u.ExtHostContext.ExtHostLanguages,new p.ExtHostLanguages(Ue,wt,rt.converter,Ft)),st=Ue.set(u.ExtHostContext.ExtHostLanguageFeatures,new a.ExtHostLanguageFeatures(Ue,Ft,wt,rt,qt,q,Ce)),li=Ue.set(u.ExtHostContext.ExtHostFileSystem,new c.ExtHostFileSystem(Ue,st)),Ht=Ue.set(u.ExtHostContext.ExtHostFileSystemEventService,new t.ExtHostFileSystemEventService(Ue,q,Et)),zt=Ue.set(u.ExtHostContext.ExtHostQuickOpen,(0,R.createExtHostQuickOpen)(Ue,dt,rt)),ni=Ue.set(u.ExtHostContext.ExtHostSCM,new $.ExtHostSCM(Ue,rt,q)),_i=Ue.set(u.ExtHostContext.ExtHostComments,(0,D.createExtHostComments)(Ue,rt,wt)),fi=Ue.set(u.ExtHostContext.ExtHostProgress,new P.ExtHostProgress(Ue.getProxy(u.MainContext.MainThreadProgress))),Si=Ue.set(u.ExtHostContext.ExtHosLabelService,new fe.ExtHostLabelService(Ue)),mi=Ue.set(u.ExtHostContext.ExtHostTheming,new C.ExtHostTheming(Ue)),ri=Ue.set(u.ExtHostContext.ExtHostAuthentication,new X.ExtHostAuthentication(Ue)),yi=Ue.set(u.ExtHostContext.ExtHostTimeline,new re.ExtHostTimeline(Ue,rt)),Qt=Ue.set(u.ExtHostContext.ExtHostWebviews,new ae.ExtHostWebviews(Ue,{remote:ut.remote},dt,q,Ce)),Yt=Ue.set(u.ExtHostContext.ExtHostWebviewPanels,new xe.ExtHostWebviewPanels(Ue,Qt,dt)),Di=Ue.set(u.ExtHostContext.ExtHostCustomEditors,new ze.ExtHostCustomEditors(Ue,wt,pe,Qt,Yt)),Ci=Ue.set(u.ExtHostContext.ExtHostWebviewViews,new Le.ExtHostWebviewViews(Ue,Qt)),Jt=Ue.set(u.ExtHostContext.ExtHostTesting,new tt.ExtHostTesting(Ue,rt)),si=Ue.set(u.ExtHostContext.ExtHostUriOpeners,new Te.ExtHostUriOpeners(Ue));Ue.set(u.ExtHostContext.ExtHostInteractive,new St.ExtHostInteractive(Ue,pt,Et,rt));const Ii=(0,de.values)(u.ExtHostContext);Ue.assertRegistered(Ii);const ki=new Re.ExtHostBulkEdits(Ue,Et),Ti=new n.ExtHostClipboard(Ue),Zt=new h.ExtHostMessageService(Ue,q),gi=new g.ExtHostDialogs(Ue),Gt=new E.ExtHostStatusBar(Ue,rt.converter);return s.ExtHostApiCommands.register(rt),function(Pe,ci,Ot){const ct=function(){let Z=!Pe.isUnderDevelopment;function se(){Z||(q.info(`Extension '${Pe.identifier.value}' uses a document selector without scheme. Learn more about this: https://go.microsoft.com/fwlink/?linkid=872305`),Z=!0)}return function ye(Ze){if(Array.isArray(Ze))Ze.forEach(ye);else if(typeof Ze=="string")se();else{const ht=Ze;typeof ht.scheme=="undefined"&&se(),typeof ht.exclusive=="boolean"&&(0,qe.checkProposedApiEnabled)(Pe,"documentFiltersExclusive"),typeof ht.notebookType=="string"&&(0,qe.checkProposedApiEnabled)(Pe,"notebookDocumentSelector")}return Ze}}(),Pi={getSession(Z,se,ye){return ri.getSession(Pe,Z,se,ye)},async hasSession(Z,se){return(0,qe.checkProposedApiEnabled)(Pe,"authSession"),!!await ri.getSession(Pe,Z,se,{silent:!0})},get onDidChangeSessions(){return ri.onDidChangeSessions},registerAuthenticationProvider(Z,se,ye,Ze){return ri.registerAuthenticationProvider(Z,se,ye,Ze)}},Ai={registerCommand(Z,se,ye){return rt.registerCommand(!0,Z,se,ye,void 0,Pe)},registerTextEditorCommand(Z,se,ye){return rt.registerCommand(!0,Z,(...Ze)=>{const ht=Ct.getActiveTextEditor();if(!ht){q.warn("Cannot execute "+Z+" because there is no active text editor.");return}return ht.edit(yt=>{se.apply(ye,[ht,yt,...Ze])}).then(yt=>{yt||q.warn("Edits from command "+Z+" were not applied.")},yt=>{q.warn("An error occurred while running command "+Z,yt)})},void 0,void 0,Pe)},registerDiffInformationCommand:(Z,se,ye)=>((0,qe.checkProposedApiEnabled)(Pe,"diffCommand"),rt.registerCommand(!0,Z,async(...Ze)=>{const ht=Et.activeEditor(!0);if(!ht){q.warn("Cannot execute "+Z+" because there is no active text editor.");return}const yt=await Ct.getDiffInformation(ht.id);se.apply(ye,[yt,...Ze])},void 0,void 0,Pe)),executeCommand(Z,...se){return rt.executeCommand(Z,...se)},getCommands(Z=!1){return rt.getCommands(Z)}},pi={get machineId(){return ut.telemetryInfo.machineId},get sessionId(){return ut.telemetryInfo.sessionId},get language(){return ut.environment.appLanguage},get appName(){return ut.environment.appName},get appRoot(){return ut.environment.appRoot?.fsPath??""},get appHost(){return ut.environment.appHost},get uriScheme(){return ut.environment.appUriScheme},get clipboard(){return Ti.value},get shell(){return at.getDefaultShell(!1)},get isTelemetryEnabled(){return Rt.getTelemetryConfiguration()},get onDidChangeTelemetryEnabled(){return Rt.onDidChangeTelemetryEnabled},get telemetryConfiguration(){return(0,qe.checkProposedApiEnabled)(Pe,"telemetry"),Rt.getTelemetryDetails()},get onDidChangeTelemetryConfiguration(){return(0,qe.checkProposedApiEnabled)(Pe,"telemetry"),Rt.onDidChangeTelemetryConfiguration},get isNewAppInstall(){const Z=Date.now()-new Date(ut.telemetryInfo.firstSessionDate).getTime();return isNaN(Z)?!1:Z<1e3*60*60*24},openExternal(Z,se){return $e.openUri(Z,{allowTunneling:!!ut.remote.authority,allowContributedOpeners:se?.allowContributedOpeners})},async asExternalUri(Z){if(Z.scheme===ut.environment.appUriScheme)return Ut.createAppUri(Z);try{return await $e.asExternalUri(Z,{allowTunneling:!!ut.remote.authority})}catch(se){if((0,Je.matchesScheme)(Z,Ge.Schemas.http)||(0,Je.matchesScheme)(Z,Ge.Schemas.https))return Z;throw se}},get remoteName(){return(0,ne.getRemoteName)(ut.remote.authority)},get remoteAuthority(){return(0,qe.checkProposedApiEnabled)(Pe,"resolvers"),ut.remote.authority},get uiKind(){return ut.uiKind}};ut.environment.extensionTestsLocationURI||Object.freeze(pi);const vi=ut.remote.isRemote?H.ExtensionKind.Workspace:H.ExtensionKind.UI,Ri={createTestController(Z,se,ye){return Jt.createTestController(Z,se,ye)},createTestObserver(){return(0,qe.checkProposedApiEnabled)(Pe,"testObserver"),Jt.createTestObserver()},runTests(Z){return(0,qe.checkProposedApiEnabled)(Pe,"testObserver"),Jt.runTests(Z)},get onDidChangeTestResults(){return(0,qe.checkProposedApiEnabled)(Pe,"testObserver"),Jt.onResultsChanged},get testResults(){return(0,qe.checkProposedApiEnabled)(Pe,"testObserver"),Jt.results}},Oi={getExtension(Z){const se=ci.getExtensionDescription(Z);if(se)return new i.Extension(bt,Pe.identifier,se,vi)},get all(){return ci.getAllExtensionDescriptions().map(Z=>new i.Extension(bt,Pe.identifier,Z,vi))},get onDidChange(){return ci.onDidChange}},Fi={createDiagnosticCollection(Z){return qt.createDiagnosticCollection(Pe.identifier,Z)},get onDidChangeDiagnostics(){return qt.onDidChangeDiagnostics},getDiagnostics:Z=>qt.getDiagnostics(Z),getLanguages(){return Kt.getLanguages()},setTextDocumentLanguage(Z,se){return Kt.changeLanguage(Z.uri,se)},match(Z,se){return(0,L.score)(K.LanguageSelector.from(Z),se.uri,se.languageId,!0,se.notebook?.notebookType)},registerCodeActionsProvider(Z,se,ye){return st.registerCodeActionProvider(Pe,ct(Z),se,ye)},registerCodeLensProvider(Z,se){return st.registerCodeLensProvider(Pe,ct(Z),se)},registerDefinitionProvider(Z,se){return st.registerDefinitionProvider(Pe,ct(Z),se)},registerDeclarationProvider(Z,se){return st.registerDeclarationProvider(Pe,ct(Z),se)},registerImplementationProvider(Z,se){return st.registerImplementationProvider(Pe,ct(Z),se)},registerTypeDefinitionProvider(Z,se){return st.registerTypeDefinitionProvider(Pe,ct(Z),se)},registerHoverProvider(Z,se){return st.registerHoverProvider(Pe,ct(Z),se,Pe.identifier)},registerEvaluatableExpressionProvider(Z,se){return st.registerEvaluatableExpressionProvider(Pe,ct(Z),se,Pe.identifier)},registerInlineValuesProvider(Z,se){return st.registerInlineValuesProvider(Pe,ct(Z),se,Pe.identifier)},registerDocumentHighlightProvider(Z,se){return st.registerDocumentHighlightProvider(Pe,ct(Z),se)},registerLinkedEditingRangeProvider(Z,se){return st.registerLinkedEditingRangeProvider(Pe,ct(Z),se)},registerReferenceProvider(Z,se){return st.registerReferenceProvider(Pe,ct(Z),se)},registerRenameProvider(Z,se){return st.registerRenameProvider(Pe,ct(Z),se)},registerDocumentSymbolProvider(Z,se,ye){return st.registerDocumentSymbolProvider(Pe,ct(Z),se,ye)},registerWorkspaceSymbolProvider(Z){return st.registerWorkspaceSymbolProvider(Pe,Z)},registerDocumentFormattingEditProvider(Z,se){return st.registerDocumentFormattingEditProvider(Pe,ct(Z),se)},registerDocumentRangeFormattingEditProvider(Z,se){return st.registerDocumentRangeFormattingEditProvider(Pe,ct(Z),se)},registerOnTypeFormattingEditProvider(Z,se,ye,...Ze){return st.registerOnTypeFormattingEditProvider(Pe,ct(Z),se,[ye].concat(Ze))},registerDocumentSemanticTokensProvider(Z,se,ye){return st.registerDocumentSemanticTokensProvider(Pe,ct(Z),se,ye)},registerDocumentRangeSemanticTokensProvider(Z,se,ye){return st.registerDocumentRangeSemanticTokensProvider(Pe,ct(Z),se,ye)},registerSignatureHelpProvider(Z,se,ye,...Ze){return typeof ye=="object"?st.registerSignatureHelpProvider(Pe,ct(Z),se,ye):st.registerSignatureHelpProvider(Pe,ct(Z),se,typeof ye=="undefined"?[]:[ye,...Ze])},registerCompletionItemProvider(Z,se,...ye){return st.registerCompletionItemProvider(Pe,ct(Z),se,ye)},registerInlineCompletionItemProvider(Z,se){return(0,qe.checkProposedApiEnabled)(Pe,"inlineCompletions"),st.registerInlineCompletionsProvider(Pe,ct(Z),se)},registerDocumentLinkProvider(Z,se){return st.registerDocumentLinkProvider(Pe,ct(Z),se)},registerColorProvider(Z,se){return st.registerColorProvider(Pe,ct(Z),se)},registerFoldingRangeProvider(Z,se){return st.registerFoldingRangeProvider(Pe,ct(Z),se)},registerSelectionRangeProvider(Z,se){return st.registerSelectionRangeProvider(Pe,Z,se)},registerCallHierarchyProvider(Z,se){return st.registerCallHierarchyProvider(Pe,Z,se)},registerTypeHierarchyProvider(Z,se){return st.registerTypeHierarchyProvider(Pe,Z,se)},setLanguageConfiguration:(Z,se)=>st.setLanguageConfiguration(Pe,Z,se),getTokenInformationAtPosition(Z,se){return(0,qe.checkProposedApiEnabled)(Pe,"tokenInformation"),Kt.tokenAtPosition(Z,se)},registerInlayHintsProvider(Z,se){return st.registerInlayHintsProvider(Pe,Z,se)},createLanguageStatusItem(Z,se){return Kt.createLanguageStatusItem(Pe,Z,se)}},ui={get activeTextEditor(){return Ct.getActiveTextEditor()},get visibleTextEditors(){return Ct.getVisibleTextEditors()},get activeTerminal(){return at.activeTerminal},get terminals(){return at.terminals},async showTextDocument(Z,se,ye){const Ze=await(S.URI.isUri(Z)?Promise.resolve(Ei.openTextDocument(Z)):Promise.resolve(Z));return Ct.showTextDocument(Ze,se,ye)},createTextEditorDecorationType(Z){return Ct.createTextEditorDecorationType(Pe,Z)},onDidChangeActiveTextEditor(Z,se,ye){return Ct.onDidChangeActiveTextEditor(Z,se,ye)},onDidChangeVisibleTextEditors(Z,se,ye){return Ct.onDidChangeVisibleTextEditors(Z,se,ye)},onDidChangeTextEditorSelection(Z,se,ye){return Ct.onDidChangeTextEditorSelection(Z,se,ye)},onDidChangeTextEditorOptions(Z,se,ye){return Ct.onDidChangeTextEditorOptions(Z,se,ye)},onDidChangeTextEditorVisibleRanges(Z,se,ye){return Ct.onDidChangeTextEditorVisibleRanges(Z,se,ye)},onDidChangeTextEditorViewColumn(Z,se,ye){return Ct.onDidChangeTextEditorViewColumn(Z,se,ye)},onDidCloseTerminal(Z,se,ye){return at.onDidCloseTerminal(Z,se,ye)},onDidOpenTerminal(Z,se,ye){return at.onDidOpenTerminal(Z,se,ye)},onDidChangeActiveTerminal(Z,se,ye){return at.onDidChangeActiveTerminal(Z,se,ye)},onDidChangeTerminalDimensions(Z,se,ye){return(0,qe.checkProposedApiEnabled)(Pe,"terminalDimensions"),at.onDidChangeTerminalDimensions(Z,se,ye)},onDidChangeTerminalState(Z,se,ye){return at.onDidChangeTerminalState(Z,se,ye)},onDidWriteTerminalData(Z,se,ye){return(0,qe.checkProposedApiEnabled)(Pe,"terminalDataWriteEvent"),at.onDidWriteTerminalData(Z,se,ye)},get state(){return $e.state},onDidChangeWindowState(Z,se,ye){return $e.onDidChangeWindowState(Z,se,ye)},showInformationMessage(Z,...se){return Zt.showMessage(Pe,B.default.Info,Z,se[0],se.slice(1))},showWarningMessage(Z,...se){return Zt.showMessage(Pe,B.default.Warning,Z,se[0],se.slice(1))},showErrorMessage(Z,...se){return Zt.showMessage(Pe,B.default.Error,Z,se[0],se.slice(1))},showQuickPick(Z,se,ye){return zt.showQuickPick(Z,se,ye)},showWorkspaceFolderPick(Z){return zt.showWorkspaceFolderPick(Z)},showInputBox(Z,se){return zt.showInput(Z,se)},showOpenDialog(Z){return gi.showOpenDialog(Z)},showSaveDialog(Z){return gi.showSaveDialog(Z)},createStatusBarItem(Z,se,ye){let Ze,ht,yt;return typeof Z=="string"?(Ze=Z,ht=se,yt=ye):(ht=Z,yt=se),Gt.createStatusBarEntry(Pe,Ze,ht,yt)},setStatusBarMessage(Z,se){return Gt.setStatusBarMessage(Z,se)},withScmProgress(Z){return Ce.report("window.withScmProgress",Pe,"Use 'withProgress' instead."),fi.withProgress(Pe,{location:H.ProgressLocation.SourceControl},(se,ye)=>Z({report(Ze){}}))},withProgress(Z,se){return fi.withProgress(Pe,Z,se)},createOutputChannel(Z,se){return se&&(0,qe.checkProposedApiEnabled)(Pe,"outputChannelLanguage"),Dt.createOutputChannel(Z,se,Pe)},createWebviewPanel(Z,se,ye,Ze){return Yt.createWebviewPanel(Pe,Z,se,ye,Ze)},createWebviewTextEditorInset(Z,se,ye,Ze){return(0,qe.checkProposedApiEnabled)(Pe,"editorInsets"),bi.createWebviewEditorInset(Z,se,ye,Ze,Pe)},createTerminal(Z,se,ye){return typeof Z=="object"?"pty"in Z?at.createExtensionTerminal(Z):at.createTerminalFromOptions(Z):at.createTerminal(Z,se,ye)},registerTerminalLinkProvider(Z){return at.registerLinkProvider(Z)},registerTerminalProfileProvider(Z,se){return at.registerProfileProvider(Pe,Z,se)},registerTreeDataProvider(Z,se){return ii.registerTreeDataProvider(Z,se,Pe)},createTreeView(Z,se){return ii.createTreeView(Z,se,Pe)},registerWebviewPanelSerializer:(Z,se)=>Yt.registerWebviewPanelSerializer(Pe,Z,se),registerCustomEditorProvider:(Z,se,ye={})=>Di.registerCustomEditorProvider(Pe,Z,se,ye),registerFileDecorationProvider(Z){return gt.registerFileDecorationProvider(Z,Pe.identifier)},registerUriHandler(Z){return Ut.registerUriHandler(Pe.identifier,Z)},createQuickPick(){return zt.createQuickPick(Pe)},createInputBox(){return zt.createInputBox(Pe.identifier)},get activeColorTheme(){return mi.activeColorTheme},onDidChangeActiveColorTheme(Z,se,ye){return mi.onDidChangeActiveColorTheme(Z,se,ye)},registerWebviewViewProvider(Z,se,ye){return Ci.registerWebviewViewProvider(Pe,Z,se,ye?.webviewOptions)},get activeNotebookEditor(){return(0,qe.checkProposedApiEnabled)(Pe,"notebookEditor"),pt.activeNotebookEditor},onDidChangeActiveNotebookEditor(Z,se,ye){return(0,qe.checkProposedApiEnabled)(Pe,"notebookEditor"),pt.onDidChangeActiveNotebookEditor(Z,se,ye)},get visibleNotebookEditors(){return(0,qe.checkProposedApiEnabled)(Pe,"notebookEditor"),pt.visibleNotebookEditors},get onDidChangeVisibleNotebookEditors(){return(0,qe.checkProposedApiEnabled)(Pe,"notebookEditor"),pt.onDidChangeVisibleNotebookEditors},onDidChangeNotebookEditorSelection(Z,se,ye){return(0,qe.checkProposedApiEnabled)(Pe,"notebookEditor"),Xt.onDidChangeNotebookEditorSelection(Z,se,ye)},onDidChangeNotebookEditorVisibleRanges(Z,se,ye){return(0,qe.checkProposedApiEnabled)(Pe,"notebookEditor"),Xt.onDidChangeNotebookEditorVisibleRanges(Z,se,ye)},showNotebookDocument(Z,se){return(0,qe.checkProposedApiEnabled)(Pe,"notebookEditor"),pt.showNotebookDocument(Z,se)},registerExternalUriOpener(Z,se,ye){return(0,qe.checkProposedApiEnabled)(Pe,"externalUriOpener"),si.registerExternalUriOpener(Pe.identifier,Z,se,ye)},get tabGroups(){return(0,qe.checkProposedApiEnabled)(Pe,"tabs"),lt.tabGroups},getInlineCompletionItemController(Z){return(0,qe.checkProposedApiEnabled)(Pe,"inlineCompletions"),a.InlineCompletionController.get(Z)}},Ei={get rootPath(){return Ce.report("workspace.rootPath",Pe,"Please use 'workspace.workspaceFolders' instead. More details: https://aka.ms/vscode-eliminating-rootpath"),dt.getPath()},set rootPath(Z){throw k.readonly()},getWorkspaceFolder(Z){return dt.getWorkspaceFolder(Z)},get workspaceFolders(){return dt.getWorkspaceFolders()},get name(){return dt.name},set name(Z){throw k.readonly()},get workspaceFile(){return dt.workspaceFile},set workspaceFile(Z){throw k.readonly()},updateWorkspaceFolders:(Z,se,...ye)=>dt.updateWorkspaceFolders(Pe,Z,se||0,...ye),onDidChangeWorkspaceFolders:function(Z,se,ye){return dt.onDidChangeWorkspace(Z,se,ye)},asRelativePath:(Z,se)=>dt.getRelativePath(Z,se),findFiles:(Z,se,ye,Ze)=>dt.findFiles(Z,se,ye,Pe.identifier,Ze),findTextInFiles:(Z,se,ye,Ze)=>{(0,qe.checkProposedApiEnabled)(Pe,"findTextInFiles");let ht,yt;return typeof se=="object"?(ht=se,yt=ye):(ht={},yt=se,Ze=ye),dt.findTextInFiles(Z,ht||{},yt,Pe.identifier,Ze)},saveAll:Z=>dt.saveAll(Z),applyEdit(Z){return ki.applyWorkspaceEdit(Z)},createFileSystemWatcher:(Z,se,ye,Ze)=>Ht.createFileSystemWatcher(dt,Pe,Z,se,ye,Ze),get textDocuments(){return wt.getAllDocumentData().map(Z=>Z.document)},set textDocuments(Z){throw k.readonly()},openTextDocument(Z){let se;const ye=Z;if(typeof Z=="string")se=Promise.resolve(S.URI.file(Z));else if(S.URI.isUri(Z))se=Promise.resolve(Z);else if(!ye||typeof ye=="object")se=wt.createDocumentData(ye);else throw new Error("illegal argument - uriOrFileNameOrOptions");return se.then(Ze=>wt.ensureDocumentData(Ze).then(ht=>ht.document))},onDidOpenTextDocument:(Z,se,ye)=>wt.onDidAddDocument(Z,se,ye),onDidCloseTextDocument:(Z,se,ye)=>wt.onDidRemoveDocument(Z,se,ye),onDidChangeTextDocument:(Z,se,ye)=>wt.onDidChangeDocument(Z,se,ye),onDidSaveTextDocument:(Z,se,ye)=>wt.onDidSaveDocument(Z,se,ye),onWillSaveTextDocument:(Z,se,ye)=>Wt.getOnWillSaveTextDocumentEvent(Pe)(Z,se,ye),get notebookDocuments(){return pt.notebookDocuments.map(Z=>Z.apiNotebook)},async openNotebookDocument(Z,se){let ye;if(S.URI.isUri(Z))ye=Z,await pt.openNotebookDocument(Z);else if(typeof Z=="string")ye=S.URI.revive(await pt.createNotebookDocument({viewType:Z,content:se}));else throw new Error("Invalid arguments");return pt.getNotebookDocument(ye).apiNotebook},get onDidOpenNotebookDocument(){return pt.onDidOpenNotebookDocument},get onDidCloseNotebookDocument(){return pt.onDidCloseNotebookDocument},registerNotebookSerializer(Z,se,ye,Ze){return pt.registerNotebookSerializer(Pe,Z,se,ye,(0,qe.isProposedApiEnabled)(Pe,"notebookLiveShare")?Ze:void 0)},registerNotebookContentProvider:(Z,se,ye,Ze)=>((0,qe.checkProposedApiEnabled)(Pe,"notebookContentProvider"),pt.registerNotebookContentProvider(Pe,Z,se,ye,(0,qe.isProposedApiEnabled)(Pe,"notebookLiveShare")?Ze:void 0)),onDidChangeConfiguration:(Z,se,ye)=>Ot.onDidChangeConfiguration(Z,se,ye),getConfiguration(Z,se){return se=arguments.length===1?void 0:se,Ot.getConfiguration(Z,se,Pe)},registerTextDocumentContentProvider(Z,se){return Bt.registerTextDocumentContentProvider(Z,se)},registerTaskProvider:(Z,se)=>(Ce.report("window.registerTaskProvider",Pe,"Use the corresponding function on the 'tasks' namespace instead"),mt.registerTaskProvider(Pe,Z,se)),registerFileSystemProvider(Z,se,ye){return(0,kt.combinedDisposable)(li.registerFileSystemProvider(Pe,Z,se,ye),Tt.addFileSystemProvider(Z,se))},get fs(){return Tt.value},registerFileSearchProvider:(Z,se)=>((0,qe.checkProposedApiEnabled)(Pe,"fileSearchProvider"),Mt.registerFileSearchProvider(Z,se)),registerTextSearchProvider:(Z,se)=>((0,qe.checkProposedApiEnabled)(Pe,"textSearchProvider"),Mt.registerTextSearchProvider(Z,se)),registerRemoteAuthorityResolver:(Z,se)=>((0,qe.checkProposedApiEnabled)(Pe,"resolvers"),bt.registerRemoteAuthorityResolver(Z,se)),registerResourceLabelFormatter:Z=>((0,qe.checkProposedApiEnabled)(Pe,"resolvers"),Si.$registerResourceLabelFormatter(Z)),onDidCreateFiles:(Z,se,ye)=>Ht.onDidCreateFile(Z,se,ye),onDidDeleteFiles:(Z,se,ye)=>Ht.onDidDeleteFile(Z,se,ye),onDidRenameFiles:(Z,se,ye)=>Ht.onDidRenameFile(Z,se,ye),onWillCreateFiles:(Z,se,ye)=>Ht.getOnWillCreateFileEvent(Pe)(Z,se,ye),onWillDeleteFiles:(Z,se,ye)=>Ht.getOnWillDeleteFileEvent(Pe)(Z,se,ye),onWillRenameFiles:(Z,se,ye)=>Ht.getOnWillRenameFileEvent(Pe)(Z,se,ye),openTunnel:Z=>((0,qe.checkProposedApiEnabled)(Pe,"resolvers"),_e.openTunnel(Pe,Z).then(se=>{if(!se)throw new Error("cannot open tunnel");return se})),get tunnels(){return(0,qe.checkProposedApiEnabled)(Pe,"resolvers"),_e.getTunnels()},onDidChangeTunnels:(Z,se,ye)=>((0,qe.checkProposedApiEnabled)(Pe,"resolvers"),_e.onDidChangeTunnels(Z,se,ye)),registerPortAttributesProvider:(Z,se)=>((0,qe.checkProposedApiEnabled)(Pe,"portsAttributes"),_e.registerPortsAttributesProvider(Z,se)),registerTimelineProvider:(Z,se)=>((0,qe.checkProposedApiEnabled)(Pe,"timeline"),yi.registerTimelineProvider(Z,se,Pe.identifier,rt.converter)),get isTrusted(){return dt.trusted},requestWorkspaceTrust:Z=>((0,qe.checkProposedApiEnabled)(Pe,"workspaceTrust"),dt.requestWorkspaceTrust(Z)),onDidGrantWorkspaceTrust:(Z,se,ye)=>dt.onDidGrantWorkspaceTrust(Z,se,ye)},Mi={get inputBox(){return Ce.report("scm.inputBox",Pe,"Use 'SourceControl.inputBox' instead"),ni.getLastInputBox(Pe)},createSourceControl(Z,se,ye){return ni.createSourceControl(Pe,Z,se,ye)}},Ni={createCommentController(Z,se){return _i.createCommentController(Pe,Z,se)}},Li={get activeDebugSession(){return ot.activeDebugSession},get activeDebugConsole(){return ot.activeDebugConsole},get breakpoints(){return ot.breakpoints},onDidStartDebugSession(Z,se,ye){return ot.onDidStartDebugSession(Z,se,ye)},onDidTerminateDebugSession(Z,se,ye){return ot.onDidTerminateDebugSession(Z,se,ye)},onDidChangeActiveDebugSession(Z,se,ye){return ot.onDidChangeActiveDebugSession(Z,se,ye)},onDidReceiveDebugSessionCustomEvent(Z,se,ye){return ot.onDidReceiveDebugSessionCustomEvent(Z,se,ye)},onDidChangeBreakpoints(Z,se,ye){return ot.onDidChangeBreakpoints(Z,se,ye)},registerDebugConfigurationProvider(Z,se,ye){return ot.registerDebugConfigurationProvider(Z,se,ye||vt.DebugConfigurationProviderTriggerKind.Initial)},registerDebugAdapterDescriptorFactory(Z,se){return ot.registerDebugAdapterDescriptorFactory(Pe,Z,se)},registerDebugAdapterTrackerFactory(Z,se){return ot.registerDebugAdapterTrackerFactory(Z,se)},startDebugging(Z,se,ye){return!ye||typeof ye=="object"&&"configuration"in ye?ot.startDebugging(Z,se,{parentSession:ye}):ot.startDebugging(Z,se,ye||{})},stopDebugging(Z){return ot.stopDebugging(Z)},addBreakpoints(Z){return ot.addBreakpoints(Z)},removeBreakpoints(Z){return ot.removeBreakpoints(Z)},asDebugSourceUri(Z,se){return ot.asDebugSourceUri(Z,se)}},Ui={registerTaskProvider:(Z,se)=>mt.registerTaskProvider(Pe,Z,se),fetchTasks:Z=>mt.fetchTasks(Z),executeTask:Z=>mt.executeTask(Pe,Z),get taskExecutions(){return mt.taskExecutions},onDidStartTask:(Z,se,ye)=>mt.onDidStartTask(Z,se,ye),onDidEndTask:(Z,se,ye)=>mt.onDidEndTask(Z,se,ye),onDidStartTaskProcess:(Z,se,ye)=>mt.onDidStartTaskProcess(Z,se,ye),onDidEndTaskProcess:(Z,se,ye)=>mt.onDidEndTaskProcess(Z,se,ye)},Bi={createNotebookController(Z,se,ye,Ze,ht){return ti.createNotebookController(Pe,Z,se,ye,Ze,(0,qe.isProposedApiEnabled)(Pe,"notebookMessaging")?ht:void 0)},registerNotebookCellStatusBarItemProvider:(Z,se)=>pt.registerNotebookCellStatusBarItemProvider(Pe,Z,se),get onDidSaveNotebookDocument(){return(0,qe.checkProposedApiEnabled)(Pe,"notebookEditor"),ei.onDidSaveNotebookDocument},createNotebookEditorDecorationType(Z){return(0,qe.checkProposedApiEnabled)(Pe,"notebookEditorDecorationType"),Xt.createNotebookEditorDecorationType(Z)},createRendererMessaging(Z){return ai.createRendererMessaging(Pe,Z)},onDidChangeNotebookDocumentMetadata(Z,se,ye){return(0,qe.checkProposedApiEnabled)(Pe,"notebookEditor"),ei.onDidChangeNotebookDocumentMetadata(Z,se,ye)},onDidChangeNotebookCells(Z,se,ye){return(0,qe.checkProposedApiEnabled)(Pe,"notebookEditor"),pt.onDidChangeNotebookCells(Z,se,ye)},onDidChangeNotebookCellExecutionState(Z,se,ye){return(0,qe.checkProposedApiEnabled)(Pe,"notebookCellExecutionState"),ti.onDidChangeNotebookCellExecutionState(Z,se,ye)},onDidChangeCellOutputs(Z,se,ye){return(0,qe.checkProposedApiEnabled)(Pe,"notebookEditor"),pt.onDidChangeCellOutputs(Z,se,ye)},onDidChangeCellMetadata(Z,se,ye){return(0,qe.checkProposedApiEnabled)(Pe,"notebookEditor"),pt.onDidChangeCellMetadata(Z,se,ye)},createConcatTextDocument(Z,se){return(0,qe.checkProposedApiEnabled)(Pe,"notebookConcatTextDocument"),new ve.ExtHostNotebookConcatDocument(pt,wt,Z,se)}};return{version:ut.version,authentication:Pi,commands:Ai,comments:Ni,debug:Li,env:pi,extensions:Oi,languages:Fi,notebooks:Bi,scm:Mi,tasks:Ui,tests:Ri,window:ui,workspace:Ei,Breakpoint:H.Breakpoint,CallHierarchyIncomingCall:H.CallHierarchyIncomingCall,CallHierarchyItem:H.CallHierarchyItem,CallHierarchyOutgoingCall:H.CallHierarchyOutgoingCall,CancellationError:k.CancellationError,CancellationTokenSource:o.CancellationTokenSource,CandidatePortSource:u.CandidatePortSource,CodeAction:H.CodeAction,CodeActionKind:H.CodeActionKind,CodeActionTriggerKind:H.CodeActionTriggerKind,CodeLens:H.CodeLens,Color:H.Color,ColorInformation:H.ColorInformation,ColorPresentation:H.ColorPresentation,ColorThemeKind:H.ColorThemeKind,CommentMode:H.CommentMode,CommentThreadCollapsibleState:H.CommentThreadCollapsibleState,CommentThreadState:H.CommentThreadState,CompletionItem:H.CompletionItem,CompletionItemKind:H.CompletionItemKind,CompletionItemTag:H.CompletionItemTag,CompletionList:H.CompletionList,CompletionTriggerKind:H.CompletionTriggerKind,ConfigurationTarget:H.ConfigurationTarget,CustomExecution:H.CustomExecution,DebugAdapterExecutable:H.DebugAdapterExecutable,DebugAdapterInlineImplementation:H.DebugAdapterInlineImplementation,DebugAdapterNamedPipeServer:H.DebugAdapterNamedPipeServer,DebugAdapterServer:H.DebugAdapterServer,DebugConfigurationProviderTriggerKind:vt.DebugConfigurationProviderTriggerKind,DebugConsoleMode:H.DebugConsoleMode,DecorationRangeBehavior:H.DecorationRangeBehavior,Diagnostic:H.Diagnostic,DiagnosticRelatedInformation:H.DiagnosticRelatedInformation,DiagnosticSeverity:H.DiagnosticSeverity,DiagnosticTag:H.DiagnosticTag,Disposable:H.Disposable,DocumentHighlight:H.DocumentHighlight,DocumentHighlightKind:H.DocumentHighlightKind,DocumentLink:H.DocumentLink,DocumentSymbol:H.DocumentSymbol,EndOfLine:H.EndOfLine,EnvironmentVariableMutatorType:H.EnvironmentVariableMutatorType,EvaluatableExpression:H.EvaluatableExpression,InlineValueText:H.InlineValueText,InlineValueVariableLookup:H.InlineValueVariableLookup,InlineValueEvaluatableExpression:H.InlineValueEvaluatableExpression,InlineCompletionTriggerKind:H.InlineCompletionTriggerKind,EventEmitter:w.Emitter,ExtensionKind:H.ExtensionKind,ExtensionMode:H.ExtensionMode,ExternalUriOpenerPriority:H.ExternalUriOpenerPriority,FileChangeType:H.FileChangeType,FileDecoration:H.FileDecoration,FileSystemError:H.FileSystemError,FileType:v.FileType,FilePermission:v.FilePermission,FoldingRange:H.FoldingRange,FoldingRangeKind:H.FoldingRangeKind,FunctionBreakpoint:H.FunctionBreakpoint,InlineCompletionItem:H.InlineSuggestion,InlineCompletionList:H.InlineSuggestions,Hover:H.Hover,IndentAction:M.IndentAction,Location:H.Location,MarkdownString:H.MarkdownString,OverviewRulerLane:y.OverviewRulerLane,ParameterInformation:H.ParameterInformation,PortAutoForwardAction:H.PortAutoForwardAction,Position:H.Position,ProcessExecution:H.ProcessExecution,ProgressLocation:H.ProgressLocation,QuickInputButtons:H.QuickInputButtons,Range:H.Range,RelativePattern:H.RelativePattern,Selection:H.Selection,SelectionRange:H.SelectionRange,SemanticTokens:H.SemanticTokens,SemanticTokensBuilder:H.SemanticTokensBuilder,SemanticTokensEdit:H.SemanticTokensEdit,SemanticTokensEdits:H.SemanticTokensEdits,SemanticTokensLegend:H.SemanticTokensLegend,ShellExecution:H.ShellExecution,ShellQuoting:H.ShellQuoting,SignatureHelp:H.SignatureHelp,SignatureHelpTriggerKind:H.SignatureHelpTriggerKind,SignatureInformation:H.SignatureInformation,SnippetString:H.SnippetString,SourceBreakpoint:H.SourceBreakpoint,StandardTokenType:H.StandardTokenType,StatusBarAlignment:H.StatusBarAlignment,SymbolInformation:H.SymbolInformation,SymbolKind:H.SymbolKind,SymbolTag:H.SymbolTag,TabKind:u.TabKind,Task:H.Task,TaskGroup:H.TaskGroup,TaskPanelKind:H.TaskPanelKind,TaskRevealKind:H.TaskRevealKind,TaskScope:H.TaskScope,TerminalLink:H.TerminalLink,TerminalLocation:H.TerminalLocation,TerminalProfile:H.TerminalProfile,TextDocumentSaveReason:H.TextDocumentSaveReason,TextEdit:H.TextEdit,TextEditorCursorStyle:A.TextEditorCursorStyle,TextEditorLineNumbersStyle:H.TextEditorLineNumbersStyle,TextEditorRevealType:H.TextEditorRevealType,TextEditorSelectionChangeKind:H.TextEditorSelectionChangeKind,TextDocumentChangeReason:H.TextDocumentChangeReason,ThemeColor:H.ThemeColor,ThemeIcon:H.ThemeIcon,TreeItem:H.TreeItem,TreeItemCollapsibleState:H.TreeItemCollapsibleState,TypeHierarchyItem:H.TypeHierarchyItem,UIKind:m.UIKind,Uri:S.URI,ViewColumn:H.ViewColumn,WorkspaceEdit:H.WorkspaceEdit,InlayHint:H.InlayHint,InlayHintLabelPart:H.InlayHintLabelPart,InlayHintKind:H.InlayHintKind,RemoteAuthorityResolverError:H.RemoteAuthorityResolverError,ResolvedAuthority:H.ResolvedAuthority,SourceControlInputBoxValidationType:H.SourceControlInputBoxValidationType,ExtensionRuntime:H.ExtensionRuntime,TimelineItem:H.TimelineItem,NotebookRange:H.NotebookRange,NotebookCellKind:H.NotebookCellKind,NotebookCellExecutionState:H.NotebookCellExecutionState,NotebookCellData:H.NotebookCellData,NotebookData:H.NotebookData,NotebookRendererScript:H.NotebookRendererScript,NotebookCellStatusBarAlignment:H.NotebookCellStatusBarAlignment,NotebookEditorRevealType:H.NotebookEditorRevealType,NotebookCellOutput:H.NotebookCellOutput,NotebookCellOutputItem:H.NotebookCellOutputItem,NotebookCellStatusBarItem:H.NotebookCellStatusBarItem,NotebookControllerAffinity:H.NotebookControllerAffinity,PortAttributes:H.PortAttributes,LinkedEditingRanges:H.LinkedEditingRanges,TestResultState:H.TestResultState,TestRunRequest:H.TestRunRequest,TestMessage:H.TestMessage,TestTag:H.TestTag,TestRunProfileKind:H.TestRunProfileKind,TextSearchCompleteMessageType:Oe.TextSearchCompleteMessageType,TreeDataTransfer:H.TreeDataTransfer,TreeDataTransferItem:H.TreeDataTransferItem,CoveredCount:H.CoveredCount,FileCoverage:H.FileCoverage,StatementCoverage:H.StatementCoverage,BranchCoverage:H.BranchCoverage,FunctionCoverage:H.FunctionCoverage,WorkspaceTrustState:H.WorkspaceTrustState,LanguageStatusSeverity:H.LanguageStatusSeverity,QuickPickItemKind:H.QuickPickItemKind}}}e.createApiFactoryAndRegisterActors=Nt}),define(Ee[224],we([1,0,223,33,2,217,7,13,4]),function(J,e,o,k,w,B,S,A,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtHostExtensionService=void 0;class M extends B.RequireInterceptor{_installInterceptor(){}getModule(s,n){for(let f of this._alternatives){let D=f(s);if(D){s=D;break}}if(this._factories.has(s))return this._factories.get(s).load(s,n,()=>{throw new Error("CANNOT LOAD MODULE from here.")})}}class L extends k.AbstractExtHostExtensionService{constructor(){super(...arguments);this.extensionRuntime=S.ExtensionRuntime.Webworker}async _beforeAlmostReadyToRunExtensions(){const s=this._extHostContext.getProxy(y.MainContext.MainThreadConsole);u(s,this._initData.environment.isExtensionDevelopmentDebug);const n=this._instaService.invokeFunction(o.createApiFactoryAndRegisterActors);this._fakeModules=this._instaService.createInstance(M,n,this._registry),await this._fakeModules.install(),performance.mark("code/extHost/didInitAPI"),await this._waitForDebuggerAttachment()}_getEntryPoint(s){return s.browser}async _loadCommonJSModule(s,n,f){n=n.with({path:v(n.path,".js")}),s&&performance.mark(`code/extHost/willFetchExtensionCode/${s.value}`);const D=w.URI.revive(await this._mainThreadExtensionsProxy.$asBrowserUri(n)),T=await fetch(D.toString(!0));if(s&&performance.mark(`code/extHost/didFetchExtensionCode/${s.value}`),T.status!==200)throw new Error(T.statusText);const d=await T.text(),g=`${n.toString(!0)}#vscode-extension`,b=`${d}
//# sourceURL=${g}`;let l;try{l=new Function("module","exports","require",b)}catch(c){throw console.error(s?`Loading code for extension ${s.value} failed: ${c.message}`:`Loading code failed: ${c.message}`),console.error(`${n.toString(!0)}${typeof c.line=="number"?` line ${c.line}`:""}${typeof c.column=="number"?` column ${c.column}`:""}`),console.error(c),c}const I={},r={exports:I},i=c=>{const t=this._fakeModules.getModule(c,n);if(t===void 0)throw new Error(`Cannot load module '${c}'`);return t};try{return f.codeLoadingStart(),s&&performance.mark(`code/extHost/willLoadExtensionCode/${s.value}`),l(r,I,i),r.exports!==I?r.exports:I}finally{s&&performance.mark(`code/extHost/didLoadExtensionCode/${s.value}`),f.codeLoadingStop()}}async $setRemoteEnvironment(s){}async _waitForDebuggerAttachment(s=5e3){if(!this._initData.environment.isExtensionDevelopmentDebug)return;const n=Date.now()+s;for(;Date.now()<n&&!("__jsDebugIsReady"in globalThis);)await(0,A.timeout)(10)}}e.ExtHostExtensionService=L;function v(m,s){return m.endsWith(s)?m:m+s}function u(m,s){n("info","log"),n("log","log"),n("warn","warn"),n("error","error");function n(T,d){const g=console[T];console[T]=function(){m.$logExtensionHostMessage({type:"__$console",severity:d,arguments:D(arguments)}),s&&g.apply(console,arguments)}}const f=1e5;function D(T){const d=[],g=[];if(T.length)for(let b=0;b<T.length;b++){if(typeof T[b]=="undefined")T[b]="undefined";else if(T[b]instanceof Error){const l=T[b];l.stack?T[b]=l.stack:T[b]=l.toString()}g.push(T[b])}try{const b=JSON.stringify(g,function(l,I){if(I&&typeof I=="object"){if(d.indexOf(I)!==-1)return"[Circular]";d.push(I)}return I});return b.length>f?"Output omitted for a large object that exceeds the limits":b}catch(b){return`Output omitted for an object that cannot be inspected ('${b.toString()}')`}}}}),define(Ee[225],we([1,0,55,33,68,224]),function(J,e,o,k,w,B){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),(0,o.registerSingleton)(k.IExtHostExtensionService,B.ExtHostExtensionService),(0,o.registerSingleton)(w.IExtensionStoragePaths,w.ExtensionStoragePaths)}),define(Ee[236],we([1,0,21,5,91,218,211,17,69,9,2,220,225]),function(J,e,o,k,w,B,S,A,y,M,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.create=void 0;const v=self.close.bind(self);self.close=()=>console.trace("'close' has been blocked");const u=postMessage.bind(self);self.postMessage=()=>console.trace("'postMessage' has been blocked");function m(l){return/^(file|vscode-remote):/i.test(l)}const s=fetch.bind(self);function n(l){self.fetch=async function(I,r){return I instanceof Request||m(String(I))&&(I=(await l(L.URI.parse(String(I)))).toString(!0)),s(I,r)},self.XMLHttpRequest=class extends XMLHttpRequest{open(I,r,i,c,t){(async()=>{m(r.toString())&&(r=(await l(L.URI.parse(r.toString()))).toString(!0)),super.open(I,r,i??!0,c,t)})()}}}if(self.importScripts=()=>{throw new Error("'importScripts' has been blocked")},self.addEventListener=()=>console.trace("'addEventListener' has been blocked"),self.AMDLoader=void 0,self.NLSLoaderPlugin=void 0,self.define=void 0,self.require=void 0,self.webkitRequestFileSystem=void 0,self.webkitRequestFileSystemSync=void 0,self.webkitResolveLocalFileSystemSyncURL=void 0,self.webkitResolveLocalFileSystemURL=void 0,self.Worker){const l=self.Worker;Worker=function(I,r){if(/^file:/i.test(I.toString()))I=M.FileAccess.asBrowserUri(L.URI.parse(I.toString())).toString(!0);else if(/^vscode-remote:/i.test(I.toString()))throw new Error("Creating workers from remote extensions is currently not supported.");const c=`(${function(h){function _($){return typeof $=="string"||$ instanceof URL?String($).replace(/^file:\/\//i,"vscode-file://vscode-app"):$}const P=fetch.bind(self);self.fetch=function($,E){return $ instanceof Request?P($,E):P(_($),E)},self.XMLHttpRequest=class extends XMLHttpRequest{open($,E,z,V,W){return super.open($,_(E),z??!0,V,W)}};const R=importScripts.bind(self);self.importScripts=(...$)=>{R(...$.map(_))},R(h)}.toString()}('${I}'))`;r=r||{},r.name=r.name||A.basename(I.toString());const t=new Blob([c],{type:"application/javascript"}),a=URL.createObjectURL(t);return new l(a,r)}}else self.Worker=class extends S.NestedWorker{constructor(l,I){super(u,l,{name:A.basename(l.toString()),...I})}};const f=new class{constructor(){this.pid=void 0}exit(l){v()}async exists(l){return!0}async realpath(l){return l}};class D{constructor(){const I=new MessageChannel,r=new k.Emitter;let i=!1;u(I.port2,[I.port2]),I.port1.onmessage=c=>{const{data:t}=c;if(!(t instanceof ArrayBuffer)){console.warn("UNKNOWN data received",t);return}const a=o.VSBuffer.wrap(new Uint8Array(t,0,t.byteLength));if((0,w.isMessageOfType)(a,2)){i=!0,d("received terminate message from renderer");return}r.fire(a)},this.protocol={onMessage:r.event,send:c=>{if(!i){const t=c.buffer.buffer.slice(c.buffer.byteOffset,c.buffer.byteOffset+c.buffer.byteLength);I.port1.postMessage(t,[t])}}}}}function T(l){return new Promise(I=>{const r=l.onMessage(i=>{r.dispose();const c=JSON.parse(i.toString());l.send((0,w.createMessageOfType)(0)),I({protocol:l,initData:c})});l.send((0,w.createMessageOfType)(1))})}let d=l=>v();function g(l){return!!l&&typeof l=="object"&&l.type==="vscode.init"&&l.data instanceof Map}function b(){y.mark("code/extHost/willConnectToRenderer");const l=new D;return{onmessage(I){!g(I)||T(l.protocol).then(r=>{y.mark("code/extHost/didWaitForInitData");const i=new B.ExtensionHostMain(r.protocol,r.initData,f,null,I.data);n(c=>i.asBrowserUri(c)),d=c=>i.terminate(c)})}}}e.create=b})}).call(this);
//# sourceMappingURL=extensionHostWorker.js.map