/*! For license information please see 865.6a351d4c8e1788389d2b.js.LICENSE.txt */ "use strict";(self.webpackChunkgrafana=self.webpackChunkgrafana||[]).push([[865],{50865:(e,t,n)=>{n.r(t),n.d(t,{setupMode:()=>Rt,setupMode1:()=>At});var r=n(13085),i=Object.defineProperty,o=Object.getOwnPropertyDescriptor,a=Object.getOwnPropertyNames,s=Object.prototype.hasOwnProperty,u={};i(u,"__esModule",{value:!0}),((e,t,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let r of a(t))s.call(e,r)||"default"===r||i(e,r,{get:()=>t[r],enumerable:!(n=o(t,r))||n.enumerable})})(u,r);var c,d,g,l,h,f,p,v,m,w,_,b,k,y,E,x,C,I,A,R,S,P,T,F,D,L,j,M,O,N,U,W,V,H,K,z,X,B,$,q,Q,G,J,Y,Z,ee,te,ne,re,ie=class{constructor(e){this._defaults=e,this._worker=null,this._client=null,this._idleCheckInterval=window.setInterval((()=>this._checkIfIdle()),3e4),this._lastUsedTime=0,this._configChangeListener=this._defaults.onDidChange((()=>this._stopWorker()))}_stopWorker(){this._worker&&(this._worker.dispose(),this._worker=null),this._client=null}dispose(){clearInterval(this._idleCheckInterval),this._configChangeListener.dispose(),this._stopWorker()}_checkIfIdle(){if(!this._worker)return;Date.now()-this._lastUsedTime>12e4&&this._stopWorker()}_getClient(){return this._lastUsedTime=Date.now(),this._client||(this._worker=u.editor.createWebWorker({moduleId:"vs/language/html/htmlWorker",createData:{languageSettings:this._defaults.options,languageId:this._defaults.languageId},label:this._defaults.languageId}),this._client=this._worker.getProxy()),this._client}getLanguageServiceWorker(...e){let t;return this._getClient().then((e=>{t=e})).then((t=>{if(this._worker)return this._worker.withSyncedResources(e)})).then((e=>t))}};(d=c||(c={})).MIN_VALUE=-2147483648,d.MAX_VALUE=2147483647,(l=g||(g={})).MIN_VALUE=0,l.MAX_VALUE=2147483647,(f=h||(h={})).create=function(e,t){return e===Number.MAX_VALUE&&(e=g.MAX_VALUE),t===Number.MAX_VALUE&&(t=g.MAX_VALUE),{line:e,character:t}},f.is=function(e){var t=e;return it.objectLiteral(t)&&it.uinteger(t.line)&&it.uinteger(t.character)},(v=p||(p={})).create=function(e,t,n,r){if(it.uinteger(e)&&it.uinteger(t)&&it.uinteger(n)&&it.uinteger(r))return{start:h.create(e,t),end:h.create(n,r)};if(h.is(e)&&h.is(t))return{start:e,end:t};throw new Error("Range#create called with invalid arguments["+e+", "+t+", "+n+", "+r+"]")},v.is=function(e){var t=e;return it.objectLiteral(t)&&h.is(t.start)&&h.is(t.end)},(w=m||(m={})).create=function(e,t){return{uri:e,range:t}},w.is=function(e){var t=e;return it.defined(t)&&p.is(t.range)&&(it.string(t.uri)||it.undefined(t.uri))},(b=_||(_={})).create=function(e,t,n,r){return{targetUri:e,targetRange:t,targetSelectionRange:n,originSelectionRange:r}},b.is=function(e){var t=e;return it.defined(t)&&p.is(t.targetRange)&&it.string(t.targetUri)&&(p.is(t.targetSelectionRange)||it.undefined(t.targetSelectionRange))&&(p.is(t.originSelectionRange)||it.undefined(t.originSelectionRange))},(y=k||(k={})).create=function(e,t,n,r){return{red:e,green:t,blue:n,alpha:r}},y.is=function(e){var t=e;return it.numberRange(t.red,0,1)&&it.numberRange(t.green,0,1)&&it.numberRange(t.blue,0,1)&&it.numberRange(t.alpha,0,1)},(x=E||(E={})).create=function(e,t){return{range:e,color:t}},x.is=function(e){var t=e;return p.is(t.range)&&k.is(t.color)},(I=C||(C={})).create=function(e,t,n){return{label:e,textEdit:t,additionalTextEdits:n}},I.is=function(e){var t=e;return it.string(t.label)&&(it.undefined(t.textEdit)||H.is(t))&&(it.undefined(t.additionalTextEdits)||it.typedArray(t.additionalTextEdits,H.is))},(R=A||(A={})).Comment="comment",R.Imports="imports",R.Region="region",(P=S||(S={})).create=function(e,t,n,r,i){var o={startLine:e,endLine:t};return it.defined(n)&&(o.startCharacter=n),it.defined(r)&&(o.endCharacter=r),it.defined(i)&&(o.kind=i),o},P.is=function(e){var t=e;return it.uinteger(t.startLine)&&it.uinteger(t.startLine)&&(it.undefined(t.startCharacter)||it.uinteger(t.startCharacter))&&(it.undefined(t.endCharacter)||it.uinteger(t.endCharacter))&&(it.undefined(t.kind)||it.string(t.kind))},(F=T||(T={})).create=function(e,t){return{location:e,message:t}},F.is=function(e){var t=e;return it.defined(t)&&m.is(t.location)&&it.string(t.message)},(L=D||(D={})).Error=1,L.Warning=2,L.Information=3,L.Hint=4,(M=j||(j={})).Unnecessary=1,M.Deprecated=2,(O||(O={})).is=function(e){var t=e;return null!=t&&it.string(t.href)},(U=N||(N={})).create=function(e,t,n,r,i,o){var a={range:e,message:t};return it.defined(n)&&(a.severity=n),it.defined(r)&&(a.code=r),it.defined(i)&&(a.source=i),it.defined(o)&&(a.relatedInformation=o),a},U.is=function(e){var t,n=e;return it.defined(n)&&p.is(n.range)&&it.string(n.message)&&(it.number(n.severity)||it.undefined(n.severity))&&(it.integer(n.code)||it.string(n.code)||it.undefined(n.code))&&(it.undefined(n.codeDescription)||it.string(null===(t=n.codeDescription)||void 0===t?void 0:t.href))&&(it.string(n.source)||it.undefined(n.source))&&(it.undefined(n.relatedInformation)||it.typedArray(n.relatedInformation,T.is))},(V=W||(W={})).create=function(e,t){for(var n=[],r=2;r0&&(i.arguments=n),i},V.is=function(e){var t=e;return it.defined(t)&&it.string(t.title)&&it.string(t.command)},(K=H||(H={})).replace=function(e,t){return{range:e,newText:t}},K.insert=function(e,t){return{range:{start:e,end:e},newText:t}},K.del=function(e){return{range:e,newText:""}},K.is=function(e){var t=e;return it.objectLiteral(t)&&it.string(t.newText)&&p.is(t.range)},(X=z||(z={})).create=function(e,t,n){var r={label:e};return void 0!==t&&(r.needsConfirmation=t),void 0!==n&&(r.description=n),r},X.is=function(e){var t=e;return void 0!==t&&it.objectLiteral(t)&&it.string(t.label)&&(it.boolean(t.needsConfirmation)||void 0===t.needsConfirmation)&&(it.string(t.description)||void 0===t.description)},(B||(B={})).is=function(e){return"string"==typeof e},(q=$||($={})).replace=function(e,t,n){return{range:e,newText:t,annotationId:n}},q.insert=function(e,t,n){return{range:{start:e,end:e},newText:t,annotationId:n}},q.del=function(e,t){return{range:e,newText:"",annotationId:t}},q.is=function(e){var t=e;return H.is(t)&&(z.is(t.annotationId)||B.is(t.annotationId))},(G=Q||(Q={})).create=function(e,t){return{textDocument:e,edits:t}},G.is=function(e){var t=e;return it.defined(t)&&ce.is(t.textDocument)&&Array.isArray(t.edits)},(Y=J||(J={})).create=function(e,t,n){var r={kind:"create",uri:e};return void 0===t||void 0===t.overwrite&&void 0===t.ignoreIfExists||(r.options=t),void 0!==n&&(r.annotationId=n),r},Y.is=function(e){var t=e;return t&&"create"===t.kind&&it.string(t.uri)&&(void 0===t.options||(void 0===t.options.overwrite||it.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||it.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||B.is(t.annotationId))},(ee=Z||(Z={})).create=function(e,t,n,r){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!==r&&(i.annotationId=r),i},ee.is=function(e){var t=e;return t&&"rename"===t.kind&&it.string(t.oldUri)&&it.string(t.newUri)&&(void 0===t.options||(void 0===t.options.overwrite||it.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||it.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||B.is(t.annotationId))},(ne=te||(te={})).create=function(e,t,n){var r={kind:"delete",uri:e};return void 0===t||void 0===t.recursive&&void 0===t.ignoreIfNotExists||(r.options=t),void 0!==n&&(r.annotationId=n),r},ne.is=function(e){var t=e;return t&&"delete"===t.kind&&it.string(t.uri)&&(void 0===t.options||(void 0===t.options.recursive||it.boolean(t.options.recursive))&&(void 0===t.options.ignoreIfNotExists||it.boolean(t.options.ignoreIfNotExists)))&&(void 0===t.annotationId||B.is(t.annotationId))},(re||(re={})).is=function(e){var t=e;return t&&(void 0!==t.changes||void 0!==t.documentChanges)&&(void 0===t.documentChanges||t.documentChanges.every((function(e){return it.string(e.kind)?J.is(e)||Z.is(e)||te.is(e):Q.is(e)})))};var oe,ae,se,ue,ce,de,ge,le,he,fe,pe,ve,me,we,_e,be,ke,ye,Ee,xe,Ce,Ie,Ae,Re,Se,Pe,Te,Fe,De,Le,je,Me,Oe,Ne,Ue,We,Ve,He,Ke,ze,Xe,Be,$e,qe,Qe,Ge,Je,Ye,Ze,et,tt,nt=function(){function e(e,t){this.edits=e,this.changeAnnotations=t}return e.prototype.insert=function(e,t,n){var r,i;if(void 0===n?r=H.insert(e,t):B.is(n)?(i=n,r=$.insert(e,t,n)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(n),r=$.insert(e,t,i)),this.edits.push(r),void 0!==i)return i},e.prototype.replace=function(e,t,n){var r,i;if(void 0===n?r=H.replace(e,t):B.is(n)?(i=n,r=$.replace(e,t,n)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(n),r=$.replace(e,t,i)),this.edits.push(r),void 0!==i)return i},e.prototype.delete=function(e,t){var n,r;if(void 0===t?n=H.del(e):B.is(t)?(r=t,n=$.del(e,t)):(this.assertChangeAnnotations(this.changeAnnotations),r=this.changeAnnotations.manage(t),n=$.del(e,r)),this.edits.push(n),void 0!==r)return r},e.prototype.add=function(e){this.edits.push(e)},e.prototype.all=function(){return this.edits},e.prototype.clear=function(){this.edits.splice(0,this.edits.length)},e.prototype.assertChangeAnnotations=function(e){if(void 0===e)throw new Error("Text edit change is not configured to manage change annotations.")},e}(),rt=function(){function e(e){this._annotations=void 0===e?Object.create(null):e,this._counter=0,this._size=0}return e.prototype.all=function(){return this._annotations},Object.defineProperty(e.prototype,"size",{get:function(){return this._size},enumerable:!1,configurable:!0}),e.prototype.manage=function(e,t){var n;if(B.is(e)?n=e:(n=this.nextId(),t=e),void 0!==this._annotations[n])throw new Error("Id "+n+" is already in use.");if(void 0===t)throw new Error("No annotation provided for id "+n);return this._annotations[n]=t,this._size++,n},e.prototype.nextId=function(){return this._counter++,this._counter.toString()},e}();!function(){function e(e){var t=this;this._textEditChanges=Object.create(null),void 0!==e?(this._workspaceEdit=e,e.documentChanges?(this._changeAnnotations=new rt(e.changeAnnotations),e.changeAnnotations=this._changeAnnotations.all(),e.documentChanges.forEach((function(e){if(Q.is(e)){var n=new nt(e.edits,t._changeAnnotations);t._textEditChanges[e.textDocument.uri]=n}}))):e.changes&&Object.keys(e.changes).forEach((function(n){var r=new nt(e.changes[n]);t._textEditChanges[n]=r}))):this._workspaceEdit={}}Object.defineProperty(e.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}),e.prototype.getTextEditChange=function(e){if(ce.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(!(r=this._textEditChanges[t.uri])){var n={textDocument:t,edits:i=[]};this._workspaceEdit.documentChanges.push(n),r=new nt(i,this._changeAnnotations),this._textEditChanges[t.uri]=r}return r}if(this.initChanges(),void 0===this._workspaceEdit.changes)throw new Error("Workspace edit is not configured for normal text edit changes.");var r;if(!(r=this._textEditChanges[e])){var i=[];this._workspaceEdit.changes[e]=i,r=new nt(i),this._textEditChanges[e]=r}return r},e.prototype.initDocumentChanges=function(){void 0===this._workspaceEdit.documentChanges&&void 0===this._workspaceEdit.changes&&(this._changeAnnotations=new rt,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())},e.prototype.initChanges=function(){void 0===this._workspaceEdit.documentChanges&&void 0===this._workspaceEdit.changes&&(this._workspaceEdit.changes=Object.create(null))},e.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 r,i,o;if(z.is(t)||B.is(t)?r=t:n=t,void 0===r?i=J.create(e,n):(o=B.is(r)?r:this._changeAnnotations.manage(r),i=J.create(e,n,o)),this._workspaceEdit.documentChanges.push(i),void 0!==o)return o},e.prototype.renameFile=function(e,t,n,r){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");var i,o,a;if(z.is(n)||B.is(n)?i=n:r=n,void 0===i?o=Z.create(e,t,r):(a=B.is(i)?i:this._changeAnnotations.manage(i),o=Z.create(e,t,r,a)),this._workspaceEdit.documentChanges.push(o),void 0!==a)return a},e.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 r,i,o;if(z.is(t)||B.is(t)?r=t:n=t,void 0===r?i=te.create(e,n):(o=B.is(r)?r:this._changeAnnotations.manage(r),i=te.create(e,n,o)),this._workspaceEdit.documentChanges.push(i),void 0!==o)return o}}();(ae=oe||(oe={})).create=function(e){return{uri:e}},ae.is=function(e){var t=e;return it.defined(t)&&it.string(t.uri)},(ue=se||(se={})).create=function(e,t){return{uri:e,version:t}},ue.is=function(e){var t=e;return it.defined(t)&&it.string(t.uri)&&it.integer(t.version)},(de=ce||(ce={})).create=function(e,t){return{uri:e,version:t}},de.is=function(e){var t=e;return it.defined(t)&&it.string(t.uri)&&(null===t.version||it.integer(t.version))},(le=ge||(ge={})).create=function(e,t,n,r){return{uri:e,languageId:t,version:n,text:r}},le.is=function(e){var t=e;return it.defined(t)&&it.string(t.uri)&&it.string(t.languageId)&&it.integer(t.version)&&it.string(t.text)},(fe=he||(he={})).PlainText="plaintext",fe.Markdown="markdown",function(e){e.is=function(t){var n=t;return n===e.PlainText||n===e.Markdown}}(he||(he={})),(pe||(pe={})).is=function(e){var t=e;return it.objectLiteral(e)&&he.is(t.kind)&&it.string(t.value)},(me=ve||(ve={})).Text=1,me.Method=2,me.Function=3,me.Constructor=4,me.Field=5,me.Variable=6,me.Class=7,me.Interface=8,me.Module=9,me.Property=10,me.Unit=11,me.Value=12,me.Enum=13,me.Keyword=14,me.Snippet=15,me.Color=16,me.File=17,me.Reference=18,me.Folder=19,me.EnumMember=20,me.Constant=21,me.Struct=22,me.Event=23,me.Operator=24,me.TypeParameter=25,(_e=we||(we={})).PlainText=1,_e.Snippet=2,(be||(be={})).Deprecated=1,(ye=ke||(ke={})).create=function(e,t,n){return{newText:e,insert:t,replace:n}},ye.is=function(e){var t=e;return t&&it.string(t.newText)&&p.is(t.insert)&&p.is(t.replace)},(xe=Ee||(Ee={})).asIs=1,xe.adjustIndentation=2,(Ce||(Ce={})).create=function(e){return{label:e}},(Ie||(Ie={})).create=function(e,t){return{items:e||[],isIncomplete:!!t}},(Re=Ae||(Ae={})).fromPlainText=function(e){return e.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")},Re.is=function(e){var t=e;return it.string(t)||it.objectLiteral(t)&&it.string(t.language)&&it.string(t.value)},(Se||(Se={})).is=function(e){var t=e;return!!t&&it.objectLiteral(t)&&(pe.is(t.contents)||Ae.is(t.contents)||it.typedArray(t.contents,Ae.is))&&(void 0===e.range||p.is(e.range))},(Pe||(Pe={})).create=function(e,t){return t?{label:e,documentation:t}:{label:e}},(Te||(Te={})).create=function(e,t){for(var n=[],r=2;r=0;a--){var s=i[a],u=e.offsetAt(s.range.start),c=e.offsetAt(s.range.end);if(!(c<=o))throw new Error("Overlapping edit");r=r.substring(0,u)+s.newText+r.substring(c,r.length),o=u}return r}}(tt||(tt={}));var it,ot,at,st=function(){function e(e,t,n,r){this._uri=e,this._languageId=t,this._version=n,this._content=r,this._lineOffsets=void 0}return Object.defineProperty(e.prototype,"uri",{get:function(){return this._uri},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"languageId",{get:function(){return this._languageId},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"version",{get:function(){return this._version},enumerable:!1,configurable:!0}),e.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},e.prototype.update=function(e,t){this._content=e.text,this._version=t,this._lineOffsets=void 0},e.prototype.getLineOffsets=function(){if(void 0===this._lineOffsets){for(var e=[],t=this._content,n=!0,r=0;r0&&e.push(t.length),this._lineOffsets=e}return this._lineOffsets},e.prototype.positionAt=function(e){e=Math.max(Math.min(e,this._content.length),0);var t=this.getLineOffsets(),n=0,r=t.length;if(0===r)return h.create(0,e);for(;ne?r=i:n=i+1}var o=n-1;return h.create(o,e-t[o])},e.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],r=e.line+1e.doHover(r.toString(),ut(t)))).then((e=>{if(e)return{range:ct(e.range),contents:ft(e.contents)}}))}};function ht(e){return"string"==typeof e?{value:e}:(t=e)&&"object"==typeof t&&"string"==typeof t.kind?"plaintext"===e.kind?{value:e.value.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}:{value:e.value}:{value:"```"+e.language+"\n"+e.value+"\n```\n"};var t}function ft(e){if(e)return Array.isArray(e)?e.map(ht):[ht(e)]}var pt=class{constructor(e){this._worker=e}provideDocumentHighlights(e,t,n){const r=e.uri;return this._worker(r).then((e=>e.findDocumentHighlights(r.toString(),ut(t)))).then((e=>{if(e)return e.map((e=>({range:ct(e.range),kind:vt(e.kind)})))}))}};function vt(e){switch(e){case Fe.Read:return u.languages.DocumentHighlightKind.Read;case Fe.Write:return u.languages.DocumentHighlightKind.Write;case Fe.Text:return u.languages.DocumentHighlightKind.Text}return u.languages.DocumentHighlightKind.Text}var mt=class{constructor(e){this._worker=e}provideRenameEdits(e,t,n,r){const i=e.uri;return this._worker(i).then((e=>e.doRename(i.toString(),ut(t),n))).then((e=>function(e){if(!e||!e.changes)return;let t=[];for(let n in e.changes){const r=u.Uri.parse(n);for(let i of e.changes[n])t.push({resource:r,edit:{range:ct(i.range),text:i.newText}})}return{edits:t}}(e)))}};var wt=class{constructor(e){this._worker=e}provideDocumentSymbols(e,t){const n=e.uri;return this._worker(n).then((e=>e.findDocumentSymbols(n.toString()))).then((e=>{if(e)return e.map((e=>({name:e.name,detail:"",containerName:e.containerName,kind:_t(e.kind),range:ct(e.location.range),selectionRange:ct(e.location.range),tags:[]})))}))}};function _t(e){let t=u.languages.SymbolKind;switch(e){case je.File:return t.Array;case je.Module:return t.Module;case je.Namespace:return t.Namespace;case je.Package:return t.Package;case je.Class:return t.Class;case je.Method:return t.Method;case je.Property:return t.Property;case je.Field:return t.Field;case je.Constructor:return t.Constructor;case je.Enum:return t.Enum;case je.Interface:return t.Interface;case je.Function:return t.Function;case je.Variable:return t.Variable;case je.Constant:return t.Constant;case je.String:return t.String;case je.Number:return t.Number;case je.Boolean:return t.Boolean;case je.Array:return t.Array}return t.Function}var bt=class{constructor(e){this._worker=e}provideLinks(e,t){const n=e.uri;return this._worker(n).then((e=>e.findDocumentLinks(n.toString()))).then((e=>{if(e)return{links:e.map((e=>({range:ct(e.range),url:e.target})))}}))}},kt=class{constructor(e){this._worker=e}provideDocumentFormattingEdits(e,t,n){const r=e.uri;return this._worker(r).then((e=>e.format(r.toString(),null,Et(t)).then((e=>{if(e&&0!==e.length)return e.map(gt)}))))}},yt=class{constructor(e){this._worker=e}provideDocumentRangeFormattingEdits(e,t,n,r){const i=e.uri;return this._worker(i).then((e=>e.format(i.toString(),function(e){if(e)return{start:{line:e.startLineNumber-1,character:e.startColumn-1},end:{line:e.endLineNumber-1,character:e.endColumn-1}}}(t),Et(n)).then((e=>{if(e&&0!==e.length)return e.map(gt)}))))}};function Et(e){return{tabSize:e.tabSize,insertSpaces:e.insertSpaces}}var xt=class{constructor(e){this._worker=e}provideFoldingRanges(e,t,n){const r=e.uri;return this._worker(r).then((e=>e.getFoldingRanges(r.toString(),t))).then((e=>{if(e)return e.map((e=>{const t={start:e.startLine+1,end:e.endLine+1};return void 0!==e.kind&&(t.kind=function(e){switch(e){case A.Comment:return u.languages.FoldingRangeKind.Comment;case A.Imports:return u.languages.FoldingRangeKind.Imports;case A.Region:return u.languages.FoldingRangeKind.Region}return}(e.kind)),t}))}))}};var Ct=class{constructor(e){this._worker=e}provideSelectionRanges(e,t,n){const r=e.uri;return this._worker(r).then((e=>e.getSelectionRanges(r.toString(),t.map(ut)))).then((e=>{if(e)return e.map((e=>{const t=[];for(;e;)t.push({range:ct(e.range)}),e=e.parent;return t}))}))}},It=class extends class{constructor(e,t){this._worker=e,this._triggerCharacters=t}get triggerCharacters(){return this._triggerCharacters}provideCompletionItems(e,t,n,r){const i=e.uri;return this._worker(i).then((e=>e.doComplete(i.toString(),ut(t)))).then((n=>{if(!n)return;const r=e.getWordUntilPosition(t),i=new u.Range(t.lineNumber,r.startColumn,t.lineNumber,r.endColumn),o=n.items.map((e=>{const t={label:e.label,insertText:e.insertText||e.label,sortText:e.sortText,filterText:e.filterText,documentation:e.documentation,detail:e.detail,command:(n=e.command,n&&"editor.action.triggerSuggest"===n.command?{id:n.command,title:n.title,arguments:n.arguments}:void 0),range:i,kind:dt(e.kind)};var n,r;return e.textEdit&&(void 0!==(r=e.textEdit).insert&&void 0!==r.replace?t.range={insert:ct(e.textEdit.insert),replace:ct(e.textEdit.replace)}:t.range=ct(e.textEdit.range),t.insertText=e.textEdit.newText),e.additionalTextEdits&&(t.additionalTextEdits=e.additionalTextEdits.map(gt)),e.insertTextFormat===we.Snippet&&(t.insertTextRules=u.languages.CompletionItemInsertTextRule.InsertAsSnippet),t}));return{isIncomplete:n.isIncomplete,suggestions:o}}))}}{constructor(e){super(e,[".",":","<",'"',"=","/"])}};function At(e){const t=new ie(e),n=(...e)=>t.getLanguageServiceWorker(...e);let r=e.languageId;u.languages.registerCompletionItemProvider(r,new It(n)),u.languages.registerHoverProvider(r,new lt(n)),u.languages.registerDocumentHighlightProvider(r,new pt(n)),u.languages.registerLinkProvider(r,new bt(n)),u.languages.registerFoldingRangeProvider(r,new xt(n)),u.languages.registerDocumentSymbolProvider(r,new wt(n)),u.languages.registerSelectionRangeProvider(r,new Ct(n)),u.languages.registerRenameProvider(r,new mt(n)),"html"===r&&(u.languages.registerDocumentFormattingEditProvider(r,new kt(n)),u.languages.registerDocumentRangeFormattingEditProvider(r,new yt(n)))}function Rt(e){const t=[],n=[],r=new ie(e);t.push(r);const i=(...e)=>r.getLanguageServiceWorker(...e);return function(){const{languageId:t,modeConfiguration:r}=e;Pt(n),r.completionItems&&n.push(u.languages.registerCompletionItemProvider(t,new It(i))),r.hovers&&n.push(u.languages.registerHoverProvider(t,new lt(i))),r.documentHighlights&&n.push(u.languages.registerDocumentHighlightProvider(t,new pt(i))),r.links&&n.push(u.languages.registerLinkProvider(t,new bt(i))),r.documentSymbols&&n.push(u.languages.registerDocumentSymbolProvider(t,new wt(i))),r.rename&&n.push(u.languages.registerRenameProvider(t,new mt(i))),r.foldingRanges&&n.push(u.languages.registerFoldingRangeProvider(t,new xt(i))),r.selectionRanges&&n.push(u.languages.registerSelectionRangeProvider(t,new Ct(i))),r.documentFormattingEdits&&n.push(u.languages.registerDocumentFormattingEditProvider(t,new kt(i))),r.documentRangeFormattingEdits&&n.push(u.languages.registerDocumentRangeFormattingEditProvider(t,new yt(i)))}(),t.push(St(n)),St(t)}function St(e){return{dispose:()=>Pt(e)}}function Pt(e){for(;e.length;)e.pop().dispose()}}}]); //# sourceMappingURL=865.6a351d4c8e1788389d2b.js.map