t.x+t.width?new Wr(null,13,o,new H.a(c,n.getLineMaxColumn(c))):null},t.prototype._findMousePosition=function(e,t){var n=this._getPositionOutsideEditor(e);if(n)return n;var i=this._createMouseTarget(e,t);if(!i.position)return null;if(8===i.type||5===i.type){var o=this._helpPositionJumpOverViewZone(i.detail);if(o)return new Wr(i.element,i.type,i.mouseColumn,o,null,i.detail)}return i},t.prototype._helpPositionJumpOverViewZone=function(e){var t=new H.a(this._currentSelection.selectionStartLineNumber,this._currentSelection.selectionStartColumn),n=e.positionBefore,i=e.positionAfter;return n&&i?n.isBefore(t)?n:i:null},t.prototype._dispatchMouse=function(e,t){e.position&&this._viewController.dispatchMouse({position:e.position,mouseColumn:e.mouseColumn,startedOnLineNumbers:this._mouseState.startedOnLineNumbers,inSelectionMode:t,mouseDownCount:this._mouseState.count,altKey:this._mouseState.altKey,ctrlKey:this._mouseState.ctrlKey,metaKey:this._mouseState.metaKey,shiftKey:this._mouseState.shiftKey,leftButton:this._mouseState.leftButton,middleButton:this._mouseState.middleButton})},t}(le.a),Jr=function(){function e(){this._altKey=!1,this._ctrlKey=!1,this._metaKey=!1,this._shiftKey=!1,this._leftButton=!1,this._middleButton=!1,this._startedOnLineNumbers=!1,this._lastMouseDownPosition=null,this._lastMouseDownPositionEqualCount=0,this._lastMouseDownCount=0,this._lastSetMouseDownCountTime=0,this.isDragAndDrop=!1}return Object.defineProperty(e.prototype,"altKey",{get:function(){return this._altKey},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"ctrlKey",{get:function(){return this._ctrlKey},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"metaKey",{get:function(){return this._metaKey},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"shiftKey",{get:function(){return this._shiftKey},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"leftButton",{get:function(){return this._leftButton},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"middleButton",{get:function(){return this._middleButton},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"startedOnLineNumbers",{get:function(){return this._startedOnLineNumbers},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"count",{get:function(){return this._lastMouseDownCount},enumerable:!0,configurable:!0}),e.prototype.setModifiers=function(e){this._altKey=e.altKey,this._ctrlKey=e.ctrlKey,this._metaKey=e.metaKey,this._shiftKey=e.shiftKey},e.prototype.setStartButtons=function(e){this._leftButton=e.leftButton,this._middleButton=e.middleButton},e.prototype.setStartedOnLineNumbers=function(e){this._startedOnLineNumbers=e},e.prototype.trySetCount=function(t,n){var i=(new Date).getTime();i-this._lastSetMouseDownCountTime>e.CLEAR_MOUSE_DOWN_COUNT_TIME&&(t=1),this._lastSetMouseDownCountTime=i,t>this._lastMouseDownCount+1&&(t=this._lastMouseDownCount+1),this._lastMouseDownPosition&&this._lastMouseDownPosition.equals(n)?this._lastMouseDownPositionEqualCount++:this._lastMouseDownPositionEqualCount=1,this._lastMouseDownPosition=n,this._lastMouseDownCount=Math.min(t,this._lastMouseDownPositionEqualCount)},e.CLEAR_MOUSE_DOWN_COUNT_TIME=400,e}(),Qr=n("CjF5"),$r=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();function es(e,t){var n={translationY:t.translationY,translationX:t.translationX};return e&&(n.translationY+=e.translationY,n.translationX+=e.translationX),n}var ts=function(e){function t(t,n,i){var o=e.call(this,t,n,i)||this;return o.viewHelper.linesContentDomNode.style.msTouchAction="none",o.viewHelper.linesContentDomNode.style.msContentZooming="none",o._installGestureHandlerTimeout=window.setTimeout((function(){if(o._installGestureHandlerTimeout=-1,window.MSGesture){var e=new MSGesture,t=new MSGesture;e.target=o.viewHelper.linesContentDomNode,t.target=o.viewHelper.linesContentDomNode,o.viewHelper.linesContentDomNode.addEventListener("MSPointerDown",(function(n){var i=n.pointerType;i!==(n.MSPOINTER_TYPE_MOUSE||"mouse")?i===(n.MSPOINTER_TYPE_TOUCH||"touch")?(o._lastPointerType="touch",e.addPointer(n.pointerId)):(o._lastPointerType="pen",t.addPointer(n.pointerId)):o._lastPointerType="mouse"})),o._register(Z.j(o.viewHelper.linesContentDomNode,"MSGestureChange",(function(e){return o._onGestureChange(e)}),es)),o._register(Z.g(o.viewHelper.linesContentDomNode,"MSGestureTap",(function(e){return o._onCaptureGestureTap(e)}),!0))}}),100),o._lastPointerType="mouse",o}return $r(t,e),t.prototype._onMouseDown=function(t){"mouse"===this._lastPointerType&&e.prototype._onMouseDown.call(this,t)},t.prototype._onCaptureGestureTap=function(e){var t=this,n=new ur(e,this.viewHelper.viewDomNode),i=this._createMouseTarget(n,!1);i.position&&this.viewController.moveTo(i.position),n.browserEvent.fromElement?(n.preventDefault(),this.viewHelper.focusTextArea()):setTimeout((function(){t.viewHelper.focusTextArea()}))},t.prototype._onGestureChange=function(e){this._context.viewLayout.deltaScrollNow(-e.translationX,-e.translationY)},t.prototype.dispose=function(){window.clearTimeout(this._installGestureHandlerTimeout),e.prototype.dispose.call(this)},t}(Zr),ns=function(e){function t(t,n,i){var o=e.call(this,t,n,i)||this;return o.viewHelper.linesContentDomNode.style.touchAction="none",o._installGestureHandlerTimeout=window.setTimeout((function(){if(o._installGestureHandlerTimeout=-1,window.MSGesture){var e=new MSGesture,t=new MSGesture;e.target=o.viewHelper.linesContentDomNode,t.target=o.viewHelper.linesContentDomNode,o.viewHelper.linesContentDomNode.addEventListener("pointerdown",(function(n){var i=n.pointerType;"mouse"!==i?"touch"===i?(o._lastPointerType="touch",e.addPointer(n.pointerId)):(o._lastPointerType="pen",t.addPointer(n.pointerId)):o._lastPointerType="mouse"})),o._register(Z.j(o.viewHelper.linesContentDomNode,"MSGestureChange",(function(e){return o._onGestureChange(e)}),es)),o._register(Z.g(o.viewHelper.linesContentDomNode,"MSGestureTap",(function(e){return o._onCaptureGestureTap(e)}),!0))}}),100),o._lastPointerType="mouse",o}return $r(t,e),t.prototype._onMouseDown=function(t){"mouse"===this._lastPointerType&&e.prototype._onMouseDown.call(this,t)},t.prototype._onCaptureGestureTap=function(e){var t=this,n=new ur(e,this.viewHelper.viewDomNode),i=this._createMouseTarget(n,!1);i.position&&this.viewController.moveTo(i.position),n.browserEvent.fromElement?(n.preventDefault(),this.viewHelper.focusTextArea()):setTimeout((function(){t.viewHelper.focusTextArea()}))},t.prototype._onGestureChange=function(e){this._context.viewLayout.deltaScrollNow(-e.translationX,-e.translationY)},t.prototype.dispose=function(){window.clearTimeout(this._installGestureHandlerTimeout),e.prototype.dispose.call(this)},t}(Zr),is=function(e){function t(t,n,i){var o=e.call(this,t,n,i)||this;o._register(er.b.addTarget(o.viewHelper.linesContentDomNode)),o._register(Z.g(o.viewHelper.linesContentDomNode,er.a.Tap,(function(e){return o.onTap(e)}))),o._register(Z.g(o.viewHelper.linesContentDomNode,er.a.Change,(function(e){return o.onChange(e)}))),o._register(Z.g(o.viewHelper.linesContentDomNode,er.a.Contextmenu,(function(e){return o._onContextMenu(new ur(e,o.viewHelper.viewDomNode),!1)}))),o._lastPointerType="mouse",o._register(Z.g(o.viewHelper.linesContentDomNode,"pointerdown",(function(e){var t=e.pointerType;o._lastPointerType="mouse"!==t?"touch"===t?"touch":"pen":"mouse"})));var r=new cr(o.viewHelper.viewDomNode);return o._register(r.onPointerMoveThrottled(o.viewHelper.viewDomNode,(function(e){return o._onMouseMove(e)}),Yr(o.mouseTargetFactory),Zr.MOUSE_MOVE_MINIMUM_TIME)),o._register(r.onPointerUp(o.viewHelper.viewDomNode,(function(e){return o._onMouseUp(e)}))),o._register(r.onPointerLeave(o.viewHelper.viewDomNode,(function(e){return o._onMouseLeave(e)}))),o._register(r.onPointerDown(o.viewHelper.viewDomNode,(function(e){return o._onMouseDown(e)}))),o}return $r(t,e),t.prototype.onTap=function(e){if(e.initialTarget&&this.viewHelper.linesContentDomNode.contains(e.initialTarget)){e.preventDefault(),this.viewHelper.focusTextArea();var t=this._createMouseTarget(new ur(e,this.viewHelper.viewDomNode),!1);t.position&&this.viewController.dispatchMouse({position:t.position,mouseColumn:t.position.column,startedOnLineNumbers:!1,mouseDownCount:e.tapCount,inSelectionMode:!1,altKey:!1,ctrlKey:!1,metaKey:!1,shiftKey:!1,leftButton:!1,middleButton:!1})}},t.prototype.onChange=function(e){"touch"===this._lastPointerType&&this._context.viewLayout.deltaScrollNow(-e.translationX,-e.translationY)},t.prototype._onMouseDown=function(t){t.target&&this.viewHelper.linesContentDomNode.contains(t.target)&&"touch"===this._lastPointerType||e.prototype._onMouseDown.call(this,t)},t}(Zr),os=function(e){function t(t,n,i){var o=e.call(this,t,n,i)||this;return o._register(er.b.addTarget(o.viewHelper.linesContentDomNode)),o._register(Z.g(o.viewHelper.linesContentDomNode,er.a.Tap,(function(e){return o.onTap(e)}))),o._register(Z.g(o.viewHelper.linesContentDomNode,er.a.Change,(function(e){return o.onChange(e)}))),o._register(Z.g(o.viewHelper.linesContentDomNode,er.a.Contextmenu,(function(e){return o._onContextMenu(new ur(e,o.viewHelper.viewDomNode),!1)}))),o}return $r(t,e),t.prototype.onTap=function(e){e.preventDefault(),this.viewHelper.focusTextArea();var t=this._createMouseTarget(new ur(e,this.viewHelper.viewDomNode),!1);t.position&&this.viewController.moveTo(t.position)},t.prototype.onChange=function(e){this._context.viewLayout.deltaScrollNow(-e.translationX,-e.translationY)},t}(Zr),rs=function(e){function t(t,n,i){var o=e.call(this)||this;return window.navigator.msPointerEnabled?o.handler=o._register(new ts(t,n,i)):ie.c&&Qr.a.pointerEvents?o.handler=o._register(new is(t,n,i)):window.TouchEvent?o.handler=o._register(new os(t,n,i)):window.navigator.pointerEnabled||window.PointerEvent?o.handler=o._register(new ns(t,n,i)):o.handler=o._register(new Zr(t,n,i)),o}return $r(t,e),t.prototype.getTargetAtClientPoint=function(e,t){return this.handler.getTargetAtClientPoint(e,t)},t}(le.a),ss=(n("VvMK"),function(){function e(e,t,n,i,o){this.value=e,this.selectionStart=t,this.selectionEnd=n,this.selectionStartPosition=i,this.selectionEndPosition=o}return e.prototype.toString=function(){return"[ <"+this.value+">, selectionStart: "+this.selectionStart+", selectionEnd: "+this.selectionEnd+"]"},e.readFromTextArea=function(t){return new e(t.getValue(),t.getSelectionStart(),t.getSelectionEnd(),null,null)},e.prototype.collapseSelection=function(){return new e(this.value,this.value.length,this.value.length,null,null)},e.prototype.writeToTextArea=function(e,t,n){t.setValue(e,this.value),n&&t.setSelectionRange(e,this.selectionStart,this.selectionEnd)},e.prototype.deduceEditorPosition=function(e){if(e<=this.selectionStart){var t=this.value.substring(e,this.selectionStart);return this._finishDeduceEditorPosition(this.selectionStartPosition,t,-1)}if(e>=this.selectionEnd)return t=this.value.substring(this.selectionEnd,e),this._finishDeduceEditorPosition(this.selectionEndPosition,t,1);var n=this.value.substring(this.selectionStart,e);if(-1===n.indexOf(String.fromCharCode(8230)))return this._finishDeduceEditorPosition(this.selectionStartPosition,n,1);var i=this.value.substring(e,this.selectionEnd);return this._finishDeduceEditorPosition(this.selectionEndPosition,i,-1)},e.prototype._finishDeduceEditorPosition=function(e,t,n){for(var i=0,o=-1;-1!==(o=t.indexOf("\n",o+1));)i++;return[e,n*t.length,i]},e.selectedText=function(t){return new e(t,0,t.length,null,null)},e.deduceInput=function(e,t,n){if(!e)return{text:"",replaceCharCnt:0};var i=e.value,o=e.selectionStart,r=e.selectionEnd,s=t.value,a=t.selectionStart,u=t.selectionEnd,l=i.substring(r),c=s.substring(u),d=ne.d(l,c);s=s.substring(0,s.length-d);var h=(i=i.substring(0,i.length-d)).substring(0,o),f=s.substring(0,a),p=ne.c(h,f);if(s=s.substring(p),i=i.substring(p),a-=p,o-=p,u-=p,r-=p,n&&a===u&&i.length>0){var g=null;if(a===s.length?ne.H(s,i)&&(g=s.substring(i.length)):ne.k(s,i)&&(g=s.substring(0,s.length-i.length)),null!==g&&g.length>0&&(/\uFE0F/.test(g)||ne.e(g)))return{text:g,replaceCharCnt:0}}return a===u?i===s&&0===o&&r===i.length&&a===s.length&&-1===s.indexOf("\n")&&ne.f(s)?{text:"",replaceCharCnt:0}:{text:s,replaceCharCnt:h.length-p}:{text:s,replaceCharCnt:r-o}},e.EMPTY=new e("",0,0,null,null),e}()),as=function(){function e(){}return e._getPageOfLine=function(e,t){return Math.floor((e-1)/t)},e._getRangeForPage=function(e,t){var n=e*t,i=n+1,o=n+t;return new z.a(i,1,o+1,1)},e.fromEditorSelection=function(t,n,i,o,r){var s,a=e._getPageOfLine(i.startLineNumber,o),u=e._getRangeForPage(a,o),l=e._getPageOfLine(i.endLineNumber,o),c=e._getRangeForPage(l,o),d=u.intersectRanges(new z.a(1,1,i.startLineNumber,i.startColumn)),h=n.getValueInRange(d,1),f=n.getLineCount(),p=n.getLineMaxColumn(f),g=c.intersectRanges(new z.a(i.endLineNumber,i.endColumn,f,p)),m=n.getValueInRange(g,1);if(a===l||a+1===l)s=n.getValueInRange(i,1);else{var v=u.intersectRanges(i),_=c.intersectRanges(i);s=n.getValueInRange(v,1)+String.fromCharCode(8230)+n.getValueInRange(_,1)}return r&&(h.length>500&&(h=h.substring(h.length-500,h.length)),m.length>500&&(m=m.substring(0,500)),s.length>1e3&&(s=s.substring(0,500)+String.fromCharCode(8230)+s.substring(s.length-500,s.length))),new ss(h+s+m,h.length,h.length+s.length,new H.a(i.startLineNumber,i.startColumn),new H.a(i.endLineNumber,i.endColumn))},e}(),us=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),ls=function(){function e(){this._lastState=null}return e.prototype.set=function(e,t){this._lastState={lastCopiedValue:e,data:t}},e.prototype.get=function(e){return this._lastState&&this._lastState.lastCopiedValue===e?this._lastState.data:(this._lastState=null,null)},e.INSTANCE=new e,e}(),cs=function(e){function t(t,n){var i=e.call(this)||this;i.textArea=n,i._onFocus=i._register(new W.a),i.onFocus=i._onFocus.event,i._onBlur=i._register(new W.a),i.onBlur=i._onBlur.event,i._onKeyDown=i._register(new W.a),i.onKeyDown=i._onKeyDown.event,i._onKeyUp=i._register(new W.a),i.onKeyUp=i._onKeyUp.event,i._onCut=i._register(new W.a),i.onCut=i._onCut.event,i._onPaste=i._register(new W.a),i.onPaste=i._onPaste.event,i._onType=i._register(new W.a),i.onType=i._onType.event,i._onCompositionStart=i._register(new W.a),i.onCompositionStart=i._onCompositionStart.event,i._onCompositionUpdate=i._register(new W.a),i.onCompositionUpdate=i._onCompositionUpdate.event,i._onCompositionEnd=i._register(new W.a),i.onCompositionEnd=i._onCompositionEnd.event,i._onSelectionChangeRequest=i._register(new W.a),i.onSelectionChangeRequest=i._onSelectionChangeRequest.event,i._host=t,i._textArea=i._register(new hs(n)),i._asyncTriggerCut=i._register(new We.d((function(){return i._onCut.fire()}),0)),i._textAreaState=ss.EMPTY,i._selectionChangeListener=null,i.writeScreenReaderContent("ctor"),i._hasFocus=!1,i._isDoingComposition=!1,i._nextCommand=0,i._register(Z.k(n.domNode,"keydown",(function(e){!i._isDoingComposition||109!==e.keyCode&&1!==e.keyCode||e.stopPropagation(),e.equals(9)&&e.preventDefault(),i._onKeyDown.fire(e)}))),i._register(Z.k(n.domNode,"keyup",(function(e){i._onKeyUp.fire(e)}))),i._register(Z.g(n.domNode,"compositionstart",(function(e){i._isDoingComposition||(i._isDoingComposition=!0,Ho.f||i._setAndWriteTextAreaState("compositionstart",ss.EMPTY),i._onCompositionStart.fire())})));var o=function(e){var t=i._textAreaState,n=ss.readFromTextArea(i._textArea);return[n,ss.deduceInput(t,n,e)]},r=function(e){var t=i._textAreaState,n=ss.selectedText(e);return[n,{text:n.value,replaceCharCnt:t.selectionEnd-t.selectionStart}]},s=function(e){return!(!Ho.f||"ja"!==e)||!(!Ho.i||0!==e.indexOf("zh-Han"))};return i._register(Z.g(n.domNode,"compositionupdate",(function(e){if(s(e.locale)){var t=o(!1),n=t[0],a=t[1];return i._textAreaState=n,i._onType.fire(a),void i._onCompositionUpdate.fire(e)}var u=r(e.data),l=u[0],c=u[1];i._textAreaState=l,i._onType.fire(c),i._onCompositionUpdate.fire(e)}))),i._register(Z.g(n.domNode,"compositionend",(function(e){if(i._isDoingComposition){if(s(e.locale)){var t=o(!1),n=t[0],a=t[1];i._textAreaState=n,i._onType.fire(a)}else{var u=r(e.data);n=u[0],a=u[1],i._textAreaState=n,i._onType.fire(a)}(Ho.f||Ho.d)&&(i._textAreaState=ss.readFromTextArea(i._textArea)),i._isDoingComposition&&(i._isDoingComposition=!1,i._onCompositionEnd.fire())}}))),i._register(Z.g(n.domNode,"input",(function(){if(i._textArea.setIgnoreSelectionChangeTime("received input event"),!i._isDoingComposition){var e=o(ie.e),t=e[0],n=e[1];0===n.replaceCharCnt&&1===n.text.length&&ne.x(n.text.charCodeAt(0))||(i._textAreaState=t,0===i._nextCommand?""!==n.text&&i._onType.fire(n):(""===n.text&&0===n.replaceCharCnt||i._firePaste(n.text,null),i._nextCommand=0))}}))),i._register(Z.g(n.domNode,"cut",(function(e){i._textArea.setIgnoreSelectionChangeTime("received cut event"),i._ensureClipboardGetsEditorSelection(e),i._asyncTriggerCut.schedule()}))),i._register(Z.g(n.domNode,"copy",(function(e){i._ensureClipboardGetsEditorSelection(e)}))),i._register(Z.g(n.domNode,"paste",(function(e){if(i._textArea.setIgnoreSelectionChangeTime("received paste event"),ds.canUseTextData(e)){var t=ds.getTextData(e),n=t[0],o=t[1];""!==n&&i._firePaste(n,o)}else i._textArea.getSelectionStart()!==i._textArea.getSelectionEnd()&&i._setAndWriteTextAreaState("paste",ss.EMPTY),i._nextCommand=1}))),i._register(Z.g(n.domNode,"focus",(function(){i._setHasFocus(!0)}))),i._register(Z.g(n.domNode,"blur",(function(){i._setHasFocus(!1)}))),i}return us(t,e),t.prototype._installSelectionChangeListener=function(){var e=this,t=0;return Z.g(document,"selectionchange",(function(n){if(e._hasFocus&&!e._isDoingComposition&&Ho.d&&ie.h){var i=Date.now(),o=i-t;if(t=i,!(o<5)){var r=i-e._textArea.getIgnoreSelectionChangeTime();if(e._textArea.resetSelectionChangeTime(),!(r<100)&&e._textAreaState.selectionStartPosition&&e._textAreaState.selectionEndPosition){var s=e._textArea.getValue();if(e._textAreaState.value===s){var a=e._textArea.getSelectionStart(),u=e._textArea.getSelectionEnd();if(e._textAreaState.selectionStart!==a||e._textAreaState.selectionEnd!==u){var l=e._textAreaState.deduceEditorPosition(a),c=e._host.deduceModelPosition(l[0],l[1],l[2]),d=e._textAreaState.deduceEditorPosition(u),h=e._host.deduceModelPosition(d[0],d[1],d[2]),f=new U.a(c.lineNumber,c.column,h.lineNumber,h.column);e._onSelectionChangeRequest.fire(f)}}}}}}))},t.prototype.dispose=function(){e.prototype.dispose.call(this),this._selectionChangeListener&&(this._selectionChangeListener.dispose(),this._selectionChangeListener=null)},t.prototype.focusTextArea=function(){this._setHasFocus(!0),this.refreshFocusState()},t.prototype.isFocused=function(){return this._hasFocus},t.prototype.refreshFocusState=function(){var e=Z.y(this.textArea.domNode);e?this._setHasFocus(e.activeElement===this.textArea.domNode):Z.G(this.textArea.domNode)?this._setHasFocus(document.activeElement===this.textArea.domNode):this._setHasFocus(!1)},t.prototype._setHasFocus=function(e){this._hasFocus!==e&&(this._hasFocus=e,this._selectionChangeListener&&(this._selectionChangeListener.dispose(),this._selectionChangeListener=null),this._hasFocus&&(this._selectionChangeListener=this._installSelectionChangeListener()),this._hasFocus&&(Ho.e?this._setAndWriteTextAreaState("focusgain",ss.EMPTY):this.writeScreenReaderContent("focusgain")),this._hasFocus?this._onFocus.fire():this._onBlur.fire())},t.prototype._setAndWriteTextAreaState=function(e,t){this._hasFocus||(t=t.collapseSelection()),t.writeToTextArea(e,this._textArea,this._hasFocus),this._textAreaState=t},t.prototype.writeScreenReaderContent=function(e){this._isDoingComposition||this._setAndWriteTextAreaState(e,this._host.getScreenReaderContent(this._textAreaState))},t.prototype._ensureClipboardGetsEditorSelection=function(e){var t=this._host.getDataToCopy(ds.canUseTextData(e)&&Qr.a.clipboard.richText),n={version:1,isFromEmptySelection:t.isFromEmptySelection,multicursorText:t.multicursorText,mode:t.mode};ls.INSTANCE.set(Ho.h?t.text.replace(/\r\n/g,"\n"):t.text,n),ds.canUseTextData(e)?ds.setTextData(e,t.text,t.html,n):this._setAndWriteTextAreaState("copy or cut",ss.selectedText(t.text))},t.prototype._firePaste=function(e,t){t||(t=ls.INSTANCE.get(e)),this._onPaste.fire({text:e,metadata:t})},t}(le.a),ds=function(){function e(){}return e.canUseTextData=function(e){return!!e.clipboardData||!!window.clipboardData},e.getTextData=function(e){if(e.clipboardData){e.preventDefault();var t=e.clipboardData.getData("text/plain"),n=null,i=e.clipboardData.getData("vscode-editor-data");if("string"==typeof i)try{1!==(n=JSON.parse(i)).version&&(n=null)}catch(e){}return[t,n]}if(window.clipboardData)return e.preventDefault(),[t=window.clipboardData.getData("Text"),null];throw new Error("ClipboardEventUtils.getTextData: Cannot use text data!")},e.setTextData=function(e,t,n,i){if(e.clipboardData)return e.clipboardData.setData("text/plain",t),"string"==typeof n&&e.clipboardData.setData("text/html",n),e.clipboardData.setData("vscode-editor-data",JSON.stringify(i)),void e.preventDefault();if(window.clipboardData)return window.clipboardData.setData("Text",t),void e.preventDefault();throw new Error("ClipboardEventUtils.setTextData: Cannot use text data!")},e}(),hs=function(e){function t(t){var n=e.call(this)||this;return n._actual=t,n._ignoreSelectionChangeTime=0,n}return us(t,e),t.prototype.setIgnoreSelectionChangeTime=function(e){this._ignoreSelectionChangeTime=Date.now()},t.prototype.getIgnoreSelectionChangeTime=function(){return this._ignoreSelectionChangeTime},t.prototype.resetSelectionChangeTime=function(){this._ignoreSelectionChangeTime=0},t.prototype.getValue=function(){return this._actual.domNode.value},t.prototype.setValue=function(e,t){var n=this._actual.domNode;n.value!==t&&(this.setIgnoreSelectionChangeTime("setValue"),n.value=t)},t.prototype.getSelectionStart=function(){return this._actual.domNode.selectionStart},t.prototype.getSelectionEnd=function(){return this._actual.domNode.selectionEnd},t.prototype.setSelectionRange=function(e,t,n){var i=this._actual.domNode,o=Z.y(i),r=(o?o.activeElement:document.activeElement)===i,s=i.selectionStart,a=i.selectionEnd;if(r&&s===t&&a===n)Ho.h&&window.parent!==window&&i.focus();else{if(r)return this.setIgnoreSelectionChangeTime("setSelectionRange"),i.setSelectionRange(t,n),void(Ho.h&&window.parent!==window&&i.focus());try{var u=Z.P(i);this.setIgnoreSelectionChangeTime("setSelectionRange"),i.focus(),i.setSelectionRange(t,n),Z.N(i,u)}catch(e){}}},t}(le.a),fs=(n("Krc3"),function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}()),ps=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return fs(t,e),t}(fr),gs=n("zrhQ"),ms=n("MD5Z"),vs=Object(ms.Eb)("editor.lineHighlightBackground",{dark:null,light:null,hc:null},qn.a("lineHighlight","Background color for the highlight of line at the cursor position.")),_s=Object(ms.Eb)("editor.lineHighlightBorder",{dark:"#282828",light:"#eeeeee",hc:"#f38518"},qn.a("lineHighlightBorderBox","Background color for the border around the line at the cursor position.")),ys=Object(ms.Eb)("editor.rangeHighlightBackground",{dark:"#ffffff0b",light:"#fdff0033",hc:null},qn.a("rangeHighlight","Background color of highlighted ranges, like by quick open and find features. The color must not be opaque so as not to hide underlying decorations."),!0),bs=Object(ms.Eb)("editor.rangeHighlightBorder",{dark:null,light:null,hc:ms.b},qn.a("rangeHighlightBorder","Background color of the border around highlighted ranges."),!0),Cs=Object(ms.Eb)("editor.symbolHighlightBackground",{dark:ms.s,light:ms.s,hc:null},qn.a("symbolHighlight","Background color of highlighted symbol, like for go to definition or go next/previous symbol. The color must not be opaque so as not to hide underlying decorations."),!0),ws=Object(ms.Eb)("editor.symbolHighlightBorder",{dark:null,light:null,hc:ms.b},qn.a("symbolHighlightBorder","Background color of the border around highlighted symbols."),!0),Ss=Object(ms.Eb)("editorCursor.foreground",{dark:"#AEAFAD",light:gs.a.black,hc:gs.a.white},qn.a("caret","Color of the editor cursor.")),Ls=Object(ms.Eb)("editorCursor.background",null,qn.a("editorCursorBackground","The background color of the editor cursor. Allows customizing the color of a character overlapped by a block cursor.")),Ns=Object(ms.Eb)("editorWhitespace.foreground",{dark:"#e3e4e229",light:"#33333333",hc:"#e3e4e229"},qn.a("editorWhitespaces","Color of whitespace characters in the editor.")),Os=Object(ms.Eb)("editorIndentGuide.background",{dark:Ns,light:Ns,hc:Ns},qn.a("editorIndentGuides","Color of the editor indentation guides.")),Ds=Object(ms.Eb)("editorIndentGuide.activeBackground",{dark:Ns,light:Ns,hc:Ns},qn.a("editorActiveIndentGuide","Color of the active editor indentation guides.")),xs=Object(ms.Eb)("editorLineNumber.foreground",{dark:"#858585",light:"#237893",hc:gs.a.white},qn.a("editorLineNumbers","Color of editor line numbers.")),Es=Object(ms.Eb)("editorActiveLineNumber.foreground",{dark:"#c6c6c6",light:"#0B216F",hc:ms.b},qn.a("editorActiveLineNumber","Color of editor active line number"),!1,qn.a("deprecatedEditorActiveLineNumber","Id is deprecated. Use 'editorLineNumber.activeForeground' instead.")),ks=Object(ms.Eb)("editorLineNumber.activeForeground",{dark:Es,light:Es,hc:Es},qn.a("editorActiveLineNumber","Color of editor active line number")),Is=Object(ms.Eb)("editorRuler.foreground",{dark:"#5A5A5A",light:gs.a.lightgrey,hc:gs.a.white},qn.a("editorRuler","Color of the editor rulers.")),Ms=(Object(ms.Eb)("editorCodeLens.foreground",{dark:"#999999",light:"#999999",hc:"#999999"},qn.a("editorCodeLensForeground","Foreground color of editor code lenses")),Object(ms.Eb)("editorBracketMatch.background",{dark:"#0064001a",light:"#0064001a",hc:"#0064001a"},qn.a("editorBracketMatchBackground","Background color behind matching brackets")),Object(ms.Eb)("editorBracketMatch.border",{dark:"#888",light:"#B9B9B9",hc:ms.e},qn.a("editorBracketMatchBorder","Color for matching brackets boxes")),Object(ms.Eb)("editorOverviewRuler.border",{dark:"#7f7f7f4d",light:"#7f7f7f4d",hc:"#7f7f7f4d"},qn.a("editorOverviewRulerBorder","Color of the overview ruler border."))),Ts=Object(ms.Eb)("editorGutter.background",{dark:ms.n,light:ms.n,hc:ms.n},qn.a("editorGutter","Background color of the editor gutter. The gutter contains the glyph margins and the line numbers.")),As=Object(ms.Eb)("editorUnnecessaryCode.border",{dark:null,light:null,hc:gs.a.fromHex("#fff").transparent(.8)},qn.a("unnecessaryCodeBorder","Border color of unnecessary (unused) source code in the editor.")),Rs=Object(ms.Eb)("editorUnnecessaryCode.opacity",{dark:gs.a.fromHex("#000a"),light:gs.a.fromHex("#0007"),hc:null},qn.a("unnecessaryCodeOpacity","Opacity of unnecessary (unused) source code in the editor. For example, \"#000000c0\" will render the code with 75% opacity. For high contrast themes, use the 'editorUnnecessaryCode.border' theme color to underline unnecessary code instead of fading it out.")),Ps=Object(ms.Eb)("editorOverviewRuler.errorForeground",{dark:new gs.a(new gs.b(255,18,18,.7)),light:new gs.a(new gs.b(255,18,18,.7)),hc:new gs.a(new gs.b(255,50,50,1))},qn.a("overviewRuleError","Overview ruler marker color for errors.")),Fs=Object(ms.Eb)("editorOverviewRuler.warningForeground",{dark:ms.G,light:ms.G,hc:ms.F},qn.a("overviewRuleWarning","Overview ruler marker color for warnings.")),Vs=Object(ms.Eb)("editorOverviewRuler.infoForeground",{dark:ms.B,light:ms.B,hc:ms.A},qn.a("overviewRuleInfo","Overview ruler marker color for infos."));Object(Nr.e)((function(e,t){var n=e.getColor(ms.n);n&&t.addRule(".monaco-editor, .monaco-editor-background, .monaco-editor .inputarea.ime-input { background-color: "+n+"; }");var i=e.getColor(ms.w);i&&t.addRule(".monaco-editor, .monaco-editor .inputarea.ime-input { color: "+i+"; }");var o=e.getColor(Ts);o&&t.addRule(".monaco-editor .margin { background-color: "+o+"; }");var r=e.getColor(ys);r&&t.addRule(".monaco-editor .rangeHighlight { background-color: "+r+"; }");var s=e.getColor(bs);s&&t.addRule(".monaco-editor .rangeHighlight { border: 1px "+("hc"===e.type?"dotted":"solid")+" "+s+"; }");var a=e.getColor(Cs);a&&t.addRule(".monaco-editor .symbolHighlight { background-color: "+a+"; }");var u=e.getColor(ws);u&&t.addRule(".monaco-editor .symbolHighlight { border: 1px "+("hc"===e.type?"dotted":"solid")+" "+u+"; }");var l=e.getColor(Ns);l&&t.addRule(".vs-whitespace { color: "+l+" !important; }")}));var Ws=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Bs=function(e){function t(t){var n=e.call(this)||this;return n._context=t,n._readConfig(),n._lastCursorModelPosition=new H.a(1,1),n._renderResult=null,n._context.addEventHandler(n),n}return Ws(t,e),t.prototype._readConfig=function(){var e=this._context.configuration.options;this._lineHeight=e.get(49);var t=e.get(50);this._renderLineNumbers=t.renderType,this._renderCustomLineNumbers=t.renderFn,this._renderFinalNewline=e.get(71);var n=e.get(107);this._lineNumbersLeft=n.lineNumbersLeft,this._lineNumbersWidth=n.lineNumbersWidth},t.prototype.dispose=function(){this._context.removeEventHandler(this),this._renderResult=null,e.prototype.dispose.call(this)},t.prototype.onConfigurationChanged=function(e){return this._readConfig(),!0},t.prototype.onCursorStateChanged=function(e){var t=e.selections[0].getPosition();return this._lastCursorModelPosition=this._context.model.coordinatesConverter.convertViewPositionToModelPosition(t),2===this._renderLineNumbers||3===this._renderLineNumbers},t.prototype.onFlushed=function(e){return!0},t.prototype.onLinesChanged=function(e){return!0},t.prototype.onLinesDeleted=function(e){return!0},t.prototype.onLinesInserted=function(e){return!0},t.prototype.onScrollChanged=function(e){return e.scrollTopChanged},t.prototype.onZonesChanged=function(e){return!0},t.prototype._getLineRenderLineNumber=function(e){var t=this._context.model.coordinatesConverter.convertViewPositionToModelPosition(new H.a(e,1));if(1!==t.column)return"";var n=t.lineNumber;if(this._renderCustomLineNumbers)return this._renderCustomLineNumbers(n);if(2===this._renderLineNumbers){var i=Math.abs(this._lastCursorModelPosition.lineNumber-n);return 0===i?''+n+"":String(i)}return 3===this._renderLineNumbers?this._lastCursorModelPosition.lineNumber===n||n%10==0?String(n):"":String(n)},t.prototype.prepareRender=function(e){if(0!==this._renderLineNumbers){for(var n=ie.d?this._lineHeight%2==0?" lh-even":" lh-odd":"",i=e.visibleRange.startLineNumber,o=e.visibleRange.endLineNumber,r='',s=this._context.model.getLineCount(),a=[],u=i;u<=o;u++){var l=u-i;if(this._renderFinalNewline||u!==s||0!==this._context.model.getLineLength(u)){var c=this._getLineRenderLineNumber(u);a[l]=c?r+c+"
":""}else a[l]=""}this._renderResult=a}else this._renderResult=null},t.prototype.render=function(e,t){if(!this._renderResult)return"";var n=t-e;return n<0||n>=this._renderResult.length?"":this._renderResult[n]},t.CLASS_NAME="line-numbers",t}(ps);Object(Nr.e)((function(e,t){var n=e.getColor(xs);n&&t.addRule(".monaco-editor .line-numbers { color: "+n+"; }");var i=e.getColor(ks);i&&t.addRule(".monaco-editor .current-line ~ .line-numbers { color: "+i+"; }")}));var js=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Hs=function(e){function t(n){var i=e.call(this,n)||this,o=i._context.configuration.options,r=o.get(107);return i._canUseLayerHinting=!o.get(22),i._contentLeft=r.contentLeft,i._glyphMarginLeft=r.glyphMarginLeft,i._glyphMarginWidth=r.glyphMarginWidth,i._domNode=Object($o.b)(document.createElement("div")),i._domNode.setClassName(t.OUTER_CLASS_NAME),i._domNode.setPosition("absolute"),i._domNode.setAttribute("role","presentation"),i._domNode.setAttribute("aria-hidden","true"),i._glyphMarginBackgroundDomNode=Object($o.b)(document.createElement("div")),i._glyphMarginBackgroundDomNode.setClassName(t.CLASS_NAME),i._domNode.appendChild(i._glyphMarginBackgroundDomNode),i}return js(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this)},t.prototype.getDomNode=function(){return this._domNode},t.prototype.onConfigurationChanged=function(e){var t=this._context.configuration.options,n=t.get(107);return this._canUseLayerHinting=!t.get(22),this._contentLeft=n.contentLeft,this._glyphMarginLeft=n.glyphMarginLeft,this._glyphMarginWidth=n.glyphMarginWidth,!0},t.prototype.onScrollChanged=function(t){return e.prototype.onScrollChanged.call(this,t)||t.scrollTopChanged},t.prototype.prepareRender=function(e){},t.prototype.render=function(e){this._domNode.setLayerHinting(this._canUseLayerHinting),this._domNode.setContain("strict");var t=e.scrollTop-e.bigNumbersDelta;this._domNode.setTop(-t);var n=Math.min(e.scrollHeight,1e6);this._domNode.setHeight(n),this._domNode.setWidth(this._contentLeft),this._glyphMarginBackgroundDomNode.setLeft(this._glyphMarginLeft),this._glyphMarginBackgroundDomNode.setWidth(this._glyphMarginWidth),this._glyphMarginBackgroundDomNode.setHeight(n)},t.CLASS_NAME="glyph-margin",t.OUTER_CLASS_NAME="margin",t}(gr),zs=n("5v8Y"),Us=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Ks=function(){function e(e){this.type=1,this._source=e}return e.prototype.hasChanged=function(e){return this._source.hasChanged(e)},e}(),qs=function(e){this.type=2,this.contentWidth=e.contentWidth,this.contentHeight=e.contentHeight,this.contentWidthChanged=e.contentWidthChanged,this.contentHeightChanged=e.contentHeightChanged},Gs=function(e,t){this.type=3,this.selections=e,this.modelSelections=t},Ys=function(){this.type=4},Zs=function(){this.type=5},Xs=function(e){this.type=6,this.isFocused=e},Js=function(){this.type=7},Qs=function(){this.type=8},$s=function(e,t){this.type=9,this.fromLineNumber=e,this.toLineNumber=t},ea=function(e,t){this.type=10,this.fromLineNumber=e,this.toLineNumber=t},ta=function(e,t){this.type=11,this.fromLineNumber=e,this.toLineNumber=t},na=function(e,t,n,i,o){this.type=12,this.source=e,this.range=t,this.verticalType=n,this.revealHorizontal=i,this.scrollType=o},ia=function(e){this.type=13,this.scrollWidth=e.scrollWidth,this.scrollLeft=e.scrollLeft,this.scrollHeight=e.scrollHeight,this.scrollTop=e.scrollTop,this.scrollWidthChanged=e.scrollWidthChanged,this.scrollLeftChanged=e.scrollLeftChanged,this.scrollHeightChanged=e.scrollHeightChanged,this.scrollTopChanged=e.scrollTopChanged},oa=function(){this.type=14},ra=function(e){this.type=15,this.ranges=e},sa=function(){this.type=16},aa=function(){this.type=17},ua=function(e){function t(){var t=e.call(this)||this;return t._listeners=[],t._collector=null,t._collectorCnt=0,t}return Us(t,e),t.prototype.dispose=function(){this._listeners=[],e.prototype.dispose.call(this)},t.prototype._beginEmit=function(){return this._collectorCnt++,1===this._collectorCnt&&(this._collector=new la),this._collector},t.prototype._endEmit=function(){if(this._collectorCnt--,0===this._collectorCnt){var e=this._collector.finalize();this._collector=null,e.length>0&&this._emit(e)}},t.prototype._emit=function(e){for(var t=this._listeners.slice(0),n=0,i=t.length;n0)return new ss(i,i.length,i.length,n,n)}}return ss.EMPTY}return as.fromEditorSelection(e,a,o._selections[0],o._accessibilityPageSize,0===o._accessibilitySupport)},deduceModelPosition:function(e,t,n){return o._context.model.deduceModelPositionRelativeToViewPosition(e,t,n)}};return o._textAreaInput=o._register(new cs(u,o.textArea)),o._register(o._textAreaInput.onKeyDown((function(e){o._viewController.emitKeyDown(e)}))),o._register(o._textAreaInput.onKeyUp((function(e){o._viewController.emitKeyUp(e)}))),o._register(o._textAreaInput.onPaste((function(e){var t=!1,n=null,i=null;e.metadata&&(t=o._emptySelectionClipboard&&!!e.metadata.isFromEmptySelection,n=void 0!==e.metadata.multicursorText?e.metadata.multicursorText:null,i=e.metadata.mode),o._viewController.paste("keyboard",e.text,t,n,i)}))),o._register(o._textAreaInput.onCut((function(){o._viewController.cut("keyboard")}))),o._register(o._textAreaInput.onType((function(e){e.replaceCharCnt?o._viewController.replacePreviousChar("keyboard",e.text,e.replaceCharCnt):o._viewController.type("keyboard",e.text)}))),o._register(o._textAreaInput.onSelectionChangeRequest((function(e){o._viewController.setSelection("keyboard",e)}))),o._register(o._textAreaInput.onCompositionStart((function(){var e=o._selections[0].startLineNumber,t=o._selections[0].startColumn;o._context.privateViewEventBus.emit(new na("keyboard",new z.a(e,t,e,t),0,!0,1));var n=o._viewHelper.visibleRangeForPositionRelativeToEditor(e,t);n&&(o._visibleTextArea=new ha(o._context.viewLayout.getVerticalOffsetForLineNumber(e),n.left,fa?0:1),o._render()),o.textArea.setClassName("inputarea ime-input"),o._viewController.compositionStart("keyboard")}))),o._register(o._textAreaInput.onCompositionUpdate((function(e){Ho.f?o._visibleTextArea=o._visibleTextArea.setWidth(0):o._visibleTextArea=o._visibleTextArea.setWidth(function(e,t){var n,i=document.createElement("canvas").getContext("2d");i.font=("normal","normal normal "+(n=t).fontWeight+" "+n.fontSize+"px / "+n.lineHeight+"px "+n.fontFamily);var o=i.measureText(e);return Ho.h?o.width+2:o.width}(e.data,o._fontInfo)),o._render()}))),o._register(o._textAreaInput.onCompositionEnd((function(){o._visibleTextArea=null,o._render(),o.textArea.setClassName("inputarea"),o._viewController.compositionEnd("keyboard")}))),o._register(o._textAreaInput.onFocus((function(){o._context.privateViewEventBus.emit(new Xs(!0))}))),o._register(o._textAreaInput.onBlur((function(){o._context.privateViewEventBus.emit(new Xs(!1))}))),o}return da(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this)},t.prototype._getWordBeforePosition=function(e){for(var t=this._context.model.getLineContent(e.lineNumber),n=Object(zs.a)(this._context.configuration.options.get(96)),i=e.column,o=0;i>1;){var r=t.charCodeAt(i-2);if(0!==n.get(r)||o>50)return t.substring(i-1,e.column-1);o++,i--}return t.substring(0,e.column-1)},t.prototype._getCharacterBeforePosition=function(e){if(e.column>1){var t=this._context.model.getLineContent(e.lineNumber).charAt(e.column-2);if(!ne.x(t.charCodeAt(0)))return t}return""},t.prototype._getAriaLabel=function(e){return 1===e.get(2)?qn.a("accessibilityOffAriaLabel","The editor is not accessible at this time. Press Alt+F1 for options."):e.get(4)},t.prototype._setAccessibilityOptions=function(e){this._accessibilitySupport=e.get(2);var t=e.get(3);2===this._accessibilitySupport&&t===F.e.accessibilityPageSize.defaultValue?this._accessibilityPageSize=160:this._accessibilityPageSize=t},t.prototype.onConfigurationChanged=function(e){var t=this._context.configuration.options,n=t.get(107);return this._setAccessibilityOptions(t),this._contentLeft=n.contentLeft,this._contentWidth=n.contentWidth,this._contentHeight=n.height,this._fontInfo=t.get(34),this._lineHeight=t.get(49),this._emptySelectionClipboard=t.get(25),this._copyWithSyntaxHighlighting=t.get(15),this.textArea.setAttribute("aria-label",this._getAriaLabel(t)),ie.g&&e.hasChanged(68)&&(t.get(68)?this.textArea.setAttribute("readonly","true"):this.textArea.removeAttribute("readonly")),e.hasChanged(2)&&this._textAreaInput.writeScreenReaderContent("strategy changed"),!0},t.prototype.onCursorStateChanged=function(e){return this._selections=e.selections.slice(0),this._modelSelections=e.modelSelections.slice(0),this._textAreaInput.writeScreenReaderContent("selection changed"),!0},t.prototype.onDecorationsChanged=function(e){return!0},t.prototype.onFlushed=function(e){return!0},t.prototype.onLinesChanged=function(e){return!0},t.prototype.onLinesDeleted=function(e){return!0},t.prototype.onLinesInserted=function(e){return!0},t.prototype.onScrollChanged=function(e){return this._scrollLeft=e.scrollLeft,this._scrollTop=e.scrollTop,!0},t.prototype.onZonesChanged=function(e){return!0},t.prototype.isFocused=function(){return this._textAreaInput.isFocused()},t.prototype.focusTextArea=function(){this._textAreaInput.focusTextArea()},t.prototype.getLastRenderData=function(){return this._lastRenderPosition},t.prototype.setAriaOptions=function(e){e.activeDescendant?(this.textArea.setAttribute("aria-haspopup","true"),this.textArea.setAttribute("aria-autocomplete","list"),this.textArea.setAttribute("aria-activedescendant",e.activeDescendant)):(this.textArea.setAttribute("aria-haspopup","false"),this.textArea.setAttribute("aria-autocomplete","both"),this.textArea.removeAttribute("aria-activedescendant"))},t.prototype.prepareRender=function(e){this._primaryCursorPosition=new H.a(this._selections[0].positionLineNumber,this._selections[0].positionColumn),this._primaryCursorVisibleRange=e.visibleRangeForPosition(this._primaryCursorPosition)},t.prototype.render=function(e){this._textAreaInput.writeScreenReaderContent("render"),this._render()},t.prototype._render=function(){if(this._visibleTextArea)this._renderInsideEditor(null,this._visibleTextArea.top-this._scrollTop,this._contentLeft+this._visibleTextArea.left-this._scrollLeft,this._visibleTextArea.width,this._lineHeight);else if(this._primaryCursorVisibleRange){var e=this._contentLeft+this._primaryCursorVisibleRange.left-this._scrollLeft;if(ethis._contentLeft+this._contentWidth)this._renderAtTopLeft();else{var t=this._context.viewLayout.getVerticalOffsetForLineNumber(this._selections[0].positionLineNumber)-this._scrollTop;t<0||t>this._contentHeight?this._renderAtTopLeft():ie.e?this._renderInsideEditor(this._primaryCursorPosition,t,e,fa?0:1,this._lineHeight):this._renderInsideEditor(this._primaryCursorPosition,t,e,fa?0:1,fa?0:1)}}else this._renderAtTopLeft()},t.prototype._renderInsideEditor=function(e,t,n,i,o){this._lastRenderPosition=e;var r=this.textArea,s=this.textAreaCover;Jo.applyFontInfo(r,this._fontInfo),r.setTop(t),r.setLeft(n),r.setWidth(i),r.setHeight(o),s.setTop(0),s.setLeft(0),s.setWidth(0),s.setHeight(0)},t.prototype._renderAtTopLeft=function(){this._lastRenderPosition=null;var e=this.textArea,t=this.textAreaCover;if(Jo.applyFontInfo(e,this._fontInfo),e.setTop(0),e.setLeft(0),t.setTop(0),t.setLeft(0),fa)return e.setWidth(0),e.setHeight(0),t.setWidth(0),void t.setHeight(0);e.setWidth(1),e.setHeight(1),t.setWidth(1),t.setHeight(1);var n=this._context.configuration.options;n.get(40)?t.setClassName("monaco-editor-background textAreaCover "+Hs.OUTER_CLASS_NAME):0!==n.get(50).renderType?t.setClassName("monaco-editor-background textAreaCover "+Bs.CLASS_NAME):t.setClassName("monaco-editor-background textAreaCover")},t}(gr),ga=n("1YUG"),ma=function(){function e(e,t,n,i){this.configuration=e,this.viewModel=t,this.outgoingEvents=n,this.commandDelegate=i}return e.prototype._execMouseCommand=function(e,t){t.source="mouse",this.commandDelegate.executeEditorCommand(e,t)},e.prototype.paste=function(e,t,n,i,o){this.commandDelegate.paste(e,t,n,i,o)},e.prototype.type=function(e,t){this.commandDelegate.type(e,t)},e.prototype.replacePreviousChar=function(e,t,n){this.commandDelegate.replacePreviousChar(e,t,n)},e.prototype.compositionStart=function(e){this.commandDelegate.compositionStart(e)},e.prototype.compositionEnd=function(e){this.commandDelegate.compositionEnd(e)},e.prototype.cut=function(e){this.commandDelegate.cut(e)},e.prototype.setSelection=function(e,t){this.commandDelegate.executeEditorCommand(ga.CoreNavigationCommands.SetSelection,{source:e,selection:t})},e.prototype._validateViewColumn=function(e){var t=this.viewModel.getLineMinColumn(e.lineNumber);return e.column=4?this._selectAll():3===e.mouseDownCount?this._hasMulticursorModifier(e)?e.inSelectionMode?this._lastCursorLineSelectDrag(e.position):this._lastCursorLineSelect(e.position):e.inSelectionMode?this._lineSelectDrag(e.position):this._lineSelect(e.position):2===e.mouseDownCount?this._hasMulticursorModifier(e)?this._lastCursorWordSelect(e.position):e.inSelectionMode?this._wordSelectDrag(e.position):this._wordSelect(e.position):this._hasMulticursorModifier(e)?this._hasNonMulticursorModifier(e)||(e.shiftKey?this._columnSelect(e.position,e.mouseColumn,!0):e.inSelectionMode?this._lastCursorMoveToSelect(e.position):this._createCursor(e.position,!1)):e.inSelectionMode?e.altKey?this._columnSelect(e.position,e.mouseColumn,!0):this._moveToSelect(e.position):this.moveTo(e.position)},e.prototype._usualArgs=function(e){return e=this._validateViewColumn(e),{position:this._convertViewToModelPosition(e),viewPosition:e}},e.prototype.moveTo=function(e){this._execMouseCommand(ga.CoreNavigationCommands.MoveTo,this._usualArgs(e))},e.prototype._moveToSelect=function(e){this._execMouseCommand(ga.CoreNavigationCommands.MoveToSelect,this._usualArgs(e))},e.prototype._columnSelect=function(e,t,n){e=this._validateViewColumn(e),this._execMouseCommand(ga.CoreNavigationCommands.ColumnSelect,{position:this._convertViewToModelPosition(e),viewPosition:e,mouseColumn:t,doColumnSelect:n})},e.prototype._createCursor=function(e,t){e=this._validateViewColumn(e),this._execMouseCommand(ga.CoreNavigationCommands.CreateCursor,{position:this._convertViewToModelPosition(e),viewPosition:e,wholeLine:t})},e.prototype._lastCursorMoveToSelect=function(e){this._execMouseCommand(ga.CoreNavigationCommands.LastCursorMoveToSelect,this._usualArgs(e))},e.prototype._wordSelect=function(e){this._execMouseCommand(ga.CoreNavigationCommands.WordSelect,this._usualArgs(e))},e.prototype._wordSelectDrag=function(e){this._execMouseCommand(ga.CoreNavigationCommands.WordSelectDrag,this._usualArgs(e))},e.prototype._lastCursorWordSelect=function(e){this._execMouseCommand(ga.CoreNavigationCommands.LastCursorWordSelect,this._usualArgs(e))},e.prototype._lineSelect=function(e){this._execMouseCommand(ga.CoreNavigationCommands.LineSelect,this._usualArgs(e))},e.prototype._lineSelectDrag=function(e){this._execMouseCommand(ga.CoreNavigationCommands.LineSelectDrag,this._usualArgs(e))},e.prototype._lastCursorLineSelect=function(e){this._execMouseCommand(ga.CoreNavigationCommands.LastCursorLineSelect,this._usualArgs(e))},e.prototype._lastCursorLineSelectDrag=function(e){this._execMouseCommand(ga.CoreNavigationCommands.LastCursorLineSelectDrag,this._usualArgs(e))},e.prototype._selectAll=function(){this._execMouseCommand(ga.CoreNavigationCommands.SelectAll,{})},e.prototype._convertViewToModelPosition=function(e){return this.viewModel.coordinatesConverter.convertViewPositionToModelPosition(e)},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.prototype.emitMouseDrag=function(e){this.outgoingEvents.emitMouseDrag(e)},e.prototype.emitMouseDrop=function(e){this.outgoingEvents.emitMouseDrop(e)},e.prototype.emitMouseWheel=function(e){this.outgoingEvents.emitMouseWheel(e)},e}(),va=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),_a=function(e){function t(t){var n=e.call(this)||this;return n.onDidContentSizeChange=null,n.onDidScroll=null,n.onDidGainFocus=null,n.onDidLoseFocus=null,n.onKeyDown=null,n.onKeyUp=null,n.onContextMenu=null,n.onMouseMove=null,n.onMouseLeave=null,n.onMouseUp=null,n.onMouseDown=null,n.onMouseDrag=null,n.onMouseDrop=null,n.onMouseWheel=null,n._viewModel=t,n}return va(t,e),t.prototype.emitContentSizeChange=function(e){this.onDidContentSizeChange&&this.onDidContentSizeChange(e)},t.prototype.emitScrollChanged=function(e){this.onDidScroll&&this.onDidScroll(e)},t.prototype.emitViewFocusGained=function(){this.onDidGainFocus&&this.onDidGainFocus(void 0)},t.prototype.emitViewFocusLost=function(){this.onDidLoseFocus&&this.onDidLoseFocus(void 0)},t.prototype.emitKeyDown=function(e){this.onKeyDown&&this.onKeyDown(e)},t.prototype.emitKeyUp=function(e){this.onKeyUp&&this.onKeyUp(e)},t.prototype.emitContextMenu=function(e){this.onContextMenu&&this.onContextMenu(this._convertViewToModelMouseEvent(e))},t.prototype.emitMouseMove=function(e){this.onMouseMove&&this.onMouseMove(this._convertViewToModelMouseEvent(e))},t.prototype.emitMouseLeave=function(e){this.onMouseLeave&&this.onMouseLeave(this._convertViewToModelMouseEvent(e))},t.prototype.emitMouseUp=function(e){this.onMouseUp&&this.onMouseUp(this._convertViewToModelMouseEvent(e))},t.prototype.emitMouseDown=function(e){this.onMouseDown&&this.onMouseDown(this._convertViewToModelMouseEvent(e))},t.prototype.emitMouseDrag=function(e){this.onMouseDrag&&this.onMouseDrag(this._convertViewToModelMouseEvent(e))},t.prototype.emitMouseDrop=function(e){this.onMouseDrop&&this.onMouseDrop(this._convertViewToModelMouseEvent(e))},t.prototype.emitMouseWheel=function(e){this.onMouseWheel&&this.onMouseWheel(e)},t.prototype._convertViewToModelMouseEvent=function(e){return e.target?{event:e.event,target:this._convertViewToModelMouseTarget(e.target)}:e},t.prototype._convertViewToModelMouseTarget=function(e){return t.convertViewToModelMouseTarget(e,this._viewModel.coordinatesConverter)},t.convertViewToModelMouseTarget=function(e,t){return new ya(e.element,e.type,e.mouseColumn,e.position?t.convertViewPositionToModelPosition(e.position):null,e.range?t.convertViewRangeToModelRange(e.range):null,e.detail)},t}(le.a),ya=function(){function e(e,t,n,i,o,r){this.element=e,this.type=t,this.mouseColumn=n,this.position=i,this.range=o,this.detail=r}return e.prototype.toString=function(){return Wr.toString(this)},e}(),ba=function(){function e(e){this._createLine=e,this._set(1,[])}return e.prototype.flush=function(){this._set(1,[])},e.prototype._set=function(e,t){this._lines=t,this._rendLineNumberStart=e},e.prototype._get=function(){return{rendLineNumberStart:this._rendLineNumberStart,lines:this._lines}},e.prototype.getStartLineNumber=function(){return this._rendLineNumberStart},e.prototype.getEndLineNumber=function(){return this._rendLineNumberStart+this._lines.length-1},e.prototype.getCount=function(){return this._lines.length},e.prototype.getLine=function(e){var t=e-this._rendLineNumberStart;if(t<0||t>=this._lines.length)throw new Error("Illegal value for lineNumber");return this._lines[t]},e.prototype.onLinesDeleted=function(e,t){if(0===this.getCount())return null;var n=this.getStartLineNumber(),i=this.getEndLineNumber();if(ti)return null;for(var r=0,s=0,a=n;a<=i;a++){var u=a-this._rendLineNumberStart;e<=a&&a<=t&&(0===s?(r=u,s=1):s++)}if(e=n&&r<=i&&(this._lines[r-this._rendLineNumberStart].onContentChanged(),o=!0);return o},e.prototype.onLinesInserted=function(e,t){if(0===this.getCount())return null;var n=t-e+1,i=this.getStartLineNumber(),o=this.getEndLineNumber();if(e<=i)return this._rendLineNumberStart+=n,null;if(e>o)return null;if(n+e>o)return this._lines.splice(e-this._rendLineNumberStart,o-e+1);for(var r=[],s=0;sn))for(var a=Math.max(t,s.fromLineNumber),u=Math.min(n,s.toLineNumber),l=a;l<=u;l++){var c=l-this._rendLineNumberStart;this._lines[c].onTokensChanged(),i=!0}}return i},e}(),Ca=function(){function e(e){var t=this;this._host=e,this.domNode=this._createDomNode(),this._linesCollection=new ba((function(){return t._host.createVisibleLine()}))}return e.prototype._createDomNode=function(){var e=Object($o.b)(document.createElement("div"));return e.setClassName("view-layer"),e.setPosition("absolute"),e.domNode.setAttribute("role","presentation"),e.domNode.setAttribute("aria-hidden","true"),e},e.prototype.onConfigurationChanged=function(e){return!!e.hasChanged(107)},e.prototype.onFlushed=function(e){return this._linesCollection.flush(),!0},e.prototype.onLinesChanged=function(e){return this._linesCollection.onLinesChanged(e.fromLineNumber,e.toLineNumber)},e.prototype.onLinesDeleted=function(e){var t=this._linesCollection.onLinesDeleted(e.fromLineNumber,e.toLineNumber);if(t)for(var n=0,i=t.length;nt?(u=t)<=(s=Math.min(n,o.rendLineNumberStart-1))&&(this._insertLinesBefore(o,u,s,i,t),o.linesLength+=s-u+1):o.rendLineNumberStart0&&(this._removeLinesBefore(o,a),o.linesLength-=a),o.rendLineNumberStart=t,o.rendLineNumberStart+o.linesLength-1n){var s,a,u=Math.max(0,n-o.rendLineNumberStart+1);(a=(s=o.linesLength-1)-u+1)>0&&(this._removeLinesAfter(o,a),o.linesLength-=a)}return this._finishRendering(o,!1,i),o},e.prototype._renderUntouchedLines=function(e,t,n,i,o){for(var r=e.rendLineNumberStart,s=e.lines,a=t;a<=n;a++){var u=r+a;s[a].layoutLine(u,i[u-o])}},e.prototype._insertLinesBefore=function(e,t,n,i,o){for(var r=[],s=0,a=t;a<=n;a++)r[s++]=this.host.createVisibleLine();e.lines=r.concat(e.lines)},e.prototype._removeLinesBefore=function(e,t){for(var n=0;n=0;s--){var a=e.lines[s];i[s]&&(a.setDomNode(r),r=r.previousSibling)}},e.prototype._finishRenderingInvalidLines=function(e,t,n){var i=document.createElement("div");i.innerHTML=t;for(var o=0;o'),i.appendASCIIString(o),i.appendASCIIString(""),!0)},e.prototype.layoutLine=function(e,t){this._domNode&&(this._domNode.setTop(t),this._domNode.setHeight(this._lineHeight))},e}(),Oa=function(e){function t(t){var n=e.call(this,t)||this,i=n._context.configuration.options.get(107);return n._contentWidth=i.contentWidth,n.domNode.setHeight(0),n}return Sa(t,e),t.prototype.onConfigurationChanged=function(t){var n=this._context.configuration.options.get(107);return this._contentWidth=n.contentWidth,e.prototype.onConfigurationChanged.call(this,t)||!0},t.prototype.onScrollChanged=function(t){return e.prototype.onScrollChanged.call(this,t)||t.scrollWidthChanged},t.prototype._viewOverlaysRender=function(t){e.prototype._viewOverlaysRender.call(this,t),this.domNode.setWidth(Math.max(t.scrollWidth,this._contentWidth))},t}(La),Da=function(e){function t(t){var n=e.call(this,t)||this,i=n._context.configuration.options,o=i.get(107);return n._contentLeft=o.contentLeft,n.domNode.setClassName("margin-view-overlays"),n.domNode.setWidth(1),Jo.applyFontInfo(n.domNode,i.get(34)),n}return Sa(t,e),t.prototype.onConfigurationChanged=function(t){var n=this._context.configuration.options;Jo.applyFontInfo(this.domNode,n.get(34));var i=n.get(107);return this._contentLeft=i.contentLeft,e.prototype.onConfigurationChanged.call(this,t)||!0},t.prototype.onScrollChanged=function(t){return e.prototype.onScrollChanged.call(this,t)||t.scrollHeightChanged},t.prototype._viewOverlaysRender=function(t){e.prototype._viewOverlaysRender.call(this,t);var n=Math.min(t.scrollHeight,1e6);this.domNode.setHeight(n),this.domNode.setWidth(this._contentLeft)},t}(La),xa=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Ea=function(e,t){this.top=e,this.left=t},ka=function(e){function t(t,n){var i=e.call(this,t)||this;return i._viewDomNode=n,i._widgets={},i.domNode=Object($o.b)(document.createElement("div")),mr.write(i.domNode,1),i.domNode.setClassName("contentWidgets"),i.domNode.setPosition("absolute"),i.domNode.setTop(0),i.overflowingContentWidgetsDomNode=Object($o.b)(document.createElement("div")),mr.write(i.overflowingContentWidgetsDomNode,2),i.overflowingContentWidgetsDomNode.setClassName("overflowingContentWidgets"),i}return xa(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this),this._widgets={}},t.prototype.onConfigurationChanged=function(e){for(var t=0,n=Object.keys(this._widgets);t=i,c=a,d=o.viewportHeight-a>=i,h=e.left,f=t.left;return h+n>o.scrollLeft+o.viewportWidth&&(h=o.scrollLeft+o.viewportWidth-n),f+n>o.scrollLeft+o.viewportWidth&&(f=o.scrollLeft+o.viewportWidth-n),hs&&(a-=o=a-(s-i),n-=o),a=22,_=l+i<=c.height-22;return this._fixedOverflowWidgets?{fitsAbove:v,aboveTop:Math.max(u,22),aboveLeft:f,fitsBelow:_,belowTop:l,belowLeft:m}:{fitsAbove:v,aboveTop:Math.max(r,22),aboveLeft:h,fitsBelow:_,belowTop:s,belowLeft:g}},e.prototype._prepareRenderWidgetAtExactPositionOverflowing=function(e){return new Ea(e.top,e.left+this._contentLeft)},e.prototype._getTopAndBottomLeft=function(e){if(!this._viewRange)return[null,null];var t=e.linesVisibleRangesForRange(this._viewRange,!1);if(!t||0===t.length)return[null,null];for(var n=t[0],i=t[0],o=0,r=t;oi.lineNumber&&(i=s)}for(var a=1073741824,u=0,l=n.ranges;ue.endLineNumber||this.domNode.setMaxWidth(this._maxWidth))},e.prototype.prepareRender=function(e){this._renderData=this._prepareRenderWidget(e)},e.prototype.render=function(e){this._renderData?(this.allowEditorOverflow?(this.domNode.setTop(this._renderData.top),this.domNode.setLeft(this._renderData.left)):(this.domNode.setTop(this._renderData.top+e.scrollTop-e.bigNumbersDelta),this.domNode.setLeft(this._renderData.left)),this._isVisible||(this.domNode.setVisibility("inherit"),this.domNode.setAttribute("monaco-visible-content-widget","true"),this._isVisible=!0)):this._isVisible&&(this.domNode.removeAttribute("monaco-visible-content-widget"),this._isVisible=!1,this.domNode.setVisibility("hidden"))},e}(),Ma=(n("kw+w"),function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}()),Ta=!0,Aa=function(e){function t(t){var n=e.call(this)||this;n._context=t;var i=n._context.configuration.options,o=i.get(107);return n._lineHeight=i.get(49),n._renderLineHighlight=i.get(72),n._contentLeft=o.contentLeft,n._contentWidth=o.contentWidth,n._selectionIsEmpty=!0,n._cursorLineNumbers=[],n._selections=[],n._renderData=null,n._context.addEventHandler(n),n}return Ma(t,e),t.prototype.dispose=function(){this._context.removeEventHandler(this),e.prototype.dispose.call(this)},t.prototype._readFromSelections=function(){var e=!1,t=Ta?this._selections.slice(0,1):this._selections,n=t.map((function(e){return e.positionLineNumber}));n.sort((function(e,t){return e-t})),Xe.f(this._cursorLineNumbers,n)||(this._cursorLineNumbers=n,e=!0);var i=t.every((function(e){return e.isEmpty()}));return this._selectionIsEmpty!==i&&(this._selectionIsEmpty=i,e=!0),e},t.prototype.onThemeChanged=function(e){return this._readFromSelections()},t.prototype.onConfigurationChanged=function(e){var t=this._context.configuration.options,n=t.get(107);return this._lineHeight=t.get(49),this._renderLineHighlight=t.get(72),this._contentLeft=n.contentLeft,this._contentWidth=n.contentWidth,!0},t.prototype.onCursorStateChanged=function(e){return this._selections=e.selections,this._readFromSelections()},t.prototype.onFlushed=function(e){return!0},t.prototype.onLinesDeleted=function(e){return!0},t.prototype.onLinesInserted=function(e){return!0},t.prototype.onScrollChanged=function(e){return e.scrollWidthChanged||e.scrollTopChanged},t.prototype.onZonesChanged=function(e){return!0},t.prototype.prepareRender=function(e){if(this._shouldRenderThis()){for(var t=this._renderOne(e),n=e.visibleRange.startLineNumber,i=e.visibleRange.endLineNumber,o=this._cursorLineNumbers.length,r=0,s=[],a=n;a<=i;a++){for(var u=a-n;r