first
This commit is contained in:
commit
2d7cb38fd5
153 files changed
+148170
No files matched your search
@@ -0,0 +1,117 @@
|
||||
/*!-----------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Version: 0.8.2(59c417515cc4385a81ab1755611263b94d0071e2)
|
||||
* Released under the MIT license
|
||||
* https://github.com/Microsoft/vscode/blob/master/LICENSE.txt
|
||||
*-----------------------------------------------------------*/
|
||||
(function(){function e(e){this.tokens=[],this.tokens.links={},this.options=e||l.defaults,this.rules=v.normal,this.options.gfm&&(this.options.tables?this.rules=v.tables:this.rules=v.gfm)}function t(e,t){if(this.options=t||l.defaults,this.links=e,this.rules=_.normal,this.renderer=this.options.renderer||new n,this.renderer.options=this.options,!this.links)throw new Error("Tokens array requires a `links` property.");this.options.gfm?this.options.breaks?this.rules=_.breaks:this.rules=_.gfm:this.options.pedantic&&(this.rules=_.pedantic)}function n(e){this.options=e||{}}function i(e){this.tokens=[],this.token=null,this.options=e||l.defaults,this.options.renderer=this.options.renderer||new n,this.renderer=this.options.renderer,this.renderer.options=this.options}function o(e,t){return e.replace(t?/&/g:/&(?!#?\w+;)/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function r(e){return e.replace(/&([#\w]+);/g,function(e,t){return t=t.toLowerCase(),"colon"===t?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""})}function s(e,t){return e=e.source,t=t||"",function n(i,o){return i?(o=o.source||o,o=o.replace(/(^|[^\[])\^/g,"$1"),e=e.replace(i,o),n):new RegExp(e,t)}}function a(){}function u(e){for(var t,n,i=1;i<arguments.length;i++){t=arguments[i];for(n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e}function l(t,n,r){if(r||"function"==typeof n){r||(r=n,n=null),n=u({},l.defaults,n||{});var s,a,c=n.highlight,d=0;try{s=e.lex(t,n)}catch(e){return r(e)}a=s.length;var h=function(e){if(e)return n.highlight=c,r(e);var t;try{t=i.parse(s,n)}catch(t){e=t}return n.highlight=c,e?r(e):r(null,t)};if(!c||c.length<3)return h();if(delete n.highlight,!a)return h();for(;d<s.length;d++)!function(e){return"code"!==e.type?--a||h():c(e.text,e.lang,function(t,n){return t?h(t):null==n||n===e.text?--a||h():(e.text=n,e.escaped=!0,void(--a||h()))})}(s[d])}else try{return n&&(n=u({},l.defaults,n)),i.parse(e.lex(t,n),n)}catch(e){if(e.message+="\nPlease report this to https://github.com/chjj/marked.",(n||l.defaults).silent)return"<p>An error occured:</p><pre>"+o(e.message+"",!0)+"</pre>";throw e}}var c,d=["require","exports","vs/editor/common/editorCommon","vs/editor/common/core/range","vs/base/common/lifecycle","vs/css!vs/editor/editor.main","vs/base/common/winjs.base","vs/nls!vs/editor/editor.main","vs/nls","vs/base/common/strings","vs/base/common/errors","vs/base/browser/dom","vs/base/common/event","vs/editor/common/editorCommonExtensions","vs/platform/instantiation/common/instantiation","vs/editor/common/core/position","vs/editor/common/modes","vs/base/common/async","vs/base/common/platform","vs/platform/contextkey/common/contextkey","vs/editor/common/core/selection","vs/editor/browser/editorBrowser","vs/base/common/types","vs/platform/commands/common/commands","vs/base/browser/browser","vs/base/common/eventEmitter","vs/base/common/arrays","vs/base/common/uri","vs/base/browser/styleMutator","vs/editor/browser/editorBrowserExtensions","vs/base/common/severity","vs/base/common/keyCodes","vs/editor/browser/view/viewPart","vs/platform/platform","vs/base/browser/builder","vs/base/common/objects","vs/base/browser/mouseEvent","vs/base/browser/ui/widget","vs/editor/common/modes/languageConfigurationRegistry","vs/base/common/paths","vs/base/common/scrollable","vs/editor/common/controller/cursorCommon","vs/editor/common/config/defaultConfig","vs/platform/keybinding/common/keybinding","vs/editor/common/services/modelService","vs/editor/common/services/codeEditorService","vs/editor/common/core/editOperation","vs/platform/telemetry/common/telemetry","vs/editor/common/services/editorWorkerService","vs/base/common/actions","vs/editor/browser/view/dynamicViewOverlay","vs/editor/common/viewModel/viewEventHandler","vs/platform/message/common/message","vs/base/browser/keyboardEvent","vs/editor/common/commands/replaceCommand","vs/base/common/assert","vs/platform/configuration/common/configuration","vs/platform/actions/common/actions","vs/editor/browser/config/configuration","vs/base/browser/touch","vs/base/browser/ui/scrollbar/scrollableElement","vs/platform/contextview/browser/contextView","vs/platform/editor/common/editor","vs/editor/common/modes/nullMode","vs/base/common/network","vs/editor/common/modes/languageConfiguration","vs/platform/opener/common/opener","vs/base/common/events","vs/editor/common/services/resolverService","vs/editor/common/core/characterClassifier","vs/platform/keybinding/common/keybindingsRegistry","vs/base/browser/ui/actionbar/actionbar","vs/editor/common/model/modelLine","vs/editor/common/model/wordHelper","vs/editor/common/modes/supports/richEditBrackets","vs/base/parts/tree/browser/treeDefaults","vs/base/parts/quickopen/common/quickOpen","vs/base/common/iterator","vs/editor/common/modes/supports","vs/platform/instantiation/common/serviceCollection","vs/editor/common/services/modeService","vs/plaLine truncated
|
||||
e="undefined"!=typeof process&&process.versions&&process.versions.node&&!t?new i:new n,define("vs/css",new o(e))}()}(c||(c={}));var f,g=this;!function(e){function t(e,t){var n;return n=0===t.length?e:e.replace(/\{(\d+)\}/g,function(e,n){var i=n[0];return"undefined"!=typeof t[i]?t[i]:e}),u&&(n="["+n.replace(/[aouei]/g,"$&$&")+"]"),n}function n(e,t){var n=e[t];return n?n:(n=e["*"],n?n:null)}function i(e,n){for(var i=[],o=0;o<arguments.length-2;o++)i[o]=arguments[o+2];return t(n,i)}function o(e){return function(n,i){var o=l.call(arguments,2);return t(e[n],o)}}var r=g||{},s=r.Plugin&&r.Plugin.Resources?r.Plugin.Resources:void 0,a="i-default",u=r&&r.document&&r.document.location&&r.document.location.hash.indexOf("pseudo=true")>=0,l=Array.prototype.slice,c=function(){function e(){this.localize=i}return e.prototype.setPseudoTranslation=function(e){u=e},e.prototype.create=function(e,t){return{localize:o(t[e])}},e.prototype.load=function(t,r,u,l){if(l=l||{},t&&0!==t.length){var c=void 0;if(s&&s.getString)c=".nls.keys",r([t+c],function(e){u({localize:function(t,n){if(!e[t])return"NLS error: unknown key "+t;var i=e[t].keys;if(n>=i.length)return"NLS error unknow index "+n;var o=i[n],r=[];r[0]=t+"_"+o;for(var a=0;a<arguments.length-2;a++)r[a+1]=arguments[a+2];return s.getString.apply(s,r)}})});else if(l.isBuild)r([t+".nls",t+".nls.keys"],function(n,i){e.BUILD_MAP[t]=n,e.BUILD_MAP_KEYS[t]=i,u(n)});else{var d=l["vs/nls"]||{},h=d.availableLanguages?n(d.availableLanguages,t):null;c=".nls",null!==h&&h!==a&&(c=c+"."+h),r([t+c],function(e){Array.isArray(e)?e.localize=o(e):e.localize=o(e[t]),u(e)})}}else u({localize:i})},e.prototype._getEntryPointsMap=function(){return r.nlsPluginEntryPoints=r.nlsPluginEntryPoints||{},r.nlsPluginEntryPoints},e.prototype.write=function(e,t,n){var i=n.getEntryPoint(),o=this._getEntryPointsMap();o[i]=o[i]||[],o[i].push(t),t!==i&&n.asModule(e+"!"+t,"define(['vs/nls', 'vs/nls!"+i+"'], function(nls, data) { return nls.create(\""+t+'", data); });')},e.prototype.writeFile=function(t,n,i,o,r){var s=this._getEntryPointsMap();if(s.hasOwnProperty(n)){for(var a=i.toUrl(n+".nls.js"),u=["/*---------------------------------------------------------"," * Copyright (c) Microsoft Corporation. All rights reserved."," *--------------------------------------------------------*/"],l=s[n],c={},d=0;d<l.length;d++)c[l[d]]=e.BUILD_MAP[l[d]];u.push('define("'+n+'.nls", '+JSON.stringify(c,null,"\t")+");"),o(a,u.join("\r\n"))}},e.prototype.finishBuild=function(t){t("nls.metadata.json",JSON.stringify({keys:e.BUILD_MAP_KEYS,messages:e.BUILD_MAP,bundles:this._getEntryPointsMap()},null,"\t"))},e}();c.BUILD_MAP={},c.BUILD_MAP_KEYS={},e.NLSPlugin=c,function(){define("vs/nls",new c)}()}(f||(f={})),define(d[157],h([0,1]),function(e,t){"use strict";function n(e){if(!e.parent||e.parent===e)return null;try{var t=e.location,n=e.parent.location;if(t.protocol!==n.protocol||t.hostname!==n.hostname||t.port!==n.port)return o=!0,null}catch(e){return o=!0,null}return e.parent}function i(e,t){for(var n,i=e.document.getElementsByTagName("iframe"),o=0,r=i.length;o<r;o++)if(n=i[o],n.contentWindow===t)return n;return null}var o=!1,r=null,s=function(){function e(){}return e.getSameOriginWindowChain=function(){if(!r){r=[];var e,t=window;do e=n(t),e?r.push({window:t,iframeElement:i(e,t)}):r.push({window:t,iframeElement:null}),t=e;while(t)}return r.slice(0)},e.hasDifferentOriginAncestor=function(){return r||this.getSameOriginWindowChain(),o},e.getPositionOfChildWindowRelativeToAncestorWindow=function(e,t){if(!t||e===t)return{top:0,left:0};for(var n=0,i=0,o=this.getSameOriginWindowChain(),r=0;r<o.length;r++){var s=o[r];if(s.window===t)break;if(!s.iframeElement)break;var a=s.iframeElement.getBoundingClientRect();n+=a.top,i+=a.left}return{top:n,left:i}},e}();t.IframeUtils=s}),define(d[194],h([0,1]),function(e,t){"use strict";function n(e,t){if(e.start>=t.end||t.start>=e.end)return null;var n=Math.max(e.start,t.start),i=Math.min(e.end,t.end);return i-n<=0?null:{start:n,end:i}}function i(e){return e.end-e.start<=0}function o(e,t){var n=[],o={start:e.start,end:Math.min(t.start,e.end)},r={start:Math.max(t.end,e.start),end:e.end};return i(o)||n.push(o),i(r)||n.push(r),n}function r(e,t){for(var n=e.start;n<e.end;n++)t(n)}function s(e,t){for(var i=[],o=0,r=t;o<r.length;o++){var s=r[o];if(!(e.start>=s.range.end)){if(e.end<s.range.start)break;var a=n(e,s.range);a&&i.push({range:a,size:s.size})}}return i}function a(e,t){var n=e.start,i=e.end;return{start:n+t,end:i+t}}function u(e){for(var t=[],n=null,i=0,o=e;i<o.length;i++){var r=o[i],s=r.range.start,a=r.range.end,u=r.size;n&&u===n.size?n.range.end=a:(n={range:{start:s,end:a},size:u},t.push(n))}return t}function l(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return u(e.reduce(function(e,t){return e.concat(t)},[]))}t.intersect=n,t.isEmpty=i,t.relativeComplement=o,t.each=r,t.groupIntersect=s,t.consolidate=u;var c=function(){function e(){this.groups=[],this._size=0}return e.prototype.splice=functioLine truncated
|
||||
}return e.prototype.dispose=function(){this._toDispose=n(this._toDispose)},e.prototype._register=function(e){return this._toDispose.push(e),e},e}();t.Disposable=r;var s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return m(t,e),t.prototype.add=function(e){if(!Array.isArray(e))return this._register(e);for(var t=0,n=e;t<n.length;t++){var i=n[t];return this._register(i)}},t}(r);t.Disposables=s;var a=function(){function e(){}return Object.defineProperty(e.prototype,"value",{set:function(e){this._value&&this._value.dispose(),this._value=e},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){this.value=null},e}();t.OneDisposable=a;var u=function(){function e(){this.references=Object.create(null)}return e.prototype.acquire=function(e){var t=this,n=this.references[e];n||(n=this.references[e]={counter:0,object:this.createReferencedObject(e)});var i=n.object,o=function(){0===--n.counter&&(t.destroyReferencedObject(n.object),delete t.references[e])};return n.counter++,{object:i,dispose:o}},e}();t.ReferenceCollection=u;var l=function(){function e(e){this.object=e}return e.prototype.dispose=function(){},e}();t.ImmortalReference=l}),define(d[110],h([0,1]),function(e,t){"use strict";var n=function(){function e(){this.map=Object.create(null),this._size=0}return Object.defineProperty(e.prototype,"size",{get:function(){return this._size},enumerable:!0,configurable:!0}),e.prototype.get=function(e){var t=this.peek(e);return t?t:null},e.prototype.getOrSet=function(e,t){var n=this.get(e);return n?n:(this.set(e,t),t)},e.prototype.keys=function(){var e=[];for(var t in this.map)e.push(this.map[t].key);return e},e.prototype.values=function(){var e=[];for(var t in this.map)e.push(this.map[t].value);return e},e.prototype.entries=function(){var e=[];for(var t in this.map)e.push(this.map[t]);return e},e.prototype.set=function(e,t){return!this.get(e)&&(this.push(e,t),!0)},e.prototype.delete=function(e){var t=this.get(e);return t?(this.pop(e),t):null},e.prototype.has=function(e){return!!this.get(e)},e.prototype.clear=function(){this.map=Object.create(null),this._size=0},e.prototype.push=function(e,t){var n={key:e,value:t};this.map[e.toString()]=n,this._size++},e.prototype.pop=function(e){delete this.map[e.toString()],this._size--},e.prototype.peek=function(e){var t=this.map[e.toString()];return t?t.value:null},e}();t.LinkedMap=n;var i=function(){function e(e,t){void 0===e&&(e=Number.MAX_VALUE),void 0===t&&(t=1),this.limit=e,this.map=Object.create(null),this._size=0,this.ratio=e*t}return Object.defineProperty(e.prototype,"size",{get:function(){return this._size},enumerable:!0,configurable:!0}),e.prototype.set=function(e,t){if(this.map[e])return!1;var n={key:e,value:t};return this.push(n),this._size>this.limit&&this.trim(),!0},e.prototype.get=function(e){var t=this.map[e];return t?t.value:null},e.prototype.getOrSet=function(e,t){var n=this.get(e);return n?n:(this.set(e,t),t)},e.prototype.delete=function(e){var t=this.map[e];return t?(this.map[e]=void 0,this._size--,t.next?t.next.prev=t.prev:this.head=t.prev,t.prev?t.prev.next=t.next:this.tail=t.next,t.value):null},e.prototype.has=function(e){return!!this.map[e]},e.prototype.clear=function(){this.map=Object.create(null),this._size=0,this.head=null,this.tail=null},e.prototype.push=function(e){this.head&&(e.prev=this.head,this.head.next=e),this.tail||(this.tail=e),this.head=e,this.map[e.key]=e,this._size++},e.prototype.trim=function(){if(this.tail)if(this.ratio<this.limit)for(var e=0,t=this.tail;t.next;){if(this.map[t.key]=void 0,this._size--,e===this.ratio){this.tail=t.next,this.tail.prev=null;break}t=t.next,e++}else this.map[this.tail.key]=void 0,this._size--,this.tail=this.tail.next,this.tail.prev=null},e}();t.BoundedLinkedMap=i;var o=function(e){function t(t){return e.call(this,t)||this}return m(t,e),t.prototype.get=function(e){var t=this.map[e];return t?(this.delete(e),this.push(t),t.value):null},t}(i);t.LRUCache=o;var r=function(){function e(){this.children=new Map}return e}(),s=function(){function e(e){this._root=new r,this._splitter=e}return e.prototype.insert=function(e,t){for(var n=this._splitter(e),i=0,o=this._root;i<n.length;i++){var s=o.children[n[i]];{if(!s)break;o=s}}for(var a;i<n.length;i++)a=new r,o.children[n[i]]=a,o=a;o.element=t},e.prototype.lookUp=function(e){for(var t,n=this._splitter(e),i=this._root.children,o=0,r=n;o<r.length;o++){var s=r[o];if(t=i[s],!t)return;i=t.children}return t.element},e.prototype.findSubstr=function(e){for(var t,n=this._splitter(e),i=this._root.children,o=0,r=n;o<r.length;o++){var s=r[o],a=i[s];if(!a)break;a.element&&(t=a),i=a.children}if(t)return t.element},e.prototype.findSuperstr=function(t){for(var n,i=this._splitter(t),o=this._root.children,r=0,s=i;r<s.length;r++){var a=s[r];if(n=o[a],!n)return;o=n.children}var u=new e(this._splitter);return u._root=n,u},e}();s.PathSplitter=function(e){return e.split(/[\\/]/).filter(function(e){return!!e})},t.TrieMap=s});/**
|
||||
* marked - a markdown parser
|
||||
* Copyright (c) 2011-2014, Christopher Jeffrey. (MIT Licensed)
|
||||
* https://github.com/chjj/marked
|
||||
*/
|
||||
var v={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:a,hr:/^( *[-*_]){3,} *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *#* *(?:\n+|$)/,nptable:a,lheading:/^([^\n]+)\n *(=|-){2,} *(?:\n+|$)/,blockquote:/^( *>[^\n]+(\n(?!def)[^\n]+)*\n*)+/,list:/^( *)(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:/^ *(?:comment *(?:\n|\s*$)|closed *(?:\n{2,}|\s*$)|closing *(?:\n{2,}|\s*$))/,def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +["(]([^\n]+)[")])? *(?:\n+|$)/,table:a,paragraph:/^((?:[^\n]+\n?(?!hr|heading|lheading|blockquote|tag|def))+)\n*/,text:/^[^\n]+/};v.bullet=/(?:[*+-]|\d+\.)/,v.item=/^( *)(bull) [^\n]*(?:\n(?!\1bull )[^\n]*)*/,v.item=s(v.item,"gm")(/bull/g,v.bullet)(),v.list=s(v.list)(/bull/g,v.bullet)("hr","\\n+(?=\\1?(?:[-*_] *){3,}(?:\\n+|$))")("def","\\n+(?="+v.def.source+")")(),v.blockquote=s(v.blockquote)("def",v.def)(),v._tag="(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:/|[^\\w\\s@]*@)\\b",v.html=s(v.html)("comment",/<!--[\s\S]*?-->/)("closed",/<(tag)[\s\S]+?<\/\1>/)("closing",/<tag(?:"[^"]*"|'[^']*'|[^'">])*?>/)(/tag/g,v._tag)(),v.paragraph=s(v.paragraph)("hr",v.hr)("heading",v.heading)("lheading",v.lheading)("blockquote",v.blockquote)("tag","<"+v._tag)("def",v.def)(),v.normal=u({},v),v.gfm=u({},v.normal,{fences:/^ *(`{3,}|~{3,}) *(\S+)? *\n([\s\S]+?)\s*\1 *(?:\n+|$)/,paragraph:/^/}),v.gfm.paragraph=s(v.paragraph)("(?!","(?!"+v.gfm.fences.source.replace("\\1","\\2")+"|"+v.list.source.replace("\\1","\\3")+"|")(),v.tables=u({},v.gfm,{nptable:/^ *(\S.*\|.*)\n *([-:]+ *\|[-| :]*)\n((?:.*\|.*(?:\n|$))*)\n*/,table:/^ *\|(.+)\n *\|( *[-:]+[-| :]*)\n((?: *\|.*(?:\n|$))*)\n*/}),e.rules=v,e.lex=function(t,n){var i=new e(n);return i.lex(t)},e.prototype.lex=function(e){return e=e.replace(/\r\n|\r/g,"\n").replace(/\t/g," ").replace(/\u00a0/g," ").replace(/\u2424/g,"\n"),this.token(e,!0)},e.prototype.token=function(e,t,n){for(var i,o,r,s,a,u,l,c,d,e=e.replace(/^ +$/gm,"");e;)if((r=this.rules.newline.exec(e))&&(e=e.substring(r[0].length),r[0].length>1&&this.tokens.push({type:"space"})),r=this.rules.code.exec(e))e=e.substring(r[0].length),r=r[0].replace(/^ {4}/gm,""),this.tokens.push({type:"code",text:this.options.pedantic?r:r.replace(/\n+$/,"")});else if(r=this.rules.fences.exec(e))e=e.substring(r[0].length),this.tokens.push({type:"code",lang:r[2],text:r[3]});else if(r=this.rules.heading.exec(e))e=e.substring(r[0].length),this.tokens.push({type:"heading",depth:r[1].length,text:r[2]});else if(t&&(r=this.rules.nptable.exec(e))){for(e=e.substring(r[0].length),u={type:"table",header:r[1].replace(/^ *| *\| *$/g,"").split(/ *\| */),align:r[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:r[3].replace(/\n$/,"").split("\n")},c=0;c<u.align.length;c++)/^ *-+: *$/.test(u.align[c])?u.align[c]="right":/^ *:-+: *$/.test(u.align[c])?u.align[c]="center":/^ *:-+ *$/.test(u.align[c])?u.align[c]="left":u.align[c]=null;for(c=0;c<u.cells.length;c++)u.cells[c]=u.cells[c].split(/ *\| */);this.tokens.push(u)}else if(r=this.rules.lheading.exec(e))e=e.substring(r[0].length),this.tokens.push({type:"heading",depth:"="===r[2]?1:2,text:r[1]});else if(r=this.rules.hr.exec(e))e=e.substring(r[0].length),this.tokens.push({type:"hr"});else if(r=this.rules.blockquote.exec(e))e=e.substring(r[0].length),this.tokens.push({type:"blockquote_start"}),r=r[0].replace(/^ *> ?/gm,""),this.token(r,t,!0),this.tokens.push({type:"blockquote_end"});else if(r=this.rules.list.exec(e)){for(e=e.substring(r[0].length),s=r[2],this.tokens.push({type:"list_start",ordered:s.length>1}),r=r[0].match(this.rules.item),i=!1,d=r.length,c=0;c<d;c++)u=r[c],l=u.length,u=u.replace(/^ *([*+-]|\d+\.) +/,""),~u.indexOf("\n ")&&(l-=u.length,u=this.options.pedantic?u.replace(/^ {1,4}/gm,""):u.replace(new RegExp("^ {1,"+l+"}","gm"),"")),this.options.smartLists&&c!==d-1&&(a=v.bullet.exec(r[c+1])[0],s===a||s.length>1&&a.length>1||(e=r.slice(c+1).join("\n")+e,c=d-1)),o=i||/\n\n(?!\s*$)/.test(u),c!==d-1&&(i="\n"===u.charAt(u.length-1),o||(o=i)),this.tokens.push({type:o?"loose_item_start":"list_item_start"}),this.token(u,!1,n),this.tokens.push({type:"list_item_end"});this.tokens.push({type:"list_end"})}else if(r=this.rules.html.exec(e))e=e.substring(r[0].length),this.tokens.push({type:this.options.sanitize?"paragraph":"html",pre:"pre"===r[1]||"script"===r[1]||"style"===r[1],text:r[0]});else if(!n&&t&&(r=this.rules.def.exec(e)))e=e.substring(r[0].length),this.tokens.links[r[1].toLowerCase()]={href:r[2],title:r[3]};else if(t&&(r=this.rules.table.exec(e))){for(e=e.substring(r[0].length),u={type:"table",header:r[1].replace(/^ *| *\| *$/g,"").split(/ *\| */),align:r[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:r[3].replace(/(?: *\| *)?\n$/,"").split("\n")},c=0;c<u.align.length;c++)/^ *-+: *$/.test(u.align[c])?u.align[c]="right":/^ *:-+: *$/.test(u.align[c])?u.align[c]="center":/^ *:-+ *$/.test(u.align[c])?u.align[c]="left":u.align[c]=null;for(c=0;c<u.cells.length;c++)u.cells[c]=u.cellLine truncated
|
||||
BEGIN THIRD PARTY
|
||||
*/
|
||||
/*!
|
||||
* string_score.js: String Scoring Algorithm 0.1.22
|
||||
*
|
||||
* http://joshaven.com/string_score
|
||||
* https://github.com/joshaven/string_score
|
||||
*
|
||||
* Copyright (C) 2009-2014 Joshaven Potter <yourtech@gmail.com>
|
||||
* Special thanks to all of the contributors listed here https://github.com/joshaven/string_score
|
||||
* MIT License: http://opensource.org/licenses/MIT
|
||||
*
|
||||
* Date: Tue Mar 1 2011
|
||||
* Updated: Tue Mar 10 2015
|
||||
*/
|
||||
var r=["-","_"," ","/","\\","."];t.score=n,t.matches=o}),/*!
|
||||
END THIRD PARTY
|
||||
*/
|
||||
define(d[444],h([0,1]),function(e,t){"use strict";var n=function(){function e(e){void 0===e&&(e=[]),this._elements=e.slice()}return Object.defineProperty(e.prototype,"size",{get:function(){return this._elements.length},enumerable:!0,configurable:!0}),e.prototype.set=function(e){this.unset(e),this._elements.push(e)},e.prototype.contains=function(e){return this._elements.indexOf(e)>-1},e.prototype.unset=function(e){var t=this._elements.indexOf(e);t>-1&&this._elements.splice(t,1)},Object.defineProperty(e.prototype,"elements",{get:function(){return this._elements.slice()},enumerable:!0,configurable:!0}),e}();t.ArraySet=n}),define(d[445],h([0,1,444,77]),function(e,t,n,i){"use strict";var o=function(){function e(e,t){void 0===e&&(e=[]),void 0===t&&(t=10),this._history=new n.ArraySet(e),this._limit=t,this._onChange()}return e.prototype.add=function(e){this._history.set(e),this._onChange()},e.prototype.next=function(){return this._navigator.next()?this._navigator.current():(this.last(),null)},e.prototype.previous=function(){return this._navigator.previous()?this._navigator.current():(this.first(),null)},e.prototype.current=function(){return this._navigator.current()},e.prototype.parent=function(){return null},e.prototype.first=function(){return this._navigator.first()},e.prototype.last=function(){return this._navigator.last()},e.prototype._onChange=function(){this._reduceToLimit(),this._navigator=new i.ArrayNavigator(this._history.elements),this._navigator.last()},e.prototype._reduceToLimit=function(){var e=this._history.elements;e.length>this._limit&&(this._history=new n.ArraySet(e.slice(e.length-this._limit)))},e}();t.HistoryNavigator=o}),define(d[446],h([0,1,18]),function(e,t,n){"use strict";var i=n.globals.performance&&"function"==typeof n.globals.performance.now,o=function(){function e(e){this._highResolution=i&&e,this._startTime=this._now(),this._stopTime=-1}return e.create=function(t){return void 0===t&&(t=!0),new e(t)},e.prototype.stop=function(){this._stopTime=this._now()},e.prototype.elapsed=function(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime},e.prototype._now=function(){return this._highResolution?n.globals.performance.now():(new Date).getTime()},e}();t.StopWatch=o}),define(d[9],h([0,1,110]),function(e,t,n){"use strict";function i(e){return!e||"string"!=typeof e||0===e.trim().length}function o(e,t,n){void 0===n&&(n="0");for(var i=""+e,o=[i],r=i.length;r<t;r++)o.push(n);return o.reverse().join("")}function r(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return 0===t.length?e:e.replace(B,function(e,n){var i=parseInt(n,10);return isNaN(i)||i<0||i>=t.length?e:t[i]})}function s(e){return e.replace(/[<|>|&]/g,function(e){switch(e){case"<":return"<";case">":return">";case"&":return"&";default:return e}})}function a(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}function u(e,t){void 0===t&&(t=" ");var n=l(e,t);return c(n,t)}function l(e,t){if(!e||!t)return e;var n=t.length;if(0===n||0===e.length)return e;for(var i=0,o=-1;(o=e.indexOf(t,i))===i;)i+=n;return e.substring(i)}function c(e,t){if(!e||!t)return e;var n=t.length,i=e.length;if(0===n||0===i)return e;for(var o=i,r=-1;;){if(r=e.lastIndexOf(t,o-1),r===-1||r+n!==o)break;if(0===r)return"";o=r}return e.substring(0,o)}function d(e){return e.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}function h(e){return e.replace(/\*/g,"")}function p(e,t){if(e.length<t.length)return!1;for(var n=0;n<t.length;n++)if(e[n]!==t[n])return!1;return!0}function f(e,t){var n=e.length-t.length;return n>0?e.indexOf(t,n)===n:0===n&&e===t}function g(e,t,n){void 0===n&&(n=0);var i=e.indexOf(t,n);return i<0&&(n>0&&(e=e.substr(n)),t=a(t),i=e.search(new RegExp(t,"i"))),i}function m(e,t,n){if(void 0===n&&(n={}),""===e)throw new Error("Cannot create regex from empty string");t||(e=e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")),n.wholeWord&&(/\B/.test(e.charAt(0))||(e="\\b"+e),/\B/.test(e.charAt(e.length-1))||(e+="\\b"));var i="";return n.global&&(i+="g"),n.matchCase||(i+="i"),n.multiline&&(i+="m"),new RegExp(e,i)}function v(e){if("^"===e.source||"^$"===e.source||"$"===e.source)return!1;var t=e.exec("");return t&&0===e.lastIndex}function _(e){if(!t.canNormalize||!e)return e;var n=z.get(e);if(n)return n;var i;return i=U.test(e)?e.normalize("NFC"):e,z.set(e,i),i}function y(e){for(var t=0,n=e.length;t<n;t++){var i=e.charCodeAt(t);if(32!==i&&9!==i)return t}return-1}function C(e){for(var t=0,n=e.length;t<n;t++){var i=e.charCodeAt(t);if(32!==i&&9!==i)return e.substring(0,t)}return e}function b(e,t){void 0===t&&(t=e.length-1);for(var n=t;n>=0;n--){var i=e.charCodeAt(n);if(32!==i&&9!==i)return n}return-1}function w(e,t){return e<t?-1:e>t?1:0}function S(e,t){for(var n=Math.min(e.length,t.length),i=0;i<n;i++){var o=e.charCodeAt(i),r=t.charCodeAt(i);if(o!==r){var s=o-r;if(32!==s&&s!==-32||!E(o)||!E(r))return w(e[i].toLowerCase(),t[i].toLowerCase())}}return e.length<t.lLine truncated
|
||||
},e}();t.EventMultiplexer=y,t.fromEventEmitter=r,t.fromCallback=s,t.fromPromise=a,t.delayed=u,t.once=l,t.any=c,t.debounceEvent=d;var C=function(){function e(){this.buffers=[]}return e.prototype.wrapEvent=function(e){var t=this;return function(n,i,o){return e(function(e){var o=t.buffers[t.buffers.length-1];o?o.push(function(){return n.call(i,e)}):n.call(i,e)},void 0,o)}},e.prototype.bufferEvents=function(e){var t=[];this.buffers.push(t),e(),this.buffers.pop(),t.forEach(function(e){return e()})},e}();t.EventBufferer=C,t.mapEvent=h,t.filterEvent=p;var b=function(){function e(e){this._event=e}return Object.defineProperty(e.prototype,"event",{get:function(){return this._event},enumerable:!0,configurable:!0}),e.prototype.map=function(t){return new e(h(this._event,t))},e.prototype.filter=function(t){return new e(p(this._event,t))},e.prototype.on=function(e,t,n){return this._event(e,t,n)},e}();t.chain=f,t.stopwatch=g,t.buffer=m}),define(d[24],h([0,1,18,12]),function(e,t,n,i){"use strict";function o(){return f.INSTANCE.getZoomLevel()}function r(){return f.INSTANCE.getZoomFactor()}function s(){return f.INSTANCE.getPixelRatio()}function a(e){f.INSTANCE.setZoomLevel(e)}function u(e){f.INSTANCE.setZoomFactor(e)}function l(e){return f.INSTANCE.onDidChangeZoomLevel(e)}function c(e){f.INSTANCE.setFullscreen(e)}function d(){return f.INSTANCE.isFullscreen()}function h(e){return f.INSTANCE.onDidChangeFullscreen(e)}function p(e){return(t.isIE||n.isNative)&&document.queryCommandSupported(e)}var f=function(){function e(){this._zoomLevel=0,this._zoomFactor=0,this._pixelRatioCache=0,this._pixelRatioComputed=!1,this._onDidChangeZoomLevel=new i.Emitter,this.onDidChangeZoomLevel=this._onDidChangeZoomLevel.event,this._onDidChangeFullscreen=new i.Emitter,this.onDidChangeFullscreen=this._onDidChangeFullscreen.event}return e.prototype.getZoomLevel=function(){return this._zoomLevel},e.prototype.setZoomLevel=function(e){this._zoomLevel!==e&&(this._zoomLevel=e,this._pixelRatioComputed=!1,this._onDidChangeZoomLevel.fire(this._zoomLevel))},e.prototype.getZoomFactor=function(){return this._zoomFactor},e.prototype.setZoomFactor=function(e){this._zoomFactor=e},e.prototype.getPixelRatio=function(){return this._pixelRatioComputed||(this._pixelRatioCache=this._computePixelRatio(),this._pixelRatioComputed=!0),this._pixelRatioCache},e.prototype._computePixelRatio=function(){var e=document.createElement("canvas").getContext("2d"),t=window.devicePixelRatio||1,n=e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1;return t/n},e.prototype.setFullscreen=function(e){this._fullscreen!==e&&(this._fullscreen=e,this._onDidChangeFullscreen.fire())},e.prototype.isFullscreen=function(){return this._fullscreen},e}();f.INSTANCE=new f,t.getZoomLevel=o,t.getZoomFactor=r,t.getPixelRatio=s,t.setZoomLevel=a,t.setZoomFactor=u,t.onDidChangeZoomLevel=l,t.setFullscreen=c,t.isFullscreen=d,t.onDidChangeFullscreen=h;var g=navigator.userAgent;t.isIE=g.indexOf("Trident")>=0,t.isEdge=g.indexOf("Edge/")>=0,t.isEdgeOrIE=t.isIE||t.isEdge,t.isOpera=g.indexOf("Opera")>=0,t.isFirefox=g.indexOf("Firefox")>=0,t.isWebKit=g.indexOf("AppleWebKit")>=0,t.isChrome=g.indexOf("Chrome")>=0,t.isSafari=g.indexOf("Chrome")===-1&&g.indexOf("Safari")>=0,t.isIPad=g.indexOf("iPad")>=0,t.canUseTranslate3d=!t.isFirefox,t.enableEmptySelectionClipboard=t.isWebKit,t.supportsExecCommand=p}),define(d[124],h([0,1,12]),function(e,t,n){"use strict";function i(e){return n.mapEvent(e,function(e){return e.preventDefault(),e.stopPropagation(),e})}t.domEvent=function(e,t,i){var o=function(e){return r.fire(e)},r=new n.Emitter({onFirstListenerAdd:function(){e.addEventListener(t,o,i)},onLastListenerRemove:function(){e.removeEventListener(t,o,i)}});return r.event},t.stop=i}),define(d[53],h([0,1,31,18,24]),function(e,t,n,i,o){"use strict";function r(e){return a[e.keyCode]||0}function s(e){u=e}var a={};!function(){a[3]=7,a[8]=1,a[9]=2,a[13]=3,a[16]=4,a[17]=5,a[18]=6,a[19]=7,a[20]=8,a[27]=9,a[32]=10,a[33]=11,a[34]=12,a[35]=13,a[36]=14,a[37]=15,a[38]=16,a[39]=17,a[40]=18,a[45]=19,a[46]=20,a[48]=21,a[49]=22,a[50]=23,a[51]=24,a[52]=25,a[53]=26,a[54]=27,a[55]=28,a[56]=29,a[57]=30,a[65]=31,a[66]=32,a[67]=33,a[68]=34,a[69]=35,a[70]=36,a[71]=37,a[72]=38,a[73]=39,a[74]=40,a[75]=41,a[76]=42,a[77]=43,a[78]=44,a[79]=45,a[80]=46,a[81]=47,a[82]=48,a[83]=49,a[84]=50,a[85]=51,a[86]=52,a[87]=53,a[88]=54,a[89]=55,a[90]=56,a[93]=58,a[96]=93,a[97]=94,a[98]=95,a[99]=96,a[100]=97,a[101]=98,a[102]=99,a[103]=100,a[104]=101,a[105]=102,a[106]=103,a[107]=104,a[108]=105,a[109]=106,a[110]=107,a[111]=108,a[112]=59,a[113]=60,a[114]=61,a[115]=62,a[116]=63,a[117]=64,a[118]=65,a[119]=66,a[120]=67,a[121]=68,a[122]=69,a[123]=70,a[124]=71,a[125]=72,a[126]=73,a[127]=74,a[128]=75,a[129]=76,a[130]=77,a[144]=78,a[145]=79,a[186]=80,a[187]=81,a[188]=82,a[189]=83,a[190]=84,a[191]=85,a[192]=86,a[219]=87,a[220]=88,a[221]=89,a[222]=90,a[223]=91,a[226]=92,o.isIE?a[91]=57:o.isFirefLine truncated
|
||||
i("WinJS.Namespace._lazy:"+t+",StopTM"),o=c.uninitialized}return e=null,o=c.initialized,n;case c.working:throw"Illegal: reentrancy on initialization";default:throw"Illegal"}},set:function(e){switch(o){case c.working:throw"Illegal: reentrancy on initialization";default:o=c.initialized,n=e}},enumerable:!0,configurable:!0}}function u(e,i,r){var s=[e],a=null;return i&&(a=n(t,i),s.push(a)),o(s,r,i||"<ANONYMOUS>"),a}var l=e;l.Namespace||(l.Namespace=Object.create(Object.prototype));var c={uninitialized:1,working:2,initialized:3};Object.defineProperties(l.Namespace,{defineWithParent:{value:r,writable:!0,enumerable:!0,configurable:!0},define:{value:s,writable:!0,enumerable:!0,configurable:!0},_lazy:{value:a,writable:!0,enumerable:!0,configurable:!0},_moduleDefine:{value:u,writable:!0,enumerable:!0,configurable:!0}})}(),function(){function t(e,t,i){return e=e||function(){},n.markSupportedForProcessing(e),t&&o(e.prototype,t),i&&o(e,i),e}function i(e,i,r,s){if(e){i=i||function(){};var a=e.prototype;return i.prototype=Object.create(a),n.markSupportedForProcessing(i),Object.defineProperty(i.prototype,"constructor",{value:i,writable:!0,configurable:!0,enumerable:!0}),r&&o(i.prototype,r),s&&o(i,s),i}return t(i,r,s)}function r(e){e=e||function(){};var t,n;for(t=1,n=arguments.length;t<n;t++)o(e.prototype,arguments[t]);return e}e.Namespace.define("WinJS.Class",{define:t,derive:i,mix:r})}(),{Namespace:e.Namespace,Class:e.Class}}),t("WinJS/Core/_ErrorFromName",["WinJS/Core/_Base"],function(e){"use strict";var t=e.Class.derive(Error,function(e,t){this.name=e,this.message=t||e},{},{supportedForProcessing:!1});return e.Namespace.define("WinJS",{ErrorFromName:t}),t}),t("WinJS/Core/_Events",["exports","WinJS/Core/_Base"],function(e,t){"use strict";function n(e){var t="_on"+e+"state";return{get:function(){var e=this[t];return e&&e.userHandler},set:function(n){var i=this[t];n?(i||(i={wrapper:function(e){return i.userHandler(e)},userHandler:n},Object.defineProperty(this,t,{value:i,enumerable:!1,writable:!0,configurable:!0}),this.addEventListener(e,i.wrapper,!1)),i.userHandler=n):i&&(this.removeEventListener(e,i.wrapper,!1),this[t]=null)},enumerable:!0}}function i(){for(var e={},t=0,i=arguments.length;t<i;t++){var o=arguments[t];e["on"+o]=n(o)}return e}var o=t.Class.define(function(e,t,n){this.detail=t,this.target=n,this.timeStamp=Date.now(),this.type=e},{bubbles:{value:!1,writable:!1},cancelable:{value:!1,writable:!1},currentTarget:{get:function(){return this.target}},defaultPrevented:{get:function(){return this._preventDefaultCalled}},trusted:{value:!1,writable:!1},eventPhase:{value:0,writable:!1},target:null,timeStamp:null,type:null,preventDefault:function(){this._preventDefaultCalled=!0},stopImmediatePropagation:function(){this._stopImmediatePropagationCalled=!0},stopPropagation:function(){}},{supportedForProcessing:!1}),r={_listeners:null,addEventListener:function(e,t,n){n=n||!1,this._listeners=this._listeners||{};for(var i=this._listeners[e]=this._listeners[e]||[],o=0,r=i.length;o<r;o++){var s=i[o];if(s.useCapture===n&&s.listener===t)return}i.push({listener:t,useCapture:n})},dispatchEvent:function(e,t){var n=this._listeners&&this._listeners[e];if(n){var i=new o(e,t,this);n=n.slice(0,n.length);for(var r=0,s=n.length;r<s&&!i._stopImmediatePropagationCalled;r++)n[r].listener(i);return i.defaultPrevented||!1}return!1},removeEventListener:function(e,t,n){n=n||!1;var i=this._listeners&&this._listeners[e];if(i)for(var o=0,r=i.length;o<r;o++){var s=i[o];if(s.listener===t&&s.useCapture===n){i.splice(o,1),0===i.length&&delete this._listeners[e];break}}}};t.Namespace._moduleDefine(e,"WinJS.Utilities",{_createEventProperty:n,createEventProperties:i,eventMixin:r})}),t("WinJS/Core/_Trace",["WinJS/Core/_Global"],function(e){"use strict";function t(e){return e}return{_traceAsyncOperationStarting:e.Debug&&e.Debug.msTraceAsyncOperationStarting&&e.Debug.msTraceAsyncOperationStarting.bind(e.Debug)||t,_traceAsyncOperationCompleted:e.Debug&&e.Debug.msTraceAsyncOperationCompleted&&e.Debug.msTraceAsyncOperationCompleted.bind(e.Debug)||t,_traceAsyncCallbackStarting:e.Debug&&e.Debug.msTraceAsyncCallbackStarting&&e.Debug.msTraceAsyncCallbackStarting.bind(e.Debug)||t,_traceAsyncCallbackCompleted:e.Debug&&e.Debug.msTraceAsyncCallbackCompleted&&e.Debug.msTraceAsyncCallbackCompleted.bind(e.Debug)||t}}),t("WinJS/Promise/_StateMachine",["WinJS/Core/_Global","WinJS/Core/_BaseCoreUtils","WinJS/Core/_Base","WinJS/Core/_ErrorFromName","WinJS/Core/_Events","WinJS/Core/_Trace"],function(e,t,n,i,o,r){"use strict";function s(){}function a(e,t){var n;n=t&&"object"==typeof t&&"function"==typeof t.then?O:F,e._value=t,e._setState(n)}function u(e,t,n,i,o,r){return{exception:e,error:t,promise:n,handler:r,id:i,parent:o}}function l(e,t,n,i){var o=n._isException,r=n._errorId;return u(o?t:null,o?null:t,e,r,n,i)}function c(e,t,n){var i=n._isException,o=n._errorId;return C(e,o,i),u(i?t:null,i?null:t,e,o,n)}function d(e,t){var n=++U;return C(e,n),u(null,t,e,n)}function h(e,t){var nLine truncated
|
||||
var o=i[n];o.style.display=""}}function J(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=0,i=e;n<i.length;n++){var o=i[n];o.style.display="none"}}function Q(e,t){for(;e;){if(e instanceof HTMLElement&&e.hasAttribute(t))return e;e=e.parentNode}return null}function ee(e){if(e&&e.hasAttribute("tabIndex")){if(document.activeElement===e){var t=Q(e.parentElement,"tabIndex");t&&t.focus()}e.removeAttribute("tabindex")}}function te(e){return Array.prototype.slice.call(document.getElementsByTagName(e),0)}function ne(e){return function(t){t.preventDefault(),t.stopPropagation(),e(t)}}function ie(){return new n.TPromise(function(e,t){var n=document.readyState;"complete"===n||document&&null!==document.body?window.setImmediate(e):window.addEventListener("DOMContentLoaded",e,!1)})}t.clearNode=d,t.safeStringifyDOMAware=h,t.isInDOM=p;var oe,re;t.hasClass=g,t.addClass=v,t.removeClass=_,t.toggleClass=y;var se=function(){function e(e,t,n,i){this._node=e,this._type=t,this._handler=n,this._useCapture=i||!1,this._node.addEventListener(this._type,this._handler,this._useCapture)}return e.prototype.dispose=function(){this._handler&&(this._node.removeEventListener(this._type,this._handler,this._useCapture),this._node=null,this._handler=null)},e}();t.addDisposableListener=C,t.addStandardDisposableListener=function(e,t,n,i){var o=n;return"click"===t?o=b(n):"keydown"!==t&&"keypress"!==t&&"keyup"!==t||(o=w(n)),C(e,t,o,i)},t.addDisposableNonBubblingMouseOutListener=S;var ae=function(){var e=function(e){return setTimeout(function(){return e((new Date).getTime())},0)},t=self.requestAnimationFrame||self.msRequestAnimationFrame||self.webkitRequestAnimationFrame||self.mozRequestAnimationFrame||self.oRequestAnimationFrame,n=function(e){},i=self.cancelAnimationFrame||self.cancelRequestAnimationFrame||self.msCancelAnimationFrame||self.msCancelRequestAnimationFrame||self.webkitCancelAnimationFrame||self.webkitCancelRequestAnimationFrame||self.mozCancelAnimationFrame||self.mozCancelRequestAnimationFrame||self.oCancelAnimationFrame||self.oCancelRequestAnimationFrame,o=!!t,r=t||e,s=i||n;return{isNative:o,request:function(e){return r(e)},cancel:function(e){return s(e)}}}(),ue=function(){function e(e,t){this._runner=e,this.priority=t,this._canceled=!1}return e.prototype.dispose=function(){this._canceled=!0},e.prototype.execute=function(){if(!this._canceled)try{this._runner()}catch(e){o.onUnexpectedError(e)}},e.sort=function(e,t){return t.priority-e.priority},e}();!function(){var e=[],n=null,i=!1,o=!1,r=function(){for(i=!1,n=e,e=[],o=!0;n.length>0;){n.sort(ue.sort);var t=n.shift();t.execute()}o=!1};t.scheduleAtNextAnimationFrame=function(t,n){void 0===n&&(n=0);var o=new ue(t,n);if(e.push(o),!i)if(i=!0,u.isChrome){var s;ae.request(function(){clearTimeout(s),r()}),s=setTimeout(r,1e3)}else ae.request(r);return o},t.runAtThisOrScheduleAtNextAnimationFrame=function(e,i){if(o){var r=new ue(e,i);return n.push(r),r}return t.scheduleAtNextAnimationFrame(e,i)}}();var le=16,ce=function(e,t){return t},de=function(e){function t(t,n,o,r,s){void 0===r&&(r=ce),void 0===s&&(s=le);var a=e.call(this)||this,u=null,l=0,c=a._register(new i.TimeoutTimer),d=function(){l=(new Date).getTime(),o(u),u=null};return a._register(C(t,n,function(e){u=r(u,e);var t=(new Date).getTime()-l;t>=s?(c.cancel(),d()):c.setIfNotSet(d,s-t)})),a}return m(t,e),t}(s.Disposable);t.addDisposableThrottledListener=E,t.getComputedStyle=L;var he=function(){return function(e,t){return parseFloat(t)||0}}(),pe={getBorderLeftWidth:function(e){return N(e,"border-left-width","borderLeftWidth")},getBorderTopWidth:function(e){return N(e,"border-top-width","borderTopWidth")},getBorderRightWidth:function(e){return N(e,"border-right-width","borderRightWidth")},getBorderBottomWidth:function(e){return N(e,"border-bottom-width","borderBottomWidth")},getPaddingLeft:function(e){return N(e,"padding-left","paddingLeft")},getPaddingTop:function(e){return N(e,"padding-top","paddingTop")},getPaddingRight:function(e){return N(e,"padding-right","paddingRight")},getPaddingBottom:function(e){return N(e,"padding-bottom","paddingBottom")},getMarginLeft:function(e){return N(e,"margin-left","marginLeft")},getMarginTop:function(e){return N(e,"margin-top","marginTop")},getMarginRight:function(e){return N(e,"margin-right","marginRight")},getMarginBottom:function(e){return N(e,"margin-bottom","marginBottom")},__commaSentinel:!1};t.getTopLeftOffset=T,t.getDomNodePagePosition=x,t.StandardWindow=new(function(){function e(){}return Object.defineProperty(e.prototype,"scrollX",{get:function(){return"number"==typeof window.scrollX?window.scrollX:document.body.scrollLeft+document.documentElement.scrollLeft},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"scrollY",{get:function(){return"number"==typeof window.scrollY?window.scrollY:document.body.scrollTop+document.documentElement.scrollTop},enumerable:!0,configurable:!0}),e}()),t.getContentWidth=M,t.getTotalWidth=I,t.getTotalScrollWidth=D,t.getContentHeightLine truncated
|
||||
},t.prototype._domNodeMouseDown=function(e){e.target===this.domNode.domNode&&this._onMouseDown(e)},t.prototype.delegateMouseDown=function(e){var t=new o.StandardMouseEvent(e),n=this.domNode.domNode.getClientRects()[0].top,i=n+this._scrollbarState.getSliderPosition(),r=n+this._scrollbarState.getSliderPosition()+this._scrollbarState.getSliderSize(),s=this._sliderMousePosition(t);i<=s&&s<=r?this._sliderMouseDown(t):this._onMouseDown(t)},t.prototype._onMouseDown=function(e){var t=i.getDomNodePagePosition(this.domNode.domNode),n=this._mouseDownRelativePosition(e,t)-this._scrollbarState.getArrowSize()-this._scrollbarState.getSliderSize()/2;this.setDesiredScrollPosition(this._scrollbarState.convertSliderPositionToScrollPosition(n)),this._sliderMouseDown(e)},t.prototype._sliderMouseDown=function(e){var t=this;if(e.leftButton){var i=this._sliderOrthogonalMousePosition(e),o=this._getScrollPosition(),s=this._sliderMousePosition(e)-this._scrollbarState.getSliderPosition();this.slider.toggleClassName("active",!0),this._mouseMoveMonitor.startMonitoring(r.standardMouseMoveMerger,function(e){var r=t._sliderOrthogonalMousePosition(e),a=Math.abs(r-i);if(n.isWindows&&a>c)t.setDesiredScrollPosition(o);else{var u=t._sliderMousePosition(e)-s;t.setDesiredScrollPosition(t._scrollbarState.convertSliderPositionToScrollPosition(u))}},function(){t.slider.toggleClassName("active",!1),t._host.onDragEnd()}),e.preventDefault(),this._host.onDragStart()}},t.prototype.validateScrollPosition=function(e){return this._scrollbarState.validateScrollPosition(e)},t.prototype.setDesiredScrollPosition=function(e){e=this.validateScrollPosition(e);var t=this._getScrollPosition();this._setScrollPosition(e);var n=this._getScrollPosition();return t!==n&&(this._onElementScrollPosition(this._getScrollPosition()),!0)},t}(s.Widget);t.AbstractScrollbar=d}),define(d[500],h([0,1,143,36,40,138,117]),function(e,t,n,i,o,r,s){"use strict";var a=function(e){function t(t,n,a){var u=e.call(this,{canUseTranslate3d:n.canUseTranslate3d,lazyRender:n.lazyRender,host:a,scrollbarState:new r.ScrollbarState(n.horizontalHasArrows?n.arrowSize:0,n.horizontal===o.ScrollbarVisibility.Hidden?0:n.horizontalScrollbarSize,n.vertical===o.ScrollbarVisibility.Hidden?0:n.verticalScrollbarSize),visibility:n.horizontal,extraScrollbarClassName:"horizontal",scrollable:t})||this;if(n.horizontalHasArrows){var l=(n.arrowSize-s.ARROW_IMG_SIZE)/2,c=(n.horizontalScrollbarSize-s.ARROW_IMG_SIZE)/2;u._createArrow({className:"left-arrow",top:c,left:l,bottom:void 0,right:void 0,bgWidth:n.arrowSize,bgHeight:n.horizontalScrollbarSize,onActivate:function(){return u._host.onMouseWheel(new i.StandardMouseWheelEvent(null,1,0))}}),u._createArrow({className:"right-arrow",top:c,left:void 0,bottom:void 0,right:l,bgWidth:n.arrowSize,bgHeight:n.horizontalScrollbarSize,onActivate:function(){return u._host.onMouseWheel(new i.StandardMouseWheelEvent(null,-1,0))}})}return u._createSlider(Math.floor((n.horizontalScrollbarSize-n.horizontalSliderSize)/2),0,null,n.horizontalSliderSize),u}return m(t,e),t.prototype._updateSlider=function(e,t){this.slider.setWidth(e),this._canUseTranslate3d?(this.slider.setTransform("translate3d("+t+"px, 0px, 0px)"),this.slider.setLeft(0)):(this.slider.setTransform(""),this.slider.setLeft(t))},t.prototype._renderDomNode=function(e,t){this.domNode.setWidth(e),this.domNode.setHeight(t),this.domNode.setLeft(0),this.domNode.setBottom(0)},t.prototype.onDidScroll=function(e){return this._shouldRender=this._onElementScrollSize(e.scrollWidth)||this._shouldRender,this._shouldRender=this._onElementScrollPosition(e.scrollLeft)||this._shouldRender,this._shouldRender=this._onElementSize(e.width)||this._shouldRender,this._shouldRender},t.prototype._mouseDownRelativePosition=function(e,t){return e.posx-t.left},t.prototype._sliderMousePosition=function(e){return e.posx},t.prototype._sliderOrthogonalMousePosition=function(e){return e.posy},t.prototype._getScrollPosition=function(){return this._scrollable.getScrollLeft()},t.prototype._setScrollPosition=function(e){this._scrollable.updateState({scrollLeft:e})},t}(n.AbstractScrollbar);t.HorizontalScrollbar=a}),define(d[501],h([0,1,143,36,40,138,117]),function(e,t,n,i,o,r,s){"use strict";var a=function(e){function t(t,n,a){var u=e.call(this,{canUseTranslate3d:n.canUseTranslate3d,lazyRender:n.lazyRender,host:a,scrollbarState:new r.ScrollbarState(n.verticalHasArrows?n.arrowSize:0,n.vertical===o.ScrollbarVisibility.Hidden?0:n.verticalScrollbarSize,0),visibility:n.vertical,extraScrollbarClassName:"vertical",scrollable:t})||this;if(n.verticalHasArrows){var l=(n.arrowSize-s.ARROW_IMG_SIZE)/2,c=(n.verticalScrollbarSize-s.ARROW_IMG_SIZE)/2;u._createArrow({className:"up-arrow",top:l,left:c,bottom:void 0,right:void 0,bgWidth:n.verticalScrollbarSize,bgHeight:n.arrowSize,onActivate:function(){return u._host.onMouseWheel(new i.StandardMouseWheelEvent(null,0,1))}}),u._createArrow({className:"down-arrow",top:void 0,left:c,bottom:l,right:void 0,bgWidth:n.verticalScrollbarSize,bgHLine truncated
|
||||
n);r++)i=n;this.setFocus(i,t)},t.prototype.focusParent=function(e){var t=this.getFocus()||this.input,n=this.getNavigator(t,!1),i=n.parent();i&&this.setFocus(i,e)},t.prototype.focusFirstChild=function(e){var t=this.getItem(this.getFocus()||this.input),n=this.getNavigator(t,!1),i=n.next(),o=n.parent();o===t&&this.setFocus(i,e)},t.prototype.focusFirst=function(e){this.focusNth(0,e)},t.prototype.focusNth=function(e,t){for(var n=this.getNavigator(this.input),i=n.first(),o=0;o<e;o++)i=n.next();i&&this.setFocus(i,t)},t.prototype.focusLast=function(e){var t=this.getNavigator(this.input),n=t.last();n&&this.setFocus(n,e)},t.prototype.getNavigator=function(e,t){return void 0===e&&(e=null),void 0===t&&(t=!0),new f(this.getItem(e),t)},t.prototype.getItem=function(e){return void 0===e&&(e=null),null===e?this.input:e instanceof h?e:"string"==typeof e?this.registry.getItem(e):this.registry.getItem(this.context.dataSource.getId(this.context.tree,e))},t.prototype.addTraits=function(e,t){for(var n,i=this.traitsToItems[e]||{},o=0,r=t.length;o<r;o++)n=this.getItem(t[o]),n&&(n.addTrait(e),i[n.id]=n);this.traitsToItems[e]=i},t.prototype.removeTraits=function(e,t){var n,i,o=this.traitsToItems[e]||{};if(0===t.length){for(i in o)o.hasOwnProperty(i)&&(n=o[i],n.removeTrait(e));delete this.traitsToItems[e]}else for(var r=0,s=t.length;r<s;r++)n=this.getItem(t[r]),n&&(n.removeTrait(e),delete o[n.id])},t.prototype.hasTrait=function(e,t){var n=this.getItem(t);return n&&n.hasTrait(e)},t.prototype.toggleTrait=function(e,t){var n=this.getItem(t);n&&(n.hasTrait(e)?this.removeTraits(e,[t]):this.addTraits(e,[t]))},t.prototype.setTraits=function(e,t){if(0===t.length)this.removeTraits(e,t);else{for(var n,i={},o=0,r=t.length;o<r;o++)n=this.getItem(t[o]),n&&(i[n.id]=n);var s,a=this.traitsToItems[e]||{},u=[];for(s in a)a.hasOwnProperty(s)&&(i.hasOwnProperty(s)?delete i[s]:u.push(a[s]));for(var o=0,r=u.length;o<r;o++)n=u[o],n.removeTrait(e),delete a[n.id];for(s in i)i.hasOwnProperty(s)&&(n=i[s],n.addTrait(e),a[s]=n);this.traitsToItems[e]=a}},t.prototype.getElementsWithTrait=function(e,t){var n,i=[],o=this.traitsToItems[e]||{};for(n in o)o.hasOwnProperty(n)&&(o[n].isVisible()||t)&&i.push(o[n].getElement());return i},t.prototype.dispose=function(){this.registry&&(this.registry.dispose(),this.registry=null),e.prototype.dispose.call(this)},t}(s.EventEmitter);t.TreeModel=g}),define(d[186],h([0,1,25,77]),function(e,t,n,i){"use strict";var o=function(e){function t(){var t=e.call(this)||this;return t.heightMap=[],t.indexes={},t}return m(t,e),t.prototype.getTotalHeight=function(){var e=this.heightMap[this.heightMap.length-1];return e?e.top+e.height:0},t.prototype.onInsertItems=function(e,t){void 0===t&&(t=null);var n,i,o,r,s,a=0;if(null===t)o=0,s=0;else{if(o=this.indexes[t]+1,i=this.heightMap[o-1],!i)return void console.error("view item doesnt exist");s=i.top+i.height}for(var u=this.heightMap.splice.bind(this.heightMap,o,0),l=[];n=e.next();)i=this.createViewItem(n),i.top=s+a,this.emit("viewItem:create",{item:i.model}),this.indexes[n.id]=o++,l.push(i),a+=i.height;for(u.apply(this.heightMap,l),r=o;r<this.heightMap.length;r++)i=this.heightMap[r],i.top+=a,this.indexes[i.model.id]=r;for(r=l.length-1;r>=0;r--)this.onInsertItem(l[r]);for(r=this.heightMap.length-1;r>=o;r--)this.onRefreshItem(this.heightMap[r]);return a},t.prototype.onInsertItem=function(e){},t.prototype.onRemoveItems=function(e){for(var t,n,i,o=null,r=0;t=e.next();){if(i=this.indexes[t],n=this.heightMap[i],!n)return void console.error("view item doesnt exist");r-=n.height,delete this.indexes[t],this.onRemoveItem(n),null===o&&(o=i)}if(0!==r)for(this.heightMap.splice(o,i-o+1),i=o;i<this.heightMap.length;i++)n=this.heightMap[i],n.top+=r,this.indexes[n.model.id]=i,this.onRefreshItem(n)},t.prototype.onRemoveItem=function(e){},t.prototype.onRefreshItemSet=function(e){var t=this,n=e.sort(function(e,n){return t.indexes[e.id]-t.indexes[n.id]});this.onRefreshItems(new i.ArrayIterator(n))},t.prototype.onRefreshItems=function(e){for(var t,n,i,o,r=null,s=0;t=e.next();){for(o=this.indexes[t.id];0!==s&&null!==r&&r<o;r++)n=this.heightMap[r],n.top+=s,this.onRefreshItem(n);n=this.heightMap[o],i=t.getHeight(),n.top+=s,s+=i-n.height,n.height=i,this.onRefreshItem(n,!0),r=o+1}if(0!==s&&null!==r)for(;r<this.heightMap.length;r++)n=this.heightMap[r],n.top+=s,this.onRefreshItem(n)},t.prototype.onRefreshItem=function(e,t){void 0===t&&(t=!1)},t.prototype.itemsCount=function(){return this.heightMap.length},t.prototype.itemAt=function(e){return this.heightMap[this.indexAt(e)].model.id},t.prototype.withItemsInRange=function(e,t,n){e=this.indexAt(e),t=this.indexAt(t);for(var i=e;i<=t;i++)n(this.heightMap[i].model.id)},t.prototype.indexAt=function(e){for(var t,n,i=0,o=this.heightMap.length;i<o;)if(t=Math.floor((i+o)/2),n=this.heightMap[t],e<n.top)o=t;else{if(!(e>=n.top+n.height))return t;if(i===t)break;i=t}return this.heightMap.length},t.prototype.indexAfter=function(e){return Math.min(this.indexAt(e)+1,this.heightMap.length)},t.proLine truncated
|
||||
if(this.isVisible()){if(this.delegate.canRelayout===!1)return void this.hide();this.delegate.layout&&this.delegate.layout(),this.doLayout()}},t.prototype.doLayout=function(){var e,t=this.delegate.getAnchor();if(i.isHTMLElement(t)){var n=i.getDomNodePagePosition(t);e={top:n.top,left:n.left,width:n.width,height:n.height}}else{var o=t;e={top:o.y,left:o.x,width:o.width||0,height:o.height||0}}var r={top:i.StandardWindow.scrollY,left:i.StandardWindow.scrollX,height:window.innerHeight,width:window.innerWidth},l=this.$view.getTotalSize(),c={width:l.width,height:l.height},d=this.delegate.anchorPosition||u.BELOW,h=this.delegate.anchorAlignment||a.LEFT,p=s(c,e,r,d,h),f=i.getDomNodePagePosition(this.$container.getHTMLElement());p.top-=f.top,p.left-=f.left,this.$view.removeClass("top","bottom","left","right"),this.$view.addClass(d===u.BELOW?"bottom":"top"),this.$view.addClass(h===a.LEFT?"left":"right"),this.$view.style({top:p.top+"px",left:p.left+"px",width:"initial"})},t.prototype.hide=function(e){this.delegate&&this.delegate.onHide&&this.delegate.onHide(e),this.delegate=null,this.toDisposeOnClean&&(this.toDisposeOnClean.dispose(),this.toDisposeOnClean=null),this.$view.hide()},t.prototype.isVisible=function(){return!!this.delegate},t.prototype.onDOMEvent=function(e,t,n){this.delegate&&(this.delegate.onDOMEvent?this.delegate.onDOMEvent(e,document.activeElement):n&&!i.isAncestor(e.target,this.$container.getHTMLElement())&&this.hide())},t.prototype.dispose=function(){e.prototype.dispose.call(this),this.hide(),this.toDispose=o.dispose(this.toDispose)},t}(r.EventEmitter);l.BUBBLE_UP_EVENTS=["click","keydown","focus","blur"],l.BUBBLE_DOWN_EVENTS=["click"],t.ContextView=l}),define(d[214],h([5]),{}),define(d[217],h([0,1,11,9,214]),function(e,t,n,i){"use strict";var o=function(){function e(e,t,i){this.element=n.append(e,n.$(".monaco-count-badge")),this.titleFormat=i||"",this.setCount(t||0)}return e.prototype.setCount=function(e){this.count=e,this.render()},e.prototype.setTitleFormat=function(e){this.titleFormat=e,this.render()},e.prototype.render=function(){this.element.textContent=""+this.count,this.element.title=i.format(this.titleFormat,this.count)},e}();t.CountBadge=o}),define(d[219],h([5]),{}),define(d[221],h([5]),{}),define(d[228],h([5]),{}),define(d[133],h([0,1,11,112,39,22,165,228]),function(e,t,n,i,o,r,s){"use strict";function a(e){if(!e)return null;if(r.isFunction(e.getWorkspace)){var t=e.getWorkspace();return t?t.resource.fsPath:void 0}return e.fsPath}var u=function(){function e(e,t){this.domNode=n.append(e,n.$(".monaco-icon-label")),t&&t.supportHighlights?this.labelNode=new i.HighlightedLabel(n.append(this.domNode,n.$("a.label-name"))):this.labelNode=n.append(this.domNode,n.$("a.label-name")),this.descriptionNode=n.append(this.domNode,n.$("span.label-description"))}return Object.defineProperty(e.prototype,"element",{get:function(){return this.domNode},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"labelElement",{get:function(){var e=this.labelNode;return e instanceof i.HighlightedLabel?e.element:e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"descriptionElement",{get:function(){return this.descriptionNode},enumerable:!0,configurable:!0}),e.prototype.setValue=function(e,t,o){var r=this.labelNode;r instanceof i.HighlightedLabel?r.set(e||"",o?o.matches:void 0):r.textContent=e||"",this.descriptionNode.textContent=t||"",t?n.removeClass(this.descriptionNode,"empty"):n.addClass(this.descriptionNode,"empty"),this.domNode.title=o&&o.title?o.title:"";var s=["monaco-icon-label"];o&&(o.extraClasses&&s.push.apply(s,o.extraClasses),o.italic&&s.push("italic")),this.domNode.className=s.join(" ")},e.prototype.dispose=function(){var e=this.labelNode;e instanceof i.HighlightedLabel&&e.dispose()},e}();t.IconLabel=u;var l=function(e){function t(t,n,i){var o=e.call(this,t)||this;return o.setFile(n,i),o}return m(t,e),t.prototype.setFile=function(e,t){var n=a(e),i=o.dirname(n);this.setValue(o.basename(n),i&&"."!==i?s.getPathLabel(i,t):"",{title:n})},t}(u);t.FileLabel=l}),define(d[236],h([5]),{}),define(d[240],h([5]),{}),define(d[243],h([0,1,34,240]),function(e,t,n){"use strict";var i=function(){function e(e,t,i){this.$el=n.$(".monaco-left-right-widget").appendTo(e),this.toDispose=[i(n.$(".right").appendTo(this.$el).getHTMLElement()),t(n.$("span.left").appendTo(this.$el).getHTMLElement())].filter(function(e){return!!e})}return e.prototype.dispose=function(){this.$el&&(this.$el.destroy(),this.$el=null)},e}();t.LeftRightWidget=i}),define(d[245],h([5]),{}),define(d[246],h([5]),{}),define(d[134],h([5]),{}),define(d[250],h([0,1,6,55,34,11,4,134]),function(e,t,n,i,o,r,s){"use strict";var a="done",u="active",l="infinite",c="discrete",d="progress-container",h="progress-bit",p=function(){function e(e){this.toUnbind=[],this.workedVal=0,this.create(e)}return e.prototype.create=function(e){var t=this;e.div({class:d},function(e){t.element=e.clone(),e.div({class:h}).on([r.EventType.ANIMATION_START,r.EventType.ANLine truncated
|
||||
this.view.domNode.tabIndex=0,this.controller=new f(this,this.view),this.disposables=[this.focus,this.selection,this.view,this.controller],this._onDOMFocus=l.domEvent(this.view.domNode,"focus"),this.onFocusChange(this._onFocusChange,this,this.disposables),o.ariaLabel&&this.view.domNode.setAttribute("aria-label",o.ariaLabel)}return Object.defineProperty(e.prototype,"onFocusChange",{get:function(){var e=this;return this.eventBufferer.wrapEvent(u.mapEvent(this.focus.onChange,function(t){return e.toListEvent(t)}))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onSelectionChange",{get:function(){var e=this;return this.eventBufferer.wrapEvent(u.mapEvent(this.selection.onChange,function(t){return e.toListEvent(t)}))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onContextMenu",{get:function(){var e=this;return u.fromCallback(function(t){return e.view.addListener("contextmenu",t)})},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onDOMFocus",{get:function(){return this._onDOMFocus},enumerable:!0,configurable:!0}),e.prototype.splice=function(e,t,n){var i=this;void 0===n&&(n=[]),this.eventBufferer.bufferEvents(function(){i.focus.splice(e,t,n.length),i.selection.splice(e,t,n.length),i.view.splice(e,t,n)})},Object.defineProperty(e.prototype,"length",{get:function(){return this.view.length},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"contentHeight",{get:function(){return this.view.getContentHeight()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"scrollTop",{get:function(){return this.view.getScrollTop()},set:function(e){this.view.setScrollTop(e)},enumerable:!0,configurable:!0}),e.prototype.layout=function(e){this.view.layout(e)},e.prototype.setSelection=function(e){var t=this;this.eventBufferer.bufferEvents(function(){e=e.concat(t.selection.set(e)),e.forEach(function(e){return t.view.splice(e,1,[t.view.element(e)])})})},e.prototype.selectNext=function(e,t){if(void 0===e&&(e=1),void 0===t&&(t=!1),0!==this.length){var n=this.selection.get(),i=n.length>0?n[0]+e:0;this.setSelection(t?[i%this.length]:[Math.min(i,this.length-1)])}},e.prototype.selectPrevious=function(e,t){if(void 0===e&&(e=1),void 0===t&&(t=!1),0!==this.length){var n=this.selection.get(),i=n.length>0?n[0]-e:0;t&&i<0&&(i=this.length+i%this.length),this.setSelection([Math.max(i,0)])}},e.prototype.getSelection=function(){return this.selection.get()},e.prototype.setFocus=function(e){var t=this;this.eventBufferer.bufferEvents(function(){e=e.concat(t.focus.set(e)),e.forEach(function(e){return t.view.splice(e,1,[t.view.element(e)])})})},e.prototype.focusNext=function(e,t){if(void 0===e&&(e=1),void 0===t&&(t=!1),0!==this.length){var n=this.focus.get(),i=n.length>0?n[0]+e:0;this.setFocus(t?[i%this.length]:[Math.min(i,this.length-1)])}},e.prototype.focusPrevious=function(e,t){if(void 0===e&&(e=1),void 0===t&&(t=!1),0!==this.length){var n=this.focus.get(),i=n.length>0?n[0]-e:0;t&&i<0&&(i=(this.length+i%this.length)%this.length),this.setFocus([Math.max(i,0)])}},e.prototype.focusNextPage=function(){var e=this,t=this.view.indexAt(this.view.getScrollTop()+this.view.renderHeight);t=0===t?0:t-1;var n=this.view.element(t),i=this.getFocusedElements()[0];if(i!==n)this.setFocus([t]);else{var o=this.view.getScrollTop();this.view.setScrollTop(o+this.view.renderHeight-this.view.elementHeight(t)),this.view.getScrollTop()!==o&&setTimeout(function(){return e.focusNextPage()},0)}},e.prototype.focusPreviousPage=function(){var e,t=this,n=this.view.getScrollTop();e=0===n?this.view.indexAt(n):this.view.indexAfter(n-1);var i=this.view.element(e),o=this.getFocusedElements()[0];if(o!==i)this.setFocus([e]);else{var r=n;this.view.setScrollTop(n-this.view.renderHeight),this.view.getScrollTop()!==r&&setTimeout(function(){return t.focusPreviousPage()},0)}},e.prototype.getFocus=function(){return this.focus.get()},e.prototype.getFocusedElements=function(){var e=this;return this.getFocus().map(function(t){return e.view.element(t)})},e.prototype.reveal=function(e,t){var n=this.view.getScrollTop(),o=this.view.elementTop(e),r=this.view.elementHeight(e);if(i.isNumber(t)){t=t<0?0:t,t=t>1?1:t;var s=r-this.view.renderHeight;this.view.setScrollTop(s*t+o)}else{var a=o+r,u=n+this.view.renderHeight;o<n?this.view.setScrollTop(o):a>=u&&this.view.setScrollTop(a-this.view.renderHeight)}},e.prototype.getElementId=function(e){return this.idPrefix+"_"+e},e.prototype.toListEvent=function(e){var t=this,n=e.indexes;return{indexes:n,elements:n.map(function(e){return t.view.element(e)})}},e.prototype._onFocusChange=function(){var e=this.focus.get();e.length>0?this.view.domNode.setAttribute("aria-activedescendant",this.getElementId(e[0])):this.view.domNode.removeAttribute("aria-activedescendant"),this.view.domNode.setAttribute("role","tree"),r.toggleClass(this.view.domNode,"element-focused",e.length>0)},e.prototype.dispose=function(){this.disposables=n.dispose(this.disposables)},e}();v.InstanceCount=0,y([o.memoize],v.protLine truncated
|
||||
n&&n.element&&(t=n.element),e.insertInDOM(this.rowsContainer,t)},t.prototype.removeItemFromDOM=function(e){e.removeFromDOM()},t.prototype.shouldBeRendered=function(e){return e.top<this.lastRenderTop+this.lastRenderHeight&&e.top+e.height>this.lastRenderTop},t.prototype.getItemAround=function(e){var n=this.inputItem;do{if(e[t.BINDING]&&(n=e[t.BINDING]),e===this.wrapper||e===this.domNode)return n;if(e===document.body)return null}while(e=e.parentElement)},t.prototype.releaseModel=function(){this.model&&(this.modelListeners=r.dispose(this.modelListeners),this.model=null)},t.prototype.dispose=function(){this.scrollableElement.dispose(),this.releaseModel(),this.modelListeners=null,this.viewListeners=r.dispose(this.viewListeners),this.domNode.parentNode&&this.domNode.parentNode.removeChild(this.domNode),this.domNode=null,this.wrapperGesture&&(this.wrapperGesture.dispose(),this.wrapperGesture=null),this.context.cache&&(this.context.cache.dispose(),this.context.cache=null),e.prototype.dispose.call(this)},t}(v.HeightMap);L.BINDING="monaco-tree-row",L.LOADING_DECORATION_DELAY=800,L.currentExternalDragAndDropData=null,t.TreeView=L}),define(d[269],h([5]),{}),define(d[274],h([0,1,4,12,37,11,26,269]),function(e,t,n,i,o,r,s){"use strict";var a=function(e){function t(t,n){var o=e.call(this)||this;return o.selectElement=document.createElement("select"),o.selectElement.className="select-box",o.setOptions(t,n),o.toDispose=[],o._onDidSelect=new i.Emitter,o.toDispose.push(r.addStandardDisposableListener(o.selectElement,"change",function(e){o.selectElement.title=e.target.value,o._onDidSelect.fire(e.target.value)})),o}return m(t,e),Object.defineProperty(t.prototype,"onDidSelect",{get:function(){return this._onDidSelect.event},enumerable:!0,configurable:!0}),t.prototype.setOptions=function(e,t,n){var i=this;if(!this.options||!s.equals(this.options,e)){this.options=e,this.selectElement.options.length=0;var o=0;this.options.forEach(function(e){i.selectElement.add(i.createOption(e,n===o++))})}this.select(t)},t.prototype.select=function(e){e>=0&&e<this.options.length?this.selected=e:this.selected<0&&(this.selected=0),this.selectElement.selectedIndex=this.selected,this.selectElement.title=this.options[this.selected]},t.prototype.focus=function(){this.selectElement&&this.selectElement.focus()},t.prototype.blur=function(){this.selectElement&&this.selectElement.blur()},t.prototype.render=function(e){this.container=e,r.addClass(e,"select-container"),e.appendChild(this.selectElement),this.setOptions(this.options,this.selected)},t.prototype.createOption=function(e,t){var n=document.createElement("option");return n.value=e,n.text=e,n.disabled=t,n},t.prototype.dispose=function(){this.toDispose=n.dispose(this.toDispose),e.prototype.dispose.call(this)},t}(o.Widget);t.SelectBox=a}),define(d[275],h([5]),{}),define(d[327],h([5]),{}),define(d[328],h([5]),{}),define(d[329],h([5]),{}),define(d[330],h([5]),{}),define(d[331],h([5]),{}),define(d[332],h([5]),{}),define(d[333],h([5]),{}),define(d[335],h([5]),{}),define(d[337],h([5]),{}),define(d[338],h([5]),{}),define(d[339],h([5]),{}),define(d[340],h([5]),{}),define(d[343],h([5]),{}),define(d[347],h([5]),{}),define(d[348],h([5]),{}),define(d[351],h([5]),{}),define(d[352],h([5]),{}),define(d[354],h([5]),{}),define(d[355],h([5]),{}),define(d[362],h([5]),{}),define(d[364],h([5]),{}),define(d[365],h([5]),{}),define(d[368],h([5]),{}),define(d[370],h([5]),{}),define(d[372],h([5]),{}),define(d[373],h([5]),{}),define(d[374],h([5]),{}),define(d[375],h([5]),{}),define(d[378],h([5]),{}),define(d[386],h([5]),{}),define(d[402],h([5]),{}),define(d[406],h([5]),{}),define(d[407],h([5]),{}),define(d[409],h([5]),{}),define(d[413],h([5]),{}),define(d[414],h([5]),{}),define(d[417],h([5]),{}),define(d[418],h([5]),{}),define(d[420],h([5]),{}),define(d[422],h([5]),{}),define(d[423],h([5]),{}),define(d[424],h([5]),{}),define(d[425],h([5]),{}),define(d[429],h([5]),{}),define(d[430],h([0,1]),function(e,t){"use strict";function n(e,t){var n=new r(e,t);n.read()}var i;!function(e){e[e.Regular=0]="Regular",e[e.Italic=1]="Italic",e[e.Bold=2]="Bold"}(i=t.CharWidthRequestType||(t.CharWidthRequestType={}));var o=function(){function e(e,t){this.chr=e,this.type=t,this.width=0}return e.prototype.fulfill=function(e){this.width=e},e}();t.CharWidthRequest=o;var r=function(){function e(e,t){this._bareFontInfo=e,this._requests=t,this._container=null,this._testElements=null}return e.prototype.read=function(){this._createDomElements(),document.body.appendChild(this._container),this._readFromDomElements(),document.body.removeChild(this._container),this._container=null,this._testElements=null},e.prototype._createDomElements=function(){var t=document.createElement("div");t.style.position="absolute",t.style.top="-50000px",t.style.width="50000px";var n=document.createElement("div");n.style.fontFamily=this._bareFontInfo.fontFamily,n.style.fontWeight=this._bareFontInfo.fontWeight,n.style.fontSize=this._bareFontInfo.fontSize+"px",n.style.lineHeight=this._baLine truncated
|
||||
}return m(t,e),t._getFirstNonBlankColumn=function(e,t){var n=i.firstNonWhitespaceIndex(e);return n===-1?t:n+1},t._getLastNonBlankColumn=function(e,t){var n=i.lastNonWhitespaceIndex(e);return n===-1?t:n+2},t.prototype.getCharSequence=function(e,t){var n,i,o,r,s=[],a=[];for(n=e;n<=t;n++)for(o=this.startMarkers[n],r=this.endMarkers[n],i=o.offset;i<r.offset;i++)s.push({offset:i,lineNumber:o.lineNumber,column:o.column+(i-o.offset)}),a.push({offset:i+1,lineNumber:o.lineNumber,column:o.column+(i-o.offset)+1});return new u(this.buffer,s,a)},t}(u),c=function(){function e(e,t,n){0===e.originalLength?(this.originalStartLineNumber=0,this.originalStartColumn=0,this.originalEndLineNumber=0,this.originalEndColumn=0):(this.originalStartLineNumber=t.getStartLineNumber(e.originalStart),this.originalStartColumn=t.getStartColumn(e.originalStart),this.originalEndLineNumber=t.getEndLineNumber(e.originalStart+e.originalLength-1),this.originalEndColumn=t.getEndColumn(e.originalStart+e.originalLength-1)),0===e.modifiedLength?(this.modifiedStartLineNumber=0,this.modifiedStartColumn=0,this.modifiedEndLineNumber=0,this.modifiedEndColumn=0):(this.modifiedStartLineNumber=n.getStartLineNumber(e.modifiedStart),this.modifiedStartColumn=n.getStartColumn(e.modifiedStart),this.modifiedEndLineNumber=n.getEndLineNumber(e.modifiedStart+e.modifiedLength-1),this.modifiedEndColumn=n.getEndColumn(e.modifiedStart+e.modifiedLength-1))}return e}(),d=function(){function e(e,t,n,i,s){if(0===e.originalLength?(this.originalStartLineNumber=t.getStartLineNumber(e.originalStart)-1,this.originalEndLineNumber=0):(this.originalStartLineNumber=t.getStartLineNumber(e.originalStart),this.originalEndLineNumber=t.getEndLineNumber(e.originalStart+e.originalLength-1)),0===e.modifiedLength?(this.modifiedStartLineNumber=n.getStartLineNumber(e.modifiedStart)-1,this.modifiedEndLineNumber=0):(this.modifiedStartLineNumber=n.getStartLineNumber(e.modifiedStart),this.modifiedEndLineNumber=n.getEndLineNumber(e.modifiedStart+e.modifiedLength-1)),0!==e.originalLength&&0!==e.modifiedLength&&i()){var a=t.getCharSequence(e.originalStart,e.originalStart+e.originalLength-1),u=n.getCharSequence(e.modifiedStart,e.modifiedStart+e.modifiedLength-1),l=o(a,u,i);s&&(l=r(l)),this.charChanges=[];for(var d=0,h=l.length;d<h;d++)this.charChanges.push(new c(l[d],a,u))}}return e}(),h=function(){function e(e,t,n){this.shouldPostProcessCharChanges=n.shouldPostProcessCharChanges,this.shouldIgnoreTrimWhitespace=n.shouldIgnoreTrimWhitespace,this.maximumRunTimeMs=s,this.original=new l(e,this.shouldIgnoreTrimWhitespace),this.modified=new l(t,this.shouldIgnoreTrimWhitespace),n.shouldConsiderTrimWhitespaceInEmptyCase&&this.shouldIgnoreTrimWhitespace&&this.original.equals(this.modified)&&(this.shouldIgnoreTrimWhitespace=!1,this.original=new l(e,this.shouldIgnoreTrimWhitespace),this.modified=new l(t,this.shouldIgnoreTrimWhitespace))}return e.prototype.computeDiff=function(){this.computationStartTime=(new Date).getTime();for(var e=o(this.original,this.modified,this._continueProcessingPredicate.bind(this)),t=[],n=0,i=e.length;n<i;n++)t.push(new d(e[n],this.original,this.modified,this._continueProcessingPredicate.bind(this),this.shouldPostProcessCharChanges));return t},e.prototype._continueProcessingPredicate=function(){if(0===this.maximumRunTimeMs)return!0;var e=(new Date).getTime();return e-this.computationStartTime<this.maximumRunTimeMs},e}();t.DiffComputer=h}),define(d[145],h([0,1,6]),function(e,t,n){"use strict";var i=function(){function e(e,t,n,i,o,r){this.id=e,this.label=t,this.alias=n,this._precondition=i,this._run=o,this._contextKeyService=r}return e.prototype.isSupported=function(){return this._contextKeyService.contextMatchesRules(this._precondition)},e.prototype.run=function(){return this.isSupported()?n.TPromise.as(this._run()):n.TPromise.as(void 0)},e}();t.InternalEditorAction=i}),define(d[505],h([0,1,10]),function(e,t,n){"use strict";var i=function(){function e(e){this.model=e,this.currentOpenStackElement=null,this.past=[],this.future=[]}return e.prototype.pushStackElement=function(){null!==this.currentOpenStackElement&&(this.past.push(this.currentOpenStackElement),this.currentOpenStackElement=null)},e.prototype.clear=function(){this.currentOpenStackElement=null,this.past=[],this.future=[]},e.prototype.pushEditOperation=function(e,t,i){this.future=[],this.currentOpenStackElement||(this.currentOpenStackElement={beforeVersionId:this.model.getAlternativeVersionId(),beforeCursorState:e,editOperations:[],afterCursorState:null,afterVersionId:-1});var o={operations:this.model.applyEdits(t)};this.currentOpenStackElement.editOperations.push(o);try{this.currentOpenStackElement.afterCursorState=i?i(o.operations):null}catch(e){n.onUnexpectedError(e),this.currentOpenStackElement.afterCursorState=null}return this.currentOpenStackElement.afterVersionId=this.model.getVersionId(),this.currentOpenStackElement.afterCursorState},e.prototype.undo=function(){if(this.pushStackElement(),this.past.length>0){var e=this.pasLine truncated
|
||||
var s=e[o],a=s[0],u=s[1],l=s[2];u>t&&(t=u),a>n&&(n=a),l>n&&(n=l)}t++,n++;for(var c=new i.Uint8Matrix(n,t,0),o=0,r=e.length;o<r;o++){var d=e[o],a=d[0],u=d[1],l=d[2];c.set(a,u,l)}this._states=c,this._maxCharCode=t}return e.prototype.nextState=function(e,t){return t<0||t>=this._maxCharCode?0:this._states.get(e,t)},e}(),c=null;!function(e){e[e.None=0]="None",e[e.ForceTermination=1]="ForceTermination",e[e.CannotEndIn=2]="CannotEndIn"}(u||(u={}));var d=null,h=function(){function e(){}return e._createLink=function(e,t,n,i,o){var r=o-1;do{var s=t.charCodeAt(r),a=e.get(s);if(2!==a)break;r--}while(r>i);return{range:{startLineNumber:n,startColumn:i+1,endLineNumber:n,endColumn:r+2},url:t.substring(i,r+1)}},e.computeLinks=function(t){for(var n=o(),i=r(),s=[],a=1,u=t.getLineCount();a<=u;a++){for(var l=t.getLineContent(a),c=l.length,d=0,h=0,p=0,f=1,g=!1,m=!1,v=!1;d<c;){var _=!1,y=l.charCodeAt(d);if(13===f){var C=void 0;switch(y){case 40:g=!0,C=0;break;case 41:C=g?0:1;break;case 91:m=!0,C=0;break;case 93:C=m?0:1;break;case 123:v=!0,C=0;break;case 125:C=v?0:1;break;case 39:C=34===p||96===p?0:1;break;case 34:C=39===p||96===p?0:1;break;case 96:C=39===p||34===p?0:1;break;default:C=i.get(y)}1===C&&(s.push(e._createLink(i,l,a,h,d)),_=!0)}else if(12===f){var C=i.get(y);1===C?_=!0:f=13}else f=n.nextState(f,y),0===f&&(_=!0);_&&(f=1,g=!1,m=!1,v=!1,h=d+1,p=y),d++}13===f&&s.push(e._createLink(i,l,a,h,c))}return s},e}();t.computeLinks=s}),define(d[169],h([0,1]),function(e,t){"use strict";function n(e){return!e}function i(e,t){return e.ignoreCase&&t?t.toLowerCase():t}function o(e){return e.replace(/[&<>'"_]/g,"-")}function r(e,t){console.log(e.languageId+": "+t)}function s(e,t){throw new Error(e.languageId+": "+t)}function a(e,t,o,r,s){var a=/\$((\$)|(#)|(\d\d?)|[sS](\d\d?)|@(\w+))/g,u=null;return t.replace(a,function(t,a,l,c,d,h,p,f,g){return n(l)?n(c)?!n(d)&&d<r.length?i(e,r[d]):!n(p)&&e&&"string"==typeof e[p]?e[p]:(null===u&&(u=s.split("."),u.unshift(s)),!n(h)&&h<u.length?i(e,u[h]):""):i(e,o):"$"})}function u(e,t){for(;t&&t.length>0;){var n=e.tokenizer[t];if(n)return n;var i=t.lastIndexOf(".");t=i<0?null:t.substr(0,i)}return null}function l(e,t){for(;t&&t.length>0;){var n=e.stateNames[t];if(n)return!0;var i=t.lastIndexOf(".");t=i<0?null:t.substr(0,i)}return!1}var c;!function(e){e[e.None=0]="None",e[e.Open=1]="Open",e[e.Close=-1]="Close"}(c=t.MonarchBracket||(t.MonarchBracket={})),t.empty=n,t.fixCase=i,t.sanitize=o,t.log=r,t.throwError=s,t.substituteMatches=a,t.findRules=u,t.stateExists=l}),define(d[187],h([0,1,35,169]),function(e,t,n,i){"use strict";function o(e,t){if(!t)return!1;if(!Array.isArray(t))return!1;var n;for(n in t)if(t.hasOwnProperty(n)&&!e(t[n]))return!1;return!0}function r(e,t,n){return"boolean"==typeof e?e:(n&&(e||void 0===t)&&n(),void 0===t?null:t)}function s(e,t,n){return"string"==typeof e?e:(n&&(e||void 0===t)&&n(),void 0===t?null:t)}function a(e,t){if("string"!=typeof t)return null;for(var n=0;t.indexOf("@")>=0&&n<5;)n++,t=t.replace(/@(\w+)/g,function(n,o){var r="";return"string"==typeof e[o]?r=e[o]:e[o]&&e[o]instanceof RegExp?r=e[o].source:void 0===e[o]?i.throwError(e,"language definition does not contain attribute '"+o+"', used at: "+t):i.throwError(e,"attribute reference '"+o+"' must be a string, used at: "+t),i.empty(r)?"":"(?:"+r+")"});return new RegExp(t,e.ignoreCase?"i":"")}function u(e,t,n,i){if(i<0)return e;if(i<t.length)return t[i];if(i>=100){i-=100;var o=n.split(".");if(o.unshift(n),i<o.length)return o[i]}return null}function l(e,t,r,s){var l=-1,c=r,d=r.match(/^\$(([sS]?)(\d\d?)|#)(.*)$/);d&&(d[3]&&(l=parseInt(d[3]),d[2]&&(l+=100)),c=d[4]);var h="~",p=c;c&&0!==c.length?/^\w*$/.test(p)?h="==":(d=c.match(/^(@|!@|~|!~|==|!=)(.*)$/),d&&(h=d[1],p=d[2])):(h="!=",p="");var f;if("~"!==h&&"!~"!==h||!/^(\w|\|)*$/.test(p))if("@"===h||"!@"===h){var g=e[p];g||i.throwError(e,"the @ match target '"+p+"' is not defined, in rule: "+t),o(function(e){return"string"==typeof e},g)||i.throwError(e,"the @ match target '"+p+"' must be an array of strings, in rule: "+t);var m=n.createKeywordMatcher(g,e.ignoreCase);f=function(e){return"@"===h?m(e):!m(e)}}else if("~"===h||"!~"===h)if(p.indexOf("$")<0){var v=a(e,"^"+p+"$");f=function(e){return"~"===h?v.test(e):!v.test(e)}}else f=function(t,n,o,r){var s=a(e,"^"+i.substituteMatches(e,p,n,o,r)+"$");return s.test(t)};else if(p.indexOf("$")<0){var _=i.fixCase(e,p);f=function(e){return"=="===h?e===_:e!==_}}else{var _=i.fixCase(e,p);f=function(t,n,o,r,s){var a=i.substituteMatches(e,_,n,o,r);return"=="===h?t===a:t!==a}}else{var m=n.createKeywordMatcher(p.split("|"),e.ignoreCase);f=function(e){return"~"===h?m(e):!m(e)}}return l===-1?{name:r,value:s,test:function(e,t,n,i){return f(e,e,t,n,i)}}:{name:r,value:s,test:function(e,t,n,i){var o=u(e,t,n,l);return f(o?o:"",e,t,n,i)}}}function c(e,t,n){if(n){if("string"==typeof n)return n;if(n.token||""===n.token){if("string"!=typeof n.token)return i.throwError(e,"a 'token' attribute must be of type string, in rule: "+t),{token:""};var o={token:n.tokLine truncated
|
||||
this.wordDefinition=this._conf.wordPattern||l.DEFAULT_WORD_REGEXP,this.indentationRules=this._conf.indentationRules}return e._mergeConf=function(e,t){return{comments:e?t.comments||e.comments:t.comments,brackets:e?t.brackets||e.brackets:t.brackets,wordPattern:e?t.wordPattern||e.wordPattern:t.wordPattern,indentationRules:e?t.indentationRules||e.indentationRules:t.indentationRules,onEnterRules:e?t.onEnterRules||e.onEnterRules:t.onEnterRules,autoClosingPairs:e?t.autoClosingPairs||e.autoClosingPairs:t.autoClosingPairs,surroundingPairs:e?t.surroundingPairs||e.surroundingPairs:t.surroundingPairs,__electricCharacterSupport:e?t.__electricCharacterSupport||e.__electricCharacterSupport:t.__electricCharacterSupport}},e._handleOnEnter=function(e){var t={},n=!0;return e.brackets&&(n=!1,t.brackets=e.brackets),e.indentationRules&&(n=!1,t.indentationRules=e.indentationRules),e.onEnterRules&&(n=!1,t.regExpRules=e.onEnterRules),n?null:new o.OnEnterSupport(t)},e._handleComments=function(e){var t=e.comments;if(!t)return null;var n={};if(t.lineComment&&(n.lineCommentToken=t.lineComment),t.blockComment){var i=t.blockComment,o=i[0],r=i[1];n.blockCommentStartToken=o,n.blockCommentEndToken=r}return n},e}();t.RichEditSupport=p;var f=function(){function e(){this._onDidChange=new s.Emitter,this.onDidChange=this._onDidChange.event,this._entries=[]}return e.prototype.register=function(e,t){var n=this,i=this._getRichEditSupport(e.id),o=new p(e,i,t);return this._entries[e.id]=o,this._onDidChange.fire(void 0),{dispose:function(){n._entries[e.id]===o&&(n._entries[e.id]=i,n._onDidChange.fire(void 0))}}},e.prototype._getRichEditSupport=function(e){return this._entries[e]||null},e.prototype.getIndentationRules=function(e){var t=this._entries[e];return t?t.indentationRules||null:null},e.prototype._getElectricCharacterSupport=function(e){var t=this._getRichEditSupport(e);return t?t.electricCharacter||null:null},e.prototype.getElectricCharacters=function(e){var t=this._getElectricCharacterSupport(e);return t?t.getElectricCharacters():[]},e.prototype.onElectricCharacter=function(e,t,n){var i=c.createScopedLineTokens(t,n-1),o=this._getElectricCharacterSupport(i.languageId);return o?o.onElectricCharacter(e,i,n-i.firstCharOffset):null},e.prototype.getComments=function(e){var t=this._getRichEditSupport(e);return t?t.comments||null:null},e.prototype._getCharacterPairSupport=function(e){var t=this._getRichEditSupport(e);return t?t.characterPair||null:null},e.prototype.getAutoClosingPairs=function(e){var t=this._getCharacterPairSupport(e);return t?t.getAutoClosingPairs():[]},e.prototype.getSurroundingPairs=function(e){var t=this._getCharacterPairSupport(e);return t?t.getSurroundingPairs():[]},e.prototype.shouldAutoClosePair=function(e,t,n){var i=c.createScopedLineTokens(t,n-1),o=this._getCharacterPairSupport(i.languageId);return!!o&&o.shouldAutoClosePair(e,i,n-i.firstCharOffset)},e.prototype.getWordDefinition=function(e){var t=this._getRichEditSupport(e);return t?l.ensureValidWordDefinition(t.wordDefinition||null):l.ensureValidWordDefinition(null)},e.prototype._getOnEnterSupport=function(e){var t=this._getRichEditSupport(e);return t?t.onEnter||null:null},e.prototype.getRawEnterActionAtPosition=function(e,t,n){var i=this.getEnterAction(e,new d.Range(t,n,t,n));return i?i.enterAction:null},e.prototype.getEnterAction=function(e,t){var n=this.getIndentationAtPosition(e,t.startLineNumber,t.startColumn),i=!1,o=this.getScopedLineTokens(e,t.startLineNumber),r=this._getOnEnterSupport(o.languageId);if(!r)return{enterAction:{indentAction:h.IndentAction.None,appendText:""},indentation:n,ignoreCurrentLine:!1};var s,u=o.getLineContent(),l=u.substr(0,t.startColumn-1-o.firstCharOffset);if(t.isEmpty())s=u.substr(t.startColumn-1-o.firstCharOffset);else{var c=this.getScopedLineTokens(e,t.endLineNumber);s=c.getLineContent().substr(t.endColumn-1-c.firstCharOffset)}var d=t.startLineNumber;if(r.shouldIgnore(l)){i=!0;var p=this.getLastValidLine(e,d,r);if(p<=0)return{enterAction:{indentAction:h.IndentAction.None,appendText:""},indentation:"",ignoreCurrentLine:i};o=this.getScopedLineTokens(e,p),l=this.getLineContent(e,p),d=p,n=this.getIndentationAtPosition(e,d,e.getLineMaxColumn(d))}var f="";if(d>1&&0===o.firstCharOffset){var p=this.getLastValidLine(e,d,r);if(p>=1){var g=this.getScopedLineTokens(e,p);g.languageId===o.languageId&&(f=g.getLineContent())}}var m=null;try{m=r.onEnter(f,l,s)}catch(e){a.onUnexpectedError(e)}return m?m.appendText||(m.indentAction===h.IndentAction.Indent||m.indentAction===h.IndentAction.IndentOutdent?m.appendText="\t":m.appendText=""):m={indentAction:h.IndentAction.None,appendText:""},{enterAction:m,indentation:n,ignoreCurrentLine:i}},e.prototype.getIndentationAtPosition=function(e,t,n){var i=e.getLineContent(t),o=u.getLeadingWhitespace(i);return o.length>n-1&&(o=o.substring(0,n-1)),o},e.prototype.getLastValidLine=function(e,t,n){if(t>1){var i=t-1;for(i=t-1;i>=1;i--){var o=e.getLineContent(i);if(!n.shouldIgnore(o)&&n.containNonWhitespace(o))break}if(i>=1)rLine truncated
|
||||
e[e.Boundary=1]="Boundary",e[e.All=2]="All"}(h=t.RenderWhitespace||(t.RenderWhitespace={}));var p=function(){function e(e,t,n,i,o,r,s,a,u,l,c){this.useMonospaceOptimizations=e,this.lineContent=t,this.mightContainRTL=n,this.fauxIndentLength=i,this.lineTokens=o,this.lineDecorations=r,this.tabSize=s,this.spaceWidth=a,this.stopRenderingLineAfter=u,this.renderWhitespace="all"===l?2:"boundary"===l?1:0,this.renderControlCharacters=c}return e.prototype.equals=function(e){return this.useMonospaceOptimizations===e.useMonospaceOptimizations&&this.lineContent===e.lineContent&&this.mightContainRTL===e.mightContainRTL&&this.fauxIndentLength===e.fauxIndentLength&&this.tabSize===e.tabSize&&this.spaceWidth===e.spaceWidth&&this.stopRenderingLineAfter===e.stopRenderingLineAfter&&this.renderWhitespace===e.renderWhitespace&&this.renderControlCharacters===e.renderControlCharacters&&i.Decoration.equalsArr(this.lineDecorations,e.lineDecorations)&&n.ViewLineToken.equalsArr(this.lineTokens,e.lineTokens)},e}();t.RenderLineInput=p;var f;!function(e){e[e.PART_INDEX_MASK=4294901760]="PART_INDEX_MASK",e[e.CHAR_INDEX_MASK=65535]="CHAR_INDEX_MASK",e[e.CHAR_INDEX_OFFSET=0]="CHAR_INDEX_OFFSET",e[e.PART_INDEX_OFFSET=16]="PART_INDEX_OFFSET"}(f=t.CharacterMappingConstants||(t.CharacterMappingConstants={}));var g=function(){function e(e,t){this.length=e,this._data=new Uint32Array(this.length),this._partLengths=new Uint16Array(t)}return e.getPartIndex=function(e){return(4294901760&e)>>>16},e.getCharIndex=function(e){return(65535&e)>>>0},e.prototype.setPartData=function(e,t,n){var i=(t<<16|n<<0)>>>0;this._data[e]=i},e.prototype.setPartLength=function(e,t){this._partLengths[e]=t},e.prototype.getPartLengths=function(){return this._partLengths},e.prototype.charOffsetToPartData=function(e){return 0===this.length?0:e<0?this._data[0]:e>=this.length?this._data[this.length-1]:this._data[e]},e.prototype.partDataToCharOffset=function(t,n,i){if(0===this.length)return 0;for(var o=(t<<16|i<<0)>>>0,r=0,s=this.length-1;r+1<s;){var a=r+s>>>1,u=this._data[a];if(u===o)return a;u>o?s=a:r=a}if(r===s)return r;var l=this._data[r],c=this._data[s];if(l===o)return r;if(c===o)return s;var d,h=e.getPartIndex(l),p=e.getCharIndex(l),f=e.getPartIndex(c);d=h!==f?n:e.getCharIndex(c);var g=i-p,m=d-i;return g<=m?r:s},e}();t.CharacterMapping=g;var m=function(){function e(e,t,n,i){this.characterMapping=e,this.output=t,this.containsRTL=n,this.containsForeignElements=i}return e}();t.RenderLineOutput=m,t.renderViewLine=r;var v,_=function(){function e(e,t,n,i,o,r,s,a,u,l,c){this.fontIsMonospace=e,this.lineContent=t,this.len=n,this.isOverflowing=i,this.tokens=o,this.containsForeignElements=r,this.tabSize=s,this.containsRTL=a,this.spaceWidth=u,this.renderWhitespace=l,this.renderControlCharacters=c}return e}();!function(e){e[e.LongToken=50]="LongToken"}(v||(v={}))}),define(d[146],h([0,1,6,16,120,88,89,9]),function(e,t,n,i,o,r,s,a){"use strict";function u(e,t,n){return c(e,t,n)}function l(e,t){for(var n=[],i=0,s=e.length;i<s;i++){var a=e[i],u=o.renderViewLine(new o.RenderLineInput(!1,a,!1,0,[new r.ViewLineToken(a.length,"")],[],t,0,-1,"none",!1));n=n.concat(u.output),n.push("<br/>")}return n.join("")}function c(e,t,n){for(var r=[],a=n.getInitialState(),u=i.TokenizationRegistry.getColorMap(),l=0,c=e.length;l<c;l++){var d=e[l],h=n.tokenize2(d,a,0),p=new s.LineTokens(u,h.tokens,d),f=o.renderViewLine(new o.RenderLineInput(!1,d,!0,0,p.inflate(),[],t,0,-1,"none",!1));r=r.concat(f.output),r.push("<br/>"),a=h.endState}return r.join("")}var d=function(){function e(){}return e.colorizeElement=function(e,t,n,i){i=i||{};var o=i.theme||"vs",r=i.mimeType||n.getAttribute("lang")||n.getAttribute("data-lang");if(!r)return void console.error("Mode not detected");e.setTheme(o);var s=n.firstChild.nodeValue;n.className+="monaco-editor "+o;var a=function(e){n.innerHTML=e};return this.colorize(t,s,r,i).then(a,function(e){return console.error(e)},a)},e._tokenizationSupportChangedPromise=function(e){var t=null,o=function(){t&&(t.dispose(),t=null)};return new n.TPromise(function(n,r,s){t=i.TokenizationRegistry.onDidChange(function(t){t.languages.indexOf(e)>=0&&(o(),n(void 0))})},o)},e.colorize=function(e,t,o,r){a.startsWithUTF8BOM(t)&&(t=t.substr(1));var s=t.split(/\r\n|\r|\n/),c=e.getModeId(o);r=r||{},"undefined"==typeof r.tabSize&&(r.tabSize=4),e.getOrCreateMode(c);var d=i.TokenizationRegistry.get(c);return d?n.TPromise.as(u(s,r.tabSize,d)):n.TPromise.any([this._tokenizationSupportChangedPromise(c),n.TPromise.timeout(500)]).then(function(e){var t=i.TokenizationRegistry.get(c);return t?u(s,r.tabSize,t):l(s,r.tabSize)})},e.colorizeLine=function(e,t,n,i){void 0===i&&(i=4);var r=o.renderViewLine(new o.RenderLineInput(!1,e,t,0,n,[],i,0,-1,"none",!1));return r.output},e.colorizeModelLine=function(e,t,n){void 0===n&&(n=4);var i=e.getLineContent(t),o=e.getLineTokens(t,!1),r=o.inflate();return this.colorizeLine(i,e.mightContainRTL(),r,n)},e}();t.Colorizer=d}),define(d[209],h([0,1,24,18,9,28,119,120,21,204,85]),function(e,Line truncated
|
||||
configurable:!0}),Object.defineProperty(t.prototype,"version",{get:function(){return this._versionId},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"eol",{get:function(){return this._eol},enumerable:!0,configurable:!0}),t.prototype.getValue=function(){return this.getText()},t.prototype.getLinesContent=function(){return this._lines.slice(0)},t.prototype.getLineCount=function(){return this._lines.length},t.prototype.getLineContent=function(e){return this._lines[e-1]},t.prototype.getWordAtPosition=function(e,t){var n=d.getWordAtText(e.column,d.ensureValidWordDefinition(t),this._lines[e.lineNumber-1],0);return n?new o.Range(e.lineNumber,n.startColumn,e.lineNumber,n.endColumn):null},t.prototype.getWordUntilPosition=function(e,t){var n=this.getWordAtPosition(e,t);return n?{word:this._lines[e.lineNumber-1].substring(n.startColumn-1,e.column-1),startColumn:n.startColumn,endColumn:e.column}:{word:"",startColumn:e.column,endColumn:e.column}},t.prototype._getAllWords=function(e){var t=this,n=[];return this._lines.forEach(function(i){t._wordenize(i,e).forEach(function(e){n.push(i.substring(e.start,e.end))})}),n},t.prototype.getAllUniqueWords=function(e,t){var n=!1,i=Object.create(null);return this._getAllWords(e).filter(function(e){return t&&!n&&t===e?(n=!0,!1):!i[e]&&(i[e]=!0,!0)})},t.prototype._wordenize=function(e,t){var n,i=[];for(t.lastIndex=0;(n=t.exec(e))&&0!==n[0].length;)i.push({start:n.index,end:n.index+n[0].length});return i},t.prototype.getValueInRange=function(e){if(e=this._validateRange(e),e.startLineNumber===e.endLineNumber)return this._lines[e.startLineNumber-1].substring(e.startColumn-1,e.endColumn-1);var t=this._eol,n=e.startLineNumber-1,i=e.endLineNumber-1,o=[];o.push(this._lines[n].substring(e.startColumn-1));for(var r=n+1;r<i;r++)o.push(this._lines[r]);return o.push(this._lines[i].substring(0,e.endColumn-1)),o.join(t)},t.prototype.offsetAt=function(e){return e=this._validatePosition(e),this._ensureLineStarts(),this._lineStarts.getAccumulatedValue(e.lineNumber-2)+(e.column-1)},t.prototype.positionAt=function(e){e=Math.floor(e),e=Math.max(0,e),this._ensureLineStarts();var t=this._lineStarts.getIndexOf(e),n=this._lines[t.index].length;return{lineNumber:1+t.index,column:1+Math.min(t.remainder,n)}},t.prototype._validateRange=function(e){var t=this._validatePosition({lineNumber:e.startLineNumber,column:e.startColumn}),n=this._validatePosition({lineNumber:e.endLineNumber,column:e.endColumn});return t.lineNumber!==e.startLineNumber||t.column!==e.startColumn||n.lineNumber!==e.endLineNumber||n.column!==e.endColumn?{startLineNumber:t.lineNumber,startColumn:t.column,endLineNumber:n.lineNumber,endColumn:n.column}:e},t.prototype._validatePosition=function(e){if(!a.Position.isIPosition(e))throw new Error("bad position");var t=e.lineNumber,n=e.column,i=!1;if(t<1)t=1,n=1,i=!0;else if(t>this._lines.length)t=this._lines.length,n=this._lines[t-1].length+1,i=!0;else{var o=this._lines[t-1].length+1;n<1?(n=1,i=!0):n>o&&(n=o,i=!0)}return i?{lineNumber:t,column:n}:e},t}(u.MirrorModel2),g=function(){function e(){this._foreignModule=null}return e.prototype.computeDiff=function(e,t,n){var o=this._getModel(e),s=this._getModel(t);if(!o||!s)return null;var a=o.getLinesContent(),u=s.getLinesContent(),l=new r.DiffComputer(a,u,{shouldPostProcessCharChanges:!0,shouldIgnoreTrimWhitespace:n,shouldConsiderTrimWhitespaceInEmptyCase:!0});return i.TPromise.as(l.computeDiff())},e.prototype.computeDirtyDiff=function(e,t,n){var o=this._getModel(e),s=this._getModel(t);if(!o||!s)return null;var a=o.getLinesContent(),u=s.getLinesContent(),l=new r.DiffComputer(a,u,{shouldPostProcessCharChanges:!1,shouldIgnoreTrimWhitespace:n,shouldConsiderTrimWhitespaceInEmptyCase:!1});return i.TPromise.as(l.computeDiff())},e.prototype.computeMoreMinimalEdits=function(t,n,r){var a=this._getModel(t);if(!a)return i.TPromise.as(n);for(var u=[],l=0,c=n;l<c.length;l++){var d=c[l],h=d.range,p=d.text,f=a.getValueInRange(h);if(p=p.replace(/\r\n|\n|\r/g,a.eol),f!==p)if(Math.max(p.length,f.length)>e._diffLimit)u.push({range:h,text:p});else for(var g=s.stringDiff(f,p),m=a.offsetAt(o.Range.lift(h).getStartPosition()),v=0,_=g;v<_.length;v++){var y=_[v],C=a.positionAt(m+y.originalStart),b=a.positionAt(m+y.originalStart+y.originalLength),w={text:p.substr(y.modifiedStart,y.modifiedLength),range:{startLineNumber:C.lineNumber,startColumn:C.column,endLineNumber:b.lineNumber,endColumn:b.column}};a.getValueInRange(w.range)!==w.text&&u.push(w)}}return i.TPromise.as(u)},e.prototype.computeLinks=function(e){var t=this._getModel(e);return t?i.TPromise.as(l.computeLinks(t)):null},e.prototype.textualSuggest=function(e,t,n,o){var r=this._getModel(e);if(r){for(var s=[],a=new RegExp(n,o),u=r.getWordUntilPosition(t,a).word,l=0,c=r.getAllUniqueWords(a);l<c.length;l++){var d=c[l];d!==u&&isNaN(Number(d))&&s.push({type:"text",label:d,insertText:d,noAutoAccept:!0,overwriteBefore:u.length})}return i.TPromise.as({suggestions:s})}},e.prototype.navigateValueSet=function(e,t,n,o,r)Line truncated
|
||||
this._asyncComputationPromise=null),this._state=0},e}();r.HOVER_TIME=300,t.HoverOperation=r}),define(d[155],h([0,1,11,15,21,37,60,4]),function(e,t,n,i,o,r,s,a){"use strict";var u=function(e){function t(t,n){var i=e.call(this)||this;return i.disposables=[],i.allowEditorOverflow=!0,i._id=t,i._editor=n,i._isVisible=!1,i._containerDomNode=document.createElement("div"),i._containerDomNode.className="monaco-editor-hover hidden",i._containerDomNode.tabIndex=0,i._domNode=document.createElement("div"),i._domNode.className="monaco-editor-hover-content",i.scrollbar=new s.DomScrollableElement(i._domNode,{canUseTranslate3d:!1}),i.disposables.push(i.scrollbar),i._containerDomNode.appendChild(i.scrollbar.getDomNode()),i.onkeydown(i._containerDomNode,function(e){e.equals(9)&&i.hide()}),i._register(i._editor.onDidChangeConfiguration(function(e){e.fontInfo&&i.updateFont()})),i._editor.onDidLayoutChange(function(e){return i.updateMaxHeight()}),i.updateMaxHeight(),i._editor.addContentWidget(i),i._showAtPosition=null,i}return m(t,e),Object.defineProperty(t.prototype,"isVisible",{get:function(){return this._isVisible},set:function(e){this._isVisible=e,n.toggleClass(this._containerDomNode,"hidden",!this._isVisible)},enumerable:!0,configurable:!0}),t.prototype.getId=function(){return this._id},t.prototype.getDomNode=function(){return this._containerDomNode},t.prototype.showAt=function(e,t){this._showAtPosition=new i.Position(e.lineNumber,e.column),this.isVisible=!0,this._editor.layoutContentWidget(this),this._editor.render(),this._stoleFocus=t,t&&this._containerDomNode.focus()},t.prototype.hide=function(){this.isVisible&&(this.isVisible=!1,this._editor.layoutContentWidget(this),this._stoleFocus&&this._editor.focus())},t.prototype.getPosition=function(){return this.isVisible?{position:this._showAtPosition,preference:[o.ContentWidgetPositionPreference.ABOVE,o.ContentWidgetPositionPreference.BELOW]}:null},t.prototype.dispose=function(){this._editor.removeContentWidget(this),this.disposables=a.dispose(this.disposables),e.prototype.dispose.call(this)},t.prototype.updateFont=function(){var e=this,t=Array.prototype.slice.call(this._domNode.getElementsByTagName("code")),n=Array.prototype.slice.call(this._domNode.getElementsByClassName("code"));t.concat(n).forEach(function(t){return e._editor.applyFontInfo(t)})},t.prototype.updateContents=function(e){this._domNode.textContent="",this._domNode.appendChild(e),this.updateFont(),this._editor.layoutContentWidget(this),this.scrollbar.scanDomNode()},t.prototype.updateMaxHeight=function(){var e=Math.max(this._editor.getLayoutInfo().height/4,250),t=this._editor.getConfiguration().fontInfo,n=t.fontSize,i=t.lineHeight;this._domNode.style.fontSize=n+"px",this._domNode.style.lineHeight=i+"px",this._domNode.style.maxHeight=e+"px"},t}(r.Widget);t.ContentHoverWidget=u;var l=function(e){function t(t,n){var i=e.call(this)||this;return i._id=t,i._editor=n,i._isVisible=!1,i._domNode=document.createElement("div"),i._domNode.className="monaco-editor-hover hidden",i._domNode.setAttribute("aria-hidden","true"),i._domNode.setAttribute("role","presentation"),i._showAtLineNumber=-1,i._register(i._editor.onDidChangeConfiguration(function(e){e.fontInfo&&i.updateFont()})),i._editor.addOverlayWidget(i),i}return m(t,e),Object.defineProperty(t.prototype,"isVisible",{get:function(){return this._isVisible},set:function(e){this._isVisible=e,n.toggleClass(this._domNode,"hidden",!this._isVisible)},enumerable:!0,configurable:!0}),t.prototype.getId=function(){return this._id},t.prototype.getDomNode=function(){return this._domNode},t.prototype.showAt=function(e){this._showAtLineNumber=e,this.isVisible||(this.isVisible=!0);var t=this._editor.getLayoutInfo(),n=this._editor.getTopForLineNumber(this._showAtLineNumber),i=this._editor.getScrollTop(),o=this._editor.getConfiguration().lineHeight,r=this._domNode.clientHeight,s=n-i-(r-o)/2;this._domNode.style.left=t.glyphMarginLeft+t.glyphMarginWidth+"px",this._domNode.style.top=Math.max(Math.round(s),0)+"px"},t.prototype.hide=function(){this.isVisible&&(this.isVisible=!1)},t.prototype.getPosition=function(){return null},t.prototype.dispose=function(){this._editor.removeOverlayWidget(this),e.prototype.dispose.call(this)},t.prototype.updateFont=function(){var e=this,t=Array.prototype.slice.call(this._domNode.getElementsByTagName("code")),n=Array.prototype.slice.call(this._domNode.getElementsByClassName("code"));t.concat(n).forEach(function(t){return e._editor.applyFontInfo(t)})},t.prototype.updateContents=function(e){this._domNode.textContent="",this._domNode.appendChild(e),this.updateFont()},t}(r.Widget);t.GlyphHoverWidget=l}),define(d[230],h([0,1,20]),function(e,t,n){"use strict";var i=function(){function e(e,t,n){this._editRange=e,this._originalSelection=t,this._text=n}return e.prototype.getEditOperations=function(e,t){t.addEditOperation(this._editRange,this._text)},e.prototype.computeCursorState=function(e,t){var i=t.getInverseEditOperations(),o=i[0].range;return this._originalSelectioLine truncated
|
||||
return i(e)?1:i(t)?-1:n(e)&&n(t)?0:n(e)?-1:n(t)?1:e.id===t.id?0:Number(e.id)<Number(t.id)?-1:1}),this._snippet.placeHolders.length>0&&""===this._snippet.placeHolders[this._snippet.placeHolders.length-1].value&&(this._snippet.finishPlaceHolderIndex=this._snippet.placeHolders.length-1)},e.prototype.parseLine=function(e,t){for(var n=[{placeHolderId:"",placeHolderText:""}],i=[],o=function(e){var n=t(e);if(n)return n;for(var o=0,r=i;o<r.length;o++){var s=r[o];if(s.id===e&&s.value)return s.value}return""},r=0,s=e.length,a=0;r<s;){var u=e.substr(r);if(/^{{/.test(u)){r+=2,n.push({placeHolderId:"",placeHolderText:""});var l=u.match(/^{{(\w+):/);Array.isArray(l)&&2===l.length&&(n[n.length-1].placeHolderId=l[1],r+=l[1].length+1)}else if(n.length>1&&/^}}/.test(u)){if(r+=2,0===n[n.length-1].placeHolderId.length&&(n[n.length-1].placeHolderId=n[n.length-1].placeHolderText,"_"===n[n.length-1].placeHolderId&&(n[n.length-1].placeHolderId="TAB_STOP_"+String(++this._lastGeneratedId),n[n.length-1].placeHolderText="",--a)),0===n[n.length-1].placeHolderText.length){var c=o(n[n.length-1].placeHolderId);n[n.length-1].placeHolderText=c,a+=c.length}i.push({id:n[n.length-1].placeHolderId,value:n[n.length-1].placeHolderText,startColumn:a+1-n[n.length-1].placeHolderText.length,endColumn:a+1}),n[n.length-2].placeHolderText+=n[n.length-1].placeHolderText,n.pop()}else/^\\./.test(u)&&("{"===u.charAt(1)||"}"===u.charAt(1)||"\\"===u.charAt(1)?++r:(n[n.length-1].placeHolderText+=e.charAt(r),++a,++r)),n[n.length-1].placeHolderText+=e.charAt(r),++a,++r}return i.sort(function(e,t){return e.startColumn<t.startColumn?-1:e.startColumn>t.startColumn?1:e.endColumn<t.endColumn?-1:e.endColumn>t.endColumn?1:0}),{line:n[0].placeHolderText,placeHolders:i}},e}()),h=new(function(){function e(){}return e.prototype.parse=function(e){return e=r(e,c.EmmetSnippet),d.parse(e)},e}());!function(e){e[e.TextMateSnippet=0]="TextMateSnippet",e[e.EmmetSnippet=1]="EmmetSnippet"}(c=t.ExternalSnippetType||(t.ExternalSnippetType={}))}),define(d[241],h([0,1,39]),function(e,t,n){"use strict";var i=function(){function e(e){this._editor=e}return e.prototype.resolve=function(e){var t=this._editor.getModel();if(!t)throw new Error;switch(e){case"SELECTION":case"TM_SELECTED_TEXT":return this._tmSelectedText();case"TM_CURRENT_LINE":return this._tmCurrentLine();case"TM_CURRENT_WORD":return this._tmCurrentWord();case"TM_LINE_INDEX":return this._tmLineIndex();case"TM_LINE_NUMBER":return this._tmLineNumber();case"TM_FILENAME":return this._tmFilename();case"TM_DIRECTORY":return this._tmDirectory();case"TM_FILEPATH":return this._tmFilepath()}},e.prototype._tmCurrentLine=function(){var e=this._editor.getSelection().positionLineNumber;return this._editor.getModel().getValueInRange({startLineNumber:e,startColumn:1,endLineNumber:e,endColumn:Number.MAX_VALUE})},e.prototype._tmCurrentWord=function(){var e=this._editor.getModel().getWordAtPosition(this._editor.getPosition());return e?e.word:""},e.prototype._tmFilename=function(){return n.basename(this._editor.getModel().uri.fsPath)},e.prototype._tmDirectory=function(){var e=n.dirname(n.normalize(this._editor.getModel().uri.fsPath));return"."!==e?e:""},e.prototype._tmFilepath=function(){return this._editor.getModel().uri.fsPath},e.prototype._tmLineIndex=function(){return String(this._editor.getSelection().positionLineNumber-1)},e.prototype._tmLineNumber=function(){return String(this._editor.getSelection().positionLineNumber)},e.prototype._tmSelectedText=function(){return this._editor.getModel().getValueInRange(this._editor.getSelection())},e}();t.SnippetVariablesResolver=i}),define(d[242],h([0,1,26,9,87]),function(e,t,n,i,o){"use strict";var r=function(){function e(){}return e}();t.LineContext=r;var s=function(){function e(e,t,n){this._items=e,this._column=t,this._lineContext=n}return Object.defineProperty(e.prototype,"lineContext",{get:function(){return this._lineContext},set:function(e){this._lineContext.leadingLineContent===e.leadingLineContent&&this._lineContext.characterCountDelta===e.characterCountDelta||(this._lineContext=e,this._filteredItems=void 0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"items",{get:function(){return this._ensureCachedState(),this._filteredItems},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"topScoreIdx",{get:function(){return this._ensureCachedState(),this._topScoreIdx},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"incomplete",{get:function(){return this._ensureCachedState(),this._isIncomplete},enumerable:!0,configurable:!0}),e.prototype.resolveIncompleteInfo=function(){for(var e=[],t=[],n=0,i=this._items;n<i.length;n++){var o=i[n];o.container.incomplete?e.indexOf(o.support)<0&&e.push(o.support):t.push(o)}return{incomplete:e,complete:t}},Object.defineProperty(e.prototype,"stats",{get:function(){return this._ensureCachedState(),this._stats},enumerable:!0,configurable:!0}),e.prototype._ensureCachedState=function(){this._filteredItems||this._createCacheLine truncated
|
||||
if(this.mirror){var e=this.value||this.placeholder,t=e.charCodeAt(e.length-1),n=10===t?" ":"";this.mirror.textContent=e+n,this.layout()}},t.prototype.layout=function(){if(this.mirror){var e=this.cachedHeight;this.cachedHeight=o.getTotalHeight(this.mirror),e!==this.cachedHeight&&(this.input.style.height=this.cachedHeight+"px",this._onDidHeightChange.fire(this.cachedHeight))}},t.prototype.dispose=function(){this._hideMessage(),this.element=null,this.input=null,this.contextViewProvider=null,this.message=null,this.placeholder=null,this.ariaLabel=null,this.validation=null,this.showValidationMessage=null,this.state=null,this.actionbar=null,e.prototype.dispose.call(this)},t}(c.Widget);t.InputBox=p}),define(d[256],h([0,1,251,11,100,37,12,132,219]),function(e,t,n,i,o,r,s,a){"use strict";var u=n.localize(0,null),l=function(e){function t(t,n,i){var o=e.call(this)||this;return o._onDidOptionChange=o._register(new s.Emitter),o.onDidOptionChange=o._onDidOptionChange.event,o._onKeyDown=o._register(new s.Emitter),o.onKeyDown=o._onKeyDown.event,o._onInput=o._register(new s.Emitter),o.onInput=o._onInput.event,o._onKeyUp=o._register(new s.Emitter),o.onKeyUp=o._onKeyUp.event,o._onCaseSensitiveKeyDown=o._register(new s.Emitter),o.onCaseSensitiveKeyDown=o._onCaseSensitiveKeyDown.event,o._lastHighlightFindOptions=0,o.contextViewProvider=n,o.width=i.width||100,o.placeholder=i.placeholder||"",o.validation=i.validation,o.label=i.label||u,o.regex=null,o.wholeWords=null,o.caseSensitive=null,o.domNode=null,o.inputBox=null,o.buildDomNode(i.appendCaseSensitiveLabel||"",i.appendWholeWordsLabel||"",i.appendRegexLabel||""),Boolean(t)&&t.appendChild(o.domNode),o.onkeydown(o.inputBox.inputElement,function(e){return o._onKeyDown.fire(e)}),o.onkeyup(o.inputBox.inputElement,function(e){return o._onKeyUp.fire(e)}),o.oninput(o.inputBox.inputElement,function(e){return o._onInput.fire()}),o}return m(t,e),t.prototype.enable=function(){i.removeClass(this.domNode,"disabled"),this.inputBox.enable(),this.regex.enable(),this.wholeWords.enable(),this.caseSensitive.enable()},t.prototype.disable=function(){i.addClass(this.domNode,"disabled"),this.inputBox.disable(),this.regex.disable(),this.wholeWords.disable(),this.caseSensitive.disable()},t.prototype.setEnabled=function(e){e?this.enable():this.disable()},t.prototype.clear=function(){this.clearValidation(),this.setValue(""),this.focus()},t.prototype.setWidth=function(e){this.width=e,this.domNode.style.width=this.width+"px",this.contextViewProvider.layout(),this.setInputWidth()},t.prototype.getValue=function(){return this.inputBox.value},t.prototype.setValue=function(e){this.inputBox.value!==e&&(this.inputBox.value=e)},t.prototype.select=function(){this.inputBox.select()},t.prototype.focus=function(){this.inputBox.focus()},t.prototype.getCaseSensitive=function(){return this.caseSensitive.checked},t.prototype.setCaseSensitive=function(e){this.caseSensitive.checked=e,this.setInputWidth()},t.prototype.getWholeWords=function(){return this.wholeWords.checked},t.prototype.setWholeWords=function(e){this.wholeWords.checked=e,this.setInputWidth()},t.prototype.getRegex=function(){return this.regex.checked},t.prototype.setRegex=function(e){this.regex.checked=e,this.setInputWidth()},t.prototype.focusOnCaseSensitive=function(){this.caseSensitive.focus()},t.prototype.highlightFindOptions=function(){i.removeClass(this.domNode,"highlight-"+this._lastHighlightFindOptions),this._lastHighlightFindOptions=1-this._lastHighlightFindOptions,i.addClass(this.domNode,"highlight-"+this._lastHighlightFindOptions)},t.prototype.setInputWidth=function(){var e=this.width-this.caseSensitive.width()-this.wholeWords.width()-this.regex.width();this.inputBox.width=e},t.prototype.buildDomNode=function(e,t,n){var r=this;this.domNode=document.createElement("div"),this.domNode.style.width=this.width+"px",i.addClass(this.domNode,"monaco-findInput"),this.inputBox=this._register(new o.InputBox(this.domNode,this.contextViewProvider,{placeholder:this.placeholder||"",ariaLabel:this.label||"",validationOptions:{validation:this.validation||null,showMessage:!0}})),this.regex=this._register(new a.RegexCheckbox({appendTitle:n,isChecked:!1,onChange:function(e){r._onDidOptionChange.fire(e),e||r.inputBox.focus(),r.setInputWidth(),r.validate()}})),this.wholeWords=this._register(new a.WholeWordsCheckbox({appendTitle:t,isChecked:!1,onChange:function(e){r._onDidOptionChange.fire(e),e||r.inputBox.focus(),r.setInputWidth(),r.validate()}})),this.caseSensitive=this._register(new a.CaseSensitiveCheckbox({appendTitle:e,isChecked:!1,onChange:function(e){r._onDidOptionChange.fire(e),e||r.inputBox.focus(),r.setInputWidth(),r.validate()},onKeyDown:function(e){r._onCaseSensitiveKeyDown.fire(e)}}));var s=[this.caseSensitive.domNode,this.wholeWords.domNode,this.regex.domNode];this.onkeydown(this.domNode,function(e){if(e.equals(15)||e.equals(17)||e.equals(9)){var t=s.indexOf(document.activeElement);if(t>=0){var n=void 0;e.equals(17)?n=(t+1)%s.length:e.equals(15)&&(n=0===t?s.lengLine truncated
|
||||
this.upKeyBindingDispatcher.set(2051,this.onEnter.bind(this))}return e.prototype.onMouseDown=function(e,t,n,i){if(void 0===i&&(i="mouse"),this.options.clickBehavior===l.ON_MOUSE_DOWN&&(n.leftButton||n.middleButton)){if(n.target){if(n.target.tagName&&"input"===n.target.tagName.toLowerCase())return!1;if(a.findParentWithClass(n.target,"monaco-action-bar","row"))return!1}return this.onLeftClick(e,t,n,i)}return!1},e.prototype.onClick=function(e,t,n){var i=r.isMacintosh;return i&&n.ctrlKey?(n.preventDefault(),n.stopPropagation(),!1):(!n.target||!n.target.tagName||"input"!==n.target.tagName.toLowerCase())&&((this.options.clickBehavior!==l.ON_MOUSE_DOWN||!n.leftButton&&!n.middleButton)&&this.onLeftClick(e,t,n))},e.prototype.onLeftClick=function(e,t,n,i){void 0===i&&(i="mouse");var o={origin:i,originalEvent:n};if(e.getInput()===t)e.clearFocus(o),e.clearSelection(o);else{var r=n&&n.browserEvent&&"mousedown"===n.browserEvent.type;r||n.preventDefault(),n.stopPropagation(),e.DOMFocus(),e.setSelection([t],o),e.setFocus(t,o),e.isExpanded(t)?e.collapse(t).done(null,s.onUnexpectedError):e.expand(t).done(null,s.onUnexpectedError)}return!0},e.prototype.onContextMenu=function(e,t,n){return(!n.target||!n.target.tagName||"input"!==n.target.tagName.toLowerCase())&&(n&&(n.preventDefault(),n.stopPropagation()),!1)},e.prototype.onTap=function(e,t,n){var i=n.initialTarget;return(!i||!i.tagName||"input"!==i.tagName.toLowerCase())&&this.onLeftClick(e,t,n,"touch")},e.prototype.onKeyDown=function(e,t){return this.onKey(this.downKeyBindingDispatcher,e,t)},e.prototype.onKeyUp=function(e,t){return this.onKey(this.upKeyBindingDispatcher,e,t)},e.prototype.onKey=function(e,t,n){var i=e.dispatch(n.toKeybinding());return!(!i||!i(t,n))&&(n.preventDefault(),n.stopPropagation(),!0)},e.prototype.onUp=function(e,t){var n={origin:"keyboard",originalEvent:t};return e.getHighlight()?e.clearHighlight(n):(e.focusPrevious(1,n),e.reveal(e.getFocus()).done(null,s.onUnexpectedError)),!0},e.prototype.onPageUp=function(e,t){var n={origin:"keyboard",originalEvent:t};return e.getHighlight()?e.clearHighlight(n):(e.focusPreviousPage(n),e.reveal(e.getFocus()).done(null,s.onUnexpectedError)),!0},e.prototype.onDown=function(e,t){var n={origin:"keyboard",originalEvent:t};return e.getHighlight()?e.clearHighlight(n):(e.focusNext(1,n),e.reveal(e.getFocus()).done(null,s.onUnexpectedError)),!0},e.prototype.onPageDown=function(e,t){var n={origin:"keyboard",originalEvent:t};return e.getHighlight()?e.clearHighlight(n):(e.focusNextPage(n),e.reveal(e.getFocus()).done(null,s.onUnexpectedError)),!0},e.prototype.onHome=function(e,t){var n={origin:"keyboard",originalEvent:t};return e.getHighlight()?e.clearHighlight(n):(e.focusFirst(n),e.reveal(e.getFocus()).done(null,s.onUnexpectedError)),!0},e.prototype.onEnd=function(e,t){var n={origin:"keyboard",originalEvent:t};return e.getHighlight()?e.clearHighlight(n):(e.focusLast(n),e.reveal(e.getFocus()).done(null,s.onUnexpectedError)),!0},e.prototype.onLeft=function(e,t){var n={origin:"keyboard",originalEvent:t};if(e.getHighlight())e.clearHighlight(n);else{var i=e.getFocus();e.collapse(i).then(function(t){if(i&&!t)return e.focusParent(n),e.reveal(e.getFocus())}).done(null,s.onUnexpectedError)}return!0},e.prototype.onRight=function(e,t){var n={origin:"keyboard",originalEvent:t};if(e.getHighlight())e.clearHighlight(n);else{var i=e.getFocus();e.expand(i).then(function(t){if(i&&!t)return e.focusFirstChild(n),e.reveal(e.getFocus())}).done(null,s.onUnexpectedError)}return!0},e.prototype.onEnter=function(e,t){var n={origin:"keyboard",originalEvent:t};if(e.getHighlight())return!1;var i=e.getFocus();return i&&e.setSelection([i],n),!0},e.prototype.onSpace=function(e,t){if(e.getHighlight())return!1;var n=e.getFocus();return n&&e.toggleExpansion(n),!0},e.prototype.onEscape=function(e,t){var n={origin:"keyboard",originalEvent:t};return e.getHighlight()?(e.clearHighlight(n),!0):e.getSelection().length?(e.clearSelection(n),!0):!!e.getFocus()&&(e.clearFocus(n),!0)},e}();t.DefaultController=d;var h=function(){function e(){}return e.prototype.getDragURI=function(e,t){return null},e.prototype.onDragStart=function(e,t,n){},e.prototype.onDragOver=function(e,t,n,i){return null},e.prototype.drop=function(e,t,n,i){},e}();t.DefaultDragAndDrop=h;var p=function(){function e(){}return e.prototype.isVisible=function(e,t){return!0},e}();t.DefaultFilter=p;var f=function(){function e(){}return e.prototype.compare=function(e,t,n){return 0},e}();t.DefaultSorter=f;var g=function(){function e(){}return e.prototype.getAriaLabel=function(e,t){return null},e}();t.DefaultAccessibilityProvider=g;var v=function(e){function t(t,i){var o=e.call(this,"vs.tree.collapse",n.localize(0,null),"monaco-tree-action collapse-all",i)||this;return o.viewer=t,o}return m(t,e),t.prototype.run=function(e){return this.viewer.getHighlight()?i.TPromise.as(null):(this.viewer.collapseAll(),this.viewer.clearSelection(),this.viewer.clearFocus(),this.viewer.DOMFocus(),this.viewer.focusFirst(),i.TPromise.aLine truncated
|
||||
this.isLoosingFocus=!1},e.prototype.loosingFocus=function(e){var t=this;if(this.isVisible()){var n=e.relatedTarget;!this.quickNavigateConfiguration&&_.isAncestor(n,this.builder.getHTMLElement())||(this.isLoosingFocus=!0,i.TPromise.timeout(0).then(function(){if(t.isLoosingFocus){var e=t.callbacks.onFocusLost&&t.callbacks.onFocusLost();e||t.hide(w.FOCUS_LOST)}}))}},e.prototype.dispose=function(){this.toUnbind=y.dispose(this.toUnbind),this.progressBar.dispose(),this.inputBox.dispose(),this.tree.dispose()},e}();E.MAX_WIDTH=600,E.MAX_ITEMS_HEIGHT=440,t.QuickOpenWidget=E}),define(d[271],h([0,1,34,270,21]),function(e,t,n,i,o){"use strict";var r=function(){function e(e,t,n,i,o){this.codeEditor=e,this.create(t,n,i,o)}return e.prototype.create=function(e,t,o,r){this.domNode=n.$().div().getHTMLElement(),this.quickOpenWidget=new i.QuickOpenWidget(this.domNode,{onOk:e,onCancel:t,onType:o},{inputPlaceHolder:null,inputAriaLabel:r.inputAriaLabel},null),this.quickOpenWidget.create(),this.codeEditor.addOverlayWidget(this)},e.prototype.setInput=function(e,t){this.quickOpenWidget.setInput(e,t)},e.prototype.getId=function(){return e.ID},e.prototype.getDomNode=function(){return this.domNode},e.prototype.destroy=function(){this.codeEditor.removeOverlayWidget(this),this.quickOpenWidget.dispose()},e.prototype.isVisible=function(){return this.visible},e.prototype.show=function(e){this.visible=!0;var t=this.codeEditor.getLayoutInfo();t&&this.quickOpenWidget.layout(new n.Dimension(t.width,t.height)),this.quickOpenWidget.show(e),this.codeEditor.layoutOverlayWidget(this)},e.prototype.hide=function(){this.visible=!1,this.quickOpenWidget.hide(),this.codeEditor.layoutOverlayWidget(this)},e.prototype.getPosition=function(){return this.visible?{preference:o.OverlayWidgetPositionPreference.TOP_CENTER}:null},e}();r.ID="editor.contrib.quickOpenEditorWidget",t.QuickOpenEditorWidget=r}),define(d[272],h([8,7]),function(e,t){return e.create("vs/editor/common/config/commonEditorConfig",t)}),define(d[273],h([8,7]),function(e,t){return e.create("vs/editor/common/config/defaultConfig",t)}),define(d[42],h([0,1,273,18,73]),function(e,t,n,i,o){"use strict";t.DEFAULT_INDENTATION={tabSize:4,insertSpaces:!0,detectIndentation:!0},t.DEFAULT_TRIM_AUTO_WHITESPACE=!0;var r="Consolas, 'Courier New', monospace",s="Menlo, Monaco, 'Courier New', monospace",a="'Droid Sans Mono', 'Courier New', monospace, 'Droid Sans Fallback'";t.GOLDEN_LINE_HEIGHT_RATIO=i.isMacintosh?1.5:1.35;var u=function(){function e(){this.editor={experimentalScreenReader:!0,rulers:[],wordSeparators:o.USUAL_WORD_SEPARATORS,selectionClipboard:!0,ariaLabel:n.localize(0,null),lineNumbers:"on",selectOnLineNumbers:!0,lineNumbersMinChars:5,glyphMargin:!0,lineDecorationsWidth:10,revealHorizontalRightPadding:30,roundedSelection:!0,theme:"vs",readOnly:!1,scrollbar:{verticalScrollbarSize:14,horizontal:"auto",useShadows:!0,verticalHasArrows:!1,horizontalHasArrows:!1},fixedOverflowWidgets:!1,overviewRulerLanes:2,cursorBlinking:"blink",mouseWheelZoom:!1,cursorStyle:"line",fontLigatures:!1,disableTranslate3d:!1,disableMonospaceOptimizations:!1,hideCursorInOverviewRuler:!1,scrollBeyondLastLine:!0,automaticLayout:!1,wrappingColumn:300,wordWrap:!1,wrappingIndent:"same",wordWrapBreakBeforeCharacters:"([{‘“〈《「『【〔([{「£¥$£¥++",wordWrapBreakAfterCharacters:" \t})]?|&,;¢°′″‰℃、。。、¢,.:;?!%・・ゝゞヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻ァィゥェォャュョッー’”〉》」』】〕)]}」",wordWrapBreakObtrusiveCharacters:".",hover:!0,contextmenu:!0,mouseWheelScrollSensitivity:1,quickSuggestions:!0,quickSuggestionsDelay:10,parameterHints:!0,iconsInSuggestions:!0,autoClosingBrackets:!0,formatOnType:!1,formatOnPaste:!1,suggestOnTriggerCharacters:!0,acceptSuggestionOnEnter:!0,acceptSuggestionOnCommitCharacter:!0,snippetSuggestions:"bottom",emptySelectionClipboard:!0,tabCompletion:!1,wordBasedSuggestions:!0,suggestFontSize:0,suggestLineHeight:0,selectionHighlight:!0,codeLens:!0,referenceInfos:!0,folding:!0,renderWhitespace:"none",renderControlCharacters:!1,renderIndentGuides:!1,renderLineHighlight:"line",useTabStops:!0,fontFamily:i.isMacintosh?s:i.isLinux?a:r,fontWeight:"normal",fontSize:i.isMacintosh?12:14,lineHeight:0}}return e}();t.DefaultConfig=new u}),define(d[109],h([0,1,42,108]),function(e,t,n,i){"use strict";function o(e,t){if("number"==typeof e)return e;var n=parseFloat(e);return isNaN(n)?t:n}function r(e,t){if("number"==typeof e)return Math.round(e);var n=parseInt(e);return isNaN(n)?t:n}function s(e,t,n){return e<t?t:e>n?n:e}var a=function(){function e(e){this.fontFamily=String(e.fontFamily),this.fontWeight=String(e.fontWeight),this.fontSize=e.fontSize,this.lineHeight=0|e.lineHeight}return e.createFromRawSettings=function(t){var a=String(t.fontFamily)||n.DefaultConfig.editor.fontFamily,u=String(t.fontWeight)||n.DefaultConfig.editor.fontWeLine truncated
|
||||
this._cachedAction=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"id",{get:function(){return this._cachedAction instanceof n.Action?this._cachedAction.id:this._id},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"label",{get:function(){return this._cachedAction instanceof n.Action?this._cachedAction.label:this._label},set:function(e){this._cachedAction instanceof n.Action?this._cachedAction.label=e:this._setLabel(e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"class",{get:function(){return this._cachedAction instanceof n.Action?this._cachedAction.class:this._cssClass},set:function(e){this._cachedAction instanceof n.Action?this._cachedAction.class=e:this._setClass(e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"enabled",{get:function(){return this._cachedAction instanceof n.Action?this._cachedAction.enabled:this._enabled},set:function(e){this._cachedAction instanceof n.Action?this._cachedAction.enabled=e:this._setEnabled(e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"order",{get:function(){return this._cachedAction instanceof n.Action?this._cachedAction.order:this._order},set:function(e){this._cachedAction instanceof n.Action?this._cachedAction.order=e:this._order=e},enumerable:!0,configurable:!0}),t.prototype.run=function(e){return this._cachedAction?this._cachedAction.run(e):this._createAction().then(function(t){return t.run(e)})},t.prototype._createAction=function(){var e=this,t=i.TPromise.as(void 0);return t.then(function(){return e._instantiationService.createInstance(e._descriptor)}).then(function(t){if(!(t instanceof n.Action))throw new Error("Action must be an instanceof Base Action");return e._cachedAction=t,e._emitterUnbind=t.onDidChange(function(t){return e._onDidChange.fire(t)}),t})},t.prototype.dispose=function(){this._emitterUnbind&&this._emitterUnbind.dispose(),this._cachedAction&&this._cachedAction.dispose(),e.prototype.dispose.call(this)},t}(n.Action);t.DeferredAction=d}),define(d[56],h([0,1,14]),function(e,t,n){"use strict";function i(e,t,n){function i(e,t){for(var n=e,i=0;i<t.length;i++)if(n=n[t[i]],"undefined"==typeof n||null===n)return;return n}var o=t.split("."),r=i(e,o);return"undefined"==typeof r?n:r}t.IConfigurationService=n.createDecorator("configurationService");var o;!function(e){e[e.Default=1]="Default",e[e.User=2]="User",e[e.Workspace=3]="Workspace"}(o=t.ConfigurationSource||(t.ConfigurationSource={})),t.getConfigurationValue=i}),define(d[19],h([0,1,14]),function(e,t,n){"use strict";function i(e,t){var n=e.getType(),i=t.getType();if(n!==i)return n-i;switch(n){case o.Defined:return e.cmp(t);case o.Not:return e.cmp(t);case o.Equals:return e.cmp(t);case o.NotEquals:return e.cmp(t);default:throw new Error("Unknown ContextKeyExpr!")}}var o;!function(e){e[e.Defined=1]="Defined",e[e.Not=2]="Not",e[e.Equals=3]="Equals",e[e.NotEquals=4]="NotEquals",e[e.And=5]="And"}(o=t.ContextKeyExprType||(t.ContextKeyExprType={}));var r=function(){function e(){}return e.has=function(e){return new s(e)},e.equals=function(e,t){return new a(e,t)},e.notEquals=function(e,t){return new u(e,t)},e.not=function(e){return new l(e)},e.and=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return new c(e)},e.deserialize=function(e){var t=this;if(!e)return null;var n=e.split("&&"),i=new c(n.map(function(e){return t._deserializeOne(e)}));return i.normalize()},e._deserializeOne=function(e){if(e=e.trim(),e.indexOf("!=")>=0){var t=e.split("!=");return new u(t[0].trim(),this._deserializeValue(t[1]))}if(e.indexOf("==")>=0){var t=e.split("==");return new a(t[0].trim(),this._deserializeValue(t[1]))}return/^\!\s*/.test(e)?new l(e.substr(1).trim()):new s(e)},e._deserializeValue=function(e){if(e=e.trim(),"true"===e)return!0;if("false"===e)return!1;var t=/^'([^']*)'$/.exec(e);return t?t[1].trim():e},e}();t.ContextKeyExpr=r;var s=function(){function e(e){this.key=e}return e.prototype.getType=function(){return o.Defined},e.prototype.cmp=function(e){return this.key<e.key?-1:this.key>e.key?1:0},e.prototype.equals=function(t){return t instanceof e&&this.key===t.key},e.prototype.evaluate=function(e){return!!e[this.key]},e.prototype.normalize=function(){return this},e.prototype.serialize=function(){return this.key},e.prototype.keys=function(){return[this.key]},e}();t.ContextKeyDefinedExpr=s;var a=function(){function e(e,t){this.key=e,this.value=t}return e.prototype.getType=function(){return o.Equals},e.prototype.cmp=function(e){return this.key<e.key?-1:this.key>e.key?1:this.value<e.value?-1:this.value>e.value?1:0},e.prototype.equals=function(t){return t instanceof e&&(this.key===t.key&&this.value===t.value)},e.prototype.evaluate=function(e){return e[this.key]==this.value},e.prototype.normalize=function(){return"boolean"==typeof this.value?this.value?new s(this.key):new l(this.key):this},e.prototype.serialize=function(){return"boolean"==typeof this.value?this.normalize().serialize():this.key+" == '"+this.vaLine truncated
|
||||
CursorDown:"cursorDown",CursorDownSelect:"cursorDownSelect",CursorPageUp:"cursorPageUp",CursorPageUpSelect:"cursorPageUpSelect",CursorPageDown:"cursorPageDown",CursorPageDownSelect:"cursorPageDownSelect",CursorHome:"cursorHome",CursorHomeSelect:"cursorHomeSelect",CursorEnd:"cursorEnd",CursorEndSelect:"cursorEndSelect",ExpandLineSelection:"expandLineSelection",CursorTop:"cursorTop",CursorTopSelect:"cursorTopSelect",CursorBottom:"cursorBottom",CursorBottomSelect:"cursorBottomSelect",CursorColumnSelectLeft:"cursorColumnSelectLeft",CursorColumnSelectRight:"cursorColumnSelectRight",CursorColumnSelectUp:"cursorColumnSelectUp",CursorColumnSelectPageUp:"cursorColumnSelectPageUp",CursorColumnSelectDown:"cursorColumnSelectDown",CursorColumnSelectPageDown:"cursorColumnSelectPageDown",CursorMove:"cursorMove",AddCursorDown:"addCursorDown",AddCursorUp:"addCursorUp",CursorUndo:"cursorUndo",MoveTo:"moveTo",MoveToSelect:"moveToSelect",ColumnSelect:"columnSelect",CreateCursor:"createCursor",LastCursorMoveToSelect:"lastCursorMoveToSelect",Type:"type",ReplacePreviousChar:"replacePreviousChar",CompositionStart:"compositionStart",CompositionEnd:"compositionEnd",Paste:"paste",Tab:"tab",Indent:"indent",Outdent:"outdent",DeleteLeft:"deleteLeft",DeleteRight:"deleteRight",DeleteWordLeft:"deleteWordLeft",DeleteWordStartLeft:"deleteWordStartLeft",DeleteWordEndLeft:"deleteWordEndLeft",DeleteWordRight:"deleteWordRight",DeleteWordStartRight:"deleteWordStartRight",DeleteWordEndRight:"deleteWordEndRight",RemoveSecondaryCursors:"removeSecondaryCursors",CancelSelection:"cancelSelection",Cut:"cut",Undo:"undo",Redo:"redo",WordSelect:"wordSelect",WordSelectDrag:"wordSelectDrag",LastCursorWordSelect:"lastCursorWordSelect",LineSelect:"lineSelect",LineSelectDrag:"lineSelectDrag",LastCursorLineSelect:"lastCursorLineSelect",LastCursorLineSelectDrag:"lastCursorLineSelectDrag",LineInsertBefore:"lineInsertBefore",LineInsertAfter:"lineInsertAfter",LineBreakInsert:"lineBreakInsert",SelectAll:"selectAll",EditorScroll:"editorScroll",ScrollLineUp:"scrollLineUp",ScrollLineDown:"scrollLineDown",ScrollPageUp:"scrollPageUp",ScrollPageDown:"scrollPageDown",RevealLine:"revealLine"};var R;!function(e){e[e.Line=1]="Line",e[e.Block=2]="Block",e[e.Underline=3]="Underline"}(R=t.TextEditorCursorStyle||(t.TextEditorCursorStyle={}));var k;!function(e){e[e.Hidden=0]="Hidden",e[e.Blink=1]="Blink",e[e.Smooth=2]="Smooth",e[e.Phase=3]="Phase",e[e.Expand=4]="Expand",e[e.Solid=5]="Solid"}(k=t.TextEditorCursorBlinkingStyle||(t.TextEditorCursorBlinkingStyle={})),t.cursorStyleToString=s;var O=function(){function e(e,t,n,i){this.from=0|e,this.to=0|t,this.colorId=0|n,this.position=0|i}return e}();t.ColorZone=O;var P=function(){function e(e,t,n,i,o,r){this.startLineNumber=e,this.endLineNumber=t,this.position=n,this.forceHeight=i,this._color=o,this._darkColor=r,this._colorZones=null}return e.prototype.getColor=function(e){return e?this._darkColor:this._color},e.prototype.equals=function(e){return this.startLineNumber===e.startLineNumber&&this.endLineNumber===e.endLineNumber&&this.position===e.position&&this.forceHeight===e.forceHeight&&this._color===e._color&&this._darkColor===e._darkColor},e.prototype.compareTo=function(e){return this.startLineNumber===e.startLineNumber?this.endLineNumber===e.endLineNumber?this.forceHeight===e.forceHeight?this.position===e.position?this._darkColor===e._darkColor?this._color===e._color?0:this._color<e._color?-1:1:this._darkColor<e._darkColor?-1:1:this.position-e.position:this.forceHeight-e.forceHeight:this.endLineNumber-e.endLineNumber:this.startLineNumber-e.startLineNumber},e.prototype.setColorZones=function(e){this._colorZones=e},e.prototype.getColorZones=function(){return this._colorZones},e}();t.OverviewRulerZone=P}),define(d[341],h([0,1,35,153,9,27,11,2,199,4]),function(e,t,n,i,o,r,s,a,u,l){"use strict";function c(e){var t=i.parse(i.stringify(e));n.mixin(t,e.light);var o=i.parse(i.stringify(e));return n.mixin(o,e.dark),{light:t,dark:o}}var d=function(e){function t(t){void 0===t&&(t=s.createStyleSheet());var n=e.call(this)||this;return n._styleSheet=t,n._decorationOptionProviders=Object.create(null),n}return m(t,e),t.prototype.registerDecorationType=function(e,t,n){var i=this._decorationOptionProviders[e];i||(i=n?new h(this._styleSheet,e,n,t):new p(this._styleSheet,e,t),this._decorationOptionProviders[e]=i),i.refCount++},t.prototype.removeDecorationType=function(e){var t=this._decorationOptionProviders[e];t&&(t.refCount--,t.refCount<=0&&(delete this._decorationOptionProviders[e],t.dispose(),this.listCodeEditors().forEach(function(t){return t.removeDecorations(e)})))},t.prototype.resolveDecorationOptions=function(e,t){var n=this._decorationOptionProviders[e];if(!n)throw new Error("Unknown decoration type key: "+e);return n.getOptions(this,t)},t}(u.AbstractCodeEditorService);t.CodeEditorServiceImpl=d;var h=function(){function e(e,t,n,i){this._parentTypeKey=n,this.refCount=0;var o=c(i);this._beforeContentClassName=f.createCSSRules(e,t,n,3,{light:f.geLine truncated
|
||||
}}return!1},e.prototype.parseSearchRequest=function(){if(""===this.searchString)return null;var t;t=this.isRegex?e._isMultilineRegexSource(this.searchString):this.searchString.indexOf("\n")>=0;var i=null;try{i=n.createRegExp(this.searchString,this.isRegex,{matchCase:this.matchCase,wholeWord:this.wholeWord,multiline:t,global:!0})}catch(e){return null}return i?i:null},e}();t.SearchParams=u;var l=function(){function e(){}return e.findMatches=function(e,t,n,i,o){var r=t.parseSearchRequest();return r?r.multiline?this._doFindMatchesMultiline(e,n,r,i,o):this._doFindMatchesLineByLine(e,n,r,i,o):[]},e._getMultilineMatchRange=function(e,t,n,i,r){var s;if("\r\n"===e.getEOL()){for(var a=0,u=0;u<i;u++){var l=n.charCodeAt(u);10===l&&a++}s=t+i+a}else s=t+i;var c;if("\r\n"===e.getEOL()){for(var d=0,u=0,h=r.length;u<h;u++){var l=n.charCodeAt(u+i);10===l&&d++}c=s+r.length+d}else c=s+r.length;var p=e.getPositionAt(s),f=e.getPositionAt(c);return new o.Range(p.lineNumber,p.column,f.lineNumber,f.column)},e._doFindMatchesMultiline=function(e,t,n,i,o){for(var a,u=e.getOffsetAt(t.getStartPosition()),l=e.getValueInRange(t,r.EndOfLinePreference.LF),c=[],d=0,h=0,p=0;a=n.exec(l);){var f=u+a.index,g=f+a[0].length;if(d===f&&h===g)return c;if(c[p++]=s(this._getMultilineMatchRange(e,u,l,a.index,a[0]),a,i),p>=o)return c;d=f,h=g}return c},e._doFindMatchesLineByLine=function(e,t,n,i,o){var r=[],s=0;if(t.startLineNumber===t.endLineNumber){var a=e.getLineContent(t.startLineNumber).substring(t.startColumn-1,t.endColumn-1);return s=this._findMatchesInLine(n,a,t.startLineNumber,t.startColumn-1,s,r,i,o),r}var u=e.getLineContent(t.startLineNumber).substring(t.startColumn-1);s=this._findMatchesInLine(n,u,t.startLineNumber,t.startColumn-1,s,r,i,o);for(var l=t.startLineNumber+1;l<t.endLineNumber&&s<o;l++)s=this._findMatchesInLine(n,e.getLineContent(l),l,0,s,r,i,o);if(s<o){var c=e.getLineContent(t.endLineNumber).substring(0,t.endColumn-1);s=this._findMatchesInLine(n,c,t.endLineNumber,0,s,r,i,o)}return r},e._findMatchesInLine=function(e,t,n,i,r,a,u,l){var c;e.lastIndex=0;do if(c=e.exec(t)){var d=new o.Range(n,c.index+1+i,n,c.index+1+c[0].length+i);if(a.length>0&&d.equalsRange(a[a.length-1].range))return r;if(a.push(s(d,c,u)),r++,r>=l)return r;if(c.index+c[0].length===t.length)return r}while(c);return r},e.findNextMatch=function(e,t,n,i){var o=t.parseSearchRequest();return o?o.multiline?this._doFindNextMatchMultiline(e,n,o,i):this._doFindNextMatchLineByLine(e,n,o,i):null},e._doFindNextMatchMultiline=function(e,t,n,a){var u=new i.Position(t.lineNumber,1),l=e.getOffsetAt(u),c=e.getLineCount(),d=e.getValueInRange(new o.Range(u.lineNumber,u.column,c,e.getLineMaxColumn(c)),r.EndOfLinePreference.LF);n.lastIndex=t.column-1;var h=n.exec(d);return h?s(this._getMultilineMatchRange(e,l,d,h.index,h[0]),h,a):1!==t.lineNumber||1!==t.column?this._doFindNextMatchMultiline(e,new i.Position(1,1),n,a):null},e._doFindNextMatchLineByLine=function(e,t,n,i){var o=e.getLineCount(),r=t.lineNumber,s=e.getLineContent(r),a=this._findFirstMatchInLine(n,s,r,t.column,i);if(a)return a;for(var u=1;u<=o;u++){var l=(r+u-1)%o,c=e.getLineContent(l+1),d=this._findFirstMatchInLine(n,c,l+1,1,i);if(d)return d}return null},e._findFirstMatchInLine=function(e,t,n,i,r){e.lastIndex=i-1;var a=e.exec(t);return a?s(new o.Range(n,a.index+1,n,a.index+1+a[0].length),a,r):null},e.findPreviousMatch=function(e,t,n,i){var o=t.parseSearchRequest();return o?o.multiline?this._doFindPreviousMatchMultiline(e,n,o,i):this._doFindPreviousMatchLineByLine(e,n,o,i):null},e._doFindPreviousMatchMultiline=function(e,t,n,r){var s=this._doFindMatchesMultiline(e,new o.Range(1,1,t.lineNumber,t.column),n,r,10*a);if(s.length>0)return s[s.length-1];var u=e.getLineCount();return t.lineNumber!==u||t.column!==e.getLineMaxColumn(u)?this._doFindPreviousMatchMultiline(e,new i.Position(u,e.getLineMaxColumn(u)),n,r):null},e._doFindPreviousMatchLineByLine=function(e,t,n,i){var o=e.getLineCount(),r=t.lineNumber,s=e.getLineContent(r).substring(0,t.column-1),a=this._findLastMatchInLine(n,s,r,i);if(a)return a;for(var u=1;u<=o;u++){var l=(o+r-u-1)%o,c=e.getLineContent(l+1),d=this._findLastMatchInLine(n,c,l+1,i);if(d)return d}return null},e._findLastMatchInLine=function(e,t,n,i){for(var r,a=null;r=e.exec(t);){var u=new o.Range(n,r.index+1,n,r.index+1+r[0].length);if(a&&u.equalsRange(a.range))break;if(a=s(u,r,i),r.index+r[0].length===t.length)break}return a},e}();t.TextModelSearch=l}),define(d[94],h([0,1,25,9,15,3,2,72,507,42,86,506,346]),function(e,t,n,i,o,r,s,a,u,l,c,d,h){"use strict";var p=999;t.LONG_LINE_BOUNDARY=1e3;var f=function(e){function n(t,i){var o=this;return t.push(s.EventType.ModelRawContentChanged,s.EventType.ModelOptionsChanged,s.EventType.ModelContentChanged2),o=e.call(this,t)||this,o._shouldSimplifyMode=i.length>n.MODEL_SYNC_LIMIT,o._shouldDenyMode=i.length>n.MODEL_TOKENIZATION_LIMIT,o._options=new s.TextModelResolvedOptions(i.options),o._constructLines(i),o._setVersionId(1),o._isDisposed=!1,o._isDisposing=!1,o}return m(n,e),nLine truncated
|
||||
return e.deleteRight=function(e,t,s){var a=s.selection;if(a.isEmpty()){var u=s.position,l=r.MoveOperations.right(e,t,u.lineNumber,u.column);a=new o.Range(l.lineNumber,l.column,u.lineNumber,u.column)}if(a.isEmpty())return null;var c=!1;return a.startLineNumber!==a.endLineNumber&&(c=!0),new i.EditOperationResult(new n.ReplaceCommand(a,""),{shouldPushStackElementBefore:c,shouldPushStackElementAfter:!1})},e.autoClosingPairDelete=function(e,t,r){if(!e.autoClosingBrackets)return null;if(!r.selection.isEmpty())return null;var s=r.position,a=t.getLineContent(s.lineNumber),u=a[s.column-2];if(!e.autoClosingPairsOpen.hasOwnProperty(u))return null;var l=a[s.column-1],c=e.autoClosingPairsOpen[u];if(l!==c)return null;var d=new o.Range(s.lineNumber,s.column-1,s.lineNumber,s.column+1);return new i.EditOperationResult(new n.ReplaceCommand(d,""),{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!1})},e.deleteLeft=function(e,t,a){var u=this.autoClosingPairDelete(e,t,a);if(u)return u;var l=a.selection;if(l.isEmpty()){var c=a.position;if(e.useTabStops&&c.column>1){var d=t.getLineContent(c.lineNumber),h=s.firstNonWhitespaceIndex(d),p=h===-1?d.length+1:h+1;if(c.column<=p){var f=i.CursorColumns.visibleColumnFromColumn2(e,t,c),g=i.CursorColumns.prevTabStop(f,e.tabSize),m=i.CursorColumns.columnFromVisibleColumn2(e,t,c.lineNumber,g);l=new o.Range(c.lineNumber,m,c.lineNumber,c.column)}else l=new o.Range(c.lineNumber,c.column-1,c.lineNumber,c.column)}else{var v=r.MoveOperations.left(e,t,c.lineNumber,c.column);l=new o.Range(v.lineNumber,v.column,c.lineNumber,c.column)}}if(l.isEmpty())return null;var _=!1;return l.startLineNumber!==l.endLineNumber&&(_=!0),new i.EditOperationResult(new n.ReplaceCommand(l,""),{shouldPushStackElementBefore:_,shouldPushStackElementAfter:!1})},e.cut=function(e,t,r,s){var a=r.selection;if(a.isEmpty()){if(s){var u=r.position,l=void 0,c=void 0,d=void 0,h=void 0;u.lineNumber<t.getLineCount()?(l=u.lineNumber,c=1,d=u.lineNumber+1,h=1):u.lineNumber>1?(l=u.lineNumber-1,c=t.getLineMaxColumn(u.lineNumber-1),d=u.lineNumber,h=t.getLineMaxColumn(u.lineNumber)):(l=u.lineNumber,c=1,d=u.lineNumber,h=t.getLineMaxColumn(u.lineNumber));var p=new o.Range(l,c,d,h);return p.isEmpty()?null:new i.EditOperationResult(new n.ReplaceCommand(p,""),{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})}return null}return this.deleteRight(e,t,r)},e}();t.DeleteOperations=a}),define(d[353],h([0,1,10,54,41,3,2,9,349,38,65,479]),function(e,t,n,i,o,r,s,a,u,l,c,d){"use strict";var h=function(){function e(){}return e.indent=function(e,t,n){return new o.EditOperationResult(new u.ShiftCommand(n.selection,{isUnshift:!1,tabSize:e.tabSize,oneIndent:e.oneIndent}),{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0,shouldRevealHorizontal:!1})},e.outdent=function(e,t,n){return new o.EditOperationResult(new u.ShiftCommand(n.selection,{isUnshift:!0,tabSize:e.tabSize,oneIndent:e.oneIndent}),{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0,shouldRevealHorizontal:!1})},e.shiftIndent=function(e,t,n){n=n||1;for(var i=u.ShiftCommand.shiftIndentCount(t,t.length+n,e.tabSize),o="",r=0;r<i;r++)o+="\t";return o},e.unshiftIndent=function(e,t,n){n=n||1;for(var i=u.ShiftCommand.unshiftIndentCount(t,t.length+n,e.tabSize),o="",r=0;r<i;r++)o+="\t";return o},e.paste=function(e,t,n,a,u){var l=n.position,c=n.selection;if(u&&a.indexOf("\n")!==a.length-1&&(u=!1),u&&c.startLineNumber!==c.endLineNumber&&(u=!1),u&&c.startColumn===t.getLineMinColumn(c.startLineNumber)&&c.endColumn===t.getLineMaxColumn(c.startLineNumber)&&(u=!1),u){var d=new r.Range(l.lineNumber,1,l.lineNumber,1);return new o.EditOperationResult(new i.ReplaceCommand(d,a),{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0,cursorPositionChangeReason:s.CursorChangeReason.Paste})}return new o.EditOperationResult(new i.ReplaceCommand(c,a),{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0,cursorPositionChangeReason:s.CursorChangeReason.Paste})},e._goodIndentForLine=function(t,n,i){var o=l.LanguageConfigurationRegistry.getGoodIndentActionForLine(n,i);if(o){if(o.action){var r=o.indentation;return o.action===c.IndentAction.Indent&&(r=e.shiftIndent(t,r)),o.action===c.IndentAction.Outdent&&(r=e.unshiftIndent(t,r)),r=t.normalizeIndentation(r),0===r.length?"":r}return o.indentation}return null},e._replaceJumpToNextIndent=function(e,t,n){var r="",s=n.getStartPosition();if(e.insertSpaces)for(var a=o.CursorColumns.visibleColumnFromColumn2(e,t,s),u=e.tabSize,l=u-a%u,c=0;c<l;c++)r+=" ";else r="\t";return new i.ReplaceCommand(n,r)},e.tab=function(e,t,n){var s=n.selection;if(s.isEmpty()){var u=t.getLineContent(s.startLineNumber);if(/^\s*$/.test(u)){var l=this._goodIndentForLine(e,t,s.startLineNumber);l=l||"\t";var c=e.normalizeIndentation(l);if(!a.startsWith(u,c)){var d=new i.ReplaceCommand(new r.Range(s.startLineNumber,1,s.startLineNumber,u.length+1),c);return new o.EditOperationResult(d,{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!1,isAutoWhLine truncated
|
||||
return this._applyMoveOperationResult(e,i,this._fromModelCursorState(e,l.WordOperations.moveWordLeft(e.config,e.model,e.modelState,t,n)))},e._moveRight=function(e,t,n,i){return void 0===n&&(n=1),this._applyMoveOperationResult(e,i,this._fromViewCursorState(e,u.MoveOperations.moveRight(e.config,e.viewModel,e.viewState,t,n)))},e.moveWordRight=function(e,t,n,i){return this._applyMoveOperationResult(e,i,this._fromModelCursorState(e,l.WordOperations.moveWordRight(e.config,e.model,e.modelState,t,n)))},e._moveDown=function(e,t,n){var i=(t.isPaged?t.pageSize||e.config.pageSize:t.value)||1;return a.CursorMoveByUnit.WrappedLine===t.by?this._moveDownByViewLines(e,t.select,i,n):this._moveDownByModelLines(e,t.select,i,n)},e._moveDownByViewLines=function(e,t,n,i){return this._applyMoveOperationResult(e,i,this._fromViewCursorState(e,u.MoveOperations.moveDown(e.config,e.viewModel,e.viewState,t,n)))},e._moveDownByModelLines=function(e,t,n,i){return this._applyMoveOperationResult(e,i,this._fromModelCursorState(e,u.MoveOperations.moveDown(e.config,e.model,e.modelState,t,n)))},e.translateDown=function(e,t){return this._applyMoveOperationResult(e,t,this._fromViewCursorState(e,u.MoveOperations.translateDown(e.config,e.viewModel,e.viewState)))},e._moveUp=function(e,t,n){var i=(t.isPaged?t.pageSize||e.config.pageSize:t.value)||1;return a.CursorMoveByUnit.WrappedLine===t.by?this._moveUpByViewLines(e,t.select,i,n):this._moveUpByModelLines(e,t.select,i,n)},e._moveUpByViewLines=function(e,t,n,i){return this._applyMoveOperationResult(e,i,this._fromViewCursorState(e,u.MoveOperations.moveUp(e.config,e.viewModel,e.viewState,t,n)))},e._moveUpByModelLines=function(e,t,n,i){return this._applyMoveOperationResult(e,i,this._fromModelCursorState(e,u.MoveOperations.moveUp(e.config,e.model,e.modelState,t,n)))},e.translateUp=function(e,t){return this._applyMoveOperationResult(e,t,this._fromViewCursorState(e,u.MoveOperations.translateUp(e.config,e.viewModel,e.viewState)))},e.moveToBeginningOfLine=function(e,t,n){return this._applyMoveOperationResult(e,n,this._fromViewCursorState(e,u.MoveOperations.moveToBeginningOfLine(e.config,e.viewModel,e.viewState,t)))},e.moveToEndOfLine=function(e,t,n){return this._applyMoveOperationResult(e,n,this._fromViewCursorState(e,u.MoveOperations.moveToEndOfLine(e.config,e.viewModel,e.viewState,t)))},e.expandLineSelection=function(e,t){t.cursorPositionChangeReason=a.CursorChangeReason.Explicit;var n=e.viewState.selection,i=n.startLineNumber,o=n.startColumn,r=n.endLineNumber,s=n.endColumn,l=e.viewModel.getLineMaxColumn(r);if(1!==o||s!==l)o=1,s=l;else{var c=u.MoveOperations.down(e.config,e.viewModel,r,s,0,1,!0);r=c.lineNumber,s=e.viewModel.getLineMaxColumn(r)}return e.moveViewPosition(!1,i,o,0,!0),e.moveViewPosition(!0,r,s,0,!0),!0},e.moveToBeginningOfBuffer=function(e,t,n){return this._applyMoveOperationResult(e,n,this._fromModelCursorState(e,u.MoveOperations.moveToBeginningOfBuffer(e.config,e.model,e.modelState,t)))},e.moveToEndOfBuffer=function(e,t,n){return this._applyMoveOperationResult(e,n,this._fromModelCursorState(e,u.MoveOperations.moveToEndOfBuffer(e.config,e.model,e.modelState,t)))},e.selectAll=function(e,t){var n,i,o,r,s=!0;if(e.model.hasEditableRange()){var a=e.model.getEditableRange(),u=e.modelState.selection;u.equalsRange(a)||(s=!1,n=a.startLineNumber,i=a.startColumn,o=a.endLineNumber,r=a.endColumn)}return s&&(n=1,i=1,o=e.model.getLineCount(),r=e.model.getLineMaxColumn(o)),e.moveModelPosition(!1,n,i,0,!1),e.moveModelPosition(!0,o,r,0,!1),t.shouldReveal=!1,t.shouldRevealHorizontal=!1,!0},e.line=function(e,t,n,i,o){var s=e.validatePosition(n),u=i?e.validateViewPosition(i.lineNumber,i.column,s):e.convertModelPositionToViewPosition(s.lineNumber,s.column);if(o.cursorPositionChangeReason=a.CursorChangeReason.Explicit,o.shouldRevealHorizontal=!1,t&&e.modelState.hasSelection()){var l=e.modelState.selectionStart.getStartPosition().lineNumber;if(s.lineNumber<l)e.moveViewPosition(e.modelState.hasSelection(),u.lineNumber,1,0,!1);else if(s.lineNumber>l){var c=u.lineNumber+1,d=1;c>e.viewModel.getLineCount()&&(c=e.viewModel.getLineCount(),d=e.viewModel.getLineMaxColumn(c)),e.moveViewPosition(e.modelState.hasSelection(),c,d,0,!1)}else{var h=e.modelState.selectionStart.getEndPosition();e.moveModelPosition(e.modelState.hasSelection(),h.lineNumber,h.column,0,!1)}return!0}var p=s.lineNumber+1,f=1;p>e.model.getLineCount()&&(p=e.model.getLineCount(),f=e.model.getLineMaxColumn(p));var g=new r.Range(s.lineNumber,1,p,f);return e.setSelectionStart(g),e.moveModelPosition(e.modelState.hasSelection(),g.endLineNumber,g.endColumn,0,!1),!0},e.word=function(e,t,n,i){return this._applyMoveOperationResult(e,i,this._fromModelCursorState(e,l.WordOperations.word(e.config,e.model,e.modelState,t,n)))},e.cancelSelection=function(e,t){return!!e.modelState.hasSelection()&&(e.collapseSelection(),!0)},e}();t.OneCursorOp=h}),define(d[356],h([0,1,10,126,20,38]),function(e,t,n,i,o,r){"use strict";var s=function(){function e(e,t,n){this.model=e,this.confiLine truncated
|
||||
!0},t.prototype._columnSelectOp=function(e,t){var n=this.cursors.getAll()[0],i=t(n,this._getColumnSelectToLineNumber(),this._getColumnSelectToVisualColumn()),o=i.viewSelections.map(function(e){return n.convertViewSelectionToModelSelection(e)});return e.shouldRevealTarget=i.reversed?1:2,e.shouldReveal=!0,e.setColumnSelectToLineNumber=i.toLineNumber,e.setColumnSelectToVisualColumn=i.toVisualColumn,this.cursors.setSelections(o,i.viewSelections),!0},t.prototype._columnSelectLeft=function(e){return this._columnSelectOp(e,function(e,t,n){return v.ColumnSelection.columnSelectLeft(e.config,e.viewModel,e.viewState,t,n)})},t.prototype._columnSelectRight=function(e){return this._columnSelectOp(e,function(e,t,n){return v.ColumnSelection.columnSelectRight(e.config,e.viewModel,e.viewState,t,n)})},t.prototype._columnSelectUp=function(e,t){return this._columnSelectOp(t,function(t,n,i){return v.ColumnSelection.columnSelectUp(t.config,t.viewModel,t.viewState,e,n,i)})},t.prototype._columnSelectDown=function(e,t){return this._columnSelectOp(t,function(t,n,i){return v.ColumnSelection.columnSelectDown(t.config,t.viewModel,t.viewState,e,n,i)})},t.prototype._createCursor=function(e){if(this.configuration.editor.readOnly||this.model.hasEditableRange())return!1;this.cursors.addSecondaryCursor({selectionStartLineNumber:1,selectionStartColumn:1,positionLineNumber:1,positionColumn:1});var t=this.cursors.getLastAddedCursor();return this._invokeForAll(e,function(n,i,o){return i===t&&(e.eventData.wholeLine?l.OneCursorOp.line(i,!1,e.eventData.position,e.eventData.viewPosition,o):l.OneCursorOp.moveTo(i,!1,e.eventData.position,e.eventData.viewPosition,e.eventSource,o))}),e.shouldReveal=!1,e.shouldRevealHorizontal=!1,!0},t.prototype._lastCursorMoveTo=function(e){if(this.configuration.editor.readOnly||this.model.hasEditableRange())return!1;var t=this.cursors.getLastAddedCursor();return this._invokeForAll(e,function(n,i,o){return i===t&&l.OneCursorOp.moveTo(i,!0,e.eventData.position,e.eventData.viewPosition,e.eventSource,o)}),e.shouldReveal=!1,e.shouldRevealHorizontal=!1,!0},t.prototype._addCursorUp=function(e){if(this.configuration.editor.readOnly)return!1;var t=this.cursors.getSelections().length;return this.cursors.duplicateCursors(),e.shouldRevealTarget=1,this._invokeForAll(e,function(e,n,i){return e>=t&&l.OneCursorOp.translateUp(n,i)})},t.prototype._addCursorDown=function(e){if(this.configuration.editor.readOnly)return!1;var t=this.cursors.getSelections().length;return this.cursors.duplicateCursors(),e.shouldRevealTarget=2,this._invokeForAll(e,function(e,n,i){return e>=t&&l.OneCursorOp.translateDown(n,i)})},t.prototype._moveLeft=function(e,t){return t.eventData=t.eventData||{},t.eventData.to=h.CursorMovePosition.Left,t.eventData.select=e,this._cursorMove(t)},t.prototype._moveWordLeft=function(e,t,n){return this._invokeForAll(n,function(n,i,o){return l.OneCursorOp.moveWordLeft(i,e,t,o)})},t.prototype._moveRight=function(e,t){return t.eventData=t.eventData||{},t.eventData.to=h.CursorMovePosition.Right,t.eventData.select=e,this._cursorMove(t)},t.prototype._moveWordRight=function(e,t,n){return this._invokeForAll(n,function(n,i,o){return l.OneCursorOp.moveWordRight(i,e,t,o)})},t.prototype._moveDown=function(e,t,n){return n.eventData=n.eventData||{},n.eventData.to=h.CursorMovePosition.Down,n.eventData.select=e,n.eventData.by=h.CursorMoveByUnit.WrappedLine,n.eventData.isPaged=t,this._cursorMove(n)},t.prototype._moveUp=function(e,t,n){return n.eventData=n.eventData||{},n.eventData.to=h.CursorMovePosition.Up,n.eventData.select=e,n.eventData.by=h.CursorMoveByUnit.WrappedLine,n.eventData.isPaged=t,this._cursorMove(n)},t.prototype._moveToBeginningOfLine=function(e,t){return this._invokeForAll(t,function(t,n,i){return l.OneCursorOp.moveToBeginningOfLine(n,e,i)})},t.prototype._moveToEndOfLine=function(e,t){return this._invokeForAll(t,function(t,n,i){return l.OneCursorOp.moveToEndOfLine(n,e,i)})},t.prototype._moveToBeginningOfBuffer=function(e,t){return this._invokeForAll(t,function(t,n,i){return l.OneCursorOp.moveToBeginningOfBuffer(n,e,i)})},t.prototype._moveToEndOfBuffer=function(e,t){return this._invokeForAll(t,function(t,n,i){return l.OneCursorOp.moveToEndOfBuffer(n,e,i)})},t.prototype._selectAll=function(e){return this.cursors.killSecondaryCursors(),this._invokeForAll(e,function(e,t,n){return l.OneCursorOp.selectAll(t,n)})},t.prototype._line=function(e,t){return this.cursors.killSecondaryCursors(),this._invokeForAll(t,function(n,i,o){return l.OneCursorOp.line(i,e,t.eventData.position,t.eventData.viewPosition,o)})},t.prototype._lastCursorLine=function(e,t){if(this.configuration.editor.readOnly||this.model.hasEditableRange())return!1;var n=this.cursors.getLastAddedCursor();return this._invokeForAll(t,function(i,o,r){return o===n&&l.OneCursorOp.line(o,e,t.eventData.position,t.eventData.viewPosition,r)}),t.shouldReveal=!1,t.shouldRevealHorizontal=!1,!0},t.prototype._expandLineSelection=function(e){return this._invokeForAll(e,function(e,t,n){return l.OLine truncated
|
||||
for(var u in this._multiLineDecorationsMap){var l=this._multiLineDecorationsMap[u];if(!(t&&l.ownerId&&l.ownerId!==t||n&&l.isForValidation)){var c=l.range;c.startLineNumber>r||c.startLineNumber===r&&c.startColumn>s||c.endLineNumber<i||c.endLineNumber===i&&c.endColumn<o||a.push(l)}}return a},t.prototype._getDecorationsInRange=function(e,t,n){for(var i=e.startLineNumber,o=e.startColumn,r=e.endLineNumber,s=e.endColumn,a=this._getMultiLineDecorations(e,t,n),u={},l=0,c=a.length;l<c;l++)u[a[l].id]=!0;for(var d=i;d<=r;d++)for(var h=this._getLineMarkers(d),l=0,c=h.length;l<c;l++){var p=h[l],f=p.internalDecorationId;if(0!==f){var g=this._internalDecorations[f];if(!u.hasOwnProperty(g.id)&&!(t&&g.ownerId&&g.ownerId!==t||n&&g.isForValidation)){var m=g.range;m.startLineNumber>r||m.startLineNumber===r&&m.startColumn>s||m.endLineNumber<i||m.endLineNumber===i&&m.endColumn<o||(a.push(g),u[g.id]=!0)}}}return a},t.prototype.getLinesDecorations=function(e,t,n,i){void 0===n&&(n=0),void 0===i&&(i=!1);var o=this.getLineCount(),s=Math.min(o,Math.max(1,e)),a=Math.min(o,Math.max(1,t)),u=this.getLineMaxColumn(a);return this._getDecorationsInRange(new r.Range(s,1,a,u),n,i)},t.prototype.getDecorationsInRange=function(e,t,n){var i=this.validateRange(e);return this._getDecorationsInRange(i,t,n)},t.prototype.getAllDecorations=function(e,t){void 0===e&&(e=0),void 0===t&&(t=!1);var n=[];for(var i in this._decorations){var o=this._decorations[i];e&&o.ownerId&&o.ownerId!==e||t&&o.isForValidation||n.push(o)}return n},t.prototype._acquireMarkersTracker=function(){return 0===this._currentMarkersTrackerCnt&&(this._currentMarkersTracker=new a.MarkersTracker),this._currentMarkersTrackerCnt++,this._currentMarkersTracker},t.prototype._releaseMarkersTracker=function(){if(this._currentMarkersTrackerCnt--,0===this._currentMarkersTrackerCnt){var e=this._currentMarkersTracker;this._currentMarkersTracker=null,this._handleTrackedMarkers(e)}},t.prototype._handleTrackedMarkers=function(e){var n=e.getDecorationIds();if(0!==n.length){n.sort();for(var i=[],o=0,r=0,s=0,a=n.length;s<a;s++){var u=n[s];if(u!==r){r=u;var l=this._internalDecorations[u];if(l){var c=l.startMarker.position,d=l.endMarker.position,h=t._createRangeFromMarkers(c,d);l.setRange(this._multiLineDecorationsMap,h),i[o++]=l.id}}}if(i.length>0){var p={addedDecorations:[],changedDecorations:i,removedDecorations:[]};this.emitModelDecorationsChangedEvent(p)}}},t._createRangeFromMarkers=function(e,t){return t.isBefore(e)?new r.Range(e.lineNumber,e.column,e.lineNumber,e.column):new r.Range(e.lineNumber,e.column,t.lineNumber,t.column)},t.prototype._acquireDecorationsTracker=function(){return 0===this._currentDecorationsTrackerCnt&&(this._currentDecorationsTracker=new f),this._currentDecorationsTrackerCnt++,this._currentDecorationsTracker},t.prototype._releaseDecorationsTracker=function(){if(this._currentDecorationsTrackerCnt--,0===this._currentDecorationsTrackerCnt){var e=this._currentDecorationsTracker;this._currentDecorationsTracker=null,this._handleTrackedDecorations(e)}},t.prototype._handleTrackedDecorations=function(e){if(0!==e.addedDecorationsLen||0!==e.changedDecorationsLen||0!==e.removedDecorationsLen){var t={addedDecorations:e.addedDecorations,changedDecorations:e.changedDecorations,removedDecorations:e.removedDecorations};this.emitModelDecorationsChangedEvent(t)}},t.prototype.emitModelDecorationsChangedEvent=function(e){this._isDisposing||this.emit(s.EventType.ModelDecorationsChanged,e)},t.prototype._normalizeDeltaDecorations=function(e){for(var t=[],n=0,i=e.length;n<i;n++){var o=e[n];t.push(new C(n,this.validateRange(o.range),h(o.options)))}return t},t.prototype._externalDecorationId=function(e){return this._instanceId+";"+e},t.prototype._addDecorationImpl=function(e,n,i,o){var r=this.validateRange(i),s=++this._lastDecorationId,a=this._externalDecorationId(s),l=this._addMarkers([{internalDecorationId:s,position:new u.Position(r.startLineNumber,r.startColumn),stickToPreviousCharacter:t._shouldStartMarkerSticksToPreviousCharacter(o.stickiness)},{internalDecorationId:s,position:new u.Position(r.endLineNumber,r.endColumn),stickToPreviousCharacter:t._shouldEndMarkerSticksToPreviousCharacter(o.stickiness)}]),c=new g(a,s,n,r,l[0],l[1],o);return this._decorations[a]=c,this._internalDecorations[s]=c,r.startLineNumber!==r.endLineNumber&&(this._multiLineDecorationsMap[a]=c),e.addNewDecoration(a),a},t.prototype._addDecorationsImpl=function(e,n,i){for(var o=[],r=[],s=[],a=0,l=i.length;a<l;a++){var c=i[a],d=c.range,h=c.options.stickiness,p=++this._lastDecorationId,f=this._externalDecorationId(p);o[a]=p,r[a]=f,s[2*a]={internalDecorationId:p,position:new u.Position(d.startLineNumber,d.startColumn),stickToPreviousCharacter:t._shouldStartMarkerSticksToPreviousCharacter(h)},s[2*a+1]={internalDecorationId:p,position:new u.Position(d.endLineNumber,d.endColumn),stickToPreviousCharacter:t._shouldEndMarkerSticksToPreviousCharacter(h)}}for(var m=this._addMarkers(s),a=0,l=i.length;a<l;a++){var c=i[a],d=c.range,p=o[a],f=Line truncated
|
||||
}},t.prototype._checkStopModelSync=function(){var e=(new Date).getTime(),t=[];for(var n in this._syncedModelsLastUsedTime){var i=e-this._syncedModelsLastUsedTime[n];i>p&&t.push(n)}for(var o=0;o<t.length;o++)this._stopModelSync(t[o])},t.prototype._beginModelSync=function(e){var t=this,n=this._modelService.getModel(e);if(n){var i=e.toString();this._proxy.acceptNewModel({url:n.uri.toString(),value:n.toRawText(),versionId:n.getVersionId()});var o=[];o.push(n.addBulkListener(function(e){for(var n=[],o=0,r=e.length;o<r;o++){var s=e[o];switch(s.getType()){case a.EventType.ModelContentChanged2:n.push(s.getData());break;case a.EventType.ModelDispose:return void t._stopModelSync(i)}}n.length>0&&t._proxy.acceptModelChanged(i.toString(),n)})),o.push({dispose:function(){t._proxy.acceptRemovedModel(i)}}),this._syncedModels[i]=o}},t.prototype._stopModelSync=function(e){var t=this._syncedModels[e];delete this._syncedModels[e],delete this._syncedModelsLastUsedTime[e],i.dispose(t)},t}(i.Disposable),b=function(){function e(e){this._instance=e,this._proxyObj=o.TPromise.as(this._instance)}return e.prototype.dispose=function(){this._instance.dispose(),this._instance=null,this._proxyObj=null},e.prototype.getProxyObject=function(){return new n.ShallowCancelThenPromise(this._proxyObj)},e}(),w=function(e){function t(t,n){var i=e.call(this)||this;return i._modelService=t,i._workerFactory=new s.DefaultWorkerFactory(n),i._worker=null,i._modelManager=null,i}return m(t,e),t.prototype._getOrCreateWorker=function(){if(!this._worker)try{this._worker=this._register(new r.SimpleWorkerClient(this._workerFactory,"vs/editor/common/services/editorSimpleWorker"))}catch(e){r.logOnceWebWorkerWarning(e),this._worker=new b(new c.EditorSimpleWorkerImpl)}return this._worker},t.prototype._getProxy=function(){var e=this;return new n.ShallowCancelThenPromise(this._getOrCreateWorker().getProxyObject().then(null,function(t){return r.logOnceWebWorkerWarning(t),e._worker=new b(new c.EditorSimpleWorkerImpl),e._getOrCreateWorker().getProxyObject()}))},t.prototype._getOrCreateModelManager=function(e){return this._modelManager||(this._modelManager=this._register(new _(e,this._modelService,!1))),this._modelManager},t.prototype._withSyncedResources=function(e){var t=this;return this._getProxy().then(function(n){return t._getOrCreateModelManager(n).esureSyncedResources(e),n})},t.prototype.computeDiff=function(e,t,n){return this._withSyncedResources([e,t]).then(function(i){return i.computeDiff(e.toString(),t.toString(),n)})},t.prototype.computeDirtyDiff=function(e,t,n){return this._withSyncedResources([e,t]).then(function(i){return i.computeDirtyDiff(e.toString(),t.toString(),n)})},t.prototype.computeMoreMinimalEdits=function(e,t,n){return this._withSyncedResources([e]).then(function(i){return i.computeMoreMinimalEdits(e.toString(),t,n)})},t.prototype.computeLinks=function(e){return this._withSyncedResources([e]).then(function(t){return t.computeLinks(e.toString())})},t.prototype.textualSuggest=function(e,t){var n=this;return this._withSyncedResources([e]).then(function(i){var o=n._modelService.getModel(e);if(!o)return null;var r=d.LanguageConfigurationRegistry.getWordDefinition(o.getLanguageIdentifier().id),s=r.source,a=(r.global?"g":"")+(r.ignoreCase?"i":"")+(r.multiline?"m":"");return i.textualSuggest(e.toString(),t,s,a)})},t.prototype.navigateValueSet=function(e,t,n){var i=this;return this._withSyncedResources([e]).then(function(o){var r=i._modelService.getModel(e);if(!r)return null;var s=d.LanguageConfigurationRegistry.getWordDefinition(r.getLanguageIdentifier().id),a=s.source,u=(s.global?"g":"")+(s.ignoreCase?"i":"")+(s.multiline?"m":"");return o.navigateValueSet(e.toString(),t,n,a,u)})},t}(i.Disposable);t.EditorWorkerClient=w}),define(d[366],h([0,1,17,129]),function(e,t,n,i){"use strict";function o(e,t){return new r(e,t)}t.createWebWorker=o;var r=function(e){function t(t,n){var i=e.call(this,t,n.label)||this;return i._foreignModuleId=n.moduleId,i._foreignModuleCreateData=n.createData||null,i._foreignProxy=null,i}return m(t,e),t.prototype._getForeignProxy=function(){var e=this;return this._foreignProxy||(this._foreignProxy=new n.ShallowCancelThenPromise(this._getProxy().then(function(t){return t.loadForeignModule(e._foreignModuleId,e._foreignModuleCreateData).then(function(n){e._foreignModuleId=null,e._foreignModuleCreateData=null;for(var i=function(e,n){return t.fmr(e,n)},o=function(e,t){return function(){var n=Array.prototype.slice.call(arguments,0);return t(e,n)}},r={},s=0;s<n.length;s++)r[n[s]]=o(n[s],i);return r})}))),this._foreignProxy},t.prototype.getProxy=function(){return this._getForeignProxy()},t.prototype.withSyncedResources=function(e){var t=this;return this._withSyncedResources(e).then(function(e){return t.getProxy()})},t}(i.EditorWorkerClient)}),define(d[367],h([0,1,2]),function(e,t,n){"use strict";var i=function(){function e(e){this._getVerticalOffsetForLine=e,this._zones=[],this._colorZonesInvalid=!1,this._lineHeight=0,this._domWidth=0,this._doLine truncated
|
||||
e=e.parentElement;for(var o=new Uint8Array(i),r=0;r<i;r++)o[r]=n[i-r-1];return o},e}();t.PartFingerprints=r}),define(d[135],h([0,1,15,3,2,21,105,24,32]),function(e,t,n,i,o,r,s,a,u){"use strict";var l=function(){function e(e,t,n,o,r,s){void 0===n&&(n=0),void 0===o&&(o=null),void 0===r&&(r=null),void 0===s&&(s=null),this.element=e,this.type=t,this.mouseColumn=n,this.position=o,!r&&o&&(r=new i.Range(o.lineNumber,o.column,o.lineNumber,o.column)),this.range=r,this.detail=s}return e._typeToString=function(e){return e===o.MouseTargetType.TEXTAREA?"TEXTAREA":e===o.MouseTargetType.GUTTER_GLYPH_MARGIN?"GUTTER_GLYPH_MARGIN":e===o.MouseTargetType.GUTTER_LINE_NUMBERS?"GUTTER_LINE_NUMBERS":e===o.MouseTargetType.GUTTER_LINE_DECORATIONS?"GUTTER_LINE_DECORATIONS":e===o.MouseTargetType.GUTTER_VIEW_ZONE?"GUTTER_VIEW_ZONE":e===o.MouseTargetType.CONTENT_TEXT?"CONTENT_TEXT":e===o.MouseTargetType.CONTENT_EMPTY?"CONTENT_EMPTY":e===o.MouseTargetType.CONTENT_VIEW_ZONE?"CONTENT_VIEW_ZONE":e===o.MouseTargetType.CONTENT_WIDGET?"CONTENT_WIDGET":e===o.MouseTargetType.OVERVIEW_RULER?"OVERVIEW_RULER":e===o.MouseTargetType.SCROLLBAR?"SCROLLBAR":e===o.MouseTargetType.OVERLAY_WIDGET?"OVERLAY_WIDGET":"UNKNOWN"},e.toString=function(e){return this._typeToString(e.type)+": "+e.position+" - "+e.range+" - "+e.detail},e.prototype.toString=function(){return e.toString(this)},e}();t.MouseTarget=l;var c=function(){function e(){}return e.isTextArea=function(e){return 2===e.length&&3===e[0]&&6===e[1]},e.isChildOfViewLines=function(e){return e.length>=4&&3===e[0]&&7===e[3]},e.isChildOfScrollableElement=function(e){return e.length>=2&&3===e[0]&&5===e[1]},e.isChildOfContentWidgets=function(e){return e.length>=4&&3===e[0]&&1===e[3]},e.isChildOfOverflowingContentWidgets=function(e){return e.length>=1&&2===e[0]},e.isChildOfOverlayWidgets=function(e){return e.length>=2&&3===e[0]&&4===e[1]},e}(),d=function(){function e(e,t,n){this.model=e.model,this.layoutInfo=e.configuration.editor.layoutInfo,this.viewDomNode=t.viewDomNode,this.lineHeight=e.configuration.editor.lineHeight,this.typicalHalfwidthCharacterWidth=e.configuration.editor.fontInfo.typicalHalfwidthCharacterWidth,this.lastViewCursorsRenderData=n,this._context=e,this._viewHelper=t}return e.prototype.getZoneAtCoord=function(e){var t=this._viewHelper.getWhitespaceAtVerticalOffset(e);if(t){var i=t.verticalOffset+t.height/2,o=this._context.model.getLineCount(),r=null,s=void 0,a=null;return t.afterLineNumber!==o&&(a=new n.Position(t.afterLineNumber+1,1)),t.afterLineNumber>0&&(r=new n.Position(t.afterLineNumber,this._context.model.getLineMaxColumn(t.afterLineNumber))),s=null===a?r:null===r?a:e<i?r:a,{viewZoneId:t.id,afterLineNumber:t.afterLineNumber,positionBefore:r,positionAfter:a,position:s}}return null},e.prototype.getFullLineRangeAtCoord=function(e){if(this._viewHelper.isAfterLines(e)){var t=this._context.model.getLineCount(),n=this._context.model.getLineMaxColumn(t);return{range:new i.Range(t,n,t,n),isAfterLines:!0}}var o=this._viewHelper.getLineNumberAtVerticalOffset(e),r=this._context.model.getLineMaxColumn(o);return{range:new i.Range(o,1,o,r),isAfterLines:!1}},e.prototype.getLineNumberAtVerticalOffset=function(e){return this._viewHelper.getLineNumberAtVerticalOffset(e)},e.prototype.isAfterLines=function(e){return this._viewHelper.isAfterLines(e)},e.prototype.getVerticalOffsetForLineNumber=function(e){return this._viewHelper.getVerticalOffsetForLineNumber(e)},e.prototype.findAttribute=function(t,n){return e._findAttribute(t,n,this._viewHelper.viewDomNode)},e._findAttribute=function(e,t,n){for(;e&&e!==document.body;){if(e.hasAttribute&&e.hasAttribute(t))return e.getAttribute(t);if(e===n)return null;e=e.parentNode}return null},e.prototype.getLineWidth=function(e){return this._viewHelper.getLineWidth(e)},e.prototype.visibleRangeForPosition2=function(e,t){return this._viewHelper.visibleRangeForPosition2(e,t)},e.prototype.getPositionFromDOMInfo=function(e,t){return this._viewHelper.getPositionFromDOMInfo(e,t)},e.prototype.getScrollTop=function(){return this._viewHelper.getScrollTop()},e.prototype.getScrollLeft=function(){return this._viewHelper.getScrollLeft()},e}(),h=function(){function e(e,t,n){this.editorPos=t,this.pos=n,this.mouseVerticalOffset=Math.max(0,e.getScrollTop()+n.y-t.y),this.mouseContentHorizontalOffset=e.getScrollLeft()+n.x-t.x-e.layoutInfo.contentLeft,this.isInMarginArea=n.x-t.x<e.layoutInfo.contentLeft,this.isInContentArea=!this.isInMarginArea,this.mouseColumn=Math.max(0,f._getMouseColumn(this.mouseContentHorizontalOffset,e.typicalHalfwidthCharacterWidth))}return e}(),p=function(e){function t(t,n,i,o){var r=e.call(this,t,n,i)||this;return r._ctx=t,o?(r.target=o,r.targetPath=u.PartFingerprints.collect(o,t.viewDomNode)):(r.target=null,r.targetPath=new Uint8Array(0)),r}return m(t,e),t.prototype.toString=function(){return"pos("+this.pos.x+","+this.pos.y+"), editorPos("+this.editorPos.x+","+this.editorPos.y+"), mouseVerticalOffset: "+this.mouseVerticalOffset+", mouseContentHorizontalOffset: "+thiLine truncated
|
||||
}),n._scrollDomNode=null,n._scrollDomNodeIsAbove=!1,n._renderer=new s(function(){return n._createLine()}),n}return m(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this),this._linesCollection=null},t.prototype.onConfigurationChanged=function(e){for(var t=this._linesCollection.getStartLineNumber(),n=this._linesCollection.getEndLineNumber(),i=t;i<=n;i++){var o=this._linesCollection.getLine(i);o.onConfigurationChanged(e)}return!0},t.prototype.onLayoutChanged=function(e){return!0},t.prototype.onScrollChanged=function(e){return e.scrollTopChanged},t.prototype.onZonesChanged=function(){return!0},t.prototype.onModelFlushed=function(){var e=this;return this._linesCollection=new o(function(){return e._createLine()}),this._scrollDomNode=null,!0},t.prototype.onModelLinesDeleted=function(e){var t=this._linesCollection.onModelLinesDeleted(e.fromLineNumber,e.toLineNumber);if(t)for(var n=0,i=t.length;n<i;n++){var o=t[n].getDomNode();o&&this.domNode.domNode.removeChild(o)}return!0},t.prototype.onModelLineChanged=function(e){return this._linesCollection.onModelLineChanged(e.lineNumber)},t.prototype.onModelLinesInserted=function(e){var t=this._linesCollection.onModelLinesInserted(e.fromLineNumber,e.toLineNumber);if(t)for(var n=0,i=t.length;n<i;n++){var o=t[n].getDomNode();o&&this.domNode.domNode.removeChild(o)}return!0},t.prototype.onModelTokensChanged=function(e){return this._linesCollection.onModelTokensChanged(e.ranges)},t.prototype._renderLines=function(e){var t=this._linesCollection._get(),n={domNode:this.domNode.domNode,rendLineNumberStart:t.rendLineNumberStart,lines:t.lines,linesLength:t.lines.length,getInlineDecorationsForLineInViewport:function(t){return e.getInlineDecorationsForLineInViewport(t)},viewportTop:e.viewportTop,viewportHeight:e.viewportHeight,scrollDomNode:this._scrollDomNode,scrollDomNodeIsAbove:this._scrollDomNodeIsAbove},i=this._renderer.renderWithManyUpdates(n,e.startLineNumber,e.endLineNumber,e.relativeVerticalOffset);this._linesCollection._set(i.rendLineNumberStart,i.lines),this._scrollDomNode=i.scrollDomNode,this._scrollDomNodeIsAbove=i.scrollDomNodeIsAbove},t.prototype._createDomNode=function(){var e=i.createFastDomNode(document.createElement("div"));return e.setClassName("view-layer"),e.setPosition("absolute"),e.domNode.setAttribute("role","presentation"),e.domNode.setAttribute("aria-hidden","true"),e},t}(n.ViewPart);t.ViewLayer=r;var s=function(){function e(e){this._createLine=e}return e.prototype.renderWithManyUpdates=function(e,t,n,i){return this._render(e,t,n,i)},e.prototype._render=function(e,t,n,i){var o={domNode:e.domNode,rendLineNumberStart:e.rendLineNumberStart,lines:e.lines.slice(0),linesLength:e.linesLength,getInlineDecorationsForLineInViewport:e.getInlineDecorationsForLineInViewport,viewportTop:e.viewportTop,viewportHeight:e.viewportHeight,scrollDomNode:e.scrollDomNode,scrollDomNodeIsAbove:e.scrollDomNodeIsAbove},r=!0;if(o.scrollDomNode){var s=this._getScrollDomNodeTime(o.scrollDomNode);(new Date).getTime()-s<1e3&&(r=!1)}if(r&&(o.rendLineNumberStart+o.linesLength-1<t||n<o.rendLineNumberStart)){o.rendLineNumberStart=t,o.linesLength=n-t+1,o.lines=[];for(var a=t;a<=n;a++)o.lines[a-t]=this._createLine();return this._finishRendering(o,!0,i),o.scrollDomNode=null,o}if(this._renderUntouchedLines(o,Math.max(t-o.rendLineNumberStart,0),Math.min(n-o.rendLineNumberStart,o.linesLength-1),i,t),o.rendLineNumberStart>t){var u=t,l=Math.min(n,o.rendLineNumberStart-1);u<=l&&(this._insertLinesBefore(o,u,l,i,t),o.linesLength+=l-u+1,o.scrollDomNode&&o.scrollDomNodeIsAbove&&(o.scrollDomNode.parentNode&&o.scrollDomNode.parentNode.removeChild(o.scrollDomNode),o.scrollDomNode=null))}else if(o.rendLineNumberStart<t){var c=Math.min(o.linesLength,t-o.rendLineNumberStart);c>0&&(this._removeLinesBefore(o,c),o.linesLength-=c)}if(o.rendLineNumberStart=t,o.rendLineNumberStart+o.linesLength-1<n){var u=o.rendLineNumberStart+o.linesLength,l=n;u<=l&&(this._insertLinesAfter(o,u,l,i,t),o.linesLength+=l-u+1,o.scrollDomNode&&!o.scrollDomNodeIsAbove&&(o.scrollDomNode.parentNode&&o.scrollDomNode.parentNode.removeChild(o.scrollDomNode),o.scrollDomNode=null))}else if(o.rendLineNumberStart+o.linesLength-1>n){var u=Math.max(0,n-o.rendLineNumberStart+1),l=o.linesLength-1,c=l-u+1;c>0&&(this._removeLinesAfter(o,c),o.linesLength-=c)}return this._finishRendering(o,!1,i),o},e.prototype._renderUntouchedLines=function(e,t,n,i,o){for(var r=t;r<=n;r++){var s=e.rendLineNumberStart+r,a=e.lines[r].getDomNode();a&&e.lines[r].layoutLine(s,i[s-o])}},e.prototype._insertLinesBefore=function(e,t,n,i,o){for(var r=[],s=0,a=t;a<=n;a++)r[s++]=this._createLine();e.lines=r.concat(e.lines)},e.prototype._getScrollDomNodeTime=function(e){var t=e.getAttribute("last-scroll-time");return t?parseInt(t,10):0},e.prototype._removeIfNotScrollDomNode=function(e,t,n){var i=this._getScrollDomNodeTime(t);if(!i)return void e.domNode.removeChild(t);if(e.scrollDomNode){var o=this._getScrollDomNodeTime(e.scrollDomNode);if(o>i)return void e.domNode.removeChild(Line truncated
|
||||
"use strict";var i=function(){function e(e,t,n){this.startLineNumber=+e,this.endLineNumber=+t,this.className=String(n)}return e}();t.DecorationToRender=i;var o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return m(t,e),t.prototype._render=function(e,t,n){for(var i=[],o=e;o<=t;o++){var r=o-e;i[r]=[]}if(0===n.length)return i;n.sort(function(e,t){return e.className===t.className?e.startLineNumber===t.startLineNumber?e.endLineNumber-t.endLineNumber:e.startLineNumber-t.startLineNumber:e.className<t.className?-1:1});for(var s=null,a=0,u=0,l=n.length;u<l;u++){var c=n[u],d=c.className,h=Math.max(c.startLineNumber,e)-e,p=Math.min(c.endLineNumber,t)-e;s===d?(h=Math.max(a+1,h),a=Math.max(a,p)):(s=d,a=p);for(var f=h;f<=a;f++)i[f].push(s)}return i},t}(n.DynamicViewOverlay);t.DedupOverlay=o;var r=function(e){function t(t){var n=e.call(this)||this;return n._context=t,n._lineHeight=n._context.configuration.editor.lineHeight,n._glyphMargin=n._context.configuration.editor.viewInfo.glyphMargin,n._glyphMarginLeft=0,n._glyphMarginWidth=0,n._renderResult=null,n._context.addEventHandler(n),n}return m(t,e),t.prototype.dispose=function(){this._context.removeEventHandler(this),this._context=null,this._renderResult=null},t.prototype.onModelFlushed=function(){return!0},t.prototype.onModelDecorationsChanged=function(e){return!0},t.prototype.onModelLinesDeleted=function(e){return!0},t.prototype.onModelLineChanged=function(e){return!0},t.prototype.onModelLinesInserted=function(e){return!0},t.prototype.onCursorPositionChanged=function(e){return!1},t.prototype.onCursorSelectionChanged=function(e){return!1},t.prototype.onCursorRevealRange=function(e){return!1},t.prototype.onConfigurationChanged=function(e){return e.lineHeight&&(this._lineHeight=this._context.configuration.editor.lineHeight),e.viewInfo.glyphMargin&&(this._glyphMargin=this._context.configuration.editor.viewInfo.glyphMargin),!0},t.prototype.onLayoutChanged=function(e){return this._glyphMarginLeft=e.glyphMarginLeft,this._glyphMarginWidth=e.glyphMarginWidth,!0},t.prototype.onScrollChanged=function(e){return e.scrollTopChanged},t.prototype.onZonesChanged=function(){return!0},t.prototype._getDecorations=function(e){for(var t=e.getDecorationsInViewport(),n=[],o=0,r=t.length;o<r;o++){var s=t[o],a=s.source.options.glyphMarginClassName;a&&n.push(new i(s.range.startLineNumber,s.range.endLineNumber,a))}return n},t.prototype.prepareRender=function(e){if(!this.shouldRender())throw new Error("I did not ask to render!");if(!this._glyphMargin)return void(this._renderResult=null);for(var t=e.visibleRange.startLineNumber,n=e.visibleRange.endLineNumber,i=this._render(t,n,this._getDecorations(e)),o=this._lineHeight.toString(),r=this._glyphMarginLeft.toString(),s=this._glyphMarginWidth.toString(),a='" style="left:'+r+"px;width:"+s+"px;height:"+o+'px;"></div>',u=[],l=t;l<=n;l++){var c=l-t,d=i[c];0===d.length?u[c]="":u[c]='<div class="cgmr '+d.join(" ")+a}this._renderResult=u},t.prototype.render=function(e,t){if(!this._renderResult)return"";var n=t-e;if(n<0||n>=this._renderResult.length)throw new Error("Unexpected render request");return this._renderResult[n]},t}(o);t.GlyphMarginOverlay=r}),define(d[387],h([0,1,50,333]),function(e,t,n){"use strict";var i=function(e){function t(t){var n=e.call(this)||this;return n._context=t,n._lineHeight=n._context.configuration.editor.lineHeight,n._spaceWidth=n._context.configuration.editor.fontInfo.spaceWidth,n._enabled=n._context.configuration.editor.viewInfo.renderIndentGuides,n._renderResult=null,n._context.addEventHandler(n),n}return m(t,e),t.prototype.dispose=function(){this._context.removeEventHandler(this),this._context=null,this._renderResult=null},t.prototype.onModelFlushed=function(){return!0},t.prototype.onModelLinesDeleted=function(e){return!0},t.prototype.onModelLineChanged=function(e){return!0},t.prototype.onModelLinesInserted=function(e){return!0},t.prototype.onConfigurationChanged=function(e){return e.lineHeight&&(this._lineHeight=this._context.configuration.editor.lineHeight),e.fontInfo&&(this._spaceWidth=this._context.configuration.editor.fontInfo.spaceWidth),e.viewInfo.renderIndentGuides&&(this._enabled=this._context.configuration.editor.viewInfo.renderIndentGuides),!0},t.prototype.onLayoutChanged=function(e){return!0},t.prototype.onScrollChanged=function(e){return e.scrollTopChanged},t.prototype.onZonesChanged=function(){return!0},t.prototype.prepareRender=function(e){if(!this.shouldRender())throw new Error("I did not ask to render!");if(!this._enabled)return void(this._renderResult=null);for(var t=e.visibleRange.startLineNumber,n=e.visibleRange.endLineNumber,i=this._context.model.getTabSize(),o=i*this._spaceWidth,r=this._lineHeight,s=[],a=t;a<=n;a++){for(var u=a-t,l=this._context.model.getLineIndentGuide(a),c="",d=0,h=0;h<l;h++)c+='<div class="cigr" style="left:'+d+"px;height:"+r+'px;"></div>',d+=o;s[u]=c}this._renderResult=s},t.prototype.render=function(e,t){if(!this._renderResult)return"";var n=t-e;if(n<0||n>=thiLine truncated
|
||||
d=n[u].height,h="block",l.isVisible||(l.delegate.domNode.setAttribute("monaco-visible-view-zone","true"),l.isVisible=!0),this._safeCallOnDomNodeTop(l.delegate,e.getScrolledTopFromAbsoluteTop(n[u].verticalOffset))):(l.isVisible&&(l.delegate.domNode.removeAttribute("monaco-visible-view-zone"),l.isVisible=!1),this._safeCallOnDomNodeTop(l.delegate,e.getScrolledTopFromAbsoluteTop(-1e6))),i.StyleMutator.setTop(l.delegate.domNode,c),i.StyleMutator.setHeight(l.delegate.domNode,d),i.StyleMutator.setDisplay(l.delegate.domNode,h),l.delegate.marginDomNode&&(i.StyleMutator.setTop(l.delegate.marginDomNode,c),i.StyleMutator.setHeight(l.delegate.marginDomNode,d),i.StyleMutator.setDisplay(l.delegate.marginDomNode,h))}o&&(i.StyleMutator.setWidth(this.domNode,Math.max(e.scrollWidth,this._contentWidth)),i.StyleMutator.setWidth(this.marginDomNode,this._contentLeft))},t}(r.ViewPart);t.ViewZones=a}),define(d[398],h([0,1,3,20,2,15]),function(e,t,n,i,o,r){"use strict";var s=function(){function e(e,t){this.configuration=e,this.converter=t,this.lastCursorPositionChangedEvent=null,this.lastCursorSelectionChangedEvent=null}return e.prototype.getSelections=function(){if(this.lastCursorSelectionChangedEvent){var e=[];e.push(this.converter.convertModelSelectionToViewSelection(this.lastCursorSelectionChangedEvent.selection));for(var t=0,n=this.lastCursorSelectionChangedEvent.secondarySelections.length;t<n;t++)e.push(this.converter.convertModelSelectionToViewSelection(this.lastCursorSelectionChangedEvent.secondarySelections[t]));return e}return[new i.Selection(1,1,1,1)]},e.prototype.onCursorPositionChanged=function(e,t){this.lastCursorPositionChangedEvent=e;var n=this.converter.validateViewPosition(e.viewPosition.lineNumber,e.viewPosition.column,e.position),i=this.configuration.editor.viewInfo.stopRenderingLineAfter;i!==-1&&n.column>i&&(n=new r.Position(n.lineNumber,i));for(var s=[],a=0,u=e.secondaryPositions.length;a<u;a++)s[a]=this.converter.validateViewPosition(e.secondaryViewPositions[a].lineNumber,e.secondaryViewPositions[a].column,e.secondaryPositions[a]),i!==-1&&s[a].column>i&&(s[a]=new r.Position(s[a].lineNumber,i));var l={position:n,secondaryPositions:s,isInEditableRange:e.isInEditableRange};t(o.ViewEventNames.CursorPositionChangedEvent,l)},e.prototype.onCursorSelectionChanged=function(e,t){this.lastCursorSelectionChangedEvent=e;for(var n=this.converter.validateViewSelection(e.viewSelection,e.selection),i=[],r=0,s=e.secondarySelections.length;r<s;r++)i[r]=this.converter.validateViewSelection(e.secondaryViewSelections[r],e.secondarySelections[r]);var a={selection:n,secondarySelections:i};t(o.ViewEventNames.CursorSelectionChangedEvent,a)},e.prototype.onCursorRevealRange=function(e,t){var i=null;if(e.viewRange){var r=this.converter.validateViewPosition(e.viewRange.startLineNumber,e.viewRange.startColumn,e.range.getStartPosition()),s=this.converter.validateViewPosition(e.viewRange.endLineNumber,e.viewRange.endColumn,e.range.getEndPosition());i=new n.Range(r.lineNumber,r.column,s.lineNumber,s.column)}else i=this.converter.convertModelRangeToViewRange(e.range);var a={range:i,verticalType:e.verticalType,revealHorizontal:e.revealHorizontal,revealCursor:e.revealCursor};t(o.ViewEventNames.RevealRangeEvent,a)},e.prototype.onCursorScrollRequest=function(e,t){var n={deltaLines:e.deltaLines,revealCursor:e.revealCursor};t(o.ViewEventNames.ScrollRequestEvent,n)},e.prototype.onLineMappingChanged=function(e){this.lastCursorPositionChangedEvent&&this.onCursorPositionChanged(this.lastCursorPositionChangedEvent,e),this.lastCursorSelectionChangedEvent&&this.onCursorSelectionChanged(this.lastCursorSelectionChangedEvent,e)},e}();t.ViewModelCursors=s}),define(d[399],h([0,1,3,2,148]),function(e,t,n,i,o){"use strict";var r=function(){function e(e,t,n,i){this.editorId=e,this.model=t,this.configuration=n,this.converter=i,this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}return e.prototype._clearCachedModelDecorationsResolver=function(){this._cachedModelDecorationsResolver=null,this._cachedModelDecorationsResolverViewRange=null},e.prototype.dispose=function(){this._decorationsCache=null,this._clearCachedModelDecorationsResolver()},e.prototype.reset=function(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()},e.prototype.onModelDecorationsChanged=function(e,t){for(var n=e.changedDecorations,o=0,r=n.length;o<r;o++){var s=n[o],a=this._decorationsCache[s];a&&(a.range=null)}for(var u=e.removedDecorations,o=0,r=u.length;o<r;o++){var l=u[o];delete this._decorationsCache[l]}this._clearCachedModelDecorationsResolver(),t(i.ViewEventNames.DecorationsChangedEvent,{})},e.prototype.onLineMappingChanged=function(e){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver(),e(i.ViewEventNames.DecorationsChangedEvent,{})},e.prototype._getOrCreateViewModelDecoration=function(e){var t=e.id,n=this._decorationsCache[t];return n||(n=new o.ViewModelDecoration(e),this._decorationsCaLine truncated
|
||||
isChecked:u._state.matchCase,onChange:function(e){u._state.change({matchCase:u.caseSensitive.checked},!1)}})),u._domNode.appendChild(u.caseSensitive.domNode),u.wholeWords=u._register(new s.WholeWordsCheckbox({appendTitle:u._keybindingLabelFor(r.FIND_IDS.ToggleWholeWordCommand),isChecked:u._state.wholeWord,onChange:function(e){u._state.change({wholeWord:u.wholeWords.checked},!1)}})),u._domNode.appendChild(u.wholeWords.domNode),u._editor.addOverlayWidget(u),u._register(u._state.addChangeListener(function(e){var t=!1;e.wholeWord&&(u.wholeWords.checked=u._state.wholeWord,t=!0),e.matchCase&&(u.caseSensitive.checked=u._state.matchCase,t=!0),!u._state.isRevealed&&t&&u._revealTemporarily()})),u._register(n.addDisposableNonBubblingMouseOutListener(u._domNode,function(e){return u._onMouseOut()})),u._register(n.addDisposableListener(u._domNode,"mouseover",function(e){return u._onMouseOver()})),u}return m(t,e),t.prototype._keybindingLabelFor=function(e){var t=this._keybindingService.lookupKeybindings(e);return 0===t.length?"":" ("+this._keybindingService.getLabelFor(t[0])+")"},t.prototype.dispose=function(){this._editor.removeOverlayWidget(this),e.prototype.dispose.call(this)},t.prototype.getId=function(){return t.ID},t.prototype.getDomNode=function(){return this._domNode},t.prototype.getPosition=function(){return{preference:o.OverlayWidgetPositionPreference.TOP_RIGHT_CORNER}},t.prototype.highlightFindOptions=function(){this._revealTemporarily()},t.prototype._revealTemporarily=function(){this._show(),this._hideSoon.schedule()},t.prototype._onMouseOut=function(){this._hideSoon.schedule()},t.prototype._onMouseOver=function(){this._hideSoon.cancel()},t.prototype._show=function(){this._isVisible||(this._isVisible=!0,this._domNode.style.display="block")},t.prototype._hide=function(){this._isVisible&&(this._isVisible=!1,this._domNode.style.display="none")},t}(i.Widget);u.ID="editor.contrib.findOptionsWidget",t.FindOptionsWidget=u}),define(d[404],h([0,1,2,3]),function(e,t,n,i){"use strict";function o(e){return(e?e.startLineNumber+"/"+e.endLineNumber:"null")+(e.isCollapsed?" (collapsed)":"")+" - "+e.indent}function r(e,t,n,i,o){var r=a(e,t,n);if(!r)return[];if(1===i)return[r];var s=p(r,e,t,i,o);return s.filter(function(e){return!e.isCollapsed})}function s(e,t,n,i){var o=a(e,t,n);if(!o)return[];if(1===i){var r=o.isCollapsed?o:u(e,t,o,n);return r?[r]:[]}var s=p(o,e,t,i,!1);return s.filter(function(e){return e.isCollapsed})}function a(e,t,n){for(var i=null,o=0,r=e.length;o<r;o++){var s=e[o],a=s.getDecorationRange(t);if(a&&(l(a,n)&&(i=s),c(a,n)))break}return i}function u(e,t,n,i){for(var o=e.indexOf(n),r=o+1;r<e.length;r++){var s=e[r],a=s.getDecorationRange(t);if(a&&c(a,i)){if(!h(n.foldingRange,a))return null;if(s.isCollapsed)return s}}return null}function l(e,t){return t>=e.startLineNumber&&t<=e.endLineNumber}function c(e,t){return t<e.startLineNumber}function d(e,t){return t>e.endLineNumber}function h(e,t){return e instanceof i.Range&&t instanceof i.Range?e.containsRange(t):e.startLineNumber<=t.startLineNumber&&e.endLineNumber>=t.endLineNumber}function p(e,t,n,i,o){var r=o?new m(e,t,n):new g(e,t,n);return r.getRegionsTill(i)}t.toString=o;var f=function(){function e(e,t,n){this.decorationIds=[],this.update(e,t,n)}return Object.defineProperty(e.prototype,"isCollapsed",{get:function(){return this._isCollapsed},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isExpanded",{get:function(){return!this._isCollapsed},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"indent",{get:function(){return this._indent},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"foldingRange",{get:function(){return this._lastRange},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"startLineNumber",{get:function(){return this._lastRange?this._lastRange.startLineNumber:void 0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"endLineNumber",{get:function(){return this._lastRange?this._lastRange.endLineNumber:void 0},enumerable:!0,configurable:!0}),e.prototype.setCollapsed=function(e,t){this._isCollapsed=e,this.decorationIds.length>0&&t.changeDecorationOptions(this.decorationIds[0],this.getVisualDecorationOptions())},e.prototype.getDecorationRange=function(e){return this.decorationIds.length>0?e.getDecorationRange(this.decorationIds[1]):null},e.prototype.getVisualDecorationOptions=function(){return this._isCollapsed?{stickiness:n.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges,inlineClassName:"inline-folded",linesDecorationsClassName:"folding collapsed"}:{stickiness:n.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges,linesDecorationsClassName:"folding"}},e.prototype.getRangeDecorationOptions=function(){return{stickiness:n.TrackedRangeStickiness.GrowsOnlyWhenTypingBefore}},e.prototype.update=function(e,t,n){this._lastRange=e,this._isCollapsed=!!e.isCollapsed,this._indent=e.indent;var i=[],o=t.getLineMaxColumn(e.startLineNumber),r={startLineNumber:e.startLineNumber,startCoLine truncated
|
||||
return i._editor=t,i._editorId=n.createKey("editorId",t.getId()),i._editorFocus=S.Focus.bindTo(n),i._editorTextFocus=S.TextFocus.bindTo(n),i._editorTabMovesFocus=S.TabMovesFocus.bindTo(n),i._editorReadonly=S.ReadOnly.bindTo(n),i._hasMultipleSelections=S.HasMultipleSelections.bindTo(n),i._hasNonEmptySelection=S.HasNonEmptySelection.bindTo(n),i._register(i._editor.onDidChangeConfiguration(function(){return i._updateFromConfig()})),i._register(i._editor.onDidChangeCursorSelection(function(){return i._updateFromSelection()})),i._register(i._editor.onDidFocusEditor(function(){return i._updateFromFocus()})),i._register(i._editor.onDidBlurEditor(function(){return i._updateFromFocus()})),i._register(i._editor.onDidFocusEditorText(function(){return i._updateFromFocus()})),i._register(i._editor.onDidBlurEditorText(function(){return i._updateFromFocus()})),i._updateFromConfig(),i._updateFromSelection(),i._updateFromFocus(),i}return m(t,e),t.prototype._updateFromConfig=function(){var e=this._editor.getConfiguration();this._editorTabMovesFocus.set(e.tabFocusMode),this._editorReadonly.set(e.readOnly)},t.prototype._updateFromSelection=function(){var e=this._editor.getSelections();e?(this._hasMultipleSelections.set(e.length>1),this._hasNonEmptySelection.set(e.some(function(e){return!e.isEmpty()}))):(this._hasMultipleSelections.reset(),this._hasNonEmptySelection.reset())},t.prototype._updateFromFocus=function(){this._editorFocus.set(this._editor.hasWidgetFocus()),this._editorTextFocus.set(this._editor.isFocused())},t}(r.Disposable)}),define(d[411],h([0,1,6,10,22,55,488,144,14,79]),function(e,t,n,i,o,r,s,a,u,l){"use strict";var c=function(){function t(e,t){void 0===e&&(e=new l.ServiceCollection),void 0===t&&(t=!1),this._services=e,this._strict=t,this._services.set(u.IInstantiationService,this)}return t.prototype.createChild=function(e){var n=this;return this._services.forEach(function(t,i){e.has(t)||(i instanceof a.SyncDescriptor&&(i=n._createAndCacheServiceInstance(t,i)),e.set(t,i))}),new t(e,this._strict)},t.prototype.invokeFunction=function(e){for(var t=this,n=[],o=1;o<arguments.length;o++)n[o-1]=arguments[o];var r;try{return r={get:function(e,n){var i=t._getOrCreateServiceInstance(e);if(!i&&n!==u.optional)throw new Error("[invokeFunction] unkown service '"+e+"'");return i}},e.apply(void 0,[r].concat(n))}finally{r.get=function(){throw i.illegalState("service accessor is only valid during the invocation of its target method")}}},t.prototype.createInstance=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return e instanceof a.AsyncDescriptor?this._createInstanceAsync(e,t):e instanceof a.SyncDescriptor?this._createInstance(e,t):this._createInstance(new a.SyncDescriptor(e),t)},t.prototype._createInstanceAsync=function(t,o){var r,s=this;return new n.TPromise(function(n,u,l){e([t.moduleName],function(e){if(r&&u(r),!e)return u(i.illegalArgument("module not found: "+t.moduleName));var l;if(l=t.ctorName?e[t.ctorName]:e,"function"!=typeof l)return u(i.illegalArgument("not a function: "+t.ctorName||t.moduleName));try{o.unshift.apply(o,t.staticArguments()),n(s._createInstance(new a.SyncDescriptor(l),o))}catch(e){return u(e)}},u)},function(){r=i.canceled()})},t.prototype._createInstance=function(e,t){for(var n=e.staticArguments().concat(t),i=u._util.getServiceDependencies(e.ctor).sort(function(e,t){return e.index-t.index}),r=[],s=0,a=i;s<a.length;s++){var l=a[s],c=this._getOrCreateServiceInstance(l.id);if(!c&&this._strict&&!l.optional)throw new Error("[createInstance] "+e.ctor.name+" depends on UNKNOWN service "+l.id+".");r.push(c)}var d=i.length>0?i[0].index:n.length;if(n.length!==d){console.warn("[createInstance] First service dependency of "+e.ctor.name+" at position "+(d+1)+" conflicts with "+n.length+" static arguments");var h=d-n.length;n=h>0?n.concat(new Array(h)):n.slice(0,d)}var p=[e.ctor];p.push.apply(p,n),p.push.apply(p,r);var f=o.create.apply(null,p);return e._validate(f),f},t.prototype._getOrCreateServiceInstance=function(e){var t=this._services.get(e);return t instanceof a.SyncDescriptor?this._createAndCacheServiceInstance(e,t):t},t.prototype._createAndCacheServiceInstance=function(e,t){function n(){var e=new Error("[createInstance] cyclic dependency between services");throw e.message=i.toString(),e}r.ok(this._services.get(e)instanceof a.SyncDescriptor);for(var i=new s.Graph(function(e){return e.id.toString()}),o=0,l=[{id:e,desc:t}];l.length;){var c=l.pop();i.lookupOrInsertNode(c),o++>100&&n();for(var d=u._util.getServiceDependencies(c.desc.ctor),h=0,p=d;h<p.length;h++){var f=p[h],g=this._services.get(f.id);if(g||console.warn("[createInstance] "+e+" depends on "+f.id+" which is NOT registered."),g instanceof a.SyncDescriptor){var m={id:f.id,desc:g};i.insertEdge(c,m),l.push(m)}}}for(;;){var v=i.roots();if(0===v.length){0!==i.length&&n();break}for(var _=0,y=v;_<y.length;_++){var C=y[_],b=this._createInstance(C.data.desc,[]);this._services.set(C.data.id,b),i.removeNode(C.data)}}return this._services.Line truncated
|
||||
o.Registry.add(t.Extensions.Snippets,a)}),define(d[426],h([0,1,283,64,12,30,6,81,3,2,127,18,56,42,113]),function(e,t,n,i,o,r,s,a,u,l,c,d,h,p,f){"use strict";function g(e){return e.toString()}var m=function(){function e(e,t){var n=this;this.model=e,this._markerDecorations=[],this._modelEventsListener=e.addBulkListener(function(e){return t(n,e)})}return e.prototype.dispose=function(){this._markerDecorations=this.model.deltaDecorations(this._markerDecorations,[]),this._modelEventsListener.dispose(),this._modelEventsListener=null,this.model=null},e.prototype.getModelId=function(){return g(this.model.uri)},e.prototype.acceptMarkerDecorations=function(e){this._markerDecorations=this.model.deltaDecorations(this._markerDecorations,e)},e}(),v=function(){function e(){}return e.setMarkers=function(e,t){var n=this,i=t.read({resource:e.model.uri,take:500}),o=i.map(function(t){return{range:n._createDecorationRange(e.model,t),options:n._createDecorationOption(t)}});e.acceptMarkerDecorations(o)},e._createDecorationRange=function(e,t){var n=e.validateRange(new u.Range(t.startLineNumber,t.startColumn,t.endLineNumber,t.endColumn)),i=new u.Range(n.startLineNumber,n.startColumn,n.endLineNumber,n.endColumn);if(i.isEmpty()){var o=e.getWordAtPosition(i.getStartPosition());if(o)i=new u.Range(i.startLineNumber,o.startColumn,i.endLineNumber,o.endColumn);else{var r=e.getLineLastNonWhitespaceColumn(n.startLineNumber)||e.getLineMaxColumn(n.startLineNumber);1===r||(i=i.endColumn>=r?new u.Range(i.startLineNumber,r-1,i.endLineNumber,r):new u.Range(i.startLineNumber,i.startColumn,i.endLineNumber,i.endColumn+1))}}else if(t.endColumn===Number.MAX_VALUE&&1===t.startColumn&&i.startLineNumber===i.endLineNumber){var s=e.getLineFirstNonWhitespaceColumn(t.startLineNumber);s<i.endColumn&&(i=new u.Range(i.startLineNumber,s,i.endLineNumber,i.endColumn),t.startColumn=s)}return i},e._createDecorationOption=function(e){var t,i,o;switch(e.severity){case r.default.Ignore:break;case r.default.Warning:case r.default.Info:t=l.ClassName.EditorWarningDecoration,i="rgba(18,136,18,0.7)",o="rgba(18,136,18,0.7)";break;case r.default.Error:default:t=l.ClassName.EditorErrorDecoration,i="rgba(255,18,18,0.7)",o="rgba(255,18,18,0.7)"}var s=null,a=e.message,u=e.source;return"string"==typeof a&&(a=a.trim(),u&&(a=/\n/g.test(a)?n.localize(0,null,u,a):n.localize(1,null,u,a)),s=[{language:"_",value:a}]),{stickiness:l.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges,className:t,hoverMessage:s,overviewRuler:{color:i,darkColor:o,position:l.OverviewRulerLane.Right}}},e}(),_=function(){function e(e,t){var n=this;this._modelCreationOptions={tabSize:p.DEFAULT_INDENTATION.tabSize,insertSpaces:p.DEFAULT_INDENTATION.insertSpaces,detectIndentation:p.DEFAULT_INDENTATION.detectIndentation,defaultEOL:d.isLinux||d.isMacintosh?l.DefaultEndOfLine.LF:l.DefaultEndOfLine.CRLF,trimAutoWhitespace:p.DEFAULT_TRIM_AUTO_WHITESPACE},this._markerService=e,this._configurationService=t,this._models={},this._onModelAdded=new o.Emitter,this._onModelRemoved=new o.Emitter,this._onModelModeChanged=new o.Emitter,this._markerService&&(this._markerServiceSubscription=this._markerService.onMarkerChanged(this._handleMarkerChange,this));var i=function(e){var t=p.DEFAULT_INDENTATION.tabSize;if(e.editor&&"undefined"!=typeof e.editor.tabSize){var i=parseInt(e.editor.tabSize,10);isNaN(i)||(t=i)}var o=p.DEFAULT_INDENTATION.insertSpaces;e.editor&&"undefined"!=typeof e.editor.insertSpaces&&(o="false"!==e.editor.insertSpaces&&Boolean(e.editor.insertSpaces));var r=n._modelCreationOptions.defaultEOL,s=e.files&&e.files.eol;"\r\n"===s?r=l.DefaultEndOfLine.CRLF:"\n"===s&&(r=l.DefaultEndOfLine.LF);var a=n._modelCreationOptions.trimAutoWhitespace;e.editor&&"undefined"!=typeof e.editor.trimAutoWhitespace&&(a="false"!==e.editor.trimAutoWhitespace&&Boolean(e.editor.trimAutoWhitespace));var u=p.DEFAULT_INDENTATION.detectIndentation;e.editor&&"undefined"!=typeof e.editor.detectIndentation&&(u="false"!==e.editor.detectIndentation&&Boolean(e.editor.detectIndentation)),n._setModelOptions({tabSize:t,insertSpaces:o,detectIndentation:u,defaultEOL:r,trimAutoWhitespace:a})};this._configurationServiceSubscription=this._configurationService.onDidUpdateConfiguration(function(e){i(e.config)}),i(this._configurationService.getConfiguration())}return e.prototype.getCreationOptions=function(){return this._modelCreationOptions},e.prototype._setModelOptions=function(e){if(this._modelCreationOptions.detectIndentation===e.detectIndentation&&this._modelCreationOptions.insertSpaces===e.insertSpaces&&this._modelCreationOptions.tabSize===e.tabSize&&this._modelCreationOptions.trimAutoWhitespace===e.trimAutoWhitespace)return void(this._modelCreationOptions=e);this._modelCreationOptions=e;for(var t=Object.keys(this._models),n=0,i=t.length;n<i;n++){var o=t[n],r=this._models[o];this._modelCreationOptions.detectIndentation?(r.model.detectIndentation(this._modelCreationOptions.insertSpaces,this._modelCreationOptions.tabSize),r.model.updateOptions({trimAutoWhitespLine truncated
|
||||
type:"integer",default:0,minimum:0,description:n.localize(32,null)},"editor.tabCompletion":{type:"boolean",default:l.DefaultConfig.editor.tabCompletion,description:n.localize(33,null)},"editor.selectionHighlight":{type:"boolean",default:l.DefaultConfig.editor.selectionHighlight,description:n.localize(34,null)},"editor.overviewRulerLanes":{type:"integer",default:3,description:n.localize(35,null)},"editor.cursorBlinking":{type:"string",enum:["blink","smooth","phase","expand","solid"],default:l.DefaultConfig.editor.cursorBlinking,description:n.localize(36,null)},"editor.mouseWheelZoom":{type:"boolean",default:l.DefaultConfig.editor.mouseWheelZoom,description:n.localize(37,null)},"editor.cursorStyle":{type:"string",enum:["block","line","underline"],default:l.DefaultConfig.editor.cursorStyle,description:n.localize(38,null)},"editor.fontLigatures":{type:"boolean",default:l.DefaultConfig.editor.fontLigatures,description:n.localize(39,null)},"editor.hideCursorInOverviewRuler":{type:"boolean",default:l.DefaultConfig.editor.hideCursorInOverviewRuler,description:n.localize(40,null)},"editor.renderWhitespace":{type:"string",enum:["none","boundary","all"],default:l.DefaultConfig.editor.renderWhitespace,description:n.localize(41,null)},"editor.renderControlCharacters":{type:"boolean",default:l.DefaultConfig.editor.renderControlCharacters,description:n.localize(42,null)},"editor.renderIndentGuides":{type:"boolean",default:l.DefaultConfig.editor.renderIndentGuides,description:n.localize(43,null)},"editor.renderLineHighlight":{type:"string",enum:["none","gutter","line","all"],default:l.DefaultConfig.editor.renderLineHighlight,description:n.localize(44,null)},"editor.codeLens":{type:"boolean",default:l.DefaultConfig.editor.codeLens,description:n.localize(45,null)},"editor.folding":{type:"boolean",default:l.DefaultConfig.editor.folding,description:n.localize(46,null)},"editor.glyphMargin":{type:"boolean",default:l.DefaultConfig.editor.glyphMargin,description:n.localize(47,null)},"editor.useTabStops":{type:"boolean",default:l.DefaultConfig.editor.useTabStops,description:n.localize(48,null)},"editor.trimAutoWhitespace":{type:"boolean",default:l.DEFAULT_TRIM_AUTO_WHITESPACE,description:n.localize(49,null)},"editor.stablePeek":{type:"boolean",default:!1,description:n.localize(50,null)},"diffEditor.renderSideBySide":{type:"boolean",default:!0,description:n.localize(51,null)},"diffEditor.ignoreTrimWhitespace":{type:"boolean",default:!0,description:n.localize(52,null)},"diffEditor.renderIndicators":{type:"boolean",default:!0,description:n.localize(53,null)}}};s.isLinux&&(I.properties["editor.selectionClipboard"]={type:"boolean",default:l.DefaultConfig.editor.selectionClipboard,description:n.localize(54,null)}),M.registerConfiguration(I)}),define(d[58],h([0,1,12,4,18,24,115,109,431,430]),function(e,t,n,i,o,r,s,a,u,l){"use strict";function c(e){return h.INSTANCE.readConfiguration(e)}var d=function(){function e(){this._keys=Object.create(null),this._values=Object.create(null)}return e.prototype._itemId=function(e){return r.getZoomLevel()+"-"+e.getId()},e.prototype.has=function(e){var t=this._itemId(e);return!!this._values[t]},e.prototype.get=function(e){var t=this._itemId(e);return this._values[t]},e.prototype.put=function(e,t){var n=this._itemId(e);this._keys[n]=e,this._values[n]=t},e.prototype.getKeys=function(){var e=this;return Object.keys(this._keys).map(function(t){return e._keys[t]})},e}();t.readFontInfo=c;var h=function(e){function t(){var t=e.call(this)||this;return t._changeMonitorTimeout=-1,t._onDidChange=t._register(new n.Emitter),t.onDidChange=t._onDidChange.event,t._cache=new d,t}return m(t,e),t.prototype.dispose=function(){this._changeMonitorTimeout!==-1&&(clearTimeout(this._changeMonitorTimeout),this._changeMonitorTimeout=-1),e.prototype.dispose.call(this)},t.prototype.readConfiguration=function(e){if(!this._cache.has(e)){var n=t._actualReadConfiguration(e);(n.typicalHalfwidthCharacterWidth<=2||n.typicalFullwidthCharacterWidth<=2||n.spaceWidth<=2||n.maxDigitWidth<=2)&&(n=new a.FontInfo({fontFamily:n.fontFamily,fontWeight:n.fontWeight,fontSize:n.fontSize,lineHeight:n.lineHeight,isMonospace:n.isMonospace,typicalHalfwidthCharacterWidth:Math.max(n.typicalHalfwidthCharacterWidth,5),typicalFullwidthCharacterWidth:Math.max(n.typicalFullwidthCharacterWidth,5),spaceWidth:Math.max(n.spaceWidth,5),maxDigitWidth:Math.max(n.maxDigitWidth,5)}),this._installChangeMonitor()),this._cache.put(e,n)}return this._cache.get(e)},t.prototype._installChangeMonitor=function(){var e=this;this._changeMonitorTimeout===-1&&(this._changeMonitorTimeout=setTimeout(function(){e._changeMonitorTimeout=-1,e._monitorForChanges()},500))},t.prototype._monitorForChanges=function(){for(var e=!1,n=this._cache.getKeys(),i=0;i<n.length;i++){var o=n[i],r=t._actualReadConfiguration(o);r.typicalHalfwidthCharacterWidth<=2||r.typicalFullwidthCharacterWidth<=2||r.maxDigitWidth<=2?e=!0:(this._cache.put(o,r),this._onDidChange.fire())}e&&this._installChangeMonitor()},t.crLine truncated
|
||||
var n=this._secondaryCursors[e].getDomNode();n.parentNode.removeChild(n)}return this._secondaryCursors=[],!0},t.prototype.onModelDecorationsChanged=function(e){return!0},t.prototype.onModelLinesDeleted=function(e){return!0},t.prototype.onModelLineChanged=function(e){return!0},t.prototype.onModelLinesInserted=function(e){return!0},t.prototype.onModelTokensChanged=function(e){var t=function(t){for(var n=0,i=e.ranges.length;n<i;n++)if(e.ranges[n].fromLineNumber<=t.lineNumber&&t.lineNumber<=e.ranges[n].toLineNumber)return!0;return!1};if(t(this._primaryCursor.getPosition()))return!0;for(var n=0;n<this._secondaryCursors.length;n++)if(t(this._secondaryCursors[n].getPosition()))return!0;return!1},t.prototype.onCursorPositionChanged=function(e){if(this._primaryCursor.onCursorPositionChanged(e.position,e.isInEditableRange),this._updateBlinking(),this._secondaryCursors.length<e.secondaryPositions.length)for(var t=e.secondaryPositions.length-this._secondaryCursors.length,n=0;n<t;n++){var i=new r.ViewCursor(this._context,!0);this._primaryCursor.getDomNode().parentNode.insertBefore(i.getDomNode(),this._primaryCursor.getDomNode().nextSibling),this._secondaryCursors.push(i)}else if(this._secondaryCursors.length>e.secondaryPositions.length)for(var o=this._secondaryCursors.length-e.secondaryPositions.length,n=0;n<o;n++)this._secondaryCursors[0].getDomNode().parentNode.removeChild(this._secondaryCursors[0].getDomNode()),this._secondaryCursors.splice(0,1);for(var n=0;n<e.secondaryPositions.length;n++)this._secondaryCursors[n].onCursorPositionChanged(e.secondaryPositions[n],e.isInEditableRange);return!0},t.prototype.onCursorSelectionChanged=function(e){var t=e.selection.isEmpty();return this._selectionIsEmpty!==t&&(this._selectionIsEmpty=t,this._updateDomClassName()),!1},t.prototype.onConfigurationChanged=function(e){e.readOnly&&(this._readOnly=this._context.configuration.editor.readOnly),e.viewInfo.cursorBlinking&&(this._cursorBlinking=this._context.configuration.editor.viewInfo.cursorBlinking),e.viewInfo.cursorStyle&&(this._cursorStyle=this._context.configuration.editor.viewInfo.cursorStyle),this._primaryCursor.onConfigurationChanged(e),this._updateBlinking(),(e.viewInfo.cursorStyle||e.viewInfo.cursorBlinking)&&this._updateDomClassName();for(var t=0,n=this._secondaryCursors.length;t<n;t++)this._secondaryCursors[t].onConfigurationChanged(e);return!0},t.prototype.onLayoutChanged=function(e){return!0},t.prototype.onScrollChanged=function(e){return!0},t.prototype.onZonesChanged=function(){return!0},t.prototype.onViewFocusChanged=function(e){return this._editorHasFocus=e,this._updateBlinking(),!1},t.prototype.getPosition=function(){return this._primaryCursor.getPosition()},t.prototype._getCursorBlinking=function(){return this._editorHasFocus?this._readOnly||!this._primaryCursor.getIsInEditableRange()?n.TextEditorCursorBlinkingStyle.Solid:this._cursorBlinking:n.TextEditorCursorBlinkingStyle.Hidden},t.prototype._updateBlinking=function(){var e=this;this._startCursorBlinkAnimation.cancel();var i=this._getCursorBlinking(),o=i===n.TextEditorCursorBlinkingStyle.Hidden,r=i===n.TextEditorCursorBlinkingStyle.Solid;o?this._hide():this._show(),this._blinkingEnabled=!1,this._updateDomClassName(),o||r||this._startCursorBlinkAnimation.setIfNotSet(function(){e._blinkingEnabled=!0,e._updateDomClassName()},t.BLINK_INTERVAL)},t.prototype._updateDomClassName=function(){this._domNode.setClassName(this._getClassName())},t.prototype._getClassName=function(){var e=i.ClassNames.VIEW_CURSORS_LAYER;switch(this._selectionIsEmpty||(e+=" has-selection"),this._cursorStyle){case n.TextEditorCursorStyle.Line:e+=" cursor-line-style";break;case n.TextEditorCursorStyle.Block:e+=" cursor-block-style";break;case n.TextEditorCursorStyle.Underline:e+=" cursor-underline-style";break;default:e+=" cursor-line-style"}if(this._blinkingEnabled)switch(this._getCursorBlinking()){case n.TextEditorCursorBlinkingStyle.Blink:e+=" cursor-blink";break;case n.TextEditorCursorBlinkingStyle.Smooth:e+=" cursor-smooth";break;case n.TextEditorCursorBlinkingStyle.Phase:e+=" cursor-phase";break;case n.TextEditorCursorBlinkingStyle.Expand:e+=" cursor-expand";break;case n.TextEditorCursorBlinkingStyle.Solid:e+=" cursor-solid";break;default:e+=" cursor-solid"}else e+=" cursor-solid";return e},t.prototype._show=function(){this._primaryCursor.show();for(var e=0,t=this._secondaryCursors.length;e<t;e++)this._secondaryCursors[e].show();this._isVisible=!0},t.prototype._hide=function(){this._primaryCursor.hide();for(var e=0,t=this._secondaryCursors.length;e<t;e++)this._secondaryCursors[e].hide();this._isVisible=!1},t.prototype.prepareRender=function(e){if(!this.shouldRender())throw new Error("I did not ask to render!");this._primaryCursor.prepareRender(e);for(var t=0,n=this._secondaryCursors.length;t<n;t++)this._secondaryCursors[t].prepareRender(e)},t.prototype.render=function(e){this._renderData=[],this._renderData.push(this._primaryCursor.render(e));for(var t=0,n=this._secondaryCursors.length;t<n;Line truncated
|
||||
secondary:[3089]}}})),h(new S({id:v.ExpandLineSelection,precondition:null,kbOpts:{weight:C,kbExpr:y.TextFocus,primary:2087}})),p(v.EditorScroll,_.EditorScroll),h(new S({id:v.ScrollLineUp,precondition:null,kbOpts:{weight:C,kbExpr:y.TextFocus,primary:2064,mac:{primary:267}}})),h(new S({id:v.ScrollLineDown,precondition:null,kbOpts:{weight:C,kbExpr:y.TextFocus,primary:2066,mac:{primary:268}}})),h(new S({id:v.ScrollPageUp,precondition:null,kbOpts:{weight:C,kbExpr:y.TextFocus,primary:2059,win:{primary:523},linux:{primary:523}}})),h(new S({id:v.ScrollPageDown,precondition:null,kbOpts:{weight:C,kbExpr:y.TextFocus,primary:2060,win:{primary:524},linux:{primary:524}}})),p(v.RevealLine,_.RevealLine),h(new S({id:v.CursorColumnSelectLeft,precondition:null,kbOpts:{weight:C,kbExpr:y.TextFocus,primary:3599,linux:{primary:0}}})),h(new S({id:v.CursorColumnSelectRight,precondition:null,kbOpts:{weight:C,kbExpr:y.TextFocus,primary:3601,linux:{primary:0}}})),h(new S({id:v.CursorColumnSelectUp,precondition:null,kbOpts:{weight:C,kbExpr:y.TextFocus,primary:3600,linux:{primary:0}}})),h(new S({id:v.CursorColumnSelectPageUp,precondition:null,kbOpts:{weight:C,kbExpr:y.TextFocus,primary:3595,linux:{primary:0}}})),h(new S({id:v.CursorColumnSelectDown,precondition:null,kbOpts:{weight:C,kbExpr:y.TextFocus,primary:3602,linux:{primary:0}}})),h(new S({id:v.CursorColumnSelectPageDown,precondition:null,kbOpts:{weight:C,kbExpr:y.TextFocus,primary:3596,linux:{primary:0}}})),h(new S({id:v.Tab,precondition:y.Writable,kbOpts:{weight:C,kbExpr:i.ContextKeyExpr.and(y.TextFocus,y.TabDoesNotMoveFocus),primary:2}})),h(new S({id:v.Outdent,precondition:y.Writable,kbOpts:{weight:C,kbExpr:i.ContextKeyExpr.and(y.TextFocus,y.TabDoesNotMoveFocus),primary:1026}})),h(new S({id:v.DeleteLeft,precondition:y.Writable,kbOpts:{weight:C,kbExpr:y.TextFocus,primary:1,secondary:[1025],mac:{primary:1,secondary:[1025,294,257]}}})),h(new S({id:v.DeleteRight,precondition:y.Writable,kbOpts:{weight:C,kbExpr:y.TextFocus,primary:20,mac:{primary:20,secondary:[290,276]}}})),h(new L(v.CursorWordStartLeft,!1,15)),h(new E(v.CursorWordEndLeft)),h(new E(v.CursorWordLeft)),h(new L(v.CursorWordStartLeftSelect,!0,15)),h(new E(v.CursorWordEndLeftSelect)),h(new E(v.CursorWordLeftSelect)),h(new L(v.CursorWordEndRight,!1,17)),h(new E(v.CursorWordStartRight)),h(new E(v.CursorWordRight)),h(new L(v.CursorWordEndRightSelect,!0,17)),h(new E(v.CursorWordStartRightSelect)),h(new E(v.CursorWordRightSelect)),h(new L(v.DeleteWordLeft,!1,1,y.Writable)),h(new E(v.DeleteWordStartLeft,y.Writable)),h(new E(v.DeleteWordEndLeft,y.Writable)),h(new L(v.DeleteWordRight,!1,20,y.Writable)),h(new E(v.DeleteWordStartRight,y.Writable)),h(new E(v.DeleteWordEndRight,y.Writable)),h(new S({id:v.CancelSelection,precondition:y.HasNonEmptySelection,kbOpts:{weight:C,kbExpr:y.TextFocus,primary:9,secondary:[1033]}})),h(new S({id:v.RemoveSecondaryCursors,precondition:y.HasMultipleSelections,kbOpts:{weight:C+1,kbExpr:y.TextFocus,primary:9,secondary:[1033]}})),h(new S({id:v.CursorTop,precondition:null,kbOpts:{weight:C,kbExpr:y.TextFocus,primary:2062,mac:{primary:2064}}})),h(new S({id:v.CursorTopSelect,precondition:null,kbOpts:{weight:C,kbExpr:y.TextFocus,primary:3086,mac:{primary:3088}}})),h(new S({id:v.CursorBottom,precondition:null,kbOpts:{weight:C,kbExpr:y.TextFocus,primary:2061,mac:{primary:2066}}})),h(new S({id:v.CursorBottomSelect,precondition:null,kbOpts:{weight:C,kbExpr:y.TextFocus,primary:3085,mac:{primary:3090}}})),h(new S({id:v.LineBreakInsert,precondition:y.Writable,kbOpts:{weight:C,kbExpr:y.TextFocus,primary:null,mac:{primary:301}}})),h(new S({id:v.CursorUndo,precondition:null,kbOpts:{weight:C,kbExpr:y.TextFocus,primary:2099}}));var N=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return m(t,e),t.prototype.runCommand=function(e,t){var n=this.getEditorHandler(),i=u(n,e,!1);if(i&&i.isFocused())return void i.trigger("keyboard",n,t);var o=document.activeElement;if(o&&["input","textarea"].indexOf(o.tagName.toLowerCase())>=0)return void document.execCommand(this.getInputHandler());var r=c(e);return r?(r.focus(),void r.trigger("keyboard",n,t)):void 0},t}(b),T=function(e){function t(){return e.call(this,{id:"editor.action.selectAll",precondition:null,kbOpts:{weight:C,kbExpr:null,primary:2079}})||this}return m(t,e),t.prototype.getEditorHandler=function(){return r.Handler.SelectAll},t.prototype.getInputHandler=function(){return"selectAll"},t}(N);h(new T);var x=function(e){function t(){return e.call(this,{id:v.Undo,precondition:y.Writable,kbOpts:{weight:C,kbExpr:y.TextFocus,primary:2104}})||this}return m(t,e),t.prototype.getEditorHandler=function(){return v.Undo},t.prototype.getInputHandler=function(){return"undo"},t}(N);h(new x);var M=function(e){function t(){return e.call(this,{id:v.Redo,precondition:y.Writable,kbOpts:{weight:C,kbExpr:y.TextFocus,primary:2103,secondary:[3128],mac:{primary:3128}}})||this}return m(t,e),t.prototype.getEditorHandler=function(){return v.Redo},t.prototype.getInputHandler=functLine truncated
|
||||
var l=e.getSelection();if(l.startLineNumber!==l.endLineNumber&&!t.allowMultiline)return null;if(l.isEmpty()){var c=e.getModel().getWordAtPosition(l.getStartPosition());if(!c)return null;i=c.word,o=new u.Selection(l.startLineNumber,c.startColumn,l.startLineNumber,c.endColumn)}else i=e.getModel().getValueInRange(l);t.changeFindSearchString&&n.setSearchString(i)}return t.highlightFindOptions&&n.highlightFindOptions(),{searchText:i,matchCase:a,wholeWord:s,currentMatch:o}}var _,b=c.EditorContextKeys;!function(e){e[e.NoFocusChange=0]="NoFocusChange",e[e.FocusFindInput=1]="FocusFindInput",e[e.FocusReplaceInput=2]="FocusReplaceInput"}(_=t.FindStartFocusAction||(t.FindStartFocusAction={})),t.CONTEXT_FIND_WIDGET_VISIBLE=new s.RawContextKey("findWidgetVisible",!1),t.CONTEXT_FIND_WIDGET_NOT_VISIBLE=t.CONTEXT_FIND_WIDGET_VISIBLE.toNegated(),t.CONTEXT_FIND_INPUT_FOCUSSED=new s.RawContextKey("findInputFocussed",!1);var w=function(e){function n(n,o){var r=e.call(this)||this;return r._editor=n,r._findWidgetVisible=t.CONTEXT_FIND_WIDGET_VISIBLE.bindTo(o),r._updateHistoryDelayer=new g.Delayer(500),r._currentHistoryNavigator=new i.HistoryNavigator,r._state=r._register(new p.FindReplaceState),r._register(r._state.addChangeListener(function(e){return r._onStateChanged(e)})),r._model=null,r._register(r._editor.onDidChangeModel(function(){var e=r._editor.getModel()&&r._state.isRevealed;r.disposeModel(),r._state.change({searchScope:null},!1),e&&r._start({forceRevealReplace:!1,seedSearchStringFromSelection:!1,shouldFocus:0,shouldAnimate:!1})})),r}return m(n,e),n.get=function(e){return e.getContribution(n.ID)},n.prototype.dispose=function(){this.disposeModel(),e.prototype.dispose.call(this)},n.prototype.disposeModel=function(){this._model&&(this._model.dispose(),this._model=null)},n.prototype.getId=function(){return n.ID},n.prototype._onStateChanged=function(e){e.updateHistory&&e.searchString&&this._delayedUpdateHistory(),e.isRevealed&&(this._state.isRevealed?this._findWidgetVisible.set(!0):(this._findWidgetVisible.reset(),this.disposeModel()))},n.prototype._delayedUpdateHistory=function(){this._updateHistoryDelayer.trigger(this._updateHistory.bind(this))},n.prototype._updateHistory=function(){this._state.searchString&&this._currentHistoryNavigator.add(this._state.searchString)},n.prototype.getState=function(){return this._state},n.prototype.getHistory=function(){return this._currentHistoryNavigator},n.prototype.closeFindWidget=function(){this._state.change({isRevealed:!1,searchScope:null},!1),this._editor.focus()},n.prototype.toggleCaseSensitive=function(){this._state.change({matchCase:!this._state.matchCase},!1)},n.prototype.toggleWholeWords=function(){this._state.change({wholeWord:!this._state.wholeWord},!1)},n.prototype.toggleRegex=function(){this._state.change({isRegex:!this._state.isRegex},!1)},n.prototype.setSearchString=function(e){this._state.change({searchString:e},!1)},n.prototype.highlightFindOptions=function(){},n.prototype.getSelectionSearchString=function(){var e=this._editor.getSelection();if(e.startLineNumber===e.endLineNumber){if(!e.isEmpty())return this._editor.getModel().getValueInRange(e);var t=this._editor.getModel().getWordAtPosition(e.getStartPosition());if(t)return t.word}return null},n.prototype._start=function(e){if(this.disposeModel(),this._editor.getModel()){var t={isRevealed:!0};if(e.seedSearchStringFromSelection){var n=this.getSelectionSearchString();n&&(this._state.isRegex?t.searchString=l.escapeRegExpCharacters(n):t.searchString=n)}e.forceRevealReplace&&(t.isReplaceRevealed=!0),this._state.change(t,!1),this._model||(this._model=new h.FindModelBoundToEditorModel(this._editor,this._state))}},n.prototype.start=function(e){this._start(e)},n.prototype.moveToNextMatch=function(){return!!this._model&&(this._model.moveToNextMatch(),!0)},n.prototype.moveToPrevMatch=function(){return!!this._model&&(this._model.moveToPrevMatch(),!0)},n.prototype.replace=function(){return!!this._model&&(this._model.replace(),!0)},n.prototype.replaceAll=function(){return!!this._model&&(this._model.replaceAll(),!0)},n.prototype.selectAllMatches=function(){return!!this._model&&(this._model.selectAllMatches(),this._editor.focus(),!0)},n.prototype.showPreviousFindTerm=function(){var e=this._currentHistoryNavigator.previous();return e&&this._state.change({searchString:e},!1,!1),!0},n.prototype.showNextFindTerm=function(){var e=this._currentHistoryNavigator.next();return e&&this._state.change({searchString:e},!1,!1),!0},n}(r.Disposable);w.ID="editor.contrib.findController",w=y([C(1,s.IContextKeyService)],w),t.CommonFindController=w;var S=function(e){function t(){return e.call(this,{id:h.FIND_IDS.StartFindAction,label:n.localize(0,null),alias:"Find",precondition:null,kbOpts:{kbExpr:null,primary:2084,mac:{primary:2084,secondary:[2083]}}})||this}return m(t,e),t.prototype.run=function(e,t){var n=w.get(t);n&&n.start({forceRevealReplace:!1,seedSearchStringFromSelection:!0,shouldFocus:1,shouldAnimate:!0})},t}(d.EditorAction);S=y([d.editorActiLine truncated
|
||||
t.prototype._start=function(t){e.prototype._start.call(this,t),2===t.shouldFocus?this._widget.focusReplaceInput():1===t.shouldFocus&&this._widget.focusFindInput()},t.prototype.highlightFindOptions=function(){this._state.isRevealed?this._widget.highlightFindOptions():this._findOptionsWidget.highlightFindOptions()},t}(u.CommonFindController);l=y([r.editorContribution,C(1,n.IContextViewService),C(2,o.IContextKeyService),C(3,i.IKeybindingService)],l),t.FindController=l}),define(d[460],h([0,1,292,22,17,31,4,2,3,13,29,404,226,225,372]),function(e,t,n,i,o,r,s,a,u,l,c,d,h,p){"use strict";function f(e){if(!i.isUndefined(e)){if(!i.isObject(e))return!1;var t=e;if(!i.isUndefined(t.levels)&&!i.isNumber(t.levels))return!1;if(!i.isUndefined(t.direction)&&!i.isString(t.direction))return!1}return!0}var g=a.EditorContextKeys,v=x=function(){function e(e){var t=this;this.editor=e,this._isEnabled=this.editor.getConfiguration().contribInfo.folding,this.globalToDispose=[],this.localToDispose=[],this.decorations=[],this.computeToken=0,this.globalToDispose.push(this.editor.onDidChangeModel(function(){return t.onModelChanged()})),this.globalToDispose.push(this.editor.onDidChangeConfiguration(function(e){var n=t._isEnabled;t._isEnabled=t.editor.getConfiguration().contribInfo.folding,n!==t._isEnabled&&t.onModelChanged()})),this.onModelChanged()}return e.get=function(e){return e.getContribution(p.ID)},e.prototype.getId=function(){return p.ID},e.prototype.dispose=function(){this.cleanState(),this.globalToDispose=s.dispose(this.globalToDispose)},e.prototype.saveViewState=function(){var e=this.editor.getModel();if(!e)return{};var t=[];return this.decorations.forEach(function(n){if(n.isCollapsed){var i=n.getDecorationRange(e);i&&t.push({startLineNumber:i.startLineNumber,endLineNumber:i.endLineNumber,indent:n.indent,isCollapsed:!0})}}),{collapsedRegions:t,lineCount:e.getLineCount()}},e.prototype.restoreViewState=function(e){var t=this.editor.getModel();t&&this._isEnabled&&e&&Array.isArray(e.collapsedRegions)&&0!==e.collapsedRegions.length&&e.lineCount===t.getLineCount()&&(this.cleanState(),this.applyRegions(e.collapsedRegions),this.onModelChanged())},e.prototype.cleanState=function(){this.localToDispose=s.dispose(this.localToDispose)},e.prototype.applyRegions=function(e){var t=this,n=this.editor.getModel();if(n){var i=!1;e=h.limitByIndent(e,x.MAX_FOLDING_REGIONS).sort(function(e,t){return e.startLineNumber-t.startLineNumber}),this.editor.changeDecorations(function(o){for(var r=[],s=0,a=0;a<t.decorations.length&&s<e.length;){var u=t.decorations[a],l=u.getDecorationRange(n);if(l){for(;s<e.length&&l.startLineNumber>e[s].startLineNumber;){var c=e[s];i=i||c.isCollapsed,r.push(new d.CollapsibleRegion(c,n,o)),s++}if(s<e.length){var h=e[s];l.startLineNumber<h.startLineNumber?(i=i||u.isCollapsed,u.dispose(o),a++):l.startLineNumber===h.startLineNumber&&(!u.isCollapsed||u.startLineNumber===h.startLineNumber&&u.endLineNumber===h.endLineNumber||(i=!0),h.isCollapsed=u.isCollapsed,u.update(h,n,o),r.push(u),a++,s++)}}else i=i||u.isCollapsed,u.dispose(o),a++}for(;a<t.decorations.length;){var u=t.decorations[a];i=i||u.isCollapsed,u.dispose(o),a++}for(;s<e.length;){var c=e[s];i=i||c.isCollapsed,r.push(new d.CollapsibleRegion(c,n,o)),s++}t.decorations=r}),i&&this.updateHiddenAreas()}},e.prototype.onModelChanged=function(){var e=this;this.cleanState();var t=this.editor.getModel();this._isEnabled&&t&&(this.computeAndApplyCollapsibleRegions(),this.contentChangedScheduler=new o.RunOnceScheduler(function(){return e.computeAndApplyCollapsibleRegions()},200),this.cursorChangedScheduler=new o.RunOnceScheduler(function(){return e.revealCursor()},200),this.localToDispose.push(this.contentChangedScheduler),this.localToDispose.push(this.cursorChangedScheduler),this.localToDispose.push(this.editor.onDidChangeModelContent(function(t){return e.contentChangedScheduler.schedule()})),this.localToDispose.push(this.editor.onDidChangeCursorPosition(function(t){return e.cursorChangedScheduler.schedule()})),this.localToDispose.push(this.editor.onMouseDown(function(t){return e.onEditorMouseDown(t)})),this.localToDispose.push(this.editor.onMouseUp(function(t){return e.onEditorMouseUp(t)})),this.localToDispose.push({dispose:function(){return e.disposeDecorations()}}))},e.prototype.computeAndApplyCollapsibleRegions=function(){var e=this.editor.getModel();this.applyRegions(e?h.computeRanges(e):[])},e.prototype.disposeDecorations=function(){var e=this;this.editor.changeDecorations(function(t){e.decorations.forEach(function(e){return e.dispose(t)})}),this.decorations=[],this.editor.setHiddenAreas([])},e.prototype.revealCursor=function(){var e=this,t=this.editor.getModel();if(t){var n=!1,i=this.editor.getSelections();this.editor.changeDecorations(function(o){return e.decorations.forEach(function(e){if(e.isCollapsed){var r=e.getDecorationRange(t);if(r)for(var s=0,a=i;s<a.length;s++){var u=a[s];if(r.startLineNumber<u.selectionStartLineNumber&&u.selectionStartLineNumber<=r.endLineNumber){e.seLine truncated
|
||||
{contents:a,range:u}});return r.filter(function(e){return!!e})},e.prototype.onResult=function(e,t){t?this._result=e.concat(this._result):this._result=this._result.concat(e)},e.prototype.getResult=function(){return this._result.slice(0)},e.prototype.getResultWithLoadingMessage=function(){return this._result.slice(0).concat([this._getLoadingMessage()])},e.prototype._getLoadingMessage=function(){return{range:this._range,contents:[v.textToMarkedString(n.localize(0,null))]}},e}(),y=function(e){function t(n,i,o){var r=e.call(this,t.ID,n)||this;return r._computer=new _(r._editor),r._highlightDecorations=[],r._isChangingDecorations=!1,r._openerService=i||u.NullOpenerService,r._modeService=o,r._hoverOperation=new f.HoverOperation(r._computer,function(e){return r._withResult(e,!0)},null,function(e){return r._withResult(e,!1)}),r}return m(t,e),t.prototype.dispose=function(){this._hoverOperation.cancel(),e.prototype.dispose.call(this)},t.prototype.onModelDecorationsChanged=function(){this._isChangingDecorations||this.isVisible&&(this._hoverOperation.cancel(),this._computer.clearResult(),this._hoverOperation.start())},t.prototype.startShowingAt=function(e,t){if(!this._lastRange||!this._lastRange.equalsRange(e)){if(this._hoverOperation.cancel(),this.isVisible)if(this._showAtPosition.lineNumber!==e.startLineNumber)this.hide();else{for(var n=[],i=0,o=this._messages.length;i<o;i++){var r=this._messages[i],s=r.range;s.startColumn<=e.startColumn&&s.endColumn>=e.endColumn&&n.push(r)}n.length>0?this._renderMessages(e,n):this.hide()}this._lastRange=e,this._computer.setRange(e),this._shouldFocus=t,this._hoverOperation.start()}},t.prototype.hide=function(){this._lastRange=null,this._hoverOperation.cancel(),e.prototype.hide.call(this),this._isChangingDecorations=!0,this._highlightDecorations=this._editor.deltaDecorations(this._highlightDecorations,[]),this._isChangingDecorations=!1},t.prototype._withResult=function(e,t){this._messages=e,this._lastRange&&this._messages.length>0?this._renderMessages(this._lastRange,this._messages):t&&this.hide()},t.prototype._renderMessages=function(e,t){var n=this,s=Number.MAX_VALUE,u=t[0].range,c=document.createDocumentFragment();t.forEach(function(e){e.range&&(s=Math.min(s,e.range.startColumn),u=l.Range.plusRange(u,e.range),e.contents.filter(function(e){return!!e}).forEach(function(e){var t=a.renderMarkedString(e,{actionCallback:function(e){n._openerService.open(i.default.parse(e)).then(void 0,o.onUnexpectedError)},codeBlockRenderer:function(e,t){var i=e?n._modeService.getModeIdForLanguageName(e):n._editor.getModel().getLanguageIdentifier().language;return n._modeService.getOrCreateMode(i).then(function(e){return'<div class="code">'+h.tokenizeToString(t,i)+"</div>"})}});c.appendChild(r.$("div.hover-row",null,t))}))}),this.showAt({lineNumber:e.startLineNumber,column:s},this._shouldFocus),this.updateContents(c),this._isChangingDecorations=!0,this._highlightDecorations=this._editor.deltaDecorations(this._highlightDecorations,[{range:u,options:{className:"hoverHighlight"}}]),this._isChangingDecorations=!1},t}(g.ContentHoverWidget);y.ID="editor.contrib.modesContentHoverWidget",t.ModesContentHoverWidget=y}),define(d[467],h([0,1,296,31,18,66,80,3,2,13,29,466,421,4,375]),function(e,t,n,i,o,r,s,a,u,l,c,d,h,p){"use strict";var f=u.EditorContextKeys,g=_=function(){function e(e,t,n){var i=this;this._editor=e,this._toUnhook=[],e.getConfiguration().contribInfo.hover&&(this._toUnhook.push(this._editor.onMouseDown(function(e){return i._onEditorMouseDown(e)})),this._toUnhook.push(this._editor.onMouseMove(function(e){return i._onEditorMouseMove(e)})),this._toUnhook.push(this._editor.onMouseLeave(function(e){return i._hideWidgets()})),this._toUnhook.push(this._editor.onKeyDown(function(e){return i._onKeyDown(e)})),this._toUnhook.push(this._editor.onDidChangeModel(function(){return i._hideWidgets()})),this._toUnhook.push(this._editor.onDidChangeModelDecorations(function(){return i._onModelDecorationsChanged()})),this._toUnhook.push(this._editor.onDidScrollChange(function(e){(e.scrollTopChanged||e.scrollLeftChanged)&&i._hideWidgets()})),this._contentWidget=new d.ModesContentHoverWidget(e,t,n),this._glyphWidget=new h.ModesGlyphHoverWidget(e,t,n))}return e.get=function(e){return e.getContribution(_.ID)},e.prototype._onModelDecorationsChanged=function(){this._contentWidget.onModelDecorationsChanged(),this._glyphWidget.onModelDecorationsChanged()},e.prototype._onEditorMouseDown=function(e){var t=e.target.type;t===u.MouseTargetType.CONTENT_WIDGET&&e.target.detail===d.ModesContentHoverWidget.ID||t===u.MouseTargetType.OVERLAY_WIDGET&&e.target.detail===h.ModesGlyphHoverWidget.ID||this._hideWidgets()},e.prototype._onEditorMouseMove=function(e){var t=e.target.type,n=o.isMacintosh?"metaKey":"ctrlKey";(t!==u.MouseTargetType.CONTENT_WIDGET||e.target.detail!==d.ModesContentHoverWidget.ID||e.event[n])&&(t!==u.MouseTargetType.OVERLAY_WIDGET||e.target.detail!==h.ModesGlyphHoverWidget.ID||e.event[n])&&(this._editor.getConfiguration().Line truncated
|
||||
this.computePromise&&(this.computePromise.cancel(),this.computePromise=null)},e.prototype.dispose=function(){this.listenersToRemove=f.dispose(this.listenersToRemove),this.stop()},e}();_.ID="editor.linkDetector",_.RECOMPUTE_TIME=1e3,_.TRIGGER_KEY_VALUE=o.isMacintosh?57:5,_.TRIGGER_MODIFIER=o.isMacintosh?"metaKey":"ctrlKey",_.HOVER_MESSAGE_GENERAL=o.isMacintosh?n.localize(0,null):n.localize(1,null),_.CLASS_NAME="detected-link",_.CLASS_NAME_ACTIVE="detected-link-active",_=w=y([g.editorContribution,C(1,u.IOpenerService),C(2,a.IMessageService),C(3,h.IEditorWorkerService)],_);var b=function(e){function t(){return e.call(this,{id:"editor.action.openLink",label:n.localize(4,null),alias:"Open Link",precondition:null})||this}return m(t,e),t.prototype.run=function(e,t){var n=_.get(t);if(n){var i=n.getLinkOccurence(t.getPosition());i&&n.openLinkOccurence(i,!1)}},t}(c.EditorAction);b=y([c.editorAction],b);var w}),define(d[472],h([0,1,302,2,13,20]),function(e,t,n,i,o,r){"use strict";var s=function(e){function t(){return e.call(this,{id:"editor.action.insertCursorAbove",label:n.localize(0,null),alias:"Add Cursor Above",precondition:null,handlerId:i.Handler.AddCursorUp,kbOpts:{kbExpr:i.EditorContextKeys.TextFocus,primary:2576,linux:{primary:1552,secondary:[3088]}}})||this}return m(t,e),t}(o.HandlerEditorAction);s=y([o.editorAction],s);var a=function(e){function t(){return e.call(this,{id:"editor.action.insertCursorBelow",label:n.localize(1,null),alias:"Add Cursor Below",precondition:null,handlerId:i.Handler.AddCursorDown,kbOpts:{kbExpr:i.EditorContextKeys.TextFocus,primary:2578,linux:{primary:1554,secondary:[3090]}}})||this}return m(t,e),t}(o.HandlerEditorAction);a=y([o.editorAction],a);var u=function(e){function t(){return e.call(this,{id:"editor.action.insertCursorAtEndOfEachLineSelected",label:n.localize(2,null),alias:"Create Multiple Cursors from Selected Lines",precondition:null,kbOpts:{kbExpr:i.EditorContextKeys.TextFocus,primary:1575}})||this}return m(t,e),t.prototype.getCursorsForSelection=function(e,t){if(e.isEmpty())return[];for(var n=t.getModel(),i=[],o=e.startLineNumber;o<e.endLineNumber;o++){var s=n.getLineMaxColumn(o);i.push(new r.Selection(o,s,o,s))}return e.endColumn>1&&i.push(new r.Selection(e.endLineNumber,e.endColumn,e.endLineNumber,e.endColumn)),i},t.prototype.run=function(e,t){var n=this,i=t.getSelections(),o=i.map(function(e){return n.getCursorsForSelection(e,t)}).reduce(function(e,t){return e.concat(t)});o.length>0&&t.setSelections(o)},t}(o.EditorAction);u=y([o.editorAction],u)}),define(d[164],h([0,1,10,13,16,17,19]),function(e,t,n,i,o,r,s){"use strict";function a(e,t){var i,s=o.SignatureHelpProviderRegistry.ordered(e);return r.sequence(s.map(function(o){return function(){if(!i)return r.asWinJsPromise(function(n){return o.provideSignatureHelp(e,t,n)}).then(function(e){i=e},n.onUnexpectedExternalError)}})).then(function(){return i})}t.Context={Visible:new s.RawContextKey("parameterHintsVisible",!1),MultipleSignatures:new s.RawContextKey("parameterHintsMultipleSignatures",!1)},t.provideSignatureHelp=a,i.CommonEditorRegistry.registerDefaultLanguageCommand("_executeSignatureHelpProvider",a)}),define(d[474],h([0,1,304,4,6,11,99,16,21,17,10,12,124,19,164,60,69,407]),function(e,t,n,i,o,r,s,a,u,l,c,d,h,p,f,g,v){"use strict";var _=r.$,b=function(e){function t(n){var i=e.call(this)||this;return i._onHint=i._register(new d.Emitter),i.onHint=i._onHint.event,i._onCancel=i._register(new d.Emitter),i.onCancel=i._onCancel.event,i.editor=n,i.enabled=!1,i.triggerCharactersListeners=[],i.throttledDelayer=new l.RunOnceScheduler(function(){return i.doTrigger()},t.DELAY),i.active=!1,i._register(i.editor.onDidChangeConfiguration(function(){return i.onEditorConfigurationChange()})),i._register(i.editor.onDidChangeModel(function(e){return i.onModelChanged()})),i._register(i.editor.onDidChangeModelLanguage(function(e){return i.onModelChanged()})),i._register(i.editor.onDidChangeCursorSelection(function(e){return i.onCursorChange(e)})),i._register(a.SignatureHelpProviderRegistry.onDidChange(i.onModelChanged,i)),i.onEditorConfigurationChange(),i.onModelChanged(),i}return m(t,e),t.prototype.cancel=function(e){void 0===e&&(e=!1),this.active=!1,this.throttledDelayer.cancel(),e||this._onCancel.fire(void 0)},t.prototype.trigger=function(e){if(void 0===e&&(e=t.DELAY),this.enabled&&a.SignatureHelpProviderRegistry.has(this.editor.getModel()))return this.cancel(!0),this.throttledDelayer.schedule(e)},t.prototype.doTrigger=function(){var e=this;f.provideSignatureHelp(this.editor.getModel(),this.editor.getPosition()).then(null,c.onUnexpectedError).then(function(t){if(!t||!t.signatures||0===t.signatures.length)return e.cancel(),e._onCancel.fire(void 0),!1;e.active=!0;var n={hints:t};return e._onHint.fire(n),!0})},t.prototype.isTriggered=function(){return this.active||this.throttledDelayer.isScheduled()},t.prototype.onModelChanged=function(){var e=this;this.active&&this.cancel(),this.triggerCharactersListeners=i.dispose(this.triggerCharacteLine truncated
|
||||
this._progressService=i,this._fileService=r,this._renameInputField=new g.default(e),this._renameInputVisible=b.bindTo(o)}return e.get=function(e){return e.getContribution(L.ID)},e.prototype.dispose=function(){this._renameInputField.dispose()},e.prototype.getId=function(){return L.ID},e.prototype.run=function(){var e=this,t=this.editor.getSelection(),s=this.editor.getModel().getWordAtPosition(t.getStartPosition());if(s){var a,u=t.startLineNumber,l=0,c=s.word.length;return a={startLineNumber:u,startColumn:s.startColumn,endLineNumber:u,endColumn:s.endColumn},t.isEmpty()||t.startLineNumber!==t.endLineNumber||(l=Math.max(0,t.startColumn-s.startColumn),c=Math.min(s.endColumn,t.endColumn)-s.startColumn),this._renameInputVisible.set(!0),this._renameInputField.getInput(a,s.word,l,c).then(function(t){e._renameInputVisible.reset(),e.editor.focus();var i=e._prepareRename(t).then(function(t){return t.finish().then(function(t){t&&e.editor.setSelection(t)})},function(t){return"string"!=typeof t?(e._messageService.show(o.default.Error,n.localize(0,null)),r.TPromise.wrapError(t)):void e._messageService.show(o.default.Info,t)});return e._progressService.showWhile(i,250),i},function(t){if(e._renameInputVisible.reset(),e.editor.focus(),!i.isPromiseCanceledError(t))return r.TPromise.wrapError(t)})}},e.prototype.acceptRenameInput=function(){this._renameInputField.acceptInput()},e.prototype.cancelRenameInput=function(){this._renameInputField.cancelInput()},e.prototype._prepareRename=function(e){var t=p.createBulkEdit(this._textModelResolverService,this.editor,this._fileService);return f.rename(this.editor.getModel(),this.editor.getPosition(),e).then(function(e){return e.rejectReason?r.TPromise.wrapError(e.rejectReason):(t.add(e.edits),t)})},e}();w.ID="editor.contrib.renameController",w=L=y([d.editorContribution,C(1,u.IMessageService),C(2,v.ITextModelResolverService),C(3,l.IProgressService),C(4,a.IContextKeyService),C(5,_.optional(s.IFileService))],w);var S=function(e){function t(){return e.call(this,{id:"editor.action.rename",label:n.localize(1,null),alias:"Rename Symbol",precondition:a.ContextKeyExpr.and(h.EditorContextKeys.Writable,h.ModeContextKeys.hasRenameProvider),kbOpts:{kbExpr:h.EditorContextKeys.TextFocus,primary:60},menuOpts:{group:"1_modification",order:1.1}})||this}return m(t,e),t.prototype.run=function(e,t){var n=w.get(t);if(n)return n.run()},t}(c.EditorAction);S=y([c.editorAction],S),t.RenameAction=S;var E=c.EditorCommand.bindToContribution(w.get);c.CommonEditorRegistry.registerEditorCommand(new E({id:"acceptRenameInput",precondition:b,handler:function(e){return e.acceptRenameInput()},kbOpts:{weight:c.CommonEditorRegistry.commandWeight(99),kbExpr:h.EditorContextKeys.Focus,primary:3}})),c.CommonEditorRegistry.registerEditorCommand(new E({id:"cancelRenameInput",precondition:b,handler:function(e){return e.cancelRenameInput()},kbOpts:{weight:c.CommonEditorRegistry.commandWeight(99),kbExpr:h.EditorContextKeys.Focus,primary:9,secondary:[1033]}}));var L}),define(d[487],h([0,1,316,26,6,14,3,2,13,334]),function(e,t,n,i,o,r,s,a,u,l){"use strict";var c=function(){function e(e){this.editor=e,this.next=null,this.previous=null,this.selection=e.getSelection()}return e}(),d=null,h=!1,p=_=function(){function e(e,t){this.editor=e,this._tokenSelectionSupport=t.createInstance(l.TokenSelectionSupport)}return e.get=function(e){return e.getContribution(_.ID)},e.prototype.dispose=function(){},e.prototype.getId=function(){return _.ID},e.prototype.run=function(e){var t=this,n=this.editor.getSelection(),r=this.editor.getModel();d&&d.editor!==this.editor&&(d=null);var a=o.TPromise.as(null);return d||(a=this._tokenSelectionSupport.getRangesToPosition(r.uri,n.getStartPosition()).then(function(e){if(!i.isFalsyOrEmpty(e)){var n;e.filter(function(e){var n=t.editor.getSelection(),i=new s.Range(e.range.startLineNumber,e.range.startColumn,e.range.endLineNumber,e.range.endColumn);return i.containsPosition(n.getStartPosition())&&i.containsPosition(n.getEndPosition())}).forEach(function(e){var i=e.range,o=new c(t.editor);o.selection=new s.Range(i.startLineNumber,i.startColumn,i.endLineNumber,i.endColumn),n&&(o.next=n,n.previous=o),n=o});var o=new c(t.editor);o.next=n,n&&(n.previous=o),d=o;var r=t.editor.onDidChangeCursorPosition(function(e){h||(d=null,r.dispose())})}})),a.then(function(){if(d&&(d=e?d.next:d.previous)){h=!0;try{t.editor.setSelection(d.selection)}finally{h=!1}}})},e}();p.ID="editor.contrib.smartSelectController",p=_=y([u.commonEditorContribution,C(1,r.IInstantiationService)],p);var f=function(e){function t(t,n){var i=e.call(this,n)||this;return i._forward=t,i}return m(t,e),t.prototype.run=function(e,t){var n=p.get(t);if(n)return n.run(this._forward)},t}(u.EditorAction),g=function(e){function t(){return e.call(this,!0,{id:"editor.action.smartSelect.grow",label:n.localize(0,null),alias:"Expand Select",precondition:null,kbOpts:{kbExpr:a.EditorContextKeys.TextFocus,primary:1553,mac:{primary:3345}}})||this}return m(t,e),t}(f);g=y([u.editorActiLine truncated
|
||||
var n=this.state!==t;switch(this.state=t,u.toggleClass(this.element,"frozen",4===t),t){case 0:u.hide(this.messageElement,this.details.element),u.show(this.listElement),this.hide(),n&&this.list.splice(0,this.list.length);break;case 1:this.messageElement.textContent=e.LOADING_MESSAGE,u.hide(this.listElement,this.details.element),u.show(this.messageElement),this.show();break;case 2:this.messageElement.textContent=e.NO_SUGGESTIONS_MESSAGE,u.hide(this.listElement,this.details.element),u.show(this.messageElement),this.show();break;case 3:u.hide(this.messageElement,this.details.element),u.show(this.listElement),this.show();break;case 4:u.hide(this.messageElement,this.details.element),u.show(this.listElement),this.show();break;case 5:u.hide(this.messageElement,this.listElement),u.show(this.details.element),this.show(),this._ariaAlert(this.details.getAriaLabel())}n&&this.editor.layoutContentWidget(this)}},e.prototype.showTriggered=function(e){var t=this;0===this.state&&(this.isAuto=!!e,this.isAuto||(this.loadingTimeout=setTimeout(function(){t.loadingTimeout=null,t.setState(1)},50)))},e.prototype.showSuggestions=function(e,t,n){if(this.loadingTimeout&&(clearTimeout(this.loadingTimeout),this.loadingTimeout=null),this.completionModel=e,t&&2!==this.state)return void this.setState(4);var i=this.completionModel.items.length,o=0===i;if(this.suggestWidgetMultipleSuggestions.set(i>1),o)n?this.setState(0):this.setState(2),this.completionModel=null;else{var r=this.completionModel.stats;r.wasAutomaticallyTriggered=!!n,this.telemetryService.publicLog("suggestWidget",r),this.list.splice(0,this.list.length,this.completionModel.items),this.list.setFocus([this.completionModel.topScoreIdx]),this.list.reveal(this.completionModel.topScoreIdx,0),this.setState(3)}},e.prototype.selectNextPage=function(){switch(this.state){case 0:return!1;case 5:return this.details.pageDown(),!0;case 1:return!this.isAuto;default:return this.list.focusNextPage(),!0}},e.prototype.selectNext=function(){switch(this.state){case 0:return!1;case 5:return this.list.focusNext(1,!0),this.renderDetails(),!0;case 1:return!this.isAuto;default:return this.list.focusNext(1,!0),!0}},e.prototype.selectPreviousPage=function(){switch(this.state){case 0:return!1;case 5:return this.details.pageUp(),!0;case 1:return!this.isAuto;default:return this.list.focusPreviousPage(),!0}},e.prototype.selectPrevious=function(){switch(this.state){case 0:return!1;case 5:return this.list.focusPrevious(1,!0),this.renderDetails(),!0;case 1:return!this.isAuto;default:return this.list.focusPrevious(1,!0),!1}},e.prototype.getFocusedItem=function(){if(0!==this.state&&2!==this.state&&1!==this.state)return this.list.getFocusedElements()[0]},e.prototype.toggleDetails=function(){if(5===this.state)return this.setState(3),void this.editor.focus();if(3===this.state){var e=this.list.getFocusedElements()[0];e&&w(e)&&(this.setState(5),this.editor.focus(),this.telemetryService.publicLog("suggestWidget:toggleDetails"))}},e.prototype.show=function(){var e=this;this.updateWidgetHeight(),this.suggestWidgetVisible.set(!0),this.renderDetails(),this.showTimeout=r.TPromise.timeout(100).then(function(){u.addClass(e.element,"visible"),e.onDidShowEmitter.fire(e)})},e.prototype.hide=function(){this.suggestWidgetVisible.reset(),this.suggestWidgetMultipleSuggestions.reset(),u.removeClass(this.element,"visible")},e.prototype.hideWidget=function(){clearTimeout(this.loadingTimeout),this.setState(0),this.onDidHideEmitter.fire(this)},e.prototype.hideDetailsOrHideWidget=function(){5===this.state?this.toggleDetails():this.hideWidget()},e.prototype.getPosition=function(){return 0===this.state?null:{position:this.editor.getPosition(),preference:[g.ContentWidgetPositionPreference.BELOW,g.ContentWidgetPositionPreference.ABOVE]}},e.prototype.getDomNode=function(){return this.element},e.prototype.getId=function(){return e.ID},e.prototype.updateWidgetHeight=function(){var e=0;if(2===this.state||1===this.state)e=this.unfocusedHeight;else if(5===this.state)e=12*this.unfocusedHeight;else{var t=this.list.getFocusedElements()[0],n=t?this.getHeight(t):this.unfocusedHeight;e=n;var i=(this.list.contentHeight-n)/this.unfocusedHeight;e+=Math.min(i,11)*this.unfocusedHeight}return this.element.style.lineHeight=this.unfocusedHeight+"px",this.element.style.height=e+"px",this.list.layout(e),this.editor.layoutContentWidget(this),e},e.prototype.renderDetails=function(){5!==this.state?this.details.render(null):this.details.render(this.list.getFocusedElements()[0])},Object.defineProperty(e.prototype,"focusHeight",{get:function(){return 2*this.unfocusedHeight},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"unfocusedHeight",{get:function(){var e=this.editor.getConfiguration();return e.contribInfo.suggestLineHeight||e.fontInfo.lineHeight},enumerable:!0,configurable:!0}),e.prototype.getHeight=function(e){var t=this.list.getFocusedElements()[0];return w(e)&&e===t?this.focusHeight:this.unfocusedHeight},e.prototype.getTemplateId=function(e){rLine truncated
|
||||
this.textArea.setAttribute("role","textbox"),this.textArea.setAttribute("aria-multiline","true"),this.textArea.setAttribute("aria-haspopup","false"),this.textArea.setAttribute("aria-autocomplete","both"),s.StyleMutator.setTop(this.textArea,0),s.StyleMutator.setLeft(this.textArea,0),this.listenersToDispose.push(r.addDisposableListener(this.textArea,"focus",function(){return e._setHasFocus(!0)})),this.listenersToDispose.push(r.addDisposableListener(this.textArea,"blur",function(){return e._setHasFocus(!1)})),this.textAreaCover=document.createElement("div"),this._context.configuration.editor.viewInfo.glyphMargin?this.textAreaCover.className="monaco-editor-background "+h.ClassNames.GLYPH_MARGIN+" "+h.ClassNames.TEXTAREA_COVER:this._context.configuration.editor.viewInfo.renderLineNumbers?this.textAreaCover.className="monaco-editor-background "+h.ClassNames.LINE_NUMBERS+" "+h.ClassNames.TEXTAREA_COVER:this.textAreaCover.className="monaco-editor-background "+h.ClassNames.TEXTAREA_COVER,this.textAreaCover.style.position="absolute",s.StyleMutator.setWidth(this.textAreaCover,1),s.StyleMutator.setHeight(this.textAreaCover,1),s.StyleMutator.setTop(this.textAreaCover,0),s.StyleMutator.setLeft(this.textAreaCover,0)},t.prototype.createViewParts=function(){var e=this;this.viewParts=[],this.viewLines=new L.ViewLines(this._context,this.layoutProvider),this.viewZones=new A.ViewZones(this._context,this.layoutProvider),this.viewParts.push(this.viewZones);var t=new I.DecorationsOverviewRuler(this._context,this.layoutProvider.getScrollHeight(),function(t){return e.layoutProvider.getVerticalOffsetForLineNumber(t)});this.viewParts.push(t);var n=new k.ScrollDecorationViewPart(this._context);this.viewParts.push(n);var i=new g.ContentViewOverlays(this._context,this.layoutProvider);this.viewParts.push(i),i.addDynamicOverlay(new y.CurrentLineHighlightOverlay(this._context,this.layoutProvider)),i.addDynamicOverlay(new O.SelectionsOverlay(this._context)),i.addDynamicOverlay(new b.DecorationsOverlay(this._context)),i.addDynamicOverlay(new E.IndentGuidesOverlay(this._context));var o=new g.MarginViewOverlays(this._context,this.layoutProvider);this.viewParts.push(o),o.addDynamicOverlay(new C.CurrentLineMarginHighlightOverlay(this._context,this.layoutProvider)),o.addDynamicOverlay(new w.GlyphMarginOverlay(this._context)),o.addDynamicOverlay(new x.MarginViewLineDecorationsOverlay(this._context)),o.addDynamicOverlay(new T.LinesDecorationsOverlay(this._context)),o.addDynamicOverlay(new S.LineNumbersOverlay(this._context));var r=new N.Margin(this._context,this.layoutProvider);r.domNode.appendChild(this.viewZones.marginDomNode),r.domNode.appendChild(o.getDomNode()),this.viewParts.push(r),this.contentWidgets=new _.ViewContentWidgets(this._context,this.domNode),this.viewParts.push(this.contentWidgets),this.viewCursors=new P.ViewCursors(this._context),this.viewParts.push(this.viewCursors),this.overlayWidgets=new M.ViewOverlayWidgets(this._context),this.viewParts.push(this.overlayWidgets);var s=new R.Rulers(this._context,this.layoutProvider);if(this.viewParts.push(s),this.linesContentContainer=this.layoutProvider.getScrollbarContainerDomNode(),this.linesContentContainer.style.position="absolute",t){var a=this.layoutProvider.getOverviewRulerInsertData();a.parent.insertBefore(t.getDomNode(),a.insertBefore)}this.linesContent.appendChild(i.getDomNode()),this.linesContent.appendChild(s.domNode),this.linesContent.appendChild(this.viewZones.domNode),this.linesContent.appendChild(this.viewLines.getDomNode()),this.linesContent.appendChild(this.contentWidgets.domNode),this.linesContent.appendChild(this.viewCursors.getDomNode()),this.overflowGuardContainer.appendChild(r.domNode),this.overflowGuardContainer.appendChild(this.linesContentContainer),this.overflowGuardContainer.appendChild(n.getDomNode()),this.overflowGuardContainer.appendChild(this.overlayWidgets.domNode),this.overflowGuardContainer.appendChild(this.textArea),this.overflowGuardContainer.appendChild(this.textAreaCover),this.domNode.appendChild(this.overflowGuardContainer),this.domNode.appendChild(this.contentWidgets.overflowingContentWidgetsDomNode)},t.prototype._flushAccumulatedAndRenderNow=function(){this._flushAnyAccumulatedEvents(),this._renderNow()},t.prototype.createPointerHandlerHelper=function(){var e=this;return{viewDomNode:this.domNode,linesContentDomNode:this.linesContent,focusTextArea:function(){if(e._isDisposed)throw new Error("ViewImpl.pointerHandler.focusTextArea: View is disposed");e.focus()},isDirty:function(){return e.accumulatedModelEvents.length>0},getScrollLeft:function(){if(e._isDisposed)throw new Error("ViewImpl.pointerHandler.getScrollLeft: View is disposed");return e.layoutProvider.getScrollLeft()},getScrollTop:function(){if(e._isDisposed)throw new Error("ViewImpl.pointerHandler.getScrollTop: View is disposed");return e.layoutProvider.getScrollTop()},setScrollPosition:function(t){if(e._isDisposed)throw new Error("ViewImpl.pointerHandler.setScrollPosition: View is disposed");eLine truncated
|
||||
l._updateDecorationsRunner=new n.RunOnceScheduler(function(){return l._updateDecorations()},0),l._toDispose=[],l._toDispose.push(l._updateDecorationsRunner),l._containerDomElement=document.createElement("div"),l._containerDomElement.className=t._getClassName(l._theme,l._renderSideBySide),l._containerDomElement.style.position="relative",l._containerDomElement.style.height="100%",l._domElement.appendChild(l._containerDomElement),l._overviewViewportDomElement=document.createElement("div"),l._overviewViewportDomElement.className="diffViewport",l._overviewViewportDomElement.style.position="absolute",l._overviewDomElement=document.createElement("div"),l._overviewDomElement.className="diffOverview",l._overviewDomElement.style.position="absolute",l._overviewDomElement.style.height="100%",l._overviewDomElement.appendChild(l._overviewViewportDomElement),l._toDispose.push(s.addDisposableListener(l._overviewDomElement,"mousedown",function(e){l.modifiedEditor.delegateVerticalScrollbarMouseDown(e)})),l._containerDomElement.appendChild(l._overviewDomElement),l._createLeftHandSide(),l._createRightHandSide(),l._beginUpdateDecorationsTimeout=-1,l._currentlyChangingViewZones=!1,l._diffComputationToken=0,l._originalEditorState=new x,l._modifiedEditorState=new x,l._isVisible=!0,l._isHandlingScrollEvent=!1,l._width=0,l._height=0,l._lineChanges=null,l._createLeftHandSideEditor(o,u),l._createRightHandSideEditor(o,u),o.automaticLayout&&(l._measureDomElementToken=window.setInterval(function(){return l._measureDomElement(!1)},100)),l._enableSplitViewResizing=!0,"undefined"!=typeof o.enableSplitViewResizing&&(l._enableSplitViewResizing=o.enableSplitViewResizing),l._renderSideBySide?l._setStrategy(new O(l._createDataSource(),l._enableSplitViewResizing)):l._setStrategy(new A(l._createDataSource(),l._enableSplitViewResizing)),l}return m(t,e),t.prototype.onDidChangeModelRawContent=function(e){return this.addListener2(p.EventType.ModelRawContentChanged,e)},t.prototype.onDidChangeModelContent=function(e){return this.addListener2(p.EventType.ModelContentChanged2,e)},t.prototype.onDidChangeModelLanguage=function(e){return this.addListener2(p.EventType.ModelLanguageChanged,e)},t.prototype.onDidChangeModelOptions=function(e){return this.addListener2(p.EventType.ModelOptionsChanged,e)},t.prototype.onDidChangeConfiguration=function(e){return this.addListener2(p.EventType.ConfigurationChanged,e)},t.prototype.onDidChangeCursorPosition=function(e){return this.addListener2(p.EventType.CursorPositionChanged,e)},t.prototype.onDidChangeCursorSelection=function(e){return this.addListener2(p.EventType.CursorSelectionChanged,e)},t.prototype.onDidDispose=function(e){return this.addListener2(p.EventType.Disposed,e)},t.prototype.onDidUpdateDiff=function(e){return this.addListener2(p.EventType.DiffUpdated,e)},Object.defineProperty(t.prototype,"ignoreTrimWhitespace",{get:function(){return this._ignoreTrimWhitespace},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"renderSideBySide",{get:function(){return this._renderSideBySide},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"renderIndicators",{get:function(){return this._renderIndicators},enumerable:!0,configurable:!0}),t._getClassName=function(e,t){var n="monaco-diff-editor monaco-editor-background ";return t&&(n+="side-by-side "),n+=e},t.prototype._recreateOverviewRulers=function(){this._originalOverviewRuler&&(this._overviewDomElement.removeChild(this._originalOverviewRuler.getDomNode()),this._originalOverviewRuler.dispose()),this._originalOverviewRuler=this.originalEditor.getView().createOverviewRuler("original diffOverviewRuler",4,Number.MAX_VALUE),this._overviewDomElement.appendChild(this._originalOverviewRuler.getDomNode()),this._modifiedOverviewRuler&&(this._overviewDomElement.removeChild(this._modifiedOverviewRuler.getDomNode()),this._modifiedOverviewRuler.dispose()),this._modifiedOverviewRuler=this.modifiedEditor.getView().createOverviewRuler("modified diffOverviewRuler",4,Number.MAX_VALUE),this._overviewDomElement.appendChild(this._modifiedOverviewRuler.getDomNode()),this._layoutOverviewRulers()},t.prototype._createLeftHandSide=function(){this._originalDomNode=document.createElement("div"),this._originalDomNode.className="editor original",this._originalDomNode.style.position="absolute",this._originalDomNode.style.height="100%",this._containerDomElement.appendChild(this._originalDomNode)},t.prototype._createRightHandSide=function(){this._modifiedDomNode=document.createElement("div"),this._modifiedDomNode.className="editor modified",this._modifiedDomNode.style.position="absolute",this._modifiedDomNode.style.height="100%",this._containerDomElement.appendChild(this._modifiedDomNode)},t.prototype._createLeftHandSideEditor=function(e,t){var n=this;this.originalEditor=this._createInnerEditor(t,this._originalDomNode,this._adjustOptionsForLeftHandSide(e,this._originalIsEditable)),this._toDispose.push(this.originalEditor.addBulkListener2(function(e){return n._onOriginalEdiLine truncated
|
||||
var s=e.charChanges[o];L(s)&&i.push(new S.InlineDecoration(new h.Range(s.originalStartLineNumber,s.originalStartColumn,s.originalEndLineNumber,s.originalEndColumn),"char-delete",!1))}for(var a=[],u=[],l=this.modifiedEditorConfiguration.layoutInfo.decorationsWidth,c=this.modifiedEditorConfiguration.lineHeight,d=e.originalStartLineNumber;d<=e.originalEndLineNumber;d++)if(a=a.concat(this.renderOriginalLine(d-e.originalStartLineNumber,this.originalModel,this.modifiedEditorConfiguration,this.modifiedEditorTabSize,d,i)),this.renderIndicators){var p=d-e.originalStartLineNumber;u=u.concat(['<div class="delete-sign" style="position:absolute;top:'+p*c+"px;width:"+l+"px;height:"+c+'px;right:0;"></div>'])}var f=document.createElement("div");f.className="view-lines line-delete",f.innerHTML=a.join(""),w.Configuration.applyFontInfoSlow(f,this.modifiedEditorConfiguration.fontInfo);var g=document.createElement("div");return g.className="inline-deleted-margin-view-zone",g.innerHTML=u.join(""),w.Configuration.applyFontInfoSlow(g,this.modifiedEditorConfiguration.fontInfo),{shouldNotShrink:!0,afterLineNumber:0===e.modifiedEndLineNumber?e.modifiedStartLineNumber:e.modifiedStartLineNumber-1,heightInLines:t,domNode:f,marginDomNode:g}},t.prototype.renderOriginalLine=function(e,t,n,i,o,r){var s=t.getLineContent(o),a=g.Decoration.filter(r,o,1,s.length+1),u=v.renderViewLine(new v.RenderLineInput(n.fontInfo.isMonospace&&!n.viewInfo.disableMonospaceOptimizations,s,t.mightContainRTL(),0,[new b.ViewLineToken(s.length,"")],a,i,n.fontInfo.spaceWidth,n.viewInfo.stopRenderingLineAfter,n.viewInfo.renderWhitespace,n.viewInfo.renderControlCharacters)),l=[];return l.push('<div class="view-line'),0===r.length&&l.push(" char-delete"),l.push('" style="top:'),l.push(String(e*n.lineHeight)),l.push('px;width:1000000px;">'),l=l.concat(u.output),l.push("</div>"),l},t}(k)}),define(d[503],h([0,1,4,6,61,14,23,43,19,2,45,48,118,123,170,84,107,145,57]),function(e,t,n,i,o,r,s,a,u,l,c,d,h,p,f,g,v,_,b){"use strict";var w=0,S=function(e){function t(t,n,i,o,r,s,a){var u=e.call(this,t,n,i,o,r,s)||this;return a instanceof h.StandaloneKeybindingService&&(u._standaloneKeybindingService=a),u}return m(t,e),t.prototype.addCommand=function(e,t,n){if(!this._standaloneKeybindingService)return console.warn("Cannot add command because the editor is configured with an unrecognized KeybindingService"),null;var i="DYNAMIC_"+ ++w,o=v.IOSupport.readKeybindingWhen(n);return this._standaloneKeybindingService.addDynamicKeybinding(i,e,t,o),i},t.prototype.createContextKey=function(e,t){return this._contextKeyService.createKey(e,t)},t.prototype.addAction=function(e){var t=this;if("string"!=typeof e.id||"string"!=typeof e.label||"function"!=typeof e.run)throw new Error("Invalid action descriptor, `id`, `label` and `run` are required properties!");if(!this._standaloneKeybindingService)return console.warn("Cannot add keybinding because the editor is configured with an unrecognized KeybindingService"),n.empty;var o=e.id,r=e.label,a=u.ContextKeyExpr.and(u.ContextKeyExpr.equals("editorId",this.getId()),v.IOSupport.readKeybindingWhen(e.precondition)),l=e.keybindings,c=u.ContextKeyExpr.and(a,v.IOSupport.readKeybindingWhen(e.keybindingContext)),d=e.contextMenuGroupId||null,h=e.contextMenuOrder||0,p=function(){return i.TPromise.as(e.run(t))},f=[],g=this.getId()+":"+o;if(f.push(s.CommandsRegistry.registerCommand(g,p)),d){var m={command:{id:g,title:r},when:a,group:d,order:h};f.push(b.MenuRegistry.appendMenuItem(b.MenuId.EditorContext,m))}Array.isArray(l)&&(f=f.concat(l.map(function(e){return t._standaloneKeybindingService.addDynamicKeybinding(g,e,p,c)})));var y=new _.InternalEditorAction(g,r,r,a,p,this._contextKeyService);return this._actions[o]=y,f.push({dispose:function(){delete t._actions[o]}}),n.combinedDisposable(f)},t}(p.CodeEditor);S=y([C(2,r.IInstantiationService),C(3,c.ICodeEditorService),C(4,s.ICommandService),C(5,u.IContextKeyService),C(6,a.IKeybindingService)],S),t.StandaloneCodeEditor=S;var E=function(e){function t(t,n,i,o,r,s,a,u,c,d){var h=this;n=n||{},"string"==typeof n.theme&&(n.theme=d.setTheme(n.theme)),h=e.call(this,t,n,o,r,s,a,u)||this,h._contextViewService=c,h._standaloneColorService=d,h._toDispose2=[i];var p=null;if("undefined"==typeof n.model?(p=self.monaco.editor.createModel(n.value||"",n.language||"text/plain"),h._ownsModel=!0):(p=n.model,delete n.model,h._ownsModel=!1),h._attachModel(p),p){var f={oldModelUrl:null,newModelUrl:p.uri};h.emit(l.EventType.ModelChanged,f)}return h}return m(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this),this._toDispose2=n.dispose(this._toDispose2)},t.prototype.destroy=function(){this.dispose()},t.prototype.updateOptions=function(t){"string"==typeof t.theme&&(t.theme=this._standaloneColorService.setTheme(t.theme)),e.prototype.updateOptions.call(this,t)},t.prototype._attachModel=function(t){e.prototype._attachModel.call(this,t),this._view&&this._contextViewService.setContainer(this._view.domNode)},t.prototype._postDetachModelCLine truncated
|
||||
if(i instanceof M.FileReferences)return o.preventDefault(),o.stopPropagation(),this._expandCollapse(n,i);var r=e.prototype.onTap.call(this,n,i,o);return n.emit(t.Events.FOCUSED,i),r},t.prototype.onMouseDown=function(n,i,o){if(o.leftButton){if(i instanceof M.FileReferences)return o.preventDefault(),o.stopPropagation(),this._expandCollapse(n,i);var r=e.prototype.onClick.call(this,n,i,o);return o.ctrlKey||o.metaKey?n.emit(t.Events.OPEN_TO_SIDE,i):2===o.detail?n.emit(t.Events.SELECTED,i):n.emit(t.Events.FOCUSED,i),r}return!1},t.prototype.onClick=function(t,n,i){return!i.leftButton&&e.prototype.onClick.call(this,t,n,i)},t.prototype._expandCollapse=function(e,t){return e.isExpanded(t)?e.collapse(t).done(null,i.onUnexpectedError):e.expand(t).done(null,i.onUnexpectedError),!0},t.prototype.onEscape=function(e,t){return!1},t.prototype.onEnter=function(n,i){var o=n.getFocus();if(o instanceof M.FileReferences)return this._expandCollapse(n,o);var r=e.prototype.onEnter.call(this,n,i);return i.ctrlKey||i.metaKey?n.emit(t.Events.OPEN_TO_SIDE,o):n.emit(t.Events.SELECTED,o),r},t.prototype.onUp=function(t,n){return e.prototype.onUp.call(this,t,n),this._fakeFocus(t,n),!0},t.prototype.onPageUp=function(t,n){return e.prototype.onPageUp.call(this,t,n),this._fakeFocus(t,n),!0},t.prototype.onLeft=function(t,n){return e.prototype.onLeft.call(this,t,n),this._fakeFocus(t,n),!0},t.prototype.onDown=function(t,n){return e.prototype.onDown.call(this,t,n),this._fakeFocus(t,n),!0},t.prototype.onPageDown=function(t,n){return e.prototype.onPageDown.call(this,t,n),this._fakeFocus(t,n),!0},t.prototype.onRight=function(t,n){return e.prototype.onRight.call(this,t,n),this._fakeFocus(t,n),!0},t.prototype._fakeFocus=function(e,n){var i=e.getFocus();e.setSelection([i]),e.emit(t.Events.FOCUSED,i)},t}(v.DefaultController);k.Events={FOCUSED:"events/custom/focused",SELECTED:"events/custom/selected",OPEN_TO_SIDE:"events/custom/opentoside"};var O=function(e){function t(t){var n=e.call(this)||this;return n._contextService=t,n}return m(t,e),t.prototype.getHeight=function(e,t){return 22},t.prototype.render=function(e,t,i){var o=this;if(d.clearNode(i),t instanceof M.FileReferences){var r=c.$(".reference-file");new g.LeftRightWidget(r,function(e){return new f.FileLabel(e,t.uri,o._contextService),null},function(e){var i=t.children.length,o=new p.CountBadge(e,i);return t.failure?o.setTitleFormat(n.localize(0,null)):i>1?o.setTitleFormat(n.localize(1,null,i)):o.setTitleFormat(n.localize(2,null,i)),null}),r.appendTo(i)}else if(t instanceof M.OneReference){var s=t.parent.preview.preview(t.range);if(!s)return;c.$(".reference").innerHtml(u.format('<span>{0}</span><span class="referenceMatch">{1}</span><span>{2}</span>',u.escape(s.before),u.escape(s.inside),u.escape(s.after))).appendTo(i)}return null},t}(v.LegacyRenderer);O=y([C(0,w.IWorkspaceContextService)],O);var P=function(){function e(e,t){var n=this;this._disposables=new s.Disposables,this._onDidChangePercentages=new r.Emitter,this._ratio=t,this._sash=new h.Sash(e,{getVerticalSashLeft:function(){return n._width*n._ratio},getVerticalSashHeight:function(){return n._height}});var i;this._disposables.add(this._sash.addListener2("start",function(e){i=e.startX-n._width*n.ratio})),this._disposables.add(this._sash.addListener2("change",function(e){var t=e.currentX-i;t>20&&t+20<n._width&&(n._ratio=t/n._width,n._sash.layout(),n._onDidChangePercentages.fire(n))}))}return e.prototype.dispose=function(){this._sash.dispose(),this._onDidChangePercentages.dispose(),this._disposables.dispose()},Object.defineProperty(e.prototype,"onDidChangePercentages",{get:function(){return this._onDidChangePercentages.event},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"width",{set:function(e){this._width=e,this._sash.layout()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"height",{set:function(e){this._height=e,this._sash.layout()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"percentages",{get:function(){var e=100*this._ratio,t=100-e;return[e+"%",t+"%"]},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"ratio",{get:function(){return this._ratio},enumerable:!0,configurable:!0}),e}(),A=function(e){function t(t,n,i,o,a){var u=e.call(this,t,{frameColor:"#007ACC",showFrame:!1,showArrow:!0,isResizeable:!0})||this;return u.layoutData=n,u._textModelResolverService=i,u._contextService=o,u._instantiationService=a,u._disposeOnNewModel=[],u._onDidSelectReference=new r.Emitter,u._previewModelReference=s.empty,u._instantiationService=u._instantiationService.createChild(new b.ServiceCollection([x.IPeekViewService,u])),u.create(),u}return m(t,e),t.prototype.dispose=function(){this.setModel(null),s.dispose(this._preview,this._previewNotAvailableMessage,this._tree,this._sash),e.prototype.dispose.call(this)},Object.defineProperty(t.prototype,"onDidSelectReference",{get:function(){return this._onDidSelectReference.event},enumerable:!0,configurable:!0}),t.prototype.show=function(t){thLine truncated
|
||||
|
||||
/*!-----------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* monaco-typescript version: 2.1.2(a210d77cf42d35831932c488f3869e7dbbcd995a)
|
||||
* Released under the MIT license
|
||||
* https://github.com/Microsoft/monaco-typescript/blob/master/LICENSE.md
|
||||
*-----------------------------------------------------------------------------*/
|
||||
define("vs/language/typescript/src/monaco.contribution",["require","exports","vs/editor/edcore.main"],function(e,t){"use strict";function n(){return new monaco.Promise(function(e,t){r(function(n){n.getTypeScriptWorker().then(e,t)})})}function i(){return new monaco.Promise(function(e,t){r(function(n){n.getJavaScriptWorker().then(e,t)})})}function o(){return{ModuleKind:c,JsxEmit:p,NewLineKind:u,ScriptTarget:f,ModuleResolutionKind:d,typescriptDefaults:S,javascriptDefaults:m,getTypeScriptWorker:n,getJavaScriptWorker:i}}function r(t){e(["vs/language/typescript/src/mode"],t)}var a=monaco.Emitter,s=function(){function e(e,t){this._onDidChange=new a,this._extraLibs=Object.create(null),this._workerMaxIdleTime=12e4,this.setCompilerOptions(e),this.setDiagnosticsOptions(t)}return Object.defineProperty(e.prototype,"onDidChange",{get:function(){return this._onDidChange.event},enumerable:!0,configurable:!0}),e.prototype.getExtraLibs=function(){var e=Object.create(null);for(var t in this._extraLibs)e[t]=this._extraLibs[t];return Object.freeze(e)},e.prototype.addExtraLib=function(e,t){var n=this;if("undefined"==typeof t&&(t="ts:extralib-"+Date.now()),this._extraLibs[t])throw new Error(t+" already a extra lib");return this._extraLibs[t]=e,this._onDidChange.fire(this),{dispose:function(){delete n._extraLibs[t]&&n._onDidChange.fire(n)}}},e.prototype.getCompilerOptions=function(){return this._compilerOptions},e.prototype.setCompilerOptions=function(e){this._compilerOptions=e||Object.create(null),this._onDidChange.fire(this)},e.prototype.getDiagnosticsOptions=function(){return this._diagnosticsOptions},e.prototype.setDiagnosticsOptions=function(e){this._diagnosticsOptions=e||Object.create(null),this._onDidChange.fire(this)},e.prototype.setMaximunWorkerIdleTime=function(e){this._workerMaxIdleTime=e},e.prototype.getWorkerMaxIdleTime=function(){return this._workerMaxIdleTime},e}();t.LanguageServiceDefaultsImpl=s;var c;!function(e){e[e.None=0]="None",e[e.CommonJS=1]="CommonJS",e[e.AMD=2]="AMD",e[e.UMD=3]="UMD",e[e.System=4]="System",e[e.ES2015=5]="ES2015"}(c||(c={}));var p;!function(e){e[e.None=0]="None",e[e.Preserve=1]="Preserve",e[e.React=2]="React"}(p||(p={}));var u;!function(e){e[e.CarriageReturnLineFeed=0]="CarriageReturnLineFeed",e[e.LineFeed=1]="LineFeed"}(u||(u={}));var l;!function(e){e[e.Unknown=0]="Unknown",e[e.JS=1]="JS",e[e.JSX=2]="JSX",e[e.TS=3]="TS",e[e.TSX=4]="TSX"}(l||(l={}));var f;!function(e){e[e.ES3=0]="ES3",e[e.ES5=1]="ES5",e[e.ES2015=2]="ES2015",e[e.ES2016=3]="ES2016",e[e.ES2017=4]="ES2017",e[e.ESNext=5]="ESNext",e[e.Latest=5]="Latest"}(f||(f={}));var g;!function(e){e[e.Standard=0]="Standard",e[e.JSX=1]="JSX"}(g||(g={}));var d;!function(e){e[e.Classic=1]="Classic",e[e.NodeJs=2]="NodeJs"}(d||(d={}));var S=new s({allowNonTsExtensions:!0,target:f.Latest},{noSemanticValidation:!1,noSyntaxValidation:!1}),m=new s({allowNonTsExtensions:!0,allowJs:!0,target:f.Latest},{noSemanticValidation:!0,noSyntaxValidation:!1});monaco.languages.typescript=o(),monaco.languages.register({id:"typescript",extensions:[".ts",".tsx"],aliases:["TypeScript","ts","typescript"],mimetypes:["text/typescript"]}),monaco.languages.onLanguage("typescript",function(){r(function(e){return e.setupTypeScript(S)})}),monaco.languages.register({id:"javascript",extensions:[".js",".es6",".jsx"],firstLine:"^#!.*\\bnode",filenames:["jakefile"],aliases:["JavaScript","javascript","js"],mimetypes:["text/javascript"]}),monaco.languages.onLanguage("javascript",function(){r(function(e){return e.setupJavaScript(m)})})});
|
||||
/*!-----------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* monaco-css version: 1.3.1(6787816d8e12533292fca5e861cc1769c775d1e7)
|
||||
* Released under the MIT license
|
||||
* https://github.com/Microsoft/monaco-css/blob/master/LICENSE.md
|
||||
*-----------------------------------------------------------------------------*/
|
||||
!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("vs/language/css/monaco.contribution",["require","exports","vs/editor/edcore.main"],e)}(function(e,n){function o(){return{cssDefaults:a,lessDefaults:g,scssDefaults:u}}function t(n){e(["vs/language/css/cssMode"],n)}var i=monaco.Emitter,r=function(){function e(e,n){this._onDidChange=new i,this._languageId=e,this.setDiagnosticsOptions(n)}return Object.defineProperty(e.prototype,"onDidChange",{get:function(){return this._onDidChange.event},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"languageId",{get:function(){return this._languageId},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"diagnosticsOptions",{get:function(){return this._diagnosticsOptions},enumerable:!0,configurable:!0}),e.prototype.setDiagnosticsOptions=function(e){this._diagnosticsOptions=e||Object.create(null),this._onDidChange.fire(this)},e}();n.LanguageServiceDefaultsImpl=r;var s={validate:!0,lint:{compatibleVendorPrefixes:"ignore",vendorPrefix:"warning",duplicateProperties:"warning",emptyRules:"warning",importStatement:"ignore",boxModel:"ignore",universalSelector:"ignore",zeroUnits:"ignore",fontFaceProperties:"warning",hexColorLength:"error",argumentsInColorFunction:"error",unknownProperties:"warning",ieHack:"ignore",unknownVendorSpecificProperties:"ignore",propertyIgnoredDueToDisplay:"warning",important:"ignore","float":"ignore",idSelector:"ignore"}},a=new r("css",s),u=new r("scss",s),g=new r("less",s);monaco.languages.css=o(),monaco.languages.onLanguage("less",function(){t(function(e){return e.setupMode(g)})}),monaco.languages.onLanguage("scss",function(){t(function(e){return e.setupMode(u)})}),monaco.languages.onLanguage("css",function(){t(function(e){return e.setupMode(a)})})});
|
||||
/*!-----------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* monaco-json version: 1.2.2(5618dbdb4f72c31da0555b463daa3b053decf40a)
|
||||
* Released under the MIT license
|
||||
* https://github.com/Microsoft/monaco-json/blob/master/LICENSE.md
|
||||
*-----------------------------------------------------------------------------*/
|
||||
!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("vs/language/json/monaco.contribution",["require","exports","vs/editor/edcore.main"],e)}(function(e,n){function o(){return{jsonDefaults:r}}function t(n){e(["vs/language/json/jsonMode"],n)}var i=monaco.Emitter,s=function(){function e(e,n){this._onDidChange=new i,this._languageId=e,this.setDiagnosticsOptions(n)}return Object.defineProperty(e.prototype,"onDidChange",{get:function(){return this._onDidChange.event},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"languageId",{get:function(){return this._languageId},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"diagnosticsOptions",{get:function(){return this._diagnosticsOptions},enumerable:!0,configurable:!0}),e.prototype.setDiagnosticsOptions=function(e){this._diagnosticsOptions=e||Object.create(null),this._onDidChange.fire(this)},e}();n.LanguageServiceDefaultsImpl=s;var a={validate:!0,allowComments:!0,schemas:[]},r=new s("json",a);monaco.languages.json=o(),monaco.languages.register({id:"json",extensions:[".json",".bowerrc",".jshintrc",".jscsrc",".eslintrc",".babelrc"],aliases:["JSON","json"],mimetypes:["application/json"]}),monaco.languages.onLanguage("json",function(){t(function(e){return e.setupMode(r)})})});
|
||||
/*!-----------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* monaco-html version: 1.2.1(f1b96cadd5996161d6caaa3dfdf7c39b381053e8)
|
||||
* Released under the MIT license
|
||||
* https://github.com/Microsoft/monaco-html/blob/master/LICENSE.md
|
||||
*-----------------------------------------------------------------------------*/
|
||||
!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("vs/language/html/monaco.contribution",["require","exports","vs/editor/edcore.main"],e)}(function(e,n){function t(){return{htmlDefaults:m,razorDefaults:d,handlebarDefaults:p}}function o(n){e(["vs/language/html/htmlMode"],n)}var a=monaco.Emitter,r=function(){function e(e,n){this._onDidChange=new a,this._languageId=e,this.setOptions(n)}return Object.defineProperty(e.prototype,"onDidChange",{get:function(){return this._onDidChange.event},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"languageId",{get:function(){return this._languageId},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"options",{get:function(){return this._options},enumerable:!0,configurable:!0}),e.prototype.setOptions=function(e){this._options=e||Object.create(null),this._onDidChange.fire(this)},e}();n.LanguageServiceDefaultsImpl=r;var i={tabSize:4,insertSpaces:!1,wrapLineLength:120,unformatted:'default": "a, abbr, acronym, b, bdo, big, br, button, cite, code, dfn, em, i, img, input, kbd, label, map, object, q, samp, select, small, span, strong, sub, sup, textarea, tt, var',contentUnformatted:"pre",indentInnerHtml:!1,preserveNewLines:!0,maxPreserveNewLines:null,indentHandlebars:!1,endWithNewline:!1,extraLiners:"head, body, /html",wrapAttributes:"auto"},u={format:i,suggest:{html5:!0,angular1:!0,ionic:!0}},s={format:i,suggest:{html5:!0}},l={format:i,suggest:{html5:!0,razor:!0}},g="html",c="handlebars",f="razor",m=new r(g,u),d=new r(c,s),p=new r(f,l);monaco.languages.html=t(),monaco.languages.onLanguage(g,function(){o(function(e){return e.setupMode(m)})}),monaco.languages.onLanguage(c,function(){o(function(e){return e.setupMode(d)})}),monaco.languages.onLanguage(f,function(){o(function(e){return e.setupMode(p)})})});
|
||||
/*!-----------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* monaco-languages version: 0.7.0(18916e97a4ff0f1b195d68d01d632631cc84d50e)
|
||||
* Released under the MIT license
|
||||
* https://github.com/Microsoft/monaco-languages/blob/master/LICENSE.md
|
||||
*-----------------------------------------------------------------------------*/
|
||||
define("vs/basic-languages/src/monaco.contribution",["require","exports","vs/editor/edcore.main"],function(e,s){function i(s){var i=l[s].module;return new o.Promise(function(a,t,l){e([i],function(e){o.languages.setMonarchTokensProvider(s,e.language),o.languages.setLanguageConfiguration(s,e.conf),a(void 0)},t)})}function a(e){return n[e]||(n[e]=i(e)),n[e]}function t(e){var s=e.id;l[s]=e,o.languages.register(e),o.languages.onLanguage(s,function(){a(s)})}var o="undefined"==typeof monaco?self.monaco:monaco,l={},n={};s.loadLanguage=a,t({id:"bat",extensions:[".bat",".cmd"],aliases:["Batch","bat"],module:"./bat"}),t({id:"coffeescript",extensions:[".coffee"],aliases:["CoffeeScript","coffeescript","coffee"],mimetypes:["text/x-coffeescript","text/coffeescript"],module:"./coffee"}),t({id:"c",extensions:[".c",".h"],aliases:["C","c"],module:"./cpp"}),t({id:"cpp",extensions:[".cpp",".cc",".cxx",".hpp",".hh",".hxx"],aliases:["C++","Cpp","cpp"],module:"./cpp"}),t({id:"csharp",extensions:[".cs",".csx"],aliases:["C#","csharp"],module:"./csharp"}),t({id:"dockerfile",extensions:[".dockerfile"],filenames:["Dockerfile"],aliases:["Dockerfile"],module:"./dockerfile"}),t({id:"fsharp",extensions:[".fs",".fsi",".ml",".mli",".fsx",".fsscript"],aliases:["F#","FSharp","fsharp"],module:"./fsharp"}),t({id:"go",extensions:[".go"],aliases:["Go"],module:"./go"}),t({id:"handlebars",extensions:[".handlebars",".hbs"],aliases:["Handlebars","handlebars"],mimetypes:["text/x-handlebars-template"],module:"./handlebars"}),t({id:"html",extensions:[".html",".htm",".shtml",".xhtml",".mdoc",".jsp",".asp",".aspx",".jshtm"],aliases:["HTML","htm","html","xhtml"],mimetypes:["text/html","text/x-jshtm","text/template","text/ng-template"],module:"./html"}),t({id:"ini",extensions:[".ini",".properties",".gitconfig"],filenames:["config",".gitattributes",".gitconfig",".editorconfig"],aliases:["Ini","ini"],module:"./ini"}),t({id:"jade",extensions:[".jade",".pug"],aliases:["Jade","jade"],module:"./jade"}),t({id:"java",extensions:[".java",".jav"],aliases:["Java","java"],mimetypes:["text/x-java-source","text/x-java"],module:"./java"}),t({id:"lua",extensions:[".lua"],aliases:["Lua","lua"],module:"./lua"}),t({id:"markdown",extensions:[".md",".markdown",".mdown",".mkdn",".mkd",".mdwn",".mdtxt",".mdtext"],aliases:["Markdown","markdown"],module:"./markdown"}),t({id:"objective-c",extensions:[".m"],aliases:["Objective-C"],module:"./objective-c"}),t({id:"postiats",extensions:[".dats",".sats",".hats"],aliases:["ATS","ATS/Postiats"],module:"./postiats"}),t({id:"php",extensions:[".php",".php4",".php5",".phtml",".ctp"],aliases:["PHP","php"],mimetypes:["application/x-php"],module:"./php"}),t({id:"powershell",extensions:[".ps1",".psm1",".psd1"],aliases:["PowerShell","powershell","ps","ps1"],module:"./powershell"}),t({id:"python",extensions:[".py",".rpy",".pyw",".cpy",".gyp",".gypi"],aliases:["Python","py"],firstLine:"^#!/.*\\bpython[0-9.-]*\\b",module:"./python"}),t({id:"r",extensions:[".r",".rhistory",".rprofile",".rt"],aliases:["R","r"],module:"./r"}),t({id:"razor",extensions:[".cshtml"],aliases:["Razor","razor"],mimetypes:["text/x-cshtml"],module:"./razor"}),t({id:"ruby",extensions:[".rb",".rbx",".rjs",".gemspec",".pp"],filenames:["rakefile"],aliases:["Ruby","rb"],module:"./ruby"}),t({id:"swift",aliases:["Swift","swift"],extensions:[".swift"],mimetypes:["text/swift"],module:"./swift"}),t({id:"sql",extensions:[".sql"],aliases:["SQL"],module:"./sql"}),t({id:"vb",extensions:[".vb"],aliases:["Visual Basic","vb"],module:"./vb"}),t({id:"xml",extensions:[".xml",".dtd",".ascx",".csproj",".config",".wxi",".wxl",".wxs",".xaml",".svg",".svgz"],firstLine:"(\\<\\?xml.*)|(\\<svg)|(\\<\\!doctype\\s+svg)",aliases:["XML","xml"],mimetypes:["text/xml","application/xml","application/xaml+xml","application/xml-dtd"],module:"./xml"}),t({id:"less",extensions:[".less"],aliases:["Less","less"],mimetypes:["text/x-less","text/less"],module:"./less"}),t({id:"scss",extensions:[".scss"],aliases:["Sass","sass","scss"],mimetypes:["text/x-scss","text/scss"],module:"./scss"}),t({id:"css",extensions:[".css"],aliases:["CSS","css"],mimetypes:["text/css"],module:"./css"}),t({id:"yaml",extensions:[".yaml",".yml"],aliases:["YAML","yaml","YML","yml"],mimetypes:["application/x-yaml"],module:"./yaml"})});
|
||||
define("vs/editor/editor.main", ["vs/editor/edcore.main","vs/language/typescript/src/monaco.contribution","vs/language/css/monaco.contribution","vs/language/json/monaco.contribution","vs/language/html/monaco.contribution","vs/basic-languages/src/monaco.contribution"], function() {});
|
||||
//# sourceMappingURL=../../../min-maps/vs/editor/editor.main.js.map
|
||||
Reference in new issue
Block a user