You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

7 lines
26 KiB

5 years ago
/*!-----------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* monaco-css version: 2.2.0(ce1fb4aab797eaa8f5071c77302f7bb72bcb22ea)
* Released under the MIT license
* https://github.com/Microsoft/monaco-css/blob/master/LICENSE.md
*-----------------------------------------------------------------------------*/
define("vs/language/css/workerManager",["require","exports"],function(e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var s=monaco.Promise,t=function(){function e(e){var n=this;this._defaults=e,this._worker=null,this._idleCheckInterval=setInterval(function(){return n._checkIfIdle()},3e4),this._lastUsedTime=0,this._configChangeListener=this._defaults.onDidChange(function(){return n._stopWorker()})}return e.prototype._stopWorker=function(){this._worker&&(this._worker.dispose(),this._worker=null),this._client=null},e.prototype.dispose=function(){clearInterval(this._idleCheckInterval),this._configChangeListener.dispose(),this._stopWorker()},e.prototype._checkIfIdle=function(){this._worker&&(12e4<Date.now()-this._lastUsedTime&&this._stopWorker())},e.prototype._getClient=function(){return this._lastUsedTime=Date.now(),this._client||(this._worker=monaco.editor.createWebWorker({moduleId:"vs/language/css/cssWorker",label:this._defaults.languageId,createData:{languageSettings:this._defaults.diagnosticsOptions,languageId:this._defaults.languageId}}),this._client=this._worker.getProxy()),this._client},e.prototype.getLanguageServiceWorker=function(){for(var n,e,t,r,i,o=this,a=[],u=0;u<arguments.length;u++)a[u]=arguments[u];return e=this._getClient().then(function(e){n=e}).then(function(e){return o._worker.withSyncedResources(a)}).then(function(e){return n}),i=new s(function(e,n){t=e,r=n},function(){}),e.then(t,r),i},e}();n.WorkerManager=t}),function(e){if("object"==typeof module&&"object"==typeof module.exports){var n=e(require,exports);void 0!==n&&(module.exports=n)}else"function"==typeof define&&define.amd&&define("vscode-languageserver-types/main",["require","exports"],e)}(function(e,n){"use strict";var a,t,r,i,o,u,s,c,d,l,g,f,m,p,h,v,y,b,C,_,k,x,I,w;Object.defineProperty(n,"__esModule",{value:!0}),(t=a=n.Position||(n.Position={})).create=function(e,n){return{line:e,character:n}},t.is=function(e){var n=e;return Z.objectLiteral(n)&&Z.number(n.line)&&Z.number(n.character)},(i=r=n.Range||(n.Range={})).create=function(e,n,t,r){if(Z.number(e)&&Z.number(n)&&Z.number(t)&&Z.number(r))return{start:a.create(e,n),end:a.create(t,r)};if(a.is(e)&&a.is(n))return{start:e,end:n};throw new Error("Range#create called with invalid arguments["+e+", "+n+", "+t+", "+r+"]")},i.is=function(e){var n=e;return Z.objectLiteral(n)&&a.is(n.start)&&a.is(n.end)},(u=o=n.Location||(n.Location={})).create=function(e,n){return{uri:e,range:n}},u.is=function(e){var n=e;return Z.defined(n)&&r.is(n.range)&&(Z.string(n.uri)||Z.undefined(n.uri))},(c=s=n.Color||(n.Color={})).create=function(e,n,t,r){return{red:e,green:n,blue:t,alpha:r}},c.is=function(e){var n=e;return Z.number(n.red)&&Z.number(n.green)&&Z.number(n.blue)&&Z.number(n.alpha)},(d=n.ColorInformation||(n.ColorInformation={})).create=function(e,n){return{range:e,color:n}},d.is=function(e){var n=e;return r.is(n.range)&&s.is(n.color)},(l=n.ColorPresentation||(n.ColorPresentation={})).create=function(e,n,t){return{label:e,textEdit:n,additionalTextEdits:t}},l.is=function(e){var n=e;return Z.string(n.label)&&(Z.undefined(n.textEdit)||_.is(n))&&(Z.undefined(n.additionalTextEdits)||Z.typedArray(n.additionalTextEdits,_.is))},(g=n.FoldingRangeKind||(n.FoldingRangeKind={})).Comment="comment",g.Imports="imports",g.Region="region",(f=n.FoldingRange||(n.FoldingRange={})).create=function(e,n,t,r,i){var o={startLine:e,endLine:n};return Z.defined(t)&&(o.startCharacter=t),Z.defined(r)&&(o.endCharacter=r),Z.defined(i)&&(o.kind=i),o},f.is=function(e){var n=e;return Z.number(n.startLine)&&Z.number(n.startLine)&&(Z.undefined(n.startCharacter)||Z.number(n.startCharacter))&&(Z.undefined(n.endCharacter)||Z.number(n.endCharacter))&&(Z.undefined(n.kind)||Z.string(n.kind))},(p=m=n.DiagnosticRelatedInformation||(n.DiagnosticRelatedInformation={})).create=function(e,n){return{location:e,message:n}},p.is=function(e){var n=e;return Z.defined(n)&&o.is(n.location)&&Z.string(n.message)},(h=n.DiagnosticSeverity||(n.DiagnosticSeverity={})).Error=1,h.Warning=2,h.Information=3,h.Hint=4,(y=v=n.Diagnostic||(n.Diagnostic={})).create=f