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.
p6tsc84h5/static/js/178.7d33033f.chunk.js

1 line
15 KiB

webpackJsonp([178],{3531:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setupTypeScript=function(e){o=s(e,"typescript")},t.setupJavaScript=function(e){r=s(e,"javascript")},t.getJavaScriptWorker=function(){return new monaco.Promise(function(e,t){if(!r)return t("JavaScript not registered!");e(r)})},t.getTypeScriptWorker=function(){return new monaco.Promise(function(e,t){if(!o)return t("TypeScript not registered!");e(o)})};var r,o,i=n(3532),a=n(3533);function s(e,t){function n(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(t,e);return monaco.languages.registerCompletionItemProvider(t,new a.j(n)),monaco.languages.registerSignatureHelpProvider(t,new a.i(n)),monaco.languages.registerHoverProvider(t,new a.g(n)),monaco.languages.registerDocumentHighlightProvider(t,new a.e(n)),monaco.languages.registerDefinitionProvider(t,new a.a(n)),monaco.languages.registerReferenceProvider(t,new a.h(n)),monaco.languages.registerDocumentSymbolProvider(t,new a.f(n)),monaco.languages.registerDocumentRangeFormattingEditProvider(t,new a.c(n)),monaco.languages.registerOnTypeFormattingEditProvider(t,new a.d(n)),new a.b(e,t,n),n}},3532:function(e,t,n){"use strict";n.d(t,"a",function(){return r});var r=(o.prototype._stopWorker=function(){this._worker&&(this._worker.dispose(),this._worker=null),this._client=null},o.prototype.dispose=function(){clearInterval(this._idleCheckInterval),this._configChangeListener.dispose(),this._stopWorker()},o.prototype._checkIfIdle=function(){if(this._worker){var e=this._defaults.getWorkerMaxIdleTime(),t=Date.now()-this._lastUsedTime;0<e&&e<t&&this._stopWorker()}},o.prototype._getClient=function(){var t=this;if(this._lastUsedTime=Date.now(),!this._client){this._worker=monaco.editor.createWebWorker({moduleId:"vs/language/typescript/tsWorker",label:this._modeId,createData:{compilerOptions:this._defaults.getCompilerOptions(),extraLibs:this._defaults.getExtraLibs()}});var e=this._worker.getProxy();this._defaults.getEagerModelSync()&&(e=e.then(function(e){return t._worker.withSyncedResources(monaco.editor.getModels().filter(function(e){return e.getModeId()===t._modeId}).map(function(e){return e.uri}))})),this._client=e}return this._client},o.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})},o);function o(e,t){var n=this;this._modeId=e,this._defaults=t,this._worker=null,this._idleCheckInterval=setInterval(function(){return n._checkIfIdle()},3e4),this._lastUsedTime=0,this._configChangeListener=this._defaults.onDidChange(function(){return n._stopWorker()})}},3533:function(e,t,n){"use strict";n.d(t,"b",function(){return g}),n.d(t,"j",function(){return h}),n.d(t,"i",function(){return y}),n.d(t,"g",function(){return k}),n.d(t,"e",function(){return I}),n.d(t,"a",function(){return x}),n.d(t,"h",function(){return D}),n.d(t,"f",function(){return F}),n.d(t,"c",function(){return H}),n.d(t,"d",function(){return J});var r,o,i,a=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),s=monaco.Uri,u=monaco.Promise;function c(e){return e?e.map(function(e){return e.text}).join(""):""}(i=o=o||{})[i.None=0]="None",i[i.Block=1]="Block",i[i.Smart=2]="Smart";var l=(p.prototype._positionToOffset=function(e,t){return monaco.editor.getModel(e).getOffsetAt(t)},p.prototype._offsetToPosition=function(e,t){return monaco.editor.getModel(e).getPositionAt(t)},p.prototype._textSpanToRange=function(e,t){var n=this._offsetToPosition(e,t.start),r=this._offsetToPosition(e,t.start+t.length);return{startLineNumber:n.lineNumber,startColumn:n.column,endLineNumber:r.lineNumber,endColumn:r.column}},p);function p(e){this._worker=e}var m,g=(a(f,m=l),f.prototype.dispose=function(){this._disposables.forEach(function(e){return e&&e.dispose()}),this._disposables=[]},f.prototype._doValidate=function(i){var a=this;this._worker(i).then(function(e){if(!monaco.editor.getModel(i))return null;var t=[],n=a._defaults.getDiagnosticsOptions(),r=n.noSyntaxValidation,o=n.noSemanticValidation;return r||t.push(e.getSyntacticDiagnostics(i.toString())),o||t.push(e.getSemanticDiagnostics(i.toString())),u.join(t)}).then(function(e){if(!e||!monaco.editor.getModel(i))return null;var t=e.reduce(function(e,t){return t.concat(e)},[]).map(function(e){return a._convertDiagnostics(i,e)});monaco.editor.setModelMarkers(monaco.editor.getModel(i),a._selector,t)}).then(void 0,function(e){console.error(e)})},f.prototype._convertDiagnostics=function(e,t){var n=this._offsetToPosition(e,t.start),r=n.lineNumber,o=n.column,i=this._offsetToPosition(e,t.start+t.length),a=i.lineNumber,s=i.column;return{severity:monaco.MarkerSeverity.Error,startLineNumber:r,startColumn:o,endLineNumber:a,endColumn:s,message:function(e,t){if("string"==typeof e)return e;for(var n=e,r="",o=0;n;){if(o){r+=t;for(var i=0;i<o;i++)r+=" "}r+=n.messageText,o++,n=n.next}return r}(t.messageText,"\n")}},f);function f(e,r,t){var o=m.call(this,t)||this;o._defaults=e,o._selector=r,o._disposables=[],o._listener=Object.create(null);function i(e){if(e.getModeId()===r){var t,n=e.onDidChangeContent(function(){clearTimeout(t),t=setTimeout(function(){return o._doValidate(e.uri)},500)});o._listener[e.uri.toString()]={dispose:function(){n.dispose(),clearTimeout(t)}},o._doValidate(e.uri)}}function a(e){monaco.editor.setModelMarkers(e,o._selector,[]);var t=e.uri.toString();o._listener[t]&&(o._listener[t].dispose(),delete o._listener[t])}return o._disposables.push(monaco.editor.onDidCreateModel(i)),o._disposables.push(monaco.editor.onWillDisposeModel(a)),o._disposables.push(monaco.editor.onDidChangeModelLanguage(function(e){a(e.model),i(e.model)})),o._disposables.push({dispose:function(){for(var e=0,t=monaco.editor.getModels();e<t.length;e++){var n=t[e];a(n)}}}),o._disposables.push(o._defaults.onDidChange(function(){for(var e=0,t=monaco.editor.getModels();e<t.length;e++){var n=t[e];a(n),i(n)}})),monaco.editor.getModels().forEach(i),o}var d,h=(a(v,d=l),Object.defineProperty(v.prototype,"triggerCharacters",{get:function(){return["."]},enumerable:!0,configurable:!0}),v.prototype.provideCompletionItems=function(e,t,n,r){e.getWordUntilPosition(t);var o=e.uri,i=this._positionToOffset(o,t);return this._worker(o).then(function(e){return e.getCompletionsAtPosition(o.toString(),i)}).then(function(e){if(e)return{suggestions:e.entries.map(function(e){return{uri:o,position:t,label:e.name,insertText:e.name,sortText:e.sortText,kind:v.convertKind(e.kind)}})}})},v.prototype.resolveCompletionItem=function(e,t,n,r){var o=this,i=n,a=i.uri,s=i.position;return this._worker(a).then(function(e){return e.getCompletionEntryDetails(a.toString(),o._positionToOffset(a,s),i.label)}).then(function(e){return e?{uri:a,position:s,label:e.name,kind:v.convertKind(e.kind),detail:c(e.displayParts),documentation:{value:c(e.documentation)}}:i})},v.convertKind=function(e){switch(e){case E.primitiveType:case E.keyword:return monaco.languages.CompletionItemKind.Keyword;case E.variable:case E.localVariable:return monaco.languages.CompletionItemKind.Variable;case E.memberVariable:case E.memberGetAccessor:case E.memberSetAccessor:return monaco.languages.CompletionItemKind.Field;case E.function:case E.memberFunction:case E.constructSignature:case E.callSignature:case E.indexSignature:return monaco.languages.CompletionItemKind.Function;case E.enum:return monaco.languages.CompletionItemKind.Enum;case E.module:return monaco.languages.CompletionItemKind.Module;case E.class:return monaco.languages.CompletionItemKind.Class;case E.interface:return monaco.languages.CompletionItemKind.Interface;case E.warning:return monaco.languages.CompletionItemKind.File}return monaco.languages.CompletionItemKind.Property},v);function v(){return null!==d&&d.apply(this,arguments)||this}var _,y=(a(b,_=l),b.prototype.provideSignatureHelp=function(e,t,n){var r=this,o=e.uri;return this._worker(o).then(function(e){return e.getSignatureHelpItems(o.toString(),r._positionToOffset(o,t))}).then(function(e){if(e){var t={activeSignature:e.selectedItemIndex,activeParameter:e.argumentIndex,signatures:[]};return e.items.forEach(function(i){var a={label:"",documentation:null,parameters:[]};a.label+=c(i.prefixDisplayParts),i.parameters.forEach(function(e,t,n){var r=c(e.displayParts),o={label:r,documentation:c(e.documentation)};a.label+=r,a.parameters.push(o),t<n.length-1&&(a.label+=c(i.separatorDisplayParts))}),a.label+=c(i.suffixDisplayParts),t.signatures.push(a)}),t}})},b);function b(){var e=null!==_&&_.apply(this,arguments)||this;return e.signatureHelpTriggerCharacters=["(",","],e}var S,k=(a(w,S=l),w.prototype.provideHover=function(e,t,n){var o=this,i=e.uri;return this._worker(i).then(function(e){return e.getQuickInfoAtPosition(i.toString(),o._positionToOffset(i,t))}).then(function(e){if(e){var t=c(e.documentation),n=e.tags?e.tags.map(function(e){var t="*@"+e.name+"*";return e.text?t+(e.text.match(/\r\n|\n/g)?" \n"+e.text:" - "+e.text):t}).join(" \n\n"):"",r=c(e.displayParts);return{range:o._textSpanToRange(i,e.textSpan),contents:[{value:"```js\n"+r+"\n```\n"},{value:t+(n?"\n\n"+n:"")}]}}})},w);function w(){return null!==S&&S.apply(this,arguments)||this}var T,I=(a(C,T=l),C.prototype.provideDocumentHighlights=function(e,t,n){var r=this,o=e.uri;return this._worker(o).then(function(e){return e.getOccurrencesAtPosition(o.toString(),r._positionToOffset(o,t))}).then(function(e){if(e)return e.map(function(e){return{range:r._textSpanToRange(o,e.textSpan),kind:e.isWriteAccess?monaco.languages.DocumentHighlightKind.Write:monaco.languages.DocumentHighlightKind.Text}})})},C);function C(){return null!==T&&T.apply(this,arguments)||this}var P,x=(a(O,P=l),O.prototype.provideDefinition=function(e,t,n){var a=this,r=e.uri;return this._worker(r).then(function(e){return e.getDefinitionAtPosition(r.toString(),a._positionToOffset(r,t))}).then(function(e){if(e){for(var t=[],n=0,r=e;n<r.length;n++){var o=r[n],i=s.parse(o.fileName);monaco.editor.getModel(i)&&t.push({uri:i,range:a._textSpanToRange(i,o.textSpan)})}return t}})},O);function O(){return null!==P&&P.apply(this,arguments)||this}var K,D=(a(A,K=l),A.prototype.provideReferences=function(e,t,n,r){var a=this,o=e.uri;return this._worker(o).then(function(e){return e.getReferencesAtPosition(o.toString(),a._positionToOffset(o,t))}).then(function(e){if(e){for(var t=[],n=0,r=e;n<r.length;n++){var o=r[n],i=s.parse(o.fileName);monaco.editor.getModel(i)&&t.push({uri:i,range:a._textSpanToRange(i,o.textSpan)})}return t}})},A);function A(){return null!==K&&K.apply(this,arguments)||this}var M,F=(a(N,M=l),N.prototype.provideDocumentSymbols=function(e,t){var u=this,c=e.uri;return this._worker(c).then(function(e){return e.getNavigationBarItems(c.toString())}).then(function(e){if(e){var s=function(e,t,n){var r={name:t.text,detail:"",kind:V[t.kind]||monaco.languages.SymbolKind.Variable,range:u._textSpanToRange(c,t.spans[0]),selectionRange:u._textSpanToRange(c,t.spans[0]),containerName:n};if(t.childItems&&0<t.childItems.length)for(var o=0,i=t.childItems;o<i.length;o++){var a=i[o];s(e,a,r.name)}e.push(r)},t=[];return e.forEach(function(e){return s(t,e)}),t}})},N);function N(){return null!==M&&M.apply(this,arguments)||this}var E=(R.unknown="",R.keyword="keyword",R.script="script",R.module="module",R.class="class",R.interface="interface",R.type="type",R.enum="enum",R.variable="var",R.localVariable="local var",R.function="function",R.localFunction="local function",R.memberFunction="method",R.memberGetAccessor="getter",R.memberSetAccessor="setter",R.memberVariable="property",R.constructorImplementation="constructor",R.callSignature="call",R.indexSignature="index",R.constructSignature="construct",R.parameter="parameter",R.typeParameter="type parameter",R.primitiveType="primitive type",R.label="label",R.alias="alias",R.const="const",R.let="let",R.warning="warning",R);function R(){}var V=Object.create(null);V[E.module]=monaco.languages.SymbolKind.Module,V[E.class]=monaco.languages.SymbolKind.Class,V[E.enum]=monaco.languages.SymbolKind.Enum,V[E.interface]=monaco.languages.SymbolKind.Interface,V[E.memberFunction]=monaco.languages.SymbolKind.Method,V[E.memberVariable]=monaco.languages.SymbolKind.Property,V[E.memberGetAccessor]=monaco.languages.SymbolKind.Property,V[E.memberSetAccessor]=monaco.languages.SymbolKind.Property,V[E.variable]=monaco.languages.SymbolKind.Variable,V[E.const]=monaco.languages.SymbolKind.Variable,V[E.localVariable]=monaco.languages.SymbolKind.Variable,V[E.variable]=monaco.languages.SymbolKind.Variable,V[E.function]=monaco.languages.SymbolKind.Function,V[E.localFunction]=monaco.languages.SymbolKind.Function;var L,W=(a(j,L=l),j._convertOptions=function(e){return{ConvertTabsToSpaces:e.insertSpaces,TabSize:e.tabSize,IndentSize:e.tabSize,IndentStyle:o.Smart,NewLineCharacter:"\n",InsertSpaceAfterCommaDelimiter:!0,InsertSpaceAfterSemicolonInForStatements:!0,InsertSpaceBeforeAndAfterBinaryOperators:!0,InsertSpaceAfterKeywordsInControlFlowStatements:!0,InsertSpaceAfterFunctionKeywordForAnonymousFunctions:!0,InsertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis:!1,InsertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets:!1,InsertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces:!1,PlaceOpenBraceOnNewLineForControlBlocks:!1,PlaceOpenBraceOnNewLineForFunctions:!1}},j.prototype._convertTextChanges=function(e,t){return{text:t.newText,range:this._textSpanToRange(e,t.span)}},j);function j(){return null!==L&&L.apply(this,arguments)||this}var B,H=(a(U,B=W),U.prototype.provideDocumentRangeFormattingEdits=function(e,t,n,r){var o=this,i=e.uri;return this._worker(i).then(function(e){return e.getFormattingEditsForRange(i.toString(),o._positionToOffset(i,{lineNumber:t.startLineNumber,column:t.startColumn}),o._positionToOffset(i,{lineNumber:t.endLineNumber,column:t.endColumn}),W._convertOptions(n))}).then(function(e){if(e)return e.map(function(e){return o._convertTextChanges(i,e)})})},U);function U(){return null!==B&&B.apply(this,arguments)||this}var z,J=(a(G,z=W),Object.defineProperty(G.prototype,"autoFormatTriggerCharacters",{get:function(){return[";","}","\n"]},enumerable:!0,configurable:!0}),G.prototype.provideOnTypeFormattingEdits=function(e,t,n,r,o){var i=this,a=e.uri;return this._worker(a).then(function(e){return e.getFormattingEditsAfterKeystroke(a.toString(),i._positionToOffset(a,t),n,W._convertOptions(r))}).then(function(e){if(e)return e.map(function(e){return i._convertTextChanges(a,e)})})},G);function G(){return null!==z&&z.apply(this,arguments)||this}}});