/*!-------------------------------------------------------- * Copyright (C) Microsoft Corporation. All rights reserved. *--------------------------------------------------------*/(function(){var De=["exports","require","vs/base/common/uri","vs/platform/instantiation/common/instantiation","vs/base/common/event","vs/workbench/api/common/extHost.protocol","vs/workbench/api/common/extHostTypes","vs/base/common/lifecycle","vs/workbench/api/common/extHostTypeConverters","vs/base/common/types","vs/base/common/strings","vs/platform/log/common/log","vs/base/common/errors","vs/base/common/network","vs/workbench/api/common/extHostRpcService","vs/base/common/async","vs/nls","vs/nls!vs/workbench/api/worker/extensionHostWorker","vs/base/common/arrays","vs/base/common/path","vs/base/common/cancellation","vs/base/common/platform","vs/base/common/resources","vs/base/common/objects","vs/base/common/buffer","vs/platform/extensions/common/extensions","vs/workbench/api/common/extHostInitDataService","vs/workbench/services/extensions/common/extensions","vs/base/common/map","vs/base/common/severity","vs/platform/registry/common/platform","vs/workbench/api/common/extHostWorkspace","vs/workbench/api/common/extHostConfiguration","vs/workbench/api/common/extHostExtensionService","vs/base/common/glob","vs/platform/files/common/files","vs/workbench/api/common/extHostFileSystemInfo","vs/workbench/api/common/extHostCommands","vs/base/common/uuid","vs/base/common/extpath","vs/platform/configuration/common/configuration","vs/platform/contextkey/common/contextkey","vs/workbench/contrib/testing/common/testId","vs/workbench/services/extensions/common/proxyIdentifier","vs/workbench/services/search/common/search","vs/base/common/errorMessage","vs/base/common/ternarySearchTree","vs/base/common/assert","vs/base/common/process","vs/platform/workspace/common/workspace","vs/workbench/api/common/extHostUriTransformerService","vs/workbench/contrib/testing/common/testTypes","vs/editor/common/core/range","vs/workbench/api/common/extHostDocumentsAndEditors","vs/workbench/api/common/extHostEditorTabs","vs/workbench/api/common/extHostFileSystemConsumer","vs/workbench/api/common/extHostTerminalService","vs/workbench/api/common/extHostWebview","vs/base/common/decorators","vs/platform/instantiation/common/extensions","vs/platform/instantiation/common/serviceCollection","vs/platform/remote/common/remoteHosts","vs/platform/theme/common/themeService","vs/workbench/api/common/cache","vs/workbench/api/common/extHostTunnelService","vs/workbench/common/webview","vs/workbench/contrib/notebook/common/notebookCommon","vs/workbench/contrib/testing/common/testItemCollection","vs/workbench/services/extensions/common/extensionHostProtocol","vs/workbench/api/common/extHostTelemetry","vs/editor/common/languages","vs/workbench/api/common/extHostApiDeprecationService","vs/workbench/api/common/extHostLocalizationService","vs/workbench/api/common/extHostSecretState","vs/workbench/api/common/extHostStorage","vs/workbench/api/common/extHostStoragePaths","vs/base/common/performance","vs/base/common/collections","vs/base/common/idGenerator","vs/base/common/mime","vs/base/common/marshalling","vs/base/common/htmlContent","vs/base/common/labels","vs/editor/common/services/semanticTokensDto","vs/platform/instantiation/common/descriptors","vs/platform/extensionManagement/common/extensionManagement","vs/platform/markers/common/markers","vs/platform/opener/common/opener","vs/platform/jsonschemas/common/jsonContributionRegistry","vs/platform/configuration/common/configurationRegistry","vs/platform/remote/common/remoteAuthorityResolver","vs/workbench/common/editor","vs/workbench/api/common/extHostTestingPrivateApi","vs/workbench/services/editor/common/editorGroupsService","vs/workbench/api/common/extHostDocumentData","vs/workbench/api/common/extHostNotebookEditor","vs/workbench/api/common/extHostTestItem","vs/workbench/api/common/extHostTextEditor","vs/workbench/api/common/extHostDecorations","vs/workbench/api/common/extHostWindow","vs/workbench/api/common/extHostOutput","vs/workbench/services/search/common/searchExtTypes","vs/workbench/api/common/extHostTask","vs/workbench/api/common/extHostVariableResolverService","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/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/base/common/observableValue","vs/base/common/filters","vs/base/common/iconLabels","vs/base/common/codicons","vs/base/common/comparers","vs/base/common/uriIpc","vs/editor/common/languageSelector","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/extensionManagement/common/extensionManagement","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/taskDefinitionRegistry","vs/nls!vs/workbench/contrib/tasks/common/tasks","vs/nls!vs/workbench/services/configurationResolver/common/variableResolver","vs/nls!vs/workbench/services/extensions/common/extensionsRegistry","vs/nls!vs/workbench/services/search/common/queryBuilder","vs/platform/extensions/common/extensionValidator","vs/platform/instantiation/common/graph","vs/platform/environment/common/environment","vs/platform/instantiation/common/instantiationService","vs/base/common/linkedList","vs/platform/notification/common/notification","vs/platform/product/common/productService","vs/platform/progress/common/progress","vs/platform/configuration/common/configurationModels","vs/platform/extensionManagement/common/extensionManagementUtil","vs/platform/telemetry/common/commonProperties","vs/platform/telemetry/common/telemetry","vs/platform/telemetry/common/telemetryUtils","vs/platform/terminal/common/terminalDataBuffering","vs/platform/theme/common/theme","vs/platform/tunnel/common/tunnel","vs/platform/workspace/common/editSessions","vs/platform/workspace/common/virtualWorkspace","vs/workbench/api/common/extHostMemento","vs/workbench/api/common/extHostNotebookDocuments","vs/workbench/api/common/extHostSecrets","vs/workbench/api/common/extHostWebviewMessaging","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/terminal/common/environmentVariableShared","vs/workbench/services/configurationResolver/common/configurationResolver","vs/workbench/services/configurationResolver/common/variableResolver","vs/workbench/services/editor/common/editorService","vs/workbench/services/environment/common/environmentService","vs/workbench/services/extensions/common/extensionDescriptionRegistry","vs/workbench/api/common/extHostExtensionActivator","vs/workbench/api/common/extHostLogService","vs/workbench/api/common/extHostTheming","vs/base/common/functional","vs/workbench/api/common/extHostDocumentSaveParticipant","vs/workbench/api/common/extHostNotebookDocument","vs/workbench/api/common/extHostNotebookEditors","vs/workbench/api/common/extHostProgress","vs/workbench/services/extensions/common/extensionsApiProposals","vs/workbench/services/extensions/common/extensionsRegistry","vs/workbench/contrib/tasks/common/taskDefinitionRegistry","vs/workbench/contrib/tasks/common/tasks","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/extHostConsoleForwarder","vs/workbench/api/common/extHostDiagnostics","vs/workbench/api/common/extHostDialogs","vs/workbench/api/common/extHostDocumentContentProviders","vs/workbench/api/common/extHostDocuments","vs/base/common/lazy","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/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/base/common/hash","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/api/worker/extHostConsoleForwarder","vs/workbench/services/extensions/common/rpcProtocol","vs/workbench/services/extensions/worker/polyfillNestedWorker","vs/workbench/services/output/common/output","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/base/common/semver/semver","vs/editor/common/model/mirrorTextModel","vs/editor/common/core/position","vs/editor/common/languages/linkComputer","vs/editor/common/core/selection","vs/editor/common/model/textModelSearch","vs/editor/common/model","vs/workbench/api/worker/extensionHostWorker"],Ce=function(ne){for(var e=[],i=0,D=ne.length;i{let O=null,b=null;if(typeof T.value=="function"?(O="value",b=T.value):typeof T.get=="function"&&(O="get",b=T.get),!b)throw new Error("not supported");T[O]=y(b,_)}}e.createDecorator=i;function D(y,A,_){let T=null,O=null;if(typeof _.value=="function"?(T="value",O=_.value,O.length!==0&&console.warn("Memoize should only be used in functions with zero parameters")):typeof _.get=="function"&&(T="get",O=_.get),!O)throw new Error("not supported");const b=`$memoize$${A}`;_[T]=function(...g){return this.hasOwnProperty(b)||Object.defineProperty(this,b,{configurable:!1,enumerable:!1,writable:!1,value:O.apply(this,g)}),this[b]}}e.memoize=D;function S(y,A,_){return i((T,O)=>{const b=`$debounce$${O}`,g=`$debounce$result$${O}`;return function(...E){this[g]||(this[g]=_?_():void 0),clearTimeout(this[b]),A&&(this[g]=A(this[g],...E),E=[this[g]]),this[b]=setTimeout(()=>{T.apply(this,E),this[g]=_?_():void 0},y)}})}e.debounce=S;function N(y,A,_){return i((T,O)=>{const b=`$throttle$timer$${O}`,g=`$throttle$result$${O}`,E=`$throttle$lastRun$${O}`,m=`$throttle$pending$${O}`;return function(...t){if(this[g]||(this[g]=_?_():void 0),(this[E]===null||this[E]===void 0)&&(this[E]=-Number.MAX_VALUE),A&&(this[g]=A(this[g],...t)),this[m])return;const o=this[E]+y;o<=Date.now()?(this[E]=Date.now(),T.apply(this,[this[g]]),this[g]=_?_():void 0):(this[m]=!0,this[b]=setTimeout(()=>{this[m]=!1,this[E]=Date.now(),T.apply(this,[this[g]]),this[g]=_?_():void 0},o-Date.now()))}})}e.throttle=N}),define(De[78],Ce([1,0]),function(ne,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.defaultGenerator=e.IdGenerator=void 0;class i{constructor(S){this._prefix=S,this._lastId=0}nextId(){return this._prefix+ ++this._lastId}}e.IdGenerator=i,e.defaultGenerator=new i("id#")}),define(De[106],Ce([1,0]),function(ne,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 i;(function(r){r[r.None=0]="None",r[r.UnexpectedEndOfComment=1]="UnexpectedEndOfComment",r[r.UnexpectedEndOfString=2]="UnexpectedEndOfString",r[r.UnexpectedEndOfNumber=3]="UnexpectedEndOfNumber",r[r.InvalidUnicode=4]="InvalidUnicode",r[r.InvalidEscapeCharacter=5]="InvalidEscapeCharacter",r[r.InvalidCharacter=6]="InvalidCharacter"})(i=e.ScanError||(e.ScanError={}));var D;(function(r){r[r.OpenBraceToken=1]="OpenBraceToken",r[r.CloseBraceToken=2]="CloseBraceToken",r[r.OpenBracketToken=3]="OpenBracketToken",r[r.CloseBracketToken=4]="CloseBracketToken",r[r.CommaToken=5]="CommaToken",r[r.ColonToken=6]="ColonToken",r[r.NullKeyword=7]="NullKeyword",r[r.TrueKeyword=8]="TrueKeyword",r[r.FalseKeyword=9]="FalseKeyword",r[r.StringLiteral=10]="StringLiteral",r[r.NumericLiteral=11]="NumericLiteral",r[r.LineCommentTrivia=12]="LineCommentTrivia",r[r.BlockCommentTrivia=13]="BlockCommentTrivia",r[r.LineBreakTrivia=14]="LineBreakTrivia",r[r.Trivia=15]="Trivia",r[r.Unknown=16]="Unknown",r[r.EOF=17]="EOF"})(D=e.SyntaxKind||(e.SyntaxKind={}));var S;(function(r){r[r.InvalidSymbol=1]="InvalidSymbol",r[r.InvalidNumberFormat=2]="InvalidNumberFormat",r[r.PropertyNameExpected=3]="PropertyNameExpected",r[r.ValueExpected=4]="ValueExpected",r[r.ColonExpected=5]="ColonExpected",r[r.CommaExpected=6]="CommaExpected",r[r.CloseBraceExpected=7]="CloseBraceExpected",r[r.CloseBracketExpected=8]="CloseBracketExpected",r[r.EndOfFileExpected=9]="EndOfFileExpected",r[r.InvalidCommentToken=10]="InvalidCommentToken",r[r.UnexpectedEndOfComment=11]="UnexpectedEndOfComment",r[r.UnexpectedEndOfString=12]="UnexpectedEndOfString",r[r.UnexpectedEndOfNumber=13]="UnexpectedEndOfNumber",r[r.InvalidUnicode=14]="InvalidUnicode",r[r.InvalidEscapeCharacter=15]="InvalidEscapeCharacter",r[r.InvalidCharacter=16]="InvalidCharacter"})(S=e.ParseErrorCode||(e.ParseErrorCode={}));var N;(function(r){r.DEFAULT={allowTrailingComma:!0}})(N=e.ParseOptions||(e.ParseOptions={}));function y(r,c=!1){let n=0;const d=r.length;let l="",f=0,s=16,h=0;function v(M){let R=0,B=0;for(;R=48&&$<=57)B=B*16+$-48;else if($>=65&&$<=70)B=B*16+$-65+10;else if($>=97&&$<=102)B=B*16+$-97+10;else break;n++,R++}return R=d){M+=r.substring(R,n),h=2;break}const B=r.charCodeAt(n);if(B===34){M+=r.substring(R,n),n++;break}if(B===92){if(M+=r.substring(R,n),n++,n>=d){h=2;break}switch(r.charCodeAt(n++)){case 34:M+='"';break;case 92:M+="\\";break;case 47:M+="/";break;case 98:M+="\b";break;case 102:M+="\f";break;case 110:M+=` `;break;case 114:M+="\r";break;case 116:M+=" ";break;case 117:{const U=v(4);U>=0?M+=String.fromCharCode(U):h=4;break}default:h=5}R=n;continue}if(B>=0&&B<=31)if(_(B)){M+=r.substring(R,n),h=2;break}else h=6;n++}return M}function W(){if(l="",h=0,f=n,n>=d)return f=d,s=17;let M=r.charCodeAt(n);if(A(M)){do n++,l+=String.fromCharCode(M),M=r.charCodeAt(n);while(A(M));return s=15}if(_(M))return n++,l+=String.fromCharCode(M),M===13&&r.charCodeAt(n)===10&&(n++,l+=` `),s=14;switch(M){case 123:return n++,s=1;case 125:return n++,s=2;case 91:return n++,s=3;case 93:return n++,s=4;case 58:return n++,s=6;case 44:return n++,s=5;case 34:return n++,l=j(),s=10;case 47:{const R=n-1;if(r.charCodeAt(n+1)===47){for(n+=2;n=12&&M<=15);return M}return{setPosition:k,getPosition:()=>n,scan:c?P:W,getToken:()=>s,getTokenValue:()=>l,getTokenOffset:()=>f,getTokenLength:()=>n-f,getTokenError:()=>h}}e.createScanner=y;function A(r){return r===32||r===9||r===11||r===12||r===160||r===5760||r>=8192&&r<=8203||r===8239||r===8287||r===12288||r===65279}function _(r){return r===10||r===13||r===8232||r===8233}function T(r){return r>=48&&r<=57}var O;(function(r){r[r.nullCharacter=0]="nullCharacter",r[r.maxAsciiCharacter=127]="maxAsciiCharacter",r[r.lineFeed=10]="lineFeed",r[r.carriageReturn=13]="carriageReturn",r[r.lineSeparator=8232]="lineSeparator",r[r.paragraphSeparator=8233]="paragraphSeparator",r[r.nextLine=133]="nextLine",r[r.space=32]="space",r[r.nonBreakingSpace=160]="nonBreakingSpace",r[r.enQuad=8192]="enQuad",r[r.emQuad=8193]="emQuad",r[r.enSpace=8194]="enSpace",r[r.emSpace=8195]="emSpace",r[r.threePerEmSpace=8196]="threePerEmSpace",r[r.fourPerEmSpace=8197]="fourPerEmSpace",r[r.sixPerEmSpace=8198]="sixPerEmSpace",r[r.figureSpace=8199]="figureSpace",r[r.punctuationSpace=8200]="punctuationSpace",r[r.thinSpace=8201]="thinSpace",r[r.hairSpace=8202]="hairSpace",r[r.zeroWidthSpace=8203]="zeroWidthSpace",r[r.narrowNoBreakSpace=8239]="narrowNoBreakSpace",r[r.ideographicSpace=12288]="ideographicSpace",r[r.mathematicalSpace=8287]="mathematicalSpace",r[r.ogham=5760]="ogham",r[r._=95]="_",r[r.$=36]="$",r[r._0=48]="_0",r[r._1=49]="_1",r[r._2=50]="_2",r[r._3=51]="_3",r[r._4=52]="_4",r[r._5=53]="_5",r[r._6=54]="_6",r[r._7=55]="_7",r[r._8=56]="_8",r[r._9=57]="_9",r[r.a=97]="a",r[r.b=98]="b",r[r.c=99]="c",r[r.d=100]="d",r[r.e=101]="e",r[r.f=102]="f",r[r.g=103]="g",r[r.h=104]="h",r[r.i=105]="i",r[r.j=106]="j",r[r.k=107]="k",r[r.l=108]="l",r[r.m=109]="m",r[r.n=110]="n",r[r.o=111]="o",r[r.p=112]="p",r[r.q=113]="q",r[r.r=114]="r",r[r.s=115]="s",r[r.t=116]="t",r[r.u=117]="u",r[r.v=118]="v",r[r.w=119]="w",r[r.x=120]="x",r[r.y=121]="y",r[r.z=122]="z",r[r.A=65]="A",r[r.B=66]="B",r[r.C=67]="C",r[r.D=68]="D",r[r.E=69]="E",r[r.F=70]="F",r[r.G=71]="G",r[r.H=72]="H",r[r.I=73]="I",r[r.J=74]="J",r[r.K=75]="K",r[r.L=76]="L",r[r.M=77]="M",r[r.N=78]="N",r[r.O=79]="O",r[r.P=80]="P",r[r.Q=81]="Q",r[r.R=82]="R",r[r.S=83]="S",r[r.T=84]="T",r[r.U=85]="U",r[r.V=86]="V",r[r.W=87]="W",r[r.X=88]="X",r[r.Y=89]="Y",r[r.Z=90]="Z",r[r.ampersand=38]="ampersand",r[r.asterisk=42]="asterisk",r[r.at=64]="at",r[r.backslash=92]="backslash",r[r.bar=124]="bar",r[r.caret=94]="caret",r[r.closeBrace=125]="closeBrace",r[r.closeBracket=93]="closeBracket",r[r.closeParen=41]="closeParen",r[r.colon=58]="colon",r[r.comma=44]="comma",r[r.dot=46]="dot",r[r.doubleQuote=34]="doubleQuote",r[r.equals=61]="equals",r[r.exclamation=33]="exclamation",r[r.greaterThan=62]="greaterThan",r[r.lessThan=60]="lessThan",r[r.minus=45]="minus",r[r.openBrace=123]="openBrace",r[r.openBracket=91]="openBracket",r[r.openParen=40]="openParen",r[r.percent=37]="percent",r[r.plus=43]="plus",r[r.question=63]="question",r[r.semicolon=59]="semicolon",r[r.singleQuote=39]="singleQuote",r[r.slash=47]="slash",r[r.tilde=126]="tilde",r[r.backspace=8]="backspace",r[r.formFeed=12]="formFeed",r[r.byteOrderMark=65279]="byteOrderMark",r[r.tab=9]="tab",r[r.verticalTab=11]="verticalTab"})(O||(O={}));function b(r,c){const n=[],d=new Object;let l;const f={value:{},offset:0,length:0,type:"object",parent:void 0};let s=!1;function h(v,k,F,j){f.value=v,f.offset=k,f.length=F,f.type=j,f.colonOffset=void 0,l=f}try{w(r,{onObjectBegin:(v,k)=>{if(c<=v)throw d;l=void 0,s=c>v,n.push("")},onObjectProperty:(v,k,F)=>{if(c{if(c<=v)throw d;l=void 0,n.pop()},onArrayBegin:(v,k)=>{if(c<=v)throw d;l=void 0,n.push(0)},onArrayEnd:(v,k)=>{if(c<=v)throw d;l=void 0,n.pop()},onLiteralValue:(v,k,F)=>{if(c{if(c<=k)throw d;if(v===":"&&l&&l.type==="property")l.colonOffset=k,s=!1,l=void 0;else if(v===","){const j=n[n.length-1];typeof j=="number"?n[n.length-1]=j+1:(s=!0,n[n.length-1]=""),l=void 0}}})}catch(v){if(v!==d)throw v}return{path:n,previousNode:l,isAtPropertyKey:s,matches:v=>{let k=0;for(let F=0;k{const v={};s(v),f.push(l),l=v,d=null},onObjectProperty:v=>{d=v},onObjectEnd:()=>{l=f.pop()},onArrayBegin:()=>{const v=[];s(v),f.push(l),l=v,d=null},onArrayEnd:()=>{l=f.pop()},onLiteralValue:s,onError:(v,k,F)=>{c.push({error:v,offset:k,length:F})}},n),l[0]}e.parse=g;function E(r,c=[],n=N.DEFAULT){let d={type:"array",offset:-1,length:-1,children:[],parent:void 0};function l(v){d.type==="property"&&(d.length=v-d.offset,d=d.parent)}function f(v){return d.children.push(v),v}w(r,{onObjectBegin:v=>{d=f({type:"object",offset:v,length:-1,parent:d,children:[]})},onObjectProperty:(v,k,F)=>{d=f({type:"property",offset:k,length:-1,parent:d,children:[]}),d.children.push({type:"string",value:v,offset:k,length:F,parent:d})},onObjectEnd:(v,k)=>{d.length=v+k-d.offset,d=d.parent,l(v+k)},onArrayBegin:(v,k)=>{d=f({type:"array",offset:v,length:-1,parent:d,children:[]})},onArrayEnd:(v,k)=>{d.length=v+k-d.offset,d=d.parent,l(v+k)},onLiteralValue:(v,k,F)=>{f({type:I(v),offset:k,length:F,parent:d,value:v}),l(k+F)},onSeparator:(v,k,F)=>{d.type==="property"&&(v===":"?d.colonOffset=k:v===","&&l(k))},onError:(v,k,F)=>{c.push({error:v,offset:k,length:F})}},n);const h=d.children[0];return h&&delete h.parent,h}e.parseTree=E;function m(r,c){if(!r)return;let n=r;for(const d of c)if(typeof d=="string"){if(n.type!=="object"||!Array.isArray(n.children))return;let l=!1;for(const f of n.children)if(Array.isArray(f.children)&&f.children[0].value===d){n=f.children[1],l=!0;break}if(!l)return}else{const l=d;if(n.type!=="array"||l<0||!Array.isArray(n.children)||l>=n.children.length)return;n=n.children[l]}return n}e.findNodeAtLocation=m;function t(r){if(!r.parent||!r.parent.children)return[];const c=t(r.parent);if(r.parent.type==="property"){const n=r.parent.children[0].value;c.push(n)}else if(r.parent.type==="array"){const n=r.parent.children.indexOf(r);n!==-1&&c.push(n)}return c}e.getNodePath=t;function o(r){switch(r.type){case"array":return r.children.map(o);case"object":{const c=Object.create(null);for(const n of r.children){const d=n.children[1];d&&(c[n.children[0].value]=o(d))}return c}case"null":case"string":case"number":case"boolean":return r.value;default:return}}e.getNodeValue=o;function a(r,c,n=!1){return c>=r.offset&&cle(d.getTokenOffset(),d.getTokenLength()):()=>!0}function f(le){return le?fe=>le(fe,d.getTokenOffset(),d.getTokenLength()):()=>!0}const s=l(c.onObjectBegin),h=f(c.onObjectProperty),v=l(c.onObjectEnd),k=l(c.onArrayBegin),F=l(c.onArrayEnd),j=f(c.onLiteralValue),W=f(c.onSeparator),H=l(c.onComment),P=f(c.onError),M=n&&n.disallowComments,R=n&&n.allowTrailingComma;function B(){for(;;){const le=d.scan();switch(d.getTokenError()){case 4:$(14);break;case 5:$(15);break;case 3:$(13);break;case 1:M||$(11);break;case 2:$(12);break;case 6:$(16);break}switch(le){case 12:case 13:M?$(10):H();break;case 16:$(1);break;case 15:case 14:break;default:return le}}}function $(le,fe=[],Y=[]){if(P(le),fe.length+Y.length>0){let ge=d.getToken();for(;ge!==17;){if(fe.indexOf(ge)!==-1){B();break}else if(Y.indexOf(ge)!==-1)break;ge=B()}}}function U(le){const fe=d.getTokenValue();return le?j(fe):h(fe),B(),!0}function K(){switch(d.getToken()){case 11:{let le=0;try{le=JSON.parse(d.getTokenValue()),typeof le!="number"&&($(2),le=0)}catch{$(2)}j(le);break}case 7:j(null);break;case 8:j(!0);break;case 9:j(!1);break;default:return!1}return B(),!0}function te(){return d.getToken()!==10?($(3,[],[2,5]),!1):(U(!1),d.getToken()===6?(W(":"),B(),be()||$(4,[],[2,5])):$(5,[],[2,5]),!0)}function de(){s(),B();let le=!1;for(;d.getToken()!==2&&d.getToken()!==17;){if(d.getToken()===5){if(le||$(4,[],[]),W(","),B(),d.getToken()===2&&R)break}else le&&$(6,[],[]);te()||$(4,[],[2,5]),le=!0}return v(),d.getToken()!==2?$(7,[2],[]):B(),!0}function re(){k(),B();let le=!1;for(;d.getToken()!==4&&d.getToken()!==17;){if(d.getToken()===5){if(le||$(4,[],[]),W(","),B(),d.getToken()===4&&R)break}else le&&$(6,[],[]);be()||$(4,[],[4,5]),le=!0}return F(),d.getToken()!==4?$(8,[4],[]):B(),!0}function be(){switch(d.getToken()){case 3:return re();case 1:return de();case 10:return U(!0);default:return K()}}return B(),d.getToken()===17?n.allowEmptyContent?!0:($(4,[],[]),!1):be()?(d.getToken()!==17&&$(9,[],[]),!0):($(4,[],[]),!1)}e.visit=w;function u(r,c){const n=y(r),d=[];let l,f=0,s;do switch(s=n.getPosition(),l=n.scan(),l){case 12:case 13:case 17:f!==s&&d.push(r.substring(f,s)),c!==void 0&&d.push(n.getTokenValue().replace(/[^\r\n]/g,c)),f=n.getPosition();break}while(l!==17);return d.join("")}e.stripComments=u;function I(r){switch(typeof r){case"boolean":return"boolean";case"number":return"number";case"string":return"string";case"object":{if(r){if(Array.isArray(r))return"array"}else return"null";return"object"}default:return"null"}}e.getNodeType=I}),define(De[28],Ce([1,0]),function(ne,e){"use strict";var i,D,S;Object.defineProperty(e,"__esModule",{value:!0}),e.LRUCache=e.LinkedMap=e.Touch=e.ResourceSet=e.ResourceMap=e.setToString=e.mapToString=e.getOrSet=void 0;function N(m,t,o){let a=m.get(t);return a===void 0&&(a=o,m.set(t,a)),a}e.getOrSet=N;function y(m){const t=[];return m.forEach((o,a)=>{t.push(`${a} => ${o}`)}),`Map(${m.size}) {${t.join(", ")}}`}e.mapToString=y;function A(m){const t=[];return m.forEach(o=>{t.push(o)}),`Set(${m.size}) {${t.join(", ")}}`}e.setToString=A;class _{constructor(t,o){this.uri=t,this.value=o}}class T{constructor(t,o){this[i]="ResourceMap",t instanceof T?(this.map=new Map(t.map),this.toKey=o??T.defaultToKey):(this.map=new Map,this.toKey=t??T.defaultToKey)}set(t,o){return this.map.set(this.toKey(t),new _(t,o)),this}get(t){return this.map.get(this.toKey(t))?.value}has(t){return this.map.has(this.toKey(t))}get size(){return this.map.size}clear(){this.map.clear()}delete(t){return this.map.delete(this.toKey(t))}forEach(t,o){typeof o<"u"&&(t=t.bind(o));for(const[a,p]of this.map)t(p.value,p.uri,this)}*values(){for(const t of this.map.values())yield t.value}*keys(){for(const t of this.map.values())yield t.uri}*entries(){for(const t of this.map.values())yield[t.uri,t.value]}*[(i=Symbol.toStringTag,Symbol.iterator)](){for(const[,t]of this.map)yield[t.uri,t.value]}}e.ResourceMap=T,T.defaultToKey=m=>m.toString();class O{constructor(t,o){this[D]="ResourceSet",!t||typeof t=="function"?this._map=new T(t):(this._map=new T(o),t.forEach(this.add,this))}get size(){return this._map.size}add(t){return this._map.set(t,t),this}clear(){this._map.clear()}delete(t){return this._map.delete(t)}forEach(t,o){this._map.forEach((a,p)=>t.call(o,p,p,this))}has(t){return this._map.has(t)}entries(){return this._map.entries()}keys(){return this._map.keys()}values(){return this._map.keys()}[(D=Symbol.toStringTag,Symbol.iterator)](){return this.keys()}}e.ResourceSet=O;var b;(function(m){m[m.None=0]="None",m[m.AsOld=1]="AsOld",m[m.AsNew=2]="AsNew"})(b=e.Touch||(e.Touch={}));class g{constructor(){this[S]="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(t){return this._map.has(t)}get(t,o=0){const a=this._map.get(t);if(!!a)return o!==0&&this.touch(a,o),a.value}set(t,o,a=0){let p=this._map.get(t);if(p)p.value=o,a!==0&&this.touch(p,a);else{switch(p={key:t,value:o,next:void 0,previous:void 0},a){case 0:this.addItemLast(p);break;case 1:this.addItemFirst(p);break;case 2:this.addItemLast(p);break;default:this.addItemLast(p);break}this._map.set(t,p),this._size++}return this}delete(t){return!!this.remove(t)}remove(t){const o=this._map.get(t);if(!!o)return this._map.delete(t),this.removeItem(o),this._size--,o.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");const t=this._head;return this._map.delete(t.key),this.removeItem(t),this._size--,t.value}forEach(t,o){const a=this._state;let p=this._head;for(;p;){if(o?t.bind(o)(p.value,p.key,this):t(p.value,p.key,this),this._state!==a)throw new Error("LinkedMap got modified during iteration.");p=p.next}}keys(){const t=this,o=this._state;let a=this._head;const p={[Symbol.iterator](){return p},next(){if(t._state!==o)throw new Error("LinkedMap got modified during iteration.");if(a){const w={value:a.key,done:!1};return a=a.next,w}else return{value:void 0,done:!0}}};return p}values(){const t=this,o=this._state;let a=this._head;const p={[Symbol.iterator](){return p},next(){if(t._state!==o)throw new Error("LinkedMap got modified during iteration.");if(a){const w={value:a.value,done:!1};return a=a.next,w}else return{value:void 0,done:!0}}};return p}entries(){const t=this,o=this._state;let a=this._head;const p={[Symbol.iterator](){return p},next(){if(t._state!==o)throw new Error("LinkedMap got modified during iteration.");if(a){const w={value:[a.key,a.value],done:!1};return a=a.next,w}else return{value:void 0,done:!0}}};return p}[(S=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(t){if(t>=this.size)return;if(t===0){this.clear();return}let o=this._head,a=this.size;for(;o&&a>t;)this._map.delete(o.key),o=o.next,a--;this._head=o,this._size=a,o&&(o.previous=void 0),this._state++}addItemFirst(t){if(!this._head&&!this._tail)this._tail=t;else if(this._head)t.next=this._head,this._head.previous=t;else throw new Error("Invalid list");this._head=t,this._state++}addItemLast(t){if(!this._head&&!this._tail)this._head=t;else if(this._tail)t.previous=this._tail,this._tail.next=t;else throw new Error("Invalid list");this._tail=t,this._state++}removeItem(t){if(t===this._head&&t===this._tail)this._head=void 0,this._tail=void 0;else if(t===this._head){if(!t.next)throw new Error("Invalid list");t.next.previous=void 0,this._head=t.next}else if(t===this._tail){if(!t.previous)throw new Error("Invalid list");t.previous.next=void 0,this._tail=t.previous}else{const o=t.next,a=t.previous;if(!o||!a)throw new Error("Invalid list");o.previous=a,a.next=o}t.next=void 0,t.previous=void 0,this._state++}touch(t,o){if(!this._head||!this._tail)throw new Error("Invalid list");if(!(o!==1&&o!==2)){if(o===1){if(t===this._head)return;const a=t.next,p=t.previous;t===this._tail?(p.next=void 0,this._tail=p):(a.previous=p,p.next=a),t.previous=void 0,t.next=this._head,this._head.previous=t,this._head=t,this._state++}else if(o===2){if(t===this._tail)return;const a=t.next,p=t.previous;t===this._head?(a.previous=void 0,this._head=a):(a.previous=p,p.next=a),t.next=void 0,t.previous=this._tail,this._tail.next=t,this._tail=t,this._state++}}}toJSON(){const t=[];return this.forEach((o,a)=>{t.push([a,o])}),t}fromJSON(t){this.clear();for(const[o,a]of t)this.set(o,a)}}e.LinkedMap=g;class E extends g{constructor(t,o=1){super(),this._limit=t,this._ratio=Math.min(Math.max(0,o),1)}get limit(){return this._limit}set limit(t){this._limit=t,this.checkTrim()}get ratio(){return this._ratio}set ratio(t){this._ratio=Math.min(Math.max(0,t),1),this.checkTrim()}get(t,o=2){return super.get(t,o)}peek(t){return super.get(t,0)}set(t,o){return super.set(t,o,2),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}}e.LRUCache=E}),function(ne,e){typeof exports=="object"&&typeof module<"u"?e(exports):typeof define=="function"&&define.amd?define(De[107],Ce([0]),e):(ne=typeof globalThis<"u"?globalThis:ne||self,e(ne.marked={}))}(this,function(ne){"use strict";function e(ke,ye){for(var Ie=0;Ieke.length)&&(ye=ke.length);for(var Ie=0,ae=new Array(ye);Ie=ke.length?{done:!0}:{done:!1,value:ke[ae++]}}}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 y(){return{async:!1,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}}ne.defaults=y();function A(ke){ne.defaults=ke}var _=/[&<>"']/,T=/[&<>"']/g,O=/[<>"']|&(?!#?\w+;)/,b=/[<>"']|&(?!#?\w+;)/g,g={"&":"&","<":"<",">":">",'"':""","'":"'"},E=function(ye){return g[ye]};function m(ke,ye){if(ye){if(_.test(ke))return ke.replace(T,E)}else if(O.test(ke))return ke.replace(b,E);return ke}var t=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function o(ke){return ke.replace(t,function(ye,Ie){return Ie=Ie.toLowerCase(),Ie==="colon"?":":Ie.charAt(0)==="#"?Ie.charAt(1)==="x"?String.fromCharCode(parseInt(Ie.substring(2),16)):String.fromCharCode(+Ie.substring(1)):""})}var a=/(^|[^\[])\^/g;function p(ke,ye){ke=typeof ke=="string"?ke:ke.source,ye=ye||"";var Ie={replace:function(ue,ee){return ee=ee.source||ee,ee=ee.replace(a,"$1"),ke=ke.replace(ue,ee),Ie},getRegex:function(){return new RegExp(ke,ye)}};return Ie}var w=/[^\w:]/g,u=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function I(ke,ye,Ie){if(ke){var ae;try{ae=decodeURIComponent(o(Ie)).replace(w,"").toLowerCase()}catch{return null}if(ae.indexOf("javascript:")===0||ae.indexOf("vbscript:")===0||ae.indexOf("data:")===0)return null}ye&&!u.test(Ie)&&(Ie=l(ye,Ie));try{Ie=encodeURI(Ie).replace(/%25/g,"%")}catch{return null}return Ie}var r={},c=/^[^:]+:\/*[^/]*$/,n=/^([^:]+:)[\s\S]*$/,d=/^([^:]+:\/*[^/]*)[\s\S]*$/;function l(ke,ye){r[" "+ke]||(c.test(ke)?r[" "+ke]=ke+"/":r[" "+ke]=v(ke,"/",!0)),ke=r[" "+ke];var Ie=ke.indexOf(":")===-1;return ye.substring(0,2)==="//"?Ie?ye:ke.replace(n,"$1")+ye:ye.charAt(0)==="/"?Ie?ye:ke.replace(d,"$1")+ye:ke+ye}var f={exec:function(){}};function s(ke){for(var ye=1,Ie,ae;ye=0&&C[V]==="\\";)z=!z;return z?"|":" |"}),ae=Ie.split(/ \|/),ue=0;if(ae[0].trim()||ae.shift(),ae.length>0&&!ae[ae.length-1].trim()&&ae.pop(),ae.length>ye)ae.splice(ye);else for(;ae.length1;)ye&1&&(Ie+=ke),ye>>=1,ke+=ke;return Ie+ke}function W(ke,ye,Ie,ae){var ue=ye.href,ee=ye.title?m(ye.title):null,Z=ke[1].replace(/\\([\[\]])/g,"$1");if(ke[0].charAt(0)!=="!"){ae.state.inLink=!0;var C={type:"link",raw:Ie,href:ue,title:ee,text:Z,tokens:ae.inlineTokens(Z)};return ae.state.inLink=!1,C}return{type:"image",raw:Ie,href:ue,title:ee,text:m(Z)}}function H(ke,ye){var Ie=ke.match(/^(\s+)(?:```)/);if(Ie===null)return ye;var ae=Ie[1];return ye.split(` `).map(function(ue){var ee=ue.match(/^\s+/);if(ee===null)return ue;var Z=ee[0];return Z.length>=ae.length?ue.slice(ae.length):ue}).join(` `)}var P=function(){function ke(Ie){this.options=Ie||ne.defaults}var ye=ke.prototype;return ye.space=function(ae){var ue=this.rules.block.newline.exec(ae);if(ue&&ue[0].length>0)return{type:"space",raw:ue[0]}},ye.code=function(ae){var ue=this.rules.block.code.exec(ae);if(ue){var ee=ue[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:ue[0],codeBlockStyle:"indented",text:this.options.pedantic?ee:v(ee,` `)}}},ye.fences=function(ae){var ue=this.rules.block.fences.exec(ae);if(ue){var ee=ue[0],Z=H(ee,ue[3]||"");return{type:"code",raw:ee,lang:ue[2]?ue[2].trim():ue[2],text:Z}}},ye.heading=function(ae){var ue=this.rules.block.heading.exec(ae);if(ue){var ee=ue[2].trim();if(/#$/.test(ee)){var Z=v(ee,"#");(this.options.pedantic||!Z||/ $/.test(Z))&&(ee=Z.trim())}return{type:"heading",raw:ue[0],depth:ue[1].length,text:ee,tokens:this.lexer.inline(ee)}}},ye.hr=function(ae){var ue=this.rules.block.hr.exec(ae);if(ue)return{type:"hr",raw:ue[0]}},ye.blockquote=function(ae){var ue=this.rules.block.blockquote.exec(ae);if(ue){var ee=ue[0].replace(/^ *>[ \t]?/gm,"");return{type:"blockquote",raw:ue[0],tokens:this.lexer.blockTokens(ee,[]),text:ee}}},ye.list=function(ae){var ue=this.rules.block.list.exec(ae);if(ue){var ee,Z,C,z,V,q,oe,ce,J,pe,Ee,Ne,xe=ue[1].trim(),Ze=xe.length>1,Ge={type:"list",raw:"",ordered:Ze,start:Ze?+xe.slice(0,-1):"",loose:!1,items:[]};xe=Ze?"\\d{1,9}\\"+xe.slice(-1):"\\"+xe,this.options.pedantic&&(xe=Ze?xe:"[*+-]");for(var Qe=new RegExp("^( {0,3}"+xe+")((?:[ ][^\\n]*)?(?:\\n|$))");ae&&(Ne=!1,!(!(ue=Qe.exec(ae))||this.rules.block.hr.test(ae)));){if(ee=ue[0],ae=ae.substring(ee.length),ce=ue[2].split(` `,1)[0],J=ae.split(` `,1)[0],this.options.pedantic?(z=2,Ee=ce.trimLeft()):(z=ue[2].search(/[^ ]/),z=z>4?1:z,Ee=ce.slice(z),z+=ue[1].length),q=!1,!ce&&/^ *$/.test(J)&&(ee+=J+` `,ae=ae.substring(J.length+1),Ne=!0),!Ne)for(var Fe=new RegExp("^ {0,"+Math.min(3,z-1)+"}(?:[*+-]|\\d{1,9}[.)])((?: [^\\n]*)?(?:\\n|$))"),dt=new RegExp("^ {0,"+Math.min(3,z-1)+"}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)"),X=new RegExp("^ {0,"+Math.min(3,z-1)+"}(?:```|~~~)"),Q=new RegExp("^ {0,"+Math.min(3,z-1)+"}#");ae&&(pe=ae.split(` `,1)[0],ce=pe,this.options.pedantic&&(ce=ce.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),!(X.test(ce)||Q.test(ce)||Fe.test(ce)||dt.test(ae)));){if(ce.search(/[^ ]/)>=z||!ce.trim())Ee+=` `+ce.slice(z);else if(!q)Ee+=` `+ce;else break;!q&&!ce.trim()&&(q=!0),ee+=pe+` `,ae=ae.substring(pe.length+1)}Ge.loose||(oe?Ge.loose=!0:/\n *\n *$/.test(ee)&&(oe=!0)),this.options.gfm&&(Z=/^\[[ xX]\] /.exec(Ee),Z&&(C=Z[0]!=="[ ] ",Ee=Ee.replace(/^\[[ xX]\] +/,""))),Ge.items.push({type:"list_item",raw:ee,task:!!Z,checked:C,loose:!1,text:Ee}),Ge.raw+=ee}Ge.items[Ge.items.length-1].raw=ee.trimRight(),Ge.items[Ge.items.length-1].text=Ee.trimRight(),Ge.raw=Ge.raw.trimRight();var ve=Ge.items.length;for(V=0;V1)return!0}return!1});!Ge.loose&&Ue.length&&je&&(Ge.loose=!0,Ge.items[V].loose=!0)}return Ge}},ye.html=function(ae){var ue=this.rules.block.html.exec(ae);if(ue){var ee={type:"html",raw:ue[0],pre:!this.options.sanitizer&&(ue[1]==="pre"||ue[1]==="script"||ue[1]==="style"),text:ue[0]};if(this.options.sanitize){var Z=this.options.sanitizer?this.options.sanitizer(ue[0]):m(ue[0]);ee.type="paragraph",ee.text=Z,ee.tokens=this.lexer.inline(Z)}return ee}},ye.def=function(ae){var ue=this.rules.block.def.exec(ae);if(ue){ue[3]&&(ue[3]=ue[3].substring(1,ue[3].length-1));var ee=ue[1].toLowerCase().replace(/\s+/g," ");return{type:"def",tag:ee,raw:ue[0],href:ue[2],title:ue[3]}}},ye.table=function(ae){var ue=this.rules.block.table.exec(ae);if(ue){var ee={type:"table",header:h(ue[1]).map(function(oe){return{text:oe}}),align:ue[2].replace(/^ *|\| *$/g,"").split(/ *\| */),rows:ue[3]&&ue[3].trim()?ue[3].replace(/\n[ \t]*$/,"").split(` `):[]};if(ee.header.length===ee.align.length){ee.raw=ue[0];var Z=ee.align.length,C,z,V,q;for(C=0;C/i.test(ue[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(ue[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(ue[0])&&(this.lexer.state.inRawBlock=!1),{type:this.options.sanitize?"text":"html",raw:ue[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(ue[0]):m(ue[0]):ue[0]}},ye.link=function(ae){var ue=this.rules.inline.link.exec(ae);if(ue){var ee=ue[2].trim();if(!this.options.pedantic&&/^$/.test(ee))return;var Z=v(ee.slice(0,-1),"\\");if((ee.length-Z.length)%2===0)return}else{var C=k(ue[2],"()");if(C>-1){var z=ue[0].indexOf("!")===0?5:4,V=z+ue[1].length+C;ue[2]=ue[2].substring(0,C),ue[0]=ue[0].substring(0,V).trim(),ue[3]=""}}var q=ue[2],oe="";if(this.options.pedantic){var ce=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(q);ce&&(q=ce[1],oe=ce[3])}else oe=ue[3]?ue[3].slice(1,-1):"";return q=q.trim(),/^$/.test(ee)?q=q.slice(1):q=q.slice(1,-1)),W(ue,{href:q&&q.replace(this.rules.inline._escapes,"$1"),title:oe&&oe.replace(this.rules.inline._escapes,"$1")},ue[0],this.lexer)}},ye.reflink=function(ae,ue){var ee;if((ee=this.rules.inline.reflink.exec(ae))||(ee=this.rules.inline.nolink.exec(ae))){var Z=(ee[2]||ee[1]).replace(/\s+/g," ");if(Z=ue[Z.toLowerCase()],!Z||!Z.href){var C=ee[0].charAt(0);return{type:"text",raw:C,text:C}}return W(ee,Z,ee[0],this.lexer)}},ye.emStrong=function(ae,ue,ee){ee===void 0&&(ee="");var Z=this.rules.inline.emStrong.lDelim.exec(ae);if(!!Z&&!(Z[3]&&ee.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 C=Z[1]||Z[2]||"";if(!C||C&&(ee===""||this.rules.inline.punctuation.exec(ee))){var z=Z[0].length-1,V,q,oe=z,ce=0,J=Z[0][0]==="*"?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(J.lastIndex=0,ue=ue.slice(-1*ae.length+z);(Z=J.exec(ue))!=null;)if(V=Z[1]||Z[2]||Z[3]||Z[4]||Z[5]||Z[6],!!V){if(q=V.length,Z[3]||Z[4]){oe+=q;continue}else if((Z[5]||Z[6])&&z%3&&!((z+q)%3)){ce+=q;continue}if(oe-=q,!(oe>0)){if(q=Math.min(q,q+oe+ce),Math.min(z,q)%2){var pe=ae.slice(1,z+Z.index+q);return{type:"em",raw:ae.slice(0,z+Z.index+q+1),text:pe,tokens:this.lexer.inlineTokens(pe)}}var Ee=ae.slice(2,z+Z.index+q-1);return{type:"strong",raw:ae.slice(0,z+Z.index+q+1),text:Ee,tokens:this.lexer.inlineTokens(Ee)}}}}}},ye.codespan=function(ae){var ue=this.rules.inline.code.exec(ae);if(ue){var ee=ue[2].replace(/\n/g," "),Z=/[^ ]/.test(ee),C=/^ /.test(ee)&&/ $/.test(ee);return Z&&C&&(ee=ee.substring(1,ee.length-1)),ee=m(ee,!0),{type:"codespan",raw:ue[0],text:ee}}},ye.br=function(ae){var ue=this.rules.inline.br.exec(ae);if(ue)return{type:"br",raw:ue[0]}},ye.del=function(ae){var ue=this.rules.inline.del.exec(ae);if(ue)return{type:"del",raw:ue[0],text:ue[2],tokens:this.lexer.inlineTokens(ue[2])}},ye.autolink=function(ae,ue){var ee=this.rules.inline.autolink.exec(ae);if(ee){var Z,C;return ee[2]==="@"?(Z=m(this.options.mangle?ue(ee[1]):ee[1]),C="mailto:"+Z):(Z=m(ee[1]),C=Z),{type:"link",raw:ee[0],text:Z,href:C,tokens:[{type:"text",raw:Z,text:Z}]}}},ye.url=function(ae,ue){var ee;if(ee=this.rules.inline.url.exec(ae)){var Z,C;if(ee[2]==="@")Z=m(this.options.mangle?ue(ee[0]):ee[0]),C="mailto:"+Z;else{var z;do z=ee[0],ee[0]=this.rules.inline._backpedal.exec(ee[0])[0];while(z!==ee[0]);Z=m(ee[0]),ee[1]==="www."?C="http://"+Z:C=Z}return{type:"link",raw:ee[0],text:Z,href:C,tokens:[{type:"text",raw:Z,text:Z}]}}},ye.inlineText=function(ae,ue){var ee=this.rules.inline.text.exec(ae);if(ee){var Z;return this.lexer.state.inRawBlock?Z=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(ee[0]):m(ee[0]):ee[0]:Z=m(this.options.smartypants?ue(ee[0]):ee[0]),{type:"text",raw:ee[0],text:Z}}},ke}(),M={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}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/,html:"^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))",def:/^ {0,3}\[(label)\]: *(?:\n *)?]+)>?(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/,table:f,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,text:/^[^\n]+/};M._label=/(?!\s*\])(?:\\.|[^\[\]\\])+/,M._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,M.def=p(M.def).replace("label",M._label).replace("title",M._title).getRegex(),M.bullet=/(?:[*+-]|\d{1,9}[.)])/,M.listItemStart=p(/^( *)(bull) */).replace("bull",M.bullet).getRegex(),M.list=p(M.list).replace(/bull/g,M.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+M.def.source+")").getRegex(),M._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",M._comment=/|$)/,M.html=p(M.html,"i").replace("comment",M._comment).replace("tag",M._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),M.paragraph=p(M._paragraph).replace("hr",M.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",")|<(?:script|pre|style|textarea|!--)").replace("tag",M._tag).getRegex(),M.blockquote=p(M.blockquote).replace("paragraph",M.paragraph).getRegex(),M.normal=s({},M),M.gfm=s({},M.normal,{table:"^ *([^\\n ].*\\|.*)\\n {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)(?:\\| *)?(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),M.gfm.table=p(M.gfm.table).replace("hr",M.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",")|<(?:script|pre|style|textarea|!--)").replace("tag",M._tag).getRegex(),M.gfm.paragraph=p(M._paragraph).replace("hr",M.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("table",M.gfm.table).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",M._tag).getRegex(),M.pedantic=s({},M.normal,{html:p(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",M._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:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:f,paragraph:p(M.normal._paragraph).replace("hr",M.hr).replace("heading",` *#{1,6} *[^ ]`).replace("lheading",M.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var R={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:f,tag:"^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\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:f,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\?@\\[\\]`^{|}~",R.punctuation=p(R.punctuation).replace(/punctuation/g,R._punctuation).getRegex(),R.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g,R.escapedEmSt=/\\\*|\\_/g,R._comment=p(M._comment).replace("(?:-->|$)","-->").getRegex(),R.emStrong.lDelim=p(R.emStrong.lDelim).replace(/punct/g,R._punctuation).getRegex(),R.emStrong.rDelimAst=p(R.emStrong.rDelimAst,"g").replace(/punct/g,R._punctuation).getRegex(),R.emStrong.rDelimUnd=p(R.emStrong.rDelimUnd,"g").replace(/punct/g,R._punctuation).getRegex(),R._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,R._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,R._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])?)+(?![-_])/,R.autolink=p(R.autolink).replace("scheme",R._scheme).replace("email",R._email).getRegex(),R._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,R.tag=p(R.tag).replace("comment",R._comment).replace("attribute",R._attribute).getRegex(),R._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,R._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,R._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,R.link=p(R.link).replace("label",R._label).replace("href",R._href).replace("title",R._title).getRegex(),R.reflink=p(R.reflink).replace("label",R._label).replace("ref",M._label).getRegex(),R.nolink=p(R.nolink).replace("ref",M._label).getRegex(),R.reflinkSearch=p(R.reflinkSearch,"g").replace("reflink",R.reflink).replace("nolink",R.nolink).getRegex(),R.normal=s({},R),R.pedantic=s({},R.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:p(/^!?\[(label)\]\((.*?)\)/).replace("label",R._label).getRegex(),reflink:p(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",R._label).getRegex()}),R.gfm=s({},R.normal,{escape:p(R.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]*?(?:(?=[\\.5&&(ae="x"+ae.toString(16)),ye+="&#"+ae+";";return ye}var U=function(){function ke(Ie){this.tokens=[],this.tokens.links=Object.create(null),this.options=Ie||ne.defaults,this.options.tokenizer=this.options.tokenizer||new P,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 ae={block:M.normal,inline:R.normal};this.options.pedantic?(ae.block=M.pedantic,ae.inline=R.pedantic):this.options.gfm&&(ae.block=M.gfm,this.options.breaks?ae.inline=R.breaks:ae.inline=R.gfm),this.tokenizer.rules=ae}ke.lex=function(ae,ue){var ee=new ke(ue);return ee.lex(ae)},ke.lexInline=function(ae,ue){var ee=new ke(ue);return ee.inlineTokens(ae)};var ye=ke.prototype;return ye.lex=function(ae){ae=ae.replace(/\r\n|\r/g,` `),this.blockTokens(ae,this.tokens);for(var ue;ue=this.inlineQueue.shift();)this.inlineTokens(ue.src,ue.tokens);return this.tokens},ye.blockTokens=function(ae,ue){var ee=this;ue===void 0&&(ue=[]),this.options.pedantic?ae=ae.replace(/\t/g," ").replace(/^ +$/gm,""):ae=ae.replace(/^( *)(\t+)/gm,function(oe,ce,J){return ce+" ".repeat(J.length)});for(var Z,C,z,V;ae;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(function(oe){return(Z=oe.call({lexer:ee},ae,ue))?(ae=ae.substring(Z.raw.length),ue.push(Z),!0):!1}))){if(Z=this.tokenizer.space(ae)){ae=ae.substring(Z.raw.length),Z.raw.length===1&&ue.length>0?ue[ue.length-1].raw+=` `:ue.push(Z);continue}if(Z=this.tokenizer.code(ae)){ae=ae.substring(Z.raw.length),C=ue[ue.length-1],C&&(C.type==="paragraph"||C.type==="text")?(C.raw+=` `+Z.raw,C.text+=` `+Z.text,this.inlineQueue[this.inlineQueue.length-1].src=C.text):ue.push(Z);continue}if(Z=this.tokenizer.fences(ae)){ae=ae.substring(Z.raw.length),ue.push(Z);continue}if(Z=this.tokenizer.heading(ae)){ae=ae.substring(Z.raw.length),ue.push(Z);continue}if(Z=this.tokenizer.hr(ae)){ae=ae.substring(Z.raw.length),ue.push(Z);continue}if(Z=this.tokenizer.blockquote(ae)){ae=ae.substring(Z.raw.length),ue.push(Z);continue}if(Z=this.tokenizer.list(ae)){ae=ae.substring(Z.raw.length),ue.push(Z);continue}if(Z=this.tokenizer.html(ae)){ae=ae.substring(Z.raw.length),ue.push(Z);continue}if(Z=this.tokenizer.def(ae)){ae=ae.substring(Z.raw.length),C=ue[ue.length-1],C&&(C.type==="paragraph"||C.type==="text")?(C.raw+=` `+Z.raw,C.text+=` `+Z.raw,this.inlineQueue[this.inlineQueue.length-1].src=C.text):this.tokens.links[Z.tag]||(this.tokens.links[Z.tag]={href:Z.href,title:Z.title});continue}if(Z=this.tokenizer.table(ae)){ae=ae.substring(Z.raw.length),ue.push(Z);continue}if(Z=this.tokenizer.lheading(ae)){ae=ae.substring(Z.raw.length),ue.push(Z);continue}if(z=ae,this.options.extensions&&this.options.extensions.startBlock&&function(){var oe=1/0,ce=ae.slice(1),J=void 0;ee.options.extensions.startBlock.forEach(function(pe){J=pe.call({lexer:this},ce),typeof J=="number"&&J>=0&&(oe=Math.min(oe,J))}),oe<1/0&&oe>=0&&(z=ae.substring(0,oe+1))}(),this.state.top&&(Z=this.tokenizer.paragraph(z))){C=ue[ue.length-1],V&&C.type==="paragraph"?(C.raw+=` `+Z.raw,C.text+=` `+Z.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=C.text):ue.push(Z),V=z.length!==ae.length,ae=ae.substring(Z.raw.length);continue}if(Z=this.tokenizer.text(ae)){ae=ae.substring(Z.raw.length),C=ue[ue.length-1],C&&C.type==="text"?(C.raw+=` `+Z.raw,C.text+=` `+Z.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=C.text):ue.push(Z);continue}if(ae){var q="Infinite loop on byte: "+ae.charCodeAt(0);if(this.options.silent){console.error(q);break}else throw new Error(q)}}return this.state.top=!0,ue},ye.inline=function(ae,ue){return ue===void 0&&(ue=[]),this.inlineQueue.push({src:ae,tokens:ue}),ue},ye.inlineTokens=function(ae,ue){var ee=this;ue===void 0&&(ue=[]);var Z,C,z,V=ae,q,oe,ce;if(this.tokens.links){var J=Object.keys(this.tokens.links);if(J.length>0)for(;(q=this.tokenizer.rules.inline.reflinkSearch.exec(V))!=null;)J.includes(q[0].slice(q[0].lastIndexOf("[")+1,-1))&&(V=V.slice(0,q.index)+"["+j("a",q[0].length-2)+"]"+V.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(q=this.tokenizer.rules.inline.blockSkip.exec(V))!=null;)V=V.slice(0,q.index)+"["+j("a",q[0].length-2)+"]"+V.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(q=this.tokenizer.rules.inline.escapedEmSt.exec(V))!=null;)V=V.slice(0,q.index)+"++"+V.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex);for(;ae;)if(oe||(ce=""),oe=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(function(Ee){return(Z=Ee.call({lexer:ee},ae,ue))?(ae=ae.substring(Z.raw.length),ue.push(Z),!0):!1}))){if(Z=this.tokenizer.escape(ae)){ae=ae.substring(Z.raw.length),ue.push(Z);continue}if(Z=this.tokenizer.tag(ae)){ae=ae.substring(Z.raw.length),C=ue[ue.length-1],C&&Z.type==="text"&&C.type==="text"?(C.raw+=Z.raw,C.text+=Z.text):ue.push(Z);continue}if(Z=this.tokenizer.link(ae)){ae=ae.substring(Z.raw.length),ue.push(Z);continue}if(Z=this.tokenizer.reflink(ae,this.tokens.links)){ae=ae.substring(Z.raw.length),C=ue[ue.length-1],C&&Z.type==="text"&&C.type==="text"?(C.raw+=Z.raw,C.text+=Z.text):ue.push(Z);continue}if(Z=this.tokenizer.emStrong(ae,V,ce)){ae=ae.substring(Z.raw.length),ue.push(Z);continue}if(Z=this.tokenizer.codespan(ae)){ae=ae.substring(Z.raw.length),ue.push(Z);continue}if(Z=this.tokenizer.br(ae)){ae=ae.substring(Z.raw.length),ue.push(Z);continue}if(Z=this.tokenizer.del(ae)){ae=ae.substring(Z.raw.length),ue.push(Z);continue}if(Z=this.tokenizer.autolink(ae,$)){ae=ae.substring(Z.raw.length),ue.push(Z);continue}if(!this.state.inLink&&(Z=this.tokenizer.url(ae,$))){ae=ae.substring(Z.raw.length),ue.push(Z);continue}if(z=ae,this.options.extensions&&this.options.extensions.startInline&&function(){var Ee=1/0,Ne=ae.slice(1),xe=void 0;ee.options.extensions.startInline.forEach(function(Ze){xe=Ze.call({lexer:this},Ne),typeof xe=="number"&&xe>=0&&(Ee=Math.min(Ee,xe))}),Ee<1/0&&Ee>=0&&(z=ae.substring(0,Ee+1))}(),Z=this.tokenizer.inlineText(z,B)){ae=ae.substring(Z.raw.length),Z.raw.slice(-1)!=="_"&&(ce=Z.raw.slice(-1)),oe=!0,C=ue[ue.length-1],C&&C.type==="text"?(C.raw+=Z.raw,C.text+=Z.text):ue.push(Z);continue}if(ae){var pe="Infinite loop on byte: "+ae.charCodeAt(0);if(this.options.silent){console.error(pe);break}else throw new Error(pe)}}return ue},i(ke,null,[{key:"rules",get:function(){return{block:M,inline:R}}}]),ke}(),K=function(){function ke(Ie){this.options=Ie||ne.defaults}var ye=ke.prototype;return ye.code=function(ae,ue,ee){var Z=(ue||"").match(/\S*/)[0];if(this.options.highlight){var C=this.options.highlight(ae,Z);C!=null&&C!==ae&&(ee=!0,ae=C)}return ae=ae.replace(/\n$/,"")+` `,Z?'
'+(ee?ae:m(ae,!0))+`
`:"
"+(ee?ae:m(ae,!0))+`
`},ye.blockquote=function(ae){return`
`+ae+`
`},ye.html=function(ae){return ae},ye.heading=function(ae,ue,ee,Z){if(this.options.headerIds){var C=this.options.headerPrefix+Z.slug(ee);return"'+ae+" `}return""+ae+" `},ye.hr=function(){return this.options.xhtml?`
`:`
`},ye.list=function(ae,ue,ee){var Z=ue?"ol":"ul",C=ue&&ee!==1?' start="'+ee+'"':"";return"<"+Z+C+`> `+ae+" `},ye.listitem=function(ae){return"
  • "+ae+`
  • `},ye.checkbox=function(ae){return" "},ye.paragraph=function(ae){return"

    "+ae+`

    `},ye.table=function(ae,ue){return ue&&(ue=""+ue+""),` `+ae+` `+ue+`
    `},ye.tablerow=function(ae){return` `+ae+` `},ye.tablecell=function(ae,ue){var ee=ue.header?"th":"td",Z=ue.align?"<"+ee+' align="'+ue.align+'">':"<"+ee+">";return Z+ae+(" `)},ye.strong=function(ae){return""+ae+""},ye.em=function(ae){return""+ae+""},ye.codespan=function(ae){return""+ae+""},ye.br=function(){return this.options.xhtml?"
    ":"
    "},ye.del=function(ae){return""+ae+""},ye.link=function(ae,ue,ee){if(ae=I(this.options.sanitize,this.options.baseUrl,ae),ae===null)return ee;var Z='",Z},ye.image=function(ae,ue,ee){if(ae=I(this.options.sanitize,this.options.baseUrl,ae),ae===null)return ee;var Z=''+ee+'":">",Z},ye.text=function(ae){return ae},ke}(),te=function(){function ke(){}var ye=ke.prototype;return ye.strong=function(ae){return ae},ye.em=function(ae){return ae},ye.codespan=function(ae){return ae},ye.del=function(ae){return ae},ye.html=function(ae){return ae},ye.text=function(ae){return ae},ye.link=function(ae,ue,ee){return""+ee},ye.image=function(ae,ue,ee){return""+ee},ye.br=function(){return""},ke}(),de=function(){function ke(){this.seen={}}var ye=ke.prototype;return ye.serialize=function(ae){return ae.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")},ye.getNextSafeSlug=function(ae,ue){var ee=ae,Z=0;if(this.seen.hasOwnProperty(ee)){Z=this.seen[ae];do Z++,ee=ae+"-"+Z;while(this.seen.hasOwnProperty(ee))}return ue||(this.seen[ae]=Z,this.seen[ee]=0),ee},ye.slug=function(ae,ue){ue===void 0&&(ue={});var ee=this.serialize(ae);return this.getNextSafeSlug(ee,ue.dryrun)},ke}(),re=function(){function ke(Ie){this.options=Ie||ne.defaults,this.options.renderer=this.options.renderer||new K,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new te,this.slugger=new de}ke.parse=function(ae,ue){var ee=new ke(ue);return ee.parse(ae)},ke.parseInline=function(ae,ue){var ee=new ke(ue);return ee.parseInline(ae)};var ye=ke.prototype;return ye.parse=function(ae,ue){ue===void 0&&(ue=!0);var ee="",Z,C,z,V,q,oe,ce,J,pe,Ee,Ne,xe,Ze,Ge,Qe,Fe,dt,X,Q,ve=ae.length;for(Z=0;Z0&&Qe.tokens[0].type==="paragraph"?(Qe.tokens[0].text=X+" "+Qe.tokens[0].text,Qe.tokens[0].tokens&&Qe.tokens[0].tokens.length>0&&Qe.tokens[0].tokens[0].type==="text"&&(Qe.tokens[0].tokens[0].text=X+" "+Qe.tokens[0].tokens[0].text)):Qe.tokens.unshift({type:"text",text:X}):Ge+=X),Ge+=this.parse(Qe.tokens,Ze),pe+=this.renderer.listitem(Ge,dt,Fe);ee+=this.renderer.list(pe,Ne,xe);continue}case"html":{ee+=this.renderer.html(Ee.text);continue}case"paragraph":{ee+=this.renderer.paragraph(this.parseInline(Ee.tokens));continue}case"text":{for(pe=Ee.tokens?this.parseInline(Ee.tokens):Ee.text;Z+1"u"||ke===null)throw new Error("marked(): input parameter is undefined or null");if(typeof ke!="string")throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(ke)+", string expected");if(typeof ye=="function"&&(Ie=ye,ye=null),ye=s({},be.defaults,ye||{}),F(ye),Ie){var ae=ye.highlight,ue;try{ue=U.lex(ke,ye)}catch(V){return Ie(V)}var ee=function(q){var oe;if(!q)try{ye.walkTokens&&be.walkTokens(ue,ye.walkTokens),oe=re.parse(ue,ye)}catch(ce){q=ce}return ye.highlight=ae,q?Ie(q):Ie(null,oe)};if(!ae||ae.length<3||(delete ye.highlight,!ue.length))return ee();var Z=0;be.walkTokens(ue,function(V){V.type==="code"&&(Z++,setTimeout(function(){ae(V.text,V.lang,function(q,oe){if(q)return ee(q);oe!=null&&oe!==V.text&&(V.text=oe,V.escaped=!0),Z--,Z===0&&ee()})},0))}),Z===0&&ee();return}function C(V){if(V.message+=` Please report this to https://github.com/markedjs/marked.`,ye.silent)return"

    An error occurred:

    "+m(V.message+"",!0)+"
    ";throw V}try{var z=U.lex(ke,ye);if(ye.walkTokens){if(ye.async)return Promise.all(be.walkTokens(z,ye.walkTokens)).then(function(){return re.parse(z,ye)}).catch(C);be.walkTokens(z,ye.walkTokens)}return re.parse(z,ye)}catch(V){C(V)}}be.options=be.setOptions=function(ke){return s(be.defaults,ke),A(be.defaults),be},be.getDefaults=y,be.defaults=ne.defaults,be.use=function(){for(var ke=arguments.length,ye=new Array(ke),Ie=0;Ie"u"||ke===null)throw new Error("marked.parseInline(): input parameter is undefined or null");if(typeof ke!="string")throw new Error("marked.parseInline(): input parameter is of type "+Object.prototype.toString.call(ke)+", string expected");ye=s({},be.defaults,ye||{}),F(ye);try{var Ie=U.lexInline(ke,ye);return ye.walkTokens&&be.walkTokens(Ie,ye.walkTokens),re.parseInline(Ie,ye)}catch(ae){if(ae.message+=` Please report this to https://github.com/markedjs/marked.`,ye.silent)return"

    An error occurred:

    "+m(ae.message+"",!0)+"
    ";throw ae}},be.Parser=re,be.parser=re.parse,be.Renderer=K,be.TextRenderer=te,be.Lexer=U,be.lexer=U.lex,be.Tokenizer=P,be.Slugger=de,be.parse=be;var le=be.options,fe=be.setOptions,Y=be.use,ge=be.walkTokens,Se=be.parseInline,Oe=be,Be=re.parse,Xe=U.lex;ne.Lexer=U,ne.Parser=re,ne.Renderer=K,ne.Slugger=de,ne.TextRenderer=te,ne.Tokenizer=P,ne.getDefaults=y,ne.lexer=Xe,ne.marked=be,ne.options=le,ne.parse=Oe,ne.parseInline=Se,ne.parser=Be,ne.setOptions=fe,ne.use=Y,ne.walkTokens=ge,Object.defineProperty(ne,"__esModule",{value:!0})}),define(De[108],Ce([1,0]),function(ne,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SlidingWindowAverage=e.MovingAverage=e.Counter=e.rot=e.clamp=void 0;function i(A,_,T){return Math.min(Math.max(A,_),T)}e.clamp=i;function D(A,_){return(_+A%_)%_}e.rot=D;class S{constructor(){this._next=0}getNext(){return this._next++}}e.Counter=S;class N{constructor(){this._n=1,this._val=0}update(_){return this._val=this._val+(_-this._val)/this._n,this._n+=1,this._val}get value(){return this._val}}e.MovingAverage=N;class y{constructor(_){this._n=0,this._val=0,this._values=[],this._index=0,this._sum=0,this._values=new Array(_),this._values.fill(0,0,_)}update(_){const T=this._values[this._index];return this._values[this._index]=_,this._index=(this._index+1)%this._values.length,this._sum-=T,this._sum+=_,this._n)?=?)";var l=T++;_[l]=_[b]+"|x|X|\\*";var f=T++;_[f]=_[O]+"|x|X|\\*";var s=T++;_[s]="[v=\\s]*("+_[f]+")(?:\\.("+_[f]+")(?:\\.("+_[f]+")(?:"+_[a]+")?"+_[u]+"?)?)?";var h=T++;_[h]="[v=\\s]*("+_[l]+")(?:\\.("+_[l]+")(?:\\.("+_[l]+")(?:"+_[p]+")?"+_[u]+"?)?)?";var v=T++;_[v]="^"+_[d]+"\\s*"+_[s]+"$";var k=T++;_[k]="^"+_[d]+"\\s*"+_[h]+"$";var F=T++;_[F]="(?:^|[^\\d])(\\d{1,16})(?:\\.(\\d{1,16}))?(?:\\.(\\d{1,16}))?(?:$|[^\\d])";var j=T++;_[j]="(?:~>?)";var W=T++;_[W]="(\\s*)"+_[j]+"\\s+",A[W]=new RegExp(_[W],"g");var H=T++;_[H]="^"+_[j]+_[s]+"$";var P=T++;_[P]="^"+_[j]+_[h]+"$";var M=T++;_[M]="(?:\\^)";var R=T++;_[R]="(\\s*)"+_[M]+"\\s+",A[R]=new RegExp(_[R],"g");var B=T++;_[B]="^"+_[M]+_[s]+"$";var $=T++;_[$]="^"+_[M]+_[h]+"$";var U=T++;_[U]="^"+_[d]+"\\s*("+c+")$|^$";var K=T++;_[K]="^"+_[d]+"\\s*("+r+")$|^$";var te=T++;_[te]="(\\s*)"+_[d]+"\\s*("+c+"|"+_[s]+")",A[te]=new RegExp(_[te],"g");var de=T++;_[de]="^\\s*("+_[s]+")\\s+-\\s+("+_[s]+")\\s*$";var re=T++;_[re]="^\\s*("+_[h]+")\\s+-\\s+("+_[h]+")\\s*$";var be=T++;_[be]="(<|>)?=?\\s*\\*";for(var le=0;le<35;le++)S(le,_[le]),A[le]||(A[le]=new RegExp(_[le]));function fe(J,pe){if(J instanceof Y)return J;if(typeof J!="string"||J.length>N||!(pe?A[n]:A[I]).test(J))return null;try{return new Y(J,pe)}catch{return null}}function Y(J,pe){if(J instanceof Y){if(J.loose===pe)return J;J=J.version}else if(typeof J!="string")throw new TypeError("Invalid Version: "+J);if(J.length>N)throw new TypeError("version is longer than "+N+" characters");if(!(this instanceof Y))return new Y(J,pe);S("SemVer",J,pe),this.loose=pe;var Ee=J.trim().match(pe?A[n]:A[I]);if(!Ee)throw new TypeError("Invalid Version: "+J);if(this.raw=J,this.major=+Ee[1],this.minor=+Ee[2],this.patch=+Ee[3],this.major>y||this.major<0)throw new TypeError("Invalid major version");if(this.minor>y||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>y||this.patch<0)throw new TypeError("Invalid patch version");Ee[4]?this.prerelease=Ee[4].split(".").map(function(Ne){if(/^[0-9]+$/.test(Ne)){var xe=+Ne;if(xe>=0&&xe=0;)typeof this.prerelease[Ee]=="number"&&(this.prerelease[Ee]++,Ee=-2);Ee===-1&&this.prerelease.push(0)}pe&&(this.prerelease[0]===pe?isNaN(this.prerelease[1])&&(this.prerelease=[pe,0]):this.prerelease=[pe,0]);break;default:throw new Error("invalid increment argument: "+J)}return this.format(),this.raw=this.version,this},e.inc=function(J,pe,Ee,Ne){typeof Ee=="string"&&(Ne=Ee,Ee=void 0);try{return new Y(J,Ee).inc(pe,Ne).version}catch{return null}},e.diff=function(J,pe){if(ke(J,pe))return null;var Ee=fe(J),Ne=fe(pe);if(Ee.prerelease.length||Ne.prerelease.length){for(var xe in Ee)if((xe==="major"||xe==="minor"||xe==="patch")&&Ee[xe]!==Ne[xe])return"pre"+xe;return"prerelease"}for(var xe in Ee)if((xe==="major"||xe==="minor"||xe==="patch")&&Ee[xe]!==Ne[xe])return xe},e.compareIdentifiers=Se;var ge=/^[0-9]+$/;function Se(J,pe){var Ee=ge.test(J),Ne=ge.test(pe);return Ee&&Ne&&(J=+J,pe=+pe),Ee&&!Ne?-1:Ne&&!Ee?1:Jpe?1:0}function Oe(J,pe,Ee){return new Y(J,Ee).compare(new Y(pe,Ee))}function Be(J,pe,Ee){return Oe(J,pe,Ee)>0}function Xe(J,pe,Ee){return Oe(J,pe,Ee)<0}function ke(J,pe,Ee){return Oe(J,pe,Ee)===0}function ye(J,pe,Ee){return Oe(J,pe,Ee)!==0}function Ie(J,pe,Ee){return Oe(J,pe,Ee)>=0}function ae(J,pe,Ee){return Oe(J,pe,Ee)<=0}function ue(J,pe,Ee,Ne){var xe;switch(pe){case"===":typeof J=="object"&&(J=J.version),typeof Ee=="object"&&(Ee=Ee.version),xe=J===Ee;break;case"!==":typeof J=="object"&&(J=J.version),typeof Ee=="object"&&(Ee=Ee.version),xe=J!==Ee;break;case"":case"=":case"==":xe=ke(J,Ee,Ne);break;case"!=":xe=ye(J,Ee,Ne);break;case">":xe=Be(J,Ee,Ne);break;case">=":xe=Ie(J,Ee,Ne);break;case"<":xe=Xe(J,Ee,Ne);break;case"<=":xe=ae(J,Ee,Ne);break;default:throw new TypeError("Invalid operator: "+pe)}return xe}function ee(J,pe){if(J instanceof ee){if(J.loose===pe)return J;J=J.value}if(!(this instanceof ee))return new ee(J,pe);S("comparator",J,pe),this.loose=pe,this.parse(J),this.semver===Z?this.value="":this.value=this.operator+this.semver.version,S("comp",this)}e.rcompareIdentifiers=function(J,pe){return Se(pe,J)},e.major=function(J,pe){return new Y(J,pe).major},e.minor=function(J,pe){return new Y(J,pe).minor},e.patch=function(J,pe){return new Y(J,pe).patch},e.compare=Oe,e.compareLoose=function(J,pe){return Oe(J,pe,!0)},e.rcompare=function(J,pe,Ee){return Oe(pe,J,Ee)},e.sort=function(J,pe){return J.sort(function(Ee,Ne){return e.compare(Ee,Ne,pe)})},e.rsort=function(J,pe){return J.sort(function(Ee,Ne){return e.rcompare(Ee,Ne,pe)})},e.gt=Be,e.lt=Xe,e.eq=ke,e.neq=ye,e.gte=Ie,e.lte=ae,e.cmp=ue,e.Comparator=ee;var Z={};function C(J,pe){if(J instanceof C)return J.loose===pe?J:new C(J.raw,pe);if(J instanceof ee)return new C(J.value,pe);if(!(this instanceof C))return new C(J,pe);if(this.loose=pe,this.raw=J,this.set=J.split(/\s*\|\|\s*/).map(function(Ee){return this.parseRange(Ee.trim())},this).filter(function(Ee){return Ee.length}),!this.set.length)throw new TypeError("Invalid SemVer Range: "+J);this.format()}function z(J){return!J||J.toLowerCase()==="x"||J==="*"}function V(J,pe,Ee,Ne,xe,Ze,Ge,Qe,Fe,dt,X,Q,ve){return((pe=z(Ee)?"":z(Ne)?">="+Ee+".0.0":z(xe)?">="+Ee+"."+Ne+".0":">="+pe)+" "+(Qe=z(Fe)?"":z(dt)?"<"+(+Fe+1)+".0.0":z(X)?"<"+Fe+"."+(+dt+1)+".0":Q?"<="+Fe+"."+dt+"."+X+"-"+Q:"<="+Qe)).trim()}function q(J,pe){for(var Ee=0;Ee0){var Ne=J[Ee].semver;if(Ne.major===pe.major&&Ne.minor===pe.minor&&Ne.patch===pe.patch)return!0}return!1}return!0}function oe(J,pe,Ee){try{pe=new C(pe,Ee)}catch{return!1}return pe.test(J)}function ce(J,pe,Ee,Ne){var xe,Ze,Ge,Qe,Fe;switch(J=new Y(J,Ne),pe=new C(pe,Ne),Ee){case">":xe=Be,Ze=ae,Ge=Xe,Qe=">",Fe=">=";break;case"<":xe=Xe,Ze=Ie,Ge=Be,Qe="<",Fe="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(oe(J,pe,Ne))return!1;for(var dt=0;dt=0.0.0")),Q=Q||Ue,ve=ve||Ue,xe(Ue.semver,Q.semver,Ne)?Q=Ue:Ge(Ue.semver,ve.semver,Ne)&&(ve=Ue)}),Q.operator===Qe||Q.operator===Fe||(!ve.operator||ve.operator===Qe)&&Ze(J,ve.semver)||ve.operator===Fe&&Ge(J,ve.semver))return!1}return!0}ee.prototype.parse=function(J){var pe=this.loose?A[U]:A[K],Ee=J.match(pe);if(!Ee)throw new TypeError("Invalid comparator: "+J);this.operator=Ee[1],this.operator==="="&&(this.operator=""),Ee[2]?this.semver=new Y(Ee[2],this.loose):this.semver=Z},ee.prototype.toString=function(){return this.value},ee.prototype.test=function(J){return S("Comparator.test",J,this.loose),this.semver===Z||(typeof J=="string"&&(J=new Y(J,this.loose)),ue(J,this.operator,this.semver,this.loose))},ee.prototype.intersects=function(J,pe){if(!(J instanceof ee))throw new TypeError("a Comparator is required");var Ee;if(this.operator==="")return Ee=new C(J.value,pe),oe(this.value,Ee,pe);if(J.operator==="")return Ee=new C(this.value,pe),oe(J.semver,Ee,pe);var Ne=!(this.operator!==">="&&this.operator!==">"||J.operator!==">="&&J.operator!==">"),xe=!(this.operator!=="<="&&this.operator!=="<"||J.operator!=="<="&&J.operator!=="<"),Ze=this.semver.version===J.semver.version,Ge=!(this.operator!==">="&&this.operator!=="<="||J.operator!==">="&&J.operator!=="<="),Qe=ue(this.semver,"<",J.semver,pe)&&(this.operator===">="||this.operator===">")&&(J.operator==="<="||J.operator==="<"),Fe=ue(this.semver,">",J.semver,pe)&&(this.operator==="<="||this.operator==="<")&&(J.operator===">="||J.operator===">");return Ne||xe||Ze&&Ge||Qe||Fe},e.Range=C,C.prototype.format=function(){return this.range=this.set.map(function(J){return J.join(" ").trim()}).join("||").trim(),this.range},C.prototype.toString=function(){return this.range},C.prototype.parseRange=function(J){var pe=this.loose;J=J.trim(),S("range",J,pe);var Ee=pe?A[re]:A[de];J=J.replace(Ee,V),S("hyphen replace",J),J=J.replace(A[te],"$1$2$3"),S("comparator trim",J,A[te]),J=(J=(J=J.replace(A[W],"$1~")).replace(A[R],"$1^")).split(/\s+/).join(" ");var Ne=pe?A[U]:A[K],xe=J.split(" ").map(function(Ze){return function(Ge,Qe){return S("comp",Ge),Ge=function(Fe,dt){return Fe.trim().split(/\s+/).map(function(X){return function(Q,ve){S("caret",Q,ve);var Ue=ve?A[$]:A[B];return Q.replace(Ue,function(je,qe,ze,tt,nt){var lt;return S("caret",Q,je,qe,ze,tt,nt),z(qe)?lt="":z(ze)?lt=">="+qe+".0.0 <"+(+qe+1)+".0.0":z(tt)?lt=qe==="0"?">="+qe+"."+ze+".0 <"+qe+"."+(+ze+1)+".0":">="+qe+"."+ze+".0 <"+(+qe+1)+".0.0":nt?(S("replaceCaret pr",nt),nt.charAt(0)!=="-"&&(nt="-"+nt),lt=qe==="0"?ze==="0"?">="+qe+"."+ze+"."+tt+nt+" <"+qe+"."+ze+"."+(+tt+1):">="+qe+"."+ze+"."+tt+nt+" <"+qe+"."+(+ze+1)+".0":">="+qe+"."+ze+"."+tt+nt+" <"+(+qe+1)+".0.0"):(S("no pr"),lt=qe==="0"?ze==="0"?">="+qe+"."+ze+"."+tt+" <"+qe+"."+ze+"."+(+tt+1):">="+qe+"."+ze+"."+tt+" <"+qe+"."+(+ze+1)+".0":">="+qe+"."+ze+"."+tt+" <"+(+qe+1)+".0.0"),S("caret return",lt),lt})}(X,dt)}).join(" ")}(Ge,Qe),S("caret",Ge),Ge=function(Fe,dt){return Fe.trim().split(/\s+/).map(function(X){return function(Q,ve){var Ue=ve?A[P]:A[H];return Q.replace(Ue,function(je,qe,ze,tt,nt){var lt;return S("tilde",Q,je,qe,ze,tt,nt),z(qe)?lt="":z(ze)?lt=">="+qe+".0.0 <"+(+qe+1)+".0.0":z(tt)?lt=">="+qe+"."+ze+".0 <"+qe+"."+(+ze+1)+".0":nt?(S("replaceTilde pr",nt),nt.charAt(0)!=="-"&&(nt="-"+nt),lt=">="+qe+"."+ze+"."+tt+nt+" <"+qe+"."+(+ze+1)+".0"):lt=">="+qe+"."+ze+"."+tt+" <"+qe+"."+(+ze+1)+".0",S("tilde return",lt),lt})}(X,dt)}).join(" ")}(Ge,Qe),S("tildes",Ge),Ge=function(Fe,dt){return S("replaceXRanges",Fe,dt),Fe.split(/\s+/).map(function(X){return function(Q,ve){Q=Q.trim();var Ue=ve?A[k]:A[v];return Q.replace(Ue,function(je,qe,ze,tt,nt,lt){S("xRange",Q,je,qe,ze,tt,nt,lt);var Dt=z(ze),ot=Dt||z(tt),rt=ot||z(nt);return qe==="="&&rt&&(qe=""),Dt?je=qe===">"||qe==="<"?"<0.0.0":"*":qe&&rt?(ot&&(tt=0),rt&&(nt=0),qe===">"?(qe=">=",ot?(ze=+ze+1,tt=0,nt=0):rt&&(tt=+tt+1,nt=0)):qe==="<="&&(qe="<",ot?ze=+ze+1:tt=+tt+1),je=qe+ze+"."+tt+"."+nt):ot?je=">="+ze+".0.0 <"+(+ze+1)+".0.0":rt&&(je=">="+ze+"."+tt+".0 <"+ze+"."+(+tt+1)+".0"),S("xRange return",je),je})}(X,dt)}).join(" ")}(Ge,Qe),S("xrange",Ge),Ge=function(Fe,dt){return S("replaceStars",Fe,dt),Fe.trim().replace(A[be],"")}(Ge,Qe),S("stars",Ge),Ge}(Ze,pe)}).join(" ").split(/\s+/);return this.loose&&(xe=xe.filter(function(Ze){return!!Ze.match(Ne)})),xe=xe.map(function(Ze){return new ee(Ze,pe)})},C.prototype.intersects=function(J,pe){if(!(J instanceof C))throw new TypeError("a Range is required");return this.set.some(function(Ee){return Ee.every(function(Ne){return J.set.some(function(xe){return xe.every(function(Ze){return Ne.intersects(Ze,pe)})})})})},e.toComparators=function(J,pe){return new C(J,pe).set.map(function(Ee){return Ee.map(function(Ne){return Ne.value}).join(" ").trim().split(" ")})},C.prototype.test=function(J){if(!J)return!1;typeof J=="string"&&(J=new Y(J,this.loose));for(var pe=0;pe",Ee)},e.outside=ce,e.prerelease=function(J,pe){var Ee=fe(J,pe);return Ee&&Ee.prerelease.length?Ee.prerelease:null},e.intersects=function(J,pe,Ee){return J=new C(J,Ee),pe=new C(pe,Ee),J.intersects(pe)},e.coerce=function(J){if(J instanceof Y)return J;if(typeof J!="string")return null;var pe=J.match(A[F]);return pe==null?null:fe((pe[1]||"0")+"."+(pe[2]||"0")+"."+(pe[3]||"0"))}}).call(this,i(1))},function(ne,e){var i,D,S=ne.exports={};function N(){throw new Error("setTimeout has not been defined")}function y(){throw new Error("clearTimeout has not been defined")}function A(o){if(i===setTimeout)return setTimeout(o,0);if((i===N||!i)&&setTimeout)return i=setTimeout,setTimeout(o,0);try{return i(o,0)}catch{try{return i.call(null,o,0)}catch{return i.call(this,o,0)}}}(function(){try{i=typeof setTimeout=="function"?setTimeout:N}catch{i=N}try{D=typeof clearTimeout=="function"?clearTimeout:y}catch{D=y}})();var _,T=[],O=!1,b=-1;function g(){O&&_&&(O=!1,_.length?T=_.concat(T):b=-1,T.length&&E())}function E(){if(!O){var o=A(g);O=!0;for(var a=T.length;a;){for(_=T,T=[];++b1)for(var p=1;ptypeof r=="function"):!1}e.isReadableStream=N;function y(u){const I=u;return I?N(I.stream)&&Array.isArray(I.buffer)&&typeof I.ended=="boolean":!1}e.isReadableBufferedStream=y;function A(u,I){return new _(u,I)}e.newWriteableStream=A;class _{constructor(I,r){this.reducer=I,this.options=r,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(I){if(!this.state.destroyed){if(this.state.flowing)this.emitData(I);else if(this.buffer.data.push(I),typeof this.options?.highWaterMark=="number"&&this.buffer.data.length>this.options.highWaterMark)return new Promise(r=>this.pendingWritePromises.push(r))}}error(I){this.state.destroyed||(this.state.flowing?this.emitError(I):this.buffer.error.push(I))}end(I){this.state.destroyed||(typeof I<"u"&&this.write(I),this.state.flowing?(this.emitEnd(),this.destroy()):this.state.ended=!0)}emitData(I){this.listeners.data.slice(0).forEach(r=>r(I))}emitError(I){this.listeners.error.length===0?(0,i.onUnexpectedError)(I):this.listeners.error.slice(0).forEach(r=>r(I))}emitEnd(){this.listeners.end.slice(0).forEach(I=>I())}on(I,r){if(!this.state.destroyed)switch(I){case"data":this.listeners.data.push(r),this.resume();break;case"end":this.listeners.end.push(r),this.state.flowing&&this.flowEnd()&&this.destroy();break;case"error":this.listeners.error.push(r),this.state.flowing&&this.flowErrors();break}}removeListener(I,r){if(this.state.destroyed)return;let c;switch(I){case"data":c=this.listeners.data;break;case"end":c=this.listeners.end;break;case"error":c=this.listeners.error;break}if(c){const n=c.indexOf(r);n>=0&&c.splice(n,1)}}flowData(){if(this.buffer.data.length>0){const I=this.reducer(this.buffer.data);this.emitData(I),this.buffer.data.length=0;const r=[...this.pendingWritePromises];this.pendingWritePromises.length=0,r.forEach(c=>c())}}flowErrors(){if(this.listeners.error.length>0){for(const I of this.buffer.error)this.emitError(I);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 T(u,I){const r=[];let c;for(;(c=u.read())!==null;)r.push(c);return I(r)}e.consumeReadable=T;function O(u,I,r){const c=[];let n;for(;(n=u.read())!==null&&c.length0?I(c):{read:()=>{if(c.length>0)return c.shift();if(typeof n<"u"){const d=n;return n=void 0,d}return u.read()}}}e.peekReadable=O;function b(u,I){return new Promise((r,c)=>{const n=[];g(u,{onData:d=>{I&&n.push(d)},onError:d=>{I?c(d):r(void 0)},onEnd:()=>{r(I?I(n):void 0)}})})}e.consumeStream=b;function g(u,I){let r=!1;return u.on("error",c=>{r||I.onError(c)}),u.on("end",()=>{r||I.onEnd()}),u.on("data",c=>{r||I.onData(c)}),(0,D.toDisposable)(()=>r=!0)}e.listenStream=g;function E(u,I){return new Promise((r,c)=>{const n=new D.DisposableStore,d=[],l=h=>{if(d.push(h),d.length>I)return n.dispose(),u.pause(),r({stream:u,buffer:d,ended:!1})},f=h=>c(h),s=()=>r({stream:u,buffer:d,ended:!0});n.add((0,D.toDisposable)(()=>u.removeListener("error",f))),u.on("error",f),n.add((0,D.toDisposable)(()=>u.removeListener("end",s))),u.on("end",s),n.add((0,D.toDisposable)(()=>u.removeListener("data",l))),u.on("data",l)})}e.peekStream=E;function m(u,I){const r=A(I);return r.end(u),r}e.toStream=m;function t(){const u=A(()=>{throw new Error("not supported")});return u.end(),u}e.emptyStream=t;function o(u){let I=!1;return{read:()=>I?null:(I=!0,u)}}e.toReadable=o;function a(u,I,r){const c=A(r);return g(u,{onData:n=>c.write(I.data(n)),onError:n=>c.error(I.error?I.error(n):n),onEnd:()=>c.end()}),c}e.transform=a;function p(u,I,r){let c=!1;return{read:()=>{const n=I.read();return c?n:(c=!0,n!==null?r([u,n]):u)}}}e.prefixedReadable=p;function w(u,I,r){let c=!1;const n=A(r);return g(I,{onData:d=>c?n.write(d):(c=!0,n.write(r([u,d]))),onError:d=>n.error(d),onEnd:()=>{c||(c=!0,n.write(u)),n.end()}}),n}e.prefixedStream=w}),define(De[24],Ce([1,0,109]),function(ne,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.encodeBase64=e.decodeBase64=e.prefixedBufferStream=e.prefixedBufferReadable=e.newWriteableBufferStream=e.streamToBufferReadableStream=e.bufferToStream=e.bufferedStreamToBuffer=e.streamToBuffer=e.bufferToReadable=e.readableToBuffer=e.writeUInt8=e.readUInt8=e.writeUInt32LE=e.readUInt32LE=e.writeUInt32BE=e.readUInt32BE=e.writeUInt16LE=e.readUInt16LE=e.VSBuffer=void 0;const D=typeof Buffer<"u";let S,N;class y{static alloc(h){return D?new y(Buffer.allocUnsafe(h)):new y(new Uint8Array(h))}static wrap(h){return D&&!Buffer.isBuffer(h)&&(h=Buffer.from(h.buffer,h.byteOffset,h.byteLength)),new y(h)}static fromString(h,v){return!(v?.dontUseNodeBuffer||!1)&&D?new y(Buffer.from(h)):(S||(S=new TextEncoder),new y(S.encode(h)))}static fromByteArray(h){const v=y.alloc(h.length);for(let k=0,F=h.length;k"u"){v=0;for(let j=0,W=h.length;j>>0|s[h+1]<<8>>>0}e.readUInt16LE=A;function _(s,h,v){s[v+0]=h&255,h=h>>>8,s[v+1]=h&255}e.writeUInt16LE=_;function T(s,h){return s[h]*2**24+s[h+1]*2**16+s[h+2]*2**8+s[h+3]}e.readUInt32BE=T;function O(s,h,v){s[v+3]=h,h=h>>>8,s[v+2]=h,h=h>>>8,s[v+1]=h,h=h>>>8,s[v]=h}e.writeUInt32BE=O;function b(s,h){return s[h+0]<<0>>>0|s[h+1]<<8>>>0|s[h+2]<<16>>>0|s[h+3]<<24>>>0}e.readUInt32LE=b;function g(s,h,v){s[v+0]=h&255,h=h>>>8,s[v+1]=h&255,h=h>>>8,s[v+2]=h&255,h=h>>>8,s[v+3]=h&255}e.writeUInt32LE=g;function E(s,h){return s[h]}e.readUInt8=E;function m(s,h,v){s[v]=h}e.writeUInt8=m;function t(s){return i.consumeReadable(s,h=>y.concat(h))}e.readableToBuffer=t;function o(s){return i.toReadable(s)}e.bufferToReadable=o;function a(s){return i.consumeStream(s,h=>y.concat(h))}e.streamToBuffer=a;async function p(s){return s.ended?y.concat(s.buffer):y.concat([...s.buffer,await a(s.stream)])}e.bufferedStreamToBuffer=p;function w(s){return i.toStream(s,h=>y.concat(h))}e.bufferToStream=w;function u(s){return i.transform(s,{data:h=>typeof h=="string"?y.fromString(h):y.wrap(h)},h=>y.concat(h))}e.streamToBufferReadableStream=u;function I(s){return i.newWriteableStream(h=>y.concat(h),s)}e.newWriteableBufferStream=I;function r(s,h){return i.prefixedReadable(s,h,v=>y.concat(v))}e.prefixedBufferReadable=r;function c(s,h){return i.prefixedStream(s,h,v=>y.concat(v))}e.prefixedBufferStream=c;function n(s){let h=0,v=0,k=0;const F=new Uint8Array(Math.floor(s.length/4*3)),j=H=>{switch(v){case 3:F[k++]=h|H,v=0;break;case 2:F[k++]=h|H>>>2,h=H<<6,v=3;break;case 1:F[k++]=h|H>>>4,h=H<<4,v=2;break;default:h=H<<2,v=1}};for(let H=0;H=65&&P<=90)j(P-65);else if(P>=97&&P<=122)j(P-97+26);else if(P>=48&&P<=57)j(P-48+52);else if(P===43||P===45)j(62);else if(P===47||P===95)j(63);else{if(P===61)break;throw new SyntaxError(`Unexpected base64 character ${s[H]}`)}}const W=k;for(;v>0;)j(0);return y.wrap(F).slice(0,W)}e.decodeBase64=n;const d="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_";function f({buffer:s},h=!0,v=!1){const k=v?l:d;let F="";const j=s.byteLength%3;let W=0;for(;W>>2],F+=k[(H<<4|P>>>4)&63],F+=k[(P<<2|M>>>6)&63],F+=k[M&63]}if(j===1){const H=s[W+0];F+=k[H>>>2],F+=k[H<<4&63],h&&(F+="==")}else if(j===2){const H=s[W+0],P=s[W+1];F+=k[H>>>2],F+=k[(H<<4|P>>>4)&63],F+=k[P<<2&63],h&&(F+="=")}return F}e.encodeBase64=f}),define(De[38],Ce([1,0]),function(ne,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.generateUuid=e.isUUID=void 0;const i=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function D(S){return i.test(S)}e.isUUID=D,e.generateUuid=function(){if(typeof crypto=="object"&&typeof crypto.randomUUID=="function")return crypto.randomUUID.bind(crypto);let S;typeof crypto=="object"&&typeof crypto.getRandomValues=="function"?S=crypto.getRandomValues.bind(crypto):S=function(A){for(let _=0;_1?S.localize(4,null,m,E.length):m}if(D.isString(b))return b;if(b.detail){const E=b.detail;if(E.error)return N(E.error,g);if(E.exception)return N(E.exception,g)}return b.stack?N(b,g):b.message?b.message:S.localize(5,null)}e.toErrorMessage=_;function T(b){const g=b;return g instanceof Error&&Array.isArray(g.actions)}e.isErrorWithActions=T;function O(b,g){let E;return typeof b=="string"?E=new Error(b):E=b,E.actions=g,E}e.createErrorWithActions=O}),define(De[79],Ce([1,0,19]),function(ne,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.normalizeMimeType=e.getExtensionForMimeType=e.getMediaMime=e.getMediaOrTextMime=e.Mimes=void 0,e.Mimes=Object.freeze({text:"text/plain",binary:"application/octet-stream",unknown:"application/unknown",markdown:"text/markdown",latex:"text/latex",uriList:"text/uri-list"});const D={".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"},S={".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 N(O){const b=(0,i.extname)(O),g=D[b.toLowerCase()];return g!==void 0?g:y(O)}e.getMediaOrTextMime=N;function y(O){const b=(0,i.extname)(O);return S[b.toLowerCase()]}e.getMediaMime=y;function A(O){for(const b in S)if(S[b]===O)return b}e.getExtensionForMimeType=A;const _=/^(.+)\/(.+?)(;.+)?$/;function T(O,b){const g=_.exec(O);return g?`${g[1].toLowerCase()}/${g[2].toLowerCase()}${g[3]??""}`:b?void 0:O}e.normalizeMimeType=T}),define(De[115],Ce([1,0,4,7]),function(ne,e,i,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MutableObservableValue=e.staticObservableValue=void 0;const S=y=>({onDidChange:i.Event.None,value:y});e.staticObservableValue=S;class N extends D.Disposable{get value(){return this._value}set value(A){A!==this._value&&(this._value=A,this.changeEmitter.fire(A))}constructor(A){super(),this._value=A,this.changeEmitter=this._register(new i.Emitter),this.onDidChange=this.changeEmitter.event}}e.MutableObservableValue=N}),define(De[39],Ce([1,0,19,21,10,9]),function(ne,e,i,D,S,N){"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 y(l){return l===47||l===92}e.isPathSeparator=y;function A(l){return l.replace(/[\\/]/g,i.posix.sep)}e.toSlashes=A;function _(l){return l.indexOf("/")===-1&&(l=A(l)),/^[a-zA-Z]:(\/|$)/.test(l)&&(l="/"+l),l}e.toPosixPath=_;function T(l,f=i.posix.sep){if(!l)return"";const s=l.length,h=l.charCodeAt(0);if(y(h)){if(y(l.charCodeAt(1))&&!y(l.charCodeAt(2))){let k=3;const F=k;for(;k\|]/g,g=/[\\/]/g,E=/^(con|prn|aux|clock\$|nul|lpt[0-9]|com[0-9])(\.(.*?))?$/i;function m(l,f=D.isWindows){const s=f?b:g;return!(!l||l.length===0||/^\s+$/.test(l)||(s.lastIndex=0,s.test(l))||f&&E.test(l)||l==="."||l===".."||f&&l[l.length-1]==="."||f&&l.length!==l.trim().length||l.length>255)}e.isValidBasename=m;function t(l,f,s){const h=l===f;return!s||h?h:!l||!f?!1:(0,S.equalsIgnoreCase)(l,f)}e.isEqual=t;function o(l,f,s,h=i.sep){if(l===f)return!0;if(!l||!f||f.length>l.length)return!1;if(s){if(!(0,S.startsWithIgnoreCase)(l,f))return!1;if(f.length===l.length)return!0;let k=f.length;return f.charAt(f.length-1)===h&&k--,l.charAt(k)===h}return f.charAt(f.length-1)!==h&&(f+=h),l.indexOf(f)===0}e.isEqualOrParent=o;function a(l){return l>=65&&l<=90||l>=97&&l<=122}e.isWindowsDriveLetter=a;function p(l,f){return D.isWindows&&l.endsWith(":")&&(l+=i.sep),(0,i.isAbsolute)(l)||(l=(0,i.join)(f,l)),l=(0,i.normalize)(l),D.isWindows?(l=(0,S.rtrim)(l,i.sep),l.endsWith(":")&&(l+=i.sep)):(l=(0,S.rtrim)(l,i.sep),l||(l=i.sep)),l}e.sanitizeFilePath=p;function w(l){const f=(0,i.normalize)(l);return D.isWindows?l.length>3?!1:u(f)&&(l.length===2||f.charCodeAt(2)===92):f===i.posix.sep}e.isRootOrDriveLetter=w;function u(l,f=D.isWindows){return f?a(l.charCodeAt(0))&&l.charCodeAt(1)===58:!1}e.hasDriveLetter=u;function I(l){return u(l)?l[0]:void 0}e.getDriveLetter=I;function r(l,f,s){return f.length>l.length?-1:l===f?0:(s&&(l=l.toLowerCase(),f=f.toLowerCase()),l.indexOf(f))}e.indexOfPath=r;function c(l){const f=l.split(":");let s,h,v;for(const k of f){const F=Number(k);(0,N.isNumber)(F)?h===void 0?h=F:v===void 0&&(v=F):s=s?[s,k].join(":"):k}if(!s)throw new Error("Format for `--goto` should be: `FILE:LINE(:COLUMN)`");return{path:s,line:h!==void 0?h:void 0,column:v!==void 0?v:h!==void 0?1:void 0}}e.parseLineAndColumnAware=c;const n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";function d(l,f,s=8){let h="";for(let k=0;k0?[{start:0,end:Z.length}]:[]:null}function y(ee,Z){const C=Z.toLowerCase().indexOf(ee.toLowerCase());return C===-1?null:[{start:C,end:C+ee.length}]}e.matchesContiguousSubString=y;function A(ee,Z){return _(ee.toLowerCase(),Z.toLowerCase(),0,0)}e.matchesSubString=A;function _(ee,Z,C,z){if(C===ee.length)return[];if(z===Z.length)return null;if(ee[C]===Z[z]){let V=null;return(V=_(ee,Z,C+1,z+1))?a({start:z,end:z+1},V):null}return _(ee,Z,C,z+1)}function T(ee){return 97<=ee&&ee<=122}function O(ee){return 65<=ee&&ee<=90}e.isUpper=O;function b(ee){return 48<=ee&&ee<=57}function g(ee){return ee===32||ee===9||ee===10||ee===13}const E=new Set;"()[]{}<>`'\"-/;:,.?!".split("").forEach(ee=>E.add(ee.charCodeAt(0)));function m(ee){return g(ee)||E.has(ee)}function t(ee,Z){return ee===Z||m(ee)&&m(Z)}function o(ee){return T(ee)||O(ee)||b(ee)}function a(ee,Z){return Z.length===0?Z=[ee]:ee.end===Z[0].start?Z[0].start=ee.start:Z.unshift(ee),Z}function p(ee,Z){for(let C=Z;C0&&!o(ee.charCodeAt(C-1)))return C}return ee.length}function w(ee,Z,C,z){if(C===ee.length)return[];if(z===Z.length)return null;if(ee[C]!==Z[z].toLowerCase())return null;{let V=null,q=z+1;for(V=w(ee,Z,C+1,z+1);!V&&(q=p(Z,q)).6}function r(ee){const{upperPercent:Z,lowerPercent:C,alphaPercent:z,numericPercent:V}=ee;return C>.2&&Z<.8&&z>.6&&V<.2}function c(ee){let Z=0,C=0,z=0,V=0;for(let q=0;q60)return null;const C=u(Z);if(!r(C)){if(!I(C))return null;Z=Z.toLowerCase()}let z=null,V=0;for(ee=ee.toLowerCase();V0&&m(ee.charCodeAt(C-1)))return C;return ee.length}const s=S(e.matchesPrefix,n,y),h=S(e.matchesPrefix,n,A),v=new i.LRUCache(1e4);function k(ee,Z,C=!1){if(typeof ee!="string"||typeof Z!="string")return null;let z=v.get(ee);z||(z=new RegExp(D.convertSimple2RegExpPattern(ee),"i"),v.set(ee,z));const V=z.exec(Z);return V?[{start:V.index,end:V.index+V[0].length}]:C?h(ee,Z):s(ee,Z)}e.matchesFuzzy=k;function F(ee,Z){const C=Be(ee,ee.toLowerCase(),0,Z,Z.toLowerCase(),0,{firstMatchCanBeWeak:!0,boostFullMatch:!0});return C?W(C):null}e.matchesFuzzy2=F;function j(ee,Z,C,z,V,q){const oe=Math.min(13,ee.length);for(;C"u")return[];const Z=[],C=ee[1];for(let z=ee.length-1;z>1;z--){const V=ee[z]+C,q=Z[Z.length-1];q&&q.end===V?q.end=V+1:Z.push({start:V,end:V+1})}return Z}e.createMatches=W;const H=128;function P(){const ee=[],Z=[];for(let C=0;C<=H;C++)Z[C]=0;for(let C=0;C<=H;C++)ee.push(Z.slice(0));return ee}function M(ee){const Z=[];for(let C=0;C<=ee;C++)Z[C]=0;return Z}const R=M(2*H),B=M(2*H),$=P(),U=P(),K=P(),te=!1;function de(ee,Z,C,z,V){function q(ce,J,pe=" "){for(;ce.lengthq(ce,3)).join("|")} `;for(let ce=0;ce<=C;ce++)ce===0?oe+=" |":oe+=`${Z[ce-1]}|`,oe+=ee[ce].slice(0,V+1).map(J=>q(J.toString(),3)).join("|")+` `;return oe}function re(ee,Z,C,z){ee=ee.substr(Z),C=C.substr(z),console.log(de(U,ee,ee.length,C,C.length)),console.log(de(K,ee,ee.length,C,C.length)),console.log(de($,ee,ee.length,C,C.length))}function be(ee,Z){if(Z<0||Z>=ee.length)return!1;const C=ee.codePointAt(Z);switch(C){case 95:case 45:case 46:case 32:case 47:case 92:case 39:case 34:case 58:case 36:case 60:case 62:case 40:case 41:case 91:case 93:case 123:case 125:return!0;case void 0:return!1;default:return!!D.isEmojiImprecise(C)}}function le(ee,Z){if(Z<0||Z>=ee.length)return!1;switch(ee.charCodeAt(Z)){case 32:case 9:return!0;default:return!1}}function fe(ee,Z,C){return Z[ee]!==C[ee]}function Y(ee,Z,C,z,V,q,oe=!1){for(;ZH?H:ee.length,J=z.length>H?H:z.length;if(C>=ce||q>=J||ce-C>J-q||!Y(Z,C,ce,V,q,J,!0))return;Xe(ce,J,C,q,Z,V);let pe=1,Ee=1,Ne=C,xe=q;const Ze=[!1];for(pe=1,Ne=C;NeX,tt=ze?U[pe][Ee-1]+($[pe][Ee-1]>0?-5:0):0,nt=xe>X+1&&$[pe][Ee-1]>0,lt=nt?U[pe][Ee-2]+($[pe][Ee-2]>0?-5:0):0;if(nt&&(!ze||lt>=tt)&&(!je||lt>=qe))U[pe][Ee]=lt,K[pe][Ee]=3,$[pe][Ee]=0;else if(ze&&(!je||tt>=qe))U[pe][Ee]=tt,K[pe][Ee]=2,$[pe][Ee]=0;else if(je)U[pe][Ee]=qe,K[pe][Ee]=1,$[pe][Ee]=$[pe-1][Ee-1]+1;else throw new Error("not possible")}}if(te&&re(ee,C,z,q),!Ze[0]&&!oe.firstMatchCanBeWeak)return;pe--,Ee--;const Ge=[U[pe][Ee],q];let Qe=0,Fe=0;for(;pe>=1;){let X=Ee;do{const Q=K[pe][X];if(Q===3)X=X-2;else if(Q===2)X=X-1;else break}while(X>=1);Qe>1&&Z[C+pe-1]===V[q+Ee-1]&&!fe(X+q-1,z,V)&&Qe+1>$[pe][X]&&(X=Ee),X===Ee?Qe++:Qe=1,Fe||(Fe=X),pe--,Ee=X-1,Ge.push(Ee)}J===ce&&oe.boostFullMatch&&(Ge[0]+=2);const dt=Fe-ce;return Ge[0]-=dt,Ge}e.fuzzyScore=Be;function Xe(ee,Z,C,z,V,q){let oe=ee-1,ce=Z-1;for(;oe>=C&&ce>=z;)V[oe]===q[ce]&&(B[oe]=ce,oe--),ce--}function ke(ee,Z,C,z,V,q,oe,ce,J,pe,Ee){if(Z[C]!==q[oe])return Number.MIN_SAFE_INTEGER;let Ne=1,xe=!1;return oe===C-z?Ne=ee[C]===V[oe]?7:5:fe(oe,V,q)&&(oe===0||!fe(oe-1,V,q))?(Ne=ee[C]===V[oe]?7:5,xe=!0):be(q,oe)&&(oe===0||!be(q,oe-1))?Ne=5:(be(q,oe-1)||le(q,oe-1))&&(Ne=5,xe=!0),Ne>1&&C===z&&(Ee[0]=!0),xe||(xe=fe(oe,V,q)||be(q,oe-1)||le(q,oe-1)),C===z?oe>J&&(Ne-=xe?3:5):pe?Ne+=xe?2:0:Ne+=xe?0:1,oe+1===ce&&(Ne-=xe?3:5),Ne}function ye(ee,Z,C,z,V,q,oe){return ae(ee,Z,C,z,V,q,!0,oe)}e.fuzzyScoreGracefulAggressive=ye;function Ie(ee,Z,C,z,V,q,oe){return ae(ee,Z,C,z,V,q,!1,oe)}e.fuzzyScoreGraceful=Ie;function ae(ee,Z,C,z,V,q,oe,ce){let J=Be(ee,Z,C,z,V,q,ce);if(J&&!oe)return J;if(ee.length>=3){const pe=Math.min(7,ee.length-1);for(let Ee=C+1;EeJ[0])&&(J=xe))}}}return J}function ue(ee,Z){if(Z+1>=ee.length)return;const C=ee[Z],z=ee[Z+1];if(C!==z)return ee.slice(0,Z)+z+C+ee.slice(Z+2)}}),define(De[117],Ce([1,0,118,116,10]),function(ne,e,i,D,S){"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 N=new RegExp(`\\$\\(${i.CSSIcon.iconNameExpression}(?:${i.CSSIcon.iconModifierExpression})?\\)`,"g"),y=new RegExp(i.CSSIcon.iconNameCharacter),A=new RegExp(`(\\\\)?${N.source}`,"g");function _(o){return o.replace(A,(a,p)=>p?a:`\\${a}`)}e.escapeIcons=_;const T=new RegExp(`\\\\${N.source}`,"g");function O(o){return o.replace(T,a=>`\\${a}`)}e.markdownEscapeEscapedIcons=O;const b=new RegExp(`(\\s)?(\\\\)?${N.source}(\\s)?`,"g");function g(o){return o.indexOf(e.iconStartMarker)===-1?o:o.replace(b,(a,p,w,u)=>w?a:p||u||"")}e.stripIcons=g;function E(o){const a=o.indexOf(e.iconStartMarker);return a===-1?{text:o}:m(o,a)}e.parseLabelWithIcons=E;function m(o,a){const p=[];let w="";function u(s){if(s){w+=s;for(const h of s)p.push(c)}}let I=-1,r="",c=0,n,d,l=a;const f=o.length;for(u(o.substr(0,a));l=0;m--,this._valueLen--){const t=this._value.charCodeAt(m);if(!(t===47||this._splitOnBackslash&&t===92))break}return this.next()}hasNext(){return this._to!1,m=()=>!1){return new b(new _(E,m))}static forPaths(E=!1){return new b(new y(void 0,!E))}static forStrings(){return new b(new S)}static forConfigKeys(){return new b(new N)}constructor(E){this._iter=E}clear(){this._root=void 0}fill(E,m){if(m){const t=m.slice(0);(0,i.shuffle)(t);for(const o of t)this.set(o,E)}else{const t=E.slice(0);(0,i.shuffle)(t);for(const o of t)this.set(o[0],o[1])}}set(E,m){const t=this._iter.reset(E);let o;this._root||(this._root=new T,this._root.segment=t.value());const a=[];for(o=this._root;;){const w=t.cmp(o.segment);if(w>0)o.left||(o.left=new T,o.left.segment=t.value()),a.push([-1,o]),o=o.left;else if(w<0)o.right||(o.right=new T,o.right.segment=t.value()),a.push([1,o]),o=o.right;else if(t.hasNext())t.next(),o.mid||(o.mid=new T,o.mid.segment=t.value()),a.push([0,o]),o=o.mid;else break}const p=o.value;o.value=m,o.key=E;for(let w=a.length-1;w>=0;w--){const u=a[w][1];u.updateHeight();const I=u.balanceFactor();if(I<-1||I>1){const r=a[w][0],c=a[w+1][0];if(r===1&&c===1)a[w][1]=u.rotateLeft();else if(r===-1&&c===-1)a[w][1]=u.rotateRight();else if(r===1&&c===-1)u.right=a[w+1][1]=a[w+1][1].rotateRight(),a[w][1]=u.rotateLeft();else if(r===-1&&c===1)u.left=a[w+1][1]=a[w+1][1].rotateLeft(),a[w][1]=u.rotateRight();else throw new Error;if(w>0)switch(a[w-1][0]){case-1:a[w-1][1].left=a[w][1];break;case 1:a[w-1][1].right=a[w][1];break;case 0:a[w-1][1].mid=a[w][1];break}else this._root=a[0][1]}}return p}get(E){return this._getNode(E)?.value}_getNode(E){const m=this._iter.reset(E);let t=this._root;for(;t;){const o=m.cmp(t.segment);if(o>0)t=t.left;else if(o<0)t=t.right;else if(m.hasNext())m.next(),t=t.mid;else break}return t}has(E){const m=this._getNode(E);return!(m?.value===void 0&&m?.mid===void 0)}delete(E){return this._delete(E,!1)}deleteSuperstr(E){return this._delete(E,!0)}_delete(E,m){const t=this._iter.reset(E),o=[];let a=this._root;for(;a;){const p=t.cmp(a.segment);if(p>0)o.push([-1,a]),a=a.left;else if(p<0)o.push([1,a]),a=a.right;else if(t.hasNext())t.next(),o.push([0,a]),a=a.mid;else break}if(!!a){if(m?(a.left=void 0,a.mid=void 0,a.right=void 0,a.height=1):(a.key=void 0,a.value=void 0),!a.mid&&!a.value)if(a.left&&a.right){const p=this._min(a.right);if(p.key){const{key:w,value:u,segment:I}=p;this._delete(p.key,!1),a.key=w,a.value=u,a.segment=I}}else{const p=a.left??a.right;if(o.length>0){const[w,u]=o[o.length-1];switch(w){case-1:u.left=p;break;case 0:u.mid=p;break;case 1:u.right=p;break}}else this._root=p}for(let p=o.length-1;p>=0;p--){const w=o[p][1];w.updateHeight();const u=w.balanceFactor();if(u>1?(w.right.balanceFactor()>=0||(w.right=w.right.rotateRight()),o[p][1]=w.rotateLeft()):u<-1&&(w.left.balanceFactor()<=0||(w.left=w.left.rotateLeft()),o[p][1]=w.rotateRight()),p>0)switch(o[p-1][0]){case-1:o[p-1][1].left=o[p][1];break;case 1:o[p-1][1].right=o[p][1];break;case 0:o[p-1][1].mid=o[p][1];break}else this._root=o[0][1]}}}_min(E){for(;E.left;)E=E.left;return E}findSubstr(E){const m=this._iter.reset(E);let t=this._root,o;for(;t;){const a=m.cmp(t.segment);if(a>0)t=t.left;else if(a<0)t=t.right;else if(m.hasNext())m.next(),o=t.value||o,t=t.mid;else break}return t&&t.value||o}findSuperstr(E){const m=this._iter.reset(E);let t=this._root;for(;t;){const o=m.cmp(t.segment);if(o>0)t=t.left;else if(o<0)t=t.right;else if(m.hasNext())m.next(),t=t.mid;else return t.mid?this._entries(t.mid):void 0}}forEach(E){for(const[m,t]of this)E(t,m)}*[Symbol.iterator](){yield*this._entries(this._root)}_entries(E){const m=[];return this._dfsEntries(E,m),m[Symbol.iterator]()}_dfsEntries(E,m){!E||(E.left&&this._dfsEntries(E.left,m),E.value&&m.push([E.key,E.value]),E.mid&&this._dfsEntries(E.mid,m),E.right&&this._dfsEntries(E.right,m))}_isBalanced(){const E=m=>{if(!m)return!0;const t=m.balanceFactor();return t<-1||t>1?!1:E(m.left)&&E(m.right)};return E(this._root)}}e.TernarySearchTree=b}),define(De[80],Ce([1,0,24,10,2]),function(ne,e,i,D,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.revive=e.parse=e.stringify=void 0;function N(T){return JSON.stringify(T,A)}e.stringify=N;function y(T){let O=JSON.parse(T);return O=_(O),O}e.parse=y;function A(T,O){return O instanceof RegExp?{$mid:2,source:O.source,flags:(0,D.regExpFlags)(O)}:O}function _(T,O=0){if(!T||O>200)return T;if(typeof T=="object"){switch(T.$mid){case 1:return S.URI.revive(T);case 2:return new RegExp(T.source,T.flags);case 15:return new Date(T.source)}if(T instanceof i.VSBuffer||T instanceof Uint8Array)return T;if(Array.isArray(T))for(let b=0;bi.getRoot(o).length&&o[o.length-1]===t}else{const o=m.path;return o.length>1&&o.charCodeAt(o.length-1)===47&&!/^[a-zA-Z]:(\/$|\\$)/.test(m.fsPath)}}removeTrailingPathSeparator(m,t=S.sep){return(0,e.hasTrailingPathSeparator)(m,t)?m.with({path:m.path.substr(0,m.path.length-1)}):m}addTrailingPathSeparator(m,t=S.sep){let o=!1;if(m.scheme===D.Schemas.file){const a=_(m);o=a!==void 0&&a.length===i.getRoot(a).length&&a[a.length-1]===t}else{t="/";const a=m.path;o=a.length===1&&a.charCodeAt(a.length-1)===47}return!o&&!(0,e.hasTrailingPathSeparator)(m,t)?m.with({path:m.path+"/"}):m}}e.ExtUri=T,e.extUri=new T(()=>!1),e.extUriBiasedIgnorePathCase=new T(E=>E.scheme===D.Schemas.file?!N.isLinux:!0),e.extUriIgnorePathCase=new T(E=>!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 O(E,m){const t=[];for(let o=0;ow===o?!1:(0,e.isEqualOrParent)(a,m(p)))||t.push(E[o])}return t}e.distinctParents=O;var b;(function(E){E.META_DATA_LABEL="label",E.META_DATA_DESCRIPTION="description",E.META_DATA_SIZE="size",E.META_DATA_MIME="mime";function m(t){const o=new Map;t.path.substring(t.path.indexOf(";")+1,t.path.lastIndexOf(";")).split(";").forEach(w=>{const[u,I]=w.split(":");u&&I&&o.set(u,I)});const p=t.path.substring(0,t.path.indexOf(";"));return p&&o.set(E.META_DATA_MIME,p),o}E.parseMetaData=m})(b=e.DataUri||(e.DataUri={}));function g(E,m,t){if(m){let o=E.path;return o&&o[0]!==S.posix.sep&&(o=S.posix.sep+o),E.with({scheme:t,authority:m,path:o})}return E.with({scheme:t})}e.toLocalResource=g}),define(De[15],Ce([1,0,20,12,4,7,22,21]),function(ne,e,i,D,S,N,y,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 _(fe){return!!fe&&typeof fe.then=="function"}e.isThenable=_;function T(fe){const Y=new i.CancellationTokenSource,ge=fe(Y.token),Se=new Promise((Oe,Be)=>{const Xe=Y.token.onCancellationRequested(()=>{Xe.dispose(),Y.dispose(),Be(new D.CancellationError)});Promise.resolve(ge).then(ke=>{Xe.dispose(),Y.dispose(),Oe(ke)},ke=>{Xe.dispose(),Y.dispose(),Be(ke)})});return new class{cancel(){Y.cancel()}then(Oe,Be){return Se.then(Oe,Be)}catch(Oe){return this.then(void 0,Oe)}finally(Oe){return Se.finally(Oe)}}}e.createCancelablePromise=T;function O(fe,Y,ge){return new Promise((Se,Oe)=>{const Be=Y.onCancellationRequested(()=>{Be.dispose(),Se(ge)});fe.then(Se,Oe).finally(()=>Be.dispose())})}e.raceCancellation=O;function b(fe,Y){return new Promise((ge,Se)=>{const Oe=Y.onCancellationRequested(()=>{Oe.dispose(),Se(new D.CancellationError)});fe.then(ge,Se).finally(()=>Oe.dispose())})}e.raceCancellationError=b;async function g(fe){let Y=-1;const ge=fe.map((Oe,Be)=>Oe.then(Xe=>(Y=Be,Xe))),Se=await Promise.race(ge);return fe.forEach((Oe,Be)=>{Be!==Y&&Oe.cancel()}),Se}e.raceCancellablePromises=g;function E(fe,Y,ge){let Se;const Oe=setTimeout(()=>{Se?.(void 0),ge?.()},Y);return Promise.race([fe.finally(()=>clearTimeout(Oe)),new Promise(Be=>Se=Be)])}e.raceTimeout=E;function m(fe){return new Promise((Y,ge)=>{const Se=fe();_(Se)?Se.then(Y,ge):Y(Se)})}e.asPromise=m;class t{constructor(){this.activePromise=null,this.queuedPromise=null,this.queuedPromiseFactory=null}queue(Y){if(this.activePromise){if(this.queuedPromiseFactory=Y,!this.queuedPromise){const ge=()=>{this.queuedPromise=null;const Se=this.queue(this.queuedPromiseFactory);return this.queuedPromiseFactory=null,Se};this.queuedPromise=new Promise(Se=>{this.activePromise.then(ge,ge).then(Se)})}return new Promise((ge,Se)=>{this.queuedPromise.then(ge,Se)})}return this.activePromise=Y(),new Promise((ge,Se)=>{this.activePromise.then(Oe=>{this.activePromise=null,ge(Oe)},Oe=>{this.activePromise=null,Se(Oe)})})}}e.Throttler=t;class o{constructor(){this.current=Promise.resolve(null)}queue(Y){return this.current=this.current.then(()=>Y(),()=>Y())}}e.Sequencer=o;class a{constructor(){this.promiseMap=new Map}queue(Y,ge){const Oe=(this.promiseMap.get(Y)??Promise.resolve()).catch(()=>{}).then(ge).finally(()=>{this.promiseMap.get(Y)===Oe&&this.promiseMap.delete(Y)});return this.promiseMap.set(Y,Oe),Oe}}e.SequencerByKey=a;const p=(fe,Y)=>{let ge=!0;const Se=setTimeout(()=>{ge=!1,Y()},fe);return{isTriggered:()=>ge,dispose:()=>{clearTimeout(Se),ge=!1}}},w=fe=>{let Y=!0;return queueMicrotask(()=>{Y&&(Y=!1,fe())}),{isTriggered:()=>Y,dispose:()=>{Y=!1}}};e.MicrotaskDelay=Symbol("MicrotaskDelay");class u{constructor(Y){this.defaultDelay=Y,this.deferred=null,this.completionPromise=null,this.doResolve=null,this.doReject=null,this.task=null}trigger(Y,ge=this.defaultDelay){this.task=Y,this.cancelTimeout(),this.completionPromise||(this.completionPromise=new Promise((Oe,Be)=>{this.doResolve=Oe,this.doReject=Be}).then(()=>{if(this.completionPromise=null,this.doResolve=null,this.task){const Oe=this.task;return this.task=null,Oe()}}));const Se=()=>{this.deferred=null,this.doResolve?.(null)};return this.deferred=ge===e.MicrotaskDelay?w(Se):p(ge,Se),this.completionPromise}isTriggered(){return!!this.deferred?.isTriggered()}cancel(){this.cancelTimeout(),this.completionPromise&&(this.doReject?.(new D.CancellationError),this.completionPromise=null)}cancelTimeout(){this.deferred?.dispose(),this.deferred=null}dispose(){this.cancel()}}e.Delayer=u;class I{constructor(Y){this.delayer=new u(Y),this.throttler=new t}trigger(Y,ge){return this.delayer.trigger(()=>this.throttler.queue(Y),ge)}isTriggered(){return this.delayer.isTriggered()}cancel(){this.delayer.cancel()}dispose(){this.delayer.dispose()}}e.ThrottledDelayer=I;class r{constructor(){this._isOpen=!1,this._promise=new Promise((Y,ge)=>{this._completePromise=Y})}isOpen(){return this._isOpen}open(){this._isOpen=!0,this._completePromise(!0)}wait(){return this._promise}}e.Barrier=r;class c extends r{constructor(Y){super(),this._timeout=setTimeout(()=>this.open(),Y)}open(){clearTimeout(this._timeout),super.open()}}e.AutoOpenBarrier=c;function n(fe,Y){return Y?new Promise((ge,Se)=>{const Oe=setTimeout(()=>{Be.dispose(),ge()},fe),Be=Y.onCancellationRequested(()=>{clearTimeout(Oe),Be.dispose(),Se(new D.CancellationError)})}):T(ge=>n(fe,ge))}e.timeout=n;function d(fe,Y=0){const ge=setTimeout(fe,Y);return(0,N.toDisposable)(()=>clearTimeout(ge))}e.disposableTimeout=d;function l(fe){const Y=[];let ge=0;const Se=fe.length;function Oe(){return ge!!Se,ge=null){let Se=0;const Oe=fe.length,Be=()=>{if(Se>=Oe)return Promise.resolve(ge);const Xe=fe[Se++];return Promise.resolve(Xe()).then(ye=>Y(ye)?Promise.resolve(ye):Be())};return Be()}e.first=f;function s(fe,Y=Se=>!!Se,ge=null){if(fe.length===0)return Promise.resolve(ge);let Se=fe.length;const Oe=()=>{Se=-1;for(const Be of fe)Be.cancel?.()};return new Promise((Be,Xe)=>{for(const ke of fe)ke.then(ye=>{--Se>=0&&Y(ye)?(Oe(),Be(ye)):Se===0&&Be(ge)}).catch(ye=>{--Se>=0&&(Oe(),Xe(ye))})})}e.firstParallel=s;class h{constructor(Y){this._size=0,this.maxDegreeOfParalellism=Y,this.outstandingPromises=[],this.runningPromises=0,this._onDrained=new S.Emitter}get onDrained(){return this._onDrained.event}get size(){return this._size}queue(Y){return this._size++,new Promise((ge,Se)=>{this.outstandingPromises.push({factory:Y,c:ge,e:Se}),this.consume()})}consume(){for(;this.outstandingPromises.length&&this.runningPromisesthis.consumed(),()=>this.consumed())}}consumed(){this._size--,this.runningPromises--,this.outstandingPromises.length>0?this.consume():this._onDrained.fire()}dispose(){this._onDrained.dispose()}}e.Limiter=h;class v extends h{constructor(){super(1)}}e.Queue=v;class k{constructor(){this.queues=new Map,this.drainers=new Set}async whenDrained(){if(this.isDrained())return;const Y=new K;return this.drainers.add(Y),Y.p}isDrained(){for(const[,Y]of this.queues)if(Y.size>0)return!1;return!0}queueFor(Y,ge=y.extUri){const Se=ge.getComparisonKey(Y);let Oe=this.queues.get(Se);return Oe||(Oe=new v,S.Event.once(Oe.onDrained)(()=>{Oe?.dispose(),this.queues.delete(Se),this.onDidQueueDrain()}),this.queues.set(Se,Oe)),Oe}onDidQueueDrain(){!this.isDrained()||this.releaseDrainers()}releaseDrainers(){for(const Y of this.drainers)Y.complete();this.drainers.clear()}dispose(){for(const[,Y]of this.queues)Y.dispose();this.queues.clear(),this.releaseDrainers()}}e.ResourceQueue=k;class F{constructor(Y,ge){this._token=-1,typeof Y=="function"&&typeof ge=="number"&&this.setIfNotSet(Y,ge)}dispose(){this.cancel()}cancel(){this._token!==-1&&(clearTimeout(this._token),this._token=-1)}cancelAndSet(Y,ge){this.cancel(),this._token=setTimeout(()=>{this._token=-1,Y()},ge)}setIfNotSet(Y,ge){this._token===-1&&(this._token=setTimeout(()=>{this._token=-1,Y()},ge))}}e.TimeoutTimer=F;class j{constructor(){this._token=-1}dispose(){this.cancel()}cancel(){this._token!==-1&&(clearInterval(this._token),this._token=-1)}cancelAndSet(Y,ge){this.cancel(),this._token=setInterval(()=>{Y()},ge)}}e.IntervalTimer=j;class W{constructor(Y,ge){this.timeoutToken=-1,this.runner=Y,this.timeout=ge,this.timeoutHandler=this.onTimeout.bind(this)}dispose(){this.cancel(),this.runner=null}cancel(){this.isScheduled()&&(clearTimeout(this.timeoutToken),this.timeoutToken=-1)}schedule(Y=this.timeout){this.cancel(),this.timeoutToken=setTimeout(this.timeoutHandler,Y)}get delay(){return this.timeout}set delay(Y){this.timeout=Y}isScheduled(){return this.timeoutToken!==-1}onTimeout(){this.timeoutToken=-1,this.runner&&this.doRun()}doRun(){this.runner?.()}}e.RunOnceScheduler=W;class H{constructor(Y,ge){ge%1e3!==0&&console.warn(`ProcessTimeRunOnceScheduler resolution is 1s, ${ge}ms is not a multiple of 1000ms.`),this.runner=Y,this.timeout=ge,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(Y=this.timeout){Y%1e3!==0&&console.warn(`ProcessTimeRunOnceScheduler resolution is 1s, ${Y}ms is not a multiple of 1000ms.`),this.cancel(),this.counter=Math.ceil(Y/1e3),this.intervalToken=setInterval(this.intervalHandler,1e3)}isScheduled(){return this.intervalToken!==-1}onInterval(){this.counter--,!(this.counter>0)&&(clearInterval(this.intervalToken),this.intervalToken=-1,this.runner?.())}}e.ProcessTimeRunOnceScheduler=H;class P extends W{constructor(Y,ge){super(Y,ge),this.units=[]}work(Y){this.units.push(Y),this.isScheduled()||this.schedule()}doRun(){const Y=this.units;this.units=[],this.runner?.(Y)}dispose(){this.units=[],super.dispose()}}e.RunOnceWorker=P;class M extends N.Disposable{constructor(Y,ge){super(),this.options=Y,this.handler=ge,this.pendingWork=[],this.throttler=this._register(new N.MutableDisposable),this.disposed=!1}get pending(){return this.pendingWork.length}work(Y){if(this.disposed)return!1;if(typeof this.options.maxBufferedWork=="number"){if(this.throttler.value){if(this.pending+Y.length>this.options.maxBufferedWork)return!1}else if(this.pending+Y.length-this.options.maxWorkChunkSize>this.options.maxBufferedWork)return!1}return this.pendingWork.push(...Y),this.throttler.value||this.doWork(),!0}doWork(){this.handler(this.pendingWork.splice(0,this.options.maxWorkChunkSize)),this.pendingWork.length>0&&(this.throttler.value=new W(()=>{this.throttler.clear(),this.doWork()},this.options.throttleDelay),this.throttler.value.schedule())}dispose(){super.dispose(),this.disposed=!0}}e.ThrottledWorker=M,function(){typeof requestIdleCallback!="function"||typeof cancelIdleCallback!="function"?e.runWhenIdle=fe=>{(0,A.setTimeout0)(()=>{if(Y)return;const ge=Date.now()+15;fe(Object.freeze({didTimeout:!0,timeRemaining(){return Math.max(0,ge-Date.now())}}))});let Y=!1;return{dispose(){Y||(Y=!0)}}}:e.runWhenIdle=(fe,Y)=>{const ge=requestIdleCallback(fe,typeof Y=="number"?{timeout:Y}:void 0);let Se=!1;return{dispose(){Se||(Se=!0,cancelIdleCallback(ge))}}}}();class R{constructor(Y){this._didRun=!1,this._executor=()=>{try{this._value=Y()}catch(ge){this._error=ge}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=R;async function B(fe,Y,ge){let Se;for(let Oe=0;OeSe?.(),promise:ge},ge.then(()=>this.donePending(Y),()=>this.donePending(Y)),ge}donePending(Y){this._pending&&Y===this._pending.taskId&&(this._pending=void 0,this.triggerNext())}triggerNext(){if(this._next){const Y=this._next;this._next=void 0,Y.run().then(Y.promiseResolve,Y.promiseReject)}}setNext(Y){if(this._next)this._next.run=Y;else{let ge,Se;const Oe=new Promise((Be,Xe)=>{ge=Be,Se=Xe});this._next={run:Y,promise:Oe,promiseResolve:ge,promiseReject:Se}}return this._next.promise}hasNext(){return!!this._next}async join(){return this._next?.promise??this._pending?.promise}}e.TaskSequentializer=$;class U{constructor(Y,ge=()=>Date.now()){this.interval=Y,this.nowFn=ge,this.lastIncrementTime=0,this.value=0}increment(){const Y=this.nowFn();return Y-this.lastIncrementTime>this.interval&&(this.lastIncrementTime=Y,this.value=0),this.value++,this.value}}e.IntervalCounter=U;class K{get isRejected(){return this.rejected}get isResolved(){return this.resolved}get isSettled(){return this.rejected||this.resolved}constructor(){this.rejected=!1,this.resolved=!1,this.p=new Promise((Y,ge)=>{this.completeCallback=Y,this.errorCallback=ge})}complete(Y){return new Promise(ge=>{this.completeCallback(Y),this.resolved=!0,ge()})}error(Y){return new Promise(ge=>{this.errorCallback(Y),this.rejected=!0,ge()})}cancel(){new Promise(Y=>{this.errorCallback(new D.CancellationError),this.rejected=!0,Y()})}}e.DeferredPromise=K;var te;(function(fe){async function Y(Se){let Oe;const Be=await Promise.all(Se.map(Xe=>Xe.then(ke=>ke,ke=>{Oe||(Oe=ke)})));if(typeof Oe<"u")throw Oe;return Be}fe.settled=Y;function ge(Se){return new Promise(async(Oe,Be)=>{try{await Se(Oe,Be)}catch(Xe){Be(Xe)}})}fe.withAsyncBody=ge})(te=e.Promises||(e.Promises={}));var de;(function(fe){fe[fe.Initial=0]="Initial",fe[fe.DoneOK=1]="DoneOK",fe[fe.DoneError=2]="DoneError"})(de||(de={}));class re{static fromArray(Y){return new re(ge=>{ge.emitMany(Y)})}static fromPromise(Y){return new re(async ge=>{ge.emitMany(await Y)})}static fromPromises(Y){return new re(async ge=>{await Promise.all(Y.map(async Se=>ge.emitOne(await Se)))})}static merge(Y){return new re(async ge=>{await Promise.all(Y.map(async Se=>{for await(const Oe of Se)ge.emitOne(Oe)}))})}constructor(Y){this._state=0,this._results=[],this._error=null,this._onStateChanged=new S.Emitter,queueMicrotask(async()=>{const ge={emitOne:Se=>this.emitOne(Se),emitMany:Se=>this.emitMany(Se),reject:Se=>this.reject(Se)};try{await Promise.resolve(Y(ge)),this.resolve()}catch(Se){this.reject(Se)}finally{ge.emitOne=void 0,ge.emitMany=void 0,ge.reject=void 0}})}[Symbol.asyncIterator](){let Y=0;return{next:async()=>{do{if(this._state===2)throw this._error;if(Y{for await(const Oe of Y)Se.emitOne(ge(Oe))})}map(Y){return re.map(this,Y)}static filter(Y,ge){return new re(async Se=>{for await(const Oe of Y)ge(Oe)&&Se.emitOne(Oe)})}filter(Y){return re.filter(this,Y)}static coalesce(Y){return re.filter(Y,ge=>!!ge)}coalesce(){return re.coalesce(this)}static async toPromise(Y){const ge=[];for await(const Se of Y)ge.push(Se);return ge}toPromise(){return re.toPromise(this)}emitOne(Y){this._state===0&&(this._results.push(Y),this._onStateChanged.fire())}emitMany(Y){this._state===0&&(this._results=this._results.concat(Y),this._onStateChanged.fire())}resolve(){this._state===0&&(this._state=1,this._onStateChanged.fire())}reject(Y){this._state===0&&(this._state=2,this._error=Y,this._onStateChanged.fire())}}e.AsyncIterableObject=re,re.EMPTY=re.fromArray([]);class be extends re{constructor(Y,ge){super(ge),this._source=Y}cancel(){this._source.cancel()}}e.CancelableAsyncIterableObject=be;function le(fe){const Y=new i.CancellationTokenSource,ge=fe(Y.token);return new be(Y,async Se=>{const Oe=Y.token.onCancellationRequested(()=>{Oe.dispose(),Y.dispose(),Se.reject(new D.CancellationError)});try{for await(const Be of ge){if(Y.token.isCancellationRequested)return;Se.emitOne(Be)}Oe.dispose(),Y.dispose()}catch(Be){Oe.dispose(),Y.dispose(),Se.reject(Be)}})}e.createCancelableAsyncIterable=le}),define(De[119],Ce([1,0,15,19]),function(ne,e,i,D){"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 S=new i.IdleValue(()=>{const v=new Intl.Collator(void 0,{numeric:!0,sensitivity:"base"});return{collator:v,collatorIsNumeric:v.resolvedOptions().numeric}}),N=new i.IdleValue(()=>({collator:new Intl.Collator(void 0,{numeric:!0})})),y=new i.IdleValue(()=>({collator:new Intl.Collator(void 0,{numeric:!0,sensitivity:"accent"})}));function A(v,k,F=!1){const j=v||"",W=k||"",H=S.value.collator.compare(j,W);return S.value.collatorIsNumeric&&H===0&&j!==W?jW.length)return 1}return 0}e.compareByPrefix=h}),define(De[34],Ce([1,0,18,15,39,28,19,21,10]),function(ne,e,i,D,S,N,y,A,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.patternsEquals=e.getPathTerms=e.getBasenameTerms=e.isRelativePattern=e.parse=e.match=e.splitGlobAware=e.GLOB_SPLIT=e.GLOBSTAR=e.getEmptyExpression=void 0;function T(){return Object.create(null)}e.getEmptyExpression=T,e.GLOBSTAR="**",e.GLOB_SPLIT="/";const O="[/\\\\]",b="[^/\\\\]",g=/\//g;function E(K,te){switch(K){case 0:return"";case 1:return`${b}*?`;default:return`(?:${O}|${b}+${O}${te?`|${O}${b}+`:""})*?`}}function m(K,te){if(!K)return[];const de=[];let re=!1,be=!1,le="";for(const fe of K){switch(fe){case te:if(!re&&!be){de.push(le),le="";continue}break;case"{":re=!0;break;case"}":re=!1;break;case"[":be=!0;break;case"]":be=!1;break}le+=fe}return le&&de.push(le),de}e.splitGlobAware=m;function t(K){if(!K)return"";let te="";const de=m(K,e.GLOB_SPLIT);if(de.every(re=>re===e.GLOBSTAR))te=".*";else{let re=!1;de.forEach((be,le)=>{if(be===e.GLOBSTAR){if(re)return;te+=E(2,le===de.length-1)}else{let fe=!1,Y="",ge=!1,Se="";for(const Oe of be){if(Oe!=="}"&&fe){Y+=Oe;continue}if(ge&&(Oe!=="]"||!Se)){let Be;Oe==="-"?Be=Oe:(Oe==="^"||Oe==="!")&&!Se?Be="^":Oe===e.GLOB_SPLIT?Be="":Be=(0,_.escapeRegExpCharacters)(Oe),Se+=Be;continue}switch(Oe){case"{":fe=!0;continue;case"[":ge=!0;continue;case"}":{te+=`(?:${m(Y,",").map(ke=>t(ke)).join("|")})`,fe=!1,Y="";break}case"]":{te+="["+Se+"]",ge=!1,Se="";break}case"?":te+=b;continue;case"*":te+=E(1);continue;default:te+=(0,_.escapeRegExpCharacters)(Oe)}}led(Y,te)).filter(Y=>Y!==n),K),re=de.length;if(!re)return n;if(re===1)return de[0];const be=function(Y,ge){for(let Se=0,Oe=de.length;Se!!Y.allBasenames);le&&(be.allBasenames=le.allBasenames);const fe=de.reduce((Y,ge)=>ge.allPaths?Y.concat(ge.allPaths):Y,[]);return fe.length&&(be.allPaths=fe),be}function k(K,te,de){const re=y.sep===y.posix.sep,be=re?K:K.replace(g,y.sep),le=y.sep+be,fe=y.posix.sep+K;let Y;return de?Y=function(ge,Se){return typeof ge=="string"&&(ge===be||ge.endsWith(le)||!re&&(ge===K||ge.endsWith(fe)))?te:null}:Y=function(ge,Se){return typeof ge=="string"&&(ge===be||!re&&ge===K)?te:null},Y.allPaths=[(de?"*/":"./")+K],Y}function F(K){try{const te=new RegExp(`^${t(K)}$`);return function(de){return te.lastIndex=0,typeof de=="string"&&te.test(de)?K:null}}catch{return n}}function j(K,te,de){return!K||typeof te!="string"?!1:W(K)(te,void 0,de)}e.match=j;function W(K,te={}){if(!K)return c;if(typeof K=="string"||H(K)){const de=d(K,te);if(de===n)return c;const re=function(be,le){return!!de(be,le)};return de.allBasenames&&(re.allBasenames=de.allBasenames),de.allPaths&&(re.allPaths=de.allPaths),re}return R(K,te)}e.parse=W;function H(K){const te=K;return te?typeof te.base=="string"&&typeof te.pattern=="string":!1}e.isRelativePattern=H;function P(K){return K.allBasenames||[]}e.getBasenameTerms=P;function M(K){return K.allPaths||[]}e.getPathTerms=M;function R(K,te){const de=$(Object.getOwnPropertyNames(K).map(Y=>B(Y,K[Y],te)).filter(Y=>Y!==n)),re=de.length;if(!re)return n;if(!de.some(Y=>!!Y.requiresSiblings)){if(re===1)return de[0];const Y=function(Oe,Be){let Xe;for(let ke=0,ye=de.length;ke{for(const ke of Xe){const ye=await ke;if(typeof ye=="string")return ye}return null})():null},ge=de.find(Oe=>!!Oe.allBasenames);ge&&(Y.allBasenames=ge.allBasenames);const Se=de.reduce((Oe,Be)=>Be.allPaths?Oe.concat(Be.allPaths):Oe,[]);return Se.length&&(Y.allPaths=Se),Y}const be=function(Y,ge,Se){let Oe,Be;for(let Xe=0,ke=de.length;Xe{for(const Xe of Be){const ke=await Xe;if(typeof ke=="string")return ke}return null})():null},le=de.find(Y=>!!Y.allBasenames);le&&(be.allBasenames=le.allBasenames);const fe=de.reduce((Y,ge)=>ge.allPaths?Y.concat(ge.allPaths):Y,[]);return fe.length&&(be.allPaths=fe),be}function B(K,te,de){if(te===!1)return n;const re=d(K,de);if(re===n)return n;if(typeof te=="boolean")return re;if(te){const be=te.when;if(typeof be=="string"){const le=(fe,Y,ge,Se)=>{if(!Se||!re(fe,Y))return null;const Oe=be.replace("$(basename)",ge),Be=Se(Oe);return(0,D.isThenable)(Be)?Be.then(Xe=>Xe?K:null):Be?K:null};return le.requiresSiblings=!0,le}}return re}function $(K,te){const de=K.filter(Y=>!!Y.basenames);if(de.length<2)return K;const re=de.reduce((Y,ge)=>{const Se=ge.basenames;return Se?Y.concat(Se):Y},[]);let be;if(te){be=[];for(let Y=0,ge=re.length;Y{const Se=ge.patterns;return Se?Y.concat(Se):Y},[]);const le=function(Y,ge){if(typeof Y!="string")return null;if(!ge){let Oe;for(Oe=Y.length;Oe>0;Oe--){const Be=Y.charCodeAt(Oe-1);if(Be===47||Be===92)break}ge=Y.substr(Oe)}const Se=re.indexOf(ge);return Se!==-1?be[Se]:null};le.basenames=re,le.patterns=be,le.allBasenames=re;const fe=K.filter(Y=>!Y.basenames);return fe.push(le),fe}function U(K,te){return(0,i.equals)(K,te,(de,re)=>typeof de=="string"&&typeof re=="string"?de===re:typeof de!="string"&&typeof re!="string"?de.base===re.base&&de.pattern===re.pattern:!1)}e.patternsEquals=U}),define(De[81],Ce([1,0,12,117,22,10,2]),function(ne,e,i,D,S,N,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.parseHrefAndDimensions=e.removeMarkdownEscapes=e.escapeDoubleQuotes=e.escapeMarkdownSyntaxTokens=e.markdownStringEqual=e.isMarkdownString=e.isEmptyMarkdownString=e.MarkdownString=e.MarkdownStringTextNewlineStyle=void 0;var A;(function(o){o[o.Paragraph=0]="Paragraph",o[o.Break=1]="Break"})(A=e.MarkdownStringTextNewlineStyle||(e.MarkdownStringTextNewlineStyle={}));class _{constructor(a="",p=!1){if(this.value=a,typeof this.value!="string")throw(0,i.illegalArgument)("value");typeof p=="boolean"?(this.isTrusted=p,this.supportThemeIcons=!1,this.supportHtml=!1):(this.isTrusted=p.isTrusted??void 0,this.supportThemeIcons=p.supportThemeIcons??!1,this.supportHtml=p.supportHtml??!1)}appendText(a,p=0){return this.value+=g(this.supportThemeIcons?(0,D.escapeIcons)(a):a).replace(/([ \t]+)/g,(w,u)=>" ".repeat(u.length)).replace(/\>/gm,"\\>").replace(/\n/g,p===1?`\\ `:` `),this}appendMarkdown(a){return this.value+=a,this}appendCodeblock(a,p){return this.value+="\n```",this.value+=a,this.value+=` `,this.value+=p,this.value+="\n```\n",this}appendLink(a,p,w){return this.value+="[",this.value+=this._escape(p,"]"),this.value+="](",this.value+=this._escape(String(a),")"),w&&(this.value+=` "${this._escape(this._escape(w,'"'),")")}"`),this.value+=")",this}_escape(a,p){const w=new RegExp((0,N.escapeRegExpCharacters)(p),"g");return a.replace(w,(u,I)=>a.charAt(I-1)!=="\\"?`\\${u}`:u)}}e.MarkdownString=_;function T(o){return O(o)?!o.value:Array.isArray(o)?o.every(T):!0}e.isEmptyMarkdownString=T;function O(o){return o instanceof _?!0:o&&typeof o=="object"?typeof o.value=="string"&&(typeof o.isTrusted=="boolean"||o.isTrusted===void 0)&&(typeof o.supportThemeIcons=="boolean"||o.supportThemeIcons===void 0):!1}e.isMarkdownString=O;function b(o,a){return o===a?!0:!o||!a?!1:o.value===a.value&&o.isTrusted===a.isTrusted&&o.supportThemeIcons===a.supportThemeIcons&&o.supportHtml===a.supportHtml&&(o.baseUri===a.baseUri||!!o.baseUri&&!!a.baseUri&&(0,S.isEqual)(y.URI.from(o.baseUri),y.URI.from(a.baseUri)))}e.markdownStringEqual=b;function g(o){return o.replace(/[\\`*_{}[\]()#+\-!]/g,"\\$&")}e.escapeMarkdownSyntaxTokens=g;function E(o){return o.replace(/"/g,""")}e.escapeDoubleQuotes=E;function m(o){return o&&o.replace(/\\([\\`*_{}[\]()#+\-.!])/g,"$1")}e.removeMarkdownEscapes=m;function t(o){const a=[],p=o.split("|").map(u=>u.trim());o=p[0];const w=p[1];if(w){const u=/height=(\d+)/.exec(w),I=/width=(\d+)/.exec(w),r=u?u[1]:"",c=I?I[1]:"",n=isFinite(parseInt(c)),d=isFinite(parseInt(r));n&&a.push(`width="${c}"`),d&&a.push(`height="${r}"`)}return{href:o,dimensions:a}}e.parseHrefAndDimensions=t}),define(De[82],Ce([1,0,18,39,19,21,22,10]),function(ne,e,i,D,S,N,y,A){"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.getPathLabel=void 0;function _(n,d){const{os:l,tildify:f,relative:s}=d;if(s){const k=T(n,s,l);if(typeof k=="string")return k}let h=n.fsPath;if(l===1&&!N.isWindows?h=h.replace(/\//g,"\\"):l!==1&&N.isWindows&&(h=h.replace(/\\/g,"/")),l!==1&&f?.userHome){const k=f.userHome.fsPath;let F;n.scheme!==f.userHome.scheme&&n.path.startsWith(S.posix.sep)?F=f.userHome.with({path:n.path}).fsPath:F=n.fsPath,h=g(F,k,l)}return(l===1?S.win32:S.posix).normalize(O(h,l===1))}e.getPathLabel=_;function T(n,d,l){const f=l===1?S.win32:S.posix,s=l===3?y.extUri:y.extUriIgnorePathCase,h=d.getWorkspace(),v=(0,i.firstOrDefault)(h.folders);if(!v)return;n.scheme!==v.uri.scheme&&n.path.startsWith(S.posix.sep)&&(n=v.uri.with({path:n.path}));const k=d.getWorkspaceFolder(n);if(!k)return;let F;if(s.isEqual(k.uri,n)?F="":F=s.relativePath(k.uri,n)??"",F&&(F=f.normalize(F)),h.folders.length>1&&!d.noPrefix){const j=k.name?k.name:s.basenameOrAuthority(k.uri);F=F?`${j} \u2022 ${F}`:j}return F}function O(n,d=N.isWindows){return(0,D.hasDriveLetter)(n,d)?n.charAt(0).toUpperCase()+n.slice(1):n}e.normalizeDriveLetter=O;let b=Object.create(null);function g(n,d,l=N.OS){if(l===1||!n||!d)return n;let f=b.original===d?b.normalized:void 0;f||(f=d,N.isWindows&&(f=(0,D.toSlashes)(f)),f=`${(0,A.rtrim)(f,S.posix.sep)}${S.posix.sep}`,b={original:d,normalized:f});let s=n;return N.isWindows&&(s=(0,D.toSlashes)(s)),(l===3?s.startsWith(f):(0,A.startsWithIgnoreCase)(s,f))?`~/${s.substr(f.length)}`:n}e.tildify=g;function E(n,d){return n.replace(/^~($|\/|\\)/,`${d}$1`)}e.untildify=E;const m="\u2026",t="\\\\",o="~";function a(n,d=S.sep){const l=new Array(n.length);let f=!1;for(let s=0;s=0;W--){f=!1;let H=F.slice(W,W+j).join(d);for(let P=0;!f&&P-1){const M=W+j===F.length,R=W>0&&n[P].indexOf(d)>-1?d+H:H,B=n[P].endsWith(R);f=!M||B}if(!f){let P="";(F[0].endsWith(":")||v!=="")&&(W===1&&(W=0,j++,H=F[0]+d+H),W>0&&(P=F[0]+d),P=v+P),W>0&&(P=P+m+d),P=P+H,W+j{if(h.type===p.SEPARATOR){const k=l[v-1],F=l[v+1];return[k,F].every(j=>j&&(j.type===p.VARIABLE||j.type===p.TEXT)&&j.value.length>0)}return!0}).map(h=>h.value).join("")}e.template=w;function u(n,d){return N.isMacintosh||d?n.replace(/\(&&\w\)|&&/g,"").replace(/&/g,N.isMacintosh?"&":"&&"):n.replace(/&&|&/g,l=>l==="&"?"&&":"&")}e.mnemonicMenuLabel=u;function I(n,d){return N.isMacintosh||d?n.replace(/\(&&\w\)|&&/g,""):N.isWindows?n.replace(/&&|&/g,l=>l==="&"?"&&":"&"):n.replace(/&&/g,"_")}e.mnemonicButtonLabel=I;function r(n){return n.replace(/&/g,"&&")}e.unmnemonicLabel=r;function c(n){const d=n.indexOf("/")!==-1?S.posix:S.win32,l=d.basename(n),f=d.dirname(n);return l.length?{name:l,parentPath:f}:{name:f,parentPath:""}}e.splitName=c}),define(De[120],Ce([1,0,2]),function(ne,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.transformAndReviveIncomingURIs=e.transformIncomingURIs=e.transformOutgoingURIs=e.DefaultURITransformer=e.URITransformer=void 0;function D(O){return O.toJSON()}class S{constructor(b){this._uriTransformer=b}transformIncoming(b){const g=this._uriTransformer.transformIncoming(b);return g===b?b:D(i.URI.from(g))}transformOutgoing(b){const g=this._uriTransformer.transformOutgoing(b);return g===b?b:D(i.URI.from(g))}transformOutgoingURI(b){const g=this._uriTransformer.transformOutgoing(b);return g===b?b:i.URI.from(g)}transformOutgoingScheme(b){return this._uriTransformer.transformOutgoingScheme(b)}}e.URITransformer=S,e.DefaultURITransformer=new class{transformIncoming(O){return O}transformOutgoing(O){return O}transformOutgoingURI(O){return O}transformOutgoingScheme(O){return O}};function N(O,b,g){if(!O||g>200)return null;if(typeof O=="object"){if(O instanceof i.URI)return b.transformOutgoing(O);for(const E in O)if(Object.hasOwnProperty.call(O,E)){const m=N(O[E],b,g+1);m!==null&&(O[E]=m)}}return null}function y(O,b){const g=N(O,b,0);return g===null?O:g}e.transformOutgoingURIs=y;function A(O,b,g,E){if(!O||E>200)return null;if(typeof O=="object"){if(O.$mid===1)return g?i.URI.revive(b.transformIncoming(O)):b.transformIncoming(O);for(const m in O)if(Object.hasOwnProperty.call(O,m)){const t=A(O[m],b,g,E+1);t!==null&&(O[m]=t)}}return null}function _(O,b){const g=A(O,b,!1,0);return g===null?O:g}e.transformIncomingURIs=_;function T(O,b){const g=A(O,b,!0,0);return g===null?O:g}e.transformAndReviveIncomingURIs=T}),define(De[121],Ce([1,0,34,19]),function(ne,e,i,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.score=void 0;function S(N,y,A,_,T,O){if(Array.isArray(N)){let b=0;for(const g of N){const E=S(g,y,A,_,T,O);if(E===10)return E;E>b&&(b=E)}return b}else{if(typeof N=="string")return _?N==="*"?5:N===A?10:0:0;if(N){const{language:b,pattern:g,scheme:E,hasAccessToAllModels:m,notebookType:t}=N;if(!_&&!m)return 0;t&&T&&(y=T);let o=0;if(E)if(E===y.scheme)o=10;else if(E==="*")o=5;else return 0;if(b)if(b===A)o=10;else if(b==="*")o=Math.max(o,5);else return 0;if(t)if(t===O)o=10;else if(t==="*"&&O!==void 0)o=Math.max(o,5);else return 0;if(g){let a;if(typeof g=="string"?a=g:a={...g,base:(0,D.normalize)(g.base)},a===y.fsPath||(0,i.match)(a,y.fsPath))o=10;else return 0}return o}else return 0}}e.score=S}),define(De[83],Ce([1,0,24,21]),function(ne,e,i,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.decodeSemanticTokensDto=e.encodeSemanticTokensDto=void 0;var S;(function(b){b[b.Full=1]="Full",b[b.Delta=2]="Delta"})(S||(S={}));function N(b){for(let g=0,E=b.length;g0&&(r=g.subarray(E,E+I),E+=I),a[p]={start:w,deleteCount:u,data:r}}return{id:m,type:"delta",deltas:a}}e.decodeSemanticTokensDto=O}),define(De[122],Ce([16,17]),function(ne,e){return ne.create("vs/editor/common/config/editorOptions",e)}),define(De[123],Ce([1,0,122,21,124,18,23,110]),function(ne,e,i,D,S,N,y,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 _;(function(X){X[X.None=0]="None",X[X.Keep=1]="Keep",X[X.Brackets=2]="Brackets",X[X.Advanced=3]="Advanced",X[X.Full=4]="Full"})(_=e.EditorAutoIndentStrategy||(e.EditorAutoIndentStrategy={})),e.MINIMAP_GUTTER_WIDTH=8;class T{constructor(Q){this._values=Q}hasChanged(Q){return this._values[Q]}}e.ConfigurationChangedEvent=T;class O{constructor(){this.stableMinimapLayoutInput=null,this.stableFitMaxMinimapScale=0,this.stableFitRemainingWidth=0}}e.ComputeOptionsMemory=O;class b{constructor(Q,ve,Ue,je){this.id=Q,this.name=ve,this.defaultValue=Ue,this.schema=je}applyUpdate(Q,ve){return E(Q,ve)}compute(Q,ve,Ue){return Ue}}class g{constructor(Q,ve){this.newValue=Q,this.didChange=ve}}e.ApplyUpdateResult=g;function E(X,Q){if(typeof X!="object"||typeof Q!="object"||!X||!Q)return new g(Q,X!==Q);if(Array.isArray(X)||Array.isArray(Q)){const Ue=Array.isArray(X)&&Array.isArray(Q)&&N.equals(X,Q);return new g(Q,!Ue)}let ve=!1;for(const Ue in Q)if(Q.hasOwnProperty(Ue)){const je=E(X[Ue],Q[Ue]);je.didChange&&(X[Ue]=je.newValue,ve=!0)}return new g(X,ve)}class m{constructor(Q){this.schema=void 0,this.id=Q,this.name="_never_",this.defaultValue=void 0}applyUpdate(Q,ve){return E(Q,ve)}validate(Q){return this.defaultValue}}class t{constructor(Q,ve,Ue,je){this.id=Q,this.name=ve,this.defaultValue=Ue,this.schema=je}applyUpdate(Q,ve){return E(Q,ve)}validate(Q){return typeof Q>"u"?this.defaultValue:Q}compute(Q,ve,Ue){return Ue}}function o(X,Q){return typeof X>"u"?Q:X==="false"?!1:Boolean(X)}e.boolean=o;class a extends t{constructor(Q,ve,Ue,je=void 0){typeof je<"u"&&(je.type="boolean",je.default=Ue),super(Q,ve,Ue,je)}validate(Q){return o(Q,this.defaultValue)}}function p(X,Q,ve,Ue){if(typeof X>"u")return Q;let je=parseInt(X,10);return isNaN(je)?Q:(je=Math.max(ve,je),je=Math.min(Ue,je),je|0)}e.clampedInt=p;class w extends t{static clampedInt(Q,ve,Ue,je){return p(Q,ve,Ue,je)}constructor(Q,ve,Ue,je,qe,ze=void 0){typeof ze<"u"&&(ze.type="integer",ze.default=Ue,ze.minimum=je,ze.maximum=qe),super(Q,ve,Ue,ze),this.minimum=je,this.maximum=qe}validate(Q){return w.clampedInt(Q,this.defaultValue,this.minimum,this.maximum)}}class u extends t{static clamp(Q,ve,Ue){return QUe?Ue:Q}static float(Q,ve){if(typeof Q=="number")return Q;if(typeof Q>"u")return ve;const Ue=parseFloat(Q);return isNaN(Ue)?ve:Ue}constructor(Q,ve,Ue,je,qe){typeof qe<"u"&&(qe.type="number",qe.default=Ue),super(Q,ve,Ue,qe),this.validationFn=je}validate(Q){return this.validationFn(u.float(Q,this.defaultValue))}}class I extends t{static string(Q,ve){return typeof Q!="string"?ve:Q}constructor(Q,ve,Ue,je=void 0){typeof je<"u"&&(je.type="string",je.default=Ue),super(Q,ve,Ue,je)}validate(Q){return I.string(Q,this.defaultValue)}}function r(X,Q,ve){return typeof X!="string"||ve.indexOf(X)===-1?Q:X}e.stringSet=r;class c extends t{constructor(Q,ve,Ue,je,qe=void 0){typeof qe<"u"&&(qe.type="string",qe.enum=je,qe.default=Ue),super(Q,ve,Ue,qe),this._allowedValues=je}validate(Q){return r(Q,this.defaultValue,this._allowedValues)}}class n extends b{constructor(Q,ve,Ue,je,qe,ze,tt=void 0){typeof tt<"u"&&(tt.type="string",tt.enum=qe,tt.default=je),super(Q,ve,Ue,tt),this._allowedValues=qe,this._convert=ze}validate(Q){return typeof Q!="string"?this.defaultValue:this._allowedValues.indexOf(Q)===-1?this.defaultValue:this._convert(Q)}}function d(X){switch(X){case"none":return 0;case"keep":return 1;case"brackets":return 2;case"advanced":return 3;case"full":return 4}}class l extends b{constructor(){super(2,"accessibilitySupport",0,{type:"string",enum:["auto","on","off"],enumDescriptions:[i.localize(0,null),i.localize(1,null),i.localize(2,null)],default:"auto",tags:["accessibility"],description:i.localize(3,null)})}validate(Q){switch(Q){case"auto":return 0;case"off":return 1;case"on":return 2}return this.defaultValue}compute(Q,ve,Ue){return Ue===0?Q.accessibilitySupport:Ue}}class f extends b{constructor(){const Q={insertSpace:!0,ignoreEmptyLines:!0};super(19,"comments",Q,{"editor.comments.insertSpace":{type:"boolean",default:Q.insertSpace,description:i.localize(4,null)},"editor.comments.ignoreEmptyLines":{type:"boolean",default:Q.ignoreEmptyLines,description:i.localize(5,null)}})}validate(Q){if(!Q||typeof Q!="object")return this.defaultValue;const ve=Q;return{insertSpace:o(ve.insertSpace,this.defaultValue.insertSpace),ignoreEmptyLines:o(ve.ignoreEmptyLines,this.defaultValue.ignoreEmptyLines)}}}var s;(function(X){X[X.Hidden=0]="Hidden",X[X.Blink=1]="Blink",X[X.Smooth=2]="Smooth",X[X.Phase=3]="Phase",X[X.Expand=4]="Expand",X[X.Solid=5]="Solid"})(s=e.TextEditorCursorBlinkingStyle||(e.TextEditorCursorBlinkingStyle={}));function h(X){switch(X){case"blink":return 1;case"smooth":return 2;case"phase":return 3;case"expand":return 4;case"solid":return 5}}var v;(function(X){X[X.Line=1]="Line",X[X.Block=2]="Block",X[X.Underline=3]="Underline",X[X.LineThin=4]="LineThin",X[X.BlockOutline=5]="BlockOutline",X[X.UnderlineThin=6]="UnderlineThin"})(v=e.TextEditorCursorStyle||(e.TextEditorCursorStyle={}));function k(X){switch(X){case v.Line:return"line";case v.Block:return"block";case v.Underline:return"underline";case v.LineThin:return"line-thin";case v.BlockOutline:return"block-outline";case v.UnderlineThin:return"underline-thin"}}e.cursorStyleToString=k;function F(X){switch(X){case"line":return v.Line;case"block":return v.Block;case"underline":return v.Underline;case"line-thin":return v.LineThin;case"block-outline":return v.BlockOutline;case"underline-thin":return v.UnderlineThin}}class j extends m{constructor(){super(130)}compute(Q,ve,Ue){const je=["monaco-editor"];return ve.get(34)&&je.push(ve.get(34)),Q.extraEditorClassName&&je.push(Q.extraEditorClassName),ve.get(67)==="default"?je.push("mouse-default"):ve.get(67)==="copy"&&je.push("mouse-copy"),ve.get(101)&&je.push("showUnused"),ve.get(128)&&je.push("showDeprecated"),je.join(" ")}}class W extends a{constructor(){super(33,"emptySelectionClipboard",!0,{description:i.localize(6,null)})}compute(Q,ve,Ue){return Ue&&Q.emptySelectionClipboard}}class H extends b{constructor(){const Q={cursorMoveOnType:!0,seedSearchStringFromSelection:"always",autoFindInSelection:"never",globalFindClipboard:!1,addExtraSpaceOnTop:!0,loop:!0};super(36,"find",Q,{"editor.find.cursorMoveOnType":{type:"boolean",default:Q.cursorMoveOnType,description:i.localize(7,null)},"editor.find.seedSearchStringFromSelection":{type:"string",enum:["never","always","selection"],default:Q.seedSearchStringFromSelection,enumDescriptions:[i.localize(8,null),i.localize(9,null),i.localize(10,null)],description:i.localize(11,null)},"editor.find.autoFindInSelection":{type:"string",enum:["never","always","multiline"],default:Q.autoFindInSelection,enumDescriptions:[i.localize(12,null),i.localize(13,null),i.localize(14,null)],description:i.localize(15,null)},"editor.find.globalFindClipboard":{type:"boolean",default:Q.globalFindClipboard,description:i.localize(16,null),included:D.isMacintosh},"editor.find.addExtraSpaceOnTop":{type:"boolean",default:Q.addExtraSpaceOnTop,description:i.localize(17,null)},"editor.find.loop":{type:"boolean",default:Q.loop,description:i.localize(18,null)}})}validate(Q){if(!Q||typeof Q!="object")return this.defaultValue;const ve=Q;return{cursorMoveOnType:o(ve.cursorMoveOnType,this.defaultValue.cursorMoveOnType),seedSearchStringFromSelection:typeof Q.seedSearchStringFromSelection=="boolean"?Q.seedSearchStringFromSelection?"always":"never":r(ve.seedSearchStringFromSelection,this.defaultValue.seedSearchStringFromSelection,["never","always","selection"]),autoFindInSelection:typeof Q.autoFindInSelection=="boolean"?Q.autoFindInSelection?"always":"never":r(ve.autoFindInSelection,this.defaultValue.autoFindInSelection,["never","always","multiline"]),globalFindClipboard:o(ve.globalFindClipboard,this.defaultValue.globalFindClipboard),addExtraSpaceOnTop:o(ve.addExtraSpaceOnTop,this.defaultValue.addExtraSpaceOnTop),loop:o(ve.loop,this.defaultValue.loop)}}}class P extends b{constructor(){super(46,"fontLigatures",P.OFF,{anyOf:[{type:"boolean",description:i.localize(19,null)},{type:"string",description:i.localize(20,null)}],description:i.localize(21,null),default:!1})}validate(Q){return typeof Q>"u"?this.defaultValue:typeof Q=="string"?Q==="false"?P.OFF:Q==="true"?P.ON:Q:Boolean(Q)?P.ON:P.OFF}}e.EditorFontLigatures=P,P.OFF='"liga" off, "calt" off',P.ON='"liga" on, "calt" on';class M extends m{constructor(){super(45)}compute(Q,ve,Ue){return Q.fontInfo}}class R extends t{constructor(){super(47,"fontSize",e.EDITOR_FONT_DEFAULTS.fontSize,{type:"number",minimum:6,maximum:100,default:e.EDITOR_FONT_DEFAULTS.fontSize,description:i.localize(22,null)})}validate(Q){const ve=u.float(Q,this.defaultValue);return ve===0?e.EDITOR_FONT_DEFAULTS.fontSize:u.clamp(ve,6,100)}compute(Q,ve,Ue){return Q.fontInfo.fontSize}}class B extends b{constructor(){super(48,"fontWeight",e.EDITOR_FONT_DEFAULTS.fontWeight,{anyOf:[{type:"number",minimum:B.MINIMUM_VALUE,maximum:B.MAXIMUM_VALUE,errorMessage:i.localize(23,null)},{type:"string",pattern:"^(normal|bold|1000|[1-9][0-9]{0,2})$"},{enum:B.SUGGESTION_VALUES}],default:e.EDITOR_FONT_DEFAULTS.fontWeight,description:i.localize(24,null)})}validate(Q){return Q==="normal"||Q==="bold"?Q:String(w.clampedInt(Q,e.EDITOR_FONT_DEFAULTS.fontWeight,B.MINIMUM_VALUE,B.MAXIMUM_VALUE))}}B.SUGGESTION_VALUES=["normal","bold","100","200","300","400","500","600","700","800","900"],B.MINIMUM_VALUE=1,B.MAXIMUM_VALUE=1e3;class $ extends b{constructor(){const Q={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:""},ve={type:"string",enum:["peek","gotoAndPeek","goto"],default:Q.multiple,enumDescriptions:[i.localize(25,null),i.localize(26,null),i.localize(27,null)]},Ue=["","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(52,"gotoLocation",Q,{"editor.gotoLocation.multiple":{deprecationMessage:i.localize(28,null)},"editor.gotoLocation.multipleDefinitions":{description:i.localize(29,null),...ve},"editor.gotoLocation.multipleTypeDefinitions":{description:i.localize(30,null),...ve},"editor.gotoLocation.multipleDeclarations":{description:i.localize(31,null),...ve},"editor.gotoLocation.multipleImplementations":{description:i.localize(32,null),...ve},"editor.gotoLocation.multipleReferences":{description:i.localize(33,null),...ve},"editor.gotoLocation.alternativeDefinitionCommand":{type:"string",default:Q.alternativeDefinitionCommand,enum:Ue,description:i.localize(34,null)},"editor.gotoLocation.alternativeTypeDefinitionCommand":{type:"string",default:Q.alternativeTypeDefinitionCommand,enum:Ue,description:i.localize(35,null)},"editor.gotoLocation.alternativeDeclarationCommand":{type:"string",default:Q.alternativeDeclarationCommand,enum:Ue,description:i.localize(36,null)},"editor.gotoLocation.alternativeImplementationCommand":{type:"string",default:Q.alternativeImplementationCommand,enum:Ue,description:i.localize(37,null)},"editor.gotoLocation.alternativeReferenceCommand":{type:"string",default:Q.alternativeReferenceCommand,enum:Ue,description:i.localize(38,null)}})}validate(Q){if(!Q||typeof Q!="object")return this.defaultValue;const ve=Q;return{multiple:r(ve.multiple,this.defaultValue.multiple,["peek","gotoAndPeek","goto"]),multipleDefinitions:ve.multipleDefinitions??r(ve.multipleDefinitions,"peek",["peek","gotoAndPeek","goto"]),multipleTypeDefinitions:ve.multipleTypeDefinitions??r(ve.multipleTypeDefinitions,"peek",["peek","gotoAndPeek","goto"]),multipleDeclarations:ve.multipleDeclarations??r(ve.multipleDeclarations,"peek",["peek","gotoAndPeek","goto"]),multipleImplementations:ve.multipleImplementations??r(ve.multipleImplementations,"peek",["peek","gotoAndPeek","goto"]),multipleReferences:ve.multipleReferences??r(ve.multipleReferences,"peek",["peek","gotoAndPeek","goto"]),alternativeDefinitionCommand:I.string(ve.alternativeDefinitionCommand,this.defaultValue.alternativeDefinitionCommand),alternativeTypeDefinitionCommand:I.string(ve.alternativeTypeDefinitionCommand,this.defaultValue.alternativeTypeDefinitionCommand),alternativeDeclarationCommand:I.string(ve.alternativeDeclarationCommand,this.defaultValue.alternativeDeclarationCommand),alternativeImplementationCommand:I.string(ve.alternativeImplementationCommand,this.defaultValue.alternativeImplementationCommand),alternativeReferenceCommand:I.string(ve.alternativeReferenceCommand,this.defaultValue.alternativeReferenceCommand)}}}class U extends b{constructor(){const Q={enabled:!0,delay:300,sticky:!0,above:!0};super(54,"hover",Q,{"editor.hover.enabled":{type:"boolean",default:Q.enabled,description:i.localize(39,null)},"editor.hover.delay":{type:"number",default:Q.delay,minimum:0,maximum:1e4,description:i.localize(40,null)},"editor.hover.sticky":{type:"boolean",default:Q.sticky,description:i.localize(41,null)},"editor.hover.above":{type:"boolean",default:Q.above,description:i.localize(42,null)}})}validate(Q){if(!Q||typeof Q!="object")return this.defaultValue;const ve=Q;return{enabled:o(ve.enabled,this.defaultValue.enabled),delay:w.clampedInt(ve.delay,this.defaultValue.delay,0,1e4),sticky:o(ve.sticky,this.defaultValue.sticky),above:o(ve.above,this.defaultValue.above)}}}var K;(function(X){X[X.None=0]="None",X[X.Text=1]="Text",X[X.Blocks=2]="Blocks"})(K=e.RenderMinimap||(e.RenderMinimap={}));class te extends m{constructor(){super(133)}compute(Q,ve,Ue){return te.computeLayout(ve,{memory:Q.memory,outerWidth:Q.outerWidth,outerHeight:Q.outerHeight,isDominatedByLongLines:Q.isDominatedByLongLines,lineHeight:Q.fontInfo.lineHeight,viewLineCount:Q.viewLineCount,lineNumbersDigitCount:Q.lineNumbersDigitCount,typicalHalfwidthCharacterWidth:Q.fontInfo.typicalHalfwidthCharacterWidth,maxDigitWidth:Q.fontInfo.maxDigitWidth,pixelRatio:Q.pixelRatio})}static computeContainedMinimapLineCount(Q){const ve=Q.height/Q.lineHeight,Ue=Q.scrollBeyondLastLine?ve-1:0,je=(Q.viewLineCount+Ue)/(Q.pixelRatio*Q.height),qe=Math.floor(Q.viewLineCount/je);return{typicalViewportLineCount:ve,extraLinesBeyondLastLine:Ue,desiredRatio:je,minimapLineCount:qe}}static _computeMinimapLayout(Q,ve){const Ue=Q.outerWidth,je=Q.outerHeight,qe=Q.pixelRatio;if(!Q.minimap.enabled)return{renderMinimap:0,minimapLeft:0,minimapWidth:0,minimapHeightIsEditorHeight:!1,minimapIsSampling:!1,minimapScale:1,minimapLineHeight:1,minimapCanvasInnerWidth:0,minimapCanvasInnerHeight:Math.floor(qe*je),minimapCanvasOuterWidth:0,minimapCanvasOuterHeight:je};const ze=ve.stableMinimapLayoutInput,tt=ze&&Q.outerHeight===ze.outerHeight&&Q.lineHeight===ze.lineHeight&&Q.typicalHalfwidthCharacterWidth===ze.typicalHalfwidthCharacterWidth&&Q.pixelRatio===ze.pixelRatio&&Q.scrollBeyondLastLine===ze.scrollBeyondLastLine&&Q.minimap.enabled===ze.minimap.enabled&&Q.minimap.side===ze.minimap.side&&Q.minimap.size===ze.minimap.size&&Q.minimap.showSlider===ze.minimap.showSlider&&Q.minimap.renderCharacters===ze.minimap.renderCharacters&&Q.minimap.maxColumn===ze.minimap.maxColumn&&Q.minimap.scale===ze.minimap.scale&&Q.verticalScrollbarWidth===ze.verticalScrollbarWidth&&Q.isViewportWrapping===ze.isViewportWrapping,nt=Q.lineHeight,lt=Q.typicalHalfwidthCharacterWidth,Dt=Q.scrollBeyondLastLine,ot=Q.minimap.renderCharacters;let rt=qe>=2?Math.round(Q.minimap.scale*2):Q.minimap.scale;const Nt=Q.minimap.maxColumn,Ot=Q.minimap.size,kt=Q.minimap.side,mt=Q.verticalScrollbarWidth,St=Q.viewLineCount,Lt=Q.remainingWidth,Ut=Q.isViewportWrapping,Ke=ot?2:3;let It=Math.floor(qe*je);const Pt=It/qe;let Ft=!1,pt=!1,_e=Ke*rt,Te=rt/qe,me=1;if(Ot==="fill"||Ot==="fit"){const{typicalViewportLineCount:ct,extraLinesBeyondLastLine:_t,desiredRatio:vt,minimapLineCount:yt}=te.computeContainedMinimapLineCount({viewLineCount:St,scrollBeyondLastLine:Dt,height:je,lineHeight:nt,pixelRatio:qe});if(St/yt>1)Ft=!0,pt=!0,rt=1,_e=1,Te=rt/qe;else{let At=!1,ft=rt+1;if(Ot==="fit"){const zt=Math.ceil((St+_t)*_e);Ut&&tt&&Lt<=ve.stableFitRemainingWidth?(At=!0,ft=ve.stableFitMaxMinimapScale):At=zt>It}if(Ot==="fill"||At){Ft=!0;const zt=rt;_e=Math.min(nt*qe,Math.max(1,Math.floor(1/vt))),Ut&&tt&&Lt<=ve.stableFitRemainingWidth&&(ft=ve.stableFitMaxMinimapScale),rt=Math.min(ft,Math.max(1,Math.floor(_e/Ke))),rt>zt&&(me=Math.min(2,rt/zt)),Te=rt/qe/me,It=Math.ceil(Math.max(ct,St+_t)*_e),Ut?(ve.stableMinimapLayoutInput=Q,ve.stableFitRemainingWidth=Lt,ve.stableFitMaxMinimapScale=rt):(ve.stableMinimapLayoutInput=null,ve.stableFitRemainingWidth=0)}}}const G=Math.floor(Nt*Te),Pe=Math.min(G,Math.max(0,Math.floor((Lt-mt-2)*Te/(lt+Te)))+e.MINIMAP_GUTTER_WIDTH);let Me=Math.floor(qe*Pe);const et=Me/qe;Me=Math.floor(Me*me);const $e=ot?1:2,it=kt==="left"?0:Ue-Pe-mt;return{renderMinimap:$e,minimapLeft:it,minimapWidth:Pe,minimapHeightIsEditorHeight:Ft,minimapIsSampling:pt,minimapScale:rt,minimapLineHeight:_e,minimapCanvasInnerWidth:Me,minimapCanvasInnerHeight:It,minimapCanvasOuterWidth:et,minimapCanvasOuterHeight:Pt}}static computeLayout(Q,ve){const Ue=ve.outerWidth|0,je=ve.outerHeight|0,qe=ve.lineHeight|0,ze=ve.lineNumbersDigitCount|0,tt=ve.typicalHalfwidthCharacterWidth,nt=ve.maxDigitWidth,lt=ve.pixelRatio,Dt=ve.viewLineCount,ot=Q.get(125),rt=ot==="inherit"?Q.get(124):ot,Nt=rt==="inherit"?Q.get(120):rt,Ot=Q.get(123),kt=ve.isDominatedByLongLines,mt=Q.get(51),St=Q.get(61).renderType!==0,Lt=Q.get(62),Ut=Q.get(95),Ke=Q.get(66),It=Q.get(93),Pt=It.verticalScrollbarSize,Ft=It.verticalHasArrows,pt=It.arrowSize,_e=It.horizontalScrollbarSize,Te=Q.get(59),me=Q.get(38),G=Q.get(100)!=="never";let Pe;if(typeof Te=="string"&&/^\d+(\.\d+)?ch$/.test(Te)){const xt=parseFloat(Te.substr(0,Te.length-2));Pe=w.clampedInt(xt*tt,0,0,1e3)}else Pe=w.clampedInt(Te,0,0,1e3);me&&G&&(Pe+=16);let Me=0;if(St){const xt=Math.max(ze,Lt);Me=Math.round(xt*nt)}let et=0;mt&&(et=qe);let $e=0,it=$e+et,ct=it+Me,_t=ct+Pe;const vt=Ue-et-Me-Pe;let yt=!1,bt=!1,At=-1;rt==="inherit"&&kt?(yt=!0,bt=!0):Nt==="on"||Nt==="bounded"?bt=!0:Nt==="wordWrapColumn"&&(At=Ot);const ft=te._computeMinimapLayout({outerWidth:Ue,outerHeight:je,lineHeight:qe,typicalHalfwidthCharacterWidth:tt,pixelRatio:lt,scrollBeyondLastLine:Ut,minimap:Ke,verticalScrollbarWidth:Pt,viewLineCount:Dt,remainingWidth:vt,isViewportWrapping:bt},ve.memory||new O);ft.renderMinimap!==0&&ft.minimapLeft===0&&($e+=ft.minimapWidth,it+=ft.minimapWidth,ct+=ft.minimapWidth,_t+=ft.minimapWidth);const zt=vt-ft.minimapWidth,ti=Math.max(1,Math.floor((zt-Pt-2)/tt)),Et=Ft?pt:0;return bt&&(At=Math.max(1,ti),Nt==="bounded"&&(At=Math.min(At,Ot))),{width:Ue,height:je,glyphMarginLeft:$e,glyphMarginWidth:et,lineNumbersLeft:it,lineNumbersWidth:Me,decorationsLeft:ct,decorationsWidth:Pe,contentLeft:_t,contentWidth:zt,minimap:ft,viewportColumn:ti,isWordWrapMinified:yt,isViewportWrapping:bt,wrappingColumn:At,verticalScrollbarWidth:Pt,horizontalScrollbarHeight:_e,overviewRuler:{top:Et,width:Pt,height:je-2*Et,right:0}}}}e.EditorLayoutInfoComputer=te;class de extends b{constructor(){super(127,"wrappingStrategy","simple",{"editor.wrappingStrategy":{enumDescriptions:[i.localize(43,null),i.localize(44,null)],type:"string",enum:["simple","advanced"],default:"simple",description:i.localize(45,null)}})}validate(Q){return r(Q,"simple",["simple","advanced"])}compute(Q,ve,Ue){return ve.get(2)===2?"advanced":Ue}}class re extends b{constructor(){const Q={enabled:!0};super(58,"lightbulb",Q,{"editor.lightbulb.enabled":{type:"boolean",default:Q.enabled,description:i.localize(46,null)}})}validate(Q){return!Q||typeof Q!="object"?this.defaultValue:{enabled:o(Q.enabled,this.defaultValue.enabled)}}}class be extends b{constructor(){const Q={enabled:!1,maxLineCount:5};super(105,"stickyScroll",Q,{"editor.stickyScroll.enabled":{type:"boolean",default:Q.enabled,description:i.localize(47,null)},"editor.stickyScroll.maxLineCount":{type:"number",default:Q.maxLineCount,minimum:1,maximum:10,description:i.localize(48,null)}})}validate(Q){if(!Q||typeof Q!="object")return this.defaultValue;const ve=Q;return{enabled:o(ve.enabled,this.defaultValue.enabled),maxLineCount:w.clampedInt(ve.maxLineCount,this.defaultValue.maxLineCount,1,10)}}}class le extends b{constructor(){const Q={enabled:"on",fontSize:0,fontFamily:"",padding:!1};super(129,"inlayHints",Q,{"editor.inlayHints.enabled":{type:"string",default:Q.enabled,description:i.localize(49,null),enum:["on","onUnlessPressed","offUnlessPressed","off"],markdownEnumDescriptions:[i.localize(50,null),i.localize(51,null,D.isMacintosh?"Ctrl+Option":"Ctrl+Alt"),i.localize(52,null,D.isMacintosh?"Ctrl+Option":"Ctrl+Alt"),i.localize(53,null)]},"editor.inlayHints.fontSize":{type:"number",default:Q.fontSize,markdownDescription:i.localize(54,null,"`#editor.fontSize#`","`5`")},"editor.inlayHints.fontFamily":{type:"string",default:Q.fontFamily,markdownDescription:i.localize(55,null,"`#editor.fontFamily#`")},"editor.inlayHints.padding":{type:"boolean",default:Q.padding,description:i.localize(56,null)}})}validate(Q){if(!Q||typeof Q!="object")return this.defaultValue;const ve=Q;return typeof ve.enabled=="boolean"&&(ve.enabled=ve.enabled?"on":"off"),{enabled:r(ve.enabled,this.defaultValue.enabled,["on","off","offUnlessPressed","onUnlessPressed"]),fontSize:w.clampedInt(ve.fontSize,this.defaultValue.fontSize,0,100),fontFamily:I.string(ve.fontFamily,this.defaultValue.fontFamily),padding:o(ve.padding,this.defaultValue.padding)}}}class fe extends u{constructor(){super(60,"lineHeight",e.EDITOR_FONT_DEFAULTS.lineHeight,Q=>u.clamp(Q,0,150),{markdownDescription:i.localize(57,null)})}compute(Q,ve,Ue){return Q.fontInfo.lineHeight}}class Y extends b{constructor(){const Q={enabled:!0,size:"proportional",side:"right",showSlider:"mouseover",autohide:!1,renderCharacters:!0,maxColumn:120,scale:1};super(66,"minimap",Q,{"editor.minimap.enabled":{type:"boolean",default:Q.enabled,description:i.localize(58,null)},"editor.minimap.autohide":{type:"boolean",default:Q.autohide,description:i.localize(59,null)},"editor.minimap.size":{type:"string",enum:["proportional","fill","fit"],enumDescriptions:[i.localize(60,null),i.localize(61,null),i.localize(62,null)],default:Q.size,description:i.localize(63,null)},"editor.minimap.side":{type:"string",enum:["left","right"],default:Q.side,description:i.localize(64,null)},"editor.minimap.showSlider":{type:"string",enum:["always","mouseover"],default:Q.showSlider,description:i.localize(65,null)},"editor.minimap.scale":{type:"number",default:Q.scale,minimum:1,maximum:3,enum:[1,2,3],description:i.localize(66,null)},"editor.minimap.renderCharacters":{type:"boolean",default:Q.renderCharacters,description:i.localize(67,null)},"editor.minimap.maxColumn":{type:"number",default:Q.maxColumn,description:i.localize(68,null)}})}validate(Q){if(!Q||typeof Q!="object")return this.defaultValue;const ve=Q;return{enabled:o(ve.enabled,this.defaultValue.enabled),autohide:o(ve.autohide,this.defaultValue.autohide),size:r(ve.size,this.defaultValue.size,["proportional","fill","fit"]),side:r(ve.side,this.defaultValue.side,["right","left"]),showSlider:r(ve.showSlider,this.defaultValue.showSlider,["always","mouseover"]),renderCharacters:o(ve.renderCharacters,this.defaultValue.renderCharacters),scale:w.clampedInt(ve.scale,1,1,3),maxColumn:w.clampedInt(ve.maxColumn,this.defaultValue.maxColumn,1,1e4)}}}function ge(X){return X==="ctrlCmd"?D.isMacintosh?"metaKey":"ctrlKey":"altKey"}class Se extends b{constructor(){super(76,"padding",{top:0,bottom:0},{"editor.padding.top":{type:"number",default:0,minimum:0,maximum:1e3,description:i.localize(69,null)},"editor.padding.bottom":{type:"number",default:0,minimum:0,maximum:1e3,description:i.localize(70,null)}})}validate(Q){if(!Q||typeof Q!="object")return this.defaultValue;const ve=Q;return{top:w.clampedInt(ve.top,0,0,1e3),bottom:w.clampedInt(ve.bottom,0,0,1e3)}}}class Oe extends b{constructor(){const Q={enabled:!0,cycle:!1};super(77,"parameterHints",Q,{"editor.parameterHints.enabled":{type:"boolean",default:Q.enabled,description:i.localize(71,null)},"editor.parameterHints.cycle":{type:"boolean",default:Q.cycle,description:i.localize(72,null)}})}validate(Q){if(!Q||typeof Q!="object")return this.defaultValue;const ve=Q;return{enabled:o(ve.enabled,this.defaultValue.enabled),cycle:o(ve.cycle,this.defaultValue.cycle)}}}class Be extends m{constructor(){super(131)}compute(Q,ve,Ue){return Q.pixelRatio}}class Xe extends b{constructor(){const Q={other:"on",comments:"off",strings:"off"},ve=[{type:"boolean"},{type:"string",enum:["on","inline","off"],enumDescriptions:[i.localize(73,null),i.localize(74,null),i.localize(75,null)]}];super(80,"quickSuggestions",Q,{type:"object",additionalProperties:!1,properties:{strings:{anyOf:ve,default:Q.strings,description:i.localize(76,null)},comments:{anyOf:ve,default:Q.comments,description:i.localize(77,null)},other:{anyOf:ve,default:Q.other,description:i.localize(78,null)}},default:Q,markdownDescription:i.localize(79,null,"#editor.suggestOnTriggerCharacters#")}),this.defaultValue=Q}validate(Q){if(typeof Q=="boolean"){const lt=Q?"on":"off";return{comments:lt,strings:lt,other:lt}}if(!Q||typeof Q!="object")return this.defaultValue;const{other:ve,comments:Ue,strings:je}=Q,qe=["on","inline","off"];let ze,tt,nt;return typeof ve=="boolean"?ze=ve?"on":"off":ze=r(ve,this.defaultValue.other,qe),typeof Ue=="boolean"?tt=Ue?"on":"off":tt=r(Ue,this.defaultValue.comments,qe),typeof je=="boolean"?nt=je?"on":"off":nt=r(je,this.defaultValue.strings,qe),{other:ze,comments:tt,strings:nt}}}var ke;(function(X){X[X.Off=0]="Off",X[X.On=1]="On",X[X.Relative=2]="Relative",X[X.Interval=3]="Interval",X[X.Custom=4]="Custom"})(ke=e.RenderLineNumbersType||(e.RenderLineNumbersType={}));class ye extends b{constructor(){super(61,"lineNumbers",{renderType:1,renderFn:null},{type:"string",enum:["off","on","relative","interval"],enumDescriptions:[i.localize(80,null),i.localize(81,null),i.localize(82,null),i.localize(83,null)],default:"on",description:i.localize(84,null)})}validate(Q){let ve=this.defaultValue.renderType,Ue=this.defaultValue.renderFn;return typeof Q<"u"&&(typeof Q=="function"?(ve=4,Ue=Q):Q==="interval"?ve=3:Q==="relative"?ve=2:Q==="on"?ve=1:ve=0),{renderType:ve,renderFn:Ue}}}function Ie(X){const Q=X.get(88);return Q==="editable"?X.get(82):Q!=="on"}e.filterValidationDecorations=Ie;class ae extends b{constructor(){const Q=[],ve={type:"number",description:i.localize(85,null)};super(92,"rulers",Q,{type:"array",items:{anyOf:[ve,{type:["object"],properties:{column:ve,color:{type:"string",description:i.localize(86,null),format:"color-hex"}}}]},default:Q,description:i.localize(87,null)})}validate(Q){if(Array.isArray(Q)){const ve=[];for(const Ue of Q)if(typeof Ue=="number")ve.push({column:w.clampedInt(Ue,0,0,1e4),color:null});else if(Ue&&typeof Ue=="object"){const je=Ue;ve.push({column:w.clampedInt(je.column,0,0,1e4),color:je.color})}return ve.sort((Ue,je)=>Ue.column-je.column),ve}return this.defaultValue}}function ue(X,Q){if(typeof X!="string")return Q;switch(X){case"hidden":return 2;case"visible":return 3;default:return 1}}class ee extends b{constructor(){const Q={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(93,"scrollbar",Q,{"editor.scrollbar.vertical":{type:"string",enum:["auto","visible","hidden"],enumDescriptions:[i.localize(88,null),i.localize(89,null),i.localize(90,null)],default:"auto",description:i.localize(91,null)},"editor.scrollbar.horizontal":{type:"string",enum:["auto","visible","hidden"],enumDescriptions:[i.localize(92,null),i.localize(93,null),i.localize(94,null)],default:"auto",description:i.localize(95,null)},"editor.scrollbar.verticalScrollbarSize":{type:"number",default:Q.verticalScrollbarSize,description:i.localize(96,null)},"editor.scrollbar.horizontalScrollbarSize":{type:"number",default:Q.horizontalScrollbarSize,description:i.localize(97,null)},"editor.scrollbar.scrollByPage":{type:"boolean",default:Q.scrollByPage,description:i.localize(98,null)}})}validate(Q){if(!Q||typeof Q!="object")return this.defaultValue;const ve=Q,Ue=w.clampedInt(ve.horizontalScrollbarSize,this.defaultValue.horizontalScrollbarSize,0,1e3),je=w.clampedInt(ve.verticalScrollbarSize,this.defaultValue.verticalScrollbarSize,0,1e3);return{arrowSize:w.clampedInt(ve.arrowSize,this.defaultValue.arrowSize,0,1e3),vertical:ue(ve.vertical,this.defaultValue.vertical),horizontal:ue(ve.horizontal,this.defaultValue.horizontal),useShadows:o(ve.useShadows,this.defaultValue.useShadows),verticalHasArrows:o(ve.verticalHasArrows,this.defaultValue.verticalHasArrows),horizontalHasArrows:o(ve.horizontalHasArrows,this.defaultValue.horizontalHasArrows),handleMouseWheel:o(ve.handleMouseWheel,this.defaultValue.handleMouseWheel),alwaysConsumeMouseWheel:o(ve.alwaysConsumeMouseWheel,this.defaultValue.alwaysConsumeMouseWheel),horizontalScrollbarSize:Ue,horizontalSliderSize:w.clampedInt(ve.horizontalSliderSize,Ue,0,1e3),verticalScrollbarSize:je,verticalSliderSize:w.clampedInt(ve.verticalSliderSize,je,0,1e3),scrollByPage:o(ve.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 Z extends b{constructor(){const Q={nonBasicASCII:e.inUntrustedWorkspace,invisibleCharacters:!0,ambiguousCharacters:!0,includeComments:e.inUntrustedWorkspace,includeStrings:!0,allowedCharacters:{},allowedLocales:{_os:!0,_vscode:!0}};super(115,"unicodeHighlight",Q,{[e.unicodeHighlightConfigKeys.nonBasicASCII]:{restricted:!0,type:["boolean","string"],enum:[!0,!1,e.inUntrustedWorkspace],default:Q.nonBasicASCII,description:i.localize(99,null)},[e.unicodeHighlightConfigKeys.invisibleCharacters]:{restricted:!0,type:"boolean",default:Q.invisibleCharacters,description:i.localize(100,null)},[e.unicodeHighlightConfigKeys.ambiguousCharacters]:{restricted:!0,type:"boolean",default:Q.ambiguousCharacters,description:i.localize(101,null)},[e.unicodeHighlightConfigKeys.includeComments]:{restricted:!0,type:["boolean","string"],enum:[!0,!1,e.inUntrustedWorkspace],default:Q.includeComments,description:i.localize(102,null)},[e.unicodeHighlightConfigKeys.includeStrings]:{restricted:!0,type:["boolean","string"],enum:[!0,!1,e.inUntrustedWorkspace],default:Q.includeStrings,description:i.localize(103,null)},[e.unicodeHighlightConfigKeys.allowedCharacters]:{restricted:!0,type:"object",default:Q.allowedCharacters,description:i.localize(104,null),additionalProperties:{type:"boolean"}},[e.unicodeHighlightConfigKeys.allowedLocales]:{restricted:!0,type:"object",additionalProperties:{type:"boolean"},default:Q.allowedLocales,description:i.localize(105,null)}})}applyUpdate(Q,ve){let Ue=!1;ve.allowedCharacters&&Q&&(y.equals(Q.allowedCharacters,ve.allowedCharacters)||(Q={...Q,allowedCharacters:ve.allowedCharacters},Ue=!0)),ve.allowedLocales&&Q&&(y.equals(Q.allowedLocales,ve.allowedLocales)||(Q={...Q,allowedLocales:ve.allowedLocales},Ue=!0));const je=super.applyUpdate(Q,ve);return Ue?new g(je.newValue,!0):je}validate(Q){if(!Q||typeof Q!="object")return this.defaultValue;const ve=Q;return{nonBasicASCII:q(ve.nonBasicASCII,e.inUntrustedWorkspace,[!0,!1,e.inUntrustedWorkspace]),invisibleCharacters:o(ve.invisibleCharacters,this.defaultValue.invisibleCharacters),ambiguousCharacters:o(ve.ambiguousCharacters,this.defaultValue.ambiguousCharacters),includeComments:q(ve.includeComments,e.inUntrustedWorkspace,[!0,!1,e.inUntrustedWorkspace]),includeStrings:q(ve.includeStrings,e.inUntrustedWorkspace,[!0,!1,e.inUntrustedWorkspace]),allowedCharacters:this.validateBooleanMap(Q.allowedCharacters,this.defaultValue.allowedCharacters),allowedLocales:this.validateBooleanMap(Q.allowedLocales,this.defaultValue.allowedLocales)}}validateBooleanMap(Q,ve){if(typeof Q!="object"||!Q)return ve;const Ue={};for(const[je,qe]of Object.entries(Q))qe===!0&&(Ue[je]=!0);return Ue}}class C extends b{constructor(){const Q={enabled:!0,mode:"subwordSmart"};super(56,"inlineSuggest",Q,{"editor.inlineSuggest.enabled":{type:"boolean",default:Q.enabled,description:i.localize(106,null)}})}validate(Q){if(!Q||typeof Q!="object")return this.defaultValue;const ve=Q;return{enabled:o(ve.enabled,this.defaultValue.enabled),mode:r(ve.mode,this.defaultValue.mode,["prefix","subword","subwordSmart"])}}}class z extends b{constructor(){const Q={enabled:A.EDITOR_MODEL_DEFAULTS.bracketPairColorizationOptions.enabled,independentColorPoolPerBracketType:A.EDITOR_MODEL_DEFAULTS.bracketPairColorizationOptions.independentColorPoolPerBracketType};super(12,"bracketPairColorization",Q,{"editor.bracketPairColorization.enabled":{type:"boolean",default:Q.enabled,markdownDescription:i.localize(107,null,"`#workbench.colorCustomizations#`")},"editor.bracketPairColorization.independentColorPoolPerBracketType":{type:"boolean",default:Q.independentColorPoolPerBracketType,description:i.localize(108,null)}})}validate(Q){if(!Q||typeof Q!="object")return this.defaultValue;const ve=Q;return{enabled:o(ve.enabled,this.defaultValue.enabled),independentColorPoolPerBracketType:o(ve.independentColorPoolPerBracketType,this.defaultValue.independentColorPoolPerBracketType)}}}class V extends b{constructor(){const Q={bracketPairs:!1,bracketPairsHorizontal:"active",highlightActiveBracketPair:!0,indentation:!0,highlightActiveIndentation:!0};super(13,"guides",Q,{"editor.guides.bracketPairs":{type:["boolean","string"],enum:[!0,"active",!1],enumDescriptions:[i.localize(109,null),i.localize(110,null),i.localize(111,null)],default:Q.bracketPairs,description:i.localize(112,null)},"editor.guides.bracketPairsHorizontal":{type:["boolean","string"],enum:[!0,"active",!1],enumDescriptions:[i.localize(113,null),i.localize(114,null),i.localize(115,null)],default:Q.bracketPairsHorizontal,description:i.localize(116,null)},"editor.guides.highlightActiveBracketPair":{type:"boolean",default:Q.highlightActiveBracketPair,description:i.localize(117,null)},"editor.guides.indentation":{type:"boolean",default:Q.indentation,description:i.localize(118,null)},"editor.guides.highlightActiveIndentation":{type:["boolean","string"],enum:[!0,"always",!1],enumDescriptions:[i.localize(119,null),i.localize(120,null),i.localize(121,null)],default:Q.highlightActiveIndentation,description:i.localize(122,null)}})}validate(Q){if(!Q||typeof Q!="object")return this.defaultValue;const ve=Q;return{bracketPairs:q(ve.bracketPairs,this.defaultValue.bracketPairs,[!0,!1,"active"]),bracketPairsHorizontal:q(ve.bracketPairsHorizontal,this.defaultValue.bracketPairsHorizontal,[!0,!1,"active"]),highlightActiveBracketPair:o(ve.highlightActiveBracketPair,this.defaultValue.highlightActiveBracketPair),indentation:o(ve.indentation,this.defaultValue.indentation),highlightActiveIndentation:q(ve.highlightActiveIndentation,this.defaultValue.highlightActiveIndentation,[!0,!1,"always"])}}}function q(X,Q,ve){const Ue=ve.indexOf(X);return Ue===-1?Q:ve[Ue]}class oe extends b{constructor(){const Q={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,matchOnWordStartOnly:!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(108,"suggest",Q,{"editor.suggest.insertMode":{type:"string",enum:["insert","replace"],enumDescriptions:[i.localize(123,null),i.localize(124,null)],default:Q.insertMode,description:i.localize(125,null)},"editor.suggest.filterGraceful":{type:"boolean",default:Q.filterGraceful,description:i.localize(126,null)},"editor.suggest.localityBonus":{type:"boolean",default:Q.localityBonus,description:i.localize(127,null)},"editor.suggest.shareSuggestSelections":{type:"boolean",default:Q.shareSuggestSelections,markdownDescription:i.localize(128,null)},"editor.suggest.snippetsPreventQuickSuggestions":{type:"boolean",default:Q.snippetsPreventQuickSuggestions,description:i.localize(129,null)},"editor.suggest.showIcons":{type:"boolean",default:Q.showIcons,description:i.localize(130,null)},"editor.suggest.showStatusBar":{type:"boolean",default:Q.showStatusBar,description:i.localize(131,null)},"editor.suggest.preview":{type:"boolean",default:Q.preview,description:i.localize(132,null)},"editor.suggest.showInlineDetails":{type:"boolean",default:Q.showInlineDetails,description:i.localize(133,null)},"editor.suggest.maxVisibleSuggestions":{type:"number",deprecationMessage:i.localize(134,null)},"editor.suggest.filteredTypes":{type:"object",deprecationMessage:i.localize(135,null)},"editor.suggest.showMethods":{type:"boolean",default:!0,markdownDescription:i.localize(136,null)},"editor.suggest.showFunctions":{type:"boolean",default:!0,markdownDescription:i.localize(137,null)},"editor.suggest.showConstructors":{type:"boolean",default:!0,markdownDescription:i.localize(138,null)},"editor.suggest.showDeprecated":{type:"boolean",default:!0,markdownDescription:i.localize(139,null)},"editor.suggest.matchOnWordStartOnly":{type:"boolean",default:!0,markdownDescription:i.localize(140,null)},"editor.suggest.showFields":{type:"boolean",default:!0,markdownDescription:i.localize(141,null)},"editor.suggest.showVariables":{type:"boolean",default:!0,markdownDescription:i.localize(142,null)},"editor.suggest.showClasses":{type:"boolean",default:!0,markdownDescription:i.localize(143,null)},"editor.suggest.showStructs":{type:"boolean",default:!0,markdownDescription:i.localize(144,null)},"editor.suggest.showInterfaces":{type:"boolean",default:!0,markdownDescription:i.localize(145,null)},"editor.suggest.showModules":{type:"boolean",default:!0,markdownDescription:i.localize(146,null)},"editor.suggest.showProperties":{type:"boolean",default:!0,markdownDescription:i.localize(147,null)},"editor.suggest.showEvents":{type:"boolean",default:!0,markdownDescription:i.localize(148,null)},"editor.suggest.showOperators":{type:"boolean",default:!0,markdownDescription:i.localize(149,null)},"editor.suggest.showUnits":{type:"boolean",default:!0,markdownDescription:i.localize(150,null)},"editor.suggest.showValues":{type:"boolean",default:!0,markdownDescription:i.localize(151,null)},"editor.suggest.showConstants":{type:"boolean",default:!0,markdownDescription:i.localize(152,null)},"editor.suggest.showEnums":{type:"boolean",default:!0,markdownDescription:i.localize(153,null)},"editor.suggest.showEnumMembers":{type:"boolean",default:!0,markdownDescription:i.localize(154,null)},"editor.suggest.showKeywords":{type:"boolean",default:!0,markdownDescription:i.localize(155,null)},"editor.suggest.showWords":{type:"boolean",default:!0,markdownDescription:i.localize(156,null)},"editor.suggest.showColors":{type:"boolean",default:!0,markdownDescription:i.localize(157,null)},"editor.suggest.showFiles":{type:"boolean",default:!0,markdownDescription:i.localize(158,null)},"editor.suggest.showReferences":{type:"boolean",default:!0,markdownDescription:i.localize(159,null)},"editor.suggest.showCustomcolors":{type:"boolean",default:!0,markdownDescription:i.localize(160,null)},"editor.suggest.showFolders":{type:"boolean",default:!0,markdownDescription:i.localize(161,null)},"editor.suggest.showTypeParameters":{type:"boolean",default:!0,markdownDescription:i.localize(162,null)},"editor.suggest.showSnippets":{type:"boolean",default:!0,markdownDescription:i.localize(163,null)},"editor.suggest.showUsers":{type:"boolean",default:!0,markdownDescription:i.localize(164,null)},"editor.suggest.showIssues":{type:"boolean",default:!0,markdownDescription:i.localize(165,null)}})}validate(Q){if(!Q||typeof Q!="object")return this.defaultValue;const ve=Q;return{insertMode:r(ve.insertMode,this.defaultValue.insertMode,["insert","replace"]),filterGraceful:o(ve.filterGraceful,this.defaultValue.filterGraceful),snippetsPreventQuickSuggestions:o(ve.snippetsPreventQuickSuggestions,this.defaultValue.filterGraceful),localityBonus:o(ve.localityBonus,this.defaultValue.localityBonus),shareSuggestSelections:o(ve.shareSuggestSelections,this.defaultValue.shareSuggestSelections),showIcons:o(ve.showIcons,this.defaultValue.showIcons),showStatusBar:o(ve.showStatusBar,this.defaultValue.showStatusBar),preview:o(ve.preview,this.defaultValue.preview),previewMode:r(ve.previewMode,this.defaultValue.previewMode,["prefix","subword","subwordSmart"]),showInlineDetails:o(ve.showInlineDetails,this.defaultValue.showInlineDetails),showMethods:o(ve.showMethods,this.defaultValue.showMethods),showFunctions:o(ve.showFunctions,this.defaultValue.showFunctions),showConstructors:o(ve.showConstructors,this.defaultValue.showConstructors),showDeprecated:o(ve.showDeprecated,this.defaultValue.showDeprecated),matchOnWordStartOnly:o(ve.matchOnWordStartOnly,this.defaultValue.matchOnWordStartOnly),showFields:o(ve.showFields,this.defaultValue.showFields),showVariables:o(ve.showVariables,this.defaultValue.showVariables),showClasses:o(ve.showClasses,this.defaultValue.showClasses),showStructs:o(ve.showStructs,this.defaultValue.showStructs),showInterfaces:o(ve.showInterfaces,this.defaultValue.showInterfaces),showModules:o(ve.showModules,this.defaultValue.showModules),showProperties:o(ve.showProperties,this.defaultValue.showProperties),showEvents:o(ve.showEvents,this.defaultValue.showEvents),showOperators:o(ve.showOperators,this.defaultValue.showOperators),showUnits:o(ve.showUnits,this.defaultValue.showUnits),showValues:o(ve.showValues,this.defaultValue.showValues),showConstants:o(ve.showConstants,this.defaultValue.showConstants),showEnums:o(ve.showEnums,this.defaultValue.showEnums),showEnumMembers:o(ve.showEnumMembers,this.defaultValue.showEnumMembers),showKeywords:o(ve.showKeywords,this.defaultValue.showKeywords),showWords:o(ve.showWords,this.defaultValue.showWords),showColors:o(ve.showColors,this.defaultValue.showColors),showFiles:o(ve.showFiles,this.defaultValue.showFiles),showReferences:o(ve.showReferences,this.defaultValue.showReferences),showFolders:o(ve.showFolders,this.defaultValue.showFolders),showTypeParameters:o(ve.showTypeParameters,this.defaultValue.showTypeParameters),showSnippets:o(ve.showSnippets,this.defaultValue.showSnippets),showUsers:o(ve.showUsers,this.defaultValue.showUsers),showIssues:o(ve.showIssues,this.defaultValue.showIssues)}}}class ce extends b{constructor(){super(103,"smartSelect",{selectLeadingAndTrailingWhitespace:!0},{"editor.smartSelect.selectLeadingAndTrailingWhitespace":{description:i.localize(166,null),default:!0,type:"boolean"}})}validate(Q){return!Q||typeof Q!="object"?this.defaultValue:{selectLeadingAndTrailingWhitespace:o(Q.selectLeadingAndTrailingWhitespace,this.defaultValue.selectLeadingAndTrailingWhitespace)}}}class J extends m{constructor(){super(132)}compute(Q,ve,Ue){return ve.get(82)?!0:Q.tabFocusMode}}var pe;(function(X){X[X.None=0]="None",X[X.Same=1]="Same",X[X.Indent=2]="Indent",X[X.DeepIndent=3]="DeepIndent"})(pe=e.WrappingIndent||(e.WrappingIndent={}));class Ee extends b{constructor(){super(126,"wrappingIndent",1,{"editor.wrappingIndent":{type:"string",enum:["none","same","indent","deepIndent"],enumDescriptions:[i.localize(167,null),i.localize(168,null),i.localize(169,null),i.localize(170,null)],description:i.localize(171,null),default:"same"}})}validate(Q){switch(Q){case"none":return 0;case"same":return 1;case"indent":return 2;case"deepIndent":return 3}return 1}compute(Q,ve,Ue){return ve.get(2)===2?0:Ue}}class Ne extends m{constructor(){super(134)}compute(Q,ve,Ue){const je=ve.get(133);return{isDominatedByLongLines:Q.isDominatedByLongLines,isWordWrapMinified:je.isWordWrapMinified,isViewportWrapping:je.isViewportWrapping,wrappingColumn:je.wrappingColumn}}}class xe extends b{constructor(){const Q={enabled:!0};super(32,"dropIntoEditor",Q,{"editor.dropIntoEditor.enabled":{type:"boolean",default:Q.enabled,markdownDescription:i.localize(172,null)}})}validate(Q){return!Q||typeof Q!="object"?this.defaultValue:{enabled:o(Q.enabled,this.defaultValue.enabled)}}}const Ze="Consolas, 'Courier New', monospace",Ge="Menlo, Monaco, 'Courier New', monospace",Qe="'Droid Sans Mono', 'monospace', monospace";e.EDITOR_FONT_DEFAULTS={fontFamily:D.isMacintosh?Ge:D.isLinux?Qe:Ze,fontWeight:"normal",fontSize:D.isMacintosh?12:14,lineHeight:0,letterSpacing:0},e.editorOptionsRegistry=[];function Fe(X){return e.editorOptionsRegistry[X.id]=X,X}var dt;(function(X){X[X.acceptSuggestionOnCommitCharacter=0]="acceptSuggestionOnCommitCharacter",X[X.acceptSuggestionOnEnter=1]="acceptSuggestionOnEnter",X[X.accessibilitySupport=2]="accessibilitySupport",X[X.accessibilityPageSize=3]="accessibilityPageSize",X[X.ariaLabel=4]="ariaLabel",X[X.autoClosingBrackets=5]="autoClosingBrackets",X[X.autoClosingDelete=6]="autoClosingDelete",X[X.autoClosingOvertype=7]="autoClosingOvertype",X[X.autoClosingQuotes=8]="autoClosingQuotes",X[X.autoIndent=9]="autoIndent",X[X.automaticLayout=10]="automaticLayout",X[X.autoSurround=11]="autoSurround",X[X.bracketPairColorization=12]="bracketPairColorization",X[X.guides=13]="guides",X[X.codeLens=14]="codeLens",X[X.codeLensFontFamily=15]="codeLensFontFamily",X[X.codeLensFontSize=16]="codeLensFontSize",X[X.colorDecorators=17]="colorDecorators",X[X.columnSelection=18]="columnSelection",X[X.comments=19]="comments",X[X.contextmenu=20]="contextmenu",X[X.copyWithSyntaxHighlighting=21]="copyWithSyntaxHighlighting",X[X.cursorBlinking=22]="cursorBlinking",X[X.cursorSmoothCaretAnimation=23]="cursorSmoothCaretAnimation",X[X.cursorStyle=24]="cursorStyle",X[X.cursorSurroundingLines=25]="cursorSurroundingLines",X[X.cursorSurroundingLinesStyle=26]="cursorSurroundingLinesStyle",X[X.cursorWidth=27]="cursorWidth",X[X.disableLayerHinting=28]="disableLayerHinting",X[X.disableMonospaceOptimizations=29]="disableMonospaceOptimizations",X[X.domReadOnly=30]="domReadOnly",X[X.dragAndDrop=31]="dragAndDrop",X[X.dropIntoEditor=32]="dropIntoEditor",X[X.emptySelectionClipboard=33]="emptySelectionClipboard",X[X.extraEditorClassName=34]="extraEditorClassName",X[X.fastScrollSensitivity=35]="fastScrollSensitivity",X[X.find=36]="find",X[X.fixedOverflowWidgets=37]="fixedOverflowWidgets",X[X.folding=38]="folding",X[X.foldingStrategy=39]="foldingStrategy",X[X.foldingHighlight=40]="foldingHighlight",X[X.foldingImportsByDefault=41]="foldingImportsByDefault",X[X.foldingMaximumRegions=42]="foldingMaximumRegions",X[X.unfoldOnClickAfterEndOfLine=43]="unfoldOnClickAfterEndOfLine",X[X.fontFamily=44]="fontFamily",X[X.fontInfo=45]="fontInfo",X[X.fontLigatures=46]="fontLigatures",X[X.fontSize=47]="fontSize",X[X.fontWeight=48]="fontWeight",X[X.formatOnPaste=49]="formatOnPaste",X[X.formatOnType=50]="formatOnType",X[X.glyphMargin=51]="glyphMargin",X[X.gotoLocation=52]="gotoLocation",X[X.hideCursorInOverviewRuler=53]="hideCursorInOverviewRuler",X[X.hover=54]="hover",X[X.inDiffEditor=55]="inDiffEditor",X[X.inlineSuggest=56]="inlineSuggest",X[X.letterSpacing=57]="letterSpacing",X[X.lightbulb=58]="lightbulb",X[X.lineDecorationsWidth=59]="lineDecorationsWidth",X[X.lineHeight=60]="lineHeight",X[X.lineNumbers=61]="lineNumbers",X[X.lineNumbersMinChars=62]="lineNumbersMinChars",X[X.linkedEditing=63]="linkedEditing",X[X.links=64]="links",X[X.matchBrackets=65]="matchBrackets",X[X.minimap=66]="minimap",X[X.mouseStyle=67]="mouseStyle",X[X.mouseWheelScrollSensitivity=68]="mouseWheelScrollSensitivity",X[X.mouseWheelZoom=69]="mouseWheelZoom",X[X.multiCursorMergeOverlapping=70]="multiCursorMergeOverlapping",X[X.multiCursorModifier=71]="multiCursorModifier",X[X.multiCursorPaste=72]="multiCursorPaste",X[X.occurrencesHighlight=73]="occurrencesHighlight",X[X.overviewRulerBorder=74]="overviewRulerBorder",X[X.overviewRulerLanes=75]="overviewRulerLanes",X[X.padding=76]="padding",X[X.parameterHints=77]="parameterHints",X[X.peekWidgetDefaultFocus=78]="peekWidgetDefaultFocus",X[X.definitionLinkOpensInPeek=79]="definitionLinkOpensInPeek",X[X.quickSuggestions=80]="quickSuggestions",X[X.quickSuggestionsDelay=81]="quickSuggestionsDelay",X[X.readOnly=82]="readOnly",X[X.renameOnType=83]="renameOnType",X[X.renderControlCharacters=84]="renderControlCharacters",X[X.renderFinalNewline=85]="renderFinalNewline",X[X.renderLineHighlight=86]="renderLineHighlight",X[X.renderLineHighlightOnlyWhenFocus=87]="renderLineHighlightOnlyWhenFocus",X[X.renderValidationDecorations=88]="renderValidationDecorations",X[X.renderWhitespace=89]="renderWhitespace",X[X.revealHorizontalRightPadding=90]="revealHorizontalRightPadding",X[X.roundedSelection=91]="roundedSelection",X[X.rulers=92]="rulers",X[X.scrollbar=93]="scrollbar",X[X.scrollBeyondLastColumn=94]="scrollBeyondLastColumn",X[X.scrollBeyondLastLine=95]="scrollBeyondLastLine",X[X.scrollPredominantAxis=96]="scrollPredominantAxis",X[X.selectionClipboard=97]="selectionClipboard",X[X.selectionHighlight=98]="selectionHighlight",X[X.selectOnLineNumbers=99]="selectOnLineNumbers",X[X.showFoldingControls=100]="showFoldingControls",X[X.showUnused=101]="showUnused",X[X.snippetSuggestions=102]="snippetSuggestions",X[X.smartSelect=103]="smartSelect",X[X.smoothScrolling=104]="smoothScrolling",X[X.stickyScroll=105]="stickyScroll",X[X.stickyTabStops=106]="stickyTabStops",X[X.stopRenderingLineAfter=107]="stopRenderingLineAfter",X[X.suggest=108]="suggest",X[X.suggestFontSize=109]="suggestFontSize",X[X.suggestLineHeight=110]="suggestLineHeight",X[X.suggestOnTriggerCharacters=111]="suggestOnTriggerCharacters",X[X.suggestSelection=112]="suggestSelection",X[X.tabCompletion=113]="tabCompletion",X[X.tabIndex=114]="tabIndex",X[X.unicodeHighlighting=115]="unicodeHighlighting",X[X.unusualLineTerminators=116]="unusualLineTerminators",X[X.useShadowDOM=117]="useShadowDOM",X[X.useTabStops=118]="useTabStops",X[X.wordSeparators=119]="wordSeparators",X[X.wordWrap=120]="wordWrap",X[X.wordWrapBreakAfterCharacters=121]="wordWrapBreakAfterCharacters",X[X.wordWrapBreakBeforeCharacters=122]="wordWrapBreakBeforeCharacters",X[X.wordWrapColumn=123]="wordWrapColumn",X[X.wordWrapOverride1=124]="wordWrapOverride1",X[X.wordWrapOverride2=125]="wordWrapOverride2",X[X.wrappingIndent=126]="wrappingIndent",X[X.wrappingStrategy=127]="wrappingStrategy",X[X.showDeprecated=128]="showDeprecated",X[X.inlayHints=129]="inlayHints",X[X.editorClassName=130]="editorClassName",X[X.pixelRatio=131]="pixelRatio",X[X.tabFocusMode=132]="tabFocusMode",X[X.layoutInfo=133]="layoutInfo",X[X.wrappingInfo=134]="wrappingInfo"})(dt=e.EditorOption||(e.EditorOption={})),e.EditorOptions={acceptSuggestionOnCommitCharacter:Fe(new a(0,"acceptSuggestionOnCommitCharacter",!0,{markdownDescription:i.localize(173,null)})),acceptSuggestionOnEnter:Fe(new c(1,"acceptSuggestionOnEnter","on",["on","smart","off"],{markdownEnumDescriptions:["",i.localize(174,null),""],markdownDescription:i.localize(175,null)})),accessibilitySupport:Fe(new l),accessibilityPageSize:Fe(new w(3,"accessibilityPageSize",10,1,1073741824,{description:i.localize(176,null),tags:["accessibility"]})),ariaLabel:Fe(new I(4,"ariaLabel",i.localize(177,null))),autoClosingBrackets:Fe(new c(5,"autoClosingBrackets","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",i.localize(178,null),i.localize(179,null),""],description:i.localize(180,null)})),autoClosingDelete:Fe(new c(6,"autoClosingDelete","auto",["always","auto","never"],{enumDescriptions:["",i.localize(181,null),""],description:i.localize(182,null)})),autoClosingOvertype:Fe(new c(7,"autoClosingOvertype","auto",["always","auto","never"],{enumDescriptions:["",i.localize(183,null),""],description:i.localize(184,null)})),autoClosingQuotes:Fe(new c(8,"autoClosingQuotes","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",i.localize(185,null),i.localize(186,null),""],description:i.localize(187,null)})),autoIndent:Fe(new n(9,"autoIndent",4,"full",["none","keep","brackets","advanced","full"],d,{enumDescriptions:[i.localize(188,null),i.localize(189,null),i.localize(190,null),i.localize(191,null),i.localize(192,null)],description:i.localize(193,null)})),automaticLayout:Fe(new a(10,"automaticLayout",!1)),autoSurround:Fe(new c(11,"autoSurround","languageDefined",["languageDefined","quotes","brackets","never"],{enumDescriptions:[i.localize(194,null),i.localize(195,null),i.localize(196,null),""],description:i.localize(197,null)})),bracketPairColorization:Fe(new z),bracketPairGuides:Fe(new V),stickyTabStops:Fe(new a(106,"stickyTabStops",!1,{description:i.localize(198,null)})),codeLens:Fe(new a(14,"codeLens",!0,{description:i.localize(199,null)})),codeLensFontFamily:Fe(new I(15,"codeLensFontFamily","",{description:i.localize(200,null)})),codeLensFontSize:Fe(new w(16,"codeLensFontSize",0,0,100,{type:"number",default:0,minimum:0,maximum:100,markdownDescription:i.localize(201,null)})),colorDecorators:Fe(new a(17,"colorDecorators",!0,{description:i.localize(202,null)})),columnSelection:Fe(new a(18,"columnSelection",!1,{description:i.localize(203,null)})),comments:Fe(new f),contextmenu:Fe(new a(20,"contextmenu",!0)),copyWithSyntaxHighlighting:Fe(new a(21,"copyWithSyntaxHighlighting",!0,{description:i.localize(204,null)})),cursorBlinking:Fe(new n(22,"cursorBlinking",1,"blink",["blink","smooth","phase","expand","solid"],h,{description:i.localize(205,null)})),cursorSmoothCaretAnimation:Fe(new a(23,"cursorSmoothCaretAnimation",!1,{description:i.localize(206,null)})),cursorStyle:Fe(new n(24,"cursorStyle",v.Line,"line",["line","block","underline","line-thin","block-outline","underline-thin"],F,{description:i.localize(207,null)})),cursorSurroundingLines:Fe(new w(25,"cursorSurroundingLines",0,0,1073741824,{description:i.localize(208,null)})),cursorSurroundingLinesStyle:Fe(new c(26,"cursorSurroundingLinesStyle","default",["default","all"],{enumDescriptions:[i.localize(209,null),i.localize(210,null)],description:i.localize(211,null)})),cursorWidth:Fe(new w(27,"cursorWidth",0,0,1073741824,{markdownDescription:i.localize(212,null)})),disableLayerHinting:Fe(new a(28,"disableLayerHinting",!1)),disableMonospaceOptimizations:Fe(new a(29,"disableMonospaceOptimizations",!1)),domReadOnly:Fe(new a(30,"domReadOnly",!1)),dragAndDrop:Fe(new a(31,"dragAndDrop",!0,{description:i.localize(213,null)})),emptySelectionClipboard:Fe(new W),dropIntoEditor:Fe(new xe),stickyScroll:Fe(new be),extraEditorClassName:Fe(new I(34,"extraEditorClassName","")),fastScrollSensitivity:Fe(new u(35,"fastScrollSensitivity",5,X=>X<=0?5:X,{markdownDescription:i.localize(214,null)})),find:Fe(new H),fixedOverflowWidgets:Fe(new a(37,"fixedOverflowWidgets",!1)),folding:Fe(new a(38,"folding",!0,{description:i.localize(215,null)})),foldingStrategy:Fe(new c(39,"foldingStrategy","auto",["auto","indentation"],{enumDescriptions:[i.localize(216,null),i.localize(217,null)],description:i.localize(218,null)})),foldingHighlight:Fe(new a(40,"foldingHighlight",!0,{description:i.localize(219,null)})),foldingImportsByDefault:Fe(new a(41,"foldingImportsByDefault",!1,{description:i.localize(220,null)})),foldingMaximumRegions:Fe(new w(42,"foldingMaximumRegions",5e3,10,65e3,{description:i.localize(221,null)})),unfoldOnClickAfterEndOfLine:Fe(new a(43,"unfoldOnClickAfterEndOfLine",!1,{description:i.localize(222,null)})),fontFamily:Fe(new I(44,"fontFamily",e.EDITOR_FONT_DEFAULTS.fontFamily,{description:i.localize(223,null)})),fontInfo:Fe(new M),fontLigatures2:Fe(new P),fontSize:Fe(new R),fontWeight:Fe(new B),formatOnPaste:Fe(new a(49,"formatOnPaste",!1,{description:i.localize(224,null)})),formatOnType:Fe(new a(50,"formatOnType",!1,{description:i.localize(225,null)})),glyphMargin:Fe(new a(51,"glyphMargin",!0,{description:i.localize(226,null)})),gotoLocation:Fe(new $),hideCursorInOverviewRuler:Fe(new a(53,"hideCursorInOverviewRuler",!1,{description:i.localize(227,null)})),hover:Fe(new U),inDiffEditor:Fe(new a(55,"inDiffEditor",!1)),letterSpacing:Fe(new u(57,"letterSpacing",e.EDITOR_FONT_DEFAULTS.letterSpacing,X=>u.clamp(X,-5,20),{description:i.localize(228,null)})),lightbulb:Fe(new re),lineDecorationsWidth:Fe(new t(59,"lineDecorationsWidth",10)),lineHeight:Fe(new fe),lineNumbers:Fe(new ye),lineNumbersMinChars:Fe(new w(62,"lineNumbersMinChars",5,1,300)),linkedEditing:Fe(new a(63,"linkedEditing",!1,{description:i.localize(229,null)})),links:Fe(new a(64,"links",!0,{description:i.localize(230,null)})),matchBrackets:Fe(new c(65,"matchBrackets","always",["always","near","never"],{description:i.localize(231,null)})),minimap:Fe(new Y),mouseStyle:Fe(new c(67,"mouseStyle","text",["text","default","copy"])),mouseWheelScrollSensitivity:Fe(new u(68,"mouseWheelScrollSensitivity",1,X=>X===0?1:X,{markdownDescription:i.localize(232,null)})),mouseWheelZoom:Fe(new a(69,"mouseWheelZoom",!1,{markdownDescription:i.localize(233,null)})),multiCursorMergeOverlapping:Fe(new a(70,"multiCursorMergeOverlapping",!0,{description:i.localize(234,null)})),multiCursorModifier:Fe(new n(71,"multiCursorModifier","altKey","alt",["ctrlCmd","alt"],ge,{markdownEnumDescriptions:[i.localize(235,null),i.localize(236,null)],markdownDescription:i.localize(237,null)})),multiCursorPaste:Fe(new c(72,"multiCursorPaste","spread",["spread","full"],{markdownEnumDescriptions:[i.localize(238,null),i.localize(239,null)],markdownDescription:i.localize(240,null)})),occurrencesHighlight:Fe(new a(73,"occurrencesHighlight",!0,{description:i.localize(241,null)})),overviewRulerBorder:Fe(new a(74,"overviewRulerBorder",!0,{description:i.localize(242,null)})),overviewRulerLanes:Fe(new w(75,"overviewRulerLanes",3,0,3)),padding:Fe(new Se),parameterHints:Fe(new Oe),peekWidgetDefaultFocus:Fe(new c(78,"peekWidgetDefaultFocus","tree",["tree","editor"],{enumDescriptions:[i.localize(243,null),i.localize(244,null)],description:i.localize(245,null)})),definitionLinkOpensInPeek:Fe(new a(79,"definitionLinkOpensInPeek",!1,{description:i.localize(246,null)})),quickSuggestions:Fe(new Xe),quickSuggestionsDelay:Fe(new w(81,"quickSuggestionsDelay",10,0,1073741824,{description:i.localize(247,null)})),readOnly:Fe(new a(82,"readOnly",!1)),renameOnType:Fe(new a(83,"renameOnType",!1,{description:i.localize(248,null),markdownDeprecationMessage:i.localize(249,null)})),renderControlCharacters:Fe(new a(84,"renderControlCharacters",!0,{description:i.localize(250,null),restricted:!0})),renderFinalNewline:Fe(new a(85,"renderFinalNewline",!0,{description:i.localize(251,null)})),renderLineHighlight:Fe(new c(86,"renderLineHighlight","line",["none","gutter","line","all"],{enumDescriptions:["","","",i.localize(252,null)],description:i.localize(253,null)})),renderLineHighlightOnlyWhenFocus:Fe(new a(87,"renderLineHighlightOnlyWhenFocus",!1,{description:i.localize(254,null)})),renderValidationDecorations:Fe(new c(88,"renderValidationDecorations","editable",["editable","on","off"])),renderWhitespace:Fe(new c(89,"renderWhitespace","selection",["none","boundary","selection","trailing","all"],{enumDescriptions:["",i.localize(255,null),i.localize(256,null),i.localize(257,null),""],description:i.localize(258,null)})),revealHorizontalRightPadding:Fe(new w(90,"revealHorizontalRightPadding",15,0,1e3)),roundedSelection:Fe(new a(91,"roundedSelection",!0,{description:i.localize(259,null)})),rulers:Fe(new ae),scrollbar:Fe(new ee),scrollBeyondLastColumn:Fe(new w(94,"scrollBeyondLastColumn",4,0,1073741824,{description:i.localize(260,null)})),scrollBeyondLastLine:Fe(new a(95,"scrollBeyondLastLine",!0,{description:i.localize(261,null)})),scrollPredominantAxis:Fe(new a(96,"scrollPredominantAxis",!0,{description:i.localize(262,null)})),selectionClipboard:Fe(new a(97,"selectionClipboard",!0,{description:i.localize(263,null),included:D.isLinux})),selectionHighlight:Fe(new a(98,"selectionHighlight",!0,{description:i.localize(264,null)})),selectOnLineNumbers:Fe(new a(99,"selectOnLineNumbers",!0)),showFoldingControls:Fe(new c(100,"showFoldingControls","mouseover",["always","never","mouseover"],{enumDescriptions:[i.localize(265,null),i.localize(266,null),i.localize(267,null)],description:i.localize(268,null)})),showUnused:Fe(new a(101,"showUnused",!0,{description:i.localize(269,null)})),showDeprecated:Fe(new a(128,"showDeprecated",!0,{description:i.localize(270,null)})),inlayHints:Fe(new le),snippetSuggestions:Fe(new c(102,"snippetSuggestions","inline",["top","bottom","inline","none"],{enumDescriptions:[i.localize(271,null),i.localize(272,null),i.localize(273,null),i.localize(274,null)],description:i.localize(275,null)})),smartSelect:Fe(new ce),smoothScrolling:Fe(new a(104,"smoothScrolling",!1,{description:i.localize(276,null)})),stopRenderingLineAfter:Fe(new w(107,"stopRenderingLineAfter",1e4,-1,1073741824)),suggest:Fe(new oe),inlineSuggest:Fe(new C),suggestFontSize:Fe(new w(109,"suggestFontSize",0,0,1e3,{markdownDescription:i.localize(277,null,"`0`","`#editor.fontSize#`")})),suggestLineHeight:Fe(new w(110,"suggestLineHeight",0,0,1e3,{markdownDescription:i.localize(278,null,"`0`","`#editor.lineHeight#`")})),suggestOnTriggerCharacters:Fe(new a(111,"suggestOnTriggerCharacters",!0,{description:i.localize(279,null)})),suggestSelection:Fe(new c(112,"suggestSelection","first",["first","recentlyUsed","recentlyUsedByPrefix"],{markdownEnumDescriptions:[i.localize(280,null),i.localize(281,null),i.localize(282,null)],description:i.localize(283,null)})),tabCompletion:Fe(new c(113,"tabCompletion","off",["on","off","onlySnippets"],{enumDescriptions:[i.localize(284,null),i.localize(285,null),i.localize(286,null)],description:i.localize(287,null)})),tabIndex:Fe(new w(114,"tabIndex",0,-1,1073741824)),unicodeHighlight:Fe(new Z),unusualLineTerminators:Fe(new c(116,"unusualLineTerminators","prompt",["auto","off","prompt"],{enumDescriptions:[i.localize(288,null),i.localize(289,null),i.localize(290,null)],description:i.localize(291,null)})),useShadowDOM:Fe(new a(117,"useShadowDOM",!0)),useTabStops:Fe(new a(118,"useTabStops",!0,{description:i.localize(292,null)})),wordSeparators:Fe(new I(119,"wordSeparators",S.USUAL_WORD_SEPARATORS,{description:i.localize(293,null)})),wordWrap:Fe(new c(120,"wordWrap","off",["off","on","wordWrapColumn","bounded"],{markdownEnumDescriptions:[i.localize(294,null),i.localize(295,null),i.localize(296,null),i.localize(297,null)],description:i.localize(298,null)})),wordWrapBreakAfterCharacters:Fe(new I(121,"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:Fe(new I(122,"wordWrapBreakBeforeCharacters","([{\u2018\u201C\u3008\u300A\u300C\u300E\u3010\u3014\uFF08\uFF3B\uFF5B\uFF62\xA3\xA5\uFF04\uFFE1\uFFE5+\uFF0B")),wordWrapColumn:Fe(new w(123,"wordWrapColumn",80,1,1073741824,{markdownDescription:i.localize(299,null)})),wordWrapOverride1:Fe(new c(124,"wordWrapOverride1","inherit",["off","on","inherit"])),wordWrapOverride2:Fe(new c(125,"wordWrapOverride2","inherit",["off","on","inherit"])),editorClassName:Fe(new j),pixelRatio:Fe(new Be),tabFocusMode:Fe(new J),layoutInfo:Fe(new te),wrappingInfo:Fe(new Ne),wrappingIndent:Fe(new Ee),wrappingStrategy:Fe(new de)}}),define(De[125],Ce([16,17]),function(ne,e){return ne.create("vs/platform/configuration/common/configurationRegistry",e)}),define(De[126],Ce([16,17]),function(ne,e){return ne.create("vs/platform/extensionManagement/common/extensionManagement",e)}),define(De[127],Ce([16,17]),function(ne,e){return ne.create("vs/platform/extensions/common/extensionValidator",e)}),define(De[128],Ce([16,17]),function(ne,e){return ne.create("vs/platform/files/common/files",e)}),define(De[129],Ce([16,17]),function(ne,e){return ne.create("vs/platform/markers/common/markers",e)}),define(De[130],Ce([16,17]),function(ne,e){return ne.create("vs/platform/workspace/common/workspace",e)}),define(De[131],Ce([16,17]),function(ne,e){return ne.create("vs/workbench/api/common/extHostDiagnostics",e)}),define(De[132],Ce([16,17]),function(ne,e){return ne.create("vs/workbench/api/common/extHostExtensionService",e)}),define(De[133],Ce([16,17]),function(ne,e){return ne.create("vs/workbench/api/common/extHostProgress",e)}),define(De[134],Ce([16,17]),function(ne,e){return ne.create("vs/workbench/api/common/extHostStatusBar",e)}),define(De[135],Ce([16,17]),function(ne,e){return ne.create("vs/workbench/api/common/extHostTerminalService",e)}),define(De[136],Ce([16,17]),function(ne,e){return ne.create("vs/workbench/api/common/extHostTreeViews",e)}),define(De[137],Ce([16,17]),function(ne,e){return ne.create("vs/workbench/api/common/extHostWorkspace",e)}),define(De[138],Ce([16,17]),function(ne,e){return ne.create("vs/workbench/common/editor",e)}),define(De[139],Ce([16,17]),function(ne,e){return ne.create("vs/workbench/contrib/debug/common/abstractDebugAdapter",e)}),define(De[140],Ce([16,17]),function(ne,e){return ne.create("vs/workbench/contrib/debug/common/debug",e)}),define(De[141],Ce([16,17]),function(ne,e){return ne.create("vs/workbench/contrib/tasks/common/taskDefinitionRegistry",e)}),define(De[142],Ce([16,17]),function(ne,e){return ne.create("vs/workbench/contrib/tasks/common/tasks",e)}),define(De[143],Ce([16,17]),function(ne,e){return ne.create("vs/workbench/services/configurationResolver/common/variableResolver",e)}),define(De[144],Ce([16,17]),function(ne,e){return ne.create("vs/workbench/services/extensions/common/extensionsRegistry",e)}),define(De[145],Ce([16,17]),function(ne,e){return ne.create("vs/workbench/services/search/common/queryBuilder",e)}),define(De[146],Ce([1,0,22,29,127,246]),function(ne,e,i,D,S,N){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isEngineValid=e.isValidExtensionVersion=e.validateExtensionManifest=e.isValidVersion=e.normalizeVersion=e.parseVersion=e.isValidVersionStr=void 0;const y=/^(\^|>=)?((\d+)|x)\.((\d+)|x)\.((\d+)|x)(\-.*)?$/,A=/^-(\d{4})(\d{2})(\d{2})$/;function _(a){return a=a.trim(),a==="*"||y.test(a)}e.isValidVersionStr=_;function T(a){if(!_(a))return null;if(a=a.trim(),a==="*")return{hasCaret:!1,hasGreaterEquals:!1,majorBase:0,majorMustEqual:!1,minorBase:0,minorMustEqual:!1,patchBase:0,patchMustEqual:!1,preRelease:null};const p=a.match(y);return p?{hasCaret:p[1]==="^",hasGreaterEquals:p[1]===">=",majorBase:p[2]==="x"?0:parseInt(p[2],10),majorMustEqual:p[2]!=="x",minorBase:p[4]==="x"?0:parseInt(p[4],10),minorMustEqual:p[4]!=="x",patchBase:p[6]==="x"?0:parseInt(p[6],10),patchMustEqual:p[6]!=="x",preRelease:p[8]||null}:null}e.parseVersion=T;function O(a){if(!a)return null;const p=a.majorBase,w=a.majorMustEqual,u=a.minorBase;let I=a.minorMustEqual;const r=a.patchBase;let c=a.patchMustEqual;a.hasCaret&&(p===0||(I=!1),c=!1);let n=0;if(a.preRelease){const d=A.exec(a.preRelease);if(d){const[,l,f,s]=d;n=Date.UTC(Number(l),Number(f)-1,Number(s))}}return{majorBase:p,majorMustEqual:w,minorBase:u,minorMustEqual:I,patchBase:r,patchMustEqual:c,isMinimum:a.hasGreaterEquals,notBefore:n}}e.normalizeVersion=O;function b(a,p,w){let u;typeof a=="string"?u=O(T(a)):u=a;let I;p instanceof Date?I=p.getTime():typeof p=="string"&&(I=new Date(p).getTime());let r;if(typeof w=="string"?r=O(T(w)):r=w,!u||!r)return!1;const c=u.majorBase,n=u.minorBase,d=u.patchBase;let l=r.majorBase,f=r.minorBase,s=r.patchBase;const h=r.notBefore;let v=r.majorMustEqual,k=r.minorMustEqual,F=r.patchMustEqual;return r.isMinimum?c>l?!0:cf?!0:n=s:(c===1&&l===0&&(!v||!k||!F)&&(l=1,f=0,s=0,v=!0,k=!1,F=!1),cl?!v:nf?!k:ds?!F:!(I&&I"u"&&typeof u.browser>"u")return r.push([D.default.Error,S.localize(7,null,"activationEvents","main")]),r}if(typeof u.extensionKind<"u"&&typeof u.main>"u"&&r.push([D.default.Warning,S.localize(8,null,"extensionKind")]),typeof u.main<"u"){if(typeof u.main!="string")return r.push([D.default.Error,S.localize(9,null,"main")]),r;{const d=(0,i.joinPath)(w,u.main);(0,i.isEqualOrParent)(d,w)||r.push([D.default.Warning,S.localize(10,null,d.path,w.path)])}if(typeof u.activationEvents>"u")return r.push([D.default.Error,S.localize(11,null,"activationEvents","main")]),r}if(typeof u.browser<"u"){if(typeof u.browser!="string")return r.push([D.default.Error,S.localize(12,null,"browser")]),r;{const d=(0,i.joinPath)(w,u.browser);(0,i.isEqualOrParent)(d,w)||r.push([D.default.Warning,S.localize(13,null,d.path,w.path)])}if(typeof u.activationEvents>"u")return r.push([D.default.Error,S.localize(14,null,"activationEvents","browser")]),r}if(!N.valid(u.version))return r.push([D.default.Error,S.localize(15,null)]),r;const c=[];if(!E(a,p,u,I,c))for(const d of c)r.push([D.default.Error,d]);return r}e.validateExtensionManifest=g;function E(a,p,w,u,I){return u||typeof w.main>"u"&&typeof w.browser>"u"?!0:t(a,p,w.engines.vscode,I)}e.isValidExtensionVersion=E;function m(a,p,w){return a==="*"||t(p,w,a)}e.isEngineValid=m;function t(a,p,w,u=[]){const I=O(T(w));if(!I)return u.push(S.localize(16,null,w)),!1;if(I.majorBase===0){if(!I.majorMustEqual||!I.minorMustEqual)return u.push(S.localize(17,null,w)),!1}else if(!I.majorMustEqual)return u.push(S.localize(18,null,w)),!1;return b(a,p,I)?!0:(u.push(S.localize(19,null,a,w)),!1)}function o(a){if(!Array.isArray(a))return!1;for(let p=0,w=a.length;p incoming)[${[...A.incoming.keys()].join(", ")}] (outgoing ->)[${[...A.outgoing.keys()].join(",")}] `);return N.join(` `)}findCycleSlow(){for(const[N,y]of this._nodes){const A=new Set([N]),_=this._findCycle(y,A);if(_)return _}}_findCycle(N,y){for(const[A,_]of N.outgoing){if(y.has(A))return[...y,A].join(" -> ");y.add(A);const T=this._findCycle(_,y);if(T)return T;y.delete(A)}}}e.Graph=D}),define(De[3],Ce([1,0]),function(ne,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.refineServiceDecorator=e.createDecorator=e.IInstantiationService=e._util=void 0;var i;(function(y){y.serviceIds=new Map,y.DI_TARGET="$di$target",y.DI_DEPENDENCIES="$di$dependencies";function A(_){return _[y.DI_DEPENDENCIES]||[]}y.getServiceDependencies=A})(i=e._util||(e._util={})),e.IInstantiationService=S("instantiationService");function D(y,A,_){A[i.DI_TARGET]===A?A[i.DI_DEPENDENCIES].push({id:y,index:_}):(A[i.DI_DEPENDENCIES]=[{id:y,index:_}],A[i.DI_TARGET]=A)}function S(y){if(i.serviceIds.has(y))return i.serviceIds.get(y);const A=function(_,T,O){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");D(A,_,O)};return A.toString=()=>y,i.serviceIds.set(y,A),A}e.createDecorator=S;function N(y){return y}e.refineServiceDecorator=N}),define(De[40],Ce([1,0,9,2,3]),function(ne,e,i,D,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getLanguageTagSettingPlainKey=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,S.createDecorator)("configurationService");function N(a){return a&&typeof a=="object"&&(!a.overrideIdentifier||typeof a.overrideIdentifier=="string")&&(!a.resource||a.resource instanceof D.URI)}e.isConfigurationOverrides=N;function y(a){return a&&typeof a=="object"&&(!a.overrideIdentifiers||Array.isArray(a.overrideIdentifiers))&&!a.overrideIdentifier&&(!a.resource||a.resource instanceof D.URI)}e.isConfigurationUpdateOverrides=y;var A;(function(a){a[a.APPLICATION=1]="APPLICATION",a[a.USER=2]="USER",a[a.USER_LOCAL=3]="USER_LOCAL",a[a.USER_REMOTE=4]="USER_REMOTE",a[a.WORKSPACE=5]="WORKSPACE",a[a.WORKSPACE_FOLDER=6]="WORKSPACE_FOLDER",a[a.DEFAULT=7]="DEFAULT",a[a.MEMORY=8]="MEMORY"})(A=e.ConfigurationTarget||(e.ConfigurationTarget={}));function _(a){switch(a){case 1:return"APPLICATION";case 2:return"USER";case 3:return"USER_LOCAL";case 4:return"USER_REMOTE";case 5:return"WORKSPACE";case 6:return"WORKSPACE_FOLDER";case 7:return"DEFAULT";case 8:return"MEMORY"}}e.ConfigurationTargetToString=_;function T(a,p){const w=Object.create(null);for(const u in a)O(w,u,a[u],p);return w}e.toValuesTree=T;function O(a,p,w,u){const I=p.split("."),r=I.pop();let c=a;for(let n=0;n"u"?w:r}e.getConfigurationValue=E;function m(a,p,w){Object.keys(p).forEach(u=>{u!=="__proto__"&&(u in a?i.isObject(a[u])&&i.isObject(p[u])?m(a[u],p[u],w):w&&(a[u]=p[u]):a[u]=p[u])})}e.merge=m;function t(a,p,w){const u=a.inspect(p),I=a.inspect(w);return typeof u.userValue<"u"||typeof u.workspaceValue<"u"||typeof u.workspaceFolderValue<"u"?u.value:typeof I.userValue<"u"||typeof I.workspaceValue<"u"||typeof I.workspaceFolderValue<"u"?I.value:u.defaultValue}e.getMigratedSettingValue=t;function o(a){return a.replace(/[\[\]]/g,"")}e.getLanguageTagSettingPlainKey=o}),define(De[41],Ce([1,0,21,10,3]),function(ne,e,i,D,S){"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 N=new Map;N.set("false",!1),N.set("true",!0),N.set("isMac",i.isMacintosh),N.set("isLinux",i.isLinux),N.set("isWindows",i.isWindows),N.set("isWeb",i.isWeb),N.set("isMacNative",i.isMacintosh&&!i.isWeb),N.set("isEdge",i.isEdge),N.set("isFirefox",i.isFirefox),N.set("isChrome",i.isChrome),N.set("isSafari",i.isSafari);const y=Object.prototype.hasOwnProperty;var A;(function(H){H[H.False=0]="False",H[H.True=1]="True",H[H.Defined=2]="Defined",H[H.Not=3]="Not",H[H.Equals=4]="Equals",H[H.NotEquals=5]="NotEquals",H[H.And=6]="And",H[H.Regex=7]="Regex",H[H.NotRegex=8]="NotRegex",H[H.Or=9]="Or",H[H.In=10]="In",H[H.NotIn=11]="NotIn",H[H.Greater=12]="Greater",H[H.GreaterEquals=13]="GreaterEquals",H[H.Smaller=14]="Smaller",H[H.SmallerEquals=15]="SmallerEquals"})(A=e.ContextKeyExprType||(e.ContextKeyExprType={}));class _{static false(){return b.INSTANCE}static true(){return g.INSTANCE}static has(P){return E.create(P)}static equals(P,M){return m.create(P,M)}static notEquals(P,M){return a.create(P,M)}static regex(P,M){return n.create(P,M)}static in(P,M){return t.create(P,M)}static notIn(P,M){return o.create(P,M)}static not(P){return p.create(P)}static and(...P){return f.create(P,null,!0)}static or(...P){return s.create(P,null,!0)}static greater(P,M){return u.create(P,M)}static greaterEquals(P,M){return I.create(P,M)}static smaller(P,M){return r.create(P,M)}static smallerEquals(P,M){return c.create(P,M)}static deserialize(P,M=!1){if(!!P)return this._deserializeOrExpression(P,M)}static _deserializeOrExpression(P,M){const R=P.split("||");return s.create(R.map(B=>this._deserializeAndExpression(B,M)),null,!0)}static _deserializeAndExpression(P,M){const R=P.split("&&");return f.create(R.map(B=>this._deserializeOne(B,M)),null,!0)}static _deserializeOne(P,M){if(P=P.trim(),P.indexOf("!=")>=0){const R=P.split("!=");return a.create(R[0].trim(),this._deserializeValue(R[1],M))}if(P.indexOf("==")>=0){const R=P.split("==");return m.create(R[0].trim(),this._deserializeValue(R[1],M))}if(P.indexOf("=~")>=0){const R=P.split("=~");return n.create(R[0].trim(),this._deserializeRegexValue(R[1],M))}if(P.indexOf(" not in ")>=0){const R=P.split(" not in ");return o.create(R[0].trim(),this._deserializeValue(R[1],M))}if(P.indexOf(" in ")>=0){const R=P.split(" in ");return t.create(R[0].trim(),this._deserializeValue(R[1],M))}if(/^[^<=>]+>=[^<=>]+$/.test(P)){const R=P.split(">=");return I.create(R[0].trim(),R[1].trim())}if(/^[^<=>]+>[^<=>]+$/.test(P)){const R=P.split(">");return u.create(R[0].trim(),R[1].trim())}if(/^[^<=>]+<=[^<=>]+$/.test(P)){const R=P.split("<=");return c.create(R[0].trim(),R[1].trim())}if(/^[^<=>]+<[^<=>]+$/.test(P)){const R=P.split("<");return r.create(R[0].trim(),R[1].trim())}return/^\!\s*/.test(P)?p.create(P.substr(1).trim()):E.create(P)}static _deserializeValue(P,M){if(P=P.trim(),P==="true")return!0;if(P==="false")return!1;const R=/^'([^']*)'$/.exec(P);return R?R[1].trim():P}static _deserializeRegexValue(P,M){if((0,D.isFalsyOrWhitespace)(P)){if(M)throw new Error("missing regexp-value for =~-expression");return console.warn("missing regexp-value for =~-expression"),null}const R=P.indexOf("/"),B=P.lastIndexOf("/");if(R===B||R<0){if(M)throw new Error(`bad regexp-value '${P}', missing /-enclosure`);return console.warn(`bad regexp-value '${P}', missing /-enclosure`),null}const $=P.slice(R+1,B),U=P[B+1]==="i"?"i":"";try{return new RegExp($,U)}catch(K){if(M)throw new Error(`bad regexp-value '${P}', parse error: ${K}`);return console.warn(`bad regexp-value '${P}', parse error: ${K}`),null}}}e.ContextKeyExpr=_;function T(H,P){const M=H?H.substituteConstants():void 0,R=P?P.substituteConstants():void 0;return!M&&!R?!0:!M||!R?!1:M.equals(R)}e.expressionsAreEqualWithConstantSubstitution=T;function O(H,P){return H.cmp(P)}class b{constructor(){this.type=0}cmp(P){return this.type-P.type}equals(P){return P.type===this.type}substituteConstants(){return this}evaluate(P){return!1}serialize(){return"false"}keys(){return[]}map(P){return this}negate(){return g.INSTANCE}}e.ContextKeyFalseExpr=b,b.INSTANCE=new b;class g{constructor(){this.type=1}cmp(P){return this.type-P.type}equals(P){return P.type===this.type}substituteConstants(){return this}evaluate(P){return!0}serialize(){return"true"}keys(){return[]}map(P){return this}negate(){return b.INSTANCE}}e.ContextKeyTrueExpr=g,g.INSTANCE=new g;class E{static create(P,M=null){const R=N.get(P);return typeof R=="boolean"?R?g.INSTANCE:b.INSTANCE:new E(P,M)}constructor(P,M){this.key=P,this.negated=M,this.type=2}cmp(P){return P.type!==this.type?this.type-P.type:v(this.key,P.key)}equals(P){return P.type===this.type?this.key===P.key:!1}substituteConstants(){const P=N.get(this.key);return typeof P=="boolean"?P?g.INSTANCE:b.INSTANCE:this}evaluate(P){return!!P.getValue(this.key)}serialize(){return this.key}keys(){return[this.key]}map(P){return P.mapDefined(this.key)}negate(){return this.negated||(this.negated=p.create(this.key,this)),this.negated}}e.ContextKeyDefinedExpr=E;class m{static create(P,M,R=null){if(typeof M=="boolean")return M?E.create(P,R):p.create(P,R);const B=N.get(P);return typeof B=="boolean"?M===(B?"true":"false")?g.INSTANCE:b.INSTANCE:new m(P,M,R)}constructor(P,M,R){this.key=P,this.value=M,this.negated=R,this.type=4}cmp(P){return P.type!==this.type?this.type-P.type:k(this.key,this.value,P.key,P.value)}equals(P){return P.type===this.type?this.key===P.key&&this.value===P.value:!1}substituteConstants(){const P=N.get(this.key);if(typeof P=="boolean"){const M=P?"true":"false";return this.value===M?g.INSTANCE:b.INSTANCE}return this}evaluate(P){return P.getValue(this.key)==this.value}serialize(){return`${this.key} == '${this.value}'`}keys(){return[this.key]}map(P){return P.mapEquals(this.key,this.value)}negate(){return this.negated||(this.negated=a.create(this.key,this.value,this)),this.negated}}e.ContextKeyEqualsExpr=m;class t{static create(P,M){return new t(P,M)}constructor(P,M){this.key=P,this.valueKey=M,this.type=10,this.negated=null}cmp(P){return P.type!==this.type?this.type-P.type:k(this.key,this.valueKey,P.key,P.valueKey)}equals(P){return P.type===this.type?this.key===P.key&&this.valueKey===P.valueKey:!1}substituteConstants(){return this}evaluate(P){const M=P.getValue(this.valueKey),R=P.getValue(this.key);return Array.isArray(M)?M.includes(R):typeof R=="string"&&typeof M=="object"&&M!==null?y.call(M,R):!1}serialize(){return`${this.key} in '${this.valueKey}'`}keys(){return[this.key,this.valueKey]}map(P){return P.mapIn(this.key,this.valueKey)}negate(){return this.negated||(this.negated=o.create(this.key,this.valueKey)),this.negated}}e.ContextKeyInExpr=t;class o{static create(P,M){return new o(P,M)}constructor(P,M){this.key=P,this.valueKey=M,this.type=11,this._negated=t.create(P,M)}cmp(P){return P.type!==this.type?this.type-P.type:this._negated.cmp(P._negated)}equals(P){return P.type===this.type?this._negated.equals(P._negated):!1}substituteConstants(){return this}evaluate(P){return!this._negated.evaluate(P)}serialize(){return`${this.key} not in '${this.valueKey}'`}keys(){return this._negated.keys()}map(P){return P.mapNotIn(this.key,this.valueKey)}negate(){return this._negated}}e.ContextKeyNotInExpr=o;class a{static create(P,M,R=null){if(typeof M=="boolean")return M?p.create(P,R):E.create(P,R);const B=N.get(P);return typeof B=="boolean"?M===(B?"true":"false")?b.INSTANCE:g.INSTANCE:new a(P,M,R)}constructor(P,M,R){this.key=P,this.value=M,this.negated=R,this.type=5}cmp(P){return P.type!==this.type?this.type-P.type:k(this.key,this.value,P.key,P.value)}equals(P){return P.type===this.type?this.key===P.key&&this.value===P.value:!1}substituteConstants(){const P=N.get(this.key);if(typeof P=="boolean"){const M=P?"true":"false";return this.value===M?b.INSTANCE:g.INSTANCE}return this}evaluate(P){return P.getValue(this.key)!=this.value}serialize(){return`${this.key} != '${this.value}'`}keys(){return[this.key]}map(P){return P.mapNotEquals(this.key,this.value)}negate(){return this.negated||(this.negated=m.create(this.key,this.value,this)),this.negated}}e.ContextKeyNotEqualsExpr=a;class p{static create(P,M=null){const R=N.get(P);return typeof R=="boolean"?R?b.INSTANCE:g.INSTANCE:new p(P,M)}constructor(P,M){this.key=P,this.negated=M,this.type=3}cmp(P){return P.type!==this.type?this.type-P.type:v(this.key,P.key)}equals(P){return P.type===this.type?this.key===P.key:!1}substituteConstants(){const P=N.get(this.key);return typeof P=="boolean"?P?b.INSTANCE:g.INSTANCE:this}evaluate(P){return!P.getValue(this.key)}serialize(){return`!${this.key}`}keys(){return[this.key]}map(P){return P.mapNot(this.key)}negate(){return this.negated||(this.negated=E.create(this.key,this)),this.negated}}e.ContextKeyNotExpr=p;function w(H,P){if(typeof H=="string"){const M=parseFloat(H);isNaN(M)||(H=M)}return typeof H=="string"||typeof H=="number"?P(H):b.INSTANCE}class u{static create(P,M,R=null){return w(M,B=>new u(P,B,R))}constructor(P,M,R){this.key=P,this.value=M,this.negated=R,this.type=12}cmp(P){return P.type!==this.type?this.type-P.type:k(this.key,this.value,P.key,P.value)}equals(P){return P.type===this.type?this.key===P.key&&this.value===P.value:!1}substituteConstants(){return this}evaluate(P){return typeof this.value=="string"?!1:parseFloat(P.getValue(this.key))>this.value}serialize(){return`${this.key} > ${this.value}`}keys(){return[this.key]}map(P){return P.mapGreater(this.key,this.value)}negate(){return this.negated||(this.negated=c.create(this.key,this.value,this)),this.negated}}e.ContextKeyGreaterExpr=u;class I{static create(P,M,R=null){return w(M,B=>new I(P,B,R))}constructor(P,M,R){this.key=P,this.value=M,this.negated=R,this.type=13}cmp(P){return P.type!==this.type?this.type-P.type:k(this.key,this.value,P.key,P.value)}equals(P){return P.type===this.type?this.key===P.key&&this.value===P.value:!1}substituteConstants(){return this}evaluate(P){return typeof this.value=="string"?!1:parseFloat(P.getValue(this.key))>=this.value}serialize(){return`${this.key} >= ${this.value}`}keys(){return[this.key]}map(P){return P.mapGreaterEquals(this.key,this.value)}negate(){return this.negated||(this.negated=r.create(this.key,this.value,this)),this.negated}}e.ContextKeyGreaterEqualsExpr=I;class r{static create(P,M,R=null){return w(M,B=>new r(P,B,R))}constructor(P,M,R){this.key=P,this.value=M,this.negated=R,this.type=14}cmp(P){return P.type!==this.type?this.type-P.type:k(this.key,this.value,P.key,P.value)}equals(P){return P.type===this.type?this.key===P.key&&this.value===P.value:!1}substituteConstants(){return this}evaluate(P){return typeof this.value=="string"?!1:parseFloat(P.getValue(this.key))new c(P,B,R))}constructor(P,M,R){this.key=P,this.value=M,this.negated=R,this.type=15}cmp(P){return P.type!==this.type?this.type-P.type:k(this.key,this.value,P.key,P.value)}equals(P){return P.type===this.type?this.key===P.key&&this.value===P.value:!1}substituteConstants(){return this}evaluate(P){return typeof this.value=="string"?!1:parseFloat(P.getValue(this.key))<=this.value}serialize(){return`${this.key} <= ${this.value}`}keys(){return[this.key]}map(P){return P.mapSmallerEquals(this.key,this.value)}negate(){return this.negated||(this.negated=u.create(this.key,this.value,this)),this.negated}}e.ContextKeySmallerEqualsExpr=c;class n{static create(P,M){return new n(P,M)}constructor(P,M){this.key=P,this.regexp=M,this.type=7,this.negated=null}cmp(P){if(P.type!==this.type)return this.type-P.type;if(this.keyP.key)return 1;const M=this.regexp?this.regexp.source:"",R=P.regexp?P.regexp.source:"";return MR?1:0}equals(P){if(P.type===this.type){const M=this.regexp?this.regexp.source:"",R=P.regexp?P.regexp.source:"";return this.key===P.key&&M===R}return!1}substituteConstants(){return this}evaluate(P){const M=P.getValue(this.key);return this.regexp?this.regexp.test(M):!1}serialize(){const P=this.regexp?`/${this.regexp.source}/${this.regexp.ignoreCase?"i":""}`:"/invalid/";return`${this.key} =~ ${P}`}keys(){return[this.key]}map(P){return P.mapRegex(this.key,this.regexp)}negate(){return this.negated||(this.negated=d.create(this)),this.negated}}e.ContextKeyRegexExpr=n;class d{static create(P){return new d(P)}constructor(P){this._actual=P,this.type=8}cmp(P){return P.type!==this.type?this.type-P.type:this._actual.cmp(P._actual)}equals(P){return P.type===this.type?this._actual.equals(P._actual):!1}substituteConstants(){return this}evaluate(P){return!this._actual.evaluate(P)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}map(P){return new d(this._actual.map(P))}negate(){return this._actual}}e.ContextKeyNotRegexExpr=d;function l(H){let P=null;for(let M=0,R=H.length;MP.expr.length)return 1;for(let M=0,R=this.expr.length;M1;){const U=B[B.length-1];if(U.type!==9)break;B.pop();const K=B.pop(),te=B.length===0,de=s.create(U.expr.map(re=>f.create([re,K],null,R)),null,te);de&&(B.push(de),B.sort(O))}if(B.length===1)return B[0];if(R){for(let U=0;UP.serialize()).join(" && ")}keys(){const P=[];for(const M of this.expr)P.push(...M.keys());return P}map(P){return new f(this.expr.map(M=>M.map(P)),null)}negate(){if(!this.negated){const P=[];for(const M of this.expr)P.push(M.negate());this.negated=s.create(P,this,!0)}return this.negated}}class s{static create(P,M,R){return s._normalizeArr(P,M,R)}constructor(P,M){this.expr=P,this.negated=M,this.type=9}cmp(P){if(P.type!==this.type)return this.type-P.type;if(this.expr.lengthP.expr.length)return 1;for(let M=0,R=this.expr.length;MP.serialize()).join(" || ")}keys(){const P=[];for(const M of this.expr)P.push(...M.keys());return P}map(P){return new s(this.expr.map(M=>M.map(P)),null)}negate(){if(!this.negated){const P=[];for(const M of this.expr)P.push(M.negate());for(;P.length>1;){const M=P.shift(),R=P.shift(),B=[];for(const $ of W(M))for(const U of W(R))B.push(f.create([$,U],null,!1));P.unshift(s.create(B,null,!1))}this.negated=s.create(P,this,!0)}return this.negated}}class h extends E{static all(){return h._info.values()}constructor(P,M,R){super(P,null),this._defaultValue=M,typeof R=="object"?h._info.push({...R,key:P}):R!==!0&&h._info.push({key:P,description:R,type:M!=null?typeof M:void 0})}bindTo(P){return P.createKey(this.key,this._defaultValue)}getValue(P){return P.getContextKeyValue(this.key)}toNegated(){return this.negate()}isEqualTo(P){return m.create(this.key,P)}notEqualsTo(P){return a.create(this.key,P)}}e.RawContextKey=h,h._info=[],e.IContextKeyService=(0,S.createDecorator)("contextKeyService"),e.SET_CONTEXT_COMMAND_ID="setContext";function v(H,P){return HP?1:0}function k(H,P,M,R){return HM?1:PR?1:0}function F(H,P){if(H.type===0||P.type===1)return!0;if(H.type===9)return P.type===9?j(H.expr,P.expr):!1;if(P.type===9){for(const M of P.expr)if(F(H,M))return!0;return!1}if(H.type===6){if(P.type===6)return j(P.expr,H.expr);for(const M of H.expr)if(F(M,P))return!0;return!1}return H.equals(P)}e.implies=F;function j(H,P){let M=0,R=0;for(;MK),this.added.fill(re);break;case 0:this.updated=i.TernarySearchTree.forUris(()=>K),this.updated.fill(re);break;case 2:this.deleted=i.TernarySearchTree.forUris(()=>K),this.deleted.fill(re);break}}contains(U,...K){return this.doContains(U,{includeChildren:!1},...K)}affects(U,...K){return this.doContains(U,{includeChildren:!0},...K)}doContains(U,K,...te){if(!U)return!1;const de=te.length>0;return!!((!de||te.includes(1))&&(this.added?.get(U)||K.includeChildren&&this.added?.findSuperstr(U))||(!de||te.includes(0))&&(this.updated?.get(U)||K.includeChildren&&this.updated?.findSuperstr(U))||(!de||te.includes(2))&&(this.deleted?.findSubstr(U)||K.includeChildren&&this.deleted?.findSuperstr(U)))}gotAdded(){return!!this.added}gotDeleted(){return!!this.deleted}gotUpdated(){return!!this.updated}}e.FileChangesEvent=h;function v($,U,K){return!$||!U||$===U||U.length>$.length?!1:(U.charAt(U.length-1)!==D.sep&&(U+=D.sep),K?(0,S.startsWithIgnoreCase)($,U):$.indexOf(U)===0)}e.isParent=v;class k extends Error{constructor(U,K,te){super(U),this.fileOperationResult=K,this.options=te}}e.FileOperationError=k;class F extends k{constructor(U,K,te){super(U,2,te),this.stat=K}}e.NotModifiedSinceFileOperationError=F;var j;(function($){$[$.FILE_IS_DIRECTORY=0]="FILE_IS_DIRECTORY",$[$.FILE_NOT_FOUND=1]="FILE_NOT_FOUND",$[$.FILE_NOT_MODIFIED_SINCE=2]="FILE_NOT_MODIFIED_SINCE",$[$.FILE_MODIFIED_SINCE=3]="FILE_MODIFIED_SINCE",$[$.FILE_MOVE_CONFLICT=4]="FILE_MOVE_CONFLICT",$[$.FILE_WRITE_LOCKED=5]="FILE_WRITE_LOCKED",$[$.FILE_PERMISSION_DENIED=6]="FILE_PERMISSION_DENIED",$[$.FILE_TOO_LARGE=7]="FILE_TOO_LARGE",$[$.FILE_INVALID_PATH=8]="FILE_INVALID_PATH",$[$.FILE_EXCEEDS_MEMORY_LIMIT=9]="FILE_EXCEEDS_MEMORY_LIMIT",$[$.FILE_NOT_DIRECTORY=10]="FILE_NOT_DIRECTORY",$[$.FILE_OTHER_ERROR=11]="FILE_OTHER_ERROR"})(j=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 W;(function($){$[$.FILE=0]="FILE",$[$.FOLDER=1]="FOLDER",$[$.ROOT_FOLDER=2]="ROOT_FOLDER"})(W=e.FileKind||(e.FileKind={})),e.ETAG_DISABLED="";function H($){if(!(typeof $.size!="number"||typeof $.mtime!="number"))return $.mtime.toString(29)+$.size.toString(31)}e.etag=H;async function P($,U){if(!U.hasProvider(y.URI.from({scheme:$.scheme})))return new Promise(K=>{const te=U.onDidChangeFileSystemProviderRegistrations(de=>{de.scheme===$.scheme&&de.added&&(te.dispose(),K())})})}e.whenProviderRegistered=P,e.MIN_MAX_MEMORY_SIZE_MB=2048,e.FALLBACK_MAX_MEMORY_SIZE_MB=4096;class M{static formatSize(U){return(0,N.isNumber)(U)||(U=0),Uu):void 0}createChild(o){return new g(o,this._strict,this,this._enableTracing)}invokeFunction(o,...a){const p=m.traceInvocation(this._enableTracing,o);let w=!1;try{return o({get:I=>{if(w)throw(0,D.illegalState)("service accessor is only valid during the invocation of its target method");const r=this._getOrCreateServiceInstance(I,p);if(!r)throw new Error(`[invokeFunction] unknown service '${I}'`);return r}},...a)}finally{w=!0,p.stop()}}createInstance(o,...a){let p,w;return o instanceof N.SyncDescriptor?(p=m.traceCreation(this._enableTracing,o.ctor),w=this._createInstance(o.ctor,o.staticArguments.concat(a),p)):(p=m.traceCreation(this._enableTracing,o),w=this._createInstance(o,a,p)),p.stop(),w}_createInstance(o,a=[],p){const w=A._util.getServiceDependencies(o).sort((r,c)=>r.index-c.index),u=[];for(const r of w){const c=this._getOrCreateServiceInstance(r.id,p);c||this._throwIfStrict(`[createInstance] ${o.name} depends on UNKNOWN service ${r.id}.`,!1),u.push(c)}const I=w.length>0?w[0].index:a.length;if(a.length!==I){console.trace(`[createInstance] First service dependency of ${o.name} at position ${I+1} conflicts with ${a.length} static arguments`);const r=I-a.length;r>0?a=a.concat(new Array(r)):a=a.slice(0,I)}return Reflect.construct(o,a.concat(u))}_setServiceInstance(o,a){if(this._services.get(o)instanceof N.SyncDescriptor)this._services.set(o,a);else if(this._parent)this._parent._setServiceInstance(o,a);else throw new Error("illegalState - setting UNKNOWN service instance")}_getServiceInstanceOrDescriptor(o){const a=this._services.get(o);return!a&&this._parent?this._parent._getServiceInstanceOrDescriptor(o):a}_getOrCreateServiceInstance(o,a){this._globalGraph&&this._globalGraphImplicitDependency&&this._globalGraph.insertEdge(this._globalGraphImplicitDependency,String(o));const p=this._getServiceInstanceOrDescriptor(o);return p instanceof N.SyncDescriptor?this._safeCreateAndCacheServiceInstance(o,p,a.branch(o,!0)):(a.branch(o,!1),p)}_safeCreateAndCacheServiceInstance(o,a,p){if(this._activeInstantiations.has(o))throw new Error(`illegal state - RECURSIVELY instantiating service '${o}'`);this._activeInstantiations.add(o);try{return this._createAndCacheServiceInstance(o,a,p)}finally{this._activeInstantiations.delete(o)}}_createAndCacheServiceInstance(o,a,p){const w=new y.Graph(r=>r.id.toString());let u=0;const I=[{id:o,desc:a,_trace:p}];for(;I.length;){const r=I.pop();if(w.lookupOrInsertNode(r),u++>1e3)throw new b(w);for(const c of A._util.getServiceDependencies(r.desc.ctor)){const n=this._getServiceInstanceOrDescriptor(c.id);if(n||this._throwIfStrict(`[createInstance] ${o} depends on ${c.id} which is NOT registered.`,!0),this._globalGraph?.insertEdge(String(r.id),String(c.id)),n instanceof N.SyncDescriptor){const d={id:c.id,desc:n,_trace:r._trace.branch(c.id,!0)};w.insertEdge(r,d),I.push(d)}}}for(;;){const r=w.roots();if(r.length===0){if(!w.isEmpty())throw new b(w);break}for(const{data:c}of r){if(this._getServiceInstanceOrDescriptor(c.id)instanceof N.SyncDescriptor){const d=this._createServiceInstanceWithOwner(c.id,c.desc.ctor,c.desc.staticArguments,c.desc.supportsDelayedInstantiation,c._trace);this._setServiceInstance(c.id,d)}w.removeNode(c)}}return this._getServiceInstanceOrDescriptor(o)}_createServiceInstanceWithOwner(o,a,p=[],w,u){if(this._services.get(o)instanceof N.SyncDescriptor)return this._createServiceInstance(o,a,p,w,u);if(this._parent)return this._parent._createServiceInstanceWithOwner(o,a,p,w,u);throw new Error(`illegalState - creating UNKNOWN service instance ${a.name}`)}_createServiceInstance(o,a,p=[],w,u){if(w){const I=new g(void 0,this._strict,this,this._enableTracing);I._globalGraphImplicitDependency=String(o);const r=new Map,c=new i.IdleValue(()=>{const n=I._createInstance(a,p,u);for(const[d,l]of r){const f=n[d];if(typeof f=="function")for(const s of l)f.apply(n,s)}return r.clear(),n});return new Proxy(Object.create(null),{get(n,d){if(!c.isInitialized&&typeof d=="string"&&(d.startsWith("onDid")||d.startsWith("onWill"))){let s=r.get(d);return s||(s=new T.LinkedList,r.set(d,s)),(v,k,F)=>{const j=s.push([v,k,F]);return(0,S.toDisposable)(j)}}if(d in n)return n[d];const l=c.value;let f=l[d];return typeof f!="function"||(f=f.bind(l),n[d]=f),f},set(n,d,l){return c.value[d]=l,!0}})}else return this._createInstance(a,p,u)}_throwIfStrict(o,a){if(a&&console.warn(o),this._strict)throw new Error(o)}}e.InstantiationService=g;var E;(function(t){t[t.Creation=0]="Creation",t[t.Invocation=1]="Invocation",t[t.Branch=2]="Branch"})(E||(E={}));class m{static traceInvocation(o,a){return o?new m(1,a.name||new Error().stack.split(` `).slice(3,4).join(` `)):m._None}static traceCreation(o,a){return o?new m(0,a.name):m._None}constructor(o,a){this.type=o,this.name=a,this._start=Date.now(),this._dep=[]}branch(o,a){const p=new m(2,o.toString());return this._dep.push([o,a,p]),p}stop(){const o=Date.now()-this._start;m._totals+=o;let a=!1;function p(u,I){const r=[],c=new Array(u+1).join(" ");for(const[n,d,l]of I._dep)if(d&&l){a=!0,r.push(`${c}CREATES -> ${n}`);const f=p(u+1,l);f&&r.push(f)}else r.push(`${c}uses -> ${n}`);return r.join(` `)}const w=[`${this.type===0?"CREATE":"CALL"} ${this.name}`,`${p(1,this)}`,`DONE, took ${o.toFixed(2)}ms (grand total ${m._totals.toFixed(2)}ms)`];(o>2||a)&&m.all.add(w.join(` `))}}e.Trace=m,m.all=new Set,m._None=new class extends m{constructor(){super(-1,null)}stop(){}branch(){return this}},m._totals=0}),define(De[11],Ce([1,0,45,4,7,28,21,2,3]),function(ne,e,i,D,S,N,y,A,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LogLevelToString=e.parseLogLevel=e.getLogLevel=e.NullLoggerService=e.NullLogService=e.NullLogger=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,_.createDecorator)("logService"),e.ILoggerService=(0,_.createDecorator)("loggerService");function T(){return new Date().toISOString()}var O;(function(f){f[f.Trace=0]="Trace",f[f.Debug=1]="Debug",f[f.Info=2]="Info",f[f.Warning=3]="Warning",f[f.Error=4]="Error",f[f.Critical=5]="Critical",f[f.Off=6]="Off"})(O=e.LogLevel||(e.LogLevel={})),e.DEFAULT_LOG_LEVEL=O.Info;function b(f,s,h){switch(s){case O.Trace:f.trace(h);break;case O.Debug:f.debug(h);break;case O.Info:f.info(h);break;case O.Warning:f.warn(h);break;case O.Error:f.error(h);break;case O.Critical:f.critical(h);break;default:throw new Error("Invalid log level")}}e.log=b;function g(f){let s="";for(let h=0;h0?" ":"")+v}return s}e.format=g;class E extends S.Disposable{constructor(){super(...arguments),this.level=e.DEFAULT_LOG_LEVEL,this._onDidChangeLogLevel=this._register(new D.Emitter),this.onDidChangeLogLevel=this._onDidChangeLogLevel.event}setLevel(s){this.level!==s&&(this.level=s,this._onDidChangeLogLevel.fire(this.level))}getLevel(){return this.level}}e.AbstractLogger=E;class m extends E{constructor(s){super(),this.logAlways=s}checkLogLevel(s){return this.logAlways||this.getLevel()<=s}trace(s,...h){this.checkLogLevel(O.Trace)&&this.log(O.Trace,g([s,...h]))}debug(s,...h){this.checkLogLevel(O.Debug)&&this.log(O.Debug,g([s,...h]))}info(s,...h){this.checkLogLevel(O.Info)&&this.log(O.Info,g([s,...h]))}warn(s,...h){this.checkLogLevel(O.Warning)&&this.log(O.Warning,g([s,...h]))}error(s,...h){if(this.checkLogLevel(O.Error))if(s instanceof Error){const v=Array.prototype.slice.call(arguments);v[0]=s.stack,this.log(O.Error,g(v))}else this.log(O.Error,g([s,...h]))}critical(s,...h){this.checkLogLevel(O.Critical)&&this.log(O.Critical,g([s,...h]))}flush(){}}e.AbstractMessageLogger=m;class t extends E{constructor(s=e.DEFAULT_LOG_LEVEL){super(),this.setLevel(s),this.useColors=!y.isWindows}trace(s,...h){this.getLevel()<=O.Trace&&(this.useColors?console.log(`\x1B[90m[main ${T()}]\x1B[0m`,s,...h):console.log(`[main ${T()}]`,s,...h))}debug(s,...h){this.getLevel()<=O.Debug&&(this.useColors?console.log(`\x1B[90m[main ${T()}]\x1B[0m`,s,...h):console.log(`[main ${T()}]`,s,...h))}info(s,...h){this.getLevel()<=O.Info&&(this.useColors?console.log(`\x1B[90m[main ${T()}]\x1B[0m`,s,...h):console.log(`[main ${T()}]`,s,...h))}warn(s,...h){this.getLevel()<=O.Warning&&(this.useColors?console.warn(`\x1B[93m[main ${T()}]\x1B[0m`,s,...h):console.warn(`[main ${T()}]`,s,...h))}error(s,...h){this.getLevel()<=O.Error&&(this.useColors?console.error(`\x1B[91m[main ${T()}]\x1B[0m`,s,...h):console.error(`[main ${T()}]`,s,...h))}critical(s,...h){this.getLevel()<=O.Critical&&(this.useColors?console.error(`\x1B[90m[main ${T()}]\x1B[0m`,s,...h):console.error(`[main ${T()}]`,s,...h))}dispose(){}flush(){}}e.ConsoleMainLogger=t;class o extends E{constructor(s=e.DEFAULT_LOG_LEVEL){super(),this.setLevel(s)}trace(s,...h){this.getLevel()<=O.Trace&&console.log("%cTRACE","color: #888",s,...h)}debug(s,...h){this.getLevel()<=O.Debug&&console.log("%cDEBUG","background: #eee; color: #888",s,...h)}info(s,...h){this.getLevel()<=O.Info&&console.log("%c INFO","color: #33f",s,...h)}warn(s,...h){this.getLevel()<=O.Warning&&console.log("%c WARN","color: #993",s,...h)}error(s,...h){this.getLevel()<=O.Error&&console.log("%c ERR","color: #f33",s,...h)}critical(s,...h){this.getLevel()<=O.Critical&&console.log("%cCRITI","background: #f33; color: white",s,...h)}dispose(){}flush(){}}e.ConsoleLogger=o;class a extends E{constructor(s,h=e.DEFAULT_LOG_LEVEL){super(),this.adapter=s,this.setLevel(h)}trace(s,...h){this.getLevel()<=O.Trace&&this.adapter.log(O.Trace,[this.extractMessage(s),...h])}debug(s,...h){this.getLevel()<=O.Debug&&this.adapter.log(O.Debug,[this.extractMessage(s),...h])}info(s,...h){this.getLevel()<=O.Info&&this.adapter.log(O.Info,[this.extractMessage(s),...h])}warn(s,...h){this.getLevel()<=O.Warning&&this.adapter.log(O.Warning,[this.extractMessage(s),...h])}error(s,...h){this.getLevel()<=O.Error&&this.adapter.log(O.Error,[this.extractMessage(s),...h])}critical(s,...h){this.getLevel()<=O.Critical&&this.adapter.log(O.Critical,[this.extractMessage(s),...h])}extractMessage(s){return typeof s=="string"?s:(0,i.toErrorMessage)(s,this.getLevel()<=O.Trace)}dispose(){}flush(){}}e.AdapterLogger=a;class p extends E{constructor(s){super(),this.logServices=s,s.length&&this.setLevel(s[0].getLevel())}setLevel(s){for(const h of this.logServices)h.setLevel(s);super.setLevel(s)}trace(s,...h){for(const v of this.logServices)v.trace(s,...h)}debug(s,...h){for(const v of this.logServices)v.debug(s,...h)}info(s,...h){for(const v of this.logServices)v.info(s,...h)}warn(s,...h){for(const v of this.logServices)v.warn(s,...h)}error(s,...h){for(const v of this.logServices)v.error(s,...h)}critical(s,...h){for(const v of this.logServices)v.critical(s,...h)}flush(){for(const s of this.logServices)s.flush()}dispose(){for(const s of this.logServices)s.dispose()}}e.MultiplexLogService=p;class w extends S.Disposable{constructor(s){super(),this.logger=s,this._register(s)}get onDidChangeLogLevel(){return this.logger.onDidChangeLogLevel}setLevel(s){this.logger.setLevel(s)}getLevel(){return this.logger.getLevel()}trace(s,...h){this.logger.trace(s,...h)}debug(s,...h){this.logger.debug(s,...h)}info(s,...h){this.logger.info(s,...h)}warn(s,...h){this.logger.warn(s,...h)}error(s,...h){this.logger.error(s,...h)}critical(s,...h){this.logger.critical(s,...h)}flush(){this.logger.flush()}}e.LogService=w;class u extends S.Disposable{constructor(s,h){super(),this.logLevel=s,this.loggerItems=new N.ResourceMap,this._register(h(v=>this.setLevel(v)))}getLoggers(){return[...this.loggerItems.values()].map(({logger:s})=>s)}getLogger(s){return this.loggerItems.get(s)?.logger}createLogger(s,h,v){let k=this.loggerItems.get(s)?.logger;return k||(v=h?.always?O.Trace:v,k=this.doCreateLogger(s,v??this.logLevel,h),this.loggerItems.set(s,{logger:k,logLevel:v})),k}setLevel(s,h){const v=A.URI.isUri(s)?s:void 0,k=v?h:s;if(v){const F=this.loggerItems.get(v);F&&F.logLevel!==k&&(F.logLevel=k,F.logger.setLevel(k))}else this.logLevel=k,this.loggerItems.forEach(({logLevel:F,logger:j})=>{F===void 0&&j.setLevel(this.logLevel)})}getLogLevel(s){return this.loggerItems.get(s)?.logLevel}dispose(){this.loggerItems.forEach(({logger:s})=>s.dispose()),this.loggerItems.clear(),super.dispose()}}e.AbstractLoggerService=u;class I{constructor(){this.onDidChangeLogLevel=new D.Emitter().event}setLevel(s){}getLevel(){return O.Info}trace(s,...h){}debug(s,...h){}info(s,...h){}warn(s,...h){}error(s,...h){}critical(s,...h){}dispose(){}flush(){}}e.NullLogger=I;class r extends I{}e.NullLogService=r;class c extends u{constructor(){super(O.Info,D.Event.None)}doCreateLogger(s,h,v){return new I}}e.NullLoggerService=c;function n(f){if(f.verbose)return O.Trace;if(typeof f.logLevel=="string"){const s=d(f.logLevel.toLowerCase());if(s!==void 0)return s}return e.DEFAULT_LOG_LEVEL}e.getLogLevel=n;function d(f){switch(f){case"trace":return O.Trace;case"debug":return O.Debug;case"info":return O.Info;case"warn":return O.Warning;case"error":return O.Error;case"critical":return O.Critical;case"off":return O.Off}}e.parseLogLevel=d;function l(f){switch(f){case O.Trace:return"trace";case O.Debug:return"debug";case O.Info:return"info";case O.Warning:return"warn";case O.Error:return"error";case O.Critical:return"critical";case O.Off:return"off"}}e.LogLevelToString=l}),define(De[86],Ce([1,0,29,129,3]),function(ne,e,i,D,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IMarkerService=e.IMarkerData=e.MarkerSeverity=e.MarkerTag=void 0;var N;(function(_){_[_.Unnecessary=1]="Unnecessary",_[_.Deprecated=2]="Deprecated"})(N=e.MarkerTag||(e.MarkerTag={}));var y;(function(_){_[_.Hint=1]="Hint",_[_.Info=2]="Info",_[_.Warning=4]="Warning",_[_.Error=8]="Error"})(y=e.MarkerSeverity||(e.MarkerSeverity={})),function(_){function T(m,t){return t-m}_.compare=T;const O=Object.create(null);O[_.Error]=(0,D.localize)(0,null),O[_.Warning]=(0,D.localize)(1,null),O[_.Info]=(0,D.localize)(2,null);function b(m){return O[m]||""}_.toString=b;function g(m){switch(m){case i.default.Error:return _.Error;case i.default.Warning:return _.Warning;case i.default.Info:return _.Info;case i.default.Ignore:return _.Hint}}_.fromSeverity=g;function E(m){switch(m){case _.Error:return i.default.Error;case _.Warning:return i.default.Warning;case _.Info:return i.default.Info;case _.Hint:return i.default.Ignore}}_.toSeverity=E}(y=e.MarkerSeverity||(e.MarkerSeverity={}));var A;(function(_){const T="";function O(g){return b(g,!0)}_.makeKey=O;function b(g,E){const m=[T];return g.source?m.push(g.source.replace("\xA6","\\\xA6")):m.push(T),g.code?typeof g.code=="string"?m.push(g.code.replace("\xA6","\\\xA6")):m.push(g.code.value.replace("\xA6","\\\xA6")):m.push(T),g.severity!==void 0&&g.severity!==null?m.push(y.toString(g.severity)):m.push(T),g.message&&E?m.push(g.message.replace("\xA6","\\\xA6")):m.push(T),g.startLineNumber!==void 0&&g.startLineNumber!==null?m.push(g.startLineNumber.toString()):m.push(T),g.startColumn!==void 0&&g.startColumn!==null?m.push(g.startColumn.toString()):m.push(T),g.endLineNumber!==void 0&&g.endLineNumber!==null?m.push(g.endLineNumber.toString()):m.push(T),g.endColumn!==void 0&&g.endColumn!==null?m.push(g.endColumn.toString()):m.push(T),m.push(T),m.join("\xA6")}_.makeKeyOptionalMessage=b})(A=e.IMarkerData||(e.IMarkerData={})),e.IMarkerService=(0,S.createDecorator)("markerService")}),define(De[151],Ce([1,0,4,29,3]),function(ne,e,i,D,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NoOpProgress=e.NoOpNotification=e.NotificationsFilter=e.NeverShowAgainScope=e.INotificationService=e.Severity=void 0,e.Severity=D.default,e.INotificationService=(0,S.createDecorator)("notificationService");var N;(function(T){T[T.WORKSPACE=0]="WORKSPACE",T[T.PROFILE=1]="PROFILE",T[T.APPLICATION=2]="APPLICATION"})(N=e.NeverShowAgainScope||(e.NeverShowAgainScope={}));var y;(function(T){T[T.OFF=0]="OFF",T[T.SILENT=1]="SILENT",T[T.ERROR=2]="ERROR"})(y=e.NotificationsFilter||(e.NotificationsFilter={}));class A{constructor(){this.progress=new _,this.onDidClose=i.Event.None,this.onDidChangeVisibility=i.Event.None}updateSeverity(O){}updateMessage(O){}updateActions(O){}close(){}}e.NoOpNotification=A;class _{infinite(){}done(){}total(O){}worked(O){}}e.NoOpProgress=_}),define(De[87],Ce([1,0,7,10,2,3]),function(ne,e,i,D,S,N){"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,N.createDecorator)("openerService"),e.NullOpenerService=Object.freeze({_serviceBrand:void 0,registerOpener(){return i.Disposable.None},registerValidator(){return i.Disposable.None},registerExternalUriResolver(){return i.Disposable.None},setDefaultExternalOpener(){},registerExternalOpener(){return i.Disposable.None},async open(){return!1},async resolveExternalUri(O){return{resolved:O,dispose(){}}}});function y(O,b){return S.URI.isUri(O)?(0,D.equalsIgnoreCase)(O.scheme,b):(0,D.startsWithIgnoreCase)(O,b+":")}e.matchesScheme=y;function A(O,...b){return b.some(g=>y(O,g))}e.matchesSomeScheme=A;function _(O,b){return O.with({fragment:`${b.startLineNumber},${b.startColumn}${b.endLineNumber?`-${b.endLineNumber}${b.endColumn?`,${b.endColumn}`:""}`:""}`})}e.withSelection=_;function T(O){let b;const g=/^L?(\d+)(?:,(\d+))?(-L?(\d+)(?:,(\d+))?)?/.exec(O.fragment);return g&&(b={startLineNumber:parseInt(g[1]),startColumn:g[2]?parseInt(g[2]):1,endLineNumber:g[4]?parseInt(g[4]):void 0,endColumn:g[4]?g[5]?parseInt(g[5]):1:void 0},O=O.with({fragment:""})),{selection:b,uri:O}}e.extractSelection=T}),define(De[152],Ce([1,0,3]),function(ne,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.productSchemaId=e.IProductService=void 0,e.IProductService=(0,i.createDecorator)("productService"),e.productSchemaId="vscode://schemas/vscode-product"});var He=this&&this.__decorate||function(ne,e,i,D){var S=arguments.length,N=S<3?e:D===null?D=Object.getOwnPropertyDescriptor(e,i):D,y;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")N=Reflect.decorate(ne,e,i,D);else for(var A=ne.length-1;A>=0;A--)(y=ne[A])&&(N=(S<3?y(N):S>3?y(e,i,N):y(e,i))||N);return S>3&&N&&Object.defineProperty(e,i,N),N},We=this&&this.__param||function(ne,e){return function(i,D){e(i,D,ne)}};define(De[153],Ce([1,0,15,20,7,3]),function(ne,e,i,D,S,N){"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,N.createDecorator)("progressService");var y;(function(O){O[O.Explorer=1]="Explorer",O[O.Scm=3]="Scm",O[O.Extensions=5]="Extensions",O[O.Window=10]="Window",O[O.Notification=15]="Notification",O[O.Dialog=20]="Dialog"})(y=e.ProgressLocation||(e.ProgressLocation={})),e.emptyProgressRunner=Object.freeze({total(){},worked(){},done(){}});class A{get value(){return this._value}constructor(b){this.callback=b}report(b){this._value=b,this.callback(this._value)}}e.Progress=A,A.None=Object.freeze({report(){}});let _=class extends S.Disposable{constructor(b,g){super(),this.deferred=new i.DeferredPromise,g.withProgress(b,E=>(this.reporter=E,this.lastStep&&E.report(this.lastStep),this.deferred.p)),this._register((0,S.toDisposable)(()=>this.deferred.complete()))}report(b){this.reporter?this.reporter.report(b):this.lastStep=b}};_=He([We(1,e.IProgressService)],_),e.UnmanagedProgress=_;class T extends S.Disposable{constructor(b){super(),this.progressIndicator=b,this.currentOperationId=0,this.currentOperationDisposables=this._register(new S.DisposableStore)}start(b){this.stop();const g=++this.currentOperationId,E=new D.CancellationTokenSource;return this.currentProgressTimeout=setTimeout(()=>{g===this.currentOperationId&&(this.currentProgressRunner=this.progressIndicator.show(!0))},b),this.currentOperationDisposables.add((0,S.toDisposable)(()=>clearTimeout(this.currentProgressTimeout))),this.currentOperationDisposables.add((0,S.toDisposable)(()=>E.cancel())),this.currentOperationDisposables.add((0,S.toDisposable)(()=>this.currentProgressRunner?this.currentProgressRunner.done():void 0)),{id:g,token:E.token,stop:()=>this.doStop(g),isCurrent:()=>this.currentOperationId===g}}stop(){this.doStop(this.currentOperationId)}doStop(b){this.currentOperationId===b&&this.currentOperationDisposables.clear()}}e.LongRunningOperation=T,e.IEditorProgressService=(0,N.createDecorator)("editorProgressService")}),define(De[30],Ce([1,0,47,9]),function(ne,e,i,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Registry=void 0;class S{constructor(){this.data=new Map}add(y,A){i.ok(D.isString(y)),i.ok(D.isObject(A)),i.ok(!this.data.has(y),"There is already an extension with this id"),this.data.set(y,A)}knows(y){return this.data.has(y)}as(y){return this.data.get(y)||null}}e.Registry=new S}),define(De[88],Ce([1,0,4,30]),function(ne,e,i,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Extensions=void 0,e.Extensions={JSONContribution:"base.contributions.json"};function S(A){return A.length>0&&A.charAt(A.length-1)==="#"?A.substring(0,A.length-1):A}class N{constructor(){this._onDidChangeSchema=new i.Emitter,this.onDidChangeSchema=this._onDidChangeSchema.event,this.schemasById={}}registerSchema(_,T){this.schemasById[S(_)]=T,this._onDidChangeSchema.fire(_)}notifySchemaChanged(_){this._onDidChangeSchema.fire(_)}getSchemaContributions(){return{schemas:this.schemasById}}}const y=new N;D.Registry.add(e.Extensions.JSONContribution,y)}),define(De[89],Ce([1,0,18,4,9,125,40,88,30]),function(ne,e,i,D,S,N,y,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 T;(function(I){I.Multiline="multilineText",I.Singleline="singlelineText"})(T=e.EditPresentationTypes||(e.EditPresentationTypes={})),e.Extensions={Configuration:"base.contributions.configuration"};var O;(function(I){I[I.APPLICATION=1]="APPLICATION",I[I.MACHINE=2]="MACHINE",I[I.WINDOW=3]="WINDOW",I[I.RESOURCE=4]="RESOURCE",I[I.LANGUAGE_OVERRIDABLE=5]="LANGUAGE_OVERRIDABLE",I[I.MACHINE_OVERRIDABLE=6]="MACHINE_OVERRIDABLE"})(O=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 b=_.Registry.as(A.Extensions.JSONContribution);class g{constructor(){this.overrideIdentifiers=new Set,this._onDidSchemaChange=new D.Emitter,this.onDidSchemaChange=this._onDidSchemaChange.event,this._onDidUpdateConfiguration=new D.Emitter,this.onDidUpdateConfiguration=this._onDidUpdateConfiguration.event,this.configurationDefaultsOverrides=new Map,this.defaultLanguageConfigurationOverridesNode={id:"defaultOverrides",title:N.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.policyConfigurations=new Map,this.excludedConfigurationProperties={},b.registerSchema(e.resourceLanguageSettingsSchemaId,this.resourceLanguageSettingsSchema),this.registerOverridePropertyPatternKey()}registerConfiguration(r,c=!0){this.registerConfigurations([r],c)}registerConfigurations(r,c=!0){const n=this.doRegisterConfigurations(r,c);b.registerSchema(e.resourceLanguageSettingsSchemaId,this.resourceLanguageSettingsSchema),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire({properties:n})}deregisterConfigurations(r){const c=this.doDeregisterConfigurations(r);b.registerSchema(e.resourceLanguageSettingsSchemaId,this.resourceLanguageSettingsSchema),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire({properties:c})}updateConfigurations({add:r,remove:c}){const n=[];n.push(...this.doDeregisterConfigurations(c)),n.push(...this.doRegisterConfigurations(r,!1)),b.registerSchema(e.resourceLanguageSettingsSchemaId,this.resourceLanguageSettingsSchema),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire({properties:(0,i.distinct)(n)})}registerDefaultConfigurations(r){const c=[],n=[];for(const{overrides:d,source:l}of r)for(const f in d)if(c.push(f),e.OVERRIDE_PROPERTY_REGEX.test(f)){const s=this.configurationDefaultsOverrides.get(f),h=s?.valuesSources??new Map;if(l)for(const j of Object.keys(d[f]))h.set(j,l);const v={...s?.value||{},...d[f]};this.configurationDefaultsOverrides.set(f,{source:l,value:v,valuesSources:h});const k=(0,y.getLanguageTagSettingPlainKey)(f),F={type:"object",default:v,description:N.localize(1,null,k),$ref:e.resourceLanguageSettingsSchemaId,defaultDefaultValue:v,source:S.isString(l)?void 0:l,defaultValueSource:l};n.push(...t(f)),this.configurationProperties[f]=F,this.defaultLanguageConfigurationOverridesNode.properties[f]=F}else{this.configurationDefaultsOverrides.set(f,{value:d[f],source:l});const s=this.configurationProperties[f];s&&(this.updatePropertyDefaultValue(f,s),this.updateSchema(f,s))}this.registerOverrideIdentifiers(n),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire({properties:c,defaultsOverrides:!0})}deregisterDefaultConfigurations(r){const c=[];for(const{overrides:n,source:d}of r)for(const l in n){const f=this.configurationDefaultsOverrides.get(l),s=S.isString(d)?d:d?.id,h=S.isString(f?.source)?f?.source:f?.source?.id;if(s===h)if(c.push(l),this.configurationDefaultsOverrides.delete(l),e.OVERRIDE_PROPERTY_REGEX.test(l))delete this.configurationProperties[l],delete this.defaultLanguageConfigurationOverridesNode.properties[l];else{const v=this.configurationProperties[l];v&&(this.updatePropertyDefaultValue(l,v),this.updateSchema(l,v))}}this.updateOverridePropertyPatternKey(),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire({properties:c,defaultsOverrides:!0})}notifyConfigurationSchemaUpdated(...r){this._onDidSchemaChange.fire()}registerOverrideIdentifiers(r){for(const c of r)this.overrideIdentifiers.add(c);this.updateOverridePropertyPatternKey()}doRegisterConfigurations(r,c){const n=[];return r.forEach(d=>{n.push(...this.validateAndRegisterProperties(d,c,d.extensionInfo,d.restrictedProperties)),this.configurationContributors.push(d),this.registerJSONConfiguration(d)}),n}doDeregisterConfigurations(r){const c=[],n=d=>{if(d.properties)for(const l in d.properties){c.push(l);const f=this.configurationProperties[l];f?.policy?.name&&this.policyConfigurations.delete(f.policy.name),delete this.configurationProperties[l],this.removeFromSchema(l,d.properties[l])}d.allOf?.forEach(l=>n(l))};for(const d of r){n(d);const l=this.configurationContributors.indexOf(d);l!==-1&&this.configurationContributors.splice(l,1)}return c}validateAndRegisterProperties(r,c=!0,n,d,l=3){l=S.isUndefinedOrNull(r.scope)?l:r.scope;const f=[],s=r.properties;if(s)for(const v in s){const k=s[v];if(c&&w(v,k)){delete s[v];continue}if(k.source=n,k.defaultDefaultValue=s[v].default,this.updatePropertyDefaultValue(v,k),e.OVERRIDE_PROPERTY_REGEX.test(v)?k.scope=void 0:(k.scope=S.isUndefinedOrNull(k.scope)?l:k.scope,k.restricted=S.isUndefinedOrNull(k.restricted)?!!d?.includes(v):k.restricted),s[v].hasOwnProperty("included")&&!s[v].included){this.excludedConfigurationProperties[v]=s[v],delete s[v];continue}else this.configurationProperties[v]=s[v],s[v].policy?.name&&this.policyConfigurations.set(s[v].policy.name,v);!s[v].deprecationMessage&&s[v].markdownDeprecationMessage&&(s[v].deprecationMessage=s[v].markdownDeprecationMessage),f.push(v)}const h=r.allOf;if(h)for(const v of h)f.push(...this.validateAndRegisterProperties(v,c,n,d,l));return f}getConfigurations(){return this.configurationContributors}getConfigurationProperties(){return this.configurationProperties}getPolicyConfigurations(){return this.policyConfigurations}getExcludedConfigurationProperties(){return this.excludedConfigurationProperties}getConfigurationDefaultsOverrides(){return this.configurationDefaultsOverrides}registerJSONConfiguration(r){const c=n=>{const d=n.properties;if(d)for(const f in d)this.updateSchema(f,d[f]);n.allOf?.forEach(c)};c(r)}updateSchema(r,c){switch(e.allSettings.properties[r]=c,c.scope){case 1:e.applicationSettings.properties[r]=c;break;case 2:e.machineSettings.properties[r]=c;break;case 6:e.machineOverridableSettings.properties[r]=c;break;case 3:e.windowSettings.properties[r]=c;break;case 4:e.resourceSettings.properties[r]=c;break;case 5:e.resourceSettings.properties[r]=c,this.resourceLanguageSettingsSchema.properties[r]=c;break}}removeFromSchema(r,c){switch(delete e.allSettings.properties[r],c.scope){case 1:delete e.applicationSettings.properties[r];break;case 2:delete e.machineSettings.properties[r];break;case 6:delete e.machineOverridableSettings.properties[r];break;case 3:delete e.windowSettings.properties[r];break;case 4:case 5:delete e.resourceSettings.properties[r],delete this.resourceLanguageSettingsSchema.properties[r];break}}updateOverridePropertyPatternKey(){for(const r of this.overrideIdentifiers.values()){const c=`[${r}]`,n={type:"object",description:N.localize(2,null),errorMessage:N.localize(3,null),$ref:e.resourceLanguageSettingsSchemaId};this.updatePropertyDefaultValue(c,n),e.allSettings.properties[c]=n,e.applicationSettings.properties[c]=n,e.machineSettings.properties[c]=n,e.machineOverridableSettings.properties[c]=n,e.windowSettings.properties[c]=n,e.resourceSettings.properties[c]=n}this._onDidSchemaChange.fire()}registerOverridePropertyPatternKey(){const r={type:"object",description:N.localize(4,null),errorMessage:N.localize(5,null),$ref:e.resourceLanguageSettingsSchemaId};e.allSettings.patternProperties[e.OVERRIDE_PROPERTY_PATTERN]=r,e.applicationSettings.patternProperties[e.OVERRIDE_PROPERTY_PATTERN]=r,e.machineSettings.patternProperties[e.OVERRIDE_PROPERTY_PATTERN]=r,e.machineOverridableSettings.patternProperties[e.OVERRIDE_PROPERTY_PATTERN]=r,e.windowSettings.patternProperties[e.OVERRIDE_PROPERTY_PATTERN]=r,e.resourceSettings.patternProperties[e.OVERRIDE_PROPERTY_PATTERN]=r,this._onDidSchemaChange.fire()}updatePropertyDefaultValue(r,c){const n=this.configurationDefaultsOverrides.get(r);let d=n?.value,l=n?.source;S.isUndefined(d)&&(d=c.defaultDefaultValue,l=void 0),S.isUndefined(d)&&(d=a(c.type)),c.default=d,c.defaultValueSource=l}}const E="\\[([^\\]]+)\\]",m=new RegExp(E,"g");e.OVERRIDE_PROPERTY_PATTERN=`^(${E})+$`,e.OVERRIDE_PROPERTY_REGEX=new RegExp(e.OVERRIDE_PROPERTY_PATTERN);function t(I){const r=[];if(e.OVERRIDE_PROPERTY_REGEX.test(I)){let c=m.exec(I);for(;c?.length;){const n=c[1].trim();n&&r.push(n),c=m.exec(I)}}return(0,i.distinct)(r)}e.overrideIdentifiersFromKey=t;function o(I){return I.reduce((r,c)=>`${r}[${c}]`,"")}e.keyFromOverrideIdentifiers=o;function a(I){switch(Array.isArray(I)?I[0]:I){case"boolean":return!1;case"integer":case"number":return 0;case"string":return"";case"array":return[];case"object":return{};default:return null}}e.getDefaultValue=a;const p=new g;_.Registry.add(e.Extensions.Configuration,p);function w(I,r){return I.trim()?e.OVERRIDE_PROPERTY_REGEX.test(I)?N.localize(7,null,I):p.getConfigurationProperties()[I]!==void 0?N.localize(8,null,I):r.policy?.name&&p.getPolicyConfigurations().get(r.policy?.name)!==void 0?N.localize(9,null,I,r.policy?.name,p.getPolicyConfigurations().get(r.policy?.name)):null:N.localize(6,null)}e.validateProperty=w;function u(){const I=[],r=p.getConfigurationProperties();for(const c of Object.keys(r))I.push([c,r[c].scope]);return I.push(["launch",4]),I.push(["task",4]),I}e.getScopes=u}),define(De[154],Ce([1,0,18,4,106,7,28,23,9,2,40,89,30]),function(ne,e,i,D,S,N,y,A,_,T,O,b,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ConfigurationChangeEvent=e.mergeChanges=e.Configuration=e.UserSettings=e.ConfigurationModelParser=e.ConfigurationModel=void 0;class E{constructor(c={},n=[],d=[],l){this._contents=c,this._keys=n,this._overrides=d,this.raw=l,this.frozen=!1,this.overrideConfigurations=new Map}get rawConfiguration(){if(!this._rawConfiguration)if(this.raw?.length){const c=this.raw.map(n=>{if(n instanceof E)return n;const d=new m("");return d.parseRaw(n),d.configurationModel});this._rawConfiguration=c.reduce((n,d)=>d===n?d:n.merge(d),c[0])}else this._rawConfiguration=this;return this._rawConfiguration}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}isFrozen(){return this.frozen}getValue(c){return c?(0,O.getConfigurationValue)(this.contents,c):this.contents}inspect(c,n){const d=this.rawConfiguration.getValue(c),l=n?this.rawConfiguration.getOverrideValue(c,n):void 0,f=n?this.rawConfiguration.override(n).getValue(c):d;return{value:d,override:l,merged:f}}getOverrideValue(c,n){const d=this.getContentsForOverrideIdentifer(n);return d?c?(0,O.getConfigurationValue)(d,c):d:void 0}getKeysForOverrideIdentifier(c){const n=[];for(const d of this.overrides)d.identifiers.includes(c)&&n.push(...d.keys);return i.distinct(n)}getAllOverrideIdentifiers(){const c=[];for(const n of this.overrides)c.push(...n.identifiers);return i.distinct(c)}override(c){let n=this.overrideConfigurations.get(c);return n||(n=this.createOverrideConfigurationModel(c),this.overrideConfigurations.set(c,n)),n}merge(...c){const n=A.deepClone(this.contents),d=A.deepClone(this.overrides),l=[...this.keys],f=this.raw?.length?[...this.raw]:[this];for(const s of c)if(f.push(...s.raw?.length?s.raw:[s]),!s.isEmpty()){this.mergeContents(n,s.contents);for(const h of s.overrides){const[v]=d.filter(k=>i.equals(k.identifiers,h.identifiers));v?(this.mergeContents(v.contents,h.contents),v.keys.push(...h.keys),v.keys=i.distinct(v.keys)):d.push(A.deepClone(h))}for(const h of s.keys)l.indexOf(h)===-1&&l.push(h)}return new E(n,l,d,f.every(s=>s instanceof E)?void 0:f)}freeze(){return this.frozen=!0,this}clone(){return new E(A.deepClone(this.contents),[...this.keys],A.deepClone(this.overrides))}createOverrideConfigurationModel(c){const n=this.getContentsForOverrideIdentifer(c);if(!n||typeof n!="object"||!Object.keys(n).length)return this;const d={};for(const l of i.distinct([...Object.keys(this.contents),...Object.keys(n)])){let f=this.contents[l];const s=n[l];s&&(typeof f=="object"&&typeof s=="object"?(f=A.deepClone(f),this.mergeContents(f,s)):f=s),d[l]=f}return new E(d,this.keys,this.overrides)}mergeContents(c,n){for(const d of Object.keys(n)){if(d in c&&_.isObject(c[d])&&_.isObject(n[d])){this.mergeContents(c[d],n[d]);continue}c[d]=A.deepClone(n[d])}}checkAndFreeze(c){return this.frozen&&!Object.isFrozen(c)?A.deepFreeze(c):c}getContentsForOverrideIdentifer(c){let n=null,d=null;const l=f=>{f&&(d?this.mergeContents(d,f):d=A.deepClone(f))};for(const f of this.overrides)i.equals(f.identifiers,[c])?n=f.contents:f.identifiers.includes(c)&&l(f.contents);return l(n),d}toJSON(){return{contents:this.contents,overrides:this.overrides,keys:this.keys}}setValue(c,n){this.addKey(c),(0,O.addToValueTree)(this.contents,c,n,d=>{throw new Error(d)})}removeValue(c){this.removeKey(c)&&(0,O.removeFromValueTree)(this.contents,c)}addKey(c){let n=this.keys.length;for(let d=0;d{const k={};h(k),f.push(l),l=k,d=null},onObjectProperty:k=>{d=k},onObjectEnd:()=>{l=f.pop()},onArrayBegin:()=>{const k=[];h(k),f.push(l),l=k,d=null},onArrayEnd:()=>{l=f.pop()},onLiteralValue:h,onError:(k,F,j)=>{s.push({error:k,offset:F,length:j})}};if(c)try{S.visit(c,v),n=l[0]||{}}catch(k){console.error(`Error while parsing settings file ${this._name}: ${k}`),this._parseErrors=[k]}return n}doParseRaw(c,n){const d=g.Registry.as(b.Extensions.Configuration).getConfigurationProperties(),l=this.filter(c,d,!0,n);c=l.raw;const f=(0,O.toValuesTree)(c,v=>console.error(`Conflict in settings file ${this._name}: ${v}`)),s=Object.keys(c),h=this.toOverrides(c,v=>console.error(`Conflict in settings file ${this._name}: ${v}`));return{contents:f,keys:s,overrides:h,restricted:l.restricted,hasExcludedProperties:l.hasExcludedProperties}}filter(c,n,d,l){let f=!1;if(!l?.scopes&&!l?.skipRestricted)return{raw:c,restricted:[],hasExcludedProperties:f};const s={},h=[];for(const v in c)if(b.OVERRIDE_PROPERTY_REGEX.test(v)&&d){const k=this.filter(c[v],n,!1,l);s[v]=k.raw,f=f||k.hasExcludedProperties,h.push(...k.restricted)}else{const k=n[v],F=k?typeof k.scope<"u"?k.scope:3:void 0;k?.restricted&&h.push(v),(F===void 0||l.scopes===void 0||l.scopes.includes(F))&&!(l.skipRestricted&&k?.restricted)?s[v]=c[v]:f=!0}return{raw:s,restricted:h,hasExcludedProperties:f}}toOverrides(c,n){const d=[];for(const l of Object.keys(c))if(b.OVERRIDE_PROPERTY_REGEX.test(l)){const f={};for(const s in c[l])f[s]=c[l][s];d.push({identifiers:(0,b.overrideIdentifiersFromKey)(l),keys:Object.keys(f),contents:(0,O.toValuesTree)(f,n)})}return d}}e.ConfigurationModelParser=m;class t extends N.Disposable{constructor(c,n,d,l){super(),this.userSettingsResource=c,this.scopes=n,this.fileService=l,this._onDidChange=this._register(new D.Emitter),this.onDidChange=this._onDidChange.event,this.parser=new m(this.userSettingsResource.toString()),this.parseOptions={scopes:this.scopes},this._register(this.fileService.watch(d.dirname(this.userSettingsResource))),this._register(this.fileService.watch(this.userSettingsResource)),this._register(D.Event.any(D.Event.filter(this.fileService.onDidFilesChange,f=>f.contains(this.userSettingsResource)),D.Event.filter(this.fileService.onDidRunOperation,f=>(f.isOperation(0)||f.isOperation(3)||f.isOperation(1)||f.isOperation(4))&&d.isEqual(f.resource,c)))(()=>this._onDidChange.fire()))}async loadConfiguration(){try{const c=await this.fileService.readFile(this.userSettingsResource);return this.parser.parse(c.value.toString()||"{}",this.parseOptions),this.parser.configurationModel}catch{return new E}}reparse(){return this.parser.reparse(this.parseOptions),this.parser.configurationModel}getRestrictedSettings(){return this.parser.restrictedConfigurations}}e.UserSettings=t;class o{constructor(c,n,d,l,f,s,h,v,k,F,j,W,H){this.key=c,this.overrides=n,this.value=d,this.overrideIdentifiers=l,this.defaultConfiguration=f,this.policyConfiguration=s,this.applicationConfiguration=h,this.userConfiguration=v,this.localUserConfiguration=k,this.remoteUserConfiguration=F,this.workspaceConfiguration=j,this.folderConfigurationModel=W,this.memoryInspectValue=H}get defaultInspectValue(){return this._defaultInspectValue||(this._defaultInspectValue=this.defaultConfiguration.inspect(this.key,this.overrides.overrideIdentifier)),this._defaultInspectValue}get defaultValue(){return this.defaultInspectValue.merged}get default(){return this.defaultInspectValue.value!==void 0||this.defaultInspectValue.override!==void 0?{value:this.defaultInspectValue.value,override:this.defaultInspectValue.override}:void 0}get policyInspectValue(){return this._policyInspectValue===void 0&&(this._policyInspectValue=this.policyConfiguration?this.policyConfiguration.inspect(this.key):null),this._policyInspectValue}get policyValue(){return this.policyInspectValue?.merged}get policy(){return this.policyInspectValue?.value!==void 0?{value:this.policyInspectValue.value}:void 0}get applicationInspectValue(){return this._applicationInspectValue===void 0&&(this._applicationInspectValue=this.applicationConfiguration?this.applicationConfiguration.inspect(this.key):null),this._applicationInspectValue}get applicationValue(){return this.applicationInspectValue?.merged}get application(){return this.applicationInspectValue?.value!==void 0||this.applicationInspectValue?.override!==void 0?{value:this.applicationInspectValue.value,override:this.applicationInspectValue.override}:void 0}get userInspectValue(){return this._userInspectValue||(this._userInspectValue=this.userConfiguration.inspect(this.key,this.overrides.overrideIdentifier)),this._userInspectValue}get userValue(){return this.userInspectValue.merged}get user(){return this.userInspectValue.value!==void 0||this.userInspectValue.override!==void 0?{value:this.userInspectValue.value,override:this.userInspectValue.override}:void 0}get userLocalInspectValue(){return this._userLocalInspectValue||(this._userLocalInspectValue=this.localUserConfiguration.inspect(this.key,this.overrides.overrideIdentifier)),this._userLocalInspectValue}get userLocalValue(){return this.userLocalInspectValue.merged}get userLocal(){return this.userLocalInspectValue.value!==void 0||this.userLocalInspectValue.override!==void 0?{value:this.userLocalInspectValue.value,override:this.userLocalInspectValue.override}:void 0}get userRemoteInspectValue(){return this._userRemoteInspectValue||(this._userRemoteInspectValue=this.remoteUserConfiguration.inspect(this.key,this.overrides.overrideIdentifier)),this._userRemoteInspectValue}get userRemoteValue(){return this.userRemoteInspectValue.merged}get userRemote(){return this.userRemoteInspectValue.value!==void 0||this.userRemoteInspectValue.override!==void 0?{value:this.userRemoteInspectValue.value,override:this.userRemoteInspectValue.override}:void 0}get workspaceInspectValue(){return this._workspaceInspectValue===void 0&&(this._workspaceInspectValue=this.workspaceConfiguration?this.workspaceConfiguration.inspect(this.key,this.overrides.overrideIdentifier):null),this._workspaceInspectValue}get workspaceValue(){return this.workspaceInspectValue?.merged}get workspace(){return this.workspaceInspectValue?.value!==void 0||this.workspaceInspectValue?.override!==void 0?{value:this.workspaceInspectValue.value,override:this.workspaceInspectValue.override}:void 0}get workspaceFolderInspectValue(){return this._workspaceFolderInspectValue===void 0&&(this._workspaceFolderInspectValue=this.folderConfigurationModel?this.folderConfigurationModel.inspect(this.key,this.overrides.overrideIdentifier):null),this._workspaceFolderInspectValue}get workspaceFolderValue(){return this.workspaceFolderInspectValue?.merged}get workspaceFolder(){return this.workspaceFolderInspectValue?.value!==void 0||this.workspaceFolderInspectValue?.override!==void 0?{value:this.workspaceFolderInspectValue.value,override:this.workspaceFolderInspectValue.override}:void 0}get memoryValue(){return this.memoryInspectValue.merged}get memory(){return this.memoryInspectValue.value!==void 0||this.memoryInspectValue.override!==void 0?{value:this.memoryInspectValue.value,override:this.memoryInspectValue.override}:void 0}}class a{constructor(c,n,d,l,f=new E,s=new E,h=new y.ResourceMap,v=new E,k=new y.ResourceMap,F=!0){this._defaultConfiguration=c,this._policyConfiguration=n,this._applicationConfiguration=d,this._localUserConfiguration=l,this._remoteUserConfiguration=f,this._workspaceConfiguration=s,this._folderConfigurations=h,this._memoryConfiguration=v,this._memoryConfigurationByResource=k,this._freeze=F,this._workspaceConsolidatedConfiguration=null,this._foldersConsolidatedConfigurations=new y.ResourceMap,this._userConfiguration=null}getValue(c,n,d){return this.getConsolidatedConfigurationModel(c,n,d).getValue(c)}updateValue(c,n,d={}){let l;d.resource?(l=this._memoryConfigurationByResource.get(d.resource),l||(l=new E,this._memoryConfigurationByResource.set(d.resource,l))):l=this._memoryConfiguration,n===void 0?l.removeValue(c):l.setValue(c,n),d.resource||(this._workspaceConsolidatedConfiguration=null)}inspect(c,n,d){const l=this.getConsolidatedConfigurationModel(c,n,d),f=i.distinct(l.overrides.map(v=>v.identifiers).flat()).filter(v=>l.getOverrideValue(c,v)!==void 0),s=this.getFolderConfigurationModelForResource(n.resource,d),h=n.resource?this._memoryConfigurationByResource.get(n.resource)||this._memoryConfiguration:this._memoryConfiguration;return new o(c,n,l.getValue(c),f.length?f:void 0,this._defaultConfiguration,this._policyConfiguration.isEmpty()?void 0:this._policyConfiguration.freeze(),this.applicationConfiguration.isEmpty()?void 0:this.applicationConfiguration.freeze(),this.userConfiguration.freeze(),this.localUserConfiguration.freeze(),this.remoteUserConfiguration.freeze(),d?this._workspaceConfiguration.freeze():void 0,s?s.freeze():void 0,h.inspect(c,n.overrideIdentifier))}keys(c){const n=this.getFolderConfigurationModelForResource(void 0,c);return{default:this._defaultConfiguration.freeze().keys,user:this.userConfiguration.freeze().keys,workspace:this._workspaceConfiguration.freeze().keys,workspaceFolder:n?n.freeze().keys:[]}}updateDefaultConfiguration(c){this._defaultConfiguration=c,this._workspaceConsolidatedConfiguration=null,this._foldersConsolidatedConfigurations.clear()}updatePolicyConfiguration(c){this._policyConfiguration=c}updateApplicationConfiguration(c){this._applicationConfiguration=c,this._workspaceConsolidatedConfiguration=null,this._foldersConsolidatedConfigurations.clear()}updateLocalUserConfiguration(c){this._localUserConfiguration=c,this._userConfiguration=null,this._workspaceConsolidatedConfiguration=null,this._foldersConsolidatedConfigurations.clear()}updateRemoteUserConfiguration(c){this._remoteUserConfiguration=c,this._userConfiguration=null,this._workspaceConsolidatedConfiguration=null,this._foldersConsolidatedConfigurations.clear()}updateWorkspaceConfiguration(c){this._workspaceConfiguration=c,this._workspaceConsolidatedConfiguration=null,this._foldersConsolidatedConfigurations.clear()}updateFolderConfiguration(c,n){this._folderConfigurations.set(c,n),this._foldersConsolidatedConfigurations.delete(c)}deleteFolderConfiguration(c){this.folderConfigurations.delete(c),this._foldersConsolidatedConfigurations.delete(c)}compareAndUpdateDefaultConfiguration(c,n){const d=[];if(!n){const{added:l,updated:f,removed:s}=u(this._defaultConfiguration,c);n=[...l,...f,...s]}for(const l of n)for(const f of(0,b.overrideIdentifiersFromKey)(l)){const s=this._defaultConfiguration.getKeysForOverrideIdentifier(f),h=c.getKeysForOverrideIdentifier(f),v=[...h.filter(k=>s.indexOf(k)===-1),...s.filter(k=>h.indexOf(k)===-1),...s.filter(k=>!A.equals(this._defaultConfiguration.override(f).getValue(k),c.override(f).getValue(k)))];d.push([f,v])}return this.updateDefaultConfiguration(c),{keys:n,overrides:d}}compareAndUpdatePolicyConfiguration(c){const{added:n,updated:d,removed:l}=u(this._policyConfiguration,c),f=[...n,...d,...l];return f.length&&this.updatePolicyConfiguration(c),{keys:f,overrides:[]}}compareAndUpdateApplicationConfiguration(c){const{added:n,updated:d,removed:l,overrides:f}=u(this.applicationConfiguration,c),s=[...n,...d,...l];return s.length&&this.updateApplicationConfiguration(c),{keys:s,overrides:f}}compareAndUpdateLocalUserConfiguration(c){const{added:n,updated:d,removed:l,overrides:f}=u(this.localUserConfiguration,c),s=[...n,...d,...l];return s.length&&this.updateLocalUserConfiguration(c),{keys:s,overrides:f}}compareAndUpdateRemoteUserConfiguration(c){const{added:n,updated:d,removed:l,overrides:f}=u(this.remoteUserConfiguration,c),s=[...n,...d,...l];return s.length&&this.updateRemoteUserConfiguration(c),{keys:s,overrides:f}}compareAndUpdateWorkspaceConfiguration(c){const{added:n,updated:d,removed:l,overrides:f}=u(this.workspaceConfiguration,c),s=[...n,...d,...l];return s.length&&this.updateWorkspaceConfiguration(c),{keys:s,overrides:f}}compareAndUpdateFolderConfiguration(c,n){const d=this.folderConfigurations.get(c),{added:l,updated:f,removed:s,overrides:h}=u(d,n),v=[...l,...f,...s];return(v.length||!d)&&this.updateFolderConfiguration(c,n),{keys:v,overrides:h}}compareAndDeleteFolderConfiguration(c){const n=this.folderConfigurations.get(c);if(!n)throw new Error("Unknown folder");this.deleteFolderConfiguration(c);const{added:d,updated:l,removed:f,overrides:s}=u(n,void 0);return{keys:[...d,...l,...f],overrides:s}}get defaults(){return this._defaultConfiguration}get applicationConfiguration(){return this._applicationConfiguration}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}getConsolidatedConfigurationModel(c,n,d){let l=this.getConsolidatedConfigurationModelForResource(n,d);return n.overrideIdentifier&&(l=l.override(n.overrideIdentifier)),!this._policyConfiguration.isEmpty()&&this._policyConfiguration.getValue(c)!==void 0&&(l=l.merge(this._policyConfiguration)),l}getConsolidatedConfigurationModelForResource({resource:c},n){let d=this.getWorkspaceConsolidatedConfiguration();if(n&&c){const l=n.getFolder(c);l&&(d=this.getFolderConsolidatedConfiguration(l.uri)||d);const f=this._memoryConfigurationByResource.get(c);f&&(d=d.merge(f))}return d}getWorkspaceConsolidatedConfiguration(){return this._workspaceConsolidatedConfiguration||(this._workspaceConsolidatedConfiguration=this._defaultConfiguration.merge(this.applicationConfiguration,this.userConfiguration,this._workspaceConfiguration,this._memoryConfiguration),this._freeze&&(this._workspaceConfiguration=this._workspaceConfiguration.freeze())),this._workspaceConsolidatedConfiguration}getFolderConsolidatedConfiguration(c){let n=this._foldersConsolidatedConfigurations.get(c);if(!n){const d=this.getWorkspaceConsolidatedConfiguration(),l=this._folderConfigurations.get(c);l?(n=d.merge(l),this._freeze&&(n=n.freeze()),this._foldersConsolidatedConfigurations.set(c,n)):n=d}return n}getFolderConfigurationModelForResource(c,n){if(n&&c){const d=n.getFolder(c);if(d)return this._folderConfigurations.get(d.uri)}}toData(){return{defaults:{contents:this._defaultConfiguration.contents,overrides:this._defaultConfiguration.overrides,keys:this._defaultConfiguration.keys},policy:{contents:this._policyConfiguration.contents,overrides:this._policyConfiguration.overrides,keys:this._policyConfiguration.keys},application:{contents:this.applicationConfiguration.contents,overrides:this.applicationConfiguration.overrides,keys:this.applicationConfiguration.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((c,n)=>{const{contents:d,overrides:l,keys:f}=this._folderConfigurations.get(n);return c.push([n,{contents:d,overrides:l,keys:f}]),c},[])}}allKeys(){const c=new Set;return this._defaultConfiguration.freeze().keys.forEach(n=>c.add(n)),this.userConfiguration.freeze().keys.forEach(n=>c.add(n)),this._workspaceConfiguration.freeze().keys.forEach(n=>c.add(n)),this._folderConfigurations.forEach(n=>n.freeze().keys.forEach(d=>c.add(d))),[...c.values()]}allOverrideIdentifiers(){const c=new Set;return this._defaultConfiguration.freeze().getAllOverrideIdentifiers().forEach(n=>c.add(n)),this.userConfiguration.freeze().getAllOverrideIdentifiers().forEach(n=>c.add(n)),this._workspaceConfiguration.freeze().getAllOverrideIdentifiers().forEach(n=>c.add(n)),this._folderConfigurations.forEach(n=>n.freeze().getAllOverrideIdentifiers().forEach(d=>c.add(d))),[...c.values()]}getAllKeysForOverrideIdentifier(c){const n=new Set;return this._defaultConfiguration.getKeysForOverrideIdentifier(c).forEach(d=>n.add(d)),this.userConfiguration.getKeysForOverrideIdentifier(c).forEach(d=>n.add(d)),this._workspaceConfiguration.getKeysForOverrideIdentifier(c).forEach(d=>n.add(d)),this._folderConfigurations.forEach(d=>d.getKeysForOverrideIdentifier(c).forEach(l=>n.add(l))),[...n.values()]}static parse(c){const n=this.parseConfigurationModel(c.defaults),d=this.parseConfigurationModel(c.policy),l=this.parseConfigurationModel(c.application),f=this.parseConfigurationModel(c.user),s=this.parseConfigurationModel(c.workspace),h=c.folders.reduce((v,k)=>(v.set(T.URI.revive(k[0]),this.parseConfigurationModel(k[1])),v),new y.ResourceMap);return new a(n,d,l,f,new E,s,h,new E,new y.ResourceMap,!1)}static parseConfigurationModel(c){return new E(c.contents,c.keys,c.overrides).freeze()}}e.Configuration=a;function p(...r){if(r.length===0)return{keys:[],overrides:[]};if(r.length===1)return r[0];const c=new Set,n=new Map;for(const l of r)l.keys.forEach(f=>c.add(f)),l.overrides.forEach(([f,s])=>{const h=(0,y.getOrSet)(n,f,new Set);s.forEach(v=>h.add(v))});const d=[];return n.forEach((l,f)=>d.push([f,[...l.values()]])),{keys:[...c.values()],overrides:d}}e.mergeChanges=p;class w{constructor(c,n,d,l){this.change=c,this.previous=n,this.currentConfiguraiton=d,this.currentWorkspace=l,this._previousConfiguration=void 0;const f=new Set;c.keys.forEach(h=>f.add(h)),c.overrides.forEach(([,h])=>h.forEach(v=>f.add(v))),this.affectedKeys=[...f.values()];const s=new E;this.affectedKeys.forEach(h=>s.setValue(h,{})),this.affectedKeysTree=s.contents}get previousConfiguration(){return!this._previousConfiguration&&this.previous&&(this._previousConfiguration=a.parse(this.previous.data)),this._previousConfiguration}affectsConfiguration(c,n){if(this.doesAffectedKeysTreeContains(this.affectedKeysTree,c)){if(n){const d=this.previousConfiguration?this.previousConfiguration.getValue(c,n,this.previous?.workspace):void 0,l=this.currentConfiguraiton.getValue(c,n,this.currentWorkspace);return!A.equals(d,l)}return!0}return!1}doesAffectedKeysTreeContains(c,n){let d=(0,O.toValuesTree)({[n]:!0},()=>{}),l;for(;typeof d=="object"&&(l=Object.keys(d)[0]);){if(c=c[l],!c)return!1;d=d[l]}return!0}}e.ConfigurationChangeEvent=w;function u(r,c){const{added:n,removed:d,updated:l}=I(c?.rawConfiguration,r?.rawConfiguration),f=[],s=r?.getAllOverrideIdentifiers()||[],h=c?.getAllOverrideIdentifiers()||[];if(c){const v=h.filter(k=>!s.includes(k));for(const k of v)f.push([k,c.getKeysForOverrideIdentifier(k)])}if(r){const v=s.filter(k=>!h.includes(k));for(const k of v)f.push([k,r.getKeysForOverrideIdentifier(k)])}if(c&&r){for(const v of s)if(h.includes(v)){const k=I({contents:r.getOverrideValue(void 0,v)||{},keys:r.getKeysForOverrideIdentifier(v)},{contents:c.getOverrideValue(void 0,v)||{},keys:c.getKeysForOverrideIdentifier(v)});f.push([v,[...k.added,...k.removed,...k.updated]])}}return{added:n,removed:d,updated:l,overrides:f}}function I(r,c){const n=r?c?r.keys.filter(f=>c.keys.indexOf(f)===-1):[...r.keys]:[],d=c?r?c.keys.filter(f=>r.keys.indexOf(f)===-1):[...c.keys]:[],l=[];if(r&&c){for(const f of c.keys)if(r.keys.indexOf(f)!==-1){const s=(0,O.getConfigurationValue)(c.contents,f),h=(0,O.getConfigurationValue)(r.contents,f);A.equals(s,h)||l.push(f)}}return{added:n,removed:d,updated:l}}}),define(De[90],Ce([1,0,12,3]),function(ne,e,i,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RemoteAuthorityResolverError=e.RemoteAuthorityResolverErrorCode=e.IRemoteAuthorityResolverService=void 0,e.IRemoteAuthorityResolverService=(0,D.createDecorator)("remoteAuthorityResolverService");var S;(function(y){y.Unknown="Unknown",y.NotAvailable="NotAvailable",y.TemporarilyNotAvailable="TemporarilyNotAvailable",y.NoResolverFound="NoResolverFound"})(S=e.RemoteAuthorityResolverErrorCode||(e.RemoteAuthorityResolverErrorCode={}));class N extends i.ErrorNoTelemetry{static isNotAvailable(A){return A instanceof N&&A._code===S.NotAvailable}static isTemporarilyNotAvailable(A){return A instanceof N&&A._code===S.TemporarilyNotAvailable}static isNoResolverFound(A){return A instanceof N&&A._code===S.NoResolverFound}static isHandled(A){return A instanceof N&&A.isHandled}constructor(A,_=S.Unknown,T){super(A),this._message=A,this._code=_,this._detail=T,this.isHandled=_===S.NotAvailable&&T===!0,typeof Object.setPrototypeOf=="function"&&Object.setPrototypeOf(this,N.prototype)}}e.RemoteAuthorityResolverError=N}),define(De[61],Ce([1,0,13]),function(ne,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.parseAuthorityWithOptionalPort=e.parseAuthorityWithPort=e.getRemoteServerRootPath=e.getRemoteName=e.getRemoteAuthority=void 0;function D(T){return T.scheme===i.Schemas.vscodeRemote?T.authority:void 0}e.getRemoteAuthority=D;function S(T){if(!T)return;const O=T.indexOf("+");return O<0?T:T.substr(0,O)}e.getRemoteName=S;function N(T){return`/${T.quality??"oss"}-${T.commit??"dev"}`}e.getRemoteServerRootPath=N;function y(T){const{host:O,port:b}=_(T);if(typeof b>"u")throw new Error("Remote authority doesn't contain a port!");return{host:O,port:b}}e.parseAuthorityWithPort=y;function A(T,O){let{host:b,port:g}=_(T);return typeof g>"u"&&(g=O),{host:b,port:g}}e.parseAuthorityWithOptionalPort=A;function _(T){const O=T.match(/^(\[[0-9a-z:]+\]):(\d+)$/);if(O)return{host:O[1],port:parseInt(O[2],10)};const b=T.match(/^(\[[0-9a-z:]+\])$/);if(b)return{host:b[1],port:void 0};const g=T.match(/(.*):(\d+)$/);return g?{host:g[1],port:parseInt(g[2],10)}:{host:T,port:void 0}}}),define(De[25],Ce([1,0,10,3,61]),function(ne,e,i,D,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IBuiltinExtensionsScannerService=e.isResolverExtension=e.isAuthenticationProviderExtension=e.isLanguagePackExtension=e.isApplicationScopedExtension=e.ExtensionIdentifier=e.TargetPlatform=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 N(m){if(typeof m=="object"&&m!==null&&m.supported!==!0)return m.description}e.getWorkspaceSupportTypeMessage=N;function y(m){return m&&typeof m=="object"&&typeof m.id=="string"&&(!m.uuid||typeof m.uuid=="string")}e.isIExtensionIdentifier=y,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(m){m[m.System=0]="System",m[m.User=1]="User"})(A=e.ExtensionType||(e.ExtensionType={}));var _;(function(m){m.WIN32_X64="win32-x64",m.WIN32_IA32="win32-ia32",m.WIN32_ARM64="win32-arm64",m.LINUX_X64="linux-x64",m.LINUX_ARM64="linux-arm64",m.LINUX_ARMHF="linux-armhf",m.ALPINE_X64="alpine-x64",m.ALPINE_ARM64="alpine-arm64",m.DARWIN_X64="darwin-x64",m.DARWIN_ARM64="darwin-arm64",m.WEB="web",m.UNIVERSAL="universal",m.UNKNOWN="unknown",m.UNDEFINED="undefined"})(_=e.TargetPlatform||(e.TargetPlatform={}));class T{constructor(t){this.value=t,this._lower=t.toLowerCase()}static equals(t,o){if(typeof t>"u"||t===null)return typeof o>"u"||o===null;if(typeof o>"u"||o===null)return!1;if(typeof t=="string"||typeof o=="string"){const a=typeof t=="string"?t:t.value,p=typeof o=="string"?o:o.value;return i.equalsIgnoreCase(a,p)}return t._lower===o._lower}static toKey(t){return typeof t=="string"?t.toLowerCase():t._lower}}e.ExtensionIdentifier=T;function O(m){return b(m)}e.isApplicationScopedExtension=O;function b(m){return m.contributes&&m.contributes.localizations?m.contributes.localizations.length>0:!1}e.isLanguagePackExtension=b;function g(m){return m.contributes&&m.contributes.authentication?m.contributes.authentication.length>0:!1}e.isAuthenticationProviderExtension=g;function E(m,t){if(t){const o=`onResolveRemoteAuthority:${(0,S.getRemoteName)(t)}`;return m.activationEvents?.indexOf(o)!==-1}return!1}e.isResolverExtension=E,e.IBuiltinExtensionsScannerService=(0,D.createDecorator)("IBuiltinExtensionsScannerService")}),define(De[155],Ce([1,0,10,85,25,21,2,12,48]),function(ne,e,i,D,S,N,y,A,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.computeTargetPlatform=e.isAlpineLinux=e.getExtensionDependencies=e.BetterMergeId=e.getGalleryExtensionTelemetryData=e.getLocalExtensionTelemetryData=e.groupByExtension=e.getGalleryExtensionId=e.adoptToGalleryExtensionId=e.getExtensionId=e.getIdAndVersion=e.ExtensionKey=e.areSameExtensions=void 0;function T(c,n){return c.uuid&&n.uuid?c.uuid===n.uuid:c.id===n.id?!0:(0,i.compareIgnoreCase)(c.id,n.id)===0}e.areSameExtensions=T;const O=/^([^.]+\..+)-(\d+\.\d+\.\d+)(-(.+))?$/;class b{static create(n){const d=n.manifest?n.manifest.version:n.version,l=n.manifest?n.targetPlatform:n.properties.targetPlatform;return new b(n.identifier,d,l)}static parse(n){const d=O.exec(n);return d&&d[1]&&d[2]?new b({id:d[1]},d[2],d[4]||void 0):null}constructor(n,d,l="undefined"){this.version=d,this.targetPlatform=l,this.id=n.id}toString(){return`${this.id}-${this.version}${this.targetPlatform!=="undefined"?`-${this.targetPlatform}`:""}`}equals(n){return n instanceof b?T(this,n)&&this.version===n.version&&this.targetPlatform===n.targetPlatform:!1}}e.ExtensionKey=b;const g=/^([^.]+\..+)@((prerelease)|(\d+\.\d+\.\d+(-.*)?))$/;function E(c){const n=g.exec(c);return n&&n[1]?[t(n[1]),n[2]]:[t(c),void 0]}e.getIdAndVersion=E;function m(c,n){return`${c}.${n}`}e.getExtensionId=m;function t(c){return c.toLocaleLowerCase()}e.adoptToGalleryExtensionId=t;function o(c,n){return t(m(c,n))}e.getGalleryExtensionId=o;function a(c,n){const d=[],l=f=>{for(const s of d)if(s.some(h=>T(n(h),n(f))))return s;return null};for(const f of c){const s=l(f);s?s.push(f):d.push([f])}return d}e.groupByExtension=a;function p(c){return{id:c.identifier.id,name:c.manifest.name,galleryId:null,publisherId:c.publisherId,publisherName:c.manifest.publisher,publisherDisplayName:c.publisherDisplayName,dependencies:c.manifest.extensionDependencies&&c.manifest.extensionDependencies.length>0}}e.getLocalExtensionTelemetryData=p;function w(c){return{id:c.identifier.id,name:c.name,galleryId:c.identifier.uuid,publisherId:c.publisherId,publisherName:c.publisher,publisherDisplayName:c.publisherDisplayName,isPreReleaseVersion:c.properties.isPreReleaseVersion,dependencies:!!(c.properties.dependencies&&c.properties.dependencies.length>0),isSigned:c.isSigned,...c.telemetryData}}e.getGalleryExtensionTelemetryData=w,e.BetterMergeId=new S.ExtensionIdentifier("pprice.better-merge");function u(c,n){const d=[],l=n.manifest.extensionDependencies?.slice(0)??[];for(;l.length;){const f=l.shift();if(f&&d.every(s=>!T(s.identifier,{id:f}))){const s=c.filter(h=>T(h.identifier,{id:f}));s.length===1&&(d.push(s[0]),l.push(...s[0].manifest.extensionDependencies?.slice(0)??[]))}}return d}e.getExtensionDependencies=u;async function I(c,n){if(!N.isLinux)return!1;let d;try{d=(await c.readFile(y.URI.file("/etc/os-release"))).value.toString()}catch{try{d=(await c.readFile(y.URI.file("/usr/lib/os-release"))).value.toString()}catch(f){n.debug("Error while getting the os-release file.",(0,A.getErrorMessage)(f))}}return!!d&&(d.match(/^ID=([^\u001b\r\n]*)/m)||[])[1]==="alpine"}e.isAlpineLinux=I;async function r(c,n){const d=await I(c,n),l=(0,D.getTargetPlatform)(d?"alpine":N.platform,_.arch);return n.debug("ComputeTargetPlatform:",l),l}e.computeTargetPlatform=r}),define(De[156],Ce([1,0,21,48,2,38]),function(ne,e,i,D,S,N){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.verifyMicrosoftInternalDomain=e.resolveCommonProperties=void 0;function y(T){if(i.platform===2&&/^penguin(\.|$)/i.test(T))return"chromebook"}async function A(T,O,b,g,E,m,t,o,a,p){const w=Object.create(null);w["common.machineId"]=t,w.sessionID=(0,N.generateUuid)()+Date.now(),w.commitHash=E,w.version=m,w["common.platformVersion"]=(O||"").replace(/^(\d+)(\.\d+)?(\.\d+)?(.*)/,"$1$2$3"),w["common.platform"]=(0,i.PlatformToString)(i.platform),w["common.nodePlatform"]=D.platform,w["common.nodeArch"]=g,w["common.product"]=p||"desktop",o&&(w["common.msftInternal"]=o);let u=0;const I=Date.now();Object.defineProperties(w,{timestamp:{get:()=>new Date,enumerable:!0},"common.timesincesessionstart":{get:()=>Date.now()-I,enumerable:!0},"common.sequence":{get:()=>u++,enumerable:!0}}),i.isLinuxSnap&&(w["common.snap"]="true");const r=y(b);r&&(w["common.platformDetail"]=r);try{const c=await T.readFile(S.URI.file(a));w["common.source"]=c.value.toString().slice(0,30)}catch{}return w}e.resolveCommonProperties=A;function _(T){const O=D.env.USERDNSDOMAIN;if(!O)return!1;const b=O.toLowerCase();return T.some(g=>b===g)}e.verifyMicrosoftInternalDomain=_}),define(De[157],Ce([1,0,3]),function(ne,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TelemetryConfiguration=e.TelemetryLevel=e.TELEMETRY_OLD_SETTING_ID=e.TELEMETRY_SETTING_ID=e.TELEMETRY_SECTION_ID=e.machineIdKey=e.lastSessionDateStorageKey=e.firstSessionDateStorageKey=e.currentSessionDateStorageKey=e.ICustomEndpointTelemetryService=e.ITelemetryService=void 0,e.ITelemetryService=(0,i.createDecorator)("telemetryService"),e.ICustomEndpointTelemetryService=(0,i.createDecorator)("customEndpointTelemetryService"),e.currentSessionDateStorageKey="telemetry.currentSessionDate",e.firstSessionDateStorageKey="telemetry.firstSessionDate",e.lastSessionDateStorageKey="telemetry.lastSessionDate",e.machineIdKey="telemetry.machineId",e.TELEMETRY_SECTION_ID="telemetry",e.TELEMETRY_SETTING_ID="telemetry.telemetryLevel",e.TELEMETRY_OLD_SETTING_ID="telemetry.enableTelemetry";var D;(function(N){N[N.NONE=0]="NONE",N[N.CRASH=1]="CRASH",N[N.ERROR=2]="ERROR",N[N.USAGE=3]="USAGE"})(D=e.TelemetryLevel||(e.TelemetryLevel={}));var S;(function(N){N.OFF="off",N.CRASH="crash",N.ERROR="error",N.ON="all"})(S=e.TelemetryConfiguration||(e.TelemetryConfiguration={}))}),define(De[158],Ce([1,0,23,115,9,40,156,157]),function(ne,e,i,D,S,N,y,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.cleanData=e.getPiiPathsFromEnvironment=e.isInternalTelemetry=e.cleanRemoteAuthority=e.validateTelemetryData=e.getTelemetryLevel=e.supportsTelemetry=e.configurationTelemetry=e.NullAppender=e.NullEndpointTelemetryService=e.NullTelemetryService=e.NullTelemetryServiceShape=void 0;class _{constructor(){this.sendErrorTelemetry=!1,this.telemetryLevel=(0,D.staticObservableValue)(0)}publicLog(d,l){return Promise.resolve(void 0)}publicLog2(d,l){return this.publicLog(d,l)}publicLogError(d,l){return Promise.resolve(void 0)}publicLogError2(d,l){return this.publicLogError(d,l)}setExperimentProperty(){}getTelemetryInfo(){return Promise.resolve({instanceId:"someValue.instanceId",sessionId:"someValue.sessionId",machineId:"someValue.machineId",firstSessionDate:"someValue.firstSessionDate"})}}e.NullTelemetryServiceShape=_,e.NullTelemetryService=new _;class T{async publicLog(d,l,f){}async publicLogError(d,l,f){}}e.NullEndpointTelemetryService=T,e.NullAppender={log:()=>null,flush:()=>Promise.resolve(null)};function O(n,d){return d.onDidChangeConfiguration(l=>{l.source!==7&&n.publicLog2("updateConfiguration",{configurationSource:(0,N.ConfigurationTargetToString)(l.source),configurationKeys:a(l.sourceConfig)})})}e.configurationTelemetry=O;function b(n,d){return!(d.disableTelemetry||!n.enableTelemetry||d.extensionTestsLocationURI)}e.supportsTelemetry=b;function g(n){const d=n.getValue(A.TELEMETRY_SETTING_ID),l=n.getValue("telemetry.enableCrashReporter");if(n.getValue(A.TELEMETRY_OLD_SETTING_ID)===!1||l===!1)return 0;switch(d??"all"){case"all":return 3;case"error":return 2;case"crash":return 1;case"off":return 0}}e.getTelemetryLevel=g;function E(n){const d={},l={},f={};o(n,f);for(let s in f){s=s.length>150?s.substr(s.length-149):s;const h=f[s];typeof h=="number"?l[s]=h:typeof h=="boolean"?l[s]=h?1:0:typeof h=="string"?(h.length>8192&&console.warn(`Telemetry property: ${s} has been trimmed to 8192, the original length is ${h.length}`),d[s]=h.substring(0,8191)):typeof h<"u"&&h!==null&&(d[s]=h)}return{properties:d,measurements:l}}e.validateTelemetryData=E;const m=["ssh-remote","dev-container","attached-container","wsl","tunneling","codespaces"];function t(n){if(!n)return"none";for(const d of m)if(n.startsWith(`${d}+`))return d;return"other"}e.cleanRemoteAuthority=t;function o(n,d,l=0,f){if(!!n)for(const s of Object.getOwnPropertyNames(n)){const h=n[s],v=f?f+s:s;Array.isArray(h)?d[v]=(0,i.safeStringify)(h):h instanceof Date?d[v]=h.toISOString():(0,S.isObject)(h)?l<2?o(h,d,l+1,v+"."):d[v]=(0,i.safeStringify)(h):d[v]=h}}function a(n){if(!n)return[];const d=[];return p(d,"",n),d}function p(n,d,l){l&&typeof l=="object"&&!Array.isArray(l)?Object.keys(l).forEach(f=>p(n,d?`${d}.${f}`:f,l[f])):n.push(d)}function w(n,d){const l=n.msftInternalDomains||[],f=d.getValue("telemetry.internalTesting");return(0,y.verifyMicrosoftInternalDomain)(l)||f}e.isInternalTelemetry=w;function u(n){return[n.appRoot,n.extensionsPath,n.userHome.fsPath,n.tmpDir.fsPath,n.userDataPath]}e.getPiiPathsFromEnvironment=u;function I(n,d){if(!n||!n.includes("/")&&!n.includes("\\"))return n;let l=n;const f=[];for(const k of d)for(;;){const F=k.exec(n);if(!F)break;f.push([F.index,k.lastIndex])}const s=/^[\\\/]?(node_modules|node_modules\.asar)[\\\/]/,h=/(file:\/\/)?([a-zA-Z]:(\\\\|\\|\/)|(\\\\|\\|\/))?([\w-\._]+(\\\\|\\|\/))+[\w-\._]*/g;let v=0;for(l="";;){const k=h.exec(n);if(!k)break;const F=f.some(([j,W])=>k.index",v=h.lastIndex)}return v`;return n}function c(n,d){return(0,i.cloneAndChange)(n,l=>{if(typeof l=="string"){let f=l;f=I(f,d);for(const s of d)f=f.replace(s,"");return f=r(f),f}})}e.cleanData=c}),define(De[159],Ce([1,0]),function(ne,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TerminalDataBufferer=void 0;class i{constructor(S){this._callback=S,this._terminalBufferMap=new Map}dispose(){for(const S of this._terminalBufferMap.values())S.dispose()}startBuffering(S,N,y=5){const A=N(_=>{const T=typeof _=="string"?_:_.data;let O=this._terminalBufferMap.get(S);if(O){O.data.push(T);return}const b=setTimeout(()=>this.flushBuffer(S),y);O={data:[T],timeoutId:b,dispose:()=>{clearTimeout(b),this.flushBuffer(S),A.dispose()}},this._terminalBufferMap.set(S,O)});return A}stopBuffering(S){this._terminalBufferMap.get(S)?.dispose()}flushBuffer(S){const N=this._terminalBufferMap.get(S);N&&(this._terminalBufferMap.delete(S),this._callback(S,N.data.join("")))}}e.TerminalDataBufferer=i}),define(De[160],Ce([1,0]),function(ne,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isDark=e.isHighContrast=e.ColorScheme=void 0;var i;(function(N){N.DARK="dark",N.LIGHT="light",N.HIGH_CONTRAST_DARK="hcDark",N.HIGH_CONTRAST_LIGHT="hcLight"})(i=e.ColorScheme||(e.ColorScheme={}));function D(N){return N===i.HIGH_CONTRAST_DARK||N===i.HIGH_CONTRAST_LIGHT}e.isHighContrast=D;function S(N){return N===i.DARK||N===i.HIGH_CONTRAST_DARK}e.isDark=S}),define(De[62],Ce([1,0,118,4,7,3,30,160]),function(ne,e,i,D,S,N,y,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,N.createDecorator)("themeService");var _;(function(o){function a(p){return p&&typeof p=="object"&&typeof p.id=="string"}o.isThemeColor=a})(_=e.ThemeColor||(e.ThemeColor={}));function T(o){return{id:o}}e.themeColorFromId=T;var O;(function(o){function a(d){return d&&typeof d=="object"&&typeof d.id=="string"&&(typeof d.color>"u"||_.isThemeColor(d.color))}o.isThemeIcon=a;const p=new RegExp(`^\\$\\((${i.CSSIcon.iconNameExpression}(?:${i.CSSIcon.iconModifierExpression})?)\\)$`);function w(d){const l=p.exec(d);if(!l)return;const[,f]=l;return{id:f}}o.fromString=w;function u(d){return{id:d}}o.fromId=u;function I(d,l){let f=d.id;const s=f.lastIndexOf("~");return s!==-1&&(f=f.substring(0,s)),l&&(f=`${f}~${l}`),{id:f}}o.modify=I;function r(d){const l=d.id.lastIndexOf("~");if(l!==-1)return d.id.substring(l+1)}o.getModifier=r;function c(d,l){return d.id===l.id&&d.color?.id===l.color?.id}o.isEqual=c;function n(d,l){return{id:d.id,color:l?T(l):void 0}}o.asThemeIcon=n,o.asClassNameArray=i.CSSIcon.asClassNameArray,o.asClassName=i.CSSIcon.asClassName,o.asCSSSelector=i.CSSIcon.asCSSSelector})(O=e.ThemeIcon||(e.ThemeIcon={})),e.FileThemeIcon=i.Codicon.file,e.FolderThemeIcon=i.Codicon.folder;function b(o){switch(o){case A.ColorScheme.DARK:return"vs-dark";case A.ColorScheme.HIGH_CONTRAST_DARK:return"hc-black";case A.ColorScheme.HIGH_CONTRAST_LIGHT:return"hc-light";default:return"vs"}}e.getThemeTypeSelector=b,e.Extensions={ThemingContribution:"base.contributions.theming"};class g{constructor(){this.themingParticipants=[],this.themingParticipants=[],this.onThemingParticipantAddedEmitter=new D.Emitter}onColorThemeChange(a){return this.themingParticipants.push(a),this.onThemingParticipantAddedEmitter.fire(a),(0,S.toDisposable)(()=>{const p=this.themingParticipants.indexOf(a);this.themingParticipants.splice(p,1)})}get onThemingParticipantAdded(){return this.onThemingParticipantAddedEmitter.event}getThemingParticipants(){return this.themingParticipants}}const E=new g;y.Registry.add(e.Extensions.ThemingContribution,E);function m(o){return E.onColorThemeChange(o)}e.registerThemingParticipant=m;class t extends S.Disposable{constructor(a){super(),this.themeService=a,this.theme=a.getColorTheme(),this._register(this.themeService.onDidColorThemeChange(p=>this.onThemeChange(p)))}onThemeChange(a){this.theme=a,this.updateStyles()}updateStyles(){}getColor(a,p){let w=this.theme.getColor(a);return w&&p&&(w=p(w,this.theme)),w?w.toString():null}}e.Themable=t}),define(De[161],Ce([1,0,4,40,3,11]),function(ne,e,i,D,S,N){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractTunnelService=e.DisposableTunnel=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,S.createDecorator)("tunnelService"),e.ISharedTunnelsService=(0,S.createDecorator)("sharedTunnelsService");var y;(function(t){t.Http="http",t.Https="https"})(y=e.TunnelProtocol||(e.TunnelProtocol={}));var A;(function(t){t.ConstantPrivate="constantPrivate",t.Private="private",t.Public="public"})(A=e.TunnelPrivacyId||(e.TunnelPrivacyId={}));var _;(function(t){t[t.Notify=1]="Notify",t[t.OpenBrowser=2]="OpenBrowser",t[t.OpenPreview=3]="OpenPreview",t[t.Silent=4]="Silent",t[t.Ignore=5]="Ignore",t[t.OpenBrowserOnce=6]="OpenBrowserOnce"})(_=e.ProvidedOnAutoForward||(e.ProvidedOnAutoForward={}));function T(t){if(t.scheme!=="http"&&t.scheme!=="https")return;const o=/^(localhost|127\.0\.0\.1|0\.0\.0\.0):(\d+)$/.exec(t.authority);if(!!o)return{address:o[1],port:+o[2]}}e.extractLocalHostUriMetaDataForPortMapping=T,e.LOCALHOST_ADDRESSES=["localhost","127.0.0.1","0:0:0:0:0:0:0:1","::1"];function O(t){return e.LOCALHOST_ADDRESSES.indexOf(t)>=0}e.isLocalhost=O,e.ALL_INTERFACES_ADDRESSES=["0.0.0.0","0:0:0:0:0:0:0:0","::"];function b(t){return e.ALL_INTERFACES_ADDRESSES.indexOf(t)>=0}e.isAllInterfaces=b;function g(t,o,a,p){if(a===1)return!1;if(a===2&&b(o)){const w=/(\d+)\.(\d+)\.(\d+)/g.exec(p);if(w?.length===4&&parseInt(w[1])>=18)return!1}return t<1024}e.isPortPrivileged=g;class E{constructor(o,a,p){this.remoteAddress=o,this.localAddress=a,this._dispose=p,this._onDispose=new i.Emitter,this.onDidDispose=this._onDispose.event}dispose(){return this._onDispose.fire(),this._dispose()}}e.DisposableTunnel=E;let m=class{constructor(o,a){this.logService=o,this.configurationService=a,this._onTunnelOpened=new i.Emitter,this.onTunnelOpened=this._onTunnelOpened.event,this._onTunnelClosed=new i.Emitter,this.onTunnelClosed=this._onTunnelClosed.event,this._onAddedTunnelProvider=new i.Emitter,this.onAddedTunnelProvider=this._onAddedTunnelProvider.event,this._tunnels=new Map,this._canElevate=!1,this._privacyOptions=[],this._factoryInProgress=new Set}get hasTunnelProvider(){return!!this._tunnelProvider}get defaultTunnelHost(){const o=this.configurationService.getValue("remote.localPortHost");return!o||o==="localhost"?"127.0.0.1":"0.0.0.0"}setTunnelProvider(o){return this._tunnelProvider=o,o?(this._onAddedTunnelProvider.fire(),{dispose:()=>{this._tunnelProvider=void 0,this._canElevate=!1,this._privacyOptions=[]}}):(this._canElevate=!1,this._privacyOptions=[],this._onAddedTunnelProvider.fire(),{dispose:()=>{}})}setTunnelFeatures(o){this._canElevate=o.elevation,this._privacyOptions=o.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 o=[],a=Array.from(this._tunnels.values());for(const p of a){const w=Array.from(p.values());for(const u of w){const I=await u.value;I&&o.push(I)}}return o}async dispose(){for(const o of this._tunnels.values()){for(const{value:a}of o.values())await a.then(p=>p?.dispose());o.clear()}this._tunnels.clear()}setEnvironmentTunnel(o,a,p,w,u){this.addTunnelToMap(o,a,Promise.resolve({tunnelRemoteHost:o,tunnelRemotePort:a,localAddress:p,privacy:w,protocol:u,dispose:()=>Promise.resolve()}))}async getExistingTunnel(o,a){(b(o)||O(o))&&(o=e.LOCALHOST_ADDRESSES[0]);const p=this.getTunnelFromMap(o,a);if(p)return++p.refcount,p.value}openTunnel(o,a,p,w,u=!1,I,r){if(this.logService.trace(`ForwardedPorts: (TunnelService) openTunnel request for ${a}:${p} on local port ${w}.`),!o)return;if(a||(a="localhost"),this._tunnelProvider&&this._factoryInProgress.has(p)){this.logService.debug("ForwardedPorts: (TunnelService) Another call to create a tunnel with the same address has occurred before the last one completed. This call will be ignored.");return}const c=this.retainOrCreateTunnel(o,a,p,w,u,I,r);return c?c.then(n=>{if(!n){this.logService.trace("ForwardedPorts: (TunnelService) New tunnel is undefined."),this.removeEmptyTunnelFromMap(a,p);return}this.logService.trace("ForwardedPorts: (TunnelService) New tunnel established.");const d=this.makeTunnel(n);return(n.tunnelRemoteHost!==a||n.tunnelRemotePort!==p)&&this.logService.warn("ForwardedPorts: (TunnelService) Created tunnel does not match requirements of requested tunnel. Host or port mismatch."),this._onTunnelOpened.fire(d),d}):(this.logService.trace("ForwardedPorts: (TunnelService) Tunnel was not created."),c)}makeTunnel(o){return{tunnelRemotePort:o.tunnelRemotePort,tunnelRemoteHost:o.tunnelRemoteHost,tunnelLocalPort:o.tunnelLocalPort,localAddress:o.localAddress,privacy:o.privacy,protocol:o.protocol,dispose:async()=>{this.logService.trace(`ForwardedPorts: (TunnelService) dispose request for ${o.tunnelRemoteHost}:${o.tunnelRemotePort} `);const a=this._tunnels.get(o.tunnelRemoteHost);if(a){const p=a.get(o.tunnelRemotePort);p&&(p.refcount--,await this.tryDisposeTunnel(o.tunnelRemoteHost,o.tunnelRemotePort,p))}}}}async tryDisposeTunnel(o,a,p){if(p.refcount<=0){this.logService.trace(`ForwardedPorts: (TunnelService) Tunnel is being disposed ${o}:${a}.`);const w=p.value.then(async u=>{u&&(await u.dispose(!0),this._onTunnelClosed.fire({host:u.tunnelRemoteHost,port:u.tunnelRemotePort}))});return this._tunnels.has(o)&&this._tunnels.get(o).delete(a),w}}async closeTunnel(o,a){this.logService.trace(`ForwardedPorts: (TunnelService) close request for ${o}:${a} `);const p=this._tunnels.get(o);if(p&&p.has(a)){const w=p.get(a);w.refcount=0,await this.tryDisposeTunnel(o,a,w)}}addTunnelToMap(o,a,p){this._tunnels.has(o)||this._tunnels.set(o,new Map),this._tunnels.get(o).set(a,{refcount:1,value:p})}async removeEmptyTunnelFromMap(o,a){const p=this._tunnels.get(o);p&&(await p.get(a)||p.delete(a),p.size===0&&this._tunnels.delete(o))}getTunnelFromMap(o,a){const p=[o];O(o)?(p.push(...e.LOCALHOST_ADDRESSES),p.push(...e.ALL_INTERFACES_ADDRESSES)):b(o)&&p.push(...e.ALL_INTERFACES_ADDRESSES);const w=p.map(u=>this._tunnels.get(u));for(const u of w){const I=u?.get(a);if(I)return I}}canTunnel(o){return!!T(o)}createWithProvider(o,a,p,w,u,I,r){this.logService.trace(`ForwardedPorts: (TunnelService) Creating tunnel with provider ${a}:${p} on local port ${w}.`);const c=p;this._factoryInProgress.add(c);const n=w===void 0?p:w,d={elevationRequired:u?this.isPortPrivileged(n):!1},l={remoteAddress:{host:a,port:p},localAddressPort:w,privacy:I,public:I?I!==A.Private:void 0,protocol:r},f=o.forwardPort(l,d);return f?(this.addTunnelToMap(a,p,f),f.finally(()=>{this.logService.trace("ForwardedPorts: (TunnelService) Tunnel created by provider."),this._factoryInProgress.delete(c)})):this._factoryInProgress.delete(c),f}};m=He([We(0,N.ILogService),We(1,D.IConfigurationService)],m),e.AbstractTunnelService=m}),define(De[162],Ce([1,0,3]),function(ne,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditSessionIdentityMatch=e.IEditSessionIdentityService=void 0,e.IEditSessionIdentityService=(0,i.createDecorator)("editSessionIdentityService");var D;(function(S){S[S.Complete=100]="Complete",S[S.Partial=50]="Partial",S[S.None=0]="None"})(D=e.EditSessionIdentityMatch||(e.EditSessionIdentityMatch={}))}),define(De[163],Ce([1,0,13]),function(ne,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isVirtualWorkspace=e.getVirtualWorkspaceAuthority=e.getVirtualWorkspaceScheme=e.getVirtualWorkspaceLocation=e.isVirtualResource=void 0;function D(_){return _.scheme!==i.Schemas.file&&_.scheme!==i.Schemas.vscodeRemote}e.isVirtualResource=D;function S(_){if(_.folders.length)return _.folders.every(T=>D(T.uri))?_.folders[0].uri:void 0;if(_.configuration&&D(_.configuration))return _.configuration}e.getVirtualWorkspaceLocation=S;function N(_){return S(_)?.scheme}e.getVirtualWorkspaceScheme=N;function y(_){return S(_)?.authority}e.getVirtualWorkspaceAuthority=y;function A(_){return S(_)!==void 0}e.isVirtualWorkspace=A}),define(De[49],Ce([1,0,130,19,46,22,2,3,13]),function(ne,e,i,D,S,N,y,A,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.hasWorkspaceFileExtension=e.isSavedWorkspace=e.isTemporaryWorkspace=e.isUntitledWorkspace=e.UNTITLED_WORKSPACE_NAME=e.WORKSPACE_FILTER=e.WORKSPACE_SUFFIX=e.WORKSPACE_EXTENSION=e.toWorkspaceFolder=e.WorkspaceFolder=e.Workspace=e.isWorkspaceFolder=e.isWorkspace=e.WorkbenchState=e.reviveIdentifier=e.isWorkspaceIdentifier=e.toWorkspaceIdentifier=e.EXTENSION_DEVELOPMENT_EMPTY_WINDOW_WORKSPACE=e.isSingleFolderWorkspaceIdentifier=e.IWorkspaceContextService=void 0,e.IWorkspaceContextService=(0,A.createDecorator)("contextService");function T(c){const n=c;return typeof n?.id=="string"&&y.URI.isUri(n.uri)}e.isSingleFolderWorkspaceIdentifier=T,e.EXTENSION_DEVELOPMENT_EMPTY_WINDOW_WORKSPACE={id:"ext-dev"};function O(c,n){if(typeof c=="string"||typeof c>"u")return typeof c=="string"?{id:(0,D.basename)(c)}:n?e.EXTENSION_DEVELOPMENT_EMPTY_WINDOW_WORKSPACE:void 0;const d=c;if(d.configuration)return{id:d.id,configPath:d.configuration};if(d.folders.length===1)return{id:d.id,uri:d.folders[0].uri}}e.toWorkspaceIdentifier=O;function b(c){const n=c;return typeof n?.id=="string"&&y.URI.isUri(n.configPath)}e.isWorkspaceIdentifier=b;function g(c){const n=c;if(n?.uri)return{id:n.id,uri:y.URI.revive(n.uri)};const d=c;if(d?.configPath)return{id:d.id,configPath:y.URI.revive(d.configPath)};if(c?.id)return{id:c.id}}e.reviveIdentifier=g;var E;(function(c){c[c.EMPTY=1]="EMPTY",c[c.FOLDER=2]="FOLDER",c[c.WORKSPACE=3]="WORKSPACE"})(E=e.WorkbenchState||(e.WorkbenchState={}));function m(c){const n=c;return!!(n&&typeof n=="object"&&typeof n.id=="string"&&Array.isArray(n.folders))}e.isWorkspace=m;function t(c){const n=c;return!!(n&&typeof n=="object"&&y.URI.isUri(n.uri)&&typeof n.name=="string"&&typeof n.toResource=="function")}e.isWorkspaceFolder=t;class o{constructor(n,d,l,f,s){this._id=n,this._transient=l,this._configuration=f,this._ignorePathCasing=s,this._foldersMap=S.TernarySearchTree.forUris(this._ignorePathCasing,()=>!0),this.folders=d}update(n){this._id=n.id,this._configuration=n.configuration,this._transient=n.transient,this._ignorePathCasing=n._ignorePathCasing,this.folders=n.folders}get folders(){return this._folders}set folders(n){this._folders=n,this.updateFoldersMap()}get id(){return this._id}get transient(){return this._transient}get configuration(){return this._configuration}set configuration(n){this._configuration=n}getFolder(n){return n&&this._foldersMap.findSubstr(n)||null}updateFoldersMap(){this._foldersMap=S.TernarySearchTree.forUris(this._ignorePathCasing,()=>!0);for(const n of this.folders)this._foldersMap.set(n.uri,n)}toJSON(){return{id:this.id,folders:this.folders,transient:this.transient,configuration:this.configuration}}}e.Workspace=o;class a{constructor(n,d){this.raw=d,this.uri=n.uri,this.index=n.index,this.name=n.name}toResource(n){return(0,N.joinPath)(this.uri,n)}toJSON(){return{uri:this.uri,name:this.name,index:this.index}}}e.WorkspaceFolder=a;function p(c){return new a({uri:c,index:0,name:(0,N.basenameOrAuthority)(c)},{uri:c.toString()})}e.toWorkspaceFolder=p,e.WORKSPACE_EXTENSION="code-workspace",e.WORKSPACE_SUFFIX=`.${e.WORKSPACE_EXTENSION}`,e.WORKSPACE_FILTER=[{name:(0,i.localize)(0,null),extensions:[e.WORKSPACE_EXTENSION]}],e.UNTITLED_WORKSPACE_NAME="workspace.json";function w(c,n){return N.extUriBiasedIgnorePathCase.isEqualOrParent(c,n.untitledWorkspacesHome)}e.isUntitledWorkspace=w;function u(c){let n;return y.URI.isUri(c)?n=c:n=c.configuration,n?.scheme===_.Schemas.tmp}e.isTemporaryWorkspace=u;function I(c,n){return!w(c,n)&&!u(c)}e.isSavedWorkspace=I;function r(c){return(typeof c=="string"?(0,D.extname)(c):(0,N.extname)(c))===e.WORKSPACE_SUFFIX}e.hasWorkspaceFileExtension=r}),define(De[63],Ce([1,0]),function(ne,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Cache=void 0;class i{constructor(S){this.id=S,this._data=new Map,this._idPool=1}add(S){const N=this._idPool++;return this._data.set(N,S),this.logDebugInfo(),N}get(S,N){return this._data.has(S)?this._data.get(S)[N]:void 0}delete(S){this._data.delete(S),this.logDebugInfo()}logDebugInfo(){!i.enableDebugLogging||console.log(`${this.id} cache size - ${this._data.size}`)}}e.Cache=i,i.enableDebugLogging=!1}),define(De[36],Ce([1,0,13,22,3]),function(ne,e,i,D,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IExtHostFileSystemInfo=e.ExtHostFileSystemInfo=void 0;class N{constructor(){this._systemSchemes=new Set(Object.keys(i.Schemas)),this._providerInfo=new Map,this.extUri=new D.ExtUri(A=>{const _=this._providerInfo.get(A.scheme);return!(_===void 0||_&1024)})}$acceptProviderInfos(A,_){_===null?this._providerInfo.delete(A.scheme):this._providerInfo.set(A.scheme,_)}isFreeScheme(A){return!this._providerInfo.has(A)&&!this._systemSchemes.has(A)}getCapabilities(A){return this._providerInfo.get(A)}}e.ExtHostFileSystemInfo=N,e.IExtHostFileSystemInfo=(0,S.createDecorator)("IExtHostFileSystemInfo")}),define(De[26],Ce([1,0,3]),function(ne,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IExtHostInitDataService=void 0,e.IExtHostInitDataService=(0,i.createDecorator)("IExtHostInitDataService")}),define(De[164],Ce([1,0,15]),function(ne,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtensionGlobalMemento=e.ExtensionMemento=void 0;class D{constructor(y,A,_){this._deferredPromises=new Map,this._id=y,this._shared=A,this._storage=_,this._init=this._storage.initializeExtensionStorage(this._shared,this._id,Object.create(null)).then(T=>(this._value=T,this)),this._storageListener=this._storage.onDidChangeStorage(T=>{T.shared===this._shared&&T.key===this._id&&(this._value=T.value)}),this._scheduler=new i.RunOnceScheduler(()=>{const T=this._deferredPromises;this._deferredPromises=new Map,(async()=>{try{await this._storage.setValue(this._shared,this._id,this._value);for(const O of T.values())O.complete()}catch(O){for(const b of T.values())b.error(O)}})()},0)}keys(){return Object.entries(this._value??{}).filter(([,y])=>y!==void 0).map(([y])=>y)}get whenReady(){return this._init}get(y,A){let _=this._value[y];return typeof _>"u"&&(_=A),_}update(y,A){this._value[y]=A;const _=this._deferredPromises.get(y);if(_!==void 0)return _.p;const T=new i.DeferredPromise;return this._deferredPromises.set(y,T),this._scheduler.isScheduled()||this._scheduler.schedule(),T.p}dispose(){this._storageListener.dispose()}}e.ExtensionMemento=D;class S extends D{setKeysForSync(y){this._storage.registerExtensionStorageKeysToSync({id:this._id,version:this._extension.version},y)}constructor(y,A){super(y.identifier.value,!0,A),this._extension=y}}e.ExtensionGlobalMemento=S}),define(De[165],Ce([1,0,4,2]),function(ne,e,i,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtHostNotebookDocuments=void 0;class S{constructor(y){this._notebooksAndEditors=y,this._onDidSaveNotebookDocument=new i.Emitter,this.onDidSaveNotebookDocument=this._onDidSaveNotebookDocument.event,this._onDidChangeNotebookDocument=new i.Emitter,this.onDidChangeNotebookDocument=this._onDidChangeNotebookDocument.event}$acceptModelChanged(y,A,_,T){const b=this._notebooksAndEditors.getNotebookDocument(D.URI.revive(y)).acceptModelChanged(A.value,_,T);this._onDidChangeNotebookDocument.fire(b)}$acceptDirtyStateChanged(y,A){this._notebooksAndEditors.getNotebookDocument(D.URI.revive(y)).acceptDirty(A)}$acceptModelSaved(y){const A=this._notebooksAndEditors.getNotebookDocument(D.URI.revive(y));this._onDidSaveNotebookDocument.fire(A.apiNotebook)}}e.ExtHostNotebookDocuments=S}),define(De[14],Ce([1,0,3]),function(ne,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtHostRpcService=e.IExtHostRpcService=void 0,e.IExtHostRpcService=(0,i.createDecorator)("IExtHostRpcService");class D{constructor(N){this.getProxy=N.getProxy.bind(N),this.set=N.set.bind(N),this.dispose=N.dispose.bind(N),this.assertRegistered=N.assertRegistered.bind(N),this.drain=N.drain.bind(N)}}e.ExtHostRpcService=D});var Je=this&&this.__classPrivateFieldSet||function(ne,e,i,D,S){if(D==="m")throw new TypeError("Private method is not writable");if(D==="a"&&!S)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?ne!==e||!S:!e.has(ne))throw new TypeError("Cannot write private member to an object whose class did not declare it");return D==="a"?S.call(ne,i):S?S.value=i:e.set(ne,i),i},Re=this&&this.__classPrivateFieldGet||function(ne,e,i,D){if(i==="a"&&!D)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?ne!==e||!D:!e.has(ne))throw new TypeError("Cannot read private member from an object whose class did not declare it");return i==="m"?D:i==="a"?D.call(ne):D?D.value:e.get(ne)};define(De[166],Ce([1,0,25,4]),function(ne,e,i,D){"use strict";var S;Object.defineProperty(e,"__esModule",{value:!0}),e.ExtensionSecrets=void 0;class N{constructor(A,_){S.set(this,void 0),this._onDidChange=new D.Emitter,this.onDidChange=this._onDidChange.event,this._id=i.ExtensionIdentifier.toKey(A.identifier),Je(this,S,_,"f"),Re(this,S,"f").onDidChangePassword(T=>{T.extensionId===this._id&&this._onDidChange.fire({key:T.key})})}get(A){return Re(this,S,"f").get(this._id,A)}store(A,_){return Re(this,S,"f").store(this._id,A,_)}delete(A){return Re(this,S,"f").delete(this._id,A)}}e.ExtensionSecrets=N,S=new WeakMap}),define(De[64],Ce([1,0,3,161,4,14]),function(ne,e,i,D,S,N){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtHostTunnelService=e.IExtHostTunnelService=e.TunnelDtoConverter=void 0;var y;(function(_){function T(b){return{remoteAddress:b.remoteAddress,localAddress:b.localAddress,public:!!b.public,privacy:b.privacy??(b.public?D.TunnelPrivacyId.Public:D.TunnelPrivacyId.Private),protocol:b.protocol}}_.fromApiTunnel=T;function O(b){return{remoteAddress:{host:b.tunnelRemoteHost,port:b.tunnelRemotePort},localAddress:b.localAddress,public:b.privacy!==D.TunnelPrivacyId.ConstantPrivate&&b.privacy!==D.TunnelPrivacyId.ConstantPrivate,privacy:b.privacy,protocol:b.protocol}}_.fromServiceTunnel=O})(y=e.TunnelDtoConverter||(e.TunnelDtoConverter={})),e.IExtHostTunnelService=(0,i.createDecorator)("IExtHostTunnelService");let A=class{constructor(T){this.onDidChangeTunnels=new S.Emitter().event}async $applyCandidateFilter(T){return T}async openTunnel(T,O){}async getTunnels(){return[]}async setTunnelFactory(T){return{dispose:()=>{}}}registerPortsAttributesProvider(T,O){return{dispose:()=>{}}}async $providePortAttributes(T,O,b,g,E){return[]}async $forwardPort(T,O){}async $closeTunnel(T){}async $onDidTunnelsChange(){}async $registerCandidateFinder(){}};A=He([We(0,N.IExtHostRpcService)],A),e.ExtHostTunnelService=A}),define(De[50],Ce([1,0,3]),function(ne,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.URITransformerService=e.IURITransformerService=void 0,e.IURITransformerService=(0,i.createDecorator)("IURITransformerService");class D{constructor(N){N?(this.transformIncoming=N.transformIncoming.bind(N),this.transformOutgoing=N.transformOutgoing.bind(N),this.transformOutgoingURI=N.transformOutgoingURI.bind(N),this.transformOutgoingScheme=N.transformOutgoingScheme.bind(N)):(this.transformIncoming=y=>y,this.transformOutgoing=y=>y,this.transformOutgoingURI=y=>y,this.transformOutgoingScheme=y=>y)}}e.URITransformerService=D}),define(De[167],Ce([1,0,24]),function(ne,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.deserializeWebviewMessage=e.serializeWebviewMessage=void 0;class D{constructor(){this.buffers=[]}add(_){let T=this.buffers.indexOf(_);return T<0&&(T=this.buffers.length,this.buffers.push(_)),T}}function S(A,_){if(_.serializeBuffersForPostMessage){const T=new D,O=(E,m)=>{if(m instanceof ArrayBuffer){const t=T.add(m);return{$$vscode_array_buffer_reference$$:!0,index:t}}else if(ArrayBuffer.isView(m)){const t=N(m);if(t){const o=T.add(m.buffer);return{$$vscode_array_buffer_reference$$:!0,index:o,view:{type:t,byteLength:m.byteLength,byteOffset:m.byteOffset}}}}return m},b=JSON.stringify(A,O),g=T.buffers.map(E=>{const m=new Uint8Array(E);return i.VSBuffer.wrap(m)});return{message:b,buffers:g}}else return{message:JSON.stringify(A),buffers:[]}}e.serializeWebviewMessage=S;function N(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 y(A,_){const T=_.map(g=>{const E=new ArrayBuffer(g.byteLength);return new Uint8Array(E).set(g.buffer),E}),O=_.length?(g,E)=>{if(E&&typeof E=="object"&&E.$$vscode_array_buffer_reference$$){const m=E,{index:t}=m,o=T[t];if(m.view)switch(m.view.type){case 1:return new Int8Array(o,m.view.byteOffset,m.view.byteLength/Int8Array.BYTES_PER_ELEMENT);case 2:return new Uint8Array(o,m.view.byteOffset,m.view.byteLength/Uint8Array.BYTES_PER_ELEMENT);case 3:return new Uint8ClampedArray(o,m.view.byteOffset,m.view.byteLength/Uint8ClampedArray.BYTES_PER_ELEMENT);case 4:return new Int16Array(o,m.view.byteOffset,m.view.byteLength/Int16Array.BYTES_PER_ELEMENT);case 5:return new Uint16Array(o,m.view.byteOffset,m.view.byteLength/Uint16Array.BYTES_PER_ELEMENT);case 6:return new Int32Array(o,m.view.byteOffset,m.view.byteLength/Int32Array.BYTES_PER_ELEMENT);case 7:return new Uint32Array(o,m.view.byteOffset,m.view.byteLength/Uint32Array.BYTES_PER_ELEMENT);case 8:return new Float32Array(o,m.view.byteOffset,m.view.byteLength/Float32Array.BYTES_PER_ELEMENT);case 9:return new Float64Array(o,m.view.byteOffset,m.view.byteLength/Float64Array.BYTES_PER_ELEMENT);case 10:return new BigInt64Array(o,m.view.byteOffset,m.view.byteLength/BigInt64Array.BYTES_PER_ELEMENT);case 11:return new BigUint64Array(o,m.view.byteOffset,m.view.byteLength/BigUint64Array.BYTES_PER_ELEMENT);default:throw new Error("Unknown array buffer view type")}return o}return E}:void 0;return{message:JSON.parse(A,O),arrayBuffers:T}}e.deserializeWebviewMessage=y}),define(De[91],Ce([1,0,138,9,2,7,3,30,35,13]),function(ne,e,i,D,S,N,y,A,_,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isTextEditorViewState=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.SaveSourceRegistry=e.SaveReason=e.Verbosity=e.isResourceMergeEditorInput=e.isUntitledWithAssociatedResource=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,i.localize)(0,null),providerDisplayName:(0,i.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 O;(function(K){K[K.PROGRAMMATIC=1]="PROGRAMMATIC",K[K.USER=2]="USER",K[K.EDIT=3]="EDIT",K[K.NAVIGATION=4]="NAVIGATION",K[K.JUMP=5]="JUMP"})(O=e.EditorPaneSelectionChangeReason||(e.EditorPaneSelectionChangeReason={}));var b;(function(K){K[K.IDENTICAL=1]="IDENTICAL",K[K.SIMILAR=2]="SIMILAR",K[K.DIFFERENT=3]="DIFFERENT"})(b=e.EditorPaneSelectionCompareResult||(e.EditorPaneSelectionCompareResult={}));function g(K){const te=K;return!!te&&typeof te.getSelection=="function"&&!!te.onDidChangeSelection}e.isEditorPaneWithSelection=g;function E(K,te,de){for(const re of de.visibleEditorPanes)if(re.group.id===te&&K.matches(re.input))return re.getViewState()}e.findViewStateForEditor=E;function m(K){if(l(K))return!1;const te=K;return S.URI.isUri(te?.resource)}e.isResourceEditorInput=m;function t(K){if(l(K))return!1;const te=K;return te?.original!==void 0&&te.modified!==void 0}e.isResourceDiffEditorInput=t;function o(K){if(l(K)||t(K))return!1;const te=K;return te?.primary!==void 0&&te.secondary!==void 0}e.isResourceSideBySideEditorInput=o;function a(K){if(l(K))return!1;const te=K;return te?te.resource===void 0||te.resource.scheme===T.Schemas.untitled||te.forceUntitled===!0:!1}e.isUntitledResourceEditorInput=a;const p=/Untitled-\d+/;function w(K){return K.scheme===T.Schemas.untitled&&K.path.length>1&&!p.test(K.path)}e.isUntitledWithAssociatedResource=w;function u(K){if(l(K))return!1;const te=K;return S.URI.isUri(te?.base?.resource)&&S.URI.isUri(te?.input1?.resource)&&S.URI.isUri(te?.input2?.resource)&&S.URI.isUri(te?.result?.resource)}e.isResourceMergeEditorInput=u;var I;(function(K){K[K.SHORT=0]="SHORT",K[K.MEDIUM=1]="MEDIUM",K[K.LONG=2]="LONG"})(I=e.Verbosity||(e.Verbosity={}));var r;(function(K){K[K.EXPLICIT=1]="EXPLICIT",K[K.AUTO=2]="AUTO",K[K.FOCUS_CHANGE=3]="FOCUS_CHANGE",K[K.WINDOW_CHANGE=4]="WINDOW_CHANGE"})(r=e.SaveReason||(e.SaveReason={}));class c{constructor(){this.mapIdToSaveSource=new Map}registerSource(te,de){let re=this.mapIdToSaveSource.get(te);return re||(re={source:te,label:de},this.mapIdToSaveSource.set(te,re)),re.source}getSourceLabel(te){return this.mapIdToSaveSource.get(te)?.label??te}}e.SaveSourceRegistry=new c;var n;(function(K){K[K.None=0]="None",K[K.Readonly=2]="Readonly",K[K.Untitled=4]="Untitled",K[K.Singleton=8]="Singleton",K[K.RequiresTrust=16]="RequiresTrust",K[K.CanSplitInGroup=32]="CanSplitInGroup",K[K.ForceDescription=64]="ForceDescription",K[K.CanDropIntoEditor=128]="CanDropIntoEditor",K[K.MultipleEditors=256]="MultipleEditors"})(n=e.EditorInputCapabilities||(e.EditorInputCapabilities={}));class d extends N.Disposable{}e.AbstractEditorInput=d;function l(K){return K instanceof d}e.isEditorInput=l;function f(K){const te=K;return S.URI.isUri(te?.preferredResource)}function s(K){const te=K;return l(te?.primary)&&l(te?.secondary)}e.isSideBySideEditorInput=s;function h(K){const te=K;return l(te?.modified)&&l(te?.original)}e.isDiffEditorInput=h;function v(K){return l(K?.editor)}e.isEditorInputWithOptions=v;function k(K){const te=K;return v(K)&&te?.group!==void 0}e.isEditorInputWithOptionsAndGroup=k;function F(K){const te=K;return typeof te?.groupId=="number"&&l(te.editor)}e.isEditorIdentifier=F;var j;(function(K){K[K.UNKNOWN=0]="UNKNOWN",K[K.REPLACE=1]="REPLACE",K[K.MOVE=2]="MOVE",K[K.UNPIN=3]="UNPIN"})(j=e.EditorCloseContext||(e.EditorCloseContext={}));var W;(function(K){K[K.GROUP_ACTIVE=0]="GROUP_ACTIVE",K[K.GROUP_INDEX=1]="GROUP_INDEX",K[K.GROUP_LOCKED=2]="GROUP_LOCKED",K[K.EDITOR_OPEN=3]="EDITOR_OPEN",K[K.EDITOR_CLOSE=4]="EDITOR_CLOSE",K[K.EDITOR_MOVE=5]="EDITOR_MOVE",K[K.EDITOR_ACTIVE=6]="EDITOR_ACTIVE",K[K.EDITOR_LABEL=7]="EDITOR_LABEL",K[K.EDITOR_CAPABILITIES=8]="EDITOR_CAPABILITIES",K[K.EDITOR_PIN=9]="EDITOR_PIN",K[K.EDITOR_STICKY=10]="EDITOR_STICKY",K[K.EDITOR_DIRTY=11]="EDITOR_DIRTY",K[K.EDITOR_WILL_DISPOSE=12]="EDITOR_WILL_DISPOSE"})(W=e.GroupModelChangeKind||(e.GroupModelChangeKind={}));var H;(function(K){K[K.PRIMARY=1]="PRIMARY",K[K.SECONDARY=2]="SECONDARY",K[K.BOTH=3]="BOTH",K[K.ANY=4]="ANY"})(H=e.SideBySideEditor||(e.SideBySideEditor={}));class P{getOriginalUri(te,de){if(!te)return;if(u(te))return e.EditorResourceAccessor.getOriginalUri(te.result,de);if(de?.supportSideBySide){const{primary:be,secondary:le}=this.getSideEditors(te);if(be&&le){if(de?.supportSideBySide===H.BOTH)return{primary:this.getOriginalUri(be,{filterByScheme:de.filterByScheme}),secondary:this.getOriginalUri(le,{filterByScheme:de.filterByScheme})};if(de?.supportSideBySide===H.ANY)return this.getOriginalUri(be,{filterByScheme:de.filterByScheme})??this.getOriginalUri(le,{filterByScheme:de.filterByScheme});te=de.supportSideBySide===H.PRIMARY?be:le}}if(t(te)||o(te)||u(te))return;const re=f(te)?te.preferredResource:te.resource;return!re||!de||!de.filterByScheme?re:this.filterUri(re,de.filterByScheme)}getSideEditors(te){return s(te)||o(te)?{primary:te.primary,secondary:te.secondary}:h(te)||t(te)?{primary:te.modified,secondary:te.original}:{primary:void 0,secondary:void 0}}getCanonicalUri(te,de){if(!te)return;if(u(te))return e.EditorResourceAccessor.getCanonicalUri(te.result,de);if(de?.supportSideBySide){const{primary:be,secondary:le}=this.getSideEditors(te);if(be&&le){if(de?.supportSideBySide===H.BOTH)return{primary:this.getCanonicalUri(be,{filterByScheme:de.filterByScheme}),secondary:this.getCanonicalUri(le,{filterByScheme:de.filterByScheme})};if(de?.supportSideBySide===H.ANY)return this.getCanonicalUri(be,{filterByScheme:de.filterByScheme})??this.getCanonicalUri(le,{filterByScheme:de.filterByScheme});te=de.supportSideBySide===H.PRIMARY?be:le}}if(t(te)||o(te)||u(te))return;const re=te.resource;return!re||!de||!de.filterByScheme?re:this.filterUri(re,de.filterByScheme)}filterUri(te,de){if(Array.isArray(de)){if(de.some(re=>te.scheme===re))return te}else if(de===te.scheme)return te}}e.EditorResourceAccessor=new P;var M;(function(K){K[K.LEFT=0]="LEFT",K[K.RIGHT=1]="RIGHT"})(M=e.CloseDirection||(e.CloseDirection={}));class R{constructor(){this.editorSerializerConstructors=new Map,this.editorSerializerInstances=new Map}start(te){const de=this.instantiationService=te.get(y.IInstantiationService);for(const[re,be]of this.editorSerializerConstructors)this.createEditorSerializer(re,be,de);this.editorSerializerConstructors.clear()}createEditorSerializer(te,de,re){const be=re.createInstance(de);this.editorSerializerInstances.set(te,be)}registerFileEditorFactory(te){if(this.fileEditorFactory)throw new Error("Can only register one file editor factory.");this.fileEditorFactory=te}getFileEditorFactory(){return(0,D.assertIsDefined)(this.fileEditorFactory)}registerEditorSerializer(te,de){if(this.editorSerializerConstructors.has(te)||this.editorSerializerInstances.has(te))throw new Error(`A editor serializer with type ID '${te}' was already registered.`);return this.instantiationService?this.createEditorSerializer(te,de,this.instantiationService):this.editorSerializerConstructors.set(te,de),(0,N.toDisposable)(()=>{this.editorSerializerConstructors.delete(te),this.editorSerializerInstances.delete(te)})}getEditorSerializer(te){return this.editorSerializerInstances.get(typeof te=="string"?te:te.typeId)}}A.Registry.add(e.EditorExtensions.EditorFactory,new R);async function B(K,te,de){return!K||!K.length?[]:await Promise.all(K.map(async re=>{const be=S.URI.revive(re.fileUri);if(!be){de.info("Cannot resolve the path because it is not valid.",re);return}if(!await te.canHandleResource(be)){de.info("Cannot resolve the path because it cannot be handled",re);return}let fe=re.exists,Y=re.type;if(typeof fe!="boolean"||typeof Y!="number")try{Y=(await te.stat(be)).isDirectory?_.FileType.Directory:_.FileType.Unknown,fe=!0}catch(Se){de.error(Se),fe=!1}if(!fe&&re.openOnlyIfExists){de.info("Cannot resolve the path because it does not exist",re);return}if(Y===_.FileType.Directory){de.info("Cannot resolve the path because it is a directory",re);return}const ge={...re.options,pinned:!0};return fe?{resource:be,options:ge}:{resource:be,options:ge,forceUntitled:!0}}))}e.pathsToEditors=B;var $;(function(K){K[K.MOST_RECENTLY_ACTIVE=0]="MOST_RECENTLY_ACTIVE",K[K.SEQUENTIAL=1]="SEQUENTIAL"})($=e.EditorsOrder||(e.EditorsOrder={}));function U(K){const te=K;if(!te)return!1;const de=te;if(de.modified)return U(de.modified);const re=te;return!!(re.contributionsState&&re.viewState&&Array.isArray(re.cursorState))}e.isTextEditorViewState=U}),define(De[65],Ce([1,0,13,2]),function(ne,e,i,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.decodeAuthority=e.asWebviewUri=e.webviewGenericCspSource=e.webviewRootResourceAuthority=e.webviewResourceBaseHost=void 0,e.webviewResourceBaseHost="vscode-cdn.net",e.webviewRootResourceAuthority=`vscode-resource.${e.webviewResourceBaseHost}`,e.webviewGenericCspSource=`'self' https://*.${e.webviewResourceBaseHost}`;function S(A,_){return A.scheme===i.Schemas.http||A.scheme===i.Schemas.https?A:(_&&_.authority&&_.isRemote&&A.scheme===i.Schemas.file&&(A=D.URI.from({scheme:i.Schemas.vscodeRemote,authority:_.authority,path:A.path})),D.URI.from({scheme:i.Schemas.https,authority:`${A.scheme}+${N(A.authority)}.${e.webviewRootResourceAuthority}`,path:A.path,fragment:A.fragment,query:A.query}))}e.asWebviewUri=S;function N(A){return A.replace(/./g,_=>{const T=_.charCodeAt(0);return T>=97&&T<=122||T>=65&&T<=90||T>=48&&T<=57?_:"-"+T.toString(16).padStart(4,"0")})}function y(A){return A.replace(/-([0-9a-f]{4})/g,(_,T)=>String.fromCharCode(parseInt(T,16)))}e.decodeAuthority=y}),define(De[168],Ce([1,0,4,7,65]),function(ne,e,i,D,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtHostEditorInsets=void 0;class N{constructor(A,_,T){this._proxy=A,this._editors=_,this._remoteInfo=T,this._handlePool=0,this._disposables=new D.DisposableStore,this._insets=new Map,this._disposables.add(_.onDidChangeVisibleTextEditors(()=>{const O=_.getVisibleTextEditors();for(const b of this._insets.values())O.indexOf(b.editor)<0&&b.inset.dispose()}))}dispose(){this._insets.forEach(A=>A.inset.dispose()),this._disposables.dispose()}createWebviewEditorInset(A,_,T,O,b){let g;for(const w of this._editors.getVisibleTextEditors(!0))if(w.value===A){g=w;break}if(!g)throw new Error("not a visible editor");const E=this,m=this._handlePool++,t=new i.Emitter,o=new i.Emitter,a=new class{constructor(){this._html="",this._options=Object.create(null)}asWebviewUri(w){return(0,S.asWebviewUri)(w,E._remoteInfo)}get cspSource(){return S.webviewGenericCspSource}set options(w){this._options=w,E._proxy.$setOptions(m,w)}get options(){return this._options}set html(w){this._html=w,E._proxy.$setHtml(m,w)}get html(){return this._html}get onDidReceiveMessage(){return t.event}postMessage(w){return E._proxy.$postMessage(m,w)}},p=new class{constructor(){this.editor=A,this.line=_,this.height=T,this.webview=a,this.onDidDispose=o.event}dispose(){E._insets.has(m)&&(E._insets.delete(m),E._proxy.$disposeEditorInset(m),o.fire(),o.dispose(),t.dispose())}};return this._proxy.$createEditorInset(m,g.id,g.value.document.uri,_+1,T,O||{},b.identifier,b.extensionLocation),this._insets.set(m,{editor:A,inset:p,onDidReceiveMessage:t}),p}$onDidDispose(A){const _=this._insets.get(A);_&&_.inset.dispose()}$onDidReceiveMessage(A,_){this._insets.get(A)?.onDidReceiveMessage.fire(_)}}e.ExtHostEditorInsets=N}),define(De[169],Ce([1,0,4,15,139]),function(ne,e,i,D,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractDebugAdapter=void 0;class N{constructor(){this.pendingRequests=new Map,this.queue=[],this._onError=new i.Emitter,this._onExit=new i.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,_,T,O){const b={command:A};if(_&&Object.keys(_).length>0&&(b.arguments=_),this.internalSend("request",b),typeof O=="number"){const g=setTimeout(()=>{clearTimeout(g);const E=this.pendingRequests.get(b.seq);if(E){this.pendingRequests.delete(b.seq);const m={type:"response",seq:0,request_seq:b.seq,success:!1,command:A,message:(0,S.localize)(0,null,O,A)};E(m)}},O)}return T&&this.pendingRequests.set(b.seq,T),b.seq}acceptMessage(A){this.messageCallback?this.messageCallback(A):(this.queue.push(A),this.queue.length===1&&this.processQueue())}needsTaskBoundaryBetween(A,_){return A.type!=="event"||_.type!=="event"}async processQueue(){let A;for(;this.queue.length;){if((!A||this.needsTaskBoundaryBetween(this.queue[0],A))&&await(0,D.timeout)(0),A=this.queue.shift(),!A)return;switch(A.type){case"event":this.eventCallback?.(A);break;case"request":this.requestCallback?.(A);break;case"response":{const _=A,T=this.pendingRequests.get(_.request_seq);T&&(this.pendingRequests.delete(_.request_seq),T(_));break}}}}internalSend(A,_){_.type=A,_.seq=this.sequence++,this.sendMessage(_)}async cancelPendingRequests(){if(this.pendingRequests.size===0)return Promise.resolve();const A=new Map;this.pendingRequests.forEach((_,T)=>A.set(T,_)),await(0,D.timeout)(500),A.forEach((_,T)=>{_({type:"response",seq:0,request_seq:T,success:!1,command:"canceled",message:"canceled"}),this.pendingRequests.delete(T)})}getPendingRequestIds(){return Array.from(this.pendingRequests.keys())}dispose(){this.queue=[]}}e.AbstractDebugAdapter=N}),define(De[170],Ce([1,0,140,41,3]),function(ne,e,i,D,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BreakpointWidgetContext=e.IDebugService=e.DebuggerString=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_SUSPEND_DEBUGGEE_SUPPORTED=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 D.RawContextKey("debugType",void 0,{type:"string",description:i.localize(0,null)}),e.CONTEXT_DEBUG_CONFIGURATION_TYPE=new D.RawContextKey("debugConfigurationType",void 0,{type:"string",description:i.localize(1,null)}),e.CONTEXT_DEBUG_STATE=new D.RawContextKey("debugState","inactive",{type:"string",description:i.localize(2,null)}),e.CONTEXT_DEBUG_UX_KEY="debugUx",e.CONTEXT_DEBUG_UX=new D.RawContextKey(e.CONTEXT_DEBUG_UX_KEY,"default",{type:"string",description:i.localize(3,null)}),e.CONTEXT_IN_DEBUG_MODE=new D.RawContextKey("inDebugMode",!1,{type:"boolean",description:i.localize(4,null)}),e.CONTEXT_IN_DEBUG_REPL=new D.RawContextKey("inDebugRepl",!1,{type:"boolean",description:i.localize(5,null)}),e.CONTEXT_BREAKPOINT_WIDGET_VISIBLE=new D.RawContextKey("breakpointWidgetVisible",!1,{type:"boolean",description:i.localize(6,null)}),e.CONTEXT_IN_BREAKPOINT_WIDGET=new D.RawContextKey("inBreakpointWidget",!1,{type:"boolean",description:i.localize(7,null)}),e.CONTEXT_BREAKPOINTS_FOCUSED=new D.RawContextKey("breakpointsFocused",!0,{type:"boolean",description:i.localize(8,null)}),e.CONTEXT_WATCH_EXPRESSIONS_FOCUSED=new D.RawContextKey("watchExpressionsFocused",!0,{type:"boolean",description:i.localize(9,null)}),e.CONTEXT_WATCH_EXPRESSIONS_EXIST=new D.RawContextKey("watchExpressionsExist",!1,{type:"boolean",description:i.localize(10,null)}),e.CONTEXT_VARIABLES_FOCUSED=new D.RawContextKey("variablesFocused",!0,{type:"boolean",description:i.localize(11,null)}),e.CONTEXT_EXPRESSION_SELECTED=new D.RawContextKey("expressionSelected",!1,{type:"boolean",description:i.localize(12,null)}),e.CONTEXT_BREAKPOINT_INPUT_FOCUSED=new D.RawContextKey("breakpointInputFocused",!1,{type:"boolean",description:i.localize(13,null)}),e.CONTEXT_CALLSTACK_ITEM_TYPE=new D.RawContextKey("callStackItemType",void 0,{type:"string",description:i.localize(14,null)}),e.CONTEXT_CALLSTACK_SESSION_IS_ATTACH=new D.RawContextKey("callStackSessionIsAttach",!1,{type:"boolean",description:i.localize(15,null)}),e.CONTEXT_CALLSTACK_ITEM_STOPPED=new D.RawContextKey("callStackItemStopped",!1,{type:"boolean",description:i.localize(16,null)}),e.CONTEXT_CALLSTACK_SESSION_HAS_ONE_THREAD=new D.RawContextKey("callStackSessionHasOneThread",!1,{type:"boolean",description:i.localize(17,null)}),e.CONTEXT_WATCH_ITEM_TYPE=new D.RawContextKey("watchItemType",void 0,{type:"string",description:i.localize(18,null)}),e.CONTEXT_CAN_VIEW_MEMORY=new D.RawContextKey("canViewMemory",void 0,{type:"boolean",description:i.localize(19,null)}),e.CONTEXT_BREAKPOINT_ITEM_TYPE=new D.RawContextKey("breakpointItemType",void 0,{type:"string",description:i.localize(20,null)}),e.CONTEXT_BREAKPOINT_ACCESS_TYPE=new D.RawContextKey("breakpointAccessType",void 0,{type:"string",description:i.localize(21,null)}),e.CONTEXT_BREAKPOINT_SUPPORTS_CONDITION=new D.RawContextKey("breakpointSupportsCondition",!1,{type:"boolean",description:i.localize(22,null)}),e.CONTEXT_LOADED_SCRIPTS_SUPPORTED=new D.RawContextKey("loadedScriptsSupported",!1,{type:"boolean",description:i.localize(23,null)}),e.CONTEXT_LOADED_SCRIPTS_ITEM_TYPE=new D.RawContextKey("loadedScriptsItemType",void 0,{type:"string",description:i.localize(24,null)}),e.CONTEXT_FOCUSED_SESSION_IS_ATTACH=new D.RawContextKey("focusedSessionIsAttach",!1,{type:"boolean",description:i.localize(25,null)}),e.CONTEXT_STEP_BACK_SUPPORTED=new D.RawContextKey("stepBackSupported",!1,{type:"boolean",description:i.localize(26,null)}),e.CONTEXT_RESTART_FRAME_SUPPORTED=new D.RawContextKey("restartFrameSupported",!1,{type:"boolean",description:i.localize(27,null)}),e.CONTEXT_STACK_FRAME_SUPPORTS_RESTART=new D.RawContextKey("stackFrameSupportsRestart",!1,{type:"boolean",description:i.localize(28,null)}),e.CONTEXT_JUMP_TO_CURSOR_SUPPORTED=new D.RawContextKey("jumpToCursorSupported",!1,{type:"boolean",description:i.localize(29,null)}),e.CONTEXT_STEP_INTO_TARGETS_SUPPORTED=new D.RawContextKey("stepIntoTargetsSupported",!1,{type:"boolean",description:i.localize(30,null)}),e.CONTEXT_BREAKPOINTS_EXIST=new D.RawContextKey("breakpointsExist",!1,{type:"boolean",description:i.localize(31,null)}),e.CONTEXT_DEBUGGERS_AVAILABLE=new D.RawContextKey("debuggersAvailable",!1,{type:"boolean",description:i.localize(32,null)}),e.CONTEXT_DEBUG_EXTENSION_AVAILABLE=new D.RawContextKey("debugExtensionAvailable",!0,{type:"boolean",description:i.localize(33,null)}),e.CONTEXT_DEBUG_PROTOCOL_VARIABLE_MENU_CONTEXT=new D.RawContextKey("debugProtocolVariableMenuContext",void 0,{type:"string",description:i.localize(34,null)}),e.CONTEXT_SET_VARIABLE_SUPPORTED=new D.RawContextKey("debugSetVariableSupported",!1,{type:"boolean",description:i.localize(35,null)}),e.CONTEXT_SET_EXPRESSION_SUPPORTED=new D.RawContextKey("debugSetExpressionSupported",!1,{type:"boolean",description:i.localize(36,null)}),e.CONTEXT_BREAK_WHEN_VALUE_CHANGES_SUPPORTED=new D.RawContextKey("breakWhenValueChangesSupported",!1,{type:"boolean",description:i.localize(37,null)}),e.CONTEXT_BREAK_WHEN_VALUE_IS_ACCESSED_SUPPORTED=new D.RawContextKey("breakWhenValueIsAccessedSupported",!1,{type:"boolean",description:i.localize(38,null)}),e.CONTEXT_BREAK_WHEN_VALUE_IS_READ_SUPPORTED=new D.RawContextKey("breakWhenValueIsReadSupported",!1,{type:"boolean",description:i.localize(39,null)}),e.CONTEXT_TERMINATE_DEBUGGEE_SUPPORTED=new D.RawContextKey("terminateDebuggeeSupported",!1,{type:"boolean",description:i.localize(40,null)}),e.CONTEXT_SUSPEND_DEBUGGEE_SUPPORTED=new D.RawContextKey("suspendDebuggeeSupported",!1,{type:"boolean",description:i.localize(41,null)}),e.CONTEXT_VARIABLE_EVALUATE_NAME_PRESENT=new D.RawContextKey("variableEvaluateNamePresent",!1,{type:"boolean",description:i.localize(42,null)}),e.CONTEXT_VARIABLE_IS_READONLY=new D.RawContextKey("variableIsReadonly",!1,{type:"boolean",description:i.localize(43,null)}),e.CONTEXT_EXCEPTION_WIDGET_VISIBLE=new D.RawContextKey("exceptionWidgetVisible",!1,{type:"boolean",description:i.localize(44,null)}),e.CONTEXT_MULTI_SESSION_REPL=new D.RawContextKey("multiSessionRepl",!1,{type:"boolean",description:i.localize(45,null)}),e.CONTEXT_MULTI_SESSION_DEBUG=new D.RawContextKey("multiSessionDebug",!1,{type:"boolean",description:i.localize(46,null)}),e.CONTEXT_DISASSEMBLE_REQUEST_SUPPORTED=new D.RawContextKey("disassembleRequestSupported",!1,{type:"boolean",description:i.localize(47,null)}),e.CONTEXT_DISASSEMBLY_VIEW_FOCUS=new D.RawContextKey("disassemblyViewFocus",!1,{type:"boolean",description:i.localize(48,null)}),e.CONTEXT_LANGUAGE_SUPPORTS_DISASSEMBLE_REQUEST=new D.RawContextKey("languageSupportsDisassembleRequest",!1,{type:"boolean",description:i.localize(49,null)}),e.CONTEXT_FOCUSED_STACK_FRAME_HAS_INSTRUCTION_POINTER_REFERENCE=new D.RawContextKey("focusedStackFrameHasInstructionReference",!1,{type:"boolean",description:i.localize(50,null)});const N=g=>i.localize(51,null,g);e.debuggerDisabledMessage=N,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:i.localize(52,null)};var y;(function(g){g[g.Inactive=0]="Inactive",g[g.Initializing=1]="Initializing",g[g.Stopped=2]="Stopped",g[g.Running=3]="Running"})(y=e.State||(e.State={}));function A(g){switch(g){case 1:return"initializing";case 2:return"stopped";case 3:return"running";default:return"inactive"}}e.getStateLabel=A;var _;(function(g){g[g.Valid=0]="Valid",g[g.Unreadable=1]="Unreadable",g[g.Error=2]="Error"})(_=e.MemoryRangeType||(e.MemoryRangeType={})),e.DEBUG_MEMORY_SCHEME="vscode-debug-memory";var T;(function(g){g[g.Initial=1]="Initial",g[g.Dynamic=2]="Dynamic"})(T=e.DebugConfigurationProviderTriggerKind||(e.DebugConfigurationProviderTriggerKind={}));var O;(function(g){g.UnverifiedBreakpoints="unverifiedBreakpoints"})(O=e.DebuggerString||(e.DebuggerString={})),e.IDebugService=(0,S.createDecorator)(e.DEBUG_SERVICE_ID);var b;(function(g){g[g.CONDITION=0]="CONDITION",g[g.HIT_COUNT=1]="HIT_COUNT",g[g.LOG_MESSAGE=2]="LOG_MESSAGE"})(b=e.BreakpointWidgetContext||(e.BreakpointWidgetContext={}))}),define(De[171],Ce([1,0,10,2,19,23,13]),function(ne,e,i,D,S,N,y){"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 _(n,d,l){return n.replace(A,function(f,s){return d&&s.length>0&&s[0]!=="_"?f:l&&l.hasOwnProperty(s)?l[s]:f})}e.formatPII=_;function T(n){const d={};for(const l of Object.keys(n))l.startsWith("!")||(d[l]=n[l]);return d}e.filterExceptionsFromTelemetry=T;function O(n){return n.configuration.request==="attach"&&!b(n)&&(!n.parentSession||O(n.parentSession))}e.isSessionAttach=O;function b(n){let d=n.configuration.type;if(!!d)return d==="vslsShare"&&(d=n.configuration.adapterProxy.configuration.type),(0,i.equalsIgnoreCase)(d,"extensionhost")||(0,i.equalsIgnoreCase)(d,"pwa-extensionhost")?n:n.parentSession?b(n.parentSession):void 0}e.getExtensionHostDebugSession=b;function g(n){return n.type&&(n.label||n.program||n.runtime)}e.isDebuggerMainContribution=g;function E(n,d,l){let f,s=0;const h=/([^()\[\]{}<>\s+\-/%~#^;=|,`!]|\->)+/g;let v=null;for(;v=h.exec(n);){const k=v.index+1,F=k+v[0].length;if(k<=d&&F>=l){f=v[0],s=k;break}}if(f){const k=/\w+/g;let F=null;for(;(F=k.exec(f))&&!(F.index+1+s+F[0].length>=l););F&&(f=f.substring(0,k.lastIndex))}return f?{start:s,end:s+f.length-1}:{start:0,end:0}}e.getExactExpressionStartAndEnd=E;const m=/^[a-zA-Z][a-zA-Z0-9\+\-\.]+:/;function t(n){return!!(n&&n.match(m))}e.isUri=t;function o(n){if(typeof n.path=="string"&&!(typeof n.sourceReference=="number"&&n.sourceReference>0)){if(t(n.path))return D.URI.parse(n.path);if((0,S.isAbsolute)(n.path))return D.URI.file(n.path)}return n.path}function a(n){if(typeof n.path=="object"){const d=D.URI.revive(n.path);if(d)return d.scheme===y.Schemas.file?d.fsPath:d.toString()}return n.path}function p(n,d){const l=d?o:a,f=(0,N.deepClone)(n);return u(f,(s,h)=>{s&&h&&(h.path=l(h))}),f}e.convertToDAPaths=p;function w(n,d){const l=d?o:a,f=(0,N.deepClone)(n);return u(f,(s,h)=>{!s&&h&&(h.path=l(h))}),f}e.convertToVSCPaths=w;function u(n,d){switch(n.type){case"event":{const l=n;switch(l.event){case"output":d(!1,l.body.source);break;case"loadedSource":d(!1,l.body.source);break;case"breakpoint":d(!1,l.body.breakpoint.source);break;default:break}break}case"request":{const l=n;switch(l.command){case"setBreakpoints":d(!0,l.arguments.source);break;case"breakpointLocations":d(!0,l.arguments.source);break;case"source":d(!0,l.arguments.source);break;case"gotoTargets":d(!0,l.arguments.source);break;case"launchVSCode":l.arguments.args.forEach(f=>d(!1,f));break;default:break}break}case"response":{const l=n;if(l.success&&l.body)switch(l.command){case"stackTrace":l.body.stackFrames.forEach(f=>d(!1,f.source));break;case"loadedSources":l.body.sources.forEach(f=>d(!1,f));break;case"scopes":l.body.scopes.forEach(f=>d(!1,f.source));break;case"setFunctionBreakpoints":l.body.breakpoints.forEach(f=>d(!1,f.source));break;case"setBreakpoints":l.body.breakpoints.forEach(f=>d(!1,f.source));break;case"disassemble":l.body?.instructions.forEach(s=>d(!1,s.location));break;default:break}break}}}function I(n){return n.filter(d=>!d.presentation?.hidden).sort((d,l)=>d.presentation?l.presentation?d.presentation.group?l.presentation.group?d.presentation.group!==l.presentation.group?d.presentation.group.localeCompare(l.presentation.group):r(d.presentation.order,l.presentation.order):-1:l.presentation.group?1:r(d.presentation.order,l.presentation.order):-1:l.presentation?1:0)}e.getVisibleAndSorted=I;function r(n,d){return typeof n!="number"?typeof d!="number"?0:1:typeof d!="number"?-1:n-d}async function c(n,d){const l=n.getValue("debug.saveBeforeStart",{overrideIdentifier:d.activeTextEditorLanguageId});if(l!=="none"&&(await d.saveAll(),l==="allEditorsInActiveGroup")){const f=d.activeEditorPane;f&&f.input.resource?.scheme===y.Schemas.untitled&&await d.save({editor:f.input,groupId:f.group.id})}await n.reloadConfiguration()}e.saveAllBeforeDebugStart=c}),define(De[66],Ce([1,0,24,34,172,79,13,19,21,41]),function(ne,e,i,D,S,N,y,A,_,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.compressOutputItemStreams=e.isTextStreamMime=e.NotebookWorkingCopyTypeIdentifier=e.CellStatusbarAlignment=e.NotebookSetting=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.INTERACTIVE_WINDOW_EDITOR_ID=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",e.INTERACTIVE_WINDOW_EDITOR_ID="workbench.editor.interactive";var O;(function(B){B[B.Markup=1]="Markup",B[B.Code=2]="Code"})(O=e.CellKind||(e.CellKind={})),e.NOTEBOOK_DISPLAY_ORDER=["application/json","application/javascript","text/html","image/svg+xml",N.Mimes.latex,N.Mimes.markdown,"image/png","image/jpeg",N.Mimes.text],e.ACCESSIBLE_NOTEBOOK_DISPLAY_ORDER=[N.Mimes.latex,N.Mimes.markdown,"application/json",N.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 b;(function(B){B[B.Running=1]="Running",B[B.Idle=2]="Idle"})(b=e.NotebookRunState||(e.NotebookRunState={}));var g;(function(B){B[B.Unconfirmed=1]="Unconfirmed",B[B.Pending=2]="Pending",B[B.Executing=3]="Executing"})(g=e.NotebookCellExecutionState||(e.NotebookCellExecutionState={}));var E;(function(B){B[B.WithHardKernelDependency=0]="WithHardKernelDependency",B[B.WithOptionalKernelDependency=1]="WithOptionalKernelDependency",B[B.Pure=2]="Pure",B[B.Never=3]="Never"})(E=e.NotebookRendererMatch||(e.NotebookRendererMatch={}));var m;(function(B){B.Always="always",B.Never="never",B.Optional="optional"})(m=e.RendererMessagingSpec||(e.RendererMessagingSpec={}));var t;(function(B){B[B.ModelChange=1]="ModelChange",B[B.Move=2]="Move",B[B.ChangeCellLanguage=5]="ChangeCellLanguage",B[B.Initialize=6]="Initialize",B[B.ChangeCellMetadata=7]="ChangeCellMetadata",B[B.Output=8]="Output",B[B.OutputItem=9]="OutputItem",B[B.ChangeCellContent=10]="ChangeCellContent",B[B.ChangeDocumentMetadata=11]="ChangeDocumentMetadata",B[B.ChangeCellInternalMetadata=12]="ChangeCellInternalMetadata",B[B.ChangeCellMime=13]="ChangeCellMime",B[B.Unknown=100]="Unknown"})(t=e.NotebookCellsChangeType||(e.NotebookCellsChangeType={}));var o;(function(B){B[B.Handle=0]="Handle",B[B.Index=1]="Index"})(o=e.SelectionStateType||(e.SelectionStateType={}));var a;(function(B){B[B.Replace=1]="Replace",B[B.Output=2]="Output",B[B.Metadata=3]="Metadata",B[B.CellLanguage=4]="CellLanguage",B[B.DocumentMetadata=5]="DocumentMetadata",B[B.Move=6]="Move",B[B.OutputItems=7]="OutputItems",B[B.PartialMetadata=8]="PartialMetadata",B[B.PartialInternalMetadata=9]="PartialInternalMetadata"})(a=e.CellEditType||(e.CellEditType={}));var p;(function(B){B.scheme=y.Schemas.vscodeNotebookCell;const $=["W","X","Y","Z","a","b","c","d","e","f"],U=new RegExp(`^[${$.join("")}]+`),K=7;function te(Y,ge){const Se=ge.toString(K),Be=`${Se.length<$.length?$[Se.length-1]:"z"}${Se}s${(0,i.encodeBase64)(i.VSBuffer.fromString(Y.scheme),!0,!0)}`;return Y.with({scheme:B.scheme,fragment:Be})}B.generate=te;function de(Y){if(Y.scheme!==B.scheme)return;const ge=Y.fragment.indexOf("s");if(ge<0)return;const Se=parseInt(Y.fragment.substring(0,ge).replace(U,""),K),Oe=(0,i.decodeBase64)(Y.fragment.substring(ge+1)).toString();if(!isNaN(Se))return{handle:Se,notebook:Y.with({scheme:Oe,fragment:null})}}B.parse=de;function re(Y,ge){return Y.with({scheme:y.Schemas.vscodeNotebookCellOutput,fragment:`op${ge??""},${Y.scheme!==y.Schemas.file?Y.scheme:""}`})}B.generateCellOutputUri=re;function be(Y){if(Y.scheme!==y.Schemas.vscodeNotebookCellOutput)return;const ge=/^op([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})?\,(.*)$/i.exec(Y.fragment);if(!ge)return;const Se=ge[1]&&ge[1]!==""?ge[1]:void 0,Oe=ge[2];return{outputId:Se,notebook:Y.with({scheme:Oe||y.Schemas.file,fragment:null})}}B.parseCellOutputUri=be;function le(Y,ge,Se){return B.generate(Y,ge).with({scheme:Se})}B.generateCellPropertyUri=le;function fe(Y,ge){if(Y.scheme===ge)return B.parse(Y.with({scheme:B.scheme}))}B.parseCellPropertyUri=fe})(p=e.CellUri||(e.CellUri={}));const w=B=>_.isWindows?B.replace(/\//g,"\\"):B;class u{constructor($=[],U=e.NOTEBOOK_DISPLAY_ORDER){this.defaultOrder=U,this.order=[...new Set($)].map(K=>({pattern:K,matches:D.parse(w(K))}))}sort($){const U=new Map(S.Iterable.map($,te=>[te,w(te)]));let K=[];for(const{matches:te}of this.order)for(const[de,re]of U)if(te(re)){K.push(de),U.delete(de);break}return U.size&&(K=K.concat([...U.keys()].sort((te,de)=>this.defaultOrder.indexOf(te)-this.defaultOrder.indexOf(de)))),K}prioritize($,U){const K=this.findIndex($);if(K===-1){this.order.unshift({pattern:$,matches:D.parse(w($))});return}const te=new Set(U.map(re=>this.findIndex(re,K)));te.delete(-1);const de=Array.from(te).sort();this.order.splice(K+1,0,...de.map(re=>this.order[re]));for(let re=de.length-1;re>=0;re--)this.order.splice(de[re],1)}toArray(){return this.order.map($=>$.pattern)}findIndex($,U=this.order.length){const K=w($);for(let te=0;tete===de){const te=[];function de(le,fe,Y){if(fe===0&&Y.length===0)return;const ge=te[te.length-1];ge&&ge.start+ge.deleteCount===le?(ge.deleteCount+=fe,ge.toInsert.push(...Y)):te.push({start:le,deleteCount:fe,toInsert:Y})}let re=0,be=0;for(;;){if(re===B.length){de(re,0,$.slice(be));break}if(be===$.length){de(re,B.length-re,[]);break}const le=B[re],fe=$[be];if(K(le,fe)){re+=1,be+=1;continue}U(fe)?(de(re,1,[]),re+=1):(de(re,0,[fe]),be+=1)}return te}e.diff=I,e.NOTEBOOK_EDITOR_CURSOR_BOUNDARY=new T.RawContextKey("notebookEditorCursorAtBoundary","none");var r;(function(B){B.default="default",B.option="option"})(r=e.NotebookEditorPriority||(e.NotebookEditorPriority={}));function c(B){const $=B;return!!((typeof $.include=="string"||D.isRelativePattern($.include))&&(typeof $.exclude=="string"||D.isRelativePattern($.exclude)))}e.isDocumentExcludePattern=c;function n(B,$,U){if(Array.isArray(B.viewType)&&B.viewType.indexOf($)>=0||B.viewType===$)return!0;if(B.filenamePattern){const K=c(B.filenamePattern)?B.filenamePattern.include:B.filenamePattern,te=c(B.filenamePattern)?B.filenamePattern.exclude:void 0;if(D.match(K,(0,A.basename)(U.fsPath).toLowerCase()))return!(te&&D.match(te,(0,A.basename)(U.fsPath).toLowerCase()))}return!1}e.notebookDocumentFilterMatch=n,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",outputLineHeight:"notebook.outputLineHeight",outputFontSize:"notebook.outputFontSize",outputFontFamily:"notebook.outputFontFamily"};var d;(function(B){B[B.Left=1]="Left",B[B.Right=2]="Right"})(d=e.CellStatusbarAlignment||(e.CellStatusbarAlignment={}));class l{static create($){return`${l._prefix}${$}`}static parse($){if($.startsWith(l._prefix))return $.substring(l._prefix.length)}}e.NotebookWorkingCopyTypeIdentifier=l,l._prefix="notebook/";function f(B){return["application/vnd.code.notebook.stdout","application/vnd.code.notebook.stderr"].includes(B)}e.isTextStreamMime=f;const s=new TextDecoder;function h(B){const $=[];let U=!1;for(const K of B)($.length===0||U)&&($.push(K),U=!0);return j($),R(i.VSBuffer.concat($.map(K=>i.VSBuffer.wrap(K))))}e.compressOutputItemStreams=h;const v=`${String.fromCharCode(27)}[A`,k=v.split("").map(B=>B.charCodeAt(0)),F=10;function j(B){B.forEach(($,U)=>{if(U===0||$.length-1;){const $=B.match(/^(.*)\r+/m)[1];let U=B.match(/\r+(.*)$/m)[1];U=U+$.slice(U.length,$.length),B=B.replace(/\r+.*$/m,"\r").replace(/^.*\r/m,U)}return B}const P="\b".charCodeAt(0),M="\r".charCodeAt(0);function R(B){return!B.buffer.includes(P)&&!B.buffer.includes(M)?B:i.VSBuffer.fromString(H(W(s.decode(B.buffer))))}}),define(De[173],Ce([1,0,3]),function(ne,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.INotebookExecutionService=e.CellExecutionUpdateType=void 0;var D;(function(S){S[S.Output=1]="Output",S[S.OutputItems=2]="OutputItems",S[S.ExecutionState=3]="ExecutionState"})(D=e.CellExecutionUpdateType||(e.CellExecutionUpdateType={})),e.INotebookExecutionService=(0,i.createDecorator)("INotebookExecutionService")}),define(De[174],Ce([1,0]),function(ne,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.deserializeEnvironmentVariableCollections=e.serializeEnvironmentVariableCollections=e.deserializeEnvironmentVariableCollection=e.serializeEnvironmentVariableCollection=void 0;function i(y){return[...y.entries()]}e.serializeEnvironmentVariableCollection=i;function D(y){return new Map(y)}e.deserializeEnvironmentVariableCollection=D;function S(y){return Array.from(y.entries()).map(A=>[A[0],i(A[1].map)])}e.serializeEnvironmentVariableCollections=S;function N(y){return new Map(y.map(A=>[A[0],{map:D(A[1])}]))}e.deserializeEnvironmentVariableCollections=N}),define(De[42],Ce([1,0]),function(ne,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TestId=e.TestPosition=e.TestIdPathParts=void 0;var i;(function(N){N.Delimiter="\0"})(i=e.TestIdPathParts||(e.TestIdPathParts={}));var D;(function(N){N[N.IsSame=0]="IsSame",N[N.Disconnected=1]="Disconnected",N[N.IsChild=2]="IsChild",N[N.IsParent=3]="IsParent"})(D=e.TestPosition||(e.TestPosition={}));class S{static fromExtHostTestItem(y,A,_=y.parent){if(y._isRoot)return new S([A]);const T=[y.id];for(let O=_;O&&O.id!==A;O=O.parent)T.push(O.id);return T.push(A),new S(T.reverse())}static isRoot(y){return!y.includes("\0")}static root(y){const A=y.indexOf("\0");return A===-1?y:y.slice(0,A)}static fromString(y){return new S(y.split("\0"))}static join(y,A){return new S([...y.path,A])}static joinToString(y,A){return y.toString()+"\0"+A}static parentId(y){const A=y.lastIndexOf("\0");return A===-1?void 0:y.slice(0,A)}static compare(y,A){return y===A?0:A.startsWith(y+"\0")?2:y.startsWith(A+"\0")?3:1}constructor(y,A=y.length){if(this.path=y,this.viewEnd=A,y.length===0||A<1)throw new Error("cannot create test with empty path")}get parentId(){return this.viewEnd>1?new S(this.path,this.viewEnd-1):void 0}get localId(){return this.path[this.viewEnd-1]}get controllerId(){return this.path[0]}get isRoot(){return this.viewEnd===1}*idsFromRoot(){for(let y=1;y<=this.viewEnd;y++)yield new S(this.path,y)}*idsToRoot(){for(let y=this.viewEnd;y>0;y--)yield new S(this.path,y)}compare(y){if(typeof y=="string")return S.compare(this.toString(),y);for(let A=0;Athis.viewEnd?2:y.viewEnd({range:h.range.toJSON(),uri:h.uri.toJSON()}),s.deserialize=h=>({range:D.Range.lift(h.range),uri:i.URI.revive(h.uri)})})(A=e.IRichLocation||(e.IRichLocation={}));var _;(function(s){s[s.Error=0]="Error",s[s.Output=1]="Output"})(_=e.TestMessageType||(e.TestMessageType={}));var T;(function(s){s.serialize=h=>({message:h.message,type:0,expected:h.expected,actual:h.actual,location:h.location&&A.serialize(h.location)}),s.deserialize=h=>({message:h.message,type:0,expected:h.expected,actual:h.actual,location:h.location&&A.deserialize(h.location)})})(T=e.ITestErrorMessage||(e.ITestErrorMessage={}));const O=(s,h)=>`${h?"s":"e"}${s}`;e.getMarkId=O;var b;(function(s){s.serialize=h=>({message:h.message,type:1,offset:h.offset,length:h.length,location:h.location&&A.serialize(h.location)}),s.deserialize=h=>({message:h.message,type:1,offset:h.offset,length:h.length,location:h.location&&A.deserialize(h.location)})})(b=e.ITestOutputMessage||(e.ITestOutputMessage={}));var g;(function(s){s.serialize=h=>h.type===0?T.serialize(h):b.serialize(h),s.deserialize=h=>h.type===0?T.deserialize(h):b.deserialize(h)})(g=e.ITestMessage||(e.ITestMessage={}));var E;(function(s){s.serializeWithoutMessages=h=>({state:h.state,duration:h.duration,messages:[]}),s.serialize=h=>({state:h.state,duration:h.duration,messages:h.messages.map(g.serialize)}),s.deserialize=h=>({state:h.state,duration:h.duration,messages:h.messages.map(g.deserialize)})})(E=e.ITestTaskState||(e.ITestTaskState={}));const m="\0",t=(s,h)=>s+m+h;e.namespaceTestTag=t;const o=s=>{const h=s.indexOf(m);return{ctrlId:s.slice(0,h),tagId:s.slice(h+1)}};e.denamespaceTestTag=o;var a;(function(s){s.serialize=h=>({extId:h.extId,label:h.label,tags:h.tags,busy:h.busy,children:void 0,uri:h.uri?.toJSON(),range:h.range?.toJSON()||null,description:h.description,error:h.error,sortText:h.sortText}),s.deserialize=h=>({extId:h.extId,label:h.label,tags:h.tags,busy:h.busy,children:void 0,uri:h.uri?i.URI.revive(h.uri):void 0,range:h.range?D.Range.lift(h.range):null,description:h.description,error:h.error,sortText:h.sortText})})(a=e.ITestItem||(e.ITestItem={}));var p;(function(s){s[s.NotExpandable=0]="NotExpandable",s[s.Expandable=1]="Expandable",s[s.BusyExpanding=2]="BusyExpanding",s[s.Expanded=3]="Expanded"})(p=e.TestItemExpandState||(e.TestItemExpandState={}));var w;(function(s){s.serialize=h=>({expand:h.expand,item:a.serialize(h.item)}),s.deserialize=h=>({controllerId:S.TestId.root(h.item.extId),expand:h.expand,item:a.deserialize(h.item)})})(w=e.InternalTestItem||(e.InternalTestItem={}));var u;(function(s){s.serialize=h=>{let v;return h.item&&(v={},h.item.label!==void 0&&(v.label=h.item.label),h.item.tags!==void 0&&(v.tags=h.item.tags),h.item.busy!==void 0&&(v.busy=h.item.busy),h.item.uri!==void 0&&(v.uri=h.item.uri?.toJSON()),h.item.range!==void 0&&(v.range=h.item.range?.toJSON()),h.item.description!==void 0&&(v.description=h.item.description),h.item.error!==void 0&&(v.error=h.item.error),h.item.sortText!==void 0&&(v.sortText=h.item.sortText)),{extId:h.extId,expand:h.expand,item:v}},s.deserialize=h=>{let v;return h.item&&(v={},h.item.label!==void 0&&(v.label=h.item.label),h.item.tags!==void 0&&(v.tags=h.item.tags),h.item.busy!==void 0&&(v.busy=h.item.busy),h.item.range!==void 0&&(v.range=h.item.range?D.Range.lift(h.item.range):null),h.item.description!==void 0&&(v.description=h.item.description),h.item.error!==void 0&&(v.error=h.item.error),h.item.sortText!==void 0&&(v.sortText=h.item.sortText)),{extId:h.extId,expand:h.expand,item:v}}})(u=e.ITestItemUpdate||(e.ITestItemUpdate={}));const I=(s,h)=>{h.expand!==void 0&&(s.expand=h.expand),h.item!==void 0&&(s.item=s.item?Object.assign(s.item,h.item):h.item)};e.applyTestItemUpdate=I;var r;(function(s){s.serializeWithoutMessages=h=>({...w.serialize(h),ownComputedState:h.ownComputedState,computedState:h.computedState,tasks:h.tasks.map(E.serializeWithoutMessages),retired:h.retired}),s.serialize=h=>({...w.serialize(h),ownComputedState:h.ownComputedState,computedState:h.computedState,tasks:h.tasks.map(E.serialize),retired:h.retired}),s.deserialize=h=>({...w.deserialize(h),ownComputedState:h.ownComputedState,computedState:h.computedState,tasks:h.tasks.map(E.deserialize),retired:!0})})(r=e.TestResultItem||(e.TestResultItem={}));var c;(function(s){s[s.Function=0]="Function",s[s.Statement=1]="Statement"})(c=e.DetailType||(e.DetailType={}));var n;(function(s){s[s.Add=0]="Add",s[s.Update=1]="Update",s[s.DocumentSynced=2]="DocumentSynced",s[s.Remove=3]="Remove",s[s.IncrementPendingExtHosts=4]="IncrementPendingExtHosts",s[s.Retire=5]="Retire",s[s.AddTag=6]="AddTag",s[s.RemoveTag=7]="RemoveTag"})(n=e.TestDiffOpType||(e.TestDiffOpType={}));var d;(function(s){s.deserialize=h=>h.op===0?{op:h.op,item:w.deserialize(h.item)}:h.op===1?{op:h.op,item:u.deserialize(h.item)}:h.op===2?{op:h.op,uri:i.URI.revive(h.uri),docv:h.docv}:h,s.serialize=h=>h.op===0?{op:h.op,item:w.serialize(h.item)}:h.op===1?{op:h.op,item:u.serialize(h.item)}:h})(d=e.TestsDiffOp||(e.TestsDiffOp={}));class l{add(h){}update(h){}remove(h,v){}complete(){}}e.IncrementalChangeCollector=l;class f{constructor(){this._tags=new Map,this.items=new Map,this.roots=new Set,this.busyControllerCount=0,this.pendingRootCount=0,this.tags=this._tags}apply(h){const v=this.createChangeCollector();for(const k of h)switch(k.op){case 0:{const F=w.deserialize(k.item),j=S.TestId.parentId(F.item.extId)?.toString();if(j){if(this.items.has(j)){const W=this.items.get(j);W.children.add(F.item.extId);const H=this.createItem(F,W);this.items.set(F.item.extId,H),v.add(H)}}else{const W=this.createItem(F);this.roots.add(W),this.items.set(F.item.extId,W),v.add(W)}F.expand===2&&this.busyControllerCount++;break}case 1:{const F=u.deserialize(k.item),j=this.items.get(F.extId);if(!j)break;F.expand!==void 0&&(j.expand===2&&this.busyControllerCount--,F.expand===2&&this.busyControllerCount++),(0,e.applyTestItemUpdate)(j,F),v.update(j);break}case 3:{const F=this.items.get(k.itemId);if(!F)break;const j=S.TestId.parentId(F.item.extId)?.toString();j?this.items.get(j).children.delete(F.item.extId):this.roots.delete(F);const W=[[k.itemId]];for(;W.length;)for(const H of W.pop()){const P=this.items.get(H);P&&(W.push(P.children),this.items.delete(H),v.remove(P,P!==F),P.expand===2&&this.busyControllerCount--)}break}case 5:this.retireTest(k.itemId);break;case 4:this.updatePendingRoots(k.amount);break;case 6:this._tags.set(k.tag.id,k.tag);break;case 7:this._tags.delete(k.id);break}v.complete()}retireTest(h){}updatePendingRoots(h){this.pendingRootCount+=h}createChangeCollector(){return new l}}e.AbstractIncrementalTestCollection=f}),define(De[67],Ce([1,0,15,4,7,47,51,42]),function(ne,e,i,D,S,N,y,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createTestItemChildren=e.MixedTestItemController=e.InvalidTestItemError=e.DuplicateTestItemError=e.TestItemCollection=e.TestItemEventOp=void 0;var _;(function(a){a[a.Upsert=0]="Upsert",a[a.SetTags=1]="SetTags",a[a.UpdateCanResolveChildren=2]="UpdateCanResolveChildren",a[a.RemoveChild=3]="RemoveChild",a[a.SetProp=4]="SetProp",a[a.Bulk=5]="Bulk",a[a.DocumentSynced=6]="DocumentSynced"})(_=e.TestItemEventOp||(e.TestItemEventOp={}));const T=(a,p)=>a===p,O={range:(a,p)=>a===p?!0:!a||!p?!1:a.equalsRange(p),busy:T,label:T,description:T,error:T,tags:(a,p)=>!(a.length!==p.length||a.some(w=>!p.includes(w)))},b=(a,p)=>{let w;for(const[u,I]of Object.entries(O))I(a[u],p[u])||(w?w[u]=p[u]:w={[u]:p[u]});return w};class g extends S.Disposable{get root(){return this.options.root}constructor(p){super(),this.options=p,this.debounceSendDiff=this._register(new i.RunOnceScheduler(()=>this.flushDiff(),200)),this.diffOpEmitter=this._register(new D.Emitter),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(p){this._resolveHandler=p;for(const w of this.tree.values())this.updateExpandability(w)}collectDiff(){const p=this.diff;return this.diff=[],p}pushDiff(p){switch(p.op){case 2:{for(const w of this.diff)if(w.op===2&&w.uri===p.uri){w.docv=p.docv;return}break}case 1:{const w=this.diff[this.diff.length-1];if(w){if(w.op===1&&w.item.extId===p.item.extId){(0,y.applyTestItemUpdate)(w.item,p.item);return}if(w.op===0&&w.item.item.extId===p.item.extId){(0,y.applyTestItemUpdate)(w.item,p.item);return}}break}}this.diff.push(p),this.debounceSendDiff.isScheduled()||this.debounceSendDiff.schedule()}expand(p,w){const u=this.tree.get(p);if(!!u){if((u.expandLevels===void 0||w>u.expandLevels)&&(u.expandLevels=w),u.expand===1){const I=this.resolveChildren(u);return I.isOpen()?this.expandChildren(u,w-1):I.wait().then(()=>this.expandChildren(u,w-1))}else if(u.expand===3)return u.resolveBarrier?.isOpen()===!1?u.resolveBarrier.wait().then(()=>this.expandChildren(u,w-1)):this.expandChildren(u,w-1)}}dispose(){for(const p of this.tree.values())this.options.getApiFor(p.actual).listener=void 0;this.tree.clear(),this.diff=[],super.dispose()}onTestItemEvent(p,w){switch(w.op){case 3:this.removeItem(A.TestId.joinToString(p.fullId,w.id));break;case 0:this.upsertItem(w.item,p);break;case 5:for(const u of w.ops)this.onTestItemEvent(p,u);break;case 1:this.diffTagRefs(w.new,w.old,p.fullId.toString());break;case 2:this.updateExpandability(p);break;case 4:this.pushDiff({op:1,item:{extId:p.fullId.toString(),item:w.update}});break;case 6:this.documentSynced(p.actual.uri);break;default:(0,N.assertNever)(w)}}documentSynced(p){p&&this.pushDiff({op:2,uri:p,docv:this.options.getDocumentVersion(p)})}upsertItem(p,w){const u=A.TestId.fromExtHostTestItem(p,this.root.id,w?.actual),I=this.options.getApiFor(p);I.parent&&I.parent!==w?.actual&&this.options.getChildren(I.parent).delete(p.id);let r=this.tree.get(u.toString());if(!r){r={fullId:u,actual:p,expandLevels:w?.expandLevels?w.expandLevels-1:void 0,expand:0},p.tags.forEach(this.incrementTagRefs,this),this.tree.set(r.fullId.toString(),r),this.setItemParent(p,w),this.pushDiff({op:0,item:{controllerId:this.options.controllerId,expand:r.expand,item:this.options.toITestItem(p)}}),this.connectItemAndChildren(p,r,w);return}if(r.actual===p){this.connectItem(p,r,w);return}const c=this.options.getChildren(r.actual),n=r.actual,d=b(this.options.toITestItem(n),this.options.toITestItem(p));this.options.getApiFor(n).listener=void 0,r.actual=p,r.expand=0,d&&(d.hasOwnProperty("tags")&&(this.diffTagRefs(p.tags,n.tags,u.toString()),delete d.tags),this.onTestItemEvent(r,{op:4,update:d})),this.connectItemAndChildren(p,r,w);for(const[l,f]of c)this.options.getChildren(p).get(f.id)||this.removeItem(A.TestId.joinToString(u,f.id));this.documentSynced(r.actual.uri)}diffTagRefs(p,w,u){const I=new Set(w.map(r=>r.id));for(const r of p)I.delete(r.id)||this.incrementTagRefs(r);this.pushDiff({op:1,item:{extId:u,item:{tags:p.map(r=>(0,y.namespaceTestTag)(this.options.controllerId,r.id))}}}),I.forEach(this.decrementTagRefs,this)}incrementTagRefs(p){const w=this.tags.get(p.id);w?w.refCount++:(this.tags.set(p.id,{refCount:1}),this.pushDiff({op:6,tag:{id:(0,y.namespaceTestTag)(this.options.controllerId,p.id)}}))}decrementTagRefs(p){const w=this.tags.get(p);w&&!--w.refCount&&(this.tags.delete(p),this.pushDiff({op:7,id:(0,y.namespaceTestTag)(this.options.controllerId,p)}))}setItemParent(p,w){this.options.getApiFor(p).parent=w&&w.actual!==this.root?w.actual:void 0}connectItem(p,w,u){this.setItemParent(p,u);const I=this.options.getApiFor(p);I.parent=u?.actual,I.listener=r=>this.onTestItemEvent(w,r),this.updateExpandability(w)}connectItemAndChildren(p,w,u){this.connectItem(p,w,u);for(const[I,r]of this.options.getChildren(p))this.upsertItem(r,w)}updateExpandability(p){let w;this._resolveHandler?p.resolveBarrier?w=p.resolveBarrier.isOpen()?3:2:w=p.actual.canResolveChildren?1:0:w=0,w!==p.expand&&(p.expand=w,this.pushDiff({op:1,item:{extId:p.fullId.toString(),expand:w}}),w===1&&p.expandLevels!==void 0&&this.resolveChildren(p))}expandChildren(p,w){if(w<0)return;const u=[];for(const[I,r]of this.options.getChildren(p.actual)){const c=this.expand(A.TestId.joinToString(p.fullId,r.id),w);(0,i.isThenable)(c)&&u.push(c)}if(u.length)return Promise.all(u).then(()=>{})}resolveChildren(p){if(p.resolveBarrier)return p.resolveBarrier;if(!this._resolveHandler){const r=new i.Barrier;return r.open(),r}p.expand=2,this.pushExpandStateUpdate(p);const w=p.resolveBarrier=new i.Barrier,u=r=>{console.error(`Unhandled error in resolveHandler of test controller "${this.options.controllerId}"`,r)};let I;try{I=this._resolveHandler(p.actual===this.root?void 0:p.actual)}catch(r){u(r)}return(0,i.isThenable)(I)?I.catch(u).then(()=>{w.open(),this.updateExpandability(p)}):(w.open(),this.updateExpandability(p)),p.resolveBarrier}pushExpandStateUpdate(p){this.pushDiff({op:1,item:{extId:p.fullId.toString(),expand:p.expand}})}removeItem(p){const w=this.tree.get(p);if(!w)throw new Error("attempting to remove non-existent child");this.pushDiff({op:3,itemId:p});const u=[w];for(;u.length;){const I=u.pop();if(!!I){this.options.getApiFor(I.actual).listener=void 0;for(const r of I.actual.tags)this.decrementTagRefs(r.id);this.tree.delete(I.fullId.toString());for(const[r,c]of this.options.getChildren(I.actual))u.push(this.tree.get(A.TestId.joinToString(I.fullId,c.id)))}}}flushDiff(){const p=this.collectDiff();p.length&&this.diffOpEmitter.fire(p)}}e.TestItemCollection=g;class E extends Error{constructor(p){super(`Attempted to insert a duplicate test item ID ${p}`)}}e.DuplicateTestItemError=E;class m extends Error{constructor(p){super(`TestItem with ID "${p}" is invalid. Make sure to create it from the createTestItem method.`)}}e.InvalidTestItemError=m;class t extends Error{constructor(p,w,u){super(`TestItem with ID "${p}" is from controller "${w}" and cannot be added as a child of an item from controller "${u}".`)}}e.MixedTestItemController=t;const o=(a,p,w)=>{let u=new Map;return{get size(){return u.size},forEach(I,r){for(const c of u.values())I.call(r,c,this)},[Symbol.iterator](){return u.entries()},replace(I){const r=new Map,c=new Set(u.keys()),n={op:5,ops:[]};for(const d of I){if(!(d instanceof w))throw new m(d.id);const l=p(d).controllerId;if(l!==a.controllerId)throw new t(d.id,l,a.controllerId);if(r.has(d.id))throw new E(d.id);r.set(d.id,d),c.delete(d.id),n.ops.push({op:0,item:d})}for(const d of c.keys())n.ops.push({op:3,id:d});a.listener?.(n),u=r},add(I){if(!(I instanceof w))throw new m(I.id);u.set(I.id,I),a.listener?.({op:0,item:I})},delete(I){u.delete(I)&&a.listener?.({op:3,id:I})},get(I){return u.get(I)},toJSON(){return Array.from(u.values())}}};e.createTestItemChildren=o}),define(De[92],Ce([1,0,67]),function(ne,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getPrivateApiFor=e.createPrivateApiFor=void 0;const D=new WeakMap,S=(y,A)=>{const _={controllerId:A};return D.set(y,_),_};e.createPrivateApiFor=S;const N=y=>{const A=D.get(y);if(!A)throw new i.InvalidTestItemError(y?.id||"");return A};e.getPrivateApiFor=N}),define(De[175],Ce([1,0,3]),function(ne,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.VariableError=e.VariableKind=e.IConfigurationResolverService=void 0,e.IConfigurationResolverService=(0,i.createDecorator)("configurationResolverService");var D;(function(N){N.Unknown="unknown",N.Env="env",N.Config="config",N.Command="command",N.Input="input",N.ExtensionInstallFolder="extensionInstallFolder",N.WorkspaceFolder="workspaceFolder",N.Cwd="cwd",N.WorkspaceFolderBasename="workspaceFolderBasename",N.UserHome="userHome",N.LineNumber="lineNumber",N.SelectedText="selectedText",N.File="file",N.FileWorkspaceFolder="fileWorkspaceFolder",N.RelativeFile="relativeFile",N.RelativeFileDirname="relativeFileDirname",N.FileDirname="fileDirname",N.FileExtname="fileExtname",N.FileBasename="fileBasename",N.FileBasenameNoExtension="fileBasenameNoExtension",N.FileDirnameBasename="fileDirnameBasename",N.ExecPath="execPath",N.ExecInstallFolder="execInstallFolder",N.PathSeparator="pathSeparator"})(D=e.VariableKind||(e.VariableKind={}));class S extends Error{constructor(y,A){super(A),this.variable=y}}e.VariableError=S}),define(De[176],Ce([1,0,19,48,9,23,21,82,143,175,10]),function(ne,e,i,D,S,N,y,A,_,T,O){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractVariableResolverService=void 0;class b{constructor(E,m,t,o){this._contributedVariables=new Map,this._context=E,this._labelService=m,this._userHomePromise=t,o&&(this._envVariablesPromise=o.then(a=>this.prepareEnv(a)))}prepareEnv(E){if(y.isWindows){const m=Object.create(null);return Object.keys(E).forEach(t=>{m[t.toLowerCase()]=E[t]}),m}return E}resolveWithEnvironment(E,m,t){return this.recursiveResolve({env:this.prepareEnv(E),userHome:void 0},m?m.uri:void 0,t)}async resolveAsync(E,m){const t={env:await this._envVariablesPromise,userHome:await this._userHomePromise};return this.recursiveResolve(t,E?E.uri:void 0,m)}async resolveAnyBase(E,m,t,o){const a=N.deepClone(m);y.isWindows&&a.windows?Object.keys(a.windows).forEach(w=>a[w]=a.windows[w]):y.isMacintosh&&a.osx?Object.keys(a.osx).forEach(w=>a[w]=a.osx[w]):y.isLinux&&a.linux&&Object.keys(a.linux).forEach(w=>a[w]=a.linux[w]),delete a.windows,delete a.osx,delete a.linux;const p={env:await this._envVariablesPromise,userHome:await this._userHomePromise};return this.recursiveResolve(p,E?E.uri:void 0,a,t,o)}async resolveAnyAsync(E,m,t){return this.resolveAnyBase(E,m,t)}async resolveAnyMap(E,m,t){const o=new Map;return{newConfig:await this.resolveAnyBase(E,m,t,o),resolvedVariables:o}}resolveWithInteractionReplace(E,m,t,o){throw new Error("resolveWithInteractionReplace not implemented.")}resolveWithInteraction(E,m,t,o){throw new Error("resolveWithInteraction not implemented.")}contributeVariable(E,m){if(this._contributedVariables.has(E))throw new Error("Variable "+E+" is contributed twice.");this._contributedVariables.set(E,m)}async recursiveResolve(E,m,t,o,a){if(S.isString(t))return this.resolveString(E,m,t,o,a);if(Array.isArray(t))return Promise.all(t.map(p=>this.recursiveResolve(E,m,p,o,a)));if(S.isObject(t)){const p=Object.create(null),w=await Promise.all(Object.keys(t).map(async u=>[await this.resolveString(E,m,u,o,a),await this.recursiveResolve(E,m,t[u],o,a)]));for(const[u,I]of w)p[u]=I;return p}return t}resolveString(E,m,t,o,a){return(0,O.replaceAsync)(t,b.VARIABLE_REGEXP,async(p,w)=>{if(w.includes(b.VARIABLE_LHS))return p;let u=await this.evaluateSingleVariable(E,p,w,m,o);return a?.set(w,u),u!==p&&S.isString(u)&&u.match(b.VARIABLE_REGEXP)&&(u=await this.resolveString(E,m,u,o,a)),u})}fsPath(E){return this._labelService?this._labelService.getUriLabel(E,{noPrefix:!0}):E.fsPath}async evaluateSingleVariable(E,m,t,o,a){let p;const w=t.split(":");w.length>1&&(t=w[0],p=w[1]);const u=c=>{const n=this._context.getFilePath();if(n)return n;throw new T.VariableError(c,(0,_.localize)(0,null,m))},I=c=>{const n=u(c);if(this._context.getWorkspaceFolderPathForFile){const d=this._context.getWorkspaceFolderPathForFile();if(d)return d}throw new T.VariableError(c,(0,_.localize)(1,null,m,i.basename(n)))},r=c=>{if(p){const n=this._context.getFolderUri(p);if(n)return n;throw new T.VariableError(c,(0,_.localize)(2,null,m,p))}if(o)return o;throw this._context.getWorkspaceFolderCount()>1?new T.VariableError(c,(0,_.localize)(3,null,m)):new T.VariableError(c,(0,_.localize)(4,null,m))};switch(t){case"env":if(p){if(E.env){const c=E.env[y.isWindows?p.toLowerCase():p];if(S.isString(c))return c}return""}throw new T.VariableError(T.VariableKind.Env,(0,_.localize)(5,null,m));case"config":if(p){const c=this._context.getConfigurationValue(o,p);if(S.isUndefinedOrNull(c))throw new T.VariableError(T.VariableKind.Config,(0,_.localize)(6,null,m,p));if(S.isObject(c))throw new T.VariableError(T.VariableKind.Config,(0,_.localize)(7,null,m,p));return c}throw new T.VariableError(T.VariableKind.Config,(0,_.localize)(8,null,m));case"command":return this.resolveFromMap(T.VariableKind.Command,m,p,a,"command");case"input":return this.resolveFromMap(T.VariableKind.Input,m,p,a,"input");case"extensionInstallFolder":if(p){const c=await this._context.getExtension(p);if(!c)throw new T.VariableError(T.VariableKind.ExtensionInstallFolder,(0,_.localize)(9,null,m,p));return this.fsPath(c.extensionLocation)}throw new T.VariableError(T.VariableKind.ExtensionInstallFolder,(0,_.localize)(10,null,m));default:switch(t){case"workspaceRoot":case"workspaceFolder":return(0,A.normalizeDriveLetter)(this.fsPath(r(T.VariableKind.WorkspaceFolder)));case"cwd":return o||p?(0,A.normalizeDriveLetter)(this.fsPath(r(T.VariableKind.Cwd))):D.cwd();case"workspaceRootFolderName":case"workspaceFolderBasename":return i.basename(this.fsPath(r(T.VariableKind.WorkspaceFolderBasename)));case"userHome":{if(E.userHome)return E.userHome;throw new T.VariableError(T.VariableKind.UserHome,(0,_.localize)(11,null,m))}case"lineNumber":{const c=this._context.getLineNumber();if(c)return c;throw new T.VariableError(T.VariableKind.LineNumber,(0,_.localize)(12,null,m))}case"selectedText":{const c=this._context.getSelectedText();if(c)return c;throw new T.VariableError(T.VariableKind.SelectedText,(0,_.localize)(13,null,m))}case"file":return u(T.VariableKind.File);case"fileWorkspaceFolder":return I(T.VariableKind.FileWorkspaceFolder);case"relativeFile":return o||p?i.relative(this.fsPath(r(T.VariableKind.RelativeFile)),u(T.VariableKind.RelativeFile)):u(T.VariableKind.RelativeFile);case"relativeFileDirname":{const c=i.dirname(u(T.VariableKind.RelativeFileDirname));if(o||p){const n=i.relative(this.fsPath(r(T.VariableKind.RelativeFileDirname)),c);return n.length===0?".":n}return c}case"fileDirname":return i.dirname(u(T.VariableKind.FileDirname));case"fileExtname":return i.extname(u(T.VariableKind.FileExtname));case"fileBasename":return i.basename(u(T.VariableKind.FileBasename));case"fileBasenameNoExtension":{const c=i.basename(u(T.VariableKind.FileBasenameNoExtension));return c.slice(0,c.length-i.extname(c).length)}case"fileDirnameBasename":return i.basename(i.dirname(u(T.VariableKind.FileDirnameBasename)));case"execPath":{const c=this._context.getExecPath();return c||m}case"execInstallFolder":{const c=this._context.getAppRoot();return c||m}case"pathSeparator":return i.sep;default:try{const c=p?`${t}:${p}`:t;return this.resolveFromMap(T.VariableKind.Unknown,m,c,a,void 0)}catch{return m}}}}resolveFromMap(E,m,t,o,a){if(t&&o){const p=a===void 0?o[t]:o[a+":"+t];if(typeof p=="string")return p;throw new T.VariableError(E,(0,_.localize)(14,null,m))}return m}}e.AbstractVariableResolverService=b,b.VARIABLE_LHS="${",b.VARIABLE_REGEXP=/\$\{(.*?)\}/g}),define(De[93],Ce([1,0,3,91]),function(ne,e,i,D){"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,i.createDecorator)("editorGroupsService");var S;(function(m){m[m.UP=0]="UP",m[m.DOWN=1]="DOWN",m[m.LEFT=2]="LEFT",m[m.RIGHT=3]="RIGHT"})(S=e.GroupDirection||(e.GroupDirection={}));var N;(function(m){m[m.HORIZONTAL=0]="HORIZONTAL",m[m.VERTICAL=1]="VERTICAL"})(N=e.GroupOrientation||(e.GroupOrientation={}));var y;(function(m){m[m.FIRST=0]="FIRST",m[m.LAST=1]="LAST",m[m.NEXT=2]="NEXT",m[m.PREVIOUS=3]="PREVIOUS"})(y=e.GroupLocation||(e.GroupLocation={}));var A;(function(m){m[m.MAXIMIZE=0]="MAXIMIZE",m[m.EVEN=1]="EVEN",m[m.TOGGLE=2]="TOGGLE"})(A=e.GroupsArrangement||(e.GroupsArrangement={}));var _;(function(m){m[m.COPY_EDITORS=0]="COPY_EDITORS",m[m.MOVE_EDITORS=1]="MOVE_EDITORS"})(_=e.MergeGroupMode||(e.MergeGroupMode={}));function T(m){const t=m;return(0,D.isEditorInput)(t?.editor)&&(0,D.isEditorInput)(t?.replacement)}e.isEditorReplacement=T;var O;(function(m){m[m.CREATION_TIME=0]="CREATION_TIME",m[m.MOST_RECENTLY_ACTIVE=1]="MOST_RECENTLY_ACTIVE",m[m.GRID_APPEARANCE=2]="GRID_APPEARANCE"})(O=e.GroupsOrder||(e.GroupsOrder={}));var b;(function(m){m[m.NEW_EDITOR=1]="NEW_EDITOR",m[m.MOVE_EDITOR=2]="MOVE_EDITOR",m[m.COPY_EDITOR=3]="COPY_EDITOR"})(b=e.OpenEditorContext||(e.OpenEditorContext={}));function g(m){const t=m;return!!t&&typeof t.id=="number"&&Array.isArray(t.editors)}e.isEditorGroup=g;function E(m){return m.getValue("workbench.editor.openSideBySideDirection")==="down"?1:3}e.preferredSideBySideGroupDirection=E}),define(De[177],Ce([1,0,3,93]),function(ne,e,i,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isPreferredGroup=e.SIDE_GROUP=e.ACTIVE_GROUP=e.IEditorService=void 0,e.IEditorService=(0,i.createDecorator)("editorService"),e.ACTIVE_GROUP=-1,e.SIDE_GROUP=-2;function S(N){const y=N;return typeof N=="number"||(0,D.isEditorGroup)(y)}e.isPreferredGroup=S}),define(De[178],Ce([1,0,3,148]),function(ne,e,i,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IWorkbenchEnvironmentService=void 0,e.IWorkbenchEnvironmentService=(0,i.refineServiceDecorator)(D.IEnvironmentService)}),define(De[179],Ce([1,0,25,4,19]),function(ne,e,i,D,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtensionDescriptionRegistry=e.DeltaExtensionsResult=void 0;class N{constructor(b){this.removedDueToLooping=b}}e.DeltaExtensionsResult=N;class y{constructor(b){this._onDidChange=new D.Emitter,this.onDidChange=this._onDidChange.event,this._extensionDescriptions=b,this._initialize()}_initialize(){this._extensionDescriptions.sort(_),this._extensionsMap=new Map,this._extensionsArr=[],this._activationMap=new Map;for(const b of this._extensionDescriptions){if(this._extensionsMap.has(i.ExtensionIdentifier.toKey(b.identifier))){console.error("Extension `"+b.identifier.value+"` is already registered");continue}if(this._extensionsMap.set(i.ExtensionIdentifier.toKey(b.identifier),b),this._extensionsArr.push(b),Array.isArray(b.activationEvents))for(let g of b.activationEvents)g==="onUri"&&(g=`onUri:${i.ExtensionIdentifier.toKey(b.identifier)}`),this._activationMap.has(g)||this._activationMap.set(g,[]),this._activationMap.get(g).push(b)}}set(b){this._extensionDescriptions=b,this._initialize(),this._onDidChange.fire(void 0)}deltaExtensions(b,g){this._extensionDescriptions=T(this._extensionDescriptions,g),this._extensionDescriptions=this._extensionDescriptions.concat(b);const E=y._findLoopingExtensions(this._extensionDescriptions);return this._extensionDescriptions=T(this._extensionDescriptions,E.map(m=>m.identifier)),this._initialize(),this._onDidChange.fire(void 0),new N(E)}static _findLoopingExtensions(b){const g=new class{constructor(){this._arcs=new Map,this._nodesSet=new Set,this._nodesArr=[]}addNode(a){this._nodesSet.has(a)||(this._nodesSet.add(a),this._nodesArr.push(a))}addArc(a,p){this.addNode(a),this.addNode(p),this._arcs.has(a)?this._arcs.get(a).push(p):this._arcs.set(a,[p])}getArcs(a){return this._arcs.has(a)?this._arcs.get(a):[]}hasOnlyGoodArcs(a,p){const w=g.getArcs(a);for(let u=0;ug.getArcs(a).length===0).forEach(a=>m.add(a));const t=g.getNodes().filter(a=>!m.has(a));let o;do{o=!1;for(let a=0;aE.get(a))}containsActivationEvent(b){return this._activationMap.has(b)}containsExtension(b){return this._extensionsMap.has(i.ExtensionIdentifier.toKey(b))}getExtensionDescriptionsForActivationEvent(b){const g=this._activationMap.get(b);return g?g.slice(0):[]}getAllExtensionDescriptions(){return this._extensionsArr.slice(0)}getExtensionDescription(b){const g=this._extensionsMap.get(i.ExtensionIdentifier.toKey(b));return g||void 0}getExtensionDescriptionByUUID(b){for(const g of this._extensionsArr)if(g.uuid===b)return g}getExtensionDescriptionByIdOrUUID(b,g){return this.getExtensionDescription(b)??(g?this.getExtensionDescriptionByUUID(g):void 0)}}e.ExtensionDescriptionRegistry=y;var A;(function(O){O[O.Builtin=0]="Builtin",O[O.User=1]="User",O[O.Dev=2]="Dev"})(A||(A={}));function _(O,b){const g=O.isBuiltin?0:O.isUnderDevelopment?2:1,E=b.isBuiltin?0:b.isUnderDevelopment?2:1;if(g!==E)return g-E;const m=S.posix.basename(O.extensionLocation.path),t=S.posix.basename(b.extensionLocation.path);return mt?1:0}function T(O,b){const g=new Set;return b.forEach(E=>g.add(i.ExtensionIdentifier.toKey(E))),O.filter(E=>!g.has(i.ExtensionIdentifier.toKey(E.identifier)))}}),define(De[68],Ce([1,0,24]),function(ne,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NativeLogMarkers=e.isMessageOfType=e.createMessageOfType=e.MessageType=e.ExtensionHostExitCode=e.UIKind=void 0;var D;(function(T){T[T.Desktop=1]="Desktop",T[T.Web=2]="Web"})(D=e.UIKind||(e.UIKind={}));var S;(function(T){T[T.VersionMismatch=55]="VersionMismatch",T[T.UnexpectedError=81]="UnexpectedError"})(S=e.ExtensionHostExitCode||(e.ExtensionHostExitCode={}));var N;(function(T){T[T.Initialized=0]="Initialized",T[T.Ready=1]="Ready",T[T.Terminate=2]="Terminate"})(N=e.MessageType||(e.MessageType={}));function y(T){const O=i.VSBuffer.alloc(1);switch(T){case 0:O.writeUInt8(1,0);break;case 1:O.writeUInt8(2,0);break;case 2:O.writeUInt8(3,0);break}return O}e.createMessageOfType=y;function A(T,O){if(T.byteLength!==1)return!1;switch(T.readUInt8(0)){case 1:return O===0;case 2:return O===1;case 3:return O===2;default:return!1}}e.isMessageOfType=A;var _;(function(T){T.Start="START_NATIVE_LOG",T.End="END_NATIVE_LOG"})(_=e.NativeLogMarkers||(e.NativeLogMarkers={}))}),define(De[69],Ce([1,0,3,4,11,26,68,61,158,23,2]),function(ne,e,i,D,S,N,y,A,_,T,O){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IExtHostTelemetry=e.isNewAppInstall=e.ExtHostTelemetryLogger=e.ExtHostTelemetry=void 0;let b=class{constructor(t,o){this.initData=t,this._onDidChangeTelemetryEnabled=new D.Emitter,this.onDidChangeTelemetryEnabled=this._onDidChangeTelemetryEnabled.event,this._onDidChangeTelemetryConfiguration=new D.Emitter,this.onDidChangeTelemetryConfiguration=this._onDidChangeTelemetryConfiguration.event,this._productConfig={usage:!0,error:!0},this._level=0,this._telemetryLoggers=new Map,this._outputLogger=o.createLogger(O.URI.revive(this.initData.environment.extensionTelemetryLogResource)),this._outputLogger.info("Below are logs for extension telemetry events sent to the telemetry output channel API once the log level is set to trace."),this._outputLogger.info("===========================================================")}getTelemetryConfiguration(){return this._level===3}getTelemetryDetails(){return{isCrashEnabled:this._level>=1,isErrorsEnabled:this._productConfig.error?this._level>=2:!1,isUsageEnabled:this._productConfig.usage?this._level>=3:!1}}instantiateLogger(t,o){const a=this.getTelemetryDetails(),p=new g(o,t,this._outputLogger,this.getBuiltInCommonProperties(t),{isUsageEnabled:a.isUsageEnabled,isErrorsEnabled:a.isErrorsEnabled});return this._telemetryLoggers.set(t.identifier.value,p),p.apiTelemetryLogger}$initializeTelemetryLevel(t,o){this._level=t,this._productConfig=o||{usage:!0,error:!0}}getBuiltInCommonProperties(t){const o={};switch(o["common.extname"]=t.name,o["common.extversion"]=t.version,o["common.vscodemachineid"]=this.initData.telemetryInfo.machineId,o["common.vscodesessionid"]=this.initData.telemetryInfo.sessionId,o["common.vscodeversion"]=this.initData.version,o["common.isnewappinstall"]=E(this.initData.telemetryInfo.firstSessionDate),o["common.product"]=this.initData.environment.appHost,this.initData.uiKind){case y.UIKind.Web:o["common.uikind"]="web";break;case y.UIKind.Desktop:o["common.uikind"]="desktop";break;default:o["common.uikind"]="unknown"}return o["common.remotename"]=(0,A.getRemoteName)((0,_.cleanRemoteAuthority)(this.initData.remote.authority)),o}$onDidChangeTelemetryLevel(t){this._oldTelemetryEnablement=this.getTelemetryConfiguration(),this._level=t;const o=this.getTelemetryDetails();this._telemetryLoggers.forEach(a=>{a.updateTelemetryEnablements(o.isUsageEnabled,o.isErrorsEnabled)}),this._oldTelemetryEnablement!==this.getTelemetryConfiguration()&&this._onDidChangeTelemetryEnabled.fire(this.getTelemetryConfiguration()),this._onDidChangeTelemetryConfiguration.fire(this.getTelemetryDetails())}onExtensionError(t,o){const a=this._telemetryLoggers.get(t.value);return a?(a.logError(o),!0):!1}};b=He([We(0,N.IExtHostInitDataService),We(1,S.ILoggerService)],b),e.ExtHostTelemetry=b;class g{constructor(t,o,a,p,w){this._extension=o,this._logger=a,this._commonProperties=p,this._onDidChangeEnableStates=new D.Emitter,this._appender=t,this._telemetryEnablements={isUsageEnabled:w.isUsageEnabled,isErrorsEnabled:w.isErrorsEnabled}}updateTelemetryEnablements(t,o){this._apiObject&&(this._telemetryEnablements={isUsageEnabled:t,isErrorsEnabled:o},this._onDidChangeEnableStates.fire(this._apiObject))}mixInCommonPropsAndCleanData(t){return this._appender.ignoreBuiltInCommonProperties||(t=(0,T.mixin)(t,this._commonProperties)),this._appender.additionalCommonProperties&&(t=(0,T.mixin)(t,this._appender.additionalCommonProperties)),t=(0,_.cleanData)(t,[]),t}logEvent(t,o){t=this._extension.identifier.value+"/"+t,o=this.mixInCommonPropsAndCleanData(o||{}),this._appender.logEvent(t,o),this._logger.trace(t,o)}logUsage(t,o){!this._telemetryEnablements.isUsageEnabled||this.logEvent(t,o)}logError(t,o){!this._telemetryEnablements.isErrorsEnabled||(typeof t=="string"?this.logEvent(t,o):this._appender.logException(t,o))}get apiTelemetryLogger(){if(!this._apiObject){const t=this,o={logUsage:t.logUsage.bind(t),get isUsageEnabled(){return t._telemetryEnablements.isUsageEnabled},get isErrorsEnabled(){return t._telemetryEnablements.isErrorsEnabled},logError:t.logError.bind(t),dispose:t.dispose.bind(t),onDidChangeEnableStates:t._onDidChangeEnableStates.event.bind(t)};this._apiObject=Object.freeze(o)}return this._apiObject}dispose(){this._appender?.flush&&this._appender.flush()}}e.ExtHostTelemetryLogger=g;function E(m){const t=Date.now()-new Date(m).getTime();return isNaN(t)?!1:t<1e3*60*60*24}e.isNewAppInstall=E,e.IExtHostTelemetry=(0,i.createDecorator)("IExtHostTelemetry")}),define(De[27],Ce([1,0,4,2,3,25,155]),function(ne,e,i,D,S,N,y){"use strict";var A;Object.defineProperty(e,"__esModule",{value:!0}),e.NullExtensionService=e.toExtensionDescription=e.toExtension=e.ActivationKind=e.webWorkerExtHostLog=e.remoteExtHostLog=e.localExtHostLog=e.ExtensionHostLogFileName=e.ExtensionPointContribution=e.ActivationTimes=e.checkProposedApiEnabled=e.isProposedApiEnabled=e.extensionIdentifiersArrayToSet=e.ExtensionIdentifierSet=e.ExtensionHostExtensions=e.extensionHostKindToString=e.ExtensionHostKind=e.MissingExtensionDependency=e.RemoteRunningLocation=e.LocalWebWorkerRunningLocation=e.LocalProcessRunningLocation=e.IExtensionService=e.webWorkerExtHostConfig=e.nullExtensionDescription=void 0,e.nullExtensionDescription=Object.freeze({identifier:new N.ExtensionIdentifier("nullExtensionDescription"),name:"Null Extension Description",version:"0.0.0",publisher:"vscode",engines:{vscode:""},extensionLocation:D.URI.parse("void:location"),isBuiltin:!1,targetPlatform:"undefined",isUserBuiltin:!1,isUnderDevelopment:!1}),e.webWorkerExtHostConfig="extensions.webWorker",e.IExtensionService=(0,S.createDecorator)("extensionService");class _{constructor(f){this.affinity=f,this.kind=1}equals(f){return this.kind===f.kind&&this.affinity===f.affinity}asString(){return this.affinity===0?"LocalProcess":`LocalProcess${this.affinity}`}}e.LocalProcessRunningLocation=_;class T{constructor(f){this.affinity=f,this.kind=2}equals(f){return this.kind===f.kind&&this.affinity===f.affinity}asString(){return this.affinity===0?"LocalWebWorker":`LocalWebWorker${this.affinity}`}}e.LocalWebWorkerRunningLocation=T;class O{constructor(){this.kind=3,this.affinity=0}equals(f){return this.kind===f.kind}asString(){return"Remote"}}e.RemoteRunningLocation=O;class b{constructor(f){this.dependency=f}}e.MissingExtensionDependency=b;var g;(function(l){l[l.LocalProcess=1]="LocalProcess",l[l.LocalWebWorker=2]="LocalWebWorker",l[l.Remote=3]="Remote"})(g=e.ExtensionHostKind||(e.ExtensionHostKind={}));function E(l){if(l===null)return"None";switch(l){case 1:return"LocalProcess";case 2:return"LocalWebWorker";case 3:return"Remote"}}e.extensionHostKindToString=E;class m{constructor(){this._allExtensions=[],this._myExtensions=[]}toDelta(){return{toRemove:[],toAdd:this._allExtensions,myToRemove:[],myToAdd:this._myExtensions}}set(f,s){const h=[],v=[],k=[],F=[],j=a(this._allExtensions),W=a(f),H=(B,$)=>B.extensionLocation.toString()===$.extensionLocation.toString()||B.isBuiltin===$.isBuiltin||B.isUserBuiltin===$.isUserBuiltin||B.isUnderDevelopment===$.isUnderDevelopment;for(const B of this._allExtensions){const $=W.get(N.ExtensionIdentifier.toKey(B.identifier));if(!$){h.push(B.identifier),j.delete(N.ExtensionIdentifier.toKey(B.identifier));continue}if(!H(B,$)){h.push(B.identifier),j.delete(N.ExtensionIdentifier.toKey(B.identifier));continue}}for(const B of f){const $=j.get(N.ExtensionIdentifier.toKey(B.identifier));if(!$){v.push(B);continue}if(!H($,B)){h.push($.identifier),j.delete(N.ExtensionIdentifier.toKey($.identifier));continue}}const P=o(this._myExtensions),M=o(s);for(const B of this._myExtensions)M.has(N.ExtensionIdentifier.toKey(B))||k.push(B);for(const B of s)P.has(N.ExtensionIdentifier.toKey(B))||F.push(B);const R={toRemove:h,toAdd:v,myToRemove:k,myToAdd:F};return this.delta(R),R}delta(f){const{toRemove:s,toAdd:h,myToRemove:v,myToAdd:k}=f,F=o(s),j=o(v);for(let W=0;Wf.call(s,h,h,this))}*entries(){for(const[f,s]of this._map)yield[s,s]}keys(){return this._map.values()}values(){return this._map.values()}[(A=Symbol.toStringTag,Symbol.iterator)](){return this._map.values()}}e.ExtensionIdentifierSet=t;function o(l){const f=new Set;for(const s of l)f.add(N.ExtensionIdentifier.toKey(s));return f}e.extensionIdentifiersArrayToSet=o;function a(l){const f=new Map;for(const s of l)f.set(N.ExtensionIdentifier.toKey(s.identifier),s);return f}function p(l,f){return l.enabledApiProposals?l.enabledApiProposals.includes(f):!1}e.isProposedApiEnabled=p;function w(l,f){if(!p(l,f))throw new Error(`Extension '${l.identifier.value}' CANNOT use API proposal: ${f}. Its package.json#enabledApiProposals-property declares: ${l.enabledApiProposals?.join(", ")??"[]"} but NOT ${f}. The missing proposal MUST be added and you must start in extension development mode or use the following command line switch: --enable-proposed-api ${l.identifier.value}`)}e.checkProposedApiEnabled=w;class u{constructor(f,s,h,v){this.codeLoadingTime=f,this.activateCallTime=s,this.activateResolvedTime=h,this.activationReason=v}}e.ActivationTimes=u;class I{constructor(f,s){this.description=f,this.value=s}}e.ExtensionPointContribution=I,e.ExtensionHostLogFileName="exthost",e.localExtHostLog="extHostLog",e.remoteExtHostLog="remoteExtHostLog",e.webWorkerExtHostLog="webWorkerExtHostLog";var r;(function(l){l[l.Normal=0]="Normal",l[l.Immediate=1]="Immediate"})(r=e.ActivationKind||(e.ActivationKind={}));function c(l){return{type:l.isBuiltin?0:1,isBuiltin:l.isBuiltin||l.isUserBuiltin,identifier:{id:(0,y.getGalleryExtensionId)(l.publisher,l.name),uuid:l.uuid},manifest:l,location:l.extensionLocation,targetPlatform:l.targetPlatform,validations:[],isValid:!0}}e.toExtension=c;function n(l,f){return{identifier:new N.ExtensionIdentifier((0,y.getExtensionId)(l.manifest.publisher,l.manifest.name)),isBuiltin:l.type===0,isUserBuiltin:l.type===1&&l.isBuiltin,isUnderDevelopment:!!f,extensionLocation:l.location,...l.manifest,uuid:l.identifier.uuid,targetPlatform:l.targetPlatform,browserNlsBundleUris:l.browserNlsBundleUris}}e.toExtensionDescription=n;class d{constructor(){this.onDidRegisterExtensions=i.Event.None,this.onDidChangeExtensionsStatus=i.Event.None,this.onDidChangeExtensions=i.Event.None,this.onWillActivateByEvent=i.Event.None,this.onDidChangeResponsiveChange=i.Event.None,this.extensions=[]}activateByEvent(f){return Promise.resolve(void 0)}activationEventIsDone(f){return!1}whenInstalledExtensionsRegistered(){return Promise.resolve(!0)}getExtension(){return Promise.resolve(void 0)}readExtensionPointContributions(f){return Promise.resolve(Object.create(null))}getExtensionsStatus(){return Object.create(null)}getInspectPort(f,s){return Promise.resolve(0)}getInspectPorts(f,s){return Promise.resolve([])}stopExtensionHosts(){}async restartExtensionHost(){}async startExtensionHosts(){}async setRemoteEnvironment(f){}canAddExtension(){return!1}canRemoveExtension(){return!1}_activateById(f,s){return Promise.resolve()}}e.NullExtensionService=d}),define(De[180],Ce([1,0,12,25,27,11,15]),function(ne,e,i,D,S,N,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtensionsActivator=e.FailedExtension=e.HostExtension=e.EmptyExtension=e.ActivatedExtension=e.ExtensionActivationTimesBuilder=e.ExtensionActivationTimes=void 0;class A{constructor(o,a,p,w){this.startup=o,this.codeLoadingTime=a,this.activateCallTime=p,this.activateResolvedTime=w}}e.ExtensionActivationTimes=A,A.NONE=new A(!1,-1,-1,-1);class _{constructor(o){this._startup=o,this._codeLoadingStart=-1,this._codeLoadingStop=-1,this._activateCallStart=-1,this._activateCallStop=-1,this._activateResolveStart=-1,this._activateResolveStop=-1}_delta(o,a){return o===-1||a===-1?-1:a-o}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=_;class T{constructor(o,a,p,w,u,I){this.activationFailed=o,this.activationFailedError=a,this.activationTimes=p,this.module=w,this.exports=u,this.subscriptions=I}}e.ActivatedExtension=T;class O extends T{constructor(o){super(!1,null,o,{activate:void 0,deactivate:void 0},void 0,[])}}e.EmptyExtension=O;class b extends T{constructor(){super(!1,null,A.NONE,{activate:void 0,deactivate:void 0},void 0,[])}}e.HostExtension=b;class g extends T{constructor(o){super(!0,o,A.NONE,{activate:void 0,deactivate:void 0},void 0,[])}}e.FailedExtension=g;let E=class{constructor(o,a,p,w,u){this._logService=u,this._registry=o,this._resolvedExtensionsSet=new Set,a.forEach(I=>this._resolvedExtensionsSet.add(D.ExtensionIdentifier.toKey(I))),this._externalExtensionsMap=new Map,p.forEach(I=>this._externalExtensionsMap.set(D.ExtensionIdentifier.toKey(I),I)),this._host=w,this._operations=new Map,this._alreadyActivatedEvents=Object.create(null)}dispose(){for(const[o,a]of this._operations)a.dispose()}isActivated(o){const a=this._operations.get(D.ExtensionIdentifier.toKey(o));return Boolean(a&&a.value)}getActivatedExtension(o){const a=this._operations.get(D.ExtensionIdentifier.toKey(o));if(!a||!a.value)throw new Error(`Extension '${o.value}' is not known or not activated`);return a.value}async activateByEvent(o,a){if(this._alreadyActivatedEvents[o])return;const p=this._registry.getExtensionDescriptionsForActivationEvent(o);await this._activateExtensions(p.map(w=>({id:w.identifier,reason:{startup:a,extensionId:w.identifier,activationEvent:o}}))),this._alreadyActivatedEvents[o]=!0}activateById(o,a){const p=this._registry.getExtensionDescription(o);if(!p)throw new Error(`Extension '${o}' is not known`);return this._activateExtensions([{id:p.identifier,reason:a}])}async _activateExtensions(o){const a=o.filter(p=>!this.isActivated(p.id)).map(p=>this._handleActivationRequest(p));await Promise.all(a.map(p=>p.wait()))}_handleActivationRequest(o){if(this._operations.has(D.ExtensionIdentifier.toKey(o.id)))return this._operations.get(D.ExtensionIdentifier.toKey(o.id));if(this._externalExtensionsMap.has(D.ExtensionIdentifier.toKey(o.id)))return this._createAndSaveOperation(o,null,[],null);const a=this._registry.getExtensionDescription(o.id);if(!a){const u=new Error(`Cannot activate unknown extension '${o.id.value}'`),I=this._createAndSaveOperation(o,null,[],new g(u));return this._host.onExtensionActivationError(o.id,u,new S.MissingExtensionDependency(o.id.value)),I}const p=[],w=typeof a.extensionDependencies>"u"?[]:a.extensionDependencies;for(const u of w){if(this._resolvedExtensionsSet.has(D.ExtensionIdentifier.toKey(u)))continue;const I=this._operations.get(D.ExtensionIdentifier.toKey(u));if(I){p.push(I);continue}if(this._externalExtensionsMap.has(D.ExtensionIdentifier.toKey(u))){p.push(this._handleActivationRequest({id:this._externalExtensionsMap.get(D.ExtensionIdentifier.toKey(u)),reason:o.reason}));continue}const r=this._registry.getExtensionDescription(u);if(r){if(!r.main&&!r.browser)continue;p.push(this._handleActivationRequest({id:r.identifier,reason:o.reason}));continue}const c=a.displayName||a.identifier.value,n=new Error(`Cannot activate the '${c}' extension because it depends on unknown extension '${u}'`),d=this._createAndSaveOperation(o,a.displayName,[],new g(n));return this._host.onExtensionActivationError(a.identifier,n,new S.MissingExtensionDependency(u)),d}return this._createAndSaveOperation(o,a.displayName,p,null)}_createAndSaveOperation(o,a,p,w){const u=new m(o.id,a,o.reason,p,w,this._host,this._logService);return this._operations.set(D.ExtensionIdentifier.toKey(o.id),u),u}};E=He([We(4,N.ILogService)],E),e.ExtensionsActivator=E;let m=class{get value(){return this._value}get friendlyName(){return this._displayName||this._id.value}constructor(o,a,p,w,u,I,r){this._id=o,this._displayName=a,this._reason=p,this._deps=w,this._value=u,this._host=I,this._logService=r,this._barrier=new y.Barrier,this._isDisposed=!1,this._initialize()}dispose(){this._isDisposed=!0}wait(){return this._barrier.wait()}async _initialize(){await this._waitForDepsThenActivate(),this._barrier.open()}async _waitForDepsThenActivate(){if(!this._value){for(;this._deps.length>0;){for(let o=0;o0&&await Promise.race(this._deps.map(o=>o.wait()))}await this._activate()}}async _activate(){try{this._value=await this._host.actualActivateExtension(this._id,this._reason)}catch(o){const a=new Error;if(o&&o.name&&(a.name=o.name),o&&o.message?a.message=`Activating extension '${this._id.value}' failed: ${o.message}.`:a.message=`Activating extension '${this._id.value}' failed: ${o}.`,o&&o.stack&&(a.stack=o.stack),this._value=new g(a),this._isDisposed&&i.isCancellationError(o))return;this._host.onExtensionActivationError(this._id,a,null),this._logService.error(`Activating extension ${this._id.value} failed due to an error:`),this._logService.error(o)}}};m=He([We(6,N.ILogService)],m)}),define(De[181],Ce([1,0,11,26,27]),function(ne,e,i,D,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtHostLogService=void 0;let N=class extends i.LogService{constructor(A,_){super(A.createLogger(_.logFile,{name:S.ExtensionHostLogFileName}))}};N=He([We(0,i.ILoggerService),We(1,D.IExtHostInitDataService)],N),e.ExtHostLogService=N});var Je=this&&this.__classPrivateFieldSet||function(ne,e,i,D,S){if(D==="m")throw new TypeError("Private method is not writable");if(D==="a"&&!S)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?ne!==e||!S:!e.has(ne))throw new TypeError("Cannot write private member to an object whose class did not declare it");return D==="a"?S.call(ne,i):S?S.value=i:e.set(ne,i),i},Re=this&&this.__classPrivateFieldGet||function(ne,e,i,D){if(i==="a"&&!D)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?ne!==e||!D:!e.has(ne))throw new TypeError("Cannot read private member from an object whose class did not declare it");return i==="m"?D:i==="a"?D.call(ne):D?D.value:e.get(ne)};define(De[6],Ce([1,0,18,12,81,28,79,10,9,2,38,35,90,66,27]),function(ne,e,i,D,S,N,y,A,_,T,O,b,g,E,m){"use strict";var t,o,a,p,w,u,I,r,c,n,d,l,f,s,h,v,k,F,j,W,H,P,M;Object.defineProperty(e,"__esModule",{value:!0}),e.InteractiveWindowInput=e.TerminalEditorTabInput=e.NotebookDiffEditorTabInput=e.NotebookEditorTabInput=e.WebviewEditorTabInput=e.CustomEditorTabInput=e.TextMergeTabInput=e.TextDiffTabInput=e.TextTabInput=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.NotebookControllerAffinity2=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.InputBoxValidationSeverity=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.InlineCompletionTriggerKindNew=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.DocumentPasteEdit=e.DocumentDropEdit=e.DataTransfer=e.DataTransferItem=e.TreeItemCheckboxState=e.TreeItemCollapsibleState=e.TreeItem=e.ViewBadge=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.TerminalExitReason=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.InlineSuggestionsNew=e.InlineSuggestionNew=e.InlineSuggestionList=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.SnippetTextEdit=e.NotebookEdit=e.TextEdit=e.EnvironmentVariableMutatorType=e.EndOfLine=e.RemoteAuthorityResolverError=e.ResolvedAuthority=e.Selection=e.Range=e.Position=e.Disposable=void 0;function R(x){return Object.assign(x,{apply:function(){const ie=arguments.length===1?[]:arguments[1];return Reflect.construct(x,ie,arguments[0].constructor)},call:function(){if(arguments.length===0)return Reflect.construct(x,[]);{const[ie,...we]=arguments;return Reflect.construct(x,we,ie.constructor)}}})}let B=u=class{static from(...L){let ie=L;return new u(function(){if(ie){for(const we of ie)we&&typeof we.dispose=="function"&&we.dispose();ie=void 0}})}constructor(L){t.set(this,void 0),Je(this,t,L,"f")}dispose(){typeof Re(this,t,"f")=="function"&&(Re(this,t,"f").call(this),Je(this,t,void 0,"f"))}};t=new WeakMap,B=u=He([R],B),e.Disposable=B;let $=I=class{static Min(...L){if(L.length===0)throw new TypeError;let ie=L[0];for(let we=1;weL.line?1:this._characterL._character?1:0}translate(L,ie=0){if(L===null||ie===null)throw(0,D.illegalArgument)();let we;return typeof L>"u"?we=0:typeof L=="number"?we=L:(we=typeof L.lineDelta=="number"?L.lineDelta:0,ie=typeof L.characterDelta=="number"?L.characterDelta:0),we===0&&ie===0?this:new I(this.line+we,this.character+ie)}with(L,ie=this.character){if(L===null||ie===null)throw(0,D.illegalArgument)();let we;return typeof L>"u"?we=this.line:typeof L=="number"?we=L:(we=typeof L.line=="number"?L.line:this.line,ie=typeof L.character=="number"?L.character:this.character),we===this.line&&ie===this.character?this:new I(we,ie)}toJSON(){return{line:this.line,character:this.character}}};$=I=He([R],$),e.Position=$;let U=r=class{static isRange(L){return L instanceof r?!0:L?$.isPosition(L.start)&&$.isPosition(L.end):!1}static of(L){if(L instanceof r)return L;if(this.isRange(L))return new r(L.start,L.end);throw new Error("Invalid argument, is NOT a range-like object")}get start(){return this._start}get end(){return this._end}constructor(L,ie,we,Ve){let Ye,at;if(typeof L=="number"&&typeof ie=="number"&&typeof we=="number"&&typeof Ve=="number"?(Ye=new $(L,ie),at=new $(we,Ve)):$.isPosition(L)&&$.isPosition(ie)&&(Ye=$.of(L),at=$.of(ie)),!Ye||!at)throw new Error("Invalid arguments");Ye.isBefore(at)?(this._start=Ye,this._end=at):(this._start=at,this._end=Ye)}contains(L){return r.isRange(L)?this.contains(L.start)&&this.contains(L.end):$.isPosition(L)?!($.of(L).isBefore(this._start)||this._end.isBefore(L)):!1}isEqual(L){return this._start.isEqual(L._start)&&this._end.isEqual(L._end)}intersection(L){const ie=$.Max(L.start,this._start),we=$.Min(L.end,this._end);if(!ie.isAfter(we))return new r(ie,we)}union(L){if(this.contains(L))return this;if(L.contains(this))return L;const ie=$.Min(L.start,this._start),we=$.Max(L.end,this.end);return new r(ie,we)}get isEmpty(){return this._start.isEqual(this._end)}get isSingleLine(){return this._start.line===this._end.line}with(L,ie=this.end){if(L===null||ie===null)throw(0,D.illegalArgument)();let we;return L?$.isPosition(L)?we=L:(we=L.start||this.start,ie=L.end||this.end):we=this.start,we.isEqual(this._start)&&ie.isEqual(this.end)?this:new r(we,ie)}toJSON(){return[this.start,this.end]}};U=r=He([R],U),e.Range=U;let K=c=class extends U{static isSelection(L){return L instanceof c?!0:L?U.isRange(L)&&$.isPosition(L.anchor)&&$.isPosition(L.active)&&typeof L.isReversed=="boolean":!1}get anchor(){return this._anchor}get active(){return this._active}constructor(L,ie,we,Ve){let Ye,at;if(typeof L=="number"&&typeof ie=="number"&&typeof we=="number"&&typeof Ve=="number"?(Ye=new $(L,ie),at=new $(we,Ve)):$.isPosition(L)&&$.isPosition(ie)&&(Ye=$.of(L),at=$.of(ie)),!Ye||!at)throw new Error("Invalid arguments");super(Ye,at),this._anchor=Ye,this._active=at}get isReversed(){return this._anchor===this._end}toJSON(){return{start:this.start,end:this.end,active:this.active,anchor:this.anchor}}};K=c=He([R],K),e.Selection=K;class te{constructor(L,ie,we){if(typeof L!="string"||L.length===0)throw(0,D.illegalArgument)("host");if(typeof ie!="number"||ie===0||Math.round(ie)!==ie)throw(0,D.illegalArgument)("port");if(typeof we<"u"&&(typeof we!="string"||we.length===0||!/^[0-9A-Za-z\-]+$/.test(we)))throw(0,D.illegalArgument)("connectionToken");this.host=L,this.port=Math.round(ie),this.connectionToken=we}}e.ResolvedAuthority=te;class de extends Error{static NotAvailable(L,ie){return new de(L,g.RemoteAuthorityResolverErrorCode.NotAvailable,ie)}static TemporarilyNotAvailable(L){return new de(L,g.RemoteAuthorityResolverErrorCode.TemporarilyNotAvailable)}constructor(L,ie=g.RemoteAuthorityResolverErrorCode.Unknown,we){super(L),this._message=L,this._code=ie,this._detail=we,typeof Object.setPrototypeOf=="function"&&Object.setPrototypeOf(this,de.prototype)}}e.RemoteAuthorityResolverError=de;var re;(function(x){x[x.LF=1]="LF",x[x.CRLF=2]="CRLF"})(re=e.EndOfLine||(e.EndOfLine={}));var be;(function(x){x[x.Replace=1]="Replace",x[x.Append=2]="Append",x[x.Prepend=3]="Prepend"})(be=e.EnvironmentVariableMutatorType||(e.EnvironmentVariableMutatorType={}));let le=n=class{static isTextEdit(L){return L instanceof n?!0:L?U.isRange(L)&&typeof L.newText=="string":!1}static replace(L,ie){return new n(L,ie)}static insert(L,ie){return n.replace(new U(L,L),ie)}static delete(L){return n.replace(L,"")}static setEndOfLine(L){const ie=new n(new U(new $(0,0),new $(0,0)),"");return ie.newEol=L,ie}get range(){return this._range}set range(L){if(L&&!U.isRange(L))throw(0,D.illegalArgument)("range");this._range=L}get newText(){return this._newText||""}set newText(L){if(L&&typeof L!="string")throw(0,D.illegalArgument)("newText");this._newText=L}get newEol(){return this._newEol}set newEol(L){if(L&&typeof L!="number")throw(0,D.illegalArgument)("newEol");this._newEol=L}constructor(L,ie){this._range=L,this._newText=ie}toJSON(){return{range:this.range,newText:this.newText,newEol:this._newEol}}};le=n=He([R],le),e.TextEdit=le;let fe=d=class{static isNotebookCellEdit(L){return L instanceof d?!0:L?jt.isNotebookRange(L)&&Array.isArray(L.newCells):!1}static replaceCells(L,ie){return new d(L,ie)}static insertCells(L,ie){return new d(new jt(L,L),ie)}static deleteCells(L){return new d(L,[])}static updateCellMetadata(L,ie){const we=new d(new jt(L,L),[]);return we.newCellMetadata=ie,we}static updateNotebookMetadata(L){const ie=new d(new jt(0,0),[]);return ie.newNotebookMetadata=L,ie}constructor(L,ie){this.range=L,this.newCells=ie}};fe=d=He([R],fe),e.NotebookEdit=fe;class Y{static isSnippetTextEdit(L){return L instanceof Y?!0:L?U.isRange(L.range)&&Oe.isSnippetString(L.snippet):!1}static replace(L,ie){return new Y(L,ie)}static insert(L,ie){return Y.replace(new U(L,L),ie)}constructor(L,ie){this.range=L,this.snippet=ie}}e.SnippetTextEdit=Y;var ge;(function(x){x[x.File=1]="File",x[x.Text=2]="Text",x[x.Cell=3]="Cell",x[x.CellReplace=5]="CellReplace",x[x.Snippet=6]="Snippet"})(ge=e.FileEditType||(e.FileEditType={}));let Se=class{constructor(){this._edits=[]}_allEntries(){return this._edits}renameFile(L,ie,we,Ve){this._edits.push({_type:1,from:L,to:ie,options:we,metadata:Ve})}createFile(L,ie,we){this._edits.push({_type:1,from:void 0,to:L,options:ie,metadata:we})}deleteFile(L,ie,we){this._edits.push({_type:1,from:L,to:void 0,options:ie,metadata:we})}replaceNotebookMetadata(L,ie,we){this._edits.push({_type:3,metadata:we,uri:L,edit:{editType:5,metadata:ie},notebookMetadata:ie})}replaceNotebookCells(L,ie,we,Ve){const Ye=ie.start,at=ie.end;(Ye!==at||we.length>0)&&this._edits.push({_type:5,uri:L,index:Ye,count:at-Ye,cells:we,metadata:Ve})}replaceNotebookCellMetadata(L,ie,we,Ve){this._edits.push({_type:3,metadata:Ve,uri:L,edit:{editType:8,index:ie,metadata:we}})}replace(L,ie,we,Ve){this._edits.push({_type:2,uri:L,edit:new le(ie,we),metadata:Ve})}insert(L,ie,we,Ve){this.replace(L,new U(ie,ie),we,Ve)}delete(L,ie,we){this.replace(L,ie,"",we)}has(L){return this._edits.some(ie=>ie._type===2&&ie.uri.toString()===L.toString())}set(L,ie){if(ie)for(const we of ie){if(!we)continue;let Ve,Ye;Array.isArray(we)?(Ve=we[0],Ye=we[1]):Ve=we,fe.isNotebookCellEdit(Ve)?Ve.newCellMetadata?this.replaceNotebookCellMetadata(L,Ve.range.start,Ve.newCellMetadata,Ye):Ve.newNotebookMetadata?this.replaceNotebookMetadata(L,Ve.newNotebookMetadata,Ye):this.replaceNotebookCells(L,Ve.range,Ve.newCells,Ye):Y.isSnippetTextEdit(Ve)?this._edits.push({_type:6,uri:L,range:Ve.range,edit:Ve.snippet,metadata:Ye}):this._edits.push({_type:2,uri:L,edit:Ve,metadata:Ye})}else{for(let we=0;weVe.replace(/\$|}|\\|,/g,"\\$&")).join(",");return this.value+="${",this.value+=ie,this.value+="|",this.value+=we,this.value+="|}",this}appendVariable(L,ie){if(typeof ie=="function"){const we=new l;we._tabstop=this._tabstop,ie(we),this._tabstop=we._tabstop,ie=we.value}else typeof ie=="string"&&(ie=ie.replace(/\$|}/g,"\\$&"));return this.value+="${",this.value+=L,ie&&(this.value+=":",this.value+=ie),this.value+="}",this}};Oe=l=He([R],Oe),e.SnippetString=Oe;var Be;(function(x){x[x.Unnecessary=1]="Unnecessary",x[x.Deprecated=2]="Deprecated"})(Be=e.DiagnosticTag||(e.DiagnosticTag={}));var Xe;(function(x){x[x.Hint=3]="Hint",x[x.Information=2]="Information",x[x.Warning=1]="Warning",x[x.Error=0]="Error"})(Xe=e.DiagnosticSeverity||(e.DiagnosticSeverity={}));let ke=f=class{static isLocation(L){return L instanceof f?!0:L?U.isRange(L.range)&&T.URI.isUri(L.uri):!1}constructor(L,ie){if(this.uri=L,ie)if(U.isRange(ie))this.range=U.of(ie);else if($.isPosition(ie))this.range=new U(ie,ie);else throw new Error("Illegal argument")}toJSON(){return{uri:this.uri,range:this.range}}};ke=f=He([R],ke),e.Location=ke;let ye=class{static is(L){return L?typeof L.message=="string"&&L.location&&U.isRange(L.location.range)&&T.URI.isUri(L.location.uri):!1}constructor(L,ie){this.location=L,this.message=ie}static isEqual(L,ie){return L===ie?!0:!L||!ie?!1:L.message===ie.message&&L.location.range.isEqual(ie.location.range)&&L.location.uri.toString()===ie.location.uri.toString()}};ye=He([R],ye),e.DiagnosticRelatedInformation=ye;let Ie=class{constructor(L,ie,we=Xe.Error){if(!U.isRange(L))throw new TypeError("range must be set");if(!ie)throw new TypeError("message must be set");this.range=L,this.message=ie,this.severity=we}toJSON(){return{severity:Xe[this.severity],message:this.message,range:this.range,source:this.source,code:this.code}}static isEqual(L,ie){return L===ie?!0:!L||!ie?!1:L.message===ie.message&&L.severity===ie.severity&&L.code===ie.code&&L.severity===ie.severity&&L.source===ie.source&&L.range.isEqual(ie.range)&&(0,i.equals)(L.tags,ie.tags)&&(0,i.equals)(L.relatedInformation,ie.relatedInformation,ye.isEqual)}};Ie=He([R],Ie),e.Diagnostic=Ie;let ae=class{constructor(L,ie){if(!L)throw new Error("Illegal argument, contents must be defined");Array.isArray(L)?this.contents=L:this.contents=[L],this.range=ie}};ae=He([R],ae),e.Hover=ae;var ue;(function(x){x[x.Text=0]="Text",x[x.Read=1]="Read",x[x.Write=2]="Write"})(ue=e.DocumentHighlightKind||(e.DocumentHighlightKind={}));let ee=class{constructor(L,ie=ue.Text){this.range=L,this.kind=ie}toJSON(){return{range:this.range,kind:ue[this.kind]}}};ee=He([R],ee),e.DocumentHighlight=ee;var Z;(function(x){x[x.File=0]="File",x[x.Module=1]="Module",x[x.Namespace=2]="Namespace",x[x.Package=3]="Package",x[x.Class=4]="Class",x[x.Method=5]="Method",x[x.Property=6]="Property",x[x.Field=7]="Field",x[x.Constructor=8]="Constructor",x[x.Enum=9]="Enum",x[x.Interface=10]="Interface",x[x.Function=11]="Function",x[x.Variable=12]="Variable",x[x.Constant=13]="Constant",x[x.String=14]="String",x[x.Number=15]="Number",x[x.Boolean=16]="Boolean",x[x.Array=17]="Array",x[x.Object=18]="Object",x[x.Key=19]="Key",x[x.Null=20]="Null",x[x.EnumMember=21]="EnumMember",x[x.Struct=22]="Struct",x[x.Event=23]="Event",x[x.Operator=24]="Operator",x[x.TypeParameter=25]="TypeParameter"})(Z=e.SymbolKind||(e.SymbolKind={}));var C;(function(x){x[x.Deprecated=1]="Deprecated"})(C=e.SymbolTag||(e.SymbolTag={}));let z=s=class{static validate(L){if(!L.name)throw new Error("name must not be falsy")}constructor(L,ie,we,Ve,Ye){this.name=L,this.kind=ie,this.containerName=Ye,typeof we=="string"&&(this.containerName=we),Ve instanceof ke?this.location=Ve:we instanceof U&&(this.location=new ke(Ve,we)),s.validate(this)}toJSON(){return{name:this.name,kind:Z[this.kind],location:this.location,containerName:this.containerName}}};z=s=He([R],z),e.SymbolInformation=z;let V=h=class{static validate(L){if(!L.name)throw new Error("name must not be falsy");if(!L.range.contains(L.selectionRange))throw new Error("selectionRange must be contained in fullRange");L.children?.forEach(h.validate)}constructor(L,ie,we,Ve,Ye){this.name=L,this.detail=ie,this.kind=we,this.range=Ve,this.selectionRange=Ye,this.children=[],h.validate(this)}};V=h=He([R],V),e.DocumentSymbol=V;var q;(function(x){x[x.Invoke=1]="Invoke",x[x.Automatic=2]="Automatic"})(q=e.CodeActionTriggerKind||(e.CodeActionTriggerKind={}));let oe=class{constructor(L,ie){this.title=L,this.kind=ie}};oe=He([R],oe),e.CodeAction=oe;let ce=v=class{constructor(L){this.value=L}append(L){return new v(this.value?this.value+v.sep+L:L)}intersects(L){return this.contains(L)||L.contains(this)}contains(L){return this.value===L.value||L.value.startsWith(this.value+v.sep)}};ce.sep=".",ce=v=He([R],ce),e.CodeActionKind=ce,ce.Empty=new ce(""),ce.QuickFix=ce.Empty.append("quickfix"),ce.Refactor=ce.Empty.append("refactor"),ce.RefactorExtract=ce.Refactor.append("extract"),ce.RefactorInline=ce.Refactor.append("inline"),ce.RefactorMove=ce.Refactor.append("move"),ce.RefactorRewrite=ce.Refactor.append("rewrite"),ce.Source=ce.Empty.append("source"),ce.SourceOrganizeImports=ce.Source.append("organizeImports"),ce.SourceFixAll=ce.Source.append("fixAll");let J=class{constructor(L,ie){if(this.range=L,this.parent=ie,ie&&!ie.range.contains(this.range))throw new Error("Invalid argument: parent must contain this range")}};J=He([R],J),e.SelectionRange=J;class pe{constructor(L,ie,we,Ve,Ye,at){this.kind=L,this.name=ie,this.detail=we,this.uri=Ve,this.range=Ye,this.selectionRange=at}}e.CallHierarchyItem=pe;class Ee{constructor(L,ie){this.fromRanges=ie,this.from=L}}e.CallHierarchyIncomingCall=Ee;class Ne{constructor(L,ie){this.fromRanges=ie,this.to=L}}e.CallHierarchyOutgoingCall=Ne;var xe;(function(x){x[x.Information=0]="Information",x[x.Warning=1]="Warning",x[x.Error=2]="Error"})(xe=e.LanguageStatusSeverity||(e.LanguageStatusSeverity={}));let Ze=class{constructor(L,ie){this.range=L,this.command=ie}get isResolved(){return!!this.command}};Ze=He([R],Ze),e.CodeLens=Ze;let Ge=k=class{static isMarkdownString(L){return L instanceof k?!0:L&&L.appendCodeblock&&L.appendMarkdown&&L.appendText&&L.value!==void 0}constructor(L,ie=!1){o.set(this,void 0),Je(this,o,new S.MarkdownString(L,{supportThemeIcons:ie}),"f")}get value(){return Re(this,o,"f").value}set value(L){Re(this,o,"f").value=L}get isTrusted(){return Re(this,o,"f").isTrusted}set isTrusted(L){Re(this,o,"f").isTrusted=L}get supportThemeIcons(){return Re(this,o,"f").supportThemeIcons}set supportThemeIcons(L){Re(this,o,"f").supportThemeIcons=L}get supportHtml(){return Re(this,o,"f").supportHtml}set supportHtml(L){Re(this,o,"f").supportHtml=L}get baseUri(){return Re(this,o,"f").baseUri}set baseUri(L){Re(this,o,"f").baseUri=L}appendText(L){return Re(this,o,"f").appendText(L),this}appendMarkdown(L){return Re(this,o,"f").appendMarkdown(L),this}appendCodeblock(L,ie){return Re(this,o,"f").appendCodeblock(ie??"",L),this}};o=new WeakMap,Ge=k=He([R],Ge),e.MarkdownString=Ge;let Qe=class{constructor(L,ie){this.label=L,this.documentation=ie}};Qe=He([R],Qe),e.ParameterInformation=Qe;let Fe=class{constructor(L,ie){this.label=L,this.documentation=ie,this.parameters=[]}};Fe=He([R],Fe),e.SignatureInformation=Fe;let dt=class{constructor(){this.activeSignature=0,this.activeParameter=0,this.signatures=[]}};dt=He([R],dt),e.SignatureHelp=dt;var X;(function(x){x[x.Invoke=1]="Invoke",x[x.TriggerCharacter=2]="TriggerCharacter",x[x.ContentChange=3]="ContentChange"})(X=e.SignatureHelpTriggerKind||(e.SignatureHelpTriggerKind={}));var Q;(function(x){x[x.Type=1]="Type",x[x.Parameter=2]="Parameter"})(Q=e.InlayHintKind||(e.InlayHintKind={}));let ve=class{constructor(L){this.value=L}};ve=He([R],ve),e.InlayHintLabelPart=ve;let Ue=class{constructor(L,ie,we){this.position=L,this.label=ie,this.kind=we}};Ue=He([R],Ue),e.InlayHint=Ue;var je;(function(x){x[x.Invoke=0]="Invoke",x[x.TriggerCharacter=1]="TriggerCharacter",x[x.TriggerForIncompleteCompletions=2]="TriggerForIncompleteCompletions"})(je=e.CompletionTriggerKind||(e.CompletionTriggerKind={}));var qe;(function(x){x[x.Text=0]="Text",x[x.Method=1]="Method",x[x.Function=2]="Function",x[x.Constructor=3]="Constructor",x[x.Field=4]="Field",x[x.Variable=5]="Variable",x[x.Class=6]="Class",x[x.Interface=7]="Interface",x[x.Module=8]="Module",x[x.Property=9]="Property",x[x.Unit=10]="Unit",x[x.Value=11]="Value",x[x.Enum=12]="Enum",x[x.Keyword=13]="Keyword",x[x.Snippet=14]="Snippet",x[x.Color=15]="Color",x[x.File=16]="File",x[x.Reference=17]="Reference",x[x.Folder=18]="Folder",x[x.EnumMember=19]="EnumMember",x[x.Constant=20]="Constant",x[x.Struct=21]="Struct",x[x.Event=22]="Event",x[x.Operator=23]="Operator",x[x.TypeParameter=24]="TypeParameter",x[x.User=25]="User",x[x.Issue=26]="Issue"})(qe=e.CompletionItemKind||(e.CompletionItemKind={}));var ze;(function(x){x[x.Deprecated=1]="Deprecated"})(ze=e.CompletionItemTag||(e.CompletionItemTag={}));let tt=class{constructor(L,ie){this.label=L,this.kind=ie}toJSON(){return{label:this.label,kind:this.kind&&qe[this.kind],detail:this.detail,documentation:this.documentation,sortText:this.sortText,filterText:this.filterText,preselect:this.preselect,insertText:this.insertText,textEdit:this.textEdit}}};tt=He([R],tt),e.CompletionItem=tt;let nt=class{constructor(L=[],ie=!1){this.items=L,this.isIncomplete=ie}};nt=He([R],nt),e.CompletionList=nt;let lt=class{constructor(L,ie,we){this.insertText=L,this.range=ie,this.command=we}};lt=He([R],lt),e.InlineSuggestion=lt;let Dt=class{constructor(L){this.commands=void 0,this.items=L}};Dt=He([R],Dt),e.InlineSuggestionList=Dt;let ot=class{constructor(L,ie,we){this.insertText=L,this.range=ie,this.command=we}};ot=He([R],ot),e.InlineSuggestionNew=ot;let rt=class{constructor(L,ie){this.items=L,this.commands=ie}};rt=He([R],rt),e.InlineSuggestionsNew=rt;var Nt;(function(x){x[x.Active=-1]="Active",x[x.Beside=-2]="Beside",x[x.One=1]="One",x[x.Two=2]="Two",x[x.Three=3]="Three",x[x.Four=4]="Four",x[x.Five=5]="Five",x[x.Six=6]="Six",x[x.Seven=7]="Seven",x[x.Eight=8]="Eight",x[x.Nine=9]="Nine"})(Nt=e.ViewColumn||(e.ViewColumn={}));var Ot;(function(x){x[x.Left=1]="Left",x[x.Right=2]="Right"})(Ot=e.StatusBarAlignment||(e.StatusBarAlignment={}));var kt;(function(x){x[x.Off=0]="Off",x[x.On=1]="On",x[x.Relative=2]="Relative"})(kt=e.TextEditorLineNumbersStyle||(e.TextEditorLineNumbersStyle={}));var mt;(function(x){x[x.Manual=1]="Manual",x[x.AfterDelay=2]="AfterDelay",x[x.FocusOut=3]="FocusOut"})(mt=e.TextDocumentSaveReason||(e.TextDocumentSaveReason={}));var St;(function(x){x[x.Default=0]="Default",x[x.InCenter=1]="InCenter",x[x.InCenterIfOutsideViewport=2]="InCenterIfOutsideViewport",x[x.AtTop=3]="AtTop"})(St=e.TextEditorRevealType||(e.TextEditorRevealType={}));var Lt;(function(x){x[x.Keyboard=1]="Keyboard",x[x.Mouse=2]="Mouse",x[x.Command=3]="Command"})(Lt=e.TextEditorSelectionChangeKind||(e.TextEditorSelectionChangeKind={}));var Ut;(function(x){x[x.Undo=1]="Undo",x[x.Redo=2]="Redo"})(Ut=e.TextDocumentChangeReason||(e.TextDocumentChangeReason={}));var Ke;(function(x){x[x.OpenOpen=0]="OpenOpen",x[x.ClosedClosed=1]="ClosedClosed",x[x.OpenClosed=2]="OpenClosed",x[x.ClosedOpen=3]="ClosedOpen"})(Ke=e.DecorationRangeBehavior||(e.DecorationRangeBehavior={})),function(x){function L(ie){switch(ie){case"keyboard":return x.Keyboard;case"mouse":return x.Mouse;case"api":return x.Command}}x.fromValue=L}(Lt=e.TextEditorSelectionChangeKind||(e.TextEditorSelectionChangeKind={}));let It=class{constructor(L,ie){if(ie&&!T.URI.isUri(ie))throw(0,D.illegalArgument)("target");if(!U.isRange(L)||L.isEmpty)throw(0,D.illegalArgument)("range");this.range=L,this.target=ie}};It=He([R],It),e.DocumentLink=It;let Pt=class{constructor(L,ie,we,Ve){this.red=L,this.green=ie,this.blue=we,this.alpha=Ve}};Pt=He([R],Pt),e.Color=Pt;let Ft=class{constructor(L,ie){if(ie&&!(ie instanceof Pt))throw(0,D.illegalArgument)("color");if(!U.isRange(L)||L.isEmpty)throw(0,D.illegalArgument)("range");this.range=L,this.color=ie}};Ft=He([R],Ft),e.ColorInformation=Ft;let pt=class{constructor(L){if(!L||typeof L!="string")throw(0,D.illegalArgument)("label");this.label=L}};pt=He([R],pt),e.ColorPresentation=pt;var _e;(function(x){x[x.RGB=0]="RGB",x[x.HEX=1]="HEX",x[x.HSL=2]="HSL"})(_e=e.ColorFormat||(e.ColorFormat={}));var Te;(function(x){x[x.Error=0]="Error",x[x.Warning=1]="Warning",x[x.Information=2]="Information"})(Te=e.SourceControlInputBoxValidationType||(e.SourceControlInputBoxValidationType={}));var me;(function(x){x[x.Unknown=0]="Unknown",x[x.Shutdown=1]="Shutdown",x[x.Process=2]="Process",x[x.User=3]="User",x[x.Extension=4]="Extension"})(me=e.TerminalExitReason||(e.TerminalExitReason={}));class G{constructor(L,ie,we){if(this.startIndex=L,this.length=ie,this.tooltip=we,typeof L!="number"||L<0)throw(0,D.illegalArgument)("startIndex");if(typeof ie!="number"||ie<1)throw(0,D.illegalArgument)("length");if(we!==void 0&&typeof we!="string")throw(0,D.illegalArgument)("tooltip")}}e.TerminalLink=G;var Pe;(function(x){x[x.Panel=1]="Panel",x[x.Editor=2]="Editor"})(Pe=e.TerminalLocation||(e.TerminalLocation={}));class Me{constructor(L){if(this.options=L,typeof L!="object")throw(0,D.illegalArgument)("options")}}e.TerminalProfile=Me;var et;(function(x){x[x.Always=1]="Always",x[x.Silent=2]="Silent",x[x.Never=3]="Never"})(et=e.TaskRevealKind||(e.TaskRevealKind={}));var $e;(function(x){x[x.Shared=1]="Shared",x[x.Dedicated=2]="Dedicated",x[x.New=3]="New"})($e=e.TaskPanelKind||(e.TaskPanelKind={}));let it=F=class{static from(L){switch(L){case"clean":return F.Clean;case"build":return F.Build;case"rebuild":return F.Rebuild;case"test":return F.Test;default:return}}constructor(L,ie){if(this.label=ie,typeof L!="string"||typeof ie!="string")throw(0,D.illegalArgument)("name");this._id=L}get id(){return this._id}};it.Clean=new F("clean","Clean"),it.Build=new F("build","Build"),it.Rebuild=new F("rebuild","Rebuild"),it.Test=new F("test","Test"),it=F=He([R],it),e.TaskGroup=it;function ct(x){let L="";for(let ie=0;ie0)for(const ie of this._args)L.push(ie);return ct(L)}};_t=He([R],_t),e.ProcessExecution=_t;let vt=class{constructor(L,ie,we){if(this._args=[],Array.isArray(ie)){if(!L)throw(0,D.illegalArgument)("command can't be undefined or null");if(typeof L!="string"&&typeof L.value!="string")throw(0,D.illegalArgument)("command");this._command=L,this._args=ie,this._options=we}else{if(typeof L!="string")throw(0,D.illegalArgument)("commandLine");this._commandLine=L,this._options=ie}}get commandLine(){return this._commandLine}set commandLine(L){if(typeof L!="string")throw(0,D.illegalArgument)("commandLine");this._commandLine=L}get command(){return this._command?this._command:""}set command(L){if(typeof L!="string"&&typeof L.value!="string")throw(0,D.illegalArgument)("command");this._command=L}get args(){return this._args}set args(L){this._args=L||[]}get options(){return this._options}set options(L){this._options=L}computeId(){const L=[];if(L.push("shell"),this._commandLine!==void 0&&L.push(this._commandLine),this._command!==void 0&&L.push(typeof this._command=="string"?this._command:this._command.value),this._args&&this._args.length>0)for(const ie of this._args)L.push(typeof ie=="string"?ie:ie.value);return ct(L)}};vt=He([R],vt),e.ShellExecution=vt;var yt;(function(x){x[x.Escape=1]="Escape",x[x.Strong=2]="Strong",x[x.Weak=3]="Weak"})(yt=e.ShellQuoting||(e.ShellQuoting={}));var bt;(function(x){x[x.Global=1]="Global",x[x.Workspace=2]="Workspace"})(bt=e.TaskScope||(e.TaskScope={}));class At{constructor(L){this._callback=L}computeId(){return"customExecution"+(0,O.generateUuid)()}set callback(L){this._callback=L}get callback(){return this._callback}}e.CustomExecution=At;let ft=j=class{constructor(L,ie,we,Ve,Ye,at){this.__deprecated=!1,this._definition=this.definition=L;let ht;typeof ie=="string"?(this._name=this.name=ie,this._source=this.source=we,this.execution=Ve,ht=Ye,this.__deprecated=!0):ie===bt.Global||ie===bt.Workspace?(this.target=ie,this._name=this.name=we,this._source=this.source=Ve,this.execution=Ye,ht=at):(this.target=ie,this._name=this.name=we,this._source=this.source=Ve,this.execution=Ye,ht=at),typeof ht=="string"?(this._problemMatchers=[ht],this._hasDefinedMatchers=!0):Array.isArray(ht)?(this._problemMatchers=ht,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(L){this.__id=L}get _deprecated(){return this.__deprecated}clear(){this.__id!==void 0&&(this.__id=void 0,this._scope=void 0,this.computeDefinitionBasedOnExecution())}computeDefinitionBasedOnExecution(){this._execution instanceof _t?this._definition={type:j.ProcessType,id:this._execution.computeId()}:this._execution instanceof vt?this._definition={type:j.ShellType,id:this._execution.computeId()}:this._execution instanceof At?this._definition={type:j.ExtensionCallbackType,id:this._execution.computeId()}:this._definition={type:j.EmptyType,id:(0,O.generateUuid)()}}get definition(){return this._definition}set definition(L){if(L==null)throw(0,D.illegalArgument)("Kind can't be undefined or null");this.clear(),this._definition=L}get scope(){return this._scope}set target(L){this.clear(),this._scope=L}get name(){return this._name}set name(L){if(typeof L!="string")throw(0,D.illegalArgument)("name");this.clear(),this._name=L}get execution(){return this._execution}set execution(L){L===null&&(L=void 0),this.clear(),this._execution=L;const ie=this._definition.type;(j.EmptyType===ie||j.ProcessType===ie||j.ShellType===ie||j.ExtensionCallbackType===ie)&&this.computeDefinitionBasedOnExecution()}get problemMatchers(){return this._problemMatchers}set problemMatchers(L){if(Array.isArray(L))this.clear(),this._problemMatchers=L,this._hasDefinedMatchers=!0;else{this.clear(),this._problemMatchers=[],this._hasDefinedMatchers=!1;return}}get hasDefinedMatchers(){return this._hasDefinedMatchers}get isBackground(){return this._isBackground}set isBackground(L){L!==!0&&L!==!1&&(L=!1),this.clear(),this._isBackground=L}get source(){return this._source}set source(L){if(typeof L!="string"||L.length===0)throw(0,D.illegalArgument)("source must be a string of length > 0");this.clear(),this._source=L}get group(){return this._group}set group(L){L===null&&(L=void 0),this.clear(),this._group=L}get detail(){return this._detail}set detail(L){L===null&&(L=void 0),this._detail=L}get presentationOptions(){return this._presentationOptions}set presentationOptions(L){L==null&&(L=Object.create(null)),this.clear(),this._presentationOptions=L}get runOptions(){return this._runOptions}set runOptions(L){L==null&&(L=Object.create(null)),this.clear(),this._runOptions=L}};ft.ExtensionCallbackType="customExecution",ft.ProcessType="process",ft.ShellType="shell",ft.EmptyType="$empty",ft=j=He([R],ft),e.Task=ft;var zt;(function(x){x[x.SourceControl=1]="SourceControl",x[x.Window=10]="Window",x[x.Notification=15]="Notification"})(zt=e.ProgressLocation||(e.ProgressLocation={}));var ti;(function(x){function L(ie){const we=ie;return(0,_.isNumber)(we.value)?we.tooltip&&!(0,_.isString)(we.tooltip)?(console.log("INVALID view badge, invalid tooltip",we.tooltip),!1):!0:(console.log("INVALID view badge, invalid value",we.value),!1)}x.isViewBadge=L})(ti=e.ViewBadge||(e.ViewBadge={}));let Et=W=class{static isTreeItem(L,ie){if(L instanceof W)return!0;const we=L;if(we.label!==void 0&&!(0,_.isString)(we.label)&&!we.label?.label)return console.log("INVALID tree item, invalid label",we.label),!1;if(we.id!==void 0&&!(0,_.isString)(we.id))return console.log("INVALID tree item, invalid id",we.id),!1;if(we.iconPath!==void 0&&!(0,_.isString)(we.iconPath)&&!T.URI.isUri(we.iconPath)&&(!we.iconPath||!(0,_.isString)(we.iconPath.id))){const Ve=we.iconPath;if(!Ve||!(0,_.isString)(Ve.light)&&!T.URI.isUri(Ve.light)&&!(0,_.isString)(Ve.dark)&&!T.URI.isUri(Ve.dark))return console.log("INVALID tree item, invalid iconPath",we.iconPath),!1}if(we.description!==void 0&&!(0,_.isString)(we.description)&&typeof we.description!="boolean")return console.log("INVALID tree item, invalid description",we.description),!1;if(we.resourceUri!==void 0&&!T.URI.isUri(we.resourceUri))return console.log("INVALID tree item, invalid resourceUri",we.resourceUri),!1;if(we.tooltip!==void 0&&!(0,_.isString)(we.tooltip)&&!(we.tooltip instanceof Ge))return console.log("INVALID tree item, invalid tooltip",we.tooltip),!1;if(we.command!==void 0&&!we.command.command)return console.log("INVALID tree item, invalid command",we.command),!1;if(we.collapsibleState!==void 0&&we.collapsibleStatext.Expanded)return console.log("INVALID tree item, invalid collapsibleState",we.collapsibleState),!1;if(we.contextValue!==void 0&&!(0,_.isString)(we.contextValue))return console.log("INVALID tree item, invalid contextValue",we.contextValue),!1;if(we.accessibilityInformation!==void 0&&!we.accessibilityInformation?.label)return console.log("INVALID tree item, invalid accessibilityInformation",we.accessibilityInformation),!1;if(we.checkboxState!==void 0){(0,m.checkProposedApiEnabled)(ie,"treeItemCheckbox");const Ve=(0,_.isNumber)(we.checkboxState)?we.checkboxState:(0,_.isObject)(we.checkboxState)&&(0,_.isNumber)(we.checkboxState.state)?we.checkboxState.state:void 0,Ye=!(0,_.isNumber)(we.checkboxState)&&(0,_.isObject)(we.checkboxState)?we.checkboxState.tooltip:void 0;if(Ve===void 0||Ve!==ii.Checked&&Ve!==ii.Unchecked||Ye!==void 0&&!(0,_.isString)(Ye))return console.log("INVALID tree item, invalid checkboxState",we.checkboxState),!1}return!0}constructor(L,ie=xt.None){this.collapsibleState=ie,T.URI.isUri(L)?this.resourceUri=L:this.label=L}};Et=W=He([R],Et),e.TreeItem=Et;var xt;(function(x){x[x.None=0]="None",x[x.Collapsed=1]="Collapsed",x[x.Expanded=2]="Expanded"})(xt=e.TreeItemCollapsibleState||(e.TreeItemCollapsibleState={}));var ii;(function(x){x[x.Unchecked=0]="Unchecked",x[x.Checked=1]="Checked"})(ii=e.TreeItemCheckboxState||(e.TreeItemCheckboxState={}));let ni=class{async asString(){return typeof this.value=="string"?this.value:JSON.stringify(this.value)}asFile(){}constructor(L,ie){this.value=L,this.id=ie??(0,O.generateUuid)()}};ni=He([R],ni),e.DataTransferItem=ni;let vi=class{constructor(L){a.set(this,new Map);for(const[ie,we]of L??[]){const Ve=Re(this,a,"f").get(ie);Ve?Ve.push(we):Re(this,a,"f").set(ie,[we])}}get(L){return Re(this,a,"f").get(L)?.[0]}set(L,ie){Re(this,a,"f").set(L,[ie])}forEach(L,ie){for(const[we,Ve]of Re(this,a,"f"))for(const Ye of Ve)L.call(ie,Ye,we,this)}*[(a=new WeakMap,Symbol.iterator)](){for(const[L,ie]of Re(this,a,"f"))for(const we of ie)yield[L,we]}};vi=He([R],vi),e.DataTransfer=vi;let Ct=class{constructor(L){this.insertText=L}};Ct=He([R],Ct),e.DocumentDropEdit=Ct;let ri=class{constructor(L){this.insertText=L}};ri=He([R],ri),e.DocumentPasteEdit=ri;let Ht=class{constructor(L,ie){this.id=L,this.color=ie}};Ht=He([R],Ht),e.ThemeIcon=Ht,Ht.File=new Ht("file"),Ht.Folder=new Ht("folder");let Yt=class{constructor(L){this.id=L}};Yt=He([R],Yt),e.ThemeColor=Yt;var si;(function(x){x[x.Global=1]="Global",x[x.Workspace=2]="Workspace",x[x.WorkspaceFolder=3]="WorkspaceFolder"})(si=e.ConfigurationTarget||(e.ConfigurationTarget={}));let ut=class{get base(){return this._base}set base(L){this._base=L,this._baseUri=T.URI.file(L)}get baseUri(){return this._baseUri}set baseUri(L){this._baseUri=L,this._base=L.fsPath}constructor(L,ie){if(typeof L!="string"&&(!L||!T.URI.isUri(L)&&!T.URI.isUri(L.uri)))throw(0,D.illegalArgument)("base");if(typeof ie!="string")throw(0,D.illegalArgument)("pattern");typeof L=="string"?this.baseUri=T.URI.file(L):T.URI.isUri(L)?this.baseUri=L:this.baseUri=L.uri,this.pattern=ie}toJSON(){return{pattern:this.pattern,base:this.base,baseUri:this.baseUri.toJSON()}}};ut=He([R],ut),e.RelativePattern=ut;let Jt=class{constructor(L,ie,we,Ve){this.enabled=typeof L=="boolean"?L:!0,typeof ie=="string"&&(this.condition=ie),typeof we=="string"&&(this.hitCondition=we),typeof Ve=="string"&&(this.logMessage=Ve)}get id(){return this._id||(this._id=(0,O.generateUuid)()),this._id}};Jt=He([R],Jt),e.Breakpoint=Jt;let $t=class extends Jt{constructor(L,ie,we,Ve,Ye){if(super(ie,we,Ve,Ye),L===null)throw(0,D.illegalArgument)("location");this.location=L}};$t=He([R],$t),e.SourceBreakpoint=$t;let Kt=class extends Jt{constructor(L,ie,we,Ve,Ye){super(ie,we,Ve,Ye),this.functionName=L}};Kt=He([R],Kt),e.FunctionBreakpoint=Kt;let oi=class extends Jt{constructor(L,ie,we,Ve,Ye,at,ht){if(super(Ve,Ye,at,ht),!ie)throw(0,D.illegalArgument)("dataId");this.label=L,this.dataId=ie,this.canPersist=we}};oi=He([R],oi),e.DataBreakpoint=oi;let Ei=class{constructor(L,ie,we){this.command=L,this.args=ie||[],this.options=we}};Ei=He([R],Ei),e.DebugAdapterExecutable=Ei;let ai=class{constructor(L,ie){this.port=L,this.host=ie}};ai=He([R],ai),e.DebugAdapterServer=ai;let bi=class{constructor(L){this.path=L}};bi=He([R],bi),e.DebugAdapterNamedPipeServer=bi;let li=class{constructor(L){this.implementation=L}};li=He([R],li),e.DebugAdapterInlineImplementation=li;let Zt=class{constructor(L,ie){this.range=L,this.expression=ie}};Zt=He([R],Zt),e.EvaluatableExpression=Zt;var Fi;(function(x){x[x.Invoke=0]="Invoke",x[x.Automatic=1]="Automatic"})(Fi=e.InlineCompletionTriggerKind||(e.InlineCompletionTriggerKind={}));var wi;(function(x){x[x.Invoke=0]="Invoke",x[x.Automatic=1]="Automatic"})(wi=e.InlineCompletionTriggerKindNew||(e.InlineCompletionTriggerKindNew={}));let ei=class{constructor(L,ie){this.range=L,this.text=ie}};ei=He([R],ei),e.InlineValueText=ei;let Si=class{constructor(L,ie,we=!0){this.range=L,this.variableName=ie,this.caseSensitiveLookup=we}};Si=He([R],Si),e.InlineValueVariableLookup=Si;let _i=class{constructor(L,ie){this.range=L,this.expression=ie}};_i=He([R],_i),e.InlineValueEvaluatableExpression=_i;let Gt=class{constructor(L,ie){this.frameId=L,this.stoppedLocation=ie}};Gt=He([R],Gt),e.InlineValueContext=Gt;var Ni;(function(x){x[x.Changed=1]="Changed",x[x.Created=2]="Created",x[x.Deleted=3]="Deleted"})(Ni=e.FileChangeType||(e.FileChangeType={}));let yi=H=class extends Error{static FileExists(L){return new H(L,b.FileSystemProviderErrorCode.FileExists,H.FileExists)}static FileNotFound(L){return new H(L,b.FileSystemProviderErrorCode.FileNotFound,H.FileNotFound)}static FileNotADirectory(L){return new H(L,b.FileSystemProviderErrorCode.FileNotADirectory,H.FileNotADirectory)}static FileIsADirectory(L){return new H(L,b.FileSystemProviderErrorCode.FileIsADirectory,H.FileIsADirectory)}static NoPermissions(L){return new H(L,b.FileSystemProviderErrorCode.NoPermissions,H.NoPermissions)}static Unavailable(L){return new H(L,b.FileSystemProviderErrorCode.Unavailable,H.Unavailable)}constructor(L,ie=b.FileSystemProviderErrorCode.Unknown,we){super(T.URI.isUri(L)?L.toString(!0):L),this.code=we?.name??"Unknown",(0,b.markAsFileSystemProviderError)(this,ie),typeof Object.setPrototypeOf=="function"&&Object.setPrototypeOf(this,H.prototype),typeof Error.captureStackTrace=="function"&&typeof we=="function"&&Error.captureStackTrace(this,we)}};yi=H=He([R],yi),e.FileSystemError=yi;let Di=class{constructor(L,ie,we){this.start=L,this.end=ie,this.kind=we}};Di=He([R],Di),e.FoldingRange=Di;var Li;(function(x){x[x.Comment=1]="Comment",x[x.Imports=2]="Imports",x[x.Region=3]="Region"})(Li=e.FoldingRangeKind||(e.FoldingRangeKind={}));var Ii;(function(x){x[x.Collapsed=0]="Collapsed",x[x.Expanded=1]="Expanded"})(Ii=e.CommentThreadCollapsibleState||(e.CommentThreadCollapsibleState={}));var ki;(function(x){x[x.Editing=0]="Editing",x[x.Preview=1]="Preview"})(ki=e.CommentMode||(e.CommentMode={}));var Pi;(function(x){x[x.Unresolved=0]="Unresolved",x[x.Resolved=1]="Resolved"})(Pi=e.CommentThreadState||(e.CommentThreadState={}));class Le{constructor(L,ie=[]){this.tokenTypes=L,this.tokenModifiers=ie}}e.SemanticTokensLegend=Le;function Vt(x){return typeof x>"u"||(0,_.isStringArray)(x)}class ci{constructor(L){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,L){this._hasLegend=!0;for(let ie=0,we=L.tokenTypes.length;ie"u"))return typeof Ye>"u"&&(Ye=0),this._pushEncoded(L,ie,we,Ve,Ye);if(U.isRange(L)&&typeof ie=="string"&&Vt(we))return this._push(L,ie,we);throw(0,D.illegalArgument)()}_push(L,ie,we){if(!this._hasLegend)throw new Error("Legend must be provided in constructor");if(L.start.line!==L.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 Ve=L.start.line,Ye=L.start.character,at=L.end.character-L.start.character,ht=this._tokenTypeStrToInt.get(ie);let Rt=0;if(we)for(const Bt of we){if(!this._tokenModifierStrToInt.has(Bt))throw new Error("`tokenModifier` is not in the provided legend");const Wt=this._tokenModifierStrToInt.get(Bt);Rt|=1<>>0}this._pushEncoded(Ve,Ye,at,ht,Rt)}_pushEncoded(L,ie,we,Ve,Ye){if(this._dataIsSortedAndDeltaEncoded&&(L0&&(at-=this._prevLine,at===0&&(ht-=this._prevChar)),this._data[this._dataLen++]=at,this._data[this._dataLen++]=ht,this._data[this._dataLen++]=we,this._data[this._dataLen++]=Ve,this._data[this._dataLen++]=Ye,this._prevLine=L,this._prevChar=ie}static _sortAndDeltaEncode(L){const ie=[],we=L.length/5|0;for(let ht=0;ht{const Bt=L[5*ht],Wt=L[5*Rt];if(Bt===Wt){const qt=L[5*ht+1],Xt=L[5*Rt+1];return qt-Xt}return Bt-Wt});const Ve=new Uint32Array(L.length);let Ye=0,at=0;for(let ht=0;htie)throw new Error("The 'badge'-property must be undefined or a short character")}if(!L.color&&!L.badge&&!L.tooltip)throw new Error("The decoration is empty");return!0}constructor(L,ie,we){this.badge=L,this.tooltip=ie,this.color=we}}e.FileDecoration=xi;let hi=class{constructor(L){this.kind=L}};hi=He([R],hi),e.ColorTheme=hi;var $i;(function(x){x[x.Light=1]="Light",x[x.Dark=2]="Dark",x[x.HighContrast=3]="HighContrast",x[x.HighContrastLight=4]="HighContrastLight"})($i=e.ColorThemeKind||(e.ColorThemeKind={}));class jt{static isNotebookRange(L){return L instanceof jt?!0:L?typeof L.start=="number"&&typeof L.end=="number":!1}get start(){return this._start}get end(){return this._end}get isEmpty(){return this._start===this._end}constructor(L,ie){if(L<0)throw(0,D.illegalArgument)("start must be positive");if(ie<0)throw(0,D.illegalArgument)("end must be positive");L<=ie?(this._start=L,this._end=ie):(this._start=ie,this._end=L)}with(L){let ie=this._start,we=this._end;return L.start!==void 0&&(ie=L.start),L.end!==void 0&&(we=L.end),ie===this._start&&we===this._end?this:new jt(ie,we)}}e.NotebookRange=jt;class fi{static validate(L){if(typeof L.kind!="number")throw new Error("NotebookCellData MUST have 'kind' property");if(typeof L.value!="string")throw new Error("NotebookCellData MUST have 'value' property");if(typeof L.languageId!="string")throw new Error("NotebookCellData MUST have 'languageId' property")}static isNotebookCellDataArray(L){return Array.isArray(L)&&L.every(ie=>fi.isNotebookCellData(ie))}static isNotebookCellData(L){return!0}constructor(L,ie,we,Ve,Ye,at,ht){this.kind=L,this.value=ie,this.languageId=we,this.mime=Ve,this.outputs=Ye??[],this.metadata=at,this.executionSummary=ht,fi.validate(this)}}e.NotebookCellData=fi;class Wi{constructor(L){this.cells=L}}e.NotebookData=Wi;class Mt{static isNotebookCellOutputItem(L){return L instanceof Mt?!0:L?typeof L.mime=="string"&&L.data instanceof Uint8Array:!1}static error(L){const ie={name:L.name,message:L.message,stack:L.stack};return Mt.json(ie,"application/vnd.code.notebook.error")}static stdout(L){return Mt.text(L,"application/vnd.code.notebook.stdout")}static stderr(L){return Mt.text(L,"application/vnd.code.notebook.stderr")}static bytes(L,ie="application/octet-stream"){return new Mt(L,ie)}static text(L,ie=y.Mimes.text){const we=Re(Mt,p,"f",w).encode(String(L));return new Mt(we,ie)}static json(L,ie="text/x-json"){const we=JSON.stringify(L,void 0," ");return Mt.text(we,ie)}constructor(L,ie){this.data=L,this.mime=ie;const we=(0,y.normalizeMimeType)(ie,!0);if(!we)throw new Error(`INVALID mime type: ${ie}. Must be in the format "type/subtype[;optionalparameter]"`);this.mime=we}}e.NotebookCellOutputItem=Mt,p=Mt,w={value:new TextEncoder};class mi{static isNotebookCellOutput(L){return L instanceof mi?!0:!L||typeof L!="object"?!1:typeof L.id=="string"&&Array.isArray(L.items)}static ensureUniqueMimeTypes(L,ie=!1){const we=new Set,Ve=new Set;for(let Ye=0;Ye!Ve.has(at))}constructor(L,ie,we){this.items=mi.ensureUniqueMimeTypes(L,!0),typeof ie=="string"?(this.id=ie,this.metadata=we):(this.id=(0,O.generateUuid)(),this.metadata=ie??we)}}e.NotebookCellOutput=mi;var se;(function(x){x[x.Markup=1]="Markup",x[x.Code=2]="Code"})(se=e.NotebookCellKind||(e.NotebookCellKind={}));var he;(function(x){x[x.Idle=1]="Idle",x[x.Pending=2]="Pending",x[x.Executing=3]="Executing"})(he=e.NotebookCellExecutionState||(e.NotebookCellExecutionState={}));var Ae;(function(x){x[x.Left=1]="Left",x[x.Right=2]="Right"})(Ae=e.NotebookCellStatusBarAlignment||(e.NotebookCellStatusBarAlignment={}));var st;(function(x){x[x.Default=0]="Default",x[x.InCenter=1]="InCenter",x[x.InCenterIfOutsideViewport=2]="InCenterIfOutsideViewport",x[x.AtTop=3]="AtTop"})(st=e.NotebookEditorRevealType||(e.NotebookEditorRevealType={}));class wt{constructor(L,ie){this.text=L,this.alignment=ie}}e.NotebookCellStatusBarItem=wt;var Tt;(function(x){x[x.Default=1]="Default",x[x.Preferred=2]="Preferred"})(Tt=e.NotebookControllerAffinity||(e.NotebookControllerAffinity={}));var nn;(function(x){x[x.Default=1]="Default",x[x.Preferred=2]="Preferred",x[x.Hidden=-1]="Hidden"})(nn=e.NotebookControllerAffinity2||(e.NotebookControllerAffinity2={}));class rn{constructor(L,ie=[]){this.uri=L,this.provides=(0,i.asArray)(ie)}}e.NotebookRendererScript=rn;let Hi=class{constructor(L,ie){this.label=L,this.timestamp=ie}};Hi=He([R],Hi),e.TimelineItem=Hi;var sn;(function(x){x[x.Production=1]="Production",x[x.Development=2]="Development",x[x.Test=3]="Test"})(sn=e.ExtensionMode||(e.ExtensionMode={}));var on;(function(x){x[x.Node=1]="Node",x[x.Webworker=2]="Webworker"})(on=e.ExtensionRuntime||(e.ExtensionRuntime={}));var an;(function(x){x[x.Other=0]="Other",x[x.Comment=1]="Comment",x[x.String=2]="String",x[x.RegEx=3]="RegEx"})(an=e.StandardTokenType||(e.StandardTokenType={}));class ln{constructor(L,ie){this.ranges=L,this.wordPattern=ie}}e.LinkedEditingRanges=ln;class cn{constructor(L,ie){this._port=L,this._autoForwardAction=ie}get port(){return this._port}get autoForwardAction(){return this._autoForwardAction}}e.PortAttributes=cn;var un;(function(x){x[x.Queued=1]="Queued",x[x.Running=2]="Running",x[x.Passed=3]="Passed",x[x.Failed=4]="Failed",x[x.Skipped=5]="Skipped",x[x.Errored=6]="Errored"})(un=e.TestResultState||(e.TestResultState={}));var dn;(function(x){x[x.Run=1]="Run",x[x.Debug=2]="Debug",x[x.Coverage=3]="Coverage"})(dn=e.TestRunProfileKind||(e.TestRunProfileKind={}));let Vi=class{constructor(L=void 0,ie=void 0,we=void 0){this.include=L,this.exclude=ie,this.profile=we}};Vi=He([R],Vi),e.TestRunRequest=Vi;let ji=P=class{static diff(L,ie,we){const Ve=new P(L);return Ve.expectedOutput=ie,Ve.actualOutput=we,Ve}constructor(L){this.message=L}};ji=P=He([R],ji),e.TestMessage=ji;let qi=class{constructor(L){this.id=L}};qi=He([R],qi),e.TestTag=qi;let gi=class{constructor(L,ie){this.covered=L,this.total=ie}};gi=He([R],gi),e.CoveredCount=gi;let Ki=M=class{static fromDetails(L,ie){const we=new gi(0,0),Ve=new gi(0,0),Ye=new gi(0,0);for(const ht of ie)if("branches"in ht){we.total+=1,we.covered+=ht.executionCount>0?1:0;for(const Rt of ht.branches)Ve.total+=1,Ve.covered+=Rt.executionCount>0?1:0}else Ye.total+=1,Ye.covered+=ht.executionCount>0?1:0;const at=new M(L,we,Ve.total>0?Ve:void 0,Ye.total>0?Ye:void 0);return at.detailedCoverage=ie,at}constructor(L,ie,we,Ve){this.uri=L,this.statementCoverage=ie,this.branchCoverage=we,this.functionCoverage=Ve}};Ki=M=He([R],Ki),e.FileCoverage=Ki;let Gi=class{constructor(L,ie,we=[]){this.executionCount=L,this.location=ie,this.branches=we}};Gi=He([R],Gi),e.StatementCoverage=Gi;let Xi=class{constructor(L,ie){this.executionCount=L,this.location=ie}};Xi=He([R],Xi),e.BranchCoverage=Xi;let Qi=class{constructor(L,ie){this.executionCount=L,this.location=ie}};Qi=He([R],Qi),e.FunctionCoverage=Qi;var hn;(function(x){x[x.None=0]="None",x[x.Option=1]="Option",x[x.Default=2]="Default",x[x.Preferred=3]="Preferred"})(hn=e.ExternalUriOpenerPriority||(e.ExternalUriOpenerPriority={}));var fn;(function(x){x[x.Untrusted=0]="Untrusted",x[x.Trusted=1]="Trusted",x[x.Unspecified=2]="Unspecified"})(fn=e.WorkspaceTrustState||(e.WorkspaceTrustState={}));var mn;(function(x){x[x.Notify=1]="Notify",x[x.OpenBrowser=2]="OpenBrowser",x[x.OpenPreview=3]="OpenPreview",x[x.Silent=4]="Silent",x[x.Ignore=5]="Ignore",x[x.OpenBrowserOnce=6]="OpenBrowserOnce"})(mn=e.PortAutoForwardAction||(e.PortAutoForwardAction={}));class gn{constructor(L,ie,we,Ve,Ye,at){this.kind=L,this.name=ie,this.detail=we,this.uri=Ve,this.range=Ye,this.selectionRange=at}}e.TypeHierarchyItem=gn;class pn{constructor(L){this.uri=L}}e.TextTabInput=pn;class vn{constructor(L,ie){this.original=L,this.modified=ie}}e.TextDiffTabInput=vn;class En{constructor(L,ie,we,Ve){this.base=L,this.input1=ie,this.input2=we,this.result=Ve}}e.TextMergeTabInput=En;class bn{constructor(L,ie){this.uri=L,this.viewType=ie}}e.CustomEditorTabInput=bn;class wn{constructor(L){this.viewType=L}}e.WebviewEditorTabInput=wn;class Sn{constructor(L,ie){this.uri=L,this.notebookType=ie}}e.NotebookEditorTabInput=Sn;class _n{constructor(L,ie,we){this.original=L,this.modified=ie,this.notebookType=we}}e.NotebookDiffEditorTabInput=_n;class yn{constructor(){}}e.TerminalEditorTabInput=yn;class Dn{constructor(L,ie){this.uri=L,this.inputBoxUri=ie}}e.InteractiveWindowInput=Dn}),define(De[94],Ce([1,0,47,13,10,247,124,6,18]),function(ne,e,i,D,S,N,y,A,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtHostDocumentLine=e.ExtHostDocumentData=e.getWordDefinitionFor=e.setWordDefinitionFor=void 0;const T=new Map;function O(m,t){t?T.set(m,t):T.delete(m)}e.setWordDefinitionFor=O;function b(m){return T.get(m)}e.getWordDefinitionFor=b;class g extends N.MirrorTextModel{constructor(t,o,a,p,w,u,I,r){super(o,a,p,w),this._proxy=t,this._languageId=u,this._isDirty=I,this.notebook=r,this._isDisposed=!1}dispose(){(0,i.ok)(!this._isDisposed),this._isDisposed=!0,this._isDirty=!1}equalLines(t){return(0,_.equals)(this._lines,t)}get document(){if(!this._document){const t=this;this._document={get uri(){return t._uri},get fileName(){return t._uri.fsPath},get isUntitled(){return t._uri.scheme===D.Schemas.untitled},get languageId(){return t._languageId},get version(){return t._versionId},get isClosed(){return t._isDisposed},get isDirty(){return t._isDirty},save(){return t._save()},getText(o){return o?t._getTextInRange(o):t.getText()},get eol(){return t._eol===` `?A.EndOfLine.LF:A.EndOfLine.CRLF},get lineCount(){return t._lines.length},lineAt(o){return t._lineAt(o)},offsetAt(o){return t._offsetAt(o)},positionAt(o){return t._positionAt(o)},validateRange(o){return t._validateRange(o)},validatePosition(o){return t._validatePosition(o)},getWordRangeAtPosition(o,a){return t._getWordRangeAtPosition(o,a)}}}return Object.freeze(this._document)}_acceptLanguageId(t){(0,i.ok)(!this._isDisposed),this._languageId=t}_acceptIsDirty(t){(0,i.ok)(!this._isDisposed),this._isDirty=t}_save(){return this._isDisposed?Promise.reject(new Error("Document has been closed")):this._proxy.$trySaveDocument(this._uri)}_getTextInRange(t){const o=this._validateRange(t);if(o.isEmpty)return"";if(o.isSingleLine)return this._lines[o.start.line].substring(o.start.character,o.end.character);const a=this._eol,p=o.start.line,w=o.end.line,u=[];u.push(this._lines[p].substring(o.start.character));for(let I=p+1;I=this._lines.length||Math.floor(o)!==o)throw new Error("Illegal value for `line`");return new E(o,this._lines[o],o===this._lines.length-1)}_offsetAt(t){return t=this._validatePosition(t),this._ensureLineStarts(),this._lineStarts.getPrefixSum(t.line-1)+t.character}_positionAt(t){t=Math.floor(t),t=Math.max(0,t),this._ensureLineStarts();const o=this._lineStarts.getIndexOf(t),a=this._lines[o.index].length;return new A.Position(o.index,Math.min(o.remainder,a))}_validateRange(t){if(!(t instanceof A.Range))throw new Error("Invalid argument");const o=this._validatePosition(t.start),a=this._validatePosition(t.end);return o===t.start&&a===t.end?t:new A.Range(o.line,o.character,a.line,a.character)}_validatePosition(t){if(!(t instanceof A.Position))throw new Error("Invalid argument");if(this._lines.length===0)return t.with(0,0);let{line:o,character:a}=t,p=!1;if(o<0)o=0,a=0,p=!0;else if(o>=this._lines.length)o=this._lines.length-1,a=this._lines[o].length,p=!0;else{const w=this._lines[o].length;a<0?(a=0,p=!0):a>w&&(a=w,p=!0)}return p?new A.Position(o,a):t}_getWordRangeAtPosition(t,o){const a=this._validatePosition(t);if(!o)o=b(this._languageId);else if((0,S.regExpLeadsToEndlessLoop)(o))throw new Error(`[getWordRangeAtPosition]: ignoring custom regexp '${o.source}' because it matches the empty string.`);const p=(0,y.getWordAtText)(a.character+1,(0,y.ensureValidWordDefinition)(o),this._lines[a.line],0);if(p)return new A.Range(a.line,p.startColumn-1,a.line,p.endColumn-1)}}e.ExtHostDocumentData=g;class E{constructor(t,o,a){this._line=t,this._text=o,this._isLastLine=a}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=E}),define(De[182],Ce([1,0,6,14,4]),function(ne,e,i,D,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtHostTheming=void 0;let N=class{constructor(A){this._actual=new i.ColorTheme(i.ColorThemeKind.Dark),this._onDidChangeActiveColorTheme=new S.Emitter}get activeColorTheme(){return this._actual}$onColorThemeChange(A){let _;switch(A){case"light":_=i.ColorThemeKind.Light;break;case"hcDark":_=i.ColorThemeKind.HighContrast;break;case"hcLight":_=i.ColorThemeKind.HighContrastLight;break;default:_=i.ColorThemeKind.Dark}this._actual=new i.ColorTheme(_),this._onDidChangeActiveColorTheme.fire(this._actual)}get onDidChangeActiveColorTheme(){return this._onDidChangeActiveColorTheme.event}};N=He([We(0,D.IExtHostRpcService)],N),e.ExtHostTheming=N}),define(De[8],Ce([1,0,18,24,81,28,107,80,23,9,2,52,70,86,92,91,66,42,51,177,6,183]),function(ne,e,i,D,S,N,y,A,_,T,O,b,g,E,m,t,o,a,p,w,u,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DataTransfer=e.DataTransferItem=e.ViewBadge=e.TypeHierarchyItem=e.CodeActionTriggerKind=e.TestCoverage=e.TestResults=e.TestItem=e.TestTag=e.TestMessage=e.NotebookRendererScript=e.NotebookDocumentContentOptions=e.NotebookStatusBarItem=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 r;(function(_e){function Te(G){const{selectionStartLineNumber:Pe,selectionStartColumn:Me,positionLineNumber:et,positionColumn:$e}=G,it=new u.Position(Pe-1,Me-1),ct=new u.Position(et-1,$e-1);return new u.Selection(it,ct)}_e.to=Te;function me(G){const{anchor:Pe,active:Me}=G;return{selectionStartLineNumber:Pe.line+1,selectionStartColumn:Pe.character+1,positionLineNumber:Me.line+1,positionColumn:Me.character+1}}_e.from=me})(r=e.Selection||(e.Selection={}));var c;(function(_e){function Te(G){if(!G)return;const{start:Pe,end:Me}=G;return{startLineNumber:Pe.line+1,startColumn:Pe.character+1,endLineNumber:Me.line+1,endColumn:Me.character+1}}_e.from=Te;function me(G){if(!G)return;const{startLineNumber:Pe,startColumn:Me,endLineNumber:et,endColumn:$e}=G;return new u.Range(Pe-1,Me-1,et-1,$e-1)}_e.to=me})(c=e.Range||(e.Range={}));var n;(function(_e){function Te(me){switch(me){case 1:return u.StandardTokenType.Comment;case 0:return u.StandardTokenType.Other;case 3:return u.StandardTokenType.RegEx;case 2:return u.StandardTokenType.String}}_e.to=Te})(n=e.TokenType||(e.TokenType={}));var d;(function(_e){function Te(G){return new u.Position(G.lineNumber-1,G.column-1)}_e.to=Te;function me(G){return{lineNumber:G.line+1,column:G.character+1}}_e.from=me})(d=e.Position||(e.Position={}));var l;(function(_e){function Te(Pe,Me){return(0,i.coalesce)((0,i.asArray)(Pe).map(et=>me(et,Me)))}_e.from=Te;function me(Pe,Me){if(typeof Pe=="string")return{$serialized:!0,language:Pe};if(Pe)return{$serialized:!0,language:Pe.language,scheme:G(Pe.scheme,Me),pattern:Q.from(Pe.pattern)??void 0,exclusive:Pe.exclusive,notebookType:Pe.notebookType}}function G(Pe,Me){return Me&&typeof Pe=="string"?Me.transformOutgoingScheme(Pe):Pe}})(l=e.DocumentSelector||(e.DocumentSelector={}));var f;(function(_e){function Te(G){switch(G){case u.DiagnosticTag.Unnecessary:return 1;case u.DiagnosticTag.Deprecated:return 2}}_e.from=Te;function me(G){switch(G){case 1:return u.DiagnosticTag.Unnecessary;case 2:return u.DiagnosticTag.Deprecated;default:return}}_e.to=me})(f=e.DiagnosticTag||(e.DiagnosticTag={}));var s;(function(_e){function Te(G){let Pe;return G.code&&((0,T.isString)(G.code)||(0,T.isNumber)(G.code)?Pe=String(G.code):Pe={value:String(G.code.value),target:G.code.target}),{...c.from(G.range),message:G.message,source:G.source,code:Pe,severity:v.from(G.severity),relatedInformation:G.relatedInformation&&G.relatedInformation.map(h.from),tags:Array.isArray(G.tags)?(0,i.coalesce)(G.tags.map(f.from)):void 0}}_e.from=Te;function me(G){const Pe=new u.Diagnostic(c.to(G),G.message,v.to(G.severity));return Pe.source=G.source,Pe.code=(0,T.isString)(G.code)?G.code:G.code?.value,Pe.relatedInformation=G.relatedInformation&&G.relatedInformation.map(h.to),Pe.tags=G.tags&&(0,i.coalesce)(G.tags.map(f.to)),Pe}_e.to=me})(s=e.Diagnostic||(e.Diagnostic={}));var h;(function(_e){function Te(G){return{...c.from(G.location.range),message:G.message,resource:G.location.uri}}_e.from=Te;function me(G){return new u.DiagnosticRelatedInformation(new u.Location(G.resource,c.to(G)),G.message)}_e.to=me})(h=e.DiagnosticRelatedInformation||(e.DiagnosticRelatedInformation={}));var v;(function(_e){function Te(G){switch(G){case u.DiagnosticSeverity.Error:return E.MarkerSeverity.Error;case u.DiagnosticSeverity.Warning:return E.MarkerSeverity.Warning;case u.DiagnosticSeverity.Information:return E.MarkerSeverity.Info;case u.DiagnosticSeverity.Hint:return E.MarkerSeverity.Hint}return E.MarkerSeverity.Error}_e.from=Te;function me(G){switch(G){case E.MarkerSeverity.Info:return u.DiagnosticSeverity.Information;case E.MarkerSeverity.Warning:return u.DiagnosticSeverity.Warning;case E.MarkerSeverity.Error:return u.DiagnosticSeverity.Error;case E.MarkerSeverity.Hint:return u.DiagnosticSeverity.Hint;default:return u.DiagnosticSeverity.Error}}_e.to=me})(v=e.DiagnosticSeverity||(e.DiagnosticSeverity={}));var k;(function(_e){function Te(G){return typeof G=="number"&&G>=u.ViewColumn.One?G-1:G===u.ViewColumn.Beside?w.SIDE_GROUP:w.ACTIVE_GROUP}_e.from=Te;function me(G){if(typeof G=="number"&&G>=0)return G+1;throw new Error("invalid 'EditorGroupColumn'")}_e.to=me})(k=e.ViewColumn||(e.ViewColumn={}));function F(_e){return typeof _e.range<"u"}function j(_e){return _e.length===0?!0:!!F(_e[0])}e.isDecorationOptionsArr=j;var W;(function(_e){function Te($e){return $e.map(_e.from)}_e.fromMany=Te;function me($e){return $e&&typeof $e=="object"&&typeof $e.language=="string"&&typeof $e.value=="string"}function G($e){let it;if(me($e)){const{language:yt,value:bt}=$e;it={value:"```"+yt+` `+bt+"\n```\n"}}else u.MarkdownString.isMarkdownString($e)?it={value:$e.value,isTrusted:$e.isTrusted,supportThemeIcons:$e.supportThemeIcons,supportHtml:$e.supportHtml,baseUri:$e.baseUri}:typeof $e=="string"?it={value:$e}:it={value:""};const ct=Object.create(null);it.uris=ct;const _t=yt=>{try{let bt=O.URI.parse(yt,!0);bt=bt.with({query:Pe(bt.query,ct)}),ct[yt]=bt}catch{}return""},vt=new y.marked.Renderer;return vt.link=_t,vt.image=yt=>typeof yt=="string"?_t(S.parseHrefAndDimensions(yt).href):"",(0,y.marked)(it.value,{renderer:vt}),it}_e.from=G;function Pe($e,it){if(!$e)return $e;let ct;try{ct=(0,A.parse)($e)}catch{}if(!ct)return $e;let _t=!1;return ct=(0,_.cloneAndChange)(ct,vt=>{if(O.URI.isUri(vt)){const yt=`__uri_${Math.random().toString(16).slice(2,8)}`;return it[yt]=vt,_t=!0,yt}else return}),_t?JSON.stringify(ct):$e}function Me($e){const it=new u.MarkdownString($e.value,$e.supportThemeIcons);return it.isTrusted=$e.isTrusted,it.supportHtml=$e.supportHtml,it.baseUri=$e.baseUri?O.URI.from($e.baseUri):void 0,it}_e.to=Me;function et($e){if(!!$e)return typeof $e=="string"?$e:_e.from($e)}_e.fromStrict=et})(W=e.MarkdownString||(e.MarkdownString={}));function H(_e){return j(_e)?_e.map(Te=>({range:c.from(Te.range),hoverMessage:Array.isArray(Te.hoverMessage)?W.fromMany(Te.hoverMessage):Te.hoverMessage?W.from(Te.hoverMessage):void 0,renderOptions:Te.renderOptions})):_e.map(Te=>({range:c.from(Te)}))}e.fromRangeOrRangeWithMessage=H;function P(_e){return typeof _e>"u"?_e:typeof _e=="string"?O.URI.file(_e):_e}e.pathOrURIToURI=P;var M;(function(_e){function Te(me){return typeof me>"u"?me:{contentText:me.contentText,contentIconPath:me.contentIconPath?P(me.contentIconPath):void 0,border:me.border,borderColor:me.borderColor,fontStyle:me.fontStyle,fontWeight:me.fontWeight,textDecoration:me.textDecoration,color:me.color,backgroundColor:me.backgroundColor,margin:me.margin,width:me.width,height:me.height}}_e.from=Te})(M=e.ThemableDecorationAttachmentRenderOptions||(e.ThemableDecorationAttachmentRenderOptions={}));var R;(function(_e){function Te(me){return typeof me>"u"?me:{backgroundColor:me.backgroundColor,outline:me.outline,outlineColor:me.outlineColor,outlineStyle:me.outlineStyle,outlineWidth:me.outlineWidth,border:me.border,borderColor:me.borderColor,borderRadius:me.borderRadius,borderSpacing:me.borderSpacing,borderStyle:me.borderStyle,borderWidth:me.borderWidth,fontStyle:me.fontStyle,fontWeight:me.fontWeight,textDecoration:me.textDecoration,cursor:me.cursor,color:me.color,opacity:me.opacity,letterSpacing:me.letterSpacing,gutterIconPath:me.gutterIconPath?P(me.gutterIconPath):void 0,gutterIconSize:me.gutterIconSize,overviewRulerColor:me.overviewRulerColor,before:me.before?M.from(me.before):void 0,after:me.after?M.from(me.after):void 0}}_e.from=Te})(R=e.ThemableDecorationRenderOptions||(e.ThemableDecorationRenderOptions={}));var B;(function(_e){function Te(me){if(typeof me>"u")return me;switch(me){case u.DecorationRangeBehavior.OpenOpen:return 0;case u.DecorationRangeBehavior.ClosedClosed:return 1;case u.DecorationRangeBehavior.OpenClosed:return 2;case u.DecorationRangeBehavior.ClosedOpen:return 3}}_e.from=Te})(B=e.DecorationRangeBehavior||(e.DecorationRangeBehavior={}));var $;(function(_e){function Te(me){return{isWholeLine:me.isWholeLine,rangeBehavior:me.rangeBehavior?B.from(me.rangeBehavior):void 0,overviewRulerLane:me.overviewRulerLane,light:me.light?R.from(me.light):void 0,dark:me.dark?R.from(me.dark):void 0,backgroundColor:me.backgroundColor,outline:me.outline,outlineColor:me.outlineColor,outlineStyle:me.outlineStyle,outlineWidth:me.outlineWidth,border:me.border,borderColor:me.borderColor,borderRadius:me.borderRadius,borderSpacing:me.borderSpacing,borderStyle:me.borderStyle,borderWidth:me.borderWidth,fontStyle:me.fontStyle,fontWeight:me.fontWeight,textDecoration:me.textDecoration,cursor:me.cursor,color:me.color,opacity:me.opacity,letterSpacing:me.letterSpacing,gutterIconPath:me.gutterIconPath?P(me.gutterIconPath):void 0,gutterIconSize:me.gutterIconSize,overviewRulerColor:me.overviewRulerColor,before:me.before?M.from(me.before):void 0,after:me.after?M.from(me.after):void 0}}_e.from=Te})($=e.DecorationRenderOptions||(e.DecorationRenderOptions={}));var U;(function(_e){function Te(G){return{text:G.newText,eol:G.newEol&&Ge.from(G.newEol),range:c.from(G.range)}}_e.from=Te;function me(G){const Pe=new u.TextEdit(c.to(G.range),G.text);return Pe.newEol=typeof G.eol>"u"?void 0:Ge.to(G.eol),Pe}_e.to=me})(U=e.TextEdit||(e.TextEdit={}));var K;(function(_e){function Te(G,Pe){const Me={edits:[]};if(G instanceof u.WorkspaceEdit){const et=new N.ResourceSet;for(const $e of G._allEntries())$e._type===1&&O.URI.isUri($e.to)&&$e.from===void 0&&et.add($e.to);for(const $e of G._allEntries())$e._type===1?Me.edits.push({oldResource:$e.from,newResource:$e.to,options:{...$e.options,contentsBase64:$e.options?.contents&&(0,D.encodeBase64)(D.VSBuffer.wrap($e.options.contents))},metadata:$e.metadata}):$e._type===2?Me.edits.push({resource:$e.uri,textEdit:U.from($e.edit),versionId:et.has($e.uri)?void 0:Pe?.getTextDocumentVersion($e.uri),metadata:$e.metadata}):$e._type===6?Me.edits.push({resource:$e.uri,textEdit:{range:c.from($e.range),text:$e.edit.value,insertAsSnippet:!0},versionId:et.has($e.uri)?void 0:Pe?.getTextDocumentVersion($e.uri),metadata:$e.metadata}):$e._type===3?Me.edits.push({metadata:$e.metadata,resource:$e.uri,cellEdit:$e.edit,notebookMetadata:$e.notebookMetadata,notebookVersionId:Pe?.getNotebookDocumentVersion($e.uri)}):$e._type===5&&Me.edits.push({metadata:$e.metadata,resource:$e.uri,notebookVersionId:Pe?.getNotebookDocumentVersion($e.uri),cellEdit:{editType:1,index:$e.index,count:$e.count,cells:$e.cells.map(nt.from)}})}return Me}_e.from=Te;function me(G){const Pe=new u.WorkspaceEdit;for(const Me of G.edits)Me.textEdit?Pe.replace(O.URI.revive(Me.resource),c.to(Me.textEdit.range),Me.textEdit.text):Pe.renameFile(O.URI.revive(Me.oldResource),O.URI.revive(Me.newResource),Me.options);return Pe}_e.to=me})(K=e.WorkspaceEdit||(e.WorkspaceEdit={}));var te;(function(_e){const Te=Object.create(null);Te[u.SymbolKind.File]=0,Te[u.SymbolKind.Module]=1,Te[u.SymbolKind.Namespace]=2,Te[u.SymbolKind.Package]=3,Te[u.SymbolKind.Class]=4,Te[u.SymbolKind.Method]=5,Te[u.SymbolKind.Property]=6,Te[u.SymbolKind.Field]=7,Te[u.SymbolKind.Constructor]=8,Te[u.SymbolKind.Enum]=9,Te[u.SymbolKind.Interface]=10,Te[u.SymbolKind.Function]=11,Te[u.SymbolKind.Variable]=12,Te[u.SymbolKind.Constant]=13,Te[u.SymbolKind.String]=14,Te[u.SymbolKind.Number]=15,Te[u.SymbolKind.Boolean]=16,Te[u.SymbolKind.Array]=17,Te[u.SymbolKind.Object]=18,Te[u.SymbolKind.Key]=19,Te[u.SymbolKind.Null]=20,Te[u.SymbolKind.EnumMember]=21,Te[u.SymbolKind.Struct]=22,Te[u.SymbolKind.Event]=23,Te[u.SymbolKind.Operator]=24,Te[u.SymbolKind.TypeParameter]=25;function me(Pe){return typeof Te[Pe]=="number"?Te[Pe]:6}_e.from=me;function G(Pe){for(const Me in Te)if(Te[Me]===Pe)return Number(Me);return u.SymbolKind.Property}_e.to=G})(te=e.SymbolKind||(e.SymbolKind={}));var de;(function(_e){function Te(G){switch(G){case u.SymbolTag.Deprecated:return 1}}_e.from=Te;function me(G){switch(G){case 1:return u.SymbolTag.Deprecated}}_e.to=me})(de=e.SymbolTag||(e.SymbolTag={}));var re;(function(_e){function Te(G){return{name:G.name,kind:te.from(G.kind),tags:G.tags&&G.tags.map(de.from),containerName:G.containerName,location:ge.from(G.location)}}_e.from=Te;function me(G){const Pe=new u.SymbolInformation(G.name,te.to(G.kind),G.containerName,ge.to(G.location));return Pe.tags=G.tags&&G.tags.map(de.to),Pe}_e.to=me})(re=e.WorkspaceSymbol||(e.WorkspaceSymbol={}));var be;(function(_e){function Te(G){const Pe={name:G.name||"!!MISSING: name!!",detail:G.detail,range:c.from(G.range),selectionRange:c.from(G.selectionRange),kind:te.from(G.kind),tags:G.tags?.map(de.from)??[]};return G.children&&(Pe.children=G.children.map(Te)),Pe}_e.from=Te;function me(G){const Pe=new u.DocumentSymbol(G.name,G.detail,te.to(G.kind),c.to(G.range),c.to(G.selectionRange));return(0,i.isNonEmptyArray)(G.tags)&&(Pe.tags=G.tags.map(de.to)),G.children&&(Pe.children=G.children.map(me)),Pe}_e.to=me})(be=e.DocumentSymbol||(e.DocumentSymbol={}));var le;(function(_e){function Te(G){const Pe=new u.CallHierarchyItem(te.to(G.kind),G.name,G.detail||"",O.URI.revive(G.uri),c.to(G.range),c.to(G.selectionRange));return Pe._sessionId=G._sessionId,Pe._itemId=G._itemId,Pe}_e.to=Te;function me(G,Pe,Me){if(Pe=Pe??G._sessionId,Me=Me??G._itemId,Pe===void 0||Me===void 0)throw new Error("invalid item");return{_sessionId:Pe,_itemId:Me,name:G.name,detail:G.detail,kind:te.from(G.kind),uri:G.uri,range:c.from(G.range),selectionRange:c.from(G.selectionRange),tags:G.tags?.map(de.from)}}_e.from=me})(le=e.CallHierarchyItem||(e.CallHierarchyItem={}));var fe;(function(_e){function Te(me){return new u.CallHierarchyIncomingCall(le.to(me.from),me.fromRanges.map(G=>c.to(G)))}_e.to=Te})(fe=e.CallHierarchyIncomingCall||(e.CallHierarchyIncomingCall={}));var Y;(function(_e){function Te(me){return new u.CallHierarchyOutgoingCall(le.to(me.to),me.fromRanges.map(G=>c.to(G)))}_e.to=Te})(Y=e.CallHierarchyOutgoingCall||(e.CallHierarchyOutgoingCall={}));var ge;(function(_e){function Te(G){return{range:G.range&&c.from(G.range),uri:G.uri}}_e.from=Te;function me(G){return new u.Location(O.URI.revive(G.uri),c.to(G.range))}_e.to=me})(ge=e.location||(e.location={}));var Se;(function(_e){function Te(G){const Pe=G,Me=G;return{originSelectionRange:Pe.originSelectionRange?c.from(Pe.originSelectionRange):void 0,uri:Pe.targetUri?Pe.targetUri:Me.uri,range:c.from(Pe.targetRange?Pe.targetRange:Me.range),targetSelectionRange:Pe.targetSelectionRange?c.from(Pe.targetSelectionRange):void 0}}_e.from=Te;function me(G){return{targetUri:O.URI.revive(G.uri),targetRange:c.to(G.range),targetSelectionRange:G.targetSelectionRange?c.to(G.targetSelectionRange):void 0,originSelectionRange:G.originSelectionRange?c.to(G.originSelectionRange):void 0}}_e.to=me})(Se=e.DefinitionLink||(e.DefinitionLink={}));var Oe;(function(_e){function Te(G){return{range:c.from(G.range),contents:W.fromMany(G.contents)}}_e.from=Te;function me(G){return new u.Hover(G.contents.map(W.to),c.to(G.range))}_e.to=me})(Oe=e.Hover||(e.Hover={}));var Be;(function(_e){function Te(G){return{range:c.from(G.range),expression:G.expression}}_e.from=Te;function me(G){return new u.EvaluatableExpression(c.to(G.range),G.expression)}_e.to=me})(Be=e.EvaluatableExpression||(e.EvaluatableExpression={}));var Xe;(function(_e){function Te(G){if(G instanceof u.InlineValueText)return{type:"text",range:c.from(G.range),text:G.text};if(G instanceof u.InlineValueVariableLookup)return{type:"variable",range:c.from(G.range),variableName:G.variableName,caseSensitiveLookup:G.caseSensitiveLookup};if(G instanceof u.InlineValueEvaluatableExpression)return{type:"expression",range:c.from(G.range),expression:G.expression};throw new Error("Unknown 'InlineValue' type")}_e.from=Te;function me(G){switch(G.type){case"text":return{range:c.to(G.range),text:G.text};case"variable":return{range:c.to(G.range),variableName:G.variableName,caseSensitiveLookup:G.caseSensitiveLookup};case"expression":return{range:c.to(G.range),expression:G.expression}}}_e.to=me})(Xe=e.InlineValue||(e.InlineValue={}));var ke;(function(_e){function Te(G){return{frameId:G.frameId,stoppedLocation:c.from(G.stoppedLocation)}}_e.from=Te;function me(G){return new u.InlineValueContext(G.frameId,c.to(G.stoppedLocation))}_e.to=me})(ke=e.InlineValueContext||(e.InlineValueContext={}));var ye;(function(_e){function Te(G){return{range:c.from(G.range),kind:G.kind}}_e.from=Te;function me(G){return new u.DocumentHighlight(c.to(G.range),G.kind)}_e.to=me})(ye=e.DocumentHighlight||(e.DocumentHighlight={}));var Ie;(function(_e){function Te(me){switch(me){case 1:return u.CompletionTriggerKind.TriggerCharacter;case 2:return u.CompletionTriggerKind.TriggerForIncompleteCompletions;case 0:default:return u.CompletionTriggerKind.Invoke}}_e.to=Te})(Ie=e.CompletionTriggerKind||(e.CompletionTriggerKind={}));var ae;(function(_e){function Te(me){return{triggerKind:Ie.to(me.triggerKind),triggerCharacter:me.triggerCharacter}}_e.to=Te})(ae=e.CompletionContext||(e.CompletionContext={}));var ue;(function(_e){function Te(G){switch(G){case u.CompletionItemTag.Deprecated:return 1}}_e.from=Te;function me(G){switch(G){case 1:return u.CompletionItemTag.Deprecated}}_e.to=me})(ue=e.CompletionItemTag||(e.CompletionItemTag={}));var ee;(function(_e){const Te=new Map([[u.CompletionItemKind.Method,0],[u.CompletionItemKind.Function,1],[u.CompletionItemKind.Constructor,2],[u.CompletionItemKind.Field,3],[u.CompletionItemKind.Variable,4],[u.CompletionItemKind.Class,5],[u.CompletionItemKind.Interface,7],[u.CompletionItemKind.Struct,6],[u.CompletionItemKind.Module,8],[u.CompletionItemKind.Property,9],[u.CompletionItemKind.Unit,12],[u.CompletionItemKind.Value,13],[u.CompletionItemKind.Constant,14],[u.CompletionItemKind.Enum,15],[u.CompletionItemKind.EnumMember,16],[u.CompletionItemKind.Keyword,17],[u.CompletionItemKind.Snippet,27],[u.CompletionItemKind.Text,18],[u.CompletionItemKind.Color,19],[u.CompletionItemKind.File,20],[u.CompletionItemKind.Reference,21],[u.CompletionItemKind.Folder,23],[u.CompletionItemKind.Event,10],[u.CompletionItemKind.Operator,11],[u.CompletionItemKind.TypeParameter,24],[u.CompletionItemKind.Issue,26],[u.CompletionItemKind.User,25]]);function me(Me){return Te.get(Me)??9}_e.from=me;const G=new Map([[0,u.CompletionItemKind.Method],[1,u.CompletionItemKind.Function],[2,u.CompletionItemKind.Constructor],[3,u.CompletionItemKind.Field],[4,u.CompletionItemKind.Variable],[5,u.CompletionItemKind.Class],[7,u.CompletionItemKind.Interface],[6,u.CompletionItemKind.Struct],[8,u.CompletionItemKind.Module],[9,u.CompletionItemKind.Property],[12,u.CompletionItemKind.Unit],[13,u.CompletionItemKind.Value],[14,u.CompletionItemKind.Constant],[15,u.CompletionItemKind.Enum],[16,u.CompletionItemKind.EnumMember],[17,u.CompletionItemKind.Keyword],[27,u.CompletionItemKind.Snippet],[18,u.CompletionItemKind.Text],[19,u.CompletionItemKind.Color],[20,u.CompletionItemKind.File],[21,u.CompletionItemKind.Reference],[23,u.CompletionItemKind.Folder],[10,u.CompletionItemKind.Event],[11,u.CompletionItemKind.Operator],[24,u.CompletionItemKind.TypeParameter],[25,u.CompletionItemKind.User],[26,u.CompletionItemKind.Issue]]);function Pe(Me){return G.get(Me)??u.CompletionItemKind.Property}_e.to=Pe})(ee=e.CompletionItemKind||(e.CompletionItemKind={}));var Z;(function(_e){function Te(me,G){const Pe=new u.CompletionItem(me.label);return Pe.insertText=me.insertText,Pe.kind=ee.to(me.kind),Pe.tags=me.tags?.map(ue.to),Pe.detail=me.detail,Pe.documentation=S.isMarkdownString(me.documentation)?W.to(me.documentation):me.documentation,Pe.sortText=me.sortText,Pe.filterText=me.filterText,Pe.preselect=me.preselect,Pe.commitCharacters=me.commitCharacters,b.Range.isIRange(me.range)?Pe.range=c.to(me.range):typeof me.range=="object"&&(Pe.range={inserting:c.to(me.range.insert),replacing:c.to(me.range.replace)}),Pe.keepWhitespace=typeof me.insertTextRules>"u"?!1:Boolean(me.insertTextRules&1),typeof me.insertTextRules<"u"&&me.insertTextRules&4?Pe.insertText=new u.SnippetString(me.insertText):(Pe.insertText=me.insertText,Pe.textEdit=Pe.range instanceof u.Range?new u.TextEdit(Pe.range,Pe.insertText):void 0),me.additionalTextEdits&&me.additionalTextEdits.length>0&&(Pe.additionalTextEdits=me.additionalTextEdits.map(Me=>U.to(Me))),Pe.command=G&&me.command?G.fromInternal(me.command):void 0,Pe}_e.to=Te})(Z=e.CompletionItem||(e.CompletionItem={}));var C;(function(_e){function Te(G){if(typeof G.label!="string"&&!Array.isArray(G.label))throw new TypeError("Invalid label");return{label:G.label,documentation:W.fromStrict(G.documentation)}}_e.from=Te;function me(G){return{label:G.label,documentation:S.isMarkdownString(G.documentation)?W.to(G.documentation):G.documentation}}_e.to=me})(C=e.ParameterInformation||(e.ParameterInformation={}));var z;(function(_e){function Te(G){return{label:G.label,documentation:W.fromStrict(G.documentation),parameters:Array.isArray(G.parameters)?G.parameters.map(C.from):[],activeParameter:G.activeParameter}}_e.from=Te;function me(G){return{label:G.label,documentation:S.isMarkdownString(G.documentation)?W.to(G.documentation):G.documentation,parameters:Array.isArray(G.parameters)?G.parameters.map(C.to):[],activeParameter:G.activeParameter}}_e.to=me})(z=e.SignatureInformation||(e.SignatureInformation={}));var V;(function(_e){function Te(G){return{activeSignature:G.activeSignature,activeParameter:G.activeParameter,signatures:Array.isArray(G.signatures)?G.signatures.map(z.from):[]}}_e.from=Te;function me(G){return{activeSignature:G.activeSignature,activeParameter:G.activeParameter,signatures:Array.isArray(G.signatures)?G.signatures.map(z.to):[]}}_e.to=me})(V=e.SignatureHelp||(e.SignatureHelp={}));var q;(function(_e){function Te(me,G){const Pe=new u.InlayHint(d.to(G.position),typeof G.label=="string"?G.label:G.label.map(oe.to.bind(void 0,me)),G.kind&&ce.to(G.kind));return Pe.textEdits=G.textEdits&&G.textEdits.map(U.to),Pe.tooltip=S.isMarkdownString(G.tooltip)?W.to(G.tooltip):G.tooltip,Pe.paddingLeft=G.paddingLeft,Pe.paddingRight=G.paddingRight,Pe}_e.to=Te})(q=e.InlayHint||(e.InlayHint={}));var oe;(function(_e){function Te(me,G){const Pe=new u.InlayHintLabelPart(G.label);return Pe.tooltip=S.isMarkdownString(G.tooltip)?W.to(G.tooltip):G.tooltip,g.Command.is(G.command)&&(Pe.command=me.fromInternal(G.command)),G.location&&(Pe.location=ge.to(G.location)),Pe}_e.to=Te})(oe=e.InlayHintLabelPart||(e.InlayHintLabelPart={}));var ce;(function(_e){function Te(G){return G}_e.from=Te;function me(G){return G}_e.to=me})(ce=e.InlayHintKind||(e.InlayHintKind={}));var J;(function(_e){function Te(G){return{range:c.from(G.range),url:G.target,tooltip:G.tooltip}}_e.from=Te;function me(G){let Pe;if(G.url)try{Pe=typeof G.url=="string"?O.URI.parse(G.url,!0):O.URI.revive(G.url)}catch{}return new u.DocumentLink(c.to(G.range),Pe)}_e.to=me})(J=e.DocumentLink||(e.DocumentLink={}));var pe;(function(_e){function Te(G){const Pe=new u.ColorPresentation(G.label);return G.textEdit&&(Pe.textEdit=U.to(G.textEdit)),G.additionalTextEdits&&(Pe.additionalTextEdits=G.additionalTextEdits.map(Me=>U.to(Me))),Pe}_e.to=Te;function me(G){return{label:G.label,textEdit:G.textEdit?U.from(G.textEdit):void 0,additionalTextEdits:G.additionalTextEdits?G.additionalTextEdits.map(Pe=>U.from(Pe)):void 0}}_e.from=me})(pe=e.ColorPresentation||(e.ColorPresentation={}));var Ee;(function(_e){function Te(G){return new u.Color(G[0],G[1],G[2],G[3])}_e.to=Te;function me(G){return[G.red,G.green,G.blue,G.alpha]}_e.from=me})(Ee=e.Color||(e.Color={}));var Ne;(function(_e){function Te(G){return{range:c.from(G.range)}}_e.from=Te;function me(G){return new u.SelectionRange(c.to(G.range))}_e.to=me})(Ne=e.SelectionRange||(e.SelectionRange={}));var xe;(function(_e){function Te(me){switch(me){case 2:return u.TextDocumentSaveReason.AfterDelay;case 1:return u.TextDocumentSaveReason.Manual;case 3:case 4:return u.TextDocumentSaveReason.FocusOut}}_e.to=Te})(xe=e.TextDocumentSaveReason||(e.TextDocumentSaveReason={}));var Ze;(function(_e){function Te(G){switch(G){case u.TextEditorLineNumbersStyle.Off:return 0;case u.TextEditorLineNumbersStyle.Relative:return 2;case u.TextEditorLineNumbersStyle.On:default:return 1}}_e.from=Te;function me(G){switch(G){case 0:return u.TextEditorLineNumbersStyle.Off;case 2:return u.TextEditorLineNumbersStyle.Relative;case 1:default:return u.TextEditorLineNumbersStyle.On}}_e.to=me})(Ze=e.TextEditorLineNumbersStyle||(e.TextEditorLineNumbersStyle={}));var Ge;(function(_e){function Te(G){if(G===u.EndOfLine.CRLF)return 1;if(G===u.EndOfLine.LF)return 0}_e.from=Te;function me(G){if(G===1)return u.EndOfLine.CRLF;if(G===0)return u.EndOfLine.LF}_e.to=me})(Ge=e.EndOfLine||(e.EndOfLine={}));var Qe;(function(_e){function Te(me){if(typeof me=="object")return me.viewId;switch(me){case u.ProgressLocation.SourceControl:return 3;case u.ProgressLocation.Window:return 10;case u.ProgressLocation.Notification:return 15}throw new Error("Unknown 'ProgressLocation'")}_e.from=Te})(Qe=e.ProgressLocation||(e.ProgressLocation={}));var Fe;(function(_e){function Te(me){const G={start:me.start+1,end:me.end+1};return me.kind&&(G.kind=dt.from(me.kind)),G}_e.from=Te})(Fe=e.FoldingRange||(e.FoldingRange={}));var dt;(function(_e){function Te(me){if(me)switch(me){case u.FoldingRangeKind.Comment:return g.FoldingRangeKind.Comment;case u.FoldingRangeKind.Imports:return g.FoldingRangeKind.Imports;case u.FoldingRangeKind.Region:return g.FoldingRangeKind.Region}}_e.from=Te})(dt=e.FoldingRangeKind||(e.FoldingRangeKind={}));var X;(function(_e){function Te(me){if(me)return{pinned:typeof me.preview=="boolean"?!me.preview:void 0,inactive:me.background,preserveFocus:me.preserveFocus,selection:typeof me.selection=="object"?c.from(me.selection):void 0,override:typeof me.override=="boolean"?t.DEFAULT_EDITOR_ASSOCIATION.id:void 0}}_e.from=Te})(X=e.TextEditorOpenOptions||(e.TextEditorOpenOptions={}));var Q;(function(_e){function Te(Me){return Me instanceof u.RelativePattern?Me.toJSON():typeof Me=="string"?Me:me(Me)||G(Me)?new u.RelativePattern(Me.baseUri??Me.base,Me.pattern).toJSON():Me}_e.from=Te;function me(Me){const et=Me;return et?O.URI.isUri(et.baseUri)&&typeof et.pattern=="string":!1}function G(Me){const et=Me;return et?typeof et.base=="string"&&typeof et.pattern=="string":!1}function Pe(Me){return typeof Me=="string"?Me:new u.RelativePattern(O.URI.revive(Me.baseUri),Me.pattern)}_e.to=Pe})(Q=e.GlobPattern||(e.GlobPattern={}));var ve;(function(_e){function Te(me){if(me){if(Array.isArray(me))return me.map(Te);if(typeof me=="string")return me;{const G=me;return{language:G.language,scheme:G.scheme,pattern:Q.from(G.pattern),exclusive:G.exclusive,notebookType:G.notebookType}}}else return}_e.from=Te})(ve=e.LanguageSelector||(e.LanguageSelector={}));var Ue;(function(_e){function Te(G){return{start:G.start,end:G.end}}_e.from=Te;function me(G){return new u.NotebookRange(G.start,G.end)}_e.to=me})(Ue=e.NotebookRange||(e.NotebookRange={}));var je;(function(_e){function Te(G){return{timing:typeof G.runStartTime=="number"&&typeof G.runEndTime=="number"?{startTime:G.runStartTime,endTime:G.runEndTime}:void 0,executionOrder:G.executionOrder,success:G.lastRunSuccess}}_e.to=Te;function me(G){return{lastRunSuccess:G.success,runStartTime:G.timing?.startTime,runEndTime:G.timing?.endTime,executionOrder:G.executionOrder}}_e.from=me})(je=e.NotebookCellExecutionSummary||(e.NotebookCellExecutionSummary={}));var qe;(function(_e){function Te(me){if(me===o.NotebookCellExecutionState.Unconfirmed)return u.NotebookCellExecutionState.Pending;if(me===o.NotebookCellExecutionState.Pending)return;if(me===o.NotebookCellExecutionState.Executing)return u.NotebookCellExecutionState.Executing;throw new Error(`Unknown state: ${me}`)}_e.to=Te})(qe=e.NotebookCellExecutionState||(e.NotebookCellExecutionState={}));var ze;(function(_e){function Te(G){switch(G){case u.NotebookCellKind.Markup:return o.CellKind.Markup;case u.NotebookCellKind.Code:default:return o.CellKind.Code}}_e.from=Te;function me(G){switch(G){case o.CellKind.Markup:return u.NotebookCellKind.Markup;case o.CellKind.Code:default:return u.NotebookCellKind.Code}}_e.to=me})(ze=e.NotebookCellKind||(e.NotebookCellKind={}));var tt;(function(_e){function Te(G){const Pe={metadata:G.metadata??Object.create(null),cells:[]};for(const Me of G.cells)u.NotebookCellData.validate(Me),Pe.cells.push(nt.from(Me));return Pe}_e.from=Te;function me(G){const Pe=new u.NotebookData(G.cells.map(nt.to));return(0,T.isEmptyObject)(G.metadata)||(Pe.metadata=G.metadata),Pe}_e.to=me})(tt=e.NotebookData||(e.NotebookData={}));var nt;(function(_e){function Te(G){return{cellKind:ze.from(G.kind),language:G.languageId,mime:G.mime,source:G.value,metadata:G.metadata,internalMetadata:je.from(G.executionSummary??{}),outputs:G.outputs?G.outputs.map(Dt.from):[]}}_e.from=Te;function me(G){return new u.NotebookCellData(ze.to(G.cellKind),G.source,G.language,G.mime,G.outputs?G.outputs.map(Dt.to):void 0,G.metadata,G.internalMetadata?je.to(G.internalMetadata):void 0)}_e.to=me})(nt=e.NotebookCellData||(e.NotebookCellData={}));var lt;(function(_e){function Te(G){return{mime:G.mime,valueBytes:D.VSBuffer.wrap(G.data)}}_e.from=Te;function me(G){return new u.NotebookCellOutputItem(G.valueBytes.buffer,G.mime)}_e.to=me})(lt=e.NotebookCellOutputItem||(e.NotebookCellOutputItem={}));var Dt;(function(_e){function Te(G){return{outputId:G.id,items:G.items.map(lt.from),metadata:G.metadata}}_e.from=Te;function me(G){const Pe=G.items.map(lt.to);return new u.NotebookCellOutput(Pe,G.outputId,G.metadata)}_e.to=me})(Dt=e.NotebookCellOutput||(e.NotebookCellOutput={}));var ot;(function(_e){function Te(Pe){return G(Pe)?{include:(0,T.withNullAsUndefined)(Q.from(Pe.include)),exclude:(0,T.withNullAsUndefined)(Q.from(Pe.exclude))}:(0,T.withNullAsUndefined)(Q.from(Pe))}_e.from=Te;function me(Pe){return G(Pe)?{include:Q.to(Pe.include),exclude:Q.to(Pe.exclude)}:Q.to(Pe)}_e.to=me;function G(Pe){const Me=Pe;return Me?!(0,T.isUndefinedOrNull)(Me.include)&&!(0,T.isUndefinedOrNull)(Me.exclude):!1}})(ot=e.NotebookExclusiveDocumentPattern||(e.NotebookExclusiveDocumentPattern={}));var rt;(function(_e){function Te(me,G,Pe){const Me=typeof me.command=="string"?{title:"",command:me.command}:me.command;return{alignment:me.alignment===u.NotebookCellStatusBarAlignment.Left?1:2,command:G.toInternal(Me,Pe),text:me.text,tooltip:me.tooltip,accessibilityInformation:me.accessibilityInformation,priority:me.priority}}_e.from=Te})(rt=e.NotebookStatusBarItem||(e.NotebookStatusBarItem={}));var Nt;(function(_e){function Te(me){return{transientOutputs:me?.transientOutputs??!1,transientCellMetadata:me?.transientCellMetadata??{},transientDocumentMetadata:me?.transientDocumentMetadata??{},cellContentMetadata:me?.cellContentMetadata??{}}}_e.from=Te})(Nt=e.NotebookDocumentContentOptions||(e.NotebookDocumentContentOptions={}));var Ot;(function(_e){function Te(G){return{uri:G.uri,provides:G.provides}}_e.from=Te;function me(G){return new u.NotebookRendererScript(O.URI.revive(G.uri),G.provides)}_e.to=me})(Ot=e.NotebookRendererScript||(e.NotebookRendererScript={}));var kt;(function(_e){function Te(G){return{message:W.fromStrict(G.message)||"",type:0,expected:G.expectedOutput,actual:G.actualOutput,location:G.location&&{range:c.from(G.location.range),uri:G.location.uri}}}_e.from=Te;function me(G){const Pe=new u.TestMessage(typeof G.message=="string"?G.message:W.to(G.message));return Pe.actualOutput=G.actual,Pe.expectedOutput=G.expected,Pe.location=G.location?ge.to(G.location):void 0,Pe}_e.to=me})(kt=e.TestMessage||(e.TestMessage={}));var mt;(function(_e){_e.namespace=p.namespaceTestTag,_e.denamespace=p.denamespaceTestTag})(mt=e.TestTag||(e.TestTag={}));var St;(function(_e){function Te(G){const Pe=(0,m.getPrivateApiFor)(G).controllerId;return{extId:a.TestId.fromExtHostTestItem(G,Pe).toString(),label:G.label,uri:O.URI.revive(G.uri),busy:G.busy,tags:G.tags.map(Me=>mt.namespace(Pe,Me.id)),range:b.Range.lift(c.from(G.range)),description:G.description||null,sortText:G.sortText||null,error:G.error&&W.fromStrict(G.error)||null}}_e.from=Te;function me(G){return{parent:void 0,error:void 0,id:a.TestId.fromString(G.extId).localId,label:G.label,uri:O.URI.revive(G.uri),tags:(G.tags||[]).map(Pe=>{const{tagId:Me}=mt.denamespace(Pe);return new u.TestTag(Me)}),children:{add:()=>{},delete:()=>{},forEach:()=>{},*[Symbol.iterator](){},get:()=>{},replace:()=>{},size:0},range:c.to(G.range||void 0),canResolveChildren:!1,busy:G.busy,description:G.description||void 0,sortText:G.sortText||void 0}}_e.toPlain=me})(St=e.TestItem||(e.TestItem={})),function(_e){function Te(G){return{id:G.id}}_e.from=Te;function me(G){return new u.TestTag(G.id)}_e.to=me}(mt=e.TestTag||(e.TestTag={}));var Lt;(function(_e){const Te=(G,Pe)=>{const Me=[];for(const[$e,it]of Pe)a.TestId.compare(it.item.extId,$e)===2&&(Pe.delete($e),Me.push(it));const et={...St.toPlain(G.item),parent:void 0,taskStates:G.tasks.map($e=>({state:$e.state,duration:$e.duration,messages:$e.messages.filter(it=>it.type===0).map(kt.to)})),children:Me.map($e=>Te($e,Pe))};for(const $e of et.children)$e.parent=et;return et};function me(G){const Pe=[],Me=new Map;for(const et of G.items){Me.set(et.item.extId,et);const $e=a.TestId.root(et.item.extId);G.request.targets.some(it=>it.controllerId===$e&&it.testIds.includes(et.item.extId))&&Pe.push(et)}return{completedAt:G.completedAt,results:Pe.map(et=>Te(et,Me))}}_e.to=me})(Lt=e.TestResults||(e.TestResults={}));var Ut;(function(_e){function Te(Me){return{covered:Me.covered,total:Me.covered}}function me(Me){return"line"in Me?d.from(Me):c.from(Me)}function G(Me){return"branches"in Me?{count:Me.executionCount,location:me(Me.location),type:1,branches:Me.branches.length?Me.branches.map(et=>({count:et.executionCount,location:et.location&&me(et.location)})):void 0}:{type:0,count:Me.executionCount,location:me(Me.location)}}_e.fromDetailed=G;function Pe(Me){return{uri:Me.uri,statement:Te(Me.statementCoverage),branch:Me.branchCoverage&&Te(Me.branchCoverage),function:Me.functionCoverage&&Te(Me.functionCoverage),details:Me.detailedCoverage?.map(G)}}_e.fromFile=Pe})(Ut=e.TestCoverage||(e.TestCoverage={}));var Ke;(function(_e){function Te(me){switch(me){case 1:return u.CodeActionTriggerKind.Invoke;case 2:return u.CodeActionTriggerKind.Automatic}}_e.to=Te})(Ke=e.CodeActionTriggerKind||(e.CodeActionTriggerKind={}));var It;(function(_e){function Te(G){const Pe=new u.TypeHierarchyItem(te.to(G.kind),G.name,G.detail||"",O.URI.revive(G.uri),c.to(G.range),c.to(G.selectionRange));return Pe._sessionId=G._sessionId,Pe._itemId=G._itemId,Pe}_e.to=Te;function me(G,Pe,Me){if(Pe=Pe??G._sessionId,Me=Me??G._itemId,Pe===void 0||Me===void 0)throw new Error("invalid item");return{_sessionId:Pe,_itemId:Me,kind:te.from(G.kind),name:G.name,detail:G.detail??"",uri:G.uri,range:c.from(G.range),selectionRange:c.from(G.selectionRange),tags:G.tags?.map(de.from)}}_e.from=me})(It=e.TypeHierarchyItem||(e.TypeHierarchyItem={}));var Pt;(function(_e){function Te(me){if(!!me)return{value:me.value,tooltip:me.tooltip}}_e.from=Te})(Pt=e.ViewBadge||(e.ViewBadge={}));var Ft;(function(_e){function Te(me,G){const Pe=me.fileData;return Pe?new class extends u.DataTransferItem{asFile(){return{name:Pe.name,uri:O.URI.revive(Pe.uri),data:(0,I.once)(()=>G())}}}("",me.id):new u.DataTransferItem(me.asString)}_e.toDataTransferItem=Te})(Ft=e.DataTransferItem||(e.DataTransferItem={}));var pt;(function(_e){function Te(G,Pe){const Me=G.items.map(([et,$e])=>[et,Ft.toDataTransferItem($e,()=>Pe($e.id))]);return new u.DataTransfer(Me)}_e.toDataTransfer=Te;async function me(G){const Pe={items:[]},Me=[];return G.forEach((et,$e)=>{Me.push((async()=>{const it=await et.asString(),ct=et.asFile();Pe.items.push([$e,{id:et.id,asString:it,fileData:ct?{name:ct.name,uri:ct.uri}:void 0}])})())}),await Promise.all(Me),Pe}_e.toDataTransferDTO=me})(pt=e.DataTransfer||(e.DataTransfer={}))}),define(De[184],Ce([1,0,2,12,6,8,150]),function(ne,e,i,D,S,N,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtHostDocumentSaveParticipant=void 0;class A{constructor(T,O,b,g={timeout:1500,errors:3}){this._logService=T,this._documents=O,this._mainThreadBulkEdits=b,this._thresholds=g,this._callbacks=new y.LinkedList,this._badListeners=new WeakMap}dispose(){this._callbacks.clear()}getOnWillSaveTextDocumentEvent(T){return(O,b,g)=>{const m={dispose:this._callbacks.push([O,b,T])};return Array.isArray(g)&&g.push(m),m}}async $participateInSave(T,O){const b=i.URI.revive(T);let g=!1;const E=setTimeout(()=>g=!0,this._thresholds.timeout),m=[];try{for(const t of[...this._callbacks]){if(g)break;const o=this._documents.getDocument(b),a=await this._deliverEventAsyncAndBlameBadListeners(t,{document:o,reason:N.TextDocumentSaveReason.to(O)});m.push(a)}}finally{clearTimeout(E)}return m}_deliverEventAsyncAndBlameBadListeners([T,O,b],g){const E=this._badListeners.get(T);return typeof E=="number"&&E>this._thresholds.errors?Promise.resolve(!1):this._deliverEventAsync(b,T,O,g).then(()=>!0,m=>{if(this._logService.error(`onWillSaveTextDocument-listener from extension '${b.identifier.value}' threw ERROR`),this._logService.error(m),!(m instanceof Error)||m.message!=="concurrent_edits"){const t=this._badListeners.get(T);this._badListeners.set(T,t?t+1:1),typeof t=="number"&&t>this._thresholds.errors&&this._logService.info(`onWillSaveTextDocument-listener from extension '${b.identifier.value}' will now be IGNORED because of timeouts and/or errors`)}return!1})}_deliverEventAsync(T,O,b,g){const E=[],m=Date.now(),{document:t,reason:o}=g,{version:a}=t,p=Object.freeze({document:t,reason:o,waitUntil(w){if(Object.isFrozen(E))throw(0,D.illegalState)("waitUntil can not be called async");E.push(Promise.resolve(w))}});try{O.apply(b,[p])}catch(w){return Promise.reject(w)}return Object.freeze(E),new Promise((w,u)=>{const I=setTimeout(()=>u(new Error("timeout")),this._thresholds.timeout);return Promise.all(E).then(r=>{this._logService.debug(`onWillSaveTextDocument-listener from extension '${T.identifier.value}' finished after ${Date.now()-m}ms`),clearTimeout(I),w(r)}).catch(r=>{clearTimeout(I),u(r)})}).then(w=>{const u={edits:[]};for(const I of w)if(Array.isArray(I)&&I.every(r=>r instanceof S.TextEdit))for(const{newText:r,newEol:c,range:n}of I)u.edits.push({resource:t.uri,versionId:void 0,textEdit:{range:n&&N.Range.from(n),text:r,eol:c&&N.EndOfLine.from(c)}});if(u.edits.length!==0)return a===t.version?this._mainThreadBulkEdits.$tryApplyWorkspaceEdit(u):Promise.reject(new Error("concurrent_edits"))})}}e.ExtHostDocumentSaveParticipant=A}),define(De[185],Ce([1,0,13,2,8,6,66]),function(ne,e,i,D,S,N,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtHostNotebookDocument=e.ExtHostCell=void 0;class A{constructor(b,g,E,m){this.start=b,this.deletedCount=g,this.deletedItems=E,this.items=m}asApiEvent(){return{range:new N.NotebookRange(this.start,this.start+this.deletedCount),addedCells:this.items.map(b=>b.apiCell),removedCells:this.deletedItems}}}class _{static asModelAddData(b,g){return{EOL:g.eol,lines:g.source,languageId:g.language,uri:g.uri,isDirty:!1,versionId:1,notebook:b}}constructor(b,g,E){this.notebook=b,this._extHostDocument=g,this._cellData=E,this.handle=E.handle,this.uri=D.URI.revive(E.uri),this.cellKind=E.cellKind,this._outputs=E.outputs.map(S.NotebookCellOutput.to),this._internalMetadata=E.internalMetadata??{},this._metadata=Object.freeze(E.metadata??{}),this._previousResult=Object.freeze(S.NotebookCellExecutionSummary.to(E.internalMetadata??{}))}get internalMetadata(){return this._internalMetadata}get apiCell(){if(!this._apiCell){const b=this,g=this._extHostDocument.getDocument(this.uri);if(!g)throw new Error(`MISSING extHostDocument for notebook cell: ${this.uri}`);const E={get index(){return b.notebook.getCellIndex(b)},notebook:b.notebook.apiNotebook,kind:S.NotebookCellKind.to(this._cellData.cellKind),document:g.document,get mime(){return b._mime},set mime(m){b._mime=m},get outputs(){return b._outputs.slice(0)},get metadata(){return b._metadata},get executionSummary(){return b._previousResult}};this._apiCell=Object.freeze(E)}return this._apiCell}setOutputs(b){this._outputs=b.map(S.NotebookCellOutput.to)}setOutputItems(b,g,E){const m=E.map(S.NotebookCellOutputItem.to),t=this._outputs.find(o=>o.id===b);if(t&&(g||(t.items.length=0),t.items.push(...m),t.items.length>1&&t.items.every(o=>y.isTextStreamMime(o.mime)))){const o=new Map,a=[];t.items.forEach(p=>{let w;o.has(p.mime)?w=o.get(p.mime):(w=[],o.set(p.mime,w),a.push(p.mime)),w.push(p.data)}),t.items.length=0,a.forEach(p=>{const w=y.compressOutputItemStreams(o.get(p));t.items.push({mime:p,data:w.buffer})})}}setMetadata(b){this._metadata=Object.freeze(b)}setInternalMetadata(b){this._internalMetadata=b,this._previousResult=Object.freeze(S.NotebookCellExecutionSummary.to(b))}setMime(b){}}e.ExtHostCell=_;class T{constructor(b,g,E,m,t){this._proxy=b,this._textDocumentsAndEditors=g,this._textDocuments=E,this.uri=m,this.handle=T._handlePool++,this._cells=[],this._versionId=0,this._isDirty=!1,this._disposed=!1,this._notebookType=t.viewType,this._metadata=Object.freeze(t.metadata??Object.create(null)),this._spliceNotebookCells([[0,0,t.cells]],!0,void 0),this._versionId=t.versionId}dispose(){this._disposed=!0}get apiNotebook(){if(!this._notebook){const b=this,g={get uri(){return b.uri},get version(){return b._versionId},get notebookType(){return b._notebookType},get isDirty(){return b._isDirty},get isUntitled(){return b.uri.scheme===i.Schemas.untitled},get isClosed(){return b._disposed},get metadata(){return b._metadata},get cellCount(){return b._cells.length},cellAt(E){return E=b._validateIndex(E),b._cells[E].apiCell},getCells(E){return(E?b._getCells(E):b._cells).map(t=>t.apiCell)},save(){return b._save()}};this._notebook=Object.freeze(g)}return this._notebook}acceptDocumentPropertiesChanged(b){b.metadata&&(this._metadata=Object.freeze({...this._metadata,...b.metadata}))}acceptDirty(b){this._isDirty=b}acceptModelChanged(b,g,E){this._versionId=b.versionId,this._isDirty=g,this.acceptDocumentPropertiesChanged({metadata:E});const m={notebook:this.apiNotebook,metadata:E,cellChanges:[],contentChanges:[]},t=[];for(const a of b.rawEvents)a.kind===y.NotebookCellsChangeType.ModelChange?this._spliceNotebookCells(a.changes,!1,m.contentChanges):a.kind===y.NotebookCellsChangeType.Move?this._moveCells(a.index,a.length,a.newIdx,m.contentChanges):a.kind===y.NotebookCellsChangeType.Output?(this._setCellOutputs(a.index,a.outputs),t.push({cell:this._cells[a.index].apiCell,outputs:this._cells[a.index].apiCell.outputs})):a.kind===y.NotebookCellsChangeType.OutputItem?(this._setCellOutputItems(a.index,a.outputId,a.append,a.outputItems),t.push({cell:this._cells[a.index].apiCell,outputs:this._cells[a.index].apiCell.outputs})):a.kind===y.NotebookCellsChangeType.ChangeCellLanguage?(this._changeCellLanguage(a.index,a.language),t.push({cell:this._cells[a.index].apiCell,document:this._cells[a.index].apiCell.document})):a.kind===y.NotebookCellsChangeType.ChangeCellContent?t.push({cell:this._cells[a.index].apiCell,document:this._cells[a.index].apiCell.document}):a.kind===y.NotebookCellsChangeType.ChangeCellMime?this._changeCellMime(a.index,a.mime):a.kind===y.NotebookCellsChangeType.ChangeCellMetadata?(this._changeCellMetadata(a.index,a.metadata),t.push({cell:this._cells[a.index].apiCell,metadata:this._cells[a.index].apiCell.metadata})):a.kind===y.NotebookCellsChangeType.ChangeCellInternalMetadata&&(this._changeCellInternalMetadata(a.index,a.internalMetadata),t.push({cell:this._cells[a.index].apiCell,executionSummary:this._cells[a.index].apiCell.executionSummary}));const o=new Map;for(let a=0;a=this._cells.length?this._cells.length-1:b}_validateRange(b){let g=b.start|0,E=b.end|0;return g<0&&(g=0),E>this._cells.length&&(E=this._cells.length),b.with({start:g,end:E})}_getCells(b){b=this._validateRange(b);const g=[];for(let E=b.start;E{const w=a[2].map(r=>{const c=new _(this,this._textDocumentsAndEditors,r);return g||t.push(_.asModelAddData(this.apiNotebook,r)),c}),u=new A(a[0],a[1],[],w),I=this._cells.splice(a[0],a[1],...w);for(const r of I)o.push(r.uri),u.deletedItems.push(r.apiCell);m.push(u)}),this._textDocumentsAndEditors.acceptDocumentsAndEditorsDelta({addedDocuments:t,removedDocuments:o}),E)for(const a of m)E.push(a.asApiEvent())}_moveCells(b,g,E,m){const t=this._cells.splice(b,g);this._cells.splice(E,0,...t);const o=[new A(b,g,t.map(a=>a.apiCell),[]),new A(E,0,[],t)];for(const a of o)m.push(a.asApiEvent())}_setCellOutputs(b,g){this._cells[b].setOutputs(g)}_setCellOutputItems(b,g,E,m){this._cells[b].setOutputItems(g,E,m)}_changeCellLanguage(b,g){const E=this._cells[b];E.apiCell.document.languageId!==g&&this._textDocuments.$acceptModelLanguageChanged(E.uri,g)}_changeCellMime(b,g){const E=this._cells[b];E.apiCell.mime=g}_changeCellMetadata(b,g){this._cells[b].setMetadata(g)}_changeCellInternalMetadata(b,g){this._cells[b].setInternalMetadata(g)}getCellFromApiCell(b){return this._cells.find(g=>g.apiCell===b)}getCellFromIndex(b){return this._cells[b]}getCell(b){return this._cells.find(g=>g.handle===b)}getCellIndex(b){return this._cells.indexOf(b)}}e.ExtHostNotebookDocument=T,T._handlePool=0}),define(De[95],Ce([1,0,12,8,6]),function(ne,e,i,D,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtHostNotebookEditor=void 0;class N{constructor(A,_,T,O,b,g){this.id=A,this._proxy=_,this.notebookData=T,this._selections=[],this._visibleRanges=[],this._visible=!1,this._selections=b,this._visibleRanges=O,this._viewColumn=g}get apiEditor(){if(!this._editor){const A=this;this._editor={get notebook(){return A.notebookData.apiNotebook},get selection(){return A._selections[0]},set selection(_){this.selections=[_]},get selections(){return A._selections},set selections(_){if(!Array.isArray(_)||!_.every(S.NotebookRange.isNotebookRange))throw(0,i.illegalArgument)("selections");A._selections=_,A._trySetSelections(_)},get visibleRanges(){return A._visibleRanges},revealRange(_,T){A._proxy.$tryRevealRange(A.id,D.NotebookRange.from(_),T??S.NotebookEditorRevealType.Default)},get viewColumn(){return A._viewColumn}},N.apiEditorsToExtHost.set(this._editor,this)}return this._editor}get visible(){return this._visible}_acceptVisibility(A){this._visible=A}_acceptVisibleRanges(A){this._visibleRanges=A}_acceptSelections(A){this._selections=A}_trySetSelections(A){this._proxy.$trySetSelections(this.id,A.map(D.NotebookRange.from))}_acceptViewColumn(A){this._viewColumn=A}}e.ExtHostNotebookEditor=N,N.apiEditorsToExtHost=new WeakMap}),define(De[186],Ce([1,0,4,11,8]),function(ne,e,i,D,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtHostNotebookEditors=void 0;let N=class{constructor(A,_){this._logService=A,this._notebooksAndEditors=_,this._onDidChangeNotebookEditorSelection=new i.Emitter,this._onDidChangeNotebookEditorVisibleRanges=new i.Emitter,this.onDidChangeNotebookEditorSelection=this._onDidChangeNotebookEditorSelection.event,this.onDidChangeNotebookEditorVisibleRanges=this._onDidChangeNotebookEditorVisibleRanges.event}$acceptEditorPropertiesChanged(A,_){this._logService.debug("ExtHostNotebook#$acceptEditorPropertiesChanged",A,_);const T=this._notebooksAndEditors.getEditorById(A);_.visibleRanges&&T._acceptVisibleRanges(_.visibleRanges.ranges.map(S.NotebookRange.to)),_.selections&&T._acceptSelections(_.selections.selections.map(S.NotebookRange.to)),_.visibleRanges&&this._onDidChangeNotebookEditorVisibleRanges.fire({notebookEditor:T.apiEditor,visibleRanges:T.apiEditor.visibleRanges}),_.selections&&this._onDidChangeNotebookEditorSelection.fire(Object.freeze({notebookEditor:T.apiEditor,selections:T.apiEditor.selections}))}$acceptEditorViewColumns(A){for(const _ in A)this._notebooksAndEditors.getEditorById(_)._acceptViewColumn(S.ViewColumn.to(A[_]))}};N=He([We(0,D.ILogService)],N),e.ExtHostNotebookEditors=N}),define(De[187],Ce([1,0,8,153,133,20,58,12]),function(ne,e,i,D,S,N,y,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtHostProgress=void 0;class _{constructor(g){this._handles=0,this._mapHandleToCancellationSource=new Map,this._proxy=g}async withProgress(g,E,m){const t=this._handles++,{title:o,location:a,cancellable:p}=E,w={label:(0,S.localize)(0,null,g.displayName||g.name),id:g.identifier.value};return this._proxy.$startProgress(t,{location:i.ProgressLocation.from(a),title:o,source:w,cancellable:p},g.isUnderDevelopment?void 0:g.identifier.value).catch(A.onUnexpectedExternalError),this._withProgress(t,m,!!p)}_withProgress(g,E,m){let t;m&&(t=new N.CancellationTokenSource,this._mapHandleToCancellationSource.set(g,t));const o=p=>{this._proxy.$progressEnd(p),this._mapHandleToCancellationSource.delete(p),t?.dispose()};let a;try{a=E(new O(this._proxy,g),m&&t?t.token:N.CancellationToken.None)}catch(p){throw o(g),p}return a.then(p=>o(g),p=>o(g)),a}$acceptProgressCanceled(g){const E=this._mapHandleToCancellationSource.get(g);E&&(E.cancel(),this._mapHandleToCancellationSource.delete(g))}}e.ExtHostProgress=_;function T(b,g){return b.message=g.message,typeof g.increment=="number"&&(typeof b.increment=="number"?b.increment+=g.increment:b.increment=g.increment),b}class O extends D.Progress{constructor(g,E){super(m=>this.throttledReport(m)),this._proxy=g,this._handle=E}throttledReport(g){this._proxy.$progressReport(this._handle,g)}}He([(0,y.throttle)(100,(b,g)=>T(b,g),()=>Object.create(null))],O.prototype,"throttledReport",null)}),define(De[96],Ce([1,0,52,92,42,67,51,8,2]),function(ne,e,i,D,S,N,y,A,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtHostTestItemCollection=e.TestItemRootImpl=e.TestItemImpl=e.toItemFromContext=void 0;const T=(w,u,I,r)=>{let c=u;return{enumerable:!0,configurable:!1,get(){return c},set(n){if(!I(c,n)){const d=c;c=n,w.listener?.(r(n,d))}}}},O=(w,u)=>w===u,b={range:(w,u)=>w===u?!0:!w||!u?!1:w.isEqual(u),label:O,description:O,sortText:O,busy:O,error:O,canResolveChildren:O,tags:(w,u)=>!(w.length!==u.length||w.some(I=>!u.find(r=>I.id===r.id)))},g=w=>u=>({op:4,update:w(u)}),E=(w,u)=>({range:(()=>{let I;const r=g(c=>({range:i.Range.lift(A.Range.from(c))}));return{enumerable:!0,configurable:!1,get(){return I},set(c){w.listener?.({op:6}),b.range(I,c)||(I=c,w.listener?.(r(c)))}}})(),label:T(w,u,b.label,g(I=>({label:I}))),description:T(w,void 0,b.description,g(I=>({description:I}))),sortText:T(w,void 0,b.sortText,g(I=>({sortText:I}))),canResolveChildren:T(w,!1,b.canResolveChildren,I=>({op:2,state:I})),busy:T(w,!1,b.busy,g(I=>({busy:I}))),error:T(w,void 0,b.error,g(I=>({error:A.MarkdownString.fromStrict(I)||null}))),tags:T(w,[],b.tags,(I,r)=>({op:1,new:I.map(A.TestTag.from),old:r.map(A.TestTag.from)}))}),m=w=>{const u=S.TestId.fromString(w.extId),I=new o(u.controllerId,u.localId,w.label,_.URI.revive(w.uri)||void 0);return I.range=A.Range.to(w.range||void 0),I.description=w.description||void 0,I.sortText=w.sortText||void 0,I.tags=w.tags.map(r=>A.TestTag.to({id:(0,y.denamespaceTestTag)(r).tagId})),I},t=w=>{let u;for(const I of w.tests){const r=m(I.item);(0,D.getPrivateApiFor)(r).parent=u,u=r}return u};e.toItemFromContext=t;class o{constructor(u,I,r,c){if(I.includes("\0"))throw new Error(`Test IDs may not include the ${JSON.stringify(I)} symbol`);const n=(0,D.createPrivateApiFor)(this,u);Object.defineProperties(this,{id:{value:I,enumerable:!0,writable:!1},uri:{value:c,enumerable:!0,writable:!1},parent:{enumerable:!1,get(){return n.parent instanceof a?void 0:n.parent}},children:{value:(0,N.createTestItemChildren)(n,D.getPrivateApiFor,o),enumerable:!0,writable:!1},...E(n,r)})}}e.TestItemImpl=o;class a extends o{constructor(u,I){super(u,u,I,void 0),this._isRoot=!0}}e.TestItemRootImpl=a;class p extends N.TestItemCollection{constructor(u,I,r){super({controllerId:u,getDocumentVersion:c=>c&&r.getDocument(c)?.version,getApiFor:D.getPrivateApiFor,getChildren:c=>c.children,root:new a(u,I),toITestItem:A.TestItem.from})}}e.ExtHostTestItemCollection=p}),define(De[97],Ce([1,0,47,12,78,8,6]),function(ne,e,i,D,S,N,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtHostTextEditor=e.ExtHostTextEditorOptions=e.TextEditorEdit=e.TextEditorDecorationType=void 0;class A{constructor(g,E,m){const t=A._Keys.nextId();g.$registerTextEditorDecorationType(E.identifier,t,N.DecorationRenderOptions.from(m)),this.value=Object.freeze({key:t,dispose(){g.$removeTextEditorDecorationType(t)}})}}e.TextEditorDecorationType=A,A._Keys=new S.IdGenerator("TextEditorDecorationType");class _{constructor(g,E){this._collectedEdits=[],this._setEndOfLine=void 0,this._finalized=!1,this._document=g,this._documentVersionId=g.version,this._undoStopBefore=E.undoStopBefore,this._undoStopAfter=E.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(g,E){this._throwIfFinalized();let m=null;if(g instanceof y.Position)m=new y.Range(g,g);else if(g instanceof y.Range)m=g;else throw new Error("Unrecognized location");this._pushEdit(m,E,!1)}insert(g,E){this._throwIfFinalized(),this._pushEdit(new y.Range(g,g),E,!0)}delete(g){this._throwIfFinalized();let E=null;if(g instanceof y.Range)E=g;else throw new Error("Unrecognized location");this._pushEdit(E,null,!0)}_pushEdit(g,E,m){const t=this._document.validateRange(g);this._collectedEdits.push({range:t,text:E,forceMoveMarkers:m})}setEndOfLine(g){if(this._throwIfFinalized(),g!==y.EndOfLine.LF&&g!==y.EndOfLine.CRLF)throw(0,D.illegalArgument)("endOfLine");this._setEndOfLine=g}}e.TextEditorEdit=_;class T{constructor(g,E,m,t){this._proxy=g,this._id=E,this._accept(m),this._logService=t;const o=this;this.value={get tabSize(){return o._tabSize},set tabSize(a){o._setTabSize(a)},get insertSpaces(){return o._insertSpaces},set insertSpaces(a){o._setInsertSpaces(a)},get cursorStyle(){return o._cursorStyle},set cursorStyle(a){o._setCursorStyle(a)},get lineNumbers(){return o._lineNumbers},set lineNumbers(a){o._setLineNumbers(a)}}}_accept(g){this._tabSize=g.tabSize,this._insertSpaces=g.insertSpaces,this._cursorStyle=g.cursorStyle,this._lineNumbers=N.TextEditorLineNumbersStyle.to(g.lineNumbers)}_validateTabSize(g){if(g==="auto")return"auto";if(typeof g=="number"){const E=Math.floor(g);return E>0?E:null}if(typeof g=="string"){const E=parseInt(g,10);return isNaN(E)?null:E>0?E:null}return null}_setTabSize(g){const E=this._validateTabSize(g);if(E!==null){if(typeof E=="number"){if(this._tabSize===E)return;this._tabSize=E}this._warnOnError("setTabSize",this._proxy.$trySetOptions(this._id,{tabSize:E}))}}_validateInsertSpaces(g){return g==="auto"?"auto":g==="false"?!1:Boolean(g)}_setInsertSpaces(g){const E=this._validateInsertSpaces(g);if(typeof E=="boolean"){if(this._insertSpaces===E)return;this._insertSpaces=E}this._warnOnError("setInsertSpaces",this._proxy.$trySetOptions(this._id,{insertSpaces:E}))}_setCursorStyle(g){this._cursorStyle!==g&&(this._cursorStyle=g,this._warnOnError("setCursorStyle",this._proxy.$trySetOptions(this._id,{cursorStyle:g})))}_setLineNumbers(g){this._lineNumbers!==g&&(this._lineNumbers=g,this._warnOnError("setLineNumbers",this._proxy.$trySetOptions(this._id,{lineNumbers:N.TextEditorLineNumbersStyle.from(g)})))}assign(g){const E={};let m=!1;if(typeof g.tabSize<"u"){const t=this._validateTabSize(g.tabSize);t==="auto"?(m=!0,E.tabSize=t):typeof t=="number"&&this._tabSize!==t&&(this._tabSize=t,m=!0,E.tabSize=t)}if(typeof g.insertSpaces<"u"){const t=this._validateInsertSpaces(g.insertSpaces);t==="auto"?(m=!0,E.insertSpaces=t):this._insertSpaces!==t&&(this._insertSpaces=t,m=!0,E.insertSpaces=t)}typeof g.cursorStyle<"u"&&this._cursorStyle!==g.cursorStyle&&(this._cursorStyle=g.cursorStyle,m=!0,E.cursorStyle=g.cursorStyle),typeof g.lineNumbers<"u"&&this._lineNumbers!==g.lineNumbers&&(this._lineNumbers=g.lineNumbers,m=!0,E.lineNumbers=N.TextEditorLineNumbersStyle.from(g.lineNumbers)),m&&this._warnOnError("setOptions",this._proxy.$trySetOptions(this._id,E))}_warnOnError(g,E){E.catch(m=>{this._logService.warn(`ExtHostTextEditorOptions '${g}' failed:'`),this._logService.warn(m)})}}e.ExtHostTextEditorOptions=T;class O{constructor(g,E,m,t,o,a,p,w){this.id=g,this._proxy=E,this._logService=m,this._disposed=!1,this._hasDecorationsForKey=new Set,this._selections=o,this._options=new T(this._proxy,this.id,a,m),this._visibleRanges=p,this._viewColumn=w;const u=this;this.value=Object.freeze({get document(){return t.getValue()},set document(I){throw(0,D.readonly)("document")},get selection(){return u._selections&&u._selections[0]},set selection(I){if(!(I instanceof y.Selection))throw(0,D.illegalArgument)("selection");u._selections=[I],u._trySetSelection()},get selections(){return u._selections},set selections(I){if(!Array.isArray(I)||I.some(r=>!(r instanceof y.Selection)))throw(0,D.illegalArgument)("selections");u._selections=I,u._trySetSelection()},get visibleRanges(){return u._visibleRanges},set visibleRanges(I){throw(0,D.readonly)("visibleRanges")},get options(){return u._options.value},set options(I){u._disposed||u._options.assign(I)},get viewColumn(){return u._viewColumn},set viewColumn(I){throw(0,D.readonly)("viewColumn")},edit(I,r={undoStopBefore:!0,undoStopAfter:!0}){if(u._disposed)return Promise.reject(new Error("TextEditor#edit not possible on closed editors"));const c=new _(t.getValue(),r);return I(c),u._applyEdit(c)},insertSnippet(I,r,c={undoStopBefore:!0,undoStopAfter:!0}){if(u._disposed)return Promise.reject(new Error("TextEditor#insertSnippet not possible on closed editors"));let n;if(!r||Array.isArray(r)&&r.length===0)n=u._selections.map(d=>N.Range.from(d));else if(r instanceof y.Position){const{lineNumber:d,column:l}=N.Position.from(r);n=[{startLineNumber:d,startColumn:l,endLineNumber:d,endColumn:l}]}else if(r instanceof y.Range)n=[N.Range.from(r)];else{n=[];for(const d of r)if(d instanceof y.Range)n.push(N.Range.from(d));else{const{lineNumber:l,column:f}=N.Position.from(d);n.push({startLineNumber:l,startColumn:f,endLineNumber:l,endColumn:f})}}return E.$tryInsertSnippet(g,t.getValue().version,I.value,n,c)},setDecorations(I,r){const c=r.length===0;c&&!u._hasDecorationsForKey.has(I.key)||(c?u._hasDecorationsForKey.delete(I.key):u._hasDecorationsForKey.add(I.key),u._runOnProxy(()=>{if(N.isDecorationOptionsArr(r))return E.$trySetDecorations(g,I.key,N.fromRangeOrRangeWithMessage(r));{const n=new Array(4*r.length);for(let d=0,l=r.length;dE.$tryRevealRange(g,N.Range.from(I),r||y.TextEditorRevealType.Default))},show(I){E.$tryShowEditor(g,N.ViewColumn.from(I))},hide(){E.$tryHideEditor(g)}})}dispose(){(0,i.ok)(!this._disposed),this._disposed=!0}_acceptOptions(g){(0,i.ok)(!this._disposed),this._options._accept(g)}_acceptVisibleRanges(g){(0,i.ok)(!this._disposed),this._visibleRanges=g}_acceptViewColumn(g){(0,i.ok)(!this._disposed),this._viewColumn=g}_acceptSelections(g){(0,i.ok)(!this._disposed),this._selections=g}async _trySetSelection(){const g=this._selections.map(N.Selection.from);return await this._runOnProxy(()=>this._proxy.$trySetSelections(this.id,g)),this.value}_applyEdit(g){const E=g.finalize();if(E.edits.length===0&&!E.setEndOfLine)return Promise.resolve(!0);const m=E.edits.map(o=>o.range);m.sort((o,a)=>o.end.line===a.end.line?o.end.character===a.end.character?o.start.line===a.start.line?o.start.character-a.start.character:o.start.line-a.start.line:o.end.character-a.end.character:o.end.line-a.end.line);for(let o=0,a=m.length-1;o({range:N.Range.from(o.range),text:o.text,forceMoveMarkers:o.forceMoveMarkers}));return this._proxy.$tryApplyEdits(this.id,E.documentVersionId,t,{setEndOfLine:typeof E.setEndOfLine=="number"?N.EndOfLine.from(E.setEndOfLine):void 0,undoStopBefore:E.undoStopBefore,undoStopAfter:E.undoStopAfter})}_runOnProxy(g){return this._disposed?(this._logService.warn("TextEditor is closed/disposed"),Promise.resolve(void 0)):g().then(()=>this,E=>(E instanceof Error&&E.name==="DISPOSED"||this._logService.warn(E),null))}}e.ExtHostTextEditor=O}),define(De[188],Ce([1,0]),function(ne,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.allApiProposals=void 0,e.allApiProposals=Object.freeze({authSession:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.authSession.d.ts",commentsResolvedState:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.commentsResolvedState.d.ts",contribCommentPeekContext:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.contribCommentPeekContext.d.ts",contribEditSessions:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.contribEditSessions.d.ts",contribEditorContentMenu:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.contribEditorContentMenu.d.ts",contribLabelFormatterWorkspaceTooltip:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.contribLabelFormatterWorkspaceTooltip.d.ts",contribMenuBarHome:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.contribMenuBarHome.d.ts",contribMergeEditorMenus:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.contribMergeEditorMenus.d.ts",contribNotebookStaticPreloads:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.contribNotebookStaticPreloads.d.ts",contribRemoteHelp:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.contribRemoteHelp.d.ts",contribShareMenu:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.contribShareMenu.d.ts",contribTerminalQuickFixes:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.contribTerminalQuickFixes.d.ts",contribViewsRemote:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.contribViewsRemote.d.ts",contribViewsWelcome:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.contribViewsWelcome.d.ts",customEditorMove:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.customEditorMove.d.ts",diffCommand:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.diffCommand.d.ts",diffContentOptions:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.diffContentOptions.d.ts",documentFiltersExclusive:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.documentFiltersExclusive.d.ts",documentPaste:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.documentPaste.d.ts",editSessionIdentityProvider:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.editSessionIdentityProvider.d.ts",editorInsets:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.editorInsets.d.ts",envShellEvent:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.envShellEvent.d.ts",extensionLog:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.extensionLog.d.ts",extensionRuntime:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.extensionRuntime.d.ts",extensionsAny:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.extensionsAny.d.ts",externalUriOpener:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.externalUriOpener.d.ts",fileSearchProvider:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.fileSearchProvider.d.ts",findTextInFiles:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.findTextInFiles.d.ts",fsChunks:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.fsChunks.d.ts",idToken:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.idToken.d.ts",inlineCompletionsAdditions:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.inlineCompletionsAdditions.d.ts",inlineCompletionsNew:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.inlineCompletionsNew.d.ts",interactiveWindow:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.interactiveWindow.d.ts",ipc:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.ipc.d.ts",notebookCellExecutionState:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.notebookCellExecutionState.d.ts",notebookContentProvider:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.notebookContentProvider.d.ts",notebookControllerAffinityHidden:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.notebookControllerAffinityHidden.d.ts",notebookControllerKind:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.notebookControllerKind.d.ts",notebookDeprecated:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.notebookDeprecated.d.ts",notebookEditor:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.notebookEditor.d.ts",notebookKernelSource:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.notebookKernelSource.d.ts",notebookLiveShare:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.notebookLiveShare.d.ts",notebookMessaging:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.notebookMessaging.d.ts",notebookMime:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.notebookMime.d.ts",portsAttributes:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.portsAttributes.d.ts",quickPickSortByLabel:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.quickPickSortByLabel.d.ts",resolvers:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.resolvers.d.ts",scmActionButton:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.scmActionButton.d.ts",scmSelectedProvider:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.scmSelectedProvider.d.ts",scmValidation:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.scmValidation.d.ts",tabInputTextMerge:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.tabInputTextMerge.d.ts",taskPresentationGroup:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.taskPresentationGroup.d.ts",telemetry:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.telemetry.d.ts",telemetryLogger:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.telemetryLogger.d.ts",terminalDataWriteEvent:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.terminalDataWriteEvent.d.ts",terminalDimensions:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.terminalDimensions.d.ts",testCoverage:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.testCoverage.d.ts",testObserver:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.testObserver.d.ts",textSearchProvider:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.textSearchProvider.d.ts",timeline:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.timeline.d.ts",tokenInformation:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.tokenInformation.d.ts",treeItemCheckbox:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.treeItemCheckbox.d.ts",treeViewReveal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.treeViewReveal.d.ts",tunnels:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.tunnels.d.ts",workspaceTrust:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.workspaceTrust.d.ts"})}),define(De[189],Ce([1,0,144,12,29,85,88,30,25,188,152]),function(ne,e,i,D,S,N,y,A,_,T,O){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtensionsRegistry=e.ExtensionsRegistryImpl=e.schema=e.ExtensionPoint=e.ExtensionPointUserDelta=e.ExtensionMessageCollector=void 0;const b=A.Registry.as(y.Extensions.JSONContribution);class g{constructor(u,I,r){this._messageHandler=u,this._extension=I,this._extensionPointId=r}_msg(u,I){this._messageHandler({type:u,message:I,extensionId:this._extension.identifier,extensionPointId:this._extensionPointId})}error(u){this._msg(S.default.Error,u)}warn(u){this._msg(S.default.Warning,u)}info(u){this._msg(S.default.Info,u)}}e.ExtensionMessageCollector=g;class E{static _toSet(u){const I=new Set;for(let r=0,c=u.length;r!r.has(_.ExtensionIdentifier.toKey(l.description.identifier))),d=u.filter(l=>!c.has(_.ExtensionIdentifier.toKey(l.description.identifier)));return new E(n,d)}constructor(u,I){this.added=u,this.removed=I}}e.ExtensionPointUserDelta=E;class m{constructor(u,I){this.name=u,this.defaultExtensionKind=I,this._handler=null,this._users=null,this._delta=null}setHandler(u){if(this._handler!==null)throw new Error("Handler already set!");this._handler=u,this._handle()}acceptUsers(u){this._delta=E.compute(this._users,u),this._users=u,this._handle()}_handle(){if(!(this._handler===null||this._users===null||this._delta===null))try{this._handler(this._users,this._delta)}catch(u){(0,D.onUnexpectedError)(u)}}}e.ExtensionPoint=m;const t={type:"string",enum:["ui","workspace"],enumDescriptions:[i.localize(0,null),i.localize(1,null)]},o="vscode://schemas/vscode-extensions";e.schema={properties:{engines:{type:"object",description:i.localize(2,null),properties:{vscode:{type:"string",description:i.localize(3,null),default:"^1.22.0"}}},publisher:{description:i.localize(4,null),type:"string"},displayName:{description:i.localize(5,null),type:"string"},categories:{description:i.localize(6,null),type:"array",uniqueItems:!0,items:{oneOf:[{type:"string",enum:_.EXTENSION_CATEGORIES},{type:"string",const:"Languages",deprecationMessage:i.localize(7,null)}]}},galleryBanner:{type:"object",description:i.localize(8,null),properties:{color:{description:i.localize(9,null),type:"string"},theme:{description:i.localize(10,null),type:"string",enum:["dark","light"]}}},contributes:{description:i.localize(11,null),type:"object",properties:{},default:{}},preview:{type:"boolean",description:i.localize(12,null)},enableProposedApi:{type:"boolean",deprecationMessage:i.localize(13,null)},enabledApiProposals:{markdownDescription:i.localize(14,null),type:"array",uniqueItems:!0,items:{type:"string",enum:Object.keys(T.allApiProposals),markdownEnumDescriptions:Object.values(T.allApiProposals)}},activationEvents:{description:i.localize(15,null),type:"array",items:{type:"string",defaultSnippets:[{label:"onWebviewPanel",description:i.localize(16,null),body:"onWebviewPanel:viewType"},{label:"onLanguage",description:i.localize(17,null),body:"onLanguage:${1:languageId}"},{label:"onCommand",description:i.localize(18,null),body:"onCommand:${2:commandId}"},{label:"onDebug",description:i.localize(19,null),body:"onDebug"},{label:"onDebugInitialConfigurations",description:i.localize(20,null),body:"onDebugInitialConfigurations"},{label:"onDebugDynamicConfigurations",description:i.localize(21,null),body:"onDebugDynamicConfigurations"},{label:"onDebugResolve",description:i.localize(22,null),body:"onDebugResolve:${6:type}"},{label:"onDebugAdapterProtocolTracker",description:i.localize(23,null),body:"onDebugAdapterProtocolTracker:${6:type}"},{label:"workspaceContains",description:i.localize(24,null),body:"workspaceContains:${4:filePattern}"},{label:"onStartupFinished",description:i.localize(25,null),body:"onStartupFinished"},{label:"onTaskType",description:i.localize(26,null),body:"onTaskType:${1:taskType}"},{label:"onFileSystem",description:i.localize(27,null),body:"onFileSystem:${1:scheme}"},{label:"onEditSession",description:i.localize(28,null),body:"onEditSession:${1:scheme}"},{label:"onSearch",description:i.localize(29,null),body:"onSearch:${7:scheme}"},{label:"onView",body:"onView:${5:viewId}",description:i.localize(30,null)},{label:"onIdentity",body:"onIdentity:${8:identity}",description:i.localize(31,null)},{label:"onUri",body:"onUri",description:i.localize(32,null)},{label:"onOpenExternalUri",body:"onOpenExternalUri",description:i.localize(33,null)},{label:"onCustomEditor",body:"onCustomEditor:${9:viewType}",description:i.localize(34,null)},{label:"onNotebook",body:"onNotebook:${1:type}",description:i.localize(35,null)},{label:"onAuthenticationRequest",body:"onAuthenticationRequest:${11:authenticationProviderId}",description:i.localize(36,null)},{label:"onRenderer",description:i.localize(37,null),body:"onRenderer:${11:rendererId}"},{label:"onTerminalProfile",body:"onTerminalProfile:${1:terminalId}",description:i.localize(38,null)},{label:"onWalkthrough",body:"onWalkthrough:${1:walkthroughID}",description:i.localize(39,null)},{label:"*",description:i.localize(40,null),body:"*"}]}},badges:{type:"array",description:i.localize(41,null),items:{type:"object",required:["url","href","description"],properties:{url:{type:"string",description:i.localize(42,null)},href:{type:"string",description:i.localize(43,null)},description:{type:"string",description:i.localize(44,null)}}}},markdown:{type:"string",description:i.localize(45,null),enum:["github","standard"],default:"github"},qna:{default:"marketplace",description:i.localize(46,null),anyOf:[{type:["string","boolean"],enum:["marketplace",!1]},{type:"string"}]},extensionDependencies:{description:i.localize(47,null),type:"array",uniqueItems:!0,items:{type:"string",pattern:N.EXTENSION_IDENTIFIER_PATTERN}},extensionPack:{description:i.localize(48,null),type:"array",uniqueItems:!0,items:{type:"string",pattern:N.EXTENSION_IDENTIFIER_PATTERN}},extensionKind:{description:i.localize(49,null),type:"array",items:t,default:["workspace"],defaultSnippets:[{body:["ui"],description:i.localize(50,null)},{body:["workspace"],description:i.localize(51,null)},{body:["ui","workspace"],description:i.localize(52,null)},{body:["workspace","ui"],description:i.localize(53,null)},{body:[],description:i.localize(54,null)}]},capabilities:{description:i.localize(55,null),type:"object",properties:{virtualWorkspaces:{description:i.localize(56,null),type:["boolean","object"],defaultSnippets:[{label:"limited",body:{supported:"${1:limited}",description:"${2}"}},{label:"false",body:{supported:!1,description:"${2}"}}],default:(!0).valueOf,properties:{supported:{markdownDescription:i.localize(57,null),type:["string","boolean"],enum:["limited",!0,!1],enumDescriptions:[i.localize(58,null),i.localize(59,null),i.localize(60,null)]},description:{type:"string",markdownDescription:i.localize(61,null)}}},untrustedWorkspaces:{description:i.localize(62,null),type:"object",required:["supported"],defaultSnippets:[{body:{supported:"${1:limited}",description:"${2}"}}],properties:{supported:{markdownDescription:i.localize(63,null),type:["string","boolean"],enum:["limited",!0,!1],enumDescriptions:[i.localize(64,null),i.localize(65,null),i.localize(66,null)]},restrictedConfigurations:{description:i.localize(67,null),type:"array",items:{type:"string"}},description:{type:"string",markdownDescription:i.localize(68,null)}}}}},sponsor:{description:i.localize(69,null),type:"object",defaultSnippets:[{body:{url:"${1:https:}"}}],properties:{url:{description:i.localize(70,null),type:"string"}}},scripts:{type:"object",properties:{"vscode:prepublish":{description:i.localize(71,null),type:"string"},"vscode:uninstall":{description:i.localize(72,null),type:"string"}}},icon:{type:"string",description:i.localize(73,null)},l10n:{type:"string",description:i.localize(74,null)}}};class a{constructor(){this._extensionPoints=new Map}registerExtensionPoint(u){if(this._extensionPoints.has(u.extensionPoint))throw new Error("Duplicate extension point: "+u.extensionPoint);const I=new m(u.extensionPoint,u.defaultExtensionKind);return this._extensionPoints.set(u.extensionPoint,I),e.schema.properties.contributes.properties[u.extensionPoint]=u.jsonSchema,b.registerSchema(o,e.schema),I}getExtensionPoints(){return Array.from(this._extensionPoints.values())}}e.ExtensionsRegistryImpl=a;const p={ExtensionsRegistry:"ExtensionsRegistry"};A.Registry.add(p.ExtensionsRegistry,new a),e.ExtensionsRegistry=A.Registry.as(p.ExtensionsRegistry),b.registerSchema(o,e.schema),b.registerSchema(O.productSchemaId,{properties:{extensionEnabledApiProposals:{description:i.localize(75,null),type:"object",properties:{},additionalProperties:{anyOf:[{type:"array",uniqueItems:!0,items:{type:"string",enum:Object.keys(T.allApiProposals),markdownEnumDescriptions:Object.values(T.allApiProposals)}}]}}}})}),define(De[190],Ce([1,0,141,9,23,189,41,4]),function(ne,e,i,D,S,N,y,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TaskDefinitionRegistry=e.TaskDefinitionRegistryImpl=void 0;const _={type:"object",additionalProperties:!1,properties:{type:{type:"string",description:i.localize(0,null)},required:{type:"array",items:{type:"string"}},properties:{type:"object",description:i.localize(1,null),additionalProperties:{$ref:"http://json-schema.org/draft-07/schema#"}},when:{type:"string",markdownDescription:i.localize(2,null),default:""}}};var T;(function(g){function E(m,t,o){if(!m)return;const a=D.isString(m.type)?m.type:void 0;if(!a||a.length===0){o.error(i.localize(3,null));return}const p=[];if(Array.isArray(m.required))for(const w of m.required)D.isString(w)&&p.push(w);return{extensionId:t.value,taskType:a,required:p,properties:m.properties?S.deepClone(m.properties):{},when:m.when?y.ContextKeyExpr.deserialize(m.when):void 0}}g.from=E})(T||(T={}));const O=N.ExtensionsRegistry.registerExtensionPoint({extensionPoint:"taskDefinitions",jsonSchema:{description:i.localize(4,null),type:"array",items:_}});class b{constructor(){this._onDefinitionsChanged=new A.Emitter,this.onDefinitionsChanged=this._onDefinitionsChanged.event,this.taskTypes=Object.create(null),this.readyPromise=new Promise((E,m)=>{O.setHandler((t,o)=>{this._schema=void 0;try{for(const a of o.removed){const p=a.value;for(const w of p)this.taskTypes&&w.type&&this.taskTypes[w.type]&&delete this.taskTypes[w.type]}for(const a of o.added){const p=a.value;for(const w of p){const u=T.from(w,a.description.identifier,a.collector);u&&(this.taskTypes[u.taskType]=u)}}(o.removed.length>0||o.added.length>0)&&this._onDefinitionsChanged.fire()}catch{}E(void 0)})})}onReady(){return this.readyPromise}get(E){return this.taskTypes[E]}all(){return Object.keys(this.taskTypes).map(E=>this.taskTypes[E])}getJsonSchema(){if(this._schema===void 0){const E=[];for(const m of this.all()){const t={type:"object",additionalProperties:!1};m.required.length>0&&(t.required=m.required.slice(0)),m.properties!==void 0?t.properties=S.deepClone(m.properties):t.properties=Object.create(null),t.properties.type={type:"string",enum:[m.taskType]},E.push(t)}this._schema={oneOf:E}}return this._schema}}e.TaskDefinitionRegistryImpl=b,e.TaskDefinitionRegistry=new b}),define(De[191],Ce([1,0,142,9,22,23,41,190]),function(ne,e,i,D,S,N,y,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TaskDefinition=e.TasksSchemaProperties=e.TaskSettingId=e.KeyedTaskIdentifier=e.TaskEvent=e.TaskRunSource=e.TaskRunType=e.TaskEventKind=e.TaskSorter=e.JsonSchemaVersion=e.ExecutionEngine=e.InMemoryTask=e.ContributedTask=e.ConfiguringTask=e.CustomTask=e.CommonTask=e.RunOptions=e.RunOnOptions=e.DependsOrder=e.TaskSourceKind=e.TaskScope=e.TaskGroup=e.CommandString=e.RuntimeType=e.PresentationOptions=e.PanelKind=e.RevealProblemKind=e.RevealKind=e.CommandOptions=e.CUSTOMIZED_TASK_TYPE=e.ShellQuoting=e.TASKS_CATEGORY=e.TASK_RUNNING_STATE=e.USER_TASKS_GROUP_KEY=void 0,e.USER_TASKS_GROUP_KEY="settings",e.TASK_RUNNING_STATE=new y.RawContextKey("taskRunning",!1,i.localize(0,null)),e.TASKS_CATEGORY={value:i.localize(1,null),original:"Tasks"};var _;(function(R){R[R.Escape=1]="Escape",R[R.Strong=2]="Strong",R[R.Weak=3]="Weak"})(_=e.ShellQuoting||(e.ShellQuoting={})),e.CUSTOMIZED_TASK_TYPE="$customized",function(R){function B($){if(!$)return R.Strong;switch($.toLowerCase()){case"escape":return R.Escape;case"strong":return R.Strong;case"weak":return R.Weak;default:return R.Strong}}R.from=B}(_=e.ShellQuoting||(e.ShellQuoting={}));var T;(function(R){R.defaults={cwd:"${workspaceFolder}"}})(T=e.CommandOptions||(e.CommandOptions={}));var O;(function(R){R[R.Always=1]="Always",R[R.Silent=2]="Silent",R[R.Never=3]="Never"})(O=e.RevealKind||(e.RevealKind={})),function(R){function B($){switch($.toLowerCase()){case"always":return R.Always;case"silent":return R.Silent;case"never":return R.Never;default:return R.Always}}R.fromString=B}(O=e.RevealKind||(e.RevealKind={}));var b;(function(R){R[R.Never=1]="Never",R[R.OnProblem=2]="OnProblem",R[R.Always=3]="Always"})(b=e.RevealProblemKind||(e.RevealProblemKind={})),function(R){function B($){switch($.toLowerCase()){case"always":return R.Always;case"never":return R.Never;case"onproblem":return R.OnProblem;default:return R.OnProblem}}R.fromString=B}(b=e.RevealProblemKind||(e.RevealProblemKind={}));var g;(function(R){R[R.Shared=1]="Shared",R[R.Dedicated=2]="Dedicated",R[R.New=3]="New"})(g=e.PanelKind||(e.PanelKind={})),function(R){function B($){switch($.toLowerCase()){case"shared":return R.Shared;case"dedicated":return R.Dedicated;case"new":return R.New;default:return R.Shared}}R.fromString=B}(g=e.PanelKind||(e.PanelKind={}));var E;(function(R){R.defaults={echo:!0,reveal:O.Always,revealProblems:b.Never,focus:!1,panel:g.Shared,showReuseMessage:!0,clear:!1}})(E=e.PresentationOptions||(e.PresentationOptions={}));var m;(function(R){R[R.Shell=1]="Shell",R[R.Process=2]="Process",R[R.CustomExecution=3]="CustomExecution"})(m=e.RuntimeType||(e.RuntimeType={})),function(R){function B(U){switch(U.toLowerCase()){case"shell":return R.Shell;case"process":return R.Process;case"customExecution":return R.CustomExecution;default:return R.Process}}R.fromString=B;function $(U){switch(U){case R.Shell:return"shell";case R.Process:return"process";case R.CustomExecution:return"customExecution";default:return"process"}}R.toString=$}(m=e.RuntimeType||(e.RuntimeType={}));var t;(function(R){function B($){return D.isString($)?$:$.value}R.value=B})(t=e.CommandString||(e.CommandString={}));var o;(function(R){R.Clean={_id:"clean",isDefault:!1},R.Build={_id:"build",isDefault:!1},R.Rebuild={_id:"rebuild",isDefault:!1},R.Test={_id:"test",isDefault:!1};function B(U){return U===R.Clean._id||U===R.Build._id||U===R.Rebuild._id||U===R.Test._id}R.is=B;function $(U){if(U!==void 0)return D.isString(U)?B(U)?{_id:U,isDefault:!1}:void 0:U}R.from=$})(o=e.TaskGroup||(e.TaskGroup={}));var a;(function(R){R[R.Global=1]="Global",R[R.Workspace=2]="Workspace",R[R.Folder=3]="Folder"})(a=e.TaskScope||(e.TaskScope={}));var p;(function(R){R.Workspace="workspace",R.Extension="extension",R.InMemory="inMemory",R.WorkspaceFile="workspaceFile",R.User="user";function B($){switch($){case R.User:return 2;case R.WorkspaceFile:return 5;default:return 6}}R.toConfigurationTarget=B})(p=e.TaskSourceKind||(e.TaskSourceKind={}));var w;(function(R){R.parallel="parallel",R.sequence="sequence"})(w=e.DependsOrder||(e.DependsOrder={}));var u;(function(R){R[R.default=1]="default",R[R.folderOpen=2]="folderOpen"})(u=e.RunOnOptions||(e.RunOnOptions={}));var I;(function(R){R.defaults={reevaluateOnRerun:!0,runOn:u.default,instanceLimit:1}})(I=e.RunOptions||(e.RunOptions={}));class r{constructor(B,$,U,K,te,de){this._label="",this._id=B,$&&(this._label=$),U&&(this.type=U),this.runOptions=K,this.configurationProperties=te,this._source=de}getDefinition(B){}getMapKey(){return this._id}getRecentlyUsedKey(){}getCommonTaskId(){const B={folder:this.getFolderId(),id:this._id};return JSON.stringify(B)}clone(){return this.fromObject(Object.assign({},this))}getWorkspaceFolder(){}getWorkspaceFileName(){}getTelemetryKind(){return"unknown"}matches(B,$=!1){if(B===void 0)return!1;if(D.isString(B))return B===this._label||B===this.configurationProperties.identifier||$&&B===this._id;const U=this.getDefinition(!0);return U!==void 0&&U._key===B._key}getQualifiedLabel(){const B=this.getWorkspaceFolder();return B?`${this._label} (${B.name})`:this._label}getTaskExecution(){return{id:this._id,task:this}}addTaskLoadMessages(B){this._taskLoadMessages===void 0&&(this._taskLoadMessages=[]),B&&(this._taskLoadMessages=this._taskLoadMessages.concat(B))}get taskLoadMessages(){return this._taskLoadMessages}}e.CommonTask=r;class c extends r{constructor(B,$,U,K,te,de,re,be){super(B,U,void 0,re,be,$),this.command={},this._source=$,this.hasDefinedMatchers=de,te&&(this.command=te)}clone(){return new c(this._id,this._source,this._label,this.type,this.command,this.hasDefinedMatchers,this.runOptions,this.configurationProperties)}customizes(){if(this._source&&this._source.customizes)return this._source.customizes}getDefinition(B=!1){if(B&&this._source.customizes!==void 0)return this._source.customizes;{let $;switch(this.command?this.command.runtime:void 0){case m.Shell:$="shell";break;case m.Process:$="process";break;case m.CustomExecution:$="customExecution";break;case void 0:$="$composite";break;default:throw new Error("Unexpected task runtime")}return{type:$,_key:this._id,id:this._id}}}static is(B){return B instanceof c}getMapKey(){const B=this._source.config.workspaceFolder;return B?`${B.uri.toString()}|${this._id}|${this.instance}`:`${this._id}|${this.instance}`}getFolderId(){return this._source.kind===p.User?e.USER_TASKS_GROUP_KEY:this._source.config.workspaceFolder?.uri.toString()}getCommonTaskId(){return this._source.customizes?super.getCommonTaskId():this.getRecentlyUsedKey()??super.getCommonTaskId()}getRecentlyUsedKey(){const B=this.getFolderId();if(!B)return;let $=this.configurationProperties.identifier;this._source.kind!==p.Workspace&&($+=this._source.kind);const U={type:e.CUSTOMIZED_TASK_TYPE,folder:B,id:$};return JSON.stringify(U)}getWorkspaceFolder(){return this._source.config.workspaceFolder}getWorkspaceFileName(){return this._source.config.workspace&&this._source.config.workspace.configuration?S.basename(this._source.config.workspace.configuration):void 0}getTelemetryKind(){return this._source.customizes?"workspace>extension":"workspace"}fromObject(B){return new c(B._id,B._source,B._label,B.type,B.command,B.hasDefinedMatchers,B.runOptions,B.configurationProperties)}}e.CustomTask=c;class n extends r{constructor(B,$,U,K,te,de,re){super(B,U,K,de,re,$),this._source=$,this.configures=te}static is(B){return B instanceof n}fromObject(B){return B}getDefinition(){return this.configures}getWorkspaceFileName(){return this._source.config.workspace&&this._source.config.workspace.configuration?S.basename(this._source.config.workspace.configuration):void 0}getWorkspaceFolder(){return this._source.config.workspaceFolder}getFolderId(){return this._source.kind===p.User?e.USER_TASKS_GROUP_KEY:this._source.config.workspaceFolder?.uri.toString()}getRecentlyUsedKey(){const B=this.getFolderId();if(!B)return;let $=this.configurationProperties.identifier;this._source.kind!==p.Workspace&&($+=this._source.kind);const U={type:e.CUSTOMIZED_TASK_TYPE,folder:B,id:$};return JSON.stringify(U)}}e.ConfiguringTask=n;class d extends r{constructor(B,$,U,K,te,de,re,be,le){super(B,U,K,be,le,$),this.defines=te,this.hasDefinedMatchers=re,this.command=de,this.icon=le.icon,this.hide=le.hide}clone(){return new d(this._id,this._source,this._label,this.type,this.defines,this.command,this.hasDefinedMatchers,this.runOptions,this.configurationProperties)}getDefinition(){return this.defines}static is(B){return B instanceof d}getMapKey(){const B=this._source.workspaceFolder;return B?`${this._source.scope.toString()}|${B.uri.toString()}|${this._id}|${this.instance}`:`${this._source.scope.toString()}|${this._id}|${this.instance}`}getFolderId(){if(this._source.scope===3&&this._source.workspaceFolder)return this._source.workspaceFolder.uri.toString()}getRecentlyUsedKey(){const B={type:"contributed",scope:this._source.scope,id:this._id};return B.folder=this.getFolderId(),JSON.stringify(B)}getWorkspaceFolder(){return this._source.workspaceFolder}getTelemetryKind(){return"extension"}fromObject(B){return new d(B._id,B._source,B._label,B.type,B.defines,B.command,B.hasDefinedMatchers,B.runOptions,B.configurationProperties)}}e.ContributedTask=d;class l extends r{constructor(B,$,U,K,te,de){super(B,U,K,te,de,$),this._source=$}clone(){return new l(this._id,this._source,this._label,this.type,this.runOptions,this.configurationProperties)}static is(B){return B instanceof l}getTelemetryKind(){return"composite"}getMapKey(){return`${this._id}|${this.instance}`}getFolderId(){}fromObject(B){return new l(B._id,B._source,B._label,B.type,B.runOptions,B.configurationProperties)}}e.InMemoryTask=l;var f;(function(R){R[R.Process=1]="Process",R[R.Terminal=2]="Terminal"})(f=e.ExecutionEngine||(e.ExecutionEngine={})),function(R){R._default=R.Terminal}(f=e.ExecutionEngine||(e.ExecutionEngine={}));var s;(function(R){R[R.V0_1_0=1]="V0_1_0",R[R.V2_0_0=2]="V2_0_0"})(s=e.JsonSchemaVersion||(e.JsonSchemaVersion={}));class h{constructor(B){this._order=new Map;for(let $=0;$de.add(be));const re=K.properties;for(const be of Object.keys(re)){const le=$[be];if(le!=null)te[be]=le;else if(de.has(be)){const fe=re[be];if(fe.default!==void 0)te[be]=N.deepClone(fe.default);else switch(fe.type){case"boolean":te[be]=!1;break;case"number":case"integer":te[be]=0;break;case"string":te[be]="";break;default:U.error(i.localize(2,null,JSON.stringify($,void 0,0),be));return}}}return W.create(te)}R.createTaskIdentifier=B})(M=e.TaskDefinition||(e.TaskDefinition={}))}),define(De[192],Ce([1,0,12]),function(ne,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CanceledLazyPromise=e.LazyPromise=void 0;class D{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((y,A)=>{this._actualOk=y,this._actualErr=A,this._hasValue&&this._actualOk(this._value),this._hasErr&&this._actualErr(this._err)})),this._actual}resolveOk(y){this._hasValue||this._hasErr||(this._hasValue=!0,this._value=y,this._actual&&this._actualOk(y))}resolveErr(y){this._hasValue||this._hasErr||(this._hasErr=!0,this._err=y,this._actual?this._actualErr(y):(0,i.onUnexpectedError)(y))}then(y,A){return this._ensureActual().then(y,A)}catch(y){return this._ensureActual().then(void 0,y)}finally(y){return this._ensureActual().finally(y)}}e.LazyPromise=D;class S extends D{constructor(){super(),this._hasErr=!0,this._err=new i.CancellationError}}e.CanceledLazyPromise=S}),define(De[43],Ce([1,0]),function(ne,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SerializableObjectWithBuffers=e.getStringIdentifierForProxy=e.createProxyIdentifier=e.ProxyIdentifier=void 0;class i{constructor(_){this._proxyIdentifierBrand=void 0,this.sid=_,this.nid=++i.count}}e.ProxyIdentifier=i,i.count=0;const D=[];function S(A){const _=new i(A);return D[_.nid]=_,_}e.createProxyIdentifier=S;function N(A){return D[A].sid}e.getStringIdentifierForProxy=N;class y{constructor(_){this.value=_}}e.SerializableObjectWithBuffers=y}),define(De[5],Ce([1,0,43]),function(ne,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtHostContext=e.MainContext=e.ExtHostTestingResource=e.ISuggestResultDtoField=e.ISuggestDataDtoField=e.IdObject=e.CandidatePortSource=e.NotebookEditorRevealType=e.CellOutputKind=e.WebviewMessageArrayBufferViewType=e.WebviewEditorCapabilities=e.TabModelOperationKind=e.TabInputKind=e.TextEditorRevealType=void 0;var D;(function(t){t[t.Default=0]="Default",t[t.InCenter=1]="InCenter",t[t.InCenterIfOutsideViewport=2]="InCenterIfOutsideViewport",t[t.AtTop=3]="AtTop"})(D=e.TextEditorRevealType||(e.TextEditorRevealType={}));var S;(function(t){t[t.UnknownInput=0]="UnknownInput",t[t.TextInput=1]="TextInput",t[t.TextDiffInput=2]="TextDiffInput",t[t.TextMergeInput=3]="TextMergeInput",t[t.NotebookInput=4]="NotebookInput",t[t.NotebookDiffInput=5]="NotebookDiffInput",t[t.CustomEditorInput=6]="CustomEditorInput",t[t.WebviewEditorInput=7]="WebviewEditorInput",t[t.TerminalEditorInput=8]="TerminalEditorInput",t[t.InteractiveEditorInput=9]="InteractiveEditorInput"})(S=e.TabInputKind||(e.TabInputKind={}));var N;(function(t){t[t.TAB_OPEN=0]="TAB_OPEN",t[t.TAB_CLOSE=1]="TAB_CLOSE",t[t.TAB_UPDATE=2]="TAB_UPDATE",t[t.TAB_MOVE=3]="TAB_MOVE"})(N=e.TabModelOperationKind||(e.TabModelOperationKind={}));var y;(function(t){t[t.Editable=0]="Editable",t[t.SupportsHotExit=1]="SupportsHotExit"})(y=e.WebviewEditorCapabilities||(e.WebviewEditorCapabilities={}));var A;(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"})(A=e.WebviewMessageArrayBufferViewType||(e.WebviewMessageArrayBufferViewType={}));var _;(function(t){t[t.Text=1]="Text",t[t.Error=2]="Error",t[t.Rich=3]="Rich"})(_=e.CellOutputKind||(e.CellOutputKind={}));var T;(function(t){t[t.Default=0]="Default",t[t.InCenter=1]="InCenter",t[t.InCenterIfOutsideViewport=2]="InCenterIfOutsideViewport",t[t.AtTop=3]="AtTop"})(T=e.NotebookEditorRevealType||(e.NotebookEditorRevealType={}));var O;(function(t){t[t.None=0]="None",t[t.Process=1]="Process",t[t.Output=2]="Output"})(O=e.CandidatePortSource||(e.CandidatePortSource={}));class b{static mixin(o){return o._id=b._n++,o}}e.IdObject=b,b._n=0;var g;(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.kindModifier="m",t.commandIdent="n",t.commandId="o",t.commandArguments="p"})(g=e.ISuggestDataDtoField||(e.ISuggestDataDtoField={}));var E;(function(t){t.defaultRanges="a",t.completions="b",t.isIncomplete="c",t.duration="d"})(E=e.ISuggestResultDtoField||(e.ISuggestResultDtoField={}));var m;(function(t){t[t.Workspace=0]="Workspace",t[t.TextDocument=1]="TextDocument"})(m=e.ExtHostTestingResource||(e.ExtHostTestingResource={})),e.MainContext={MainThreadAuthentication:(0,i.createProxyIdentifier)("MainThreadAuthentication"),MainThreadBulkEdits:(0,i.createProxyIdentifier)("MainThreadBulkEdits"),MainThreadClipboard:(0,i.createProxyIdentifier)("MainThreadClipboard"),MainThreadCommands:(0,i.createProxyIdentifier)("MainThreadCommands"),MainThreadComments:(0,i.createProxyIdentifier)("MainThreadComments"),MainThreadConfiguration:(0,i.createProxyIdentifier)("MainThreadConfiguration"),MainThreadConsole:(0,i.createProxyIdentifier)("MainThreadConsole"),MainThreadDebugService:(0,i.createProxyIdentifier)("MainThreadDebugService"),MainThreadDecorations:(0,i.createProxyIdentifier)("MainThreadDecorations"),MainThreadDiagnostics:(0,i.createProxyIdentifier)("MainThreadDiagnostics"),MainThreadDialogs:(0,i.createProxyIdentifier)("MainThreadDiaglogs"),MainThreadDocuments:(0,i.createProxyIdentifier)("MainThreadDocuments"),MainThreadDocumentContentProviders:(0,i.createProxyIdentifier)("MainThreadDocumentContentProviders"),MainThreadTextEditors:(0,i.createProxyIdentifier)("MainThreadTextEditors"),MainThreadEditorInsets:(0,i.createProxyIdentifier)("MainThreadEditorInsets"),MainThreadEditorTabs:(0,i.createProxyIdentifier)("MainThreadEditorTabs"),MainThreadErrors:(0,i.createProxyIdentifier)("MainThreadErrors"),MainThreadTreeViews:(0,i.createProxyIdentifier)("MainThreadTreeViews"),MainThreadDownloadService:(0,i.createProxyIdentifier)("MainThreadDownloadService"),MainThreadKeytar:(0,i.createProxyIdentifier)("MainThreadKeytar"),MainThreadLanguageFeatures:(0,i.createProxyIdentifier)("MainThreadLanguageFeatures"),MainThreadLanguages:(0,i.createProxyIdentifier)("MainThreadLanguages"),MainThreadLogger:(0,i.createProxyIdentifier)("MainThreadLogger"),MainThreadMessageService:(0,i.createProxyIdentifier)("MainThreadMessageService"),MainThreadOutputService:(0,i.createProxyIdentifier)("MainThreadOutputService"),MainThreadProgress:(0,i.createProxyIdentifier)("MainThreadProgress"),MainThreadQuickOpen:(0,i.createProxyIdentifier)("MainThreadQuickOpen"),MainThreadStatusBar:(0,i.createProxyIdentifier)("MainThreadStatusBar"),MainThreadSecretState:(0,i.createProxyIdentifier)("MainThreadSecretState"),MainThreadStorage:(0,i.createProxyIdentifier)("MainThreadStorage"),MainThreadTelemetry:(0,i.createProxyIdentifier)("MainThreadTelemetry"),MainThreadTerminalService:(0,i.createProxyIdentifier)("MainThreadTerminalService"),MainThreadWebviews:(0,i.createProxyIdentifier)("MainThreadWebviews"),MainThreadWebviewPanels:(0,i.createProxyIdentifier)("MainThreadWebviewPanels"),MainThreadWebviewViews:(0,i.createProxyIdentifier)("MainThreadWebviewViews"),MainThreadCustomEditors:(0,i.createProxyIdentifier)("MainThreadCustomEditors"),MainThreadUrls:(0,i.createProxyIdentifier)("MainThreadUrls"),MainThreadUriOpeners:(0,i.createProxyIdentifier)("MainThreadUriOpeners"),MainThreadWorkspace:(0,i.createProxyIdentifier)("MainThreadWorkspace"),MainThreadFileSystem:(0,i.createProxyIdentifier)("MainThreadFileSystem"),MainThreadExtensionService:(0,i.createProxyIdentifier)("MainThreadExtensionService"),MainThreadSCM:(0,i.createProxyIdentifier)("MainThreadSCM"),MainThreadSearch:(0,i.createProxyIdentifier)("MainThreadSearch"),MainThreadTask:(0,i.createProxyIdentifier)("MainThreadTask"),MainThreadWindow:(0,i.createProxyIdentifier)("MainThreadWindow"),MainThreadLabelService:(0,i.createProxyIdentifier)("MainThreadLabelService"),MainThreadNotebook:(0,i.createProxyIdentifier)("MainThreadNotebook"),MainThreadNotebookDocuments:(0,i.createProxyIdentifier)("MainThreadNotebookDocumentsShape"),MainThreadNotebookEditors:(0,i.createProxyIdentifier)("MainThreadNotebookEditorsShape"),MainThreadNotebookKernels:(0,i.createProxyIdentifier)("MainThreadNotebookKernels"),MainThreadNotebookRenderers:(0,i.createProxyIdentifier)("MainThreadNotebookRenderers"),MainThreadInteractive:(0,i.createProxyIdentifier)("MainThreadInteractive"),MainThreadTheming:(0,i.createProxyIdentifier)("MainThreadTheming"),MainThreadTunnelService:(0,i.createProxyIdentifier)("MainThreadTunnelService"),MainThreadTimeline:(0,i.createProxyIdentifier)("MainThreadTimeline"),MainThreadTesting:(0,i.createProxyIdentifier)("MainThreadTesting"),MainThreadLocalization:(0,i.createProxyIdentifier)("MainThreadLocalizationShape")},e.ExtHostContext={ExtHostCommands:(0,i.createProxyIdentifier)("ExtHostCommands"),ExtHostConfiguration:(0,i.createProxyIdentifier)("ExtHostConfiguration"),ExtHostDiagnostics:(0,i.createProxyIdentifier)("ExtHostDiagnostics"),ExtHostDebugService:(0,i.createProxyIdentifier)("ExtHostDebugService"),ExtHostDecorations:(0,i.createProxyIdentifier)("ExtHostDecorations"),ExtHostDocumentsAndEditors:(0,i.createProxyIdentifier)("ExtHostDocumentsAndEditors"),ExtHostDocuments:(0,i.createProxyIdentifier)("ExtHostDocuments"),ExtHostDocumentContentProviders:(0,i.createProxyIdentifier)("ExtHostDocumentContentProviders"),ExtHostDocumentSaveParticipant:(0,i.createProxyIdentifier)("ExtHostDocumentSaveParticipant"),ExtHostEditors:(0,i.createProxyIdentifier)("ExtHostEditors"),ExtHostTreeViews:(0,i.createProxyIdentifier)("ExtHostTreeViews"),ExtHostFileSystem:(0,i.createProxyIdentifier)("ExtHostFileSystem"),ExtHostFileSystemInfo:(0,i.createProxyIdentifier)("ExtHostFileSystemInfo"),ExtHostFileSystemEventService:(0,i.createProxyIdentifier)("ExtHostFileSystemEventService"),ExtHostLanguages:(0,i.createProxyIdentifier)("ExtHostLanguages"),ExtHostLanguageFeatures:(0,i.createProxyIdentifier)("ExtHostLanguageFeatures"),ExtHostQuickOpen:(0,i.createProxyIdentifier)("ExtHostQuickOpen"),ExtHostExtensionService:(0,i.createProxyIdentifier)("ExtHostExtensionService"),ExtHostLogLevelServiceShape:(0,i.createProxyIdentifier)("ExtHostLogLevelServiceShape"),ExtHostTerminalService:(0,i.createProxyIdentifier)("ExtHostTerminalService"),ExtHostSCM:(0,i.createProxyIdentifier)("ExtHostSCM"),ExtHostSearch:(0,i.createProxyIdentifier)("ExtHostSearch"),ExtHostTask:(0,i.createProxyIdentifier)("ExtHostTask"),ExtHostWorkspace:(0,i.createProxyIdentifier)("ExtHostWorkspace"),ExtHostWindow:(0,i.createProxyIdentifier)("ExtHostWindow"),ExtHostWebviews:(0,i.createProxyIdentifier)("ExtHostWebviews"),ExtHostWebviewPanels:(0,i.createProxyIdentifier)("ExtHostWebviewPanels"),ExtHostCustomEditors:(0,i.createProxyIdentifier)("ExtHostCustomEditors"),ExtHostWebviewViews:(0,i.createProxyIdentifier)("ExtHostWebviewViews"),ExtHostEditorInsets:(0,i.createProxyIdentifier)("ExtHostEditorInsets"),ExtHostEditorTabs:(0,i.createProxyIdentifier)("ExtHostEditorTabs"),ExtHostProgress:(0,i.createProxyIdentifier)("ExtHostProgress"),ExtHostComments:(0,i.createProxyIdentifier)("ExtHostComments"),ExtHostSecretState:(0,i.createProxyIdentifier)("ExtHostSecretState"),ExtHostStorage:(0,i.createProxyIdentifier)("ExtHostStorage"),ExtHostUrls:(0,i.createProxyIdentifier)("ExtHostUrls"),ExtHostUriOpeners:(0,i.createProxyIdentifier)("ExtHostUriOpeners"),ExtHostOutputService:(0,i.createProxyIdentifier)("ExtHostOutputService"),ExtHosLabelService:(0,i.createProxyIdentifier)("ExtHostLabelService"),ExtHostNotebook:(0,i.createProxyIdentifier)("ExtHostNotebook"),ExtHostNotebookDocuments:(0,i.createProxyIdentifier)("ExtHostNotebookDocuments"),ExtHostNotebookEditors:(0,i.createProxyIdentifier)("ExtHostNotebookEditors"),ExtHostNotebookKernels:(0,i.createProxyIdentifier)("ExtHostNotebookKernels"),ExtHostNotebookRenderers:(0,i.createProxyIdentifier)("ExtHostNotebookRenderers"),ExtHostInteractive:(0,i.createProxyIdentifier)("ExtHostInteractive"),ExtHostTheming:(0,i.createProxyIdentifier)("ExtHostTheming"),ExtHostTunnelService:(0,i.createProxyIdentifier)("ExtHostTunnelService"),ExtHostAuthentication:(0,i.createProxyIdentifier)("ExtHostAuthentication"),ExtHostTimeline:(0,i.createProxyIdentifier)("ExtHostTimeline"),ExtHostTesting:(0,i.createProxyIdentifier)("ExtHostTesting"),ExtHostTelemetry:(0,i.createProxyIdentifier)("ExtHostTelemetry"),ExtHostLocalization:(0,i.createProxyIdentifier)("ExtHostLocalization")}}),define(De[71],Ce([1,0,3,11,5,14]),function(ne,e,i,D,S,N){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NullApiDeprecationService=e.ExtHostApiDeprecationService=e.IExtHostApiDeprecationService=void 0,e.IExtHostApiDeprecationService=(0,i.createDecorator)("IExtHostApiDeprecationService");let y=class{constructor(_,T){this._extHostLogService=T,this._reportedUsages=new Set,this._telemetryShape=_.getProxy(S.MainContext.MainThreadTelemetry)}report(_,T,O){const b=this.getUsageKey(_,T);this._reportedUsages.has(b)||(this._reportedUsages.add(b),T.isUnderDevelopment&&this._extHostLogService.warn(`[Deprecation Warning] '${_}' is deprecated. ${O}`),this._telemetryShape.$publicLog2("extHostDeprecatedApiUsage",{extensionId:T.identifier.value,apiId:_}))}getUsageKey(_,T){return`${_}-${T.identifier.value}`}};y=He([We(0,N.IExtHostRpcService),We(1,D.ILogService)],y),e.ExtHostApiDeprecationService=y,e.NullApiDeprecationService=Object.freeze(new class{report(A,_,T){}})}),define(De[193],Ce([1,0,4,5,6,25]),function(ne,e,i,D,S,N){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtHostAuthentication=void 0;class y{constructor(_){this._authenticationProviders=new Map,this._providers=[],this._onDidChangeSessions=new i.Emitter,this.onDidChangeSessions=this._onDidChangeSessions.event,this._inFlightRequests=new Map,this._proxy=_.getProxy(D.MainContext.MainThreadAuthentication)}$setProviders(_){return this._providers=_,Promise.resolve()}async getSession(_,T,O,b={}){const g=N.ExtensionIdentifier.toKey(_.identifier),E=this._inFlightRequests.get(g)||[],m=[...O].sort().join(" ");let t=E.find(o=>o.providerId===T&&o.scopes===m);if(t)return t.result;{const o=this._getSession(_,g,T,O,b);t={providerId:T,scopes:m,result:o},E.push(t),this._inFlightRequests.set(g,E);try{await o}finally{const a=E.findIndex(p=>p.providerId===T&&p.scopes===m);a>-1&&(E.splice(a),this._inFlightRequests.set(g,E))}return o}}async _getSession(_,T,O,b,g={}){await this._proxy.$ensureProvider(O);const E=_.displayName||_.name;return this._proxy.$getSession(O,b,T,E,g)}async removeSession(_,T){const O=this._authenticationProviders.get(_);return O?O.provider.removeSession(T):this._proxy.$removeSession(_,T)}registerAuthenticationProvider(_,T,O,b){if(this._authenticationProviders.get(_))throw new Error(`An authentication provider with id '${_}' is already registered.`);this._authenticationProviders.set(_,{label:T,provider:O,options:b??{supportsMultipleAccounts:!1}}),this._providers.find(E=>E.id===_)||this._providers.push({id:_,label:T});const g=O.onDidChangeSessions(E=>{this._proxy.$sendDidChangeSessions(_,{added:E.added??[],changed:E.changed??[],removed:E.removed??[]})});return this._proxy.$registerAuthenticationProvider(_,T,b?.supportsMultipleAccounts??!1),new S.Disposable(()=>{g.dispose(),this._authenticationProviders.delete(_);const E=this._providers.findIndex(m=>m.id===_);E>-1&&this._providers.splice(E),this._proxy.$unregisterAuthenticationProvider(_)})}$createSession(_,T){const O=this._authenticationProviders.get(_);if(O)return Promise.resolve(O.provider.createSession(T));throw new Error(`Unable to find authentication provider with handle: ${_}`)}$removeSession(_,T){const O=this._authenticationProviders.get(_);if(O)return Promise.resolve(O.provider.removeSession(T));throw new Error(`Unable to find authentication provider with handle: ${_}`)}$getSessions(_,T){const O=this._authenticationProviders.get(_);if(O)return Promise.resolve(O.provider.getSessions(T));throw new Error(`Unable to find authentication provider with handle: ${_}`)}$onDidChangeAuthenticationSessions(_,T){return this._onDidChangeSessions.fire({provider:{id:_,label:T}}),Promise.resolve()}}e.ExtHostAuthentication=y}),define(De[194],Ce([1,0,5,14,8]),function(ne,e,i,D,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtHostBulkEdits=void 0;let N=class{constructor(A,_){this._proxy=A.getProxy(i.MainContext.MainThreadBulkEdits),this._versionInformationProvider={getTextDocumentVersion:T=>_.getDocument(T)?.version,getNotebookDocumentVersion:()=>{}}}applyWorkspaceEdit(A,_,T){const O=S.WorkspaceEdit.from(A,this._versionInformationProvider);return this._proxy.$tryApplyWorkspaceEdit(O,void 0,T?.isRefactoring??!1)}};N=He([We(0,D.IExtHostRpcService)],N),e.ExtHostBulkEdits=N}),define(De[195],Ce([1,0,5]),function(ne,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtHostClipboard=void 0;class D{constructor(N){const y=N.getProxy(i.MainContext.MainThreadClipboard);this.value=Object.freeze({readText(){return y.$readText()},writeText(A){return y.$writeText(A)}})}}e.ExtHostClipboard=D});var Je=this&&this.__classPrivateFieldSet||function(ne,e,i,D,S){if(D==="m")throw new TypeError("Private method is not writable");if(D==="a"&&!S)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?ne!==e||!S:!e.has(ne))throw new TypeError("Cannot write private member to an object whose class did not declare it");return D==="a"?S.call(ne,i):S?S.value=i:e.set(ne,i),i},Re=this&&this.__classPrivateFieldGet||function(ne,e,i,D){if(i==="a"&&!D)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?ne!==e||!D:!e.has(ne))throw new TypeError("Cannot read private member from an object whose class did not declare it");return i==="m"?D:i==="a"?D.call(ne):D?D.value:e.get(ne)};define(De[37],Ce([1,0,9,6,8,23,5,18,11,80,52,248,2,7,3,14,96,24,43,45]),function(ne,e,i,D,S,N,y,A,_,T,O,b,g,E,m,t,o,a,p,w){"use strict";var u,I;Object.defineProperty(e,"__esModule",{value:!0}),e.ApiCommand=e.ApiCommandResult=e.ApiCommandArgument=e.CommandsConverter=e.IExtHostCommands=e.ExtHostCommands=void 0;let r=class{constructor(s,h){u.set(this,void 0),this._commands=new Map,this._apiCommands=new Map,I.set(this,void 0),Je(this,u,s.getProxy(y.MainContext.MainThreadCommands),"f"),this._logService=h,Je(this,I,s.getProxy(y.MainContext.MainThreadTelemetry),"f"),this.converter=new c(this,v=>{const k=this._apiCommands.get(v);return k?.result===d.Void?k:void 0},h),this._argumentProcessors=[{processArgument(v){return(0,T.revive)(v)}},{processArgument(v){return(0,N.cloneAndChange)(v,function(k){if(O.Range.isIRange(k))return S.Range.to(k);if(b.Position.isIPosition(k))return S.Position.to(k);if(O.Range.isIRange(k.range)&&g.URI.isUri(k.uri))return S.location.to(k);if(k instanceof a.VSBuffer)return k.buffer.buffer;if(!Array.isArray(k))return k})}}]}registerArgumentProcessor(s){this._argumentProcessors.push(s)}registerApiCommand(s){const h=this.registerCommand(!1,s.id,async(...v)=>{const k=s.args.map((j,W)=>{if(!j.validate(v[W]))throw new Error(`Invalid argument '${j.name}' when running '${s.id}', received: ${v[W]}`);return j.convert(v[W])}),F=await this.executeCommand(s.internalId,...k);return s.result.convert(F,v,this.converter)},void 0,{description:s.description,args:s.args,returns:s.result.description});return this._apiCommands.set(s.id,s),new D.Disposable(()=>{h.dispose(),this._apiCommands.delete(s.id)})}registerCommand(s,h,v,k,F,j){if(this._logService.trace("ExtHostCommands#registerCommand",h),!h.trim().length)throw new Error("invalid id");if(this._commands.has(h))throw new Error(`command '${h}' already exists`);return this._commands.set(h,{callback:v,thisArg:k,description:F,extension:j}),s&&Re(this,u,"f").$registerCommand(h),new D.Disposable(()=>{this._commands.delete(h)&&s&&Re(this,u,"f").$unregisterCommand(h)})}executeCommand(s,...h){return this._logService.trace("ExtHostCommands#executeCommand",s),this._doExecuteCommand(s,h,!0)}async _doExecuteCommand(s,h,v){if(this._commands.has(s))return Re(this,u,"f").$fireCommandActivationEvent(s),this._executeContributedCommand(s,h,!1);{let k=!1;const F=(0,N.cloneAndChange)(h,function(j){if(j instanceof D.Position)return S.Position.from(j);if(j instanceof D.Range)return S.Range.from(j);if(j instanceof D.Location)return S.location.from(j);if(D.NotebookRange.isNotebookRange(j))return S.NotebookRange.from(j);if(j instanceof ArrayBuffer)return k=!0,a.VSBuffer.wrap(new Uint8Array(j));if(j instanceof Uint8Array)return k=!0,a.VSBuffer.wrap(j);if(j instanceof a.VSBuffer)return k=!0,j;if(!Array.isArray(j))return j});try{const j=await Re(this,u,"f").$executeCommand(s,k?new p.SerializableObjectWithBuffers(F):F,v);return(0,T.revive)(j)}catch(j){if(j instanceof Error&&j.message==="$executeCommand:retry")return this._doExecuteCommand(s,h,!1);throw j}}}async _executeContributedCommand(s,h,v){const k=this._commands.get(s);if(!k)throw new Error("Unknown command");this._reportTelemetry(k,s);const{callback:F,thisArg:j,description:W}=k;if(W)for(let H=0;Hthis._argumentProcessors.reduce((k,F)=>F.processArgument(k),v)),this._executeContributedCommand(s,h,!0)):Promise.reject(new Error(`Contributed command '${s}' does not exist.`))}getCommands(s=!1){return this._logService.trace("ExtHostCommands#getCommands",s),Re(this,u,"f").$getCommands().then(h=>(s&&(h=h.filter(v=>v[0]!=="_")),h))}$getContributedCommandHandlerDescriptions(){const s=Object.create(null);for(const[h,v]of this._commands){const{description:k}=v;k&&(s[h]=k)}return Promise.resolve(s)}};u=new WeakMap,I=new WeakMap,r=He([We(0,t.IExtHostRpcService),We(1,_.ILogService)],r),e.ExtHostCommands=r,e.IExtHostCommands=(0,m.createDecorator)("IExtHostCommands");class c{constructor(s,h,v){this._commands=s,this._lookupApiCommand=h,this._logService=v,this.delegatingCommandId=`__vsc${Date.now().toString(36)}`,this._cache=new Map,this._cachIdPool=0,this._commands.registerCommand(!0,this.delegatingCommandId,this._executeConvertedCommand,this)}toInternal(s,h){if(!s)return;const v={$ident:void 0,id:s.command,title:s.title,tooltip:s.tooltip};if(!s.command)return v;const k=this._lookupApiCommand(s.command);if(k)v.id=k.internalId,v.arguments=k.args.map((F,j)=>F.convert(s.arguments&&s.arguments[j]));else if((0,A.isNonEmptyArray)(s.arguments)){const F=++this._cachIdPool;this._cache.set(F,s),h.add((0,E.toDisposable)(()=>{this._cache.delete(F),this._logService.trace("CommandsConverter#DISPOSE",F)})),v.$ident=F,v.id=this.delegatingCommandId,v.arguments=[F],this._logService.trace("CommandsConverter#CREATE",s.command,F)}return v}fromInternal(s){return typeof s.$ident=="number"?this._cache.get(s.$ident):{command:s.id,title:s.title,arguments:s.arguments}}getActualCommand(...s){return this._cache.get(s[0])}_executeConvertedCommand(...s){const h=this.getActualCommand(...s);return this._logService.trace("CommandsConverter#EXECUTE",s[0],h?h.command:"MISSING"),h?this._commands.executeCommand(h.command,...h.arguments||[]):Promise.reject("actual command NOT FOUND")}}e.CommandsConverter=c;class n{constructor(s,h,v,k){this.name=s,this.description=h,this.validate=v,this.convert=k}optional(){return new n(this.name,`(optional) ${this.description}`,s=>s==null||this.validate(s),s=>s===void 0?void 0:s===null?null:this.convert(s))}with(s,h){return new n(s??this.name,h??this.description,this.validate,this.convert)}}e.ApiCommandArgument=n,n.Uri=new n("uri","Uri of a text document",f=>g.URI.isUri(f),f=>f),n.Position=new n("position","A position in a text document",f=>D.Position.isPosition(f),S.Position.from),n.Range=new n("range","A range in a text document",f=>D.Range.isRange(f),S.Range.from),n.Selection=new n("selection","A selection in a text document",f=>D.Selection.isSelection(f),S.Selection.from),n.Number=new n("number","",f=>typeof f=="number",f=>f),n.String=new n("string","",f=>typeof f=="string",f=>f),n.CallHierarchyItem=new n("item","A call hierarchy item",f=>f instanceof D.CallHierarchyItem,S.CallHierarchyItem.from),n.TypeHierarchyItem=new n("item","A type hierarchy item",f=>f instanceof D.TypeHierarchyItem,S.TypeHierarchyItem.from),n.TestItem=new n("testItem","A VS Code TestItem",f=>f instanceof o.TestItemImpl,S.TestItem.from);class d{constructor(s,h){this.description=s,this.convert=h}}e.ApiCommandResult=d,d.Void=new d("no result",f=>f);class l{constructor(s,h,v,k,F){this.id=s,this.internalId=h,this.description=v,this.args=k,this.result=F}}e.ApiCommand=l}),define(De[196],Ce([1,0,2,8,6,70,37,18,83,87,13]),function(ne,e,i,D,S,N,y,A,_,T,O){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtHostApiCommands=void 0;const b=[new y.ApiCommand("vscode.executeDocumentHighlights","_executeDocumentHighlights","Execute document highlight provider.",[y.ApiCommandArgument.Uri,y.ApiCommandArgument.Position],new y.ApiCommandResult("A promise that resolves to an array of DocumentHighlight-instances.",E(D.DocumentHighlight.to))),new y.ApiCommand("vscode.executeDocumentSymbolProvider","_executeDocumentSymbolProvider","Execute document symbol provider.",[y.ApiCommandArgument.Uri],new y.ApiCommandResult("A promise that resolves to an array of SymbolInformation and DocumentSymbol instances.",(t,o)=>{if((0,A.isFalsyOrEmpty)(t))return;class a extends S.SymbolInformation{static to(w){const u=new a(w.name,D.SymbolKind.to(w.kind),w.containerName||"",new S.Location(o[0],D.Range.to(w.range)));return u.detail=w.detail,u.range=u.location.range,u.selectionRange=D.Range.to(w.selectionRange),u.children=w.children?w.children.map(a.to):[],u}}return t.map(a.to)})),new y.ApiCommand("vscode.executeFormatDocumentProvider","_executeFormatDocumentProvider","Execute document format provider.",[y.ApiCommandArgument.Uri,new y.ApiCommandArgument("options","Formatting options",t=>!0,t=>t)],new y.ApiCommandResult("A promise that resolves to an array of TextEdits.",E(D.TextEdit.to))),new y.ApiCommand("vscode.executeFormatRangeProvider","_executeFormatRangeProvider","Execute range format provider.",[y.ApiCommandArgument.Uri,y.ApiCommandArgument.Range,new y.ApiCommandArgument("options","Formatting options",t=>!0,t=>t)],new y.ApiCommandResult("A promise that resolves to an array of TextEdits.",E(D.TextEdit.to))),new y.ApiCommand("vscode.executeFormatOnTypeProvider","_executeFormatOnTypeProvider","Execute format on type provider.",[y.ApiCommandArgument.Uri,y.ApiCommandArgument.Position,new y.ApiCommandArgument("ch","Trigger character",t=>typeof t=="string",t=>t),new y.ApiCommandArgument("options","Formatting options",t=>!0,t=>t)],new y.ApiCommandResult("A promise that resolves to an array of TextEdits.",E(D.TextEdit.to))),new y.ApiCommand("vscode.executeDefinitionProvider","_executeDefinitionProvider","Execute all definition providers.",[y.ApiCommandArgument.Uri,y.ApiCommandArgument.Position],new y.ApiCommandResult("A promise that resolves to an array of Location or LocationLink instances.",m)),new y.ApiCommand("vscode.executeTypeDefinitionProvider","_executeTypeDefinitionProvider","Execute all type definition providers.",[y.ApiCommandArgument.Uri,y.ApiCommandArgument.Position],new y.ApiCommandResult("A promise that resolves to an array of Location or LocationLink instances.",m)),new y.ApiCommand("vscode.executeDeclarationProvider","_executeDeclarationProvider","Execute all declaration providers.",[y.ApiCommandArgument.Uri,y.ApiCommandArgument.Position],new y.ApiCommandResult("A promise that resolves to an array of Location or LocationLink instances.",m)),new y.ApiCommand("vscode.executeImplementationProvider","_executeImplementationProvider","Execute all implementation providers.",[y.ApiCommandArgument.Uri,y.ApiCommandArgument.Position],new y.ApiCommandResult("A promise that resolves to an array of Location or LocationLink instances.",m)),new y.ApiCommand("vscode.executeReferenceProvider","_executeReferenceProvider","Execute all reference providers.",[y.ApiCommandArgument.Uri,y.ApiCommandArgument.Position],new y.ApiCommandResult("A promise that resolves to an array of Location-instances.",E(D.location.to))),new y.ApiCommand("vscode.executeHoverProvider","_executeHoverProvider","Execute all hover providers.",[y.ApiCommandArgument.Uri,y.ApiCommandArgument.Position],new y.ApiCommandResult("A promise that resolves to an array of Hover-instances.",E(D.Hover.to))),new y.ApiCommand("vscode.executeSelectionRangeProvider","_executeSelectionRangeProvider","Execute selection range provider.",[y.ApiCommandArgument.Uri,new y.ApiCommandArgument("position","A position in a text document",t=>Array.isArray(t)&&t.every(o=>S.Position.isPosition(o)),t=>t.map(D.Position.from))],new y.ApiCommandResult("A promise that resolves to an array of ranges.",t=>t.map(o=>{let a;for(const p of o.reverse())a=new S.SelectionRange(D.Range.to(p),a);return a}))),new y.ApiCommand("vscode.executeWorkspaceSymbolProvider","_executeWorkspaceSymbolProvider","Execute all workspace symbol providers.",[y.ApiCommandArgument.String.with("query","Search string")],new y.ApiCommandResult("A promise that resolves to an array of SymbolInformation-instances.",t=>t.map(D.WorkspaceSymbol.to))),new y.ApiCommand("vscode.prepareCallHierarchy","_executePrepareCallHierarchy","Prepare call hierarchy at a position inside a document",[y.ApiCommandArgument.Uri,y.ApiCommandArgument.Position],new y.ApiCommandResult("A CallHierarchyItem or undefined",t=>t.map(D.CallHierarchyItem.to))),new y.ApiCommand("vscode.provideIncomingCalls","_executeProvideIncomingCalls","Compute incoming calls for an item",[y.ApiCommandArgument.CallHierarchyItem],new y.ApiCommandResult("A CallHierarchyItem or undefined",t=>t.map(D.CallHierarchyIncomingCall.to))),new y.ApiCommand("vscode.provideOutgoingCalls","_executeProvideOutgoingCalls","Compute outgoing calls for an item",[y.ApiCommandArgument.CallHierarchyItem],new y.ApiCommandResult("A CallHierarchyItem or undefined",t=>t.map(D.CallHierarchyOutgoingCall.to))),new y.ApiCommand("vscode.prepareRename","_executePrepareRename","Execute the prepareRename of rename provider.",[y.ApiCommandArgument.Uri,y.ApiCommandArgument.Position],new y.ApiCommandResult("A promise that resolves to a range and placeholder text.",t=>{if(!!t)return{range:D.Range.to(t.range),placeholder:t.text}})),new y.ApiCommand("vscode.executeDocumentRenameProvider","_executeDocumentRenameProvider","Execute rename provider.",[y.ApiCommandArgument.Uri,y.ApiCommandArgument.Position,y.ApiCommandArgument.String.with("newName","The new symbol name")],new y.ApiCommandResult("A promise that resolves to a WorkspaceEdit.",t=>{if(!!t){if(t.rejectReason)throw new Error(t.rejectReason);return D.WorkspaceEdit.to(t)}})),new y.ApiCommand("vscode.executeLinkProvider","_executeLinkProvider","Execute document link provider.",[y.ApiCommandArgument.Uri,y.ApiCommandArgument.Number.with("linkResolveCount","Number of links that should be resolved, only when links are unresolved.").optional()],new y.ApiCommandResult("A promise that resolves to an array of DocumentLink-instances.",t=>t.map(D.DocumentLink.to))),new y.ApiCommand("vscode.provideDocumentSemanticTokensLegend","_provideDocumentSemanticTokensLegend","Provide semantic tokens legend for a document",[y.ApiCommandArgument.Uri],new y.ApiCommandResult("A promise that resolves to SemanticTokensLegend.",t=>{if(!!t)return new S.SemanticTokensLegend(t.tokenTypes,t.tokenModifiers)})),new y.ApiCommand("vscode.provideDocumentSemanticTokens","_provideDocumentSemanticTokens","Provide semantic tokens for a document",[y.ApiCommandArgument.Uri],new y.ApiCommandResult("A promise that resolves to SemanticTokens.",t=>{if(!t)return;const o=(0,_.decodeSemanticTokensDto)(t);if(o.type==="full")return new S.SemanticTokens(o.data,void 0)})),new y.ApiCommand("vscode.provideDocumentRangeSemanticTokensLegend","_provideDocumentRangeSemanticTokensLegend","Provide semantic tokens legend for a document range",[y.ApiCommandArgument.Uri,y.ApiCommandArgument.Range.optional()],new y.ApiCommandResult("A promise that resolves to SemanticTokensLegend.",t=>{if(!!t)return new S.SemanticTokensLegend(t.tokenTypes,t.tokenModifiers)})),new y.ApiCommand("vscode.provideDocumentRangeSemanticTokens","_provideDocumentRangeSemanticTokens","Provide semantic tokens for a document range",[y.ApiCommandArgument.Uri,y.ApiCommandArgument.Range],new y.ApiCommandResult("A promise that resolves to SemanticTokens.",t=>{if(!t)return;const o=(0,_.decodeSemanticTokensDto)(t);if(o.type==="full")return new S.SemanticTokens(o.data,void 0)})),new y.ApiCommand("vscode.executeCompletionItemProvider","_executeCompletionItemProvider","Execute completion item provider.",[y.ApiCommandArgument.Uri,y.ApiCommandArgument.Position,y.ApiCommandArgument.String.with("triggerCharacter","Trigger completion when the user types the character, like `,` or `(`").optional(),y.ApiCommandArgument.Number.with("itemResolveCount","Number of completions to resolve (too large numbers slow down completions)").optional()],new y.ApiCommandResult("A promise that resolves to a CompletionList-instance.",(t,o,a)=>{if(!t)return new S.CompletionList([]);const p=t.suggestions.map(w=>D.CompletionItem.to(w,a));return new S.CompletionList(p,t.incomplete)})),new y.ApiCommand("vscode.executeSignatureHelpProvider","_executeSignatureHelpProvider","Execute signature help provider.",[y.ApiCommandArgument.Uri,y.ApiCommandArgument.Position,y.ApiCommandArgument.String.with("triggerCharacter","Trigger signature help when the user types the character, like `,` or `(`").optional()],new y.ApiCommandResult("A promise that resolves to SignatureHelp.",t=>{if(t)return D.SignatureHelp.to(t)})),new y.ApiCommand("vscode.executeCodeLensProvider","_executeCodeLensProvider","Execute code lens provider.",[y.ApiCommandArgument.Uri,y.ApiCommandArgument.Number.with("itemResolveCount","Number of lenses that should be resolved and returned. Will only return resolved lenses, will impact performance)").optional()],new y.ApiCommandResult("A promise that resolves to an array of CodeLens-instances.",(t,o,a)=>E(p=>new S.CodeLens(D.Range.to(p.range),p.command&&a.fromInternal(p.command)))(t))),new y.ApiCommand("vscode.executeCodeActionProvider","_executeCodeActionProvider","Execute code action provider.",[y.ApiCommandArgument.Uri,new y.ApiCommandArgument("rangeOrSelection","Range in a text document. Some refactoring provider requires Selection object.",t=>S.Range.isRange(t),t=>S.Selection.isSelection(t)?D.Selection.from(t):D.Range.from(t)),y.ApiCommandArgument.String.with("kind","Code action kind to return code actions for").optional(),y.ApiCommandArgument.Number.with("itemResolveCount","Number of code actions to resolve (too large numbers slow down code actions)").optional()],new y.ApiCommandResult("A promise that resolves to an array of Command-instances.",(t,o,a)=>E(p=>{if(p._isSynthetic){if(!p.command)throw new Error("Synthetic code actions must have a command");return a.fromInternal(p.command)}else{const w=new S.CodeAction(p.title,p.kind?new S.CodeActionKind(p.kind):void 0);return p.edit&&(w.edit=D.WorkspaceEdit.to(p.edit)),p.command&&(w.command=a.fromInternal(p.command)),w.isPreferred=p.isPreferred,w}})(t))),new y.ApiCommand("vscode.executeDocumentColorProvider","_executeDocumentColorProvider","Execute document color provider.",[y.ApiCommandArgument.Uri],new y.ApiCommandResult("A promise that resolves to an array of ColorInformation objects.",t=>t?t.map(o=>new S.ColorInformation(D.Range.to(o.range),D.Color.to(o.color))):[])),new y.ApiCommand("vscode.executeColorPresentationProvider","_executeColorPresentationProvider","Execute color presentation provider.",[new y.ApiCommandArgument("color","The color to show and insert",t=>t instanceof S.Color,D.Color.from),new y.ApiCommandArgument("context","Context object with uri and range",t=>!0,t=>({uri:t.uri,range:D.Range.from(t.range)}))],new y.ApiCommandResult("A promise that resolves to an array of ColorPresentation objects.",t=>t?t.map(D.ColorPresentation.to):[])),new y.ApiCommand("vscode.executeInlayHintProvider","_executeInlayHintProvider","Execute inlay hints provider",[y.ApiCommandArgument.Uri,y.ApiCommandArgument.Range],new y.ApiCommandResult("A promise that resolves to an array of Inlay objects",(t,o,a)=>t.map(D.InlayHint.to.bind(void 0,a)))),new y.ApiCommand("vscode.resolveNotebookContentProviders","_resolveNotebookContentProvider","Resolve Notebook Content Providers",[],new y.ApiCommandResult("A promise that resolves to an array of NotebookContentProvider static info objects.",E(t=>({viewType:t.viewType,displayName:t.displayName,options:{transientOutputs:t.options.transientOutputs,transientCellMetadata:t.options.transientCellMetadata,transientDocumentMetadata:t.options.transientDocumentMetadata},filenamePattern:t.filenamePattern.map(o=>D.NotebookExclusiveDocumentPattern.to(o))})))),new y.ApiCommand("vscode.executeInlineValueProvider","_executeInlineValueProvider","Execute inline value provider",[y.ApiCommandArgument.Uri,y.ApiCommandArgument.Range],new y.ApiCommandResult("A promise that resolves to an array of InlineValue objects",t=>t.map(D.InlineValue.to))),new y.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 y.ApiCommandArgument("uriOrString","Uri-instance or string (only http/https)",t=>i.URI.isUri(t)||typeof t=="string"&&(0,T.matchesSomeScheme)(t,O.Schemas.http,O.Schemas.https),t=>t),new y.ApiCommandArgument("columnOrOptions","Either the column in which to open or editor options, see vscode.TextDocumentShowOptions",t=>t===void 0||typeof t=="number"||typeof t=="object",t=>t&&(typeof t=="number"?[D.ViewColumn.from(t),void 0]:[D.ViewColumn.from(t.viewColumn),D.TextEditorOpenOptions.from(t)])).optional(),y.ApiCommandArgument.String.with("label","").optional()],y.ApiCommandResult.Void),new y.ApiCommand("vscode.openWith","_workbench.openWith","Opens the provided resource with a specific editor.",[y.ApiCommandArgument.Uri.with("resource","Resource to open"),y.ApiCommandArgument.String.with("viewId","Custom editor view id or 'default' to use VS Code's default editor"),new y.ApiCommandArgument("columnOrOptions","Either the column in which to open or editor options, see vscode.TextDocumentShowOptions",t=>t===void 0||typeof t=="number"||typeof t=="object",t=>t&&(typeof t=="number"?[D.ViewColumn.from(t),void 0]:[D.ViewColumn.from(t.viewColumn),D.TextEditorOpenOptions.from(t)])).optional()],y.ApiCommandResult.Void),new y.ApiCommand("vscode.diff","_workbench.diff","Opens the provided resources in the diff editor to compare their contents.",[y.ApiCommandArgument.Uri.with("left","Left-hand side resource of the diff editor"),y.ApiCommandArgument.Uri.with("right","Right-hand side resource of the diff editor"),y.ApiCommandArgument.String.with("title","Human readable title for the diff editor").optional(),new y.ApiCommandArgument("columnOrOptions","Either the column in which to open or editor options, see vscode.TextDocumentShowOptions",t=>t===void 0||typeof t=="object",t=>t&&[D.ViewColumn.from(t.viewColumn),D.TextEditorOpenOptions.from(t)]).optional()],y.ApiCommandResult.Void),new y.ApiCommand("vscode.prepareTypeHierarchy","_executePrepareTypeHierarchy","Prepare type hierarchy at a position inside a document",[y.ApiCommandArgument.Uri,y.ApiCommandArgument.Position],new y.ApiCommandResult("A TypeHierarchyItem or undefined",t=>t.map(D.TypeHierarchyItem.to))),new y.ApiCommand("vscode.provideSupertypes","_executeProvideSupertypes","Compute supertypes for an item",[y.ApiCommandArgument.TypeHierarchyItem],new y.ApiCommandResult("A TypeHierarchyItem or undefined",t=>t.map(D.TypeHierarchyItem.to))),new y.ApiCommand("vscode.provideSubtypes","_executeProvideSubtypes","Compute subtypes for an item",[y.ApiCommandArgument.TypeHierarchyItem],new y.ApiCommandResult("A TypeHierarchyItem or undefined",t=>t.map(D.TypeHierarchyItem.to))),new y.ApiCommand("vscode.revealTestInExplorer","_revealTestInExplorer","Reveals a test instance in the explorer",[y.ApiCommandArgument.TestItem],y.ApiCommandResult.Void),new y.ApiCommand("vscode.experimental.editSession.continue","_workbench.editSessions.actions.continueEditSession","Continue the current edit session in a different workspace",[y.ApiCommandArgument.Uri.with("workspaceUri","The target workspace to continue the current edit session in")],y.ApiCommandResult.Void)];class g{static register(o){b.forEach(o.registerApiCommand,o)}}e.ExtHostApiCommands=g;function E(t){return o=>{if(Array.isArray(o))return o.map(t)}}function m(t){if(!Array.isArray(t))return;const o=[];for(const a of t)N.isLocationLink(a)?o.push(D.DefinitionLink.to(a)):o.push(D.location.to(a));return o}}),define(De[197],Ce([1,0,15,58,4,7,2,70,25,8,6,27,5]),function(ne,e,i,D,S,N,y,A,_,T,O,b,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createExtHostComments=void 0;function E(m,t,o){const a=m.getProxy(g.MainContext.MainThreadComments);class p{constructor(){this._commentControllers=new Map,this._commentControllersByExtension=new Map,t.registerArgumentProcessor({processArgument:f=>{if(f&&f.$mid===6){const s=this._commentControllers.get(f.handle);return s?s.value:f}else if(f&&f.$mid===7){const s=this._commentControllers.get(f.commentControlHandle);if(!s)return f;const h=s.getCommentThread(f.commentThreadHandle);return h?h.value:f}else if(f&&f.$mid===8){const s=this._commentControllers.get(f.thread.commentControlHandle);if(!s)return f;const h=s.getCommentThread(f.thread.commentThreadHandle);return h?{thread:h.value,text:f.text}:f}else if(f&&f.$mid===9){const s=this._commentControllers.get(f.thread.commentControlHandle);if(!s)return f;const h=s.getCommentThread(f.thread.commentThreadHandle);if(!h)return f;const v=f.commentUniqueId,k=h.getCommentByUniqueId(v);return k||f}else if(f&&f.$mid===10){const s=this._commentControllers.get(f.thread.commentControlHandle);if(!s)return f;const h=s.getCommentThread(f.thread.commentThreadHandle);if(!h)return f;const v=f.text,k=f.commentUniqueId,F=h.getCommentByUniqueId(k);return F?(typeof F.body=="string"?F.body=v:F.body.value=v,F):f}return f}})}createCommentController(f,s,h){const v=p.handlePool++,k=new u(f,v,s,h);this._commentControllers.set(k.handle,k);const F=this._commentControllersByExtension.get(_.ExtensionIdentifier.toKey(f.identifier))||[];return F.push(k),this._commentControllersByExtension.set(_.ExtensionIdentifier.toKey(f.identifier),F),k.value}$createCommentThreadTemplate(f,s,h){const v=this._commentControllers.get(f);!v||v.$createCommentThreadTemplate(s,h)}async $updateCommentThreadTemplate(f,s,h){const v=this._commentControllers.get(f);!v||v.$updateCommentThreadTemplate(s,h)}$deleteCommentThread(f,s){this._commentControllers.get(f)?.$deleteCommentThread(s)}$provideCommentingRanges(f,s,h){const v=this._commentControllers.get(f);if(!v||!v.commentingRangeProvider)return Promise.resolve(void 0);const k=o.getDocument(y.URI.revive(s));return(0,i.asPromise)(()=>v.commentingRangeProvider.provideCommentingRanges(k,h)).then(F=>F?F.map(j=>T.Range.from(j)):void 0)}$toggleReaction(f,s,h,v,k){const F=this._commentControllers.get(f);return!F||!F.reactionHandler?Promise.resolve(void 0):(0,i.asPromise)(()=>{const j=F.getCommentThread(s);if(j){const W=j.getCommentByUniqueId(v.uniqueIdInThread);if(F!==void 0&&W&&F.reactionHandler)return F.reactionHandler(W,c(k))}return Promise.resolve(void 0)})}dispose(){}}p.handlePool=0;class w{set threadId(f){this._id=f}get threadId(){return this._id}get id(){return this._id}get resource(){return this._uri}get uri(){return this._uri}set range(f){f.isEqual(this._range)||(this._range=f,this.modifications.range=f,this._onDidUpdateCommentThread.fire())}get range(){return this._range}set canReply(f){this._canReply!==f&&(this._canReply=f,this.modifications.canReply=f,this._onDidUpdateCommentThread.fire())}get canReply(){return this._canReply}get label(){return this._label}set label(f){this._label=f,this.modifications.label=f,this._onDidUpdateCommentThread.fire()}get contextValue(){return this._contextValue}set contextValue(f){this._contextValue=f,this.modifications.contextValue=f,this._onDidUpdateCommentThread.fire()}get comments(){return this._comments}set comments(f){this._comments=f,this.modifications.comments=f,this._onDidUpdateCommentThread.fire()}get collapsibleState(){return this._collapseState}set collapsibleState(f){this._collapseState=f,this.modifications.collapsibleState=f,this._onDidUpdateCommentThread.fire()}get state(){return(0,b.checkProposedApiEnabled)(this.extensionDescription,"commentsResolvedState"),this._state}set state(f){(0,b.checkProposedApiEnabled)(this.extensionDescription,"commentsResolvedState"),this._state=f,this.modifications.state=f,this._onDidUpdateCommentThread.fire()}get isDisposed(){return this._isDiposed}constructor(f,s,h,v,k,F,j,W){this._commentControllerHandle=s,this._id=h,this._uri=v,this._range=k,this._comments=F,this.extensionDescription=j,this._isTemplate=W,this.handle=w._handlePool++,this.commentHandle=0,this.modifications=Object.create(null),this._onDidUpdateCommentThread=new S.Emitter,this.onDidUpdateCommentThread=this._onDidUpdateCommentThread.event,this._canReply=!0,this._commentsMap=new Map,this._acceptInputDisposables=new N.MutableDisposable,this._acceptInputDisposables.value=new N.DisposableStore,this._id===void 0&&(this._id=`${f}.${this.handle}`),a.$createCommentThread(s,this.handle,this._id,this._uri,T.Range.from(this._range),j.identifier,this._isTemplate),this._localDisposables=[],this._isDiposed=!1,this._localDisposables.push(this.onDidUpdateCommentThread(()=>{this.eventuallyUpdateCommentThread()})),this.comments=F,this._localDisposables.push({dispose:()=>{a.$deleteCommentThread(s,this.handle)}});const H=this;this.value={get uri(){return H.uri},get range(){return H.range},set range(P){H.range=P},get comments(){return H.comments},set comments(P){H.comments=P},get collapsibleState(){return H.collapsibleState},set collapsibleState(P){H.collapsibleState=P},get canReply(){return H.canReply},set canReply(P){H.canReply=P},get contextValue(){return H.contextValue},set contextValue(P){H.contextValue=P},get label(){return H.label},set label(P){H.label=P},get state(){return H.state},set state(P){H.state=P},dispose:()=>{H.dispose()}}}updateIsTemplate(){this._isTemplate&&(this._isTemplate=!1,this.modifications.isTemplate=!1)}eventuallyUpdateCommentThread(){if(this._isDiposed)return;this.updateIsTemplate(),this._acceptInputDisposables.value||(this._acceptInputDisposables.value=new N.DisposableStore);const f=h=>Object.prototype.hasOwnProperty.call(this.modifications,h),s={};f("range")&&(s.range=T.Range.from(this._range)),f("label")&&(s.label=this.label),f("contextValue")&&(s.contextValue=this.contextValue??null),f("comments")&&(s.comments=this._comments.map(h=>I(this,h,this._commentsMap))),f("collapsibleState")&&(s.collapseState=n(this._collapseState)),f("canReply")&&(s.canReply=this.canReply),f("state")&&(s.state=d(this._state)),f("isTemplate")&&(s.isTemplate=this._isTemplate),this.modifications={},a.$updateCommentThread(this._commentControllerHandle,this.handle,this._id,this._uri,s)}getCommentByUniqueId(f){for(const s of this._commentsMap){const h=s[0],v=s[1];if(f===v)return h}}dispose(){this._isDiposed=!0,this._acceptInputDisposables.dispose(),this._localDisposables.forEach(f=>f.dispose())}}w._handlePool=0,He([(0,D.debounce)(100)],w.prototype,"eventuallyUpdateCommentThread",null);class u{get id(){return this._id}get label(){return this._label}get handle(){return this._handle}get commentingRangeProvider(){return this._commentingRangeProvider}set commentingRangeProvider(f){this._commentingRangeProvider=f,a.$updateCommentingRanges(this.handle)}get reactionHandler(){return this._reactionHandler}set reactionHandler(f){this._reactionHandler=f,a.$updateCommentControllerFeatures(this.handle,{reactionHandler:!!f})}get options(){return this._options}set options(f){this._options=f,a.$updateCommentControllerFeatures(this.handle,{options:this._options})}constructor(f,s,h,v){this._extension=f,this._handle=s,this._id=h,this._label=v,this._threads=new Map,a.$registerCommentController(this.handle,h,v);const k=this;this.value=Object.freeze({id:k.id,label:k.label,get options(){return k.options},set options(F){k.options=F},get commentingRangeProvider(){return k.commentingRangeProvider},set commentingRangeProvider(F){k.commentingRangeProvider=F},get reactionHandler(){return k.reactionHandler},set reactionHandler(F){k.reactionHandler=F},createCommentThread(F,j,W){return k.createCommentThread(F,j,W).value},dispose:()=>{k.dispose()}}),this._localDisposables=[],this._localDisposables.push({dispose:()=>{a.$unregisterCommentController(this.handle)}})}createCommentThread(f,s,h,v){if(typeof f=="string"){const k=new w(this.id,this.handle,f,s,h,v,this._extension,!1);return this._threads.set(k.handle,k),k}else{const k=new w(this.id,this.handle,void 0,f,s,h,this._extension,!1);return this._threads.set(k.handle,k),k}}$createCommentThreadTemplate(f,s){const h=new w(this.id,this.handle,void 0,y.URI.revive(f),T.Range.to(s),[],this._extension,!0);return h.collapsibleState=A.CommentThreadCollapsibleState.Expanded,this._threads.set(h.handle,h),h}$updateCommentThreadTemplate(f,s){const h=this._threads.get(f);h&&(h.range=T.Range.to(s))}$deleteCommentThread(f){this._threads.get(f)?.dispose(),this._threads.delete(f)}getCommentThread(f){return this._threads.get(f)}dispose(){this._threads.forEach(f=>{f.dispose()}),this._localDisposables.forEach(f=>f.dispose())}}function I(l,f,s){let h=s.get(f);h||(h=++l.commentHandle,s.set(f,h));const v=f.author&&f.author.iconPath?f.author.iconPath.toString():void 0;return{mode:f.mode,contextValue:f.contextValue,uniqueIdInThread:h,body:typeof f.body=="string"?f.body:T.MarkdownString.from(f.body),userName:f.author.name,userIconPath:v,label:f.label,commentReactions:f.reactions?f.reactions.map(k=>r(k)):void 0,timestamp:f.timestamp?.toJSON()}}function r(l){return{label:l.label,iconPath:l.iconPath?T.pathOrURIToURI(l.iconPath):void 0,count:l.count,hasReacted:l.authorHasReacted}}function c(l){return{label:l.label||"",count:l.count||0,iconPath:l.iconPath?y.URI.revive(l.iconPath):"",authorHasReacted:l.hasReacted||!1}}function n(l){if(l!==void 0)switch(l){case O.CommentThreadCollapsibleState.Expanded:return A.CommentThreadCollapsibleState.Expanded;case O.CommentThreadCollapsibleState.Collapsed:return A.CommentThreadCollapsibleState.Collapsed}return A.CommentThreadCollapsibleState.Collapsed}function d(l){if(l!==void 0)switch(l){case O.CommentThreadState.Unresolved:return A.CommentThreadState.Unresolved;case O.CommentThreadState.Resolved:return A.CommentThreadState.Resolved}return A.CommentThreadState.Unresolved}return new p}e.createExtHostComments=E}),define(De[198],Ce([1,0,23,5,26,14]),function(ne,e,i,D,S,N){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractExtHostConsoleForwarder=void 0;let y=class{constructor(O,b){this._mainThreadConsole=O.getProxy(D.MainContext.MainThreadConsole),this._includeStack=b.consoleForward.includeStack,this._logNative=b.consoleForward.logNative,this._wrapConsoleMethod("info","log"),this._wrapConsoleMethod("log","log"),this._wrapConsoleMethod("warn","warn"),this._wrapConsoleMethod("error","error")}_wrapConsoleMethod(O,b){const g=this,E=console[O];Object.defineProperty(console,O,{set:()=>{},get:()=>function(){g._handleConsoleCall(O,b,E,arguments)}})}_handleConsoleCall(O,b,g,E){this._mainThreadConsole.$logExtensionHostMessage({type:"__$console",severity:b,arguments:_(E,this._includeStack)}),this._logNative&&this._nativeConsoleLogMessage(O,g,E)}};y=He([We(0,N.IExtHostRpcService),We(1,S.IExtHostInitDataService)],y),e.AbstractExtHostConsoleForwarder=y;const A=1e5;function _(T,O){const b=[];if(T.length)for(let g=0;g"u")E="undefined";else if(E instanceof Error){const m=E;m.stack?E=m.stack:E=m.toString()}b.push(E)}if(O){const g=new Error().stack;g&&b.push({__$stack:g.split(` `).slice(3).join(` `)})}try{const g=(0,i.safeStringify)(b);return g.length>A?"Output omitted for a large object that exceeds the limits":g}catch(g){return`Output omitted for an object that cannot be inspected ('${g.toString()}')`}}}),define(De[98],Ce([1,0,2,5,6,3,14,11,18,10,19]),function(ne,e,i,D,S,N,y,A,_,T,O){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IExtHostDecorations=e.ExtHostDecorations=void 0;let b=class Ri{constructor(E,m){this._logService=m,this._provider=new Map,this._proxy=E.getProxy(D.MainContext.MainThreadDecorations)}registerFileDecorationProvider(E,m){const t=Ri._handlePool++;this._provider.set(t,{provider:E,extensionId:m}),this._proxy.$registerDecorationProvider(t,m.value);const o=E.onDidChangeFileDecorations&&E.onDidChangeFileDecorations(a=>{if(!a){this._proxy.$onDidChange(t,null);return}const p=(0,_.asArray)(a);if(p.length<=Ri._maxEventSize){this._proxy.$onDidChange(t,p);return}this._logService.warn("[Decorations] CAPPING events from decorations provider",m.value,p.length);const w=p.map(r=>({uri:r,rank:(0,T.count)(r.path,"/")})),u=(0,_.groupBy)(w,(r,c)=>r.rank-c.rank||(0,T.compare)(r.uri.path,c.uri.path)),I=[];e:for(const r of u){let c;for(const n of r){const d=(0,O.dirname)(n.uri.path);if(c!==d&&(c=d,I.push(n.uri)>=Ri._maxEventSize))break e}}this._proxy.$onDidChange(t,I)});return new S.Disposable(()=>{o?.dispose(),this._proxy.$unregisterDecorationProvider(t),this._provider.delete(t)})}async $provideDecorations(E,m,t){if(!this._provider.has(E))return Object.create(null);const o=Object.create(null),{provider:a,extensionId:p}=this._provider.get(E);return await Promise.all(m.map(async w=>{try{const{uri:u,id:I}=w,r=await Promise.resolve(a.provideFileDecoration(i.URI.revive(u),t));if(!r)return;try{S.FileDecoration.validate(r),o[I]=[r.propagate,r.tooltip,r.badge,r.color]}catch(c){this._logService.warn(`INVALID decoration from extension '${p.value}': ${c}`)}}catch(u){this._logService.error(u)}})),o}};b._handlePool=0,b._maxEventSize=250,b=He([We(0,y.IExtHostRpcService),We(1,A.ILogService)],b),e.ExtHostDecorations=b,e.IExtHostDecorations=(0,N.createDecorator)("IExtHostDecorations")});var Je=this&&this.__classPrivateFieldSet||function(ne,e,i,D,S){if(D==="m")throw new TypeError("Private method is not writable");if(D==="a"&&!S)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?ne!==e||!S:!e.has(ne))throw new TypeError("Cannot write private member to an object whose class did not declare it");return D==="a"?S.call(ne,i):S?S.value=i:e.set(ne,i),i},Re=this&&this.__classPrivateFieldGet||function(ne,e,i,D){if(i==="a"&&!D)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?ne!==e||!D:!e.has(ne))throw new TypeError("Cannot read private member from an object whose class did not declare it");return i==="m"?D:i==="a"?D.call(ne):D?D.value:e.get(ne)};define(De[199],Ce([1,0,131,86,2,5,6,8,4,11,28,36]),function(ne,e,i,D,S,N,y,A,_,T,O,b){"use strict";var g,E,m;Object.defineProperty(e,"__esModule",{value:!0}),e.ExtHostDiagnostics=e.DiagnosticCollection=void 0;class t{constructor(p,w,u,I,r,c,n){this._name=p,this._owner=w,this._maxDiagnosticsPerFile=u,this._modelVersionIdProvider=I,g.set(this,void 0),E.set(this,void 0),m.set(this,void 0),this._isDisposed=!1,Je(this,m,new O.ResourceMap(d=>r.getComparisonKey(d)),"f"),Je(this,g,c,"f"),Je(this,E,n,"f")}dispose(){this._isDisposed||(Re(this,E,"f").fire([...Re(this,m,"f").keys()]),Re(this,g,"f")?.$clear(this._owner),Re(this,m,"f").clear(),this._isDisposed=!0)}get name(){return this._checkDisposed(),this._name}set(p,w){if(!p){this.clear();return}this._checkDisposed();let u=[];if(S.URI.isUri(p)){if(!w){this.delete(p);return}Re(this,m,"f").set(p,w.slice()),u=[p]}else if(Array.isArray(p)){u=[];let r;p=[...p].sort(t._compareIndexedTuplesByUri);for(const c of p){const[n,d]=c;if((!r||n.toString()!==r.toString())&&(r&&Re(this,m,"f").get(r).length===0&&Re(this,m,"f").delete(r),r=n,u.push(n),Re(this,m,"f").set(n,[])),d)Re(this,m,"f").get(n)?.push(...d);else{const l=Re(this,m,"f").get(n);l&&(l.length=0)}}}if(Re(this,E,"f").fire(u),!Re(this,g,"f"))return;const I=[];for(const r of u){let c=[];const n=Re(this,m,"f").get(r);if(n)if(n.length>this._maxDiagnosticsPerFile){c=[];const d=[y.DiagnosticSeverity.Error,y.DiagnosticSeverity.Warning,y.DiagnosticSeverity.Information,y.DiagnosticSeverity.Hint];e:for(let l=0;l<4;l++)for(const f of n)if(f.severity===d[l]&&c.push({...A.Diagnostic.from(f),modelVersionId:this._modelVersionIdProvider(r)})===this._maxDiagnosticsPerFile)break e;c.push({severity:D.MarkerSeverity.Info,message:(0,i.localize)(0,null,n.length-this._maxDiagnosticsPerFile),startLineNumber:c[c.length-1].startLineNumber,startColumn:c[c.length-1].startColumn,endLineNumber:c[c.length-1].endLineNumber,endColumn:c[c.length-1].endColumn})}else c=n.map(d=>({...A.Diagnostic.from(d),modelVersionId:this._modelVersionIdProvider(r)}));I.push([r,c])}Re(this,g,"f").$changeMany(this._owner,I)}delete(p){this._checkDisposed(),Re(this,E,"f").fire([p]),Re(this,m,"f").delete(p),Re(this,g,"f")?.$changeMany(this._owner,[[p,void 0]])}clear(){this._checkDisposed(),Re(this,E,"f").fire([...Re(this,m,"f").keys()]),Re(this,m,"f").clear(),Re(this,g,"f")?.$clear(this._owner)}forEach(p,w){this._checkDisposed();for(const[u,I]of this)p.call(w,u,I,this)}*[(g=new WeakMap,E=new WeakMap,m=new WeakMap,Symbol.iterator)](){this._checkDisposed();for(const p of Re(this,m,"f").keys())yield[p,this.get(p)]}get(p){this._checkDisposed();const w=Re(this,m,"f").get(p);return Array.isArray(w)?Object.freeze(w.slice(0)):[]}has(p){return this._checkDisposed(),Array.isArray(Re(this,m,"f").get(p))}_checkDisposed(){if(this._isDisposed)throw new Error("illegal state - object is disposed")}static _compareIndexedTuplesByUri(p,w){return p[0].toString()w[0].toString()?1:0}}e.DiagnosticCollection=t;let o=class pi{static _mapper(p){const w=new O.ResourceMap;for(const u of p)w.set(u,u);return{uris:Object.freeze(Array.from(w.values()))}}constructor(p,w,u,I){this._logService=w,this._fileSystemInfoService=u,this._extHostDocumentsAndEditors=I,this._collections=new Map,this._onDidChangeDiagnostics=new _.DebounceEmitter({merge:r=>r.flat(),delay:50}),this.onDidChangeDiagnostics=_.Event.map(this._onDidChangeDiagnostics.event,pi._mapper),this._proxy=p.getProxy(N.MainContext.MainThreadDiagnostics)}createDiagnosticCollection(p,w){const{_collections:u,_proxy:I,_onDidChangeDiagnostics:r,_logService:c,_fileSystemInfoService:n,_extHostDocumentsAndEditors:d}=this,l=new class{$changeMany(h,v){I.$changeMany(h,v),c.trace("[DiagnosticCollection] change many (extension, owner, uris)",p.value,h,v.length===0?"CLEARING":v)}$clear(h){I.$clear(h),c.trace("[DiagnosticCollection] remove all (extension, owner)",p.value,h)}dispose(){I.dispose()}};let f;if(!w)w="_generated_diagnostic_collection_name_#"+pi._idPool++,f=w;else if(!u.has(w))f=w;else{this._logService.warn(`DiagnosticCollection with name '${w}' does already exist.`);do f=w+pi._idPool++;while(u.has(f))}return new class extends t{constructor(){super(w,f,pi._maxDiagnosticsPerFile,h=>d.getDocument(h)?.version,n.extUri,l,r),u.set(f,this)}dispose(){super.dispose(),u.delete(f)}}}getDiagnostics(p){if(p)return this._getDiagnostics(p);{const w=new Map,u=[];for(const I of this._collections.values())I.forEach((r,c)=>{let n=w.get(r.toString());typeof n>"u"&&(n=u.length,w.set(r.toString(),n),u.push([r,[]])),u[n][1]=u[n][1].concat(...c)});return u}}_getDiagnostics(p){let w=[];for(const u of this._collections.values())u.has(p)&&(w=w.concat(u.get(p)));return w}$acceptMarkersChange(p){if(!this._mirrorCollection){const w="_generated_mirror",u=new t(w,w,pi._maxDiagnosticsPerFile,I=>{},this._fileSystemInfoService.extUri,void 0,this._onDidChangeDiagnostics);this._collections.set(w,u),this._mirrorCollection=u}for(const[w,u]of p)this._mirrorCollection.set(S.URI.revive(w),u.map(A.Diagnostic.to))}};o._idPool=0,o._maxDiagnosticsPerFile=1e3,o=He([We(1,T.ILogService),We(2,b.IExtHostFileSystemInfo)],o),e.ExtHostDiagnostics=o}),define(De[200],Ce([1,0,2,5]),function(ne,e,i,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtHostDialogs=void 0;class S{constructor(y){this._proxy=y.getProxy(D.MainContext.MainThreadDialogs)}showOpenDialog(y){return this._proxy.$showOpenDialog(y).then(A=>A?A.map(_=>i.URI.revive(_)):void 0)}showSaveDialog(y){return this._proxy.$showSaveDialog(y).then(A=>A?i.URI.revive(A):void 0)}}e.ExtHostDialogs=S}),define(De[201],Ce([1,0,12,2,6,5,13,20,10]),function(ne,e,i,D,S,N,y,A,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtHostDocumentContentProvider=void 0;class T{constructor(b,g,E){this._documentsAndEditors=g,this._logService=E,this._documentContentProviders=new Map,this._proxy=b.getProxy(N.MainContext.MainThreadDocumentContentProviders)}registerTextDocumentContentProvider(b,g){if(Object.keys(y.Schemas).indexOf(b)>=0)throw new Error(`scheme '${b}' already registered`);const E=T._handlePool++;this._documentContentProviders.set(E,g),this._proxy.$registerTextContentProvider(E,b);let m;return typeof g.onDidChange=="function"&&(m=g.onDidChange(t=>{if(t.scheme!==b){this._logService.warn(`Provider for scheme '${b}' is firing event for schema '${t.scheme}' which will be IGNORED`);return}this._documentsAndEditors.getDocument(t)&&this.$provideTextDocumentContent(E,t).then(o=>{if(!o&&typeof o!="string")return;const a=this._documentsAndEditors.getDocument(t);if(!a)return;const p=(0,_.splitLines)(o);if(!a.equalLines(p))return this._proxy.$onVirtualDocumentChange(t,o)},i.onUnexpectedError)})),new S.Disposable(()=>{this._documentContentProviders.delete(E)&&this._proxy.$unregisterTextContentProvider(E),m&&(m.dispose(),m=void 0)})}$provideTextDocumentContent(b,g){const E=this._documentContentProviders.get(b);return E?Promise.resolve(E.provideTextDocumentContent(D.URI.revive(g),A.CancellationToken.None)):Promise.reject(new Error(`unsupported uri-scheme: ${g.scheme}`))}}e.ExtHostDocumentContentProvider=T,T._handlePool=0}),define(De[202],Ce([1,0,4,7,2,5,94,8,9,23,6]),function(ne,e,i,D,S,N,y,A,_,T,O){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtHostDocuments=void 0;class b{constructor(E,m){this._onDidAddDocument=new i.Emitter,this._onDidRemoveDocument=new i.Emitter,this._onDidChangeDocument=new i.Emitter,this._onDidSaveDocument=new i.Emitter,this.onDidAddDocument=this._onDidAddDocument.event,this.onDidRemoveDocument=this._onDidRemoveDocument.event,this.onDidChangeDocument=this._onDidChangeDocument.event,this.onDidSaveDocument=this._onDidSaveDocument.event,this._toDispose=new D.DisposableStore,this._documentLoader=new Map,this._proxy=E.getProxy(N.MainContext.MainThreadDocuments),this._documentsAndEditors=m,this._documentsAndEditors.onDidRemoveDocuments(t=>{for(const o of t)this._onDidRemoveDocument.fire(o.document)},void 0,this._toDispose),this._documentsAndEditors.onDidAddDocuments(t=>{for(const o of t)this._onDidAddDocument.fire(o.document)},void 0,this._toDispose)}dispose(){this._toDispose.dispose()}getAllDocumentData(){return[...this._documentsAndEditors.allDocuments()]}getDocumentData(E){if(!E)return;const m=this._documentsAndEditors.getDocument(E);if(m)return m}getDocument(E){const m=this.getDocumentData(E);if(!m?.document)throw new Error(`Unable to retrieve document from URI '${E}'`);return m.document}ensureDocumentData(E){const m=this._documentsAndEditors.getDocument(E);if(m)return Promise.resolve(m);let t=this._documentLoader.get(E.toString());return t||(t=this._proxy.$tryOpenDocument(E).then(o=>{this._documentLoader.delete(E.toString());const a=S.URI.revive(o);return(0,_.assertIsDefined)(this._documentsAndEditors.getDocument(a))},o=>(this._documentLoader.delete(E.toString()),Promise.reject(o))),this._documentLoader.set(E.toString(),t)),t}createDocumentData(E){return this._proxy.$tryCreateDocument(E).then(m=>S.URI.revive(m))}$acceptModelLanguageChanged(E,m){const t=S.URI.revive(E),o=this._documentsAndEditors.getDocument(t);if(!o)throw new Error("unknown document");this._onDidRemoveDocument.fire(o.document),o._acceptLanguageId(m),this._onDidAddDocument.fire(o.document)}$acceptModelSaved(E){const m=S.URI.revive(E),t=this._documentsAndEditors.getDocument(m);if(!t)throw new Error("unknown document");this.$acceptDirtyStateChanged(E,!1),this._onDidSaveDocument.fire(t.document)}$acceptDirtyStateChanged(E,m){const t=S.URI.revive(E),o=this._documentsAndEditors.getDocument(t);if(!o)throw new Error("unknown document");o._acceptIsDirty(m),this._onDidChangeDocument.fire({document:o.document,contentChanges:[],reason:void 0})}$acceptModelChanged(E,m,t){const o=S.URI.revive(E),a=this._documentsAndEditors.getDocument(o);if(!a)throw new Error("unknown document");a._acceptIsDirty(t),a.onEvents(m);let p;m.isUndoing?p=O.TextDocumentChangeReason.Undo:m.isRedoing&&(p=O.TextDocumentChangeReason.Redo),this._onDidChangeDocument.fire((0,T.deepFreeze)({document:a.document,contentChanges:m.changes.map(w=>({range:A.Range.to(w.range),rangeOffset:w.rangeOffset,rangeLength:w.rangeLength,text:w.text})),reason:p}))}setWordDefinitionFor(E,m){(0,y.setWordDefinitionFor)(E,m)}}e.ExtHostDocuments=b}),define(De[53],Ce([1,0,47,4,7,2,3,5,94,14,97,8,11,28,13,172,203]),function(ne,e,i,D,S,N,y,A,_,T,O,b,g,E,m,t,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IExtHostDocumentsAndEditors=e.ExtHostDocumentsAndEditors=void 0;class a{constructor(u){this.value=u,this._count=0}ref(){this._count++}unref(){return--this._count===0}}let p=class{constructor(u,I){this._extHostRpc=u,this._logService=I,this._activeEditorId=null,this._editors=new Map,this._documents=new E.ResourceMap,this._onDidAddDocuments=new D.Emitter,this._onDidRemoveDocuments=new D.Emitter,this._onDidChangeVisibleTextEditors=new D.Emitter,this._onDidChangeActiveTextEditor=new D.Emitter,this.onDidAddDocuments=this._onDidAddDocuments.event,this.onDidRemoveDocuments=this._onDidRemoveDocuments.event,this.onDidChangeVisibleTextEditors=this._onDidChangeVisibleTextEditors.event,this.onDidChangeActiveTextEditor=this._onDidChangeActiveTextEditor.event}$acceptDocumentsAndEditorsDelta(u){this.acceptDocumentsAndEditorsDelta(u)}acceptDocumentsAndEditorsDelta(u){const I=[],r=[],c=[];if(u.removedDocuments)for(const n of u.removedDocuments){const d=N.URI.revive(n),l=this._documents.get(d);l?.unref()&&(this._documents.delete(d),I.push(l.value))}if(u.addedDocuments)for(const n of u.addedDocuments){const d=N.URI.revive(n.uri);let l=this._documents.get(d);if(l&&d.scheme!==m.Schemas.vscodeNotebookCell&&d.scheme!==m.Schemas.vscodeInteractiveInput)throw new Error(`document '${d} already exists!'`);l||(l=new a(new _.ExtHostDocumentData(this._extHostRpc.getProxy(A.MainContext.MainThreadDocuments),d,n.lines,n.EOL,n.versionId,n.languageId,n.isDirty,n.notebook)),this._documents.set(d,l),r.push(l.value)),l.ref()}if(u.removedEditors)for(const n of u.removedEditors){const d=this._editors.get(n);this._editors.delete(n),d&&c.push(d)}if(u.addedEditors)for(const n of u.addedEditors){const d=N.URI.revive(n.documentUri);i.ok(this._documents.has(d),`document '${d}' does not exist`),i.ok(!this._editors.has(n.id),`editor '${n.id}' already exists!`);const l=this._documents.get(d).value,f=new O.ExtHostTextEditor(n.id,this._extHostRpc.getProxy(A.MainContext.MainThreadTextEditors),this._logService,new o.Lazy(()=>l.document),n.selections.map(b.Selection.to),n.options,n.visibleRanges.map(s=>b.Range.to(s)),typeof n.editorPosition=="number"?b.ViewColumn.to(n.editorPosition):void 0);this._editors.set(n.id,f)}u.newActiveEditor!==void 0&&(i.ok(u.newActiveEditor===null||this._editors.has(u.newActiveEditor),`active editor '${u.newActiveEditor}' does not exist`),this._activeEditorId=u.newActiveEditor),(0,S.dispose)(I),(0,S.dispose)(c),u.removedDocuments&&this._onDidRemoveDocuments.fire(I),u.addedDocuments&&this._onDidAddDocuments.fire(r),(u.removedEditors||u.addedEditors)&&this._onDidChangeVisibleTextEditors.fire(this.allEditors().map(n=>n.value)),u.newActiveEditor!==void 0&&this._onDidChangeActiveTextEditor.fire(this.activeEditor())}getDocument(u){return this._documents.get(u)?.value}allDocuments(){return t.Iterable.map(this._documents.values(),u=>u.value)}getEditor(u){return this._editors.get(u)}activeEditor(u){if(!this._activeEditorId)return;const I=this._editors.get(this._activeEditorId);return u?I:I?.value}allEditors(){return[...this._editors.values()]}};p=He([We(0,T.IExtHostRpcService),We(1,g.ILogService)],p),e.ExtHostDocumentsAndEditors=p,e.IExtHostDocumentsAndEditors=(0,y.createDecorator)("IExtHostDocumentsAndEditors")}),define(De[54],Ce([1,0,8,5,2,4,3,6,14,9,77]),function(ne,e,i,D,S,N,y,A,_,T,O){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtHostEditorTabs=e.IExtHostEditorTabs=void 0,e.IExtHostEditorTabs=(0,y.createDecorator)("IExtHostEditorTabs");class b{constructor(o,a,p){this._activeTabIdGetter=p,this._parentGroup=a,this.acceptDtoUpdate(o)}get apiObject(){if(!this._apiObject){const o=this,a={get isActive(){return o._dto.id===o._activeTabIdGetter()},get label(){return o._dto.label},get input(){return o._input},get isDirty(){return o._dto.isDirty},get isPinned(){return o._dto.isPinned},get isPreview(){return o._dto.isPreview},get group(){return o._parentGroup.apiObject}};this._apiObject=Object.freeze(a)}return this._apiObject}get tabId(){return this._dto.id}acceptDtoUpdate(o){this._dto=o,this._input=this._initInput()}_initInput(){switch(this._dto.input.kind){case 1:return new A.TextTabInput(S.URI.revive(this._dto.input.uri));case 2:return new A.TextDiffTabInput(S.URI.revive(this._dto.input.original),S.URI.revive(this._dto.input.modified));case 3:return new A.TextMergeTabInput(S.URI.revive(this._dto.input.base),S.URI.revive(this._dto.input.input1),S.URI.revive(this._dto.input.input2),S.URI.revive(this._dto.input.result));case 6:return new A.CustomEditorTabInput(S.URI.revive(this._dto.input.uri),this._dto.input.viewType);case 7:return new A.WebviewEditorTabInput(this._dto.input.viewType);case 4:return new A.NotebookEditorTabInput(S.URI.revive(this._dto.input.uri),this._dto.input.notebookType);case 5:return new A.NotebookDiffEditorTabInput(S.URI.revive(this._dto.input.original),S.URI.revive(this._dto.input.modified),this._dto.input.notebookType);case 8:return new A.TerminalEditorTabInput;case 9:return new A.InteractiveWindowInput(S.URI.revive(this._dto.input.uri),S.URI.revive(this._dto.input.inputBoxUri));default:return}}}class g{constructor(o,a){this._tabs=[],this._activeTabId="",this._dto=o,this._activeGroupIdGetter=a;for(const p of o.tabs)p.isActive&&(this._activeTabId=p.id),this._tabs.push(new b(p,this,()=>this.activeTabId()))}get apiObject(){if(!this._apiObject){const o=this,a={get isActive(){return o._dto.groupId===o._activeGroupIdGetter()},get viewColumn(){return i.ViewColumn.to(o._dto.viewColumn)},get activeTab(){return o._tabs.find(p=>p.tabId===o._activeTabId)?.apiObject},get tabs(){return Object.freeze(o._tabs.map(p=>p.apiObject))}};this._apiObject=Object.freeze(a)}return this._apiObject}get groupId(){return this._dto.groupId}get tabs(){return this._tabs}acceptGroupDtoUpdate(o){this._dto=o}acceptTabOperation(o){if(o.kind===0){const p=new b(o.tabDto,this,()=>this.activeTabId());return this._tabs.splice(o.index,0,p),o.tabDto.isActive&&(this._activeTabId=p.tabId),p}else if(o.kind===1){const p=this._tabs.splice(o.index,1)[0];if(!p)throw new Error(`Tab close updated received for index ${o.index} which does not exist`);return p.tabId===this._activeTabId&&(this._activeTabId=""),p}else if(o.kind===3){if(o.oldIndex===void 0)throw new Error("Invalid old index on move IPC");const p=this._tabs.splice(o.oldIndex,1)[0];if(!p)throw new Error(`Tab move updated received for index ${o.oldIndex} which does not exist`);return this._tabs.splice(o.index,0,p),p}const a=this._tabs.find(p=>p.tabId===o.tabDto.id);if(!a)throw new Error("INVALID tab");return o.tabDto.isActive?this._activeTabId=o.tabDto.id:this._activeTabId===o.tabDto.id&&!o.tabDto.isActive&&(this._activeTabId=""),a.acceptDtoUpdate(o.tabDto),a}activeTabId(){return this._activeTabId}}let E=class{constructor(o){this._onDidChangeTabs=new N.Emitter,this._onDidChangeTabGroups=new N.Emitter,this._extHostTabGroups=[],this._proxy=o.getProxy(D.MainContext.MainThreadEditorTabs)}get tabGroups(){if(!this._apiObject){const o=this,a={onDidChangeTabGroups:o._onDidChangeTabGroups.event,onDidChangeTabs:o._onDidChangeTabs.event,get all(){return Object.freeze(o._extHostTabGroups.map(p=>p.apiObject))},get activeTabGroup(){const p=o._activeGroupId;return(0,T.assertIsDefined)(o._extHostTabGroups.find(u=>u.groupId===p)?.apiObject)},close:async(p,w)=>{const u=Array.isArray(p)?p:[p];return u.length?m(u[0])?this._closeGroups(u,w):this._closeTabs(u,w):!0}};this._apiObject=Object.freeze(a)}return this._apiObject}$acceptEditorTabModel(o){const a=new Set(this._extHostTabGroups.map(n=>n.groupId)),p=new Set(o.map(n=>n.groupId)),w=(0,O.diffSets)(a,p),u=this._extHostTabGroups.filter(n=>w.removed.includes(n.groupId)).map(n=>n.apiObject),I=[],r=[];this._extHostTabGroups=o.map(n=>{const d=new g(n,()=>this._activeGroupId);return w.added.includes(d.groupId)?I.push(d.apiObject):r.push(d.apiObject),d});const c=(0,T.assertIsDefined)(o.find(n=>n.isActive===!0)?.groupId);c!==void 0&&this._activeGroupId!==c&&(this._activeGroupId=c),this._onDidChangeTabGroups.fire(Object.freeze({opened:I,closed:u,changed:r}))}$acceptTabGroupUpdate(o){const a=this._extHostTabGroups.find(p=>p.groupId===o.groupId);if(!a)throw new Error("Update Group IPC call received before group creation.");a.acceptGroupDtoUpdate(o),o.isActive&&(this._activeGroupId=o.groupId),this._onDidChangeTabGroups.fire(Object.freeze({changed:[a.apiObject],opened:[],closed:[]}))}$acceptTabOperation(o){const a=this._extHostTabGroups.find(w=>w.groupId===o.groupId);if(!a)throw new Error("Update Tabs IPC call received before group creation.");const p=a.acceptTabOperation(o);switch(o.kind){case 0:this._onDidChangeTabs.fire(Object.freeze({opened:[p.apiObject],closed:[],changed:[]}));return;case 1:this._onDidChangeTabs.fire(Object.freeze({opened:[],closed:[p.apiObject],changed:[]}));return;case 3:case 2:this._onDidChangeTabs.fire(Object.freeze({opened:[],closed:[],changed:[p.apiObject]}));return}}_findExtHostTabFromApi(o){for(const a of this._extHostTabGroups)for(const p of a.tabs)if(p.apiObject===o)return p}_findExtHostTabGroupFromApi(o){return this._extHostTabGroups.find(a=>a.apiObject===o)}async _closeTabs(o,a){const p=[];for(const w of o){const u=this._findExtHostTabFromApi(w);if(!u)throw new Error("Tab close: Invalid tab not found!");p.push(u.tabId)}return this._proxy.$closeTab(p,a)}async _closeGroups(o,a){const p=[];for(const w of o){const u=this._findExtHostTabGroupFromApi(w);if(!u)throw new Error("Group close: Invalid group not found!");p.push(u.groupId)}return this._proxy.$closeGroup(p,a)}};E=He([We(0,_.IExtHostRpcService)],E),e.ExtHostEditorTabs=E;function m(t){return t.tabs!==void 0}}),define(De[204],Ce([1,0,2,5,7,6,8,249,10,24,27]),function(ne,e,i,D,S,N,y,A,_,T,O){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtHostFileSystem=void 0;class b{constructor(){this._schemes=[]}add(m){this._stateMachine=void 0,this._schemes.push(m)}delete(m){const t=this._schemes.indexOf(m);t>=0&&(this._schemes.splice(t,1),this._stateMachine=void 0)}_initStateMachine(){if(!this._stateMachine){const m=this._schemes.sort(),t=[];let o,a,p=14,w=14;for(const u of m){let I=o?(0,_.commonPrefixLength)(o,u):0;for(I===0?a=1:a=w;I{console.error(`FAILED to register filesystem provider of ${m.identifier.value}-extension for the scheme ${t}`),console.error(I)});const u=o.onDidChangeFile(I=>{const r=[];for(const c of I){const{uri:n,type:d}=c;if(n.scheme!==t)continue;let l;switch(d){case N.FileChangeType.Changed:l=0;break;case N.FileChangeType.Created:l=1;break;case N.FileChangeType.Deleted:l=2;break;default:throw new Error("Unknown FileChangeType")}r.push({resource:n,type:l})}this._proxy.$onFileSystemChange(p,r)});return(0,S.toDisposable)(()=>{u.dispose(),this._linkProvider.delete(t),this._registeredSchemes.delete(t),this._fsProvider.delete(p),this._proxy.$unregisterProvider(p)})}static _asIStat(m){const{type:t,ctime:o,mtime:a,size:p,permissions:w}=m;return{type:t,ctime:o,mtime:a,size:p,permissions:w}}$stat(m,t){return Promise.resolve(this._getFsProvider(m).stat(i.URI.revive(t))).then(o=>g._asIStat(o))}$readdir(m,t){return Promise.resolve(this._getFsProvider(m).readDirectory(i.URI.revive(t)))}$readFile(m,t){return Promise.resolve(this._getFsProvider(m).readFile(i.URI.revive(t))).then(o=>T.VSBuffer.wrap(o))}$writeFile(m,t,o,a){return Promise.resolve(this._getFsProvider(m).writeFile(i.URI.revive(t),o.buffer,a))}$delete(m,t,o){return Promise.resolve(this._getFsProvider(m).delete(i.URI.revive(t),o))}$rename(m,t,o,a){return Promise.resolve(this._getFsProvider(m).rename(i.URI.revive(t),i.URI.revive(o),a))}$copy(m,t,o,a){const p=this._getFsProvider(m);if(!p.copy)throw new Error('FileSystemProvider does not implement "copy"');return Promise.resolve(p.copy(i.URI.revive(t),i.URI.revive(o),a))}$mkdir(m,t){return Promise.resolve(this._getFsProvider(m).createDirectory(i.URI.revive(t)))}$watch(m,t,o,a){const p=this._getFsProvider(m).watch(i.URI.revive(o),a);this._watches.set(t,p)}$unwatch(m,t){const o=this._watches.get(t);o&&(o.dispose(),this._watches.delete(t))}$open(m,t,o){const a=this._getFsProvider(m);if(!a.open)throw new Error('FileSystemProvider does not implement "open"');return Promise.resolve(a.open(i.URI.revive(t),o))}$close(m,t){const o=this._getFsProvider(m);if(!o.close)throw new Error('FileSystemProvider does not implement "close"');return Promise.resolve(o.close(t))}$read(m,t,o,a){const p=this._getFsProvider(m);if(!p.read)throw new Error('FileSystemProvider does not implement "read"');const w=T.VSBuffer.alloc(a);return Promise.resolve(p.read(t,o,w.buffer,0,a)).then(u=>w.slice(0,u))}$write(m,t,o,a){const p=this._getFsProvider(m);if(!p.write)throw new Error('FileSystemProvider does not implement "write"');return Promise.resolve(p.write(t,o,a.buffer,0,a.byteLength))}_getFsProvider(m){const t=this._fsProvider.get(m);if(!t){const o=new Error;throw o.name="ENOPRO",o.message="no provider",o}return t}}e.ExtHostFileSystem=g}),define(De[55],Ce([1,0,5,35,6,24,3,14,36,7]),function(ne,e,i,D,S,N,y,A,_,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IExtHostConsumerFileSystem=e.ExtHostConsumerFileSystem=void 0;let O=class Qt{constructor(g,E){this._fileSystemProvider=new Map,this._proxy=g.getProxy(i.MainContext.MainThreadFileSystem);const m=this;this.value=Object.freeze({async stat(t){try{const o=m._fileSystemProvider.get(t.scheme);if(!o)return await m._proxy.$stat(t);await m._proxy.$ensureActivation(t.scheme);const a=await o.stat(t);return{type:a.type,ctime:a.ctime,mtime:a.mtime,size:a.size,permissions:a.permissions}}catch(o){Qt._handleError(o)}},async readDirectory(t){try{const o=m._fileSystemProvider.get(t.scheme);return o?(await m._proxy.$ensureActivation(t.scheme),(await o.readDirectory(t)).slice()):await m._proxy.$readdir(t)}catch(o){return Qt._handleError(o)}},async createDirectory(t){try{return await m._proxy.$mkdir(t)}catch(o){return Qt._handleError(o)}},async readFile(t){try{const o=m._fileSystemProvider.get(t.scheme);return o?(await m._proxy.$ensureActivation(t.scheme),(await o.readFile(t)).slice()):(await m._proxy.$readFile(t)).buffer}catch(o){return Qt._handleError(o)}},async writeFile(t,o){try{return await m._proxy.$writeFile(t,N.VSBuffer.wrap(o))}catch(a){return Qt._handleError(a)}},async delete(t,o){try{const a=m._fileSystemProvider.get(t.scheme);return a?(await m._proxy.$ensureActivation(t.scheme),await a.delete(t,{recursive:!1,...o})):await m._proxy.$delete(t,{recursive:!1,useTrash:!1,...o})}catch(a){return Qt._handleError(a)}},async rename(t,o,a){try{return await m._proxy.$rename(t,o,{overwrite:!1,...a})}catch(p){return Qt._handleError(p)}},async copy(t,o,a){try{return await m._proxy.$copy(t,o,{overwrite:!1,...a})}catch(p){return Qt._handleError(p)}},isWritableFileSystem(t){const o=E.getCapabilities(t);if(typeof o=="number")return!(o&2048)}})}static _handleError(g){if(g instanceof S.FileSystemError)throw g;if(!(g instanceof Error))throw new S.FileSystemError(String(g));if(g.name==="ENOPRO")throw S.FileSystemError.Unavailable(g.message);switch(g.name){case D.FileSystemProviderErrorCode.FileExists:throw S.FileSystemError.FileExists(g.message);case D.FileSystemProviderErrorCode.FileNotFound:throw S.FileSystemError.FileNotFound(g.message);case D.FileSystemProviderErrorCode.FileNotADirectory:throw S.FileSystemError.FileNotADirectory(g.message);case D.FileSystemProviderErrorCode.FileIsADirectory:throw S.FileSystemError.FileIsADirectory(g.message);case D.FileSystemProviderErrorCode.NoPermissions:throw S.FileSystemError.NoPermissions(g.message);case D.FileSystemProviderErrorCode.Unavailable:throw S.FileSystemError.Unavailable(g.message);default:throw new S.FileSystemError(g.message,g.name)}}addFileSystemProvider(g,E){return this._fileSystemProvider.set(g,E),(0,T.toDisposable)(()=>this._fileSystemProvider.delete(g))}};O=He([We(0,A.IExtHostRpcService),We(1,_.IExtHostFileSystemInfo)],O),e.ExtHostConsumerFileSystem=O,e.IExtHostConsumerFileSystem=(0,y.createDecorator)("IExtHostConsumerFileSystem")}),define(De[205],Ce([1,0,4,34,2,5,8,6]),function(ne,e,i,D,S,N,y,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtHostFileSystemEventService=void 0;class _{get ignoreCreateEvents(){return Boolean(this._config&1)}get ignoreChangeEvents(){return Boolean(this._config&2)}get ignoreDeleteEvents(){return Boolean(this._config&4)}constructor(b,g,E,m,t,o,a,p){this._onDidCreate=new i.Emitter,this._onDidChange=new i.Emitter,this._onDidDelete=new i.Emitter;const w=this.ensureWatching(b,E,t);this._config=0,o&&(this._config+=1),a&&(this._config+=2),p&&(this._config+=4);const u=(0,D.parse)(t),I=typeof t=="string",r=m(c=>{if(!o)for(const n of c.created){const d=S.URI.revive(n);u(d.fsPath)&&(!I||g.getWorkspaceFolder(d))&&this._onDidCreate.fire(d)}if(!a)for(const n of c.changed){const d=S.URI.revive(n);u(d.fsPath)&&(!I||g.getWorkspaceFolder(d))&&this._onDidChange.fire(d)}if(!p)for(const n of c.deleted){const d=S.URI.revive(n);u(d.fsPath)&&(!I||g.getWorkspaceFolder(d))&&this._onDidDelete.fire(d)}});this._disposable=A.Disposable.from(w,this._onDidCreate,this._onDidChange,this._onDidDelete,r)}ensureWatching(b,g,E){const m=A.Disposable.from();if(typeof E=="string")return m;const t=b.getProxy(N.MainContext.MainThreadFileSystem);let o=!1;(E.pattern.includes(D.GLOBSTAR)||E.pattern.includes(D.GLOB_SPLIT))&&(o=!0);const a=Math.random();return t.$watch(g.identifier.value,a,E.baseUri,{recursive:o,excludes:[]}),A.Disposable.from({dispose:()=>t.$unwatch(a)})}dispose(){this._disposable.dispose()}get onDidCreate(){return this._onDidCreate.event}get onDidChange(){return this._onDidChange.event}get onDidDelete(){return this._onDidDelete.event}}class T{constructor(b,g,E){this._mainContext=b,this._logService=g,this._extHostDocumentsAndEditors=E,this._onFileSystemEvent=new i.Emitter,this._onDidRenameFile=new i.Emitter,this._onDidCreateFile=new i.Emitter,this._onDidDeleteFile=new i.Emitter,this._onWillRenameFile=new i.AsyncEmitter,this._onWillCreateFile=new i.AsyncEmitter,this._onWillDeleteFile=new i.AsyncEmitter,this.onDidRenameFile=this._onDidRenameFile.event,this.onDidCreateFile=this._onDidCreateFile.event,this.onDidDeleteFile=this._onDidDeleteFile.event}createFileSystemWatcher(b,g,E,m,t,o){return new _(this._mainContext,b,g,this._onFileSystemEvent.event,y.GlobPattern.from(E),m,t,o)}$onFileEvent(b){this._onFileSystemEvent.fire(b)}$onDidRunFileOperation(b,g){switch(b){case 2:this._onDidRenameFile.fire(Object.freeze({files:g.map(E=>({oldUri:S.URI.revive(E.source),newUri:S.URI.revive(E.target)}))}));break;case 1:this._onDidDeleteFile.fire(Object.freeze({files:g.map(E=>S.URI.revive(E.target))}));break;case 0:case 3:this._onDidCreateFile.fire(Object.freeze({files:g.map(E=>S.URI.revive(E.target))}));break;default:}}getOnWillRenameFileEvent(b){return this._createWillExecuteEvent(b,this._onWillRenameFile)}getOnWillCreateFileEvent(b){return this._createWillExecuteEvent(b,this._onWillCreateFile)}getOnWillDeleteFileEvent(b){return this._createWillExecuteEvent(b,this._onWillDeleteFile)}_createWillExecuteEvent(b,g){return(E,m,t)=>{const o=function(p){E.call(m,p)};return o.extension=b,g.event(o,void 0,t)}}async $onWillRunFileOperation(b,g,E,m){switch(b){case 2:return await this._fireWillEvent(this._onWillRenameFile,{files:g.map(t=>({oldUri:S.URI.revive(t.source),newUri:S.URI.revive(t.target)}))},E,m);case 1:return await this._fireWillEvent(this._onWillDeleteFile,{files:g.map(t=>S.URI.revive(t.target))},E,m);case 0:case 3:return await this._fireWillEvent(this._onWillCreateFile,{files:g.map(t=>S.URI.revive(t.target))},E,m)}}async _fireWillEvent(b,g,E,m){const t=new Set,o=[];if(await b.fireAsync(g,m,async(p,w)=>{const u=Date.now(),I=await Promise.resolve(p);I instanceof A.WorkspaceEdit&&(o.push([w.extension,I]),t.add(w.extension.displayName??w.extension.identifier.value)),Date.now()-u>E&&this._logService.warn("SLOW file-participant",w.extension.identifier)}),m.isCancellationRequested||o.length===0)return;const a={edits:[]};for(const[,p]of o){const{edits:w}=y.WorkspaceEdit.from(p,{getTextDocumentVersion:u=>this._extHostDocumentsAndEditors.getDocument(u)?.version,getNotebookDocumentVersion:()=>{}});a.edits=a.edits.concat(w)}return{edit:a,extensionNames:Array.from(t)}}}e.ExtHostFileSystemEventService=T}),define(De[206],Ce([1,0,2,37]),function(ne,e,i,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtHostInteractive=void 0;class S{constructor(y,A,_,T,O){this._extHostNotebooks=A,this._textDocumentsAndEditors=_,this._commands=T;const b=new D.ApiCommand("interactive.open","_interactive.open","Open interactive window and return notebook editor and input URI",[new D.ApiCommandArgument("showOptions","Show Options",g=>!0,g=>g),new D.ApiCommandArgument("resource","Interactive resource Uri",g=>!0,g=>g),new D.ApiCommandArgument("controllerId","Notebook controller Id",g=>!0,g=>g),new D.ApiCommandArgument("title","Interactive editor title",g=>!0,g=>g)],new D.ApiCommandResult("Notebook and input URI",g=>{if(O.debug("[ExtHostInteractive] open iw with notebook editor id",g.notebookEditorId),g.notebookEditorId!==void 0){const E=this._extHostNotebooks.getEditorById(g.notebookEditorId);return O.debug("[ExtHostInteractive] notebook editor found",E.id),{notebookUri:i.URI.revive(g.notebookUri),inputUri:i.URI.revive(g.inputUri),notebookEditor:E.apiEditor}}return O.debug("[ExtHostInteractive] notebook editor not found, uris for the interactive document",g.notebookUri,g.inputUri),{notebookUri:i.URI.revive(g.notebookUri),inputUri:i.URI.revive(g.inputUri)}}));this._commands.registerApiCommand(b)}$willAddInteractiveDocument(y,A,_,T){this._textDocumentsAndEditors.acceptDocumentsAndEditorsDelta({addedDocuments:[{EOL:A,lines:[""],languageId:_,uri:y,isDirty:!1,versionId:1,notebook:this._extHostNotebooks.getNotebookDocument(i.URI.revive(T))?.apiNotebook}]})}$willRemoveInteractiveDocument(y,A){this._textDocumentsAndEditors.acceptDocumentsAndEditorsDelta({removedDocuments:[y]})}}e.ExtHostInteractive=S}),define(De[207],Ce([1,0,7,5]),function(ne,e,i,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtHostLabelService=void 0;class S{constructor(y){this._handlePool=0,this._proxy=y.getProxy(D.MainContext.MainThreadLabelService)}$registerResourceLabelFormatter(y){const A=this._handlePool++;return this._proxy.$registerResourceLabelFormatter(A,y),(0,i.toDisposable)(()=>{this._proxy.$unregisterResourceLabelFormatter(A)})}}e.ExtHostLabelService=S}),define(De[208],Ce([1,0,2,23,8,6,70,5,10,52,18,9,250,20,7,83,78,63,209,12,15,27]),function(ne,e,i,D,S,N,y,A,_,T,O,b,g,E,m,t,o,a,p,w,u,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtHostLanguageFeatures=e.DocumentRangeSemanticTokensAdapter=e.DocumentSemanticTokensAdapter=void 0;class r{constructor(C,z){this._documents=C,this._provider=z}async provideDocumentSymbols(C,z){const V=this._documents.getDocument(C),q=await this._provider.provideDocumentSymbols(V,z);if(!(0,O.isFalsyOrEmpty)(q))return q[0]instanceof N.DocumentSymbol?q.map(S.DocumentSymbol.from):r._asDocumentSymbolTree(q)}static _asDocumentSymbolTree(C){C=C.slice(0).sort((q,oe)=>{let ce=q.location.range.start.compareTo(oe.location.range.start);return ce===0&&(ce=oe.location.range.end.compareTo(q.location.range.end)),ce});const z=[],V=[];for(const q of C){const oe={name:q.name||"!!MISSING: name!!",kind:S.SymbolKind.from(q.kind),tags:q.tags?.map(S.SymbolTag.from)||[],detail:"",containerName:q.containerName,range:S.Range.from(q.location.range),selectionRange:S.Range.from(q.location.range),children:[]};for(;;){if(V.length===0){V.push(oe),z.push(oe);break}const ce=V[V.length-1];if(T.Range.containsRange(ce.range,oe.range)&&!T.Range.equalsRange(ce.range,oe.range)){ce.children?.push(oe),V.push(oe);break}V.pop()}}return z}}class c{constructor(C,z,V){this._documents=C,this._commands=z,this._provider=V,this._cache=new a.Cache("CodeLens"),this._disposables=new Map}async provideCodeLenses(C,z){const V=this._documents.getDocument(C),q=await this._provider.provideCodeLenses(V,z);if(!q||z.isCancellationRequested)return;const oe=this._cache.add(q),ce=new m.DisposableStore;this._disposables.set(oe,ce);const J={cacheId:oe,lenses:[]};for(let pe=0;peS.InlineValue.from(J))}}class F{constructor(C,z){this._documents=C,this._provider=z}async provideDocumentHighlights(C,z,V){const q=this._documents.getDocument(C),oe=S.Position.to(z),ce=await this._provider.provideDocumentHighlights(q,oe,V);if(Array.isArray(ce))return ce.map(S.DocumentHighlight.from)}}class j{constructor(C,z){this._documents=C,this._provider=z}async provideLinkedEditingRanges(C,z,V){const q=this._documents.getDocument(C),oe=S.Position.to(z),ce=await this._provider.provideLinkedEditingRanges(q,oe,V);if(ce&&Array.isArray(ce.ranges))return{ranges:(0,O.coalesce)(ce.ranges.map(S.Range.from)),wordPattern:ce.wordPattern}}}class W{constructor(C,z){this._documents=C,this._provider=z}async provideReferences(C,z,V,q){const oe=this._documents.getDocument(C),ce=S.Position.to(z),J=await this._provider.provideReferences(oe,ce,V,q);if(Array.isArray(J))return J.map(S.location.from)}}class H{constructor(C,z,V,q,oe,ce,J){this._documents=C,this._commands=z,this._diagnostics=V,this._provider=q,this._logService=oe,this._extension=ce,this._apiDeprecation=J,this._cache=new a.Cache("CodeAction"),this._disposables=new Map}async provideCodeActions(C,z,V,q){const oe=this._documents.getDocument(C),ce=g.Selection.isISelection(z)?S.Selection.to(z):S.Range.to(z),J=[];for(const Ge of this._diagnostics.getDiagnostics(C))if(ce.intersection(Ge.range)&&J.push(Ge)>H._maxCodeActionsPerFile)break;const pe={diagnostics:J,only:V.only?new N.CodeActionKind(V.only):void 0,triggerKind:S.CodeActionTriggerKind.to(V.trigger)},Ee=await this._provider.provideCodeActions(oe,ce,pe,q);if(!(0,O.isNonEmptyArray)(Ee)||q.isCancellationRequested)return;const Ne=this._cache.add(Ee),xe=new m.DisposableStore;this._disposables.set(Ne,xe);const Ze=[];for(let Ge=0;GeS.Range.to(pe)),J=S.DataTransfer.toDataTransfer(V,()=>{throw new w.NotImplementedError});return await this._provider.prepareDocumentPaste(oe,ce,J,q),S.DataTransfer.toDataTransferDTO(J)}async providePasteEdits(C,z,V,q,oe){const ce=this._documents.getDocument(z),J=V.map(Ne=>S.Range.to(Ne)),pe=S.DataTransfer.toDataTransfer(q,async Ne=>(await this._proxy.$resolvePasteFileData(this._handle,C,Ne)).buffer),Ee=await this._provider.provideDocumentPasteEdits(ce,J,pe,oe);if(!!Ee)return{insertText:typeof Ee.insertText=="string"?Ee.insertText:{snippet:Ee.insertText.value},additionalEdit:Ee.additionalEdit?S.WorkspaceEdit.from(Ee.additionalEdit,void 0):void 0}}}class M{constructor(C,z){this._documents=C,this._provider=z}async provideDocumentFormattingEdits(C,z,V){const q=this._documents.getDocument(C),oe=await this._provider.provideDocumentFormattingEdits(q,z,V);if(Array.isArray(oe))return oe.map(S.TextEdit.from)}}class R{constructor(C,z){this._documents=C,this._provider=z}async provideDocumentRangeFormattingEdits(C,z,V,q){const oe=this._documents.getDocument(C),ce=S.Range.to(z),J=await this._provider.provideDocumentRangeFormattingEdits(oe,ce,V,q);if(Array.isArray(J))return J.map(S.TextEdit.from)}}class B{constructor(C,z){this._documents=C,this._provider=z,this.autoFormatTriggerCharacters=[]}async provideOnTypeFormattingEdits(C,z,V,q,oe){const ce=this._documents.getDocument(C),J=S.Position.to(z),pe=await this._provider.provideOnTypeFormattingEdits(ce,J,V,q,oe);if(Array.isArray(pe))return pe.map(S.TextEdit.from)}}class ${constructor(C,z){this._provider=C,this._logService=z,this._cache=new a.Cache("WorkspaceSymbols")}async provideWorkspaceSymbols(C,z){const V=await this._provider.provideWorkspaceSymbols(C,z);if(!(0,O.isNonEmptyArray)(V))return{symbols:[]};const q=this._cache.add(V),oe={cacheId:q,symbols:[]};for(let ce=0;ceoe.line||J.end.linenew N.SemanticTokensEdit(z.start,z.deleteCount,z.data?new Uint32Array(z.data):z.data)),C.resultId):C}static _isSemanticTokens(C){return C&&!!C.data}static _isCorrectSemanticTokens(C){return C.data instanceof Uint32Array}static _isSemanticTokensEdits(C){return C&&Array.isArray(C.edits)}static _isCorrectSemanticTokensEdits(C){for(const z of C.edits)if(!(z.data instanceof Uint32Array))return!1;return!0}static _convertToEdits(C,z){if(!te._isSemanticTokens(z)||!C||!C.tokens)return z;const V=C.tokens,q=V.length,oe=z.data,ce=oe.length;let J=0;const pe=Math.min(q,ce);for(;J({start:q.start,deleteCount:q.deleteCount,data:q.data}))})}return null}}e.DocumentSemanticTokensAdapter=te;class de{constructor(C,z){this._documents=C,this._provider=z}async provideDocumentRangeSemanticTokens(C,z,V){const q=this._documents.getDocument(C),oe=await this._provider.provideDocumentRangeSemanticTokens(q,S.Range.to(z),V);return oe?this._send(oe):null}_send(C){return(0,t.encodeSemanticTokensDto)({id:0,type:"full",data:C.data})}}e.DocumentRangeSemanticTokensAdapter=de;class re{static supportsResolving(C){return typeof C.resolveCompletionItem=="function"}constructor(C,z,V,q,oe){this._documents=C,this._commands=z,this._provider=V,this._apiDeprecation=q,this._extension=oe,this._cache=new a.Cache("CompletionItem"),this._disposables=new Map}async provideCompletionItems(C,z,V,q){const oe=this._documents.getDocument(C),ce=S.Position.to(z),J=oe.getWordRangeAtPosition(ce)||new N.Range(ce,ce),pe=J.with({end:ce}),Ee=new p.StopWatch(!0),Ne=await this._provider.provideCompletionItems(oe,ce,q,S.CompletionContext.to(V));if(!Ne||q.isCancellationRequested)return;const xe=Array.isArray(Ne)?new N.CompletionList(Ne):Ne,Ze=re.supportsResolving(this._provider)?this._cache.add(xe.items):this._cache.add([]),Ge=new m.DisposableStore;this._disposables.set(Ze,Ge);const Qe=[],Fe={x:Ze,b:Qe,a:{replace:S.Range.from(J),insert:S.Range.from(pe)},c:xe.isIncomplete||void 0,d:Ee.elapsed()};for(let dt=0;dt"u"?void 0:S.MarkdownString.fromStrict(C.documentation),e:C.sortText!==C.label?C.sortText:void 0,f:C.filterText!==C.label?C.filterText:void 0,g:C.preselect||void 0,i:C.keepWhitespace?1:0,k:C.commitCharacters?.join(""),l:C.additionalTextEdits&&C.additionalTextEdits.map(S.TextEdit.from),n:ce?.$ident,o:ce?.id,p:ce?.$ident?void 0:ce?.arguments};C.textEdit?(this._apiDeprecation.report("CompletionItem.textEdit",this._extension,"Use 'CompletionItem.insertText' and 'CompletionItem.range' instead."),J.h=C.textEdit.newText):typeof C.insertText=="string"?J.h=C.insertText:C.insertText instanceof N.SnippetString&&(J.h=C.insertText.value,J.i|=4);let pe;return C.textEdit?pe=C.textEdit.range:C.range&&(pe=C.range),N.Range.isRange(pe)?J.j=S.Range.from(pe):pe&&(!V?.isEqual(pe.inserting)||!q?.isEqual(pe.replacing))&&(J.j={insert:S.Range.from(pe.inserting),replace:S.Range.from(pe.replacing)}),J}}class be{async provideInlineCompletions(C,z,V,q){}disposeCompletions(C){}handleDidShowCompletionItem(C,z){}}class le extends be{constructor(C,z,V,q){super(),this._extension=C,this._documents=z,this._provider=V,this._commands=q,this._references=new Y,this._isAdditionsProposedApiEnabled=(0,I.isProposedApiEnabled)(this._extension,"inlineCompletionsAdditions"),this.languageTriggerKindToVSCodeTriggerKind={[y.InlineCompletionTriggerKind.Automatic]:N.InlineCompletionTriggerKind.Automatic,[y.InlineCompletionTriggerKind.Explicit]:N.InlineCompletionTriggerKind.Invoke}}get supportsHandleDidShowCompletionItem(){return(0,I.isProposedApiEnabled)(this._extension,"inlineCompletionsAdditions")&&typeof this._provider.handleDidShowCompletionItem=="function"}async provideInlineCompletions(C,z,V,q){const oe=this._documents.getDocument(C),ce=S.Position.to(z),J=await this._provider.provideInlineCompletionItems(oe,ce,{selectedCompletionInfo:V.selectedSuggestionInfo?{range:S.Range.to(V.selectedSuggestionInfo.range),text:V.selectedSuggestionInfo.text}:void 0,triggerKind:this.languageTriggerKindToVSCodeTriggerKind[V.triggerKind]},q);if(!J||q.isCancellationRequested)return;const pe=Array.isArray(J)?J:J.items,Ee=this._isAdditionsProposedApiEnabled?Array.isArray(J)?[]:J.commands||[]:[];let Ne;return{pid:this._references.createReferenceId({dispose(){Ne?.dispose()},items:pe}),items:pe.map((Ze,Ge)=>{let Qe;Ze.command&&(Ne||(Ne=new m.DisposableStore),Qe=this._commands.toInternal(Ze.command,Ne));const Fe=Ze.insertText;return{insertText:typeof Fe=="string"?Fe:{snippet:Fe.value},filterText:Ze.filterText,range:Ze.range?S.Range.from(Ze.range):void 0,command:Qe,idx:Ge,completeBracketPairs:this._isAdditionsProposedApiEnabled?Ze.completeBracketPairs:!1}}),commands:Ee.map(Ze=>(Ne||(Ne=new m.DisposableStore),this._commands.toInternal(Ze,Ne)))}}disposeCompletions(C){this._references.disposeReferenceId(C)?.dispose()}handleDidShowCompletionItem(C,z){const V=this._references.get(C)?.items[z];V&&this._provider.handleDidShowCompletionItem&&this._isAdditionsProposedApiEnabled&&this._provider.handleDidShowCompletionItem(V)}}class fe extends be{constructor(C,z,V,q){super(),this.extension=C,this._documents=z,this._provider=V,this._commands=q,this._references=new Y,this.isAdditionProposedApiEnabled=(0,I.isProposedApiEnabled)(this.extension,"inlineCompletionsAdditions"),this.languageTriggerKindToVSCodeTriggerKind={[y.InlineCompletionTriggerKind.Automatic]:N.InlineCompletionTriggerKindNew.Automatic,[y.InlineCompletionTriggerKind.Explicit]:N.InlineCompletionTriggerKindNew.Invoke}}async provideInlineCompletions(C,z,V,q){const oe=this._documents.getDocument(C),ce=S.Position.to(z),J=await this._provider.provideInlineCompletionItems(oe,ce,{selectedCompletionInfo:V.selectedSuggestionInfo?{range:S.Range.to(V.selectedSuggestionInfo.range),text:V.selectedSuggestionInfo.text}:void 0,triggerKind:this.languageTriggerKindToVSCodeTriggerKind[V.triggerKind]},q);if(!J||q.isCancellationRequested)return;const pe=Array.isArray(J)?J:J.items,Ee=Array.isArray(J)?[]:J.commands||[];let Ne;return{pid:this._references.createReferenceId({dispose(){Ne?.dispose()},items:pe}),items:pe.map((Ze,Ge)=>{let Qe;Ze.command&&(Ne||(Ne=new m.DisposableStore),Qe=this._commands.toInternal(Ze.command,Ne));const Fe=Ze.insertText;return{insertText:typeof Fe=="string"?Fe:{snippet:Fe.value},filterText:Ze.filterText,range:Ze.range?S.Range.from(Ze.range):void 0,command:Qe,idx:Ge,completeBracketPairs:this.isAdditionProposedApiEnabled?Ze.completeBracketPairs:!1}}),commands:Ee.map(Ze=>(Ne||(Ne=new m.DisposableStore),this._commands.toInternal(Ze,Ne)))}}disposeCompletions(C){this._references.disposeReferenceId(C)?.dispose()}handleDidShowCompletionItem(C,z){const V=this._references.get(C)?.items[z];V&&this._provider.handleDidShowCompletionItem&&this.isAdditionProposedApiEnabled&&this._provider.handleDidShowCompletionItem(V)}}class Y{constructor(){this._references=new Map,this._idPool=1}createReferenceId(C){const z=this._idPool++;return this._references.set(z,C),z}disposeReferenceId(C){const z=this._references.get(C);return this._references.delete(C),z}get(C){return this._references.get(C)}}class ge{constructor(C,z){this._documents=C,this._provider=z,this._cache=new a.Cache("SignatureHelp")}async provideSignatureHelp(C,z,V,q){const oe=this._documents.getDocument(C),ce=S.Position.to(z),J=this.reviveContext(V),pe=await this._provider.provideSignatureHelp(oe,ce,q,J);if(pe){const Ee=this._cache.add([pe]);return{...S.SignatureHelp.from(pe),id:Ee}}}reviveContext(C){let z;if(C.activeSignatureHelp){const V=S.SignatureHelp.to(C.activeSignatureHelp),q=this._cache.get(C.activeSignatureHelp.id,0);q?(z=q,z.activeSignature=V.activeSignature,z.activeParameter=V.activeParameter):z=V}return{...C,activeSignatureHelp:z}}releaseSignatureHelp(C){this._cache.delete(C)}}class Se{constructor(C,z,V,q,oe){this._documents=C,this._commands=z,this._provider=V,this._logService=q,this._extension=oe,this._cache=new a.Cache("InlayHints"),this._disposables=new Map}async provideInlayHints(C,z,V){const q=this._documents.getDocument(C),oe=S.Range.to(z),ce=await this._provider.provideInlayHints(q,oe,V);if(!Array.isArray(ce)||ce.length===0){this._logService.trace(`[InlayHints] NO inlay hints from '${this._extension.identifier.value}' for ${z}`);return}if(V.isCancellationRequested)return;const J=this._cache.add(ce);this._disposables.set(J,new m.DisposableStore);const pe={hints:[],cacheId:J};for(let Ee=0;EeV.value.length===0)?(console.log("INVALID inlay hint, empty label",C),!1):!(z&&!z.contains(C.position))}_convertInlayHint(C,z){const V=this._disposables.get(z[0]);if(!V)throw Error("DisposableStore is missing...");const q={label:"",cacheId:z,tooltip:S.MarkdownString.fromStrict(C.tooltip),position:S.Position.from(C.position),textEdits:C.textEdits&&C.textEdits.map(S.TextEdit.from),kind:C.kind&&S.InlayHintKind.from(C.kind),paddingLeft:C.paddingLeft,paddingRight:C.paddingRight};return typeof C.label=="string"?q.label=C.label:q.label=C.label.map(oe=>{const ce={label:oe.value};return ce.tooltip=S.MarkdownString.fromStrict(oe.tooltip),N.Location.isLocation(oe.location)&&(ce.location=S.location.from(oe.location)),oe.command&&(ce.command=this._commands.toInternal(oe.command,V)),ce}),q}}class Oe{constructor(C,z){this._documents=C,this._provider=z,this._cache=new a.Cache("DocumentLink")}async provideLinks(C,z){const V=this._documents.getDocument(C),q=await this._provider.provideDocumentLinks(V,z);if(!(!Array.isArray(q)||q.length===0)&&!z.isCancellationRequested){if(typeof this._provider.resolveDocumentLink!="function")return{links:q.filter(Oe._validateLink).map(S.DocumentLink.from)};{const oe=this._cache.add(q),ce={links:[],cacheId:oe};for(let J=0;J5e4?(console.warn("DROPPING link because it is too long"),!1):!0}async resolveLink(C,z){if(typeof this._provider.resolveDocumentLink!="function")return;const V=this._cache.get(...C);if(!V)return;const q=await this._provider.resolveDocumentLink(V,z);if(!(!q||!Oe._validateLink(q)))return S.DocumentLink.from(q)}releaseLinks(C){this._cache.delete(C)}}class Be{constructor(C,z){this._documents=C,this._provider=z}async provideColors(C,z){const V=this._documents.getDocument(C),q=await this._provider.provideDocumentColors(V,z);return Array.isArray(q)?q.map(ce=>({color:S.Color.from(ce.color),range:S.Range.from(ce.range)})):[]}async provideColorPresentations(C,z,V){const q=this._documents.getDocument(C),oe=S.Range.to(z.range),ce=S.Color.to(z.color),J=await this._provider.provideColorPresentations(ce,{document:q,range:oe},V);if(!!Array.isArray(J))return J.map(S.ColorPresentation.from)}}class Xe{constructor(C,z){this._documents=C,this._provider=z}async provideFoldingRanges(C,z,V){const q=this._documents.getDocument(C),oe=await this._provider.provideFoldingRanges(q,z,V);if(!!Array.isArray(oe))return oe.map(S.FoldingRange.from)}}class ke{constructor(C,z,V){this._documents=C,this._provider=z,this._logService=V}async provideSelectionRanges(C,z,V){const q=this._documents.getDocument(C),oe=z.map(S.Position.to),ce=await this._provider.provideSelectionRanges(q,oe,V);if(!(0,O.isNonEmptyArray)(ce))return[];if(ce.length!==oe.length)return this._logService.warn("BAD selection ranges, provider must return ranges for each position"),[];const J=[];for(let pe=0;pethis._cacheAndConvertItem(J,pe)):[this._cacheAndConvertItem(J,ce)]}async provideCallsTo(C,z,V){const q=this._itemFromCache(C,z);if(!q)throw new Error("missing call hierarchy item");const oe=await this._provider.provideCallHierarchyIncomingCalls(q,V);if(!!oe)return oe.map(ce=>({from:this._cacheAndConvertItem(C,ce.from),fromRanges:ce.fromRanges.map(J=>S.Range.from(J))}))}async provideCallsFrom(C,z,V){const q=this._itemFromCache(C,z);if(!q)throw new Error("missing call hierarchy item");const oe=await this._provider.provideCallHierarchyOutgoingCalls(q,V);if(!!oe)return oe.map(ce=>({to:this._cacheAndConvertItem(C,ce.to),fromRanges:ce.fromRanges.map(J=>S.Range.from(J))}))}releaseSession(C){this._cache.delete(C)}_cacheAndConvertItem(C,z){const V=this._cache.get(C),q=S.CallHierarchyItem.from(z,C,V.size.toString(36));return V.set(q._itemId,z),q}_itemFromCache(C,z){return this._cache.get(C)?.get(z)}}class Ie{constructor(C,z){this._documents=C,this._provider=z,this._idPool=new o.IdGenerator(""),this._cache=new Map}async prepareSession(C,z,V){const q=this._documents.getDocument(C),oe=S.Position.to(z),ce=await this._provider.prepareTypeHierarchy(q,oe,V);if(!ce)return;const J=this._idPool.nextId();return this._cache.set(J,new Map),Array.isArray(ce)?ce.map(pe=>this._cacheAndConvertItem(J,pe)):[this._cacheAndConvertItem(J,ce)]}async provideSupertypes(C,z,V){const q=this._itemFromCache(C,z);if(!q)throw new Error("missing type hierarchy item");const oe=await this._provider.provideTypeHierarchySupertypes(q,V);if(!!oe)return oe.map(ce=>this._cacheAndConvertItem(C,ce))}async provideSubtypes(C,z,V){const q=this._itemFromCache(C,z);if(!q)throw new Error("missing type hierarchy item");const oe=await this._provider.provideTypeHierarchySubtypes(q,V);if(!!oe)return oe.map(ce=>this._cacheAndConvertItem(C,ce))}releaseSession(C){this._cache.delete(C)}_cacheAndConvertItem(C,z){const V=this._cache.get(C),q=S.TypeHierarchyItem.from(z,C,V.size.toString(36));return V.set(q._itemId,z),q}_itemFromCache(C,z){return this._cache.get(C)?.get(z)}}class ae{constructor(C,z,V,q){this._proxy=C,this._documents=z,this._provider=V,this._handle=q}async provideDocumentOnDropEdits(C,z,V,q,oe){const ce=this._documents.getDocument(z),J=S.Position.to(V),pe=S.DataTransfer.toDataTransfer(q,async Ne=>(await this._proxy.$resolveDocumentOnDropFileData(this._handle,C,Ne)).buffer),Ee=await this._provider.provideDocumentDropEdits(ce,J,pe,oe);if(!!Ee)return{insertText:typeof Ee.insertText=="string"?Ee.insertText:{snippet:Ee.insertText.value},additionalEdit:Ee.additionalEdit?S.WorkspaceEdit.from(Ee.additionalEdit,void 0):void 0}}}class ue{constructor(C,z){this.adapter=C,this.extension=z}}class ee{constructor(C,z,V,q,oe,ce,J,pe){this._uriTransformer=z,this._documents=V,this._commands=q,this._diagnostics=oe,this._logService=ce,this._apiDeprecation=J,this._extensionTelemetry=pe,this._adapter=new Map,this._proxy=C.getProxy(A.MainContext.MainThreadLanguageFeatures)}_transformDocumentSelector(C){return S.DocumentSelector.from(C,this._uriTransformer)}_createDisposable(C){return new N.Disposable(()=>{this._adapter.delete(C),this._proxy.$unregister(C)})}_nextHandle(){return ee._handlePool++}async _withAdapter(C,z,V,q,oe,ce=!1){const J=this._adapter.get(C);if(!J||!(J.adapter instanceof z))return q;const pe=Date.now();ce||this._logService.trace(`[${J.extension.identifier.value}] INVOKE provider '${V.toString().replace(/[\r\n]/g,"")}'`);const Ee=V(J.adapter,J.extension);return Promise.resolve(Ee).catch(Ne=>{(0,w.isCancellationError)(Ne)||(this._logService.error(`[${J.extension.identifier.value}] provider FAILED`),this._logService.error(Ne),this._extensionTelemetry.onExtensionError(J.extension.identifier,Ne))}).finally(()=>{ce||this._logService.trace(`[${J.extension.identifier.value}] provider DONE after ${Date.now()-pe}ms`)}),E.CancellationToken.isCancellationToken(oe)?(0,u.raceCancellationError)(Ee,oe):Ee}_addNewAdapter(C,z){const V=this._nextHandle();return this._adapter.set(V,new ue(C,z)),V}static _extLabel(C){return C.displayName||C.name}registerDocumentSymbolProvider(C,z,V,q){const oe=this._addNewAdapter(new r(this._documents,V),C),ce=q&&q.label||ee._extLabel(C);return this._proxy.$registerDocumentSymbolProvider(oe,this._transformDocumentSelector(z),ce),this._createDisposable(oe)}$provideDocumentSymbols(C,z,V){return this._withAdapter(C,r,q=>q.provideDocumentSymbols(i.URI.revive(z),V),void 0,V)}registerCodeLensProvider(C,z,V){const q=this._nextHandle(),oe=typeof V.onDidChangeCodeLenses=="function"?this._nextHandle():void 0;this._adapter.set(q,new ue(new c(this._documents,this._commands.converter,V),C)),this._proxy.$registerCodeLensSupport(q,this._transformDocumentSelector(z),oe);let ce=this._createDisposable(q);if(oe!==void 0){const J=V.onDidChangeCodeLenses(pe=>this._proxy.$emitCodeLensEvent(oe));ce=N.Disposable.from(ce,J)}return ce}$provideCodeLenses(C,z,V){return this._withAdapter(C,c,q=>q.provideCodeLenses(i.URI.revive(z),V),void 0,V)}$resolveCodeLens(C,z,V){return this._withAdapter(C,c,q=>q.resolveCodeLens(z,V),void 0,void 0)}$releaseCodeLenses(C,z){this._withAdapter(C,c,V=>Promise.resolve(V.releaseCodeLenses(z)),void 0,void 0)}registerDefinitionProvider(C,z,V){const q=this._addNewAdapter(new d(this._documents,V),C);return this._proxy.$registerDefinitionSupport(q,this._transformDocumentSelector(z)),this._createDisposable(q)}$provideDefinition(C,z,V,q){return this._withAdapter(C,d,oe=>oe.provideDefinition(i.URI.revive(z),V,q),[],q)}registerDeclarationProvider(C,z,V){const q=this._addNewAdapter(new l(this._documents,V),C);return this._proxy.$registerDeclarationSupport(q,this._transformDocumentSelector(z)),this._createDisposable(q)}$provideDeclaration(C,z,V,q){return this._withAdapter(C,l,oe=>oe.provideDeclaration(i.URI.revive(z),V,q),[],q)}registerImplementationProvider(C,z,V){const q=this._addNewAdapter(new f(this._documents,V),C);return this._proxy.$registerImplementationSupport(q,this._transformDocumentSelector(z)),this._createDisposable(q)}$provideImplementation(C,z,V,q){return this._withAdapter(C,f,oe=>oe.provideImplementation(i.URI.revive(z),V,q),[],q)}registerTypeDefinitionProvider(C,z,V){const q=this._addNewAdapter(new s(this._documents,V),C);return this._proxy.$registerTypeDefinitionSupport(q,this._transformDocumentSelector(z)),this._createDisposable(q)}$provideTypeDefinition(C,z,V,q){return this._withAdapter(C,s,oe=>oe.provideTypeDefinition(i.URI.revive(z),V,q),[],q)}registerHoverProvider(C,z,V,q){const oe=this._addNewAdapter(new h(this._documents,V),C);return this._proxy.$registerHoverProvider(oe,this._transformDocumentSelector(z)),this._createDisposable(oe)}$provideHover(C,z,V,q){return this._withAdapter(C,h,oe=>oe.provideHover(i.URI.revive(z),V,q),void 0,q)}registerEvaluatableExpressionProvider(C,z,V,q){const oe=this._addNewAdapter(new v(this._documents,V),C);return this._proxy.$registerEvaluatableExpressionProvider(oe,this._transformDocumentSelector(z)),this._createDisposable(oe)}$provideEvaluatableExpression(C,z,V,q){return this._withAdapter(C,v,oe=>oe.provideEvaluatableExpression(i.URI.revive(z),V,q),void 0,q)}registerInlineValuesProvider(C,z,V,q){const oe=typeof V.onDidChangeInlineValues=="function"?this._nextHandle():void 0,ce=this._addNewAdapter(new k(this._documents,V),C);this._proxy.$registerInlineValuesProvider(ce,this._transformDocumentSelector(z),oe);let J=this._createDisposable(ce);if(oe!==void 0){const pe=V.onDidChangeInlineValues(Ee=>this._proxy.$emitInlineValuesEvent(oe));J=N.Disposable.from(J,pe)}return J}$provideInlineValues(C,z,V,q,oe){return this._withAdapter(C,k,ce=>ce.provideInlineValues(i.URI.revive(z),V,q,oe),void 0,oe)}registerDocumentHighlightProvider(C,z,V){const q=this._addNewAdapter(new F(this._documents,V),C);return this._proxy.$registerDocumentHighlightProvider(q,this._transformDocumentSelector(z)),this._createDisposable(q)}$provideDocumentHighlights(C,z,V,q){return this._withAdapter(C,F,oe=>oe.provideDocumentHighlights(i.URI.revive(z),V,q),void 0,q)}registerLinkedEditingRangeProvider(C,z,V){const q=this._addNewAdapter(new j(this._documents,V),C);return this._proxy.$registerLinkedEditingRangeProvider(q,this._transformDocumentSelector(z)),this._createDisposable(q)}$provideLinkedEditingRanges(C,z,V,q){return this._withAdapter(C,j,async oe=>{const ce=await oe.provideLinkedEditingRanges(i.URI.revive(z),V,q);if(ce)return{ranges:ce.ranges,wordPattern:ce.wordPattern?ee._serializeRegExp(ce.wordPattern):void 0}},void 0,q)}registerReferenceProvider(C,z,V){const q=this._addNewAdapter(new W(this._documents,V),C);return this._proxy.$registerReferenceSupport(q,this._transformDocumentSelector(z)),this._createDisposable(q)}$provideReferences(C,z,V,q,oe){return this._withAdapter(C,W,ce=>ce.provideReferences(i.URI.revive(z),V,q,oe),void 0,oe)}registerCodeActionProvider(C,z,V,q){const oe=new m.DisposableStore,ce=this._addNewAdapter(new H(this._documents,this._commands.converter,this._diagnostics,V,this._logService,C,this._apiDeprecation),C);return this._proxy.$registerQuickFixSupport(ce,this._transformDocumentSelector(z),{providedKinds:q?.providedCodeActionKinds?.map(J=>J.value),documentation:q?.documentation?.map(J=>({kind:J.kind.value,command:this._commands.converter.toInternal(J.command,oe)}))},ee._extLabel(C),Boolean(V.resolveCodeAction)),oe.add(this._createDisposable(ce)),oe}$provideCodeActions(C,z,V,q,oe){return this._withAdapter(C,H,ce=>ce.provideCodeActions(i.URI.revive(z),V,q,oe),void 0,oe)}$resolveCodeAction(C,z,V){return this._withAdapter(C,H,q=>q.resolveCodeAction(z,V),void 0,void 0)}$releaseCodeActions(C,z){this._withAdapter(C,H,V=>Promise.resolve(V.releaseCodeActions(z)),void 0,void 0)}registerDocumentFormattingEditProvider(C,z,V){const q=this._addNewAdapter(new M(this._documents,V),C);return this._proxy.$registerDocumentFormattingSupport(q,this._transformDocumentSelector(z),C.identifier,C.displayName||C.name),this._createDisposable(q)}$provideDocumentFormattingEdits(C,z,V,q){return this._withAdapter(C,M,oe=>oe.provideDocumentFormattingEdits(i.URI.revive(z),V,q),void 0,q)}registerDocumentRangeFormattingEditProvider(C,z,V){const q=this._addNewAdapter(new R(this._documents,V),C);return this._proxy.$registerRangeFormattingSupport(q,this._transformDocumentSelector(z),C.identifier,C.displayName||C.name),this._createDisposable(q)}$provideDocumentRangeFormattingEdits(C,z,V,q,oe){return this._withAdapter(C,R,ce=>ce.provideDocumentRangeFormattingEdits(i.URI.revive(z),V,q,oe),void 0,oe)}registerOnTypeFormattingEditProvider(C,z,V,q){const oe=this._addNewAdapter(new B(this._documents,V),C);return this._proxy.$registerOnTypeFormattingSupport(oe,this._transformDocumentSelector(z),q,C.identifier),this._createDisposable(oe)}$provideOnTypeFormattingEdits(C,z,V,q,oe,ce){return this._withAdapter(C,B,J=>J.provideOnTypeFormattingEdits(i.URI.revive(z),V,q,oe,ce),void 0,ce)}registerWorkspaceSymbolProvider(C,z){const V=this._addNewAdapter(new $(z,this._logService),C);return this._proxy.$registerNavigateTypeSupport(V,typeof z.resolveWorkspaceSymbol=="function"),this._createDisposable(V)}$provideWorkspaceSymbols(C,z,V){return this._withAdapter(C,$,q=>q.provideWorkspaceSymbols(z,V),{symbols:[]},V)}$resolveWorkspaceSymbol(C,z,V){return this._withAdapter(C,$,q=>q.resolveWorkspaceSymbol(z,V),void 0,void 0)}$releaseWorkspaceSymbols(C,z){this._withAdapter(C,$,V=>V.releaseWorkspaceSymbols(z),void 0,void 0)}registerRenameProvider(C,z,V){const q=this._addNewAdapter(new U(this._documents,V,this._logService),C);return this._proxy.$registerRenameSupport(q,this._transformDocumentSelector(z),U.supportsResolving(V)),this._createDisposable(q)}$provideRenameEdits(C,z,V,q,oe){return this._withAdapter(C,U,ce=>ce.provideRenameEdits(i.URI.revive(z),V,q,oe),void 0,oe)}$resolveRenameLocation(C,z,V,q){return this._withAdapter(C,U,oe=>oe.resolveRenameLocation(i.URI.revive(z),V,q),void 0,q)}registerDocumentSemanticTokensProvider(C,z,V,q){const oe=this._addNewAdapter(new te(this._documents,V),C),ce=typeof V.onDidChangeSemanticTokens=="function"?this._nextHandle():void 0;this._proxy.$registerDocumentSemanticTokensProvider(oe,this._transformDocumentSelector(z),q,ce);let J=this._createDisposable(oe);if(ce){const pe=V.onDidChangeSemanticTokens(Ee=>this._proxy.$emitDocumentSemanticTokensEvent(ce));J=N.Disposable.from(J,pe)}return J}$provideDocumentSemanticTokens(C,z,V,q){return this._withAdapter(C,te,oe=>oe.provideDocumentSemanticTokens(i.URI.revive(z),V,q),null,q)}$releaseDocumentSemanticTokens(C,z){this._withAdapter(C,te,V=>V.releaseDocumentSemanticColoring(z),void 0,void 0)}registerDocumentRangeSemanticTokensProvider(C,z,V,q){const oe=this._addNewAdapter(new de(this._documents,V),C);return this._proxy.$registerDocumentRangeSemanticTokensProvider(oe,this._transformDocumentSelector(z),q),this._createDisposable(oe)}$provideDocumentRangeSemanticTokens(C,z,V,q){return this._withAdapter(C,de,oe=>oe.provideDocumentRangeSemanticTokens(i.URI.revive(z),V,q),null,q)}registerCompletionItemProvider(C,z,V,q){const oe=this._addNewAdapter(new re(this._documents,this._commands.converter,V,this._apiDeprecation,C),C);return this._proxy.$registerCompletionsProvider(oe,this._transformDocumentSelector(z),q,re.supportsResolving(V),`${C.identifier.value}(${q.join("")})`),this._createDisposable(oe)}$provideCompletionItems(C,z,V,q,oe){return this._withAdapter(C,re,ce=>ce.provideCompletionItems(i.URI.revive(z),V,q,oe),void 0,oe)}$resolveCompletionItem(C,z,V){return this._withAdapter(C,re,q=>q.resolveCompletionItem(z,V),void 0,V)}$releaseCompletionItems(C,z){this._withAdapter(C,re,V=>V.releaseCompletionItems(z),void 0,void 0)}registerInlineCompletionsProvider(C,z,V){const q=new le(C,this._documents,V,this._commands.converter),oe=this._addNewAdapter(q,C);return this._proxy.$registerInlineCompletionsSupport(oe,this._transformDocumentSelector(z),q.supportsHandleDidShowCompletionItem),this._createDisposable(oe)}registerInlineCompletionsProviderNew(C,z,V){const q=this._addNewAdapter(new fe(C,this._documents,V,this._commands.converter),C);return this._proxy.$registerInlineCompletionsSupport(q,this._transformDocumentSelector(z),!0),this._createDisposable(q)}$provideInlineCompletions(C,z,V,q,oe){return this._withAdapter(C,be,ce=>ce.provideInlineCompletions(i.URI.revive(z),V,q,oe),void 0,oe)}$handleInlineCompletionDidShow(C,z,V){this._withAdapter(C,be,async q=>{q.handleDidShowCompletionItem(z,V)},void 0,void 0)}$freeInlineCompletionsList(C,z){this._withAdapter(C,be,async V=>{V.disposeCompletions(z)},void 0,void 0)}registerSignatureHelpProvider(C,z,V,q){const oe=Array.isArray(q)?{triggerCharacters:q,retriggerCharacters:[]}:q,ce=this._addNewAdapter(new ge(this._documents,V),C);return this._proxy.$registerSignatureHelpProvider(ce,this._transformDocumentSelector(z),oe),this._createDisposable(ce)}$provideSignatureHelp(C,z,V,q,oe){return this._withAdapter(C,ge,ce=>ce.provideSignatureHelp(i.URI.revive(z),V,q,oe),void 0,oe)}$releaseSignatureHelp(C,z){this._withAdapter(C,ge,V=>V.releaseSignatureHelp(z),void 0,void 0)}registerInlayHintsProvider(C,z,V){const q=typeof V.onDidChangeInlayHints=="function"?this._nextHandle():void 0,oe=this._addNewAdapter(new Se(this._documents,this._commands.converter,V,this._logService,C),C);this._proxy.$registerInlayHintsProvider(oe,this._transformDocumentSelector(z),typeof V.resolveInlayHint=="function",q,ee._extLabel(C));let ce=this._createDisposable(oe);if(q!==void 0){const J=V.onDidChangeInlayHints(pe=>this._proxy.$emitInlayHintsEvent(q));ce=N.Disposable.from(ce,J)}return ce}$provideInlayHints(C,z,V,q){return this._withAdapter(C,Se,oe=>oe.provideInlayHints(i.URI.revive(z),V,q),void 0,q)}$resolveInlayHint(C,z,V){return this._withAdapter(C,Se,q=>q.resolveInlayHint(z,V),void 0,V)}$releaseInlayHints(C,z){this._withAdapter(C,Se,V=>V.releaseHints(z),void 0,void 0)}registerDocumentLinkProvider(C,z,V){const q=this._addNewAdapter(new Oe(this._documents,V),C);return this._proxy.$registerDocumentLinkProvider(q,this._transformDocumentSelector(z),typeof V.resolveDocumentLink=="function"),this._createDisposable(q)}$provideDocumentLinks(C,z,V){return this._withAdapter(C,Oe,q=>q.provideLinks(i.URI.revive(z),V),void 0,V,z.scheme==="output")}$resolveDocumentLink(C,z,V){return this._withAdapter(C,Oe,q=>q.resolveLink(z,V),void 0,void 0,!0)}$releaseDocumentLinks(C,z){this._withAdapter(C,Oe,V=>V.releaseLinks(z),void 0,void 0,!0)}registerColorProvider(C,z,V){const q=this._addNewAdapter(new Be(this._documents,V),C);return this._proxy.$registerDocumentColorProvider(q,this._transformDocumentSelector(z)),this._createDisposable(q)}$provideDocumentColors(C,z,V){return this._withAdapter(C,Be,q=>q.provideColors(i.URI.revive(z),V),[],V)}$provideColorPresentations(C,z,V,q){return this._withAdapter(C,Be,oe=>oe.provideColorPresentations(i.URI.revive(z),V,q),void 0,q)}registerFoldingRangeProvider(C,z,V){const q=this._nextHandle(),oe=typeof V.onDidChangeFoldingRanges=="function"?this._nextHandle():void 0;this._adapter.set(q,new ue(new Xe(this._documents,V),C)),this._proxy.$registerFoldingRangeProvider(q,this._transformDocumentSelector(z),C.identifier,oe);let ce=this._createDisposable(q);if(oe!==void 0){const J=V.onDidChangeFoldingRanges(()=>this._proxy.$emitFoldingRangeEvent(oe));ce=N.Disposable.from(ce,J)}return ce}$provideFoldingRanges(C,z,V,q){return this._withAdapter(C,Xe,oe=>oe.provideFoldingRanges(i.URI.revive(z),V,q),void 0,q)}registerSelectionRangeProvider(C,z,V){const q=this._addNewAdapter(new ke(this._documents,V,this._logService),C);return this._proxy.$registerSelectionRangeProvider(q,this._transformDocumentSelector(z)),this._createDisposable(q)}$provideSelectionRanges(C,z,V,q){return this._withAdapter(C,ke,oe=>oe.provideSelectionRanges(i.URI.revive(z),V,q),[],q)}registerCallHierarchyProvider(C,z,V){const q=this._addNewAdapter(new ye(this._documents,V),C);return this._proxy.$registerCallHierarchyProvider(q,this._transformDocumentSelector(z)),this._createDisposable(q)}$prepareCallHierarchy(C,z,V,q){return this._withAdapter(C,ye,oe=>Promise.resolve(oe.prepareSession(i.URI.revive(z),V,q)),void 0,q)}$provideCallHierarchyIncomingCalls(C,z,V,q){return this._withAdapter(C,ye,oe=>oe.provideCallsTo(z,V,q),void 0,q)}$provideCallHierarchyOutgoingCalls(C,z,V,q){return this._withAdapter(C,ye,oe=>oe.provideCallsFrom(z,V,q),void 0,q)}$releaseCallHierarchy(C,z){this._withAdapter(C,ye,V=>Promise.resolve(V.releaseSession(z)),void 0,void 0)}registerTypeHierarchyProvider(C,z,V){const q=this._addNewAdapter(new Ie(this._documents,V),C);return this._proxy.$registerTypeHierarchyProvider(q,this._transformDocumentSelector(z)),this._createDisposable(q)}$prepareTypeHierarchy(C,z,V,q){return this._withAdapter(C,Ie,oe=>Promise.resolve(oe.prepareSession(i.URI.revive(z),V,q)),void 0,q)}$provideTypeHierarchySupertypes(C,z,V,q){return this._withAdapter(C,Ie,oe=>oe.provideSupertypes(z,V,q),void 0,q)}$provideTypeHierarchySubtypes(C,z,V,q){return this._withAdapter(C,Ie,oe=>oe.provideSubtypes(z,V,q),void 0,q)}$releaseTypeHierarchy(C,z){this._withAdapter(C,Ie,V=>Promise.resolve(V.releaseSession(z)),void 0,void 0)}registerDocumentOnDropEditProvider(C,z,V){const q=this._nextHandle();return this._adapter.set(q,new ue(new ae(this._proxy,this._documents,V,q),C)),this._proxy.$registerDocumentOnDropEditProvider(q,this._transformDocumentSelector(z)),this._createDisposable(q)}$provideDocumentOnDropEdits(C,z,V,q,oe,ce){return this._withAdapter(C,ae,J=>Promise.resolve(J.provideDocumentOnDropEdits(z,i.URI.revive(V),q,oe,ce)),void 0,void 0)}registerDocumentPasteEditProvider(C,z,V,q){const oe=this._nextHandle();return this._adapter.set(oe,new ue(new P(this._proxy,this._documents,V,oe),C)),this._proxy.$registerPasteEditProvider(oe,this._transformDocumentSelector(z),!!V.prepareDocumentPaste,q.pasteMimeTypes),this._createDisposable(oe)}$prepareDocumentPaste(C,z,V,q,oe){return this._withAdapter(C,P,ce=>ce.prepareDocumentPaste(i.URI.revive(z),V,q,oe),void 0,oe)}$providePasteEdits(C,z,V,q,oe,ce){return this._withAdapter(C,P,J=>J.providePasteEdits(z,i.URI.revive(V),q,oe,ce),void 0,ce)}static _serializeRegExp(C){return{pattern:C.source,flags:(0,_.regExpFlags)(C)}}static _serializeIndentationRule(C){return{decreaseIndentPattern:ee._serializeRegExp(C.decreaseIndentPattern),increaseIndentPattern:ee._serializeRegExp(C.increaseIndentPattern),indentNextLinePattern:C.indentNextLinePattern?ee._serializeRegExp(C.indentNextLinePattern):void 0,unIndentedLinePattern:C.unIndentedLinePattern?ee._serializeRegExp(C.unIndentedLinePattern):void 0}}static _serializeOnEnterRule(C){return{beforeText:ee._serializeRegExp(C.beforeText),afterText:C.afterText?ee._serializeRegExp(C.afterText):void 0,previousLineText:C.previousLineText?ee._serializeRegExp(C.previousLineText):void 0,action:C.action}}static _serializeOnEnterRules(C){return C.map(ee._serializeOnEnterRule)}setLanguageConfiguration(C,z,V){const{wordPattern:q}=V;if(q&&(0,_.regExpLeadsToEndlessLoop)(q))throw new Error(`Invalid language configuration: wordPattern '${q}' is not allowed to match the empty string.`);q?this._documents.setWordDefinitionFor(z,q):this._documents.setWordDefinitionFor(z,void 0),V.__electricCharacterSupport&&this._apiDeprecation.report("LanguageConfiguration.__electricCharacterSupport",C,"Do not use."),V.__characterPairSupport&&this._apiDeprecation.report("LanguageConfiguration.__characterPairSupport",C,"Do not use.");const oe=this._nextHandle(),ce={comments:V.comments,brackets:V.brackets,wordPattern:V.wordPattern?ee._serializeRegExp(V.wordPattern):void 0,indentationRules:V.indentationRules?ee._serializeIndentationRule(V.indentationRules):void 0,onEnterRules:V.onEnterRules?ee._serializeOnEnterRules(V.onEnterRules):void 0,__electricCharacterSupport:V.__electricCharacterSupport,__characterPairSupport:V.__characterPairSupport};return this._proxy.$setLanguageConfiguration(oe,z,ce),this._createDisposable(oe)}$setWordDefinitions(C){for(const z of C)this._documents.setWordDefinitionFor(z.languageId,new RegExp(z.regexSource,z.regexFlags))}}e.ExtHostLanguageFeatures=ee,ee._handlePool=0}),define(De[210],Ce([1,0,5,8,6,29,15,7]),function(ne,e,i,D,S,N,y,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtHostLanguages=void 0;class _{constructor(O,b,g,E){this._documents=b,this._commands=g,this._uriTransformer=E,this._languageIds=[],this._handlePool=0,this._ids=new Set,this._proxy=O.getProxy(i.MainContext.MainThreadLanguages)}$acceptLanguageIds(O){this._languageIds=O}async getLanguages(){return this._languageIds.slice(0)}async changeLanguage(O,b){await this._proxy.$changeLanguage(O,b);const g=this._documents.getDocumentData(O);if(!g)throw new Error(`document '${O.toString()}' NOT found`);return g.document}async tokenAtPosition(O,b){const g=O.version,E=D.Position.from(b),m=await this._proxy.$tokensAtPosition(O.uri,E),t={type:S.StandardTokenType.Other,range:O.getWordRangeAtPosition(b)??new S.Range(b.line,b.character,b.line,b.character)};if(!m)return t;const o={range:D.Range.to(m.range),type:D.TokenType.to(m.type)};return!o.range.contains(b)||g!==O.version?t:o}createLanguageStatusItem(O,b,g){const E=this._handlePool++,m=this._proxy,t=this._ids,o=`${O.identifier.value}/${b}`;if(t.has(o))throw new Error(`LanguageStatusItem with id '${b}' ALREADY exists`);t.add(o);const a={selector:g,id:b,name:O.displayName??O.name,severity:S.LanguageStatusSeverity.Information,command:void 0,text:"",detail:"",busy:!1};let p;const w=new A.DisposableStore,u=()=>{p?.dispose(),p=(0,y.disposableTimeout)(()=>{w.clear(),this._proxy.$setLanguageStatus(E,{id:o,name:a.name??O.displayName??O.name,source:O.displayName??O.name,selector:D.DocumentSelector.from(a.selector,this._uriTransformer),label:a.text,detail:a.detail??"",severity:a.severity===S.LanguageStatusSeverity.Error?N.default.Error:a.severity===S.LanguageStatusSeverity.Warning?N.default.Warning:N.default.Info,command:a.command&&this._commands.toInternal(a.command,w),accessibilityInfo:a.accessibilityInformation,busy:a.busy})},0)},I={dispose(){w.dispose(),p?.dispose(),m.$removeLanguageStatus(E),t.delete(o)},get id(){return a.id},get name(){return a.name},set name(r){a.name=r,u()},get selector(){return a.selector},set selector(r){a.selector=r,u()},get text(){return a.text},set text(r){a.text=r,u()},get detail(){return a.detail},set detail(r){a.detail=r,u()},get severity(){return a.severity},set severity(r){a.severity=r,u()},get accessibilityInformation(){return a.accessibilityInformation},set accessibilityInformation(r){a.accessibilityInformation=r,u()},get command(){return a.command},set command(r){a.command=r,u()},get busy(){return a.busy},set busy(r){a.busy=r,u()}};return u(),I}}e.ExtHostLanguages=_}),define(De[72],Ce([1,0,21,10,2,3,11,5,26,14]),function(ne,e,i,D,S,N,y,A,_,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IExtHostLocalizationService=e.ExtHostLocalizationService=void 0;let O=class{constructor(g,E,m){this.logService=m,this.bundleCache=new Map,this._proxy=E.getProxy(A.MainContext.MainThreadLocalization),this.currentLanguage=g.environment.appLanguage,this.isDefaultLanguage=this.currentLanguage===i.LANGUAGE_DEFAULT}getMessage(g,E){const{message:m,args:t,comment:o}=E;if(this.isDefaultLanguage)return(0,D.format2)(m,t??{});let a=m;o&&o.length>0&&(a+=`/${Array.isArray(o)?o.join():o}`);const p=this.bundleCache.get(g)?.contents[a];return p||this.logService.warn(`Using default string since no string found in i18n bundle that has the key: ${a}`),(0,D.format2)(p??a,t??{})}getBundle(g){return this.bundleCache.get(g)?.contents}getBundleUri(g){return this.bundleCache.get(g)?.uri}async initializeLocalizedMessages(g){if(this.isDefaultLanguage||!g.l10n&&!g.isBuiltin||this.bundleCache.has(g.identifier.value))return;let E;const m=await this.getBundleLocation(g);if(!m){this.logService.error(`No bundle location found for extension ${g.identifier.value}`);return}try{const t=await this._proxy.$fetchBundleContents(m),o=JSON.parse(t);E=g.isBuiltin?o.contents?.bundle:o}catch(t){this.logService.error(`Failed to load translations for ${g.identifier.value} from ${m}: ${t.message}`);return}E&&this.bundleCache.set(g.identifier.value,{contents:E,uri:m})}async getBundleLocation(g){if(g.isBuiltin){const E=await this._proxy.$fetchBuiltInBundleUri(g.identifier.value);return S.URI.revive(E)}return g.l10n?S.URI.joinPath(g.extensionLocation,g.l10n,`bundle.l10n.${this.currentLanguage}.json`):void 0}};O=He([We(0,_.IExtHostInitDataService),We(1,T.IExtHostRpcService),We(2,y.ILogService)],O),e.ExtHostLocalizationService=O,e.IExtHostLocalizationService=(0,N.createDecorator)("IExtHostLocalizationService")}),define(De[211],Ce([1,0,11,5,26,14,2,4,9]),function(ne,e,i,D,S,N,y,A,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtHostLoggerService=void 0;let T=class extends i.AbstractLoggerService{constructor(g,E){super(E.logLevel,A.Event.None),this._proxy=g.getProxy(D.MainContext.MainThreadLogger)}$setLevel(g,E){E?this.setLevel(y.URI.revive(E),g):(0,_.isUndefined)(g)||this.setLevel(g)}doCreateLogger(g,E,m){return new O(this._proxy,g,E,m)}};T=He([We(0,N.IExtHostRpcService),We(1,S.IExtHostInitDataService)],T),e.ExtHostLoggerService=T;class O extends i.AbstractMessageLogger{constructor(g,E,m,t){super(t?.always),this.proxy=g,this.file=E,this.isLoggerCreated=!1,this.buffer=[],this.setLevel(m),this.proxy.$createLogger(E,t).then(()=>{this.doLog(this.buffer),this.isLoggerCreated=!0})}log(g,E){const m=[[g,E]];this.isLoggerCreated?this.doLog(m):this.buffer.push(...m)}doLog(g){this.proxy.$log(this.file,g)}}}),define(De[212],Ce([1,0,5,11,27]),function(ne,e,i,D,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtHostMessageService=void 0;function N(A){return A&&A.title}let y=class{constructor(_,T){this._logService=T,this._proxy=_.getProxy(i.MainContext.MainThreadMessageService)}showMessage(_,T,O,b,g){const E={source:{identifier:_.identifier,label:_.displayName||_.name}};let m;typeof b=="string"||N(b)?m=[b,...g]:(E.modal=b?.modal,E.useCustom=b?.useCustom,E.detail=b?.detail,m=g),E.useCustom&&(0,S.checkProposedApiEnabled)(_,"resolvers");const t=[];for(let o=0;o{if(typeof o=="number")return m[o]})}};y=He([We(1,D.ILogService)],y),e.ExtHostMessageService=y}),define(De[213],Ce([1,0,24,4,7,28,10,9,2,63,5,37,8,6,43,185,95]),function(ne,e,i,D,S,N,y,A,_,T,O,b,g,E,m,t,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtHostNotebookController=void 0;class a{get activeNotebookEditor(){return this._activeNotebookEditor?.apiEditor}get visibleNotebookEditors(){return this._visibleNotebookEditors.map(w=>w.apiEditor)}constructor(w,u,I,r){this._textDocumentsAndEditors=I,this._textDocuments=r,this._notebookContentProviders=new Map,this._notebookStatusBarItemProviders=new Map,this._documents=new N.ResourceMap,this._editors=new Map,this._onDidChangeActiveNotebookEditor=new D.Emitter,this.onDidChangeActiveNotebookEditor=this._onDidChangeActiveNotebookEditor.event,this._visibleNotebookEditors=[],this._onDidOpenNotebookDocument=new D.Emitter,this.onDidOpenNotebookDocument=this._onDidOpenNotebookDocument.event,this._onDidCloseNotebookDocument=new D.Emitter,this.onDidCloseNotebookDocument=this._onDidCloseNotebookDocument.event,this._onDidChangeVisibleNotebookEditors=new D.Emitter,this.onDidChangeVisibleNotebookEditors=this._onDidChangeVisibleNotebookEditors.event,this._statusBarCache=new T.Cache("NotebookCellStatusBarCache"),this._handlePool=0,this._notebookSerializer=new Map,this._notebookProxy=w.getProxy(O.MainContext.MainThreadNotebook),this._notebookDocumentsProxy=w.getProxy(O.MainContext.MainThreadNotebookDocuments),this._notebookEditorsProxy=w.getProxy(O.MainContext.MainThreadNotebookEditors),this._commandsConverter=u.converter,u.registerArgumentProcessor({processArgument:c=>{if(c&&c.$mid===12){const n=c.notebookEditor?.notebookUri,d=c.cell.handle,f=this._documents.get(n)?.getCell(d);if(f)return f.apiCell}if(c&&c.$mid===13){const n=c.uri,d=this._documents.get(n);if(d)return d.apiNotebook}return c}}),a._registerApiCommands(u)}getEditorById(w){const u=this._editors.get(w);if(!u)throw new Error(`unknown text editor: ${w}. known editors: ${[...this._editors.keys()]} `);return u}getIdByEditor(w){for(const[u,I]of this._editors)if(I.apiEditor===w)return u}get notebookDocuments(){return[...this._documents.values()]}getNotebookDocument(w,u){const I=this._documents.get(w);if(!I&&!u)throw new Error(`NO notebook document for '${w}'`);return I}_getProviderData(w){const u=this._notebookContentProviders.get(w);if(!u)throw new Error(`NO provider for '${w}'`);return u}registerNotebookContentProvider(w,u,I,r){if((0,y.isFalsyOrWhitespace)(u))throw new Error("viewType cannot be empty or just whitespace");if(this._notebookContentProviders.has(u))throw new Error(`Notebook provider for '${u}' already registered`);return this._notebookContentProviders.set(u,{extension:w,provider:I}),this._notebookProxy.$registerNotebookProvider({id:w.identifier,location:w.extensionLocation},u,g.NotebookDocumentContentOptions.from(r),void 0),new E.Disposable(()=>{this._notebookContentProviders.delete(u),this._notebookProxy.$unregisterNotebookProvider(u)})}static _convertNotebookRegistrationData(w,u){if(!u)return;const I=u.filenamePattern.map(r=>g.NotebookExclusiveDocumentPattern.from(r)).filter(r=>r!==void 0);if(u.filenamePattern&&!I){console.warn(`Notebook content provider view options file name pattern is invalid ${u.filenamePattern}`);return}return{extension:w.identifier,providerDisplayName:w.displayName||w.name,displayName:u.displayName,filenamePattern:I,exclusive:u.exclusive||!1}}registerNotebookCellStatusBarItemProvider(w,u,I){const r=a._notebookStatusBarItemProviderHandlePool++,c=typeof I.onDidChangeCellStatusBarItems=="function"?a._notebookStatusBarItemProviderHandlePool++:void 0;this._notebookStatusBarItemProviders.set(r,I),this._notebookProxy.$registerNotebookCellStatusBarItemProvider(r,c,u);let n;return c!==void 0&&(n=I.onDidChangeCellStatusBarItems(d=>this._notebookProxy.$emitCellStatusBarEvent(c))),new E.Disposable(()=>{this._notebookStatusBarItemProviders.delete(r),this._notebookProxy.$unregisterNotebookCellStatusBarItemProvider(r,c),n?.dispose()})}async createNotebookDocument(w){const u=await this._notebookDocumentsProxy.$tryCreateNotebook({viewType:w.viewType,content:w.content&&g.NotebookData.from(w.content)});return _.URI.revive(u)}async openNotebookDocument(w){const u=this._documents.get(w);if(u)return u.apiNotebook;const I=await this._notebookDocumentsProxy.$tryOpenNotebook(w),r=this._documents.get(_.URI.revive(I));return(0,A.assertIsDefined)(r?.apiNotebook)}async showNotebookDocument(w,u){_.URI.isUri(w)&&(w=await this.openNotebookDocument(w));let I;typeof u=="object"?I={position:g.ViewColumn.from(u.viewColumn),preserveFocus:u.preserveFocus,selections:u.selections&&u.selections.map(g.NotebookRange.from),pinned:typeof u.preview=="boolean"?!u.preview:void 0}:I={preserveFocus:!1};const r=await this._notebookEditorsProxy.$tryShowNotebookDocument(w.uri,w.notebookType,I),c=r&&this._editors.get(r)?.apiEditor;if(c)return c;throw r?new Error(`Could NOT open editor for "${w.uri.toString()}" because another editor opened in the meantime.`):new Error(`Could NOT open editor for "${w.uri.toString()}".`)}async $provideNotebookCellStatusBarItems(w,u,I,r){const c=this._notebookStatusBarItemProviders.get(w),n=_.URI.revive(u),d=this._documents.get(n);if(!d||!c)return;const l=d.getCellFromIndex(I);if(!l)return;const f=await c.provideCellStatusBarItems(l.apiCell,r);if(!f)return;const s=new S.DisposableStore,h=this._statusBarCache.add([s]),k=(Array.isArray(f)?f:[f]).map(F=>g.NotebookStatusBarItem.from(F,this._commandsConverter,s));return{cacheId:h,items:k}}$releaseNotebookCellStatusBarItems(w){this._statusBarCache.delete(w)}registerNotebookSerializer(w,u,I,r,c){if((0,y.isFalsyOrWhitespace)(u))throw new Error("viewType cannot be empty or just whitespace");const n=this._handlePool++;return this._notebookSerializer.set(n,I),this._notebookProxy.$registerNotebookSerializer(n,{id:w.identifier,location:w.extensionLocation},u,g.NotebookDocumentContentOptions.from(r),a._convertNotebookRegistrationData(w,c)),(0,S.toDisposable)(()=>{this._notebookProxy.$unregisterNotebookSerializer(n)})}async $dataToNotebook(w,u,I){const r=this._notebookSerializer.get(w);if(!r)throw new Error("NO serializer found");const c=await r.deserializeNotebook(u.buffer,I);return new m.SerializableObjectWithBuffers(g.NotebookData.from(c))}async $notebookToData(w,u,I){const r=this._notebookSerializer.get(w);if(!r)throw new Error("NO serializer found");const c=await r.serializeNotebook(g.NotebookData.to(u.value),I);return i.VSBuffer.wrap(c)}async $openNotebook(w,u,I,r,c){const{provider:n}=this._getProviderData(w),d=await n.openNotebook(_.URI.revive(u),{backupId:I,untitledDocumentData:r?.buffer},c);return new m.SerializableObjectWithBuffers({metadata:d.metadata??Object.create(null),cells:d.cells.map(g.NotebookCellData.from)})}_createExtHostEditor(w,u,I){if(this._editors.has(u))throw new Error(`editor with id ALREADY EXSIST: ${u}`);const r=new o.ExtHostNotebookEditor(u,this._notebookEditorsProxy,w,I.visibleRanges.map(g.NotebookRange.to),I.selections.map(g.NotebookRange.to),typeof I.viewColumn=="number"?g.ViewColumn.to(I.viewColumn):void 0);this._editors.set(u,r)}$acceptDocumentAndEditorsDelta(w){if(w.value.removedDocuments)for(const I of w.value.removedDocuments){const r=_.URI.revive(I),c=this._documents.get(r);c&&(c.dispose(),this._documents.delete(r),this._textDocumentsAndEditors.$acceptDocumentsAndEditorsDelta({removedDocuments:c.apiNotebook.getCells().map(n=>n.document.uri)}),this._onDidCloseNotebookDocument.fire(c.apiNotebook));for(const n of this._editors.values())n.notebookData.uri.toString()===r.toString()&&this._editors.delete(n.id)}if(w.value.addedDocuments){const I=[];for(const r of w.value.addedDocuments){const c=_.URI.revive(r.uri);if(this._documents.has(c))throw new Error(`adding EXISTING notebook ${c} `);const n=new t.ExtHostNotebookDocument(this._notebookDocumentsProxy,this._textDocumentsAndEditors,this._textDocuments,c,r);I.push(...r.cells.map(d=>t.ExtHostCell.asModelAddData(n.apiNotebook,d))),this._documents.get(c)?.dispose(),this._documents.set(c,n),this._textDocumentsAndEditors.$acceptDocumentsAndEditorsDelta({addedDocuments:I}),this._onDidOpenNotebookDocument.fire(n.apiNotebook)}}if(w.value.addedEditors)for(const I of w.value.addedEditors){if(this._editors.has(I.id))return;const r=_.URI.revive(I.documentUri),c=this._documents.get(r);c&&this._createExtHostEditor(c,I.id,I)}const u=[];if(w.value.removedEditors)for(const I of w.value.removedEditors){const r=this._editors.get(I);r&&(this._editors.delete(I),this._activeNotebookEditor?.id===r.id&&(this._activeNotebookEditor=void 0),u.push(r))}if(w.value.visibleEditors){this._visibleNotebookEditors=w.value.visibleEditors.map(r=>this._editors.get(r)).filter(r=>!!r);const I=new Set;this._visibleNotebookEditors.forEach(r=>I.add(r.id));for(const r of this._editors.values()){const c=I.has(r.id);r._acceptVisibility(c)}this._visibleNotebookEditors=[...this._editors.values()].map(r=>r).filter(r=>r.visible),this._onDidChangeVisibleNotebookEditors.fire(this.visibleNotebookEditors)}w.value.newActiveEditor===null?this._activeNotebookEditor=void 0:w.value.newActiveEditor&&(this._activeNotebookEditor=this._editors.get(w.value.newActiveEditor)),w.value.newActiveEditor!==void 0&&this._onDidChangeActiveNotebookEditor.fire(this._activeNotebookEditor?.apiEditor)}static _registerApiCommands(w){const u=b.ApiCommandArgument.String.with("notebookType","A notebook type"),I=new b.ApiCommand("vscode.executeDataToNotebook","_executeDataToNotebook","Invoke notebook serializer",[u,new b.ApiCommandArgument("data","Bytes to convert to data",c=>c instanceof Uint8Array,c=>i.VSBuffer.wrap(c))],new b.ApiCommandResult("Notebook Data",c=>g.NotebookData.to(c.value))),r=new b.ApiCommand("vscode.executeNotebookToData","_executeNotebookToData","Invoke notebook serializer",[u,new b.ApiCommandArgument("NotebookData","Notebook data to convert to bytes",c=>!0,c=>new m.SerializableObjectWithBuffers(g.NotebookData.from(c)))],new b.ApiCommandResult("Bytes",c=>c.buffer));w.registerApiCommand(I),w.registerApiCommand(r)}}e.ExtHostNotebookController=a,a._notebookStatusBarItemProviderHandlePool=0}),define(De[214],Ce([1,0,18,15,20,4,7,28,2,25,11,5,37,8,6,65,173,27,43]),function(ne,e,i,D,S,N,y,A,_,T,O,b,g,E,m,t,o,a,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createKernelId=e.ExtHostNotebookKernels=void 0;let w=class{constructor(d,l,f,s,h){this._initData=l,this._extHostNotebook=f,this._commands=s,this._logService=h,this._activeExecutions=new A.ResourceMap,this._kernelData=new Map,this._handlePool=0,this._onDidChangeCellExecutionState=new N.Emitter,this.onDidChangeNotebookCellExecutionState=this._onDidChangeCellExecutionState.event,this._proxy=d.getProxy(b.MainContext.MainThreadNotebookKernels);const v=new g.ApiCommand("notebook.selectKernel","_notebook.selectKernel","Trigger kernel picker for specified notebook editor widget",[new g.ApiCommandArgument("options","Select kernel options",k=>!0,k=>{if(k&&"notebookEditor"in k&&"id"in k){const F=this._extHostNotebook.getIdByEditor(k.notebookEditor);return{id:k.id,extension:k.extension,notebookEditorId:F}}else if(k&&"notebookEditor"in k){const F=this._extHostNotebook.getIdByEditor(k.notebookEditor);if(F===void 0)throw new Error(`Cannot invoke 'notebook.selectKernel' for unrecognized notebook editor ${k.notebookEditor.notebook.uri.toString()}`);return{notebookEditorId:F}}return k})],g.ApiCommandResult.Void);this._commands.registerApiCommand(v)}createNotebookController(d,l,f,s,h,v){for(const re of this._kernelData.values())if(re.controller.id===l&&T.ExtensionIdentifier.equals(d.identifier,re.extensionId))throw new Error(`notebook controller with id '${l}' ALREADY exist`);const k=this._handlePool++,F=this;this._logService.trace(`NotebookController[${k}], CREATED by ${d.identifier.value}, ${l}`);const j=()=>console.warn(`NO execute handler from notebook controller '${R.id}' of extension: '${d.identifier}'`);let W=!1;const H=new y.DisposableStore,P=new N.Emitter,M=new N.Emitter,R={id:c(d.identifier,l),notebookType:f,extensionId:d.identifier,extensionLocation:d.extensionLocation,label:s||d.identifier.value,preloads:v?v.map(E.NotebookRendererScript.from):[]};let B=h??j,$;this._proxy.$addKernel(k,R).catch(re=>{console.log(re),W=!0});let U=0;const K=()=>{if(W)return;const re=++U;Promise.resolve().then(()=>{re===U&&this._proxy.$updateKernel(k,R)})},te=new A.ResourceMap,de={get id(){return l},get notebookType(){return R.notebookType},onDidChangeSelectedNotebooks:P.event,get label(){return R.label},set label(re){R.label=re??d.displayName??d.name,K()},get detail(){return R.detail??""},set detail(re){R.detail=re,K()},get description(){return R.description??""},set description(re){R.description=re,K()},get kind(){return(0,a.checkProposedApiEnabled)(d,"notebookControllerKind"),R.kind??""},set kind(re){(0,a.checkProposedApiEnabled)(d,"notebookControllerKind"),R.kind=re,K()},get supportedLanguages(){return R.supportedLanguages},set supportedLanguages(re){R.supportedLanguages=re,K()},get supportsExecutionOrder(){return R.supportsExecutionOrder??!1},set supportsExecutionOrder(re){R.supportsExecutionOrder=re,K()},get rendererScripts(){return R.preloads?R.preloads.map(E.NotebookRendererScript.to):[]},get executeHandler(){return B},set executeHandler(re){B=re??j},get interruptHandler(){return $},set interruptHandler(re){$=re,R.supportsInterrupt=Boolean(re),K()},createNotebookCellExecution(re){if(W)throw new Error("notebook controller is DISPOSED");if(!te.has(re.notebook.uri))throw F._logService.trace(`NotebookController[${k}] NOT associated to notebook, associated to THESE notebooks:`,Array.from(te.keys()).map(be=>be.toString())),new Error(`notebook controller is NOT associated to notebook: ${re.notebook.uri.toString()}`);return F._createNotebookCellExecution(re,c(d.identifier,this.id))},dispose:()=>{W||(this._logService.trace(`NotebookController[${k}], DISPOSED`),W=!0,this._kernelData.delete(k),H.dispose(),P.dispose(),M.dispose(),this._proxy.$removeKernel(k))},updateNotebookAffinity(re,be){be===m.NotebookControllerAffinity2.Hidden&&(0,a.checkProposedApiEnabled)(d,"notebookControllerAffinityHidden"),F._proxy.$updateNotebookPriority(k,re.uri,be)},onDidReceiveMessage:M.event,postMessage(re,be){return(0,a.checkProposedApiEnabled)(d,"notebookMessaging"),F._proxy.$postMessage(k,be&&F._extHostNotebook.getIdByEditor(be),re)},asWebviewUri(re){return(0,a.checkProposedApiEnabled)(d,"notebookMessaging"),(0,t.asWebviewUri)(re,F._initData.remote)}};return this._kernelData.set(k,{extensionId:d.identifier,controller:de,onDidReceiveMessage:M,onDidChangeSelection:P,associatedNotebooks:te}),de}getIdByController(d){for(const[l,f]of this._kernelData)if(f.controller===d)return c(f.extensionId,d.id);return null}$acceptNotebookAssociation(d,l,f){const s=this._kernelData.get(d);if(s){const h=this._extHostNotebook.getNotebookDocument(_.URI.revive(l));f?s.associatedNotebooks.set(h.uri,!0):s.associatedNotebooks.delete(h.uri),this._logService.trace(`NotebookController[${d}] ASSOCIATE notebook`,h.uri.toString(),f),s.onDidChangeSelection.fire({selected:f,notebook:h.apiNotebook})}}async $executeCells(d,l,f){const s=this._kernelData.get(d);if(!s)return;const h=this._extHostNotebook.getNotebookDocument(_.URI.revive(l)),v=[];for(const k of f){const F=h.getCell(k);F&&v.push(F.apiCell)}try{this._logService.trace(`NotebookController[${d}] EXECUTE cells`,h.uri.toString(),v.length),await s.controller.executeHandler.call(s.controller,v,h.apiNotebook,s.controller)}catch(k){this._logService.error(`NotebookController[${d}] execute cells FAILED`,k),console.error(k)}}async $cancelCells(d,l,f){const s=this._kernelData.get(d);if(!s)return;const h=this._extHostNotebook.getNotebookDocument(_.URI.revive(l));if(s.controller.interruptHandler)await s.controller.interruptHandler.call(s.controller,h.apiNotebook);else for(const v of f){const k=h.getCell(v);k&&this._activeExecutions.get(k.uri)?.cancel()}}$acceptKernelMessageFromRenderer(d,l,f){const s=this._kernelData.get(d);if(!s)return;const h=this._extHostNotebook.getEditorById(l);s.onDidReceiveMessage.fire(Object.freeze({editor:h.apiEditor,message:f}))}$cellExecutionChanged(d,l,f){const h=this._extHostNotebook.getNotebookDocument(_.URI.revive(d)).getCell(l);if(h){const v=f?E.NotebookCellExecutionState.to(f):m.NotebookCellExecutionState.Idle;v!==void 0&&this._onDidChangeCellExecutionState.fire({cell:h.apiCell,state:v})}}_createNotebookCellExecution(d,l){if(d.index<0)throw new Error("CANNOT execute cell that has been REMOVED from notebook");const s=this._extHostNotebook.getNotebookDocument(d.notebook.uri).getCellFromApiCell(d);if(!s)throw new Error("invalid cell");if(this._activeExecutions.has(s.uri))throw new Error(`duplicate execution for ${s.uri}`);const h=new I(l,s,this._proxy);this._activeExecutions.set(s.uri,h);const v=h.onDidChangeState(()=>{h.state===u.Resolved&&(h.dispose(),v.dispose(),this._activeExecutions.delete(s.uri))});return h.asApiObject()}};w=He([We(4,O.ILogService)],w),e.ExtHostNotebookKernels=w;var u;(function(n){n[n.Init=0]="Init",n[n.Started=1]="Started",n[n.Resolved=2]="Resolved"})(u||(u={}));class I extends y.Disposable{get state(){return this._state}constructor(d,l,f){super(),this._cell=l,this._proxy=f,this._handle=I.HANDLE++,this._onDidChangeState=new N.Emitter,this.onDidChangeState=this._onDidChangeState.event,this._state=u.Init,this._tokenSource=this._register(new S.CancellationTokenSource),this._collector=new r(10,s=>this.update(s)),this._executionOrder=l.internalMetadata.executionOrder,this._proxy.$createExecution(this._handle,d,this._cell.notebook.uri,this._cell.handle)}cancel(){this._tokenSource.cancel()}async updateSoon(d){await this._collector.addItem(d)}async update(d){const l=Array.isArray(d)?d:[d];return this._proxy.$updateExecution(this._handle,new p.SerializableObjectWithBuffers(l))}verifyStateForOutput(){if(this._state===u.Init)throw new Error("Must call start before modifying cell output");if(this._state===u.Resolved)throw new Error("Cannot modify cell output after calling resolve")}cellIndexToHandle(d){let l=this._cell;if(d&&(l=this._cell.notebook.getCellFromApiCell(d)),!l)throw new Error("INVALID cell");return l.handle}validateAndConvertOutputs(d){return d.map(l=>{const f=m.NotebookCellOutput.ensureUniqueMimeTypes(l.items,!0);return f===l.items?E.NotebookCellOutput.from(l):E.NotebookCellOutput.from({items:f,id:l.id,metadata:l.metadata})})}async updateOutputs(d,l,f){const s=this.cellIndexToHandle(l),h=this.validateAndConvertOutputs((0,i.asArray)(d));return this.updateSoon({editType:o.CellExecutionUpdateType.Output,cellHandle:s,append:f,outputs:h})}async updateOutputItems(d,l,f){return d=m.NotebookCellOutput.ensureUniqueMimeTypes((0,i.asArray)(d),!0),this.updateSoon({editType:o.CellExecutionUpdateType.OutputItems,items:d.map(E.NotebookCellOutputItem.from),outputId:l.id,append:f})}asApiObject(){const d=this;return Object.freeze({get token(){return d._tokenSource.token},get cell(){return d._cell.apiCell},get executionOrder(){return d._executionOrder},set executionOrder(f){d._executionOrder=f,d.update([{editType:o.CellExecutionUpdateType.ExecutionState,executionOrder:d._executionOrder}])},start(f){if(d._state===u.Resolved||d._state===u.Started)throw new Error("Cannot call start again");d._state=u.Started,d._onDidChangeState.fire(),d.update({editType:o.CellExecutionUpdateType.ExecutionState,runStartTime:f})},end(f,s){if(d._state===u.Resolved)throw new Error("Cannot call resolve twice");d._state=u.Resolved,d._onDidChangeState.fire(),d._collector.flush(),d._proxy.$completeExecution(d._handle,new p.SerializableObjectWithBuffers({runEndTime:s,lastRunSuccess:f}))},clearOutput(f){return d.verifyStateForOutput(),d.updateOutputs([],f,!1)},appendOutput(f,s){return d.verifyStateForOutput(),d.updateOutputs(f,s,!0)},replaceOutput(f,s){return d.verifyStateForOutput(),d.updateOutputs(f,s,!1)},appendOutputItems(f,s){return d.verifyStateForOutput(),d.updateOutputItems(f,s,!0)},replaceOutputItems(f,s){return d.verifyStateForOutput(),d.updateOutputItems(f,s,!1)}})}}I.HANDLE=0;class r{constructor(d,l){this.delay=d,this.callback=l,this.batch=[],this.startedTimer=Date.now()}addItem(d){return this.batch.push(d),this.currentDeferred||(this.currentDeferred=new D.DeferredPromise,this.startedTimer=Date.now(),(0,D.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 d=this.currentDeferred;this.currentDeferred=void 0;const l=this.batch;return this.batch=[],this.callback(l).finally(()=>d.complete())}}function c(n,d){return`${n.value}/${d}`}e.createKernelId=c}),define(De[215],Ce([1,0,4,5,95]),function(ne,e,i,D,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtHostNotebookRenderers=void 0;class N{constructor(A,_){this._extHostNotebook=_,this._rendererMessageEmitters=new Map,this.proxy=A.getProxy(D.MainContext.MainThreadNotebookRenderers)}$postRendererMessage(A,_,T){const O=this._extHostNotebook.getEditorById(A);this._rendererMessageEmitters.get(_)?.fire({editor:O.apiEditor,message:T})}createRendererMessaging(A,_){if(!A.contributes?.notebookRenderer?.some(O=>O.id===_))throw new Error(`Extensions may only call createRendererMessaging() for renderers they contribute (got ${_})`);return{onDidReceiveMessage:(O,b,g)=>this.getOrCreateEmitterFor(_).event(O,b,g),postMessage:(O,b)=>{S.ExtHostNotebookEditor.apiEditorsToExtHost.has(O)&&([O,b]=[b,O]);const g=b&&S.ExtHostNotebookEditor.apiEditorsToExtHost.get(b);return this.proxy.$postMessage(g?.id,_,O)}}}getOrCreateEmitterFor(A){let _=this._rendererMessageEmitters.get(A);return _||(_=new i.Emitter({onLastListenerRemove:()=>{_?.dispose(),this._rendererMessageEmitters.delete(A)}}),this._rendererMessageEmitters.set(A,_),_)}}e.ExtHostNotebookRenderers=N}),define(De[216],Ce([1,0,20,4,7,5,2,6,12,18,29,62]),function(ne,e,i,D,S,N,y,A,_,T,O,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createExtHostQuickOpen=void 0;function g(E,m,t){const o=E.getProxy(N.MainContext.MainThreadQuickOpen);class a{constructor(l,f){this._sessions=new Map,this._instances=0,this._workspace=l,this._commands=f}showQuickPick(l,f,s=i.CancellationToken.None){this._onDidSelectItem=void 0;const h=Promise.resolve(l),v=++this._instances,k=o.$show(v,{title:f?.title,placeHolder:f?.placeHolder,matchOnDescription:f?.matchOnDescription,matchOnDetail:f?.matchOnDetail,ignoreFocusLost:f?.ignoreFocusOut,canPickMany:f?.canPickMany},s),F={},j=k.then(()=>F);return Promise.race([j,h]).then(W=>{if(W!==F)return h.then(H=>{const P=[];for(let M=0;M{f.onDidSelectItem(H[M])}),o.$setItems(v,P),k.then(M=>{if(typeof M=="number")return H[M];if(Array.isArray(M))return M.map(R=>H[R])})})}).then(void 0,W=>{if(!(0,_.isCancellationError)(W))return o.$setError(v,W),Promise.reject(W)})}$onItemSelected(l){this._onDidSelectItem?.(l)}showInput(l,f=i.CancellationToken.None){return this._validateInput=l?.validateInput,o.$input(l,typeof this._validateInput=="function",f).then(void 0,s=>{if(!(0,_.isCancellationError)(s))return Promise.reject(s)})}async $validateInput(l){if(!this._validateInput)return;const f=await this._validateInput(l);if(!f||typeof f=="string")return f;let s;switch(f.severity){case A.InputBoxValidationSeverity.Info:s=O.default.Info;break;case A.InputBoxValidationSeverity.Warning:s=O.default.Warning;break;case A.InputBoxValidationSeverity.Error:s=O.default.Error;break;default:s=f.message?O.default.Error:O.default.Ignore;break}return{content:f.message,severity:s}}async showWorkspaceFolderPick(l,f=i.CancellationToken.None){const s=await this._commands.executeCommand("_workbench.pickWorkspaceFolder",[l]);if(!s)return;const h=await this._workspace.getWorkspaceFolders2();if(!!h)return h.find(v=>v.uri.toString()===s.uri.toString())}createQuickPick(l){const f=new c(l,()=>this._sessions.delete(f._id));return this._sessions.set(f._id,f),f}createInputBox(l){const f=new n(l,()=>this._sessions.delete(f._id));return this._sessions.set(f._id,f),f}$onDidChangeValue(l,f){this._sessions.get(l)?._fireDidChangeValue(f)}$onDidAccept(l){this._sessions.get(l)?._fireDidAccept()}$onDidChangeActive(l,f){const s=this._sessions.get(l);s instanceof c&&s._fireDidChangeActive(f)}$onDidChangeSelection(l,f){const s=this._sessions.get(l);s instanceof c&&s._fireDidChangeSelection(f)}$onDidTriggerButton(l,f){this._sessions.get(l)?._fireDidTriggerButton(f)}$onDidTriggerItemButton(l,f,s){const h=this._sessions.get(l);h instanceof c&&h._fireDidTriggerItemButton(f,s)}$onDidHide(l){this._sessions.get(l)?._fireDidHide()}}class p{constructor(l,f){this._extensionId=l,this._onDidDispose=f,this._id=c._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 D.Emitter,this._onDidChangeValueEmitter=new D.Emitter,this._onDidTriggerButtonEmitter=new D.Emitter,this._onDidHideEmitter=new D.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(l){this._title=l,this.update({title:l})}get step(){return this._steps}set step(l){this._steps=l,this.update({step:l})}get totalSteps(){return this._totalSteps}set totalSteps(l){this._totalSteps=l,this.update({totalSteps:l})}get enabled(){return this._enabled}set enabled(l){this._enabled=l,this.update({enabled:l})}get busy(){return this._busy}set busy(l){this._busy=l,this.update({busy:l})}get ignoreFocusOut(){return this._ignoreFocusOut}set ignoreFocusOut(l){this._ignoreFocusOut=l,this.update({ignoreFocusOut:l})}get value(){return this._value}set value(l){this._value=l,this.update({value:l})}get placeholder(){return this._placeholder}set placeholder(l){this._placeholder=l,this.update({placeholder:l})}get buttons(){return this._buttons}set buttons(l){this._buttons=l.slice(),this._handlesToButtons.clear(),l.forEach((f,s)=>{const h=f===A.QuickInputButtons.Back?-1:s;this._handlesToButtons.set(h,f)}),this.update({buttons:l.map((f,s)=>({...r(f),tooltip:f.tooltip,handle:f===A.QuickInputButtons.Back?-1:s}))})}show(){this._visible=!0,this._expectingHide=!0,this.update({visible:!0})}hide(){this._visible=!1,this.update({visible:!1})}_fireDidAccept(){this._onDidAcceptEmitter.fire()}_fireDidChangeValue(l){this._value=l,this._onDidChangeValueEmitter.fire(l)}_fireDidTriggerButton(l){const f=this._handlesToButtons.get(l);f&&this._onDidTriggerButtonEmitter.fire(f)}_fireDidHide(){this._expectingHide&&(this._expectingHide=this._visible,this._onDidHideEmitter.fire())}dispose(){this._disposed||(this._disposed=!0,this._fireDidHide(),this._disposables=(0,S.dispose)(this._disposables),this._updateTimeout&&(clearTimeout(this._updateTimeout),this._updateTimeout=void 0),this._onDidDispose(),o.$dispose(this._id))}update(l){if(!this._disposed){for(const f of Object.keys(l)){const s=l[f];this._pendingUpdate[f]=s===void 0?null:s}"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(){o.$createOrUpdate(this._pendingUpdate),this._pendingUpdate={id:this._id}}}p._nextId=1;function w(d){if(d instanceof A.ThemeIcon)return{id:d.id};const l=I(d),f=u(d);return{dark:typeof l=="string"?y.URI.file(l):l,light:typeof f=="string"?y.URI.file(f):f}}function u(d){return typeof d=="object"&&"light"in d?d.light:d}function I(d){return typeof d=="object"&&"dark"in d?d.dark:d}function r(d){const l=w(d.iconPath);let f,s;return"id"in l?s=b.ThemeIcon.asClassName(l):f=l,{iconPath:f,iconClass:s}}class c extends p{constructor(l,f){super(l.identifier,f),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 D.Emitter,this._selectedItems=[],this._onDidChangeSelectionEmitter=new D.Emitter,this._onDidTriggerItemButtonEmitter=new D.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(l){this._items=l.slice(),this._handlesToItems.clear(),this._itemsToHandles.clear(),l.forEach((s,h)=>{this._handlesToItems.set(h,s),this._itemsToHandles.set(s,h)});const f=[];for(let s=0;s({...r(v),tooltip:v.tooltip,handle:k}))})}this.update({items:f})}get canSelectMany(){return this._canSelectMany}set canSelectMany(l){this._canSelectMany=l,this.update({canSelectMany:l})}get matchOnDescription(){return this._matchOnDescription}set matchOnDescription(l){this._matchOnDescription=l,this.update({matchOnDescription:l})}get matchOnDetail(){return this._matchOnDetail}set matchOnDetail(l){this._matchOnDetail=l,this.update({matchOnDetail:l})}get sortByLabel(){return this._sortByLabel}set sortByLabel(l){this._sortByLabel=l,this.update({sortByLabel:l})}get keepScrollPosition(){return this._keepScrollPosition}set keepScrollPosition(l){this._keepScrollPosition=l,this.update({keepScrollPosition:l})}get activeItems(){return this._activeItems}set activeItems(l){this._activeItems=l.filter(f=>this._itemsToHandles.has(f)),this.update({activeItems:this._activeItems.map(f=>this._itemsToHandles.get(f))})}get selectedItems(){return this._selectedItems}set selectedItems(l){this._selectedItems=l.filter(f=>this._itemsToHandles.has(f)),this.update({selectedItems:this._selectedItems.map(f=>this._itemsToHandles.get(f))})}_fireDidChangeActive(l){const f=(0,T.coalesce)(l.map(s=>this._handlesToItems.get(s)));this._activeItems=f,this._onDidChangeActiveEmitter.fire(f)}_fireDidChangeSelection(l){const f=(0,T.coalesce)(l.map(s=>this._handlesToItems.get(s)));this._selectedItems=f,this._onDidChangeSelectionEmitter.fire(f)}_fireDidTriggerItemButton(l,f){const s=this._handlesToItems.get(l);if(!s||!s.buttons||!s.buttons.length)return;const h=s.buttons[f];h&&this._onDidTriggerItemButtonEmitter.fire({button:h,item:s})}}class n extends p{constructor(l,f){super(l.identifier,f),this._password=!1,this.update({type:"inputBox"})}get password(){return this._password}set password(l){this._password=l,this.update({password:l})}get prompt(){return this._prompt}set prompt(l){this._prompt=l,this.update({prompt:l})}get valueSelection(){return this._valueSelection}set valueSelection(l){this._valueSelection=l,this.update({valueSelection:l})}get validationMessage(){return this._validationMessage}set validationMessage(l){this._validationMessage=l,l?typeof l=="string"?this.update({validationMessage:l,severity:O.default.Error}):this.update({validationMessage:l.message,severity:l.severity??O.default.Error}):this.update({validationMessage:void 0,severity:O.default.Ignore})}}return new a(m,t)}e.createExtHostQuickOpen=g});var Re=this&&this.__classPrivateFieldGet||function(ne,e,i,D){if(i==="a"&&!D)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?ne!==e||!D:!e.has(ne))throw new TypeError("Cannot read private member from an object whose class did not declare it");return i==="m"?D:i==="a"?D.call(ne):D?D.value:e.get(ne)},Je=this&&this.__classPrivateFieldSet||function(ne,e,i,D,S){if(D==="m")throw new TypeError("Private method is not writable");if(D==="a"&&!S)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?ne!==e||!S:!e.has(ne))throw new TypeError("Cannot write private member to an object whose class did not declare it");return D==="a"?S.call(ne,i):S?S.value=i:e.set(ne,i),i};define(De[217],Ce([1,0,2,4,58,7,15,5,18,119,11,25,62,8,27]),function(ne,e,i,D,S,N,y,A,_,T,O,b,g,E,m){"use strict";var t,o;Object.defineProperty(e,"__esModule",{value:!0}),e.ExtHostSCM=e.ExtHostSCMInputBox=void 0;function a(h){if(h)return typeof h.iconPath=="string"?i.URI.file(h.iconPath):i.URI.isUri(h.iconPath)||g.ThemeIcon.isThemeIcon(h.iconPath)?h.iconPath:void 0}function p(h,v){if(!h.iconPath&&!v.iconPath)return 0;if(h.iconPath){if(!v.iconPath)return 1}else return-1;const k=typeof h.iconPath=="string"?h.iconPath:i.URI.isUri(h.iconPath)?h.iconPath.fsPath:h.iconPath.id,F=typeof v.iconPath=="string"?v.iconPath:i.URI.isUri(v.iconPath)?v.iconPath.fsPath:v.iconPath.id;return(0,T.comparePaths)(k,F)}function w(h,v){let k=0;if(h.strikeThrough!==v.strikeThrough)return h.strikeThrough?1:-1;if(h.faded!==v.faded)return h.faded?1:-1;if(h.tooltip!==v.tooltip)return(h.tooltip||"").localeCompare(v.tooltip||"");if(k=p(h,v),k!==0)return k;if(h.light&&v.light)k=p(h.light,v.light);else{if(h.light)return 1;if(v.light)return-1}if(k!==0)return k;if(h.dark&&v.dark)k=p(h.dark,v.dark);else{if(h.dark)return 1;if(v.dark)return-1}return k}function u(h,v){if(h.command!==v.command)return h.commandthis._commands.executeCommand(F.command,...F.arguments||[],k)):Promise.resolve(void 0)}_takeResourceStateSnapshot(){const v=[...this._resourceStates].sort(I),F=(0,_.sortedDiff)(this._resourceSnapshot,v,I).map(H=>{const P=H.toInsert.map(M=>{const R=this._resourceHandlePool++;this._resourceStatesMap.set(R,M);const B=M.resourceUri;let $;if(M.command)if(M.command.command==="vscode.open"||M.command.command==="vscode.diff"){const ge=new N.DisposableStore;$=this._commands.converter.toInternal(M.command,ge),this._resourceStatesDisposablesMap.set(R,ge)}else this._resourceStatesCommandsMap.set(R,M.command);const U=a(M.decorations),K=M.decorations&&a(M.decorations.light)||U,te=M.decorations&&a(M.decorations.dark)||U,de=[K,te],re=M.decorations&&M.decorations.tooltip||"",be=M.decorations&&!!M.decorations.strikeThrough,le=M.decorations&&!!M.decorations.faded,fe=M.contextValue||"";return{rawResource:[R,B,de,re,be,le,fe,$],handle:R}});return{start:H.start,deleteCount:H.deleteCount,toInsert:P}}),j=F.map(({start:H,deleteCount:P,toInsert:M})=>[H,P,M.map(R=>R.rawResource)]),W=F.reverse();for(const{start:H,deleteCount:P,toInsert:M}of W){const R=M.map($=>$.handle),B=this._handlesSnapshot.splice(H,P,...R);for(const $ of B)this._resourceStatesMap.delete($),this._resourceStatesCommandsMap.delete($),this._resourceStatesDisposablesMap.get($)?.dispose(),this._resourceStatesDisposablesMap.delete($)}return this._resourceSnapshot=v,j}dispose(){this._disposed=!0,this._onDidDispose.fire()}}l._handlePool=0;class f{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(v){this._count!==v&&(this._count=v,Re(this,o,"f").$updateSourceControl(this.handle,{count:v}))}get quickDiffProvider(){return this._quickDiffProvider}set quickDiffProvider(v){this._quickDiffProvider=v,Re(this,o,"f").$updateSourceControl(this.handle,{hasQuickDiffProvider:!!v})}get commitTemplate(){return this._commitTemplate}set commitTemplate(v){v!==this._commitTemplate&&(this._commitTemplate=v,Re(this,o,"f").$updateSourceControl(this.handle,{commitTemplate:v}))}get acceptInputCommand(){return this._acceptInputCommand}set acceptInputCommand(v){this._acceptInputDisposables.value=new N.DisposableStore,this._acceptInputCommand=v;const k=this._commands.converter.toInternal(v,this._acceptInputDisposables.value);Re(this,o,"f").$updateSourceControl(this.handle,{acceptInputCommand:k})}get actionButton(){return(0,m.checkProposedApiEnabled)(this._extension,"scmActionButton"),this._actionButton}set actionButton(v){(0,m.checkProposedApiEnabled)(this._extension,"scmActionButton"),this._actionButtonDisposables.value=new N.DisposableStore,this._actionButton=v;const k=v!==void 0?{command:this._commands.converter.toInternal(v.command,this._actionButtonDisposables.value),secondaryCommands:v.secondaryCommands?.map(F=>F.map(j=>this._commands.converter.toInternal(j,this._actionButtonDisposables.value))),description:v.description,enabled:v.enabled}:void 0;Re(this,o,"f").$updateSourceControl(this.handle,{actionButton:k??null})}get statusBarCommands(){return this._statusBarCommands}set statusBarCommands(v){if(this._statusBarCommands&&v&&n(this._statusBarCommands,v))return;this._statusBarDisposables.value=new N.DisposableStore,this._statusBarCommands=v;const k=(v||[]).map(F=>this._commands.converter.toInternal(F,this._statusBarDisposables.value));Re(this,o,"f").$updateSourceControl(this.handle,{statusBarCommands:k})}get selected(){return this._selected}constructor(v,k,F,j,W,H){this._extension=v,this._commands=F,this._id=j,this._label=W,this._rootUri=H,o.set(this,void 0),this._groups=new Map,this._count=void 0,this._quickDiffProvider=void 0,this._commitTemplate=void 0,this._acceptInputDisposables=new N.MutableDisposable,this._acceptInputCommand=void 0,this._actionButtonDisposables=new N.MutableDisposable,this._statusBarDisposables=new N.MutableDisposable,this._statusBarCommands=void 0,this._selected=!1,this._onDidChangeSelection=new D.Emitter,this.onDidChangeSelection=this._onDidChangeSelection.event,this.handle=f._handlePool++,this.createdResourceGroups=new Map,this.updatedResourceGroups=new Set,Je(this,o,k,"f"),this._inputBox=new d(v,Re(this,o,"f"),this.handle),Re(this,o,"f").$registerSourceControl(this.handle,j,W,H)}createResourceGroup(v,k){const F=new l(Re(this,o,"f"),this._commands,this.handle,v,k),j=D.Event.once(F.onDidDispose)(()=>this.createdResourceGroups.delete(F));return this.createdResourceGroups.set(F,j),this.eventuallyAddResourceGroups(),F}eventuallyAddResourceGroups(){const v=[],k=[];for(const[F,j]of this.createdResourceGroups){j.dispose();const W=F.onDidUpdateResourceStates(()=>{this.updatedResourceGroups.add(F),this.eventuallyUpdateResourceStates()});D.Event.once(F.onDidDispose)(()=>{this.updatedResourceGroups.delete(F),W.dispose(),this._groups.delete(F.handle),Re(this,o,"f").$unregisterGroup(this.handle,F.handle)}),v.push([F.handle,F.id,F.label,F.features]);const H=F._takeResourceStateSnapshot();H.length>0&&k.push([F.handle,H]),this._groups.set(F.handle,F)}Re(this,o,"f").$registerGroups(this.handle,v,k),this.createdResourceGroups.clear()}eventuallyUpdateResourceStates(){const v=[];this.updatedResourceGroups.forEach(k=>{const F=k._takeResourceStateSnapshot();F.length!==0&&v.push([k.handle,F])}),v.length>0&&Re(this,o,"f").$spliceResourceStates(this.handle,v),this.updatedResourceGroups.clear()}getResourceGroup(v){return this._groups.get(v)}setSelectionState(v){this._selected=v,this._onDidChangeSelection.fire(v)}dispose(){this._acceptInputDisposables.dispose(),this._actionButtonDisposables.dispose(),this._statusBarDisposables.dispose(),this._groups.forEach(v=>v.dispose()),Re(this,o,"f").$unregisterSourceControl(this.handle)}}o=new WeakMap,f._handlePool=0,He([(0,S.debounce)(100)],f.prototype,"eventuallyAddResourceGroups",null),He([(0,S.debounce)(100)],f.prototype,"eventuallyUpdateResourceStates",null);let s=class Zi{get onDidChangeActiveProvider(){return this._onDidChangeActiveProvider.event}constructor(v,k,F){this._commands=k,this.logService=F,this._sourceControls=new Map,this._sourceControlsByExtension=new Map,this._onDidChangeActiveProvider=new D.Emitter,this._proxy=v.getProxy(A.MainContext.MainThreadSCM),this._telemetry=v.getProxy(A.MainContext.MainThreadTelemetry),k.registerArgumentProcessor({processArgument:j=>{if(j&&j.$mid===3){const W=this._sourceControls.get(j.sourceControlHandle);if(!W)return j;const H=W.getResourceGroup(j.groupHandle);return H?H.getResourceState(j.handle):j}else if(j&&j.$mid===4){const W=this._sourceControls.get(j.sourceControlHandle);return W?W.getResourceGroup(j.groupHandle):j}else if(j&&j.$mid===5){const W=this._sourceControls.get(j.handle);return W||j}return j}})}createSourceControl(v,k,F,j){this.logService.trace("ExtHostSCM#createSourceControl",v.identifier.value,k,F,j),this._telemetry.$publicLog2("api/scm/createSourceControl",{extensionId:v.identifier.value});const W=Zi._handlePool++,H=new f(v,this._proxy,this._commands,k,F,j);this._sourceControls.set(W,H);const P=this._sourceControlsByExtension.get(b.ExtensionIdentifier.toKey(v.identifier))||[];return P.push(H),this._sourceControlsByExtension.set(b.ExtensionIdentifier.toKey(v.identifier),P),H}getLastInputBox(v){this.logService.trace("ExtHostSCM#getLastInputBox",v.identifier.value);const k=this._sourceControlsByExtension.get(b.ExtensionIdentifier.toKey(v.identifier)),F=k&&k[k.length-1];return F&&F.inputBox}$provideOriginalResource(v,k,F){const j=i.URI.revive(k);this.logService.trace("ExtHostSCM#$provideOriginalResource",v,j.toString());const W=this._sourceControls.get(v);return!W||!W.quickDiffProvider||!W.quickDiffProvider.provideOriginalResource?Promise.resolve(null):(0,y.asPromise)(()=>W.quickDiffProvider.provideOriginalResource(j,F)).then(H=>H||null)}$onInputBoxValueChange(v,k){this.logService.trace("ExtHostSCM#$onInputBoxValueChange",v);const F=this._sourceControls.get(v);return F&&F.inputBox.$onInputBoxValueChange(k),Promise.resolve(void 0)}$executeResourceCommand(v,k,F,j){this.logService.trace("ExtHostSCM#$executeResourceCommand",v,k,F);const W=this._sourceControls.get(v);if(!W)return Promise.resolve(void 0);const H=W.getResourceGroup(k);return H?H.$executeResourceCommand(F,j):Promise.resolve(void 0)}$validateInput(v,k,F){this.logService.trace("ExtHostSCM#$validateInput",v);const j=this._sourceControls.get(v);return!j||!j.inputBox.validateInput?Promise.resolve(void 0):(0,y.asPromise)(()=>j.inputBox.validateInput(k,F)).then(W=>{if(!W)return Promise.resolve(void 0);const H=E.MarkdownString.fromStrict(W.message);return H?Promise.resolve([H,W.type]):Promise.resolve(void 0)})}$setSelectedSourceControl(v){return this.logService.trace("ExtHostSCM#$setSelectedSourceControl",v),v!==void 0&&this._sourceControls.get(v)?.setSelectionState(!0),this._selectedSourceControlHandle!==void 0&&this._sourceControls.get(this._selectedSourceControlHandle)?.setSelectionState(!1),this._selectedSourceControlHandle=v,Promise.resolve(void 0)}};s._handlePool=0,s=He([We(2,O.ILogService)],s),e.ExtHostSCM=s}),define(De[73],Ce([1,0,5,4,3]),function(ne,e,i,D,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IExtHostSecretState=e.ExtHostSecretState=void 0;class N{constructor(A){this._onDidChangePassword=new D.Emitter,this.onDidChangePassword=this._onDidChangePassword.event,this._proxy=A.getProxy(i.MainContext.MainThreadSecretState)}async $onDidChangePassword(A){this._onDidChangePassword.fire(A)}get(A,_){return this._proxy.$getPassword(A,_)}store(A,_,T){return this._proxy.$setPassword(A,_,T)}delete(A,_){return this._proxy.$deletePassword(A,_)}}e.ExtHostSecretState=N,e.IExtHostSecretState=(0,S.createDecorator)("IExtHostSecretState")});var Je=this&&this.__classPrivateFieldSet||function(ne,e,i,D,S){if(D==="m")throw new TypeError("Private method is not writable");if(D==="a"&&!S)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?ne!==e||!S:!e.has(ne))throw new TypeError("Cannot write private member to an object whose class did not declare it");return D==="a"?S.call(ne,i):S?S.value=i:e.set(ne,i),i},Re=this&&this.__classPrivateFieldGet||function(ne,e,i,D){if(i==="a"&&!D)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?ne!==e||!D:!e.has(ne))throw new TypeError("Cannot read private member from an object whose class did not declare it");return i==="m"?D:i==="a"?D.call(ne):D?D.value:e.get(ne)};define(De[218],Ce([1,0,6,5,134,7,8,9]),function(ne,e,i,D,S,N,y,A){"use strict";var _,T;Object.defineProperty(e,"__esModule",{value:!0}),e.ExtHostStatusBar=e.ExtHostStatusBarEntry=void 0;class O{constructor(m,t,o,a,p=i.StatusBarAlignment.Left,w){_.set(this,void 0),T.set(this,void 0),this._disposed=!1,this._visible=!1,this._text="",this._internalCommandRegistration=new N.DisposableStore,Je(this,_,m,"f"),Je(this,T,t,"f"),this._entryId=O.ID_GEN++,this._extension=o,this._id=a,this._alignment=p,this._priority=this.validatePriority(w)}validatePriority(m){if(!!(0,A.isNumber)(m))return m===Number.POSITIVE_INFINITY?Number.MAX_VALUE:m===Number.NEGATIVE_INFINITY?-Number.MAX_VALUE:m}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(m){this._text=m,this.update()}set name(m){this._name=m,this.update()}set tooltip(m){this._tooltip=m,this.update()}set color(m){this._color=m,this.update()}set backgroundColor(m){m&&!O.ALLOWED_BACKGROUND_COLORS.has(m.id)&&(m=void 0),this._backgroundColor=m,this.update()}set command(m){this._command?.fromApi!==m&&(this._internalCommandRegistration.clear(),typeof m=="string"?this._command={fromApi:m,internal:Re(this,T,"f").toInternal({title:"",command:m},this._internalCommandRegistration)}:m?this._command={fromApi:m,internal:Re(this,T,"f").toInternal(m,this._internalCommandRegistration)}:this._command=void 0,this.update())}set accessibilityInformation(m){this._accessibilityInformation=m,this.update()}show(){this._visible=!0,this.update()}hide(){clearTimeout(this._timeoutHandle),this._visible=!1,Re(this,_,"f").$dispose(this._entryId)}update(){this._disposed||!this._visible||(clearTimeout(this._timeoutHandle),this._timeoutHandle=setTimeout(()=>{this._timeoutHandle=void 0;let m;this._extension?this._id?m=`${this._extension.identifier.value}.${this._id}`:m=this._extension.identifier.value:m=this._id;let t;this._name?t=this._name:t=(0,S.localize)(0,null,this._extension.displayName||this._extension.name);let o=this._color;this._backgroundColor&&(o=O.ALLOWED_BACKGROUND_COLORS.get(this._backgroundColor.id));const a=y.MarkdownString.fromStrict(this._tooltip);Re(this,_,"f").$setEntry(this._entryId,m,t,this._text,a,this._command?.internal,o,this._backgroundColor,this._alignment===i.StatusBarAlignment.Left,this._priority,this._accessibilityInformation)},0))}dispose(){this.hide(),this._disposed=!0}}e.ExtHostStatusBarEntry=O,_=new WeakMap,T=new WeakMap,O.ID_GEN=0,O.ALLOWED_BACKGROUND_COLORS=new Map([["statusBarItem.errorBackground",new i.ThemeColor("statusBarItem.errorForeground")],["statusBarItem.warningBackground",new i.ThemeColor("statusBarItem.warningForeground")]]);class b{constructor(m){this._messages=[],this._item=m.createStatusBarEntry(void 0,"status.extensionMessage",i.StatusBarAlignment.Left,Number.MIN_VALUE),this._item.name=(0,S.localize)(1,null)}dispose(){this._messages.length=0,this._item.dispose()}setMessage(m){const t={message:m};return this._messages.unshift(t),this._update(),new i.Disposable(()=>{const o=this._messages.indexOf(t);o>=0&&(this._messages.splice(o,1),this._update())})}_update(){this._messages.length>0?(this._item.text=this._messages[0].message,this._item.show()):this._item.hide()}}class g{constructor(m,t){this._proxy=m.getProxy(D.MainContext.MainThreadStatusBar),this._commands=t,this._statusMessage=new b(this)}createStatusBarEntry(m,t,o,a){return new O(this._proxy,this._commands,m,t,o,a)}setStatusBarMessage(m,t){const o=this._statusMessage.setMessage(m);let a;return typeof t=="number"?a=setTimeout(()=>o.dispose(),t):typeof t<"u"&&t.then(()=>o.dispose(),()=>o.dispose()),new i.Disposable(()=>{o.dispose(),clearTimeout(a)})}}e.ExtHostStatusBar=g}),define(De[74],Ce([1,0,5,4,3]),function(ne,e,i,D,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IExtHostStorage=e.ExtHostStorage=void 0;class N{constructor(A){this._onDidChangeStorage=new D.Emitter,this.onDidChangeStorage=this._onDidChangeStorage.event,this._proxy=A.getProxy(i.MainContext.MainThreadStorage)}registerExtensionStorageKeysToSync(A,_){this._proxy.$registerExtensionStorageKeysToSync(A,_)}initializeExtensionStorage(A,_,T){return this._proxy.$initializeExtensionStorage(A,_).then(O=>O||T)}setValue(A,_,T){return this._proxy.$setValue(A,_,T)}$acceptValue(A,_,T){this._onDidChangeStorage.fire({shared:A,key:_,value:T})}}e.ExtHostStorage=N,e.IExtHostStorage=(0,S.createDecorator)("IExtHostStorage")}),define(De[75],Ce([1,0,3,26,11,55,2]),function(ne,e,i,D,S,N,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtensionStoragePaths=e.IExtensionStoragePaths=void 0,e.IExtensionStoragePaths=(0,i.createDecorator)("IExtensionStoragePaths");let A=class{constructor(T,O,b){this._logService=O,this._extHostFileSystem=b,this._workspace=T.workspace??void 0,this._environment=T.environment,this.whenReady=this._getOrCreateWorkspaceStoragePath().then(g=>this._value=g)}async _getWorkspaceStorageURI(T){return y.URI.joinPath(this._environment.workspaceStorageHome,T)}async _getOrCreateWorkspaceStoragePath(){if(!this._workspace)return Promise.resolve(void 0);const T=this._workspace.id,O=await this._getWorkspaceStorageURI(T);try{return await this._extHostFileSystem.value.stat(O),this._logService.trace("[ExtHostStorage] storage dir already exists",O),O}catch{}try{return this._logService.trace("[ExtHostStorage] creating dir and metadata-file",O),await this._extHostFileSystem.value.createDirectory(O),await this._extHostFileSystem.value.writeFile(y.URI.joinPath(O,"meta.json"),new TextEncoder().encode(JSON.stringify({id:this._workspace.id,configuration:y.URI.revive(this._workspace.configuration)?.toString(),name:this._workspace.name},void 0,2))),O}catch(b){this._logService.error("[ExtHostStorage]",b);return}}workspaceValue(T){if(this._value)return y.URI.joinPath(this._value,T.identifier.value)}globalValue(T){return y.URI.joinPath(this._environment.globalStorageHome,T.identifier.value.toLowerCase())}onWillDeactivateAll(){}};A=He([We(0,D.IExtHostInitDataService),We(1,S.ILogService),We(2,N.IExtHostConsumerFileSystem)],A),e.ExtensionStoragePaths=A}),define(De[56],Ce([1,0,4,5,3,2,14,7,6,135,12,174,20,38,159,62,9,15,8]),function(ne,e,i,D,S,N,y,A,_,T,O,b,g,E,m,t,o,a,p){"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,S.createDecorator)("IExtHostTerminalService");class w{constructor(s,h,v,k){this._proxy=s,this._id=h,this._creationOptions=v,this._name=k,this._disposed=!1,this._state={isInteractedWith:!1},this.isOpen=!1,this._creationOptions=Object.freeze(this._creationOptions),this._pidPromise=new Promise(j=>this._pidPromiseComplete=j);const F=this;this.value={get name(){return F._name||""},get processId(){return F._pidPromise},get creationOptions(){return F._creationOptions},get exitStatus(){return F._exitStatus},get state(){return F._state},sendText(j,W=!0){F._checkDisposed(),F._proxy.$sendText(F._id,j,W)},show(j){F._checkDisposed(),F._proxy.$show(F._id,j)},hide(){F._checkDisposed(),F._proxy.$hide(F._id)},dispose(){F._disposed||(F._disposed=!0,F._proxy.$dispose(F._id))},get dimensions(){if(!(F._cols===void 0||F._rows===void 0))return{columns:F._cols,rows:F._rows}}}}async create(s,h){if(typeof this._id!="string")throw new Error("Terminal has already been created");await this._proxy.$createTerminal(this._id,{name:s.name,shellPath:(0,o.withNullAsUndefined)(s.shellPath),shellArgs:(0,o.withNullAsUndefined)(s.shellArgs),cwd:(0,o.withNullAsUndefined)(s.cwd),env:(0,o.withNullAsUndefined)(s.env),icon:(0,o.withNullAsUndefined)(d(s.iconPath)),color:t.ThemeColor.isThemeColor(s.color)?s.color.id:void 0,initialText:(0,o.withNullAsUndefined)(s.message),strictEnv:(0,o.withNullAsUndefined)(s.strictEnv),hideFromUser:(0,o.withNullAsUndefined)(s.hideFromUser),isFeatureTerminal:(0,o.withNullAsUndefined)(h?.isFeatureTerminal),isExtensionOwnedTerminal:!0,useShellEnvironment:(0,o.withNullAsUndefined)(h?.useShellEnvironment),location:h?.location||this._serializeParentTerminal(s.location,h?.resolvedExtHostIdentifier),isTransient:(0,o.withNullAsUndefined)(s.isTransient)})}async createExtensionTerminal(s,h,v,k){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:v,color:t.ThemeColor.isThemeColor(k)?k.id:void 0,location:this._serializeParentTerminal(s,h),isTransient:!0}),typeof this._id=="string")throw new Error("Terminal creation failed");return this._id}_serializeParentTerminal(s,h){return typeof s=="object"?"parentTerminal"in s&&s.parentTerminal&&h?{parentTerminal:h}:"viewColumn"in s?{viewColumn:p.ViewColumn.from(s.viewColumn),preserveFocus:s.preserveFocus}:void 0:s}_checkDisposed(){if(this._disposed)throw new Error("Terminal has already been disposed")}set name(s){this._name=s}setExitStatus(s,h){this._exitStatus=Object.freeze({code:s,reason:h})}setDimensions(s,h){return s===this._cols&&h===this._rows||s===0||h===0?!1:(this._cols=s,this._rows=h,!0)}setInteractedWith(){return this._state.isInteractedWith?!1:(this._state={isInteractedWith:!0},!0)}_setProcessId(s){this._pidPromiseComplete?(this._pidPromiseComplete(s),this._pidPromiseComplete=void 0):this._pidPromise.then(h=>{h!==s&&(this._pidPromise=Promise.resolve(s))})}}e.ExtHostTerminal=w;class u{get onProcessReady(){return this._onProcessReady.event}constructor(s){this._pty=s,this.id=0,this.shouldPersist=!1,this._onProcessData=new i.Emitter,this.onProcessData=this._onProcessData.event,this._onProcessReady=new i.Emitter,this._onDidChangeProperty=new i.Emitter,this.onDidChangeProperty=this._onDidChangeProperty.event,this._onProcessExit=new i.Emitter,this.onProcessExit=this._onProcessExit.event}refreshProperty(s){throw new Error(`refreshProperty is not suppported in extension owned terminals. property: ${s}`)}updateProperty(s,h){throw new Error(`updateProperty is not suppported in extension owned terminals. property: ${s}, value: ${h}`)}async start(){}shutdown(){this._pty.close()}input(s){this._pty.handleInput?.(s)}resize(s,h){this._pty.setDimensions?.({columns:s,rows:h})}async processBinary(s){}acknowledgeDataEvent(s){}async setUnicodeVersion(s){}getInitialCwd(){return Promise.resolve("")}getCwd(){return Promise.resolve("")}getLatency(){return Promise.resolve(0)}startSendingEvents(s){this._pty.onDidWrite(h=>this._onProcessData.fire(h)),this._pty.onDidClose?.((h=void 0)=>{this._onProcessExit.fire(h===void 0?void 0:h)}),this._pty.onDidOverrideDimensions?.(h=>{h&&this._onDidChangeProperty.fire({type:"overrideDimensions",value:{cols:h.columns,rows:h.rows}})}),this._pty.onDidChangeName?.(h=>{this._onDidChangeProperty.fire({type:"title",value:h})}),this._pty.open(s||void 0),s&&this._pty.setDimensions?.(s),this._onProcessReady.fire({pid:-1,cwd:""})}}e.ExtHostPseudoterminal=u;let I=1,r=class extends A.Disposable{get activeTerminal(){return this._activeTerminal?.value}get terminals(){return this._terminals.map(s=>s.value)}get onDidWriteTerminalData(){return this._onDidWriteTerminalData.event}constructor(s,h){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 i.Emitter,this.onDidCloseTerminal=this._onDidCloseTerminal.event,this._onDidOpenTerminal=new i.Emitter,this.onDidOpenTerminal=this._onDidOpenTerminal.event,this._onDidChangeActiveTerminal=new i.Emitter,this.onDidChangeActiveTerminal=this._onDidChangeActiveTerminal.event,this._onDidChangeTerminalDimensions=new i.Emitter,this.onDidChangeTerminalDimensions=this._onDidChangeTerminalDimensions.event,this._onDidChangeTerminalState=new i.Emitter,this.onDidChangeTerminalState=this._onDidChangeTerminalState.event,this._onDidChangeShell=new i.Emitter,this.onDidChangeShell=this._onDidChangeShell.event,this._proxy=h.getProxy(D.MainContext.MainThreadTerminalService),this._bufferer=new m.TerminalDataBufferer(this._proxy.$sendProcessData),this._onDidWriteTerminalData=new i.Emitter({onFirstListenerAdd:()=>this._proxy.$startSendingDataEvents(),onLastListenerRemove:()=>this._proxy.$stopSendingDataEvents()}),this._proxy.$registerProcessSupport(s),this._register({dispose:()=>{for(const[v,k]of this._terminalProcesses)k.shutdown(!0)}})}getDefaultShell(s){return(s?this._defaultAutomationProfile:this._defaultProfile)?.path||""}getDefaultShellArgs(s){return(s?this._defaultAutomationProfile:this._defaultProfile)?.args||[]}createExtensionTerminal(s,h){const v=new w(this._proxy,(0,E.generateUuid)(),s,s.name),k=new u(s.pty);return v.createExtensionTerminal(s.location,this._serializeParentTerminal(s,h).resolvedExtHostIdentifier,d(s.iconPath),l(s.color)).then(F=>{const j=this._setupExtHostProcessListeners(F,k);this._terminalProcessDisposables[F]=j}),this._terminals.push(v),v.value}_serializeParentTerminal(s,h){if(h=h||{},s.location&&typeof s.location=="object"&&"parentTerminal"in s.location){const v=s.location.parentTerminal;if(v){const k=this._terminals.find(F=>F.value===v);k&&(h.resolvedExtHostIdentifier=k._id)}}else s.location&&typeof s.location!="object"?h.location=s.location:h.location&&typeof h.location=="object"&&"splitActiveTerminal"in h.location&&(h.location={splitActiveTerminal:!0});return h}attachPtyToTerminal(s,h){if(!this._getTerminalById(s))throw new Error(`Cannot resolve terminal with id ${s} for virtual process`);const k=new u(h),F=this._setupExtHostProcessListeners(s,k);this._terminalProcessDisposables[s]=F}async $acceptActiveTerminalChanged(s){const h=this._activeTerminal;if(s===null){this._activeTerminal=void 0,h!==this._activeTerminal&&this._onDidChangeActiveTerminal.fire(this._activeTerminal);return}const v=this._getTerminalById(s);v&&(this._activeTerminal=v,h!==this._activeTerminal&&this._onDidChangeActiveTerminal.fire(this._activeTerminal.value))}async $acceptTerminalProcessData(s,h){const v=this._getTerminalById(s);v&&this._onDidWriteTerminalData.fire({terminal:v.value,data:h})}async $acceptTerminalDimensions(s,h,v){const k=this._getTerminalById(s);k&&k.setDimensions(h,v)&&this._onDidChangeTerminalDimensions.fire({terminal:k.value,dimensions:k.value.dimensions})}async $acceptTerminalMaximumDimensions(s,h,v){this._terminalProcesses.get(s)?.resize(h,v)}async $acceptTerminalTitleChange(s,h){const v=this._getTerminalById(s);v&&(v.name=h)}async $acceptTerminalClosed(s,h,v){const k=this._getTerminalObjectIndexById(this._terminals,s);if(k!==null){const F=this._terminals.splice(k,1)[0];F.setExitStatus(h,v),this._onDidCloseTerminal.fire(F.value)}}$acceptTerminalOpened(s,h,v,k){if(h){const W=this._getTerminalObjectIndexById(this._terminals,h);if(W!==null){this._terminals[W]._id=s,this._onDidOpenTerminal.fire(this.terminals[W]),this._terminals[W].isOpen=!0;return}}const F={name:k.name,shellPath:k.executable,shellArgs:k.args,cwd:typeof k.cwd=="string"?k.cwd:N.URI.revive(k.cwd),env:k.env,hideFromUser:k.hideFromUser},j=new w(this._proxy,s,F,v);this._terminals.push(j),this._onDidOpenTerminal.fire(j.value),j.isOpen=!0}async $acceptTerminalProcessId(s,h){this._getTerminalById(s)?._setProcessId(h)}async $startExtensionTerminal(s,h){const v=this._getTerminalById(s);if(!v)return{message:(0,T.localize)(0,null,s)};v.isOpen||await new Promise(F=>{const j=this.onDidOpenTerminal(async W=>{W===v.value&&(j.dispose(),F())})});const k=this._terminalProcesses.get(s);k?k.startSendingEvents(h):this._extensionTerminalAwaitingStart[s]={initialDimensions:h}}_setupExtHostProcessListeners(s,h){const v=new A.DisposableStore;v.add(h.onProcessReady(F=>this._proxy.$sendProcessReady(s,F.pid,F.cwd))),v.add(h.onDidChangeProperty(F=>this._proxy.$sendProcessProperty(s,F))),this._bufferer.startBuffering(s,h.onProcessData),v.add(h.onProcessExit(F=>this._onProcessExit(s,F))),this._terminalProcesses.set(s,h);const k=this._extensionTerminalAwaitingStart[s];return k&&h instanceof u&&(h.startSendingEvents(k.initialDimensions),delete this._extensionTerminalAwaitingStart[s]),v}$acceptProcessAckDataEvent(s,h){this._terminalProcesses.get(s)?.acknowledgeDataEvent(h)}$acceptProcessInput(s,h){this._terminalProcesses.get(s)?.input(h)}$acceptTerminalInteraction(s){const h=this._getTerminalById(s);h?.setInteractedWith()&&this._onDidChangeTerminalState.fire(h.value)}$acceptProcessResize(s,h,v){try{this._terminalProcesses.get(s)?.resize(h,v)}catch(k){if(k.code!=="EPIPE"&&k.code!=="ERR_IPC_CHANNEL_CLOSED")throw k}}$acceptProcessShutdown(s,h){this._terminalProcesses.get(s)?.shutdown(h)}$acceptProcessRequestInitialCwd(s){this._terminalProcesses.get(s)?.getInitialCwd().then(h=>this._proxy.$sendProcessProperty(s,{type:"initialCwd",value:h}))}$acceptProcessRequestCwd(s){this._terminalProcesses.get(s)?.getCwd().then(h=>this._proxy.$sendProcessProperty(s,{type:"cwd",value:h}))}$acceptProcessRequestLatency(s){return Promise.resolve(s)}registerLinkProvider(s){return this._linkProviders.add(s),this._linkProviders.size===1&&this._proxy.$startLinkProvider(),new _.Disposable(()=>{this._linkProviders.delete(s),this._linkProviders.size===0&&this._proxy.$stopLinkProvider()})}registerProfileProvider(s,h,v){if(this._profileProviders.has(h))throw new Error(`Terminal profile provider "${h}" already registered`);return this._profileProviders.set(h,v),this._proxy.$registerProfileProvider(h,s.identifier.value),new _.Disposable(()=>{this._profileProviders.delete(h),this._proxy.$unregisterProfileProvider(h)})}async $createContributedProfileTerminal(s,h){const v=new g.CancellationTokenSource().token;let k=await this._profileProviders.get(s)?.provideTerminalProfile(v);if(!v.isCancellationRequested){if(k&&!("options"in k)&&(k={options:k}),!k||!("options"in k))throw new Error(`No terminal profile options provided for id "${s}"`);if("pty"in k.options){this.createExtensionTerminal(k.options,h);return}this.createTerminalFromOptions(k.options,h)}}async $provideLinks(s,h){const v=this._getTerminalById(s);if(!v)return[];this._terminalLinkCache.delete(s),this._terminalLinkCancellationSource.get(s)?.dispose(!0);const F=new g.CancellationTokenSource;this._terminalLinkCancellationSource.set(s,F);const j=[],W={terminal:v.value,line:h},H=[];for(const R of this._linkProviders)H.push(a.Promises.withAsyncBody(async B=>{F.token.onCancellationRequested(()=>B({provider:R,links:[]}));const $=await R.provideTerminalLinks(W,F.token)||[];F.token.isCancellationRequested||B({provider:R,links:$})}));const P=await Promise.all(H);if(F.token.isCancellationRequested)return[];const M=new Map;for(const R of P)R&&R.links.length>0&&j.push(...R.links.map(B=>{const $={id:I++,startIndex:B.startIndex,length:B.length,label:B.tooltip};return M.set($.id,{provider:R.provider,link:B}),$}));return this._terminalLinkCache.set(s,M),j}$activateLink(s,h){const v=this._terminalLinkCache.get(s)?.get(h);!v||v.provider.handleTerminalLink(v.link)}_onProcessExit(s,h){this._bufferer.stopBuffering(s),this._terminalProcesses.delete(s),delete this._extensionTerminalAwaitingStart[s];const v=this._terminalProcessDisposables[s];v&&(v.dispose(),delete this._terminalProcessDisposables[s]),this._proxy.$sendProcessExit(s,h)}_getTerminalById(s){return this._getTerminalObjectById(this._terminals,s)}_getTerminalObjectById(s,h){const v=this._getTerminalObjectIndexById(s,h);return v!==null?s[v]:null}_getTerminalObjectIndexById(s,h){let v=null;return s.some((k,F)=>k._id===h?(v=F,!0):!1),v}getEnvironmentVariableCollection(s){let h=this._environmentVariableCollections.get(s.identifier.value);return h||(h=new c,this._setEnvironmentVariableCollection(s.identifier.value,h)),h}_syncEnvironmentVariableCollection(s,h){const v=(0,b.serializeEnvironmentVariableCollection)(h.map);this._proxy.$setEnvironmentVariableCollection(s,h.persistent,v.length===0?void 0:v)}$initEnvironmentVariableCollections(s){s.forEach(h=>{const v=h[0],k=new c(h[1]);this._setEnvironmentVariableCollection(v,k)})}$acceptDefaultProfile(s,h){const v=this._defaultProfile;this._defaultProfile=s,this._defaultAutomationProfile=h,v?.path!==s.path&&this._onDidChangeShell.fire(s.path)}_setEnvironmentVariableCollection(s,h){this._environmentVariableCollections.set(s,h),h.onDidChangeCollection(()=>{this._syncEnvironmentVariableCollection(s,h)})}};r=He([We(1,y.IExtHostRpcService)],r),e.BaseExtHostTerminalService=r;class c{get persistent(){return this._persistent}set persistent(s){this._persistent=s,this._onDidChangeCollection.fire()}get onDidChangeCollection(){return this._onDidChangeCollection&&this._onDidChangeCollection.event}constructor(s){this.map=new Map,this._persistent=!0,this._onDidChangeCollection=new i.Emitter,this.map=new Map(s)}get size(){return this.map.size}replace(s,h){this._setIfDiffers(s,{value:h,type:_.EnvironmentVariableMutatorType.Replace})}append(s,h){this._setIfDiffers(s,{value:h,type:_.EnvironmentVariableMutatorType.Append})}prepend(s,h){this._setIfDiffers(s,{value:h,type:_.EnvironmentVariableMutatorType.Prepend})}_setIfDiffers(s,h){const v=this.map.get(s);(!v||v.value!==h.value||v.type!==h.type)&&(this.map.set(s,h),this._onDidChangeCollection.fire())}get(s){return this.map.get(s)}forEach(s,h){this.map.forEach((v,k)=>s.call(h,k,v,this))}[Symbol.iterator](){return this.map.entries()}delete(s){this.map.delete(s),this._onDidChangeCollection.fire()}clear(){this.map.clear(),this._onDidChangeCollection.fire()}}e.EnvironmentVariableCollection=c;let n=class extends r{constructor(s){super(!1,s)}createTerminal(s,h,v){throw new O.NotSupportedError}createTerminalFromOptions(s,h){throw new O.NotSupportedError}};n=He([We(0,y.IExtHostRpcService)],n),e.WorkerExtHostTerminalService=n;function d(f){if(!(!f||typeof f=="string"))return"id"in f?{id:f.id,color:f.color}:f}function l(f){return t.ThemeColor.isThemeColor(f)?f:void 0}});var Re=this&&this.__classPrivateFieldGet||function(ne,e,i,D){if(i==="a"&&!D)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?ne!==e||!D:!e.has(ne))throw new TypeError("Cannot read private member from an object whose class did not declare it");return i==="m"?D:i==="a"?D.call(ne):D?D.value:e.get(ne)},Je=this&&this.__classPrivateFieldSet||function(ne,e,i,D,S){if(D==="m")throw new TypeError("Private method is not writable");if(D==="a"&&!S)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?ne!==e||!S:!e.has(ne))throw new TypeError("Cannot write private member to an object whose class did not declare it");return D==="a"?S.call(ne,i):S?S.value=i:e.set(ne,i),i};define(De[219],Ce([1,0,18,24,20,4,183,220,7,23,9,38,5,14,96,8,6,42,67,51]),function(ne,e,i,D,S,N,y,A,_,T,O,b,g,E,m,t,o,a,p,w){"use strict";var u,I;Object.defineProperty(e,"__esModule",{value:!0}),e.TestRunProfileImpl=e.MirroredTestCollection=e.TestRunDto=e.TestRunCoordinator=e.ExtHostTesting=void 0;let r=class{constructor(W,H,P){this.editors=P,this.resultsChangedEmitter=new N.Emitter,this.controllers=new Map,this.onResultsChanged=this.resultsChangedEmitter.event,this.results=[],this.proxy=W.getProxy(g.MainContext.MainThreadTesting),this.observer=new v(this.proxy),this.runTracker=new n(this.proxy),H.registerArgumentProcessor({processArgument:M=>{if(M?.$mid!==14)return M;const R=M,B=R.tests[R.tests.length-1].item.extId;return this.controllers.get(a.TestId.root(B))?.collection.tree.get(B)?.actual??(0,m.toItemFromContext)(M)}})}createTestController(W,H,P){if(this.controllers.has(W))throw new Error(`Attempt to insert a duplicate controller with ID "${W}"`);const M=new _.DisposableStore,R=M.add(new m.ExtHostTestItemCollection(W,H,this.editors));R.root.label=H;const B=new Map,$=this.proxy,U={items:R.root.children,get label(){return H},set label(te){H=te,R.root.label=te,$.$updateController(W,{label:H})},get refreshHandler(){return P},set refreshHandler(te){P=te,$.$updateController(W,{canRefresh:!!te})},get id(){return W},createRunProfile:(te,de,re,be,le)=>{let fe=(0,A.hash)(te);for(;B.has(fe);)fe++;return new k(this.proxy,B,W,fe,te,de,re,be,le)},createTestItem(te,de,re){return new m.TestItemImpl(W,te,de,re)},createTestRun:(te,de,re=!0)=>this.runTracker.createTestRun(W,R,te,de,re),set resolveHandler(te){R.resolveHandler=te},get resolveHandler(){return R.resolveHandler},dispose:()=>{M.dispose()}};$.$registerTestController(W,H,!!P),M.add((0,_.toDisposable)(()=>$.$unregisterTestController(W)));const K={controller:U,collection:R,profiles:B};return this.controllers.set(W,K),M.add((0,_.toDisposable)(()=>this.controllers.delete(W))),M.add(R.onDidGenerateDiff(te=>$.$publishDiff(W,te.map(w.TestsDiffOp.serialize)))),U}createTestObserver(){return this.observer.checkout()}async runTests(W,H=S.CancellationToken.None){const P=d(W);if(!P)throw new Error("The request passed to `vscode.test.runTests` must include a profile");const M=this.controllers.get(P.controllerId);if(!M)throw new Error("Controller not found");await this.proxy.$runTests({isUiTriggered:!1,targets:[{testIds:W.include?.map(R=>a.TestId.fromExtHostTestItem(R,M.collection.root.id).toString())??[M.collection.root.id],profileGroup:F[P.kind],profileId:P.profileId,controllerId:P.controllerId}],exclude:W.exclude?.map(R=>R.id)},H)}$syncTests(){for(const{collection:W}of this.controllers.values())W.flushDiff();return Promise.resolve()}$provideFileCoverage(W,H,P){return(0,i.mapFind)(this.runTracker.trackers,R=>R.id===W?R.getCoverage(H):void 0)?.provideFileCoverage(P)??Promise.resolve([])}$resolveFileCoverage(W,H,P,M){return(0,i.mapFind)(this.runTracker.trackers,B=>B.id===W?B.getCoverage(H):void 0)?.resolveFileCoverage(P,M)??Promise.resolve([])}$configureRunProfile(W,H){this.controllers.get(W)?.profiles.get(H)?.configureHandler?.()}async $refreshTests(W,H){await this.controllers.get(W)?.controller.refreshHandler?.(H)}$publishTestResults(W){this.results=Object.freeze(W.map(H=>(0,T.deepFreeze)(t.TestResults.to(H))).concat(this.results).sort((H,P)=>P.completedAt-H.completedAt).slice(0,32)),this.resultsChangedEmitter.fire()}async $expandTest(W,H){const P=this.controllers.get(a.TestId.fromString(W).controllerId)?.collection;P&&(await P.expand(W,H<0?1/0:H),P.flushDiff())}$acceptDiff(W){this.observer.applyDiff(W.map(w.TestsDiffOp.deserialize))}async $runControllerTests(W,H){return Promise.all(W.map(P=>this.runControllerTestRequest(P,H)))}async runControllerTestRequest(W,H){const P=this.controllers.get(W.controllerId);if(!P)return{};const{collection:M,profiles:R}=P,B=R.get(W.profileId);if(!B)return{};const $=W.testIds.map(de=>M.tree.get(de)).filter(O.isDefined),U=W.excludeExtIds.map(de=>P.collection.tree.get(de)).filter(O.isDefined).filter(de=>$.some(re=>re.fullId.compare(de.fullId)===2));if(!$.length)return{};const K=new o.TestRunRequest($.some(de=>de.actual instanceof m.TestItemRootImpl)?void 0:$.map(de=>de.actual),U.map(de=>de.actual),B),te=this.runTracker.prepareForMainThreadTestRun(K,l.fromInternal(W,P.collection),H);try{return await B.runHandler(K,H),{}}catch(de){return{error:String(de)}}finally{te.isRunning&&!H.isCancellationRequested&&await N.Event.toPromise(te.onEnd),te.dispose()}}$cancelExtensionTestRun(W){W===void 0?this.runTracker.cancelAllRuns():this.runTracker.cancelRunById(W)}};r=He([We(0,E.IExtHostRpcService)],r),e.ExtHostTesting=r;class c extends _.Disposable{get isRunning(){return this.tasks.size>0}get id(){return this.dto.id}constructor(W,H,P){super(),this.dto=W,this.proxy=H,this.tasks=new Map,this.sharedTestIds=new Set,this.endEmitter=this._register(new N.Emitter),this.disposed=!1,this.onEnd=this.endEmitter.event,this.cts=this._register(new S.CancellationTokenSource(P)),this._register(this.cts.token.onCancellationRequested(()=>{for(const{run:M}of this.tasks.values())M.end()}))}getCoverage(W){return this.tasks.get(W)?.coverage}createRun(W){const H=this.dto.id,P=this.dto.controllerId,M=(0,b.generateUuid)(),R=new f(this.proxy,H,M),B=te=>(de,...re)=>{if(U){console.warn(`Setting the state of test "${de.id}" is a no-op after the run ends.`);return}!this.dto.isIncluded(de)||(this.ensureTestIsKnown(de),te(de,...re))},$=(te,de)=>{const re=de instanceof Array?de.map(t.TestMessage.from):[t.TestMessage.from(de)];if(te.uri&&te.range){const be={range:t.Range.from(te.range),uri:te.uri};for(const le of re)le.location=le.location||be}this.proxy.$appendTestMessagesInRun(H,M,a.TestId.fromExtHostTestItem(te,P).toString(),re)};let U=!1;const K={isPersisted:this.dto.isPersisted,token:this.cts.token,name:W,get coverageProvider(){return R.coverageProvider},set coverageProvider(te){R.coverageProvider=te},enqueued:B(te=>{this.proxy.$updateTestStateInRun(H,M,a.TestId.fromExtHostTestItem(te,P).toString(),1)}),skipped:B(te=>{this.proxy.$updateTestStateInRun(H,M,a.TestId.fromExtHostTestItem(te,P).toString(),5)}),started:B(te=>{this.proxy.$updateTestStateInRun(H,M,a.TestId.fromExtHostTestItem(te,P).toString(),2)}),errored:B((te,de,re)=>{$(te,de),this.proxy.$updateTestStateInRun(H,M,a.TestId.fromExtHostTestItem(te,P).toString(),6,re)}),failed:B((te,de,re)=>{$(te,de),this.proxy.$updateTestStateInRun(H,M,a.TestId.fromExtHostTestItem(te,P).toString(),4,re)}),passed:B((te,de)=>{this.proxy.$updateTestStateInRun(H,M,a.TestId.fromExtHostTestItem(te,this.dto.controllerId).toString(),3,de)}),appendOutput:(te,de,re)=>{U||(re&&(this.dto.isIncluded(re)?this.ensureTestIsKnown(re):re=void 0),this.proxy.$appendOutputToRun(H,M,D.VSBuffer.fromString(te),de&&t.location.from(de),re&&a.TestId.fromExtHostTestItem(re,P).toString()))},end:()=>{U||(U=!0,this.proxy.$finishedTestRunTask(H,M),this.tasks.delete(M),this.isRunning||this.dispose())}};return this.tasks.set(M,{run:K,coverage:R}),this.proxy.$startedTestRunTask(H,{id:M,name:W,running:!0}),K}dispose(){this.disposed||(this.disposed=!0,this.endEmitter.fire(),this.cts.cancel(),super.dispose())}ensureTestIsKnown(W){if(!(W instanceof m.TestItemImpl))throw new p.InvalidTestItemError(W.id);if(this.sharedTestIds.has(a.TestId.fromExtHostTestItem(W,this.dto.controllerId).toString()))return;const H=[],P=this.dto.colllection.root;for(;;){const M=t.TestItem.from(W);if(H.unshift(M),this.sharedTestIds.has(M.extId)||(this.sharedTestIds.add(M.extId),W===P))break;W=W.parent||P}this.proxy.$addTestsToRun(this.dto.controllerId,this.dto.id,H)}}class n{get trackers(){return this.tracked.values()}constructor(W){this.proxy=W,this.tracked=new Map}prepareForMainThreadTestRun(W,H,P){return this.getTracker(W,H,P)}cancelRunById(W){for(const H of this.tracked.values())if(H.id===W){H.dispose();return}}cancelAllRuns(){for(const W of this.tracked.values())W.dispose()}createTestRun(W,H,P,M,R){const B=this.tracked.get(P);if(B)return B.createRun(M);const $=l.fromPublic(W,H,P,R),U=d(P);this.proxy.$startedExtensionTestRun({controllerId:W,profile:U&&{group:F[U.kind],id:U.profileId},exclude:P.exclude?.map(te=>a.TestId.fromExtHostTestItem(te,H.root.id).toString())??[],id:$.id,include:P.include?.map(te=>a.TestId.fromExtHostTestItem(te,H.root.id).toString())??[H.root.id],persist:R});const K=this.getTracker(P,$);return K.onEnd(()=>this.proxy.$finishedExtensionTestRun($.id)),K.createRun(M)}getTracker(W,H,P){const M=new c(H,this.proxy,P);return this.tracked.set(W,M),M.onEnd(()=>this.tracked.delete(W)),M}}e.TestRunCoordinator=n;const d=j=>{if(!!j.profile){if(!(j.profile instanceof k))throw new Error("TestRunRequest.profile is not an instance created from TestController.createRunProfile");return j.profile}};class l{static fromPublic(W,H,P,M){return new l(W,(0,b.generateUuid)(),P.include?.map(R=>a.TestId.fromExtHostTestItem(R,W).toString())??[W],P.exclude?.map(R=>a.TestId.fromExtHostTestItem(R,W).toString())??[],M,H)}static fromInternal(W,H){return new l(W.controllerId,W.runId,W.testIds,W.excludeExtIds,!0,H)}constructor(W,H,P,M,R,B){this.controllerId=W,this.id=H,this.isPersisted=R,this.colllection=B,this.includePrefix=P.map($=>$+"\0"),this.excludePrefix=M.map($=>$+"\0")}isIncluded(W){const H=a.TestId.fromExtHostTestItem(W,this.controllerId).toString()+"\0";for(const P of this.excludePrefix)if(H===P||H.startsWith(P))return!1;for(const P of this.includePrefix)if(H===P||H.startsWith(P))return!0;return!1}}e.TestRunDto=l;class f{set coverageProvider(W){if(this._coverageProvider)throw new Error("The TestCoverageProvider cannot be replaced after being provided");!W||(this._coverageProvider=W,this.proxy.$signalCoverageAvailable(this.runId,this.taskId))}get coverageProvider(){return this._coverageProvider}constructor(W,H,P){this.proxy=W,this.runId=H,this.taskId=P}async provideFileCoverage(W){if(!this._coverageProvider)return[];this.fileCoverage||(this.fileCoverage=(async()=>this._coverageProvider.provideFileCoverage(W))());try{return(await this.fileCoverage)?.map(t.TestCoverage.fromFile)??[]}catch(H){throw this.fileCoverage=void 0,H}}async resolveFileCoverage(W,H){const P=await this.fileCoverage;let M=P?.[W];return!this._coverageProvider||!P||!M?[]:(M.detailedCoverage||(M=P[W]=await this._coverageProvider.resolveFileCoverage?.(M,H)??M),M.detailedCoverage?.map(t.TestCoverage.fromDetailed)??[])}}class s extends w.IncrementalChangeCollector{get isEmpty(){return this.added.size===0&&this.removed.size===0&&this.updated.size===0}constructor(W){super(),this.emitter=W,this.added=new Set,this.updated=new Set,this.removed=new Set,this.alreadyRemoved=new Set}add(W){this.added.add(W)}update(W){Object.assign(W.revived,t.TestItem.toPlain(W.item)),this.added.has(W)||this.updated.add(W)}remove(W){if(this.added.has(W)){this.added.delete(W);return}this.updated.delete(W);const H=a.TestId.parentId(W.item.extId);if(H&&this.alreadyRemoved.has(H.toString())){this.alreadyRemoved.add(W.item.extId);return}this.removed.add(W)}getChangeEvent(){const{added:W,updated:H,removed:P}=this;return{get added(){return[...W].map(M=>M.revived)},get updated(){return[...H].map(M=>M.revived)},get removed(){return[...P].map(M=>M.revived)}}}complete(){this.isEmpty||this.emitter.fire(this.getChangeEvent())}}class h extends w.AbstractIncrementalTestCollection{constructor(){super(...arguments),this.changeEmitter=new N.Emitter,this.onDidChangeTests=this.changeEmitter.event}get rootTests(){return super.roots}getMirroredTestDataById(W){return this.items.get(W)}getMirroredTestDataByReference(W){return this.items.get(W.id)}createItem(W,H){return{...W,revived:t.TestItem.toPlain(W.item),depth:H?H.depth+1:0,children:new Set}}createChangeCollector(){return new s(this.changeEmitter)}}e.MirroredTestCollection=h;class v{constructor(W){this.proxy=W}checkout(){this.current||(this.current=this.createObserverData());const W=this.current;return W.observers++,{onDidChangeTest:W.tests.onDidChangeTests,get tests(){return[...W.tests.rootTests].map(H=>H.revived)},dispose:(0,y.once)(()=>{--W.observers===0&&(this.proxy.$unsubscribeFromDiffs(),this.current=void 0)})}}getMirroredTestDataByReference(W){return this.current?.tests.getMirroredTestDataByReference(W)}applyDiff(W){this.current?.tests.apply(W)}createObserverData(){const W=new h;return this.proxy.$subscribeToDiffs(),{observers:0,tests:W}}}class k{get label(){return this._label}set label(W){W!==this._label&&(this._label=W,Re(this,u,"f").$updateTestRunConfig(this.controllerId,this.profileId,{label:W}))}get isDefault(){return this._isDefault}set isDefault(W){W!==this._isDefault&&(this._isDefault=W,Re(this,u,"f").$updateTestRunConfig(this.controllerId,this.profileId,{isDefault:W}))}get tag(){return this._tag}set tag(W){W?.id!==this._tag?.id&&(this._tag=W,Re(this,u,"f").$updateTestRunConfig(this.controllerId,this.profileId,{tag:W?t.TestTag.namespace(this.controllerId,W.id):null}))}get configureHandler(){return this._configureHandler}set configureHandler(W){W!==this._configureHandler&&(this._configureHandler=W,Re(this,u,"f").$updateTestRunConfig(this.controllerId,this.profileId,{hasConfigurationHandler:!!W}))}constructor(W,H,P,M,R,B,$,U=!1,K=void 0){this.controllerId=P,this.profileId=M,this._label=R,this.kind=B,this.runHandler=$,this._isDefault=U,this._tag=K,u.set(this,void 0),I.set(this,void 0),Je(this,u,W,"f"),Je(this,I,H,"f"),H.set(M,this);const te=F[B];if(typeof te!="number")throw new Error(`Unknown TestRunProfile.group ${B}`);Re(this,u,"f").$publishTestRunProfile({profileId:M,controllerId:P,tag:K?t.TestTag.namespace(this.controllerId,K.id):null,label:R,group:te,isDefault:U,hasConfigurationHandler:!1})}dispose(){Re(this,I,"f")?.delete(this.profileId)&&(Je(this,I,void 0,"f"),Re(this,u,"f").$removeTestProfile(this.controllerId,this.profileId))}}e.TestRunProfileImpl=k,u=new WeakMap,I=new WeakMap;const F={[o.TestRunProfileKind.Coverage]:8,[o.TestRunProfileKind.Debug]:4,[o.TestRunProfileKind.Run]:2}}),define(De[221],Ce([1,0,18,4,5,97,8,6]),function(ne,e,i,D,S,N,y,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtHostEditors=void 0;class _{constructor(O,b){this._extHostDocumentsAndEditors=b,this._onDidChangeTextEditorSelection=new D.Emitter,this._onDidChangeTextEditorOptions=new D.Emitter,this._onDidChangeTextEditorVisibleRanges=new D.Emitter,this._onDidChangeTextEditorViewColumn=new D.Emitter,this._onDidChangeActiveTextEditor=new D.Emitter,this._onDidChangeVisibleTextEditors=new D.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=O.getProxy(S.MainContext.MainThreadTextEditors),this._extHostDocumentsAndEditors.onDidChangeVisibleTextEditors(g=>this._onDidChangeVisibleTextEditors.fire(g)),this._extHostDocumentsAndEditors.onDidChangeActiveTextEditor(g=>this._onDidChangeActiveTextEditor.fire(g))}getActiveTextEditor(){return this._extHostDocumentsAndEditors.activeEditor()}getVisibleTextEditors(O){const b=this._extHostDocumentsAndEditors.allEditors();return O?b:b.map(g=>g.value)}async showTextDocument(O,b,g){let E;typeof b=="number"?E={position:y.ViewColumn.from(b),preserveFocus:g}:typeof b=="object"?E={position:y.ViewColumn.from(b.viewColumn),preserveFocus:b.preserveFocus,selection:typeof b.selection=="object"?y.Range.from(b.selection):void 0,pinned:typeof b.preview=="boolean"?!b.preview:void 0}:E={preserveFocus:!1};const m=await this._proxy.$tryShowTextDocument(O.uri,E),t=m&&this._extHostDocumentsAndEditors.getEditor(m);if(t)return t.value;throw m?new Error(`Could NOT open editor for "${O.uri.toString()}" because another editor opened in the meantime.`):new Error(`Could NOT open editor for "${O.uri.toString()}".`)}createTextEditorDecorationType(O,b){return new N.TextEditorDecorationType(this._proxy,O,b).value}$acceptEditorPropertiesChanged(O,b){const g=this._extHostDocumentsAndEditors.getEditor(O);if(!g)throw new Error("unknown text editor");if(b.options&&g._acceptOptions(b.options),b.selections){const E=b.selections.selections.map(y.Selection.to);g._acceptSelections(E)}if(b.visibleRanges){const E=i.coalesce(b.visibleRanges.map(y.Range.to));g._acceptVisibleRanges(E)}if(b.options&&this._onDidChangeTextEditorOptions.fire({textEditor:g.value,options:{...b.options,lineNumbers:y.TextEditorLineNumbersStyle.to(b.options.lineNumbers)}}),b.selections){const E=A.TextEditorSelectionChangeKind.fromValue(b.selections.source),m=b.selections.selections.map(y.Selection.to);this._onDidChangeTextEditorSelection.fire({textEditor:g.value,selections:m,kind:E})}if(b.visibleRanges){const E=i.coalesce(b.visibleRanges.map(y.Range.to));this._onDidChangeTextEditorVisibleRanges.fire({textEditor:g.value,visibleRanges:E})}}$acceptEditorPositionData(O){for(const b in O){const g=this._extHostDocumentsAndEditors.getEditor(b);if(!g)throw new Error("Unknown text editor");const E=y.ViewColumn.to(O[b]);g.value.viewColumn!==E&&(g._acceptViewColumn(E),this._onDidChangeTextEditorViewColumn.fire({textEditor:g.value,viewColumn:E}))}}getDiffInformation(O){return Promise.resolve(this._proxy.$getDiffInformation(O))}}e.ExtHostEditors=_}),define(De[222],Ce([1,0,2,3,5,7,6,8,9]),function(ne,e,i,D,S,N,y,A,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtHostTimeline=e.IExtHostTimeline=void 0,e.IExtHostTimeline=(0,D.createDecorator)("IExtHostTimeline");class T{constructor(g,E){this._providers=new Map,this._itemsBySourceAndUriMap=new Map,this._proxy=g.getProxy(S.MainContext.MainThreadTimeline),E.registerArgumentProcessor({processArgument:m=>{if(m&&m.$mid===11){const t=m.uri===void 0?void 0:i.URI.revive(m.uri);return this._itemsBySourceAndUriMap.get(m.source)?.get(O(t))?.get(m.handle)}return m}})}async $getTimeline(g,E,m,t){return this._providers.get(g)?.provideTimeline(i.URI.revive(E),m,t)}registerTimelineProvider(g,E,m,t){const o=new N.DisposableStore,a=this.convertTimelineItem(E.id,t,o).bind(this);let p;E.onDidChange&&(p=E.onDidChange(u=>this._proxy.$emitTimelineChangeEvent({uri:void 0,reset:!0,...u,id:E.id}),this));const w=this._itemsBySourceAndUriMap;return this.registerTimelineProviderCore({...E,scheme:g,onDidChange:void 0,async provideTimeline(u,I,r){I?.resetCache&&(o.clear(),w.get(E.id)?.clear());const c=await E.provideTimeline(u,I,r);if(c==null)return;const n=a(u,I);return{...c,source:E.id,items:c.items.map(n)}},dispose(){for(const u of w.values())u.get(E.id)?.clear();p?.dispose(),o.dispose()}})}convertTimelineItem(g,E,m){return(t,o)=>{let a;if(o?.cacheResults){let p=this._itemsBySourceAndUriMap.get(g);p===void 0&&(p=new Map,this._itemsBySourceAndUriMap.set(g,p));const w=O(t);a=p.get(w),a===void 0&&(a=new Map,p.set(w,a))}return p=>{const{iconPath:w,...u}=p,I=`${g}|${p.id??p.timestamp}`;a?.set(I,p);let r,c,n;p.iconPath&&(w instanceof y.ThemeIcon?n={id:w.id,color:w.color}:i.URI.isUri(w)?(r=w,c=w):{light:r,dark:c}=w);let d;return y.MarkdownString.isMarkdownString(u.tooltip)?d=A.MarkdownString.from(u.tooltip):(0,_.isString)(u.tooltip)?d=u.tooltip:y.MarkdownString.isMarkdownString(u.detail)?(console.warn("Using deprecated TimelineItem.detail, migrate to TimelineItem.tooltip"),d=A.MarkdownString.from(u.detail)):(0,_.isString)(u.detail)&&(console.warn("Using deprecated TimelineItem.detail, migrate to TimelineItem.tooltip"),d=u.detail),{...u,id:u.id??void 0,handle:I,source:g,command:p.command?E.toInternal(p.command,m):void 0,icon:r,iconDark:c,themeIcon:n,tooltip:d,accessibilityInformation:p.accessibilityInformation}}}}registerTimelineProviderCore(g){if(this._providers.get(g.id))throw new Error(`Timeline Provider ${g.id} already exists.`);return this._proxy.$registerTimelineProvider({id:g.id,label:g.label,scheme:g.scheme}),this._providers.set(g.id,g),(0,N.toDisposable)(()=>{for(const m of this._itemsBySourceAndUriMap.values())m.get(g.id)?.clear();this._providers.delete(g.id),this._proxy.$unregisterTimelineProvider(g.id),g.dispose()})}}e.ExtHostTimeline=T;function O(b){return b?.toString()}}),define(De[223],Ce([1,0,7,13,2,5]),function(ne,e,i,D,S,N){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtHostUriOpeners=void 0;class y{constructor(_){this._openers=new Map,this._proxy=_.getProxy(N.MainContext.MainThreadUriOpeners)}registerExternalUriOpener(_,T,O,b){if(this._openers.has(T))throw new Error(`Opener with id '${T}' already registered`);const g=b.schemes.find(E=>!y.supportedSchemes.has(E));if(g)throw new Error(`Scheme '${g}' is not supported. Only http and https are currently supported.`);return this._openers.set(T,O),this._proxy.$registerUriOpener(T,b.schemes,_,b.label),(0,i.toDisposable)(()=>{this._openers.delete(T),this._proxy.$unregisterUriOpener(T)})}async $canOpenUri(_,T,O){const b=this._openers.get(_);if(!b)throw new Error(`Unknown opener with id: ${_}`);const g=S.URI.revive(T);return b.canOpenExternalUri(g,O)}async $openUri(_,T,O){const b=this._openers.get(_);if(!b)throw new Error(`Unknown opener id: '${_}'`);return b.openExternalUri(S.URI.revive(T.resolvedUri),{sourceUri:S.URI.revive(T.sourceUri)},O)}}e.ExtHostUriOpeners=y,y.supportedSchemes=new Set([D.Schemas.http,D.Schemas.https])}),define(De[224],Ce([1,0,5,2,7,12,25]),function(ne,e,i,D,S,N,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtHostUrls=void 0;class A{constructor(T){this.handles=new Set,this.handlers=new Map,this._proxy=T.getProxy(i.MainContext.MainThreadUrls)}registerUriHandler(T,O){if(this.handles.has(y.ExtensionIdentifier.toKey(T)))throw new Error(`Protocol handler already registered for extension ${T}`);const b=A.HandlePool++;return this.handles.add(y.ExtensionIdentifier.toKey(T)),this.handlers.set(b,O),this._proxy.$registerUriHandler(b,T),(0,S.toDisposable)(()=>{this.handles.delete(y.ExtensionIdentifier.toKey(T)),this.handlers.delete(b),this._proxy.$unregisterUriHandler(b)})}$handleExternalUri(T,O){const b=this.handlers.get(T);if(!b)return Promise.resolve(void 0);try{b.handleUri(D.URI.revive(O))}catch(g){(0,N.onUnexpectedError)(g)}return Promise.resolve(void 0)}async createAppUri(T){return D.URI.revive(await this._proxy.$createAppUri(T))}}e.ExtHostUrls=A,A.HandlePool=0});var Je=this&&this.__classPrivateFieldSet||function(ne,e,i,D,S){if(D==="m")throw new TypeError("Private method is not writable");if(D==="a"&&!S)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?ne!==e||!S:!e.has(ne))throw new TypeError("Cannot write private member to an object whose class did not declare it");return D==="a"?S.call(ne,i):S?S.value=i:e.set(ne,i),i},Re=this&&this.__classPrivateFieldGet||function(ne,e,i,D){if(i==="a"&&!D)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?ne!==e||!D:!e.has(ne))throw new TypeError("Cannot read private member from an object whose class did not declare it");return i==="m"?D:i==="a"?D.call(ne):D?D.value:e.get(ne)};define(De[57],Ce([1,0,4,13,23,2,146,167,65,5]),function(ne,e,i,D,S,N,y,A,_,T){"use strict";var O,b,g,E,m,t,o,a,p,w,u,I,r;Object.defineProperty(e,"__esModule",{value:!0}),e.reviveOptions=e.serializeWebviewOptions=e.toExtensionData=e.ExtHostWebviews=e.shouldSerializeBuffersForPostMessage=e.ExtHostWebview=void 0;class c{constructor(F,j,W,H,P,M,R){O.set(this,void 0),b.set(this,void 0),g.set(this,void 0),E.set(this,void 0),m.set(this,void 0),t.set(this,void 0),o.set(this,""),a.set(this,void 0),p.set(this,!1),w.set(this,!1),u.set(this,void 0),I.set(this,void 0),this._onMessageEmitter=new i.Emitter,this.onDidReceiveMessage=this._onMessageEmitter.event,r.set(this,new i.Emitter),this._onDidDispose=Re(this,r,"f").event,Je(this,O,F,"f"),Je(this,b,j,"f"),Je(this,a,W,"f"),Je(this,E,H,"f"),Je(this,m,P,"f"),Je(this,t,M,"f"),Je(this,u,n(M),"f"),Je(this,I,d(M),"f"),Je(this,g,R,"f")}dispose(){Je(this,p,!0,"f"),Re(this,r,"f").fire(),Re(this,r,"f").dispose(),this._onMessageEmitter.dispose()}asWebviewUri(F){return Je(this,w,!0,"f"),(0,_.asWebviewUri)(F,Re(this,E,"f"))}get cspSource(){const F=Re(this,t,"f").extensionLocation;if(F.scheme===D.Schemas.https||F.scheme===D.Schemas.http){let j=F.toString();return j.endsWith("/")||(j+="/"),j+" "+_.webviewGenericCspSource}return _.webviewGenericCspSource}get html(){return this.assertNotDisposed(),Re(this,o,"f")}set html(F){this.assertNotDisposed(),Re(this,o,"f")!==F&&(Je(this,o,F,"f"),Re(this,I,"f")&&!Re(this,w,"f")&&/(["'])vscode-resource:([^\s'"]+?)(["'])/i.test(F)&&(Je(this,w,!0,"f"),Re(this,g,"f").report("Webview vscode-resource: uris",Re(this,t,"f"),"Please migrate to use the 'webview.asWebviewUri' api instead: https://aka.ms/vscode-webview-use-aswebviewuri")),Re(this,b,"f").$setHtml(Re(this,O,"f"),this.rewriteOldResourceUrlsIfNeeded(F)))}get options(){return this.assertNotDisposed(),Re(this,a,"f")}set options(F){this.assertNotDisposed(),S.equals(Re(this,a,"f"),F)||Re(this,b,"f").$setOptions(Re(this,O,"f"),s(Re(this,t,"f"),Re(this,m,"f"),F)),Je(this,a,F,"f")}async postMessage(F){if(Re(this,p,"f"))return!1;const j=(0,A.serializeWebviewMessage)(F,{serializeBuffersForPostMessage:Re(this,u,"f")});return Re(this,b,"f").$postMessage(Re(this,O,"f"),j.message,...j.buffers)}assertNotDisposed(){if(Re(this,p,"f"))throw new Error("Webview is disposed")}rewriteOldResourceUrlsIfNeeded(F){if(!Re(this,I,"f"))return F;const j=Re(this,t,"f").extensionLocation?.scheme===D.Schemas.vscodeRemote,W=Re(this,t,"f").extensionLocation.scheme===D.Schemas.vscodeRemote?Re(this,t,"f").extensionLocation.authority:void 0;return F.replace(/(["'])(?:vscode-resource):(\/\/([^\s\/'"]+?)(?=\/))?([^\s'"]+?)(["'])/gi,(H,P,M,R,B,$)=>{const U=N.URI.from({scheme:R||"file",path:decodeURIComponent(B)}),K=(0,_.asWebviewUri)(U,{isRemote:j,authority:W}).toString();return`${P}${K}${$}`}).replace(/(["'])(?:vscode-webview-resource):(\/\/[^\s\/'"]+\/([^\s\/'"]+?)(?=\/))?([^\s'"]+?)(["'])/gi,(H,P,M,R,B,$)=>{const U=N.URI.from({scheme:R||"file",path:decodeURIComponent(B)}),K=(0,_.asWebviewUri)(U,{isRemote:j,authority:W}).toString();return`${P}${K}${$}`})}}e.ExtHostWebview=c,O=new WeakMap,b=new WeakMap,g=new WeakMap,E=new WeakMap,m=new WeakMap,t=new WeakMap,o=new WeakMap,a=new WeakMap,p=new WeakMap,w=new WeakMap,u=new WeakMap,I=new WeakMap,r=new WeakMap;function n(k){try{const F=(0,y.normalizeVersion)((0,y.parseVersion)(k.engines.vscode));return!!F&&F.majorBase>=1&&F.minorBase>=57}catch{return!1}}e.shouldSerializeBuffersForPostMessage=n;function d(k){try{const F=(0,y.normalizeVersion)((0,y.parseVersion)(k.engines.vscode));return F?F.majorBase<1||F.majorBase===1&&F.minorBase<60:!1}catch{return!1}}class l{constructor(F,j,W,H,P){this.remoteInfo=j,this.workspace=W,this._logService=H,this._deprecationService=P,this._webviews=new Map,this._webviewProxy=F.getProxy(T.MainContext.MainThreadWebviews)}$onMessage(F,j,W){const H=this.getWebview(F);if(H){const{message:P}=(0,A.deserializeWebviewMessage)(j,W.value);H._onMessageEmitter.fire(P)}}$onMissingCsp(F,j){this._logService.warn(`${j} created a webview without a content security policy: https://aka.ms/vscode-webview-missing-csp`)}createNewWebview(F,j,W){const H=new c(F,this._webviewProxy,h(j),this.remoteInfo,this.workspace,W,this._deprecationService);return this._webviews.set(F,H),H._onDidDispose(()=>{this._webviews.delete(F)}),H}deleteWebview(F){this._webviews.delete(F)}getWebview(F){return this._webviews.get(F)}}e.ExtHostWebviews=l;function f(k){return{id:k.identifier,location:k.extensionLocation}}e.toExtensionData=f;function s(k,F,j){return{enableCommandUris:j.enableCommandUris,enableScripts:j.enableScripts,enableForms:j.enableForms,portMapping:j.portMapping,localResourceRoots:j.localResourceRoots||v(k,F)}}e.serializeWebviewOptions=s;function h(k){return{enableCommandUris:k.enableCommandUris,enableScripts:k.enableScripts,enableForms:k.enableForms,portMapping:k.portMapping,localResourceRoots:k.localResourceRoots?.map(F=>N.URI.from(F))}}e.reviveOptions=h;function v(k,F){return[...(F?.getWorkspaceFolders()||[]).map(j=>j.uri),k.extensionLocation]}}),define(De[225],Ce([1,0,20,220,7,13,22,2,8,57,63,5,6]),function(ne,e,i,D,S,N,y,A,_,T,O,b,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtHostCustomEditors=void 0;class E{constructor(c,n){this.document=c,this._storagePath=n,this._backupCounter=1,this._edits=new O.Cache("custom documents")}addEdit(c){return this._edits.add([c])}async undo(c,n){await this.getEdit(c).undo(),n||this.disposeBackup()}async redo(c,n){await this.getEdit(c).redo(),n||this.disposeBackup()}disposeEdits(c){for(const n of c)this._edits.delete(n)}getNewBackupUri(){if(!this._storagePath)throw new Error("Backup requires a valid storage path");const c=I(this.document.uri)+this._backupCounter++;return(0,y.joinPath)(this._storagePath,c)}updateBackup(c){this._backup?.delete(),this._backup=c}disposeBackup(){this._backup?.delete(),this._backup=void 0}getEdit(c){const n=this._edits.get(c,0);if(!n)throw new Error("No edit found");return n}}class m{constructor(){this._documents=new Map}get(c,n){return this._documents.get(this.key(c,n))}add(c,n,d){const l=this.key(c,n.uri);if(this._documents.has(l))throw new Error(`Document already exists for viewType:${c} resource:${n.uri}`);const f=new E(n,d);return this._documents.set(l,f),f}delete(c,n){const d=this.key(c,n.uri);this._documents.delete(d)}key(c,n){return`${c}@@@${n}`}}var t;(function(r){r[r.Text=0]="Text",r[r.Custom=1]="Custom"})(t||(t={}));class o{constructor(){this._providers=new Map}addTextProvider(c,n,d){return this.add(0,c,n,d)}addCustomProvider(c,n,d){return this.add(1,c,n,d)}get(c){return this._providers.get(c)}add(c,n,d,l){if(this._providers.has(n))throw new Error(`Provider for viewType:${n} already registered`);return this._providers.set(n,{type:c,extension:d,provider:l}),new g.Disposable(()=>this._providers.delete(n))}}class a{constructor(c,n,d,l,f){this._extHostDocuments=n,this._extensionStoragePaths=d,this._extHostWebview=l,this._extHostWebviewPanels=f,this._editorProviders=new o,this._documents=new m,this._proxy=c.getProxy(b.MainContext.MainThreadCustomEditors)}registerCustomEditorProvider(c,n,d,l){const f=new S.DisposableStore;return w(d)?(f.add(this._editorProviders.addTextProvider(n,c,d)),this._proxy.$registerTextEditorProvider((0,T.toExtensionData)(c),n,l.webviewOptions||{},{supportsMove:!!d.moveCustomTextEditor},(0,T.shouldSerializeBuffersForPostMessage)(c))):(f.add(this._editorProviders.addCustomProvider(n,c,d)),p(d)&&f.add(d.onDidChangeCustomDocument(s=>{const h=this.getCustomDocumentEntry(n,s.document.uri);if(u(s)){const v=h.addEdit(s);this._proxy.$onDidEdit(s.document.uri,n,v,s.label)}else this._proxy.$onContentChange(s.document.uri,n)})),this._proxy.$registerCustomEditorProvider((0,T.toExtensionData)(c),n,l.webviewOptions||{},!!l.supportsMultipleEditorsPerDocument,(0,T.shouldSerializeBuffersForPostMessage)(c))),g.Disposable.from(f,new g.Disposable(()=>{this._proxy.$unregisterEditorProvider(n)}))}async $createCustomDocument(c,n,d,l,f){const s=this._editorProviders.get(n);if(!s)throw new Error(`No provider found for '${n}'`);if(s.type!==1)throw new Error(`Invalid provide type for '${n}'`);const h=A.URI.revive(c),v=await s.provider.openCustomDocument(h,{backupId:d,untitledDocumentData:l?.buffer},f);let k;return p(s.provider)&&this._extensionStoragePaths&&(k=this._extensionStoragePaths.workspaceValue(s.extension)??this._extensionStoragePaths.globalValue(s.extension)),this._documents.add(n,v,k),{editable:p(s.provider)}}async $disposeCustomDocument(c,n){const d=this._editorProviders.get(n);if(!d)throw new Error(`No provider found for '${n}'`);if(d.type!==1)throw new Error(`Invalid provider type for '${n}'`);const l=A.URI.revive(c),{document:f}=this.getCustomDocumentEntry(n,l);this._documents.delete(n,f),f.dispose()}async $resolveWebviewEditor(c,n,d,l,f,s){const h=this._editorProviders.get(d);if(!h)throw new Error(`No provider found for '${d}'`);const v=_.ViewColumn.to(f),k=this._extHostWebview.createNewWebview(n,l.contentOptions,h.extension),F=this._extHostWebviewPanels.createNewWebviewPanel(n,d,l.title,v,l.options,k,!0),j=A.URI.revive(c);switch(h.type){case 1:{const{document:W}=this.getCustomDocumentEntry(d,j);return h.provider.resolveCustomEditor(W,F,s)}case 0:{const W=this._extHostDocuments.getDocument(j);return h.provider.resolveCustomTextEditor(W,F,s)}default:throw new Error("Unknown webview provider type")}}$disposeEdits(c,n,d){this.getCustomDocumentEntry(n,c).disposeEdits(d)}async $onMoveCustomEditor(c,n,d){const l=this._editorProviders.get(d);if(!l)throw new Error(`No provider found for '${d}'`);if(!l.provider.moveCustomTextEditor)throw new Error(`Provider does not implement move '${d}'`);const f=this._extHostWebviewPanels.getWebviewPanel(c);if(!f)throw new Error("No webview found");const s=A.URI.revive(n),h=this._extHostDocuments.getDocument(s);await l.provider.moveCustomTextEditor(h,f,i.CancellationToken.None)}async $undo(c,n,d,l){return this.getCustomDocumentEntry(n,c).undo(d,l)}async $redo(c,n,d,l){return this.getCustomDocumentEntry(n,c).redo(d,l)}async $revert(c,n,d){const l=this.getCustomDocumentEntry(n,c);await this.getCustomEditorProvider(n).revertCustomDocument(l.document,d),l.disposeBackup()}async $onSave(c,n,d){const l=this.getCustomDocumentEntry(n,c);await this.getCustomEditorProvider(n).saveCustomDocument(l.document,d),l.disposeBackup()}async $onSaveAs(c,n,d,l){const f=this.getCustomDocumentEntry(n,c);return this.getCustomEditorProvider(n).saveCustomDocumentAs(f.document,A.URI.revive(d),l)}async $backup(c,n,d){const l=this.getCustomDocumentEntry(n,c),s=await this.getCustomEditorProvider(n).backupCustomDocument(l.document,{destination:l.getNewBackupUri()},d);return l.updateBackup(s),s.id}getCustomDocumentEntry(c,n){const d=this._documents.get(c,A.URI.revive(n));if(!d)throw new Error("No custom document found");return d}getCustomEditorProvider(c){const d=this._editorProviders.get(c)?.provider;if(!d||!p(d))throw new Error("Custom document is not editable");return d}}e.ExtHostCustomEditors=a;function p(r){return!!r.onDidChangeCustomDocument}function w(r){return typeof r.resolveCustomTextEditor=="function"}function u(r){return typeof r.undo=="function"&&typeof r.redo=="function"}function I(r){const c=r.scheme===N.Schemas.file||r.scheme===N.Schemas.untitled?r.fsPath:r.toString();return(0,D.hash)(c)+""}});var Je=this&&this.__classPrivateFieldSet||function(ne,e,i,D,S){if(D==="m")throw new TypeError("Private method is not writable");if(D==="a"&&!S)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?ne!==e||!S:!e.has(ne))throw new TypeError("Cannot write private member to an object whose class did not declare it");return D==="a"?S.call(ne,i):S?S.value=i:e.set(ne,i),i},Re=this&&this.__classPrivateFieldGet||function(ne,e,i,D){if(i==="a"&&!D)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?ne!==e||!D:!e.has(ne))throw new TypeError("Cannot read private member from an object whose class did not declare it");return i==="m"?D:i==="a"?D.call(ne):D?D.value:e.get(ne)};define(De[226],Ce([1,0,4,7,2,38,8,57,5,6]),function(ne,e,i,D,S,N,y,A,_,T){"use strict";var O,b,g,E,m,t,o,a,p,w,u,I,r;Object.defineProperty(e,"__esModule",{value:!0}),e.ExtHostWebviewPanels=void 0;class c extends D.Disposable{constructor(f,s,h,v){super(),O.set(this,void 0),b.set(this,void 0),g.set(this,void 0),E.set(this,void 0),m.set(this,void 0),t.set(this,void 0),o.set(this,void 0),a.set(this,void 0),p.set(this,!0),w.set(this,void 0),u.set(this,!1),I.set(this,this._register(new i.Emitter)),this.onDidDispose=Re(this,I,"f").event,r.set(this,this._register(new i.Emitter)),this.onDidChangeViewState=Re(this,r,"f").event,Je(this,O,f,"f"),Je(this,b,s,"f"),Je(this,E,h,"f"),Je(this,g,v.viewType,"f"),Je(this,m,v.panelOptions,"f"),Je(this,a,v.viewColumn,"f"),Je(this,t,v.title,"f"),Je(this,w,v.active,"f")}dispose(){Re(this,u,"f")||(Je(this,u,!0,"f"),Re(this,I,"f").fire(),Re(this,b,"f").$disposeWebview(Re(this,O,"f")),Re(this,E,"f").dispose(),super.dispose())}get webview(){return this.assertNotDisposed(),Re(this,E,"f")}get viewType(){return this.assertNotDisposed(),Re(this,g,"f")}get title(){return this.assertNotDisposed(),Re(this,t,"f")}set title(f){this.assertNotDisposed(),Re(this,t,"f")!==f&&(Je(this,t,f,"f"),Re(this,b,"f").$setTitle(Re(this,O,"f"),f))}get iconPath(){return this.assertNotDisposed(),Re(this,o,"f")}set iconPath(f){this.assertNotDisposed(),Re(this,o,"f")!==f&&(Je(this,o,f,"f"),Re(this,b,"f").$setIconPath(Re(this,O,"f"),S.URI.isUri(f)?{light:f,dark:f}:f))}get options(){return Re(this,m,"f")}get viewColumn(){if(this.assertNotDisposed(),!(typeof Re(this,a,"f")=="number"&&Re(this,a,"f")<0))return Re(this,a,"f")}get active(){return this.assertNotDisposed(),Re(this,w,"f")}get visible(){return this.assertNotDisposed(),Re(this,p,"f")}_updateViewState(f){Re(this,u,"f")||(this.active!==f.active||this.visible!==f.visible||this.viewColumn!==f.viewColumn)&&(Je(this,w,f.active,"f"),Je(this,p,f.visible,"f"),Je(this,a,f.viewColumn,"f"),Re(this,r,"f").fire({webviewPanel:this}))}reveal(f,s){this.assertNotDisposed(),Re(this,b,"f").$reveal(Re(this,O,"f"),{viewColumn:typeof f>"u"?void 0:y.ViewColumn.from(f),preserveFocus:!!s})}assertNotDisposed(){if(Re(this,u,"f"))throw new Error("Webview is disposed")}}O=new WeakMap,b=new WeakMap,g=new WeakMap,E=new WeakMap,m=new WeakMap,t=new WeakMap,o=new WeakMap,a=new WeakMap,p=new WeakMap,w=new WeakMap,u=new WeakMap,I=new WeakMap,r=new WeakMap;class n{static newHandle(){return(0,N.generateUuid)()}constructor(f,s,h){this.webviews=s,this.workspace=h,this._webviewPanels=new Map,this._serializers=new Map,this._proxy=f.getProxy(_.MainContext.MainThreadWebviewPanels)}createWebviewPanel(f,s,h,v,k={}){const F=typeof v=="object"?v.viewColumn:v,j={viewColumn:y.ViewColumn.from(F),preserveFocus:typeof v=="object"&&!!v.preserveFocus},W=(0,A.shouldSerializeBuffersForPostMessage)(f),H=n.newHandle();this._proxy.$createWebviewPanel((0,A.toExtensionData)(f),H,s,{title:h,panelOptions:d(k),webviewOptions:(0,A.serializeWebviewOptions)(f,this.workspace,k),serializeBuffersForPostMessage:W},j);const P=this.webviews.createNewWebview(H,k,f);return this.createNewWebviewPanel(H,s,h,F,k,P,!0)}$onDidChangeWebviewPanelViewStates(f){const s=Object.keys(f);s.sort((h,v)=>{const k=f[h],F=f[v];return k.active?1:F.active?-1:+k.visible-+F.visible});for(const h of s){const v=this.getWebviewPanel(h);if(!v)continue;const k=f[h];v._updateViewState({active:k.active,visible:k.visible,viewColumn:y.ViewColumn.to(k.position)})}}async $onDidDisposeWebviewPanel(f){this.getWebviewPanel(f)?.dispose(),this._webviewPanels.delete(f),this.webviews.deleteWebview(f)}registerWebviewPanelSerializer(f,s,h){if(this._serializers.has(s))throw new Error(`Serializer for '${s}' already registered`);return this._serializers.set(s,{serializer:h,extension:f}),this._proxy.$registerSerializer(s,{serializeBuffersForPostMessage:(0,A.shouldSerializeBuffersForPostMessage)(f)}),new T.Disposable(()=>{this._serializers.delete(s),this._proxy.$unregisterSerializer(s)})}async $deserializeWebviewPanel(f,s,h,v){const k=this._serializers.get(s);if(!k)throw new Error(`No serializer found for '${s}'`);const{serializer:F,extension:j}=k,W=this.webviews.createNewWebview(f,h.webviewOptions,j),H=this.createNewWebviewPanel(f,s,h.title,v,h.panelOptions,W,h.active);await F.deserializeWebviewPanel(H,h.state)}createNewWebviewPanel(f,s,h,v,k,F,j){const W=new c(f,this._proxy,F,{viewType:s,title:h,viewColumn:v,panelOptions:k,active:j});return this._webviewPanels.set(f,W),W}getWebviewPanel(f){return this._webviewPanels.get(f)}}e.ExtHostWebviewPanels=n;function d(l){return{enableFindWidget:l.enableFindWidget,retainContextWhenHidden:l.retainContextWhenHidden}}});var Je=this&&this.__classPrivateFieldSet||function(ne,e,i,D,S){if(D==="m")throw new TypeError("Private method is not writable");if(D==="a"&&!S)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?ne!==e||!S:!e.has(ne))throw new TypeError("Cannot write private member to an object whose class did not declare it");return D==="a"?S.call(ne,i):S?S.value=i:e.set(ne,i),i},Re=this&&this.__classPrivateFieldGet||function(ne,e,i,D){if(i==="a"&&!D)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?ne!==e||!D:!e.has(ne))throw new TypeError("Cannot read private member from an object whose class did not declare it");return i==="m"?D:i==="a"?D.call(ne):D?D.value:e.get(ne)};define(De[227],Ce([1,0,4,7,57,8,5,6]),function(ne,e,i,D,S,N,y,A){"use strict";var _,T,O,b,g,E,m,t,o,a,p;Object.defineProperty(e,"__esModule",{value:!0}),e.ExtHostWebviewViews=void 0;class w extends D.Disposable{constructor(r,c,n,d,l,f){super(),_.set(this,void 0),T.set(this,void 0),O.set(this,void 0),b.set(this,void 0),g.set(this,!1),E.set(this,void 0),m.set(this,void 0),t.set(this,void 0),o.set(this,void 0),a.set(this,this._register(new i.Emitter)),this.onDidChangeVisibility=Re(this,a,"f").event,p.set(this,this._register(new i.Emitter)),this.onDidDispose=Re(this,p,"f").event,Je(this,O,n,"f"),Je(this,m,d,"f"),Je(this,_,r,"f"),Je(this,T,c,"f"),Je(this,b,l,"f"),Je(this,E,f,"f")}dispose(){Re(this,g,"f")||(Je(this,g,!0,"f"),Re(this,p,"f").fire(),Re(this,b,"f").dispose(),super.dispose())}get title(){return this.assertNotDisposed(),Re(this,m,"f")}set title(r){this.assertNotDisposed(),Re(this,m,"f")!==r&&(Je(this,m,r,"f"),Re(this,T,"f").$setWebviewViewTitle(Re(this,_,"f"),r))}get description(){return this.assertNotDisposed(),Re(this,t,"f")}set description(r){this.assertNotDisposed(),Re(this,t,"f")!==r&&(Je(this,t,r,"f"),Re(this,T,"f").$setWebviewViewDescription(Re(this,_,"f"),r))}get visible(){return Re(this,E,"f")}get webview(){return Re(this,b,"f")}get viewType(){return Re(this,O,"f")}_setVisible(r){r===Re(this,E,"f")||Re(this,g,"f")||(Je(this,E,r,"f"),Re(this,a,"f").fire())}get badge(){return this.assertNotDisposed(),Re(this,o,"f")}set badge(r){this.assertNotDisposed(),!(r?.value===Re(this,o,"f")?.value&&r?.tooltip===Re(this,o,"f")?.tooltip)&&(Je(this,o,N.ViewBadge.from(r),"f"),Re(this,T,"f").$setWebviewViewBadge(Re(this,_,"f"),r))}show(r){this.assertNotDisposed(),Re(this,T,"f").$show(Re(this,_,"f"),!!r)}assertNotDisposed(){if(Re(this,g,"f"))throw new Error("Webview is disposed")}}_=new WeakMap,T=new WeakMap,O=new WeakMap,b=new WeakMap,g=new WeakMap,E=new WeakMap,m=new WeakMap,t=new WeakMap,o=new WeakMap,a=new WeakMap,p=new WeakMap;class u{constructor(r,c){this._extHostWebview=c,this._viewProviders=new Map,this._webviewViews=new Map,this._proxy=r.getProxy(y.MainContext.MainThreadWebviewViews)}registerWebviewViewProvider(r,c,n,d){if(this._viewProviders.has(c))throw new Error(`View provider for '${c}' already registered`);return this._viewProviders.set(c,{provider:n,extension:r}),this._proxy.$registerWebviewViewProvider((0,S.toExtensionData)(r),c,{retainContextWhenHidden:d?.retainContextWhenHidden,serializeBuffersForPostMessage:(0,S.shouldSerializeBuffersForPostMessage)(r)}),new A.Disposable(()=>{this._viewProviders.delete(c),this._proxy.$unregisterWebviewViewProvider(c)})}async $resolveWebviewView(r,c,n,d,l){const f=this._viewProviders.get(c);if(!f)throw new Error(`No view provider found for '${c}'`);const{provider:s,extension:h}=f,v=this._extHostWebview.createNewWebview(r,{},h),k=new w(r,this._proxy,c,n,v,!0);this._webviewViews.set(r,k),await s.resolveWebviewView(k,{state:d},l)}async $onDidChangeWebviewViewVisibility(r,c){this.getWebviewView(r)._setVisible(c)}async $disposeWebviewView(r){const c=this.getWebviewView(r);this._webviewViews.delete(r),c.dispose(),this._extHostWebview.deleteWebview(r)}getWebviewView(r){const c=this._webviewViews.get(r);if(!c)throw new Error("No webview found");return c}}e.ExtHostWebviewViews=u}),define(De[99],Ce([1,0,4,5,2,13,10,3,14]),function(ne,e,i,D,S,N,y,A,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IExtHostWindow=e.ExtHostWindow=void 0;let T=class en{get state(){return this._state}constructor(b){this._onDidChangeWindowState=new i.Emitter,this.onDidChangeWindowState=this._onDidChangeWindowState.event,this._state=en.InitialState,this._proxy=b.getProxy(D.MainContext.MainThreadWindow),this._proxy.$getWindowVisibility().then(g=>this.$onDidChangeWindowFocus(g))}$onDidChangeWindowFocus(b){b!==this._state.focused&&(this._state={...this._state,focused:b},this._onDidChangeWindowState.fire(this._state))}openUri(b,g){let E;if(typeof b=="string"){E=b;try{b=S.URI.parse(b)}catch{return Promise.reject(`Invalid uri - '${b}'`)}}return(0,y.isFalsyOrWhitespace)(b.scheme)?Promise.reject("Invalid scheme - cannot be empty"):b.scheme===N.Schemas.command?Promise.reject(`Invalid scheme '${b.scheme}'`):this._proxy.$openUri(b,E,g)}async asExternalUri(b,g){if((0,y.isFalsyOrWhitespace)(b.scheme))return Promise.reject("Invalid scheme - cannot be empty");const E=await this._proxy.$asExternalUri(b,g);return S.URI.from(E)}};T.InitialState={focused:!0},T=He([We(0,_.IExtHostRpcService)],T),e.ExtHostWindow=T,e.IExtHostWindow=(0,A.createDecorator)("IExtHostWindow")}),define(De[228],Ce([1,0,198,26,14]),function(ne,e,i,D,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtHostConsoleForwarder=void 0;let N=class extends i.AbstractExtHostConsoleForwarder{constructor(A,_){super(A,_)}_nativeConsoleLogMessage(A,_,T){_.apply(console,T)}};N=He([We(0,S.IExtHostRpcService),We(1,D.IExtHostInitDataService)],N),e.ExtHostConsoleForwarder=N}),define(De[229],Ce([1,0,15,24,20,12,4,7,120,192,43]),function(ne,e,i,D,S,N,y,A,_,T,O){"use strict";var b;Object.defineProperty(e,"__esModule",{value:!0}),e.RPCProtocol=e.ResponsiveState=e.RequestInitiator=e.parseJsonAndRestoreBufferRefs=e.stringifyJsonWithBufferRefs=void 0;function g(k,F){try{return JSON.stringify(k,F)}catch{return"null"}}const E="$$ref$$",m={[E]:-1};class t{constructor(F,j){this.jsonString=F,this.referencedBuffers=j}}function o(k,F=null,j=!1){const W=[];return{jsonString:(j?g:JSON.stringify)(k,(P,M)=>{if(typeof M>"u")return m;if(typeof M=="object"){if(M instanceof D.VSBuffer){const R=W.push(M)-1;return{[E]:R}}if(F)return F(P,M)}return M}),referencedBuffers:W}}e.stringifyJsonWithBufferRefs=o;function a(k,F,j){return JSON.parse(k,(W,H)=>{if(H){const P=H[E];if(typeof P=="number")return F[P];if(j&&H.$mid===1)return j.transformIncoming(H)}return H})}e.parseJsonAndRestoreBufferRefs=a;function p(k,F){return JSON.stringify(k,F)}function w(k){return k?(F,j)=>j&&j.$mid===1?k.transformOutgoing(j):j:null}var u;(function(k){k[k.LocalSide=0]="LocalSide",k[k.OtherSide=1]="OtherSide"})(u=e.RequestInitiator||(e.RequestInitiator={}));var I;(function(k){k[k.Responsive=0]="Responsive",k[k.Unresponsive=1]="Unresponsive"})(I=e.ResponsiveState||(e.ResponsiveState={}));const r=()=>{},c=Symbol.for("rpcProtocol"),n=Symbol.for("rpcProxy");class d extends A.Disposable{constructor(F,j=null,W=null){super(),this[b]=!0,this._onDidChangeResponsiveState=this._register(new y.Emitter),this.onDidChangeResponsiveState=this._onDidChangeResponsiveState.event,this._protocol=F,this._logger=j,this._uriTransformer=W,this._uriReplacer=w(this._uriTransformer),this._isDisposed=!1,this._locals=[],this._proxies=[];for(let H=0,P=O.ProxyIdentifier.count;Hthis._checkUnresponsive(),1e3)),this._protocol.onMessage(H=>this._receiveOneMessage(H))}dispose(){this._isDisposed=!0,Object.keys(this._pendingRPCReplies).forEach(F=>{this._pendingRPCReplies[F].resolveErr(N.canceled())})}drain(){return typeof this._protocol.drain=="function"?this._protocol.drain():Promise.resolve()}_onWillSendRequest(F){this._unacknowledgedCount===0&&(this._unresponsiveTime=Date.now()+d.UNRESPONSIVE_TIME),this._unacknowledgedCount++,this._asyncCheckUresponsive.isScheduled()||this._asyncCheckUresponsive.schedule()}_onDidReceiveAcknowledge(F){this._unresponsiveTime=Date.now()+d.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(F){this._responsiveState!==F&&(this._responsiveState=F,this._onDidChangeResponsiveState.fire(this._responsiveState))}get responsiveState(){return this._responsiveState}transformIncomingURIs(F){return this._uriTransformer?(0,_.transformIncomingURIs)(F,this._uriTransformer):F}getProxy(F){const{nid:j,sid:W}=F;return this._proxies[j]||(this._proxies[j]=this._createProxy(j,W)),this._proxies[j]}_createProxy(F,j){const W={get:(H,P)=>(typeof P=="string"&&!H[P]&&P.charCodeAt(0)===36&&(H[P]=(...M)=>this._remoteCall(F,P,M)),P===n?j:H[P])};return new Proxy(Object.create(null),W)}set(F,j){return this._locals[F.nid]=j,j}assertRegistered(F){for(let j=0,W=F.length;jK.cancel()}else B=this._invokeHandler(W,H,P),$=r;this._cancelInvokedHandlers[R]=$;const U=s.serializeAcknowledged(j);this._logger?.logOutgoing(U.byteLength,j,1,"ack"),this._protocol.send(U),B.then(K=>{delete this._cancelInvokedHandlers[R];const te=s.serializeReplyOK(j,K,this._uriReplacer);this._logger?.logOutgoing(te.byteLength,j,1,"reply:",K),this._protocol.send(te)},K=>{delete this._cancelInvokedHandlers[R];const te=s.serializeReplyErr(j,K);this._logger?.logOutgoing(te.byteLength,j,1,"replyErr:",K),this._protocol.send(te)})}_receiveCancel(F,j){this._logger?.logIncoming(F,j,1,"receiveCancel");const W=String(j);this._cancelInvokedHandlers[W]?.()}_receiveReply(F,j,W){this._logger?.logIncoming(F,j,0,"receiveReply:",W);const H=String(j);if(!this._pendingRPCReplies.hasOwnProperty(H))return;const P=this._pendingRPCReplies[H];delete this._pendingRPCReplies[H],P.resolveOk(W)}_receiveReplyErr(F,j,W){this._logger?.logIncoming(F,j,0,"receiveReplyErr:",W);const H=String(j);if(!this._pendingRPCReplies.hasOwnProperty(H))return;const P=this._pendingRPCReplies[H];delete this._pendingRPCReplies[H];let M;W&&(W.$isError?(M=new Error,M.name=W.name,M.message=W.message,M.stack=W.stack):M=W),P.resolveErr(M)}_invokeHandler(F,j,W){try{return Promise.resolve(this._doInvokeHandler(F,j,W))}catch(H){return Promise.reject(H)}}_doInvokeHandler(F,j,W){const H=this._locals[F];if(!H)throw new Error("Unknown actor "+(0,O.getStringIdentifierForProxy)(F));const P=H[j];if(typeof P!="function")throw new Error("Unknown method "+j+" on actor "+(0,O.getStringIdentifierForProxy)(F));return P.apply(H,W)}_remoteCall(F,j,W){if(this._isDisposed)return new T.CanceledLazyPromise;let H=null;if(W.length>0&&S.CancellationToken.isCancellationToken(W[W.length-1])&&(H=W.pop()),H&&H.isCancellationRequested)return Promise.reject(N.canceled());const P=s.serializeRequestArguments(W,this._uriReplacer),M=++this._lastMessageId,R=String(M),B=new T.LazyPromise;H&&H.onCancellationRequested(()=>{const U=s.serializeCancel(M);this._logger?.logOutgoing(U.byteLength,M,0,"cancel"),this._protocol.send(s.serializeCancel(M))}),this._pendingRPCReplies[R]=B,this._onWillSendRequest(M);const $=s.serializeRequest(M,F,j,P,!!H);return this._logger?.logOutgoing($.byteLength,M,0,`request: ${(0,O.getStringIdentifierForProxy)(F)}.${j}(`,W),this._protocol.send($),B}}e.RPCProtocol=d,b=c,d.UNRESPONSIVE_TIME=3*1e3;class l{static alloc(F,j,W){const H=new l(D.VSBuffer.alloc(W+1+4),0);return H.writeUInt8(F),H.writeUInt32(j),H}static read(F,j){return new l(F,j)}get buffer(){return this._buff}constructor(F,j){this._buff=F,this._offset=j}static sizeUInt8(){return 1}writeUInt8(F){this._buff.writeUInt8(F,this._offset),this._offset+=1}readUInt8(){const F=this._buff.readUInt8(this._offset);return this._offset+=1,F}writeUInt32(F){this._buff.writeUInt32BE(F,this._offset),this._offset+=4}readUInt32(){const F=this._buff.readUInt32BE(this._offset);return this._offset+=4,F}static sizeShortString(F){return 1+F.byteLength}writeShortString(F){this._buff.writeUInt8(F.byteLength,this._offset),this._offset+=1,this._buff.set(F,this._offset),this._offset+=F.byteLength}readShortString(){const F=this._buff.readUInt8(this._offset);this._offset+=1;const W=this._buff.slice(this._offset,this._offset+F).toString();return this._offset+=F,W}static sizeLongString(F){return 4+F.byteLength}writeLongString(F){this._buff.writeUInt32BE(F.byteLength,this._offset),this._offset+=4,this._buff.set(F,this._offset),this._offset+=F.byteLength}readLongString(){const F=this._buff.readUInt32BE(this._offset);this._offset+=4;const W=this._buff.slice(this._offset,this._offset+F).toString();return this._offset+=F,W}writeBuffer(F){this._buff.writeUInt32BE(F.byteLength,this._offset),this._offset+=4,this._buff.set(F,this._offset),this._offset+=F.byteLength}static sizeVSBuffer(F){return 4+F.byteLength}writeVSBuffer(F){this._buff.writeUInt32BE(F.byteLength,this._offset),this._offset+=4,this._buff.set(F,this._offset),this._offset+=F.byteLength}readVSBuffer(){const F=this._buff.readUInt32BE(this._offset);this._offset+=4;const j=this._buff.slice(this._offset,this._offset+F);return this._offset+=F,j}static sizeMixedArray(F){let j=0;j+=1;for(let W=0,H=F.length;W"u")return!0;return!1}static serializeRequestArguments(F,j){if(this._useMixedArgSerialization(F)){const W=[];for(let H=0,P=F.length;H"u")W[H]={type:4};else if(M instanceof O.SerializableObjectWithBuffers){const{jsonString:R,referencedBuffers:B}=o(M.value,j);W[H]={type:3,value:D.VSBuffer.fromString(R),buffers:B}}else W[H]={type:1,value:D.VSBuffer.fromString(p(M,j))}}return{type:1,args:W}}return{type:0,args:p(F,j)}}static serializeRequest(F,j,W,H,P){switch(H.type){case 0:return this._requestJSONArgs(F,j,W,H.args,P);case 1:return this._requestMixedArgs(F,j,W,H.args,P)}}static _requestJSONArgs(F,j,W,H,P){const M=D.VSBuffer.fromString(W),R=D.VSBuffer.fromString(H);let B=0;B+=l.sizeUInt8(),B+=l.sizeShortString(M),B+=l.sizeLongString(R);const $=l.alloc(P?2:1,F,B);return $.writeUInt8(j),$.writeShortString(M),$.writeLongString(R),$.buffer}static deserializeRequestJSONArgs(F){const j=F.readUInt8(),W=F.readShortString(),H=F.readLongString();return{rpcId:j,method:W,args:JSON.parse(H)}}static _requestMixedArgs(F,j,W,H,P){const M=D.VSBuffer.fromString(W);let R=0;R+=l.sizeUInt8(),R+=l.sizeShortString(M),R+=l.sizeMixedArray(H);const B=l.alloc(P?4:3,F,R);return B.writeUInt8(j),B.writeShortString(M),B.writeMixedArray(H),B.buffer}static deserializeRequestMixedArgs(F){const j=F.readUInt8(),W=F.readShortString(),H=F.readMixedArray(),P=new Array(H.length);for(let M=0,R=H.length;M"u")return this._serializeReplyOKEmpty(F);if(j instanceof D.VSBuffer)return this._serializeReplyOKVSBuffer(F,j);if(j instanceof O.SerializableObjectWithBuffers){const{jsonString:H,referencedBuffers:P}=o(j.value,W,!0);return this._serializeReplyOKJSONWithBuffers(F,H,P)}else return this._serializeReplyOKJSON(F,g(j,W))}static _serializeReplyOKEmpty(F){return l.alloc(7,F,0).buffer}static _serializeReplyOKVSBuffer(F,j){let W=0;W+=l.sizeVSBuffer(j);const H=l.alloc(8,F,W);return H.writeVSBuffer(j),H.buffer}static deserializeReplyOKVSBuffer(F){return F.readVSBuffer()}static _serializeReplyOKJSON(F,j){const W=D.VSBuffer.fromString(j);let H=0;H+=l.sizeLongString(W);const P=l.alloc(9,F,H);return P.writeLongString(W),P.buffer}static _serializeReplyOKJSONWithBuffers(F,j,W){const H=D.VSBuffer.fromString(j);let P=0;P+=l.sizeUInt32,P+=l.sizeLongString(H);for(const R of W)P+=l.sizeVSBuffer(R);const M=l.alloc(10,F,P);M.writeUInt32(W.length),M.writeLongString(H);for(const R of W)M.writeBuffer(R);return M.buffer}static deserializeReplyOKJSON(F){const j=F.readLongString();return JSON.parse(j)}static deserializeReplyOKJSONWithBuffers(F,j){const W=F.readUInt32(),H=F.readLongString(),P=[];for(let M=0;M{self.removeEventListener("message",y);const _=A.data;Object.defineProperties(self,{postMessage:{value(T,O){_.postMessage(T,O)}},onmessage:{get(){return _.onmessage},set(T){_.onmessage=T}}}),_.addEventListener("message",T=>{self.dispatchEvent(new MessageEvent("message",{data:T.data}))}),_.start(),self.Worker=class{constructor(){throw new TypeError("Nested workers from within nested worker are NOT supported.")}},importScripts(N)};self.addEventListener("message",y)}.toString();class D extends EventTarget{constructor(N,y,A){super(),this.onmessage=null,this.onmessageerror=null,this.onerror=null;const _=`((${i})('${y}'))`,T=new Blob([_],{type:"application/javascript"}),O=URL.createObjectURL(T),b=new MessageChannel,g=O,E={type:"_newWorker",id:g,port:b.port2,url:O,options:A};N(E,[b.port2]),this.postMessage=b.port1.postMessage.bind(b.port1),this.terminate=()=>{N({type:"_terminateWorker",id:g}),URL.revokeObjectURL(O),b.port1.close(),b.port2.close()},Object.defineProperties(this,{onmessage:{get(){return b.port1.onmessage},set(m){b.port1.onmessage=m}},onmessageerror:{get(){return b.port1.onmessageerror},set(m){b.port1.onmessageerror=m}}}),b.port1.addEventListener("messageerror",m=>{const t=new MessageEvent("messageerror",{data:m.data});this.dispatchEvent(t)}),b.port1.addEventListener("message",m=>{const t=new MessageEvent("message",{data:m.data});this.dispatchEvent(t)}),b.port1.start()}}e.NestedWorker=D}),define(De[231],Ce([1,0,4,30,41,3,35,12,15]),function(ne,e,i,D,S,N,y,A,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ACTIVE_OUTPUT_CHANNEL_CONTEXT=e.registerLogChannel=e.Extensions=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 S.RawContextKey("inOutput",!1),e.CONTEXT_ACTIVE_LOG_OUTPUT=new S.RawContextKey("activeLogOutput",!1),e.CONTEXT_OUTPUT_SCROLL_LOCK=new S.RawContextKey("outputView.scrollLock",!1),e.IOutputService=(0,N.createDecorator)(e.OUTPUT_SERVICE_ID);var T;(function(E){E[E.Append=1]="Append",E[E.Replace=2]="Replace",E[E.Clear=3]="Clear"})(T=e.OutputChannelUpdateMode||(e.OutputChannelUpdateMode={})),e.Extensions={OutputChannels:"workbench.contributions.outputChannels"};class O{constructor(){this.channels=new Map,this._onDidRegisterChannel=new i.Emitter,this.onDidRegisterChannel=this._onDidRegisterChannel.event,this._onDidRemoveChannel=new i.Emitter,this.onDidRemoveChannel=this._onDidRemoveChannel.event}registerChannel(m){this.channels.has(m.id)||(this.channels.set(m.id,m),this._onDidRegisterChannel.fire(m.id))}getChannels(){const m=[];return this.channels.forEach(t=>m.push(t)),m}getChannel(m){return this.channels.get(m)}removeChannel(m){this.channels.delete(m),this._onDidRemoveChannel.fire(m)}}D.Registry.add(e.Extensions.OutputChannels,new O);function b(E,m,t,o,a){return(0,_.createCancelablePromise)(async p=>{await(0,y.whenProviderRegistered)(t,o);const w=D.Registry.as(e.Extensions.OutputChannels);try{await g(t,1,o,a,p),w.registerChannel({id:E,label:m,file:t,log:!0})}catch(u){(0,A.isCancellationError)(u)||a.error("Error while registering log channel",t.toString(),(0,A.getErrorMessage)(u))}})}e.registerLogChannel=b;async function g(E,m,t,o,a){if(!await t.exists(E)){if(a.isCancellationRequested)throw new A.CancellationError;if(m>10)throw new Error("Timed out while waiting for file to be created");o.debug("[Registering Log Channel] File does not exist. Waiting for 1s to retry.",E.toString()),await(0,_.timeout)(1e3,a),await g(E,m+1,t,o,a)}}e.ACTIVE_OUTPUT_CHANNEL_CONTEXT=new S.RawContextKey("activeOutputChannel","")}),define(De[100],Ce([1,0,5,3,14,25,11,231,55,26,36,113,24,9,35,4,7,27]),function(ne,e,i,D,S,N,y,A,_,T,O,b,g,E,m,t,o,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IExtHostOutputService=e.ExtHostOutputService=void 0;class p extends y.AbstractMessageLogger{get disposed(){return this._disposed}constructor(r,c,n,d,l){super(),this.id=r,this.name=c,this.logger=n,this.proxy=d,this.extension=l,this.offset=0,this._disposed=!1,this.visible=!1,this._register(n.onDidChangeLogLevel(f=>this.setLevel(f)))}get logLevel(){return this.logger.getLevel()}appendLine(r){this.append(r+` `)}append(r){this.info(r),this.visible&&(this.logger.flush(),this.proxy.$update(this.id,A.OutputChannelUpdateMode.Append))}clear(){const r=this.offset;this.logger.flush(),this.proxy.$update(this.id,A.OutputChannelUpdateMode.Clear,r)}replace(r){const c=this.offset;this.info(r),this.proxy.$update(this.id,A.OutputChannelUpdateMode.Replace,c),this.visible&&this.logger.flush()}show(r,c){this.logger.flush(),this.proxy.$reveal(this.id,!!(typeof r=="boolean"?r:c))}hide(){this.proxy.$close(this.id)}log(r,c){this.offset+=g.VSBuffer.fromString(c).byteLength,(0,y.log)(this.logger,r,c)}dispose(){super.dispose(),this._disposed||(this.proxy.$dispose(this.id),this._disposed=!0)}}class w extends p{appendLine(r){this.append(r)}}let u=class{constructor(r,c,n,d,l,f){this.initData=c,this.extHostFileSystem=n,this.extHostFileSystemInfo=d,this.loggerService=l,this.logService=f,this.extensionLogDirectoryPromise=new Map,this.namePool=1,this.channels=new Map,this.visibleChannelId=null,this.proxy=r.getProxy(i.MainContext.MainThreadOutputService),this.outputsLocation=this.extHostFileSystemInfo.extUri.joinPath(c.logsLocation,`output_logging_${(0,b.toLocalISOString)(new Date).replace(/-|:|\.\d+Z$/g,"")}`)}$setVisibleChannel(r){this.visibleChannelId=r;for(const[c,n]of this.channels)n.visible=c===this.visibleChannelId}createOutputChannel(r,c,n){if(r=r.trim(),!r)throw new Error("illegal argument `name`. must not be falsy");const d=typeof c=="object"&&c.log;d&&(0,a.checkProposedApiEnabled)(n,"extensionLog");const l=(0,E.isString)(c)?c:void 0;if((0,E.isString)(l)&&!l.trim())throw new Error("illegal argument `languageId`. must not be empty");let f;const s=this.initData.environment.extensionLogLevel?.find(([v])=>N.ExtensionIdentifier.equals(n.identifier,v))?.[1];s&&(f=(0,y.parseLogLevel)(s));const h=d?this.doCreateLogOutputChannel(r,f,n):this.doCreateOutputChannel(r,l,n);return h.then(v=>{this.channels.set(v.id,v),v.visible=v.id===this.visibleChannelId}),d?this.createExtHostLogOutputChannel(r,f??this.logService.getLevel(),h):this.createExtHostOutputChannel(r,h)}async doCreateOutputChannel(r,c,n){this.outputDirectoryPromise||(this.outputDirectoryPromise=this.extHostFileSystem.value.createDirectory(this.outputsLocation).then(()=>this.outputsLocation));const d=await this.outputDirectoryPromise,l=this.extHostFileSystemInfo.extUri.joinPath(d,`${this.namePool++}-${r.replace(/[\\/:\*\?"<>\|]/g,"")}.log`),f=this.loggerService.createLogger(l,{always:!0,donotRotate:!0,donotUseFormatters:!0}),s=await this.proxy.$register(r,l,!1,c,n.identifier.value);return new p(s,r,f,this.proxy,n)}async doCreateLogOutputChannel(r,c,n){const d=await this.createExtensionLogDirectory(n),l=this.extHostFileSystemInfo.extUri.joinPath(d,`${r.replace(/[\\/:\*\?"<>\|]/g,"")}.log`),f=this.loggerService.createLogger(l,{name:r},c),s=await this.proxy.$register(r,l,!0,void 0,n.identifier.value);return new w(s,r,f,this.proxy,n)}createExtensionLogDirectory(r){let c=this.extensionLogDirectoryPromise.get(r.identifier.value);if(!c){const n=this.extHostFileSystemInfo.extUri.joinPath(this.initData.logsLocation,r.identifier.value);this.extensionLogDirectoryPromise.set(r.identifier.value,c=(async()=>{try{await this.extHostFileSystem.value.createDirectory(n)}catch(d){if((0,m.toFileSystemProviderErrorCode)(d)!==m.FileSystemProviderErrorCode.FileExists)throw d}return n})())}return c}createExtHostOutputChannel(r,c){let n=!1;const d=()=>{if(n)throw new Error("Channel has been closed")};return{get name(){return r},append(l){d(),c.then(f=>f.append(l))},appendLine(l){d(),c.then(f=>f.appendLine(l))},clear(){d(),c.then(l=>l.clear())},replace(l){d(),c.then(f=>f.replace(l))},show(l,f){d(),c.then(s=>s.show(l,f))},hide(){d(),c.then(l=>l.hide())},dispose(){n=!0,c.then(l=>l.dispose())}}}createExtHostLogOutputChannel(r,c,n){const d=new o.DisposableStore,l=()=>{if(d.isDisposed)throw new Error("Channel has been closed")},f=d.add(new t.Emitter);return n.then(s=>{d.add(s),d.add(s.onDidChangeLogLevel(h=>{c=h,f.fire(h)}))}),{...this.createExtHostOutputChannel(r,n),get logLevel(){return c},onDidChangeLogLevel:f.event,trace(s,...h){l(),n.then(v=>v.trace(s,...h))},debug(s,...h){l(),n.then(v=>v.debug(s,...h))},info(s,...h){l(),n.then(v=>v.info(s,...h))},warn(s,...h){l(),n.then(v=>v.warn(s,...h))},error(s,...h){l(),n.then(v=>v.error(s,...h))},dispose(){d.dispose()}}}};u=He([We(0,S.IExtHostRpcService),We(1,T.IExtHostInitDataService),We(2,_.IExtHostConsumerFileSystem),We(3,O.IExtHostFileSystemInfo),We(4,y.ILoggerService),We(5,y.ILogService)],u),e.ExtHostOutputService=u,e.IExtHostOutputService=(0,D.createDecorator)("IExtHostOutputService")}),define(De[232],Ce([1,0,3]),function(ne,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IRemoteAgentService=e.RemoteExtensionLogFileName=void 0,e.RemoteExtensionLogFileName="remoteagent",e.IRemoteAgentService=(0,i.createDecorator)("remoteAgentService")}),define(De[233],Ce([1,0,39,13,19,21,22,2,3,163,49,178,232]),function(ne,e,i,D,S,N,y,A,_,T,O,b,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractPathService=e.IPathService=void 0,e.IPathService=(0,_.createDecorator)("pathService");let E=class tn{constructor(t,o,a,p){this.localUserHome=t,this.remoteAgentService=o,this.environmentService=a,this.contextService=p,this.resolveOS=(async()=>(await this.remoteAgentService.getEnvironment())?.os||N.OS)(),this.resolveUserHome=(async()=>{const w=await this.remoteAgentService.getEnvironment();return this.maybeUnresolvedUserHome=w?.userHome??t})()}hasValidBasename(t,o,a){return typeof o=="string"||typeof o>"u"?this.resolveOS.then(p=>this.doHasValidBasename(t,p,o)):this.doHasValidBasename(t,o,a)}doHasValidBasename(t,o,a){return t.scheme===D.Schemas.file||t.scheme===D.Schemas.vscodeRemote?(0,i.isValidBasename)(a??(0,y.basename)(t),o===1):!0}get defaultUriScheme(){return tn.findDefaultUriScheme(this.environmentService,this.contextService)}static findDefaultUriScheme(t,o){if(t.remoteAuthority)return D.Schemas.vscodeRemote;const a=(0,T.getVirtualWorkspaceScheme)(o.getWorkspace());if(a)return a;const p=o.getWorkspace().folders[0];if(p)return p.uri.scheme;const w=o.getWorkspace().configuration;return w?w.scheme:D.Schemas.file}userHome(t){return t?.preferLocal?this.localUserHome:this.resolveUserHome}get resolvedUserHome(){return this.maybeUnresolvedUserHome}get path(){return this.resolveOS.then(t=>t===1?S.win32:S.posix)}async fileURI(t){let o="";if(await this.resolveOS===1&&(t=t.replace(/\\/g,"/")),t[0]==="/"&&t[1]==="/"){const p=t.indexOf("/",2);p===-1?(o=t.substring(2),t="/"):(o=t.substring(2,p),t=t.substring(p)||"/")}return A.URI.from({scheme:D.Schemas.file,authority:o,path:t,query:"",fragment:""})}};E=He([We(1,g.IRemoteAgentService),We(2,b.IWorkbenchEnvironmentService),We(3,O.IWorkspaceContextService)],E),e.AbstractPathService=E}),define(De[101],Ce([1,0]),function(ne,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TextSearchCompleteMessageType=e.Range=e.Position=void 0;class i{constructor(y,A){this.line=y,this.character=A}isBefore(y){return!1}isBeforeOrEqual(y){return!1}isAfter(y){return!1}isAfterOrEqual(y){return!1}isEqual(y){return!1}compareTo(y){return 0}translate(y,A){return new i(0,0)}with(y){return new i(0,0)}}e.Position=i;class D{constructor(y,A,_,T){this.isEmpty=!1,this.isSingleLine=!1,this.start=new i(y,A),this.end=new i(_,T)}contains(y){return!1}isEqual(y){return!1}intersection(y){}union(y){return new D(0,0,0,0)}with(y){return new D(0,0,0,0)}}e.Range=D;var S;(function(N){N[N.Information=1]="Information",N[N.Warning=2]="Warning"})(S=e.TextSearchCompleteMessageType||(e.TextSearchCompleteMessageType={}))}),define(De[44],Ce([1,0,18,34,23,39,10,3,19,12,101,15]),function(ne,e,i,D,S,N,y,A,_,T,O,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.hasSiblingFn=e.hasSiblingPromiseFn=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.ViewMode=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 O.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 g="\u27EA ",E=" characters skipped \u27EB",m=(g.length+E.length+5)*2;e.ISearchService=(0,A.createDecorator)("searchService");var t;(function(re){re[re.file=0]="file",re[re.text=1]="text"})(t=e.SearchProviderType||(e.SearchProviderType={}));var o;(function(re){re[re.File=1]="File",re[re.Text=2]="Text"})(o=e.QueryType||(e.QueryType={}));function a(re){return!!re.preview}e.resultIsMatch=a;function p(re){return!!re.resource}e.isFileMatch=p;function w(re){return!!re.message}e.isProgressMessage=w;var u;(function(re){re[re.Normal=0]="Normal",re[re.NewSearchStarted=1]="NewSearchStarted"})(u=e.SearchCompletionExitCode||(e.SearchCompletionExitCode={}));class I{constructor(be){this.resource=be,this.results=[]}}e.FileMatch=I;class r{constructor(be,le,fe){this.ranges=le;const Y=Array.isArray(le)?le:[le];if(fe&&fe.matchLines===1&&c(Y)){be=(0,y.getNLines)(be,fe.matchLines);let ge="",Se=0,Oe=0;const Be=Math.floor(fe.charsPerLine/5),Xe=[];for(const ke of Y){const ye=Math.max(ke.startColumn-Be,0),Ie=ke.startColumn+fe.charsPerLine;if(ye>Oe+Be+m){const ae=g+(ye-Oe)+E;ge+=ae+be.slice(ye,Ie),Se+=ye-(Oe+ae.length)}else ge+=be.slice(Oe,Ie);Xe.push(new d(0,ke.startColumn-Se,ke.endColumn-Se)),Oe=Ie}this.preview={text:ge,matches:Array.isArray(this.ranges)?Xe:Xe[0]}}else{const ge=Array.isArray(le)?le[0].startLineNumber:le.startLineNumber;this.preview={text:be,matches:(0,i.mapArrayOrNot)(le,Se=>new n(Se.startLineNumber-ge,Se.startColumn,Se.endLineNumber-ge,Se.endColumn))}}}}e.TextSearchMatch=r;function c(re){const be=re[0].startLineNumber;for(const le of re)if(le.startLineNumber!==be||le.endLineNumber!==be)return!1;return!0}class n{constructor(be,le,fe,Y){this.startLineNumber=be,this.startColumn=le,this.endLineNumber=fe,this.endColumn=Y}}e.SearchRange=n;class d extends n{constructor(be,le,fe){super(be,le,be,fe)}}e.OneLineRange=d;var l;(function(re){re.List="list",re.Tree="tree"})(l=e.ViewMode||(e.ViewMode={}));var f;(function(re){re.Default="default",re.FileNames="fileNames",re.Type="type",re.Modified="modified",re.CountDescending="countDescending",re.CountAscending="countAscending"})(f=e.SearchSortOrder||(e.SearchSortOrder={}));function s(re,be=!0){const le=re&&re.files&&re.files.exclude,fe=be&&re&&re.search&&re.search.exclude;if(!le&&!fe)return;if(!le||!fe)return le||fe;let Y=Object.create(null);return Y=S.mixin(Y,S.deepClone(le)),Y=S.mixin(Y,S.deepClone(fe),!0),Y}e.getExcludes=s;function h(re,be){return re.excludePattern&&D.match(re.excludePattern,be)?!1:re.includePattern||re.usingSearchPaths?re.includePattern&&D.match(re.includePattern,be)?!0:re.usingSearchPaths?!!re.folderQueries&&re.folderQueries.some(le=>{const fe=le.folder.fsPath;if(N.isEqualOrParent(be,fe)){const Y=_.relative(fe,be);return!le.includePattern||!!D.match(le.includePattern,Y)}else return!1}):!1:!0}e.pathIncludedInQuery=h;var v;(function(re){re[re.unknownEncoding=1]="unknownEncoding",re[re.regexParseError=2]="regexParseError",re[re.globParseError=3]="globParseError",re[re.invalidLiteral=4]="invalidLiteral",re[re.rgProcessError=5]="rgProcessError",re[re.other=6]="other",re[re.canceled=7]="canceled"})(v=e.SearchErrorCode||(e.SearchErrorCode={}));class k extends Error{constructor(be,le){super(be),this.code=le}}e.SearchError=k;function F(re){const be=re.message;if((0,T.isCancellationError)(re))return new k(be,v.canceled);try{const le=JSON.parse(be);return new k(le.message,le.code)}catch{return new k(be,v.other)}}e.deserializeSearchError=F;function j(re){const be={message:re.message,code:re.code};return new Error(JSON.stringify(be))}e.serializeSearchError=j;function W(re){return re.type==="error"?!0:re.type==="success"}e.isSerializedSearchComplete=W;function H(re){return re.type==="success"}e.isSerializedSearchSuccess=H;function P(re){return!!re.path}e.isSerializedFileMatch=P;function M(re,be){const le=re.searchPath?re.searchPath:re.relativePath;return(0,y.fuzzyContains)(le,be)}e.isFilePatternMatch=M;class R{constructor(be){this.path=be,this.results=[]}addMatch(be){this.results.push(be)}serialize(){return{path:this.path,results:this.results,numMatches:this.results.length}}}e.SerializableFileMatch=R;function B(re,be){const le={...re||{},...be||{}};return Object.keys(le).filter(fe=>{const Y=le[fe];return typeof Y=="boolean"&&Y})}e.resolvePatternsForProvider=B;class ${constructor(be,le){this._parsedIncludeExpression=null,this._excludeExpression={...be.excludePattern||{},...le.excludePattern||{}},this._parsedExcludeExpression=D.parse(this._excludeExpression);let fe=be.includePattern;le.includePattern&&(fe?fe={...fe,...le.includePattern}:fe=le.includePattern),fe&&(this._parsedIncludeExpression=D.parse(fe))}matchesExcludesSync(be,le,fe){return!!(this._parsedExcludeExpression&&this._parsedExcludeExpression(be,le,fe))}includedInQuerySync(be,le,fe){return!(this._parsedExcludeExpression&&this._parsedExcludeExpression(be,le,fe)||this._parsedIncludeExpression&&!this._parsedIncludeExpression(be,le,fe))}includedInQuery(be,le,fe){const Y=this._parsedExcludeExpression(be,le,fe),ge=()=>this._parsedIncludeExpression?!!this._parsedIncludeExpression(be,le,fe):!0;return(0,b.isThenable)(Y)?Y.then(Se=>Se?!1:ge()):ge()}hasSiblingExcludeClauses(){return U(this._excludeExpression)}}e.QueryGlobTester=$;function U(re){for(const be in re)if(typeof re[be]!="boolean")return!0;return!1}function K(re){if(!re)return;let be;return le=>(be||(be=(re()||Promise.resolve([])).then(fe=>fe?de(fe):{})),be.then(fe=>!!fe[le]))}e.hasSiblingPromiseFn=K;function te(re){if(!re)return;let be;return le=>{if(!be){const fe=re();be=fe?de(fe):{}}return!!be[le]}}e.hasSiblingFn=te;function de(re){const be={};for(const le of re)be[le]=!0;return be}}),define(De[31],Ce([1,0,18,15,20,4,7,46,13,108,22,10,9,2,137,3,11,151,49,36,26,14,8,6,50,44,5]),function(ne,e,i,D,S,N,y,A,_,T,O,b,g,E,m,t,o,a,p,w,u,I,r,c,n,d,l){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IExtHostWorkspace=e.ExtHostWorkspace=void 0;function f(H,P,M){return new O.ExtUri(R=>k(R,M)).isEqual(H,P)}function s(H,P,M){return f(H.uri,P.uri,M)?0:(0,b.compare)(H.uri.toString(),P.uri.toString())}function h(H,P,M){return H.index!==P.index?H.indexM(U,K,R)),$=P.slice(0).sort((U,K)=>M(U,K,R));return(0,i.delta)(B,$,(U,K)=>M(U,K,R))}function k(H,P){const M=P.getCapabilities(H.scheme);return!(M&&M&1024)}class F extends p.Workspace{static toExtHostWorkspace(P,M,R,B){if(!P)return{workspace:null,added:[],removed:[]};const{id:$,name:U,folders:K,configuration:te,transient:de,isUntitled:re}=P,be=[],le=M;M?K.forEach((Se,Oe)=>{const Be=E.URI.revive(Se.uri),Xe=F._findFolder(R||M,Be,B);Xe?(Xe.name=Se.name,Xe.index=Se.index,be.push(Xe)):be.push({uri:Be,name:Se.name,index:Oe})}):be.push(...K.map(({uri:Se,name:Oe,index:Be})=>({uri:E.URI.revive(Se),name:Oe,index:Be}))),be.sort((Se,Oe)=>Se.indexk(Se,B)),{added:Y,removed:ge}=v(le?le.workspaceFolders:[],fe.workspaceFolders,s,B);return{workspace:fe,added:Y,removed:ge}}static _findFolder(P,M,R){for(let B=0;Bnew p.WorkspaceFolder(te)),B,$,K),this._name=M,this._isUntitled=U,this._workspaceFolders=[],this._structure=A.TernarySearchTree.forUris(K),R.forEach(te=>{this._workspaceFolders.push(te),this._structure.set(te.uri,te)})}get name(){return this._name}get isUntitled(){return this._isUntitled}get workspaceFolders(){return this._workspaceFolders.slice(0)}getWorkspaceFolder(P,M){return M&&this._structure.get(P)&&(P=(0,O.dirname)(P)),this._structure.findSubstr(P)}resolveWorkspaceFolder(P){return this._structure.get(P)}}let j=class{constructor(P,M,R,B,$){this._onDidChangeWorkspace=new N.Emitter,this.onDidChangeWorkspace=this._onDidChangeWorkspace.event,this._onDidGrantWorkspaceTrust=new N.Emitter,this.onDidGrantWorkspaceTrust=this._onDidGrantWorkspaceTrust.event,this._activeSearchCallbacks=[],this._trusted=!1,this._editSessionIdentityProviders=new Map,this._providerHandlePool=0,this._logService=B,this._extHostFileSystemInfo=R,this._uriTransformerService=$,this._requestIdProvider=new T.Counter,this._barrier=new D.Barrier,this._proxy=P.getProxy(l.MainContext.MainThreadWorkspace),this._messageService=P.getProxy(l.MainContext.MainThreadMessageService);const U=M.workspace;this._confirmedWorkspace=U?new F(U.id,U.name,[],!!U.transient,U.configuration?E.URI.revive(U.configuration):null,!!U.isUntitled,K=>k(K,R)):void 0}$initializeWorkspace(P,M){this._trusted=M,this.$acceptWorkspaceData(P),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?E.URI.from({scheme:_.Schemas.untitled,path:(0,O.basename)((0,O.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(P,M,R,...B){const $=[];if(Array.isArray(B)&&B.forEach(re=>{E.URI.isUri(re.uri)&&!$.some(be=>f(be.uri,re.uri,this._extHostFileSystemInfo))&&$.push({uri:re.uri,name:re.name||(0,O.basenameOrAuthority)(re.uri)})}),this._unconfirmedWorkspace||[M,R].some(re=>typeof re!="number"||re<0)||R===0&&$.length===0)return!1;const U=this._actualWorkspace?this._actualWorkspace.workspaceFolders:[];if(M+R>U.length)return!1;const K=U.slice(0);K.splice(M,R,...$.map(re=>({uri:re.uri,name:re.name||(0,O.basenameOrAuthority)(re.uri),index:void 0})));for(let re=0;refe!==re&&f(be.uri,le.uri,this._extHostFileSystemInfo)))return!1}K.forEach((re,be)=>re.index=be);const{added:te,removed:de}=v(U,K,h,this._extHostFileSystemInfo);if(te.length===0&&de.length===0)return!1;if(this._proxy){const re=P.displayName||P.name;this._proxy.$updateWorkspaceFolders(re,M,R,$).then(void 0,be=>{this._unconfirmedWorkspace=void 0;const le={source:{identifier:P.identifier,label:P.displayName||P.name}};this._messageService.$showMessage(a.Severity.Error,(0,m.localize)(0,null,re,be.toString()),le,[])})}return this.trySetWorkspaceFolders(K),!0}getWorkspaceFolder(P,M){if(!!this._actualWorkspace)return this._actualWorkspace.getWorkspaceFolder(P,M)}async getWorkspaceFolder2(P,M){if(await this._barrier.wait(),!!this._actualWorkspace)return this._actualWorkspace.getWorkspaceFolder(P,M)}async resolveWorkspaceFolder(P){if(await this._barrier.wait(),!!this._actualWorkspace)return this._actualWorkspace.resolveWorkspaceFolder(P)}getPath(){if(!this._actualWorkspace)return;const{folders:P}=this._actualWorkspace;if(P.length!==0)return P[0].uri.fsPath}getRelativePath(P,M){let R,B="";if(typeof P=="string"?(R=E.URI.file(P),B=P):typeof P<"u"&&(R=P,B=P.fsPath),!R)return B;const $=this.getWorkspaceFolder(R,!0);if(!$)return B;typeof M>"u"&&this._actualWorkspace&&(M=this._actualWorkspace.folders.length>1);let U=(0,O.relativePath)($.uri,R);return M&&$.name&&(U=`${$.name}/${U}`),U}trySetWorkspaceFolders(P){this._actualWorkspace&&(this._unconfirmedWorkspace=F.toExtHostWorkspace({id:this._actualWorkspace.id,name:this._actualWorkspace.name,configuration:this._actualWorkspace.configuration,folders:P,isUntitled:this._actualWorkspace.isUntitled},this._actualWorkspace,void 0,this._extHostFileSystemInfo).workspace||void 0)}$acceptWorkspaceData(P){const{workspace:M,added:R,removed:B}=F.toExtHostWorkspace(P,this._confirmedWorkspace,this._unconfirmedWorkspace,this._extHostFileSystemInfo);this._confirmedWorkspace=M||void 0,this._unconfirmedWorkspace=void 0,this._onDidChangeWorkspace.fire(Object.freeze({added:R,removed:B}))}findFiles(P,M,R,B,$=S.CancellationToken.None){this._logService.trace(`extHostWorkspace#findFiles: fileSearch, extension: ${B.value}, entryPoint: findFiles`);let U;if(M===null?U=!1:M&&(typeof M=="string"?U=M:U=M.pattern),$&&$.isCancellationRequested)return Promise.resolve([]);const{includePattern:K,folder:te}=W(r.GlobPattern.from(P));return this._proxy.$startFileSearch((0,g.withUndefinedAsNull)(K),(0,g.withUndefinedAsNull)(te),(0,g.withUndefinedAsNull)(U),(0,g.withUndefinedAsNull)(R),$).then(de=>Array.isArray(de)?de.map(re=>E.URI.revive(re)):[])}async findTextInFiles(P,M,R,B,$=S.CancellationToken.None){this._logService.trace(`extHostWorkspace#findTextInFiles: textSearch, extension: ${B.value}, entryPoint: findTextInFiles`);const U=this._requestIdProvider.getNext(),K=typeof M.previewOptions>"u"?{matchLines:100,charsPerLine:1e4}:M.previewOptions,{includePattern:te,folder:de}=W(r.GlobPattern.from(M.include)),re=typeof M.exclude=="string"?M.exclude:M.exclude?M.exclude.pattern:void 0,be={ignoreSymlinks:typeof M.followSymlinks=="boolean"?!M.followSymlinks:void 0,disregardIgnoreFiles:typeof M.useIgnoreFiles=="boolean"?!M.useIgnoreFiles:void 0,disregardGlobalIgnoreFiles:typeof M.useGlobalIgnoreFiles=="boolean"?!M.useGlobalIgnoreFiles:void 0,disregardParentIgnoreFiles:typeof M.useParentIgnoreFiles=="boolean"?!M.useParentIgnoreFiles:void 0,disregardExcludeSettings:typeof M.useDefaultExcludes=="boolean"?!M.useDefaultExcludes:!0,fileEncoding:M.encoding,maxResults:M.maxResults,previewOptions:K,afterContext:M.afterContext,beforeContext:M.beforeContext,includePattern:te,excludePattern:re},le=!1;if(this._activeSearchCallbacks[U]=fe=>{if(le)return;const Y=E.URI.revive(fe.resource);fe.results.forEach(ge=>{(0,d.resultIsMatch)(ge)?R({uri:Y,preview:{text:ge.preview.text,matches:(0,i.mapArrayOrNot)(ge.preview.matches,Se=>new c.Range(Se.startLineNumber,Se.startColumn,Se.endLineNumber,Se.endColumn))},ranges:(0,i.mapArrayOrNot)(ge.ranges,Se=>new c.Range(Se.startLineNumber,Se.startColumn,Se.endLineNumber,Se.endColumn))}):R({uri:Y,text:ge.text,lineNumber:ge.lineNumber})})},$.isCancellationRequested)return{};try{const fe=await this._proxy.$startTextSearch(P,(0,g.withUndefinedAsNull)(de),be,U,$);return delete this._activeSearchCallbacks[U],fe||{}}catch(fe){throw delete this._activeSearchCallbacks[U],fe}}$handleTextSearchResult(P,M){this._activeSearchCallbacks[M]?.(P)}saveAll(P){return this._proxy.$saveAll(P)}resolveProxy(P){return this._proxy.$resolveProxy(P)}get trusted(){return this._trusted}requestWorkspaceTrust(P){return this._proxy.$requestWorkspaceTrust(P)}$onDidGrantWorkspaceTrust(){this._trusted||(this._trusted=!0,this._onDidGrantWorkspaceTrust.fire())}registerEditSessionIdentityProvider(P,M){if(this._editSessionIdentityProviders.has(P))throw new Error(`A provider has already been registered for scheme ${P}`);this._editSessionIdentityProviders.set(P,M);const R=this._uriTransformerService.transformOutgoingScheme(P),B=this._providerHandlePool++;return this._proxy.$registerEditSessionIdentityProvider(B,R),(0,y.toDisposable)(()=>{this._editSessionIdentityProviders.delete(P),this._proxy.$unregisterEditSessionIdentityProvider(B)})}async $getEditSessionIdentifier(P,M){this._logService.info("Getting edit session identifier for workspaceFolder",P);const R=await this.resolveWorkspaceFolder(E.URI.revive(P));if(!R){this._logService.warn("Unable to resolve workspace folder");return}this._logService.info("Invoking #provideEditSessionIdentity for workspaceFolder",R);const B=this._editSessionIdentityProviders.get(R.uri.scheme);if(this._logService.info(`Provider for scheme ${R.uri.scheme} is defined: `,!!B),!B)return;const $=await B.provideEditSessionIdentity(R,M);if(this._logService.info("Provider returned edit session identifier: ",$),!!$)return $}async $provideEditSessionIdentityMatch(P,M,R,B){this._logService.info("Getting edit session identifier for workspaceFolder",P);const $=await this.resolveWorkspaceFolder(E.URI.revive(P));if(!$){this._logService.warn("Unable to resolve workspace folder");return}this._logService.info("Invoking #provideEditSessionIdentity for workspaceFolder",$);const U=this._editSessionIdentityProviders.get($.uri.scheme);if(this._logService.info(`Provider for scheme ${$.uri.scheme} is defined: `,!!U),!U)return;const K=await U.provideEditSessionIdentityMatch?.(M,R,B);if(this._logService.info("Provider returned edit session identifier match result: ",K),!!K)return K}};j=He([We(0,I.IExtHostRpcService),We(1,u.IExtHostInitDataService),We(2,w.IExtHostFileSystemInfo),We(3,o.ILogService),We(4,n.IURITransformerService)],j),e.ExtHostWorkspace=j,e.IExtHostWorkspace=(0,t.createDecorator)("IExtHostWorkspace");function W(H){let P,M;return H&&(typeof H=="string"?P=H:(P=H.pattern,M=E.URI.revive(H.baseUri))),{includePattern:P,folder:M}}}),define(De[32],Ce([1,0,23,4,31,5,6,154,89,9,15,3,14,11,2]),function(ne,e,i,D,S,N,y,A,_,T,O,b,g,E,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IExtHostConfiguration=e.ExtHostConfigProvider=e.ExtHostConfiguration=void 0;function t(c,n){if(n){const d=n.split(".");let l=c;for(let f=0;l&&fthis._actual)}$initializeConfiguration(n){this._actual=new r(this._proxy,this._extHostWorkspace,n,this._logService),this._barrier.open()}$acceptConfigurationChanged(n,d){this.getConfigProvider().then(l=>l.$acceptConfigurationChanged(n,d))}};I=He([We(0,g.IExtHostRpcService),We(1,S.IExtHostWorkspace),We(2,E.ILogService)],I),e.ExtHostConfiguration=I;class r{constructor(n,d,l,f){this._onDidChangeConfiguration=new D.Emitter,this._proxy=n,this._logService=f,this._extHostWorkspace=d,this._configuration=A.Configuration.parse(l),this._configurationScopes=this._toMap(l.configurationScopes)}get onDidChangeConfiguration(){return this._onDidChangeConfiguration&&this._onDidChangeConfiguration.event}$acceptConfigurationChanged(n,d){const l={data:this._configuration.toData(),workspace:this._extHostWorkspace.workspace};this._configuration=A.Configuration.parse(n),this._configurationScopes=this._toMap(n.configurationScopes),this._onDidChangeConfiguration.fire(this._toConfigurationChangeEvent(d,l))}getConfiguration(n,d,l){const f=u(d)||{},s=this._toReadonlyValue(n?t(this._configuration.getValue(void 0,f,this._extHostWorkspace.workspace),n):this._configuration.getValue(void 0,f,this._extHostWorkspace.workspace));n&&this._validateConfigurationAccess(n,f,l?.identifier);function h(k){if(k==null)return null;if(typeof k=="boolean")return k?2:5;switch(k){case y.ConfigurationTarget.Global:return 2;case y.ConfigurationTarget.Workspace:return 5;case y.ConfigurationTarget.WorkspaceFolder:return 6}}const v={has(k){return typeof t(s,k)<"u"},get:(k,F)=>{this._validateConfigurationAccess(n?`${n}.${k}`:k,f,l?.identifier);let j=t(s,k);if(typeof j>"u")j=F;else{let W;const H=(P,M)=>{let R;const B=()=>{W=W||(0,i.deepClone)(s),R=R||t(W,M)};return(0,T.isObject)(P)?new Proxy(P,{get:($,U)=>{if(typeof U=="string"&&U.toLowerCase()==="tojson")return B(),()=>R;if(W)return R=R||t(W,M),R[U];const K=$[U];return typeof U=="string"?H(K,`${M}.${U}`):K},set:($,U,K)=>(B(),R&&(R[U]=K),!0),deleteProperty:($,U)=>(B(),R&&delete R[U],!0),defineProperty:($,U,K)=>(B(),R&&Object.defineProperty(R,U,K),!0)}):P};j=H(j,k)}return j},update:(k,F,j,W)=>{k=n?`${n}.${k}`:k;const H=h(j);return F!==void 0?this._proxy.$updateConfigurationOption(H,k,F,f,W):this._proxy.$removeConfigurationOption(H,k,f,W)},inspect:k=>{k=n?`${n}.${k}`:k;const F=this._configuration.inspect(k,f,this._extHostWorkspace.workspace);if(F)return{key:k,defaultValue:(0,i.deepClone)(F.policy?.value??F.default?.value),globalValue:(0,i.deepClone)(F.user?.value??F.application?.value),workspaceValue:(0,i.deepClone)(F.workspace?.value),workspaceFolderValue:(0,i.deepClone)(F.workspaceFolder?.value),defaultLanguageValue:(0,i.deepClone)(F.default?.override),globalLanguageValue:(0,i.deepClone)(F.user?.override??F.application?.override),workspaceLanguageValue:(0,i.deepClone)(F.workspace?.override),workspaceFolderLanguageValue:(0,i.deepClone)(F.workspaceFolder?.override),languageIds:(0,i.deepClone)(F.overrideIdentifiers)}}};return typeof s=="object"&&(0,i.mixin)(v,s,!1),Object.freeze(v)}_toReadonlyValue(n){const d=l=>(0,T.isObject)(l)?new Proxy(l,{get:(f,s)=>d(f[s]),set:(f,s,h)=>{throw new Error(`TypeError: Cannot assign to read only property '${String(s)}' of object`)},deleteProperty:(f,s)=>{throw new Error(`TypeError: Cannot delete read only property '${String(s)}' of object`)},defineProperty:(f,s)=>{throw new Error(`TypeError: Cannot define property '${String(s)}' for a readonly object`)},setPrototypeOf:f=>{throw new Error("TypeError: Cannot set prototype for a readonly object")},isExtensible:()=>!1,preventExtensions:()=>!0}):l;return d(n)}_validateConfigurationAccess(n,d,l){const f=_.OVERRIDE_PROPERTY_REGEX.test(n)?4:this._configurationScopes.get(n),s=l?`[${l.value}] `:"";if(f===4){typeof d?.resource>"u"&&this._logService.warn(`${s}Accessing a resource scoped configuration without providing a resource is not expected. To get the effective value for '${n}', provide the URI of a resource or 'null' for any resource.`);return}if(f===3){d?.resource&&this._logService.warn(`${s}Accessing a window scoped configuration for a resource is not expected. To associate '${n}' to a resource, define its scope to 'resource' in configuration contributions in 'package.json'.`);return}}_toConfigurationChangeEvent(n,d){const l=new A.ConfigurationChangeEvent(n,d,this._configuration,this._extHostWorkspace.workspace);return Object.freeze({affectsConfiguration:(f,s)=>l.affectsConfiguration(f,u(s))})}_toMap(n){return n.reduce((d,l)=>(d.set(l[0],l[1]),d),new Map)}}e.ExtHostConfigProvider=r,e.IExtHostConfiguration=(0,b.createDecorator)("IExtHostConfiguration")});var Je=this&&this.__classPrivateFieldSet||function(ne,e,i,D,S){if(D==="m")throw new TypeError("Private method is not writable");if(D==="a"&&!S)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?ne!==e||!S:!e.has(ne))throw new TypeError("Cannot write private member to an object whose class did not declare it");return D==="a"?S.call(ne,i):S?S.value=i:e.set(ne,i),i},Re=this&&this.__classPrivateFieldGet||function(ne,e,i,D){if(i==="a"&&!D)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?ne!==e||!D:!e.has(ne))throw new TypeError("Cannot read private member from an object whose class did not declare it");return i==="m"?D:i==="a"?D.call(ne):D?D.value:e.get(ne)};define(De[102],Ce([1,0,2,15,4,5,6,31,53,32,20,56,14,26,3,13,21,11,71,191,12]),function(ne,e,i,D,S,N,y,A,_,T,O,b,g,E,m,t,o,a,p,w,u){"use strict";var I;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 r;(function(M){function R($){if($!=null)return $}M.from=R;function B($){if($!=null)return $}M.to=B})(r=e.TaskDefinitionDTO||(e.TaskDefinitionDTO={}));var c;(function(M){function R($){if($!=null)return $}M.from=R;function B($){if($!=null)return $}M.to=B})(c=e.TaskPresentationOptionsDTO||(e.TaskPresentationOptionsDTO={}));var n;(function(M){function R($){if($!=null)return $}M.from=R;function B($){if($!=null)return $}M.to=B})(n=e.ProcessExecutionOptionsDTO||(e.ProcessExecutionOptionsDTO={}));var d;(function(M){function R(U){if(U){const K=U;return K&&!!K.process}else return!1}M.is=R;function B(U){if(U==null)return;const K={process:U.process,args:U.args};return U.options&&(K.options=n.from(U.options)),K}M.from=B;function $(U){if(U!=null)return new y.ProcessExecution(U.process,U.args,U.options)}M.to=$})(d=e.ProcessExecutionDTO||(e.ProcessExecutionDTO={}));var l;(function(M){function R($){if($!=null)return $}M.from=R;function B($){if($!=null)return $}M.to=B})(l=e.ShellExecutionOptionsDTO||(e.ShellExecutionOptionsDTO={}));var f;(function(M){function R(U){if(U){const K=U;return K&&(!!K.commandLine||!!K.command)}else return!1}M.is=R;function B(U){if(U==null)return;const K={};return U.commandLine!==void 0?K.commandLine=U.commandLine:(K.command=U.command,K.args=U.args),U.options&&(K.options=l.from(U.options)),K}M.from=B;function $(U){if(!(U==null||U.command===void 0&&U.commandLine===void 0))return U.commandLine?new y.ShellExecution(U.commandLine,U.options):new y.ShellExecution(U.command,U.args?U.args:[],U.options)}M.to=$})(f=e.ShellExecutionDTO||(e.ShellExecutionDTO={}));var s;(function(M){function R(U){if(U){const K=U;return K&&K.customExecution==="customExecution"}else return!1}M.is=R;function B(U){return{customExecution:"customExecution"}}M.from=B;function $(U,K){return K.get(U)}M.to=$})(s=e.CustomExecutionDTO||(e.CustomExecutionDTO={}));var h;(function(M){function R(B,$){let U;return B.scope!==void 0&&typeof B.scope!="number"?U=B.scope.uri:B.scope!==void 0&&typeof B.scope=="number"&&(B.scope===y.TaskScope.Workspace&&$&&$.workspaceFile?U=$.workspaceFile:U=w.USER_TASKS_GROUP_KEY),{id:B._id,workspaceFolder:U}}M.from=R})(h=e.TaskHandleDTO||(e.TaskHandleDTO={}));var v;(function(M){function R(B){if(B!=null)return{_id:B.id,isDefault:B.isDefault}}M.from=R})(v=e.TaskGroupDTO||(e.TaskGroupDTO={}));var k;(function(M){function R(U,K){if(U==null)return[];const te=[];for(const de of U){const re=B(de,K);re&&te.push(re)}return te}M.fromMany=R;function B(U,K){if(U==null)return;let te;U.execution instanceof y.ProcessExecution?te=d.from(U.execution):U.execution instanceof y.ShellExecution?te=f.from(U.execution):U.execution&&U.execution instanceof y.CustomExecution&&(te=s.from(U.execution));const de=r.from(U.definition);let re;return U.scope?typeof U.scope=="number"?re=U.scope:re=U.scope.uri:re=y.TaskScope.Workspace,!de||!re?void 0:{_id:U._id,definition:de,name:U.name,source:{extensionId:K.identifier.value,label:U.source,scope:re},execution:te,isBackground:U.isBackground,group:v.from(U.group),presentationOptions:c.from(U.presentationOptions),problemMatchers:U.problemMatchers,hasDefinedMatchers:U.hasDefinedMatchers,runOptions:U.runOptions?U.runOptions:{reevaluateOnRerun:!0},detail:U.detail}}M.from=B;async function $(U,K,te){if(U==null)return;let de;d.is(U.execution)?de=d.to(U.execution):f.is(U.execution)?de=f.to(U.execution):s.is(U.execution)&&(de=s.to(U._id,te));const re=r.to(U.definition);let be;if(U.source&&(U.source.scope!==void 0?typeof U.source.scope=="number"?be=U.source.scope:be=await K.resolveWorkspaceFolder(i.URI.revive(U.source.scope)):be=y.TaskScope.Workspace),!re||!be)return;const le=new y.Task(re,be,U.name,U.source.label,de,U.problemMatchers);return U.isBackground!==void 0&&(le.isBackground=U.isBackground),U.group!==void 0&&(le.group=y.TaskGroup.from(U.group._id),le.group&&U.group.isDefault&&(le.group=new y.TaskGroup(le.group.id,le.group.label),U.group.isDefault===!0&&(le.group.isDefault=U.group.isDefault))),U.presentationOptions&&(le.presentationOptions=c.to(U.presentationOptions)),U._id&&(le._id=U._id),U.detail&&(le.detail=U.detail),le}M.to=$})(k=e.TaskDTO||(e.TaskDTO={}));var F;(function(M){function R($){return $}M.from=R;function B($){if(!!$)return Object.assign(Object.create(null),$)}M.to=B})(F=e.TaskFilterDTO||(e.TaskFilterDTO={}));class j{constructor(R,B,$){this._id=B,this._task=$,I.set(this,void 0),Je(this,I,R,"f")}get task(){return this._task}terminate(){Re(this,I,"f").terminateTask(this)}fireDidStartProcess(R){}fireDidEndProcess(R){}}I=new WeakMap;var W;(function(M){function R(B){return{id:B._id,task:void 0}}M.from=R})(W=e.TaskExecutionDTO||(e.TaskExecutionDTO={}));let H=class{constructor(R,B,$,U,K,te,de,re){this._onDidExecuteTask=new S.Emitter,this._onDidTerminateTask=new S.Emitter,this._onDidTaskProcessStarted=new S.Emitter,this._onDidTaskProcessEnded=new S.Emitter,this._proxy=R.getProxy(N.MainContext.MainThreadTask),this._workspaceProvider=$,this._editorService=U,this._configurationService=K,this._terminalService=te,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=de,this._deprecationService=re,this._proxy.$registerSupportedExecutions(!0)}registerTaskProvider(R,B,$){if(!$)return new y.Disposable(()=>{});const U=this.nextHandle();return this._handlers.set(U,{type:B,provider:$,extension:R}),this._proxy.$registerTaskProvider(U,B),new y.Disposable(()=>{this._handlers.delete(U),this._proxy.$unregisterTaskProvider(U)})}registerTaskSystem(R,B){this._proxy.$registerTaskSystem(R,B)}fetchTasks(R){return this._proxy.$fetchTasks(F.from(R)).then(async B=>{const $=[];for(const U of B){const K=await k.to(U,this._workspaceProvider,this._providedCustomExecutions2);K&&$.push(K)}return $})}get taskExecutions(){const R=[];return this._taskExecutions.forEach(B=>R.push(B)),R}terminateTask(R){if(!(R instanceof j))throw new Error("No valid task execution provided");return this._proxy.$terminateTask(R._id)}get onDidStartTask(){return this._onDidExecuteTask.event}async $onDidStartTask(R,B,$){const U=this._providedCustomExecutions2.get(R.id);U&&(this._activeCustomExecutions2.set(R.id,U),this._terminalService.attachPtyToTerminal(B,await U.callback($))),this._lastStartedTask=R.id,this._onDidExecuteTask.fire({execution:await this.getTaskExecution(R)})}get onDidEndTask(){return this._onDidTerminateTask.event}async $OnDidEndTask(R){const B=await this.getTaskExecution(R);this._taskExecutionPromises.delete(R.id),this._taskExecutions.delete(R.id),this.customExecutionComplete(R),this._onDidTerminateTask.fire({execution:B})}get onDidStartTaskProcess(){return this._onDidTaskProcessStarted.event}async $onDidStartTaskProcess(R){const B=await this.getTaskExecution(R.id);this._onDidTaskProcessStarted.fire({execution:B,processId:R.processId})}get onDidEndTaskProcess(){return this._onDidTaskProcessEnded.event}async $onDidEndTaskProcess(R){const B=await this.getTaskExecution(R.id);this._onDidTaskProcessEnded.fire({execution:B,exitCode:R.exitCode})}$provideTasks(R,B){const $=this._handlers.get(R);if(!$)return Promise.reject(new Error("no handler found"));const U=[],K=(0,D.asPromise)(()=>$.provider.provideTasks(O.CancellationToken.None)).then(te=>this.provideTasksInternal(B,U,$,te));return new Promise(te=>{K.then(de=>{Promise.all(U).then(()=>{te(de)})})})}async $resolveTask(R,B){const $=this._handlers.get(R);if(!$)return Promise.reject(new Error("no handler found"));if(B.definition.type!==$.type)throw new Error(`Unexpected: Task of type [${B.definition.type}] cannot be resolved by provider of type [${$.type}].`);const U=await k.to(B,this._workspaceProvider,this._providedCustomExecutions2);if(!U)throw new Error("Unexpected: Task cannot be resolved.");const K=await $.provider.resolveTask(U,O.CancellationToken.None);if(!K)return;this.checkDeprecation(K,$);const te=k.from(K,$.extension);if(!te)throw new Error("Unexpected: Task cannot be resolved.");if(K.definition!==U.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 s.is(te.execution)&&await this.addCustomExecution(te,K,!0),await this.resolveTaskInternal(te)}nextHandle(){return this._handleCounter++}async addCustomExecution(R,B,$){const U=await this._proxy.$createTaskId(R);!$&&!this._providedCustomExecutions2.has(U)&&(this._notProvidedCustomExecutions.add(U),this._activeCustomExecutions2.set(U,B.execution)),this._providedCustomExecutions2.set(U,B.execution)}async getTaskExecution(R,B){if(typeof R=="string"){const K=this._taskExecutionPromises.get(R);if(!K)throw new u.ErrorNoTelemetry("Unexpected: The specified task is missing an execution");return K}const $=this._taskExecutionPromises.get(R.id);if($)return $;const U=new Promise((K,te)=>{function de(re,be,le){le?K(new j(re,be.id,le)):te("Unexpected: Task does not exist.")}B?de(this,R,B):k.to(R.task,this._workspaceProvider,this._providedCustomExecutions2).then(re=>de(this,R,re))});return this._taskExecutionPromises.set(R.id,U),U.then(K=>(this._taskExecutions.set(R.id,K),K),K=>Promise.reject(K))}checkDeprecation(R,B){R._deprecated&&this._deprecationService.report("Task.constructor",B.extension,"Use the Task constructor that takes a `scope` instead.")}customExecutionComplete(R){this._activeCustomExecutions2.get(R.id)&&this._activeCustomExecutions2.delete(R.id),this._notProvidedCustomExecutions.has(R.id)&&this._lastStartedTask!==R.id&&(this._providedCustomExecutions2.delete(R.id),this._notProvidedCustomExecutions.delete(R.id));const $=this._notProvidedCustomExecutions.values();let U=$.next();for(;!U.done;)!this._activeCustomExecutions2.has(U.value)&&this._lastStartedTask!==U.value&&(this._providedCustomExecutions2.delete(U.value),this._notProvidedCustomExecutions.delete(U.value)),U=$.next()}};H=He([We(0,g.IExtHostRpcService),We(1,E.IExtHostInitDataService),We(2,A.IExtHostWorkspace),We(3,_.IExtHostDocumentsAndEditors),We(4,T.IExtHostConfiguration),We(5,b.IExtHostTerminalService),We(6,a.ILogService),We(7,p.IExtHostApiDeprecationService)],H),e.ExtHostTaskBase=H;let P=class extends H{constructor(R,B,$,U,K,te,de,re){super(R,B,$,U,K,te,de,re),this.registerTaskSystem(t.Schemas.vscodeRemote,{scheme:t.Schemas.vscodeRemote,authority:"",platform:o.PlatformToString(0)})}async executeTask(R,B){if(!B.execution)throw new Error("Tasks to execute must include an execution");const $=k.from(B,R);if($===void 0)throw new Error("Task is not valid");if(s.is($.execution))await this.addCustomExecution($,B,!1);else throw new u.NotSupportedError;const U=await this.getTaskExecution(await this._proxy.$getTaskExecution($),B);return this._proxy.$executeTask($).catch(K=>{throw new Error(K)}),U}provideTasksInternal(R,B,$,U){const K=[];if(U)for(const te of U){this.checkDeprecation(te,$),(!te.definition||!R[te.definition.type])&&this._logService.warn(`The task [${te.source}, ${te.name}] uses an undefined task type. The task will be ignored in the future.`);const de=k.from(te,$.extension);de&&s.is(de.execution)?(K.push(de),B.push(this.addCustomExecution(de,te,!0))):this._logService.warn("Only custom execution tasks supported.")}return{tasks:K,extension:$.extension}}async resolveTaskInternal(R){if(s.is(R.execution))return R;this._logService.warn("Only custom execution tasks supported.")}async $resolveVariables(R,B){return{process:void 0,variables:Object.create(null)}}async $jsonTasksSupported(){return!1}async $findExecutable(R,B,$){}};P=He([We(0,g.IExtHostRpcService),We(1,E.IExtHostInitDataService),We(2,A.IExtHostWorkspace),We(3,_.IExtHostDocumentsAndEditors),We(4,T.IExtHostConfiguration),We(5,b.IExtHostTerminalService),We(6,a.ILogService),We(7,p.IExtHostApiDeprecationService)],P),e.WorkerExtHostTask=P,e.IExtHostTask=(0,m.createDecorator)("IExtHostTask")}),define(De[234],Ce([1,0,19,20,45,34,22,209,44]),function(ne,e,i,D,S,N,y,A,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FileSearchManager=void 0;class T{constructor(g,E,m){this.config=g,this.provider=E,this.sessionToken=m,this.isLimitHit=!1,this.resultCount=0,this.isCanceled=!1,this.filePattern=g.filePattern,this.includePattern=g.includePattern&&N.parse(g.includePattern),this.maxResults=g.maxResults||void 0,this.exists=g.exists,this.activeCancellationTokens=new Set,this.globalExcludePattern=g.excludePattern&&N.parse(g.excludePattern)}cancel(){this.isCanceled=!0,this.activeCancellationTokens.forEach(g=>g.cancel()),this.activeCancellationTokens=new Set}search(g){const E=this.config.folderQueries||[];return new Promise((m,t)=>{const o=a=>{this.resultCount++,g(a)};if(this.isCanceled)return m({limitHit:this.isLimitHit});this.config.extraFileResources&&this.config.extraFileResources.forEach(a=>{const p=a.toString(),w=i.basename(p);this.globalExcludePattern&&this.globalExcludePattern(p,w)||this.matchFile(o,{base:a,basename:w})}),Promise.all(E.map(a=>this.searchInFolder(a,o))).then(a=>{m({limitHit:this.isLimitHit,stats:a[0]||void 0})},a=>{t(new Error((0,S.toErrorMessage)(a)))})})}async searchInFolder(g,E){const m=new D.CancellationTokenSource,t=this.getSearchOptionsForFolder(g),o=this.initDirectoryTree(),a=new _.QueryGlobTester(this.config,g),p=!a.hasSiblingExcludeClauses();let w;try{this.activeCancellationTokens.add(m),w=A.StopWatch.create();const u=await this.provider.provideFileSearchResults({pattern:this.config.filePattern||""},t,m.token),I=w.elapsed(),r=A.StopWatch.create();return this.isCanceled&&!this.isLimitHit||(u&&u.forEach(c=>{const n=i.posix.relative(g.folder.path,c.path);if(p){const d=i.basename(c.path);this.matchFile(E,{base:g.folder,relativePath:n,basename:d});return}this.addDirectoryEntries(o,g.folder,n,E)}),this.isCanceled&&!this.isLimitHit)?null:(this.matchDirectoryTree(o,a,E),{providerTime:I,postProcessTime:r.elapsed()})}finally{m.dispose(),this.activeCancellationTokens.delete(m)}}getSearchOptionsForFolder(g){const E=(0,_.resolvePatternsForProvider)(this.config.includePattern,g.includePattern),m=(0,_.resolvePatternsForProvider)(this.config.excludePattern,g.excludePattern);return{folder:g.folder,excludes:m,includes:E,useIgnoreFiles:!g.disregardIgnoreFiles,useGlobalIgnoreFiles:!g.disregardGlobalIgnoreFiles,useParentIgnoreFiles:!g.disregardParentIgnoreFiles,followSymlinks:!g.ignoreSymlinks,maxResults:this.config.maxResults,session:this.sessionToken}}initDirectoryTree(){const g={rootEntries:[],pathToEntries:Object.create(null)};return g.pathToEntries["."]=g.rootEntries,g}addDirectoryEntries({pathToEntries:g},E,m,t){if(m===this.filePattern){const a=i.basename(this.filePattern);this.matchFile(t,{base:E,relativePath:this.filePattern,basename:a})}function o(a){const p=i.basename(a),w=i.dirname(a);let u=g[w];u||(u=g[w]=[],o(w)),u.push({base:E,relativePath:a,basename:p})}o(m)}matchDirectoryTree({rootEntries:g,pathToEntries:E},m,t){const o=this,a=this.filePattern;function p(w){const u=(0,_.hasSiblingFn)(()=>w.map(I=>I.basename));for(let I=0,r=w.length;I=this.maxResults)&&(this.isLimitHit=!0,this.cancel()),this.isLimitHit||g(E))}}class O{constructor(){this.sessions=new Map}fileSearch(g,E,m,t){const o=this.getSessionTokenSource(g.cacheKey),a=new T(g,E,o&&o.token);let p=0;const w=u=>{p+=u.length,m(u.map(I=>this.rawMatchToSearchItem(I)))};return this.doSearch(a,O.BATCH_SIZE,w,t).then(u=>({limitHit:u.limitHit,stats:{fromCache:!1,type:"fileSearchProvider",resultCount:p,detailStats:u.stats}}))}clearCache(g){this.getSessionTokenSource(g)?.cancel()}getSessionTokenSource(g){if(!!g)return this.sessions.has(g)||this.sessions.set(g,new D.CancellationTokenSource),this.sessions.get(g)}rawMatchToSearchItem(g){return g.relativePath?{resource:y.joinPath(g.base,g.relativePath)}:{resource:g.base}}doSearch(g,E,m,t){t.onCancellationRequested(()=>{g.cancel()});const o=p=>{p&&(a.push(p),E>0&&a.length>=E&&(m(a),a=[]))};let a=[];return g.search(o).then(p=>(a.length&&m(a),p),p=>(a.length&&m(a),Promise.reject(p)))}}e.FileSearchManager=O,O.BATCH_SIZE=512}),define(De[235],Ce([1,0,18,77,34,82,28,13,19,22,10,9,2,251,145,40,11,49,93,233,44]),function(ne,e,i,D,S,N,y,A,_,T,O,b,g,E,m,t,o,a,p,w,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.resolveResourcesForSearchIncludes=e.QueryBuilder=void 0;let I=class{constructor(v,k,F,j,W){this.configurationService=v,this.workspaceContextService=k,this.editorGroupsService=F,this.logService=j,this.pathService=W}text(v,k,F={}){v=this.getContentPattern(v,F);const j=this.configurationService.getValue(),W=k&&k.some(P=>!this.configurationService.getValue({resource:P}).search.useRipgrep);return{...this.commonQuery(k?.map(a.toWorkspaceFolder),F),type:2,contentPattern:v,previewOptions:F.previewOptions,maxFileSize:F.maxFileSize,usePCRE2:j.search.usePCRE2||W||!1,beforeContext:F.beforeContext,afterContext:F.afterContext,userDisabledExcludesAndIgnoreFiles:F.disregardExcludeSettings&&F.disregardIgnoreFiles}}getContentPattern(v,k){const F=this.configurationService.getValue();v.isRegExp&&(v.pattern=v.pattern.replace(/\r?\n/g,"\\n"));const j={...v,wordSeparators:F.editor.wordSeparators};return this.isCaseSensitive(v,k)&&(j.isCaseSensitive=!0),this.isMultiline(v)&&(j.isMultiline=!0),j}file(v,k={}){return{...this.commonQuery(v,k),type:1,filePattern:k.filePattern?k.filePattern.trim():k.filePattern,exists:k.exists,sortByScore:k.sortByScore,cacheKey:k.cacheKey}}handleIncludeExclude(v,k){return v?(v=Array.isArray(v)?v.map(l):l(v),k?this.parseSearchPaths(v):{pattern:c(...Array.isArray(v)?v:[v])}):{}}commonQuery(v=[],k={}){const F=this.handleIncludeExclude(k.includePattern,k.expandPatterns),j=this.handleIncludeExclude(k.excludePattern,k.expandPatterns),W=v.length>1,H=(F.searchPaths&&F.searchPaths.length?F.searchPaths.map(R=>this.getFolderQueryForSearchPath(R,k,j)):v.map(R=>this.getFolderQueryForRoot(R,k,j,W))).filter(R=>!!R),P={_reason:k._reason,folderQueries:H,usingSearchPaths:!!(F.searchPaths&&F.searchPaths.length),extraFileResources:k.extraFileResources,excludePattern:j.pattern,includePattern:F.pattern,onlyOpenEditors:k.onlyOpenEditors,maxResults:k.maxResults};if(k.onlyOpenEditors){const R=i.coalesce(i.flatten(this.editorGroupsService.groups.map(U=>U.editors.map(K=>K.resource))));this.logService.trace("QueryBuilder#commonQuery - openEditor URIs",JSON.stringify(R));const B=R.filter(U=>(0,u.pathIncludedInQuery)(P,U.fsPath)),$=this.commonQueryFromFileList(B);return this.logService.trace("QueryBuilder#commonQuery - openEditor Query",JSON.stringify($)),{...P,...$}}const M=k.extraFileResources&&k.extraFileResources.filter(R=>(0,u.pathIncludedInQuery)(P,R.fsPath));return P.extraFileResources=M&&M.length?M:void 0,P}commonQueryFromFileList(v){const k=[],F=new y.ResourceMap,j={};let W=!1;return v.forEach(H=>{if(H.scheme===A.Schemas.walkThrough)return;if((0,T.isAbsolutePath)(H)){const M=this.workspaceContextService.getWorkspaceFolder(H)?.uri??H.with({path:_.dirname(H.fsPath)});let R=F.get(M);R||(W=!0,R={folder:M,includePattern:{}},k.push(R),F.set(M,R));const B=_.relative(M.fsPath,H.fsPath);(0,b.assertIsDefined)(R.includePattern)[B.replace(/\\/g,"/")]=!0}else H.fsPath&&(W=!0,j[H.fsPath]=!0)}),{folderQueries:k,includePattern:j,usingSearchPaths:!0,excludePattern:W?void 0:{"**/*":!0}}}isCaseSensitive(v,k){if(k.isSmartCase){if(v.isRegExp){if(O.containsUppercaseCharacter(v.pattern,!0))return!0}else if(O.containsUppercaseCharacter(v.pattern))return!0}return!!v.isCaseSensitive}isMultiline(v){return v.isMultiline||v.isRegExp&&(0,E.isMultilineRegexSource)(v.pattern)||v.pattern.indexOf(` `)>=0?!0:!!v.isMultiline}parseSearchPaths(v){const k=$=>_.isAbsolute($)||/^\.\.?([\/\\]|$)/.test($),j=(Array.isArray(v)?v:n(v)).map($=>{const U=this.pathService.resolvedUserHome;return U?(0,N.untildify)($,U.scheme===A.Schemas.file?U.fsPath:U.path):$}),W=D.groupBy(j,$=>k($)?"searchPaths":"exprSegments"),H=(W.exprSegments||[]).map($=>O.rtrim($,"/")).map($=>O.rtrim($,"\\")).map($=>($[0]==="."&&($="*"+$),d($))),P={},M=this.expandSearchPathPatterns(W.searchPaths||[]);M&&M.length&&(P.searchPaths=M);const R=i.flatten(H),B=c(...R);return B&&(P.pattern=B),P}getExcludesForFolder(v,k){return k.disregardExcludeSettings?void 0:(0,u.getExcludes)(v,!k.disregardSearchExcludeSettings)}expandSearchPathPatterns(v){if(!v||!v.length)return[];const k=i.flatten(v.map(j=>{let{pathPortion:W,globPortion:H}=r(j);H&&(H=f(H));const P=this.expandOneSearchPath(W);return i.flatten(P.map(M=>this.resolveOneSearchPathPattern(M,H)))})),F=new Map;return k.forEach(j=>{const W=j.searchPath.toString(),H=F.get(W);H?j.pattern&&(H.pattern=H.pattern||{},H.pattern[j.pattern]=!0):F.set(W,{searchPath:j.searchPath,pattern:j.pattern?c(j.pattern):void 0})}),Array.from(F.values())}expandOneSearchPath(v){if(_.isAbsolute(v)){const k=this.workspaceContextService.getWorkspace().folders;return k[0]&&k[0].uri.scheme!==A.Schemas.file?[{searchPath:k[0].uri.with({path:v})}]:[{searchPath:g.URI.file(_.normalize(v))}]}if(this.workspaceContextService.getWorkbenchState()===2){const k=this.workspaceContextService.getWorkspace().folders[0].uri;if(v=l(v),v.startsWith("../")||v===".."){const j=_.posix.resolve(k.path,v);return[{searchPath:k.with({path:j})}]}const F=f(v);return[{searchPath:k,pattern:F}]}else{if(v==="./"||v===".\\")return[];{const k=v.replace(/^\.[\/\\]/,""),j=this.workspaceContextService.getWorkspace().folders.map(W=>{const H=k.match(new RegExp(`^${O.escapeRegExpCharacters(W.name)}(?:/(.*)|$)`));return H?{match:H,folder:W}:null}).filter(b.isDefined);if(j.length)return j.map(W=>{const H=W.match[1];return{searchPath:W.folder.uri,pattern:H&&f(H)}});{const W=v.match(/\.[\/\\](.+)[\/\\]?/),H=W?W[1]:v,P=m.localize(0,null,H);throw new Error(P)}}}}resolveOneSearchPathPattern(v,k){const F=v.pattern&&k?`${v.pattern}/${k}`:v.pattern||k,j=[{searchPath:v.searchPath,pattern:F}];return F&&!F.endsWith("**")&&j.push({searchPath:v.searchPath,pattern:F+"/**"}),j}getFolderQueryForSearchPath(v,k,F){const j=this.getFolderQueryForRoot((0,a.toWorkspaceFolder)(v.searchPath),k,F,!1);return j?{...j,includePattern:v.pattern}:null}getFolderQueryForRoot(v,k,F,j){let W;const H=g.URI.isUri(v)?v:v.uri;if(F.searchPaths){const $=F.searchPaths.filter(U=>(0,T.isEqual)(U.searchPath,H))[0];if($&&!$.pattern)return null;$&&(W=$.pattern)}const P=this.configurationService.getValue({resource:H}),R={...this.getExcludesForFolder(P,k)||{},...W||{}},B=g.URI.isUri(v)?(0,T.basename)(v):v.name;return{folder:H,folderName:j?B:void 0,excludePattern:Object.keys(R).length>0?R:void 0,fileEncoding:P.files&&P.files.encoding,disregardIgnoreFiles:typeof k.disregardIgnoreFiles=="boolean"?k.disregardIgnoreFiles:!P.search.useIgnoreFiles,disregardGlobalIgnoreFiles:typeof k.disregardGlobalIgnoreFiles=="boolean"?k.disregardGlobalIgnoreFiles:!P.search.useGlobalIgnoreFiles,disregardParentIgnoreFiles:typeof k.disregardParentIgnoreFiles=="boolean"?k.disregardParentIgnoreFiles:!P.search.useParentIgnoreFiles,ignoreSymlinks:typeof k.ignoreSymlinks=="boolean"?k.ignoreSymlinks:!P.search.followSymlinks}}};I=He([We(0,t.IConfigurationService),We(1,a.IWorkspaceContextService),We(2,p.IEditorGroupsService),We(3,o.ILogService),We(4,w.IPathService)],I),e.QueryBuilder=I;function r(h){const v=h.match(/[\*\{\}\(\)\[\]\?]/);if(v){const k=v.index,F=h.substr(0,k).match(/[/|\\][^/\\]*$/);if(F){let j=h.substr(0,F.index);return j.match(/[/\\]/)||(j+="/"),{pathPortion:j,globPortion:h.substr((F.index||0)+1)}}}return{pathPortion:h}}function c(...h){return h.length?h.reduce((v,k)=>(v[k]=!0,v),Object.create(null)):void 0}function n(h){return S.splitGlobAware(h,",").map(v=>v.trim()).filter(v=>!!v.length)}function d(h){return[`**/${h}/**`,`**/${h}`].map(k=>k.replace(/\*\*\/\*\*/g,"**"))}function l(h){return h.replace(/\\/g,"/")}function f(h){return l(h).replace(/^\.\//,"").replace(/\/+$/g,"")}function s(h,v){h=i.distinct(h,j=>j.toString());const k=[],F=v.getWorkspace();return h&&h.forEach(j=>{let W;if(v.getWorkbenchState()===2)W=(0,T.relativePath)(F.folders[0].uri,j),W&&W!=="."&&(W="./"+W);else{const H=v.getWorkspaceFolder(j);if(H){const P=H.name;if(F.folders.filter(R=>R.name===P).length===1){const R=(0,T.relativePath)(H.uri,j);R===""?W=`./${H.name}`:W=`./${H.name}/${R}`}else W=j.fsPath}}W&&k.push(W)}),k}e.resolveResourcesForSearchIncludes=s}),define(De[236],Ce([1,0,22,2,20,12,3,235,44,49]),function(ne,e,i,D,S,N,y,A,_,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.checkGlobFileExists=e.checkActivateWorkspaceContainsExtension=void 0;const O=7e3;function b(t,o){const a=o.activationEvents;if(!a)return Promise.resolve(void 0);const p=[],w=[];for(const d of a)if(/^workspaceContains:/.test(d)){const l=d.substr(18);l.indexOf("*")>=0||l.indexOf("?")>=0||t.forceUsingSearch?w.push(l):p.push(l)}if(p.length===0&&w.length===0)return Promise.resolve(void 0);let u;const I=new Promise((d,l)=>{u=d}),r=d=>u({activationEvent:d}),c=Promise.all(p.map(d=>g(t,d,r))).then(()=>{}),n=E(t,o.identifier,w,r);return Promise.all([c,n]).then(()=>{u(void 0)}),I}e.checkActivateWorkspaceContainsExtension=b;async function g(t,o,a){for(const p of t.folders)if(await t.exists(i.joinPath(D.URI.revive(p),o))){a(`workspaceContains:${o}`);return}}async function E(t,o,a,p){if(a.length===0)return Promise.resolve(void 0);const w=new S.CancellationTokenSource,u=t.checkExists(t.folders,a,w.token),I=setTimeout(async()=>{w.cancel(),t.logService.info(`Not activating extension '${o.value}': Timed out while searching for 'workspaceContains' pattern ${a.join(",")}`)},O);let r=!1;try{r=await u}catch(c){N.isCancellationError(c)||N.onUnexpectedError(c)}w.dispose(),clearTimeout(I),r&&p(`workspaceContains:${a.join(",")}`)}function m(t,o,a,p){const w=t.get(y.IInstantiationService),u=t.get(_.ISearchService),r=w.createInstance(A.QueryBuilder).file(o.map(c=>(0,T.toWorkspaceFolder)(D.URI.revive(c))),{_reason:"checkExists",includePattern:a,exists:!0});return u.fileSearch(r,p).then(c=>!!c.limitHit,c=>N.isCancellationError(c)?!1:Promise.reject(c))}e.checkGlobFileExists=m});var Je=this&&this.__classPrivateFieldSet||function(ne,e,i,D,S){if(D==="m")throw new TypeError("Private method is not writable");if(D==="a"&&!S)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?ne!==e||!S:!e.has(ne))throw new TypeError("Cannot write private member to an object whose class did not declare it");return D==="a"?S.call(ne,i):S?S.value=i:e.set(ne,i),i},Re=this&&this.__classPrivateFieldGet||function(ne,e,i,D){if(i==="a"&&!D)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?ne!==e||!D:!e.has(ne))throw new TypeError("Cannot read private member from an object whose class did not declare it");return i==="m"?D:i==="a"?D.call(ne):D?D.value:e.get(ne)};define(De[33],Ce([1,0,132,19,76,22,15,7,46,2,11,5,32,180,74,31,27,179,12,25,24,164,6,90,3,26,75,14,60,64,56,4,236,73,166,13,72]),function(ne,e,i,D,S,N,y,A,_,T,O,b,g,E,m,t,o,a,p,w,u,I,r,c,n,d,l,f,s,h,v,k,F,j,W,H,P){"use strict";var M,R,B;Object.defineProperty(e,"__esModule",{value:!0}),e.ExtensionPaths=e.Extension=e.IExtHostExtensionService=e.AbstractExtHostExtensionService=e.IHostUtils=void 0,e.IHostUtils=(0,n.createDecorator)("IHostUtils");let $=class Oi extends A.Disposable{constructor(le,fe,Y,ge,Se,Oe,Be,Xe,ke,ye,Ie){super(),this._onDidChangeRemoteConnectionData=this._register(new k.Emitter),this.onDidChangeRemoteConnectionData=this._onDidChangeRemoteConnectionData.event,this._isTerminating=!1,this._hostUtils=fe,this._extHostContext=Y,this._initData=Be,this._extHostWorkspace=ge,this._extHostConfiguration=Se,this._logService=Oe,this._extHostTunnelService=ke,this._extHostTerminalService=ye,this._extHostLocalizationService=Ie,this._mainThreadWorkspaceProxy=this._extHostContext.getProxy(b.MainContext.MainThreadWorkspace),this._mainThreadTelemetryProxy=this._extHostContext.getProxy(b.MainContext.MainThreadTelemetry),this._mainThreadExtensionsProxy=this._extHostContext.getProxy(b.MainContext.MainThreadExtensionService),this._almostReadyToRunExtensions=new y.Barrier,this._readyToStartExtensionHost=new y.Barrier,this._readyToRunExtensions=new y.Barrier,this._eagerExtensionsActivated=new y.Barrier,this._globalRegistry=new a.ExtensionDescriptionRegistry(this._initData.allExtensions);const ae=(0,o.extensionIdentifiersArrayToSet)(this._initData.myExtensions);this._myRegistry=new a.ExtensionDescriptionRegistry(te(this._globalRegistry,ae)),this._storage=new m.ExtHostStorage(this._extHostContext),this._secretState=new j.ExtHostSecretState(this._extHostContext),this._storagePath=Xe,this._instaService=le.createChild(new s.ServiceCollection([m.IExtHostStorage,this._storage],[j.IExtHostSecretState,this._secretState]));let ue=[],ee=[];this._initData.remote.isRemote&&(ue=this._initData.allExtensions.filter(C=>!C.main&&!C.browser).map(C=>C.identifier),ee=this._initData.allExtensions.filter(C=>!ae.has(w.ExtensionIdentifier.toKey(C.identifier.value))).filter(C=>(C.main||C.browser)&&C.api==="none").map(C=>C.identifier));const Z=(0,o.extensionIdentifiersArrayToSet)(ee);this._activator=this._register(new E.ExtensionsActivator(this._myRegistry,ue,ee,{onExtensionActivationError:(C,z,V)=>{this._mainThreadExtensionsProxy.$onExtensionActivationError(C,p.transformErrorForSerialization(z),V)},actualActivateExtension:async(C,z)=>{if(Z.has(w.ExtensionIdentifier.toKey(C)))return await this._mainThreadExtensionsProxy.$activateExtension(C,z),new E.HostExtension;const V=this._myRegistry.getExtensionDescription(C);return this._activateExtension(V,z)}},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(),S.mark("code/extHost/ready"),this._readyToStartExtensionHost.open(),this._initData.autoStart&&this._startExtensionHost()}catch(le){p.onUnexpectedError(le)}}async _deactivateAll(){this._storagePath.onWillDeactivateAll();let le=[];try{le=this._myRegistry.getAllExtensionDescriptions().map(Se=>Se.identifier).filter(Se=>this.isActivated(Se)).map(Se=>this._deactivate(Se))}catch{}await Promise.all(le)}terminate(le,fe=0){if(this._isTerminating)return;this._isTerminating=!0,this._logService.info(`Extension host terminating: ${le}`),this._logService.flush(),this._extHostTerminalService.dispose(),this._activator.dispose(),p.setUnexpectedErrorHandler(ge=>{this._logService.error(ge)}),this._extHostContext.dispose();const Y=this._deactivateAll();Promise.race([(0,y.timeout)(5e3),Y]).finally(()=>{this._hostUtils.pid?this._logService.info(`Extension host with pid ${this._hostUtils.pid} exiting with code ${fe}`):this._logService.info(`Extension host exiting with code ${fe}`),this._logService.flush(),this._logService.dispose(),this._hostUtils.exit(fe)})}isActivated(le){return this._readyToRunExtensions.isOpen()?this._activator.isActivated(le):!1}async getExtension(le){const fe=await this._mainThreadExtensionsProxy.$getExtension(le);let Y;if(fe?.browserNlsBundleUris){Y={};for(const ge of Object.keys(fe.browserNlsBundleUris))Y[ge]=T.URI.revive(fe.browserNlsBundleUris[ge])}return fe&&{...fe,identifier:new w.ExtensionIdentifier(fe.identifier.value),extensionLocation:T.URI.revive(fe.extensionLocation),browserNlsBundleUris:Y}}_activateByEvent(le,fe){return this._activator.activateByEvent(le,fe)}_activateById(le,fe){return this._activator.activateById(le,fe)}activateByIdWithErrors(le,fe){return this._activateById(le,fe).then(()=>{const Y=this._activator.getActivatedExtension(le);if(Y.activationFailed)return Promise.reject(Y.activationFailedError)})}getExtensionRegistry(){return this._readyToRunExtensions.wait().then(le=>this._myRegistry)}getExtensionExports(le){return this._readyToRunExtensions.isOpen()?this._activator.getActivatedExtension(le).exports:null}async _realPathExtensionUri(le){if(le.scheme!==H.Schemas.file)return le;const fe=await this._hostUtils.realpath(le.fsPath);return T.URI.file(fe)}async getExtensionPathIndex(){return this._extensionPathIndex||(this._extensionPathIndex=this._createExtensionPathIndex(this._myRegistry.getAllExtensionDescriptions()).then(le=>new re(le))),this._extensionPathIndex}async _createExtensionPathIndex(le){const fe=_.TernarySearchTree.forUris(Y=>N.extUriBiasedIgnorePathCase.ignorePathCasing(Y));return await Promise.all(le.map(async Y=>{if(this._getEntryPoint(Y)){const ge=await this._realPathExtensionUri(Y.extensionLocation);fe.set(ge,Y)}})),fe}_deactivate(le){let fe=Promise.resolve(void 0);if(!this._readyToRunExtensions.isOpen()||!this._activator.isActivated(le))return fe;const Y=this._activator.getActivatedExtension(le);if(!Y)return fe;try{typeof Y.module.deactivate=="function"&&(fe=Promise.resolve(Y.module.deactivate()).then(void 0,ge=>(this._logService.error(ge),Promise.resolve(void 0))))}catch(ge){this._logService.error(`An error occurred when deactivating the extension '${le.value}':`),this._logService.error(ge)}try{(0,A.dispose)(Y.subscriptions)}catch(ge){this._logService.error(`An error occurred when deactivating the subscriptions for extension '${le.value}':`),this._logService.error(ge)}return fe}async _activateExtension(le,fe){return this._initData.remote.isRemote?this._mainThreadExtensionsProxy.$onWillActivateExtension(le.identifier):await this._mainThreadExtensionsProxy.$onWillActivateExtension(le.identifier),this._doActivateExtension(le,fe).then(Y=>{const ge=Y.activationTimes;return this._mainThreadExtensionsProxy.$onDidActivateExtension(le.identifier,ge.codeLoadingTime,ge.activateCallTime,ge.activateResolvedTime,fe),this._logExtensionActivationTimes(le,fe,"success",ge),Y},Y=>{throw this._logExtensionActivationTimes(le,fe,"failure"),Y})}_logExtensionActivationTimes(le,fe,Y,ge){const Se=U(le,fe);this._mainThreadTelemetryProxy.$publicLog2("extensionActivationTimes",{...Se,...ge||{},outcome:Y})}_doActivateExtension(le,fe){const Y=U(le,fe);this._mainThreadTelemetryProxy.$publicLog2("activatePlugin",Y);const ge=this._getEntryPoint(le);if(!ge)return Promise.resolve(new E.EmptyExtension(E.ExtensionActivationTimes.NONE));this._logService.info(`ExtensionService#_doActivateExtension ${le.identifier.value}, startup: ${fe.startup}, activationEvent: '${fe.activationEvent}'${le.identifier.value!==fe.extensionId.value?`, root cause: ${fe.extensionId.value}`:""}`),this._logService.flush();const Se=new E.ExtensionActivationTimesBuilder(fe.startup);return Promise.all([this._loadCommonJSModule(le,(0,N.joinPath)(le.extensionLocation,ge),Se),this._loadExtensionContext(le)]).then(Oe=>(S.mark(`code/extHost/willActivateExtension/${le.identifier.value}`),Oi._callActivate(this._logService,le.identifier,Oe[0],Oe[1],Se))).then(Oe=>(S.mark(`code/extHost/didActivateExtension/${le.identifier.value}`),Oe))}_loadExtensionContext(le){const fe=new I.ExtensionGlobalMemento(le,this._storage),Y=new I.ExtensionMemento(le.identifier.value,!1,this._storage),ge=new W.ExtensionSecrets(le,this._secretState),Se=le.isUnderDevelopment?this._initData.environment.extensionTestsLocationURI?r.ExtensionMode.Test:r.ExtensionMode.Development:r.ExtensionMode.Production,Oe=this._initData.remote.isRemote?r.ExtensionKind.Workspace:r.ExtensionKind.UI;return this._logService.trace(`ExtensionService#loadExtensionContext ${le.identifier.value}`),Promise.all([fe.whenReady,Y.whenReady,this._storagePath.whenReady]).then(()=>{const Be=this;let Xe,ke;const ye=(0,o.isProposedApiEnabled)(le,"ipc")?this._initData.messagePorts?.get(w.ExtensionIdentifier.toKey(le.identifier)):void 0;return Object.freeze({globalState:fe,workspaceState:Y,secrets:ge,subscriptions:[],get extensionUri(){return le.extensionLocation},get extensionPath(){return le.extensionLocation.fsPath},asAbsolutePath(Ie){return D.join(le.extensionLocation.fsPath,Ie)},get storagePath(){return Be._storagePath.workspaceValue(le)?.fsPath},get globalStoragePath(){return Be._storagePath.globalValue(le).fsPath},get logPath(){return D.join(Be._initData.logsLocation.fsPath,le.identifier.value)},get logUri(){return T.URI.joinPath(Be._initData.logsLocation,le.identifier.value)},get storageUri(){return Be._storagePath.workspaceValue(le)},get globalStorageUri(){return Be._storagePath.globalValue(le)},get extensionMode(){return Se},get extension(){return Xe===void 0&&(Xe=new K(Be,le.identifier,le,Oe,!1)),Xe},get extensionRuntime(){return(0,o.checkProposedApiEnabled)(le,"extensionRuntime"),Be.extensionRuntime},get environmentVariableCollection(){return Be._extHostTerminalService.getEnvironmentVariableCollection(le)},get messagePassingProtocol(){if(!ke){if(!ye)return;const Ie=k.Event.buffer(k.Event.fromDOMEventEmitter(ye,"message",ae=>ae.data));ye.start(),ke={onDidReceiveMessage:Ie,postMessage:ye.postMessage.bind(ye)}}return ke}})})}static _callActivate(le,fe,Y,ge,Se){return Y=Y||{activate:void 0,deactivate:void 0},this._callActivateOptional(le,fe,Y,ge,Se).then(Oe=>new E.ActivatedExtension(!1,null,Se.build(),Y,Oe,ge.subscriptions))}static _callActivateOptional(le,fe,Y,ge,Se){if(typeof Y.activate=="function")try{Se.activateCallStart(),le.trace(`ExtensionService#_callActivateOptional ${fe.value}`);const Oe=typeof global=="object"?global:self,Be=Y.activate.apply(Oe,[ge]);return Se.activateCallStop(),Se.activateResolveStart(),Promise.resolve(Be).then(Xe=>(Se.activateResolveStop(),Xe))}catch(Oe){return Promise.reject(Oe)}else return Promise.resolve(Y)}_activateOneStartupFinished(le,fe){this._activateById(le.identifier,{startup:!1,extensionId:le.identifier,activationEvent:fe}).then(void 0,Y=>{this._logService.error(Y)})}_activateAllStartupFinished(){this._mainThreadExtensionsProxy.$setPerformanceMarks(S.getMarks());for(const le of this._myRegistry.getAllExtensionDescriptions())if(le.activationEvents)for(const fe of le.activationEvents)fe==="onStartupFinished"&&this._activateOneStartupFinished(le,fe)}_handleEagerExtensions(){const le=this._activateByEvent("*",!0).then(void 0,Se=>{this._logService.error(Se)});this._register(this._extHostWorkspace.onDidChangeWorkspace(Se=>this._handleWorkspaceContainsEagerExtensions(Se.added)));const fe=this._extHostWorkspace.workspace?this._extHostWorkspace.workspace.folders:[],Y=this._handleWorkspaceContainsEagerExtensions(fe),ge=Promise.all([le,Y]).then(()=>{});return Promise.race([ge,(0,y.timeout)(1e4)]).then(()=>{this._activateAllStartupFinished()}),ge}_handleWorkspaceContainsEagerExtensions(le){return le.length===0?Promise.resolve(void 0):Promise.all(this._myRegistry.getAllExtensionDescriptions().map(fe=>this._handleWorkspaceContainsEagerExtension(le,fe))).then(()=>{})}async _handleWorkspaceContainsEagerExtension(le,fe){if(this.isActivated(fe.identifier))return;const Y=!this._initData.remote.isRemote&&!!this._initData.remote.authority,ge={logService:this._logService,folders:le.map(Oe=>Oe.uri),forceUsingSearch:Y,exists:Oe=>this._hostUtils.exists(Oe.fsPath),checkExists:(Oe,Be,Xe)=>this._mainThreadWorkspaceProxy.$checkExists(Oe,Be,Xe)},Se=await(0,F.checkActivateWorkspaceContainsExtension)(ge,fe);if(!!Se)return this._activateById(fe.identifier,{startup:!0,extensionId:fe.identifier,activationEvent:Se.activationEvent}).then(void 0,Oe=>this._logService.error(Oe))}async $extensionTestsExecute(){await this._eagerExtensionsActivated.wait();try{return await this._doHandleExtensionTests()}catch(le){throw console.error(le),le}}async _doHandleExtensionTests(){const{extensionDevelopmentLocationURI:le,extensionTestsLocationURI:fe}=this._initData.environment;if(!le||!fe)throw new Error(i.localize(0,null));const Y=await this._loadCommonJSModule(null,fe,new E.ExtensionActivationTimesBuilder(!1));if(!Y||typeof Y.run!="function")throw new Error(i.localize(1,null,fe.toString()));return new Promise((ge,Se)=>{const Oe=(ke,ye)=>{ke?Se(ke):ge(typeof ye=="number"&&ye>0?1:0)},Be=(0,N.originalFSPath)(fe),Xe=Y.run(Be,Oe);Xe&&Xe.then&&Xe.then(()=>{ge(0)}).catch(ke=>{Se(ke instanceof Error&&ke.stack?ke.stack:String(ke))})})}_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(le,fe){return this._resolvers[le]=fe,(0,A.toDisposable)(()=>{delete this._resolvers[le]})}async _activateAndGetResolver(le){const fe=le.indexOf("+");if(fe===-1)throw new Error("Not an authority that can be resolved!");const Y=le.substr(0,fe);return await this._almostReadyToRunExtensions.wait(),await this._activateByEvent(`onResolveRemoteAuthority:${Y}`,!1),{authorityPrefix:Y,resolver:this._resolvers[Y]}}async $resolveAuthority(le,fe){this._logService.info(`$resolveAuthority invoked for authority (${de(le)})`);const{authorityPrefix:Y,resolver:ge}=await this._activateAndGetResolver(le);if(!ge)return{type:"error",error:{code:c.RemoteAuthorityResolverErrorCode.NoResolverFound,message:`No remote extension installed to resolve ${Y}.`,detail:void 0}};try{this._register(await this._extHostTunnelService.setTunnelFactory(ge)),S.mark(`code/extHost/willResolveAuthority/${Y}`);const Se=await ge.resolve(le,{resolveAttempt:fe});S.mark(`code/extHost/didResolveAuthorityOK/${Y}`);const Oe={authority:le,host:Se.host,port:Se.port,connectionToken:Se.connectionToken},Be={extensionHostEnv:Se.extensionHostEnv,isTrusted:Se.isTrusted,authenticationSession:Se.authenticationSessionForInitializingExtensions?{id:Se.authenticationSessionForInitializingExtensions.id,providerId:Se.authenticationSessionForInitializingExtensions.providerId}:void 0};return{type:"ok",value:{authority:Oe,options:Be,tunnelInformation:{environmentTunnels:Se.environmentTunnels,features:Se.tunnelFeatures}}}}catch(Se){if(S.mark(`code/extHost/didResolveAuthorityError/${Y}`),Se instanceof r.RemoteAuthorityResolverError)return{type:"error",error:{code:Se._code,message:Se._message,detail:Se._detail}};throw Se}}async $getCanonicalURI(le,fe){this._logService.info(`$getCanonicalURI invoked for authority (${de(le)})`);const{resolver:Y}=await this._activateAndGetResolver(le);if(!Y)return null;const ge=T.URI.revive(fe);if(typeof Y.getCanonicalURI>"u")return ge;const Se=await(0,y.asPromise)(()=>Y.getCanonicalURI(ge));return Se||ge}static _applyExtensionsDelta(le,fe,Y){const ge=new a.ExtensionDescriptionRegistry(le.getAllExtensionDescriptions());ge.deltaExtensions(Y.toAdd,Y.toRemove);const Se=(0,o.extensionIdentifiersArrayToSet)(fe.getAllExtensionDescriptions().map(Be=>Be.identifier));for(const Be of Y.myToRemove)Se.delete(w.ExtensionIdentifier.toKey(Be));for(const Be of Y.myToAdd)Se.add(w.ExtensionIdentifier.toKey(Be));const Oe=te(ge,Se);return{globalRegistry:ge,myExtensions:Oe}}$startExtensionHost(le){le.toAdd.forEach(ge=>ge.extensionLocation=T.URI.revive(ge.extensionLocation));const{globalRegistry:fe,myExtensions:Y}=Oi._applyExtensionsDelta(this._globalRegistry,this._myRegistry,le);return this._globalRegistry.set(fe.getAllExtensionDescriptions()),this._myRegistry.set(Y),this._startExtensionHost()}$activateByEvent(le,fe){return fe===1?this._activateByEvent(le,!1):this._readyToRunExtensions.wait().then(Y=>this._activateByEvent(le,!1))}async $activate(le,fe){return await this._readyToRunExtensions.wait(),this._myRegistry.getExtensionDescription(le)?(await this._activateById(le,fe),!0):!1}async $deltaExtensions(le){le.toAdd.forEach(Oe=>Oe.extensionLocation=T.URI.revive(Oe.extensionLocation));const{globalRegistry:fe,myExtensions:Y}=Oi._applyExtensionsDelta(this._globalRegistry,this._myRegistry,le),ge=await this._createExtensionPathIndex(Y);return(await this.getExtensionPathIndex()).setSearchTree(ge),this._globalRegistry.set(fe.getAllExtensionDescriptions()),this._myRegistry.set(Y),Promise.resolve(void 0)}async $test_latency(le){return le}async $test_up(le){return le.byteLength}async $test_down(le){const fe=u.VSBuffer.alloc(le),Y=Math.random()%256;for(let ge=0;gele.has(w.ExtensionIdentifier.toKey(fe.identifier)))}function de(be){const le=be.indexOf("+");return le===-1?be:be.substring(0,le)}class re{constructor(le){this._searchTree=le}setSearchTree(le){this._searchTree=le}findSubstr(le){return this._searchTree.findSubstr(le)}forEach(le){return this._searchTree.forEach(le)}}e.ExtensionPaths=re}),define(De[237],Ce([1,0,76,2,5,32,27,25,14,26,3,33,48,11,10]),function(ne,e,i,D,S,N,y,A,_,T,O,b,g,E,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RequireInterceptor=void 0;let t=class{constructor(I,r,c,n,d,l,f){this._apiFactory=I,this._extensionRegistry=r,this._instaService=c,this._extHostConfiguration=n,this._extHostExtensionService=d,this._initData=l,this._logService=f,this._factories=new Map,this._alternatives=[]}async install(){this._installInterceptor(),i.mark("code/extHost/willWaitForConfig");const I=await this._extHostConfiguration.getConfigProvider();i.mark("code/extHost/didWaitForConfig");const r=await this._extHostExtensionService.getExtensionPathIndex();this.register(new a(this._apiFactory,r,this._extensionRegistry,I,this._logService)),this.register(this._instaService.createInstance(p,r)),this.register(this._instaService.createInstance(o)),this._initData.remote.isRemote&&this.register(this._instaService.createInstance(w,r,this._initData.environment.appUriScheme))}register(I){if("nodeModuleName"in I)if(Array.isArray(I.nodeModuleName))for(const r of I.nodeModuleName)this._factories.set(r,I);else this._factories.set(I.nodeModuleName,I);typeof I.alternativeModuleName=="function"&&this._alternatives.push(r=>I.alternativeModuleName(r))}};t=He([We(2,O.IInstantiationService),We(3,N.IExtHostConfiguration),We(4,b.IExtHostExtensionService),We(5,T.IExtHostInitDataService),We(6,E.ILogService)],t),e.RequireInterceptor=t;let o=class Yi{constructor(I){if(I.environment.appRoot&&Yi.aliased.size){const r=(0,m.escapeRegExpCharacters)(this.forceForwardSlashes(I.environment.appRoot.fsPath)),c="[a-z0-9_.-]",n=`@${c}+\\/${c}+|${c}+`,d="node_modules|node_modules\\.asar(?:\\.unpacked)?";this.re=new RegExp(`^(${r}/${d}\\/)(${n})(.*)$`,"i")}}alternativeModuleName(I){if(!this.re)return;const r=this.re.exec(this.forceForwardSlashes(I));if(!r)return;const[,c,n,d]=r,l=Yi.aliased.get(n);if(l!==void 0)return console.warn(`${n} as been renamed to ${l}, please update your imports`),c+l+d}forceForwardSlashes(I){return I.replace(/\\/g,"/")}};o.aliased=new Map([["vscode-ripgrep","@vscode/ripgrep"],["vscode-windows-registry","@vscode/windows-registry"]]),o=He([We(0,T.IExtHostInitDataService)],o);class a{constructor(I,r,c,n,d){this._apiFactory=I,this._extensionPaths=r,this._extensionRegistry=c,this._configProvider=n,this._logService=d,this.nodeModuleName="vscode",this._extApiImpl=new Map}load(I,r){const c=this._extensionPaths.findSubstr(r);if(c){let n=this._extApiImpl.get(A.ExtensionIdentifier.toKey(c.identifier));return n||(n=this._apiFactory(c,this._extensionRegistry,this._configProvider),this._extApiImpl.set(A.ExtensionIdentifier.toKey(c.identifier),n)),n}if(!this._defaultApiImpl){let n="";this._extensionPaths.forEach((d,l)=>n+=` ${l} -> ${d.identifier.value} `),this._logService.warn(`Could not identify extension for 'vscode' require call from ${r}. These are the extension path mappings: ${n}`),this._defaultApiImpl=this._apiFactory(y.nullExtensionDescription,this._extensionRegistry,this._configProvider)}return this._defaultApiImpl}}let p=class{constructor(I,r,c){this._extensionPaths=I,this.nodeModuleName="keytar",this._mainThreadTelemetry=r.getProxy(S.MainContext.MainThreadTelemetry);const{environment:n}=c,d=r.getProxy(S.MainContext.MainThreadKeytar);if(n.appRoot){let l=n.appRoot.fsPath;g.platform==="win32"&&(l=l.replace(/\\/g,"/")),l[l.length-1]==="/"&&(l=l.substr(0,l.length-1)),this.alternativeNames=new Set,this.alternativeNames.add(`${l}/node_modules.asar/keytar`),this.alternativeNames.add(`${l}/node_modules/keytar`)}this._impl={getPassword:(l,f)=>d.$getPassword(l,f),setPassword:(l,f,s)=>d.$setPassword(l,f,s),deletePassword:(l,f)=>d.$deletePassword(l,f),findPassword:l=>d.$findPassword(l),findCredentials(l){return d.$findCredentials(l)}}}load(I,r){const c=this._extensionPaths.findSubstr(r);return this._mainThreadTelemetry.$publicLog2("shimming.keytar",{extension:c?.identifier.value??"unknown_extension"}),this._impl}alternativeModuleName(I){const r=I.length;if(r<=7||!this.alternativeNames)return;const c=r-7;if((I.charAt(c)==="/"||I.charAt(c)==="\\")&&I.endsWith("keytar")&&(I=I.replace(/\\/g,"/"),this.alternativeNames.has(I)))return"keytar"}};p=He([We(1,_.IExtHostRpcService),We(2,T.IExtHostInitDataService)],p);let w=class{constructor(I,r,c){this._extensionPaths=I,this._appUriScheme=r,this.nodeModuleName=["open","opn"],this._mainThreadTelemetry=c.getProxy(S.MainContext.MainThreadTelemetry);const n=c.getProxy(S.MainContext.MainThreadWindow);this._impl=(d,l)=>{const f=D.URI.parse(d);return l?this.callOriginal(d,l):f.scheme==="http"||f.scheme==="https"?n.$openUri(f,d,{allowTunneling:!0}):f.scheme==="mailto"||f.scheme===this._appUriScheme?n.$openUri(f,d,{}):this.callOriginal(d,l)}}load(I,r,c){const n=this._extensionPaths.findSubstr(r);return n&&(this._extensionId=n.identifier.value,this.sendShimmingTelemetry()),this._original=c(I),this._impl}callOriginal(I,r){return this.sendNoForwardTelemetry(),this._original(I,r)}sendShimmingTelemetry(){!this._extensionId||this._mainThreadTelemetry.$publicLog2("shimming.open",{extension:this._extensionId})}sendNoForwardTelemetry(){!this._extensionId||this._mainThreadTelemetry.$publicLog2("shimming.open.call.noForward",{extension:this._extensionId})}};w=He([We(2,_.IExtHostRpcService)],w)}),define(De[103],Ce([1,0,203,7,19,48,3,53,54,33,6,31,176,32]),function(ne,e,i,D,S,N,y,A,_,T,O,b,g,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtHostVariableResolverProviderService=e.IExtHostVariableResolverProvider=void 0,e.IExtHostVariableResolverProvider=(0,y.createDecorator)("IExtHostVariableResolverProvider");class m extends g.AbstractVariableResolverService{constructor(a,p,w,u,I,r,c){function n(){if(w){const d=w.activeEditor();if(d)return d.document.uri;const l=u.tabGroups.all.find(f=>f.isActive)?.activeTab;if(l!==void 0){if(l.input instanceof O.TextDiffTabInput||l.input instanceof O.NotebookDiffEditorTabInput)return l.input.modified;if(l.input instanceof O.TextTabInput||l.input instanceof O.NotebookEditorTabInput||l.input instanceof O.CustomEditorTabInput)return l.input.uri}}}super({getFolderUri:d=>{const l=r.folders.filter(f=>f.name===d);if(l&&l.length>0)return l[0].uri},getWorkspaceFolderCount:()=>r.folders.length,getConfigurationValue:(d,l)=>I.getConfiguration(void 0,d).get(l),getAppRoot:()=>N.cwd(),getExecPath:()=>N.env.VSCODE_EXEC_PATH,getFilePath:()=>{const d=n();if(d)return S.normalize(d.fsPath)},getWorkspaceFolderPathForFile:()=>{if(p){const d=n();if(d){const l=p.getWorkspaceFolder(d);if(l)return S.normalize(l.uri.fsPath)}}},getSelectedText:()=>{if(w){const d=w.activeEditor();if(d&&!d.selection.isEmpty)return d.document.getText(d.selection)}},getLineNumber:()=>{if(w){const d=w.activeEditor();if(d)return String(d.selection.end.line+1)}},getExtension:d=>a.getExtension(d)},void 0,c?Promise.resolve(c):void 0,Promise.resolve(N.env))}}let t=class extends D.Disposable{constructor(a,p,w,u,I){super(),this.extensionService=a,this.workspaceService=p,this.editorService=w,this.configurationService=u,this.editorTabs=I,this._resolver=new i.Lazy(async()=>{const r=await this.configurationService.getConfigProvider(),n={folders:await this.workspaceService.getWorkspaceFolders2()||[]};return this._register(this.workspaceService.onDidChangeWorkspace(async d=>{n.folders=await this.workspaceService.getWorkspaceFolders2()||[]})),new m(this.extensionService,this.workspaceService,this.editorService,this.editorTabs,r,n,this.homeDir())})}getResolver(){return this._resolver.getValue()}homeDir(){}};t=He([We(0,T.IExtHostExtensionService),We(1,b.IExtHostWorkspace),We(2,A.IExtHostDocumentsAndEditors),We(3,E.IExtHostConfiguration),We(4,_.IExtHostEditorTabs)],t),e.ExtHostVariableResolverProviderService=t}),define(De[104],Ce([1,0,15,4,9,2,3,5,54,33,14,6,31,169,171,32,103]),function(ne,e,i,D,S,N,y,A,_,T,O,b,g,E,m,t,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WorkerExtHostDebugService=e.ExtHostDebugConsole=e.ExtHostDebugSession=e.ExtHostDebugServiceBase=e.IExtHostDebugService=void 0,e.IExtHostDebugService=(0,y.createDecorator)("IExtHostDebugService");let a=class{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}constructor(n,d,l,f,s,h){this._workspaceService=d,this._extensionService=l,this._configurationService=f,this._editorTabs=s,this._variableResolver=h,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 D.Emitter,this._onDidTerminateDebugSession=new D.Emitter,this._onDidChangeActiveDebugSession=new D.Emitter,this._onDidReceiveDebugSessionCustomEvent=new D.Emitter,this._debugServiceProxy=n.getProxy(A.MainContext.MainThreadDebugService),this._onDidChangeBreakpoints=new D.Emitter({onFirstListenerAdd:()=>{this.startBreakpoints()}}),this._activeDebugConsole=new w(this._debugServiceProxy),this._breakpoints=new Map,this._breakpointEventsActive=!1,this._extensionService.getExtensionRegistry().then(v=>{v.onDidChange(k=>{this.registerAllDebugTypes(v)}),this.registerAllDebugTypes(v)})}asDebugSourceUri(n,d){const l=n;if(typeof l.sourceReference=="number"&&l.sourceReference>0){let f=`debug:${encodeURIComponent(l.path||"")}`,s="?";return d&&(f+=`${s}session=${encodeURIComponent(d.id)}`,s="&"),f+=`${s}ref=${l.sourceReference}`,N.URI.parse(f)}else{if(l.path)return N.URI.file(l.path);throw new Error("cannot create uri from DAP 'source' object; properties 'path' and 'sourceReference' are both missing.")}}registerAllDebugTypes(n){const d=[];for(const l of n.getAllExtensionDescriptions())if(l.contributes){const f=l.contributes.debuggers;if(f&&f.length>0)for(const s of f)(0,m.isDebuggerMainContribution)(s)&&d.push(s.type)}this._debugServiceProxy.$registerDebugTypes(d)}get onDidChangeBreakpoints(){return this._onDidChangeBreakpoints.event}get breakpoints(){this.startBreakpoints();const n=[];return this._breakpoints.forEach(d=>n.push(d)),n}addBreakpoints(n){this.startBreakpoints();const d=n.filter(s=>{const h=s.id;return this._breakpoints.has(h)?!1:(this._breakpoints.set(h,s),!0)});this.fireBreakpointChanges(d,[],[]);const l=[],f=new Map;for(const s of d)if(s instanceof b.SourceBreakpoint){let h=f.get(s.location.uri.toString());h||(h={type:"sourceMulti",uri:s.location.uri,lines:[]},f.set(s.location.uri.toString(),h),l.push(h)),h.lines.push({id:s.id,enabled:s.enabled,condition:s.condition,hitCondition:s.hitCondition,logMessage:s.logMessage,line:s.location.range.start.line,character:s.location.range.start.character})}else s instanceof b.FunctionBreakpoint&&l.push({type:"function",id:s.id,enabled:s.enabled,hitCondition:s.hitCondition,logMessage:s.logMessage,condition:s.condition,functionName:s.functionName});return this._debugServiceProxy.$registerBreakpoints(l)}removeBreakpoints(n){this.startBreakpoints();const d=n.filter(h=>this._breakpoints.delete(h.id));this.fireBreakpointChanges([],d,[]);const l=d.filter(h=>h instanceof b.SourceBreakpoint).map(h=>h.id),f=d.filter(h=>h instanceof b.FunctionBreakpoint).map(h=>h.id),s=d.filter(h=>h instanceof b.DataBreakpoint).map(h=>h.id);return this._debugServiceProxy.$unregisterBreakpoints(l,f,s)}startDebugging(n,d,l){return this._debugServiceProxy.$startDebugging(n?n.uri:void 0,d,{parentSessionID:l.parentSession?l.parentSession.id:void 0,lifecycleManagedByParent:l.lifecycleManagedByParent,repl:l.consoleMode===b.DebugConsoleMode.MergeWithParent?"mergeWithParent":"separate",noDebug:l.noDebug,compact:l.compact,suppressSaveBeforeStart:l.suppressSaveBeforeStart,suppressDebugStatusbar:l.suppressDebugStatusbar??l.debugUI?.simple,suppressDebugToolbar:l.suppressDebugToolbar??l.debugUI?.simple,suppressDebugView:l.suppressDebugView??l.debugUI?.simple})}stopDebugging(n){return this._debugServiceProxy.$stopDebugging(n?n.id:void 0)}registerDebugConfigurationProvider(n,d,l){if(!d)return new b.Disposable(()=>{});const f=this._configProviderHandleCounter++;return this._configProviders.push({type:n,handle:f,provider:d}),this._debugServiceProxy.$registerDebugConfigurationProvider(n,l,!!d.provideDebugConfigurations,!!d.resolveDebugConfiguration,!!d.resolveDebugConfigurationWithSubstitutedVariables,f),new b.Disposable(()=>{this._configProviders=this._configProviders.filter(s=>s.provider!==d),this._debugServiceProxy.$unregisterDebugConfigurationProvider(f)})}registerDebugAdapterDescriptorFactory(n,d,l){if(!l)return new b.Disposable(()=>{});if(!this.definesDebugType(n,d))throw new Error(`a DebugAdapterDescriptorFactory can only be registered from the extension that defines the '${d}' debugger.`);if(this.getAdapterDescriptorFactoryByType(d))throw new Error("a DebugAdapterDescriptorFactory can only be registered once per a type.");const f=this._adapterFactoryHandleCounter++;return this._adapterFactories.push({type:d,handle:f,factory:l}),this._debugServiceProxy.$registerDebugAdapterDescriptorFactory(d,f),new b.Disposable(()=>{this._adapterFactories=this._adapterFactories.filter(s=>s.factory!==l),this._debugServiceProxy.$unregisterDebugAdapterDescriptorFactory(f)})}registerDebugAdapterTrackerFactory(n,d){if(!d)return new b.Disposable(()=>{});const l=this._trackerFactoryHandleCounter++;return this._trackerFactories.push({type:n,handle:l,factory:d}),new b.Disposable(()=>{this._trackerFactories=this._trackerFactories.filter(f=>f.factory!==d)})}async $runInTerminal(n,d){return Promise.resolve(void 0)}async $substituteVariables(n,d){let l;const f=await this.getFolder(n);return f&&(l={uri:f.uri,name:f.name,index:f.index,toResource:()=>{throw new Error("Not implemented")}}),(await this._variableResolver.getResolver()).resolveAnyAsync(l,d)}createDebugAdapter(n,d){if(n.type==="implementation")return new I(n.implementation)}createSignService(){}async $startDASession(n,d){const l=this,f=await this.getSession(d);return this.getAdapterDescriptor(this.getAdapterDescriptorFactoryByType(f.type),f).then(s=>{if(!s)throw new Error(`Couldn't find a debug adapter descriptor for debug type '${f.type}' (extension might have failed to activate)`);const h=this.convertToDto(s),v=this.createDebugAdapter(h,f);if(!v)throw new Error(`Couldn't create a debug adapter for type '${f.type}'.`);const k=v;return this._debugAdapters.set(n,k),this.getDebugAdapterTrackers(f).then(F=>(F&&this._debugAdaptersTrackers.set(n,F),k.onMessage(async j=>{if(j.type==="request"&&j.command==="handshake"){const W=j,H={type:"response",seq:0,command:W.command,request_seq:W.seq,success:!0};this._signService||(this._signService=this.createSignService());try{if(this._signService){const P=await this._signService.sign(W.arguments.value);H.body={signature:P},k.sendResponse(H)}else throw new Error("no signer")}catch(P){H.success=!1,H.message=P.message,k.sendResponse(H)}}else F&&F.onDidSendMessage&&F.onDidSendMessage(j),j=(0,m.convertToVSCPaths)(j,!0),l._debugServiceProxy.$acceptDAMessage(n,j)}),k.onError(j=>{F&&F.onError&&F.onError(j),this._debugServiceProxy.$acceptDAError(n,j.name,j.message,j.stack)}),k.onExit(j=>{F&&F.onExit&&F.onExit((0,S.withNullAsUndefined)(j),void 0),this._debugServiceProxy.$acceptDAExit(n,(0,S.withNullAsUndefined)(j),void 0)}),F&&F.onWillStartSession&&F.onWillStartSession(),k.startSession()))})}$sendDAMessage(n,d){d=(0,m.convertToDAPaths)(d,!1);const l=this._debugAdaptersTrackers.get(n);l&&l.onWillReceiveMessage&&l.onWillReceiveMessage(d),this._debugAdapters.get(n)?.sendMessage(d)}$stopDASession(n){const d=this._debugAdaptersTrackers.get(n);this._debugAdaptersTrackers.delete(n),d&&d.onWillStopSession&&d.onWillStopSession();const l=this._debugAdapters.get(n);return this._debugAdapters.delete(n),l?l.stopSession():Promise.resolve(void 0)}$acceptBreakpointsDelta(n){const d=[],l=[],f=[];if(n.added)for(const s of n.added){const h=s.id;if(h&&!this._breakpoints.has(h)){let v;if(s.type==="function")v=new b.FunctionBreakpoint(s.functionName,s.enabled,s.condition,s.hitCondition,s.logMessage);else if(s.type==="data")v=new b.DataBreakpoint(s.label,s.dataId,s.canPersist,s.enabled,s.hitCondition,s.condition,s.logMessage);else{const k=N.URI.revive(s.uri);v=new b.SourceBreakpoint(new b.Location(k,new b.Position(s.line,s.character)),s.enabled,s.condition,s.hitCondition,s.logMessage)}v._id=h,this._breakpoints.set(h,v),d.push(v)}}if(n.removed)for(const s of n.removed){const h=this._breakpoints.get(s);h&&(this._breakpoints.delete(s),l.push(h))}if(n.changed){for(const s of n.changed)if(s.id){const h=this._breakpoints.get(s.id);if(h){if(h instanceof b.FunctionBreakpoint&&s.type==="function"){const v=h;v.enabled=s.enabled,v.condition=s.condition,v.hitCondition=s.hitCondition,v.logMessage=s.logMessage,v.functionName=s.functionName}else if(h instanceof b.SourceBreakpoint&&s.type==="source"){const v=h;v.enabled=s.enabled,v.condition=s.condition,v.hitCondition=s.hitCondition,v.logMessage=s.logMessage,v.location=new b.Location(N.URI.revive(s.uri),new b.Position(s.line,s.character))}f.push(h)}}}this.fireBreakpointChanges(d,l,f)}$provideDebugConfigurations(n,d,l){return(0,i.asPromise)(async()=>{const f=this.getConfigProviderByHandle(n);if(!f)throw new Error("no DebugConfigurationProvider found");if(!f.provideDebugConfigurations)throw new Error("DebugConfigurationProvider has no method provideDebugConfigurations");const s=await this.getFolder(d);return f.provideDebugConfigurations(s,l)}).then(f=>{if(!f)throw new Error("nothing returned from DebugConfigurationProvider.provideDebugConfigurations");return f})}$resolveDebugConfiguration(n,d,l,f){return(0,i.asPromise)(async()=>{const s=this.getConfigProviderByHandle(n);if(!s)throw new Error("no DebugConfigurationProvider found");if(!s.resolveDebugConfiguration)throw new Error("DebugConfigurationProvider has no method resolveDebugConfiguration");const h=await this.getFolder(d);return s.resolveDebugConfiguration(h,l,f)})}$resolveDebugConfigurationWithSubstitutedVariables(n,d,l,f){return(0,i.asPromise)(async()=>{const s=this.getConfigProviderByHandle(n);if(!s)throw new Error("no DebugConfigurationProvider found");if(!s.resolveDebugConfigurationWithSubstitutedVariables)throw new Error("DebugConfigurationProvider has no method resolveDebugConfigurationWithSubstitutedVariables");const h=await this.getFolder(d);return s.resolveDebugConfigurationWithSubstitutedVariables(h,l,f)})}async $provideDebugAdapter(n,d){const l=this.getAdapterDescriptorFactoryByHandle(n);if(!l)return Promise.reject(new Error("no adapter descriptor factory found for handle"));const f=await this.getSession(d);return this.getAdapterDescriptor(l,f).then(s=>{if(!s)throw new Error(`Couldn't find a debug adapter descriptor for debug type '${f.type}'`);return this.convertToDto(s)})}async $acceptDebugSessionStarted(n){const d=await this.getSession(n);this._onDidStartDebugSession.fire(d)}async $acceptDebugSessionTerminated(n){const d=await this.getSession(n);d&&(this._onDidTerminateDebugSession.fire(d),this._debugSessions.delete(d.id))}async $acceptDebugSessionActiveChanged(n){this._activeDebugSession=n?await this.getSession(n):void 0,this._onDidChangeActiveDebugSession.fire(this._activeDebugSession)}async $acceptDebugSessionNameChanged(n,d){(await this.getSession(n))?._acceptNameChanged(d)}async $acceptDebugSessionCustomEvent(n,d){const f={session:await this.getSession(n),event:d.event,body:d.body};this._onDidReceiveDebugSessionCustomEvent.fire(f)}convertToDto(n){if(n instanceof b.DebugAdapterExecutable)return{type:"executable",command:n.command,args:n.args,options:n.options};if(n instanceof b.DebugAdapterServer)return{type:"server",port:n.port,host:n.host};if(n instanceof b.DebugAdapterNamedPipeServer)return{type:"pipeServer",path:n.path};if(n instanceof b.DebugAdapterInlineImplementation)return{type:"implementation",implementation:n.implementation};throw new Error("convertToDto unexpected type")}getAdapterDescriptorFactoryByType(n){const d=this._adapterFactories.filter(l=>l.type===n);if(d.length>0)return d[0].factory}getAdapterDescriptorFactoryByHandle(n){const d=this._adapterFactories.filter(l=>l.handle===n);if(d.length>0)return d[0].factory}getConfigProviderByHandle(n){const d=this._configProviders.filter(l=>l.handle===n);if(d.length>0)return d[0].provider}definesDebugType(n,d){if(n.contributes){const l=n.contributes.debuggers;if(l&&l.length>0){for(const f of l)if(f.label&&f.type&&f.type===d)return!0}}return!1}getDebugAdapterTrackers(n){const l=n.configuration.type,f=this._trackerFactories.filter(s=>s.type===l||s.type==="*").map(s=>(0,i.asPromise)(()=>s.factory.createDebugAdapterTracker(n)).then(h=>h,h=>null));return Promise.race([Promise.all(f).then(s=>{const h=s.filter(v=>!!v);if(h.length>0)return new u(h)}),new Promise((s,h)=>{const v=setTimeout(()=>{clearTimeout(v),h(new Error("timeout"))},1e3)})]).catch(s=>{})}async getAdapterDescriptor(n,d){const l=d.configuration.debugServer;if(typeof l=="number")return Promise.resolve(new b.DebugAdapterServer(l));if(n){const s=await this._extensionService.getExtensionRegistry();return(0,i.asPromise)(()=>n.createDebugAdapterDescriptor(d,this.daExecutableFromPackage(d,s))).then(h=>{if(h)return h})}const f=await this._extensionService.getExtensionRegistry();return Promise.resolve(this.daExecutableFromPackage(d,f))}daExecutableFromPackage(n,d){}startBreakpoints(){this._breakpointEventsActive||(this._breakpointEventsActive=!0,this._debugServiceProxy.$startBreakpointEvents())}fireBreakpointChanges(n,d,l){(n.length>0||d.length>0||l.length>0)&&this._onDidChangeBreakpoints.fire(Object.freeze({added:n,removed:d,changed:l}))}async getSession(n){if(n)if(typeof n=="string"){const d=this._debugSessions.get(n);if(d)return d}else{let d=this._debugSessions.get(n.id);if(!d){const l=await this.getFolder(n.folderUri),f=n.parent?this._debugSessions.get(n.parent):void 0;d=new p(this._debugServiceProxy,n.id,n.type,n.name,l,n.configuration,f),this._debugSessions.set(d.id,d),this._debugServiceProxy.$sessionCached(d.id)}return d}throw new Error("cannot find session")}getFolder(n){if(n){const d=N.URI.revive(n);return this._workspaceService.resolveWorkspaceFolder(d)}return Promise.resolve(void 0)}};a=He([We(0,O.IExtHostRpcService),We(1,g.IExtHostWorkspace),We(2,T.IExtHostExtensionService),We(3,t.IExtHostConfiguration),We(4,_.IExtHostEditorTabs),We(5,o.IExtHostVariableResolverProvider)],a),e.ExtHostDebugServiceBase=a;class p{constructor(n,d,l,f,s,h,v){this._debugServiceProxy=n,this._id=d,this._type=l,this._name=f,this._workspaceFolder=s,this._configuration=h,this._parentSession=v}get id(){return this._id}get type(){return this._type}get name(){return this._name}set name(n){this._name=n,this._debugServiceProxy.$setDebugSessionName(this._id,n)}get parentSession(){return this._parentSession}_acceptNameChanged(n){this._name=n}get workspaceFolder(){return this._workspaceFolder}get configuration(){return this._configuration}customRequest(n,d){return this._debugServiceProxy.$customDebugAdapterRequest(this._id,n,d)}getDebugProtocolBreakpoint(n){return this._debugServiceProxy.$getDebugProtocolBreakpoint(this._id,n.id)}}e.ExtHostDebugSession=p;class w{constructor(n){this.value=Object.freeze({append(d){n.$appendDebugConsole(d)},appendLine(d){this.append(d+` `)}})}}e.ExtHostDebugConsole=w;class u{constructor(n){this.trackers=n}onWillStartSession(){this.trackers.forEach(n=>n.onWillStartSession?n.onWillStartSession():void 0)}onWillReceiveMessage(n){this.trackers.forEach(d=>d.onWillReceiveMessage?d.onWillReceiveMessage(n):void 0)}onDidSendMessage(n){this.trackers.forEach(d=>d.onDidSendMessage?d.onDidSendMessage(n):void 0)}onWillStopSession(){this.trackers.forEach(n=>n.onWillStopSession?n.onWillStopSession():void 0)}onError(n){this.trackers.forEach(d=>d.onError?d.onError(n):void 0)}onExit(n,d){this.trackers.forEach(l=>l.onExit?l.onExit(n,d):void 0)}}class I extends E.AbstractDebugAdapter{constructor(n){super(),this.implementation=n,n.onDidSendMessage(d=>{this.acceptMessage(d)})}startSession(){return Promise.resolve(void 0)}sendMessage(n){this.implementation.handleMessage(n)}stopSession(){return this.implementation.dispose(),Promise.resolve(void 0)}}let r=class extends a{constructor(n,d,l,f,s,h){super(n,d,l,f,s,h)}};r=He([We(0,O.IExtHostRpcService),We(1,g.IExtHostWorkspace),We(2,T.IExtHostExtensionService),We(3,t.IExtHostConfiguration),We(4,_.IExtHostEditorTabs),We(5,o.IExtHostVariableResolverProvider)],r),e.WorkerExtHostDebugService=r}),define(De[238],Ce([1,0,12,76,2,5,229,11,59,60,26,149,14,50,33,69]),function(ne,e,i,D,S,N,y,A,_,T,O,b,g,E,m,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtensionHostMain=void 0;class o{static async installEarlyHandler(w){const u=w.get(A.ILogService),r=w.get(g.IExtHostRpcService).getProxy(N.MainContext.MainThreadErrors);i.setUnexpectedErrorHandler(c=>{u.error(c);const n=i.transformErrorForSerialization(c);r.$onUnexpectedError(n)})}static async installFullHandler(w){const u=w.get(A.ILogService),I=w.get(g.IExtHostRpcService),r=w.get(m.IExtHostExtensionService),c=w.get(t.IExtHostTelemetry),n=I.getProxy(N.MainContext.MainThreadExtensionService),d=I.getProxy(N.MainContext.MainThreadErrors),l=await r.getExtensionPathIndex(),f=new WeakMap;Error.prepareStackTrace=(s,h)=>{let v="",k,F;for(const j of h)v+=` at ${j.toString()}`,F=j.getFileName(),!k&&F&&(k=l.findSubstr(S.URI.file(F)));return f.set(s,k?.identifier),`${s.name||"Error"}: ${s.message||""}${v}`},i.setUnexpectedErrorHandler(s=>{u.error(s);const h=i.transformErrorForSerialization(s),v=f.get(s);if(!v){d.$onUnexpectedError(h);return}n.$onExtensionRuntimeError(v,h);const k=c.onExtensionError(v,s);u.trace("forwarded error to extension?",k,v)})}}Error.stackTraceLimit=100;class a{constructor(w,u,I,r,c){this._hostUtils=I,this._rpcProtocol=new y.RPCProtocol(w,null,r),u=a._transform(u,this._rpcProtocol);const n=new T.ServiceCollection(...(0,_.getSingletonServiceDescriptors)());n.set(O.IExtHostInitDataService,{_serviceBrand:void 0,...u,messagePorts:c}),n.set(g.IExtHostRpcService,new g.ExtHostRpcService(this._rpcProtocol)),n.set(E.IURITransformerService,new E.URITransformerService(r)),n.set(m.IHostUtils,I);const d=new b.InstantiationService(n,!0);d.invokeFunction(o.installEarlyHandler),this._logService=d.invokeFunction(l=>l.get(A.ILogService)),D.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",u),this._extensionService=d.invokeFunction(l=>l.get(m.IExtHostExtensionService)),this._extensionService.initialize(),d.invokeFunction(o.installFullHandler)}async asBrowserUri(w){const u=this._rpcProtocol.getProxy(N.MainContext.MainThreadExtensionService);return S.URI.revive(await u.$asBrowserUri(w))}terminate(w){this._extensionService.terminate(w)}static _transform(w,u){w.allExtensions.forEach(r=>{r.extensionLocation=S.URI.revive(u.transformIncomingURIs(r.extensionLocation));const c={};r.browserNlsBundleUris&&(Object.keys(r.browserNlsBundleUris).forEach(n=>c[n]=S.URI.revive(u.transformIncomingURIs(r.browserNlsBundleUris[n]))),r.browserNlsBundleUris=c)}),w.environment.appRoot=S.URI.revive(u.transformIncomingURIs(w.environment.appRoot));const I=w.environment.extensionDevelopmentLocationURI;return I&&(w.environment.extensionDevelopmentLocationURI=I.map(r=>S.URI.revive(u.transformIncomingURIs(r)))),w.environment.extensionTestsLocationURI=S.URI.revive(u.transformIncomingURIs(w.environment.extensionTestsLocationURI)),w.environment.globalStorageHome=S.URI.revive(u.transformIncomingURIs(w.environment.globalStorageHome)),w.environment.workspaceStorageHome=S.URI.revive(u.transformIncomingURIs(w.environment.workspaceStorageHome)),w.environment.extensionTelemetryLogResource=S.URI.revive(u.transformIncomingURIs(w.environment.extensionTelemetryLogResource)),w.nlsBaseUrl=S.URI.revive(u.transformIncomingURIs(w.nlsBaseUrl)),w.logsLocation=S.URI.revive(u.transformIncomingURIs(w.logsLocation)),w.logFile=S.URI.revive(u.transformIncomingURIs(w.logFile)),w.workspace=u.transformIncomingURIs(w.workspace),w}}e.ExtensionHostMain=a}),define(De[239],Ce([1,0,18,15,20,45,13,19,22,2,44]),function(ne,e,i,D,S,N,y,A,_,T,O){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BatchedCollector=e.extensionResultIsMatch=e.TextSearchResultsCollector=e.TextSearchManager=void 0;class b{constructor(p,w,u,I){this.query=p,this.provider=w,this.fileUtils=u,this.processType=I,this.collector=null,this.isLimitHit=!1,this.resultCount=0}search(p,w){const u=this.query.folderQueries||[],I=new S.CancellationTokenSource;return w.onCancellationRequested(()=>I.cancel()),new Promise((r,c)=>{this.collector=new E(p);let n=!1;const d=(l,f)=>{if(!n&&!this.isLimitHit){const s=this.resultSize(l);t(l)&&typeof this.query.maxResults=="number"&&this.resultCount+s>this.query.maxResults&&(this.isLimitHit=!0,n=!0,I.cancel(),l=this.trimResultToSize(l,this.query.maxResults-this.resultCount));const h=this.resultSize(l);this.resultCount+=h,(h>0||!t(l))&&this.collector.add(l,f)}};Promise.all(u.map((l,f)=>this.searchInFolder(l,s=>d(s,f),I.token))).then(l=>{I.dispose(),this.collector.flush();const f=l.some(s=>!!s&&!!s.limitHit);r({limitHit:this.isLimitHit||f,messages:(0,i.flatten)(l.map(s=>s?.message?Array.isArray(s.message)?s.message:[s.message]:[])),stats:{type:this.processType}})},l=>{I.dispose();const f=(0,N.toErrorMessage)(l);c(new Error(f))})})}resultSize(p){return t(p)?Array.isArray(p.ranges)?p.ranges.length:1:0}trimResultToSize(p,w){const u=Array.isArray(p.ranges)?p.ranges:[p.ranges],I=Array.isArray(p.preview.matches)?p.preview.matches:[p.preview.matches];return{ranges:u.slice(0,w),preview:{matches:I.slice(0,w),text:p.preview.text},uri:p.uri}}async searchInFolder(p,w,u){const I=new O.QueryGlobTester(this.query,p),r=[],c={report:l=>{if(!this.validateProviderResult(l))return;const f=p.folder.scheme===y.Schemas.file?(0,O.hasSiblingPromiseFn)(()=>this.fileUtils.readdir(_.dirname(l.uri))):void 0,s=_.relativePath(p.folder,l.uri);if(s){const h=I.includedInQuery(s,A.basename(s),f);(0,D.isThenable)(h)?r.push(h.then(v=>{v&&w(l)})):h&&w(l)}}},n=this.getSearchOptionsForFolder(p),d=await this.provider.provideTextSearchResults(g(this.query.contentPattern),n,c,u);return r.length&&await Promise.all(r),d}validateProviderResult(p){if(t(p)){if(Array.isArray(p.ranges)){if(!Array.isArray(p.preview.matches))return console.warn("INVALID - A text search provider match's`ranges` and`matches` properties must have the same type."),!1;if(p.preview.matches.length!==p.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(p.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(p){const w=(0,O.resolvePatternsForProvider)(this.query.includePattern,p.includePattern),u=(0,O.resolvePatternsForProvider)(this.query.excludePattern,p.excludePattern),I={folder:T.URI.from(p.folder),excludes:u,includes:w,useIgnoreFiles:!p.disregardIgnoreFiles,useGlobalIgnoreFiles:!p.disregardGlobalIgnoreFiles,useParentIgnoreFiles:!p.disregardParentIgnoreFiles,followSymlinks:!p.ignoreSymlinks,encoding:p.fileEncoding&&this.fileUtils.toCanonicalName(p.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=b;function g(a){return{isCaseSensitive:a.isCaseSensitive||!1,isRegExp:a.isRegExp||!1,isWordMatch:a.isWordMatch||!1,isMultiline:a.isMultiline||!1,pattern:a.pattern}}class E{constructor(p){this._onResult=p,this._currentFolderIdx=-1,this._currentFileMatch=null,this._batchedCollector=new o(512,w=>this.sendItems(w))}add(p,w){this._currentFileMatch&&(this._currentFolderIdx!==w||!_.isEqual(this._currentUri,p.uri))&&(this.pushToCollector(),this._currentFileMatch=null),this._currentFileMatch||(this._currentFolderIdx=w,this._currentFileMatch={resource:p.uri,results:[]}),this._currentFileMatch.results.push(m(p))}pushToCollector(){const p=this._currentFileMatch&&this._currentFileMatch.results?this._currentFileMatch.results.length:0;this._batchedCollector.addItem(this._currentFileMatch,p)}flush(){this.pushToCollector(),this._batchedCollector.flush()}sendItems(p){this._onResult(p)}}e.TextSearchResultsCollector=E;function m(a){return t(a)?{preview:{matches:(0,i.mapArrayOrNot)(a.preview.matches,p=>({startLineNumber:p.start.line,startColumn:p.start.character,endLineNumber:p.end.line,endColumn:p.end.character})),text:a.preview.text},ranges:(0,i.mapArrayOrNot)(a.ranges,p=>({startLineNumber:p.start.line,startColumn:p.start.character,endLineNumber:p.end.line,endColumn:p.end.character}))}:{text:a.text,lineNumber:a.lineNumber}}function t(a){return!!a.preview}e.extensionResultIsMatch=t;class o{constructor(p,w){this.maxBatchSize=p,this.cb=w,this.totalNumberCompleted=0,this.batch=[],this.batchSize=0}addItem(p,w){!p||this.addItemToBatch(p,w)}addItems(p,w){!p||this.addItemsToBatch(p,w)}addItemToBatch(p,w){this.batch.push(p),this.batchSize+=w,this.onUpdate()}addItemsToBatch(p,w){this.batch=this.batch.concat(p),this.batchSize+=w,this.onUpdate()}onUpdate(){this.totalNumberCompleted=this.maxBatchSize?this.flush():this.timeoutHandle||(this.timeoutHandle=setTimeout(()=>{this.flush()},o.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=o,o.TIMEOUT=4e3,o.START_BATCH_AFTER_COUNT=50}),define(De[105],Ce([1,0,7,5,3,234,14,50,11,2,239]),function(ne,e,i,D,S,N,y,A,_,T,O){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.reviveQuery=e.ExtHostSearch=e.IExtHostSearch=void 0,e.IExtHostSearch=(0,S.createDecorator)("IExtHostSearch");let b=class{constructor(t,o,a){this.extHostRpc=t,this._uriTransformer=o,this._logService=a,this._proxy=this.extHostRpc.getProxy(D.MainContext.MainThreadSearch),this._handlePool=0,this._textSearchProvider=new Map,this._textSearchUsedSchemes=new Set,this._fileSearchProvider=new Map,this._fileSearchUsedSchemes=new Set,this._fileSearchManager=new N.FileSearchManager}_transformScheme(t){return this._uriTransformer.transformOutgoingScheme(t)}registerTextSearchProvider(t,o){if(this._textSearchUsedSchemes.has(t))throw new Error(`a text search provider for the scheme '${t}' is already registered`);this._textSearchUsedSchemes.add(t);const a=this._handlePool++;return this._textSearchProvider.set(a,o),this._proxy.$registerTextSearchProvider(a,this._transformScheme(t)),(0,i.toDisposable)(()=>{this._textSearchUsedSchemes.delete(t),this._textSearchProvider.delete(a),this._proxy.$unregisterProvider(a)})}registerFileSearchProvider(t,o){if(this._fileSearchUsedSchemes.has(t))throw new Error(`a file search provider for the scheme '${t}' is already registered`);this._fileSearchUsedSchemes.add(t);const a=this._handlePool++;return this._fileSearchProvider.set(a,o),this._proxy.$registerFileSearchProvider(a,this._transformScheme(t)),(0,i.toDisposable)(()=>{this._fileSearchUsedSchemes.delete(t),this._fileSearchProvider.delete(a),this._proxy.$unregisterProvider(a)})}$provideFileSearchResults(t,o,a,p){const w=g(a),u=this._fileSearchProvider.get(t);if(u)return this._fileSearchManager.fileSearch(w,u,I=>{this._proxy.$handleFileMatch(t,o,I.map(r=>r.resource))},p);throw new Error("unknown provider: "+t)}$clearCache(t){return this._fileSearchManager.clearCache(t),Promise.resolve(void 0)}$provideTextSearchResults(t,o,a,p){const w=this._textSearchProvider.get(t);if(!w||!w.provideTextSearchResults)throw new Error(`Unknown provider ${t}`);const u=g(a);return this.createTextSearchManager(u,w).search(r=>this._proxy.$handleTextMatch(t,o,r),p)}$enableExtensionHostSearch(){}createTextSearchManager(t,o){return new O.TextSearchManager(t,o,{readdir:a=>Promise.resolve([]),toCanonicalName:a=>a},"textSearchProvider")}};b=He([We(0,y.IExtHostRpcService),We(1,A.IURITransformerService),We(2,_.ILogService)],b),e.ExtHostSearch=b;function g(m){return{...m,folderQueries:m.folderQueries&&m.folderQueries.map(E),extraFileResources:m.extraFileResources&&m.extraFileResources.map(t=>T.URI.revive(t))}}e.reviveQuery=g;function E(m){return{...m,folder:T.URI.revive(m.folder)}}}),define(De[240],Ce([1,0,59,100,31,98,32,37,53,56,102,104,105,74,64,71,99,55,36,73,69,54,211,11,181,103,72]),function(ne,e,i,D,S,N,y,A,_,T,O,b,g,E,m,t,o,a,p,w,u,I,r,c,n,d,l){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),(0,i.registerSingleton)(l.IExtHostLocalizationService,l.ExtHostLocalizationService,1),(0,i.registerSingleton)(c.ILoggerService,r.ExtHostLoggerService,1),(0,i.registerSingleton)(c.ILogService,n.ExtHostLogService,1),(0,i.registerSingleton)(t.IExtHostApiDeprecationService,t.ExtHostApiDeprecationService,!1),(0,i.registerSingleton)(A.IExtHostCommands,A.ExtHostCommands,!1),(0,i.registerSingleton)(y.IExtHostConfiguration,y.ExtHostConfiguration,!1),(0,i.registerSingleton)(a.IExtHostConsumerFileSystem,a.ExtHostConsumerFileSystem,!1),(0,i.registerSingleton)(b.IExtHostDebugService,b.WorkerExtHostDebugService,!1),(0,i.registerSingleton)(N.IExtHostDecorations,N.ExtHostDecorations,!1),(0,i.registerSingleton)(_.IExtHostDocumentsAndEditors,_.ExtHostDocumentsAndEditors,!1),(0,i.registerSingleton)(p.IExtHostFileSystemInfo,p.ExtHostFileSystemInfo,!1),(0,i.registerSingleton)(D.IExtHostOutputService,D.ExtHostOutputService,1),(0,i.registerSingleton)(g.IExtHostSearch,g.ExtHostSearch,!1),(0,i.registerSingleton)(E.IExtHostStorage,E.ExtHostStorage,!1),(0,i.registerSingleton)(O.IExtHostTask,O.WorkerExtHostTask,!1),(0,i.registerSingleton)(T.IExtHostTerminalService,T.WorkerExtHostTerminalService,!1),(0,i.registerSingleton)(m.IExtHostTunnelService,m.ExtHostTunnelService,!1),(0,i.registerSingleton)(o.IExtHostWindow,o.ExtHostWindow,!1),(0,i.registerSingleton)(S.IExtHostWorkspace,S.ExtHostWorkspace,!1),(0,i.registerSingleton)(w.IExtHostSecretState,w.ExtHostSecretState,!1),(0,i.registerSingleton)(u.IExtHostTelemetry,u.ExtHostTelemetry,!1),(0,i.registerSingleton)(I.IExtHostEditorTabs,I.ExtHostEditorTabs,!1),(0,i.registerSingleton)(d.IExtHostVariableResolverProvider,d.ExtHostVariableResolverProviderService,!1)}),define(De[241],Ce([1,0]),function(ne,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TreeviewsService=void 0;class i{constructor(){this._dragOperations=new Map,this._renderedElements=new Map}removeDragOperationTransfer(S){if(S&&this._dragOperations.has(S)){const N=this._dragOperations.get(S);return this._dragOperations.delete(S),N}}addDragOperationTransfer(S,N){this._dragOperations.set(S,N)}getRenderedTreeElement(S){if(this._renderedElements.has(S))return this._renderedElements.get(S)}addRenderedTreeItemElement(S,N){this._renderedElements.set(S,N)}removeRenderedTreeItemElement(S){this._renderedElements.has(S)&&this._renderedElements.delete(S)}}e.TreeviewsService=i}),define(De[242],Ce([1,0,136,6,22,2,4,7,15,6,9,18,8,20,241,27]),function(ne,e,i,D,S,N,y,A,_,T,O,b,g,E,m,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtHostTreeViews=void 0;function o(w,u){if((0,O.isString)(w))return{label:w};if(w&&typeof w=="object"&&typeof w.label=="string"){let I;return Array.isArray(w.highlights)&&(I=w.highlights.filter(r=>r.length===2&&typeof r[0]=="number"&&typeof r[1]=="number"),I=I.length?I:void 0),{label:w.label,highlights:I}}}class a{constructor(u,I,r){this._proxy=u,this.commands=I,this.logService=r,this.treeViews=new Map,this.treeDragAndDropService=new m.TreeviewsService;function c(n){return n&&n.$treeViewId&&(n.$treeItemHandle||n.$selectedTreeItems||n.$focusedTreeItem)}I.registerArgumentProcessor({processArgument:n=>c(n)?this.convertArgument(n):Array.isArray(n)&&n.length>0?n.map(d=>c(d)?this.convertArgument(d):d):n})}registerTreeDataProvider(u,I,r){const c=this.createTreeView(u,{treeDataProvider:I},r);return{dispose:()=>c.dispose()}}createTreeView(u,I,r){if(!I||!I.treeDataProvider)throw new Error("Options with treeDataProvider is mandatory");const c=I.dragAndDropController?.dropMimeTypes??[],n=I.dragAndDropController?.dragMimeTypes??[],d=!!I.dragAndDropController?.handleDrag,l=!!I.dragAndDropController?.handleDrop,f=this.createExtHostTreeView(u,I,r),s=this._proxy.$registerTreeViewDataProvider(u,{showCollapseAll:!!I.showCollapseAll,canSelectMany:!!I.canSelectMany,dropMimeTypes:c,dragMimeTypes:n,hasHandleDrag:d,hasHandleDrop:l});return{get onDidCollapseElement(){return f.onDidCollapseElement},get onDidExpandElement(){return f.onDidExpandElement},get selection(){return f.selectedElements},get onDidChangeSelection(){return f.onDidChangeSelection},get visible(){return f.visible},get onDidChangeVisibility(){return f.onDidChangeVisibility},get onDidChangeCheckboxState(){return(0,t.checkProposedApiEnabled)(r,"treeItemCheckbox"),f.onDidChangeCheckboxState},get message(){return f.message},set message(h){f.message=h},get title(){return f.title},set title(h){f.title=h},get description(){return f.description},set description(h){f.description=h},get badge(){return f.badge},set badge(h){h!==void 0&&T.ViewBadge.isViewBadge(h)?f.badge={value:Math.floor(Math.abs(h.value)),tooltip:h.tooltip}:h===void 0&&(f.badge=void 0)},reveal:(h,v)=>f.reveal(h,v),dispose:async()=>{await s,this.treeViews.delete(u),f.dispose()}}}$getChildren(u,I){const r=this.treeViews.get(u);return r?r.getChildren(I):Promise.reject(new Error((0,i.localize)(0,null,u)))}async $handleDrop(u,I,r,c,n,d,l,f){const s=this.treeViews.get(u);if(!s)return Promise.reject(new Error((0,i.localize)(1,null,u)));const h=g.DataTransfer.toDataTransfer(r,async v=>(await this._proxy.$resolveDropFileData(u,I,v)).buffer);return l===u&&f&&await this.addAdditionalTransferItems(h,s,f,n,d),s.onDrop(h,c,n)}async addAdditionalTransferItems(u,I,r,c,n){const d=this.treeDragAndDropService.removeDragOperationTransfer(n);if(d)(await d)?.forEach((l,f)=>{l&&u.set(f,l)});else if(n&&I.handleDrag){const l=I.handleDrag(r,u,c);this.treeDragAndDropService.addDragOperationTransfer(n,l),await l}return u}async $handleDrag(u,I,r,c){const n=this.treeViews.get(u);if(!n)return Promise.reject(new Error((0,i.localize)(2,null,u)));const d=await this.addAdditionalTransferItems(new D.DataTransfer,n,I,c,r);if(!!d)return g.DataTransfer.toDataTransferDTO(d)}async $hasResolve(u){const I=this.treeViews.get(u);if(!I)throw new Error((0,i.localize)(3,null,u));return I.hasResolve}$resolve(u,I,r){const c=this.treeViews.get(u);if(!c)throw new Error((0,i.localize)(4,null,u));return c.resolveTreeItem(I,r)}$setExpanded(u,I,r){const c=this.treeViews.get(u);if(!c)throw new Error((0,i.localize)(5,null,u));c.setExpanded(I,r)}$setSelection(u,I){const r=this.treeViews.get(u);if(!r)throw new Error((0,i.localize)(6,null,u));r.setSelection(I)}$setFocus(u,I){const r=this.treeViews.get(u);if(!r)throw new Error((0,i.localize)(7,null,u));r.setFocus(I)}$setVisible(u,I){const r=this.treeViews.get(u);if(!r)throw new Error((0,i.localize)(8,null,u));r.setVisible(I)}$changeCheckboxState(u,I){const r=this.treeViews.get(u);if(!r)throw new Error((0,i.localize)(9,null,u));r.setCheckboxState(I)}createExtHostTreeView(u,I,r){const c=new p(u,I,this._proxy,this.commands.converter,this.logService,r);return this.treeViews.set(u,c),c}convertArgument(u){const I=this.treeViews.get(u.$treeViewId);return I&&"$treeItemHandle"in u?I.getExtensionElement(u.$treeItemHandle):I&&"$focusedTreeItem"in u&&u.$focusedTreeItem?I.focusedElement:null}}e.ExtHostTreeViews=a;class p extends A.Disposable{get visible(){return this._visible}get selectedElements(){return this._selectedHandles.map(u=>this.getExtensionElement(u)).filter(u=>!(0,O.isUndefinedOrNull)(u))}get focusedElement(){return this._focusedHandle?this.getExtensionElement(this._focusedHandle):void 0}constructor(u,I,r,c,n,d){if(super(),this.viewId=u,this.proxy=r,this.commands=c,this.logService=n,this.extension=d,this.roots=void 0,this.elements=new Map,this.nodes=new Map,this._visible=!1,this._selectedHandles=[],this._focusedHandle=void 0,this._onDidExpandElement=this._register(new y.Emitter),this.onDidExpandElement=this._onDidExpandElement.event,this._onDidCollapseElement=this._register(new y.Emitter),this.onDidCollapseElement=this._onDidCollapseElement.event,this._onDidChangeSelection=this._register(new y.Emitter),this.onDidChangeSelection=this._onDidChangeSelection.event,this._onDidChangeVisibility=this._register(new y.Emitter),this.onDidChangeVisibility=this._onDidChangeVisibility.event,this._onDidChangeCheckboxState=this._register(new y.Emitter),this.onDidChangeCheckboxState=this._onDidChangeCheckboxState.event,this._onDidChangeData=this._register(new y.Emitter),this.refreshPromise=Promise.resolve(),this.refreshQueue=Promise.resolve(),this._message="",this._title="",this._refreshCancellationSource=new E.CancellationTokenSource,d.contributes&&d.contributes.views)for(const s in d.contributes.views)for(const h of d.contributes.views[s])h.id===u&&(this._title=h.name);this.dataProvider=I.treeDataProvider,this.dndController=I.dragAndDropController,this.dataProvider.onDidChangeTreeData&&this._register(this.dataProvider.onDidChangeTreeData(s=>this._onDidChangeData.fire({message:!1,element:s})));let l,f;this._register(y.Event.debounce(this._onDidChangeData.event,(s,h)=>(s||(s={message:!1,elements:[]}),h.element!==!1&&(l||(l=new Promise(v=>f=v),this.refreshPromise=this.refreshPromise.then(()=>l)),Array.isArray(h.element)?s.elements.push(...h.element):s.elements.push(h.element)),h.message&&(s.message=!0),s),200,!0)(({message:s,elements:h})=>{h.length&&(this.refreshQueue=this.refreshQueue.then(()=>{const v=f;return l=null,this.refresh(h).then(()=>v())})),s&&this.proxy.$setMessage(this.viewId,this._message)}))}async getChildren(u){const I=u?this.getExtensionElement(u):void 0;if(u&&!I)return this.logService.error(`No tree item with id '${u}' found.`),Promise.resolve([]);let r=this.getChildrenNodes(u);return r||(r=await this.fetchChildrenNodes(I)),r?r.map(c=>c.item):void 0}getExtensionElement(u){return this.elements.get(u)}reveal(u,I){I=I||{select:!0,focus:!1};const r=(0,O.isUndefinedOrNull)(I.select)?!0:I.select,c=(0,O.isUndefinedOrNull)(I.focus)?!1:I.focus,n=(0,O.isUndefinedOrNull)(I.expand)?!1:I.expand;return typeof this.dataProvider.getParent!="function"?Promise.reject(new Error("Required registered TreeDataProvider to implement 'getParent' method to access 'reveal' method")):u?this.refreshPromise.then(()=>this.resolveUnknownParentChain(u)).then(d=>this.resolveTreeNode(u,d[d.length-1]).then(l=>this.proxy.$reveal(this.viewId,{item:l.item,parentChain:d.map(f=>f.item)},{select:r,focus:c,expand:n})),d=>this.logService.error(d)):this.proxy.$reveal(this.viewId,void 0,{select:r,focus:c,expand:n})}get message(){return this._message}set message(u){this._message=u,this._onDidChangeData.fire({message:!0,element:!1})}get title(){return this._title}set title(u){this._title=u,this.proxy.$setTitle(this.viewId,u,this._description)}get description(){return this._description}set description(u){this._description=u,this.proxy.$setTitle(this.viewId,this._title,u)}get badge(){return this._badge}set badge(u){this._badge?.value===u?.value&&this._badge?.tooltip===u?.tooltip||(this._badge=g.ViewBadge.from(u),this.proxy.$setBadge(this.viewId,u))}setExpanded(u,I){const r=this.getExtensionElement(u);r&&(I?this._onDidExpandElement.fire(Object.freeze({element:r})):this._onDidCollapseElement.fire(Object.freeze({element:r})))}setSelection(u){(0,b.equals)(this._selectedHandles,u)||(this._selectedHandles=u,this._onDidChangeSelection.fire(Object.freeze({selection:this.selectedElements})))}setFocus(u){this._focusedHandle=u}setVisible(u){u!==this._visible&&(this._visible=u,this._onDidChangeVisibility.fire(Object.freeze({visible:this._visible})))}async setCheckboxState(u){const I=(await Promise.all(u.map(async r=>{const c=this.getExtensionElement(r.treeItemHandle);return c?{extensionItem:c,treeItem:await this.dataProvider.getTreeItem(c),newState:r.newState?T.TreeItemCheckboxState.Checked:T.TreeItemCheckboxState.Unchecked}:Promise.resolve(void 0)}))).filter(r=>r!==void 0);I.forEach(r=>{r.treeItem.checkboxState=r.newState?T.TreeItemCheckboxState.Checked:T.TreeItemCheckboxState.Unchecked}),this._onDidChangeCheckboxState.fire({items:I.map(r=>[r.extensionItem,r.newState])})}async handleDrag(u,I,r){const c=[];for(const n of u){const d=this.getExtensionElement(n);d&&c.push(d)}if(!(!this.dndController?.handleDrag||c.length===0))return await this.dndController.handleDrag(c,I,r),I}get hasHandleDrag(){return!!this.dndController?.handleDrag}async onDrop(u,I,r){const c=I?this.getExtensionElement(I):void 0;if(!(!c&&I||!this.dndController?.handleDrop))return(0,_.asPromise)(()=>this.dndController?.handleDrop?this.dndController.handleDrop(c,u,r):void 0)}get hasResolve(){return!!this.dataProvider.resolveTreeItem}async resolveTreeItem(u,I){if(!this.dataProvider.resolveTreeItem)return;const r=this.elements.get(u);if(r){const c=this.nodes.get(r);if(c){const n=await this.dataProvider.resolveTreeItem(c.extensionItem,r,I)??c.extensionItem;return this.validateTreeItem(n),c.item.tooltip=this.getTooltip(n.tooltip),c.item.command=this.getCommand(c.disposableStore,n.command),c.item}}}resolveUnknownParentChain(u){return this.resolveParent(u).then(I=>I?this.resolveUnknownParentChain(I).then(r=>this.resolveTreeNode(I,r[r.length-1]).then(c=>(r.push(c),r))):Promise.resolve([]))}resolveParent(u){const I=this.nodes.get(u);return I?Promise.resolve(I.parent?this.elements.get(I.parent.item.handle):void 0):(0,_.asPromise)(()=>this.dataProvider.getParent(u))}resolveTreeNode(u,I){const r=this.nodes.get(u);return r?Promise.resolve(r):(0,_.asPromise)(()=>this.dataProvider.getTreeItem(u)).then(c=>this.createHandle(u,c,I,!0)).then(c=>this.getChildren(I?I.item.handle:void 0).then(()=>{const n=this.getExtensionElement(c);if(n){const d=this.nodes.get(n);if(d)return Promise.resolve(d)}throw new Error(`Cannot resolve tree item for element ${c}`)}))}getChildrenNodes(u){if(u){let I;if(typeof u=="string"){const r=this.getExtensionElement(u);I=r?this.nodes.get(r):void 0}else I=u;return I&&I.children||void 0}return this.roots}async fetchChildrenNodes(u){this.clearChildren(u);const I=new E.CancellationTokenSource(this._refreshCancellationSource.token);try{const r=u?this.nodes.get(u):void 0,c=await this.dataProvider.getChildren(u);if(I.token.isCancellationRequested)return;const n=await Promise.all((0,b.coalesce)(c||[]).map(async d=>{const l=await this.dataProvider.getTreeItem(d);return l&&!I.token.isCancellationRequested?this.createAndRegisterTreeNode(d,l,r):null}));return I.token.isCancellationRequested?void 0:(0,b.coalesce)(n)}finally{I.dispose()}}refresh(u){if(u.some(r=>!r))return this._refreshCancellationSource.dispose(!0),this._refreshCancellationSource=new E.CancellationTokenSource,this.clearAll(),this.proxy.$refresh(this.viewId);{const r=this.getHandlesToRefresh(u);if(r.length)return this.refreshHandles(r)}return Promise.resolve(void 0)}getHandlesToRefresh(u){const I=new Set,r=u.map(n=>this.nodes.get(n));for(const n of r)if(n&&!I.has(n.item.handle)){let d=n;for(;d&&d.parent&&r.findIndex(l=>d&&d.parent&&l&&l.item.handle===d.parent.item.handle)===-1;){const l=this.elements.get(d.parent.item.handle);d=l?this.nodes.get(l):void 0}d&&!d.parent&&I.add(n.item.handle)}const c=[];return I.forEach(n=>{const d=this.elements.get(n);if(d){const l=this.nodes.get(d);l&&(!l.parent||!I.has(l.parent.item.handle))&&c.push(n)}}),c}refreshHandles(u){const I={};return Promise.all(u.map(r=>this.refreshNode(r).then(c=>{c&&(I[r]=c.item)}))).then(()=>Object.keys(I).length?this.proxy.$refresh(this.viewId,I):void 0)}refreshNode(u){const I=this.getExtensionElement(u);if(I){const r=this.nodes.get(I);if(r)return this.clearChildren(I),(0,_.asPromise)(()=>this.dataProvider.getTreeItem(I)).then(c=>{if(c){const n=this.createTreeNode(I,c,r.parent);return this.updateNodeCache(I,n,r,r.parent),r.dispose(),n}return null})}return Promise.resolve(null)}createAndRegisterTreeNode(u,I,r){const c=this.createTreeNode(u,I,r);if(I.id&&this.elements.has(c.item.handle))throw new Error((0,i.localize)(10,null,I.id));return this.addNodeToCache(u,c),this.addNodeToParentCache(c,r),c}getTooltip(u){return T.MarkdownString.isMarkdownString(u)?g.MarkdownString.from(u):u}getCommand(u,I){return I?{...this.commands.toInternal(I,u),originalId:I.command}:void 0}getCheckbox(u){if(!u.checkboxState)return;let I,r;return typeof u.checkboxState=="number"?I=u.checkboxState:(I=u.checkboxState.state,r=u.checkboxState.tooltip),{isChecked:I===T.TreeItemCheckboxState.Checked,tooltip:r}}validateTreeItem(u){if(!T.TreeItem.isTreeItem(u,this.extension))throw new Error(`Extension ${this.extension.identifier.value} has provided an invalid tree item.`)}createTreeNode(u,I,r){this.validateTreeItem(I);const c=new A.DisposableStore,n=this.createHandle(u,I,r),d=this.getLightIconPath(I);return{item:{handle:n,parentHandle:r?r.item.handle:void 0,label:o(I.label,this.extension),description:I.description,resourceUri:I.resourceUri,tooltip:this.getTooltip(I.tooltip),command:this.getCommand(c,I.command),contextValue:I.contextValue,icon:d,iconDark:this.getDarkIconPath(I)||d,themeIcon:this.getThemeIcon(I),collapsibleState:(0,O.isUndefinedOrNull)(I.collapsibleState)?T.TreeItemCollapsibleState.None:I.collapsibleState,accessibilityInformation:I.accessibilityInformation,checkbox:this.getCheckbox(I)},extensionItem:I,parent:r,children:void 0,disposableStore:c,dispose(){c.dispose()}}}getThemeIcon(u){return u.iconPath instanceof T.ThemeIcon?u.iconPath:void 0}createHandle(u,{id:I,label:r,resourceUri:c},n,d){if(I)return`${p.ID_HANDLE_PREFIX}/${I}`;const l=o(r,this.extension),f=n?n.item.handle:p.LABEL_HANDLE_PREFIX;let s=l?l.label:c?(0,S.basename)(c):"";s=s.indexOf("/")!==-1?s.replace("/","//"):s;const h=this.nodes.has(u)?this.nodes.get(u).item.handle:void 0,v=this.getChildrenNodes(n)||[];let k,F=0;do{if(k=`${f}/${F}:${s}`,d||!this.elements.has(k)||h===k)break;F++}while(F<=v.length);return k}getLightIconPath(u){if(u.iconPath&&!(u.iconPath instanceof T.ThemeIcon))return typeof u.iconPath=="string"||N.URI.isUri(u.iconPath)?this.getIconPath(u.iconPath):this.getIconPath(u.iconPath.light)}getDarkIconPath(u){if(u.iconPath&&!(u.iconPath instanceof T.ThemeIcon)&&u.iconPath.dark)return this.getIconPath(u.iconPath.dark)}getIconPath(u){return N.URI.isUri(u)?u:N.URI.file(u)}addNodeToCache(u,I){this.elements.set(I.item.handle,u),this.nodes.set(u,I)}updateNodeCache(u,I,r,c){this.elements.delete(I.item.handle),this.nodes.delete(u),I.item.handle!==r.item.handle&&this.elements.delete(r.item.handle),this.addNodeToCache(u,I);const n=this.getChildrenNodes(c)||[],d=n.filter(l=>l.item.handle===r.item.handle)[0];d&&n.splice(n.indexOf(d),1,I)}addNodeToParentCache(u,I){I?(I.children||(I.children=[]),I.children.push(u)):(this.roots||(this.roots=[]),this.roots.push(u))}clearChildren(u){if(u){const I=this.nodes.get(u);if(I){if(I.children)for(const r of I.children){const c=this.elements.get(r.item.handle);c&&this.clear(c)}I.children=void 0}}else this.clearAll()}clear(u){const I=this.nodes.get(u);if(I){if(I.children)for(const r of I.children){const c=this.elements.get(r.item.handle);c&&this.clear(c)}this.nodes.delete(u),this.elements.delete(I.item.handle),I.dispose()}}clearAll(){this.roots=void 0,this.elements.clear(),this.nodes.forEach(u=>u.dispose()),this.nodes.clear()}dispose(){this._refreshCancellationSource.dispose(),this.clearAll()}}p.LABEL_HANDLE_PREFIX="0",p.ID_HANDLE_PREFIX="1"}),define(De[243],Ce([1,0,20,12,4,29,2,123,252,111,121,35,5,68,196,195,37,197,32,199,200,201,184,202,53,33,204,205,208,210,212,100,187,216,217,218,74,56,221,242,8,6,224,57,99,31,168,207,61,98,102,104,105,11,50,14,26,213,182,64,71,193,222,75,55,227,225,226,194,36,219,223,73,54,69,214,101,215,13,87,186,165,206,7,27,170,72,162]),function(ne,e,i,D,S,N,y,A,_,T,O,b,g,E,m,t,o,a,p,w,u,I,r,c,n,d,l,f,s,h,v,k,F,j,W,H,P,M,R,B,$,U,K,te,de,re,be,le,fe,Y,ge,Se,Oe,Be,Xe,ke,ye,Ie,ae,ue,ee,Z,C,z,V,q,oe,ce,J,pe,Ee,Ne,xe,Ze,Ge,Qe,Fe,dt,X,Q,ve,Ue,je,qe,ze,tt,nt,lt){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createApiFactoryAndRegisterActors=void 0;function Dt(ot){const rt=ot.get(ye.IExtHostInitDataService),Nt=ot.get(pe.IExtHostFileSystemInfo),Ot=ot.get(V.IExtHostConsumerFileSystem),kt=ot.get(d.IExtHostExtensionService),mt=ot.get(re.IExtHostWorkspace),St=ot.get(Ge.IExtHostTelemetry),Lt=ot.get(p.IExtHostConfiguration),Ut=ot.get(Xe.IURITransformerService),Ke=ot.get(ke.IExtHostRpcService),It=ot.get(P.IExtHostStorage),Pt=ot.get(z.IExtensionStoragePaths),Ft=ot.get(Be.ILoggerService),pt=ot.get(Be.ILogService),_e=ot.get(ue.IExtHostTunnelService),Te=ot.get(ee.IExtHostApiDeprecationService),me=ot.get(de.IExtHostWindow),G=ot.get(xe.IExtHostSecretState),Pe=ot.get(Ze.IExtHostEditorTabs);Ke.set(g.ExtHostContext.ExtHostFileSystemInfo,Nt),Ke.set(g.ExtHostContext.ExtHostLogLevelServiceShape,Ft),Ke.set(g.ExtHostContext.ExtHostWorkspace,mt),Ke.set(g.ExtHostContext.ExtHostConfiguration,Lt),Ke.set(g.ExtHostContext.ExtHostExtensionService,kt),Ke.set(g.ExtHostContext.ExtHostStorage,It),Ke.set(g.ExtHostContext.ExtHostTunnelService,_e),Ke.set(g.ExtHostContext.ExtHostWindow,me),Ke.set(g.ExtHostContext.ExtHostSecretState,G),Ke.set(g.ExtHostContext.ExtHostTelemetry,St),Ke.set(g.ExtHostContext.ExtHostEditorTabs,Pe);const Me=Ke.set(g.ExtHostContext.ExtHostDecorations,ot.get(Y.IExtHostDecorations)),et=Ke.set(g.ExtHostContext.ExtHostDocumentsAndEditors,ot.get(n.IExtHostDocumentsAndEditors)),$e=Ke.set(g.ExtHostContext.ExtHostCommands,ot.get(o.IExtHostCommands)),it=Ke.set(g.ExtHostContext.ExtHostTerminalService,ot.get(M.IExtHostTerminalService)),ct=Ke.set(g.ExtHostContext.ExtHostDebugService,ot.get(Se.IExtHostDebugService)),_t=Ke.set(g.ExtHostContext.ExtHostSearch,ot.get(Oe.IExtHostSearch)),vt=Ke.set(g.ExtHostContext.ExtHostTask,ot.get(ge.IExtHostTask)),yt=Ke.set(g.ExtHostContext.ExtHostOutputService,ot.get(k.IExtHostOutputService)),bt=Ke.set(g.ExtHostContext.ExtHostLocalization,ot.get(nt.IExtHostLocalizationService)),At=Ke.set(g.ExtHostContext.ExtHostUrls,new K.ExtHostUrls(Ke)),ft=Ke.set(g.ExtHostContext.ExtHostDocuments,new c.ExtHostDocuments(Ke,et)),zt=Ke.set(g.ExtHostContext.ExtHostDocumentContentProviders,new I.ExtHostDocumentContentProvider(Ke,et,pt)),ti=Ke.set(g.ExtHostContext.ExtHostDocumentSaveParticipant,new r.ExtHostDocumentSaveParticipant(pt,ft,Ke.getProxy(g.MainContext.MainThreadBulkEdits))),Et=Ke.set(g.ExtHostContext.ExtHostNotebook,new Ie.ExtHostNotebookController(Ke,$e,et,ft)),xt=Ke.set(g.ExtHostContext.ExtHostNotebookDocuments,new Ue.ExtHostNotebookDocuments(Et)),ii=Ke.set(g.ExtHostContext.ExtHostNotebookEditors,new ve.ExtHostNotebookEditors(pt,Et)),ni=Ke.set(g.ExtHostContext.ExtHostNotebookKernels,new Qe.ExtHostNotebookKernels(Ke,rt,Et,$e,pt)),vi=Ke.set(g.ExtHostContext.ExtHostNotebookRenderers,new dt.ExtHostNotebookRenderers(Ke,Et)),Ct=Ke.set(g.ExtHostContext.ExtHostEditors,new R.ExtHostEditors(Ke,et)),ri=Ke.set(g.ExtHostContext.ExtHostTreeViews,new B.ExtHostTreeViews(Ke.getProxy(g.MainContext.MainThreadTreeViews),$e,pt)),Ht=Ke.set(g.ExtHostContext.ExtHostEditorInsets,new be.ExtHostEditorInsets(Ke.getProxy(g.MainContext.MainThreadEditorInsets),Ct,rt.remote)),Yt=Ke.set(g.ExtHostContext.ExtHostDiagnostics,new w.ExtHostDiagnostics(Ke,pt,Nt,et)),si=Ke.set(g.ExtHostContext.ExtHostLanguages,new h.ExtHostLanguages(Ke,ft,$e.converter,Ut)),ut=Ke.set(g.ExtHostContext.ExtHostLanguageFeatures,new s.ExtHostLanguageFeatures(Ke,Ut,ft,$e,Yt,pt,Te,St)),Jt=Ke.set(g.ExtHostContext.ExtHostFileSystem,new l.ExtHostFileSystem(Ke,ut)),$t=Ke.set(g.ExtHostContext.ExtHostFileSystemEventService,new f.ExtHostFileSystemEventService(Ke,pt,et)),Kt=Ke.set(g.ExtHostContext.ExtHostQuickOpen,(0,j.createExtHostQuickOpen)(Ke,mt,$e)),oi=Ke.set(g.ExtHostContext.ExtHostSCM,new W.ExtHostSCM(Ke,$e,pt)),Ei=Ke.set(g.ExtHostContext.ExtHostComments,(0,a.createExtHostComments)(Ke,$e,ft)),ai=Ke.set(g.ExtHostContext.ExtHostProgress,new F.ExtHostProgress(Ke.getProxy(g.MainContext.MainThreadProgress))),bi=Ke.set(g.ExtHostContext.ExtHosLabelService,new le.ExtHostLabelService(Ke)),li=Ke.set(g.ExtHostContext.ExtHostTheming,new ae.ExtHostTheming(Ke)),Zt=Ke.set(g.ExtHostContext.ExtHostAuthentication,new Z.ExtHostAuthentication(Ke)),Fi=Ke.set(g.ExtHostContext.ExtHostTimeline,new C.ExtHostTimeline(Ke,$e)),wi=Ke.set(g.ExtHostContext.ExtHostWebviews,new te.ExtHostWebviews(Ke,rt.remote,mt,pt,Te)),ei=Ke.set(g.ExtHostContext.ExtHostWebviewPanels,new ce.ExtHostWebviewPanels(Ke,wi,mt)),Si=Ke.set(g.ExtHostContext.ExtHostCustomEditors,new oe.ExtHostCustomEditors(Ke,ft,Pt,wi,ei)),_i=Ke.set(g.ExtHostContext.ExtHostWebviewViews,new q.ExtHostWebviewViews(Ke,wi)),Gt=Ke.set(g.ExtHostContext.ExtHostTesting,new Ee.ExtHostTesting(Ke,$e,et)),Ni=Ke.set(g.ExtHostContext.ExtHostUriOpeners,new Ne.ExtHostUriOpeners(Ke));Ke.set(g.ExtHostContext.ExtHostInteractive,new je.ExtHostInteractive(Ke,Et,et,$e,pt));const yi=Object.values(g.ExtHostContext);Ke.assertRegistered(yi);const Di=new J.ExtHostBulkEdits(Ke,et),Li=new t.ExtHostClipboard(Ke),Ii=new v.ExtHostMessageService(Ke,pt),ki=new u.ExtHostDialogs(Ke),Pi=new H.ExtHostStatusBar(Ke,$e.converter);return m.ExtHostApiCommands.register($e),function(Le,Vt,ci){const gt=function(){let se=!Le.isUnderDevelopment;function he(){se||(pt.info(`Extension '${Le.identifier.value}' uses a document selector without scheme. Learn more about this: https://go.microsoft.com/fwlink/?linkid=872305`),se=!0)}return function Ae(st){if(Array.isArray(st))st.forEach(Ae);else if(typeof st=="string")he();else{const wt=st;typeof wt.scheme>"u"&&he(),typeof wt.exclusive=="boolean"&&(0,ze.checkProposedApiEnabled)(Le,"documentFiltersExclusive")}return st}}(),Mi={getSession(se,he,Ae){return Zt.getSession(Le,se,he,Ae)},async hasSession(se,he){return(0,ze.checkProposedApiEnabled)(Le,"authSession"),!!await Zt.getSession(Le,se,he,{silent:!0})},get onDidChangeSessions(){return Zt.onDidChangeSessions},registerAuthenticationProvider(se,he,Ae,st){return Zt.registerAuthenticationProvider(se,he,Ae,st)}},Ui={registerCommand(se,he,Ae){return $e.registerCommand(!0,se,he,Ae,void 0,Le)},registerTextEditorCommand(se,he,Ae){return $e.registerCommand(!0,se,(...st)=>{const wt=Ct.getActiveTextEditor();if(!wt){pt.warn("Cannot execute "+se+" because there is no active text editor.");return}return wt.edit(Tt=>{he.apply(Ae,[wt,Tt,...st])}).then(Tt=>{Tt||pt.warn("Edits from command "+se+" were not applied.")},Tt=>{pt.warn("An error occurred while running command "+se,Tt)})},void 0,void 0,Le)},registerDiffInformationCommand:(se,he,Ae)=>((0,ze.checkProposedApiEnabled)(Le,"diffCommand"),$e.registerCommand(!0,se,async(...st)=>{const wt=et.activeEditor(!0);if(!wt){pt.warn("Cannot execute "+se+" because there is no active text editor.");return}const Tt=await Ct.getDiffInformation(wt.id);he.apply(Ae,[Tt,...st])},void 0,void 0,Le)),executeCommand(se,...he){return $e.executeCommand(se,...he)},getCommands(se=!1){return $e.getCommands(se)}},Ai={get machineId(){return rt.telemetryInfo.machineId},get sessionId(){return rt.telemetryInfo.sessionId},get language(){return rt.environment.appLanguage},get appName(){return rt.environment.appName},get appRoot(){return rt.environment.appRoot?.fsPath??""},get appHost(){return rt.environment.appHost},get uriScheme(){return rt.environment.appUriScheme},get clipboard(){return Li.value},get shell(){return it.getDefaultShell(!1)},get onDidChangeShell(){return(0,ze.checkProposedApiEnabled)(Le,"envShellEvent"),it.onDidChangeShell},get isTelemetryEnabled(){return St.getTelemetryConfiguration()},get onDidChangeTelemetryEnabled(){return St.onDidChangeTelemetryEnabled},get telemetryConfiguration(){return(0,ze.checkProposedApiEnabled)(Le,"telemetry"),St.getTelemetryDetails()},get onDidChangeTelemetryConfiguration(){return(0,ze.checkProposedApiEnabled)(Le,"telemetry"),St.onDidChangeTelemetryConfiguration},get isNewAppInstall(){return(0,Ge.isNewAppInstall)(rt.telemetryInfo.firstSessionDate)},createTelemetryLogger(se){return(0,ze.checkProposedApiEnabled)(Le,"telemetryLogger"),St.instantiateLogger(Le,se)},openExternal(se,he){return me.openUri(se,{allowTunneling:!!rt.remote.authority,allowContributedOpeners:he?.allowContributedOpeners})},async asExternalUri(se){if(se.scheme===rt.environment.appUriScheme)return At.createAppUri(se);try{return await me.asExternalUri(se,{allowTunneling:!!rt.remote.authority})}catch(he){if((0,Q.matchesScheme)(se,X.Schemas.http)||(0,Q.matchesScheme)(se,X.Schemas.https))return se;throw he}},get remoteName(){return(0,fe.getRemoteName)(rt.remote.authority)},get remoteAuthority(){return(0,ze.checkProposedApiEnabled)(Le,"resolvers"),rt.remote.authority},get uiKind(){return rt.uiKind},get logLevel(){return(0,ze.checkProposedApiEnabled)(Le,"extensionLog"),pt.getLevel()},get onDidChangeLogLevel(){return(0,ze.checkProposedApiEnabled)(Le,"extensionLog"),pt.onDidChangeLogLevel}};rt.environment.extensionTestsLocationURI||Object.freeze(Ai);const ui={createTestController(se,he,Ae){return Gt.createTestController(se,he,Ae)},createTestObserver(){return(0,ze.checkProposedApiEnabled)(Le,"testObserver"),Gt.createTestObserver()},runTests(se){return(0,ze.checkProposedApiEnabled)(Le,"testObserver"),Gt.runTests(se)},get onDidChangeTestResults(){return(0,ze.checkProposedApiEnabled)(Le,"testObserver"),Gt.onResultsChanged},get testResults(){return(0,ze.checkProposedApiEnabled)(Le,"testObserver"),Gt.results}},di=rt.remote.isRemote?U.ExtensionKind.Workspace:U.ExtensionKind.UI,Bi={getExtension(se,he){(0,ze.isProposedApiEnabled)(Le,"extensionsAny")||(he=!1);const Ae=Vt.mine.getExtensionDescription(se);if(Ae)return new d.Extension(kt,Le.identifier,Ae,di,!1);if(he){const st=Vt.all.getExtensionDescription(se);if(st)return new d.Extension(kt,Le.identifier,st,di,!0)}},get all(){const se=[];for(const he of Vt.mine.getAllExtensionDescriptions())se.push(new d.Extension(kt,Le.identifier,he,di,!1));return se},get allAcrossExtensionHosts(){(0,ze.checkProposedApiEnabled)(Le,"extensionsAny");const se=new ze.ExtensionIdentifierSet(Vt.mine.getAllExtensionDescriptions().map(Ae=>Ae.identifier)),he=[];for(const Ae of Vt.all.getAllExtensionDescriptions()){const st=!se.has(Ae.identifier);he.push(new d.Extension(kt,Le.identifier,Ae,di,st))}return he},get onDidChange(){return(0,ze.isProposedApiEnabled)(Le,"extensionsAny")?S.Event.any(Vt.mine.onDidChange,Vt.all.onDidChange):Vt.mine.onDidChange}},zi={createDiagnosticCollection(se){return Yt.createDiagnosticCollection(Le.identifier,se)},get onDidChangeDiagnostics(){return Yt.onDidChangeDiagnostics},getDiagnostics:se=>Yt.getDiagnostics(se),getLanguages(){return si.getLanguages()},setTextDocumentLanguage(se,he){return si.changeLanguage(se.uri,he)},match(se,he){const Ae=ft.getDocumentData(he.uri)?.notebook;return(0,O.score)($.LanguageSelector.from(se),he.uri,he.languageId,!0,Ae?.uri,Ae?.notebookType)},registerCodeActionsProvider(se,he,Ae){return ut.registerCodeActionProvider(Le,gt(se),he,Ae)},registerDocumentPasteEditProvider(se,he,Ae){return(0,ze.checkProposedApiEnabled)(Le,"documentPaste"),ut.registerDocumentPasteEditProvider(Le,gt(se),he,Ae)},registerCodeLensProvider(se,he){return ut.registerCodeLensProvider(Le,gt(se),he)},registerDefinitionProvider(se,he){return ut.registerDefinitionProvider(Le,gt(se),he)},registerDeclarationProvider(se,he){return ut.registerDeclarationProvider(Le,gt(se),he)},registerImplementationProvider(se,he){return ut.registerImplementationProvider(Le,gt(se),he)},registerTypeDefinitionProvider(se,he){return ut.registerTypeDefinitionProvider(Le,gt(se),he)},registerHoverProvider(se,he){return ut.registerHoverProvider(Le,gt(se),he,Le.identifier)},registerEvaluatableExpressionProvider(se,he){return ut.registerEvaluatableExpressionProvider(Le,gt(se),he,Le.identifier)},registerInlineValuesProvider(se,he){return ut.registerInlineValuesProvider(Le,gt(se),he,Le.identifier)},registerDocumentHighlightProvider(se,he){return ut.registerDocumentHighlightProvider(Le,gt(se),he)},registerLinkedEditingRangeProvider(se,he){return ut.registerLinkedEditingRangeProvider(Le,gt(se),he)},registerReferenceProvider(se,he){return ut.registerReferenceProvider(Le,gt(se),he)},registerRenameProvider(se,he){return ut.registerRenameProvider(Le,gt(se),he)},registerDocumentSymbolProvider(se,he,Ae){return ut.registerDocumentSymbolProvider(Le,gt(se),he,Ae)},registerWorkspaceSymbolProvider(se){return ut.registerWorkspaceSymbolProvider(Le,se)},registerDocumentFormattingEditProvider(se,he){return ut.registerDocumentFormattingEditProvider(Le,gt(se),he)},registerDocumentRangeFormattingEditProvider(se,he){return ut.registerDocumentRangeFormattingEditProvider(Le,gt(se),he)},registerOnTypeFormattingEditProvider(se,he,Ae,...st){return ut.registerOnTypeFormattingEditProvider(Le,gt(se),he,[Ae].concat(st))},registerDocumentSemanticTokensProvider(se,he,Ae){return ut.registerDocumentSemanticTokensProvider(Le,gt(se),he,Ae)},registerDocumentRangeSemanticTokensProvider(se,he,Ae){return ut.registerDocumentRangeSemanticTokensProvider(Le,gt(se),he,Ae)},registerSignatureHelpProvider(se,he,Ae,...st){return typeof Ae=="object"?ut.registerSignatureHelpProvider(Le,gt(se),he,Ae):ut.registerSignatureHelpProvider(Le,gt(se),he,typeof Ae>"u"?[]:[Ae,...st])},registerCompletionItemProvider(se,he,...Ae){return ut.registerCompletionItemProvider(Le,gt(se),he,Ae)},registerInlineCompletionItemProvider(se,he){return he.handleDidShowCompletionItem&&(0,ze.checkProposedApiEnabled)(Le,"inlineCompletionsAdditions"),ut.registerInlineCompletionsProvider(Le,gt(se),he)},registerInlineCompletionItemProviderNew(se,he){if((0,ze.checkProposedApiEnabled)(Le,"inlineCompletionsNew"),he.handleDidShowCompletionItem&&!(0,ze.isProposedApiEnabled)(Le,"inlineCompletionsAdditions"))throw new Error(`When the method "handleDidShowCompletionItem" is implemented on a provider, the usage of the proposed api 'inlineCompletionsAdditions' must be declared!`);return ut.registerInlineCompletionsProviderNew(Le,gt(se),he)},registerDocumentLinkProvider(se,he){return ut.registerDocumentLinkProvider(Le,gt(se),he)},registerColorProvider(se,he){return ut.registerColorProvider(Le,gt(se),he)},registerFoldingRangeProvider(se,he){return ut.registerFoldingRangeProvider(Le,gt(se),he)},registerSelectionRangeProvider(se,he){return ut.registerSelectionRangeProvider(Le,se,he)},registerCallHierarchyProvider(se,he){return ut.registerCallHierarchyProvider(Le,se,he)},registerTypeHierarchyProvider(se,he){return ut.registerTypeHierarchyProvider(Le,se,he)},setLanguageConfiguration:(se,he)=>ut.setLanguageConfiguration(Le,se,he),getTokenInformationAtPosition(se,he){return(0,ze.checkProposedApiEnabled)(Le,"tokenInformation"),si.tokenAtPosition(se,he)},registerInlayHintsProvider(se,he){return ut.registerInlayHintsProvider(Le,se,he)},createLanguageStatusItem(se,he){return si.createLanguageStatusItem(Le,se,he)},registerDocumentDropEditProvider(se,he){return ut.registerDocumentOnDropEditProvider(Le,se,he)}},xi={get activeTextEditor(){return Ct.getActiveTextEditor()},get visibleTextEditors(){return Ct.getVisibleTextEditors()},get activeTerminal(){return it.activeTerminal},get terminals(){return it.terminals},async showTextDocument(se,he,Ae){const st=await(y.URI.isUri(se)?Promise.resolve(hi.openTextDocument(se)):Promise.resolve(se));return Ct.showTextDocument(st,he,Ae)},createTextEditorDecorationType(se){return Ct.createTextEditorDecorationType(Le,se)},onDidChangeActiveTextEditor(se,he,Ae){return Ct.onDidChangeActiveTextEditor(se,he,Ae)},onDidChangeVisibleTextEditors(se,he,Ae){return Ct.onDidChangeVisibleTextEditors(se,he,Ae)},onDidChangeTextEditorSelection(se,he,Ae){return Ct.onDidChangeTextEditorSelection(se,he,Ae)},onDidChangeTextEditorOptions(se,he,Ae){return Ct.onDidChangeTextEditorOptions(se,he,Ae)},onDidChangeTextEditorVisibleRanges(se,he,Ae){return Ct.onDidChangeTextEditorVisibleRanges(se,he,Ae)},onDidChangeTextEditorViewColumn(se,he,Ae){return Ct.onDidChangeTextEditorViewColumn(se,he,Ae)},onDidCloseTerminal(se,he,Ae){return it.onDidCloseTerminal(se,he,Ae)},onDidOpenTerminal(se,he,Ae){return it.onDidOpenTerminal(se,he,Ae)},onDidChangeActiveTerminal(se,he,Ae){return it.onDidChangeActiveTerminal(se,he,Ae)},onDidChangeTerminalDimensions(se,he,Ae){return(0,ze.checkProposedApiEnabled)(Le,"terminalDimensions"),it.onDidChangeTerminalDimensions(se,he,Ae)},onDidChangeTerminalState(se,he,Ae){return it.onDidChangeTerminalState(se,he,Ae)},onDidWriteTerminalData(se,he,Ae){return(0,ze.checkProposedApiEnabled)(Le,"terminalDataWriteEvent"),it.onDidWriteTerminalData(se,he,Ae)},get state(){return me.state},onDidChangeWindowState(se,he,Ae){return me.onDidChangeWindowState(se,he,Ae)},showInformationMessage(se,...he){return Ii.showMessage(Le,N.default.Info,se,he[0],he.slice(1))},showWarningMessage(se,...he){return Ii.showMessage(Le,N.default.Warning,se,he[0],he.slice(1))},showErrorMessage(se,...he){return Ii.showMessage(Le,N.default.Error,se,he[0],he.slice(1))},showQuickPick(se,he,Ae){return Kt.showQuickPick(se,he,Ae)},showWorkspaceFolderPick(se){return Kt.showWorkspaceFolderPick(se)},showInputBox(se,he){return Kt.showInput(se,he)},showOpenDialog(se){return ki.showOpenDialog(se)},showSaveDialog(se){return ki.showSaveDialog(se)},createStatusBarItem(se,he,Ae){let st,wt,Tt;return typeof se=="string"?(st=se,wt=he,Tt=Ae):(wt=se,Tt=he),Pi.createStatusBarEntry(Le,st,wt,Tt)},setStatusBarMessage(se,he){return Pi.setStatusBarMessage(se,he)},withScmProgress(se){return Te.report("window.withScmProgress",Le,"Use 'withProgress' instead."),ai.withProgress(Le,{location:U.ProgressLocation.SourceControl},(he,Ae)=>se({report(st){}}))},withProgress(se,he){return ai.withProgress(Le,se,he)},createOutputChannel(se,he){return yt.createOutputChannel(se,he,Le)},createWebviewPanel(se,he,Ae,st){return ei.createWebviewPanel(Le,se,he,Ae,st)},createWebviewTextEditorInset(se,he,Ae,st){return(0,ze.checkProposedApiEnabled)(Le,"editorInsets"),Ht.createWebviewEditorInset(se,he,Ae,st,Le)},createTerminal(se,he,Ae){return typeof se=="object"?"pty"in se?it.createExtensionTerminal(se):it.createTerminalFromOptions(se):it.createTerminal(se,he,Ae)},registerTerminalLinkProvider(se){return it.registerLinkProvider(se)},registerTerminalProfileProvider(se,he){return it.registerProfileProvider(Le,se,he)},registerTreeDataProvider(se,he){return ri.registerTreeDataProvider(se,he,Le)},createTreeView(se,he){return ri.createTreeView(se,he,Le)},registerWebviewPanelSerializer:(se,he)=>ei.registerWebviewPanelSerializer(Le,se,he),registerCustomEditorProvider:(se,he,Ae={})=>Si.registerCustomEditorProvider(Le,se,he,Ae),registerFileDecorationProvider(se){return Me.registerFileDecorationProvider(se,Le.identifier)},registerUriHandler(se){return At.registerUriHandler(Le.identifier,se)},createQuickPick(){return Kt.createQuickPick(Le)},createInputBox(){return Kt.createInputBox(Le)},get activeColorTheme(){return li.activeColorTheme},onDidChangeActiveColorTheme(se,he,Ae){return li.onDidChangeActiveColorTheme(se,he,Ae)},registerWebviewViewProvider(se,he,Ae){return _i.registerWebviewViewProvider(Le,se,he,Ae?.webviewOptions)},get activeNotebookEditor(){return Et.activeNotebookEditor},onDidChangeActiveNotebookEditor(se,he,Ae){return Et.onDidChangeActiveNotebookEditor(se,he,Ae)},get visibleNotebookEditors(){return Et.visibleNotebookEditors},get onDidChangeVisibleNotebookEditors(){return Et.onDidChangeVisibleNotebookEditors},onDidChangeNotebookEditorSelection(se,he,Ae){return ii.onDidChangeNotebookEditorSelection(se,he,Ae)},onDidChangeNotebookEditorVisibleRanges(se,he,Ae){return ii.onDidChangeNotebookEditorVisibleRanges(se,he,Ae)},showNotebookDocument(se,he){return Et.showNotebookDocument(se,he)},registerExternalUriOpener(se,he,Ae){return(0,ze.checkProposedApiEnabled)(Le,"externalUriOpener"),Ni.registerExternalUriOpener(Le.identifier,se,he,Ae)},get tabGroups(){return Pe.tabGroups}},hi={get rootPath(){return Te.report("workspace.rootPath",Le,"Please use 'workspace.workspaceFolders' instead. More details: https://aka.ms/vscode-eliminating-rootpath"),mt.getPath()},set rootPath(se){throw D.readonly()},getWorkspaceFolder(se){return mt.getWorkspaceFolder(se)},get workspaceFolders(){return mt.getWorkspaceFolders()},get name(){return mt.name},set name(se){throw D.readonly()},get workspaceFile(){return mt.workspaceFile},set workspaceFile(se){throw D.readonly()},updateWorkspaceFolders:(se,he,...Ae)=>mt.updateWorkspaceFolders(Le,se,he||0,...Ae),onDidChangeWorkspaceFolders:function(se,he,Ae){return mt.onDidChangeWorkspace(se,he,Ae)},asRelativePath:(se,he)=>mt.getRelativePath(se,he),findFiles:(se,he,Ae,st)=>mt.findFiles(se,he,Ae,Le.identifier,st),findTextInFiles:(se,he,Ae,st)=>{(0,ze.checkProposedApiEnabled)(Le,"findTextInFiles");let wt,Tt;return typeof he=="object"?(wt=he,Tt=Ae):(wt={},Tt=he,st=Ae),mt.findTextInFiles(se,wt||{},Tt,Le.identifier,st)},saveAll:se=>mt.saveAll(se),applyEdit(se,he){return Di.applyWorkspaceEdit(se,Le,he)},createFileSystemWatcher:(se,he,Ae,st)=>$t.createFileSystemWatcher(mt,Le,se,he,Ae,st),get textDocuments(){return ft.getAllDocumentData().map(se=>se.document)},set textDocuments(se){throw D.readonly()},openTextDocument(se){let he;const Ae=se;if(typeof se=="string")he=Promise.resolve(y.URI.file(se));else if(y.URI.isUri(se))he=Promise.resolve(se);else if(!Ae||typeof Ae=="object")he=ft.createDocumentData(Ae);else throw new Error("illegal argument - uriOrFileNameOrOptions");return he.then(st=>ft.ensureDocumentData(st).then(wt=>wt.document))},onDidOpenTextDocument:(se,he,Ae)=>ft.onDidAddDocument(se,he,Ae),onDidCloseTextDocument:(se,he,Ae)=>ft.onDidRemoveDocument(se,he,Ae),onDidChangeTextDocument:(se,he,Ae)=>ft.onDidChangeDocument(se,he,Ae),onDidSaveTextDocument:(se,he,Ae)=>ft.onDidSaveDocument(se,he,Ae),onWillSaveTextDocument:(se,he,Ae)=>ti.getOnWillSaveTextDocumentEvent(Le)(se,he,Ae),get notebookDocuments(){return Et.notebookDocuments.map(se=>se.apiNotebook)},async openNotebookDocument(se,he){let Ae;if(y.URI.isUri(se))Ae=se,await Et.openNotebookDocument(se);else if(typeof se=="string")Ae=y.URI.revive(await Et.createNotebookDocument({viewType:se,content:he}));else throw new Error("Invalid arguments");return Et.getNotebookDocument(Ae).apiNotebook},onDidSaveNotebookDocument(se,he,Ae){return xt.onDidSaveNotebookDocument(se,he,Ae)},onDidChangeNotebookDocument(se,he,Ae){return xt.onDidChangeNotebookDocument(se,he,Ae)},get onDidOpenNotebookDocument(){return Et.onDidOpenNotebookDocument},get onDidCloseNotebookDocument(){return Et.onDidCloseNotebookDocument},registerNotebookSerializer(se,he,Ae,st){return Et.registerNotebookSerializer(Le,se,he,Ae,(0,ze.isProposedApiEnabled)(Le,"notebookLiveShare")?st:void 0)},registerNotebookContentProvider:(se,he,Ae,st)=>((0,ze.checkProposedApiEnabled)(Le,"notebookContentProvider"),Te.report("workspace.registerNotebookContentProvider",Le,"The notebookContentProvider API is not on track for finalization and will be removed."),Et.registerNotebookContentProvider(Le,se,he,Ae)),onDidChangeConfiguration:(se,he,Ae)=>ci.onDidChangeConfiguration(se,he,Ae),getConfiguration(se,he){return he=arguments.length===1?void 0:he,ci.getConfiguration(se,he,Le)},registerTextDocumentContentProvider(se,he){return zt.registerTextDocumentContentProvider(se,he)},registerTaskProvider:(se,he)=>(Te.report("window.registerTaskProvider",Le,"Use the corresponding function on the 'tasks' namespace instead"),vt.registerTaskProvider(Le,se,he)),registerFileSystemProvider(se,he,Ae){return(0,qe.combinedDisposable)(Jt.registerFileSystemProvider(Le,se,he,Ae),Ot.addFileSystemProvider(se,he))},get fs(){return Ot.value},registerFileSearchProvider:(se,he)=>((0,ze.checkProposedApiEnabled)(Le,"fileSearchProvider"),_t.registerFileSearchProvider(se,he)),registerTextSearchProvider:(se,he)=>((0,ze.checkProposedApiEnabled)(Le,"textSearchProvider"),_t.registerTextSearchProvider(se,he)),registerRemoteAuthorityResolver:(se,he)=>((0,ze.checkProposedApiEnabled)(Le,"resolvers"),kt.registerRemoteAuthorityResolver(se,he)),registerResourceLabelFormatter:se=>((0,ze.checkProposedApiEnabled)(Le,"resolvers"),bi.$registerResourceLabelFormatter(se)),onDidCreateFiles:(se,he,Ae)=>$t.onDidCreateFile(se,he,Ae),onDidDeleteFiles:(se,he,Ae)=>$t.onDidDeleteFile(se,he,Ae),onDidRenameFiles:(se,he,Ae)=>$t.onDidRenameFile(se,he,Ae),onWillCreateFiles:(se,he,Ae)=>$t.getOnWillCreateFileEvent(Le)(se,he,Ae),onWillDeleteFiles:(se,he,Ae)=>$t.getOnWillDeleteFileEvent(Le)(se,he,Ae),onWillRenameFiles:(se,he,Ae)=>$t.getOnWillRenameFileEvent(Le)(se,he,Ae),openTunnel:se=>((0,ze.checkProposedApiEnabled)(Le,"tunnels"),_e.openTunnel(Le,se).then(he=>{if(!he)throw new Error("cannot open tunnel");return he})),get tunnels(){return(0,ze.checkProposedApiEnabled)(Le,"tunnels"),_e.getTunnels()},onDidChangeTunnels:(se,he,Ae)=>((0,ze.checkProposedApiEnabled)(Le,"tunnels"),_e.onDidChangeTunnels(se,he,Ae)),registerPortAttributesProvider:(se,he)=>((0,ze.checkProposedApiEnabled)(Le,"portsAttributes"),_e.registerPortsAttributesProvider(se,he)),registerTimelineProvider:(se,he)=>((0,ze.checkProposedApiEnabled)(Le,"timeline"),Fi.registerTimelineProvider(se,he,Le.identifier,$e.converter)),get isTrusted(){return mt.trusted},requestWorkspaceTrust:se=>((0,ze.checkProposedApiEnabled)(Le,"workspaceTrust"),mt.requestWorkspaceTrust(se)),onDidGrantWorkspaceTrust:(se,he,Ae)=>mt.onDidGrantWorkspaceTrust(se,he,Ae),registerEditSessionIdentityProvider:(se,he)=>((0,ze.checkProposedApiEnabled)(Le,"editSessionIdentityProvider"),mt.registerEditSessionIdentityProvider(se,he))},$i={get inputBox(){return Te.report("scm.inputBox",Le,"Use 'SourceControl.inputBox' instead"),oi.getLastInputBox(Le)},createSourceControl(se,he,Ae){return oi.createSourceControl(Le,se,he,Ae)}},jt={createCommentController(se,he){return Ei.createCommentController(Le,se,he)}},fi={get activeDebugSession(){return ct.activeDebugSession},get activeDebugConsole(){return ct.activeDebugConsole},get breakpoints(){return ct.breakpoints},onDidStartDebugSession(se,he,Ae){return ct.onDidStartDebugSession(se,he,Ae)},onDidTerminateDebugSession(se,he,Ae){return ct.onDidTerminateDebugSession(se,he,Ae)},onDidChangeActiveDebugSession(se,he,Ae){return ct.onDidChangeActiveDebugSession(se,he,Ae)},onDidReceiveDebugSessionCustomEvent(se,he,Ae){return ct.onDidReceiveDebugSessionCustomEvent(se,he,Ae)},onDidChangeBreakpoints(se,he,Ae){return ct.onDidChangeBreakpoints(se,he,Ae)},registerDebugConfigurationProvider(se,he,Ae){return ct.registerDebugConfigurationProvider(se,he,Ae||tt.DebugConfigurationProviderTriggerKind.Initial)},registerDebugAdapterDescriptorFactory(se,he){return ct.registerDebugAdapterDescriptorFactory(Le,se,he)},registerDebugAdapterTrackerFactory(se,he){return ct.registerDebugAdapterTrackerFactory(se,he)},startDebugging(se,he,Ae){return!Ae||typeof Ae=="object"&&"configuration"in Ae?ct.startDebugging(se,he,{parentSession:Ae}):ct.startDebugging(se,he,Ae||{})},stopDebugging(se){return ct.stopDebugging(se)},addBreakpoints(se){return ct.addBreakpoints(se)},removeBreakpoints(se){return ct.removeBreakpoints(se)},asDebugSourceUri(se,he){return ct.asDebugSourceUri(se,he)}},Wi={registerTaskProvider:(se,he)=>vt.registerTaskProvider(Le,se,he),fetchTasks:se=>vt.fetchTasks(se),executeTask:se=>vt.executeTask(Le,se),get taskExecutions(){return vt.taskExecutions},onDidStartTask:(se,he,Ae)=>vt.onDidStartTask(se,he,Ae),onDidEndTask:(se,he,Ae)=>vt.onDidEndTask(se,he,Ae),onDidStartTaskProcess:(se,he,Ae)=>vt.onDidStartTaskProcess(se,he,Ae),onDidEndTaskProcess:(se,he,Ae)=>vt.onDidEndTaskProcess(se,he,Ae)},Mt={createNotebookController(se,he,Ae,st,wt){return ni.createNotebookController(Le,se,he,Ae,st,(0,ze.isProposedApiEnabled)(Le,"notebookMessaging")?wt:void 0)},registerNotebookCellStatusBarItemProvider:(se,he)=>Et.registerNotebookCellStatusBarItemProvider(Le,se,he),createRendererMessaging(se){return vi.createRendererMessaging(Le,se)},onDidChangeNotebookCellExecutionState(se,he,Ae){return(0,ze.checkProposedApiEnabled)(Le,"notebookCellExecutionState"),ni.onDidChangeNotebookCellExecutionState(se,he,Ae)}},mi={t(...se){if(typeof se[0]=="string"){const he=se.shift(),Ae=!se||typeof se[0]!="object"?se:se[0];return bt.getMessage(Le.identifier.value,{message:he,args:Ae})}return bt.getMessage(Le.identifier.value,se[0])},get bundle(){return bt.getBundle(Le.identifier.value)},get uri(){return bt.getBundleUri(Le.identifier.value)}};return{version:rt.version,authentication:Mi,commands:Ui,comments:jt,debug:fi,env:Ai,extensions:Bi,l10n:mi,languages:zi,notebooks:Mt,scm:$i,tasks:Wi,tests:ui,window:xi,workspace:hi,Breakpoint:U.Breakpoint,CallHierarchyIncomingCall:U.CallHierarchyIncomingCall,CallHierarchyItem:U.CallHierarchyItem,CallHierarchyOutgoingCall:U.CallHierarchyOutgoingCall,CancellationError:D.CancellationError,CancellationTokenSource:i.CancellationTokenSource,CandidatePortSource:g.CandidatePortSource,CodeAction:U.CodeAction,CodeActionKind:U.CodeActionKind,CodeActionTriggerKind:U.CodeActionTriggerKind,CodeLens:U.CodeLens,Color:U.Color,ColorInformation:U.ColorInformation,ColorPresentation:U.ColorPresentation,ColorThemeKind:U.ColorThemeKind,CommentMode:U.CommentMode,CommentThreadCollapsibleState:U.CommentThreadCollapsibleState,CommentThreadState:U.CommentThreadState,CompletionItem:U.CompletionItem,CompletionItemKind:U.CompletionItemKind,CompletionItemTag:U.CompletionItemTag,CompletionList:U.CompletionList,CompletionTriggerKind:U.CompletionTriggerKind,ConfigurationTarget:U.ConfigurationTarget,CustomExecution:U.CustomExecution,DebugAdapterExecutable:U.DebugAdapterExecutable,DebugAdapterInlineImplementation:U.DebugAdapterInlineImplementation,DebugAdapterNamedPipeServer:U.DebugAdapterNamedPipeServer,DebugAdapterServer:U.DebugAdapterServer,DebugConfigurationProviderTriggerKind:tt.DebugConfigurationProviderTriggerKind,DebugConsoleMode:U.DebugConsoleMode,DecorationRangeBehavior:U.DecorationRangeBehavior,Diagnostic:U.Diagnostic,DiagnosticRelatedInformation:U.DiagnosticRelatedInformation,DiagnosticSeverity:U.DiagnosticSeverity,DiagnosticTag:U.DiagnosticTag,Disposable:U.Disposable,DocumentHighlight:U.DocumentHighlight,DocumentHighlightKind:U.DocumentHighlightKind,DocumentLink:U.DocumentLink,DocumentSymbol:U.DocumentSymbol,EndOfLine:U.EndOfLine,EnvironmentVariableMutatorType:U.EnvironmentVariableMutatorType,EvaluatableExpression:U.EvaluatableExpression,InlineValueText:U.InlineValueText,InlineValueVariableLookup:U.InlineValueVariableLookup,InlineValueEvaluatableExpression:U.InlineValueEvaluatableExpression,InlineCompletionTriggerKind:U.InlineCompletionTriggerKind,InlineCompletionTriggerKindNew:U.InlineCompletionTriggerKindNew,EventEmitter:S.Emitter,ExtensionKind:U.ExtensionKind,ExtensionMode:U.ExtensionMode,ExternalUriOpenerPriority:U.ExternalUriOpenerPriority,FileChangeType:U.FileChangeType,FileDecoration:U.FileDecoration,FileSystemError:U.FileSystemError,FileType:b.FileType,FilePermission:b.FilePermission,FoldingRange:U.FoldingRange,FoldingRangeKind:U.FoldingRangeKind,FunctionBreakpoint:U.FunctionBreakpoint,InlineCompletionItem:U.InlineSuggestion,InlineCompletionItemNew:U.InlineSuggestionNew,InlineCompletionList:U.InlineSuggestionList,InlineCompletionListNew:U.InlineSuggestionsNew,Hover:U.Hover,IndentAction:T.IndentAction,Location:U.Location,MarkdownString:U.MarkdownString,OverviewRulerLane:_.OverviewRulerLane,ParameterInformation:U.ParameterInformation,PortAutoForwardAction:U.PortAutoForwardAction,Position:U.Position,ProcessExecution:U.ProcessExecution,ProgressLocation:U.ProgressLocation,QuickInputButtons:U.QuickInputButtons,Range:U.Range,RelativePattern:U.RelativePattern,Selection:U.Selection,SelectionRange:U.SelectionRange,SemanticTokens:U.SemanticTokens,SemanticTokensBuilder:U.SemanticTokensBuilder,SemanticTokensEdit:U.SemanticTokensEdit,SemanticTokensEdits:U.SemanticTokensEdits,SemanticTokensLegend:U.SemanticTokensLegend,ShellExecution:U.ShellExecution,ShellQuoting:U.ShellQuoting,SignatureHelp:U.SignatureHelp,SignatureHelpTriggerKind:U.SignatureHelpTriggerKind,SignatureInformation:U.SignatureInformation,SnippetString:U.SnippetString,SourceBreakpoint:U.SourceBreakpoint,StandardTokenType:U.StandardTokenType,StatusBarAlignment:U.StatusBarAlignment,SymbolInformation:U.SymbolInformation,SymbolKind:U.SymbolKind,SymbolTag:U.SymbolTag,Task:U.Task,TaskGroup:U.TaskGroup,TaskPanelKind:U.TaskPanelKind,TaskRevealKind:U.TaskRevealKind,TaskScope:U.TaskScope,TerminalLink:U.TerminalLink,TerminalLocation:U.TerminalLocation,TerminalProfile:U.TerminalProfile,TextDocumentSaveReason:U.TextDocumentSaveReason,TextEdit:U.TextEdit,SnippetTextEdit:U.SnippetTextEdit,TextEditorCursorStyle:A.TextEditorCursorStyle,TextEditorLineNumbersStyle:U.TextEditorLineNumbersStyle,TextEditorRevealType:U.TextEditorRevealType,TextEditorSelectionChangeKind:U.TextEditorSelectionChangeKind,TextDocumentChangeReason:U.TextDocumentChangeReason,ThemeColor:U.ThemeColor,ThemeIcon:U.ThemeIcon,TreeItem:U.TreeItem,TreeItem2:U.TreeItem,TreeItemCheckboxState:U.TreeItemCheckboxState,TreeItemCollapsibleState:U.TreeItemCollapsibleState,TypeHierarchyItem:U.TypeHierarchyItem,UIKind:E.UIKind,Uri:y.URI,ViewColumn:U.ViewColumn,WorkspaceEdit:U.WorkspaceEdit,DocumentDropEdit:U.DocumentDropEdit,DocumentPasteEdit:U.DocumentPasteEdit,InlayHint:U.InlayHint,InlayHintLabelPart:U.InlayHintLabelPart,InlayHintKind:U.InlayHintKind,RemoteAuthorityResolverError:U.RemoteAuthorityResolverError,ResolvedAuthority:U.ResolvedAuthority,SourceControlInputBoxValidationType:U.SourceControlInputBoxValidationType,ExtensionRuntime:U.ExtensionRuntime,TimelineItem:U.TimelineItem,NotebookRange:U.NotebookRange,NotebookCellKind:U.NotebookCellKind,NotebookCellExecutionState:U.NotebookCellExecutionState,NotebookCellData:U.NotebookCellData,NotebookData:U.NotebookData,NotebookRendererScript:U.NotebookRendererScript,NotebookCellStatusBarAlignment:U.NotebookCellStatusBarAlignment,NotebookEditorRevealType:U.NotebookEditorRevealType,NotebookCellOutput:U.NotebookCellOutput,NotebookCellOutputItem:U.NotebookCellOutputItem,NotebookCellStatusBarItem:U.NotebookCellStatusBarItem,NotebookControllerAffinity:U.NotebookControllerAffinity,NotebookControllerAffinity2:U.NotebookControllerAffinity2,NotebookEdit:U.NotebookEdit,PortAttributes:U.PortAttributes,LinkedEditingRanges:U.LinkedEditingRanges,TestResultState:U.TestResultState,TestRunRequest:U.TestRunRequest,TestMessage:U.TestMessage,TestTag:U.TestTag,TestRunProfileKind:U.TestRunProfileKind,TextSearchCompleteMessageType:Fe.TextSearchCompleteMessageType,DataTransfer:U.DataTransfer,DataTransferItem:U.DataTransferItem,CoveredCount:U.CoveredCount,FileCoverage:U.FileCoverage,StatementCoverage:U.StatementCoverage,BranchCoverage:U.BranchCoverage,FunctionCoverage:U.FunctionCoverage,WorkspaceTrustState:U.WorkspaceTrustState,LanguageStatusSeverity:U.LanguageStatusSeverity,QuickPickItemKind:U.QuickPickItemKind,InputBoxValidationSeverity:U.InputBoxValidationSeverity,TabInputText:U.TextTabInput,TabInputTextDiff:U.TextDiffTabInput,TabInputTextMerge:U.TextMergeTabInput,TabInputCustom:U.CustomEditorTabInput,TabInputNotebook:U.NotebookEditorTabInput,TabInputNotebookDiff:U.NotebookDiffEditorTabInput,TabInputWebview:U.WebviewEditorTabInput,TabInputTerminal:U.TerminalEditorTabInput,TabInputInteractiveWindow:U.InteractiveWindowInput,TerminalExitReason:U.TerminalExitReason,LogLevel:Be.LogLevel,EditSessionIdentityMatch:lt.EditSessionIdentityMatch}}}e.createApiFactoryAndRegisterActors=Dt}),define(De[244],Ce([1,0,243,33,2,237,6,15,228]),function(ne,e,i,D,S,N,y,A,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtHostExtensionService=void 0;class T extends N.RequireInterceptor{_installInterceptor(){}getModule(E,m){for(const t of this._alternatives){const o=t(E);if(o){E=o;break}}if(this._factories.has(E))return this._factories.get(E).load(E,m,()=>{throw new Error("CANNOT LOAD MODULE from here.")})}}class O extends D.AbstractExtHostExtensionService{constructor(){super(...arguments),this.extensionRuntime=y.ExtensionRuntime.Webworker}async _beforeAlmostReadyToRunExtensions(){this._instaService.createInstance(_.ExtHostConsoleForwarder);const E=this._instaService.invokeFunction(i.createApiFactoryAndRegisterActors);this._fakeModules=this._instaService.createInstance(T,E,{mine:this._myRegistry,all:this._globalRegistry}),await this._fakeModules.install(),performance.mark("code/extHost/didInitAPI"),await this._waitForDebuggerAttachment()}_getEntryPoint(E){return E.browser}async _loadCommonJSModule(E,m,t){m=m.with({path:b(m.path,".js")});const o=E?.identifier.value;o&&performance.mark(`code/extHost/willFetchExtensionCode/${o}`);const a=S.URI.revive(await this._mainThreadExtensionsProxy.$asBrowserUri(m)),p=await fetch(a.toString(!0));if(o&&performance.mark(`code/extHost/didFetchExtensionCode/${o}`),p.status!==200)throw new Error(p.statusText);const w=await p.text(),u=`${m.toString(!0)}#vscode-extension`,I=`${w} //# sourceURL=${u}`;let r;try{r=new Function("module","exports","require",I)}catch(l){throw console.error(o?`Loading code for extension ${o} failed: ${l.message}`:`Loading code failed: ${l.message}`),console.error(`${m.toString(!0)}${typeof l.line=="number"?` line ${l.line}`:""}${typeof l.column=="number"?` column ${l.column}`:""}`),console.error(l),l}E&&await this._extHostLocalizationService.initializeLocalizedMessages(E);const c={},n={exports:c},d=l=>{const f=this._fakeModules.getModule(l,m);if(f===void 0)throw new Error(`Cannot load module '${l}'`);return f};try{return t.codeLoadingStart(),o&&performance.mark(`code/extHost/willLoadExtensionCode/${o}`),r(n,c,d),n.exports!==c?n.exports:c}finally{o&&performance.mark(`code/extHost/didLoadExtensionCode/${o}`),t.codeLoadingStop()}}async $setRemoteEnvironment(E){}async _waitForDebuggerAttachment(E=5e3){if(!this._initData.environment.isExtensionDevelopmentDebug)return;const m=Date.now()+E;for(;Date.now()console.trace("'close' has been blocked");const g=postMessage.bind(self);self.postMessage=()=>console.trace("'postMessage' has been blocked");function E(r){return/^(file|vscode-remote):/i.test(r)}const m=fetch.bind(self);function t(r){self.fetch=async function(c,n){return c instanceof Request||E(String(c))&&(c=(await r(O.URI.parse(String(c)))).toString(!0)),m(c,n)},self.XMLHttpRequest=class extends XMLHttpRequest{open(c,n,d,l,f){(async()=>(E(n.toString())&&(n=(await r(O.URI.parse(n.toString()))).toString(!0)),super.open(c,n,d??!0,l,f)))()}}}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 r=self.Worker;Worker=function(c,n){if(/^file:/i.test(c.toString()))c=T.FileAccess.asBrowserUri(O.URI.parse(c.toString())).toString(!0);else if(/^vscode-remote:/i.test(c.toString()))throw new Error("Creating workers from remote extensions is currently not supported.");const l=`(${function(v){function k(W){return typeof W=="string"||W instanceof URL?String(W).replace(/^file:\/\//i,"vscode-file://vscode-app"):W}const F=fetch.bind(self);self.fetch=function(W,H){return W instanceof Request?F(W,H):F(k(W),H)},self.XMLHttpRequest=class extends XMLHttpRequest{open(W,H,P,M,R){return super.open(W,k(H),P??!0,M,R)}};const j=importScripts.bind(self);self.importScripts=(...W)=>{j(...W.map(k))},j(v)}.toString()}('${c}'))`;n=n||{},n.name=n.name||A.basename(c.toString());const f=new Blob([l],{type:"application/javascript"}),s=URL.createObjectURL(f);return new r(s,n)}}else self.Worker=class extends y.NestedWorker{constructor(r,c){super(g,r,{name:A.basename(r.toString()),...c})}};const o=new class{constructor(){this.pid=void 0}exit(r){b()}async exists(r){return!0}async realpath(r){return r}};class a{constructor(){const c=new MessageChannel,n=new D.Emitter;let d=!1;g(c.port2,[c.port2]),c.port1.onmessage=l=>{const{data:f}=l;if(!(f instanceof ArrayBuffer)){console.warn("UNKNOWN data received",f);return}const s=i.VSBuffer.wrap(new Uint8Array(f,0,f.byteLength));if((0,S.isMessageOfType)(s,2)){d=!0,w("received terminate message from renderer");return}n.fire(s)},this.protocol={onMessage:n.event,send:l=>{if(!d){const f=l.buffer.buffer.slice(l.buffer.byteOffset,l.buffer.byteOffset+l.buffer.byteLength);c.port1.postMessage(f,[f])}}}}}function p(r){return new Promise(c=>{const n=r.onMessage(d=>{n.dispose();const l=JSON.parse(d.toString());r.send((0,S.createMessageOfType)(0)),c({protocol:r,initData:l})});r.send((0,S.createMessageOfType)(1))})}let w=r=>b();function u(r){return!!r&&typeof r=="object"&&r.type==="vscode.init"&&r.data instanceof Map}function I(){_.mark("code/extHost/willConnectToRenderer");const r=new a;return{onmessage(c){!u(c)||p(r.protocol).then(n=>{_.mark("code/extHost/didWaitForInitData");const d=new N.ExtensionHostMain(n.protocol,n.initData,o,null,c.data);t(l=>d.asBrowserUri(l)),w=l=>d.terminate(l)})}}}e.create=I})}).call(this); //# sourceMappingURL=https://ticino.blob.core.windows.net/sourcemaps/6261075646f055b99068d3688932416f2346dd3b/core/vs/workbench/api/worker/extensionHostWorker.js.map x

    Windows NT KPTV 6.2 build 9200 (Windows Server 2012 Datacenter Edition) i586