=this._renderResult.length?"":this._renderResult[n]}}var It=n(52073),Tt={};Tt.styleTagTransform=b(),Tt.setAttributes=f(),Tt.insert=g().bind(null,"head"),Tt.domAPI=u(),Tt.insertStyleElement=v(),c()(It.Z,Tt),It.Z&&It.Z.locals&&It.Z.locals;var Mt=n(84973),At=n(57659),Ot=n(98401);class Rt extends We{constructor(e){super(),this._context=e,this._primaryPosition=null;const t=this._context.configuration.options,n=t.get(131),i=t.get(43);this._lineHeight=t.get(58),this._spaceWidth=i.spaceWidth,this._maxIndentLeft=-1===n.wrappingColumn?-1:n.wrappingColumn*i.typicalHalfwidthCharacterWidth,this._bracketPairGuideOptions=t.get(13),this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options,n=t.get(131),i=t.get(43);return this._lineHeight=t.get(58),this._spaceWidth=i.spaceWidth,this._maxIndentLeft=-1===n.wrappingColumn?-1:n.wrappingColumn*i.typicalHalfwidthCharacterWidth,this._bracketPairGuideOptions=t.get(13),!0}onCursorStateChanged(e){var t;const n=e.selections[0].getPosition();return!(null===(t=this._primaryPosition)||void 0===t?void 0:t.equals(n))&&(this._primaryPosition=n,!0)}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}onLanguageConfigurationChanged(e){return!0}prepareRender(e){var t,n,i,o;if(!this._bracketPairGuideOptions.indentation&&!1===this._bracketPairGuideOptions.bracketPairs)return void(this._renderResult=null);const r=e.visibleRange.startLineNumber,s=e.visibleRange.endLineNumber,a=e.scrollWidth,l=this._lineHeight,c=this._primaryPosition,d=this.getGuidesByLine(r,s,c),u=[];for(let c=r;c<=s;c++){const s=c-r,h=d[s];let g="";const p=null!==(n=null===(t=e.visibleRangeForPosition(new le.L(c,1)))||void 0===t?void 0:t.left)&&void 0!==n?n:0;for(const t of h){const n=p+(t.visibleColumn-1)*this._spaceWidth;if(n>a||this._maxIndentLeft>0&&n>this._maxIndentLeft)break;const r=t.horizontalLine?t.horizontalLine.top?"horizontal-top":"horizontal-bottom":"vertical",s=t.horizontalLine?(null!==(o=null===(i=e.visibleRangeForPosition(new le.L(c,t.horizontalLine.endColumn)))||void 0===i?void 0:i.left)&&void 0!==o?o:n+this._spaceWidth)-n:this._spaceWidth;g+=`
`}u[s]=g}this._renderResult=u}getGuidesByLine(e,t,n){const i=!1!==this._bracketPairGuideOptions.bracketPairs?this._context.model.getBracketGuidesInRangeByLine(e,t,n,{highlightActive:this._bracketPairGuideOptions.highlightActiveBracketPair,horizontalGuides:!0===this._bracketPairGuideOptions.bracketPairsHorizontal?Mt.s6.Enabled:"active"===this._bracketPairGuideOptions.bracketPairsHorizontal?Mt.s6.EnabledForActive:Mt.s6.Disabled,includeInactive:!0===this._bracketPairGuideOptions.bracketPairs}):null,o=this._bracketPairGuideOptions.indentation?this._context.model.getLinesIndentGuides(e,t):null;let r=0,s=0,a=0;if(this._bracketPairGuideOptions.highlightActiveIndentation&&n){const i=this._context.model.getActiveIndentGuide(n.lineNumber,e,t);r=i.startLineNumber,s=i.endLineNumber,a=i.indent}const{indentSize:l}=this._context.model.getTextModelOptions(),c=[];for(let n=e;n<=t;n++){const t=new Array;c.push(t);const d=i?i[n-e]:[],u=new pt.H9(d),h=o?o[n-e]:[];for(let e=1;e<=h;e++){const i=(e-1)*l+1,o=0===d.length&&r<=n&&n<=s&&e===a;t.push(...u.takeWhile((e=>e.visibleColumn
!0))||[])}return c}render(e,t){if(!this._renderResult)return"";const n=t-e;return n<0||n>=this._renderResult.length?"":this._renderResult[n]}}function Pt(e){if(!e||!e.isTransparent())return e}(0,ze.Ic)(((e,t)=>{const n=e.getColor(Ve.tR);n&&t.addRule(`.monaco-editor .lines-content .core-guide-indent { box-shadow: 1px 0 0 0 ${n} inset; }`);const i=e.getColor(Ve.Ym)||n;i&&t.addRule(`.monaco-editor .lines-content .core-guide-indent-active { box-shadow: 1px 0 0 0 ${i} inset; }`);const o=[{bracketColor:Ve.zJ,guideColor:Ve.oV,guideColorActive:Ve.Qb},{bracketColor:Ve.Vs,guideColor:Ve.m$,guideColorActive:Ve.m3},{bracketColor:Ve.CE,guideColor:Ve.DS,guideColorActive:Ve.To},{bracketColor:Ve.UP,guideColor:Ve.lS,guideColorActive:Ve.L7},{bracketColor:Ve.r0,guideColor:Ve.Jn,guideColorActive:Ve.HV},{bracketColor:Ve.m1,guideColor:Ve.YF,guideColorActive:Ve.f9}],r=new At.WE;let s=o.map((t=>{var n,i;const o=e.getColor(t.bracketColor),r=e.getColor(t.guideColor),s=e.getColor(t.guideColorActive),a=Pt(null!==(n=Pt(r))&&void 0!==n?n:null==o?void 0:o.transparent(.3)),l=Pt(null!==(i=Pt(s))&&void 0!==i?i:o);if(a&&l)return{guideColor:a,guideColorActive:l}})).filter(Ot.$K);if(s.length>0){for(let e=0;e<30;e++){const n=s[e%s.length];t.addRule(`.monaco-editor .${r.getInlineClassNameOfLevel(e).replace(/ /g,".")} { --guide-color: ${n.guideColor}; --guide-color-active: ${n.guideColorActive}; }`)}t.addRule(".monaco-editor .vertical { box-shadow: 1px 0 0 0 var(--guide-color) inset; }"),t.addRule(".monaco-editor .horizontal-top { border-top: 1px solid var(--guide-color); }"),t.addRule(".monaco-editor .horizontal-bottom { border-bottom: 1px solid var(--guide-color); }"),t.addRule(`.monaco-editor .vertical.${r.activeClassName} { box-shadow: 1px 0 0 0 var(--guide-color-active) inset; }`),t.addRule(`.monaco-editor .horizontal-top.${r.activeClassName} { border-top: 1px solid var(--guide-color-active); }`),t.addRule(`.monaco-editor .horizontal-bottom.${r.activeClassName} { border-bottom: 1px solid var(--guide-color-active); }`)}}));var Ft=n(19523),Bt={};Bt.styleTagTransform=b(),Bt.setAttributes=f(),Bt.insert=g().bind(null,"head"),Bt.domAPI=u(),Bt.insertStyleElement=v(),c()(Ft.Z,Bt),Ft.Z&&Ft.Z.locals&&Ft.Z.locals;class Wt{constructor(){this._currentVisibleRange=new ce.e(1,1,1,1)}getCurrentVisibleRange(){return this._currentVisibleRange}setCurrentVisibleRange(e){this._currentVisibleRange=e}}class Vt{constructor(e,t,n,i,o,r){this.lineNumber=e,this.startColumn=t,this.endColumn=n,this.startScrollTop=i,this.stopScrollTop=o,this.scrollType=r,this.type="range",this.minLineNumber=e,this.maxLineNumber=e}}class zt{constructor(e,t,n,i){this.selections=e,this.startScrollTop=t,this.stopScrollTop=n,this.scrollType=i,this.type="selections";let o=e[0].startLineNumber,r=e[0].endLineNumber;for(let t=1,n=e.length;t{this._updateLineWidthsSlow()}),200),this._asyncCheckMonospaceFontAssumptions=new P.pY((()=>{this._checkMonospaceFontAssumptions()}),2e3),this._lastRenderedData=new Wt,this._horizontalRevealRequest=null}dispose(){this._asyncUpdateLineWidths.dispose(),this._asyncCheckMonospaceFontAssumptions.dispose(),super.dispose()}getDomNode(){return this.domNode}createVisibleLine(){return new ne(this._viewLineOptions)}onConfigurationChanged(e){this._visibleLines.onConfigurationChanged(e),e.hasChanged(131)&&(this._maxLineWidth=0);const t=this._context.configuration.options,n=t.get(43),i=t.get(131);return this._lineHeight=t.get(58),this._typicalHalfwidthCharacterWidth=n.typicalHalfwidthCharacterWidth,this._isViewportWrapping=i.isViewportWrapping,this._revealHorizontalRightPadding=t.get(88),this._cursorSurroundingLines=t.get(25),this._cursorSurroundingLinesStyle=t.get(26),this._canUseLayerHinting=!t.get(28),E.V.applyFontInfo(this.domNode,n),this._onOptionsMaybeChanged(),e.hasChanged(130)&&(this._maxLineWidth=0),!0}_onOptionsMaybeChanged(){const e=this._context.configuration,t=new te(e,this._context.theme.type);if(!this._viewLineOptions.equals(t)){this._viewLineOptions=t;const e=this._visibleLines.getStartLineNumber(),n=this._visibleLines.getEndLineNumber();for(let t=e;t<=n;t++)this._visibleLines.getVisibleLine(t).onOptionsChanged(this._viewLineOptions);return!0}return!1}onCursorStateChanged(e){const t=this._visibleLines.getStartLineNumber(),n=this._visibleLines.getEndLineNumber();let i=!1;for(let e=t;e<=n;e++)i=this._visibleLines.getVisibleLine(e).onSelectionChanged()||i;return i}onDecorationsChanged(e){{const e=this._visibleLines.getStartLineNumber(),t=this._visibleLines.getEndLineNumber();for(let n=e;n<=t;n++)this._visibleLines.getVisibleLine(n).onDecorationsChanged()}return!0}onFlushed(e){const t=this._visibleLines.onFlushed(e);return this._maxLineWidth=0,t}onLinesChanged(e){return this._visibleLines.onLinesChanged(e)}onLinesDeleted(e){return this._visibleLines.onLinesDeleted(e)}onLinesInserted(e){return this._visibleLines.onLinesInserted(e)}onRevealRangeRequest(e){const t=this._computeScrollTopToRevealRange(this._context.viewLayout.getFutureViewport(),e.source,e.range,e.selections,e.verticalType);if(-1===t)return!1;let n=this._context.viewLayout.validateScrollPosition({scrollTop:t});e.revealHorizontal?e.range&&e.range.startLineNumber!==e.range.endLineNumber?n={scrollTop:n.scrollTop,scrollLeft:0}:e.range?this._horizontalRevealRequest=new Vt(e.range.startLineNumber,e.range.startColumn,e.range.endColumn,this._context.viewLayout.getCurrentScrollTop(),n.scrollTop,e.scrollType):e.selections&&e.selections.length>0&&(this._horizontalRevealRequest=new zt(e.selections,this._context.viewLayout.getCurrentScrollTop(),n.scrollTop,e.scrollType)):this._horizontalRevealRequest=null;const i=Math.abs(this._context.viewLayout.getCurrentScrollTop()-n.scrollTop)<=this._lineHeight?1:e.scrollType;return this._context.model.setScrollPosition(n,i),!0}onScrollChanged(e){if(this._horizontalRevealRequest&&e.scrollLeftChanged&&(this._horizontalRevealRequest=null),this._horizontalRevealRequest&&e.scrollTopChanged){const t=Math.min(this._horizontalRevealRequest.startScrollTop,this._horizontalRevealRequest.stopScrollTop),n=Math.max(this._horizontalRevealRequest.startScrollTop,this._horizontalRevealRequest.stopScrollTop);(e.scrollTopn)&&(this._horizontalRevealRequest=null)}return this.domNode.setWidth(e.scrollWidth),this._visibleLines.onScrollChanged(e)||!0}onTokensChanged(e){return this._visibleLines.onTokensChanged(e)}onZonesChanged(e){return this._context.model.setMaxLineWidth(this._maxLineWidth),this._visibleLines.onZonesChanged(e)}onThemeChanged(e){return this._onOptionsMaybeChanged()}getPositionFromDOMInfo(e,t){const n=this._getViewLineDomNode(e);if(null===n)return null;const i=this._getLineNumberFor(n);if(-1===i)return null;if(i<1||i>this._context.model.getLineCount())return null;if(1===this._context.model.getLineMaxColumn(i))return new le.L(i,1);const o=this._visibleLines.getStartLineNumber(),r=this._visibleLines.getEndLineNumber();if(ir)return null;let s=this._visibleLines.getVisibleLine(i).getColumnOfNodeOffset(i,e,t);const a=this._context.model.getLineMinColumn(i);return sn?-1:this._visibleLines.getVisibleLine(e).getWidth()}linesVisibleRangesForRange(e,t){if(this.shouldRender())return null;const n=e.endLineNumber,i=ce.e.intersectRanges(e,this._lastRenderedData.getCurrentVisibleRange());if(!i)return null;let o=[],r=0;const s=new ee(this.domNode.domNode,this._textRangeRestingSpot);let a=0;t&&(a=this._context.model.coordinatesConverter.convertViewPositionToModelPosition(new le.L(i.startLineNumber,1)).lineNumber);const l=this._visibleLines.getStartLineNumber(),c=this._visibleLines.getEndLineNumber();for(let e=i.startLineNumber;e<=i.endLineNumber;e++){if(ec)continue;const d=e===i.startLineNumber?i.startColumn:1,u=e===i.endLineNumber?i.endColumn:this._context.model.getLineMaxColumn(e),h=this._visibleLines.getVisibleLine(e).getVisibleRangesForRange(e,d,u,s);if(h){if(t&ðis._visibleLines.getEndLineNumber()?null:this._visibleLines.getVisibleLine(e).getVisibleRangesForRange(e,t,n,new ee(this.domNode.domNode,this._textRangeRestingSpot))}visibleRangeForPosition(e){const t=this._visibleRangesForLineRange(e.lineNumber,e.column,e.column);return t?new K(t.outsideRenderedLine,t.ranges[0].left):null}updateLineWidths(){this._updateLineWidths(!1)}_updateLineWidthsFast(){return this._updateLineWidths(!0)}_updateLineWidthsSlow(){this._updateLineWidths(!1)}_updateLineWidths(e){const t=this._visibleLines.getStartLineNumber(),n=this._visibleLines.getEndLineNumber();let i=1,o=!0;for(let r=t;r<=n;r++){const t=this._visibleLines.getVisibleLine(r);!e||t.getWidthIsFast()?i=Math.max(i,t.getWidth()):o=!1}return o&&1===t&&n===this._context.model.getLineCount()&&(this._maxLineWidth=0),this._ensureMaxLineWidth(i),o}_checkMonospaceFontAssumptions(){let e=-1,t=-1;const n=this._visibleLines.getStartLineNumber(),i=this._visibleLines.getEndLineNumber();for(let o=n;o<=i;o++){const n=this._visibleLines.getVisibleLine(o);if(n.needsMonospaceFontCheck()){const i=n.getWidth();i>t&&(t=i,e=o)}}if(-1!==e&&!this._visibleLines.getVisibleLine(e).monospaceAssumptionsAreValid())for(let e=n;e<=i;e++)this._visibleLines.getVisibleLine(e).onMonospaceAssumptionsInvalidated()}prepareRender(){throw new Error("Not supported")}render(){throw new Error("Not supported")}renderText(e){if(this._visibleLines.renderLines(e),this._lastRenderedData.setCurrentVisibleRange(e.visibleRange),this.domNode.setWidth(this._context.viewLayout.getScrollWidth()),this.domNode.setHeight(Math.min(this._context.viewLayout.getScrollHeight(),1e6)),this._horizontalRevealRequest){const t=this._horizontalRevealRequest;if(e.startLineNumber<=t.minLineNumber&&t.maxLineNumber<=e.endLineNumber){this._horizontalRevealRequest=null,this.onDidRender();const e=this._computeScrollLeftToReveal(t);e&&(this._isViewportWrapping||this._ensureMaxLineWidth(e.maxHorizontalOffset),this._context.model.setScrollPosition({scrollLeft:e.scrollLeft},t.scrollType))}}if(this._updateLineWidthsFast()||this._asyncUpdateLineWidths.schedule(),A.IJ&&!this._asyncCheckMonospaceFontAssumptions.isScheduled()){const e=this._visibleLines.getStartLineNumber(),t=this._visibleLines.getEndLineNumber();for(let n=e;n<=t;n++)if(this._visibleLines.getVisibleLine(n).needsMonospaceFontCheck()){this._asyncCheckMonospaceFontAssumptions.schedule();break}}this._linesContent.setLayerHinting(this._canUseLayerHinting),this._linesContent.setContain("strict");const t=this._context.viewLayout.getCurrentScrollTop()-e.bigNumbersDelta;this._linesContent.setTop(-t),this._linesContent.setLeft(-this._context.viewLayout.getCurrentScrollLeft())}_ensureMaxLineWidth(e){const t=Math.ceil(e);this._maxLineWidth0){let e=i[0].startLineNumber,t=i[0].endLineNumber;for(let n=1,o=i.length;ns){if(!l)return-1;u=c}else if(5===o||6===o)if(6===o&&r<=c&&d<=a)u=r;else{const e=c-Math.max(5*this._lineHeight,.2*s),t=d-s;u=Math.max(t,e)}else if(1===o||2===o)if(2===o&&r<=c&&d<=a)u=r;else{const e=(c+d)/2;u=Math.max(0,e-s/2)}else u=this._computeMinimumScrolling(r,a,c,d,3===o,4===o);return u}_computeScrollLeftToReveal(e){const t=this._context.viewLayout.getCurrentViewport(),n=t.left,i=n+t.width;let o=1073741824,r=0;if("range"===e.type){const t=this._visibleRangesForLineRange(e.lineNumber,e.startColumn,e.endColumn);if(!t)return null;for(const e of t.ranges)o=Math.min(o,Math.round(e.left)),r=Math.max(r,Math.round(e.left+e.width))}else for(const t of e.selections){if(t.startLineNumber!==t.endLineNumber)return null;const e=this._visibleRangesForLineRange(t.startLineNumber,t.startColumn,t.endColumn);if(!e)return null;for(const t of e.ranges)o=Math.min(o,Math.round(t.left)),r=Math.max(r,Math.round(t.left+t.width))}return o=Math.max(0,o-Ht.HORIZONTAL_EXTRA_PX),r+=this._revealHorizontalRightPadding,"selections"===e.type&&r-o>t.width?null:{scrollLeft:this._computeMinimumScrolling(n,i,o,r),maxHorizontalOffset:r}}_computeMinimumScrolling(e,t,n,i,o,r){o=!!o,r=!!r;const s=(t|=0)-(e|=0);return(i|=0)-(n|=0)t?Math.max(0,i-s):e:n}}Ht.HORIZONTAL_EXTRA_PX=30;var jt=n(55228),Ut={};Ut.styleTagTransform=b(),Ut.setAttributes=f(),Ut.insert=g().bind(null,"head"),Ut.domAPI=u(),Ut.insertStyleElement=v(),c()(jt.Z,Ut),jt.Z&&jt.Z.locals&&jt.Z.locals;class Kt extends Et{constructor(e){super(),this._context=e;const t=this._context.configuration.options.get(130);this._decorationsLeft=t.decorationsLeft,this._decorationsWidth=t.decorationsWidth,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options.get(130);return this._decorationsLeft=t.decorationsLeft,this._decorationsWidth=t.decorationsWidth,!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}_getDecorations(e){const t=e.getDecorationsInViewport();let n=[],i=0;for(let e=0,o=t.length;e ',r=[];for(let e=t;e<=n;e++){const n=e-t,s=i[n];let a="";for(let e=0,t=s.length;e