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.
1 line
23 KiB
1 line
23 KiB
webpackJsonp([169],{3318:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setupMode=function(e){function t(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return r.getLanguageServiceWorker.apply(r,[e].concat(t))}var r=new i.a(e),n=e.languageId;monaco.languages.registerCompletionItemProvider(n,new o.a(t)),monaco.languages.registerHoverProvider(n,new o.h(t)),monaco.languages.registerDocumentHighlightProvider(n,new o.e(t)),monaco.languages.registerDefinitionProvider(n,new o.b(t)),monaco.languages.registerReferenceProvider(n,new o.i(t)),monaco.languages.registerDocumentSymbolProvider(n,new o.f(t)),monaco.languages.registerRenameProvider(n,new o.j(t)),monaco.languages.registerColorProvider(n,new o.d(t)),monaco.languages.registerFoldingRangeProvider(n,new o.g(t)),new o.c(n,t,e)};var i=n(3319),o=n(3320)},3319:function(e,t,n){"use strict";n.d(t,"a",function(){return r});var r=(i.prototype._stopWorker=function(){this._worker&&(this._worker.dispose(),this._worker=null),this._client=null},i.prototype.dispose=function(){clearInterval(this._idleCheckInterval),this._configChangeListener.dispose(),this._stopWorker()},i.prototype._checkIfIdle=function(){this._worker&&12e4<Date.now()-this._lastUsedTime&&this._stopWorker()},i.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},i.prototype.getLanguageServiceWorker=function(){for(var t,n=this,r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];return this._getClient().then(function(e){t=e}).then(function(e){return n._worker.withSyncedResources(r)}).then(function(e){return t})},i);function i(e){var t=this;this._defaults=e,this._worker=null,this._idleCheckInterval=setInterval(function(){return t._checkIfIdle()},3e4),this._lastUsedTime=0,this._configChangeListener=this._defaults.onDidChange(function(){return t._stopWorker()})}},3320:function(e,t,n){"use strict";n.d(t,"c",function(){return r}),n.d(t,"a",function(){return d}),n.d(t,"h",function(){return g}),n.d(t,"e",function(){return p}),n.d(t,"b",function(){return b}),n.d(t,"i",function(){return y}),n.d(t,"j",function(){return w}),n.d(t,"f",function(){return C}),n.d(t,"d",function(){return I}),n.d(t,"g",function(){return S});var o=n(3321),u=monaco.Uri,r=(i.prototype.dispose=function(){this._disposables.forEach(function(e){return e&&e.dispose()}),this._disposables=[]},i.prototype._doValidate=function(r,i){this._worker(r).then(function(e){return e.doValidation(r.toString())}).then(function(e){var t=e.map(function(e){return n="number"==typeof(t=e).code?String(t.code):t.code,{severity:function(e){switch(e){case o.b.Error:return monaco.MarkerSeverity.Error;case o.b.Warning:return monaco.MarkerSeverity.Warning;case o.b.Information:return monaco.MarkerSeverity.Info;case o.b.Hint:return monaco.MarkerSeverity.Hint;default:return monaco.MarkerSeverity.Info}}(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:n,source:t.source};var t,n}),n=monaco.editor.getModel(r);n.getModeId()===i&&monaco.editor.setModelMarkers(n,i,t)}).then(void 0,function(e){console.error(e)})},i);function i(e,t,n){var r=this;this._languageId=e,this._worker=t,this._disposables=[],this._listener=Object.create(null);function i(e){var t,n=e.getModeId();n===r._languageId&&(r._listener[e.uri.toString()]=e.onDidChangeContent(function(){clearTimeout(t),t=setTimeout(function(){return r._doValidate(e.uri,n)},500)}),r._doValidate(e.uri,n))}function o(e){monaco.editor.setModelMarkers(e,r._languageId,[]);var t=e.uri.toString(),n=r._listener[t];n&&(n.dispose(),delete r._listener[t])}this._disposables.push(monaco.editor.onDidCreateModel(i)),this._disposables.push(monaco.editor.onWillDisposeModel(o)),this._disposables.push(monaco.editor.onDidChangeModelLanguage(function(e){o(e.model),i(e.model)})),n.onDidChange(function(e){monaco.editor.getModels().forEach(function(e){e.getModeId()===r._languageId&&(o(e),i(e))})}),this._disposables.push({dispose:function(){for(var e in r._listener)r._listener[e].dispose()}}),monaco.editor.getModels().forEach(i)}function a(e){if(e)return{character:e.column-1,line:e.lineNumber-1}}function s(e){if(e)return new monaco.Range(e.start.line+1,e.start.character+1,e.end.line+1,e.end.character+1)}function c(e){if(e)return{range:s(e.range),text:e.newText}}var d=(Object.defineProperty(f.prototype,"triggerCharacters",{get:function(){return[" ",":"]},enumerable:!0,configurable:!0}),f.prototype.provideCompletionItems=function(e,t,n,r){e.getWordUntilPosition(t);var i=e.uri;return this._worker(i).then(function(e){return e.doComplete(i.toString(),a(t))}).then(function(e){if(e){var t=e.items.map(function(e){var t={label:e.label,insertText:e.insertText||e.label,sortText:e.sortText,filterText:e.filterText,documentation:e.documentation,detail:e.detail,kind:function(e){var t=monaco.languages.CompletionItemKind;switch(e){case o.a.Text:return t.Text;case o.a.Method:return t.Method;case o.a.Function:return t.Function;case o.a.Constructor:return t.Constructor;case o.a.Field:return t.Field;case o.a.Variable:return t.Variable;case o.a.Class:return t.Class;case o.a.Interface:return t.Interface;case o.a.Module:return t.Module;case o.a.Property:return t.Property;case o.a.Unit:return t.Unit;case o.a.Value:return t.Value;case o.a.Enum:return t.Enum;case o.a.Keyword:return t.Keyword;case o.a.Snippet:return t.Snippet;case o.a.Color:return t.Color;case o.a.File:return t.File;case o.a.Reference:return t.Reference}return t.Property}(e.kind)};return e.textEdit&&(t.range=s(e.textEdit.range),t.insertText=e.textEdit.newText),e.additionalTextEdits&&(t.additionalTextEdits=e.additionalTextEdits.map(c)),e.insertTextFormat===o.e.Snippet&&(t.insertTextRules=monaco.languages.CompletionItemInsertTextRule.InsertAsSnippet),t});return{isIncomplete:e.isIncomplete,suggestions:t}}})},f);function f(e){this._worker=e}function l(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}var g=(h.prototype.provideHover=function(e,t,n){var r=e.uri;return this._worker(r).then(function(e){return e.doHover(r.toString(),a(t))}).then(function(e){if(e)return{range:s(e.range),contents:function(e){if(e)return Array.isArray(e)?e.map(l):[l(e)]}(e.contents)}})},h);function h(e){this._worker=e}var p=(m.prototype.provideDocumentHighlights=function(e,t,n){var r=e.uri;return this._worker(r).then(function(e){return e.findDocumentHighlights(r.toString(),a(t))}).then(function(e){if(e)return e.map(function(e){return{range:s(e.range),kind:function(e){switch(e){case o.c.Read:return monaco.languages.DocumentHighlightKind.Read;case o.c.Write:return monaco.languages.DocumentHighlightKind.Write;case o.c.Text:return monaco.languages.DocumentHighlightKind.Text}return monaco.languages.DocumentHighlightKind.Text}(e.kind)}})})},m);function m(e){this._worker=e}function v(e){return{uri:u.parse(e.uri),range:s(e.range)}}var b=(_.prototype.provideDefinition=function(e,t,n){var r=e.uri;return this._worker(r).then(function(e){return e.findDefinition(r.toString(),a(t))}).then(function(e){if(e)return[v(e)]})},_);function _(e){this._worker=e}var y=(k.prototype.provideReferences=function(e,t,n,r){var i=e.uri;return this._worker(i).then(function(e){return e.findReferences(i.toString(),a(t))}).then(function(e){if(e)return e.map(v)})},k);function k(e){this._worker=e}var w=(x.prototype.provideRenameEdits=function(e,t,n,r){var i=e.uri;return this._worker(i).then(function(e){return e.doRename(i.toString(),a(t),n)}).then(function(e){return function(e){if(e&&e.changes){var t=[];for(var n in e.changes){for(var r=[],i=0,o=e.changes[n];i<o.length;i++){var a=o[i];r.push({range:s(a.range),text:a.newText})}t.push({resource:u.parse(n),edits:r})}return{edits:t}}}(e)})},x);function x(e){this._worker=e}var C=(E.prototype.provideDocumentSymbols=function(e,t){var n=e.uri;return this._worker(n).then(function(e){return e.findDocumentSymbols(n.toString())}).then(function(e){if(e)return e.map(function(e){return{name:e.name,detail:"",containerName:e.containerName,kind:function(e){var t=monaco.languages.SymbolKind;switch(e){case o.f.File:return t.Array;case o.f.Module:return t.Module;case o.f.Namespace:return t.Namespace;case o.f.Package:return t.Package;case o.f.Class:return t.Class;case o.f.Method:return t.Method;case o.f.Property:return t.Property;case o.f.Field:return t.Field;case o.f.Constructor:return t.Constructor;case o.f.Enum:return t.Enum;case o.f.Interface:return t.Interface;case o.f.Function:return t.Function;case o.f.Variable:return t.Variable;case o.f.Constant:return t.Constant;case o.f.String:return t.String;case o.f.Number:return t.Number;case o.f.Boolean:return t.Boolean;case o.f.Array:return t.Array}return t.Function}(e.kind),range:s(e.location.range),selectionRange:s(e.location.range)}})})},E);function E(e){this._worker=e}var I=(T.prototype.provideDocumentColors=function(e,t){var n=e.uri;return this._worker(n).then(function(e){return e.findDocumentColors(n.toString())}).then(function(e){if(e)return e.map(function(e){return{color:e.color,range:s(e.range)}})})},T.prototype.provideColorPresentations=function(e,t,n){var r=e.uri;return this._worker(r).then(function(e){return e.getColorPresentations(r.toString(),t.color,function(e){if(e)return{start:{line:e.startLineNumber-1,character:e.startColumn-1},end:{line:e.endLineNumber-1,character:e.endColumn-1}}}(t.range))}).then(function(e){if(e)return e.map(function(e){var t={label:e.label};return e.textEdit&&(t.textEdit=c(e.textEdit)),e.additionalTextEdits&&(t.additionalTextEdits=e.additionalTextEdits.map(c)),t})})},T);function T(e){this._worker=e}var S=(M.prototype.provideFoldingRanges=function(e,t,n){var r=e.uri;return this._worker(r).then(function(e){return e.provideFoldingRanges(r.toString(),t)}).then(function(e){if(e)return e.map(function(e){var t={start:e.startLine+1,end:e.endLine+1};return void 0!==e.kind&&(t.kind=function(e){switch(e){case o.d.Comment:return monaco.languages.FoldingRangeKind.Comment;case o.d.Imports:return monaco.languages.FoldingRangeKind.Imports;case o.d.Region:return monaco.languages.FoldingRangeKind.Region}}(e.kind)),t})})},M);function M(e){this._worker=e}},3321:function(e,t,n){"use strict";var a,r,i,o,u,s,c,d,f,l,g,h,p,m,v,b,_,y,k,w,x,C,E,I,T,S,M,P,R;n.d(t,"d",function(){return p}),n.d(t,"b",function(){return k}),n.d(t,"a",function(){return z}),n.d(t,"e",function(){return $}),n.d(t,"c",function(){return te}),n.d(t,"f",function(){return ie}),(r=a=a||{}).create=function(e,t){return{line:e,character:t}},r.is=function(e){var t=e;return Ie.objectLiteral(t)&&Ie.number(t.line)&&Ie.number(t.character)},(o=i=i||{}).create=function(e,t,n,r){if(Ie.number(e)&&Ie.number(t)&&Ie.number(n)&&Ie.number(r))return{start:a.create(e,t),end:a.create(n,r)};if(a.is(e)&&a.is(t))return{start:e,end:t};throw new Error("Range#create called with invalid arguments["+e+", "+t+", "+n+", "+r+"]")},o.is=function(e){var t=e;return Ie.objectLiteral(t)&&a.is(t.start)&&a.is(t.end)},(s=u=u||{}).create=function(e,t){return{uri:e,range:t}},s.is=function(e){var t=e;return Ie.defined(t)&&i.is(t.range)&&(Ie.string(t.uri)||Ie.undefined(t.uri))},(d=c=c||{}).create=function(e,t,n,r){return{red:e,green:t,blue:n,alpha:r}},d.is=function(e){var t=e;return Ie.number(t.red)&&Ie.number(t.green)&&Ie.number(t.blue)&&Ie.number(t.alpha)},(l=f=f||{}).create=function(e,t){return{range:e,color:t}},l.is=function(e){var t=e;return i.is(t.range)&&c.is(t.color)},(h=g=g||{}).create=function(e,t,n){return{label:e,textEdit:t,additionalTextEdits:n}},h.is=function(e){var t=e;return Ie.string(t.label)&&(Ie.undefined(t.textEdit)||T.is(t))&&(Ie.undefined(t.additionalTextEdits)||Ie.typedArray(t.additionalTextEdits,T.is))},(m=p=p||{}).Comment="comment",m.Imports="imports",m.Region="region",(b=v=v||{}).create=function(e,t,n,r,i){var o={startLine:e,endLine:t};return Ie.defined(n)&&(o.startCharacter=n),Ie.defined(r)&&(o.endCharacter=r),Ie.defined(i)&&(o.kind=i),o},b.is=function(e){var t=e;return Ie.number(t.startLine)&&Ie.number(t.startLine)&&(Ie.undefined(t.startCharacter)||Ie.number(t.startCharacter))&&(Ie.undefined(t.endCharacter)||Ie.number(t.endCharacter))&&(Ie.undefined(t.kind)||Ie.string(t.kind))},(y=_=_||{}).create=function(e,t){return{location:e,message:t}},y.is=function(e){var t=e;return Ie.defined(t)&&u.is(t.location)&&Ie.string(t.message)},(w=k=k||{}).Error=1,w.Warning=2,w.Information=3,w.Hint=4,(C=x=x||{}).create=function(e,t,n,r,i,o){var a={range:e,message:t};return Ie.defined(n)&&(a.severity=n),Ie.defined(r)&&(a.code=r),Ie.defined(i)&&(a.source=i),Ie.defined(o)&&(a.relatedInformation=o),a},C.is=function(e){var t=e;return Ie.defined(t)&&i.is(t.range)&&Ie.string(t.message)&&(Ie.number(t.severity)||Ie.undefined(t.severity))&&(Ie.number(t.code)||Ie.string(t.code)||Ie.undefined(t.code))&&(Ie.string(t.source)||Ie.undefined(t.source))&&(Ie.undefined(t.relatedInformation)||Ie.typedArray(t.relatedInformation,_.is))},(I=E=E||{}).create=function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i={title:e,command:t};return Ie.defined(n)&&0<n.length&&(i.arguments=n),i},I.is=function(e){var t=e;return Ie.defined(t)&&Ie.string(t.title)&&Ie.string(t.command)},(S=T=T||{}).replace=function(e,t){return{range:e,newText:t}},S.insert=function(e,t){return{range:{start:e,end:e},newText:t}},S.del=function(e){return{range:e,newText:""}},S.is=function(e){var t=e;return Ie.objectLiteral(t)&&Ie.string(t.newText)&&i.is(t.range)},(P=M=M||{}).create=function(e,t){return{textDocument:e,edits:t}},P.is=function(e){var t=e;return Ie.defined(t)&&j.is(t.textDocument)&&Array.isArray(t.edits)},(R||(R={})).is=function(e){var t=e;return t&&(void 0!==t.changes||void 0!==t.documentChanges)&&(void 0===t.documentChanges||Ie.typedArray(t.documentChanges,M.is))};var A=(D.prototype.insert=function(e,t){this.edits.push(T.insert(e,t))},D.prototype.replace=function(e,t){this.edits.push(T.replace(e,t))},D.prototype.delete=function(e){this.edits.push(T.del(e))},D.prototype.add=function(e){this.edits.push(e)},D.prototype.all=function(){return this.edits},D.prototype.clear=function(){this.edits.splice(0,this.edits.length)},D);function D(e){this.edits=e}var F,O,j,L,W,N,H,K,V,U,z,B,$,q,J,Q,G,X,Y,Z,ee,te,ne,re,ie,oe,ae;Object.defineProperty(ue.prototype,"edit",{get:function(){return this._workspaceEdit},enumerable:!0,configurable:!0}),ue.prototype.getTextEditChange=function(e){if(j.is(e)){if(this._workspaceEdit||(this._workspaceEdit={documentChanges:[]}),!this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for versioned document changes.");var t=e;if(!(r=this._textEditChanges[t.uri])){var n={textDocument:t,edits:i=[]};this._workspaceEdit.documentChanges.push(n),r=new A(i),this._textEditChanges[t.uri]=r}return r}if(this._workspaceEdit||(this._workspaceEdit={changes:Object.create(null)}),!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 A(i),this._textEditChanges[e]=r}return r};function ue(n){var r=this;this._textEditChanges=Object.create(null),n&&((this._workspaceEdit=n).documentChanges?n.documentChanges.forEach(function(e){var t=new A(e.edits);r._textEditChanges[e.textDocument.uri]=t}):n.changes&&Object.keys(n.changes).forEach(function(e){var t=new A(n.changes[e]);r._textEditChanges[e]=t}))}(O=F=F||{}).create=function(e){return{uri:e}},O.is=function(e){var t=e;return Ie.defined(t)&&Ie.string(t.uri)},(L=j=j||{}).create=function(e,t){return{uri:e,version:t}},L.is=function(e){var t=e;return Ie.defined(t)&&Ie.string(t.uri)&&Ie.number(t.version)},(N=W=W||{}).create=function(e,t,n,r){return{uri:e,languageId:t,version:n,text:r}},N.is=function(e){var t=e;return Ie.defined(t)&&Ie.string(t.uri)&&Ie.string(t.languageId)&&Ie.number(t.version)&&Ie.string(t.text)},(K=H=H||{}).PlainText="plaintext",K.Markdown="markdown",(V=H=H||{}).is=function(e){var t=e;return t===V.PlainText||t===V.Markdown},(U||(U={})).is=function(e){var t=e;return Ie.objectLiteral(e)&&H.is(t.kind)&&Ie.string(t.value)},(B=z=z||{}).Text=1,B.Method=2,B.Function=3,B.Constructor=4,B.Field=5,B.Variable=6,B.Class=7,B.Interface=8,B.Module=9,B.Property=10,B.Unit=11,B.Value=12,B.Enum=13,B.Keyword=14,B.Snippet=15,B.Color=16,B.File=17,B.Reference=18,B.Folder=19,B.EnumMember=20,B.Constant=21,B.Struct=22,B.Event=23,B.Operator=24,B.TypeParameter=25,(q=$=$||{}).PlainText=1,q.Snippet=2,(J||(J={})).create=function(e){return{label:e}},(Q||(Q={})).create=function(e,t){return{items:e||[],isIncomplete:!!t}},(X=G=G||{}).fromPlainText=function(e){return e.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")},X.is=function(e){var t=e;return Ie.string(t)||Ie.objectLiteral(t)&&Ie.string(t.language)&&Ie.string(t.value)},(Y||(Y={})).is=function(e){var t=e;return Ie.objectLiteral(t)&&(U.is(t.contents)||G.is(t.contents)||Ie.typedArray(t.contents,G.is))&&(void 0===e.range||i.is(e.range))},(Z||(Z={})).create=function(e,t){return t?{label:e,documentation:t}:{label:e}},(ee||(ee={})).create=function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i={label:e};return Ie.defined(t)&&(i.documentation=t),Ie.defined(n)?i.parameters=n:i.parameters=[],i},(ne=te=te||{}).Text=1,ne.Read=2,ne.Write=3,(re||(re={})).create=function(e,t){var n={range:e};return Ie.number(t)&&(n.kind=t),n},(oe=ie=ie||{}).File=1,oe.Module=2,oe.Namespace=3,oe.Package=4,oe.Class=5,oe.Method=6,oe.Property=7,oe.Field=8,oe.Constructor=9,oe.Enum=10,oe.Interface=11,oe.Function=12,oe.Variable=13,oe.Constant=14,oe.String=15,oe.Number=16,oe.Boolean=17,oe.Array=18,oe.Object=19,oe.Key=20,oe.Null=21,oe.EnumMember=22,oe.Struct=23,oe.Event=24,oe.Operator=25,oe.TypeParameter=26,(ae||(ae={})).create=function(e,t,n,r,i){var o={name:e,kind:t,location:{uri:r,range:n}};return i&&(o.containerName=i),o};var se,ce,de,fe,le,ge,he,pe,me,ve,be,_e=function(){};(se=_e=_e||{}).create=function(e,t,n,r,i,o){var a={name:e,detail:t,kind:n,range:r,selectionRange:i};return void 0!==o&&(a.children=o),a},se.is=function(e){var t=e;return t&&Ie.string(t.name)&&Ie.string(t.detail)&&Ie.number(t.kind)&&i.is(t.range)&&i.is(t.selectionRange)&&(void 0===t.deprecated||Ie.boolean(t.deprecated))&&(void 0===t.children||Array.isArray(t.children))},(de=ce=ce||{}).QuickFix="quickfix",de.Refactor="refactor",de.RefactorExtract="refactor.extract",de.RefactorInline="refactor.inline",de.RefactorRewrite="refactor.rewrite",de.Source="source",de.SourceOrganizeImports="source.organizeImports",(le=fe=fe||{}).create=function(e,t){var n={diagnostics:e};return null!=t&&(n.only=t),n},le.is=function(e){var t=e;return Ie.defined(t)&&Ie.typedArray(t.diagnostics,x.is)&&(void 0===t.only||Ie.typedArray(t.only,Ie.string))},(he=ge=ge||{}).create=function(e,t,n){var r={title:e};return E.is(t)?r.command=t:r.edit=t,void 0!==n&&(r.kind=n),r},he.is=function(e){var t=e;return t&&Ie.string(t.title)&&(void 0===t.diagnostics||Ie.typedArray(t.diagnostics,x.is))&&(void 0===t.kind||Ie.string(t.kind))&&(void 0!==t.edit||void 0!==t.command)&&(void 0===t.command||E.is(t.command))&&(void 0===t.edit||R.is(t.edit))},(me=pe=pe||{}).create=function(e,t){var n={range:e};return Ie.defined(t)&&(n.data=t),n},me.is=function(e){var t=e;return Ie.defined(t)&&i.is(t.range)&&(Ie.undefined(t.command)||E.is(t.command))},(be=ve=ve||{}).create=function(e,t){return{tabSize:e,insertSpaces:t}},be.is=function(e){var t=e;return Ie.defined(t)&&Ie.number(t.tabSize)&&Ie.boolean(t.insertSpaces)};var ye,ke=function(){};(ye=ke=ke||{}).create=function(e,t,n){return{range:e,target:t,data:n}},ye.is=function(e){var t=e;return Ie.defined(t)&&i.is(t.range)&&(Ie.undefined(t.target)||Ie.string(t.target))};var we,xe,Ce,Ee;(xe=we=we||{}).create=function(e,t,n,r){return new Me(e,t,n,r)},xe.is=function(e){var t=e;return!!(Ie.defined(t)&&Ie.string(t.uri)&&(Ie.undefined(t.languageId)||Ie.string(t.languageId))&&Ie.number(t.lineCount)&&Ie.func(t.getText)&&Ie.func(t.positionAt)&&Ie.func(t.offsetAt))},xe.applyEdits=function(e,t){for(var n=e.getText(),r=function e(t,n){if(t.length<=1)return t;var r=t.length/2|0;var i=t.slice(0,r);var o=t.slice(r);e(i,n);e(o,n);var a=0;var u=0;var s=0;for(;a<i.length&&u<o.length;){var c=n(i[a],o[u]);t[s++]=c<=0?i[a++]:o[u++]}for(;a<i.length;)t[s++]=i[a++];for(;u<o.length;)t[s++]=o[u++];return t}(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,o=r.length-1;0<=o;o--){var a=r[o],u=e.offsetAt(a.range.start),s=e.offsetAt(a.range.end);if(!(s<=i))throw new Error("Ovelapping edit");n=n.substring(0,u)+a.newText+n.substring(s,n.length),i=u}return n},(Ee=Ce=Ce||{}).Manual=1,Ee.AfterDelay=2,Ee.FocusOut=3;var Ie,Te,Se,Me=(Object.defineProperty(Pe.prototype,"uri",{get:function(){return this._uri},enumerable:!0,configurable:!0}),Object.defineProperty(Pe.prototype,"languageId",{get:function(){return this._languageId},enumerable:!0,configurable:!0}),Object.defineProperty(Pe.prototype,"version",{get:function(){return this._version},enumerable:!0,configurable:!0}),Pe.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},Pe.prototype.update=function(e,t){this._content=e.text,this._version=t,this._lineOffsets=null},Pe.prototype.getLineOffsets=function(){if(null===this._lineOffsets){for(var e=[],t=this._content,n=!0,r=0;r<t.length;r++){n&&(e.push(r),n=!1);var i=t.charAt(r);n="\r"===i||"\n"===i,"\r"===i&&r+1<t.length&&"\n"===t.charAt(r+1)&&r++}n&&0<t.length&&e.push(t.length),this._lineOffsets=e}return this._lineOffsets},Pe.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 a.create(0,e);for(;n<r;){var i=Math.floor((n+r)/2);t[i]>e?r=i:n=i+1}var o=n-1;return a.create(o,e-t[o])},Pe.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+1<t.length?t[e.line+1]:this._content.length;return Math.max(Math.min(n+e.character,r),n)},Object.defineProperty(Pe.prototype,"lineCount",{get:function(){return this.getLineOffsets().length},enumerable:!0,configurable:!0}),Pe);function Pe(e,t,n,r){this._uri=e,this._languageId=t,this._version=n,this._content=r,this._lineOffsets=null}Te=Ie=Ie||{},Se=Object.prototype.toString,Te.defined=function(e){return void 0!==e},Te.undefined=function(e){return void 0===e},Te.boolean=function(e){return!0===e||!1===e},Te.string=function(e){return"[object String]"===Se.call(e)},Te.number=function(e){return"[object Number]"===Se.call(e)},Te.func=function(e){return"[object Function]"===Se.call(e)},Te.objectLiteral=function(e){return null!==e&&"object"==typeof e},Te.typedArray=function(e,t){return Array.isArray(e)&&e.every(t)}}}); |