0){for(var h=0,p=e.lineDecorations.length;ht){i[o]=new n.ViewLineToken(t,e[o].type);break}i[o]=e[o]}return i}function u(e){for(var t=0,i=[],o=0,r=0,s=e.length;r50){for(var c=a.type,d=Math.ceil(l/50),h=1;h0&&(l[c++]=new n.ViewLineToken(r,""));var f,g=o.firstNonWhitespaceIndex(e);g===-1?(g=t,f=t):f=o.lastNonWhitespaceIndex(e);for(var m=0,v=0;vf)C=!0;else if(9===_)C=!0;else if(32===_)if(u)if(y)C=!0;else{var b=v+1=s)&&(l[c++]=new n.ViewLineToken(v,"vs-whitespace"),m%=s):(v===p||C&&v>r)&&(l[c++]=new n.ViewLineToken(v,h),m%=s),9===_?m=s:m++,y=C,v===p&&(d++,h=i[d].type,p=i[d].endIndex)}return y?l[c++]=new n.ViewLineToken(t,"vs-whitespace"):l[c++]=new n.ViewLineToken(t,h),l}function c(e,t,o,r){r.sort(i.Decoration.compare);for(var s=i.LineDecorationsNormalizer.normalize(r),a=s.length,u=0,l=[],c=0,d=0,h=0,p=o.length;hd&&(d=v.startOffset,l[c++]=new n.ViewLineToken(d,m)),!(v.endOffset+1<=g)){d=g,l[c++]=new n.ViewLineToken(d,m+" "+v.className);break}d=v.endOffset+1,l[c++]=new n.ViewLineToken(d,m+" "+v.className),u++}g>d&&(d=g,l[c++]=new n.ViewLineToken(d,m))}return l}function d(e){for(var t=e.fontIsMonospace,n=e.containsForeignElements,i=e.lineContent,o=e.len,r=e.isOverflowing,s=e.tokens,a=e.tabSize,u=e.containsRTL,l=e.spaceWidth,c=e.renderWhitespace,d=e.renderControlCharacters,h=new g(o+1,s.length),p=0,f=0,v=0,_="",y=0,C=s.length;y=0;if(v=0,E){for(var L=0,N="";p0&&(N+="→",L++,x--);x>0;)N+=" ",L++,x--}else N+="·",L++;v++}h.setPartLength(y,L),_+=t?''+N+"":''+N+""}else{for(var L=0,N="";p0;)N+=" ",L++,x--;break;case 32:N+=" ",L++;break;case 60:N+="<",L++;break;case 62:N+=">",L++;break;case 38:N+="&",L++;break;case 0:N+="",L++;break;case 65279:case 8232:N+="�",L++;break;case 13:N+="",L++;break;default:d&&T<32?(N+=String.fromCharCode(9216+T),L++):(N+=String.fromCharCode(T),L++)}v++}h.setPartLength(y,L),_+=u?''+N+"":''+N+""}}return h.setPartData(o,s.length-1,v),r&&(_+='…'),_+="",new m(h,_,u,n)}var h;!function(e){e[e.None=0]="None",
-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>>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")}return n.join("")}function c(e,t,n){for(var r=[],a=n.getInitialState(),u=i.TokenizationRegistry.getColorMap(),l=0,c=e.length;l"),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,t,n,i,o,r,s,a,u,l,c){"use strict";function d(e,t,n,i){return new y(e,t,n,i)}function h(e,t,n,i){return new _(e,t,n,i)}var p=function(){return!!i.isNative||!(i.isLinux||n.isFirefox||n.isSafari)}(),f=function(){function e(e,t){this._domNode=e,this._clientRectDeltaLeft=0,this._clientRectDeltaLeftRead=!1,this.endNode=t}return Object.defineProperty(e.prototype,"clientRectDeltaLeft",{get:function(){return this._clientRectDeltaLeftRead||(this._clientRectDeltaLeftRead=!0,this._clientRectDeltaLeft=this._domNode.getBoundingClientRect().left),this._clientRectDeltaLeft},enumerable:!0,configurable:!0}),e}();t.DomReadingContext=f;var g=function(){function e(e){this._context=e,this._renderWhitespace=this._context.configuration.editor.viewInfo.renderWhitespace,this._renderControlCharacters=this._context.configuration.editor.viewInfo.renderControlCharacters,this._spaceWidth=this._context.configuration.editor.fontInfo.spaceWidth,this._useMonospaceOptimizations=this._context.configuration.editor.fontInfo.isMonospace&&!this._context.configuration.editor.viewInfo.disableMonospaceOptimizations,this._lineHeight=this._context.configuration.editor.lineHeight,this._stopRenderingLineAfter=this._context.configuration.editor.viewInfo.stopRenderingLineAfter,this._isMaybeInvalid=!0,this._renderedViewLine=null}return e.prototype.getDomNode=function(){return this._renderedViewLine&&this._renderedViewLine.domNode?this._renderedViewLine.domNode.domNode:null},e.prototype.setDomNode=function(e){if(!this._renderedViewLine)throw new Error("I have no rendered view line to set the dom node to...");this._renderedViewLine.domNode=r.createFastDomNode(e)},e.prototype.onContentChanged=function(){this._isMaybeInvalid=!0},e.prototype.onTokensChanged=function(){this._isMaybeInvalid=!0},e.prototype.onModelDecorationsChanged=function(){this._isMaybeInvalid=!0},e.prototype.onConfigurationChanged=function(e){e.viewInfo.renderWhitespace&&(this._isMaybeInvalid=!0,this._renderWhitespace=this._context.configuration.editor.viewInfo.renderWhitespace),e.viewInfo.renderControlCharacters&&(this._isMaybeInvalid=!0,this._renderControlCharacters=this._context.configuration.editor.viewInfo.renderControlCharacters),e.viewInfo.disableMonospaceOptimizations&&(this._isMaybeInvalid=!0,this._useMonospaceOptimizations=this._context.configuration.editor.fontInfo.isMonospace&&!this._context.configuration.editor.viewInfo.disableMonospaceOptimizations),e.fontInfo&&(this._isMaybeInvalid=!0,this._spaceWidth=this._context.configuration.editor.fontInfo.spaceWidth,this._useMonospaceOptimizations=this._context.configuration.editor.fontInfo.isMonospace&&!this._context.configuration.editor.viewInfo.disableMonospaceOptimizations),e.lineHeight&&(this._isMaybeInvalid=!0,this._lineHeight=this._context.configuration.editor.lineHeight),e.viewInfo.stopRenderingLineAfter&&(this._isMaybeInvalid=!0,this._stopRenderingLineAfter=this._context.configuration.editor.viewInfo.stopRenderingLineAfter)},e.prototype.shouldUpdateHTML=function(e,t,n){if(this._isMaybeInvalid===!1)return!1;this._isMaybeInvalid=!1;var i=this._context.model,r=s.Decoration.filter(n,t,i.getLineMinColumn(t),i.getLineMaxColumn(t)),u=i.getLineContent(t),l=new a.RenderLineInput(this._useMonospaceOptimizations,u,i.mightContainRTL(),i.getLineMinColumn(t)-1,i.getLineTokens(t),r,i.getTabSize(),this._spaceWidth,this._stopRenderingLineAfter,this._renderWhitespace,this._renderControlCharacters);if(this._renderedViewLine&&this._renderedViewLine.input.equals(l))return!1;var c=a.renderViewLine(l),d=null;if(p&&this._useMonospaceOptimizations&&!c.containsForeignElements){var h=!0;i.mightContainNonBasicASCII()&&(h=o.isBasicASCII(u)),h&&u.length<1e3&&(d=new v(this._renderedViewLine?this._renderedViewLine.domNode:null,l,c))}if(!d){var f=/^\s*$/.test(l.lineContent);d=C(this._renderedViewLine?this._renderedViewLine.domNode:null,l,f,c)}return this._renderedViewLine=d,!0},e.prototype.getLineOuterHTML=function(e,t,n){e.push('
'),e.push(this.getLineInnerHTML(t)),e.push("
")},e.prototype.getLineInnerHTML=function(e){return this._renderedViewLine.html},e.prototype.layoutLine=function(e,t){this._renderedViewLine.domNode.setLineNumber(String(e)),this._renderedViewLine.domNode.setTop(t),this._renderedViewLine.domNode.setHeight(this._lineHeight)},e.prototype.getWidth=function(){return this._renderedViewLine?this._renderedViewLine.getWidth():0},e.prototype.getVisibleRangesForRange=function(e,t,n){return this._renderedViewLine.getVisibleRangesForRange(e,t,n)},e.prototype.getColumnOfNodeOffset=function(e,t,n){return this._renderedViewLine.getColumnOfNodeOffset(e,t,n)},e}();t.ViewLine=g;var v=function(){function e(t,n,i){this.domNode=t,this.input=n,this.html=i.output,this._characterMapping=i.characterMapping,this._charWidth=n.spaceWidth,this._charOffset=e._createCharOffset(i.characterMapping)}return e._createCharOffset=function(e){for(var t=e.getPartLengths(),n=e.length,i=new Uint32Array(n),o=0,r=0,s=0;si&&t>i)return null;i!==-1&&e>i&&(e=i),i!==-1&&t>i&&(t=i);var o=this._getCharPosition(e),r=this._getCharPosition(t);return[new c.HorizontalRange(o,r-o)]},e.prototype._getCharPosition=function(e){return 0===this._charOffset.length?0:Math.round(this._charWidth*this._charOffset[e-1])},e.prototype.getColumnOfNodeOffset=function(e,t,n){for(var i=t.textContent.length,o=-1;t;)t=t.previousSibling,o++;var r=this._characterMapping.partDataToCharOffset(o,i,n);return r+1},e}(),_=function(){function e(e,t,n,i){if(this.domNode=e,this.input=t,this.html=i.output,this._characterMapping=i.characterMapping,this._isWhitespaceOnly=n,this._cachedWidth=-1,this._pixelOffsetCache=null,!i.containsRTL){this._pixelOffsetCache=new Int32Array(this._characterMapping.length+1);for(var o=0,r=this._characterMapping.length;o<=r;o++)this._pixelOffsetCache[o]=-1}}return e.prototype._getReadingTarget=function(){return this.domNode.domNode.firstChild},e.prototype.getWidth=function(){return this._cachedWidth===-1&&(this._cachedWidth=this._getReadingTarget().offsetWidth),this._cachedWidth},e.prototype.getVisibleRangesForRange=function(e,t,n){e|=0,t|=0;var i=0|this.input.stopRenderingLineAfter;if(i!==-1&&e>i&&t>i)return null;if(i!==-1&&e>i&&(e=i),i!==-1&&t>i&&(t=i),null!==this._pixelOffsetCache){var o=this._readPixelOffset(e,n);if(o===-1)return null;var r=this._readPixelOffset(t,n);return r===-1?null:[new c.HorizontalRange(o,r-o)]}return this._readVisibleRangesForRange(e,t,n)},e.prototype._readVisibleRangesForRange=function(e,t,n){if(e===t){var i=this._readPixelOffset(e,n);return i===-1?null:[new c.HorizontalRange(i,0)]}return this._readRawVisibleRangesForRange(e,t,n)},e.prototype._readPixelOffset=function(e,t){if(null!==this._pixelOffsetCache){var n=this._pixelOffsetCache[e];if(n!==-1)return n;var i=this._actualReadPixelOffset(e,t);return this._pixelOffsetCache[e]=i,i}return this._actualReadPixelOffset(e,t)},e.prototype._actualReadPixelOffset=function(e,t){if(0===this._characterMapping.length)return 0;if(e===this._characterMapping.length&&this._isWhitespaceOnly)return this.getWidth();var n=this._characterMapping.charOffsetToPartData(e-1),i=a.CharacterMapping.getPartIndex(n),o=a.CharacterMapping.getCharIndex(n),r=l.RangeUtil.readHorizontalRanges(this._getReadingTarget(),i,o,i,o,t.clientRectDeltaLeft,t.endNode);return r&&0!==r.length?r[0].left:-1},e.prototype._readRawVisibleRangesForRange=function(e,t,n){if(1===e&&t===this._characterMapping.length)return[new c.HorizontalRange(0,this.getWidth())];var i=this._characterMapping.charOffsetToPartData(e-1),o=a.CharacterMapping.getPartIndex(i),r=a.CharacterMapping.getCharIndex(i),s=this._characterMapping.charOffsetToPartData(t-1),u=a.CharacterMapping.getPartIndex(s),d=a.CharacterMapping.getCharIndex(s);return l.RangeUtil.readHorizontalRanges(this._getReadingTarget(),o,r,u,d,n.clientRectDeltaLeft,n.endNode)},e.prototype.getColumnOfNodeOffset=function(e,t,n){for(var i=t.textContent.length,o=-1;t;)t=t.previousSibling,o++;var r=this._characterMapping.partDataToCharOffset(o,i,n);return r+1},e}(),y=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return m(t,e),t.prototype._readVisibleRangesForRange=function(t,n,i){var o=e.prototype._readVisibleRangesForRange.call(this,t,n,i);if(!o||0===o.length||t===n||1===t&&n===this._characterMapping.length)return o;var r=this._readPixelOffset(n-1,i),s=this._readPixelOffset(n,i);if(r!==-1&&s!==-1){var a=r<=s,u=o[o.length-1];a&&u.left>>1,t===e[o]?i=t&&(this.whitespaceId2Index[u]=l+1)}this.whitespaceId2Index[e.toString()]=t,this.prefixSumValidIndex=Math.min(this.prefixSumValidIndex,t-1)},e.prototype.changeWhitespace=function(e,t,n){e|=0,t|=0,n|=0;var i=!1;return i=this.changeWhitespaceHeight(e,n)||i,i=this.changeWhitespaceAfterLineNumber(e,t)||i},e.prototype.changeWhitespaceHeight=function(e,t){e|=0,t|=0;var n=e.toString();if(this.whitespaceId2Index.hasOwnProperty(n)){var i=this.whitespaceId2Index[n];if(this.heights[i]!==t)return this.heights[i]=t,this.prefixSumValidIndex=Math.min(this.prefixSumValidIndex,i-1),!0}return!1},e.prototype.changeWhitespaceAfterLineNumber=function(t,n){t|=0,n|=0;var i=t.toString();if(this.whitespaceId2Index.hasOwnProperty(i)){var o=this.whitespaceId2Index[i];if(this.afterLineNumbers[o]!==n){var r=this.ordinals[o],s=this.heights[o];this.removeWhitespace(t);var a=e.findInsertionIndex(this.afterLineNumbers,n,this.ordinals,r);return this.insertWhitespaceAtIndex(t,a,n,r,s),!0}}return!1},e.prototype.removeWhitespace=function(e){e|=0;var t=e.toString();if(this.whitespaceId2Index.hasOwnProperty(t)){var n=this.whitespaceId2Index[t];return delete this.whitespaceId2Index[t],this.removeWhitespaceAtIndex(n),!0}return!1},e.prototype.removeWhitespaceAtIndex=function(e){e|=0,this.heights.splice(e,1),this.ids.splice(e,1),this.afterLineNumbers.splice(e,1),this.ordinals.splice(e,1),this.prefixSum.splice(e,1),this.prefixSumValidIndex=Math.min(this.prefixSumValidIndex,e-1);for(var t=Object.keys(this.whitespaceId2Index),n=0,i=t.length;n=e&&(this.whitespaceId2Index[o]=r-1)}},e.prototype.onModelLinesDeleted=function(e,t){e|=0,t|=0;var n,i,o;for(i=0,o=this.afterLineNumbers.length;it&&(this.afterLineNumbers[i]-=t-e+1)},e.prototype.onModelLinesInserted=function(e,t){e|=0,t|=0;var n,i,o;for(i=0,o=this.afterLineNumbers.length;i=t.length||t[s+1]>=e)return s;n=s+1|0}else i=s-1|0}return-1},e.prototype.findFirstWhitespaceAfterLineNumber=function(e){e|=0;var t=this.findLastWhitespaceBeforeLineNumber(e),n=t+1;return n1?t*(e-1):0;var i=this.whitespaces.getAccumulatedHeightBeforeLineNumber(e);return n+i},e.prototype.getWhitespaceAccumulatedHeightBeforeLineNumber=function(e){return this.whitespaces.getAccumulatedHeightBeforeLineNumber(e)},e.prototype.hasWhitespace=function(){return this.whitespaces.getCount()>0},e.prototype.isAfterLines=function(e,t){var n=this.getTotalHeight(t);return e>n},e.prototype.getLineNumberAtOrAfterVerticalOffset=function(e,t){if(e|=0,t|=0,e<0)return 1;for(var n=1,i=0|this.linesCount,o=i;n=s+t)n=r+1;else{if(e>=s)return r;o=r}}return n>i?i:n},e.prototype.getCenteredLineInViewport=function(e,t,n){e|=0,t|=0,n|=0;for(var i,o,r=this.getLinesViewportData(e,t,n),s=(t-e)/2,a=r.startLineNumber;a<=r.endLineNumber;a++)if(i=r.visibleRangesDeltaTop+r.relativeVerticalOffset[a-r.startLineNumber],o=i+n,i<=s&&ss)return a;return r.endLineNumber},e.prototype.getLinesViewportData=function(e,t,n){e|=0,t|=0,n|=0;var i,o,r=0|this.getLineNumberAtOrAfterVerticalOffset(e,n),s=0|this.linesCount,a=0|this.getVerticalOffsetForLineNumber(r,n),u=0|this.whitespaces.getFirstWhitespaceIndexAfterLineNumber(r),l=0|this.whitespaces.getCount();u===-1?(u=l,o=s+1,i=0):(o=0|this.whitespaces.getAfterLineNumberForWhitespaceIndex(u),i=0|this.whitespaces.getHeightForWhitespaceIndex(u));var c=a,d=c,h=5e5,p=0;a>=h&&(p=Math.floor(a/h)*h,p=Math.floor(p/n)*n,d-=p);for(var f=[],g=r;g<=s;g++){for(c+=n,f.push(d),d+=n;o===g;)d+=i,c+=i,u++,u>=l?o=s+1:(o=0|this.whitespaces.getAfterLineNumberForWhitespaceIndex(u),i=0|this.whitespaces.getHeightForWhitespaceIndex(u));if(c>=t){s=g;break}}return{viewportTop:e-p,viewportHeight:t-e,bigNumbersDelta:p,startLineNumber:r,endLineNumber:s,visibleRangesDeltaTop:-(e-p),relativeVerticalOffset:f}},e.prototype.getVerticalOffsetForWhitespaceIndex=function(e,t){e|=0,t|=0;var n,i=this.whitespaces.getAfterLineNumberForWhitespaceIndex(e);n=i>=1?t*i:0;var o;return o=e>0?this.whitespaces.getAccumulatedHeight(e-1):0,n+o},e.prototype.getWhitespaceIndexAtOrAfterVerticallOffset=function(e,t){e|=0,t|=0;var n,i,o,r=0,s=this.whitespaces.getCount()-1;if(s<0)return-1;var a=this.getVerticalOffsetForWhitespaceIndex(s,t),u=this.whitespaces.getHeightForWhitespaceIndex(s);if(e>=a+u)return-1;for(;r=i+o)r=n+1;else{if(e>=i)return n;s=n}return r},e.prototype.getWhitespaceAtVerticalOffset=function(e,t){e|=0,t|=0;var n=this.getWhitespaceIndexAtOrAfterVerticallOffset(e,t);if(n<0)return null;if(n>=this.whitespaces.getCount())return null;var i=this.getVerticalOffsetForWhitespaceIndex(n,t);if(i>e)return null;var o=this.whitespaces.getHeightForWhitespaceIndex(n),r=this.whitespaces.getIdForWhitespaceIndex(n),s=this.whitespaces.getAfterLineNumberForWhitespaceIndex(n);return{id:r,afterLineNumber:s,verticalOffset:i,height:o}},e.prototype.getWhitespaceViewportData=function(e,t,n){e|=0,t|=0,n|=0;var i=this.getWhitespaceIndexAtOrAfterVerticallOffset(e,n),o=this.whitespaces.getCount()-1;if(i<0)return[];var r,s,a,u=[];for(r=i;r<=o&&(s=this.getVerticalOffsetForWhitespaceIndex(r,n),a=this.whitespaces.getHeightForWhitespaceIndex(r),!(s>=t));r++)u.push({id:this.whitespaces.getIdForWhitespaceIndex(r),afterLineNumber:this.whitespaces.getAfterLineNumberForWhitespaceIndex(r),verticalOffset:s,height:a});return u},e.prototype.getWhitespaces=function(e){return this.whitespaces.getWhitespaces(e)},e}();t.VerticalObjects=i}),define(d[213],h([0,1,212,3,210]),function(e,t,n,i,o){"use strict";var r=function(){function e(e,t){this.configuration=e,this._lineHeight=this.configuration.editor.lineHeight,this._scrollBeyondLastLine=this.configuration.editor.viewInfo.scrollBeyondLastLine,this.model=t,this.verticalObjects=new n.VerticalObjects,this.verticalObjects.replaceLines(t.getLineCount())}return e.prototype.onConfigurationChanged=function(e){e.lineHeight&&(this._lineHeight=this.configuration.editor.lineHeight),e.viewInfo.scrollBeyondLastLine&&(this._scrollBeyondLastLine=this.configuration.editor.viewInfo.scrollBeyondLastLine)},e.prototype.insertWhitespace=function(e,t,n){return this.verticalObjects.insertWhitespace(e,t,n)},e.prototype.changeWhitespace=function(e,t,n){return this.verticalObjects.changeWhitespace(e,t,n)},e.prototype.removeWhitespace=function(e){return this.verticalObjects.removeWhitespace(e)},e.prototype.onModelFlushed=function(){this.verticalObjects.replaceLines(this.model.getLineCount())},e.prototype.onModelLinesDeleted=function(e){this.verticalObjects.onModelLinesDeleted(e.fromLineNumber,e.toLineNumber)},e.prototype.onModelLinesInserted=function(e){this.verticalObjects.onModelLinesInserted(e.fromLineNumber,e.toLineNumber)},e.prototype.getVerticalOffsetForLineNumber=function(e){return this.verticalObjects.getVerticalOffsetForLineNumber(e,this._lineHeight)},e.prototype.getLinesTotalHeight=function(){return this.verticalObjects.getTotalHeight(this._lineHeight)},e.prototype.getTotalHeight=function(e,t){var n=this.getLinesTotalHeight();return n+=this._scrollBeyondLastLine?e.height-this._lineHeight:t,Math.max(e.height,n)},e.prototype.isAfterLines=function(e){return this.verticalObjects.isAfterLines(e,this._lineHeight)},e.prototype.getLineNumberAtOrAfterVerticalOffset=function(e){return this.verticalObjects.getLineNumberAtOrAfterVerticalOffset(e,this._lineHeight)},e.prototype.getHeightForLineNumber=function(e){return this._lineHeight},e.prototype.getWhitespaceViewportData=function(e){return this.verticalObjects.getWhitespaceViewportData(e.top,e.top+e.height,this._lineHeight)},e.prototype.getWhitespaces=function(){return this.verticalObjects.getWhitespaces(this._lineHeight)},e.prototype.getWhitespaceAtVerticalOffset=function(e){return this.verticalObjects.getWhitespaceAtVerticalOffset(e,this._lineHeight)},e.prototype.getLinesViewportData=function(e){var t=this.verticalObjects.getLinesViewportData(e.top,e.top+e.height,this._lineHeight),n=this.model.getDecorationsViewportData(t.startLineNumber,t.endLineNumber),r=new i.Range(t.startLineNumber,1,t.endLineNumber,this.model.getLineMaxColumn(t.endLineNumber)),s=t.startLineNumber===t.endLineNumber||t.relativeVerticalOffset[0]>=t.viewportTop?t.startLineNumber:t.startLineNumber+1,a=t.relativeVerticalOffset[t.relativeVerticalOffset.length-1]+this._lineHeight<=t.viewportTop+t.viewportHeight?t.endLineNumber:t.endLineNumber-1,u=new i.Range(s,1,a,this.model.getLineMaxColumn(a));return new o.ViewLinesViewportData(t,r,u,n)},e.prototype.getCenteredLineInViewport=function(e){return this.verticalObjects.getCenteredLineInViewport(e.top,e.top+e.height,this._lineHeight)},e.prototype.getWhitespaceAccumulatedHeightBeforeLineNumber=function(e){return this.verticalObjects.getWhitespaceAccumulatedHeightBeforeLineNumber(e)},e.prototype.hasWhitespace=function(){return this.verticalObjects.hasWhitespace()},e}();t.LinesLayout=r}),define(d[86],h([0,1,83]),function(e,t,n){"use strict";var i=function(){function e(e,t){this.index=e,this.remainder=t}return e}();t.PrefixSumIndexOfResult=i;var o=function(){function e(e){this.values=e,this.prefixSum=new Uint32Array(e.length),this.prefixSumValidIndex=-1}return e.prototype.getCount=function(){return this.values.length},e.prototype.insertValues=function(e,t){e=n.toUint32(e);var i=this.values,o=this.prefixSum,r=t.length;0!==r&&(this.values=new Uint32Array(i.length+r),this.values.set(i.subarray(0,e),0),this.values.set(i.subarray(e),e+r),this.values.set(t,e),e-1=0&&this.prefixSum.set(o.subarray(0,this.prefixSumValidIndex+1)))},e.prototype.changeValue=function(e,t){e=n.toUint32(e),t=n.toUint32(t),this.values[e]!==t&&(this.values[e]=t,e-1=i.length)){var r=i.length-e;t>=r&&(t=r),0!==t&&(this.values=new Uint32Array(i.length-t),this.values.set(i.subarray(0,e),0),this.values.set(i.subarray(e+t),e),this.prefixSum=new Uint32Array(this.values.length),e-1=0&&this.prefixSum.set(o.subarray(0,this.prefixSumValidIndex+1)))}},e.prototype.getTotalValue=function(){return 0===this.values.length?0:this.getAccumulatedValue(this.values.length-1)},e.prototype.getAccumulatedValue=function(e){if(e<0)return 0;if(e=n.toUint32(e),e<=this.prefixSumValidIndex)return this.prefixSum[e];var t=this.prefixSumValidIndex+1;0===t&&(this.prefixSum[0]=this.values[0],t++),e>=this.values.length&&(e=this.values.length-1);for(var i=t;i<=e;i++)this.prefixSum[i]=this.prefixSum[i-1]+this.values[i];return this.prefixSumValidIndex=Math.max(this.prefixSumValidIndex,e),this.prefixSum[e]},e.prototype.getIndexOf=function(e){e=Math.floor(e);for(var t,n,o,r=0,s=this.values.length-1;r<=s;)if(t=r+(s-r)/2|0,n=this.getAccumulatedValue(t),o=n-this.values[t],e=n))break;r=t+1}return new i(t,e-o)},e}();t.PrefixSumComputer=o}),define(d[215],h([0,1,86]),function(e,t,n){"use strict";var i=function(){function e(e,t,n,i){this._uri=e,this._lines=t,this._eol=n,this._versionId=i}return e.prototype.dispose=function(){this._lines.length=0},Object.defineProperty(e.prototype,"version",{get:function(){return this._versionId},enumerable:!0,configurable:!0}),e.prototype.getText=function(){return this._lines.join(this._eol)},e.prototype.onEvents=function(e){for(var t=null,n=0,i=e.length;nthis._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;le._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);lo)return!1;for(var r=0;rd?n[r].commentStrOffset=u-1:n[r].commentStrOffset=u}},e}();t.LineCommentCommand=c}),define(d[125],h([0,1,55,25,35,3,4]),function(e,t,n,i,o,r,s){"use strict";var a={followsCaret:!0,ignoreCharChanges:!0,alwaysRevealFirst:!0},u=function(e){function t(n,i){void 0===i&&(i={});var r=e.call(this,[t.Events.UPDATED])||this;return r.editor=n,r.options=o.mixin(i,a,!1),r.disposed=!1,r.toUnbind=[],r.nextIdx=-1,r.ranges=[],r.ignoreSelectionChange=!1,r.revealFirst=r.options.alwaysRevealFirst,r.toUnbind.push(r.editor.onDidDispose(function(){return r.dispose()})),r.toUnbind.push(r.editor.onDidUpdateDiff(function(){return r.onDiffUpdated()})),r.options.followsCaret&&r.toUnbind.push(r.editor.getModifiedEditor().onDidChangeCursorPosition(function(e){r.ignoreSelectionChange||(r.nextIdx=-1)})),r.options.alwaysRevealFirst&&r.toUnbind.push(r.editor.getModifiedEditor().onDidChangeModel(function(e){r.revealFirst=!0})),r.init(),r}return m(t,e),t.prototype.init=function(){var e=this.editor.getLineChanges()},t.prototype.onDiffUpdated=function(){this.init(),this.compute(this.editor.getLineChanges()),this.revealFirst&&null!==this.editor.getLineChanges()&&(this.revealFirst=!1,this.nextIdx=-1,this.next())},t.prototype.compute=function(e){var n=this;this.ranges=[],e&&e.forEach(function(e){!n.options.ignoreCharChanges&&e.charChanges?e.charChanges.forEach(function(e){n.ranges.push({rhs:!0,range:new r.Range(e.modifiedStartLineNumber,e.modifiedStartColumn,e.modifiedEndLineNumber,e.modifiedEndColumn)})}):n.ranges.push({rhs:!0,range:new r.Range(e.modifiedStartLineNumber,1,e.modifiedStartLineNumber,1)})}),this.ranges.sort(function(e,t){return e.range.getStartPosition().isBeforeOrEqual(t.range.getStartPosition())?-1:t.range.getStartPosition().isBeforeOrEqual(e.range.getStartPosition())?1:0}),this.emit(t.Events.UPDATED,{})},t.prototype.initIdx=function(e){for(var t=!1,n=this.editor.getPosition(),i=0,o=this.ranges.length;i=this.ranges.length&&(this.nextIdx=0)):(this.nextIdx-=1,this.nextIdx<0&&(this.nextIdx=this.ranges.length-1));var t=this.ranges[this.nextIdx];this.ignoreSelectionChange=!0;try{var i=t.range.getStartPosition();this.editor.setPosition(i),this.editor.revealPositionInCenter(i)}finally{this.ignoreSelectionChange=!1}}},t.prototype.canNavigate=function(){return this.ranges&&this.ranges.length>0},t.prototype.next=function(){this.move(!0)},t.prototype.previous=function(){this.move(!1)},t.prototype.dispose=function(){this.toUnbind=s.dispose(this.toUnbind),this.ranges=null,this.disposed=!0,e.prototype.dispose.call(this)},t}(i.EventEmitter);u.Events={UPDATED:"navigation.updated"},t.DiffNavigator=u}),define(d[222],h([0,1,25,3]),function(e,t,n,i){"use strict";var o=function(){function e(){this._searchString="",this._replaceString="",this._isRevealed=!1,this._isReplaceRevealed=!1,this._isRegex=!1,this._wholeWord=!1,this._matchCase=!1,this._searchScope=null,this._matchesPosition=0,this._matchesCount=0,this._currentMatch=null,this._eventEmitter=new n.EventEmitter}return Object.defineProperty(e.prototype,"searchString",{get:function(){return this._searchString},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"replaceString",{get:function(){return this._replaceString},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isRevealed",{get:function(){return this._isRevealed},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isReplaceRevealed",{get:function(){return this._isReplaceRevealed},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isRegex",{get:function(){return this._isRegex},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"wholeWord",{get:function(){return this._wholeWord},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"matchCase",{get:function(){return this._matchCase},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"searchScope",{get:function(){return this._searchScope},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"matchesPosition",{get:function(){return this._matchesPosition},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"matchesCount",{get:function(){return this._matchesCount},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"currentMatch",{get:function(){return this._currentMatch},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){this._eventEmitter.dispose()},e.prototype.addChangeListener=function(t){return this._eventEmitter.addListener2(e._CHANGED_EVENT,t)},e.prototype.changeMatchInfo=function(t,n,o){var r={moveCursor:!1,updateHistory:!1,searchString:!1,replaceString:!1,isRevealed:!1,isReplaceRevealed:!1,isRegex:!1,wholeWord:!1,matchCase:!1,searchScope:!1,matchesPosition:!1,matchesCount:!1,currentMatch:!1},s=!1;0===n&&(t=0),t>n&&(t=n),this._matchesPosition!==t&&(this._matchesPosition=t,r.matchesPosition=!0,s=!0),this._matchesCount!==n&&(this._matchesCount=n,r.matchesCount=!0,s=!0),"undefined"!=typeof o&&(i.Range.equalsRange(this._currentMatch,o)||(this._currentMatch=o,r.currentMatch=!0,s=!0)),s&&this._eventEmitter.emit(e._CHANGED_EVENT,r)},e.prototype.change=function(t,n,o){void 0===o&&(o=!0);var r={moveCursor:n,updateHistory:o,searchString:!1,replaceString:!1,isRevealed:!1,isReplaceRevealed:!1,isRegex:!1,wholeWord:!1,matchCase:!1,searchScope:!1,matchesPosition:!1,matchesCount:!1,currentMatch:!1},s=!1;"undefined"!=typeof t.searchString&&this._searchString!==t.searchString&&(this._searchString=t.searchString,r.searchString=!0,s=!0),"undefined"!=typeof t.replaceString&&this._replaceString!==t.replaceString&&(this._replaceString=t.replaceString,r.replaceString=!0,s=!0),"undefined"!=typeof t.isRevealed&&this._isRevealed!==t.isRevealed&&(this._isRevealed=t.isRevealed,r.isRevealed=!0,s=!0),"undefined"!=typeof t.isReplaceRevealed&&this._isReplaceRevealed!==t.isReplaceRevealed&&(this._isReplaceRevealed=t.isReplaceRevealed,r.isReplaceRevealed=!0,s=!0),"undefined"!=typeof t.isRegex&&this._isRegex!==t.isRegex&&(this._isRegex=t.isRegex,r.isRegex=!0,s=!0),"undefined"!=typeof t.wholeWord&&this._wholeWord!==t.wholeWord&&(this._wholeWord=t.wholeWord,r.wholeWord=!0,s=!0),"undefined"!=typeof t.matchCase&&this._matchCase!==t.matchCase&&(this._matchCase=t.matchCase,r.matchCase=!0,s=!0),"undefined"!=typeof t.searchScope&&(i.Range.equalsRange(this._searchScope,t.searchScope)||(this._searchScope=t.searchScope,r.searchScope=!0,s=!0)),s&&this._eventEmitter.emit(e._CHANGED_EVENT,r)},e}();o._CHANGED_EVENT="changed",t.FindReplaceState=o}),define(d[223],h([0,1,3]),function(e,t,n){"use strict";var i=function(){function e(e,t,n){this._editorSelection=e,this._ranges=t,this._replaceStrings=n}return e.prototype.getEditOperations=function(e,t){if(this._ranges.length>0){for(var i=[],o=0;o=o)break;var a=e.charCodeAt(n);if(36===a){t.emitUnchanged(n-1),t.emitStatic("$",n+1);continue}if(48===a||38===a){t.emitUnchanged(n-1),t.emitMatchIndex(0,n+1);continue}if(49<=a&&a<=57){var u=a-48;if(n+1=o)break;var a=e.charCodeAt(n);switch(a){case 92:t.emitUnchanged(n-1),t.emitStatic("\\",n+1);break;case 110:t.emitUnchanged(n-1),t.emitStatic("\n",n+1);break;case 116:t.emitUnchanged(n-1),t.emitStatic("\t",n+1)}}}return t.finalize()}var i=function(){function e(e){e&&0!==e.length?1===e.length&&null!==e[0].staticValue?(this._staticValue=e[0].staticValue,this._pieces=null):(this._staticValue=null,this._pieces=e):(this._staticValue="",this._pieces=null)}return e.fromStaticValue=function(t){return new e([o.staticValue(t)])},Object.defineProperty(e.prototype,"hasReplacementPatterns",{get:function(){return null===this._staticValue},enumerable:!0,configurable:!0}),e.prototype.buildReplaceString=function(t){if(null!==this._staticValue)return this._staticValue;for(var n="",i=0,o=this._pieces.length;i0;){if(e0){var u=r.modifyPosition(e.getStartPosition(),a);e=new i.Range(u.lineNumber,u.column,e.endLineNumber,e.endColumn),t=t.substring(a),s=s.substr(a)}var l=n.commonSuffixLength(t,s);if(l>0){var c=r.modifyPosition(e.getEndPosition(),-l);e=new i.Range(e.startLineNumber,e.startColumn,c.lineNumber,c.column),t=t.substring(0,t.length-l),s=s.substring(0,s.length-l)}return{text:t,range:e,forceMoveMarkers:o}},e}();t.EditOperationsCommand=o}),define(d[154],h([0,1,17,10]),function(e,t,n,i){"use strict";var o;!function(e){e[e.IDLE=0]="IDLE",e[e.FIRST_WAIT=1]="FIRST_WAIT",e[e.SECOND_WAIT=2]="SECOND_WAIT",e[e.WAITING_FOR_ASYNC_COMPUTATION=3]="WAITING_FOR_ASYNC_COMPUTATION"}(o||(o={}));var r=function(){function e(e,t,i,o){var r=this;this._computer=e,this._state=0,this._firstWaitScheduler=new n.RunOnceScheduler(function(){return r._triggerAsyncComputation()},this._getHoverTimeMillis()/2),this._secondWaitScheduler=new n.RunOnceScheduler(function(){return r._triggerSyncComputation()},this._getHoverTimeMillis()/2),this._loadingMessageScheduler=new n.RunOnceScheduler(function(){return r._showLoadingMessage()},3*this._getHoverTimeMillis()),this._asyncComputationPromise=null,this._asyncComputationPromiseDone=!1,this._completeCallback=t,this._errorCallback=i,this._progressCallback=o}return e.prototype.getComputer=function(){return this._computer},e.prototype._getHoverTimeMillis=function(){return this._computer.getHoverTimeMillis?this._computer.getHoverTimeMillis():e.HOVER_TIME},e.prototype._triggerAsyncComputation=function(){var e=this;this._state=2,this._secondWaitScheduler.schedule(),this._computer.computeAsync?(this._asyncComputationPromiseDone=!1,this._asyncComputationPromise=this._computer.computeAsync().then(function(t){e._asyncComputationPromiseDone=!0,e._withAsyncResult(t)},function(){return e._onError})):this._asyncComputationPromiseDone=!0},e.prototype._triggerSyncComputation=function(){this._computer.computeSync&&this._computer.onResult(this._computer.computeSync(),!0),this._asyncComputationPromiseDone?(this._state=0,this._onComplete(this._computer.getResult())):(this._state=3,this._onProgress(this._computer.getResult()))},e.prototype._showLoadingMessage=function(){3===this._state&&this._onProgress(this._computer.getResultWithLoadingMessage())},e.prototype._withAsyncResult=function(e){e&&this._computer.onResult(e,!1),3===this._state&&(this._state=0,this._onComplete(this._computer.getResult()))},e.prototype._onComplete=function(e){this._completeCallback&&this._completeCallback(e)},e.prototype._onError=function(e){this._errorCallback?this._errorCallback(e):i.onUnexpectedError(e)},e.prototype._onProgress=function(e){this._progressCallback&&this._progressCallback(e)},e.prototype.start=function(){0===this._state&&(this._state=1,this._firstWaitScheduler.schedule(),this._loadingMessageScheduler.schedule())},e.prototype.cancel=function(){this._loadingMessageScheduler.cancel(),1===this._state&&this._firstWaitScheduler.cancel(),2===this._state&&(this._secondWaitScheduler.cancel(),this._asyncComputationPromise&&(this._asyncComputationPromise.cancel(),this._asyncComputationPromise=null)),3===this._state&&this._asyncComputationPromise&&(this._asyncComputationPromise.cancel(),
-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._originalSelection.isEmpty()?new n.Selection(o.endLineNumber,Math.min(this._originalSelection.positionColumn,o.endColumn),o.endLineNumber,Math.min(this._originalSelection.positionColumn,o.endColumn)):new n.Selection(o.endLineNumber,o.endColumn-this._text.length,o.endLineNumber,o.endColumn)},e}();t.InPlaceReplaceCommand=i}),define(d[231],h([0,1,3,20]),function(e,t,n,i){"use strict";var o=function(){function e(e,t){this._selection=e,this._isCopyingDown=t}return e.prototype.getEditOperations=function(e,t){var i=this._selection;this._startLineNumberDelta=0,this._endLineNumberDelta=0,i.startLineNumber1&&(i-=1,r=e.getLineMaxColumn(i)),t.addEditOperation(new n.Range(i,r,o,s),null)}},e.prototype.computeCursorState=function(e,t){var n=t.getInverseEditOperations(),o=n[0].range;return new i.Selection(o.endLineNumber,this.restoreCursorToColumn,o.endLineNumber,this.restoreCursorToColumn)},e}();t.DeleteLinesCommand=o}),define(d[233],h([0,1,3,20]),function(e,t,n,i){"use strict";var o=function(){function e(e,t){this._selection=e,this._isMovingDown=t}return e.prototype.getEditOperations=function(e,t){var o=e.getLineCount();if((!this._isMovingDown||this._selection.endLineNumber!==o)&&(this._isMovingDown||1!==this._selection.startLineNumber)){this._moveEndPositionDown=!1;var r=this._selection;if(r.startLineNumber=o)return null;for(var r=[],s=i;s<=o;s++)r.push(e.getLineContent(s));var a=r.slice(0);return a.sort(function(e,t){return e.toLowerCase().localeCompare(t.toLowerCase())}),n===!0&&(a=a.reverse()),{startLineNumber:i,endLineNumber:o,before:r,after:a}}function r(e,t,r){var s=o(e,t,r);return s?n.EditOperation.replace(new i.Range(s.startLineNumber,1,s.endLineNumber,e.getLineMaxColumn(s.endLineNumber)),s.after.join("\n")):null}var s=function(){function e(e,t){this.selection=e,this.descending=t}return e.prototype.getEditOperations=function(e,t){var n=r(e,this.selection,this.descending);n&&t.addEditOperation(n.range,n.text),this.selectionId=t.trackSelection(this.selection)},e.prototype.computeCursorState=function(e,t){return t.getTrackedSelection(this.selectionId)},e.canRun=function(e,t,n){var i=o(e,t,n);if(!i)return!1;for(var r=0,s=i.before.length;rt.prefixLen?-1:e.prefixLent.offsetDist?1:0})[0];if(n)return this._references[n.idx]},e.prototype.dispose=function(){this._groups=r.dispose(this._groups)},e._compareReferences=function(e,t){return e.uri.toString()t.uri.toString()?1:l.Range.compareRangesUsingStarts(e.range,t.range)},e}();t.ReferencesModel=p}),define(d[237],h([0,1,3,78,74,38]),function(e,t,n,i,o,r){"use strict";function s(e){var t=new c;return t.start=e.range.getStartPosition(),t.end=e.range.getEndPosition(),t}function a(e){var t=new _(e).build();return t}function u(e,t){if(e instanceof d&&e.isEmpty)return null;if(!n.Range.containsPosition(e.range,t))return null;var i;if(e instanceof d){if(e.hasChildren)for(var o=0,r=e.children.length;o0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isEmpty",{get:function(){return!this.hasChildren&&!this.parent},enumerable:!0,configurable:!0}),t.prototype.append=function(e){return!!e&&(e.parent=this,this.children||(this.children=[]),e instanceof t?e.children&&this.children.push.apply(this.children,e.children):this.children.push(e),!0)},t}(c);t.NodeList=d;var h=function(e){function t(){var t=e.call(this)||this;return t.elements=new d,t.elements.parent=t,t}return m(t,e),Object.defineProperty(t.prototype,"start",{get:function(){return this.open.start},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"end",{get:function(){return this.close.end},enumerable:!0,configurable:!0}),t}(c);t.Block=h;var p=function(){function e(e,t,n){this.range=e,this.bracket=t,this.bracketType=n}return e}(),f=function(){function e(e,t,n){this.lineNumber=t,this.lineText=n,this.startOffset=e.startOffset,this.endOffset=e.endOffset,this.type=e.tokenType,this.languageId=e.languageId}return e}(),g=function(){function e(e){this._model=e,this._lineCount=this._model.getLineCount(),this._versionId=this._model.getVersionId(),this._lineNumber=0,this._lineText=null,this._advance()}return e.prototype._advance=function(){for(this._next=this._next?this._next.next():null;!this._next&&this._lineNumber0)return this._nextBuff.shift();var e=this._rawTokenScanner.next();if(!e)return null;var t=e.lineNumber,s=e.lineText,a=e.type,u=e.startOffset,l=e.endOffset;this._cachedLanguageId!==e.languageId&&(this._cachedLanguageId=e.languageId,this._cachedLanguageBrackets=r.LanguageConfigurationRegistry.getBracketsSupport(this._cachedLanguageId));var c=this._cachedLanguageBrackets;if(!c||i.ignoreBracketsInToken(a))return new p(new n.Range(t,u+1,t,l+1),0,null);var d;do if(d=o.BracketsUtils.findNextBracketInToken(c.forwardRegex,t,s,u,l)){var h=d.startColumn-1,f=d.endColumn-1;u=48&&e<=57},e.isVariableCharacter=function(e){return 95===e||e>=97&&e<=122||e>=65&&e<=90},e.prototype.text=function(e){this.value=e,this.pos=0},e.prototype.tokenText=function(e){return this.value.substr(e.pos,e.len)},e.prototype.next=function(){if(this.pos>=this.value.length)return{type:n.EOF,pos:this.pos,len:0};var t,i=this.pos,o=0,r=this.value.charCodeAt(i);if(t=e._table[r],"number"==typeof t)return this.pos+=1,{type:t,pos:i,len:1};if(e.isDigitCharacter(r)){t=n.Int;do o+=1,r=this.value.charCodeAt(i+o);while(e.isDigitCharacter(r));return this.pos+=o,{type:t,pos:i,len:o}}if(e.isVariableCharacter(r)){t=n.VariableName;do r=this.value.charCodeAt(i+ ++o);while(e.isVariableCharacter(r)||e.isDigitCharacter(r));return this.pos+=o,{type:t,pos:i,len:o}}t=n.Format;do o+=1,r=this.value.charCodeAt(i+o);while(!isNaN(r)&&"undefined"==typeof e._table[r]&&!e.isDigitCharacter(r)&&!e.isVariableCharacter(r));return this.pos+=o,{type:t,pos:i,len:o}},e}();i._table=(l={},l[36]=n.Dollar,l[58]=n.Colon,l[123]=n.CurlyOpen,l[125]=n.CurlyClose,l[92]=n.Backslash,l),t.Scanner=i;var o=function(){function e(){}return e.toString=function(e){for(var t="",n=0,i=e;n0&&t(o.defaultValue,n)):o instanceof a?t(o.defaultValue,n):i>0&&o instanceof r&&e[i-1]instanceof r&&(e[i-1].string+=e[i].string,e.splice(i,1),i--)}}var n=[];for(this._scanner.text(e),this._token=this._scanner.next();this._parseAny(n)||this._parseText(n););return t(n,Object.create(null)),n},e.prototype._accept=function(e){if(void 0===e||this._token.type===e)return this._prevToken=this._token,this._token=this._scanner.next(),!0},e.prototype._return=function(e){this._prevToken=void 0,this._token=e,this._scanner.pos=e.pos+e.len},e.prototype._parseAny=function(e){return!!this._parseEscaped(e)||(!(!this._enableInternal||!this._parseInternal(e))||(!(!this._enableTextMate||!this._parseTM(e))||void 0))},e.prototype._parseText=function(e){if(this._token.type!==n.EOF)return e.push(new r(this._scanner.tokenText(this._token))),this._accept(void 0),!0},e.prototype._parseTM=function(e){if(this._accept(n.Dollar)){if(this._accept(n.VariableName)||this._accept(n.Int)){var t=this._scanner.tokenText(this._prevToken);return e.push(/^\d+$/.test(t)?new s(t,[]):new a(t,[])),!0}if(this._accept(n.CurlyOpen))for(var i=[],u=[],l=i;;)if(l!==u&&this._accept(n.Colon))l=u;else{if(this._accept(n.CurlyClose)){var t=o.toString(i);return e.push(/^\d+$/.test(t)?new s(t,u):new a(t,u)),!0}if(!this._parseAny(l)&&!this._parseText(l))return u.length>0?(e.push(new r("${"+o.toString(i)+":")),e.push.apply(e,u)):(e.push(new r("${")),e.push.apply(e,i)),!0}return e.push(new r("$")),!0}},e.prototype._parseInternal=function(e){if(this._accept(n.CurlyOpen)){if(!this._accept(n.CurlyOpen))return this._return(this._prevToken),!1;for(var t=[],i=[],a=t;;)if(this._accept(n.Colon))a=i;else{if(this._accept(n.CurlyClose)){if(!this._accept(n.CurlyClose)){this._return(this._prevToken);continue}return i!==a&&(i=t),e.push(new s(o.toString(t),i)),!0}if(!this._parseAny(a)&&!this._parseText(a))return i.length>0?(e.push(new r("{{"+o.toString(t)+":")),e.push.apply(e,i)):(e.push(new r("{{")),e.push.apply(e,t)),!0}}},e.prototype._parseEscaped=function(e){if(this._accept(n.Backslash))return this._enableInternal&&(this._accept(n.CurlyOpen)||this._accept(n.CurlyClose)||this._accept(n.Backslash))||this._enableTextMate&&(this._accept(n.Dollar)||this._accept(n.CurlyClose)||this._accept(n.Backslash)),e.push(new r(this._scanner.tokenText(this._prevToken))),!0},e}();t.SnippetParser=u;var l}),define(d[93],h([0,1,9,3,239]),function(e,t,n,i,o){"use strict";function r(e,t){for(var n=0,i="",o=0,r=e.length;o0&&/^}/.test(s)?(o+=1,--n,i+="}}"):/^\\./.test(s)?(o+=2,i+=/^\\\$/.test(s)?"$":s.substr(0,2)):(a=s.match(/^({|})/),Array.isArray(a)&&2===a.length?(o+=1,i+="\\"+a[1]):(o+=1,i+=s.charAt(0))))}}return i}function s(e,t){if(t)for(var n=e.slice();n.length>0;){var i=n.shift();if(i instanceof o.Variable){try{i.resolvedValue=t.resolve(i.name)}catch(e){}if(i.isDefined)continue}(i instanceof o.Variable||i instanceof o.Placeholder)&&n.unshift.apply(n,i.defaultValue)}}function a(e){return""===e.id&&""===e.value||"0"===e.id}function u(e,t){var n=Object.create(null),i=!1,r=t.slice();for(e.lines=[""];r.length>0;){var s=r.shift();if(s instanceof o.Text){var u=s.string.split(/\r\n|\n|\r/);e.lines[e.lines.length-1]+=u.shift(),(h=e.lines).push.apply(h,u)}else if(s instanceof o.Placeholder){var l=n[s.name];l||(n[s.name]=l={id:s.name,value:o.Marker.toString(s.defaultValue),occurences:[]},e.placeHolders.push(l)),i=i||a(l);var c=e.lines.length,d=e.lines[c-1].length+1;l.occurences.push({startLineNumber:c,startColumn:d,endLineNumber:c,endColumn:d+o.Marker.toString(s.defaultValue).length}),r.unshift.apply(r,s.defaultValue)}else s instanceof o.Variable&&(s.isDefined?s.resolvedValue?r.unshift(new o.Text(s.resolvedValue)):r.unshift.apply(r,s.defaultValue):r.unshift(new o.Placeholder(s.name,0===s.defaultValue.length?[new o.Text(s.name)]:s.defaultValue)));0!==r.length||i||r.push(new o.Placeholder("0",[]))}e.placeHolders.sort(function(e,t){var n=function(e){return!/^\d+$/.test(e.id)};return a(e)?1:a(t)?-1:n(e)&&n(t)?0:n(e)?-1:n(t)?1:e.id===t.id?0:Number(e.id)0&&(e.finishPlaceHolderIndex=e.placeHolders.length-1,e.placeHolders[e.finishPlaceHolderIndex].id="");var h}var l=function(){function e(){this.lines=[],this.placeHolders=[],this.finishPlaceHolderIndex=-1}return e.fromTextmate=function(t,n){var i=new o.SnippetParser(!0,!1).parse(t),r=new e;return s(i,n),u(r,i),r},e.fromInternal=function(t){var n=new o.SnippetParser(!1,!0).parse(t),i=new e;return u(i,n),i},e.none=function(t){var n=new e;return n.lines=t.split(/\r\n|\n|\r/),n},e.fromEmmet=function(e){return h.parse(e)},Object.defineProperty(e.prototype,"isInsertOnly",{get:function(){return 0===this.placeHolders.length},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isSingleTabstopOnly",{get:function(){if(1!==this.placeHolders.length)return!1;var e=this.placeHolders[0];if(""!==e.value||1!==e.occurences.length)return!1;var t=e.occurences[0];return!!i.Range.isEmpty(t)},enumerable:!0,configurable:!0}),e.prototype.extractLineIndentation=function(e,t){void 0===t&&(t=Number.MAX_VALUE);var i=n.getLeadingWhitespace(e);return i.length>t-1?i.substring(0,t-1):i},e.prototype.bind=function(e,t,n,i){for(var o=[],r=[],s=this.extractLineIndentation(e,n+1),a=[],u=0,l=this.lines.length;u1||1===b?(w+=a[b],E+=a[S]):(w+=s.length,E+=s.length),v.push({startLineNumber:b+t,startColumn:w,endLineNumber:S+t,endColumn:E})}r.push({id:m.id,value:m.value,occurences:v})}return{lines:o,placeHolders:r,finishPlaceHolderIndex:this.finishPlaceHolderIndex}},e}();t.CodeSnippet=l;var c,d=new(function(){function e(){}return e.prototype.parse=function(e){return this._lastGeneratedId=0,this._snippet=new l,this.parseTemplate(e),this._snippet},e.prototype.parseTemplate=function(e){var t,n,o,r,s=Object.create(null),a=e.split("\n");for(t=0,n=a.length;t0&&""===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;o1&&/^}}/.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.startColumnt.startColumn?1:e.endColumnt.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;na&&(a=v,this._topScoreIdx=this._filteredItems.length-1),this._stats.suggestionCount++,d.type){case"snippet":this._stats.snippetCount++;break;case"text":this._stats.textCount++}}}},e._scoreByHighlight=function(t,o){var r=t.highlights,s=t.suggestion;if(n.isFalsyOrEmpty(r))return 0;for(var a=0,u=0,l=0,c=Math.min(e._base,s.label.length),d=0,h=0,p=0;h=0)do s.label[h]===o[d]?a+=1:u+=1,h+=1,d+=1;while(h=r.length)break}}return Math.pow(e._base,3)*a+Math.pow(e._base,2)*u+Math.pow(e._base,1)*(e._base-l)+Math.pow(e._base,0)*(e._base-r.length)},e}();s._base=100,t.CompletionModel=s}),define(d[161],h([0,1,4,37,35,11,98,3,425]),function(e,t,n,i,o,r,s,a){"use strict";var u={showArrow:!0,showFrame:!0,frameColor:"",className:""},l="vs.editor.contrib.zoneWidget",c=function(){function e(e,t,n,i,o,r){this.domNode=e,this.afterLineNumber=t,this.afterColumn=n,this.heightInLines=i,this._onDomNodeTop=o,this._onComputedHeight=r}return e.prototype.onDomNodeTop=function(e){this._onDomNodeTop(e)},e.prototype.onComputedHeight=function(e){this._onComputedHeight(e)},e}();t.ViewZoneDelegate=c;var d=function(){function e(e,t){this._id=e,this._domNode=t}return e.prototype.getId=function(){return this._id},e.prototype.getDomNode=function(){return this._domNode},e.prototype.getPosition=function(){return null},e}();t.OverlayWidgetDelegate=d;var h=function(e){function t(t,i){void 0===i&&(i={});var r=e.call(this)||this;return r._overlayWidget=null,r._positionMarkerId=[],r._viewZone=null,r._disposables=new n.Disposables,r.container=null,r.editor=t,r.options=o.mixin(o.clone(u),i),r.domNode=document.createElement("div"),r.options.isAccessible||(r.domNode.setAttribute("aria-hidden","true"),r.domNode.setAttribute("role","presentation")),r._disposables.add(r.editor.onDidLayoutChange(function(e){var t=r._getWidth(e);r.domNode.style.width=t+"px",r._onWidth(t)})),r}return m(t,e),t.prototype.dispose=function(){var e=this;this._disposables.dispose(),this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),this._viewZone&&this.editor.changeViewZones(function(t){t.removeZone(e._viewZone.id),e._viewZone=null}),this.editor.deltaDecorations(this._positionMarkerId,[])},t.prototype.create=function(){r.addClass(this.domNode,"zone-widget"),r.addClass(this.domNode,this.options.className),this.container=document.createElement("div"),r.addClass(this.container,"zone-widget-container"),this.domNode.appendChild(this.container),this._fillContainer(this.container),this._initSash()},t.prototype._getWidth=function(e){return void 0===e&&(e=this.editor.getLayoutInfo()),e.width-e.verticalScrollbarWidth},t.prototype._onViewZoneTop=function(e){this.domNode.style.top=e+"px"},t.prototype._onViewZoneHeight=function(e){this.domNode.style.height=e+"px";var t=e-this._decoratingElementsHeight();this.container.style.height=t+"px",this._doLayout(t,this._getWidth()),this._resizeSash.layout()},Object.defineProperty(t.prototype,"position",{get:function(){var e=this._positionMarkerId[0];if(e)return this.editor.getModel().getDecorationRange(e).getStartPosition()},enumerable:!0,configurable:!0}),t.prototype.show=function(e,t){var n=a.Range.isIRange(e)?e:new a.Range(e.lineNumber,e.column,e.lineNumber,e.column);this._showImpl(n,t),this._positionMarkerId=this.editor.deltaDecorations(this._positionMarkerId,[{range:n,options:{}}])},t.prototype.hide=function(){var e=this;this._viewZone&&(this.editor.changeViewZones(function(t){t.removeZone(e._viewZone.id)}),this._viewZone=null),this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null)},t.prototype._decoratingElementsHeight=function(){var e=this.editor.getConfiguration().lineHeight,t=0;if(this.options.showArrow){var n=Math.round(e/3);t+=2*n}if(this.options.showFrame){var i=Math.round(e/9);t+=2*i}return t},t.prototype._showImpl=function(e,t){var n=this,i={lineNumber:e.startLineNumber,column:e.startColumn},o=this._getWidth();this.domNode.style.width=o+"px",this.editor.revealPosition(i);var r=document.createElement("div"),s=document.createElement("div"),a=this.editor.getConfiguration().lineHeight,u=0,h=0;if(this.options.showArrow&&(u=Math.round(a/3),s=document.createElement("div"),s.className="zone-widget-arrow below",s.style.top=-u+"px",s.style.borderWidth=u+"px",s.style.left=this.editor.getOffsetForColumn(i.lineNumber,i.column)+"px",s.style.borderBottomColor=this.options.frameColor,r.appendChild(s)),this.options.showFrame&&(h=Math.round(a/9)),this.editor.changeViewZones(function(e){n._viewZone&&e.removeZone(n._viewZone.id),n._overlayWidget&&(n.editor.removeOverlayWidget(n._overlayWidget),n._overlayWidget=null),n.domNode.style.top="-1000px",n._viewZone=new c(r,i.lineNumber,i.column,t,function(e){return n._onViewZoneTop(e)},function(e){return n._onViewZoneHeight(e)}),n._viewZone.id=e.addZone(n._viewZone),n._overlayWidget=new d(l+n._viewZone.id,n.domNode),n.editor.addOverlayWidget(n._overlayWidget)}),this.options.showFrame){var p=this.options.frameWidth?this.options.frameWidth:h;this.container.style.borderTopColor=this.options.frameColor,this.container.style.borderBottomColor=this.options.frameColor,this.container.style.borderTopWidth=p+"px",this.container.style.borderBottomWidth=p+"px"}var f=t*a-this._decoratingElementsHeight();this.container.style.top=u+"px",this.container.style.height=f+"px",this.container.style.overflow="hidden",this._doLayout(f,o),this.editor.setSelection(e);var g=Math.min(this.editor.getModel().getLineCount(),Math.max(1,e.endLineNumber+1));this.editor.revealLine(g)},t.prototype._onWidth=function(e){},t.prototype._doLayout=function(e,t){},t.prototype._relayout=function(e){var t=this;this._viewZone.heightInLines!==e&&this.editor.changeViewZones(function(n){t._viewZone.heightInLines=e,n.layoutZone(t._viewZone.id)})},t.prototype._initSash=function(){var e=this;this._resizeSash=new s.Sash(this.domNode,this,{orientation:s.Orientation.HORIZONTAL}),this.options.isResizeable||(this._resizeSash.hide(),this._resizeSash.disable());var t;this._disposables.add(this._resizeSash.addListener2("start",function(n){e._viewZone&&(t={startY:n.startY,heightInLines:e._viewZone.heightInLines})})),this._disposables.add(this._resizeSash.addListener2("end",function(){t=void 0})),this._disposables.add(this._resizeSash.addListener2("change",function(n){if(t){var i=(n.currentY-t.startY)/e.editor.getConfiguration().lineHeight,o=i<0?Math.ceil(i):Math.floor(i),r=t.heightInLines+o;r>5&&r<35&&e._relayout(r)}}))},t.prototype.getHorizontalSashLeft=function(){return 0},t.prototype.getHorizontalSashTop=function(){return parseInt(this.domNode.style.height)-this._decoratingElementsHeight()/2},t.prototype.getHorizontalSashWidth=function(){return this.editor.getLayoutInfo().width},t}(i.Widget);t.ZoneWidget=h}),define(d[244],h([8,7]),function(e,t){return e.create("vs/base/browser/ui/actionbar/actionbar",t)}),define(d[71],h([0,1,244,4,34,274,18,49,11,67,22,25,59,53,198]),function(e,t,n,i,o,r,s,a,u,l,c,d,h,p){"use strict";var f=function(e){function t(t,n,i){var o=e.call(this)||this;return o.options=i,o._callOnDispose=[],o._context=t||o,o._action=n,n instanceof a.Action&&o._callOnDispose.push(n.onDidChange(function(e){o.builder&&o._handleActionChangeEvent(e)})),o}return m(t,e),t.prototype._handleActionChangeEvent=function(e){void 0!==e.enabled&&this._updateEnabled(),void 0!==e.checked&&this._updateChecked(),void 0!==e.class&&this._updateClass(),void 0!==e.label&&(this._updateLabel(),this._updateTooltip()),void 0!==e.tooltip&&this._updateTooltip()},Object.defineProperty(t.prototype,"callOnDispose",{get:function(){return this._callOnDispose},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"actionRunner",{get:function(){return this._actionRunner},set:function(e){this._actionRunner=e},enumerable:!0,configurable:!0}),t.prototype.getAction=function(){return this._action},t.prototype.isEnabled=function(){return this._action.enabled},t.prototype.setActionContext=function(e){this._context=e},t.prototype.render=function(e){var t=this;this.builder=o.$(e),this.gesture=new h.Gesture(e);var n=this.options&&this.options.draggable;n&&(e.draggable=!0),this.builder.on(h.EventType.Tap,function(e){return t.onClick(e)}),s.isMacintosh&&this.builder.on(u.EventType.CONTEXT_MENU,function(e){return t.onClick(e)}),this.builder.on(u.EventType.MOUSE_DOWN,function(e){n||u.EventHelper.stop(e),t._action.enabled&&t.builder.addClass("active")}),this.builder.on(u.EventType.CLICK,function(e){u.EventHelper.stop(e,!0),setTimeout(function(){return t.onClick(e)},50)}),this.builder.on([u.EventType.MOUSE_UP,u.EventType.MOUSE_OUT],function(e){u.EventHelper.stop(e),t.builder.removeClass("active")})},t.prototype.onClick=function(e){u.EventHelper.stop(e,!0);var t;c.isUndefinedOrNull(this._context)?t=e:(t=this._context,t.event=e),this._actionRunner.run(this._action,t)},t.prototype.focus=function(){this.builder&&this.builder.domFocus()},t.prototype.blur=function(){this.builder&&this.builder.domBlur()},t.prototype._updateEnabled=function(){},t.prototype._updateLabel=function(){},t.prototype._updateTooltip=function(){},t.prototype._updateClass=function(){},t.prototype._updateChecked=function(){},t.prototype.dispose=function(){e.prototype.dispose.call(this),this.builder&&(this.builder.destroy(),this.builder=null),this.gesture&&(this.gesture.dispose(),this.gesture=null),this._callOnDispose=i.dispose(this._callOnDispose)},t}(d.EventEmitter);t.BaseActionItem=f;var g=function(e){function t(n,i){var o=e.call(this,t.ID,n,n?"separator text":"separator")||this;return o.checked=!1,o.radio=!1,o.enabled=!1,o.order=i,o}return m(t,e),t}(a.Action);g.ID="vs.actions.separator",t.Separator=g;var v=function(e){function t(t,n,i){void 0===i&&(i={});var o=e.call(this,t,n,i)||this;return o.options=i,o.options.icon=void 0!==i.icon&&i.icon,o.options.label=void 0===i.label||i.label,o.cssClass="",o}return m(t,e),t.prototype.render=function(t){e.prototype.render.call(this,t),this.$e=o.$("a.action-label").appendTo(this.builder),this.$e.attr({role:"button"}),this.options.label&&this.options.keybinding&&o.$("span.keybinding").text(this.options.keybinding).appendTo(this.builder),this._updateClass(),this._updateLabel(),this._updateTooltip(),this._updateEnabled(),this._updateChecked()},t.prototype.focus=function(){e.prototype.focus.call(this),this.$e.domFocus()},t.prototype._updateLabel=function(){this.options.label&&this.$e.text(this.getAction().label)},t.prototype._updateTooltip=function(){var e=null;this.getAction().tooltip?e=this.getAction().tooltip:!this.options.label&&this.getAction().label&&this.options.icon&&(e=this.getAction().label,this.options.keybinding&&(e=n.localize(0,null,e,this.options.keybinding))),e&&this.$e.attr({title:e})},t.prototype._updateClass=function(){this.cssClass&&this.$e.removeClass(this.cssClass),this.options.icon?(this.cssClass=this.getAction().class,this.$e.addClass("icon"),this.cssClass&&this.$e.addClass(this.cssClass),this._updateEnabled()):this.$e.removeClass("icon")},t.prototype._updateEnabled=function(){this.getAction().enabled?(this.builder.removeClass("disabled"),this.$e.removeClass("disabled"),this.$e.attr({tabindex:0})):(this.builder.addClass("disabled"),this.$e.addClass("disabled"),u.removeTabIndexAndUpdateFocus(this.$e.getHTMLElement()))},t.prototype._updateChecked=function(){this.getAction().checked?this.$e.addClass("checked"):this.$e.removeClass("checked")},t.prototype._updateRadio=function(){this.getAction().radio?this.$e.addClass("radio"):this.$e.removeClass("radio")},t}(f);t.ActionItem=v;var _;!function(e){e[e.HORIZONTAL=1]="HORIZONTAL",e[e.VERTICAL=2]="VERTICAL"}(_=t.ActionsOrientation||(t.ActionsOrientation={}));var y={orientation:_.HORIZONTAL,context:null},C=function(e){function t(t,n){void 0===n&&(n=y);var i=e.call(this)||this;i.options=n,i._context=n.context,i.toDispose=[],i._actionRunner=i.options.actionRunner,i._actionRunner||(i._actionRunner=new a.ActionRunner,i.toDispose.push(i._actionRunner)),i.toDispose.push(i.addEmitter2(i._actionRunner)),i.items=[],i.focusedItem=void 0,i.domNode=document.createElement("div"),i.domNode.className="monaco-action-bar",n.animated!==!1&&u.addClass(i.domNode,"animated");var r=i.options.orientation===_.VERTICAL;return r&&(i.domNode.className+=" vertical"),o.$(i.domNode).on(u.EventType.KEY_DOWN,function(e){var t=new p.StandardKeyboardEvent(e),n=!0;t.equals(r?16:15)?i.focusPrevious():t.equals(r?18:17)?i.focusNext():t.equals(9)?i.cancel():t.equals(3)||t.equals(10)||(n=!1),n&&(t.preventDefault(),t.stopPropagation())}),o.$(i.domNode).on(u.EventType.CONTEXT_MENU,function(e){e.preventDefault(),e.stopPropagation()}),o.$(i.domNode).on(u.EventType.KEY_UP,function(e){var t=new p.StandardKeyboardEvent(e);t.equals(3)||t.equals(10)?(i.doTrigger(t),t.preventDefault(),t.stopPropagation()):(t.equals(2)||t.equals(1026))&&i.updateFocusedItem()}),i.focusTracker=u.trackFocus(i.domNode),i.focusTracker.addBlurListener(function(){document.activeElement!==i.domNode&&u.isAncestor(document.activeElement,i.domNode)||(i.emit(u.EventType.BLUR,{}),i.focusedItem=void 0)}),i.focusTracker.addFocusListener(function(){return i.updateFocusedItem()}),i.actionsList=document.createElement("ul"),i.actionsList.className="actions-container",i.actionsList.setAttribute("role","toolbar"),i.options.ariaLabel&&i.actionsList.setAttribute("aria-label",i.options.ariaLabel),i.domNode.appendChild(i.actionsList),(t instanceof o.Builder?t.getHTMLElement():t).appendChild(i.domNode),i}return m(t,e),t.prototype.setAriaLabel=function(e){e?this.actionsList.setAttribute("aria-label",e):this.actionsList.removeAttribute("aria-label")},t.prototype.updateFocusedItem=function(){for(var e=0;e=n.actionsList.children.length?n.actionsList.appendChild(i):n.actionsList.insertBefore(i,n.actionsList.children[o++]),n.items.push(r)})},t.prototype.pull=function(e){e>=0&&e=0){var n=void 0;e.equals(17)?n=(t+1)%s.length:e.equals(15)&&(n=0===t?s.length-1:t-1),e.equals(9)?s[t].blur():n>=0&&s[n].focus(),i.EventHelper.stop(e,!0)}}}),this.setInputWidth();var u=document.createElement("div");u.className="controls",u.appendChild(this.caseSensitive.domNode),u.appendChild(this.wholeWords.domNode),u.appendChild(this.regex.domNode),this.domNode.appendChild(u)},t.prototype.validate=function(){this.inputBox.validate()},t.prototype.showMessage=function(e){this.inputBox.showMessage(e)},t.prototype.clearMessage=function(){this.inputBox.hideMessage()},t.prototype.clearValidation=function(){this.inputBox.hideMessage()},t.prototype.dispose=function(){e.prototype.dispose.call(this)},t}(r.Widget);l.OPTION_CHANGE="optionChange",t.FindInput=l}),define(d[257],h([8,7]),function(e,t){return e.create("vs/base/common/json",t)}),define(d[178],h([0,1,257]),function(e,t,n){"use strict";function i(e,t){function n(t,n){for(var i=0,o=0;i=48&&r<=57)o=16*o+r-48;else if(r>=65&&r<=70)o=16*o+r-65+10;else{if(!(r>=97&&r<=102))break;o=16*o+r-97+10}h++,i++}return i=p){t+=e.substring(i,h),y=m.UnexpectedEndOfString;break}var o=e.charCodeAt(h);if(34===o){t+=e.substring(i,h),h++;break}if(92!==o){if(r(o)){t+=e.substring(i,h),y=m.UnexpectedEndOfString;break}h++}else{if(t+=e.substring(i,h),h++,h>=p){y=m.UnexpectedEndOfString;break}switch(o=e.charCodeAt(h++)){case 34:t+='"';break;case 92:t+="\\";break;case 47:t+="/";break;case 98:t+="\b";break;case 102:t+="\f";break;case 110:t+="\n";break;case 114:t+="\r";break;case 116:t+="\t";break;case 117:var s=n(4,!0);s>=0?t+=String.fromCharCode(s):y=m.InvalidUnicode;break;default:y=m.InvalidEscapeCharacter}i=h}}return t}function l(){if(f="",y=m.None,g=h,h>=p)return g=p,_=v.EOF;var t=e.charCodeAt(h);if(o(t)){do h++,f+=String.fromCharCode(t),t=e.charCodeAt(h);while(o(t));return _=v.Trivia}if(r(t))return h++,f+=String.fromCharCode(t),13===t&&10===e.charCodeAt(h)&&(h++,f+="\n"),_=v.LineBreakTrivia;switch(t){case 123:return h++,_=v.OpenBraceToken;case 125:return h++,_=v.CloseBraceToken;case 91:return h++,_=v.OpenBracketToken;case 93:return h++,_=v.CloseBracketToken;case 58:return h++,_=v.ColonToken;case 44:return h++,_=v.CommaToken;case 34:return h++,f=u(),_=v.StringLiteral;case 47:var n=h-1;if(47===e.charCodeAt(h+1)){for(h+=2;h=v.LineCommentTrivia&&e<=v.Trivia);return e}void 0===t&&(t=!1);var h=0,p=e.length,f="",g=0,_=v.Unknown,y=m.None;return{setPosition:i,getPosition:function(){return h},scan:t?d:l,getToken:function(){return _},getTokenValue:function(){return f},getTokenOffset:function(){return g},getTokenLength:function(){return h-g},getTokenError:function(){return y}}}function o(e){return 32===e||9===e||11===e||12===e||160===e||5760===e||e>=8192&&e<=8203||8239===e||8287===e||12288===e||65279===e}function r(e){return 10===e||13===e||8232===e||8233===e}function s(e){return e>=48&&e<=57}function a(e,t){var n,o,r=i(e),s=[],a=0;do switch(o=r.getPosition(),n=r.scan()){case v.LineCommentTrivia:case v.BlockCommentTrivia:case v.EOF:a!==o&&s.push(e.substring(a,o)),void 0!==t&&s.push(r.getTokenValue().replace(/[^\r\n]/g,t)),a=r.getPosition()}while(n!==v.EOF);return s.join("")}function u(e){switch(e){case y.InvalidSymbol:return n.localize(0,null);case y.InvalidNumberFormat:return n.localize(1,null);case y.PropertyNameExpected:return n.localize(2,null);case y.ValueExpected:return n.localize(3,null);case y.ColonExpected:return n.localize(4,null);case y.CommaExpected:return n.localize(5,null);case y.CloseBraceExpected:return n.localize(6,null);case y.CloseBracketExpected:return n.localize(7,null);case y.EndOfFileExpected:return n.localize(8,null);default:return""}}function l(e){switch(typeof e){case"boolean":return"boolean";case"number":return"number";case"string":return"string";default:return"null"}}function c(e,t){function n(e,t,n,i){s.value=e,s.offset=t,s.length=n,s.type=i,s.columnOffset=void 0,r=s}var i=[],o=new Object,r=void 0,s={value:void 0,offset:void 0,length:void 0,type:void 0},a=!1;try{g(e,{onObjectBegin:function(e,n){if(t<=e)throw o;r=void 0,a=t>e,i.push("")},onObjectProperty:function(e,r,s){if(t=n.children.length)return;n=n.children[c]}}return n}}function f(e){if("array"===e.type)return e.children.map(f);if("object"===e.type){for(var t={},n=0,i=e.children;n0)for(var i=f.getToken();i!==v.EOF;){if(t.indexOf(i)!==-1){s();break}if(n.indexOf(i)!==-1)break;i=s()}}function u(e){var t=f.getTokenValue();return e?w(t):m(t),s(),!0}function l(){switch(f.getToken()){case v.NumericLiteral:var e=0;try{e=JSON.parse(f.getTokenValue()),"number"!=typeof e&&(a(y.InvalidNumberFormat),e=0)}catch(e){a(y.InvalidNumberFormat)}w(e);break;case v.NullKeyword:w(null);break;case v.TrueKeyword:w(!0);break;case v.FalseKeyword:w(!1);break;default:return!1}return s(),!0}function c(){return f.getToken()!==v.StringLiteral?(a(y.PropertyNameExpected,[],[v.CloseBraceToken,v.CommaToken]),!1):(u(!1),f.getToken()===v.ColonToken?(S(":"),s(),p()||a(y.ValueExpected,[],[v.CloseBraceToken,v.CommaToken])):a(y.ColonExpected,[],[v.CloseBraceToken,v.CommaToken]),!0)}function d(){g(),s();for(var e=!1;f.getToken()!==v.CloseBraceToken&&f.getToken()!==v.EOF;)f.getToken()===v.CommaToken?(e||a(y.ValueExpected,[],[]),S(","),s()):e&&a(y.CommaExpected,[],[]),c()||a(y.ValueExpected,[],[v.CloseBraceToken,v.CommaToken]),e=!0;return _(),f.getToken()!==v.CloseBraceToken?a(y.CloseBraceExpected,[v.CloseBraceToken],[]):s(),!0}function h(){C(),s();for(var e=!1;f.getToken()!==v.CloseBracketToken&&f.getToken()!==v.EOF;)f.getToken()===v.CommaToken?(e||a(y.ValueExpected,[],[]),S(","),s()):e&&a(y.CommaExpected,[],[]),p()||a(y.ValueExpected,[],[v.CloseBracketToken,v.CommaToken]),e=!0;return b(),f.getToken()!==v.CloseBracketToken?a(y.CloseBracketExpected,[v.CloseBracketToken],[]):s(),!0}function p(){switch(f.getToken()){case v.OpenBracketToken:return h();case v.OpenBraceToken:return d();case v.StringLiteral:return u(!0);default:return l()}}var f=i(e,!1),g=o(t.onObjectBegin),m=r(t.onObjectProperty),_=o(t.onObjectEnd),C=o(t.onArrayBegin),b=o(t.onArrayEnd),w=r(t.onLiteralValue),S=r(t.onSeparator),E=r(t.onError),L=n&&n.disallowComments;return s(),f.getToken()===v.EOF||(p()?(f.getToken()!==v.EOF&&a(y.EndOfFileExpected,[],[]),!0):(a(y.ValueExpected,[],[]),!1))}var m;!function(e){e[e.None=0]="None",e[e.UnexpectedEndOfComment=1]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=2]="UnexpectedEndOfString",e[e.UnexpectedEndOfNumber=3]="UnexpectedEndOfNumber",e[e.InvalidUnicode=4]="InvalidUnicode",e[e.InvalidEscapeCharacter=5]="InvalidEscapeCharacter"}(m=t.ScanError||(t.ScanError={}));var v;!function(e){e[e.Unknown=0]="Unknown",e[e.OpenBraceToken=1]="OpenBraceToken",e[e.CloseBraceToken=2]="CloseBraceToken",e[e.OpenBracketToken=3]="OpenBracketToken",e[e.CloseBracketToken=4]="CloseBracketToken",e[e.CommaToken=5]="CommaToken",e[e.ColonToken=6]="ColonToken",e[e.NullKeyword=7]="NullKeyword",e[e.TrueKeyword=8]="TrueKeyword",e[e.FalseKeyword=9]="FalseKeyword",e[e.StringLiteral=10]="StringLiteral",e[e.NumericLiteral=11]="NumericLiteral",e[e.LineCommentTrivia=12]="LineCommentTrivia",e[e.BlockCommentTrivia=13]="BlockCommentTrivia",e[e.LineBreakTrivia=14]="LineBreakTrivia",e[e.Trivia=15]="Trivia",e[e.EOF=16]="EOF"}(v=t.SyntaxKind||(t.SyntaxKind={})),t.createScanner=i;var _;!function(e){e[e.nullCharacter=0]="nullCharacter",e[e.maxAsciiCharacter=127]="maxAsciiCharacter",e[e.lineFeed=10]="lineFeed",e[e.carriageReturn=13]="carriageReturn",e[e.lineSeparator=8232]="lineSeparator",e[e.paragraphSeparator=8233]="paragraphSeparator",e[e.nextLine=133]="nextLine",e[e.space=32]="space",e[e.nonBreakingSpace=160]="nonBreakingSpace",e[e.enQuad=8192]="enQuad",e[e.emQuad=8193]="emQuad",e[e.enSpace=8194]="enSpace",e[e.emSpace=8195]="emSpace",e[e.threePerEmSpace=8196]="threePerEmSpace",e[e.fourPerEmSpace=8197]="fourPerEmSpace",e[e.sixPerEmSpace=8198]="sixPerEmSpace",e[e.figureSpace=8199]="figureSpace",e[e.punctuationSpace=8200]="punctuationSpace",e[e.thinSpace=8201]="thinSpace",e[e.hairSpace=8202]="hairSpace",e[e.zeroWidthSpace=8203]="zeroWidthSpace",e[e.narrowNoBreakSpace=8239]="narrowNoBreakSpace",e[e.ideographicSpace=12288]="ideographicSpace",e[e.mathematicalSpace=8287]="mathematicalSpace",e[e.ogham=5760]="ogham",e[e._=95]="_",e[e.$=36]="$",e[e._0=48]="_0",e[e._1=49]="_1",e[e._2=50]="_2",e[e._3=51]="_3",e[e._4=52]="_4",e[e._5=53]="_5",e[e._6=54]="_6",e[e._7=55]="_7",e[e._8=56]="_8",e[e._9=57]="_9",e[e.a=97]="a",e[e.b=98]="b",e[e.c=99]="c",e[e.d=100]="d",e[e.e=101]="e",e[e.f=102]="f",e[e.g=103]="g",e[e.h=104]="h",e[e.i=105]="i",e[e.j=106]="j",e[e.k=107]="k",e[e.l=108]="l",e[e.m=109]="m",e[e.n=110]="n",e[e.o=111]="o",e[e.p=112]="p",e[e.q=113]="q",e[e.r=114]="r",e[e.s=115]="s",e[e.t=116]="t",e[e.u=117]="u",e[e.v=118]="v",e[e.w=119]="w",e[e.x=120]="x",e[e.y=121]="y",e[e.z=122]="z",e[e.A=65]="A",e[e.B=66]="B",e[e.C=67]="C",e[e.D=68]="D",e[e.E=69]="E",e[e.F=70]="F",e[e.G=71]="G",e[e.H=72]="H",e[e.I=73]="I",e[e.J=74]="J",e[e.K=75]="K",e[e.L=76]="L",e[e.M=77]="M",e[e.N=78]="N",e[e.O=79]="O",e[e.P=80]="P",e[e.Q=81]="Q",e[e.R=82]="R",e[e.S=83]="S",e[e.T=84]="T",e[e.U=85]="U",e[e.V=86]="V",e[e.W=87]="W",e[e.X=88]="X",e[e.Y=89]="Y",e[e.Z=90]="Z",e[e.ampersand=38]="ampersand",e[e.asterisk=42]="asterisk",e[e.at=64]="at",e[e.backslash=92]="backslash",e[e.bar=124]="bar",e[e.caret=94]="caret",e[e.closeBrace=125]="closeBrace",e[e.closeBracket=93]="closeBracket",e[e.closeParen=41]="closeParen",e[e.colon=58]="colon",e[e.comma=44]="comma",e[e.dot=46]="dot",e[e.doubleQuote=34]="doubleQuote",e[e.equals=61]="equals",e[e.exclamation=33]="exclamation",e[e.greaterThan=62]="greaterThan",e[e.lessThan=60]="lessThan",e[e.minus=45]="minus",e[e.openBrace=123]="openBrace",e[e.openBracket=91]="openBracket",e[e.openParen=40]="openParen",e[e.percent=37]="percent",e[e.plus=43]="plus",e[e.question=63]="question",e[e.semicolon=59]="semicolon",e[e.singleQuote=39]="singleQuote",e[e.slash=47]="slash",e[e.tilde=126]="tilde",e[e.backspace=8]="backspace",e[e.formFeed=12]="formFeed",e[e.byteOrderMark=65279]="byteOrderMark",e[e.tab=9]="tab",e[e.verticalTab=11]="verticalTab"}(_||(_={})),t.stripComments=a;var y;!function(e){e[e.InvalidSymbol=0]="InvalidSymbol",e[e.InvalidNumberFormat=1]="InvalidNumberFormat",e[e.PropertyNameExpected=2]="PropertyNameExpected",e[e.ValueExpected=3]="ValueExpected",e[e.ColonExpected=4]="ColonExpected",e[e.CommaExpected=5]="CommaExpected",e[e.CloseBraceExpected=6]="CloseBraceExpected",e[e.CloseBracketExpected=7]="CloseBracketExpected",e[e.EndOfFileExpected=8]="EndOfFileExpected"}(y=t.ParseErrorCode||(t.ParseErrorCode={})),t.getParseErrorMessage=u,t.getLocation=c,t.parse=d,t.parseTree=h,t.findNodeAtLocation=p,t.getNodeValue=f,t.visit=g}),define(d[259],h([8,7]),function(e,t){return e.create("vs/base/common/keybinding",t)}),define(d[137],h([0,1,259,18,31]),function(e,t,n,i,o){"use strict";function r(e,t,n){var i=[],s=o.BinaryKeybindings.hasCtrlCmd(e),a=o.BinaryKeybindings.hasShift(e),u=o.BinaryKeybindings.hasAlt(e),l=o.BinaryKeybindings.hasWinCtrl(e),c=o.BinaryKeybindings.extractKeyCode(e),d=t.getLabelForKey(c);if(!d)return"";(s&&!n.isMacintosh||l&&n.isMacintosh)&&i.push(t.ctrlKeyLabel),a&&i.push(t.shiftKeyLabel),u&&i.push(t.altKeyLabel),s&&n.isMacintosh&&i.push(t.cmdKeyLabel),l&&!n.isMacintosh&&i.push(t.windowsKeyLabel),i.push(d);var h=i.join(t.modifierSeparator);return o.BinaryKeybindings.hasChord(e)?h+" "+r(o.BinaryKeybindings.extractChordPart(e),t,n):h}function s(e,t){e.length>0&&e.push({tagName:"span",text:"+"}),e.push({tagName:"span",className:"monaco-kbkey",text:t})}function a(e,t,n,i){void 0===i&&(i=!1);var r=[],u=o.BinaryKeybindings.hasCtrlCmd(e),l=o.BinaryKeybindings.hasShift(e),c=o.BinaryKeybindings.hasAlt(e),d=o.BinaryKeybindings.hasWinCtrl(e),h=o.BinaryKeybindings.extractKeyCode(e),p=t.getLabelForKey(h);if(!p)return[];(u&&!n.isMacintosh||d&&n.isMacintosh)&&s(r,t.ctrlKeyLabel),l&&s(r,t.shiftKeyLabel),c&&s(r,t.altKeyLabel),u&&n.isMacintosh&&s(r,t.cmdKeyLabel),d&&!n.isMacintosh&&s(r,t.windowsKeyLabel),s(r,p);var f=null;return o.BinaryKeybindings.hasChord(e)&&(f=a(o.BinaryKeybindings.extractChordPart(e),t,n,!0),r.push({tagName:"span",text:" "}),r=r.concat(f)),i?r:[{tagName:"span",className:"monaco-kb",children:r}]}var u=function(){function e(){}return e.getUserSettingsKeybindingRegex=function(){if(!this._cachedKeybindingRegex){var e="numpad(0|1|2|3|4|5|6|7|8|9|_multiply|_add|_subtract|_decimal|_divide|_separator)",t="`|\\-|=|\\[|\\]|\\\\\\\\|;|'|,|\\.|\\/|oem_8|oem_102",n="left|up|right|down|pageup|pagedown|end|home|tab|enter|escape|space|backspace|delete|pausebreak|capslock|insert|contextmenu|numlock|scrolllock",i="[a-z]|[0-9]|f(1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19)",o="(("+[e,t,n,i].join(")|(")+"))",r="((ctrl|shift|alt|cmd|win|meta)\\+)*",s="("+r+o+")";this._cachedKeybindingRegex='"\\s*('+s+"(\\s+"+s+')?)\\s*"'}return this._cachedKeybindingRegex},e.toUserSettingsLabel=function(e,t){void 0===t&&(t=i);var n=r(e,p.INSTANCE,t);return n=n.toLowerCase(),t.isMacintosh?n=n.replace(/meta/g,"cmd"):t.isWindows&&(n=n.replace(/meta/g,"win")),n},e.fromUserSettingsLabel=function(t,n){if(void 0===n&&(n=i),!t)return null;t=t.toLowerCase().trim();for(var r=!1,s=!1,a=!1,u=!1,l="";/^(ctrl|shift|alt|meta|win|cmd)(\+|\-)/.test(t);)/^ctrl(\+|\-)/.test(t)&&(n.isMacintosh?u=!0:r=!0,t=t.substr("ctrl-".length)),/^shift(\+|\-)/.test(t)&&(s=!0,t=t.substr("shift-".length)),/^alt(\+|\-)/.test(t)&&(a=!0,t=t.substr("alt-".length)),/^meta(\+|\-)/.test(t)&&(n.isMacintosh?r=!0:u=!0,t=t.substr("meta-".length)),/^win(\+|\-)/.test(t)&&(n.isMacintosh?r=!0:u=!0,t=t.substr("win-".length)),/^cmd(\+|\-)/.test(t)&&(n.isMacintosh?r=!0:u=!0,t=t.substr("cmd-".length));var c=0,d=t.indexOf(" ");d>0?(l=t.substring(0,d),c=e.fromUserSettingsLabel(t.substring(d),n)):l=t;var h=o.USER_SETTINGS.toKeyCode(l),p=0;return r&&(p|=2048),s&&(p|=1024),a&&(p|=512),u&&(p|=256),p|=h,o.KeyChord(p,c)},e._toUSLabel=function(e,t){return void 0===t&&(t=i),r(e.value,t.isMacintosh?c.INSTANCE:h.INSTANCE,t)},e._toUSAriaLabel=function(e,t){return void 0===t&&(t=i),r(e.value,d.INSTANCE,t)},e._toUSHTMLLabel=function(e,t){return void 0===t&&(t=i),a(e.value,t.isMacintosh?c.INSTANCE:h.INSTANCE,t)},e.toCustomLabel=function(e,t,n){return void 0===n&&(n=i),r(e.value,t,n)},e.toCustomHTMLLabel=function(e,t,n){return void 0===n&&(n=i),a(e.value,t,n)},e._toElectronAccelerator=function(e,t){if(void 0===t&&(t=i),o.BinaryKeybindings.hasChord(e.value))return null;var n=o.BinaryKeybindings.extractKeyCode(e.value);return n>=93&&n<=108?null:r(e.value,l.INSTANCE,t)},e}();u._cachedKeybindingRegex=null,t.KeybindingLabels=u;var l=function(){function e(){this.ctrlKeyLabel="Ctrl",this.shiftKeyLabel="Shift",this.altKeyLabel="Alt",this.cmdKeyLabel="Cmd",this.windowsKeyLabel="Super",this.modifierSeparator="+"}return e.prototype.getLabelForKey=function(e){switch(e){case 16:return"Up";case 18:return"Down";case 15:return"Left";case 17:return"Right"}return o.KeyCodeUtils.toString(e)},e}();l.INSTANCE=new l,t.ElectronAcceleratorLabelProvider=l;var c=function(){function e(){this.ctrlKeyLabel="⌃",this.shiftKeyLabel="⇧",this.altKeyLabel="⌥",this.cmdKeyLabel="⌘",this.windowsKeyLabel=n.localize(0,null),this.modifierSeparator=""}return e.prototype.getLabelForKey=function(t){switch(t){case 15:return e.leftArrowUnicodeLabel;case 16:return e.upArrowUnicodeLabel;case 17:return e.rightArrowUnicodeLabel;case 18:return e.downArrowUnicodeLabel}return o.KeyCodeUtils.toString(t)},e}();c.INSTANCE=new c,c.leftArrowUnicodeLabel=String.fromCharCode(8592),c.upArrowUnicodeLabel=String.fromCharCode(8593),c.rightArrowUnicodeLabel=String.fromCharCode(8594),c.downArrowUnicodeLabel=String.fromCharCode(8595),t.MacUIKeyLabelProvider=c;var d=function(){function e(){this.ctrlKeyLabel=n.localize(1,null),this.shiftKeyLabel=n.localize(2,null),this.altKeyLabel=n.localize(3,null),this.cmdKeyLabel=n.localize(4,null),this.windowsKeyLabel=n.localize(5,null),this.modifierSeparator="+"}return e.prototype.getLabelForKey=function(e){return o.KeyCodeUtils.toString(e)},e}();d.INSTANCE=new c,t.AriaKeyLabelProvider=d;var h=function(){function e(){this.ctrlKeyLabel=n.localize(6,null),this.shiftKeyLabel=n.localize(7,null),this.altKeyLabel=n.localize(8,null),this.cmdKeyLabel=n.localize(9,null),this.windowsKeyLabel=n.localize(10,null),this.modifierSeparator="+"}return e.prototype.getLabelForKey=function(e){return o.KeyCodeUtils.toString(e)},e}();h.INSTANCE=new h,t.ClassicUIKeyLabelProvider=h;var p=function(){function e(){this.ctrlKeyLabel="Ctrl",this.shiftKeyLabel="Shift",this.altKeyLabel="Alt",this.cmdKeyLabel="Meta",this.windowsKeyLabel="Meta",this.modifierSeparator="+"}return e.prototype.getLabelForKey=function(e){return o.USER_SETTINGS.fromKeyCode(e)},e}();p.INSTANCE=new p}),define(d[261],h([8,7]),function(e,t){return e.create("vs/base/common/severity",t)}),define(d[30],h([0,1,261,9]),function(e,t,n,i){"use strict";var o;!function(e){e[e.Ignore=0]="Ignore",e[e.Info=1]="Info",e[e.Warning=2]="Warning",e[e.Error=3]="Error"}(o||(o={})),function(e){function t(t){return t?i.equalsIgnoreCase(s,t)?e.Error:i.equalsIgnoreCase(a,t)||i.equalsIgnoreCase(u,t)?e.Warning:i.equalsIgnoreCase(l,t)?e.Info:e.Ignore:e.Ignore}function o(e){return c[e]||i.empty}function r(e,t){return t-e}var s="error",a="warning",u="warn",l="info",c=Object.create(null);c[e.Error]=n.localize(0,null),c[e.Warning]=n.localize(1,null),c[e.Info]=n.localize(2,null),e.fromValue=t,e.toString=o,e.compare=r}(o||(o={})),Object.defineProperty(t,"__esModule",{value:!0}),t.default=o}),define(d[263],h([0,1,4,12,30,11,409]),function(e,t,n,i,o,r){"use strict";var s=function(){function e(e){var t=this;this._onClick=new i.Emitter,this._toDispose=[],this._editor=e,this._editor.addOverlayWidget(this),this._toDispose.push(this._editor.onDidScrollChange(function(){t._visible&&t._layout()})),this._toDispose.push(i.any(this._editor.onDidChangeConfiguration,this._editor.onDidChangeModelDecorations)(function(){t._visible&&!t._hasSpaceInGlyphMargin(t._line)&&t.hide()}))}return e.prototype.dispose=function(){this._editor.removeOverlayWidget(this),this._toDispose=n.dispose(this._toDispose)},Object.defineProperty(e.prototype,"onClick",{get:function(){return this._onClick.event},enumerable:!0,configurable:!0}),e.prototype.getId=function(){return"__lightBulbWidget"},e.prototype.getDomNode=function(){var e=this;return this._domNode||(this._domNode=document.createElement("div"),this._domNode.style.width="21px",this._domNode.style.height="20px",this._domNode.className="lightbulb-glyph hidden",this._toDispose.push(r.addDisposableListener(this._domNode,"mousedown",function(t){t.preventDefault();var n=r.getDomNodePagePosition(e._domNode),i=n.top,o=n.height,s=e._editor.getConfiguration().lineHeight;e._onClick.fire({x:t.clientX,y:i+o+Math.floor(s/3)})}))),this._domNode},e.prototype.getPosition=function(){return null},Object.defineProperty(e.prototype,"model",{get:function(){return this._model},set:function(e){var t=this;this._model=e,this.hide();var n=this._model;e.fixes.done(function(i){n===t._model&&i&&i.length>0?t.show(e):t.hide()},function(e){t.hide()})},enumerable:!0,configurable:!0}),e.prototype.show=function(e){var t=e.range.startLineNumber;this._hasSpaceInGlyphMargin(t)&&(this._visible&&this._line===t||(this._line=t,this._visible=!0,this._layout(),this._domNode.dataset.severity=e.severity>=o.default.Warning?"high":""))},e.prototype._hasSpaceInGlyphMargin=function(e){if(!this._editor.getRawConfiguration().glyphMargin)return!1;var t=this._editor.getLineDecorations(e);if(t)for(var n=0,i=t;n=0;t--){var n=this._arr[t];if(e.value===n.keybinding)return n.callback}return null},e}();t.KeybindingDispatcher=c;var d=function(){function e(e){void 0===e&&(e={clickBehavior:l.ON_MOUSE_UP});var t=this;this.options=e,this.downKeyBindingDispatcher=new c,this.downKeyBindingDispatcher.set(10,function(e,n){return t.onSpace(e,n)}),this.downKeyBindingDispatcher.set(16,function(e,n){return t.onUp(e,n)}),this.downKeyBindingDispatcher.set(11,function(e,n){return t.onPageUp(e,n)}),this.downKeyBindingDispatcher.set(18,function(e,n){return t.onDown(e,n)}),this.downKeyBindingDispatcher.set(12,function(e,n){return t.onPageDown(e,n)}),this.downKeyBindingDispatcher.set(15,function(e,n){return t.onLeft(e,n)}),this.downKeyBindingDispatcher.set(17,function(e,n){return t.onRight(e,n)}),this.downKeyBindingDispatcher.set(9,function(e,n){return t.onEscape(e,n)}),this.downKeyBindingDispatcher.set(14,function(e,n){return t.onHome(e,n)}),this.downKeyBindingDispatcher.set(13,function(e,n){return t.onEnd(e,n)}),this.upKeyBindingDispatcher=new c,this.upKeyBindingDispatcher.set(3,this.onEnter.bind(this)),
-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.as(null))},t}(o.Action);t.CollapseAllAction=v}),define(d[106],h([0,1,264,6,22,87,9,39,133,176,71,75,112,11]),function(e,t,n,i,o,r,s,a,u,l,c,d,h,p){"use strict";var f=0,g=function(){function e(){}return e.getLabel=function(e){return e.getLabel()},e.getResourcePath=function(e){var t=e.getResource();return t&&t.fsPath},e}(),v=function(){function e(e){void 0===e&&(e=[]),this.id=(f++).toString(),this.labelHighlights=e,this.descriptionHighlights=[]}return e.prototype.getId=function(){return this.id},e.prototype.getLabel=function(){return null},e.prototype.getLabelOptions=function(){return null},e.prototype.getAriaLabel=function(){return this.getLabel()},e.prototype.getDetail=function(){return null},e.prototype.getIcon=function(){return null},e.prototype.getDescription=function(){return null},e.prototype.getResource=function(){return null},e.prototype.isHidden=function(){return this.hidden},e.prototype.setHidden=function(e){this.hidden=e},e.prototype.setHighlights=function(e,t,n){this.labelHighlights=e,this.descriptionHighlights=t,this.detailHighlights=n},e.prototype.getHighlights=function(){return[this.labelHighlights,this.descriptionHighlights,this.detailHighlights]},e.prototype.run=function(e,t){return!1},e.compare=function(e,t,n){n&&(n=s.stripWildcards(n).toLowerCase());var i=e.getHighlights()[0]||[],o=t.getHighlights()[0]||[];if(i.length&&!o.length)return-1;if(!i.length&&o.length)return 1;var r=e.getLabel(),a=t.getLabel();if(r===a){var u=e.getResource(),c=t.getResource();u&&c&&(r=u.fsPath,a=c.fsPath)}return l.compareAnything(r,a,n)},e.compareByScore=function(e,t,n,i,o){return l.compareByScore(e,t,g,n,i,o)},e.highlight=function(e,t,n){void 0===n&&(n=!1);var i=[],o=[],u=s.stripWildcards(t),l=e.getLabel(),c=e.getDescription();if(e.getResource())if(t.toLowerCase()===e.getResource().fsPath.toLowerCase())i.push({start:0,end:l.length}),o.push({start:0,end:c.length});else if(n||t.indexOf(a.nativeSep)>=0){var d=r.matchesFuzzy(t,l,n);if(d)i=d;else{var h=c?c+a.nativeSep:"",p=h.length,f=r.matchesFuzzy(t,h+l,n);f||t===u||(f=r.matchesFuzzy(u,h+l,n)),f&&f.forEach(function(e){e.startp?(i.push({start:0,end:e.end-p}),o.push({start:e.start,end:p})):e.start>=p?i.push({start:e.start-p,end:e.end-p}):o.push(e)})}}else i=r.matchesFuzzy(t,l);else i=r.matchesFuzzy(t,l);return{labelHighlights:i,descriptionHighlights:o}},e.prototype.isFile=function(){return!1},e}();t.QuickOpenEntry=v;var _=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return m(t,e),t.prototype.getHeight=function(){return 0},t.prototype.render=function(e,t,n){return null},t}(v);t.QuickOpenEntryItem=_;var y=function(e){function t(t,n,i){var o=e.call(this)||this;return o.entry=t,o.groupLabel=n,o.withBorder=i,o}return m(t,e),t.prototype.getGroupLabel=function(){return this.groupLabel},t.prototype.setGroupLabel=function(e){this.groupLabel=e},t.prototype.showBorder=function(){return this.withBorder},t.prototype.setShowBorder=function(e){this.withBorder=e},t.prototype.getLabel=function(){return this.entry?this.entry.getLabel():e.prototype.getLabel.call(this)},t.prototype.getLabelOptions=function(){return this.entry?this.entry.getLabelOptions():e.prototype.getLabelOptions.call(this)},t.prototype.getAriaLabel=function(){return this.entry?this.entry.getAriaLabel():e.prototype.getAriaLabel.call(this)},t.prototype.getDetail=function(){return this.entry?this.entry.getDetail():e.prototype.getDetail.call(this)},t.prototype.getResource=function(){return this.entry?this.entry.getResource():e.prototype.getResource.call(this)},t.prototype.getIcon=function(){return this.entry?this.entry.getIcon():e.prototype.getIcon.call(this)},t.prototype.getDescription=function(){return this.entry?this.entry.getDescription():e.prototype.getDescription.call(this)},t.prototype.getEntry=function(){return this.entry},t.prototype.getHighlights=function(){return this.entry?this.entry.getHighlights():e.prototype.getHighlights.call(this)},t.prototype.isHidden=function(){return this.entry?this.entry.isHidden():e.prototype.isHidden.call(this)},t.prototype.setHighlights=function(t,n,i){this.entry?this.entry.setHighlights(t,n,i):e.prototype.setHighlights.call(this,t,n,i)},t.prototype.setHidden=function(t){this.entry?this.entry.setHidden(t):e.prototype.setHidden.call(this,t)},t.prototype.run=function(t,n){return this.entry?this.entry.run(t,n):e.prototype.run.call(this,t,n)},t}(v);t.QuickOpenEntryGroup=y;var C="quickOpenEntry",b="quickOpenEntryGroup",w="quickOpenEntryItem",S=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return m(t,e),t.prototype.getTemplateId=function(e,t){return w},t.prototype.render=function(t,n,i,o){return n instanceof _?n.render(t,i,o):e.prototype.render.call(this,t,n,i,o)},t}(d.LegacyRenderer),E=function(){function e(){}return e.prototype.hasActions=function(e,t){return!1},e.prototype.getActions=function(e,t){return i.TPromise.as(null)},e.prototype.hasSecondaryActions=function(e,t){return!1},e.prototype.getSecondaryActions=function(e,t){return i.TPromise.as(null)},e.prototype.getActionItem=function(e,t,n){return null},e}(),L=function(){function e(e,t){void 0===e&&(e=new E),void 0===t&&(t=null),this.actionProvider=e,this.actionRunner=t,this.entryItemRenderer=new S}return e.prototype.getHeight=function(e){return e instanceof _?e.getHeight():e.getDetail()?44:22},e.prototype.getTemplateId=function(e){return e instanceof _?w:e instanceof y?b:C},e.prototype.renderTemplate=function(e,t){if(e===w)return this.entryItemRenderer.renderTemplate(null,e,t);var n;e===b&&(n=document.createElement("div"),p.addClass(n,"results-group"),t.appendChild(n)),p.addClass(t,"actions");var i=document.createElement("div");p.addClass(i,"sub-content"),t.appendChild(i);var o=document.createElement("div");p.addClass(o,"primary-action-bar"),t.appendChild(o);var r=new c.ActionBar(o,{actionRunner:this.actionRunner}),s=p.$(".row"),a=p.$(".row"),l=p.$(".quick-open-entry",null,s,a);i.appendChild(l);var d=document.createElement("span");s.appendChild(d);var f=new u.IconLabel(s,{supportHighlights:!0}),g=document.createElement("span");s.appendChild(g),p.addClass(g,"quick-open-entry-description");var m=new h.HighlightedLabel(g),v=document.createElement("div");a.appendChild(v),p.addClass(v,"quick-open-entry-meta");var _=new h.HighlightedLabel(v);return{container:t,entry:l,icon:d,label:f,detail:_,description:m,group:n,actionBar:r}},e.prototype.renderElement=function(e,t,n){if(t===w)return void this.entryItemRenderer.renderElement(null,e,t,n);var i=n;if(this.actionProvider.hasActions(null,e)?p.addClass(i.container,"has-actions"):p.removeClass(i.container,"has-actions"),i.actionBar.context=e,this.actionProvider.getActions(null,e).then(function(e){i.actionBar.isEmpty()&&e&&e.length>0?i.actionBar.push(e,{icon:!0,label:!1}):i.actionBar.isEmpty()||e&&0!==e.length||i.actionBar.clear()}),e instanceof y){var o=e;o.showBorder()?p.addClass(i.container,"results-group-separator"):p.removeClass(i.container,"results-group-separator");var r=o.getGroupLabel()||"";n.group.textContent=r}if(e instanceof v){var s=e.getHighlights(),a=s[0],u=s[1],l=s[2],c=e.getIcon()?"quick-open-entry-icon "+e.getIcon():"";i.icon.className=c;var d=e.getLabelOptions()||Object.create(null);d.matches=a||[],i.label.setValue(e.getLabel(),null,d),i.detail.set(e.getDetail(),l),i.description.set(e.getDescription(),u||[]),i.description.element.title=e.getDescription()}},e.prototype.disposeTemplate=function(e,t){if(e===w)this.entryItemRenderer.disposeTemplate(null,e,t);else{var n=t;n.actionBar.dispose(),n.actionBar=null,n.container=null,n.entry=null,n.description.dispose(),n.description=null,n.detail.dispose(),n.detail=null,n.group=null,n.icon=null,n.label.dispose(),n.label=null}},e}(),N=function(){function e(e,t){void 0===e&&(e=[]),void 0===t&&(t=new E),this._entries=e,this._dataSource=this,this._renderer=new L(t),this._filter=this,this._runner=this,this._accessibilityProvider=this}return Object.defineProperty(e.prototype,"entries",{get:function(){return this._entries},set:function(e){this._entries=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"dataSource",{get:function(){return this._dataSource},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"renderer",{get:function(){return this._renderer},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"filter",{get:function(){return this._filter},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"runner",{get:function(){return this._runner},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"accessibilityProvider",{get:function(){return this._accessibilityProvider},enumerable:!0,configurable:!0}),e.prototype.addEntries=function(e){o.isArray(e)&&(this._entries=this._entries.concat(e))},e.prototype.setEntries=function(e){o.isArray(e)&&(this._entries=e)},e.prototype.getEntries=function(e){return e?this._entries.filter(function(e){return!e.isHidden()}):this._entries},e.prototype.getId=function(e){return e.getId()},e.prototype.getLabel=function(e){return e.getLabel()},e.prototype.getAriaLabel=function(e){var t=e.getAriaLabel();return t?n.localize(0,null,e.getAriaLabel()):n.localize(1,null)},e.prototype.isVisible=function(e){return!e.isHidden()},e.prototype.run=function(e,t,n){return e.run(t,n)},e}();t.QuickOpenModel=N}),define(d[141],h([0,1,75,25,184,268,77,327]),function(e,t,n,i,o,r,s){"use strict";var a=function(){function e(e,t,i){if(void 0===i&&(i={}),this.tree=e,this.configuration=t,this.options=i,!t.dataSource)throw new Error("You must provide a Data Source to the tree.");this.dataSource=t.dataSource,this.renderer=t.renderer||new n.LegacyRenderer,this.controller=t.controller||new n.DefaultController,this.dnd=t.dnd||new n.DefaultDragAndDrop,this.filter=t.filter||new n.DefaultFilter,this.sorter=t.sorter||null,this.accessibilityProvider=t.accessibilityProvider||new n.DefaultAccessibilityProvider}return e}();t.TreeContext=a;var u=function(e){function t(t,n,i){void 0===i&&(i={});var s=e.call(this)||this;return s.container=t,s.configuration=n,s.options=i,s.options.twistiePixels="number"==typeof s.options.twistiePixels?s.options.twistiePixels:32,s.options.showTwistie=s.options.showTwistie!==!1,s.options.indentPixels="number"==typeof s.options.indentPixels?s.options.indentPixels:12,s.options.alwaysFocused=s.options.alwaysFocused===!0,s.options.useShadows=s.options.useShadows!==!1,s.options.paddingOnRow=s.options.paddingOnRow!==!1,s.context=new a(s,n,i),s.model=new o.TreeModel(s.context),s.view=new r.TreeView(s.context,s.container),s.view.setModel(s.model),s.addEmitter2(s.model),s.addEmitter2(s.view),s}return m(t,e),t.prototype.getHTMLElement=function(){return this.view.getHTMLElement()},t.prototype.layout=function(e){this.view.layout(e)},t.prototype.DOMFocus=function(){this.view.focus()},t.prototype.isDOMFocused=function(){return this.view.isFocused()},t.prototype.DOMBlur=function(){this.view.blur()},t.prototype.onVisible=function(){this.view.onVisible()},t.prototype.onHidden=function(){this.view.onHidden()},t.prototype.setInput=function(e){return this.model.setInput(e)},t.prototype.getInput=function(){return this.model.getInput()},t.prototype.refresh=function(e,t){return void 0===e&&(e=null),void 0===t&&(t=!0),this.model.refresh(e,t)},t.prototype.refreshAll=function(e,t){return void 0===t&&(t=!0),this.model.refreshAll(e,t)},t.prototype.expand=function(e){return this.model.expand(e)},t.prototype.expandAll=function(e){return this.model.expandAll(e)},t.prototype.collapse=function(e,t){return void 0===t&&(t=!1),this.model.collapse(e,t)},t.prototype.collapseAll=function(e,t){return void 0===e&&(e=null),void 0===t&&(t=!1),this.model.collapseAll(e,t)},t.prototype.toggleExpansion=function(e){return this.model.toggleExpansion(e)},t.prototype.toggleExpansionAll=function(e){return this.model.toggleExpansionAll(e)},t.prototype.isExpanded=function(e){return this.model.isExpanded(e)},t.prototype.getExpandedElements=function(){return this.model.getExpandedElements()},t.prototype.reveal=function(e,t){return void 0===t&&(t=null),this.model.reveal(e,t)},t.prototype.getRelativeTop=function(e){var t=this.model.getItem(e);return this.view.getRelativeTop(t)},t.prototype.getScrollPosition=function(){return this.view.getScrollPosition()},t.prototype.setScrollPosition=function(e){this.view.setScrollPosition(e)},t.prototype.getContentHeight=function(){return this.view.getTotalHeight()},t.prototype.setHighlight=function(e,t){this.model.setHighlight(e,t)},t.prototype.getHighlight=function(){return this.model.getHighlight()},t.prototype.isHighlighted=function(e){return this.model.isFocused(e)},t.prototype.clearHighlight=function(e){this.model.setHighlight(null,e)},t.prototype.select=function(e,t){this.model.select(e,t)},t.prototype.selectRange=function(e,t,n){this.model.selectRange(e,t,n)},t.prototype.deselectRange=function(e,t,n){this.model.deselectRange(e,t,n)},t.prototype.selectAll=function(e,t){this.model.selectAll(e,t)},t.prototype.deselect=function(e,t){this.model.deselect(e,t)},t.prototype.deselectAll=function(e,t){this.model.deselectAll(e,t)},t.prototype.setSelection=function(e,t){this.model.setSelection(e,t)},t.prototype.toggleSelection=function(e,t){this.model.toggleSelection(e,t)},t.prototype.isSelected=function(e){return this.model.isSelected(e)},t.prototype.getSelection=function(){return this.model.getSelection()},t.prototype.clearSelection=function(e){this.model.setSelection([],e)},t.prototype.selectNext=function(e,t,n){this.model.selectNext(e,t,n)},t.prototype.selectPrevious=function(e,t,n){this.model.selectPrevious(e,t,n)},t.prototype.selectParent=function(e,t){this.model.selectParent(e,t)},t.prototype.setFocus=function(e,t){this.model.setFocus(e,t)},t.prototype.isFocused=function(e){return this.model.isFocused(e)},t.prototype.getFocus=function(){return this.model.getFocus()},t.prototype.focusNext=function(e,t){this.model.focusNext(e,t)},t.prototype.focusPrevious=function(e,t){this.model.focusPrevious(e,t)},t.prototype.focusParent=function(e){this.model.focusParent(e)},t.prototype.focusFirstChild=function(e){this.model.focusFirstChild(e)},t.prototype.focusFirst=function(e){this.model.focusFirst(e)},t.prototype.focusNth=function(e,t){this.model.focusNth(e,t)},t.prototype.focusLast=function(e){this.model.focusLast(e)},t.prototype.focusNextPage=function(e){this.view.focusNextPage(e)},t.prototype.focusPreviousPage=function(e){this.view.focusPreviousPage(e)},t.prototype.clearFocus=function(e){this.model.setFocus(null,e)},t.prototype.addTraits=function(e,t){this.model.addTraits(e,t)},t.prototype.removeTraits=function(e,t){this.model.removeTraits(e,t)},t.prototype.toggleTrait=function(e,t){this.model.hasTrait(e,t)?this.model.removeTraits(e,[t]):this.model.addTraits(e,[t])},t.prototype.hasTrait=function(e,t){return this.model.hasTrait(e,t)},t.prototype.getNavigator=function(e,t){return new s.MappedNavigator(this.model.getNavigator(e,t),function(e){return e&&e.getElement()})},t.prototype.dispose=function(){null!==this.model&&(this.model.dispose(),this.model=null),null!==this.view&&(this.view.dispose(),this.view=null),e.prototype.dispose.call(this)},t}(i.EventEmitter);t.Tree=u}),define(d[270],h([0,1,265,6,18,67,22,10,76,177,34,100,30,141,250,53,75,11,4,40,275]),function(e,t,n,i,o,r,s,a,u,l,c,d,h,p,f,g,v,_,y,C){"use strict";var b=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return m(t,e),t.prototype.onContextMenu=function(t,n,i){return o.isMacintosh?this.onLeftClick(t,n,i):e.prototype.onContextMenu.call(this,t,n,i)},t}(v.DefaultController);t.QuickOpenController=b;var w;!function(e){e[e.ELEMENT_SELECTED=0]="ELEMENT_SELECTED",e[e.FOCUS_LOST=1]="FOCUS_LOST",e[e.CANCELED=2]="CANCELED"}(w=t.HideReason||(t.HideReason={}));var S=n.localize(0,null),E=function(){function e(e,t,n,i){this.toUnbind=[],this.container=e,this.callbacks=t,this.options=n,this.usageLogger=i,this.model=null}return e.prototype.getElement=function(){return c.$(this.builder)},e.prototype.getModel=function(){return this.model},e.prototype.setCallbacks=function(e){this.callbacks=e},e.prototype.create=function(){var e=this;return this.builder=c.$().div(function(t){t.on(_.EventType.KEY_DOWN,function(t){var n=new g.StandardKeyboardEvent(t);9===n.keyCode&&(_.EventHelper.stop(t,!0),e.hide(w.CANCELED))}).on(_.EventType.CONTEXT_MENU,function(e){return _.EventHelper.stop(e,!0)}).on(_.EventType.FOCUS,function(t){return e.gainingFocus()},null,!0).on(_.EventType.BLUR,function(t){return e.loosingFocus(t)},null,!0),e.progressBar=new f.ProgressBar(t.clone()),e.progressBar.getContainer().hide(),t.div({class:"quick-open-input"},function(t){e.inputContainer=t,e.inputBox=new d.InputBox(t.getHTMLElement(),null,{placeholder:e.options.inputPlaceHolder||"",ariaLabel:S}),e.inputElement=e.inputBox.inputElement,e.inputElement.setAttribute("role","combobox"),e.inputElement.setAttribute("aria-haspopup","false"),e.inputElement.setAttribute("aria-autocomplete","list"),_.addDisposableListener(e.inputBox.inputElement,_.EventType.KEY_DOWN,function(t){var n=new g.StandardKeyboardEvent(t),i=e.shouldOpenInBackground(n);if(2!==n.keyCode)if(18===n.keyCode||16===n.keyCode||12===n.keyCode||11===n.keyCode)_.EventHelper.stop(t,!0),e.navigateInTree(n.keyCode,n.shiftKey),e.inputBox.inputElement.selectionStart=e.inputBox.value.length;else if(3===n.keyCode||i){_.EventHelper.stop(t,!0);var o=e.tree.getFocus();o&&e.elementSelected(o,t,i?u.Mode.OPEN_IN_BACKGROUND:u.Mode.OPEN)}}),_.addDisposableListener(e.inputBox.inputElement,_.EventType.INPUT,function(t){e.onType()})}),e.treeContainer=t.div({class:"quick-open-tree"},function(t){e.tree=new p.Tree(t.getHTMLElement(),{dataSource:new l.DataSource(e),controller:new b({clickBehavior:v.ClickBehavior.ON_MOUSE_UP}),renderer:new l.Renderer(e),filter:new l.Filter(e),accessibilityProvider:new l.AccessibilityProvider(e)},{twistiePixels:11,indentPixels:0,alwaysFocused:!0,verticalScrollMode:C.ScrollbarVisibility.Visible,ariaLabel:n.localize(1,null)}),e.treeElement=e.tree.getHTMLElement(),e.toUnbind.push(e.tree.addListener2(r.EventType.FOCUS,function(t){e.elementFocused(t.focus,t)})),e.toUnbind.push(e.tree.addListener2(r.EventType.SELECTION,function(t){t.selection&&t.selection.length>0&&e.elementSelected(t.selection[0],t)}))}).on(_.EventType.KEY_DOWN,function(t){var n=new g.StandardKeyboardEvent(t);e.quickNavigateConfiguration&&(18!==n.keyCode&&16!==n.keyCode&&12!==n.keyCode&&11!==n.keyCode||(_.EventHelper.stop(t,!0),e.navigateInTree(n.keyCode)))}).on(_.EventType.KEY_UP,function(t){var n=new g.StandardKeyboardEvent(t),i=n.keyCode;if(e.quickNavigateConfiguration){var r=e.quickNavigateConfiguration.keybindings,s=3===i||r.some(function(e){if(e.hasShift()&&4===i)return!(n.ctrlKey||n.altKey||n.metaKey);if(e.hasAlt()&&6===i)return!0;if(o.isMacintosh){if(e.hasCtrlCmd()&&57===i)return!0;if(e.hasWinCtrl()&&5===i)return!0}else{if(e.hasCtrlCmd()&&5===i)return!0;if(e.hasWinCtrl()&&57===i)return!0}return!1});if(s){var a=e.tree.getFocus();a&&e.elementSelected(a,t)}}}).clone()}).addClass("quick-open-widget").build(this.container),this.layoutDimensions&&this.layout(this.layoutDimensions),this.builder.getHTMLElement()},e.prototype.shouldOpenInBackground=function(e){return 17===e.keyCode&&(!(e.metaKey||e.ctrlKey||e.shiftKey||e.altKey)&&this.inputBox.inputElement.selectionStart===this.inputBox.value.length)},e.prototype.onType=function(){var e=this.inputBox.value;this.helpText&&(e?this.helpText.hide():this.helpText.show()),this.callbacks.onType(e)},e.prototype.navigate=function(e,t){this.isVisible&&(this.quickNavigateConfiguration||(this.quickNavigateConfiguration=t,this.tree.DOMFocus()),this.navigateInTree(e?18:16))},e.prototype.navigateInTree=function(e,t){var n=this.tree.getInput(),i=n?n.entries:[],o=this.tree.getFocus();switch(e){case 18:this.tree.focusNext();break;case 16:this.tree.focusPrevious();break;case 12:this.tree.focusNextPage();break;case 11:this.tree.focusPreviousPage();break;case 2:t?this.tree.focusPrevious():this.tree.focusNext()}var r=this.tree.getFocus();i.length>1&&o===r&&(16===e||2===e&&t?this.tree.focusLast():(18===e||2===e&&!t)&&this.tree.focusFirst()),r=this.tree.getFocus(),r&&this.tree.reveal(r).done(null,a.onUnexpectedError)},e.prototype.elementFocused=function(e,t){if(e&&this.isVisible()){this.inputElement.setAttribute("aria-activedescendant",this.treeElement.getAttribute("aria-activedescendant"));var n={event:t,keymods:this.extractKeyMods(t),quickNavigateConfiguration:this.quickNavigateConfiguration};this.model.runner.run(e,u.Mode.PREVIEW,n)}},e.prototype.elementSelected=function(e,t,n){var i=!0;if(this.isVisible()){var o=n||u.Mode.OPEN,r={event:t,keymods:this.extractKeyMods(t),quickNavigateConfiguration:this.quickNavigateConfiguration};i=this.model.runner.run(e,o,r)}if(this.usageLogger){var s=this.model.entries.indexOf(e),a=this.model.entries.length;this.usageLogger.publicLog("quickOpenWidgetItemAccepted",{index:s,count:a,isQuickNavigate:!!this.quickNavigateConfiguration})}i&&this.hide(w.ELEMENT_SELECTED)},e.prototype.extractKeyMods=function(e){var t=e&&(e.ctrlKey||e.metaKey||e.payload&&e.payload.originalEvent&&(e.payload.originalEvent.ctrlKey||e.payload.originalEvent.metaKey));return t?[2048]:[]},e.prototype.show=function(e,t){this.visible=!0,this.isLoosingFocus=!1,this.quickNavigateConfiguration=t?t.quickNavigateConfiguration:void 0,this.quickNavigateConfiguration?(this.inputContainer.hide(),this.builder.show(),this.tree.DOMFocus()):(this.inputContainer.show(),this.builder.show(),this.inputBox.focus()),this.helpText&&(this.quickNavigateConfiguration||s.isString(e)?this.helpText.hide():this.helpText.show()),s.isString(e)?this.doShowWithPrefix(e):this.doShowWithInput(e,t&&t.autoFocus?t.autoFocus:{}),this.callbacks.onShow&&this.callbacks.onShow()},e.prototype.doShowWithPrefix=function(e){this.inputBox.value=e,this.callbacks.onType(e)},e.prototype.doShowWithInput=function(e,t){this.setInput(e,t)},e.prototype.setInputAndLayout=function(e,t){var n=this;this.treeContainer.style({height:this.getHeight(e)+"px"}),this.tree.setInput(null).then(function(){return n.model=e,n.inputElement.setAttribute("aria-haspopup",String(e&&e.entries&&e.entries.length>0)),n.tree.setInput(e)}).done(function(){n.tree.layout(),e&&e.entries.some(function(t){return n.isElementVisible(e,t)})&&n.autoFocus(e,t)},a.onUnexpectedError)},e.prototype.isElementVisible=function(e,t){return!e.filter||e.filter.isVisible(t)},e.prototype.autoFocus=function(e,t){var n=this;void 0===t&&(t={});var i=e.entries.filter(function(t){return n.isElementVisible(e,t)});if(t.autoFocusPrefixMatch){for(var o=void 0,r=void 0,s=t.autoFocusPrefixMatch,u=s.toLowerCase(),l=0;lt.autoFocusIndex&&(this.tree.focusNth(t.autoFocusIndex),this.tree.reveal(this.tree.getFocus()).done(null,a.onUnexpectedError)):t.autoFocusSecondEntry?i.length>1&&this.tree.focusNth(1):t.autoFocusLastEntry&&i.length>1&&this.tree.focusLast()},e.prototype.refresh=function(e,t){var n=this;this.isVisible()&&(this.treeContainer.style({height:this.getHeight(e)+"px"}),this.tree.refresh().done(function(){n.tree.layout();var i=t&&e&&e.entries.some(function(t){return n.isElementVisible(e,t)});i&&!t.autoFocusPrefixMatch&&(i=!n.tree.getFocus()),i&&n.autoFocus(e,t)},a.onUnexpectedError))},e.prototype.getHeight=function(t){var n=this,i=t.renderer;if(!t){var o=i.getHeight(null);return this.options.minItemsToShow?this.options.minItemsToShow*o:0}var r,s=0;this.layoutDimensions&&this.layoutDimensions.height&&(r=.4*(this.layoutDimensions.height-50)),(!r||r>e.MAX_ITEMS_HEIGHT)&&(r=e.MAX_ITEMS_HEIGHT);for(var a=t.entries.filter(function(e){return n.isElementVisible(t,e)}),u=this.options.maxItemsToShow||a.length,l=0;ln?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.fontWeight,l=o(t.fontSize,n.DefaultConfig.editor.fontSize);l=s(l,0,100),0===l&&(l=n.DefaultConfig.editor.fontSize);var c=r(t.lineHeight,0);c=s(c,0,150),0===c&&(c=Math.round(n.GOLDEN_LINE_HEIGHT_RATIO*l));var d=1+.1*i.EditorZoom.getZoomLevel();return l*=d,c*=d,new e({fontFamily:a,fontWeight:u,fontSize:l,lineHeight:c})},e.prototype.getId=function(){return this.fontFamily+"-"+this.fontWeight+"-"+this.fontSize+"-"+this.lineHeight+"-"},e}();t.BareFontInfo=a;var u=function(e){function t(t){var n=e.call(this,t)||this;return n.isMonospace=t.isMonospace,n.typicalHalfwidthCharacterWidth=t.typicalHalfwidthCharacterWidth,n.typicalFullwidthCharacterWidth=t.typicalFullwidthCharacterWidth,n.spaceWidth=t.spaceWidth,n.maxDigitWidth=t.maxDigitWidth,n}return m(t,e),t.prototype.equals=function(e){return this.fontFamily===e.fontFamily&&this.fontWeight===e.fontWeight&&this.fontSize===e.fontSize&&this.lineHeight===e.lineHeight&&this.typicalHalfwidthCharacterWidth===e.typicalHalfwidthCharacterWidth&&this.typicalFullwidthCharacterWidth===e.typicalFullwidthCharacterWidth&&this.spaceWidth===e.spaceWidth&&this.maxDigitWidth===e.maxDigitWidth},t.prototype.clone=function(){return new t(this)},t}(a);t.FontInfo=u}),define(d[276],h([8,7]),function(e,t){return e.create("vs/editor/common/controller/cursor",t)}),define(d[277],h([8,7]),function(e,t){return e.create("vs/editor/common/model/textModelWithTokens",t)}),define(d[278],h([8,7]),function(e,t){return e.create("vs/editor/common/modes/modesRegistry",t)}),define(d[279],h([8,7]),function(e,t){return e.create("vs/editor/common/modes/snippetsRegistry",t)}),define(d[280],h([8,7]),function(e,t){return e.create("vs/editor/common/services/bulkEdit",t)}),define(d[281],h([0,1,280,26,91,4,27,6,46,3,20]),function(e,t,n,i,o,r,s,a,u,l,c){"use strict";function d(e,t,n,i,o){void 0===o&&(o=null);var r=h(e,t,i);return r.add(n),r.progress(o),r.finish()}function h(e,t,i){function o(e){l=e}function r(e){c.push.apply(c,e)}function s(){for(var e,t=0,i=c;t=0&&(t.splice(i,1),0===t.length&&n._commands.delete(e))}else r(t)&&n._commands.delete(e)}}},e.prototype.getCommand=function(e){var t=this._commands.get(e);return Array.isArray(t)?t[0]:t},e.prototype.getCommands=function(){var e=this,t=Object.create(null);return this._commands.forEach(function(n,i){t[i]=e.getCommand(i)}),t},e}()),t.NullCommandService={_serviceBrand:void 0,onWillExecuteCommand:function(){return{dispose:function(){}}},executeCommand:function(){return n.TPromise.as(void 0)}}}),define(d[336],h([0,1,10,27,6,3,16,17,23,44]),function(e,t,n,i,o,r,s,a,u,l){"use strict";function c(e){var t=[],i=s.LinkProviderRegistry.ordered(e).reverse().map(function(i){return a.asWinJsPromise(function(t){return i.provideLinks(e,t)}).then(function(e){if(Array.isArray(e)){var n=e.map(function(e){return new h(e,i)});t=d(t,n)}},n.onUnexpectedExternalError)});return o.TPromise.join(i).then(function(){return t})}function d(e,t){var n,i,o,s,a,u,l,c=[];for(n=0,o=0,i=e.length,s=t.length;n=0&&i.splice(e,1)}}},e.prototype.getMenuItems=function(e){var t=e.id;return this.menuItems[t]||[]},e}());var u=function(e){function t(t,n,i){var o=e.call(this,t,n)||this;return o._commandService=i,o}return m(t,e),t.prototype.run=function(){for(var e=[],t=0;t=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.keye.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.keye.key?1:this.valuee.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.value+"'"},e.prototype.keys=function(){return[this.key]},e}();t.ContextKeyEqualsExpr=a;var u=function(){function e(e,t){this.key=e,this.value=t}return e.prototype.getType=function(){return o.NotEquals},e.prototype.cmp=function(e){return this.keye.key?1:this.valuee.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 l(this.key):new s(this.key):this},e.prototype.serialize=function(){return"boolean"==typeof this.value?this.normalize().serialize():this.key+" != '"+this.value+"'"},e.prototype.keys=function(){return[this.key]},e}();t.ContextKeyNotEqualsExpr=u;var l=function(){function e(e){this.key=e}return e.prototype.getType=function(){return o.Not},e.prototype.cmp=function(e){return this.keye.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.ContextKeyNotExpr=l;var c=function(){function e(t){this.expr=e._normalizeArr(t)}return e.prototype.getType=function(){return o.And},e.prototype.equals=function(t){if(t instanceof e){if(this.expr.length!==t.expr.length)return!1;for(var n=0,i=this.expr.length;n0&&(r(0,o.light),a=!0),o.dark.length>0&&(r(1,o.dark),r(2,o.dark),a=!0),a){var u=_.getClassName(t,i);return n&&(u=u+" "+_.getClassName(n,i)),u}},e}();f._CSS_MAP={color:"color:{0} !important;",backgroundColor:"background-color:{0};",outline:"outline:{0};",outlineColor:"outline-color:{0};",outlineStyle:"outline-style:{0};",outlineWidth:"outline-width:{0};",border:"border:{0};",borderColor:"border-color:{0};",borderRadius:"border-radius:{0};",borderSpacing:"border-spacing:{0};",borderStyle:"border-style:{0};",borderWidth:"border-width:{0};",textDecoration:"text-decoration:{0};",cursor:"cursor:{0};",letterSpacing:"letter-spacing:{0};",gutterIconPath:"background:url('{0}') center center no-repeat;",gutterIconSize:"background-size:{0};",contentText:"content:'{0}';",contentIconPath:"content:url('{0}');",margin:"margin:{0};",width:"width:{0};",height:"height:{0};"},f.border_rules=["border","borderColor","borderColor","borderSpacing","borderStyle","borderWidth"];var g;!function(e){e[e.Light=0]="Light",e[e.Dark=1]="Dark",e[e.HighContrastBlack=2]="HighContrastBlack"}(g||(g={}));var v;!function(e){e[e.ClassName=0]="ClassName",e[e.InlineClassName=1]="InlineClassName",e[e.GlyphMarginClassName=2]="GlyphMarginClassName",e[e.BeforeContentClassName=3]="BeforeContentClassName",e[e.AfterContentClassName=4]="AfterContentClassName"}(v||(v={}));var _=function(){function e(){}return e._getSelectorPrefixOf=function(e){return 0===e?".monaco-editor.vs":1===e?".monaco-editor.vs-dark":".monaco-editor.hc-black"},e.getClassName=function(e,t){return"ced-"+e+"-"+t},e.getSelector=function(e,t,n,i){var o=this._getSelectorPrefixOf(e)+" ."+this.getClassName(t,i);return n&&(o=o+"."+this.getClassName(n,i)),3===i?o+="::before":4===i&&(o+="::after"),o},e.getDeletionSubstring=function(e){return".ced-"+e+"-"},e}()}),define(d[342],h([0,1,15,2]),function(e,t,n,i){"use strict";var o=function(){function e(e,t,n,i){this.viewModel=e,this.triggerCursorHandler=t,this.outgoingEvents=n,this.commandService=i}return e.prototype.paste=function(e,t,n){this.commandService.executeCommand(i.Handler.Paste,{text:t,pasteOnNewLine:n})},e.prototype.type=function(e,t){this.commandService.executeCommand(i.Handler.Type,{text:t})},e.prototype.replacePreviousChar=function(e,t,n){this.commandService.executeCommand(i.Handler.ReplacePreviousChar,{text:t,replaceCharCnt:n})},e.prototype.compositionStart=function(e){this.commandService.executeCommand(i.Handler.CompositionStart,{})},e.prototype.compositionEnd=function(e){this.commandService.executeCommand(i.Handler.CompositionEnd,{})},e.prototype.cut=function(e){this.commandService.executeCommand(i.Handler.Cut,{})},e.prototype._validateViewColumn=function(e){var t=this.viewModel.getLineMinColumn(e.lineNumber);return e.column=4?this.selectAll("mouse"):3===e.mouseDownCount?e.altKey?e.inSelectionMode?this.lastCursorLineSelectDrag("mouse",e.position):this.lastCursorLineSelect("mouse",e.position):e.inSelectionMode?this.lineSelectDrag("mouse",e.position):this.lineSelect("mouse",e.position):2===e.mouseDownCount?e.altKey?this.lastCursorWordSelect("mouse",e.position):e.inSelectionMode?this.wordSelectDrag("mouse",e.position):this.wordSelect("mouse",e.position):e.altKey?e.ctrlKey||e.metaKey||(e.shiftKey?this.columnSelect("mouse",e.position,e.mouseColumn):e.inSelectionMode?this.lastCursorMoveToSelect("mouse",e.position):this.createCursor("mouse",e.position,!1)):e.inSelectionMode?this.moveToSelect("mouse",e.position):this.moveTo("mouse",e.position)},e.prototype.moveTo=function(e,t){t=this._validateViewColumn(t),this.triggerCursorHandler(e,i.Handler.MoveTo,{position:this.convertViewToModelPosition(t),viewPosition:t})},e.prototype.moveToSelect=function(e,t){t=this._validateViewColumn(t),this.triggerCursorHandler(e,i.Handler.MoveToSelect,{position:this.convertViewToModelPosition(t),viewPosition:t})},e.prototype.columnSelect=function(e,t,n){t=this._validateViewColumn(t),this.triggerCursorHandler(e,i.Handler.ColumnSelect,{position:this.convertViewToModelPosition(t),viewPosition:t,mouseColumn:n})},e.prototype.createCursor=function(e,t,n){t=this._validateViewColumn(t),this.triggerCursorHandler(e,i.Handler.CreateCursor,{position:this.convertViewToModelPosition(t),viewPosition:t,wholeLine:n})},e.prototype.lastCursorMoveToSelect=function(e,t){t=this._validateViewColumn(t),this.triggerCursorHandler(e,i.Handler.LastCursorMoveToSelect,{position:this.convertViewToModelPosition(t),viewPosition:t})},e.prototype.wordSelect=function(e,t){t=this._validateViewColumn(t),this.triggerCursorHandler(e,i.Handler.WordSelect,{position:this.convertViewToModelPosition(t)})},e.prototype.wordSelectDrag=function(e,t){t=this._validateViewColumn(t),this.triggerCursorHandler(e,i.Handler.WordSelectDrag,{position:this.convertViewToModelPosition(t)})},e.prototype.lastCursorWordSelect=function(e,t){t=this._validateViewColumn(t),this.triggerCursorHandler(e,i.Handler.LastCursorWordSelect,{position:this.convertViewToModelPosition(t)})},e.prototype.lineSelect=function(e,t){t=this._validateViewColumn(t),this.triggerCursorHandler(e,i.Handler.LineSelect,{position:this.convertViewToModelPosition(t),viewPosition:t})},e.prototype.lineSelectDrag=function(e,t){t=this._validateViewColumn(t),this.triggerCursorHandler(e,i.Handler.LineSelectDrag,{position:this.convertViewToModelPosition(t),viewPosition:t})},e.prototype.lastCursorLineSelect=function(e,t){t=this._validateViewColumn(t),this.triggerCursorHandler(e,i.Handler.LastCursorLineSelect,{position:this.convertViewToModelPosition(t),viewPosition:t})},e.prototype.lastCursorLineSelectDrag=function(e,t){t=this._validateViewColumn(t),this.triggerCursorHandler(e,i.Handler.LastCursorLineSelectDrag,{position:this.convertViewToModelPosition(t),viewPosition:t})},e.prototype.selectAll=function(e){this.triggerCursorHandler(e,i.Handler.SelectAll,null)},e.prototype.convertViewToModelPosition=function(e){return this.viewModel.convertViewPositionToModelPosition(e.lineNumber,e.column)},e.prototype.emitKeyDown=function(e){this.outgoingEvents.emitKeyDown(e)},e.prototype.emitKeyUp=function(e){this.outgoingEvents.emitKeyUp(e)},e.prototype.emitContextMenu=function(e){this.outgoingEvents.emitContextMenu(e)},e.prototype.emitMouseMove=function(e){this.outgoingEvents.emitMouseMove(e)},e.prototype.emitMouseLeave=function(e){this.outgoingEvents.emitMouseLeave(e)},e.prototype.emitMouseUp=function(e){this.outgoingEvents.emitMouseUp(e)},e.prototype.emitMouseDown=function(e){this.outgoingEvents.emitMouseDown(e)},e}();t.ViewController=o}),define(d[162],h([0,1,9,3,2]),function(e,t,n,i,o){"use strict";function r(e){return e===s.IENarrator?l.EMPTY:a?d.EMPTY:c.EMPTY}var s;!function(e){e[e.IENarrator=0]="IENarrator",e[e.NVDA=1]="NVDA"}(s=t.TextAreaStrategy||(t.TextAreaStrategy={}));var a=!1;t.createTextAreaState=r;var u=function(){function e(e,t,n,i,o){this.previousState=e?e.shallowClone():null,this.value=t,this.selectionStart=n,this.selectionEnd=i,this.isInOverwriteMode=o}return e.prototype.updateComposition=function(){return this.previousState?{text:this.value,replaceCharCnt:this.previousState.selectionEnd-this.previousState.selectionStart}:{text:"",replaceCharCnt:0}},e.prototype.getSelectionStart=function(){return this.selectionStart},e.prototype.getValue=function(){return this.value},e.prototype.applyToTextArea=function(e,t,n){t.getValue()!==this.value&&t.setValue(e,this.value),n&&t.setSelectionRange(this.selectionStart,this.selectionEnd)},e.prototype.deduceInput=function(){if(!this.previousState)return{text:"",replaceCharCnt:0};var e=this.previousState.value,t=this.previousState.selectionStart,i=this.previousState.selectionEnd,o=this.value,r=this.selectionStart,s=this.selectionEnd,a=e.substring(i),u=o.substring(s),l=n.commonSuffixLength(a,u);o=o.substring(0,o.length-l),e=e.substring(0,e.length-l);var c=e.substring(0,t),d=o.substring(0,r),h=n.commonPrefixLength(c,d);if(o=o.substring(h),e=e.substring(h),r-=h,t-=h,s-=h,i-=h,r===s){if(e===o&&0===t&&i===e.length&&r===o.length&&o.indexOf("\n")===-1)return{text:"",replaceCharCnt:0};var p=c.length-h;return{text:o,replaceCharCnt:p}}var f=i-t;return{text:o,replaceCharCnt:f}},e}();t.TextAreaState=u;var l=function(e){function t(t,n,i,o,r,s){var a=e.call(this,t,n,i,o,r)||this;return a.selectionToken=s,a}return m(t,e),t.prototype.shallowClone=function(){return new t(null,this.value,this.selectionStart,this.selectionEnd,this.isInOverwriteMode,this.selectionToken)},t.prototype.toEmpty=function(){return t.EMPTY},t.prototype.toString=function(){return"[ <"+this.value+">, selectionStart: "+this.selectionStart+", selectionEnd: "+this.selectionEnd+", isInOverwriteMode: "+this.isInOverwriteMode+", selectionToken: "+this.selectionToken+"]"},t.prototype.toStrategy=function(e){return e===s.IENarrator?this:a?new d(this.previousState,this.value,this.selectionStart,this.selectionEnd,this.isInOverwriteMode):new c(this.previousState,this.value,this.selectionStart,this.selectionEnd,this.isInOverwriteMode)},t.prototype.equals=function(e){return e instanceof t&&(this.value===e.value&&this.selectionStart===e.selectionStart&&this.selectionEnd===e.selectionEnd&&this.isInOverwriteMode===e.isInOverwriteMode&&this.selectionToken===e.selectionToken)},t.prototype.fromTextArea=function(e){return new t(this,e.getValue(),e.getSelectionStart(),e.getSelectionEnd(),e.isInOverwriteMode(),this.selectionToken)},t.prototype.fromEditorSelection=function(e,n){var r=100,s=0,a=n.startLineNumber,u=n.startColumn,l=n.endLineNumber,c=n.endColumn,d=e.getLineMaxColumn(l);n.isEmpty()&&this.selectionToken!==a&&(u=1,c=d);var h="",p=Math.max(1,a-s);pr&&(h=h.substring(h.length-r,h.length));var f="",g=Math.min(l+s,e.getLineCount());f+=e.getValueInRange(new i.Range(l,c,l,d),o.EndOfLinePreference.LF),g>l&&(f="\n"+e.getValueInRange(new i.Range(l+1,1,g,e.getLineMaxColumn(g)),o.EndOfLinePreference.LF)),f.length>r&&(f=f.substring(0,r));var m=e.getValueInRange(new i.Range(a,u,l,c),o.EndOfLinePreference.LF);return m.length>2*r&&(m=m.substring(0,r)+String.fromCharCode(8230)+m.substring(m.length-r,m.length)),new t(this,h+m+f,h.length,h.length+m.length,!1,a)},t.prototype.fromText=function(e){return new t(this,e,0,e.length,!1,0)},t.prototype.resetSelection=function(){return new t(this.previousState,this.value,this.value.length,this.value.length,this.isInOverwriteMode,this.selectionToken)},t}(u);l.EMPTY=new l(null,"",0,0,!1,0),t.IENarratorTextAreaState=l;var c=function(e){function t(t,n,i,o,r){return e.call(this,t,n,i,o,r)||this}return m(t,e),t.prototype.shallowClone=function(){return new t(null,this.value,this.selectionStart,this.selectionEnd,this.isInOverwriteMode)},t.prototype.toEmpty=function(){return t.EMPTY},t.prototype.toString=function(){return"[ <"+this.value+">, selectionStart: "+this.selectionStart+", selectionEnd: "+this.selectionEnd+", isInOverwriteMode: "+this.isInOverwriteMode+"]"},t.prototype.toStrategy=function(e){return e===s.NVDA?this:new l(this.previousState,this.value,this.selectionStart,this.selectionEnd,this.isInOverwriteMode,0)},t.prototype.equals=function(e){return e instanceof t&&(this.value===e.value&&this.selectionStart===e.selectionStart&&this.selectionEnd===e.selectionEnd&&this.isInOverwriteMode===e.isInOverwriteMode)},t.prototype.fromTextArea=function(e){return new t(this,e.getValue(),e.getSelectionStart(),e.getSelectionEnd(),e.isInOverwriteMode())},t._getPageOfLine=function(e){return Math.floor((e-1)/t._LINES_PER_PAGE)},t._getRangeForPage=function(e){var n=e*t._LINES_PER_PAGE,o=n+1,r=n+t._LINES_PER_PAGE;return new i.Range(o,1,r,1073741824)},t.prototype.fromEditorSelection=function(e,n){var r=t._getPageOfLine(n.startLineNumber),s=t._getRangeForPage(r),a=t._getPageOfLine(n.endLineNumber),u=t._getRangeForPage(a),l=s.intersectRanges(new i.Range(1,1,n.startLineNumber,n.startColumn)),c=e.getValueInRange(l,o.EndOfLinePreference.LF),d=e.getLineCount(),h=e.getLineMaxColumn(d),p=u.intersectRanges(new i.Range(n.endLineNumber,n.endColumn,d,h)),f=e.getValueInRange(p,o.EndOfLinePreference.LF),g=null;if(r===a||r+1===a)g=e.getValueInRange(n,o.EndOfLinePreference.LF);else{var m=s.intersectRanges(n),v=u.intersectRanges(n);g=e.getValueInRange(m,o.EndOfLinePreference.LF)+String.fromCharCode(8230)+e.getValueInRange(v,o.EndOfLinePreference.LF)}var _=500;return c.length>_&&(c=c.substring(c.length-_,c.length)),f.length>_&&(f=f.substring(0,_)),g.length>2*_&&(g=g.substring(0,_)+String.fromCharCode(8230)+g.substring(g.length-_,g.length)),new t(this,c+g+f,c.length,c.length+g.length,!1)},t.prototype.fromText=function(e){return new t(this,e,0,e.length,!1)},t.prototype.resetSelection=function(){return new t(this.previousState,this.value,this.value.length,this.value.length,this.isInOverwriteMode)},t}(u);c.EMPTY=new c(null,"",0,0,!1),c._LINES_PER_PAGE=10,t.NVDAPagedTextAreaState=c;var d=function(e){function t(t,n,i,o,r){return e.call(this,t,n,i,o,r)||this}return m(t,e),t.prototype.shallowClone=function(){return new t(null,this.value,this.selectionStart,this.selectionEnd,this.isInOverwriteMode)},t.prototype.toEmpty=function(){return t.EMPTY},t.prototype.toString=function(){return"[ , selectionStart: "+this.selectionStart+", selectionEnd: "+this.selectionEnd+", isInOverwriteMode: "+this.isInOverwriteMode+"]"},t.prototype.toStrategy=function(e){return e===s.NVDA?this:new l(this.previousState,this.value,this.selectionStart,this.selectionEnd,this.isInOverwriteMode,0)},t.prototype.equals=function(e){return e instanceof t&&(this.value===e.value&&this.selectionStart===e.selectionStart&&this.selectionEnd===e.selectionEnd&&this.isInOverwriteMode===e.isInOverwriteMode)},t.prototype.fromTextArea=function(e){return new t(this,e.getValue(),e.getSelectionStart(),e.getSelectionEnd(),e.isInOverwriteMode())},t.prototype.fromEditorSelection=function(e,n){var r=e.getValueInRange(new i.Range(1,1,n.startLineNumber,n.startColumn),o.EndOfLinePreference.LF),s=e.getValueInRange(n,o.EndOfLinePreference.LF),a=e.getLineCount(),u=e.getLineMaxColumn(a),l=e.getValueInRange(new i.Range(n.endLineNumber,n.endColumn,a,u),o.EndOfLinePreference.LF);return new t(this,r+s+l,r.length,r.length+s.length,!1)},t.prototype.fromText=function(e){return new t(this,e,0,e.length,!1)},t.prototype.resetSelection=function(){return new t(this.previousState,this.value,this.value.length,this.value.length,this.isInOverwriteMode)},t}(u);d.EMPTY=new d(null,"",0,0,!1),t.NVDAFullTextAreaState=d}),define(d[344],h([0,1,17,9,12,4,162,3,2]),function(e,t,n,i,o,r,s,a,u){"use strict";var l;!function(e){e[e.Type=0]="Type",e[e.Paste=1]="Paste"}(l||(l={}));var c=navigator.userAgent.indexOf("Chrome/55.")>=0&&navigator.userAgent.indexOf("Edge/")===-1,d=function(e){function t(t,r,u,l,d){var h=e.call(this)||this;h._onKeyDown=h._register(new o.Emitter),h.onKeyDown=h._onKeyDown.event,h._onKeyUp=h._register(new o.Emitter),h.onKeyUp=h._onKeyUp.event,h._onCut=h._register(new o.Emitter),h.onCut=h._onCut.event,h._onPaste=h._register(new o.Emitter),h.onPaste=h._onPaste.event,h._onType=h._register(new o.Emitter),h.onType=h._onType.event,h._onCompositionStart=h._register(new o.Emitter),h.onCompositionStart=h._onCompositionStart.event,h._onCompositionUpdate=h._register(new o.Emitter),h.onCompositionUpdate=h._onCompositionUpdate.event,h._onCompositionEnd=h._register(new o.Emitter),h.onCompositionEnd=h._onCompositionEnd.event,h.Browser=t,h.textArea=u,h.model=l,h.flushAnyAccumulatedEvents=d,h.selection=new a.Range(1,1,1,1),h.selections=[new a.Range(1,1,1,1)],h._nextCommand=0,h.asyncTriggerCut=new n.RunOnceScheduler(function(){return h._onCut.fire()},0),h.lastCopiedValue=null,h.lastCopiedValueIsFromEmptySelection=!1,h.textAreaState=s.createTextAreaState(r),h.hasFocus=!1,h.lastCompositionEndTime=0,h._register(h.textArea.onKeyDown(function(e){return h._onKeyDownHandler(e)})),h._register(h.textArea.onKeyUp(function(e){return h._onKeyUp.fire(e)})),h._register(h.textArea.onKeyPress(function(e){return h._onKeyPressHandler(e)})),h.textareaIsShownAtCursor=!1,h._register(h.textArea.onCompositionStart(function(e){h.textareaIsShownAtCursor||(h.textareaIsShownAtCursor=!0,h.Browser.isEdgeOrIE||h.setTextAreaState("compositionstart",h.textAreaState.toEmpty(),!1),h._onCompositionStart.fire({showAtLineNumber:h.selection.startLineNumber,showAtColumn:h.selection.startColumn}))})),h._register(h.textArea.onCompositionUpdate(function(e){c&&(e={locale:e.locale,data:h.textArea.getValue()}),h.textAreaState=h.textAreaState.fromText(e.data);var t=h.textAreaState.updateComposition();h._onType.fire(t),h._onCompositionUpdate.fire(e)}));var p=function(){var e=h.textAreaState.fromTextArea(h.textArea),t=e.deduceInput();0===t.replaceCharCnt&&1===t.text.length&&i.isHighSurrogate(t.text.charCodeAt(0))||(h.textAreaState=e,0===h._nextCommand?""!==t.text&&h._onType.fire(t):(h.executePaste(t.text),h._nextCommand=0))};return h._register(h.textArea.onCompositionEnd(function(e){h.textAreaState=h.textAreaState.fromText(e.data);var n=h.textAreaState.updateComposition();h._onType.fire(n),(t.isEdgeOrIE||t.isChrome)&&(h.textAreaState=h.textAreaState.fromTextArea(h.textArea)),h.lastCompositionEndTime=(new Date).getTime(),h.textareaIsShownAtCursor&&(h.textareaIsShownAtCursor=!1,h._onCompositionEnd.fire())})),h._register(h.textArea.onInput(function(){h.textareaIsShownAtCursor||p()})),h._register(h.textArea.onCut(function(e){h.flushAnyAccumulatedEvents(),h._ensureClipboardGetsEditorSelection(e),h.asyncTriggerCut.schedule()})),h._register(h.textArea.onCopy(function(e){h.flushAnyAccumulatedEvents(),h._ensureClipboardGetsEditorSelection(e)})),h._register(h.textArea.onPaste(function(e){e.canUseTextData()?h.executePaste(e.getTextData()):(h.textArea.getSelectionStart()!==h.textArea.getSelectionEnd()&&h.setTextAreaState("paste",h.textAreaState.toEmpty(),!1),h._nextCommand=1)})),h._writePlaceholderAndSelectTextArea("ctor",!1),h}return m(t,e),t.prototype.dispose=function(){this.asyncTriggerCut.dispose(),e.prototype.dispose.call(this)},t.prototype.setStrategy=function(e){this.textAreaState=this.textAreaState.toStrategy(e)},t.prototype.setHasFocus=function(e){this.hasFocus!==e&&(this.hasFocus=e,this.hasFocus&&this._writePlaceholderAndSelectTextArea("focusgain",!1))},t.prototype.setCursorSelections=function(e,t){this.selection=e,this.selections=[e].concat(t),this._writePlaceholderAndSelectTextArea("selection changed",!1)},t.prototype.setTextAreaState=function(e,t,n){this.hasFocus||(t=t.resetSelection()),t.applyToTextArea(e,this.textArea,this.hasFocus||n),this.textAreaState=t},t.prototype._onKeyDownHandler=function(e){e.equals(9)&&e.preventDefault(),this._onKeyDown.fire(e)},t.prototype._onKeyPressHandler=function(e){!this.hasFocus},t.prototype.executePaste=function(e){if(""!==e){var t=!1;this.Browser.enableEmptySelectionClipboard&&(t=e===this.lastCopiedValue&&this.lastCopiedValueIsFromEmptySelection),this._onPaste.fire({text:e,pasteOnNewLine:t})}},t.prototype.focusTextArea=function(){this._writePlaceholderAndSelectTextArea("focusTextArea",!0)},t.prototype._writePlaceholderAndSelectTextArea=function(e,t){this.textareaIsShownAtCursor||(this.Browser.isIPad?this.setTextAreaState(e,this.textAreaState.toEmpty(),t):this.setTextAreaState(e,this.textAreaState.fromEditorSelection(this.model,this.selection),t))},t.prototype._ensureClipboardGetsEditorSelection=function(e){var t=this._getPlainTextToCopy();if(e.canUseTextData()?e.setTextData(t):this.setTextAreaState("copy or cut",this.textAreaState.fromText(t),!1),this.Browser.enableEmptySelectionClipboard){this.Browser.isFirefox?this.lastCopiedValue=t.replace(/\r\n/g,"\n"):this.lastCopiedValue=t;var n=this.selections;this.lastCopiedValueIsFromEmptySelection=1===n.length&&n[0].isEmpty()}},t.prototype._getPlainTextToCopy=function(){var e=this.model.getEOL(),t=this.selections;if(1===t.length){var n=t[0];if(n.isEmpty()){if(this.Browser.enableEmptySelectionClipboard){var i=this.model.convertViewPositionToModelPosition(n.startLineNumber,1).lineNumber;return this.model.getModelLineContent(i)+e}return""}return this.model.getValueInRange(n,u.EndOfLinePreference.TextDefined)}t=t.slice(0).sort(a.Range.compareRangesUsingStarts);for(var o=[],r=0;r=n)break;var o=e.charCodeAt(t);if(110===o||114===o)return!0;
-}}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=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;l0&&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),n.prototype._assertNotDisposed=function(){if(this._isDisposed)throw new Error("Model is disposed!")},n.prototype.isTooLargeForHavingAMode=function(){return this._assertNotDisposed(),this._shouldDenyMode},n.prototype.isTooLargeForHavingARichMode=function(){return this._assertNotDisposed(),this._shouldSimplifyMode},n.prototype.getOptions=function(){return this._assertNotDisposed(),this._options},n.prototype.updateOptions=function(e){this._assertNotDisposed();var t="undefined"!=typeof e.tabSize?e.tabSize:this._options.tabSize,n="undefined"!=typeof e.insertSpaces?e.insertSpaces:this._options.insertSpaces,i="undefined"!=typeof e.trimAutoWhitespace?e.trimAutoWhitespace:this._options.trimAutoWhitespace,o=new s.TextModelResolvedOptions({tabSize:t,insertSpaces:n,defaultEOL:this._options.defaultEOL,trimAutoWhitespace:i});if(!this._options.equals(o)){var r=this._options.createChangeEvent(o);if(this._options=o,r.tabSize)for(var a=this._options.tabSize,u=0,l=this._lines.length;u=t.LONG_LINE_BOUNDARY?r+=i:o+=i;return r>o},n.prototype.getLineCount=function(){return this._assertNotDisposed(),this._lines.length},n.prototype.getLineContent=function(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Error("Illegal value "+e+" for `lineNumber`");return this._lines[e-1].text},n.prototype.getIndentLevel=function(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Error("Illegal value "+e+" for `lineNumber`");return this._lines[e-1].getIndentLevel()},n.prototype._resetIndentRanges=function(){this._indentRanges=null},n.prototype._getIndentRanges=function(){return this._indentRanges||(this._indentRanges=d.computeRanges(this)),this._indentRanges},n.prototype.getIndentRanges=function(){this._assertNotDisposed();var e=this._getIndentRanges();return d.IndentRange.deepCloneArr(e)},n.prototype._toValidLineIndentGuide=function(e,t){var n=this._lines[e-1].getIndentLevel();if(n===-1)return t;var i=Math.ceil(n/this._options.tabSize);return Math.min(i,t)},n.prototype.getLineIndentGuide=function(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Error("Illegal value "+e+" for `lineNumber`");for(var t=this._getIndentRanges(),n=t.length-1;n>=0;n--){var i=t[n];if(i.startLineNumber===e)return this._toValidLineIndentGuide(e,Math.ceil(i.indent/this._options.tabSize));if(i.startLineNumber0;)n--,i=t[n],i.endLineNumber+1===e&&(o=i.indent);return this._toValidLineIndentGuide(e,Math.ceil(o/this._options.tabSize))}}return 0},n.prototype.getLinesContent=function(){this._assertNotDisposed();for(var e=[],t=0,n=this._lines.length;tthis.getLineCount())throw new Error("Illegal value "+e+" for `lineNumber`");return this._lines[e-1].text.length+1},n.prototype.getLineFirstNonWhitespaceColumn=function(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Error("Illegal value "+e+" for `lineNumber`");var t=i.firstNonWhitespaceIndex(this._lines[e-1].text);return t===-1?0:t+1},n.prototype.getLineLastNonWhitespaceColumn=function(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Error("Illegal value "+e+" for `lineNumber`");var t=i.lastNonWhitespaceIndex(this._lines[e-1].text);return t===-1?0:t+2},n.prototype.validateLineNumber=function(e){return this._assertNotDisposed(),e<1&&(e=1),e>this._lines.length&&(e=this._lines.length),e},n.prototype._validatePosition=function(e,t,n){var r=Math.floor("number"==typeof e?e:1),s=Math.floor("number"==typeof t?t:1);if(r<1)return new o.Position(1,1);if(r>this._lines.length)return new o.Position(this._lines.length,this.getLineMaxColumn(this._lines.length));if(s<=1)return new o.Position(r,1);var a=this.getLineMaxColumn(r);if(s>=a)return new o.Position(r,a);if(n){var u=this._lines[r-1].text.charCodeAt(s-2);if(i.isHighSurrogate(u))return new o.Position(r,s-1)}return new o.Position(r,s)},n.prototype.validatePosition=function(e){return this._assertNotDisposed(),this._validatePosition(e.lineNumber,e.column,!0)},n.prototype.validateRange=function(e){this._assertNotDisposed();var t=this._validatePosition(e.startLineNumber,e.startColumn,!1),n=this._validatePosition(e.endLineNumber,e.endColumn,!1),o=t.lineNumber,s=t.column,a=n.lineNumber,u=n.column,l=this._lines[o-1].text,c=this._lines[a-1].text,d=s>1?l.charCodeAt(s-2):0,h=u>1&&u<=c.length?c.charCodeAt(u-2):0,p=i.isHighSurrogate(d),f=i.isHighSurrogate(h);return p||f?o===a&&s===u?new r.Range(o,s-1,a,u-1):p&&f?new r.Range(o,s-1,a,u+1):p?new r.Range(o,s-1,a,u):new r.Range(o,s,a,u+1):new r.Range(o,s,a,u)},n.prototype.modifyPosition=function(e,t){return this._assertNotDisposed(),this.getPositionAt(this.getOffsetAt(e)+t)},n.prototype.getFullModelRange=function(){this._assertNotDisposed();var e=this.getLineCount();return new r.Range(1,1,e,this.getLineMaxColumn(e))},n.prototype._emitModelContentChangedFlushEvent=function(e){this._isDisposing||this.emit(s.EventType.ModelRawContentChanged,e)},n.toRawText=function(e,t){for(var n=0,o=-1;(o=e.indexOf("\r",o+1))!==-1;)n++;var r=i.containsRTL(e),a=!r&&i.isBasicASCII(e),l=e.split(/\r\n|\r|\n/),c="";i.startsWithUTF8BOM(l[0])&&(c=i.UTF8_BOM_CHARACTER,l[0]=l[0].substr(1));var d=l.length-1,h="";h=0===d?t.defaultEOL===s.DefaultEndOfLine.LF?"\n":"\r\n":n>d/2?"\r\n":"\n";var p;if(t.detectIndentation){var f=u.guessIndentation(l,t.tabSize,t.insertSpaces);p=new s.TextModelResolvedOptions({tabSize:f.tabSize,insertSpaces:f.insertSpaces,trimAutoWhitespace:t.trimAutoWhitespace,defaultEOL:t.defaultEOL})}else p=new s.TextModelResolvedOptions({tabSize:t.tabSize,insertSpaces:t.insertSpaces,trimAutoWhitespace:t.trimAutoWhitespace,defaultEOL:t.defaultEOL});return{BOM:c,EOL:h,lines:l,length:e.length,containsRTL:r,isBasicASCII:a,options:p}},n.prototype._constructLines=function(e){for(var t=e.options.tabSize,n=e.lines,i=[],o=0,r=n.length;o=o.length)&&n.isLowSurrogate(o.charCodeAt(i))},e.isHighSurrogate=function(e,t,i){var o=e.getLineContent(t);return!(i<0||i>=o.length)&&n.isHighSurrogate(o.charCodeAt(i))},e.isInsideSurrogatePair=function(e,t,n){return this.isHighSurrogate(e,t,n-2)},e.visibleColumnFromColumn=function(e,t,n){var i=e.length;i>t-1&&(i=t-1);for(var o=0,r=0;r=t){var u=t-o,l=a-t;return ls?s:o},e.nextTabStop=function(e,t){return e+t-e%t},e.prevTabStop=function(e,t){return e-1-(e-1)%t},e}();t.CursorColumns=c}),define(d[349],h([0,1,9,41,3,20,38]),function(e,t,n,i,o,r,s){"use strict";var a=function(){function e(e,t){this._opts=t,this._selection=e,this._useLastEditRangeForCursorEndPosition=!1}return e.unshiftIndentCount=function(e,t,n){var o=i.CursorColumns.visibleColumnFromColumn(e,t,n),r=i.CursorColumns.prevTabStop(o,n);return r/n},e.shiftIndentCount=function(e,t,n){var o=i.CursorColumns.visibleColumnFromColumn(e,t,n),r=i.CursorColumns.nextTabStop(o,n);return r/n},e.prototype.getEditOperations=function(t,r){var a=this._selection.startLineNumber,u=this._selection.endLineNumber;1===this._selection.endColumn&&a!==u&&(u-=1);var l,c=this._opts.tabSize,d=this._opts.oneIndent,h=a===u,p=["",d];this._selection.isEmpty()&&/^\s*$/.test(t.getLineContent(a))&&(this._useLastEditRangeForCursorEndPosition=!0);var f=0,g=0;for(l=a;l<=u;l++,f=g){g=0;var m=t.getLineContent(l),v=n.firstNonWhitespaceIndex(m);if((!this._opts.isUnshift||0!==m.length&&0!==v)&&(h||this._opts.isUnshift||0!==m.length)){if(v===-1&&(v=m.length),l>1){var _=i.CursorColumns.visibleColumnFromColumn(m,v+1,c);if(_%c!==0){var y=s.LanguageConfigurationRegistry.getRawEnterActionAtPosition(t,l-1,t.getLineMaxColumn(l-1));if(y){if(g=f,y.appendText)for(var C=0,b=y.appendText.length;Ca,d=s>u,h=su)continue;if(ys)continue;if(_1&&o--,this.columnSelect(e,t,n.selection.getStartPosition(),i,o)},e.columnSelectRight=function(e,t,n,r,s){for(var a=0,u=Math.min(n.position.lineNumber,r),l=Math.max(n.position.lineNumber,r),c=u;c<=l;c++){var d=t.getLineMaxColumn(c),h=o.CursorColumns.visibleColumnFromColumn2(e,t,new i.Position(c,d));a=Math.max(a,h)}return st.getLineCount()&&(o=t.getLineCount()),this.columnSelect(e,t,n.selection.getStartPosition(),o,r)},e}();t.ColumnSelection=r}),define(d[96],h([0,1,41,2,15,3]),function(e,t,n,i,o,r){"use strict";var s=function(){function e(e,t,n){this.lineNumber=e,this.column=t,this.leftoverVisibleColumns=n}return e}();t.CursorPosition=s;var a=function(){function e(e,t,n){this.state=e,this.ensureInEditableRange=t,this.reason=n}return e.fromMove=function(t,n,i,r,s,a,u){return new e(t.move(n,new o.Position(i,r),s),a,u)},e}();t.SingleMoveOperationResult=a;var u=function(){function e(){}return e.left=function(e,t,i,o){return o>t.getLineMinColumn(i)?o-=n.CursorColumns.isLowSurrogate(t,i,o-2)?2:1:i>1&&(i-=1,o=t.getLineMaxColumn(i)),new s(i,o,0)},e.moveLeft=function(t,n,o,r,s){var u,l;if(o.hasSelection()&&!r)u=o.selection.startLineNumber,l=o.selection.startColumn;else{var c=e.left(t,n,o.position.lineNumber,o.position.column-(s-1));u=c.lineNumber,l=c.column}return a.fromMove(o,r,u,l,0,!0,i.CursorChangeReason.Explicit)},e.right=function(e,t,i,o){return oc?(i=c,u?o=t.getLineMaxColumn(i):(o=Math.min(t.getLineMaxColumn(i),o),n.CursorColumns.isInsideSurrogatePair(t,i,o)&&(o-=1))):(o=n.CursorColumns.columnFromVisibleColumn2(e,t,i,l),n.CursorColumns.isInsideSurrogatePair(t,i,o)&&(o-=1)),r=l-n.CursorColumns.visibleColumnFromColumn(t.getLineContent(i),o,e.tabSize),new s(i,o,r)},e.moveDown=function(t,n,o,r,s){var u,l;o.hasSelection()&&!r?(u=o.selection.endLineNumber,l=o.selection.endColumn):(u=o.position.lineNumber,l=o.position.column);var c=e.down(t,n,u,l,o.leftoverVisibleColumns,s,!0);return a.fromMove(o,r,c.lineNumber,c.column,c.leftoverVisibleColumns,!0,i.CursorChangeReason.Explicit)},e.translateDown=function(t,s,u){var l=u.selection,c=e.down(t,s,l.selectionStartLineNumber,l.selectionStartColumn,u.selectionStartLeftoverVisibleColumns,1,!1),d=e.down(t,s,l.positionLineNumber,l.positionColumn,u.leftoverVisibleColumns,1,!1),h=new n.SingleCursorState(new r.Range(c.lineNumber,c.column,c.lineNumber,c.column),c.leftoverVisibleColumns,new o.Position(d.lineNumber,d.column),d.leftoverVisibleColumns);return new a(h,!0,i.CursorChangeReason.Explicit)},e.up=function(e,t,i,o,r,a,u){var l=n.CursorColumns.visibleColumnFromColumn(t.getLineContent(i),o,e.tabSize)+r;return i-=a,i<1?(i=1,u?o=t.getLineMinColumn(i):(o=Math.min(t.getLineMaxColumn(i),o),n.CursorColumns.isInsideSurrogatePair(t,i,o)&&(o-=1))):(o=n.CursorColumns.columnFromVisibleColumn2(e,t,i,l),n.CursorColumns.isInsideSurrogatePair(t,i,o)&&(o-=1)),r=l-n.CursorColumns.visibleColumnFromColumn(t.getLineContent(i),o,e.tabSize),new s(i,o,r)},e.moveUp=function(t,n,o,r,s){var u,l;o.hasSelection()&&!r?(u=o.selection.startLineNumber,l=o.selection.startColumn):(u=o.position.lineNumber,l=o.position.column);var c=e.up(t,n,u,l,o.leftoverVisibleColumns,s,!0);return a.fromMove(o,r,c.lineNumber,c.column,c.leftoverVisibleColumns,!0,i.CursorChangeReason.Explicit)},e.translateUp=function(t,s,u){var l=u.selection,c=e.up(t,s,l.selectionStartLineNumber,l.selectionStartColumn,u.selectionStartLeftoverVisibleColumns,1,!1),d=e.up(t,s,l.positionLineNumber,l.positionColumn,u.leftoverVisibleColumns,1,!1),h=new n.SingleCursorState(new r.Range(c.lineNumber,c.column,c.lineNumber,c.column),c.leftoverVisibleColumns,new o.Position(d.lineNumber,d.column),d.leftoverVisibleColumns);return new a(h,!0,i.CursorChangeReason.Explicit)},e.moveToBeginningOfLine=function(e,t,n,o){var r,s=n.position.lineNumber,u=t.getLineMinColumn(s),l=t.getLineFirstNonWhitespaceColumn(s)||u,c=n.position.column;return r=c===l?u:l,a.fromMove(n,o,s,r,0,!0,i.CursorChangeReason.Explicit)},e.moveToEndOfLine=function(e,t,n,o){var r=n.position.lineNumber,s=t.getLineMaxColumn(r);return a.fromMove(n,o,r,s,0,!0,i.CursorChangeReason.Explicit)},e.moveToBeginningOfBuffer=function(e,t,n,o){return a.fromMove(n,o,1,1,0,!0,i.CursorChangeReason.Explicit)},e.moveToEndOfBuffer=function(e,t,n,o){var r=t.getLineCount(),s=t.getLineMaxColumn(r);return a.fromMove(n,o,r,s,0,!0,i.CursorChangeReason.Explicit)},e}();t.MoveOperations=u}),define(d[172],h([0,1,54,41,3,96,9]),function(e,t,n,i,o,r,s){"use strict";var a=function(){function e(){}
-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.lineNumber1?(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=0;o--){var r=e.charCodeAt(o),s=t.get(r);if(0===s){if(2===i)return this._createWord(e,i,o+1,this._findEndOfWord(e,t,i,o+1));i=1}else if(2===s){if(1===i)return this._createWord(e,i,o+1,this._findEndOfWord(e,t,i,o+1));i=2}else if(1===s&&0!==i)return this._createWord(e,i,o+1,this._findEndOfWord(e,t,i,o+1))}return 0!==i?this._createWord(e,i,0,this._findEndOfWord(e,t,i,0)):null},e._findEndOfWord=function(e,t,n,i){for(var o=e.length,r=i;r=0;o--){var r=e.charCodeAt(o),s=t.get(r);if(1===s)return o+1;if(1===n&&2===s)return o+1;if(2===n&&0===s)return o+1}return 0},e.moveWordLeft=function(t,n,o,a,u){var l=o.position,c=l.lineNumber,d=l.column;1===d&&c>1&&(c-=1,d=n.getLineMaxColumn(c));var h=e.findPreviousWordOnLine(t,n,new i.Position(c,d));return 0===u?d=h?h.start+1:1:(h&&d<=h.end+1&&(h=e.findPreviousWordOnLine(t,n,new i.Position(c,h.start+1))),d=h?h.end+1:1),r.SingleMoveOperationResult.fromMove(o,a,c,d,0,!0,s.CursorChangeReason.Explicit)},e.moveWordRight=function(t,n,o,a,u){var l=o.position,c=l.lineNumber,d=l.column;d===n.getLineMaxColumn(c)&&c=h.start+1&&(h=e.findNextWordOnLine(t,n,new i.Position(c,h.end+1))),d=h?h.start+1:n.getLineMaxColumn(c)),r.SingleMoveOperationResult.fromMove(o,a,c,d,0,!0,s.CursorChangeReason.Explicit)},e._deleteWordLeftWhitespace=function(e,t,i){var o=i.position,r=t.getLineContent(o.lineNumber),s=o.column-2,a=u.lastNonWhitespaceIndex(r,s);if(a+1=_.start+1&&(_=e.findNextWordOnLine(t,o,new i.Position(p,_.end+1))),_?f=_.start+1:ft.endLineNumber||e.lineNumber===t.endLineNumber&&e.column>t.endColumn?new o.Position(t.endLineNumber,t.endColumn):e},e.prototype._setState=function(e,t,n){var o=this.model.validateRange(e.selectionStart),r=e.selectionStart.equalsRange(o)?e.selectionStartLeftoverVisibleColumns:0,s=this.model.validatePosition(e.position);n&&(s=this._ensureInEditableRange(s));var a=e.position.equals(s)?e.leftoverVisibleColumns:0;e=new i.SingleCursorState(o,r,s,a);var u=this.viewModelHelper.validateViewRange(t.selectionStart,e.selectionStart),l=this.viewModelHelper.validateViewPosition(t.position,e.position);t=new i.SingleCursorState(u,r,l,a),this.modelState&&this.viewState&&this.modelState.equals(e)&&this.viewState.equals(t)||(this.modelState=e,this.viewState=t,this._selStartMarker=this._ensureMarker(this._selStartMarker,this.modelState.selection.startLineNumber,this.modelState.selection.startColumn,!0),this._selEndMarker=this._ensureMarker(this._selEndMarker,this.modelState.selection.endLineNumber,this.modelState.selection.endColumn,!1))},e.prototype._ensureMarker=function(e,t,n,i){return e?(this.model._changeMarker(e,t,n),this.model._changeMarkerStickiness(e,i),e):this.model._addMarker(0,t,n,i)},e.prototype.saveState=function(){return{selectionStart:this.modelState.selectionStart,viewSelectionStart:this.viewState.selectionStart,position:this.modelState.position,viewPosition:this.viewState.position,leftoverVisibleColumns:this.modelState.leftoverVisibleColumns,selectionStartLeftoverVisibleColumns:this.modelState.selectionStartLeftoverVisibleColumns}},e.prototype.restoreState=function(e){var t,n=this.model.validatePosition(e.position);t=e.selectionStart?this.model.validateRange(e.selectionStart):new r.Range(n.lineNumber,n.column,n.lineNumber,n.column);var s,a=this.viewModelHelper.validateViewPosition(new o.Position(e.viewPosition.lineNumber,e.viewPosition.column),n);s=e.viewSelectionStart?this.viewModelHelper.validateViewRange(new r.Range(e.viewSelectionStart.startLineNumber,e.viewSelectionStart.startColumn,e.viewSelectionStart.endLineNumber,e.viewSelectionStart.endColumn),t):this.viewModelHelper.convertModelRangeToViewRange(t),this._setState(new i.SingleCursorState(t,e.selectionStartLeftoverVisibleColumns,n,e.leftoverVisibleColumns),new i.SingleCursorState(s,e.selectionStartLeftoverVisibleColumns,a,e.leftoverVisibleColumns),!1)},e.prototype.updateModeConfiguration=function(e){this.modeConfiguration=e,this._recreateCursorConfig()},e.prototype.duplicate=function(){var t=new e(this.model,this.configuration,this.modeConfiguration,this.viewModelHelper);return t._setState(this.modelState,this.viewState,!1),t},e.prototype.dispose=function(){this._modelOptionsListener.dispose(),this._configChangeListener.dispose(),this.model._removeMarker(this._selStartMarker),this.model._removeMarker(this._selEndMarker)},e.prototype.setSelection=function(e,t){void 0===t&&(t=null);var n,s,a=this.model.validatePosition({lineNumber:e.positionLineNumber,column:e.positionColumn}),u=this.model.validatePosition({lineNumber:e.selectionStartLineNumber,column:e.selectionStartColumn});t?(n=this.viewModelHelper.validateViewPosition(new o.Position(t.positionLineNumber,t.positionColumn),a),s=this.viewModelHelper.validateViewPosition(new o.Position(t.selectionStartLineNumber,t.selectionStartColumn),u)):(n=this.viewModelHelper.convertModelPositionToViewPosition(a.lineNumber,a.column),s=this.viewModelHelper.convertModelPositionToViewPosition(u.lineNumber,u.column)),this._setState(new i.SingleCursorState(new r.Range(u.lineNumber,u.column,u.lineNumber,u.column),0,a,0),new i.SingleCursorState(new r.Range(s.lineNumber,s.column,s.lineNumber,s.column),0,n,0),!1)},e.prototype.setSelectionStart=function(e){this._setState(this.modelState.withSelectionStart(e),this.viewState.withSelectionStart(this.viewModelHelper.convertModelRangeToViewRange(e)),!1)},e.prototype.collapseSelection=function(){this._setState(this.modelState.collapse(),this.viewState.collapse(),!1)},e.prototype.moveModelPosition=function(e,t,n,i,o){var r=this.viewModelHelper.convertModelPositionToViewPosition(t,n);this._move(e,t,n,r.lineNumber,r.column,i,o)},e.prototype.moveViewPosition=function(e,t,n,i,o){var r=this.viewModelHelper.convertViewToModelPosition(t,n);this._move(e,r.lineNumber,r.column,t,n,i,o)},e.prototype._move=function(e,t,n,i,r,s,a){this._setState(this.modelState.move(e,new o.Position(t,n),s),this.viewState.move(e,new o.Position(i,r),s),a)},e.prototype.setState=function(e,t,n){this._setState(e,t,n)},e.prototype.beginRecoverSelectionFromMarkers=function(){var e=this.model._getMarker(this._selStartMarker),t=this.model._getMarker(this._selEndMarker);return this.modelState.selection.getDirection()===s.SelectionDirection.LTR?new s.Selection(e.lineNumber,e.column,t.lineNumber,t.column):new s.Selection(t.lineNumber,t.column,e.lineNumber,e.column)},e.prototype.endRecoverSelectionFromMarkers=function(e,t){e.cursorPositionChangeReason=a.CursorChangeReason.RecoverFromMarkers,e.shouldPushStackElementBefore=!0,e.shouldPushStackElementAfter=!0,e.shouldReveal=!1,e.shouldRevealHorizontal=!1;var n=new r.Range(t.selectionStartLineNumber,t.selectionStartColumn,t.selectionStartLineNumber,t.selectionStartColumn),s=new o.Position(t.positionLineNumber,t.positionColumn),u=this.viewModelHelper.convertModelRangeToViewRange(n),l=this.viewModelHelper.convertViewToModelPosition(s.lineNumber,s.column);return this._setState(new i.SingleCursorState(n,0,s,0),new i.SingleCursorState(u,0,l,0),!1),!0},e.prototype.setSelectionStartLeftoverVisibleColumns=function(e){this._setState(this.modelState.withSelectionStartLeftoverVisibleColumns(e),this.viewState.withSelectionStartLeftoverVisibleColumns(e),!1)},e.prototype.validatePosition=function(e){return this.model.validatePosition(e)},e.prototype.validateViewPosition=function(e,t,n){return this.viewModelHelper.validateViewPosition(new o.Position(e,t),n)},e.prototype.convertViewSelectionToModelSelection=function(e){return this.viewModelHelper.convertViewSelectionToModelSelection(e)},e.prototype.convertViewToModelPosition=function(e,t){return this.viewModelHelper.convertViewToModelPosition(e,t)},e.prototype.convertModelPositionToViewPosition=function(e,t){return this.viewModelHelper.convertModelPositionToViewPosition(e,t)},e.prototype.getRangeToRevealModelLinesBeforeViewPortTop=function(e){var t,n=this.viewModelHelper.getCurrentCompletelyVisibleModelLinesRangeInViewport();t=this.model.getLineMinColumn(n.startLineNumber)!==n.startColumn?n.startLineNumber:n.startLineNumber-1,t-=e-1,t=this.model.validateRange({startLineNumber:t,startColumn:1,endLineNumber:t,endColumn:1}).startLineNumber;var i=this.model.getLineMinColumn(t),o=this.model.getLineMaxColumn(n.startLineNumber);return new r.Range(t,i,t,o)},e.prototype.getRangeToRevealModelLinesAfterViewPortBottom=function(e){var t=this.viewModelHelper.getCurrentCompletelyVisibleModelLinesRangeInViewport(),n=t.endLineNumber+(e-1);n=this.model.validateRange({startLineNumber:n,startColumn:1,endLineNumber:n,endColumn:1}).startLineNumber;var i=this.model.getLineMinColumn(n),o=this.model.getLineMaxColumn(n);return new r.Range(n,i,n,o)},e.prototype.getLineFromViewPortTop=function(e){void 0===e&&(e=1);var t=this.viewModelHelper.getCurrentCompletelyVisibleModelLinesRangeInViewport(),n=this.model.getLineMinColumn(t.startLineNumber),i=t.startColumn===n?t.startLineNumber:t.startLineNumber+1;return i=i+e-1,i>t.endLineNumber?t.endLineNumber:i},e.prototype.getCenterLineInViewPort=function(){return Math.round((this.getLineFromViewPortTop()+this.getLineFromViewPortBottom()-1)/2)},e.prototype.getLineFromViewPortBottom=function(e){void 0===e&&(e=1);var t=this.viewModelHelper.getCurrentCompletelyVisibleModelLinesRangeInViewport(),n=t.endLineNumber-(e-1);return n>t.startLineNumber?n:this.getLineFromViewPortTop()},e.prototype.isLastLineVisibleInViewPort=function(){return this.viewModel.getLineCount()<=this.getCompletelyVisibleViewLinesRangeInViewport().getEndPosition().lineNumber},e.prototype.getCompletelyVisibleViewLinesRangeInViewport=function(){return this.viewModelHelper.getCurrentCompletelyVisibleViewLinesRangeInViewport()},e.prototype.getRevealViewLinesRangeInViewport=function(){var e=this.getCompletelyVisibleViewLinesRangeInViewport().cloneRange();return!this.isLastLineVisibleInViewPort()&&e.endLineNumber>e.startLineNumber&&(e=new r.Range(e.startLineNumber,e.startColumn,e.endLineNumber-1,this.viewModel.getLineLastNonWhitespaceColumn(e.endLineNumber-1))),e},e.prototype.getNearestRevealViewPositionInViewport=function(){var e=this.viewState.position,t=this.getRevealViewLinesRangeInViewport();return e.lineNumbert.endLineNumber?new o.Position(t.endLineNumber,this.viewModel.getLineFirstNonWhitespaceColumn(t.endLineNumber)):e},e}();t.OneCursor=d;var h=function(){function e(){}return e.moveTo=function(e,t,n,i,o,r){var s,u=e.model.validatePosition(n);s=i?e.validateViewPosition(i.lineNumber,i.column,u):e.convertModelPositionToViewPosition(u.lineNumber,u.column);var l="mouse"===o?a.CursorChangeReason.Explicit:a.CursorChangeReason.NotSet;return"api"===o&&(r.shouldRevealVerticalInCenter=!0),l&&(r.cursorPositionChangeReason=l),e.moveViewPosition(t,s.lineNumber,s.column,0,!1),!0},e._getViewHalfLineSize=function(e,t){return Math.round((e.viewModel.getLineMaxColumn(t)-e.viewModel.getLineMinColumn(t))/2)},e.move=function(e,t,i,o){t.to||n.illegalArgument("to");var r,s=!!t.select,u=e.viewState.position,l=u.lineNumber;switch(t.to){case a.CursorMovePosition.Left:return this._moveLeft(e,s,a.CursorMoveByUnit.HalfLine===t.by?this._getViewHalfLineSize(e,l):t.value,o);case a.CursorMovePosition.Right:return this._moveRight(e,s,a.CursorMoveByUnit.HalfLine===t.by?this._getViewHalfLineSize(e,l):t.value,o);case a.CursorMovePosition.Up:return this._moveUp(e,t,o);case a.CursorMovePosition.Down:return this._moveDown(e,t,o);case a.CursorMovePosition.WrappedLineStart:r=e.viewModel.getLineMinColumn(l);break;case a.CursorMovePosition.WrappedLineFirstNonWhitespaceCharacter:r=e.viewModel.getLineFirstNonWhitespaceColumn(l);break;case a.CursorMovePosition.WrappedLineColumnCenter:r=Math.round((e.viewModel.getLineMaxColumn(l)+e.viewModel.getLineMinColumn(l))/2);break;case a.CursorMovePosition.WrappedLineEnd:r=e.viewModel.getLineMaxColumn(l);break;case a.CursorMovePosition.WrappedLineLastNonWhitespaceCharacter:r=e.viewModel.getLineLastNonWhitespaceColumn(l);break;case a.CursorMovePosition.ViewPortTop:l=e.convertModelPositionToViewPosition(e.getLineFromViewPortTop(t.value),1).lineNumber,r=e.viewModel.getLineFirstNonWhitespaceColumn(l);break;case a.CursorMovePosition.ViewPortBottom:l=e.convertModelPositionToViewPosition(e.getLineFromViewPortBottom(t.value),1).lineNumber,r=e.viewModel.getLineFirstNonWhitespaceColumn(l);break;case a.CursorMovePosition.ViewPortCenter:l=e.convertModelPositionToViewPosition(e.getCenterLineInViewPort(),1).lineNumber,r=e.viewModel.getLineFirstNonWhitespaceColumn(l);break;case a.CursorMovePosition.ViewPortIfOutside:var c=e.getNearestRevealViewPositionInViewport();l=c.lineNumber,r=c.column;break;default:return!1}return o.cursorPositionChangeReason=a.CursorChangeReason.Explicit,e.moveViewPosition(s,l,r,0,!0),!0},e._applyMoveOperationResult=function(e,t,n){return t.cursorPositionChangeReason=n.reason,e.setState(n.modelState,n.viewState,n.ensureInEditableRange),!0},e._fromModelCursorState=function(e,t){var n=e.convertModelPositionToViewPosition(t.state.selectionStart.startLineNumber,t.state.selectionStart.startColumn),o=e.convertModelPositionToViewPosition(t.state.selectionStart.endLineNumber,t.state.selectionStart.endColumn),s=new r.Range(n.lineNumber,n.column,o.lineNumber,o.column),a=e.convertModelPositionToViewPosition(t.state.position.lineNumber,t.state.position.column);return new c(t.state,new i.SingleCursorState(s,t.state.selectionStartLeftoverVisibleColumns,a,t.state.leftoverVisibleColumns),t.ensureInEditableRange,t.reason)},e._fromViewCursorState=function(e,t){var n=e.convertViewToModelPosition(t.state.selectionStart.startLineNumber,t.state.selectionStart.startColumn),o=e.convertViewToModelPosition(t.state.selectionStart.endLineNumber,t.state.selectionStart.endColumn),s=new r.Range(n.lineNumber,n.column,o.lineNumber,o.column),a=e.convertViewToModelPosition(t.state.position.lineNumber,t.state.position.column);return new c(new i.SingleCursorState(s,t.state.selectionStartLeftoverVisibleColumns,a,t.state.leftoverVisibleColumns),t.state,t.ensureInEditableRange,t.reason)},e._moveLeft=function(e,t,n,i){return void 0===n&&(n=1),this._applyMoveOperationResult(e,i,this._fromViewCursorState(e,u.MoveOperations.moveLeft(e.config,e.viewModel,e.viewState,t,n)))},e.moveWordLeft=function(e,t,n,i){
-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.lineNumberl){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.configuration=t,this.viewModelHelper=n,this.modeConfiguration=this.getModeConfiguration(),this.primaryCursor=new i.OneCursor(this.model,this.configuration,this.modeConfiguration,this.viewModelHelper),this.secondaryCursors=[],this.lastAddedCursorIndex=0}return e.prototype.dispose=function(){this.primaryCursor.dispose(),this.killSecondaryCursors()},e.prototype.ensureValidState=function(){this.primaryCursor.ensureValidState();for(var e=0,t=this.secondaryCursors.length;e0},e.prototype.normalize=function(){this._mergeCursorsIfNecessary()},e.prototype.addSecondaryCursor=function(e){var t=new i.OneCursor(this.model,this.configuration,this.modeConfiguration,this.viewModelHelper);e&&t.setSelection(e),this.secondaryCursors.push(t),this.lastAddedCursorIndex=this.secondaryCursors.length},e.prototype.duplicateCursors=function(){var e=[];e.push(this.primaryCursor.duplicate());for(var t=0,n=this.secondaryCursors.length;ti)for(var a=n-i,s=0;s=e+1&&this.lastAddedCursorIndex--,this.secondaryCursors[e].dispose(),this.secondaryCursors.splice(e,1)},e.prototype._mergeCursorsIfNecessary=function(){if(0!==this.secondaryCursors.length){for(var e=this.getAll(),t=[],n=0;nd&&t[C].index--;e.splice(d,1),t.splice(c,1),this._removeSecondaryCursor(d-1),i--}}}},e.prototype.getModeConfiguration=function(){var e,t={electricChars:{},autoClosingPairsOpen:{},autoClosingPairsClose:{},surroundingPairs:{}},i=null;try{i=r.LanguageConfigurationRegistry.getElectricCharacters(this.model.getLanguageIdentifier().id)}catch(e){n.onUnexpectedError(e),i=null}if(i)for(e=0;e50&&(this.cursorUndoStack=this.cursorUndoStack.splice(0,this.cursorUndoStack.length-50)),this.emitCursorPositionChanged(g,u),l&&this.revealRange(h,c?1:0,d),this.emitCursorSelectionChanged(g,u))}catch(e){o.onUnexpectedError(e)}return this._isHandling=!1,r},t.prototype._interpretHandlerContext=function(e){e.shouldPushStackElementBefore&&(this.model.pushStackElement(),e.shouldPushStackElementBefore=!1),this._columnSelectToLineNumber=e.setColumnSelectToLineNumber,this._columnSelectToVisualColumn=e.setColumnSelectToVisualColumn,e.hasExecutedCommands=this._internalExecuteCommands(e.executeCommands,e.isAutoWhitespaceCommand)||e.hasExecutedCommands,e.executeCommands=[],e.shouldPushStackElementAfter&&(this.model.pushStackElement(),e.shouldPushStackElementAfter=!1)},t.prototype._interpretCommandResult=function(e){return!(!e||0===e.length)&&(this.cursors.setSelections(e),!0)},t.prototype._getEditOperationsFromCommand=function(e,t,i,r){var s=this,a=[],u=0,l=function(e,n){e.isEmpty()&&""===n||a.push({identifier:{major:t,minor:u++},range:e,text:n,forceMoveMarkers:!1,isAutoWhitespaceEdit:r})},c=!1,h=function(t,n){var i,o;if(t.isEmpty())if("boolean"==typeof n)i=n,o=n;else{var r=s.model.getLineMaxColumn(t.startLineNumber);t.startColumn===r?(i=!0,o=!0):(i=!1,o=!1)}else t.getDirection()===d.SelectionDirection.LTR?(i=!1,o=!0):(i=!0,o=!1);var a=e.selectionStartMarkers.length;return e.selectionStartMarkers[a]=s.model._addMarker(0,t.selectionStartLineNumber,t.selectionStartColumn,i),e.positionMarkers[a]=s.model._addMarker(0,t.positionLineNumber,t.positionColumn,o),a.toString()},p={addEditOperation:l,trackSelection:h};try{i.getEditOperations(this.model,p)}catch(e){return e.friendlyMessage=n.localize(0,null),o.onUnexpectedError(e),{operations:[],hadTrackedRange:!1}}return{operations:a,hadTrackedRange:c}},t.prototype._getEditOperations=function(e,t,n){for(var i,o,r=[],s=[],a=0;an.identifier.major?t.identifier.major:n.identifier.major,o[i.toString()]=!0;for(var s=0;s0&&r--}return o},t.prototype._collapseDeleteCommands=function(e,t){if(1!==e.length){var n=e.every(function(e){if(!(e instanceof a.ReplaceCommand))return!1;var t=e;return!(t.getText().length>0)});if(n){var i=e,o=i.map(function(e,t){return{range:i[t].getRange(),order:t}});o.sort(function(e,t){return c.Range.compareRangesUsingStarts(e.range,t.range)});for(var r=o[0],s=1;s0||r.hadTrackedRanges[a]?(s[a].sort(l),c[a]=t[a].computeCursorState(i.model,{getInverseEditOperations:function(){return s[a]},getTrackedSelection:function(t){var n=parseInt(t,10),o=i.model._getMarker(e.selectionStartMarkers[n]),r=i.model._getMarker(e.positionMarkers[n]);return new d.Selection(o.lineNumber,o.column,r.lineNumber,r.column)}})):c[a]=o[a];return c}),v=[];for(g in p)p.hasOwnProperty(g)&&v.push(parseInt(g,10));v.sort(function(e,t){return t-e});for(var c=0;c1)return;var u=new c.Range(r.lineNumber,r.column,r.lineNumber,r.column),l=new c.Range(s.lineNumber,s.column,s.lineNumber,s.column);this.emitCursorRevealRange(u,l,t,n,!1)},t.prototype.emitCursorRevealRange=function(e,t,n,i,o){var r={range:e,viewRange:t,verticalType:n,revealHorizontal:i,revealCursor:o};this.emit(h.EventType.CursorRevealRange,r)},t.prototype.trigger=function(e,t,n){if(this._handlers.hasOwnProperty(t)){var i=this._handlers[t];this._onHandler(t,i,e,n)}},t.prototype._registerHandlers=function(){var e=this,t=h.Handler;this._handlers[t.CursorMove]=function(t){return e._cursorMove(t)},this._handlers[t.MoveTo]=function(t){return e._moveTo(!1,t)},this._handlers[t.MoveToSelect]=function(t){return e._moveTo(!0,t)},this._handlers[t.ColumnSelect]=function(t){return e._columnSelectMouse(t)},this._handlers[t.AddCursorUp]=function(t){return e._addCursorUp(t)},this._handlers[t.AddCursorDown]=function(t){return e._addCursorDown(t)},this._handlers[t.CreateCursor]=function(t){return e._createCursor(t)},this._handlers[t.LastCursorMoveToSelect]=function(t){return e._lastCursorMoveTo(t)},this._handlers[t.CursorLeft]=function(t){return e._moveLeft(!1,t)},this._handlers[t.CursorLeftSelect]=function(t){return e._moveLeft(!0,t)},this._handlers[t.CursorWordLeft]=function(t){return e._moveWordLeft(!1,0,t)},this._handlers[t.CursorWordStartLeft]=function(t){return e._moveWordLeft(!1,0,t)},this._handlers[t.CursorWordEndLeft]=function(t){return e._moveWordLeft(!1,1,t)},this._handlers[t.CursorWordLeftSelect]=function(t){return e._moveWordLeft(!0,0,t)},this._handlers[t.CursorWordStartLeftSelect]=function(t){return e._moveWordLeft(!0,0,t)},this._handlers[t.CursorWordEndLeftSelect]=function(t){return e._moveWordLeft(!0,1,t)},this._handlers[t.CursorRight]=function(t){return e._moveRight(!1,t)},this._handlers[t.CursorRightSelect]=function(t){return e._moveRight(!0,t)},this._handlers[t.CursorWordRight]=function(t){return e._moveWordRight(!1,1,t)},this._handlers[t.CursorWordStartRight]=function(t){return e._moveWordRight(!1,0,t)},this._handlers[t.CursorWordEndRight]=function(t){return e._moveWordRight(!1,1,t)},this._handlers[t.CursorWordRightSelect]=function(t){return e._moveWordRight(!0,1,t)},this._handlers[t.CursorWordStartRightSelect]=function(t){return e._moveWordRight(!0,0,t)},this._handlers[t.CursorWordEndRightSelect]=function(t){return e._moveWordRight(!0,1,t)},this._handlers[t.CursorUp]=function(t){return e._moveUp(!1,!1,t)},this._handlers[t.CursorUpSelect]=function(t){return e._moveUp(!0,!1,t)},this._handlers[t.CursorDown]=function(t){return e._moveDown(!1,!1,t)},this._handlers[t.CursorDownSelect]=function(t){return e._moveDown(!0,!1,t)},this._handlers[t.CursorPageUp]=function(t){return e._moveUp(!1,!0,t)},this._handlers[t.CursorPageUpSelect]=function(t){return e._moveUp(!0,!0,t)},this._handlers[t.CursorPageDown]=function(t){return e._moveDown(!1,!0,t)},this._handlers[t.CursorPageDownSelect]=function(t){return e._moveDown(!0,!0,t)},this._handlers[t.CursorHome]=function(t){return e._moveToBeginningOfLine(!1,t)},this._handlers[t.CursorHomeSelect]=function(t){return e._moveToBeginningOfLine(!0,t)},this._handlers[t.CursorEnd]=function(t){return e._moveToEndOfLine(!1,t)},this._handlers[t.CursorEndSelect]=function(t){return e._moveToEndOfLine(!0,t)},this._handlers[t.CursorTop]=function(t){return e._moveToBeginningOfBuffer(!1,t)},this._handlers[t.CursorTopSelect]=function(t){return e._moveToBeginningOfBuffer(!0,t)},this._handlers[t.CursorBottom]=function(t){return e._moveToEndOfBuffer(!1,t)},this._handlers[t.CursorBottomSelect]=function(t){return e._moveToEndOfBuffer(!0,t)},this._handlers[t.CursorColumnSelectLeft]=function(t){return e._columnSelectLeft(t)},this._handlers[t.CursorColumnSelectRight]=function(t){return e._columnSelectRight(t)},this._handlers[t.CursorColumnSelectUp]=function(t){return e._columnSelectUp(!1,t)},this._handlers[t.CursorColumnSelectPageUp]=function(t){return e._columnSelectUp(!0,t)},this._handlers[t.CursorColumnSelectDown]=function(t){return e._columnSelectDown(!1,t)},this._handlers[t.CursorColumnSelectPageDown]=function(t){return e._columnSelectDown(!0,t)},this._handlers[t.SelectAll]=function(t){return e._selectAll(t)},this._handlers[t.LineSelect]=function(t){return e._line(!1,t)},this._handlers[t.LineSelectDrag]=function(t){return e._line(!0,t)},this._handlers[t.LastCursorLineSelect]=function(t){return e._lastCursorLine(!1,t)},this._handlers[t.LastCursorLineSelectDrag]=function(t){return e._lastCursorLine(!0,t)},this._handlers[t.LineInsertBefore]=function(t){return e._lineInsertBefore(t)},this._handlers[t.LineInsertAfter]=function(t){return e._lineInsertAfter(t)},this._handlers[t.LineBreakInsert]=function(t){return e._lineBreakInsert(t)},this._handlers[t.WordSelect]=function(t){return e._word(!1,t)},this._handlers[t.WordSelectDrag]=function(t){return e._word(!0,t)},this._handlers[t.LastCursorWordSelect]=function(t){return e._lastCursorWord(t)},this._handlers[t.CancelSelection]=function(t){return e._cancelSelection(t)},this._handlers[t.RemoveSecondaryCursors]=function(t){return e._removeSecondaryCursors(t)},this._handlers[t.Type]=function(t){return e._type(t)},this._handlers[t.ReplacePreviousChar]=function(t){return e._replacePreviousChar(t)},this._handlers[t.Tab]=function(t){return e._tab(t)},this._handlers[t.Indent]=function(t){return e._indent(t)},this._handlers[t.Outdent]=function(t){return e._outdent(t)},this._handlers[t.Paste]=function(t){return e._paste(t)},this._handlers[t.EditorScroll]=function(t){return e._editorScroll(t)},this._handlers[t.ScrollLineUp]=function(t){return e._scrollUp(!1,t)},this._handlers[t.ScrollLineDown]=function(t){return e._scrollDown(!1,t)},this._handlers[t.ScrollPageUp]=function(t){return e._scrollUp(!0,t)},this._handlers[t.ScrollPageDown]=function(t){return e._scrollDown(!0,t)},this._handlers[t.DeleteLeft]=function(t){return e._deleteLeft(t)},this._handlers[t.DeleteWordLeft]=function(t){return e._deleteWordLeft(!0,0,t)},this._handlers[t.DeleteWordStartLeft]=function(t){return e._deleteWordLeft(!1,0,t)},this._handlers[t.DeleteWordEndLeft]=function(t){return e._deleteWordLeft(!1,1,t)},this._handlers[t.DeleteRight]=function(t){return e._deleteRight(t)},this._handlers[t.DeleteWordRight]=function(t){return e._deleteWordRight(!0,1,t)},this._handlers[t.DeleteWordStartRight]=function(t){return e._deleteWordRight(!1,0,t)},this._handlers[t.DeleteWordEndRight]=function(t){return e._deleteWordRight(!1,1,t)},this._handlers[t.Cut]=function(t){return e._cut(t)},this._handlers[t.ExpandLineSelection]=function(t){return e._expandLineSelection(t)},this._handlers[t.Undo]=function(t){return e._undo(t)},this._handlers[t.CursorUndo]=function(t){return e._cursorUndo(t)},this._handlers[t.Redo]=function(t){return e._redo(t)},this._handlers[t.ExecuteCommand]=function(t){return e._externalExecuteCommand(t)},this._handlers[t.ExecuteCommands]=function(t){return e._externalExecuteCommands(t)},this._handlers[t.RevealLine]=function(t){return e._revealLine(t)}},t.prototype._invokeForAllSorted=function(e,t,n,i){return void 0===n&&(n=!0),void 0===i&&(i=!0),this._doInvokeForAll(e,!0,t,n,i)},t.prototype._invokeForAll=function(e,t,n,i){return void 0===n&&(n=!0),void 0===i&&(i=!0),this._doInvokeForAll(e,!1,t,n,i)},t.prototype._doInvokeForAll=function(e,t,n,i,o){void 0===i&&(i=!0),void 0===o&&(o=!0);var r=!1,s=this.cursors.getAll();t&&(s=s.sort(function(e,t){return c.Range.compareRangesUsingStarts(e.modelState.selection,t.modelState.selection)}));var a;e.shouldPushStackElementBefore=i,e.shouldPushStackElementAfter=o;for(var u=0;u=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.OneCursorOp.expandLineSelection(t,n)})},t.prototype._word=function(e,t){return this.cursors.killSecondaryCursors(),this._invokeForAll(t,function(n,i,o){return l.OneCursorOp.word(i,e,i.validatePosition(t.eventData.position),o)})},t.prototype._lastCursorWord=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.word(i,!0,i.validatePosition(e.eventData.position),o)}),e.shouldReveal=!1,e.shouldRevealHorizontal=!1,!0},t.prototype._removeSecondaryCursors=function(e){return this.cursors.killSecondaryCursors(),!0},t.prototype._cancelSelection=function(e){return this._invokeForAll(e,function(e,t,n){return l.OneCursorOp.cancelSelection(t,n)})},t.prototype._doApplyEdit=function(e,t,n,i){var o=i(t,e);return o&&(n.executeCommand=o.command,n.shouldPushStackElementBefore=o.shouldPushStackElementBefore,n.shouldPushStackElementAfter=o.shouldPushStackElementAfter,n.isAutoWhitespaceCommand=o.isAutoWhitespaceCommand,n.shouldRevealHorizontal=o.shouldRevealHorizontal,n.cursorPositionChangeReason=o.cursorPositionChangeReason),!0},t.prototype._applyEditForAll=function(e,t){var n=this;return this._invokeForAll(e,function(e,i,o){return n._doApplyEdit(e,i,o,t)},!1,!1)},t.prototype._applyEditForAllSorted=function(e,t){var n=this;return this._invokeForAllSorted(e,function(e,i,o){return n._doApplyEdit(e,i,o,t)},!1,!1)},t.prototype._lineInsertBefore=function(e){return this._applyEditForAll(e,function(e){return y.TypeOperations.lineInsertBefore(e.config,e.model,e.modelState)})},t.prototype._lineInsertAfter=function(e){return this._applyEditForAll(e,function(e){return y.TypeOperations.lineInsertAfter(e.config,e.model,e.modelState)})},t.prototype._lineBreakInsert=function(e){return this._applyEditForAll(e,function(e){return y.TypeOperations.lineBreakInsert(e.config,e.model,e.modelState)})},t.prototype._type=function(e){var t=this,n=e.eventData.text;if("keyboard"===e.eventSource)for(var o,r=function(r,a){var u,l=n.charCodeAt(r);i.isHighSurrogate(l)&&r+10?t[n-1]:null;i&&i.toLineNumber===e-1?i.toLineNumber++:t[n]={fromLineNumber:e,toLineNumber:e}},e.prototype.build=function(){return 0===this._ranges.length?null:{ranges:this._ranges}},e}(),g=function(e){function t(t,n,i){var o=this;return t.push(r.EventType.ModelTokensChanged),t.push(r.EventType.ModelLanguageChanged),o=e.call(this,t,n)||this,o._languageIdentifier=i||l.NULL_LANGUAGE_IDENTIFIER,o._tokenizationListener=u.TokenizationRegistry.onDidChange(function(e){e.languages.indexOf(o._languageIdentifier.language)!==-1&&(o._resetTokenizationState(),o.emitModelTokensChangedEvent({ranges:[{fromLineNumber:1,toLineNumber:o.getLineCount()}]}))}),o._revalidateTokensTimeout=-1,o._resetTokenizationState(),o}return m(t,e),t.prototype.dispose=function(){this._tokenizationListener.dispose(),this._clearTimers(),this._lastState=null,e.prototype.dispose.call(this)},t.prototype._shouldAutoTokenize=function(){return!1},t.prototype._resetValue=function(t){e.prototype._resetValue.call(this,t),this._resetTokenizationState()},t.prototype._resetTokenizationState=function(){this._clearTimers();for(var e=0;e