2 lines
320 KiB
JavaScript
2 lines
320 KiB
JavaScript
/*! For license information please see server.js.LICENSE.txt */
|
||
(()=>{"use strict";var e={93340:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DocumentSettingsNotification=t.DocumentSettingsRequest=t.CRLF=t.LF=void 0;const o=n(40273);t.LF=1,t.CRLF=2,function(e){e.method="$/textDocument/documentSettings",e.type=new o.RequestType(e.method)}(t.DocumentSettingsRequest||(t.DocumentSettingsRequest={})),function(e){e.method="$/textDocument/documentSettings/didChange",e.type=new o.NotificationType(e.method)}(t.DocumentSettingsNotification||(t.DocumentSettingsNotification={}))},83545:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.initEvent=void 0,t.initEvent=function initEvent(e){return{eventName:e,properties:{isActivationEvent:"false",result:"Succeeded"},measurements:{},groupingStrategy:"eventNameAndProperties"}}},59271:function(e,t,n){var o,i=this&&this.__classPrivateFieldGet||function(e,t,n,o){if("a"===n&&!o)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?o:"a"===n?o.call(e):o?o.value:t.get(e)},r=this&&this.__classPrivateFieldSet||function(e,t,n,o,i){if("m"===o)throw new TypeError("Private method is not writable");if("a"===o&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===o?i.call(e,n):i?i.value=n:t.set(e,n),n};Object.defineProperty(t,"__esModule",{value:!0}),t.KeyValueRegex=t.ComposeDocument=void 0;const s=n(35809),a=n(31040),c=n(93419),l=n(93340),u=n(53529),d=n(97797),f=1e6;class ComposeDocument{get textDocument(){return i(this,o,"f")}get id(){return{uri:this.textDocument.uri}}get uri(){return this.textDocument.uri}constructor(e){this.yamlDocument=new d.Lazy((()=>this.buildYamlDocument())),o.set(this,void 0),r(this,o,e,"f")}update(e){return r(this,o,e,"f"),this.yamlDocument.clear(),this}lineAt(e){const t="number"==typeof e?s.Position.create(e,0):s.Position.create(e.line,0),n=s.Position.create(t.line,f);if(t.line>this.textDocument.lineCount)throw new Error(`Requested line ${t.line} is out of bounds.`);return this.textDocument.getText(s.Range.create(t,n))}async getSettings(){var e,t,n;if(!this.documentSettings){const o=(0,u.getCurrentContext)();if(null===(n=null===(t=null===(e=o.clientCapabilities)||void 0===e?void 0:e.experimental)||void 0===t?void 0:t.documentSettings)||void 0===n?void 0:n.request){const e=await o.connection.sendRequest(l.DocumentSettingsRequest.type,{textDocument:this.id});e&&(this.documentSettings=e)}}return this.documentSettings||(this.documentSettings=this.guessDocumentSettings()),this.documentSettings}updateSettings(e){this.documentSettings=e}async getPositionInfo(e){const{tabSize:n}=await this.getSettings(),o=this.getFirstLinePositionInfo(e,n),i=[...o.pathParts];let r=o.cursorIndentDepth;for(let o=e.position.line-1;o>=0&&r>0;o--){const e=this.lineAt(o);let s,a=f;(s=p.exec(e))?(a=s.groups.indent.length/n,a<r&&(r=a,i.unshift(b))):(s=t.KeyValueRegex.exec(e))&&(a=s.groups.indent.length/n,(a<r||a===r&&i[0]===b)&&(r=a,i.unshift(s.groups.keyName)))}return{path:"/"+i.join("/"),indentDepth:o.cursorIndentDepth}}buildYamlDocument(){const e=(0,c.parseDocument)(this.textDocument.getText(),{merge:!0,prettyErrors:!0});if(!(0,c.isDocument)(e))throw new s.ResponseError(s.ErrorCodes.ParseError,"Malformed YAML document");return e}guessDocumentSettings(){var e;const t=this.textDocument.getText(),n=/\r/gi.test(t)?l.CRLF:l.LF;let o=2;const i=/^(?<indentation>[ ]+)(?<key>[.\w-]+:\s*)$/im.exec(t);return(null===(e=null==i?void 0:i.groups)||void 0===e?void 0:e.indentation)&&(o=i.groups.indentation.length),{eol:n,tabSize:o}}getFirstLinePositionInfo(e,n){const o=this.lineAt(e.position),i=[];let r,s=0;if(r=y.exec(o)){const t=o.indexOf(r.groups.commentSep);if(e.position.character>t)return{pathParts:[k],cursorIndentDepth:-1}}if(r=h.exec(o)){const t=o.indexOf(r.groups.itemInd),a=o.indexOf(r.groups.keyInd,t),c=r.groups.indent.length,l=r.groups.keyName;s=c/n,e.position.character>a?(i.unshift(v),i.unshift(l),i.unshift(b)):e.position.character===a?(i.unshift(S),i.unshift(l),i.unshift(b)):e.position.character>t?(i.unshift(l),i.unshift(b)):e.position.character===t?(i.unshift(S),i.unshift(b)):e.position.character<c&&(s=e.position.character/n)}else if(r=t.KeyValueRegex.exec(o)){const t=o.indexOf(r.groups.keyInd),a=r.groups.indent.length,c=r.groups.keyName;s=a/n,e.position.character>t?(i.unshift(v),i.unshift(c)):e.position.character===t?(i.unshift(S),i.unshift(c)):e.position.character>=a?i.unshift(c):e.position.character<a&&(s=e.position.character/n)}else if(r=p.exec(o)){const t=o.indexOf(r.groups.itemInd),a=r.groups.indent.length;s=a/n,e.position.character>t?(i.unshift(v),i.unshift(b)):e.position.character===t?(i.unshift(S),i.unshift(b)):e.position.character<a&&(s=e.position.character/n)}else if(r=m.exec(o)){const t=r.groups.indent.length;s=t/n,e.position.character>=t?i.unshift(v):e.position.character<t&&(s=e.position.character/n)}else if(r=g.exec(o)){const t=r.groups.indent.length;s=t/n,e.position.character<t&&(s=e.position.character/n)}return{pathParts:i,cursorIndentDepth:s}}}o=new WeakMap,ComposeDocument.DocumentManagerConfig={create:(e,t,n,o)=>new ComposeDocument(a.TextDocument.create(e,t,n,o)),update:(e,t,n)=>e.update(a.TextDocument.update(e.textDocument,t,n))},t.ComposeDocument=ComposeDocument,t.KeyValueRegex=/^(?<indent> *)(?<key>(?<keyName>[.\w-]+)(?<keyInd>(?<keySep>:) *))(?<value>.*)$/im;const p=/^(?<indent> *)(?<itemInd>(?<itemSep>-) *)(?<value>.*)$/im,h=/^(?<indent> *)(?<itemInd>(?<itemSep>-) *)(?<key>(?<keyName>[.\w-]+)(?<keyInd>(?<keySep>:) *))(?<value>.*)$/im,m=/^(?<indent> *)(?<value>\S+)$/im,g=/^(?<indent> *)$/im,y=/^.*(?<commentSep>#).*$/im,v="<value>",b="<item>",S="<sep>",k="<comment>"},72743:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ComposeLanguageService=void 0;const o=n(35809),i=n(93340),r=n(83545),s=n(59271),a=n(55634),c=n(81220),l=n(67957),u=n(38210),d=n(97900),f=n(53529),p=n(34884),h={textDocumentSync:{openClose:!0,change:o.TextDocumentSyncKind.Incremental,willSave:!1,willSaveWaitUntil:!1,save:!1},completionProvider:{triggerCharacters:["-",":"," ",'"'],resolveProvider:!1},hoverProvider:!0,documentLinkProvider:{resolveProvider:!1},documentFormattingProvider:!0,workspace:{workspaceFolders:{supported:!0}}},m={syntaxValidation:!1,schemaValidation:!1,basicCompletions:!1,advancedCompletions:!1,hover:!1,imageLinks:!1,formatting:!1};t.ComposeLanguageService=class ComposeLanguageService{constructor(e,t){var n,r,f;this.connection=e,this.clientParams=t,this.documentManager=new o.TextDocuments(s.ComposeDocument.DocumentManagerConfig),this.subscriptions=[],this._capabilities=h;let g=null===(n=t.capabilities.experimental)||void 0===n?void 0:n.alternateYamlLanguageService;g?e.console.info("An alternate YAML language service is present. The Compose language service will not enable features already provided by the alternate."):g=m,g.syntaxValidation&&g.schemaValidation||this.createDocumentManagerHandler(this.documentManager.onDidChangeContent,new c.DiagnosticProvider(null===(r=t.initializationOptions)||void 0===r?void 0:r.diagnosticDelay,!g.syntaxValidation,!g.schemaValidation)),g.basicCompletions&&g.advancedCompletions?this._capabilities.completionProvider=void 0:this.createLspHandler(this.connection.onCompletion,new a.MultiCompletionProvider(!g.basicCompletions,!g.advancedCompletions)),g.hover?this._capabilities.hoverProvider=void 0:this.createLspHandler(this.connection.onHover,new d.KeyHoverProvider),g.imageLinks?this._capabilities.documentLinkProvider=void 0:this.createLspHandler(this.connection.onDocumentLinks,new u.ImageLinkProvider),g.formatting?this._capabilities.documentFormattingProvider=void 0:this.createLspHandler(this.connection.onDocumentFormatting,new l.DocumentFormattingProvider),this.connection.onNotification(i.DocumentSettingsNotification.method,(e=>this.onDidChangeDocumentSettings(e))),this.documentManager.listen(this.connection),this.subscriptions.push(this.telemetryAggregator=new p.TelemetryAggregator(this.connection,null===(f=t.initializationOptions)||void 0===f?void 0:f.telemetryAggregationInterval))}dispose(){for(const e of this.subscriptions)e.dispose()}get capabilities(){return this._capabilities}onDidChangeDocumentSettings(e){const t=this.documentManager.get(e.textDocument.uri);t&&t.updateSettings(e)}createLspHandler(e,t){e((async(e,n,i,r)=>await this.callWithTelemetryAndErrorHandling(t.constructor.name,(async()=>{const s=this.documentManager.get(e.textDocument.uri);if(!s)throw new o.ResponseError(o.ErrorCodes.InvalidParams,"Document not found in cache.");const a={...e,document:s};return await Promise.resolve(t.on(a,n,i,r))}))))}createDocumentManagerHandler(e,t){e((async e=>await this.callWithTelemetryAndErrorHandling(t.constructor.name,(async()=>{const n={...e,textDocument:e.document.id};return await Promise.resolve(t.on(n,o.CancellationToken.None))}))),this,this.subscriptions)}async callWithTelemetryAndErrorHandling(e,t){const n={clientCapabilities:this.clientParams.capabilities,connection:this.connection,telemetry:(0,r.initEvent)(e)},i=process.hrtime.bigint();try{return await(0,f.runWithContext)(n,t)}catch(e){let t,i;return e instanceof o.ResponseError?(t=e,i=e.stack):e instanceof Error?(t=new o.ResponseError(o.ErrorCodes.UnknownErrorCode,e.message,e),i=e.stack):t=new o.ResponseError(o.ErrorCodes.InternalError,e.toString?e.toString():"Unknown error"),n.telemetry.properties.result="Failed",n.telemetry.properties.error=t.code.toString(),n.telemetry.properties.errorMessage=t.message,n.telemetry.properties.stack=i,t}finally{const e=process.hrtime.bigint(),t=Number((e-i)/BigInt(1e3));n.telemetry.measurements.duration=t,this.telemetryAggregator.logEvent(n.telemetry)}}}},81220:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DiagnosticProvider=void 0;const o=n(35809),i=n(53529),r=n(46160),s=n(33105),a=n(84775);class DiagnosticProvider extends a.ProviderBase{constructor(e=1e3,t,n){super(),this.diagnosticDelay=e,this.syntaxValidation=t,this.schemaValidation=n}on(e){var t;if(!this.syntaxValidation)return;const n=(0,i.getCurrentContext)();n.telemetry.suppressAll=!0,n.telemetry.properties.isActivationEvent="true",(null===(t=n.clientCapabilities.textDocument)||void 0===t?void 0:t.publishDiagnostics)&&(0,r.debounce)(this.diagnosticDelay,{uri:e.document.textDocument.uri,callId:"diagnostics"},(()=>{const t=[];for(const n of[...e.document.yamlDocument.value.errors,...e.document.yamlDocument.value.warnings])t.push(o.Diagnostic.create((0,s.yamlRangeToLspRange)(e.document.textDocument,n.pos),n.message,"YAMLWarning"===n.name?o.DiagnosticSeverity.Warning:o.DiagnosticSeverity.Error,n.code));n.connection.sendDiagnostics({uri:e.document.textDocument.uri,diagnostics:t})}),this)}}t.DiagnosticProvider=DiagnosticProvider},67957:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DocumentFormattingProvider=void 0;const o=n(35809),i=n(84775);class DocumentFormattingProvider extends i.ProviderBase{on(e,t){if(e.document.yamlDocument.value.errors.length)return;const n={indent:e.options.tabSize,indentSeq:!0,simpleKeys:!0,nullStr:"",lineWidth:0},i=o.Range.create(e.document.textDocument.positionAt(0),e.document.textDocument.positionAt(e.document.textDocument.getText().length)),r=e.document.yamlDocument.value.toString(n);return[o.TextEdit.replace(i,r)]}}t.DocumentFormattingProvider=DocumentFormattingProvider},38210:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ImageLinkProvider=void 0;const o=n(35809),i=n(93419),r=n(53529),s=n(33105),a=n(84775),c=/^(?<imageName>[.\w-]+)(?<tag>:[.\w-]+)?$/i,l=/^(?<namespace>[a-z0-9]+)\/(?<imageName>[.\w-]+)(?<tag>:[.\w-]+)?$/i,u=/^mcr.microsoft.com\/(?<namespace>([a-z0-9]+\/)+)(?<imageName>[.\w-]+)(?<tag>:[.\w-]+)?$/i;class ImageLinkProvider extends a.ProviderBase{on(e,t){const n=(0,r.getCurrentContext)();n.telemetry.properties.isActivationEvent="true";const a=[],c=new Set,l=e.document.yamlDocument.value.getIn(["services"]);if((0,i.isMap)(l))for(const n of l.items){if(t.isCancellationRequested)return;if((0,i.isMap)(n.value)){const t=n.value.getIn(["image"],!0);if(!n.value.has("build")&&(0,i.isScalar)(t)&&"string"==typeof t.value){const n=t.type===i.Scalar.QUOTE_SINGLE||t.type===i.Scalar.QUOTE_DOUBLE?1:0,r=ImageLinkProvider.getLinkForImage(t.value,c);r&&t.range&&a.push(o.DocumentLink.create((0,s.yamlRangeToLspRange)(e.document.textDocument,[n+t.range[0]+r.start,n+t.range[0]+r.start+r.length]),r.uri))}}}return n.telemetry.properties.imageTypes=Array.from(c.values()).sort().join(","),a}static getLinkForImage(e,t){var n,o,i,r,s,a;let d,f,p;return(d=c.exec(e))&&(p=null===(n=d.groups)||void 0===n?void 0:n.imageName)?(t.add("dockerHub"),{uri:`https://hub.docker.com/_/${p}`,start:d.index,length:p.length}):(d=l.exec(e))&&(f=null===(o=d.groups)||void 0===o?void 0:o.namespace)&&(p=null===(i=d.groups)||void 0===i?void 0:i.imageName)?(t.add("dockerHubNamespaced"),{uri:`https://hub.docker.com/r/${f}/${p}`,start:d.index,length:f.length+1+p.length}):(d=u.exec(e))&&(f=null===(s=null===(r=d.groups)||void 0===r?void 0:r.namespace)||void 0===s?void 0:s.replace(/\/$/,""))&&(p=null===(a=d.groups)||void 0===a?void 0:a.imageName)?(t.add("mcr"),{uri:`https://hub.docker.com/_/microsoft-${f.replace("/","-")}-${p}`,start:d.index,length:18+f.length+1+p.length}):void 0}}t.ImageLinkProvider=ImageLinkProvider},97900:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.KeyHoverProvider=void 0;const o=n(35809),i=n(59271),r=n(53529),s=n(84775);class KeyHoverProvider extends s.ProviderBase{async on(e,t){var n,s,c;const l=(0,r.getCurrentContext)();l.telemetry.groupingStrategy="eventName";const u=null===(s=null===(n=l.clientCapabilities.textDocument)||void 0===n?void 0:n.hover)||void 0===s?void 0:s.contentFormat,d=!!(null==u?void 0:u.length)&&(null==u?void 0:u[0])===o.MarkupKind.Markdown,f=await e.document.getPositionInfo(e);for(const t of a){const n=t.pathRegex.exec(f.path);if(!n)continue;const r=e.document.lineAt(e.position),s=i.KeyValueRegex.exec(r),a=n.groups.keyName,u=null===(c=null==s?void 0:s.groups)||void 0===c?void 0:c.keyName;if(u===a){const n=r.indexOf(u);return l.telemetry.properties.keyName=u,{contents:{kind:d?o.MarkupKind.Markdown:o.MarkupKind.PlainText,value:d&&t.markdownContents||t.plaintextContents},range:o.Range.create(o.Position.create(e.position.line,n),o.Position.create(e.position.line,n+u.length))}}}}}t.KeyHoverProvider=KeyHoverProvider;const a=[{pathRegex:/^\/(?<keyName>configs)$/i,plaintextContents:"Configurations for services in the project"},{pathRegex:/^\/(?<keyName>networks)$/i,plaintextContents:"Networks that are shared among multiple services"},{pathRegex:/^\/networks\/[.\w-]+\/(?<keyName>driver)$/i,plaintextContents:"The driver used for this network"},{pathRegex:/^\/(?<keyName>secrets)$/i,plaintextContents:"Secrets that are shared among multiple services"},{pathRegex:/^\/(?<keyName>services)$/i,plaintextContents:"The services in your project"},{pathRegex:/^\/services\/[.\w-]+\/(?<keyName>build)$/i,plaintextContents:"The context used for building the image"},{pathRegex:/^\/services\/[.\w-]+\/build\/(?<keyName>args)$/i,plaintextContents:"Arguments used during the image build process"},{pathRegex:/^\/services\/[.\w-]+\/build\/(?<keyName>context)$/i,plaintextContents:"The context used for building the image"},{pathRegex:/^\/services\/[.\w-]+\/build\/(?<keyName>dockerfile)$/i,plaintextContents:"The Dockerfile used for building the image"},{pathRegex:/^\/services\/[.\w-]+\/(?<keyName>command)$/i,plaintextContents:"The command that will be run in the container"},{pathRegex:/^\/services\/[.\w-]+\/(?<keyName>container_name)$/i,plaintextContents:"The name that will be given to the container"},{pathRegex:/^\/services\/[.\w-]+\/(?<keyName>depends_on)$/i,plaintextContents:"Other services that this service depends on, which will be started before this one"},{pathRegex:/^\/services\/[.\w-]+\/(?<keyName>entrypoint)$/i,plaintextContents:"The entrypoint to the application in the container"},{pathRegex:/^\/services\/[.\w-]+\/(?<keyName>env_file)$/i,plaintextContents:"Files containing environment variables that will be included"},{pathRegex:/^\/services\/[.\w-]+\/(?<keyName>environment)$/i,plaintextContents:"Environment variables that will be included"},{pathRegex:/^\/services\/[.\w-]+\/(?<keyName>expose)$/i,plaintextContents:"Ports exposed to the other services but not to the host machine"},{pathRegex:/^\/services\/[.\w-]+\/(?<keyName>healthcheck)$/i,plaintextContents:"A command for checking if the container is healthy"},{pathRegex:/^\/services\/[.\w-]+\/(?<keyName>image)$/i,plaintextContents:"The image that will be pulled for the service. If `build` is specified, the built image will be given this tag."},{pathRegex:/^\/services\/[.\w-]+\/(?<keyName>labels)$/i,plaintextContents:"Labels that will be given to the container"},{pathRegex:/^\/services\/[.\w-]+\/(?<keyName>logging)$/i,plaintextContents:"Settings for logging for this service"},{pathRegex:/^\/services\/[.\w-]+\/(?<keyName>networks)$/i,plaintextContents:"The service will be included in these networks, allowing it to reach other containers on the same network"},{pathRegex:/^\/services\/[.\w-]+\/(?<keyName>ports)$/i,plaintextContents:"Ports that will be exposed to the host"},{pathRegex:/^\/services\/[.\w-]+\/(?<keyName>profiles)$/i,plaintextContents:"Profiles that this service is a part of. When the profile is started, this service will be started."},{pathRegex:/^\/services\/[.\w-]+\/(?<keyName>secrets)$/i,plaintextContents:"Secrets the service will have access to"},{pathRegex:/^\/services\/[.\w-]+\/(?<keyName>user)$/i,plaintextContents:"The username under which the app in the container will be started"},{pathRegex:/^\/services\/[.\w-]+\/(?<keyName>volumes)$/i,plaintextContents:"Named volumes and paths on the host mapped to paths in the container"},{pathRegex:/^\/services\/[.\w-]+\/(?<keyName>working_dir)$/i,plaintextContents:"The working directory in which the entrypoint or command will be run"},{pathRegex:/^\/(?<keyName>version)$/i,plaintextContents:"The version of the Docker Compose document"},{pathRegex:/^\/(?<keyName>volumes)$/i,plaintextContents:"Named volumes that are shared among multiple services"},{pathRegex:/^\/volumes\/[.\w-]+\/(?<keyName>driver)$/i,plaintextContents:"The driver used for this volume"}]},84775:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ProviderBase=void 0;t.ProviderBase=class ProviderBase{}},12819:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BuildCompletionCollection=void 0;const o=n(35809),i=n(67810);t.BuildCompletionCollection=new i.CompletionCollection("build",{logicalPaths:[/^\/services\/[.\w-]+\/build$/i,/^\/services\/[.\w-]+\/build\/<value>$/i],indentationDepth:3},...[{label:"args:",insertText:"args:\n\t- ${1:name}=${2:value}$0",insertTextFormat:o.InsertTextFormat.Snippet,insertTextMode:o.InsertTextMode.adjustIndentation,isAdvancedComposeCompletion:!0},{label:"context:",insertText:"context: ${1:buildContext}$0",insertTextFormat:o.InsertTextFormat.Snippet,isAdvancedComposeCompletion:!1},{label:"dockerfile:",insertText:"dockerfile: ${1:dockerfile}$0",insertTextFormat:o.InsertTextFormat.Snippet,isAdvancedComposeCompletion:!1},{label:"labels:",insertText:"labels:\n\t- ${1:com.host.description}=${2:label}$0",insertTextFormat:o.InsertTextFormat.Snippet,insertTextMode:o.InsertTextMode.adjustIndentation,isAdvancedComposeCompletion:!0},{label:"network:",insertText:"network: ${1:networkName}$0",insertTextFormat:o.InsertTextFormat.Snippet,isAdvancedComposeCompletion:!1},{label:"target:",insertText:"target: ${1:targetStage}$0",insertTextFormat:o.InsertTextFormat.Snippet,isAdvancedComposeCompletion:!1}])},67810:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CompletionCollection=void 0;t.CompletionCollection=class CompletionCollection extends Array{constructor(e,t,...n){super(...n),this.name=e,this.locationRequirements=t}getActiveCompletionItems(e){if(void 0!==this.locationRequirements.logicalPaths&&!this.locationRequirements.logicalPaths.some((t=>{var n;return t.test(null!==(n=e.positionInfo.path)&&void 0!==n?n:"")})))return;if(void 0!==this.locationRequirements.indentationDepth&&this.locationRequirements.indentationDepth!==e.positionInfo.indentDepth)return;const t=e.document.lineAt(e.position);return this.filter((t=>e.basicCompletions&&!t.isAdvancedComposeCompletion||e.advancedCompletions&&t.isAdvancedComposeCompletion)).filter((e=>!e.matcher||e.matcher.test(t)))}}},55634:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.MultiCompletionProvider=void 0;const o=n(53529),i=n(84775),r=n(12819),s=n(88229),a=n(61311),c=n(59600),l=n(98722);class MultiCompletionProvider extends i.ProviderBase{constructor(e,t){super(),this.basicCompletions=e,this.advancedCompletions=t,this.completionCollections=[a.RootCompletionCollection,c.ServiceCompletionCollection,r.BuildCompletionCollection,l.VolumesCompletionCollection,s.PortsCompletionCollection]}async on(e,t,n){const i=(0,o.getCurrentContext)(),r={...e,positionInfo:await e.document.getPositionInfo(e),basicCompletions:this.basicCompletions,advancedCompletions:this.advancedCompletions},s=[],a=[];for(const e of this.completionCollections){if(t.isCancellationRequested)return;const n=e.getActiveCompletionItems(r);(null==n?void 0:n.length)&&(a.push(e.name),s.push(...n)),i.telemetry.properties.respondingCollections=a.sort().join(",")}return s.length>0?s:void 0}}t.MultiCompletionProvider=MultiCompletionProvider},88229:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PortsCompletionCollection=void 0;const o=n(35809),i=n(67810),r=/(\s*-\s*)(?<leadingQuote>"|')?\2\s*$/i;t.PortsCompletionCollection=new i.CompletionCollection("ports",{logicalPaths:[/^\/services\/[.\w-]+\/ports\/<item>\/.*$/i],indentationDepth:3},...[{matcher:r,label:"containerPort",insertText:'"${1:80}"$0',insertTextFormat:o.InsertTextFormat.Snippet,isAdvancedComposeCompletion:!1},{matcher:r,label:"hostPort:containerPort",insertText:'"${1:8080}:${2:80}"$0',insertTextFormat:o.InsertTextFormat.Snippet,isAdvancedComposeCompletion:!0},{matcher:r,label:"hostPort:containerPort/protocol",insertText:'"${1:8080}:${2:80}/${3|tcp,udp|}"$0',insertTextFormat:o.InsertTextFormat.Snippet,isAdvancedComposeCompletion:!0},{matcher:r,label:"hostRange:containerRange",insertText:'"${1:8080}-${2:8081}:${3:80}-${4:81}"$0',insertTextFormat:o.InsertTextFormat.Snippet,isAdvancedComposeCompletion:!0},{matcher:r,label:"(Long form port specification)",insertText:"target: ${1:80}\n published: ${2:8080}\n protocol: ${3|tcp,udp|}\n mode: ${4|host,ingress|}$0",insertTextFormat:o.InsertTextFormat.Snippet,insertTextMode:o.InsertTextMode.adjustIndentation,isAdvancedComposeCompletion:!0,documentation:"target: <containerPort>\n published: <hostPort>\n protocol: <udp, tcp>\n mode: <host, ingress>",sortText:"zzz"}])},61311:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.RootCompletionCollection=void 0;const o=n(35809),i=n(67810);t.RootCompletionCollection=new i.CompletionCollection("root",{logicalPaths:[/^\/$/i,/^\/<value>$/i],indentationDepth:0},...[{label:"configs:",insertText:"configs:\n",insertTextFormat:o.InsertTextFormat.PlainText,isAdvancedComposeCompletion:!1},{label:"networks:",insertText:"networks:\n",insertTextFormat:o.InsertTextFormat.PlainText,isAdvancedComposeCompletion:!1},{label:"secrets:",insertText:"secrets:\n",insertTextFormat:o.InsertTextFormat.PlainText,isAdvancedComposeCompletion:!1},{label:"services:",insertText:"services:\n",insertTextFormat:o.InsertTextFormat.PlainText,isAdvancedComposeCompletion:!1},{label:"version:",insertText:"version: '${1:version}'$0",insertTextFormat:o.InsertTextFormat.Snippet,isAdvancedComposeCompletion:!1},{label:"volumes:",insertText:"volumes:\n",insertTextFormat:o.InsertTextFormat.PlainText,isAdvancedComposeCompletion:!1}])},59600:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ServiceCompletionCollection=void 0;const o=n(35809),i=n(67810);t.ServiceCompletionCollection=new i.CompletionCollection("service",{logicalPaths:[/^\/services\/[.\w-]+$/i,/^\/services\/[.\w-]+\/<value>$/i],indentationDepth:2},...[{label:"build:",insertText:"build: ${1:path}$0",insertTextFormat:o.InsertTextFormat.Snippet,isAdvancedComposeCompletion:!1,detail:"Short form",documentation:"build: <path>"},{label:"build:",insertText:"build:\n\tcontext: ${1:contextPath}\n\tdockerfile: ${2:Dockerfile}",insertTextFormat:o.InsertTextFormat.Snippet,insertTextMode:o.InsertTextMode.adjustIndentation,isAdvancedComposeCompletion:!0,detail:"Long form",documentation:"build:\n\tcontext: <contextPath>\n\tdockerfile: <Dockerfile>"},{label:"command:",insertText:"command: ${1:command}$0",insertTextFormat:o.InsertTextFormat.Snippet,isAdvancedComposeCompletion:!1,detail:"String form",documentation:"command: echo hello"},{label:"command:",insertText:'command: ["${1:executable}", "${2:arg}"]$0',insertTextFormat:o.InsertTextFormat.Snippet,isAdvancedComposeCompletion:!0,detail:"List form",documentation:'command: ["echo", "hello"]'},{label:"container_name:",insertText:"container_name: ${1:name}$0",insertTextFormat:o.InsertTextFormat.Snippet,isAdvancedComposeCompletion:!1},{label:"depends_on:",insertText:"depends_on:\n\t- ${1:serviceName}$0",insertTextFormat:o.InsertTextFormat.Snippet,insertTextMode:o.InsertTextMode.adjustIndentation,isAdvancedComposeCompletion:!0},{label:"entrypoint:",insertText:"entrypoint: ${1:entrypoint}$0",insertTextFormat:o.InsertTextFormat.Snippet,isAdvancedComposeCompletion:!1,detail:"String form",documentation:"entrypoint: /app/start.sh"},{label:"entrypoint:",insertText:'entrypoint: ["${1:executable}", "${2:arg}"]$0',insertTextFormat:o.InsertTextFormat.Snippet,isAdvancedComposeCompletion:!0,detail:"List form",documentation:'entrypoint: ["echo", "hello"]'},{label:"env_file:",insertText:"env_file:\n\t- ${1:fileName}$0",insertTextFormat:o.InsertTextFormat.Snippet,insertTextMode:o.InsertTextMode.adjustIndentation,isAdvancedComposeCompletion:!0},{label:"environment:",insertText:"environment:\n\t- ${1:name}=${2:value}$0",insertTextFormat:o.InsertTextFormat.Snippet,insertTextMode:o.InsertTextMode.adjustIndentation,isAdvancedComposeCompletion:!0},{label:"expose:",insertText:"expose:\n\t- ${1:1234}$0",insertTextFormat:o.InsertTextFormat.Snippet,insertTextMode:o.InsertTextMode.adjustIndentation,isAdvancedComposeCompletion:!0},{label:"healthcheck:",insertText:'healthcheck:\n\ttest: ["${1:executable}", "${2:arg}"]\n\tinterval: ${3:1m30s}\n\ttimeout: ${4:30s}\n\tretries: ${5:5}\n\tstart_period: ${6:30s}$0',insertTextFormat:o.InsertTextFormat.Snippet,insertTextMode:o.InsertTextMode.adjustIndentation,isAdvancedComposeCompletion:!0},{label:"image:",insertText:"image: ${1:imageName}$0",insertTextFormat:o.InsertTextFormat.Snippet,isAdvancedComposeCompletion:!1},{label:"labels:",insertText:"labels:\n\t- ${1:com.host.description}=${2:label}$0",insertTextFormat:o.InsertTextFormat.Snippet,insertTextMode:o.InsertTextMode.adjustIndentation,isAdvancedComposeCompletion:!0},{label:"networks:",insertText:"networks:\n\t- ${1:networkName}$0",insertTextFormat:o.InsertTextFormat.Snippet,insertTextMode:o.InsertTextMode.adjustIndentation,isAdvancedComposeCompletion:!0},{label:"ports:",insertText:"ports:\n\t-$0",insertTextFormat:o.InsertTextFormat.Snippet,insertTextMode:o.InsertTextMode.adjustIndentation,isAdvancedComposeCompletion:!1},{label:"profiles:",insertText:"profiles:\n\t- ${1:profileName}$0",insertTextFormat:o.InsertTextFormat.Snippet,insertTextMode:o.InsertTextMode.adjustIndentation,isAdvancedComposeCompletion:!0},{label:"volumes:",insertText:"volumes:\n\t-$0",insertTextFormat:o.InsertTextFormat.Snippet,insertTextMode:o.InsertTextMode.adjustIndentation,isAdvancedComposeCompletion:!1}])},98722:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.VolumesCompletionCollection=void 0;const o=n(35809),i=n(67810);t.VolumesCompletionCollection=new i.CompletionCollection("volumes",{logicalPaths:[/^\/services\/[.\w-]+\/volumes\/<item>\/.*$/i],indentationDepth:3},...[{matcher:/(\s*-\s*)(?<leadingQuote>"|')?\2\s*$/i,label:"hostPath:containerPath:mode",insertText:"${1:hostPath}:${2:containerPath}:${3|ro,rw|}$0",insertTextFormat:o.InsertTextFormat.Snippet,isAdvancedComposeCompletion:!0},{matcher:/(\s*-\s*)(?<leadingQuote>"|')?\2\s*$/i,label:"volumeName:containerPath:mode",insertText:"${1:volumeName}:${2:containerPath}:${3|ro,rw|}$0",insertTextFormat:o.InsertTextFormat.Snippet,isAdvancedComposeCompletion:!0},{matcher:/(\s*-\s*)(?<leadingQuote>"|')?(([a-z]:\\)?[^:"]+):\2\s*$/i,label:":containerPath:mode",insertText:"${1:containerPath}:${2|ro,rw|}$0",insertTextFormat:o.InsertTextFormat.Snippet,isAdvancedComposeCompletion:!0},{matcher:/(\s*-\s*)(?<leadingQuote>"|')?(([a-z]:\\)?[^:"]+):(([a-z]:\\)?[^:"]+):\2\s*$/i,label:":ro",insertText:"ro",insertTextFormat:o.InsertTextFormat.PlainText,isAdvancedComposeCompletion:!0,detail:"Read-only"},{matcher:/(\s*-\s*)(?<leadingQuote>"|')?(([a-z]:\\)?[^:"]+):(([a-z]:\\)?[^:"]+):\2\s*$/i,label:":rw",insertText:"rw",insertTextFormat:o.InsertTextFormat.PlainText,isAdvancedComposeCompletion:!0,detail:"Read-write"}])},53529:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.runWithContext=t.getCurrentContext=void 0;const o=n(50852),i=n(35809),r=new o.AsyncLocalStorage;t.getCurrentContext=function getCurrentContext(){const e=r.getStore();if(!e)throw new i.ResponseError(i.ErrorCodes.InternalError,"Failed to get action context");return e},t.runWithContext=function runWithContext(e,t){return r.run(e,t)}},97797:function(e,t){var n,o=this&&this.__classPrivateFieldGet||function(e,t,n,o){if("a"===n&&!o)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?o:"a"===n?o.call(e):o?o.value:t.get(e)},i=this&&this.__classPrivateFieldSet||function(e,t,n,o,i){if("m"===o)throw new TypeError("Private method is not writable");if("a"===o&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===o?i.call(e,n):i?i.value=n:t.set(e,n),n};Object.defineProperty(t,"__esModule",{value:!0}),t.Lazy=void 0;t.Lazy=class Lazy{constructor(e){this.valueFactory=e,n.set(this,void 0)}get value(){return void 0===o(this,n,"f")&&i(this,n,this.valueFactory(),"f"),o(this,n,"f")}hasValue(){return void 0!==o(this,n,"f")}clear(){i(this,n,void 0,"f")}},n=new WeakMap},46160:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.debounce=void 0;const n={};t.debounce=function debounce(e,t,o,i){const r=`${t.uri}/${t.callId}`;n[r]&&(n[r].dispose(),delete n[r]);const s=setTimeout((()=>{n[r].dispose(),delete n[r],o.call(i)}),e);n[r]={dispose:()=>clearTimeout(s)}}},34884:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TelemetryAggregator=void 0;const o=n(83545),i=n(52947);t.TelemetryAggregator=class TelemetryAggregator{constructor(e,t=6e4){this.connection=e,this.interval=t,this.eventBuffer=[],this.timer=setInterval((()=>this.flush()),this.interval)}dispose(){clearInterval(this.timer),this.flush()}logEvent(e){e.suppressAll||"Succeeded"===e.properties.result&&e.suppressIfSuccessful||("Failed"===e.properties.result?this.connection.telemetry.logEvent(e):this.eventBuffer.push(e))}flush(){try{for(const e of this.getAggregatedEvents())this.connection.telemetry.logEvent(e)}catch(e){const t=e instanceof Error?e:Error(e.toString()),n=(0,o.initEvent)("telemetryaggregatorfailure");n.properties.result="Failed",n.properties.error=t.name,n.properties.errorMessage=t.message,n.properties.stack=t.stack,this.connection.telemetry.logEvent(n)}finally{this.eventBuffer=[]}}getAggregatedEvents(){const e=[],t=new Map;for(const e of this.eventBuffer){let n;if("eventNameAndProperties"===e.groupingStrategy)n=e.eventName+JSON.stringify(e.properties);else n=e.eventName;t.has(n)||t.set(n,[]),t.get(n).push(e)}for(const n of t.values()){const t=n[0].eventName,r=(0,o.initEvent)(t),s=n.map((e=>{var t;return null!==(t=e.measurements.duration)&&void 0!==t?t:void 0})).filter((e=>void 0!==e))||[],a=(0,i.logNormal)(s);r.measurements.count=n.length,r.measurements.durationMu=a.mu,r.measurements.durationSigma=a.sigma,r.measurements.durationMedian=a.median,n.forEach((e=>Object.assign(r.properties,e.properties))),e.push(r)}return e}}},52947:(e,t)=>{function sum(e){return e.reduce(((e,t)=>e+t),0)}function sq(e){return Math.pow(e,2)}function ln(e){return Math.log(e)}function round(e,t=3){const n=Math.pow(10,t);return Math.round(e*n)/n}Object.defineProperty(t,"__esModule",{value:!0}),t.logNormal=void 0,t.logNormal=function logNormal(e){if(!(null==e?void 0:e.length))return{mu:0,sigma:0,median:0};if(1===e.length)return{median:round(e[0],3),mu:round(ln(e[0]),3),sigma:0};const t=e.length,n=e.map((e=>ln(e))),o=n.map((e=>sq(e))),i=sum(n)/t,r=Math.sqrt((t*sum(o)-sq(sum(n)))/(t*(t-1)));return{mu:round(i,3),sigma:round(r,3),median:round(Math.pow(Math.E,i),0)}}},33105:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.yamlRangeToLspRange=void 0,t.yamlRangeToLspRange=function yamlRangeToLspRange(e,t){return{start:e.positionAt(t[0]),end:e.positionAt(t[1])}}},28661:(e,t,n)=>{var o,i,r,s,a,c,l,u,d,f,p,h,m,g,y,v,b,S,k,T,w,C,D,R,P,x,_,N;n.r(t),n.d(t,{AnnotatedTextEdit:()=>D,ChangeAnnotation:()=>w,ChangeAnnotationIdentifier:()=>C,CodeAction:()=>re,CodeActionContext:()=>ie,CodeActionKind:()=>ne,CodeActionTriggerKind:()=>oe,CodeDescription:()=>b,CodeLens:()=>se,Color:()=>d,ColorInformation:()=>f,ColorPresentation:()=>p,Command:()=>k,CompletionItem:()=>B,CompletionItemKind:()=>L,CompletionItemLabelDetails:()=>U,CompletionItemTag:()=>j,CompletionList:()=>H,CreateFile:()=>P,DeleteFile:()=>_,Diagnostic:()=>S,DiagnosticRelatedInformation:()=>g,DiagnosticSeverity:()=>y,DiagnosticTag:()=>v,DocumentHighlight:()=>Q,DocumentHighlightKind:()=>J,DocumentLink:()=>ce,DocumentSymbol:()=>te,DocumentUri:()=>o,EOL:()=>De,FoldingRange:()=>m,FoldingRangeKind:()=>h,FormattingOptions:()=>ae,Hover:()=>V,InlayHint:()=>be,InlayHintKind:()=>ye,InlayHintLabelPart:()=>ve,InlineValueContext:()=>ge,InlineValueEvaluatableExpression:()=>me,InlineValueText:()=>pe,InlineValueVariableLookup:()=>he,InsertReplaceEdit:()=>$,InsertTextFormat:()=>F,InsertTextMode:()=>W,Location:()=>l,LocationLink:()=>u,MarkedString:()=>K,MarkupContent:()=>I,MarkupKind:()=>A,OptionalVersionedTextDocumentIdentifier:()=>q,ParameterInformation:()=>z,Position:()=>a,Range:()=>c,RenameFile:()=>x,SelectionRange:()=>le,SemanticTokenModifiers:()=>de,SemanticTokenTypes:()=>ue,SemanticTokens:()=>fe,SignatureInformation:()=>Y,SymbolInformation:()=>Z,SymbolKind:()=>G,SymbolTag:()=>X,TextDocument:()=>Ce,TextDocumentEdit:()=>R,TextDocumentIdentifier:()=>E,TextDocumentItem:()=>O,TextEdit:()=>T,URI:()=>i,VersionedTextDocumentIdentifier:()=>M,WorkspaceChange:()=>we,WorkspaceEdit:()=>N,WorkspaceFolder:()=>Se,WorkspaceSymbol:()=>ee,integer:()=>r,uinteger:()=>s}),function(e){e.is=function is(e){return"string"==typeof e}}(o||(o={})),function(e){e.is=function is(e){return"string"==typeof e}}(i||(i={})),function(e){e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647,e.is=function is(t){return"number"==typeof t&&e.MIN_VALUE<=t&&t<=e.MAX_VALUE}}(r||(r={})),function(e){e.MIN_VALUE=0,e.MAX_VALUE=2147483647,e.is=function is(t){return"number"==typeof t&&e.MIN_VALUE<=t&&t<=e.MAX_VALUE}}(s||(s={})),function(e){e.create=function create(e,t){return e===Number.MAX_VALUE&&(e=s.MAX_VALUE),t===Number.MAX_VALUE&&(t=s.MAX_VALUE),{line:e,character:t}},e.is=function is(e){var t=e;return Re.objectLiteral(t)&&Re.uinteger(t.line)&&Re.uinteger(t.character)}}(a||(a={})),function(e){e.create=function create(e,t,n,o){if(Re.uinteger(e)&&Re.uinteger(t)&&Re.uinteger(n)&&Re.uinteger(o))return{start:a.create(e,t),end:a.create(n,o)};if(a.is(e)&&a.is(t))return{start:e,end:t};throw new Error("Range#create called with invalid arguments[".concat(e,", ").concat(t,", ").concat(n,", ").concat(o,"]"))},e.is=function is(e){var t=e;return Re.objectLiteral(t)&&a.is(t.start)&&a.is(t.end)}}(c||(c={})),function(e){e.create=function create(e,t){return{uri:e,range:t}},e.is=function is(e){var t=e;return Re.objectLiteral(t)&&c.is(t.range)&&(Re.string(t.uri)||Re.undefined(t.uri))}}(l||(l={})),function(e){e.create=function create(e,t,n,o){return{targetUri:e,targetRange:t,targetSelectionRange:n,originSelectionRange:o}},e.is=function is(e){var t=e;return Re.objectLiteral(t)&&c.is(t.targetRange)&&Re.string(t.targetUri)&&c.is(t.targetSelectionRange)&&(c.is(t.originSelectionRange)||Re.undefined(t.originSelectionRange))}}(u||(u={})),function(e){e.create=function create(e,t,n,o){return{red:e,green:t,blue:n,alpha:o}},e.is=function is(e){var t=e;return Re.objectLiteral(t)&&Re.numberRange(t.red,0,1)&&Re.numberRange(t.green,0,1)&&Re.numberRange(t.blue,0,1)&&Re.numberRange(t.alpha,0,1)}}(d||(d={})),function(e){e.create=function create(e,t){return{range:e,color:t}},e.is=function is(e){var t=e;return Re.objectLiteral(t)&&c.is(t.range)&&d.is(t.color)}}(f||(f={})),function(e){e.create=function create(e,t,n){return{label:e,textEdit:t,additionalTextEdits:n}},e.is=function is(e){var t=e;return Re.objectLiteral(t)&&Re.string(t.label)&&(Re.undefined(t.textEdit)||T.is(t))&&(Re.undefined(t.additionalTextEdits)||Re.typedArray(t.additionalTextEdits,T.is))}}(p||(p={})),function(e){e.Comment="comment",e.Imports="imports",e.Region="region"}(h||(h={})),function(e){e.create=function create(e,t,n,o,i,r){var s={startLine:e,endLine:t};return Re.defined(n)&&(s.startCharacter=n),Re.defined(o)&&(s.endCharacter=o),Re.defined(i)&&(s.kind=i),Re.defined(r)&&(s.collapsedText=r),s},e.is=function is(e){var t=e;return Re.objectLiteral(t)&&Re.uinteger(t.startLine)&&Re.uinteger(t.startLine)&&(Re.undefined(t.startCharacter)||Re.uinteger(t.startCharacter))&&(Re.undefined(t.endCharacter)||Re.uinteger(t.endCharacter))&&(Re.undefined(t.kind)||Re.string(t.kind))}}(m||(m={})),function(e){e.create=function create(e,t){return{location:e,message:t}},e.is=function is(e){var t=e;return Re.defined(t)&&l.is(t.location)&&Re.string(t.message)}}(g||(g={})),function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4}(y||(y={})),function(e){e.Unnecessary=1,e.Deprecated=2}(v||(v={})),function(e){e.is=function is(e){var t=e;return Re.objectLiteral(t)&&Re.string(t.href)}}(b||(b={})),function(e){e.create=function create(e,t,n,o,i,r){var s={range:e,message:t};return Re.defined(n)&&(s.severity=n),Re.defined(o)&&(s.code=o),Re.defined(i)&&(s.source=i),Re.defined(r)&&(s.relatedInformation=r),s},e.is=function is(e){var t,n=e;return Re.defined(n)&&c.is(n.range)&&Re.string(n.message)&&(Re.number(n.severity)||Re.undefined(n.severity))&&(Re.integer(n.code)||Re.string(n.code)||Re.undefined(n.code))&&(Re.undefined(n.codeDescription)||Re.string(null===(t=n.codeDescription)||void 0===t?void 0:t.href))&&(Re.string(n.source)||Re.undefined(n.source))&&(Re.undefined(n.relatedInformation)||Re.typedArray(n.relatedInformation,g.is))}}(S||(S={})),function(e){e.create=function create(e,t){for(var n=[],o=2;o<arguments.length;o++)n[o-2]=arguments[o];var i={title:e,command:t};return Re.defined(n)&&n.length>0&&(i.arguments=n),i},e.is=function is(e){var t=e;return Re.defined(t)&&Re.string(t.title)&&Re.string(t.command)}}(k||(k={})),function(e){e.replace=function replace(e,t){return{range:e,newText:t}},e.insert=function insert(e,t){return{range:{start:e,end:e},newText:t}},e.del=function del(e){return{range:e,newText:""}},e.is=function is(e){var t=e;return Re.objectLiteral(t)&&Re.string(t.newText)&&c.is(t.range)}}(T||(T={})),function(e){e.create=function create(e,t,n){var o={label:e};return void 0!==t&&(o.needsConfirmation=t),void 0!==n&&(o.description=n),o},e.is=function is(e){var t=e;return Re.objectLiteral(t)&&Re.string(t.label)&&(Re.boolean(t.needsConfirmation)||void 0===t.needsConfirmation)&&(Re.string(t.description)||void 0===t.description)}}(w||(w={})),function(e){e.is=function is(e){var t=e;return Re.string(t)}}(C||(C={})),function(e){e.replace=function replace(e,t,n){return{range:e,newText:t,annotationId:n}},e.insert=function insert(e,t,n){return{range:{start:e,end:e},newText:t,annotationId:n}},e.del=function del(e,t){return{range:e,newText:"",annotationId:t}},e.is=function is(e){var t=e;return T.is(t)&&(w.is(t.annotationId)||C.is(t.annotationId))}}(D||(D={})),function(e){e.create=function create(e,t){return{textDocument:e,edits:t}},e.is=function is(e){var t=e;return Re.defined(t)&&q.is(t.textDocument)&&Array.isArray(t.edits)}}(R||(R={})),function(e){e.create=function create(e,t,n){var o={kind:"create",uri:e};return void 0===t||void 0===t.overwrite&&void 0===t.ignoreIfExists||(o.options=t),void 0!==n&&(o.annotationId=n),o},e.is=function is(e){var t=e;return t&&"create"===t.kind&&Re.string(t.uri)&&(void 0===t.options||(void 0===t.options.overwrite||Re.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||Re.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||C.is(t.annotationId))}}(P||(P={})),function(e){e.create=function create(e,t,n,o){var i={kind:"rename",oldUri:e,newUri:t};return void 0===n||void 0===n.overwrite&&void 0===n.ignoreIfExists||(i.options=n),void 0!==o&&(i.annotationId=o),i},e.is=function is(e){var t=e;return t&&"rename"===t.kind&&Re.string(t.oldUri)&&Re.string(t.newUri)&&(void 0===t.options||(void 0===t.options.overwrite||Re.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||Re.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||C.is(t.annotationId))}}(x||(x={})),function(e){e.create=function create(e,t,n){var o={kind:"delete",uri:e};return void 0===t||void 0===t.recursive&&void 0===t.ignoreIfNotExists||(o.options=t),void 0!==n&&(o.annotationId=n),o},e.is=function is(e){var t=e;return t&&"delete"===t.kind&&Re.string(t.uri)&&(void 0===t.options||(void 0===t.options.recursive||Re.boolean(t.options.recursive))&&(void 0===t.options.ignoreIfNotExists||Re.boolean(t.options.ignoreIfNotExists)))&&(void 0===t.annotationId||C.is(t.annotationId))}}(_||(_={})),function(e){e.is=function is(e){var t=e;return t&&(void 0!==t.changes||void 0!==t.documentChanges)&&(void 0===t.documentChanges||t.documentChanges.every((function(e){return Re.string(e.kind)?P.is(e)||x.is(e)||_.is(e):R.is(e)})))}}(N||(N={}));var E,M,q,O,A,I,L,F,j,$,W,U,B,H,K,V,z,Y,J,Q,G,X,Z,ee,te,ne,oe,ie,re,se,ae,ce,le,ue,de,fe,pe,he,me,ge,ye,ve,be,Se,ke=function(){function TextEditChangeImpl(e,t){this.edits=e,this.changeAnnotations=t}return TextEditChangeImpl.prototype.insert=function(e,t,n){var o,i;if(void 0===n?o=T.insert(e,t):C.is(n)?(i=n,o=D.insert(e,t,n)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(n),o=D.insert(e,t,i)),this.edits.push(o),void 0!==i)return i},TextEditChangeImpl.prototype.replace=function(e,t,n){var o,i;if(void 0===n?o=T.replace(e,t):C.is(n)?(i=n,o=D.replace(e,t,n)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(n),o=D.replace(e,t,i)),this.edits.push(o),void 0!==i)return i},TextEditChangeImpl.prototype.delete=function(e,t){var n,o;if(void 0===t?n=T.del(e):C.is(t)?(o=t,n=D.del(e,t)):(this.assertChangeAnnotations(this.changeAnnotations),o=this.changeAnnotations.manage(t),n=D.del(e,o)),this.edits.push(n),void 0!==o)return o},TextEditChangeImpl.prototype.add=function(e){this.edits.push(e)},TextEditChangeImpl.prototype.all=function(){return this.edits},TextEditChangeImpl.prototype.clear=function(){this.edits.splice(0,this.edits.length)},TextEditChangeImpl.prototype.assertChangeAnnotations=function(e){if(void 0===e)throw new Error("Text edit change is not configured to manage change annotations.")},TextEditChangeImpl}(),Te=function(){function ChangeAnnotations(e){this._annotations=void 0===e?Object.create(null):e,this._counter=0,this._size=0}return ChangeAnnotations.prototype.all=function(){return this._annotations},Object.defineProperty(ChangeAnnotations.prototype,"size",{get:function(){return this._size},enumerable:!1,configurable:!0}),ChangeAnnotations.prototype.manage=function(e,t){var n;if(C.is(e)?n=e:(n=this.nextId(),t=e),void 0!==this._annotations[n])throw new Error("Id ".concat(n," is already in use."));if(void 0===t)throw new Error("No annotation provided for id ".concat(n));return this._annotations[n]=t,this._size++,n},ChangeAnnotations.prototype.nextId=function(){return this._counter++,this._counter.toString()},ChangeAnnotations}(),we=function(){function WorkspaceChange(e){var t=this;this._textEditChanges=Object.create(null),void 0!==e?(this._workspaceEdit=e,e.documentChanges?(this._changeAnnotations=new Te(e.changeAnnotations),e.changeAnnotations=this._changeAnnotations.all(),e.documentChanges.forEach((function(e){if(R.is(e)){var n=new ke(e.edits,t._changeAnnotations);t._textEditChanges[e.textDocument.uri]=n}}))):e.changes&&Object.keys(e.changes).forEach((function(n){var o=new ke(e.changes[n]);t._textEditChanges[n]=o}))):this._workspaceEdit={}}return Object.defineProperty(WorkspaceChange.prototype,"edit",{get:function(){return this.initDocumentChanges(),void 0!==this._changeAnnotations&&(0===this._changeAnnotations.size?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit},enumerable:!1,configurable:!0}),WorkspaceChange.prototype.getTextEditChange=function(e){if(q.is(e)){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");var t={uri:e.uri,version:e.version};if(!(o=this._textEditChanges[t.uri])){var n={textDocument:t,edits:i=[]};this._workspaceEdit.documentChanges.push(n),o=new ke(i,this._changeAnnotations),this._textEditChanges[t.uri]=o}return o}if(this.initChanges(),void 0===this._workspaceEdit.changes)throw new Error("Workspace edit is not configured for normal text edit changes.");var o;if(!(o=this._textEditChanges[e])){var i=[];this._workspaceEdit.changes[e]=i,o=new ke(i),this._textEditChanges[e]=o}return o},WorkspaceChange.prototype.initDocumentChanges=function(){void 0===this._workspaceEdit.documentChanges&&void 0===this._workspaceEdit.changes&&(this._changeAnnotations=new Te,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())},WorkspaceChange.prototype.initChanges=function(){void 0===this._workspaceEdit.documentChanges&&void 0===this._workspaceEdit.changes&&(this._workspaceEdit.changes=Object.create(null))},WorkspaceChange.prototype.createFile=function(e,t,n){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");var o,i,r;if(w.is(t)||C.is(t)?o=t:n=t,void 0===o?i=P.create(e,n):(r=C.is(o)?o:this._changeAnnotations.manage(o),i=P.create(e,n,r)),this._workspaceEdit.documentChanges.push(i),void 0!==r)return r},WorkspaceChange.prototype.renameFile=function(e,t,n,o){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");var i,r,s;if(w.is(n)||C.is(n)?i=n:o=n,void 0===i?r=x.create(e,t,o):(s=C.is(i)?i:this._changeAnnotations.manage(i),r=x.create(e,t,o,s)),this._workspaceEdit.documentChanges.push(r),void 0!==s)return s},WorkspaceChange.prototype.deleteFile=function(e,t,n){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");var o,i,r;if(w.is(t)||C.is(t)?o=t:n=t,void 0===o?i=_.create(e,n):(r=C.is(o)?o:this._changeAnnotations.manage(o),i=_.create(e,n,r)),this._workspaceEdit.documentChanges.push(i),void 0!==r)return r},WorkspaceChange}();!function(e){e.create=function create(e){return{uri:e}},e.is=function is(e){var t=e;return Re.defined(t)&&Re.string(t.uri)}}(E||(E={})),function(e){e.create=function create(e,t){return{uri:e,version:t}},e.is=function is(e){var t=e;return Re.defined(t)&&Re.string(t.uri)&&Re.integer(t.version)}}(M||(M={})),function(e){e.create=function create(e,t){return{uri:e,version:t}},e.is=function is(e){var t=e;return Re.defined(t)&&Re.string(t.uri)&&(null===t.version||Re.integer(t.version))}}(q||(q={})),function(e){e.create=function create(e,t,n,o){return{uri:e,languageId:t,version:n,text:o}},e.is=function is(e){var t=e;return Re.defined(t)&&Re.string(t.uri)&&Re.string(t.languageId)&&Re.integer(t.version)&&Re.string(t.text)}}(O||(O={})),function(e){e.PlainText="plaintext",e.Markdown="markdown",e.is=function is(t){var n=t;return n===e.PlainText||n===e.Markdown}}(A||(A={})),function(e){e.is=function is(e){var t=e;return Re.objectLiteral(e)&&A.is(t.kind)&&Re.string(t.value)}}(I||(I={})),function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25}(L||(L={})),function(e){e.PlainText=1,e.Snippet=2}(F||(F={})),function(e){e.Deprecated=1}(j||(j={})),function(e){e.create=function create(e,t,n){return{newText:e,insert:t,replace:n}},e.is=function is(e){var t=e;return t&&Re.string(t.newText)&&c.is(t.insert)&&c.is(t.replace)}}($||($={})),function(e){e.asIs=1,e.adjustIndentation=2}(W||(W={})),function(e){e.is=function is(e){var t=e;return t&&(Re.string(t.detail)||void 0===t.detail)&&(Re.string(t.description)||void 0===t.description)}}(U||(U={})),function(e){e.create=function create(e){return{label:e}}}(B||(B={})),function(e){e.create=function create(e,t){return{items:e||[],isIncomplete:!!t}}}(H||(H={})),function(e){e.fromPlainText=function fromPlainText(e){return e.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")},e.is=function is(e){var t=e;return Re.string(t)||Re.objectLiteral(t)&&Re.string(t.language)&&Re.string(t.value)}}(K||(K={})),function(e){e.is=function is(e){var t=e;return!!t&&Re.objectLiteral(t)&&(I.is(t.contents)||K.is(t.contents)||Re.typedArray(t.contents,K.is))&&(void 0===e.range||c.is(e.range))}}(V||(V={})),function(e){e.create=function create(e,t){return t?{label:e,documentation:t}:{label:e}}}(z||(z={})),function(e){e.create=function create(e,t){for(var n=[],o=2;o<arguments.length;o++)n[o-2]=arguments[o];var i={label:e};return Re.defined(t)&&(i.documentation=t),Re.defined(n)?i.parameters=n:i.parameters=[],i}}(Y||(Y={})),function(e){e.Text=1,e.Read=2,e.Write=3}(J||(J={})),function(e){e.create=function create(e,t){var n={range:e};return Re.number(t)&&(n.kind=t),n}}(Q||(Q={})),function(e){e.File=1,e.Module=2,e.Namespace=3,e.Package=4,e.Class=5,e.Method=6,e.Property=7,e.Field=8,e.Constructor=9,e.Enum=10,e.Interface=11,e.Function=12,e.Variable=13,e.Constant=14,e.String=15,e.Number=16,e.Boolean=17,e.Array=18,e.Object=19,e.Key=20,e.Null=21,e.EnumMember=22,e.Struct=23,e.Event=24,e.Operator=25,e.TypeParameter=26}(G||(G={})),function(e){e.Deprecated=1}(X||(X={})),function(e){e.create=function create(e,t,n,o,i){var r={name:e,kind:t,location:{uri:o,range:n}};return i&&(r.containerName=i),r}}(Z||(Z={})),function(e){e.create=function create(e,t,n,o){return void 0!==o?{name:e,kind:t,location:{uri:n,range:o}}:{name:e,kind:t,location:{uri:n}}}}(ee||(ee={})),function(e){e.create=function create(e,t,n,o,i,r){var s={name:e,detail:t,kind:n,range:o,selectionRange:i};return void 0!==r&&(s.children=r),s},e.is=function is(e){var t=e;return t&&Re.string(t.name)&&Re.number(t.kind)&&c.is(t.range)&&c.is(t.selectionRange)&&(void 0===t.detail||Re.string(t.detail))&&(void 0===t.deprecated||Re.boolean(t.deprecated))&&(void 0===t.children||Array.isArray(t.children))&&(void 0===t.tags||Array.isArray(t.tags))}}(te||(te={})),function(e){e.Empty="",e.QuickFix="quickfix",e.Refactor="refactor",e.RefactorExtract="refactor.extract",e.RefactorInline="refactor.inline",e.RefactorRewrite="refactor.rewrite",e.Source="source",e.SourceOrganizeImports="source.organizeImports",e.SourceFixAll="source.fixAll"}(ne||(ne={})),function(e){e.Invoked=1,e.Automatic=2}(oe||(oe={})),function(e){e.create=function create(e,t,n){var o={diagnostics:e};return null!=t&&(o.only=t),null!=n&&(o.triggerKind=n),o},e.is=function is(e){var t=e;return Re.defined(t)&&Re.typedArray(t.diagnostics,S.is)&&(void 0===t.only||Re.typedArray(t.only,Re.string))&&(void 0===t.triggerKind||t.triggerKind===oe.Invoked||t.triggerKind===oe.Automatic)}}(ie||(ie={})),function(e){e.create=function create(e,t,n){var o={title:e},i=!0;return"string"==typeof t?(i=!1,o.kind=t):k.is(t)?o.command=t:o.edit=t,i&&void 0!==n&&(o.kind=n),o},e.is=function is(e){var t=e;return t&&Re.string(t.title)&&(void 0===t.diagnostics||Re.typedArray(t.diagnostics,S.is))&&(void 0===t.kind||Re.string(t.kind))&&(void 0!==t.edit||void 0!==t.command)&&(void 0===t.command||k.is(t.command))&&(void 0===t.isPreferred||Re.boolean(t.isPreferred))&&(void 0===t.edit||N.is(t.edit))}}(re||(re={})),function(e){e.create=function create(e,t){var n={range:e};return Re.defined(t)&&(n.data=t),n},e.is=function is(e){var t=e;return Re.defined(t)&&c.is(t.range)&&(Re.undefined(t.command)||k.is(t.command))}}(se||(se={})),function(e){e.create=function create(e,t){return{tabSize:e,insertSpaces:t}},e.is=function is(e){var t=e;return Re.defined(t)&&Re.uinteger(t.tabSize)&&Re.boolean(t.insertSpaces)}}(ae||(ae={})),function(e){e.create=function create(e,t,n){return{range:e,target:t,data:n}},e.is=function is(e){var t=e;return Re.defined(t)&&c.is(t.range)&&(Re.undefined(t.target)||Re.string(t.target))}}(ce||(ce={})),function(e){e.create=function create(e,t){return{range:e,parent:t}},e.is=function is(t){var n=t;return Re.objectLiteral(n)&&c.is(n.range)&&(void 0===n.parent||e.is(n.parent))}}(le||(le={})),function(e){e.namespace="namespace",e.type="type",e.class="class",e.enum="enum",e.interface="interface",e.struct="struct",e.typeParameter="typeParameter",e.parameter="parameter",e.variable="variable",e.property="property",e.enumMember="enumMember",e.event="event",e.function="function",e.method="method",e.macro="macro",e.keyword="keyword",e.modifier="modifier",e.comment="comment",e.string="string",e.number="number",e.regexp="regexp",e.operator="operator",e.decorator="decorator"}(ue||(ue={})),function(e){e.declaration="declaration",e.definition="definition",e.readonly="readonly",e.static="static",e.deprecated="deprecated",e.abstract="abstract",e.async="async",e.modification="modification",e.documentation="documentation",e.defaultLibrary="defaultLibrary"}(de||(de={})),function(e){e.is=function is(e){var t=e;return Re.objectLiteral(t)&&(void 0===t.resultId||"string"==typeof t.resultId)&&Array.isArray(t.data)&&(0===t.data.length||"number"==typeof t.data[0])}}(fe||(fe={})),function(e){e.create=function create(e,t){return{range:e,text:t}},e.is=function is(e){var t=e;return null!=t&&c.is(t.range)&&Re.string(t.text)}}(pe||(pe={})),function(e){e.create=function create(e,t,n){return{range:e,variableName:t,caseSensitiveLookup:n}},e.is=function is(e){var t=e;return null!=t&&c.is(t.range)&&Re.boolean(t.caseSensitiveLookup)&&(Re.string(t.variableName)||void 0===t.variableName)}}(he||(he={})),function(e){e.create=function create(e,t){return{range:e,expression:t}},e.is=function is(e){var t=e;return null!=t&&c.is(t.range)&&(Re.string(t.expression)||void 0===t.expression)}}(me||(me={})),function(e){e.create=function create(e,t){return{frameId:e,stoppedLocation:t}},e.is=function is(e){var t=e;return Re.defined(t)&&c.is(e.stoppedLocation)}}(ge||(ge={})),function(e){e.Type=1,e.Parameter=2,e.is=function is(e){return 1===e||2===e}}(ye||(ye={})),function(e){e.create=function create(e){return{value:e}},e.is=function is(e){var t=e;return Re.objectLiteral(t)&&(void 0===t.tooltip||Re.string(t.tooltip)||I.is(t.tooltip))&&(void 0===t.location||l.is(t.location))&&(void 0===t.command||k.is(t.command))}}(ve||(ve={})),function(e){e.create=function create(e,t,n){var o={position:e,label:t};return void 0!==n&&(o.kind=n),o},e.is=function is(e){var t=e;return Re.objectLiteral(t)&&a.is(t.position)&&(Re.string(t.label)||Re.typedArray(t.label,ve.is))&&(void 0===t.kind||ye.is(t.kind))&&void 0===t.textEdits||Re.typedArray(t.textEdits,T.is)&&(void 0===t.tooltip||Re.string(t.tooltip)||I.is(t.tooltip))&&(void 0===t.paddingLeft||Re.boolean(t.paddingLeft))&&(void 0===t.paddingRight||Re.boolean(t.paddingRight))}}(be||(be={})),function(e){e.is=function is(e){var t=e;return Re.objectLiteral(t)&&i.is(t.uri)&&Re.string(t.name)}}(Se||(Se={}));var Ce,De=["\n","\r\n","\r"];!function(e){function mergeSort(e,t){if(e.length<=1)return e;var n=e.length/2|0,o=e.slice(0,n),i=e.slice(n);mergeSort(o,t),mergeSort(i,t);for(var r=0,s=0,a=0;r<o.length&&s<i.length;){var c=t(o[r],i[s]);e[a++]=c<=0?o[r++]:i[s++]}for(;r<o.length;)e[a++]=o[r++];for(;s<i.length;)e[a++]=i[s++];return e}e.create=function create(e,t,n,o){return new Pe(e,t,n,o)},e.is=function is(e){var t=e;return!!(Re.defined(t)&&Re.string(t.uri)&&(Re.undefined(t.languageId)||Re.string(t.languageId))&&Re.uinteger(t.lineCount)&&Re.func(t.getText)&&Re.func(t.positionAt)&&Re.func(t.offsetAt))},e.applyEdits=function applyEdits(e,t){for(var n=e.getText(),o=mergeSort(t,(function(e,t){var n=e.range.start.line-t.range.start.line;return 0===n?e.range.start.character-t.range.start.character:n})),i=n.length,r=o.length-1;r>=0;r--){var s=o[r],a=e.offsetAt(s.range.start),c=e.offsetAt(s.range.end);if(!(c<=i))throw new Error("Overlapping edit");n=n.substring(0,a)+s.newText+n.substring(c,n.length),i=a}return n}}(Ce||(Ce={}));var Re,Pe=function(){function FullTextDocument(e,t,n,o){this._uri=e,this._languageId=t,this._version=n,this._content=o,this._lineOffsets=void 0}return Object.defineProperty(FullTextDocument.prototype,"uri",{get:function(){return this._uri},enumerable:!1,configurable:!0}),Object.defineProperty(FullTextDocument.prototype,"languageId",{get:function(){return this._languageId},enumerable:!1,configurable:!0}),Object.defineProperty(FullTextDocument.prototype,"version",{get:function(){return this._version},enumerable:!1,configurable:!0}),FullTextDocument.prototype.getText=function(e){if(e){var t=this.offsetAt(e.start),n=this.offsetAt(e.end);return this._content.substring(t,n)}return this._content},FullTextDocument.prototype.update=function(e,t){this._content=e.text,this._version=t,this._lineOffsets=void 0},FullTextDocument.prototype.getLineOffsets=function(){if(void 0===this._lineOffsets){for(var e=[],t=this._content,n=!0,o=0;o<t.length;o++){n&&(e.push(o),n=!1);var i=t.charAt(o);n="\r"===i||"\n"===i,"\r"===i&&o+1<t.length&&"\n"===t.charAt(o+1)&&o++}n&&t.length>0&&e.push(t.length),this._lineOffsets=e}return this._lineOffsets},FullTextDocument.prototype.positionAt=function(e){e=Math.max(Math.min(e,this._content.length),0);var t=this.getLineOffsets(),n=0,o=t.length;if(0===o)return a.create(0,e);for(;n<o;){var i=Math.floor((n+o)/2);t[i]>e?o=i:n=i+1}var r=n-1;return a.create(r,e-t[r])},FullTextDocument.prototype.offsetAt=function(e){var t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;var n=t[e.line],o=e.line+1<t.length?t[e.line+1]:this._content.length;return Math.max(Math.min(n+e.character,o),n)},Object.defineProperty(FullTextDocument.prototype,"lineCount",{get:function(){return this.getLineOffsets().length},enumerable:!1,configurable:!0}),FullTextDocument}();!function(e){var t=Object.prototype.toString;e.defined=function defined(e){return void 0!==e},e.undefined=function undefined(e){return void 0===e},e.boolean=function boolean(e){return!0===e||!1===e},e.string=function string(e){return"[object String]"===t.call(e)},e.number=function number(e){return"[object Number]"===t.call(e)},e.numberRange=function numberRange(e,n,o){return"[object Number]"===t.call(e)&&n<=e&&e<=o},e.integer=function integer(e){return"[object Number]"===t.call(e)&&-2147483648<=e&&e<=2147483647},e.uinteger=function uinteger(e){return"[object Number]"===t.call(e)&&0<=e&&e<=2147483647},e.func=function func(e){return"[object Function]"===t.call(e)},e.objectLiteral=function objectLiteral(e){return null!==e&&"object"==typeof e},e.typedArray=function typedArray(e,t){return Array.isArray(e)&&e.every(t)}}(Re||(Re={}))},23870:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ProgressType=t.ProgressToken=t.createMessageConnection=t.NullLogger=t.ConnectionOptions=t.ConnectionStrategy=t.AbstractMessageBuffer=t.WriteableStreamMessageWriter=t.AbstractMessageWriter=t.MessageWriter=t.ReadableStreamMessageReader=t.AbstractMessageReader=t.MessageReader=t.SharedArrayReceiverStrategy=t.SharedArraySenderStrategy=t.CancellationToken=t.CancellationTokenSource=t.Emitter=t.Event=t.Disposable=t.LRUCache=t.Touch=t.LinkedMap=t.ParameterStructures=t.NotificationType9=t.NotificationType8=t.NotificationType7=t.NotificationType6=t.NotificationType5=t.NotificationType4=t.NotificationType3=t.NotificationType2=t.NotificationType1=t.NotificationType0=t.NotificationType=t.ErrorCodes=t.ResponseError=t.RequestType9=t.RequestType8=t.RequestType7=t.RequestType6=t.RequestType5=t.RequestType4=t.RequestType3=t.RequestType2=t.RequestType1=t.RequestType0=t.RequestType=t.Message=t.RAL=void 0,t.MessageStrategy=t.CancellationStrategy=t.CancellationSenderStrategy=t.CancellationReceiverStrategy=t.ConnectionError=t.ConnectionErrors=t.LogTraceNotification=t.SetTraceNotification=t.TraceFormat=t.TraceValues=t.Trace=void 0;const o=n(20839);Object.defineProperty(t,"Message",{enumerable:!0,get:function(){return o.Message}}),Object.defineProperty(t,"RequestType",{enumerable:!0,get:function(){return o.RequestType}}),Object.defineProperty(t,"RequestType0",{enumerable:!0,get:function(){return o.RequestType0}}),Object.defineProperty(t,"RequestType1",{enumerable:!0,get:function(){return o.RequestType1}}),Object.defineProperty(t,"RequestType2",{enumerable:!0,get:function(){return o.RequestType2}}),Object.defineProperty(t,"RequestType3",{enumerable:!0,get:function(){return o.RequestType3}}),Object.defineProperty(t,"RequestType4",{enumerable:!0,get:function(){return o.RequestType4}}),Object.defineProperty(t,"RequestType5",{enumerable:!0,get:function(){return o.RequestType5}}),Object.defineProperty(t,"RequestType6",{enumerable:!0,get:function(){return o.RequestType6}}),Object.defineProperty(t,"RequestType7",{enumerable:!0,get:function(){return o.RequestType7}}),Object.defineProperty(t,"RequestType8",{enumerable:!0,get:function(){return o.RequestType8}}),Object.defineProperty(t,"RequestType9",{enumerable:!0,get:function(){return o.RequestType9}}),Object.defineProperty(t,"ResponseError",{enumerable:!0,get:function(){return o.ResponseError}}),Object.defineProperty(t,"ErrorCodes",{enumerable:!0,get:function(){return o.ErrorCodes}}),Object.defineProperty(t,"NotificationType",{enumerable:!0,get:function(){return o.NotificationType}}),Object.defineProperty(t,"NotificationType0",{enumerable:!0,get:function(){return o.NotificationType0}}),Object.defineProperty(t,"NotificationType1",{enumerable:!0,get:function(){return o.NotificationType1}}),Object.defineProperty(t,"NotificationType2",{enumerable:!0,get:function(){return o.NotificationType2}}),Object.defineProperty(t,"NotificationType3",{enumerable:!0,get:function(){return o.NotificationType3}}),Object.defineProperty(t,"NotificationType4",{enumerable:!0,get:function(){return o.NotificationType4}}),Object.defineProperty(t,"NotificationType5",{enumerable:!0,get:function(){return o.NotificationType5}}),Object.defineProperty(t,"NotificationType6",{enumerable:!0,get:function(){return o.NotificationType6}}),Object.defineProperty(t,"NotificationType7",{enumerable:!0,get:function(){return o.NotificationType7}}),Object.defineProperty(t,"NotificationType8",{enumerable:!0,get:function(){return o.NotificationType8}}),Object.defineProperty(t,"NotificationType9",{enumerable:!0,get:function(){return o.NotificationType9}}),Object.defineProperty(t,"ParameterStructures",{enumerable:!0,get:function(){return o.ParameterStructures}});const i=n(96184);Object.defineProperty(t,"LinkedMap",{enumerable:!0,get:function(){return i.LinkedMap}}),Object.defineProperty(t,"LRUCache",{enumerable:!0,get:function(){return i.LRUCache}}),Object.defineProperty(t,"Touch",{enumerable:!0,get:function(){return i.Touch}});const r=n(83911);Object.defineProperty(t,"Disposable",{enumerable:!0,get:function(){return r.Disposable}});const s=n(27135);Object.defineProperty(t,"Event",{enumerable:!0,get:function(){return s.Event}}),Object.defineProperty(t,"Emitter",{enumerable:!0,get:function(){return s.Emitter}});const a=n(13881);Object.defineProperty(t,"CancellationTokenSource",{enumerable:!0,get:function(){return a.CancellationTokenSource}}),Object.defineProperty(t,"CancellationToken",{enumerable:!0,get:function(){return a.CancellationToken}});const c=n(98211);Object.defineProperty(t,"SharedArraySenderStrategy",{enumerable:!0,get:function(){return c.SharedArraySenderStrategy}}),Object.defineProperty(t,"SharedArrayReceiverStrategy",{enumerable:!0,get:function(){return c.SharedArrayReceiverStrategy}});const l=n(56525);Object.defineProperty(t,"MessageReader",{enumerable:!0,get:function(){return l.MessageReader}}),Object.defineProperty(t,"AbstractMessageReader",{enumerable:!0,get:function(){return l.AbstractMessageReader}}),Object.defineProperty(t,"ReadableStreamMessageReader",{enumerable:!0,get:function(){return l.ReadableStreamMessageReader}});const u=n(96654);Object.defineProperty(t,"MessageWriter",{enumerable:!0,get:function(){return u.MessageWriter}}),Object.defineProperty(t,"AbstractMessageWriter",{enumerable:!0,get:function(){return u.AbstractMessageWriter}}),Object.defineProperty(t,"WriteableStreamMessageWriter",{enumerable:!0,get:function(){return u.WriteableStreamMessageWriter}});const d=n(75530);Object.defineProperty(t,"AbstractMessageBuffer",{enumerable:!0,get:function(){return d.AbstractMessageBuffer}});const f=n(61343);Object.defineProperty(t,"ConnectionStrategy",{enumerable:!0,get:function(){return f.ConnectionStrategy}}),Object.defineProperty(t,"ConnectionOptions",{enumerable:!0,get:function(){return f.ConnectionOptions}}),Object.defineProperty(t,"NullLogger",{enumerable:!0,get:function(){return f.NullLogger}}),Object.defineProperty(t,"createMessageConnection",{enumerable:!0,get:function(){return f.createMessageConnection}}),Object.defineProperty(t,"ProgressToken",{enumerable:!0,get:function(){return f.ProgressToken}}),Object.defineProperty(t,"ProgressType",{enumerable:!0,get:function(){return f.ProgressType}}),Object.defineProperty(t,"Trace",{enumerable:!0,get:function(){return f.Trace}}),Object.defineProperty(t,"TraceValues",{enumerable:!0,get:function(){return f.TraceValues}}),Object.defineProperty(t,"TraceFormat",{enumerable:!0,get:function(){return f.TraceFormat}}),Object.defineProperty(t,"SetTraceNotification",{enumerable:!0,get:function(){return f.SetTraceNotification}}),Object.defineProperty(t,"LogTraceNotification",{enumerable:!0,get:function(){return f.LogTraceNotification}}),Object.defineProperty(t,"ConnectionErrors",{enumerable:!0,get:function(){return f.ConnectionErrors}}),Object.defineProperty(t,"ConnectionError",{enumerable:!0,get:function(){return f.ConnectionError}}),Object.defineProperty(t,"CancellationReceiverStrategy",{enumerable:!0,get:function(){return f.CancellationReceiverStrategy}}),Object.defineProperty(t,"CancellationSenderStrategy",{enumerable:!0,get:function(){return f.CancellationSenderStrategy}}),Object.defineProperty(t,"CancellationStrategy",{enumerable:!0,get:function(){return f.CancellationStrategy}}),Object.defineProperty(t,"MessageStrategy",{enumerable:!0,get:function(){return f.MessageStrategy}});const p=n(30147);t.RAL=p.default},13881:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CancellationTokenSource=t.CancellationToken=void 0;const o=n(30147),i=n(67574),r=n(27135);var s;!function(e){e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:r.Event.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:r.Event.None}),e.is=function is(t){const n=t;return n&&(n===e.None||n===e.Cancelled||i.boolean(n.isCancellationRequested)&&!!n.onCancellationRequested)}}(s=t.CancellationToken||(t.CancellationToken={}));const a=Object.freeze((function(e,t){const n=(0,o.default)().timer.setTimeout(e.bind(t),0);return{dispose(){n.dispose()}}}));class MutableToken{constructor(){this._isCancelled=!1}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?a:(this._emitter||(this._emitter=new r.Emitter),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=void 0)}}t.CancellationTokenSource=class CancellationTokenSource{get token(){return this._token||(this._token=new MutableToken),this._token}cancel(){this._token?this._token.cancel():this._token=s.Cancelled}dispose(){this._token?this._token instanceof MutableToken&&this._token.dispose():this._token=s.None}}},61343:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.createMessageConnection=t.ConnectionOptions=t.MessageStrategy=t.CancellationStrategy=t.CancellationSenderStrategy=t.CancellationReceiverStrategy=t.RequestCancellationReceiverStrategy=t.IdCancellationReceiverStrategy=t.ConnectionStrategy=t.ConnectionError=t.ConnectionErrors=t.LogTraceNotification=t.SetTraceNotification=t.TraceFormat=t.TraceValues=t.Trace=t.NullLogger=t.ProgressType=t.ProgressToken=void 0;const o=n(30147),i=n(67574),r=n(20839),s=n(96184),a=n(27135),c=n(13881);var l,u,d,f,p,h,m,g,y,v,b,S,k,T,w,C,D;!function(e){e.type=new r.NotificationType("$/cancelRequest")}(l||(l={})),function(e){e.is=function is(e){return"string"==typeof e||"number"==typeof e}}(u=t.ProgressToken||(t.ProgressToken={})),function(e){e.type=new r.NotificationType("$/progress")}(d||(d={}));t.ProgressType=class ProgressType{constructor(){}},function(e){e.is=function is(e){return i.func(e)}}(f||(f={})),t.NullLogger=Object.freeze({error:()=>{},warn:()=>{},info:()=>{},log:()=>{}}),function(e){e[e.Off=0]="Off",e[e.Messages=1]="Messages",e[e.Compact=2]="Compact",e[e.Verbose=3]="Verbose"}(p=t.Trace||(t.Trace={})),function(e){e.Off="off",e.Messages="messages",e.Compact="compact",e.Verbose="verbose"}(t.TraceValues||(t.TraceValues={})),function(e){e.fromString=function fromString(t){if(!i.string(t))return e.Off;switch(t=t.toLowerCase()){case"off":default:return e.Off;case"messages":return e.Messages;case"compact":return e.Compact;case"verbose":return e.Verbose}},e.toString=function toString(t){switch(t){case e.Off:return"off";case e.Messages:return"messages";case e.Compact:return"compact";case e.Verbose:return"verbose";default:return"off"}}}(p=t.Trace||(t.Trace={})),function(e){e.Text="text",e.JSON="json"}(t.TraceFormat||(t.TraceFormat={})),function(e){e.fromString=function fromString(t){return i.string(t)&&"json"===(t=t.toLowerCase())?e.JSON:e.Text}}(h=t.TraceFormat||(t.TraceFormat={})),function(e){e.type=new r.NotificationType("$/setTrace")}(m=t.SetTraceNotification||(t.SetTraceNotification={})),function(e){e.type=new r.NotificationType("$/logTrace")}(g=t.LogTraceNotification||(t.LogTraceNotification={})),function(e){e[e.Closed=1]="Closed",e[e.Disposed=2]="Disposed",e[e.AlreadyListening=3]="AlreadyListening"}(y=t.ConnectionErrors||(t.ConnectionErrors={}));class ConnectionError extends Error{constructor(e,t){super(t),this.code=e,Object.setPrototypeOf(this,ConnectionError.prototype)}}t.ConnectionError=ConnectionError,function(e){e.is=function is(e){const t=e;return t&&i.func(t.cancelUndispatched)}}(v=t.ConnectionStrategy||(t.ConnectionStrategy={})),function(e){e.is=function is(e){const t=e;return t&&(void 0===t.kind||"id"===t.kind)&&i.func(t.createCancellationTokenSource)&&(void 0===t.dispose||i.func(t.dispose))}}(b=t.IdCancellationReceiverStrategy||(t.IdCancellationReceiverStrategy={})),function(e){e.is=function is(e){const t=e;return t&&"request"===t.kind&&i.func(t.createCancellationTokenSource)&&(void 0===t.dispose||i.func(t.dispose))}}(S=t.RequestCancellationReceiverStrategy||(t.RequestCancellationReceiverStrategy={})),function(e){e.Message=Object.freeze({createCancellationTokenSource:e=>new c.CancellationTokenSource}),e.is=function is(e){return b.is(e)||S.is(e)}}(k=t.CancellationReceiverStrategy||(t.CancellationReceiverStrategy={})),function(e){e.Message=Object.freeze({sendCancellation:(e,t)=>e.sendNotification(l.type,{id:t}),cleanup(e){}}),e.is=function is(e){const t=e;return t&&i.func(t.sendCancellation)&&i.func(t.cleanup)}}(T=t.CancellationSenderStrategy||(t.CancellationSenderStrategy={})),function(e){e.Message=Object.freeze({receiver:k.Message,sender:T.Message}),e.is=function is(e){const t=e;return t&&k.is(t.receiver)&&T.is(t.sender)}}(w=t.CancellationStrategy||(t.CancellationStrategy={})),function(e){e.is=function is(e){const t=e;return t&&i.func(t.handleMessage)}}(C=t.MessageStrategy||(t.MessageStrategy={})),function(e){e.is=function is(e){const t=e;return t&&(w.is(t.cancellationStrategy)||v.is(t.connectionStrategy)||C.is(t.messageStrategy))}}(t.ConnectionOptions||(t.ConnectionOptions={})),function(e){e[e.New=1]="New",e[e.Listening=2]="Listening",e[e.Closed=3]="Closed",e[e.Disposed=4]="Disposed"}(D||(D={})),t.createMessageConnection=function createMessageConnection(e,n,v,S){const k=void 0!==v?v:t.NullLogger;let T=0,R=0,P=0;const x="2.0";let _;const N=new Map;let E;const M=new Map,q=new Map;let O,A,I=new s.LinkedMap,L=new Map,F=new Set,j=new Map,$=p.Off,W=h.Text,U=D.New;const B=new a.Emitter,H=new a.Emitter,K=new a.Emitter,V=new a.Emitter,z=new a.Emitter,Y=S&&S.cancellationStrategy?S.cancellationStrategy:w.Message;function createRequestQueueKey(e){if(null===e)throw new Error("Can't send requests with id null since the response can't be correlated.");return"req-"+e.toString()}function addMessageToQueue(e,t){r.Message.isRequest(t)?e.set(createRequestQueueKey(t.id),t):r.Message.isResponse(t)?e.set(function createResponseQueueKey(e){return null===e?"res-unknown-"+(++P).toString():"res-"+e.toString()}(t.id),t):e.set(function createNotificationQueueKey(){return"not-"+(++R).toString()}(),t)}function cancelUndispatched(e){}function isListening(){return U===D.Listening}function isClosed(){return U===D.Closed}function isDisposed(){return U===D.Disposed}function closeHandler(){U!==D.New&&U!==D.Listening||(U=D.Closed,H.fire(void 0))}function triggerMessageQueue(){O||0===I.size||(O=(0,o.default)().timer.setImmediate((()=>{O=void 0,function processMessageQueue(){if(0===I.size)return;const e=I.shift();try{const t=S?.messageStrategy;C.is(t)?t.handleMessage(e,handleMessage):handleMessage(e)}finally{triggerMessageQueue()}}()})))}function handleMessage(e){r.Message.isRequest(e)?function handleRequest(e){if(isDisposed())return;function reply(t,o,i){const s={jsonrpc:x,id:e.id};t instanceof r.ResponseError?s.error=t.toJson():s.result=void 0===t?null:t,traceSendingResponse(s,o,i),n.write(s).catch((()=>k.error("Sending response failed.")))}function replyError(t,o,i){const r={jsonrpc:x,id:e.id,error:t.toJson()};traceSendingResponse(r,o,i),n.write(r).catch((()=>k.error("Sending response failed.")))}function replySuccess(t,o,i){void 0===t&&(t=null);const r={jsonrpc:x,id:e.id,result:t};traceSendingResponse(r,o,i),n.write(r).catch((()=>k.error("Sending response failed.")))}!function traceReceivedRequest(e){if($===p.Off||!A)return;if(W===h.Text){let t;$!==p.Verbose&&$!==p.Compact||!e.params||(t=`Params: ${stringifyTrace(e.params)}\n\n`),A.log(`Received request '${e.method} - (${e.id})'.`,t)}else logLSPMessage("receive-request",e)}(e);const t=N.get(e.method);let o,s;t&&(o=t.type,s=t.handler);const a=Date.now();if(s||_){const t=e.id??String(Date.now()),n=b.is(Y.receiver)?Y.receiver.createCancellationTokenSource(t):Y.receiver.createCancellationTokenSource(e);null!==e.id&&F.has(e.id)&&n.cancel(),null!==e.id&&j.set(t,n);try{let c;if(s)if(void 0===e.params){if(void 0!==o&&0!==o.numberOfParams)return void replyError(new r.ResponseError(r.ErrorCodes.InvalidParams,`Request ${e.method} defines ${o.numberOfParams} params but received none.`),e.method,a);c=s(n.token)}else if(Array.isArray(e.params)){if(void 0!==o&&o.parameterStructures===r.ParameterStructures.byName)return void replyError(new r.ResponseError(r.ErrorCodes.InvalidParams,`Request ${e.method} defines parameters by name but received parameters by position`),e.method,a);c=s(...e.params,n.token)}else{if(void 0!==o&&o.parameterStructures===r.ParameterStructures.byPosition)return void replyError(new r.ResponseError(r.ErrorCodes.InvalidParams,`Request ${e.method} defines parameters by position but received parameters by name`),e.method,a);c=s(e.params,n.token)}else _&&(c=_(e.method,e.params,n.token));const l=c;c?l.then?l.then((n=>{j.delete(t),reply(n,e.method,a)}),(n=>{j.delete(t),n instanceof r.ResponseError?replyError(n,e.method,a):n&&i.string(n.message)?replyError(new r.ResponseError(r.ErrorCodes.InternalError,`Request ${e.method} failed with message: ${n.message}`),e.method,a):replyError(new r.ResponseError(r.ErrorCodes.InternalError,`Request ${e.method} failed unexpectedly without providing any details.`),e.method,a)})):(j.delete(t),reply(c,e.method,a)):(j.delete(t),replySuccess(c,e.method,a))}catch(n){j.delete(t),n instanceof r.ResponseError?reply(n,e.method,a):n&&i.string(n.message)?replyError(new r.ResponseError(r.ErrorCodes.InternalError,`Request ${e.method} failed with message: ${n.message}`),e.method,a):replyError(new r.ResponseError(r.ErrorCodes.InternalError,`Request ${e.method} failed unexpectedly without providing any details.`),e.method,a)}}else replyError(new r.ResponseError(r.ErrorCodes.MethodNotFound,`Unhandled method ${e.method}`),e.method,a)}(e):r.Message.isNotification(e)?function handleNotification(e){if(isDisposed())return;let t,n;if(e.method===l.type.method){const t=e.params.id;return F.delete(t),void traceReceivedNotification(e)}{const o=M.get(e.method);o&&(n=o.handler,t=o.type)}if(n||E)try{if(traceReceivedNotification(e),n)if(void 0===e.params)void 0!==t&&0!==t.numberOfParams&&t.parameterStructures!==r.ParameterStructures.byName&&k.error(`Notification ${e.method} defines ${t.numberOfParams} params but received none.`),n();else if(Array.isArray(e.params)){const o=e.params;e.method===d.type.method&&2===o.length&&u.is(o[0])?n({token:o[0],value:o[1]}):(void 0!==t&&(t.parameterStructures===r.ParameterStructures.byName&&k.error(`Notification ${e.method} defines parameters by name but received parameters by position`),t.numberOfParams!==e.params.length&&k.error(`Notification ${e.method} defines ${t.numberOfParams} params but received ${o.length} arguments`)),n(...o))}else void 0!==t&&t.parameterStructures===r.ParameterStructures.byPosition&&k.error(`Notification ${e.method} defines parameters by position but received parameters by name`),n(e.params);else E&&E(e.method,e.params)}catch(t){t.message?k.error(`Notification handler '${e.method}' failed with message: ${t.message}`):k.error(`Notification handler '${e.method}' failed unexpectedly.`)}else K.fire(e)}(e):r.Message.isResponse(e)?function handleResponse(e){if(isDisposed())return;if(null===e.id)e.error?k.error(`Received response message without id: Error is: \n${JSON.stringify(e.error,void 0,4)}`):k.error("Received response message without id. No further error information provided.");else{const t=e.id,n=L.get(t);if(function traceReceivedResponse(e,t){if($===p.Off||!A)return;if(W===h.Text){let n;if($!==p.Verbose&&$!==p.Compact||(e.error&&e.error.data?n=`Error data: ${stringifyTrace(e.error.data)}\n\n`:e.result?n=`Result: ${stringifyTrace(e.result)}\n\n`:void 0===e.error&&(n="No result returned.\n\n")),t){const o=e.error?` Request failed: ${e.error.message} (${e.error.code}).`:"";A.log(`Received response '${t.method} - (${e.id})' in ${Date.now()-t.timerStart}ms.${o}`,n)}else A.log(`Received response ${e.id} without active response promise.`,n)}else logLSPMessage("receive-response",e)}(e,n),void 0!==n){L.delete(t);try{if(e.error){const t=e.error;n.reject(new r.ResponseError(t.code,t.message,t.data))}else{if(void 0===e.result)throw new Error("Should never happen.");n.resolve(e.result)}}catch(e){e.message?k.error(`Response handler '${n.method}' failed with message: ${e.message}`):k.error(`Response handler '${n.method}' failed unexpectedly.`)}}}}(e):function handleInvalidMessage(e){if(!e)return void k.error("Received empty message.");k.error(`Received message which is neither a response nor a notification message:\n${JSON.stringify(e,null,4)}`);const t=e;if(i.string(t.id)||i.number(t.id)){const e=t.id,n=L.get(e);n&&n.reject(new Error("The received response has neither a result nor an error property."))}}(e)}e.onClose(closeHandler),e.onError((function readErrorHandler(e){B.fire([e,void 0,void 0])})),n.onClose(closeHandler),n.onError((function writeErrorHandler(e){B.fire(e)}));const callback=e=>{try{if(r.Message.isNotification(e)&&e.method===l.type.method){const t=e.params.id,o=createRequestQueueKey(t),i=I.get(o);if(r.Message.isRequest(i)){const r=S?.connectionStrategy,s=r&&r.cancelUndispatched?r.cancelUndispatched(i,cancelUndispatched):void 0;if(s&&(void 0!==s.error||void 0!==s.result))return I.delete(o),j.delete(t),s.id=i.id,traceSendingResponse(s,e.method,Date.now()),void n.write(s).catch((()=>k.error("Sending response for canceled message failed.")))}const s=j.get(t);if(void 0!==s)return s.cancel(),void traceReceivedNotification(e);F.add(t)}addMessageToQueue(I,e)}finally{triggerMessageQueue()}};function stringifyTrace(e){if(null!=e)switch($){case p.Verbose:return JSON.stringify(e,null,4);case p.Compact:return JSON.stringify(e);default:return}}function traceSendingResponse(e,t,n){if($!==p.Off&&A)if(W===h.Text){let o;$!==p.Verbose&&$!==p.Compact||(e.error&&e.error.data?o=`Error data: ${stringifyTrace(e.error.data)}\n\n`:e.result?o=`Result: ${stringifyTrace(e.result)}\n\n`:void 0===e.error&&(o="No result returned.\n\n")),A.log(`Sending response '${t} - (${e.id})'. Processing request took ${Date.now()-n}ms`,o)}else logLSPMessage("send-response",e)}function traceReceivedNotification(e){if($!==p.Off&&A&&e.method!==g.type.method)if(W===h.Text){let t;$!==p.Verbose&&$!==p.Compact||(t=e.params?`Params: ${stringifyTrace(e.params)}\n\n`:"No parameters provided.\n\n"),A.log(`Received notification '${e.method}'.`,t)}else logLSPMessage("receive-notification",e)}function logLSPMessage(e,t){if(!A||$===p.Off)return;const n={isLSPMessage:!0,type:e,message:t,timestamp:Date.now()};A.log(n)}function throwIfClosedOrDisposed(){if(isClosed())throw new ConnectionError(y.Closed,"Connection is closed.");if(isDisposed())throw new ConnectionError(y.Disposed,"Connection is disposed.")}function undefinedToNull(e){return void 0===e?null:e}function nullToUndefined(e){return null===e?void 0:e}function isNamedParam(e){return null!=e&&!Array.isArray(e)&&"object"==typeof e}function computeSingleParam(e,t){switch(e){case r.ParameterStructures.auto:return isNamedParam(t)?nullToUndefined(t):[undefinedToNull(t)];case r.ParameterStructures.byName:if(!isNamedParam(t))throw new Error("Received parameters by name but param is not an object literal.");return nullToUndefined(t);case r.ParameterStructures.byPosition:return[undefinedToNull(t)];default:throw new Error(`Unknown parameter structure ${e.toString()}`)}}function computeMessageParams(e,t){let n;const o=e.numberOfParams;switch(o){case 0:n=void 0;break;case 1:n=computeSingleParam(e.parameterStructures,t[0]);break;default:n=[];for(let e=0;e<t.length&&e<o;e++)n.push(undefinedToNull(t[e]));if(t.length<o)for(let e=t.length;e<o;e++)n.push(null)}return n}const J={sendNotification:(e,...t)=>{let o,s;if(throwIfClosedOrDisposed(),i.string(e)){o=e;const n=t[0];let i=0,a=r.ParameterStructures.auto;r.ParameterStructures.is(n)&&(i=1,a=n);let c=t.length;const l=c-i;switch(l){case 0:s=void 0;break;case 1:s=computeSingleParam(a,t[i]);break;default:if(a===r.ParameterStructures.byName)throw new Error(`Received ${l} parameters for 'by Name' notification parameter structure.`);s=t.slice(i,c).map((e=>undefinedToNull(e)))}}else{const n=t;o=e.method,s=computeMessageParams(e,n)}const a={jsonrpc:x,method:o,params:s};return function traceSendingNotification(e){if($!==p.Off&&A)if(W===h.Text){let t;$!==p.Verbose&&$!==p.Compact||(t=e.params?`Params: ${stringifyTrace(e.params)}\n\n`:"No parameters provided.\n\n"),A.log(`Sending notification '${e.method}'.`,t)}else logLSPMessage("send-notification",e)}(a),n.write(a).catch((e=>{throw k.error("Sending notification failed."),e}))},onNotification:(e,t)=>{let n;return throwIfClosedOrDisposed(),i.func(e)?E=e:t&&(i.string(e)?(n=e,M.set(e,{type:void 0,handler:t})):(n=e.method,M.set(e.method,{type:e,handler:t}))),{dispose:()=>{void 0!==n?M.delete(n):E=void 0}}},onProgress:(e,t,n)=>{if(q.has(t))throw new Error(`Progress handler for token ${t} already registered`);return q.set(t,n),{dispose:()=>{q.delete(t)}}},sendProgress:(e,t,n)=>J.sendNotification(d.type,{token:t,value:n}),onUnhandledProgress:V.event,sendRequest:(e,...t)=>{let o,s,a;if(throwIfClosedOrDisposed(),function throwIfNotListening(){if(!isListening())throw new Error("Call listen() first.")}(),i.string(e)){o=e;const n=t[0],i=t[t.length-1];let l=0,u=r.ParameterStructures.auto;r.ParameterStructures.is(n)&&(l=1,u=n);let d=t.length;c.CancellationToken.is(i)&&(d-=1,a=i);const f=d-l;switch(f){case 0:s=void 0;break;case 1:s=computeSingleParam(u,t[l]);break;default:if(u===r.ParameterStructures.byName)throw new Error(`Received ${f} parameters for 'by Name' request parameter structure.`);s=t.slice(l,d).map((e=>undefinedToNull(e)))}}else{const n=t;o=e.method,s=computeMessageParams(e,n);const i=e.numberOfParams;a=c.CancellationToken.is(n[i])?n[i]:void 0}const l=T++;let u;a&&(u=a.onCancellationRequested((()=>{const e=Y.sender.sendCancellation(J,l);return void 0===e?(k.log(`Received no promise from cancellation strategy when cancelling id ${l}`),Promise.resolve()):e.catch((()=>{k.log(`Sending cancellation messages for id ${l} failed`)}))})));const d={jsonrpc:x,id:l,method:o,params:s};return function traceSendingRequest(e){if($!==p.Off&&A)if(W===h.Text){let t;$!==p.Verbose&&$!==p.Compact||!e.params||(t=`Params: ${stringifyTrace(e.params)}\n\n`),A.log(`Sending request '${e.method} - (${e.id})'.`,t)}else logLSPMessage("send-request",e)}(d),"function"==typeof Y.sender.enableCancellation&&Y.sender.enableCancellation(d),new Promise((async(e,t)=>{const i={method:o,timerStart:Date.now(),resolve:t=>{e(t),Y.sender.cleanup(l),u?.dispose()},reject:e=>{t(e),Y.sender.cleanup(l),u?.dispose()}};try{await n.write(d),L.set(l,i)}catch(e){throw k.error("Sending request failed."),i.reject(new r.ResponseError(r.ErrorCodes.MessageWriteError,e.message?e.message:"Unknown reason")),e}}))},onRequest:(e,t)=>{throwIfClosedOrDisposed();let n=null;return f.is(e)?(n=void 0,_=e):i.string(e)?(n=null,void 0!==t&&(n=e,N.set(e,{handler:t,type:void 0}))):void 0!==t&&(n=e.method,N.set(e.method,{type:e,handler:t})),{dispose:()=>{null!==n&&(void 0!==n?N.delete(n):_=void 0)}}},hasPendingResponse:()=>L.size>0,trace:async(e,t,n)=>{let o=!1,r=h.Text;void 0!==n&&(i.boolean(n)?o=n:(o=n.sendNotification||!1,r=n.traceFormat||h.Text)),$=e,W=r,A=$===p.Off?void 0:t,!o||isClosed()||isDisposed()||await J.sendNotification(m.type,{value:p.toString(e)})},onError:B.event,onClose:H.event,onUnhandledNotification:K.event,onDispose:z.event,end:()=>{n.end()},dispose:()=>{if(isDisposed())return;U=D.Disposed,z.fire(void 0);const t=new r.ResponseError(r.ErrorCodes.PendingResponseRejected,"Pending response rejected since connection got disposed");for(const e of L.values())e.reject(t);L=new Map,j=new Map,F=new Set,I=new s.LinkedMap,i.func(n.dispose)&&n.dispose(),i.func(e.dispose)&&e.dispose()},listen:()=>{throwIfClosedOrDisposed(),function throwIfListening(){if(isListening())throw new ConnectionError(y.AlreadyListening,"Connection is already listening")}(),U=D.Listening,e.listen(callback)},inspect:()=>{(0,o.default)().console.log("inspect")}};return J.onNotification(g.type,(e=>{if($===p.Off||!A)return;const t=$===p.Verbose||$===p.Compact;A.log(e.message,t?e.verbose:void 0)})),J.onNotification(d.type,(e=>{const t=q.get(e.token);t?t(e.value):V.fire(e)})),J}},83911:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Disposable=void 0,function(e){e.create=function create(e){return{dispose:e}}}(t.Disposable||(t.Disposable={}))},27135:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Emitter=t.Event=void 0;const o=n(30147);!function(e){const t={dispose(){}};e.None=function(){return t}}(t.Event||(t.Event={}));class CallbackList{add(e,t=null,n){this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(e),this._contexts.push(t),Array.isArray(n)&&n.push({dispose:()=>this.remove(e,t)})}remove(e,t=null){if(!this._callbacks)return;let n=!1;for(let o=0,i=this._callbacks.length;o<i;o++)if(this._callbacks[o]===e){if(this._contexts[o]===t)return this._callbacks.splice(o,1),void this._contexts.splice(o,1);n=!0}if(n)throw new Error("When adding a listener with a context, you should remove it with the same context")}invoke(...e){if(!this._callbacks)return[];const t=[],n=this._callbacks.slice(0),i=this._contexts.slice(0);for(let r=0,s=n.length;r<s;r++)try{t.push(n[r].apply(i[r],e))}catch(e){(0,o.default)().console.error(e)}return t}isEmpty(){return!this._callbacks||0===this._callbacks.length}dispose(){this._callbacks=void 0,this._contexts=void 0}}class Emitter{constructor(e){this._options=e}get event(){return this._event||(this._event=(e,t,n)=>{this._callbacks||(this._callbacks=new CallbackList),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(e,t);const o={dispose:()=>{this._callbacks&&(this._callbacks.remove(e,t),o.dispose=Emitter._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this))}};return Array.isArray(n)&&n.push(o),o}),this._event}fire(e){this._callbacks&&this._callbacks.invoke.call(this._callbacks,e)}dispose(){this._callbacks&&(this._callbacks.dispose(),this._callbacks=void 0)}}t.Emitter=Emitter,Emitter._noop=function(){}},67574:(e,t)=>{function string(e){return"string"==typeof e||e instanceof String}function array(e){return Array.isArray(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.stringArray=t.array=t.func=t.error=t.number=t.string=t.boolean=void 0,t.boolean=function boolean(e){return!0===e||!1===e},t.string=string,t.number=function number(e){return"number"==typeof e||e instanceof Number},t.error=function error(e){return e instanceof Error},t.func=function func(e){return"function"==typeof e},t.array=array,t.stringArray=function stringArray(e){return array(e)&&e.every((e=>string(e)))}},96184:(e,t)=>{var n,o;Object.defineProperty(t,"__esModule",{value:!0}),t.LRUCache=t.LinkedMap=t.Touch=void 0,function(e){e.None=0,e.First=1,e.AsOld=e.First,e.Last=2,e.AsNew=e.Last}(o=t.Touch||(t.Touch={}));class LinkedMap{constructor(){this[n]="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(e){return this._map.has(e)}get(e,t=o.None){const n=this._map.get(e);if(n)return t!==o.None&&this.touch(n,t),n.value}set(e,t,n=o.None){let i=this._map.get(e);if(i)i.value=t,n!==o.None&&this.touch(i,n);else{switch(i={key:e,value:t,next:void 0,previous:void 0},n){case o.None:this.addItemLast(i);break;case o.First:this.addItemFirst(i);break;case o.Last:default:this.addItemLast(i)}this._map.set(e,i),this._size++}return this}delete(e){return!!this.remove(e)}remove(e){const t=this._map.get(e);if(t)return this._map.delete(e),this.removeItem(t),this._size--,t.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");const e=this._head;return this._map.delete(e.key),this.removeItem(e),this._size--,e.value}forEach(e,t){const n=this._state;let o=this._head;for(;o;){if(t?e.bind(t)(o.value,o.key,this):e(o.value,o.key,this),this._state!==n)throw new Error("LinkedMap got modified during iteration.");o=o.next}}keys(){const e=this._state;let t=this._head;const n={[Symbol.iterator]:()=>n,next:()=>{if(this._state!==e)throw new Error("LinkedMap got modified during iteration.");if(t){const e={value:t.key,done:!1};return t=t.next,e}return{value:void 0,done:!0}}};return n}values(){const e=this._state;let t=this._head;const n={[Symbol.iterator]:()=>n,next:()=>{if(this._state!==e)throw new Error("LinkedMap got modified during iteration.");if(t){const e={value:t.value,done:!1};return t=t.next,e}return{value:void 0,done:!0}}};return n}entries(){const e=this._state;let t=this._head;const n={[Symbol.iterator]:()=>n,next:()=>{if(this._state!==e)throw new Error("LinkedMap got modified during iteration.");if(t){const e={value:[t.key,t.value],done:!1};return t=t.next,e}return{value:void 0,done:!0}}};return n}[(n=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(e){if(e>=this.size)return;if(0===e)return void this.clear();let t=this._head,n=this.size;for(;t&&n>e;)this._map.delete(t.key),t=t.next,n--;this._head=t,this._size=n,t&&(t.previous=void 0),this._state++}addItemFirst(e){if(this._head||this._tail){if(!this._head)throw new Error("Invalid list");e.next=this._head,this._head.previous=e}else this._tail=e;this._head=e,this._state++}addItemLast(e){if(this._head||this._tail){if(!this._tail)throw new Error("Invalid list");e.previous=this._tail,this._tail.next=e}else this._head=e;this._tail=e,this._state++}removeItem(e){if(e===this._head&&e===this._tail)this._head=void 0,this._tail=void 0;else if(e===this._head){if(!e.next)throw new Error("Invalid list");e.next.previous=void 0,this._head=e.next}else if(e===this._tail){if(!e.previous)throw new Error("Invalid list");e.previous.next=void 0,this._tail=e.previous}else{const t=e.next,n=e.previous;if(!t||!n)throw new Error("Invalid list");t.previous=n,n.next=t}e.next=void 0,e.previous=void 0,this._state++}touch(e,t){if(!this._head||!this._tail)throw new Error("Invalid list");if(t===o.First||t===o.Last)if(t===o.First){if(e===this._head)return;const t=e.next,n=e.previous;e===this._tail?(n.next=void 0,this._tail=n):(t.previous=n,n.next=t),e.previous=void 0,e.next=this._head,this._head.previous=e,this._head=e,this._state++}else if(t===o.Last){if(e===this._tail)return;const t=e.next,n=e.previous;e===this._head?(t.previous=void 0,this._head=t):(t.previous=n,n.next=t),e.next=void 0,e.previous=this._tail,this._tail.next=e,this._tail=e,this._state++}}toJSON(){const e=[];return this.forEach(((t,n)=>{e.push([n,t])})),e}fromJSON(e){this.clear();for(const[t,n]of e)this.set(t,n)}}t.LinkedMap=LinkedMap;t.LRUCache=class LRUCache extends LinkedMap{constructor(e,t=1){super(),this._limit=e,this._ratio=Math.min(Math.max(0,t),1)}get limit(){return this._limit}set limit(e){this._limit=e,this.checkTrim()}get ratio(){return this._ratio}set ratio(e){this._ratio=Math.min(Math.max(0,e),1),this.checkTrim()}get(e,t=o.AsNew){return super.get(e,t)}peek(e){return super.get(e,o.None)}set(e,t){return super.set(e,t,o.Last),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}}},75530:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.AbstractMessageBuffer=void 0;t.AbstractMessageBuffer=class AbstractMessageBuffer{constructor(e="utf-8"){this._encoding=e,this._chunks=[],this._totalLength=0}get encoding(){return this._encoding}append(e){const t="string"==typeof e?this.fromString(e,this._encoding):e;this._chunks.push(t),this._totalLength+=t.byteLength}tryReadHeaders(e=!1){if(0===this._chunks.length)return;let t=0,n=0,o=0,i=0;e:for(;n<this._chunks.length;){const e=this._chunks[n];for(o=0;o<e.length;){switch(e[o]){case 13:switch(t){case 0:t=1;break;case 2:t=3;break;default:t=0}break;case 10:switch(t){case 1:t=2;break;case 3:t=4,o++;break e;default:t=0}break;default:t=0}o++}i+=e.byteLength,n++}if(4!==t)return;const r=this._read(i+o),s=new Map,a=this.toString(r,"ascii").split("\r\n");if(a.length<2)return s;for(let t=0;t<a.length-2;t++){const n=a[t],o=n.indexOf(":");if(-1===o)throw new Error("Message header must separate key and value using :");const i=n.substr(0,o),r=n.substr(o+1).trim();s.set(e?i.toLowerCase():i,r)}return s}tryReadBody(e){if(!(this._totalLength<e))return this._read(e)}get numberOfBytes(){return this._totalLength}_read(e){if(0===e)return this.emptyBuffer();if(e>this._totalLength)throw new Error("Cannot read so many bytes!");if(this._chunks[0].byteLength===e){const t=this._chunks[0];return this._chunks.shift(),this._totalLength-=e,this.asNative(t)}if(this._chunks[0].byteLength>e){const t=this._chunks[0],n=this.asNative(t,e);return this._chunks[0]=t.slice(e),this._totalLength-=e,n}const t=this.allocNative(e);let n=0;for(;e>0;){const o=this._chunks[0];if(o.byteLength>e){const i=o.slice(0,e);t.set(i,n),n+=e,this._chunks[0]=o.slice(e),this._totalLength-=e,e-=e}else t.set(o,n),n+=o.byteLength,this._chunks.shift(),this._totalLength-=o.byteLength,e-=o.byteLength}return t}}},56525:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ReadableStreamMessageReader=t.AbstractMessageReader=t.MessageReader=void 0;const o=n(30147),i=n(67574),r=n(27135),s=n(80142);var a;!function(e){e.is=function is(e){let t=e;return t&&i.func(t.listen)&&i.func(t.dispose)&&i.func(t.onError)&&i.func(t.onClose)&&i.func(t.onPartialMessage)}}(t.MessageReader||(t.MessageReader={}));class AbstractMessageReader{constructor(){this.errorEmitter=new r.Emitter,this.closeEmitter=new r.Emitter,this.partialMessageEmitter=new r.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(e){this.errorEmitter.fire(this.asError(e))}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}get onPartialMessage(){return this.partialMessageEmitter.event}firePartialMessage(e){this.partialMessageEmitter.fire(e)}asError(e){return e instanceof Error?e:new Error(`Reader received error. Reason: ${i.string(e.message)?e.message:"unknown"}`)}}t.AbstractMessageReader=AbstractMessageReader,function(e){e.fromOptions=function fromOptions(e){let t,n;const i=new Map;let r;const s=new Map;if(void 0===e||"string"==typeof e)t=e??"utf-8";else{if(t=e.charset??"utf-8",void 0!==e.contentDecoder&&(n=e.contentDecoder,i.set(n.name,n)),void 0!==e.contentDecoders)for(const t of e.contentDecoders)i.set(t.name,t);if(void 0!==e.contentTypeDecoder&&(r=e.contentTypeDecoder,s.set(r.name,r)),void 0!==e.contentTypeDecoders)for(const t of e.contentTypeDecoders)s.set(t.name,t)}return void 0===r&&(r=(0,o.default)().applicationJson.decoder,s.set(r.name,r)),{charset:t,contentDecoder:n,contentDecoders:i,contentTypeDecoder:r,contentTypeDecoders:s}}}(a||(a={}));t.ReadableStreamMessageReader=class ReadableStreamMessageReader extends AbstractMessageReader{constructor(e,t){super(),this.readable=e,this.options=a.fromOptions(t),this.buffer=(0,o.default)().messageBuffer.create(this.options.charset),this._partialMessageTimeout=1e4,this.nextMessageLength=-1,this.messageToken=0,this.readSemaphore=new s.Semaphore(1)}set partialMessageTimeout(e){this._partialMessageTimeout=e}get partialMessageTimeout(){return this._partialMessageTimeout}listen(e){this.nextMessageLength=-1,this.messageToken=0,this.partialMessageTimer=void 0,this.callback=e;const t=this.readable.onData((e=>{this.onData(e)}));return this.readable.onError((e=>this.fireError(e))),this.readable.onClose((()=>this.fireClose())),t}onData(e){for(this.buffer.append(e);;){if(-1===this.nextMessageLength){const e=this.buffer.tryReadHeaders(!0);if(!e)return;const t=e.get("content-length");if(!t)return void this.fireError(new Error("Header must provide a Content-Length property."));const n=parseInt(t);if(isNaN(n))return void this.fireError(new Error("Content-Length value must be a number."));this.nextMessageLength=n}const e=this.buffer.tryReadBody(this.nextMessageLength);if(void 0===e)return void this.setPartialMessageTimer();this.clearPartialMessageTimer(),this.nextMessageLength=-1,this.readSemaphore.lock((async()=>{const t=void 0!==this.options.contentDecoder?await this.options.contentDecoder.decode(e):e,n=await this.options.contentTypeDecoder.decode(t,this.options);this.callback(n)})).catch((e=>{this.fireError(e)}))}}clearPartialMessageTimer(){this.partialMessageTimer&&(this.partialMessageTimer.dispose(),this.partialMessageTimer=void 0)}setPartialMessageTimer(){this.clearPartialMessageTimer(),this._partialMessageTimeout<=0||(this.partialMessageTimer=(0,o.default)().timer.setTimeout(((e,t)=>{this.partialMessageTimer=void 0,e===this.messageToken&&(this.firePartialMessage({messageToken:e,waitingTime:t}),this.setPartialMessageTimer())}),this._partialMessageTimeout,this.messageToken,this._partialMessageTimeout))}}},96654:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.WriteableStreamMessageWriter=t.AbstractMessageWriter=t.MessageWriter=void 0;const o=n(30147),i=n(67574),r=n(80142),s=n(27135);var a;!function(e){e.is=function is(e){let t=e;return t&&i.func(t.dispose)&&i.func(t.onClose)&&i.func(t.onError)&&i.func(t.write)}}(t.MessageWriter||(t.MessageWriter={}));class AbstractMessageWriter{constructor(){this.errorEmitter=new s.Emitter,this.closeEmitter=new s.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(e,t,n){this.errorEmitter.fire([this.asError(e),t,n])}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}asError(e){return e instanceof Error?e:new Error(`Writer received error. Reason: ${i.string(e.message)?e.message:"unknown"}`)}}t.AbstractMessageWriter=AbstractMessageWriter,function(e){e.fromOptions=function fromOptions(e){return void 0===e||"string"==typeof e?{charset:e??"utf-8",contentTypeEncoder:(0,o.default)().applicationJson.encoder}:{charset:e.charset??"utf-8",contentEncoder:e.contentEncoder,contentTypeEncoder:e.contentTypeEncoder??(0,o.default)().applicationJson.encoder}}}(a||(a={}));t.WriteableStreamMessageWriter=class WriteableStreamMessageWriter extends AbstractMessageWriter{constructor(e,t){super(),this.writable=e,this.options=a.fromOptions(t),this.errorCount=0,this.writeSemaphore=new r.Semaphore(1),this.writable.onError((e=>this.fireError(e))),this.writable.onClose((()=>this.fireClose()))}async write(e){return this.writeSemaphore.lock((async()=>this.options.contentTypeEncoder.encode(e,this.options).then((e=>void 0!==this.options.contentEncoder?this.options.contentEncoder.encode(e):e)).then((t=>{const n=[];return n.push("Content-Length: ",t.byteLength.toString(),"\r\n"),n.push("\r\n"),this.doWrite(e,n,t)}),(e=>{throw this.fireError(e),e}))))}async doWrite(e,t,n){try{return await this.writable.write(t.join(""),"ascii"),this.writable.write(n)}catch(t){return this.handleError(t,e),Promise.reject(t)}}handleError(e,t){this.errorCount++,this.fireError(e,t,this.errorCount)}end(){this.writable.end()}}},20839:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Message=t.NotificationType9=t.NotificationType8=t.NotificationType7=t.NotificationType6=t.NotificationType5=t.NotificationType4=t.NotificationType3=t.NotificationType2=t.NotificationType1=t.NotificationType0=t.NotificationType=t.RequestType9=t.RequestType8=t.RequestType7=t.RequestType6=t.RequestType5=t.RequestType4=t.RequestType3=t.RequestType2=t.RequestType1=t.RequestType=t.RequestType0=t.AbstractMessageSignature=t.ParameterStructures=t.ResponseError=t.ErrorCodes=void 0;const o=n(67574);var i;!function(e){e.ParseError=-32700,e.InvalidRequest=-32600,e.MethodNotFound=-32601,e.InvalidParams=-32602,e.InternalError=-32603,e.jsonrpcReservedErrorRangeStart=-32099,e.serverErrorStart=-32099,e.MessageWriteError=-32099,e.MessageReadError=-32098,e.PendingResponseRejected=-32097,e.ConnectionInactive=-32096,e.ServerNotInitialized=-32002,e.UnknownErrorCode=-32001,e.jsonrpcReservedErrorRangeEnd=-32e3,e.serverErrorEnd=-32e3}(i=t.ErrorCodes||(t.ErrorCodes={}));class ResponseError extends Error{constructor(e,t,n){super(t),this.code=o.number(e)?e:i.UnknownErrorCode,this.data=n,Object.setPrototypeOf(this,ResponseError.prototype)}toJson(){const e={code:this.code,message:this.message};return void 0!==this.data&&(e.data=this.data),e}}t.ResponseError=ResponseError;class ParameterStructures{constructor(e){this.kind=e}static is(e){return e===ParameterStructures.auto||e===ParameterStructures.byName||e===ParameterStructures.byPosition}toString(){return this.kind}}t.ParameterStructures=ParameterStructures,ParameterStructures.auto=new ParameterStructures("auto"),ParameterStructures.byPosition=new ParameterStructures("byPosition"),ParameterStructures.byName=new ParameterStructures("byName");class AbstractMessageSignature{constructor(e,t){this.method=e,this.numberOfParams=t}get parameterStructures(){return ParameterStructures.auto}}t.AbstractMessageSignature=AbstractMessageSignature;t.RequestType0=class RequestType0 extends AbstractMessageSignature{constructor(e){super(e,0)}};t.RequestType=class RequestType extends AbstractMessageSignature{constructor(e,t=ParameterStructures.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}};t.RequestType1=class RequestType1 extends AbstractMessageSignature{constructor(e,t=ParameterStructures.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}};t.RequestType2=class RequestType2 extends AbstractMessageSignature{constructor(e){super(e,2)}};t.RequestType3=class RequestType3 extends AbstractMessageSignature{constructor(e){super(e,3)}};t.RequestType4=class RequestType4 extends AbstractMessageSignature{constructor(e){super(e,4)}};t.RequestType5=class RequestType5 extends AbstractMessageSignature{constructor(e){super(e,5)}};t.RequestType6=class RequestType6 extends AbstractMessageSignature{constructor(e){super(e,6)}};t.RequestType7=class RequestType7 extends AbstractMessageSignature{constructor(e){super(e,7)}};t.RequestType8=class RequestType8 extends AbstractMessageSignature{constructor(e){super(e,8)}};t.RequestType9=class RequestType9 extends AbstractMessageSignature{constructor(e){super(e,9)}};t.NotificationType=class NotificationType extends AbstractMessageSignature{constructor(e,t=ParameterStructures.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}};t.NotificationType0=class NotificationType0 extends AbstractMessageSignature{constructor(e){super(e,0)}};t.NotificationType1=class NotificationType1 extends AbstractMessageSignature{constructor(e,t=ParameterStructures.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}};t.NotificationType2=class NotificationType2 extends AbstractMessageSignature{constructor(e){super(e,2)}};t.NotificationType3=class NotificationType3 extends AbstractMessageSignature{constructor(e){super(e,3)}};t.NotificationType4=class NotificationType4 extends AbstractMessageSignature{constructor(e){super(e,4)}};t.NotificationType5=class NotificationType5 extends AbstractMessageSignature{constructor(e){super(e,5)}};t.NotificationType6=class NotificationType6 extends AbstractMessageSignature{constructor(e){super(e,6)}};t.NotificationType7=class NotificationType7 extends AbstractMessageSignature{constructor(e){super(e,7)}};t.NotificationType8=class NotificationType8 extends AbstractMessageSignature{constructor(e){super(e,8)}};t.NotificationType9=class NotificationType9 extends AbstractMessageSignature{constructor(e){super(e,9)}},function(e){e.isRequest=function isRequest(e){const t=e;return t&&o.string(t.method)&&(o.string(t.id)||o.number(t.id))},e.isNotification=function isNotification(e){const t=e;return t&&o.string(t.method)&&void 0===e.id},e.isResponse=function isResponse(e){const t=e;return t&&(void 0!==t.result||!!t.error)&&(o.string(t.id)||o.number(t.id)||null===t.id)}}(t.Message||(t.Message={}))},30147:(e,t)=>{let n;function RAL(){if(void 0===n)throw new Error("No runtime abstraction layer installed");return n}Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.install=function install(e){if(void 0===e)throw new Error("No runtime abstraction layer provided");n=e}}(RAL||(RAL={})),t.default=RAL},80142:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Semaphore=void 0;const o=n(30147);t.Semaphore=class Semaphore{constructor(e=1){if(e<=0)throw new Error("Capacity must be greater than 0");this._capacity=e,this._active=0,this._waiting=[]}lock(e){return new Promise(((t,n)=>{this._waiting.push({thunk:e,resolve:t,reject:n}),this.runNext()}))}get active(){return this._active}runNext(){0!==this._waiting.length&&this._active!==this._capacity&&(0,o.default)().timer.setImmediate((()=>this.doRunNext()))}doRunNext(){if(0===this._waiting.length||this._active===this._capacity)return;const e=this._waiting.shift();if(this._active++,this._active>this._capacity)throw new Error("To many thunks active");try{const t=e.thunk();t instanceof Promise?t.then((t=>{this._active--,e.resolve(t),this.runNext()}),(t=>{this._active--,e.reject(t),this.runNext()})):(this._active--,e.resolve(t),this.runNext())}catch(t){this._active--,e.reject(t),this.runNext()}}}},98211:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SharedArrayReceiverStrategy=t.SharedArraySenderStrategy=void 0;const o=n(13881);var i;!function(e){e.Continue=0,e.Cancelled=1}(i||(i={}));t.SharedArraySenderStrategy=class SharedArraySenderStrategy{constructor(){this.buffers=new Map}enableCancellation(e){if(null===e.id)return;const t=new SharedArrayBuffer(4);new Int32Array(t,0,1)[0]=i.Continue,this.buffers.set(e.id,t),e.$cancellationData=t}async sendCancellation(e,t){const n=this.buffers.get(t);if(void 0===n)return;const o=new Int32Array(n,0,1);Atomics.store(o,0,i.Cancelled)}cleanup(e){this.buffers.delete(e)}dispose(){this.buffers.clear()}};class SharedArrayBufferCancellationToken{constructor(e){this.data=new Int32Array(e,0,1)}get isCancellationRequested(){return Atomics.load(this.data,0)===i.Cancelled}get onCancellationRequested(){throw new Error("Cancellation over SharedArrayBuffer doesn't support cancellation events")}}class SharedArrayBufferCancellationTokenSource{constructor(e){this.token=new SharedArrayBufferCancellationToken(e)}cancel(){}dispose(){}}t.SharedArrayReceiverStrategy=class SharedArrayReceiverStrategy{constructor(){this.kind="request"}createCancellationTokenSource(e){const t=e.$cancellationData;return void 0===t?new o.CancellationTokenSource:new SharedArrayBufferCancellationTokenSource(t)}}},74389:function(e,t,n){var o=this&&this.__createBinding||(Object.create?function(e,t,n,o){void 0===o&&(o=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,o,i)}:function(e,t,n,o){void 0===o&&(o=n),e[o]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||o(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.createMessageConnection=t.createServerSocketTransport=t.createClientSocketTransport=t.createServerPipeTransport=t.createClientPipeTransport=t.generateRandomPipeName=t.StreamMessageWriter=t.StreamMessageReader=t.SocketMessageWriter=t.SocketMessageReader=t.PortMessageWriter=t.PortMessageReader=t.IPCMessageWriter=t.IPCMessageReader=void 0;const r=n(23034);r.default.install();const s=n(71017),a=n(22037),c=n(6113),l=n(41808),u=n(23870);i(n(23870),t);class IPCMessageReader extends u.AbstractMessageReader{constructor(e){super(),this.process=e;let t=this.process;t.on("error",(e=>this.fireError(e))),t.on("close",(()=>this.fireClose()))}listen(e){return this.process.on("message",e),u.Disposable.create((()=>this.process.off("message",e)))}}t.IPCMessageReader=IPCMessageReader;class IPCMessageWriter extends u.AbstractMessageWriter{constructor(e){super(),this.process=e,this.errorCount=0;const t=this.process;t.on("error",(e=>this.fireError(e))),t.on("close",(()=>this.fireClose))}write(e){try{return"function"==typeof this.process.send&&this.process.send(e,void 0,void 0,(t=>{t?(this.errorCount++,this.handleError(t,e)):this.errorCount=0})),Promise.resolve()}catch(t){return this.handleError(t,e),Promise.reject(t)}}handleError(e,t){this.errorCount++,this.fireError(e,t,this.errorCount)}end(){}}t.IPCMessageWriter=IPCMessageWriter;class PortMessageReader extends u.AbstractMessageReader{constructor(e){super(),this.onData=new u.Emitter,e.on("close",(()=>this.fireClose)),e.on("error",(e=>this.fireError(e))),e.on("message",(e=>{this.onData.fire(e)}))}listen(e){return this.onData.event(e)}}t.PortMessageReader=PortMessageReader;class PortMessageWriter extends u.AbstractMessageWriter{constructor(e){super(),this.port=e,this.errorCount=0,e.on("close",(()=>this.fireClose())),e.on("error",(e=>this.fireError(e)))}write(e){try{return this.port.postMessage(e),Promise.resolve()}catch(t){return this.handleError(t,e),Promise.reject(t)}}handleError(e,t){this.errorCount++,this.fireError(e,t,this.errorCount)}end(){}}t.PortMessageWriter=PortMessageWriter;class SocketMessageReader extends u.ReadableStreamMessageReader{constructor(e,t="utf-8"){super((0,r.default)().stream.asReadableStream(e),t)}}t.SocketMessageReader=SocketMessageReader;class SocketMessageWriter extends u.WriteableStreamMessageWriter{constructor(e,t){super((0,r.default)().stream.asWritableStream(e),t),this.socket=e}dispose(){super.dispose(),this.socket.destroy()}}t.SocketMessageWriter=SocketMessageWriter;class StreamMessageReader extends u.ReadableStreamMessageReader{constructor(e,t){super((0,r.default)().stream.asReadableStream(e),t)}}t.StreamMessageReader=StreamMessageReader;class StreamMessageWriter extends u.WriteableStreamMessageWriter{constructor(e,t){super((0,r.default)().stream.asWritableStream(e),t)}}t.StreamMessageWriter=StreamMessageWriter;const d=process.env.XDG_RUNTIME_DIR,f=new Map([["linux",107],["darwin",103]]);t.generateRandomPipeName=function generateRandomPipeName(){const e=(0,c.randomBytes)(21).toString("hex");if("win32"===process.platform)return`\\\\.\\pipe\\vscode-jsonrpc-${e}-sock`;let t;t=d?s.join(d,`vscode-ipc-${e}.sock`):s.join(a.tmpdir(),`vscode-${e}.sock`);const n=f.get(process.platform);return void 0!==n&&t.length>n&&(0,r.default)().console.warn(`WARNING: IPC handle "${t}" is longer than ${n} characters.`),t},t.createClientPipeTransport=function createClientPipeTransport(e,t="utf-8"){let n;const o=new Promise(((e,t)=>{n=e}));return new Promise(((i,r)=>{let s=(0,l.createServer)((e=>{s.close(),n([new SocketMessageReader(e,t),new SocketMessageWriter(e,t)])}));s.on("error",r),s.listen(e,(()=>{s.removeListener("error",r),i({onConnected:()=>o})}))}))},t.createServerPipeTransport=function createServerPipeTransport(e,t="utf-8"){const n=(0,l.createConnection)(e);return[new SocketMessageReader(n,t),new SocketMessageWriter(n,t)]},t.createClientSocketTransport=function createClientSocketTransport(e,t="utf-8"){let n;const o=new Promise(((e,t)=>{n=e}));return new Promise(((i,r)=>{const s=(0,l.createServer)((e=>{s.close(),n([new SocketMessageReader(e,t),new SocketMessageWriter(e,t)])}));s.on("error",r),s.listen(e,"127.0.0.1",(()=>{s.removeListener("error",r),i({onConnected:()=>o})}))}))},t.createServerSocketTransport=function createServerSocketTransport(e,t="utf-8"){const n=(0,l.createConnection)(e,"127.0.0.1");return[new SocketMessageReader(n,t),new SocketMessageWriter(n,t)]},t.createMessageConnection=function createMessageConnection(e,t,n,o){n||(n=u.NullLogger);const i=function isReadableStream(e){const t=e;return void 0!==t.read&&void 0!==t.addListener}(e)?new StreamMessageReader(e):e,r=function isWritableStream(e){const t=e;return void 0!==t.write&&void 0!==t.addListener}(t)?new StreamMessageWriter(t):t;return u.ConnectionStrategy.is(o)&&(o={connectionStrategy:o}),(0,u.createMessageConnection)(i,r,n,o)}},23034:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0});const o=n(73837),i=n(23870);class MessageBuffer extends i.AbstractMessageBuffer{constructor(e="utf-8"){super(e)}emptyBuffer(){return MessageBuffer.emptyBuffer}fromString(e,t){return Buffer.from(e,t)}toString(e,t){return e instanceof Buffer?e.toString(t):new o.TextDecoder(t).decode(e)}asNative(e,t){return void 0===t?e instanceof Buffer?e:Buffer.from(e):e instanceof Buffer?e.slice(0,t):Buffer.from(e,0,t)}allocNative(e){return Buffer.allocUnsafe(e)}}MessageBuffer.emptyBuffer=Buffer.allocUnsafe(0);class ReadableStreamWrapper{constructor(e){this.stream=e}onClose(e){return this.stream.on("close",e),i.Disposable.create((()=>this.stream.off("close",e)))}onError(e){return this.stream.on("error",e),i.Disposable.create((()=>this.stream.off("error",e)))}onEnd(e){return this.stream.on("end",e),i.Disposable.create((()=>this.stream.off("end",e)))}onData(e){return this.stream.on("data",e),i.Disposable.create((()=>this.stream.off("data",e)))}}class WritableStreamWrapper{constructor(e){this.stream=e}onClose(e){return this.stream.on("close",e),i.Disposable.create((()=>this.stream.off("close",e)))}onError(e){return this.stream.on("error",e),i.Disposable.create((()=>this.stream.off("error",e)))}onEnd(e){return this.stream.on("end",e),i.Disposable.create((()=>this.stream.off("end",e)))}write(e,t){return new Promise(((n,o)=>{const callback=e=>{null==e?n():o(e)};"string"==typeof e?this.stream.write(e,t,callback):this.stream.write(e,callback)}))}end(){this.stream.end()}}const r=Object.freeze({messageBuffer:Object.freeze({create:e=>new MessageBuffer(e)}),applicationJson:Object.freeze({encoder:Object.freeze({name:"application/json",encode:(e,t)=>{try{return Promise.resolve(Buffer.from(JSON.stringify(e,void 0,0),t.charset))}catch(e){return Promise.reject(e)}}}),decoder:Object.freeze({name:"application/json",decode:(e,t)=>{try{return e instanceof Buffer?Promise.resolve(JSON.parse(e.toString(t.charset))):Promise.resolve(JSON.parse(new o.TextDecoder(t.charset).decode(e)))}catch(e){return Promise.reject(e)}}})}),stream:Object.freeze({asReadableStream:e=>new ReadableStreamWrapper(e),asWritableStream:e=>new WritableStreamWrapper(e)}),console,timer:Object.freeze({setTimeout(e,t,...n){const o=setTimeout(e,t,...n);return{dispose:()=>clearTimeout(o)}},setImmediate(e,...t){const n=setImmediate(e,...t);return{dispose:()=>clearImmediate(n)}},setInterval(e,t,...n){const o=setInterval(e,t,...n);return{dispose:()=>clearInterval(o)}}})});function RIL(){return r}!function(e){e.install=function install(){i.RAL.install(r)}}(RIL||(RIL={})),t.default=RIL},95028:(e,t,n)=>{e.exports=n(74389)},51661:function(e,t,n){var o=this&&this.__createBinding||(Object.create?function(e,t,n,o){void 0===o&&(o=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,o,i)}:function(e,t,n,o){void 0===o&&(o=n),e[o]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||o(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.LSPErrorCodes=t.createProtocolConnection=void 0,i(n(74389),t),i(n(28661),t),i(n(66140),t),i(n(10542),t);var r=n(73767);Object.defineProperty(t,"createProtocolConnection",{enumerable:!0,get:function(){return r.createProtocolConnection}}),function(e){e.lspReservedErrorRangeStart=-32899,e.RequestFailed=-32803,e.ServerCancelled=-32802,e.ContentModified=-32801,e.RequestCancelled=-32800,e.lspReservedErrorRangeEnd=-32800}(t.LSPErrorCodes||(t.LSPErrorCodes={}))},73767:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.createProtocolConnection=void 0;const o=n(74389);t.createProtocolConnection=function createProtocolConnection(e,t,n,i){return o.ConnectionStrategy.is(i)&&(i={connectionStrategy:i}),(0,o.createMessageConnection)(e,t,n,i)}},66140:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ProtocolNotificationType=t.ProtocolNotificationType0=t.ProtocolRequestType=t.ProtocolRequestType0=t.RegistrationType=t.MessageDirection=void 0;const o=n(74389);!function(e){e.clientToServer="clientToServer",e.serverToClient="serverToClient",e.both="both"}(t.MessageDirection||(t.MessageDirection={}));t.RegistrationType=class RegistrationType{constructor(e){this.method=e}};class ProtocolRequestType0 extends o.RequestType0{constructor(e){super(e)}}t.ProtocolRequestType0=ProtocolRequestType0;class ProtocolRequestType extends o.RequestType{constructor(e){super(e,o.ParameterStructures.byName)}}t.ProtocolRequestType=ProtocolRequestType;class ProtocolNotificationType0 extends o.NotificationType0{constructor(e){super(e)}}t.ProtocolNotificationType0=ProtocolNotificationType0;class ProtocolNotificationType extends o.NotificationType{constructor(e){super(e,o.ParameterStructures.byName)}}t.ProtocolNotificationType=ProtocolNotificationType},82918:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CallHierarchyOutgoingCallsRequest=t.CallHierarchyIncomingCallsRequest=t.CallHierarchyPrepareRequest=void 0;const o=n(66140);!function(e){e.method="textDocument/prepareCallHierarchy",e.messageDirection=o.MessageDirection.clientToServer,e.type=new o.ProtocolRequestType(e.method)}(t.CallHierarchyPrepareRequest||(t.CallHierarchyPrepareRequest={})),function(e){e.method="callHierarchy/incomingCalls",e.messageDirection=o.MessageDirection.clientToServer,e.type=new o.ProtocolRequestType(e.method)}(t.CallHierarchyIncomingCallsRequest||(t.CallHierarchyIncomingCallsRequest={})),function(e){e.method="callHierarchy/outgoingCalls",e.messageDirection=o.MessageDirection.clientToServer,e.type=new o.ProtocolRequestType(e.method)}(t.CallHierarchyOutgoingCallsRequest||(t.CallHierarchyOutgoingCallsRequest={}))},79891:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ColorPresentationRequest=t.DocumentColorRequest=void 0;const o=n(66140);!function(e){e.method="textDocument/documentColor",e.messageDirection=o.MessageDirection.clientToServer,e.type=new o.ProtocolRequestType(e.method)}(t.DocumentColorRequest||(t.DocumentColorRequest={})),function(e){e.method="textDocument/colorPresentation",e.messageDirection=o.MessageDirection.clientToServer,e.type=new o.ProtocolRequestType(e.method)}(t.ColorPresentationRequest||(t.ColorPresentationRequest={}))},85934:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ConfigurationRequest=void 0;const o=n(66140);!function(e){e.method="workspace/configuration",e.messageDirection=o.MessageDirection.serverToClient,e.type=new o.ProtocolRequestType(e.method)}(t.ConfigurationRequest||(t.ConfigurationRequest={}))},40764:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DeclarationRequest=void 0;const o=n(66140);!function(e){e.method="textDocument/declaration",e.messageDirection=o.MessageDirection.clientToServer,e.type=new o.ProtocolRequestType(e.method)}(t.DeclarationRequest||(t.DeclarationRequest={}))},79824:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DiagnosticRefreshRequest=t.WorkspaceDiagnosticRequest=t.DocumentDiagnosticRequest=t.DocumentDiagnosticReportKind=t.DiagnosticServerCancellationData=void 0;const o=n(74389),i=n(69533),r=n(66140);!function(e){e.is=function is(e){const t=e;return t&&i.boolean(t.retriggerRequest)}}(t.DiagnosticServerCancellationData||(t.DiagnosticServerCancellationData={})),function(e){e.Full="full",e.Unchanged="unchanged"}(t.DocumentDiagnosticReportKind||(t.DocumentDiagnosticReportKind={})),function(e){e.method="textDocument/diagnostic",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method),e.partialResult=new o.ProgressType}(t.DocumentDiagnosticRequest||(t.DocumentDiagnosticRequest={})),function(e){e.method="workspace/diagnostic",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method),e.partialResult=new o.ProgressType}(t.WorkspaceDiagnosticRequest||(t.WorkspaceDiagnosticRequest={})),function(e){e.method="workspace/diagnostic/refresh",e.messageDirection=r.MessageDirection.serverToClient,e.type=new r.ProtocolRequestType0(e.method)}(t.DiagnosticRefreshRequest||(t.DiagnosticRefreshRequest={}))},37846:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.WillDeleteFilesRequest=t.DidDeleteFilesNotification=t.DidRenameFilesNotification=t.WillRenameFilesRequest=t.DidCreateFilesNotification=t.WillCreateFilesRequest=t.FileOperationPatternKind=void 0;const o=n(66140);!function(e){e.file="file",e.folder="folder"}(t.FileOperationPatternKind||(t.FileOperationPatternKind={})),function(e){e.method="workspace/willCreateFiles",e.messageDirection=o.MessageDirection.clientToServer,e.type=new o.ProtocolRequestType(e.method)}(t.WillCreateFilesRequest||(t.WillCreateFilesRequest={})),function(e){e.method="workspace/didCreateFiles",e.messageDirection=o.MessageDirection.clientToServer,e.type=new o.ProtocolNotificationType(e.method)}(t.DidCreateFilesNotification||(t.DidCreateFilesNotification={})),function(e){e.method="workspace/willRenameFiles",e.messageDirection=o.MessageDirection.clientToServer,e.type=new o.ProtocolRequestType(e.method)}(t.WillRenameFilesRequest||(t.WillRenameFilesRequest={})),function(e){e.method="workspace/didRenameFiles",e.messageDirection=o.MessageDirection.clientToServer,e.type=new o.ProtocolNotificationType(e.method)}(t.DidRenameFilesNotification||(t.DidRenameFilesNotification={})),function(e){e.method="workspace/didDeleteFiles",e.messageDirection=o.MessageDirection.clientToServer,e.type=new o.ProtocolNotificationType(e.method)}(t.DidDeleteFilesNotification||(t.DidDeleteFilesNotification={})),function(e){e.method="workspace/willDeleteFiles",e.messageDirection=o.MessageDirection.clientToServer,e.type=new o.ProtocolRequestType(e.method)}(t.WillDeleteFilesRequest||(t.WillDeleteFilesRequest={}))},13394:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.FoldingRangeRequest=void 0;const o=n(66140);!function(e){e.method="textDocument/foldingRange",e.messageDirection=o.MessageDirection.clientToServer,e.type=new o.ProtocolRequestType(e.method)}(t.FoldingRangeRequest||(t.FoldingRangeRequest={}))},82122:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ImplementationRequest=void 0;const o=n(66140);!function(e){e.method="textDocument/implementation",e.messageDirection=o.MessageDirection.clientToServer,e.type=new o.ProtocolRequestType(e.method)}(t.ImplementationRequest||(t.ImplementationRequest={}))},29999:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.InlayHintRefreshRequest=t.InlayHintResolveRequest=t.InlayHintRequest=void 0;const o=n(66140);!function(e){e.method="textDocument/inlayHint",e.messageDirection=o.MessageDirection.clientToServer,e.type=new o.ProtocolRequestType(e.method)}(t.InlayHintRequest||(t.InlayHintRequest={})),function(e){e.method="inlayHint/resolve",e.messageDirection=o.MessageDirection.clientToServer,e.type=new o.ProtocolRequestType(e.method)}(t.InlayHintResolveRequest||(t.InlayHintResolveRequest={})),function(e){e.method="workspace/inlayHint/refresh",e.messageDirection=o.MessageDirection.serverToClient,e.type=new o.ProtocolRequestType0(e.method)}(t.InlayHintRefreshRequest||(t.InlayHintRefreshRequest={}))},55246:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.InlineValueRefreshRequest=t.InlineValueRequest=void 0;const o=n(66140);!function(e){e.method="textDocument/inlineValue",e.messageDirection=o.MessageDirection.clientToServer,e.type=new o.ProtocolRequestType(e.method)}(t.InlineValueRequest||(t.InlineValueRequest={})),function(e){e.method="workspace/inlineValue/refresh",e.messageDirection=o.MessageDirection.serverToClient,e.type=new o.ProtocolRequestType0(e.method)}(t.InlineValueRefreshRequest||(t.InlineValueRefreshRequest={}))},10542:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.WorkspaceSymbolRequest=t.CodeActionResolveRequest=t.CodeActionRequest=t.DocumentSymbolRequest=t.DocumentHighlightRequest=t.ReferencesRequest=t.DefinitionRequest=t.SignatureHelpRequest=t.SignatureHelpTriggerKind=t.HoverRequest=t.CompletionResolveRequest=t.CompletionRequest=t.CompletionTriggerKind=t.PublishDiagnosticsNotification=t.WatchKind=t.RelativePattern=t.FileChangeType=t.DidChangeWatchedFilesNotification=t.WillSaveTextDocumentWaitUntilRequest=t.WillSaveTextDocumentNotification=t.TextDocumentSaveReason=t.DidSaveTextDocumentNotification=t.DidCloseTextDocumentNotification=t.DidChangeTextDocumentNotification=t.TextDocumentContentChangeEvent=t.DidOpenTextDocumentNotification=t.TextDocumentSyncKind=t.TelemetryEventNotification=t.LogMessageNotification=t.ShowMessageRequest=t.ShowMessageNotification=t.MessageType=t.DidChangeConfigurationNotification=t.ExitNotification=t.ShutdownRequest=t.InitializedNotification=t.InitializeErrorCodes=t.InitializeRequest=t.WorkDoneProgressOptions=t.TextDocumentRegistrationOptions=t.StaticRegistrationOptions=t.PositionEncodingKind=t.FailureHandlingKind=t.ResourceOperationKind=t.UnregistrationRequest=t.RegistrationRequest=t.DocumentSelector=t.NotebookCellTextDocumentFilter=t.NotebookDocumentFilter=t.TextDocumentFilter=void 0,t.TypeHierarchySubtypesRequest=t.TypeHierarchyPrepareRequest=t.MonikerRequest=t.MonikerKind=t.UniquenessLevel=t.WillDeleteFilesRequest=t.DidDeleteFilesNotification=t.WillRenameFilesRequest=t.DidRenameFilesNotification=t.WillCreateFilesRequest=t.DidCreateFilesNotification=t.FileOperationPatternKind=t.LinkedEditingRangeRequest=t.ShowDocumentRequest=t.SemanticTokensRegistrationType=t.SemanticTokensRefreshRequest=t.SemanticTokensRangeRequest=t.SemanticTokensDeltaRequest=t.SemanticTokensRequest=t.TokenFormat=t.CallHierarchyPrepareRequest=t.CallHierarchyOutgoingCallsRequest=t.CallHierarchyIncomingCallsRequest=t.WorkDoneProgressCancelNotification=t.WorkDoneProgressCreateRequest=t.WorkDoneProgress=t.SelectionRangeRequest=t.DeclarationRequest=t.FoldingRangeRequest=t.ColorPresentationRequest=t.DocumentColorRequest=t.ConfigurationRequest=t.DidChangeWorkspaceFoldersNotification=t.WorkspaceFoldersRequest=t.TypeDefinitionRequest=t.ImplementationRequest=t.ApplyWorkspaceEditRequest=t.ExecuteCommandRequest=t.PrepareRenameRequest=t.RenameRequest=t.PrepareSupportDefaultBehavior=t.DocumentOnTypeFormattingRequest=t.DocumentRangeFormattingRequest=t.DocumentFormattingRequest=t.DocumentLinkResolveRequest=t.DocumentLinkRequest=t.CodeLensRefreshRequest=t.CodeLensResolveRequest=t.CodeLensRequest=t.WorkspaceSymbolResolveRequest=void 0,t.DidCloseNotebookDocumentNotification=t.DidSaveNotebookDocumentNotification=t.DidChangeNotebookDocumentNotification=t.NotebookCellArrayChange=t.DidOpenNotebookDocumentNotification=t.NotebookDocumentSyncRegistrationType=t.NotebookDocument=t.NotebookCell=t.ExecutionSummary=t.NotebookCellKind=t.DiagnosticRefreshRequest=t.WorkspaceDiagnosticRequest=t.DocumentDiagnosticRequest=t.DocumentDiagnosticReportKind=t.DiagnosticServerCancellationData=t.InlayHintRefreshRequest=t.InlayHintResolveRequest=t.InlayHintRequest=t.InlineValueRefreshRequest=t.InlineValueRequest=t.TypeHierarchySupertypesRequest=void 0;const o=n(66140),i=n(28661),r=n(69533),s=n(82122);Object.defineProperty(t,"ImplementationRequest",{enumerable:!0,get:function(){return s.ImplementationRequest}});const a=n(71589);Object.defineProperty(t,"TypeDefinitionRequest",{enumerable:!0,get:function(){return a.TypeDefinitionRequest}});const c=n(98744);Object.defineProperty(t,"WorkspaceFoldersRequest",{enumerable:!0,get:function(){return c.WorkspaceFoldersRequest}}),Object.defineProperty(t,"DidChangeWorkspaceFoldersNotification",{enumerable:!0,get:function(){return c.DidChangeWorkspaceFoldersNotification}});const l=n(85934);Object.defineProperty(t,"ConfigurationRequest",{enumerable:!0,get:function(){return l.ConfigurationRequest}});const u=n(79891);Object.defineProperty(t,"DocumentColorRequest",{enumerable:!0,get:function(){return u.DocumentColorRequest}}),Object.defineProperty(t,"ColorPresentationRequest",{enumerable:!0,get:function(){return u.ColorPresentationRequest}});const d=n(13394);Object.defineProperty(t,"FoldingRangeRequest",{enumerable:!0,get:function(){return d.FoldingRangeRequest}});const f=n(40764);Object.defineProperty(t,"DeclarationRequest",{enumerable:!0,get:function(){return f.DeclarationRequest}});const p=n(5206);Object.defineProperty(t,"SelectionRangeRequest",{enumerable:!0,get:function(){return p.SelectionRangeRequest}});const h=n(21862);Object.defineProperty(t,"WorkDoneProgress",{enumerable:!0,get:function(){return h.WorkDoneProgress}}),Object.defineProperty(t,"WorkDoneProgressCreateRequest",{enumerable:!0,get:function(){return h.WorkDoneProgressCreateRequest}}),Object.defineProperty(t,"WorkDoneProgressCancelNotification",{enumerable:!0,get:function(){return h.WorkDoneProgressCancelNotification}});const m=n(82918);Object.defineProperty(t,"CallHierarchyIncomingCallsRequest",{enumerable:!0,get:function(){return m.CallHierarchyIncomingCallsRequest}}),Object.defineProperty(t,"CallHierarchyOutgoingCallsRequest",{enumerable:!0,get:function(){return m.CallHierarchyOutgoingCallsRequest}}),Object.defineProperty(t,"CallHierarchyPrepareRequest",{enumerable:!0,get:function(){return m.CallHierarchyPrepareRequest}});const g=n(39434);Object.defineProperty(t,"TokenFormat",{enumerable:!0,get:function(){return g.TokenFormat}}),Object.defineProperty(t,"SemanticTokensRequest",{enumerable:!0,get:function(){return g.SemanticTokensRequest}}),Object.defineProperty(t,"SemanticTokensDeltaRequest",{enumerable:!0,get:function(){return g.SemanticTokensDeltaRequest}}),Object.defineProperty(t,"SemanticTokensRangeRequest",{enumerable:!0,get:function(){return g.SemanticTokensRangeRequest}}),Object.defineProperty(t,"SemanticTokensRefreshRequest",{enumerable:!0,get:function(){return g.SemanticTokensRefreshRequest}}),Object.defineProperty(t,"SemanticTokensRegistrationType",{enumerable:!0,get:function(){return g.SemanticTokensRegistrationType}});const y=n(75726);Object.defineProperty(t,"ShowDocumentRequest",{enumerable:!0,get:function(){return y.ShowDocumentRequest}});const v=n(26305);Object.defineProperty(t,"LinkedEditingRangeRequest",{enumerable:!0,get:function(){return v.LinkedEditingRangeRequest}});const b=n(37846);Object.defineProperty(t,"FileOperationPatternKind",{enumerable:!0,get:function(){return b.FileOperationPatternKind}}),Object.defineProperty(t,"DidCreateFilesNotification",{enumerable:!0,get:function(){return b.DidCreateFilesNotification}}),Object.defineProperty(t,"WillCreateFilesRequest",{enumerable:!0,get:function(){return b.WillCreateFilesRequest}}),Object.defineProperty(t,"DidRenameFilesNotification",{enumerable:!0,get:function(){return b.DidRenameFilesNotification}}),Object.defineProperty(t,"WillRenameFilesRequest",{enumerable:!0,get:function(){return b.WillRenameFilesRequest}}),Object.defineProperty(t,"DidDeleteFilesNotification",{enumerable:!0,get:function(){return b.DidDeleteFilesNotification}}),Object.defineProperty(t,"WillDeleteFilesRequest",{enumerable:!0,get:function(){return b.WillDeleteFilesRequest}});const S=n(73443);Object.defineProperty(t,"UniquenessLevel",{enumerable:!0,get:function(){return S.UniquenessLevel}}),Object.defineProperty(t,"MonikerKind",{enumerable:!0,get:function(){return S.MonikerKind}}),Object.defineProperty(t,"MonikerRequest",{enumerable:!0,get:function(){return S.MonikerRequest}});const k=n(83693);Object.defineProperty(t,"TypeHierarchyPrepareRequest",{enumerable:!0,get:function(){return k.TypeHierarchyPrepareRequest}}),Object.defineProperty(t,"TypeHierarchySubtypesRequest",{enumerable:!0,get:function(){return k.TypeHierarchySubtypesRequest}}),Object.defineProperty(t,"TypeHierarchySupertypesRequest",{enumerable:!0,get:function(){return k.TypeHierarchySupertypesRequest}});const T=n(55246);Object.defineProperty(t,"InlineValueRequest",{enumerable:!0,get:function(){return T.InlineValueRequest}}),Object.defineProperty(t,"InlineValueRefreshRequest",{enumerable:!0,get:function(){return T.InlineValueRefreshRequest}});const w=n(29999);Object.defineProperty(t,"InlayHintRequest",{enumerable:!0,get:function(){return w.InlayHintRequest}}),Object.defineProperty(t,"InlayHintResolveRequest",{enumerable:!0,get:function(){return w.InlayHintResolveRequest}}),Object.defineProperty(t,"InlayHintRefreshRequest",{enumerable:!0,get:function(){return w.InlayHintRefreshRequest}});const C=n(79824);Object.defineProperty(t,"DiagnosticServerCancellationData",{enumerable:!0,get:function(){return C.DiagnosticServerCancellationData}}),Object.defineProperty(t,"DocumentDiagnosticReportKind",{enumerable:!0,get:function(){return C.DocumentDiagnosticReportKind}}),Object.defineProperty(t,"DocumentDiagnosticRequest",{enumerable:!0,get:function(){return C.DocumentDiagnosticRequest}}),Object.defineProperty(t,"WorkspaceDiagnosticRequest",{enumerable:!0,get:function(){return C.WorkspaceDiagnosticRequest}}),Object.defineProperty(t,"DiagnosticRefreshRequest",{enumerable:!0,get:function(){return C.DiagnosticRefreshRequest}});const D=n(47169);var R,P,x,_;Object.defineProperty(t,"NotebookCellKind",{enumerable:!0,get:function(){return D.NotebookCellKind}}),Object.defineProperty(t,"ExecutionSummary",{enumerable:!0,get:function(){return D.ExecutionSummary}}),Object.defineProperty(t,"NotebookCell",{enumerable:!0,get:function(){return D.NotebookCell}}),Object.defineProperty(t,"NotebookDocument",{enumerable:!0,get:function(){return D.NotebookDocument}}),Object.defineProperty(t,"NotebookDocumentSyncRegistrationType",{enumerable:!0,get:function(){return D.NotebookDocumentSyncRegistrationType}}),Object.defineProperty(t,"DidOpenNotebookDocumentNotification",{enumerable:!0,get:function(){return D.DidOpenNotebookDocumentNotification}}),Object.defineProperty(t,"NotebookCellArrayChange",{enumerable:!0,get:function(){return D.NotebookCellArrayChange}}),Object.defineProperty(t,"DidChangeNotebookDocumentNotification",{enumerable:!0,get:function(){return D.DidChangeNotebookDocumentNotification}}),Object.defineProperty(t,"DidSaveNotebookDocumentNotification",{enumerable:!0,get:function(){return D.DidSaveNotebookDocumentNotification}}),Object.defineProperty(t,"DidCloseNotebookDocumentNotification",{enumerable:!0,get:function(){return D.DidCloseNotebookDocumentNotification}}),function(e){e.is=function is(e){const t=e;return r.string(t.language)||r.string(t.scheme)||r.string(t.pattern)}}(R=t.TextDocumentFilter||(t.TextDocumentFilter={})),function(e){e.is=function is(e){const t=e;return r.objectLiteral(t)&&(r.string(t.notebookType)||r.string(t.scheme)||r.string(t.pattern))}}(P=t.NotebookDocumentFilter||(t.NotebookDocumentFilter={})),function(e){e.is=function is(e){const t=e;return r.objectLiteral(t)&&(r.string(t.notebook)||P.is(t.notebook))&&(void 0===t.language||r.string(t.language))}}(x=t.NotebookCellTextDocumentFilter||(t.NotebookCellTextDocumentFilter={})),function(e){e.is=function is(e){if(!Array.isArray(e))return!1;for(let t of e)if(!r.string(t)&&!R.is(t)&&!x.is(t))return!1;return!0}}(_=t.DocumentSelector||(t.DocumentSelector={})),function(e){e.method="client/registerCapability",e.messageDirection=o.MessageDirection.serverToClient,e.type=new o.ProtocolRequestType(e.method)}(t.RegistrationRequest||(t.RegistrationRequest={})),function(e){e.method="client/unregisterCapability",e.messageDirection=o.MessageDirection.serverToClient,e.type=new o.ProtocolRequestType(e.method)}(t.UnregistrationRequest||(t.UnregistrationRequest={})),function(e){e.Create="create",e.Rename="rename",e.Delete="delete"}(t.ResourceOperationKind||(t.ResourceOperationKind={})),function(e){e.Abort="abort",e.Transactional="transactional",e.TextOnlyTransactional="textOnlyTransactional",e.Undo="undo"}(t.FailureHandlingKind||(t.FailureHandlingKind={})),function(e){e.UTF8="utf-8",e.UTF16="utf-16",e.UTF32="utf-32"}(t.PositionEncodingKind||(t.PositionEncodingKind={})),function(e){e.hasId=function hasId(e){const t=e;return t&&r.string(t.id)&&t.id.length>0}}(t.StaticRegistrationOptions||(t.StaticRegistrationOptions={})),function(e){e.is=function is(e){const t=e;return t&&(null===t.documentSelector||_.is(t.documentSelector))}}(t.TextDocumentRegistrationOptions||(t.TextDocumentRegistrationOptions={})),function(e){e.is=function is(e){const t=e;return r.objectLiteral(t)&&(void 0===t.workDoneProgress||r.boolean(t.workDoneProgress))},e.hasWorkDoneProgress=function hasWorkDoneProgress(e){const t=e;return t&&r.boolean(t.workDoneProgress)}}(t.WorkDoneProgressOptions||(t.WorkDoneProgressOptions={})),function(e){e.method="initialize",e.messageDirection=o.MessageDirection.clientToServer,e.type=new o.ProtocolRequestType(e.method)}(t.InitializeRequest||(t.InitializeRequest={})),function(e){e.unknownProtocolVersion=1}(t.InitializeErrorCodes||(t.InitializeErrorCodes={})),function(e){e.method="initialized",e.messageDirection=o.MessageDirection.clientToServer,e.type=new o.ProtocolNotificationType(e.method)}(t.InitializedNotification||(t.InitializedNotification={})),function(e){e.method="shutdown",e.messageDirection=o.MessageDirection.clientToServer,e.type=new o.ProtocolRequestType0(e.method)}(t.ShutdownRequest||(t.ShutdownRequest={})),function(e){e.method="exit",e.messageDirection=o.MessageDirection.clientToServer,e.type=new o.ProtocolNotificationType0(e.method)}(t.ExitNotification||(t.ExitNotification={})),function(e){e.method="workspace/didChangeConfiguration",e.messageDirection=o.MessageDirection.clientToServer,e.type=new o.ProtocolNotificationType(e.method)}(t.DidChangeConfigurationNotification||(t.DidChangeConfigurationNotification={})),function(e){e.Error=1,e.Warning=2,e.Info=3,e.Log=4}(t.MessageType||(t.MessageType={})),function(e){e.method="window/showMessage",e.messageDirection=o.MessageDirection.serverToClient,e.type=new o.ProtocolNotificationType(e.method)}(t.ShowMessageNotification||(t.ShowMessageNotification={})),function(e){e.method="window/showMessageRequest",e.messageDirection=o.MessageDirection.serverToClient,e.type=new o.ProtocolRequestType(e.method)}(t.ShowMessageRequest||(t.ShowMessageRequest={})),function(e){e.method="window/logMessage",e.messageDirection=o.MessageDirection.serverToClient,e.type=new o.ProtocolNotificationType(e.method)}(t.LogMessageNotification||(t.LogMessageNotification={})),function(e){e.method="telemetry/event",e.messageDirection=o.MessageDirection.serverToClient,e.type=new o.ProtocolNotificationType(e.method)}(t.TelemetryEventNotification||(t.TelemetryEventNotification={})),function(e){e.None=0,e.Full=1,e.Incremental=2}(t.TextDocumentSyncKind||(t.TextDocumentSyncKind={})),function(e){e.method="textDocument/didOpen",e.messageDirection=o.MessageDirection.clientToServer,e.type=new o.ProtocolNotificationType(e.method)}(t.DidOpenTextDocumentNotification||(t.DidOpenTextDocumentNotification={})),function(e){e.isIncremental=function isIncremental(e){let t=e;return null!=t&&"string"==typeof t.text&&void 0!==t.range&&(void 0===t.rangeLength||"number"==typeof t.rangeLength)},e.isFull=function isFull(e){let t=e;return null!=t&&"string"==typeof t.text&&void 0===t.range&&void 0===t.rangeLength}}(t.TextDocumentContentChangeEvent||(t.TextDocumentContentChangeEvent={})),function(e){e.method="textDocument/didChange",e.messageDirection=o.MessageDirection.clientToServer,e.type=new o.ProtocolNotificationType(e.method)}(t.DidChangeTextDocumentNotification||(t.DidChangeTextDocumentNotification={})),function(e){e.method="textDocument/didClose",e.messageDirection=o.MessageDirection.clientToServer,e.type=new o.ProtocolNotificationType(e.method)}(t.DidCloseTextDocumentNotification||(t.DidCloseTextDocumentNotification={})),function(e){e.method="textDocument/didSave",e.messageDirection=o.MessageDirection.clientToServer,e.type=new o.ProtocolNotificationType(e.method)}(t.DidSaveTextDocumentNotification||(t.DidSaveTextDocumentNotification={})),function(e){e.Manual=1,e.AfterDelay=2,e.FocusOut=3}(t.TextDocumentSaveReason||(t.TextDocumentSaveReason={})),function(e){e.method="textDocument/willSave",e.messageDirection=o.MessageDirection.clientToServer,e.type=new o.ProtocolNotificationType(e.method)}(t.WillSaveTextDocumentNotification||(t.WillSaveTextDocumentNotification={})),function(e){e.method="textDocument/willSaveWaitUntil",e.messageDirection=o.MessageDirection.clientToServer,e.type=new o.ProtocolRequestType(e.method)}(t.WillSaveTextDocumentWaitUntilRequest||(t.WillSaveTextDocumentWaitUntilRequest={})),function(e){e.method="workspace/didChangeWatchedFiles",e.messageDirection=o.MessageDirection.clientToServer,e.type=new o.ProtocolNotificationType(e.method)}(t.DidChangeWatchedFilesNotification||(t.DidChangeWatchedFilesNotification={})),function(e){e.Created=1,e.Changed=2,e.Deleted=3}(t.FileChangeType||(t.FileChangeType={})),function(e){e.is=function is(e){const t=e;return r.objectLiteral(t)&&(i.URI.is(t.baseUri)||i.WorkspaceFolder.is(t.baseUri))&&r.string(t.pattern)}}(t.RelativePattern||(t.RelativePattern={})),function(e){e.Create=1,e.Change=2,e.Delete=4}(t.WatchKind||(t.WatchKind={})),function(e){e.method="textDocument/publishDiagnostics",e.messageDirection=o.MessageDirection.serverToClient,e.type=new o.ProtocolNotificationType(e.method)}(t.PublishDiagnosticsNotification||(t.PublishDiagnosticsNotification={})),function(e){e.Invoked=1,e.TriggerCharacter=2,e.TriggerForIncompleteCompletions=3}(t.CompletionTriggerKind||(t.CompletionTriggerKind={})),function(e){e.method="textDocument/completion",e.messageDirection=o.MessageDirection.clientToServer,e.type=new o.ProtocolRequestType(e.method)}(t.CompletionRequest||(t.CompletionRequest={})),function(e){e.method="completionItem/resolve",e.messageDirection=o.MessageDirection.clientToServer,e.type=new o.ProtocolRequestType(e.method)}(t.CompletionResolveRequest||(t.CompletionResolveRequest={})),function(e){e.method="textDocument/hover",e.messageDirection=o.MessageDirection.clientToServer,e.type=new o.ProtocolRequestType(e.method)}(t.HoverRequest||(t.HoverRequest={})),function(e){e.Invoked=1,e.TriggerCharacter=2,e.ContentChange=3}(t.SignatureHelpTriggerKind||(t.SignatureHelpTriggerKind={})),function(e){e.method="textDocument/signatureHelp",e.messageDirection=o.MessageDirection.clientToServer,e.type=new o.ProtocolRequestType(e.method)}(t.SignatureHelpRequest||(t.SignatureHelpRequest={})),function(e){e.method="textDocument/definition",e.messageDirection=o.MessageDirection.clientToServer,e.type=new o.ProtocolRequestType(e.method)}(t.DefinitionRequest||(t.DefinitionRequest={})),function(e){e.method="textDocument/references",e.messageDirection=o.MessageDirection.clientToServer,e.type=new o.ProtocolRequestType(e.method)}(t.ReferencesRequest||(t.ReferencesRequest={})),function(e){e.method="textDocument/documentHighlight",e.messageDirection=o.MessageDirection.clientToServer,e.type=new o.ProtocolRequestType(e.method)}(t.DocumentHighlightRequest||(t.DocumentHighlightRequest={})),function(e){e.method="textDocument/documentSymbol",e.messageDirection=o.MessageDirection.clientToServer,e.type=new o.ProtocolRequestType(e.method)}(t.DocumentSymbolRequest||(t.DocumentSymbolRequest={})),function(e){e.method="textDocument/codeAction",e.messageDirection=o.MessageDirection.clientToServer,e.type=new o.ProtocolRequestType(e.method)}(t.CodeActionRequest||(t.CodeActionRequest={})),function(e){e.method="codeAction/resolve",e.messageDirection=o.MessageDirection.clientToServer,e.type=new o.ProtocolRequestType(e.method)}(t.CodeActionResolveRequest||(t.CodeActionResolveRequest={})),function(e){e.method="workspace/symbol",e.messageDirection=o.MessageDirection.clientToServer,e.type=new o.ProtocolRequestType(e.method)}(t.WorkspaceSymbolRequest||(t.WorkspaceSymbolRequest={})),function(e){e.method="workspaceSymbol/resolve",e.messageDirection=o.MessageDirection.clientToServer,e.type=new o.ProtocolRequestType(e.method)}(t.WorkspaceSymbolResolveRequest||(t.WorkspaceSymbolResolveRequest={})),function(e){e.method="textDocument/codeLens",e.messageDirection=o.MessageDirection.clientToServer,e.type=new o.ProtocolRequestType(e.method)}(t.CodeLensRequest||(t.CodeLensRequest={})),function(e){e.method="codeLens/resolve",e.messageDirection=o.MessageDirection.clientToServer,e.type=new o.ProtocolRequestType(e.method)}(t.CodeLensResolveRequest||(t.CodeLensResolveRequest={})),function(e){e.method="workspace/codeLens/refresh",e.messageDirection=o.MessageDirection.serverToClient,e.type=new o.ProtocolRequestType0(e.method)}(t.CodeLensRefreshRequest||(t.CodeLensRefreshRequest={})),function(e){e.method="textDocument/documentLink",e.messageDirection=o.MessageDirection.clientToServer,e.type=new o.ProtocolRequestType(e.method)}(t.DocumentLinkRequest||(t.DocumentLinkRequest={})),function(e){e.method="documentLink/resolve",e.messageDirection=o.MessageDirection.clientToServer,e.type=new o.ProtocolRequestType(e.method)}(t.DocumentLinkResolveRequest||(t.DocumentLinkResolveRequest={})),function(e){e.method="textDocument/formatting",e.messageDirection=o.MessageDirection.clientToServer,e.type=new o.ProtocolRequestType(e.method)}(t.DocumentFormattingRequest||(t.DocumentFormattingRequest={})),function(e){e.method="textDocument/rangeFormatting",e.messageDirection=o.MessageDirection.clientToServer,e.type=new o.ProtocolRequestType(e.method)}(t.DocumentRangeFormattingRequest||(t.DocumentRangeFormattingRequest={})),function(e){e.method="textDocument/onTypeFormatting",e.messageDirection=o.MessageDirection.clientToServer,e.type=new o.ProtocolRequestType(e.method)}(t.DocumentOnTypeFormattingRequest||(t.DocumentOnTypeFormattingRequest={})),function(e){e.Identifier=1}(t.PrepareSupportDefaultBehavior||(t.PrepareSupportDefaultBehavior={})),function(e){e.method="textDocument/rename",e.messageDirection=o.MessageDirection.clientToServer,e.type=new o.ProtocolRequestType(e.method)}(t.RenameRequest||(t.RenameRequest={})),function(e){e.method="textDocument/prepareRename",e.messageDirection=o.MessageDirection.clientToServer,e.type=new o.ProtocolRequestType(e.method)}(t.PrepareRenameRequest||(t.PrepareRenameRequest={})),function(e){e.method="workspace/executeCommand",e.messageDirection=o.MessageDirection.clientToServer,e.type=new o.ProtocolRequestType(e.method)}(t.ExecuteCommandRequest||(t.ExecuteCommandRequest={})),function(e){e.method="workspace/applyEdit",e.messageDirection=o.MessageDirection.serverToClient,e.type=new o.ProtocolRequestType("workspace/applyEdit")}(t.ApplyWorkspaceEditRequest||(t.ApplyWorkspaceEditRequest={}))},26305:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.LinkedEditingRangeRequest=void 0;const o=n(66140);!function(e){e.method="textDocument/linkedEditingRange",e.messageDirection=o.MessageDirection.clientToServer,e.type=new o.ProtocolRequestType(e.method)}(t.LinkedEditingRangeRequest||(t.LinkedEditingRangeRequest={}))},73443:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.MonikerRequest=t.MonikerKind=t.UniquenessLevel=void 0;const o=n(66140);!function(e){e.document="document",e.project="project",e.group="group",e.scheme="scheme",e.global="global"}(t.UniquenessLevel||(t.UniquenessLevel={})),function(e){e.$import="import",e.$export="export",e.local="local"}(t.MonikerKind||(t.MonikerKind={})),function(e){e.method="textDocument/moniker",e.messageDirection=o.MessageDirection.clientToServer,e.type=new o.ProtocolRequestType(e.method)}(t.MonikerRequest||(t.MonikerRequest={}))},47169:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DidCloseNotebookDocumentNotification=t.DidSaveNotebookDocumentNotification=t.DidChangeNotebookDocumentNotification=t.NotebookCellArrayChange=t.DidOpenNotebookDocumentNotification=t.NotebookDocumentSyncRegistrationType=t.NotebookDocument=t.NotebookCell=t.ExecutionSummary=t.NotebookCellKind=void 0;const o=n(28661),i=n(69533),r=n(66140);var s,a,c,l;!function(e){e.Markup=1,e.Code=2,e.is=function is(e){return 1===e||2===e}}(s=t.NotebookCellKind||(t.NotebookCellKind={})),function(e){e.create=function create(e,t){const n={executionOrder:e};return!0!==t&&!1!==t||(n.success=t),n},e.is=function is(e){const t=e;return i.objectLiteral(t)&&o.uinteger.is(t.executionOrder)&&(void 0===t.success||i.boolean(t.success))},e.equals=function equals(e,t){return e===t||null!=e&&null!=t&&(e.executionOrder===t.executionOrder&&e.success===t.success)}}(a=t.ExecutionSummary||(t.ExecutionSummary={})),function(e){function equalsMetadata(e,t){if(e===t)return!0;if(null==e||null==t)return!1;if(typeof e!=typeof t)return!1;if("object"!=typeof e)return!1;const n=Array.isArray(e),o=Array.isArray(t);if(n!==o)return!1;if(n&&o){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(!equalsMetadata(e[n],t[n]))return!1}if(i.objectLiteral(e)&&i.objectLiteral(t)){const n=Object.keys(e),o=Object.keys(t);if(n.length!==o.length)return!1;if(n.sort(),o.sort(),!equalsMetadata(n,o))return!1;for(let o=0;o<n.length;o++){const i=n[o];if(!equalsMetadata(e[i],t[i]))return!1}}return!0}e.create=function create(e,t){return{kind:e,document:t}},e.is=function is(e){const t=e;return i.objectLiteral(t)&&s.is(t.kind)&&o.DocumentUri.is(t.document)&&(void 0===t.metadata||i.objectLiteral(t.metadata))},e.diff=function diff(e,t){const n=new Set;return e.document!==t.document&&n.add("document"),e.kind!==t.kind&&n.add("kind"),e.executionSummary!==t.executionSummary&&n.add("executionSummary"),void 0===e.metadata&&void 0===t.metadata||equalsMetadata(e.metadata,t.metadata)||n.add("metadata"),void 0===e.executionSummary&&void 0===t.executionSummary||a.equals(e.executionSummary,t.executionSummary)||n.add("executionSummary"),n}}(c=t.NotebookCell||(t.NotebookCell={})),function(e){e.create=function create(e,t,n,o){return{uri:e,notebookType:t,version:n,cells:o}},e.is=function is(e){const t=e;return i.objectLiteral(t)&&i.string(t.uri)&&o.integer.is(t.version)&&i.typedArray(t.cells,c.is)}}(t.NotebookDocument||(t.NotebookDocument={})),function(e){e.method="notebookDocument/sync",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.RegistrationType(e.method)}(l=t.NotebookDocumentSyncRegistrationType||(t.NotebookDocumentSyncRegistrationType={})),function(e){e.method="notebookDocument/didOpen",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolNotificationType(e.method),e.registrationMethod=l.method}(t.DidOpenNotebookDocumentNotification||(t.DidOpenNotebookDocumentNotification={})),function(e){e.is=function is(e){const t=e;return i.objectLiteral(t)&&o.uinteger.is(t.start)&&o.uinteger.is(t.deleteCount)&&(void 0===t.cells||i.typedArray(t.cells,c.is))},e.create=function create(e,t,n){const o={start:e,deleteCount:t};return void 0!==n&&(o.cells=n),o}}(t.NotebookCellArrayChange||(t.NotebookCellArrayChange={})),function(e){e.method="notebookDocument/didChange",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolNotificationType(e.method),e.registrationMethod=l.method}(t.DidChangeNotebookDocumentNotification||(t.DidChangeNotebookDocumentNotification={})),function(e){e.method="notebookDocument/didSave",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolNotificationType(e.method),e.registrationMethod=l.method}(t.DidSaveNotebookDocumentNotification||(t.DidSaveNotebookDocumentNotification={})),function(e){e.method="notebookDocument/didClose",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolNotificationType(e.method),e.registrationMethod=l.method}(t.DidCloseNotebookDocumentNotification||(t.DidCloseNotebookDocumentNotification={}))},21862:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.WorkDoneProgressCancelNotification=t.WorkDoneProgressCreateRequest=t.WorkDoneProgress=void 0;const o=n(74389),i=n(66140);!function(e){e.type=new o.ProgressType,e.is=function is(t){return t===e.type}}(t.WorkDoneProgress||(t.WorkDoneProgress={})),function(e){e.method="window/workDoneProgress/create",e.messageDirection=i.MessageDirection.serverToClient,e.type=new i.ProtocolRequestType(e.method)}(t.WorkDoneProgressCreateRequest||(t.WorkDoneProgressCreateRequest={})),function(e){e.method="window/workDoneProgress/cancel",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolNotificationType(e.method)}(t.WorkDoneProgressCancelNotification||(t.WorkDoneProgressCancelNotification={}))},5206:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SelectionRangeRequest=void 0;const o=n(66140);!function(e){e.method="textDocument/selectionRange",e.messageDirection=o.MessageDirection.clientToServer,e.type=new o.ProtocolRequestType(e.method)}(t.SelectionRangeRequest||(t.SelectionRangeRequest={}))},39434:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SemanticTokensRefreshRequest=t.SemanticTokensRangeRequest=t.SemanticTokensDeltaRequest=t.SemanticTokensRequest=t.SemanticTokensRegistrationType=t.TokenFormat=void 0;const o=n(66140);var i;!function(e){e.Relative="relative"}(t.TokenFormat||(t.TokenFormat={})),function(e){e.method="textDocument/semanticTokens",e.type=new o.RegistrationType(e.method)}(i=t.SemanticTokensRegistrationType||(t.SemanticTokensRegistrationType={})),function(e){e.method="textDocument/semanticTokens/full",e.messageDirection=o.MessageDirection.clientToServer,e.type=new o.ProtocolRequestType(e.method),e.registrationMethod=i.method}(t.SemanticTokensRequest||(t.SemanticTokensRequest={})),function(e){e.method="textDocument/semanticTokens/full/delta",e.messageDirection=o.MessageDirection.clientToServer,e.type=new o.ProtocolRequestType(e.method),e.registrationMethod=i.method}(t.SemanticTokensDeltaRequest||(t.SemanticTokensDeltaRequest={})),function(e){e.method="textDocument/semanticTokens/range",e.messageDirection=o.MessageDirection.clientToServer,e.type=new o.ProtocolRequestType(e.method),e.registrationMethod=i.method}(t.SemanticTokensRangeRequest||(t.SemanticTokensRangeRequest={})),function(e){e.method="workspace/semanticTokens/refresh",e.messageDirection=o.MessageDirection.serverToClient,e.type=new o.ProtocolRequestType0(e.method)}(t.SemanticTokensRefreshRequest||(t.SemanticTokensRefreshRequest={}))},75726:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ShowDocumentRequest=void 0;const o=n(66140);!function(e){e.method="window/showDocument",e.messageDirection=o.MessageDirection.serverToClient,e.type=new o.ProtocolRequestType(e.method)}(t.ShowDocumentRequest||(t.ShowDocumentRequest={}))},71589:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TypeDefinitionRequest=void 0;const o=n(66140);!function(e){e.method="textDocument/typeDefinition",e.messageDirection=o.MessageDirection.clientToServer,e.type=new o.ProtocolRequestType(e.method)}(t.TypeDefinitionRequest||(t.TypeDefinitionRequest={}))},83693:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TypeHierarchySubtypesRequest=t.TypeHierarchySupertypesRequest=t.TypeHierarchyPrepareRequest=void 0;const o=n(66140);!function(e){e.method="textDocument/prepareTypeHierarchy",e.messageDirection=o.MessageDirection.clientToServer,e.type=new o.ProtocolRequestType(e.method)}(t.TypeHierarchyPrepareRequest||(t.TypeHierarchyPrepareRequest={})),function(e){e.method="typeHierarchy/supertypes",e.messageDirection=o.MessageDirection.clientToServer,e.type=new o.ProtocolRequestType(e.method)}(t.TypeHierarchySupertypesRequest||(t.TypeHierarchySupertypesRequest={})),function(e){e.method="typeHierarchy/subtypes",e.messageDirection=o.MessageDirection.clientToServer,e.type=new o.ProtocolRequestType(e.method)}(t.TypeHierarchySubtypesRequest||(t.TypeHierarchySubtypesRequest={}))},98744:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DidChangeWorkspaceFoldersNotification=t.WorkspaceFoldersRequest=void 0;const o=n(66140);!function(e){e.method="workspace/workspaceFolders",e.messageDirection=o.MessageDirection.serverToClient,e.type=new o.ProtocolRequestType0(e.method)}(t.WorkspaceFoldersRequest||(t.WorkspaceFoldersRequest={})),function(e){e.method="workspace/didChangeWorkspaceFolders",e.messageDirection=o.MessageDirection.clientToServer,e.type=new o.ProtocolNotificationType(e.method)}(t.DidChangeWorkspaceFoldersNotification||(t.DidChangeWorkspaceFoldersNotification={}))},69533:(e,t)=>{function string(e){return"string"==typeof e||e instanceof String}function array(e){return Array.isArray(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.objectLiteral=t.typedArray=t.stringArray=t.array=t.func=t.error=t.number=t.string=t.boolean=void 0,t.boolean=function boolean(e){return!0===e||!1===e},t.string=string,t.number=function number(e){return"number"==typeof e||e instanceof Number},t.error=function error(e){return e instanceof Error},t.func=function func(e){return"function"==typeof e},t.array=array,t.stringArray=function stringArray(e){return array(e)&&e.every((e=>string(e)))},t.typedArray=function typedArray(e,t){return Array.isArray(e)&&e.every(t)},t.objectLiteral=function objectLiteral(e){return null!==e&&"object"==typeof e}},40273:function(e,t,n){var o=this&&this.__createBinding||(Object.create?function(e,t,n,o){void 0===o&&(o=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,o,i)}:function(e,t,n,o){void 0===o&&(o=n),e[o]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||o(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.createProtocolConnection=void 0;const r=n(95028);i(n(95028),t),i(n(51661),t),t.createProtocolConnection=function createProtocolConnection(e,t,n,o){return(0,r.createMessageConnection)(e,t,n,o)}},96560:(e,t,n)=>{e.exports=n(40273)},31040:(e,t,n)=>{n.r(t),n.d(t,{TextDocument:()=>o});var o,__spreadArray=function(e,t,n){if(n||2===arguments.length)for(var o,i=0,r=t.length;i<r;i++)!o&&i in t||(o||(o=Array.prototype.slice.call(t,0,i)),o[i]=t[i]);return e.concat(o||Array.prototype.slice.call(t))},i=function(){function FullTextDocument(e,t,n,o){this._uri=e,this._languageId=t,this._version=n,this._content=o,this._lineOffsets=void 0}return Object.defineProperty(FullTextDocument.prototype,"uri",{get:function(){return this._uri},enumerable:!1,configurable:!0}),Object.defineProperty(FullTextDocument.prototype,"languageId",{get:function(){return this._languageId},enumerable:!1,configurable:!0}),Object.defineProperty(FullTextDocument.prototype,"version",{get:function(){return this._version},enumerable:!1,configurable:!0}),FullTextDocument.prototype.getText=function(e){if(e){var t=this.offsetAt(e.start),n=this.offsetAt(e.end);return this._content.substring(t,n)}return this._content},FullTextDocument.prototype.update=function(e,t){for(var n=0,o=e;n<o.length;n++){var i=o[n];if(FullTextDocument.isIncremental(i)){var r=getWellformedRange(i.range),s=this.offsetAt(r.start),a=this.offsetAt(r.end);this._content=this._content.substring(0,s)+i.text+this._content.substring(a,this._content.length);var c=Math.max(r.start.line,0),l=Math.max(r.end.line,0),u=this._lineOffsets,d=computeLineOffsets(i.text,!1,s);if(l-c===d.length)for(var f=0,p=d.length;f<p;f++)u[f+c+1]=d[f];else d.length<1e4?u.splice.apply(u,__spreadArray([c+1,l-c],d,!1)):this._lineOffsets=u=u.slice(0,c+1).concat(d,u.slice(l+1));var h=i.text.length-(a-s);if(0!==h)for(f=c+1+d.length,p=u.length;f<p;f++)u[f]=u[f]+h}else{if(!FullTextDocument.isFull(i))throw new Error("Unknown change event received");this._content=i.text,this._lineOffsets=void 0}}this._version=t},FullTextDocument.prototype.getLineOffsets=function(){return void 0===this._lineOffsets&&(this._lineOffsets=computeLineOffsets(this._content,!0)),this._lineOffsets},FullTextDocument.prototype.positionAt=function(e){e=Math.max(Math.min(e,this._content.length),0);var t=this.getLineOffsets(),n=0,o=t.length;if(0===o)return{line:0,character:e};for(;n<o;){var i=Math.floor((n+o)/2);t[i]>e?o=i:n=i+1}var r=n-1;return{line:r,character:e-t[r]}},FullTextDocument.prototype.offsetAt=function(e){var t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;var n=t[e.line],o=e.line+1<t.length?t[e.line+1]:this._content.length;return Math.max(Math.min(n+e.character,o),n)},Object.defineProperty(FullTextDocument.prototype,"lineCount",{get:function(){return this.getLineOffsets().length},enumerable:!1,configurable:!0}),FullTextDocument.isIncremental=function(e){var t=e;return null!=t&&"string"==typeof t.text&&void 0!==t.range&&(void 0===t.rangeLength||"number"==typeof t.rangeLength)},FullTextDocument.isFull=function(e){var t=e;return null!=t&&"string"==typeof t.text&&void 0===t.range&&void 0===t.rangeLength},FullTextDocument}();function mergeSort(e,t){if(e.length<=1)return e;var n=e.length/2|0,o=e.slice(0,n),i=e.slice(n);mergeSort(o,t),mergeSort(i,t);for(var r=0,s=0,a=0;r<o.length&&s<i.length;){var c=t(o[r],i[s]);e[a++]=c<=0?o[r++]:i[s++]}for(;r<o.length;)e[a++]=o[r++];for(;s<i.length;)e[a++]=i[s++];return e}function computeLineOffsets(e,t,n){void 0===n&&(n=0);for(var o=t?[n]:[],i=0;i<e.length;i++){var r=e.charCodeAt(i);13!==r&&10!==r||(13===r&&i+1<e.length&&10===e.charCodeAt(i+1)&&i++,o.push(n+i+1))}return o}function getWellformedRange(e){var t=e.start,n=e.end;return t.line>n.line||t.line===n.line&&t.character>n.character?{start:n,end:t}:e}function getWellformedEdit(e){var t=getWellformedRange(e.range);return t!==e.range?{newText:e.newText,range:t}:e}!function(e){e.create=function create(e,t,n,o){return new i(e,t,n,o)},e.update=function update(e,t,n){if(e instanceof i)return e.update(t,n),e;throw new Error("TextDocument.update: document must be created by TextDocument.create")},e.applyEdits=function applyEdits(e,t){for(var n=e.getText(),o=0,i=[],r=0,s=mergeSort(t.map(getWellformedEdit),(function(e,t){var n=e.range.start.line-t.range.start.line;return 0===n?e.range.start.character-t.range.start.character:n}));r<s.length;r++){var a=s[r],c=e.offsetAt(a.range.start);if(c<o)throw new Error("Overlapping edit");c>o&&i.push(n.substring(o,c)),a.newText.length&&i.push(a.newText),o=e.offsetAt(a.range.end)}return i.push(n.substr(o)),i.join("")}}(o||(o={}))},76265:function(e,t,n){var o=this&&this.__createBinding||(Object.create?function(e,t,n,o){void 0===o&&(o=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,o,i)}:function(e,t,n,o){void 0===o&&(o=n),e[o]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||o(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.ProposedFeatures=t.NotebookDocuments=t.TextDocuments=t.SemanticTokensBuilder=void 0;const r=n(59817);Object.defineProperty(t,"SemanticTokensBuilder",{enumerable:!0,get:function(){return r.SemanticTokensBuilder}}),i(n(40273),t);const s=n(38382);Object.defineProperty(t,"TextDocuments",{enumerable:!0,get:function(){return s.TextDocuments}});const a=n(29748);Object.defineProperty(t,"NotebookDocuments",{enumerable:!0,get:function(){return a.NotebookDocuments}}),i(n(49891),t),function(e){e.all={__brand:"features"}}(t.ProposedFeatures||(t.ProposedFeatures={}))},47985:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CallHierarchyFeature=void 0;const o=n(40273);t.CallHierarchyFeature=e=>class extends e{get callHierarchy(){return{onPrepare:e=>this.connection.onRequest(o.CallHierarchyPrepareRequest.type,((t,n)=>e(t,n,this.attachWorkDoneProgress(t),void 0))),onIncomingCalls:e=>{const t=o.CallHierarchyIncomingCallsRequest.type;return this.connection.onRequest(t,((n,o)=>e(n,o,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(t,n))))},onOutgoingCalls:e=>{const t=o.CallHierarchyOutgoingCallsRequest.type;return this.connection.onRequest(t,((n,o)=>e(n,o,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(t,n))))}}}}},52507:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ConfigurationFeature=void 0;const o=n(40273),i=n(40289);t.ConfigurationFeature=e=>class extends e{getConfiguration(e){return e?i.string(e)?this._getConfiguration({section:e}):this._getConfiguration(e):this._getConfiguration({})}_getConfiguration(e){let t={items:Array.isArray(e)?e:[e]};return this.connection.sendRequest(o.ConfigurationRequest.type,t).then((t=>Array.isArray(t)?Array.isArray(e)?t:t[0]:Array.isArray(e)?[]:null))}}},6634:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DiagnosticFeature=void 0;const o=n(40273);t.DiagnosticFeature=e=>class extends e{get diagnostics(){return{refresh:()=>this.connection.sendRequest(o.DiagnosticRefreshRequest.type),on:e=>this.connection.onRequest(o.DocumentDiagnosticRequest.type,((t,n)=>e(t,n,this.attachWorkDoneProgress(t),this.attachPartialResultProgress(o.DocumentDiagnosticRequest.partialResult,t)))),onWorkspace:e=>this.connection.onRequest(o.WorkspaceDiagnosticRequest.type,((t,n)=>e(t,n,this.attachWorkDoneProgress(t),this.attachPartialResultProgress(o.WorkspaceDiagnosticRequest.partialResult,t))))}}}},50828:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.FileOperationsFeature=void 0;const o=n(40273);t.FileOperationsFeature=e=>class extends e{onDidCreateFiles(e){return this.connection.onNotification(o.DidCreateFilesNotification.type,(t=>{e(t)}))}onDidRenameFiles(e){return this.connection.onNotification(o.DidRenameFilesNotification.type,(t=>{e(t)}))}onDidDeleteFiles(e){return this.connection.onNotification(o.DidDeleteFilesNotification.type,(t=>{e(t)}))}onWillCreateFiles(e){return this.connection.onRequest(o.WillCreateFilesRequest.type,((t,n)=>e(t,n)))}onWillRenameFiles(e){return this.connection.onRequest(o.WillRenameFilesRequest.type,((t,n)=>e(t,n)))}onWillDeleteFiles(e){return this.connection.onRequest(o.WillDeleteFilesRequest.type,((t,n)=>e(t,n)))}}},46507:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.InlayHintFeature=void 0;const o=n(40273);t.InlayHintFeature=e=>class extends e{get inlayHint(){return{refresh:()=>this.connection.sendRequest(o.InlayHintRefreshRequest.type),on:e=>this.connection.onRequest(o.InlayHintRequest.type,((t,n)=>e(t,n,this.attachWorkDoneProgress(t)))),resolve:e=>this.connection.onRequest(o.InlayHintResolveRequest.type,((t,n)=>e(t,n)))}}}},58970:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.InlineValueFeature=void 0;const o=n(40273);t.InlineValueFeature=e=>class extends e{get inlineValue(){return{refresh:()=>this.connection.sendRequest(o.InlineValueRefreshRequest.type),on:e=>this.connection.onRequest(o.InlineValueRequest.type,((t,n)=>e(t,n,this.attachWorkDoneProgress(t))))}}}},22776:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.LinkedEditingRangeFeature=void 0;const o=n(40273);t.LinkedEditingRangeFeature=e=>class extends e{onLinkedEditingRange(e){return this.connection.onRequest(o.LinkedEditingRangeRequest.type,((t,n)=>e(t,n,this.attachWorkDoneProgress(t),void 0)))}}},8120:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.MonikerFeature=void 0;const o=n(40273);t.MonikerFeature=e=>class extends e{get moniker(){return{on:e=>{const t=o.MonikerRequest.type;return this.connection.onRequest(t,((n,o)=>e(n,o,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(t,n))))}}}}},29748:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.NotebookDocuments=t.NotebookSyncFeature=void 0;const o=n(40273),i=n(38382);t.NotebookSyncFeature=e=>class extends e{get synchronization(){return{onDidOpenNotebookDocument:e=>this.connection.onNotification(o.DidOpenNotebookDocumentNotification.type,(t=>{e(t)})),onDidChangeNotebookDocument:e=>this.connection.onNotification(o.DidChangeNotebookDocumentNotification.type,(t=>{e(t)})),onDidSaveNotebookDocument:e=>this.connection.onNotification(o.DidSaveNotebookDocumentNotification.type,(t=>{e(t)})),onDidCloseNotebookDocument:e=>this.connection.onNotification(o.DidCloseNotebookDocumentNotification.type,(t=>{e(t)}))}}};class CellTextDocumentConnection{onDidOpenTextDocument(e){return this.openHandler=e,o.Disposable.create((()=>{this.openHandler=void 0}))}openTextDocument(e){this.openHandler&&this.openHandler(e)}onDidChangeTextDocument(e){return this.changeHandler=e,o.Disposable.create((()=>{this.changeHandler=e}))}changeTextDocument(e){this.changeHandler&&this.changeHandler(e)}onDidCloseTextDocument(e){return this.closeHandler=e,o.Disposable.create((()=>{this.closeHandler=void 0}))}closeTextDocument(e){this.closeHandler&&this.closeHandler(e)}onWillSaveTextDocument(){return CellTextDocumentConnection.NULL_DISPOSE}onWillSaveTextDocumentWaitUntil(){return CellTextDocumentConnection.NULL_DISPOSE}onDidSaveTextDocument(){return CellTextDocumentConnection.NULL_DISPOSE}}CellTextDocumentConnection.NULL_DISPOSE=Object.freeze({dispose:()=>{}});t.NotebookDocuments=class NotebookDocuments{constructor(e){e instanceof i.TextDocuments?this._cellTextDocuments=e:this._cellTextDocuments=new i.TextDocuments(e),this.notebookDocuments=new Map,this.notebookCellMap=new Map,this._onDidOpen=new o.Emitter,this._onDidChange=new o.Emitter,this._onDidSave=new o.Emitter,this._onDidClose=new o.Emitter}get cellTextDocuments(){return this._cellTextDocuments}getCellTextDocument(e){return this._cellTextDocuments.get(e.document)}getNotebookDocument(e){return this.notebookDocuments.get(e)}getNotebookCell(e){const t=this.notebookCellMap.get(e);return t&&t[0]}findNotebookDocumentForCell(e){const t="string"==typeof e?e:e.document,n=this.notebookCellMap.get(t);return n&&n[1]}get onDidOpen(){return this._onDidOpen.event}get onDidSave(){return this._onDidSave.event}get onDidChange(){return this._onDidChange.event}get onDidClose(){return this._onDidClose.event}listen(e){const t=new CellTextDocumentConnection,n=[];return n.push(this.cellTextDocuments.listen(t)),n.push(e.notebooks.synchronization.onDidOpenNotebookDocument((e=>{this.notebookDocuments.set(e.notebookDocument.uri,e.notebookDocument);for(const n of e.cellTextDocuments)t.openTextDocument({textDocument:n});this.updateCellMap(e.notebookDocument),this._onDidOpen.fire(e.notebookDocument)}))),n.push(e.notebooks.synchronization.onDidChangeNotebookDocument((e=>{const n=this.notebookDocuments.get(e.notebookDocument.uri);if(void 0===n)return;n.version=e.notebookDocument.version;const o=n.metadata;let i=!1;const r=e.change;void 0!==r.metadata&&(i=!0,n.metadata=r.metadata);const s=[],a=[],c=[],l=[];if(void 0!==r.cells){const e=r.cells;if(void 0!==e.structure){const o=e.structure.array;if(n.cells.splice(o.start,o.deleteCount,...void 0!==o.cells?o.cells:[]),void 0!==e.structure.didOpen)for(const n of e.structure.didOpen)t.openTextDocument({textDocument:n}),s.push(n.uri);if(e.structure.didClose)for(const n of e.structure.didClose)t.closeTextDocument({textDocument:n}),a.push(n.uri)}if(void 0!==e.data){const t=new Map(e.data.map((e=>[e.document,e])));for(let e=0;e<=n.cells.length;e++){const o=t.get(n.cells[e].document);if(void 0!==o){const i=n.cells.splice(e,1,o);if(c.push({old:i[0],new:o}),t.delete(o.document),0===t.size)break}}}if(void 0!==e.textContent)for(const n of e.textContent)t.changeTextDocument({textDocument:n.document,contentChanges:n.changes}),l.push(n.document.uri)}this.updateCellMap(n);const u={notebookDocument:n};i&&(u.metadata={old:o,new:n.metadata});const d=[];for(const e of s)d.push(this.getNotebookCell(e));const f=[];for(const e of a)f.push(this.getNotebookCell(e));const p=[];for(const e of l)p.push(this.getNotebookCell(e));(d.length>0||f.length>0||c.length>0||p.length>0)&&(u.cells={added:d,removed:f,changed:{data:c,textContent:p}}),void 0===u.metadata&&void 0===u.cells||this._onDidChange.fire(u)}))),n.push(e.notebooks.synchronization.onDidSaveNotebookDocument((e=>{const t=this.notebookDocuments.get(e.notebookDocument.uri);void 0!==t&&this._onDidSave.fire(t)}))),n.push(e.notebooks.synchronization.onDidCloseNotebookDocument((e=>{const n=this.notebookDocuments.get(e.notebookDocument.uri);if(void 0!==n){this._onDidClose.fire(n);for(const n of e.cellTextDocuments)t.closeTextDocument({textDocument:n});this.notebookDocuments.delete(e.notebookDocument.uri);for(const e of n.cells)this.notebookCellMap.delete(e.document)}}))),o.Disposable.create((()=>{n.forEach((e=>e.dispose()))}))}updateCellMap(e){for(const t of e.cells)this.notebookCellMap.set(t.document,[t,e])}}},42731:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.attachPartialResult=t.ProgressFeature=t.attachWorkDone=void 0;const o=n(40273),i=n(37560);class WorkDoneProgressReporterImpl{constructor(e,t){this._connection=e,this._token=t,WorkDoneProgressReporterImpl.Instances.set(this._token,this)}begin(e,t,n,i){let r={kind:"begin",title:e,percentage:t,message:n,cancellable:i};this._connection.sendProgress(o.WorkDoneProgress.type,this._token,r)}report(e,t){let n={kind:"report"};"number"==typeof e?(n.percentage=e,void 0!==t&&(n.message=t)):n.message=e,this._connection.sendProgress(o.WorkDoneProgress.type,this._token,n)}done(){WorkDoneProgressReporterImpl.Instances.delete(this._token),this._connection.sendProgress(o.WorkDoneProgress.type,this._token,{kind:"end"})}}WorkDoneProgressReporterImpl.Instances=new Map;class WorkDoneProgressServerReporterImpl extends WorkDoneProgressReporterImpl{constructor(e,t){super(e,t),this._source=new o.CancellationTokenSource}get token(){return this._source.token}done(){this._source.dispose(),super.done()}cancel(){this._source.cancel()}}class NullProgressReporter{constructor(){}begin(){}report(){}done(){}}class NullProgressServerReporter extends NullProgressReporter{constructor(){super(),this._source=new o.CancellationTokenSource}get token(){return this._source.token}done(){this._source.dispose()}cancel(){this._source.cancel()}}t.attachWorkDone=function attachWorkDone(e,t){if(void 0===t||void 0===t.workDoneToken)return new NullProgressReporter;const n=t.workDoneToken;return delete t.workDoneToken,new WorkDoneProgressReporterImpl(e,n)};var r;t.ProgressFeature=e=>class extends e{constructor(){super(),this._progressSupported=!1}initialize(e){super.initialize(e),!0===e?.window?.workDoneProgress&&(this._progressSupported=!0,this.connection.onNotification(o.WorkDoneProgressCancelNotification.type,(e=>{let t=WorkDoneProgressReporterImpl.Instances.get(e.token);(t instanceof WorkDoneProgressServerReporterImpl||t instanceof NullProgressServerReporter)&&t.cancel()})))}attachWorkDoneProgress(e){return void 0===e?new NullProgressReporter:new WorkDoneProgressReporterImpl(this.connection,e)}createWorkDoneProgress(){if(this._progressSupported){const e=(0,i.generateUuid)();return this.connection.sendRequest(o.WorkDoneProgressCreateRequest.type,{token:e}).then((()=>new WorkDoneProgressServerReporterImpl(this.connection,e)))}return Promise.resolve(new NullProgressServerReporter)}},function(e){e.type=new o.ProgressType}(r||(r={}));class ResultProgressReporterImpl{constructor(e,t){this._connection=e,this._token=t}report(e){this._connection.sendProgress(r.type,this._token,e)}}t.attachPartialResult=function attachPartialResult(e,t){if(void 0===t||void 0===t.partialResultToken)return;const n=t.partialResultToken;return delete t.partialResultToken,new ResultProgressReporterImpl(e,n)}},59817:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SemanticTokensBuilder=t.SemanticTokensDiff=t.SemanticTokensFeature=void 0;const o=n(40273);t.SemanticTokensFeature=e=>class extends e{get semanticTokens(){return{refresh:()=>this.connection.sendRequest(o.SemanticTokensRefreshRequest.type),on:e=>{const t=o.SemanticTokensRequest.type;return this.connection.onRequest(t,((n,o)=>e(n,o,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(t,n))))},onDelta:e=>{const t=o.SemanticTokensDeltaRequest.type;return this.connection.onRequest(t,((n,o)=>e(n,o,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(t,n))))},onRange:e=>{const t=o.SemanticTokensRangeRequest.type;return this.connection.onRequest(t,((n,o)=>e(n,o,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(t,n))))}}}};class SemanticTokensDiff{constructor(e,t){this.originalSequence=e,this.modifiedSequence=t}computeDiff(){const e=this.originalSequence.length,t=this.modifiedSequence.length;let n=0;for(;n<t&&n<e&&this.originalSequence[n]===this.modifiedSequence[n];)n++;if(n<t&&n<e){let o=e-1,i=t-1;for(;o>=n&&i>=n&&this.originalSequence[o]===this.modifiedSequence[i];)o--,i--;(o<n||i<n)&&(o++,i++);const r=o-n+1,s=this.modifiedSequence.slice(n,i+1);return 1===s.length&&s[0]===this.originalSequence[o]?[{start:n,deleteCount:r-1}]:[{start:n,deleteCount:r,data:s}]}return n<t?[{start:n,deleteCount:0,data:this.modifiedSequence.slice(n)}]:n<e?[{start:n,deleteCount:e-n}]:[]}}t.SemanticTokensDiff=SemanticTokensDiff;t.SemanticTokensBuilder=class SemanticTokensBuilder{constructor(){this._prevData=void 0,this.initialize()}initialize(){this._id=Date.now(),this._prevLine=0,this._prevChar=0,this._data=[],this._dataLen=0}push(e,t,n,o,i){let r=e,s=t;this._dataLen>0&&(r-=this._prevLine,0===r&&(s-=this._prevChar)),this._data[this._dataLen++]=r,this._data[this._dataLen++]=s,this._data[this._dataLen++]=n,this._data[this._dataLen++]=o,this._data[this._dataLen++]=i,this._prevLine=e,this._prevChar=t}get id(){return this._id.toString()}previousResult(e){this.id===e&&(this._prevData=this._data),this.initialize()}build(){return this._prevData=void 0,{resultId:this.id,data:this._data}}canBuildEdits(){return void 0!==this._prevData}buildEdits(){return void 0!==this._prevData?{resultId:this.id,edits:new SemanticTokensDiff(this._prevData,this._data).computeDiff()}:this.build()}}},49891:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.createConnection=t.combineFeatures=t.combineNotebooksFeatures=t.combineLanguagesFeatures=t.combineWorkspaceFeatures=t.combineWindowFeatures=t.combineClientFeatures=t.combineTracerFeatures=t.combineTelemetryFeatures=t.combineConsoleFeatures=t._NotebooksImpl=t._LanguagesImpl=t.BulkUnregistration=t.BulkRegistration=t.ErrorMessageTracker=void 0;const o=n(40273),i=n(40289),r=n(37560),s=n(42731),a=n(52507),c=n(91836),l=n(47985),u=n(59817),d=n(85421),f=n(50828),p=n(22776),h=n(64606),m=n(58970),g=n(46507),y=n(6634),v=n(29748),b=n(8120);function null2Undefined(e){if(null!==e)return e}t.ErrorMessageTracker=class ErrorMessageTracker{constructor(){this._messages=Object.create(null)}add(e){let t=this._messages[e];t||(t=0),t++,this._messages[e]=t}sendErrors(e){Object.keys(this._messages).forEach((t=>{e.window.showErrorMessage(t)}))}};class RemoteConsoleImpl{constructor(){}rawAttach(e){this._rawConnection=e}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}fillServerCapabilities(e){}initialize(e){}error(e){this.send(o.MessageType.Error,e)}warn(e){this.send(o.MessageType.Warning,e)}info(e){this.send(o.MessageType.Info,e)}log(e){this.send(o.MessageType.Log,e)}send(e,t){this._rawConnection&&this._rawConnection.sendNotification(o.LogMessageNotification.type,{type:e,message:t}).catch((()=>{(0,o.RAL)().console.error("Sending log message failed")}))}}const S=(0,d.ShowDocumentFeature)((0,s.ProgressFeature)(class _RemoteWindowImpl{constructor(){}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}showErrorMessage(e,...t){let n={type:o.MessageType.Error,message:e,actions:t};return this.connection.sendRequest(o.ShowMessageRequest.type,n).then(null2Undefined)}showWarningMessage(e,...t){let n={type:o.MessageType.Warning,message:e,actions:t};return this.connection.sendRequest(o.ShowMessageRequest.type,n).then(null2Undefined)}showInformationMessage(e,...t){let n={type:o.MessageType.Info,message:e,actions:t};return this.connection.sendRequest(o.ShowMessageRequest.type,n).then(null2Undefined)}}));!function(e){e.create=function create(){return new BulkRegistrationImpl}}(t.BulkRegistration||(t.BulkRegistration={}));class BulkRegistrationImpl{constructor(){this._registrations=[],this._registered=new Set}add(e,t){const n=i.string(e)?e:e.method;if(this._registered.has(n))throw new Error(`${n} is already added to this registration`);const o=r.generateUuid();this._registrations.push({id:o,method:n,registerOptions:t||{}}),this._registered.add(n)}asRegistrationParams(){return{registrations:this._registrations}}}!function(e){e.create=function create(){return new BulkUnregistrationImpl(void 0,[])}}(t.BulkUnregistration||(t.BulkUnregistration={}));class BulkUnregistrationImpl{constructor(e,t){this._connection=e,this._unregistrations=new Map,t.forEach((e=>{this._unregistrations.set(e.method,e)}))}get isAttached(){return!!this._connection}attach(e){this._connection=e}add(e){this._unregistrations.set(e.method,e)}dispose(){let e=[];for(let t of this._unregistrations.values())e.push(t);let t={unregisterations:e};this._connection.sendRequest(o.UnregistrationRequest.type,t).catch((()=>{this._connection.console.info("Bulk unregistration failed.")}))}disposeSingle(e){const t=i.string(e)?e:e.method,n=this._unregistrations.get(t);if(!n)return!1;let r={unregisterations:[n]};return this._connection.sendRequest(o.UnregistrationRequest.type,r).then((()=>{this._unregistrations.delete(t)}),(e=>{this._connection.console.info(`Un-registering request handler for ${n.id} failed.`)})),!0}}class RemoteClientImpl{attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}register(e,t,n){return e instanceof BulkRegistrationImpl?this.registerMany(e):e instanceof BulkUnregistrationImpl?this.registerSingle1(e,t,n):this.registerSingle2(e,t)}registerSingle1(e,t,n){const s=i.string(t)?t:t.method,a=r.generateUuid();let c={registrations:[{id:a,method:s,registerOptions:n||{}}]};return e.isAttached||e.attach(this.connection),this.connection.sendRequest(o.RegistrationRequest.type,c).then((t=>(e.add({id:a,method:s}),e)),(e=>(this.connection.console.info(`Registering request handler for ${s} failed.`),Promise.reject(e))))}registerSingle2(e,t){const n=i.string(e)?e:e.method,s=r.generateUuid();let a={registrations:[{id:s,method:n,registerOptions:t||{}}]};return this.connection.sendRequest(o.RegistrationRequest.type,a).then((e=>o.Disposable.create((()=>{this.unregisterSingle(s,n).catch((()=>{this.connection.console.info(`Un-registering capability with id ${s} failed.`)}))}))),(e=>(this.connection.console.info(`Registering request handler for ${n} failed.`),Promise.reject(e))))}unregisterSingle(e,t){let n={unregisterations:[{id:e,method:t}]};return this.connection.sendRequest(o.UnregistrationRequest.type,n).catch((()=>{this.connection.console.info(`Un-registering request handler for ${e} failed.`)}))}registerMany(e){let t=e.asRegistrationParams();return this.connection.sendRequest(o.RegistrationRequest.type,t).then((()=>new BulkUnregistrationImpl(this._connection,t.registrations.map((e=>({id:e.id,method:e.method}))))),(e=>(this.connection.console.info("Bulk registration failed."),Promise.reject(e))))}}const k=(0,f.FileOperationsFeature)((0,c.WorkspaceFoldersFeature)((0,a.ConfigurationFeature)(class _RemoteWorkspaceImpl{constructor(){}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}applyEdit(e){let t=function isApplyWorkspaceEditParams(e){return e&&!!e.edit}(e)?e:{edit:e};return this.connection.sendRequest(o.ApplyWorkspaceEditRequest.type,t)}})));class TracerImpl{constructor(){this._trace=o.Trace.Off}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}set trace(e){this._trace=e}log(e,t){this._trace!==o.Trace.Off&&this.connection.sendNotification(o.LogTraceNotification.type,{message:e,verbose:this._trace===o.Trace.Verbose?t:void 0}).catch((()=>{}))}}class TelemetryImpl{constructor(){}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}logEvent(e){this.connection.sendNotification(o.TelemetryEventNotification.type,e).catch((()=>{this.connection.console.log("Sending TelemetryEventNotification failed")}))}}class _LanguagesImpl{constructor(){}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}attachWorkDoneProgress(e){return(0,s.attachWorkDone)(this.connection,e)}attachPartialResultProgress(e,t){return(0,s.attachPartialResult)(this.connection,t)}}t._LanguagesImpl=_LanguagesImpl;const T=(0,b.MonikerFeature)((0,y.DiagnosticFeature)((0,g.InlayHintFeature)((0,m.InlineValueFeature)((0,h.TypeHierarchyFeature)((0,p.LinkedEditingRangeFeature)((0,u.SemanticTokensFeature)((0,l.CallHierarchyFeature)(_LanguagesImpl))))))));class _NotebooksImpl{constructor(){}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}attachWorkDoneProgress(e){return(0,s.attachWorkDone)(this.connection,e)}attachPartialResultProgress(e,t){return(0,s.attachPartialResult)(this.connection,t)}}t._NotebooksImpl=_NotebooksImpl;const w=(0,v.NotebookSyncFeature)(_NotebooksImpl);function combineConsoleFeatures(e,t){return function(n){return t(e(n))}}function combineTelemetryFeatures(e,t){return function(n){return t(e(n))}}function combineTracerFeatures(e,t){return function(n){return t(e(n))}}function combineClientFeatures(e,t){return function(n){return t(e(n))}}function combineWindowFeatures(e,t){return function(n){return t(e(n))}}function combineWorkspaceFeatures(e,t){return function(n){return t(e(n))}}function combineLanguagesFeatures(e,t){return function(n){return t(e(n))}}function combineNotebooksFeatures(e,t){return function(n){return t(e(n))}}t.combineConsoleFeatures=combineConsoleFeatures,t.combineTelemetryFeatures=combineTelemetryFeatures,t.combineTracerFeatures=combineTracerFeatures,t.combineClientFeatures=combineClientFeatures,t.combineWindowFeatures=combineWindowFeatures,t.combineWorkspaceFeatures=combineWorkspaceFeatures,t.combineLanguagesFeatures=combineLanguagesFeatures,t.combineNotebooksFeatures=combineNotebooksFeatures,t.combineFeatures=function combineFeatures(e,t){function combine(e,t,n){return e&&t?n(e,t):e||t}return{__brand:"features",console:combine(e.console,t.console,combineConsoleFeatures),tracer:combine(e.tracer,t.tracer,combineTracerFeatures),telemetry:combine(e.telemetry,t.telemetry,combineTelemetryFeatures),client:combine(e.client,t.client,combineClientFeatures),window:combine(e.window,t.window,combineWindowFeatures),workspace:combine(e.workspace,t.workspace,combineWorkspaceFeatures),languages:combine(e.languages,t.languages,combineLanguagesFeatures),notebooks:combine(e.notebooks,t.notebooks,combineNotebooksFeatures)}},t.createConnection=function createConnection(e,t,n){const r=n&&n.console?new(n.console(RemoteConsoleImpl)):new RemoteConsoleImpl,a=e(r);r.rawAttach(a);const c=n&&n.tracer?new(n.tracer(TracerImpl)):new TracerImpl,l=n&&n.telemetry?new(n.telemetry(TelemetryImpl)):new TelemetryImpl,u=n&&n.client?new(n.client(RemoteClientImpl)):new RemoteClientImpl,d=n&&n.window?new(n.window(S)):new S,f=n&&n.workspace?new(n.workspace(k)):new k,p=n&&n.languages?new(n.languages(T)):new T,h=n&&n.notebooks?new(n.notebooks(w)):new w,m=[r,c,l,u,d,f,p,h];let g,y,v,b={listen:()=>a.listen(),sendRequest:(e,...t)=>a.sendRequest(i.string(e)?e:e.method,...t),onRequest:(e,t)=>a.onRequest(e,t),sendNotification:(e,t)=>{const n=i.string(e)?e:e.method;return 1===arguments.length?a.sendNotification(n):a.sendNotification(n,t)},onNotification:(e,t)=>a.onNotification(e,t),onProgress:a.onProgress,sendProgress:a.sendProgress,onInitialize:e=>(y=e,{dispose:()=>{y=void 0}}),onInitialized:e=>a.onNotification(o.InitializedNotification.type,e),onShutdown:e=>(g=e,{dispose:()=>{g=void 0}}),onExit:e=>(v=e,{dispose:()=>{v=void 0}}),get console(){return r},get telemetry(){return l},get tracer(){return c},get client(){return u},get window(){return d},get workspace(){return f},get languages(){return p},get notebooks(){return h},onDidChangeConfiguration:e=>a.onNotification(o.DidChangeConfigurationNotification.type,e),onDidChangeWatchedFiles:e=>a.onNotification(o.DidChangeWatchedFilesNotification.type,e),__textDocumentSync:void 0,onDidOpenTextDocument:e=>a.onNotification(o.DidOpenTextDocumentNotification.type,e),onDidChangeTextDocument:e=>a.onNotification(o.DidChangeTextDocumentNotification.type,e),onDidCloseTextDocument:e=>a.onNotification(o.DidCloseTextDocumentNotification.type,e),onWillSaveTextDocument:e=>a.onNotification(o.WillSaveTextDocumentNotification.type,e),onWillSaveTextDocumentWaitUntil:e=>a.onRequest(o.WillSaveTextDocumentWaitUntilRequest.type,e),onDidSaveTextDocument:e=>a.onNotification(o.DidSaveTextDocumentNotification.type,e),sendDiagnostics:e=>a.sendNotification(o.PublishDiagnosticsNotification.type,e),onHover:e=>a.onRequest(o.HoverRequest.type,((t,n)=>e(t,n,(0,s.attachWorkDone)(a,t),void 0))),onCompletion:e=>a.onRequest(o.CompletionRequest.type,((t,n)=>e(t,n,(0,s.attachWorkDone)(a,t),(0,s.attachPartialResult)(a,t)))),onCompletionResolve:e=>a.onRequest(o.CompletionResolveRequest.type,e),onSignatureHelp:e=>a.onRequest(o.SignatureHelpRequest.type,((t,n)=>e(t,n,(0,s.attachWorkDone)(a,t),void 0))),onDeclaration:e=>a.onRequest(o.DeclarationRequest.type,((t,n)=>e(t,n,(0,s.attachWorkDone)(a,t),(0,s.attachPartialResult)(a,t)))),onDefinition:e=>a.onRequest(o.DefinitionRequest.type,((t,n)=>e(t,n,(0,s.attachWorkDone)(a,t),(0,s.attachPartialResult)(a,t)))),onTypeDefinition:e=>a.onRequest(o.TypeDefinitionRequest.type,((t,n)=>e(t,n,(0,s.attachWorkDone)(a,t),(0,s.attachPartialResult)(a,t)))),onImplementation:e=>a.onRequest(o.ImplementationRequest.type,((t,n)=>e(t,n,(0,s.attachWorkDone)(a,t),(0,s.attachPartialResult)(a,t)))),onReferences:e=>a.onRequest(o.ReferencesRequest.type,((t,n)=>e(t,n,(0,s.attachWorkDone)(a,t),(0,s.attachPartialResult)(a,t)))),onDocumentHighlight:e=>a.onRequest(o.DocumentHighlightRequest.type,((t,n)=>e(t,n,(0,s.attachWorkDone)(a,t),(0,s.attachPartialResult)(a,t)))),onDocumentSymbol:e=>a.onRequest(o.DocumentSymbolRequest.type,((t,n)=>e(t,n,(0,s.attachWorkDone)(a,t),(0,s.attachPartialResult)(a,t)))),onWorkspaceSymbol:e=>a.onRequest(o.WorkspaceSymbolRequest.type,((t,n)=>e(t,n,(0,s.attachWorkDone)(a,t),(0,s.attachPartialResult)(a,t)))),onWorkspaceSymbolResolve:e=>a.onRequest(o.WorkspaceSymbolResolveRequest.type,e),onCodeAction:e=>a.onRequest(o.CodeActionRequest.type,((t,n)=>e(t,n,(0,s.attachWorkDone)(a,t),(0,s.attachPartialResult)(a,t)))),onCodeActionResolve:e=>a.onRequest(o.CodeActionResolveRequest.type,((t,n)=>e(t,n))),onCodeLens:e=>a.onRequest(o.CodeLensRequest.type,((t,n)=>e(t,n,(0,s.attachWorkDone)(a,t),(0,s.attachPartialResult)(a,t)))),onCodeLensResolve:e=>a.onRequest(o.CodeLensResolveRequest.type,((t,n)=>e(t,n))),onDocumentFormatting:e=>a.onRequest(o.DocumentFormattingRequest.type,((t,n)=>e(t,n,(0,s.attachWorkDone)(a,t),void 0))),onDocumentRangeFormatting:e=>a.onRequest(o.DocumentRangeFormattingRequest.type,((t,n)=>e(t,n,(0,s.attachWorkDone)(a,t),void 0))),onDocumentOnTypeFormatting:e=>a.onRequest(o.DocumentOnTypeFormattingRequest.type,((t,n)=>e(t,n))),onRenameRequest:e=>a.onRequest(o.RenameRequest.type,((t,n)=>e(t,n,(0,s.attachWorkDone)(a,t),void 0))),onPrepareRename:e=>a.onRequest(o.PrepareRenameRequest.type,((t,n)=>e(t,n))),onDocumentLinks:e=>a.onRequest(o.DocumentLinkRequest.type,((t,n)=>e(t,n,(0,s.attachWorkDone)(a,t),(0,s.attachPartialResult)(a,t)))),onDocumentLinkResolve:e=>a.onRequest(o.DocumentLinkResolveRequest.type,((t,n)=>e(t,n))),onDocumentColor:e=>a.onRequest(o.DocumentColorRequest.type,((t,n)=>e(t,n,(0,s.attachWorkDone)(a,t),(0,s.attachPartialResult)(a,t)))),onColorPresentation:e=>a.onRequest(o.ColorPresentationRequest.type,((t,n)=>e(t,n,(0,s.attachWorkDone)(a,t),(0,s.attachPartialResult)(a,t)))),onFoldingRanges:e=>a.onRequest(o.FoldingRangeRequest.type,((t,n)=>e(t,n,(0,s.attachWorkDone)(a,t),(0,s.attachPartialResult)(a,t)))),onSelectionRanges:e=>a.onRequest(o.SelectionRangeRequest.type,((t,n)=>e(t,n,(0,s.attachWorkDone)(a,t),(0,s.attachPartialResult)(a,t)))),onExecuteCommand:e=>a.onRequest(o.ExecuteCommandRequest.type,((t,n)=>e(t,n,(0,s.attachWorkDone)(a,t),void 0))),dispose:()=>a.dispose()};for(let e of m)e.attach(b);return a.onRequest(o.InitializeRequest.type,(e=>{t.initialize(e),i.string(e.trace)&&(c.trace=o.Trace.fromString(e.trace));for(let t of m)t.initialize(e.capabilities);if(y){return function asPromise(e){return e instanceof Promise?e:i.thenable(e)?new Promise(((t,n)=>{e.then((e=>t(e)),(e=>n(e)))})):Promise.resolve(e)}(y(e,(new o.CancellationTokenSource).token,(0,s.attachWorkDone)(a,e),void 0)).then((e=>{if(e instanceof o.ResponseError)return e;let t=e;t||(t={capabilities:{}});let n=t.capabilities;n||(n={},t.capabilities=n),void 0===n.textDocumentSync||null===n.textDocumentSync?n.textDocumentSync=i.number(b.__textDocumentSync)?b.__textDocumentSync:o.TextDocumentSyncKind.None:i.number(n.textDocumentSync)||i.number(n.textDocumentSync.change)||(n.textDocumentSync.change=i.number(b.__textDocumentSync)?b.__textDocumentSync:o.TextDocumentSyncKind.None);for(let e of m)e.fillServerCapabilities(n);return t}))}{let e={capabilities:{textDocumentSync:o.TextDocumentSyncKind.None}};for(let t of m)t.fillServerCapabilities(e.capabilities);return e}})),a.onRequest(o.ShutdownRequest.type,(()=>(t.shutdownReceived=!0,g?g((new o.CancellationTokenSource).token):void 0))),a.onNotification(o.ExitNotification.type,(()=>{try{v&&v()}finally{t.shutdownReceived?t.exit(0):t.exit(1)}})),a.onNotification(o.SetTraceNotification.type,(e=>{c.trace=o.Trace.fromString(e.value)})),b}},85421:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ShowDocumentFeature=void 0;const o=n(40273);t.ShowDocumentFeature=e=>class extends e{showDocument(e){return this.connection.sendRequest(o.ShowDocumentRequest.type,e)}}},38382:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TextDocuments=void 0;const o=n(40273);t.TextDocuments=class TextDocuments{constructor(e){this._configuration=e,this._syncedDocuments=new Map,this._onDidChangeContent=new o.Emitter,this._onDidOpen=new o.Emitter,this._onDidClose=new o.Emitter,this._onDidSave=new o.Emitter,this._onWillSave=new o.Emitter}get onDidOpen(){return this._onDidOpen.event}get onDidChangeContent(){return this._onDidChangeContent.event}get onWillSave(){return this._onWillSave.event}onWillSaveWaitUntil(e){this._willSaveWaitUntil=e}get onDidSave(){return this._onDidSave.event}get onDidClose(){return this._onDidClose.event}get(e){return this._syncedDocuments.get(e)}all(){return Array.from(this._syncedDocuments.values())}keys(){return Array.from(this._syncedDocuments.keys())}listen(e){e.__textDocumentSync=o.TextDocumentSyncKind.Incremental;const t=[];return t.push(e.onDidOpenTextDocument((e=>{const t=e.textDocument,n=this._configuration.create(t.uri,t.languageId,t.version,t.text);this._syncedDocuments.set(t.uri,n);const o=Object.freeze({document:n});this._onDidOpen.fire(o),this._onDidChangeContent.fire(o)}))),t.push(e.onDidChangeTextDocument((e=>{const t=e.textDocument,n=e.contentChanges;if(0===n.length)return;const{version:o}=t;if(null==o)throw new Error(`Received document change event for ${t.uri} without valid version identifier`);let i=this._syncedDocuments.get(t.uri);void 0!==i&&(i=this._configuration.update(i,n,o),this._syncedDocuments.set(t.uri,i),this._onDidChangeContent.fire(Object.freeze({document:i})))}))),t.push(e.onDidCloseTextDocument((e=>{let t=this._syncedDocuments.get(e.textDocument.uri);void 0!==t&&(this._syncedDocuments.delete(e.textDocument.uri),this._onDidClose.fire(Object.freeze({document:t})))}))),t.push(e.onWillSaveTextDocument((e=>{let t=this._syncedDocuments.get(e.textDocument.uri);void 0!==t&&this._onWillSave.fire(Object.freeze({document:t,reason:e.reason}))}))),t.push(e.onWillSaveTextDocumentWaitUntil(((e,t)=>{let n=this._syncedDocuments.get(e.textDocument.uri);return void 0!==n&&this._willSaveWaitUntil?this._willSaveWaitUntil(Object.freeze({document:n,reason:e.reason}),t):[]}))),t.push(e.onDidSaveTextDocument((e=>{let t=this._syncedDocuments.get(e.textDocument.uri);void 0!==t&&this._onDidSave.fire(Object.freeze({document:t}))}))),o.Disposable.create((()=>{t.forEach((e=>e.dispose()))}))}}},64606:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TypeHierarchyFeature=void 0;const o=n(40273);t.TypeHierarchyFeature=e=>class extends e{get typeHierarchy(){return{onPrepare:e=>this.connection.onRequest(o.TypeHierarchyPrepareRequest.type,((t,n)=>e(t,n,this.attachWorkDoneProgress(t),void 0))),onSupertypes:e=>{const t=o.TypeHierarchySupertypesRequest.type;return this.connection.onRequest(t,((n,o)=>e(n,o,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(t,n))))},onSubtypes:e=>{const t=o.TypeHierarchySubtypesRequest.type;return this.connection.onRequest(t,((n,o)=>e(n,o,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(t,n))))}}}}},40289:(e,t)=>{function string(e){return"string"==typeof e||e instanceof String}function func(e){return"function"==typeof e}function array(e){return Array.isArray(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.thenable=t.typedArray=t.stringArray=t.array=t.func=t.error=t.number=t.string=t.boolean=void 0,t.boolean=function boolean(e){return!0===e||!1===e},t.string=string,t.number=function number(e){return"number"==typeof e||e instanceof Number},t.error=function error(e){return e instanceof Error},t.func=func,t.array=array,t.stringArray=function stringArray(e){return array(e)&&e.every((e=>string(e)))},t.typedArray=function typedArray(e,t){return Array.isArray(e)&&e.every(t)},t.thenable=function thenable(e){return e&&func(e.then)}},37560:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.generateUuid=t.parse=t.isUUID=t.v4=t.empty=void 0;class ValueUUID{constructor(e){this._value=e}asHex(){return this._value}equals(e){return this.asHex()===e.asHex()}}class V4UUID extends ValueUUID{constructor(){super([V4UUID._randomHex(),V4UUID._randomHex(),V4UUID._randomHex(),V4UUID._randomHex(),V4UUID._randomHex(),V4UUID._randomHex(),V4UUID._randomHex(),V4UUID._randomHex(),"-",V4UUID._randomHex(),V4UUID._randomHex(),V4UUID._randomHex(),V4UUID._randomHex(),"-","4",V4UUID._randomHex(),V4UUID._randomHex(),V4UUID._randomHex(),"-",V4UUID._oneOf(V4UUID._timeHighBits),V4UUID._randomHex(),V4UUID._randomHex(),V4UUID._randomHex(),"-",V4UUID._randomHex(),V4UUID._randomHex(),V4UUID._randomHex(),V4UUID._randomHex(),V4UUID._randomHex(),V4UUID._randomHex(),V4UUID._randomHex(),V4UUID._randomHex(),V4UUID._randomHex(),V4UUID._randomHex(),V4UUID._randomHex(),V4UUID._randomHex()].join(""))}static _oneOf(e){return e[Math.floor(e.length*Math.random())]}static _randomHex(){return V4UUID._oneOf(V4UUID._chars)}}function v4(){return new V4UUID}V4UUID._chars=["0","1","2","3","4","5","6","6","7","8","9","a","b","c","d","e","f"],V4UUID._timeHighBits=["8","9","a","b"],t.empty=new ValueUUID("00000000-0000-0000-0000-000000000000"),t.v4=v4;const n=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function isUUID(e){return n.test(e)}t.isUUID=isUUID,t.parse=function parse(e){if(!isUUID(e))throw new Error("invalid uuid");return new ValueUUID(e)},t.generateUuid=function generateUuid(){return v4().asHex()}},91836:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.WorkspaceFoldersFeature=void 0;const o=n(40273);t.WorkspaceFoldersFeature=e=>class extends e{constructor(){super(),this._notificationIsAutoRegistered=!1}initialize(e){super.initialize(e);let t=e.workspace;t&&t.workspaceFolders&&(this._onDidChangeWorkspaceFolders=new o.Emitter,this.connection.onNotification(o.DidChangeWorkspaceFoldersNotification.type,(e=>{this._onDidChangeWorkspaceFolders.fire(e.event)})))}fillServerCapabilities(e){super.fillServerCapabilities(e);const t=e.workspace?.workspaceFolders?.changeNotifications;this._notificationIsAutoRegistered=!0===t||"string"==typeof t}getWorkspaceFolders(){return this.connection.sendRequest(o.WorkspaceFoldersRequest.type)}get onDidChangeWorkspaceFolders(){if(!this._onDidChangeWorkspaceFolders)throw new Error("Client doesn't support sending workspace folder change events.");return this._notificationIsAutoRegistered||this._unregistration||(this._unregistration=this.connection.client.register(o.DidChangeWorkspaceFoldersNotification.type)),this._onDidChangeWorkspaceFolders.event}}},87613:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.resolveModulePath=t.FileSystem=t.resolveGlobalYarnPath=t.resolveGlobalNodePath=t.resolve=t.uriToFilePath=void 0;const o=n(57310),i=n(71017),r=n(57147),s=n(32081);function isWindows(){return"win32"===process.platform}function resolve(e,t,n,o){const a="NODE_PATH",c=["var p = process;","p.on('message',function(m){","if(m.c==='e'){","p.exit(0);","}","else if(m.c==='rs'){","try{","var r=require.resolve(m.a);","p.send({c:'r',s:true,r:r});","}","catch(err){","p.send({c:'r',s:false});","}","}","});"].join("");return new Promise(((l,u)=>{let d=process.env,f=Object.create(null);Object.keys(d).forEach((e=>f[e]=d[e])),t&&r.existsSync(t)&&(f[a]?f[a]=t+i.delimiter+f[a]:f[a]=t,o&&o(`NODE_PATH value is: ${f[a]}`)),f.ELECTRON_RUN_AS_NODE="1";try{let t=(0,s.fork)("",[],{cwd:n,env:f,execArgv:["-e",c]});if(void 0===t.pid)return void u(new Error(`Starting process to resolve node module ${e} failed`));t.on("error",(e=>{u(e)})),t.on("message",(n=>{"r"===n.c&&(t.send({c:"e"}),n.s?l(n.r):u(new Error(`Failed to resolve module: ${e}`)))}));let o={c:"rs",a:e};t.send(o)}catch(e){u(e)}}))}function resolveGlobalNodePath(e){let t="npm";const n=Object.create(null);Object.keys(process.env).forEach((e=>n[e]=process.env[e])),n.NO_UPDATE_NOTIFIER="true";const o={encoding:"utf8",env:n};isWindows()&&(t="npm.cmd",o.shell=!0);let handler=()=>{};try{process.on("SIGPIPE",handler);let n=(0,s.spawnSync)(t,["config","get","prefix"],o).stdout;if(!n)return void(e&&e("'npm config get prefix' didn't return a value."));let r=n.trim();return e&&e(`'npm config get prefix' value is: ${r}`),r.length>0?isWindows()?i.join(r,"node_modules"):i.join(r,"lib","node_modules"):void 0}catch(e){return}finally{process.removeListener("SIGPIPE",handler)}}var a;t.uriToFilePath=function uriToFilePath(e){let t=o.parse(e);if("file:"!==t.protocol||!t.path)return;let n=t.path.split("/");for(var r=0,s=n.length;r<s;r++)n[r]=decodeURIComponent(n[r]);if("win32"===process.platform&&n.length>1){let e=n[0],t=n[1];0===e.length&&t.length>1&&":"===t[1]&&n.shift()}return i.normalize(n.join("/"))},t.resolve=resolve,t.resolveGlobalNodePath=resolveGlobalNodePath,t.resolveGlobalYarnPath=function resolveGlobalYarnPath(e){let t="yarn",n={encoding:"utf8"};isWindows()&&(t="yarn.cmd",n.shell=!0);let handler=()=>{};try{process.on("SIGPIPE",handler);let o=(0,s.spawnSync)(t,["global","dir","--json"],n),r=o.stdout;if(!r)return void(e&&(e("'yarn global dir' didn't return a value."),o.stderr&&e(o.stderr)));let a=r.trim().split(/\r?\n/);for(let e of a)try{let t=JSON.parse(e);if("log"===t.type)return i.join(t.data,"node_modules")}catch(e){}return}catch(e){return}finally{process.removeListener("SIGPIPE",handler)}},function(e){let t;function isCaseSensitive(){return void 0!==t||(t="win32"!==process.platform&&(!r.existsSync(__filename.toUpperCase())||!r.existsSync(__filename.toLowerCase()))),t}e.isCaseSensitive=isCaseSensitive,e.isParent=function isParent(e,t){return isCaseSensitive()?0===i.normalize(t).indexOf(i.normalize(e)):0===i.normalize(t).toLowerCase().indexOf(i.normalize(e).toLowerCase())}}(a=t.FileSystem||(t.FileSystem={})),t.resolveModulePath=function resolveModulePath(e,t,n,o){return n?(i.isAbsolute(n)||(n=i.join(e,n)),resolve(t,n,n,o).then((e=>a.isParent(n,e)?e:Promise.reject(new Error(`Failed to load ${t} from node path location.`)))).then(void 0,(n=>resolve(t,resolveGlobalNodePath(o),e,o)))):resolve(t,resolveGlobalNodePath(o),e,o)}},35809:function(e,t,n){var o=this&&this.__createBinding||(Object.create?function(e,t,n,o){void 0===o&&(o=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,o,i)}:function(e,t,n,o){void 0===o&&(o=n),e[o]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||o(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.createConnection=t.Files=void 0;const r=n(40289),s=n(49891),a=n(87613),c=n(96560);let l;function endProtocolConnection(){if(void 0!==l)try{l.end()}catch(e){}}i(n(96560),t),i(n(76265),t),function(e){e.uriToFilePath=a.uriToFilePath,e.resolveGlobalNodePath=a.resolveGlobalNodePath,e.resolveGlobalYarnPath=a.resolveGlobalYarnPath,e.resolve=a.resolve,e.resolveModulePath=a.resolveModulePath}(t.Files||(t.Files={}));let u,d=!1;!function setupExitTimer(){const e="--clientProcessId";function runTimer(e){try{let t=parseInt(e);isNaN(t)||(u=setInterval((()=>{try{process.kill(t,0)}catch(e){endProtocolConnection(),process.exit(d?0:1)}}),3e3))}catch(e){}}for(let t=2;t<process.argv.length;t++){let n=process.argv[t];if(n===e&&t+1<process.argv.length)return void runTimer(process.argv[t+1]);{let t=n.split("=");t[0]===e&&runTimer(t[1])}}}();const f={initialize:e=>{const t=e.processId;r.number(t)&&void 0===u&&setInterval((()=>{try{process.kill(t,0)}catch(e){process.exit(d?0:1)}}),3e3)},get shutdownReceived(){return d},set shutdownReceived(e){d=e},exit:e=>{endProtocolConnection(),process.exit(e)}};t.createConnection=function createConnection(e,t,n,o){let i,a,l,u;return void 0!==e&&"features"===e.__brand&&(i=e,e=t,t=n,n=o),c.ConnectionStrategy.is(e)||c.ConnectionOptions.is(e)?u=e:(a=e,l=t,u=n),function _createConnection(e,t,n,o){if(!e&&!t&&process.argv.length>2){let n,o,r=process.argv.slice(2);for(let s=0;s<r.length;s++){let a=r[s];if("--node-ipc"===a){e=new c.IPCMessageReader(process),t=new c.IPCMessageWriter(process);break}if("--stdio"===a){e=process.stdin,t=process.stdout;break}if("--socket"===a){n=parseInt(r[s+1]);break}if("--pipe"===a){o=r[s+1];break}var i=a.split("=");if("--socket"===i[0]){n=parseInt(i[1]);break}if("--pipe"===i[0]){o=i[1];break}}if(n){let o=(0,c.createServerSocketTransport)(n);e=o[0],t=o[1]}else if(o){let n=(0,c.createServerPipeTransport)(o);e=n[0],t=n[1]}}var a="Use arguments of createConnection or set command line parameters: '--node-ipc', '--stdio' or '--socket={number}'";if(!e)throw new Error("Connection input stream is not set. "+a);if(!t)throw new Error("Connection output stream is not set. "+a);if(r.func(e.read)&&r.func(e.on)){let t=e;t.on("end",(()=>{endProtocolConnection(),process.exit(d?0:1)})),t.on("close",(()=>{endProtocolConnection(),process.exit(d?0:1)}))}const connectionFactory=o=>(0,c.createProtocolConnection)(e,t,o,n);return(0,s.createConnection)(connectionFactory,f,o)}(a,l,u,i)}},68212:(e,t,n)=>{e.exports=n(35809)},50852:e=>{e.exports=require("async_hooks")},32081:e=>{e.exports=require("child_process")},6113:e=>{e.exports=require("crypto")},57147:e=>{e.exports=require("fs")},41808:e=>{e.exports=require("net")},22037:e=>{e.exports=require("os")},71017:e=>{e.exports=require("path")},57310:e=>{e.exports=require("url")},73837:e=>{e.exports=require("util")},14139:(e,t,n)=>{var o=n(10466),i=n(58844),r=n(76933),s=n(83179),a=n(94658);t.composeCollection=function composeCollection(e,t,n,c,l){let u;switch(n.type){case"block-map":u=r.resolveBlockMap(e,t,n,l);break;case"block-seq":u=s.resolveBlockSeq(e,t,n,l);break;case"flow-collection":u=a.resolveFlowCollection(e,t,n,l)}if(!c)return u;const d=t.directives.tagName(c.source,(e=>l(c,"TAG_RESOLVE_FAILED",e)));if(!d)return u;const f=u.constructor;if("!"===d||d===f.tagName)return u.tag=f.tagName,u;const p=o.isMap(u)?"map":"seq";let h=t.schema.tags.find((e=>e.collection===p&&e.tag===d));if(!h){const e=t.schema.knownTags[d];if(!e||e.collection!==p)return l(c,"TAG_RESOLVE_FAILED",`Unresolved tag: ${d}`,!0),u.tag=d,u;t.schema.tags.push(Object.assign({},e,{default:!1})),h=e}const m=h.resolve(u,(e=>l(c,"TAG_RESOLVE_FAILED",e)),t.options),g=o.isNode(m)?m:new i.Scalar(m);return g.range=u.range,g.tag=d,h?.format&&(g.format=h.format),g}},83138:(e,t,n)=>{var o=n(86068),i=n(90081),r=n(7655),s=n(5920);t.composeDoc=function composeDoc(e,t,{offset:n,start:a,value:c,end:l},u){const d=Object.assign({_directives:t},e),f=new o.Document(void 0,d),p={atRoot:!0,directives:f.directives,options:f.options,schema:f.schema},h=s.resolveProps(a,{indicator:"doc-start",next:c??l?.[0],offset:n,onError:u,startOnNewline:!0});h.found&&(f.directives.docStart=!0,!c||"block-map"!==c.type&&"block-seq"!==c.type||h.hasNewline||u(h.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),f.contents=c?i.composeNode(p,c,h,u):i.composeEmptyNode(p,h.end,a,null,h,u);const m=f.contents.range[2],g=r.resolveEnd(l,m,!1,u);return g.comment&&(f.comment=g.comment),f.range=[n,m,g.offset],f}},90081:(e,t,n)=>{var o=n(12055),i=n(14139),r=n(76548),s=n(7655),a=n(7154);const c={composeNode,composeEmptyNode};function composeNode(e,t,n,a){const{spaceBefore:l,comment:u,anchor:d,tag:f}=n;let p,h=!0;switch(t.type){case"alias":p=function composeAlias({options:e},{offset:t,source:n,end:i},r){const a=new o.Alias(n.substring(1));""===a.source&&r(t,"BAD_ALIAS","Alias cannot be an empty string");a.source.endsWith(":")&&r(t+n.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);const c=t+n.length,l=s.resolveEnd(i,c,e.strict,r);a.range=[t,c,l.offset],l.comment&&(a.comment=l.comment);return a}(e,t,a),(d||f)&&a(t,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":p=r.composeScalar(e,t,f,a),d&&(p.anchor=d.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":p=i.composeCollection(c,e,t,f,a),d&&(p.anchor=d.source.substring(1));break;default:a(t,"UNEXPECTED_TOKEN","error"===t.type?t.message:`Unsupported token (type: ${t.type})`),p=composeEmptyNode(e,t.offset,void 0,null,n,a),h=!1}return d&&""===p.anchor&&a(d,"BAD_ALIAS","Anchor cannot be an empty string"),l&&(p.spaceBefore=!0),u&&("scalar"===t.type&&""===t.source?p.comment=u:p.commentBefore=u),e.options.keepSourceTokens&&h&&(p.srcToken=t),p}function composeEmptyNode(e,t,n,o,{spaceBefore:i,comment:s,anchor:c,tag:l,end:u},d){const f={type:"scalar",offset:a.emptyScalarPosition(t,n,o),indent:-1,source:""},p=r.composeScalar(e,f,l,d);return c&&(p.anchor=c.source.substring(1),""===p.anchor&&d(c,"BAD_ALIAS","Anchor cannot be an empty string")),i&&(p.spaceBefore=!0),s&&(p.comment=s,p.range[2]=u),p}t.composeEmptyNode=composeEmptyNode,t.composeNode=composeNode},76548:(e,t,n)=>{var o=n(10466),i=n(58844),r=n(51328),s=n(7876);t.composeScalar=function composeScalar(e,t,n,a){const{value:c,type:l,comment:u,range:d}="block-scalar"===t.type?r.resolveBlockScalar(t,e.options.strict,a):s.resolveFlowScalar(t,e.options.strict,a),f=n?e.directives.tagName(n.source,(e=>a(n,"TAG_RESOLVE_FAILED",e))):null,p=n&&f?function findScalarTagByName(e,t,n,i,r){if("!"===n)return e[o.SCALAR];const s=[];for(const t of e.tags)if(!t.collection&&t.tag===n){if(!t.default||!t.test)return t;s.push(t)}for(const e of s)if(e.test?.test(t))return e;const a=e.knownTags[n];if(a&&!a.collection)return e.tags.push(Object.assign({},a,{default:!1,test:void 0})),a;return r(i,"TAG_RESOLVE_FAILED",`Unresolved tag: ${n}`,"tag:yaml.org,2002:str"!==n),e[o.SCALAR]}(e.schema,c,f,n,a):"scalar"===t.type?function findScalarTagByTest({directives:e,schema:t},n,i,r){const s=t.tags.find((e=>e.default&&e.test?.test(n)))||t[o.SCALAR];if(t.compat){const a=t.compat.find((e=>e.default&&e.test?.test(n)))??t[o.SCALAR];if(s.tag!==a.tag){r(i,"TAG_RESOLVE_FAILED",`Value may be parsed as either ${e.tagString(s.tag)} or ${e.tagString(a.tag)}`,!0)}}return s}(e,c,t,a):e.schema[o.SCALAR];let h;try{const r=p.resolve(c,(e=>a(n??t,"TAG_RESOLVE_FAILED",e)),e.options);h=o.isScalar(r)?r:new i.Scalar(r)}catch(e){const o=e instanceof Error?e.message:String(e);a(n??t,"TAG_RESOLVE_FAILED",o),h=new i.Scalar(c)}return h.range=d,h.source=c,l&&(h.type=l),f&&(h.tag=f),p.format&&(h.format=p.format),u&&(h.comment=u),h}},5281:(e,t,n)=>{var o=n(99226),i=n(86068),r=n(2394),s=n(10466),a=n(83138),c=n(7655);function getErrorPos(e){if("number"==typeof e)return[e,e+1];if(Array.isArray(e))return 2===e.length?e:[e[0],e[1]];const{offset:t,source:n}=e;return[t,t+("string"==typeof n?n.length:1)]}function parsePrelude(e){let t="",n=!1,o=!1;for(let i=0;i<e.length;++i){const r=e[i];switch(r[0]){case"#":t+=(""===t?"":o?"\n\n":"\n")+(r.substring(1)||" "),n=!0,o=!1;break;case"%":"#"!==e[i+1]?.[0]&&(i+=1),n=!1;break;default:n||(o=!0),n=!1}}return{comment:t,afterEmptyLine:o}}t.Composer=class Composer{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(e,t,n,o)=>{const i=getErrorPos(e);o?this.warnings.push(new r.YAMLWarning(i,t,n)):this.errors.push(new r.YAMLParseError(i,t,n))},this.directives=new o.Directives({version:e.version||"1.2"}),this.options=e}decorate(e,t){const{comment:n,afterEmptyLine:o}=parsePrelude(this.prelude);if(n){const i=e.contents;if(t)e.comment=e.comment?`${e.comment}\n${n}`:n;else if(o||e.directives.docStart||!i)e.commentBefore=n;else if(s.isCollection(i)&&!i.flow&&i.items.length>0){let e=i.items[0];s.isPair(e)&&(e=e.key);const t=e.commentBefore;e.commentBefore=t?`${n}\n${t}`:n}else{const e=i.commentBefore;i.commentBefore=e?`${n}\n${e}`:n}}t?(Array.prototype.push.apply(e.errors,this.errors),Array.prototype.push.apply(e.warnings,this.warnings)):(e.errors=this.errors,e.warnings=this.warnings),this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:parsePrelude(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,t=!1,n=-1){for(const t of e)yield*this.next(t);yield*this.end(t,n)}*next(e){switch(process.env.LOG_STREAM&&console.dir(e,{depth:null}),e.type){case"directive":this.directives.add(e.source,((t,n,o)=>{const i=getErrorPos(e);i[0]+=t,this.onError(i,"BAD_DIRECTIVE",n,o)})),this.prelude.push(e.source),this.atDirectives=!0;break;case"document":{const t=a.composeDoc(this.options,this.directives,e,this.onError);this.atDirectives&&!t.directives.docStart&&this.onError(e,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(t,!1),this.doc&&(yield this.doc),this.doc=t,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(e.source);break;case"error":{const t=e.source?`${e.message}: ${JSON.stringify(e.source)}`:e.message,n=new r.YAMLParseError(getErrorPos(e),"UNEXPECTED_TOKEN",t);this.atDirectives||!this.doc?this.errors.push(n):this.doc.errors.push(n);break}case"doc-end":{if(!this.doc){const t="Unexpected doc-end without preceding document";this.errors.push(new r.YAMLParseError(getErrorPos(e),"UNEXPECTED_TOKEN",t));break}this.doc.directives.docEnd=!0;const t=c.resolveEnd(e.end,e.offset+e.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),t.comment){const e=this.doc.comment;this.doc.comment=e?`${e}\n${t.comment}`:t.comment}this.doc.range[2]=t.offset;break}default:this.errors.push(new r.YAMLParseError(getErrorPos(e),"UNEXPECTED_TOKEN",`Unsupported token ${e.type}`))}}*end(e=!1,t=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(e){const e=Object.assign({_directives:this.directives},this.options),n=new i.Document(void 0,e);this.atDirectives&&this.onError(t,"MISSING_CHAR","Missing directives-end indicator line"),n.range=[0,t,t],this.decorate(n,!1),yield n}}}},76933:(e,t,n)=>{var o=n(10394),i=n(56575),r=n(5920),s=n(93094),a=n(72566),c=n(96493);const l="All mapping items must start at the same column";t.resolveBlockMap=function resolveBlockMap({composeNode:e,composeEmptyNode:t},n,u,d){const f=new i.YAMLMap(n.schema);n.atRoot&&(n.atRoot=!1);let p=u.offset,h=null;for(const i of u.items){const{start:m,key:g,sep:y,value:v}=i,b=r.resolveProps(m,{indicator:"explicit-key-ind",next:g??y?.[0],offset:p,onError:d,startOnNewline:!0}),S=!b.found;if(S){if(g&&("block-seq"===g.type?d(p,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in g&&g.indent!==u.indent&&d(p,"BAD_INDENT",l)),!b.anchor&&!b.tag&&!y){h=b.end,b.comment&&(f.comment?f.comment+="\n"+b.comment:f.comment=b.comment);continue}(b.hasNewlineAfterProp||s.containsNewline(g))&&d(g??m[m.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else b.found?.indent!==u.indent&&d(p,"BAD_INDENT",l);const k=b.end,T=g?e(n,g,b,d):t(n,k,m,null,b,d);n.schema.compat&&a.flowIndentCheck(u.indent,g,d),c.mapIncludes(n,f.items,T)&&d(k,"DUPLICATE_KEY","Map keys must be unique");const w=r.resolveProps(y??[],{indicator:"map-value-ind",next:v,offset:T.range[2],onError:d,startOnNewline:!g||"block-scalar"===g.type});if(p=w.end,w.found){S&&("block-map"!==v?.type||w.hasNewline||d(p,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),n.options.strict&&b.start<w.found.offset-1024&&d(T.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));const r=v?e(n,v,w,d):t(n,p,y,null,w,d);n.schema.compat&&a.flowIndentCheck(u.indent,v,d),p=r.range[2];const s=new o.Pair(T,r);n.options.keepSourceTokens&&(s.srcToken=i),f.items.push(s)}else{S&&d(T.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),w.comment&&(T.comment?T.comment+="\n"+w.comment:T.comment=w.comment);const e=new o.Pair(T);n.options.keepSourceTokens&&(e.srcToken=i),f.items.push(e)}}return h&&h<p&&d(h,"IMPOSSIBLE","Map comment with trailing content"),f.range=[u.offset,p,h??p],f}},51328:(e,t,n)=>{var o=n(58844);t.resolveBlockScalar=function resolveBlockScalar(e,t,n){const i=e.offset,r=function parseBlockScalarHeader({offset:e,props:t},n,o){if("block-scalar-header"!==t[0].type)return o(t[0],"IMPOSSIBLE","Block scalar header not found"),null;const{source:i}=t[0],r=i[0];let s=0,a="",c=-1;for(let t=1;t<i.length;++t){const n=i[t];if(a||"-"!==n&&"+"!==n){const o=Number(n);!s&&o?s=o:-1===c&&(c=e+t)}else a=n}-1!==c&&o(c,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${i}`);let l=!1,u="",d=i.length;for(let e=1;e<t.length;++e){const i=t[e];switch(i.type){case"space":l=!0;case"newline":d+=i.source.length;break;case"comment":if(n&&!l){o(i,"MISSING_CHAR","Comments must be separated from other tokens by white space characters")}d+=i.source.length,u=i.source.substring(1);break;case"error":o(i,"UNEXPECTED_TOKEN",i.message),d+=i.source.length;break;default:{o(i,"UNEXPECTED_TOKEN",`Unexpected token in block scalar header: ${i.type}`);const e=i.source;e&&"string"==typeof e&&(d+=e.length)}}}return{mode:r,indent:s,chomp:a,comment:u,length:d}}(e,t,n);if(!r)return{value:"",type:null,comment:"",range:[i,i,i]};const s=">"===r.mode?o.Scalar.BLOCK_FOLDED:o.Scalar.BLOCK_LITERAL,a=e.source?function splitLines(e){const t=e.split(/\n( *)/),n=t[0],o=n.match(/^( *)/),i=[o?.[1]?[o[1],n.slice(o[1].length)]:["",n]];for(let e=1;e<t.length;e+=2)i.push([t[e],t[e+1]]);return i}(e.source):[];let c=a.length;for(let e=a.length-1;e>=0;--e){const t=a[e][1];if(""!==t&&"\r"!==t)break;c=e}if(0===c){const t="+"===r.chomp&&a.length>0?"\n".repeat(Math.max(1,a.length-1)):"";let n=i+r.length;return e.source&&(n+=e.source.length),{value:t,type:s,comment:r.comment,range:[i,n,n]}}let l=e.indent+r.indent,u=e.offset+r.length,d=0;for(let e=0;e<c;++e){const[t,o]=a[e];if(""!==o&&"\r"!==o){if(t.length<l){const e="Block scalars with more-indented leading empty lines must use an explicit indentation indicator";n(u+t.length,"MISSING_CHAR",e)}0===r.indent&&(l=t.length),d=e;break}0===r.indent&&t.length>l&&(l=t.length),u+=t.length+o.length+1}for(let e=a.length-1;e>=c;--e)a[e][0].length>l&&(c=e+1);let f="",p="",h=!1;for(let e=0;e<d;++e)f+=a[e][0].slice(l)+"\n";for(let e=d;e<c;++e){let[t,i]=a[e];u+=t.length+i.length+1;const c="\r"===i[i.length-1];if(c&&(i=i.slice(0,-1)),i&&t.length<l){const e=`Block scalar lines must not be less indented than their ${r.indent?"explicit indentation indicator":"first line"}`;n(u-i.length-(c?2:1),"BAD_INDENT",e),t=""}s===o.Scalar.BLOCK_LITERAL?(f+=p+t.slice(l)+i,p="\n"):t.length>l||"\t"===i[0]?(" "===p?p="\n":h||"\n"!==p||(p="\n\n"),f+=p+t.slice(l)+i,p="\n",h=!0):""===i?"\n"===p?f+="\n":p="\n":(f+=p+i,p=" ",h=!1)}switch(r.chomp){case"-":break;case"+":for(let e=c;e<a.length;++e)f+="\n"+a[e][0].slice(l);"\n"!==f[f.length-1]&&(f+="\n");break;default:f+="\n"}const m=i+r.length+e.source.length;return{value:f,type:s,comment:r.comment,range:[i,m,m]}}},83179:(e,t,n)=>{var o=n(13798),i=n(5920),r=n(72566);t.resolveBlockSeq=function resolveBlockSeq({composeNode:e,composeEmptyNode:t},n,s,a){const c=new o.YAMLSeq(n.schema);n.atRoot&&(n.atRoot=!1);let l=s.offset,u=null;for(const{start:o,value:d}of s.items){const f=i.resolveProps(o,{indicator:"seq-item-ind",next:d,offset:l,onError:a,startOnNewline:!0});if(!f.found){if(!(f.anchor||f.tag||d)){u=f.end,f.comment&&(c.comment=f.comment);continue}d&&"block-seq"===d.type?a(f.end,"BAD_INDENT","All sequence items must start at the same column"):a(l,"MISSING_CHAR","Sequence item without - indicator")}const p=d?e(n,d,f,a):t(n,f.end,o,null,f,a);n.schema.compat&&r.flowIndentCheck(s.indent,d,a),l=p.range[2],c.items.push(p)}return c.range=[s.offset,l,u??l],c}},7655:(e,t)=>{t.resolveEnd=function resolveEnd(e,t,n,o){let i="";if(e){let r=!1,s="";for(const a of e){const{source:e,type:c}=a;switch(c){case"space":r=!0;break;case"comment":{n&&!r&&o(a,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const t=e.substring(1)||" ";i?i+=s+t:i=t,s="";break}case"newline":i&&(s+=e),r=!0;break;default:o(a,"UNEXPECTED_TOKEN",`Unexpected ${c} at node end`)}t+=e.length}}return{comment:i,offset:t}}},94658:(e,t,n)=>{var o=n(10466),i=n(10394),r=n(56575),s=n(13798),a=n(7655),c=n(5920),l=n(93094),u=n(96493);const d="Block collections are not allowed within flow collections",isBlock=e=>e&&("block-map"===e.type||"block-seq"===e.type);t.resolveFlowCollection=function resolveFlowCollection({composeNode:e,composeEmptyNode:t},n,f,p){const h="{"===f.start.source,m=h?"flow map":"flow sequence",g=h?new r.YAMLMap(n.schema):new s.YAMLSeq(n.schema);g.flow=!0;const y=n.atRoot;y&&(n.atRoot=!1);let v=f.offset+f.start.source.length;for(let s=0;s<f.items.length;++s){const a=f.items[s],{start:y,key:b,sep:S,value:k}=a,T=c.resolveProps(y,{flow:m,indicator:"explicit-key-ind",next:b??S?.[0],offset:v,onError:p,startOnNewline:!1});if(!T.found){if(!(T.anchor||T.tag||S||k)){0===s&&T.comma?p(T.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${m}`):s<f.items.length-1&&p(T.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${m}`),T.comment&&(g.comment?g.comment+="\n"+T.comment:g.comment=T.comment),v=T.end;continue}!h&&n.options.strict&&l.containsNewline(b)&&p(b,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(0===s)T.comma&&p(T.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${m}`);else if(T.comma||p(T.start,"MISSING_CHAR",`Missing , between ${m} items`),T.comment){let e="";e:for(const t of y)switch(t.type){case"comma":case"space":break;case"comment":e=t.source.substring(1);break e;default:break e}if(e){let t=g.items[g.items.length-1];o.isPair(t)&&(t=t.value??t.key),t.comment?t.comment+="\n"+e:t.comment=e,T.comment=T.comment.substring(e.length+1)}}if(h||S||T.found){const o=T.end,s=b?e(n,b,T,p):t(n,o,y,null,T,p);isBlock(b)&&p(s.range,"BLOCK_IN_FLOW",d);const l=c.resolveProps(S??[],{flow:m,indicator:"map-value-ind",next:k,offset:s.range[2],onError:p,startOnNewline:!1});if(l.found){if(!h&&!T.found&&n.options.strict){if(S)for(const e of S){if(e===l.found)break;if("newline"===e.type){p(e,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}T.start<l.found.offset-1024&&p(l.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else k&&("source"in k&&k.source&&":"===k.source[0]?p(k,"MISSING_CHAR",`Missing space after : in ${m}`):p(l.start,"MISSING_CHAR",`Missing , or : between ${m} items`));const f=k?e(n,k,l,p):l.found?t(n,l.end,S,null,l,p):null;f?isBlock(k)&&p(f.range,"BLOCK_IN_FLOW",d):l.comment&&(s.comment?s.comment+="\n"+l.comment:s.comment=l.comment);const w=new i.Pair(s,f);if(n.options.keepSourceTokens&&(w.srcToken=a),h){const e=g;u.mapIncludes(n,e.items,s)&&p(o,"DUPLICATE_KEY","Map keys must be unique"),e.items.push(w)}else{const e=new r.YAMLMap(n.schema);e.flow=!0,e.items.push(w),g.items.push(e)}v=f?f.range[2]:l.end}else{const o=k?e(n,k,T,p):t(n,T.end,S,null,T,p);g.items.push(o),v=o.range[2],isBlock(k)&&p(o.range,"BLOCK_IN_FLOW",d)}}const b=h?"}":"]",[S,...k]=f.end;let T=v;if(S&&S.source===b)T=S.offset+S.source.length;else{const e=m[0].toUpperCase()+m.substring(1);p(v,y?"MISSING_CHAR":"BAD_INDENT",y?`${e} must end with a ${b}`:`${e} in block collection must be sufficiently indented and end with a ${b}`),S&&1!==S.source.length&&k.unshift(S)}if(k.length>0){const e=a.resolveEnd(k,T,n.options.strict,p);e.comment&&(g.comment?g.comment+="\n"+e.comment:g.comment=e.comment),g.range=[f.offset,T,e.offset]}else g.range=[f.offset,T,T];return g}},7876:(e,t,n)=>{var o=n(58844),i=n(7655);function foldLines(e){let t,n;try{t=new RegExp("(.*?)(?<![ \t])[ \t]*\r?\n","sy"),n=new RegExp("[ \t]*(.*?)(?:(?<![ \t])[ \t]*)?\r?\n","sy")}catch(e){t=/(.*?)[ \t]*\r?\n/sy,n=/[ \t]*(.*?)[ \t]*\r?\n/sy}let o=t.exec(e);if(!o)return e;let i=o[1],r=" ",s=t.lastIndex;for(n.lastIndex=s;o=n.exec(e);)""===o[1]?"\n"===r?i+=r:r="\n":(i+=r+o[1],r=" "),s=n.lastIndex;const a=/[ \t]*(.*)/sy;return a.lastIndex=s,o=a.exec(e),i+r+(o?.[1]??"")}function foldNewline(e,t){let n="",o=e[t+1];for(;!(" "!==o&&"\t"!==o&&"\n"!==o&&"\r"!==o||"\r"===o&&"\n"!==e[t+2]);)"\n"===o&&(n+="\n"),o=e[(t+=1)+1];return n||(n=" "),{fold:n,offset:t}}const r={0:"\0",a:"",b:"\b",e:"",f:"\f",n:"\n",r:"\r",t:"\t",v:"\v",N:"
",_:" ",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\","\t":"\t"};function parseCharCode(e,t,n,o){const i=e.substr(t,n),r=i.length===n&&/^[0-9a-fA-F]+$/.test(i)?parseInt(i,16):NaN;if(isNaN(r)){const i=e.substr(t-2,n+2);return o(t-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${i}`),i}return String.fromCodePoint(r)}t.resolveFlowScalar=function resolveFlowScalar(e,t,n){const{offset:s,type:a,source:c,end:l}=e;let u,d;const _onError=(e,t,o)=>n(s+e,t,o);switch(a){case"scalar":u=o.Scalar.PLAIN,d=function plainValue(e,t){let n="";switch(e[0]){case"\t":n="a tab character";break;case",":n="flow indicator character ,";break;case"%":n="directive indicator character %";break;case"|":case">":n=`block scalar indicator ${e[0]}`;break;case"@":case"`":n=`reserved character ${e[0]}`}n&&t(0,"BAD_SCALAR_START",`Plain value cannot start with ${n}`);return foldLines(e)}(c,_onError);break;case"single-quoted-scalar":u=o.Scalar.QUOTE_SINGLE,d=function singleQuotedValue(e,t){"'"===e[e.length-1]&&1!==e.length||t(e.length,"MISSING_CHAR","Missing closing 'quote");return foldLines(e.slice(1,-1)).replace(/''/g,"'")}(c,_onError);break;case"double-quoted-scalar":u=o.Scalar.QUOTE_DOUBLE,d=function doubleQuotedValue(e,t){let n="";for(let o=1;o<e.length-1;++o){const i=e[o];if("\r"!==i||"\n"!==e[o+1])if("\n"===i){const{fold:t,offset:i}=foldNewline(e,o);n+=t,o=i}else if("\\"===i){let i=e[++o];const s=r[i];if(s)n+=s;else if("\n"===i)for(i=e[o+1];" "===i||"\t"===i;)i=e[1+ ++o];else if("\r"===i&&"\n"===e[o+1])for(i=e[1+ ++o];" "===i||"\t"===i;)i=e[1+ ++o];else if("x"===i||"u"===i||"U"===i){const r={x:2,u:4,U:8}[i];n+=parseCharCode(e,o+1,r,t),o+=r}else{const i=e.substr(o-1,2);t(o-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${i}`),n+=i}}else if(" "===i||"\t"===i){const t=o;let r=e[o+1];for(;" "===r||"\t"===r;)r=e[1+ ++o];"\n"===r||"\r"===r&&"\n"===e[o+2]||(n+=o>t?e.slice(t,o+1):i)}else n+=i}'"'===e[e.length-1]&&1!==e.length||t(e.length,"MISSING_CHAR",'Missing closing "quote');return n}(c,_onError);break;default:return n(e,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${a}`),{value:"",type:null,comment:"",range:[s,s+c.length,s+c.length]}}const f=s+c.length,p=i.resolveEnd(l,f,t,n);return{value:d,type:u,comment:p.comment,range:[s,f,p.offset]}}},5920:(e,t)=>{t.resolveProps=function resolveProps(e,{flow:t,indicator:n,next:o,offset:i,onError:r,startOnNewline:s}){let a=!1,c=s,l=s,u="",d="",f=!1,p=!1,h=!1,m=null,g=null,y=null,v=null,b=null;for(const o of e)switch(h&&("space"!==o.type&&"newline"!==o.type&&"comma"!==o.type&&r(o.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),h=!1),o.type){case"space":!t&&c&&"doc-start"!==n&&"\t"===o.source[0]&&r(o,"TAB_AS_INDENT","Tabs are not allowed as indentation"),l=!0;break;case"comment":{l||r(o,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const e=o.source.substring(1)||" ";u?u+=d+e:u=e,d="",c=!1;break}case"newline":c?u?u+=o.source:a=!0:d+=o.source,c=!0,f=!0,(m||g)&&(p=!0),l=!0;break;case"anchor":m&&r(o,"MULTIPLE_ANCHORS","A node can have at most one anchor"),o.source.endsWith(":")&&r(o.offset+o.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),m=o,null===b&&(b=o.offset),c=!1,l=!1,h=!0;break;case"tag":g&&r(o,"MULTIPLE_TAGS","A node can have at most one tag"),g=o,null===b&&(b=o.offset),c=!1,l=!1,h=!0;break;case n:(m||g)&&r(o,"BAD_PROP_ORDER",`Anchors and tags must be after the ${o.source} indicator`),v&&r(o,"UNEXPECTED_TOKEN",`Unexpected ${o.source} in ${t??"collection"}`),v=o,c=!1,l=!1;break;case"comma":if(t){y&&r(o,"UNEXPECTED_TOKEN",`Unexpected , in ${t}`),y=o,c=!1,l=!1;break}default:r(o,"UNEXPECTED_TOKEN",`Unexpected ${o.type} token`),c=!1,l=!1}const S=e[e.length-1],k=S?S.offset+S.source.length:i;return h&&o&&"space"!==o.type&&"newline"!==o.type&&"comma"!==o.type&&("scalar"!==o.type||""!==o.source)&&r(o.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),{comma:y,found:v,spaceBefore:a,comment:u,hasNewline:f,hasNewlineAfterProp:p,anchor:m,tag:g,end:k,start:b??k}}},93094:(e,t)=>{t.containsNewline=function containsNewline(e){if(!e)return null;switch(e.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(e.source.includes("\n"))return!0;if(e.end)for(const t of e.end)if("newline"===t.type)return!0;return!1;case"flow-collection":for(const t of e.items){for(const e of t.start)if("newline"===e.type)return!0;if(t.sep)for(const e of t.sep)if("newline"===e.type)return!0;if(containsNewline(t.key)||containsNewline(t.value))return!0}return!1;default:return!0}}},7154:(e,t)=>{t.emptyScalarPosition=function emptyScalarPosition(e,t,n){if(t){null===n&&(n=t.length);for(let o=n-1;o>=0;--o){let n=t[o];switch(n.type){case"space":case"comment":case"newline":e-=n.source.length;continue}for(n=t[++o];"space"===n?.type;)e+=n.source.length,n=t[++o];break}}return e}},72566:(e,t,n)=>{var o=n(93094);t.flowIndentCheck=function flowIndentCheck(e,t,n){if("flow-collection"===t?.type){const i=t.end[0];if(i.indent===e&&("]"===i.source||"}"===i.source)&&o.containsNewline(t)){n(i,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}}},96493:(e,t,n)=>{var o=n(10466);t.mapIncludes=function mapIncludes(e,t,n){const{uniqueKeys:i}=e.options;if(!1===i)return!1;const r="function"==typeof i?i:(t,n)=>t===n||o.isScalar(t)&&o.isScalar(n)&&t.value===n.value&&!("<<"===t.value&&e.schema.merge);return t.some((e=>r(e.key,n)))}},86068:(e,t,n)=>{var o=n(12055),i=n(43365),r=n(10466),s=n(10394),a=n(93257),c=n(23673),l=n(20611),u=n(89957),d=n(21903),f=n(33085),p=n(87581),h=n(99226);class Document{constructor(e,t,n){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,r.NODE_TYPE,{value:r.DOC});let o=null;"function"==typeof t||Array.isArray(t)?o=t:void 0===n&&t&&(n=t,t=void 0);const i=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,uniqueKeys:!0,version:"1.2"},n);this.options=i;let{version:s}=i;n?._directives?(this.directives=n._directives.atDocument(),this.directives.yaml.explicit&&(s=this.directives.yaml.version)):this.directives=new h.Directives({version:s}),this.setSchema(s,n),this.contents=void 0===e?null:this.createNode(e,o,n)}clone(){const e=Object.create(Document.prototype,{[r.NODE_TYPE]:{value:r.DOC}});return e.commentBefore=this.commentBefore,e.comment=this.comment,e.errors=this.errors.slice(),e.warnings=this.warnings.slice(),e.options=Object.assign({},this.options),this.directives&&(e.directives=this.directives.clone()),e.schema=this.schema.clone(),e.contents=r.isNode(this.contents)?this.contents.clone(e.schema):this.contents,this.range&&(e.range=this.range.slice()),e}add(e){assertCollection(this.contents)&&this.contents.add(e)}addIn(e,t){assertCollection(this.contents)&&this.contents.addIn(e,t)}createAlias(e,t){if(!e.anchor){const n=d.anchorNames(this);e.anchor=!t||n.has(t)?d.findNewAnchor(t||"a",n):t}return new o.Alias(e.anchor)}createNode(e,t,n){let o;if("function"==typeof t)e=t.call({"":e},"",e),o=t;else if(Array.isArray(t)){const keyToStr=e=>"number"==typeof e||e instanceof String||e instanceof Number,e=t.filter(keyToStr).map(String);e.length>0&&(t=t.concat(e)),o=t}else void 0===n&&t&&(n=t,t=void 0);const{aliasDuplicateObjects:i,anchorPrefix:s,flow:a,keepUndefined:c,onTagObj:l,tag:u}=n??{},{onAnchor:f,setAnchors:h,sourceObjects:m}=d.createNodeAnchors(this,s||"a"),g={aliasDuplicateObjects:i??!0,keepUndefined:c??!1,onAnchor:f,onTagObj:l,replacer:o,schema:this.schema,sourceObjects:m},y=p.createNode(e,u,g);return a&&r.isCollection(y)&&(y.flow=!0),h(),y}createPair(e,t,n={}){const o=this.createNode(e,null,n),i=this.createNode(t,null,n);return new s.Pair(o,i)}delete(e){return!!assertCollection(this.contents)&&this.contents.delete(e)}deleteIn(e){return i.isEmptyPath(e)?null!=this.contents&&(this.contents=null,!0):!!assertCollection(this.contents)&&this.contents.deleteIn(e)}get(e,t){return r.isCollection(this.contents)?this.contents.get(e,t):void 0}getIn(e,t){return i.isEmptyPath(e)?!t&&r.isScalar(this.contents)?this.contents.value:this.contents:r.isCollection(this.contents)?this.contents.getIn(e,t):void 0}has(e){return!!r.isCollection(this.contents)&&this.contents.has(e)}hasIn(e){return i.isEmptyPath(e)?void 0!==this.contents:!!r.isCollection(this.contents)&&this.contents.hasIn(e)}set(e,t){null==this.contents?this.contents=i.collectionFromPath(this.schema,[e],t):assertCollection(this.contents)&&this.contents.set(e,t)}setIn(e,t){i.isEmptyPath(e)?this.contents=t:null==this.contents?this.contents=i.collectionFromPath(this.schema,Array.from(e),t):assertCollection(this.contents)&&this.contents.setIn(e,t)}setSchema(e,t={}){let n;switch("number"==typeof e&&(e=String(e)),e){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new h.Directives({version:"1.1"}),n={merge:!0,resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=e:this.directives=new h.Directives({version:e}),n={merge:!1,resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,n=null;break;default:{const t=JSON.stringify(e);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${t}`)}}if(t.schema instanceof Object)this.schema=t.schema;else{if(!n)throw new Error("With a null YAML version, the { schema: Schema } option is required");this.schema=new c.Schema(Object.assign(n,t))}}toJS({json:e,jsonArg:t,mapAsMap:n,maxAliasCount:o,onAnchor:i,reviver:r}={}){const s={anchors:new Map,doc:this,keep:!e,mapAsMap:!0===n,mapKeyWarned:!1,maxAliasCount:"number"==typeof o?o:100,stringify:l.stringify},c=a.toJS(this.contents,t??"",s);if("function"==typeof i)for(const{count:e,res:t}of s.anchors.values())i(t,e);return"function"==typeof r?f.applyReviver(r,{"":c},"",c):c}toJSON(e,t){return this.toJS({json:!0,jsonArg:e,mapAsMap:!1,onAnchor:t})}toString(e={}){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");if("indent"in e&&(!Number.isInteger(e.indent)||Number(e.indent)<=0)){const t=JSON.stringify(e.indent);throw new Error(`"indent" option must be a positive integer, not ${t}`)}return u.stringifyDocument(this,e)}}function assertCollection(e){if(r.isCollection(e))return!0;throw new Error("Expected a YAML collection as document contents")}t.Document=Document},21903:(e,t,n)=>{var o=n(10466),i=n(81381);function anchorNames(e){const t=new Set;return i.visit(e,{Value(e,n){n.anchor&&t.add(n.anchor)}}),t}function findNewAnchor(e,t){for(let n=1;;++n){const o=`${e}${n}`;if(!t.has(o))return o}}t.anchorIsValid=function anchorIsValid(e){if(/[\x00-\x19\s,[\]{}]/.test(e)){const t=JSON.stringify(e);throw new Error(`Anchor must not contain whitespace or control characters: ${t}`)}return!0},t.anchorNames=anchorNames,t.createNodeAnchors=function createNodeAnchors(e,t){const n=[],i=new Map;let r=null;return{onAnchor:o=>{n.push(o),r||(r=anchorNames(e));const i=findNewAnchor(t,r);return r.add(i),i},setAnchors:()=>{for(const e of n){const t=i.get(e);if("object"!=typeof t||!t.anchor||!o.isScalar(t.node)&&!o.isCollection(t.node)){const t=new Error("Failed to resolve repeated object (this should not happen)");throw t.source=e,t}t.node.anchor=t.anchor}},sourceObjects:i}},t.findNewAnchor=findNewAnchor},33085:(e,t)=>{t.applyReviver=function applyReviver(e,t,n,o){if(o&&"object"==typeof o)if(Array.isArray(o))for(let t=0,n=o.length;t<n;++t){const n=o[t],i=applyReviver(e,o,String(t),n);void 0===i?delete o[t]:i!==n&&(o[t]=i)}else if(o instanceof Map)for(const t of Array.from(o.keys())){const n=o.get(t),i=applyReviver(e,o,t,n);void 0===i?o.delete(t):i!==n&&o.set(t,i)}else if(o instanceof Set)for(const t of Array.from(o)){const n=applyReviver(e,o,t,t);void 0===n?o.delete(t):n!==t&&(o.delete(t),o.add(n))}else for(const[t,n]of Object.entries(o)){const i=applyReviver(e,o,t,n);void 0===i?delete o[t]:i!==n&&(o[t]=i)}return e.call(t,n,o)}},87581:(e,t,n)=>{var o=n(12055),i=n(10466),r=n(58844);t.createNode=function createNode(e,t,n){if(i.isDocument(e)&&(e=e.contents),i.isNode(e))return e;if(i.isPair(e)){const t=n.schema[i.MAP].createNode?.(n.schema,null,n);return t.items.push(e),t}(e instanceof String||e instanceof Number||e instanceof Boolean||"undefined"!=typeof BigInt&&e instanceof BigInt)&&(e=e.valueOf());const{aliasDuplicateObjects:s,onAnchor:a,onTagObj:c,schema:l,sourceObjects:u}=n;let d;if(s&&e&&"object"==typeof e){if(d=u.get(e),d)return d.anchor||(d.anchor=a(e)),new o.Alias(d.anchor);d={anchor:null,node:null},u.set(e,d)}t?.startsWith("!!")&&(t="tag:yaml.org,2002:"+t.slice(2));let f=function findTagObject(e,t,n){if(t){const e=n.filter((e=>e.tag===t)),o=e.find((e=>!e.format))??e[0];if(!o)throw new Error(`Tag ${t} not found`);return o}return n.find((t=>t.identify?.(e)&&!t.format))}(e,t,l.tags);if(!f){if(e&&"function"==typeof e.toJSON&&(e=e.toJSON()),!e||"object"!=typeof e){const t=new r.Scalar(e);return d&&(d.node=t),t}f=e instanceof Map?l[i.MAP]:Symbol.iterator in Object(e)?l[i.SEQ]:l[i.MAP]}c&&(c(f),delete n.onTagObj);const p=f?.createNode?f.createNode(n.schema,e,n):new r.Scalar(e);return t&&(p.tag=t),d&&(d.node=p),p}},99226:(e,t,n)=>{var o=n(10466),i=n(81381);const r={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"};class Directives{constructor(e,t){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},Directives.defaultYaml,e),this.tags=Object.assign({},Directives.defaultTags,t)}clone(){const e=new Directives(this.yaml,this.tags);return e.docStart=this.docStart,e}atDocument(){const e=new Directives(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:Directives.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},Directives.defaultTags)}return e}add(e,t){this.atNextDocument&&(this.yaml={explicit:Directives.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},Directives.defaultTags),this.atNextDocument=!1);const n=e.trim().split(/[ \t]+/),o=n.shift();switch(o){case"%TAG":{if(2!==n.length&&(t(0,"%TAG directive should contain exactly two parts"),n.length<2))return!1;const[e,o]=n;return this.tags[e]=o,!0}case"%YAML":{if(this.yaml.explicit=!0,1!==n.length)return t(0,"%YAML directive should contain exactly one part"),!1;const[e]=n;if("1.1"===e||"1.2"===e)return this.yaml.version=e,!0;return t(6,`Unsupported YAML version ${e}`,/^\d+\.\d+$/.test(e)),!1}default:return t(0,`Unknown directive ${o}`,!0),!1}}tagName(e,t){if("!"===e)return"!";if("!"!==e[0])return t(`Not a valid tag: ${e}`),null;if("<"===e[1]){const n=e.slice(2,-1);return"!"===n||"!!"===n?(t(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(">"!==e[e.length-1]&&t("Verbatim tags must end with a >"),n)}const[,n,o]=e.match(/^(.*!)([^!]*)$/);o||t(`The ${e} tag has no suffix`);const i=this.tags[n];return i?i+decodeURIComponent(o):"!"===n?e:(t(`Could not resolve tag: ${e}`),null)}tagString(e){for(const[t,n]of Object.entries(this.tags))if(e.startsWith(n))return t+e.substring(n.length).replace(/[!,[\]{}]/g,(e=>r[e]));return"!"===e[0]?e:`!<${e}>`}toString(e){const t=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],n=Object.entries(this.tags);let r;if(e&&n.length>0&&o.isNode(e.contents)){const t={};i.visit(e.contents,((e,n)=>{o.isNode(n)&&n.tag&&(t[n.tag]=!0)})),r=Object.keys(t)}else r=[];for(const[o,i]of n)"!!"===o&&"tag:yaml.org,2002:"===i||e&&!r.some((e=>e.startsWith(i)))||t.push(`%TAG ${o} ${i}`);return t.join("\n")}}Directives.defaultYaml={explicit:!1,version:"1.2"},Directives.defaultTags={"!!":"tag:yaml.org,2002:"},t.Directives=Directives},2394:(e,t)=>{class YAMLError extends Error{constructor(e,t,n,o){super(),this.name=e,this.code=n,this.message=o,this.pos=t}}t.YAMLError=YAMLError,t.YAMLParseError=class YAMLParseError extends YAMLError{constructor(e,t,n){super("YAMLParseError",e,t,n)}},t.YAMLWarning=class YAMLWarning extends YAMLError{constructor(e,t,n){super("YAMLWarning",e,t,n)}},t.prettifyError=(e,t)=>n=>{if(-1===n.pos[0])return;n.linePos=n.pos.map((e=>t.linePos(e)));const{line:o,col:i}=n.linePos[0];n.message+=` at line ${o}, column ${i}`;let r=i-1,s=e.substring(t.lineStarts[o-1],t.lineStarts[o]).replace(/[\n\r]+$/,"");if(r>=60&&s.length>80){const e=Math.min(r-39,s.length-79);s="…"+s.substring(e),r-=e-1}if(s.length>80&&(s=s.substring(0,79)+"…"),o>1&&/^ *$/.test(s.substring(0,r))){let n=e.substring(t.lineStarts[o-2],t.lineStarts[o-1]);n.length>80&&(n=n.substring(0,79)+"…\n"),s=n+s}if(/[^ ]/.test(s)){let e=1;const t=n.linePos[1];t&&t.line===o&&t.col>i&&(e=Math.max(1,Math.min(t.col-i,80-r)));const a=" ".repeat(r)+"^".repeat(e);n.message+=`:\n\n${s}\n${a}\n`}}},93419:(e,t,n)=>{var o=n(5281),i=n(86068),r=n(23673),s=n(2394),a=n(12055),c=n(10466),l=n(10394),u=n(58844),d=n(56575),f=n(13798),p=n(75208),h=n(87135),m=n(94708),g=n(69369),y=n(68011),v=n(81381);t.Composer=o.Composer,t.Document=i.Document,t.Schema=r.Schema,t.YAMLError=s.YAMLError,t.YAMLParseError=s.YAMLParseError,t.YAMLWarning=s.YAMLWarning,t.Alias=a.Alias,t.isAlias=c.isAlias,t.isCollection=c.isCollection,t.isDocument=c.isDocument,t.isMap=c.isMap,t.isNode=c.isNode,t.isPair=c.isPair,t.isScalar=c.isScalar,t.isSeq=c.isSeq,t.Pair=l.Pair,t.Scalar=u.Scalar,t.YAMLMap=d.YAMLMap,t.YAMLSeq=f.YAMLSeq,t.CST=p,t.Lexer=h.Lexer,t.LineCounter=m.LineCounter,t.Parser=g.Parser,t.parse=y.parse,t.parseAllDocuments=y.parseAllDocuments,t.parseDocument=y.parseDocument,t.stringify=y.stringify,t.visit=v.visit,t.visitAsync=v.visitAsync},95441:(e,t)=>{t.debug=function debug(e,...t){"debug"===e&&console.log(...t)},t.warn=function warn(e,t){"debug"!==e&&"warn"!==e||("undefined"!=typeof process&&process.emitWarning?process.emitWarning(t):console.warn(t))}},12055:(e,t,n)=>{var o=n(21903),i=n(81381),r=n(10466);class Alias extends r.NodeBase{constructor(e){super(r.ALIAS),this.source=e,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(e){let t;return i.visit(e,{Node:(e,n)=>{if(n===this)return i.visit.BREAK;n.anchor===this.source&&(t=n)}}),t}toJSON(e,t){if(!t)return{source:this.source};const{anchors:n,doc:o,maxAliasCount:i}=t,r=this.resolve(o);if(!r){const e=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(e)}const s=n.get(r);if(!s||void 0===s.res){throw new ReferenceError("This should not happen: Alias anchor was not resolved?")}if(i>=0&&(s.count+=1,0===s.aliasCount&&(s.aliasCount=getAliasCount(o,r,n)),s.count*s.aliasCount>i)){throw new ReferenceError("Excessive alias count indicates a resource exhaustion attack")}return s.res}toString(e,t,n){const i=`*${this.source}`;if(e){if(o.anchorIsValid(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){const e=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(e)}if(e.implicitKey)return`${i} `}return i}}function getAliasCount(e,t,n){if(r.isAlias(t)){const o=t.resolve(e),i=n&&o&&n.get(o);return i?i.count*i.aliasCount:0}if(r.isCollection(t)){let o=0;for(const i of t.items){const t=getAliasCount(e,i,n);t>o&&(o=t)}return o}if(r.isPair(t)){const o=getAliasCount(e,t.key,n),i=getAliasCount(e,t.value,n);return Math.max(o,i)}return 1}t.Alias=Alias},43365:(e,t,n)=>{var o=n(87581),i=n(10466);function collectionFromPath(e,t,n){let i=n;for(let e=t.length-1;e>=0;--e){const n=t[e];if("number"==typeof n&&Number.isInteger(n)&&n>=0){const e=[];e[n]=i,i=e}else i=new Map([[n,i]])}return o.createNode(i,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:e,sourceObjects:new Map})}const isEmptyPath=e=>null==e||"object"==typeof e&&!!e[Symbol.iterator]().next().done;class Collection extends i.NodeBase{constructor(e,t){super(e),Object.defineProperty(this,"schema",{value:t,configurable:!0,enumerable:!1,writable:!0})}clone(e){const t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return e&&(t.schema=e),t.items=t.items.map((t=>i.isNode(t)||i.isPair(t)?t.clone(e):t)),this.range&&(t.range=this.range.slice()),t}addIn(e,t){if(isEmptyPath(e))this.add(t);else{const[n,...o]=e,r=this.get(n,!0);if(i.isCollection(r))r.addIn(o,t);else{if(void 0!==r||!this.schema)throw new Error(`Expected YAML collection at ${n}. Remaining path: ${o}`);this.set(n,collectionFromPath(this.schema,o,t))}}}deleteIn(e){const[t,...n]=e;if(0===n.length)return this.delete(t);const o=this.get(t,!0);if(i.isCollection(o))return o.deleteIn(n);throw new Error(`Expected YAML collection at ${t}. Remaining path: ${n}`)}getIn(e,t){const[n,...o]=e,r=this.get(n,!0);return 0===o.length?!t&&i.isScalar(r)?r.value:r:i.isCollection(r)?r.getIn(o,t):void 0}hasAllNullValues(e){return this.items.every((t=>{if(!i.isPair(t))return!1;const n=t.value;return null==n||e&&i.isScalar(n)&&null==n.value&&!n.commentBefore&&!n.comment&&!n.tag}))}hasIn(e){const[t,...n]=e;if(0===n.length)return this.has(t);const o=this.get(t,!0);return!!i.isCollection(o)&&o.hasIn(n)}setIn(e,t){const[n,...o]=e;if(0===o.length)this.set(n,t);else{const e=this.get(n,!0);if(i.isCollection(e))e.setIn(o,t);else{if(void 0!==e||!this.schema)throw new Error(`Expected YAML collection at ${n}. Remaining path: ${o}`);this.set(n,collectionFromPath(this.schema,o,t))}}}}Collection.maxFlowStringSingleLineLength=60,t.Collection=Collection,t.collectionFromPath=collectionFromPath,t.isEmptyPath=isEmptyPath},10466:(e,t)=>{const n=Symbol.for("yaml.alias"),o=Symbol.for("yaml.document"),i=Symbol.for("yaml.map"),r=Symbol.for("yaml.pair"),s=Symbol.for("yaml.scalar"),a=Symbol.for("yaml.seq"),c=Symbol.for("yaml.node.type"),isScalar=e=>!!e&&"object"==typeof e&&e[c]===s;function isCollection(e){if(e&&"object"==typeof e)switch(e[c]){case i:case a:return!0}return!1}t.ALIAS=n,t.DOC=o,t.MAP=i,t.NODE_TYPE=c,t.NodeBase=class NodeBase{constructor(e){Object.defineProperty(this,c,{value:e})}clone(){const e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}},t.PAIR=r,t.SCALAR=s,t.SEQ=a,t.hasAnchor=e=>(isScalar(e)||isCollection(e))&&!!e.anchor,t.isAlias=e=>!!e&&"object"==typeof e&&e[c]===n,t.isCollection=isCollection,t.isDocument=e=>!!e&&"object"==typeof e&&e[c]===o,t.isMap=e=>!!e&&"object"==typeof e&&e[c]===i,t.isNode=function isNode(e){if(e&&"object"==typeof e)switch(e[c]){case n:case i:case s:case a:return!0}return!1},t.isPair=e=>!!e&&"object"==typeof e&&e[c]===r,t.isScalar=isScalar,t.isSeq=e=>!!e&&"object"==typeof e&&e[c]===a},10394:(e,t,n)=>{var o=n(87581),i=n(38843),r=n(13567),s=n(10466);class Pair{constructor(e,t=null){Object.defineProperty(this,s.NODE_TYPE,{value:s.PAIR}),this.key=e,this.value=t}clone(e){let{key:t,value:n}=this;return s.isNode(t)&&(t=t.clone(e)),s.isNode(n)&&(n=n.clone(e)),new Pair(t,n)}toJSON(e,t){const n=t?.mapAsMap?new Map:{};return r.addPairToJSMap(t,n,this)}toString(e,t,n){return e?.doc?i.stringifyPair(this,e,t,n):JSON.stringify(this)}}t.Pair=Pair,t.createPair=function createPair(e,t,n){const i=o.createNode(e,void 0,n),r=o.createNode(t,void 0,n);return new Pair(i,r)}},58844:(e,t,n)=>{var o=n(10466),i=n(93257);class Scalar extends o.NodeBase{constructor(e){super(o.SCALAR),this.value=e}toJSON(e,t){return t?.keep?this.value:i.toJS(this.value,e,t)}toString(){return String(this.value)}}Scalar.BLOCK_FOLDED="BLOCK_FOLDED",Scalar.BLOCK_LITERAL="BLOCK_LITERAL",Scalar.PLAIN="PLAIN",Scalar.QUOTE_DOUBLE="QUOTE_DOUBLE",Scalar.QUOTE_SINGLE="QUOTE_SINGLE",t.Scalar=Scalar,t.isScalarValue=e=>!e||"function"!=typeof e&&"object"!=typeof e},56575:(e,t,n)=>{var o=n(40240),i=n(13567),r=n(43365),s=n(10466),a=n(10394),c=n(58844);function findPair(e,t){const n=s.isScalar(t)?t.value:t;for(const o of e)if(s.isPair(o)){if(o.key===t||o.key===n)return o;if(s.isScalar(o.key)&&o.key.value===n)return o}}class YAMLMap extends r.Collection{static get tagName(){return"tag:yaml.org,2002:map"}constructor(e){super(s.MAP,e),this.items=[]}add(e,t){let n;n=s.isPair(e)?e:e&&"object"==typeof e&&"key"in e?new a.Pair(e.key,e.value):new a.Pair(e,e?.value);const o=findPair(this.items,n.key),i=this.schema?.sortMapEntries;if(o){if(!t)throw new Error(`Key ${n.key} already set`);s.isScalar(o.value)&&c.isScalarValue(n.value)?o.value.value=n.value:o.value=n.value}else if(i){const e=this.items.findIndex((e=>i(n,e)<0));-1===e?this.items.push(n):this.items.splice(e,0,n)}else this.items.push(n)}delete(e){const t=findPair(this.items,e);if(!t)return!1;return this.items.splice(this.items.indexOf(t),1).length>0}get(e,t){const n=findPair(this.items,e),o=n?.value;return(!t&&s.isScalar(o)?o.value:o)??void 0}has(e){return!!findPair(this.items,e)}set(e,t){this.add(new a.Pair(e,t),!0)}toJSON(e,t,n){const o=n?new n:t?.mapAsMap?new Map:{};t?.onCreate&&t.onCreate(o);for(const e of this.items)i.addPairToJSMap(t,o,e);return o}toString(e,t,n){if(!e)return JSON.stringify(this);for(const e of this.items)if(!s.isPair(e))throw new Error(`Map items must all be pairs; found ${JSON.stringify(e)} instead`);return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),o.stringifyCollection(this,e,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:e.indent||"",onChompKeep:n,onComment:t})}}t.YAMLMap=YAMLMap,t.findPair=findPair},13798:(e,t,n)=>{var o=n(40240),i=n(43365),r=n(10466),s=n(58844),a=n(93257);class YAMLSeq extends i.Collection{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(e){super(r.SEQ,e),this.items=[]}add(e){this.items.push(e)}delete(e){const t=asItemIndex(e);if("number"!=typeof t)return!1;return this.items.splice(t,1).length>0}get(e,t){const n=asItemIndex(e);if("number"!=typeof n)return;const o=this.items[n];return!t&&r.isScalar(o)?o.value:o}has(e){const t=asItemIndex(e);return"number"==typeof t&&t<this.items.length}set(e,t){const n=asItemIndex(e);if("number"!=typeof n)throw new Error(`Expected a valid index, not ${e}.`);const o=this.items[n];r.isScalar(o)&&s.isScalarValue(t)?o.value=t:this.items[n]=t}toJSON(e,t){const n=[];t?.onCreate&&t.onCreate(n);let o=0;for(const e of this.items)n.push(a.toJS(e,String(o++),t));return n}toString(e,t,n){return e?o.stringifyCollection(this,e,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(e.indent||"")+" ",onChompKeep:n,onComment:t}):JSON.stringify(this)}}function asItemIndex(e){let t=r.isScalar(e)?e.value:e;return t&&"string"==typeof t&&(t=Number(t)),"number"==typeof t&&Number.isInteger(t)&&t>=0?t:null}t.YAMLSeq=YAMLSeq},13567:(e,t,n)=>{var o=n(95441),i=n(20611),r=n(10466),s=n(58844),a=n(93257);const isMergeKey=e=>"<<"===e||r.isScalar(e)&&"<<"===e.value&&(!e.type||e.type===s.Scalar.PLAIN);function mergeToJSMap(e,t,n){const o=e&&r.isAlias(n)?n.resolve(e.doc):n;if(!r.isMap(o))throw new Error("Merge sources must be maps or map aliases");const i=o.toJSON(null,e,Map);for(const[e,n]of i)t instanceof Map?t.has(e)||t.set(e,n):t instanceof Set?t.add(e):Object.prototype.hasOwnProperty.call(t,e)||Object.defineProperty(t,e,{value:n,writable:!0,enumerable:!0,configurable:!0});return t}t.addPairToJSMap=function addPairToJSMap(e,t,{key:n,value:s}){if(e?.doc.schema.merge&&isMergeKey(n))if(s=r.isAlias(s)?s.resolve(e.doc):s,r.isSeq(s))for(const n of s.items)mergeToJSMap(e,t,n);else if(Array.isArray(s))for(const n of s)mergeToJSMap(e,t,n);else mergeToJSMap(e,t,s);else{const c=a.toJS(n,"",e);if(t instanceof Map)t.set(c,a.toJS(s,c,e));else if(t instanceof Set)t.add(c);else{const l=function stringifyKey(e,t,n){if(null===t)return"";if("object"!=typeof t)return String(t);if(r.isNode(e)&&n&&n.doc){const t=i.createStringifyContext(n.doc,{});t.anchors=new Set;for(const e of n.anchors.keys())t.anchors.add(e.anchor);t.inFlow=!0,t.inStringifyKey=!0;const r=e.toString(t);if(!n.mapKeyWarned){let e=JSON.stringify(r);e.length>40&&(e=e.substring(0,36)+'..."'),o.warn(n.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${e}. Set mapAsMap: true to use object keys.`),n.mapKeyWarned=!0}return r}return JSON.stringify(t)}(n,c,e),u=a.toJS(s,l,e);l in t?Object.defineProperty(t,l,{value:u,writable:!0,enumerable:!0,configurable:!0}):t[l]=u}}return t}},93257:(e,t,n)=>{var o=n(10466);t.toJS=function toJS(e,t,n){if(Array.isArray(e))return e.map(((e,t)=>toJS(e,String(t),n)));if(e&&"function"==typeof e.toJSON){if(!n||!o.hasAnchor(e))return e.toJSON(t,n);const i={aliasCount:0,count:1,res:void 0};n.anchors.set(e,i),n.onCreate=e=>{i.res=e,delete n.onCreate};const r=e.toJSON(t,n);return n.onCreate&&n.onCreate(r),r}return"bigint"!=typeof e||n?.keep?e:Number(e)}},47084:(e,t,n)=>{var o=n(51328),i=n(7876),r=n(2394),s=n(98431);function addEndtoBlockProps(e,t){if(t)for(const n of t)switch(n.type){case"space":case"comment":e.push(n);break;case"newline":return e.push(n),!0}return!1}function setFlowScalarValue(e,t,n){switch(e.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":e.type=n,e.source=t;break;case"block-scalar":{const o=e.props.slice(1);let i=t.length;"block-scalar-header"===e.props[0].type&&(i-=e.props[0].source.length);for(const e of o)e.offset+=i;delete e.props,Object.assign(e,{type:n,source:t,end:o});break}case"block-map":case"block-seq":{const o={type:"newline",offset:e.offset+t.length,indent:e.indent,source:"\n"};delete e.items,Object.assign(e,{type:n,source:t,end:[o]});break}default:{const o="indent"in e?e.indent:-1,i="end"in e&&Array.isArray(e.end)?e.end.filter((e=>"space"===e.type||"comment"===e.type||"newline"===e.type)):[];for(const t of Object.keys(e))"type"!==t&&"offset"!==t&&delete e[t];Object.assign(e,{type:n,indent:o,source:t,end:i})}}}t.createScalarToken=function createScalarToken(e,t){const{implicitKey:n=!1,indent:o,inFlow:i=!1,offset:r=-1,type:a="PLAIN"}=t,c=s.stringifyString({type:a,value:e},{implicitKey:n,indent:o>0?" ".repeat(o):"",inFlow:i,options:{blockQuote:!0,lineWidth:-1}}),l=t.end??[{type:"newline",offset:-1,indent:o,source:"\n"}];switch(c[0]){case"|":case">":{const e=c.indexOf("\n"),t=c.substring(0,e),n=c.substring(e+1)+"\n",i=[{type:"block-scalar-header",offset:r,indent:o,source:t}];return addEndtoBlockProps(i,l)||i.push({type:"newline",offset:-1,indent:o,source:"\n"}),{type:"block-scalar",offset:r,indent:o,props:i,source:n}}case'"':return{type:"double-quoted-scalar",offset:r,indent:o,source:c,end:l};case"'":return{type:"single-quoted-scalar",offset:r,indent:o,source:c,end:l};default:return{type:"scalar",offset:r,indent:o,source:c,end:l}}},t.resolveAsScalar=function resolveAsScalar(e,t=!0,n){if(e){const _onError=(e,t,o)=>{const i="number"==typeof e?e:Array.isArray(e)?e[0]:e.offset;if(!n)throw new r.YAMLParseError([i,i+1],t,o);n(i,t,o)};switch(e.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return i.resolveFlowScalar(e,t,_onError);case"block-scalar":return o.resolveBlockScalar(e,t,_onError)}}return null},t.setScalarValue=function setScalarValue(e,t,n={}){let{afterKey:o=!1,implicitKey:i=!1,inFlow:r=!1,type:a}=n,c="indent"in e?e.indent:null;if(o&&"number"==typeof c&&(c+=2),!a)switch(e.type){case"single-quoted-scalar":a="QUOTE_SINGLE";break;case"double-quoted-scalar":a="QUOTE_DOUBLE";break;case"block-scalar":{const t=e.props[0];if("block-scalar-header"!==t.type)throw new Error("Invalid block scalar header");a=">"===t.source[0]?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:a="PLAIN"}const l=s.stringifyString({type:a,value:t},{implicitKey:i||null===c,indent:null!==c&&c>0?" ".repeat(c):"",inFlow:r,options:{blockQuote:!0,lineWidth:-1}});switch(l[0]){case"|":case">":!function setBlockScalarValue(e,t){const n=t.indexOf("\n"),o=t.substring(0,n),i=t.substring(n+1)+"\n";if("block-scalar"===e.type){const t=e.props[0];if("block-scalar-header"!==t.type)throw new Error("Invalid block scalar header");t.source=o,e.source=i}else{const{offset:t}=e,n="indent"in e?e.indent:-1,r=[{type:"block-scalar-header",offset:t,indent:n,source:o}];addEndtoBlockProps(r,"end"in e?e.end:void 0)||r.push({type:"newline",offset:-1,indent:n,source:"\n"});for(const t of Object.keys(e))"type"!==t&&"offset"!==t&&delete e[t];Object.assign(e,{type:"block-scalar",indent:n,props:r,source:i})}}(e,l);break;case'"':setFlowScalarValue(e,l,"double-quoted-scalar");break;case"'":setFlowScalarValue(e,l,"single-quoted-scalar");break;default:setFlowScalarValue(e,l,"scalar")}}},84453:(e,t)=>{function stringifyToken(e){switch(e.type){case"block-scalar":{let t="";for(const n of e.props)t+=stringifyToken(n);return t+e.source}case"block-map":case"block-seq":{let t="";for(const n of e.items)t+=stringifyItem(n);return t}case"flow-collection":{let t=e.start.source;for(const n of e.items)t+=stringifyItem(n);for(const n of e.end)t+=n.source;return t}case"document":{let t=stringifyItem(e);if(e.end)for(const n of e.end)t+=n.source;return t}default:{let t=e.source;if("end"in e&&e.end)for(const n of e.end)t+=n.source;return t}}}function stringifyItem({start:e,key:t,sep:n,value:o}){let i="";for(const t of e)i+=t.source;if(t&&(i+=stringifyToken(t)),n)for(const e of n)i+=e.source;return o&&(i+=stringifyToken(o)),i}t.stringify=e=>"type"in e?stringifyToken(e):stringifyItem(e)},28318:(e,t)=>{const n=Symbol("break visit"),o=Symbol("skip children"),i=Symbol("remove item");function visit(e,t){"type"in e&&"document"===e.type&&(e={start:e.start,value:e.value}),_visit(Object.freeze([]),e,t)}function _visit(e,t,o){let r=o(t,e);if("symbol"==typeof r)return r;for(const s of["key","value"]){const a=t[s];if(a&&"items"in a){for(let t=0;t<a.items.length;++t){const r=_visit(Object.freeze(e.concat([[s,t]])),a.items[t],o);if("number"==typeof r)t=r-1;else{if(r===n)return n;r===i&&(a.items.splice(t,1),t-=1)}}"function"==typeof r&&"key"===s&&(r=r(t,e))}}return"function"==typeof r?r(t,e):r}visit.BREAK=n,visit.SKIP=o,visit.REMOVE=i,visit.itemAtPath=(e,t)=>{let n=e;for(const[e,o]of t){const t=n?.[e];if(!t||!("items"in t))return;n=t.items[o]}return n},visit.parentCollection=(e,t)=>{const n=visit.itemAtPath(e,t.slice(0,-1)),o=t[t.length-1][0],i=n?.[o];if(i&&"items"in i)return i;throw new Error("Parent collection not found")},t.visit=visit},75208:(e,t,n)=>{var o=n(47084),i=n(84453),r=n(28318);t.createScalarToken=o.createScalarToken,t.resolveAsScalar=o.resolveAsScalar,t.setScalarValue=o.setScalarValue,t.stringify=i.stringify,t.visit=r.visit,t.BOM="\ufeff",t.DOCUMENT="",t.FLOW_END="",t.SCALAR="",t.isCollection=e=>!!e&&"items"in e,t.isScalar=e=>!!e&&("scalar"===e.type||"single-quoted-scalar"===e.type||"double-quoted-scalar"===e.type||"block-scalar"===e.type),t.prettyToken=function prettyToken(e){switch(e){case"\ufeff":return"<BOM>";case"":return"<DOC>";case"":return"<FLOW_END>";case"":return"<SCALAR>";default:return JSON.stringify(e)}},t.tokenType=function tokenType(e){switch(e){case"\ufeff":return"byte-order-mark";case"":return"doc-mode";case"":return"flow-error-end";case"":return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case"\n":case"\r\n":return"newline";case"-":return"seq-item-ind";case"?":return"explicit-key-ind";case":":return"map-value-ind";case"{":return"flow-map-start";case"}":return"flow-map-end";case"[":return"flow-seq-start";case"]":return"flow-seq-end";case",":return"comma"}switch(e[0]){case" ":case"\t":return"space";case"#":return"comment";case"%":return"directive-line";case"*":return"alias";case"&":return"anchor";case"!":return"tag";case"'":return"single-quoted-scalar";case'"':return"double-quoted-scalar";case"|":case">":return"block-scalar-header"}return null}},87135:(e,t,n)=>{var o=n(75208);function isEmpty(e){switch(e){case void 0:case" ":case"\n":case"\r":case"\t":return!0;default:return!1}}const i="0123456789ABCDEFabcdef".split(""),r="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()".split(""),s=",[]{}".split(""),a=" ,[]{}\n\r\t".split(""),isNotAnchorChar=e=>!e||a.includes(e);t.Lexer=class Lexer{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer="",this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(e,t=!1){e&&(this.buffer=this.buffer?this.buffer+e:e,this.lineEndPos=null),this.atEnd=!t;let n=this.next??"stream";for(;n&&(t||this.hasChars(1));)n=yield*this.parseNext(n)}atLineEnd(){let e=this.pos,t=this.buffer[e];for(;" "===t||"\t"===t;)t=this.buffer[++e];return!t||"#"===t||"\n"===t||"\r"===t&&"\n"===this.buffer[e+1]}charAt(e){return this.buffer[this.pos+e]}continueScalar(e){let t=this.buffer[e];if(this.indentNext>0){let n=0;for(;" "===t;)t=this.buffer[++n+e];if("\r"===t){const t=this.buffer[n+e+1];if("\n"===t||!t&&!this.atEnd)return e+n+1}return"\n"===t||n>=this.indentNext||!t&&!this.atEnd?e+n:-1}if("-"===t||"."===t){const t=this.buffer.substr(e,3);if(("---"===t||"..."===t)&&isEmpty(this.buffer[e+3]))return-1}return e}getLine(){let e=this.lineEndPos;return("number"!=typeof e||-1!==e&&e<this.pos)&&(e=this.buffer.indexOf("\n",this.pos),this.lineEndPos=e),-1===e?this.atEnd?this.buffer.substring(this.pos):null:("\r"===this.buffer[e-1]&&(e-=1),this.buffer.substring(this.pos,e))}hasChars(e){return this.pos+e<=this.buffer.length}setNext(e){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=e,null}peek(e){return this.buffer.substr(this.pos,e)}*parseNext(e){switch(e){case"stream":return yield*this.parseStream();case"line-start":return yield*this.parseLineStart();case"block-start":return yield*this.parseBlockStart();case"doc":return yield*this.parseDocument();case"flow":return yield*this.parseFlowCollection();case"quoted-scalar":return yield*this.parseQuotedScalar();case"block-scalar":return yield*this.parseBlockScalar();case"plain-scalar":return yield*this.parsePlainScalar()}}*parseStream(){let e=this.getLine();if(null===e)return this.setNext("stream");if(e[0]===o.BOM&&(yield*this.pushCount(1),e=e.substring(1)),"%"===e[0]){let t=e.length;const n=e.indexOf("#");if(-1!==n){const o=e[n-1];" "!==o&&"\t"!==o||(t=n-1)}for(;;){const n=e[t-1];if(" "!==n&&"\t"!==n)break;t-=1}const o=(yield*this.pushCount(t))+(yield*this.pushSpaces(!0));return yield*this.pushCount(e.length-o),this.pushNewline(),"stream"}if(this.atLineEnd()){const t=yield*this.pushSpaces(!0);return yield*this.pushCount(e.length-t),yield*this.pushNewline(),"stream"}return yield o.DOCUMENT,yield*this.parseLineStart()}*parseLineStart(){const e=this.charAt(0);if(!e&&!this.atEnd)return this.setNext("line-start");if("-"===e||"."===e){if(!this.atEnd&&!this.hasChars(4))return this.setNext("line-start");const e=this.peek(3);if("---"===e&&isEmpty(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,"doc";if("..."===e&&isEmpty(this.charAt(3)))return yield*this.pushCount(3),"stream"}return this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!isEmpty(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){const[e,t]=this.peek(2);if(!t&&!this.atEnd)return this.setNext("block-start");if(("-"===e||"?"===e||":"===e)&&isEmpty(t)){const e=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=e,yield*this.parseBlockStart()}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);const e=this.getLine();if(null===e)return this.setNext("doc");let t=yield*this.pushIndicators();switch(e[t]){case"#":yield*this.pushCount(e.length-t);case void 0:return yield*this.pushNewline(),yield*this.parseLineStart();case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel=1,"flow";case"}":case"]":return yield*this.pushCount(1),"doc";case"*":return yield*this.pushUntil(isNotAnchorChar),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return t+=(yield*this.parseBlockScalarHeader()),t+=(yield*this.pushSpaces(!0)),yield*this.pushCount(e.length-t),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let e,t,n=-1;do{e=yield*this.pushNewline(),e>0?(t=yield*this.pushSpaces(!1),this.indentValue=n=t):t=0,t+=(yield*this.pushSpaces(!0))}while(e+t>0);const i=this.getLine();if(null===i)return this.setNext("flow");if(-1!==n&&n<this.indentNext&&"#"!==i[0]||0===n&&(i.startsWith("---")||i.startsWith("..."))&&isEmpty(i[3])){if(!(n===this.indentNext-1&&1===this.flowLevel&&("]"===i[0]||"}"===i[0])))return this.flowLevel=0,yield o.FLOW_END,yield*this.parseLineStart()}let r=0;for(;","===i[r];)r+=(yield*this.pushCount(1)),r+=(yield*this.pushSpaces(!0)),this.flowKey=!1;switch(r+=(yield*this.pushIndicators()),i[r]){case void 0:return"flow";case"#":return yield*this.pushCount(i.length-r),"flow";case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel+=1,"flow";case"}":case"]":return yield*this.pushCount(1),this.flowKey=!0,this.flowLevel-=1,this.flowLevel?"flow":"doc";case"*":return yield*this.pushUntil(isNotAnchorChar),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{const e=this.charAt(1);if(this.flowKey||isEmpty(e)||","===e)return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),"flow"}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){const e=this.charAt(0);let t=this.buffer.indexOf(e,this.pos+1);if("'"===e)for(;-1!==t&&"'"===this.buffer[t+1];)t=this.buffer.indexOf("'",t+2);else for(;-1!==t;){let e=0;for(;"\\"===this.buffer[t-1-e];)e+=1;if(e%2==0)break;t=this.buffer.indexOf('"',t+1)}const n=this.buffer.substring(0,t);let o=n.indexOf("\n",this.pos);if(-1!==o){for(;-1!==o;){const e=this.continueScalar(o+1);if(-1===e)break;o=n.indexOf("\n",e)}-1!==o&&(t=o-("\r"===n[o-1]?2:1))}if(-1===t){if(!this.atEnd)return this.setNext("quoted-scalar");t=this.buffer.length}return yield*this.pushToIndex(t+1,!1),this.flowLevel?"flow":"doc"}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let e=this.pos;for(;;){const t=this.buffer[++e];if("+"===t)this.blockScalarKeep=!0;else if(t>"0"&&t<="9")this.blockScalarIndent=Number(t)-1;else if("-"!==t)break}return yield*this.pushUntil((e=>isEmpty(e)||"#"===e))}*parseBlockScalar(){let e,t=this.pos-1,n=0;e:for(let o=this.pos;e=this.buffer[o];++o)switch(e){case" ":n+=1;break;case"\n":t=o,n=0;break;case"\r":{const e=this.buffer[o+1];if(!e&&!this.atEnd)return this.setNext("block-scalar");if("\n"===e)break}default:break e}if(!e&&!this.atEnd)return this.setNext("block-scalar");if(n>=this.indentNext){-1===this.blockScalarIndent?this.indentNext=n:this.indentNext+=this.blockScalarIndent;do{const e=this.continueScalar(t+1);if(-1===e)break;t=this.buffer.indexOf("\n",e)}while(-1!==t);if(-1===t){if(!this.atEnd)return this.setNext("block-scalar");t=this.buffer.length}}if(!this.blockScalarKeep)for(;;){let e=t-1,o=this.buffer[e];"\r"===o&&(o=this.buffer[--e]);const i=e;for(;" "===o||"\t"===o;)o=this.buffer[--e];if(!("\n"===o&&e>=this.pos&&e+1+n>i))break;t=e}return yield o.SCALAR,yield*this.pushToIndex(t+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){const e=this.flowLevel>0;let t,n=this.pos-1,i=this.pos-1;for(;t=this.buffer[++i];)if(":"===t){const t=this.buffer[i+1];if(isEmpty(t)||e&&","===t)break;n=i}else if(isEmpty(t)){let o=this.buffer[i+1];if("\r"===t&&("\n"===o?(i+=1,t="\n",o=this.buffer[i+1]):n=i),"#"===o||e&&s.includes(o))break;if("\n"===t){const e=this.continueScalar(i+1);if(-1===e)break;i=Math.max(i,e-2)}}else{if(e&&s.includes(t))break;n=i}return t||this.atEnd?(yield o.SCALAR,yield*this.pushToIndex(n+1,!0),e?"flow":"doc"):this.setNext("plain-scalar")}*pushCount(e){return e>0?(yield this.buffer.substr(this.pos,e),this.pos+=e,e):0}*pushToIndex(e,t){const n=this.buffer.slice(this.pos,e);return n?(yield n,this.pos+=n.length,n.length):(t&&(yield""),0)}*pushIndicators(){switch(this.charAt(0)){case"!":return(yield*this.pushTag())+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"&":return(yield*this.pushUntil(isNotAnchorChar))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"-":case"?":case":":{const e=this.flowLevel>0,t=this.charAt(1);if(isEmpty(t)||e&&s.includes(t))return e?this.flowKey&&(this.flowKey=!1):this.indentNext=this.indentValue+1,(yield*this.pushCount(1))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators())}}return 0}*pushTag(){if("<"===this.charAt(1)){let e=this.pos+2,t=this.buffer[e];for(;!isEmpty(t)&&">"!==t;)t=this.buffer[++e];return yield*this.pushToIndex(">"===t?e+1:e,!1)}{let e=this.pos+1,t=this.buffer[e];for(;t;)if(r.includes(t))t=this.buffer[++e];else{if("%"!==t||!i.includes(this.buffer[e+1])||!i.includes(this.buffer[e+2]))break;t=this.buffer[e+=3]}return yield*this.pushToIndex(e,!1)}}*pushNewline(){const e=this.buffer[this.pos];return"\n"===e?yield*this.pushCount(1):"\r"===e&&"\n"===this.charAt(1)?yield*this.pushCount(2):0}*pushSpaces(e){let t,n=this.pos-1;do{t=this.buffer[++n]}while(" "===t||e&&"\t"===t);const o=n-this.pos;return o>0&&(yield this.buffer.substr(this.pos,o),this.pos=n),o}*pushUntil(e){let t=this.pos,n=this.buffer[t];for(;!e(n);)n=this.buffer[++t];return yield*this.pushToIndex(t,!1)}}},94708:(e,t)=>{t.LineCounter=class LineCounter{constructor(){this.lineStarts=[],this.addNewLine=e=>this.lineStarts.push(e),this.linePos=e=>{let t=0,n=this.lineStarts.length;for(;t<n;){const o=t+n>>1;this.lineStarts[o]<e?t=o+1:n=o}if(this.lineStarts[t]===e)return{line:t+1,col:1};if(0===t)return{line:0,col:e};return{line:t,col:e-this.lineStarts[t-1]+1}}}}},69369:(e,t,n)=>{var o=n(75208),i=n(87135);function includesToken(e,t){for(let n=0;n<e.length;++n)if(e[n].type===t)return!0;return!1}function findNonEmptyIndex(e){for(let t=0;t<e.length;++t)switch(e[t].type){case"space":case"comment":case"newline":break;default:return t}return-1}function isFlowToken(e){switch(e?.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function getPrevProps(e){switch(e.type){case"document":return e.start;case"block-map":{const t=e.items[e.items.length-1];return t.sep??t.start}case"block-seq":return e.items[e.items.length-1].start;default:return[]}}function getFirstKeyStartProps(e){if(0===e.length)return[];let t=e.length;e:for(;--t>=0;)switch(e[t].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;"space"===e[++t]?.type;);return e.splice(t,e.length)}function fixFlowSeqItems(e){if("flow-seq-start"===e.start.type)for(const t of e.items)!t.sep||t.value||includesToken(t.start,"explicit-key-ind")||includesToken(t.sep,"map-value-ind")||(t.key&&(t.value=t.key),delete t.key,isFlowToken(t.value)?t.value.end?Array.prototype.push.apply(t.value.end,t.sep):t.value.end=t.sep:Array.prototype.push.apply(t.start,t.sep),delete t.sep)}t.Parser=class Parser{constructor(e){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new i.Lexer,this.onNewLine=e}*parse(e,t=!1){this.onNewLine&&0===this.offset&&this.onNewLine(0);for(const n of this.lexer.lex(e,t))yield*this.next(n);t||(yield*this.end())}*next(e){if(this.source=e,process.env.LOG_TOKENS&&console.log("|",o.prettyToken(e)),this.atScalar)return this.atScalar=!1,yield*this.step(),void(this.offset+=e.length);const t=o.tokenType(e);if(t)if("scalar"===t)this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=t,yield*this.step(),t){case"newline":this.atNewLine=!0,this.indent=0,this.onNewLine&&this.onNewLine(this.offset+e.length);break;case"space":this.atNewLine&&" "===e[0]&&(this.indent+=e.length);break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":this.atNewLine&&(this.indent+=e.length);break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=e.length}else{const t=`Not a YAML token: ${e}`;yield*this.pop({type:"error",offset:this.offset,message:t,source:e}),this.offset+=e.length}}*end(){for(;this.stack.length>0;)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){const e=this.peek(1);if("doc-end"!==this.type||e&&"doc-end"===e.type){if(!e)return yield*this.stream();switch(e.type){case"document":return yield*this.document(e);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar(e);case"block-scalar":return yield*this.blockScalar(e);case"block-map":return yield*this.blockMap(e);case"block-seq":return yield*this.blockSequence(e);case"flow-collection":return yield*this.flowCollection(e);case"doc-end":return yield*this.documentEnd(e)}yield*this.pop()}else{for(;this.stack.length>0;)yield*this.pop();this.stack.push({type:"doc-end",offset:this.offset,source:this.source})}}peek(e){return this.stack[this.stack.length-e]}*pop(e){const t=e??this.stack.pop();if(t)if(0===this.stack.length)yield t;else{const e=this.peek(1);switch("block-scalar"===t.type?t.indent="indent"in e?e.indent:0:"flow-collection"===t.type&&"document"===e.type&&(t.indent=0),"flow-collection"===t.type&&fixFlowSeqItems(t),e.type){case"document":e.value=t;break;case"block-scalar":e.props.push(t);break;case"block-map":{const n=e.items[e.items.length-1];if(n.value)return e.items.push({start:[],key:t,sep:[]}),void(this.onKeyLine=!0);if(!n.sep)return Object.assign(n,{key:t,sep:[]}),void(this.onKeyLine=!includesToken(n.start,"explicit-key-ind"));n.value=t;break}case"block-seq":{const n=e.items[e.items.length-1];n.value?e.items.push({start:[],value:t}):n.value=t;break}case"flow-collection":{const n=e.items[e.items.length-1];return void(!n||n.value?e.items.push({start:[],key:t,sep:[]}):n.sep?n.value=t:Object.assign(n,{key:t,sep:[]}))}default:yield*this.pop(),yield*this.pop(t)}if(!("document"!==e.type&&"block-map"!==e.type&&"block-seq"!==e.type||"block-map"!==t.type&&"block-seq"!==t.type)){const n=t.items[t.items.length-1];n&&!n.sep&&!n.value&&n.start.length>0&&-1===findNonEmptyIndex(n.start)&&(0===t.indent||n.start.every((e=>"comment"!==e.type||e.indent<t.indent)))&&("document"===e.type?e.end=n.start:e.items.push({start:n.start}),t.items.splice(-1,1))}}else{const e="Tried to pop an empty stack";yield{type:"error",offset:this.offset,source:"",message:e}}}*stream(){switch(this.type){case"directive-line":return void(yield{type:"directive",offset:this.offset,source:this.source});case"byte-order-mark":case"space":case"comment":case"newline":return void(yield this.sourceToken);case"doc-mode":case"doc-start":{const e={type:"document",offset:this.offset,start:[]};return"doc-start"===this.type&&e.start.push(this.sourceToken),void this.stack.push(e)}}yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML stream`,source:this.source}}*document(e){if(e.value)return yield*this.lineEnd(e);switch(this.type){case"doc-start":return void(-1!==findNonEmptyIndex(e.start)?(yield*this.pop(),yield*this.step()):e.start.push(this.sourceToken));case"anchor":case"tag":case"space":case"comment":case"newline":return void e.start.push(this.sourceToken)}const t=this.startBlockValue(e);t?this.stack.push(t):yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML document`,source:this.source}}*scalar(e){if("map-value-ind"===this.type){const t=getFirstKeyStartProps(getPrevProps(this.peek(2)));let n;e.end?(n=e.end,n.push(this.sourceToken),delete e.end):n=[this.sourceToken];const o={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:t,key:e,sep:n}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=o}else yield*this.lineEnd(e)}*blockScalar(e){switch(this.type){case"space":case"comment":case"newline":return void e.props.push(this.sourceToken);case"scalar":if(e.source=this.source,this.atNewLine=!0,this.indent=0,this.onNewLine){let e=this.source.indexOf("\n")+1;for(;0!==e;)this.onNewLine(this.offset+e),e=this.source.indexOf("\n",e)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(e){const t=e.items[e.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,t.value){const n="end"in t.value?t.value.end:void 0,o=Array.isArray(n)?n[n.length-1]:void 0;"comment"===o?.type?n?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case"space":case"comment":if(t.value)e.items.push({start:[this.sourceToken]});else if(t.sep)t.sep.push(this.sourceToken);else{if(this.atIndentedComment(t.start,e.indent)){const n=e.items[e.items.length-2],o=n?.value?.end;if(Array.isArray(o))return Array.prototype.push.apply(o,t.start),o.push(this.sourceToken),void e.items.pop()}t.start.push(this.sourceToken)}return}if(this.indent>=e.indent){const n=!this.onKeyLine&&this.indent===e.indent&&t.sep;let o=[];if(n&&t.sep&&!t.value){const n=[];for(let o=0;o<t.sep.length;++o){const i=t.sep[o];switch(i.type){case"newline":n.push(o);break;case"space":break;case"comment":i.indent>e.indent&&(n.length=0);break;default:n.length=0}}n.length>=2&&(o=t.sep.splice(n[1]))}switch(this.type){case"anchor":case"tag":return void(n||t.value?(o.push(this.sourceToken),e.items.push({start:o}),this.onKeyLine=!0):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken));case"explicit-key-ind":return t.sep||includesToken(t.start,"explicit-key-ind")?n||t.value?(o.push(this.sourceToken),e.items.push({start:o})):this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]}):t.start.push(this.sourceToken),void(this.onKeyLine=!0);case"map-value-ind":if(includesToken(t.start,"explicit-key-ind"))if(t.sep)if(t.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(includesToken(t.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:o,key:null,sep:[this.sourceToken]}]});else if(isFlowToken(t.key)&&!includesToken(t.sep,"newline")){const e=getFirstKeyStartProps(t.start),n=t.key,o=t.sep;o.push(this.sourceToken),delete t.key,delete t.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:e,key:n,sep:o}]})}else o.length>0?t.sep=t.sep.concat(o,this.sourceToken):t.sep.push(this.sourceToken);else if(includesToken(t.start,"newline"))Object.assign(t,{key:null,sep:[this.sourceToken]});else{const e=getFirstKeyStartProps(t.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:e,key:null,sep:[this.sourceToken]}]})}else t.sep?t.value||n?e.items.push({start:o,key:null,sep:[this.sourceToken]}):includesToken(t.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]});return void(this.onKeyLine=!0);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const i=this.flowScalar(this.type);return void(n||t.value?(e.items.push({start:o,key:i,sep:[]}),this.onKeyLine=!0):t.sep?this.stack.push(i):(Object.assign(t,{key:i,sep:[]}),this.onKeyLine=!0))}default:{const i=this.startBlockValue(e);if(i)return n&&"block-seq"!==i.type&&includesToken(t.start,"explicit-key-ind")&&e.items.push({start:o}),void this.stack.push(i)}}}yield*this.pop(),yield*this.step()}*blockSequence(e){const t=e.items[e.items.length-1];switch(this.type){case"newline":if(t.value){const n="end"in t.value?t.value.end:void 0,o=Array.isArray(n)?n[n.length-1]:void 0;"comment"===o?.type?n?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else t.start.push(this.sourceToken);return;case"space":case"comment":if(t.value)e.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(t.start,e.indent)){const n=e.items[e.items.length-2],o=n?.value?.end;if(Array.isArray(o))return Array.prototype.push.apply(o,t.start),o.push(this.sourceToken),void e.items.pop()}t.start.push(this.sourceToken)}return;case"anchor":case"tag":if(t.value||this.indent<=e.indent)break;return void t.start.push(this.sourceToken);case"seq-item-ind":if(this.indent!==e.indent)break;return void(t.value||includesToken(t.start,"seq-item-ind")?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken))}if(this.indent>e.indent){const t=this.startBlockValue(e);if(t)return void this.stack.push(t)}yield*this.pop(),yield*this.step()}*flowCollection(e){const t=e.items[e.items.length-1];if("flow-error-end"===this.type){let e;do{yield*this.pop(),e=this.peek(1)}while(e&&"flow-collection"===e.type)}else if(0===e.end.length){switch(this.type){case"comma":case"explicit-key-ind":return void(!t||t.sep?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken));case"map-value-ind":return void(!t||t.value?e.items.push({start:[],key:null,sep:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]}));case"space":case"comment":case"newline":case"anchor":case"tag":return void(!t||t.value?e.items.push({start:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken));case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const n=this.flowScalar(this.type);return void(!t||t.value?e.items.push({start:[],key:n,sep:[]}):t.sep?this.stack.push(n):Object.assign(t,{key:n,sep:[]}))}case"flow-map-end":case"flow-seq-end":return void e.end.push(this.sourceToken)}const n=this.startBlockValue(e);n?this.stack.push(n):(yield*this.pop(),yield*this.step())}else{const t=this.peek(2);if("block-map"===t.type&&("map-value-ind"===this.type&&t.indent===e.indent||"newline"===this.type&&!t.items[t.items.length-1].sep))yield*this.pop(),yield*this.step();else if("map-value-ind"===this.type&&"flow-collection"!==t.type){const n=getFirstKeyStartProps(getPrevProps(t));fixFlowSeqItems(e);const o=e.end.splice(1,e.end.length);o.push(this.sourceToken);const i={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:n,key:e,sep:o}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=i}else yield*this.lineEnd(e)}}flowScalar(e){if(this.onNewLine){let e=this.source.indexOf("\n")+1;for(;0!==e;)this.onNewLine(this.offset+e),e=this.source.indexOf("\n",e)+1}return{type:e,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(e){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;const t=getFirstKeyStartProps(getPrevProps(e));return t.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:t}]}}case"map-value-ind":{this.onKeyLine=!0;const t=getFirstKeyStartProps(getPrevProps(e));return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:t,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,t){return"comment"===this.type&&(!(this.indent<=t)&&e.every((e=>"newline"===e.type||"space"===e.type)))}*documentEnd(e){"doc-mode"!==this.type&&(e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],"newline"===this.type&&(yield*this.pop()))}*lineEnd(e){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;default:e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],"newline"===this.type&&(yield*this.pop())}}}},68011:(e,t,n)=>{var o=n(5281),i=n(86068),r=n(2394),s=n(95441),a=n(94708),c=n(69369);function parseOptions(e){const t=!1!==e.prettyErrors;return{lineCounter:e.lineCounter||t&&new a.LineCounter||null,prettyErrors:t}}function parseDocument(e,t={}){const{lineCounter:n,prettyErrors:i}=parseOptions(t),s=new c.Parser(n?.addNewLine),a=new o.Composer(t);let l=null;for(const t of a.compose(s.parse(e),!0,e.length))if(l){if("silent"!==l.options.logLevel){l.errors.push(new r.YAMLParseError(t.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}}else l=t;return i&&n&&(l.errors.forEach(r.prettifyError(e,n)),l.warnings.forEach(r.prettifyError(e,n))),l}t.parse=function parse(e,t,n){let o;"function"==typeof t?o=t:void 0===n&&t&&"object"==typeof t&&(n=t);const i=parseDocument(e,n);if(!i)return null;if(i.warnings.forEach((e=>s.warn(i.options.logLevel,e))),i.errors.length>0){if("silent"!==i.options.logLevel)throw i.errors[0];i.errors=[]}return i.toJS(Object.assign({reviver:o},n))},t.parseAllDocuments=function parseAllDocuments(e,t={}){const{lineCounter:n,prettyErrors:i}=parseOptions(t),s=new c.Parser(n?.addNewLine),a=new o.Composer(t),l=Array.from(a.compose(s.parse(e)));if(i&&n)for(const t of l)t.errors.forEach(r.prettifyError(e,n)),t.warnings.forEach(r.prettifyError(e,n));return l.length>0?l:Object.assign([],{empty:!0},a.streamInfo())},t.parseDocument=parseDocument,t.stringify=function stringify(e,t,n){let o=null;if("function"==typeof t||Array.isArray(t)?o=t:void 0===n&&t&&(n=t),"string"==typeof n&&(n=n.length),"number"==typeof n){const e=Math.round(n);n=e<1?void 0:e>8?{indent:8}:{indent:e}}if(void 0===e){const{keepUndefined:e}=n??t??{};if(!e)return}return new i.Document(e,o,n).toString(n)}},23673:(e,t,n)=>{var o=n(10466),i=n(92744),r=n(52360),s=n(73042),a=n(76524);const sortMapEntriesByKey=(e,t)=>e.key<t.key?-1:e.key>t.key?1:0;class Schema{constructor({compat:e,customTags:t,merge:n,resolveKnownTags:c,schema:l,sortMapEntries:u,toStringDefaults:d}){this.compat=Array.isArray(e)?a.getTags(e,"compat"):e?a.getTags(null,e):null,this.merge=!!n,this.name="string"==typeof l&&l||"core",this.knownTags=c?a.coreKnownTags:{},this.tags=a.getTags(t,this.name),this.toStringOptions=d??null,Object.defineProperty(this,o.MAP,{value:i.map}),Object.defineProperty(this,o.SCALAR,{value:s.string}),Object.defineProperty(this,o.SEQ,{value:r.seq}),this.sortMapEntries="function"==typeof u?u:!0===u?sortMapEntriesByKey:null}clone(){const e=Object.create(Schema.prototype,Object.getOwnPropertyDescriptors(this));return e.tags=this.tags.slice(),e}}t.Schema=Schema},92744:(e,t,n)=>{var o=n(10466),i=n(10394),r=n(56575);const s={collection:"map",createNode:function createMap(e,t,n){const{keepUndefined:o,replacer:s}=n,a=new r.YAMLMap(e),add=(e,r)=>{if("function"==typeof s)r=s.call(t,e,r);else if(Array.isArray(s)&&!s.includes(e))return;(void 0!==r||o)&&a.items.push(i.createPair(e,r,n))};if(t instanceof Map)for(const[e,n]of t)add(e,n);else if(t&&"object"==typeof t)for(const e of Object.keys(t))add(e,t[e]);return"function"==typeof e.sortMapEntries&&a.items.sort(e.sortMapEntries),a},default:!0,nodeClass:r.YAMLMap,tag:"tag:yaml.org,2002:map",resolve:(e,t)=>(o.isMap(e)||t("Expected a mapping for this tag"),e)};t.map=s},25397:(e,t,n)=>{var o=n(58844);const i={identify:e=>null==e,createNode:()=>new o.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new o.Scalar(null),stringify:({source:e},t)=>"string"==typeof e&&i.test.test(e)?e:t.options.nullStr};t.nullTag=i},52360:(e,t,n)=>{var o=n(87581),i=n(10466),r=n(13798);const s={collection:"seq",createNode:function createSeq(e,t,n){const{replacer:i}=n,s=new r.YAMLSeq(e);if(t&&Symbol.iterator in Object(t)){let e=0;for(let r of t){if("function"==typeof i){const n=t instanceof Set?r:String(e++);r=i.call(t,n,r)}s.items.push(o.createNode(r,void 0,n))}}return s},default:!0,nodeClass:r.YAMLSeq,tag:"tag:yaml.org,2002:seq",resolve:(e,t)=>(i.isSeq(e)||t("Expected a sequence for this tag"),e)};t.seq=s},73042:(e,t,n)=>{var o=n(98431);const i={identify:e=>"string"==typeof e,default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify:(e,t,n,i)=>(t=Object.assign({actualString:!0},t),o.stringifyString(e,t,n,i))};t.string=i},50976:(e,t,n)=>{var o=n(58844);const i={identify:e=>"boolean"==typeof e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:e=>new o.Scalar("t"===e[0]||"T"===e[0]),stringify({source:e,value:t},n){if(e&&i.test.test(e)){if(t===("t"===e[0]||"T"===e[0]))return e}return t?n.options.trueStr:n.options.falseStr}};t.boolTag=i},13398:(e,t,n)=>{var o=n(58844),i=n(15260);const r={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF|nan|NaN|NAN))$/,resolve:e=>"nan"===e.slice(-3).toLowerCase()?NaN:"-"===e[0]?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:i.stringifyNumber},s={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e),stringify(e){const t=Number(e.value);return isFinite(t)?t.toExponential():i.stringifyNumber(e)}},a={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(e){const t=new o.Scalar(parseFloat(e)),n=e.indexOf(".");return-1!==n&&"0"===e[e.length-1]&&(t.minFractionDigits=e.length-n-1),t},stringify:i.stringifyNumber};t.float=a,t.floatExp=s,t.floatNaN=r},64723:(e,t,n)=>{var o=n(15260);const intIdentify=e=>"bigint"==typeof e||Number.isInteger(e),intResolve=(e,t,n,{intAsBigInt:o})=>o?BigInt(e):parseInt(e.substring(t),n);function intStringify(e,t,n){const{value:i}=e;return intIdentify(i)&&i>=0?n+i.toString(t):o.stringifyNumber(e)}const i={identify:e=>intIdentify(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(e,t,n)=>intResolve(e,2,8,n),stringify:e=>intStringify(e,8,"0o")},r={identify:intIdentify,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(e,t,n)=>intResolve(e,0,10,n),stringify:o.stringifyNumber},s={identify:e=>intIdentify(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(e,t,n)=>intResolve(e,2,16,n),stringify:e=>intStringify(e,16,"0x")};t.int=r,t.intHex=s,t.intOct=i},63305:(e,t,n)=>{var o=n(92744),i=n(25397),r=n(52360),s=n(73042),a=n(50976),c=n(13398),l=n(64723);const u=[o.map,r.seq,s.string,i.nullTag,a.boolTag,l.intOct,l.int,l.intHex,c.floatNaN,c.floatExp,c.float];t.schema=u},27854:(e,t,n)=>{var o=n(58844),i=n(92744),r=n(52360);function intIdentify(e){return"bigint"==typeof e||Number.isInteger(e)}const stringifyJSON=({value:e})=>JSON.stringify(e),s=[{identify:e=>"string"==typeof e,default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify:stringifyJSON},{identify:e=>null==e,createNode:()=>new o.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:stringifyJSON},{identify:e=>"boolean"==typeof e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^true|false$/,resolve:e=>"true"===e,stringify:stringifyJSON},{identify:intIdentify,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(e,t,{intAsBigInt:n})=>n?BigInt(e):parseInt(e,10),stringify:({value:e})=>intIdentify(e)?e.toString():JSON.stringify(e)},{identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:e=>parseFloat(e),stringify:stringifyJSON}],a={default:!0,tag:"",test:/^/,resolve:(e,t)=>(t(`Unresolved plain scalar ${JSON.stringify(e)}`),e)},c=[i.map,r.seq].concat(s,a);t.schema=c},76524:(e,t,n)=>{var o=n(92744),i=n(25397),r=n(52360),s=n(73042),a=n(50976),c=n(13398),l=n(64723),u=n(63305),d=n(27854),f=n(38798),p=n(71367),h=n(63879),m=n(10163),g=n(87559),y=n(67714);const v=new Map([["core",u.schema],["failsafe",[o.map,r.seq,s.string]],["json",d.schema],["yaml11",m.schema],["yaml-1.1",m.schema]]),b={binary:f.binary,bool:a.boolTag,float:c.float,floatExp:c.floatExp,floatNaN:c.floatNaN,floatTime:y.floatTime,int:l.int,intHex:l.intHex,intOct:l.intOct,intTime:y.intTime,map:o.map,null:i.nullTag,omap:p.omap,pairs:h.pairs,seq:r.seq,set:g.set,timestamp:y.timestamp},S={"tag:yaml.org,2002:binary":f.binary,"tag:yaml.org,2002:omap":p.omap,"tag:yaml.org,2002:pairs":h.pairs,"tag:yaml.org,2002:set":g.set,"tag:yaml.org,2002:timestamp":y.timestamp};t.coreKnownTags=S,t.getTags=function getTags(e,t){let n=v.get(t);if(!n){if(!Array.isArray(e)){const e=Array.from(v.keys()).filter((e=>"yaml11"!==e)).map((e=>JSON.stringify(e))).join(", ");throw new Error(`Unknown schema "${t}"; use one of ${e} or define customTags array`)}n=[]}if(Array.isArray(e))for(const t of e)n=n.concat(t);else"function"==typeof e&&(n=e(n.slice()));return n.map((e=>{if("string"!=typeof e)return e;const t=b[e];if(t)return t;const n=Object.keys(b).map((e=>JSON.stringify(e))).join(", ");throw new Error(`Unknown custom tag "${e}"; use one of ${n}`)}))}},38798:(e,t,n)=>{var o=n(58844),i=n(98431);const r={identify:e=>e instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(e,t){if("function"==typeof Buffer)return Buffer.from(e,"base64");if("function"==typeof atob){const t=atob(e.replace(/[\n\r]/g,"")),n=new Uint8Array(t.length);for(let e=0;e<t.length;++e)n[e]=t.charCodeAt(e);return n}return t("This environment does not support reading binary tags; either Buffer or atob is required"),e},stringify({comment:e,type:t,value:n},r,s,a){const c=n;let l;if("function"==typeof Buffer)l=c instanceof Buffer?c.toString("base64"):Buffer.from(c.buffer).toString("base64");else{if("function"!=typeof btoa)throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");{let e="";for(let t=0;t<c.length;++t)e+=String.fromCharCode(c[t]);l=btoa(e)}}if(t||(t=o.Scalar.BLOCK_LITERAL),t!==o.Scalar.QUOTE_DOUBLE){const e=Math.max(r.options.lineWidth-r.indent.length,r.options.minContentWidth),n=Math.ceil(l.length/e),i=new Array(n);for(let t=0,o=0;t<n;++t,o+=e)i[t]=l.substr(o,e);l=i.join(t===o.Scalar.BLOCK_LITERAL?"\n":" ")}return i.stringifyString({comment:e,type:t,value:l},r,s,a)}};t.binary=r},69466:(e,t,n)=>{var o=n(58844);function boolStringify({value:e,source:t},n){return t&&(e?i:r).test.test(t)?t:e?n.options.trueStr:n.options.falseStr}const i={identify:e=>!0===e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new o.Scalar(!0),stringify:boolStringify},r={identify:e=>!1===e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/i,resolve:()=>new o.Scalar(!1),stringify:boolStringify};t.falseTag=r,t.trueTag=i},13922:(e,t,n)=>{var o=n(58844),i=n(15260);const r={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?\.(?:inf|Inf|INF|nan|NaN|NAN)$/,resolve:e=>"nan"===e.slice(-3).toLowerCase()?NaN:"-"===e[0]?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:i.stringifyNumber},s={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e.replace(/_/g,"")),stringify(e){const t=Number(e.value);return isFinite(t)?t.toExponential():i.stringifyNumber(e)}},a={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(e){const t=new o.Scalar(parseFloat(e.replace(/_/g,""))),n=e.indexOf(".");if(-1!==n){const o=e.substring(n+1).replace(/_/g,"");"0"===o[o.length-1]&&(t.minFractionDigits=o.length)}return t},stringify:i.stringifyNumber};t.float=a,t.floatExp=s,t.floatNaN=r},5563:(e,t,n)=>{var o=n(15260);const intIdentify=e=>"bigint"==typeof e||Number.isInteger(e);function intResolve(e,t,n,{intAsBigInt:o}){const i=e[0];if("-"!==i&&"+"!==i||(t+=1),e=e.substring(t).replace(/_/g,""),o){switch(n){case 2:e=`0b${e}`;break;case 8:e=`0o${e}`;break;case 16:e=`0x${e}`}const t=BigInt(e);return"-"===i?BigInt(-1)*t:t}const r=parseInt(e,n);return"-"===i?-1*r:r}function intStringify(e,t,n){const{value:i}=e;if(intIdentify(i)){const e=i.toString(t);return i<0?"-"+n+e.substr(1):n+e}return o.stringifyNumber(e)}const i={identify:intIdentify,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(e,t,n)=>intResolve(e,2,2,n),stringify:e=>intStringify(e,2,"0b")},r={identify:intIdentify,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(e,t,n)=>intResolve(e,1,8,n),stringify:e=>intStringify(e,8,"0")},s={identify:intIdentify,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(e,t,n)=>intResolve(e,0,10,n),stringify:o.stringifyNumber},a={identify:intIdentify,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(e,t,n)=>intResolve(e,2,16,n),stringify:e=>intStringify(e,16,"0x")};t.int=s,t.intBin=i,t.intHex=a,t.intOct=r},71367:(e,t,n)=>{var o=n(13798),i=n(93257),r=n(10466),s=n(56575),a=n(63879);class YAMLOMap extends o.YAMLSeq{constructor(){super(),this.add=s.YAMLMap.prototype.add.bind(this),this.delete=s.YAMLMap.prototype.delete.bind(this),this.get=s.YAMLMap.prototype.get.bind(this),this.has=s.YAMLMap.prototype.has.bind(this),this.set=s.YAMLMap.prototype.set.bind(this),this.tag=YAMLOMap.tag}toJSON(e,t){if(!t)return super.toJSON(e);const n=new Map;t?.onCreate&&t.onCreate(n);for(const e of this.items){let o,s;if(r.isPair(e)?(o=i.toJS(e.key,"",t),s=i.toJS(e.value,o,t)):o=i.toJS(e,"",t),n.has(o))throw new Error("Ordered maps must not include duplicate keys");n.set(o,s)}return n}}YAMLOMap.tag="tag:yaml.org,2002:omap";const c={collection:"seq",identify:e=>e instanceof Map,nodeClass:YAMLOMap,default:!1,tag:"tag:yaml.org,2002:omap",resolve(e,t){const n=a.resolvePairs(e,t),o=[];for(const{key:e}of n.items)r.isScalar(e)&&(o.includes(e.value)?t(`Ordered maps must not include duplicate keys: ${e.value}`):o.push(e.value));return Object.assign(new YAMLOMap,n)},createNode(e,t,n){const o=a.createPairs(e,t,n),i=new YAMLOMap;return i.items=o.items,i}};t.YAMLOMap=YAMLOMap,t.omap=c},63879:(e,t,n)=>{var o=n(10466),i=n(10394),r=n(58844),s=n(13798);function resolvePairs(e,t){if(o.isSeq(e))for(let n=0;n<e.items.length;++n){let s=e.items[n];if(!o.isPair(s)){if(o.isMap(s)){s.items.length>1&&t("Each pair must have its own sequence indicator");const e=s.items[0]||new i.Pair(new r.Scalar(null));if(s.commentBefore&&(e.key.commentBefore=e.key.commentBefore?`${s.commentBefore}\n${e.key.commentBefore}`:s.commentBefore),s.comment){const t=e.value??e.key;t.comment=t.comment?`${s.comment}\n${t.comment}`:s.comment}s=e}e.items[n]=o.isPair(s)?s:new i.Pair(s)}}else t("Expected a sequence for this tag");return e}function createPairs(e,t,n){const{replacer:o}=n,r=new s.YAMLSeq(e);r.tag="tag:yaml.org,2002:pairs";let a=0;if(t&&Symbol.iterator in Object(t))for(let e of t){let s,c;if("function"==typeof o&&(e=o.call(t,String(a++),e)),Array.isArray(e)){if(2!==e.length)throw new TypeError(`Expected [key, value] tuple: ${e}`);s=e[0],c=e[1]}else if(e&&e instanceof Object){const t=Object.keys(e);if(1!==t.length)throw new TypeError(`Expected { key: value } tuple: ${e}`);s=t[0],c=e[s]}else s=e;r.items.push(i.createPair(s,c,n))}return r}const a={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:resolvePairs,createNode:createPairs};t.createPairs=createPairs,t.pairs=a,t.resolvePairs=resolvePairs},10163:(e,t,n)=>{var o=n(92744),i=n(25397),r=n(52360),s=n(73042),a=n(38798),c=n(69466),l=n(13922),u=n(5563),d=n(71367),f=n(63879),p=n(87559),h=n(67714);const m=[o.map,r.seq,s.string,i.nullTag,c.trueTag,c.falseTag,u.intBin,u.intOct,u.int,u.intHex,l.floatNaN,l.floatExp,l.float,a.binary,d.omap,f.pairs,p.set,h.intTime,h.floatTime,h.timestamp];t.schema=m},87559:(e,t,n)=>{var o=n(10466),i=n(10394),r=n(56575);class YAMLSet extends r.YAMLMap{constructor(e){super(e),this.tag=YAMLSet.tag}add(e){let t;t=o.isPair(e)?e:e&&"object"==typeof e&&"key"in e&&"value"in e&&null===e.value?new i.Pair(e.key,null):new i.Pair(e,null);r.findPair(this.items,t.key)||this.items.push(t)}get(e,t){const n=r.findPair(this.items,e);return!t&&o.isPair(n)?o.isScalar(n.key)?n.key.value:n.key:n}set(e,t){if("boolean"!=typeof t)throw new Error("Expected boolean value for set(key, value) in a YAML set, not "+typeof t);const n=r.findPair(this.items,e);n&&!t?this.items.splice(this.items.indexOf(n),1):!n&&t&&this.items.push(new i.Pair(e))}toJSON(e,t){return super.toJSON(e,t,Set)}toString(e,t,n){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),t,n);throw new Error("Set items must all have null values")}}YAMLSet.tag="tag:yaml.org,2002:set";const s={collection:"map",identify:e=>e instanceof Set,nodeClass:YAMLSet,default:!1,tag:"tag:yaml.org,2002:set",resolve(e,t){if(o.isMap(e)){if(e.hasAllNullValues(!0))return Object.assign(new YAMLSet,e);t("Set items must all have null values")}else t("Expected a mapping for this tag");return e},createNode(e,t,n){const{replacer:o}=n,r=new YAMLSet(e);if(t&&Symbol.iterator in Object(t))for(let e of t)"function"==typeof o&&(e=o.call(t,e,e)),r.items.push(i.createPair(e,null,n));return r}};t.YAMLSet=YAMLSet,t.set=s},67714:(e,t,n)=>{var o=n(15260);function parseSexagesimal(e,t){const n=e[0],o="-"===n||"+"===n?e.substring(1):e,num=e=>t?BigInt(e):Number(e),i=o.replace(/_/g,"").split(":").reduce(((e,t)=>e*num(60)+num(t)),num(0));return"-"===n?num(-1)*i:i}function stringifySexagesimal(e){let{value:t}=e,num=e=>e;if("bigint"==typeof t)num=e=>BigInt(e);else if(isNaN(t)||!isFinite(t))return o.stringifyNumber(e);let n="";t<0&&(n="-",t*=num(-1));const i=num(60),r=[t%i];return t<60?r.unshift(0):(t=(t-r[0])/i,r.unshift(t%i),t>=60&&(t=(t-r[0])/i,r.unshift(t))),n+r.map((e=>e<10?"0"+String(e):String(e))).join(":").replace(/000000\d*$/,"")}const i={identify:e=>"bigint"==typeof e||Number.isInteger(e),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(e,t,{intAsBigInt:n})=>parseSexagesimal(e,n),stringify:stringifySexagesimal},r={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:e=>parseSexagesimal(e,!1),stringify:stringifySexagesimal},s={identify:e=>e instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),resolve(e){const t=e.match(s.test);if(!t)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");const[,n,o,i,r,a,c]=t.map(Number),l=t[7]?Number((t[7]+"00").substr(1,3)):0;let u=Date.UTC(n,o-1,i,r||0,a||0,c||0,l);const d=t[8];if(d&&"Z"!==d){let e=parseSexagesimal(d,!1);Math.abs(e)<30&&(e*=60),u-=6e4*e}return new Date(u)},stringify:({value:e})=>e.toISOString().replace(/((T00:00)?:00)?\.000Z$/,"")};t.floatTime=r,t.intTime=i,t.timestamp=s},94112:(e,t)=>{const n="block",o="quoted";function consumeMoreIndentedLines(e,t){let n=e[t+1];for(;" "===n||"\t"===n;){do{n=e[t+=1]}while(n&&"\n"!==n);n=e[t+1]}return t}t.FOLD_BLOCK=n,t.FOLD_FLOW="flow",t.FOLD_QUOTED=o,t.foldFlowLines=function foldFlowLines(e,t,i="flow",{indentAtStart:r,lineWidth:s=80,minContentWidth:a=20,onFold:c,onOverflow:l}={}){if(!s||s<0)return e;const u=Math.max(1+a,1+s-t.length);if(e.length<=u)return e;const d=[],f={};let p,h,m=s-t.length;"number"==typeof r&&(r>s-Math.max(2,a)?d.push(0):m=s-r);let g=!1,y=-1,v=-1,b=-1;i===n&&(y=consumeMoreIndentedLines(e,y),-1!==y&&(m=y+u));for(let t;t=e[y+=1];){if(i===o&&"\\"===t){switch(v=y,e[y+1]){case"x":y+=3;break;case"u":y+=5;break;case"U":y+=9;break;default:y+=1}b=y}if("\n"===t)i===n&&(y=consumeMoreIndentedLines(e,y)),m=y+u,p=void 0;else{if(" "===t&&h&&" "!==h&&"\n"!==h&&"\t"!==h){const t=e[y+1];t&&" "!==t&&"\n"!==t&&"\t"!==t&&(p=y)}if(y>=m)if(p)d.push(p),m=p+u,p=void 0;else if(i===o){for(;" "===h||"\t"===h;)h=t,t=e[y+=1],g=!0;const n=y>b+1?y-2:v-1;if(f[n])return e;d.push(n),f[n]=!0,m=n+u,p=void 0}else g=!0}h=t}if(g&&l&&l(),0===d.length)return e;c&&c();let S=e.slice(0,d[0]);for(let n=0;n<d.length;++n){const r=d[n],s=d[n+1]||e.length;0===r?S=`\n${t}${e.slice(0,s)}`:(i===o&&f[r]&&(S+=`${e[r]}\\`),S+=`\n${t}${e.slice(r+1,s)}`)}return S}},20611:(e,t,n)=>{var o=n(21903),i=n(10466),r=n(28463),s=n(98431);t.createStringifyContext=function createStringifyContext(e,t){const n=Object.assign({blockQuote:!0,commentString:r.stringifyComment,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trueStr:"true",verifyAliasOrder:!0},e.schema.toStringOptions,t);let o;switch(n.collectionStyle){case"block":o=!1;break;case"flow":o=!0;break;default:o=null}return{anchors:new Set,doc:e,flowCollectionPadding:n.flowCollectionPadding?" ":"",indent:"",indentStep:"number"==typeof n.indent?" ".repeat(n.indent):" ",inFlow:o,options:n}},t.stringify=function stringify(e,t,n,r){if(i.isPair(e))return e.toString(t,n,r);if(i.isAlias(e)){if(t.doc.directives)return e.toString(t);if(t.resolvedAliases?.has(e))throw new TypeError("Cannot stringify circular structure without alias nodes");t.resolvedAliases?t.resolvedAliases.add(e):t.resolvedAliases=new Set([e]),e=e.resolve(t.doc)}let a;const c=i.isNode(e)?e:t.doc.createNode(e,{onTagObj:e=>a=e});a||(a=function getTagObject(e,t){if(t.tag){const n=e.filter((e=>e.tag===t.tag));if(n.length>0)return n.find((e=>e.format===t.format))??n[0]}let n,o;if(i.isScalar(t)){o=t.value;const i=e.filter((e=>e.identify?.(o)));n=i.find((e=>e.format===t.format))??i.find((e=>!e.format))}else o=t,n=e.find((e=>e.nodeClass&&o instanceof e.nodeClass));if(!n)throw new Error(`Tag not resolved for ${o?.constructor?.name??typeof o} value`);return n}(t.doc.schema.tags,c));const l=function stringifyProps(e,t,{anchors:n,doc:r}){if(!r.directives)return"";const s=[],a=(i.isScalar(e)||i.isCollection(e))&&e.anchor;a&&o.anchorIsValid(a)&&(n.add(a),s.push(`&${a}`));const c=e.tag?e.tag:t.default?null:t.tag;return c&&s.push(r.directives.tagString(c)),s.join(" ")}(c,a,t);l.length>0&&(t.indentAtStart=(t.indentAtStart??0)+l.length+1);const u="function"==typeof a.stringify?a.stringify(c,t,n,r):i.isScalar(c)?s.stringifyString(c,t,n,r):c.toString(t,n,r);return l?i.isScalar(c)||"{"===u[0]||"["===u[0]?`${l} ${u}`:`${l}\n${t.indent}${u}`:u}},40240:(e,t,n)=>{var o=n(43365),i=n(10466),r=n(20611),s=n(28463);function stringifyBlockCollection({comment:e,items:t},n,{blockItemPrefix:o,flowChars:a,itemIndent:c,onChompKeep:l,onComment:u}){const{indent:d,options:{commentString:f}}=n,p=Object.assign({},n,{indent:c,type:null});let h=!1;const m=[];for(let e=0;e<t.length;++e){const a=t[e];let l=null;if(i.isNode(a))!h&&a.spaceBefore&&m.push(""),addCommentBefore(n,m,a.commentBefore,h),a.comment&&(l=a.comment);else if(i.isPair(a)){const e=i.isNode(a.key)?a.key:null;e&&(!h&&e.spaceBefore&&m.push(""),addCommentBefore(n,m,e.commentBefore,h))}h=!1;let u=r.stringify(a,p,(()=>l=null),(()=>h=!0));l&&(u+=s.lineComment(u,c,f(l))),h&&l&&(h=!1),m.push(o+u)}let g;if(0===m.length)g=a.start+a.end;else{g=m[0];for(let e=1;e<m.length;++e){const t=m[e];g+=t?`\n${d}${t}`:"\n"}}return e?(g+="\n"+s.indentComment(f(e),d),u&&u()):h&&l&&l(),g}function stringifyFlowCollection({comment:e,items:t},n,{flowChars:a,itemIndent:c,onComment:l}){const{indent:u,indentStep:d,flowCollectionPadding:f,options:{commentString:p}}=n;c+=d;const h=Object.assign({},n,{indent:c,inFlow:!0,type:null});let m=!1,g=0;const y=[];for(let e=0;e<t.length;++e){const o=t[e];let a=null;if(i.isNode(o))o.spaceBefore&&y.push(""),addCommentBefore(n,y,o.commentBefore,!1),o.comment&&(a=o.comment);else if(i.isPair(o)){const e=i.isNode(o.key)?o.key:null;e&&(e.spaceBefore&&y.push(""),addCommentBefore(n,y,e.commentBefore,!1),e.comment&&(m=!0));const t=i.isNode(o.value)?o.value:null;t?(t.comment&&(a=t.comment),t.commentBefore&&(m=!0)):null==o.value&&e&&e.comment&&(a=e.comment)}a&&(m=!0);let l=r.stringify(o,h,(()=>a=null));e<t.length-1&&(l+=","),a&&(l+=s.lineComment(l,c,p(a))),!m&&(y.length>g||l.includes("\n"))&&(m=!0),y.push(l),g=y.length}let v;const{start:b,end:S}=a;if(0===y.length)v=b+S;else{if(!m){m=y.reduce(((e,t)=>e+t.length+2),2)>o.Collection.maxFlowStringSingleLineLength}if(m){v=b;for(const e of y)v+=e?`\n${d}${u}${e}`:"\n";v+=`\n${u}${S}`}else v=`${b}${f}${y.join(" ")}${f}${S}`}return e&&(v+=s.lineComment(v,u,p(e)),l&&l()),v}function addCommentBefore({indent:e,options:{commentString:t}},n,o,i){if(o&&i&&(o=o.replace(/^\n+/,"")),o){const i=s.indentComment(t(o),e);n.push(i.trimStart())}}t.stringifyCollection=function stringifyCollection(e,t,n){return(t.inFlow??e.flow?stringifyFlowCollection:stringifyBlockCollection)(e,t,n)}},28463:(e,t)=>{function indentComment(e,t){return/^\n+$/.test(e)?e.substring(1):t?e.replace(/^(?! *$)/gm,t):e}t.indentComment=indentComment,t.lineComment=(e,t,n)=>e.endsWith("\n")?indentComment(n,t):n.includes("\n")?"\n"+indentComment(n,t):(e.endsWith(" ")?"":" ")+n,t.stringifyComment=e=>e.replace(/^(?!$)(?: $)?/gm,"#")},89957:(e,t,n)=>{var o=n(10466),i=n(20611),r=n(28463);t.stringifyDocument=function stringifyDocument(e,t){const n=[];let s=!0===t.directives;if(!1!==t.directives&&e.directives){const t=e.directives.toString(e);t?(n.push(t),s=!0):e.directives.docStart&&(s=!0)}s&&n.push("---");const a=i.createStringifyContext(e,t),{commentString:c}=a.options;if(e.commentBefore){1!==n.length&&n.unshift("");const t=c(e.commentBefore);n.unshift(r.indentComment(t,""))}let l=!1,u=null;if(e.contents){if(o.isNode(e.contents)){if(e.contents.spaceBefore&&s&&n.push(""),e.contents.commentBefore){const t=c(e.contents.commentBefore);n.push(r.indentComment(t,""))}a.forceBlockIndent=!!e.comment,u=e.contents.comment}const t=u?void 0:()=>l=!0;let d=i.stringify(e.contents,a,(()=>u=null),t);u&&(d+=r.lineComment(d,"",c(u))),"|"!==d[0]&&">"!==d[0]||"---"!==n[n.length-1]?n.push(d):n[n.length-1]=`--- ${d}`}else n.push(i.stringify(e.contents,a));if(e.directives?.docEnd)if(e.comment){const t=c(e.comment);t.includes("\n")?(n.push("..."),n.push(r.indentComment(t,""))):n.push(`... ${t}`)}else n.push("...");else{let t=e.comment;t&&l&&(t=t.replace(/^\n+/,"")),t&&(l&&!u||""===n[n.length-1]||n.push(""),n.push(r.indentComment(c(t),"")))}return n.join("\n")+"\n"}},15260:(e,t)=>{t.stringifyNumber=function stringifyNumber({format:e,minFractionDigits:t,tag:n,value:o}){if("bigint"==typeof o)return String(o);const i="number"==typeof o?o:Number(o);if(!isFinite(i))return isNaN(i)?".nan":i<0?"-.inf":".inf";let r=JSON.stringify(o);if(!e&&t&&(!n||"tag:yaml.org,2002:float"===n)&&/^\d/.test(r)){let e=r.indexOf(".");e<0&&(e=r.length,r+=".");let n=t-(r.length-e-1);for(;n-- >0;)r+="0"}return r}},38843:(e,t,n)=>{var o=n(10466),i=n(58844),r=n(20611),s=n(28463);t.stringifyPair=function stringifyPair({key:e,value:t},n,a,c){const{allNullValues:l,doc:u,indent:d,indentStep:f,options:{commentString:p,indentSeq:h,simpleKeys:m}}=n;let g=o.isNode(e)&&e.comment||null;if(m){if(g)throw new Error("With simple keys, key nodes cannot have comments");if(o.isCollection(e)){throw new Error("With simple keys, collection cannot be used as a key value")}}let y=!m&&(!e||g&&null==t&&!n.inFlow||o.isCollection(e)||(o.isScalar(e)?e.type===i.Scalar.BLOCK_FOLDED||e.type===i.Scalar.BLOCK_LITERAL:"object"==typeof e));n=Object.assign({},n,{allNullValues:!1,implicitKey:!y&&(m||!l),indent:d+f});let v,b,S,k=!1,T=!1,w=r.stringify(e,n,(()=>k=!0),(()=>T=!0));if(!y&&!n.inFlow&&w.length>1024){if(m)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");y=!0}if(n.inFlow){if(l||null==t)return k&&a&&a(),""===w?"?":y?`? ${w}`:w}else if(l&&!m||null==t&&y)return w=`? ${w}`,g&&!k?w+=s.lineComment(w,n.indent,p(g)):T&&c&&c(),w;k&&(g=null),y?(g&&(w+=s.lineComment(w,n.indent,p(g))),w=`? ${w}\n${d}:`):(w=`${w}:`,g&&(w+=s.lineComment(w,n.indent,p(g)))),o.isNode(t)?(v=!!t.spaceBefore,b=t.commentBefore,S=t.comment):(v=!1,b=null,S=null,t&&"object"==typeof t&&(t=u.createNode(t))),n.implicitKey=!1,y||g||!o.isScalar(t)||(n.indentAtStart=w.length+1),T=!1,h||!(f.length>=2)||n.inFlow||y||!o.isSeq(t)||t.flow||t.tag||t.anchor||(n.indent=n.indent.substring(2));let C=!1;const D=r.stringify(t,n,(()=>C=!0),(()=>T=!0));let R=" ";if(g||v||b){if(R=v?"\n":"",b){const e=p(b);R+=`\n${s.indentComment(e,n.indent)}`}""!==D||n.inFlow?R+=`\n${n.indent}`:"\n"===R&&(R="\n\n")}else if(!y&&o.isCollection(t)){const e=D[0],o=D.indexOf("\n"),i=-1!==o,r=n.inFlow??t.flow??0===t.items.length;if(i||!r){let t=!1;if(i&&("&"===e||"!"===e)){let n=D.indexOf(" ");"&"===e&&-1!==n&&n<o&&"!"===D[n+1]&&(n=D.indexOf(" ",n+1)),(-1===n||o<n)&&(t=!0)}t||(R=`\n${n.indent}`)}}else""!==D&&"\n"!==D[0]||(R="");return w+=R+D,n.inFlow?C&&a&&a():S&&!C?w+=s.lineComment(w,n.indent,p(S)):T&&c&&c(),w}},98431:(e,t,n)=>{var o=n(58844),i=n(94112);const getFoldOptions=(e,t)=>({indentAtStart:t?e.indent.length:e.indentAtStart,lineWidth:e.options.lineWidth,minContentWidth:e.options.minContentWidth}),containsDocumentMarker=e=>/^(%|---|\.\.\.)/m.test(e);function doubleQuotedString(e,t){const n=JSON.stringify(e);if(t.options.doubleQuotedAsJSON)return n;const{implicitKey:o}=t,r=t.options.doubleQuotedMinMultiLineLength,s=t.indent||(containsDocumentMarker(e)?" ":"");let a="",c=0;for(let e=0,t=n[e];t;t=n[++e])if(" "===t&&"\\"===n[e+1]&&"n"===n[e+2]&&(a+=n.slice(c,e)+"\\ ",e+=1,c=e,t="\\"),"\\"===t)switch(n[e+1]){case"u":{a+=n.slice(c,e);const t=n.substr(e+2,4);switch(t){case"0000":a+="\\0";break;case"0007":a+="\\a";break;case"000b":a+="\\v";break;case"001b":a+="\\e";break;case"0085":a+="\\N";break;case"00a0":a+="\\_";break;case"2028":a+="\\L";break;case"2029":a+="\\P";break;default:"00"===t.substr(0,2)?a+="\\x"+t.substr(2):a+=n.substr(e,6)}e+=5,c=e+1}break;case"n":if(o||'"'===n[e+2]||n.length<r)e+=1;else{for(a+=n.slice(c,e)+"\n\n";"\\"===n[e+2]&&"n"===n[e+3]&&'"'!==n[e+4];)a+="\n",e+=2;a+=s," "===n[e+2]&&(a+="\\"),e+=1,c=e+1}break;default:e+=1}return a=c?a+n.slice(c):n,o?a:i.foldFlowLines(a,s,i.FOLD_QUOTED,getFoldOptions(t,!1))}function singleQuotedString(e,t){if(!1===t.options.singleQuote||t.implicitKey&&e.includes("\n")||/[ \t]\n|\n[ \t]/.test(e))return doubleQuotedString(e,t);const n=t.indent||(containsDocumentMarker(e)?" ":""),o="'"+e.replace(/'/g,"''").replace(/\n+/g,`$&\n${n}`)+"'";return t.implicitKey?o:i.foldFlowLines(o,n,i.FOLD_FLOW,getFoldOptions(t,!1))}function quotedString(e,t){const{singleQuote:n}=t.options;let o;if(!1===n)o=doubleQuotedString;else{const t=e.includes('"'),i=e.includes("'");o=t&&!i?singleQuotedString:i&&!t?doubleQuotedString:n?singleQuotedString:doubleQuotedString}return o(e,t)}function blockString({comment:e,type:t,value:n},r,s,a){const{blockQuote:c,commentString:l,lineWidth:u}=r.options;if(!c||/\n[\t ]+$/.test(n)||/^\s*$/.test(n))return quotedString(n,r);const d=r.indent||(r.forceBlockIndent||containsDocumentMarker(n)?" ":""),f="literal"===c||"folded"!==c&&t!==o.Scalar.BLOCK_FOLDED&&(t===o.Scalar.BLOCK_LITERAL||!function lineLengthOverLimit(e,t,n){if(!t||t<0)return!1;const o=t-n,i=e.length;if(i<=o)return!1;for(let t=0,n=0;t<i;++t)if("\n"===e[t]){if(t-n>o)return!0;if(n=t+1,i-n<=o)return!1}return!0}(n,u,d.length));if(!n)return f?"|\n":">\n";let p,h;for(h=n.length;h>0;--h){const e=n[h-1];if("\n"!==e&&"\t"!==e&&" "!==e)break}let m=n.substring(h);const g=m.indexOf("\n");-1===g?p="-":n===m||g!==m.length-1?(p="+",a&&a()):p="",m&&(n=n.slice(0,-m.length),"\n"===m[m.length-1]&&(m=m.slice(0,-1)),m=m.replace(/\n+(?!\n|$)/g,`$&${d}`));let y,v=!1,b=-1;for(y=0;y<n.length;++y){const e=n[y];if(" "===e)v=!0;else{if("\n"!==e)break;b=y}}let S=n.substring(0,b<y?b+1:y);S&&(n=n.substring(S.length),S=S.replace(/\n+/g,`$&${d}`));let k=(f?"|":">")+(v?d?"2":"1":"")+p;if(e&&(k+=" "+l(e.replace(/ ?[\r\n]+/g," ")),s&&s()),f)return`${k}\n${d}${S}${n=n.replace(/\n+/g,`$&${d}`)}${m}`;n=n.replace(/\n+/g,"\n$&").replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${d}`);return`${k}\n${d}${i.foldFlowLines(`${S}${n}${m}`,d,i.FOLD_BLOCK,getFoldOptions(r,!0))}`}t.stringifyString=function stringifyString(e,t,n,r){const{implicitKey:s,inFlow:a}=t,c="string"==typeof e.value?e:Object.assign({},e,{value:String(e.value)});let{type:l}=e;l!==o.Scalar.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(c.value)&&(l=o.Scalar.QUOTE_DOUBLE);const _stringify=e=>{switch(e){case o.Scalar.BLOCK_FOLDED:case o.Scalar.BLOCK_LITERAL:return s||a?quotedString(c.value,t):blockString(c,t,n,r);case o.Scalar.QUOTE_DOUBLE:return doubleQuotedString(c.value,t);case o.Scalar.QUOTE_SINGLE:return singleQuotedString(c.value,t);case o.Scalar.PLAIN:return function plainString(e,t,n,r){const{type:s,value:a}=e,{actualString:c,implicitKey:l,indent:u,indentStep:d,inFlow:f}=t;if(l&&/[\n[\]{},]/.test(a)||f&&/[[\]{},]/.test(a))return quotedString(a,t);if(!a||/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(a))return l||f||!a.includes("\n")?quotedString(a,t):blockString(e,t,n,r);if(!l&&!f&&s!==o.Scalar.PLAIN&&a.includes("\n"))return blockString(e,t,n,r);if(containsDocumentMarker(a)){if(""===u)return t.forceBlockIndent=!0,blockString(e,t,n,r);if(l&&u===d)return quotedString(a,t)}const p=a.replace(/\n+/g,`$&\n${u}`);if(c){const test=e=>e.default&&"tag:yaml.org,2002:str"!==e.tag&&e.test?.test(p),{compat:e,tags:n}=t.doc.schema;if(n.some(test)||e?.some(test))return quotedString(a,t)}return l?p:i.foldFlowLines(p,u,i.FOLD_FLOW,getFoldOptions(t,!1))}(c,t,n,r);default:return null}};let u=_stringify(l);if(null===u){const{defaultKeyType:e,defaultStringType:n}=t.options,o=s&&e||n;if(u=_stringify(o),null===u)throw new Error(`Unsupported default string type ${o}`)}return u}},81381:(e,t,n)=>{var o=n(10466);const i=Symbol("break visit"),r=Symbol("skip children"),s=Symbol("remove node");function visit(e,t){const n=initVisitor(t);if(o.isDocument(e)){visit_(null,e.contents,n,Object.freeze([e]))===s&&(e.contents=null)}else visit_(null,e,n,Object.freeze([]))}function visit_(e,t,n,r){const a=callVisitor(e,t,n,r);if(o.isNode(a)||o.isPair(a))return replaceNode(e,r,a),visit_(e,a,n,r);if("symbol"!=typeof a)if(o.isCollection(t)){r=Object.freeze(r.concat(t));for(let e=0;e<t.items.length;++e){const o=visit_(e,t.items[e],n,r);if("number"==typeof o)e=o-1;else{if(o===i)return i;o===s&&(t.items.splice(e,1),e-=1)}}}else if(o.isPair(t)){r=Object.freeze(r.concat(t));const e=visit_("key",t.key,n,r);if(e===i)return i;e===s&&(t.key=null);const o=visit_("value",t.value,n,r);if(o===i)return i;o===s&&(t.value=null)}return a}async function visitAsync(e,t){const n=initVisitor(t);if(o.isDocument(e)){await visitAsync_(null,e.contents,n,Object.freeze([e]))===s&&(e.contents=null)}else await visitAsync_(null,e,n,Object.freeze([]))}async function visitAsync_(e,t,n,r){const a=await callVisitor(e,t,n,r);if(o.isNode(a)||o.isPair(a))return replaceNode(e,r,a),visitAsync_(e,a,n,r);if("symbol"!=typeof a)if(o.isCollection(t)){r=Object.freeze(r.concat(t));for(let e=0;e<t.items.length;++e){const o=await visitAsync_(e,t.items[e],n,r);if("number"==typeof o)e=o-1;else{if(o===i)return i;o===s&&(t.items.splice(e,1),e-=1)}}}else if(o.isPair(t)){r=Object.freeze(r.concat(t));const e=await visitAsync_("key",t.key,n,r);if(e===i)return i;e===s&&(t.key=null);const o=await visitAsync_("value",t.value,n,r);if(o===i)return i;o===s&&(t.value=null)}return a}function initVisitor(e){return"object"==typeof e&&(e.Collection||e.Node||e.Value)?Object.assign({Alias:e.Node,Map:e.Node,Scalar:e.Node,Seq:e.Node},e.Value&&{Map:e.Value,Scalar:e.Value,Seq:e.Value},e.Collection&&{Map:e.Collection,Seq:e.Collection},e):e}function callVisitor(e,t,n,i){return"function"==typeof n?n(e,t,i):o.isMap(t)?n.Map?.(e,t,i):o.isSeq(t)?n.Seq?.(e,t,i):o.isPair(t)?n.Pair?.(e,t,i):o.isScalar(t)?n.Scalar?.(e,t,i):o.isAlias(t)?n.Alias?.(e,t,i):void 0}function replaceNode(e,t,n){const i=t[t.length-1];if(o.isCollection(i))i.items[e]=n;else if(o.isPair(i))"key"===e?i.key=n:i.value=n;else{if(!o.isDocument(i)){const e=o.isAlias(i)?"alias":"scalar";throw new Error(`Cannot replace node with ${e} parent`)}i.contents=n}}visit.BREAK=i,visit.SKIP=r,visit.REMOVE=s,visitAsync.BREAK=i,visitAsync.SKIP=r,visitAsync.REMOVE=s,t.visit=visit,t.visitAsync=visitAsync}},t={};function __webpack_require__(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={exports:{}};return e[n].call(i.exports,i,i.exports,__webpack_require__),i.exports}__webpack_require__.d=(e,t)=>{for(var n in t)__webpack_require__.o(t,n)&&!__webpack_require__.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},__webpack_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),__webpack_require__.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};(()=>{var e=n;Object.defineProperty(e,"__esModule",{value:!0});const t=__webpack_require__(35809),o=__webpack_require__(68212),i=__webpack_require__(72743),r=(0,o.createConnection)(t.ProposedFeatures.all);r.onInitialize((e=>{const t=new i.ComposeLanguageService(r,e);return r.onShutdown((()=>{t.dispose()})),{capabilities:t.capabilities,serverInfo:{name:"Docker Compose Language Server"}}})),r.listen()})(),module.exports=n})(); |