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cAAArG,GACI,IAAK,MAAMqG,KAAOnP,KAAKiB,WACnB,GAAIkO,EAAIsZ,gBACJ,OAAOtZ,EAGf,OAAOnP,KAAKiB,WAAW,EAC3B,CACA,yBAAOkpB,CAAmBS,EAAGC,GACzB,OAAO,aAAeD,EAAEzoB,IAAK0oB,EAAE1oB,MAAQ,6BAA+ByoB,EAAExoB,MAAOyoB,EAAEzoB,MACrF,E","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/gotoSymbol/browser/symbolNavigation.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/gotoSymbol/browser/goToCommands.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/gotoSymbol/browser/goToSymbol.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/gotoSymbol/browser/link/clickLinkGesture.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/gotoSymbol/browser/link/goToDefinitionAtPosition.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/gotoSymbol/browser/peek/referencesTree.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/gotoSymbol/browser/peek/referencesWidget.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/gotoSymbol/browser/peek/referencesController.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/gotoSymbol/browser/referencesModel.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 *--------------------------------------------------------------------------------------------*/\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 { Emitter } from '../../../../base/common/event.js';\nimport { combinedDisposable, DisposableStore, dispose } from '../../../../base/common/lifecycle.js';\nimport { isEqual } from '../../../../base/common/resources.js';\nimport { EditorCommand, registerEditorCommand } from '../../../browser/editorExtensions.js';\nimport { ICodeEditorService } from '../../../browser/services/codeEditorService.js';\nimport { Range } from '../../../common/core/range.js';\nimport { localize } from '../../../../nls.js';\nimport { IContextKeyService, RawContextKey } from '../../../../platform/contextkey/common/contextkey.js';\nimport { registerSingleton } from '../../../../platform/instantiation/common/extensions.js';\nimport { createDecorator } from '../../../../platform/instantiation/common/instantiation.js';\nimport { IKeybindingService } from '../../../../platform/keybinding/common/keybinding.js';\nimport { KeybindingsRegistry } from '../../../../platform/keybinding/common/keybindingsRegistry.js';\nimport { INotificationService } from '../../../../platform/notification/common/notification.js';\nexport const ctxHasSymbols = new RawContextKey('hasSymbols', false, localize('hasSymbols', \"Whether there are symbol locations that can be navigated via keyboard-only.\"));\nexport const ISymbolNavigationService = createDecorator('ISymbolNavigationService');\nlet SymbolNavigationService = class SymbolNavigationService {\n constructor(contextKeyService, _editorService, _notificationService, _keybindingService) {\n this._editorService = _editorService;\n this._notificationService = _notificationService;\n this._keybindingService = _keybindingService;\n this._currentModel = undefined;\n this._currentIdx = -1;\n this._ignoreEditorChange = false;\n this._ctxHasSymbols = ctxHasSymbols.bindTo(contextKeyService);\n }\n reset() {\n var _a, _b;\n this._ctxHasSymbols.reset();\n (_a = this._currentState) === null || _a === void 0 ? void 0 : _a.dispose();\n (_b = this._currentMessage) === null || _b === void 0 ? void 0 : _b.dispose();\n this._currentModel = undefined;\n this._currentIdx = -1;\n }\n put(anchor) {\n const refModel = anchor.parent.parent;\n if (refModel.references.length <= 1) {\n this.reset();\n return;\n }\n this._currentModel = refModel;\n this._currentIdx = refModel.references.indexOf(anchor);\n this._ctxHasSymbols.set(true);\n this._showMessage();\n const editorState = new EditorState(this._editorService);\n const listener = editorState.onDidChange(_ => {\n if (this._ignoreEditorChange) {\n return;\n }\n const editor = this._editorService.getActiveCodeEditor();\n if (!editor) {\n return;\n }\n const model = editor.getModel();\n const position = editor.getPosition();\n if (!model || !position) {\n return;\n }\n let seenUri = false;\n let seenPosition = false;\n for (const reference of refModel.references) {\n if (isEqual(reference.uri, model.uri)) {\n seenUri = true;\n seenPosition = seenPosition || Range.containsPosition(reference.range, position);\n }\n else if (seenUri) {\n break;\n }\n }\n if (!seenUri || !seenPosition) {\n this.reset();\n }\n });\n this._currentState = combinedDisposable(editorState, listener);\n }\n revealNext(source) {\n if (!this._currentModel) {\n return Promise.resolve();\n }\n // get next result and advance\n this._currentIdx += 1;\n this._currentIdx %= this._currentModel.references.length;\n const reference = this._currentModel.references[this._currentIdx];\n // status\n this._showMessage();\n // open editor, ignore events while that happens\n this._ignoreEditorChange = true;\n return this._editorService.openCodeEditor({\n resource: reference.uri,\n options: {\n selection: Range.collapseToStart(reference.range),\n selectionRevealType: 3 /* TextEditorSelectionRevealType.NearTopIfOutsideViewport */\n }\n }, source).finally(() => {\n this._ignoreEditorChange = false;\n });\n }\n _showMessage() {\n var _a;\n (_a = this._currentMessage) === null || _a === void 0 ? void 0 : _a.dispose();\n const kb = this._keybindingService.lookupKeybinding('editor.gotoNextSymbolFromResult');\n const message = kb\n ? localize('location.kb', \"Symbol {0} of {1}, {2} for next\", this._currentIdx + 1, this._currentModel.references.length, kb.getLabel())\n : localize('location', \"Symbol {0} of {1}\", this._currentIdx + 1, this._currentModel.references.length);\n this._currentMessage = this._notificationService.status(message);\n }\n};\nSymbolNavigationService = __decorate([\n __param(0, IContextKeyService),\n __param(1, ICodeEditorService),\n __param(2, INotificationService),\n __param(3, IKeybindingService)\n], SymbolNavigationService);\nregisterSingleton(ISymbolNavigationService, SymbolNavigationService, 1 /* InstantiationType.Delayed */);\nregisterEditorCommand(new class extends EditorCommand {\n constructor() {\n super({\n id: 'editor.gotoNextSymbolFromResult',\n precondition: ctxHasSymbols,\n kbOpts: {\n weight: 100 /* KeybindingWeight.EditorContrib */,\n primary: 70 /* KeyCode.F12 */\n }\n });\n }\n runEditorCommand(accessor, editor) {\n return accessor.get(ISymbolNavigationService).revealNext(editor);\n }\n});\nKeybindingsRegistry.registerCommandAndKeybindingRule({\n id: 'editor.gotoNextSymbolFromResult.cancel',\n weight: 100 /* KeybindingWeight.EditorContrib */,\n when: ctxHasSymbols,\n primary: 9 /* KeyCode.Escape */,\n handler(accessor) {\n accessor.get(ISymbolNavigationService).reset();\n }\n});\n//\nlet EditorState = class EditorState {\n constructor(editorService) {\n this._listener = new Map();\n this._disposables = new DisposableStore();\n this._onDidChange = new Emitter();\n this.onDidChange = this._onDidChange.event;\n this._disposables.add(editorService.onCodeEditorRemove(this._onDidRemoveEditor, this));\n this._disposables.add(editorService.onCodeEditorAdd(this._onDidAddEditor, this));\n editorService.listCodeEditors().forEach(this._onDidAddEditor, this);\n }\n dispose() {\n this._disposables.dispose();\n this._onDidChange.dispose();\n dispose(this._listener.values());\n }\n _onDidAddEditor(editor) {\n this._listener.set(editor, combinedDisposable(editor.onDidChangeCursorPosition(_ => this._onDidChange.fire({ editor })), editor.onDidChangeModelContent(_ => this._onDidChange.fire({ editor }))));\n }\n _onDidRemoveEditor(editor) {\n var _a;\n (_a = this._listener.get(editor)) === null || _a === void 0 ? void 0 : _a.dispose();\n this._listener.delete(editor);\n }\n};\nEditorState = __decorate([\n __param(0, ICodeEditorService)\n], EditorState);\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 _a, _b, _c, _d, _e, _f, _g, _h;\nimport { alert } from '../../../../base/browser/ui/aria/aria.js';\nimport { createCancelablePromise, raceCancellation } from '../../../../base/common/async.js';\nimport { KeyChord } from '../../../../base/common/keyCodes.js';\nimport { assertType } from '../../../../base/common/types.js';\nimport { URI } from '../../../../base/common/uri.js';\nimport { EditorStateCancellationTokenSource } from '../../editorState/browser/editorState.js';\nimport { isCodeEditor } from '../../../browser/editorBrowser.js';\nimport { EditorAction2 } from '../../../browser/editorExtensions.js';\nimport { ICodeEditorService } from '../../../browser/services/codeEditorService.js';\nimport { EmbeddedCodeEditorWidget } from '../../../browser/widget/codeEditor/embeddedCodeEditorWidget.js';\nimport * as corePosition from '../../../common/core/position.js';\nimport { Range } from '../../../common/core/range.js';\nimport { EditorContextKeys } from '../../../common/editorContextKeys.js';\nimport { isLocationLink } from '../../../common/languages.js';\nimport { ReferencesController } from './peek/referencesController.js';\nimport { ReferencesModel } from './referencesModel.js';\nimport { ISymbolNavigationService } from './symbolNavigation.js';\nimport { MessageController } from '../../message/browser/messageController.js';\nimport { PeekContext } from '../../peekView/browser/peekView.js';\nimport * as nls from '../../../../nls.js';\nimport { MenuId, MenuRegistry, registerAction2 } from '../../../../platform/actions/common/actions.js';\nimport { CommandsRegistry, ICommandService } from '../../../../platform/commands/common/commands.js';\nimport { ContextKeyExpr } from '../../../../platform/contextkey/common/contextkey.js';\nimport { IInstantiationService } from '../../../../platform/instantiation/common/instantiation.js';\nimport { INotificationService } from '../../../../platform/notification/common/notification.js';\nimport { IEditorProgressService } from '../../../../platform/progress/common/progress.js';\nimport { getDeclarationsAtPosition, getDefinitionsAtPosition, getImplementationsAtPosition, getReferencesAtPosition, getTypeDefinitionsAtPosition } from './goToSymbol.js';\nimport { ILanguageFeaturesService } from '../../../common/services/languageFeatures.js';\nimport { Iterable } from '../../../../base/common/iterator.js';\nimport { IsWebContext } from '../../../../platform/contextkey/common/contextkeys.js';\nMenuRegistry.appendMenuItem(MenuId.EditorContext, {\n submenu: MenuId.EditorContextPeek,\n title: nls.localize('peek.submenu', \"Peek\"),\n group: 'navigation',\n order: 100\n});\nexport class SymbolNavigationAnchor {\n static is(thing) {\n if (!thing || typeof thing !== 'object') {\n return false;\n }\n if (thing instanceof SymbolNavigationAnchor) {\n return true;\n }\n if (corePosition.Position.isIPosition(thing.position) && thing.model) {\n return true;\n }\n return false;\n }\n constructor(model, position) {\n this.model = model;\n this.position = position;\n }\n}\nexport class SymbolNavigationAction extends EditorAction2 {\n static all() {\n return SymbolNavigationAction._allSymbolNavigationCommands.values();\n }\n static _patchConfig(opts) {\n const result = { ...opts, f1: true };\n // patch context menu when clause\n if (result.menu) {\n for (const item of Iterable.wrap(result.menu)) {\n if (item.id === MenuId.EditorContext || item.id === MenuId.EditorContextPeek) {\n item.when = ContextKeyExpr.and(opts.precondition, item.when);\n }\n }\n }\n return result;\n }\n constructor(configuration, opts) {\n super(SymbolNavigationAction._patchConfig(opts));\n this.configuration = configuration;\n SymbolNavigationAction._allSymbolNavigationCommands.set(opts.id, this);\n }\n runEditorCommand(accessor, editor, arg, range) {\n if (!editor.hasModel()) {\n return Promise.resolve(undefined);\n }\n const notificationService = accessor.get(INotificationService);\n const editorService = accessor.get(ICodeEditorService);\n const progressService = accessor.get(IEditorProgressService);\n const symbolNavService = accessor.get(ISymbolNavigationService);\n const languageFeaturesService = accessor.get(ILanguageFeaturesService);\n const instaService = accessor.get(IInstantiationService);\n const model = editor.getModel();\n const position = editor.getPosition();\n const anchor = SymbolNavigationAnchor.is(arg) ? arg : new SymbolNavigationAnchor(model, position);\n const cts = new EditorStateCancellationTokenSource(editor, 1 /* CodeEditorStateFlag.Value */ | 4 /* CodeEditorStateFlag.Position */);\n const promise = raceCancellation(this._getLocationModel(languageFeaturesService, anchor.model, anchor.position, cts.token), cts.token).then(async (references) => {\n var _j;\n if (!references || cts.token.isCancellationRequested) {\n return;\n }\n alert(references.ariaMessage);\n let altAction;\n if (references.referenceAt(model.uri, position)) {\n const altActionId = this._getAlternativeCommand(editor);\n if (!SymbolNavigationAction._activeAlternativeCommands.has(altActionId) && SymbolNavigationAction._allSymbolNavigationCommands.has(altActionId)) {\n altAction = SymbolNavigationAction._allSymbolNavigationCommands.get(altActionId);\n }\n }\n const referenceCount = references.references.length;\n if (referenceCount === 0) {\n // no result -> show message\n if (!this.configuration.muteMessage) {\n const info = model.getWordAtPosition(position);\n (_j = MessageController.get(editor)) === null || _j === void 0 ? void 0 : _j.showMessage(this._getNoResultFoundMessage(info), position);\n }\n }\n else if (referenceCount === 1 && altAction) {\n // already at the only result, run alternative\n SymbolNavigationAction._activeAlternativeCommands.add(this.desc.id);\n instaService.invokeFunction((accessor) => altAction.runEditorCommand(accessor, editor, arg, range).finally(() => {\n SymbolNavigationAction._activeAlternativeCommands.delete(this.desc.id);\n }));\n }\n else {\n // normal results handling\n return this._onResult(editorService, symbolNavService, editor, references, range);\n }\n }, (err) => {\n // report an error\n notificationService.error(err);\n }).finally(() => {\n cts.dispose();\n });\n progressService.showWhile(promise, 250);\n return promise;\n }\n async _onResult(editorService, symbolNavService, editor, model, range) {\n const gotoLocation = this._getGoToPreference(editor);\n if (!(editor instanceof EmbeddedCodeEditorWidget) && (this.configuration.openInPeek || (gotoLocation === 'peek' && model.references.length > 1))) {\n this._openInPeek(editor, model, range);\n }\n else {\n const next = model.firstReference();\n const peek = model.references.length > 1 && gotoLocation === 'gotoAndPeek';\n const targetEditor = await this._openReference(editor, editorService, next, this.configuration.openToSide, !peek);\n if (peek && targetEditor) {\n this._openInPeek(targetEditor, model, range);\n }\n else {\n model.dispose();\n }\n // keep remaining locations around when using\n // 'goto'-mode\n if (gotoLocation === 'goto') {\n symbolNavService.put(next);\n }\n }\n }\n async _openReference(editor, editorService, reference, sideBySide, highlight) {\n // range is the target-selection-range when we have one\n // and the fallback is the 'full' range\n let range = undefined;\n if (isLocationLink(reference)) {\n range = reference.targetSelectionRange;\n }\n if (!range) {\n range = reference.range;\n }\n if (!range) {\n return undefined;\n }\n const targetEditor = await editorService.openCodeEditor({\n resource: reference.uri,\n options: {\n selection: Range.collapseToStart(range),\n selectionRevealType: 3 /* TextEditorSelectionRevealType.NearTopIfOutsideViewport */,\n selectionSource: \"code.jump\" /* TextEditorSelectionSource.JUMP */\n }\n }, editor, sideBySide);\n if (!targetEditor) {\n return undefined;\n }\n if (highlight) {\n const modelNow = targetEditor.getModel();\n const decorations = targetEditor.createDecorationsCollection([{ range, options: { description: 'symbol-navigate-action-highlight', className: 'symbolHighlight' } }]);\n setTimeout(() => {\n if (targetEditor.getModel() === modelNow) {\n decorations.clear();\n }\n }, 350);\n }\n return targetEditor;\n }\n _openInPeek(target, model, range) {\n const controller = ReferencesController.get(target);\n if (controller && target.hasModel()) {\n controller.toggleWidget(range !== null && range !== void 0 ? range : target.getSelection(), createCancelablePromise(_ => Promise.resolve(model)), this.configuration.openInPeek);\n }\n else {\n model.dispose();\n }\n }\n}\nSymbolNavigationAction._allSymbolNavigationCommands = new Map();\nSymbolNavigationAction._activeAlternativeCommands = new Set();\n//#region --- DEFINITION\nexport class DefinitionAction extends SymbolNavigationAction {\n async _getLocationModel(languageFeaturesService, model, position, token) {\n return new ReferencesModel(await getDefinitionsAtPosition(languageFeaturesService.definitionProvider, model, position, token), nls.localize('def.title', 'Definitions'));\n }\n _getNoResultFoundMessage(info) {\n return info && info.word\n ? nls.localize('noResultWord', \"No definition found for '{0}'\", info.word)\n : nls.localize('generic.noResults', \"No definition found\");\n }\n _getAlternativeCommand(editor) {\n return editor.getOption(58 /* EditorOption.gotoLocation */).alternativeDefinitionCommand;\n }\n _getGoToPreference(editor) {\n return editor.getOption(58 /* EditorOption.gotoLocation */).multipleDefinitions;\n }\n}\nregisterAction2((_a = class GoToDefinitionAction extends DefinitionAction {\n constructor() {\n super({\n openToSide: false,\n openInPeek: false,\n muteMessage: false\n }, {\n id: _a.id,\n title: {\n ...nls.localize2('actions.goToDecl.label', \"Go to Definition\"),\n mnemonicTitle: nls.localize({ key: 'miGotoDefinition', comment: ['&& denotes a mnemonic'] }, \"Go to &&Definition\"),\n },\n precondition: EditorContextKeys.hasDefinitionProvider,\n keybinding: [{\n when: EditorContextKeys.editorTextFocus,\n primary: 70 /* KeyCode.F12 */,\n weight: 100 /* KeybindingWeight.EditorContrib */\n }, {\n when: ContextKeyExpr.and(EditorContextKeys.editorTextFocus, IsWebContext),\n primary: 2048 /* KeyMod.CtrlCmd */ | 70 /* KeyCode.F12 */,\n weight: 100 /* KeybindingWeight.EditorContrib */\n }],\n menu: [{\n id: MenuId.EditorContext,\n group: 'navigation',\n order: 1.1\n }, {\n id: MenuId.MenubarGoMenu,\n precondition: null,\n group: '4_symbol_nav',\n order: 2,\n }]\n });\n CommandsRegistry.registerCommandAlias('editor.action.goToDeclaration', _a.id);\n }\n },\n _a.id = 'editor.action.revealDefinition',\n _a));\nregisterAction2((_b = class OpenDefinitionToSideAction extends DefinitionAction {\n constructor() {\n super({\n openToSide: true,\n openInPeek: false,\n muteMessage: false\n }, {\n id: _b.id,\n title: nls.localize2('actions.goToDeclToSide.label', \"Open Definition to the Side\"),\n precondition: ContextKeyExpr.and(EditorContextKeys.hasDefinitionProvider, EditorContextKeys.isInEmbeddedEditor.toNegated()),\n keybinding: [{\n when: EditorContextKeys.editorTextFocus,\n primary: KeyChord(2048 /* KeyMod.CtrlCmd */ | 41 /* KeyCode.KeyK */, 70 /* KeyCode.F12 */),\n weight: 100 /* KeybindingWeight.EditorContrib */\n }, {\n when: ContextKeyExpr.and(EditorContextKeys.editorTextFocus, IsWebContext),\n primary: KeyChord(2048 /* KeyMod.CtrlCmd */ | 41 /* KeyCode.KeyK */, 2048 /* KeyMod.CtrlCmd */ | 70 /* KeyCode.F12 */),\n weight: 100 /* KeybindingWeight.EditorContrib */\n }]\n });\n CommandsRegistry.registerCommandAlias('editor.action.openDeclarationToTheSide', _b.id);\n }\n },\n _b.id = 'editor.action.revealDefinitionAside',\n _b));\nregisterAction2((_c = class PeekDefinitionAction extends DefinitionAction {\n constructor() {\n super({\n openToSide: false,\n openInPeek: true,\n muteMessage: false\n }, {\n id: _c.id,\n title: nls.localize2('actions.previewDecl.label', \"Peek Definition\"),\n precondition: ContextKeyExpr.and(EditorContextKeys.hasDefinitionProvider, PeekContext.notInPeekEditor, EditorContextKeys.isInEmbeddedEditor.toNegated()),\n keybinding: {\n when: EditorContextKeys.editorTextFocus,\n primary: 512 /* KeyMod.Alt */ | 70 /* KeyCode.F12 */,\n linux: { primary: 2048 /* KeyMod.CtrlCmd */ | 1024 /* KeyMod.Shift */ | 68 /* KeyCode.F10 */ },\n weight: 100 /* KeybindingWeight.EditorContrib */\n },\n menu: {\n id: MenuId.EditorContextPeek,\n group: 'peek',\n order: 2\n }\n });\n CommandsRegistry.registerCommandAlias('editor.action.previewDeclaration', _c.id);\n }\n },\n _c.id = 'editor.action.peekDefinition',\n _c));\n//#endregion\n//#region --- DECLARATION\nclass DeclarationAction extends SymbolNavigationAction {\n async _getLocationModel(languageFeaturesService, model, position, token) {\n return new ReferencesModel(await getDeclarationsAtPosition(languageFeaturesService.declarationProvider, model, position, token), nls.localize('decl.title', 'Declarations'));\n }\n _getNoResultFoundMessage(info) {\n return info && info.word\n ? nls.localize('decl.noResultWord', \"No declaration found for '{0}'\", info.word)\n : nls.localize('decl.generic.noResults', \"No declaration found\");\n }\n _getAlternativeCommand(editor) {\n return editor.getOption(58 /* EditorOption.gotoLocation */).alternativeDeclarationCommand;\n }\n _getGoToPreference(editor) {\n return editor.getOption(58 /* EditorOption.gotoLocation */).multipleDeclarations;\n }\n}\nregisterAction2((_d = class GoToDeclarationAction extends DeclarationAction {\n constructor() {\n super({\n openToSide: false,\n openInPeek: false,\n muteMessage: false\n }, {\n id: _d.id,\n title: {\n ...nls.localize2('actions.goToDeclaration.label', \"Go to Declaration\"),\n mnemonicTitle: nls.localize({ key: 'miGotoDeclaration', comment: ['&& denotes a mnemonic'] }, \"Go to &&Declaration\"),\n },\n precondition: ContextKeyExpr.and(EditorContextKeys.hasDeclarationProvider, EditorContextKeys.isInEmbeddedEditor.toNegated()),\n menu: [{\n id: MenuId.EditorContext,\n group: 'navigation',\n order: 1.3\n }, {\n id: MenuId.MenubarGoMenu,\n precondition: null,\n group: '4_symbol_nav',\n order: 3,\n }],\n });\n }\n _getNoResultFoundMessage(info) {\n return info && info.word\n ? nls.localize('decl.noResultWord', \"No declaration found for '{0}'\", info.word)\n : nls.localize('decl.generic.noResults', \"No declaration found\");\n }\n },\n _d.id = 'editor.action.revealDeclaration',\n _d));\nregisterAction2(class PeekDeclarationAction extends DeclarationAction {\n constructor() {\n super({\n openToSide: false,\n openInPeek: true,\n muteMessage: false\n }, {\n id: 'editor.action.peekDeclaration',\n title: nls.localize2('actions.peekDecl.label', \"Peek Declaration\"),\n precondition: ContextKeyExpr.and(EditorContextKeys.hasDeclarationProvider, PeekContext.notInPeekEditor, EditorContextKeys.isInEmbeddedEditor.toNegated()),\n menu: {\n id: MenuId.EditorContextPeek,\n group: 'peek',\n order: 3\n }\n });\n }\n});\n//#endregion\n//#region --- TYPE DEFINITION\nclass TypeDefinitionAction extends SymbolNavigationAction {\n async _getLocationModel(languageFeaturesService, model, position, token) {\n return new ReferencesModel(await getTypeDefinitionsAtPosition(languageFeaturesService.typeDefinitionProvider, model, position, token), nls.localize('typedef.title', 'Type Definitions'));\n }\n _getNoResultFoundMessage(info) {\n return info && info.word\n ? nls.localize('goToTypeDefinition.noResultWord', \"No type definition found for '{0}'\", info.word)\n : nls.localize('goToTypeDefinition.generic.noResults', \"No type definition found\");\n }\n _getAlternativeCommand(editor) {\n return editor.getOption(58 /* EditorOption.gotoLocation */).alternativeTypeDefinitionCommand;\n }\n _getGoToPreference(editor) {\n return editor.getOption(58 /* EditorOption.gotoLocation */).multipleTypeDefinitions;\n }\n}\nregisterAction2((_e = class GoToTypeDefinitionAction extends TypeDefinitionAction {\n constructor() {\n super({\n openToSide: false,\n openInPeek: false,\n muteMessage: false\n }, {\n id: _e.ID,\n title: {\n ...nls.localize2('actions.goToTypeDefinition.label', \"Go to Type Definition\"),\n mnemonicTitle: nls.localize({ key: 'miGotoTypeDefinition', comment: ['&& denotes a mnemonic'] }, \"Go to &&Type Definition\"),\n },\n precondition: EditorContextKeys.hasTypeDefinitionProvider,\n keybinding: {\n when: EditorContextKeys.editorTextFocus,\n primary: 0,\n weight: 100 /* KeybindingWeight.EditorContrib */\n },\n menu: [{\n id: MenuId.EditorContext,\n group: 'navigation',\n order: 1.4\n }, {\n id: MenuId.MenubarGoMenu,\n precondition: null,\n group: '4_symbol_nav',\n order: 3,\n }]\n });\n }\n },\n _e.ID = 'editor.action.goToTypeDefinition',\n _e));\nregisterAction2((_f = class PeekTypeDefinitionAction extends TypeDefinitionAction {\n constructor() {\n super({\n openToSide: false,\n openInPeek: true,\n muteMessage: false\n }, {\n id: _f.ID,\n title: nls.localize2('actions.peekTypeDefinition.label', \"Peek Type Definition\"),\n precondition: ContextKeyExpr.and(EditorContextKeys.hasTypeDefinitionProvider, PeekContext.notInPeekEditor, EditorContextKeys.isInEmbeddedEditor.toNegated()),\n menu: {\n id: MenuId.EditorContextPeek,\n group: 'peek',\n order: 4\n }\n });\n }\n },\n _f.ID = 'editor.action.peekTypeDefinition',\n _f));\n//#endregion\n//#region --- IMPLEMENTATION\nclass ImplementationAction extends SymbolNavigationAction {\n async _getLocationModel(languageFeaturesService, model, position, token) {\n return new ReferencesModel(await getImplementationsAtPosition(languageFeaturesService.implementationProvider, model, position, token), nls.localize('impl.title', 'Implementations'));\n }\n _getNoResultFoundMessage(info) {\n return info && info.word\n ? nls.localize('goToImplementation.noResultWord', \"No implementation found for '{0}'\", info.word)\n : nls.localize('goToImplementation.generic.noResults', \"No implementation found\");\n }\n _getAlternativeCommand(editor) {\n return editor.getOption(58 /* EditorOption.gotoLocation */).alternativeImplementationCommand;\n }\n _getGoToPreference(editor) {\n return editor.getOption(58 /* EditorOption.gotoLocation */).multipleImplementations;\n }\n}\nregisterAction2((_g = class GoToImplementationAction extends ImplementationAction {\n constructor() {\n super({\n openToSide: false,\n openInPeek: false,\n muteMessage: false\n }, {\n id: _g.ID,\n title: {\n ...nls.localize2('actions.goToImplementation.label', \"Go to Implementations\"),\n mnemonicTitle: nls.localize({ key: 'miGotoImplementation', comment: ['&& denotes a mnemonic'] }, \"Go to &&Implementations\"),\n },\n precondition: EditorContextKeys.hasImplementationProvider,\n keybinding: {\n when: EditorContextKeys.editorTextFocus,\n primary: 2048 /* KeyMod.CtrlCmd */ | 70 /* KeyCode.F12 */,\n weight: 100 /* KeybindingWeight.EditorContrib */\n },\n menu: [{\n id: MenuId.EditorContext,\n group: 'navigation',\n order: 1.45\n }, {\n id: MenuId.MenubarGoMenu,\n precondition: null,\n group: '4_symbol_nav',\n order: 4,\n }]\n });\n }\n },\n _g.ID = 'editor.action.goToImplementation',\n _g));\nregisterAction2((_h = class PeekImplementationAction extends ImplementationAction {\n constructor() {\n super({\n openToSide: false,\n openInPeek: true,\n muteMessage: false\n }, {\n id: _h.ID,\n title: nls.localize2('actions.peekImplementation.label', \"Peek Implementations\"),\n precondition: ContextKeyExpr.and(EditorContextKeys.hasImplementationProvider, PeekContext.notInPeekEditor, EditorContextKeys.isInEmbeddedEditor.toNegated()),\n keybinding: {\n when: EditorContextKeys.editorTextFocus,\n primary: 2048 /* KeyMod.CtrlCmd */ | 1024 /* KeyMod.Shift */ | 70 /* KeyCode.F12 */,\n weight: 100 /* KeybindingWeight.EditorContrib */\n },\n menu: {\n id: MenuId.EditorContextPeek,\n group: 'peek',\n order: 5\n }\n });\n }\n },\n _h.ID = 'editor.action.peekImplementation',\n _h));\n//#endregion\n//#region --- REFERENCES\nclass ReferencesAction extends SymbolNavigationAction {\n _getNoResultFoundMessage(info) {\n return info\n ? nls.localize('references.no', \"No references found for '{0}'\", info.word)\n : nls.localize('references.noGeneric', \"No references found\");\n }\n _getAlternativeCommand(editor) {\n return editor.getOption(58 /* EditorOption.gotoLocation */).alternativeReferenceCommand;\n }\n _getGoToPreference(editor) {\n return editor.getOption(58 /* EditorOption.gotoLocation */).multipleReferences;\n }\n}\nregisterAction2(class GoToReferencesAction extends ReferencesAction {\n constructor() {\n super({\n openToSide: false,\n openInPeek: false,\n muteMessage: false\n }, {\n id: 'editor.action.goToReferences',\n title: {\n ...nls.localize2('goToReferences.label', \"Go to References\"),\n mnemonicTitle: nls.localize({ key: 'miGotoReference', comment: ['&& denotes a mnemonic'] }, \"Go to &&References\"),\n },\n precondition: ContextKeyExpr.and(EditorContextKeys.hasReferenceProvider, PeekContext.notInPeekEditor, EditorContextKeys.isInEmbeddedEditor.toNegated()),\n keybinding: {\n when: EditorContextKeys.editorTextFocus,\n primary: 1024 /* KeyMod.Shift */ | 70 /* KeyCode.F12 */,\n weight: 100 /* KeybindingWeight.EditorContrib */\n },\n menu: [{\n id: MenuId.EditorContext,\n group: 'navigation',\n order: 1.45\n }, {\n id: MenuId.MenubarGoMenu,\n precondition: null,\n group: '4_symbol_nav',\n order: 5,\n }]\n });\n }\n async _getLocationModel(languageFeaturesService, model, position, token) {\n return new ReferencesModel(await getReferencesAtPosition(languageFeaturesService.referenceProvider, model, position, true, token), nls.localize('ref.title', 'References'));\n }\n});\nregisterAction2(class PeekReferencesAction extends ReferencesAction {\n constructor() {\n super({\n openToSide: false,\n openInPeek: true,\n muteMessage: false\n }, {\n id: 'editor.action.referenceSearch.trigger',\n title: nls.localize2('references.action.label', \"Peek References\"),\n precondition: ContextKeyExpr.and(EditorContextKeys.hasReferenceProvider, PeekContext.notInPeekEditor, EditorContextKeys.isInEmbeddedEditor.toNegated()),\n menu: {\n id: MenuId.EditorContextPeek,\n group: 'peek',\n order: 6\n }\n });\n }\n async _getLocationModel(languageFeaturesService, model, position, token) {\n return new ReferencesModel(await getReferencesAtPosition(languageFeaturesService.referenceProvider, model, position, false, token), nls.localize('ref.title', 'References'));\n }\n});\n//#endregion\n//#region --- GENERIC goto symbols command\nclass GenericGoToLocationAction extends SymbolNavigationAction {\n constructor(config, _references, _gotoMultipleBehaviour) {\n super(config, {\n id: 'editor.action.goToLocation',\n title: nls.localize2('label.generic', \"Go to Any Symbol\"),\n precondition: ContextKeyExpr.and(PeekContext.notInPeekEditor, EditorContextKeys.isInEmbeddedEditor.toNegated()),\n });\n this._references = _references;\n this._gotoMultipleBehaviour = _gotoMultipleBehaviour;\n }\n async _getLocationModel(languageFeaturesService, _model, _position, _token) {\n return new ReferencesModel(this._references, nls.localize('generic.title', 'Locations'));\n }\n _getNoResultFoundMessage(info) {\n return info && nls.localize('generic.noResult', \"No results for '{0}'\", info.word) || '';\n }\n _getGoToPreference(editor) {\n var _j;\n return (_j = this._gotoMultipleBehaviour) !== null && _j !== void 0 ? _j : editor.getOption(58 /* EditorOption.gotoLocation */).multipleReferences;\n }\n _getAlternativeCommand() { return ''; }\n}\nCommandsRegistry.registerCommand({\n id: 'editor.action.goToLocations',\n metadata: {\n description: 'Go to locations from a position in a file',\n args: [\n { name: 'uri', description: 'The text document in which to start', constraint: URI },\n { name: 'position', description: 'The position at which to start', constraint: corePosition.Position.isIPosition },\n { name: 'locations', description: 'An array of locations.', constraint: Array },\n { name: 'multiple', description: 'Define what to do when having multiple results, either `peek`, `gotoAndPeek`, or `goto`' },\n { name: 'noResultsMessage', description: 'Human readable message that shows when locations is empty.' },\n ]\n },\n handler: async (accessor, resource, position, references, multiple, noResultsMessage, openInPeek) => {\n assertType(URI.isUri(resource));\n assertType(corePosition.Position.isIPosition(position));\n assertType(Array.isArray(references));\n assertType(typeof multiple === 'undefined' || typeof multiple === 'string');\n assertType(typeof openInPeek === 'undefined' || typeof openInPeek === 'boolean');\n const editorService = accessor.get(ICodeEditorService);\n const editor = await editorService.openCodeEditor({ resource }, editorService.getFocusedCodeEditor());\n if (isCodeEditor(editor)) {\n editor.setPosition(position);\n editor.revealPositionInCenterIfOutsideViewport(position, 0 /* ScrollType.Smooth */);\n return editor.invokeWithinContext(accessor => {\n const command = new class extends GenericGoToLocationAction {\n _getNoResultFoundMessage(info) {\n return noResultsMessage || super._getNoResultFoundMessage(info);\n }\n }({\n muteMessage: !Boolean(noResultsMessage),\n openInPeek: Boolean(openInPeek),\n openToSide: false\n }, references, multiple);\n accessor.get(IInstantiationService).invokeFunction(command.run.bind(command), editor);\n });\n }\n }\n});\nCommandsRegistry.registerCommand({\n id: 'editor.action.peekLocations',\n metadata: {\n description: 'Peek locations from a position in a file',\n args: [\n { name: 'uri', description: 'The text document in which to start', constraint: URI },\n { name: 'position', description: 'The position at which to start', constraint: corePosition.Position.isIPosition },\n { name: 'locations', description: 'An array of locations.', constraint: Array },\n { name: 'multiple', description: 'Define what to do when having multiple results, either `peek`, `gotoAndPeek`, or `goto`' },\n ]\n },\n handler: async (accessor, resource, position, references, multiple) => {\n accessor.get(ICommandService).executeCommand('editor.action.goToLocations', resource, position, references, multiple, undefined, true);\n }\n});\n//#endregion\n//#region --- REFERENCE search special commands\nCommandsRegistry.registerCommand({\n id: 'editor.action.findReferences',\n handler: (accessor, resource, position) => {\n assertType(URI.isUri(resource));\n assertType(corePosition.Position.isIPosition(position));\n const languageFeaturesService = accessor.get(ILanguageFeaturesService);\n const codeEditorService = accessor.get(ICodeEditorService);\n return codeEditorService.openCodeEditor({ resource }, codeEditorService.getFocusedCodeEditor()).then(control => {\n if (!isCodeEditor(control) || !control.hasModel()) {\n return undefined;\n }\n const controller = ReferencesController.get(control);\n if (!controller) {\n return undefined;\n }\n const references = createCancelablePromise(token => getReferencesAtPosition(languageFeaturesService.referenceProvider, control.getModel(), corePosition.Position.lift(position), false, token).then(references => new ReferencesModel(references, nls.localize('ref.title', 'References'))));\n const range = new Range(position.lineNumber, position.column, position.lineNumber, position.column);\n return Promise.resolve(controller.toggleWidget(range, references, false));\n });\n }\n});\n// use NEW command\nCommandsRegistry.registerCommandAlias('editor.action.showReferences', 'editor.action.peekLocations');\n//#endregion\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 { coalesce } from '../../../../base/common/arrays.js';\nimport { CancellationToken } from '../../../../base/common/cancellation.js';\nimport { onUnexpectedExternalError } from '../../../../base/common/errors.js';\nimport { matchesSomeScheme, Schemas } from '../../../../base/common/network.js';\nimport { registerModelAndPositionCommand } from '../../../browser/editorExtensions.js';\nimport { ILanguageFeaturesService } from '../../../common/services/languageFeatures.js';\nimport { ReferencesModel } from './referencesModel.js';\nfunction shouldIncludeLocationLink(sourceModel, loc) {\n // Always allow the location if the request comes from a document with the same scheme.\n if (loc.uri.scheme === sourceModel.uri.scheme) {\n return true;\n }\n // Otherwise filter out locations from internal schemes\n if (matchesSomeScheme(loc.uri, Schemas.walkThroughSnippet, Schemas.vscodeChatCodeBlock, Schemas.vscodeChatCodeCompareBlock, Schemas.vscodeCopilotBackingChatCodeBlock)) {\n return false;\n }\n return true;\n}\nasync function getLocationLinks(model, position, registry, provide) {\n const provider = registry.ordered(model);\n // get results\n const promises = provider.map((provider) => {\n return Promise.resolve(provide(provider, model, position)).then(undefined, err => {\n onUnexpectedExternalError(err);\n return undefined;\n });\n });\n const values = await Promise.all(promises);\n return coalesce(values.flat()).filter(loc => shouldIncludeLocationLink(model, loc));\n}\nexport function getDefinitionsAtPosition(registry, model, position, token) {\n return getLocationLinks(model, position, registry, (provider, model, position) => {\n return provider.provideDefinition(model, position, token);\n });\n}\nexport function getDeclarationsAtPosition(registry, model, position, token) {\n return getLocationLinks(model, position, registry, (provider, model, position) => {\n return provider.provideDeclaration(model, position, token);\n });\n}\nexport function getImplementationsAtPosition(registry, model, position, token) {\n return getLocationLinks(model, position, registry, (provider, model, position) => {\n return provider.provideImplementation(model, position, token);\n });\n}\nexport function getTypeDefinitionsAtPosition(registry, model, position, token) {\n return getLocationLinks(model, position, registry, (provider, model, position) => {\n return provider.provideTypeDefinition(model, position, token);\n });\n}\nexport function getReferencesAtPosition(registry, model, position, compact, token) {\n return getLocationLinks(model, position, registry, async (provider, model, position) => {\n var _a, _b;\n const result = (_a = (await provider.provideReferences(model, position, { includeDeclaration: true }, token))) === null || _a === void 0 ? void 0 : _a.filter(ref => shouldIncludeLocationLink(model, ref));\n if (!compact || !result || result.length !== 2) {\n return result;\n }\n const resultWithoutDeclaration = (_b = (await provider.provideReferences(model, position, { includeDeclaration: false }, token))) === null || _b === void 0 ? void 0 : _b.filter(ref => shouldIncludeLocationLink(model, ref));\n if (resultWithoutDeclaration && resultWithoutDeclaration.length === 1) {\n return resultWithoutDeclaration;\n }\n return result;\n });\n}\n// -- API commands ----\nasync function _sortedAndDeduped(callback) {\n const rawLinks = await callback();\n const model = new ReferencesModel(rawLinks, '');\n const modelLinks = model.references.map(ref => ref.link);\n model.dispose();\n return modelLinks;\n}\nregisterModelAndPositionCommand('_executeDefinitionProvider', (accessor, model, position) => {\n const languageFeaturesService = accessor.get(ILanguageFeaturesService);\n const promise = getDefinitionsAtPosition(languageFeaturesService.definitionProvider, model, position, CancellationToken.None);\n return _sortedAndDeduped(() => promise);\n});\nregisterModelAndPositionCommand('_executeTypeDefinitionProvider', (accessor, model, position) => {\n const languageFeaturesService = accessor.get(ILanguageFeaturesService);\n const promise = getTypeDefinitionsAtPosition(languageFeaturesService.typeDefinitionProvider, model, position, CancellationToken.None);\n return _sortedAndDeduped(() => promise);\n});\nregisterModelAndPositionCommand('_executeDeclarationProvider', (accessor, model, position) => {\n const languageFeaturesService = accessor.get(ILanguageFeaturesService);\n const promise = getDeclarationsAtPosition(languageFeaturesService.declarationProvider, model, position, CancellationToken.None);\n return _sortedAndDeduped(() => promise);\n});\nregisterModelAndPositionCommand('_executeReferenceProvider', (accessor, model, position) => {\n const languageFeaturesService = accessor.get(ILanguageFeaturesService);\n const promise = getReferencesAtPosition(languageFeaturesService.referenceProvider, model, position, false, CancellationToken.None);\n return _sortedAndDeduped(() => promise);\n});\nregisterModelAndPositionCommand('_executeImplementationProvider', (accessor, model, position) => {\n const languageFeaturesService = accessor.get(ILanguageFeaturesService);\n const promise = getImplementationsAtPosition(languageFeaturesService.implementationProvider, model, position, CancellationToken.None);\n return _sortedAndDeduped(() => promise);\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 { Emitter } from '../../../../../base/common/event.js';\nimport { Disposable } from '../../../../../base/common/lifecycle.js';\nimport * as platform from '../../../../../base/common/platform.js';\nfunction hasModifier(e, modifier) {\n return !!e[modifier];\n}\n/**\n * An event that encapsulates the various trigger modifiers logic needed for go to definition.\n */\nexport class ClickLinkMouseEvent {\n constructor(source, opts) {\n this.target = source.target;\n this.isLeftClick = source.event.leftButton;\n this.isMiddleClick = source.event.middleButton;\n this.isRightClick = source.event.rightButton;\n this.hasTriggerModifier = hasModifier(source.event, opts.triggerModifier);\n this.hasSideBySideModifier = hasModifier(source.event, opts.triggerSideBySideModifier);\n this.isNoneOrSingleMouseDown = (source.event.detail <= 1);\n }\n}\n/**\n * An event that encapsulates the various trigger modifiers logic needed for go to definition.\n */\nexport class ClickLinkKeyboardEvent {\n constructor(source, opts) {\n this.keyCodeIsTriggerKey = (source.keyCode === opts.triggerKey);\n this.keyCodeIsSideBySideKey = (source.keyCode === opts.triggerSideBySideKey);\n this.hasTriggerModifier = hasModifier(source, opts.triggerModifier);\n }\n}\nexport class ClickLinkOptions {\n constructor(triggerKey, triggerModifier, triggerSideBySideKey, triggerSideBySideModifier) {\n this.triggerKey = triggerKey;\n this.triggerModifier = triggerModifier;\n this.triggerSideBySideKey = triggerSideBySideKey;\n this.triggerSideBySideModifier = triggerSideBySideModifier;\n }\n equals(other) {\n return (this.triggerKey === other.triggerKey\n && this.triggerModifier === other.triggerModifier\n && this.triggerSideBySideKey === other.triggerSideBySideKey\n && this.triggerSideBySideModifier === other.triggerSideBySideModifier);\n }\n}\nfunction createOptions(multiCursorModifier) {\n if (multiCursorModifier === 'altKey') {\n if (platform.isMacintosh) {\n return new ClickLinkOptions(57 /* KeyCode.Meta */, 'metaKey', 6 /* KeyCode.Alt */, 'altKey');\n }\n return new ClickLinkOptions(5 /* KeyCode.Ctrl */, 'ctrlKey', 6 /* KeyCode.Alt */, 'altKey');\n }\n if (platform.isMacintosh) {\n return new ClickLinkOptions(6 /* KeyCode.Alt */, 'altKey', 57 /* KeyCode.Meta */, 'metaKey');\n }\n return new ClickLinkOptions(6 /* KeyCode.Alt */, 'altKey', 5 /* KeyCode.Ctrl */, 'ctrlKey');\n}\nexport class ClickLinkGesture extends Disposable {\n constructor(editor, opts) {\n var _a;\n super();\n this._onMouseMoveOrRelevantKeyDown = this._register(new Emitter());\n this.onMouseMoveOrRelevantKeyDown = this._onMouseMoveOrRelevantKeyDown.event;\n this._onExecute = this._register(new Emitter());\n this.onExecute = this._onExecute.event;\n this._onCancel = this._register(new Emitter());\n this.onCancel = this._onCancel.event;\n this._editor = editor;\n this._extractLineNumberFromMouseEvent = (_a = opts === null || opts === void 0 ? void 0 : opts.extractLineNumberFromMouseEvent) !== null && _a !== void 0 ? _a : ((e) => e.target.position ? e.target.position.lineNumber : 0);\n this._opts = createOptions(this._editor.getOption(78 /* EditorOption.multiCursorModifier */));\n this._lastMouseMoveEvent = null;\n this._hasTriggerKeyOnMouseDown = false;\n this._lineNumberOnMouseDown = 0;\n this._register(this._editor.onDidChangeConfiguration((e) => {\n if (e.hasChanged(78 /* EditorOption.multiCursorModifier */)) {\n const newOpts = createOptions(this._editor.getOption(78 /* EditorOption.multiCursorModifier */));\n if (this._opts.equals(newOpts)) {\n return;\n }\n this._opts = newOpts;\n this._lastMouseMoveEvent = null;\n this._hasTriggerKeyOnMouseDown = false;\n this._lineNumberOnMouseDown = 0;\n this._onCancel.fire();\n }\n }));\n this._register(this._editor.onMouseMove((e) => this._onEditorMouseMove(new ClickLinkMouseEvent(e, this._opts))));\n this._register(this._editor.onMouseDown((e) => this._onEditorMouseDown(new ClickLinkMouseEvent(e, this._opts))));\n this._register(this._editor.onMouseUp((e) => this._onEditorMouseUp(new ClickLinkMouseEvent(e, this._opts))));\n this._register(this._editor.onKeyDown((e) => this._onEditorKeyDown(new ClickLinkKeyboardEvent(e, this._opts))));\n this._register(this._editor.onKeyUp((e) => this._onEditorKeyUp(new ClickLinkKeyboardEvent(e, this._opts))));\n this._register(this._editor.onMouseDrag(() => this._resetHandler()));\n this._register(this._editor.onDidChangeCursorSelection((e) => this._onDidChangeCursorSelection(e)));\n this._register(this._editor.onDidChangeModel((e) => this._resetHandler()));\n this._register(this._editor.onDidChangeModelContent(() => this._resetHandler()));\n this._register(this._editor.onDidScrollChange((e) => {\n if (e.scrollTopChanged || e.scrollLeftChanged) {\n this._resetHandler();\n }\n }));\n }\n _onDidChangeCursorSelection(e) {\n if (e.selection && e.selection.startColumn !== e.selection.endColumn) {\n this._resetHandler(); // immediately stop this feature if the user starts to select (https://github.com/microsoft/vscode/issues/7827)\n }\n }\n _onEditorMouseMove(mouseEvent) {\n this._lastMouseMoveEvent = mouseEvent;\n this._onMouseMoveOrRelevantKeyDown.fire([mouseEvent, null]);\n }\n _onEditorMouseDown(mouseEvent) {\n // We need to record if we had the trigger key on mouse down because someone might select something in the editor\n // holding the mouse down and then while mouse is down start to press Ctrl/Cmd to start a copy operation and then\n // release the mouse button without wanting to do the navigation.\n // With this flag we prevent goto definition if the mouse was down before the trigger key was pressed.\n this._hasTriggerKeyOnMouseDown = mouseEvent.hasTriggerModifier;\n this._lineNumberOnMouseDown = this._extractLineNumberFromMouseEvent(mouseEvent);\n }\n _onEditorMouseUp(mouseEvent) {\n const currentLineNumber = this._extractLineNumberFromMouseEvent(mouseEvent);\n if (this._hasTriggerKeyOnMouseDown && this._lineNumberOnMouseDown && this._lineNumberOnMouseDown === currentLineNumber) {\n this._onExecute.fire(mouseEvent);\n }\n }\n _onEditorKeyDown(e) {\n if (this._lastMouseMoveEvent\n && (e.keyCodeIsTriggerKey // User just pressed Ctrl/Cmd (normal goto definition)\n || (e.keyCodeIsSideBySideKey && e.hasTriggerModifier) // User pressed Ctrl/Cmd+Alt (goto definition to the side)\n )) {\n this._onMouseMoveOrRelevantKeyDown.fire([this._lastMouseMoveEvent, e]);\n }\n else if (e.hasTriggerModifier) {\n this._onCancel.fire(); // remove decorations if user holds another key with ctrl/cmd to prevent accident goto declaration\n }\n }\n _onEditorKeyUp(e) {\n if (e.keyCodeIsTriggerKey) {\n this._onCancel.fire();\n }\n }\n _resetHandler() {\n this._lastMouseMoveEvent = null;\n this._hasTriggerKeyOnMouseDown = false;\n this._onCancel.fire();\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};\nvar GotoDefinitionAtPositionEditorContribution_1;\nimport { createCancelablePromise } from '../../../../../base/common/async.js';\nimport { onUnexpectedError } from '../../../../../base/common/errors.js';\nimport { MarkdownString } from '../../../../../base/common/htmlContent.js';\nimport { DisposableStore } from '../../../../../base/common/lifecycle.js';\nimport './goToDefinitionAtPosition.css';\nimport { EditorState } from '../../../editorState/browser/editorState.js';\nimport { registerEditorContribution } from '../../../../browser/editorExtensions.js';\nimport { Range } from '../../../../common/core/range.js';\nimport { ILanguageService } from '../../../../common/languages/language.js';\nimport { ITextModelService } from '../../../../common/services/resolverService.js';\nimport { ClickLinkGesture } from './clickLinkGesture.js';\nimport { PeekContext } from '../../../peekView/browser/peekView.js';\nimport * as nls from '../../../../../nls.js';\nimport { IContextKeyService } from '../../../../../platform/contextkey/common/contextkey.js';\nimport { DefinitionAction } from '../goToCommands.js';\nimport { getDefinitionsAtPosition } from '../goToSymbol.js';\nimport { ILanguageFeaturesService } from '../../../../common/services/languageFeatures.js';\nimport { ModelDecorationInjectedTextOptions } from '../../../../common/model/textModel.js';\nlet GotoDefinitionAtPositionEditorContribution = GotoDefinitionAtPositionEditorContribution_1 = class GotoDefinitionAtPositionEditorContribution {\n constructor(editor, textModelResolverService, languageService, languageFeaturesService) {\n this.textModelResolverService = textModelResolverService;\n this.languageService = languageService;\n this.languageFeaturesService = languageFeaturesService;\n this.toUnhook = new DisposableStore();\n this.toUnhookForKeyboard = new DisposableStore();\n this.currentWordAtPosition = null;\n this.previousPromise = null;\n this.editor = editor;\n this.linkDecorations = this.editor.createDecorationsCollection();\n const linkGesture = new ClickLinkGesture(editor);\n this.toUnhook.add(linkGesture);\n this.toUnhook.add(linkGesture.onMouseMoveOrRelevantKeyDown(([mouseEvent, keyboardEvent]) => {\n this.startFindDefinitionFromMouse(mouseEvent, keyboardEvent !== null && keyboardEvent !== void 0 ? keyboardEvent : undefined);\n }));\n this.toUnhook.add(linkGesture.onExecute((mouseEvent) => {\n if (this.isEnabled(mouseEvent)) {\n this.gotoDefinition(mouseEvent.target.position, mouseEvent.hasSideBySideModifier)\n .catch((error) => {\n onUnexpectedError(error);\n })\n .finally(() => {\n this.removeLinkDecorations();\n });\n }\n }));\n this.toUnhook.add(linkGesture.onCancel(() => {\n this.removeLinkDecorations();\n this.currentWordAtPosition = null;\n }));\n }\n static get(editor) {\n return editor.getContribution(GotoDefinitionAtPositionEditorContribution_1.ID);\n }\n async startFindDefinitionFromCursor(position) {\n // For issue: https://github.com/microsoft/vscode/issues/46257\n // equivalent to mouse move with meta/ctrl key\n // First find the definition and add decorations\n // to the editor to be shown with the content hover widget\n await this.startFindDefinition(position);\n // Add listeners for editor cursor move and key down events\n // Dismiss the \"extended\" editor decorations when the user hides\n // the hover widget. There is no event for the widget itself so these\n // serve as a best effort. After removing the link decorations, the hover\n // widget is clean and will only show declarations per next request.\n this.toUnhookForKeyboard.add(this.editor.onDidChangeCursorPosition(() => {\n this.currentWordAtPosition = null;\n this.removeLinkDecorations();\n this.toUnhookForKeyboard.clear();\n }));\n this.toUnhookForKeyboard.add(this.editor.onKeyDown((e) => {\n if (e) {\n this.currentWordAtPosition = null;\n this.removeLinkDecorations();\n this.toUnhookForKeyboard.clear();\n }\n }));\n }\n startFindDefinitionFromMouse(mouseEvent, withKey) {\n // check if we are active and on a content widget\n if (mouseEvent.target.type === 9 /* MouseTargetType.CONTENT_WIDGET */ && this.linkDecorations.length > 0) {\n return;\n }\n if (!this.editor.hasModel() || !this.isEnabled(mouseEvent, withKey)) {\n this.currentWordAtPosition = null;\n this.removeLinkDecorations();\n return;\n }\n const position = mouseEvent.target.position;\n this.startFindDefinition(position);\n }\n async startFindDefinition(position) {\n var _a;\n // Dispose listeners for updating decorations when using keyboard to show definition hover\n this.toUnhookForKeyboard.clear();\n // Find word at mouse position\n const word = position ? (_a = this.editor.getModel()) === null || _a === void 0 ? void 0 : _a.getWordAtPosition(position) : null;\n if (!word) {\n this.currentWordAtPosition = null;\n this.removeLinkDecorations();\n return;\n }\n // Return early if word at position is still the same\n if (this.currentWordAtPosition && this.currentWordAtPosition.startColumn === word.startColumn && this.currentWordAtPosition.endColumn === word.endColumn && this.currentWordAtPosition.word === word.word) {\n return;\n }\n this.currentWordAtPosition = word;\n // Find definition and decorate word if found\n const state = new EditorState(this.editor, 4 /* CodeEditorStateFlag.Position */ | 1 /* CodeEditorStateFlag.Value */ | 2 /* CodeEditorStateFlag.Selection */ | 8 /* CodeEditorStateFlag.Scroll */);\n if (this.previousPromise) {\n this.previousPromise.cancel();\n this.previousPromise = null;\n }\n this.previousPromise = createCancelablePromise(token => this.findDefinition(position, token));\n let results;\n try {\n results = await this.previousPromise;\n }\n catch (error) {\n onUnexpectedError(error);\n return;\n }\n if (!results || !results.length || !state.validate(this.editor)) {\n this.removeLinkDecorations();\n return;\n }\n const linkRange = results[0].originSelectionRange\n ? Range.lift(results[0].originSelectionRange)\n : new Range(position.lineNumber, word.startColumn, position.lineNumber, word.endColumn);\n // Multiple results\n if (results.length > 1) {\n let combinedRange = linkRange;\n for (const { originSelectionRange } of results) {\n if (originSelectionRange) {\n combinedRange = Range.plusRange(combinedRange, originSelectionRange);\n }\n }\n this.addDecoration(combinedRange, new MarkdownString().appendText(nls.localize('multipleResults', \"Click to show {0} definitions.\", results.length)));\n }\n else {\n // Single result\n const result = results[0];\n if (!result.uri) {\n return;\n }\n this.textModelResolverService.createModelReference(result.uri).then(ref => {\n if (!ref.object || !ref.object.textEditorModel) {\n ref.dispose();\n return;\n }\n const { object: { textEditorModel } } = ref;\n const { startLineNumber } = result.range;\n if (startLineNumber < 1 || startLineNumber > textEditorModel.getLineCount()) {\n // invalid range\n ref.dispose();\n return;\n }\n const previewValue = this.getPreviewValue(textEditorModel, startLineNumber, result);\n const languageId = this.languageService.guessLanguageIdByFilepathOrFirstLine(textEditorModel.uri);\n this.addDecoration(linkRange, previewValue ? new MarkdownString().appendCodeblock(languageId ? languageId : '', previewValue) : undefined);\n ref.dispose();\n });\n }\n }\n getPreviewValue(textEditorModel, startLineNumber, result) {\n let rangeToUse = result.range;\n const numberOfLinesInRange = rangeToUse.endLineNumber - rangeToUse.startLineNumber;\n if (numberOfLinesInRange >= GotoDefinitionAtPositionEditorContribution_1.MAX_SOURCE_PREVIEW_LINES) {\n rangeToUse = this.getPreviewRangeBasedOnIndentation(textEditorModel, startLineNumber);\n }\n const previewValue = this.stripIndentationFromPreviewRange(textEditorModel, startLineNumber, rangeToUse);\n return previewValue;\n }\n stripIndentationFromPreviewRange(textEditorModel, startLineNumber, previewRange) {\n const startIndent = textEditorModel.getLineFirstNonWhitespaceColumn(startLineNumber);\n let minIndent = startIndent;\n for (let endLineNumber = startLineNumber + 1; endLineNumber < previewRange.endLineNumber; endLineNumber++) {\n const endIndent = textEditorModel.getLineFirstNonWhitespaceColumn(endLineNumber);\n minIndent = Math.min(minIndent, endIndent);\n }\n const previewValue = textEditorModel.getValueInRange(previewRange).replace(new RegExp(`^\\\\s{${minIndent - 1}}`, 'gm'), '').trim();\n return previewValue;\n }\n getPreviewRangeBasedOnIndentation(textEditorModel, startLineNumber) {\n const startIndent = textEditorModel.getLineFirstNonWhitespaceColumn(startLineNumber);\n const maxLineNumber = Math.min(textEditorModel.getLineCount(), startLineNumber + GotoDefinitionAtPositionEditorContribution_1.MAX_SOURCE_PREVIEW_LINES);\n let endLineNumber = startLineNumber + 1;\n for (; endLineNumber < maxLineNumber; endLineNumber++) {\n const endIndent = textEditorModel.getLineFirstNonWhitespaceColumn(endLineNumber);\n if (startIndent === endIndent) {\n break;\n }\n }\n return new Range(startLineNumber, 1, endLineNumber + 1, 1);\n }\n addDecoration(range, hoverMessage) {\n const newDecorations = {\n range: range,\n options: {\n description: 'goto-definition-link',\n inlineClassName: 'goto-definition-link',\n hoverMessage\n }\n };\n this.linkDecorations.set([newDecorations]);\n }\n removeLinkDecorations() {\n this.linkDecorations.clear();\n }\n isEnabled(mouseEvent, withKey) {\n var _a;\n return this.editor.hasModel()\n && mouseEvent.isLeftClick\n && mouseEvent.isNoneOrSingleMouseDown\n && mouseEvent.target.type === 6 /* MouseTargetType.CONTENT_TEXT */\n && !(((_a = mouseEvent.target.detail.injectedText) === null || _a === void 0 ? void 0 : _a.options) instanceof ModelDecorationInjectedTextOptions)\n && (mouseEvent.hasTriggerModifier || (withKey ? withKey.keyCodeIsTriggerKey : false))\n && this.languageFeaturesService.definitionProvider.has(this.editor.getModel());\n }\n findDefinition(position, token) {\n const model = this.editor.getModel();\n if (!model) {\n return Promise.resolve(null);\n }\n return getDefinitionsAtPosition(this.languageFeaturesService.definitionProvider, model, position, token);\n }\n gotoDefinition(position, openToSide) {\n this.editor.setPosition(position);\n return this.editor.invokeWithinContext((accessor) => {\n const canPeek = !openToSide && this.editor.getOption(88 /* EditorOption.definitionLinkOpensInPeek */) && !this.isInPeekEditor(accessor);\n const action = new DefinitionAction({ openToSide, openInPeek: canPeek, muteMessage: true }, { title: { value: '', original: '' }, id: '', precondition: undefined });\n return action.run(accessor);\n });\n }\n isInPeekEditor(accessor) {\n const contextKeyService = accessor.get(IContextKeyService);\n return PeekContext.inPeekEditor.getValue(contextKeyService);\n }\n dispose() {\n this.toUnhook.dispose();\n this.toUnhookForKeyboard.dispose();\n }\n};\nGotoDefinitionAtPositionEditorContribution.ID = 'editor.contrib.gotodefinitionatposition';\nGotoDefinitionAtPositionEditorContribution.MAX_SOURCE_PREVIEW_LINES = 8;\nGotoDefinitionAtPositionEditorContribution = GotoDefinitionAtPositionEditorContribution_1 = __decorate([\n __param(1, ITextModelService),\n __param(2, ILanguageService),\n __param(3, ILanguageFeaturesService)\n], GotoDefinitionAtPositionEditorContribution);\nexport { GotoDefinitionAtPositionEditorContribution };\nregisterEditorContribution(GotoDefinitionAtPositionEditorContribution.ID, GotoDefinitionAtPositionEditorContribution, 2 /* EditorContributionInstantiation.BeforeFirstInteraction */);\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 FileReferencesRenderer_1;\nimport * as dom from '../../../../../base/browser/dom.js';\nimport { CountBadge } from '../../../../../base/browser/ui/countBadge/countBadge.js';\nimport { HighlightedLabel } from '../../../../../base/browser/ui/highlightedlabel/highlightedLabel.js';\nimport { IconLabel } from '../../../../../base/browser/ui/iconLabel/iconLabel.js';\nimport { createMatches, FuzzyScore } from '../../../../../base/common/filters.js';\nimport { Disposable } from '../../../../../base/common/lifecycle.js';\nimport { basename, dirname } from '../../../../../base/common/resources.js';\nimport { ITextModelService } from '../../../../common/services/resolverService.js';\nimport { localize } from '../../../../../nls.js';\nimport { IInstantiationService } from '../../../../../platform/instantiation/common/instantiation.js';\nimport { IKeybindingService } from '../../../../../platform/keybinding/common/keybinding.js';\nimport { ILabelService } from '../../../../../platform/label/common/label.js';\nimport { defaultCountBadgeStyles } from '../../../../../platform/theme/browser/defaultStyles.js';\nimport { FileReferences, OneReference, ReferencesModel } from '../referencesModel.js';\nlet DataSource = class DataSource {\n constructor(_resolverService) {\n this._resolverService = _resolverService;\n }\n hasChildren(element) {\n if (element instanceof ReferencesModel) {\n return true;\n }\n if (element instanceof FileReferences) {\n return true;\n }\n return false;\n }\n getChildren(element) {\n if (element instanceof ReferencesModel) {\n return element.groups;\n }\n if (element instanceof FileReferences) {\n return element.resolve(this._resolverService).then(val => {\n // if (element.failure) {\n // \t// refresh the element on failure so that\n // \t// we can update its rendering\n // \treturn tree.refresh(element).then(() => val.children);\n // }\n return val.children;\n });\n }\n throw new Error('bad tree');\n }\n};\nDataSource = __decorate([\n __param(0, ITextModelService)\n], DataSource);\nexport { DataSource };\n//#endregion\nexport class Delegate {\n getHeight() {\n return 23;\n }\n getTemplateId(element) {\n if (element instanceof FileReferences) {\n return FileReferencesRenderer.id;\n }\n else {\n return OneReferenceRenderer.id;\n }\n }\n}\nlet StringRepresentationProvider = class StringRepresentationProvider {\n constructor(_keybindingService) {\n this._keybindingService = _keybindingService;\n }\n getKeyboardNavigationLabel(element) {\n var _a;\n if (element instanceof OneReference) {\n const parts = (_a = element.parent.getPreview(element)) === null || _a === void 0 ? void 0 : _a.preview(element.range);\n if (parts) {\n return parts.value;\n }\n }\n // FileReferences or unresolved OneReference\n return basename(element.uri);\n }\n};\nStringRepresentationProvider = __decorate([\n __param(0, IKeybindingService)\n], StringRepresentationProvider);\nexport { StringRepresentationProvider };\nexport class IdentityProvider {\n getId(element) {\n return element instanceof OneReference ? element.id : element.uri;\n }\n}\n//#region render: File\nlet FileReferencesTemplate = class FileReferencesTemplate extends Disposable {\n constructor(container, _labelService) {\n super();\n this._labelService = _labelService;\n const parent = document.createElement('div');\n parent.classList.add('reference-file');\n this.file = this._register(new IconLabel(parent, { supportHighlights: true }));\n this.badge = new CountBadge(dom.append(parent, dom.$('.count')), {}, defaultCountBadgeStyles);\n container.appendChild(parent);\n }\n set(element, matches) {\n const parent = dirname(element.uri);\n this.file.setLabel(this._labelService.getUriBasenameLabel(element.uri), this._labelService.getUriLabel(parent, { relative: true }), { title: this._labelService.getUriLabel(element.uri), matches });\n const len = element.children.length;\n this.badge.setCount(len);\n if (len > 1) {\n this.badge.setTitleFormat(localize('referencesCount', \"{0} references\", len));\n }\n else {\n this.badge.setTitleFormat(localize('referenceCount', \"{0} reference\", len));\n }\n }\n};\nFileReferencesTemplate = __decorate([\n __param(1, ILabelService)\n], FileReferencesTemplate);\nlet FileReferencesRenderer = FileReferencesRenderer_1 = class FileReferencesRenderer {\n constructor(_instantiationService) {\n this._instantiationService = _instantiationService;\n this.templateId = FileReferencesRenderer_1.id;\n }\n renderTemplate(container) {\n return this._instantiationService.createInstance(FileReferencesTemplate, container);\n }\n renderElement(node, index, template) {\n template.set(node.element, createMatches(node.filterData));\n }\n disposeTemplate(templateData) {\n templateData.dispose();\n }\n};\nFileReferencesRenderer.id = 'FileReferencesRenderer';\nFileReferencesRenderer = FileReferencesRenderer_1 = __decorate([\n __param(0, IInstantiationService)\n], FileReferencesRenderer);\nexport { FileReferencesRenderer };\n//#endregion\n//#region render: Reference\nclass OneReferenceTemplate extends Disposable {\n constructor(container) {\n super();\n this.label = this._register(new HighlightedLabel(container));\n }\n set(element, score) {\n var _a;\n const preview = (_a = element.parent.getPreview(element)) === null || _a === void 0 ? void 0 : _a.preview(element.range);\n if (!preview || !preview.value) {\n // this means we FAILED to resolve the document or the value is the empty string\n this.label.set(`${basename(element.uri)}:${element.range.startLineNumber + 1}:${element.range.startColumn + 1}`);\n }\n else {\n // render search match as highlight unless\n // we have score, then render the score\n const { value, highlight } = preview;\n if (score && !FuzzyScore.isDefault(score)) {\n this.label.element.classList.toggle('referenceMatch', false);\n this.label.set(value, createMatches(score));\n }\n else {\n this.label.element.classList.toggle('referenceMatch', true);\n this.label.set(value, [highlight]);\n }\n }\n }\n}\nexport class OneReferenceRenderer {\n constructor() {\n this.templateId = OneReferenceRenderer.id;\n }\n renderTemplate(container) {\n return new OneReferenceTemplate(container);\n }\n renderElement(node, index, templateData) {\n templateData.set(node.element, node.filterData);\n }\n disposeTemplate(templateData) {\n templateData.dispose();\n }\n}\nOneReferenceRenderer.id = 'OneReferenceRenderer';\n//#endregion\nexport class AccessibilityProvider {\n getWidgetAriaLabel() {\n return localize('treeAriaLabel', \"References\");\n }\n getAriaLabel(element) {\n return element.ariaMessage;\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 * as dom from '../../../../../base/browser/dom.js';\nimport { Sizing, SplitView } from '../../../../../base/browser/ui/splitview/splitview.js';\nimport { Color } from '../../../../../base/common/color.js';\nimport { Emitter, Event } from '../../../../../base/common/event.js';\nimport { DisposableStore, dispose } from '../../../../../base/common/lifecycle.js';\nimport { Schemas } from '../../../../../base/common/network.js';\nimport { basenameOrAuthority, dirname } from '../../../../../base/common/resources.js';\nimport './referencesWidget.css';\nimport { EmbeddedCodeEditorWidget } from '../../../../browser/widget/codeEditor/embeddedCodeEditorWidget.js';\nimport { Range } from '../../../../common/core/range.js';\nimport { ModelDecorationOptions, TextModel } from '../../../../common/model/textModel.js';\nimport { ILanguageConfigurationService } from '../../../../common/languages/languageConfigurationRegistry.js';\nimport { PLAINTEXT_LANGUAGE_ID } from '../../../../common/languages/modesRegistry.js';\nimport { ILanguageService } from '../../../../common/languages/language.js';\nimport { ITextModelService } from '../../../../common/services/resolverService.js';\nimport { AccessibilityProvider, DataSource, Delegate, FileReferencesRenderer, IdentityProvider, OneReferenceRenderer, StringRepresentationProvider } from './referencesTree.js';\nimport * as peekView from '../../../peekView/browser/peekView.js';\nimport * as nls from '../../../../../nls.js';\nimport { IInstantiationService } from '../../../../../platform/instantiation/common/instantiation.js';\nimport { IKeybindingService } from '../../../../../platform/keybinding/common/keybinding.js';\nimport { ILabelService } from '../../../../../platform/label/common/label.js';\nimport { WorkbenchAsyncDataTree } from '../../../../../platform/list/browser/listService.js';\nimport { IThemeService } from '../../../../../platform/theme/common/themeService.js';\nimport { IUndoRedoService } from '../../../../../platform/undoRedo/common/undoRedo.js';\nimport { FileReferences, OneReference } from '../referencesModel.js';\nclass DecorationsManager {\n constructor(_editor, _model) {\n this._editor = _editor;\n this._model = _model;\n this._decorations = new Map();\n this._decorationIgnoreSet = new Set();\n this._callOnDispose = new DisposableStore();\n this._callOnModelChange = new DisposableStore();\n this._callOnDispose.add(this._editor.onDidChangeModel(() => this._onModelChanged()));\n this._onModelChanged();\n }\n dispose() {\n this._callOnModelChange.dispose();\n this._callOnDispose.dispose();\n this.removeDecorations();\n }\n _onModelChanged() {\n this._callOnModelChange.clear();\n const model = this._editor.getModel();\n if (!model) {\n return;\n }\n for (const ref of this._model.references) {\n if (ref.uri.toString() === model.uri.toString()) {\n this._addDecorations(ref.parent);\n return;\n }\n }\n }\n _addDecorations(reference) {\n if (!this._editor.hasModel()) {\n return;\n }\n this._callOnModelChange.add(this._editor.getModel().onDidChangeDecorations(() => this._onDecorationChanged()));\n const newDecorations = [];\n const newDecorationsActualIndex = [];\n for (let i = 0, len = reference.children.length; i < len; i++) {\n const oneReference = reference.children[i];\n if (this._decorationIgnoreSet.has(oneReference.id)) {\n continue;\n }\n if (oneReference.uri.toString() !== this._editor.getModel().uri.toString()) {\n continue;\n }\n newDecorations.push({\n range: oneReference.range,\n options: DecorationsManager.DecorationOptions\n });\n newDecorationsActualIndex.push(i);\n }\n this._editor.changeDecorations((changeAccessor) => {\n const decorations = changeAccessor.deltaDecorations([], newDecorations);\n for (let i = 0; i < decorations.length; i++) {\n this._decorations.set(decorations[i], reference.children[newDecorationsActualIndex[i]]);\n }\n });\n }\n _onDecorationChanged() {\n const toRemove = [];\n const model = this._editor.getModel();\n if (!model) {\n return;\n }\n for (const [decorationId, reference] of this._decorations) {\n const newRange = model.getDecorationRange(decorationId);\n if (!newRange) {\n continue;\n }\n let ignore = false;\n if (Range.equalsRange(newRange, reference.range)) {\n continue;\n }\n if (Range.spansMultipleLines(newRange)) {\n ignore = true;\n }\n else {\n const lineLength = reference.range.endColumn - reference.range.startColumn;\n const newLineLength = newRange.endColumn - newRange.startColumn;\n if (lineLength !== newLineLength) {\n ignore = true;\n }\n }\n if (ignore) {\n this._decorationIgnoreSet.add(reference.id);\n toRemove.push(decorationId);\n }\n else {\n reference.range = newRange;\n }\n }\n for (let i = 0, len = toRemove.length; i < len; i++) {\n this._decorations.delete(toRemove[i]);\n }\n this._editor.removeDecorations(toRemove);\n }\n removeDecorations() {\n this._editor.removeDecorations([...this._decorations.keys()]);\n this._decorations.clear();\n }\n}\nDecorationsManager.DecorationOptions = ModelDecorationOptions.register({\n description: 'reference-decoration',\n stickiness: 1 /* TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges */,\n className: 'reference-decoration'\n});\nexport class LayoutData {\n constructor() {\n this.ratio = 0.7;\n this.heightInLines = 18;\n }\n static fromJSON(raw) {\n let ratio;\n let heightInLines;\n try {\n const data = JSON.parse(raw);\n ratio = data.ratio;\n heightInLines = data.heightInLines;\n }\n catch (_a) {\n //\n }\n return {\n ratio: ratio || 0.7,\n heightInLines: heightInLines || 18\n };\n }\n}\nclass ReferencesTree extends WorkbenchAsyncDataTree {\n}\n/**\n * ZoneWidget that is shown inside the editor\n */\nlet ReferenceWidget = class ReferenceWidget extends peekView.PeekViewWidget {\n constructor(editor, _defaultTreeKeyboardSupport, layoutData, themeService, _textModelResolverService, _instantiationService, _peekViewService, _uriLabel, _undoRedoService, _keybindingService, _languageService, _languageConfigurationService) {\n super(editor, { showFrame: false, showArrow: true, isResizeable: true, isAccessible: true, supportOnTitleClick: true }, _instantiationService);\n this._defaultTreeKeyboardSupport = _defaultTreeKeyboardSupport;\n this.layoutData = layoutData;\n this._textModelResolverService = _textModelResolverService;\n this._instantiationService = _instantiationService;\n this._peekViewService = _peekViewService;\n this._uriLabel = _uriLabel;\n this._undoRedoService = _undoRedoService;\n this._keybindingService = _keybindingService;\n this._languageService = _languageService;\n this._languageConfigurationService = _languageConfigurationService;\n this._disposeOnNewModel = new DisposableStore();\n this._callOnDispose = new DisposableStore();\n this._onDidSelectReference = new Emitter();\n this.onDidSelectReference = this._onDidSelectReference.event;\n this._dim = new dom.Dimension(0, 0);\n this._applyTheme(themeService.getColorTheme());\n this._callOnDispose.add(themeService.onDidColorThemeChange(this._applyTheme.bind(this)));\n this._peekViewService.addExclusiveWidget(editor, this);\n this.create();\n }\n dispose() {\n this.setModel(undefined);\n this._callOnDispose.dispose();\n this._disposeOnNewModel.dispose();\n dispose(this._preview);\n dispose(this._previewNotAvailableMessage);\n dispose(this._tree);\n dispose(this._previewModelReference);\n this._splitView.dispose();\n super.dispose();\n }\n _applyTheme(theme) {\n const borderColor = theme.getColor(peekView.peekViewBorder) || Color.transparent;\n this.style({\n arrowColor: borderColor,\n frameColor: borderColor,\n headerBackgroundColor: theme.getColor(peekView.peekViewTitleBackground) || Color.transparent,\n primaryHeadingColor: theme.getColor(peekView.peekViewTitleForeground),\n secondaryHeadingColor: theme.getColor(peekView.peekViewTitleInfoForeground)\n });\n }\n show(where) {\n super.show(where, this.layoutData.heightInLines || 18);\n }\n focusOnReferenceTree() {\n this._tree.domFocus();\n }\n focusOnPreviewEditor() {\n this._preview.focus();\n }\n isPreviewEditorFocused() {\n return this._preview.hasTextFocus();\n }\n _onTitleClick(e) {\n if (this._preview && this._preview.getModel()) {\n this._onDidSelectReference.fire({\n element: this._getFocusedReference(),\n kind: e.ctrlKey || e.metaKey || e.altKey ? 'side' : 'open',\n source: 'title'\n });\n }\n }\n _fillBody(containerElement) {\n this.setCssClass('reference-zone-widget');\n // message pane\n this._messageContainer = dom.append(containerElement, dom.$('div.messages'));\n dom.hide(this._messageContainer);\n this._splitView = new SplitView(containerElement, { orientation: 1 /* Orientation.HORIZONTAL */ });\n // editor\n this._previewContainer = dom.append(containerElement, dom.$('div.preview.inline'));\n const options = {\n scrollBeyondLastLine: false,\n scrollbar: {\n verticalScrollbarSize: 14,\n horizontal: 'auto',\n useShadows: true,\n verticalHasArrows: false,\n horizontalHasArrows: false,\n alwaysConsumeMouseWheel: true\n },\n overviewRulerLanes: 2,\n fixedOverflowWidgets: true,\n minimap: {\n enabled: false\n }\n };\n this._preview = this._instantiationService.createInstance(EmbeddedCodeEditorWidget, this._previewContainer, options, {}, this.editor);\n dom.hide(this._previewContainer);\n this._previewNotAvailableMessage = new TextModel(nls.localize('missingPreviewMessage', \"no preview available\"), PLAINTEXT_LANGUAGE_ID, TextModel.DEFAULT_CREATION_OPTIONS, null, this._undoRedoService, this._languageService, this._languageConfigurationService);\n // tree\n this._treeContainer = dom.append(containerElement, dom.$('div.ref-tree.inline'));\n const treeOptions = {\n keyboardSupport: this._defaultTreeKeyboardSupport,\n accessibilityProvider: new AccessibilityProvider(),\n keyboardNavigationLabelProvider: this._instantiationService.createInstance(StringRepresentationProvider),\n identityProvider: new IdentityProvider(),\n openOnSingleClick: true,\n selectionNavigation: true,\n overrideStyles: {\n listBackground: peekView.peekViewResultsBackground\n }\n };\n if (this._defaultTreeKeyboardSupport) {\n // the tree will consume `Escape` and prevent the widget from closing\n this._callOnDispose.add(dom.addStandardDisposableListener(this._treeContainer, 'keydown', (e) => {\n if (e.equals(9 /* KeyCode.Escape */)) {\n this._keybindingService.dispatchEvent(e, e.target);\n e.stopPropagation();\n }\n }, true));\n }\n this._tree = this._instantiationService.createInstance(ReferencesTree, 'ReferencesWidget', this._treeContainer, new Delegate(), [\n this._instantiationService.createInstance(FileReferencesRenderer),\n this._instantiationService.createInstance(OneReferenceRenderer),\n ], this._instantiationService.createInstance(DataSource), treeOptions);\n // split stuff\n this._splitView.addView({\n onDidChange: Event.None,\n element: this._previewContainer,\n minimumSize: 200,\n maximumSize: Number.MAX_VALUE,\n layout: (width) => {\n this._preview.layout({ height: this._dim.height, width });\n }\n }, Sizing.Distribute);\n this._splitView.addView({\n onDidChange: Event.None,\n element: this._treeContainer,\n minimumSize: 100,\n maximumSize: Number.MAX_VALUE,\n layout: (width) => {\n this._treeContainer.style.height = `${this._dim.height}px`;\n this._treeContainer.style.width = `${width}px`;\n this._tree.layout(this._dim.height, width);\n }\n }, Sizing.Distribute);\n this._disposables.add(this._splitView.onDidSashChange(() => {\n if (this._dim.width) {\n this.layoutData.ratio = this._splitView.getViewSize(0) / this._dim.width;\n }\n }, undefined));\n // listen on selection and focus\n const onEvent = (element, kind) => {\n if (element instanceof OneReference) {\n if (kind === 'show') {\n this._revealReference(element, false);\n }\n this._onDidSelectReference.fire({ element, kind, source: 'tree' });\n }\n };\n this._tree.onDidOpen(e => {\n if (e.sideBySide) {\n onEvent(e.element, 'side');\n }\n else if (e.editorOptions.pinned) {\n onEvent(e.element, 'goto');\n }\n else {\n onEvent(e.element, 'show');\n }\n });\n dom.hide(this._treeContainer);\n }\n _onWidth(width) {\n if (this._dim) {\n this._doLayoutBody(this._dim.height, width);\n }\n }\n _doLayoutBody(heightInPixel, widthInPixel) {\n super._doLayoutBody(heightInPixel, widthInPixel);\n this._dim = new dom.Dimension(widthInPixel, heightInPixel);\n this.layoutData.heightInLines = this._viewZone ? this._viewZone.heightInLines : this.layoutData.heightInLines;\n this._splitView.layout(widthInPixel);\n this._splitView.resizeView(0, widthInPixel * this.layoutData.ratio);\n }\n setSelection(selection) {\n return this._revealReference(selection, true).then(() => {\n if (!this._model) {\n // disposed\n return;\n }\n // show in tree\n this._tree.setSelection([selection]);\n this._tree.setFocus([selection]);\n });\n }\n setModel(newModel) {\n // clean up\n this._disposeOnNewModel.clear();\n this._model = newModel;\n if (this._model) {\n return this._onNewModel();\n }\n return Promise.resolve();\n }\n _onNewModel() {\n if (!this._model) {\n return Promise.resolve(undefined);\n }\n if (this._model.isEmpty) {\n this.setTitle('');\n this._messageContainer.innerText = nls.localize('noResults', \"No results\");\n dom.show(this._messageContainer);\n return Promise.resolve(undefined);\n }\n dom.hide(this._messageContainer);\n this._decorationsManager = new DecorationsManager(this._preview, this._model);\n this._disposeOnNewModel.add(this._decorationsManager);\n // listen on model changes\n this._disposeOnNewModel.add(this._model.onDidChangeReferenceRange(reference => this._tree.rerender(reference)));\n // listen on editor\n this._disposeOnNewModel.add(this._preview.onMouseDown(e => {\n const { event, target } = e;\n if (event.detail !== 2) {\n return;\n }\n const element = this._getFocusedReference();\n if (!element) {\n return;\n }\n this._onDidSelectReference.fire({\n element: { uri: element.uri, range: target.range },\n kind: (event.ctrlKey || event.metaKey || event.altKey) ? 'side' : 'open',\n source: 'editor'\n });\n }));\n // make sure things are rendered\n this.container.classList.add('results-loaded');\n dom.show(this._treeContainer);\n dom.show(this._previewContainer);\n this._splitView.layout(this._dim.width);\n this.focusOnReferenceTree();\n // pick input and a reference to begin with\n return this._tree.setInput(this._model.groups.length === 1 ? this._model.groups[0] : this._model);\n }\n _getFocusedReference() {\n const [element] = this._tree.getFocus();\n if (element instanceof OneReference) {\n return element;\n }\n else if (element instanceof FileReferences) {\n if (element.children.length > 0) {\n return element.children[0];\n }\n }\n return undefined;\n }\n async revealReference(reference) {\n await this._revealReference(reference, false);\n this._onDidSelectReference.fire({ element: reference, kind: 'goto', source: 'tree' });\n }\n async _revealReference(reference, revealParent) {\n // check if there is anything to do...\n if (this._revealedReference === reference) {\n return;\n }\n this._revealedReference = reference;\n // Update widget header\n if (reference.uri.scheme !== Schemas.inMemory) {\n this.setTitle(basenameOrAuthority(reference.uri), this._uriLabel.getUriLabel(dirname(reference.uri)));\n }\n else {\n this.setTitle(nls.localize('peekView.alternateTitle', \"References\"));\n }\n const promise = this._textModelResolverService.createModelReference(reference.uri);\n if (this._tree.getInput() === reference.parent) {\n this._tree.reveal(reference);\n }\n else {\n if (revealParent) {\n this._tree.reveal(reference.parent);\n }\n await this._tree.expand(reference.parent);\n this._tree.reveal(reference);\n }\n const ref = await promise;\n if (!this._model) {\n // disposed\n ref.dispose();\n return;\n }\n dispose(this._previewModelReference);\n // show in editor\n const model = ref.object;\n if (model) {\n const scrollType = this._preview.getModel() === model.textEditorModel ? 0 /* ScrollType.Smooth */ : 1 /* ScrollType.Immediate */;\n const sel = Range.lift(reference.range).collapseToStart();\n this._previewModelReference = ref;\n this._preview.setModel(model.textEditorModel);\n this._preview.setSelection(sel);\n this._preview.revealRangeInCenter(sel, scrollType);\n }\n else {\n this._preview.setModel(this._previewNotAvailableMessage);\n ref.dispose();\n }\n }\n};\nReferenceWidget = __decorate([\n __param(3, IThemeService),\n __param(4, ITextModelService),\n __param(5, IInstantiationService),\n __param(6, peekView.IPeekViewService),\n __param(7, ILabelService),\n __param(8, IUndoRedoService),\n __param(9, IKeybindingService),\n __param(10, ILanguageService),\n __param(11, ILanguageConfigurationService)\n], ReferenceWidget);\nexport { ReferenceWidget };\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 ReferencesController_1;\nimport { createCancelablePromise } from '../../../../../base/common/async.js';\nimport { onUnexpectedError } from '../../../../../base/common/errors.js';\nimport { KeyChord } from '../../../../../base/common/keyCodes.js';\nimport { DisposableStore } from '../../../../../base/common/lifecycle.js';\nimport { ICodeEditorService } from '../../../../browser/services/codeEditorService.js';\nimport { Position } from '../../../../common/core/position.js';\nimport { Range } from '../../../../common/core/range.js';\nimport { getOuterEditor, PeekContext } from '../../../peekView/browser/peekView.js';\nimport * as nls from '../../../../../nls.js';\nimport { CommandsRegistry } from '../../../../../platform/commands/common/commands.js';\nimport { IConfigurationService } from '../../../../../platform/configuration/common/configuration.js';\nimport { ContextKeyExpr, IContextKeyService, RawContextKey } from '../../../../../platform/contextkey/common/contextkey.js';\nimport { IInstantiationService } from '../../../../../platform/instantiation/common/instantiation.js';\nimport { KeybindingsRegistry } from '../../../../../platform/keybinding/common/keybindingsRegistry.js';\nimport { IListService, WorkbenchListFocusContextKey, WorkbenchTreeElementCanCollapse, WorkbenchTreeElementCanExpand } from '../../../../../platform/list/browser/listService.js';\nimport { INotificationService } from '../../../../../platform/notification/common/notification.js';\nimport { IStorageService } from '../../../../../platform/storage/common/storage.js';\nimport { OneReference } from '../referencesModel.js';\nimport { LayoutData, ReferenceWidget } from './referencesWidget.js';\nimport { EditorContextKeys } from '../../../../common/editorContextKeys.js';\nimport { InputFocusedContext } from '../../../../../platform/contextkey/common/contextkeys.js';\nexport const ctxReferenceSearchVisible = new RawContextKey('referenceSearchVisible', false, nls.localize('referenceSearchVisible', \"Whether reference peek is visible, like 'Peek References' or 'Peek Definition'\"));\nlet ReferencesController = ReferencesController_1 = class ReferencesController {\n static get(editor) {\n return editor.getContribution(ReferencesController_1.ID);\n }\n constructor(_defaultTreeKeyboardSupport, _editor, contextKeyService, _editorService, _notificationService, _instantiationService, _storageService, _configurationService) {\n this._defaultTreeKeyboardSupport = _defaultTreeKeyboardSupport;\n this._editor = _editor;\n this._editorService = _editorService;\n this._notificationService = _notificationService;\n this._instantiationService = _instantiationService;\n this._storageService = _storageService;\n this._configurationService = _configurationService;\n this._disposables = new DisposableStore();\n this._requestIdPool = 0;\n this._ignoreModelChangeEvent = false;\n this._referenceSearchVisible = ctxReferenceSearchVisible.bindTo(contextKeyService);\n }\n dispose() {\n var _a, _b;\n this._referenceSearchVisible.reset();\n this._disposables.dispose();\n (_a = this._widget) === null || _a === void 0 ? void 0 : _a.dispose();\n (_b = this._model) === null || _b === void 0 ? void 0 : _b.dispose();\n this._widget = undefined;\n this._model = undefined;\n }\n toggleWidget(range, modelPromise, peekMode) {\n // close current widget and return early is position didn't change\n let widgetPosition;\n if (this._widget) {\n widgetPosition = this._widget.position;\n }\n this.closeWidget();\n if (!!widgetPosition && range.containsPosition(widgetPosition)) {\n return;\n }\n this._peekMode = peekMode;\n this._referenceSearchVisible.set(true);\n // close the widget on model/mode changes\n this._disposables.add(this._editor.onDidChangeModelLanguage(() => { this.closeWidget(); }));\n this._disposables.add(this._editor.onDidChangeModel(() => {\n if (!this._ignoreModelChangeEvent) {\n this.closeWidget();\n }\n }));\n const storageKey = 'peekViewLayout';\n const data = LayoutData.fromJSON(this._storageService.get(storageKey, 0 /* StorageScope.PROFILE */, '{}'));\n this._widget = this._instantiationService.createInstance(ReferenceWidget, this._editor, this._defaultTreeKeyboardSupport, data);\n this._widget.setTitle(nls.localize('labelLoading', \"Loading...\"));\n this._widget.show(range);\n this._disposables.add(this._widget.onDidClose(() => {\n modelPromise.cancel();\n if (this._widget) {\n this._storageService.store(storageKey, JSON.stringify(this._widget.layoutData), 0 /* StorageScope.PROFILE */, 1 /* StorageTarget.MACHINE */);\n this._widget = undefined;\n }\n this.closeWidget();\n }));\n this._disposables.add(this._widget.onDidSelectReference(event => {\n const { element, kind } = event;\n if (!element) {\n return;\n }\n switch (kind) {\n case 'open':\n if (event.source !== 'editor' || !this._configurationService.getValue('editor.stablePeek')) {\n // when stable peek is configured we don't close\n // the peek window on selecting the editor\n this.openReference(element, false, false);\n }\n break;\n case 'side':\n this.openReference(element, true, false);\n break;\n case 'goto':\n if (peekMode) {\n this._gotoReference(element, true);\n }\n else {\n this.openReference(element, false, true);\n }\n break;\n }\n }));\n const requestId = ++this._requestIdPool;\n modelPromise.then(model => {\n var _a;\n // still current request? widget still open?\n if (requestId !== this._requestIdPool || !this._widget) {\n model.dispose();\n return undefined;\n }\n (_a = this._model) === null || _a === void 0 ? void 0 : _a.dispose();\n this._model = model;\n // show widget\n return this._widget.setModel(this._model).then(() => {\n if (this._widget && this._model && this._editor.hasModel()) { // might have been closed\n // set title\n if (!this._model.isEmpty) {\n this._widget.setMetaTitle(nls.localize('metaTitle.N', \"{0} ({1})\", this._model.title, this._model.references.length));\n }\n else {\n this._widget.setMetaTitle('');\n }\n // set 'best' selection\n const uri = this._editor.getModel().uri;\n const pos = new Position(range.startLineNumber, range.startColumn);\n const selection = this._model.nearestReference(uri, pos);\n if (selection) {\n return this._widget.setSelection(selection).then(() => {\n if (this._widget && this._editor.getOption(87 /* EditorOption.peekWidgetDefaultFocus */) === 'editor') {\n this._widget.focusOnPreviewEditor();\n }\n });\n }\n }\n return undefined;\n });\n }, error => {\n this._notificationService.error(error);\n });\n }\n changeFocusBetweenPreviewAndReferences() {\n if (!this._widget) {\n // can be called while still resolving...\n return;\n }\n if (this._widget.isPreviewEditorFocused()) {\n this._widget.focusOnReferenceTree();\n }\n else {\n this._widget.focusOnPreviewEditor();\n }\n }\n async goToNextOrPreviousReference(fwd) {\n if (!this._editor.hasModel() || !this._model || !this._widget) {\n // can be called while still resolving...\n return;\n }\n const currentPosition = this._widget.position;\n if (!currentPosition) {\n return;\n }\n const source = this._model.nearestReference(this._editor.getModel().uri, currentPosition);\n if (!source) {\n return;\n }\n const target = this._model.nextOrPreviousReference(source, fwd);\n const editorFocus = this._editor.hasTextFocus();\n const previewEditorFocus = this._widget.isPreviewEditorFocused();\n await this._widget.setSelection(target);\n await this._gotoReference(target, false);\n if (editorFocus) {\n this._editor.focus();\n }\n else if (this._widget && previewEditorFocus) {\n this._widget.focusOnPreviewEditor();\n }\n }\n async revealReference(reference) {\n if (!this._editor.hasModel() || !this._model || !this._widget) {\n // can be called while still resolving...\n return;\n }\n await this._widget.revealReference(reference);\n }\n closeWidget(focusEditor = true) {\n var _a, _b;\n (_a = this._widget) === null || _a === void 0 ? void 0 : _a.dispose();\n (_b = this._model) === null || _b === void 0 ? void 0 : _b.dispose();\n this._referenceSearchVisible.reset();\n this._disposables.clear();\n this._widget = undefined;\n this._model = undefined;\n if (focusEditor) {\n this._editor.focus();\n }\n this._requestIdPool += 1; // Cancel pending requests\n }\n _gotoReference(ref, pinned) {\n var _a;\n (_a = this._widget) === null || _a === void 0 ? void 0 : _a.hide();\n this._ignoreModelChangeEvent = true;\n const range = Range.lift(ref.range).collapseToStart();\n return this._editorService.openCodeEditor({\n resource: ref.uri,\n options: { selection: range, selectionSource: \"code.jump\" /* TextEditorSelectionSource.JUMP */, pinned }\n }, this._editor).then(openedEditor => {\n var _a;\n this._ignoreModelChangeEvent = false;\n if (!openedEditor || !this._widget) {\n // something went wrong...\n this.closeWidget();\n return;\n }\n if (this._editor === openedEditor) {\n //\n this._widget.show(range);\n this._widget.focusOnReferenceTree();\n }\n else {\n // we opened a different editor instance which means a different controller instance.\n // therefore we stop with this controller and continue with the other\n const other = ReferencesController_1.get(openedEditor);\n const model = this._model.clone();\n this.closeWidget();\n openedEditor.focus();\n other === null || other === void 0 ? void 0 : other.toggleWidget(range, createCancelablePromise(_ => Promise.resolve(model)), (_a = this._peekMode) !== null && _a !== void 0 ? _a : false);\n }\n }, (err) => {\n this._ignoreModelChangeEvent = false;\n onUnexpectedError(err);\n });\n }\n openReference(ref, sideBySide, pinned) {\n // clear stage\n if (!sideBySide) {\n this.closeWidget();\n }\n const { uri, range } = ref;\n this._editorService.openCodeEditor({\n resource: uri,\n options: { selection: range, selectionSource: \"code.jump\" /* TextEditorSelectionSource.JUMP */, pinned }\n }, this._editor, sideBySide);\n }\n};\nReferencesController.ID = 'editor.contrib.referencesController';\nReferencesController = ReferencesController_1 = __decorate([\n __param(2, IContextKeyService),\n __param(3, ICodeEditorService),\n __param(4, INotificationService),\n __param(5, IInstantiationService),\n __param(6, IStorageService),\n __param(7, IConfigurationService)\n], ReferencesController);\nexport { ReferencesController };\nfunction withController(accessor, fn) {\n const outerEditor = getOuterEditor(accessor);\n if (!outerEditor) {\n return;\n }\n const controller = ReferencesController.get(outerEditor);\n if (controller) {\n fn(controller);\n }\n}\nKeybindingsRegistry.registerCommandAndKeybindingRule({\n id: 'togglePeekWidgetFocus',\n weight: 100 /* KeybindingWeight.EditorContrib */,\n primary: KeyChord(2048 /* KeyMod.CtrlCmd */ | 41 /* KeyCode.KeyK */, 60 /* KeyCode.F2 */),\n when: ContextKeyExpr.or(ctxReferenceSearchVisible, PeekContext.inPeekEditor),\n handler(accessor) {\n withController(accessor, controller => {\n controller.changeFocusBetweenPreviewAndReferences();\n });\n }\n});\nKeybindingsRegistry.registerCommandAndKeybindingRule({\n id: 'goToNextReference',\n weight: 100 /* KeybindingWeight.EditorContrib */ - 10,\n primary: 62 /* KeyCode.F4 */,\n secondary: [70 /* KeyCode.F12 */],\n when: ContextKeyExpr.or(ctxReferenceSearchVisible, PeekContext.inPeekEditor),\n handler(accessor) {\n withController(accessor, controller => {\n controller.goToNextOrPreviousReference(true);\n });\n }\n});\nKeybindingsRegistry.registerCommandAndKeybindingRule({\n id: 'goToPreviousReference',\n weight: 100 /* KeybindingWeight.EditorContrib */ - 10,\n primary: 1024 /* KeyMod.Shift */ | 62 /* KeyCode.F4 */,\n secondary: [1024 /* KeyMod.Shift */ | 70 /* KeyCode.F12 */],\n when: ContextKeyExpr.or(ctxReferenceSearchVisible, PeekContext.inPeekEditor),\n handler(accessor) {\n withController(accessor, controller => {\n controller.goToNextOrPreviousReference(false);\n });\n }\n});\n// commands that aren't needed anymore because there is now ContextKeyExpr.OR\nCommandsRegistry.registerCommandAlias('goToNextReferenceFromEmbeddedEditor', 'goToNextReference');\nCommandsRegistry.registerCommandAlias('goToPreviousReferenceFromEmbeddedEditor', 'goToPreviousReference');\n// close\nCommandsRegistry.registerCommandAlias('closeReferenceSearchEditor', 'closeReferenceSearch');\nCommandsRegistry.registerCommand('closeReferenceSearch', accessor => withController(accessor, controller => controller.closeWidget()));\nKeybindingsRegistry.registerKeybindingRule({\n id: 'closeReferenceSearch',\n weight: 100 /* KeybindingWeight.EditorContrib */ - 101,\n primary: 9 /* KeyCode.Escape */,\n secondary: [1024 /* KeyMod.Shift */ | 9 /* KeyCode.Escape */],\n when: ContextKeyExpr.and(PeekContext.inPeekEditor, ContextKeyExpr.not('config.editor.stablePeek'))\n});\nKeybindingsRegistry.registerKeybindingRule({\n id: 'closeReferenceSearch',\n weight: 200 /* KeybindingWeight.WorkbenchContrib */ + 50,\n primary: 9 /* KeyCode.Escape */,\n secondary: [1024 /* KeyMod.Shift */ | 9 /* KeyCode.Escape */],\n when: ContextKeyExpr.and(ctxReferenceSearchVisible, ContextKeyExpr.not('config.editor.stablePeek'), ContextKeyExpr.or(EditorContextKeys.editorTextFocus, InputFocusedContext.negate()))\n});\nKeybindingsRegistry.registerCommandAndKeybindingRule({\n id: 'revealReference',\n weight: 200 /* KeybindingWeight.WorkbenchContrib */,\n primary: 3 /* KeyCode.Enter */,\n mac: {\n primary: 3 /* KeyCode.Enter */,\n secondary: [2048 /* KeyMod.CtrlCmd */ | 18 /* KeyCode.DownArrow */]\n },\n when: ContextKeyExpr.and(ctxReferenceSearchVisible, WorkbenchListFocusContextKey, WorkbenchTreeElementCanCollapse.negate(), WorkbenchTreeElementCanExpand.negate()),\n handler(accessor) {\n var _a;\n const listService = accessor.get(IListService);\n const focus = (_a = listService.lastFocusedList) === null || _a === void 0 ? void 0 : _a.getFocus();\n if (Array.isArray(focus) && focus[0] instanceof OneReference) {\n withController(accessor, controller => controller.revealReference(focus[0]));\n }\n }\n});\nKeybindingsRegistry.registerCommandAndKeybindingRule({\n id: 'openReferenceToSide',\n weight: 100 /* KeybindingWeight.EditorContrib */,\n primary: 2048 /* KeyMod.CtrlCmd */ | 3 /* KeyCode.Enter */,\n mac: {\n primary: 256 /* KeyMod.WinCtrl */ | 3 /* KeyCode.Enter */\n },\n when: ContextKeyExpr.and(ctxReferenceSearchVisible, WorkbenchListFocusContextKey, WorkbenchTreeElementCanCollapse.negate(), WorkbenchTreeElementCanExpand.negate()),\n handler(accessor) {\n var _a;\n const listService = accessor.get(IListService);\n const focus = (_a = listService.lastFocusedList) === null || _a === void 0 ? void 0 : _a.getFocus();\n if (Array.isArray(focus) && focus[0] instanceof OneReference) {\n withController(accessor, controller => controller.openReference(focus[0], true, true));\n }\n }\n});\nCommandsRegistry.registerCommand('openReference', (accessor) => {\n var _a;\n const listService = accessor.get(IListService);\n const focus = (_a = listService.lastFocusedList) === null || _a === void 0 ? void 0 : _a.getFocus();\n if (Array.isArray(focus) && focus[0] instanceof OneReference) {\n withController(accessor, controller => controller.openReference(focus[0], false, true));\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 { onUnexpectedError } from '../../../../base/common/errors.js';\nimport { Emitter } from '../../../../base/common/event.js';\nimport { defaultGenerator } from '../../../../base/common/idGenerator.js';\nimport { dispose } from '../../../../base/common/lifecycle.js';\nimport { ResourceMap } from '../../../../base/common/map.js';\nimport { basename, extUri } from '../../../../base/common/resources.js';\nimport * as strings from '../../../../base/common/strings.js';\nimport { Range } from '../../../common/core/range.js';\nimport { localize } from '../../../../nls.js';\nexport class OneReference {\n constructor(isProviderFirst, parent, link, _rangeCallback) {\n this.isProviderFirst = isProviderFirst;\n this.parent = parent;\n this.link = link;\n this._rangeCallback = _rangeCallback;\n this.id = defaultGenerator.nextId();\n }\n get uri() {\n return this.link.uri;\n }\n get range() {\n var _a, _b;\n return (_b = (_a = this._range) !== null && _a !== void 0 ? _a : this.link.targetSelectionRange) !== null && _b !== void 0 ? _b : this.link.range;\n }\n set range(value) {\n this._range = value;\n this._rangeCallback(this);\n }\n get ariaMessage() {\n var _a;\n const preview = (_a = this.parent.getPreview(this)) === null || _a === void 0 ? void 0 : _a.preview(this.range);\n if (!preview) {\n return localize('aria.oneReference', \"in {0} on line {1} at column {2}\", basename(this.uri), this.range.startLineNumber, this.range.startColumn);\n }\n else {\n return localize({ key: 'aria.oneReference.preview', comment: ['Placeholders are: 0: filename, 1:line number, 2: column number, 3: preview snippet of source code'] }, \"{0} in {1} on line {2} at column {3}\", preview.value, basename(this.uri), this.range.startLineNumber, this.range.startColumn);\n }\n }\n}\nexport class FilePreview {\n constructor(_modelReference) {\n this._modelReference = _modelReference;\n }\n dispose() {\n this._modelReference.dispose();\n }\n preview(range, n = 8) {\n const model = this._modelReference.object.textEditorModel;\n if (!model) {\n return undefined;\n }\n const { startLineNumber, startColumn, endLineNumber, endColumn } = range;\n const word = model.getWordUntilPosition({ lineNumber: startLineNumber, column: startColumn - n });\n const beforeRange = new Range(startLineNumber, word.startColumn, startLineNumber, startColumn);\n const afterRange = new Range(endLineNumber, endColumn, endLineNumber, 1073741824 /* Constants.MAX_SAFE_SMALL_INTEGER */);\n const before = model.getValueInRange(beforeRange).replace(/^\\s+/, '');\n const inside = model.getValueInRange(range);\n const after = model.getValueInRange(afterRange).replace(/\\s+$/, '');\n return {\n value: before + inside + after,\n highlight: { start: before.length, end: before.length + inside.length }\n };\n }\n}\nexport class FileReferences {\n constructor(parent, uri) {\n this.parent = parent;\n this.uri = uri;\n this.children = [];\n this._previews = new ResourceMap();\n }\n dispose() {\n dispose(this._previews.values());\n this._previews.clear();\n }\n getPreview(child) {\n return this._previews.get(child.uri);\n }\n get ariaMessage() {\n const len = this.children.length;\n if (len === 1) {\n return localize('aria.fileReferences.1', \"1 symbol in {0}, full path {1}\", basename(this.uri), this.uri.fsPath);\n }\n else {\n return localize('aria.fileReferences.N', \"{0} symbols in {1}, full path {2}\", len, basename(this.uri), this.uri.fsPath);\n }\n }\n async resolve(textModelResolverService) {\n if (this._previews.size !== 0) {\n return this;\n }\n for (const child of this.children) {\n if (this._previews.has(child.uri)) {\n continue;\n }\n try {\n const ref = await textModelResolverService.createModelReference(child.uri);\n this._previews.set(child.uri, new FilePreview(ref));\n }\n catch (err) {\n onUnexpectedError(err);\n }\n }\n return this;\n }\n}\nexport class ReferencesModel {\n constructor(links, title) {\n this.groups = [];\n this.references = [];\n this._onDidChangeReferenceRange = new Emitter();\n this.onDidChangeReferenceRange = this._onDidChangeReferenceRange.event;\n this._links = links;\n this._title = title;\n // grouping and sorting\n const [providersFirst] = links;\n links.sort(ReferencesModel._compareReferences);\n let current;\n for (const link of links) {\n if (!current || !extUri.isEqual(current.uri, link.uri, true)) {\n // new group\n current = new FileReferences(this, link.uri);\n this.groups.push(current);\n }\n // append, check for equality first!\n if (current.children.length === 0 || ReferencesModel._compareReferences(link, current.children[current.children.length - 1]) !== 0) {\n const oneRef = new OneReference(providersFirst === link, current, link, ref => this._onDidChangeReferenceRange.fire(ref));\n this.references.push(oneRef);\n current.children.push(oneRef);\n }\n }\n }\n dispose() {\n dispose(this.groups);\n this._onDidChangeReferenceRange.dispose();\n this.groups.length = 0;\n }\n clone() {\n return new ReferencesModel(this._links, this._title);\n }\n get title() {\n return this._title;\n }\n get isEmpty() {\n return this.groups.length === 0;\n }\n get ariaMessage() {\n if (this.isEmpty) {\n return localize('aria.result.0', \"No results found\");\n }\n else if (this.references.length === 1) {\n return localize('aria.result.1', \"Found 1 symbol in {0}\", this.references[0].uri.fsPath);\n }\n else if (this.groups.length === 1) {\n return localize('aria.result.n1', \"Found {0} symbols in {1}\", this.references.length, this.groups[0].uri.fsPath);\n }\n else {\n return localize('aria.result.nm', \"Found {0} symbols in {1} files\", this.references.length, this.groups.length);\n }\n }\n nextOrPreviousReference(reference, next) {\n const { parent } = reference;\n let idx = parent.children.indexOf(reference);\n const childCount = parent.children.length;\n const groupCount = parent.parent.groups.length;\n if (groupCount === 1 || next && idx + 1 < childCount || !next && idx > 0) {\n // cycling within one file\n if (next) {\n idx = (idx + 1) % childCount;\n }\n else {\n idx = (idx + childCount - 1) % childCount;\n }\n return parent.children[idx];\n }\n idx = parent.parent.groups.indexOf(parent);\n if (next) {\n idx = (idx + 1) % groupCount;\n return parent.parent.groups[idx].children[0];\n }\n else {\n idx = (idx + groupCount - 1) % groupCount;\n return parent.parent.groups[idx].children[parent.parent.groups[idx].children.length - 1];\n }\n }\n nearestReference(resource, position) {\n const nearest = this.references.map((ref, idx) => {\n return {\n idx,\n prefixLen: strings.commonPrefixLength(ref.uri.toString(), resource.toString()),\n offsetDist: Math.abs(ref.range.startLineNumber - position.lineNumber) * 100 + Math.abs(ref.range.startColumn - position.column)\n };\n }).sort((a, b) => {\n if (a.prefixLen > b.prefixLen) {\n return -1;\n }\n else if (a.prefixLen < b.prefixLen) {\n return 1;\n }\n else if (a.offsetDist < b.offsetDist) {\n return -1;\n }\n else if (a.offsetDist > b.offsetDist) {\n return 1;\n }\n else {\n return 0;\n }\n })[0];\n if (nearest) {\n return this.references[nearest.idx];\n }\n return undefined;\n }\n referenceAt(resource, position) {\n for (const ref of this.references) {\n if (ref.uri.toString() === resource.toString()) {\n if (Range.containsPosition(ref.range, position)) {\n return ref;\n }\n }\n }\n return undefined;\n }\n firstReference() {\n for (const ref of this.references) {\n if (ref.isProviderFirst) {\n return ref;\n }\n }\n return this.references[0];\n }\n static _compareReferences(a, b) {\n return extUri.compare(a.uri, b.uri) || Range.compareRangesUsingStarts(a.range, b.range);\n }\n}\n"],"names":["__decorate","decorators","target","key","desc","d","c","arguments","length","r","Object","getOwnPropertyDescriptor","Reflect","decorate","i","defineProperty","__param","paramIndex","decorator","ctxHasSymbols","ISymbolNavigationService","SymbolNavigationService","constructor","contextKeyService","_editorService","_notificationService","_keybindingService","this","_currentModel","undefined","_currentIdx","_ignoreEditorChange","_ctxHasSymbols","bindTo","reset","_a","_b","_currentState","dispose","_currentMessage","put","anchor","refModel","parent","references","indexOf","set","_showMessage","editorState","EditorState","listener","onDidChange","_","editor","getActiveCodeEditor","model","getModel","position","getPosition","seenUri","seenPosition","reference","uri","range","revealNext","source","Promise","resolve","openCodeEditor","resource","options","selection","selectionRevealType","finally","kb","lookupKeybinding","message","getLabel","status","super","id","precondition","kbOpts","weight","primary","runEditorCommand","accessor","get","when","handler","editorService","_listener","Map","_disposables","_onDidChange","event","add","onCodeEditorRemove","_onDidRemoveEditor","onCodeEditorAdd","_onDidAddEditor","listCodeEditors","forEach","values","onDidChangeCursorPosition","fire","onDidChangeModelContent","delete","_c","_d","_e","_f","_g","_h","submenu","title","nls","group","order","SymbolNavigationAnchor","is","thing","SymbolNavigationAction","all","_allSymbolNavigationCommands","_patchConfig","opts","result","f1","menu","item","configuration","arg","hasModel","notificationService","progressService","symbolNavService","languageFeaturesService","instaService","cts","promise","_getLocationModel","token","then","async","_j","isCancellationRequested","altAction","ariaMessage","referenceAt","altActionId","_getAlternativeCommand","_activeAlternativeCommands","has","referenceCount","muteMessage","info","getWordAtPosition","showMessage","_getNoResultFoundMessage","_onResult","invokeFunction","err","error","showWhile","gotoLocation","_getGoToPreference","openInPeek","next","firstReference","peek","targetEditor","_openReference","openToSide","_openInPeek","sideBySide","highlight","targetSelectionRange","selectionSource","modelNow","decorations","createDecorationsCollection","description","className","setTimeout","clear","controller","toggleWidget","getSelection","Set","DefinitionAction","definitionProvider","word","getOption","alternativeDefinitionCommand","multipleDefinitions","mnemonicTitle","comment","keybinding","linux","DeclarationAction","declarationProvider","alternativeDeclarationCommand","multipleDeclarations","TypeDefinitionAction","typeDefinitionProvider","alternativeTypeDefinitionCommand","multipleTypeDefinitions","ID","ImplementationAction","implementationProvider","alternativeImplementationCommand","multipleImplementations","ReferencesAction","alternativeReferenceCommand","multipleReferences","referenceProvider","GenericGoToLocationAction","config","_references","_gotoMultipleBehaviour","_model","_position","_token","metadata","args","name","constraint","Array","multiple","noResultsMessage","isArray","getFocusedCodeEditor","setPosition","revealPositionInCenterIfOutsideViewport","invokeWithinContext","command","Boolean","run","bind","executeCommand","codeEditorService","control","lineNumber","column","shouldIncludeLocationLink","sourceModel","loc","scheme","getLocationLinks","registry","provide","promises","ordered","map","provider","flat","filter","getDefinitionsAtPosition","provideDefinition","getDeclarationsAtPosition","provideDeclaration","getImplementationsAtPosition","provideImplementation","getTypeDefinitionsAtPosition","provideTypeDefinition","getReferencesAtPosition","compact","provideReferences","includeDeclaration","ref","resultWithoutDeclaration","_sortedAndDeduped","callback","rawLinks","modelLinks","link","hasModifier","e","modifier","ClickLinkMouseEvent","isLeftClick","leftButton","isMiddleClick","middleButton","isRightClick","rightButton","hasTriggerModifier","triggerModifier","hasSideBySideModifier","triggerSideBySideModifier","isNoneOrSingleMouseDown","detail","ClickLinkKeyboardEvent","keyCodeIsTriggerKey","keyCode","triggerKey","keyCodeIsSideBySideKey","triggerSideBySideKey","ClickLinkOptions","equals","other","createOptions","multiCursorModifier","ClickLinkGesture","_onMouseMoveOrRelevantKeyDown","_register","onMouseMoveOrRelevantKeyDown","_onExecute","onExecute","_onCancel","onCancel","_editor","_extractLineNumberFromMouseEvent","extractLineNumberFromMouseEvent","_opts","_lastMouseMoveEvent","_hasTriggerKeyOnMouseDown","_lineNumberOnMouseDown","onDidChangeConfiguration","hasChanged","newOpts","onMouseMove","_onEditorMouseMove","onMouseDown","_onEditorMouseDown","onMouseUp","_onEditorMouseUp","onKeyDown","_onEditorKeyDown","onKeyUp","_onEditorKeyUp","onMouseDrag","_resetHandler","onDidChangeCursorSelection","_onDidChangeCursorSelection","onDidChangeModel","onDidScrollChange","scrollTopChanged","scrollLeftChanged","startColumn","endColumn","mouseEvent","currentLineNumber","GotoDefinitionAtPositionEditorContribution_1","GotoDefinitionAtPositionEditorContribution","textModelResolverService","languageService","toUnhook","toUnhookForKeyboard","currentWordAtPosition","previousPromise","linkDecorations","linkGesture","keyboardEvent","startFindDefinitionFromMouse","isEnabled","gotoDefinition","catch","removeLinkDecorations","getContribution","startFindDefinitionFromCursor","startFindDefinition","withKey","type","state","results","cancel","findDefinition","validate","linkRange","originSelectionRange","combinedRange","addDecoration","appendText","createModelReference","object","textEditorModel","startLineNumber","getLineCount","previewValue","getPreviewValue","languageId","guessLanguageIdByFilepathOrFirstLine","appendCodeblock","rangeToUse","endLineNumber","MAX_SOURCE_PREVIEW_LINES","getPreviewRangeBasedOnIndentation","stripIndentationFromPreviewRange","previewRange","minIndent","getLineFirstNonWhitespaceColumn","endIndent","Math","min","getValueInRange","replace","RegExp","trim","startIndent","maxLineNumber","hoverMessage","newDecorations","inlineClassName","injectedText","canPeek","isInPeekEditor","value","original","FileReferencesRenderer_1","DataSource","_resolverService","hasChildren","element","getChildren","groups","val","children","Error","Delegate","getHeight","getTemplateId","FileReferencesRenderer","OneReferenceRenderer","StringRepresentationProvider","getKeyboardNavigationLabel","parts","getPreview","preview","IdentityProvider","getId","FileReferencesTemplate","container","_labelService","document","createElement","classList","file","supportHighlights","badge","dom","$","appendChild","matches","setLabel","getUriBasenameLabel","getUriLabel","relative","len","setCount","setTitleFormat","_instantiationService","templateId","renderTemplate","createInstance","renderElement","node","index","template","filterData","disposeTemplate","templateData","OneReferenceTemplate","label","score","toggle","AccessibilityProvider","getWidgetAriaLabel","getAriaLabel","DecorationsManager","_decorations","_decorationIgnoreSet","_callOnDispose","_callOnModelChange","_onModelChanged","removeDecorations","toString","_addDecorations","onDidChangeDecorations","_onDecorationChanged","newDecorationsActualIndex","oneReference","push","DecorationOptions","changeDecorations","changeAccessor","deltaDecorations","toRemove","decorationId","newRange","getDecorationRange","ignore","keys","stickiness","LayoutData","ratio","heightInLines","fromJSON","raw","data","JSON","parse","ReferencesTree","ReferenceWidget","peekView","_defaultTreeKeyboardSupport","layoutData","themeService","_textModelResolverService","_peekViewService","_uriLabel","_undoRedoService","_languageService","_languageConfigurationService","showFrame","showArrow","isResizeable","isAccessible","supportOnTitleClick","_disposeOnNewModel","_onDidSelectReference","onDidSelectReference","_dim","_applyTheme","getColorTheme","onDidColorThemeChange","addExclusiveWidget","create","setModel","_preview","_previewNotAvailableMessage","_tree","_previewModelReference","_splitView","theme","borderColor","getColor","style","arrowColor","frameColor","headerBackgroundColor","primaryHeadingColor","secondaryHeadingColor","show","where","focusOnReferenceTree","domFocus","focusOnPreviewEditor","focus","isPreviewEditorFocused","hasTextFocus","_onTitleClick","_getFocusedReference","kind","ctrlKey","metaKey","altKey","_fillBody","containerElement","setCssClass","_messageContainer","orientation","_previewContainer","scrollBeyondLastLine","scrollbar","verticalScrollbarSize","horizontal","useShadows","verticalHasArrows","horizontalHasArrows","alwaysConsumeMouseWheel","overviewRulerLanes","fixedOverflowWidgets","minimap","enabled","_treeContainer","treeOptions","keyboardSupport","accessibilityProvider","keyboardNavigationLabelProvider","identityProvider","openOnSingleClick","selectionNavigation","overrideStyles","listBackground","dispatchEvent","stopPropagation","addView","minimumSize","maximumSize","Number","MAX_VALUE","layout","width","height","onDidSashChange","getViewSize","onEvent","_revealReference","onDidOpen","editorOptions","pinned","_onWidth","_doLayoutBody","heightInPixel","widthInPixel","_viewZone","resizeView","setSelection","setFocus","newModel","_onNewModel","isEmpty","setTitle","innerText","_decorationsManager","onDidChangeReferenceRange","rerender","setInput","getFocus","revealReference","revealParent","_revealedReference","getInput","reveal","expand","scrollType","sel","collapseToStart","revealRangeInCenter","ReferencesController_1","ctxReferenceSearchVisible","ReferencesController","_storageService","_configurationService","_requestIdPool","_ignoreModelChangeEvent","_referenceSearchVisible","_widget","modelPromise","peekMode","widgetPosition","closeWidget","containsPosition","_peekMode","onDidChangeModelLanguage","storageKey","onDidClose","store","stringify","getValue","openReference","_gotoReference","requestId","setMetaTitle","pos","nearestReference","changeFocusBetweenPreviewAndReferences","goToNextOrPreviousReference","fwd","currentPosition","nextOrPreviousReference","editorFocus","previewEditorFocus","focusEditor","hide","openedEditor","clone","withController","fn","outerEditor","secondary","mac","lastFocusedList","OneReference","isProviderFirst","_rangeCallback","_range","FilePreview","_modelReference","n","getWordUntilPosition","beforeRange","afterRange","before","inside","start","end","FileReferences","_previews","child","fsPath","size","ReferencesModel","links","_onDidChangeReferenceRange","_links","_title","providersFirst","current","sort","_compareReferences","oneRef","idx","childCount","groupCount","nearest","prefixLen","offsetDist","abs","a","b"],"sourceRoot":""}