import{e as x,R as Me,l as v,a as T,U as Pe}from"./editor.main-DpNMXfyH.js";import"./index-DT8qTvyx.js";var Fe=2*60*1e3,je=function(){function n(t){var a=this;this._defaults=t,this._worker=null,this._idleCheckInterval=window.setInterval(function(){return a._checkIfIdle()},30*1e3),this._lastUsedTime=0,this._configChangeListener=this._defaults.onDidChange(function(){return a._stopWorker()})}return n.prototype._stopWorker=function(){this._worker&&(this._worker.dispose(),this._worker=null),this._client=null},n.prototype.dispose=function(){clearInterval(this._idleCheckInterval),this._configChangeListener.dispose(),this._stopWorker()},n.prototype._checkIfIdle=function(){if(this._worker){var t=Date.now()-this._lastUsedTime;t>Fe&&this._stopWorker()}},n.prototype._getClient=function(){return this._lastUsedTime=Date.now(),this._client||(this._worker=x.createWebWorker({moduleId:"vs/language/css/cssWorker",label:this._defaults.languageId,createData:{options:this._defaults.options,languageId:this._defaults.languageId}}),this._client=this._worker.getProxy()),this._client},n.prototype.getLanguageServiceWorker=function(){for(var t=this,a=[],r=0;r0&&(s.arguments=i),s}n.create=t;function a(r){var e=r;return u.defined(e)&&u.string(e.title)&&u.string(e.command)}n.is=a})(P||(P={}));var A;(function(n){function t(i,o){return{range:i,newText:o}}n.replace=t;function a(i,o){return{range:{start:i,end:i},newText:o}}n.insert=a;function r(i){return{range:i,newText:""}}n.del=r;function e(i){var o=i;return u.objectLiteral(o)&&u.string(o.newText)&&m.is(o.range)}n.is=e})(A||(A={}));var R;(function(n){function t(r,e,i){var o={label:r};return e!==void 0&&(o.needsConfirmation=e),i!==void 0&&(o.description=i),o}n.create=t;function a(r){var e=r;return e!==void 0&&u.objectLiteral(e)&&u.string(e.label)&&(u.boolean(e.needsConfirmation)||e.needsConfirmation===void 0)&&(u.string(e.description)||e.description===void 0)}n.is=a})(R||(R={}));var _;(function(n){function t(a){var r=a;return typeof r=="string"}n.is=t})(_||(_={}));var E;(function(n){function t(i,o,s){return{range:i,newText:o,annotationId:s}}n.replace=t;function a(i,o,s){return{range:{start:i,end:i},newText:o,annotationId:s}}n.insert=a;function r(i,o){return{range:i,newText:"",annotationId:o}}n.del=r;function e(i){var o=i;return A.is(o)&&(R.is(o.annotationId)||_.is(o.annotationId))}n.is=e})(E||(E={}));var V;(function(n){function t(r,e){return{textDocument:r,edits:e}}n.create=t;function a(r){var e=r;return u.defined(e)&&O.is(e.textDocument)&&Array.isArray(e.edits)}n.is=a})(V||(V={}));var L;(function(n){function t(r,e,i){var o={kind:"create",uri:r};return e!==void 0&&(e.overwrite!==void 0||e.ignoreIfExists!==void 0)&&(o.options=e),i!==void 0&&(o.annotationId=i),o}n.create=t;function a(r){var e=r;return e&&e.kind==="create"&&u.string(e.uri)&&(e.options===void 0||(e.options.overwrite===void 0||u.boolean(e.options.overwrite))&&(e.options.ignoreIfExists===void 0||u.boolean(e.options.ignoreIfExists)))&&(e.annotationId===void 0||_.is(e.annotationId))}n.is=a})(L||(L={}));var S;(function(n){function t(r,e,i,o){var s={kind:"rename",oldUri:r,newUri:e};return i!==void 0&&(i.overwrite!==void 0||i.ignoreIfExists!==void 0)&&(s.options=i),o!==void 0&&(s.annotationId=o),s}n.create=t;function a(r){var e=r;return e&&e.kind==="rename"&&u.string(e.oldUri)&&u.string(e.newUri)&&(e.options===void 0||(e.options.overwrite===void 0||u.boolean(e.options.overwrite))&&(e.options.ignoreIfExists===void 0||u.boolean(e.options.ignoreIfExists)))&&(e.annotationId===void 0||_.is(e.annotationId))}n.is=a})(S||(S={}));var F;(function(n){function t(r,e,i){var o={kind:"delete",uri:r};return e!==void 0&&(e.recursive!==void 0||e.ignoreIfNotExists!==void 0)&&(o.options=e),i!==void 0&&(o.annotationId=i),o}n.create=t;function a(r){var e=r;return e&&e.kind==="delete"&&u.string(e.uri)&&(e.options===void 0||(e.options.recursive===void 0||u.boolean(e.options.recursive))&&(e.options.ignoreIfNotExists===void 0||u.boolean(e.options.ignoreIfNotExists)))&&(e.annotationId===void 0||_.is(e.annotationId))}n.is=a})(F||(F={}));var q;(function(n){function t(a){var r=a;return r&&(r.changes!==void 0||r.documentChanges!==void 0)&&(r.documentChanges===void 0||r.documentChanges.every(function(e){return u.string(e.kind)?L.is(e)||S.is(e)||F.is(e):V.is(e)}))}n.is=t})(q||(q={}));var W=function(){function n(t,a){this.edits=t,this.changeAnnotations=a}return n.prototype.insert=function(t,a,r){var e,i;if(r===void 0?e=A.insert(t,a):_.is(r)?(i=r,e=E.insert(t,a,r)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(r),e=E.insert(t,a,i)),this.edits.push(e),i!==void 0)return i},n.prototype.replace=function(t,a,r){var e,i;if(r===void 0?e=A.replace(t,a):_.is(r)?(i=r,e=E.replace(t,a,r)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(r),e=E.replace(t,a,i)),this.edits.push(e),i!==void 0)return i},n.prototype.delete=function(t,a){var r,e;if(a===void 0?r=A.del(t):_.is(a)?(e=a,r=E.del(t,a)):(this.assertChangeAnnotations(this.changeAnnotations),e=this.changeAnnotations.manage(a),r=E.del(t,e)),this.edits.push(r),e!==void 0)return e},n.prototype.add=function(t){this.edits.push(t)},n.prototype.all=function(){return this.edits},n.prototype.clear=function(){this.edits.splice(0,this.edits.length)},n.prototype.assertChangeAnnotations=function(t){if(t===void 0)throw new Error("Text edit change is not configured to manage change annotations.")},n}(),ae=function(){function n(t){this._annotations=t===void 0?Object.create(null):t,this._counter=0,this._size=0}return n.prototype.all=function(){return this._annotations},Object.defineProperty(n.prototype,"size",{get:function(){return this._size},enumerable:!1,configurable:!0}),n.prototype.manage=function(t,a){var r;if(_.is(t)?r=t:(r=this.nextId(),a=t),this._annotations[r]!==void 0)throw new Error("Id "+r+" is already in use.");if(a===void 0)throw new Error("No annotation provided for id "+r);return this._annotations[r]=a,this._size++,r},n.prototype.nextId=function(){return this._counter++,this._counter.toString()},n}();(function(){function n(t){var a=this;this._textEditChanges=Object.create(null),t!==void 0?(this._workspaceEdit=t,t.documentChanges?(this._changeAnnotations=new ae(t.changeAnnotations),t.changeAnnotations=this._changeAnnotations.all(),t.documentChanges.forEach(function(r){if(V.is(r)){var e=new W(r.edits,a._changeAnnotations);a._textEditChanges[r.textDocument.uri]=e}})):t.changes&&Object.keys(t.changes).forEach(function(r){var e=new W(t.changes[r]);a._textEditChanges[r]=e})):this._workspaceEdit={}}return Object.defineProperty(n.prototype,"edit",{get:function(){return this.initDocumentChanges(),this._changeAnnotations!==void 0&&(this._changeAnnotations.size===0?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit},enumerable:!1,configurable:!0}),n.prototype.getTextEditChange=function(t){if(O.is(t)){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var a={uri:t.uri,version:t.version},r=this._textEditChanges[a.uri];if(!r){var e=[],i={textDocument:a,edits:e};this._workspaceEdit.documentChanges.push(i),r=new W(e,this._changeAnnotations),this._textEditChanges[a.uri]=r}return r}else{if(this.initChanges(),this._workspaceEdit.changes===void 0)throw new Error("Workspace edit is not configured for normal text edit changes.");var r=this._textEditChanges[t];if(!r){var e=[];this._workspaceEdit.changes[t]=e,r=new W(e),this._textEditChanges[t]=r}return r}},n.prototype.initDocumentChanges=function(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._changeAnnotations=new ae,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())},n.prototype.initChanges=function(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._workspaceEdit.changes=Object.create(null))},n.prototype.createFile=function(t,a,r){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var e;R.is(a)||_.is(a)?e=a:r=a;var i,o;if(e===void 0?i=L.create(t,r):(o=_.is(e)?e:this._changeAnnotations.manage(e),i=L.create(t,r,o)),this._workspaceEdit.documentChanges.push(i),o!==void 0)return o},n.prototype.renameFile=function(t,a,r,e){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var i;R.is(r)||_.is(r)?i=r:e=r;var o,s;if(i===void 0?o=S.create(t,a,e):(s=_.is(i)?i:this._changeAnnotations.manage(i),o=S.create(t,a,e,s)),this._workspaceEdit.documentChanges.push(o),s!==void 0)return s},n.prototype.deleteFile=function(t,a,r){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var e;R.is(a)||_.is(a)?e=a:r=a;var i,o;if(e===void 0?i=F.create(t,r):(o=_.is(e)?e:this._changeAnnotations.manage(e),i=F.create(t,r,o)),this._workspaceEdit.documentChanges.push(i),o!==void 0)return o},n})();var oe;(function(n){function t(r){return{uri:r}}n.create=t;function a(r){var e=r;return u.defined(e)&&u.string(e.uri)}n.is=a})(oe||(oe={}));var ue;(function(n){function t(r,e){return{uri:r,version:e}}n.create=t;function a(r){var e=r;return u.defined(e)&&u.string(e.uri)&&u.integer(e.version)}n.is=a})(ue||(ue={}));var O;(function(n){function t(r,e){return{uri:r,version:e}}n.create=t;function a(r){var e=r;return u.defined(e)&&u.string(e.uri)&&(e.version===null||u.integer(e.version))}n.is=a})(O||(O={}));var se;(function(n){function t(r,e,i,o){return{uri:r,languageId:e,version:i,text:o}}n.create=t;function a(r){var e=r;return u.defined(e)&&u.string(e.uri)&&u.string(e.languageId)&&u.integer(e.version)&&u.string(e.text)}n.is=a})(se||(se={}));var j;(function(n){n.PlainText="plaintext",n.Markdown="markdown"})(j||(j={}));(function(n){function t(a){var r=a;return r===n.PlainText||r===n.Markdown}n.is=t})(j||(j={}));var Q;(function(n){function t(a){var r=a;return u.objectLiteral(a)&&j.is(r.kind)&&u.string(r.value)}n.is=t})(Q||(Q={}));var l;(function(n){n.Text=1,n.Method=2,n.Function=3,n.Constructor=4,n.Field=5,n.Variable=6,n.Class=7,n.Interface=8,n.Module=9,n.Property=10,n.Unit=11,n.Value=12,n.Enum=13,n.Keyword=14,n.Snippet=15,n.Color=16,n.File=17,n.Reference=18,n.Folder=19,n.EnumMember=20,n.Constant=21,n.Struct=22,n.Event=23,n.Operator=24,n.TypeParameter=25})(l||(l={}));var G;(function(n){n.PlainText=1,n.Snippet=2})(G||(G={}));var ce;(function(n){n.Deprecated=1})(ce||(ce={}));var de;(function(n){function t(r,e,i){return{newText:r,insert:e,replace:i}}n.create=t;function a(r){var e=r;return e&&u.string(e.newText)&&m.is(e.insert)&&m.is(e.replace)}n.is=a})(de||(de={}));var fe;(function(n){n.asIs=1,n.adjustIndentation=2})(fe||(fe={}));var ge;(function(n){function t(a){return{label:a}}n.create=t})(ge||(ge={}));var le;(function(n){function t(a,r){return{items:a||[],isIncomplete:!!r}}n.create=t})(le||(le={}));var z;(function(n){function t(r){return r.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}n.fromPlainText=t;function a(r){var e=r;return u.string(e)||u.objectLiteral(e)&&u.string(e.language)&&u.string(e.value)}n.is=a})(z||(z={}));var he;(function(n){function t(a){var r=a;return!!r&&u.objectLiteral(r)&&(Q.is(r.contents)||z.is(r.contents)||u.typedArray(r.contents,z.is))&&(a.range===void 0||m.is(a.range))}n.is=t})(he||(he={}));var ve;(function(n){function t(a,r){return r?{label:a,documentation:r}:{label:a}}n.create=t})(ve||(ve={}));var pe;(function(n){function t(a,r){for(var e=[],i=2;i=0;f--){var p=c[f],b=i.offsetAt(p.range.start),d=i.offsetAt(p.range.end);if(d<=g)s=s.substring(0,b)+p.newText+s.substring(d,s.length);else throw new Error("Overlapping edit");g=b}return s}n.applyEdits=r;function e(i,o){if(i.length<=1)return i;var s=i.length/2|0,c=i.slice(0,s),g=i.slice(s);e(c,o),e(g,o);for(var f=0,p=0,b=0;f0&&t.push(a.length),this._lineOffsets=t}return this._lineOffsets},n.prototype.positionAt=function(t){t=Math.max(Math.min(t,this._content.length),0);var a=this.getLineOffsets(),r=0,e=a.length;if(e===0)return k.create(0,t);for(;rt?e=i:r=i+1}var o=r-1;return k.create(o,t-a[o])},n.prototype.offsetAt=function(t){var a=this.getLineOffsets();if(t.line>=a.length)return this._content.length;if(t.line<0)return 0;var r=a[t.line],e=t.line+1"u"}n.undefined=r;function e(d){return d===!0||d===!1}n.boolean=e;function i(d){return t.call(d)==="[object String]"}n.string=i;function o(d){return t.call(d)==="[object Number]"}n.number=o;function s(d,y,N){return t.call(d)==="[object Number]"&&y<=d&&d<=N}n.numberRange=s;function c(d){return t.call(d)==="[object Number]"&&-2147483648<=d&&d<=2147483647}n.integer=c;function g(d){return t.call(d)==="[object Number]"&&0<=d&&d<=2147483647}n.uinteger=g;function f(d){return t.call(d)==="[object Function]"}n.func=f;function p(d){return d!==null&&typeof d=="object"}n.objectLiteral=p;function b(d,y){return Array.isArray(d)&&d.every(y)}n.typedArray=b})(u||(u={}));var We=function(){function n(t,a,r){var e=this;this._languageId=t,this._worker=a,this._disposables=[],this._listener=Object.create(null);var i=function(s){var c=s.getLanguageId();if(c===e._languageId){var g;e._listener[s.uri.toString()]=s.onDidChangeContent(function(){window.clearTimeout(g),g=window.setTimeout(function(){return e._doValidate(s.uri,c)},500)}),e._doValidate(s.uri,c)}},o=function(s){x.setModelMarkers(s,e._languageId,[]);var c=s.uri.toString(),g=e._listener[c];g&&(g.dispose(),delete e._listener[c])};this._disposables.push(x.onDidCreateModel(i)),this._disposables.push(x.onWillDisposeModel(o)),this._disposables.push(x.onDidChangeModelLanguage(function(s){o(s.model),i(s.model)})),r.onDidChange(function(s){x.getModels().forEach(function(c){c.getLanguageId()===e._languageId&&(o(c),i(c))})}),this._disposables.push({dispose:function(){for(var s in e._listener)e._listener[s].dispose()}}),x.getModels().forEach(i)}return n.prototype.dispose=function(){this._disposables.forEach(function(t){return t&&t.dispose()}),this._disposables=[]},n.prototype._doValidate=function(t,a){this._worker(t).then(function(r){return r.doValidation(t.toString())}).then(function(r){var e=r.map(function(o){return He(t,o)}),i=x.getModel(t);i&&i.getLanguageId()===a&&x.setModelMarkers(i,a,e)}).then(void 0,function(r){console.error(r)})},n}();function Ue(n){switch(n){case I.Error:return T.Error;case I.Warning:return T.Warning;case I.Information:return T.Info;case I.Hint:return T.Hint;default:return T.Info}}function He(n,t){var a=typeof t.code=="number"?String(t.code):t.code;return{severity:Ue(t.severity),startLineNumber:t.range.start.line+1,startColumn:t.range.start.character+1,endLineNumber:t.range.end.line+1,endColumn:t.range.end.character+1,message:t.message,code:a,source:t.source}}function C(n){if(n)return{character:n.column-1,line:n.lineNumber-1}}function Ve(n){if(n)return{start:{line:n.startLineNumber-1,character:n.startColumn-1},end:{line:n.endLineNumber-1,character:n.endColumn-1}}}function w(n){if(n)return new Me(n.start.line+1,n.start.character+1,n.end.line+1,n.end.character+1)}function Oe(n){return typeof n.insert<"u"&&typeof n.replace<"u"}function ze(n){var t=v.CompletionItemKind;switch(n){case l.Text:return t.Text;case l.Method:return t.Method;case l.Function:return t.Function;case l.Constructor:return t.Constructor;case l.Field:return t.Field;case l.Variable:return t.Variable;case l.Class:return t.Class;case l.Interface:return t.Interface;case l.Module:return t.Module;case l.Property:return t.Property;case l.Unit:return t.Unit;case l.Value:return t.Value;case l.Enum:return t.Enum;case l.Keyword:return t.Keyword;case l.Snippet:return t.Snippet;case l.Color:return t.Color;case l.File:return t.File;case l.Reference:return t.Reference}return t.Property}function J(n){if(n)return{range:w(n.range),text:n.newText}}function Xe(n){return n&&n.command==="editor.action.triggerSuggest"?{id:n.command,title:n.title,arguments:n.arguments}:void 0}var $e=function(){function n(t){this._worker=t}return Object.defineProperty(n.prototype,"triggerCharacters",{get:function(){return["/","-",":"]},enumerable:!1,configurable:!0}),n.prototype.provideCompletionItems=function(t,a,r,e){var i=t.uri;return this._worker(i).then(function(o){return o.doComplete(i.toString(),C(a))}).then(function(o){if(o){var s=t.getWordUntilPosition(a),c=new Me(a.lineNumber,s.startColumn,a.lineNumber,s.endColumn),g=o.items.map(function(f){var p={label:f.label,insertText:f.insertText||f.label,sortText:f.sortText,filterText:f.filterText,documentation:f.documentation,detail:f.detail,command:Xe(f.command),range:c,kind:ze(f.kind)};return f.textEdit&&(Oe(f.textEdit)?p.range={insert:w(f.textEdit.insert),replace:w(f.textEdit.replace)}:p.range=w(f.textEdit.range),p.insertText=f.textEdit.newText),f.additionalTextEdits&&(p.additionalTextEdits=f.additionalTextEdits.map(J)),f.insertTextFormat===G.Snippet&&(p.insertTextRules=v.CompletionItemInsertTextRule.InsertAsSnippet),p});return{isIncomplete:o.isIncomplete,suggestions:g}}})},n}();function Be(n){return n&&typeof n=="object"&&typeof n.kind=="string"}function Te(n){return typeof n=="string"?{value:n}:Be(n)?n.kind==="plaintext"?{value:n.value.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}:{value:n.value}:{value:"```"+n.language+` `+n.value+"\n```\n"}}function qe(n){if(n)return Array.isArray(n)?n.map(Te):[Te(n)]}var Qe=function(){function n(t){this._worker=t}return n.prototype.provideHover=function(t,a,r){var e=t.uri;return this._worker(e).then(function(i){return i.doHover(e.toString(),C(a))}).then(function(i){if(i)return{range:w(i.range),contents:qe(i.contents)}})},n}();function Ge(n){switch(n){case M.Read:return v.DocumentHighlightKind.Read;case M.Write:return v.DocumentHighlightKind.Write;case M.Text:return v.DocumentHighlightKind.Text}return v.DocumentHighlightKind.Text}var Je=function(){function n(t){this._worker=t}return n.prototype.provideDocumentHighlights=function(t,a,r){var e=t.uri;return this._worker(e).then(function(i){return i.findDocumentHighlights(e.toString(),C(a))}).then(function(i){if(i)return i.map(function(o){return{range:w(o.range),kind:Ge(o.kind)}})})},n}();function Le(n){return{uri:Pe.parse(n.uri),range:w(n.range)}}var Ye=function(){function n(t){this._worker=t}return n.prototype.provideDefinition=function(t,a,r){var e=t.uri;return this._worker(e).then(function(i){return i.findDefinition(e.toString(),C(a))}).then(function(i){if(i)return[Le(i)]})},n}(),Ze=function(){function n(t){this._worker=t}return n.prototype.provideReferences=function(t,a,r,e){var i=t.uri;return this._worker(i).then(function(o){return o.findReferences(i.toString(),C(a))}).then(function(o){if(o)return o.map(Le)})},n}();function Ke(n){if(!(!n||!n.changes)){var t=[];for(var a in n.changes)for(var r=Pe.parse(a),e=0,i=n.changes[a];e