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UACAO,QAAS,KAGrB,CACA,gBAAAJ,CAAiBC,EAAW5M,GACxB,IAAInK,EAC0C,QAA7CA,EAAKuN,GAAuBkC,IAAItF,UAA4B,IAAPnK,GAAyBA,EAAGgQ,eACtF,EAEG,MAAMoH,WAA6B,KACtC,WAAAzhB,GACIgB,MAAM,CACF0R,GAAI,4CACJqN,OAAO,QAAU,oCAAqC,wCACtDmB,aAAc,mCAAgD,GAC9DI,WAAY,CACRN,UACAO,QAAS,IAGrB,CACA,gBAAAJ,CAAiBC,EAAW5M,GACxB,IAAInK,EAC0C,QAA7CA,EAAKuN,GAAuBkC,IAAItF,UAA4B,IAAPnK,GAAyBA,EAAGmQ,aACtF,EAEG,MAAMkH,WAAqB,KAC9B,WAAA1hB,GACIgB,MAAM,CACF0R,GAAI,6BACJqN,OAAO,QAAU,qBAAsB,iBACvCmB,aAAc,mCAAgD,GAC9DI,WAAY,CACRN,UACAO,QAAS,IAGrB,CACA,gBAAAJ,CAAiBC,EAAW5M,GACxB,IAAInK,EAC0C,QAA7CA,EAAKuN,GAAuBkC,IAAItF,UAA4B,IAAPnK,GAAyBA,EAAGiQ,cACtF,GCxHJ,QAA2B1C,GAAuBoC,GAAIpC,GAAwB,IAC9E,QAAgBkI,KAChB,QAAgBmB,KAChB,QAAgBO,KAChB,QAAgBH,KAChB,QAAgBI,KAChB,QAAgBC,G","sources":["file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/monaco-editor@0.50.0/node_modules/monaco-editor/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollWidget.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/monaco-editor@0.50.0/node_modules/monaco-editor/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollElement.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/monaco-editor@0.50.0/node_modules/monaco-editor/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollModelProvider.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/monaco-editor@0.50.0/node_modules/monaco-editor/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollProvider.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/monaco-editor@0.50.0/node_modules/monaco-editor/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollController.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/monaco-editor@0.50.0/node_modules/monaco-editor/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollActions.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/monaco-editor@0.50.0/node_modules/monaco-editor/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollContribution.js"],"sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport * as dom from '../../../../base/browser/dom.js';\nimport { createTrustedTypesPolicy } from '../../../../base/browser/trustedTypes.js';\nimport { equals } from '../../../../base/common/arrays.js';\nimport { Disposable, DisposableStore } from '../../../../base/common/lifecycle.js';\nimport { ThemeIcon } from '../../../../base/common/themables.js';\nimport './stickyScroll.css';\nimport { getColumnOfNodeOffset } from '../../../browser/viewParts/lines/viewLine.js';\nimport { EmbeddedCodeEditorWidget } from '../../../browser/widget/codeEditor/embeddedCodeEditorWidget.js';\nimport { Position } from '../../../common/core/position.js';\nimport { StringBuilder } from '../../../common/core/stringBuilder.js';\nimport { LineDecoration } from '../../../common/viewLayout/lineDecorations.js';\nimport { RenderLineInput, renderViewLine } from '../../../common/viewLayout/viewLineRenderer.js';\nimport { foldingCollapsedIcon, foldingExpandedIcon } from '../../folding/browser/foldingDecorations.js';\nexport class StickyScrollWidgetState {\n constructor(startLineNumbers, endLineNumbers, lastLineRelativePosition, showEndForLine = null) {\n this.startLineNumbers = startLineNumbers;\n this.endLineNumbers = endLineNumbers;\n this.lastLineRelativePosition = lastLineRelativePosition;\n this.showEndForLine = showEndForLine;\n }\n equals(other) {\n return !!other\n && this.lastLineRelativePosition === other.lastLineRelativePosition\n && this.showEndForLine === other.showEndForLine\n && equals(this.startLineNumbers, other.startLineNumbers)\n && equals(this.endLineNumbers, other.endLineNumbers);\n }\n}\nconst _ttPolicy = createTrustedTypesPolicy('stickyScrollViewLayer', { createHTML: value => value });\nconst STICKY_INDEX_ATTR = 'data-sticky-line-index';\nconst STICKY_IS_LINE_ATTR = 'data-sticky-is-line';\nconst STICKY_IS_LINE_NUMBER_ATTR = 'data-sticky-is-line-number';\nconst STICKY_IS_FOLDING_ICON_ATTR = 'data-sticky-is-folding-icon';\nexport class StickyScrollWidget extends Disposable {\n constructor(_editor) {\n super();\n this._editor = _editor;\n this._foldingIconStore = new DisposableStore();\n this._rootDomNode = document.createElement('div');\n this._lineNumbersDomNode = document.createElement('div');\n this._linesDomNodeScrollable = document.createElement('div');\n this._linesDomNode = document.createElement('div');\n this._lineHeight = this._editor.getOption(67 /* EditorOption.lineHeight */);\n this._renderedStickyLines = [];\n this._lineNumbers = [];\n this._lastLineRelativePosition = 0;\n this._minContentWidthInPx = 0;\n this._isOnGlyphMargin = false;\n this._lineNumbersDomNode.className = 'sticky-widget-line-numbers';\n this._lineNumbersDomNode.setAttribute('role', 'none');\n this._linesDomNode.className = 'sticky-widget-lines';\n this._linesDomNode.setAttribute('role', 'list');\n this._linesDomNodeScrollable.className = 'sticky-widget-lines-scrollable';\n this._linesDomNodeScrollable.appendChild(this._linesDomNode);\n this._rootDomNode.className = 'sticky-widget';\n this._rootDomNode.classList.toggle('peek', _editor instanceof EmbeddedCodeEditorWidget);\n this._rootDomNode.appendChild(this._lineNumbersDomNode);\n this._rootDomNode.appendChild(this._linesDomNodeScrollable);\n const updateScrollLeftPosition = () => {\n this._linesDomNode.style.left = this._editor.getOption(115 /* EditorOption.stickyScroll */).scrollWithEditor ? `-${this._editor.getScrollLeft()}px` : '0px';\n };\n this._register(this._editor.onDidChangeConfiguration((e) => {\n if (e.hasChanged(115 /* EditorOption.stickyScroll */)) {\n updateScrollLeftPosition();\n }\n if (e.hasChanged(67 /* EditorOption.lineHeight */)) {\n this._lineHeight = this._editor.getOption(67 /* EditorOption.lineHeight */);\n }\n }));\n this._register(this._editor.onDidScrollChange((e) => {\n if (e.scrollLeftChanged) {\n updateScrollLeftPosition();\n }\n if (e.scrollWidthChanged) {\n this._updateWidgetWidth();\n }\n }));\n this._register(this._editor.onDidChangeModel(() => {\n updateScrollLeftPosition();\n this._updateWidgetWidth();\n }));\n this._register(this._foldingIconStore);\n updateScrollLeftPosition();\n this._register(this._editor.onDidLayoutChange((e) => {\n this._updateWidgetWidth();\n }));\n this._updateWidgetWidth();\n }\n get lineNumbers() {\n return this._lineNumbers;\n }\n get lineNumberCount() {\n return this._lineNumbers.length;\n }\n getRenderedStickyLine(lineNumber) {\n return this._renderedStickyLines.find(stickyLine => stickyLine.lineNumber === lineNumber);\n }\n getCurrentLines() {\n return this._lineNumbers;\n }\n setState(_state, foldingModel, _rebuildFromLine) {\n if (_rebuildFromLine === undefined &&\n ((!this._previousState && !_state) || (this._previousState && this._previousState.equals(_state)))) {\n return;\n }\n const isWidgetHeightZero = this._isWidgetHeightZero(_state);\n const state = isWidgetHeightZero ? undefined : _state;\n const rebuildFromLine = isWidgetHeightZero ? 0 : this._findLineToRebuildWidgetFrom(_state, _rebuildFromLine);\n this._renderRootNode(state, foldingModel, rebuildFromLine);\n this._previousState = _state;\n }\n _isWidgetHeightZero(state) {\n if (!state) {\n return true;\n }\n const futureWidgetHeight = state.startLineNumbers.length * this._lineHeight + state.lastLineRelativePosition;\n if (futureWidgetHeight > 0) {\n this._lastLineRelativePosition = state.lastLineRelativePosition;\n const lineNumbers = [...state.startLineNumbers];\n if (state.showEndForLine !== null) {\n lineNumbers[state.showEndForLine] = state.endLineNumbers[state.showEndForLine];\n }\n this._lineNumbers = lineNumbers;\n }\n else {\n this._lastLineRelativePosition = 0;\n this._lineNumbers = [];\n }\n return futureWidgetHeight === 0;\n }\n _findLineToRebuildWidgetFrom(state, _rebuildFromLine) {\n if (!state || !this._previousState) {\n return 0;\n }\n if (_rebuildFromLine !== undefined) {\n return _rebuildFromLine;\n }\n const previousState = this._previousState;\n const indexOfLinesAlreadyRendered = state.startLineNumbers.findIndex(startLineNumber => !previousState.startLineNumbers.includes(startLineNumber));\n return (indexOfLinesAlreadyRendered === -1) ? 0 : indexOfLinesAlreadyRendered;\n }\n _updateWidgetWidth() {\n const layoutInfo = this._editor.getLayoutInfo();\n const lineNumbersWidth = layoutInfo.contentLeft;\n this._lineNumbersDomNode.style.width = `${lineNumbersWidth}px`;\n this._linesDomNodeScrollable.style.setProperty('--vscode-editorStickyScroll-scrollableWidth', `${this._editor.getScrollWidth() - layoutInfo.verticalScrollbarWidth}px`);\n this._rootDomNode.style.width = `${layoutInfo.width - layoutInfo.verticalScrollbarWidth}px`;\n }\n _clearStickyLinesFromLine(clearFromLine) {\n this._foldingIconStore.clear();\n // Removing only the lines that need to be rerendered\n for (let i = clearFromLine; i < this._renderedStickyLines.length; i++) {\n const stickyLine = this._renderedStickyLines[i];\n stickyLine.lineNumberDomNode.remove();\n stickyLine.lineDomNode.remove();\n }\n // Keep the lines that need to be updated\n this._renderedStickyLines = this._renderedStickyLines.slice(0, clearFromLine);\n this._rootDomNode.style.display = 'none';\n }\n _useFoldingOpacityTransition(requireTransitions) {\n this._lineNumbersDomNode.style.setProperty('--vscode-editorStickyScroll-foldingOpacityTransition', `opacity ${requireTransitions ? 0.5 : 0}s`);\n }\n _setFoldingIconsVisibility(allVisible) {\n for (const line of this._renderedStickyLines) {\n const foldingIcon = line.foldingIcon;\n if (!foldingIcon) {\n continue;\n }\n foldingIcon.setVisible(allVisible ? true : foldingIcon.isCollapsed);\n }\n }\n async _renderRootNode(state, foldingModel, rebuildFromLine) {\n this._clearStickyLinesFromLine(rebuildFromLine);\n if (!state) {\n return;\n }\n // For existing sticky lines update the top and z-index\n for (const stickyLine of this._renderedStickyLines) {\n this._updateTopAndZIndexOfStickyLine(stickyLine);\n }\n // For new sticky lines\n const layoutInfo = this._editor.getLayoutInfo();\n const linesToRender = this._lineNumbers.slice(rebuildFromLine);\n for (const [index, line] of linesToRender.entries()) {\n const stickyLine = this._renderChildNode(index + rebuildFromLine, line, foldingModel, layoutInfo);\n if (!stickyLine) {\n continue;\n }\n this._linesDomNode.appendChild(stickyLine.lineDomNode);\n this._lineNumbersDomNode.appendChild(stickyLine.lineNumberDomNode);\n this._renderedStickyLines.push(stickyLine);\n }\n if (foldingModel) {\n this._setFoldingHoverListeners();\n this._useFoldingOpacityTransition(!this._isOnGlyphMargin);\n }\n const widgetHeight = this._lineNumbers.length * this._lineHeight + this._lastLineRelativePosition;\n this._rootDomNode.style.display = 'block';\n this._lineNumbersDomNode.style.height = `${widgetHeight}px`;\n this._linesDomNodeScrollable.style.height = `${widgetHeight}px`;\n this._rootDomNode.style.height = `${widgetHeight}px`;\n this._rootDomNode.style.marginLeft = '0px';\n this._minContentWidthInPx = Math.max(...this._renderedStickyLines.map(l => l.scrollWidth)) + layoutInfo.verticalScrollbarWidth;\n this._editor.layoutOverlayWidget(this);\n }\n _setFoldingHoverListeners() {\n const showFoldingControls = this._editor.getOption(110 /* EditorOption.showFoldingControls */);\n if (showFoldingControls !== 'mouseover') {\n return;\n }\n this._foldingIconStore.add(dom.addDisposableListener(this._lineNumbersDomNode, dom.EventType.MOUSE_ENTER, () => {\n this._isOnGlyphMargin = true;\n this._setFoldingIconsVisibility(true);\n }));\n this._foldingIconStore.add(dom.addDisposableListener(this._lineNumbersDomNode, dom.EventType.MOUSE_LEAVE, () => {\n this._isOnGlyphMargin = false;\n this._useFoldingOpacityTransition(true);\n this._setFoldingIconsVisibility(false);\n }));\n }\n _renderChildNode(index, line, foldingModel, layoutInfo) {\n const viewModel = this._editor._getViewModel();\n if (!viewModel) {\n return;\n }\n const viewLineNumber = viewModel.coordinatesConverter.convertModelPositionToViewPosition(new Position(line, 1)).lineNumber;\n const lineRenderingData = viewModel.getViewLineRenderingData(viewLineNumber);\n const lineNumberOption = this._editor.getOption(68 /* EditorOption.lineNumbers */);\n let actualInlineDecorations;\n try {\n actualInlineDecorations = LineDecoration.filter(lineRenderingData.inlineDecorations, viewLineNumber, lineRenderingData.minColumn, lineRenderingData.maxColumn);\n }\n catch (err) {\n actualInlineDecorations = [];\n }\n const renderLineInput = new RenderLineInput(true, true, lineRenderingData.content, lineRenderingData.continuesWithWrappedLine, lineRenderingData.isBasicASCII, lineRenderingData.containsRTL, 0, lineRenderingData.tokens, actualInlineDecorations, lineRenderingData.tabSize, lineRenderingData.startVisibleColumn, 1, 1, 1, 500, 'none', true, true, null);\n const sb = new StringBuilder(2000);\n const renderOutput = renderViewLine(renderLineInput, sb);\n let newLine;\n if (_ttPolicy) {\n newLine = _ttPolicy.createHTML(sb.build());\n }\n else {\n newLine = sb.build();\n }\n const lineHTMLNode = document.createElement('span');\n lineHTMLNode.setAttribute(STICKY_INDEX_ATTR, String(index));\n lineHTMLNode.setAttribute(STICKY_IS_LINE_ATTR, '');\n lineHTMLNode.setAttribute('role', 'listitem');\n lineHTMLNode.tabIndex = 0;\n lineHTMLNode.className = 'sticky-line-content';\n lineHTMLNode.classList.add(`stickyLine${line}`);\n lineHTMLNode.style.lineHeight = `${this._lineHeight}px`;\n lineHTMLNode.innerHTML = newLine;\n const lineNumberHTMLNode = document.createElement('span');\n lineNumberHTMLNode.setAttribute(STICKY_INDEX_ATTR, String(index));\n lineNumberHTMLNode.setAttribute(STICKY_IS_LINE_NUMBER_ATTR, '');\n lineNumberHTMLNode.className = 'sticky-line-number';\n lineNumberHTMLNode.style.lineHeight = `${this._lineHeight}px`;\n const lineNumbersWidth = layoutInfo.contentLeft;\n lineNumberHTMLNode.style.width = `${lineNumbersWidth}px`;\n const innerLineNumberHTML = document.createElement('span');\n if (lineNumberOption.renderType === 1 /* RenderLineNumbersType.On */ || lineNumberOption.renderType === 3 /* RenderLineNumbersType.Interval */ && line % 10 === 0) {\n innerLineNumberHTML.innerText = line.toString();\n }\n else if (lineNumberOption.renderType === 2 /* RenderLineNumbersType.Relative */) {\n innerLineNumberHTML.innerText = Math.abs(line - this._editor.getPosition().lineNumber).toString();\n }\n innerLineNumberHTML.className = 'sticky-line-number-inner';\n innerLineNumberHTML.style.lineHeight = `${this._lineHeight}px`;\n innerLineNumberHTML.style.width = `${layoutInfo.lineNumbersWidth}px`;\n innerLineNumberHTML.style.paddingLeft = `${layoutInfo.lineNumbersLeft}px`;\n lineNumberHTMLNode.appendChild(innerLineNumberHTML);\n const foldingIcon = this._renderFoldingIconForLine(foldingModel, line);\n if (foldingIcon) {\n lineNumberHTMLNode.appendChild(foldingIcon.domNode);\n }\n this._editor.applyFontInfo(lineHTMLNode);\n this._editor.applyFontInfo(innerLineNumberHTML);\n lineNumberHTMLNode.style.lineHeight = `${this._lineHeight}px`;\n lineHTMLNode.style.lineHeight = `${this._lineHeight}px`;\n lineNumberHTMLNode.style.height = `${this._lineHeight}px`;\n lineHTMLNode.style.height = `${this._lineHeight}px`;\n const renderedLine = new RenderedStickyLine(index, line, lineHTMLNode, lineNumberHTMLNode, foldingIcon, renderOutput.characterMapping, lineHTMLNode.scrollWidth);\n return this._updateTopAndZIndexOfStickyLine(renderedLine);\n }\n _updateTopAndZIndexOfStickyLine(stickyLine) {\n var _a;\n const index = stickyLine.index;\n const lineHTMLNode = stickyLine.lineDomNode;\n const lineNumberHTMLNode = stickyLine.lineNumberDomNode;\n const isLastLine = index === this._lineNumbers.length - 1;\n const lastLineZIndex = '0';\n const intermediateLineZIndex = '1';\n lineHTMLNode.style.zIndex = isLastLine ? lastLineZIndex : intermediateLineZIndex;\n lineNumberHTMLNode.style.zIndex = isLastLine ? lastLineZIndex : intermediateLineZIndex;\n const lastLineTop = `${index * this._lineHeight + this._lastLineRelativePosition + (((_a = stickyLine.foldingIcon) === null || _a === void 0 ? void 0 : _a.isCollapsed) ? 1 : 0)}px`;\n const intermediateLineTop = `${index * this._lineHeight}px`;\n lineHTMLNode.style.top = isLastLine ? lastLineTop : intermediateLineTop;\n lineNumberHTMLNode.style.top = isLastLine ? lastLineTop : intermediateLineTop;\n return stickyLine;\n }\n _renderFoldingIconForLine(foldingModel, line) {\n const showFoldingControls = this._editor.getOption(110 /* EditorOption.showFoldingControls */);\n if (!foldingModel || showFoldingControls === 'never') {\n return;\n }\n const foldingRegions = foldingModel.regions;\n const indexOfFoldingRegion = foldingRegions.findRange(line);\n const startLineNumber = foldingRegions.getStartLineNumber(indexOfFoldingRegion);\n const isFoldingScope = line === startLineNumber;\n if (!isFoldingScope) {\n return;\n }\n const isCollapsed = foldingRegions.isCollapsed(indexOfFoldingRegion);\n const foldingIcon = new StickyFoldingIcon(isCollapsed, startLineNumber, foldingRegions.getEndLineNumber(indexOfFoldingRegion), this._lineHeight);\n foldingIcon.setVisible(this._isOnGlyphMargin ? true : (isCollapsed || showFoldingControls === 'always'));\n foldingIcon.domNode.setAttribute(STICKY_IS_FOLDING_ICON_ATTR, '');\n return foldingIcon;\n }\n getId() {\n return 'editor.contrib.stickyScrollWidget';\n }\n getDomNode() {\n return this._rootDomNode;\n }\n getPosition() {\n return {\n preference: 2 /* OverlayWidgetPositionPreference.TOP_CENTER */,\n stackOridinal: 10,\n };\n }\n getMinContentWidthInPx() {\n return this._minContentWidthInPx;\n }\n focusLineWithIndex(index) {\n if (0 <= index && index < this._renderedStickyLines.length) {\n this._renderedStickyLines[index].lineDomNode.focus();\n }\n }\n /**\n * Given a leaf dom node, tries to find the editor position.\n */\n getEditorPositionFromNode(spanDomNode) {\n if (!spanDomNode || spanDomNode.children.length > 0) {\n // This is not a leaf node\n return null;\n }\n const renderedStickyLine = this._getRenderedStickyLineFromChildDomNode(spanDomNode);\n if (!renderedStickyLine) {\n return null;\n }\n const column = getColumnOfNodeOffset(renderedStickyLine.characterMapping, spanDomNode, 0);\n return new Position(renderedStickyLine.lineNumber, column);\n }\n getLineNumberFromChildDomNode(domNode) {\n var _a, _b;\n return (_b = (_a = this._getRenderedStickyLineFromChildDomNode(domNode)) === null || _a === void 0 ? void 0 : _a.lineNumber) !== null && _b !== void 0 ? _b : null;\n }\n _getRenderedStickyLineFromChildDomNode(domNode) {\n const index = this.getLineIndexFromChildDomNode(domNode);\n if (index === null || index < 0 || index >= this._renderedStickyLines.length) {\n return null;\n }\n return this._renderedStickyLines[index];\n }\n /**\n * Given a child dom node, tries to find the line number attribute that was stored in the node.\n * @returns the attribute value or null if none is found.\n */\n getLineIndexFromChildDomNode(domNode) {\n const lineIndex = this._getAttributeValue(domNode, STICKY_INDEX_ATTR);\n return lineIndex ? parseInt(lineIndex, 10) : null;\n }\n /**\n * Given a child dom node, tries to find if it is (contained in) a sticky line.\n * @returns a boolean.\n */\n isInStickyLine(domNode) {\n const isInLine = this._getAttributeValue(domNode, STICKY_IS_LINE_ATTR);\n return isInLine !== undefined;\n }\n /**\n * Given a child dom node, tries to find if this dom node is (contained in) a sticky folding icon.\n * @returns a boolean.\n */\n isInFoldingIconDomNode(domNode) {\n const isInFoldingIcon = this._getAttributeValue(domNode, STICKY_IS_FOLDING_ICON_ATTR);\n return isInFoldingIcon !== undefined;\n }\n /**\n * Given the dom node, finds if it or its parent sequence contains the given attribute.\n * @returns the attribute value or undefined.\n */\n _getAttributeValue(domNode, attribute) {\n while (domNode && domNode !== this._rootDomNode) {\n const line = domNode.getAttribute(attribute);\n if (line !== null) {\n return line;\n }\n domNode = domNode.parentElement;\n }\n return;\n }\n}\nclass RenderedStickyLine {\n constructor(index, lineNumber, lineDomNode, lineNumberDomNode, foldingIcon, characterMapping, scrollWidth) {\n this.index = index;\n this.lineNumber = lineNumber;\n this.lineDomNode = lineDomNode;\n this.lineNumberDomNode = lineNumberDomNode;\n this.foldingIcon = foldingIcon;\n this.characterMapping = characterMapping;\n this.scrollWidth = scrollWidth;\n }\n}\nclass StickyFoldingIcon {\n constructor(isCollapsed, foldingStartLine, foldingEndLine, dimension) {\n this.isCollapsed = isCollapsed;\n this.foldingStartLine = foldingStartLine;\n this.foldingEndLine = foldingEndLine;\n this.dimension = dimension;\n this.domNode = document.createElement('div');\n this.domNode.style.width = `${dimension}px`;\n this.domNode.style.height = `${dimension}px`;\n this.domNode.className = ThemeIcon.asClassName(isCollapsed ? foldingCollapsedIcon : foldingExpandedIcon);\n }\n setVisible(visible) {\n this.domNode.style.cursor = visible ? 'pointer' : 'default';\n this.domNode.style.opacity = visible ? '1' : '0';\n }\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nexport class StickyRange {\n constructor(startLineNumber, endLineNumber) {\n this.startLineNumber = startLineNumber;\n this.endLineNumber = endLineNumber;\n }\n}\nexport class StickyElement {\n constructor(\n /**\n * Range of line numbers spanned by the current scope\n */\n range, \n /**\n * Must be sorted by start line number\n */\n children, \n /**\n * Parent sticky outline element\n */\n parent) {\n this.range = range;\n this.children = children;\n this.parent = parent;\n }\n}\nexport class StickyModel {\n constructor(uri, version, element, outlineProviderId) {\n this.uri = uri;\n this.version = version;\n this.element = element;\n this.outlineProviderId = outlineProviderId;\n }\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __param = (this && this.__param) || function (paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n};\nimport { Disposable, DisposableStore } from '../../../../base/common/lifecycle.js';\nimport { ILanguageFeaturesService } from '../../../common/services/languageFeatures.js';\nimport { OutlineElement, OutlineGroup, OutlineModel } from '../../documentSymbols/browser/outlineModel.js';\nimport { createCancelablePromise, Delayer } from '../../../../base/common/async.js';\nimport { FoldingController, RangesLimitReporter } from '../../folding/browser/folding.js';\nimport { SyntaxRangeProvider } from '../../folding/browser/syntaxRangeProvider.js';\nimport { IndentRangeProvider } from '../../folding/browser/indentRangeProvider.js';\nimport { ILanguageConfigurationService } from '../../../common/languages/languageConfigurationRegistry.js';\nimport { onUnexpectedError } from '../../../../base/common/errors.js';\nimport { StickyElement, StickyModel, StickyRange } from './stickyScrollElement.js';\nimport { Iterable } from '../../../../base/common/iterator.js';\nimport { IInstantiationService } from '../../../../platform/instantiation/common/instantiation.js';\nvar ModelProvider;\n(function (ModelProvider) {\n ModelProvider[\"OUTLINE_MODEL\"] = \"outlineModel\";\n ModelProvider[\"FOLDING_PROVIDER_MODEL\"] = \"foldingProviderModel\";\n ModelProvider[\"INDENTATION_MODEL\"] = \"indentationModel\";\n})(ModelProvider || (ModelProvider = {}));\nvar Status;\n(function (Status) {\n Status[Status[\"VALID\"] = 0] = \"VALID\";\n Status[Status[\"INVALID\"] = 1] = \"INVALID\";\n Status[Status[\"CANCELED\"] = 2] = \"CANCELED\";\n})(Status || (Status = {}));\nlet StickyModelProvider = class StickyModelProvider extends Disposable {\n constructor(_editor, onProviderUpdate, _languageConfigurationService, _languageFeaturesService) {\n super();\n this._editor = _editor;\n this._modelProviders = [];\n this._modelPromise = null;\n this._updateScheduler = this._register(new Delayer(300));\n this._updateOperation = this._register(new DisposableStore());\n switch (this._editor.getOption(115 /* EditorOption.stickyScroll */).defaultModel) {\n case ModelProvider.OUTLINE_MODEL:\n this._modelProviders.push(new StickyModelFromCandidateOutlineProvider(this._editor, _languageFeaturesService));\n // fall through\n case ModelProvider.FOLDING_PROVIDER_MODEL:\n this._modelProviders.push(new StickyModelFromCandidateSyntaxFoldingProvider(this._editor, onProviderUpdate, _languageFeaturesService));\n // fall through\n case ModelProvider.INDENTATION_MODEL:\n this._modelProviders.push(new StickyModelFromCandidateIndentationFoldingProvider(this._editor, _languageConfigurationService));\n break;\n }\n }\n dispose() {\n this._modelProviders.forEach(provider => provider.dispose());\n this._updateOperation.clear();\n this._cancelModelPromise();\n super.dispose();\n }\n _cancelModelPromise() {\n if (this._modelPromise) {\n this._modelPromise.cancel();\n this._modelPromise = null;\n }\n }\n async update(token) {\n this._updateOperation.clear();\n this._updateOperation.add({\n dispose: () => {\n this._cancelModelPromise();\n this._updateScheduler.cancel();\n }\n });\n this._cancelModelPromise();\n return await this._updateScheduler.trigger(async () => {\n for (const modelProvider of this._modelProviders) {\n const { statusPromise, modelPromise } = modelProvider.computeStickyModel(token);\n this._modelPromise = modelPromise;\n const status = await statusPromise;\n if (this._modelPromise !== modelPromise) {\n return null;\n }\n switch (status) {\n case Status.CANCELED:\n this._updateOperation.clear();\n return null;\n case Status.VALID:\n return modelProvider.stickyModel;\n }\n }\n return null;\n }).catch((error) => {\n onUnexpectedError(error);\n return null;\n });\n }\n};\nStickyModelProvider = __decorate([\n __param(2, IInstantiationService),\n __param(3, ILanguageFeaturesService)\n], StickyModelProvider);\nexport { StickyModelProvider };\nclass StickyModelCandidateProvider extends Disposable {\n constructor(_editor) {\n super();\n this._editor = _editor;\n this._stickyModel = null;\n }\n get stickyModel() {\n return this._stickyModel;\n }\n _invalid() {\n this._stickyModel = null;\n return Status.INVALID;\n }\n computeStickyModel(token) {\n if (token.isCancellationRequested || !this.isProviderValid()) {\n return { statusPromise: this._invalid(), modelPromise: null };\n }\n const providerModelPromise = createCancelablePromise(token => this.createModelFromProvider(token));\n return {\n statusPromise: providerModelPromise.then(providerModel => {\n if (!this.isModelValid(providerModel)) {\n return this._invalid();\n }\n if (token.isCancellationRequested) {\n return Status.CANCELED;\n }\n this._stickyModel = this.createStickyModel(token, providerModel);\n return Status.VALID;\n }).then(undefined, (err) => {\n onUnexpectedError(err);\n return Status.CANCELED;\n }),\n modelPromise: providerModelPromise\n };\n }\n /**\n * Method which checks whether the model returned by the provider is valid and can be used to compute a sticky model.\n * This method by default returns true.\n * @param model model returned by the provider\n * @returns boolean indicating whether the model is valid\n */\n isModelValid(model) {\n return true;\n }\n /**\n * Method which checks whether the provider is valid before applying it to find the provider model.\n * This method by default returns true.\n * @returns boolean indicating whether the provider is valid\n */\n isProviderValid() {\n return true;\n }\n}\nlet StickyModelFromCandidateOutlineProvider = class StickyModelFromCandidateOutlineProvider extends StickyModelCandidateProvider {\n constructor(_editor, _languageFeaturesService) {\n super(_editor);\n this._languageFeaturesService = _languageFeaturesService;\n }\n createModelFromProvider(token) {\n return OutlineModel.create(this._languageFeaturesService.documentSymbolProvider, this._editor.getModel(), token);\n }\n createStickyModel(token, model) {\n var _a;\n const { stickyOutlineElement, providerID } = this._stickyModelFromOutlineModel(model, (_a = this._stickyModel) === null || _a === void 0 ? void 0 : _a.outlineProviderId);\n const textModel = this._editor.getModel();\n return new StickyModel(textModel.uri, textModel.getVersionId(), stickyOutlineElement, providerID);\n }\n isModelValid(model) {\n return model && model.children.size > 0;\n }\n _stickyModelFromOutlineModel(outlineModel, preferredProvider) {\n let outlineElements;\n // When several possible outline providers\n if (Iterable.first(outlineModel.children.values()) instanceof OutlineGroup) {\n const provider = Iterable.find(outlineModel.children.values(), outlineGroupOfModel => outlineGroupOfModel.id === preferredProvider);\n if (provider) {\n outlineElements = provider.children;\n }\n else {\n let tempID = '';\n let maxTotalSumOfRanges = -1;\n let optimalOutlineGroup = undefined;\n for (const [_key, outlineGroup] of outlineModel.children.entries()) {\n const totalSumRanges = this._findSumOfRangesOfGroup(outlineGroup);\n if (totalSumRanges > maxTotalSumOfRanges) {\n optimalOutlineGroup = outlineGroup;\n maxTotalSumOfRanges = totalSumRanges;\n tempID = outlineGroup.id;\n }\n }\n preferredProvider = tempID;\n outlineElements = optimalOutlineGroup.children;\n }\n }\n else {\n outlineElements = outlineModel.children;\n }\n const stickyChildren = [];\n const outlineElementsArray = Array.from(outlineElements.values()).sort((element1, element2) => {\n const range1 = new StickyRange(element1.symbol.range.startLineNumber, element1.symbol.range.endLineNumber);\n const range2 = new StickyRange(element2.symbol.range.startLineNumber, element2.symbol.range.endLineNumber);\n return this._comparator(range1, range2);\n });\n for (const outlineElement of outlineElementsArray) {\n stickyChildren.push(this._stickyModelFromOutlineElement(outlineElement, outlineElement.symbol.selectionRange.startLineNumber));\n }\n const stickyOutlineElement = new StickyElement(undefined, stickyChildren, undefined);\n return {\n stickyOutlineElement: stickyOutlineElement,\n providerID: preferredProvider\n };\n }\n _stickyModelFromOutlineElement(outlineElement, previousStartLine) {\n const children = [];\n for (const child of outlineElement.children.values()) {\n if (child.symbol.selectionRange.startLineNumber !== child.symbol.range.endLineNumber) {\n if (child.symbol.selectionRange.startLineNumber !== previousStartLine) {\n children.push(this._stickyModelFromOutlineElement(child, child.symbol.selectionRange.startLineNumber));\n }\n else {\n for (const subchild of child.children.values()) {\n children.push(this._stickyModelFromOutlineElement(subchild, child.symbol.selectionRange.startLineNumber));\n }\n }\n }\n }\n children.sort((child1, child2) => this._comparator(child1.range, child2.range));\n const range = new StickyRange(outlineElement.symbol.selectionRange.startLineNumber, outlineElement.symbol.range.endLineNumber);\n return new StickyElement(range, children, undefined);\n }\n _comparator(range1, range2) {\n if (range1.startLineNumber !== range2.startLineNumber) {\n return range1.startLineNumber - range2.startLineNumber;\n }\n else {\n return range2.endLineNumber - range1.endLineNumber;\n }\n }\n _findSumOfRangesOfGroup(outline) {\n let res = 0;\n for (const child of outline.children.values()) {\n res += this._findSumOfRangesOfGroup(child);\n }\n if (outline instanceof OutlineElement) {\n return res + outline.symbol.range.endLineNumber - outline.symbol.selectionRange.startLineNumber;\n }\n else {\n return res;\n }\n }\n};\nStickyModelFromCandidateOutlineProvider = __decorate([\n __param(1, ILanguageFeaturesService)\n], StickyModelFromCandidateOutlineProvider);\nclass StickyModelFromCandidateFoldingProvider extends StickyModelCandidateProvider {\n constructor(editor) {\n super(editor);\n this._foldingLimitReporter = new RangesLimitReporter(editor);\n }\n createStickyModel(token, model) {\n const foldingElement = this._fromFoldingRegions(model);\n const textModel = this._editor.getModel();\n return new StickyModel(textModel.uri, textModel.getVersionId(), foldingElement, undefined);\n }\n isModelValid(model) {\n return model !== null;\n }\n _fromFoldingRegions(foldingRegions) {\n const length = foldingRegions.length;\n const orderedStickyElements = [];\n // The root sticky outline element\n const stickyOutlineElement = new StickyElement(undefined, [], undefined);\n for (let i = 0; i < length; i++) {\n // Finding the parent index of the current range\n const parentIndex = foldingRegions.getParentIndex(i);\n let parentNode;\n if (parentIndex !== -1) {\n // Access the reference of the parent node\n parentNode = orderedStickyElements[parentIndex];\n }\n else {\n // In that case the parent node is the root node\n parentNode = stickyOutlineElement;\n }\n const child = new StickyElement(new StickyRange(foldingRegions.getStartLineNumber(i), foldingRegions.getEndLineNumber(i) + 1), [], parentNode);\n parentNode.children.push(child);\n orderedStickyElements.push(child);\n }\n return stickyOutlineElement;\n }\n}\nlet StickyModelFromCandidateIndentationFoldingProvider = class StickyModelFromCandidateIndentationFoldingProvider extends StickyModelFromCandidateFoldingProvider {\n constructor(editor, _languageConfigurationService) {\n super(editor);\n this._languageConfigurationService = _languageConfigurationService;\n this.provider = this._register(new IndentRangeProvider(editor.getModel(), this._languageConfigurationService, this._foldingLimitReporter));\n }\n async createModelFromProvider(token) {\n return this.provider.compute(token);\n }\n};\nStickyModelFromCandidateIndentationFoldingProvider = __decorate([\n __param(1, ILanguageConfigurationService)\n], StickyModelFromCandidateIndentationFoldingProvider);\nlet StickyModelFromCandidateSyntaxFoldingProvider = class StickyModelFromCandidateSyntaxFoldingProvider extends StickyModelFromCandidateFoldingProvider {\n constructor(editor, onProviderUpdate, _languageFeaturesService) {\n super(editor);\n this._languageFeaturesService = _languageFeaturesService;\n const selectedProviders = FoldingController.getFoldingRangeProviders(this._languageFeaturesService, editor.getModel());\n if (selectedProviders.length > 0) {\n this.provider = this._register(new SyntaxRangeProvider(editor.getModel(), selectedProviders, onProviderUpdate, this._foldingLimitReporter, undefined));\n }\n }\n isProviderValid() {\n return this.provider !== undefined;\n }\n async createModelFromProvider(token) {\n var _a, _b;\n return (_b = (_a = this.provider) === null || _a === void 0 ? void 0 : _a.compute(token)) !== null && _b !== void 0 ? _b : null;\n }\n};\nStickyModelFromCandidateSyntaxFoldingProvider = __decorate([\n __param(2, ILanguageFeaturesService)\n], StickyModelFromCandidateSyntaxFoldingProvider);\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __param = (this && this.__param) || function (paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n};\nimport { Disposable, DisposableStore, toDisposable } from '../../../../base/common/lifecycle.js';\nimport { ILanguageFeaturesService } from '../../../common/services/languageFeatures.js';\nimport { CancellationTokenSource } from '../../../../base/common/cancellation.js';\nimport { RunOnceScheduler } from '../../../../base/common/async.js';\nimport { binarySearch } from '../../../../base/common/arrays.js';\nimport { Emitter } from '../../../../base/common/event.js';\nimport { ILanguageConfigurationService } from '../../../common/languages/languageConfigurationRegistry.js';\nimport { StickyModelProvider } from './stickyScrollModelProvider.js';\nexport class StickyLineCandidate {\n constructor(startLineNumber, endLineNumber, nestingDepth) {\n this.startLineNumber = startLineNumber;\n this.endLineNumber = endLineNumber;\n this.nestingDepth = nestingDepth;\n }\n}\nlet StickyLineCandidateProvider = class StickyLineCandidateProvider extends Disposable {\n constructor(editor, _languageFeaturesService, _languageConfigurationService) {\n super();\n this._languageFeaturesService = _languageFeaturesService;\n this._languageConfigurationService = _languageConfigurationService;\n this._onDidChangeStickyScroll = this._register(new Emitter());\n this.onDidChangeStickyScroll = this._onDidChangeStickyScroll.event;\n this._model = null;\n this._cts = null;\n this._stickyModelProvider = null;\n this._editor = editor;\n this._sessionStore = this._register(new DisposableStore());\n this._updateSoon = this._register(new RunOnceScheduler(() => this.update(), 50));\n this._register(this._editor.onDidChangeConfiguration(e => {\n if (e.hasChanged(115 /* EditorOption.stickyScroll */)) {\n this.readConfiguration();\n }\n }));\n this.readConfiguration();\n }\n readConfiguration() {\n this._sessionStore.clear();\n const options = this._editor.getOption(115 /* EditorOption.stickyScroll */);\n if (!options.enabled) {\n return;\n }\n this._sessionStore.add(this._editor.onDidChangeModel(() => {\n // We should not show an old model for a different file, it will always be wrong.\n // So we clear the model here immediately and then trigger an update.\n this._model = null;\n this.updateStickyModelProvider();\n this._onDidChangeStickyScroll.fire();\n this.update();\n }));\n this._sessionStore.add(this._editor.onDidChangeHiddenAreas(() => this.update()));\n this._sessionStore.add(this._editor.onDidChangeModelContent(() => this._updateSoon.schedule()));\n this._sessionStore.add(this._languageFeaturesService.documentSymbolProvider.onDidChange(() => this.update()));\n this._sessionStore.add(toDisposable(() => {\n var _a;\n (_a = this._stickyModelProvider) === null || _a === void 0 ? void 0 : _a.dispose();\n this._stickyModelProvider = null;\n }));\n this.updateStickyModelProvider();\n this.update();\n }\n getVersionId() {\n var _a;\n return (_a = this._model) === null || _a === void 0 ? void 0 : _a.version;\n }\n updateStickyModelProvider() {\n var _a;\n (_a = this._stickyModelProvider) === null || _a === void 0 ? void 0 : _a.dispose();\n this._stickyModelProvider = null;\n const editor = this._editor;\n if (editor.hasModel()) {\n this._stickyModelProvider = new StickyModelProvider(editor, () => this._updateSoon.schedule(), this._languageConfigurationService, this._languageFeaturesService);\n }\n }\n async update() {\n var _a;\n (_a = this._cts) === null || _a === void 0 ? void 0 : _a.dispose(true);\n this._cts = new CancellationTokenSource();\n await this.updateStickyModel(this._cts.token);\n this._onDidChangeStickyScroll.fire();\n }\n async updateStickyModel(token) {\n if (!this._editor.hasModel() || !this._stickyModelProvider || this._editor.getModel().isTooLargeForTokenization()) {\n this._model = null;\n return;\n }\n const model = await this._stickyModelProvider.update(token);\n if (token.isCancellationRequested) {\n // the computation was canceled, so do not overwrite the model\n return;\n }\n this._model = model;\n }\n updateIndex(index) {\n if (index === -1) {\n index = 0;\n }\n else if (index < 0) {\n index = -index - 2;\n }\n return index;\n }\n getCandidateStickyLinesIntersectingFromStickyModel(range, outlineModel, result, depth, lastStartLineNumber) {\n if (outlineModel.children.length === 0) {\n return;\n }\n let lastLine = lastStartLineNumber;\n const childrenStartLines = [];\n for (let i = 0; i < outlineModel.children.length; i++) {\n const child = outlineModel.children[i];\n if (child.range) {\n childrenStartLines.push(child.range.startLineNumber);\n }\n }\n const lowerBound = this.updateIndex(binarySearch(childrenStartLines, range.startLineNumber, (a, b) => { return a - b; }));\n const upperBound = this.updateIndex(binarySearch(childrenStartLines, range.startLineNumber + depth, (a, b) => { return a - b; }));\n for (let i = lowerBound; i <= upperBound; i++) {\n const child = outlineModel.children[i];\n if (!child) {\n return;\n }\n if (child.range) {\n const childStartLine = child.range.startLineNumber;\n const childEndLine = child.range.endLineNumber;\n if (range.startLineNumber <= childEndLine + 1 && childStartLine - 1 <= range.endLineNumber && childStartLine !== lastLine) {\n lastLine = childStartLine;\n result.push(new StickyLineCandidate(childStartLine, childEndLine - 1, depth + 1));\n this.getCandidateStickyLinesIntersectingFromStickyModel(range, child, result, depth + 1, childStartLine);\n }\n }\n else {\n this.getCandidateStickyLinesIntersectingFromStickyModel(range, child, result, depth, lastStartLineNumber);\n }\n }\n }\n getCandidateStickyLinesIntersecting(range) {\n var _a, _b;\n if (!((_a = this._model) === null || _a === void 0 ? void 0 : _a.element)) {\n return [];\n }\n let stickyLineCandidates = [];\n this.getCandidateStickyLinesIntersectingFromStickyModel(range, this._model.element, stickyLineCandidates, 0, -1);\n const hiddenRanges = (_b = this._editor._getViewModel()) === null || _b === void 0 ? void 0 : _b.getHiddenAreas();\n if (hiddenRanges) {\n for (const hiddenRange of hiddenRanges) {\n stickyLineCandidates = stickyLineCandidates.filter(stickyLine => !(stickyLine.startLineNumber >= hiddenRange.startLineNumber && stickyLine.endLineNumber <= hiddenRange.endLineNumber + 1));\n }\n }\n return stickyLineCandidates;\n }\n};\nStickyLineCandidateProvider = __decorate([\n __param(1, ILanguageFeaturesService),\n __param(2, ILanguageConfigurationService)\n], StickyLineCandidateProvider);\nexport { StickyLineCandidateProvider };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __param = (this && this.__param) || function (paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n};\nvar StickyScrollController_1;\nimport { Disposable, DisposableStore, toDisposable } from '../../../../base/common/lifecycle.js';\nimport { ILanguageFeaturesService } from '../../../common/services/languageFeatures.js';\nimport { StickyScrollWidget, StickyScrollWidgetState } from './stickyScrollWidget.js';\nimport { StickyLineCandidateProvider } from './stickyScrollProvider.js';\nimport { IInstantiationService } from '../../../../platform/instantiation/common/instantiation.js';\nimport { IContextMenuService } from '../../../../platform/contextview/browser/contextView.js';\nimport { MenuId } from '../../../../platform/actions/common/actions.js';\nimport { IContextKeyService } from '../../../../platform/contextkey/common/contextkey.js';\nimport { EditorContextKeys } from '../../../common/editorContextKeys.js';\nimport { ClickLinkGesture } from '../../gotoSymbol/browser/link/clickLinkGesture.js';\nimport { Range } from '../../../common/core/range.js';\nimport { getDefinitionsAtPosition } from '../../gotoSymbol/browser/goToSymbol.js';\nimport { goToDefinitionWithLocation } from '../../inlayHints/browser/inlayHintsLocations.js';\nimport { Position } from '../../../common/core/position.js';\nimport { CancellationTokenSource } from '../../../../base/common/cancellation.js';\nimport { ILanguageConfigurationService } from '../../../common/languages/languageConfigurationRegistry.js';\nimport { ILanguageFeatureDebounceService } from '../../../common/services/languageFeatureDebounce.js';\nimport * as dom from '../../../../base/browser/dom.js';\nimport { StickyRange } from './stickyScrollElement.js';\nimport { StandardMouseEvent } from '../../../../base/browser/mouseEvent.js';\nimport { FoldingController } from '../../folding/browser/folding.js';\nimport { toggleCollapseState } from '../../folding/browser/foldingModel.js';\nlet StickyScrollController = StickyScrollController_1 = class StickyScrollController extends Disposable {\n constructor(_editor, _contextMenuService, _languageFeaturesService, _instaService, _languageConfigurationService, _languageFeatureDebounceService, _contextKeyService) {\n super();\n this._editor = _editor;\n this._contextMenuService = _contextMenuService;\n this._languageFeaturesService = _languageFeaturesService;\n this._instaService = _instaService;\n this._contextKeyService = _contextKeyService;\n this._sessionStore = new DisposableStore();\n this._foldingModel = null;\n this._maxStickyLines = Number.MAX_SAFE_INTEGER;\n this._candidateDefinitionsLength = -1;\n this._focusedStickyElementIndex = -1;\n this._enabled = false;\n this._focused = false;\n this._positionRevealed = false;\n this._onMouseDown = false;\n this._endLineNumbers = [];\n this._showEndForLine = null;\n this._stickyScrollWidget = new StickyScrollWidget(this._editor);\n this._stickyLineCandidateProvider = new StickyLineCandidateProvider(this._editor, _languageFeaturesService, _languageConfigurationService);\n this._register(this._stickyScrollWidget);\n this._register(this._stickyLineCandidateProvider);\n this._widgetState = new StickyScrollWidgetState([], [], 0);\n this._onDidResize();\n this._readConfiguration();\n const stickyScrollDomNode = this._stickyScrollWidget.getDomNode();\n this._register(this._editor.onDidChangeConfiguration(e => {\n this._readConfigurationChange(e);\n }));\n this._register(dom.addDisposableListener(stickyScrollDomNode, dom.EventType.CONTEXT_MENU, async (event) => {\n this._onContextMenu(dom.getWindow(stickyScrollDomNode), event);\n }));\n this._stickyScrollFocusedContextKey = EditorContextKeys.stickyScrollFocused.bindTo(this._contextKeyService);\n this._stickyScrollVisibleContextKey = EditorContextKeys.stickyScrollVisible.bindTo(this._contextKeyService);\n const focusTracker = this._register(dom.trackFocus(stickyScrollDomNode));\n this._register(focusTracker.onDidBlur(_ => {\n // Suppose that the blurring is caused by scrolling, then keep the focus on the sticky scroll\n // This is determined by the fact that the height of the widget has become zero and there has been no position revealing\n if (this._positionRevealed === false && stickyScrollDomNode.clientHeight === 0) {\n this._focusedStickyElementIndex = -1;\n this.focus();\n }\n // In all other casees, dispose the focus on the sticky scroll\n else {\n this._disposeFocusStickyScrollStore();\n }\n }));\n this._register(focusTracker.onDidFocus(_ => {\n this.focus();\n }));\n this._registerMouseListeners();\n // Suppose that mouse down on the sticky scroll, then do not focus on the sticky scroll because this will be followed by the revealing of a position\n this._register(dom.addDisposableListener(stickyScrollDomNode, dom.EventType.MOUSE_DOWN, (e) => {\n this._onMouseDown = true;\n }));\n }\n static get(editor) {\n return editor.getContribution(StickyScrollController_1.ID);\n }\n _disposeFocusStickyScrollStore() {\n var _a;\n this._stickyScrollFocusedContextKey.set(false);\n (_a = this._focusDisposableStore) === null || _a === void 0 ? void 0 : _a.dispose();\n this._focused = false;\n this._positionRevealed = false;\n this._onMouseDown = false;\n }\n focus() {\n // If the mouse is down, do not focus on the sticky scroll\n if (this._onMouseDown) {\n this._onMouseDown = false;\n this._editor.focus();\n return;\n }\n const focusState = this._stickyScrollFocusedContextKey.get();\n if (focusState === true) {\n return;\n }\n this._focused = true;\n this._focusDisposableStore = new DisposableStore();\n this._stickyScrollFocusedContextKey.set(true);\n this._focusedStickyElementIndex = this._stickyScrollWidget.lineNumbers.length - 1;\n this._stickyScrollWidget.focusLineWithIndex(this._focusedStickyElementIndex);\n }\n focusNext() {\n if (this._focusedStickyElementIndex < this._stickyScrollWidget.lineNumberCount - 1) {\n this._focusNav(true);\n }\n }\n focusPrevious() {\n if (this._focusedStickyElementIndex > 0) {\n this._focusNav(false);\n }\n }\n selectEditor() {\n this._editor.focus();\n }\n // True is next, false is previous\n _focusNav(direction) {\n this._focusedStickyElementIndex = direction ? this._focusedStickyElementIndex + 1 : this._focusedStickyElementIndex - 1;\n this._stickyScrollWidget.focusLineWithIndex(this._focusedStickyElementIndex);\n }\n goToFocused() {\n const lineNumbers = this._stickyScrollWidget.lineNumbers;\n this._disposeFocusStickyScrollStore();\n this._revealPosition({ lineNumber: lineNumbers[this._focusedStickyElementIndex], column: 1 });\n }\n _revealPosition(position) {\n this._reveaInEditor(position, () => this._editor.revealPosition(position));\n }\n _revealLineInCenterIfOutsideViewport(position) {\n this._reveaInEditor(position, () => this._editor.revealLineInCenterIfOutsideViewport(position.lineNumber, 0 /* ScrollType.Smooth */));\n }\n _reveaInEditor(position, revealFunction) {\n if (this._focused) {\n this._disposeFocusStickyScrollStore();\n }\n this._positionRevealed = true;\n revealFunction();\n this._editor.setSelection(Range.fromPositions(position));\n this._editor.focus();\n }\n _registerMouseListeners() {\n const sessionStore = this._register(new DisposableStore());\n const gesture = this._register(new ClickLinkGesture(this._editor, {\n extractLineNumberFromMouseEvent: (e) => {\n const position = this._stickyScrollWidget.getEditorPositionFromNode(e.target.element);\n return position ? position.lineNumber : 0;\n }\n }));\n const getMouseEventTarget = (mouseEvent) => {\n if (!this._editor.hasModel()) {\n return null;\n }\n if (mouseEvent.target.type !== 12 /* MouseTargetType.OVERLAY_WIDGET */ || mouseEvent.target.detail !== this._stickyScrollWidget.getId()) {\n // not hovering over our widget\n return null;\n }\n const mouseTargetElement = mouseEvent.target.element;\n if (!mouseTargetElement || mouseTargetElement.innerText !== mouseTargetElement.innerHTML) {\n // not on a span element rendering text\n return null;\n }\n const position = this._stickyScrollWidget.getEditorPositionFromNode(mouseTargetElement);\n if (!position) {\n // not hovering a sticky scroll line\n return null;\n }\n return {\n range: new Range(position.lineNumber, position.column, position.lineNumber, position.column + mouseTargetElement.innerText.length),\n textElement: mouseTargetElement\n };\n };\n const stickyScrollWidgetDomNode = this._stickyScrollWidget.getDomNode();\n this._register(dom.addStandardDisposableListener(stickyScrollWidgetDomNode, dom.EventType.CLICK, (mouseEvent) => {\n if (mouseEvent.ctrlKey || mouseEvent.altKey || mouseEvent.metaKey) {\n // modifier pressed\n return;\n }\n if (!mouseEvent.leftButton) {\n // not left click\n return;\n }\n if (mouseEvent.shiftKey) {\n // shift click\n const lineIndex = this._stickyScrollWidget.getLineIndexFromChildDomNode(mouseEvent.target);\n if (lineIndex === null) {\n return;\n }\n const position = new Position(this._endLineNumbers[lineIndex], 1);\n this._revealLineInCenterIfOutsideViewport(position);\n return;\n }\n const isInFoldingIconDomNode = this._stickyScrollWidget.isInFoldingIconDomNode(mouseEvent.target);\n if (isInFoldingIconDomNode) {\n // clicked on folding icon\n const lineNumber = this._stickyScrollWidget.getLineNumberFromChildDomNode(mouseEvent.target);\n this._toggleFoldingRegionForLine(lineNumber);\n return;\n }\n const isInStickyLine = this._stickyScrollWidget.isInStickyLine(mouseEvent.target);\n if (!isInStickyLine) {\n return;\n }\n // normal click\n let position = this._stickyScrollWidget.getEditorPositionFromNode(mouseEvent.target);\n if (!position) {\n const lineNumber = this._stickyScrollWidget.getLineNumberFromChildDomNode(mouseEvent.target);\n if (lineNumber === null) {\n // not hovering a sticky scroll line\n return;\n }\n position = new Position(lineNumber, 1);\n }\n this._revealPosition(position);\n }));\n this._register(dom.addStandardDisposableListener(stickyScrollWidgetDomNode, dom.EventType.MOUSE_MOVE, (mouseEvent) => {\n if (mouseEvent.shiftKey) {\n const currentEndForLineIndex = this._stickyScrollWidget.getLineIndexFromChildDomNode(mouseEvent.target);\n if (currentEndForLineIndex === null || this._showEndForLine !== null && this._showEndForLine === currentEndForLineIndex) {\n return;\n }\n this._showEndForLine = currentEndForLineIndex;\n this._renderStickyScroll();\n return;\n }\n if (this._showEndForLine !== null) {\n this._showEndForLine = null;\n this._renderStickyScroll();\n }\n }));\n this._register(dom.addDisposableListener(stickyScrollWidgetDomNode, dom.EventType.MOUSE_LEAVE, (e) => {\n if (this._showEndForLine !== null) {\n this._showEndForLine = null;\n this._renderStickyScroll();\n }\n }));\n this._register(gesture.onMouseMoveOrRelevantKeyDown(([mouseEvent, _keyboardEvent]) => {\n const mouseTarget = getMouseEventTarget(mouseEvent);\n if (!mouseTarget || !mouseEvent.hasTriggerModifier || !this._editor.hasModel()) {\n sessionStore.clear();\n return;\n }\n const { range, textElement } = mouseTarget;\n if (!range.equalsRange(this._stickyRangeProjectedOnEditor)) {\n this._stickyRangeProjectedOnEditor = range;\n sessionStore.clear();\n }\n else if (textElement.style.textDecoration === 'underline') {\n return;\n }\n const cancellationToken = new CancellationTokenSource();\n sessionStore.add(toDisposable(() => cancellationToken.dispose(true)));\n let currentHTMLChild;\n getDefinitionsAtPosition(this._languageFeaturesService.definitionProvider, this._editor.getModel(), new Position(range.startLineNumber, range.startColumn + 1), cancellationToken.token).then((candidateDefinitions => {\n if (cancellationToken.token.isCancellationRequested) {\n return;\n }\n if (candidateDefinitions.length !== 0) {\n this._candidateDefinitionsLength = candidateDefinitions.length;\n const childHTML = textElement;\n if (currentHTMLChild !== childHTML) {\n sessionStore.clear();\n currentHTMLChild = childHTML;\n currentHTMLChild.style.textDecoration = 'underline';\n sessionStore.add(toDisposable(() => {\n currentHTMLChild.style.textDecoration = 'none';\n }));\n }\n else if (!currentHTMLChild) {\n currentHTMLChild = childHTML;\n currentHTMLChild.style.textDecoration = 'underline';\n sessionStore.add(toDisposable(() => {\n currentHTMLChild.style.textDecoration = 'none';\n }));\n }\n }\n else {\n sessionStore.clear();\n }\n }));\n }));\n this._register(gesture.onCancel(() => {\n sessionStore.clear();\n }));\n this._register(gesture.onExecute(async (e) => {\n if (e.target.type !== 12 /* MouseTargetType.OVERLAY_WIDGET */ || e.target.detail !== this._stickyScrollWidget.getId()) {\n // not hovering over our widget\n return;\n }\n const position = this._stickyScrollWidget.getEditorPositionFromNode(e.target.element);\n if (!position) {\n // not hovering a sticky scroll line\n return;\n }\n if (!this._editor.hasModel() || !this._stickyRangeProjectedOnEditor) {\n return;\n }\n if (this._candidateDefinitionsLength > 1) {\n if (this._focused) {\n this._disposeFocusStickyScrollStore();\n }\n this._revealPosition({ lineNumber: position.lineNumber, column: 1 });\n }\n this._instaService.invokeFunction(goToDefinitionWithLocation, e, this._editor, { uri: this._editor.getModel().uri, range: this._stickyRangeProjectedOnEditor });\n }));\n }\n _onContextMenu(targetWindow, e) {\n const event = new StandardMouseEvent(targetWindow, e);\n this._contextMenuService.showContextMenu({\n menuId: MenuId.StickyScrollContext,\n getAnchor: () => event,\n });\n }\n _toggleFoldingRegionForLine(line) {\n if (!this._foldingModel || line === null) {\n return;\n }\n const stickyLine = this._stickyScrollWidget.getRenderedStickyLine(line);\n const foldingIcon = stickyLine === null || stickyLine === void 0 ? void 0 : stickyLine.foldingIcon;\n if (!foldingIcon) {\n return;\n }\n toggleCollapseState(this._foldingModel, Number.MAX_VALUE, [line]);\n foldingIcon.isCollapsed = !foldingIcon.isCollapsed;\n const scrollTop = (foldingIcon.isCollapsed ?\n this._editor.getTopForLineNumber(foldingIcon.foldingEndLine)\n : this._editor.getTopForLineNumber(foldingIcon.foldingStartLine))\n - this._editor.getOption(67 /* EditorOption.lineHeight */) * stickyLine.index + 1;\n this._editor.setScrollTop(scrollTop);\n this._renderStickyScroll(line);\n }\n _readConfiguration() {\n const options = this._editor.getOption(115 /* EditorOption.stickyScroll */);\n if (options.enabled === false) {\n this._editor.removeOverlayWidget(this._stickyScrollWidget);\n this._sessionStore.clear();\n this._enabled = false;\n return;\n }\n else if (options.enabled && !this._enabled) {\n // When sticky scroll was just enabled, add the listeners on the sticky scroll\n this._editor.addOverlayWidget(this._stickyScrollWidget);\n this._sessionStore.add(this._editor.onDidScrollChange((e) => {\n if (e.scrollTopChanged) {\n this._showEndForLine = null;\n this._renderStickyScroll();\n }\n }));\n this._sessionStore.add(this._editor.onDidLayoutChange(() => this._onDidResize()));\n this._sessionStore.add(this._editor.onDidChangeModelTokens((e) => this._onTokensChange(e)));\n this._sessionStore.add(this._stickyLineCandidateProvider.onDidChangeStickyScroll(() => {\n this._showEndForLine = null;\n this._renderStickyScroll();\n }));\n this._enabled = true;\n }\n const lineNumberOption = this._editor.getOption(68 /* EditorOption.lineNumbers */);\n if (lineNumberOption.renderType === 2 /* RenderLineNumbersType.Relative */) {\n this._sessionStore.add(this._editor.onDidChangeCursorPosition(() => {\n this._showEndForLine = null;\n this._renderStickyScroll(0);\n }));\n }\n }\n _readConfigurationChange(event) {\n if (event.hasChanged(115 /* EditorOption.stickyScroll */)\n || event.hasChanged(73 /* EditorOption.minimap */)\n || event.hasChanged(67 /* EditorOption.lineHeight */)\n || event.hasChanged(110 /* EditorOption.showFoldingControls */)\n || event.hasChanged(68 /* EditorOption.lineNumbers */)) {\n this._readConfiguration();\n }\n if (event.hasChanged(68 /* EditorOption.lineNumbers */)) {\n this._renderStickyScroll(0);\n }\n }\n _needsUpdate(event) {\n const stickyLineNumbers = this._stickyScrollWidget.getCurrentLines();\n for (const stickyLineNumber of stickyLineNumbers) {\n for (const range of event.ranges) {\n if (stickyLineNumber >= range.fromLineNumber && stickyLineNumber <= range.toLineNumber) {\n return true;\n }\n }\n }\n return false;\n }\n _onTokensChange(event) {\n if (this._needsUpdate(event)) {\n // Rebuilding the whole widget from line 0\n this._renderStickyScroll(0);\n }\n }\n _onDidResize() {\n const layoutInfo = this._editor.getLayoutInfo();\n // Make sure sticky scroll doesn't take up more than 25% of the editor\n const theoreticalLines = layoutInfo.height / this._editor.getOption(67 /* EditorOption.lineHeight */);\n this._maxStickyLines = Math.round(theoreticalLines * .25);\n }\n async _renderStickyScroll(rebuildFromLine) {\n var _a, _b;\n const model = this._editor.getModel();\n if (!model || model.isTooLargeForTokenization()) {\n this._foldingModel = null;\n this._stickyScrollWidget.setState(undefined, null);\n return;\n }\n const stickyLineVersion = this._stickyLineCandidateProvider.getVersionId();\n if (stickyLineVersion === undefined || stickyLineVersion === model.getVersionId()) {\n this._foldingModel = (_b = await ((_a = FoldingController.get(this._editor)) === null || _a === void 0 ? void 0 : _a.getFoldingModel())) !== null && _b !== void 0 ? _b : null;\n this._widgetState = this.findScrollWidgetState();\n this._stickyScrollVisibleContextKey.set(!(this._widgetState.startLineNumbers.length === 0));\n if (!this._focused) {\n this._stickyScrollWidget.setState(this._widgetState, this._foldingModel, rebuildFromLine);\n }\n else {\n // Suppose that previously the sticky scroll widget had height 0, then if there are visible lines, set the last line as focused\n if (this._focusedStickyElementIndex === -1) {\n this._stickyScrollWidget.setState(this._widgetState, this._foldingModel, rebuildFromLine);\n this._focusedStickyElementIndex = this._stickyScrollWidget.lineNumberCount - 1;\n if (this._focusedStickyElementIndex !== -1) {\n this._stickyScrollWidget.focusLineWithIndex(this._focusedStickyElementIndex);\n }\n }\n else {\n const focusedStickyElementLineNumber = this._stickyScrollWidget.lineNumbers[this._focusedStickyElementIndex];\n this._stickyScrollWidget.setState(this._widgetState, this._foldingModel, rebuildFromLine);\n // Suppose that after setting the state, there are no sticky lines, set the focused index to -1\n if (this._stickyScrollWidget.lineNumberCount === 0) {\n this._focusedStickyElementIndex = -1;\n }\n else {\n const previousFocusedLineNumberExists = this._stickyScrollWidget.lineNumbers.includes(focusedStickyElementLineNumber);\n // If the line number is still there, do not change anything\n // If the line number is not there, set the new focused line to be the last line\n if (!previousFocusedLineNumberExists) {\n this._focusedStickyElementIndex = this._stickyScrollWidget.lineNumberCount - 1;\n }\n this._stickyScrollWidget.focusLineWithIndex(this._focusedStickyElementIndex);\n }\n }\n }\n }\n }\n findScrollWidgetState() {\n const lineHeight = this._editor.getOption(67 /* EditorOption.lineHeight */);\n const maxNumberStickyLines = Math.min(this._maxStickyLines, this._editor.getOption(115 /* EditorOption.stickyScroll */).maxLineCount);\n const scrollTop = this._editor.getScrollTop();\n let lastLineRelativePosition = 0;\n const startLineNumbers = [];\n const endLineNumbers = [];\n const arrayVisibleRanges = this._editor.getVisibleRanges();\n if (arrayVisibleRanges.length !== 0) {\n const fullVisibleRange = new StickyRange(arrayVisibleRanges[0].startLineNumber, arrayVisibleRanges[arrayVisibleRanges.length - 1].endLineNumber);\n const candidateRanges = this._stickyLineCandidateProvider.getCandidateStickyLinesIntersecting(fullVisibleRange);\n for (const range of candidateRanges) {\n const start = range.startLineNumber;\n const end = range.endLineNumber;\n const depth = range.nestingDepth;\n if (end - start > 0) {\n const topOfElementAtDepth = (depth - 1) * lineHeight;\n const bottomOfElementAtDepth = depth * lineHeight;\n const bottomOfBeginningLine = this._editor.getBottomForLineNumber(start) - scrollTop;\n const topOfEndLine = this._editor.getTopForLineNumber(end) - scrollTop;\n const bottomOfEndLine = this._editor.getBottomForLineNumber(end) - scrollTop;\n if (topOfElementAtDepth > topOfEndLine && topOfElementAtDepth <= bottomOfEndLine) {\n startLineNumbers.push(start);\n endLineNumbers.push(end + 1);\n lastLineRelativePosition = bottomOfEndLine - bottomOfElementAtDepth;\n break;\n }\n else if (bottomOfElementAtDepth > bottomOfBeginningLine && bottomOfElementAtDepth <= bottomOfEndLine) {\n startLineNumbers.push(start);\n endLineNumbers.push(end + 1);\n }\n if (startLineNumbers.length === maxNumberStickyLines) {\n break;\n }\n }\n }\n }\n this._endLineNumbers = endLineNumbers;\n return new StickyScrollWidgetState(startLineNumbers, endLineNumbers, lastLineRelativePosition, this._showEndForLine);\n }\n dispose() {\n super.dispose();\n this._sessionStore.dispose();\n }\n};\nStickyScrollController.ID = 'store.contrib.stickyScrollController';\nStickyScrollController = StickyScrollController_1 = __decorate([\n __param(1, IContextMenuService),\n __param(2, ILanguageFeaturesService),\n __param(3, IInstantiationService),\n __param(4, ILanguageConfigurationService),\n __param(5, ILanguageFeatureDebounceService),\n __param(6, IContextKeyService)\n], StickyScrollController);\nexport { StickyScrollController };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { EditorAction2 } from '../../../browser/editorExtensions.js';\nimport { localize, localize2 } from '../../../../nls.js';\nimport { Categories } from '../../../../platform/action/common/actionCommonCategories.js';\nimport { Action2, MenuId } from '../../../../platform/actions/common/actions.js';\nimport { IConfigurationService } from '../../../../platform/configuration/common/configuration.js';\nimport { ContextKeyExpr } from '../../../../platform/contextkey/common/contextkey.js';\nimport { EditorContextKeys } from '../../../common/editorContextKeys.js';\nimport { StickyScrollController } from './stickyScrollController.js';\nexport class ToggleStickyScroll extends Action2 {\n constructor() {\n super({\n id: 'editor.action.toggleStickyScroll',\n title: {\n ...localize2('toggleEditorStickyScroll', \"Toggle Editor Sticky Scroll\"),\n mnemonicTitle: localize({ key: 'mitoggleStickyScroll', comment: ['&& denotes a mnemonic'] }, \"&&Toggle Editor Sticky Scroll\"),\n },\n metadata: {\n description: localize2('toggleEditorStickyScroll.description', \"Toggle/enable the editor sticky scroll which shows the nested scopes at the top of the viewport\"),\n },\n category: Categories.View,\n toggled: {\n condition: ContextKeyExpr.equals('config.editor.stickyScroll.enabled', true),\n title: localize('stickyScroll', \"Sticky Scroll\"),\n mnemonicTitle: localize({ key: 'miStickyScroll', comment: ['&& denotes a mnemonic'] }, \"&&Sticky Scroll\"),\n },\n menu: [\n { id: MenuId.CommandPalette },\n { id: MenuId.MenubarAppearanceMenu, group: '4_editor', order: 3 },\n { id: MenuId.StickyScrollContext }\n ]\n });\n }\n async run(accessor) {\n const configurationService = accessor.get(IConfigurationService);\n const newValue = !configurationService.getValue('editor.stickyScroll.enabled');\n return configurationService.updateValue('editor.stickyScroll.enabled', newValue);\n }\n}\nconst weight = 100 /* KeybindingWeight.EditorContrib */;\nexport class FocusStickyScroll extends EditorAction2 {\n constructor() {\n super({\n id: 'editor.action.focusStickyScroll',\n title: {\n ...localize2('focusStickyScroll', \"Focus on the editor sticky scroll\"),\n mnemonicTitle: localize({ key: 'mifocusStickyScroll', comment: ['&& denotes a mnemonic'] }, \"&&Focus Sticky Scroll\"),\n },\n precondition: ContextKeyExpr.and(ContextKeyExpr.has('config.editor.stickyScroll.enabled'), EditorContextKeys.stickyScrollVisible),\n menu: [\n { id: MenuId.CommandPalette },\n ]\n });\n }\n runEditorCommand(_accessor, editor) {\n var _a;\n (_a = StickyScrollController.get(editor)) === null || _a === void 0 ? void 0 : _a.focus();\n }\n}\nexport class SelectNextStickyScrollLine extends EditorAction2 {\n constructor() {\n super({\n id: 'editor.action.selectNextStickyScrollLine',\n title: localize2('selectNextStickyScrollLine.title', \"Select the next editor sticky scroll line\"),\n precondition: EditorContextKeys.stickyScrollFocused.isEqualTo(true),\n keybinding: {\n weight,\n primary: 18 /* KeyCode.DownArrow */\n }\n });\n }\n runEditorCommand(_accessor, editor) {\n var _a;\n (_a = StickyScrollController.get(editor)) === null || _a === void 0 ? void 0 : _a.focusNext();\n }\n}\nexport class SelectPreviousStickyScrollLine extends EditorAction2 {\n constructor() {\n super({\n id: 'editor.action.selectPreviousStickyScrollLine',\n title: localize2('selectPreviousStickyScrollLine.title', \"Select the previous sticky scroll line\"),\n precondition: EditorContextKeys.stickyScrollFocused.isEqualTo(true),\n keybinding: {\n weight,\n primary: 16 /* KeyCode.UpArrow */\n }\n });\n }\n runEditorCommand(_accessor, editor) {\n var _a;\n (_a = StickyScrollController.get(editor)) === null || _a === void 0 ? void 0 : _a.focusPrevious();\n }\n}\nexport class GoToStickyScrollLine extends EditorAction2 {\n constructor() {\n super({\n id: 'editor.action.goToFocusedStickyScrollLine',\n title: localize2('goToFocusedStickyScrollLine.title', \"Go to the focused sticky scroll line\"),\n precondition: EditorContextKeys.stickyScrollFocused.isEqualTo(true),\n keybinding: {\n weight,\n primary: 3 /* KeyCode.Enter */\n }\n });\n }\n runEditorCommand(_accessor, editor) {\n var _a;\n (_a = StickyScrollController.get(editor)) === null || _a === void 0 ? void 0 : _a.goToFocused();\n }\n}\nexport class SelectEditor extends EditorAction2 {\n constructor() {\n super({\n id: 'editor.action.selectEditor',\n title: localize2('selectEditor.title', \"Select Editor\"),\n precondition: EditorContextKeys.stickyScrollFocused.isEqualTo(true),\n keybinding: {\n weight,\n primary: 9 /* KeyCode.Escape */\n }\n });\n }\n runEditorCommand(_accessor, editor) {\n var _a;\n (_a = StickyScrollController.get(editor)) === null || _a === void 0 ? void 0 : _a.selectEditor();\n }\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { registerEditorContribution } from '../../../browser/editorExtensions.js';\nimport { ToggleStickyScroll, FocusStickyScroll, SelectEditor, SelectPreviousStickyScrollLine, SelectNextStickyScrollLine, GoToStickyScrollLine } from './stickyScrollActions.js';\nimport { StickyScrollController } from './stickyScrollController.js';\nimport { registerAction2 } from '../../../../platform/actions/common/actions.js';\nregisterEditorContribution(StickyScrollController.ID, StickyScrollController, 1 /* EditorContributionInstantiation.AfterFirstRender */);\nregisterAction2(ToggleStickyScroll);\nregisterAction2(FocusStickyScroll);\nregisterAction2(SelectPreviousStickyScrollLine);\nregisterAction2(SelectNextStickyScrollLine);\nregisterAction2(GoToStickyScrollLine);\nregisterAction2(SelectEditor);\n"],"names":["StickyScrollWidgetState","constructor","startLineNumbers","endLineNumbers","lastLineRelativePosition","showEndForLine","this","equals","other","_ttPolicy","createHTML","value","STICKY_INDEX_ATTR","STICKY_IS_LINE_ATTR","STICKY_IS_FOLDING_ICON_ATTR","StickyScrollWidget","_editor","super","_foldingIconStore","_rootDomNode","document","createElement","_lineNumbersDomNode","_linesDomNodeScrollable","_linesDomNode","_lineHeight","getOption","_renderedStickyLines","_lineNumbers","_lastLineRelativePosition","_minContentWidthInPx","_isOnGlyphMargin","className","setAttribute","appendChild","classList","toggle","updateScrollLeftPosition","style","left","scrollWithEditor","getScrollLeft","_register","onDidChangeConfiguration","e","hasChanged","onDidScrollChange","scrollLeftChanged","scrollWidthChanged","_updateWidgetWidth","onDidChangeModel","onDidLayoutChange","lineNumbers","lineNumberCount","length","getRenderedStickyLine","lineNumber","find","stickyLine","getCurrentLines","setState","_state","foldingModel","_rebuildFromLine","undefined","_previousState","isWidgetHeightZero","_isWidgetHeightZero","state","rebuildFromLine","_findLineToRebuildWidgetFrom","_renderRootNode","futureWidgetHeight","previousState","indexOfLinesAlreadyRendered","findIndex","startLineNumber","includes","layoutInfo","getLayoutInfo","lineNumbersWidth","contentLeft","width","setProperty","getScrollWidth","verticalScrollbarWidth","_clearStickyLinesFromLine","clearFromLine","clear","i","lineNumberDomNode","remove","lineDomNode","slice","display","_useFoldingOpacityTransition","requireTransitions","_setFoldingIconsVisibility","allVisible","line","foldingIcon","setVisible","isCollapsed","_updateTopAndZIndexOfStickyLine","linesToRender","index","entries","_renderChildNode","push","_setFoldingHoverListeners","widgetHeight","height","marginLeft","Math","max","map","l","scrollWidth","layoutOverlayWidget","add","dom","viewModel","_getViewModel","viewLineNumber","coordinatesConverter","convertModelPositionToViewPosition","lineRenderingData","getViewLineRenderingData","lineNumberOption","actualInlineDecorations","inlineDecorations","minColumn","maxColumn","err","renderLineInput","content","continuesWithWrappedLine","isBasicASCII","containsRTL","tokens","tabSize","startVisibleColumn","sb","renderOutput","newLine","build","lineHTMLNode","String","tabIndex","lineHeight","innerHTML","lineNumberHTMLNode","innerLineNumberHTML","renderType","innerText","toString","abs","getPosition","paddingLeft","lineNumbersLeft","_renderFoldingIconForLine","domNode","applyFontInfo","renderedLine","RenderedStickyLine","characterMapping","_a","isLastLine","zIndex","lastLineTop","intermediateLineTop","top","showFoldingControls","foldingRegions","regions","indexOfFoldingRegion","findRange","getStartLineNumber","StickyFoldingIcon","getEndLineNumber","getId","getDomNode","preference","stackOridinal","getMinContentWidthInPx","focusLineWithIndex","focus","getEditorPositionFromNode","spanDomNode","children","renderedStickyLine","_getRenderedStickyLineFromChildDomNode","column","getLineNumberFromChildDomNode","_b","getLineIndexFromChildDomNode","lineIndex","_getAttributeValue","parseInt","isInStickyLine","isInFoldingIconDomNode","attribute","getAttribute","parentElement","foldingStartLine","foldingEndLine","dimension","visible","cursor","opacity","StickyRange","endLineNumber","StickyElement","range","parent","StickyModel","uri","version","element","outlineProviderId","ModelProvider","Status","__decorate","decorators","target","key","desc","d","c","arguments","r","Object","getOwnPropertyDescriptor","Reflect","decorate","defineProperty","__param","paramIndex","decorator","StickyModelProvider","onProviderUpdate","_languageConfigurationService","_languageFeaturesService","_modelProviders","_modelPromise","_updateScheduler","_updateOperation","defaultModel","OUTLINE_MODEL","StickyModelFromCandidateOutlineProvider","FOLDING_PROVIDER_MODEL","StickyModelFromCandidateSyntaxFoldingProvider","INDENTATION_MODEL","StickyModelFromCandidateIndentationFoldingProvider","dispose","forEach","provider","_cancelModelPromise","cancel","update","token","trigger","async","modelProvider","statusPromise","modelPromise","computeStickyModel","status","CANCELED","VALID","stickyModel","catch","error","StickyModelCandidateProvider","_stickyModel","_invalid","INVALID","isCancellationRequested","isProviderValid","providerModelPromise","createModelFromProvider","then","providerModel","isModelValid","createStickyModel","model","documentSymbolProvider","getModel","stickyOutlineElement","providerID","_stickyModelFromOutlineModel","textModel","getVersionId","size","outlineModel","preferredProvider","outlineElements","values","outlineGroupOfModel","id","optimalOutlineGroup","tempID","maxTotalSumOfRanges","_key","outlineGroup","totalSumRanges","_findSumOfRangesOfGroup","stickyChildren","outlineElementsArray","Array","from","sort","element1","element2","range1","symbol","range2","_comparator","outlineElement","_stickyModelFromOutlineElement","selectionRange","previousStartLine","child","subchild","child1","child2","outline","res","StickyModelFromCandidateFoldingProvider","editor","_foldingLimitReporter","foldingElement","_fromFoldingRegions","orderedStickyElements","parentIndex","getParentIndex","parentNode","compute","selectedProviders","StickyLineCandidate","nestingDepth","StickyLineCandidateProvider","_onDidChangeStickyScroll","onDidChangeStickyScroll","event","_model","_cts","_stickyModelProvider","_sessionStore","_updateSoon","readConfiguration","enabled","updateStickyModelProvider","fire","onDidChangeHiddenAreas","onDidChangeModelContent","schedule","onDidChange","hasModel","updateStickyModel","isTooLargeForTokenization","updateIndex","getCandidateStickyLinesIntersectingFromStickyModel","result","depth","lastStartLineNumber","lastLine","childrenStartLines","lowerBound","a","b","upperBound","childStartLine","childEndLine","getCandidateStickyLinesIntersecting","stickyLineCandidates","hiddenRanges","getHiddenAreas","hiddenRange","filter","StickyScrollController_1","StickyScrollController","_contextMenuService","_instaService","_languageFeatureDebounceService","_contextKeyService","_foldingModel","_maxStickyLines","Number","MAX_SAFE_INTEGER","_candidateDefinitionsLength","_focusedStickyElementIndex","_enabled","_focused","_positionRevealed","_onMouseDown","_endLineNumbers","_showEndForLine","_stickyScrollWidget","_stickyLineCandidateProvider","_widgetState","_onDidResize","_readConfiguration","stickyScrollDomNode","_readConfigurationChange","_onContextMenu","_stickyScrollFocusedContextKey","_stickyScrollVisibleContextKey","focusTracker","onDidBlur","_","clientHeight","_disposeFocusStickyScrollStore","onDidFocus","_registerMouseListeners","get","getContribution","ID","set","_focusDisposableStore","focusNext","_focusNav","focusPrevious","selectEditor","direction","goToFocused","_revealPosition","position","_reveaInEditor","revealPosition","_revealLineInCenterIfOutsideViewport","revealLineInCenterIfOutsideViewport","revealFunction","setSelection","sessionStore","gesture","extractLineNumberFromMouseEvent","getMouseEventTarget","mouseEvent","type","detail","mouseTargetElement","textElement","stickyScrollWidgetDomNode","ctrlKey","altKey","metaKey","leftButton","shiftKey","_toggleFoldingRegionForLine","currentEndForLineIndex","_renderStickyScroll","onMouseMoveOrRelevantKeyDown","_keyboardEvent","mouseTarget","hasTriggerModifier","equalsRange","_stickyRangeProjectedOnEditor","textDecoration","cancellationToken","currentHTMLChild","definitionProvider","startColumn","candidateDefinitions","childHTML","onCancel","onExecute","invokeFunction","targetWindow","showContextMenu","menuId","getAnchor","MAX_VALUE","scrollTop","getTopForLineNumber","setScrollTop","options","removeOverlayWidget","addOverlayWidget","scrollTopChanged","onDidChangeModelTokens","_onTokensChange","onDidChangeCursorPosition","_needsUpdate","stickyLineNumbers","stickyLineNumber","ranges","fromLineNumber","toLineNumber","theoreticalLines","round","stickyLineVersion","getFoldingModel","findScrollWidgetState","focusedStickyElementLineNumber","maxNumberStickyLines","min","maxLineCount","getScrollTop","arrayVisibleRanges","getVisibleRanges","fullVisibleRange","candidateRanges","start","end","topOfElementAtDepth","bottomOfElementAtDepth","bottomOfBeginningLine","getBottomForLineNumber","topOfEndLine","bottomOfEndLine","ToggleStickyScroll","title","mnemonicTitle","comment","metadata","description","category","toggled","condition","menu","group","order","run","accessor","configurationService","newValue","getValue","updateValue","weight","FocusStickyScroll","precondition","runEditorCommand","_accessor","SelectNextStickyScrollLine","keybinding","primary","SelectPreviousStickyScrollLine","GoToStickyScrollLine","SelectEditor"],"sourceRoot":""}