monaco-editor-core 0.51.0-dev-20240720 → 0.51.0-dev-20240721
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dev/bundleInfo.json +1129 -1129
- package/dev/nls.messages.de.js +2 -2
- package/dev/nls.messages.es.js +2 -2
- package/dev/nls.messages.fr.js +2 -2
- package/dev/nls.messages.it.js +2 -2
- package/dev/nls.messages.ja.js +2 -2
- package/dev/nls.messages.ko.js +2 -2
- package/dev/nls.messages.ru.js +2 -2
- package/dev/nls.messages.zh-cn.js +2 -2
- package/dev/nls.messages.zh-tw.js +2 -2
- package/dev/vs/base/worker/workerMain.js +1 -1
- package/dev/vs/editor/editor.main.css +1 -1
- package/dev/vs/editor/editor.main.js +16 -16
- package/dev/vs/loader.js +1 -1
- package/min/nls.messages.de.js +2 -2
- package/min/nls.messages.es.js +2 -2
- package/min/nls.messages.fr.js +2 -2
- package/min/nls.messages.it.js +2 -2
- package/min/nls.messages.ja.js +2 -2
- package/min/nls.messages.ko.js +2 -2
- package/min/nls.messages.ru.js +2 -2
- package/min/nls.messages.zh-cn.js +2 -2
- package/min/nls.messages.zh-tw.js +2 -2
- package/min/vs/base/worker/workerMain.js +1 -1
- package/min/vs/editor/editor.main.css +1 -1
- package/min/vs/editor/editor.main.js +3 -3
- package/min/vs/loader.js +1 -1
- package/min-maps/nls.messages.de.js.map +1 -1
- package/min-maps/nls.messages.es.js.map +1 -1
- package/min-maps/nls.messages.fr.js.map +1 -1
- package/min-maps/nls.messages.it.js.map +1 -1
- package/min-maps/nls.messages.ja.js.map +1 -1
- package/min-maps/nls.messages.ko.js.map +1 -1
- package/min-maps/nls.messages.ru.js.map +1 -1
- package/min-maps/nls.messages.zh-cn.js.map +1 -1
- package/min-maps/nls.messages.zh-tw.js.map +1 -1
- package/min-maps/vs/loader.js.map +1 -1
- package/package.json +2 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!-----------------------------------------------------------
|
|
2
2
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
-
* Version: 0.51.0-dev-
|
|
3
|
+
* Version: 0.51.0-dev-20240721(02de12a70e318ac6743368f2c609c1cc9ea23e06)
|
|
4
4
|
* Released under the MIT license
|
|
5
5
|
* https://github.com/microsoft/vscode/blob/main/LICENSE.txt
|
|
6
6
|
*-----------------------------------------------------------*/(function(){var oe=["exports","require","vs/base/common/lifecycle","vs/nls","vs/editor/common/core/range","vs/base/browser/dom","vs/base/common/event","vs/platform/instantiation/common/instantiation","vs/base/common/errors","vs/editor/common/core/position","vs/css!vs/editor/editor.main","vs/base/common/strings","vs/platform/contextkey/common/contextkey","vs/base/common/arrays","vs/base/common/async","vs/editor/browser/editorExtensions","vs/base/common/platform","vs/editor/common/services/languageFeatures","vs/base/common/cancellation","vs/base/common/types","vs/editor/common/editorContextKeys","vs/base/common/observable","vs/base/common/uri","vs/editor/common/core/selection","vs/platform/commands/common/commands","vs/platform/theme/common/themeService","vs/base/common/codicons","vs/platform/configuration/common/configuration","vs/editor/common/languages","vs/platform/actions/common/actions","vs/base/common/themables","vs/platform/keybinding/common/keybinding","vs/platform/theme/common/colorRegistry","vs/base/common/color","vs/editor/common/languages/languageConfigurationRegistry","vs/editor/browser/services/codeEditorService","vs/editor/common/model/textModel","vs/editor/common/config/editorOptions","vs/platform/registry/common/platform","vs/base/browser/fastDomNode","vs/editor/common/model","vs/base/common/actions","vs/editor/common/languages/language","vs/base/browser/ui/hover/hoverDelegateFactory","vs/editor/common/services/model","vs/base/common/map","vs/base/browser/keyboardEvent","vs/base/common/network","vs/base/browser/ui/aria/aria","vs/platform/instantiation/common/extensions","vs/platform/notification/common/notification","vs/base/common/resources","vs/base/browser/window","vs/base/common/iterator","vs/base/common/objects","vs/base/common/htmlContent","vs/editor/common/core/lineRange","vs/editor/browser/view/viewPart","vs/platform/contextview/browser/contextView","vs/base/common/stopwatch","vs/platform/accessibility/common/accessibility","vs/platform/log/common/log","vs/platform/opener/common/opener","vs/platform/quickinput/common/quickInput","vs/base/browser/browser","vs/base/common/observableInternal/derived","vs/platform/telemetry/common/telemetry","vs/base/common/arraysFind","vs/base/browser/touch","vs/editor/common/core/offsetRange","vs/editor/common/languages/modesRegistry","vs/platform/theme/common/iconRegistry","vs/base/common/keyCodes","vs/base/common/linkedList","vs/base/browser/mouseEvent","vs/editor/browser/config/domFontInfo","vs/editor/common/core/editOperation","vs/editor/common/cursorCommon","vs/editor/common/services/resolverService","vs/editor/common/services/languageFeatureDebounce","vs/editor/common/core/editorColorRegistry","vs/base/browser/ui/hover/hoverDelegate2","vs/base/common/filters","vs/base/browser/ui/widget","vs/base/browser/ui/scrollbar/scrollableElement","vs/editor/browser/widget/diffEditor/utils","vs/editor/contrib/hover/browser/hoverTypes","vs/base/browser/ui/actionbar/actionbar","vs/platform/theme/common/colorUtils","vs/base/common/assert","vs/base/common/hierarchicalKind","vs/base/common/observableInternal/base","vs/base/browser/event","vs/editor/common/core/cursorColumns","vs/editor/common/tokens/lineTokens","vs/editor/common/viewModel","vs/platform/progress/common/progress","vs/platform/theme/common/theme","vs/base/common/lazy","vs/base/common/path","vs/platform/storage/common/storage","vs/base/common/equals","vs/base/browser/trustedTypes","vs/editor/common/core/textEdit","vs/editor/common/diff/rangeMapping","vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/length","vs/editor/common/standaloneStrings","vs/platform/markers/common/markers","vs/platform/configuration/common/configurationRegistry","vs/platform/theme/browser/defaultStyles","vs/base/common/severity","vs/base/browser/ui/iconLabel/iconLabels","vs/base/browser/ui/list/listWidget","vs/editor/common/core/stringBuilder","vs/editor/common/core/textLength","vs/editor/common/services/editorWorker","vs/platform/clipboard/common/clipboardService","vs/platform/hover/browser/hover","vs/platform/layout/browser/layoutService","vs/editor/browser/widget/markdownRenderer/browser/markdownRenderer","vs/platform/keybinding/common/keybindingsRegistry","vs/editor/contrib/editorState/browser/editorState","vs/platform/theme/common/colors/baseColors","vs/platform/actions/browser/menuEntryActionViewItem","vs/editor/browser/widget/codeEditor/embeddedCodeEditorWidget","vs/base/common/decorators","vs/base/common/functional","vs/base/common/mime","vs/base/common/hash","vs/editor/browser/observableCodeEditor","vs/editor/common/languages/languageConfiguration","vs/editor/common/textModelEvents","vs/editor/browser/view/dynamicViewOverlay","vs/editor/contrib/codeAction/common/types","vs/editor/contrib/snippet/browser/snippetParser","vs/editor/common/viewLayout/viewLineRenderer","vs/platform/accessibilitySignal/browser/accessibilitySignalService","vs/platform/theme/common/colors/editorColors","vs/editor/browser/widget/diffEditor/registrations.contribution","vs/base/common/keybindings","vs/base/common/numbers","vs/base/common/iconLabels","vs/editor/browser/stableEditorScroll","vs/editor/common/core/characterClassifier","vs/editor/common/core/eolCounter","vs/editor/common/commands/replaceCommand","vs/editor/common/editorFeatures","vs/editor/common/encodedTokenAttributes","vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/smallImmutableSet","vs/editor/common/viewLayout/lineDecorations","vs/base/browser/ui/actionbar/actionViewItems","vs/editor/browser/services/bulkEditService","vs/editor/standalone/common/standaloneTheme","vs/editor/contrib/suggest/browser/suggest","vs/platform/quickinput/common/quickAccess","vs/editor/contrib/codeAction/browser/codeAction","vs/editor/contrib/peekView/browser/peekView","vs/base/browser/ui/tree/tree","vs/base/common/buffer","vs/base/common/observableInternal/debugName","vs/base/common/observableInternal/logging","vs/base/common/hotReloadHelpers","vs/base/common/scrollable","vs/base/browser/globalPointerMoveMonitor","vs/base/browser/ui/sash/sash","vs/base/browser/ui/toggle/toggle","vs/editor/browser/view/renderingContext","vs/editor/common/config/editorZoom","vs/editor/common/core/wordCharacterClassifier","vs/editor/common/core/wordHelper","vs/editor/common/diff/defaultLinesDiffComputer/algorithms/diffAlgorithm","vs/editor/browser/editorBrowser","vs/editor/common/languages/supports","vs/editor/common/viewEventHandler","vs/base/browser/ui/hover/hoverWidget","vs/base/browser/ui/tree/abstractTree","vs/editor/common/languages/nullTokenize","vs/editor/contrib/gotoSymbol/browser/referencesModel","vs/platform/contextkey/common/contextkeys","vs/platform/dialogs/common/dialogs","vs/platform/instantiation/common/serviceCollection","vs/platform/label/common/label","vs/editor/contrib/documentSymbols/browser/outlineModel","vs/editor/common/commands/shiftCommand","vs/editor/contrib/message/browser/messageController","vs/editor/browser/editorDom","vs/platform/workspace/common/workspace","vs/base/common/idGenerator","vs/base/common/range","vs/base/common/observableInternal/utils","vs/base/common/diff/diff","vs/base/common/codiconsUtil","vs/base/common/uint","vs/base/browser/markdownRenderer","vs/base/common/uuid","vs/base/common/dataTransfer","vs/base/browser/ui/codicons/codiconStyles","vs/editor/common/core/textModelDefaults","vs/editor/common/editorCommon","vs/editor/common/cursor/cursorWordOperations","vs/editor/common/languages/supports/richEditBrackets","vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/beforeEditPositionMapper","vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/ast","vs/editor/common/model/textModelSearch","vs/editor/contrib/folding/browser/foldingRanges","vs/editor/contrib/gotoSymbol/browser/link/clickLinkGesture","vs/editor/contrib/inlineCompletions/browser/ghostText","vs/editor/contrib/inlineCompletions/browser/utils","vs/base/browser/ui/keybindingLabel/keybindingLabel","vs/editor/common/services/textResourceConfiguration","vs/editor/browser/controller/textAreaInput","vs/editor/common/cursor/cursorTypeEditOperations","vs/editor/browser/coreCommands","vs/editor/browser/widget/diffEditor/diffProviderFactoryService","vs/platform/list/browser/listService","vs/editor/contrib/hover/browser/markdownHoverParticipant","vs/platform/actions/browser/toolbar","vs/platform/undoRedo/common/undoRedo","vs/editor/browser/widget/codeEditor/codeEditorWidget","vs/editor/contrib/find/browser/findModel","vs/editor/contrib/snippet/browser/snippetController2","vs/base/browser/ui/scrollbar/scrollbarState","vs/base/browser/dnd","vs/base/browser/canIUse","vs/base/common/extpath","vs/base/browser/ui/tree/indexTreeModel","vs/base/browser/ui/tree/objectTreeModel","vs/base/common/ternarySearchTree","vs/base/common/marshalling","vs/base/browser/pixelRatio","vs/base/browser/ui/scrollbar/scrollbarArrow","vs/base/browser/ui/button/button","vs/base/browser/ui/iconLabel/iconLabel","vs/base/browser/ui/mouseCursor/mouseCursor","vs/base/browser/ui/resizable/resizable","vs/base/browser/ui/list/listView","vs/css!vs/editor/contrib/colorPicker/browser/colorPicker","vs/css!vs/editor/contrib/hover/browser/hover","vs/css!vs/platform/quickinput/browser/media/quickInput","vs/editor/browser/config/tabFocus","vs/editor/common/core/indentation","vs/editor/browser/view/viewLayer","vs/editor/common/diff/defaultLinesDiffComputer/utils","vs/editor/common/diff/linesDiffComputer","vs/editor/common/cursor/cursorMoveOperations","vs/editor/common/cursor/cursorDeleteOperations","vs/editor/common/cursor/cursorMoveCommands","vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/tokenizer","vs/editor/common/model/utils","vs/editor/common/standalone/standaloneEnums","vs/editor/common/textModelGuides","vs/editor/common/languages/supports/indentationLineProcessor","vs/editor/common/languages/autoIndent","vs/editor/browser/viewParts/glyphMargin/glyphMargin","vs/editor/common/viewEvents","vs/editor/common/viewModelEventDispatcher","vs/editor/contrib/inlineCompletions/browser/commandIds","vs/editor/contrib/inlineCompletions/browser/singleTextEdit","vs/base/browser/ui/inputbox/inputBox","vs/base/browser/ui/findinput/findInput","vs/base/common/keybindingLabels","vs/editor/common/config/fontInfo","vs/editor/contrib/hover/browser/hoverActionIds","vs/platform/instantiation/common/descriptors","vs/editor/common/services/markerDecorations","vs/editor/common/services/semanticTokensStyling","vs/editor/contrib/dropOrPasteInto/browser/edit","vs/editor/contrib/inlineCompletions/browser/inlineCompletionContextKeys","vs/editor/contrib/parameterHints/browser/provideSignatureHelp","vs/platform/environment/common/environment","vs/platform/quickinput/browser/quickInput","vs/platform/jsonschemas/common/jsonContributionRegistry","vs/editor/common/config/editorConfigurationSchema","vs/editor/browser/services/editorWorkerService","vs/editor/common/languages/enterAction","vs/editor/common/cursor/cursorTypeOperations","vs/editor/contrib/gotoSymbol/browser/goToSymbol","vs/platform/theme/common/colors/miscColors","vs/platform/theme/common/colors/listColors","vs/editor/contrib/symbolIcons/browser/symbolIcons","vs/editor/browser/viewParts/lines/viewLine","vs/editor/common/services/semanticTokensProviderStyling","vs/editor/contrib/inlineCompletions/browser/inlineCompletionsHintsWidget","vs/editor/browser/widget/diffEditor/components/diffEditorViewZones/diffEditorViewZones","vs/editor/browser/widget/diffEditor/diffEditorWidget","vs/editor/contrib/codeAction/browser/codeActionController","vs/editor/contrib/colorPicker/browser/colorHoverParticipant","vs/editor/contrib/folding/browser/folding","vs/editor/contrib/inlineProgress/browser/inlineProgress","vs/editor/contrib/gotoSymbol/browser/goToCommands","vs/editor/contrib/hover/browser/hoverController","vs/editor/contrib/dropOrPasteInto/browser/defaultProviders","vs/editor/contrib/suggest/browser/suggestController","vs/editor/contrib/inlineCompletions/browser/inlineCompletionsController","vs/editor/standalone/browser/standaloneServices","vs/base/browser/performance","vs/base/common/cache","vs/base/common/collections","vs/base/common/observableInternal/autorun","vs/base/browser/fonts","vs/base/common/process","vs/base/common/hotReload","vs/base/common/ime","vs/base/common/symbols","vs/base/common/glob","vs/base/browser/dompurify/dompurify","vs/base/browser/formattedTextRenderer","vs/base/browser/ui/highlightedlabel/highlightedLabel","vs/base/browser/ui/scrollbar/abstractScrollbar","vs/base/common/worker/simpleWorker","vs/css!vs/base/browser/ui/actionbar/actionbar","vs/base/browser/ui/contextview/contextview","vs/base/browser/ui/countBadge/countBadge","vs/css!vs/base/browser/ui/dropdown/dropdown","vs/css!vs/base/browser/ui/findinput/findInput","vs/css!vs/base/browser/ui/list/list","vs/base/browser/ui/splitview/splitview","vs/css!vs/platform/actionWidget/browser/actionWidget","vs/editor/browser/config/elementSizeObserver","vs/editor/browser/viewParts/minimap/minimapCharSheet","vs/editor/browser/widget/diffEditor/components/diffEditorSash","vs/editor/common/config/diffEditor","vs/editor/browser/view/viewUserInputEvents","vs/editor/browser/controller/textAreaState","vs/editor/common/core/rgba","vs/editor/common/commands/surroundSelectionCommand","vs/editor/common/core/textChange","vs/editor/common/cursor/cursorAtomicMoveOperations","vs/editor/common/diff/defaultLinesDiffComputer/algorithms/myersDiffAlgorithm","vs/editor/common/diff/defaultLinesDiffComputer/heuristicSequenceOptimizations","vs/editor/common/diff/defaultLinesDiffComputer/linesSliceCharSequence","vs/editor/common/diff/defaultLinesDiffComputer/defaultLinesDiffComputer","vs/editor/common/editorAction","vs/editor/common/languageSelector","vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/combineTextEditInfos","vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/parser","vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/brackets","vs/editor/common/model/prefixSumComputer","vs/editor/common/model/textModelPart","vs/editor/common/model/pieceTreeTextBuffer/pieceTreeBase","vs/editor/common/model/pieceTreeTextBuffer/pieceTreeTextBuffer","vs/editor/common/modelLineProjectionData","vs/editor/common/services/treeViewsDnd","vs/editor/common/services/unicodeTextModelHighlighter","vs/editor/common/model/guidesTextModelPart","vs/editor/common/tokens/contiguousMultilineTokensBuilder","vs/editor/browser/viewParts/margin/margin","vs/editor/common/viewModel/overviewZoneManager","vs/editor/contrib/comment/browser/blockCommentCommand","vs/editor/contrib/folding/browser/foldingModel","vs/editor/contrib/folding/browser/indentRangeProvider","vs/editor/contrib/folding/browser/syntaxRangeProvider","vs/editor/contrib/format/browser/formattingEdit","vs/editor/contrib/hover/browser/hoverOperation","vs/editor/contrib/indentation/common/indentUtils","vs/editor/contrib/inlayHints/browser/inlayHints","vs/editor/contrib/placeholderText/browser/placeholderTextContribution","vs/editor/contrib/semanticTokens/common/semanticTokensConfig","vs/editor/contrib/smartSelect/browser/bracketSelections","vs/editor/contrib/inlineCompletions/browser/provideInlineCompletions","vs/editor/contrib/stickyScroll/browser/stickyScrollElement","vs/editor/contrib/suggest/browser/completionModel","vs/editor/contrib/suggest/browser/wordDistance","vs/editor/standalone/common/monarch/monarchCommon","vs/base/browser/ui/findinput/findInputToggles","vs/base/browser/ui/dropdown/dropdownActionViewItem","vs/base/browser/ui/tree/objectTree","vs/base/common/errorMessage","vs/editor/browser/widget/diffEditor/features/movedBlocksLinesFeature","vs/editor/browser/widget/multiDiffEditor/utils","vs/editor/browser/config/fontMeasurements","vs/editor/common/languages/textToHtmlTokenizer","vs/editor/common/model/editStack","vs/editor/common/services/editorBaseApi","vs/editor/common/viewModel/minimapTokensColorTracker","vs/editor/common/viewModel/viewModelDecorations","vs/platform/accessibility/browser/accessibleViewRegistry","vs/platform/action/common/action","vs/platform/files/common/files","vs/editor/browser/widget/diffEditor/features/hideUnchangedRegionsFeature","vs/editor/contrib/codelens/browser/codelens","vs/editor/contrib/semanticTokens/common/getSemanticTokens","vs/editor/standalone/common/monarch/monarchLexer","vs/editor/contrib/inlineEdits/browser/consts","vs/editor/contrib/hover/browser/contentHoverStatusBar","vs/editor/contrib/hover/browser/contentHoverWidget","vs/platform/keybinding/common/keybindingResolver","vs/platform/keybinding/common/resolvedKeybindingItem","vs/editor/standalone/browser/standaloneLayoutService","vs/platform/contextview/browser/contextViewService","vs/editor/contrib/dropOrPasteInto/browser/postEditWidget","vs/platform/observable/common/platformObservableUtils","vs/platform/quickinput/browser/quickInputUtils","vs/platform/dnd/browser/dnd","vs/editor/browser/dnd","vs/editor/contrib/colorPicker/browser/defaultDocumentColorProvider","vs/editor/contrib/colorPicker/browser/color","vs/editor/contrib/suggest/browser/suggestWidgetDetails","vs/platform/configuration/common/configurationModels","vs/platform/history/browser/contextScopedHistoryWidget","vs/editor/contrib/suggest/browser/suggestMemory","vs/platform/actions/common/menuService","vs/editor/browser/widget/diffEditor/diffEditorViewModel","vs/editor/contrib/codeAction/browser/codeActionModel","vs/editor/contrib/format/browser/format","vs/editor/contrib/hover/browser/getHover","vs/editor/contrib/wordOperations/browser/wordOperations","vs/platform/theme/common/colors/inputColors","vs/platform/theme/common/colors/minimapColors","vs/editor/browser/controller/mouseTarget","vs/editor/browser/widget/diffEditor/features/overviewRulerFeature","vs/editor/browser/viewParts/lineNumbers/lineNumbers","vs/editor/contrib/quickAccess/browser/editorNavigationQuickAccess","vs/editor/standalone/browser/standaloneCodeEditorService","vs/editor/standalone/browser/standaloneThemeService","vs/editor/browser/widget/multiDiffEditor/diffEditorItemTemplate","vs/editor/contrib/codeAction/browser/lightBulbWidget","vs/editor/contrib/colorPicker/browser/colorDetector","vs/editor/contrib/find/browser/findController","vs/editor/contrib/folding/browser/foldingDecorations","vs/editor/contrib/inlineEdit/browser/inlineEditController","vs/editor/contrib/wordHighlighter/browser/highlightDecorations","vs/editor/contrib/gotoError/browser/gotoError","vs/editor/contrib/gotoSymbol/browser/peek/referencesController","vs/editor/contrib/gotoSymbol/browser/link/goToDefinitionAtPosition","vs/editor/contrib/inlayHints/browser/inlayHintsLocations","vs/editor/contrib/inlayHints/browser/inlayHintsController","vs/editor/contrib/inlayHints/browser/inlayHintsHover","vs/editor/contrib/stickyScroll/browser/stickyScrollController","vs/editor/contrib/contextmenu/browser/contextmenu","vs/editor/contrib/dropOrPasteInto/browser/copyPasteController","vs/editor/contrib/snippet/browser/snippetSession","vs/editor/contrib/suggest/browser/suggestModel","vs/editor/contrib/inlineEdits/browser/inlineEditsWidget","vs/editor/contrib/inlineEdits/browser/inlineEditsController","vs/platform/workspace/common/workspaceTrust","vs/base/browser/iframe","vs/base/browser/ui/list/list","vs/base/browser/ui/list/splice","vs/base/common/diff/diffChange","vs/base/common/comparers","vs/base/common/linkedText","vs/base/common/marked/marked","vs/base/common/naturalLanguage/korean","vs/base/common/navigator","vs/base/common/history","vs/base/common/observableInternal/lazyObservableValue","vs/base/common/observableInternal/api","vs/base/common/observableInternal/promise","vs/base/browser/ui/list/rangeMap","vs/base/common/fuzzyScorer","vs/base/common/labels","vs/base/common/search","vs/base/browser/ui/scrollbar/scrollbarVisibilityController","vs/base/browser/ui/tree/compressedObjectTreeModel","vs/base/common/tfIdf","vs/base/common/codiconsLibrary","vs/base/browser/domObservable","vs/base/browser/ui/list/rowCache","vs/base/browser/ui/selectBox/selectBoxNative","vs/base/browser/ui/scrollbar/horizontalScrollbar","vs/base/browser/ui/scrollbar/verticalScrollbar","vs/base/browser/defaultWorkerFactory","vs/base/parts/storage/common/storage","vs/css!vs/base/browser/ui/aria/aria","vs/css!vs/base/browser/ui/button/button","vs/css!vs/base/browser/ui/codicons/codicon/codicon","vs/css!vs/base/browser/ui/codicons/codicon/codicon-modifiers","vs/css!vs/base/browser/ui/contextview/contextview","vs/css!vs/base/browser/ui/countBadge/countBadge","vs/css!vs/base/browser/ui/hover/hoverWidget","vs/css!vs/base/browser/ui/iconLabel/iconlabel","vs/css!vs/base/browser/ui/inputbox/inputBox","vs/css!vs/base/browser/ui/keybindingLabel/keybindingLabel","vs/css!vs/base/browser/ui/mouseCursor/mouseCursor","vs/css!vs/base/browser/ui/progressbar/progressbar","vs/base/browser/ui/progressbar/progressbar","vs/css!vs/base/browser/ui/sash/sash","vs/css!vs/base/browser/ui/scrollbar/media/scrollbars","vs/base/browser/ui/list/listPaging","vs/css!vs/base/browser/ui/selectBox/selectBox","vs/css!vs/base/browser/ui/selectBox/selectBoxCustom","vs/css!vs/base/browser/ui/splitview/splitview","vs/css!vs/base/browser/ui/table/table","vs/base/browser/ui/table/tableWidget","vs/css!vs/base/browser/ui/toggle/toggle","vs/css!vs/base/browser/ui/toolbar/toolbar","vs/css!vs/base/browser/ui/tree/media/tree","vs/css!vs/editor/browser/controller/textAreaHandler","vs/css!vs/editor/browser/services/hoverService/hover","vs/css!vs/editor/browser/viewParts/blockDecorations/blockDecorations","vs/css!vs/editor/browser/viewParts/currentLineHighlight/currentLineHighlight","vs/css!vs/editor/browser/viewParts/decorations/decorations","vs/css!vs/editor/browser/viewParts/glyphMargin/glyphMargin","vs/css!vs/editor/browser/viewParts/indentGuides/indentGuides","vs/css!vs/editor/browser/viewParts/lineNumbers/lineNumbers","vs/css!vs/editor/browser/viewParts/lines/viewLines","vs/css!vs/editor/browser/viewParts/linesDecorations/linesDecorations","vs/css!vs/editor/browser/viewParts/margin/margin","vs/css!vs/editor/browser/viewParts/marginDecorations/marginDecorations","vs/css!vs/editor/browser/viewParts/minimap/minimap","vs/css!vs/editor/browser/viewParts/overlayWidgets/overlayWidgets","vs/css!vs/editor/browser/viewParts/rulers/rulers","vs/css!vs/editor/browser/viewParts/scrollDecoration/scrollDecoration","vs/css!vs/editor/browser/viewParts/selections/selections","vs/css!vs/editor/browser/viewParts/viewCursors/viewCursors","vs/css!vs/editor/browser/viewParts/whitespace/whitespace","vs/css!vs/editor/browser/widget/codeEditor/editor","vs/css!vs/editor/browser/widget/diffEditor/components/accessibleDiffViewer","vs/css!vs/editor/browser/widget/diffEditor/style","vs/css!vs/editor/browser/widget/markdownRenderer/browser/renderedMarkdown","vs/css!vs/editor/browser/widget/multiDiffEditor/style","vs/css!vs/editor/contrib/anchorSelect/browser/anchorSelect","vs/css!vs/editor/contrib/bracketMatching/browser/bracketMatching","vs/css!vs/editor/contrib/codeAction/browser/lightBulbWidget","vs/css!vs/editor/contrib/codelens/browser/codelensWidget","vs/css!vs/editor/contrib/dnd/browser/dnd","vs/css!vs/editor/contrib/dropOrPasteInto/browser/postEditWidget","vs/css!vs/editor/contrib/find/browser/findOptionsWidget","vs/css!vs/editor/contrib/find/browser/findWidget","vs/css!vs/editor/contrib/folding/browser/folding","vs/css!vs/editor/contrib/gotoError/browser/media/gotoErrorWidget","vs/css!vs/editor/contrib/gotoSymbol/browser/link/goToDefinitionAtPosition","vs/css!vs/editor/contrib/gotoSymbol/browser/peek/referencesWidget","vs/css!vs/editor/contrib/inPlaceReplace/browser/inPlaceReplace","vs/css!vs/editor/contrib/inlineCompletions/browser/ghostText","vs/css!vs/editor/contrib/inlineCompletions/browser/inlineCompletionsHintsWidget","vs/css!vs/editor/contrib/inlineEdit/browser/inlineEdit","vs/css!vs/editor/contrib/inlineEdit/browser/inlineEditHintsWidget","vs/css!vs/editor/contrib/inlineEdit/browser/inlineEditSideBySideWidget","vs/css!vs/editor/contrib/inlineEdits/browser/inlineEditsWidget","vs/css!vs/editor/contrib/inlineProgress/browser/inlineProgressWidget","vs/css!vs/editor/contrib/linkedEditing/browser/linkedEditing","vs/css!vs/editor/contrib/links/browser/links","vs/css!vs/editor/contrib/message/browser/messageController","vs/css!vs/editor/contrib/parameterHints/browser/parameterHints","vs/css!vs/editor/contrib/peekView/browser/media/peekViewWidget","vs/css!vs/editor/contrib/placeholderText/browser/placeholderText","vs/css!vs/editor/contrib/rename/browser/renameWidget","vs/css!vs/editor/contrib/snippet/browser/snippetSession","vs/css!vs/editor/contrib/stickyScroll/browser/stickyScroll","vs/css!vs/editor/contrib/suggest/browser/media/suggest","vs/css!vs/editor/contrib/symbolIcons/browser/symbolIcons","vs/css!vs/editor/contrib/unicodeHighlighter/browser/bannerController","vs/css!vs/editor/contrib/unicodeHighlighter/browser/unicodeHighlighter","vs/css!vs/editor/contrib/wordHighlighter/browser/highlightDecorations","vs/css!vs/editor/contrib/zoneWidget/browser/zoneWidget","vs/css!vs/editor/standalone/browser/iPadShowKeyboard/iPadShowKeyboard","vs/css!vs/editor/standalone/browser/inspectTokens/inspectTokens","vs/css!vs/editor/standalone/browser/quickInput/standaloneQuickInput","vs/css!vs/editor/standalone/browser/standalone-tokens","vs/css!vs/platform/actions/browser/menuEntryActionViewItem","vs/css!vs/platform/opener/browser/link","vs/css!vs/platform/severityIcon/browser/media/severityIcon","vs/editor/browser/config/charWidthReader","vs/editor/browser/config/migrateOptions","vs/editor/browser/viewParts/lines/domReadingContext","vs/editor/browser/viewParts/lines/rangeUtil","vs/editor/browser/viewParts/minimap/minimapCharRenderer","vs/editor/browser/viewParts/minimap/minimapPreBaked","vs/editor/browser/viewParts/minimap/minimapCharRendererFactory","vs/editor/browser/widget/codeEditor/codeEditorContributions","vs/editor/browser/widget/diffEditor/delegatingEditorImpl","vs/editor/browser/widget/multiDiffEditor/objectPool","vs/editor/common/commands/trimTrailingWhitespaceCommand","vs/editor/browser/widget/diffEditor/utils/editorGutter","vs/editor/common/core/positionToOffset","vs/editor/common/cursor/cursorContext","vs/editor/common/diff/defaultLinesDiffComputer/lineSequence","vs/editor/common/diff/defaultLinesDiffComputer/algorithms/dynamicProgrammingDiffing","vs/editor/common/diff/defaultLinesDiffComputer/computeMovedLines","vs/editor/common/diff/legacyLinesDiffComputer","vs/editor/common/diff/linesDiffComputers","vs/editor/common/editorTheme","vs/editor/common/languages/defaultDocumentColorsComputer","vs/editor/common/languages/linkComputer","vs/editor/common/cursor/cursorColumnSelection","vs/editor/common/cursor/oneCursor","vs/editor/common/cursor/cursorCollection","vs/editor/common/languages/supports/characterPair","vs/editor/common/languages/supports/indentRules","vs/editor/common/languages/supports/inplaceReplaceSupport","vs/editor/common/languages/supports/onEnter","vs/editor/common/languages/supports/electricCharacter","vs/editor/common/languages/supports/languageBracketsConfiguration","vs/editor/common/languages/supports/tokenization","vs/editor/common/languageFeatureRegistry","vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/nodeReader","vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/concat23Trees","vs/editor/common/model/bracketPairsTextModelPart/fixBrackets","vs/editor/common/model/fixedArray","vs/editor/common/model/indentationGuesser","vs/editor/common/model/intervalTree","vs/editor/common/model/pieceTreeTextBuffer/rbTreeBase","vs/editor/common/model/mirrorTextModel","vs/editor/common/model/pieceTreeTextBuffer/pieceTreeTextBufferBuilder","vs/editor/common/model/textModelText","vs/editor/common/services/findSectionHeaders","vs/editor/common/services/semanticTokensDto","vs/editor/common/textModelBracketPairs","vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/bracketPairsTree","vs/editor/common/model/bracketPairsTextModelPart/bracketPairsImpl","vs/editor/browser/view/domLineBreaksComputer","vs/editor/common/tokenizationRegistry","vs/editor/common/tokens/contiguousMultilineTokens","vs/editor/common/tokens/contiguousTokensEditing","vs/editor/common/tokens/contiguousTokensStore","vs/editor/common/tokens/sparseMultilineTokens","vs/editor/common/tokens/sparseTokensStore","vs/editor/browser/view/viewOverlays","vs/editor/browser/viewParts/blockDecorations/blockDecorations","vs/editor/browser/viewParts/contentWidgets/contentWidgets","vs/editor/browser/viewParts/decorations/decorations","vs/editor/browser/viewParts/linesDecorations/linesDecorations","vs/editor/browser/viewParts/marginDecorations/marginDecorations","vs/editor/browser/viewParts/overlayWidgets/overlayWidgets","vs/editor/browser/viewParts/rulers/rulers","vs/editor/browser/viewParts/scrollDecoration/scrollDecoration","vs/editor/browser/viewParts/viewZones/viewZones","vs/editor/common/viewLayout/linePart","vs/editor/common/viewLayout/linesLayout","vs/editor/common/viewLayout/viewLinesViewportData","vs/editor/common/viewModel/glyphLanesModel","vs/editor/common/viewModel/modelLineProjection","vs/editor/common/viewModel/monospaceLineBreaksComputer","vs/editor/browser/viewParts/overviewRuler/overviewRuler","vs/editor/common/viewModel/viewContext","vs/editor/common/viewLayout/viewLayout","vs/editor/contrib/caretOperations/browser/moveCaretCommand","vs/editor/contrib/colorPicker/browser/colorPickerModel","vs/editor/contrib/comment/browser/lineCommentCommand","vs/editor/contrib/dnd/browser/dragAndDropCommand","vs/editor/contrib/find/browser/replaceAllCommand","vs/editor/contrib/find/browser/replacePattern","vs/editor/contrib/folding/browser/hiddenRangeModel","vs/editor/contrib/hover/browser/contentHoverComputer","vs/editor/contrib/hover/browser/contentHoverTypes","vs/editor/contrib/hover/browser/hoverAccessibleViews","vs/editor/contrib/hover/browser/marginHoverComputer","vs/editor/contrib/hover/browser/resizableContentWidget","vs/editor/contrib/inPlaceReplace/browser/inPlaceReplaceCommand","vs/editor/contrib/inlineCompletions/browser/inlineCompletionsAccessibleView","vs/editor/contrib/inlineEdit/browser/commandIds","vs/editor/contrib/linesOperations/browser/copyLinesCommand","vs/editor/contrib/linesOperations/browser/sortLinesCommand","vs/editor/contrib/smartSelect/browser/wordSelections","vs/editor/contrib/suggest/browser/suggestCommitCharacters","vs/editor/contrib/suggest/browser/suggestOvertypingCapturer","vs/editor/standalone/common/monarch/monarchCompile","vs/base/browser/ui/selectBox/selectBoxCustom","vs/base/browser/ui/selectBox/selectBox","vs/base/browser/ui/dropdown/dropdown","vs/base/browser/ui/findinput/replaceInput","vs/base/browser/ui/menu/menu","vs/base/browser/ui/toolbar/toolbar","vs/base/browser/ui/tree/dataTree","vs/base/browser/ui/tree/asyncDataTree","vs/editor/browser/services/hoverService/updatableHoverWidget","vs/editor/browser/widget/diffEditor/components/diffEditorViewZones/inlineDiffDeletedCodeMargin","vs/editor/browser/widget/diffEditor/features/revertButtonsFeature","vs/editor/browser/viewParts/viewCursors/viewCursor","vs/editor/common/model/textModelTokens","vs/editor/common/model/tokenizationTextModelPart","vs/editor/common/services/editorSimpleWorker","vs/editor/browser/widget/diffEditor/components/diffEditorViewZones/renderLines","vs/platform/action/common/actionCommonCategories","vs/platform/contextkey/common/scanner","vs/platform/editor/common/editor","vs/platform/extensions/common/extensions","vs/platform/history/browser/historyWidgetKeybindingHint","vs/platform/instantiation/common/graph","vs/editor/common/services/languageFeaturesService","vs/editor/common/services/treeViewsDndService","vs/editor/contrib/inlineCompletions/browser/ghostTextWidget","vs/editor/contrib/links/browser/getLinks","vs/editor/standalone/browser/colorizer","vs/editor/contrib/parameterHints/browser/parameterHintsModel","vs/editor/contrib/suggest/browser/suggestAlternatives","vs/editor/contrib/suggest/browser/wordContextKey","vs/editor/browser/config/editorConfiguration","vs/platform/contextkey/browser/contextKeyService","vs/platform/instantiation/common/instantiationService","vs/platform/keybinding/common/baseResolvedKeybinding","vs/platform/keybinding/common/abstractKeybindingService","vs/platform/keybinding/common/usLayoutResolvedKeybinding","vs/platform/accessibility/browser/accessibilityService","vs/editor/contrib/diffEditorBreadcrumbs/browser/contribution","vs/editor/contrib/documentSymbols/browser/documentSymbols","vs/platform/clipboard/browser/clipboardService","vs/platform/log/common/logService","vs/editor/contrib/gotoError/browser/markerNavigationService","vs/platform/markers/common/markerService","vs/platform/observable/common/wrapInReloadableClass","vs/editor/browser/services/openerService","vs/platform/opener/browser/link","vs/platform/quickinput/browser/pickerQuickAccess","vs/platform/quickinput/browser/quickInputBox","vs/editor/browser/services/hoverService/hoverWidget","vs/editor/browser/services/webWorker","vs/editor/common/cursor/cursor","vs/editor/common/services/getIconClasses","vs/editor/common/services/languagesAssociations","vs/editor/common/services/languagesRegistry","vs/editor/common/services/languageService","vs/editor/contrib/hover/browser/marginHoverWidget","vs/editor/contrib/indentation/common/indentation","vs/editor/contrib/inlineCompletions/browser/inlineCompletionsSource","vs/editor/contrib/linesOperations/browser/moveLinesCommand","vs/platform/configuration/common/configurations","vs/editor/contrib/toggleTabFocusMode/browser/toggleTabFocusMode","vs/platform/quickinput/browser/quickInputActions","vs/platform/quickinput/browser/helpQuickAccess","vs/editor/standalone/browser/quickAccess/standaloneHelpQuickAccess","vs/platform/quickinput/browser/quickAccess","vs/platform/severityIcon/browser/severityIcon","vs/editor/contrib/codelens/browser/codeLensCache","vs/editor/browser/services/markerDecorations","vs/editor/browser/view/viewController","vs/editor/contrib/anchorSelect/browser/anchorSelect","vs/editor/contrib/caretOperations/browser/caretOperations","vs/editor/contrib/caretOperations/browser/transpose","vs/editor/contrib/comment/browser/comment","vs/editor/contrib/cursorUndo/browser/cursorUndo","vs/editor/contrib/editorState/browser/keybindingCancellation","vs/editor/contrib/codeAction/browser/codeActionKeybindingResolver","vs/editor/contrib/fontZoom/browser/fontZoom","vs/editor/contrib/format/browser/formatActions","vs/editor/contrib/gotoSymbol/browser/symbolNavigation","vs/editor/contrib/indentation/browser/indentation","vs/editor/contrib/lineSelection/browser/lineSelection","vs/editor/contrib/linesOperations/browser/linesOperations","vs/editor/contrib/longLinesHelper/browser/longLinesHelper","vs/editor/contrib/readOnlyMessage/browser/contribution","vs/editor/contrib/smartSelect/browser/smartSelect","vs/editor/contrib/tokenization/browser/tokenization","vs/editor/contrib/unusualLineTerminators/browser/unusualLineTerminators","vs/editor/contrib/wordPartOperations/browser/wordPartOperations","vs/editor/standalone/browser/iPadShowKeyboard/iPadShowKeyboard","vs/editor/standalone/browser/inspectTokens/inspectTokens","vs/platform/quickinput/browser/commandsQuickAccess","vs/editor/contrib/quickAccess/browser/commandsQuickAccess","vs/editor/standalone/browser/quickAccess/standaloneCommandsQuickAccess","vs/platform/theme/common/colors/menuColors","vs/platform/theme/common/colors/chartsColors","vs/platform/theme/common/colors/quickpickColors","vs/platform/theme/common/colors/searchColors","vs/editor/browser/viewParts/minimap/minimap","vs/editor/browser/widget/multiDiffEditor/colors","vs/editor/contrib/codeAction/browser/codeActionMenu","vs/editor/contrib/gotoSymbol/browser/peek/referencesTree","vs/platform/actionWidget/browser/actionList","vs/platform/actionWidget/browser/actionWidget","vs/platform/contextview/browser/contextMenuHandler","vs/editor/browser/widget/diffEditor/components/accessibleDiffViewer","vs/editor/contrib/colorPicker/browser/colorPickerWidget","vs/editor/contrib/parameterHints/browser/parameterHintsWidget","vs/editor/contrib/parameterHints/browser/parameterHints","vs/editor/contrib/unicodeHighlighter/browser/bannerController","vs/platform/theme/browser/iconsStyleSheet","vs/editor/browser/controller/mouseHandler","vs/editor/browser/controller/pointerHandler","vs/editor/browser/viewParts/lines/viewLines","vs/editor/browser/services/abstractCodeEditorService","vs/editor/browser/services/hoverService/hoverService","vs/editor/browser/viewParts/editorScrollbar/editorScrollbar","vs/editor/browser/viewParts/selections/selections","vs/editor/browser/widget/diffEditor/components/diffEditorEditors","vs/editor/browser/viewParts/currentLineHighlight/currentLineHighlight","vs/editor/browser/viewParts/indentGuides/indentGuides","vs/editor/browser/controller/textAreaHandler","vs/editor/browser/viewParts/overviewRuler/decorationsOverviewRuler","vs/editor/browser/viewParts/viewCursors/viewCursors","vs/editor/browser/viewParts/whitespace/whitespace","vs/editor/browser/view","vs/editor/common/model/bracketPairsTextModelPart/colorizedBracketPairsDecorationProvider","vs/editor/common/services/markerDecorationsService","vs/editor/common/services/semanticTokensStylingService","vs/editor/contrib/placeholderText/browser/placeholderText.contribution","vs/editor/contrib/quickAccess/browser/gotoLineQuickAccess","vs/editor/contrib/quickAccess/browser/gotoSymbolQuickAccess","vs/editor/contrib/rename/browser/renameWidget","vs/editor/contrib/rename/browser/rename","vs/editor/contrib/semanticTokens/browser/documentSemanticTokens","vs/editor/contrib/semanticTokens/browser/viewportSemanticTokens","vs/editor/contrib/suggest/browser/suggestWidgetRenderer","vs/editor/standalone/browser/quickAccess/standaloneGotoLineQuickAccess","vs/editor/standalone/browser/quickAccess/standaloneGotoSymbolQuickAccess","vs/editor/standalone/common/themes","vs/editor/standalone/browser/toggleHighContrast/toggleHighContrast","vs/editor/contrib/suggest/browser/suggestWidgetStatus","vs/editor/browser/widget/diffEditor/features/gutterFeature","vs/editor/contrib/inlineEdit/browser/inlineEditHintsWidget","vs/platform/contextview/browser/contextMenuService","vs/platform/quickinput/browser/quickInputTree","vs/platform/quickinput/browser/quickInputController","vs/platform/quickinput/browser/quickInputService","vs/editor/standalone/browser/quickInput/standaloneQuickInputService","vs/editor/browser/widget/diffEditor/components/diffEditorDecorations","vs/editor/browser/widget/diffEditor/diffEditorOptions","vs/editor/common/services/modelService","vs/editor/common/viewModel/viewModelLines","vs/editor/common/viewModel/viewModelImpl","vs/editor/browser/widget/diffEditor/commands","vs/editor/browser/widget/diffEditor/diffEditor.contribution","vs/editor/browser/widget/multiDiffEditor/multiDiffEditorWidgetImpl","vs/editor/browser/widget/multiDiffEditor/multiDiffEditorWidget","vs/editor/contrib/bracketMatching/browser/bracketMatching","vs/editor/contrib/codeAction/browser/codeActionCommands","vs/editor/contrib/codeAction/browser/codeActionContributions","vs/editor/contrib/codelens/browser/codelensWidget","vs/editor/contrib/codelens/browser/codelensController","vs/editor/contrib/colorPicker/browser/standaloneColorPickerWidget","vs/editor/contrib/colorPicker/browser/standaloneColorPickerActions","vs/editor/contrib/dnd/browser/dnd","vs/editor/contrib/find/browser/findDecorations","vs/editor/contrib/find/browser/findOptionsWidget","vs/editor/contrib/find/browser/findState","vs/editor/contrib/find/browser/findWidget","vs/editor/contrib/inPlaceReplace/browser/inPlaceReplace","vs/editor/contrib/inlineEdit/browser/ghostTextWidget","vs/editor/contrib/inlineEdit/browser/inlineEditSideBySideWidget","vs/editor/contrib/inlineEdit/browser/commands","vs/editor/contrib/inlineEdit/browser/inlineEdit.contribution","vs/editor/contrib/dropOrPasteInto/browser/dropIntoEditorController","vs/editor/contrib/linkedEditing/browser/linkedEditing","vs/editor/contrib/links/browser/links","vs/editor/contrib/sectionHeaders/browser/sectionHeaders","vs/editor/contrib/stickyScroll/browser/stickyScrollModelProvider","vs/editor/contrib/stickyScroll/browser/stickyScrollProvider","vs/editor/contrib/stickyScroll/browser/stickyScrollWidget","vs/editor/contrib/suggest/browser/suggestWidget","vs/editor/contrib/multicursor/browser/multicursor","vs/editor/contrib/wordHighlighter/browser/wordHighlighter","vs/editor/contrib/zoneWidget/browser/zoneWidget","vs/editor/contrib/gotoError/browser/gotoErrorWidget","vs/editor/contrib/gotoSymbol/browser/peek/referencesWidget","vs/editor/contrib/hover/browser/markerHoverParticipant","vs/editor/contrib/hover/browser/contentHoverRendered","vs/editor/contrib/hover/browser/contentHoverController","vs/editor/contrib/colorPicker/browser/colorContributions","vs/editor/contrib/hover/browser/hoverActions","vs/editor/contrib/hover/browser/hoverContribution","vs/editor/contrib/inlayHints/browser/inlayHintsContribution","vs/editor/contrib/stickyScroll/browser/stickyScrollActions","vs/editor/contrib/stickyScroll/browser/stickyScrollContribution","vs/editor/standalone/browser/referenceSearch/standaloneReferenceSearch","vs/platform/undoRedo/common/undoRedoService","vs/editor/contrib/clipboard/browser/clipboard","vs/editor/contrib/dropOrPasteInto/browser/copyPasteContribution","vs/editor/contrib/dropOrPasteInto/browser/dropIntoEditorContribution","vs/editor/contrib/snippet/browser/snippetVariables","vs/editor/contrib/inlineCompletions/browser/inlineCompletionsModel","vs/editor/contrib/inlineCompletions/browser/suggestWidgetInlineCompletionProvider","vs/editor/contrib/inlineCompletions/browser/commands","vs/editor/contrib/inlineCompletions/browser/hoverParticipant","vs/editor/contrib/inlineCompletions/browser/inlineCompletions.contribution","vs/editor/contrib/inlineEdits/browser/inlineEditsModel","vs/editor/contrib/inlineEdits/browser/commands","vs/editor/contrib/inlineEdits/browser/inlineEdits.contribution","vs/editor/contrib/suggest/browser/suggestInlineCompletions","vs/editor/contrib/unicodeHighlighter/browser/unicodeHighlighter","vs/editor/editor.all","vs/editor/standalone/browser/standaloneCodeEditor","vs/editor/standalone/browser/standaloneEditor","vs/editor/standalone/browser/standaloneLanguages","vs/editor/editor.api","vs/css","vs/editor/editor.main"],re=function(ae){for(var e=[],c=0,k=ae.length;c<k;c++)e[c]=oe[ae[c]];return e};define(oe[866],re([1,0]),function(ae,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.load=c;function c(f,_,C,p){if(p=p||{},(p["vs/css"]||{}).disabled){C({});return}const s=_.toUrl(f+".css");k(f,s,()=>{C({})},t=>{typeof C.error=="function"&&C.error("Could not find "+s+".")})}function k(f,_,C,p){if(E(f,_)){C();return}L(f,_,C,p)}function E(f,_){const C=window.document.getElementsByTagName("link");for(let p=0,n=C.length;p<n;p++){const s=C[p].getAttribute("data-name"),t=C[p].getAttribute("href");if(s===f||t===_)return!0}return!1}function L(f,_,C,p){const n=document.createElement("link");n.setAttribute("rel","stylesheet"),n.setAttribute("type","text/css"),n.setAttribute("data-name",f),y(f,n,C,p),n.setAttribute("href",_),(window.document.head||window.document.getElementsByTagName("head")[0]).appendChild(n)}function y(f,_,C,p){const n=()=>{_.removeEventListener("load",s),_.removeEventListener("error",t)},s=i=>{n(),C()},t=i=>{n(),p(i)};_.addEventListener("load",s),_.addEventListener("error",t)}});/*! @license DOMPurify 3.0.5 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.0.5/LICENSE */const{entries:qt,setPrototypeOf:Ut,isFrozen:li,getPrototypeOf:di,getOwnPropertyDescriptor:ci}=Object;let{freeze:mt,seal:yt,create:ui}=Object,{apply:Pt,construct:Ot}=typeof Reflect<"u"&&Reflect;Pt||(Pt=function(e,c,k){return e.apply(c,k)}),mt||(mt=function(e){return e}),yt||(yt=function(e){return e}),Ot||(Ot=function(e,c){return new e(...c)});const hi=vt(Array.prototype.forEach),jt=vt(Array.prototype.pop),kt=vt(Array.prototype.push),Mt=vt(String.prototype.toLowerCase),Ft=vt(String.prototype.toString),gi=vt(String.prototype.match),Lt=vt(String.prototype.replace),fi=vt(String.prototype.indexOf),mi=vt(String.prototype.trim),Ct=vt(RegExp.prototype.test),Tt=pi(TypeError);function vt(ae){return function(e){for(var c=arguments.length,k=new Array(c>1?c-1:0),E=1;E<c;E++)k[E-1]=arguments[E];return Pt(ae,e,k)}}function pi(ae){return function(){for(var e=arguments.length,c=new Array(e),k=0;k<e;k++)c[k]=arguments[k];return Ot(ae,c)}}function Qe(ae,e,c){var k;c=(k=c)!==null&&k!==void 0?k:Mt,Ut&&Ut(ae,null);let E=e.length;for(;E--;){let L=e[E];if(typeof L=="string"){const y=c(L);y!==L&&(li(e)||(e[E]=y),L=y)}ae[L]=!0}return ae}function It(ae){const e=ui(null);for(const[c,k]of qt(ae))e[c]=k;return e}function At(ae,e){for(;ae!==null;){const k=ci(ae,e);if(k){if(k.get)return vt(k.get);if(typeof k.value=="function")return vt(k.value)}ae=di(ae)}function c(k){return console.warn("fallback value for",k),null}return c}const Gt=mt(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),xt=mt(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Wt=mt(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Ci=mt(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Bt=mt(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),bi=mt(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),$t=mt(["#text"]),Yt=mt(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),Ht=mt(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Qt=mt(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Rt=mt(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),vi=yt(/\{\{[\w\W]*|[\w\W]*\}\}/gm),Si=yt(/<%[\w\W]*|[\w\W]*%>/gm),_i=yt(/\${[\w\W]*}/gm),wi=yt(/^data-[\-\w.\u00B7-\uFFFF]/),yi=yt(/^aria-[\-\w]+$/),Zt=yt(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Li=yt(/^(?:\w+script|data):/i),Ei=yt(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Xt=yt(/^html$/i);var Jt=Object.freeze({__proto__:null,MUSTACHE_EXPR:vi,ERB_EXPR:Si,TMPLIT_EXPR:_i,DATA_ATTR:wi,ARIA_ATTR:yi,IS_ALLOWED_URI:Zt,IS_SCRIPT_OR_DATA:Li,ATTR_WHITESPACE:Ei,DOCTYPE_NAME:Xt});const Di=()=>typeof window>"u"?null:window,Ii=function(e,c){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let k=null;const E="data-tt-policy-suffix";c&&c.hasAttribute(E)&&(k=c.getAttribute(E));const L="dompurify"+(k?"#"+k:"");try{return e.createPolicy(L,{createHTML(y){return y},createScriptURL(y){return y}})}catch{return console.warn("TrustedTypes policy "+L+" could not be created."),null}};function ei(){let ae=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Di();const e=qe=>ei(qe);if(e.version="3.0.5",e.removed=[],!ae||!ae.document||ae.document.nodeType!==9)return e.isSupported=!1,e;const c=ae.document,k=c.currentScript;let{document:E}=ae;const{DocumentFragment:L,HTMLTemplateElement:y,Node:f,Element:_,NodeFilter:C,NamedNodeMap:p=ae.NamedNodeMap||ae.MozNamedAttrMap,HTMLFormElement:n,DOMParser:s,trustedTypes:t}=ae,i=_.prototype,o=At(i,"cloneNode"),g=At(i,"nextSibling"),h=At(i,"childNodes"),l=At(i,"parentNode");if(typeof y=="function"){const qe=E.createElement("template");qe.content&&qe.content.ownerDocument&&(E=qe.content.ownerDocument)}let a,r="";const{implementation:d,createNodeIterator:m,createDocumentFragment:u,getElementsByTagName:b}=E,{importNode:v}=c;let w={};e.isSupported=typeof qt=="function"&&typeof l=="function"&&d&&d.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:S,ERB_EXPR:D,TMPLIT_EXPR:I,DATA_ATTR:T,ARIA_ATTR:M,IS_SCRIPT_OR_DATA:A,ATTR_WHITESPACE:R}=Jt;let{IS_ALLOWED_URI:N}=Jt,O=null;const x=Qe({},[...Gt,...xt,...Wt,...Bt,...$t]);let F=null;const W=Qe({},[...Yt,...Ht,...Qt,...Rt]);let V=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),q=null,H=null,K=!0,G=!0,Y=!1,X=!0,Z=!1,j=!1,P=!1,te=!1,se=!1,ue=!1,ge=!1,pe=!0,ce=!1;const ie="user-content-";let ne=!0,J=!1,B={},U=null;const z=Qe({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let $=null;const Q=Qe({},["audio","video","img","source","image","track"]);let ee=null;const le=Qe({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),de="http://www.w3.org/1998/Math/MathML",me="http://www.w3.org/2000/svg",be="http://www.w3.org/1999/xhtml";let ve=be,Le=!1,Se=null;const ye=Qe({},[de,me,be],Ft);let Ee;const ke=["application/xhtml+xml","text/html"],Re="text/html";let Pe,Fe=null;const je=E.createElement("form"),Te=function(Ce){return Ce instanceof RegExp||Ce instanceof Function},Ne=function(Ce){if(!(Fe&&Fe===Ce)){if((!Ce||typeof Ce!="object")&&(Ce={}),Ce=It(Ce),Ee=ke.indexOf(Ce.PARSER_MEDIA_TYPE)===-1?Ee=Re:Ee=Ce.PARSER_MEDIA_TYPE,Pe=Ee==="application/xhtml+xml"?Ft:Mt,O="ALLOWED_TAGS"in Ce?Qe({},Ce.ALLOWED_TAGS,Pe):x,F="ALLOWED_ATTR"in Ce?Qe({},Ce.ALLOWED_ATTR,Pe):W,Se="ALLOWED_NAMESPACES"in Ce?Qe({},Ce.ALLOWED_NAMESPACES,Ft):ye,ee="ADD_URI_SAFE_ATTR"in Ce?Qe(It(le),Ce.ADD_URI_SAFE_ATTR,Pe):le,$="ADD_DATA_URI_TAGS"in Ce?Qe(It(Q),Ce.ADD_DATA_URI_TAGS,Pe):Q,U="FORBID_CONTENTS"in Ce?Qe({},Ce.FORBID_CONTENTS,Pe):z,q="FORBID_TAGS"in Ce?Qe({},Ce.FORBID_TAGS,Pe):{},H="FORBID_ATTR"in Ce?Qe({},Ce.FORBID_ATTR,Pe):{},B="USE_PROFILES"in Ce?Ce.USE_PROFILES:!1,K=Ce.ALLOW_ARIA_ATTR!==!1,G=Ce.ALLOW_DATA_ATTR!==!1,Y=Ce.ALLOW_UNKNOWN_PROTOCOLS||!1,X=Ce.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Z=Ce.SAFE_FOR_TEMPLATES||!1,j=Ce.WHOLE_DOCUMENT||!1,se=Ce.RETURN_DOM||!1,ue=Ce.RETURN_DOM_FRAGMENT||!1,ge=Ce.RETURN_TRUSTED_TYPE||!1,te=Ce.FORCE_BODY||!1,pe=Ce.SANITIZE_DOM!==!1,ce=Ce.SANITIZE_NAMED_PROPS||!1,ne=Ce.KEEP_CONTENT!==!1,J=Ce.IN_PLACE||!1,N=Ce.ALLOWED_URI_REGEXP||Zt,ve=Ce.NAMESPACE||be,V=Ce.CUSTOM_ELEMENT_HANDLING||{},Ce.CUSTOM_ELEMENT_HANDLING&&Te(Ce.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(V.tagNameCheck=Ce.CUSTOM_ELEMENT_HANDLING.tagNameCheck),Ce.CUSTOM_ELEMENT_HANDLING&&Te(Ce.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(V.attributeNameCheck=Ce.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),Ce.CUSTOM_ELEMENT_HANDLING&&typeof Ce.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(V.allowCustomizedBuiltInElements=Ce.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Z&&(G=!1),ue&&(se=!0),B&&(O=Qe({},[...$t]),F=[],B.html===!0&&(Qe(O,Gt),Qe(F,Yt)),B.svg===!0&&(Qe(O,xt),Qe(F,Ht),Qe(F,Rt)),B.svgFilters===!0&&(Qe(O,Wt),Qe(F,Ht),Qe(F,Rt)),B.mathMl===!0&&(Qe(O,Bt),Qe(F,Qt),Qe(F,Rt))),Ce.ADD_TAGS&&(O===x&&(O=It(O)),Qe(O,Ce.ADD_TAGS,Pe)),Ce.ADD_ATTR&&(F===W&&(F=It(F)),Qe(F,Ce.ADD_ATTR,Pe)),Ce.ADD_URI_SAFE_ATTR&&Qe(ee,Ce.ADD_URI_SAFE_ATTR,Pe),Ce.FORBID_CONTENTS&&(U===z&&(U=It(U)),Qe(U,Ce.FORBID_CONTENTS,Pe)),ne&&(O["#text"]=!0),j&&Qe(O,["html","head","body"]),O.table&&(Qe(O,["tbody"]),delete q.tbody),Ce.TRUSTED_TYPES_POLICY){if(typeof Ce.TRUSTED_TYPES_POLICY.createHTML!="function")throw Tt('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof Ce.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Tt('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');a=Ce.TRUSTED_TYPES_POLICY,r=a.createHTML("")}else a===void 0&&(a=Ii(t,k)),a!==null&&typeof r=="string"&&(r=a.createHTML(""));mt&&mt(Ce),Fe=Ce}},fe=Qe({},["mi","mo","mn","ms","mtext"]),we=Qe({},["foreignobject","desc","title","annotation-xml"]),Oe=Qe({},["title","style","font","a","script"]),Be=Qe({},xt);Qe(Be,Wt),Qe(Be,Ci);const Ue=Qe({},Bt);Qe(Ue,bi);const Ye=function(Ce){let _e=l(Ce);(!_e||!_e.tagName)&&(_e={namespaceURI:ve,tagName:"template"});const Ie=Mt(Ce.tagName),Ae=Mt(_e.tagName);return Se[Ce.namespaceURI]?Ce.namespaceURI===me?_e.namespaceURI===be?Ie==="svg":_e.namespaceURI===de?Ie==="svg"&&(Ae==="annotation-xml"||fe[Ae]):!!Be[Ie]:Ce.namespaceURI===de?_e.namespaceURI===be?Ie==="math":_e.namespaceURI===me?Ie==="math"&&we[Ae]:!!Ue[Ie]:Ce.namespaceURI===be?_e.namespaceURI===me&&!we[Ae]||_e.namespaceURI===de&&!fe[Ae]?!1:!Ue[Ie]&&(Oe[Ie]||!Be[Ie]):!!(Ee==="application/xhtml+xml"&&Se[Ce.namespaceURI]):!1},Ze=function(Ce){kt(e.removed,{element:Ce});try{Ce.parentNode.removeChild(Ce)}catch{Ce.remove()}},tt=function(Ce,_e){try{kt(e.removed,{attribute:_e.getAttributeNode(Ce),from:_e})}catch{kt(e.removed,{attribute:null,from:_e})}if(_e.removeAttribute(Ce),Ce==="is"&&!F[Ce])if(se||ue)try{Ze(_e)}catch{}else try{_e.setAttribute(Ce,"")}catch{}},it=function(Ce){let _e,Ie;if(te)Ce="<remove></remove>"+Ce;else{const Ke=gi(Ce,/^[\r\n\t ]+/);Ie=Ke&&Ke[0]}Ee==="application/xhtml+xml"&&ve===be&&(Ce='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+Ce+"</body></html>");const Ae=a?a.createHTML(Ce):Ce;if(ve===be)try{_e=new s().parseFromString(Ae,Ee)}catch{}if(!_e||!_e.documentElement){_e=d.createDocument(ve,"template",null);try{_e.documentElement.innerHTML=Le?r:Ae}catch{}}const We=_e.body||_e.documentElement;return Ce&&Ie&&We.insertBefore(E.createTextNode(Ie),We.childNodes[0]||null),ve===be?b.call(_e,j?"html":"body")[0]:j?_e.documentElement:We},ut=function(Ce){return m.call(Ce.ownerDocument||Ce,Ce,C.SHOW_ELEMENT|C.SHOW_COMMENT|C.SHOW_TEXT,null,!1)},ct=function(Ce){return Ce instanceof n&&(typeof Ce.nodeName!="string"||typeof Ce.textContent!="string"||typeof Ce.removeChild!="function"||!(Ce.attributes instanceof p)||typeof Ce.removeAttribute!="function"||typeof Ce.setAttribute!="function"||typeof Ce.namespaceURI!="string"||typeof Ce.insertBefore!="function"||typeof Ce.hasChildNodes!="function")},nt=function(Ce){return typeof f=="object"?Ce instanceof f:Ce&&typeof Ce=="object"&&typeof Ce.nodeType=="number"&&typeof Ce.nodeName=="string"},st=function(Ce,_e,Ie){w[Ce]&&hi(w[Ce],Ae=>{Ae.call(e,_e,Ie,Fe)})},dt=function(Ce){let _e;if(st("beforeSanitizeElements",Ce,null),ct(Ce))return Ze(Ce),!0;const Ie=Pe(Ce.nodeName);if(st("uponSanitizeElement",Ce,{tagName:Ie,allowedTags:O}),Ce.hasChildNodes()&&!nt(Ce.firstElementChild)&&(!nt(Ce.content)||!nt(Ce.content.firstElementChild))&&Ct(/<[/\w]/g,Ce.innerHTML)&&Ct(/<[/\w]/g,Ce.textContent))return Ze(Ce),!0;if(!O[Ie]||q[Ie]){if(!q[Ie]&&_t(Ie)&&(V.tagNameCheck instanceof RegExp&&Ct(V.tagNameCheck,Ie)||V.tagNameCheck instanceof Function&&V.tagNameCheck(Ie)))return!1;if(ne&&!U[Ie]){const Ae=l(Ce)||Ce.parentNode,We=h(Ce)||Ce.childNodes;if(We&&Ae){const Ke=We.length;for(let He=Ke-1;He>=0;--He)Ae.insertBefore(o(We[He],!0),g(Ce))}}return Ze(Ce),!0}return Ce instanceof _&&!Ye(Ce)||(Ie==="noscript"||Ie==="noembed"||Ie==="noframes")&&Ct(/<\/no(script|embed|frames)/i,Ce.innerHTML)?(Ze(Ce),!0):(Z&&Ce.nodeType===3&&(_e=Ce.textContent,_e=Lt(_e,S," "),_e=Lt(_e,D," "),_e=Lt(_e,I," "),Ce.textContent!==_e&&(kt(e.removed,{element:Ce.cloneNode()}),Ce.textContent=_e)),st("afterSanitizeElements",Ce,null),!1)},St=function(Ce,_e,Ie){if(pe&&(_e==="id"||_e==="name")&&(Ie in E||Ie in je))return!1;if(!(G&&!H[_e]&&Ct(T,_e))){if(!(K&&Ct(M,_e))){if(!F[_e]||H[_e]){if(!(_t(Ce)&&(V.tagNameCheck instanceof RegExp&&Ct(V.tagNameCheck,Ce)||V.tagNameCheck instanceof Function&&V.tagNameCheck(Ce))&&(V.attributeNameCheck instanceof RegExp&&Ct(V.attributeNameCheck,_e)||V.attributeNameCheck instanceof Function&&V.attributeNameCheck(_e))||_e==="is"&&V.allowCustomizedBuiltInElements&&(V.tagNameCheck instanceof RegExp&&Ct(V.tagNameCheck,Ie)||V.tagNameCheck instanceof Function&&V.tagNameCheck(Ie))))return!1}else if(!ee[_e]){if(!Ct(N,Lt(Ie,R,""))){if(!((_e==="src"||_e==="xlink:href"||_e==="href")&&Ce!=="script"&&fi(Ie,"data:")===0&&$[Ce])){if(!(Y&&!Ct(A,Lt(Ie,R,"")))){if(Ie)return!1}}}}}}return!0},_t=function(Ce){return Ce.indexOf("-")>0},ht=function(Ce){let _e,Ie,Ae,We;st("beforeSanitizeAttributes",Ce,null);const{attributes:Ke}=Ce;if(!Ke)return;const He={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:F};for(We=Ke.length;We--;){_e=Ke[We];const{name:$e,namespaceURI:Ve}=_e;if(Ie=$e==="value"?_e.value:mi(_e.value),Ae=Pe($e),He.attrName=Ae,He.attrValue=Ie,He.keepAttr=!0,He.forceKeepAttr=void 0,st("uponSanitizeAttribute",Ce,He),Ie=He.attrValue,He.forceKeepAttr||(tt($e,Ce),!He.keepAttr))continue;if(!X&&Ct(/\/>/i,Ie)){tt($e,Ce);continue}Z&&(Ie=Lt(Ie,S," "),Ie=Lt(Ie,D," "),Ie=Lt(Ie,I," "));const Me=Pe(Ce.nodeName);if(St(Me,Ae,Ie)){if(ce&&(Ae==="id"||Ae==="name")&&(tt($e,Ce),Ie=ie+Ie),a&&typeof t=="object"&&typeof t.getAttributeType=="function"&&!Ve)switch(t.getAttributeType(Me,Ae)){case"TrustedHTML":{Ie=a.createHTML(Ie);break}case"TrustedScriptURL":{Ie=a.createScriptURL(Ie);break}}try{Ve?Ce.setAttributeNS(Ve,$e,Ie):Ce.setAttribute($e,Ie),jt(e.removed)}catch{}}}st("afterSanitizeAttributes",Ce,null)},wt=function qe(Ce){let _e;const Ie=ut(Ce);for(st("beforeSanitizeShadowDOM",Ce,null);_e=Ie.nextNode();)st("uponSanitizeShadowNode",_e,null),!dt(_e)&&(_e.content instanceof L&&qe(_e.content),ht(_e));st("afterSanitizeShadowDOM",Ce,null)};return e.sanitize=function(qe){let Ce=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},_e,Ie,Ae,We;if(Le=!qe,Le&&(qe="<!-->"),typeof qe!="string"&&!nt(qe))if(typeof qe.toString=="function"){if(qe=qe.toString(),typeof qe!="string")throw Tt("dirty is not a string, aborting")}else throw Tt("toString is not a function");if(!e.isSupported)return qe;if(P||Ne(Ce),e.removed=[],typeof qe=="string"&&(J=!1),J){if(qe.nodeName){const $e=Pe(qe.nodeName);if(!O[$e]||q[$e])throw Tt("root node is forbidden and cannot be sanitized in-place")}}else if(qe instanceof f)_e=it("<!---->"),Ie=_e.ownerDocument.importNode(qe,!0),Ie.nodeType===1&&Ie.nodeName==="BODY"||Ie.nodeName==="HTML"?_e=Ie:_e.appendChild(Ie);else{if(!se&&!Z&&!j&&qe.indexOf("<")===-1)return a&&ge?a.createHTML(qe):qe;if(_e=it(qe),!_e)return se?null:ge?r:""}_e&&te&&Ze(_e.firstChild);const Ke=ut(J?qe:_e);for(;Ae=Ke.nextNode();)dt(Ae)||(Ae.content instanceof L&&wt(Ae.content),ht(Ae));if(J)return qe;if(se){if(ue)for(We=u.call(_e.ownerDocument);_e.firstChild;)We.appendChild(_e.firstChild);else We=_e;return(F.shadowroot||F.shadowrootmode)&&(We=v.call(c,We,!0)),We}let He=j?_e.outerHTML:_e.innerHTML;return j&&O["!doctype"]&&_e.ownerDocument&&_e.ownerDocument.doctype&&_e.ownerDocument.doctype.name&&Ct(Xt,_e.ownerDocument.doctype.name)&&(He="<!DOCTYPE "+_e.ownerDocument.doctype.name+`>
|
|
@@ -646,7 +646,7 @@ ${o.toString()}`}}class s{constructor(o=new _.ServiceCollection,g=!1,h,l=p){this
|
|
|
646
646
|
`,d+=`index: ${h.idx}, based on ${h.completion.sortText&&`sortText: "${h.completion.sortText}"`||"label"}
|
|
647
647
|
`,d+=`commit_chars: ${h.completion.commitCharacters?.join("")}
|
|
648
648
|
`,r=new f.MarkdownString().appendCodeblock("empty",d),a=`Provider: ${h.provider._debugDisplayName}`}if(!l&&!t(h)){this.clearContents();return}if(this.domNode.classList.remove("no-docs","no-type"),a){const d=a.length>1e5?`${a.substr(0,1e5)}\u2026`:a;this._type.textContent=d,this._type.title=d,c.show(this._type),this._type.classList.toggle("auto-wrap",!/\r?\n^\s+/gmi.test(d))}else c.clearNode(this._type),this._type.title="",c.hide(this._type),this.domNode.classList.add("no-type");if(c.clearNode(this._docs),typeof r=="string")this._docs.classList.remove("markdown-docs"),this._docs.textContent=r;else if(r){this._docs.classList.add("markdown-docs"),c.clearNode(this._docs);const d=this._markdownRenderer.render(r);this._docs.appendChild(d.element),this._renderDisposeable.add(d),this._renderDisposeable.add(this._markdownRenderer.onDidRenderAsync(()=>{this.layout(this._size.width,this._type.clientHeight+this._docs.clientHeight),this._onDidChangeContents.fire(this)}))}this.domNode.style.userSelect="text",this.domNode.tabIndex=-1,this._close.onmousedown=d=>{d.preventDefault(),d.stopPropagation()},this._close.onclick=d=>{d.preventDefault(),d.stopPropagation(),this._onDidClose.fire()},this._body.scrollTop=0,this.layout(this._size.width,this._type.clientHeight+this._docs.clientHeight),this._onDidChangeContents.fire(this)}clearContents(){this.domNode.classList.add("no-docs"),this._type.textContent="",this._docs.textContent=""}get isEmpty(){return this.domNode.classList.contains("no-docs")}get size(){return this._size}layout(h,l){const a=new c.Dimension(h,l);c.Dimension.equals(a,this._size)||(this._size=a,c.size(this.domNode,h,l)),this._scrollbar.scanDomNode()}scrollDown(h=8){this._body.scrollTop+=h}scrollUp(h=8){this._body.scrollTop-=h}scrollTop(){this._body.scrollTop=0}scrollBottom(){this._body.scrollTop=this._body.scrollHeight}pageDown(){this.scrollDown(80)}pageUp(){this.scrollUp(80)}set borderWidth(h){this._borderWidth=h}get borderWidth(){return this._borderWidth}};e.SuggestDetailsWidget=i,e.SuggestDetailsWidget=i=De([he(1,s.IInstantiationService)],i);class o{constructor(h,l){this.widget=h,this._editor=l,this.allowEditorOverflow=!0,this._disposables=new _.DisposableStore,this._added=!1,this._preferAlignAtTop=!0,this._resizable=new p.ResizableHTMLElement,this._resizable.domNode.classList.add("suggest-details-container"),this._resizable.domNode.appendChild(h.domNode),this._resizable.enableSashes(!1,!0,!0,!1);let a,r,d=0,m=0;this._disposables.add(this._resizable.onDidWillResize(()=>{a=this._topLeft,r=this._resizable.size})),this._disposables.add(this._resizable.onDidResize(u=>{if(a&&r){this.widget.layout(u.dimension.width,u.dimension.height);let b=!1;u.west&&(m=r.width-u.dimension.width,b=!0),u.north&&(d=r.height-u.dimension.height,b=!0),b&&this._applyTopLeft({top:a.top+d,left:a.left+m})}u.done&&(a=void 0,r=void 0,d=0,m=0,this._userSize=u.dimension)})),this._disposables.add(this.widget.onDidChangeContents(()=>{this._anchorBox&&this._placeAtAnchor(this._anchorBox,this._userSize??this.widget.size,this._preferAlignAtTop)}))}dispose(){this._resizable.dispose(),this._disposables.dispose(),this.hide()}getId(){return"suggest.details"}getDomNode(){return this._resizable.domNode}getPosition(){return this._topLeft?{preference:this._topLeft}:null}show(){this._added||(this._editor.addOverlayWidget(this),this._added=!0)}hide(h=!1){this._resizable.clearSashHoverState(),this._added&&(this._editor.removeOverlayWidget(this),this._added=!1,this._anchorBox=void 0,this._topLeft=void 0),h&&(this._userSize=void 0,this.widget.clearContents())}placeAtAnchor(h,l){const a=h.getBoundingClientRect();this._anchorBox=a,this._preferAlignAtTop=l,this._placeAtAnchor(this._anchorBox,this._userSize??this.widget.size,l)}_placeAtAnchor(h,l,a){const r=c.getClientArea(this.getDomNode().ownerDocument.body),d=this.widget.getLayoutInfo(),m=new c.Dimension(220,2*d.lineHeight),u=h.top,b=function(){const F=r.width-(h.left+h.width+d.borderWidth+d.horizontalPadding),W=-d.borderWidth+h.left+h.width,V=new c.Dimension(F,r.height-h.top-d.borderHeight-d.verticalPadding),q=V.with(void 0,h.top+h.height-d.borderHeight-d.verticalPadding);return{top:u,left:W,fit:F-l.width,maxSizeTop:V,maxSizeBottom:q,minSize:m.with(Math.min(F,m.width))}}(),v=function(){const F=h.left-d.borderWidth-d.horizontalPadding,W=Math.max(d.horizontalPadding,h.left-l.width-d.borderWidth),V=new c.Dimension(F,r.height-h.top-d.borderHeight-d.verticalPadding),q=V.with(void 0,h.top+h.height-d.borderHeight-d.verticalPadding);return{top:u,left:W,fit:F-l.width,maxSizeTop:V,maxSizeBottom:q,minSize:m.with(Math.min(F,m.width))}}(),w=function(){const F=h.left,W=-d.borderWidth+h.top+h.height,V=new c.Dimension(h.width-d.borderHeight,r.height-h.top-h.height-d.verticalPadding);return{top:W,left:F,fit:V.height-l.height,maxSizeBottom:V,maxSizeTop:V,minSize:m.with(V.width)}}(),S=[b,v,w],D=S.find(F=>F.fit>=0)??S.sort((F,W)=>W.fit-F.fit)[0],I=h.top+h.height-d.borderHeight;let T,M=l.height;const A=Math.max(D.maxSizeTop.height,D.maxSizeBottom.height);M>A&&(M=A);let R;a?M<=D.maxSizeTop.height?(T=!0,R=D.maxSizeTop):(T=!1,R=D.maxSizeBottom):M<=D.maxSizeBottom.height?(T=!1,R=D.maxSizeBottom):(T=!0,R=D.maxSizeTop);let{top:N,left:O}=D;!T&&M>h.height&&(N=I-M);const x=this._editor.getDomNode();if(x){const F=x.getBoundingClientRect();N-=F.top,O-=F.left}this._applyTopLeft({left:O,top:N}),this._resizable.enableSashes(!T,D===b,T,D!==b),this._resizable.minSize=D.minSize,this._resizable.maxSize=R,this._resizable.layout(M,Math.min(R.width,l.width)),this.widget.layout(this._resizable.size.width,this._resizable.size.height)}_applyTopLeft(h){this._topLeft=h,this._editor.layoutOverlayWidget(this)}}e.SuggestDetailsOverlay=o}),define(oe[398],re([1,0,13,45,54,19,22,27,108,38]),function(ae,e,c,k,E,L,y,f,_,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ConfigurationChangeEvent=e.Configuration=e.ConfigurationModelParser=e.ConfigurationModel=void 0;function p(g){return Object.isFrozen(g)?g:E.deepFreeze(g)}class n{static createEmptyModel(h){return new n({},[],[],void 0,h)}constructor(h,l,a,r,d){this._contents=h,this._keys=l,this._overrides=a,this.raw=r,this.logService=d,this.overrideConfigurations=new Map}get rawConfiguration(){if(!this._rawConfiguration)if(this.raw?.length){const h=this.raw.map(l=>{if(l instanceof n)return l;const a=new s("",this.logService);return a.parseRaw(l),a.configurationModel});this._rawConfiguration=h.reduce((l,a)=>a===l?a:l.merge(a),h[0])}else this._rawConfiguration=this;return this._rawConfiguration}get contents(){return this._contents}get overrides(){return this._overrides}get keys(){return this._keys}isEmpty(){return this._keys.length===0&&Object.keys(this._contents).length===0&&this._overrides.length===0}getValue(h){return h?(0,f.getConfigurationValue)(this.contents,h):this.contents}inspect(h,l){const a=this;return{get value(){return p(a.rawConfiguration.getValue(h))},get override(){return l?p(a.rawConfiguration.getOverrideValue(h,l)):void 0},get merged(){return p(l?a.rawConfiguration.override(l).getValue(h):a.rawConfiguration.getValue(h))},get overrides(){const r=[];for(const{contents:d,identifiers:m,keys:u}of a.rawConfiguration.overrides){const b=new n(d,u,[],void 0,a.logService).getValue(h);b!==void 0&&r.push({identifiers:m,value:b})}return r.length?p(r):void 0}}}getOverrideValue(h,l){const a=this.getContentsForOverrideIdentifer(l);return a?h?(0,f.getConfigurationValue)(a,h):a:void 0}override(h){let l=this.overrideConfigurations.get(h);return l||(l=this.createOverrideConfigurationModel(h),this.overrideConfigurations.set(h,l)),l}merge(...h){const l=E.deepClone(this.contents),a=E.deepClone(this.overrides),r=[...this.keys],d=this.raw?.length?[...this.raw]:[this];for(const m of h)if(d.push(...m.raw?.length?m.raw:[m]),!m.isEmpty()){this.mergeContents(l,m.contents);for(const u of m.overrides){const[b]=a.filter(v=>c.equals(v.identifiers,u.identifiers));b?(this.mergeContents(b.contents,u.contents),b.keys.push(...u.keys),b.keys=c.distinct(b.keys)):a.push(E.deepClone(u))}for(const u of m.keys)r.indexOf(u)===-1&&r.push(u)}return new n(l,r,a,d.every(m=>m instanceof n)?void 0:d,this.logService)}createOverrideConfigurationModel(h){const l=this.getContentsForOverrideIdentifer(h);if(!l||typeof l!="object"||!Object.keys(l).length)return this;const a={};for(const r of c.distinct([...Object.keys(this.contents),...Object.keys(l)])){let d=this.contents[r];const m=l[r];m&&(typeof d=="object"&&typeof m=="object"?(d=E.deepClone(d),this.mergeContents(d,m)):d=m),a[r]=d}return new n(a,this.keys,this.overrides,void 0,this.logService)}mergeContents(h,l){for(const a of Object.keys(l)){if(a in h&&L.isObject(h[a])&&L.isObject(l[a])){this.mergeContents(h[a],l[a]);continue}h[a]=E.deepClone(l[a])}}getContentsForOverrideIdentifer(h){let l=null,a=null;const r=d=>{d&&(a?this.mergeContents(a,d):a=E.deepClone(d))};for(const d of this.overrides)d.identifiers.length===1&&d.identifiers[0]===h?l=d.contents:d.identifiers.includes(h)&&r(d.contents);return r(l),a}toJSON(){return{contents:this.contents,overrides:this.overrides,keys:this.keys}}setValue(h,l){this.updateValue(h,l,!1)}removeValue(h){const l=this.keys.indexOf(h);l!==-1&&(this.keys.splice(l,1),(0,f.removeFromValueTree)(this.contents,h),_.OVERRIDE_PROPERTY_REGEX.test(h)&&this.overrides.splice(this.overrides.findIndex(a=>c.equals(a.identifiers,(0,_.overrideIdentifiersFromKey)(h))),1))}updateValue(h,l,a){if((0,f.addToValueTree)(this.contents,h,l,r=>this.logService.error(r)),a=a||this.keys.indexOf(h)===-1,a&&this.keys.push(h),_.OVERRIDE_PROPERTY_REGEX.test(h)){const r=(0,_.overrideIdentifiersFromKey)(h),d={identifiers:r,keys:Object.keys(this.contents[h]),contents:(0,f.toValuesTree)(this.contents[h],u=>this.logService.error(u))},m=this.overrides.findIndex(u=>c.equals(u.identifiers,r));m!==-1?this.overrides[m]=d:this.overrides.push(d)}}}e.ConfigurationModel=n;class s{constructor(h,l){this._name=h,this.logService=l,this._raw=null,this._configurationModel=null,this._restrictedConfigurations=[]}get configurationModel(){return this._configurationModel||n.createEmptyModel(this.logService)}parseRaw(h,l){this._raw=h;const{contents:a,keys:r,overrides:d,restricted:m,hasExcludedProperties:u}=this.doParseRaw(h,l);this._configurationModel=new n(a,r,d,u?[h]:void 0,this.logService),this._restrictedConfigurations=m||[]}doParseRaw(h,l){const a=C.Registry.as(_.Extensions.Configuration).getConfigurationProperties(),r=this.filter(h,a,!0,l);h=r.raw;const d=(0,f.toValuesTree)(h,b=>this.logService.error(`Conflict in settings file ${this._name}: ${b}`)),m=Object.keys(h),u=this.toOverrides(h,b=>this.logService.error(`Conflict in settings file ${this._name}: ${b}`));return{contents:d,keys:m,overrides:u,restricted:r.restricted,hasExcludedProperties:r.hasExcludedProperties}}filter(h,l,a,r){let d=!1;if(!r?.scopes&&!r?.skipRestricted&&!r?.exclude?.length)return{raw:h,restricted:[],hasExcludedProperties:d};const m={},u=[];for(const b in h)if(_.OVERRIDE_PROPERTY_REGEX.test(b)&&a){const v=this.filter(h[b],l,!1,r);m[b]=v.raw,d=d||v.hasExcludedProperties,u.push(...v.restricted)}else{const v=l[b],w=v?typeof v.scope<"u"?v.scope:3:void 0;v?.restricted&&u.push(b),!r.exclude?.includes(b)&&(r.include?.includes(b)||(w===void 0||r.scopes===void 0||r.scopes.includes(w))&&!(r.skipRestricted&&v?.restricted))?m[b]=h[b]:d=!0}return{raw:m,restricted:u,hasExcludedProperties:d}}toOverrides(h,l){const a=[];for(const r of Object.keys(h))if(_.OVERRIDE_PROPERTY_REGEX.test(r)){const d={};for(const m in h[r])d[m]=h[r][m];a.push({identifiers:(0,_.overrideIdentifiersFromKey)(r),keys:Object.keys(d),contents:(0,f.toValuesTree)(d,l)})}return a}}e.ConfigurationModelParser=s;class t{constructor(h,l,a,r,d,m,u,b,v,w,S,D,I){this.key=h,this.overrides=l,this._value=a,this.overrideIdentifiers=r,this.defaultConfiguration=d,this.policyConfiguration=m,this.applicationConfiguration=u,this.userConfiguration=b,this.localUserConfiguration=v,this.remoteUserConfiguration=w,this.workspaceConfiguration=S,this.folderConfigurationModel=D,this.memoryConfigurationModel=I}toInspectValue(h){return h?.value!==void 0||h?.override!==void 0||h?.overrides!==void 0?h:void 0}get userInspectValue(){return this._userInspectValue||(this._userInspectValue=this.userConfiguration.inspect(this.key,this.overrides.overrideIdentifier)),this._userInspectValue}get user(){return this.toInspectValue(this.userInspectValue)}}class i{constructor(h,l,a,r,d,m,u,b,v,w){this._defaultConfiguration=h,this._policyConfiguration=l,this._applicationConfiguration=a,this._localUserConfiguration=r,this._remoteUserConfiguration=d,this._workspaceConfiguration=m,this._folderConfigurations=u,this._memoryConfiguration=b,this._memoryConfigurationByResource=v,this.logService=w,this._workspaceConsolidatedConfiguration=null,this._foldersConsolidatedConfigurations=new k.ResourceMap,this._userConfiguration=null}getValue(h,l,a){return this.getConsolidatedConfigurationModel(h,l,a).getValue(h)}updateValue(h,l,a={}){let r;a.resource?(r=this._memoryConfigurationByResource.get(a.resource),r||(r=n.createEmptyModel(this.logService),this._memoryConfigurationByResource.set(a.resource,r))):r=this._memoryConfiguration,l===void 0?r.removeValue(h):r.setValue(h,l),a.resource||(this._workspaceConsolidatedConfiguration=null)}inspect(h,l,a){const r=this.getConsolidatedConfigurationModel(h,l,a),d=this.getFolderConfigurationModelForResource(l.resource,a),m=l.resource?this._memoryConfigurationByResource.get(l.resource)||this._memoryConfiguration:this._memoryConfiguration,u=new Set;for(const b of r.overrides)for(const v of b.identifiers)r.getOverrideValue(h,v)!==void 0&&u.add(v);return new t(h,l,r.getValue(h),u.size?[...u]:void 0,this._defaultConfiguration,this._policyConfiguration.isEmpty()?void 0:this._policyConfiguration,this.applicationConfiguration.isEmpty()?void 0:this.applicationConfiguration,this.userConfiguration,this.localUserConfiguration,this.remoteUserConfiguration,a?this._workspaceConfiguration:void 0,d||void 0,m)}get applicationConfiguration(){return this._applicationConfiguration}get userConfiguration(){return this._userConfiguration||(this._userConfiguration=this._remoteUserConfiguration.isEmpty()?this._localUserConfiguration:this._localUserConfiguration.merge(this._remoteUserConfiguration)),this._userConfiguration}get localUserConfiguration(){return this._localUserConfiguration}get remoteUserConfiguration(){return this._remoteUserConfiguration}getConsolidatedConfigurationModel(h,l,a){let r=this.getConsolidatedConfigurationModelForResource(l,a);return l.overrideIdentifier&&(r=r.override(l.overrideIdentifier)),!this._policyConfiguration.isEmpty()&&this._policyConfiguration.getValue(h)!==void 0&&(r=r.merge(this._policyConfiguration)),r}getConsolidatedConfigurationModelForResource({resource:h},l){let a=this.getWorkspaceConsolidatedConfiguration();if(l&&h){const r=l.getFolder(h);r&&(a=this.getFolderConsolidatedConfiguration(r.uri)||a);const d=this._memoryConfigurationByResource.get(h);d&&(a=a.merge(d))}return a}getWorkspaceConsolidatedConfiguration(){return this._workspaceConsolidatedConfiguration||(this._workspaceConsolidatedConfiguration=this._defaultConfiguration.merge(this.applicationConfiguration,this.userConfiguration,this._workspaceConfiguration,this._memoryConfiguration)),this._workspaceConsolidatedConfiguration}getFolderConsolidatedConfiguration(h){let l=this._foldersConsolidatedConfigurations.get(h);if(!l){const a=this.getWorkspaceConsolidatedConfiguration(),r=this._folderConfigurations.get(h);r?(l=a.merge(r),this._foldersConsolidatedConfigurations.set(h,l)):l=a}return l}getFolderConfigurationModelForResource(h,l){if(l&&h){const a=l.getFolder(h);if(a)return this._folderConfigurations.get(a.uri)}}toData(){return{defaults:{contents:this._defaultConfiguration.contents,overrides:this._defaultConfiguration.overrides,keys:this._defaultConfiguration.keys},policy:{contents:this._policyConfiguration.contents,overrides:this._policyConfiguration.overrides,keys:this._policyConfiguration.keys},application:{contents:this.applicationConfiguration.contents,overrides:this.applicationConfiguration.overrides,keys:this.applicationConfiguration.keys},user:{contents:this.userConfiguration.contents,overrides:this.userConfiguration.overrides,keys:this.userConfiguration.keys},workspace:{contents:this._workspaceConfiguration.contents,overrides:this._workspaceConfiguration.overrides,keys:this._workspaceConfiguration.keys},folders:[...this._folderConfigurations.keys()].reduce((h,l)=>{const{contents:a,overrides:r,keys:d}=this._folderConfigurations.get(l);return h.push([l,{contents:a,overrides:r,keys:d}]),h},[])}}static parse(h,l){const a=this.parseConfigurationModel(h.defaults,l),r=this.parseConfigurationModel(h.policy,l),d=this.parseConfigurationModel(h.application,l),m=this.parseConfigurationModel(h.user,l),u=this.parseConfigurationModel(h.workspace,l),b=h.folders.reduce((v,w)=>(v.set(y.URI.revive(w[0]),this.parseConfigurationModel(w[1],l)),v),new k.ResourceMap);return new i(a,r,d,m,n.createEmptyModel(l),u,b,n.createEmptyModel(l),new k.ResourceMap,l)}static parseConfigurationModel(h,l){return new n(h.contents,h.keys,h.overrides,void 0,l)}}e.Configuration=i;class o{constructor(h,l,a,r,d){this.change=h,this.previous=l,this.currentConfiguraiton=a,this.currentWorkspace=r,this.logService=d,this._marker=`
|
|
649
|
-
`,this._markerCode1=this._marker.charCodeAt(0),this._markerCode2=46,this.affectedKeys=new Set,this._previousConfiguration=void 0;for(const m of h.keys)this.affectedKeys.add(m);for(const[,m]of h.overrides)for(const u of m)this.affectedKeys.add(u);this._affectsConfigStr=this._marker;for(const m of this.affectedKeys)this._affectsConfigStr+=m+this._marker}get previousConfiguration(){return!this._previousConfiguration&&this.previous&&(this._previousConfiguration=i.parse(this.previous.data,this.logService)),this._previousConfiguration}affectsConfiguration(h,l){const a=this._marker+h,r=this._affectsConfigStr.indexOf(a);if(r<0)return!1;const d=r+a.length;if(d>=this._affectsConfigStr.length)return!1;const m=this._affectsConfigStr.charCodeAt(d);if(m!==this._markerCode1&&m!==this._markerCode2)return!1;if(l){const u=this.previousConfiguration?this.previousConfiguration.getValue(h,l,this.previous?.workspace):void 0,b=this.currentConfiguraiton.getValue(h,l,this.currentWorkspace);return!E.equals(u,b)}return!0}}e.ConfigurationChangeEvent=o}),define(oe[708],re([1,0,2,398,108,38]),function(ae,e,c,k,E,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DefaultConfiguration=void 0;class y extends c.Disposable{get configurationModel(){return this._configurationModel}constructor(_){super(),this.logService=_,this._configurationModel=k.ConfigurationModel.createEmptyModel(this.logService)}reload(){return this.resetConfigurationModel(),this.configurationModel}getConfigurationDefaultOverrides(){return{}}resetConfigurationModel(){this._configurationModel=k.ConfigurationModel.createEmptyModel(this.logService);const _=L.Registry.as(E.Extensions.Configuration).getConfigurationProperties();this.updateConfigurationModel(Object.keys(_),_)}updateConfigurationModel(_,C){const p=this.getConfigurationDefaultOverrides();for(const n of _){const s=p[n],t=C[n];s!==void 0?this._configurationModel.setValue(n,s):t?this._configurationModel.setValue(n,t.default):this._configurationModel.removeValue(n)}}}e.DefaultConfiguration=y}),define(oe[120],re([1,0,139,16,24,38,2,73]),function(ae,e,c,k,E,L,y,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Extensions=e.KeybindingsRegistry=void 0;class _{constructor(){this._coreKeybindings=new f.LinkedList,this._extensionKeybindings=[],this._cachedMergedKeybindings=null}static bindToCurrentPlatform(n){if(k.OS===1){if(n&&n.win)return n.win}else if(k.OS===2){if(n&&n.mac)return n.mac}else if(n&&n.linux)return n.linux;return n}registerKeybindingRule(n){const s=_.bindToCurrentPlatform(n),t=new y.DisposableStore;if(s&&s.primary){const i=(0,c.decodeKeybinding)(s.primary,k.OS);i&&t.add(this._registerDefaultKeybinding(i,n.id,n.args,n.weight,0,n.when))}if(s&&Array.isArray(s.secondary))for(let i=0,o=s.secondary.length;i<o;i++){const g=s.secondary[i],h=(0,c.decodeKeybinding)(g,k.OS);h&&t.add(this._registerDefaultKeybinding(h,n.id,n.args,n.weight,-i-1,n.when))}return t}registerCommandAndKeybindingRule(n){return(0,y.combinedDisposable)(this.registerKeybindingRule(n),E.CommandsRegistry.registerCommand(n))}_registerDefaultKeybinding(n,s,t,i,o,g){const h=this._coreKeybindings.push({keybinding:n,command:s,commandArgs:t,when:g,weight1:i,weight2:o,extensionId:null,isBuiltinExtension:!1});return this._cachedMergedKeybindings=null,(0,y.toDisposable)(()=>{h(),this._cachedMergedKeybindings=null})}getDefaultKeybindings(){return this._cachedMergedKeybindings||(this._cachedMergedKeybindings=Array.from(this._coreKeybindings).concat(this._extensionKeybindings),this._cachedMergedKeybindings.sort(C)),this._cachedMergedKeybindings.slice(0)}}e.KeybindingsRegistry=new _,e.Extensions={EditorModes:"platform.keybindingsRegistry"},L.Registry.add(e.Extensions.EditorModes,e.KeybindingsRegistry);function C(p,n){if(p.weight1!==n.weight1)return p.weight1-n.weight1;if(p.command&&n.command){if(p.command<n.command)return-1;if(p.command>n.command)return 1}return p.weight2-n.weight2}}),define(oe[29],re([1,0,41,30,6,2,73,24,12,7,120]),function(ae,e,c,k,E,L,y,f,_,C,p){"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.Action2=e.MenuItemAction=e.SubmenuItemAction=e.MenuRegistry=e.IMenuService=e.MenuId=void 0,e.isIMenuItem=s,e.isISubmenuItem=t,e.registerAction2=a;function s(r){return r.command!==void 0}function t(r){return r.submenu!==void 0}class i{static{this._instances=new Map}static{this.CommandPalette=new i("CommandPalette")}static{this.DebugBreakpointsContext=new i("DebugBreakpointsContext")}static{this.DebugCallStackContext=new i("DebugCallStackContext")}static{this.DebugConsoleContext=new i("DebugConsoleContext")}static{this.DebugVariablesContext=new i("DebugVariablesContext")}static{this.NotebookVariablesContext=new i("NotebookVariablesContext")}static{this.DebugHoverContext=new i("DebugHoverContext")}static{this.DebugWatchContext=new i("DebugWatchContext")}static{this.DebugToolBar=new i("DebugToolBar")}static{this.DebugToolBarStop=new i("DebugToolBarStop")}static{this.DebugCallStackToolbar=new i("DebugCallStackToolbar")}static{this.EditorContext=new i("EditorContext")}static{this.SimpleEditorContext=new i("SimpleEditorContext")}static{this.EditorContent=new i("EditorContent")}static{this.EditorLineNumberContext=new i("EditorLineNumberContext")}static{this.EditorContextCopy=new i("EditorContextCopy")}static{this.EditorContextPeek=new i("EditorContextPeek")}static{this.EditorContextShare=new i("EditorContextShare")}static{this.EditorTitle=new i("EditorTitle")}static{this.EditorTitleRun=new i("EditorTitleRun")}static{this.EditorTitleContext=new i("EditorTitleContext")}static{this.EditorTitleContextShare=new i("EditorTitleContextShare")}static{this.EmptyEditorGroup=new i("EmptyEditorGroup")}static{this.EmptyEditorGroupContext=new i("EmptyEditorGroupContext")}static{this.EditorTabsBarContext=new i("EditorTabsBarContext")}static{this.EditorTabsBarShowTabsSubmenu=new i("EditorTabsBarShowTabsSubmenu")}static{this.EditorTabsBarShowTabsZenModeSubmenu=new i("EditorTabsBarShowTabsZenModeSubmenu")}static{this.EditorActionsPositionSubmenu=new i("EditorActionsPositionSubmenu")}static{this.ExplorerContext=new i("ExplorerContext")}static{this.ExplorerContextShare=new i("ExplorerContextShare")}static{this.ExtensionContext=new i("ExtensionContext")}static{this.GlobalActivity=new i("GlobalActivity")}static{this.CommandCenter=new i("CommandCenter")}static{this.CommandCenterCenter=new i("CommandCenterCenter")}static{this.LayoutControlMenuSubmenu=new i("LayoutControlMenuSubmenu")}static{this.LayoutControlMenu=new i("LayoutControlMenu")}static{this.MenubarMainMenu=new i("MenubarMainMenu")}static{this.MenubarAppearanceMenu=new i("MenubarAppearanceMenu")}static{this.MenubarDebugMenu=new i("MenubarDebugMenu")}static{this.MenubarEditMenu=new i("MenubarEditMenu")}static{this.MenubarCopy=new i("MenubarCopy")}static{this.MenubarFileMenu=new i("MenubarFileMenu")}static{this.MenubarGoMenu=new i("MenubarGoMenu")}static{this.MenubarHelpMenu=new i("MenubarHelpMenu")}static{this.MenubarLayoutMenu=new i("MenubarLayoutMenu")}static{this.MenubarNewBreakpointMenu=new i("MenubarNewBreakpointMenu")}static{this.PanelAlignmentMenu=new i("PanelAlignmentMenu")}static{this.PanelPositionMenu=new i("PanelPositionMenu")}static{this.ActivityBarPositionMenu=new i("ActivityBarPositionMenu")}static{this.MenubarPreferencesMenu=new i("MenubarPreferencesMenu")}static{this.MenubarRecentMenu=new i("MenubarRecentMenu")}static{this.MenubarSelectionMenu=new i("MenubarSelectionMenu")}static{this.MenubarShare=new i("MenubarShare")}static{this.MenubarSwitchEditorMenu=new i("MenubarSwitchEditorMenu")}static{this.MenubarSwitchGroupMenu=new i("MenubarSwitchGroupMenu")}static{this.MenubarTerminalMenu=new i("MenubarTerminalMenu")}static{this.MenubarViewMenu=new i("MenubarViewMenu")}static{this.MenubarHomeMenu=new i("MenubarHomeMenu")}static{this.OpenEditorsContext=new i("OpenEditorsContext")}static{this.OpenEditorsContextShare=new i("OpenEditorsContextShare")}static{this.ProblemsPanelContext=new i("ProblemsPanelContext")}static{this.SCMInputBox=new i("SCMInputBox")}static{this.SCMChangesSeparator=new i("SCMChangesSeparator")}static{this.SCMChangesContext=new i("SCMChangesContext")}static{this.SCMIncomingChanges=new i("SCMIncomingChanges")}static{this.SCMIncomingChangesContext=new i("SCMIncomingChangesContext")}static{this.SCMIncomingChangesSetting=new i("SCMIncomingChangesSetting")}static{this.SCMOutgoingChanges=new i("SCMOutgoingChanges")}static{this.SCMOutgoingChangesContext=new i("SCMOutgoingChangesContext")}static{this.SCMOutgoingChangesSetting=new i("SCMOutgoingChangesSetting")}static{this.SCMIncomingChangesAllChangesContext=new i("SCMIncomingChangesAllChangesContext")}static{this.SCMIncomingChangesHistoryItemContext=new i("SCMIncomingChangesHistoryItemContext")}static{this.SCMOutgoingChangesAllChangesContext=new i("SCMOutgoingChangesAllChangesContext")}static{this.SCMOutgoingChangesHistoryItemContext=new i("SCMOutgoingChangesHistoryItemContext")}static{this.SCMChangeContext=new i("SCMChangeContext")}static{this.SCMResourceContext=new i("SCMResourceContext")}static{this.SCMResourceContextShare=new i("SCMResourceContextShare")}static{this.SCMResourceFolderContext=new i("SCMResourceFolderContext")}static{this.SCMResourceGroupContext=new i("SCMResourceGroupContext")}static{this.SCMSourceControl=new i("SCMSourceControl")}static{this.SCMSourceControlInline=new i("SCMSourceControlInline")}static{this.SCMSourceControlTitle=new i("SCMSourceControlTitle")}static{this.SCMTitle=new i("SCMTitle")}static{this.SearchContext=new i("SearchContext")}static{this.SearchActionMenu=new i("SearchActionContext")}static{this.StatusBarWindowIndicatorMenu=new i("StatusBarWindowIndicatorMenu")}static{this.StatusBarRemoteIndicatorMenu=new i("StatusBarRemoteIndicatorMenu")}static{this.StickyScrollContext=new i("StickyScrollContext")}static{this.TestItem=new i("TestItem")}static{this.TestItemGutter=new i("TestItemGutter")}static{this.TestProfilesContext=new i("TestProfilesContext")}static{this.TestMessageContext=new i("TestMessageContext")}static{this.TestMessageContent=new i("TestMessageContent")}static{this.TestPeekElement=new i("TestPeekElement")}static{this.TestPeekTitle=new i("TestPeekTitle")}static{this.TestCallStack=new i("TestCallStack")}static{this.TouchBarContext=new i("TouchBarContext")}static{this.TitleBarContext=new i("TitleBarContext")}static{this.TitleBarTitleContext=new i("TitleBarTitleContext")}static{this.TunnelContext=new i("TunnelContext")}static{this.TunnelPrivacy=new i("TunnelPrivacy")}static{this.TunnelProtocol=new i("TunnelProtocol")}static{this.TunnelPortInline=new i("TunnelInline")}static{this.TunnelTitle=new i("TunnelTitle")}static{this.TunnelLocalAddressInline=new i("TunnelLocalAddressInline")}static{this.TunnelOriginInline=new i("TunnelOriginInline")}static{this.ViewItemContext=new i("ViewItemContext")}static{this.ViewContainerTitle=new i("ViewContainerTitle")}static{this.ViewContainerTitleContext=new i("ViewContainerTitleContext")}static{this.ViewTitle=new i("ViewTitle")}static{this.ViewTitleContext=new i("ViewTitleContext")}static{this.CommentEditorActions=new i("CommentEditorActions")}static{this.CommentThreadTitle=new i("CommentThreadTitle")}static{this.CommentThreadActions=new i("CommentThreadActions")}static{this.CommentThreadAdditionalActions=new i("CommentThreadAdditionalActions")}static{this.CommentThreadTitleContext=new i("CommentThreadTitleContext")}static{this.CommentThreadCommentContext=new i("CommentThreadCommentContext")}static{this.CommentTitle=new i("CommentTitle")}static{this.CommentActions=new i("CommentActions")}static{this.CommentsViewThreadActions=new i("CommentsViewThreadActions")}static{this.InteractiveToolbar=new i("InteractiveToolbar")}static{this.InteractiveCellTitle=new i("InteractiveCellTitle")}static{this.InteractiveCellDelete=new i("InteractiveCellDelete")}static{this.InteractiveCellExecute=new i("InteractiveCellExecute")}static{this.InteractiveInputExecute=new i("InteractiveInputExecute")}static{this.InteractiveInputConfig=new i("InteractiveInputConfig")}static{this.ReplInputExecute=new i("ReplInputExecute")}static{this.IssueReporter=new i("IssueReporter")}static{this.NotebookToolbar=new i("NotebookToolbar")}static{this.NotebookStickyScrollContext=new i("NotebookStickyScrollContext")}static{this.NotebookCellTitle=new i("NotebookCellTitle")}static{this.NotebookCellDelete=new i("NotebookCellDelete")}static{this.NotebookCellInsert=new i("NotebookCellInsert")}static{this.NotebookCellBetween=new i("NotebookCellBetween")}static{this.NotebookCellListTop=new i("NotebookCellTop")}static{this.NotebookCellExecute=new i("NotebookCellExecute")}static{this.NotebookCellExecuteGoTo=new i("NotebookCellExecuteGoTo")}static{this.NotebookCellExecutePrimary=new i("NotebookCellExecutePrimary")}static{this.NotebookDiffCellInputTitle=new i("NotebookDiffCellInputTitle")}static{this.NotebookDiffCellMetadataTitle=new i("NotebookDiffCellMetadataTitle")}static{this.NotebookDiffCellOutputsTitle=new i("NotebookDiffCellOutputsTitle")}static{this.NotebookOutputToolbar=new i("NotebookOutputToolbar")}static{this.NotebookOutlineFilter=new i("NotebookOutlineFilter")}static{this.NotebookOutlineActionMenu=new i("NotebookOutlineActionMenu")}static{this.NotebookEditorLayoutConfigure=new i("NotebookEditorLayoutConfigure")}static{this.NotebookKernelSource=new i("NotebookKernelSource")}static{this.BulkEditTitle=new i("BulkEditTitle")}static{this.BulkEditContext=new i("BulkEditContext")}static{this.TimelineItemContext=new i("TimelineItemContext")}static{this.TimelineTitle=new i("TimelineTitle")}static{this.TimelineTitleContext=new i("TimelineTitleContext")}static{this.TimelineFilterSubMenu=new i("TimelineFilterSubMenu")}static{this.AccountsContext=new i("AccountsContext")}static{this.SidebarTitle=new i("SidebarTitle")}static{this.PanelTitle=new i("PanelTitle")}static{this.AuxiliaryBarTitle=new i("AuxiliaryBarTitle")}static{this.AuxiliaryBarHeader=new i("AuxiliaryBarHeader")}static{this.TerminalInstanceContext=new i("TerminalInstanceContext")}static{this.TerminalEditorInstanceContext=new i("TerminalEditorInstanceContext")}static{this.TerminalNewDropdownContext=new i("TerminalNewDropdownContext")}static{this.TerminalTabContext=new i("TerminalTabContext")}static{this.TerminalTabEmptyAreaContext=new i("TerminalTabEmptyAreaContext")}static{this.TerminalStickyScrollContext=new i("TerminalStickyScrollContext")}static{this.WebviewContext=new i("WebviewContext")}static{this.InlineCompletionsActions=new i("InlineCompletionsActions")}static{this.InlineEditsActions=new i("InlineEditsActions")}static{this.InlineEditActions=new i("InlineEditActions")}static{this.NewFile=new i("NewFile")}static{this.MergeInput1Toolbar=new i("MergeToolbar1Toolbar")}static{this.MergeInput2Toolbar=new i("MergeToolbar2Toolbar")}static{this.MergeBaseToolbar=new i("MergeBaseToolbar")}static{this.MergeInputResultToolbar=new i("MergeToolbarResultToolbar")}static{this.InlineSuggestionToolbar=new i("InlineSuggestionToolbar")}static{this.InlineEditToolbar=new i("InlineEditToolbar")}static{this.ChatContext=new i("ChatContext")}static{this.ChatCodeBlock=new i("ChatCodeblock")}static{this.ChatCompareBlock=new i("ChatCompareBlock")}static{this.ChatMessageTitle=new i("ChatMessageTitle")}static{this.ChatExecute=new i("ChatExecute")}static{this.ChatExecuteSecondary=new i("ChatExecuteSecondary")}static{this.ChatInputSide=new i("ChatInputSide")}static{this.AccessibleView=new i("AccessibleView")}static{this.MultiDiffEditorFileToolbar=new i("MultiDiffEditorFileToolbar")}static{this.DiffEditorHunkToolbar=new i("DiffEditorHunkToolbar")}static{this.DiffEditorSelectionToolbar=new i("DiffEditorSelectionToolbar")}constructor(d){if(i._instances.has(d))throw new TypeError(`MenuId with identifier '${d}' already exists. Use MenuId.for(ident) or a unique identifier`);i._instances.set(d,this),this.id=d}}e.MenuId=i,e.IMenuService=(0,C.createDecorator)("menuService");class o{static{this._all=new Map}static for(d){let m=this._all.get(d);return m||(m=new o(d),this._all.set(d,m)),m}static merge(d){const m=new Set;for(const u of d)u instanceof o&&m.add(u.id);return m}constructor(d){this.id=d,this.has=m=>m===d}}e.MenuRegistry=new class{constructor(){this._commands=new Map,this._menuItems=new Map,this._onDidChangeMenu=new E.MicrotaskEmitter({merge:o.merge}),this.onDidChangeMenu=this._onDidChangeMenu.event}addCommand(r){return this._commands.set(r.id,r),this._onDidChangeMenu.fire(o.for(i.CommandPalette)),(0,L.toDisposable)(()=>{this._commands.delete(r.id)&&this._onDidChangeMenu.fire(o.for(i.CommandPalette))})}getCommand(r){return this._commands.get(r)}getCommands(){const r=new Map;return this._commands.forEach((d,m)=>r.set(m,d)),r}appendMenuItem(r,d){let m=this._menuItems.get(r);m||(m=new y.LinkedList,this._menuItems.set(r,m));const u=m.push(d);return this._onDidChangeMenu.fire(o.for(r)),(0,L.toDisposable)(()=>{u(),this._onDidChangeMenu.fire(o.for(r))})}appendMenuItems(r){const d=new L.DisposableStore;for(const{id:m,item:u}of r)d.add(this.appendMenuItem(m,u));return d}getMenuItems(r){let d;return this._menuItems.has(r)?d=[...this._menuItems.get(r)]:d=[],r===i.CommandPalette&&this._appendImplicitItems(d),d}_appendImplicitItems(r){const d=new Set;for(const m of r)s(m)&&(d.add(m.command.id),m.alt&&d.add(m.alt.id));this._commands.forEach((m,u)=>{d.has(u)||r.push({command:m})})}};class g extends c.SubmenuAction{constructor(d,m,u){super(`submenuitem.${d.submenu.id}`,typeof d.title=="string"?d.title:d.title.value,u,"submenu"),this.item=d,this.hideActions=m}}e.SubmenuItemAction=g;let h=n=class{static label(d,m){return m?.renderShortTitle&&d.shortTitle?typeof d.shortTitle=="string"?d.shortTitle:d.shortTitle.value:typeof d.title=="string"?d.title:d.title.value}constructor(d,m,u,b,v,w,S){this.hideActions=b,this.menuKeybinding=v,this._commandService=S,this.id=d.id,this.label=n.label(d,u),this.tooltip=(typeof d.tooltip=="string"?d.tooltip:d.tooltip?.value)??"",this.enabled=!d.precondition||w.contextMatchesRules(d.precondition),this.checked=void 0;let D;if(d.toggled){const I=d.toggled.condition?d.toggled:{condition:d.toggled};this.checked=w.contextMatchesRules(I.condition),this.checked&&I.tooltip&&(this.tooltip=typeof I.tooltip=="string"?I.tooltip:I.tooltip.value),this.checked&&k.ThemeIcon.isThemeIcon(I.icon)&&(D=I.icon),this.checked&&I.title&&(this.label=typeof I.title=="string"?I.title:I.title.value)}D||(D=k.ThemeIcon.isThemeIcon(d.icon)?d.icon:void 0),this.item=d,this.alt=m?new n(m,void 0,u,b,void 0,w,S):void 0,this._options=u,this.class=D&&k.ThemeIcon.asClassName(D)}run(...d){let m=[];return this._options?.arg&&(m=[...m,this._options.arg]),this._options?.shouldForwardArgs&&(m=[...m,...d]),this._commandService.executeCommand(this.id,...m)}};e.MenuItemAction=h,e.MenuItemAction=h=n=De([he(5,_.IContextKeyService),he(6,f.ICommandService)],h);class l{constructor(d){this.desc=d}}e.Action2=l;function a(r){const d=[],m=new r,{f1:u,menu:b,keybinding:v,...w}=m.desc;if(f.CommandsRegistry.getCommand(w.id))throw new Error(`Cannot register two commands with the same id: ${w.id}`);if(d.push(f.CommandsRegistry.registerCommand({id:w.id,handler:(S,...D)=>m.run(S,...D),metadata:w.metadata})),Array.isArray(b))for(const S of b)d.push(e.MenuRegistry.appendMenuItem(S.id,{command:{...w,precondition:S.precondition===null?void 0:w.precondition},...S}));else b&&d.push(e.MenuRegistry.appendMenuItem(b.id,{command:{...w,precondition:b.precondition===null?void 0:w.precondition},...b}));if(u&&(d.push(e.MenuRegistry.appendMenuItem(i.CommandPalette,{command:w,when:w.precondition})),d.push(e.MenuRegistry.addCommand(w))),Array.isArray(v))for(const S of v)d.push(p.KeybindingsRegistry.registerKeybindingRule({...S,id:w.id,when:w.precondition?_.ContextKeyExpr.and(w.precondition,S.when):S.when}));else v&&d.push(p.KeybindingsRegistry.registerKeybindingRule({...v,id:w.id,when:w.precondition?_.ContextKeyExpr.and(w.precondition,v.when):v.when}));return{dispose(){(0,L.dispose)(d)}}}}),define(oe[709],re([1,0,48,239,3,29]),function(ae,e,c,k,E,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ToggleTabFocusModeAction=void 0;class y extends L.Action2{static{this.ID="editor.action.toggleTabFocusMode"}constructor(){super({id:y.ID,title:E.localize2(322,"Toggle Tab Key Moves Focus"),precondition:void 0,keybinding:{primary:2091,mac:{primary:1323},weight:100},metadata:{description:E.localize2(323,"Determines whether the tab key moves focus around the workbench or inserts the tab character in the current editor. This is also called tab trapping, tab navigation, or tab focus mode.")},f1:!0})}run(){const C=!k.TabFocus.getTabFocusMode();k.TabFocus.setTabFocusMode(C),C?(0,c.alert)(E.localize(320,"Pressing Tab will now move focus to the next focusable element")):(0,c.alert)(E.localize(321,"Pressing Tab will now insert the tab character"))}}e.ToggleTabFocusModeAction=y,(0,L.registerAction2)(y)}),define(oe[399],re([1,0,259,652,12,120,3,2,5]),function(ae,e,c,k,E,L,y,f,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ContextScopedReplaceInput=e.ContextScopedFindInput=e.historyNavigationVisible=void 0,e.registerAndCreateHistoryNavigationContext=i,e.historyNavigationVisible=new E.RawContextKey("suggestWidgetVisible",!1,(0,y.localize)(1128,"Whether suggestion are visible"));const C="historyNavigationWidgetFocus",p="historyNavigationForwardsEnabled",n="historyNavigationBackwardsEnabled";let s;const t=[];function i(h,l){if(t.includes(l))throw new Error("Cannot register the same widget multiple times");t.push(l);const a=new f.DisposableStore,r=new E.RawContextKey(C,!1).bindTo(h),d=new E.RawContextKey(p,!0).bindTo(h),m=new E.RawContextKey(n,!0).bindTo(h),u=()=>{r.set(!0),s=l},b=()=>{r.set(!1),s===l&&(s=void 0)};return(0,_.isActiveElement)(l.element)&&u(),a.add(l.onDidFocus(()=>u())),a.add(l.onDidBlur(()=>b())),a.add((0,f.toDisposable)(()=>{t.splice(t.indexOf(l),1),b()})),{historyNavigationForwardsEnablement:d,historyNavigationBackwardsEnablement:m,dispose(){a.dispose()}}}let o=class extends c.FindInput{constructor(l,a,r,d){super(l,a,r);const m=this._register(d.createScoped(this.inputBox.element));this._register(i(m,this.inputBox))}};e.ContextScopedFindInput=o,e.ContextScopedFindInput=o=De([he(3,E.IContextKeyService)],o);let g=class extends k.ReplaceInput{constructor(l,a,r,d,m=!1){super(l,a,m,r);const u=this._register(d.createScoped(this.inputBox.element));this._register(i(u,this.inputBox))}};e.ContextScopedReplaceInput=g,e.ContextScopedReplaceInput=g=De([he(3,E.IContextKeyService)],g),L.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"history.showPrevious",weight:200,when:E.ContextKeyExpr.and(E.ContextKeyExpr.has(C),E.ContextKeyExpr.equals(n,!0),E.ContextKeyExpr.not("isComposing"),e.historyNavigationVisible.isEqualTo(!1)),primary:16,secondary:[528],handler:h=>{s?.showPreviousValue()}}),L.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"history.showNext",weight:200,when:E.ContextKeyExpr.and(E.ContextKeyExpr.has(C),E.ContextKeyExpr.equals(p,!0),E.ContextKeyExpr.not("isComposing"),e.historyNavigationVisible.isEqualTo(!1)),primary:18,secondary:[530],handler:h=>{s?.showNextValue()}})}),define(oe[153],re([1,0,18,8,82,2,59,19,22,9,4,78,134,3,29,24,12,17,399]),function(ae,e,c,k,E,L,y,f,_,C,p,n,s,t,i,o,g,h,l){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.QuickSuggestionsOptions=e.CompletionItemModel=e.CompletionOptions=e.CompletionItem=e.suggestWidgetStatusbarMenu=e.Context=void 0,e.getSnippetSuggestSupport=m,e.provideSuggestionItems=b,e.getSuggestionComparator=I,e.showSimpleSuggestions=T,e.Context={Visible:l.historyNavigationVisible,HasFocusedSuggestion:new g.RawContextKey("suggestWidgetHasFocusedSuggestion",!1,(0,t.localize)(387,"Whether any suggestion is focused")),DetailsVisible:new g.RawContextKey("suggestWidgetDetailsVisible",!1,(0,t.localize)(388,"Whether suggestion details are visible")),MultipleSuggestions:new g.RawContextKey("suggestWidgetMultipleSuggestions",!1,(0,t.localize)(389,"Whether there are multiple suggestions to pick from")),MakesTextEdit:new g.RawContextKey("suggestionMakesTextEdit",!0,(0,t.localize)(390,"Whether inserting the current suggestion yields in a change or has everything already been typed")),AcceptSuggestionsOnEnter:new g.RawContextKey("acceptSuggestionOnEnter",!0,(0,t.localize)(391,"Whether suggestions are inserted when pressing Enter")),HasInsertAndReplaceRange:new g.RawContextKey("suggestionHasInsertAndReplaceRange",!1,(0,t.localize)(392,"Whether the current suggestion has insert and replace behaviour")),InsertMode:new g.RawContextKey("suggestionInsertMode",void 0,{type:"string",description:(0,t.localize)(393,"Whether the default behaviour is to insert or replace")}),CanResolve:new g.RawContextKey("suggestionCanResolve",!1,(0,t.localize)(394,"Whether the current suggestion supports to resolve further details"))},e.suggestWidgetStatusbarMenu=new i.MenuId("suggestWidgetStatusBar");class a{constructor(R,N,O,x){this.position=R,this.completion=N,this.container=O,this.provider=x,this.isInvalid=!1,this.score=E.FuzzyScore.Default,this.distance=0,this.textLabel=typeof N.label=="string"?N.label:N.label?.label,this.labelLow=this.textLabel.toLowerCase(),this.isInvalid=!this.textLabel,this.sortTextLow=N.sortText&&N.sortText.toLowerCase(),this.filterTextLow=N.filterText&&N.filterText.toLowerCase(),this.extensionId=N.extensionId,p.Range.isIRange(N.range)?(this.editStart=new C.Position(N.range.startLineNumber,N.range.startColumn),this.editInsertEnd=new C.Position(N.range.endLineNumber,N.range.endColumn),this.editReplaceEnd=new C.Position(N.range.endLineNumber,N.range.endColumn),this.isInvalid=this.isInvalid||p.Range.spansMultipleLines(N.range)||N.range.startLineNumber!==R.lineNumber):(this.editStart=new C.Position(N.range.insert.startLineNumber,N.range.insert.startColumn),this.editInsertEnd=new C.Position(N.range.insert.endLineNumber,N.range.insert.endColumn),this.editReplaceEnd=new C.Position(N.range.replace.endLineNumber,N.range.replace.endColumn),this.isInvalid=this.isInvalid||p.Range.spansMultipleLines(N.range.insert)||p.Range.spansMultipleLines(N.range.replace)||N.range.insert.startLineNumber!==R.lineNumber||N.range.replace.startLineNumber!==R.lineNumber||N.range.insert.startColumn!==N.range.replace.startColumn),typeof x.resolveCompletionItem!="function"&&(this._resolveCache=Promise.resolve(),this._resolveDuration=0)}get isResolved(){return this._resolveDuration!==void 0}get resolveDuration(){return this._resolveDuration!==void 0?this._resolveDuration:-1}async resolve(R){if(!this._resolveCache){const N=R.onCancellationRequested(()=>{this._resolveCache=void 0,this._resolveDuration=void 0}),O=new y.StopWatch(!0);this._resolveCache=Promise.resolve(this.provider.resolveCompletionItem(this.completion,R)).then(x=>{Object.assign(this.completion,x),this._resolveDuration=O.elapsed()},x=>{(0,k.isCancellationError)(x)&&(this._resolveCache=void 0,this._resolveDuration=void 0)}).finally(()=>{N.dispose()})}return this._resolveCache}}e.CompletionItem=a;class r{static{this.default=new r}constructor(R=2,N=new Set,O=new Set,x=new Map,F=!0){this.snippetSortOrder=R,this.kindFilter=N,this.providerFilter=O,this.providerItemsToReuse=x,this.showDeprecated=F}}e.CompletionOptions=r;let d;function m(){return d}class u{constructor(R,N,O,x){this.items=R,this.needsClipboard=N,this.durations=O,this.disposable=x}}e.CompletionItemModel=u;async function b(A,R,N,O=r.default,x={triggerKind:0},F=c.CancellationToken.None){const W=new y.StopWatch;N=N.clone();const V=R.getWordAtPosition(N),q=V?new p.Range(N.lineNumber,V.startColumn,N.lineNumber,V.endColumn):p.Range.fromPositions(N),H={replace:q,insert:q.setEndPosition(N.lineNumber,N.column)},K=[],G=new L.DisposableStore,Y=[];let X=!1;const Z=(P,te,se)=>{let ue=!1;if(!te)return ue;for(const ge of te.suggestions)if(!O.kindFilter.has(ge.kind)){if(!O.showDeprecated&&ge?.tags?.includes(1))continue;ge.range||(ge.range=H),ge.sortText||(ge.sortText=typeof ge.label=="string"?ge.label:ge.label.label),!X&&ge.insertTextRules&&ge.insertTextRules&4&&(X=s.SnippetParser.guessNeedsClipboard(ge.insertText)),K.push(new a(N,ge,te,P)),ue=!0}return(0,L.isDisposable)(te)&&G.add(te),Y.push({providerName:P._debugDisplayName??"unknown_provider",elapsedProvider:te.duration??-1,elapsedOverall:se.elapsed()}),ue},j=(async()=>{if(!d||O.kindFilter.has(27))return;const P=O.providerItemsToReuse.get(d);if(P){P.forEach(ue=>K.push(ue));return}if(O.providerFilter.size>0&&!O.providerFilter.has(d))return;const te=new y.StopWatch,se=await d.provideCompletionItems(R,N,x,F);Z(d,se,te)})();for(const P of A.orderedGroups(R)){let te=!1;if(await Promise.all(P.map(async se=>{if(O.providerItemsToReuse.has(se)){const ue=O.providerItemsToReuse.get(se);ue.forEach(ge=>K.push(ge)),te=te||ue.length>0;return}if(!(O.providerFilter.size>0&&!O.providerFilter.has(se)))try{const ue=new y.StopWatch,ge=await se.provideCompletionItems(R,N,x,F);te=Z(se,ge,ue)||te}catch(ue){(0,k.onUnexpectedExternalError)(ue)}})),te||F.isCancellationRequested)break}return await j,F.isCancellationRequested?(G.dispose(),Promise.reject(new k.CancellationError)):new u(K.sort(I(O.snippetSortOrder)),X,{entries:Y,elapsed:W.elapsed()},G)}function v(A,R){if(A.sortTextLow&&R.sortTextLow){if(A.sortTextLow<R.sortTextLow)return-1;if(A.sortTextLow>R.sortTextLow)return 1}return A.textLabel<R.textLabel?-1:A.textLabel>R.textLabel?1:A.completion.kind-R.completion.kind}function w(A,R){if(A.completion.kind!==R.completion.kind){if(A.completion.kind===27)return-1;if(R.completion.kind===27)return 1}return v(A,R)}function S(A,R){if(A.completion.kind!==R.completion.kind){if(A.completion.kind===27)return 1;if(R.completion.kind===27)return-1}return v(A,R)}const D=new Map;D.set(0,w),D.set(2,S),D.set(1,v);function I(A){return D.get(A)}o.CommandsRegistry.registerCommand("_executeCompletionItemProvider",async(A,...R)=>{const[N,O,x,F]=R;(0,f.assertType)(_.URI.isUri(N)),(0,f.assertType)(C.Position.isIPosition(O)),(0,f.assertType)(typeof x=="string"||!x),(0,f.assertType)(typeof F=="number"||!F);const{completionProvider:W}=A.get(h.ILanguageFeaturesService),V=await A.get(n.ITextModelService).createModelReference(N);try{const q={incomplete:!1,suggestions:[]},H=[],K=V.object.textEditorModel.validatePosition(O),G=await b(W,V.object.textEditorModel,K,void 0,{triggerCharacter:x??void 0,triggerKind:x?1:0});for(const Y of G.items)H.length<(F??0)&&H.push(Y.resolve(c.CancellationToken.None)),q.incomplete=q.incomplete||Y.container.incomplete,q.suggestions.push(Y.completion);try{return await Promise.all(H),q}finally{setTimeout(()=>G.disposable.dispose(),100)}}finally{V.dispose()}});function T(A,R){A.getContribution("editor.contrib.suggestController")?.triggerSuggest(new Set().add(R),void 0,!0)}class M{static isAllOff(R){return R.other==="off"&&R.comments==="off"&&R.strings==="off"}static isAllOn(R){return R.other==="on"&&R.comments==="on"&&R.strings==="on"}static valueFor(R,N){switch(N){case 1:return R.comments;case 2:return R.strings;default:return R.other}}}e.QuickSuggestionsOptions=M}),define(oe[710],re([1,0,16,3,12,178,120,270,63]),function(ae,e,c,k,E,L,y,f,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const C={weight:200,when:E.ContextKeyExpr.and(E.ContextKeyExpr.equals(f.quickInputTypeContextKeyValue,"quickPick"),f.inQuickInputContext),metadata:{description:(0,k.localize)(1076,"Used while in the context of the quick pick. If you change one keybinding for this command, you should change all of the other keybindings (modifier variants) of this command as well.")}};function p(g,h={}){y.KeybindingsRegistry.registerCommandAndKeybindingRule({...C,...g,secondary:s(g.primary,g.secondary??[],h)})}const n=c.isMacintosh?256:2048;function s(g,h,l={}){return l.withAltMod&&h.push(512+g),l.withCtrlMod&&(h.push(n+g),l.withAltMod&&h.push(512+n+g)),l.withCmdMod&&c.isMacintosh&&(h.push(2048+g),l.withCtrlMod&&h.push(2304+g),l.withAltMod&&(h.push(2560+g),l.withCtrlMod&&h.push(2816+g))),h}function t(g,h){return l=>{const a=l.get(_.IQuickInputService).currentQuickInput;if(a)return h&&a.quickNavigate?a.focus(h):a.focus(g)}}p({id:"quickInput.pageNext",primary:12,handler:t(_.QuickPickFocus.NextPage)},{withAltMod:!0,withCtrlMod:!0,withCmdMod:!0}),p({id:"quickInput.pagePrevious",primary:11,handler:t(_.QuickPickFocus.PreviousPage)},{withAltMod:!0,withCtrlMod:!0,withCmdMod:!0}),p({id:"quickInput.first",primary:n+14,handler:t(_.QuickPickFocus.First)},{withAltMod:!0,withCmdMod:!0}),p({id:"quickInput.last",primary:n+13,handler:t(_.QuickPickFocus.Last)},{withAltMod:!0,withCmdMod:!0}),p({id:"quickInput.next",primary:18,handler:t(_.QuickPickFocus.Next)},{withCtrlMod:!0}),p({id:"quickInput.previous",primary:16,handler:t(_.QuickPickFocus.Previous)},{withCtrlMod:!0});const i=(0,k.localize)(1077,"If we're in quick access mode, this will navigate to the next item. If we are not in quick access mode, this will navigate to the next separator."),o=(0,k.localize)(1078,"If we're in quick access mode, this will navigate to the previous item. If we are not in quick access mode, this will navigate to the previous separator.");c.isMacintosh?(p({id:"quickInput.nextSeparatorWithQuickAccessFallback",primary:2066,handler:t(_.QuickPickFocus.NextSeparator,_.QuickPickFocus.Next),metadata:{description:i}}),p({id:"quickInput.nextSeparator",primary:2578,secondary:[2322],handler:t(_.QuickPickFocus.NextSeparator)},{withCtrlMod:!0}),p({id:"quickInput.previousSeparatorWithQuickAccessFallback",primary:2064,handler:t(_.QuickPickFocus.PreviousSeparator,_.QuickPickFocus.Previous),metadata:{description:o}}),p({id:"quickInput.previousSeparator",primary:2576,secondary:[2320],handler:t(_.QuickPickFocus.PreviousSeparator)},{withCtrlMod:!0})):(p({id:"quickInput.nextSeparatorWithQuickAccessFallback",primary:530,handler:t(_.QuickPickFocus.NextSeparator,_.QuickPickFocus.Next),metadata:{description:i}}),p({id:"quickInput.nextSeparator",primary:2578,handler:t(_.QuickPickFocus.NextSeparator)}),p({id:"quickInput.previousSeparatorWithQuickAccessFallback",primary:528,handler:t(_.QuickPickFocus.PreviousSeparator,_.QuickPickFocus.Previous),metadata:{description:o}}),p({id:"quickInput.previousSeparator",primary:2576,handler:t(_.QuickPickFocus.PreviousSeparator)})),p({id:"quickInput.acceptInBackground",when:E.ContextKeyExpr.and(C.when,E.ContextKeyExpr.or(L.InputFocusedContext.negate(),f.endOfQuickInputBoxContext)),primary:17,weight:250,handler:g=>{g.get(_.IQuickInputService).currentQuickInput?.accept(!0)}},{withAltMod:!0,withCtrlMod:!0,withCmdMod:!0})}),define(oe[154],re([1,0,13,2,38]),function(ae,e,c,k,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.QuickAccessRegistry=e.Extensions=e.DefaultQuickAccessFilterValue=void 0;var L;(function(f){f[f.PRESERVE=0]="PRESERVE",f[f.LAST=1]="LAST"})(L||(e.DefaultQuickAccessFilterValue=L={})),e.Extensions={Quickaccess:"workbench.contributions.quickaccess"};class y{constructor(){this.providers=[],this.defaultProvider=void 0}registerQuickAccessProvider(_){return _.prefix.length===0?this.defaultProvider=_:this.providers.push(_),this.providers.sort((C,p)=>p.prefix.length-C.prefix.length),(0,k.toDisposable)(()=>{this.providers.splice(this.providers.indexOf(_),1),this.defaultProvider===_&&(this.defaultProvider=void 0)})}getQuickAccessProviders(){return(0,c.coalesce)([this.defaultProvider,...this.providers])}getQuickAccessProvider(_){return _&&this.providers.find(p=>_.startsWith(p.prefix))||void 0||this.defaultProvider}}e.QuickAccessRegistry=y,E.Registry.add(e.Extensions.Quickaccess,new y)}),define(oe[711],re([1,0,3,38,2,31,154,63]),function(ae,e,c,k,E,L,y,f){"use strict";var _;Object.defineProperty(e,"__esModule",{value:!0}),e.HelpQuickAccessProvider=void 0;let C=class{static{_=this}static{this.PREFIX="?"}constructor(n,s){this.quickInputService=n,this.keybindingService=s,this.registry=k.Registry.as(y.Extensions.Quickaccess)}provide(n){const s=new E.DisposableStore;return s.add(n.onDidAccept(()=>{const[t]=n.selectedItems;t&&this.quickInputService.quickAccess.show(t.prefix,{preserveValue:!0})})),s.add(n.onDidChangeValue(t=>{const i=this.registry.getQuickAccessProvider(t.substr(_.PREFIX.length));i&&i.prefix&&i.prefix!==_.PREFIX&&this.quickInputService.quickAccess.show(i.prefix,{preserveValue:!0})})),n.items=this.getQuickAccessProviders().filter(t=>t.prefix!==_.PREFIX),s}getQuickAccessProviders(){return this.registry.getQuickAccessProviders().sort((s,t)=>s.prefix.localeCompare(t.prefix)).flatMap(s=>this.createPicks(s))}createPicks(n){return n.helpEntries.map(s=>{const t=s.prefix||n.prefix,i=t||"\u2026";return{prefix:t,label:i,keybinding:s.commandId?this.keybindingService.lookupKeybinding(s.commandId):void 0,ariaLabel:(0,c.localize)(1086,"{0}, {1}",i,s.description),description:s.description}})}};e.HelpQuickAccessProvider=C,e.HelpQuickAccessProvider=C=_=De([he(0,f.IQuickInputService),he(1,L.IKeybindingService)],C)}),define(oe[712],re([1,0,38,154,106,711]),function(ae,e,c,k,E,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),c.Registry.as(k.Extensions.Quickaccess).registerQuickAccessProvider({ctor:L.HelpQuickAccessProvider,prefix:"",helpEntries:[{description:E.QuickHelpNLS.helpQuickAccessActionLabel}]})}),define(oe[713],re([1,0,14,18,6,2,7,154,63,38]),function(ae,e,c,k,E,L,y,f,_,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.QuickAccessController=void 0;let p=class extends L.Disposable{constructor(s,t){super(),this.quickInputService=s,this.instantiationService=t,this.registry=C.Registry.as(f.Extensions.Quickaccess),this.mapProviderToDescriptor=new Map,this.lastAcceptedPickerValues=new Map,this.visibleQuickAccess=void 0}show(s="",t){this.doShowOrPick(s,!1,t)}doShowOrPick(s,t,i){const[o,g]=this.getOrInstantiateProvider(s,i?.enabledProviderPrefixes),h=this.visibleQuickAccess,l=h?.descriptor;if(h&&g&&l===g){s!==g.prefix&&!i?.preserveValue&&(h.picker.value=s),this.adjustValueSelection(h.picker,g,i);return}if(g&&!i?.preserveValue){let v;if(h&&l&&l!==g){const w=h.value.substr(l.prefix.length);w&&(v=`${g.prefix}${w}`)}if(!v){const w=o?.defaultFilterValue;w===f.DefaultQuickAccessFilterValue.LAST?v=this.lastAcceptedPickerValues.get(g):typeof w=="string"&&(v=`${g.prefix}${w}`)}typeof v=="string"&&(s=v)}const a=h?.picker?.valueSelection,r=h?.picker?.value,d=new L.DisposableStore,m=d.add(this.quickInputService.createQuickPick());m.value=s,this.adjustValueSelection(m,g,i),m.placeholder=i?.placeholder??g?.placeholder,m.quickNavigate=i?.quickNavigateConfiguration,m.hideInput=!!m.quickNavigate&&!h,(typeof i?.itemActivation=="number"||i?.quickNavigateConfiguration)&&(m.itemActivation=i?.itemActivation??_.ItemActivation.SECOND),m.contextKey=g?.contextKey,m.filterValue=v=>v.substring(g?g.prefix.length:0);let u;t&&(u=new c.DeferredPromise,d.add(E.Event.once(m.onWillAccept)(v=>{v.veto(),m.hide()}))),d.add(this.registerPickerListeners(m,o,g,s,i));const b=d.add(new k.CancellationTokenSource);if(o&&d.add(o.provide(m,b.token,i?.providerOptions)),E.Event.once(m.onDidHide)(()=>{m.selectedItems.length===0&&b.cancel(),d.dispose(),u?.complete(m.selectedItems.slice(0))}),m.show(),a&&r===s&&(m.valueSelection=a),t)return u?.p}adjustValueSelection(s,t,i){let o;i?.preserveValue?o=[s.value.length,s.value.length]:o=[t?.prefix.length??0,s.value.length],s.valueSelection=o}registerPickerListeners(s,t,i,o,g){const h=new L.DisposableStore,l=this.visibleQuickAccess={picker:s,descriptor:i,value:o};return h.add((0,L.toDisposable)(()=>{l===this.visibleQuickAccess&&(this.visibleQuickAccess=void 0)})),h.add(s.onDidChangeValue(a=>{const[r]=this.getOrInstantiateProvider(a,g?.enabledProviderPrefixes);r!==t?this.show(a,{enabledProviderPrefixes:g?.enabledProviderPrefixes,preserveValue:!0,providerOptions:g?.providerOptions}):l.value=a})),i&&h.add(s.onDidAccept(()=>{this.lastAcceptedPickerValues.set(i,s.value)})),h}getOrInstantiateProvider(s,t){const i=this.registry.getQuickAccessProvider(s);if(!i||t&&!t?.includes(i.prefix))return[void 0,void 0];let o=this.mapProviderToDescriptor.get(i);return o||(o=this.instantiationService.createInstance(i.ctor),this.mapProviderToDescriptor.set(i,o)),[o,i]}};e.QuickAccessController=p,e.QuickAccessController=p=De([he(0,_.IQuickInputService),he(1,y.IInstantiationService)],p)}),define(oe[714],re([1,0,26,30,110,553]),function(ae,e,c,k,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SeverityIcon=void 0;var L;(function(y){function f(_){switch(_){case E.default.Ignore:return"severity-ignore "+k.ThemeIcon.asClassName(c.Codicon.info);case E.default.Info:return k.ThemeIcon.asClassName(c.Codicon.info);case E.default.Warning:return k.ThemeIcon.asClassName(c.Codicon.warning);case E.default.Error:return k.ThemeIcon.asClassName(c.Codicon.error);default:return""}}y.className=f})(L||(e.SeverityIcon=L={}))}),define(oe[100],re([1,0,6,2,19,463,7]),function(ae,e,c,k,E,L,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InMemoryStorageService=e.AbstractStorageService=e.WillSaveStateReason=e.IStorageService=e.TARGET_KEY=void 0,e.loadKeyTargets=_,e.TARGET_KEY="__$__targetStorageMarker",e.IStorageService=(0,y.createDecorator)("storageService");var f;(function(n){n[n.NONE=0]="NONE",n[n.SHUTDOWN=1]="SHUTDOWN"})(f||(e.WillSaveStateReason=f={}));function _(n){const s=n.get(e.TARGET_KEY);if(s)try{return JSON.parse(s)}catch{}return Object.create(null)}class C extends k.Disposable{static{this.DEFAULT_FLUSH_INTERVAL=60*1e3}constructor(s={flushInterval:C.DEFAULT_FLUSH_INTERVAL}){super(),this.options=s,this._onDidChangeValue=this._register(new c.PauseableEmitter),this._onDidChangeTarget=this._register(new c.PauseableEmitter),this._onWillSaveState=this._register(new c.Emitter),this.onWillSaveState=this._onWillSaveState.event,this._workspaceKeyTargets=void 0,this._profileKeyTargets=void 0,this._applicationKeyTargets=void 0}onDidChangeValue(s,t,i){return c.Event.filter(this._onDidChangeValue.event,o=>o.scope===s&&(t===void 0||o.key===t),i)}emitDidChangeValue(s,t){const{key:i,external:o}=t;if(i===e.TARGET_KEY){switch(s){case-1:this._applicationKeyTargets=void 0;break;case 0:this._profileKeyTargets=void 0;break;case 1:this._workspaceKeyTargets=void 0;break}this._onDidChangeTarget.fire({scope:s})}else this._onDidChangeValue.fire({scope:s,key:i,target:this.getKeyTargets(s)[i],external:o})}get(s,t,i){return this.getStorage(t)?.get(s,i)}getBoolean(s,t,i){return this.getStorage(t)?.getBoolean(s,i)}getNumber(s,t,i){return this.getStorage(t)?.getNumber(s,i)}store(s,t,i,o,g=!1){if((0,E.isUndefinedOrNull)(t)){this.remove(s,i,g);return}this.withPausedEmitters(()=>{this.updateKeyTarget(s,i,o),this.getStorage(i)?.set(s,t,g)})}remove(s,t,i=!1){this.withPausedEmitters(()=>{this.updateKeyTarget(s,t,void 0),this.getStorage(t)?.delete(s,i)})}withPausedEmitters(s){this._onDidChangeValue.pause(),this._onDidChangeTarget.pause();try{s()}finally{this._onDidChangeValue.resume(),this._onDidChangeTarget.resume()}}updateKeyTarget(s,t,i,o=!1){const g=this.getKeyTargets(t);typeof i=="number"?g[s]!==i&&(g[s]=i,this.getStorage(t)?.set(e.TARGET_KEY,JSON.stringify(g),o)):typeof g[s]=="number"&&(delete g[s],this.getStorage(t)?.set(e.TARGET_KEY,JSON.stringify(g),o))}get workspaceKeyTargets(){return this._workspaceKeyTargets||(this._workspaceKeyTargets=this.loadKeyTargets(1)),this._workspaceKeyTargets}get profileKeyTargets(){return this._profileKeyTargets||(this._profileKeyTargets=this.loadKeyTargets(0)),this._profileKeyTargets}get applicationKeyTargets(){return this._applicationKeyTargets||(this._applicationKeyTargets=this.loadKeyTargets(-1)),this._applicationKeyTargets}getKeyTargets(s){switch(s){case-1:return this.applicationKeyTargets;case 0:return this.profileKeyTargets;default:return this.workspaceKeyTargets}}loadKeyTargets(s){const t=this.getStorage(s);return t?_(t):Object.create(null)}}e.AbstractStorageService=C;class p extends C{constructor(){super(),this.applicationStorage=this._register(new L.Storage(new L.InMemoryStorageDatabase,{hint:L.StorageHint.STORAGE_IN_MEMORY})),this.profileStorage=this._register(new L.Storage(new L.InMemoryStorageDatabase,{hint:L.StorageHint.STORAGE_IN_MEMORY})),this.workspaceStorage=this._register(new L.Storage(new L.InMemoryStorageDatabase,{hint:L.StorageHint.STORAGE_IN_MEMORY})),this._register(this.workspaceStorage.onDidChangeStorage(s=>this.emitDidChangeValue(1,s))),this._register(this.profileStorage.onDidChangeStorage(s=>this.emitDidChangeValue(0,s))),this._register(this.applicationStorage.onDidChangeStorage(s=>this.emitDidChangeValue(-1,s)))}getStorage(s){switch(s){case-1:return this.applicationStorage;case 0:return this.profileStorage;default:return this.workspaceStorage}}}e.InMemoryStorageService=p}),define(oe[715],re([1,0,6,45,4,380,49,7,100,52,5]),function(ae,e,c,k,E,L,y,f,_,C,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CodeLensCache=e.ICodeLensCache=void 0,e.ICodeLensCache=(0,f.createDecorator)("ICodeLensCache");class n{constructor(i,o){this.lineCount=i,this.data=o}}let s=class{constructor(i){this._fakeProvider=new class{provideCodeLenses(){throw new Error("not supported")}},this._cache=new k.LRUCache(20,.75);const o="codelens/cache";(0,p.runWhenWindowIdle)(C.mainWindow,()=>i.remove(o,1));const g="codelens/cache2",h=i.get(g,1,"{}");this._deserialize(h);const l=c.Event.filter(i.onWillSaveState,a=>a.reason===_.WillSaveStateReason.SHUTDOWN);c.Event.once(l)(a=>{i.store(g,this._serialize(),1,1)})}put(i,o){const g=o.lenses.map(a=>({range:a.symbol.range,command:a.symbol.command&&{id:"",title:a.symbol.command?.title}})),h=new L.CodeLensModel;h.add({lenses:g,dispose:()=>{}},this._fakeProvider);const l=new n(i.getLineCount(),h);this._cache.set(i.uri.toString(),l)}get(i){const o=this._cache.get(i.uri.toString());return o&&o.lineCount===i.getLineCount()?o.data:void 0}delete(i){this._cache.delete(i.uri.toString())}_serialize(){const i=Object.create(null);for(const[o,g]of this._cache){const h=new Set;for(const l of g.data.lenses)h.add(l.symbol.range.startLineNumber);i[o]={lineCount:g.lineCount,lines:[...h.values()]}}return JSON.stringify(i)}_deserialize(i){try{const o=JSON.parse(i);for(const g in o){const h=o[g],l=[];for(const r of h.lines)l.push({range:new E.Range(r,1,r,11)});const a=new L.CodeLensModel;a.add({lenses:l,dispose(){}},this._fakeProvider),this._cache.set(g,new n(h.lineCount,a))}}catch{}}};e.CodeLensCache=s,e.CodeLensCache=s=De([he(0,_.IStorageService)],s),(0,y.registerSingleton)(e.ICodeLensCache,s,1)}),define(oe[400],re([1,0,14,2,45,227,28,27,49,7,100]),function(ae,e,c,k,E,L,y,f,_,C,p){"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.ISuggestMemoryService=e.SuggestMemoryService=e.PrefixMemory=e.LRUMemory=e.NoMemory=e.Memory=void 0;class s{constructor(l){this.name=l}select(l,a,r){if(r.length===0)return 0;const d=r[0].score[0];for(let m=0;m<r.length;m++){const{score:u,completion:b}=r[m];if(u[0]!==d)break;if(b.preselect)return m}return 0}}e.Memory=s;class t extends s{constructor(){super("first")}memorize(l,a,r){}toJSON(){}fromJSON(){}}e.NoMemory=t;class i extends s{constructor(){super("recentlyUsed"),this._cache=new E.LRUCache(300,.66),this._seq=0}memorize(l,a,r){const d=`${l.getLanguageId()}/${r.textLabel}`;this._cache.set(d,{touch:this._seq++,type:r.completion.kind,insertText:r.completion.insertText})}select(l,a,r){if(r.length===0)return 0;const d=l.getLineContent(a.lineNumber).substr(a.column-10,a.column-1);if(/\s$/.test(d))return super.select(l,a,r);const m=r[0].score[0];let u=-1,b=-1,v=-1;for(let w=0;w<r.length&&r[w].score[0]===m;w++){const S=`${l.getLanguageId()}/${r[w].textLabel}`,D=this._cache.peek(S);if(D&&D.touch>v&&D.type===r[w].completion.kind&&D.insertText===r[w].completion.insertText&&(v=D.touch,b=w),r[w].completion.preselect&&u===-1)return u=w}return b!==-1?b:u!==-1?u:0}toJSON(){return this._cache.toJSON()}fromJSON(l){this._cache.clear();const a=0;for(const[r,d]of l)d.touch=a,d.type=typeof d.type=="number"?d.type:y.CompletionItemKinds.fromString(d.type),this._cache.set(r,d);this._seq=this._cache.size}}e.LRUMemory=i;class o extends s{constructor(){super("recentlyUsedByPrefix"),this._trie=L.TernarySearchTree.forStrings(),this._seq=0}memorize(l,a,r){const{word:d}=l.getWordUntilPosition(a),m=`${l.getLanguageId()}/${d}`;this._trie.set(m,{type:r.completion.kind,insertText:r.completion.insertText,touch:this._seq++})}select(l,a,r){const{word:d}=l.getWordUntilPosition(a);if(!d)return super.select(l,a,r);const m=`${l.getLanguageId()}/${d}`;let u=this._trie.get(m);if(u||(u=this._trie.findSubstr(m)),u)for(let b=0;b<r.length;b++){const{kind:v,insertText:w}=r[b].completion;if(v===u.type&&w===u.insertText)return b}return super.select(l,a,r)}toJSON(){const l=[];return this._trie.forEach((a,r)=>l.push([r,a])),l.sort((a,r)=>-(a[1].touch-r[1].touch)).forEach((a,r)=>a[1].touch=r),l.slice(0,200)}fromJSON(l){if(this._trie.clear(),l.length>0){this._seq=l[0][1].touch+1;for(const[a,r]of l)r.type=typeof r.type=="number"?r.type:y.CompletionItemKinds.fromString(r.type),this._trie.set(a,r)}}}e.PrefixMemory=o;let g=class{static{n=this}static{this._strategyCtors=new Map([["recentlyUsedByPrefix",o],["recentlyUsed",i],["first",t]])}static{this._storagePrefix="suggest/memories"}constructor(l,a){this._storageService=l,this._configService=a,this._disposables=new k.DisposableStore,this._persistSoon=new c.RunOnceScheduler(()=>this._saveState(),500),this._disposables.add(l.onWillSaveState(r=>{r.reason===p.WillSaveStateReason.SHUTDOWN&&this._saveState()}))}dispose(){this._disposables.dispose(),this._persistSoon.dispose()}memorize(l,a,r){this._withStrategy(l,a).memorize(l,a,r),this._persistSoon.schedule()}select(l,a,r){return this._withStrategy(l,a).select(l,a,r)}_withStrategy(l,a){const r=this._configService.getValue("editor.suggestSelection",{overrideIdentifier:l.getLanguageIdAtPosition(a.lineNumber,a.column),resource:l.uri});if(this._strategy?.name!==r){this._saveState();const d=n._strategyCtors.get(r)||t;this._strategy=new d;try{const u=this._configService.getValue("editor.suggest.shareSuggestSelections")?0:1,b=this._storageService.get(`${n._storagePrefix}/${r}`,u);b&&this._strategy.fromJSON(JSON.parse(b))}catch{}}return this._strategy}_saveState(){if(this._strategy){const a=this._configService.getValue("editor.suggest.shareSuggestSelections")?0:1,r=JSON.stringify(this._strategy);this._storageService.store(`${n._storagePrefix}/${this._strategy.name}`,r,a,1)}}};e.SuggestMemoryService=g,e.SuggestMemoryService=g=n=De([he(0,p.IStorageService),he(1,f.IConfigurationService)],g),e.ISuggestMemoryService=(0,C.createDecorator)("ISuggestMemories"),(0,_.registerSingleton)(e.ISuggestMemoryService,g,1)}),define(oe[401],re([1,0,14,6,2,29,24,12,41,100,13,3,31]),function(ae,e,c,k,E,L,y,f,_,C,p,n,s){"use strict";var t,i;Object.defineProperty(e,"__esModule",{value:!0}),e.MenuService=void 0,e.createConfigureKeybindingAction=d;let o=class{constructor(u,b,v){this._commandService=u,this._keybindingService=b,this._hiddenStates=new g(v)}createMenu(u,b,v){return new a(u,this._hiddenStates,{emitEventsForSubmenuChanges:!1,eventDebounceDelay:50,...v},this._commandService,this._keybindingService,b)}getMenuActions(u,b,v){const w=new a(u,this._hiddenStates,{emitEventsForSubmenuChanges:!1,eventDebounceDelay:50,...v},this._commandService,this._keybindingService,b),S=w.getActions(v);return w.dispose(),S}resetHiddenStates(u){this._hiddenStates.reset(u)}};e.MenuService=o,e.MenuService=o=De([he(0,y.ICommandService),he(1,s.IKeybindingService),he(2,C.IStorageService)],o);let g=class{static{t=this}static{this._key="menu.hiddenCommands"}constructor(u){this._storageService=u,this._disposables=new E.DisposableStore,this._onDidChange=new k.Emitter,this.onDidChange=this._onDidChange.event,this._ignoreChangeEvent=!1,this._hiddenByDefaultCache=new Map;try{const b=u.get(t._key,0,"{}");this._data=JSON.parse(b)}catch{this._data=Object.create(null)}this._disposables.add(u.onDidChangeValue(0,t._key,this._disposables)(()=>{if(!this._ignoreChangeEvent)try{const b=u.get(t._key,0,"{}");this._data=JSON.parse(b)}catch(b){console.log("FAILED to read storage after UPDATE",b)}this._onDidChange.fire()}))}dispose(){this._onDidChange.dispose(),this._disposables.dispose()}_isHiddenByDefault(u,b){return this._hiddenByDefaultCache.get(`${u.id}/${b}`)??!1}setDefaultState(u,b,v){this._hiddenByDefaultCache.set(`${u.id}/${b}`,v)}isHidden(u,b){const v=this._isHiddenByDefault(u,b),w=this._data[u.id]?.includes(b)??!1;return v?!w:w}updateHidden(u,b,v){this._isHiddenByDefault(u,b)&&(v=!v);const S=this._data[u.id];if(v)S?S.indexOf(b)<0&&S.push(b):this._data[u.id]=[b];else if(S){const D=S.indexOf(b);D>=0&&(0,p.removeFastWithoutKeepingOrder)(S,D),S.length===0&&delete this._data[u.id]}this._persist()}reset(u){if(u===void 0)this._data=Object.create(null),this._persist();else{for(const{id:b}of u)this._data[b]&&delete this._data[b];this._persist()}}_persist(){try{this._ignoreChangeEvent=!0;const u=JSON.stringify(this._data);this._storageService.store(t._key,u,0,0)}finally{this._ignoreChangeEvent=!1}}};g=t=De([he(0,C.IStorageService)],g);class h{constructor(u,b){this._id=u,this._collectContextKeysForSubmenus=b,this._menuGroups=[],this._structureContextKeys=new Set,this._preconditionContextKeys=new Set,this._toggledContextKeys=new Set,this.refresh()}get structureContextKeys(){return this._structureContextKeys}get preconditionContextKeys(){return this._preconditionContextKeys}get toggledContextKeys(){return this._toggledContextKeys}refresh(){this._menuGroups.length=0,this._structureContextKeys.clear(),this._preconditionContextKeys.clear(),this._toggledContextKeys.clear();const u=this._sort(L.MenuRegistry.getMenuItems(this._id));let b;for(const v of u){const w=v.group||"";(!b||b[0]!==w)&&(b=[w,[]],this._menuGroups.push(b)),b[1].push(v),this._collectContextKeys(v)}}_sort(u){return u}_collectContextKeys(u){if(h._fillInKbExprKeys(u.when,this._structureContextKeys),(0,L.isIMenuItem)(u)){if(u.command.precondition&&h._fillInKbExprKeys(u.command.precondition,this._preconditionContextKeys),u.command.toggled){const b=u.command.toggled.condition||u.command.toggled;h._fillInKbExprKeys(b,this._toggledContextKeys)}}else this._collectContextKeysForSubmenus&&L.MenuRegistry.getMenuItems(u.submenu).forEach(this._collectContextKeys,this)}static _fillInKbExprKeys(u,b){if(u)for(const v of u.keys())b.add(v)}}let l=i=class extends h{constructor(u,b,v,w,S,D){super(u,v),this._hiddenStates=b,this._commandService=w,this._keybindingService=S,this._contextKeyService=D,this.refresh()}createActionGroups(u){const b=[];for(const v of this._menuGroups){const[w,S]=v;let D;for(const I of S)if(this._contextKeyService.contextMatchesRules(I.when)){const T=(0,L.isIMenuItem)(I);T&&this._hiddenStates.setDefaultState(this._id,I.command.id,!!I.isHiddenByDefault);const M=r(this._id,T?I.command:I,this._hiddenStates);if(T){const A=d(this._commandService,this._keybindingService,I.command.id,I.when);(D??=[]).push(new L.MenuItemAction(I.command,I.alt,u,M,A,this._contextKeyService,this._commandService))}else{const A=new i(I.submenu,this._hiddenStates,this._collectContextKeysForSubmenus,this._commandService,this._keybindingService,this._contextKeyService).createActionGroups(u),R=_.Separator.join(...A.map(N=>N[1]));R.length>0&&(D??=[]).push(new L.SubmenuItemAction(I,M,R))}}D&&D.length>0&&b.push([w,D])}return b}_sort(u){return u.sort(i._compareMenuItems)}static _compareMenuItems(u,b){const v=u.group,w=b.group;if(v!==w){if(v){if(!w)return-1}else return 1;if(v==="navigation")return-1;if(w==="navigation")return 1;const I=v.localeCompare(w);if(I!==0)return I}const S=u.order||0,D=b.order||0;return S<D?-1:S>D?1:i._compareTitles((0,L.isIMenuItem)(u)?u.command.title:u.title,(0,L.isIMenuItem)(b)?b.command.title:b.title)}static _compareTitles(u,b){const v=typeof u=="string"?u:u.original,w=typeof b=="string"?b:b.original;return v.localeCompare(w)}};l=i=De([he(3,y.ICommandService),he(4,s.IKeybindingService),he(5,f.IContextKeyService)],l);let a=class{constructor(u,b,v,w,S,D){this._disposables=new E.DisposableStore,this._menuInfo=new l(u,b,v.emitEventsForSubmenuChanges,w,S,D);const I=new c.RunOnceScheduler(()=>{this._menuInfo.refresh(),this._onDidChange.fire({menu:this,isStructuralChange:!0,isEnablementChange:!0,isToggleChange:!0})},v.eventDebounceDelay);this._disposables.add(I),this._disposables.add(L.MenuRegistry.onDidChangeMenu(R=>{R.has(u)&&I.schedule()}));const T=this._disposables.add(new E.DisposableStore),M=R=>{let N=!1,O=!1,x=!1;for(const F of R)if(N=N||F.isStructuralChange,O=O||F.isEnablementChange,x=x||F.isToggleChange,N&&O&&x)break;return{menu:this,isStructuralChange:N,isEnablementChange:O,isToggleChange:x}},A=()=>{T.add(D.onDidChangeContext(R=>{const N=R.affectsSome(this._menuInfo.structureContextKeys),O=R.affectsSome(this._menuInfo.preconditionContextKeys),x=R.affectsSome(this._menuInfo.toggledContextKeys);(N||O||x)&&this._onDidChange.fire({menu:this,isStructuralChange:N,isEnablementChange:O,isToggleChange:x})})),T.add(b.onDidChange(R=>{this._onDidChange.fire({menu:this,isStructuralChange:!0,isEnablementChange:!1,isToggleChange:!1})}))};this._onDidChange=new k.DebounceEmitter({onWillAddFirstListener:A,onDidRemoveLastListener:T.clear.bind(T),delay:v.eventDebounceDelay,merge:M}),this.onDidChange=this._onDidChange.event}getActions(u){return this._menuInfo.createActionGroups(u)}dispose(){this._disposables.dispose(),this._onDidChange.dispose()}};a=De([he(3,y.ICommandService),he(4,s.IKeybindingService),he(5,f.IContextKeyService)],a);function r(m,u,b){const v=(0,L.isISubmenuItem)(u)?u.submenu.id:u.id,w=typeof u.title=="string"?u.title:u.title.value,S=(0,_.toAction)({id:`hide/${m.id}/${v}`,label:(0,n.localize)(1163,"Hide '{0}'",w),run(){b.updateHidden(m,v,!0)}}),D=(0,_.toAction)({id:`toggle/${m.id}/${v}`,label:w,get checked(){return!b.isHidden(m,v)},run(){b.updateHidden(m,v,!!this.checked)}});return{hide:S,toggle:D,get isHidden(){return!D.checked}}}function d(m,u,b,v=void 0,w=!0){return(0,_.toAction)({id:`configureKeybinding/${b}`,label:(0,n.localize)(1164,"Configure Keybinding"),enabled:w,run(){const D=!!!u.lookupKeybinding(b)&&v?v.serialize():void 0;m.executeCommand("workbench.action.openGlobalKeybindings",`@command:${b}`+(D?` +when:${D}`:""))}})}}),define(oe[66],re([1,0,7]),function(ae,e,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ITelemetryService=void 0,e.ITelemetryService=(0,c.createDecorator)("telemetryService")}),define(oe[15],re([1,0,3,22,35,9,44,78,29,24,12,7,120,38,66,19,61,5]),function(ae,e,c,k,E,L,y,f,_,C,p,n,s,t,i,o,g,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SelectAllCommand=e.RedoCommand=e.UndoCommand=e.EditorExtensionsRegistry=e.EditorAction2=e.MultiEditorAction=e.EditorAction=e.EditorCommand=e.ProxyCommand=e.MultiCommand=e.Command=void 0,e.registerModelAndPositionCommand=v,e.registerEditorCommand=w,e.registerEditorAction=S,e.registerMultiEditorAction=D,e.registerInstantiatedEditorAction=I,e.registerEditorContribution=T;class l{constructor(x){this.id=x.id,this.precondition=x.precondition,this._kbOpts=x.kbOpts,this._menuOpts=x.menuOpts,this.metadata=x.metadata}register(){if(Array.isArray(this._menuOpts)?this._menuOpts.forEach(this._registerMenuItem,this):this._menuOpts&&this._registerMenuItem(this._menuOpts),this._kbOpts){const x=Array.isArray(this._kbOpts)?this._kbOpts:[this._kbOpts];for(const F of x){let W=F.kbExpr;this.precondition&&(W?W=p.ContextKeyExpr.and(W,this.precondition):W=this.precondition);const V={id:this.id,weight:F.weight,args:F.args,when:W,primary:F.primary,secondary:F.secondary,win:F.win,linux:F.linux,mac:F.mac};s.KeybindingsRegistry.registerKeybindingRule(V)}}C.CommandsRegistry.registerCommand({id:this.id,handler:(x,F)=>this.runCommand(x,F),metadata:this.metadata})}_registerMenuItem(x){_.MenuRegistry.appendMenuItem(x.menuId,{group:x.group,command:{id:this.id,title:x.title,icon:x.icon,precondition:this.precondition},when:x.when,order:x.order})}}e.Command=l;class a extends l{constructor(){super(...arguments),this._implementations=[]}addImplementation(x,F,W,V){return this._implementations.push({priority:x,name:F,implementation:W,when:V}),this._implementations.sort((q,H)=>H.priority-q.priority),{dispose:()=>{for(let q=0;q<this._implementations.length;q++)if(this._implementations[q].implementation===W){this._implementations.splice(q,1);return}}}}runCommand(x,F){const W=x.get(g.ILogService),V=x.get(p.IContextKeyService);W.trace(`Executing Command '${this.id}' which has ${this._implementations.length} bound.`);for(const q of this._implementations){if(q.when){const K=V.getContext((0,h.getActiveElement)());if(!q.when.evaluate(K))continue}const H=q.implementation(x,F);if(H)return W.trace(`Command '${this.id}' was handled by '${q.name}'.`),typeof H=="boolean"?void 0:H}W.trace(`The Command '${this.id}' was not handled by any implementation.`)}}e.MultiCommand=a;class r extends l{constructor(x,F){super(F),this.command=x}runCommand(x,F){return this.command.runCommand(x,F)}}e.ProxyCommand=r;class d extends l{static bindToContribution(x){return class extends d{constructor(W){super(W),this._callback=W.handler}runEditorCommand(W,V,q){const H=x(V);H&&this._callback(H,q)}}}static runEditorCommand(x,F,W,V){const q=x.get(E.ICodeEditorService),H=q.getFocusedCodeEditor()||q.getActiveCodeEditor();if(H)return H.invokeWithinContext(K=>{if(K.get(p.IContextKeyService).contextMatchesRules(W??void 0))return V(K,H,F)})}runCommand(x,F){return d.runEditorCommand(x,F,this.precondition,(W,V,q)=>this.runEditorCommand(W,V,q))}}e.EditorCommand=d;class m extends d{static convertOptions(x){let F;Array.isArray(x.menuOpts)?F=x.menuOpts:x.menuOpts?F=[x.menuOpts]:F=[];function W(V){return V.menuId||(V.menuId=_.MenuId.EditorContext),V.title||(V.title=x.label),V.when=p.ContextKeyExpr.and(x.precondition,V.when),V}return Array.isArray(x.contextMenuOpts)?F.push(...x.contextMenuOpts.map(W)):x.contextMenuOpts&&F.push(W(x.contextMenuOpts)),x.menuOpts=F,x}constructor(x){super(m.convertOptions(x)),this.label=x.label,this.alias=x.alias}runEditorCommand(x,F,W){return this.reportTelemetry(x,F),this.run(x,F,W||{})}reportTelemetry(x,F){x.get(i.ITelemetryService).publicLog2("editorActionInvoked",{name:this.label,id:this.id})}}e.EditorAction=m;class u extends m{constructor(){super(...arguments),this._implementations=[]}addImplementation(x,F){return this._implementations.push([x,F]),this._implementations.sort((W,V)=>V[0]-W[0]),{dispose:()=>{for(let W=0;W<this._implementations.length;W++)if(this._implementations[W][1]===F){this._implementations.splice(W,1);return}}}}run(x,F,W){for(const V of this._implementations){const q=V[1](x,F,W);if(q)return typeof q=="boolean"?void 0:q}}}e.MultiEditorAction=u;class b extends _.Action2{run(x,...F){const W=x.get(E.ICodeEditorService),V=W.getFocusedCodeEditor()||W.getActiveCodeEditor();if(V)return V.invokeWithinContext(q=>{const H=q.get(p.IContextKeyService),K=q.get(g.ILogService);if(!H.contextMatchesRules(this.desc.precondition??void 0)){K.debug("[EditorAction2] NOT running command because its precondition is FALSE",this.desc.id,this.desc.precondition?.serialize());return}return this.runEditorCommand(q,V,...F)})}}e.EditorAction2=b;function v(O,x){C.CommandsRegistry.registerCommand(O,function(F,...W){const V=F.get(n.IInstantiationService),[q,H]=W;(0,o.assertType)(k.URI.isUri(q)),(0,o.assertType)(L.Position.isIPosition(H));const K=F.get(y.IModelService).getModel(q);if(K){const G=L.Position.lift(H);return V.invokeFunction(x,K,G,...W.slice(2))}return F.get(f.ITextModelService).createModelReference(q).then(G=>new Promise((Y,X)=>{try{const Z=V.invokeFunction(x,G.object.textEditorModel,L.Position.lift(H),W.slice(2));Y(Z)}catch(Z){X(Z)}}).finally(()=>{G.dispose()}))})}function w(O){return R.INSTANCE.registerEditorCommand(O),O}function S(O){const x=new O;return R.INSTANCE.registerEditorAction(x),x}function D(O){return R.INSTANCE.registerEditorAction(O),O}function I(O){R.INSTANCE.registerEditorAction(O)}function T(O,x,F){R.INSTANCE.registerEditorContribution(O,x,F)}var M;(function(O){function x(H){return R.INSTANCE.getEditorCommand(H)}O.getEditorCommand=x;function F(){return R.INSTANCE.getEditorActions()}O.getEditorActions=F;function W(){return R.INSTANCE.getEditorContributions()}O.getEditorContributions=W;function V(H){return R.INSTANCE.getEditorContributions().filter(K=>H.indexOf(K.id)>=0)}O.getSomeEditorContributions=V;function q(){return R.INSTANCE.getDiffEditorContributions()}O.getDiffEditorContributions=q})(M||(e.EditorExtensionsRegistry=M={}));const A={EditorCommonContributions:"editor.contributions"};class R{static{this.INSTANCE=new R}constructor(){this.editorContributions=[],this.diffEditorContributions=[],this.editorActions=[],this.editorCommands=Object.create(null)}registerEditorContribution(x,F,W){this.editorContributions.push({id:x,ctor:F,instantiation:W})}getEditorContributions(){return this.editorContributions.slice(0)}getDiffEditorContributions(){return this.diffEditorContributions.slice(0)}registerEditorAction(x){x.register(),this.editorActions.push(x)}getEditorActions(){return this.editorActions}registerEditorCommand(x){x.register(),this.editorCommands[x.id]=x}getEditorCommand(x){return this.editorCommands[x]||null}}t.Registry.add(A.EditorCommonContributions,R.INSTANCE);function N(O){return O.register(),O}e.UndoCommand=N(new a({id:"undo",precondition:void 0,kbOpts:{weight:0,primary:2104},menuOpts:[{menuId:_.MenuId.MenubarEditMenu,group:"1_do",title:c.localize(1820,"&&Undo"),order:1},{menuId:_.MenuId.CommandPalette,group:"",title:c.localize(1821,"Undo"),order:1}]})),N(new r(e.UndoCommand,{id:"default:undo",precondition:void 0})),e.RedoCommand=N(new a({id:"redo",precondition:void 0,kbOpts:{weight:0,primary:2103,secondary:[3128],mac:{primary:3128}},menuOpts:[{menuId:_.MenuId.MenubarEditMenu,group:"1_do",title:c.localize(1822,"&&Redo"),order:2},{menuId:_.MenuId.CommandPalette,group:"",title:c.localize(1823,"Redo"),order:1}]})),N(new r(e.RedoCommand,{id:"default:redo",precondition:void 0})),e.SelectAllCommand=N(new a({id:"editor.action.selectAll",precondition:void 0,kbOpts:{weight:0,kbExpr:null,primary:2079},menuOpts:[{menuId:_.MenuId.MenubarSelectionMenu,group:"1_basic",title:c.localize(1824,"&&Select All"),order:1},{menuId:_.MenuId.CommandPalette,group:"",title:c.localize(1825,"Select All"),order:1}]}))}),define(oe[212],re([1,0,3,64,19,48,15,35,576,77,245,246,275,9,4,20,12,120,5,211]),function(ae,e,c,k,E,L,y,f,_,C,p,n,s,t,i,o,g,h,l,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CoreEditingCommands=e.CoreNavigationCommands=e.RevealLine_=e.EditorScroll_=e.CoreEditorCommand=void 0;const r=0;class d extends y.EditorCommand{runEditorCommand(R,N,O){const x=N._getViewModel();x&&this.runCoreEditorCommand(x,O||{})}}e.CoreEditorCommand=d;var m;(function(A){const R=function(O){if(!E.isObject(O))return!1;const x=O;return!(!E.isString(x.to)||!E.isUndefined(x.by)&&!E.isString(x.by)||!E.isUndefined(x.value)&&!E.isNumber(x.value)||!E.isUndefined(x.revealCursor)&&!E.isBoolean(x.revealCursor))};A.metadata={description:"Scroll editor in the given direction",args:[{name:"Editor scroll argument object",description:"Property-value pairs that can be passed through this argument:\n * 'to': A mandatory direction value.\n ```\n 'up', 'down'\n ```\n * 'by': Unit to move. Default is computed based on 'to' value.\n ```\n 'line', 'wrappedLine', 'page', 'halfPage', 'editor'\n ```\n * 'value': Number of units to move. Default is '1'.\n * 'revealCursor': If 'true' reveals the cursor if it is outside view port.\n ",constraint:R,schema:{type:"object",required:["to"],properties:{to:{type:"string",enum:["up","down"]},by:{type:"string",enum:["line","wrappedLine","page","halfPage","editor"]},value:{type:"number",default:1},revealCursor:{type:"boolean"}}}}]},A.RawDirection={Up:"up",Right:"right",Down:"down",Left:"left"},A.RawUnit={Line:"line",WrappedLine:"wrappedLine",Page:"page",HalfPage:"halfPage",Editor:"editor",Column:"column"};function N(O){let x;switch(O.to){case A.RawDirection.Up:x=1;break;case A.RawDirection.Right:x=2;break;case A.RawDirection.Down:x=3;break;case A.RawDirection.Left:x=4;break;default:return null}let F;switch(O.by){case A.RawUnit.Line:F=1;break;case A.RawUnit.WrappedLine:F=2;break;case A.RawUnit.Page:F=3;break;case A.RawUnit.HalfPage:F=4;break;case A.RawUnit.Editor:F=5;break;case A.RawUnit.Column:F=6;break;default:F=2}const W=Math.floor(O.value||1),V=!!O.revealCursor;return{direction:x,unit:F,value:W,revealCursor:V,select:!!O.select}}A.parse=N})(m||(e.EditorScroll_=m={}));var u;(function(A){const R=function(N){if(!E.isObject(N))return!1;const O=N;return!(!E.isNumber(O.lineNumber)&&!E.isString(O.lineNumber)||!E.isUndefined(O.at)&&!E.isString(O.at))};A.metadata={description:"Reveal the given line at the given logical position",args:[{name:"Reveal line argument object",description:"Property-value pairs that can be passed through this argument:\n * 'lineNumber': A mandatory line number value.\n * 'at': Logical position at which line has to be revealed.\n ```\n 'top', 'center', 'bottom'\n ```\n ",constraint:R,schema:{type:"object",required:["lineNumber"],properties:{lineNumber:{type:["number","string"]},at:{type:"string",enum:["top","center","bottom"]}}}}]},A.RawAtArgument={Top:"top",Center:"center",Bottom:"bottom"}})(u||(e.RevealLine_=u={}));class b{constructor(R){R.addImplementation(1e4,"code-editor",(N,O)=>{const x=N.get(f.ICodeEditorService).getFocusedCodeEditor();return x&&x.hasTextFocus()?this._runEditorCommand(N,x,O):!1}),R.addImplementation(1e3,"generic-dom-input-textarea",(N,O)=>{const x=(0,l.getActiveElement)();return x&&["input","textarea"].indexOf(x.tagName.toLowerCase())>=0?(this.runDOMCommand(x),!0):!1}),R.addImplementation(0,"generic-dom",(N,O)=>{const x=N.get(f.ICodeEditorService).getActiveCodeEditor();return x?(x.focus(),this._runEditorCommand(N,x,O)):!1})}_runEditorCommand(R,N,O){const x=this.runEditorCommand(R,N,O);return x||!0}}var v;(function(A){class R extends d{constructor(se){super(se),this._inSelectionMode=se.inSelectionMode}runCoreEditorCommand(se,ue){if(!ue.position)return;se.model.pushStackElement(),se.setCursorStates(ue.source,3,[n.CursorMoveCommands.moveTo(se,se.getPrimaryCursorState(),this._inSelectionMode,ue.position,ue.viewPosition)])&&ue.revealType!==2&&se.revealAllCursors(ue.source,!0,!0)}}A.MoveTo=(0,y.registerEditorCommand)(new R({id:"_moveTo",inSelectionMode:!1,precondition:void 0})),A.MoveToSelect=(0,y.registerEditorCommand)(new R({id:"_moveToSelect",inSelectionMode:!0,precondition:void 0}));class N extends d{runCoreEditorCommand(se,ue){se.model.pushStackElement();const ge=this._getColumnSelectResult(se,se.getPrimaryCursorState(),se.getCursorColumnSelectData(),ue);ge!==null&&(se.setCursorStates(ue.source,3,ge.viewStates.map(pe=>C.CursorState.fromViewState(pe))),se.setCursorColumnSelectData({isReal:!0,fromViewLineNumber:ge.fromLineNumber,fromViewVisualColumn:ge.fromVisualColumn,toViewLineNumber:ge.toLineNumber,toViewVisualColumn:ge.toVisualColumn}),ge.reversed?se.revealTopMostCursor(ue.source):se.revealBottomMostCursor(ue.source))}}A.ColumnSelect=(0,y.registerEditorCommand)(new class extends N{constructor(){super({id:"columnSelect",precondition:void 0})}_getColumnSelectResult(te,se,ue,ge){if(typeof ge.position>"u"||typeof ge.viewPosition>"u"||typeof ge.mouseColumn>"u")return null;const pe=te.model.validatePosition(ge.position),ce=te.coordinatesConverter.validateViewPosition(new t.Position(ge.viewPosition.lineNumber,ge.viewPosition.column),pe),ie=ge.doColumnSelect?ue.fromViewLineNumber:ce.lineNumber,ne=ge.doColumnSelect?ue.fromViewVisualColumn:ge.mouseColumn-1;return _.ColumnSelection.columnSelect(te.cursorConfig,te,ie,ne,ce.lineNumber,ge.mouseColumn-1)}}),A.CursorColumnSelectLeft=(0,y.registerEditorCommand)(new class extends N{constructor(){super({id:"cursorColumnSelectLeft",precondition:void 0,kbOpts:{weight:r,kbExpr:o.EditorContextKeys.textInputFocus,primary:3599,linux:{primary:0}}})}_getColumnSelectResult(te,se,ue,ge){return _.ColumnSelection.columnSelectLeft(te.cursorConfig,te,ue)}}),A.CursorColumnSelectRight=(0,y.registerEditorCommand)(new class extends N{constructor(){super({id:"cursorColumnSelectRight",precondition:void 0,kbOpts:{weight:r,kbExpr:o.EditorContextKeys.textInputFocus,primary:3601,linux:{primary:0}}})}_getColumnSelectResult(te,se,ue,ge){return _.ColumnSelection.columnSelectRight(te.cursorConfig,te,ue)}});class O extends N{constructor(se){super(se),this._isPaged=se.isPaged}_getColumnSelectResult(se,ue,ge,pe){return _.ColumnSelection.columnSelectUp(se.cursorConfig,se,ge,this._isPaged)}}A.CursorColumnSelectUp=(0,y.registerEditorCommand)(new O({isPaged:!1,id:"cursorColumnSelectUp",precondition:void 0,kbOpts:{weight:r,kbExpr:o.EditorContextKeys.textInputFocus,primary:3600,linux:{primary:0}}})),A.CursorColumnSelectPageUp=(0,y.registerEditorCommand)(new O({isPaged:!0,id:"cursorColumnSelectPageUp",precondition:void 0,kbOpts:{weight:r,kbExpr:o.EditorContextKeys.textInputFocus,primary:3595,linux:{primary:0}}}));class x extends N{constructor(se){super(se),this._isPaged=se.isPaged}_getColumnSelectResult(se,ue,ge,pe){return _.ColumnSelection.columnSelectDown(se.cursorConfig,se,ge,this._isPaged)}}A.CursorColumnSelectDown=(0,y.registerEditorCommand)(new x({isPaged:!1,id:"cursorColumnSelectDown",precondition:void 0,kbOpts:{weight:r,kbExpr:o.EditorContextKeys.textInputFocus,primary:3602,linux:{primary:0}}})),A.CursorColumnSelectPageDown=(0,y.registerEditorCommand)(new x({isPaged:!0,id:"cursorColumnSelectPageDown",precondition:void 0,kbOpts:{weight:r,kbExpr:o.EditorContextKeys.textInputFocus,primary:3596,linux:{primary:0}}}));class F extends d{constructor(){super({id:"cursorMove",precondition:void 0,metadata:n.CursorMove.metadata})}runCoreEditorCommand(se,ue){const ge=n.CursorMove.parse(ue);ge&&this._runCursorMove(se,ue.source,ge)}_runCursorMove(se,ue,ge){se.model.pushStackElement(),se.setCursorStates(ue,3,F._move(se,se.getCursorStates(),ge)),se.revealAllCursors(ue,!0)}static _move(se,ue,ge){const pe=ge.select,ce=ge.value;switch(ge.direction){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:case 10:return n.CursorMoveCommands.simpleMove(se,ue,ge.direction,pe,ce,ge.unit);case 11:case 13:case 12:case 14:return n.CursorMoveCommands.viewportMove(se,ue,ge.direction,pe,ce);default:return null}}}A.CursorMoveImpl=F,A.CursorMove=(0,y.registerEditorCommand)(new F);class W extends d{constructor(se){super(se),this._staticArgs=se.args}runCoreEditorCommand(se,ue){let ge=this._staticArgs;this._staticArgs.value===-1&&(ge={direction:this._staticArgs.direction,unit:this._staticArgs.unit,select:this._staticArgs.select,value:ue.pageSize||se.cursorConfig.pageSize}),se.model.pushStackElement(),se.setCursorStates(ue.source,3,n.CursorMoveCommands.simpleMove(se,se.getCursorStates(),ge.direction,ge.select,ge.value,ge.unit)),se.revealAllCursors(ue.source,!0)}}A.CursorLeft=(0,y.registerEditorCommand)(new W({args:{direction:0,unit:0,select:!1,value:1},id:"cursorLeft",precondition:void 0,kbOpts:{weight:r,kbExpr:o.EditorContextKeys.textInputFocus,primary:15,mac:{primary:15,secondary:[288]}}})),A.CursorLeftSelect=(0,y.registerEditorCommand)(new W({args:{direction:0,unit:0,select:!0,value:1},id:"cursorLeftSelect",precondition:void 0,kbOpts:{weight:r,kbExpr:o.EditorContextKeys.textInputFocus,primary:1039}})),A.CursorRight=(0,y.registerEditorCommand)(new W({args:{direction:1,unit:0,select:!1,value:1},id:"cursorRight",precondition:void 0,kbOpts:{weight:r,kbExpr:o.EditorContextKeys.textInputFocus,primary:17,mac:{primary:17,secondary:[292]}}})),A.CursorRightSelect=(0,y.registerEditorCommand)(new W({args:{direction:1,unit:0,select:!0,value:1},id:"cursorRightSelect",precondition:void 0,kbOpts:{weight:r,kbExpr:o.EditorContextKeys.textInputFocus,primary:1041}})),A.CursorUp=(0,y.registerEditorCommand)(new W({args:{direction:2,unit:2,select:!1,value:1},id:"cursorUp",precondition:void 0,kbOpts:{weight:r,kbExpr:o.EditorContextKeys.textInputFocus,primary:16,mac:{primary:16,secondary:[302]}}})),A.CursorUpSelect=(0,y.registerEditorCommand)(new W({args:{direction:2,unit:2,select:!0,value:1},id:"cursorUpSelect",precondition:void 0,kbOpts:{weight:r,kbExpr:o.EditorContextKeys.textInputFocus,primary:1040,secondary:[3088],mac:{primary:1040},linux:{primary:1040}}})),A.CursorPageUp=(0,y.registerEditorCommand)(new W({args:{direction:2,unit:2,select:!1,value:-1},id:"cursorPageUp",precondition:void 0,kbOpts:{weight:r,kbExpr:o.EditorContextKeys.textInputFocus,primary:11}})),A.CursorPageUpSelect=(0,y.registerEditorCommand)(new W({args:{direction:2,unit:2,select:!0,value:-1},id:"cursorPageUpSelect",precondition:void 0,kbOpts:{weight:r,kbExpr:o.EditorContextKeys.textInputFocus,primary:1035}})),A.CursorDown=(0,y.registerEditorCommand)(new W({args:{direction:3,unit:2,select:!1,value:1},id:"cursorDown",precondition:void 0,kbOpts:{weight:r,kbExpr:o.EditorContextKeys.textInputFocus,primary:18,mac:{primary:18,secondary:[300]}}})),A.CursorDownSelect=(0,y.registerEditorCommand)(new W({args:{direction:3,unit:2,select:!0,value:1},id:"cursorDownSelect",precondition:void 0,kbOpts:{weight:r,kbExpr:o.EditorContextKeys.textInputFocus,primary:1042,secondary:[3090],mac:{primary:1042},linux:{primary:1042}}})),A.CursorPageDown=(0,y.registerEditorCommand)(new W({args:{direction:3,unit:2,select:!1,value:-1},id:"cursorPageDown",precondition:void 0,kbOpts:{weight:r,kbExpr:o.EditorContextKeys.textInputFocus,primary:12}})),A.CursorPageDownSelect=(0,y.registerEditorCommand)(new W({args:{direction:3,unit:2,select:!0,value:-1},id:"cursorPageDownSelect",precondition:void 0,kbOpts:{weight:r,kbExpr:o.EditorContextKeys.textInputFocus,primary:1036}})),A.CreateCursor=(0,y.registerEditorCommand)(new class extends d{constructor(){super({id:"createCursor",precondition:void 0})}runCoreEditorCommand(te,se){if(!se.position)return;let ue;se.wholeLine?ue=n.CursorMoveCommands.line(te,te.getPrimaryCursorState(),!1,se.position,se.viewPosition):ue=n.CursorMoveCommands.moveTo(te,te.getPrimaryCursorState(),!1,se.position,se.viewPosition);const ge=te.getCursorStates();if(ge.length>1){const pe=ue.modelState?ue.modelState.position:null,ce=ue.viewState?ue.viewState.position:null;for(let ie=0,ne=ge.length;ie<ne;ie++){const J=ge[ie];if(!(pe&&!J.modelState.selection.containsPosition(pe))&&!(ce&&!J.viewState.selection.containsPosition(ce))){ge.splice(ie,1),te.model.pushStackElement(),te.setCursorStates(se.source,3,ge);return}}}ge.push(ue),te.model.pushStackElement(),te.setCursorStates(se.source,3,ge)}}),A.LastCursorMoveToSelect=(0,y.registerEditorCommand)(new class extends d{constructor(){super({id:"_lastCursorMoveToSelect",precondition:void 0})}runCoreEditorCommand(te,se){if(!se.position)return;const ue=te.getLastAddedCursorIndex(),ge=te.getCursorStates(),pe=ge.slice(0);pe[ue]=n.CursorMoveCommands.moveTo(te,ge[ue],!0,se.position,se.viewPosition),te.model.pushStackElement(),te.setCursorStates(se.source,3,pe)}});class V extends d{constructor(se){super(se),this._inSelectionMode=se.inSelectionMode}runCoreEditorCommand(se,ue){se.model.pushStackElement(),se.setCursorStates(ue.source,3,n.CursorMoveCommands.moveToBeginningOfLine(se,se.getCursorStates(),this._inSelectionMode)),se.revealAllCursors(ue.source,!0)}}A.CursorHome=(0,y.registerEditorCommand)(new V({inSelectionMode:!1,id:"cursorHome",precondition:void 0,kbOpts:{weight:r,kbExpr:o.EditorContextKeys.textInputFocus,primary:14,mac:{primary:14,secondary:[2063]}}})),A.CursorHomeSelect=(0,y.registerEditorCommand)(new V({inSelectionMode:!0,id:"cursorHomeSelect",precondition:void 0,kbOpts:{weight:r,kbExpr:o.EditorContextKeys.textInputFocus,primary:1038,mac:{primary:1038,secondary:[3087]}}}));class q extends d{constructor(se){super(se),this._inSelectionMode=se.inSelectionMode}runCoreEditorCommand(se,ue){se.model.pushStackElement(),se.setCursorStates(ue.source,3,this._exec(se.getCursorStates())),se.revealAllCursors(ue.source,!0)}_exec(se){const ue=[];for(let ge=0,pe=se.length;ge<pe;ge++){const ce=se[ge],ie=ce.modelState.position.lineNumber;ue[ge]=C.CursorState.fromModelState(ce.modelState.move(this._inSelectionMode,ie,1,0))}return ue}}A.CursorLineStart=(0,y.registerEditorCommand)(new q({inSelectionMode:!1,id:"cursorLineStart",precondition:void 0,kbOpts:{weight:r,kbExpr:o.EditorContextKeys.textInputFocus,primary:0,mac:{primary:287}}})),A.CursorLineStartSelect=(0,y.registerEditorCommand)(new q({inSelectionMode:!0,id:"cursorLineStartSelect",precondition:void 0,kbOpts:{weight:r,kbExpr:o.EditorContextKeys.textInputFocus,primary:0,mac:{primary:1311}}}));class H extends d{constructor(se){super(se),this._inSelectionMode=se.inSelectionMode}runCoreEditorCommand(se,ue){se.model.pushStackElement(),se.setCursorStates(ue.source,3,n.CursorMoveCommands.moveToEndOfLine(se,se.getCursorStates(),this._inSelectionMode,ue.sticky||!1)),se.revealAllCursors(ue.source,!0)}}A.CursorEnd=(0,y.registerEditorCommand)(new H({inSelectionMode:!1,id:"cursorEnd",precondition:void 0,kbOpts:{args:{sticky:!1},weight:r,kbExpr:o.EditorContextKeys.textInputFocus,primary:13,mac:{primary:13,secondary:[2065]}},metadata:{description:"Go to End",args:[{name:"args",schema:{type:"object",properties:{sticky:{description:c.localize(1826,"Stick to the end even when going to longer lines"),type:"boolean",default:!1}}}}]}})),A.CursorEndSelect=(0,y.registerEditorCommand)(new H({inSelectionMode:!0,id:"cursorEndSelect",precondition:void 0,kbOpts:{args:{sticky:!1},weight:r,kbExpr:o.EditorContextKeys.textInputFocus,primary:1037,mac:{primary:1037,secondary:[3089]}},metadata:{description:"Select to End",args:[{name:"args",schema:{type:"object",properties:{sticky:{description:c.localize(1827,"Stick to the end even when going to longer lines"),type:"boolean",default:!1}}}}]}}));class K extends d{constructor(se){super(se),this._inSelectionMode=se.inSelectionMode}runCoreEditorCommand(se,ue){se.model.pushStackElement(),se.setCursorStates(ue.source,3,this._exec(se,se.getCursorStates())),se.revealAllCursors(ue.source,!0)}_exec(se,ue){const ge=[];for(let pe=0,ce=ue.length;pe<ce;pe++){const ie=ue[pe],ne=ie.modelState.position.lineNumber,J=se.model.getLineMaxColumn(ne);ge[pe]=C.CursorState.fromModelState(ie.modelState.move(this._inSelectionMode,ne,J,0))}return ge}}A.CursorLineEnd=(0,y.registerEditorCommand)(new K({inSelectionMode:!1,id:"cursorLineEnd",precondition:void 0,kbOpts:{weight:r,kbExpr:o.EditorContextKeys.textInputFocus,primary:0,mac:{primary:291}}})),A.CursorLineEndSelect=(0,y.registerEditorCommand)(new K({inSelectionMode:!0,id:"cursorLineEndSelect",precondition:void 0,kbOpts:{weight:r,kbExpr:o.EditorContextKeys.textInputFocus,primary:0,mac:{primary:1315}}}));class G extends d{constructor(se){super(se),this._inSelectionMode=se.inSelectionMode}runCoreEditorCommand(se,ue){se.model.pushStackElement(),se.setCursorStates(ue.source,3,n.CursorMoveCommands.moveToBeginningOfBuffer(se,se.getCursorStates(),this._inSelectionMode)),se.revealAllCursors(ue.source,!0)}}A.CursorTop=(0,y.registerEditorCommand)(new G({inSelectionMode:!1,id:"cursorTop",precondition:void 0,kbOpts:{weight:r,kbExpr:o.EditorContextKeys.textInputFocus,primary:2062,mac:{primary:2064}}})),A.CursorTopSelect=(0,y.registerEditorCommand)(new G({inSelectionMode:!0,id:"cursorTopSelect",precondition:void 0,kbOpts:{weight:r,kbExpr:o.EditorContextKeys.textInputFocus,primary:3086,mac:{primary:3088}}}));class Y extends d{constructor(se){super(se),this._inSelectionMode=se.inSelectionMode}runCoreEditorCommand(se,ue){se.model.pushStackElement(),se.setCursorStates(ue.source,3,n.CursorMoveCommands.moveToEndOfBuffer(se,se.getCursorStates(),this._inSelectionMode)),se.revealAllCursors(ue.source,!0)}}A.CursorBottom=(0,y.registerEditorCommand)(new Y({inSelectionMode:!1,id:"cursorBottom",precondition:void 0,kbOpts:{weight:r,kbExpr:o.EditorContextKeys.textInputFocus,primary:2061,mac:{primary:2066}}})),A.CursorBottomSelect=(0,y.registerEditorCommand)(new Y({inSelectionMode:!0,id:"cursorBottomSelect",precondition:void 0,kbOpts:{weight:r,kbExpr:o.EditorContextKeys.textInputFocus,primary:3085,mac:{primary:3090}}}));class X extends d{constructor(){super({id:"editorScroll",precondition:void 0,metadata:m.metadata})}determineScrollMethod(se){const ue=[6],ge=[1,2,3,4,5,6],pe=[4,2],ce=[1,3];return ue.includes(se.unit)&&pe.includes(se.direction)?this._runHorizontalEditorScroll.bind(this):ge.includes(se.unit)&&ce.includes(se.direction)?this._runVerticalEditorScroll.bind(this):null}runCoreEditorCommand(se,ue){const ge=m.parse(ue);if(!ge)return;const pe=this.determineScrollMethod(ge);pe&&pe(se,ue.source,ge)}_runVerticalEditorScroll(se,ue,ge){const pe=this._computeDesiredScrollTop(se,ge);if(ge.revealCursor){const ce=se.getCompletelyVisibleViewRangeAtScrollTop(pe);se.setCursorStates(ue,3,[n.CursorMoveCommands.findPositionInViewportIfOutside(se,se.getPrimaryCursorState(),ce,ge.select)])}se.viewLayout.setScrollPosition({scrollTop:pe},0)}_computeDesiredScrollTop(se,ue){if(ue.unit===1){const ce=se.viewLayout.getFutureViewport(),ie=se.getCompletelyVisibleViewRangeAtScrollTop(ce.top),ne=se.coordinatesConverter.convertViewRangeToModelRange(ie);let J;ue.direction===1?J=Math.max(1,ne.startLineNumber-ue.value):J=Math.min(se.model.getLineCount(),ne.startLineNumber+ue.value);const B=se.coordinatesConverter.convertModelPositionToViewPosition(new t.Position(J,1));return se.viewLayout.getVerticalOffsetForLineNumber(B.lineNumber)}if(ue.unit===5){let ce=0;return ue.direction===3&&(ce=se.model.getLineCount()-se.cursorConfig.pageSize),se.viewLayout.getVerticalOffsetForLineNumber(ce)}let ge;ue.unit===3?ge=se.cursorConfig.pageSize*ue.value:ue.unit===4?ge=Math.round(se.cursorConfig.pageSize/2)*ue.value:ge=ue.value;const pe=(ue.direction===1?-1:1)*ge;return se.viewLayout.getCurrentScrollTop()+pe*se.cursorConfig.lineHeight}_runHorizontalEditorScroll(se,ue,ge){const pe=this._computeDesiredScrollLeft(se,ge);se.viewLayout.setScrollPosition({scrollLeft:pe},0)}_computeDesiredScrollLeft(se,ue){const ge=(ue.direction===4?-1:1)*ue.value;return se.viewLayout.getCurrentScrollLeft()+ge*se.cursorConfig.typicalHalfwidthCharacterWidth}}A.EditorScrollImpl=X,A.EditorScroll=(0,y.registerEditorCommand)(new X),A.ScrollLineUp=(0,y.registerEditorCommand)(new class extends d{constructor(){super({id:"scrollLineUp",precondition:void 0,kbOpts:{weight:r,kbExpr:o.EditorContextKeys.textInputFocus,primary:2064,mac:{primary:267}}})}runCoreEditorCommand(te,se){A.EditorScroll.runCoreEditorCommand(te,{to:m.RawDirection.Up,by:m.RawUnit.WrappedLine,value:1,revealCursor:!1,select:!1,source:se.source})}}),A.ScrollPageUp=(0,y.registerEditorCommand)(new class extends d{constructor(){super({id:"scrollPageUp",precondition:void 0,kbOpts:{weight:r,kbExpr:o.EditorContextKeys.textInputFocus,primary:2059,win:{primary:523},linux:{primary:523}}})}runCoreEditorCommand(te,se){A.EditorScroll.runCoreEditorCommand(te,{to:m.RawDirection.Up,by:m.RawUnit.Page,value:1,revealCursor:!1,select:!1,source:se.source})}}),A.ScrollEditorTop=(0,y.registerEditorCommand)(new class extends d{constructor(){super({id:"scrollEditorTop",precondition:void 0,kbOpts:{weight:r,kbExpr:o.EditorContextKeys.textInputFocus}})}runCoreEditorCommand(te,se){A.EditorScroll.runCoreEditorCommand(te,{to:m.RawDirection.Up,by:m.RawUnit.Editor,value:1,revealCursor:!1,select:!1,source:se.source})}}),A.ScrollLineDown=(0,y.registerEditorCommand)(new class extends d{constructor(){super({id:"scrollLineDown",precondition:void 0,kbOpts:{weight:r,kbExpr:o.EditorContextKeys.textInputFocus,primary:2066,mac:{primary:268}}})}runCoreEditorCommand(te,se){A.EditorScroll.runCoreEditorCommand(te,{to:m.RawDirection.Down,by:m.RawUnit.WrappedLine,value:1,revealCursor:!1,select:!1,source:se.source})}}),A.ScrollPageDown=(0,y.registerEditorCommand)(new class extends d{constructor(){super({id:"scrollPageDown",precondition:void 0,kbOpts:{weight:r,kbExpr:o.EditorContextKeys.textInputFocus,primary:2060,win:{primary:524},linux:{primary:524}}})}runCoreEditorCommand(te,se){A.EditorScroll.runCoreEditorCommand(te,{to:m.RawDirection.Down,by:m.RawUnit.Page,value:1,revealCursor:!1,select:!1,source:se.source})}}),A.ScrollEditorBottom=(0,y.registerEditorCommand)(new class extends d{constructor(){super({id:"scrollEditorBottom",precondition:void 0,kbOpts:{weight:r,kbExpr:o.EditorContextKeys.textInputFocus}})}runCoreEditorCommand(te,se){A.EditorScroll.runCoreEditorCommand(te,{to:m.RawDirection.Down,by:m.RawUnit.Editor,value:1,revealCursor:!1,select:!1,source:se.source})}}),A.ScrollLeft=(0,y.registerEditorCommand)(new class extends d{constructor(){super({id:"scrollLeft",precondition:void 0,kbOpts:{weight:r,kbExpr:o.EditorContextKeys.textInputFocus}})}runCoreEditorCommand(te,se){A.EditorScroll.runCoreEditorCommand(te,{to:m.RawDirection.Left,by:m.RawUnit.Column,value:2,revealCursor:!1,select:!1,source:se.source})}}),A.ScrollRight=(0,y.registerEditorCommand)(new class extends d{constructor(){super({id:"scrollRight",precondition:void 0,kbOpts:{weight:r,kbExpr:o.EditorContextKeys.textInputFocus}})}runCoreEditorCommand(te,se){A.EditorScroll.runCoreEditorCommand(te,{to:m.RawDirection.Right,by:m.RawUnit.Column,value:2,revealCursor:!1,select:!1,source:se.source})}});class Z extends d{constructor(se){super(se),this._inSelectionMode=se.inSelectionMode}runCoreEditorCommand(se,ue){ue.position&&(se.model.pushStackElement(),se.setCursorStates(ue.source,3,[n.CursorMoveCommands.word(se,se.getPrimaryCursorState(),this._inSelectionMode,ue.position)]),ue.revealType!==2&&se.revealAllCursors(ue.source,!0,!0))}}A.WordSelect=(0,y.registerEditorCommand)(new Z({inSelectionMode:!1,id:"_wordSelect",precondition:void 0})),A.WordSelectDrag=(0,y.registerEditorCommand)(new Z({inSelectionMode:!0,id:"_wordSelectDrag",precondition:void 0})),A.LastCursorWordSelect=(0,y.registerEditorCommand)(new class extends d{constructor(){super({id:"lastCursorWordSelect",precondition:void 0})}runCoreEditorCommand(te,se){if(!se.position)return;const ue=te.getLastAddedCursorIndex(),ge=te.getCursorStates(),pe=ge.slice(0),ce=ge[ue];pe[ue]=n.CursorMoveCommands.word(te,ce,ce.modelState.hasSelection(),se.position),te.model.pushStackElement(),te.setCursorStates(se.source,3,pe)}});class j extends d{constructor(se){super(se),this._inSelectionMode=se.inSelectionMode}runCoreEditorCommand(se,ue){ue.position&&(se.model.pushStackElement(),se.setCursorStates(ue.source,3,[n.CursorMoveCommands.line(se,se.getPrimaryCursorState(),this._inSelectionMode,ue.position,ue.viewPosition)]),ue.revealType!==2&&se.revealAllCursors(ue.source,!1,!0))}}A.LineSelect=(0,y.registerEditorCommand)(new j({inSelectionMode:!1,id:"_lineSelect",precondition:void 0})),A.LineSelectDrag=(0,y.registerEditorCommand)(new j({inSelectionMode:!0,id:"_lineSelectDrag",precondition:void 0}));class P extends d{constructor(se){super(se),this._inSelectionMode=se.inSelectionMode}runCoreEditorCommand(se,ue){if(!ue.position)return;const ge=se.getLastAddedCursorIndex(),pe=se.getCursorStates(),ce=pe.slice(0);ce[ge]=n.CursorMoveCommands.line(se,pe[ge],this._inSelectionMode,ue.position,ue.viewPosition),se.model.pushStackElement(),se.setCursorStates(ue.source,3,ce)}}A.LastCursorLineSelect=(0,y.registerEditorCommand)(new P({inSelectionMode:!1,id:"lastCursorLineSelect",precondition:void 0})),A.LastCursorLineSelectDrag=(0,y.registerEditorCommand)(new P({inSelectionMode:!0,id:"lastCursorLineSelectDrag",precondition:void 0})),A.CancelSelection=(0,y.registerEditorCommand)(new class extends d{constructor(){super({id:"cancelSelection",precondition:o.EditorContextKeys.hasNonEmptySelection,kbOpts:{weight:r,kbExpr:o.EditorContextKeys.textInputFocus,primary:9,secondary:[1033]}})}runCoreEditorCommand(te,se){te.model.pushStackElement(),te.setCursorStates(se.source,3,[n.CursorMoveCommands.cancelSelection(te,te.getPrimaryCursorState())]),te.revealAllCursors(se.source,!0)}}),A.RemoveSecondaryCursors=(0,y.registerEditorCommand)(new class extends d{constructor(){super({id:"removeSecondaryCursors",precondition:o.EditorContextKeys.hasMultipleSelections,kbOpts:{weight:r+1,kbExpr:o.EditorContextKeys.textInputFocus,primary:9,secondary:[1033]}})}runCoreEditorCommand(te,se){te.model.pushStackElement(),te.setCursorStates(se.source,3,[te.getPrimaryCursorState()]),te.revealAllCursors(se.source,!0),(0,L.status)(c.localize(1828,"Removed secondary cursors"))}}),A.RevealLine=(0,y.registerEditorCommand)(new class extends d{constructor(){super({id:"revealLine",precondition:void 0,metadata:u.metadata})}runCoreEditorCommand(te,se){const ue=se,ge=ue.lineNumber||0;let pe=typeof ge=="number"?ge+1:parseInt(ge)+1;pe<1&&(pe=1);const ce=te.model.getLineCount();pe>ce&&(pe=ce);const ie=new i.Range(pe,1,pe,te.model.getLineMaxColumn(pe));let ne=0;if(ue.at)switch(ue.at){case u.RawAtArgument.Top:ne=3;break;case u.RawAtArgument.Center:ne=1;break;case u.RawAtArgument.Bottom:ne=4;break;default:break}const J=te.coordinatesConverter.convertModelRangeToViewRange(ie);te.revealRange(se.source,!1,J,ne,0)}}),A.SelectAll=new class extends b{constructor(){super(y.SelectAllCommand)}runDOMCommand(te){k.isFirefox&&(te.focus(),te.select()),te.ownerDocument.execCommand("selectAll")}runEditorCommand(te,se,ue){const ge=se._getViewModel();ge&&this.runCoreEditorCommand(ge,ue)}runCoreEditorCommand(te,se){te.model.pushStackElement(),te.setCursorStates("keyboard",3,[n.CursorMoveCommands.selectAll(te,te.getPrimaryCursorState())])}},A.SetSelection=(0,y.registerEditorCommand)(new class extends d{constructor(){super({id:"setSelection",precondition:void 0})}runCoreEditorCommand(te,se){se.selection&&(te.model.pushStackElement(),te.setCursorStates(se.source,3,[C.CursorState.fromModelSelection(se.selection)]))}})})(v||(e.CoreNavigationCommands=v={}));const w=g.ContextKeyExpr.and(o.EditorContextKeys.textInputFocus,o.EditorContextKeys.columnSelection);function S(A,R){h.KeybindingsRegistry.registerKeybindingRule({id:A,primary:R,when:w,weight:r+1})}S(v.CursorColumnSelectLeft.id,1039),S(v.CursorColumnSelectRight.id,1041),S(v.CursorColumnSelectUp.id,1040),S(v.CursorColumnSelectPageUp.id,1035),S(v.CursorColumnSelectDown.id,1042),S(v.CursorColumnSelectPageDown.id,1036);function D(A){return A.register(),A}var I;(function(A){class R extends y.EditorCommand{runEditorCommand(O,x,F){const W=x._getViewModel();W&&this.runCoreEditingCommand(x,W,F||{})}}A.CoreEditingCommand=R,A.LineBreakInsert=(0,y.registerEditorCommand)(new class extends R{constructor(){super({id:"lineBreakInsert",precondition:o.EditorContextKeys.writable,kbOpts:{weight:r,kbExpr:o.EditorContextKeys.textInputFocus,primary:0,mac:{primary:301}}})}runCoreEditingCommand(N,O,x){N.pushUndoStop(),N.executeCommands(this.id,a.EnterOperation.lineBreakInsert(O.cursorConfig,O.model,O.getCursorStates().map(F=>F.modelState.selection)))}}),A.Outdent=(0,y.registerEditorCommand)(new class extends R{constructor(){super({id:"outdent",precondition:o.EditorContextKeys.writable,kbOpts:{weight:r,kbExpr:g.ContextKeyExpr.and(o.EditorContextKeys.editorTextFocus,o.EditorContextKeys.tabDoesNotMoveFocus),primary:1026}})}runCoreEditingCommand(N,O,x){N.pushUndoStop(),N.executeCommands(this.id,s.TypeOperations.outdent(O.cursorConfig,O.model,O.getCursorStates().map(F=>F.modelState.selection))),N.pushUndoStop()}}),A.Tab=(0,y.registerEditorCommand)(new class extends R{constructor(){super({id:"tab",precondition:o.EditorContextKeys.writable,kbOpts:{weight:r,kbExpr:g.ContextKeyExpr.and(o.EditorContextKeys.editorTextFocus,o.EditorContextKeys.tabDoesNotMoveFocus),primary:2}})}runCoreEditingCommand(N,O,x){N.pushUndoStop(),N.executeCommands(this.id,s.TypeOperations.tab(O.cursorConfig,O.model,O.getCursorStates().map(F=>F.modelState.selection))),N.pushUndoStop()}}),A.DeleteLeft=(0,y.registerEditorCommand)(new class extends R{constructor(){super({id:"deleteLeft",precondition:void 0,kbOpts:{weight:r,kbExpr:o.EditorContextKeys.textInputFocus,primary:1,secondary:[1025],mac:{primary:1,secondary:[1025,294,257]}}})}runCoreEditingCommand(N,O,x){const[F,W]=p.DeleteOperations.deleteLeft(O.getPrevEditOperationType(),O.cursorConfig,O.model,O.getCursorStates().map(V=>V.modelState.selection),O.getCursorAutoClosedCharacters());F&&N.pushUndoStop(),N.executeCommands(this.id,W),O.setPrevEditOperationType(2)}}),A.DeleteRight=(0,y.registerEditorCommand)(new class extends R{constructor(){super({id:"deleteRight",precondition:void 0,kbOpts:{weight:r,kbExpr:o.EditorContextKeys.textInputFocus,primary:20,mac:{primary:20,secondary:[290,276]}}})}runCoreEditingCommand(N,O,x){const[F,W]=p.DeleteOperations.deleteRight(O.getPrevEditOperationType(),O.cursorConfig,O.model,O.getCursorStates().map(V=>V.modelState.selection));F&&N.pushUndoStop(),N.executeCommands(this.id,W),O.setPrevEditOperationType(3)}}),A.Undo=new class extends b{constructor(){super(y.UndoCommand)}runDOMCommand(N){N.ownerDocument.execCommand("undo")}runEditorCommand(N,O,x){if(!(!O.hasModel()||O.getOption(92)===!0))return O.getModel().undo()}},A.Redo=new class extends b{constructor(){super(y.RedoCommand)}runDOMCommand(N){N.ownerDocument.execCommand("redo")}runEditorCommand(N,O,x){if(!(!O.hasModel()||O.getOption(92)===!0))return O.getModel().redo()}}})(I||(e.CoreEditingCommands=I={}));class T extends y.Command{constructor(R,N,O){super({id:R,precondition:void 0,metadata:O}),this._handlerId=N}runCommand(R,N){const O=R.get(f.ICodeEditorService).getFocusedCodeEditor();O&&O.trigger("keyboard",this._handlerId,N)}}function M(A,R){D(new T("default:"+A,A)),D(new T(A,A,R))}M("type",{description:"Type",args:[{name:"args",schema:{type:"object",required:["text"],properties:{text:{type:"string"}}}}]}),M("replacePreviousChar"),M("compositionType"),M("compositionStart"),M("compositionEnd"),M("paste"),M("cut")}),define(oe[716],re([1,0,264,15]),function(ae,e,c,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MarkerDecorationsContribution=void 0;let E=class{static{this.ID="editor.contrib.markerDecorations"}constructor(y,f){}dispose(){}};e.MarkerDecorationsContribution=E,e.MarkerDecorationsContribution=E=De([he(1,c.IMarkerDecorationsService)],E),(0,k.registerEditorContribution)(E.ID,E,0)}),define(oe[717],re([1,0,212,9,16]),function(ae,e,c,k,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewController=void 0;class L{constructor(f,_,C,p){this.configuration=f,this.viewModel=_,this.userInputEvents=C,this.commandDelegate=p}paste(f,_,C,p){this.commandDelegate.paste(f,_,C,p)}type(f){this.commandDelegate.type(f)}compositionType(f,_,C,p){this.commandDelegate.compositionType(f,_,C,p)}compositionStart(){this.commandDelegate.startComposition()}compositionEnd(){this.commandDelegate.endComposition()}cut(){this.commandDelegate.cut()}setSelection(f){c.CoreNavigationCommands.SetSelection.runCoreEditorCommand(this.viewModel,{source:"keyboard",selection:f})}_validateViewColumn(f){const _=this.viewModel.getLineMinColumn(f.lineNumber);return f.column<_?new k.Position(f.lineNumber,_):f}_hasMulticursorModifier(f){switch(this.configuration.options.get(78)){case"altKey":return f.altKey;case"ctrlKey":return f.ctrlKey;case"metaKey":return f.metaKey;default:return!1}}_hasNonMulticursorModifier(f){switch(this.configuration.options.get(78)){case"altKey":return f.ctrlKey||f.metaKey;case"ctrlKey":return f.altKey||f.metaKey;case"metaKey":return f.ctrlKey||f.altKey;default:return!1}}dispatchMouse(f){const _=this.configuration.options,C=E.isLinux&&_.get(108),p=_.get(22);f.middleButton&&!C?this._columnSelect(f.position,f.mouseColumn,f.inSelectionMode):f.startedOnLineNumbers?this._hasMulticursorModifier(f)?f.inSelectionMode?this._lastCursorLineSelect(f.position,f.revealType):this._createCursor(f.position,!0):f.inSelectionMode?this._lineSelectDrag(f.position,f.revealType):this._lineSelect(f.position,f.revealType):f.mouseDownCount>=4?this._selectAll():f.mouseDownCount===3?this._hasMulticursorModifier(f)?f.inSelectionMode?this._lastCursorLineSelectDrag(f.position,f.revealType):this._lastCursorLineSelect(f.position,f.revealType):f.inSelectionMode?this._lineSelectDrag(f.position,f.revealType):this._lineSelect(f.position,f.revealType):f.mouseDownCount===2?f.onInjectedText||(this._hasMulticursorModifier(f)?this._lastCursorWordSelect(f.position,f.revealType):f.inSelectionMode?this._wordSelectDrag(f.position,f.revealType):this._wordSelect(f.position,f.revealType)):this._hasMulticursorModifier(f)?this._hasNonMulticursorModifier(f)||(f.shiftKey?this._columnSelect(f.position,f.mouseColumn,!0):f.inSelectionMode?this._lastCursorMoveToSelect(f.position,f.revealType):this._createCursor(f.position,!1)):f.inSelectionMode?f.altKey?this._columnSelect(f.position,f.mouseColumn,!0):p?this._columnSelect(f.position,f.mouseColumn,!0):this._moveToSelect(f.position,f.revealType):this.moveTo(f.position,f.revealType)}_usualArgs(f,_){return f=this._validateViewColumn(f),{source:"mouse",position:this._convertViewToModelPosition(f),viewPosition:f,revealType:_}}moveTo(f,_){c.CoreNavigationCommands.MoveTo.runCoreEditorCommand(this.viewModel,this._usualArgs(f,_))}_moveToSelect(f,_){c.CoreNavigationCommands.MoveToSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(f,_))}_columnSelect(f,_,C){f=this._validateViewColumn(f),c.CoreNavigationCommands.ColumnSelect.runCoreEditorCommand(this.viewModel,{source:"mouse",position:this._convertViewToModelPosition(f),viewPosition:f,mouseColumn:_,doColumnSelect:C})}_createCursor(f,_){f=this._validateViewColumn(f),c.CoreNavigationCommands.CreateCursor.runCoreEditorCommand(this.viewModel,{source:"mouse",position:this._convertViewToModelPosition(f),viewPosition:f,wholeLine:_})}_lastCursorMoveToSelect(f,_){c.CoreNavigationCommands.LastCursorMoveToSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(f,_))}_wordSelect(f,_){c.CoreNavigationCommands.WordSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(f,_))}_wordSelectDrag(f,_){c.CoreNavigationCommands.WordSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(f,_))}_lastCursorWordSelect(f,_){c.CoreNavigationCommands.LastCursorWordSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(f,_))}_lineSelect(f,_){c.CoreNavigationCommands.LineSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(f,_))}_lineSelectDrag(f,_){c.CoreNavigationCommands.LineSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(f,_))}_lastCursorLineSelect(f,_){c.CoreNavigationCommands.LastCursorLineSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(f,_))}_lastCursorLineSelectDrag(f,_){c.CoreNavigationCommands.LastCursorLineSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(f,_))}_selectAll(){c.CoreNavigationCommands.SelectAll.runCoreEditorCommand(this.viewModel,{source:"mouse"})}_convertViewToModelPosition(f){return this.viewModel.coordinatesConverter.convertViewPositionToModelPosition(f)}emitKeyDown(f){this.userInputEvents.emitKeyDown(f)}emitKeyUp(f){this.userInputEvents.emitKeyUp(f)}emitContextMenu(f){this.userInputEvents.emitContextMenu(f)}emitMouseMove(f){this.userInputEvents.emitMouseMove(f)}emitMouseLeave(f){this.userInputEvents.emitMouseLeave(f)}emitMouseUp(f){this.userInputEvents.emitMouseUp(f)}emitMouseDown(f){this.userInputEvents.emitMouseDown(f)}emitMouseDrag(f){this.userInputEvents.emitMouseDrag(f)}emitMouseDrop(f){this.userInputEvents.emitMouseDrop(f)}emitMouseDropCanceled(){this.userInputEvents.emitMouseDropCanceled()}emitMouseWheel(f){this.userInputEvents.emitMouseWheel(f)}}e.ViewController=L}),define(oe[213],re([1,0,49,7,6,59,56,104,115,66]),function(ae,e,c,k,E,L,y,f,_,C){"use strict";var p;Object.defineProperty(e,"__esModule",{value:!0}),e.WorkerBasedDocumentDiffProvider=e.WorkerBasedDiffProviderFactoryService=e.IDiffProviderFactoryService=void 0,e.IDiffProviderFactoryService=(0,k.createDecorator)("diffProviderFactoryService");let n=class{constructor(i){this.instantiationService=i}createDiffProvider(i){return this.instantiationService.createInstance(s,i)}};e.WorkerBasedDiffProviderFactoryService=n,e.WorkerBasedDiffProviderFactoryService=n=De([he(0,k.IInstantiationService)],n),(0,c.registerSingleton)(e.IDiffProviderFactoryService,n,1);let s=class{static{p=this}static{this.diffCache=new Map}constructor(i,o,g){this.editorWorkerService=o,this.telemetryService=g,this.onDidChangeEventEmitter=new E.Emitter,this.onDidChange=this.onDidChangeEventEmitter.event,this.diffAlgorithm="advanced",this.diffAlgorithmOnDidChangeSubscription=void 0,this.setOptions(i)}dispose(){this.diffAlgorithmOnDidChangeSubscription?.dispose()}async computeDiff(i,o,g,h){if(typeof this.diffAlgorithm!="string")return this.diffAlgorithm.computeDiff(i,o,g,h);if(i.isDisposed()||o.isDisposed())return{changes:[],identical:!0,quitEarly:!1,moves:[]};if(i.getLineCount()===1&&i.getLineMaxColumn(1)===1)return o.getLineCount()===1&&o.getLineMaxColumn(1)===1?{changes:[],identical:!0,quitEarly:!1,moves:[]}:{changes:[new f.DetailedLineRangeMapping(new y.LineRange(1,2),new y.LineRange(1,o.getLineCount()+1),[new f.RangeMapping(i.getFullModelRange(),o.getFullModelRange())])],identical:!1,quitEarly:!1,moves:[]};const l=JSON.stringify([i.uri.toString(),o.uri.toString()]),a=JSON.stringify([i.id,o.id,i.getAlternativeVersionId(),o.getAlternativeVersionId(),JSON.stringify(g)]),r=p.diffCache.get(l);if(r&&r.context===a)return r.result;const d=L.StopWatch.create(),m=await this.editorWorkerService.computeDiff(i.uri,o.uri,g,this.diffAlgorithm),u=d.elapsed();if(this.telemetryService.publicLog2("diffEditor.computeDiff",{timeMs:u,timedOut:m?.quitEarly??!0,detectedMoves:g.computeMoves?m?.moves.length??0:-1}),h.isCancellationRequested)return{changes:[],identical:!1,quitEarly:!0,moves:[]};if(!m)throw new Error("no diff result available");return p.diffCache.size>10&&p.diffCache.delete(p.diffCache.keys().next().value),p.diffCache.set(l,{result:m,context:a}),m}setOptions(i){let o=!1;i.diffAlgorithm&&this.diffAlgorithm!==i.diffAlgorithm&&(this.diffAlgorithmOnDidChangeSubscription?.dispose(),this.diffAlgorithmOnDidChangeSubscription=void 0,this.diffAlgorithm=i.diffAlgorithm,typeof i.diffAlgorithm!="string"&&(this.diffAlgorithmOnDidChangeSubscription=i.diffAlgorithm.onDidChange(()=>this.onDidChangeEventEmitter.fire())),o=!0),o&&this.onDidChangeEventEmitter.fire()}};e.WorkerBasedDocumentDiffProvider=s,e.WorkerBasedDocumentDiffProvider=s=p=De([he(1,_.IEditorWorkerService),he(2,C.ITelemetryService)],s)}),define(oe[402],re([1,0,14,18,2,21,213,85,161,56,331,104,201,334,329,19,13,89]),function(ae,e,c,k,E,L,y,f,_,C,p,n,s,t,i,o,g,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UnchangedRegion=e.DiffMapping=e.DiffState=e.DiffEditorViewModel=void 0;let l=class extends E.Disposable{setActiveMovedText(S){this._activeMovedText.set(S,void 0)}constructor(S,D,I){super(),this.model=S,this._options=D,this._diffProviderFactoryService=I,this._isDiffUpToDate=(0,L.observableValue)(this,!1),this.isDiffUpToDate=this._isDiffUpToDate,this._diff=(0,L.observableValue)(this,void 0),this.diff=this._diff,this._unchangedRegions=(0,L.observableValue)(this,void 0),this.unchangedRegions=(0,L.derived)(this,R=>this._options.hideUnchangedRegions.read(R)?this._unchangedRegions.read(R)?.regions??[]:((0,L.transaction)(N=>{for(const O of this._unchangedRegions.get()?.regions||[])O.collapseAll(N)}),[])),this.movedTextToCompare=(0,L.observableValue)(this,void 0),this._activeMovedText=(0,L.observableValue)(this,void 0),this._hoveredMovedText=(0,L.observableValue)(this,void 0),this.activeMovedText=(0,L.derived)(this,R=>this.movedTextToCompare.read(R)??this._hoveredMovedText.read(R)??this._activeMovedText.read(R)),this._cancellationTokenSource=new k.CancellationTokenSource,this._diffProvider=(0,L.derived)(this,R=>{const N=this._diffProviderFactoryService.createDiffProvider({diffAlgorithm:this._options.diffAlgorithm.read(R)}),O=(0,L.observableSignalFromEvent)("onDidChange",N.onDidChange);return{diffProvider:N,onChangeSignal:O}}),this._register((0,E.toDisposable)(()=>this._cancellationTokenSource.cancel()));const T=(0,L.observableSignal)("contentChangedSignal"),M=this._register(new c.RunOnceScheduler(()=>T.trigger(void 0),200));this._register((0,L.autorun)(R=>{const N=this._unchangedRegions.read(R);if(!N||N.regions.some(q=>q.isDragged.read(R)))return;const O=N.originalDecorationIds.map(q=>S.original.getDecorationRange(q)).map(q=>q?C.LineRange.fromRangeInclusive(q):void 0),x=N.modifiedDecorationIds.map(q=>S.modified.getDecorationRange(q)).map(q=>q?C.LineRange.fromRangeInclusive(q):void 0),F=N.regions.map((q,H)=>!O[H]||!x[H]?void 0:new u(O[H].startLineNumber,x[H].startLineNumber,O[H].length,q.visibleLineCountTop.read(R),q.visibleLineCountBottom.read(R))).filter(o.isDefined),W=[];let V=!1;for(const q of(0,g.groupAdjacentBy)(F,(H,K)=>H.getHiddenModifiedRange(R).endLineNumberExclusive===K.getHiddenModifiedRange(R).startLineNumber))if(q.length>1){V=!0;const H=q.reduce((G,Y)=>G+Y.lineCount,0),K=new u(q[0].originalLineNumber,q[0].modifiedLineNumber,H,q[0].visibleLineCountTop.get(),q[q.length-1].visibleLineCountBottom.get());W.push(K)}else W.push(q[0]);if(V){const q=S.original.deltaDecorations(N.originalDecorationIds,W.map(K=>({range:K.originalUnchangedRange.toInclusiveRange(),options:{description:"unchanged"}}))),H=S.modified.deltaDecorations(N.modifiedDecorationIds,W.map(K=>({range:K.modifiedUnchangedRange.toInclusiveRange(),options:{description:"unchanged"}})));(0,L.transaction)(K=>{this._unchangedRegions.set({regions:W,originalDecorationIds:q,modifiedDecorationIds:H},K)})}}));const A=(R,N,O)=>{const x=u.fromDiffs(R.changes,S.original.getLineCount(),S.modified.getLineCount(),this._options.hideUnchangedRegionsMinimumLineCount.read(O),this._options.hideUnchangedRegionsContextLineCount.read(O));let F;const W=this._unchangedRegions.get();if(W){const K=W.originalDecorationIds.map(Z=>S.original.getDecorationRange(Z)).map(Z=>Z?C.LineRange.fromRangeInclusive(Z):void 0),G=W.modifiedDecorationIds.map(Z=>S.modified.getDecorationRange(Z)).map(Z=>Z?C.LineRange.fromRangeInclusive(Z):void 0);let X=(0,f.filterWithPrevious)(W.regions.map((Z,j)=>{if(!K[j]||!G[j])return;const P=K[j].length;return new u(K[j].startLineNumber,G[j].startLineNumber,P,Math.min(Z.visibleLineCountTop.get(),P),Math.min(Z.visibleLineCountBottom.get(),P-Z.visibleLineCountTop.get()))}).filter(o.isDefined),(Z,j)=>!j||Z.modifiedLineNumber>=j.modifiedLineNumber+j.lineCount&&Z.originalLineNumber>=j.originalLineNumber+j.lineCount).map(Z=>new n.LineRangeMapping(Z.getHiddenOriginalRange(O),Z.getHiddenModifiedRange(O)));X=n.LineRangeMapping.clip(X,C.LineRange.ofLength(1,S.original.getLineCount()),C.LineRange.ofLength(1,S.modified.getLineCount())),F=n.LineRangeMapping.inverse(X,S.original.getLineCount(),S.modified.getLineCount())}const V=[];if(F)for(const K of x){const G=F.filter(Y=>Y.original.intersectsStrict(K.originalUnchangedRange)&&Y.modified.intersectsStrict(K.modifiedUnchangedRange));V.push(...K.setVisibleRanges(G,N))}else V.push(...x);const q=S.original.deltaDecorations(W?.originalDecorationIds||[],V.map(K=>({range:K.originalUnchangedRange.toInclusiveRange(),options:{description:"unchanged"}}))),H=S.modified.deltaDecorations(W?.modifiedDecorationIds||[],V.map(K=>({range:K.modifiedUnchangedRange.toInclusiveRange(),options:{description:"unchanged"}})));this._unchangedRegions.set({regions:V,originalDecorationIds:q,modifiedDecorationIds:H},N)};this._register(S.modified.onDidChangeContent(R=>{if(this._diff.get()){const O=s.TextEditInfo.fromModelContentChanges(R.changes),x=(this._lastDiff,S.original,S.modified,void 0);x&&(this._lastDiff=x,(0,L.transaction)(F=>{this._diff.set(d.fromDiffResult(this._lastDiff),F),A(x,F);const W=this.movedTextToCompare.get();this.movedTextToCompare.set(W?this._lastDiff.moves.find(V=>V.lineRangeMapping.modified.intersect(W.lineRangeMapping.modified)):void 0,F)}))}this._isDiffUpToDate.set(!1,void 0),M.schedule()})),this._register(S.original.onDidChangeContent(R=>{if(this._diff.get()){const O=s.TextEditInfo.fromModelContentChanges(R.changes),x=(this._lastDiff,S.original,S.modified,void 0);x&&(this._lastDiff=x,(0,L.transaction)(F=>{this._diff.set(d.fromDiffResult(this._lastDiff),F),A(x,F);const W=this.movedTextToCompare.get();this.movedTextToCompare.set(W?this._lastDiff.moves.find(V=>V.lineRangeMapping.modified.intersect(W.lineRangeMapping.modified)):void 0,F)}))}this._isDiffUpToDate.set(!1,void 0),M.schedule()})),this._register((0,L.autorunWithStore)(async(R,N)=>{this._options.hideUnchangedRegionsMinimumLineCount.read(R),this._options.hideUnchangedRegionsContextLineCount.read(R),M.cancel(),T.read(R);const O=this._diffProvider.read(R);O.onChangeSignal.read(R),(0,_.readHotReloadableExport)(p.DefaultLinesDiffComputer,R),(0,_.readHotReloadableExport)(i.optimizeSequenceDiffs,R),this._isDiffUpToDate.set(!1,void 0);let x=[];N.add(S.original.onDidChangeContent(V=>{const q=s.TextEditInfo.fromModelContentChanges(V.changes);x=(0,t.combineTextEditInfos)(x,q)}));let F=[];N.add(S.modified.onDidChangeContent(V=>{const q=s.TextEditInfo.fromModelContentChanges(V.changes);F=(0,t.combineTextEditInfos)(F,q)}));let W=await O.diffProvider.computeDiff(S.original,S.modified,{ignoreTrimWhitespace:this._options.ignoreTrimWhitespace.read(R),maxComputationTimeMs:this._options.maxComputationTimeMs.read(R),computeMoves:this._options.showMoves.read(R)},this._cancellationTokenSource.token);this._cancellationTokenSource.token.isCancellationRequested||S.original.isDisposed()||S.modified.isDisposed()||(W=a(W,S.original,S.modified),W=(S.original,S.modified,void 0)??W,W=(S.original,S.modified,void 0)??W,(0,L.transaction)(V=>{A(W,V),this._lastDiff=W;const q=d.fromDiffResult(W);this._diff.set(q,V),this._isDiffUpToDate.set(!0,V);const H=this.movedTextToCompare.get();this.movedTextToCompare.set(H?this._lastDiff.moves.find(K=>K.lineRangeMapping.modified.intersect(H.lineRangeMapping.modified)):void 0,V)}))}))}ensureModifiedLineIsVisible(S,D,I){if(this.diff.get()?.mappings.length===0)return;const T=this._unchangedRegions.get()?.regions||[];for(const M of T)if(M.getHiddenModifiedRange(void 0).contains(S)){M.showModifiedLine(S,D,I);return}}ensureOriginalLineIsVisible(S,D,I){if(this.diff.get()?.mappings.length===0)return;const T=this._unchangedRegions.get()?.regions||[];for(const M of T)if(M.getHiddenOriginalRange(void 0).contains(S)){M.showOriginalLine(S,D,I);return}}async waitForDiff(){await(0,L.waitForState)(this.isDiffUpToDate,S=>S)}serializeState(){return{collapsedRegions:this._unchangedRegions.get()?.regions.map(D=>({range:D.getHiddenModifiedRange(void 0).serialize()}))}}restoreSerializedState(S){const D=S.collapsedRegions?.map(T=>C.LineRange.deserialize(T.range)),I=this._unchangedRegions.get();!I||!D||(0,L.transaction)(T=>{for(const M of I.regions)for(const A of D)if(M.modifiedUnchangedRange.intersect(A)){M.setHiddenModifiedRange(A,T);break}})}};e.DiffEditorViewModel=l,e.DiffEditorViewModel=l=De([he(2,y.IDiffProviderFactoryService)],l);function a(w,S,D){return{changes:w.changes.map(I=>new n.DetailedLineRangeMapping(I.original,I.modified,I.innerChanges?I.innerChanges.map(T=>r(T,S,D)):void 0)),moves:w.moves,identical:w.identical,quitEarly:w.quitEarly}}function r(w,S,D){let I=w.originalRange,T=w.modifiedRange;return I.startColumn===1&&T.startColumn===1&&(I.endColumn!==1||T.endColumn!==1)&&I.endColumn===S.getLineMaxColumn(I.endLineNumber)&&T.endColumn===D.getLineMaxColumn(T.endLineNumber)&&I.endLineNumber<S.getLineCount()&&T.endLineNumber<D.getLineCount()&&(I=I.setEndPosition(I.endLineNumber+1,1),T=T.setEndPosition(T.endLineNumber+1,1)),new n.RangeMapping(I,T)}class d{static fromDiffResult(S){return new d(S.changes.map(D=>new m(D)),S.moves||[],S.identical,S.quitEarly)}constructor(S,D,I,T){this.mappings=S,this.movedTexts=D,this.identical=I,this.quitEarly=T}}e.DiffState=d;class m{constructor(S){this.lineRangeMapping=S}}e.DiffMapping=m;class u{static fromDiffs(S,D,I,T,M){const A=n.DetailedLineRangeMapping.inverse(S,D,I),R=[];for(const N of A){let O=N.original.startLineNumber,x=N.modified.startLineNumber,F=N.original.length;const W=O===1&&x===1,V=O+F===D+1&&x+F===I+1;(W||V)&&F>=M+T?(W&&!V&&(F-=M),V&&!W&&(O+=M,x+=M,F-=M),R.push(new u(O,x,F,0,0))):F>=M*2+T&&(O+=M,x+=M,F-=M*2,R.push(new u(O,x,F,0,0)))}return R}get originalUnchangedRange(){return C.LineRange.ofLength(this.originalLineNumber,this.lineCount)}get modifiedUnchangedRange(){return C.LineRange.ofLength(this.modifiedLineNumber,this.lineCount)}constructor(S,D,I,T,M){this.originalLineNumber=S,this.modifiedLineNumber=D,this.lineCount=I,this._visibleLineCountTop=(0,L.observableValue)(this,0),this.visibleLineCountTop=this._visibleLineCountTop,this._visibleLineCountBottom=(0,L.observableValue)(this,0),this.visibleLineCountBottom=this._visibleLineCountBottom,this._shouldHideControls=(0,L.derived)(this,N=>this.visibleLineCountTop.read(N)+this.visibleLineCountBottom.read(N)===this.lineCount&&!this.isDragged.read(N)),this.isDragged=(0,L.observableValue)(this,void 0);const A=Math.max(Math.min(T,this.lineCount),0),R=Math.max(Math.min(M,this.lineCount-T),0);(0,h.softAssert)(T===A),(0,h.softAssert)(M===R),this._visibleLineCountTop.set(A,void 0),this._visibleLineCountBottom.set(R,void 0)}setVisibleRanges(S,D){const I=[],T=new C.LineRangeSet(S.map(N=>N.modified)).subtractFrom(this.modifiedUnchangedRange);let M=this.originalLineNumber,A=this.modifiedLineNumber;const R=this.modifiedLineNumber+this.lineCount;if(T.ranges.length===0)this.showAll(D),I.push(this);else{let N=0;for(const O of T.ranges){const x=N===T.ranges.length-1;N++;const F=(x?R:O.endLineNumberExclusive)-A,W=new u(M,A,F,0,0);W.setHiddenModifiedRange(O,D),I.push(W),M=W.originalUnchangedRange.endLineNumberExclusive,A=W.modifiedUnchangedRange.endLineNumberExclusive}}return I}shouldHideControls(S){return this._shouldHideControls.read(S)}getHiddenOriginalRange(S){return C.LineRange.ofLength(this.originalLineNumber+this._visibleLineCountTop.read(S),this.lineCount-this._visibleLineCountTop.read(S)-this._visibleLineCountBottom.read(S))}getHiddenModifiedRange(S){return C.LineRange.ofLength(this.modifiedLineNumber+this._visibleLineCountTop.read(S),this.lineCount-this._visibleLineCountTop.read(S)-this._visibleLineCountBottom.read(S))}setHiddenModifiedRange(S,D){const I=S.startLineNumber-this.modifiedLineNumber,T=this.modifiedLineNumber+this.lineCount-S.endLineNumberExclusive;this.setState(I,T,D)}getMaxVisibleLineCountTop(){return this.lineCount-this._visibleLineCountBottom.get()}getMaxVisibleLineCountBottom(){return this.lineCount-this._visibleLineCountTop.get()}showMoreAbove(S=10,D){const I=this.getMaxVisibleLineCountTop();this._visibleLineCountTop.set(Math.min(this._visibleLineCountTop.get()+S,I),D)}showMoreBelow(S=10,D){const I=this.lineCount-this._visibleLineCountTop.get();this._visibleLineCountBottom.set(Math.min(this._visibleLineCountBottom.get()+S,I),D)}showAll(S){this._visibleLineCountBottom.set(this.lineCount-this._visibleLineCountTop.get(),S)}showModifiedLine(S,D,I){const T=S+1-(this.modifiedLineNumber+this._visibleLineCountTop.get()),M=this.modifiedLineNumber-this._visibleLineCountBottom.get()+this.lineCount-S;D===0&&T<M||D===1?this._visibleLineCountTop.set(this._visibleLineCountTop.get()+T,I):this._visibleLineCountBottom.set(this._visibleLineCountBottom.get()+M,I)}showOriginalLine(S,D,I){const T=S-this.originalLineNumber,M=this.originalLineNumber+this.lineCount-S;D===0&&T<M||D===1?this._visibleLineCountTop.set(Math.min(this._visibleLineCountTop.get()+M-T,this.getMaxVisibleLineCountTop()),I):this._visibleLineCountBottom.set(Math.min(this._visibleLineCountBottom.get()+T-M,this.getMaxVisibleLineCountBottom()),I)}collapseAll(S){this._visibleLineCountTop.set(0,S),this._visibleLineCountBottom.set(0,S)}setState(S,D,I){S=Math.max(Math.min(S,this.lineCount),0),D=Math.max(Math.min(D,this.lineCount-S),0),this._visibleLineCountTop.set(S,I),this._visibleLineCountBottom.set(D,I)}}e.UnchangedRegion=u;function b(w,S,D,I){}function v(w,S,D,I){}}),define(oe[718],re([1,0,48,55,72,15,23,20,3,12,512]),function(ae,e,c,k,E,L,y,f,_,C){"use strict";var p;Object.defineProperty(e,"__esModule",{value:!0}),e.SelectionAnchorSet=void 0,e.SelectionAnchorSet=new C.RawContextKey("selectionAnchorSet",!1);let n=class{static{p=this}static{this.ID="editor.contrib.selectionAnchorController"}static get(h){return h.getContribution(p.ID)}constructor(h,l){this.editor=h,this.selectionAnchorSetContextKey=e.SelectionAnchorSet.bindTo(l),this.modelChangeListener=h.onDidChangeModel(()=>this.selectionAnchorSetContextKey.reset())}setSelectionAnchor(){if(this.editor.hasModel()){const h=this.editor.getPosition();this.editor.changeDecorations(l=>{this.decorationId&&l.removeDecoration(this.decorationId),this.decorationId=l.addDecoration(y.Selection.fromPositions(h,h),{description:"selection-anchor",stickiness:1,hoverMessage:new k.MarkdownString().appendText((0,_.localize)(978,"Selection Anchor")),className:"selection-anchor"})}),this.selectionAnchorSetContextKey.set(!!this.decorationId),(0,c.alert)((0,_.localize)(979,"Anchor set at {0}:{1}",h.lineNumber,h.column))}}goToSelectionAnchor(){if(this.editor.hasModel()&&this.decorationId){const h=this.editor.getModel().getDecorationRange(this.decorationId);h&&this.editor.setPosition(h.getStartPosition())}}selectFromAnchorToCursor(){if(this.editor.hasModel()&&this.decorationId){const h=this.editor.getModel().getDecorationRange(this.decorationId);if(h){const l=this.editor.getPosition();this.editor.setSelection(y.Selection.fromPositions(h.getStartPosition(),l)),this.cancelSelectionAnchor()}}}cancelSelectionAnchor(){if(this.decorationId){const h=this.decorationId;this.editor.changeDecorations(l=>{l.removeDecoration(h),this.decorationId=void 0}),this.selectionAnchorSetContextKey.set(!1)}}dispose(){this.cancelSelectionAnchor(),this.modelChangeListener.dispose()}};n=p=De([he(1,C.IContextKeyService)],n);class s extends L.EditorAction{constructor(){super({id:"editor.action.setSelectionAnchor",label:(0,_.localize)(980,"Set Selection Anchor"),alias:"Set Selection Anchor",precondition:void 0,kbOpts:{kbExpr:f.EditorContextKeys.editorTextFocus,primary:(0,E.KeyChord)(2089,2080),weight:100}})}async run(h,l){n.get(l)?.setSelectionAnchor()}}class t extends L.EditorAction{constructor(){super({id:"editor.action.goToSelectionAnchor",label:(0,_.localize)(981,"Go to Selection Anchor"),alias:"Go to Selection Anchor",precondition:e.SelectionAnchorSet})}async run(h,l){n.get(l)?.goToSelectionAnchor()}}class i extends L.EditorAction{constructor(){super({id:"editor.action.selectFromAnchorToCursor",label:(0,_.localize)(982,"Select from Anchor to Cursor"),alias:"Select from Anchor to Cursor",precondition:e.SelectionAnchorSet,kbOpts:{kbExpr:f.EditorContextKeys.editorTextFocus,primary:(0,E.KeyChord)(2089,2089),weight:100}})}async run(h,l){n.get(l)?.selectFromAnchorToCursor()}}class o extends L.EditorAction{constructor(){super({id:"editor.action.cancelSelectionAnchor",label:(0,_.localize)(983,"Cancel Selection Anchor"),alias:"Cancel Selection Anchor",precondition:e.SelectionAnchorSet,kbOpts:{kbExpr:f.EditorContextKeys.editorTextFocus,primary:9,weight:100}})}async run(h,l){n.get(l)?.cancelSelectionAnchor()}}(0,L.registerEditorContribution)(n.ID,n,4),(0,L.registerEditorAction)(s),(0,L.registerEditorAction)(t),(0,L.registerEditorAction)(i),(0,L.registerEditorAction)(o)}),define(oe[719],re([1,0,15,20,628,3]),function(ae,e,c,k,E,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class y extends c.EditorAction{constructor(p,n){super(n),this.left=p}run(p,n){if(!n.hasModel())return;const s=[],t=n.getSelections();for(const i of t)s.push(new E.MoveCaretCommand(i,this.left));n.pushUndoStop(),n.executeCommands(this.id,s),n.pushUndoStop()}}class f extends y{constructor(){super(!0,{id:"editor.action.moveCarretLeftAction",label:L.localize(970,"Move Selected Text Left"),alias:"Move Selected Text Left",precondition:k.EditorContextKeys.writable})}}class _ extends y{constructor(){super(!1,{id:"editor.action.moveCarretRightAction",label:L.localize(971,"Move Selected Text Right"),alias:"Move Selected Text Right",precondition:k.EditorContextKeys.writable})}}(0,c.registerEditorAction)(f),(0,c.registerEditorAction)(_)}),define(oe[720],re([1,0,15,145,244,4,20,3]),function(ae,e,c,k,E,L,y,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class _ extends c.EditorAction{constructor(){super({id:"editor.action.transposeLetters",label:f.localize(969,"Transpose Letters"),alias:"Transpose Letters",precondition:y.EditorContextKeys.writable,kbOpts:{kbExpr:y.EditorContextKeys.textInputFocus,primary:0,mac:{primary:306},weight:100}})}run(p,n){if(!n.hasModel())return;const s=n.getModel(),t=[],i=n.getSelections();for(const o of i){if(!o.isEmpty())continue;const g=o.startLineNumber,h=o.startColumn,l=s.getLineMaxColumn(g);if(g===1&&(h===1||h===2&&l===2))continue;const a=h===l?o.getPosition():E.MoveOperations.rightPosition(s,o.getPosition().lineNumber,o.getPosition().column),r=E.MoveOperations.leftPosition(s,a),d=E.MoveOperations.leftPosition(s,r),m=s.getValueInRange(L.Range.fromPositions(d,r)),u=s.getValueInRange(L.Range.fromPositions(r,a)),b=L.Range.fromPositions(d,a);t.push(new k.ReplaceCommand(b,u+m))}t.length>0&&(n.pushUndoStop(),n.executeCommands(this.id,t),n.pushUndoStop())}}(0,c.registerEditorAction)(_)}),define(oe[721],re([1,0,72,15,4,20,34,348,630,3,29]),function(ae,e,c,k,E,L,y,f,_,C,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class n extends k.EditorAction{constructor(h,l){super(l),this._type=h}run(h,l){const a=h.get(y.ILanguageConfigurationService);if(!l.hasModel())return;const r=l.getModel(),d=[],m=r.getOptions(),u=l.getOption(23),b=l.getSelections().map((w,S)=>({selection:w,index:S,ignoreFirstLine:!1}));b.sort((w,S)=>E.Range.compareRangesUsingStarts(w.selection,S.selection));let v=b[0];for(let w=1;w<b.length;w++){const S=b[w];v.selection.endLineNumber===S.selection.startLineNumber&&(v.index<S.index?S.ignoreFirstLine=!0:(v.ignoreFirstLine=!0,v=S))}for(const w of b)d.push(new _.LineCommentCommand(a,w.selection,m.indentSize,this._type,u.insertSpace,u.ignoreEmptyLines,w.ignoreFirstLine));l.pushUndoStop(),l.executeCommands(this.id,d),l.pushUndoStop()}}class s extends n{constructor(){super(0,{id:"editor.action.commentLine",label:C.localize(884,"Toggle Line Comment"),alias:"Toggle Line Comment",precondition:L.EditorContextKeys.writable,kbOpts:{kbExpr:L.EditorContextKeys.editorTextFocus,primary:2138,weight:100},menuOpts:{menuId:p.MenuId.MenubarEditMenu,group:"5_insert",title:C.localize(885,"&&Toggle Line Comment"),order:1}})}}class t extends n{constructor(){super(1,{id:"editor.action.addCommentLine",label:C.localize(886,"Add Line Comment"),alias:"Add Line Comment",precondition:L.EditorContextKeys.writable,kbOpts:{kbExpr:L.EditorContextKeys.editorTextFocus,primary:(0,c.KeyChord)(2089,2081),weight:100}})}}class i extends n{constructor(){super(2,{id:"editor.action.removeCommentLine",label:C.localize(887,"Remove Line Comment"),alias:"Remove Line Comment",precondition:L.EditorContextKeys.writable,kbOpts:{kbExpr:L.EditorContextKeys.editorTextFocus,primary:(0,c.KeyChord)(2089,2099),weight:100}})}}class o extends k.EditorAction{constructor(){super({id:"editor.action.blockComment",label:C.localize(888,"Toggle Block Comment"),alias:"Toggle Block Comment",precondition:L.EditorContextKeys.writable,kbOpts:{kbExpr:L.EditorContextKeys.editorTextFocus,primary:1567,linux:{primary:3103},weight:100},menuOpts:{menuId:p.MenuId.MenubarEditMenu,group:"5_insert",title:C.localize(889,"Toggle &&Block Comment"),order:2}})}run(h,l){const a=h.get(y.ILanguageConfigurationService);if(!l.hasModel())return;const r=l.getOption(23),d=[],m=l.getSelections();for(const u of m)d.push(new f.BlockCommentCommand(u,r.insertSpace,a));l.pushUndoStop(),l.executeCommands(this.id,d),l.pushUndoStop()}}(0,k.registerEditorAction)(s),(0,k.registerEditorAction)(t),(0,k.registerEditorAction)(i),(0,k.registerEditorAction)(o)}),define(oe[722],re([1,0,2,15,20,3]),function(ae,e,c,k,E,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CursorRedo=e.CursorUndo=e.CursorUndoRedoController=void 0;class y{constructor(s){this.selections=s}equals(s){const t=this.selections.length,i=s.selections.length;if(t!==i)return!1;for(let o=0;o<t;o++)if(!this.selections[o].equalsSelection(s.selections[o]))return!1;return!0}}class f{constructor(s,t,i){this.cursorState=s,this.scrollTop=t,this.scrollLeft=i}}class _ extends c.Disposable{static{this.ID="editor.contrib.cursorUndoRedoController"}static get(s){return s.getContribution(_.ID)}constructor(s){super(),this._editor=s,this._isCursorUndoRedo=!1,this._undoStack=[],this._redoStack=[],this._register(s.onDidChangeModel(t=>{this._undoStack=[],this._redoStack=[]})),this._register(s.onDidChangeModelContent(t=>{this._undoStack=[],this._redoStack=[]})),this._register(s.onDidChangeCursorSelection(t=>{if(this._isCursorUndoRedo||!t.oldSelections||t.oldModelVersionId!==t.modelVersionId)return;const i=new y(t.oldSelections);this._undoStack.length>0&&this._undoStack[this._undoStack.length-1].cursorState.equals(i)||(this._undoStack.push(new f(i,s.getScrollTop(),s.getScrollLeft())),this._redoStack=[],this._undoStack.length>50&&this._undoStack.shift())}))}cursorUndo(){!this._editor.hasModel()||this._undoStack.length===0||(this._redoStack.push(new f(new y(this._editor.getSelections()),this._editor.getScrollTop(),this._editor.getScrollLeft())),this._applyState(this._undoStack.pop()))}cursorRedo(){!this._editor.hasModel()||this._redoStack.length===0||(this._undoStack.push(new f(new y(this._editor.getSelections()),this._editor.getScrollTop(),this._editor.getScrollLeft())),this._applyState(this._redoStack.pop()))}_applyState(s){this._isCursorUndoRedo=!0,this._editor.setSelections(s.cursorState.selections),this._editor.setScrollPosition({scrollTop:s.scrollTop,scrollLeft:s.scrollLeft}),this._isCursorUndoRedo=!1}}e.CursorUndoRedoController=_;class C extends k.EditorAction{constructor(){super({id:"cursorUndo",label:L.localize(872,"Cursor Undo"),alias:"Cursor Undo",precondition:void 0,kbOpts:{kbExpr:E.EditorContextKeys.textInputFocus,primary:2099,weight:100}})}run(s,t,i){_.get(t)?.cursorUndo()}}e.CursorUndo=C;class p extends k.EditorAction{constructor(){super({id:"cursorRedo",label:L.localize(873,"Cursor Redo"),alias:"Cursor Redo",precondition:void 0})}run(s,t,i){_.get(t)?.cursorRedo()}}e.CursorRedo=p,(0,k.registerEditorContribution)(_.ID,_,0),(0,k.registerEditorAction)(C),(0,k.registerEditorAction)(p)}),define(oe[723],re([1,0,15,12,18,73,7,49,3]),function(ae,e,c,k,E,L,y,f,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorKeybindingCancellationTokenSource=void 0;const C=(0,y.createDecorator)("IEditorCancelService"),p=new k.RawContextKey("cancellableOperation",!1,(0,_.localize)(847,"Whether the editor runs a cancellable operation, e.g. like 'Peek References'"));(0,f.registerSingleton)(C,class{constructor(){this._tokens=new WeakMap}add(s,t){let i=this._tokens.get(s);i||(i=s.invokeWithinContext(g=>{const h=p.bindTo(g.get(k.IContextKeyService)),l=new L.LinkedList;return{key:h,tokens:l}}),this._tokens.set(s,i));let o;return i.key.set(!0),o=i.tokens.push(t),()=>{o&&(o(),i.key.set(!i.tokens.isEmpty()),o=void 0)}}cancel(s){const t=this._tokens.get(s);if(!t)return;const i=t.tokens.pop();i&&(i.cancel(),t.key.set(!t.tokens.isEmpty()))}},1);class n extends E.CancellationTokenSource{constructor(t,i){super(i),this.editor=t,this._unregister=t.invokeWithinContext(o=>o.get(C).add(t,this))}dispose(){this._unregister(),super.dispose()}}e.EditorKeybindingCancellationTokenSource=n,(0,c.registerEditorCommand)(new class extends c.EditorCommand{constructor(){super({id:"editor.cancelOperation",kbOpts:{weight:100,primary:9},precondition:p})}runEditorCommand(s,t){s.get(C).cancel(t)}})}),define(oe[121],re([1,0,11,4,18,2,723]),function(ae,e,c,k,E,L,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TextModelCancellationTokenSource=e.EditorStateCancellationTokenSource=e.EditorState=void 0;class f{constructor(n,s){if(this.flags=s,this.flags&1){const t=n.getModel();this.modelVersionId=t?c.format("{0}#{1}",t.uri.toString(),t.getVersionId()):null}else this.modelVersionId=null;this.flags&4?this.position=n.getPosition():this.position=null,this.flags&2?this.selection=n.getSelection():this.selection=null,this.flags&8?(this.scrollLeft=n.getScrollLeft(),this.scrollTop=n.getScrollTop()):(this.scrollLeft=-1,this.scrollTop=-1)}_equals(n){if(!(n instanceof f))return!1;const s=n;return!(this.modelVersionId!==s.modelVersionId||this.scrollLeft!==s.scrollLeft||this.scrollTop!==s.scrollTop||!this.position&&s.position||this.position&&!s.position||this.position&&s.position&&!this.position.equals(s.position)||!this.selection&&s.selection||this.selection&&!s.selection||this.selection&&s.selection&&!this.selection.equalsRange(s.selection))}validate(n){return this._equals(new f(n,this.flags))}}e.EditorState=f;class _ extends y.EditorKeybindingCancellationTokenSource{constructor(n,s,t,i){super(n,i),this._listener=new L.DisposableStore,s&4&&this._listener.add(n.onDidChangeCursorPosition(o=>{(!t||!k.Range.containsPosition(t,o.position))&&this.cancel()})),s&2&&this._listener.add(n.onDidChangeCursorSelection(o=>{(!t||!k.Range.containsRange(t,o.selection))&&this.cancel()})),s&8&&this._listener.add(n.onDidScrollChange(o=>this.cancel())),s&1&&(this._listener.add(n.onDidChangeModel(o=>this.cancel())),this._listener.add(n.onDidChangeModelContent(o=>this.cancel())))}dispose(){this._listener.dispose(),super.dispose()}}e.EditorStateCancellationTokenSource=_;class C extends E.CancellationTokenSource{constructor(n,s){super(s),this._listener=n.onDidChangeContent(()=>this.cancel())}dispose(){this._listener.dispose(),super.dispose()}}e.TextModelCancellationTokenSource=C}),define(oe[155],re([1,0,13,18,8,2,22,151,4,23,17,44,121,3,24,50,96,66,133,90]),function(ae,e,c,k,E,L,y,f,_,C,p,n,s,t,i,o,g,h,l,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ApplyCodeActionReason=e.fixAllCommandId=e.organizeImportsCommandId=e.sourceActionCommandId=e.refactorCommandId=e.autoFixCommandId=e.quickFixCommandId=e.codeActionCommandId=void 0,e.getCodeActions=m,e.applyCodeAction=S,e.codeActionCommandId="editor.action.codeAction",e.quickFixCommandId="editor.action.quickFix",e.autoFixCommandId="editor.action.autoFix",e.refactorCommandId="editor.action.refactor",e.sourceActionCommandId="editor.action.sourceAction",e.organizeImportsCommandId="editor.action.organizeImports",e.fixAllCommandId="editor.action.fixAll";class r extends L.Disposable{static codeActionsPreferredComparator(T,M){return T.isPreferred&&!M.isPreferred?-1:!T.isPreferred&&M.isPreferred?1:0}static codeActionsComparator({action:T},{action:M}){return T.isAI&&!M.isAI?1:!T.isAI&&M.isAI?-1:(0,c.isNonEmptyArray)(T.diagnostics)?(0,c.isNonEmptyArray)(M.diagnostics)?r.codeActionsPreferredComparator(T,M):-1:(0,c.isNonEmptyArray)(M.diagnostics)?1:r.codeActionsPreferredComparator(T,M)}constructor(T,M,A){super(),this.documentation=M,this._register(A),this.allActions=[...T].sort(r.codeActionsComparator),this.validActions=this.allActions.filter(({action:R})=>!R.disabled)}get hasAutoFix(){return this.validActions.some(({action:T})=>!!T.kind&&l.CodeActionKind.QuickFix.contains(new a.HierarchicalKind(T.kind))&&!!T.isPreferred)}get hasAIFix(){return this.validActions.some(({action:T})=>!!T.isAI)}get allAIFixes(){return this.validActions.every(({action:T})=>!!T.isAI)}}const d={actions:[],documentation:void 0};async function m(I,T,M,A,R,N){const O=A.filter||{},x={...O,excludes:[...O.excludes||[],l.CodeActionKind.Notebook]},F={only:O.include?.value,trigger:A.type},W=new s.TextModelCancellationTokenSource(T,N),V=A.type===2,q=u(I,T,V?x:O),H=new L.DisposableStore,K=q.map(async Y=>{try{R.report(Y);const X=await Y.provideCodeActions(T,M,F,W.token);if(X&&H.add(X),W.token.isCancellationRequested)return d;const Z=(X?.actions||[]).filter(P=>P&&(0,l.filtersAction)(O,P)),j=v(Y,Z,O.include);return{actions:Z.map(P=>new l.CodeActionItem(P,Y)),documentation:j}}catch(X){if((0,E.isCancellationError)(X))throw X;return(0,E.onUnexpectedExternalError)(X),d}}),G=I.onDidChange(()=>{const Y=I.all(T);(0,c.equals)(Y,q)||W.cancel()});try{const Y=await Promise.all(K),X=Y.map(j=>j.actions).flat(),Z=[...(0,c.coalesce)(Y.map(j=>j.documentation)),...b(I,T,A,X)];return new r(X,Z,H)}finally{G.dispose(),W.dispose()}}function u(I,T,M){return I.all(T).filter(A=>A.providedCodeActionKinds?A.providedCodeActionKinds.some(R=>(0,l.mayIncludeActionsOfKind)(M,new a.HierarchicalKind(R))):!0)}function*b(I,T,M,A){if(T&&A.length)for(const R of I.all(T))R._getAdditionalMenuItems&&(yield*R._getAdditionalMenuItems?.({trigger:M.type,only:M.filter?.include?.value},A.map(N=>N.action)))}function v(I,T,M){if(!I.documentation)return;const A=I.documentation.map(R=>({kind:new a.HierarchicalKind(R.kind),command:R.command}));if(M){let R;for(const N of A)N.kind.contains(M)&&(R?R.kind.contains(N.kind)&&(R=N):R=N);if(R)return R?.command}for(const R of T)if(R.kind){for(const N of A)if(N.kind.contains(new a.HierarchicalKind(R.kind)))return N.command}}var w;(function(I){I.OnSave="onSave",I.FromProblemsView="fromProblemsView",I.FromCodeActions="fromCodeActions",I.FromAILightbulb="fromAILightbulb"})(w||(e.ApplyCodeActionReason=w={}));async function S(I,T,M,A,R=k.CancellationToken.None){const N=I.get(f.IBulkEditService),O=I.get(i.ICommandService),x=I.get(h.ITelemetryService),F=I.get(o.INotificationService);if(x.publicLog2("codeAction.applyCodeAction",{codeActionTitle:T.action.title,codeActionKind:T.action.kind,codeActionIsPreferred:!!T.action.isPreferred,reason:M}),await T.resolve(R),!R.isCancellationRequested&&!(T.action.edit?.edits.length&&!(await N.apply(T.action.edit,{editor:A?.editor,label:T.action.title,quotableLabel:T.action.title,code:"undoredo.codeAction",respectAutoSaveConfig:M!==w.OnSave,showPreview:A?.preview})).isApplied)&&T.action.command)try{await O.executeCommand(T.action.command.id,...T.action.command.arguments||[])}catch(W){const V=D(W);F.error(typeof V=="string"?V:t.localize(951,"An unknown error occurred while applying the code action"))}}function D(I){return typeof I=="string"?I:I instanceof Error&&typeof I.message=="string"?I.message:void 0}i.CommandsRegistry.registerCommand("_executeCodeActionProvider",async function(I,T,M,A,R){if(!(T instanceof y.URI))throw(0,E.illegalArgument)();const{codeActionProvider:N}=I.get(p.ILanguageFeaturesService),O=I.get(n.IModelService).getModel(T);if(!O)throw(0,E.illegalArgument)();const x=C.Selection.isISelection(M)?C.Selection.liftSelection(M):_.Range.isIRange(M)?O.validateRange(M):void 0;if(!x)throw(0,E.illegalArgument)();const F=typeof A=="string"?new a.HierarchicalKind(A):void 0,W=await m(N,O,x,{type:1,triggerAction:l.CodeActionTriggerSource.Default,filter:{includeSourceActions:!0,include:F}},g.Progress.None,k.CancellationToken.None),V=[],q=Math.min(W.validActions.length,typeof R=="number"?R:0);for(let H=0;H<q;H++)V.push(W.validActions[H].resolve(k.CancellationToken.None));try{return await Promise.all(V),W.validActions.map(H=>H.action)}finally{setTimeout(()=>W.dispose(),100)}})}),define(oe[724],re([1,0,90,98,155,133,31]),function(ae,e,c,k,E,L,y){"use strict";var f;Object.defineProperty(e,"__esModule",{value:!0}),e.CodeActionKeybindingResolver=void 0;let _=class{static{f=this}static{this.codeActionCommands=[E.refactorCommandId,E.codeActionCommandId,E.sourceActionCommandId,E.organizeImportsCommandId,E.fixAllCommandId]}constructor(p){this.keybindingService=p}getResolver(){const p=new k.Lazy(()=>this.keybindingService.getKeybindings().filter(n=>f.codeActionCommands.indexOf(n.command)>=0).filter(n=>n.resolvedKeybinding).map(n=>{let s=n.commandArgs;return n.command===E.organizeImportsCommandId?s={kind:L.CodeActionKind.SourceOrganizeImports.value}:n.command===E.fixAllCommandId&&(s={kind:L.CodeActionKind.SourceFixAll.value}),{resolvedKeybinding:n.resolvedKeybinding,...L.CodeActionCommandArgs.fromUser(s,{kind:c.HierarchicalKind.None,apply:"never"})}}));return n=>{if(n.kind)return this.bestKeybindingForCodeAction(n,p.value)?.resolvedKeybinding}}bestKeybindingForCodeAction(p,n){if(!p.kind)return;const s=new c.HierarchicalKind(p.kind);return n.filter(t=>t.kind.contains(s)).filter(t=>t.preferred?p.isPreferred:!0).reduceRight((t,i)=>t?t.kind.contains(i.kind)?i:t:i,void 0)}};e.CodeActionKeybindingResolver=_,e.CodeActionKeybindingResolver=_=f=De([he(0,y.IKeybindingService)],_)}),define(oe[403],re([1,0,14,8,6,2,51,37,9,23,12,96,133,155,90]),function(ae,e,c,k,E,L,y,f,_,C,p,n,s,t,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CodeActionModel=e.CodeActionsState=e.APPLY_FIX_ALL_COMMAND_ID=e.SUPPORTED_CODE_ACTIONS=void 0,e.SUPPORTED_CODE_ACTIONS=new p.RawContextKey("supportedCodeAction",""),e.APPLY_FIX_ALL_COMMAND_ID="_typescript.applyFixAllCodeAction";class o extends L.Disposable{constructor(r,d,m,u=250){super(),this._editor=r,this._markerService=d,this._signalChange=m,this._delay=u,this._autoTriggerTimer=this._register(new c.TimeoutTimer),this._register(this._markerService.onMarkerChanged(b=>this._onMarkerChanges(b))),this._register(this._editor.onDidChangeCursorPosition(()=>this._tryAutoTrigger()))}trigger(r){const d=this._getRangeOfSelectionUnlessWhitespaceEnclosed(r);this._signalChange(d?{trigger:r,selection:d}:void 0)}_onMarkerChanges(r){const d=this._editor.getModel();d&&r.some(m=>(0,y.isEqual)(m,d.uri))&&this._tryAutoTrigger()}_tryAutoTrigger(){this._autoTriggerTimer.cancelAndSet(()=>{this.trigger({type:2,triggerAction:s.CodeActionTriggerSource.Default})},this._delay)}_getRangeOfSelectionUnlessWhitespaceEnclosed(r){if(!this._editor.hasModel())return;const d=this._editor.getSelection();if(r.type===1)return d;const m=this._editor.getOption(65).enabled;if(m!==f.ShowLightbulbIconMode.Off){{if(m===f.ShowLightbulbIconMode.On)return d;if(m===f.ShowLightbulbIconMode.OnCode){if(!d.isEmpty())return d;const b=this._editor.getModel(),{lineNumber:v,column:w}=d.getPosition(),S=b.getLineContent(v);if(S.length===0)return;if(w===1){if(/\s/.test(S[0]))return}else if(w===b.getLineMaxColumn(v)){if(/\s/.test(S[S.length-1]))return}else if(/\s/.test(S[w-2])&&/\s/.test(S[w-1]))return}}return d}}}var g;(function(a){a.Empty={type:0};class r{constructor(m,u,b){this.trigger=m,this.position=u,this._cancellablePromise=b,this.type=1,this.actions=b.catch(v=>{if((0,k.isCancellationError)(v))return h;throw v})}cancel(){this._cancellablePromise.cancel()}}a.Triggered=r})(g||(e.CodeActionsState=g={}));const h=Object.freeze({allActions:[],validActions:[],dispose:()=>{},documentation:[],hasAutoFix:!1,hasAIFix:!1,allAIFixes:!1});class l extends L.Disposable{constructor(r,d,m,u,b,v){super(),this._editor=r,this._registry=d,this._markerService=m,this._progressService=b,this._configurationService=v,this._codeActionOracle=this._register(new L.MutableDisposable),this._state=g.Empty,this._onDidChangeState=this._register(new E.Emitter),this.onDidChangeState=this._onDidChangeState.event,this._disposed=!1,this._supportedCodeActions=e.SUPPORTED_CODE_ACTIONS.bindTo(u),this._register(this._editor.onDidChangeModel(()=>this._update())),this._register(this._editor.onDidChangeModelLanguage(()=>this._update())),this._register(this._registry.onDidChange(()=>this._update())),this._register(this._editor.onDidChangeConfiguration(w=>{w.hasChanged(65)&&this._update()})),this._update()}dispose(){this._disposed||(this._disposed=!0,super.dispose(),this.setState(g.Empty,!0))}_settingEnabledNearbyQuickfixes(){const r=this._editor?.getModel();return this._configurationService?this._configurationService.getValue("editor.codeActionWidget.includeNearbyQuickFixes",{resource:r?.uri}):!1}_update(){if(this._disposed)return;this._codeActionOracle.value=void 0,this.setState(g.Empty);const r=this._editor.getModel();if(r&&this._registry.has(r)&&!this._editor.getOption(92)){const d=this._registry.all(r).flatMap(m=>m.providedCodeActionKinds??[]);this._supportedCodeActions.set(d.join(" ")),this._codeActionOracle.value=new o(this._editor,this._markerService,m=>{if(!m){this.setState(g.Empty);return}const u=m.selection.getStartPosition(),b=(0,c.createCancelablePromise)(async S=>{if(this._settingEnabledNearbyQuickfixes()&&m.trigger.type===1&&(m.trigger.triggerAction===s.CodeActionTriggerSource.QuickFix||m.trigger.filter?.include?.contains(s.CodeActionKind.QuickFix))){const D=await(0,t.getCodeActions)(this._registry,r,m.selection,m.trigger,n.Progress.None,S),I=[...D.allActions];if(S.isCancellationRequested)return h;const T=D.validActions?.some(A=>A.action.kind?s.CodeActionKind.QuickFix.contains(new i.HierarchicalKind(A.action.kind)):!1),M=this._markerService.read({resource:r.uri});if(T){for(const A of D.validActions)A.action.command?.arguments?.some(R=>typeof R=="string"&&R.includes(e.APPLY_FIX_ALL_COMMAND_ID))&&(A.action.diagnostics=[...M.filter(R=>R.relatedInformation)]);return{validActions:D.validActions,allActions:I,documentation:D.documentation,hasAutoFix:D.hasAutoFix,hasAIFix:D.hasAIFix,allAIFixes:D.allAIFixes,dispose:()=>{D.dispose()}}}else if(!T&&M.length>0){const A=m.selection.getPosition();let R=A,N=Number.MAX_VALUE;const O=[...D.validActions];for(const F of M){const W=F.endColumn,V=F.endLineNumber,q=F.startLineNumber;if(V===A.lineNumber||q===A.lineNumber){R=new _.Position(V,W);const H={type:m.trigger.type,triggerAction:m.trigger.triggerAction,filter:{include:m.trigger.filter?.include?m.trigger.filter?.include:s.CodeActionKind.QuickFix},autoApply:m.trigger.autoApply,context:{notAvailableMessage:m.trigger.context?.notAvailableMessage||"",position:R}},K=new C.Selection(R.lineNumber,R.column,R.lineNumber,R.column),G=await(0,t.getCodeActions)(this._registry,r,K,H,n.Progress.None,S);if(G.validActions.length!==0){for(const Y of G.validActions)Y.action.command?.arguments?.some(X=>typeof X=="string"&&X.includes(e.APPLY_FIX_ALL_COMMAND_ID))&&(Y.action.diagnostics=[...M.filter(X=>X.relatedInformation)]);D.allActions.length===0&&I.push(...G.allActions),Math.abs(A.column-W)<N?O.unshift(...G.validActions):O.push(...G.validActions)}N=Math.abs(A.column-W)}}const x=O.filter((F,W,V)=>V.findIndex(q=>q.action.title===F.action.title)===W);return x.sort((F,W)=>F.action.isPreferred&&!W.action.isPreferred?-1:!F.action.isPreferred&&W.action.isPreferred||F.action.isAI&&!W.action.isAI?1:!F.action.isAI&&W.action.isAI?-1:0),{validActions:x,allActions:I,documentation:D.documentation,hasAutoFix:D.hasAutoFix,hasAIFix:D.hasAIFix,allAIFixes:D.allAIFixes,dispose:()=>{D.dispose()}}}}return(0,t.getCodeActions)(this._registry,r,m.selection,m.trigger,n.Progress.None,S)});m.trigger.type===1&&this._progressService?.showWhile(b,250);const v=new g.Triggered(m.trigger,u,b);let w=!1;this._state.type===1&&(w=this._state.trigger.type===1&&v.type===1&&v.trigger.type===2&&this._state.position!==v.position),w?setTimeout(()=>{this.setState(v)},500):this.setState(v)},void 0),this._codeActionOracle.value.trigger({type:2,triggerAction:s.CodeActionTriggerSource.Default})}else this._supportedCodeActions.reset()}trigger(r){this._codeActionOracle.value?.trigger(r)}setState(r,d){r!==this._state&&(this._state.type===1&&this._state.cancel(),this._state=r,!d&&!this._disposed&&this._onDidChangeState.fire(r))}}e.CodeActionModel=l}),define(oe[725],re([1,0,15,167,3]),function(ae,e,c,k,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class L extends c.EditorAction{constructor(){super({id:"editor.action.fontZoomIn",label:E.localize(773,"Increase Editor Font Size"),alias:"Increase Editor Font Size",precondition:void 0})}run(C,p){k.EditorZoom.setZoomLevel(k.EditorZoom.getZoomLevel()+1)}}class y extends c.EditorAction{constructor(){super({id:"editor.action.fontZoomOut",label:E.localize(774,"Decrease Editor Font Size"),alias:"Decrease Editor Font Size",precondition:void 0})}run(C,p){k.EditorZoom.setZoomLevel(k.EditorZoom.getZoomLevel()-1)}}class f extends c.EditorAction{constructor(){super({id:"editor.action.fontZoomReset",label:E.localize(775,"Reset Editor Font Size"),alias:"Reset Editor Font Size",precondition:void 0})}run(C,p){k.EditorZoom.setZoomLevel(0)}}(0,c.registerEditorAction)(L),(0,c.registerEditorAction)(y),(0,c.registerEditorAction)(f)}),define(oe[404],re([1,0,13,18,8,53,73,19,22,121,171,9,4,23,115,78,352,24,668,7,17,61,136]),function(ae,e,c,k,E,L,y,f,_,C,p,n,s,t,i,o,g,h,l,a,r,d,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FormattingConflicts=void 0,e.getRealAndSyntheticDocumentFormattersOrdered=u,e.formatDocumentRangesWithSelectedProvider=v,e.formatDocumentRangesWithProvider=w,e.formatDocumentWithSelectedProvider=S,e.formatDocumentWithProvider=D,e.getDocumentRangeFormattingEditsUntilResult=I,e.getDocumentFormattingEditsUntilResult=T,e.getOnTypeFormattingEdits=M;function u(A,R,N){const O=[],x=new l.ExtensionIdentifierSet,F=A.ordered(N);for(const V of F)O.push(V),V.extensionId&&x.add(V.extensionId);const W=R.ordered(N);for(const V of W){if(V.extensionId){if(x.has(V.extensionId))continue;x.add(V.extensionId)}O.push({displayName:V.displayName,extensionId:V.extensionId,provideDocumentFormattingEdits(q,H,K){return V.provideDocumentRangeFormattingEdits(q,q.getFullModelRange(),H,K)}})}return O}class b{static{this._selectors=new y.LinkedList}static setFormatterSelector(R){return{dispose:b._selectors.unshift(R)}}static async select(R,N,O,x){if(R.length===0)return;const F=L.Iterable.first(b._selectors);if(F)return await F(R,N,O,x)}}e.FormattingConflicts=b;async function v(A,R,N,O,x,F,W){const V=A.get(a.IInstantiationService),{documentRangeFormattingEditProvider:q}=A.get(r.ILanguageFeaturesService),H=(0,p.isCodeEditor)(R)?R.getModel():R,K=q.ordered(H),G=await b.select(K,H,O,2);G&&(x.report(G),await V.invokeFunction(w,G,R,N,F,W))}async function w(A,R,N,O,x,F){const W=A.get(i.IEditorWorkerService),V=A.get(d.ILogService),q=A.get(m.IAccessibilitySignalService);let H,K;(0,p.isCodeEditor)(N)?(H=N.getModel(),K=new C.EditorStateCancellationTokenSource(N,5,void 0,x)):(H=N,K=new C.TextModelCancellationTokenSource(N,x));const G=[];let Y=0;for(const te of(0,c.asArray)(O).sort(s.Range.compareRangesUsingStarts))Y>0&&s.Range.areIntersectingOrTouching(G[Y-1],te)?G[Y-1]=s.Range.fromPositions(G[Y-1].getStartPosition(),te.getEndPosition()):Y=G.push(te);const X=async te=>{V.trace("[format][provideDocumentRangeFormattingEdits] (request)",R.extensionId?.value,te);const se=await R.provideDocumentRangeFormattingEdits(H,te,H.getFormattingOptions(),K.token)||[];return V.trace("[format][provideDocumentRangeFormattingEdits] (response)",R.extensionId?.value,se),se},Z=(te,se)=>{if(!te.length||!se.length)return!1;const ue=te.reduce((ge,pe)=>s.Range.plusRange(ge,pe.range),te[0].range);if(!se.some(ge=>s.Range.intersectRanges(ue,ge.range)))return!1;for(const ge of te)for(const pe of se)if(s.Range.intersectRanges(ge.range,pe.range))return!0;return!1},j=[],P=[];try{if(typeof R.provideDocumentRangesFormattingEdits=="function"){V.trace("[format][provideDocumentRangeFormattingEdits] (request)",R.extensionId?.value,G);const te=await R.provideDocumentRangesFormattingEdits(H,G,H.getFormattingOptions(),K.token)||[];V.trace("[format][provideDocumentRangeFormattingEdits] (response)",R.extensionId?.value,te),P.push(te)}else{for(const te of G){if(K.token.isCancellationRequested)return!0;P.push(await X(te))}for(let te=0;te<G.length;++te)for(let se=te+1;se<G.length;++se){if(K.token.isCancellationRequested)return!0;if(Z(P[te],P[se])){const ue=s.Range.plusRange(G[te],G[se]),ge=await X(ue);G.splice(se,1),G.splice(te,1),G.push(ue),P.splice(se,1),P.splice(te,1),P.push(ge),te=0,se=0}}}for(const te of P){if(K.token.isCancellationRequested)return!0;const se=await W.computeMoreMinimalEdits(H.uri,te);se&&j.push(...se)}}finally{K.dispose()}if(j.length===0)return!1;if((0,p.isCodeEditor)(N))g.FormattingEdit.execute(N,j,!0),N.revealPositionInCenterIfOutsideViewport(N.getPosition(),1);else{const[{range:te}]=j,se=new t.Selection(te.startLineNumber,te.startColumn,te.endLineNumber,te.endColumn);H.pushEditOperations([se],j.map(ue=>({text:ue.text,range:s.Range.lift(ue.range),forceMoveMarkers:!0})),ue=>{for(const{range:ge}of ue)if(s.Range.areIntersectingOrTouching(ge,se))return[new t.Selection(ge.startLineNumber,ge.startColumn,ge.endLineNumber,ge.endColumn)];return null})}return q.playSignal(m.AccessibilitySignal.format,{userGesture:F}),!0}async function S(A,R,N,O,x,F){const W=A.get(a.IInstantiationService),V=A.get(r.ILanguageFeaturesService),q=(0,p.isCodeEditor)(R)?R.getModel():R,H=u(V.documentFormattingEditProvider,V.documentRangeFormattingEditProvider,q),K=await b.select(H,q,N,1);K&&(O.report(K),await W.invokeFunction(D,K,R,N,x,F))}async function D(A,R,N,O,x,F){const W=A.get(i.IEditorWorkerService),V=A.get(m.IAccessibilitySignalService);let q,H;(0,p.isCodeEditor)(N)?(q=N.getModel(),H=new C.EditorStateCancellationTokenSource(N,5,void 0,x)):(q=N,H=new C.TextModelCancellationTokenSource(N,x));let K;try{const G=await R.provideDocumentFormattingEdits(q,q.getFormattingOptions(),H.token);if(K=await W.computeMoreMinimalEdits(q.uri,G),H.token.isCancellationRequested)return!0}finally{H.dispose()}if(!K||K.length===0)return!1;if((0,p.isCodeEditor)(N))g.FormattingEdit.execute(N,K,O!==2),O!==2&&N.revealPositionInCenterIfOutsideViewport(N.getPosition(),1);else{const[{range:G}]=K,Y=new t.Selection(G.startLineNumber,G.startColumn,G.endLineNumber,G.endColumn);q.pushEditOperations([Y],K.map(X=>({text:X.text,range:s.Range.lift(X.range),forceMoveMarkers:!0})),X=>{for(const{range:Z}of X)if(s.Range.areIntersectingOrTouching(Z,Y))return[new t.Selection(Z.startLineNumber,Z.startColumn,Z.endLineNumber,Z.endColumn)];return null})}return V.playSignal(m.AccessibilitySignal.format,{userGesture:F}),!0}async function I(A,R,N,O,x,F){const W=R.documentRangeFormattingEditProvider.ordered(N);for(const V of W){const q=await Promise.resolve(V.provideDocumentRangeFormattingEdits(N,O,x,F)).catch(E.onUnexpectedExternalError);if((0,c.isNonEmptyArray)(q))return await A.computeMoreMinimalEdits(N.uri,q)}}async function T(A,R,N,O,x){const F=u(R.documentFormattingEditProvider,R.documentRangeFormattingEditProvider,N);for(const W of F){const V=await Promise.resolve(W.provideDocumentFormattingEdits(N,O,x)).catch(E.onUnexpectedExternalError);if((0,c.isNonEmptyArray)(V))return await A.computeMoreMinimalEdits(N.uri,V)}}function M(A,R,N,O,x,F,W){const V=R.onTypeFormattingEditProvider.ordered(N);return V.length===0||V[0].autoFormatTriggerCharacters.indexOf(x)<0?Promise.resolve(void 0):Promise.resolve(V[0].provideOnTypeFormattingEdits(N,O,x,F,W)).catch(E.onUnexpectedExternalError).then(q=>A.computeMoreMinimalEdits(N.uri,q))}h.CommandsRegistry.registerCommand("_executeFormatRangeProvider",async function(A,...R){const[N,O,x]=R;(0,f.assertType)(_.URI.isUri(N)),(0,f.assertType)(s.Range.isIRange(O));const F=A.get(o.ITextModelService),W=A.get(i.IEditorWorkerService),V=A.get(r.ILanguageFeaturesService),q=await F.createModelReference(N);try{return I(W,V,q.object.textEditorModel,s.Range.lift(O),x,k.CancellationToken.None)}finally{q.dispose()}}),h.CommandsRegistry.registerCommand("_executeFormatDocumentProvider",async function(A,...R){const[N,O]=R;(0,f.assertType)(_.URI.isUri(N));const x=A.get(o.ITextModelService),F=A.get(i.IEditorWorkerService),W=A.get(r.ILanguageFeaturesService),V=await x.createModelReference(N);try{return T(F,W,V.object.textEditorModel,O,k.CancellationToken.None)}finally{V.dispose()}}),h.CommandsRegistry.registerCommand("_executeFormatOnTypeProvider",async function(A,...R){const[N,O,x,F]=R;(0,f.assertType)(_.URI.isUri(N)),(0,f.assertType)(n.Position.isIPosition(O)),(0,f.assertType)(typeof x=="string");const W=A.get(o.ITextModelService),V=A.get(i.IEditorWorkerService),q=A.get(r.ILanguageFeaturesService),H=await W.createModelReference(N);try{return M(V,q,H.object.textEditorModel,n.Position.lift(O),x,F,k.CancellationToken.None)}finally{H.dispose()}})}),define(oe[726],re([1,0,13,18,8,72,2,15,35,143,4,20,115,17,404,352,3,136,24,12,7,96]),function(ae,e,c,k,E,L,y,f,_,C,p,n,s,t,i,o,g,h,l,a,r,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FormatOnType=void 0;let m=class{static{this.ID="editor.contrib.autoFormat"}constructor(S,D,I,T){this._editor=S,this._languageFeaturesService=D,this._workerService=I,this._accessibilitySignalService=T,this._disposables=new y.DisposableStore,this._sessionDisposables=new y.DisposableStore,this._disposables.add(D.onTypeFormattingEditProvider.onDidChange(this._update,this)),this._disposables.add(S.onDidChangeModel(()=>this._update())),this._disposables.add(S.onDidChangeModelLanguage(()=>this._update())),this._disposables.add(S.onDidChangeConfiguration(M=>{M.hasChanged(56)&&this._update()})),this._update()}dispose(){this._disposables.dispose(),this._sessionDisposables.dispose()}_update(){if(this._sessionDisposables.clear(),!this._editor.getOption(56)||!this._editor.hasModel())return;const S=this._editor.getModel(),[D]=this._languageFeaturesService.onTypeFormattingEditProvider.ordered(S);if(!D||!D.autoFormatTriggerCharacters)return;const I=new C.CharacterSet;for(const T of D.autoFormatTriggerCharacters)I.add(T.charCodeAt(0));this._sessionDisposables.add(this._editor.onDidType(T=>{const M=T.charCodeAt(T.length-1);I.has(M)&&this._trigger(String.fromCharCode(M))}))}_trigger(S){if(!this._editor.hasModel()||this._editor.getSelections().length>1||!this._editor.getSelection().isEmpty())return;const D=this._editor.getModel(),I=this._editor.getPosition(),T=new k.CancellationTokenSource,M=this._editor.onDidChangeModelContent(A=>{if(A.isFlush){T.cancel(),M.dispose();return}for(let R=0,N=A.changes.length;R<N;R++)if(A.changes[R].range.endLineNumber<=I.lineNumber){T.cancel(),M.dispose();return}});(0,i.getOnTypeFormattingEdits)(this._workerService,this._languageFeaturesService,D,I,S,D.getFormattingOptions(),T.token).then(A=>{T.token.isCancellationRequested||(0,c.isNonEmptyArray)(A)&&(this._accessibilitySignalService.playSignal(h.AccessibilitySignal.format,{userGesture:!1}),o.FormattingEdit.execute(this._editor,A,!0))}).finally(()=>{M.dispose()})}};e.FormatOnType=m,e.FormatOnType=m=De([he(1,t.ILanguageFeaturesService),he(2,s.IEditorWorkerService),he(3,h.IAccessibilitySignalService)],m);let u=class{static{this.ID="editor.contrib.formatOnPaste"}constructor(S,D,I){this.editor=S,this._languageFeaturesService=D,this._instantiationService=I,this._callOnDispose=new y.DisposableStore,this._callOnModel=new y.DisposableStore,this._callOnDispose.add(S.onDidChangeConfiguration(()=>this._update())),this._callOnDispose.add(S.onDidChangeModel(()=>this._update())),this._callOnDispose.add(S.onDidChangeModelLanguage(()=>this._update())),this._callOnDispose.add(D.documentRangeFormattingEditProvider.onDidChange(this._update,this))}dispose(){this._callOnDispose.dispose(),this._callOnModel.dispose()}_update(){this._callOnModel.clear(),this.editor.getOption(55)&&this.editor.hasModel()&&this._languageFeaturesService.documentRangeFormattingEditProvider.has(this.editor.getModel())&&this._callOnModel.add(this.editor.onDidPaste(({range:S})=>this._trigger(S)))}_trigger(S){this.editor.hasModel()&&(this.editor.getSelections().length>1||this._instantiationService.invokeFunction(i.formatDocumentRangesWithSelectedProvider,this.editor,S,2,d.Progress.None,k.CancellationToken.None,!1).catch(E.onUnexpectedError))}};u=De([he(1,t.ILanguageFeaturesService),he(2,r.IInstantiationService)],u);class b extends f.EditorAction{constructor(){super({id:"editor.action.formatDocument",label:g.localize(771,"Format Document"),alias:"Format Document",precondition:a.ContextKeyExpr.and(n.EditorContextKeys.notInCompositeEditor,n.EditorContextKeys.writable,n.EditorContextKeys.hasDocumentFormattingProvider),kbOpts:{kbExpr:n.EditorContextKeys.editorTextFocus,primary:1572,linux:{primary:3111},weight:100},contextMenuOpts:{group:"1_modification",order:1.3}})}async run(S,D){if(D.hasModel()){const I=S.get(r.IInstantiationService);await S.get(d.IEditorProgressService).showWhile(I.invokeFunction(i.formatDocumentWithSelectedProvider,D,1,d.Progress.None,k.CancellationToken.None,!0),250)}}}class v extends f.EditorAction{constructor(){super({id:"editor.action.formatSelection",label:g.localize(772,"Format Selection"),alias:"Format Selection",precondition:a.ContextKeyExpr.and(n.EditorContextKeys.writable,n.EditorContextKeys.hasDocumentSelectionFormattingProvider),kbOpts:{kbExpr:n.EditorContextKeys.editorTextFocus,primary:(0,L.KeyChord)(2089,2084),weight:100},contextMenuOpts:{when:n.EditorContextKeys.hasNonEmptySelection,group:"1_modification",order:1.31}})}async run(S,D){if(!D.hasModel())return;const I=S.get(r.IInstantiationService),T=D.getModel(),M=D.getSelections().map(R=>R.isEmpty()?new p.Range(R.startLineNumber,1,R.startLineNumber,T.getLineMaxColumn(R.startLineNumber)):R);await S.get(d.IEditorProgressService).showWhile(I.invokeFunction(i.formatDocumentRangesWithSelectedProvider,D,M,1,d.Progress.None,k.CancellationToken.None,!0),250)}}(0,f.registerEditorContribution)(m.ID,m,2),(0,f.registerEditorContribution)(u.ID,u,2),(0,f.registerEditorAction)(b),(0,f.registerEditorAction)(v),l.CommandsRegistry.registerCommand("editor.action.format",async w=>{const S=w.get(_.ICodeEditorService).getFocusedCodeEditor();if(!S||!S.hasModel())return;const D=w.get(l.ICommandService);S.getSelection().isEmpty()?await D.executeCommand("editor.action.formatDocument"):await D.executeCommand("editor.action.formatSelection")})}),define(oe[276],re([1,0,13,18,8,47,15,17,177]),function(ae,e,c,k,E,L,y,f,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getDefinitionsAtPosition=n,e.getDeclarationsAtPosition=s,e.getImplementationsAtPosition=t,e.getTypeDefinitionsAtPosition=i,e.getReferencesAtPosition=o;function C(h,l){return l.uri.scheme===h.uri.scheme?!0:!(0,L.matchesSomeScheme)(l.uri,L.Schemas.walkThroughSnippet,L.Schemas.vscodeChatCodeBlock,L.Schemas.vscodeChatCodeCompareBlock,L.Schemas.vscodeCopilotBackingChatCodeBlock)}async function p(h,l,a,r){const m=a.ordered(h).map(b=>Promise.resolve(r(b,h,l)).then(void 0,v=>{(0,E.onUnexpectedExternalError)(v)})),u=await Promise.all(m);return(0,c.coalesce)(u.flat()).filter(b=>C(h,b))}function n(h,l,a,r){return p(l,a,h,(d,m,u)=>d.provideDefinition(m,u,r))}function s(h,l,a,r){return p(l,a,h,(d,m,u)=>d.provideDeclaration(m,u,r))}function t(h,l,a,r){return p(l,a,h,(d,m,u)=>d.provideImplementation(m,u,r))}function i(h,l,a,r){return p(l,a,h,(d,m,u)=>d.provideTypeDefinition(m,u,r))}function o(h,l,a,r,d){return p(l,a,h,async(m,u,b)=>{const v=(await m.provideReferences(u,b,{includeDeclaration:!0},d))?.filter(S=>C(u,S));if(!r||!v||v.length!==2)return v;const w=(await m.provideReferences(u,b,{includeDeclaration:!1},d))?.filter(S=>C(u,S));return w&&w.length===1?w:v})}async function g(h){const l=await h(),a=new _.ReferencesModel(l,""),r=a.references.map(d=>d.link);return a.dispose(),r}(0,y.registerModelAndPositionCommand)("_executeDefinitionProvider",(h,l,a)=>{const r=h.get(f.ILanguageFeaturesService),d=n(r.definitionProvider,l,a,k.CancellationToken.None);return g(()=>d)}),(0,y.registerModelAndPositionCommand)("_executeTypeDefinitionProvider",(h,l,a)=>{const r=h.get(f.ILanguageFeaturesService),d=i(r.typeDefinitionProvider,l,a,k.CancellationToken.None);return g(()=>d)}),(0,y.registerModelAndPositionCommand)("_executeDeclarationProvider",(h,l,a)=>{const r=h.get(f.ILanguageFeaturesService),d=s(r.declarationProvider,l,a,k.CancellationToken.None);return g(()=>d)}),(0,y.registerModelAndPositionCommand)("_executeReferenceProvider",(h,l,a)=>{const r=h.get(f.ILanguageFeaturesService),d=o(r.referenceProvider,l,a,!1,k.CancellationToken.None);return g(()=>d)}),(0,y.registerModelAndPositionCommand)("_executeImplementationProvider",(h,l,a)=>{const r=h.get(f.ILanguageFeaturesService),d=t(r.implementationProvider,l,a,k.CancellationToken.None);return g(()=>d)})}),define(oe[727],re([1,0,6,2,51,15,35,4,3,12,49,7,31,120,50]),function(ae,e,c,k,E,L,y,f,_,C,p,n,s,t,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ISymbolNavigationService=e.ctxHasSymbols=void 0,e.ctxHasSymbols=new C.RawContextKey("hasSymbols",!1,(0,_.localize)(699,"Whether there are symbol locations that can be navigated via keyboard-only.")),e.ISymbolNavigationService=(0,n.createDecorator)("ISymbolNavigationService");let o=class{constructor(l,a,r,d){this._editorService=a,this._notificationService=r,this._keybindingService=d,this._currentModel=void 0,this._currentIdx=-1,this._ignoreEditorChange=!1,this._ctxHasSymbols=e.ctxHasSymbols.bindTo(l)}reset(){this._ctxHasSymbols.reset(),this._currentState?.dispose(),this._currentMessage?.dispose(),this._currentModel=void 0,this._currentIdx=-1}put(l){const a=l.parent.parent;if(a.references.length<=1){this.reset();return}this._currentModel=a,this._currentIdx=a.references.indexOf(l),this._ctxHasSymbols.set(!0),this._showMessage();const r=new g(this._editorService),d=r.onDidChange(m=>{if(this._ignoreEditorChange)return;const u=this._editorService.getActiveCodeEditor();if(!u)return;const b=u.getModel(),v=u.getPosition();if(!b||!v)return;let w=!1,S=!1;for(const D of a.references)if((0,E.isEqual)(D.uri,b.uri))w=!0,S=S||f.Range.containsPosition(D.range,v);else if(w)break;(!w||!S)&&this.reset()});this._currentState=(0,k.combinedDisposable)(r,d)}revealNext(l){if(!this._currentModel)return Promise.resolve();this._currentIdx+=1,this._currentIdx%=this._currentModel.references.length;const a=this._currentModel.references[this._currentIdx];return this._showMessage(),this._ignoreEditorChange=!0,this._editorService.openCodeEditor({resource:a.uri,options:{selection:f.Range.collapseToStart(a.range),selectionRevealType:3}},l).finally(()=>{this._ignoreEditorChange=!1})}_showMessage(){this._currentMessage?.dispose();const l=this._keybindingService.lookupKeybinding("editor.gotoNextSymbolFromResult"),a=l?(0,_.localize)(700,"Symbol {0} of {1}, {2} for next",this._currentIdx+1,this._currentModel.references.length,l.getLabel()):(0,_.localize)(701,"Symbol {0} of {1}",this._currentIdx+1,this._currentModel.references.length);this._currentMessage=this._notificationService.status(a)}};o=De([he(0,C.IContextKeyService),he(1,y.ICodeEditorService),he(2,i.INotificationService),he(3,s.IKeybindingService)],o),(0,p.registerSingleton)(e.ISymbolNavigationService,o,1),(0,L.registerEditorCommand)(new class extends L.EditorCommand{constructor(){super({id:"editor.gotoNextSymbolFromResult",precondition:e.ctxHasSymbols,kbOpts:{weight:100,primary:70}})}runEditorCommand(h,l){return h.get(e.ISymbolNavigationService).revealNext(l)}}),t.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"editor.gotoNextSymbolFromResult.cancel",weight:100,when:e.ctxHasSymbols,primary:9,handler(h){h.get(e.ISymbolNavigationService).reset()}});let g=class{constructor(l){this._listener=new Map,this._disposables=new k.DisposableStore,this._onDidChange=new c.Emitter,this.onDidChange=this._onDidChange.event,this._disposables.add(l.onCodeEditorRemove(this._onDidRemoveEditor,this)),this._disposables.add(l.onCodeEditorAdd(this._onDidAddEditor,this)),l.listCodeEditors().forEach(this._onDidAddEditor,this)}dispose(){this._disposables.dispose(),this._onDidChange.dispose(),(0,k.dispose)(this._listener.values())}_onDidAddEditor(l){this._listener.set(l,(0,k.combinedDisposable)(l.onDidChangeCursorPosition(a=>this._onDidChange.fire({editor:l})),l.onDidChangeModelContent(a=>this._onDidChange.fire({editor:l}))))}_onDidRemoveEditor(l){this._listener.get(l)?.dispose(),this._listener.delete(l)}};g=De([he(0,y.ICodeEditorService)],g)}),define(oe[405],re([1,0,14,18,8,15,17]),function(ae,e,c,k,E,L,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HoverProviderResult=void 0,e.getHoverProviderResultsAsAsyncIterable=C,e.getHoversPromise=p;class f{constructor(t,i,o){this.provider=t,this.hover=i,this.ordinal=o}}e.HoverProviderResult=f;async function _(s,t,i,o,g){const h=await Promise.resolve(s.provideHover(i,o,g)).catch(E.onUnexpectedExternalError);if(!(!h||!n(h)))return new f(s,h,t)}function C(s,t,i,o){const h=s.ordered(t).map((l,a)=>_(l,a,t,i,o));return c.AsyncIterableObject.fromPromises(h).coalesce()}function p(s,t,i,o){return C(s,t,i,o).map(g=>g.hover).toPromise()}(0,L.registerModelAndPositionCommand)("_executeHoverProvider",(s,t,i)=>{const o=s.get(y.ILanguageFeaturesService);return p(o.hoverProvider,t,i,k.CancellationToken.None)});function n(s){const t=typeof s.range<"u",i=typeof s.contents<"u"&&s.contents&&s.contents.length>0;return t&&i}}),define(oe[728],re([1,0,2,11,15,183,4,20,34,44,354,3,63,252,705,94]),function(ae,e,c,k,E,L,y,f,_,C,p,n,s,t,i,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IndentationToTabsCommand=e.IndentationToSpacesCommand=e.AutoIndentOnPaste=e.AutoIndentOnPasteCommand=e.ReindentSelectedLinesAction=e.ReindentLinesAction=e.DetectIndentation=e.ChangeTabDisplaySize=e.IndentUsingSpaces=e.IndentUsingTabs=e.ChangeIndentationSizeAction=e.IndentationToTabsAction=e.IndentationToSpacesAction=void 0;class g extends E.EditorAction{static{this.ID="editor.action.indentationToSpaces"}constructor(){super({id:g.ID,label:n.localize(638,"Convert Indentation to Spaces"),alias:"Convert Indentation to Spaces",precondition:f.EditorContextKeys.writable,metadata:{description:n.localize2(650,"Convert the tab indentation to spaces.")}})}run(A,R){const N=R.getModel();if(!N)return;const O=N.getOptions(),x=R.getSelection();if(!x)return;const F=new I(x,O.tabSize);R.pushUndoStop(),R.executeCommands(this.id,[F]),R.pushUndoStop(),N.updateOptions({insertSpaces:!0})}}e.IndentationToSpacesAction=g;class h extends E.EditorAction{static{this.ID="editor.action.indentationToTabs"}constructor(){super({id:h.ID,label:n.localize(639,"Convert Indentation to Tabs"),alias:"Convert Indentation to Tabs",precondition:f.EditorContextKeys.writable,metadata:{description:n.localize2(651,"Convert the spaces indentation to tabs.")}})}run(A,R){const N=R.getModel();if(!N)return;const O=N.getOptions(),x=R.getSelection();if(!x)return;const F=new T(x,O.tabSize);R.pushUndoStop(),R.executeCommands(this.id,[F]),R.pushUndoStop(),N.updateOptions({insertSpaces:!1})}}e.IndentationToTabsAction=h;class l extends E.EditorAction{constructor(A,R,N){super(N),this.insertSpaces=A,this.displaySizeOnly=R}run(A,R){const N=A.get(s.IQuickInputService),O=A.get(C.IModelService),x=R.getModel();if(!x)return;const F=O.getCreationOptions(x.getLanguageId(),x.uri,x.isForSimpleWidget),W=x.getOptions(),V=[1,2,3,4,5,6,7,8].map(H=>({id:H.toString(),label:H.toString(),description:H===F.tabSize&&H===W.tabSize?n.localize(640,"Configured Tab Size"):H===F.tabSize?n.localize(641,"Default Tab Size"):H===W.tabSize?n.localize(642,"Current Tab Size"):void 0})),q=Math.min(x.getOptions().tabSize-1,7);setTimeout(()=>{N.pick(V,{placeHolder:n.localize(643,"Select Tab Size for Current File"),activeItem:V[q]}).then(H=>{if(H&&x&&!x.isDisposed()){const K=parseInt(H.label,10);this.displaySizeOnly?x.updateOptions({tabSize:K}):x.updateOptions({tabSize:K,indentSize:K,insertSpaces:this.insertSpaces})}})},50)}}e.ChangeIndentationSizeAction=l;class a extends l{static{this.ID="editor.action.indentUsingTabs"}constructor(){super(!1,!1,{id:a.ID,label:n.localize(644,"Indent Using Tabs"),alias:"Indent Using Tabs",precondition:void 0,metadata:{description:n.localize2(652,"Use indentation with tabs.")}})}}e.IndentUsingTabs=a;class r extends l{static{this.ID="editor.action.indentUsingSpaces"}constructor(){super(!0,!1,{id:r.ID,label:n.localize(645,"Indent Using Spaces"),alias:"Indent Using Spaces",precondition:void 0,metadata:{description:n.localize2(653,"Use indentation with spaces.")}})}}e.IndentUsingSpaces=r;class d extends l{static{this.ID="editor.action.changeTabDisplaySize"}constructor(){super(!0,!0,{id:d.ID,label:n.localize(646,"Change Tab Display Size"),alias:"Change Tab Display Size",precondition:void 0,metadata:{description:n.localize2(654,"Change the space size equivalent of the tab.")}})}}e.ChangeTabDisplaySize=d;class m extends E.EditorAction{static{this.ID="editor.action.detectIndentation"}constructor(){super({id:m.ID,label:n.localize(647,"Detect Indentation from Content"),alias:"Detect Indentation from Content",precondition:void 0,metadata:{description:n.localize2(655,"Detect the indentation from content.")}})}run(A,R){const N=A.get(C.IModelService),O=R.getModel();if(!O)return;const x=N.getCreationOptions(O.getLanguageId(),O.uri,O.isForSimpleWidget);O.detectIndentation(x.insertSpaces,x.tabSize)}}e.DetectIndentation=m;class u extends E.EditorAction{constructor(){super({id:"editor.action.reindentlines",label:n.localize(648,"Reindent Lines"),alias:"Reindent Lines",precondition:f.EditorContextKeys.writable,metadata:{description:n.localize2(656,"Reindent the lines of the editor.")}})}run(A,R){const N=A.get(_.ILanguageConfigurationService),O=R.getModel();if(!O)return;const x=(0,i.getReindentEditOperations)(O,N,1,O.getLineCount());x.length>0&&(R.pushUndoStop(),R.executeEdits(this.id,x),R.pushUndoStop())}}e.ReindentLinesAction=u;class b extends E.EditorAction{constructor(){super({id:"editor.action.reindentselectedlines",label:n.localize(649,"Reindent Selected Lines"),alias:"Reindent Selected Lines",precondition:f.EditorContextKeys.writable,metadata:{description:n.localize2(657,"Reindent the selected lines of the editor.")}})}run(A,R){const N=A.get(_.ILanguageConfigurationService),O=R.getModel();if(!O)return;const x=R.getSelections();if(x===null)return;const F=[];for(const W of x){let V=W.startLineNumber,q=W.endLineNumber;if(V!==q&&W.endColumn===1&&q--,V===1){if(V===q)continue}else V--;const H=(0,i.getReindentEditOperations)(O,N,V,q);F.push(...H)}F.length>0&&(R.pushUndoStop(),R.executeEdits(this.id,F),R.pushUndoStop())}}e.ReindentSelectedLinesAction=b;class v{constructor(A,R){this._initialSelection=R,this._edits=[],this._selectionId=null;for(const N of A)N.range&&typeof N.text=="string"&&this._edits.push(N)}getEditOperations(A,R){for(const O of this._edits)R.addEditOperation(y.Range.lift(O.range),O.text);let N=!1;Array.isArray(this._edits)&&this._edits.length===1&&this._initialSelection.isEmpty()&&(this._edits[0].range.startColumn===this._initialSelection.endColumn&&this._edits[0].range.startLineNumber===this._initialSelection.endLineNumber?(N=!0,this._selectionId=R.trackSelection(this._initialSelection,!0)):this._edits[0].range.endColumn===this._initialSelection.startColumn&&this._edits[0].range.endLineNumber===this._initialSelection.startLineNumber&&(N=!0,this._selectionId=R.trackSelection(this._initialSelection,!1))),N||(this._selectionId=R.trackSelection(this._initialSelection))}computeCursorState(A,R){return R.getTrackedSelection(this._selectionId)}}e.AutoIndentOnPasteCommand=v;let w=class{static{this.ID="editor.contrib.autoIndentOnPaste"}constructor(A,R){this.editor=A,this._languageConfigurationService=R,this.callOnDispose=new c.DisposableStore,this.callOnModel=new c.DisposableStore,this.callOnDispose.add(A.onDidChangeConfiguration(()=>this.update())),this.callOnDispose.add(A.onDidChangeModel(()=>this.update())),this.callOnDispose.add(A.onDidChangeModelLanguage(()=>this.update()))}update(){this.callOnModel.clear(),!(this.editor.getOption(12)<4||this.editor.getOption(55))&&this.editor.hasModel()&&this.callOnModel.add(this.editor.onDidPaste(({range:A})=>{this.trigger(A)}))}trigger(A){const R=this.editor.getSelections();if(R===null||R.length>1)return;const N=this.editor.getModel();if(!N||this.rangeContainsOnlyWhitespaceCharacters(N,A)||S(N,A)||!N.tokenization.isCheapToTokenize(A.getStartPosition().lineNumber))return;const x=this.editor.getOption(12),{tabSize:F,indentSize:W,insertSpaces:V}=N.getOptions(),q=[],H={shiftIndent:X=>L.ShiftCommand.shiftIndent(X,X.length+1,F,W,V),unshiftIndent:X=>L.ShiftCommand.unshiftIndent(X,X.length+1,F,W,V)};let K=A.startLineNumber;for(;K<=A.endLineNumber;){if(this.shouldIgnoreLine(N,K)){K++;continue}break}if(K>A.endLineNumber)return;let G=N.getLineContent(K);if(!/\S/.test(G.substring(0,A.startColumn-1))){const X=(0,t.getGoodIndentForLine)(x,N,N.getLanguageId(),K,H,this._languageConfigurationService);if(X!==null){const Z=k.getLeadingWhitespace(G),j=p.getSpaceCnt(X,F),P=p.getSpaceCnt(Z,F);if(j!==P){const te=p.generateIndent(j,F,V);q.push({range:new y.Range(K,1,K,Z.length+1),text:te}),G=te+G.substring(Z.length)}else{const te=(0,t.getIndentMetadata)(N,K,this._languageConfigurationService);if(te===0||te===8)return}}}const Y=K;for(;K<A.endLineNumber;){if(!/\S/.test(N.getLineContent(K+1))){K++;continue}break}if(K!==A.endLineNumber){const X={tokenization:{getLineTokens:j=>N.tokenization.getLineTokens(j),getLanguageId:()=>N.getLanguageId(),getLanguageIdAtPosition:(j,P)=>N.getLanguageIdAtPosition(j,P)},getLineContent:j=>j===Y?G:N.getLineContent(j)},Z=(0,t.getGoodIndentForLine)(x,X,N.getLanguageId(),K+1,H,this._languageConfigurationService);if(Z!==null){const j=p.getSpaceCnt(Z,F),P=p.getSpaceCnt(k.getLeadingWhitespace(N.getLineContent(K+1)),F);if(j!==P){const te=j-P;for(let se=K+1;se<=A.endLineNumber;se++){const ue=N.getLineContent(se),ge=k.getLeadingWhitespace(ue),ce=p.getSpaceCnt(ge,F)+te,ie=p.generateIndent(ce,F,V);ie!==ge&&q.push({range:new y.Range(se,1,se,ge.length+1),text:ie})}}}}if(q.length>0){this.editor.pushUndoStop();const X=new v(q,this.editor.getSelection());this.editor.executeCommand("autoIndentOnPaste",X),this.editor.pushUndoStop()}}rangeContainsOnlyWhitespaceCharacters(A,R){const N=x=>x.trim().length===0;let O=!0;if(R.startLineNumber===R.endLineNumber){const F=A.getLineContent(R.startLineNumber).substring(R.startColumn-1,R.endColumn-1);O=N(F)}else for(let x=R.startLineNumber;x<=R.endLineNumber;x++){const F=A.getLineContent(x);if(x===R.startLineNumber){const W=F.substring(R.startColumn-1);O=N(W)}else if(x===R.endLineNumber){const W=F.substring(0,R.endColumn-1);O=N(W)}else O=A.getLineFirstNonWhitespaceColumn(x)===0;if(!O)break}return O}shouldIgnoreLine(A,R){A.tokenization.forceTokenization(R);const N=A.getLineFirstNonWhitespaceColumn(R);if(N===0)return!0;const O=A.tokenization.getLineTokens(R);if(O.getCount()>0){const x=O.findTokenIndexAtOffset(N);if(x>=0&&O.getStandardTokenType(x)===1)return!0}return!1}dispose(){this.callOnDispose.dispose(),this.callOnModel.dispose()}};e.AutoIndentOnPaste=w,e.AutoIndentOnPaste=w=De([he(1,_.ILanguageConfigurationService)],w);function S(M,A){const R=N=>(0,o.getStandardTokenTypeAtPosition)(M,N)===2;return R(A.getStartPosition())||R(A.getEndPosition())}function D(M,A,R,N){if(M.getLineCount()===1&&M.getLineMaxColumn(1)===1)return;let O="";for(let F=0;F<R;F++)O+=" ";const x=new RegExp(O,"gi");for(let F=1,W=M.getLineCount();F<=W;F++){let V=M.getLineFirstNonWhitespaceColumn(F);if(V===0&&(V=M.getLineMaxColumn(F)),V===1)continue;const q=new y.Range(F,1,F,V),H=M.getValueInRange(q),K=N?H.replace(/\t/ig,O):H.replace(x," ");A.addEditOperation(q,K)}}class I{constructor(A,R){this.selection=A,this.tabSize=R,this.selectionId=null}getEditOperations(A,R){this.selectionId=R.trackSelection(this.selection),D(A,R,this.tabSize,!0)}computeCursorState(A,R){return R.getTrackedSelection(this.selectionId)}}e.IndentationToSpacesCommand=I;class T{constructor(A,R){this.selection=A,this.tabSize=R,this.selectionId=null}getEditOperations(A,R){this.selectionId=R.trackSelection(this.selection),D(A,R,this.tabSize,!1)}computeCursorState(A,R){return R.getTrackedSelection(this.selectionId)}}e.IndentationToTabsCommand=T,(0,E.registerEditorContribution)(w.ID,w,2),(0,E.registerEditorAction)(g),(0,E.registerEditorAction)(h),(0,E.registerEditorAction)(a),(0,E.registerEditorAction)(r),(0,E.registerEditorAction)(d),(0,E.registerEditorAction)(m),(0,E.registerEditorAction)(u),(0,E.registerEditorAction)(b)}),define(oe[729],re([1,0,15,246,20,3]),function(ae,e,c,k,E,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExpandLineSelectionAction=void 0;class y extends c.EditorAction{constructor(){super({id:"expandLineSelection",label:L.localize(599,"Expand Line Selection"),alias:"Expand Line Selection",precondition:void 0,kbOpts:{weight:0,kbExpr:E.EditorContextKeys.textInputFocus,primary:2090}})}run(_,C,p){if(p=p||{},!C.hasModel())return;const n=C._getViewModel();n.model.pushStackElement(),n.setCursorStates(p.source,3,k.CursorMoveCommands.expandLineSelection(n,n.getCursorStates())),n.revealAllCursors(p.source,!0)}}e.ExpandLineSelectionAction=y,(0,c.registerEditorAction)(y)}),define(oe[730],re([1,0,72,212,15,145,564,275,211,76,9,4,23,20,643,707,644,3,29,34,27]),function(ae,e,c,k,E,L,y,f,_,C,p,n,s,t,i,o,g,h,l,a,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.KebabCaseAction=e.PascalCaseAction=e.CamelCaseAction=e.SnakeCaseAction=e.TitleCaseAction=e.LowerCaseAction=e.UpperCaseAction=e.AbstractCaseAction=e.TransposeAction=e.JoinLinesAction=e.DeleteAllRightAction=e.DeleteAllLeftAction=e.AbstractDeleteAllToBoundaryAction=e.InsertLineAfterAction=e.InsertLineBeforeAction=e.IndentLinesAction=e.DeleteLinesAction=e.TrimTrailingWhitespaceAction=e.DeleteDuplicateLinesAction=e.SortLinesDescendingAction=e.SortLinesAscendingAction=e.AbstractSortLinesAction=e.DuplicateSelectionAction=void 0;class d extends E.EditorAction{constructor(pe,ce){super(ce),this.down=pe}run(pe,ce){if(!ce.hasModel())return;const ie=ce.getSelections().map((B,U)=>({selection:B,index:U,ignore:!1}));ie.sort((B,U)=>n.Range.compareRangesUsingStarts(B.selection,U.selection));let ne=ie[0];for(let B=1;B<ie.length;B++){const U=ie[B];ne.selection.endLineNumber===U.selection.startLineNumber&&(ne.index<U.index?U.ignore=!0:(ne.ignore=!0,ne=U))}const J=[];for(const B of ie)J.push(new i.CopyLinesCommand(B.selection,this.down,B.ignore));ce.pushUndoStop(),ce.executeCommands(this.id,J),ce.pushUndoStop()}}class m extends d{constructor(){super(!1,{id:"editor.action.copyLinesUpAction",label:h.localize(569,"Copy Line Up"),alias:"Copy Line Up",precondition:t.EditorContextKeys.writable,kbOpts:{kbExpr:t.EditorContextKeys.editorTextFocus,primary:1552,linux:{primary:3600},weight:100},menuOpts:{menuId:l.MenuId.MenubarSelectionMenu,group:"2_line",title:h.localize(570,"&&Copy Line Up"),order:1}})}}class u extends d{constructor(){super(!0,{id:"editor.action.copyLinesDownAction",label:h.localize(571,"Copy Line Down"),alias:"Copy Line Down",precondition:t.EditorContextKeys.writable,kbOpts:{kbExpr:t.EditorContextKeys.editorTextFocus,primary:1554,linux:{primary:3602},weight:100},menuOpts:{menuId:l.MenuId.MenubarSelectionMenu,group:"2_line",title:h.localize(572,"Co&&py Line Down"),order:2}})}}class b extends E.EditorAction{constructor(){super({id:"editor.action.duplicateSelection",label:h.localize(573,"Duplicate Selection"),alias:"Duplicate Selection",precondition:t.EditorContextKeys.writable,menuOpts:{menuId:l.MenuId.MenubarSelectionMenu,group:"2_line",title:h.localize(574,"&&Duplicate Selection"),order:5}})}run(pe,ce,ie){if(!ce.hasModel())return;const ne=[],J=ce.getSelections(),B=ce.getModel();for(const U of J)if(U.isEmpty())ne.push(new i.CopyLinesCommand(U,!0));else{const z=new s.Selection(U.endLineNumber,U.endColumn,U.endLineNumber,U.endColumn);ne.push(new L.ReplaceCommandThatSelectsText(z,B.getValueInRange(U)))}ce.pushUndoStop(),ce.executeCommands(this.id,ne),ce.pushUndoStop()}}e.DuplicateSelectionAction=b;class v extends E.EditorAction{constructor(pe,ce){super(ce),this.down=pe}run(pe,ce){const ie=pe.get(a.ILanguageConfigurationService),ne=[],J=ce.getSelections()||[],B=ce.getOption(12);for(const U of J)ne.push(new o.MoveLinesCommand(U,this.down,B,ie));ce.pushUndoStop(),ce.executeCommands(this.id,ne),ce.pushUndoStop()}}class w extends v{constructor(){super(!1,{id:"editor.action.moveLinesUpAction",label:h.localize(575,"Move Line Up"),alias:"Move Line Up",precondition:t.EditorContextKeys.writable,kbOpts:{kbExpr:t.EditorContextKeys.editorTextFocus,primary:528,linux:{primary:528},weight:100},menuOpts:{menuId:l.MenuId.MenubarSelectionMenu,group:"2_line",title:h.localize(576,"Mo&&ve Line Up"),order:3}})}}class S extends v{constructor(){super(!0,{id:"editor.action.moveLinesDownAction",label:h.localize(577,"Move Line Down"),alias:"Move Line Down",precondition:t.EditorContextKeys.writable,kbOpts:{kbExpr:t.EditorContextKeys.editorTextFocus,primary:530,linux:{primary:530},weight:100},menuOpts:{menuId:l.MenuId.MenubarSelectionMenu,group:"2_line",title:h.localize(578,"Move &&Line Down"),order:4}})}}class D extends E.EditorAction{constructor(pe,ce){super(ce),this.descending=pe}run(pe,ce){if(!ce.hasModel())return;const ie=ce.getModel();let ne=ce.getSelections();ne.length===1&&ne[0].isEmpty()&&(ne=[new s.Selection(1,1,ie.getLineCount(),ie.getLineMaxColumn(ie.getLineCount()))]);for(const B of ne)if(!g.SortLinesCommand.canRun(ce.getModel(),B,this.descending))return;const J=[];for(let B=0,U=ne.length;B<U;B++)J[B]=new g.SortLinesCommand(ne[B],this.descending);ce.pushUndoStop(),ce.executeCommands(this.id,J),ce.pushUndoStop()}}e.AbstractSortLinesAction=D;class I extends D{constructor(){super(!1,{id:"editor.action.sortLinesAscending",label:h.localize(579,"Sort Lines Ascending"),alias:"Sort Lines Ascending",precondition:t.EditorContextKeys.writable})}}e.SortLinesAscendingAction=I;class T extends D{constructor(){super(!0,{id:"editor.action.sortLinesDescending",label:h.localize(580,"Sort Lines Descending"),alias:"Sort Lines Descending",precondition:t.EditorContextKeys.writable})}}e.SortLinesDescendingAction=T;class M extends E.EditorAction{constructor(){super({id:"editor.action.removeDuplicateLines",label:h.localize(581,"Delete Duplicate Lines"),alias:"Delete Duplicate Lines",precondition:t.EditorContextKeys.writable})}run(pe,ce){if(!ce.hasModel())return;const ie=ce.getModel();if(ie.getLineCount()===1&&ie.getLineMaxColumn(1)===1)return;const ne=[],J=[];let B=0,U=!0,z=ce.getSelections();z.length===1&&z[0].isEmpty()&&(z=[new s.Selection(1,1,ie.getLineCount(),ie.getLineMaxColumn(ie.getLineCount()))],U=!1);for(const $ of z){const Q=new Set,ee=[];for(let be=$.startLineNumber;be<=$.endLineNumber;be++){const ve=ie.getLineContent(be);Q.has(ve)||(ee.push(ve),Q.add(ve))}const le=new s.Selection($.startLineNumber,1,$.endLineNumber,ie.getLineMaxColumn($.endLineNumber)),de=$.startLineNumber-B,me=new s.Selection(de,1,de+ee.length-1,ee[ee.length-1].length);ne.push(C.EditOperation.replace(le,ee.join(`
|
|
649
|
+
`,this._markerCode1=this._marker.charCodeAt(0),this._markerCode2=46,this.affectedKeys=new Set,this._previousConfiguration=void 0;for(const m of h.keys)this.affectedKeys.add(m);for(const[,m]of h.overrides)for(const u of m)this.affectedKeys.add(u);this._affectsConfigStr=this._marker;for(const m of this.affectedKeys)this._affectsConfigStr+=m+this._marker}get previousConfiguration(){return!this._previousConfiguration&&this.previous&&(this._previousConfiguration=i.parse(this.previous.data,this.logService)),this._previousConfiguration}affectsConfiguration(h,l){const a=this._marker+h,r=this._affectsConfigStr.indexOf(a);if(r<0)return!1;const d=r+a.length;if(d>=this._affectsConfigStr.length)return!1;const m=this._affectsConfigStr.charCodeAt(d);if(m!==this._markerCode1&&m!==this._markerCode2)return!1;if(l){const u=this.previousConfiguration?this.previousConfiguration.getValue(h,l,this.previous?.workspace):void 0,b=this.currentConfiguraiton.getValue(h,l,this.currentWorkspace);return!E.equals(u,b)}return!0}}e.ConfigurationChangeEvent=o}),define(oe[708],re([1,0,2,398,108,38]),function(ae,e,c,k,E,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DefaultConfiguration=void 0;class y extends c.Disposable{get configurationModel(){return this._configurationModel}constructor(_){super(),this.logService=_,this._configurationModel=k.ConfigurationModel.createEmptyModel(this.logService)}reload(){return this.resetConfigurationModel(),this.configurationModel}getConfigurationDefaultOverrides(){return{}}resetConfigurationModel(){this._configurationModel=k.ConfigurationModel.createEmptyModel(this.logService);const _=L.Registry.as(E.Extensions.Configuration).getConfigurationProperties();this.updateConfigurationModel(Object.keys(_),_)}updateConfigurationModel(_,C){const p=this.getConfigurationDefaultOverrides();for(const n of _){const s=p[n],t=C[n];s!==void 0?this._configurationModel.setValue(n,s):t?this._configurationModel.setValue(n,t.default):this._configurationModel.removeValue(n)}}}e.DefaultConfiguration=y}),define(oe[120],re([1,0,139,16,24,38,2,73]),function(ae,e,c,k,E,L,y,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Extensions=e.KeybindingsRegistry=void 0;class _{constructor(){this._coreKeybindings=new f.LinkedList,this._extensionKeybindings=[],this._cachedMergedKeybindings=null}static bindToCurrentPlatform(n){if(k.OS===1){if(n&&n.win)return n.win}else if(k.OS===2){if(n&&n.mac)return n.mac}else if(n&&n.linux)return n.linux;return n}registerKeybindingRule(n){const s=_.bindToCurrentPlatform(n),t=new y.DisposableStore;if(s&&s.primary){const i=(0,c.decodeKeybinding)(s.primary,k.OS);i&&t.add(this._registerDefaultKeybinding(i,n.id,n.args,n.weight,0,n.when))}if(s&&Array.isArray(s.secondary))for(let i=0,o=s.secondary.length;i<o;i++){const g=s.secondary[i],h=(0,c.decodeKeybinding)(g,k.OS);h&&t.add(this._registerDefaultKeybinding(h,n.id,n.args,n.weight,-i-1,n.when))}return t}registerCommandAndKeybindingRule(n){return(0,y.combinedDisposable)(this.registerKeybindingRule(n),E.CommandsRegistry.registerCommand(n))}_registerDefaultKeybinding(n,s,t,i,o,g){const h=this._coreKeybindings.push({keybinding:n,command:s,commandArgs:t,when:g,weight1:i,weight2:o,extensionId:null,isBuiltinExtension:!1});return this._cachedMergedKeybindings=null,(0,y.toDisposable)(()=>{h(),this._cachedMergedKeybindings=null})}getDefaultKeybindings(){return this._cachedMergedKeybindings||(this._cachedMergedKeybindings=Array.from(this._coreKeybindings).concat(this._extensionKeybindings),this._cachedMergedKeybindings.sort(C)),this._cachedMergedKeybindings.slice(0)}}e.KeybindingsRegistry=new _,e.Extensions={EditorModes:"platform.keybindingsRegistry"},L.Registry.add(e.Extensions.EditorModes,e.KeybindingsRegistry);function C(p,n){if(p.weight1!==n.weight1)return p.weight1-n.weight1;if(p.command&&n.command){if(p.command<n.command)return-1;if(p.command>n.command)return 1}return p.weight2-n.weight2}}),define(oe[29],re([1,0,41,30,6,2,73,24,12,7,120]),function(ae,e,c,k,E,L,y,f,_,C,p){"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.Action2=e.MenuItemAction=e.SubmenuItemAction=e.MenuRegistry=e.IMenuService=e.MenuId=void 0,e.isIMenuItem=s,e.isISubmenuItem=t,e.registerAction2=a;function s(r){return r.command!==void 0}function t(r){return r.submenu!==void 0}class i{static{this._instances=new Map}static{this.CommandPalette=new i("CommandPalette")}static{this.DebugBreakpointsContext=new i("DebugBreakpointsContext")}static{this.DebugCallStackContext=new i("DebugCallStackContext")}static{this.DebugConsoleContext=new i("DebugConsoleContext")}static{this.DebugVariablesContext=new i("DebugVariablesContext")}static{this.NotebookVariablesContext=new i("NotebookVariablesContext")}static{this.DebugHoverContext=new i("DebugHoverContext")}static{this.DebugWatchContext=new i("DebugWatchContext")}static{this.DebugToolBar=new i("DebugToolBar")}static{this.DebugToolBarStop=new i("DebugToolBarStop")}static{this.DebugCallStackToolbar=new i("DebugCallStackToolbar")}static{this.EditorContext=new i("EditorContext")}static{this.SimpleEditorContext=new i("SimpleEditorContext")}static{this.EditorContent=new i("EditorContent")}static{this.EditorLineNumberContext=new i("EditorLineNumberContext")}static{this.EditorContextCopy=new i("EditorContextCopy")}static{this.EditorContextPeek=new i("EditorContextPeek")}static{this.EditorContextShare=new i("EditorContextShare")}static{this.EditorTitle=new i("EditorTitle")}static{this.EditorTitleRun=new i("EditorTitleRun")}static{this.EditorTitleContext=new i("EditorTitleContext")}static{this.EditorTitleContextShare=new i("EditorTitleContextShare")}static{this.EmptyEditorGroup=new i("EmptyEditorGroup")}static{this.EmptyEditorGroupContext=new i("EmptyEditorGroupContext")}static{this.EditorTabsBarContext=new i("EditorTabsBarContext")}static{this.EditorTabsBarShowTabsSubmenu=new i("EditorTabsBarShowTabsSubmenu")}static{this.EditorTabsBarShowTabsZenModeSubmenu=new i("EditorTabsBarShowTabsZenModeSubmenu")}static{this.EditorActionsPositionSubmenu=new i("EditorActionsPositionSubmenu")}static{this.ExplorerContext=new i("ExplorerContext")}static{this.ExplorerContextShare=new i("ExplorerContextShare")}static{this.ExtensionContext=new i("ExtensionContext")}static{this.GlobalActivity=new i("GlobalActivity")}static{this.CommandCenter=new i("CommandCenter")}static{this.CommandCenterCenter=new i("CommandCenterCenter")}static{this.LayoutControlMenuSubmenu=new i("LayoutControlMenuSubmenu")}static{this.LayoutControlMenu=new i("LayoutControlMenu")}static{this.MenubarMainMenu=new i("MenubarMainMenu")}static{this.MenubarAppearanceMenu=new i("MenubarAppearanceMenu")}static{this.MenubarDebugMenu=new i("MenubarDebugMenu")}static{this.MenubarEditMenu=new i("MenubarEditMenu")}static{this.MenubarCopy=new i("MenubarCopy")}static{this.MenubarFileMenu=new i("MenubarFileMenu")}static{this.MenubarGoMenu=new i("MenubarGoMenu")}static{this.MenubarHelpMenu=new i("MenubarHelpMenu")}static{this.MenubarLayoutMenu=new i("MenubarLayoutMenu")}static{this.MenubarNewBreakpointMenu=new i("MenubarNewBreakpointMenu")}static{this.PanelAlignmentMenu=new i("PanelAlignmentMenu")}static{this.PanelPositionMenu=new i("PanelPositionMenu")}static{this.ActivityBarPositionMenu=new i("ActivityBarPositionMenu")}static{this.MenubarPreferencesMenu=new i("MenubarPreferencesMenu")}static{this.MenubarRecentMenu=new i("MenubarRecentMenu")}static{this.MenubarSelectionMenu=new i("MenubarSelectionMenu")}static{this.MenubarShare=new i("MenubarShare")}static{this.MenubarSwitchEditorMenu=new i("MenubarSwitchEditorMenu")}static{this.MenubarSwitchGroupMenu=new i("MenubarSwitchGroupMenu")}static{this.MenubarTerminalMenu=new i("MenubarTerminalMenu")}static{this.MenubarViewMenu=new i("MenubarViewMenu")}static{this.MenubarHomeMenu=new i("MenubarHomeMenu")}static{this.OpenEditorsContext=new i("OpenEditorsContext")}static{this.OpenEditorsContextShare=new i("OpenEditorsContextShare")}static{this.ProblemsPanelContext=new i("ProblemsPanelContext")}static{this.SCMInputBox=new i("SCMInputBox")}static{this.SCMChangesSeparator=new i("SCMChangesSeparator")}static{this.SCMChangesContext=new i("SCMChangesContext")}static{this.SCMIncomingChanges=new i("SCMIncomingChanges")}static{this.SCMIncomingChangesContext=new i("SCMIncomingChangesContext")}static{this.SCMIncomingChangesSetting=new i("SCMIncomingChangesSetting")}static{this.SCMOutgoingChanges=new i("SCMOutgoingChanges")}static{this.SCMOutgoingChangesContext=new i("SCMOutgoingChangesContext")}static{this.SCMOutgoingChangesSetting=new i("SCMOutgoingChangesSetting")}static{this.SCMIncomingChangesAllChangesContext=new i("SCMIncomingChangesAllChangesContext")}static{this.SCMIncomingChangesHistoryItemContext=new i("SCMIncomingChangesHistoryItemContext")}static{this.SCMOutgoingChangesAllChangesContext=new i("SCMOutgoingChangesAllChangesContext")}static{this.SCMOutgoingChangesHistoryItemContext=new i("SCMOutgoingChangesHistoryItemContext")}static{this.SCMChangeContext=new i("SCMChangeContext")}static{this.SCMResourceContext=new i("SCMResourceContext")}static{this.SCMResourceContextShare=new i("SCMResourceContextShare")}static{this.SCMResourceFolderContext=new i("SCMResourceFolderContext")}static{this.SCMResourceGroupContext=new i("SCMResourceGroupContext")}static{this.SCMSourceControl=new i("SCMSourceControl")}static{this.SCMSourceControlInline=new i("SCMSourceControlInline")}static{this.SCMSourceControlTitle=new i("SCMSourceControlTitle")}static{this.SCMTitle=new i("SCMTitle")}static{this.SearchContext=new i("SearchContext")}static{this.SearchActionMenu=new i("SearchActionContext")}static{this.StatusBarWindowIndicatorMenu=new i("StatusBarWindowIndicatorMenu")}static{this.StatusBarRemoteIndicatorMenu=new i("StatusBarRemoteIndicatorMenu")}static{this.StickyScrollContext=new i("StickyScrollContext")}static{this.TestItem=new i("TestItem")}static{this.TestItemGutter=new i("TestItemGutter")}static{this.TestProfilesContext=new i("TestProfilesContext")}static{this.TestMessageContext=new i("TestMessageContext")}static{this.TestMessageContent=new i("TestMessageContent")}static{this.TestPeekElement=new i("TestPeekElement")}static{this.TestPeekTitle=new i("TestPeekTitle")}static{this.TestCallStack=new i("TestCallStack")}static{this.TouchBarContext=new i("TouchBarContext")}static{this.TitleBarContext=new i("TitleBarContext")}static{this.TitleBarTitleContext=new i("TitleBarTitleContext")}static{this.TunnelContext=new i("TunnelContext")}static{this.TunnelPrivacy=new i("TunnelPrivacy")}static{this.TunnelProtocol=new i("TunnelProtocol")}static{this.TunnelPortInline=new i("TunnelInline")}static{this.TunnelTitle=new i("TunnelTitle")}static{this.TunnelLocalAddressInline=new i("TunnelLocalAddressInline")}static{this.TunnelOriginInline=new i("TunnelOriginInline")}static{this.ViewItemContext=new i("ViewItemContext")}static{this.ViewContainerTitle=new i("ViewContainerTitle")}static{this.ViewContainerTitleContext=new i("ViewContainerTitleContext")}static{this.ViewTitle=new i("ViewTitle")}static{this.ViewTitleContext=new i("ViewTitleContext")}static{this.CommentEditorActions=new i("CommentEditorActions")}static{this.CommentThreadTitle=new i("CommentThreadTitle")}static{this.CommentThreadActions=new i("CommentThreadActions")}static{this.CommentThreadAdditionalActions=new i("CommentThreadAdditionalActions")}static{this.CommentThreadTitleContext=new i("CommentThreadTitleContext")}static{this.CommentThreadCommentContext=new i("CommentThreadCommentContext")}static{this.CommentTitle=new i("CommentTitle")}static{this.CommentActions=new i("CommentActions")}static{this.CommentsViewThreadActions=new i("CommentsViewThreadActions")}static{this.InteractiveToolbar=new i("InteractiveToolbar")}static{this.InteractiveCellTitle=new i("InteractiveCellTitle")}static{this.InteractiveCellDelete=new i("InteractiveCellDelete")}static{this.InteractiveCellExecute=new i("InteractiveCellExecute")}static{this.InteractiveInputExecute=new i("InteractiveInputExecute")}static{this.InteractiveInputConfig=new i("InteractiveInputConfig")}static{this.ReplInputExecute=new i("ReplInputExecute")}static{this.IssueReporter=new i("IssueReporter")}static{this.NotebookToolbar=new i("NotebookToolbar")}static{this.NotebookStickyScrollContext=new i("NotebookStickyScrollContext")}static{this.NotebookCellTitle=new i("NotebookCellTitle")}static{this.NotebookCellDelete=new i("NotebookCellDelete")}static{this.NotebookCellInsert=new i("NotebookCellInsert")}static{this.NotebookCellBetween=new i("NotebookCellBetween")}static{this.NotebookCellListTop=new i("NotebookCellTop")}static{this.NotebookCellExecute=new i("NotebookCellExecute")}static{this.NotebookCellExecuteGoTo=new i("NotebookCellExecuteGoTo")}static{this.NotebookCellExecutePrimary=new i("NotebookCellExecutePrimary")}static{this.NotebookDiffCellInputTitle=new i("NotebookDiffCellInputTitle")}static{this.NotebookDiffCellMetadataTitle=new i("NotebookDiffCellMetadataTitle")}static{this.NotebookDiffCellOutputsTitle=new i("NotebookDiffCellOutputsTitle")}static{this.NotebookOutputToolbar=new i("NotebookOutputToolbar")}static{this.NotebookOutlineFilter=new i("NotebookOutlineFilter")}static{this.NotebookOutlineActionMenu=new i("NotebookOutlineActionMenu")}static{this.NotebookEditorLayoutConfigure=new i("NotebookEditorLayoutConfigure")}static{this.NotebookKernelSource=new i("NotebookKernelSource")}static{this.BulkEditTitle=new i("BulkEditTitle")}static{this.BulkEditContext=new i("BulkEditContext")}static{this.TimelineItemContext=new i("TimelineItemContext")}static{this.TimelineTitle=new i("TimelineTitle")}static{this.TimelineTitleContext=new i("TimelineTitleContext")}static{this.TimelineFilterSubMenu=new i("TimelineFilterSubMenu")}static{this.AccountsContext=new i("AccountsContext")}static{this.SidebarTitle=new i("SidebarTitle")}static{this.PanelTitle=new i("PanelTitle")}static{this.AuxiliaryBarTitle=new i("AuxiliaryBarTitle")}static{this.AuxiliaryBarHeader=new i("AuxiliaryBarHeader")}static{this.TerminalInstanceContext=new i("TerminalInstanceContext")}static{this.TerminalEditorInstanceContext=new i("TerminalEditorInstanceContext")}static{this.TerminalNewDropdownContext=new i("TerminalNewDropdownContext")}static{this.TerminalTabContext=new i("TerminalTabContext")}static{this.TerminalTabEmptyAreaContext=new i("TerminalTabEmptyAreaContext")}static{this.TerminalStickyScrollContext=new i("TerminalStickyScrollContext")}static{this.WebviewContext=new i("WebviewContext")}static{this.InlineCompletionsActions=new i("InlineCompletionsActions")}static{this.InlineEditsActions=new i("InlineEditsActions")}static{this.InlineEditActions=new i("InlineEditActions")}static{this.NewFile=new i("NewFile")}static{this.MergeInput1Toolbar=new i("MergeToolbar1Toolbar")}static{this.MergeInput2Toolbar=new i("MergeToolbar2Toolbar")}static{this.MergeBaseToolbar=new i("MergeBaseToolbar")}static{this.MergeInputResultToolbar=new i("MergeToolbarResultToolbar")}static{this.InlineSuggestionToolbar=new i("InlineSuggestionToolbar")}static{this.InlineEditToolbar=new i("InlineEditToolbar")}static{this.ChatContext=new i("ChatContext")}static{this.ChatCodeBlock=new i("ChatCodeblock")}static{this.ChatCompareBlock=new i("ChatCompareBlock")}static{this.ChatMessageTitle=new i("ChatMessageTitle")}static{this.ChatExecute=new i("ChatExecute")}static{this.ChatExecuteSecondary=new i("ChatExecuteSecondary")}static{this.ChatInputSide=new i("ChatInputSide")}static{this.AccessibleView=new i("AccessibleView")}static{this.MultiDiffEditorFileToolbar=new i("MultiDiffEditorFileToolbar")}static{this.DiffEditorHunkToolbar=new i("DiffEditorHunkToolbar")}static{this.DiffEditorSelectionToolbar=new i("DiffEditorSelectionToolbar")}constructor(d){if(i._instances.has(d))throw new TypeError(`MenuId with identifier '${d}' already exists. Use MenuId.for(ident) or a unique identifier`);i._instances.set(d,this),this.id=d}}e.MenuId=i,e.IMenuService=(0,C.createDecorator)("menuService");class o{static{this._all=new Map}static for(d){let m=this._all.get(d);return m||(m=new o(d),this._all.set(d,m)),m}static merge(d){const m=new Set;for(const u of d)u instanceof o&&m.add(u.id);return m}constructor(d){this.id=d,this.has=m=>m===d}}e.MenuRegistry=new class{constructor(){this._commands=new Map,this._menuItems=new Map,this._onDidChangeMenu=new E.MicrotaskEmitter({merge:o.merge}),this.onDidChangeMenu=this._onDidChangeMenu.event}addCommand(r){return this._commands.set(r.id,r),this._onDidChangeMenu.fire(o.for(i.CommandPalette)),(0,L.toDisposable)(()=>{this._commands.delete(r.id)&&this._onDidChangeMenu.fire(o.for(i.CommandPalette))})}getCommand(r){return this._commands.get(r)}getCommands(){const r=new Map;return this._commands.forEach((d,m)=>r.set(m,d)),r}appendMenuItem(r,d){let m=this._menuItems.get(r);m||(m=new y.LinkedList,this._menuItems.set(r,m));const u=m.push(d);return this._onDidChangeMenu.fire(o.for(r)),(0,L.toDisposable)(()=>{u(),this._onDidChangeMenu.fire(o.for(r))})}appendMenuItems(r){const d=new L.DisposableStore;for(const{id:m,item:u}of r)d.add(this.appendMenuItem(m,u));return d}getMenuItems(r){let d;return this._menuItems.has(r)?d=[...this._menuItems.get(r)]:d=[],r===i.CommandPalette&&this._appendImplicitItems(d),d}_appendImplicitItems(r){const d=new Set;for(const m of r)s(m)&&(d.add(m.command.id),m.alt&&d.add(m.alt.id));this._commands.forEach((m,u)=>{d.has(u)||r.push({command:m})})}};class g extends c.SubmenuAction{constructor(d,m,u){super(`submenuitem.${d.submenu.id}`,typeof d.title=="string"?d.title:d.title.value,u,"submenu"),this.item=d,this.hideActions=m}}e.SubmenuItemAction=g;let h=n=class{static label(d,m){return m?.renderShortTitle&&d.shortTitle?typeof d.shortTitle=="string"?d.shortTitle:d.shortTitle.value:typeof d.title=="string"?d.title:d.title.value}constructor(d,m,u,b,v,w,S){this.hideActions=b,this.menuKeybinding=v,this._commandService=S,this.id=d.id,this.label=n.label(d,u),this.tooltip=(typeof d.tooltip=="string"?d.tooltip:d.tooltip?.value)??"",this.enabled=!d.precondition||w.contextMatchesRules(d.precondition),this.checked=void 0;let D;if(d.toggled){const I=d.toggled.condition?d.toggled:{condition:d.toggled};this.checked=w.contextMatchesRules(I.condition),this.checked&&I.tooltip&&(this.tooltip=typeof I.tooltip=="string"?I.tooltip:I.tooltip.value),this.checked&&k.ThemeIcon.isThemeIcon(I.icon)&&(D=I.icon),this.checked&&I.title&&(this.label=typeof I.title=="string"?I.title:I.title.value)}D||(D=k.ThemeIcon.isThemeIcon(d.icon)?d.icon:void 0),this.item=d,this.alt=m?new n(m,void 0,u,b,void 0,w,S):void 0,this._options=u,this.class=D&&k.ThemeIcon.asClassName(D)}run(...d){let m=[];return this._options?.arg&&(m=[...m,this._options.arg]),this._options?.shouldForwardArgs&&(m=[...m,...d]),this._commandService.executeCommand(this.id,...m)}};e.MenuItemAction=h,e.MenuItemAction=h=n=De([he(5,_.IContextKeyService),he(6,f.ICommandService)],h);class l{constructor(d){this.desc=d}}e.Action2=l;function a(r){const d=[],m=new r,{f1:u,menu:b,keybinding:v,...w}=m.desc;if(f.CommandsRegistry.getCommand(w.id))throw new Error(`Cannot register two commands with the same id: ${w.id}`);if(d.push(f.CommandsRegistry.registerCommand({id:w.id,handler:(S,...D)=>m.run(S,...D),metadata:w.metadata})),Array.isArray(b))for(const S of b)d.push(e.MenuRegistry.appendMenuItem(S.id,{command:{...w,precondition:S.precondition===null?void 0:w.precondition},...S}));else b&&d.push(e.MenuRegistry.appendMenuItem(b.id,{command:{...w,precondition:b.precondition===null?void 0:w.precondition},...b}));if(u&&(d.push(e.MenuRegistry.appendMenuItem(i.CommandPalette,{command:w,when:w.precondition})),d.push(e.MenuRegistry.addCommand(w))),Array.isArray(v))for(const S of v)d.push(p.KeybindingsRegistry.registerKeybindingRule({...S,id:w.id,when:w.precondition?_.ContextKeyExpr.and(w.precondition,S.when):S.when}));else v&&d.push(p.KeybindingsRegistry.registerKeybindingRule({...v,id:w.id,when:w.precondition?_.ContextKeyExpr.and(w.precondition,v.when):v.when}));return{dispose(){(0,L.dispose)(d)}}}}),define(oe[709],re([1,0,48,239,3,29]),function(ae,e,c,k,E,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ToggleTabFocusModeAction=void 0;class y extends L.Action2{static{this.ID="editor.action.toggleTabFocusMode"}constructor(){super({id:y.ID,title:E.localize2(322,"Toggle Tab Key Moves Focus"),precondition:void 0,keybinding:{primary:2091,mac:{primary:1323},weight:100},metadata:{description:E.localize2(323,"Determines whether the tab key moves focus around the workbench or inserts the tab character in the current editor. This is also called tab trapping, tab navigation, or tab focus mode.")},f1:!0})}run(){const C=!k.TabFocus.getTabFocusMode();k.TabFocus.setTabFocusMode(C),C?(0,c.alert)(E.localize(320,"Pressing Tab will now move focus to the next focusable element")):(0,c.alert)(E.localize(321,"Pressing Tab will now insert the tab character"))}}e.ToggleTabFocusModeAction=y,(0,L.registerAction2)(y)}),define(oe[399],re([1,0,259,652,12,120,3,2,5]),function(ae,e,c,k,E,L,y,f,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ContextScopedReplaceInput=e.ContextScopedFindInput=e.historyNavigationVisible=void 0,e.registerAndCreateHistoryNavigationContext=i,e.historyNavigationVisible=new E.RawContextKey("suggestWidgetVisible",!1,(0,y.localize)(1128,"Whether suggestion are visible"));const C="historyNavigationWidgetFocus",p="historyNavigationForwardsEnabled",n="historyNavigationBackwardsEnabled";let s;const t=[];function i(h,l){if(t.includes(l))throw new Error("Cannot register the same widget multiple times");t.push(l);const a=new f.DisposableStore,r=new E.RawContextKey(C,!1).bindTo(h),d=new E.RawContextKey(p,!0).bindTo(h),m=new E.RawContextKey(n,!0).bindTo(h),u=()=>{r.set(!0),s=l},b=()=>{r.set(!1),s===l&&(s=void 0)};return(0,_.isActiveElement)(l.element)&&u(),a.add(l.onDidFocus(()=>u())),a.add(l.onDidBlur(()=>b())),a.add((0,f.toDisposable)(()=>{t.splice(t.indexOf(l),1),b()})),{historyNavigationForwardsEnablement:d,historyNavigationBackwardsEnablement:m,dispose(){a.dispose()}}}let o=class extends c.FindInput{constructor(l,a,r,d){super(l,a,r);const m=this._register(d.createScoped(this.inputBox.element));this._register(i(m,this.inputBox))}};e.ContextScopedFindInput=o,e.ContextScopedFindInput=o=De([he(3,E.IContextKeyService)],o);let g=class extends k.ReplaceInput{constructor(l,a,r,d,m=!1){super(l,a,m,r);const u=this._register(d.createScoped(this.inputBox.element));this._register(i(u,this.inputBox))}};e.ContextScopedReplaceInput=g,e.ContextScopedReplaceInput=g=De([he(3,E.IContextKeyService)],g),L.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"history.showPrevious",weight:200,when:E.ContextKeyExpr.and(E.ContextKeyExpr.has(C),E.ContextKeyExpr.equals(n,!0),E.ContextKeyExpr.not("isComposing"),e.historyNavigationVisible.isEqualTo(!1)),primary:16,secondary:[528],handler:h=>{s?.showPreviousValue()}}),L.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"history.showNext",weight:200,when:E.ContextKeyExpr.and(E.ContextKeyExpr.has(C),E.ContextKeyExpr.equals(p,!0),E.ContextKeyExpr.not("isComposing"),e.historyNavigationVisible.isEqualTo(!1)),primary:18,secondary:[530],handler:h=>{s?.showNextValue()}})}),define(oe[153],re([1,0,18,8,82,2,59,19,22,9,4,78,134,3,29,24,12,17,399]),function(ae,e,c,k,E,L,y,f,_,C,p,n,s,t,i,o,g,h,l){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.QuickSuggestionsOptions=e.CompletionItemModel=e.CompletionOptions=e.CompletionItem=e.suggestWidgetStatusbarMenu=e.Context=void 0,e.getSnippetSuggestSupport=m,e.provideSuggestionItems=b,e.getSuggestionComparator=I,e.showSimpleSuggestions=T,e.Context={Visible:l.historyNavigationVisible,HasFocusedSuggestion:new g.RawContextKey("suggestWidgetHasFocusedSuggestion",!1,(0,t.localize)(387,"Whether any suggestion is focused")),DetailsVisible:new g.RawContextKey("suggestWidgetDetailsVisible",!1,(0,t.localize)(388,"Whether suggestion details are visible")),MultipleSuggestions:new g.RawContextKey("suggestWidgetMultipleSuggestions",!1,(0,t.localize)(389,"Whether there are multiple suggestions to pick from")),MakesTextEdit:new g.RawContextKey("suggestionMakesTextEdit",!0,(0,t.localize)(390,"Whether inserting the current suggestion yields in a change or has everything already been typed")),AcceptSuggestionsOnEnter:new g.RawContextKey("acceptSuggestionOnEnter",!0,(0,t.localize)(391,"Whether suggestions are inserted when pressing Enter")),HasInsertAndReplaceRange:new g.RawContextKey("suggestionHasInsertAndReplaceRange",!1,(0,t.localize)(392,"Whether the current suggestion has insert and replace behaviour")),InsertMode:new g.RawContextKey("suggestionInsertMode",void 0,{type:"string",description:(0,t.localize)(393,"Whether the default behaviour is to insert or replace")}),CanResolve:new g.RawContextKey("suggestionCanResolve",!1,(0,t.localize)(394,"Whether the current suggestion supports to resolve further details"))},e.suggestWidgetStatusbarMenu=new i.MenuId("suggestWidgetStatusBar");class a{constructor(R,N,O,x){this.position=R,this.completion=N,this.container=O,this.provider=x,this.isInvalid=!1,this.score=E.FuzzyScore.Default,this.distance=0,this.textLabel=typeof N.label=="string"?N.label:N.label?.label,this.labelLow=this.textLabel.toLowerCase(),this.isInvalid=!this.textLabel,this.sortTextLow=N.sortText&&N.sortText.toLowerCase(),this.filterTextLow=N.filterText&&N.filterText.toLowerCase(),this.extensionId=N.extensionId,p.Range.isIRange(N.range)?(this.editStart=new C.Position(N.range.startLineNumber,N.range.startColumn),this.editInsertEnd=new C.Position(N.range.endLineNumber,N.range.endColumn),this.editReplaceEnd=new C.Position(N.range.endLineNumber,N.range.endColumn),this.isInvalid=this.isInvalid||p.Range.spansMultipleLines(N.range)||N.range.startLineNumber!==R.lineNumber):(this.editStart=new C.Position(N.range.insert.startLineNumber,N.range.insert.startColumn),this.editInsertEnd=new C.Position(N.range.insert.endLineNumber,N.range.insert.endColumn),this.editReplaceEnd=new C.Position(N.range.replace.endLineNumber,N.range.replace.endColumn),this.isInvalid=this.isInvalid||p.Range.spansMultipleLines(N.range.insert)||p.Range.spansMultipleLines(N.range.replace)||N.range.insert.startLineNumber!==R.lineNumber||N.range.replace.startLineNumber!==R.lineNumber||N.range.insert.startColumn!==N.range.replace.startColumn),typeof x.resolveCompletionItem!="function"&&(this._resolveCache=Promise.resolve(),this._resolveDuration=0)}get isResolved(){return this._resolveDuration!==void 0}get resolveDuration(){return this._resolveDuration!==void 0?this._resolveDuration:-1}async resolve(R){if(!this._resolveCache){const N=R.onCancellationRequested(()=>{this._resolveCache=void 0,this._resolveDuration=void 0}),O=new y.StopWatch(!0);this._resolveCache=Promise.resolve(this.provider.resolveCompletionItem(this.completion,R)).then(x=>{Object.assign(this.completion,x),this._resolveDuration=O.elapsed()},x=>{(0,k.isCancellationError)(x)&&(this._resolveCache=void 0,this._resolveDuration=void 0)}).finally(()=>{N.dispose()})}return this._resolveCache}}e.CompletionItem=a;class r{static{this.default=new r}constructor(R=2,N=new Set,O=new Set,x=new Map,F=!0){this.snippetSortOrder=R,this.kindFilter=N,this.providerFilter=O,this.providerItemsToReuse=x,this.showDeprecated=F}}e.CompletionOptions=r;let d;function m(){return d}class u{constructor(R,N,O,x){this.items=R,this.needsClipboard=N,this.durations=O,this.disposable=x}}e.CompletionItemModel=u;async function b(A,R,N,O=r.default,x={triggerKind:0},F=c.CancellationToken.None){const W=new y.StopWatch;N=N.clone();const V=R.getWordAtPosition(N),q=V?new p.Range(N.lineNumber,V.startColumn,N.lineNumber,V.endColumn):p.Range.fromPositions(N),H={replace:q,insert:q.setEndPosition(N.lineNumber,N.column)},K=[],G=new L.DisposableStore,Y=[];let X=!1;const Z=(P,te,se)=>{let ue=!1;if(!te)return ue;for(const ge of te.suggestions)if(!O.kindFilter.has(ge.kind)){if(!O.showDeprecated&&ge?.tags?.includes(1))continue;ge.range||(ge.range=H),ge.sortText||(ge.sortText=typeof ge.label=="string"?ge.label:ge.label.label),!X&&ge.insertTextRules&&ge.insertTextRules&4&&(X=s.SnippetParser.guessNeedsClipboard(ge.insertText)),K.push(new a(N,ge,te,P)),ue=!0}return(0,L.isDisposable)(te)&&G.add(te),Y.push({providerName:P._debugDisplayName??"unknown_provider",elapsedProvider:te.duration??-1,elapsedOverall:se.elapsed()}),ue},j=(async()=>{if(!d||O.kindFilter.has(27))return;const P=O.providerItemsToReuse.get(d);if(P){P.forEach(ue=>K.push(ue));return}if(O.providerFilter.size>0&&!O.providerFilter.has(d))return;const te=new y.StopWatch,se=await d.provideCompletionItems(R,N,x,F);Z(d,se,te)})();for(const P of A.orderedGroups(R)){let te=!1;if(await Promise.all(P.map(async se=>{if(O.providerItemsToReuse.has(se)){const ue=O.providerItemsToReuse.get(se);ue.forEach(ge=>K.push(ge)),te=te||ue.length>0;return}if(!(O.providerFilter.size>0&&!O.providerFilter.has(se)))try{const ue=new y.StopWatch,ge=await se.provideCompletionItems(R,N,x,F);te=Z(se,ge,ue)||te}catch(ue){(0,k.onUnexpectedExternalError)(ue)}})),te||F.isCancellationRequested)break}return await j,F.isCancellationRequested?(G.dispose(),Promise.reject(new k.CancellationError)):new u(K.sort(I(O.snippetSortOrder)),X,{entries:Y,elapsed:W.elapsed()},G)}function v(A,R){if(A.sortTextLow&&R.sortTextLow){if(A.sortTextLow<R.sortTextLow)return-1;if(A.sortTextLow>R.sortTextLow)return 1}return A.textLabel<R.textLabel?-1:A.textLabel>R.textLabel?1:A.completion.kind-R.completion.kind}function w(A,R){if(A.completion.kind!==R.completion.kind){if(A.completion.kind===27)return-1;if(R.completion.kind===27)return 1}return v(A,R)}function S(A,R){if(A.completion.kind!==R.completion.kind){if(A.completion.kind===27)return 1;if(R.completion.kind===27)return-1}return v(A,R)}const D=new Map;D.set(0,w),D.set(2,S),D.set(1,v);function I(A){return D.get(A)}o.CommandsRegistry.registerCommand("_executeCompletionItemProvider",async(A,...R)=>{const[N,O,x,F]=R;(0,f.assertType)(_.URI.isUri(N)),(0,f.assertType)(C.Position.isIPosition(O)),(0,f.assertType)(typeof x=="string"||!x),(0,f.assertType)(typeof F=="number"||!F);const{completionProvider:W}=A.get(h.ILanguageFeaturesService),V=await A.get(n.ITextModelService).createModelReference(N);try{const q={incomplete:!1,suggestions:[]},H=[],K=V.object.textEditorModel.validatePosition(O),G=await b(W,V.object.textEditorModel,K,void 0,{triggerCharacter:x??void 0,triggerKind:x?1:0});for(const Y of G.items)H.length<(F??0)&&H.push(Y.resolve(c.CancellationToken.None)),q.incomplete=q.incomplete||Y.container.incomplete,q.suggestions.push(Y.completion);try{return await Promise.all(H),q}finally{setTimeout(()=>G.disposable.dispose(),100)}}finally{V.dispose()}});function T(A,R){A.getContribution("editor.contrib.suggestController")?.triggerSuggest(new Set().add(R),void 0,!0)}class M{static isAllOff(R){return R.other==="off"&&R.comments==="off"&&R.strings==="off"}static isAllOn(R){return R.other==="on"&&R.comments==="on"&&R.strings==="on"}static valueFor(R,N){switch(N){case 1:return R.comments;case 2:return R.strings;default:return R.other}}}e.QuickSuggestionsOptions=M}),define(oe[710],re([1,0,16,3,12,178,120,270,63]),function(ae,e,c,k,E,L,y,f,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const C={weight:200,when:E.ContextKeyExpr.and(E.ContextKeyExpr.equals(f.quickInputTypeContextKeyValue,"quickPick"),f.inQuickInputContext),metadata:{description:(0,k.localize)(1076,"Used while in the context of the quick pick. If you change one keybinding for this command, you should change all of the other keybindings (modifier variants) of this command as well.")}};function p(g,h={}){y.KeybindingsRegistry.registerCommandAndKeybindingRule({...C,...g,secondary:s(g.primary,g.secondary??[],h)})}const n=c.isMacintosh?256:2048;function s(g,h,l={}){return l.withAltMod&&h.push(512+g),l.withCtrlMod&&(h.push(n+g),l.withAltMod&&h.push(512+n+g)),l.withCmdMod&&c.isMacintosh&&(h.push(2048+g),l.withCtrlMod&&h.push(2304+g),l.withAltMod&&(h.push(2560+g),l.withCtrlMod&&h.push(2816+g))),h}function t(g,h){return l=>{const a=l.get(_.IQuickInputService).currentQuickInput;if(a)return h&&a.quickNavigate?a.focus(h):a.focus(g)}}p({id:"quickInput.pageNext",primary:12,handler:t(_.QuickPickFocus.NextPage)},{withAltMod:!0,withCtrlMod:!0,withCmdMod:!0}),p({id:"quickInput.pagePrevious",primary:11,handler:t(_.QuickPickFocus.PreviousPage)},{withAltMod:!0,withCtrlMod:!0,withCmdMod:!0}),p({id:"quickInput.first",primary:n+14,handler:t(_.QuickPickFocus.First)},{withAltMod:!0,withCmdMod:!0}),p({id:"quickInput.last",primary:n+13,handler:t(_.QuickPickFocus.Last)},{withAltMod:!0,withCmdMod:!0}),p({id:"quickInput.next",primary:18,handler:t(_.QuickPickFocus.Next)},{withCtrlMod:!0}),p({id:"quickInput.previous",primary:16,handler:t(_.QuickPickFocus.Previous)},{withCtrlMod:!0});const i=(0,k.localize)(1077,"If we're in quick access mode, this will navigate to the next item. If we are not in quick access mode, this will navigate to the next separator."),o=(0,k.localize)(1078,"If we're in quick access mode, this will navigate to the previous item. If we are not in quick access mode, this will navigate to the previous separator.");c.isMacintosh?(p({id:"quickInput.nextSeparatorWithQuickAccessFallback",primary:2066,handler:t(_.QuickPickFocus.NextSeparator,_.QuickPickFocus.Next),metadata:{description:i}}),p({id:"quickInput.nextSeparator",primary:2578,secondary:[2322],handler:t(_.QuickPickFocus.NextSeparator)},{withCtrlMod:!0}),p({id:"quickInput.previousSeparatorWithQuickAccessFallback",primary:2064,handler:t(_.QuickPickFocus.PreviousSeparator,_.QuickPickFocus.Previous),metadata:{description:o}}),p({id:"quickInput.previousSeparator",primary:2576,secondary:[2320],handler:t(_.QuickPickFocus.PreviousSeparator)},{withCtrlMod:!0})):(p({id:"quickInput.nextSeparatorWithQuickAccessFallback",primary:530,handler:t(_.QuickPickFocus.NextSeparator,_.QuickPickFocus.Next),metadata:{description:i}}),p({id:"quickInput.nextSeparator",primary:2578,handler:t(_.QuickPickFocus.NextSeparator)}),p({id:"quickInput.previousSeparatorWithQuickAccessFallback",primary:528,handler:t(_.QuickPickFocus.PreviousSeparator,_.QuickPickFocus.Previous),metadata:{description:o}}),p({id:"quickInput.previousSeparator",primary:2576,handler:t(_.QuickPickFocus.PreviousSeparator)})),p({id:"quickInput.acceptInBackground",when:E.ContextKeyExpr.and(C.when,E.ContextKeyExpr.or(L.InputFocusedContext.negate(),f.endOfQuickInputBoxContext)),primary:17,weight:250,handler:g=>{g.get(_.IQuickInputService).currentQuickInput?.accept(!0)}},{withAltMod:!0,withCtrlMod:!0,withCmdMod:!0})}),define(oe[154],re([1,0,13,2,38]),function(ae,e,c,k,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.QuickAccessRegistry=e.Extensions=e.DefaultQuickAccessFilterValue=void 0;var L;(function(f){f[f.PRESERVE=0]="PRESERVE",f[f.LAST=1]="LAST"})(L||(e.DefaultQuickAccessFilterValue=L={})),e.Extensions={Quickaccess:"workbench.contributions.quickaccess"};class y{constructor(){this.providers=[],this.defaultProvider=void 0}registerQuickAccessProvider(_){return _.prefix.length===0?this.defaultProvider=_:this.providers.push(_),this.providers.sort((C,p)=>p.prefix.length-C.prefix.length),(0,k.toDisposable)(()=>{this.providers.splice(this.providers.indexOf(_),1),this.defaultProvider===_&&(this.defaultProvider=void 0)})}getQuickAccessProviders(){return(0,c.coalesce)([this.defaultProvider,...this.providers])}getQuickAccessProvider(_){return _&&this.providers.find(p=>_.startsWith(p.prefix))||void 0||this.defaultProvider}}e.QuickAccessRegistry=y,E.Registry.add(e.Extensions.Quickaccess,new y)}),define(oe[711],re([1,0,3,38,2,31,154,63]),function(ae,e,c,k,E,L,y,f){"use strict";var _;Object.defineProperty(e,"__esModule",{value:!0}),e.HelpQuickAccessProvider=void 0;let C=class{static{_=this}static{this.PREFIX="?"}constructor(n,s){this.quickInputService=n,this.keybindingService=s,this.registry=k.Registry.as(y.Extensions.Quickaccess)}provide(n){const s=new E.DisposableStore;return s.add(n.onDidAccept(()=>{const[t]=n.selectedItems;t&&this.quickInputService.quickAccess.show(t.prefix,{preserveValue:!0})})),s.add(n.onDidChangeValue(t=>{const i=this.registry.getQuickAccessProvider(t.substr(_.PREFIX.length));i&&i.prefix&&i.prefix!==_.PREFIX&&this.quickInputService.quickAccess.show(i.prefix,{preserveValue:!0})})),n.items=this.getQuickAccessProviders().filter(t=>t.prefix!==_.PREFIX),s}getQuickAccessProviders(){return this.registry.getQuickAccessProviders().sort((s,t)=>s.prefix.localeCompare(t.prefix)).flatMap(s=>this.createPicks(s))}createPicks(n){return n.helpEntries.map(s=>{const t=s.prefix||n.prefix,i=t||"\u2026";return{prefix:t,label:i,keybinding:s.commandId?this.keybindingService.lookupKeybinding(s.commandId):void 0,ariaLabel:(0,c.localize)(1086,"{0}, {1}",i,s.description),description:s.description}})}};e.HelpQuickAccessProvider=C,e.HelpQuickAccessProvider=C=_=De([he(0,f.IQuickInputService),he(1,L.IKeybindingService)],C)}),define(oe[712],re([1,0,38,154,106,711]),function(ae,e,c,k,E,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),c.Registry.as(k.Extensions.Quickaccess).registerQuickAccessProvider({ctor:L.HelpQuickAccessProvider,prefix:"",helpEntries:[{description:E.QuickHelpNLS.helpQuickAccessActionLabel}]})}),define(oe[713],re([1,0,14,18,6,2,7,154,63,38]),function(ae,e,c,k,E,L,y,f,_,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.QuickAccessController=void 0;let p=class extends L.Disposable{constructor(s,t){super(),this.quickInputService=s,this.instantiationService=t,this.registry=C.Registry.as(f.Extensions.Quickaccess),this.mapProviderToDescriptor=new Map,this.lastAcceptedPickerValues=new Map,this.visibleQuickAccess=void 0}show(s="",t){this.doShowOrPick(s,!1,t)}doShowOrPick(s,t,i){const[o,g]=this.getOrInstantiateProvider(s,i?.enabledProviderPrefixes),h=this.visibleQuickAccess,l=h?.descriptor;if(h&&g&&l===g){s!==g.prefix&&!i?.preserveValue&&(h.picker.value=s),this.adjustValueSelection(h.picker,g,i);return}if(g&&!i?.preserveValue){let v;if(h&&l&&l!==g){const w=h.value.substr(l.prefix.length);w&&(v=`${g.prefix}${w}`)}if(!v){const w=o?.defaultFilterValue;w===f.DefaultQuickAccessFilterValue.LAST?v=this.lastAcceptedPickerValues.get(g):typeof w=="string"&&(v=`${g.prefix}${w}`)}typeof v=="string"&&(s=v)}const a=h?.picker?.valueSelection,r=h?.picker?.value,d=new L.DisposableStore,m=d.add(this.quickInputService.createQuickPick());m.value=s,this.adjustValueSelection(m,g,i),m.placeholder=i?.placeholder??g?.placeholder,m.quickNavigate=i?.quickNavigateConfiguration,m.hideInput=!!m.quickNavigate&&!h,(typeof i?.itemActivation=="number"||i?.quickNavigateConfiguration)&&(m.itemActivation=i?.itemActivation??_.ItemActivation.SECOND),m.contextKey=g?.contextKey,m.filterValue=v=>v.substring(g?g.prefix.length:0);let u;t&&(u=new c.DeferredPromise,d.add(E.Event.once(m.onWillAccept)(v=>{v.veto(),m.hide()}))),d.add(this.registerPickerListeners(m,o,g,s,i));const b=d.add(new k.CancellationTokenSource);if(o&&d.add(o.provide(m,b.token,i?.providerOptions)),E.Event.once(m.onDidHide)(()=>{m.selectedItems.length===0&&b.cancel(),d.dispose(),u?.complete(m.selectedItems.slice(0))}),m.show(),a&&r===s&&(m.valueSelection=a),t)return u?.p}adjustValueSelection(s,t,i){let o;i?.preserveValue?o=[s.value.length,s.value.length]:o=[t?.prefix.length??0,s.value.length],s.valueSelection=o}registerPickerListeners(s,t,i,o,g){const h=new L.DisposableStore,l=this.visibleQuickAccess={picker:s,descriptor:i,value:o};return h.add((0,L.toDisposable)(()=>{l===this.visibleQuickAccess&&(this.visibleQuickAccess=void 0)})),h.add(s.onDidChangeValue(a=>{const[r]=this.getOrInstantiateProvider(a,g?.enabledProviderPrefixes);r!==t?this.show(a,{enabledProviderPrefixes:g?.enabledProviderPrefixes,preserveValue:!0,providerOptions:g?.providerOptions}):l.value=a})),i&&h.add(s.onDidAccept(()=>{this.lastAcceptedPickerValues.set(i,s.value)})),h}getOrInstantiateProvider(s,t){const i=this.registry.getQuickAccessProvider(s);if(!i||t&&!t?.includes(i.prefix))return[void 0,void 0];let o=this.mapProviderToDescriptor.get(i);return o||(o=this.instantiationService.createInstance(i.ctor),this.mapProviderToDescriptor.set(i,o)),[o,i]}};e.QuickAccessController=p,e.QuickAccessController=p=De([he(0,_.IQuickInputService),he(1,y.IInstantiationService)],p)}),define(oe[714],re([1,0,26,30,110,553]),function(ae,e,c,k,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SeverityIcon=void 0;var L;(function(y){function f(_){switch(_){case E.default.Ignore:return"severity-ignore "+k.ThemeIcon.asClassName(c.Codicon.info);case E.default.Info:return k.ThemeIcon.asClassName(c.Codicon.info);case E.default.Warning:return k.ThemeIcon.asClassName(c.Codicon.warning);case E.default.Error:return k.ThemeIcon.asClassName(c.Codicon.error);default:return""}}y.className=f})(L||(e.SeverityIcon=L={}))}),define(oe[100],re([1,0,6,2,19,463,7]),function(ae,e,c,k,E,L,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InMemoryStorageService=e.AbstractStorageService=e.WillSaveStateReason=e.IStorageService=e.TARGET_KEY=void 0,e.loadKeyTargets=_,e.TARGET_KEY="__$__targetStorageMarker",e.IStorageService=(0,y.createDecorator)("storageService");var f;(function(n){n[n.NONE=0]="NONE",n[n.SHUTDOWN=1]="SHUTDOWN"})(f||(e.WillSaveStateReason=f={}));function _(n){const s=n.get(e.TARGET_KEY);if(s)try{return JSON.parse(s)}catch{}return Object.create(null)}class C extends k.Disposable{static{this.DEFAULT_FLUSH_INTERVAL=60*1e3}constructor(s={flushInterval:C.DEFAULT_FLUSH_INTERVAL}){super(),this.options=s,this._onDidChangeValue=this._register(new c.PauseableEmitter),this._onDidChangeTarget=this._register(new c.PauseableEmitter),this._onWillSaveState=this._register(new c.Emitter),this.onWillSaveState=this._onWillSaveState.event,this._workspaceKeyTargets=void 0,this._profileKeyTargets=void 0,this._applicationKeyTargets=void 0}onDidChangeValue(s,t,i){return c.Event.filter(this._onDidChangeValue.event,o=>o.scope===s&&(t===void 0||o.key===t),i)}emitDidChangeValue(s,t){const{key:i,external:o}=t;if(i===e.TARGET_KEY){switch(s){case-1:this._applicationKeyTargets=void 0;break;case 0:this._profileKeyTargets=void 0;break;case 1:this._workspaceKeyTargets=void 0;break}this._onDidChangeTarget.fire({scope:s})}else this._onDidChangeValue.fire({scope:s,key:i,target:this.getKeyTargets(s)[i],external:o})}get(s,t,i){return this.getStorage(t)?.get(s,i)}getBoolean(s,t,i){return this.getStorage(t)?.getBoolean(s,i)}getNumber(s,t,i){return this.getStorage(t)?.getNumber(s,i)}store(s,t,i,o,g=!1){if((0,E.isUndefinedOrNull)(t)){this.remove(s,i,g);return}this.withPausedEmitters(()=>{this.updateKeyTarget(s,i,o),this.getStorage(i)?.set(s,t,g)})}remove(s,t,i=!1){this.withPausedEmitters(()=>{this.updateKeyTarget(s,t,void 0),this.getStorage(t)?.delete(s,i)})}withPausedEmitters(s){this._onDidChangeValue.pause(),this._onDidChangeTarget.pause();try{s()}finally{this._onDidChangeValue.resume(),this._onDidChangeTarget.resume()}}updateKeyTarget(s,t,i,o=!1){const g=this.getKeyTargets(t);typeof i=="number"?g[s]!==i&&(g[s]=i,this.getStorage(t)?.set(e.TARGET_KEY,JSON.stringify(g),o)):typeof g[s]=="number"&&(delete g[s],this.getStorage(t)?.set(e.TARGET_KEY,JSON.stringify(g),o))}get workspaceKeyTargets(){return this._workspaceKeyTargets||(this._workspaceKeyTargets=this.loadKeyTargets(1)),this._workspaceKeyTargets}get profileKeyTargets(){return this._profileKeyTargets||(this._profileKeyTargets=this.loadKeyTargets(0)),this._profileKeyTargets}get applicationKeyTargets(){return this._applicationKeyTargets||(this._applicationKeyTargets=this.loadKeyTargets(-1)),this._applicationKeyTargets}getKeyTargets(s){switch(s){case-1:return this.applicationKeyTargets;case 0:return this.profileKeyTargets;default:return this.workspaceKeyTargets}}loadKeyTargets(s){const t=this.getStorage(s);return t?_(t):Object.create(null)}}e.AbstractStorageService=C;class p extends C{constructor(){super(),this.applicationStorage=this._register(new L.Storage(new L.InMemoryStorageDatabase,{hint:L.StorageHint.STORAGE_IN_MEMORY})),this.profileStorage=this._register(new L.Storage(new L.InMemoryStorageDatabase,{hint:L.StorageHint.STORAGE_IN_MEMORY})),this.workspaceStorage=this._register(new L.Storage(new L.InMemoryStorageDatabase,{hint:L.StorageHint.STORAGE_IN_MEMORY})),this._register(this.workspaceStorage.onDidChangeStorage(s=>this.emitDidChangeValue(1,s))),this._register(this.profileStorage.onDidChangeStorage(s=>this.emitDidChangeValue(0,s))),this._register(this.applicationStorage.onDidChangeStorage(s=>this.emitDidChangeValue(-1,s)))}getStorage(s){switch(s){case-1:return this.applicationStorage;case 0:return this.profileStorage;default:return this.workspaceStorage}}}e.InMemoryStorageService=p}),define(oe[715],re([1,0,6,45,4,380,49,7,100,52,5]),function(ae,e,c,k,E,L,y,f,_,C,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CodeLensCache=e.ICodeLensCache=void 0,e.ICodeLensCache=(0,f.createDecorator)("ICodeLensCache");class n{constructor(i,o){this.lineCount=i,this.data=o}}let s=class{constructor(i){this._fakeProvider=new class{provideCodeLenses(){throw new Error("not supported")}},this._cache=new k.LRUCache(20,.75);const o="codelens/cache";(0,p.runWhenWindowIdle)(C.mainWindow,()=>i.remove(o,1));const g="codelens/cache2",h=i.get(g,1,"{}");this._deserialize(h);const l=c.Event.filter(i.onWillSaveState,a=>a.reason===_.WillSaveStateReason.SHUTDOWN);c.Event.once(l)(a=>{i.store(g,this._serialize(),1,1)})}put(i,o){const g=o.lenses.map(a=>({range:a.symbol.range,command:a.symbol.command&&{id:"",title:a.symbol.command?.title}})),h=new L.CodeLensModel;h.add({lenses:g,dispose:()=>{}},this._fakeProvider);const l=new n(i.getLineCount(),h);this._cache.set(i.uri.toString(),l)}get(i){const o=this._cache.get(i.uri.toString());return o&&o.lineCount===i.getLineCount()?o.data:void 0}delete(i){this._cache.delete(i.uri.toString())}_serialize(){const i=Object.create(null);for(const[o,g]of this._cache){const h=new Set;for(const l of g.data.lenses)h.add(l.symbol.range.startLineNumber);i[o]={lineCount:g.lineCount,lines:[...h.values()]}}return JSON.stringify(i)}_deserialize(i){try{const o=JSON.parse(i);for(const g in o){const h=o[g],l=[];for(const r of h.lines)l.push({range:new E.Range(r,1,r,11)});const a=new L.CodeLensModel;a.add({lenses:l,dispose(){}},this._fakeProvider),this._cache.set(g,new n(h.lineCount,a))}}catch{}}};e.CodeLensCache=s,e.CodeLensCache=s=De([he(0,_.IStorageService)],s),(0,y.registerSingleton)(e.ICodeLensCache,s,1)}),define(oe[400],re([1,0,14,2,45,227,28,27,49,7,100]),function(ae,e,c,k,E,L,y,f,_,C,p){"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.ISuggestMemoryService=e.SuggestMemoryService=e.PrefixMemory=e.LRUMemory=e.NoMemory=e.Memory=void 0;class s{constructor(l){this.name=l}select(l,a,r){if(r.length===0)return 0;const d=r[0].score[0];for(let m=0;m<r.length;m++){const{score:u,completion:b}=r[m];if(u[0]!==d)break;if(b.preselect)return m}return 0}}e.Memory=s;class t extends s{constructor(){super("first")}memorize(l,a,r){}toJSON(){}fromJSON(){}}e.NoMemory=t;class i extends s{constructor(){super("recentlyUsed"),this._cache=new E.LRUCache(300,.66),this._seq=0}memorize(l,a,r){const d=`${l.getLanguageId()}/${r.textLabel}`;this._cache.set(d,{touch:this._seq++,type:r.completion.kind,insertText:r.completion.insertText})}select(l,a,r){if(r.length===0)return 0;const d=l.getLineContent(a.lineNumber).substr(a.column-10,a.column-1);if(/\s$/.test(d))return super.select(l,a,r);const m=r[0].score[0];let u=-1,b=-1,v=-1;for(let w=0;w<r.length&&r[w].score[0]===m;w++){const S=`${l.getLanguageId()}/${r[w].textLabel}`,D=this._cache.peek(S);if(D&&D.touch>v&&D.type===r[w].completion.kind&&D.insertText===r[w].completion.insertText&&(v=D.touch,b=w),r[w].completion.preselect&&u===-1)return u=w}return b!==-1?b:u!==-1?u:0}toJSON(){return this._cache.toJSON()}fromJSON(l){this._cache.clear();const a=0;for(const[r,d]of l)d.touch=a,d.type=typeof d.type=="number"?d.type:y.CompletionItemKinds.fromString(d.type),this._cache.set(r,d);this._seq=this._cache.size}}e.LRUMemory=i;class o extends s{constructor(){super("recentlyUsedByPrefix"),this._trie=L.TernarySearchTree.forStrings(),this._seq=0}memorize(l,a,r){const{word:d}=l.getWordUntilPosition(a),m=`${l.getLanguageId()}/${d}`;this._trie.set(m,{type:r.completion.kind,insertText:r.completion.insertText,touch:this._seq++})}select(l,a,r){const{word:d}=l.getWordUntilPosition(a);if(!d)return super.select(l,a,r);const m=`${l.getLanguageId()}/${d}`;let u=this._trie.get(m);if(u||(u=this._trie.findSubstr(m)),u)for(let b=0;b<r.length;b++){const{kind:v,insertText:w}=r[b].completion;if(v===u.type&&w===u.insertText)return b}return super.select(l,a,r)}toJSON(){const l=[];return this._trie.forEach((a,r)=>l.push([r,a])),l.sort((a,r)=>-(a[1].touch-r[1].touch)).forEach((a,r)=>a[1].touch=r),l.slice(0,200)}fromJSON(l){if(this._trie.clear(),l.length>0){this._seq=l[0][1].touch+1;for(const[a,r]of l)r.type=typeof r.type=="number"?r.type:y.CompletionItemKinds.fromString(r.type),this._trie.set(a,r)}}}e.PrefixMemory=o;let g=class{static{n=this}static{this._strategyCtors=new Map([["recentlyUsedByPrefix",o],["recentlyUsed",i],["first",t]])}static{this._storagePrefix="suggest/memories"}constructor(l,a){this._storageService=l,this._configService=a,this._disposables=new k.DisposableStore,this._persistSoon=new c.RunOnceScheduler(()=>this._saveState(),500),this._disposables.add(l.onWillSaveState(r=>{r.reason===p.WillSaveStateReason.SHUTDOWN&&this._saveState()}))}dispose(){this._disposables.dispose(),this._persistSoon.dispose()}memorize(l,a,r){this._withStrategy(l,a).memorize(l,a,r),this._persistSoon.schedule()}select(l,a,r){return this._withStrategy(l,a).select(l,a,r)}_withStrategy(l,a){const r=this._configService.getValue("editor.suggestSelection",{overrideIdentifier:l.getLanguageIdAtPosition(a.lineNumber,a.column),resource:l.uri});if(this._strategy?.name!==r){this._saveState();const d=n._strategyCtors.get(r)||t;this._strategy=new d;try{const u=this._configService.getValue("editor.suggest.shareSuggestSelections")?0:1,b=this._storageService.get(`${n._storagePrefix}/${r}`,u);b&&this._strategy.fromJSON(JSON.parse(b))}catch{}}return this._strategy}_saveState(){if(this._strategy){const a=this._configService.getValue("editor.suggest.shareSuggestSelections")?0:1,r=JSON.stringify(this._strategy);this._storageService.store(`${n._storagePrefix}/${this._strategy.name}`,r,a,1)}}};e.SuggestMemoryService=g,e.SuggestMemoryService=g=n=De([he(0,p.IStorageService),he(1,f.IConfigurationService)],g),e.ISuggestMemoryService=(0,C.createDecorator)("ISuggestMemories"),(0,_.registerSingleton)(e.ISuggestMemoryService,g,1)}),define(oe[401],re([1,0,14,6,2,29,24,12,41,100,13,3,31]),function(ae,e,c,k,E,L,y,f,_,C,p,n,s){"use strict";var t,i;Object.defineProperty(e,"__esModule",{value:!0}),e.MenuService=void 0,e.createConfigureKeybindingAction=d;let o=class{constructor(u,b,v){this._commandService=u,this._keybindingService=b,this._hiddenStates=new g(v)}createMenu(u,b,v){return new a(u,this._hiddenStates,{emitEventsForSubmenuChanges:!1,eventDebounceDelay:50,...v},this._commandService,this._keybindingService,b)}getMenuActions(u,b,v){const w=new a(u,this._hiddenStates,{emitEventsForSubmenuChanges:!1,eventDebounceDelay:50,...v},this._commandService,this._keybindingService,b),S=w.getActions(v);return w.dispose(),S}resetHiddenStates(u){this._hiddenStates.reset(u)}};e.MenuService=o,e.MenuService=o=De([he(0,y.ICommandService),he(1,s.IKeybindingService),he(2,C.IStorageService)],o);let g=class{static{t=this}static{this._key="menu.hiddenCommands"}constructor(u){this._storageService=u,this._disposables=new E.DisposableStore,this._onDidChange=new k.Emitter,this.onDidChange=this._onDidChange.event,this._ignoreChangeEvent=!1,this._hiddenByDefaultCache=new Map;try{const b=u.get(t._key,0,"{}");this._data=JSON.parse(b)}catch{this._data=Object.create(null)}this._disposables.add(u.onDidChangeValue(0,t._key,this._disposables)(()=>{if(!this._ignoreChangeEvent)try{const b=u.get(t._key,0,"{}");this._data=JSON.parse(b)}catch(b){console.log("FAILED to read storage after UPDATE",b)}this._onDidChange.fire()}))}dispose(){this._onDidChange.dispose(),this._disposables.dispose()}_isHiddenByDefault(u,b){return this._hiddenByDefaultCache.get(`${u.id}/${b}`)??!1}setDefaultState(u,b,v){this._hiddenByDefaultCache.set(`${u.id}/${b}`,v)}isHidden(u,b){const v=this._isHiddenByDefault(u,b),w=this._data[u.id]?.includes(b)??!1;return v?!w:w}updateHidden(u,b,v){this._isHiddenByDefault(u,b)&&(v=!v);const S=this._data[u.id];if(v)S?S.indexOf(b)<0&&S.push(b):this._data[u.id]=[b];else if(S){const D=S.indexOf(b);D>=0&&(0,p.removeFastWithoutKeepingOrder)(S,D),S.length===0&&delete this._data[u.id]}this._persist()}reset(u){if(u===void 0)this._data=Object.create(null),this._persist();else{for(const{id:b}of u)this._data[b]&&delete this._data[b];this._persist()}}_persist(){try{this._ignoreChangeEvent=!0;const u=JSON.stringify(this._data);this._storageService.store(t._key,u,0,0)}finally{this._ignoreChangeEvent=!1}}};g=t=De([he(0,C.IStorageService)],g);class h{constructor(u,b){this._id=u,this._collectContextKeysForSubmenus=b,this._menuGroups=[],this._structureContextKeys=new Set,this._preconditionContextKeys=new Set,this._toggledContextKeys=new Set,this.refresh()}get structureContextKeys(){return this._structureContextKeys}get preconditionContextKeys(){return this._preconditionContextKeys}get toggledContextKeys(){return this._toggledContextKeys}refresh(){this._menuGroups.length=0,this._structureContextKeys.clear(),this._preconditionContextKeys.clear(),this._toggledContextKeys.clear();const u=this._sort(L.MenuRegistry.getMenuItems(this._id));let b;for(const v of u){const w=v.group||"";(!b||b[0]!==w)&&(b=[w,[]],this._menuGroups.push(b)),b[1].push(v),this._collectContextKeys(v)}}_sort(u){return u}_collectContextKeys(u){if(h._fillInKbExprKeys(u.when,this._structureContextKeys),(0,L.isIMenuItem)(u)){if(u.command.precondition&&h._fillInKbExprKeys(u.command.precondition,this._preconditionContextKeys),u.command.toggled){const b=u.command.toggled.condition||u.command.toggled;h._fillInKbExprKeys(b,this._toggledContextKeys)}}else this._collectContextKeysForSubmenus&&L.MenuRegistry.getMenuItems(u.submenu).forEach(this._collectContextKeys,this)}static _fillInKbExprKeys(u,b){if(u)for(const v of u.keys())b.add(v)}}let l=i=class extends h{constructor(u,b,v,w,S,D){super(u,v),this._hiddenStates=b,this._commandService=w,this._keybindingService=S,this._contextKeyService=D,this.refresh()}createActionGroups(u){const b=[];for(const v of this._menuGroups){const[w,S]=v;let D;for(const I of S)if(this._contextKeyService.contextMatchesRules(I.when)){const T=(0,L.isIMenuItem)(I);T&&this._hiddenStates.setDefaultState(this._id,I.command.id,!!I.isHiddenByDefault);const M=r(this._id,T?I.command:I,this._hiddenStates);if(T){const A=d(this._commandService,this._keybindingService,I.command.id,I.when);(D??=[]).push(new L.MenuItemAction(I.command,I.alt,u,M,A,this._contextKeyService,this._commandService))}else{const A=new i(I.submenu,this._hiddenStates,this._collectContextKeysForSubmenus,this._commandService,this._keybindingService,this._contextKeyService).createActionGroups(u),R=_.Separator.join(...A.map(N=>N[1]));R.length>0&&(D??=[]).push(new L.SubmenuItemAction(I,M,R))}}D&&D.length>0&&b.push([w,D])}return b}_sort(u){return u.sort(i._compareMenuItems)}static _compareMenuItems(u,b){const v=u.group,w=b.group;if(v!==w){if(v){if(!w)return-1}else return 1;if(v==="navigation")return-1;if(w==="navigation")return 1;const I=v.localeCompare(w);if(I!==0)return I}const S=u.order||0,D=b.order||0;return S<D?-1:S>D?1:i._compareTitles((0,L.isIMenuItem)(u)?u.command.title:u.title,(0,L.isIMenuItem)(b)?b.command.title:b.title)}static _compareTitles(u,b){const v=typeof u=="string"?u:u.original,w=typeof b=="string"?b:b.original;return v.localeCompare(w)}};l=i=De([he(3,y.ICommandService),he(4,s.IKeybindingService),he(5,f.IContextKeyService)],l);let a=class{constructor(u,b,v,w,S,D){this._disposables=new E.DisposableStore,this._menuInfo=new l(u,b,v.emitEventsForSubmenuChanges,w,S,D);const I=new c.RunOnceScheduler(()=>{this._menuInfo.refresh(),this._onDidChange.fire({menu:this,isStructuralChange:!0,isEnablementChange:!0,isToggleChange:!0})},v.eventDebounceDelay);this._disposables.add(I),this._disposables.add(L.MenuRegistry.onDidChangeMenu(R=>{R.has(u)&&I.schedule()}));const T=this._disposables.add(new E.DisposableStore),M=R=>{let N=!1,O=!1,x=!1;for(const F of R)if(N=N||F.isStructuralChange,O=O||F.isEnablementChange,x=x||F.isToggleChange,N&&O&&x)break;return{menu:this,isStructuralChange:N,isEnablementChange:O,isToggleChange:x}},A=()=>{T.add(D.onDidChangeContext(R=>{const N=R.affectsSome(this._menuInfo.structureContextKeys),O=R.affectsSome(this._menuInfo.preconditionContextKeys),x=R.affectsSome(this._menuInfo.toggledContextKeys);(N||O||x)&&this._onDidChange.fire({menu:this,isStructuralChange:N,isEnablementChange:O,isToggleChange:x})})),T.add(b.onDidChange(R=>{this._onDidChange.fire({menu:this,isStructuralChange:!0,isEnablementChange:!1,isToggleChange:!1})}))};this._onDidChange=new k.DebounceEmitter({onWillAddFirstListener:A,onDidRemoveLastListener:T.clear.bind(T),delay:v.eventDebounceDelay,merge:M}),this.onDidChange=this._onDidChange.event}getActions(u){return this._menuInfo.createActionGroups(u)}dispose(){this._disposables.dispose(),this._onDidChange.dispose()}};a=De([he(3,y.ICommandService),he(4,s.IKeybindingService),he(5,f.IContextKeyService)],a);function r(m,u,b){const v=(0,L.isISubmenuItem)(u)?u.submenu.id:u.id,w=typeof u.title=="string"?u.title:u.title.value,S=(0,_.toAction)({id:`hide/${m.id}/${v}`,label:(0,n.localize)(1163,"Hide '{0}'",w),run(){b.updateHidden(m,v,!0)}}),D=(0,_.toAction)({id:`toggle/${m.id}/${v}`,label:w,get checked(){return!b.isHidden(m,v)},run(){b.updateHidden(m,v,!!this.checked)}});return{hide:S,toggle:D,get isHidden(){return!D.checked}}}function d(m,u,b,v=void 0,w=!0){return(0,_.toAction)({id:`configureKeybinding/${b}`,label:(0,n.localize)(1164,"Configure Keybinding"),enabled:w,run(){const D=!!!u.lookupKeybinding(b)&&v?v.serialize():void 0;m.executeCommand("workbench.action.openGlobalKeybindings",`@command:${b}`+(D?` +when:${D}`:""))}})}}),define(oe[66],re([1,0,7]),function(ae,e,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ITelemetryService=void 0,e.ITelemetryService=(0,c.createDecorator)("telemetryService")}),define(oe[15],re([1,0,3,22,35,9,44,78,29,24,12,7,120,38,66,19,61,5]),function(ae,e,c,k,E,L,y,f,_,C,p,n,s,t,i,o,g,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SelectAllCommand=e.RedoCommand=e.UndoCommand=e.EditorExtensionsRegistry=e.EditorAction2=e.MultiEditorAction=e.EditorAction=e.EditorCommand=e.ProxyCommand=e.MultiCommand=e.Command=void 0,e.registerModelAndPositionCommand=v,e.registerEditorCommand=w,e.registerEditorAction=S,e.registerMultiEditorAction=D,e.registerInstantiatedEditorAction=I,e.registerEditorContribution=T;class l{constructor(x){this.id=x.id,this.precondition=x.precondition,this._kbOpts=x.kbOpts,this._menuOpts=x.menuOpts,this.metadata=x.metadata}register(){if(Array.isArray(this._menuOpts)?this._menuOpts.forEach(this._registerMenuItem,this):this._menuOpts&&this._registerMenuItem(this._menuOpts),this._kbOpts){const x=Array.isArray(this._kbOpts)?this._kbOpts:[this._kbOpts];for(const F of x){let W=F.kbExpr;this.precondition&&(W?W=p.ContextKeyExpr.and(W,this.precondition):W=this.precondition);const V={id:this.id,weight:F.weight,args:F.args,when:W,primary:F.primary,secondary:F.secondary,win:F.win,linux:F.linux,mac:F.mac};s.KeybindingsRegistry.registerKeybindingRule(V)}}C.CommandsRegistry.registerCommand({id:this.id,handler:(x,F)=>this.runCommand(x,F),metadata:this.metadata})}_registerMenuItem(x){_.MenuRegistry.appendMenuItem(x.menuId,{group:x.group,command:{id:this.id,title:x.title,icon:x.icon,precondition:this.precondition},when:x.when,order:x.order})}}e.Command=l;class a extends l{constructor(){super(...arguments),this._implementations=[]}addImplementation(x,F,W,V){return this._implementations.push({priority:x,name:F,implementation:W,when:V}),this._implementations.sort((q,H)=>H.priority-q.priority),{dispose:()=>{for(let q=0;q<this._implementations.length;q++)if(this._implementations[q].implementation===W){this._implementations.splice(q,1);return}}}}runCommand(x,F){const W=x.get(g.ILogService),V=x.get(p.IContextKeyService);W.trace(`Executing Command '${this.id}' which has ${this._implementations.length} bound.`);for(const q of this._implementations){if(q.when){const K=V.getContext((0,h.getActiveElement)());if(!q.when.evaluate(K))continue}const H=q.implementation(x,F);if(H)return W.trace(`Command '${this.id}' was handled by '${q.name}'.`),typeof H=="boolean"?void 0:H}W.trace(`The Command '${this.id}' was not handled by any implementation.`)}}e.MultiCommand=a;class r extends l{constructor(x,F){super(F),this.command=x}runCommand(x,F){return this.command.runCommand(x,F)}}e.ProxyCommand=r;class d extends l{static bindToContribution(x){return class extends d{constructor(W){super(W),this._callback=W.handler}runEditorCommand(W,V,q){const H=x(V);H&&this._callback(H,q)}}}static runEditorCommand(x,F,W,V){const q=x.get(E.ICodeEditorService),H=q.getFocusedCodeEditor()||q.getActiveCodeEditor();if(H)return H.invokeWithinContext(K=>{if(K.get(p.IContextKeyService).contextMatchesRules(W??void 0))return V(K,H,F)})}runCommand(x,F){return d.runEditorCommand(x,F,this.precondition,(W,V,q)=>this.runEditorCommand(W,V,q))}}e.EditorCommand=d;class m extends d{static convertOptions(x){let F;Array.isArray(x.menuOpts)?F=x.menuOpts:x.menuOpts?F=[x.menuOpts]:F=[];function W(V){return V.menuId||(V.menuId=_.MenuId.EditorContext),V.title||(V.title=x.label),V.when=p.ContextKeyExpr.and(x.precondition,V.when),V}return Array.isArray(x.contextMenuOpts)?F.push(...x.contextMenuOpts.map(W)):x.contextMenuOpts&&F.push(W(x.contextMenuOpts)),x.menuOpts=F,x}constructor(x){super(m.convertOptions(x)),this.label=x.label,this.alias=x.alias}runEditorCommand(x,F,W){return this.reportTelemetry(x,F),this.run(x,F,W||{})}reportTelemetry(x,F){x.get(i.ITelemetryService).publicLog2("editorActionInvoked",{name:this.label,id:this.id})}}e.EditorAction=m;class u extends m{constructor(){super(...arguments),this._implementations=[]}addImplementation(x,F){return this._implementations.push([x,F]),this._implementations.sort((W,V)=>V[0]-W[0]),{dispose:()=>{for(let W=0;W<this._implementations.length;W++)if(this._implementations[W][1]===F){this._implementations.splice(W,1);return}}}}run(x,F,W){for(const V of this._implementations){const q=V[1](x,F,W);if(q)return typeof q=="boolean"?void 0:q}}}e.MultiEditorAction=u;class b extends _.Action2{run(x,...F){const W=x.get(E.ICodeEditorService),V=W.getFocusedCodeEditor()||W.getActiveCodeEditor();if(V)return V.invokeWithinContext(q=>{const H=q.get(p.IContextKeyService),K=q.get(g.ILogService);if(!H.contextMatchesRules(this.desc.precondition??void 0)){K.debug("[EditorAction2] NOT running command because its precondition is FALSE",this.desc.id,this.desc.precondition?.serialize());return}return this.runEditorCommand(q,V,...F)})}}e.EditorAction2=b;function v(O,x){C.CommandsRegistry.registerCommand(O,function(F,...W){const V=F.get(n.IInstantiationService),[q,H]=W;(0,o.assertType)(k.URI.isUri(q)),(0,o.assertType)(L.Position.isIPosition(H));const K=F.get(y.IModelService).getModel(q);if(K){const G=L.Position.lift(H);return V.invokeFunction(x,K,G,...W.slice(2))}return F.get(f.ITextModelService).createModelReference(q).then(G=>new Promise((Y,X)=>{try{const Z=V.invokeFunction(x,G.object.textEditorModel,L.Position.lift(H),W.slice(2));Y(Z)}catch(Z){X(Z)}}).finally(()=>{G.dispose()}))})}function w(O){return R.INSTANCE.registerEditorCommand(O),O}function S(O){const x=new O;return R.INSTANCE.registerEditorAction(x),x}function D(O){return R.INSTANCE.registerEditorAction(O),O}function I(O){R.INSTANCE.registerEditorAction(O)}function T(O,x,F){R.INSTANCE.registerEditorContribution(O,x,F)}var M;(function(O){function x(H){return R.INSTANCE.getEditorCommand(H)}O.getEditorCommand=x;function F(){return R.INSTANCE.getEditorActions()}O.getEditorActions=F;function W(){return R.INSTANCE.getEditorContributions()}O.getEditorContributions=W;function V(H){return R.INSTANCE.getEditorContributions().filter(K=>H.indexOf(K.id)>=0)}O.getSomeEditorContributions=V;function q(){return R.INSTANCE.getDiffEditorContributions()}O.getDiffEditorContributions=q})(M||(e.EditorExtensionsRegistry=M={}));const A={EditorCommonContributions:"editor.contributions"};class R{static{this.INSTANCE=new R}constructor(){this.editorContributions=[],this.diffEditorContributions=[],this.editorActions=[],this.editorCommands=Object.create(null)}registerEditorContribution(x,F,W){this.editorContributions.push({id:x,ctor:F,instantiation:W})}getEditorContributions(){return this.editorContributions.slice(0)}getDiffEditorContributions(){return this.diffEditorContributions.slice(0)}registerEditorAction(x){x.register(),this.editorActions.push(x)}getEditorActions(){return this.editorActions}registerEditorCommand(x){x.register(),this.editorCommands[x.id]=x}getEditorCommand(x){return this.editorCommands[x]||null}}t.Registry.add(A.EditorCommonContributions,R.INSTANCE);function N(O){return O.register(),O}e.UndoCommand=N(new a({id:"undo",precondition:void 0,kbOpts:{weight:0,primary:2104},menuOpts:[{menuId:_.MenuId.MenubarEditMenu,group:"1_do",title:c.localize(1820,"&&Undo"),order:1},{menuId:_.MenuId.CommandPalette,group:"",title:c.localize(1821,"Undo"),order:1}]})),N(new r(e.UndoCommand,{id:"default:undo",precondition:void 0})),e.RedoCommand=N(new a({id:"redo",precondition:void 0,kbOpts:{weight:0,primary:2103,secondary:[3128],mac:{primary:3128}},menuOpts:[{menuId:_.MenuId.MenubarEditMenu,group:"1_do",title:c.localize(1822,"&&Redo"),order:2},{menuId:_.MenuId.CommandPalette,group:"",title:c.localize(1823,"Redo"),order:1}]})),N(new r(e.RedoCommand,{id:"default:redo",precondition:void 0})),e.SelectAllCommand=N(new a({id:"editor.action.selectAll",precondition:void 0,kbOpts:{weight:0,kbExpr:null,primary:2079},menuOpts:[{menuId:_.MenuId.MenubarSelectionMenu,group:"1_basic",title:c.localize(1824,"&&Select All"),order:1},{menuId:_.MenuId.CommandPalette,group:"",title:c.localize(1825,"Select All"),order:1}]}))}),define(oe[212],re([1,0,3,64,19,48,15,35,576,77,245,246,275,9,4,20,12,120,5,211]),function(ae,e,c,k,E,L,y,f,_,C,p,n,s,t,i,o,g,h,l,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CoreEditingCommands=e.CoreNavigationCommands=e.RevealLine_=e.EditorScroll_=e.CoreEditorCommand=void 0;const r=0;class d extends y.EditorCommand{runEditorCommand(R,N,O){const x=N._getViewModel();x&&this.runCoreEditorCommand(x,O||{})}}e.CoreEditorCommand=d;var m;(function(A){const R=function(O){if(!E.isObject(O))return!1;const x=O;return!(!E.isString(x.to)||!E.isUndefined(x.by)&&!E.isString(x.by)||!E.isUndefined(x.value)&&!E.isNumber(x.value)||!E.isUndefined(x.revealCursor)&&!E.isBoolean(x.revealCursor))};A.metadata={description:"Scroll editor in the given direction",args:[{name:"Editor scroll argument object",description:"Property-value pairs that can be passed through this argument:\n * 'to': A mandatory direction value.\n ```\n 'up', 'down'\n ```\n * 'by': Unit to move. Default is computed based on 'to' value.\n ```\n 'line', 'wrappedLine', 'page', 'halfPage', 'editor'\n ```\n * 'value': Number of units to move. Default is '1'.\n * 'revealCursor': If 'true' reveals the cursor if it is outside view port.\n ",constraint:R,schema:{type:"object",required:["to"],properties:{to:{type:"string",enum:["up","down"]},by:{type:"string",enum:["line","wrappedLine","page","halfPage","editor"]},value:{type:"number",default:1},revealCursor:{type:"boolean"}}}}]},A.RawDirection={Up:"up",Right:"right",Down:"down",Left:"left"},A.RawUnit={Line:"line",WrappedLine:"wrappedLine",Page:"page",HalfPage:"halfPage",Editor:"editor",Column:"column"};function N(O){let x;switch(O.to){case A.RawDirection.Up:x=1;break;case A.RawDirection.Right:x=2;break;case A.RawDirection.Down:x=3;break;case A.RawDirection.Left:x=4;break;default:return null}let F;switch(O.by){case A.RawUnit.Line:F=1;break;case A.RawUnit.WrappedLine:F=2;break;case A.RawUnit.Page:F=3;break;case A.RawUnit.HalfPage:F=4;break;case A.RawUnit.Editor:F=5;break;case A.RawUnit.Column:F=6;break;default:F=2}const W=Math.floor(O.value||1),V=!!O.revealCursor;return{direction:x,unit:F,value:W,revealCursor:V,select:!!O.select}}A.parse=N})(m||(e.EditorScroll_=m={}));var u;(function(A){const R=function(N){if(!E.isObject(N))return!1;const O=N;return!(!E.isNumber(O.lineNumber)&&!E.isString(O.lineNumber)||!E.isUndefined(O.at)&&!E.isString(O.at))};A.metadata={description:"Reveal the given line at the given logical position",args:[{name:"Reveal line argument object",description:"Property-value pairs that can be passed through this argument:\n * 'lineNumber': A mandatory line number value.\n * 'at': Logical position at which line has to be revealed.\n ```\n 'top', 'center', 'bottom'\n ```\n ",constraint:R,schema:{type:"object",required:["lineNumber"],properties:{lineNumber:{type:["number","string"]},at:{type:"string",enum:["top","center","bottom"]}}}}]},A.RawAtArgument={Top:"top",Center:"center",Bottom:"bottom"}})(u||(e.RevealLine_=u={}));class b{constructor(R){R.addImplementation(1e4,"code-editor",(N,O)=>{const x=N.get(f.ICodeEditorService).getFocusedCodeEditor();return x&&x.hasTextFocus()?this._runEditorCommand(N,x,O):!1}),R.addImplementation(1e3,"generic-dom-input-textarea",(N,O)=>{const x=(0,l.getActiveElement)();return x&&["input","textarea"].indexOf(x.tagName.toLowerCase())>=0?(this.runDOMCommand(x),!0):!1}),R.addImplementation(0,"generic-dom",(N,O)=>{const x=N.get(f.ICodeEditorService).getActiveCodeEditor();return x?(x.focus(),this._runEditorCommand(N,x,O)):!1})}_runEditorCommand(R,N,O){const x=this.runEditorCommand(R,N,O);return x||!0}}var v;(function(A){class R extends d{constructor(se){super(se),this._inSelectionMode=se.inSelectionMode}runCoreEditorCommand(se,ue){if(!ue.position)return;se.model.pushStackElement(),se.setCursorStates(ue.source,3,[n.CursorMoveCommands.moveTo(se,se.getPrimaryCursorState(),this._inSelectionMode,ue.position,ue.viewPosition)])&&ue.revealType!==2&&se.revealAllCursors(ue.source,!0,!0)}}A.MoveTo=(0,y.registerEditorCommand)(new R({id:"_moveTo",inSelectionMode:!1,precondition:void 0})),A.MoveToSelect=(0,y.registerEditorCommand)(new R({id:"_moveToSelect",inSelectionMode:!0,precondition:void 0}));class N extends d{runCoreEditorCommand(se,ue){se.model.pushStackElement();const ge=this._getColumnSelectResult(se,se.getPrimaryCursorState(),se.getCursorColumnSelectData(),ue);ge!==null&&(se.setCursorStates(ue.source,3,ge.viewStates.map(pe=>C.CursorState.fromViewState(pe))),se.setCursorColumnSelectData({isReal:!0,fromViewLineNumber:ge.fromLineNumber,fromViewVisualColumn:ge.fromVisualColumn,toViewLineNumber:ge.toLineNumber,toViewVisualColumn:ge.toVisualColumn}),ge.reversed?se.revealTopMostCursor(ue.source):se.revealBottomMostCursor(ue.source))}}A.ColumnSelect=(0,y.registerEditorCommand)(new class extends N{constructor(){super({id:"columnSelect",precondition:void 0})}_getColumnSelectResult(te,se,ue,ge){if(typeof ge.position>"u"||typeof ge.viewPosition>"u"||typeof ge.mouseColumn>"u")return null;const pe=te.model.validatePosition(ge.position),ce=te.coordinatesConverter.validateViewPosition(new t.Position(ge.viewPosition.lineNumber,ge.viewPosition.column),pe),ie=ge.doColumnSelect?ue.fromViewLineNumber:ce.lineNumber,ne=ge.doColumnSelect?ue.fromViewVisualColumn:ge.mouseColumn-1;return _.ColumnSelection.columnSelect(te.cursorConfig,te,ie,ne,ce.lineNumber,ge.mouseColumn-1)}}),A.CursorColumnSelectLeft=(0,y.registerEditorCommand)(new class extends N{constructor(){super({id:"cursorColumnSelectLeft",precondition:void 0,kbOpts:{weight:r,kbExpr:o.EditorContextKeys.textInputFocus,primary:3599,linux:{primary:0}}})}_getColumnSelectResult(te,se,ue,ge){return _.ColumnSelection.columnSelectLeft(te.cursorConfig,te,ue)}}),A.CursorColumnSelectRight=(0,y.registerEditorCommand)(new class extends N{constructor(){super({id:"cursorColumnSelectRight",precondition:void 0,kbOpts:{weight:r,kbExpr:o.EditorContextKeys.textInputFocus,primary:3601,linux:{primary:0}}})}_getColumnSelectResult(te,se,ue,ge){return _.ColumnSelection.columnSelectRight(te.cursorConfig,te,ue)}});class O extends N{constructor(se){super(se),this._isPaged=se.isPaged}_getColumnSelectResult(se,ue,ge,pe){return _.ColumnSelection.columnSelectUp(se.cursorConfig,se,ge,this._isPaged)}}A.CursorColumnSelectUp=(0,y.registerEditorCommand)(new O({isPaged:!1,id:"cursorColumnSelectUp",precondition:void 0,kbOpts:{weight:r,kbExpr:o.EditorContextKeys.textInputFocus,primary:3600,linux:{primary:0}}})),A.CursorColumnSelectPageUp=(0,y.registerEditorCommand)(new O({isPaged:!0,id:"cursorColumnSelectPageUp",precondition:void 0,kbOpts:{weight:r,kbExpr:o.EditorContextKeys.textInputFocus,primary:3595,linux:{primary:0}}}));class x extends N{constructor(se){super(se),this._isPaged=se.isPaged}_getColumnSelectResult(se,ue,ge,pe){return _.ColumnSelection.columnSelectDown(se.cursorConfig,se,ge,this._isPaged)}}A.CursorColumnSelectDown=(0,y.registerEditorCommand)(new x({isPaged:!1,id:"cursorColumnSelectDown",precondition:void 0,kbOpts:{weight:r,kbExpr:o.EditorContextKeys.textInputFocus,primary:3602,linux:{primary:0}}})),A.CursorColumnSelectPageDown=(0,y.registerEditorCommand)(new x({isPaged:!0,id:"cursorColumnSelectPageDown",precondition:void 0,kbOpts:{weight:r,kbExpr:o.EditorContextKeys.textInputFocus,primary:3596,linux:{primary:0}}}));class F extends d{constructor(){super({id:"cursorMove",precondition:void 0,metadata:n.CursorMove.metadata})}runCoreEditorCommand(se,ue){const ge=n.CursorMove.parse(ue);ge&&this._runCursorMove(se,ue.source,ge)}_runCursorMove(se,ue,ge){se.model.pushStackElement(),se.setCursorStates(ue,3,F._move(se,se.getCursorStates(),ge)),se.revealAllCursors(ue,!0)}static _move(se,ue,ge){const pe=ge.select,ce=ge.value;switch(ge.direction){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:case 10:return n.CursorMoveCommands.simpleMove(se,ue,ge.direction,pe,ce,ge.unit);case 11:case 13:case 12:case 14:return n.CursorMoveCommands.viewportMove(se,ue,ge.direction,pe,ce);default:return null}}}A.CursorMoveImpl=F,A.CursorMove=(0,y.registerEditorCommand)(new F);class W extends d{constructor(se){super(se),this._staticArgs=se.args}runCoreEditorCommand(se,ue){let ge=this._staticArgs;this._staticArgs.value===-1&&(ge={direction:this._staticArgs.direction,unit:this._staticArgs.unit,select:this._staticArgs.select,value:ue.pageSize||se.cursorConfig.pageSize}),se.model.pushStackElement(),se.setCursorStates(ue.source,3,n.CursorMoveCommands.simpleMove(se,se.getCursorStates(),ge.direction,ge.select,ge.value,ge.unit)),se.revealAllCursors(ue.source,!0)}}A.CursorLeft=(0,y.registerEditorCommand)(new W({args:{direction:0,unit:0,select:!1,value:1},id:"cursorLeft",precondition:void 0,kbOpts:{weight:r,kbExpr:o.EditorContextKeys.textInputFocus,primary:15,mac:{primary:15,secondary:[288]}}})),A.CursorLeftSelect=(0,y.registerEditorCommand)(new W({args:{direction:0,unit:0,select:!0,value:1},id:"cursorLeftSelect",precondition:void 0,kbOpts:{weight:r,kbExpr:o.EditorContextKeys.textInputFocus,primary:1039}})),A.CursorRight=(0,y.registerEditorCommand)(new W({args:{direction:1,unit:0,select:!1,value:1},id:"cursorRight",precondition:void 0,kbOpts:{weight:r,kbExpr:o.EditorContextKeys.textInputFocus,primary:17,mac:{primary:17,secondary:[292]}}})),A.CursorRightSelect=(0,y.registerEditorCommand)(new W({args:{direction:1,unit:0,select:!0,value:1},id:"cursorRightSelect",precondition:void 0,kbOpts:{weight:r,kbExpr:o.EditorContextKeys.textInputFocus,primary:1041}})),A.CursorUp=(0,y.registerEditorCommand)(new W({args:{direction:2,unit:2,select:!1,value:1},id:"cursorUp",precondition:void 0,kbOpts:{weight:r,kbExpr:o.EditorContextKeys.textInputFocus,primary:16,mac:{primary:16,secondary:[302]}}})),A.CursorUpSelect=(0,y.registerEditorCommand)(new W({args:{direction:2,unit:2,select:!0,value:1},id:"cursorUpSelect",precondition:void 0,kbOpts:{weight:r,kbExpr:o.EditorContextKeys.textInputFocus,primary:1040,secondary:[3088],mac:{primary:1040},linux:{primary:1040}}})),A.CursorPageUp=(0,y.registerEditorCommand)(new W({args:{direction:2,unit:2,select:!1,value:-1},id:"cursorPageUp",precondition:void 0,kbOpts:{weight:r,kbExpr:o.EditorContextKeys.textInputFocus,primary:11}})),A.CursorPageUpSelect=(0,y.registerEditorCommand)(new W({args:{direction:2,unit:2,select:!0,value:-1},id:"cursorPageUpSelect",precondition:void 0,kbOpts:{weight:r,kbExpr:o.EditorContextKeys.textInputFocus,primary:1035}})),A.CursorDown=(0,y.registerEditorCommand)(new W({args:{direction:3,unit:2,select:!1,value:1},id:"cursorDown",precondition:void 0,kbOpts:{weight:r,kbExpr:o.EditorContextKeys.textInputFocus,primary:18,mac:{primary:18,secondary:[300]}}})),A.CursorDownSelect=(0,y.registerEditorCommand)(new W({args:{direction:3,unit:2,select:!0,value:1},id:"cursorDownSelect",precondition:void 0,kbOpts:{weight:r,kbExpr:o.EditorContextKeys.textInputFocus,primary:1042,secondary:[3090],mac:{primary:1042},linux:{primary:1042}}})),A.CursorPageDown=(0,y.registerEditorCommand)(new W({args:{direction:3,unit:2,select:!1,value:-1},id:"cursorPageDown",precondition:void 0,kbOpts:{weight:r,kbExpr:o.EditorContextKeys.textInputFocus,primary:12}})),A.CursorPageDownSelect=(0,y.registerEditorCommand)(new W({args:{direction:3,unit:2,select:!0,value:-1},id:"cursorPageDownSelect",precondition:void 0,kbOpts:{weight:r,kbExpr:o.EditorContextKeys.textInputFocus,primary:1036}})),A.CreateCursor=(0,y.registerEditorCommand)(new class extends d{constructor(){super({id:"createCursor",precondition:void 0})}runCoreEditorCommand(te,se){if(!se.position)return;let ue;se.wholeLine?ue=n.CursorMoveCommands.line(te,te.getPrimaryCursorState(),!1,se.position,se.viewPosition):ue=n.CursorMoveCommands.moveTo(te,te.getPrimaryCursorState(),!1,se.position,se.viewPosition);const ge=te.getCursorStates();if(ge.length>1){const pe=ue.modelState?ue.modelState.position:null,ce=ue.viewState?ue.viewState.position:null;for(let ie=0,ne=ge.length;ie<ne;ie++){const J=ge[ie];if(!(pe&&!J.modelState.selection.containsPosition(pe))&&!(ce&&!J.viewState.selection.containsPosition(ce))){ge.splice(ie,1),te.model.pushStackElement(),te.setCursorStates(se.source,3,ge);return}}}ge.push(ue),te.model.pushStackElement(),te.setCursorStates(se.source,3,ge)}}),A.LastCursorMoveToSelect=(0,y.registerEditorCommand)(new class extends d{constructor(){super({id:"_lastCursorMoveToSelect",precondition:void 0})}runCoreEditorCommand(te,se){if(!se.position)return;const ue=te.getLastAddedCursorIndex(),ge=te.getCursorStates(),pe=ge.slice(0);pe[ue]=n.CursorMoveCommands.moveTo(te,ge[ue],!0,se.position,se.viewPosition),te.model.pushStackElement(),te.setCursorStates(se.source,3,pe)}});class V extends d{constructor(se){super(se),this._inSelectionMode=se.inSelectionMode}runCoreEditorCommand(se,ue){se.model.pushStackElement(),se.setCursorStates(ue.source,3,n.CursorMoveCommands.moveToBeginningOfLine(se,se.getCursorStates(),this._inSelectionMode)),se.revealAllCursors(ue.source,!0)}}A.CursorHome=(0,y.registerEditorCommand)(new V({inSelectionMode:!1,id:"cursorHome",precondition:void 0,kbOpts:{weight:r,kbExpr:o.EditorContextKeys.textInputFocus,primary:14,mac:{primary:14,secondary:[2063]}}})),A.CursorHomeSelect=(0,y.registerEditorCommand)(new V({inSelectionMode:!0,id:"cursorHomeSelect",precondition:void 0,kbOpts:{weight:r,kbExpr:o.EditorContextKeys.textInputFocus,primary:1038,mac:{primary:1038,secondary:[3087]}}}));class q extends d{constructor(se){super(se),this._inSelectionMode=se.inSelectionMode}runCoreEditorCommand(se,ue){se.model.pushStackElement(),se.setCursorStates(ue.source,3,this._exec(se.getCursorStates())),se.revealAllCursors(ue.source,!0)}_exec(se){const ue=[];for(let ge=0,pe=se.length;ge<pe;ge++){const ce=se[ge],ie=ce.modelState.position.lineNumber;ue[ge]=C.CursorState.fromModelState(ce.modelState.move(this._inSelectionMode,ie,1,0))}return ue}}A.CursorLineStart=(0,y.registerEditorCommand)(new q({inSelectionMode:!1,id:"cursorLineStart",precondition:void 0,kbOpts:{weight:r,kbExpr:o.EditorContextKeys.textInputFocus,primary:0,mac:{primary:287}}})),A.CursorLineStartSelect=(0,y.registerEditorCommand)(new q({inSelectionMode:!0,id:"cursorLineStartSelect",precondition:void 0,kbOpts:{weight:r,kbExpr:o.EditorContextKeys.textInputFocus,primary:0,mac:{primary:1311}}}));class H extends d{constructor(se){super(se),this._inSelectionMode=se.inSelectionMode}runCoreEditorCommand(se,ue){se.model.pushStackElement(),se.setCursorStates(ue.source,3,n.CursorMoveCommands.moveToEndOfLine(se,se.getCursorStates(),this._inSelectionMode,ue.sticky||!1)),se.revealAllCursors(ue.source,!0)}}A.CursorEnd=(0,y.registerEditorCommand)(new H({inSelectionMode:!1,id:"cursorEnd",precondition:void 0,kbOpts:{args:{sticky:!1},weight:r,kbExpr:o.EditorContextKeys.textInputFocus,primary:13,mac:{primary:13,secondary:[2065]}},metadata:{description:"Go to End",args:[{name:"args",schema:{type:"object",properties:{sticky:{description:c.localize(1826,"Stick to the end even when going to longer lines"),type:"boolean",default:!1}}}}]}})),A.CursorEndSelect=(0,y.registerEditorCommand)(new H({inSelectionMode:!0,id:"cursorEndSelect",precondition:void 0,kbOpts:{args:{sticky:!1},weight:r,kbExpr:o.EditorContextKeys.textInputFocus,primary:1037,mac:{primary:1037,secondary:[3089]}},metadata:{description:"Select to End",args:[{name:"args",schema:{type:"object",properties:{sticky:{description:c.localize(1827,"Stick to the end even when going to longer lines"),type:"boolean",default:!1}}}}]}}));class K extends d{constructor(se){super(se),this._inSelectionMode=se.inSelectionMode}runCoreEditorCommand(se,ue){se.model.pushStackElement(),se.setCursorStates(ue.source,3,this._exec(se,se.getCursorStates())),se.revealAllCursors(ue.source,!0)}_exec(se,ue){const ge=[];for(let pe=0,ce=ue.length;pe<ce;pe++){const ie=ue[pe],ne=ie.modelState.position.lineNumber,J=se.model.getLineMaxColumn(ne);ge[pe]=C.CursorState.fromModelState(ie.modelState.move(this._inSelectionMode,ne,J,0))}return ge}}A.CursorLineEnd=(0,y.registerEditorCommand)(new K({inSelectionMode:!1,id:"cursorLineEnd",precondition:void 0,kbOpts:{weight:r,kbExpr:o.EditorContextKeys.textInputFocus,primary:0,mac:{primary:291}}})),A.CursorLineEndSelect=(0,y.registerEditorCommand)(new K({inSelectionMode:!0,id:"cursorLineEndSelect",precondition:void 0,kbOpts:{weight:r,kbExpr:o.EditorContextKeys.textInputFocus,primary:0,mac:{primary:1315}}}));class G extends d{constructor(se){super(se),this._inSelectionMode=se.inSelectionMode}runCoreEditorCommand(se,ue){se.model.pushStackElement(),se.setCursorStates(ue.source,3,n.CursorMoveCommands.moveToBeginningOfBuffer(se,se.getCursorStates(),this._inSelectionMode)),se.revealAllCursors(ue.source,!0)}}A.CursorTop=(0,y.registerEditorCommand)(new G({inSelectionMode:!1,id:"cursorTop",precondition:void 0,kbOpts:{weight:r,kbExpr:o.EditorContextKeys.textInputFocus,primary:2062,mac:{primary:2064}}})),A.CursorTopSelect=(0,y.registerEditorCommand)(new G({inSelectionMode:!0,id:"cursorTopSelect",precondition:void 0,kbOpts:{weight:r,kbExpr:o.EditorContextKeys.textInputFocus,primary:3086,mac:{primary:3088}}}));class Y extends d{constructor(se){super(se),this._inSelectionMode=se.inSelectionMode}runCoreEditorCommand(se,ue){se.model.pushStackElement(),se.setCursorStates(ue.source,3,n.CursorMoveCommands.moveToEndOfBuffer(se,se.getCursorStates(),this._inSelectionMode)),se.revealAllCursors(ue.source,!0)}}A.CursorBottom=(0,y.registerEditorCommand)(new Y({inSelectionMode:!1,id:"cursorBottom",precondition:void 0,kbOpts:{weight:r,kbExpr:o.EditorContextKeys.textInputFocus,primary:2061,mac:{primary:2066}}})),A.CursorBottomSelect=(0,y.registerEditorCommand)(new Y({inSelectionMode:!0,id:"cursorBottomSelect",precondition:void 0,kbOpts:{weight:r,kbExpr:o.EditorContextKeys.textInputFocus,primary:3085,mac:{primary:3090}}}));class X extends d{constructor(){super({id:"editorScroll",precondition:void 0,metadata:m.metadata})}determineScrollMethod(se){const ue=[6],ge=[1,2,3,4,5,6],pe=[4,2],ce=[1,3];return ue.includes(se.unit)&&pe.includes(se.direction)?this._runHorizontalEditorScroll.bind(this):ge.includes(se.unit)&&ce.includes(se.direction)?this._runVerticalEditorScroll.bind(this):null}runCoreEditorCommand(se,ue){const ge=m.parse(ue);if(!ge)return;const pe=this.determineScrollMethod(ge);pe&&pe(se,ue.source,ge)}_runVerticalEditorScroll(se,ue,ge){const pe=this._computeDesiredScrollTop(se,ge);if(ge.revealCursor){const ce=se.getCompletelyVisibleViewRangeAtScrollTop(pe);se.setCursorStates(ue,3,[n.CursorMoveCommands.findPositionInViewportIfOutside(se,se.getPrimaryCursorState(),ce,ge.select)])}se.viewLayout.setScrollPosition({scrollTop:pe},0)}_computeDesiredScrollTop(se,ue){if(ue.unit===1){const ce=se.viewLayout.getFutureViewport(),ie=se.getCompletelyVisibleViewRangeAtScrollTop(ce.top),ne=se.coordinatesConverter.convertViewRangeToModelRange(ie);let J;ue.direction===1?J=Math.max(1,ne.startLineNumber-ue.value):J=Math.min(se.model.getLineCount(),ne.startLineNumber+ue.value);const B=se.coordinatesConverter.convertModelPositionToViewPosition(new t.Position(J,1));return se.viewLayout.getVerticalOffsetForLineNumber(B.lineNumber)}if(ue.unit===5){let ce=0;return ue.direction===3&&(ce=se.model.getLineCount()-se.cursorConfig.pageSize),se.viewLayout.getVerticalOffsetForLineNumber(ce)}let ge;ue.unit===3?ge=se.cursorConfig.pageSize*ue.value:ue.unit===4?ge=Math.round(se.cursorConfig.pageSize/2)*ue.value:ge=ue.value;const pe=(ue.direction===1?-1:1)*ge;return se.viewLayout.getCurrentScrollTop()+pe*se.cursorConfig.lineHeight}_runHorizontalEditorScroll(se,ue,ge){const pe=this._computeDesiredScrollLeft(se,ge);se.viewLayout.setScrollPosition({scrollLeft:pe},0)}_computeDesiredScrollLeft(se,ue){const ge=(ue.direction===4?-1:1)*ue.value;return se.viewLayout.getCurrentScrollLeft()+ge*se.cursorConfig.typicalHalfwidthCharacterWidth}}A.EditorScrollImpl=X,A.EditorScroll=(0,y.registerEditorCommand)(new X),A.ScrollLineUp=(0,y.registerEditorCommand)(new class extends d{constructor(){super({id:"scrollLineUp",precondition:void 0,kbOpts:{weight:r,kbExpr:o.EditorContextKeys.textInputFocus,primary:2064,mac:{primary:267}}})}runCoreEditorCommand(te,se){A.EditorScroll.runCoreEditorCommand(te,{to:m.RawDirection.Up,by:m.RawUnit.WrappedLine,value:1,revealCursor:!1,select:!1,source:se.source})}}),A.ScrollPageUp=(0,y.registerEditorCommand)(new class extends d{constructor(){super({id:"scrollPageUp",precondition:void 0,kbOpts:{weight:r,kbExpr:o.EditorContextKeys.textInputFocus,primary:2059,win:{primary:523},linux:{primary:523}}})}runCoreEditorCommand(te,se){A.EditorScroll.runCoreEditorCommand(te,{to:m.RawDirection.Up,by:m.RawUnit.Page,value:1,revealCursor:!1,select:!1,source:se.source})}}),A.ScrollEditorTop=(0,y.registerEditorCommand)(new class extends d{constructor(){super({id:"scrollEditorTop",precondition:void 0,kbOpts:{weight:r,kbExpr:o.EditorContextKeys.textInputFocus}})}runCoreEditorCommand(te,se){A.EditorScroll.runCoreEditorCommand(te,{to:m.RawDirection.Up,by:m.RawUnit.Editor,value:1,revealCursor:!1,select:!1,source:se.source})}}),A.ScrollLineDown=(0,y.registerEditorCommand)(new class extends d{constructor(){super({id:"scrollLineDown",precondition:void 0,kbOpts:{weight:r,kbExpr:o.EditorContextKeys.textInputFocus,primary:2066,mac:{primary:268}}})}runCoreEditorCommand(te,se){A.EditorScroll.runCoreEditorCommand(te,{to:m.RawDirection.Down,by:m.RawUnit.WrappedLine,value:1,revealCursor:!1,select:!1,source:se.source})}}),A.ScrollPageDown=(0,y.registerEditorCommand)(new class extends d{constructor(){super({id:"scrollPageDown",precondition:void 0,kbOpts:{weight:r,kbExpr:o.EditorContextKeys.textInputFocus,primary:2060,win:{primary:524},linux:{primary:524}}})}runCoreEditorCommand(te,se){A.EditorScroll.runCoreEditorCommand(te,{to:m.RawDirection.Down,by:m.RawUnit.Page,value:1,revealCursor:!1,select:!1,source:se.source})}}),A.ScrollEditorBottom=(0,y.registerEditorCommand)(new class extends d{constructor(){super({id:"scrollEditorBottom",precondition:void 0,kbOpts:{weight:r,kbExpr:o.EditorContextKeys.textInputFocus}})}runCoreEditorCommand(te,se){A.EditorScroll.runCoreEditorCommand(te,{to:m.RawDirection.Down,by:m.RawUnit.Editor,value:1,revealCursor:!1,select:!1,source:se.source})}}),A.ScrollLeft=(0,y.registerEditorCommand)(new class extends d{constructor(){super({id:"scrollLeft",precondition:void 0,kbOpts:{weight:r,kbExpr:o.EditorContextKeys.textInputFocus}})}runCoreEditorCommand(te,se){A.EditorScroll.runCoreEditorCommand(te,{to:m.RawDirection.Left,by:m.RawUnit.Column,value:2,revealCursor:!1,select:!1,source:se.source})}}),A.ScrollRight=(0,y.registerEditorCommand)(new class extends d{constructor(){super({id:"scrollRight",precondition:void 0,kbOpts:{weight:r,kbExpr:o.EditorContextKeys.textInputFocus}})}runCoreEditorCommand(te,se){A.EditorScroll.runCoreEditorCommand(te,{to:m.RawDirection.Right,by:m.RawUnit.Column,value:2,revealCursor:!1,select:!1,source:se.source})}});class Z extends d{constructor(se){super(se),this._inSelectionMode=se.inSelectionMode}runCoreEditorCommand(se,ue){ue.position&&(se.model.pushStackElement(),se.setCursorStates(ue.source,3,[n.CursorMoveCommands.word(se,se.getPrimaryCursorState(),this._inSelectionMode,ue.position)]),ue.revealType!==2&&se.revealAllCursors(ue.source,!0,!0))}}A.WordSelect=(0,y.registerEditorCommand)(new Z({inSelectionMode:!1,id:"_wordSelect",precondition:void 0})),A.WordSelectDrag=(0,y.registerEditorCommand)(new Z({inSelectionMode:!0,id:"_wordSelectDrag",precondition:void 0})),A.LastCursorWordSelect=(0,y.registerEditorCommand)(new class extends d{constructor(){super({id:"lastCursorWordSelect",precondition:void 0})}runCoreEditorCommand(te,se){if(!se.position)return;const ue=te.getLastAddedCursorIndex(),ge=te.getCursorStates(),pe=ge.slice(0),ce=ge[ue];pe[ue]=n.CursorMoveCommands.word(te,ce,ce.modelState.hasSelection(),se.position),te.model.pushStackElement(),te.setCursorStates(se.source,3,pe)}});class j extends d{constructor(se){super(se),this._inSelectionMode=se.inSelectionMode}runCoreEditorCommand(se,ue){ue.position&&(se.model.pushStackElement(),se.setCursorStates(ue.source,3,[n.CursorMoveCommands.line(se,se.getPrimaryCursorState(),this._inSelectionMode,ue.position,ue.viewPosition)]),ue.revealType!==2&&se.revealAllCursors(ue.source,!1,!0))}}A.LineSelect=(0,y.registerEditorCommand)(new j({inSelectionMode:!1,id:"_lineSelect",precondition:void 0})),A.LineSelectDrag=(0,y.registerEditorCommand)(new j({inSelectionMode:!0,id:"_lineSelectDrag",precondition:void 0}));class P extends d{constructor(se){super(se),this._inSelectionMode=se.inSelectionMode}runCoreEditorCommand(se,ue){if(!ue.position)return;const ge=se.getLastAddedCursorIndex(),pe=se.getCursorStates(),ce=pe.slice(0);ce[ge]=n.CursorMoveCommands.line(se,pe[ge],this._inSelectionMode,ue.position,ue.viewPosition),se.model.pushStackElement(),se.setCursorStates(ue.source,3,ce)}}A.LastCursorLineSelect=(0,y.registerEditorCommand)(new P({inSelectionMode:!1,id:"lastCursorLineSelect",precondition:void 0})),A.LastCursorLineSelectDrag=(0,y.registerEditorCommand)(new P({inSelectionMode:!0,id:"lastCursorLineSelectDrag",precondition:void 0})),A.CancelSelection=(0,y.registerEditorCommand)(new class extends d{constructor(){super({id:"cancelSelection",precondition:o.EditorContextKeys.hasNonEmptySelection,kbOpts:{weight:r,kbExpr:o.EditorContextKeys.textInputFocus,primary:9,secondary:[1033]}})}runCoreEditorCommand(te,se){te.model.pushStackElement(),te.setCursorStates(se.source,3,[n.CursorMoveCommands.cancelSelection(te,te.getPrimaryCursorState())]),te.revealAllCursors(se.source,!0)}}),A.RemoveSecondaryCursors=(0,y.registerEditorCommand)(new class extends d{constructor(){super({id:"removeSecondaryCursors",precondition:o.EditorContextKeys.hasMultipleSelections,kbOpts:{weight:r+1,kbExpr:o.EditorContextKeys.textInputFocus,primary:9,secondary:[1033]}})}runCoreEditorCommand(te,se){te.model.pushStackElement(),te.setCursorStates(se.source,3,[te.getPrimaryCursorState()]),te.revealAllCursors(se.source,!0),(0,L.status)(c.localize(1828,"Removed secondary cursors"))}}),A.RevealLine=(0,y.registerEditorCommand)(new class extends d{constructor(){super({id:"revealLine",precondition:void 0,metadata:u.metadata})}runCoreEditorCommand(te,se){const ue=se,ge=ue.lineNumber||0;let pe=typeof ge=="number"?ge+1:parseInt(ge)+1;pe<1&&(pe=1);const ce=te.model.getLineCount();pe>ce&&(pe=ce);const ie=new i.Range(pe,1,pe,te.model.getLineMaxColumn(pe));let ne=0;if(ue.at)switch(ue.at){case u.RawAtArgument.Top:ne=3;break;case u.RawAtArgument.Center:ne=1;break;case u.RawAtArgument.Bottom:ne=4;break;default:break}const J=te.coordinatesConverter.convertModelRangeToViewRange(ie);te.revealRange(se.source,!1,J,ne,0)}}),A.SelectAll=new class extends b{constructor(){super(y.SelectAllCommand)}runDOMCommand(te){k.isFirefox&&(te.focus(),te.select()),te.ownerDocument.execCommand("selectAll")}runEditorCommand(te,se,ue){const ge=se._getViewModel();ge&&this.runCoreEditorCommand(ge,ue)}runCoreEditorCommand(te,se){te.model.pushStackElement(),te.setCursorStates("keyboard",3,[n.CursorMoveCommands.selectAll(te,te.getPrimaryCursorState())])}},A.SetSelection=(0,y.registerEditorCommand)(new class extends d{constructor(){super({id:"setSelection",precondition:void 0})}runCoreEditorCommand(te,se){se.selection&&(te.model.pushStackElement(),te.setCursorStates(se.source,3,[C.CursorState.fromModelSelection(se.selection)]))}})})(v||(e.CoreNavigationCommands=v={}));const w=g.ContextKeyExpr.and(o.EditorContextKeys.textInputFocus,o.EditorContextKeys.columnSelection);function S(A,R){h.KeybindingsRegistry.registerKeybindingRule({id:A,primary:R,when:w,weight:r+1})}S(v.CursorColumnSelectLeft.id,1039),S(v.CursorColumnSelectRight.id,1041),S(v.CursorColumnSelectUp.id,1040),S(v.CursorColumnSelectPageUp.id,1035),S(v.CursorColumnSelectDown.id,1042),S(v.CursorColumnSelectPageDown.id,1036);function D(A){return A.register(),A}var I;(function(A){class R extends y.EditorCommand{runEditorCommand(O,x,F){const W=x._getViewModel();W&&this.runCoreEditingCommand(x,W,F||{})}}A.CoreEditingCommand=R,A.LineBreakInsert=(0,y.registerEditorCommand)(new class extends R{constructor(){super({id:"lineBreakInsert",precondition:o.EditorContextKeys.writable,kbOpts:{weight:r,kbExpr:o.EditorContextKeys.textInputFocus,primary:0,mac:{primary:301}}})}runCoreEditingCommand(N,O,x){N.pushUndoStop(),N.executeCommands(this.id,a.EnterOperation.lineBreakInsert(O.cursorConfig,O.model,O.getCursorStates().map(F=>F.modelState.selection)))}}),A.Outdent=(0,y.registerEditorCommand)(new class extends R{constructor(){super({id:"outdent",precondition:o.EditorContextKeys.writable,kbOpts:{weight:r,kbExpr:g.ContextKeyExpr.and(o.EditorContextKeys.editorTextFocus,o.EditorContextKeys.tabDoesNotMoveFocus),primary:1026}})}runCoreEditingCommand(N,O,x){N.pushUndoStop(),N.executeCommands(this.id,s.TypeOperations.outdent(O.cursorConfig,O.model,O.getCursorStates().map(F=>F.modelState.selection))),N.pushUndoStop()}}),A.Tab=(0,y.registerEditorCommand)(new class extends R{constructor(){super({id:"tab",precondition:o.EditorContextKeys.writable,kbOpts:{weight:r,kbExpr:g.ContextKeyExpr.and(o.EditorContextKeys.editorTextFocus,o.EditorContextKeys.tabDoesNotMoveFocus),primary:2}})}runCoreEditingCommand(N,O,x){N.pushUndoStop(),N.executeCommands(this.id,s.TypeOperations.tab(O.cursorConfig,O.model,O.getCursorStates().map(F=>F.modelState.selection))),N.pushUndoStop()}}),A.DeleteLeft=(0,y.registerEditorCommand)(new class extends R{constructor(){super({id:"deleteLeft",precondition:void 0,kbOpts:{weight:r,kbExpr:o.EditorContextKeys.textInputFocus,primary:1,secondary:[1025],mac:{primary:1,secondary:[1025,294,257]}}})}runCoreEditingCommand(N,O,x){const[F,W]=p.DeleteOperations.deleteLeft(O.getPrevEditOperationType(),O.cursorConfig,O.model,O.getCursorStates().map(V=>V.modelState.selection),O.getCursorAutoClosedCharacters());F&&N.pushUndoStop(),N.executeCommands(this.id,W),O.setPrevEditOperationType(2)}}),A.DeleteRight=(0,y.registerEditorCommand)(new class extends R{constructor(){super({id:"deleteRight",precondition:void 0,kbOpts:{weight:r,kbExpr:o.EditorContextKeys.textInputFocus,primary:20,mac:{primary:20,secondary:[290,276]}}})}runCoreEditingCommand(N,O,x){const[F,W]=p.DeleteOperations.deleteRight(O.getPrevEditOperationType(),O.cursorConfig,O.model,O.getCursorStates().map(V=>V.modelState.selection));F&&N.pushUndoStop(),N.executeCommands(this.id,W),O.setPrevEditOperationType(3)}}),A.Undo=new class extends b{constructor(){super(y.UndoCommand)}runDOMCommand(N){N.ownerDocument.execCommand("undo")}runEditorCommand(N,O,x){if(!(!O.hasModel()||O.getOption(92)===!0))return O.getModel().undo()}},A.Redo=new class extends b{constructor(){super(y.RedoCommand)}runDOMCommand(N){N.ownerDocument.execCommand("redo")}runEditorCommand(N,O,x){if(!(!O.hasModel()||O.getOption(92)===!0))return O.getModel().redo()}}})(I||(e.CoreEditingCommands=I={}));class T extends y.Command{constructor(R,N,O){super({id:R,precondition:void 0,metadata:O}),this._handlerId=N}runCommand(R,N){const O=R.get(f.ICodeEditorService).getFocusedCodeEditor();O&&O.trigger("keyboard",this._handlerId,N)}}function M(A,R){D(new T("default:"+A,A)),D(new T(A,A,R))}M("type",{description:"Type",args:[{name:"args",schema:{type:"object",required:["text"],properties:{text:{type:"string"}}}}]}),M("replacePreviousChar"),M("compositionType"),M("compositionStart"),M("compositionEnd"),M("paste"),M("cut")}),define(oe[716],re([1,0,264,15]),function(ae,e,c,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MarkerDecorationsContribution=void 0;let E=class{static{this.ID="editor.contrib.markerDecorations"}constructor(y,f){}dispose(){}};e.MarkerDecorationsContribution=E,e.MarkerDecorationsContribution=E=De([he(1,c.IMarkerDecorationsService)],E),(0,k.registerEditorContribution)(E.ID,E,0)}),define(oe[717],re([1,0,212,9,16]),function(ae,e,c,k,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewController=void 0;class L{constructor(f,_,C,p){this.configuration=f,this.viewModel=_,this.userInputEvents=C,this.commandDelegate=p}paste(f,_,C,p){this.commandDelegate.paste(f,_,C,p)}type(f){this.commandDelegate.type(f)}compositionType(f,_,C,p){this.commandDelegate.compositionType(f,_,C,p)}compositionStart(){this.commandDelegate.startComposition()}compositionEnd(){this.commandDelegate.endComposition()}cut(){this.commandDelegate.cut()}setSelection(f){c.CoreNavigationCommands.SetSelection.runCoreEditorCommand(this.viewModel,{source:"keyboard",selection:f})}_validateViewColumn(f){const _=this.viewModel.getLineMinColumn(f.lineNumber);return f.column<_?new k.Position(f.lineNumber,_):f}_hasMulticursorModifier(f){switch(this.configuration.options.get(78)){case"altKey":return f.altKey;case"ctrlKey":return f.ctrlKey;case"metaKey":return f.metaKey;default:return!1}}_hasNonMulticursorModifier(f){switch(this.configuration.options.get(78)){case"altKey":return f.ctrlKey||f.metaKey;case"ctrlKey":return f.altKey||f.metaKey;case"metaKey":return f.ctrlKey||f.altKey;default:return!1}}dispatchMouse(f){const _=this.configuration.options,C=E.isLinux&&_.get(108),p=_.get(22);f.middleButton&&!C?this._columnSelect(f.position,f.mouseColumn,f.inSelectionMode):f.startedOnLineNumbers?this._hasMulticursorModifier(f)?f.inSelectionMode?this._lastCursorLineSelect(f.position,f.revealType):this._createCursor(f.position,!0):f.inSelectionMode?this._lineSelectDrag(f.position,f.revealType):this._lineSelect(f.position,f.revealType):f.mouseDownCount>=4?this._selectAll():f.mouseDownCount===3?this._hasMulticursorModifier(f)?f.inSelectionMode?this._lastCursorLineSelectDrag(f.position,f.revealType):this._lastCursorLineSelect(f.position,f.revealType):f.inSelectionMode?this._lineSelectDrag(f.position,f.revealType):this._lineSelect(f.position,f.revealType):f.mouseDownCount===2?f.onInjectedText||(this._hasMulticursorModifier(f)?this._lastCursorWordSelect(f.position,f.revealType):f.inSelectionMode?this._wordSelectDrag(f.position,f.revealType):this._wordSelect(f.position,f.revealType)):this._hasMulticursorModifier(f)?this._hasNonMulticursorModifier(f)||(f.shiftKey?this._columnSelect(f.position,f.mouseColumn,!0):f.inSelectionMode?this._lastCursorMoveToSelect(f.position,f.revealType):this._createCursor(f.position,!1)):f.inSelectionMode?f.altKey?this._columnSelect(f.position,f.mouseColumn,!0):p?this._columnSelect(f.position,f.mouseColumn,!0):this._moveToSelect(f.position,f.revealType):this.moveTo(f.position,f.revealType)}_usualArgs(f,_){return f=this._validateViewColumn(f),{source:"mouse",position:this._convertViewToModelPosition(f),viewPosition:f,revealType:_}}moveTo(f,_){c.CoreNavigationCommands.MoveTo.runCoreEditorCommand(this.viewModel,this._usualArgs(f,_))}_moveToSelect(f,_){c.CoreNavigationCommands.MoveToSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(f,_))}_columnSelect(f,_,C){f=this._validateViewColumn(f),c.CoreNavigationCommands.ColumnSelect.runCoreEditorCommand(this.viewModel,{source:"mouse",position:this._convertViewToModelPosition(f),viewPosition:f,mouseColumn:_,doColumnSelect:C})}_createCursor(f,_){f=this._validateViewColumn(f),c.CoreNavigationCommands.CreateCursor.runCoreEditorCommand(this.viewModel,{source:"mouse",position:this._convertViewToModelPosition(f),viewPosition:f,wholeLine:_})}_lastCursorMoveToSelect(f,_){c.CoreNavigationCommands.LastCursorMoveToSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(f,_))}_wordSelect(f,_){c.CoreNavigationCommands.WordSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(f,_))}_wordSelectDrag(f,_){c.CoreNavigationCommands.WordSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(f,_))}_lastCursorWordSelect(f,_){c.CoreNavigationCommands.LastCursorWordSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(f,_))}_lineSelect(f,_){c.CoreNavigationCommands.LineSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(f,_))}_lineSelectDrag(f,_){c.CoreNavigationCommands.LineSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(f,_))}_lastCursorLineSelect(f,_){c.CoreNavigationCommands.LastCursorLineSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(f,_))}_lastCursorLineSelectDrag(f,_){c.CoreNavigationCommands.LastCursorLineSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(f,_))}_selectAll(){c.CoreNavigationCommands.SelectAll.runCoreEditorCommand(this.viewModel,{source:"mouse"})}_convertViewToModelPosition(f){return this.viewModel.coordinatesConverter.convertViewPositionToModelPosition(f)}emitKeyDown(f){this.userInputEvents.emitKeyDown(f)}emitKeyUp(f){this.userInputEvents.emitKeyUp(f)}emitContextMenu(f){this.userInputEvents.emitContextMenu(f)}emitMouseMove(f){this.userInputEvents.emitMouseMove(f)}emitMouseLeave(f){this.userInputEvents.emitMouseLeave(f)}emitMouseUp(f){this.userInputEvents.emitMouseUp(f)}emitMouseDown(f){this.userInputEvents.emitMouseDown(f)}emitMouseDrag(f){this.userInputEvents.emitMouseDrag(f)}emitMouseDrop(f){this.userInputEvents.emitMouseDrop(f)}emitMouseDropCanceled(){this.userInputEvents.emitMouseDropCanceled()}emitMouseWheel(f){this.userInputEvents.emitMouseWheel(f)}}e.ViewController=L}),define(oe[213],re([1,0,49,7,6,59,56,104,115,66]),function(ae,e,c,k,E,L,y,f,_,C){"use strict";var p;Object.defineProperty(e,"__esModule",{value:!0}),e.WorkerBasedDocumentDiffProvider=e.WorkerBasedDiffProviderFactoryService=e.IDiffProviderFactoryService=void 0,e.IDiffProviderFactoryService=(0,k.createDecorator)("diffProviderFactoryService");let n=class{constructor(i){this.instantiationService=i}createDiffProvider(i){return this.instantiationService.createInstance(s,i)}};e.WorkerBasedDiffProviderFactoryService=n,e.WorkerBasedDiffProviderFactoryService=n=De([he(0,k.IInstantiationService)],n),(0,c.registerSingleton)(e.IDiffProviderFactoryService,n,1);let s=class{static{p=this}static{this.diffCache=new Map}constructor(i,o,g){this.editorWorkerService=o,this.telemetryService=g,this.onDidChangeEventEmitter=new E.Emitter,this.onDidChange=this.onDidChangeEventEmitter.event,this.diffAlgorithm="advanced",this.diffAlgorithmOnDidChangeSubscription=void 0,this.setOptions(i)}dispose(){this.diffAlgorithmOnDidChangeSubscription?.dispose()}async computeDiff(i,o,g,h){if(typeof this.diffAlgorithm!="string")return this.diffAlgorithm.computeDiff(i,o,g,h);if(i.isDisposed()||o.isDisposed())return{changes:[],identical:!0,quitEarly:!1,moves:[]};if(i.getLineCount()===1&&i.getLineMaxColumn(1)===1)return o.getLineCount()===1&&o.getLineMaxColumn(1)===1?{changes:[],identical:!0,quitEarly:!1,moves:[]}:{changes:[new f.DetailedLineRangeMapping(new y.LineRange(1,2),new y.LineRange(1,o.getLineCount()+1),[new f.RangeMapping(i.getFullModelRange(),o.getFullModelRange())])],identical:!1,quitEarly:!1,moves:[]};const l=JSON.stringify([i.uri.toString(),o.uri.toString()]),a=JSON.stringify([i.id,o.id,i.getAlternativeVersionId(),o.getAlternativeVersionId(),JSON.stringify(g)]),r=p.diffCache.get(l);if(r&&r.context===a)return r.result;const d=L.StopWatch.create(),m=await this.editorWorkerService.computeDiff(i.uri,o.uri,g,this.diffAlgorithm),u=d.elapsed();if(this.telemetryService.publicLog2("diffEditor.computeDiff",{timeMs:u,timedOut:m?.quitEarly??!0,detectedMoves:g.computeMoves?m?.moves.length??0:-1}),h.isCancellationRequested)return{changes:[],identical:!1,quitEarly:!0,moves:[]};if(!m)throw new Error("no diff result available");return p.diffCache.size>10&&p.diffCache.delete(p.diffCache.keys().next().value),p.diffCache.set(l,{result:m,context:a}),m}setOptions(i){let o=!1;i.diffAlgorithm&&this.diffAlgorithm!==i.diffAlgorithm&&(this.diffAlgorithmOnDidChangeSubscription?.dispose(),this.diffAlgorithmOnDidChangeSubscription=void 0,this.diffAlgorithm=i.diffAlgorithm,typeof i.diffAlgorithm!="string"&&(this.diffAlgorithmOnDidChangeSubscription=i.diffAlgorithm.onDidChange(()=>this.onDidChangeEventEmitter.fire())),o=!0),o&&this.onDidChangeEventEmitter.fire()}};e.WorkerBasedDocumentDiffProvider=s,e.WorkerBasedDocumentDiffProvider=s=p=De([he(1,_.IEditorWorkerService),he(2,C.ITelemetryService)],s)}),define(oe[402],re([1,0,14,18,2,21,213,85,161,56,331,104,201,334,329,19,13,89]),function(ae,e,c,k,E,L,y,f,_,C,p,n,s,t,i,o,g,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UnchangedRegion=e.DiffMapping=e.DiffState=e.DiffEditorViewModel=void 0;let l=class extends E.Disposable{setActiveMovedText(S){this._activeMovedText.set(S,void 0)}constructor(S,D,I){super(),this.model=S,this._options=D,this._diffProviderFactoryService=I,this._isDiffUpToDate=(0,L.observableValue)(this,!1),this.isDiffUpToDate=this._isDiffUpToDate,this._diff=(0,L.observableValue)(this,void 0),this.diff=this._diff,this._unchangedRegions=(0,L.observableValue)(this,void 0),this.unchangedRegions=(0,L.derived)(this,R=>this._options.hideUnchangedRegions.read(R)?this._unchangedRegions.read(R)?.regions??[]:((0,L.transaction)(N=>{for(const O of this._unchangedRegions.get()?.regions||[])O.collapseAll(N)}),[])),this.movedTextToCompare=(0,L.observableValue)(this,void 0),this._activeMovedText=(0,L.observableValue)(this,void 0),this._hoveredMovedText=(0,L.observableValue)(this,void 0),this.activeMovedText=(0,L.derived)(this,R=>this.movedTextToCompare.read(R)??this._hoveredMovedText.read(R)??this._activeMovedText.read(R)),this._cancellationTokenSource=new k.CancellationTokenSource,this._diffProvider=(0,L.derived)(this,R=>{const N=this._diffProviderFactoryService.createDiffProvider({diffAlgorithm:this._options.diffAlgorithm.read(R)}),O=(0,L.observableSignalFromEvent)("onDidChange",N.onDidChange);return{diffProvider:N,onChangeSignal:O}}),this._register((0,E.toDisposable)(()=>this._cancellationTokenSource.cancel()));const T=(0,L.observableSignal)("contentChangedSignal"),M=this._register(new c.RunOnceScheduler(()=>T.trigger(void 0),200));this._register((0,L.autorun)(R=>{const N=this._unchangedRegions.read(R);if(!N||N.regions.some(q=>q.isDragged.read(R)))return;const O=N.originalDecorationIds.map(q=>S.original.getDecorationRange(q)).map(q=>q?C.LineRange.fromRangeInclusive(q):void 0),x=N.modifiedDecorationIds.map(q=>S.modified.getDecorationRange(q)).map(q=>q?C.LineRange.fromRangeInclusive(q):void 0),F=N.regions.map((q,H)=>!O[H]||!x[H]?void 0:new u(O[H].startLineNumber,x[H].startLineNumber,O[H].length,q.visibleLineCountTop.read(R),q.visibleLineCountBottom.read(R))).filter(o.isDefined),W=[];let V=!1;for(const q of(0,g.groupAdjacentBy)(F,(H,K)=>H.getHiddenModifiedRange(R).endLineNumberExclusive===K.getHiddenModifiedRange(R).startLineNumber))if(q.length>1){V=!0;const H=q.reduce((G,Y)=>G+Y.lineCount,0),K=new u(q[0].originalLineNumber,q[0].modifiedLineNumber,H,q[0].visibleLineCountTop.get(),q[q.length-1].visibleLineCountBottom.get());W.push(K)}else W.push(q[0]);if(V){const q=S.original.deltaDecorations(N.originalDecorationIds,W.map(K=>({range:K.originalUnchangedRange.toInclusiveRange(),options:{description:"unchanged"}}))),H=S.modified.deltaDecorations(N.modifiedDecorationIds,W.map(K=>({range:K.modifiedUnchangedRange.toInclusiveRange(),options:{description:"unchanged"}})));(0,L.transaction)(K=>{this._unchangedRegions.set({regions:W,originalDecorationIds:q,modifiedDecorationIds:H},K)})}}));const A=(R,N,O)=>{const x=u.fromDiffs(R.changes,S.original.getLineCount(),S.modified.getLineCount(),this._options.hideUnchangedRegionsMinimumLineCount.read(O),this._options.hideUnchangedRegionsContextLineCount.read(O));let F;const W=this._unchangedRegions.get();if(W){const K=W.originalDecorationIds.map(Z=>S.original.getDecorationRange(Z)).map(Z=>Z?C.LineRange.fromRangeInclusive(Z):void 0),G=W.modifiedDecorationIds.map(Z=>S.modified.getDecorationRange(Z)).map(Z=>Z?C.LineRange.fromRangeInclusive(Z):void 0);let X=(0,f.filterWithPrevious)(W.regions.map((Z,j)=>{if(!K[j]||!G[j])return;const P=K[j].length;return new u(K[j].startLineNumber,G[j].startLineNumber,P,Math.min(Z.visibleLineCountTop.get(),P),Math.min(Z.visibleLineCountBottom.get(),P-Z.visibleLineCountTop.get()))}).filter(o.isDefined),(Z,j)=>!j||Z.modifiedLineNumber>=j.modifiedLineNumber+j.lineCount&&Z.originalLineNumber>=j.originalLineNumber+j.lineCount).map(Z=>new n.LineRangeMapping(Z.getHiddenOriginalRange(O),Z.getHiddenModifiedRange(O)));X=n.LineRangeMapping.clip(X,C.LineRange.ofLength(1,S.original.getLineCount()),C.LineRange.ofLength(1,S.modified.getLineCount())),F=n.LineRangeMapping.inverse(X,S.original.getLineCount(),S.modified.getLineCount())}const V=[];if(F)for(const K of x){const G=F.filter(Y=>Y.original.intersectsStrict(K.originalUnchangedRange)&&Y.modified.intersectsStrict(K.modifiedUnchangedRange));V.push(...K.setVisibleRanges(G,N))}else V.push(...x);const q=S.original.deltaDecorations(W?.originalDecorationIds||[],V.map(K=>({range:K.originalUnchangedRange.toInclusiveRange(),options:{description:"unchanged"}}))),H=S.modified.deltaDecorations(W?.modifiedDecorationIds||[],V.map(K=>({range:K.modifiedUnchangedRange.toInclusiveRange(),options:{description:"unchanged"}})));this._unchangedRegions.set({regions:V,originalDecorationIds:q,modifiedDecorationIds:H},N)};this._register(S.modified.onDidChangeContent(R=>{if(this._diff.get()){const O=s.TextEditInfo.fromModelContentChanges(R.changes),x=(this._lastDiff,S.original,S.modified,void 0);x&&(this._lastDiff=x,(0,L.transaction)(F=>{this._diff.set(d.fromDiffResult(this._lastDiff),F),A(x,F);const W=this.movedTextToCompare.get();this.movedTextToCompare.set(W?this._lastDiff.moves.find(V=>V.lineRangeMapping.modified.intersect(W.lineRangeMapping.modified)):void 0,F)}))}this._isDiffUpToDate.set(!1,void 0),M.schedule()})),this._register(S.original.onDidChangeContent(R=>{if(this._diff.get()){const O=s.TextEditInfo.fromModelContentChanges(R.changes),x=(this._lastDiff,S.original,S.modified,void 0);x&&(this._lastDiff=x,(0,L.transaction)(F=>{this._diff.set(d.fromDiffResult(this._lastDiff),F),A(x,F);const W=this.movedTextToCompare.get();this.movedTextToCompare.set(W?this._lastDiff.moves.find(V=>V.lineRangeMapping.modified.intersect(W.lineRangeMapping.modified)):void 0,F)}))}this._isDiffUpToDate.set(!1,void 0),M.schedule()})),this._register((0,L.autorunWithStore)(async(R,N)=>{this._options.hideUnchangedRegionsMinimumLineCount.read(R),this._options.hideUnchangedRegionsContextLineCount.read(R),M.cancel(),T.read(R);const O=this._diffProvider.read(R);O.onChangeSignal.read(R),(0,_.readHotReloadableExport)(p.DefaultLinesDiffComputer,R),(0,_.readHotReloadableExport)(i.optimizeSequenceDiffs,R),this._isDiffUpToDate.set(!1,void 0);let x=[];N.add(S.original.onDidChangeContent(V=>{const q=s.TextEditInfo.fromModelContentChanges(V.changes);x=(0,t.combineTextEditInfos)(x,q)}));let F=[];N.add(S.modified.onDidChangeContent(V=>{const q=s.TextEditInfo.fromModelContentChanges(V.changes);F=(0,t.combineTextEditInfos)(F,q)}));let W=await O.diffProvider.computeDiff(S.original,S.modified,{ignoreTrimWhitespace:this._options.ignoreTrimWhitespace.read(R),maxComputationTimeMs:this._options.maxComputationTimeMs.read(R),computeMoves:this._options.showMoves.read(R)},this._cancellationTokenSource.token);this._cancellationTokenSource.token.isCancellationRequested||S.original.isDisposed()||S.modified.isDisposed()||(W=a(W,S.original,S.modified),W=(S.original,S.modified,void 0)??W,W=(S.original,S.modified,void 0)??W,(0,L.transaction)(V=>{A(W,V),this._lastDiff=W;const q=d.fromDiffResult(W);this._diff.set(q,V),this._isDiffUpToDate.set(!0,V);const H=this.movedTextToCompare.get();this.movedTextToCompare.set(H?this._lastDiff.moves.find(K=>K.lineRangeMapping.modified.intersect(H.lineRangeMapping.modified)):void 0,V)}))}))}ensureModifiedLineIsVisible(S,D,I){if(this.diff.get()?.mappings.length===0)return;const T=this._unchangedRegions.get()?.regions||[];for(const M of T)if(M.getHiddenModifiedRange(void 0).contains(S)){M.showModifiedLine(S,D,I);return}}ensureOriginalLineIsVisible(S,D,I){if(this.diff.get()?.mappings.length===0)return;const T=this._unchangedRegions.get()?.regions||[];for(const M of T)if(M.getHiddenOriginalRange(void 0).contains(S)){M.showOriginalLine(S,D,I);return}}async waitForDiff(){await(0,L.waitForState)(this.isDiffUpToDate,S=>S)}serializeState(){return{collapsedRegions:this._unchangedRegions.get()?.regions.map(D=>({range:D.getHiddenModifiedRange(void 0).serialize()}))}}restoreSerializedState(S){const D=S.collapsedRegions?.map(T=>C.LineRange.deserialize(T.range)),I=this._unchangedRegions.get();!I||!D||(0,L.transaction)(T=>{for(const M of I.regions)for(const A of D)if(M.modifiedUnchangedRange.intersect(A)){M.setHiddenModifiedRange(A,T);break}})}};e.DiffEditorViewModel=l,e.DiffEditorViewModel=l=De([he(2,y.IDiffProviderFactoryService)],l);function a(w,S,D){return{changes:w.changes.map(I=>new n.DetailedLineRangeMapping(I.original,I.modified,I.innerChanges?I.innerChanges.map(T=>r(T,S,D)):void 0)),moves:w.moves,identical:w.identical,quitEarly:w.quitEarly}}function r(w,S,D){let I=w.originalRange,T=w.modifiedRange;return I.startColumn===1&&T.startColumn===1&&(I.endColumn!==1||T.endColumn!==1)&&I.endColumn===S.getLineMaxColumn(I.endLineNumber)&&T.endColumn===D.getLineMaxColumn(T.endLineNumber)&&I.endLineNumber<S.getLineCount()&&T.endLineNumber<D.getLineCount()&&(I=I.setEndPosition(I.endLineNumber+1,1),T=T.setEndPosition(T.endLineNumber+1,1)),new n.RangeMapping(I,T)}class d{static fromDiffResult(S){return new d(S.changes.map(D=>new m(D)),S.moves||[],S.identical,S.quitEarly)}constructor(S,D,I,T){this.mappings=S,this.movedTexts=D,this.identical=I,this.quitEarly=T}}e.DiffState=d;class m{constructor(S){this.lineRangeMapping=S}}e.DiffMapping=m;class u{static fromDiffs(S,D,I,T,M){const A=n.DetailedLineRangeMapping.inverse(S,D,I),R=[];for(const N of A){let O=N.original.startLineNumber,x=N.modified.startLineNumber,F=N.original.length;const W=O===1&&x===1,V=O+F===D+1&&x+F===I+1;(W||V)&&F>=M+T?(W&&!V&&(F-=M),V&&!W&&(O+=M,x+=M,F-=M),R.push(new u(O,x,F,0,0))):F>=M*2+T&&(O+=M,x+=M,F-=M*2,R.push(new u(O,x,F,0,0)))}return R}get originalUnchangedRange(){return C.LineRange.ofLength(this.originalLineNumber,this.lineCount)}get modifiedUnchangedRange(){return C.LineRange.ofLength(this.modifiedLineNumber,this.lineCount)}constructor(S,D,I,T,M){this.originalLineNumber=S,this.modifiedLineNumber=D,this.lineCount=I,this._visibleLineCountTop=(0,L.observableValue)(this,0),this.visibleLineCountTop=this._visibleLineCountTop,this._visibleLineCountBottom=(0,L.observableValue)(this,0),this.visibleLineCountBottom=this._visibleLineCountBottom,this._shouldHideControls=(0,L.derived)(this,N=>this.visibleLineCountTop.read(N)+this.visibleLineCountBottom.read(N)===this.lineCount&&!this.isDragged.read(N)),this.isDragged=(0,L.observableValue)(this,void 0);const A=Math.max(Math.min(T,this.lineCount),0),R=Math.max(Math.min(M,this.lineCount-T),0);(0,h.softAssert)(T===A),(0,h.softAssert)(M===R),this._visibleLineCountTop.set(A,void 0),this._visibleLineCountBottom.set(R,void 0)}setVisibleRanges(S,D){const I=[],T=new C.LineRangeSet(S.map(N=>N.modified)).subtractFrom(this.modifiedUnchangedRange);let M=this.originalLineNumber,A=this.modifiedLineNumber;const R=this.modifiedLineNumber+this.lineCount;if(T.ranges.length===0)this.showAll(D),I.push(this);else{let N=0;for(const O of T.ranges){const x=N===T.ranges.length-1;N++;const F=(x?R:O.endLineNumberExclusive)-A,W=new u(M,A,F,0,0);W.setHiddenModifiedRange(O,D),I.push(W),M=W.originalUnchangedRange.endLineNumberExclusive,A=W.modifiedUnchangedRange.endLineNumberExclusive}}return I}shouldHideControls(S){return this._shouldHideControls.read(S)}getHiddenOriginalRange(S){return C.LineRange.ofLength(this.originalLineNumber+this._visibleLineCountTop.read(S),this.lineCount-this._visibleLineCountTop.read(S)-this._visibleLineCountBottom.read(S))}getHiddenModifiedRange(S){return C.LineRange.ofLength(this.modifiedLineNumber+this._visibleLineCountTop.read(S),this.lineCount-this._visibleLineCountTop.read(S)-this._visibleLineCountBottom.read(S))}setHiddenModifiedRange(S,D){const I=S.startLineNumber-this.modifiedLineNumber,T=this.modifiedLineNumber+this.lineCount-S.endLineNumberExclusive;this.setState(I,T,D)}getMaxVisibleLineCountTop(){return this.lineCount-this._visibleLineCountBottom.get()}getMaxVisibleLineCountBottom(){return this.lineCount-this._visibleLineCountTop.get()}showMoreAbove(S=10,D){const I=this.getMaxVisibleLineCountTop();this._visibleLineCountTop.set(Math.min(this._visibleLineCountTop.get()+S,I),D)}showMoreBelow(S=10,D){const I=this.lineCount-this._visibleLineCountTop.get();this._visibleLineCountBottom.set(Math.min(this._visibleLineCountBottom.get()+S,I),D)}showAll(S){this._visibleLineCountBottom.set(this.lineCount-this._visibleLineCountTop.get(),S)}showModifiedLine(S,D,I){const T=S+1-(this.modifiedLineNumber+this._visibleLineCountTop.get()),M=this.modifiedLineNumber-this._visibleLineCountBottom.get()+this.lineCount-S;D===0&&T<M||D===1?this._visibleLineCountTop.set(this._visibleLineCountTop.get()+T,I):this._visibleLineCountBottom.set(this._visibleLineCountBottom.get()+M,I)}showOriginalLine(S,D,I){const T=S-this.originalLineNumber,M=this.originalLineNumber+this.lineCount-S;D===0&&T<M||D===1?this._visibleLineCountTop.set(Math.min(this._visibleLineCountTop.get()+M-T,this.getMaxVisibleLineCountTop()),I):this._visibleLineCountBottom.set(Math.min(this._visibleLineCountBottom.get()+T-M,this.getMaxVisibleLineCountBottom()),I)}collapseAll(S){this._visibleLineCountTop.set(0,S),this._visibleLineCountBottom.set(0,S)}setState(S,D,I){S=Math.max(Math.min(S,this.lineCount),0),D=Math.max(Math.min(D,this.lineCount-S),0),this._visibleLineCountTop.set(S,I),this._visibleLineCountBottom.set(D,I)}}e.UnchangedRegion=u;function b(w,S,D,I){}function v(w,S,D,I){}}),define(oe[718],re([1,0,48,55,72,15,23,20,3,12,512]),function(ae,e,c,k,E,L,y,f,_,C){"use strict";var p;Object.defineProperty(e,"__esModule",{value:!0}),e.SelectionAnchorSet=void 0,e.SelectionAnchorSet=new C.RawContextKey("selectionAnchorSet",!1);let n=class{static{p=this}static{this.ID="editor.contrib.selectionAnchorController"}static get(h){return h.getContribution(p.ID)}constructor(h,l){this.editor=h,this.selectionAnchorSetContextKey=e.SelectionAnchorSet.bindTo(l),this.modelChangeListener=h.onDidChangeModel(()=>this.selectionAnchorSetContextKey.reset())}setSelectionAnchor(){if(this.editor.hasModel()){const h=this.editor.getPosition();this.editor.changeDecorations(l=>{this.decorationId&&l.removeDecoration(this.decorationId),this.decorationId=l.addDecoration(y.Selection.fromPositions(h,h),{description:"selection-anchor",stickiness:1,hoverMessage:new k.MarkdownString().appendText((0,_.localize)(969,"Selection Anchor")),className:"selection-anchor"})}),this.selectionAnchorSetContextKey.set(!!this.decorationId),(0,c.alert)((0,_.localize)(970,"Anchor set at {0}:{1}",h.lineNumber,h.column))}}goToSelectionAnchor(){if(this.editor.hasModel()&&this.decorationId){const h=this.editor.getModel().getDecorationRange(this.decorationId);h&&this.editor.setPosition(h.getStartPosition())}}selectFromAnchorToCursor(){if(this.editor.hasModel()&&this.decorationId){const h=this.editor.getModel().getDecorationRange(this.decorationId);if(h){const l=this.editor.getPosition();this.editor.setSelection(y.Selection.fromPositions(h.getStartPosition(),l)),this.cancelSelectionAnchor()}}}cancelSelectionAnchor(){if(this.decorationId){const h=this.decorationId;this.editor.changeDecorations(l=>{l.removeDecoration(h),this.decorationId=void 0}),this.selectionAnchorSetContextKey.set(!1)}}dispose(){this.cancelSelectionAnchor(),this.modelChangeListener.dispose()}};n=p=De([he(1,C.IContextKeyService)],n);class s extends L.EditorAction{constructor(){super({id:"editor.action.setSelectionAnchor",label:(0,_.localize)(971,"Set Selection Anchor"),alias:"Set Selection Anchor",precondition:void 0,kbOpts:{kbExpr:f.EditorContextKeys.editorTextFocus,primary:(0,E.KeyChord)(2089,2080),weight:100}})}async run(h,l){n.get(l)?.setSelectionAnchor()}}class t extends L.EditorAction{constructor(){super({id:"editor.action.goToSelectionAnchor",label:(0,_.localize)(972,"Go to Selection Anchor"),alias:"Go to Selection Anchor",precondition:e.SelectionAnchorSet})}async run(h,l){n.get(l)?.goToSelectionAnchor()}}class i extends L.EditorAction{constructor(){super({id:"editor.action.selectFromAnchorToCursor",label:(0,_.localize)(973,"Select from Anchor to Cursor"),alias:"Select from Anchor to Cursor",precondition:e.SelectionAnchorSet,kbOpts:{kbExpr:f.EditorContextKeys.editorTextFocus,primary:(0,E.KeyChord)(2089,2089),weight:100}})}async run(h,l){n.get(l)?.selectFromAnchorToCursor()}}class o extends L.EditorAction{constructor(){super({id:"editor.action.cancelSelectionAnchor",label:(0,_.localize)(974,"Cancel Selection Anchor"),alias:"Cancel Selection Anchor",precondition:e.SelectionAnchorSet,kbOpts:{kbExpr:f.EditorContextKeys.editorTextFocus,primary:9,weight:100}})}async run(h,l){n.get(l)?.cancelSelectionAnchor()}}(0,L.registerEditorContribution)(n.ID,n,4),(0,L.registerEditorAction)(s),(0,L.registerEditorAction)(t),(0,L.registerEditorAction)(i),(0,L.registerEditorAction)(o)}),define(oe[719],re([1,0,15,20,628,3]),function(ae,e,c,k,E,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class y extends c.EditorAction{constructor(p,n){super(n),this.left=p}run(p,n){if(!n.hasModel())return;const s=[],t=n.getSelections();for(const i of t)s.push(new E.MoveCaretCommand(i,this.left));n.pushUndoStop(),n.executeCommands(this.id,s),n.pushUndoStop()}}class f extends y{constructor(){super(!0,{id:"editor.action.moveCarretLeftAction",label:L.localize(976,"Move Selected Text Left"),alias:"Move Selected Text Left",precondition:k.EditorContextKeys.writable})}}class _ extends y{constructor(){super(!1,{id:"editor.action.moveCarretRightAction",label:L.localize(977,"Move Selected Text Right"),alias:"Move Selected Text Right",precondition:k.EditorContextKeys.writable})}}(0,c.registerEditorAction)(f),(0,c.registerEditorAction)(_)}),define(oe[720],re([1,0,15,145,244,4,20,3]),function(ae,e,c,k,E,L,y,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class _ extends c.EditorAction{constructor(){super({id:"editor.action.transposeLetters",label:f.localize(975,"Transpose Letters"),alias:"Transpose Letters",precondition:y.EditorContextKeys.writable,kbOpts:{kbExpr:y.EditorContextKeys.textInputFocus,primary:0,mac:{primary:306},weight:100}})}run(p,n){if(!n.hasModel())return;const s=n.getModel(),t=[],i=n.getSelections();for(const o of i){if(!o.isEmpty())continue;const g=o.startLineNumber,h=o.startColumn,l=s.getLineMaxColumn(g);if(g===1&&(h===1||h===2&&l===2))continue;const a=h===l?o.getPosition():E.MoveOperations.rightPosition(s,o.getPosition().lineNumber,o.getPosition().column),r=E.MoveOperations.leftPosition(s,a),d=E.MoveOperations.leftPosition(s,r),m=s.getValueInRange(L.Range.fromPositions(d,r)),u=s.getValueInRange(L.Range.fromPositions(r,a)),b=L.Range.fromPositions(d,a);t.push(new k.ReplaceCommand(b,u+m))}t.length>0&&(n.pushUndoStop(),n.executeCommands(this.id,t),n.pushUndoStop())}}(0,c.registerEditorAction)(_)}),define(oe[721],re([1,0,72,15,4,20,34,348,630,3,29]),function(ae,e,c,k,E,L,y,f,_,C,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class n extends k.EditorAction{constructor(h,l){super(l),this._type=h}run(h,l){const a=h.get(y.ILanguageConfigurationService);if(!l.hasModel())return;const r=l.getModel(),d=[],m=r.getOptions(),u=l.getOption(23),b=l.getSelections().map((w,S)=>({selection:w,index:S,ignoreFirstLine:!1}));b.sort((w,S)=>E.Range.compareRangesUsingStarts(w.selection,S.selection));let v=b[0];for(let w=1;w<b.length;w++){const S=b[w];v.selection.endLineNumber===S.selection.startLineNumber&&(v.index<S.index?S.ignoreFirstLine=!0:(v.ignoreFirstLine=!0,v=S))}for(const w of b)d.push(new _.LineCommentCommand(a,w.selection,m.indentSize,this._type,u.insertSpace,u.ignoreEmptyLines,w.ignoreFirstLine));l.pushUndoStop(),l.executeCommands(this.id,d),l.pushUndoStop()}}class s extends n{constructor(){super(0,{id:"editor.action.commentLine",label:C.localize(884,"Toggle Line Comment"),alias:"Toggle Line Comment",precondition:L.EditorContextKeys.writable,kbOpts:{kbExpr:L.EditorContextKeys.editorTextFocus,primary:2138,weight:100},menuOpts:{menuId:p.MenuId.MenubarEditMenu,group:"5_insert",title:C.localize(885,"&&Toggle Line Comment"),order:1}})}}class t extends n{constructor(){super(1,{id:"editor.action.addCommentLine",label:C.localize(886,"Add Line Comment"),alias:"Add Line Comment",precondition:L.EditorContextKeys.writable,kbOpts:{kbExpr:L.EditorContextKeys.editorTextFocus,primary:(0,c.KeyChord)(2089,2081),weight:100}})}}class i extends n{constructor(){super(2,{id:"editor.action.removeCommentLine",label:C.localize(887,"Remove Line Comment"),alias:"Remove Line Comment",precondition:L.EditorContextKeys.writable,kbOpts:{kbExpr:L.EditorContextKeys.editorTextFocus,primary:(0,c.KeyChord)(2089,2099),weight:100}})}}class o extends k.EditorAction{constructor(){super({id:"editor.action.blockComment",label:C.localize(888,"Toggle Block Comment"),alias:"Toggle Block Comment",precondition:L.EditorContextKeys.writable,kbOpts:{kbExpr:L.EditorContextKeys.editorTextFocus,primary:1567,linux:{primary:3103},weight:100},menuOpts:{menuId:p.MenuId.MenubarEditMenu,group:"5_insert",title:C.localize(889,"Toggle &&Block Comment"),order:2}})}run(h,l){const a=h.get(y.ILanguageConfigurationService);if(!l.hasModel())return;const r=l.getOption(23),d=[],m=l.getSelections();for(const u of m)d.push(new f.BlockCommentCommand(u,r.insertSpace,a));l.pushUndoStop(),l.executeCommands(this.id,d),l.pushUndoStop()}}(0,k.registerEditorAction)(s),(0,k.registerEditorAction)(t),(0,k.registerEditorAction)(i),(0,k.registerEditorAction)(o)}),define(oe[722],re([1,0,2,15,20,3]),function(ae,e,c,k,E,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CursorRedo=e.CursorUndo=e.CursorUndoRedoController=void 0;class y{constructor(s){this.selections=s}equals(s){const t=this.selections.length,i=s.selections.length;if(t!==i)return!1;for(let o=0;o<t;o++)if(!this.selections[o].equalsSelection(s.selections[o]))return!1;return!0}}class f{constructor(s,t,i){this.cursorState=s,this.scrollTop=t,this.scrollLeft=i}}class _ extends c.Disposable{static{this.ID="editor.contrib.cursorUndoRedoController"}static get(s){return s.getContribution(_.ID)}constructor(s){super(),this._editor=s,this._isCursorUndoRedo=!1,this._undoStack=[],this._redoStack=[],this._register(s.onDidChangeModel(t=>{this._undoStack=[],this._redoStack=[]})),this._register(s.onDidChangeModelContent(t=>{this._undoStack=[],this._redoStack=[]})),this._register(s.onDidChangeCursorSelection(t=>{if(this._isCursorUndoRedo||!t.oldSelections||t.oldModelVersionId!==t.modelVersionId)return;const i=new y(t.oldSelections);this._undoStack.length>0&&this._undoStack[this._undoStack.length-1].cursorState.equals(i)||(this._undoStack.push(new f(i,s.getScrollTop(),s.getScrollLeft())),this._redoStack=[],this._undoStack.length>50&&this._undoStack.shift())}))}cursorUndo(){!this._editor.hasModel()||this._undoStack.length===0||(this._redoStack.push(new f(new y(this._editor.getSelections()),this._editor.getScrollTop(),this._editor.getScrollLeft())),this._applyState(this._undoStack.pop()))}cursorRedo(){!this._editor.hasModel()||this._redoStack.length===0||(this._undoStack.push(new f(new y(this._editor.getSelections()),this._editor.getScrollTop(),this._editor.getScrollLeft())),this._applyState(this._redoStack.pop()))}_applyState(s){this._isCursorUndoRedo=!0,this._editor.setSelections(s.cursorState.selections),this._editor.setScrollPosition({scrollTop:s.scrollTop,scrollLeft:s.scrollLeft}),this._isCursorUndoRedo=!1}}e.CursorUndoRedoController=_;class C extends k.EditorAction{constructor(){super({id:"cursorUndo",label:L.localize(872,"Cursor Undo"),alias:"Cursor Undo",precondition:void 0,kbOpts:{kbExpr:E.EditorContextKeys.textInputFocus,primary:2099,weight:100}})}run(s,t,i){_.get(t)?.cursorUndo()}}e.CursorUndo=C;class p extends k.EditorAction{constructor(){super({id:"cursorRedo",label:L.localize(873,"Cursor Redo"),alias:"Cursor Redo",precondition:void 0})}run(s,t,i){_.get(t)?.cursorRedo()}}e.CursorRedo=p,(0,k.registerEditorContribution)(_.ID,_,0),(0,k.registerEditorAction)(C),(0,k.registerEditorAction)(p)}),define(oe[723],re([1,0,15,12,18,73,7,49,3]),function(ae,e,c,k,E,L,y,f,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorKeybindingCancellationTokenSource=void 0;const C=(0,y.createDecorator)("IEditorCancelService"),p=new k.RawContextKey("cancellableOperation",!1,(0,_.localize)(847,"Whether the editor runs a cancellable operation, e.g. like 'Peek References'"));(0,f.registerSingleton)(C,class{constructor(){this._tokens=new WeakMap}add(s,t){let i=this._tokens.get(s);i||(i=s.invokeWithinContext(g=>{const h=p.bindTo(g.get(k.IContextKeyService)),l=new L.LinkedList;return{key:h,tokens:l}}),this._tokens.set(s,i));let o;return i.key.set(!0),o=i.tokens.push(t),()=>{o&&(o(),i.key.set(!i.tokens.isEmpty()),o=void 0)}}cancel(s){const t=this._tokens.get(s);if(!t)return;const i=t.tokens.pop();i&&(i.cancel(),t.key.set(!t.tokens.isEmpty()))}},1);class n extends E.CancellationTokenSource{constructor(t,i){super(i),this.editor=t,this._unregister=t.invokeWithinContext(o=>o.get(C).add(t,this))}dispose(){this._unregister(),super.dispose()}}e.EditorKeybindingCancellationTokenSource=n,(0,c.registerEditorCommand)(new class extends c.EditorCommand{constructor(){super({id:"editor.cancelOperation",kbOpts:{weight:100,primary:9},precondition:p})}runEditorCommand(s,t){s.get(C).cancel(t)}})}),define(oe[121],re([1,0,11,4,18,2,723]),function(ae,e,c,k,E,L,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TextModelCancellationTokenSource=e.EditorStateCancellationTokenSource=e.EditorState=void 0;class f{constructor(n,s){if(this.flags=s,this.flags&1){const t=n.getModel();this.modelVersionId=t?c.format("{0}#{1}",t.uri.toString(),t.getVersionId()):null}else this.modelVersionId=null;this.flags&4?this.position=n.getPosition():this.position=null,this.flags&2?this.selection=n.getSelection():this.selection=null,this.flags&8?(this.scrollLeft=n.getScrollLeft(),this.scrollTop=n.getScrollTop()):(this.scrollLeft=-1,this.scrollTop=-1)}_equals(n){if(!(n instanceof f))return!1;const s=n;return!(this.modelVersionId!==s.modelVersionId||this.scrollLeft!==s.scrollLeft||this.scrollTop!==s.scrollTop||!this.position&&s.position||this.position&&!s.position||this.position&&s.position&&!this.position.equals(s.position)||!this.selection&&s.selection||this.selection&&!s.selection||this.selection&&s.selection&&!this.selection.equalsRange(s.selection))}validate(n){return this._equals(new f(n,this.flags))}}e.EditorState=f;class _ extends y.EditorKeybindingCancellationTokenSource{constructor(n,s,t,i){super(n,i),this._listener=new L.DisposableStore,s&4&&this._listener.add(n.onDidChangeCursorPosition(o=>{(!t||!k.Range.containsPosition(t,o.position))&&this.cancel()})),s&2&&this._listener.add(n.onDidChangeCursorSelection(o=>{(!t||!k.Range.containsRange(t,o.selection))&&this.cancel()})),s&8&&this._listener.add(n.onDidScrollChange(o=>this.cancel())),s&1&&(this._listener.add(n.onDidChangeModel(o=>this.cancel())),this._listener.add(n.onDidChangeModelContent(o=>this.cancel())))}dispose(){this._listener.dispose(),super.dispose()}}e.EditorStateCancellationTokenSource=_;class C extends E.CancellationTokenSource{constructor(n,s){super(s),this._listener=n.onDidChangeContent(()=>this.cancel())}dispose(){this._listener.dispose(),super.dispose()}}e.TextModelCancellationTokenSource=C}),define(oe[155],re([1,0,13,18,8,2,22,151,4,23,17,44,121,3,24,50,96,66,133,90]),function(ae,e,c,k,E,L,y,f,_,C,p,n,s,t,i,o,g,h,l,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ApplyCodeActionReason=e.fixAllCommandId=e.organizeImportsCommandId=e.sourceActionCommandId=e.refactorCommandId=e.autoFixCommandId=e.quickFixCommandId=e.codeActionCommandId=void 0,e.getCodeActions=m,e.applyCodeAction=S,e.codeActionCommandId="editor.action.codeAction",e.quickFixCommandId="editor.action.quickFix",e.autoFixCommandId="editor.action.autoFix",e.refactorCommandId="editor.action.refactor",e.sourceActionCommandId="editor.action.sourceAction",e.organizeImportsCommandId="editor.action.organizeImports",e.fixAllCommandId="editor.action.fixAll";class r extends L.Disposable{static codeActionsPreferredComparator(T,M){return T.isPreferred&&!M.isPreferred?-1:!T.isPreferred&&M.isPreferred?1:0}static codeActionsComparator({action:T},{action:M}){return T.isAI&&!M.isAI?1:!T.isAI&&M.isAI?-1:(0,c.isNonEmptyArray)(T.diagnostics)?(0,c.isNonEmptyArray)(M.diagnostics)?r.codeActionsPreferredComparator(T,M):-1:(0,c.isNonEmptyArray)(M.diagnostics)?1:r.codeActionsPreferredComparator(T,M)}constructor(T,M,A){super(),this.documentation=M,this._register(A),this.allActions=[...T].sort(r.codeActionsComparator),this.validActions=this.allActions.filter(({action:R})=>!R.disabled)}get hasAutoFix(){return this.validActions.some(({action:T})=>!!T.kind&&l.CodeActionKind.QuickFix.contains(new a.HierarchicalKind(T.kind))&&!!T.isPreferred)}get hasAIFix(){return this.validActions.some(({action:T})=>!!T.isAI)}get allAIFixes(){return this.validActions.every(({action:T})=>!!T.isAI)}}const d={actions:[],documentation:void 0};async function m(I,T,M,A,R,N){const O=A.filter||{},x={...O,excludes:[...O.excludes||[],l.CodeActionKind.Notebook]},F={only:O.include?.value,trigger:A.type},W=new s.TextModelCancellationTokenSource(T,N),V=A.type===2,q=u(I,T,V?x:O),H=new L.DisposableStore,K=q.map(async Y=>{try{R.report(Y);const X=await Y.provideCodeActions(T,M,F,W.token);if(X&&H.add(X),W.token.isCancellationRequested)return d;const Z=(X?.actions||[]).filter(P=>P&&(0,l.filtersAction)(O,P)),j=v(Y,Z,O.include);return{actions:Z.map(P=>new l.CodeActionItem(P,Y)),documentation:j}}catch(X){if((0,E.isCancellationError)(X))throw X;return(0,E.onUnexpectedExternalError)(X),d}}),G=I.onDidChange(()=>{const Y=I.all(T);(0,c.equals)(Y,q)||W.cancel()});try{const Y=await Promise.all(K),X=Y.map(j=>j.actions).flat(),Z=[...(0,c.coalesce)(Y.map(j=>j.documentation)),...b(I,T,A,X)];return new r(X,Z,H)}finally{G.dispose(),W.dispose()}}function u(I,T,M){return I.all(T).filter(A=>A.providedCodeActionKinds?A.providedCodeActionKinds.some(R=>(0,l.mayIncludeActionsOfKind)(M,new a.HierarchicalKind(R))):!0)}function*b(I,T,M,A){if(T&&A.length)for(const R of I.all(T))R._getAdditionalMenuItems&&(yield*R._getAdditionalMenuItems?.({trigger:M.type,only:M.filter?.include?.value},A.map(N=>N.action)))}function v(I,T,M){if(!I.documentation)return;const A=I.documentation.map(R=>({kind:new a.HierarchicalKind(R.kind),command:R.command}));if(M){let R;for(const N of A)N.kind.contains(M)&&(R?R.kind.contains(N.kind)&&(R=N):R=N);if(R)return R?.command}for(const R of T)if(R.kind){for(const N of A)if(N.kind.contains(new a.HierarchicalKind(R.kind)))return N.command}}var w;(function(I){I.OnSave="onSave",I.FromProblemsView="fromProblemsView",I.FromCodeActions="fromCodeActions",I.FromAILightbulb="fromAILightbulb"})(w||(e.ApplyCodeActionReason=w={}));async function S(I,T,M,A,R=k.CancellationToken.None){const N=I.get(f.IBulkEditService),O=I.get(i.ICommandService),x=I.get(h.ITelemetryService),F=I.get(o.INotificationService);if(x.publicLog2("codeAction.applyCodeAction",{codeActionTitle:T.action.title,codeActionKind:T.action.kind,codeActionIsPreferred:!!T.action.isPreferred,reason:M}),await T.resolve(R),!R.isCancellationRequested&&!(T.action.edit?.edits.length&&!(await N.apply(T.action.edit,{editor:A?.editor,label:T.action.title,quotableLabel:T.action.title,code:"undoredo.codeAction",respectAutoSaveConfig:M!==w.OnSave,showPreview:A?.preview})).isApplied)&&T.action.command)try{await O.executeCommand(T.action.command.id,...T.action.command.arguments||[])}catch(W){const V=D(W);F.error(typeof V=="string"?V:t.localize(951,"An unknown error occurred while applying the code action"))}}function D(I){return typeof I=="string"?I:I instanceof Error&&typeof I.message=="string"?I.message:void 0}i.CommandsRegistry.registerCommand("_executeCodeActionProvider",async function(I,T,M,A,R){if(!(T instanceof y.URI))throw(0,E.illegalArgument)();const{codeActionProvider:N}=I.get(p.ILanguageFeaturesService),O=I.get(n.IModelService).getModel(T);if(!O)throw(0,E.illegalArgument)();const x=C.Selection.isISelection(M)?C.Selection.liftSelection(M):_.Range.isIRange(M)?O.validateRange(M):void 0;if(!x)throw(0,E.illegalArgument)();const F=typeof A=="string"?new a.HierarchicalKind(A):void 0,W=await m(N,O,x,{type:1,triggerAction:l.CodeActionTriggerSource.Default,filter:{includeSourceActions:!0,include:F}},g.Progress.None,k.CancellationToken.None),V=[],q=Math.min(W.validActions.length,typeof R=="number"?R:0);for(let H=0;H<q;H++)V.push(W.validActions[H].resolve(k.CancellationToken.None));try{return await Promise.all(V),W.validActions.map(H=>H.action)}finally{setTimeout(()=>W.dispose(),100)}})}),define(oe[724],re([1,0,90,98,155,133,31]),function(ae,e,c,k,E,L,y){"use strict";var f;Object.defineProperty(e,"__esModule",{value:!0}),e.CodeActionKeybindingResolver=void 0;let _=class{static{f=this}static{this.codeActionCommands=[E.refactorCommandId,E.codeActionCommandId,E.sourceActionCommandId,E.organizeImportsCommandId,E.fixAllCommandId]}constructor(p){this.keybindingService=p}getResolver(){const p=new k.Lazy(()=>this.keybindingService.getKeybindings().filter(n=>f.codeActionCommands.indexOf(n.command)>=0).filter(n=>n.resolvedKeybinding).map(n=>{let s=n.commandArgs;return n.command===E.organizeImportsCommandId?s={kind:L.CodeActionKind.SourceOrganizeImports.value}:n.command===E.fixAllCommandId&&(s={kind:L.CodeActionKind.SourceFixAll.value}),{resolvedKeybinding:n.resolvedKeybinding,...L.CodeActionCommandArgs.fromUser(s,{kind:c.HierarchicalKind.None,apply:"never"})}}));return n=>{if(n.kind)return this.bestKeybindingForCodeAction(n,p.value)?.resolvedKeybinding}}bestKeybindingForCodeAction(p,n){if(!p.kind)return;const s=new c.HierarchicalKind(p.kind);return n.filter(t=>t.kind.contains(s)).filter(t=>t.preferred?p.isPreferred:!0).reduceRight((t,i)=>t?t.kind.contains(i.kind)?i:t:i,void 0)}};e.CodeActionKeybindingResolver=_,e.CodeActionKeybindingResolver=_=f=De([he(0,y.IKeybindingService)],_)}),define(oe[403],re([1,0,14,8,6,2,51,37,9,23,12,96,133,155,90]),function(ae,e,c,k,E,L,y,f,_,C,p,n,s,t,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CodeActionModel=e.CodeActionsState=e.APPLY_FIX_ALL_COMMAND_ID=e.SUPPORTED_CODE_ACTIONS=void 0,e.SUPPORTED_CODE_ACTIONS=new p.RawContextKey("supportedCodeAction",""),e.APPLY_FIX_ALL_COMMAND_ID="_typescript.applyFixAllCodeAction";class o extends L.Disposable{constructor(r,d,m,u=250){super(),this._editor=r,this._markerService=d,this._signalChange=m,this._delay=u,this._autoTriggerTimer=this._register(new c.TimeoutTimer),this._register(this._markerService.onMarkerChanged(b=>this._onMarkerChanges(b))),this._register(this._editor.onDidChangeCursorPosition(()=>this._tryAutoTrigger()))}trigger(r){const d=this._getRangeOfSelectionUnlessWhitespaceEnclosed(r);this._signalChange(d?{trigger:r,selection:d}:void 0)}_onMarkerChanges(r){const d=this._editor.getModel();d&&r.some(m=>(0,y.isEqual)(m,d.uri))&&this._tryAutoTrigger()}_tryAutoTrigger(){this._autoTriggerTimer.cancelAndSet(()=>{this.trigger({type:2,triggerAction:s.CodeActionTriggerSource.Default})},this._delay)}_getRangeOfSelectionUnlessWhitespaceEnclosed(r){if(!this._editor.hasModel())return;const d=this._editor.getSelection();if(r.type===1)return d;const m=this._editor.getOption(65).enabled;if(m!==f.ShowLightbulbIconMode.Off){{if(m===f.ShowLightbulbIconMode.On)return d;if(m===f.ShowLightbulbIconMode.OnCode){if(!d.isEmpty())return d;const b=this._editor.getModel(),{lineNumber:v,column:w}=d.getPosition(),S=b.getLineContent(v);if(S.length===0)return;if(w===1){if(/\s/.test(S[0]))return}else if(w===b.getLineMaxColumn(v)){if(/\s/.test(S[S.length-1]))return}else if(/\s/.test(S[w-2])&&/\s/.test(S[w-1]))return}}return d}}}var g;(function(a){a.Empty={type:0};class r{constructor(m,u,b){this.trigger=m,this.position=u,this._cancellablePromise=b,this.type=1,this.actions=b.catch(v=>{if((0,k.isCancellationError)(v))return h;throw v})}cancel(){this._cancellablePromise.cancel()}}a.Triggered=r})(g||(e.CodeActionsState=g={}));const h=Object.freeze({allActions:[],validActions:[],dispose:()=>{},documentation:[],hasAutoFix:!1,hasAIFix:!1,allAIFixes:!1});class l extends L.Disposable{constructor(r,d,m,u,b,v){super(),this._editor=r,this._registry=d,this._markerService=m,this._progressService=b,this._configurationService=v,this._codeActionOracle=this._register(new L.MutableDisposable),this._state=g.Empty,this._onDidChangeState=this._register(new E.Emitter),this.onDidChangeState=this._onDidChangeState.event,this._disposed=!1,this._supportedCodeActions=e.SUPPORTED_CODE_ACTIONS.bindTo(u),this._register(this._editor.onDidChangeModel(()=>this._update())),this._register(this._editor.onDidChangeModelLanguage(()=>this._update())),this._register(this._registry.onDidChange(()=>this._update())),this._register(this._editor.onDidChangeConfiguration(w=>{w.hasChanged(65)&&this._update()})),this._update()}dispose(){this._disposed||(this._disposed=!0,super.dispose(),this.setState(g.Empty,!0))}_settingEnabledNearbyQuickfixes(){const r=this._editor?.getModel();return this._configurationService?this._configurationService.getValue("editor.codeActionWidget.includeNearbyQuickFixes",{resource:r?.uri}):!1}_update(){if(this._disposed)return;this._codeActionOracle.value=void 0,this.setState(g.Empty);const r=this._editor.getModel();if(r&&this._registry.has(r)&&!this._editor.getOption(92)){const d=this._registry.all(r).flatMap(m=>m.providedCodeActionKinds??[]);this._supportedCodeActions.set(d.join(" ")),this._codeActionOracle.value=new o(this._editor,this._markerService,m=>{if(!m){this.setState(g.Empty);return}const u=m.selection.getStartPosition(),b=(0,c.createCancelablePromise)(async S=>{if(this._settingEnabledNearbyQuickfixes()&&m.trigger.type===1&&(m.trigger.triggerAction===s.CodeActionTriggerSource.QuickFix||m.trigger.filter?.include?.contains(s.CodeActionKind.QuickFix))){const D=await(0,t.getCodeActions)(this._registry,r,m.selection,m.trigger,n.Progress.None,S),I=[...D.allActions];if(S.isCancellationRequested)return h;const T=D.validActions?.some(A=>A.action.kind?s.CodeActionKind.QuickFix.contains(new i.HierarchicalKind(A.action.kind)):!1),M=this._markerService.read({resource:r.uri});if(T){for(const A of D.validActions)A.action.command?.arguments?.some(R=>typeof R=="string"&&R.includes(e.APPLY_FIX_ALL_COMMAND_ID))&&(A.action.diagnostics=[...M.filter(R=>R.relatedInformation)]);return{validActions:D.validActions,allActions:I,documentation:D.documentation,hasAutoFix:D.hasAutoFix,hasAIFix:D.hasAIFix,allAIFixes:D.allAIFixes,dispose:()=>{D.dispose()}}}else if(!T&&M.length>0){const A=m.selection.getPosition();let R=A,N=Number.MAX_VALUE;const O=[...D.validActions];for(const F of M){const W=F.endColumn,V=F.endLineNumber,q=F.startLineNumber;if(V===A.lineNumber||q===A.lineNumber){R=new _.Position(V,W);const H={type:m.trigger.type,triggerAction:m.trigger.triggerAction,filter:{include:m.trigger.filter?.include?m.trigger.filter?.include:s.CodeActionKind.QuickFix},autoApply:m.trigger.autoApply,context:{notAvailableMessage:m.trigger.context?.notAvailableMessage||"",position:R}},K=new C.Selection(R.lineNumber,R.column,R.lineNumber,R.column),G=await(0,t.getCodeActions)(this._registry,r,K,H,n.Progress.None,S);if(G.validActions.length!==0){for(const Y of G.validActions)Y.action.command?.arguments?.some(X=>typeof X=="string"&&X.includes(e.APPLY_FIX_ALL_COMMAND_ID))&&(Y.action.diagnostics=[...M.filter(X=>X.relatedInformation)]);D.allActions.length===0&&I.push(...G.allActions),Math.abs(A.column-W)<N?O.unshift(...G.validActions):O.push(...G.validActions)}N=Math.abs(A.column-W)}}const x=O.filter((F,W,V)=>V.findIndex(q=>q.action.title===F.action.title)===W);return x.sort((F,W)=>F.action.isPreferred&&!W.action.isPreferred?-1:!F.action.isPreferred&&W.action.isPreferred||F.action.isAI&&!W.action.isAI?1:!F.action.isAI&&W.action.isAI?-1:0),{validActions:x,allActions:I,documentation:D.documentation,hasAutoFix:D.hasAutoFix,hasAIFix:D.hasAIFix,allAIFixes:D.allAIFixes,dispose:()=>{D.dispose()}}}}return(0,t.getCodeActions)(this._registry,r,m.selection,m.trigger,n.Progress.None,S)});m.trigger.type===1&&this._progressService?.showWhile(b,250);const v=new g.Triggered(m.trigger,u,b);let w=!1;this._state.type===1&&(w=this._state.trigger.type===1&&v.type===1&&v.trigger.type===2&&this._state.position!==v.position),w?setTimeout(()=>{this.setState(v)},500):this.setState(v)},void 0),this._codeActionOracle.value.trigger({type:2,triggerAction:s.CodeActionTriggerSource.Default})}else this._supportedCodeActions.reset()}trigger(r){this._codeActionOracle.value?.trigger(r)}setState(r,d){r!==this._state&&(this._state.type===1&&this._state.cancel(),this._state=r,!d&&!this._disposed&&this._onDidChangeState.fire(r))}}e.CodeActionModel=l}),define(oe[725],re([1,0,15,167,3]),function(ae,e,c,k,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class L extends c.EditorAction{constructor(){super({id:"editor.action.fontZoomIn",label:E.localize(773,"Increase Editor Font Size"),alias:"Increase Editor Font Size",precondition:void 0})}run(C,p){k.EditorZoom.setZoomLevel(k.EditorZoom.getZoomLevel()+1)}}class y extends c.EditorAction{constructor(){super({id:"editor.action.fontZoomOut",label:E.localize(774,"Decrease Editor Font Size"),alias:"Decrease Editor Font Size",precondition:void 0})}run(C,p){k.EditorZoom.setZoomLevel(k.EditorZoom.getZoomLevel()-1)}}class f extends c.EditorAction{constructor(){super({id:"editor.action.fontZoomReset",label:E.localize(775,"Reset Editor Font Size"),alias:"Reset Editor Font Size",precondition:void 0})}run(C,p){k.EditorZoom.setZoomLevel(0)}}(0,c.registerEditorAction)(L),(0,c.registerEditorAction)(y),(0,c.registerEditorAction)(f)}),define(oe[404],re([1,0,13,18,8,53,73,19,22,121,171,9,4,23,115,78,352,24,668,7,17,61,136]),function(ae,e,c,k,E,L,y,f,_,C,p,n,s,t,i,o,g,h,l,a,r,d,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FormattingConflicts=void 0,e.getRealAndSyntheticDocumentFormattersOrdered=u,e.formatDocumentRangesWithSelectedProvider=v,e.formatDocumentRangesWithProvider=w,e.formatDocumentWithSelectedProvider=S,e.formatDocumentWithProvider=D,e.getDocumentRangeFormattingEditsUntilResult=I,e.getDocumentFormattingEditsUntilResult=T,e.getOnTypeFormattingEdits=M;function u(A,R,N){const O=[],x=new l.ExtensionIdentifierSet,F=A.ordered(N);for(const V of F)O.push(V),V.extensionId&&x.add(V.extensionId);const W=R.ordered(N);for(const V of W){if(V.extensionId){if(x.has(V.extensionId))continue;x.add(V.extensionId)}O.push({displayName:V.displayName,extensionId:V.extensionId,provideDocumentFormattingEdits(q,H,K){return V.provideDocumentRangeFormattingEdits(q,q.getFullModelRange(),H,K)}})}return O}class b{static{this._selectors=new y.LinkedList}static setFormatterSelector(R){return{dispose:b._selectors.unshift(R)}}static async select(R,N,O,x){if(R.length===0)return;const F=L.Iterable.first(b._selectors);if(F)return await F(R,N,O,x)}}e.FormattingConflicts=b;async function v(A,R,N,O,x,F,W){const V=A.get(a.IInstantiationService),{documentRangeFormattingEditProvider:q}=A.get(r.ILanguageFeaturesService),H=(0,p.isCodeEditor)(R)?R.getModel():R,K=q.ordered(H),G=await b.select(K,H,O,2);G&&(x.report(G),await V.invokeFunction(w,G,R,N,F,W))}async function w(A,R,N,O,x,F){const W=A.get(i.IEditorWorkerService),V=A.get(d.ILogService),q=A.get(m.IAccessibilitySignalService);let H,K;(0,p.isCodeEditor)(N)?(H=N.getModel(),K=new C.EditorStateCancellationTokenSource(N,5,void 0,x)):(H=N,K=new C.TextModelCancellationTokenSource(N,x));const G=[];let Y=0;for(const te of(0,c.asArray)(O).sort(s.Range.compareRangesUsingStarts))Y>0&&s.Range.areIntersectingOrTouching(G[Y-1],te)?G[Y-1]=s.Range.fromPositions(G[Y-1].getStartPosition(),te.getEndPosition()):Y=G.push(te);const X=async te=>{V.trace("[format][provideDocumentRangeFormattingEdits] (request)",R.extensionId?.value,te);const se=await R.provideDocumentRangeFormattingEdits(H,te,H.getFormattingOptions(),K.token)||[];return V.trace("[format][provideDocumentRangeFormattingEdits] (response)",R.extensionId?.value,se),se},Z=(te,se)=>{if(!te.length||!se.length)return!1;const ue=te.reduce((ge,pe)=>s.Range.plusRange(ge,pe.range),te[0].range);if(!se.some(ge=>s.Range.intersectRanges(ue,ge.range)))return!1;for(const ge of te)for(const pe of se)if(s.Range.intersectRanges(ge.range,pe.range))return!0;return!1},j=[],P=[];try{if(typeof R.provideDocumentRangesFormattingEdits=="function"){V.trace("[format][provideDocumentRangeFormattingEdits] (request)",R.extensionId?.value,G);const te=await R.provideDocumentRangesFormattingEdits(H,G,H.getFormattingOptions(),K.token)||[];V.trace("[format][provideDocumentRangeFormattingEdits] (response)",R.extensionId?.value,te),P.push(te)}else{for(const te of G){if(K.token.isCancellationRequested)return!0;P.push(await X(te))}for(let te=0;te<G.length;++te)for(let se=te+1;se<G.length;++se){if(K.token.isCancellationRequested)return!0;if(Z(P[te],P[se])){const ue=s.Range.plusRange(G[te],G[se]),ge=await X(ue);G.splice(se,1),G.splice(te,1),G.push(ue),P.splice(se,1),P.splice(te,1),P.push(ge),te=0,se=0}}}for(const te of P){if(K.token.isCancellationRequested)return!0;const se=await W.computeMoreMinimalEdits(H.uri,te);se&&j.push(...se)}}finally{K.dispose()}if(j.length===0)return!1;if((0,p.isCodeEditor)(N))g.FormattingEdit.execute(N,j,!0),N.revealPositionInCenterIfOutsideViewport(N.getPosition(),1);else{const[{range:te}]=j,se=new t.Selection(te.startLineNumber,te.startColumn,te.endLineNumber,te.endColumn);H.pushEditOperations([se],j.map(ue=>({text:ue.text,range:s.Range.lift(ue.range),forceMoveMarkers:!0})),ue=>{for(const{range:ge}of ue)if(s.Range.areIntersectingOrTouching(ge,se))return[new t.Selection(ge.startLineNumber,ge.startColumn,ge.endLineNumber,ge.endColumn)];return null})}return q.playSignal(m.AccessibilitySignal.format,{userGesture:F}),!0}async function S(A,R,N,O,x,F){const W=A.get(a.IInstantiationService),V=A.get(r.ILanguageFeaturesService),q=(0,p.isCodeEditor)(R)?R.getModel():R,H=u(V.documentFormattingEditProvider,V.documentRangeFormattingEditProvider,q),K=await b.select(H,q,N,1);K&&(O.report(K),await W.invokeFunction(D,K,R,N,x,F))}async function D(A,R,N,O,x,F){const W=A.get(i.IEditorWorkerService),V=A.get(m.IAccessibilitySignalService);let q,H;(0,p.isCodeEditor)(N)?(q=N.getModel(),H=new C.EditorStateCancellationTokenSource(N,5,void 0,x)):(q=N,H=new C.TextModelCancellationTokenSource(N,x));let K;try{const G=await R.provideDocumentFormattingEdits(q,q.getFormattingOptions(),H.token);if(K=await W.computeMoreMinimalEdits(q.uri,G),H.token.isCancellationRequested)return!0}finally{H.dispose()}if(!K||K.length===0)return!1;if((0,p.isCodeEditor)(N))g.FormattingEdit.execute(N,K,O!==2),O!==2&&N.revealPositionInCenterIfOutsideViewport(N.getPosition(),1);else{const[{range:G}]=K,Y=new t.Selection(G.startLineNumber,G.startColumn,G.endLineNumber,G.endColumn);q.pushEditOperations([Y],K.map(X=>({text:X.text,range:s.Range.lift(X.range),forceMoveMarkers:!0})),X=>{for(const{range:Z}of X)if(s.Range.areIntersectingOrTouching(Z,Y))return[new t.Selection(Z.startLineNumber,Z.startColumn,Z.endLineNumber,Z.endColumn)];return null})}return V.playSignal(m.AccessibilitySignal.format,{userGesture:F}),!0}async function I(A,R,N,O,x,F){const W=R.documentRangeFormattingEditProvider.ordered(N);for(const V of W){const q=await Promise.resolve(V.provideDocumentRangeFormattingEdits(N,O,x,F)).catch(E.onUnexpectedExternalError);if((0,c.isNonEmptyArray)(q))return await A.computeMoreMinimalEdits(N.uri,q)}}async function T(A,R,N,O,x){const F=u(R.documentFormattingEditProvider,R.documentRangeFormattingEditProvider,N);for(const W of F){const V=await Promise.resolve(W.provideDocumentFormattingEdits(N,O,x)).catch(E.onUnexpectedExternalError);if((0,c.isNonEmptyArray)(V))return await A.computeMoreMinimalEdits(N.uri,V)}}function M(A,R,N,O,x,F,W){const V=R.onTypeFormattingEditProvider.ordered(N);return V.length===0||V[0].autoFormatTriggerCharacters.indexOf(x)<0?Promise.resolve(void 0):Promise.resolve(V[0].provideOnTypeFormattingEdits(N,O,x,F,W)).catch(E.onUnexpectedExternalError).then(q=>A.computeMoreMinimalEdits(N.uri,q))}h.CommandsRegistry.registerCommand("_executeFormatRangeProvider",async function(A,...R){const[N,O,x]=R;(0,f.assertType)(_.URI.isUri(N)),(0,f.assertType)(s.Range.isIRange(O));const F=A.get(o.ITextModelService),W=A.get(i.IEditorWorkerService),V=A.get(r.ILanguageFeaturesService),q=await F.createModelReference(N);try{return I(W,V,q.object.textEditorModel,s.Range.lift(O),x,k.CancellationToken.None)}finally{q.dispose()}}),h.CommandsRegistry.registerCommand("_executeFormatDocumentProvider",async function(A,...R){const[N,O]=R;(0,f.assertType)(_.URI.isUri(N));const x=A.get(o.ITextModelService),F=A.get(i.IEditorWorkerService),W=A.get(r.ILanguageFeaturesService),V=await x.createModelReference(N);try{return T(F,W,V.object.textEditorModel,O,k.CancellationToken.None)}finally{V.dispose()}}),h.CommandsRegistry.registerCommand("_executeFormatOnTypeProvider",async function(A,...R){const[N,O,x,F]=R;(0,f.assertType)(_.URI.isUri(N)),(0,f.assertType)(n.Position.isIPosition(O)),(0,f.assertType)(typeof x=="string");const W=A.get(o.ITextModelService),V=A.get(i.IEditorWorkerService),q=A.get(r.ILanguageFeaturesService),H=await W.createModelReference(N);try{return M(V,q,H.object.textEditorModel,n.Position.lift(O),x,F,k.CancellationToken.None)}finally{H.dispose()}})}),define(oe[726],re([1,0,13,18,8,72,2,15,35,143,4,20,115,17,404,352,3,136,24,12,7,96]),function(ae,e,c,k,E,L,y,f,_,C,p,n,s,t,i,o,g,h,l,a,r,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FormatOnType=void 0;let m=class{static{this.ID="editor.contrib.autoFormat"}constructor(S,D,I,T){this._editor=S,this._languageFeaturesService=D,this._workerService=I,this._accessibilitySignalService=T,this._disposables=new y.DisposableStore,this._sessionDisposables=new y.DisposableStore,this._disposables.add(D.onTypeFormattingEditProvider.onDidChange(this._update,this)),this._disposables.add(S.onDidChangeModel(()=>this._update())),this._disposables.add(S.onDidChangeModelLanguage(()=>this._update())),this._disposables.add(S.onDidChangeConfiguration(M=>{M.hasChanged(56)&&this._update()})),this._update()}dispose(){this._disposables.dispose(),this._sessionDisposables.dispose()}_update(){if(this._sessionDisposables.clear(),!this._editor.getOption(56)||!this._editor.hasModel())return;const S=this._editor.getModel(),[D]=this._languageFeaturesService.onTypeFormattingEditProvider.ordered(S);if(!D||!D.autoFormatTriggerCharacters)return;const I=new C.CharacterSet;for(const T of D.autoFormatTriggerCharacters)I.add(T.charCodeAt(0));this._sessionDisposables.add(this._editor.onDidType(T=>{const M=T.charCodeAt(T.length-1);I.has(M)&&this._trigger(String.fromCharCode(M))}))}_trigger(S){if(!this._editor.hasModel()||this._editor.getSelections().length>1||!this._editor.getSelection().isEmpty())return;const D=this._editor.getModel(),I=this._editor.getPosition(),T=new k.CancellationTokenSource,M=this._editor.onDidChangeModelContent(A=>{if(A.isFlush){T.cancel(),M.dispose();return}for(let R=0,N=A.changes.length;R<N;R++)if(A.changes[R].range.endLineNumber<=I.lineNumber){T.cancel(),M.dispose();return}});(0,i.getOnTypeFormattingEdits)(this._workerService,this._languageFeaturesService,D,I,S,D.getFormattingOptions(),T.token).then(A=>{T.token.isCancellationRequested||(0,c.isNonEmptyArray)(A)&&(this._accessibilitySignalService.playSignal(h.AccessibilitySignal.format,{userGesture:!1}),o.FormattingEdit.execute(this._editor,A,!0))}).finally(()=>{M.dispose()})}};e.FormatOnType=m,e.FormatOnType=m=De([he(1,t.ILanguageFeaturesService),he(2,s.IEditorWorkerService),he(3,h.IAccessibilitySignalService)],m);let u=class{static{this.ID="editor.contrib.formatOnPaste"}constructor(S,D,I){this.editor=S,this._languageFeaturesService=D,this._instantiationService=I,this._callOnDispose=new y.DisposableStore,this._callOnModel=new y.DisposableStore,this._callOnDispose.add(S.onDidChangeConfiguration(()=>this._update())),this._callOnDispose.add(S.onDidChangeModel(()=>this._update())),this._callOnDispose.add(S.onDidChangeModelLanguage(()=>this._update())),this._callOnDispose.add(D.documentRangeFormattingEditProvider.onDidChange(this._update,this))}dispose(){this._callOnDispose.dispose(),this._callOnModel.dispose()}_update(){this._callOnModel.clear(),this.editor.getOption(55)&&this.editor.hasModel()&&this._languageFeaturesService.documentRangeFormattingEditProvider.has(this.editor.getModel())&&this._callOnModel.add(this.editor.onDidPaste(({range:S})=>this._trigger(S)))}_trigger(S){this.editor.hasModel()&&(this.editor.getSelections().length>1||this._instantiationService.invokeFunction(i.formatDocumentRangesWithSelectedProvider,this.editor,S,2,d.Progress.None,k.CancellationToken.None,!1).catch(E.onUnexpectedError))}};u=De([he(1,t.ILanguageFeaturesService),he(2,r.IInstantiationService)],u);class b extends f.EditorAction{constructor(){super({id:"editor.action.formatDocument",label:g.localize(771,"Format Document"),alias:"Format Document",precondition:a.ContextKeyExpr.and(n.EditorContextKeys.notInCompositeEditor,n.EditorContextKeys.writable,n.EditorContextKeys.hasDocumentFormattingProvider),kbOpts:{kbExpr:n.EditorContextKeys.editorTextFocus,primary:1572,linux:{primary:3111},weight:100},contextMenuOpts:{group:"1_modification",order:1.3}})}async run(S,D){if(D.hasModel()){const I=S.get(r.IInstantiationService);await S.get(d.IEditorProgressService).showWhile(I.invokeFunction(i.formatDocumentWithSelectedProvider,D,1,d.Progress.None,k.CancellationToken.None,!0),250)}}}class v extends f.EditorAction{constructor(){super({id:"editor.action.formatSelection",label:g.localize(772,"Format Selection"),alias:"Format Selection",precondition:a.ContextKeyExpr.and(n.EditorContextKeys.writable,n.EditorContextKeys.hasDocumentSelectionFormattingProvider),kbOpts:{kbExpr:n.EditorContextKeys.editorTextFocus,primary:(0,L.KeyChord)(2089,2084),weight:100},contextMenuOpts:{when:n.EditorContextKeys.hasNonEmptySelection,group:"1_modification",order:1.31}})}async run(S,D){if(!D.hasModel())return;const I=S.get(r.IInstantiationService),T=D.getModel(),M=D.getSelections().map(R=>R.isEmpty()?new p.Range(R.startLineNumber,1,R.startLineNumber,T.getLineMaxColumn(R.startLineNumber)):R);await S.get(d.IEditorProgressService).showWhile(I.invokeFunction(i.formatDocumentRangesWithSelectedProvider,D,M,1,d.Progress.None,k.CancellationToken.None,!0),250)}}(0,f.registerEditorContribution)(m.ID,m,2),(0,f.registerEditorContribution)(u.ID,u,2),(0,f.registerEditorAction)(b),(0,f.registerEditorAction)(v),l.CommandsRegistry.registerCommand("editor.action.format",async w=>{const S=w.get(_.ICodeEditorService).getFocusedCodeEditor();if(!S||!S.hasModel())return;const D=w.get(l.ICommandService);S.getSelection().isEmpty()?await D.executeCommand("editor.action.formatDocument"):await D.executeCommand("editor.action.formatSelection")})}),define(oe[276],re([1,0,13,18,8,47,15,17,177]),function(ae,e,c,k,E,L,y,f,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getDefinitionsAtPosition=n,e.getDeclarationsAtPosition=s,e.getImplementationsAtPosition=t,e.getTypeDefinitionsAtPosition=i,e.getReferencesAtPosition=o;function C(h,l){return l.uri.scheme===h.uri.scheme?!0:!(0,L.matchesSomeScheme)(l.uri,L.Schemas.walkThroughSnippet,L.Schemas.vscodeChatCodeBlock,L.Schemas.vscodeChatCodeCompareBlock,L.Schemas.vscodeCopilotBackingChatCodeBlock)}async function p(h,l,a,r){const m=a.ordered(h).map(b=>Promise.resolve(r(b,h,l)).then(void 0,v=>{(0,E.onUnexpectedExternalError)(v)})),u=await Promise.all(m);return(0,c.coalesce)(u.flat()).filter(b=>C(h,b))}function n(h,l,a,r){return p(l,a,h,(d,m,u)=>d.provideDefinition(m,u,r))}function s(h,l,a,r){return p(l,a,h,(d,m,u)=>d.provideDeclaration(m,u,r))}function t(h,l,a,r){return p(l,a,h,(d,m,u)=>d.provideImplementation(m,u,r))}function i(h,l,a,r){return p(l,a,h,(d,m,u)=>d.provideTypeDefinition(m,u,r))}function o(h,l,a,r,d){return p(l,a,h,async(m,u,b)=>{const v=(await m.provideReferences(u,b,{includeDeclaration:!0},d))?.filter(S=>C(u,S));if(!r||!v||v.length!==2)return v;const w=(await m.provideReferences(u,b,{includeDeclaration:!1},d))?.filter(S=>C(u,S));return w&&w.length===1?w:v})}async function g(h){const l=await h(),a=new _.ReferencesModel(l,""),r=a.references.map(d=>d.link);return a.dispose(),r}(0,y.registerModelAndPositionCommand)("_executeDefinitionProvider",(h,l,a)=>{const r=h.get(f.ILanguageFeaturesService),d=n(r.definitionProvider,l,a,k.CancellationToken.None);return g(()=>d)}),(0,y.registerModelAndPositionCommand)("_executeTypeDefinitionProvider",(h,l,a)=>{const r=h.get(f.ILanguageFeaturesService),d=i(r.typeDefinitionProvider,l,a,k.CancellationToken.None);return g(()=>d)}),(0,y.registerModelAndPositionCommand)("_executeDeclarationProvider",(h,l,a)=>{const r=h.get(f.ILanguageFeaturesService),d=s(r.declarationProvider,l,a,k.CancellationToken.None);return g(()=>d)}),(0,y.registerModelAndPositionCommand)("_executeReferenceProvider",(h,l,a)=>{const r=h.get(f.ILanguageFeaturesService),d=o(r.referenceProvider,l,a,!1,k.CancellationToken.None);return g(()=>d)}),(0,y.registerModelAndPositionCommand)("_executeImplementationProvider",(h,l,a)=>{const r=h.get(f.ILanguageFeaturesService),d=t(r.implementationProvider,l,a,k.CancellationToken.None);return g(()=>d)})}),define(oe[727],re([1,0,6,2,51,15,35,4,3,12,49,7,31,120,50]),function(ae,e,c,k,E,L,y,f,_,C,p,n,s,t,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ISymbolNavigationService=e.ctxHasSymbols=void 0,e.ctxHasSymbols=new C.RawContextKey("hasSymbols",!1,(0,_.localize)(699,"Whether there are symbol locations that can be navigated via keyboard-only.")),e.ISymbolNavigationService=(0,n.createDecorator)("ISymbolNavigationService");let o=class{constructor(l,a,r,d){this._editorService=a,this._notificationService=r,this._keybindingService=d,this._currentModel=void 0,this._currentIdx=-1,this._ignoreEditorChange=!1,this._ctxHasSymbols=e.ctxHasSymbols.bindTo(l)}reset(){this._ctxHasSymbols.reset(),this._currentState?.dispose(),this._currentMessage?.dispose(),this._currentModel=void 0,this._currentIdx=-1}put(l){const a=l.parent.parent;if(a.references.length<=1){this.reset();return}this._currentModel=a,this._currentIdx=a.references.indexOf(l),this._ctxHasSymbols.set(!0),this._showMessage();const r=new g(this._editorService),d=r.onDidChange(m=>{if(this._ignoreEditorChange)return;const u=this._editorService.getActiveCodeEditor();if(!u)return;const b=u.getModel(),v=u.getPosition();if(!b||!v)return;let w=!1,S=!1;for(const D of a.references)if((0,E.isEqual)(D.uri,b.uri))w=!0,S=S||f.Range.containsPosition(D.range,v);else if(w)break;(!w||!S)&&this.reset()});this._currentState=(0,k.combinedDisposable)(r,d)}revealNext(l){if(!this._currentModel)return Promise.resolve();this._currentIdx+=1,this._currentIdx%=this._currentModel.references.length;const a=this._currentModel.references[this._currentIdx];return this._showMessage(),this._ignoreEditorChange=!0,this._editorService.openCodeEditor({resource:a.uri,options:{selection:f.Range.collapseToStart(a.range),selectionRevealType:3}},l).finally(()=>{this._ignoreEditorChange=!1})}_showMessage(){this._currentMessage?.dispose();const l=this._keybindingService.lookupKeybinding("editor.gotoNextSymbolFromResult"),a=l?(0,_.localize)(700,"Symbol {0} of {1}, {2} for next",this._currentIdx+1,this._currentModel.references.length,l.getLabel()):(0,_.localize)(701,"Symbol {0} of {1}",this._currentIdx+1,this._currentModel.references.length);this._currentMessage=this._notificationService.status(a)}};o=De([he(0,C.IContextKeyService),he(1,y.ICodeEditorService),he(2,i.INotificationService),he(3,s.IKeybindingService)],o),(0,p.registerSingleton)(e.ISymbolNavigationService,o,1),(0,L.registerEditorCommand)(new class extends L.EditorCommand{constructor(){super({id:"editor.gotoNextSymbolFromResult",precondition:e.ctxHasSymbols,kbOpts:{weight:100,primary:70}})}runEditorCommand(h,l){return h.get(e.ISymbolNavigationService).revealNext(l)}}),t.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"editor.gotoNextSymbolFromResult.cancel",weight:100,when:e.ctxHasSymbols,primary:9,handler(h){h.get(e.ISymbolNavigationService).reset()}});let g=class{constructor(l){this._listener=new Map,this._disposables=new k.DisposableStore,this._onDidChange=new c.Emitter,this.onDidChange=this._onDidChange.event,this._disposables.add(l.onCodeEditorRemove(this._onDidRemoveEditor,this)),this._disposables.add(l.onCodeEditorAdd(this._onDidAddEditor,this)),l.listCodeEditors().forEach(this._onDidAddEditor,this)}dispose(){this._disposables.dispose(),this._onDidChange.dispose(),(0,k.dispose)(this._listener.values())}_onDidAddEditor(l){this._listener.set(l,(0,k.combinedDisposable)(l.onDidChangeCursorPosition(a=>this._onDidChange.fire({editor:l})),l.onDidChangeModelContent(a=>this._onDidChange.fire({editor:l}))))}_onDidRemoveEditor(l){this._listener.get(l)?.dispose(),this._listener.delete(l)}};g=De([he(0,y.ICodeEditorService)],g)}),define(oe[405],re([1,0,14,18,8,15,17]),function(ae,e,c,k,E,L,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HoverProviderResult=void 0,e.getHoverProviderResultsAsAsyncIterable=C,e.getHoversPromise=p;class f{constructor(t,i,o){this.provider=t,this.hover=i,this.ordinal=o}}e.HoverProviderResult=f;async function _(s,t,i,o,g){const h=await Promise.resolve(s.provideHover(i,o,g)).catch(E.onUnexpectedExternalError);if(!(!h||!n(h)))return new f(s,h,t)}function C(s,t,i,o){const h=s.ordered(t).map((l,a)=>_(l,a,t,i,o));return c.AsyncIterableObject.fromPromises(h).coalesce()}function p(s,t,i,o){return C(s,t,i,o).map(g=>g.hover).toPromise()}(0,L.registerModelAndPositionCommand)("_executeHoverProvider",(s,t,i)=>{const o=s.get(y.ILanguageFeaturesService);return p(o.hoverProvider,t,i,k.CancellationToken.None)});function n(s){const t=typeof s.range<"u",i=typeof s.contents<"u"&&s.contents&&s.contents.length>0;return t&&i}}),define(oe[728],re([1,0,2,11,15,183,4,20,34,44,354,3,63,252,705,94]),function(ae,e,c,k,E,L,y,f,_,C,p,n,s,t,i,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IndentationToTabsCommand=e.IndentationToSpacesCommand=e.AutoIndentOnPaste=e.AutoIndentOnPasteCommand=e.ReindentSelectedLinesAction=e.ReindentLinesAction=e.DetectIndentation=e.ChangeTabDisplaySize=e.IndentUsingSpaces=e.IndentUsingTabs=e.ChangeIndentationSizeAction=e.IndentationToTabsAction=e.IndentationToSpacesAction=void 0;class g extends E.EditorAction{static{this.ID="editor.action.indentationToSpaces"}constructor(){super({id:g.ID,label:n.localize(638,"Convert Indentation to Spaces"),alias:"Convert Indentation to Spaces",precondition:f.EditorContextKeys.writable,metadata:{description:n.localize2(650,"Convert the tab indentation to spaces.")}})}run(A,R){const N=R.getModel();if(!N)return;const O=N.getOptions(),x=R.getSelection();if(!x)return;const F=new I(x,O.tabSize);R.pushUndoStop(),R.executeCommands(this.id,[F]),R.pushUndoStop(),N.updateOptions({insertSpaces:!0})}}e.IndentationToSpacesAction=g;class h extends E.EditorAction{static{this.ID="editor.action.indentationToTabs"}constructor(){super({id:h.ID,label:n.localize(639,"Convert Indentation to Tabs"),alias:"Convert Indentation to Tabs",precondition:f.EditorContextKeys.writable,metadata:{description:n.localize2(651,"Convert the spaces indentation to tabs.")}})}run(A,R){const N=R.getModel();if(!N)return;const O=N.getOptions(),x=R.getSelection();if(!x)return;const F=new T(x,O.tabSize);R.pushUndoStop(),R.executeCommands(this.id,[F]),R.pushUndoStop(),N.updateOptions({insertSpaces:!1})}}e.IndentationToTabsAction=h;class l extends E.EditorAction{constructor(A,R,N){super(N),this.insertSpaces=A,this.displaySizeOnly=R}run(A,R){const N=A.get(s.IQuickInputService),O=A.get(C.IModelService),x=R.getModel();if(!x)return;const F=O.getCreationOptions(x.getLanguageId(),x.uri,x.isForSimpleWidget),W=x.getOptions(),V=[1,2,3,4,5,6,7,8].map(H=>({id:H.toString(),label:H.toString(),description:H===F.tabSize&&H===W.tabSize?n.localize(640,"Configured Tab Size"):H===F.tabSize?n.localize(641,"Default Tab Size"):H===W.tabSize?n.localize(642,"Current Tab Size"):void 0})),q=Math.min(x.getOptions().tabSize-1,7);setTimeout(()=>{N.pick(V,{placeHolder:n.localize(643,"Select Tab Size for Current File"),activeItem:V[q]}).then(H=>{if(H&&x&&!x.isDisposed()){const K=parseInt(H.label,10);this.displaySizeOnly?x.updateOptions({tabSize:K}):x.updateOptions({tabSize:K,indentSize:K,insertSpaces:this.insertSpaces})}})},50)}}e.ChangeIndentationSizeAction=l;class a extends l{static{this.ID="editor.action.indentUsingTabs"}constructor(){super(!1,!1,{id:a.ID,label:n.localize(644,"Indent Using Tabs"),alias:"Indent Using Tabs",precondition:void 0,metadata:{description:n.localize2(652,"Use indentation with tabs.")}})}}e.IndentUsingTabs=a;class r extends l{static{this.ID="editor.action.indentUsingSpaces"}constructor(){super(!0,!1,{id:r.ID,label:n.localize(645,"Indent Using Spaces"),alias:"Indent Using Spaces",precondition:void 0,metadata:{description:n.localize2(653,"Use indentation with spaces.")}})}}e.IndentUsingSpaces=r;class d extends l{static{this.ID="editor.action.changeTabDisplaySize"}constructor(){super(!0,!0,{id:d.ID,label:n.localize(646,"Change Tab Display Size"),alias:"Change Tab Display Size",precondition:void 0,metadata:{description:n.localize2(654,"Change the space size equivalent of the tab.")}})}}e.ChangeTabDisplaySize=d;class m extends E.EditorAction{static{this.ID="editor.action.detectIndentation"}constructor(){super({id:m.ID,label:n.localize(647,"Detect Indentation from Content"),alias:"Detect Indentation from Content",precondition:void 0,metadata:{description:n.localize2(655,"Detect the indentation from content.")}})}run(A,R){const N=A.get(C.IModelService),O=R.getModel();if(!O)return;const x=N.getCreationOptions(O.getLanguageId(),O.uri,O.isForSimpleWidget);O.detectIndentation(x.insertSpaces,x.tabSize)}}e.DetectIndentation=m;class u extends E.EditorAction{constructor(){super({id:"editor.action.reindentlines",label:n.localize(648,"Reindent Lines"),alias:"Reindent Lines",precondition:f.EditorContextKeys.writable,metadata:{description:n.localize2(656,"Reindent the lines of the editor.")}})}run(A,R){const N=A.get(_.ILanguageConfigurationService),O=R.getModel();if(!O)return;const x=(0,i.getReindentEditOperations)(O,N,1,O.getLineCount());x.length>0&&(R.pushUndoStop(),R.executeEdits(this.id,x),R.pushUndoStop())}}e.ReindentLinesAction=u;class b extends E.EditorAction{constructor(){super({id:"editor.action.reindentselectedlines",label:n.localize(649,"Reindent Selected Lines"),alias:"Reindent Selected Lines",precondition:f.EditorContextKeys.writable,metadata:{description:n.localize2(657,"Reindent the selected lines of the editor.")}})}run(A,R){const N=A.get(_.ILanguageConfigurationService),O=R.getModel();if(!O)return;const x=R.getSelections();if(x===null)return;const F=[];for(const W of x){let V=W.startLineNumber,q=W.endLineNumber;if(V!==q&&W.endColumn===1&&q--,V===1){if(V===q)continue}else V--;const H=(0,i.getReindentEditOperations)(O,N,V,q);F.push(...H)}F.length>0&&(R.pushUndoStop(),R.executeEdits(this.id,F),R.pushUndoStop())}}e.ReindentSelectedLinesAction=b;class v{constructor(A,R){this._initialSelection=R,this._edits=[],this._selectionId=null;for(const N of A)N.range&&typeof N.text=="string"&&this._edits.push(N)}getEditOperations(A,R){for(const O of this._edits)R.addEditOperation(y.Range.lift(O.range),O.text);let N=!1;Array.isArray(this._edits)&&this._edits.length===1&&this._initialSelection.isEmpty()&&(this._edits[0].range.startColumn===this._initialSelection.endColumn&&this._edits[0].range.startLineNumber===this._initialSelection.endLineNumber?(N=!0,this._selectionId=R.trackSelection(this._initialSelection,!0)):this._edits[0].range.endColumn===this._initialSelection.startColumn&&this._edits[0].range.endLineNumber===this._initialSelection.startLineNumber&&(N=!0,this._selectionId=R.trackSelection(this._initialSelection,!1))),N||(this._selectionId=R.trackSelection(this._initialSelection))}computeCursorState(A,R){return R.getTrackedSelection(this._selectionId)}}e.AutoIndentOnPasteCommand=v;let w=class{static{this.ID="editor.contrib.autoIndentOnPaste"}constructor(A,R){this.editor=A,this._languageConfigurationService=R,this.callOnDispose=new c.DisposableStore,this.callOnModel=new c.DisposableStore,this.callOnDispose.add(A.onDidChangeConfiguration(()=>this.update())),this.callOnDispose.add(A.onDidChangeModel(()=>this.update())),this.callOnDispose.add(A.onDidChangeModelLanguage(()=>this.update()))}update(){this.callOnModel.clear(),!(this.editor.getOption(12)<4||this.editor.getOption(55))&&this.editor.hasModel()&&this.callOnModel.add(this.editor.onDidPaste(({range:A})=>{this.trigger(A)}))}trigger(A){const R=this.editor.getSelections();if(R===null||R.length>1)return;const N=this.editor.getModel();if(!N||this.rangeContainsOnlyWhitespaceCharacters(N,A)||S(N,A)||!N.tokenization.isCheapToTokenize(A.getStartPosition().lineNumber))return;const x=this.editor.getOption(12),{tabSize:F,indentSize:W,insertSpaces:V}=N.getOptions(),q=[],H={shiftIndent:X=>L.ShiftCommand.shiftIndent(X,X.length+1,F,W,V),unshiftIndent:X=>L.ShiftCommand.unshiftIndent(X,X.length+1,F,W,V)};let K=A.startLineNumber;for(;K<=A.endLineNumber;){if(this.shouldIgnoreLine(N,K)){K++;continue}break}if(K>A.endLineNumber)return;let G=N.getLineContent(K);if(!/\S/.test(G.substring(0,A.startColumn-1))){const X=(0,t.getGoodIndentForLine)(x,N,N.getLanguageId(),K,H,this._languageConfigurationService);if(X!==null){const Z=k.getLeadingWhitespace(G),j=p.getSpaceCnt(X,F),P=p.getSpaceCnt(Z,F);if(j!==P){const te=p.generateIndent(j,F,V);q.push({range:new y.Range(K,1,K,Z.length+1),text:te}),G=te+G.substring(Z.length)}else{const te=(0,t.getIndentMetadata)(N,K,this._languageConfigurationService);if(te===0||te===8)return}}}const Y=K;for(;K<A.endLineNumber;){if(!/\S/.test(N.getLineContent(K+1))){K++;continue}break}if(K!==A.endLineNumber){const X={tokenization:{getLineTokens:j=>N.tokenization.getLineTokens(j),getLanguageId:()=>N.getLanguageId(),getLanguageIdAtPosition:(j,P)=>N.getLanguageIdAtPosition(j,P)},getLineContent:j=>j===Y?G:N.getLineContent(j)},Z=(0,t.getGoodIndentForLine)(x,X,N.getLanguageId(),K+1,H,this._languageConfigurationService);if(Z!==null){const j=p.getSpaceCnt(Z,F),P=p.getSpaceCnt(k.getLeadingWhitespace(N.getLineContent(K+1)),F);if(j!==P){const te=j-P;for(let se=K+1;se<=A.endLineNumber;se++){const ue=N.getLineContent(se),ge=k.getLeadingWhitespace(ue),ce=p.getSpaceCnt(ge,F)+te,ie=p.generateIndent(ce,F,V);ie!==ge&&q.push({range:new y.Range(se,1,se,ge.length+1),text:ie})}}}}if(q.length>0){this.editor.pushUndoStop();const X=new v(q,this.editor.getSelection());this.editor.executeCommand("autoIndentOnPaste",X),this.editor.pushUndoStop()}}rangeContainsOnlyWhitespaceCharacters(A,R){const N=x=>x.trim().length===0;let O=!0;if(R.startLineNumber===R.endLineNumber){const F=A.getLineContent(R.startLineNumber).substring(R.startColumn-1,R.endColumn-1);O=N(F)}else for(let x=R.startLineNumber;x<=R.endLineNumber;x++){const F=A.getLineContent(x);if(x===R.startLineNumber){const W=F.substring(R.startColumn-1);O=N(W)}else if(x===R.endLineNumber){const W=F.substring(0,R.endColumn-1);O=N(W)}else O=A.getLineFirstNonWhitespaceColumn(x)===0;if(!O)break}return O}shouldIgnoreLine(A,R){A.tokenization.forceTokenization(R);const N=A.getLineFirstNonWhitespaceColumn(R);if(N===0)return!0;const O=A.tokenization.getLineTokens(R);if(O.getCount()>0){const x=O.findTokenIndexAtOffset(N);if(x>=0&&O.getStandardTokenType(x)===1)return!0}return!1}dispose(){this.callOnDispose.dispose(),this.callOnModel.dispose()}};e.AutoIndentOnPaste=w,e.AutoIndentOnPaste=w=De([he(1,_.ILanguageConfigurationService)],w);function S(M,A){const R=N=>(0,o.getStandardTokenTypeAtPosition)(M,N)===2;return R(A.getStartPosition())||R(A.getEndPosition())}function D(M,A,R,N){if(M.getLineCount()===1&&M.getLineMaxColumn(1)===1)return;let O="";for(let F=0;F<R;F++)O+=" ";const x=new RegExp(O,"gi");for(let F=1,W=M.getLineCount();F<=W;F++){let V=M.getLineFirstNonWhitespaceColumn(F);if(V===0&&(V=M.getLineMaxColumn(F)),V===1)continue;const q=new y.Range(F,1,F,V),H=M.getValueInRange(q),K=N?H.replace(/\t/ig,O):H.replace(x," ");A.addEditOperation(q,K)}}class I{constructor(A,R){this.selection=A,this.tabSize=R,this.selectionId=null}getEditOperations(A,R){this.selectionId=R.trackSelection(this.selection),D(A,R,this.tabSize,!0)}computeCursorState(A,R){return R.getTrackedSelection(this.selectionId)}}e.IndentationToSpacesCommand=I;class T{constructor(A,R){this.selection=A,this.tabSize=R,this.selectionId=null}getEditOperations(A,R){this.selectionId=R.trackSelection(this.selection),D(A,R,this.tabSize,!1)}computeCursorState(A,R){return R.getTrackedSelection(this.selectionId)}}e.IndentationToTabsCommand=T,(0,E.registerEditorContribution)(w.ID,w,2),(0,E.registerEditorAction)(g),(0,E.registerEditorAction)(h),(0,E.registerEditorAction)(a),(0,E.registerEditorAction)(r),(0,E.registerEditorAction)(d),(0,E.registerEditorAction)(m),(0,E.registerEditorAction)(u),(0,E.registerEditorAction)(b)}),define(oe[729],re([1,0,15,246,20,3]),function(ae,e,c,k,E,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExpandLineSelectionAction=void 0;class y extends c.EditorAction{constructor(){super({id:"expandLineSelection",label:L.localize(599,"Expand Line Selection"),alias:"Expand Line Selection",precondition:void 0,kbOpts:{weight:0,kbExpr:E.EditorContextKeys.textInputFocus,primary:2090}})}run(_,C,p){if(p=p||{},!C.hasModel())return;const n=C._getViewModel();n.model.pushStackElement(),n.setCursorStates(p.source,3,k.CursorMoveCommands.expandLineSelection(n,n.getCursorStates())),n.revealAllCursors(p.source,!0)}}e.ExpandLineSelectionAction=y,(0,c.registerEditorAction)(y)}),define(oe[730],re([1,0,72,212,15,145,564,275,211,76,9,4,23,20,643,707,644,3,29,34,27]),function(ae,e,c,k,E,L,y,f,_,C,p,n,s,t,i,o,g,h,l,a,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.KebabCaseAction=e.PascalCaseAction=e.CamelCaseAction=e.SnakeCaseAction=e.TitleCaseAction=e.LowerCaseAction=e.UpperCaseAction=e.AbstractCaseAction=e.TransposeAction=e.JoinLinesAction=e.DeleteAllRightAction=e.DeleteAllLeftAction=e.AbstractDeleteAllToBoundaryAction=e.InsertLineAfterAction=e.InsertLineBeforeAction=e.IndentLinesAction=e.DeleteLinesAction=e.TrimTrailingWhitespaceAction=e.DeleteDuplicateLinesAction=e.SortLinesDescendingAction=e.SortLinesAscendingAction=e.AbstractSortLinesAction=e.DuplicateSelectionAction=void 0;class d extends E.EditorAction{constructor(pe,ce){super(ce),this.down=pe}run(pe,ce){if(!ce.hasModel())return;const ie=ce.getSelections().map((B,U)=>({selection:B,index:U,ignore:!1}));ie.sort((B,U)=>n.Range.compareRangesUsingStarts(B.selection,U.selection));let ne=ie[0];for(let B=1;B<ie.length;B++){const U=ie[B];ne.selection.endLineNumber===U.selection.startLineNumber&&(ne.index<U.index?U.ignore=!0:(ne.ignore=!0,ne=U))}const J=[];for(const B of ie)J.push(new i.CopyLinesCommand(B.selection,this.down,B.ignore));ce.pushUndoStop(),ce.executeCommands(this.id,J),ce.pushUndoStop()}}class m extends d{constructor(){super(!1,{id:"editor.action.copyLinesUpAction",label:h.localize(569,"Copy Line Up"),alias:"Copy Line Up",precondition:t.EditorContextKeys.writable,kbOpts:{kbExpr:t.EditorContextKeys.editorTextFocus,primary:1552,linux:{primary:3600},weight:100},menuOpts:{menuId:l.MenuId.MenubarSelectionMenu,group:"2_line",title:h.localize(570,"&&Copy Line Up"),order:1}})}}class u extends d{constructor(){super(!0,{id:"editor.action.copyLinesDownAction",label:h.localize(571,"Copy Line Down"),alias:"Copy Line Down",precondition:t.EditorContextKeys.writable,kbOpts:{kbExpr:t.EditorContextKeys.editorTextFocus,primary:1554,linux:{primary:3602},weight:100},menuOpts:{menuId:l.MenuId.MenubarSelectionMenu,group:"2_line",title:h.localize(572,"Co&&py Line Down"),order:2}})}}class b extends E.EditorAction{constructor(){super({id:"editor.action.duplicateSelection",label:h.localize(573,"Duplicate Selection"),alias:"Duplicate Selection",precondition:t.EditorContextKeys.writable,menuOpts:{menuId:l.MenuId.MenubarSelectionMenu,group:"2_line",title:h.localize(574,"&&Duplicate Selection"),order:5}})}run(pe,ce,ie){if(!ce.hasModel())return;const ne=[],J=ce.getSelections(),B=ce.getModel();for(const U of J)if(U.isEmpty())ne.push(new i.CopyLinesCommand(U,!0));else{const z=new s.Selection(U.endLineNumber,U.endColumn,U.endLineNumber,U.endColumn);ne.push(new L.ReplaceCommandThatSelectsText(z,B.getValueInRange(U)))}ce.pushUndoStop(),ce.executeCommands(this.id,ne),ce.pushUndoStop()}}e.DuplicateSelectionAction=b;class v extends E.EditorAction{constructor(pe,ce){super(ce),this.down=pe}run(pe,ce){const ie=pe.get(a.ILanguageConfigurationService),ne=[],J=ce.getSelections()||[],B=ce.getOption(12);for(const U of J)ne.push(new o.MoveLinesCommand(U,this.down,B,ie));ce.pushUndoStop(),ce.executeCommands(this.id,ne),ce.pushUndoStop()}}class w extends v{constructor(){super(!1,{id:"editor.action.moveLinesUpAction",label:h.localize(575,"Move Line Up"),alias:"Move Line Up",precondition:t.EditorContextKeys.writable,kbOpts:{kbExpr:t.EditorContextKeys.editorTextFocus,primary:528,linux:{primary:528},weight:100},menuOpts:{menuId:l.MenuId.MenubarSelectionMenu,group:"2_line",title:h.localize(576,"Mo&&ve Line Up"),order:3}})}}class S extends v{constructor(){super(!0,{id:"editor.action.moveLinesDownAction",label:h.localize(577,"Move Line Down"),alias:"Move Line Down",precondition:t.EditorContextKeys.writable,kbOpts:{kbExpr:t.EditorContextKeys.editorTextFocus,primary:530,linux:{primary:530},weight:100},menuOpts:{menuId:l.MenuId.MenubarSelectionMenu,group:"2_line",title:h.localize(578,"Move &&Line Down"),order:4}})}}class D extends E.EditorAction{constructor(pe,ce){super(ce),this.descending=pe}run(pe,ce){if(!ce.hasModel())return;const ie=ce.getModel();let ne=ce.getSelections();ne.length===1&&ne[0].isEmpty()&&(ne=[new s.Selection(1,1,ie.getLineCount(),ie.getLineMaxColumn(ie.getLineCount()))]);for(const B of ne)if(!g.SortLinesCommand.canRun(ce.getModel(),B,this.descending))return;const J=[];for(let B=0,U=ne.length;B<U;B++)J[B]=new g.SortLinesCommand(ne[B],this.descending);ce.pushUndoStop(),ce.executeCommands(this.id,J),ce.pushUndoStop()}}e.AbstractSortLinesAction=D;class I extends D{constructor(){super(!1,{id:"editor.action.sortLinesAscending",label:h.localize(579,"Sort Lines Ascending"),alias:"Sort Lines Ascending",precondition:t.EditorContextKeys.writable})}}e.SortLinesAscendingAction=I;class T extends D{constructor(){super(!0,{id:"editor.action.sortLinesDescending",label:h.localize(580,"Sort Lines Descending"),alias:"Sort Lines Descending",precondition:t.EditorContextKeys.writable})}}e.SortLinesDescendingAction=T;class M extends E.EditorAction{constructor(){super({id:"editor.action.removeDuplicateLines",label:h.localize(581,"Delete Duplicate Lines"),alias:"Delete Duplicate Lines",precondition:t.EditorContextKeys.writable})}run(pe,ce){if(!ce.hasModel())return;const ie=ce.getModel();if(ie.getLineCount()===1&&ie.getLineMaxColumn(1)===1)return;const ne=[],J=[];let B=0,U=!0,z=ce.getSelections();z.length===1&&z[0].isEmpty()&&(z=[new s.Selection(1,1,ie.getLineCount(),ie.getLineMaxColumn(ie.getLineCount()))],U=!1);for(const $ of z){const Q=new Set,ee=[];for(let be=$.startLineNumber;be<=$.endLineNumber;be++){const ve=ie.getLineContent(be);Q.has(ve)||(ee.push(ve),Q.add(ve))}const le=new s.Selection($.startLineNumber,1,$.endLineNumber,ie.getLineMaxColumn($.endLineNumber)),de=$.startLineNumber-B,me=new s.Selection(de,1,de+ee.length-1,ee[ee.length-1].length);ne.push(C.EditOperation.replace(le,ee.join(`
|
|
650
650
|
`))),J.push(me),B+=$.endLineNumber-$.startLineNumber+1-ee.length}ce.pushUndoStop(),ce.executeEdits(this.id,ne,U?J:void 0),ce.pushUndoStop()}}e.DeleteDuplicateLinesAction=M;class A extends E.EditorAction{static{this.ID="editor.action.trimTrailingWhitespace"}constructor(){super({id:A.ID,label:h.localize(582,"Trim Trailing Whitespace"),alias:"Trim Trailing Whitespace",precondition:t.EditorContextKeys.writable,kbOpts:{kbExpr:t.EditorContextKeys.editorTextFocus,primary:(0,c.KeyChord)(2089,2102),weight:100}})}run(pe,ce,ie){let ne=[];ie.reason==="auto-save"&&(ne=(ce.getSelections()||[]).map(Q=>new p.Position(Q.positionLineNumber,Q.positionColumn)));const J=ce.getSelection();if(J===null)return;const B=pe.get(r.IConfigurationService),U=ce.getModel(),z=B.getValue("files.trimTrailingWhitespaceInRegexAndStrings",{overrideIdentifier:U?.getLanguageId(),resource:U?.uri}),$=new y.TrimTrailingWhitespaceCommand(J,ne,z);ce.pushUndoStop(),ce.executeCommands(this.id,[$]),ce.pushUndoStop()}}e.TrimTrailingWhitespaceAction=A;class R extends E.EditorAction{constructor(){super({id:"editor.action.deleteLines",label:h.localize(583,"Delete Line"),alias:"Delete Line",precondition:t.EditorContextKeys.writable,kbOpts:{kbExpr:t.EditorContextKeys.textInputFocus,primary:3113,weight:100}})}run(pe,ce){if(!ce.hasModel())return;const ie=this._getLinesToRemove(ce),ne=ce.getModel();if(ne.getLineCount()===1&&ne.getLineMaxColumn(1)===1)return;let J=0;const B=[],U=[];for(let z=0,$=ie.length;z<$;z++){const Q=ie[z];let ee=Q.startLineNumber,le=Q.endLineNumber,de=1,me=ne.getLineMaxColumn(le);le<ne.getLineCount()?(le+=1,me=1):ee>1&&(ee-=1,de=ne.getLineMaxColumn(ee)),B.push(C.EditOperation.replace(new s.Selection(ee,de,le,me),"")),U.push(new s.Selection(ee-J,Q.positionColumn,ee-J,Q.positionColumn)),J+=Q.endLineNumber-Q.startLineNumber+1}ce.pushUndoStop(),ce.executeEdits(this.id,B,U),ce.pushUndoStop()}_getLinesToRemove(pe){const ce=pe.getSelections().map(J=>{let B=J.endLineNumber;return J.startLineNumber<J.endLineNumber&&J.endColumn===1&&(B-=1),{startLineNumber:J.startLineNumber,selectionStartColumn:J.selectionStartColumn,endLineNumber:B,positionColumn:J.positionColumn}});ce.sort((J,B)=>J.startLineNumber===B.startLineNumber?J.endLineNumber-B.endLineNumber:J.startLineNumber-B.startLineNumber);const ie=[];let ne=ce[0];for(let J=1;J<ce.length;J++)ne.endLineNumber+1>=ce[J].startLineNumber?ne.endLineNumber=ce[J].endLineNumber:(ie.push(ne),ne=ce[J]);return ie.push(ne),ie}}e.DeleteLinesAction=R;class N extends E.EditorAction{constructor(){super({id:"editor.action.indentLines",label:h.localize(584,"Indent Line"),alias:"Indent Line",precondition:t.EditorContextKeys.writable,kbOpts:{kbExpr:t.EditorContextKeys.editorTextFocus,primary:2142,weight:100}})}run(pe,ce){const ie=ce._getViewModel();ie&&(ce.pushUndoStop(),ce.executeCommands(this.id,f.TypeOperations.indent(ie.cursorConfig,ce.getModel(),ce.getSelections())),ce.pushUndoStop())}}e.IndentLinesAction=N;class O extends E.EditorAction{constructor(){super({id:"editor.action.outdentLines",label:h.localize(585,"Outdent Line"),alias:"Outdent Line",precondition:t.EditorContextKeys.writable,kbOpts:{kbExpr:t.EditorContextKeys.editorTextFocus,primary:2140,weight:100}})}run(pe,ce){k.CoreEditingCommands.Outdent.runEditorCommand(pe,ce,null)}}class x extends E.EditorAction{constructor(){super({id:"editor.action.insertLineBefore",label:h.localize(586,"Insert Line Above"),alias:"Insert Line Above",precondition:t.EditorContextKeys.writable,kbOpts:{kbExpr:t.EditorContextKeys.editorTextFocus,primary:3075,weight:100}})}run(pe,ce){const ie=ce._getViewModel();ie&&(ce.pushUndoStop(),ce.executeCommands(this.id,_.EnterOperation.lineInsertBefore(ie.cursorConfig,ce.getModel(),ce.getSelections())))}}e.InsertLineBeforeAction=x;class F extends E.EditorAction{constructor(){super({id:"editor.action.insertLineAfter",label:h.localize(587,"Insert Line Below"),alias:"Insert Line Below",precondition:t.EditorContextKeys.writable,kbOpts:{kbExpr:t.EditorContextKeys.editorTextFocus,primary:2051,weight:100}})}run(pe,ce){const ie=ce._getViewModel();ie&&(ce.pushUndoStop(),ce.executeCommands(this.id,_.EnterOperation.lineInsertAfter(ie.cursorConfig,ce.getModel(),ce.getSelections())))}}e.InsertLineAfterAction=F;class W extends E.EditorAction{run(pe,ce){if(!ce.hasModel())return;const ie=ce.getSelection(),ne=this._getRangesToDelete(ce),J=[];for(let z=0,$=ne.length-1;z<$;z++){const Q=ne[z],ee=ne[z+1];n.Range.intersectRanges(Q,ee)===null?J.push(Q):ne[z+1]=n.Range.plusRange(Q,ee)}J.push(ne[ne.length-1]);const B=this._getEndCursorState(ie,J),U=J.map(z=>C.EditOperation.replace(z,""));ce.pushUndoStop(),ce.executeEdits(this.id,U,B),ce.pushUndoStop()}}e.AbstractDeleteAllToBoundaryAction=W;class V extends W{constructor(){super({id:"deleteAllLeft",label:h.localize(588,"Delete All Left"),alias:"Delete All Left",precondition:t.EditorContextKeys.writable,kbOpts:{kbExpr:t.EditorContextKeys.textInputFocus,primary:0,mac:{primary:2049},weight:100}})}_getEndCursorState(pe,ce){let ie=null;const ne=[];let J=0;return ce.forEach(B=>{let U;if(B.endColumn===1&&J>0){const z=B.startLineNumber-J;U=new s.Selection(z,B.startColumn,z,B.startColumn)}else U=new s.Selection(B.startLineNumber,B.startColumn,B.startLineNumber,B.startColumn);J+=B.endLineNumber-B.startLineNumber,B.intersectRanges(pe)?ie=U:ne.push(U)}),ie&&ne.unshift(ie),ne}_getRangesToDelete(pe){const ce=pe.getSelections();if(ce===null)return[];let ie=ce;const ne=pe.getModel();return ne===null?[]:(ie.sort(n.Range.compareRangesUsingStarts),ie=ie.map(J=>{if(J.isEmpty())if(J.startColumn===1){const B=Math.max(1,J.startLineNumber-1),U=J.startLineNumber===1?1:ne.getLineLength(B)+1;return new n.Range(B,U,J.startLineNumber,1)}else return new n.Range(J.startLineNumber,1,J.startLineNumber,J.startColumn);else return new n.Range(J.startLineNumber,1,J.endLineNumber,J.endColumn)}),ie)}}e.DeleteAllLeftAction=V;class q extends W{constructor(){super({id:"deleteAllRight",label:h.localize(589,"Delete All Right"),alias:"Delete All Right",precondition:t.EditorContextKeys.writable,kbOpts:{kbExpr:t.EditorContextKeys.textInputFocus,primary:0,mac:{primary:297,secondary:[2068]},weight:100}})}_getEndCursorState(pe,ce){let ie=null;const ne=[];for(let J=0,B=ce.length,U=0;J<B;J++){const z=ce[J],$=new s.Selection(z.startLineNumber-U,z.startColumn,z.startLineNumber-U,z.startColumn);z.intersectRanges(pe)?ie=$:ne.push($)}return ie&&ne.unshift(ie),ne}_getRangesToDelete(pe){const ce=pe.getModel();if(ce===null)return[];const ie=pe.getSelections();if(ie===null)return[];const ne=ie.map(J=>{if(J.isEmpty()){const B=ce.getLineMaxColumn(J.startLineNumber);return J.startColumn===B?new n.Range(J.startLineNumber,J.startColumn,J.startLineNumber+1,1):new n.Range(J.startLineNumber,J.startColumn,J.startLineNumber,B)}return J});return ne.sort(n.Range.compareRangesUsingStarts),ne}}e.DeleteAllRightAction=q;class H extends E.EditorAction{constructor(){super({id:"editor.action.joinLines",label:h.localize(590,"Join Lines"),alias:"Join Lines",precondition:t.EditorContextKeys.writable,kbOpts:{kbExpr:t.EditorContextKeys.editorTextFocus,primary:0,mac:{primary:296},weight:100}})}run(pe,ce){const ie=ce.getSelections();if(ie===null)return;let ne=ce.getSelection();if(ne===null)return;ie.sort(n.Range.compareRangesUsingStarts);const J=[],B=ie.reduce((le,de)=>le.isEmpty()?le.endLineNumber===de.startLineNumber?(ne.equalsSelection(le)&&(ne=de),de):de.startLineNumber>le.endLineNumber+1?(J.push(le),de):new s.Selection(le.startLineNumber,le.startColumn,de.endLineNumber,de.endColumn):de.startLineNumber>le.endLineNumber?(J.push(le),de):new s.Selection(le.startLineNumber,le.startColumn,de.endLineNumber,de.endColumn));J.push(B);const U=ce.getModel();if(U===null)return;const z=[],$=[];let Q=ne,ee=0;for(let le=0,de=J.length;le<de;le++){const me=J[le],be=me.startLineNumber,ve=1;let Le=0,Se,ye;const Ee=U.getLineLength(me.endLineNumber)-me.endColumn;if(me.isEmpty()||me.startLineNumber===me.endLineNumber){const Pe=me.getStartPosition();Pe.lineNumber<U.getLineCount()?(Se=be+1,ye=U.getLineMaxColumn(Se)):(Se=Pe.lineNumber,ye=U.getLineMaxColumn(Pe.lineNumber))}else Se=me.endLineNumber,ye=U.getLineMaxColumn(Se);let ke=U.getLineContent(be);for(let Pe=be+1;Pe<=Se;Pe++){const Fe=U.getLineContent(Pe),je=U.getLineFirstNonWhitespaceColumn(Pe);if(je>=1){let Te=!0;ke===""&&(Te=!1),Te&&(ke.charAt(ke.length-1)===" "||ke.charAt(ke.length-1)===" ")&&(Te=!1,ke=ke.replace(/[\s\uFEFF\xA0]+$/g," "));const Ne=Fe.substr(je-1);ke+=(Te?" ":"")+Ne,Te?Le=Ne.length+1:Le=Ne.length}else Le=0}const Re=new n.Range(be,ve,Se,ye);if(!Re.isEmpty()){let Pe;me.isEmpty()?(z.push(C.EditOperation.replace(Re,ke)),Pe=new s.Selection(Re.startLineNumber-ee,ke.length-Le+1,be-ee,ke.length-Le+1)):me.startLineNumber===me.endLineNumber?(z.push(C.EditOperation.replace(Re,ke)),Pe=new s.Selection(me.startLineNumber-ee,me.startColumn,me.endLineNumber-ee,me.endColumn)):(z.push(C.EditOperation.replace(Re,ke)),Pe=new s.Selection(me.startLineNumber-ee,me.startColumn,me.startLineNumber-ee,ke.length-Ee)),n.Range.intersectRanges(Re,ne)!==null?Q=Pe:$.push(Pe)}ee+=Re.endLineNumber-Re.startLineNumber}$.unshift(Q),ce.pushUndoStop(),ce.executeEdits(this.id,z,$),ce.pushUndoStop()}}e.JoinLinesAction=H;class K extends E.EditorAction{constructor(){super({id:"editor.action.transpose",label:h.localize(591,"Transpose Characters around the Cursor"),alias:"Transpose Characters around the Cursor",precondition:t.EditorContextKeys.writable})}run(pe,ce){const ie=ce.getSelections();if(ie===null)return;const ne=ce.getModel();if(ne===null)return;const J=[];for(let B=0,U=ie.length;B<U;B++){const z=ie[B];if(!z.isEmpty())continue;const $=z.getStartPosition(),Q=ne.getLineMaxColumn($.lineNumber);if($.column>=Q){if($.lineNumber===ne.getLineCount())continue;const ee=new n.Range($.lineNumber,Math.max(1,$.column-1),$.lineNumber+1,1),le=ne.getValueInRange(ee).split("").reverse().join("");J.push(new L.ReplaceCommand(new s.Selection($.lineNumber,Math.max(1,$.column-1),$.lineNumber+1,1),le))}else{const ee=new n.Range($.lineNumber,Math.max(1,$.column-1),$.lineNumber,$.column+1),le=ne.getValueInRange(ee).split("").reverse().join("");J.push(new L.ReplaceCommandThatPreservesSelection(ee,le,new s.Selection($.lineNumber,$.column+1,$.lineNumber,$.column+1)))}}ce.pushUndoStop(),ce.executeCommands(this.id,J),ce.pushUndoStop()}}e.TransposeAction=K;class G extends E.EditorAction{run(pe,ce){const ie=ce.getSelections();if(ie===null)return;const ne=ce.getModel();if(ne===null)return;const J=ce.getOption(132),B=[];for(const U of ie)if(U.isEmpty()){const z=U.getStartPosition(),$=ce.getConfiguredWordAtPosition(z);if(!$)continue;const Q=new n.Range(z.lineNumber,$.startColumn,z.lineNumber,$.endColumn),ee=ne.getValueInRange(Q);B.push(C.EditOperation.replace(Q,this._modifyText(ee,J)))}else{const z=ne.getValueInRange(U);B.push(C.EditOperation.replace(U,this._modifyText(z,J)))}ce.pushUndoStop(),ce.executeEdits(this.id,B),ce.pushUndoStop()}}e.AbstractCaseAction=G;class Y extends G{constructor(){super({id:"editor.action.transformToUppercase",label:h.localize(592,"Transform to Uppercase"),alias:"Transform to Uppercase",precondition:t.EditorContextKeys.writable})}_modifyText(pe,ce){return pe.toLocaleUpperCase()}}e.UpperCaseAction=Y;class X extends G{constructor(){super({id:"editor.action.transformToLowercase",label:h.localize(593,"Transform to Lowercase"),alias:"Transform to Lowercase",precondition:t.EditorContextKeys.writable})}_modifyText(pe,ce){return pe.toLocaleLowerCase()}}e.LowerCaseAction=X;class Z{constructor(pe,ce){this._pattern=pe,this._flags=ce,this._actual=null,this._evaluated=!1}get(){if(!this._evaluated){this._evaluated=!0;try{this._actual=new RegExp(this._pattern,this._flags)}catch{}}return this._actual}isSupported(){return this.get()!==null}}class j extends G{static{this.titleBoundary=new Z("(^|[^\\p{L}\\p{N}']|((^|\\P{L})'))\\p{L}","gmu")}constructor(){super({id:"editor.action.transformToTitlecase",label:h.localize(594,"Transform to Title Case"),alias:"Transform to Title Case",precondition:t.EditorContextKeys.writable})}_modifyText(pe,ce){const ie=j.titleBoundary.get();return ie?pe.toLocaleLowerCase().replace(ie,ne=>ne.toLocaleUpperCase()):pe}}e.TitleCaseAction=j;class P extends G{static{this.caseBoundary=new Z("(\\p{Ll})(\\p{Lu})","gmu")}static{this.singleLetters=new Z("(\\p{Lu}|\\p{N})(\\p{Lu})(\\p{Ll})","gmu")}constructor(){super({id:"editor.action.transformToSnakecase",label:h.localize(595,"Transform to Snake Case"),alias:"Transform to Snake Case",precondition:t.EditorContextKeys.writable})}_modifyText(pe,ce){const ie=P.caseBoundary.get(),ne=P.singleLetters.get();return!ie||!ne?pe:pe.replace(ie,"$1_$2").replace(ne,"$1_$2$3").toLocaleLowerCase()}}e.SnakeCaseAction=P;class te extends G{static{this.wordBoundary=new Z("[_\\s-]","gm")}constructor(){super({id:"editor.action.transformToCamelcase",label:h.localize(596,"Transform to Camel Case"),alias:"Transform to Camel Case",precondition:t.EditorContextKeys.writable})}_modifyText(pe,ce){const ie=te.wordBoundary.get();if(!ie)return pe;const ne=pe.split(ie);return ne.shift()+ne.map(B=>B.substring(0,1).toLocaleUpperCase()+B.substring(1)).join("")}}e.CamelCaseAction=te;class se extends G{static{this.wordBoundary=new Z("[_\\s-]","gm")}static{this.wordBoundaryToMaintain=new Z("(?<=\\.)","gm")}constructor(){super({id:"editor.action.transformToPascalcase",label:h.localize(597,"Transform to Pascal Case"),alias:"Transform to Pascal Case",precondition:t.EditorContextKeys.writable})}_modifyText(pe,ce){const ie=se.wordBoundary.get(),ne=se.wordBoundaryToMaintain.get();return!ie||!ne?pe:pe.split(ne).map(U=>U.split(ie)).flat().map(U=>U.substring(0,1).toLocaleUpperCase()+U.substring(1)).join("")}}e.PascalCaseAction=se;class ue extends G{static isSupported(){return[this.caseBoundary,this.singleLetters,this.underscoreBoundary].every(ce=>ce.isSupported())}static{this.caseBoundary=new Z("(\\p{Ll})(\\p{Lu})","gmu")}static{this.singleLetters=new Z("(\\p{Lu}|\\p{N})(\\p{Lu}\\p{Ll})","gmu")}static{this.underscoreBoundary=new Z("(\\S)(_)(\\S)","gm")}constructor(){super({id:"editor.action.transformToKebabcase",label:h.localize(598,"Transform to Kebab Case"),alias:"Transform to Kebab Case",precondition:t.EditorContextKeys.writable})}_modifyText(pe,ce){const ie=ue.caseBoundary.get(),ne=ue.singleLetters.get(),J=ue.underscoreBoundary.get();return!ie||!ne||!J?pe:pe.replace(J,"$1-$3").replace(ie,"$1-$2").replace(ne,"$1-$2").toLocaleLowerCase()}}e.KebabCaseAction=ue,(0,E.registerEditorAction)(m),(0,E.registerEditorAction)(u),(0,E.registerEditorAction)(b),(0,E.registerEditorAction)(w),(0,E.registerEditorAction)(S),(0,E.registerEditorAction)(I),(0,E.registerEditorAction)(T),(0,E.registerEditorAction)(M),(0,E.registerEditorAction)(A),(0,E.registerEditorAction)(R),(0,E.registerEditorAction)(N),(0,E.registerEditorAction)(O),(0,E.registerEditorAction)(x),(0,E.registerEditorAction)(F),(0,E.registerEditorAction)(V),(0,E.registerEditorAction)(q),(0,E.registerEditorAction)(H),(0,E.registerEditorAction)(K),(0,E.registerEditorAction)(Y),(0,E.registerEditorAction)(X),P.caseBoundary.isSupported()&&P.singleLetters.isSupported()&&(0,E.registerEditorAction)(P),te.wordBoundary.isSupported()&&(0,E.registerEditorAction)(te),se.wordBoundary.isSupported()&&(0,E.registerEditorAction)(se),j.titleBoundary.isSupported()&&(0,E.registerEditorAction)(j),ue.isSupported()&&(0,E.registerEditorAction)(ue)}),define(oe[731],re([1,0,2,15]),function(ae,e,c,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class E extends c.Disposable{static{this.ID="editor.contrib.longLinesHelper"}constructor(y){super(),this._editor=y,this._register(this._editor.onMouseDown(f=>{const _=this._editor.getOption(118);_>=0&&f.target.type===6&&f.target.position.column>=_&&this._editor.updateOptions({stopRenderingLineAfter:-1})}))}}(0,k.registerEditorContribution)(E.ID,E,2)}),define(oe[184],re([1,0,193,48,6,55,2,15,4,119,3,12,62,5,534]),function(ae,e,c,k,E,L,y,f,_,C,p,n,s,t){"use strict";var i;Object.defineProperty(e,"__esModule",{value:!0}),e.MessageController=void 0;let o=class{static{i=this}static{this.ID="editor.contrib.messageController"}static{this.MESSAGE_VISIBLE=new n.RawContextKey("messageVisible",!1,p.localize(556,"Whether the editor is currently showing an inline message"))}static get(a){return a.getContribution(i.ID)}constructor(a,r,d){this._openerService=d,this._messageWidget=new y.MutableDisposable,this._messageListeners=new y.DisposableStore,this._mouseOverMessage=!1,this._editor=a,this._visible=i.MESSAGE_VISIBLE.bindTo(r)}dispose(){this._message?.dispose(),this._messageListeners.dispose(),this._messageWidget.dispose(),this._visible.reset()}showMessage(a,r){(0,k.alert)((0,L.isMarkdownString)(a)?a.value:a),this._visible.set(!0),this._messageWidget.clear(),this._messageListeners.clear(),this._message=(0,L.isMarkdownString)(a)?(0,c.renderMarkdown)(a,{actionHandler:{callback:m=>{this.closeMessage(),(0,C.openLinkFromMarkdown)(this._openerService,m,(0,L.isMarkdownString)(a)?a.isTrusted:void 0)},disposables:this._messageListeners}}):void 0,this._messageWidget.value=new h(this._editor,r,typeof a=="string"?a:this._message.element),this._messageListeners.add(E.Event.debounce(this._editor.onDidBlurEditorText,(m,u)=>u,0)(()=>{this._mouseOverMessage||this._messageWidget.value&&t.isAncestor(t.getActiveElement(),this._messageWidget.value.getDomNode())||this.closeMessage()})),this._messageListeners.add(this._editor.onDidChangeCursorPosition(()=>this.closeMessage())),this._messageListeners.add(this._editor.onDidDispose(()=>this.closeMessage())),this._messageListeners.add(this._editor.onDidChangeModel(()=>this.closeMessage())),this._messageListeners.add(t.addDisposableListener(this._messageWidget.value.getDomNode(),t.EventType.MOUSE_ENTER,()=>this._mouseOverMessage=!0,!0)),this._messageListeners.add(t.addDisposableListener(this._messageWidget.value.getDomNode(),t.EventType.MOUSE_LEAVE,()=>this._mouseOverMessage=!1,!0));let d;this._messageListeners.add(this._editor.onMouseMove(m=>{m.target.position&&(d?d.containsPosition(m.target.position)||this.closeMessage():d=new _.Range(r.lineNumber-3,1,m.target.position.lineNumber+3,1))}))}closeMessage(){this._visible.reset(),this._messageListeners.clear(),this._messageWidget.value&&this._messageListeners.add(h.fadeOut(this._messageWidget.value))}};e.MessageController=o,e.MessageController=o=i=De([he(1,n.IContextKeyService),he(2,s.IOpenerService)],o);const g=f.EditorCommand.bindToContribution(o.get);(0,f.registerEditorCommand)(new g({id:"leaveEditorMessage",precondition:o.MESSAGE_VISIBLE,handler:l=>l.closeMessage(),kbOpts:{weight:130,primary:9}}));class h{static fadeOut(a){const r=()=>{a.dispose(),clearTimeout(d),a.getDomNode().removeEventListener("animationend",r)},d=setTimeout(r,110);return a.getDomNode().addEventListener("animationend",r),a.getDomNode().classList.add("fadeOut"),{dispose:r}}constructor(a,{lineNumber:r,column:d},m){this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this._editor=a,this._editor.revealLinesInCenterIfOutsideViewport(r,r,0),this._position={lineNumber:r,column:d},this._domNode=document.createElement("div"),this._domNode.classList.add("monaco-editor-overlaymessage"),this._domNode.style.marginLeft="-6px";const u=document.createElement("div");u.classList.add("anchor","top"),this._domNode.appendChild(u);const b=document.createElement("div");typeof m=="string"?(b.classList.add("message"),b.textContent=m):(m.classList.add("message"),b.appendChild(m)),this._domNode.appendChild(b);const v=document.createElement("div");v.classList.add("anchor","below"),this._domNode.appendChild(v),this._editor.addContentWidget(this),this._domNode.classList.add("fadeIn")}dispose(){this._editor.removeContentWidget(this)}getId(){return"messageoverlay"}getDomNode(){return this._domNode}getPosition(){return{position:this._position,preference:[1,2],positionAffinity:1}}afterRender(a){this._domNode.classList.toggle("below",a===2)}}(0,f.registerEditorContribution)(o.ID,o,4)}),define(oe[732],re([1,0,55,2,15,184,3]),function(ae,e,c,k,E,L,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ReadOnlyMessageController=void 0;class f extends k.Disposable{static{this.ID="editor.contrib.readOnlyMessageController"}constructor(C){super(),this.editor=C,this._register(this.editor.onDidAttemptReadOnlyEdit(()=>this._onDidAttemptReadOnlyEdit()))}_onDidAttemptReadOnlyEdit(){const C=L.MessageController.get(this.editor);if(C&&this.editor.hasModel()){let p=this.editor.getOptions().get(93);p||(this.editor.isSimpleWidget?p=new c.MarkdownString(y.localize(470,"Cannot edit in read-only input")):p=new c.MarkdownString(y.localize(471,"Cannot edit in read-only editor"))),C.showMessage(p,this.editor.getPosition())}}}e.ReadOnlyMessageController=f,(0,E.registerEditorContribution)(f.ID,f,2)}),define(oe[733],re([1,0,13,18,8,15,9,4,23,20,358,645,3,29,24,17,78,19,22]),function(ae,e,c,k,E,L,y,f,_,C,p,n,s,t,i,o,g,h,l){"use strict";var a;Object.defineProperty(e,"__esModule",{value:!0}),e.SmartSelectController=void 0,e.provideSelectionRanges=v;class r{constructor(S,D){this.index=S,this.ranges=D}mov(S){const D=this.index+(S?1:-1);if(D<0||D>=this.ranges.length)return this;const I=new r(D,this.ranges);return I.ranges[D].equalsRange(this.ranges[this.index])?I.mov(S):I}}let d=class{static{a=this}static{this.ID="editor.contrib.smartSelectController"}static get(S){return S.getContribution(a.ID)}constructor(S,D){this._editor=S,this._languageFeaturesService=D,this._ignoreSelection=!1}dispose(){this._selectionListener?.dispose()}async run(S){if(!this._editor.hasModel())return;const D=this._editor.getSelections(),I=this._editor.getModel();if(this._state||await v(this._languageFeaturesService.selectionRangeProvider,I,D.map(M=>M.getPosition()),this._editor.getOption(114),k.CancellationToken.None).then(M=>{if(!(!c.isNonEmptyArray(M)||M.length!==D.length)&&!(!this._editor.hasModel()||!c.equals(this._editor.getSelections(),D,(A,R)=>A.equalsSelection(R)))){for(let A=0;A<M.length;A++)M[A]=M[A].filter(R=>R.containsPosition(D[A].getStartPosition())&&R.containsPosition(D[A].getEndPosition())),M[A].unshift(D[A]);this._state=M.map(A=>new r(0,A)),this._selectionListener?.dispose(),this._selectionListener=this._editor.onDidChangeCursorPosition(()=>{this._ignoreSelection||(this._selectionListener?.dispose(),this._state=void 0)})}}),!this._state)return;this._state=this._state.map(M=>M.mov(S));const T=this._state.map(M=>_.Selection.fromPositions(M.ranges[M.index].getStartPosition(),M.ranges[M.index].getEndPosition()));this._ignoreSelection=!0;try{this._editor.setSelections(T)}finally{this._ignoreSelection=!1}}};e.SmartSelectController=d,e.SmartSelectController=d=a=De([he(1,o.ILanguageFeaturesService)],d);class m extends L.EditorAction{constructor(S,D){super(D),this._forward=S}async run(S,D){const I=d.get(D);I&&await I.run(this._forward)}}class u extends m{constructor(){super(!0,{id:"editor.action.smartSelect.expand",label:s.localize(448,"Expand Selection"),alias:"Expand Selection",precondition:void 0,kbOpts:{kbExpr:C.EditorContextKeys.editorTextFocus,primary:1553,mac:{primary:3345,secondary:[1297]},weight:100},menuOpts:{menuId:t.MenuId.MenubarSelectionMenu,group:"1_basic",title:s.localize(449,"&&Expand Selection"),order:2}})}}i.CommandsRegistry.registerCommandAlias("editor.action.smartSelect.grow","editor.action.smartSelect.expand");class b extends m{constructor(){super(!1,{id:"editor.action.smartSelect.shrink",label:s.localize(450,"Shrink Selection"),alias:"Shrink Selection",precondition:void 0,kbOpts:{kbExpr:C.EditorContextKeys.editorTextFocus,primary:1551,mac:{primary:3343,secondary:[1295]},weight:100},menuOpts:{menuId:t.MenuId.MenubarSelectionMenu,group:"1_basic",title:s.localize(451,"&&Shrink Selection"),order:3}})}}(0,L.registerEditorContribution)(d.ID,d,4),(0,L.registerEditorAction)(u),(0,L.registerEditorAction)(b);async function v(w,S,D,I,T){const M=w.all(S).concat(new n.WordSelectionRangeProvider(I.selectSubwords));M.length===1&&M.unshift(new p.BracketSelectionRangeProvider);const A=[],R=[];for(const N of M)A.push(Promise.resolve(N.provideSelectionRanges(S,D,T)).then(O=>{if(c.isNonEmptyArray(O)&&O.length===D.length)for(let x=0;x<D.length;x++){R[x]||(R[x]=[]);for(const F of O[x])f.Range.isIRange(F.range)&&f.Range.containsPosition(F.range,D[x])&&R[x].push(f.Range.lift(F.range))}},E.onUnexpectedExternalError));return await Promise.all(A),R.map(N=>{if(N.length===0)return[];N.sort((W,V)=>y.Position.isBefore(W.getStartPosition(),V.getStartPosition())?1:y.Position.isBefore(V.getStartPosition(),W.getStartPosition())||y.Position.isBefore(W.getEndPosition(),V.getEndPosition())?-1:y.Position.isBefore(V.getEndPosition(),W.getEndPosition())?1:0);const O=[];let x;for(const W of N)(!x||f.Range.containsRange(W,x)&&!f.Range.equalsRange(W,x))&&(O.push(W),x=W);if(!I.selectLeadingAndTrailingWhitespace)return O;const F=[O[0]];for(let W=1;W<O.length;W++){const V=O[W-1],q=O[W];if(q.startLineNumber!==V.startLineNumber||q.endLineNumber!==V.endLineNumber){const H=new f.Range(V.startLineNumber,S.getLineFirstNonWhitespaceColumn(V.startLineNumber),V.endLineNumber,S.getLineLastNonWhitespaceColumn(V.endLineNumber));H.containsRange(V)&&!H.equalsRange(V)&&q.containsRange(H)&&!q.equalsRange(H)&&F.push(H);const K=new f.Range(V.startLineNumber,1,V.endLineNumber,S.getLineMaxColumn(V.endLineNumber));K.containsRange(V)&&!K.equalsRange(H)&&q.containsRange(K)&&!q.equalsRange(K)&&F.push(K)}F.push(q)}return F})}i.CommandsRegistry.registerCommand("_executeSelectionRangeProvider",async function(w,...S){const[D,I]=S;(0,h.assertType)(l.URI.isUri(D));const T=w.get(o.ILanguageFeaturesService).selectionRangeProvider,M=await w.get(g.ITextModelService).createModelReference(D);try{return v(T,M.object.textEditorModel,I,{selectLeadingAndTrailingWhitespace:!0,selectSubwords:!0},k.CancellationToken.None)}finally{M.dispose()}})}),define(oe[734],re([1,0,59,15,3]),function(ae,e,c,k,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class L extends k.EditorAction{constructor(){super({id:"editor.action.forceRetokenize",label:E.localize(319,"Developer: Force Retokenize"),alias:"Developer: Force Retokenize",precondition:void 0})}run(f,_){if(!_.hasModel())return;const C=_.getModel();C.tokenization.resetTokenization();const p=new c.StopWatch;C.tokenization.forceTokenization(C.getLineCount()),p.stop(),console.log(`tokenization took ${p.elapsed()}`)}}(0,k.registerEditorAction)(L)}),define(oe[735],re([1,0,2,51,15,35,3,179]),function(ae,e,c,k,E,L,y,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UnusualLineTerminatorsDetector=void 0;const _="ignoreUnusualLineTerminators";function C(s,t,i){s.setModelProperty(t.uri,_,i)}function p(s,t){return s.getModelProperty(t.uri,_)}let n=class extends c.Disposable{static{this.ID="editor.contrib.unusualLineTerminatorsDetector"}constructor(t,i,o){super(),this._editor=t,this._dialogService=i,this._codeEditorService=o,this._isPresentingDialog=!1,this._config=this._editor.getOption(127),this._register(this._editor.onDidChangeConfiguration(g=>{g.hasChanged(127)&&(this._config=this._editor.getOption(127),this._checkForUnusualLineTerminators())})),this._register(this._editor.onDidChangeModel(()=>{this._checkForUnusualLineTerminators()})),this._register(this._editor.onDidChangeModelContent(g=>{g.isUndoing||this._checkForUnusualLineTerminators()})),this._checkForUnusualLineTerminators()}async _checkForUnusualLineTerminators(){if(this._config==="off"||!this._editor.hasModel())return;const t=this._editor.getModel();if(!t.mightContainUnusualLineTerminators()||p(this._codeEditorService,t)===!0||this._editor.getOption(92))return;if(this._config==="auto"){t.removeUnusualLineTerminators(this._editor.getSelections());return}if(this._isPresentingDialog)return;let o;try{this._isPresentingDialog=!0,o=await this._dialogService.confirm({title:y.localize(290,"Unusual Line Terminators"),message:y.localize(291,"Detected unusual line terminators"),detail:y.localize(292,"The file '{0}' contains one or more unusual line terminator characters, like Line Separator (LS) or Paragraph Separator (PS).\n\nIt is recommended to remove them from the file. This can be configured via `editor.unusualLineTerminators`.",(0,k.basename)(t.uri)),primaryButton:y.localize(293,"&&Remove Unusual Line Terminators"),cancelButton:y.localize(294,"Ignore")})}finally{this._isPresentingDialog=!1}if(!o.confirmed){C(this._codeEditorService,t,!0);return}t.removeUnusualLineTerminators(this._editor.getSelections())}};e.UnusualLineTerminatorsDetector=n,e.UnusualLineTerminatorsDetector=n=De([he(1,f.IDialogService),he(2,L.ICodeEditorService)],n),(0,E.registerEditorContribution)(n.ID,n,1)}),define(oe[406],re([1,0,15,145,37,77,199,168,9,4,23,20,34,3,60,12,178]),function(ae,e,c,k,E,L,y,f,_,C,p,n,s,t,i,o,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DeleteInsideWord=e.DeleteWordRight=e.DeleteWordEndRight=e.DeleteWordStartRight=e.DeleteWordLeft=e.DeleteWordEndLeft=e.DeleteWordStartLeft=e.DeleteWordRightCommand=e.DeleteWordLeftCommand=e.DeleteWordCommand=e.CursorWordAccessibilityRightSelect=e.CursorWordAccessibilityRight=e.CursorWordRightSelect=e.CursorWordEndRightSelect=e.CursorWordStartRightSelect=e.CursorWordRight=e.CursorWordEndRight=e.CursorWordStartRight=e.CursorWordAccessibilityLeftSelect=e.CursorWordAccessibilityLeft=e.CursorWordLeftSelect=e.CursorWordEndLeftSelect=e.CursorWordStartLeftSelect=e.CursorWordLeft=e.CursorWordEndLeft=e.CursorWordStartLeft=e.WordRightCommand=e.WordLeftCommand=e.MoveWordCommand=void 0;class h extends c.EditorCommand{constructor(j){super(j),this._inSelectionMode=j.inSelectionMode,this._wordNavigationType=j.wordNavigationType}runEditorCommand(j,P,te){if(!P.hasModel())return;const se=(0,f.getMapForWordSeparators)(P.getOption(132),P.getOption(131)),ue=P.getModel(),ge=P.getSelections(),pe=ge.length>1,ce=ge.map(ie=>{const ne=new _.Position(ie.positionLineNumber,ie.positionColumn),J=this._move(se,ue,ne,this._wordNavigationType,pe);return this._moveTo(ie,J,this._inSelectionMode)});if(ue.pushStackElement(),P._getViewModel().setCursorStates("moveWordCommand",3,ce.map(ie=>L.CursorState.fromModelSelection(ie))),ce.length===1){const ie=new _.Position(ce[0].positionLineNumber,ce[0].positionColumn);P.revealPosition(ie,0)}}_moveTo(j,P,te){return te?new p.Selection(j.selectionStartLineNumber,j.selectionStartColumn,P.lineNumber,P.column):new p.Selection(P.lineNumber,P.column,P.lineNumber,P.column)}}e.MoveWordCommand=h;class l extends h{_move(j,P,te,se,ue){return y.WordOperations.moveWordLeft(j,P,te,se,ue)}}e.WordLeftCommand=l;class a extends h{_move(j,P,te,se,ue){return y.WordOperations.moveWordRight(j,P,te,se)}}e.WordRightCommand=a;class r extends l{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordStartLeft",precondition:void 0})}}e.CursorWordStartLeft=r;class d extends l{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordEndLeft",precondition:void 0})}}e.CursorWordEndLeft=d;class m extends l{constructor(){super({inSelectionMode:!1,wordNavigationType:1,id:"cursorWordLeft",precondition:void 0,kbOpts:{kbExpr:o.ContextKeyExpr.and(n.EditorContextKeys.textInputFocus,o.ContextKeyExpr.and(i.CONTEXT_ACCESSIBILITY_MODE_ENABLED,g.IsWindowsContext)?.negate()),primary:2063,mac:{primary:527},weight:100}})}}e.CursorWordLeft=m;class u extends l{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordStartLeftSelect",precondition:void 0})}}e.CursorWordStartLeftSelect=u;class b extends l{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordEndLeftSelect",precondition:void 0})}}e.CursorWordEndLeftSelect=b;class v extends l{constructor(){super({inSelectionMode:!0,wordNavigationType:1,id:"cursorWordLeftSelect",precondition:void 0,kbOpts:{kbExpr:o.ContextKeyExpr.and(n.EditorContextKeys.textInputFocus,o.ContextKeyExpr.and(i.CONTEXT_ACCESSIBILITY_MODE_ENABLED,g.IsWindowsContext)?.negate()),primary:3087,mac:{primary:1551},weight:100}})}}e.CursorWordLeftSelect=v;class w extends l{constructor(){super({inSelectionMode:!1,wordNavigationType:3,id:"cursorWordAccessibilityLeft",precondition:void 0})}_move(j,P,te,se,ue){return super._move((0,f.getMapForWordSeparators)(E.EditorOptions.wordSeparators.defaultValue,j.intlSegmenterLocales),P,te,se,ue)}}e.CursorWordAccessibilityLeft=w;class S extends l{constructor(){super({inSelectionMode:!0,wordNavigationType:3,id:"cursorWordAccessibilityLeftSelect",precondition:void 0})}_move(j,P,te,se,ue){return super._move((0,f.getMapForWordSeparators)(E.EditorOptions.wordSeparators.defaultValue,j.intlSegmenterLocales),P,te,se,ue)}}e.CursorWordAccessibilityLeftSelect=S;class D extends a{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordStartRight",precondition:void 0})}}e.CursorWordStartRight=D;class I extends a{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordEndRight",precondition:void 0,kbOpts:{kbExpr:o.ContextKeyExpr.and(n.EditorContextKeys.textInputFocus,o.ContextKeyExpr.and(i.CONTEXT_ACCESSIBILITY_MODE_ENABLED,g.IsWindowsContext)?.negate()),primary:2065,mac:{primary:529},weight:100}})}}e.CursorWordEndRight=I;class T extends a{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordRight",precondition:void 0})}}e.CursorWordRight=T;class M extends a{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordStartRightSelect",precondition:void 0})}}e.CursorWordStartRightSelect=M;class A extends a{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordEndRightSelect",precondition:void 0,kbOpts:{kbExpr:o.ContextKeyExpr.and(n.EditorContextKeys.textInputFocus,o.ContextKeyExpr.and(i.CONTEXT_ACCESSIBILITY_MODE_ENABLED,g.IsWindowsContext)?.negate()),primary:3089,mac:{primary:1553},weight:100}})}}e.CursorWordEndRightSelect=A;class R extends a{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordRightSelect",precondition:void 0})}}e.CursorWordRightSelect=R;class N extends a{constructor(){super({inSelectionMode:!1,wordNavigationType:3,id:"cursorWordAccessibilityRight",precondition:void 0})}_move(j,P,te,se,ue){return super._move((0,f.getMapForWordSeparators)(E.EditorOptions.wordSeparators.defaultValue,j.intlSegmenterLocales),P,te,se,ue)}}e.CursorWordAccessibilityRight=N;class O extends a{constructor(){super({inSelectionMode:!0,wordNavigationType:3,id:"cursorWordAccessibilityRightSelect",precondition:void 0})}_move(j,P,te,se,ue){return super._move((0,f.getMapForWordSeparators)(E.EditorOptions.wordSeparators.defaultValue,j.intlSegmenterLocales),P,te,se,ue)}}e.CursorWordAccessibilityRightSelect=O;class x extends c.EditorCommand{constructor(j){super(j),this._whitespaceHeuristics=j.whitespaceHeuristics,this._wordNavigationType=j.wordNavigationType}runEditorCommand(j,P,te){const se=j.get(s.ILanguageConfigurationService);if(!P.hasModel())return;const ue=(0,f.getMapForWordSeparators)(P.getOption(132),P.getOption(131)),ge=P.getModel(),pe=P.getSelections(),ce=P.getOption(6),ie=P.getOption(11),ne=se.getLanguageConfiguration(ge.getLanguageId()).getAutoClosingPairs(),J=P._getViewModel(),B=pe.map(U=>{const z=this._delete({wordSeparators:ue,model:ge,selection:U,whitespaceHeuristics:this._whitespaceHeuristics,autoClosingDelete:P.getOption(9),autoClosingBrackets:ce,autoClosingQuotes:ie,autoClosingPairs:ne,autoClosedCharacters:J.getCursorAutoClosedCharacters()},this._wordNavigationType);return new k.ReplaceCommand(z,"")});P.pushUndoStop(),P.executeCommands(this.id,B),P.pushUndoStop()}}e.DeleteWordCommand=x;class F extends x{_delete(j,P){const te=y.WordOperations.deleteWordLeft(j,P);return te||new C.Range(1,1,1,1)}}e.DeleteWordLeftCommand=F;class W extends x{_delete(j,P){const te=y.WordOperations.deleteWordRight(j,P);if(te)return te;const se=j.model.getLineCount(),ue=j.model.getLineMaxColumn(se);return new C.Range(se,ue,se,ue)}}e.DeleteWordRightCommand=W;class V extends F{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:0,id:"deleteWordStartLeft",precondition:n.EditorContextKeys.writable})}}e.DeleteWordStartLeft=V;class q extends F{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:2,id:"deleteWordEndLeft",precondition:n.EditorContextKeys.writable})}}e.DeleteWordEndLeft=q;class H extends F{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:0,id:"deleteWordLeft",precondition:n.EditorContextKeys.writable,kbOpts:{kbExpr:n.EditorContextKeys.textInputFocus,primary:2049,mac:{primary:513},weight:100}})}}e.DeleteWordLeft=H;class K extends W{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:0,id:"deleteWordStartRight",precondition:n.EditorContextKeys.writable})}}e.DeleteWordStartRight=K;class G extends W{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:2,id:"deleteWordEndRight",precondition:n.EditorContextKeys.writable})}}e.DeleteWordEndRight=G;class Y extends W{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:2,id:"deleteWordRight",precondition:n.EditorContextKeys.writable,kbOpts:{kbExpr:n.EditorContextKeys.textInputFocus,primary:2068,mac:{primary:532},weight:100}})}}e.DeleteWordRight=Y;class X extends c.EditorAction{constructor(){super({id:"deleteInsideWord",precondition:n.EditorContextKeys.writable,label:t.localize(277,"Delete Word"),alias:"Delete Word"})}run(j,P,te){if(!P.hasModel())return;const se=(0,f.getMapForWordSeparators)(P.getOption(132),P.getOption(131)),ue=P.getModel(),pe=P.getSelections().map(ce=>{const ie=y.WordOperations.deleteInsideWord(se,ue,ce);return new k.ReplaceCommand(ie,"")});P.pushUndoStop(),P.executeCommands(this.id,pe),P.pushUndoStop()}}e.DeleteInsideWord=X,(0,c.registerEditorCommand)(new r),(0,c.registerEditorCommand)(new d),(0,c.registerEditorCommand)(new m),(0,c.registerEditorCommand)(new u),(0,c.registerEditorCommand)(new b),(0,c.registerEditorCommand)(new v),(0,c.registerEditorCommand)(new D),(0,c.registerEditorCommand)(new I),(0,c.registerEditorCommand)(new T),(0,c.registerEditorCommand)(new M),(0,c.registerEditorCommand)(new A),(0,c.registerEditorCommand)(new R),(0,c.registerEditorCommand)(new w),(0,c.registerEditorCommand)(new S),(0,c.registerEditorCommand)(new N),(0,c.registerEditorCommand)(new O),(0,c.registerEditorCommand)(new V),(0,c.registerEditorCommand)(new q),(0,c.registerEditorCommand)(new H),(0,c.registerEditorCommand)(new K),(0,c.registerEditorCommand)(new G),(0,c.registerEditorCommand)(new Y),(0,c.registerEditorAction)(X)}),define(oe[736],re([1,0,15,199,4,20,406,24]),function(ae,e,c,k,E,L,y,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CursorWordPartRightSelect=e.CursorWordPartRight=e.WordPartRightCommand=e.CursorWordPartLeftSelect=e.CursorWordPartLeft=e.WordPartLeftCommand=e.DeleteWordPartRight=e.DeleteWordPartLeft=void 0;class _ extends y.DeleteWordCommand{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:0,id:"deleteWordPartLeft",precondition:L.EditorContextKeys.writable,kbOpts:{kbExpr:L.EditorContextKeys.textInputFocus,primary:0,mac:{primary:769},weight:100}})}_delete(h,l){const a=k.WordPartOperations.deleteWordPartLeft(h);return a||new E.Range(1,1,1,1)}}e.DeleteWordPartLeft=_;class C extends y.DeleteWordCommand{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:2,id:"deleteWordPartRight",precondition:L.EditorContextKeys.writable,kbOpts:{kbExpr:L.EditorContextKeys.textInputFocus,primary:0,mac:{primary:788},weight:100}})}_delete(h,l){const a=k.WordPartOperations.deleteWordPartRight(h);if(a)return a;const r=h.model.getLineCount(),d=h.model.getLineMaxColumn(r);return new E.Range(r,d,r,d)}}e.DeleteWordPartRight=C;class p extends y.MoveWordCommand{_move(h,l,a,r,d){return k.WordPartOperations.moveWordPartLeft(h,l,a,d)}}e.WordPartLeftCommand=p;class n extends p{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordPartLeft",precondition:void 0,kbOpts:{kbExpr:L.EditorContextKeys.textInputFocus,primary:0,mac:{primary:783},weight:100}})}}e.CursorWordPartLeft=n,f.CommandsRegistry.registerCommandAlias("cursorWordPartStartLeft","cursorWordPartLeft");class s extends p{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordPartLeftSelect",precondition:void 0,kbOpts:{kbExpr:L.EditorContextKeys.textInputFocus,primary:0,mac:{primary:1807},weight:100}})}}e.CursorWordPartLeftSelect=s,f.CommandsRegistry.registerCommandAlias("cursorWordPartStartLeftSelect","cursorWordPartLeftSelect");class t extends y.MoveWordCommand{_move(h,l,a,r,d){return k.WordPartOperations.moveWordPartRight(h,l,a)}}e.WordPartRightCommand=t;class i extends t{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordPartRight",precondition:void 0,kbOpts:{kbExpr:L.EditorContextKeys.textInputFocus,primary:0,mac:{primary:785},weight:100}})}}e.CursorWordPartRight=i;class o extends t{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordPartRightSelect",precondition:void 0,kbOpts:{kbExpr:L.EditorContextKeys.textInputFocus,primary:0,mac:{primary:1809},weight:100}})}}e.CursorWordPartRightSelect=o,(0,c.registerEditorCommand)(new _),(0,c.registerEditorCommand)(new C),(0,c.registerEditorCommand)(new n),(0,c.registerEditorCommand)(new s),(0,c.registerEditorCommand)(new i),(0,c.registerEditorCommand)(new o)}),define(oe[737],re([1,0,5,2,15,16,547]),function(ae,e,c,k,E,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IPadShowKeyboard=void 0;class y extends k.Disposable{static{this.ID="editor.contrib.iPadShowKeyboard"}constructor(C){super(),this.editor=C,this.widget=null,L.isIOS&&(this._register(C.onDidChangeConfiguration(()=>this.update())),this.update())}update(){const C=!this.editor.getOption(92);!this.widget&&C?this.widget=new f(this.editor):this.widget&&!C&&(this.widget.dispose(),this.widget=null)}dispose(){super.dispose(),this.widget&&(this.widget.dispose(),this.widget=null)}}e.IPadShowKeyboard=y;class f extends k.Disposable{static{this.ID="editor.contrib.ShowKeyboardWidget"}constructor(C){super(),this.editor=C,this._domNode=document.createElement("textarea"),this._domNode.className="iPadShowKeyboard",this._register(c.addDisposableListener(this._domNode,"touchstart",p=>{this.editor.focus()})),this._register(c.addDisposableListener(this._domNode,"focus",p=>{this.editor.focus()})),this.editor.addOverlayWidget(this)}dispose(){this.editor.removeOverlayWidget(this),super.dispose()}getId(){return f.ID}getDomNode(){return this._domNode}getPosition(){return{preference:1}}}(0,E.registerEditorContribution)(y.ID,y,3)}),define(oe[738],re([1,0,5,33,2,15,28,147,176,42,152,106,548]),function(ae,e,c,k,E,L,y,f,_,C,p,n){"use strict";var s;Object.defineProperty(e,"__esModule",{value:!0});let t=class extends E.Disposable{static{s=this}static{this.ID="editor.contrib.inspectTokens"}static get(a){return a.getContribution(s.ID)}constructor(a,r,d){super(),this._editor=a,this._languageService=d,this._widget=null,this._register(this._editor.onDidChangeModel(m=>this.stop())),this._register(this._editor.onDidChangeModelLanguage(m=>this.stop())),this._register(y.TokenizationRegistry.onDidChange(m=>this.stop())),this._register(this._editor.onKeyUp(m=>m.keyCode===9&&this.stop()))}dispose(){this.stop(),super.dispose()}launch(){this._widget||this._editor.hasModel()&&(this._widget=new h(this._editor,this._languageService))}stop(){this._widget&&(this._widget.dispose(),this._widget=null)}};t=s=De([he(1,p.IStandaloneThemeService),he(2,C.ILanguageService)],t);class i extends L.EditorAction{constructor(){super({id:"editor.action.inspectTokens",label:n.InspectTokensNLS.inspectTokensAction,alias:"Developer: Inspect Tokens",precondition:void 0})}run(a,r){t.get(r)?.launch()}}function o(l){let a="";for(let r=0,d=l.length;r<d;r++){const m=l.charCodeAt(r);switch(m){case 9:a+="\u2192";break;case 32:a+="\xB7";break;default:a+=String.fromCharCode(m)}}return a}function g(l,a){const r=y.TokenizationRegistry.get(a);if(r)return r;const d=l.encodeLanguageId(a);return{getInitialState:()=>_.NullState,tokenize:(m,u,b)=>(0,_.nullTokenize)(a,b),tokenizeEncoded:(m,u,b)=>(0,_.nullTokenizeEncoded)(d,b)}}class h extends E.Disposable{static{this._ID="editor.contrib.inspectTokensWidget"}constructor(a,r){super(),this.allowEditorOverflow=!0,this._editor=a,this._languageService=r,this._model=this._editor.getModel(),this._domNode=document.createElement("div"),this._domNode.className="tokens-inspect-widget",this._tokenizationSupport=g(this._languageService.languageIdCodec,this._model.getLanguageId()),this._compute(this._editor.getPosition()),this._register(this._editor.onDidChangeCursorPosition(d=>this._compute(this._editor.getPosition()))),this._editor.addContentWidget(this)}dispose(){this._editor.removeContentWidget(this),super.dispose()}getId(){return h._ID}_compute(a){const r=this._getTokensAtLine(a.lineNumber);let d=0;for(let w=r.tokens1.length-1;w>=0;w--){const S=r.tokens1[w];if(a.column-1>=S.offset){d=w;break}}let m=0;for(let w=r.tokens2.length>>>1;w>=0;w--)if(a.column-1>=r.tokens2[w<<1]){m=w;break}const u=this._model.getLineContent(a.lineNumber);let b="";if(d<r.tokens1.length){const w=r.tokens1[d].offset,S=d+1<r.tokens1.length?r.tokens1[d+1].offset:u.length;b=u.substring(w,S)}(0,c.reset)(this._domNode,(0,c.$)("h2.tm-token",void 0,o(b),(0,c.$)("span.tm-token-length",void 0,`${b.length} ${b.length===1?"char":"chars"}`))),(0,c.append)(this._domNode,(0,c.$)("hr.tokens-inspect-separator",{style:"clear:both"}));const v=(m<<1)+1<r.tokens2.length?this._decodeMetadata(r.tokens2[(m<<1)+1]):null;(0,c.append)(this._domNode,(0,c.$)("table.tm-metadata-table",void 0,(0,c.$)("tbody",void 0,(0,c.$)("tr",void 0,(0,c.$)("td.tm-metadata-key",void 0,"language"),(0,c.$)("td.tm-metadata-value",void 0,`${v?v.languageId:"-?-"}`)),(0,c.$)("tr",void 0,(0,c.$)("td.tm-metadata-key",void 0,"token type"),(0,c.$)("td.tm-metadata-value",void 0,`${v?this._tokenTypeToString(v.tokenType):"-?-"}`)),(0,c.$)("tr",void 0,(0,c.$)("td.tm-metadata-key",void 0,"font style"),(0,c.$)("td.tm-metadata-value",void 0,`${v?this._fontStyleToString(v.fontStyle):"-?-"}`)),(0,c.$)("tr",void 0,(0,c.$)("td.tm-metadata-key",void 0,"foreground"),(0,c.$)("td.tm-metadata-value",void 0,`${v?k.Color.Format.CSS.formatHex(v.foreground):"-?-"}`)),(0,c.$)("tr",void 0,(0,c.$)("td.tm-metadata-key",void 0,"background"),(0,c.$)("td.tm-metadata-value",void 0,`${v?k.Color.Format.CSS.formatHex(v.background):"-?-"}`))))),(0,c.append)(this._domNode,(0,c.$)("hr.tokens-inspect-separator")),d<r.tokens1.length&&(0,c.append)(this._domNode,(0,c.$)("span.tm-token-type",void 0,r.tokens1[d].type)),this._editor.layoutContentWidget(this)}_decodeMetadata(a){const r=y.TokenizationRegistry.getColorMap(),d=f.TokenMetadata.getLanguageId(a),m=f.TokenMetadata.getTokenType(a),u=f.TokenMetadata.getFontStyle(a),b=f.TokenMetadata.getForeground(a),v=f.TokenMetadata.getBackground(a);return{languageId:this._languageService.languageIdCodec.decodeLanguageId(d),tokenType:m,fontStyle:u,foreground:r[b],background:r[v]}}_tokenTypeToString(a){switch(a){case 0:return"Other";case 1:return"Comment";case 2:return"String";case 3:return"RegEx";default:return"??"}}_fontStyleToString(a){let r="";return a&1&&(r+="italic "),a&2&&(r+="bold "),a&4&&(r+="underline "),a&8&&(r+="strikethrough "),r.length===0&&(r="---"),r}_getTokensAtLine(a){const r=this._getStateBeforeLine(a),d=this._tokenizationSupport.tokenize(this._model.getLineContent(a),!0,r),m=this._tokenizationSupport.tokenizeEncoded(this._model.getLineContent(a),!0,r);return{startState:r,tokens1:d.tokens,tokens2:m.tokens,endState:d.endState}}_getStateBeforeLine(a){let r=this._tokenizationSupport.getInitialState();for(let d=1;d<a;d++)r=this._tokenizationSupport.tokenize(this._model.getLineContent(d),!0,r).endState;return r}getDomNode(){return this._domNode}getPosition(){return{position:this._editor.getPosition(),preference:[2,1]}}}(0,L.registerEditorContribution)(t.ID,t,4),(0,L.registerEditorAction)(i)}),define(oe[739],re([1,0,367,8,82,126,2,45,455,3,24,27,179,7,31,61,695,100,66]),function(ae,e,c,k,E,L,y,f,_,C,p,n,s,t,i,o,g,h,l){"use strict";var a,r;Object.defineProperty(e,"__esModule",{value:!0}),e.CommandsHistory=e.AbstractCommandsQuickAccessProvider=void 0;let d=class extends g.PickerQuickAccessProvider{static{a=this}static{this.PREFIX=">"}static{this.TFIDF_THRESHOLD=.5}static{this.TFIDF_MAX_RESULTS=5}static{this.WORD_FILTER=(0,E.or)(E.matchesPrefix,E.matchesWords,E.matchesContiguousSubString)}constructor(b,v,w,S,D,I){super(a.PREFIX,b),this.instantiationService=v,this.keybindingService=w,this.commandService=S,this.telemetryService=D,this.dialogService=I,this.commandsHistory=this._register(this.instantiationService.createInstance(m)),this.options=b}async _getPicks(b,v,w,S){const D=await this.getCommandPicks(w);if(w.isCancellationRequested)return[];const I=(0,L.createSingleCallFunction)(()=>{const x=new _.TfIdfCalculator;x.updateDocuments(D.map(W=>({key:W.commandId,textChunks:[this.getTfIdfChunk(W)]})));const F=x.calculateScores(b,w);return(0,_.normalizeTfIdfScores)(F).filter(W=>W.score>a.TFIDF_THRESHOLD).slice(0,a.TFIDF_MAX_RESULTS)}),T=[];for(const x of D){const F=a.WORD_FILTER(b,x.label)??void 0,W=x.commandAlias?a.WORD_FILTER(b,x.commandAlias)??void 0:void 0;if(F||W)x.highlights={label:F,detail:this.options.showAlias?W:void 0},T.push(x);else if(b===x.commandId)T.push(x);else if(b.length>=3){const V=I();if(w.isCancellationRequested)return[];const q=V.find(H=>H.key===x.commandId);q&&(x.tfIdfScore=q.score,T.push(x))}}const M=new Map;for(const x of T){const F=M.get(x.label);F?(x.description=x.commandId,F.description=F.commandId):M.set(x.label,x)}T.sort((x,F)=>{if(x.tfIdfScore&&F.tfIdfScore)return x.tfIdfScore===F.tfIdfScore?x.label.localeCompare(F.label):F.tfIdfScore-x.tfIdfScore;if(x.tfIdfScore)return 1;if(F.tfIdfScore)return-1;const W=this.commandsHistory.peek(x.commandId),V=this.commandsHistory.peek(F.commandId);if(W&&V)return W>V?-1:1;if(W)return-1;if(V)return 1;if(this.options.suggestedCommandIds){const q=this.options.suggestedCommandIds.has(x.commandId),H=this.options.suggestedCommandIds.has(F.commandId);if(q&&H)return 0;if(q)return-1;if(H)return 1}return x.label.localeCompare(F.label)});const A=[];let R=!1,N=!0,O=!!this.options.suggestedCommandIds;for(let x=0;x<T.length;x++){const F=T[x];x===0&&this.commandsHistory.peek(F.commandId)&&(A.push({type:"separator",label:(0,C.localize)(1087,"recently used")}),R=!0),N&&F.tfIdfScore!==void 0&&(A.push({type:"separator",label:(0,C.localize)(1088,"similar commands")}),N=!1),O&&F.tfIdfScore===void 0&&!this.commandsHistory.peek(F.commandId)&&this.options.suggestedCommandIds?.has(F.commandId)&&(A.push({type:"separator",label:(0,C.localize)(1089,"commonly used")}),R=!0,O=!1),R&&F.tfIdfScore===void 0&&!this.commandsHistory.peek(F.commandId)&&!this.options.suggestedCommandIds?.has(F.commandId)&&(A.push({type:"separator",label:(0,C.localize)(1090,"other commands")}),R=!1),A.push(this.toCommandPick(F,S))}return this.hasAdditionalCommandPicks(b,w)?{picks:A,additionalPicks:(async()=>{const x=await this.getAdditionalCommandPicks(D,T,b,w);if(w.isCancellationRequested)return[];const F=x.map(W=>this.toCommandPick(W,S));return N&&F[0]?.type!=="separator"&&F.unshift({type:"separator",label:(0,C.localize)(1091,"similar commands")}),F})()}:A}toCommandPick(b,v){if(b.type==="separator")return b;const w=this.keybindingService.lookupKeybinding(b.commandId),S=w?(0,C.localize)(1092,"{0}, {1}",b.label,w.getAriaLabel()):b.label;return{...b,ariaLabel:S,detail:this.options.showAlias&&b.commandAlias!==b.label?b.commandAlias:void 0,keybinding:w,accept:async()=>{this.commandsHistory.push(b.commandId),this.telemetryService.publicLog2("workbenchActionExecuted",{id:b.commandId,from:v?.from??"quick open"});try{b.args?.length?await this.commandService.executeCommand(b.commandId,...b.args):await this.commandService.executeCommand(b.commandId)}catch(D){(0,k.isCancellationError)(D)||this.dialogService.error((0,C.localize)(1093,"Command '{0}' resulted in an error",b.label),(0,c.toErrorMessage)(D))}}}}getTfIdfChunk({label:b,commandAlias:v,commandDescription:w}){let S=b;return v&&v!==b&&(S+=` - ${v}`),w&&w.value!==b&&(S+=` - ${w.value===w.original?w.value:`${w.value} (${w.original})`}`),S}};e.AbstractCommandsQuickAccessProvider=d,e.AbstractCommandsQuickAccessProvider=d=a=De([he(1,t.IInstantiationService),he(2,i.IKeybindingService),he(3,p.ICommandService),he(4,l.ITelemetryService),he(5,s.IDialogService)],d);let m=class extends y.Disposable{static{r=this}static{this.DEFAULT_COMMANDS_HISTORY_LENGTH=50}static{this.PREF_KEY_CACHE="commandPalette.mru.cache"}static{this.PREF_KEY_COUNTER="commandPalette.mru.counter"}static{this.counter=1}static{this.hasChanges=!1}constructor(b,v,w){super(),this.storageService=b,this.configurationService=v,this.logService=w,this.configuredCommandsHistoryLength=0,this.updateConfiguration(),this.load(),this.registerListeners()}registerListeners(){this._register(this.configurationService.onDidChangeConfiguration(b=>this.updateConfiguration(b))),this._register(this.storageService.onWillSaveState(b=>{b.reason===h.WillSaveStateReason.SHUTDOWN&&this.saveState()}))}updateConfiguration(b){b&&!b.affectsConfiguration("workbench.commandPalette.history")||(this.configuredCommandsHistoryLength=r.getConfiguredCommandHistoryLength(this.configurationService),r.cache&&r.cache.limit!==this.configuredCommandsHistoryLength&&(r.cache.limit=this.configuredCommandsHistoryLength,r.hasChanges=!0))}load(){const b=this.storageService.get(r.PREF_KEY_CACHE,0);let v;if(b)try{v=JSON.parse(b)}catch(S){this.logService.error(`[CommandsHistory] invalid data: ${S}`)}const w=r.cache=new f.LRUCache(this.configuredCommandsHistoryLength,1);if(v){let S;v.usesLRU?S=v.entries:S=v.entries.sort((D,I)=>D.value-I.value),S.forEach(D=>w.set(D.key,D.value))}r.counter=this.storageService.getNumber(r.PREF_KEY_COUNTER,0,r.counter)}push(b){r.cache&&(r.cache.set(b,r.counter++),r.hasChanges=!0)}peek(b){return r.cache?.peek(b)}saveState(){if(!r.cache||!r.hasChanges)return;const b={usesLRU:!0,entries:[]};r.cache.forEach((v,w)=>b.entries.push({key:w,value:v})),this.storageService.store(r.PREF_KEY_CACHE,JSON.stringify(b),0,0),this.storageService.store(r.PREF_KEY_COUNTER,r.counter,0,0),r.hasChanges=!1}static getConfiguredCommandHistoryLength(b){const w=b.getValue().workbench?.commandPalette?.history;return typeof w=="number"?w:r.DEFAULT_COMMANDS_HISTORY_LENGTH}};e.CommandsHistory=m,e.CommandsHistory=m=r=De([he(0,h.IStorageService),he(1,n.IConfigurationService),he(2,o.ILogService)],m)}),define(oe[740],re([1,0,141,377,739]),function(ae,e,c,k,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractEditorCommandsQuickAccessProvider=void 0;class L extends E.AbstractCommandsQuickAccessProvider{constructor(f,_,C,p,n,s){super(f,_,C,p,n,s)}getCodeEditorCommandPicks(){const f=this.activeTextEditorControl;if(!f)return[];const _=[];for(const C of f.getSupportedActions()){let p;C.metadata?.description&&((0,k.isLocalizedString)(C.metadata.description)?p=C.metadata.description:p={original:C.metadata.description,value:C.metadata.description}),_.push({commandId:C.id,commandAlias:C.alias,commandDescription:p,label:(0,c.stripIcons)(C.label)||C.id})}return _}}e.AbstractEditorCommandsQuickAccessProvider=L}),define(oe[741],re([1,0,38,154,106,35,740,7,31,24,66,179,15,20,63]),function(ae,e,c,k,E,L,y,f,_,C,p,n,s,t,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GotoLineAction=e.StandaloneCommandsQuickAccessProvider=void 0;let o=class extends y.AbstractEditorCommandsQuickAccessProvider{get activeTextEditorControl(){return this.codeEditorService.getFocusedCodeEditor()??void 0}constructor(l,a,r,d,m,u){super({showAlias:!1},l,r,d,m,u),this.codeEditorService=a}async getCommandPicks(){return this.getCodeEditorCommandPicks()}hasAdditionalCommandPicks(){return!1}async getAdditionalCommandPicks(){return[]}};e.StandaloneCommandsQuickAccessProvider=o,e.StandaloneCommandsQuickAccessProvider=o=De([he(0,f.IInstantiationService),he(1,L.ICodeEditorService),he(2,_.IKeybindingService),he(3,C.ICommandService),he(4,p.ITelemetryService),he(5,n.IDialogService)],o);class g extends s.EditorAction{static{this.ID="editor.action.quickCommand"}constructor(){super({id:g.ID,label:E.QuickCommandNLS.quickCommandActionLabel,alias:"Command Palette",precondition:void 0,kbOpts:{kbExpr:t.EditorContextKeys.focus,primary:59,weight:100},contextMenuOpts:{group:"z_commands",order:1}})}run(l){l.get(i.IQuickInputService).quickAccess.show(o.PREFIX)}}e.GotoLineAction=g,(0,s.registerEditorAction)(g),c.Registry.as(k.Extensions.Quickaccess).registerQuickAccessProvider({ctor:o,prefix:o.PREFIX,helpEntries:[{description:E.QuickCommandNLS.quickCommandHelp,commandId:g.ID}]})}),define(oe[88],re([1,0,89,14,33,6,271,38,3]),function(ae,e,c,k,E,L,y,f,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.workbenchColorsSchemaId=e.DEFAULT_COLOR_CONFIG_VALUE=e.Extensions=void 0,e.asCssVariableName=C,e.asCssVariable=p,e.asCssVariableWithDefault=n,e.isColorDefaults=s,e.registerColor=o,e.executeTransform=g,e.darken=h,e.lighten=l,e.transparent=a,e.oneOf=r,e.ifDefinedThenElse=d,e.lessProminent=m,e.resolveColorValue=u;function C(w){return`--vscode-${w.replace(/\./g,"-")}`}function p(w){return`var(${C(w)})`}function n(w,S){return`var(${C(w)}, ${S})`}function s(w){return w!==null&&typeof w=="object"&&"light"in w&&"dark"in w}e.Extensions={ColorContribution:"base.contributions.colors"},e.DEFAULT_COLOR_CONFIG_VALUE="default";class t{constructor(){this._onDidChangeSchema=new L.Emitter,this.onDidChangeSchema=this._onDidChangeSchema.event,this.colorSchema={type:"object",properties:{}},this.colorReferenceSchema={type:"string",enum:[],enumDescriptions:[]},this.colorsById={}}registerColor(S,D,I,T=!1,M){const A={id:S,description:I,defaults:D,needsTransparency:T,deprecationMessage:M};this.colorsById[S]=A;const R={type:"string",description:I,format:"color-hex",defaultSnippets:[{body:"${1:#ff0000}"}]};return M&&(R.deprecationMessage=M),T&&(R.pattern="^#(?:(?<rgba>[0-9a-fA-f]{3}[0-9a-eA-E])|(?:[0-9a-fA-F]{6}(?:(?![fF]{2})(?:[0-9a-fA-F]{2}))))?$",R.patternErrorMessage=_.localize(1065,"This color must be transparent or it will obscure content")),this.colorSchema.properties[S]={oneOf:[R,{type:"string",const:e.DEFAULT_COLOR_CONFIG_VALUE,description:_.localize(1066,"Use the default color.")}]},this.colorReferenceSchema.enum.push(S),this.colorReferenceSchema.enumDescriptions.push(I),this._onDidChangeSchema.fire(),S}getColors(){return Object.keys(this.colorsById).map(S=>this.colorsById[S])}resolveDefaultColor(S,D){const I=this.colorsById[S];if(I?.defaults){const T=s(I.defaults)?I.defaults[D.type]:I.defaults;return u(T,D)}}getColorSchema(){return this.colorSchema}toString(){const S=(D,I)=>{const T=D.indexOf(".")===-1?0:1,M=I.indexOf(".")===-1?0:1;return T!==M?T-M:D.localeCompare(I)};return Object.keys(this.colorsById).sort(S).map(D=>`- \`${D}\`: ${this.colorsById[D].description}`).join(`
|
|
651
651
|
`)}}const i=new t;f.Registry.add(e.Extensions.ColorContribution,i);function o(w,S,D,I,T){return i.registerColor(w,S,D,I,T)}function g(w,S){switch(w.op){case 0:return u(w.value,S)?.darken(w.factor);case 1:return u(w.value,S)?.lighten(w.factor);case 2:return u(w.value,S)?.transparent(w.factor);case 3:{const D=u(w.background,S);return D?u(w.value,S)?.makeOpaque(D):u(w.value,S)}case 4:for(const D of w.values){const I=u(D,S);if(I)return I}return;case 6:return u(S.defines(w.if)?w.then:w.else,S);case 5:{const D=u(w.value,S);if(!D)return;const I=u(w.background,S);return I?D.isDarkerThan(I)?E.Color.getLighterColor(D,I,w.factor).transparent(w.transparency):E.Color.getDarkerColor(D,I,w.factor).transparent(w.transparency):D.transparent(w.factor*w.transparency)}default:throw(0,c.assertNever)(w)}}function h(w,S){return{op:0,value:w,factor:S}}function l(w,S){return{op:1,value:w,factor:S}}function a(w,S){return{op:2,value:w,factor:S}}function r(...w){return{op:4,values:w}}function d(w,S,D){return{op:6,if:w,then:S,else:D}}function m(w,S,D,I){return{op:5,value:w,background:S,factor:D,transparency:I}}function u(w,S){if(w!==null){if(typeof w=="string")return w[0]==="#"?E.Color.fromHex(w):S.getColor(w);if(w instanceof E.Color)return w;if(typeof w=="object")return g(w,S)}}e.workbenchColorsSchemaId="vscode://schemas/workbench-colors";const b=f.Registry.as(y.Extensions.JSONContribution);b.registerSchema(e.workbenchColorsSchemaId,i.getColorSchema());const v=new k.RunOnceScheduler(()=>b.notifySchemaChanged(e.workbenchColorsSchemaId),200);i.onDidChangeSchema(()=>{v.isScheduled()||v.schedule()})}),define(oe[122],re([1,0,3,33,88]),function(ae,e,c,k,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.textCodeBlockBackground=e.textBlockQuoteBorder=e.textBlockQuoteBackground=e.textPreformatBackground=e.textPreformatForeground=e.textSeparatorForeground=e.textLinkActiveForeground=e.textLinkForeground=e.selectionBackground=e.activeContrastBorder=e.contrastBorder=e.focusBorder=e.iconForeground=e.descriptionForeground=e.errorForeground=e.disabledForeground=e.foreground=void 0,e.foreground=(0,E.registerColor)("foreground",{dark:"#CCCCCC",light:"#616161",hcDark:"#FFFFFF",hcLight:"#292929"},c.localize(260,"Overall foreground color. This color is only used if not overridden by a component.")),e.disabledForeground=(0,E.registerColor)("disabledForeground",{dark:"#CCCCCC80",light:"#61616180",hcDark:"#A5A5A5",hcLight:"#7F7F7F"},c.localize(261,"Overall foreground for disabled elements. This color is only used if not overridden by a component.")),e.errorForeground=(0,E.registerColor)("errorForeground",{dark:"#F48771",light:"#A1260D",hcDark:"#F48771",hcLight:"#B5200D"},c.localize(262,"Overall foreground color for error messages. This color is only used if not overridden by a component.")),e.descriptionForeground=(0,E.registerColor)("descriptionForeground",{light:"#717171",dark:(0,E.transparent)(e.foreground,.7),hcDark:(0,E.transparent)(e.foreground,.7),hcLight:(0,E.transparent)(e.foreground,.7)},c.localize(263,"Foreground color for description text providing additional information, for example for a label.")),e.iconForeground=(0,E.registerColor)("icon.foreground",{dark:"#C5C5C5",light:"#424242",hcDark:"#FFFFFF",hcLight:"#292929"},c.localize(264,"The default color for icons in the workbench.")),e.focusBorder=(0,E.registerColor)("focusBorder",{dark:"#007FD4",light:"#0090F1",hcDark:"#F38518",hcLight:"#006BBD"},c.localize(265,"Overall border color for focused elements. This color is only used if not overridden by a component.")),e.contrastBorder=(0,E.registerColor)("contrastBorder",{light:null,dark:null,hcDark:"#6FC3DF",hcLight:"#0F4A85"},c.localize(266,"An extra border around elements to separate them from others for greater contrast.")),e.activeContrastBorder=(0,E.registerColor)("contrastActiveBorder",{light:null,dark:null,hcDark:e.focusBorder,hcLight:e.focusBorder},c.localize(267,"An extra border around active elements to separate them from others for greater contrast.")),e.selectionBackground=(0,E.registerColor)("selection.background",null,c.localize(268,"The background color of text selections in the workbench (e.g. for input fields or text areas). Note that this does not apply to selections within the editor.")),e.textLinkForeground=(0,E.registerColor)("textLink.foreground",{light:"#006AB1",dark:"#3794FF",hcDark:"#21A6FF",hcLight:"#0F4A85"},c.localize(269,"Foreground color for links in text.")),e.textLinkActiveForeground=(0,E.registerColor)("textLink.activeForeground",{light:"#006AB1",dark:"#3794FF",hcDark:"#21A6FF",hcLight:"#0F4A85"},c.localize(270,"Foreground color for links in text when clicked on and on mouse hover.")),e.textSeparatorForeground=(0,E.registerColor)("textSeparator.foreground",{light:"#0000002e",dark:"#ffffff2e",hcDark:k.Color.black,hcLight:"#292929"},c.localize(271,"Color for text separators.")),e.textPreformatForeground=(0,E.registerColor)("textPreformat.foreground",{light:"#A31515",dark:"#D7BA7D",hcDark:"#000000",hcLight:"#FFFFFF"},c.localize(272,"Foreground color for preformatted text segments.")),e.textPreformatBackground=(0,E.registerColor)("textPreformat.background",{light:"#0000001A",dark:"#FFFFFF1A",hcDark:"#FFFFFF",hcLight:"#09345f"},c.localize(273,"Background color for preformatted text segments.")),e.textBlockQuoteBackground=(0,E.registerColor)("textBlockQuote.background",{light:"#f2f2f2",dark:"#222222",hcDark:null,hcLight:"#F2F2F2"},c.localize(274,"Background color for block quotes in text.")),e.textBlockQuoteBorder=(0,E.registerColor)("textBlockQuote.border",{light:"#007acc80",dark:"#007acc80",hcDark:k.Color.white,hcLight:"#292929"},c.localize(275,"Border color for block quotes in text.")),e.textCodeBlockBackground=(0,E.registerColor)("textCodeBlock.background",{light:"#dcdcdc66",dark:"#0a0a0a66",hcDark:k.Color.black,hcLight:"#F2F2F2"},c.localize(276,"Background color for code blocks in text."))}),define(oe[277],re([1,0,3,33,88,122]),function(ae,e,c,k,E,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.progressBarBackground=e.scrollbarSliderActiveBackground=e.scrollbarSliderHoverBackground=e.scrollbarSliderBackground=e.scrollbarShadow=e.badgeForeground=e.badgeBackground=e.sashHoverBorder=void 0,e.sashHoverBorder=(0,E.registerColor)("sash.hoverBorder",L.focusBorder,c.localize(56,"Border color of active sashes.")),e.badgeBackground=(0,E.registerColor)("badge.background",{dark:"#4D4D4D",light:"#C4C4C4",hcDark:k.Color.black,hcLight:"#0F4A85"},c.localize(57,"Badge background color. Badges are small information labels, e.g. for search results count.")),e.badgeForeground=(0,E.registerColor)("badge.foreground",{dark:k.Color.white,light:"#333",hcDark:k.Color.white,hcLight:k.Color.white},c.localize(58,"Badge foreground color. Badges are small information labels, e.g. for search results count.")),e.scrollbarShadow=(0,E.registerColor)("scrollbar.shadow",{dark:"#000000",light:"#DDDDDD",hcDark:null,hcLight:null},c.localize(59,"Scrollbar shadow to indicate that the view is scrolled.")),e.scrollbarSliderBackground=(0,E.registerColor)("scrollbarSlider.background",{dark:k.Color.fromHex("#797979").transparent(.4),light:k.Color.fromHex("#646464").transparent(.4),hcDark:(0,E.transparent)(L.contrastBorder,.6),hcLight:(0,E.transparent)(L.contrastBorder,.4)},c.localize(60,"Scrollbar slider background color.")),e.scrollbarSliderHoverBackground=(0,E.registerColor)("scrollbarSlider.hoverBackground",{dark:k.Color.fromHex("#646464").transparent(.7),light:k.Color.fromHex("#646464").transparent(.7),hcDark:(0,E.transparent)(L.contrastBorder,.8),hcLight:(0,E.transparent)(L.contrastBorder,.8)},c.localize(61,"Scrollbar slider background color when hovering.")),e.scrollbarSliderActiveBackground=(0,E.registerColor)("scrollbarSlider.activeBackground",{dark:k.Color.fromHex("#BFBFBF").transparent(.4),light:k.Color.fromHex("#000000").transparent(.6),hcDark:L.contrastBorder,hcLight:L.contrastBorder},c.localize(62,"Scrollbar slider background color when clicked on.")),e.progressBarBackground=(0,E.registerColor)("progressBar.background",{dark:k.Color.fromHex("#0E70C0"),light:k.Color.fromHex("#0E70C0"),hcDark:L.contrastBorder,hcLight:L.contrastBorder},c.localize(63,"Background color of the progress bar that can show for long running operations."))}),define(oe[137],re([1,0,3,33,88,122,277]),function(ae,e,c,k,E,L,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.problemsInfoIconForeground=e.problemsWarningIconForeground=e.problemsErrorIconForeground=e.overviewRulerSelectionHighlightForeground=e.overviewRulerFindMatchForeground=e.overviewRulerCommonContentForeground=e.overviewRulerIncomingContentForeground=e.overviewRulerCurrentContentForeground=e.mergeBorder=e.mergeCommonContentBackground=e.mergeCommonHeaderBackground=e.mergeIncomingContentBackground=e.mergeIncomingHeaderBackground=e.mergeCurrentContentBackground=e.mergeCurrentHeaderBackground=e.breadcrumbsPickerBackground=e.breadcrumbsActiveSelectionForeground=e.breadcrumbsFocusForeground=e.breadcrumbsBackground=e.breadcrumbsForeground=e.toolbarActiveBackground=e.toolbarHoverOutline=e.toolbarHoverBackground=e.widgetBorder=e.widgetShadow=e.diffUnchangedTextBackground=e.diffUnchangedRegionForeground=e.diffUnchangedRegionBackground=e.diffDiagonalFill=e.diffBorder=e.diffRemovedOutline=e.diffInsertedOutline=e.diffOverviewRulerRemoved=e.diffOverviewRulerInserted=e.diffRemovedLineGutter=e.diffInsertedLineGutter=e.diffRemovedLine=e.diffInsertedLine=e.diffRemoved=e.diffInserted=e.defaultRemoveColor=e.defaultInsertColor=e.snippetFinalTabstopHighlightBorder=e.snippetFinalTabstopHighlightBackground=e.snippetTabstopHighlightBorder=e.snippetTabstopHighlightBackground=e.editorLightBulbAiForeground=e.editorLightBulbAutoFixForeground=e.editorLightBulbForeground=e.editorInlayHintParameterBackground=e.editorInlayHintParameterForeground=e.editorInlayHintTypeBackground=e.editorInlayHintTypeForeground=e.editorInlayHintBackground=e.editorInlayHintForeground=e.editorHoverStatusBarBackground=e.editorHoverBorder=e.editorHoverForeground=e.editorHoverBackground=e.editorHoverHighlight=e.editorFindRangeHighlightBorder=e.editorFindMatchHighlightBorder=e.editorFindMatchBorder=e.editorFindRangeHighlight=e.editorFindMatchHighlightForeground=e.editorFindMatchHighlight=e.editorFindMatchForeground=e.editorFindMatch=e.editorSelectionHighlightBorder=e.editorSelectionHighlight=e.editorInactiveSelection=e.editorSelectionForeground=e.editorSelectionBackground=e.editorActiveLinkForeground=e.editorHintBorder=e.editorHintForeground=e.editorInfoBorder=e.editorInfoForeground=e.editorInfoBackground=e.editorWarningBorder=e.editorWarningForeground=e.editorWarningBackground=e.editorErrorBorder=e.editorErrorForeground=e.editorErrorBackground=e.editorWidgetResizeBorder=e.editorWidgetBorder=e.editorWidgetForeground=e.editorWidgetBackground=e.editorStickyScrollShadow=e.editorStickyScrollBorder=e.editorStickyScrollHoverBackground=e.editorStickyScrollBackground=e.editorForeground=e.editorBackground=void 0,e.editorBackground=(0,E.registerColor)("editor.background",{light:"#ffffff",dark:"#1E1E1E",hcDark:k.Color.black,hcLight:k.Color.white},c.localize(159,"Editor background color.")),e.editorForeground=(0,E.registerColor)("editor.foreground",{light:"#333333",dark:"#BBBBBB",hcDark:k.Color.white,hcLight:L.foreground},c.localize(160,"Editor default foreground color.")),e.editorStickyScrollBackground=(0,E.registerColor)("editorStickyScroll.background",e.editorBackground,c.localize(161,"Background color of sticky scroll in the editor")),e.editorStickyScrollHoverBackground=(0,E.registerColor)("editorStickyScrollHover.background",{dark:"#2A2D2E",light:"#F0F0F0",hcDark:null,hcLight:k.Color.fromHex("#0F4A85").transparent(.1)},c.localize(162,"Background color of sticky scroll on hover in the editor")),e.editorStickyScrollBorder=(0,E.registerColor)("editorStickyScroll.border",{dark:null,light:null,hcDark:L.contrastBorder,hcLight:L.contrastBorder},c.localize(163,"Border color of sticky scroll in the editor")),e.editorStickyScrollShadow=(0,E.registerColor)("editorStickyScroll.shadow",y.scrollbarShadow,c.localize(164," Shadow color of sticky scroll in the editor")),e.editorWidgetBackground=(0,E.registerColor)("editorWidget.background",{dark:"#252526",light:"#F3F3F3",hcDark:"#0C141F",hcLight:k.Color.white},c.localize(165,"Background color of editor widgets, such as find/replace.")),e.editorWidgetForeground=(0,E.registerColor)("editorWidget.foreground",L.foreground,c.localize(166,"Foreground color of editor widgets, such as find/replace.")),e.editorWidgetBorder=(0,E.registerColor)("editorWidget.border",{dark:"#454545",light:"#C8C8C8",hcDark:L.contrastBorder,hcLight:L.contrastBorder},c.localize(167,"Border color of editor widgets. The color is only used if the widget chooses to have a border and if the color is not overridden by a widget.")),e.editorWidgetResizeBorder=(0,E.registerColor)("editorWidget.resizeBorder",null,c.localize(168,"Border color of the resize bar of editor widgets. The color is only used if the widget chooses to have a resize border and if the color is not overridden by a widget.")),e.editorErrorBackground=(0,E.registerColor)("editorError.background",null,c.localize(169,"Background color of error text in the editor. The color must not be opaque so as not to hide underlying decorations."),!0),e.editorErrorForeground=(0,E.registerColor)("editorError.foreground",{dark:"#F14C4C",light:"#E51400",hcDark:"#F48771",hcLight:"#B5200D"},c.localize(170,"Foreground color of error squigglies in the editor.")),e.editorErrorBorder=(0,E.registerColor)("editorError.border",{dark:null,light:null,hcDark:k.Color.fromHex("#E47777").transparent(.8),hcLight:"#B5200D"},c.localize(171,"If set, color of double underlines for errors in the editor.")),e.editorWarningBackground=(0,E.registerColor)("editorWarning.background",null,c.localize(172,"Background color of warning text in the editor. The color must not be opaque so as not to hide underlying decorations."),!0),e.editorWarningForeground=(0,E.registerColor)("editorWarning.foreground",{dark:"#CCA700",light:"#BF8803",hcDark:"#FFD370",hcLight:"#895503"},c.localize(173,"Foreground color of warning squigglies in the editor.")),e.editorWarningBorder=(0,E.registerColor)("editorWarning.border",{dark:null,light:null,hcDark:k.Color.fromHex("#FFCC00").transparent(.8),hcLight:k.Color.fromHex("#FFCC00").transparent(.8)},c.localize(174,"If set, color of double underlines for warnings in the editor.")),e.editorInfoBackground=(0,E.registerColor)("editorInfo.background",null,c.localize(175,"Background color of info text in the editor. The color must not be opaque so as not to hide underlying decorations."),!0),e.editorInfoForeground=(0,E.registerColor)("editorInfo.foreground",{dark:"#3794FF",light:"#1a85ff",hcDark:"#3794FF",hcLight:"#1a85ff"},c.localize(176,"Foreground color of info squigglies in the editor.")),e.editorInfoBorder=(0,E.registerColor)("editorInfo.border",{dark:null,light:null,hcDark:k.Color.fromHex("#3794FF").transparent(.8),hcLight:"#292929"},c.localize(177,"If set, color of double underlines for infos in the editor.")),e.editorHintForeground=(0,E.registerColor)("editorHint.foreground",{dark:k.Color.fromHex("#eeeeee").transparent(.7),light:"#6c6c6c",hcDark:null,hcLight:null},c.localize(178,"Foreground color of hint squigglies in the editor.")),e.editorHintBorder=(0,E.registerColor)("editorHint.border",{dark:null,light:null,hcDark:k.Color.fromHex("#eeeeee").transparent(.8),hcLight:"#292929"},c.localize(179,"If set, color of double underlines for hints in the editor.")),e.editorActiveLinkForeground=(0,E.registerColor)("editorLink.activeForeground",{dark:"#4E94CE",light:k.Color.blue,hcDark:k.Color.cyan,hcLight:"#292929"},c.localize(180,"Color of active links.")),e.editorSelectionBackground=(0,E.registerColor)("editor.selectionBackground",{light:"#ADD6FF",dark:"#264F78",hcDark:"#f3f518",hcLight:"#0F4A85"},c.localize(181,"Color of the editor selection.")),e.editorSelectionForeground=(0,E.registerColor)("editor.selectionForeground",{light:null,dark:null,hcDark:"#000000",hcLight:k.Color.white},c.localize(182,"Color of the selected text for high contrast.")),e.editorInactiveSelection=(0,E.registerColor)("editor.inactiveSelectionBackground",{light:(0,E.transparent)(e.editorSelectionBackground,.5),dark:(0,E.transparent)(e.editorSelectionBackground,.5),hcDark:(0,E.transparent)(e.editorSelectionBackground,.7),hcLight:(0,E.transparent)(e.editorSelectionBackground,.5)},c.localize(183,"Color of the selection in an inactive editor. The color must not be opaque so as not to hide underlying decorations."),!0),e.editorSelectionHighlight=(0,E.registerColor)("editor.selectionHighlightBackground",{light:(0,E.lessProminent)(e.editorSelectionBackground,e.editorBackground,.3,.6),dark:(0,E.lessProminent)(e.editorSelectionBackground,e.editorBackground,.3,.6),hcDark:null,hcLight:null},c.localize(184,"Color for regions with the same content as the selection. The color must not be opaque so as not to hide underlying decorations."),!0),e.editorSelectionHighlightBorder=(0,E.registerColor)("editor.selectionHighlightBorder",{light:null,dark:null,hcDark:L.activeContrastBorder,hcLight:L.activeContrastBorder},c.localize(185,"Border color for regions with the same content as the selection.")),e.editorFindMatch=(0,E.registerColor)("editor.findMatchBackground",{light:"#A8AC94",dark:"#515C6A",hcDark:null,hcLight:null},c.localize(186,"Color of the current search match.")),e.editorFindMatchForeground=(0,E.registerColor)("editor.findMatchForeground",null,c.localize(187,"Text color of the current search match.")),e.editorFindMatchHighlight=(0,E.registerColor)("editor.findMatchHighlightBackground",{light:"#EA5C0055",dark:"#EA5C0055",hcDark:null,hcLight:null},c.localize(188,"Color of the other search matches. The color must not be opaque so as not to hide underlying decorations."),!0),e.editorFindMatchHighlightForeground=(0,E.registerColor)("editor.findMatchHighlightForeground",null,c.localize(189,"Foreground color of the other search matches."),!0),e.editorFindRangeHighlight=(0,E.registerColor)("editor.findRangeHighlightBackground",{dark:"#3a3d4166",light:"#b4b4b44d",hcDark:null,hcLight:null},c.localize(190,"Color of the range limiting the search. The color must not be opaque so as not to hide underlying decorations."),!0),e.editorFindMatchBorder=(0,E.registerColor)("editor.findMatchBorder",{light:null,dark:null,hcDark:L.activeContrastBorder,hcLight:L.activeContrastBorder},c.localize(191,"Border color of the current search match.")),e.editorFindMatchHighlightBorder=(0,E.registerColor)("editor.findMatchHighlightBorder",{light:null,dark:null,hcDark:L.activeContrastBorder,hcLight:L.activeContrastBorder},c.localize(192,"Border color of the other search matches.")),e.editorFindRangeHighlightBorder=(0,E.registerColor)("editor.findRangeHighlightBorder",{dark:null,light:null,hcDark:(0,E.transparent)(L.activeContrastBorder,.4),hcLight:(0,E.transparent)(L.activeContrastBorder,.4)},c.localize(193,"Border color of the range limiting the search. The color must not be opaque so as not to hide underlying decorations."),!0),e.editorHoverHighlight=(0,E.registerColor)("editor.hoverHighlightBackground",{light:"#ADD6FF26",dark:"#264f7840",hcDark:"#ADD6FF26",hcLight:null},c.localize(194,"Highlight below the word for which a hover is shown. The color must not be opaque so as not to hide underlying decorations."),!0),e.editorHoverBackground=(0,E.registerColor)("editorHoverWidget.background",e.editorWidgetBackground,c.localize(195,"Background color of the editor hover.")),e.editorHoverForeground=(0,E.registerColor)("editorHoverWidget.foreground",e.editorWidgetForeground,c.localize(196,"Foreground color of the editor hover.")),e.editorHoverBorder=(0,E.registerColor)("editorHoverWidget.border",e.editorWidgetBorder,c.localize(197,"Border color of the editor hover.")),e.editorHoverStatusBarBackground=(0,E.registerColor)("editorHoverWidget.statusBarBackground",{dark:(0,E.lighten)(e.editorHoverBackground,.2),light:(0,E.darken)(e.editorHoverBackground,.05),hcDark:e.editorWidgetBackground,hcLight:e.editorWidgetBackground},c.localize(198,"Background color of the editor hover status bar.")),e.editorInlayHintForeground=(0,E.registerColor)("editorInlayHint.foreground",{dark:"#969696",light:"#969696",hcDark:k.Color.white,hcLight:k.Color.black},c.localize(199,"Foreground color of inline hints")),e.editorInlayHintBackground=(0,E.registerColor)("editorInlayHint.background",{dark:(0,E.transparent)(y.badgeBackground,.1),light:(0,E.transparent)(y.badgeBackground,.1),hcDark:(0,E.transparent)(k.Color.white,.1),hcLight:(0,E.transparent)(y.badgeBackground,.1)},c.localize(200,"Background color of inline hints")),e.editorInlayHintTypeForeground=(0,E.registerColor)("editorInlayHint.typeForeground",e.editorInlayHintForeground,c.localize(201,"Foreground color of inline hints for types")),e.editorInlayHintTypeBackground=(0,E.registerColor)("editorInlayHint.typeBackground",e.editorInlayHintBackground,c.localize(202,"Background color of inline hints for types")),e.editorInlayHintParameterForeground=(0,E.registerColor)("editorInlayHint.parameterForeground",e.editorInlayHintForeground,c.localize(203,"Foreground color of inline hints for parameters")),e.editorInlayHintParameterBackground=(0,E.registerColor)("editorInlayHint.parameterBackground",e.editorInlayHintBackground,c.localize(204,"Background color of inline hints for parameters")),e.editorLightBulbForeground=(0,E.registerColor)("editorLightBulb.foreground",{dark:"#FFCC00",light:"#DDB100",hcDark:"#FFCC00",hcLight:"#007ACC"},c.localize(205,"The color used for the lightbulb actions icon.")),e.editorLightBulbAutoFixForeground=(0,E.registerColor)("editorLightBulbAutoFix.foreground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},c.localize(206,"The color used for the lightbulb auto fix actions icon.")),e.editorLightBulbAiForeground=(0,E.registerColor)("editorLightBulbAi.foreground",e.editorLightBulbForeground,c.localize(207,"The color used for the lightbulb AI icon.")),e.snippetTabstopHighlightBackground=(0,E.registerColor)("editor.snippetTabstopHighlightBackground",{dark:new k.Color(new k.RGBA(124,124,124,.3)),light:new k.Color(new k.RGBA(10,50,100,.2)),hcDark:new k.Color(new k.RGBA(124,124,124,.3)),hcLight:new k.Color(new k.RGBA(10,50,100,.2))},c.localize(208,"Highlight background color of a snippet tabstop.")),e.snippetTabstopHighlightBorder=(0,E.registerColor)("editor.snippetTabstopHighlightBorder",null,c.localize(209,"Highlight border color of a snippet tabstop.")),e.snippetFinalTabstopHighlightBackground=(0,E.registerColor)("editor.snippetFinalTabstopHighlightBackground",null,c.localize(210,"Highlight background color of the final tabstop of a snippet.")),e.snippetFinalTabstopHighlightBorder=(0,E.registerColor)("editor.snippetFinalTabstopHighlightBorder",{dark:"#525252",light:new k.Color(new k.RGBA(10,50,100,.5)),hcDark:"#525252",hcLight:"#292929"},c.localize(211,"Highlight border color of the final tabstop of a snippet.")),e.defaultInsertColor=new k.Color(new k.RGBA(155,185,85,.2)),e.defaultRemoveColor=new k.Color(new k.RGBA(255,0,0,.2)),e.diffInserted=(0,E.registerColor)("diffEditor.insertedTextBackground",{dark:"#9ccc2c33",light:"#9ccc2c40",hcDark:null,hcLight:null},c.localize(212,"Background color for text that got inserted. The color must not be opaque so as not to hide underlying decorations."),!0),e.diffRemoved=(0,E.registerColor)("diffEditor.removedTextBackground",{dark:"#ff000033",light:"#ff000033",hcDark:null,hcLight:null},c.localize(213,"Background color for text that got removed. The color must not be opaque so as not to hide underlying decorations."),!0),e.diffInsertedLine=(0,E.registerColor)("diffEditor.insertedLineBackground",{dark:e.defaultInsertColor,light:e.defaultInsertColor,hcDark:null,hcLight:null},c.localize(214,"Background color for lines that got inserted. The color must not be opaque so as not to hide underlying decorations."),!0),e.diffRemovedLine=(0,E.registerColor)("diffEditor.removedLineBackground",{dark:e.defaultRemoveColor,light:e.defaultRemoveColor,hcDark:null,hcLight:null},c.localize(215,"Background color for lines that got removed. The color must not be opaque so as not to hide underlying decorations."),!0),e.diffInsertedLineGutter=(0,E.registerColor)("diffEditorGutter.insertedLineBackground",null,c.localize(216,"Background color for the margin where lines got inserted.")),e.diffRemovedLineGutter=(0,E.registerColor)("diffEditorGutter.removedLineBackground",null,c.localize(217,"Background color for the margin where lines got removed.")),e.diffOverviewRulerInserted=(0,E.registerColor)("diffEditorOverview.insertedForeground",null,c.localize(218,"Diff overview ruler foreground for inserted content.")),e.diffOverviewRulerRemoved=(0,E.registerColor)("diffEditorOverview.removedForeground",null,c.localize(219,"Diff overview ruler foreground for removed content.")),e.diffInsertedOutline=(0,E.registerColor)("diffEditor.insertedTextBorder",{dark:null,light:null,hcDark:"#33ff2eff",hcLight:"#374E06"},c.localize(220,"Outline color for the text that got inserted.")),e.diffRemovedOutline=(0,E.registerColor)("diffEditor.removedTextBorder",{dark:null,light:null,hcDark:"#FF008F",hcLight:"#AD0707"},c.localize(221,"Outline color for text that got removed.")),e.diffBorder=(0,E.registerColor)("diffEditor.border",{dark:null,light:null,hcDark:L.contrastBorder,hcLight:L.contrastBorder},c.localize(222,"Border color between the two text editors.")),e.diffDiagonalFill=(0,E.registerColor)("diffEditor.diagonalFill",{dark:"#cccccc33",light:"#22222233",hcDark:null,hcLight:null},c.localize(223,"Color of the diff editor's diagonal fill. The diagonal fill is used in side-by-side diff views.")),e.diffUnchangedRegionBackground=(0,E.registerColor)("diffEditor.unchangedRegionBackground","sideBar.background",c.localize(224,"The background color of unchanged blocks in the diff editor.")),e.diffUnchangedRegionForeground=(0,E.registerColor)("diffEditor.unchangedRegionForeground","foreground",c.localize(225,"The foreground color of unchanged blocks in the diff editor.")),e.diffUnchangedTextBackground=(0,E.registerColor)("diffEditor.unchangedCodeBackground",{dark:"#74747429",light:"#b8b8b829",hcDark:null,hcLight:null},c.localize(226,"The background color of unchanged code in the diff editor.")),e.widgetShadow=(0,E.registerColor)("widget.shadow",{dark:(0,E.transparent)(k.Color.black,.36),light:(0,E.transparent)(k.Color.black,.16),hcDark:null,hcLight:null},c.localize(227,"Shadow color of widgets such as find/replace inside the editor.")),e.widgetBorder=(0,E.registerColor)("widget.border",{dark:null,light:null,hcDark:L.contrastBorder,hcLight:L.contrastBorder},c.localize(228,"Border color of widgets such as find/replace inside the editor.")),e.toolbarHoverBackground=(0,E.registerColor)("toolbar.hoverBackground",{dark:"#5a5d5e50",light:"#b8b8b850",hcDark:null,hcLight:null},c.localize(229,"Toolbar background when hovering over actions using the mouse")),e.toolbarHoverOutline=(0,E.registerColor)("toolbar.hoverOutline",{dark:null,light:null,hcDark:L.activeContrastBorder,hcLight:L.activeContrastBorder},c.localize(230,"Toolbar outline when hovering over actions using the mouse")),e.toolbarActiveBackground=(0,E.registerColor)("toolbar.activeBackground",{dark:(0,E.lighten)(e.toolbarHoverBackground,.1),light:(0,E.darken)(e.toolbarHoverBackground,.1),hcDark:null,hcLight:null},c.localize(231,"Toolbar background when holding the mouse over actions")),e.breadcrumbsForeground=(0,E.registerColor)("breadcrumb.foreground",(0,E.transparent)(L.foreground,.8),c.localize(232,"Color of focused breadcrumb items.")),e.breadcrumbsBackground=(0,E.registerColor)("breadcrumb.background",e.editorBackground,c.localize(233,"Background color of breadcrumb items.")),e.breadcrumbsFocusForeground=(0,E.registerColor)("breadcrumb.focusForeground",{light:(0,E.darken)(L.foreground,.2),dark:(0,E.lighten)(L.foreground,.1),hcDark:(0,E.lighten)(L.foreground,.1),hcLight:(0,E.lighten)(L.foreground,.1)},c.localize(234,"Color of focused breadcrumb items.")),e.breadcrumbsActiveSelectionForeground=(0,E.registerColor)("breadcrumb.activeSelectionForeground",{light:(0,E.darken)(L.foreground,.2),dark:(0,E.lighten)(L.foreground,.1),hcDark:(0,E.lighten)(L.foreground,.1),hcLight:(0,E.lighten)(L.foreground,.1)},c.localize(235,"Color of selected breadcrumb items.")),e.breadcrumbsPickerBackground=(0,E.registerColor)("breadcrumbPicker.background",e.editorWidgetBackground,c.localize(236,"Background color of breadcrumb item picker."));const f=.5,_=k.Color.fromHex("#40C8AE").transparent(f),C=k.Color.fromHex("#40A6FF").transparent(f),p=k.Color.fromHex("#606060").transparent(.4),n=.4,s=1;e.mergeCurrentHeaderBackground=(0,E.registerColor)("merge.currentHeaderBackground",{dark:_,light:_,hcDark:null,hcLight:null},c.localize(237,"Current header background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0),e.mergeCurrentContentBackground=(0,E.registerColor)("merge.currentContentBackground",(0,E.transparent)(e.mergeCurrentHeaderBackground,n),c.localize(238,"Current content background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0),e.mergeIncomingHeaderBackground=(0,E.registerColor)("merge.incomingHeaderBackground",{dark:C,light:C,hcDark:null,hcLight:null},c.localize(239,"Incoming header background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0),e.mergeIncomingContentBackground=(0,E.registerColor)("merge.incomingContentBackground",(0,E.transparent)(e.mergeIncomingHeaderBackground,n),c.localize(240,"Incoming content background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0),e.mergeCommonHeaderBackground=(0,E.registerColor)("merge.commonHeaderBackground",{dark:p,light:p,hcDark:null,hcLight:null},c.localize(241,"Common ancestor header background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0),e.mergeCommonContentBackground=(0,E.registerColor)("merge.commonContentBackground",(0,E.transparent)(e.mergeCommonHeaderBackground,n),c.localize(242,"Common ancestor content background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0),e.mergeBorder=(0,E.registerColor)("merge.border",{dark:null,light:null,hcDark:"#C3DF6F",hcLight:"#007ACC"},c.localize(243,"Border color on headers and the splitter in inline merge-conflicts.")),e.overviewRulerCurrentContentForeground=(0,E.registerColor)("editorOverviewRuler.currentContentForeground",{dark:(0,E.transparent)(e.mergeCurrentHeaderBackground,s),light:(0,E.transparent)(e.mergeCurrentHeaderBackground,s),hcDark:e.mergeBorder,hcLight:e.mergeBorder},c.localize(244,"Current overview ruler foreground for inline merge-conflicts.")),e.overviewRulerIncomingContentForeground=(0,E.registerColor)("editorOverviewRuler.incomingContentForeground",{dark:(0,E.transparent)(e.mergeIncomingHeaderBackground,s),light:(0,E.transparent)(e.mergeIncomingHeaderBackground,s),hcDark:e.mergeBorder,hcLight:e.mergeBorder},c.localize(245,"Incoming overview ruler foreground for inline merge-conflicts.")),e.overviewRulerCommonContentForeground=(0,E.registerColor)("editorOverviewRuler.commonContentForeground",{dark:(0,E.transparent)(e.mergeCommonHeaderBackground,s),light:(0,E.transparent)(e.mergeCommonHeaderBackground,s),hcDark:e.mergeBorder,hcLight:e.mergeBorder},c.localize(246,"Common ancestor overview ruler foreground for inline merge-conflicts.")),e.overviewRulerFindMatchForeground=(0,E.registerColor)("editorOverviewRuler.findMatchForeground",{dark:"#d186167e",light:"#d186167e",hcDark:"#AB5A00",hcLight:""},c.localize(247,"Overview ruler marker color for find matches. The color must not be opaque so as not to hide underlying decorations."),!0),e.overviewRulerSelectionHighlightForeground=(0,E.registerColor)("editorOverviewRuler.selectionHighlightForeground","#A0A0A0CC",c.localize(248,"Overview ruler marker color for selection highlights. The color must not be opaque so as not to hide underlying decorations."),!0),e.problemsErrorIconForeground=(0,E.registerColor)("problemsErrorIcon.foreground",e.editorErrorForeground,c.localize(249,"The color used for the problems error icon.")),e.problemsWarningIconForeground=(0,E.registerColor)("problemsWarningIcon.foreground",e.editorWarningForeground,c.localize(250,"The color used for the problems warning icon.")),e.problemsInfoIconForeground=(0,E.registerColor)("problemsInfoIcon.foreground",e.editorInfoForeground,c.localize(251,"The color used for the problems info icon."))}),define(oe[407],re([1,0,3,33,88,122,137]),function(ae,e,c,k,E,L,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.keybindingLabelBottomBorder=e.keybindingLabelBorder=e.keybindingLabelForeground=e.keybindingLabelBackground=e.checkboxSelectBorder=e.checkboxBorder=e.checkboxForeground=e.checkboxSelectBackground=e.checkboxBackground=e.radioInactiveHoverBackground=e.radioInactiveBorder=e.radioInactiveBackground=e.radioInactiveForeground=e.radioActiveBorder=e.radioActiveBackground=e.radioActiveForeground=e.buttonSecondaryHoverBackground=e.buttonSecondaryBackground=e.buttonSecondaryForeground=e.buttonBorder=e.buttonHoverBackground=e.buttonBackground=e.buttonSeparator=e.buttonForeground=e.selectBorder=e.selectForeground=e.selectListBackground=e.selectBackground=e.inputValidationErrorBorder=e.inputValidationErrorForeground=e.inputValidationErrorBackground=e.inputValidationWarningBorder=e.inputValidationWarningForeground=e.inputValidationWarningBackground=e.inputValidationInfoBorder=e.inputValidationInfoForeground=e.inputValidationInfoBackground=e.inputPlaceholderForeground=e.inputActiveOptionForeground=e.inputActiveOptionBackground=e.inputActiveOptionHoverBackground=e.inputActiveOptionBorder=e.inputBorder=e.inputForeground=e.inputBackground=void 0,e.inputBackground=(0,E.registerColor)("input.background",{dark:"#3C3C3C",light:k.Color.white,hcDark:k.Color.black,hcLight:k.Color.white},c.localize(114,"Input box background.")),e.inputForeground=(0,E.registerColor)("input.foreground",L.foreground,c.localize(115,"Input box foreground.")),e.inputBorder=(0,E.registerColor)("input.border",{dark:null,light:null,hcDark:L.contrastBorder,hcLight:L.contrastBorder},c.localize(116,"Input box border.")),e.inputActiveOptionBorder=(0,E.registerColor)("inputOption.activeBorder",{dark:"#007ACC",light:"#007ACC",hcDark:L.contrastBorder,hcLight:L.contrastBorder},c.localize(117,"Border color of activated options in input fields.")),e.inputActiveOptionHoverBackground=(0,E.registerColor)("inputOption.hoverBackground",{dark:"#5a5d5e80",light:"#b8b8b850",hcDark:null,hcLight:null},c.localize(118,"Background color of activated options in input fields.")),e.inputActiveOptionBackground=(0,E.registerColor)("inputOption.activeBackground",{dark:(0,E.transparent)(L.focusBorder,.4),light:(0,E.transparent)(L.focusBorder,.2),hcDark:k.Color.transparent,hcLight:k.Color.transparent},c.localize(119,"Background hover color of options in input fields.")),e.inputActiveOptionForeground=(0,E.registerColor)("inputOption.activeForeground",{dark:k.Color.white,light:k.Color.black,hcDark:L.foreground,hcLight:L.foreground},c.localize(120,"Foreground color of activated options in input fields.")),e.inputPlaceholderForeground=(0,E.registerColor)("input.placeholderForeground",{light:(0,E.transparent)(L.foreground,.5),dark:(0,E.transparent)(L.foreground,.5),hcDark:(0,E.transparent)(L.foreground,.7),hcLight:(0,E.transparent)(L.foreground,.7)},c.localize(121,"Input box foreground color for placeholder text.")),e.inputValidationInfoBackground=(0,E.registerColor)("inputValidation.infoBackground",{dark:"#063B49",light:"#D6ECF2",hcDark:k.Color.black,hcLight:k.Color.white},c.localize(122,"Input validation background color for information severity.")),e.inputValidationInfoForeground=(0,E.registerColor)("inputValidation.infoForeground",{dark:null,light:null,hcDark:null,hcLight:L.foreground},c.localize(123,"Input validation foreground color for information severity.")),e.inputValidationInfoBorder=(0,E.registerColor)("inputValidation.infoBorder",{dark:"#007acc",light:"#007acc",hcDark:L.contrastBorder,hcLight:L.contrastBorder},c.localize(124,"Input validation border color for information severity.")),e.inputValidationWarningBackground=(0,E.registerColor)("inputValidation.warningBackground",{dark:"#352A05",light:"#F6F5D2",hcDark:k.Color.black,hcLight:k.Color.white},c.localize(125,"Input validation background color for warning severity.")),e.inputValidationWarningForeground=(0,E.registerColor)("inputValidation.warningForeground",{dark:null,light:null,hcDark:null,hcLight:L.foreground},c.localize(126,"Input validation foreground color for warning severity.")),e.inputValidationWarningBorder=(0,E.registerColor)("inputValidation.warningBorder",{dark:"#B89500",light:"#B89500",hcDark:L.contrastBorder,hcLight:L.contrastBorder},c.localize(127,"Input validation border color for warning severity.")),e.inputValidationErrorBackground=(0,E.registerColor)("inputValidation.errorBackground",{dark:"#5A1D1D",light:"#F2DEDE",hcDark:k.Color.black,hcLight:k.Color.white},c.localize(128,"Input validation background color for error severity.")),e.inputValidationErrorForeground=(0,E.registerColor)("inputValidation.errorForeground",{dark:null,light:null,hcDark:null,hcLight:L.foreground},c.localize(129,"Input validation foreground color for error severity.")),e.inputValidationErrorBorder=(0,E.registerColor)("inputValidation.errorBorder",{dark:"#BE1100",light:"#BE1100",hcDark:L.contrastBorder,hcLight:L.contrastBorder},c.localize(130,"Input validation border color for error severity.")),e.selectBackground=(0,E.registerColor)("dropdown.background",{dark:"#3C3C3C",light:k.Color.white,hcDark:k.Color.black,hcLight:k.Color.white},c.localize(131,"Dropdown background.")),e.selectListBackground=(0,E.registerColor)("dropdown.listBackground",{dark:null,light:null,hcDark:k.Color.black,hcLight:k.Color.white},c.localize(132,"Dropdown list background.")),e.selectForeground=(0,E.registerColor)("dropdown.foreground",{dark:"#F0F0F0",light:L.foreground,hcDark:k.Color.white,hcLight:L.foreground},c.localize(133,"Dropdown foreground.")),e.selectBorder=(0,E.registerColor)("dropdown.border",{dark:e.selectBackground,light:"#CECECE",hcDark:L.contrastBorder,hcLight:L.contrastBorder},c.localize(134,"Dropdown border.")),e.buttonForeground=(0,E.registerColor)("button.foreground",k.Color.white,c.localize(135,"Button foreground color.")),e.buttonSeparator=(0,E.registerColor)("button.separator",(0,E.transparent)(e.buttonForeground,.4),c.localize(136,"Button separator color.")),e.buttonBackground=(0,E.registerColor)("button.background",{dark:"#0E639C",light:"#007ACC",hcDark:null,hcLight:"#0F4A85"},c.localize(137,"Button background color.")),e.buttonHoverBackground=(0,E.registerColor)("button.hoverBackground",{dark:(0,E.lighten)(e.buttonBackground,.2),light:(0,E.darken)(e.buttonBackground,.2),hcDark:e.buttonBackground,hcLight:e.buttonBackground},c.localize(138,"Button background color when hovering.")),e.buttonBorder=(0,E.registerColor)("button.border",L.contrastBorder,c.localize(139,"Button border color.")),e.buttonSecondaryForeground=(0,E.registerColor)("button.secondaryForeground",{dark:k.Color.white,light:k.Color.white,hcDark:k.Color.white,hcLight:L.foreground},c.localize(140,"Secondary button foreground color.")),e.buttonSecondaryBackground=(0,E.registerColor)("button.secondaryBackground",{dark:"#3A3D41",light:"#5F6A79",hcDark:null,hcLight:k.Color.white},c.localize(141,"Secondary button background color.")),e.buttonSecondaryHoverBackground=(0,E.registerColor)("button.secondaryHoverBackground",{dark:(0,E.lighten)(e.buttonSecondaryBackground,.2),light:(0,E.darken)(e.buttonSecondaryBackground,.2),hcDark:null,hcLight:null},c.localize(142,"Secondary button background color when hovering.")),e.radioActiveForeground=(0,E.registerColor)("radio.activeForeground",e.inputActiveOptionForeground,c.localize(143,"Foreground color of active radio option.")),e.radioActiveBackground=(0,E.registerColor)("radio.activeBackground",e.inputActiveOptionBackground,c.localize(144,"Background color of active radio option.")),e.radioActiveBorder=(0,E.registerColor)("radio.activeBorder",e.inputActiveOptionBorder,c.localize(145,"Border color of the active radio option.")),e.radioInactiveForeground=(0,E.registerColor)("radio.inactiveForeground",null,c.localize(146,"Foreground color of inactive radio option.")),e.radioInactiveBackground=(0,E.registerColor)("radio.inactiveBackground",null,c.localize(147,"Background color of inactive radio option.")),e.radioInactiveBorder=(0,E.registerColor)("radio.inactiveBorder",{light:(0,E.transparent)(e.radioActiveForeground,.2),dark:(0,E.transparent)(e.radioActiveForeground,.2),hcDark:(0,E.transparent)(e.radioActiveForeground,.4),hcLight:(0,E.transparent)(e.radioActiveForeground,.2)},c.localize(148,"Border color of the inactive radio option.")),e.radioInactiveHoverBackground=(0,E.registerColor)("radio.inactiveHoverBackground",e.inputActiveOptionHoverBackground,c.localize(149,"Background color of inactive active radio option when hovering.")),e.checkboxBackground=(0,E.registerColor)("checkbox.background",e.selectBackground,c.localize(150,"Background color of checkbox widget.")),e.checkboxSelectBackground=(0,E.registerColor)("checkbox.selectBackground",y.editorWidgetBackground,c.localize(151,"Background color of checkbox widget when the element it's in is selected.")),e.checkboxForeground=(0,E.registerColor)("checkbox.foreground",e.selectForeground,c.localize(152,"Foreground color of checkbox widget.")),e.checkboxBorder=(0,E.registerColor)("checkbox.border",e.selectBorder,c.localize(153,"Border color of checkbox widget.")),e.checkboxSelectBorder=(0,E.registerColor)("checkbox.selectBorder",L.iconForeground,c.localize(154,"Border color of checkbox widget when the element it's in is selected.")),e.keybindingLabelBackground=(0,E.registerColor)("keybindingLabel.background",{dark:new k.Color(new k.RGBA(128,128,128,.17)),light:new k.Color(new k.RGBA(221,221,221,.4)),hcDark:k.Color.transparent,hcLight:k.Color.transparent},c.localize(155,"Keybinding label background color. The keybinding label is used to represent a keyboard shortcut.")),e.keybindingLabelForeground=(0,E.registerColor)("keybindingLabel.foreground",{dark:k.Color.fromHex("#CCCCCC"),light:k.Color.fromHex("#555555"),hcDark:k.Color.white,hcLight:L.foreground},c.localize(156,"Keybinding label foreground color. The keybinding label is used to represent a keyboard shortcut.")),e.keybindingLabelBorder=(0,E.registerColor)("keybindingLabel.border",{dark:new k.Color(new k.RGBA(51,51,51,.6)),light:new k.Color(new k.RGBA(204,204,204,.4)),hcDark:new k.Color(new k.RGBA(111,195,223)),hcLight:L.contrastBorder},c.localize(157,"Keybinding label border color. The keybinding label is used to represent a keyboard shortcut.")),e.keybindingLabelBottomBorder=(0,E.registerColor)("keybindingLabel.bottomBorder",{dark:new k.Color(new k.RGBA(68,68,68,.6)),light:new k.Color(new k.RGBA(187,187,187,.4)),hcDark:new k.Color(new k.RGBA(111,195,223)),hcLight:L.foreground},c.localize(158,"Keybinding label border bottom color. The keybinding label is used to represent a keyboard shortcut."))}),define(oe[278],re([1,0,3,33,88,122,137]),function(ae,e,c,k,E,L,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.tableOddRowsBackgroundColor=e.tableColumnsBorder=e.treeInactiveIndentGuidesStroke=e.treeIndentGuidesStroke=e.listDeemphasizedForeground=e.listFilterMatchHighlightBorder=e.listFilterMatchHighlight=e.listFilterWidgetShadow=e.listFilterWidgetNoMatchesOutline=e.listFilterWidgetOutline=e.listFilterWidgetBackground=e.listWarningForeground=e.listErrorForeground=e.listInvalidItemForeground=e.listFocusHighlightForeground=e.listHighlightForeground=e.listDropBetweenBackground=e.listDropOverBackground=e.listHoverForeground=e.listHoverBackground=e.listInactiveFocusOutline=e.listInactiveFocusBackground=e.listInactiveSelectionIconForeground=e.listInactiveSelectionForeground=e.listInactiveSelectionBackground=e.listActiveSelectionIconForeground=e.listActiveSelectionForeground=e.listActiveSelectionBackground=e.listFocusAndSelectionOutline=e.listFocusOutline=e.listFocusForeground=e.listFocusBackground=void 0,e.listFocusBackground=(0,E.registerColor)("list.focusBackground",null,c.localize(82,"List/Tree background color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),e.listFocusForeground=(0,E.registerColor)("list.focusForeground",null,c.localize(83,"List/Tree foreground color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),e.listFocusOutline=(0,E.registerColor)("list.focusOutline",{dark:L.focusBorder,light:L.focusBorder,hcDark:L.activeContrastBorder,hcLight:L.activeContrastBorder},c.localize(84,"List/Tree outline color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),e.listFocusAndSelectionOutline=(0,E.registerColor)("list.focusAndSelectionOutline",null,c.localize(85,"List/Tree outline color for the focused item when the list/tree is active and selected. An active list/tree has keyboard focus, an inactive does not.")),e.listActiveSelectionBackground=(0,E.registerColor)("list.activeSelectionBackground",{dark:"#04395E",light:"#0060C0",hcDark:null,hcLight:k.Color.fromHex("#0F4A85").transparent(.1)},c.localize(86,"List/Tree background color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),e.listActiveSelectionForeground=(0,E.registerColor)("list.activeSelectionForeground",{dark:k.Color.white,light:k.Color.white,hcDark:null,hcLight:null},c.localize(87,"List/Tree foreground color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),e.listActiveSelectionIconForeground=(0,E.registerColor)("list.activeSelectionIconForeground",null,c.localize(88,"List/Tree icon foreground color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),e.listInactiveSelectionBackground=(0,E.registerColor)("list.inactiveSelectionBackground",{dark:"#37373D",light:"#E4E6F1",hcDark:null,hcLight:k.Color.fromHex("#0F4A85").transparent(.1)},c.localize(89,"List/Tree background color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),e.listInactiveSelectionForeground=(0,E.registerColor)("list.inactiveSelectionForeground",null,c.localize(90,"List/Tree foreground color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),e.listInactiveSelectionIconForeground=(0,E.registerColor)("list.inactiveSelectionIconForeground",null,c.localize(91,"List/Tree icon foreground color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),e.listInactiveFocusBackground=(0,E.registerColor)("list.inactiveFocusBackground",null,c.localize(92,"List/Tree background color for the focused item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),e.listInactiveFocusOutline=(0,E.registerColor)("list.inactiveFocusOutline",null,c.localize(93,"List/Tree outline color for the focused item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),e.listHoverBackground=(0,E.registerColor)("list.hoverBackground",{dark:"#2A2D2E",light:"#F0F0F0",hcDark:k.Color.white.transparent(.1),hcLight:k.Color.fromHex("#0F4A85").transparent(.1)},c.localize(94,"List/Tree background when hovering over items using the mouse.")),e.listHoverForeground=(0,E.registerColor)("list.hoverForeground",null,c.localize(95,"List/Tree foreground when hovering over items using the mouse.")),e.listDropOverBackground=(0,E.registerColor)("list.dropBackground",{dark:"#062F4A",light:"#D6EBFF",hcDark:null,hcLight:null},c.localize(96,"List/Tree drag and drop background when moving items over other items when using the mouse.")),e.listDropBetweenBackground=(0,E.registerColor)("list.dropBetweenBackground",{dark:L.iconForeground,light:L.iconForeground,hcDark:null,hcLight:null},c.localize(97,"List/Tree drag and drop border color when moving items between items when using the mouse.")),e.listHighlightForeground=(0,E.registerColor)("list.highlightForeground",{dark:"#2AAAFF",light:"#0066BF",hcDark:L.focusBorder,hcLight:L.focusBorder},c.localize(98,"List/Tree foreground color of the match highlights when searching inside the list/tree.")),e.listFocusHighlightForeground=(0,E.registerColor)("list.focusHighlightForeground",{dark:e.listHighlightForeground,light:(0,E.ifDefinedThenElse)(e.listActiveSelectionBackground,e.listHighlightForeground,"#BBE7FF"),hcDark:e.listHighlightForeground,hcLight:e.listHighlightForeground},c.localize(99,"List/Tree foreground color of the match highlights on actively focused items when searching inside the list/tree.")),e.listInvalidItemForeground=(0,E.registerColor)("list.invalidItemForeground",{dark:"#B89500",light:"#B89500",hcDark:"#B89500",hcLight:"#B5200D"},c.localize(100,"List/Tree foreground color for invalid items, for example an unresolved root in explorer.")),e.listErrorForeground=(0,E.registerColor)("list.errorForeground",{dark:"#F88070",light:"#B01011",hcDark:null,hcLight:null},c.localize(101,"Foreground color of list items containing errors.")),e.listWarningForeground=(0,E.registerColor)("list.warningForeground",{dark:"#CCA700",light:"#855F00",hcDark:null,hcLight:null},c.localize(102,"Foreground color of list items containing warnings.")),e.listFilterWidgetBackground=(0,E.registerColor)("listFilterWidget.background",{light:(0,E.darken)(y.editorWidgetBackground,0),dark:(0,E.lighten)(y.editorWidgetBackground,0),hcDark:y.editorWidgetBackground,hcLight:y.editorWidgetBackground},c.localize(103,"Background color of the type filter widget in lists and trees.")),e.listFilterWidgetOutline=(0,E.registerColor)("listFilterWidget.outline",{dark:k.Color.transparent,light:k.Color.transparent,hcDark:"#f38518",hcLight:"#007ACC"},c.localize(104,"Outline color of the type filter widget in lists and trees.")),e.listFilterWidgetNoMatchesOutline=(0,E.registerColor)("listFilterWidget.noMatchesOutline",{dark:"#BE1100",light:"#BE1100",hcDark:L.contrastBorder,hcLight:L.contrastBorder},c.localize(105,"Outline color of the type filter widget in lists and trees, when there are no matches.")),e.listFilterWidgetShadow=(0,E.registerColor)("listFilterWidget.shadow",y.widgetShadow,c.localize(106,"Shadow color of the type filter widget in lists and trees.")),e.listFilterMatchHighlight=(0,E.registerColor)("list.filterMatchBackground",{dark:y.editorFindMatchHighlight,light:y.editorFindMatchHighlight,hcDark:null,hcLight:null},c.localize(107,"Background color of the filtered match.")),e.listFilterMatchHighlightBorder=(0,E.registerColor)("list.filterMatchBorder",{dark:y.editorFindMatchHighlightBorder,light:y.editorFindMatchHighlightBorder,hcDark:L.contrastBorder,hcLight:L.activeContrastBorder},c.localize(108,"Border color of the filtered match.")),e.listDeemphasizedForeground=(0,E.registerColor)("list.deemphasizedForeground",{dark:"#8C8C8C",light:"#8E8E90",hcDark:"#A7A8A9",hcLight:"#666666"},c.localize(109,"List/Tree foreground color for items that are deemphasized.")),e.treeIndentGuidesStroke=(0,E.registerColor)("tree.indentGuidesStroke",{dark:"#585858",light:"#a9a9a9",hcDark:"#a9a9a9",hcLight:"#a5a5a5"},c.localize(110,"Tree stroke color for the indentation guides.")),e.treeInactiveIndentGuidesStroke=(0,E.registerColor)("tree.inactiveIndentGuidesStroke",(0,E.transparent)(e.treeIndentGuidesStroke,.4),c.localize(111,"Tree stroke color for the indentation guides that are not active.")),e.tableColumnsBorder=(0,E.registerColor)("tree.tableColumnsBorder",{dark:"#CCCCCC20",light:"#61616120",hcDark:null,hcLight:null},c.localize(112,"Table border color between columns.")),e.tableOddRowsBackgroundColor=(0,E.registerColor)("tree.tableOddRowsBackground",{dark:(0,E.transparent)(L.foreground,.04),light:(0,E.transparent)(L.foreground,.04),hcDark:null,hcLight:null},c.localize(113,"Background color for odd table rows."))}),define(oe[742],re([1,0,3,88,122,407,278]),function(ae,e,c,k,E,L,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.menuSeparatorBackground=e.menuSelectionBorder=e.menuSelectionBackground=e.menuSelectionForeground=e.menuBackground=e.menuForeground=e.menuBorder=void 0,e.menuBorder=(0,k.registerColor)("menu.border",{dark:null,light:null,hcDark:E.contrastBorder,hcLight:E.contrastBorder},c.localize(75,"Border color of menus.")),e.menuForeground=(0,k.registerColor)("menu.foreground",L.selectForeground,c.localize(76,"Foreground color of menu items.")),e.menuBackground=(0,k.registerColor)("menu.background",L.selectBackground,c.localize(77,"Background color of menu items.")),e.menuSelectionForeground=(0,k.registerColor)("menu.selectionForeground",y.listActiveSelectionForeground,c.localize(78,"Foreground color of the selected menu item in menus.")),e.menuSelectionBackground=(0,k.registerColor)("menu.selectionBackground",y.listActiveSelectionBackground,c.localize(79,"Background color of the selected menu item in menus.")),e.menuSelectionBorder=(0,k.registerColor)("menu.selectionBorder",{dark:null,light:null,hcDark:E.activeContrastBorder,hcLight:E.activeContrastBorder},c.localize(80,"Border color of the selected menu item in menus.")),e.menuSeparatorBackground=(0,k.registerColor)("menu.separatorBackground",{dark:"#606060",light:"#D4D4D4",hcDark:E.contrastBorder,hcLight:E.contrastBorder},c.localize(81,"Color of a separator menu item in menus."))}),define(oe[408],re([1,0,3,33,88,137,277]),function(ae,e,c,k,E,L,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.minimapSliderActiveBackground=e.minimapSliderHoverBackground=e.minimapSliderBackground=e.minimapForegroundOpacity=e.minimapBackground=e.minimapError=e.minimapWarning=e.minimapInfo=e.minimapSelection=e.minimapSelectionOccurrenceHighlight=e.minimapFindMatch=void 0,e.minimapFindMatch=(0,E.registerColor)("minimap.findMatchHighlight",{light:"#d18616",dark:"#d18616",hcDark:"#AB5A00",hcLight:"#0F4A85"},c.localize(64,"Minimap marker color for find matches."),!0),e.minimapSelectionOccurrenceHighlight=(0,E.registerColor)("minimap.selectionOccurrenceHighlight",{light:"#c9c9c9",dark:"#676767",hcDark:"#ffffff",hcLight:"#0F4A85"},c.localize(65,"Minimap marker color for repeating editor selections."),!0),e.minimapSelection=(0,E.registerColor)("minimap.selectionHighlight",{light:"#ADD6FF",dark:"#264F78",hcDark:"#ffffff",hcLight:"#0F4A85"},c.localize(66,"Minimap marker color for the editor selection."),!0),e.minimapInfo=(0,E.registerColor)("minimap.infoHighlight",{dark:L.editorInfoForeground,light:L.editorInfoForeground,hcDark:L.editorInfoBorder,hcLight:L.editorInfoBorder},c.localize(67,"Minimap marker color for infos.")),e.minimapWarning=(0,E.registerColor)("minimap.warningHighlight",{dark:L.editorWarningForeground,light:L.editorWarningForeground,hcDark:L.editorWarningBorder,hcLight:L.editorWarningBorder},c.localize(68,"Minimap marker color for warnings.")),e.minimapError=(0,E.registerColor)("minimap.errorHighlight",{dark:new k.Color(new k.RGBA(255,18,18,.7)),light:new k.Color(new k.RGBA(255,18,18,.7)),hcDark:new k.Color(new k.RGBA(255,50,50,1)),hcLight:"#B5200D"},c.localize(69,"Minimap marker color for errors.")),e.minimapBackground=(0,E.registerColor)("minimap.background",null,c.localize(70,"Minimap background color.")),e.minimapForegroundOpacity=(0,E.registerColor)("minimap.foregroundOpacity",k.Color.fromHex("#000f"),c.localize(71,'Opacity of foreground elements rendered in the minimap. For example, "#000000c0" will render the elements with 75% opacity.')),e.minimapSliderBackground=(0,E.registerColor)("minimapSlider.background",(0,E.transparent)(y.scrollbarSliderBackground,.5),c.localize(72,"Minimap slider background color.")),e.minimapSliderHoverBackground=(0,E.registerColor)("minimapSlider.hoverBackground",(0,E.transparent)(y.scrollbarSliderHoverBackground,.5),c.localize(73,"Minimap slider background color when hovering.")),e.minimapSliderActiveBackground=(0,E.registerColor)("minimapSlider.activeBackground",(0,E.transparent)(y.scrollbarSliderActiveBackground,.5),c.localize(74,"Minimap slider background color when clicked on."))}),define(oe[743],re([1,0,3,88,122,137,408]),function(ae,e,c,k,E,L,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.chartsPurple=e.chartsGreen=e.chartsOrange=e.chartsYellow=e.chartsBlue=e.chartsRed=e.chartsLines=e.chartsForeground=void 0,e.chartsForeground=(0,k.registerColor)("charts.foreground",E.foreground,c.localize(252,"The foreground color used in charts.")),e.chartsLines=(0,k.registerColor)("charts.lines",(0,k.transparent)(E.foreground,.5),c.localize(253,"The color used for horizontal lines in charts.")),e.chartsRed=(0,k.registerColor)("charts.red",L.editorErrorForeground,c.localize(254,"The red color used in chart visualizations.")),e.chartsBlue=(0,k.registerColor)("charts.blue",L.editorInfoForeground,c.localize(255,"The blue color used in chart visualizations.")),e.chartsYellow=(0,k.registerColor)("charts.yellow",L.editorWarningForeground,c.localize(256,"The yellow color used in chart visualizations.")),e.chartsOrange=(0,k.registerColor)("charts.orange",y.minimapFindMatch,c.localize(257,"The orange color used in chart visualizations.")),e.chartsGreen=(0,k.registerColor)("charts.green",{dark:"#89D185",light:"#388A34",hcDark:"#89D185",hcLight:"#374e06"},c.localize(258,"The green color used in chart visualizations.")),e.chartsPurple=(0,k.registerColor)("charts.purple",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},c.localize(259,"The purple color used in chart visualizations."))}),define(oe[744],re([1,0,3,33,88,137,278]),function(ae,e,c,k,E,L,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.quickInputListFocusBackground=e.quickInputListFocusIconForeground=e.quickInputListFocusForeground=e._deprecatedQuickInputListFocusBackground=e.pickerGroupBorder=e.pickerGroupForeground=e.quickInputTitleBackground=e.quickInputForeground=e.quickInputBackground=void 0,e.quickInputBackground=(0,E.registerColor)("quickInput.background",L.editorWidgetBackground,c.localize(47,"Quick picker background color. The quick picker widget is the container for pickers like the command palette.")),e.quickInputForeground=(0,E.registerColor)("quickInput.foreground",L.editorWidgetForeground,c.localize(48,"Quick picker foreground color. The quick picker widget is the container for pickers like the command palette.")),e.quickInputTitleBackground=(0,E.registerColor)("quickInputTitle.background",{dark:new k.Color(new k.RGBA(255,255,255,.105)),light:new k.Color(new k.RGBA(0,0,0,.06)),hcDark:"#000000",hcLight:k.Color.white},c.localize(49,"Quick picker title background color. The quick picker widget is the container for pickers like the command palette.")),e.pickerGroupForeground=(0,E.registerColor)("pickerGroup.foreground",{dark:"#3794FF",light:"#0066BF",hcDark:k.Color.white,hcLight:"#0F4A85"},c.localize(50,"Quick picker color for grouping labels.")),e.pickerGroupBorder=(0,E.registerColor)("pickerGroup.border",{dark:"#3F3F46",light:"#CCCEDB",hcDark:k.Color.white,hcLight:"#0F4A85"},c.localize(51,"Quick picker color for grouping borders.")),e._deprecatedQuickInputListFocusBackground=(0,E.registerColor)("quickInput.list.focusBackground",null,"",void 0,c.localize(52,"Please use quickInputList.focusBackground instead")),e.quickInputListFocusForeground=(0,E.registerColor)("quickInputList.focusForeground",y.listActiveSelectionForeground,c.localize(53,"Quick picker foreground color for the focused item.")),e.quickInputListFocusIconForeground=(0,E.registerColor)("quickInputList.focusIconForeground",y.listActiveSelectionIconForeground,c.localize(54,"Quick picker icon foreground color for the focused item.")),e.quickInputListFocusBackground=(0,E.registerColor)("quickInputList.focusBackground",{dark:(0,E.oneOf)(e._deprecatedQuickInputListFocusBackground,y.listActiveSelectionBackground),light:(0,E.oneOf)(e._deprecatedQuickInputListFocusBackground,y.listActiveSelectionBackground),hcDark:null,hcLight:null},c.localize(55,"Quick picker background color for the focused item."))}),define(oe[745],re([1,0,3,88,122,137]),function(ae,e,c,k,E,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.searchEditorFindMatchBorder=e.searchEditorFindMatch=e.searchResultsInfoForeground=void 0,e.searchResultsInfoForeground=(0,k.registerColor)("search.resultsInfoForeground",{light:E.foreground,dark:(0,k.transparent)(E.foreground,.65),hcDark:E.foreground,hcLight:E.foreground},c.localize(44,"Color of the text in the search viewlet's completion message.")),e.searchEditorFindMatch=(0,k.registerColor)("searchEditor.findMatchBackground",{light:(0,k.transparent)(L.editorFindMatchHighlight,.66),dark:(0,k.transparent)(L.editorFindMatchHighlight,.66),hcDark:L.editorFindMatchHighlight,hcLight:L.editorFindMatchHighlight},c.localize(45,"Color of the Search Editor query matches.")),e.searchEditorFindMatchBorder=(0,k.registerColor)("searchEditor.findMatchBorder",{light:(0,k.transparent)(L.editorFindMatchHighlightBorder,.66),dark:(0,k.transparent)(L.editorFindMatchHighlightBorder,.66),hcDark:L.editorFindMatchHighlightBorder,hcLight:L.editorFindMatchHighlightBorder},c.localize(46,"Border color of the Search Editor query matches."))});var ti=this&&this.__createBinding||(Object.create?function(ae,e,c,k){k===void 0&&(k=c);var E=Object.getOwnPropertyDescriptor(e,c);(!E||("get"in E?!e.__esModule:E.writable||E.configurable))&&(E={enumerable:!0,get:function(){return e[c]}}),Object.defineProperty(ae,k,E)}:function(ae,e,c,k){k===void 0&&(k=c),ae[k]=e[c]}),bt=this&&this.__exportStar||function(ae,e){for(var c in ae)c!=="default"&&!Object.prototype.hasOwnProperty.call(e,c)&&ti(e,ae,c)};define(oe[32],re([1,0,88,122,743,137,407,278,742,408,277,744,745]),function(ae,e,c,k,E,L,y,f,_,C,p,n,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),bt(c,e),bt(k,e),bt(E,e),bt(L,e),bt(y,e),bt(f,e),bt(_,e),bt(C,e),bt(p,e),bt(n,e),bt(s,e)}),define(oe[185],re([1,0,5,163,74,14,2,32]),function(ae,e,c,k,E,L,y,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DynamicCssRules=e.GlobalEditorPointerMoveMonitor=e.EditorPointerEventFactory=e.EditorMouseEventFactory=e.EditorMouseEvent=e.CoordinatesRelativeToEditor=e.EditorPagePosition=e.ClientCoordinates=e.PageCoordinates=void 0,e.createEditorPagePosition=s,e.createCoordinatesRelativeToEditor=t;class _{constructor(m,u){this.x=m,this.y=u,this._pageCoordinatesBrand=void 0}toClientCoordinates(m){return new C(this.x-m.scrollX,this.y-m.scrollY)}}e.PageCoordinates=_;class C{constructor(m,u){this.clientX=m,this.clientY=u,this._clientCoordinatesBrand=void 0}toPageCoordinates(m){return new _(this.clientX+m.scrollX,this.clientY+m.scrollY)}}e.ClientCoordinates=C;class p{constructor(m,u,b,v){this.x=m,this.y=u,this.width=b,this.height=v,this._editorPagePositionBrand=void 0}}e.EditorPagePosition=p;class n{constructor(m,u){this.x=m,this.y=u,this._positionRelativeToEditorBrand=void 0}}e.CoordinatesRelativeToEditor=n;function s(d){const m=c.getDomNodePagePosition(d);return new p(m.left,m.top,m.width,m.height)}function t(d,m,u){const b=m.width/d.offsetWidth,v=m.height/d.offsetHeight,w=(u.x-m.x)/b,S=(u.y-m.y)/v;return new n(w,S)}class i extends E.StandardMouseEvent{constructor(m,u,b){super(c.getWindow(b),m),this._editorMouseEventBrand=void 0,this.isFromPointerCapture=u,this.pos=new _(this.posx,this.posy),this.editorPos=s(b),this.relativePos=t(b,this.editorPos,this.pos)}}e.EditorMouseEvent=i;class o{constructor(m){this._editorViewDomNode=m}_create(m){return new i(m,!1,this._editorViewDomNode)}onContextMenu(m,u){return c.addDisposableListener(m,"contextmenu",b=>{u(this._create(b))})}onMouseUp(m,u){return c.addDisposableListener(m,"mouseup",b=>{u(this._create(b))})}onMouseDown(m,u){return c.addDisposableListener(m,c.EventType.MOUSE_DOWN,b=>{u(this._create(b))})}onPointerDown(m,u){return c.addDisposableListener(m,c.EventType.POINTER_DOWN,b=>{u(this._create(b),b.pointerId)})}onMouseLeave(m,u){return c.addDisposableListener(m,c.EventType.MOUSE_LEAVE,b=>{u(this._create(b))})}onMouseMove(m,u){return c.addDisposableListener(m,"mousemove",b=>u(this._create(b)))}}e.EditorMouseEventFactory=o;class g{constructor(m){this._editorViewDomNode=m}_create(m){return new i(m,!1,this._editorViewDomNode)}onPointerUp(m,u){return c.addDisposableListener(m,"pointerup",b=>{u(this._create(b))})}onPointerDown(m,u){return c.addDisposableListener(m,c.EventType.POINTER_DOWN,b=>{u(this._create(b),b.pointerId)})}onPointerLeave(m,u){return c.addDisposableListener(m,c.EventType.POINTER_LEAVE,b=>{u(this._create(b))})}onPointerMove(m,u){return c.addDisposableListener(m,"pointermove",b=>u(this._create(b)))}}e.EditorPointerEventFactory=g;class h extends y.Disposable{constructor(m){super(),this._editorViewDomNode=m,this._globalPointerMoveMonitor=this._register(new k.GlobalPointerMoveMonitor),this._keydownListener=null}startMonitoring(m,u,b,v,w){this._keydownListener=c.addStandardDisposableListener(m.ownerDocument,"keydown",S=>{S.toKeyCodeChord().isModifierKey()||this._globalPointerMoveMonitor.stopMonitoring(!0,S.browserEvent)},!0),this._globalPointerMoveMonitor.startMonitoring(m,u,b,S=>{v(new i(S,!0,this._editorViewDomNode))},S=>{this._keydownListener.dispose(),w(S)})}stopMonitoring(){this._globalPointerMoveMonitor.stopMonitoring(!0)}}e.GlobalEditorPointerMoveMonitor=h;class l{static{this._idPool=0}constructor(m){this._editor=m,this._instanceId=++l._idPool,this._counter=0,this._rules=new Map,this._garbageCollectionScheduler=new L.RunOnceScheduler(()=>this.garbageCollect(),1e3)}createClassNameRef(m){const u=this.getOrCreateRule(m);return u.increaseRefCount(),{className:u.className,dispose:()=>{u.decreaseRefCount(),this._garbageCollectionScheduler.schedule()}}}getOrCreateRule(m){const u=this.computeUniqueKey(m);let b=this._rules.get(u);if(!b){const v=this._counter++;b=new a(u,`dyn-rule-${this._instanceId}-${v}`,c.isInShadowDOM(this._editor.getContainerDomNode())?this._editor.getContainerDomNode():void 0,m),this._rules.set(u,b)}return b}computeUniqueKey(m){return JSON.stringify(m)}garbageCollect(){for(const m of this._rules.values())m.hasReferences()||(this._rules.delete(m.key),m.dispose())}}e.DynamicCssRules=l;class a{constructor(m,u,b,v){this.key=m,this.className=u,this.properties=v,this._referenceCount=0,this._styleElementDisposables=new y.DisposableStore,this._styleElement=c.createStyleSheet(b,void 0,this._styleElementDisposables),this._styleElement.textContent=this.getCssText(this.className,this.properties)}getCssText(m,u){let b=`.${m} {`;for(const v in u){const w=u[v];let S;typeof w=="object"?S=(0,f.asCssVariable)(w.id):S=w;const D=r(v);b+=`
|
|
652
652
|
${D}: ${S};`}return b+=`
|
|
@@ -681,7 +681,7 @@ ${this._themeCSS}`,this._styleElements.forEach(v=>v.textContent=this._allCSS)}ge
|
|
|
681
681
|
`}_shouldRestoreUndoStack(){const v=this._configurationService.getValue("files.restoreUndoStack");return typeof v=="boolean"?v:!0}getCreationOptions(v,w,S){const D=typeof v=="string"?v:v.languageId;let I=this._modelCreationOptionsByLanguageAndResource[D+w];if(!I){const T=this._configurationService.getValue("editor",{overrideIdentifier:D,resource:w}),M=this._getEOL(w,D);I=h._readModelOptions({editor:T,eol:M},S),this._modelCreationOptionsByLanguageAndResource[D+w]=I}return I}_updateModelOptions(v){const w=this._modelCreationOptionsByLanguageAndResource;this._modelCreationOptionsByLanguageAndResource=Object.create(null);const S=Object.keys(this._models);for(let D=0,I=S.length;D<I;D++){const T=S[D],M=this._models[T],A=M.model.getLanguageId(),R=M.model.uri;if(v&&!v.affectsConfiguration("editor",{overrideIdentifier:A,resource:R})&&!v.affectsConfiguration("files.eol",{overrideIdentifier:A,resource:R}))continue;const N=w[A+R],O=this.getCreationOptions(A,R,M.model.isForSimpleWidget);h._setModelOptionsForModel(M.model,O,N)}}static _setModelOptionsForModel(v,w,S){S&&S.defaultEOL!==w.defaultEOL&&v.getLineCount()===1&&v.setEOL(w.defaultEOL===1?0:1),!(S&&S.detectIndentation===w.detectIndentation&&S.insertSpaces===w.insertSpaces&&S.tabSize===w.tabSize&&S.indentSize===w.indentSize&&S.trimAutoWhitespace===w.trimAutoWhitespace&&(0,o.equals)(S.bracketPairColorizationOptions,w.bracketPairColorizationOptions))&&(w.detectIndentation?(v.detectIndentation(w.insertSpaces,w.tabSize),v.updateOptions({trimAutoWhitespace:w.trimAutoWhitespace,bracketColorizationOptions:w.bracketPairColorizationOptions})):v.updateOptions({insertSpaces:w.insertSpaces,tabSize:w.tabSize,indentSize:w.indentSize,trimAutoWhitespace:w.trimAutoWhitespace,bracketColorizationOptions:w.bracketPairColorizationOptions}))}_insertDisposedModel(v){this._disposedModels.set(l(v.uri),v),this._disposedModelsHeapSize+=v.heapSize}_removeDisposedModel(v){const w=this._disposedModels.get(l(v));return w&&(this._disposedModelsHeapSize-=w.heapSize),this._disposedModels.delete(l(v)),w}_ensureDisposedModelsHeapSize(v){if(this._disposedModelsHeapSize>v){const w=[];for(this._disposedModels.forEach(S=>{S.sharesUndoRedoStack||w.push(S)}),w.sort((S,D)=>S.time-D.time);w.length>0&&this._disposedModelsHeapSize>v;){const S=w.shift();this._removeDisposedModel(S.uri),S.initialUndoRedoSnapshot!==null&&this._undoRedoService.restoreSnapshot(S.initialUndoRedoSnapshot)}}}_createModelData(v,w,S,D){const I=this.getCreationOptions(w,S,D),T=new L.TextModel(v,w,I,S,this._undoRedoService,this._languageService,this._languageConfigurationService);if(S&&this._disposedModels.has(l(S))){const R=this._removeDisposedModel(S),N=this._undoRedoService.getElements(S),O=this._getSHA1Computer(),x=O.canComputeSHA1(T)?O.computeSHA1(T)===R.sha1:!1;if(x||R.sharesUndoRedoStack){for(const F of N.past)(0,t.isEditStackElement)(F)&&F.matchesResource(S)&&F.setModel(T);for(const F of N.future)(0,t.isEditStackElement)(F)&&F.matchesResource(S)&&F.setModel(T);this._undoRedoService.setElementsValidFlag(S,!0,F=>(0,t.isEditStackElement)(F)&&F.matchesResource(S)),x&&(T._overwriteVersionId(R.versionId),T._overwriteAlternativeVersionId(R.alternativeVersionId),T._overwriteInitialUndoRedoSnapshot(R.initialUndoRedoSnapshot))}else R.initialUndoRedoSnapshot!==null&&this._undoRedoService.restoreSnapshot(R.initialUndoRedoSnapshot)}const M=l(T.uri);if(this._models[M])throw new Error("ModelService: Cannot add model because it already exists!");const A=new a(T,R=>this._onWillDispose(R),(R,N)=>this._onDidChangeLanguage(R,N));return this._models[M]=A,A}createModel(v,w,S,D=!1){let I;return w?I=this._createModelData(v,w,S,D):I=this._createModelData(v,f.PLAINTEXT_LANGUAGE_ID,S,D),this._onModelAdded.fire(I.model),I.model}getModels(){const v=[],w=Object.keys(this._models);for(let S=0,D=w.length;S<D;S++){const I=w[S];v.push(this._models[I].model)}return v}getModel(v){const w=l(v),S=this._models[w];return S?S.model:null}_schemaShouldMaintainUndoRedoElements(v){return v.scheme===i.Schemas.file||v.scheme===i.Schemas.vscodeRemote||v.scheme===i.Schemas.vscodeUserData||v.scheme===i.Schemas.vscodeNotebookCell||v.scheme==="fake-fs"}_onWillDispose(v){const w=l(v.uri),S=this._models[w],D=this._undoRedoService.getUriComparisonKey(v.uri)!==v.uri.toString();let I=!1,T=0;if(D||this._shouldRestoreUndoStack()&&this._schemaShouldMaintainUndoRedoElements(v.uri)){const R=this._undoRedoService.getElements(v.uri);if(R.past.length>0||R.future.length>0){for(const N of R.past)(0,t.isEditStackElement)(N)&&N.matchesResource(v.uri)&&(I=!0,T+=N.heapSize(v.uri),N.setModel(v.uri));for(const N of R.future)(0,t.isEditStackElement)(N)&&N.matchesResource(v.uri)&&(I=!0,T+=N.heapSize(v.uri),N.setModel(v.uri))}}const M=h.MAX_MEMORY_FOR_CLOSED_FILES_UNDO_STACK,A=this._getSHA1Computer();if(I)if(!D&&(T>M||!A.canComputeSHA1(v))){const R=S.model.getInitialUndoRedoSnapshot();R!==null&&this._undoRedoService.restoreSnapshot(R)}else this._ensureDisposedModelsHeapSize(M-T),this._undoRedoService.setElementsValidFlag(v.uri,!1,R=>(0,t.isEditStackElement)(R)&&R.matchesResource(v.uri)),this._insertDisposedModel(new d(v.uri,S.model.getInitialUndoRedoSnapshot(),Date.now(),D,T,A.computeSHA1(v),v.getVersionId(),v.getAlternativeVersionId()));else if(!D){const R=S.model.getInitialUndoRedoSnapshot();R!==null&&this._undoRedoService.restoreSnapshot(R)}delete this._models[w],S.dispose(),delete this._modelCreationOptionsByLanguageAndResource[v.getLanguageId()+v.uri],this._onModelRemoved.fire(v)}_onDidChangeLanguage(v,w){const S=w.oldLanguage,D=v.getLanguageId(),I=this.getCreationOptions(S,v.uri,v.isForSimpleWidget),T=this.getCreationOptions(D,v.uri,v.isForSimpleWidget);h._setModelOptionsForModel(v,T,I),this._onModelModeChanged.fire({model:v,oldLanguageId:S})}_getSHA1Computer(){return new u}};e.ModelService=m,e.ModelService=m=h=De([he(0,p.IConfigurationService),he(1,C.ITextResourcePropertiesService),he(2,n.IUndoRedoService),he(3,_.ILanguageService),he(4,g.ILanguageConfigurationService)],m);class u{static{this.MAX_MODEL_SIZE=10*1024*1024}canComputeSHA1(v){return v.getValueLength()<=u.MAX_MODEL_SIZE}computeSHA1(v){const w=new s.StringSHA1,S=v.createSnapshot();let D;for(;D=S.read();)w.update(D);return w.digest()}}e.DefaultModelSHA1Computer=u}),define(oe[800],re([1,0,13,9,4,250,36,131,254,623,337,95]),function(ae,e,c,k,E,L,y,f,_,C,p,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewModelLinesFromModelAsIs=e.ViewModelLinesFromProjectedModel=void 0;class s{constructor(r,d,m,u,b,v,w,S,D,I){this._editorId=r,this.model=d,this._validModelVersionId=-1,this._domLineBreaksComputerFactory=m,this._monospaceLineBreaksComputerFactory=u,this.fontInfo=b,this.tabSize=v,this.wrappingStrategy=w,this.wrappingColumn=S,this.wrappingIndent=D,this.wordBreak=I,this._constructLines(!0,null)}dispose(){this.hiddenAreasDecorationIds=this.model.deltaDecorations(this.hiddenAreasDecorationIds,[])}createCoordinatesConverter(){return new g(this)}_constructLines(r,d){this.modelLineProjections=[],r&&(this.hiddenAreasDecorationIds=this.model.deltaDecorations(this.hiddenAreasDecorationIds,[]));const m=this.model.getLinesContent(),u=this.model.getInjectedTextDecorations(this._editorId),b=m.length,v=this.createLineBreaksComputer(),w=new c.ArrayQueue(f.LineInjectedText.fromDecorations(u));for(let N=0;N<b;N++){const O=w.takeWhile(x=>x.lineNumber===N+1);v.addRequest(m[N],O,d?d[N]:null)}const S=v.finalize(),D=[],I=this.hiddenAreasDecorationIds.map(N=>this.model.getDecorationRange(N)).sort(E.Range.compareRangesUsingStarts);let T=1,M=0,A=-1,R=A+1<I.length?M+1:b+2;for(let N=0;N<b;N++){const O=N+1;O===R&&(A++,T=I[A].startLineNumber,M=I[A].endLineNumber,R=A+1<I.length?M+1:b+2);const x=O>=T&&O<=M,F=(0,C.createModelLineProjection)(S[N],!x);D[N]=F.getViewLineCount(),this.modelLineProjections[N]=F}this._validModelVersionId=this.model.getVersionId(),this.projectedModelLineLineCounts=new p.ConstantTimePrefixSumComputer(D)}getHiddenAreas(){return this.hiddenAreasDecorationIds.map(r=>this.model.getDecorationRange(r))}setHiddenAreas(r){const d=r.map(M=>this.model.validateRange(M)),m=t(d),u=this.hiddenAreasDecorationIds.map(M=>this.model.getDecorationRange(M)).sort(E.Range.compareRangesUsingStarts);if(m.length===u.length){let M=!1;for(let A=0;A<m.length;A++)if(!m[A].equalsRange(u[A])){M=!0;break}if(!M)return!1}const b=m.map(M=>({range:M,options:y.ModelDecorationOptions.EMPTY}));this.hiddenAreasDecorationIds=this.model.deltaDecorations(this.hiddenAreasDecorationIds,b);const v=m;let w=1,S=0,D=-1,I=D+1<v.length?S+1:this.modelLineProjections.length+2,T=!1;for(let M=0;M<this.modelLineProjections.length;M++){const A=M+1;A===I&&(D++,w=v[D].startLineNumber,S=v[D].endLineNumber,I=D+1<v.length?S+1:this.modelLineProjections.length+2);let R=!1;if(A>=w&&A<=S?this.modelLineProjections[M].isVisible()&&(this.modelLineProjections[M]=this.modelLineProjections[M].setVisible(!1),R=!0):(T=!0,this.modelLineProjections[M].isVisible()||(this.modelLineProjections[M]=this.modelLineProjections[M].setVisible(!0),R=!0)),R){const N=this.modelLineProjections[M].getViewLineCount();this.projectedModelLineLineCounts.setValue(M,N)}}return T||this.setHiddenAreas([]),!0}modelPositionIsVisible(r,d){return r<1||r>this.modelLineProjections.length?!1:this.modelLineProjections[r-1].isVisible()}getModelLineViewLineCount(r){return r<1||r>this.modelLineProjections.length?1:this.modelLineProjections[r-1].getViewLineCount()}setTabSize(r){return this.tabSize===r?!1:(this.tabSize=r,this._constructLines(!1,null),!0)}setWrappingSettings(r,d,m,u,b){const v=this.fontInfo.equals(r),w=this.wrappingStrategy===d,S=this.wrappingColumn===m,D=this.wrappingIndent===u,I=this.wordBreak===b;if(v&&w&&S&&D&&I)return!1;const T=v&&w&&!S&&D&&I;this.fontInfo=r,this.wrappingStrategy=d,this.wrappingColumn=m,this.wrappingIndent=u,this.wordBreak=b;let M=null;if(T){M=[];for(let A=0,R=this.modelLineProjections.length;A<R;A++)M[A]=this.modelLineProjections[A].getProjectionData()}return this._constructLines(!1,M),!0}createLineBreaksComputer(){return(this.wrappingStrategy==="advanced"?this._domLineBreaksComputerFactory:this._monospaceLineBreaksComputerFactory).createLineBreaksComputer(this.fontInfo,this.tabSize,this.wrappingColumn,this.wrappingIndent,this.wordBreak)}onModelFlushed(){this._constructLines(!0,null)}onModelLinesDeleted(r,d,m){if(!r||r<=this._validModelVersionId)return null;const u=d===1?1:this.projectedModelLineLineCounts.getPrefixSum(d-1)+1,b=this.projectedModelLineLineCounts.getPrefixSum(m);return this.modelLineProjections.splice(d-1,m-d+1),this.projectedModelLineLineCounts.removeValues(d-1,m-d+1),new _.ViewLinesDeletedEvent(u,b)}onModelLinesInserted(r,d,m,u){if(!r||r<=this._validModelVersionId)return null;const b=d>2&&!this.modelLineProjections[d-2].isVisible(),v=d===1?1:this.projectedModelLineLineCounts.getPrefixSum(d-1)+1;let w=0;const S=[],D=[];for(let I=0,T=u.length;I<T;I++){const M=(0,C.createModelLineProjection)(u[I],!b);S.push(M);const A=M.getViewLineCount();w+=A,D[I]=A}return this.modelLineProjections=this.modelLineProjections.slice(0,d-1).concat(S).concat(this.modelLineProjections.slice(d-1)),this.projectedModelLineLineCounts.insertValues(d-1,D),new _.ViewLinesInsertedEvent(v,v+w-1)}onModelLineChanged(r,d,m){if(r!==null&&r<=this._validModelVersionId)return[!1,null,null,null];const u=d-1,b=this.modelLineProjections[u].getViewLineCount(),v=this.modelLineProjections[u].isVisible(),w=(0,C.createModelLineProjection)(m,v);this.modelLineProjections[u]=w;const S=this.modelLineProjections[u].getViewLineCount();let D=!1,I=0,T=-1,M=0,A=-1,R=0,N=-1;b>S?(I=this.projectedModelLineLineCounts.getPrefixSum(d-1)+1,T=I+S-1,R=T+1,N=R+(b-S)-1,D=!0):b<S?(I=this.projectedModelLineLineCounts.getPrefixSum(d-1)+1,T=I+b-1,M=T+1,A=M+(S-b)-1,D=!0):(I=this.projectedModelLineLineCounts.getPrefixSum(d-1)+1,T=I+S-1),this.projectedModelLineLineCounts.setValue(u,S);const O=I<=T?new _.ViewLinesChangedEvent(I,T-I+1):null,x=M<=A?new _.ViewLinesInsertedEvent(M,A):null,F=R<=N?new _.ViewLinesDeletedEvent(R,N):null;return[D,O,x,F]}acceptVersionId(r){this._validModelVersionId=r,this.modelLineProjections.length===1&&!this.modelLineProjections[0].isVisible()&&this.setHiddenAreas([])}getViewLineCount(){return this.projectedModelLineLineCounts.getTotalSum()}_toValidViewLineNumber(r){if(r<1)return 1;const d=this.getViewLineCount();return r>d?d:r|0}getActiveIndentGuide(r,d,m){r=this._toValidViewLineNumber(r),d=this._toValidViewLineNumber(d),m=this._toValidViewLineNumber(m);const u=this.convertViewPositionToModelPosition(r,this.getViewLineMinColumn(r)),b=this.convertViewPositionToModelPosition(d,this.getViewLineMinColumn(d)),v=this.convertViewPositionToModelPosition(m,this.getViewLineMinColumn(m)),w=this.model.guides.getActiveIndentGuide(u.lineNumber,b.lineNumber,v.lineNumber),S=this.convertModelPositionToViewPosition(w.startLineNumber,1),D=this.convertModelPositionToViewPosition(w.endLineNumber,this.model.getLineMaxColumn(w.endLineNumber));return{startLineNumber:S.lineNumber,endLineNumber:D.lineNumber,indent:w.indent}}getViewLineInfo(r){r=this._toValidViewLineNumber(r);const d=this.projectedModelLineLineCounts.getIndexOf(r-1),m=d.index,u=d.remainder;return new i(m+1,u)}getMinColumnOfViewLine(r){return this.modelLineProjections[r.modelLineNumber-1].getViewLineMinColumn(this.model,r.modelLineNumber,r.modelLineWrappedLineIdx)}getMaxColumnOfViewLine(r){return this.modelLineProjections[r.modelLineNumber-1].getViewLineMaxColumn(this.model,r.modelLineNumber,r.modelLineWrappedLineIdx)}getModelStartPositionOfViewLine(r){const d=this.modelLineProjections[r.modelLineNumber-1],m=d.getViewLineMinColumn(this.model,r.modelLineNumber,r.modelLineWrappedLineIdx),u=d.getModelColumnOfViewPosition(r.modelLineWrappedLineIdx,m);return new k.Position(r.modelLineNumber,u)}getModelEndPositionOfViewLine(r){const d=this.modelLineProjections[r.modelLineNumber-1],m=d.getViewLineMaxColumn(this.model,r.modelLineNumber,r.modelLineWrappedLineIdx),u=d.getModelColumnOfViewPosition(r.modelLineWrappedLineIdx,m);return new k.Position(r.modelLineNumber,u)}getViewLineInfosGroupedByModelRanges(r,d){const m=this.getViewLineInfo(r),u=this.getViewLineInfo(d),b=new Array;let v=this.getModelStartPositionOfViewLine(m),w=new Array;for(let S=m.modelLineNumber;S<=u.modelLineNumber;S++){const D=this.modelLineProjections[S-1];if(D.isVisible()){const I=S===m.modelLineNumber?m.modelLineWrappedLineIdx:0,T=S===u.modelLineNumber?u.modelLineWrappedLineIdx+1:D.getViewLineCount();for(let M=I;M<T;M++)w.push(new i(S,M))}if(!D.isVisible()&&v){const I=new k.Position(S-1,this.model.getLineMaxColumn(S-1)+1),T=E.Range.fromPositions(v,I);b.push(new o(T,w)),w=[],v=null}else D.isVisible()&&!v&&(v=new k.Position(S,1))}if(v){const S=E.Range.fromPositions(v,this.getModelEndPositionOfViewLine(u));b.push(new o(S,w))}return b}getViewLinesBracketGuides(r,d,m,u){const b=m?this.convertViewPositionToModelPosition(m.lineNumber,m.column):null,v=[];for(const w of this.getViewLineInfosGroupedByModelRanges(r,d)){const S=w.modelRange.startLineNumber,D=this.model.guides.getLinesBracketGuides(S,w.modelRange.endLineNumber,b,u);for(const I of w.viewLines){const M=D[I.modelLineNumber-S].map(A=>{if(A.forWrappedLinesAfterColumn!==-1&&this.modelLineProjections[I.modelLineNumber-1].getViewPositionOfModelPosition(0,A.forWrappedLinesAfterColumn).lineNumber>=I.modelLineWrappedLineIdx||A.forWrappedLinesBeforeOrAtColumn!==-1&&this.modelLineProjections[I.modelLineNumber-1].getViewPositionOfModelPosition(0,A.forWrappedLinesBeforeOrAtColumn).lineNumber<I.modelLineWrappedLineIdx)return;if(!A.horizontalLine)return A;let R=-1;if(A.column!==-1){const x=this.modelLineProjections[I.modelLineNumber-1].getViewPositionOfModelPosition(0,A.column);if(x.lineNumber===I.modelLineWrappedLineIdx)R=x.column;else if(x.lineNumber<I.modelLineWrappedLineIdx)R=this.getMinColumnOfViewLine(I);else if(x.lineNumber>I.modelLineWrappedLineIdx)return}const N=this.convertModelPositionToViewPosition(I.modelLineNumber,A.horizontalLine.endColumn),O=this.modelLineProjections[I.modelLineNumber-1].getViewPositionOfModelPosition(0,A.horizontalLine.endColumn);return O.lineNumber===I.modelLineWrappedLineIdx?new L.IndentGuide(A.visibleColumn,R,A.className,new L.IndentGuideHorizontalLine(A.horizontalLine.top,N.column),-1,-1):O.lineNumber<I.modelLineWrappedLineIdx||A.visibleColumn!==-1?void 0:new L.IndentGuide(A.visibleColumn,R,A.className,new L.IndentGuideHorizontalLine(A.horizontalLine.top,this.getMaxColumnOfViewLine(I)),-1,-1)});v.push(M.filter(A=>!!A))}}return v}getViewLinesIndentGuides(r,d){r=this._toValidViewLineNumber(r),d=this._toValidViewLineNumber(d);const m=this.convertViewPositionToModelPosition(r,this.getViewLineMinColumn(r)),u=this.convertViewPositionToModelPosition(d,this.getViewLineMaxColumn(d));let b=[];const v=[],w=[],S=m.lineNumber-1,D=u.lineNumber-1;let I=null;for(let R=S;R<=D;R++){const N=this.modelLineProjections[R];if(N.isVisible()){const O=N.getViewLineNumberOfModelPosition(0,R===S?m.column:1),x=N.getViewLineNumberOfModelPosition(0,this.model.getLineMaxColumn(R+1)),F=x-O+1;let W=0;F>1&&N.getViewLineMinColumn(this.model,R+1,x)===1&&(W=O===0?1:2),v.push(F),w.push(W),I===null&&(I=new k.Position(R+1,0))}else I!==null&&(b=b.concat(this.model.guides.getLinesIndentGuides(I.lineNumber,R)),I=null)}I!==null&&(b=b.concat(this.model.guides.getLinesIndentGuides(I.lineNumber,u.lineNumber)),I=null);const T=d-r+1,M=new Array(T);let A=0;for(let R=0,N=b.length;R<N;R++){let O=b[R];const x=Math.min(T-A,v[R]),F=w[R];let W;F===2?W=0:F===1?W=1:W=x;for(let V=0;V<x;V++)V===W&&(O=0),M[A++]=O}return M}getViewLineContent(r){const d=this.getViewLineInfo(r);return this.modelLineProjections[d.modelLineNumber-1].getViewLineContent(this.model,d.modelLineNumber,d.modelLineWrappedLineIdx)}getViewLineLength(r){const d=this.getViewLineInfo(r);return this.modelLineProjections[d.modelLineNumber-1].getViewLineLength(this.model,d.modelLineNumber,d.modelLineWrappedLineIdx)}getViewLineMinColumn(r){const d=this.getViewLineInfo(r);return this.modelLineProjections[d.modelLineNumber-1].getViewLineMinColumn(this.model,d.modelLineNumber,d.modelLineWrappedLineIdx)}getViewLineMaxColumn(r){const d=this.getViewLineInfo(r);return this.modelLineProjections[d.modelLineNumber-1].getViewLineMaxColumn(this.model,d.modelLineNumber,d.modelLineWrappedLineIdx)}getViewLineData(r){const d=this.getViewLineInfo(r);return this.modelLineProjections[d.modelLineNumber-1].getViewLineData(this.model,d.modelLineNumber,d.modelLineWrappedLineIdx)}getViewLinesData(r,d,m){r=this._toValidViewLineNumber(r),d=this._toValidViewLineNumber(d);const u=this.projectedModelLineLineCounts.getIndexOf(r-1);let b=r;const v=u.index,w=u.remainder,S=[];for(let D=v,I=this.model.getLineCount();D<I;D++){const T=this.modelLineProjections[D];if(!T.isVisible())continue;const M=D===v?w:0;let A=T.getViewLineCount()-M,R=!1;if(b+A>d&&(R=!0,A=d-b+1),T.getViewLinesData(this.model,D+1,M,A,b-r,m,S),b+=A,R)break}return S}validateViewPosition(r,d,m){r=this._toValidViewLineNumber(r);const u=this.projectedModelLineLineCounts.getIndexOf(r-1),b=u.index,v=u.remainder,w=this.modelLineProjections[b],S=w.getViewLineMinColumn(this.model,b+1,v),D=w.getViewLineMaxColumn(this.model,b+1,v);d<S&&(d=S),d>D&&(d=D);const I=w.getModelColumnOfViewPosition(v,d);return this.model.validatePosition(new k.Position(b+1,I)).equals(m)?new k.Position(r,d):this.convertModelPositionToViewPosition(m.lineNumber,m.column)}validateViewRange(r,d){const m=this.validateViewPosition(r.startLineNumber,r.startColumn,d.getStartPosition()),u=this.validateViewPosition(r.endLineNumber,r.endColumn,d.getEndPosition());return new E.Range(m.lineNumber,m.column,u.lineNumber,u.column)}convertViewPositionToModelPosition(r,d){const m=this.getViewLineInfo(r),u=this.modelLineProjections[m.modelLineNumber-1].getModelColumnOfViewPosition(m.modelLineWrappedLineIdx,d);return this.model.validatePosition(new k.Position(m.modelLineNumber,u))}convertViewRangeToModelRange(r){const d=this.convertViewPositionToModelPosition(r.startLineNumber,r.startColumn),m=this.convertViewPositionToModelPosition(r.endLineNumber,r.endColumn);return new E.Range(d.lineNumber,d.column,m.lineNumber,m.column)}convertModelPositionToViewPosition(r,d,m=2,u=!1,b=!1){const v=this.model.validatePosition(new k.Position(r,d)),w=v.lineNumber,S=v.column;let D=w-1,I=!1;if(b)for(;D<this.modelLineProjections.length&&!this.modelLineProjections[D].isVisible();)D++,I=!0;else for(;D>0&&!this.modelLineProjections[D].isVisible();)D--,I=!0;if(D===0&&!this.modelLineProjections[D].isVisible())return new k.Position(u?0:1,1);const T=1+this.projectedModelLineLineCounts.getPrefixSum(D);let M;return I?b?M=this.modelLineProjections[D].getViewPositionOfModelPosition(T,1,m):M=this.modelLineProjections[D].getViewPositionOfModelPosition(T,this.model.getLineMaxColumn(D+1),m):M=this.modelLineProjections[w-1].getViewPositionOfModelPosition(T,S,m),M}convertModelRangeToViewRange(r,d=0){if(r.isEmpty()){const m=this.convertModelPositionToViewPosition(r.startLineNumber,r.startColumn,d);return E.Range.fromPositions(m)}else{const m=this.convertModelPositionToViewPosition(r.startLineNumber,r.startColumn,1),u=this.convertModelPositionToViewPosition(r.endLineNumber,r.endColumn,0);return new E.Range(m.lineNumber,m.column,u.lineNumber,u.column)}}getViewLineNumberOfModelPosition(r,d){let m=r-1;if(this.modelLineProjections[m].isVisible()){const b=1+this.projectedModelLineLineCounts.getPrefixSum(m);return this.modelLineProjections[m].getViewLineNumberOfModelPosition(b,d)}for(;m>0&&!this.modelLineProjections[m].isVisible();)m--;if(m===0&&!this.modelLineProjections[m].isVisible())return 1;const u=1+this.projectedModelLineLineCounts.getPrefixSum(m);return this.modelLineProjections[m].getViewLineNumberOfModelPosition(u,this.model.getLineMaxColumn(m+1))}getDecorationsInRange(r,d,m,u,b){const v=this.convertViewPositionToModelPosition(r.startLineNumber,r.startColumn),w=this.convertViewPositionToModelPosition(r.endLineNumber,r.endColumn);if(w.lineNumber-v.lineNumber<=r.endLineNumber-r.startLineNumber)return this.model.getDecorationsInRange(new E.Range(v.lineNumber,1,w.lineNumber,w.column),d,m,u,b);let S=[];const D=v.lineNumber-1,I=w.lineNumber-1;let T=null;for(let N=D;N<=I;N++)if(this.modelLineProjections[N].isVisible())T===null&&(T=new k.Position(N+1,N===D?v.column:1));else if(T!==null){const x=this.model.getLineMaxColumn(N);S=S.concat(this.model.getDecorationsInRange(new E.Range(T.lineNumber,T.column,N,x),d,m,u)),T=null}T!==null&&(S=S.concat(this.model.getDecorationsInRange(new E.Range(T.lineNumber,T.column,w.lineNumber,w.column),d,m,u)),T=null),S.sort((N,O)=>{const x=E.Range.compareRangesUsingStarts(N.range,O.range);return x===0?N.id<O.id?-1:N.id>O.id?1:0:x});const M=[];let A=0,R=null;for(const N of S){const O=N.id;R!==O&&(R=O,M[A++]=N)}return M}getInjectedTextAt(r){const d=this.getViewLineInfo(r.lineNumber);return this.modelLineProjections[d.modelLineNumber-1].getInjectedTextAt(d.modelLineWrappedLineIdx,r.column)}normalizePosition(r,d){const m=this.getViewLineInfo(r.lineNumber);return this.modelLineProjections[m.modelLineNumber-1].normalizePosition(m.modelLineWrappedLineIdx,r,d)}getLineIndentColumn(r){const d=this.getViewLineInfo(r);return d.modelLineWrappedLineIdx===0?this.model.getLineIndentColumn(d.modelLineNumber):0}}e.ViewModelLinesFromProjectedModel=s;function t(a){if(a.length===0)return[];const r=a.slice();r.sort(E.Range.compareRangesUsingStarts);const d=[];let m=r[0].startLineNumber,u=r[0].endLineNumber;for(let b=1,v=r.length;b<v;b++){const w=r[b];w.startLineNumber>u+1?(d.push(new E.Range(m,1,u,1)),m=w.startLineNumber,u=w.endLineNumber):w.endLineNumber>u&&(u=w.endLineNumber)}return d.push(new E.Range(m,1,u,1)),d}class i{constructor(r,d){this.modelLineNumber=r,this.modelLineWrappedLineIdx=d}}class o{constructor(r,d){this.modelRange=r,this.viewLines=d}}class g{constructor(r){this._lines=r}convertViewPositionToModelPosition(r){return this._lines.convertViewPositionToModelPosition(r.lineNumber,r.column)}convertViewRangeToModelRange(r){return this._lines.convertViewRangeToModelRange(r)}validateViewPosition(r,d){return this._lines.validateViewPosition(r.lineNumber,r.column,d)}validateViewRange(r,d){return this._lines.validateViewRange(r,d)}convertModelPositionToViewPosition(r,d,m,u){return this._lines.convertModelPositionToViewPosition(r.lineNumber,r.column,d,m,u)}convertModelRangeToViewRange(r,d){return this._lines.convertModelRangeToViewRange(r,d)}modelPositionIsVisible(r){return this._lines.modelPositionIsVisible(r.lineNumber,r.column)}getModelLineViewLineCount(r){return this._lines.getModelLineViewLineCount(r)}getViewLineNumberOfModelPosition(r,d){return this._lines.getViewLineNumberOfModelPosition(r,d)}}class h{constructor(r){this.model=r}dispose(){}createCoordinatesConverter(){return new l(this)}getHiddenAreas(){return[]}setHiddenAreas(r){return!1}setTabSize(r){return!1}setWrappingSettings(r,d,m,u){return!1}createLineBreaksComputer(){const r=[];return{addRequest:(d,m,u)=>{r.push(null)},finalize:()=>r}}onModelFlushed(){}onModelLinesDeleted(r,d,m){return new _.ViewLinesDeletedEvent(d,m)}onModelLinesInserted(r,d,m,u){return new _.ViewLinesInsertedEvent(d,m)}onModelLineChanged(r,d,m){return[!1,new _.ViewLinesChangedEvent(d,1),null,null]}acceptVersionId(r){}getViewLineCount(){return this.model.getLineCount()}getActiveIndentGuide(r,d,m){return{startLineNumber:r,endLineNumber:r,indent:0}}getViewLinesBracketGuides(r,d,m){return new Array(d-r+1).fill([])}getViewLinesIndentGuides(r,d){const m=d-r+1,u=new Array(m);for(let b=0;b<m;b++)u[b]=0;return u}getViewLineContent(r){return this.model.getLineContent(r)}getViewLineLength(r){return this.model.getLineLength(r)}getViewLineMinColumn(r){return this.model.getLineMinColumn(r)}getViewLineMaxColumn(r){return this.model.getLineMaxColumn(r)}getViewLineData(r){const d=this.model.tokenization.getLineTokens(r),m=d.getLineContent();return new n.ViewLineData(m,!1,1,m.length+1,0,d.inflate(),null)}getViewLinesData(r,d,m){const u=this.model.getLineCount();r=Math.min(Math.max(1,r),u),d=Math.min(Math.max(1,d),u);const b=[];for(let v=r;v<=d;v++){const w=v-r;b[w]=m[w]?this.getViewLineData(v):null}return b}getDecorationsInRange(r,d,m,u,b){return this.model.getDecorationsInRange(r,d,m,u,b)}normalizePosition(r,d){return this.model.normalizePosition(r,d)}getLineIndentColumn(r){return this.model.getLineIndentColumn(r)}getInjectedTextAt(r){return null}}e.ViewModelLinesFromModelAsIs=h;class l{constructor(r){this._lines=r}_validPosition(r){return this._lines.model.validatePosition(r)}_validRange(r){return this._lines.model.validateRange(r)}convertViewPositionToModelPosition(r){return this._validPosition(r)}convertViewRangeToModelRange(r){return this._validRange(r)}validateViewPosition(r,d){return this._validPosition(d)}validateViewRange(r,d){return this._validRange(d)}convertModelPositionToViewPosition(r){return this._validPosition(r)}convertModelRangeToViewRange(r){return this._validRange(r)}modelPositionIsVisible(r){const d=this._lines.model.getLineCount();return!(r.lineNumber<1||r.lineNumber>d)}getModelLineViewLineCount(r){return 1}getViewLineNumberOfModelPosition(r,d){return r}}}),define(oe[801],re([1,0,13,14,33,2,16,11,37,699,77,9,4,131,28,70,371,254,627,374,95,375,255,800,622]),function(ae,e,c,k,E,L,y,f,_,C,p,n,s,t,i,o,g,h,l,a,r,d,m,u,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewModel=void 0;const v=!0;class w extends L.Disposable{constructor(N,O,x,F,W,V,q,H,K,G){if(super(),this.languageConfigurationService=q,this._themeService=H,this._attachedView=K,this._transactionalTarget=G,this.hiddenAreasModel=new I,this.previousHiddenAreas=[],this._editorId=N,this._configuration=O,this.model=x,this._eventDispatcher=new m.ViewModelEventDispatcher,this.onEvent=this._eventDispatcher.onEvent,this.cursorConfig=new p.CursorConfiguration(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._updateConfigurationViewLineCount=this._register(new k.RunOnceScheduler(()=>this._updateConfigurationViewLineCountNow(),0)),this._hasFocus=!1,this._viewportStart=S.create(this.model),this.glyphLanes=new b.GlyphMarginLanesModel(0),v&&this.model.isTooLargeForTokenization())this._lines=new u.ViewModelLinesFromModelAsIs(this.model);else{const Y=this._configuration.options,X=Y.get(50),Z=Y.get(140),j=Y.get(147),P=Y.get(139),te=Y.get(130);this._lines=new u.ViewModelLinesFromProjectedModel(this._editorId,this.model,F,W,X,this.model.getOptions().tabSize,Z,j.wrappingColumn,P,te)}this.coordinatesConverter=this._lines.createCoordinatesConverter(),this._cursor=this._register(new C.CursorsController(x,this,this.coordinatesConverter,this.cursorConfig)),this.viewLayout=this._register(new l.ViewLayout(this._configuration,this.getLineCount(),V)),this._register(this.viewLayout.onDidScroll(Y=>{Y.scrollTopChanged&&this._handleVisibleLinesChanged(),Y.scrollTopChanged&&this._viewportStart.invalidate(),this._eventDispatcher.emitSingleViewEvent(new h.ViewScrollChangedEvent(Y)),this._eventDispatcher.emitOutgoingEvent(new m.ScrollChangedEvent(Y.oldScrollWidth,Y.oldScrollLeft,Y.oldScrollHeight,Y.oldScrollTop,Y.scrollWidth,Y.scrollLeft,Y.scrollHeight,Y.scrollTop))})),this._register(this.viewLayout.onDidContentSizeChange(Y=>{this._eventDispatcher.emitOutgoingEvent(Y)})),this._decorations=new d.ViewModelDecorations(this._editorId,this.model,this._configuration,this._lines,this.coordinatesConverter),this._registerModelEvents(),this._register(this._configuration.onDidChangeFast(Y=>{try{const X=this._eventDispatcher.beginEmitViewEvents();this._onConfigurationChanged(X,Y)}finally{this._eventDispatcher.endEmitViewEvents()}})),this._register(a.MinimapTokensColorTracker.getInstance().onDidChange(()=>{this._eventDispatcher.emitSingleViewEvent(new h.ViewTokensColorsChangedEvent)})),this._register(this._themeService.onDidColorThemeChange(Y=>{this._invalidateDecorationsColorCache(),this._eventDispatcher.emitSingleViewEvent(new h.ViewThemeChangedEvent(Y))})),this._updateConfigurationViewLineCountNow()}dispose(){super.dispose(),this._decorations.dispose(),this._lines.dispose(),this._viewportStart.dispose(),this._eventDispatcher.dispose()}createLineBreaksComputer(){return this._lines.createLineBreaksComputer()}addViewEventHandler(N){this._eventDispatcher.addViewEventHandler(N)}removeViewEventHandler(N){this._eventDispatcher.removeViewEventHandler(N)}_updateConfigurationViewLineCountNow(){this._configuration.setViewLineCount(this._lines.getViewLineCount())}getModelVisibleRanges(){const N=this.viewLayout.getLinesViewportData(),O=new s.Range(N.startLineNumber,this.getLineMinColumn(N.startLineNumber),N.endLineNumber,this.getLineMaxColumn(N.endLineNumber));return this._toModelVisibleRanges(O)}visibleLinesStabilized(){const N=this.getModelVisibleRanges();this._attachedView.setVisibleLines(N,!0)}_handleVisibleLinesChanged(){const N=this.getModelVisibleRanges();this._attachedView.setVisibleLines(N,!1)}setHasFocus(N){this._hasFocus=N,this._cursor.setHasFocus(N),this._eventDispatcher.emitSingleViewEvent(new h.ViewFocusChangedEvent(N)),this._eventDispatcher.emitOutgoingEvent(new m.FocusChangedEvent(!N,N))}onCompositionStart(){this._eventDispatcher.emitSingleViewEvent(new h.ViewCompositionStartEvent)}onCompositionEnd(){this._eventDispatcher.emitSingleViewEvent(new h.ViewCompositionEndEvent)}_captureStableViewport(){if(this._viewportStart.isValid&&this.viewLayout.getCurrentScrollTop()>0){const N=new n.Position(this._viewportStart.viewLineNumber,this.getLineMinColumn(this._viewportStart.viewLineNumber)),O=this.coordinatesConverter.convertViewPositionToModelPosition(N);return new A(O,this._viewportStart.startLineDelta)}return new A(null,0)}_onConfigurationChanged(N,O){const x=this._captureStableViewport(),F=this._configuration.options,W=F.get(50),V=F.get(140),q=F.get(147),H=F.get(139),K=F.get(130);this._lines.setWrappingSettings(W,V,q.wrappingColumn,H,K)&&(N.emitViewEvent(new h.ViewFlushedEvent),N.emitViewEvent(new h.ViewLineMappingChangedEvent),N.emitViewEvent(new h.ViewDecorationsChangedEvent(null)),this._cursor.onLineMappingChanged(N),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount()),this._updateConfigurationViewLineCount.schedule()),O.hasChanged(92)&&(this._decorations.reset(),N.emitViewEvent(new h.ViewDecorationsChangedEvent(null))),O.hasChanged(99)&&(this._decorations.reset(),N.emitViewEvent(new h.ViewDecorationsChangedEvent(null))),N.emitViewEvent(new h.ViewConfigurationChangedEvent(O)),this.viewLayout.onConfigurationChanged(O),x.recoverViewportStart(this.coordinatesConverter,this.viewLayout),p.CursorConfiguration.shouldRecreate(O)&&(this.cursorConfig=new p.CursorConfiguration(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig))}_registerModelEvents(){this._register(this.model.onDidChangeContentOrInjectedText(N=>{try{const x=this._eventDispatcher.beginEmitViewEvents();let F=!1,W=!1;const V=N instanceof t.InternalModelContentChangeEvent?N.rawContentChangedEvent.changes:N.changes,q=N instanceof t.InternalModelContentChangeEvent?N.rawContentChangedEvent.versionId:null,H=this._lines.createLineBreaksComputer();for(const Y of V)switch(Y.changeType){case 4:{for(let X=0;X<Y.detail.length;X++){const Z=Y.detail[X];let j=Y.injectedTexts[X];j&&(j=j.filter(P=>!P.ownerId||P.ownerId===this._editorId)),H.addRequest(Z,j,null)}break}case 2:{let X=null;Y.injectedText&&(X=Y.injectedText.filter(Z=>!Z.ownerId||Z.ownerId===this._editorId)),H.addRequest(Y.detail,X,null);break}}const K=H.finalize(),G=new c.ArrayQueue(K);for(const Y of V)switch(Y.changeType){case 1:{this._lines.onModelFlushed(),x.emitViewEvent(new h.ViewFlushedEvent),this._decorations.reset(),this.viewLayout.onFlushed(this.getLineCount()),F=!0;break}case 3:{const X=this._lines.onModelLinesDeleted(q,Y.fromLineNumber,Y.toLineNumber);X!==null&&(x.emitViewEvent(X),this.viewLayout.onLinesDeleted(X.fromLineNumber,X.toLineNumber)),F=!0;break}case 4:{const X=G.takeCount(Y.detail.length),Z=this._lines.onModelLinesInserted(q,Y.fromLineNumber,Y.toLineNumber,X);Z!==null&&(x.emitViewEvent(Z),this.viewLayout.onLinesInserted(Z.fromLineNumber,Z.toLineNumber)),F=!0;break}case 2:{const X=G.dequeue(),[Z,j,P,te]=this._lines.onModelLineChanged(q,Y.lineNumber,X);W=Z,j&&x.emitViewEvent(j),P&&(x.emitViewEvent(P),this.viewLayout.onLinesInserted(P.fromLineNumber,P.toLineNumber)),te&&(x.emitViewEvent(te),this.viewLayout.onLinesDeleted(te.fromLineNumber,te.toLineNumber));break}case 5:break}q!==null&&this._lines.acceptVersionId(q),this.viewLayout.onHeightMaybeChanged(),!F&&W&&(x.emitViewEvent(new h.ViewLineMappingChangedEvent),x.emitViewEvent(new h.ViewDecorationsChangedEvent(null)),this._cursor.onLineMappingChanged(x),this._decorations.onLineMappingChanged())}finally{this._eventDispatcher.endEmitViewEvents()}const O=this._viewportStart.isValid;if(this._viewportStart.invalidate(),this._configuration.setModelLineCount(this.model.getLineCount()),this._updateConfigurationViewLineCountNow(),!this._hasFocus&&this.model.getAttachedEditorCount()>=2&&O){const x=this.model._getTrackedRange(this._viewportStart.modelTrackedRange);if(x){const F=this.coordinatesConverter.convertModelPositionToViewPosition(x.getStartPosition()),W=this.viewLayout.getVerticalOffsetForLineNumber(F.lineNumber);this.viewLayout.setScrollPosition({scrollTop:W+this._viewportStart.startLineDelta},1)}}try{const x=this._eventDispatcher.beginEmitViewEvents();N instanceof t.InternalModelContentChangeEvent&&x.emitOutgoingEvent(new m.ModelContentChangedEvent(N.contentChangedEvent)),this._cursor.onModelContentChanged(x,N)}finally{this._eventDispatcher.endEmitViewEvents()}this._handleVisibleLinesChanged()})),this._register(this.model.onDidChangeTokens(N=>{const O=[];for(let x=0,F=N.ranges.length;x<F;x++){const W=N.ranges[x],V=this.coordinatesConverter.convertModelPositionToViewPosition(new n.Position(W.fromLineNumber,1)).lineNumber,q=this.coordinatesConverter.convertModelPositionToViewPosition(new n.Position(W.toLineNumber,this.model.getLineMaxColumn(W.toLineNumber))).lineNumber;O[x]={fromLineNumber:V,toLineNumber:q}}this._eventDispatcher.emitSingleViewEvent(new h.ViewTokensChangedEvent(O)),this._eventDispatcher.emitOutgoingEvent(new m.ModelTokensChangedEvent(N))})),this._register(this.model.onDidChangeLanguageConfiguration(N=>{this._eventDispatcher.emitSingleViewEvent(new h.ViewLanguageConfigurationEvent),this.cursorConfig=new p.CursorConfiguration(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig),this._eventDispatcher.emitOutgoingEvent(new m.ModelLanguageConfigurationChangedEvent(N))})),this._register(this.model.onDidChangeLanguage(N=>{this.cursorConfig=new p.CursorConfiguration(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig),this._eventDispatcher.emitOutgoingEvent(new m.ModelLanguageChangedEvent(N))})),this._register(this.model.onDidChangeOptions(N=>{if(this._lines.setTabSize(this.model.getOptions().tabSize)){try{const O=this._eventDispatcher.beginEmitViewEvents();O.emitViewEvent(new h.ViewFlushedEvent),O.emitViewEvent(new h.ViewLineMappingChangedEvent),O.emitViewEvent(new h.ViewDecorationsChangedEvent(null)),this._cursor.onLineMappingChanged(O),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount())}finally{this._eventDispatcher.endEmitViewEvents()}this._updateConfigurationViewLineCount.schedule()}this.cursorConfig=new p.CursorConfiguration(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig),this._eventDispatcher.emitOutgoingEvent(new m.ModelOptionsChangedEvent(N))})),this._register(this.model.onDidChangeDecorations(N=>{this._decorations.onModelDecorationsChanged(),this._eventDispatcher.emitSingleViewEvent(new h.ViewDecorationsChangedEvent(N)),this._eventDispatcher.emitOutgoingEvent(new m.ModelDecorationsChangedEvent(N))}))}setHiddenAreas(N,O){this.hiddenAreasModel.setHiddenAreas(O,N);const x=this.hiddenAreasModel.getMergedRanges();if(x===this.previousHiddenAreas)return;this.previousHiddenAreas=x;const F=this._captureStableViewport();let W=!1;try{const V=this._eventDispatcher.beginEmitViewEvents();W=this._lines.setHiddenAreas(x),W&&(V.emitViewEvent(new h.ViewFlushedEvent),V.emitViewEvent(new h.ViewLineMappingChangedEvent),V.emitViewEvent(new h.ViewDecorationsChangedEvent(null)),this._cursor.onLineMappingChanged(V),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount()),this.viewLayout.onHeightMaybeChanged());const q=F.viewportStartModelPosition?.lineNumber;q&&x.some(K=>K.startLineNumber<=q&&q<=K.endLineNumber)||F.recoverViewportStart(this.coordinatesConverter,this.viewLayout)}finally{this._eventDispatcher.endEmitViewEvents()}this._updateConfigurationViewLineCount.schedule(),W&&this._eventDispatcher.emitOutgoingEvent(new m.HiddenAreasChangedEvent)}getVisibleRangesPlusViewportAboveBelow(){const N=this._configuration.options.get(146),O=this._configuration.options.get(67),x=Math.max(20,Math.round(N.height/O)),F=this.viewLayout.getLinesViewportData(),W=Math.max(1,F.completelyVisibleStartLineNumber-x),V=Math.min(this.getLineCount(),F.completelyVisibleEndLineNumber+x);return this._toModelVisibleRanges(new s.Range(W,this.getLineMinColumn(W),V,this.getLineMaxColumn(V)))}getVisibleRanges(){const N=this.getCompletelyVisibleViewRange();return this._toModelVisibleRanges(N)}getHiddenAreas(){return this._lines.getHiddenAreas()}_toModelVisibleRanges(N){const O=this.coordinatesConverter.convertViewRangeToModelRange(N),x=this._lines.getHiddenAreas();if(x.length===0)return[O];const F=[];let W=0,V=O.startLineNumber,q=O.startColumn;const H=O.endLineNumber,K=O.endColumn;for(let G=0,Y=x.length;G<Y;G++){const X=x[G].startLineNumber,Z=x[G].endLineNumber;Z<V||X>H||(V<X&&(F[W++]=new s.Range(V,q,X-1,this.model.getLineMaxColumn(X-1))),V=Z+1,q=1)}return(V<H||V===H&&q<K)&&(F[W++]=new s.Range(V,q,H,K)),F}getCompletelyVisibleViewRange(){const N=this.viewLayout.getLinesViewportData(),O=N.completelyVisibleStartLineNumber,x=N.completelyVisibleEndLineNumber;return new s.Range(O,this.getLineMinColumn(O),x,this.getLineMaxColumn(x))}getCompletelyVisibleViewRangeAtScrollTop(N){const O=this.viewLayout.getLinesViewportDataAtScrollTop(N),x=O.completelyVisibleStartLineNumber,F=O.completelyVisibleEndLineNumber;return new s.Range(x,this.getLineMinColumn(x),F,this.getLineMaxColumn(F))}saveState(){const N=this.viewLayout.saveState(),O=N.scrollTop,x=this.viewLayout.getLineNumberAtVerticalOffset(O),F=this.coordinatesConverter.convertViewPositionToModelPosition(new n.Position(x,this.getLineMinColumn(x))),W=this.viewLayout.getVerticalOffsetForLineNumber(x)-O;return{scrollLeft:N.scrollLeft,firstPosition:F,firstPositionDeltaTop:W}}reduceRestoreState(N){if(typeof N.firstPosition>"u")return this._reduceRestoreStateCompatibility(N);const O=this.model.validatePosition(N.firstPosition),x=this.coordinatesConverter.convertModelPositionToViewPosition(O),F=this.viewLayout.getVerticalOffsetForLineNumber(x.lineNumber)-N.firstPositionDeltaTop;return{scrollLeft:N.scrollLeft,scrollTop:F}}_reduceRestoreStateCompatibility(N){return{scrollLeft:N.scrollLeft,scrollTop:N.scrollTopWithoutViewZones}}getTabSize(){return this.model.getOptions().tabSize}getLineCount(){return this._lines.getViewLineCount()}setViewport(N,O,x){this._viewportStart.update(this,N)}getActiveIndentGuide(N,O,x){return this._lines.getActiveIndentGuide(N,O,x)}getLinesIndentGuides(N,O){return this._lines.getViewLinesIndentGuides(N,O)}getBracketGuidesInRangeByLine(N,O,x,F){return this._lines.getViewLinesBracketGuides(N,O,x,F)}getLineContent(N){return this._lines.getViewLineContent(N)}getLineLength(N){return this._lines.getViewLineLength(N)}getLineMinColumn(N){return this._lines.getViewLineMinColumn(N)}getLineMaxColumn(N){return this._lines.getViewLineMaxColumn(N)}getLineFirstNonWhitespaceColumn(N){const O=f.firstNonWhitespaceIndex(this.getLineContent(N));return O===-1?0:O+1}getLineLastNonWhitespaceColumn(N){const O=f.lastNonWhitespaceIndex(this.getLineContent(N));return O===-1?0:O+2}getMinimapDecorationsInRange(N){return this._decorations.getMinimapDecorationsInRange(N)}getDecorationsInViewport(N){return this._decorations.getDecorationsViewportData(N).decorations}getInjectedTextAt(N){return this._lines.getInjectedTextAt(N)}getViewportViewLineRenderingData(N,O){const F=this._decorations.getDecorationsViewportData(N).inlineDecorations[O-N.startLineNumber];return this._getViewLineRenderingData(O,F)}getViewLineRenderingData(N){const O=this._decorations.getInlineDecorationsOnLine(N);return this._getViewLineRenderingData(N,O)}_getViewLineRenderingData(N,O){const x=this.model.mightContainRTL(),F=this.model.mightContainNonBasicASCII(),W=this.getTabSize(),V=this._lines.getViewLineData(N);return V.inlineDecorations&&(O=[...O,...V.inlineDecorations.map(q=>q.toInlineDecoration(N))]),new r.ViewLineRenderingData(V.minColumn,V.maxColumn,V.content,V.continuesWithWrappedLine,x,F,V.tokens,O,W,V.startVisibleColumn)}getViewLineData(N){return this._lines.getViewLineData(N)}getMinimapLinesRenderingData(N,O,x){const F=this._lines.getViewLinesData(N,O,x);return new r.MinimapLinesRenderingData(this.getTabSize(),F)}getAllOverviewRulerDecorations(N){const O=this.model.getOverviewRulerDecorations(this._editorId,(0,_.filterValidationDecorations)(this._configuration.options)),x=new D;for(const F of O){const W=F.options,V=W.overviewRuler;if(!V)continue;const q=V.position;if(q===0)continue;const H=V.getColor(N.value),K=this.coordinatesConverter.getViewLineNumberOfModelPosition(F.range.startLineNumber,F.range.startColumn),G=this.coordinatesConverter.getViewLineNumberOfModelPosition(F.range.endLineNumber,F.range.endColumn);x.accept(H,W.zIndex,K,G,q)}return x.asArray}_invalidateDecorationsColorCache(){const N=this.model.getOverviewRulerDecorations();for(const O of N)O.options.overviewRuler?.invalidateCachedColor(),O.options.minimap?.invalidateCachedColor()}getValueInRange(N,O){const x=this.coordinatesConverter.convertViewRangeToModelRange(N);return this.model.getValueInRange(x,O)}getValueLengthInRange(N,O){const x=this.coordinatesConverter.convertViewRangeToModelRange(N);return this.model.getValueLengthInRange(x,O)}modifyPosition(N,O){const x=this.coordinatesConverter.convertViewPositionToModelPosition(N),F=this.model.modifyPosition(x,O);return this.coordinatesConverter.convertModelPositionToViewPosition(F)}deduceModelPositionRelativeToViewPosition(N,O,x){const F=this.coordinatesConverter.convertViewPositionToModelPosition(N);this.model.getEOL().length===2&&(O<0?O-=x:O+=x);const V=this.model.getOffsetAt(F)+O;return this.model.getPositionAt(V)}getPlainTextToCopy(N,O,x){const F=x?`\r
|
|
682
682
|
`:this.model.getEOL();N=N.slice(0),N.sort(s.Range.compareRangesUsingStarts);let W=!1,V=!1;for(const H of N)H.isEmpty()?W=!0:V=!0;if(!V){if(!O)return"";const H=N.map(G=>G.startLineNumber);let K="";for(let G=0;G<H.length;G++)G>0&&H[G-1]===H[G]||(K+=this.model.getLineContent(H[G])+F);return K}if(W&&O){const H=[];let K=0;for(const G of N){const Y=G.startLineNumber;G.isEmpty()?Y!==K&&H.push(this.model.getLineContent(Y)):H.push(this.model.getValueInRange(G,x?2:0)),K=Y}return H.length===1?H[0]:H}const q=[];for(const H of N)H.isEmpty()||q.push(this.model.getValueInRange(H,x?2:0));return q.length===1?q[0]:q}getRichTextToCopy(N,O){const x=this.model.getLanguageId();if(x===o.PLAINTEXT_LANGUAGE_ID||N.length!==1)return null;let F=N[0];if(F.isEmpty()){if(!O)return null;const G=F.startLineNumber;F=new s.Range(G,this.model.getLineMinColumn(G),G,this.model.getLineMaxColumn(G))}const W=this._configuration.options.get(50),V=this._getColorMap(),H=/[:;\\\/<>]/.test(W.fontFamily)||W.fontFamily===_.EDITOR_FONT_DEFAULTS.fontFamily;let K;return H?K=_.EDITOR_FONT_DEFAULTS.fontFamily:(K=W.fontFamily,K=K.replace(/"/g,"'"),/[,']/.test(K)||/[+ ]/.test(K)&&(K=`'${K}'`),K=`${K}, ${_.EDITOR_FONT_DEFAULTS.fontFamily}`),{mode:x,html:`<div style="color: ${V[1]};background-color: ${V[2]};font-family: ${K};font-weight: ${W.fontWeight};font-size: ${W.fontSize}px;line-height: ${W.lineHeight}px;white-space: pre;">`+this._getHTMLToCopy(F,V)+"</div>"}}_getHTMLToCopy(N,O){const x=N.startLineNumber,F=N.startColumn,W=N.endLineNumber,V=N.endColumn,q=this.getTabSize();let H="";for(let K=x;K<=W;K++){const G=this.model.tokenization.getLineTokens(K),Y=G.getLineContent(),X=K===x?F-1:0,Z=K===W?V-1:Y.length;Y===""?H+="<br>":H+=(0,g.tokenizeLineToHTML)(Y,G.inflate(),O,X,Z,q,y.isWindows)}return H}_getColorMap(){const N=i.TokenizationRegistry.getColorMap(),O=["#000000"];if(N)for(let x=1,F=N.length;x<F;x++)O[x]=E.Color.Format.CSS.formatHex(N[x]);return O}getPrimaryCursorState(){return this._cursor.getPrimaryCursorState()}getLastAddedCursorIndex(){return this._cursor.getLastAddedCursorIndex()}getCursorStates(){return this._cursor.getCursorStates()}setCursorStates(N,O,x){return this._withViewEventsCollector(F=>this._cursor.setStates(F,N,O,x))}getCursorColumnSelectData(){return this._cursor.getCursorColumnSelectData()}getCursorAutoClosedCharacters(){return this._cursor.getAutoClosedCharacters()}setCursorColumnSelectData(N){this._cursor.setCursorColumnSelectData(N)}getPrevEditOperationType(){return this._cursor.getPrevEditOperationType()}setPrevEditOperationType(N){this._cursor.setPrevEditOperationType(N)}getSelection(){return this._cursor.getSelection()}getSelections(){return this._cursor.getSelections()}getPosition(){return this._cursor.getPrimaryCursorState().modelState.position}setSelections(N,O,x=0){this._withViewEventsCollector(F=>this._cursor.setSelections(F,N,O,x))}saveCursorState(){return this._cursor.saveState()}restoreCursorState(N){this._withViewEventsCollector(O=>this._cursor.restoreState(O,N))}_executeCursorEdit(N){if(this._cursor.context.cursorConfig.readOnly){this._eventDispatcher.emitOutgoingEvent(new m.ReadOnlyEditAttemptEvent);return}this._withViewEventsCollector(N)}executeEdits(N,O,x){this._executeCursorEdit(F=>this._cursor.executeEdits(F,N,O,x))}startComposition(){this._executeCursorEdit(N=>this._cursor.startComposition(N))}endComposition(N){this._executeCursorEdit(O=>this._cursor.endComposition(O,N))}type(N,O){this._executeCursorEdit(x=>this._cursor.type(x,N,O))}compositionType(N,O,x,F,W){this._executeCursorEdit(V=>this._cursor.compositionType(V,N,O,x,F,W))}paste(N,O,x,F){this._executeCursorEdit(W=>this._cursor.paste(W,N,O,x,F))}cut(N){this._executeCursorEdit(O=>this._cursor.cut(O,N))}executeCommand(N,O){this._executeCursorEdit(x=>this._cursor.executeCommand(x,N,O))}executeCommands(N,O){this._executeCursorEdit(x=>this._cursor.executeCommands(x,N,O))}revealAllCursors(N,O,x=!1){this._withViewEventsCollector(F=>this._cursor.revealAll(F,N,x,0,O,0))}revealPrimaryCursor(N,O,x=!1){this._withViewEventsCollector(F=>this._cursor.revealPrimary(F,N,x,0,O,0))}revealTopMostCursor(N){const O=this._cursor.getTopMostViewPosition(),x=new s.Range(O.lineNumber,O.column,O.lineNumber,O.column);this._withViewEventsCollector(F=>F.emitViewEvent(new h.ViewRevealRangeRequestEvent(N,!1,x,null,0,!0,0)))}revealBottomMostCursor(N){const O=this._cursor.getBottomMostViewPosition(),x=new s.Range(O.lineNumber,O.column,O.lineNumber,O.column);this._withViewEventsCollector(F=>F.emitViewEvent(new h.ViewRevealRangeRequestEvent(N,!1,x,null,0,!0,0)))}revealRange(N,O,x,F,W){this._withViewEventsCollector(V=>V.emitViewEvent(new h.ViewRevealRangeRequestEvent(N,!1,x,null,F,O,W)))}changeWhitespace(N){this.viewLayout.changeWhitespace(N)&&(this._eventDispatcher.emitSingleViewEvent(new h.ViewZonesChangedEvent),this._eventDispatcher.emitOutgoingEvent(new m.ViewZonesChangedEvent))}_withViewEventsCollector(N){return this._transactionalTarget.batchChanges(()=>{try{const O=this._eventDispatcher.beginEmitViewEvents();return N(O)}finally{this._eventDispatcher.endEmitViewEvents()}})}batchEvents(N){this._withViewEventsCollector(()=>{N()})}normalizePosition(N,O){return this._lines.normalizePosition(N,O)}getLineIndentColumn(N){return this._lines.getLineIndentColumn(N)}}e.ViewModel=w;class S{static create(N){const O=N._setTrackedRange(null,new s.Range(1,1,1,1),1);return new S(N,1,!1,O,0)}get viewLineNumber(){return this._viewLineNumber}get isValid(){return this._isValid}get modelTrackedRange(){return this._modelTrackedRange}get startLineDelta(){return this._startLineDelta}constructor(N,O,x,F,W){this._model=N,this._viewLineNumber=O,this._isValid=x,this._modelTrackedRange=F,this._startLineDelta=W}dispose(){this._model._setTrackedRange(this._modelTrackedRange,null,1)}update(N,O){const x=N.coordinatesConverter.convertViewPositionToModelPosition(new n.Position(O,N.getLineMinColumn(O))),F=N.model._setTrackedRange(this._modelTrackedRange,new s.Range(x.lineNumber,x.column,x.lineNumber,x.column),1),W=N.viewLayout.getVerticalOffsetForLineNumber(O),V=N.viewLayout.getCurrentScrollTop();this._viewLineNumber=O,this._isValid=!0,this._modelTrackedRange=F,this._startLineDelta=V-W}invalidate(){this._isValid=!1}}class D{constructor(){this._asMap=Object.create(null),this.asArray=[]}accept(N,O,x,F,W){const V=this._asMap[N];if(V){const q=V.data,H=q[q.length-3],K=q[q.length-1];if(H===W&&K+1>=x){F>K&&(q[q.length-1]=F);return}q.push(W,x,F)}else{const q=new r.OverviewRulerDecorationsGroup(N,O,[W,x,F]);this._asMap[N]=q,this.asArray.push(q)}}}class I{constructor(){this.hiddenAreas=new Map,this.shouldRecompute=!1,this.ranges=[]}setHiddenAreas(N,O){const x=this.hiddenAreas.get(N);x&&M(x,O)||(this.hiddenAreas.set(N,O),this.shouldRecompute=!0)}getMergedRanges(){if(!this.shouldRecompute)return this.ranges;this.shouldRecompute=!1;const N=Array.from(this.hiddenAreas.values()).reduce((O,x)=>T(O,x),[]);return M(this.ranges,N)?this.ranges:(this.ranges=N,this.ranges)}}function T(R,N){const O=[];let x=0,F=0;for(;x<R.length&&F<N.length;){const W=R[x],V=N[F];if(W.endLineNumber<V.startLineNumber-1)O.push(R[x++]);else if(V.endLineNumber<W.startLineNumber-1)O.push(N[F++]);else{const q=Math.min(W.startLineNumber,V.startLineNumber),H=Math.max(W.endLineNumber,V.endLineNumber);O.push(new s.Range(q,1,H,1)),x++,F++}}for(;x<R.length;)O.push(R[x++]);for(;F<N.length;)O.push(N[F++]);return O}function M(R,N){if(R.length!==N.length)return!1;for(let O=0;O<R.length;O++)if(!R[O].equalsRange(N[O]))return!1;return!0}class A{constructor(N,O){this.viewportStartModelPosition=N,this.startLineDelta=O}recoverViewportStart(N,O){if(!this.viewportStartModelPosition)return;const x=N.convertModelPositionToViewPosition(this.viewportStartModelPosition),F=O.getVerticalOffsetForLineNumber(x.lineNumber);O.setScrollPosition({scrollTop:F+this.startLineDelta},1)}}}),define(oe[218],re([1,0,5,8,6,2,47,75,679,239,15,35,773,602,322,561,37,93,80,9,4,23,199,332,198,20,34,36,17,624,801,3,60,24,12,7,180,50,32,25,29,716,507]),function(ae,e,c,k,E,L,y,f,_,C,p,n,s,t,i,o,g,h,l,a,r,d,m,u,b,v,w,S,D,I,T,M,A,R,N,O,x,F,W,V,q){"use strict";var H;Object.defineProperty(e,"__esModule",{value:!0}),e.EditorModeContext=e.BooleanEventEmitter=e.CodeEditorWidget=void 0;let K=class extends L.Disposable{static{H=this}static{this.dropIntoEditorDecorationOptions=S.ModelDecorationOptions.register({description:"workbench-dnd-target",className:"dnd-target"})}get isSimpleWidget(){return this._configuration.isSimpleWidget}get contextMenuId(){return this._configuration.contextMenuId}constructor(B,U,z,$,Q,ee,le,de,me,be,ve,Le){super(),this.languageConfigurationService=ve,this._deliveryQueue=(0,E.createEventDeliveryQueue)(),this._contributions=this._register(new o.CodeEditorContributions),this._onDidDispose=this._register(new E.Emitter),this.onDidDispose=this._onDidDispose.event,this._onDidChangeModelContent=this._register(new E.Emitter({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelContent=this._onDidChangeModelContent.event,this._onDidChangeModelLanguage=this._register(new E.Emitter({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelLanguage=this._onDidChangeModelLanguage.event,this._onDidChangeModelLanguageConfiguration=this._register(new E.Emitter({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelLanguageConfiguration=this._onDidChangeModelLanguageConfiguration.event,this._onDidChangeModelOptions=this._register(new E.Emitter({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelOptions=this._onDidChangeModelOptions.event,this._onDidChangeModelDecorations=this._register(new E.Emitter({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelDecorations=this._onDidChangeModelDecorations.event,this._onDidChangeModelTokens=this._register(new E.Emitter({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelTokens=this._onDidChangeModelTokens.event,this._onDidChangeConfiguration=this._register(new E.Emitter({deliveryQueue:this._deliveryQueue})),this.onDidChangeConfiguration=this._onDidChangeConfiguration.event,this._onWillChangeModel=this._register(new E.Emitter({deliveryQueue:this._deliveryQueue})),this.onWillChangeModel=this._onWillChangeModel.event,this._onDidChangeModel=this._register(new E.Emitter({deliveryQueue:this._deliveryQueue})),this.onDidChangeModel=this._onDidChangeModel.event,this._onDidChangeCursorPosition=this._register(new E.Emitter({deliveryQueue:this._deliveryQueue})),this.onDidChangeCursorPosition=this._onDidChangeCursorPosition.event,this._onDidChangeCursorSelection=this._register(new E.Emitter({deliveryQueue:this._deliveryQueue})),this.onDidChangeCursorSelection=this._onDidChangeCursorSelection.event,this._onDidAttemptReadOnlyEdit=this._register(new Z(this._contributions,this._deliveryQueue)),this.onDidAttemptReadOnlyEdit=this._onDidAttemptReadOnlyEdit.event,this._onDidLayoutChange=this._register(new E.Emitter({deliveryQueue:this._deliveryQueue})),this.onDidLayoutChange=this._onDidLayoutChange.event,this._editorTextFocus=this._register(new X({deliveryQueue:this._deliveryQueue})),this.onDidFocusEditorText=this._editorTextFocus.onDidChangeToTrue,this.onDidBlurEditorText=this._editorTextFocus.onDidChangeToFalse,this._editorWidgetFocus=this._register(new X({deliveryQueue:this._deliveryQueue})),this.onDidFocusEditorWidget=this._editorWidgetFocus.onDidChangeToTrue,this.onDidBlurEditorWidget=this._editorWidgetFocus.onDidChangeToFalse,this._onWillType=this._register(new Z(this._contributions,this._deliveryQueue)),this.onWillType=this._onWillType.event,this._onDidType=this._register(new Z(this._contributions,this._deliveryQueue)),this.onDidType=this._onDidType.event,this._onDidCompositionStart=this._register(new Z(this._contributions,this._deliveryQueue)),this.onDidCompositionStart=this._onDidCompositionStart.event,this._onDidCompositionEnd=this._register(new Z(this._contributions,this._deliveryQueue)),this.onDidCompositionEnd=this._onDidCompositionEnd.event,this._onDidPaste=this._register(new Z(this._contributions,this._deliveryQueue)),this.onDidPaste=this._onDidPaste.event,this._onMouseUp=this._register(new Z(this._contributions,this._deliveryQueue)),this.onMouseUp=this._onMouseUp.event,this._onMouseDown=this._register(new Z(this._contributions,this._deliveryQueue)),this.onMouseDown=this._onMouseDown.event,this._onMouseDrag=this._register(new Z(this._contributions,this._deliveryQueue)),this.onMouseDrag=this._onMouseDrag.event,this._onMouseDrop=this._register(new Z(this._contributions,this._deliveryQueue)),this.onMouseDrop=this._onMouseDrop.event,this._onMouseDropCanceled=this._register(new Z(this._contributions,this._deliveryQueue)),this.onMouseDropCanceled=this._onMouseDropCanceled.event,this._onDropIntoEditor=this._register(new Z(this._contributions,this._deliveryQueue)),this.onDropIntoEditor=this._onDropIntoEditor.event,this._onContextMenu=this._register(new Z(this._contributions,this._deliveryQueue)),this.onContextMenu=this._onContextMenu.event,this._onMouseMove=this._register(new Z(this._contributions,this._deliveryQueue)),this.onMouseMove=this._onMouseMove.event,this._onMouseLeave=this._register(new Z(this._contributions,this._deliveryQueue)),this.onMouseLeave=this._onMouseLeave.event,this._onMouseWheel=this._register(new Z(this._contributions,this._deliveryQueue)),this.onMouseWheel=this._onMouseWheel.event,this._onKeyUp=this._register(new Z(this._contributions,this._deliveryQueue)),this.onKeyUp=this._onKeyUp.event,this._onKeyDown=this._register(new Z(this._contributions,this._deliveryQueue)),this.onKeyDown=this._onKeyDown.event,this._onDidContentSizeChange=this._register(new E.Emitter({deliveryQueue:this._deliveryQueue})),this.onDidContentSizeChange=this._onDidContentSizeChange.event,this._onDidScrollChange=this._register(new E.Emitter({deliveryQueue:this._deliveryQueue})),this.onDidScrollChange=this._onDidScrollChange.event,this._onDidChangeViewZones=this._register(new E.Emitter({deliveryQueue:this._deliveryQueue})),this.onDidChangeViewZones=this._onDidChangeViewZones.event,this._onDidChangeHiddenAreas=this._register(new E.Emitter({deliveryQueue:this._deliveryQueue})),this.onDidChangeHiddenAreas=this._onDidChangeHiddenAreas.event,this._updateCounter=0,this._onBeginUpdate=this._register(new E.Emitter),this.onBeginUpdate=this._onBeginUpdate.event,this._onEndUpdate=this._register(new E.Emitter),this.onEndUpdate=this._onEndUpdate.event,this._actions=new Map,this._bannerDomNode=null,this._dropIntoEditorDecorations=this.createDecorationsCollection(),Q.willCreateCodeEditor();const Se={...U};this._domElement=B,this._overflowWidgetsDomNode=Se.overflowWidgetsDomNode,delete Se.overflowWidgetsDomNode,this._id=++G,this._decorationTypeKeysToIds={},this._decorationTypeSubtypes={},this._telemetryData=z.telemetryData,this._configuration=this._register(this._createConfiguration(z.isSimpleWidget||!1,z.contextMenuId??(z.isSimpleWidget?q.MenuId.SimpleEditorContext:q.MenuId.EditorContext),Se,be)),this._register(this._configuration.onDidChange(ke=>{this._onDidChangeConfiguration.fire(ke);const Re=this._configuration.options;if(ke.hasChanged(146)){const Pe=Re.get(146);this._onDidLayoutChange.fire(Pe)}})),this._contextKeyService=this._register(le.createScoped(this._domElement)),this._notificationService=me,this._codeEditorService=Q,this._commandService=ee,this._themeService=de,this._register(new j(this,this._contextKeyService)),this._register(new P(this,this._contextKeyService,Le)),this._instantiationService=this._register($.createChild(new x.ServiceCollection([N.IContextKeyService,this._contextKeyService]))),this._modelData=null,this._focusTracker=new te(B,this._overflowWidgetsDomNode),this._register(this._focusTracker.onChange(()=>{this._editorWidgetFocus.setValue(this._focusTracker.hasFocus())})),this._contentWidgets={},this._overlayWidgets={},this._glyphMarginWidgets={};let ye;Array.isArray(z.contributions)?ye=z.contributions:ye=p.EditorExtensionsRegistry.getEditorContributions(),this._contributions.initialize(this,ye,this._instantiationService);for(const ke of p.EditorExtensionsRegistry.getEditorActions()){if(this._actions.has(ke.id)){(0,k.onUnexpectedError)(new Error(`Cannot have two actions with the same id ${ke.id}`));continue}const Re=new u.InternalEditorAction(ke.id,ke.label,ke.alias,ke.metadata,ke.precondition??void 0,Pe=>this._instantiationService.invokeFunction(Fe=>Promise.resolve(ke.runEditorCommand(Fe,this,Pe))),this._contextKeyService);this._actions.set(Re.id,Re)}const Ee=()=>!this._configuration.options.get(92)&&this._configuration.options.get(36).enabled;this._register(new c.DragAndDropObserver(this._domElement,{onDragOver:ke=>{if(!Ee())return;const Re=this.getTargetAtClientPoint(ke.clientX,ke.clientY);Re?.position&&this.showDropIndicatorAt(Re.position)},onDrop:async ke=>{if(!Ee()||(this.removeDropIndicator(),!ke.dataTransfer))return;const Re=this.getTargetAtClientPoint(ke.clientX,ke.clientY);Re?.position&&this._onDropIntoEditor.fire({position:Re.position,event:ke})},onDragLeave:()=>{this.removeDropIndicator()},onDragEnd:()=>{this.removeDropIndicator()}})),this._codeEditorService.addCodeEditor(this)}writeScreenReaderContent(B){this._modelData?.view.writeScreenReaderContent(B)}_createConfiguration(B,U,z,$){return new _.EditorConfiguration(B,U,z,this._domElement,$)}getId(){return this.getEditorType()+":"+this._id}getEditorType(){return b.EditorType.ICodeEditor}dispose(){this._codeEditorService.removeCodeEditor(this),this._focusTracker.dispose(),this._actions.clear(),this._contentWidgets={},this._overlayWidgets={},this._removeDecorationTypes(),this._postDetachModelCleanup(this._detachModel()),this._onDidDispose.fire(),super.dispose()}invokeWithinContext(B){return this._instantiationService.invokeFunction(B)}updateOptions(B){this._configuration.updateOptions(B||{})}getOptions(){return this._configuration.options}getOption(B){return this._configuration.options.get(B)}getRawOptions(){return this._configuration.getRawOptions()}getOverflowWidgetsDomNode(){return this._overflowWidgetsDomNode}getConfiguredWordAtPosition(B){return this._modelData?m.WordOperations.getWordAtPosition(this._modelData.model,this._configuration.options.get(132),this._configuration.options.get(131),B):null}getValue(B=null){if(!this._modelData)return"";const U=!!(B&&B.preserveBOM);let z=0;return B&&B.lineEnding&&B.lineEnding===`
|
|
683
683
|
`?z=1:B&&B.lineEnding&&B.lineEnding===`\r
|
|
684
|
-
`&&(z=2),this._modelData.model.getValue(z,U)}setValue(B){try{if(this._beginUpdate(),!this._modelData)return;this._modelData.model.setValue(B)}finally{this._endUpdate()}}getModel(){return this._modelData?this._modelData.model:null}setModel(B=null){try{this._beginUpdate();const U=B;if(this._modelData===null&&U===null||this._modelData&&this._modelData.model===U)return;const z={oldModelUrl:this._modelData?.model.uri||null,newModelUrl:U?.uri||null};this._onWillChangeModel.fire(z);const $=this.hasTextFocus(),Q=this._detachModel();this._attachModel(U),$&&this.hasModel()&&this.focus(),this._removeDecorationTypes(),this._onDidChangeModel.fire(z),this._postDetachModelCleanup(Q),this._contributionsDisposable=this._contributions.onAfterModelAttached()}finally{this._endUpdate()}}_removeDecorationTypes(){if(this._decorationTypeKeysToIds={},this._decorationTypeSubtypes){for(const B in this._decorationTypeSubtypes){const U=this._decorationTypeSubtypes[B];for(const z in U)this._removeDecorationType(B+"-"+z)}this._decorationTypeSubtypes={}}}getVisibleRanges(){return this._modelData?this._modelData.viewModel.getVisibleRanges():[]}getVisibleRangesPlusViewportAboveBelow(){return this._modelData?this._modelData.viewModel.getVisibleRangesPlusViewportAboveBelow():[]}getWhitespaces(){return this._modelData?this._modelData.viewModel.viewLayout.getWhitespaces():[]}static _getVerticalOffsetAfterPosition(B,U,z,$){const Q=B.model.validatePosition({lineNumber:U,column:z}),ee=B.viewModel.coordinatesConverter.convertModelPositionToViewPosition(Q);return B.viewModel.viewLayout.getVerticalOffsetAfterLineNumber(ee.lineNumber,$)}getTopForLineNumber(B,U=!1){return this._modelData?H._getVerticalOffsetForPosition(this._modelData,B,1,U):-1}getTopForPosition(B,U){return this._modelData?H._getVerticalOffsetForPosition(this._modelData,B,U,!1):-1}static _getVerticalOffsetForPosition(B,U,z,$=!1){const Q=B.model.validatePosition({lineNumber:U,column:z}),ee=B.viewModel.coordinatesConverter.convertModelPositionToViewPosition(Q);return B.viewModel.viewLayout.getVerticalOffsetForLineNumber(ee.lineNumber,$)}getBottomForLineNumber(B,U=!1){return this._modelData?H._getVerticalOffsetAfterPosition(this._modelData,B,1,U):-1}setHiddenAreas(B,U){this._modelData?.viewModel.setHiddenAreas(B.map(z=>r.Range.lift(z)),U)}getVisibleColumnFromPosition(B){if(!this._modelData)return B.column;const U=this._modelData.model.validatePosition(B),z=this._modelData.model.getOptions().tabSize;return h.CursorColumns.visibleColumnFromColumn(this._modelData.model.getLineContent(U.lineNumber),U.column,z)+1}getPosition(){return this._modelData?this._modelData.viewModel.getPosition():null}setPosition(B,U="api"){if(this._modelData){if(!a.Position.isIPosition(B))throw new Error("Invalid arguments");this._modelData.viewModel.setSelections(U,[{selectionStartLineNumber:B.lineNumber,selectionStartColumn:B.column,positionLineNumber:B.lineNumber,positionColumn:B.column}])}}_sendRevealRange(B,U,z,$){if(!this._modelData)return;if(!r.Range.isIRange(B))throw new Error("Invalid arguments");const Q=this._modelData.model.validateRange(B),ee=this._modelData.viewModel.coordinatesConverter.convertModelRangeToViewRange(Q);this._modelData.viewModel.revealRange("api",z,ee,U,$)}revealLine(B,U=0){this._revealLine(B,0,U)}revealLineInCenter(B,U=0){this._revealLine(B,1,U)}revealLineInCenterIfOutsideViewport(B,U=0){this._revealLine(B,2,U)}revealLineNearTop(B,U=0){this._revealLine(B,5,U)}_revealLine(B,U,z){if(typeof B!="number")throw new Error("Invalid arguments");this._sendRevealRange(new r.Range(B,1,B,1),U,!1,z)}revealPosition(B,U=0){this._revealPosition(B,0,!0,U)}revealPositionInCenter(B,U=0){this._revealPosition(B,1,!0,U)}revealPositionInCenterIfOutsideViewport(B,U=0){this._revealPosition(B,2,!0,U)}revealPositionNearTop(B,U=0){this._revealPosition(B,5,!0,U)}_revealPosition(B,U,z,$){if(!a.Position.isIPosition(B))throw new Error("Invalid arguments");this._sendRevealRange(new r.Range(B.lineNumber,B.column,B.lineNumber,B.column),U,z,$)}getSelection(){return this._modelData?this._modelData.viewModel.getSelection():null}getSelections(){return this._modelData?this._modelData.viewModel.getSelections():null}setSelection(B,U="api"){const z=d.Selection.isISelection(B),$=r.Range.isIRange(B);if(!z&&!$)throw new Error("Invalid arguments");if(z)this._setSelectionImpl(B,U);else if($){const Q={selectionStartLineNumber:B.startLineNumber,selectionStartColumn:B.startColumn,positionLineNumber:B.endLineNumber,positionColumn:B.endColumn};this._setSelectionImpl(Q,U)}}_setSelectionImpl(B,U){if(!this._modelData)return;const z=new d.Selection(B.selectionStartLineNumber,B.selectionStartColumn,B.positionLineNumber,B.positionColumn);this._modelData.viewModel.setSelections(U,[z])}revealLines(B,U,z=0){this._revealLines(B,U,0,z)}revealLinesInCenter(B,U,z=0){this._revealLines(B,U,1,z)}revealLinesInCenterIfOutsideViewport(B,U,z=0){this._revealLines(B,U,2,z)}revealLinesNearTop(B,U,z=0){this._revealLines(B,U,5,z)}_revealLines(B,U,z,$){if(typeof B!="number"||typeof U!="number")throw new Error("Invalid arguments");this._sendRevealRange(new r.Range(B,1,U,1),z,!1,$)}revealRange(B,U=0,z=!1,$=!0){this._revealRange(B,z?1:0,$,U)}revealRangeInCenter(B,U=0){this._revealRange(B,1,!0,U)}revealRangeInCenterIfOutsideViewport(B,U=0){this._revealRange(B,2,!0,U)}revealRangeNearTop(B,U=0){this._revealRange(B,5,!0,U)}revealRangeNearTopIfOutsideViewport(B,U=0){this._revealRange(B,6,!0,U)}revealRangeAtTop(B,U=0){this._revealRange(B,3,!0,U)}_revealRange(B,U,z,$){if(!r.Range.isIRange(B))throw new Error("Invalid arguments");this._sendRevealRange(r.Range.lift(B),U,z,$)}setSelections(B,U="api",z=0){if(this._modelData){if(!B||B.length===0)throw new Error("Invalid arguments");for(let $=0,Q=B.length;$<Q;$++)if(!d.Selection.isISelection(B[$]))throw new Error("Invalid arguments");this._modelData.viewModel.setSelections(U,B,z)}}getContentWidth(){return this._modelData?this._modelData.viewModel.viewLayout.getContentWidth():-1}getScrollWidth(){return this._modelData?this._modelData.viewModel.viewLayout.getScrollWidth():-1}getScrollLeft(){return this._modelData?this._modelData.viewModel.viewLayout.getCurrentScrollLeft():-1}getContentHeight(){return this._modelData?this._modelData.viewModel.viewLayout.getContentHeight():-1}getScrollHeight(){return this._modelData?this._modelData.viewModel.viewLayout.getScrollHeight():-1}getScrollTop(){return this._modelData?this._modelData.viewModel.viewLayout.getCurrentScrollTop():-1}setScrollLeft(B,U=1){if(this._modelData){if(typeof B!="number")throw new Error("Invalid arguments");this._modelData.viewModel.viewLayout.setScrollPosition({scrollLeft:B},U)}}setScrollTop(B,U=1){if(this._modelData){if(typeof B!="number")throw new Error("Invalid arguments");this._modelData.viewModel.viewLayout.setScrollPosition({scrollTop:B},U)}}setScrollPosition(B,U=1){this._modelData&&this._modelData.viewModel.viewLayout.setScrollPosition(B,U)}hasPendingScrollAnimation(){return this._modelData?this._modelData.viewModel.viewLayout.hasPendingScrollAnimation():!1}saveViewState(){if(!this._modelData)return null;const B=this._contributions.saveViewState(),U=this._modelData.viewModel.saveCursorState(),z=this._modelData.viewModel.saveState();return{cursorState:U,viewState:z,contributionsState:B}}restoreViewState(B){if(!this._modelData||!this._modelData.hasRealView)return;const U=B;if(U&&U.cursorState&&U.viewState){const z=U.cursorState;Array.isArray(z)?z.length>0&&this._modelData.viewModel.restoreCursorState(z):this._modelData.viewModel.restoreCursorState([z]),this._contributions.restoreViewState(U.contributionsState||{});const $=this._modelData.viewModel.reduceRestoreState(U.viewState);this._modelData.view.restoreState($)}}handleInitialized(){this._getViewModel()?.visibleLinesStabilized()}getContribution(B){return this._contributions.get(B)}getActions(){return Array.from(this._actions.values())}getSupportedActions(){let B=this.getActions();return B=B.filter(U=>U.isSupported()),B}getAction(B){return this._actions.get(B)||null}trigger(B,U,z){z=z||{};try{switch(this._beginUpdate(),U){case"compositionStart":this._startComposition();return;case"compositionEnd":this._endComposition(B);return;case"type":{const Q=z;this._type(B,Q.text||"");return}case"replacePreviousChar":{const Q=z;this._compositionType(B,Q.text||"",Q.replaceCharCnt||0,0,0);return}case"compositionType":{const Q=z;this._compositionType(B,Q.text||"",Q.replacePrevCharCnt||0,Q.replaceNextCharCnt||0,Q.positionDelta||0);return}case"paste":{const Q=z;this._paste(B,Q.text||"",Q.pasteOnNewLine||!1,Q.multicursorText||null,Q.mode||null,Q.clipboardEvent);return}case"cut":this._cut(B);return}const $=this.getAction(U);if($){Promise.resolve($.run(z)).then(void 0,k.onUnexpectedError);return}if(!this._modelData||this._triggerEditorCommand(B,U,z))return;this._triggerCommand(U,z)}finally{this._endUpdate()}}_triggerCommand(B,U){this._commandService.executeCommand(B,U)}_startComposition(){this._modelData&&(this._modelData.viewModel.startComposition(),this._onDidCompositionStart.fire())}_endComposition(B){this._modelData&&(this._modelData.viewModel.endComposition(B),this._onDidCompositionEnd.fire())}_type(B,U){!this._modelData||U.length===0||(B==="keyboard"&&this._onWillType.fire(U),this._modelData.viewModel.type(U,B),B==="keyboard"&&this._onDidType.fire(U))}_compositionType(B,U,z,$,Q){this._modelData&&this._modelData.viewModel.compositionType(U,z,$,Q,B)}_paste(B,U,z,$,Q,ee){if(!this._modelData)return;const le=this._modelData.viewModel,de=le.getSelection().getStartPosition();le.paste(U,z,$,B);const me=le.getSelection().getStartPosition();B==="keyboard"&&this._onDidPaste.fire({clipboardEvent:ee,range:new r.Range(de.lineNumber,de.column,me.lineNumber,me.column),languageId:Q})}_cut(B){this._modelData&&this._modelData.viewModel.cut(B)}_triggerEditorCommand(B,U,z){const $=p.EditorExtensionsRegistry.getEditorCommand(U);return $?(z=z||{},z.source=B,this._instantiationService.invokeFunction(Q=>{Promise.resolve($.runEditorCommand(Q,this,z)).then(void 0,k.onUnexpectedError)}),!0):!1}_getViewModel(){return this._modelData?this._modelData.viewModel:null}pushUndoStop(){return!this._modelData||this._configuration.options.get(92)?!1:(this._modelData.model.pushStackElement(),!0)}popUndoStop(){return!this._modelData||this._configuration.options.get(92)?!1:(this._modelData.model.popStackElement(),!0)}executeEdits(B,U,z){if(!this._modelData||this._configuration.options.get(92))return!1;let $;return z?Array.isArray(z)?$=()=>z:$=z:$=()=>null,this._modelData.viewModel.executeEdits(B,U,$),!0}executeCommand(B,U){this._modelData&&this._modelData.viewModel.executeCommand(U,B)}executeCommands(B,U){this._modelData&&this._modelData.viewModel.executeCommands(U,B)}createDecorationsCollection(B){return new se(this,B)}changeDecorations(B){return this._modelData?this._modelData.model.changeDecorations(B,this._id):null}getLineDecorations(B){return this._modelData?this._modelData.model.getLineDecorations(B,this._id,(0,g.filterValidationDecorations)(this._configuration.options)):null}getDecorationsInRange(B){return this._modelData?this._modelData.model.getDecorationsInRange(B,this._id,(0,g.filterValidationDecorations)(this._configuration.options)):null}deltaDecorations(B,U){return this._modelData?B.length===0&&U.length===0?B:this._modelData.model.deltaDecorations(B,U,this._id):[]}removeDecorations(B){!this._modelData||B.length===0||this._modelData.model.changeDecorations(U=>{U.deltaDecorations(B,[])})}removeDecorationsByType(B){const U=this._decorationTypeKeysToIds[B];U&&this.changeDecorations(z=>z.deltaDecorations(U,[])),this._decorationTypeKeysToIds.hasOwnProperty(B)&&delete this._decorationTypeKeysToIds[B],this._decorationTypeSubtypes.hasOwnProperty(B)&&delete this._decorationTypeSubtypes[B]}getLayoutInfo(){return this._configuration.options.get(146)}createOverviewRuler(B){return!this._modelData||!this._modelData.hasRealView?null:this._modelData.view.createOverviewRuler(B)}getContainerDomNode(){return this._domElement}getDomNode(){return!this._modelData||!this._modelData.hasRealView?null:this._modelData.view.domNode.domNode}delegateVerticalScrollbarPointerDown(B){!this._modelData||!this._modelData.hasRealView||this._modelData.view.delegateVerticalScrollbarPointerDown(B)}delegateScrollFromMouseWheelEvent(B){!this._modelData||!this._modelData.hasRealView||this._modelData.view.delegateScrollFromMouseWheelEvent(B)}layout(B,U=!1){this._configuration.observeContainer(B),U||this.render()}focus(){!this._modelData||!this._modelData.hasRealView||this._modelData.view.focus()}hasTextFocus(){return!this._modelData||!this._modelData.hasRealView?!1:this._modelData.view.isFocused()}hasWidgetFocus(){return this._focusTracker&&this._focusTracker.hasFocus()}addContentWidget(B){const U={widget:B,position:B.getPosition()};this._contentWidgets.hasOwnProperty(B.getId())&&console.warn("Overwriting a content widget with the same id:"+B.getId()),this._contentWidgets[B.getId()]=U,this._modelData&&this._modelData.hasRealView&&this._modelData.view.addContentWidget(U)}layoutContentWidget(B){const U=B.getId();if(this._contentWidgets.hasOwnProperty(U)){const z=this._contentWidgets[U];z.position=B.getPosition(),this._modelData&&this._modelData.hasRealView&&this._modelData.view.layoutContentWidget(z)}}removeContentWidget(B){const U=B.getId();if(this._contentWidgets.hasOwnProperty(U)){const z=this._contentWidgets[U];delete this._contentWidgets[U],this._modelData&&this._modelData.hasRealView&&this._modelData.view.removeContentWidget(z)}}addOverlayWidget(B){const U={widget:B,position:B.getPosition()};this._overlayWidgets.hasOwnProperty(B.getId())&&console.warn("Overwriting an overlay widget with the same id."),this._overlayWidgets[B.getId()]=U,this._modelData&&this._modelData.hasRealView&&this._modelData.view.addOverlayWidget(U)}layoutOverlayWidget(B){const U=B.getId();if(this._overlayWidgets.hasOwnProperty(U)){const z=this._overlayWidgets[U];z.position=B.getPosition(),this._modelData&&this._modelData.hasRealView&&this._modelData.view.layoutOverlayWidget(z)}}removeOverlayWidget(B){const U=B.getId();if(this._overlayWidgets.hasOwnProperty(U)){const z=this._overlayWidgets[U];delete this._overlayWidgets[U],this._modelData&&this._modelData.hasRealView&&this._modelData.view.removeOverlayWidget(z)}}addGlyphMarginWidget(B){const U={widget:B,position:B.getPosition()};this._glyphMarginWidgets.hasOwnProperty(B.getId())&&console.warn("Overwriting a glyph margin widget with the same id."),this._glyphMarginWidgets[B.getId()]=U,this._modelData&&this._modelData.hasRealView&&this._modelData.view.addGlyphMarginWidget(U)}layoutGlyphMarginWidget(B){const U=B.getId();if(this._glyphMarginWidgets.hasOwnProperty(U)){const z=this._glyphMarginWidgets[U];z.position=B.getPosition(),this._modelData&&this._modelData.hasRealView&&this._modelData.view.layoutGlyphMarginWidget(z)}}removeGlyphMarginWidget(B){const U=B.getId();if(this._glyphMarginWidgets.hasOwnProperty(U)){const z=this._glyphMarginWidgets[U];delete this._glyphMarginWidgets[U],this._modelData&&this._modelData.hasRealView&&this._modelData.view.removeGlyphMarginWidget(z)}}changeViewZones(B){!this._modelData||!this._modelData.hasRealView||this._modelData.view.change(B)}getTargetAtClientPoint(B,U){return!this._modelData||!this._modelData.hasRealView?null:this._modelData.view.getTargetAtClientPoint(B,U)}getScrolledVisiblePosition(B){if(!this._modelData||!this._modelData.hasRealView)return null;const U=this._modelData.model.validatePosition(B),z=this._configuration.options,$=z.get(146),Q=H._getVerticalOffsetForPosition(this._modelData,U.lineNumber,U.column)-this.getScrollTop(),ee=this._modelData.view.getOffsetForColumn(U.lineNumber,U.column)+$.glyphMarginWidth+$.lineNumbersWidth+$.decorationsWidth-this.getScrollLeft();return{top:Q,left:ee,height:z.get(67)}}getOffsetForColumn(B,U){return!this._modelData||!this._modelData.hasRealView?-1:this._modelData.view.getOffsetForColumn(B,U)}render(B=!1){!this._modelData||!this._modelData.hasRealView||this._modelData.viewModel.batchEvents(()=>{this._modelData.view.render(!0,B)})}setAriaOptions(B){!this._modelData||!this._modelData.hasRealView||this._modelData.view.setAriaOptions(B)}applyFontInfo(B){(0,f.applyFontInfo)(B,this._configuration.options.get(50))}setBanner(B,U){this._bannerDomNode&&this._domElement.contains(this._bannerDomNode)&&this._bannerDomNode.remove(),this._bannerDomNode=B,this._configuration.setReservedHeight(B?U:0),this._bannerDomNode&&this._domElement.prepend(this._bannerDomNode)}_attachModel(B){if(!B){this._modelData=null;return}const U=[];this._domElement.setAttribute("data-mode-id",B.getLanguageId()),this._configuration.setIsDominatedByLongLines(B.isDominatedByLongLines()),this._configuration.setModelLineCount(B.getLineCount());const z=B.onBeforeAttached(),$=new T.ViewModel(this._id,this._configuration,B,t.DOMLineBreaksComputerFactory.create(c.getWindow(this._domElement)),I.MonospaceLineBreaksComputerFactory.create(this._configuration.options),le=>c.scheduleAtNextAnimationFrame(c.getWindow(this._domElement),le),this.languageConfigurationService,this._themeService,z,{batchChanges:le=>{try{return this._beginUpdate(),le()}finally{this._endUpdate()}}});U.push(B.onWillDispose(()=>this.setModel(null))),U.push($.onEvent(le=>{switch(le.kind){case 0:this._onDidContentSizeChange.fire(le);break;case 1:this._editorTextFocus.setValue(le.hasFocus);break;case 2:this._onDidScrollChange.fire(le);break;case 3:this._onDidChangeViewZones.fire();break;case 4:this._onDidChangeHiddenAreas.fire();break;case 5:this._onDidAttemptReadOnlyEdit.fire();break;case 6:{if(le.reachedMaxCursorCount){const ve=this.getOption(80),Le=M.localize(1010,"The number of cursors has been limited to {0}. Consider using [find and replace](https://code.visualstudio.com/docs/editor/codebasics#_find-and-replace) for larger changes or increase the editor multi cursor limit setting.",ve);this._notificationService.prompt(F.Severity.Warning,Le,[{label:"Find and Replace",run:()=>{this._commandService.executeCommand("editor.action.startFindReplaceAction")}},{label:M.localize(1011,"Increase Multi Cursor Limit"),run:()=>{this._commandService.executeCommand("workbench.action.openSettings2",{query:"editor.multiCursorLimit"})}}])}const de=[];for(let ve=0,Le=le.selections.length;ve<Le;ve++)de[ve]=le.selections[ve].getPosition();const me={position:de[0],secondaryPositions:de.slice(1),reason:le.reason,source:le.source};this._onDidChangeCursorPosition.fire(me);const be={selection:le.selections[0],secondarySelections:le.selections.slice(1),modelVersionId:le.modelVersionId,oldSelections:le.oldSelections,oldModelVersionId:le.oldModelVersionId,source:le.source,reason:le.reason};this._onDidChangeCursorSelection.fire(be);break}case 7:this._onDidChangeModelDecorations.fire(le.event);break;case 8:this._domElement.setAttribute("data-mode-id",B.getLanguageId()),this._onDidChangeModelLanguage.fire(le.event);break;case 9:this._onDidChangeModelLanguageConfiguration.fire(le.event);break;case 10:this._onDidChangeModelContent.fire(le.event);break;case 11:this._onDidChangeModelOptions.fire(le.event);break;case 12:this._onDidChangeModelTokens.fire(le.event);break}}));const[Q,ee]=this._createView($);if(ee){this._domElement.appendChild(Q.domNode.domNode);let le=Object.keys(this._contentWidgets);for(let de=0,me=le.length;de<me;de++){const be=le[de];Q.addContentWidget(this._contentWidgets[be])}le=Object.keys(this._overlayWidgets);for(let de=0,me=le.length;de<me;de++){const be=le[de];Q.addOverlayWidget(this._overlayWidgets[be])}le=Object.keys(this._glyphMarginWidgets);for(let de=0,me=le.length;de<me;de++){const be=le[de];Q.addGlyphMarginWidget(this._glyphMarginWidgets[be])}Q.render(!1,!0),Q.domNode.domNode.setAttribute("data-uri",B.uri.toString())}this._modelData=new Y(B,$,Q,ee,U,z)}_createView(B){let U;this.isSimpleWidget?U={paste:(Q,ee,le,de)=>{this._paste("keyboard",Q,ee,le,de)},type:Q=>{this._type("keyboard",Q)},compositionType:(Q,ee,le,de)=>{this._compositionType("keyboard",Q,ee,le,de)},startComposition:()=>{this._startComposition()},endComposition:()=>{this._endComposition("keyboard")},cut:()=>{this._cut("keyboard")}}:U={paste:(Q,ee,le,de)=>{const me={text:Q,pasteOnNewLine:ee,multicursorText:le,mode:de};this._commandService.executeCommand("paste",me)},type:Q=>{const ee={text:Q};this._commandService.executeCommand("type",ee)},compositionType:(Q,ee,le,de)=>{if(le||de){const me={text:Q,replacePrevCharCnt:ee,replaceNextCharCnt:le,positionDelta:de};this._commandService.executeCommand("compositionType",me)}else{const me={text:Q,replaceCharCnt:ee};this._commandService.executeCommand("replacePreviousChar",me)}},startComposition:()=>{this._commandService.executeCommand("compositionStart",{})},endComposition:()=>{this._commandService.executeCommand("compositionEnd",{})},cut:()=>{this._commandService.executeCommand("cut",{})}};const z=new i.ViewUserInputEvents(B.coordinatesConverter);return z.onKeyDown=Q=>this._onKeyDown.fire(Q),z.onKeyUp=Q=>this._onKeyUp.fire(Q),z.onContextMenu=Q=>this._onContextMenu.fire(Q),z.onMouseMove=Q=>this._onMouseMove.fire(Q),z.onMouseLeave=Q=>this._onMouseLeave.fire(Q),z.onMouseDown=Q=>this._onMouseDown.fire(Q),z.onMouseUp=Q=>this._onMouseUp.fire(Q),z.onMouseDrag=Q=>this._onMouseDrag.fire(Q),z.onMouseDrop=Q=>this._onMouseDrop.fire(Q),z.onMouseDropCanceled=Q=>this._onMouseDropCanceled.fire(Q),z.onMouseWheel=Q=>this._onMouseWheel.fire(Q),[new s.View(U,this._configuration,this._themeService.getColorTheme(),B,z,this._overflowWidgetsDomNode,this._instantiationService),!0]}_postDetachModelCleanup(B){B?.removeAllDecorationsWithOwnerId(this._id)}_detachModel(){if(this._contributionsDisposable?.dispose(),this._contributionsDisposable=void 0,!this._modelData)return null;const B=this._modelData.model,U=this._modelData.hasRealView?this._modelData.view.domNode.domNode:null;return this._modelData.dispose(),this._modelData=null,this._domElement.removeAttribute("data-mode-id"),U&&this._domElement.contains(U)&&U.remove(),this._bannerDomNode&&this._domElement.contains(this._bannerDomNode)&&this._bannerDomNode.remove(),B}_removeDecorationType(B){this._codeEditorService.removeDecorationType(B)}hasModel(){return this._modelData!==null}showDropIndicatorAt(B){const U=[{range:new r.Range(B.lineNumber,B.column,B.lineNumber,B.column),options:H.dropIntoEditorDecorationOptions}];this._dropIntoEditorDecorations.set(U),this.revealPosition(B,1)}removeDropIndicator(){this._dropIntoEditorDecorations.clear()}setContextValue(B,U){this._contextKeyService.createKey(B,U)}_beginUpdate(){this._updateCounter++,this._updateCounter===1&&this._onBeginUpdate.fire()}_endUpdate(){this._updateCounter--,this._updateCounter===0&&this._onEndUpdate.fire()}};e.CodeEditorWidget=K,e.CodeEditorWidget=K=H=De([he(3,O.IInstantiationService),he(4,n.ICodeEditorService),he(5,R.ICommandService),he(6,N.IContextKeyService),he(7,V.IThemeService),he(8,F.INotificationService),he(9,A.IAccessibilityService),he(10,w.ILanguageConfigurationService),he(11,D.ILanguageFeaturesService)],K);let G=0;class Y{constructor(B,U,z,$,Q,ee){this.model=B,this.viewModel=U,this.view=z,this.hasRealView=$,this.listenersToRemove=Q,this.attachedView=ee}dispose(){(0,L.dispose)(this.listenersToRemove),this.model.onBeforeDetached(this.attachedView),this.hasRealView&&this.view.dispose(),this.viewModel.dispose()}}class X extends L.Disposable{constructor(B){super(),this._emitterOptions=B,this._onDidChangeToTrue=this._register(new E.Emitter(this._emitterOptions)),this.onDidChangeToTrue=this._onDidChangeToTrue.event,this._onDidChangeToFalse=this._register(new E.Emitter(this._emitterOptions)),this.onDidChangeToFalse=this._onDidChangeToFalse.event,this._value=0}setValue(B){const U=B?2:1;this._value!==U&&(this._value=U,this._value===2?this._onDidChangeToTrue.fire():this._value===1&&this._onDidChangeToFalse.fire())}}e.BooleanEventEmitter=X;class Z extends E.Emitter{constructor(B,U){super({deliveryQueue:U}),this._contributions=B}fire(B){this._contributions.onBeforeInteractionEvent(),super.fire(B)}}class j extends L.Disposable{constructor(B,U){super(),this._editor=B,U.createKey("editorId",B.getId()),this._editorSimpleInput=v.EditorContextKeys.editorSimpleInput.bindTo(U),this._editorFocus=v.EditorContextKeys.focus.bindTo(U),this._textInputFocus=v.EditorContextKeys.textInputFocus.bindTo(U),this._editorTextFocus=v.EditorContextKeys.editorTextFocus.bindTo(U),this._tabMovesFocus=v.EditorContextKeys.tabMovesFocus.bindTo(U),this._editorReadonly=v.EditorContextKeys.readOnly.bindTo(U),this._inDiffEditor=v.EditorContextKeys.inDiffEditor.bindTo(U),this._editorColumnSelection=v.EditorContextKeys.columnSelection.bindTo(U),this._hasMultipleSelections=v.EditorContextKeys.hasMultipleSelections.bindTo(U),this._hasNonEmptySelection=v.EditorContextKeys.hasNonEmptySelection.bindTo(U),this._canUndo=v.EditorContextKeys.canUndo.bindTo(U),this._canRedo=v.EditorContextKeys.canRedo.bindTo(U),this._register(this._editor.onDidChangeConfiguration(()=>this._updateFromConfig())),this._register(this._editor.onDidChangeCursorSelection(()=>this._updateFromSelection())),this._register(this._editor.onDidFocusEditorWidget(()=>this._updateFromFocus())),this._register(this._editor.onDidBlurEditorWidget(()=>this._updateFromFocus())),this._register(this._editor.onDidFocusEditorText(()=>this._updateFromFocus())),this._register(this._editor.onDidBlurEditorText(()=>this._updateFromFocus())),this._register(this._editor.onDidChangeModel(()=>this._updateFromModel())),this._register(this._editor.onDidChangeConfiguration(()=>this._updateFromModel())),this._register(C.TabFocus.onDidChangeTabFocus(z=>this._tabMovesFocus.set(z))),this._updateFromConfig(),this._updateFromSelection(),this._updateFromFocus(),this._updateFromModel(),this._editorSimpleInput.set(this._editor.isSimpleWidget)}_updateFromConfig(){const B=this._editor.getOptions();this._tabMovesFocus.set(C.TabFocus.getTabFocusMode()),this._editorReadonly.set(B.get(92)),this._inDiffEditor.set(B.get(61)),this._editorColumnSelection.set(B.get(22))}_updateFromSelection(){const B=this._editor.getSelections();B?(this._hasMultipleSelections.set(B.length>1),this._hasNonEmptySelection.set(B.some(U=>!U.isEmpty()))):(this._hasMultipleSelections.reset(),this._hasNonEmptySelection.reset())}_updateFromFocus(){this._editorFocus.set(this._editor.hasWidgetFocus()&&!this._editor.isSimpleWidget),this._editorTextFocus.set(this._editor.hasTextFocus()&&!this._editor.isSimpleWidget),this._textInputFocus.set(this._editor.hasTextFocus())}_updateFromModel(){const B=this._editor.getModel();this._canUndo.set(!!(B&&B.canUndo())),this._canRedo.set(!!(B&&B.canRedo()))}}class P extends L.Disposable{constructor(B,U,z){super(),this._editor=B,this._contextKeyService=U,this._languageFeaturesService=z,this._langId=v.EditorContextKeys.languageId.bindTo(U),this._hasCompletionItemProvider=v.EditorContextKeys.hasCompletionItemProvider.bindTo(U),this._hasCodeActionsProvider=v.EditorContextKeys.hasCodeActionsProvider.bindTo(U),this._hasCodeLensProvider=v.EditorContextKeys.hasCodeLensProvider.bindTo(U),this._hasDefinitionProvider=v.EditorContextKeys.hasDefinitionProvider.bindTo(U),this._hasDeclarationProvider=v.EditorContextKeys.hasDeclarationProvider.bindTo(U),this._hasImplementationProvider=v.EditorContextKeys.hasImplementationProvider.bindTo(U),this._hasTypeDefinitionProvider=v.EditorContextKeys.hasTypeDefinitionProvider.bindTo(U),this._hasHoverProvider=v.EditorContextKeys.hasHoverProvider.bindTo(U),this._hasDocumentHighlightProvider=v.EditorContextKeys.hasDocumentHighlightProvider.bindTo(U),this._hasDocumentSymbolProvider=v.EditorContextKeys.hasDocumentSymbolProvider.bindTo(U),this._hasReferenceProvider=v.EditorContextKeys.hasReferenceProvider.bindTo(U),this._hasRenameProvider=v.EditorContextKeys.hasRenameProvider.bindTo(U),this._hasSignatureHelpProvider=v.EditorContextKeys.hasSignatureHelpProvider.bindTo(U),this._hasInlayHintsProvider=v.EditorContextKeys.hasInlayHintsProvider.bindTo(U),this._hasDocumentFormattingProvider=v.EditorContextKeys.hasDocumentFormattingProvider.bindTo(U),this._hasDocumentSelectionFormattingProvider=v.EditorContextKeys.hasDocumentSelectionFormattingProvider.bindTo(U),this._hasMultipleDocumentFormattingProvider=v.EditorContextKeys.hasMultipleDocumentFormattingProvider.bindTo(U),this._hasMultipleDocumentSelectionFormattingProvider=v.EditorContextKeys.hasMultipleDocumentSelectionFormattingProvider.bindTo(U),this._isInEmbeddedEditor=v.EditorContextKeys.isInEmbeddedEditor.bindTo(U);const $=()=>this._update();this._register(B.onDidChangeModel($)),this._register(B.onDidChangeModelLanguage($)),this._register(z.completionProvider.onDidChange($)),this._register(z.codeActionProvider.onDidChange($)),this._register(z.codeLensProvider.onDidChange($)),this._register(z.definitionProvider.onDidChange($)),this._register(z.declarationProvider.onDidChange($)),this._register(z.implementationProvider.onDidChange($)),this._register(z.typeDefinitionProvider.onDidChange($)),this._register(z.hoverProvider.onDidChange($)),this._register(z.documentHighlightProvider.onDidChange($)),this._register(z.documentSymbolProvider.onDidChange($)),this._register(z.referenceProvider.onDidChange($)),this._register(z.renameProvider.onDidChange($)),this._register(z.documentFormattingEditProvider.onDidChange($)),this._register(z.documentRangeFormattingEditProvider.onDidChange($)),this._register(z.signatureHelpProvider.onDidChange($)),this._register(z.inlayHintsProvider.onDidChange($)),$()}dispose(){super.dispose()}reset(){this._contextKeyService.bufferChangeEvents(()=>{this._langId.reset(),this._hasCompletionItemProvider.reset(),this._hasCodeActionsProvider.reset(),this._hasCodeLensProvider.reset(),this._hasDefinitionProvider.reset(),this._hasDeclarationProvider.reset(),this._hasImplementationProvider.reset(),this._hasTypeDefinitionProvider.reset(),this._hasHoverProvider.reset(),this._hasDocumentHighlightProvider.reset(),this._hasDocumentSymbolProvider.reset(),this._hasReferenceProvider.reset(),this._hasRenameProvider.reset(),this._hasDocumentFormattingProvider.reset(),this._hasDocumentSelectionFormattingProvider.reset(),this._hasSignatureHelpProvider.reset(),this._isInEmbeddedEditor.reset()})}_update(){const B=this._editor.getModel();if(!B){this.reset();return}this._contextKeyService.bufferChangeEvents(()=>{this._langId.set(B.getLanguageId()),this._hasCompletionItemProvider.set(this._languageFeaturesService.completionProvider.has(B)),this._hasCodeActionsProvider.set(this._languageFeaturesService.codeActionProvider.has(B)),this._hasCodeLensProvider.set(this._languageFeaturesService.codeLensProvider.has(B)),this._hasDefinitionProvider.set(this._languageFeaturesService.definitionProvider.has(B)),this._hasDeclarationProvider.set(this._languageFeaturesService.declarationProvider.has(B)),this._hasImplementationProvider.set(this._languageFeaturesService.implementationProvider.has(B)),this._hasTypeDefinitionProvider.set(this._languageFeaturesService.typeDefinitionProvider.has(B)),this._hasHoverProvider.set(this._languageFeaturesService.hoverProvider.has(B)),this._hasDocumentHighlightProvider.set(this._languageFeaturesService.documentHighlightProvider.has(B)),this._hasDocumentSymbolProvider.set(this._languageFeaturesService.documentSymbolProvider.has(B)),this._hasReferenceProvider.set(this._languageFeaturesService.referenceProvider.has(B)),this._hasRenameProvider.set(this._languageFeaturesService.renameProvider.has(B)),this._hasSignatureHelpProvider.set(this._languageFeaturesService.signatureHelpProvider.has(B)),this._hasInlayHintsProvider.set(this._languageFeaturesService.inlayHintsProvider.has(B)),this._hasDocumentFormattingProvider.set(this._languageFeaturesService.documentFormattingEditProvider.has(B)||this._languageFeaturesService.documentRangeFormattingEditProvider.has(B)),this._hasDocumentSelectionFormattingProvider.set(this._languageFeaturesService.documentRangeFormattingEditProvider.has(B)),this._hasMultipleDocumentFormattingProvider.set(this._languageFeaturesService.documentFormattingEditProvider.all(B).length+this._languageFeaturesService.documentRangeFormattingEditProvider.all(B).length>1),this._hasMultipleDocumentSelectionFormattingProvider.set(this._languageFeaturesService.documentRangeFormattingEditProvider.all(B).length>1),this._isInEmbeddedEditor.set(B.uri.scheme===y.Schemas.walkThroughSnippet||B.uri.scheme===y.Schemas.vscodeChatCodeBlock)})}}e.EditorModeContext=P;class te extends L.Disposable{constructor(B,U){super(),this._onChange=this._register(new E.Emitter),this.onChange=this._onChange.event,this._hadFocus=void 0,this._hasDomElementFocus=!1,this._domFocusTracker=this._register(c.trackFocus(B)),this._overflowWidgetsDomNodeHasFocus=!1,this._register(this._domFocusTracker.onDidFocus(()=>{this._hasDomElementFocus=!0,this._update()})),this._register(this._domFocusTracker.onDidBlur(()=>{this._hasDomElementFocus=!1,this._update()})),U&&(this._overflowWidgetsDomNode=this._register(c.trackFocus(U)),this._register(this._overflowWidgetsDomNode.onDidFocus(()=>{this._overflowWidgetsDomNodeHasFocus=!0,this._update()})),this._register(this._overflowWidgetsDomNode.onDidBlur(()=>{this._overflowWidgetsDomNodeHasFocus=!1,this._update()})))}_update(){const B=this._hasDomElementFocus||this._overflowWidgetsDomNodeHasFocus;this._hadFocus!==B&&(this._hadFocus=B,this._onChange.fire(void 0))}hasFocus(){return this._hadFocus??!1}}class se{get length(){return this._decorationIds.length}constructor(B,U){this._editor=B,this._decorationIds=[],this._isChangingDecorations=!1,Array.isArray(U)&&U.length>0&&this.set(U)}onDidChange(B,U,z){return this._editor.onDidChangeModelDecorations($=>{this._isChangingDecorations||B.call(U,$)},z)}getRange(B){return!this._editor.hasModel()||B>=this._decorationIds.length?null:this._editor.getModel().getDecorationRange(this._decorationIds[B])}getRanges(){if(!this._editor.hasModel())return[];const B=this._editor.getModel(),U=[];for(const z of this._decorationIds){const $=B.getDecorationRange(z);$&&U.push($)}return U}has(B){return this._decorationIds.includes(B.id)}clear(){this._decorationIds.length!==0&&this.set([])}set(B){try{this._isChangingDecorations=!0,this._editor.changeDecorations(U=>{this._decorationIds=U.deltaDecorations(this._decorationIds,B)})}finally{this._isChangingDecorations=!1}return this._decorationIds}append(B){let U=[];try{this._isChangingDecorations=!0,this._editor.changeDecorations(z=>{U=z.deltaDecorations([],B),this._decorationIds=this._decorationIds.concat(U)})}finally{this._isChangingDecorations=!1}return U}}const ue=encodeURIComponent("<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 6 3' enable-background='new 0 0 6 3' height='3' width='6'><g fill='"),ge=encodeURIComponent("'><polygon points='5.5,0 2.5,3 1.1,3 4.1,0'/><polygon points='4,0 6,2 6,0.6 5.4,0'/><polygon points='0,2 1,3 2.4,3 0,0.6'/></g></svg>");function pe(J){return ue+encodeURIComponent(J.toString())+ge}const ce=encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" height="3" width="12"><g fill="'),ie=encodeURIComponent('"><circle cx="1" cy="1" r="1"/><circle cx="5" cy="1" r="1"/><circle cx="9" cy="1" r="1"/></g></svg>');function ne(J){return ce+encodeURIComponent(J.toString())+ie}(0,V.registerThemingParticipant)((J,B)=>{const U=J.getColor(W.editorErrorForeground);U&&B.addRule(`.monaco-editor .squiggly-error { background: url("data:image/svg+xml,${pe(U)}") repeat-x bottom left; }`);const z=J.getColor(W.editorWarningForeground);z&&B.addRule(`.monaco-editor .squiggly-warning { background: url("data:image/svg+xml,${pe(z)}") repeat-x bottom left; }`);const $=J.getColor(W.editorInfoForeground);$&&B.addRule(`.monaco-editor .squiggly-info { background: url("data:image/svg+xml,${pe($)}") repeat-x bottom left; }`);const Q=J.getColor(W.editorHintForeground);Q&&B.addRule(`.monaco-editor .squiggly-hint { background: url("data:image/svg+xml,${ne(Q)}") no-repeat bottom left; }`);const ee=J.getColor(l.editorUnnecessaryCodeOpacity);ee&&B.addRule(`.monaco-editor.showUnused .squiggly-inline-unnecessary { opacity: ${ee.rgba.a}; }`)})}),define(oe[124],re([1,0,54,35,218,34,17,60,24,12,7,50,25]),function(ae,e,c,k,E,L,y,f,_,C,p,n,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EmbeddedCodeEditorWidget=void 0;let t=class extends E.CodeEditorWidget{constructor(o,g,h,l,a,r,d,m,u,b,v,w,S){super(o,{...l.getRawOptions(),overflowWidgetsDomNode:l.getOverflowWidgetsDomNode()},h,a,r,d,m,u,b,v,w,S),this._parentEditor=l,this._overwriteOptions=g,super.updateOptions(this._overwriteOptions),this._register(l.onDidChangeConfiguration(D=>this._onParentConfigurationChanged(D)))}getParentEditor(){return this._parentEditor}_onParentConfigurationChanged(o){super.updateOptions(this._parentEditor.getRawOptions()),super.updateOptions(this._overwriteOptions)}updateOptions(o){c.mixin(this._overwriteOptions,o,!0),super.updateOptions(this._overwriteOptions)}};e.EmbeddedCodeEditorWidget=t,e.EmbeddedCodeEditorWidget=t=De([he(4,p.IInstantiationService),he(5,k.ICodeEditorService),he(6,_.ICommandService),he(7,C.IContextKeyService),he(8,s.IThemeService),he(9,n.INotificationService),he(10,f.IAccessibilityService),he(11,L.ILanguageConfigurationService),he(12,y.ILanguageFeaturesService)],t)}),define(oe[284],re([1,0,5,67,8,6,2,21,65,15,35,142,218,753,797,320,283,790,379,368,410,659,85,161,391,9,4,198,20,136,12,7,180,96,766,562,798,402,509]),function(ae,e,c,k,E,L,y,f,_,C,p,n,s,t,i,o,g,h,l,a,r,d,m,u,b,v,w,S,D,I,T,M,A,R,N,O,x,F){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DiffEditorWidget=void 0;let W=class extends O.DelegatingEditor{get onDidContentSizeChange(){return this._editors.onDidContentSizeChange}constructor(H,K,G,Y,X,Z,j,P){super(),this._domElement=H,this._parentContextKeyService=Y,this._parentInstantiationService=X,this._accessibilitySignalService=j,this._editorProgressService=P,this.elements=(0,c.h)("div.monaco-diff-editor.side-by-side",{style:{position:"relative",height:"100%"}},[(0,c.h)("div.editor.original@original",{style:{position:"absolute",height:"100%"}}),(0,c.h)("div.editor.modified@modified",{style:{position:"absolute",height:"100%"}}),(0,c.h)("div.accessibleDiffViewer@accessibleDiffViewer",{style:{position:"absolute",height:"100%"}})]),this._diffModelSrc=this._register((0,f.disposableObservableValue)(this,void 0)),this._diffModel=(0,f.derived)(this,z=>this._diffModelSrc.read(z)?.object),this.onDidChangeModel=L.Event.fromObservableLight(this._diffModel),this._contextKeyService=this._register(this._parentContextKeyService.createScoped(this._domElement)),this._instantiationService=this._register(this._parentInstantiationService.createChild(new A.ServiceCollection([T.IContextKeyService,this._contextKeyService]))),this._boundarySashes=(0,f.observableValue)(this,void 0),this._accessibleDiffViewerShouldBeVisible=(0,f.observableValue)(this,!1),this._accessibleDiffViewerVisible=(0,f.derived)(this,z=>this._options.onlyShowAccessibleDiffViewer.read(z)?!0:this._accessibleDiffViewerShouldBeVisible.read(z)),this._movedBlocksLinesPart=(0,f.observableValue)(this,void 0),this._layoutInfo=(0,f.derived)(this,z=>{const $=this._rootSizeObserver.width.read(z),Q=this._rootSizeObserver.height.read(z);this._rootSizeObserver.automaticLayout?this.elements.root.style.height="100%":this.elements.root.style.height=Q+"px";const ee=this._sash.read(z),le=this._gutter.read(z),de=le?.width.read(z)??0,me=this._overviewRulerPart.read(z)?.width??0;let be,ve,Le,Se,ye;if(!!ee){const ke=ee.sashLeft.read(z),Re=this._movedBlocksLinesPart.read(z)?.width.read(z)??0;be=0,ve=ke-de-Re,ye=ke-de,Le=ke,Se=$-Le-me}else ye=0,be=de,ve=Math.max(5,this._editors.original.getLayoutInfo().decorationsLeft),Le=de+ve,Se=$-Le-me;return this.elements.original.style.left=be+"px",this.elements.original.style.width=ve+"px",this._editors.original.layout({width:ve,height:Q},!0),le?.layout(ye),this.elements.modified.style.left=Le+"px",this.elements.modified.style.width=Se+"px",this._editors.modified.layout({width:Se,height:Q},!0),{modifiedEditor:this._editors.modified.getLayoutInfo(),originalEditor:this._editors.original.getLayoutInfo()}}),this._diffValue=this._diffModel.map((z,$)=>z?.diff.read($)),this.onDidUpdateDiff=L.Event.fromObservableLight(this._diffValue),Z.willCreateDiffEditor(),this._contextKeyService.createKey("isInDiffEditor",!0),this._domElement.appendChild(this.elements.root),this._register((0,y.toDisposable)(()=>this.elements.root.remove())),this._rootSizeObserver=this._register(new m.ObservableElementSizeObserver(this.elements.root,K.dimension)),this._rootSizeObserver.setAutomaticLayout(K.automaticLayout??!1),this._options=this._instantiationService.createInstance(x.DiffEditorOptions,K),this._register((0,f.autorun)(z=>{this._options.setWidth(this._rootSizeObserver.width.read(z))})),this._contextKeyService.createKey(D.EditorContextKeys.isEmbeddedDiffEditor.key,!1),this._register((0,b.bindContextKey)(D.EditorContextKeys.isEmbeddedDiffEditor,this._contextKeyService,z=>this._options.isInEmbeddedEditor.read(z))),this._register((0,b.bindContextKey)(D.EditorContextKeys.comparingMovedCode,this._contextKeyService,z=>!!this._diffModel.read(z)?.movedTextToCompare.read(z))),this._register((0,b.bindContextKey)(D.EditorContextKeys.diffEditorRenderSideBySideInlineBreakpointReached,this._contextKeyService,z=>this._options.couldShowInlineViewBecauseOfSize.read(z))),this._register((0,b.bindContextKey)(D.EditorContextKeys.diffEditorInlineMode,this._contextKeyService,z=>!this._options.renderSideBySide.read(z))),this._register((0,b.bindContextKey)(D.EditorContextKeys.hasChanges,this._contextKeyService,z=>(this._diffModel.read(z)?.diff.read(z)?.mappings.length??0)>0)),this._editors=this._register(this._instantiationService.createInstance(N.DiffEditorEditors,this.elements.original,this.elements.modified,this._options,G,(z,$,Q,ee)=>this._createInnerEditor(z,$,Q,ee))),this._register((0,b.bindContextKey)(D.EditorContextKeys.diffEditorOriginalWritable,this._contextKeyService,z=>this._options.originalEditable.read(z))),this._register((0,b.bindContextKey)(D.EditorContextKeys.diffEditorModifiedWritable,this._contextKeyService,z=>!this._options.readOnly.read(z))),this._register((0,b.bindContextKey)(D.EditorContextKeys.diffEditorOriginalUri,this._contextKeyService,z=>this._diffModel.read(z)?.model.original.uri.toString()??"")),this._register((0,b.bindContextKey)(D.EditorContextKeys.diffEditorModifiedUri,this._contextKeyService,z=>this._diffModel.read(z)?.model.modified.uri.toString()??"")),this._overviewRulerPart=(0,_.derivedDisposable)(this,z=>this._options.renderOverviewRuler.read(z)?this._instantiationService.createInstance((0,u.readHotReloadableExport)(r.OverviewRulerFeature,z),this._editors,this.elements.root,this._diffModel,this._rootSizeObserver.width,this._rootSizeObserver.height,this._layoutInfo.map($=>$.modifiedEditor)):void 0).recomputeInitiallyAndOnChange(this._store);const te={height:this._rootSizeObserver.height,width:this._rootSizeObserver.width.map((z,$)=>z-(this._overviewRulerPart.read($)?.width??0))};this._sashLayout=new o.SashLayout(this._options,te),this._sash=(0,_.derivedDisposable)(this,z=>{const $=this._options.renderSideBySide.read(z);return this.elements.root.classList.toggle("side-by-side",$),$?new o.DiffEditorSash(this.elements.root,te,this._options.enableSplitViewResizing,this._boundarySashes,this._sashLayout.sashLeft,()=>this._sashLayout.resetSash()):void 0}).recomputeInitiallyAndOnChange(this._store);const se=(0,_.derivedDisposable)(this,z=>this._instantiationService.createInstance((0,u.readHotReloadableExport)(l.HideUnchangedRegionsFeature,z),this._editors,this._diffModel,this._options)).recomputeInitiallyAndOnChange(this._store);(0,_.derivedDisposable)(this,z=>this._instantiationService.createInstance((0,u.readHotReloadableExport)(i.DiffEditorDecorations,z),this._editors,this._diffModel,this._options,this)).recomputeInitiallyAndOnChange(this._store);const ue=new Set,ge=new Set;let pe=!1;const ce=(0,_.derivedDisposable)(this,z=>this._instantiationService.createInstance((0,u.readHotReloadableExport)(g.DiffEditorViewZones,z),(0,c.getWindow)(this._domElement),this._editors,this._diffModel,this._options,this,()=>pe||se.get().isUpdatingHiddenAreas,ue,ge)).recomputeInitiallyAndOnChange(this._store),ie=(0,f.derived)(this,z=>{const $=ce.read(z).viewZones.read(z).orig,Q=se.read(z).viewZones.read(z).origViewZones;return $.concat(Q)}),ne=(0,f.derived)(this,z=>{const $=ce.read(z).viewZones.read(z).mod,Q=se.read(z).viewZones.read(z).modViewZones;return $.concat(Q)});this._register((0,m.applyViewZones)(this._editors.original,ie,z=>{pe=z},ue));let J;this._register((0,m.applyViewZones)(this._editors.modified,ne,z=>{pe=z,pe?J=n.StableEditorScrollState.capture(this._editors.modified):(J?.restore(this._editors.modified),J=void 0)},ge)),this._accessibleDiffViewer=(0,_.derivedDisposable)(this,z=>this._instantiationService.createInstance((0,u.readHotReloadableExport)(t.AccessibleDiffViewer,z),this.elements.accessibleDiffViewer,this._accessibleDiffViewerVisible,($,Q)=>this._accessibleDiffViewerShouldBeVisible.set($,Q),this._options.onlyShowAccessibleDiffViewer.map($=>!$),this._rootSizeObserver.width,this._rootSizeObserver.height,this._diffModel.map(($,Q)=>$?.diff.read(Q)?.mappings.map(ee=>ee.lineRangeMapping)),new t.AccessibleDiffViewerModelFromEditors(this._editors))).recomputeInitiallyAndOnChange(this._store);const B=this._accessibleDiffViewerVisible.map(z=>z?"hidden":"visible");this._register((0,m.applyStyle)(this.elements.modified,{visibility:B})),this._register((0,m.applyStyle)(this.elements.original,{visibility:B})),this._createDiffEditorContributions(),Z.addDiffEditor(this),this._gutter=(0,_.derivedDisposable)(this,z=>this._options.shouldRenderGutterMenu.read(z)?this._instantiationService.createInstance((0,u.readHotReloadableExport)(h.DiffEditorGutter,z),this.elements.root,this._diffModel,this._editors,this._options,this._sashLayout,this._boundarySashes):void 0),this._register((0,f.recomputeInitiallyAndOnChange)(this._layoutInfo)),(0,_.derivedDisposable)(this,z=>new((0,u.readHotReloadableExport)(a.MovedBlocksLinesFeature,z))(this.elements.root,this._diffModel,this._layoutInfo.map($=>$.originalEditor),this._layoutInfo.map($=>$.modifiedEditor),this._editors)).recomputeInitiallyAndOnChange(this._store,z=>{this._movedBlocksLinesPart.set(z,void 0)}),this._register(L.Event.runAndSubscribe(this._editors.modified.onDidChangeCursorPosition,z=>this._handleCursorPositionChange(z,!0))),this._register(L.Event.runAndSubscribe(this._editors.original.onDidChangeCursorPosition,z=>this._handleCursorPositionChange(z,!1)));const U=this._diffModel.map(this,(z,$)=>{if(z)return z.diff.read($)===void 0&&!z.isDiffUpToDate.read($)});this._register((0,f.autorunWithStore)((z,$)=>{if(U.read(z)===!0){const Q=this._editorProgressService.show(!0,1e3);$.add((0,y.toDisposable)(()=>Q.done()))}})),this._register((0,f.autorunWithStore)((z,$)=>{$.add(new((0,u.readHotReloadableExport)(d.RevertButtonsFeature,z))(this._editors,this._diffModel,this._options,this))})),this._register((0,f.autorunWithStore)((z,$)=>{const Q=this._diffModel.read(z);if(Q)for(const ee of[Q.model.original,Q.model.modified])$.add(ee.onWillDispose(le=>{(0,E.onUnexpectedError)(new E.BugIndicatingError("TextModel got disposed before DiffEditorWidget model got reset")),this.setModel(null)}))})),this._register((0,f.autorun)(z=>{this._options.setModel(this._diffModel.read(z))}))}_createInnerEditor(H,K,G,Y){return H.createInstance(s.CodeEditorWidget,K,G,Y)}_createDiffEditorContributions(){const H=C.EditorExtensionsRegistry.getDiffEditorContributions();for(const K of H)try{this._register(this._instantiationService.createInstance(K.ctor,this))}catch(G){(0,E.onUnexpectedError)(G)}}get _targetEditor(){return this._editors.modified}getEditorType(){return S.EditorType.IDiffEditor}layout(H){this._rootSizeObserver.observe(H)}hasTextFocus(){return this._editors.original.hasTextFocus()||this._editors.modified.hasTextFocus()}saveViewState(){const H=this._editors.original.saveViewState(),K=this._editors.modified.saveViewState();return{original:H,modified:K,modelState:this._diffModel.get()?.serializeState()}}restoreViewState(H){if(H&&H.original&&H.modified){const K=H;this._editors.original.restoreViewState(K.original),this._editors.modified.restoreViewState(K.modified),K.modelState&&this._diffModel.get()?.restoreSerializedState(K.modelState)}}handleInitialized(){this._editors.original.handleInitialized(),this._editors.modified.handleInitialized()}createViewModel(H){return this._instantiationService.createInstance(F.DiffEditorViewModel,H,this._options)}getModel(){return this._diffModel.get()?.model??null}setModel(H){const K=H?"model"in H?m.RefCounted.create(H).createNewRef(this):m.RefCounted.create(this.createViewModel(H),this):null;this.setDiffModel(K)}setDiffModel(H,K){const G=this._diffModel.get();!H&&G&&this._accessibleDiffViewer.get().close(),this._diffModel.get()!==H?.object&&(0,f.subtransaction)(K,Y=>{const X=H?.object;f.observableFromEvent.batchEventsGlobally(Y,()=>{this._editors.original.setModel(X?X.model.original:null),this._editors.modified.setModel(X?X.model.modified:null)});const Z=this._diffModelSrc.get()?.createNewRef(this);this._diffModelSrc.set(H?.createNewRef(this),Y),setTimeout(()=>{Z?.dispose()},0)})}updateOptions(H){this._options.updateOptions(H)}getContainerDomNode(){return this._domElement}getOriginalEditor(){return this._editors.original}getModifiedEditor(){return this._editors.modified}getLineChanges(){const H=this._diffModel.get()?.diff.get();return H?V(H):null}revert(H){const K=this._diffModel.get();!K||!K.isDiffUpToDate.get()||this._editors.modified.executeEdits("diffEditor",[{range:H.modified.toExclusiveRange(),text:K.model.original.getValueInRange(H.original.toExclusiveRange())}])}revertRangeMappings(H){const K=this._diffModel.get();if(!K||!K.isDiffUpToDate.get())return;const G=H.map(Y=>({range:Y.modifiedRange,text:K.model.original.getValueInRange(Y.originalRange)}));this._editors.modified.executeEdits("diffEditor",G)}_goTo(H){this._editors.modified.setPosition(new v.Position(H.lineRangeMapping.modified.startLineNumber,1)),this._editors.modified.revealRangeInCenter(H.lineRangeMapping.modified.toExclusiveRange())}goToDiff(H){const K=this._diffModel.get()?.diff.get()?.mappings;if(!K||K.length===0)return;const G=this._editors.modified.getPosition().lineNumber;let Y;H==="next"?Y=K.find(X=>X.lineRangeMapping.modified.startLineNumber>G)??K[0]:Y=(0,k.findLast)(K,X=>X.lineRangeMapping.modified.startLineNumber<G)??K[K.length-1],this._goTo(Y),Y.lineRangeMapping.modified.isEmpty?this._accessibilitySignalService.playSignal(I.AccessibilitySignal.diffLineDeleted,{source:"diffEditor.goToDiff"}):Y.lineRangeMapping.original.isEmpty?this._accessibilitySignalService.playSignal(I.AccessibilitySignal.diffLineInserted,{source:"diffEditor.goToDiff"}):Y&&this._accessibilitySignalService.playSignal(I.AccessibilitySignal.diffLineModified,{source:"diffEditor.goToDiff"})}revealFirstDiff(){const H=this._diffModel.get();H&&this.waitForDiff().then(()=>{const K=H.diff.get()?.mappings;!K||K.length===0||this._goTo(K[0])})}accessibleDiffViewerNext(){this._accessibleDiffViewer.get().next()}accessibleDiffViewerPrev(){this._accessibleDiffViewer.get().prev()}async waitForDiff(){const H=this._diffModel.get();H&&await H.waitForDiff()}mapToOtherSide(){const H=this._editors.modified.hasWidgetFocus(),K=H?this._editors.modified:this._editors.original,G=H?this._editors.original:this._editors.modified;let Y;const X=K.getSelection();if(X){const Z=this._diffModel.get()?.diff.get()?.mappings.map(j=>H?j.lineRangeMapping.flip():j.lineRangeMapping);if(Z){const j=(0,m.translatePosition)(X.getStartPosition(),Z),P=(0,m.translatePosition)(X.getEndPosition(),Z);Y=w.Range.plusRange(j,P)}}return{destination:G,destinationSelection:Y}}switchSide(){const{destination:H,destinationSelection:K}=this.mapToOtherSide();H.focus(),K&&H.setSelection(K)}exitCompareMove(){const H=this._diffModel.get();H&&H.movedTextToCompare.set(void 0,void 0)}collapseAllUnchangedRegions(){const H=this._diffModel.get()?.unchangedRegions.get();H&&(0,f.transaction)(K=>{for(const G of H)G.collapseAll(K)})}showAllUnchangedRegions(){const H=this._diffModel.get()?.unchangedRegions.get();H&&(0,f.transaction)(K=>{for(const G of H)G.showAll(K)})}_handleCursorPositionChange(H,K){if(H?.reason===3){const G=this._diffModel.get()?.diff.get()?.mappings.find(Y=>K?Y.lineRangeMapping.modified.contains(H.position.lineNumber):Y.lineRangeMapping.original.contains(H.position.lineNumber));G?.lineRangeMapping.modified.isEmpty?this._accessibilitySignalService.playSignal(I.AccessibilitySignal.diffLineDeleted,{source:"diffEditor.cursorPositionChanged"}):G?.lineRangeMapping.original.isEmpty?this._accessibilitySignalService.playSignal(I.AccessibilitySignal.diffLineInserted,{source:"diffEditor.cursorPositionChanged"}):G&&this._accessibilitySignalService.playSignal(I.AccessibilitySignal.diffLineModified,{source:"diffEditor.cursorPositionChanged"})}}};e.DiffEditorWidget=W,e.DiffEditorWidget=W=De([he(3,T.IContextKeyService),he(4,M.IInstantiationService),he(5,p.ICodeEditorService),he(6,I.IAccessibilitySignalService),he(7,R.IEditorProgressService)],W);function V(q){return q.mappings.map(H=>{const K=H.lineRangeMapping;let G,Y,X,Z,j=K.innerChanges;return K.original.isEmpty?(G=K.original.startLineNumber-1,Y=0,j=void 0):(G=K.original.startLineNumber,Y=K.original.endLineNumberExclusive-1),K.modified.isEmpty?(X=K.modified.startLineNumber-1,Z=0,j=void 0):(X=K.modified.startLineNumber,Z=K.modified.endLineNumberExclusive-1),{originalStartLineNumber:G,originalEndLineNumber:Y,modifiedStartLineNumber:X,modifiedEndLineNumber:Z,charChanges:j?.map(P=>({originalStartLineNumber:P.originalRange.startLineNumber,originalStartColumn:P.originalRange.startColumn,originalEndLineNumber:P.originalRange.endLineNumber,originalEndColumn:P.originalRange.endColumn,modifiedStartLineNumber:P.modifiedRange.startLineNumber,modifiedStartColumn:P.modifiedRange.startColumn,modifiedEndLineNumber:P.modifiedRange.endLineNumber,modifiedEndColumn:P.modifiedRange.endColumn}))}})}}),define(oe[802],re([1,0,5,26,15,35,284,20,3,29,27,12,138]),function(ae,e,c,k,E,L,y,f,_,C,p,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AccessibleDiffViewerPrev=e.AccessibleDiffViewerNext=e.RevertHunkOrSelection=e.ShowAllUnchangedRegions=e.CollapseAllUnchangedRegions=e.ExitCompareMove=e.SwitchSide=e.ToggleUseInlineViewWhenSpaceIsLimited=e.ToggleShowMovedCodeBlocks=e.ToggleCollapseUnchangedRegions=void 0,e.findDiffEditor=b,e.findFocusedDiffEditor=v;class s extends C.Action2{constructor(){super({id:"diffEditor.toggleCollapseUnchangedRegions",title:(0,_.localize2)(998,"Toggle Collapse Unchanged Regions"),icon:k.Codicon.map,toggled:n.ContextKeyExpr.has("config.diffEditor.hideUnchangedRegions.enabled"),precondition:n.ContextKeyExpr.has("isInDiffEditor"),menu:{when:n.ContextKeyExpr.has("isInDiffEditor"),id:C.MenuId.EditorTitle,order:22,group:"navigation"}})}run(D,...I){const T=D.get(p.IConfigurationService),M=!T.getValue("diffEditor.hideUnchangedRegions.enabled");T.updateValue("diffEditor.hideUnchangedRegions.enabled",M)}}e.ToggleCollapseUnchangedRegions=s;class t extends C.Action2{constructor(){super({id:"diffEditor.toggleShowMovedCodeBlocks",title:(0,_.localize2)(999,"Toggle Show Moved Code Blocks"),precondition:n.ContextKeyExpr.has("isInDiffEditor")})}run(D,...I){const T=D.get(p.IConfigurationService),M=!T.getValue("diffEditor.experimental.showMoves");T.updateValue("diffEditor.experimental.showMoves",M)}}e.ToggleShowMovedCodeBlocks=t;class i extends C.Action2{constructor(){super({id:"diffEditor.toggleUseInlineViewWhenSpaceIsLimited",title:(0,_.localize2)(1e3,"Toggle Use Inline View When Space Is Limited"),precondition:n.ContextKeyExpr.has("isInDiffEditor")})}run(D,...I){const T=D.get(p.IConfigurationService),M=!T.getValue("diffEditor.useInlineViewWhenSpaceIsLimited");T.updateValue("diffEditor.useInlineViewWhenSpaceIsLimited",M)}}e.ToggleUseInlineViewWhenSpaceIsLimited=i;const o=(0,_.localize2)(1001,"Diff Editor");class g extends E.EditorAction2{constructor(){super({id:"diffEditor.switchSide",title:(0,_.localize2)(1002,"Switch Side"),icon:k.Codicon.arrowSwap,precondition:n.ContextKeyExpr.has("isInDiffEditor"),f1:!0,category:o})}runEditorCommand(D,I,T){const M=v(D);if(M instanceof y.DiffEditorWidget){if(T&&T.dryRun)return{destinationSelection:M.mapToOtherSide().destinationSelection};M.switchSide()}}}e.SwitchSide=g;class h extends E.EditorAction2{constructor(){super({id:"diffEditor.exitCompareMove",title:(0,_.localize2)(1003,"Exit Compare Move"),icon:k.Codicon.close,precondition:f.EditorContextKeys.comparingMovedCode,f1:!1,category:o,keybinding:{weight:1e4,primary:9}})}runEditorCommand(D,I,...T){const M=v(D);M instanceof y.DiffEditorWidget&&M.exitCompareMove()}}e.ExitCompareMove=h;class l extends E.EditorAction2{constructor(){super({id:"diffEditor.collapseAllUnchangedRegions",title:(0,_.localize2)(1004,"Collapse All Unchanged Regions"),icon:k.Codicon.fold,precondition:n.ContextKeyExpr.has("isInDiffEditor"),f1:!0,category:o})}runEditorCommand(D,I,...T){const M=v(D);M instanceof y.DiffEditorWidget&&M.collapseAllUnchangedRegions()}}e.CollapseAllUnchangedRegions=l;class a extends E.EditorAction2{constructor(){super({id:"diffEditor.showAllUnchangedRegions",title:(0,_.localize2)(1005,"Show All Unchanged Regions"),icon:k.Codicon.unfold,precondition:n.ContextKeyExpr.has("isInDiffEditor"),f1:!0,category:o})}runEditorCommand(D,I,...T){const M=v(D);M instanceof y.DiffEditorWidget&&M.showAllUnchangedRegions()}}e.ShowAllUnchangedRegions=a;class r extends C.Action2{constructor(){super({id:"diffEditor.revert",title:(0,_.localize2)(1006,"Revert"),f1:!1,category:o})}run(D,I){const T=b(D,I.originalUri,I.modifiedUri);T instanceof y.DiffEditorWidget&&T.revertRangeMappings(I.mapping.innerChanges??[])}}e.RevertHunkOrSelection=r;const d=(0,_.localize2)(1007,"Accessible Diff Viewer");class m extends C.Action2{static{this.id="editor.action.accessibleDiffViewer.next"}constructor(){super({id:m.id,title:(0,_.localize2)(1008,"Go to Next Difference"),category:d,precondition:n.ContextKeyExpr.has("isInDiffEditor"),keybinding:{primary:65,weight:100},f1:!0})}run(D){v(D)?.accessibleDiffViewerNext()}}e.AccessibleDiffViewerNext=m;class u extends C.Action2{static{this.id="editor.action.accessibleDiffViewer.prev"}constructor(){super({id:u.id,title:(0,_.localize2)(1009,"Go to Previous Difference"),category:d,precondition:n.ContextKeyExpr.has("isInDiffEditor"),keybinding:{primary:1089,weight:100},f1:!0})}run(D){v(D)?.accessibleDiffViewerPrev()}}e.AccessibleDiffViewerPrev=u;function b(S,D,I){return S.get(L.ICodeEditorService).listDiffEditors().find(A=>{const R=A.getModifiedEditor(),N=A.getOriginalEditor();return R&&R.getModel()?.uri.toString()===I.toString()&&N&&N.getModel()?.uri.toString()===D.toString()})||null}function v(S){const I=S.get(L.ICodeEditorService).listDiffEditors(),T=(0,c.getActiveElement)();if(T)for(const M of I){const A=M.getContainerDomNode();if(w(A,T))return M}return null}function w(S,D){let I=D;for(;I;){if(I===S)return!0;I=I.parentElement}return!1}}),define(oe[803],re([1,0,26,802,20,3,29,24,12,138]),function(ae,e,c,k,E,L,y,f,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),(0,y.registerAction2)(k.ToggleCollapseUnchangedRegions),(0,y.registerAction2)(k.ToggleShowMovedCodeBlocks),(0,y.registerAction2)(k.ToggleUseInlineViewWhenSpaceIsLimited),y.MenuRegistry.appendMenuItem(y.MenuId.EditorTitle,{command:{id:new k.ToggleUseInlineViewWhenSpaceIsLimited().desc.id,title:(0,L.localize)(993,"Use Inline View When Space Is Limited"),toggled:_.ContextKeyExpr.has("config.diffEditor.useInlineViewWhenSpaceIsLimited"),precondition:_.ContextKeyExpr.has("isInDiffEditor")},order:11,group:"1_diff",when:_.ContextKeyExpr.and(E.EditorContextKeys.diffEditorRenderSideBySideInlineBreakpointReached,_.ContextKeyExpr.has("isInDiffEditor"))}),y.MenuRegistry.appendMenuItem(y.MenuId.EditorTitle,{command:{id:new k.ToggleShowMovedCodeBlocks().desc.id,title:(0,L.localize)(994,"Show Moved Code Blocks"),icon:c.Codicon.move,toggled:_.ContextKeyEqualsExpr.create("config.diffEditor.experimental.showMoves",!0),precondition:_.ContextKeyExpr.has("isInDiffEditor")},order:10,group:"1_diff",when:_.ContextKeyExpr.has("isInDiffEditor")}),(0,y.registerAction2)(k.RevertHunkOrSelection);for(const C of[{icon:c.Codicon.arrowRight,key:E.EditorContextKeys.diffEditorInlineMode.toNegated()},{icon:c.Codicon.discard,key:E.EditorContextKeys.diffEditorInlineMode}])y.MenuRegistry.appendMenuItem(y.MenuId.DiffEditorHunkToolbar,{command:{id:new k.RevertHunkOrSelection().desc.id,title:(0,L.localize)(995,"Revert Block"),icon:C.icon},when:_.ContextKeyExpr.and(E.EditorContextKeys.diffEditorModifiedWritable,C.key),order:5,group:"primary"}),y.MenuRegistry.appendMenuItem(y.MenuId.DiffEditorSelectionToolbar,{command:{id:new k.RevertHunkOrSelection().desc.id,title:(0,L.localize)(996,"Revert Selection"),icon:C.icon},when:_.ContextKeyExpr.and(E.EditorContextKeys.diffEditorModifiedWritable,C.key),order:5,group:"primary"});(0,y.registerAction2)(k.SwitchSide),(0,y.registerAction2)(k.ExitCompareMove),(0,y.registerAction2)(k.CollapseAllUnchangedRegions),(0,y.registerAction2)(k.ShowAllUnchangedRegions),y.MenuRegistry.appendMenuItem(y.MenuId.EditorTitle,{command:{id:k.AccessibleDiffViewerNext.id,title:(0,L.localize)(997,"Open Accessible Diff Viewer"),precondition:_.ContextKeyExpr.has("isInDiffEditor")},order:10,group:"2_diff",when:_.ContextKeyExpr.and(E.EditorContextKeys.accessibleDiffViewerVisible.negate(),_.ContextKeyExpr.has("isInDiffEditor"))}),f.CommandsRegistry.registerCommandAlias("editor.action.diffReview.next",k.AccessibleDiffViewerNext.id),(0,y.registerAction2)(k.AccessibleDiffViewerNext),f.CommandsRegistry.registerCommandAlias("editor.action.diffReview.prev",k.AccessibleDiffViewerPrev.id),(0,y.registerAction2)(k.AccessibleDiffViewerPrev)}),define(oe[415],re([1,0,5,231,26,2,21,91,129,284,123,216,29,7,369]),function(ae,e,c,k,E,L,y,f,_,C,p,n,s,t,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DiffEditorItemTemplate=e.TemplateData=void 0;class o{constructor(l,a){this.viewModel=l,this.deltaScrollVertical=a}getId(){return this.viewModel}}e.TemplateData=o;let g=class extends L.Disposable{constructor(l,a,r,d){super(),this._container=l,this._overflowWidgetsDomNode=a,this._workbenchUIElementFactory=r,this._instantiationService=d,this._viewModel=(0,f.observableValue)(this,void 0),this._collapsed=(0,y.derived)(this,u=>this._viewModel.read(u)?.collapsed.read(u)),this._editorContentHeight=(0,f.observableValue)(this,500),this.contentHeight=(0,y.derived)(this,u=>(this._collapsed.read(u)?0:this._editorContentHeight.read(u))+this._outerEditorHeight),this._modifiedContentWidth=(0,f.observableValue)(this,0),this._modifiedWidth=(0,f.observableValue)(this,0),this._originalContentWidth=(0,f.observableValue)(this,0),this._originalWidth=(0,f.observableValue)(this,0),this.maxScroll=(0,y.derived)(this,u=>{const b=this._modifiedContentWidth.read(u)-this._modifiedWidth.read(u),v=this._originalContentWidth.read(u)-this._originalWidth.read(u);return b>v?{maxScroll:b,width:this._modifiedWidth.read(u)}:{maxScroll:v,width:this._originalWidth.read(u)}}),this._elements=(0,c.h)("div.multiDiffEntry",[(0,c.h)("div.header@header",[(0,c.h)("div.header-content",[(0,c.h)("div.collapse-button@collapseButton"),(0,c.h)("div.file-path",[(0,c.h)("div.title.modified.show-file-icons@primaryPath",[]),(0,c.h)("div.status.deleted@status",["R"]),(0,c.h)("div.title.original.show-file-icons@secondaryPath",[])]),(0,c.h)("div.actions@actions")])]),(0,c.h)("div.editorParent",[(0,c.h)("div.editorContainer@editor")])]),this.editor=this._register(this._instantiationService.createInstance(C.DiffEditorWidget,this._elements.editor,{overflowWidgetsDomNode:this._overflowWidgetsDomNode},{})),this.isModifedFocused=(0,_.observableCodeEditor)(this.editor.getModifiedEditor()).isFocused,this.isOriginalFocused=(0,_.observableCodeEditor)(this.editor.getOriginalEditor()).isFocused,this.isFocused=(0,y.derived)(this,u=>this.isModifedFocused.read(u)||this.isOriginalFocused.read(u)),this._resourceLabel=this._workbenchUIElementFactory.createResourceLabel?this._register(this._workbenchUIElementFactory.createResourceLabel(this._elements.primaryPath)):void 0,this._resourceLabel2=this._workbenchUIElementFactory.createResourceLabel?this._register(this._workbenchUIElementFactory.createResourceLabel(this._elements.secondaryPath)):void 0,this._dataStore=new L.DisposableStore,this._headerHeight=40,this._lastScrollTop=-1,this._isSettingScrollTop=!1;const m=new k.Button(this._elements.collapseButton,{});this._register((0,y.autorun)(u=>{m.element.className="",m.icon=this._collapsed.read(u)?E.Codicon.chevronRight:E.Codicon.chevronDown})),this._register(m.onDidClick(()=>{this._viewModel.get()?.collapsed.set(!this._collapsed.get(),void 0)})),this._register((0,y.autorun)(u=>{this._elements.editor.style.display=this._collapsed.read(u)?"none":"block"})),this._register(this.editor.getModifiedEditor().onDidLayoutChange(u=>{const b=this.editor.getModifiedEditor().getLayoutInfo().contentWidth;this._modifiedWidth.set(b,void 0)})),this._register(this.editor.getOriginalEditor().onDidLayoutChange(u=>{const b=this.editor.getOriginalEditor().getLayoutInfo().contentWidth;this._originalWidth.set(b,void 0)})),this._register(this.editor.onDidContentSizeChange(u=>{(0,f.globalTransaction)(b=>{this._editorContentHeight.set(u.contentHeight,b),this._modifiedContentWidth.set(this.editor.getModifiedEditor().getContentWidth(),b),this._originalContentWidth.set(this.editor.getOriginalEditor().getContentWidth(),b)})})),this._register(this.editor.getOriginalEditor().onDidScrollChange(u=>{if(this._isSettingScrollTop||!u.scrollTopChanged||!this._data)return;const b=u.scrollTop-this._lastScrollTop;this._data.deltaScrollVertical(b)})),this._register((0,y.autorun)(u=>{const b=this._viewModel.read(u)?.isActive.read(u);this._elements.root.classList.toggle("active",b)})),this._container.appendChild(this._elements.root),this._outerEditorHeight=this._headerHeight,this._register(this._instantiationService.createInstance(n.MenuWorkbenchToolBar,this._elements.actions,s.MenuId.MultiDiffEditorFileToolbar,{actionRunner:this._register(new i.ActionRunnerWithContext(()=>this._viewModel.get()?.modifiedUri)),menuOptions:{shouldForwardArgs:!0},toolbarOptions:{primaryGroup:u=>u.startsWith("navigation")},actionViewItemProvider:(u,b)=>(0,p.createActionViewItem)(d,u,b)}))}setScrollLeft(l){this._modifiedContentWidth.get()-this._modifiedWidth.get()>this._originalContentWidth.get()-this._originalWidth.get()?this.editor.getModifiedEditor().setScrollLeft(l):this.editor.getOriginalEditor().setScrollLeft(l)}setData(l){this._data=l;function a(d){return{...d,scrollBeyondLastLine:!1,hideUnchangedRegions:{enabled:!0},scrollbar:{vertical:"hidden",horizontal:"hidden",handleMouseWheel:!1,useShadows:!1},renderOverviewRuler:!1,fixedOverflowWidgets:!0,overviewRulerBorder:!1}}if(!l){(0,f.globalTransaction)(d=>{this._viewModel.set(void 0,d),this.editor.setDiffModel(null,d),this._dataStore.clear()});return}const r=l.viewModel.documentDiffItem;(0,f.globalTransaction)(d=>{this._resourceLabel?.setUri(l.viewModel.modifiedUri??l.viewModel.originalUri,{strikethrough:l.viewModel.modifiedUri===void 0});let m=!1,u=!1,b=!1,v="";l.viewModel.modifiedUri&&l.viewModel.originalUri&&l.viewModel.modifiedUri.path!==l.viewModel.originalUri.path?(v="R",m=!0):l.viewModel.modifiedUri?l.viewModel.originalUri||(v="A",b=!0):(v="D",u=!0),this._elements.status.classList.toggle("renamed",m),this._elements.status.classList.toggle("deleted",u),this._elements.status.classList.toggle("added",b),this._elements.status.innerText=v,this._resourceLabel2?.setUri(m?l.viewModel.originalUri:void 0,{strikethrough:!0}),this._dataStore.clear(),this._viewModel.set(l.viewModel,d),this.editor.setDiffModel(l.viewModel.diffEditorViewModelRef,d),this.editor.updateOptions(a(r.options??{}))}),r.onOptionsDidChange&&this._dataStore.add(r.onOptionsDidChange(()=>{this.editor.updateOptions(a(r.options??{}))})),l.viewModel.isAlive.recomputeInitiallyAndOnChange(this._dataStore,d=>{d||this.setData(void 0)})}render(l,a,r,d){this._elements.root.style.visibility="visible",this._elements.root.style.top=`${l.start}px`,this._elements.root.style.height=`${l.length}px`,this._elements.root.style.width=`${a}px`,this._elements.root.style.position="absolute";const m=l.length-this._headerHeight,u=Math.max(0,Math.min(d.start-l.start,m));this._elements.header.style.transform=`translateY(${u}px)`,(0,f.globalTransaction)(b=>{this.editor.layout({width:a-2*8-2*1,height:l.length-this._outerEditorHeight})});try{this._isSettingScrollTop=!0,this._lastScrollTop=r,this.editor.getOriginalEditor().setScrollTop(r)}finally{this._isSettingScrollTop=!1}this._elements.header.classList.toggle("shadow",u>0||r>0),this._elements.header.classList.toggle("collapsed",u===m)}hide(){this._elements.root.style.top="-100000px",this._elements.root.style.visibility="hidden"}};e.DiffEditorItemTemplate=g,e.DiffEditorItemTemplate=g=De([he(3,t.IInstantiationService)],g)}),define(oe[804],re([1,0,5,84,13,67,8,2,21,91,162,85,69,23,20,12,7,180,415,563,3,511]),function(ae,e,c,k,E,L,y,f,_,C,p,n,s,t,i,o,g,h,l,a,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MultiDiffEditorWidgetImpl=void 0;let d=class extends f.Disposable{constructor(b,v,w,S,D,I){super(),this._element=b,this._dimension=v,this._viewModel=w,this._workbenchUIElementFactory=S,this._parentContextKeyService=D,this._parentInstantiationService=I,this._scrollableElements=(0,c.h)("div.scrollContent",[(0,c.h)("div@content",{style:{overflow:"hidden"}}),(0,c.h)("div.monaco-editor@overflowWidgetsDomNode",{})]),this._scrollable=this._register(new p.Scrollable({forceIntegerValues:!1,scheduleAtNextAnimationFrame:M=>(0,c.scheduleAtNextAnimationFrame)((0,c.getWindow)(this._element),M),smoothScrollDuration:100})),this._scrollableElement=this._register(new k.SmoothScrollableElement(this._scrollableElements.root,{vertical:1,horizontal:1,useShadows:!1},this._scrollable)),this._elements=(0,c.h)("div.monaco-component.multiDiffEditor",{},[(0,c.h)("div",{},[this._scrollableElement.getDomNode()]),(0,c.h)("div.placeholder@placeholder",{},[(0,c.h)("div",[(0,r.localize)(984,"No Changed Files")])])]),this._sizeObserver=this._register(new n.ObservableElementSizeObserver(this._element,void 0)),this._objectPool=this._register(new a.ObjectPool(M=>{const A=this._instantiationService.createInstance(l.DiffEditorItemTemplate,this._scrollableElements.content,this._scrollableElements.overflowWidgetsDomNode,this._workbenchUIElementFactory);return A.setData(M),A})),this.scrollTop=(0,_.observableFromEvent)(this,this._scrollableElement.onScroll,()=>this._scrollableElement.getScrollPosition().scrollTop),this.scrollLeft=(0,_.observableFromEvent)(this,this._scrollableElement.onScroll,()=>this._scrollableElement.getScrollPosition().scrollLeft),this._viewItemsInfo=(0,_.derivedWithStore)(this,(M,A)=>{const R=this._viewModel.read(M);if(!R)return{items:[],getItem:F=>{throw new y.BugIndicatingError}};const N=R.items.read(M),O=new Map;return{items:N.map(F=>{const W=A.add(new m(F,this._objectPool,this.scrollLeft,q=>{this._scrollableElement.setScrollPosition({scrollTop:this._scrollableElement.getScrollPosition().scrollTop+q})})),V=this._lastDocStates?.[W.getKey()];return V&&(0,C.transaction)(q=>{W.setViewState(V,q)}),O.set(F,W),W}),getItem:F=>O.get(F)}}),this._viewItems=this._viewItemsInfo.map(this,M=>M.items),this._spaceBetweenPx=0,this._totalHeight=this._viewItems.map(this,(M,A)=>M.reduce((R,N)=>R+N.contentHeight.read(A)+this._spaceBetweenPx,0)),this._contextKeyService=this._register(this._parentContextKeyService.createScoped(this._element)),this._instantiationService=this._register(this._parentInstantiationService.createChild(new h.ServiceCollection([o.IContextKeyService,this._contextKeyService]))),this._lastDocStates={},this._contextKeyService.createKey(i.EditorContextKeys.inMultiDiffEditor.key,!0),this._register((0,_.autorunWithStore)((M,A)=>{const R=this._viewModel.read(M);if(R&&R.contextKeys)for(const[N,O]of Object.entries(R.contextKeys)){const x=this._contextKeyService.createKey(N,void 0);x.set(O),A.add((0,f.toDisposable)(()=>x.reset()))}}));const T=this._parentContextKeyService.createKey(i.EditorContextKeys.multiDiffEditorAllCollapsed.key,!1);this._register((0,_.autorun)(M=>{const A=this._viewModel.read(M);if(A){const R=A.items.read(M).every(N=>N.collapsed.read(M));T.set(R)}})),this._register((0,_.autorun)(M=>{const A=this._dimension.read(M);this._sizeObserver.observe(A)})),this._register((0,_.autorun)(M=>{const A=this._viewItems.read(M);this._elements.placeholder.classList.toggle("visible",A.length===0)})),this._scrollableElements.content.style.position="relative",this._register((0,_.autorun)(M=>{const A=this._sizeObserver.height.read(M);this._scrollableElements.root.style.height=`${A}px`;const R=this._totalHeight.read(M);this._scrollableElements.content.style.height=`${R}px`;const N=this._sizeObserver.width.read(M);let O=N;const x=this._viewItems.read(M),F=(0,L.findFirstMax)(x,(0,E.compareBy)(W=>W.maxScroll.read(M).maxScroll,E.numberComparator));if(F){const W=F.maxScroll.read(M);O=N+W.maxScroll}this._scrollableElement.setScrollDimensions({width:N,height:A,scrollHeight:R,scrollWidth:O})})),b.replaceChildren(this._elements.root),this._register((0,f.toDisposable)(()=>{b.replaceChildren()})),this._register(this._register((0,_.autorun)(M=>{(0,C.globalTransaction)(A=>{this.render(M)})})))}render(b){const v=this.scrollTop.read(b);let w=0,S=0,D=0;const I=this._sizeObserver.height.read(b),T=s.OffsetRange.ofStartAndLength(v,I),M=this._sizeObserver.width.read(b);for(const A of this._viewItems.read(b)){const R=A.contentHeight.read(b),N=Math.min(R,I),O=s.OffsetRange.ofStartAndLength(S,N),x=s.OffsetRange.ofStartAndLength(D,R);if(x.isBefore(T))w-=R-N,A.hide();else if(x.isAfter(T))A.hide();else{const F=Math.max(0,Math.min(T.start-x.start,R-N));w-=F;const W=s.OffsetRange.ofStartAndLength(v+w,I);A.render(O,F,M,W)}S+=N+this._spaceBetweenPx,D+=R+this._spaceBetweenPx}this._scrollableElements.content.style.transform=`translateY(${-(v+w)}px)`}};e.MultiDiffEditorWidgetImpl=d,e.MultiDiffEditorWidgetImpl=d=De([he(4,o.IContextKeyService),he(5,g.IInstantiationService)],d);class m extends f.Disposable{constructor(b,v,w,S){super(),this.viewModel=b,this._objectPool=v,this._scrollLeft=w,this._deltaScrollVertical=S,this._templateRef=this._register((0,C.disposableObservableValue)(this,void 0)),this.contentHeight=(0,_.derived)(this,D=>this._templateRef.read(D)?.object.contentHeight?.read(D)??this.viewModel.lastTemplateData.read(D).contentHeight),this.maxScroll=(0,_.derived)(this,D=>this._templateRef.read(D)?.object.maxScroll.read(D)??{maxScroll:0,scrollWidth:0}),this.template=(0,_.derived)(this,D=>this._templateRef.read(D)?.object),this._isHidden=(0,_.observableValue)(this,!1),this._isFocused=(0,_.derived)(this,D=>this.template.read(D)?.isFocused.read(D)??!1),this.viewModel.setIsFocused(this._isFocused,void 0),this._register((0,_.autorun)(D=>{const I=this._scrollLeft.read(D);this._templateRef.read(D)?.object.setScrollLeft(I)})),this._register((0,_.autorun)(D=>{const I=this._templateRef.read(D);!I||!this._isHidden.read(D)||I.object.isFocused.read(D)||this._clear()}))}dispose(){this._clear(),super.dispose()}toString(){return`VirtualViewItem(${this.viewModel.documentDiffItem.modified?.uri.toString()})`}getKey(){return this.viewModel.getKey()}setViewState(b,v){this.viewModel.collapsed.set(b.collapsed,v),this._updateTemplateData(v);const w=this.viewModel.lastTemplateData.get(),S=b.selections?.map(t.Selection.liftSelection);this.viewModel.lastTemplateData.set({...w,selections:S},v);const D=this._templateRef.get();D&&S&&D.object.editor.setSelections(S)}_updateTemplateData(b){const v=this._templateRef.get();v&&this.viewModel.lastTemplateData.set({contentHeight:v.object.contentHeight.get(),selections:v.object.editor.getSelections()??void 0},b)}_clear(){const b=this._templateRef.get();b&&(0,C.transaction)(v=>{this._updateTemplateData(v),b.object.hide(),this._templateRef.set(void 0,v)})}hide(){this._isHidden.set(!0,void 0)}render(b,v,w,S){this._isHidden.set(!1,void 0);let D=this._templateRef.get();if(!D){D=this._objectPool.getUnusedObj(new l.TemplateData(this.viewModel,this._deltaScrollVertical)),this._templateRef.set(D,void 0);const I=this.viewModel.lastTemplateData.get().selections;I&&D.object.editor.setSelections(I)}D.object.render(b,w,v,S)}}}),define(oe[805],re([1,0,2,21,161,804,7,415,747]),function(ae,e,c,k,E,L,y,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MultiDiffEditorWidget=void 0;let _=class extends c.Disposable{constructor(p,n,s){super(),this._element=p,this._workbenchUIElementFactory=n,this._instantiationService=s,this._dimension=(0,k.observableValue)(this,void 0),this._viewModel=(0,k.observableValue)(this,void 0),this._widgetImpl=(0,k.derivedWithStore)(this,(t,i)=>((0,E.readHotReloadableExport)(f.DiffEditorItemTemplate,t),i.add(this._instantiationService.createInstance((0,E.readHotReloadableExport)(L.MultiDiffEditorWidgetImpl,t),this._element,this._dimension,this._viewModel,this._workbenchUIElementFactory)))),this._register((0,k.recomputeInitiallyAndOnChange)(this._widgetImpl))}};e.MultiDiffEditorWidget=_,e.MultiDiffEditorWidget=_=De([he(2,y.IInstantiationService)],_)}),define(oe[806],re([1,0,14,2,15,9,4,23,20,40,36,3,29,32,25,513]),function(ae,e,c,k,E,L,y,f,_,C,p,n,s,t,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BracketMatchingController=void 0;const o=(0,t.registerColor)("editorOverviewRuler.bracketMatchForeground","#A0A0A0",n.localize(972,"Overview ruler marker color for matching brackets."));class g extends E.EditorAction{constructor(){super({id:"editor.action.jumpToBracket",label:n.localize(973,"Go to Bracket"),alias:"Go to Bracket",precondition:void 0,kbOpts:{kbExpr:_.EditorContextKeys.editorTextFocus,primary:3165,weight:100}})}run(m,u){r.get(u)?.jumpToBracket()}}class h extends E.EditorAction{constructor(){super({id:"editor.action.selectToBracket",label:n.localize(974,"Select to Bracket"),alias:"Select to Bracket",precondition:void 0,metadata:{description:n.localize2(977,"Select the text inside and including the brackets or curly braces"),args:[{name:"args",schema:{type:"object",properties:{selectBrackets:{type:"boolean",default:!0}}}}]}})}run(m,u,b){let v=!0;b&&b.selectBrackets===!1&&(v=!1),r.get(u)?.selectToBracket(v)}}class l extends E.EditorAction{constructor(){super({id:"editor.action.removeBrackets",label:n.localize(975,"Remove Brackets"),alias:"Remove Brackets",precondition:void 0,kbOpts:{kbExpr:_.EditorContextKeys.editorTextFocus,primary:2561,weight:100}})}run(m,u){r.get(u)?.removeBrackets(this.id)}}class a{constructor(m,u,b){this.position=m,this.brackets=u,this.options=b}}class r extends k.Disposable{static{this.ID="editor.contrib.bracketMatchingController"}static get(m){return m.getContribution(r.ID)}constructor(m){super(),this._editor=m,this._lastBracketsData=[],this._lastVersionId=0,this._decorations=this._editor.createDecorationsCollection(),this._updateBracketsSoon=this._register(new c.RunOnceScheduler(()=>this._updateBrackets(),50)),this._matchBrackets=this._editor.getOption(72),this._updateBracketsSoon.schedule(),this._register(m.onDidChangeCursorPosition(u=>{this._matchBrackets!=="never"&&this._updateBracketsSoon.schedule()})),this._register(m.onDidChangeModelContent(u=>{this._updateBracketsSoon.schedule()})),this._register(m.onDidChangeModel(u=>{this._lastBracketsData=[],this._updateBracketsSoon.schedule()})),this._register(m.onDidChangeModelLanguageConfiguration(u=>{this._lastBracketsData=[],this._updateBracketsSoon.schedule()})),this._register(m.onDidChangeConfiguration(u=>{u.hasChanged(72)&&(this._matchBrackets=this._editor.getOption(72),this._decorations.clear(),this._lastBracketsData=[],this._lastVersionId=0,this._updateBracketsSoon.schedule())})),this._register(m.onDidBlurEditorWidget(()=>{this._updateBracketsSoon.schedule()})),this._register(m.onDidFocusEditorWidget(()=>{this._updateBracketsSoon.schedule()}))}jumpToBracket(){if(!this._editor.hasModel())return;const m=this._editor.getModel(),u=this._editor.getSelections().map(b=>{const v=b.getStartPosition(),w=m.bracketPairs.matchBracket(v);let S=null;if(w)w[0].containsPosition(v)&&!w[1].containsPosition(v)?S=w[1].getStartPosition():w[1].containsPosition(v)&&(S=w[0].getStartPosition());else{const D=m.bracketPairs.findEnclosingBrackets(v);if(D)S=D[1].getStartPosition();else{const I=m.bracketPairs.findNextBracket(v);I&&I.range&&(S=I.range.getStartPosition())}}return S?new f.Selection(S.lineNumber,S.column,S.lineNumber,S.column):new f.Selection(v.lineNumber,v.column,v.lineNumber,v.column)});this._editor.setSelections(u),this._editor.revealRange(u[0])}selectToBracket(m){if(!this._editor.hasModel())return;const u=this._editor.getModel(),b=[];this._editor.getSelections().forEach(v=>{const w=v.getStartPosition();let S=u.bracketPairs.matchBracket(w);if(!S&&(S=u.bracketPairs.findEnclosingBrackets(w),!S)){const T=u.bracketPairs.findNextBracket(w);T&&T.range&&(S=u.bracketPairs.matchBracket(T.range.getStartPosition()))}let D=null,I=null;if(S){S.sort(y.Range.compareRangesUsingStarts);const[T,M]=S;if(D=m?T.getStartPosition():T.getEndPosition(),I=m?M.getEndPosition():M.getStartPosition(),M.containsPosition(w)){const A=D;D=I,I=A}}D&&I&&b.push(new f.Selection(D.lineNumber,D.column,I.lineNumber,I.column))}),b.length>0&&(this._editor.setSelections(b),this._editor.revealRange(b[0]))}removeBrackets(m){if(!this._editor.hasModel())return;const u=this._editor.getModel();this._editor.getSelections().forEach(b=>{const v=b.getPosition();let w=u.bracketPairs.matchBracket(v);w||(w=u.bracketPairs.findEnclosingBrackets(v)),w&&(this._editor.pushUndoStop(),this._editor.executeEdits(m,[{range:w[0],text:""},{range:w[1],text:""}]),this._editor.pushUndoStop())})}static{this._DECORATION_OPTIONS_WITH_OVERVIEW_RULER=p.ModelDecorationOptions.register({description:"bracket-match-overview",stickiness:1,className:"bracket-match",overviewRuler:{color:(0,i.themeColorFromId)(o),position:C.OverviewRulerLane.Center}})}static{this._DECORATION_OPTIONS_WITHOUT_OVERVIEW_RULER=p.ModelDecorationOptions.register({description:"bracket-match-no-overview",stickiness:1,className:"bracket-match"})}_updateBrackets(){if(this._matchBrackets==="never")return;this._recomputeBrackets();const m=[];let u=0;for(const b of this._lastBracketsData){const v=b.brackets;v&&(m[u++]={range:v[0],options:b.options},m[u++]={range:v[1],options:b.options})}this._decorations.set(m)}_recomputeBrackets(){if(!this._editor.hasModel()||!this._editor.hasWidgetFocus()){this._lastBracketsData=[],this._lastVersionId=0;return}const m=this._editor.getSelections();if(m.length>100){this._lastBracketsData=[],this._lastVersionId=0;return}const u=this._editor.getModel(),b=u.getVersionId();let v=[];this._lastVersionId===b&&(v=this._lastBracketsData);const w=[];let S=0;for(let A=0,R=m.length;A<R;A++){const N=m[A];N.isEmpty()&&(w[S++]=N.getStartPosition())}w.length>1&&w.sort(L.Position.compare);const D=[];let I=0,T=0;const M=v.length;for(let A=0,R=w.length;A<R;A++){const N=w[A];for(;T<M&&v[T].position.isBefore(N);)T++;if(T<M&&v[T].position.equals(N))D[I++]=v[T];else{let O=u.bracketPairs.matchBracket(N,20),x=r._DECORATION_OPTIONS_WITH_OVERVIEW_RULER;!O&&this._matchBrackets==="always"&&(O=u.bracketPairs.findEnclosingBrackets(N,20),x=r._DECORATION_OPTIONS_WITHOUT_OVERVIEW_RULER),D[I++]=new a(N,O,x)}}this._lastBracketsData=D,this._lastVersionId=b}}e.BracketMatchingController=r,(0,E.registerEditorContribution)(r.ID,r,1),(0,E.registerEditorAction)(h),(0,E.registerEditorAction)(g),(0,E.registerEditorAction)(l),s.MenuRegistry.appendMenuItem(s.MenuId.MenubarGoMenu,{group:"5_infile_nav",command:{id:"editor.action.jumpToBracket",title:n.localize(976,"Go to &&Bracket")},order:2})}),define(oe[416],re([1,0,5,68,26,6,2,30,40,36,248,155,3,31,71,4,514]),function(ae,e,c,k,E,L,y,f,_,C,p,n,s,t,i,o){"use strict";var g;Object.defineProperty(e,"__esModule",{value:!0}),e.LightBulbWidget=void 0;const h=(0,i.registerIcon)("gutter-lightbulb",E.Codicon.lightBulb,s.localize(901,"Icon which spawns code actions menu from the gutter when there is no space in the editor.")),l=(0,i.registerIcon)("gutter-lightbulb-auto-fix",E.Codicon.lightbulbAutofix,s.localize(902,"Icon which spawns code actions menu from the gutter when there is no space in the editor and a quick fix is available.")),a=(0,i.registerIcon)("gutter-lightbulb-sparkle",E.Codicon.lightbulbSparkle,s.localize(903,"Icon which spawns code actions menu from the gutter when there is no space in the editor and an AI fix is available.")),r=(0,i.registerIcon)("gutter-lightbulb-aifix-auto-fix",E.Codicon.lightbulbSparkleAutofix,s.localize(904,"Icon which spawns code actions menu from the gutter when there is no space in the editor and an AI fix and a quick fix is available.")),d=(0,i.registerIcon)("gutter-lightbulb-sparkle-filled",E.Codicon.sparkleFilled,s.localize(905,"Icon which spawns code actions menu from the gutter when there is no space in the editor and an AI fix and a quick fix is available."));var m;(function(b){b.Hidden={type:0};class v{constructor(S,D,I,T){this.actions=S,this.trigger=D,this.editorPosition=I,this.widgetPosition=T,this.type=1}}b.Showing=v})(m||(m={}));let u=class extends y.Disposable{static{g=this}static{this.GUTTER_DECORATION=C.ModelDecorationOptions.register({description:"codicon-gutter-lightbulb-decoration",glyphMarginClassName:f.ThemeIcon.asClassName(E.Codicon.lightBulb),glyphMargin:{position:_.GlyphMarginLane.Left},stickiness:1})}static{this.ID="editor.contrib.lightbulbWidget"}static{this._posPref=[0]}constructor(v,w){super(),this._editor=v,this._keybindingService=w,this._onClick=this._register(new L.Emitter),this.onClick=this._onClick.event,this._state=m.Hidden,this._gutterState=m.Hidden,this._iconClasses=[],this.gutterDecoration=g.GUTTER_DECORATION,this._domNode=c.$("div.lightBulbWidget"),this._domNode.role="listbox",this._register(k.Gesture.ignoreTarget(this._domNode)),this._editor.addContentWidget(this),this._register(this._editor.onDidChangeModelContent(S=>{const D=this._editor.getModel();(this.state.type!==1||!D||this.state.editorPosition.lineNumber>=D.getLineCount())&&this.hide(),(this.gutterState.type!==1||!D||this.gutterState.editorPosition.lineNumber>=D.getLineCount())&&this.gutterHide()})),this._register(c.addStandardDisposableGenericMouseDownListener(this._domNode,S=>{if(this.state.type!==1)return;this._editor.focus(),S.preventDefault();const{top:D,height:I}=c.getDomNodePagePosition(this._domNode),T=this._editor.getOption(67);let M=Math.floor(T/3);this.state.widgetPosition.position!==null&&this.state.widgetPosition.position.lineNumber<this.state.editorPosition.lineNumber&&(M+=T),this._onClick.fire({x:S.posx,y:D+I+M,actions:this.state.actions,trigger:this.state.trigger})})),this._register(c.addDisposableListener(this._domNode,"mouseenter",S=>{(S.buttons&1)===1&&this.hide()})),this._register(L.Event.runAndSubscribe(this._keybindingService.onDidUpdateKeybindings,()=>{this._preferredKbLabel=this._keybindingService.lookupKeybinding(n.autoFixCommandId)?.getLabel()??void 0,this._quickFixKbLabel=this._keybindingService.lookupKeybinding(n.quickFixCommandId)?.getLabel()??void 0,this._updateLightBulbTitleAndIcon()})),this._register(this._editor.onMouseDown(async S=>{const D=["codicon-"+h.id,"codicon-"+r.id,"codicon-"+l.id,"codicon-"+a.id,"codicon-"+d.id];if(!S.target.element||!D.some(R=>S.target.element&&S.target.element.classList.contains(R))||this.gutterState.type!==1)return;this._editor.focus();const{top:I,height:T}=c.getDomNodePagePosition(S.target.element),M=this._editor.getOption(67);let A=Math.floor(M/3);this.gutterState.widgetPosition.position!==null&&this.gutterState.widgetPosition.position.lineNumber<this.gutterState.editorPosition.lineNumber&&(A+=M),this._onClick.fire({x:S.event.posx,y:I+T+A,actions:this.gutterState.actions,trigger:this.gutterState.trigger})}))}dispose(){super.dispose(),this._editor.removeContentWidget(this),this._gutterDecorationID&&this._removeGutterDecoration(this._gutterDecorationID)}getId(){return"LightBulbWidget"}getDomNode(){return this._domNode}getPosition(){return this._state.type===1?this._state.widgetPosition:null}update(v,w,S){if(v.validActions.length<=0)return this.gutterHide(),this.hide();if(!this._editor.getOptions().get(65).enabled)return this.gutterHide(),this.hide();const I=this._editor.getModel();if(!I)return this.gutterHide(),this.hide();const{lineNumber:T,column:M}=I.validatePosition(S),A=I.getOptions().tabSize,R=this._editor.getOptions().get(50),N=I.getLineContent(T),O=(0,p.computeIndentLevel)(N,A),x=R.spaceWidth*O>22,F=K=>K>2&&this._editor.getTopForLineNumber(K)===this._editor.getTopForLineNumber(K-1);let W=T,V=1;if(!x){const K=G=>{const Y=I.getLineContent(G);return/^\s*$|^\s+/.test(Y)||Y.length<=V};if(T>1&&!F(T-1)){const G=I.getLineCount(),Y=T===G,X=T>1&&K(T-1),Z=!Y&&K(T+1),j=K(T),P=!Z&&!X;let te=!1;const se=this._editor.getLineDecorations(T);if(se)for(const ue of se)ue.options.glyphMarginClassName?.includes(E.Codicon.debugBreakpoint.id)&&(te=!0);if(!Z&&!X&&!te)return this.gutterState=new m.Showing(v,w,S,{position:{lineNumber:W,column:V},preference:g._posPref}),this.renderGutterLightbub(),this.hide();X||Y||P&&!j?W-=1:(Z||P&&j)&&(W+=1)}else{if(T===1&&(T===I.getLineCount()||!K(T+1)&&!K(T)))return this.gutterState=new m.Showing(v,w,S,{position:{lineNumber:W,column:V},preference:g._posPref}),this.renderGutterLightbub(),this.hide();if(T<I.getLineCount()&&!F(T+1))W+=1;else if(M*R.spaceWidth<22)return this.hide()}V=/^\S\s*$/.test(I.getLineContent(W))?2:1}this.state=new m.Showing(v,w,S,{position:{lineNumber:W,column:V},preference:g._posPref}),this._gutterDecorationID&&(this._removeGutterDecoration(this._gutterDecorationID),this.gutterHide());const q=v.validActions,H=v.validActions[0].action.kind;if(q.length!==1||!H){this._editor.layoutContentWidget(this);return}this._editor.layoutContentWidget(this)}hide(){this.state!==m.Hidden&&(this.state=m.Hidden,this._editor.layoutContentWidget(this))}gutterHide(){this.gutterState!==m.Hidden&&(this._gutterDecorationID&&this._removeGutterDecoration(this._gutterDecorationID),this.gutterState=m.Hidden)}get state(){return this._state}set state(v){this._state=v,this._updateLightBulbTitleAndIcon()}get gutterState(){return this._gutterState}set gutterState(v){this._gutterState=v,this._updateGutterLightBulbTitleAndIcon()}_updateLightBulbTitleAndIcon(){if(this._domNode.classList.remove(...this._iconClasses),this._iconClasses=[],this.state.type!==1)return;let v,w=!1;this.state.actions.allAIFixes?(v=E.Codicon.sparkleFilled,this.state.actions.validActions.length===1&&(w=!0)):this.state.actions.hasAutoFix?this.state.actions.hasAIFix?v=E.Codicon.lightbulbSparkleAutofix:v=E.Codicon.lightbulbAutofix:this.state.actions.hasAIFix?v=E.Codicon.lightbulbSparkle:v=E.Codicon.lightBulb,this._updateLightbulbTitle(this.state.actions.hasAutoFix,w),this._iconClasses=f.ThemeIcon.asClassNameArray(v),this._domNode.classList.add(...this._iconClasses)}_updateGutterLightBulbTitleAndIcon(){if(this.gutterState.type!==1)return;let v,w=!1;this.gutterState.actions.allAIFixes?(v=d,this.gutterState.actions.validActions.length===1&&(w=!0)):this.gutterState.actions.hasAutoFix?this.gutterState.actions.hasAIFix?v=r:v=l:this.gutterState.actions.hasAIFix?v=a:v=h,this._updateLightbulbTitle(this.gutterState.actions.hasAutoFix,w);const S=C.ModelDecorationOptions.register({description:"codicon-gutter-lightbulb-decoration",glyphMarginClassName:f.ThemeIcon.asClassName(v),glyphMargin:{position:_.GlyphMarginLane.Left},stickiness:1});this.gutterDecoration=S}renderGutterLightbub(){const v=this._editor.getSelection();v&&(this._gutterDecorationID===void 0?this._addGutterDecoration(v.startLineNumber):this._updateGutterDecoration(this._gutterDecorationID,v.startLineNumber))}_addGutterDecoration(v){this._editor.changeDecorations(w=>{this._gutterDecorationID=w.addDecoration(new o.Range(v,0,v,0),this.gutterDecoration)})}_removeGutterDecoration(v){this._editor.changeDecorations(w=>{w.removeDecoration(v),this._gutterDecorationID=void 0})}_updateGutterDecoration(v,w){this._editor.changeDecorations(S=>{S.changeDecoration(v,new o.Range(w,0,w,0)),S.changeDecorationOptions(v,this.gutterDecoration)})}_updateLightbulbTitle(v,w){this.state.type===1&&(w?this.title=s.localize(906,"Run: {0}",this.state.actions.validActions[0].action.title):v&&this._preferredKbLabel?this.title=s.localize(907,"Show Code Actions. Preferred Quick Fix Available ({0})",this._preferredKbLabel):!v&&this._quickFixKbLabel?this.title=s.localize(908,"Show Code Actions ({0})",this._quickFixKbLabel):v||(this.title=s.localize(909,"Show Code Actions")))}set title(v){this._domNode.title=v}};e.LightBulbWidget=u,e.LightBulbWidget=u=g=De([he(1,t.IKeybindingService)],u)}),define(oe[285],re([1,0,5,48,8,98,2,9,36,17,155,724,748,416,184,3,751,24,27,12,7,107,96,32,97,25,133,403,90]),function(ae,e,c,k,E,L,y,f,_,C,p,n,s,t,i,o,g,h,l,a,r,d,m,u,b,v,w,S,D){"use strict";var I;Object.defineProperty(e,"__esModule",{value:!0}),e.CodeActionController=void 0;const T="quickfix-edit-highlight";let M=class extends y.Disposable{static{I=this}static{this.ID="editor.contrib.codeActionController"}static get(R){return R.getContribution(I.ID)}constructor(R,N,O,x,F,W,V,q,H,K){super(),this._commandService=V,this._configurationService=q,this._actionWidgetService=H,this._instantiationService=K,this._activeCodeActions=this._register(new y.MutableDisposable),this._showDisabled=!1,this._disposed=!1,this._editor=R,this._model=this._register(new S.CodeActionModel(this._editor,F.codeActionProvider,N,O,W,q)),this._register(this._model.onDidChangeState(G=>this.update(G))),this._lightBulbWidget=new L.Lazy(()=>{const G=this._editor.getContribution(t.LightBulbWidget.ID);return G&&this._register(G.onClick(Y=>this.showCodeActionsFromLightbulb(Y.actions,Y))),G}),this._resolver=x.createInstance(n.CodeActionKeybindingResolver),this._register(this._editor.onDidLayoutChange(()=>this._actionWidgetService.hide()))}dispose(){this._disposed=!0,super.dispose()}async showCodeActionsFromLightbulb(R,N){if(R.allAIFixes&&R.validActions.length===1){const O=R.validActions[0],x=O.action.command;x&&x.id==="inlineChat.start"&&x.arguments&&x.arguments.length>=1&&(x.arguments[0]={...x.arguments[0],autoSend:!1}),await this._applyCodeAction(O,!1,!1,p.ApplyCodeActionReason.FromAILightbulb);return}await this.showCodeActionList(R,N,{includeDisabledActions:!1,fromLightbulb:!0})}showCodeActions(R,N,O){return this.showCodeActionList(N,O,{includeDisabledActions:!1,fromLightbulb:!1})}manualTriggerAtCurrentPosition(R,N,O,x){if(!this._editor.hasModel())return;i.MessageController.get(this._editor)?.closeMessage();const F=this._editor.getPosition();this._trigger({type:1,triggerAction:N,filter:O,autoApply:x,context:{notAvailableMessage:R,position:F}})}_trigger(R){return this._model.trigger(R)}async _applyCodeAction(R,N,O,x){try{await this._instantiationService.invokeFunction(p.applyCodeAction,R,x,{preview:O,editor:this._editor})}finally{N&&this._trigger({type:2,triggerAction:w.CodeActionTriggerSource.QuickFix,filter:{}})}}hideLightBulbWidget(){this._lightBulbWidget.rawValue?.hide(),this._lightBulbWidget.rawValue?.gutterHide()}async update(R){if(R.type!==1){this.hideLightBulbWidget();return}let N;try{N=await R.actions}catch(O){(0,E.onUnexpectedError)(O);return}if(!this._disposed)if(this._lightBulbWidget.value?.update(N,R.trigger,R.position),R.trigger.type===1){if(R.trigger.filter?.include){const x=this.tryGetValidActionToApply(R.trigger,N);if(x){try{this.hideLightBulbWidget(),await this._applyCodeAction(x,!1,!1,p.ApplyCodeActionReason.FromCodeActions)}finally{N.dispose()}return}if(R.trigger.context){const F=this.getInvalidActionThatWouldHaveBeenApplied(R.trigger,N);if(F&&F.action.disabled){i.MessageController.get(this._editor)?.showMessage(F.action.disabled,R.trigger.context.position),N.dispose();return}}}const O=!!R.trigger.filter?.include;if(R.trigger.context&&(!N.allActions.length||!O&&!N.validActions.length)){i.MessageController.get(this._editor)?.showMessage(R.trigger.context.notAvailableMessage,R.trigger.context.position),this._activeCodeActions.value=N,N.dispose();return}this._activeCodeActions.value=N,this.showCodeActionList(N,this.toCoords(R.position),{includeDisabledActions:O,fromLightbulb:!1})}else this._actionWidgetService.isVisible?N.dispose():this._activeCodeActions.value=N}getInvalidActionThatWouldHaveBeenApplied(R,N){if(N.allActions.length&&(R.autoApply==="first"&&N.validActions.length===0||R.autoApply==="ifSingle"&&N.allActions.length===1))return N.allActions.find(({action:O})=>O.disabled)}tryGetValidActionToApply(R,N){if(N.validActions.length&&(R.autoApply==="first"&&N.validActions.length>0||R.autoApply==="ifSingle"&&N.validActions.length===1))return N.validActions[0]}static{this.DECORATION=_.ModelDecorationOptions.register({description:"quickfix-highlight",className:T})}async showCodeActionList(R,N,O){const x=this._editor.createDecorationsCollection(),F=this._editor.getDomNode();if(!F)return;const W=O.includeDisabledActions&&(this._showDisabled||R.validActions.length===0)?R.allActions:R.validActions;if(!W.length)return;const V=f.Position.isIPosition(N)?this.toCoords(N):N,q={onSelect:async(H,K)=>{this._applyCodeAction(H,!0,!!K,O.fromLightbulb?p.ApplyCodeActionReason.FromAILightbulb:p.ApplyCodeActionReason.FromCodeActions),this._actionWidgetService.hide(!1),x.clear()},onHide:H=>{this._editor?.focus(),x.clear()},onHover:async(H,K)=>{if(K.isCancellationRequested)return;let G=!1;const Y=H.action.kind;if(Y){const X=new D.HierarchicalKind(Y);G=[w.CodeActionKind.RefactorExtract,w.CodeActionKind.RefactorInline,w.CodeActionKind.RefactorRewrite,w.CodeActionKind.RefactorMove,w.CodeActionKind.Source].some(j=>j.contains(X))}return{canPreview:G||!!H.action.edit?.edits.length}},onFocus:H=>{if(H&&H.action){const K=H.action.ranges,G=H.action.diagnostics;if(x.clear(),K&&K.length>0){const Y=G&&G?.length>1?G.map(X=>({range:X,options:I.DECORATION})):K.map(X=>({range:X,options:I.DECORATION}));x.set(Y)}else if(G&&G.length>0){const Y=G.map(Z=>({range:Z,options:I.DECORATION}));x.set(Y);const X=G[0];if(X.startLineNumber&&X.startColumn){const Z=this._editor.getModel()?.getWordAtPosition({lineNumber:X.startLineNumber,column:X.startColumn})?.word;k.status((0,o.localize)(918,"Context: {0} at line {1} and column {2}.",Z,X.startLineNumber,X.startColumn))}}}else x.clear()}};this._actionWidgetService.show("codeActionWidget",!0,(0,s.toMenuItems)(W,this._shouldShowHeaders(),this._resolver.getResolver()),q,V,F,this._getActionBarActions(R,N,O))}toCoords(R){if(!this._editor.hasModel())return{x:0,y:0};this._editor.revealPosition(R,1),this._editor.render();const N=this._editor.getScrolledVisiblePosition(R),O=(0,c.getDomNodePagePosition)(this._editor.getDomNode()),x=O.left+N.left,F=O.top+N.top+N.height;return{x,y:F}}_shouldShowHeaders(){const R=this._editor?.getModel();return this._configurationService.getValue("editor.codeActionWidget.showHeaders",{resource:R?.uri})}_getActionBarActions(R,N,O){if(O.fromLightbulb)return[];const x=R.documentation.map(F=>({id:F.id,label:F.title,tooltip:F.tooltip??"",class:void 0,enabled:!0,run:()=>this._commandService.executeCommand(F.id,...F.arguments??[])}));return O.includeDisabledActions&&R.validActions.length>0&&R.allActions.length!==R.validActions.length&&x.push(this._showDisabled?{id:"hideMoreActions",label:(0,o.localize)(919,"Hide Disabled"),enabled:!0,tooltip:"",class:void 0,run:()=>(this._showDisabled=!1,this.showCodeActionList(R,N,O))}:{id:"showMoreActions",label:(0,o.localize)(920,"Show Disabled"),enabled:!0,tooltip:"",class:void 0,run:()=>(this._showDisabled=!0,this.showCodeActionList(R,N,O))}),x}};e.CodeActionController=M,e.CodeActionController=M=I=De([he(1,d.IMarkerService),he(2,a.IContextKeyService),he(3,r.IInstantiationService),he(4,C.ILanguageFeaturesService),he(5,m.IEditorProgressService),he(6,h.ICommandService),he(7,l.IConfigurationService),he(8,g.IActionWidgetService),he(9,r.IInstantiationService)],M),(0,v.registerThemingParticipant)((A,R)=>{((x,F)=>{F&&R.addRule(`.monaco-editor ${x} { background-color: ${F}; }`)})(".quickfix-edit-highlight",A.getColor(u.editorFindMatchHighlight));const O=A.getColor(u.editorFindMatchHighlightBorder);O&&R.addRule(`.monaco-editor .quickfix-edit-highlight { border: 1px ${(0,b.isHighContrast)(A.type)?"dotted":"solid"} ${O}; box-sizing: border-box; }`)})}),define(oe[807],re([1,0,90,11,15,20,155,3,12,133,285,403]),function(ae,e,c,k,E,L,y,f,_,C,p,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AutoFixAction=e.FixAllAction=e.OrganizeImportsAction=e.SourceAction=e.RefactorAction=e.CodeActionCommand=e.QuickFixAction=void 0;function s(m){return _.ContextKeyExpr.regex(n.SUPPORTED_CODE_ACTIONS.keys()[0],new RegExp("(\\s|^)"+(0,k.escapeRegExpCharacters)(m.value)+"\\b"))}const t={type:"object",defaultSnippets:[{body:{kind:""}}],properties:{kind:{type:"string",description:f.localize(923,"Kind of the code action to run.")},apply:{type:"string",description:f.localize(924,"Controls when the returned actions are applied."),default:"ifSingle",enum:["first","ifSingle","never"],enumDescriptions:[f.localize(925,"Always apply the first returned code action."),f.localize(926,"Apply the first returned code action if it is the only one."),f.localize(927,"Do not apply the returned code actions.")]},preferred:{type:"boolean",default:!1,description:f.localize(928,"Controls if only preferred code actions should be returned.")}}};function i(m,u,b,v,w=C.CodeActionTriggerSource.Default){m.hasModel()&&p.CodeActionController.get(m)?.manualTriggerAtCurrentPosition(u,w,b,v)}class o extends E.EditorAction{constructor(){super({id:y.quickFixCommandId,label:f.localize(929,"Quick Fix..."),alias:"Quick Fix...",precondition:_.ContextKeyExpr.and(L.EditorContextKeys.writable,L.EditorContextKeys.hasCodeActionsProvider),kbOpts:{kbExpr:L.EditorContextKeys.textInputFocus,primary:2137,weight:100}})}run(u,b){return i(b,f.localize(930,"No code actions available"),void 0,void 0,C.CodeActionTriggerSource.QuickFix)}}e.QuickFixAction=o;class g extends E.EditorCommand{constructor(){super({id:y.codeActionCommandId,precondition:_.ContextKeyExpr.and(L.EditorContextKeys.writable,L.EditorContextKeys.hasCodeActionsProvider),metadata:{description:"Trigger a code action",args:[{name:"args",schema:t}]}})}runEditorCommand(u,b,v){const w=C.CodeActionCommandArgs.fromUser(v,{kind:c.HierarchicalKind.Empty,apply:"ifSingle"});return i(b,typeof v?.kind=="string"?w.preferred?f.localize(931,"No preferred code actions for '{0}' available",v.kind):f.localize(932,"No code actions for '{0}' available",v.kind):w.preferred?f.localize(933,"No preferred code actions available"):f.localize(934,"No code actions available"),{include:w.kind,includeSourceActions:!0,onlyIncludePreferredActions:w.preferred},w.apply)}}e.CodeActionCommand=g;class h extends E.EditorAction{constructor(){super({id:y.refactorCommandId,label:f.localize(935,"Refactor..."),alias:"Refactor...",precondition:_.ContextKeyExpr.and(L.EditorContextKeys.writable,L.EditorContextKeys.hasCodeActionsProvider),kbOpts:{kbExpr:L.EditorContextKeys.textInputFocus,primary:3120,mac:{primary:1328},weight:100},contextMenuOpts:{group:"1_modification",order:2,when:_.ContextKeyExpr.and(L.EditorContextKeys.writable,s(C.CodeActionKind.Refactor))},metadata:{description:"Refactor...",args:[{name:"args",schema:t}]}})}run(u,b,v){const w=C.CodeActionCommandArgs.fromUser(v,{kind:C.CodeActionKind.Refactor,apply:"never"});return i(b,typeof v?.kind=="string"?w.preferred?f.localize(936,"No preferred refactorings for '{0}' available",v.kind):f.localize(937,"No refactorings for '{0}' available",v.kind):w.preferred?f.localize(938,"No preferred refactorings available"):f.localize(939,"No refactorings available"),{include:C.CodeActionKind.Refactor.contains(w.kind)?w.kind:c.HierarchicalKind.None,onlyIncludePreferredActions:w.preferred},w.apply,C.CodeActionTriggerSource.Refactor)}}e.RefactorAction=h;class l extends E.EditorAction{constructor(){super({id:y.sourceActionCommandId,label:f.localize(940,"Source Action..."),alias:"Source Action...",precondition:_.ContextKeyExpr.and(L.EditorContextKeys.writable,L.EditorContextKeys.hasCodeActionsProvider),contextMenuOpts:{group:"1_modification",order:2.1,when:_.ContextKeyExpr.and(L.EditorContextKeys.writable,s(C.CodeActionKind.Source))},metadata:{description:"Source Action...",args:[{name:"args",schema:t}]}})}run(u,b,v){const w=C.CodeActionCommandArgs.fromUser(v,{kind:C.CodeActionKind.Source,apply:"never"});return i(b,typeof v?.kind=="string"?w.preferred?f.localize(941,"No preferred source actions for '{0}' available",v.kind):f.localize(942,"No source actions for '{0}' available",v.kind):w.preferred?f.localize(943,"No preferred source actions available"):f.localize(944,"No source actions available"),{include:C.CodeActionKind.Source.contains(w.kind)?w.kind:c.HierarchicalKind.None,includeSourceActions:!0,onlyIncludePreferredActions:w.preferred},w.apply,C.CodeActionTriggerSource.SourceAction)}}e.SourceAction=l;class a extends E.EditorAction{constructor(){super({id:y.organizeImportsCommandId,label:f.localize(945,"Organize Imports"),alias:"Organize Imports",precondition:_.ContextKeyExpr.and(L.EditorContextKeys.writable,s(C.CodeActionKind.SourceOrganizeImports)),kbOpts:{kbExpr:L.EditorContextKeys.textInputFocus,primary:1581,weight:100}})}run(u,b){return i(b,f.localize(946,"No organize imports action available"),{include:C.CodeActionKind.SourceOrganizeImports,includeSourceActions:!0},"ifSingle",C.CodeActionTriggerSource.OrganizeImports)}}e.OrganizeImportsAction=a;class r extends E.EditorAction{constructor(){super({id:y.fixAllCommandId,label:f.localize(947,"Fix All"),alias:"Fix All",precondition:_.ContextKeyExpr.and(L.EditorContextKeys.writable,s(C.CodeActionKind.SourceFixAll))})}run(u,b){return i(b,f.localize(948,"No fix all action available"),{include:C.CodeActionKind.SourceFixAll,includeSourceActions:!0},"ifSingle",C.CodeActionTriggerSource.FixAll)}}e.FixAllAction=r;class d extends E.EditorAction{constructor(){super({id:y.autoFixCommandId,label:f.localize(949,"Auto Fix..."),alias:"Auto Fix...",precondition:_.ContextKeyExpr.and(L.EditorContextKeys.writable,s(C.CodeActionKind.QuickFix)),kbOpts:{kbExpr:L.EditorContextKeys.textInputFocus,primary:1625,mac:{primary:2649},weight:100}})}run(u,b){return i(b,f.localize(950,"No auto fixes available"),{include:C.CodeActionKind.QuickFix,onlyIncludePreferredActions:!0},"ifSingle",C.CodeActionTriggerSource.AutoFix)}}e.AutoFixAction=d}),define(oe[808],re([1,0,15,272,807,285,416,3,108,38]),function(ae,e,c,k,E,L,y,f,_,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),(0,c.registerEditorContribution)(L.CodeActionController.ID,L.CodeActionController,3),(0,c.registerEditorContribution)(y.LightBulbWidget.ID,y.LightBulbWidget,4),(0,c.registerEditorAction)(E.QuickFixAction),(0,c.registerEditorAction)(E.RefactorAction),(0,c.registerEditorAction)(E.SourceAction),(0,c.registerEditorAction)(E.OrganizeImportsAction),(0,c.registerEditorAction)(E.AutoFixAction),(0,c.registerEditorAction)(E.FixAllAction),(0,c.registerEditorCommand)(new E.CodeActionCommand),C.Registry.as(_.Extensions.Configuration).registerConfiguration({...k.editorConfigurationBaseNode,properties:{"editor.codeActionWidget.showHeaders":{type:"boolean",scope:5,description:f.localize(921,"Enable/disable showing group headers in the Code Action menu."),default:!0}}}),C.Registry.as(_.Extensions.Configuration).registerConfiguration({...k.editorConfigurationBaseNode,properties:{"editor.codeActionWidget.includeNearbyQuickFixes":{type:"boolean",scope:5,description:f.localize(922,"Enable/disable showing nearest Quick Fix within a line when not currently on a diagnostic."),default:!0}}})}),define(oe[809],re([1,0,5,111,4,36,515]),function(ae,e,c,k,E,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CodeLensWidget=e.CodeLensHelper=void 0;class y{constructor(s,t,i){this.afterColumn=1073741824,this.afterLineNumber=s,this.heightInPx=t,this._onHeight=i,this.suppressMouseDown=!0,this.domNode=document.createElement("div")}onComputedHeight(s){this._lastHeight===void 0?this._lastHeight=s:this._lastHeight!==s&&(this._lastHeight=s,this._onHeight())}isVisible(){return this._lastHeight!==0&&this.domNode.hasAttribute("monaco-visible-view-zone")}}class f{static{this._idPool=0}constructor(s,t){this.allowEditorOverflow=!1,this.suppressMouseDown=!0,this._commands=new Map,this._isEmpty=!0,this._editor=s,this._id=`codelens.widget-${f._idPool++}`,this.updatePosition(t),this._domNode=document.createElement("span"),this._domNode.className="codelens-decoration"}withCommands(s,t){this._commands.clear();const i=[];let o=!1;for(let g=0;g<s.length;g++){const h=s[g];if(h&&(o=!0,h.command)){const l=(0,k.renderLabelWithIcons)(h.command.title.trim());if(h.command.id){const a=`c${f._idPool++}`;i.push(c.$("a",{id:a,title:h.command.tooltip,role:"button"},...l)),this._commands.set(a,h.command)}else i.push(c.$("span",{title:h.command.tooltip},...l));g+1<s.length&&i.push(c.$("span",void 0,"\xA0|\xA0"))}}o?(c.reset(this._domNode,...i),this._isEmpty&&t&&this._domNode.classList.add("fadein"),this._isEmpty=!1):c.reset(this._domNode,c.$("span",void 0,"no commands"))}getCommand(s){return s.parentElement===this._domNode?this._commands.get(s.id):void 0}getId(){return this._id}getDomNode(){return this._domNode}updatePosition(s){const t=this._editor.getModel().getLineFirstNonWhitespaceColumn(s);this._widgetPosition={position:{lineNumber:s,column:t},preference:[1]}}getPosition(){return this._widgetPosition||null}}class _{constructor(){this._removeDecorations=[],this._addDecorations=[],this._addDecorationsCallbacks=[]}addDecoration(s,t){this._addDecorations.push(s),this._addDecorationsCallbacks.push(t)}removeDecoration(s){this._removeDecorations.push(s)}commit(s){const t=s.deltaDecorations(this._removeDecorations,this._addDecorations);for(let i=0,o=t.length;i<o;i++)this._addDecorationsCallbacks[i](t[i])}}e.CodeLensHelper=_;const C=L.ModelDecorationOptions.register({collapseOnReplaceEdit:!0,description:"codelens"});class p{constructor(s,t,i,o,g,h){this._isDisposed=!1,this._editor=t,this._data=s,this._decorationIds=[];let l;const a=[];this._data.forEach((r,d)=>{r.symbol.command&&a.push(r.symbol),i.addDecoration({range:r.symbol.range,options:C},m=>this._decorationIds[d]=m),l?l=E.Range.plusRange(l,r.symbol.range):l=E.Range.lift(r.symbol.range)}),this._viewZone=new y(l.startLineNumber-1,g,h),this._viewZoneId=o.addZone(this._viewZone),a.length>0&&(this._createContentWidgetIfNecessary(),this._contentWidget.withCommands(a,!1))}_createContentWidgetIfNecessary(){this._contentWidget?this._editor.layoutContentWidget(this._contentWidget):(this._contentWidget=new f(this._editor,this._viewZone.afterLineNumber+1),this._editor.addContentWidget(this._contentWidget))}dispose(s,t){this._decorationIds.forEach(s.removeDecoration,s),this._decorationIds=[],t?.removeZone(this._viewZoneId),this._contentWidget&&(this._editor.removeContentWidget(this._contentWidget),this._contentWidget=void 0),this._isDisposed=!0}isDisposed(){return this._isDisposed}isValid(){return this._decorationIds.some((s,t)=>{const i=this._editor.getModel().getDecorationRange(s),o=this._data[t].symbol;return!!(i&&E.Range.isEmpty(o.range)===i.isEmpty())})}updateCodeLensSymbols(s,t){this._decorationIds.forEach(t.removeDecoration,t),this._decorationIds=[],this._data=s,this._data.forEach((i,o)=>{t.addDecoration({range:i.symbol.range,options:C},g=>this._decorationIds[o]=g)})}updateHeight(s,t){this._viewZone.heightInPx=s,t.layoutZone(this._viewZoneId),this._contentWidget&&this._editor.layoutContentWidget(this._contentWidget)}computeIfNecessary(s){if(!this._viewZone.isVisible())return null;for(let t=0;t<this._decorationIds.length;t++){const i=s.getDecorationRange(this._decorationIds[t]);i&&(this._data[t].symbol.range=i)}return this._data}updateCommands(s){this._createContentWidgetIfNecessary(),this._contentWidget.withCommands(s,!0);for(let t=0;t<this._data.length;t++){const i=s[t];if(i){const{symbol:o}=this._data[t];o.command=i.command||o.command}}}getCommand(s){return this._contentWidget?.getCommand(s)}getLineNumber(){const s=this._editor.getModel().getDecorationRange(this._decorationIds[0]);return s?s.startLineNumber:-1}update(s){if(this.isValid()){const t=this._editor.getModel().getDecorationRange(this._decorationIds[0]);t&&(this._viewZone.afterLineNumber=t.startLineNumber-1,s.layoutZone(this._viewZoneId),this._contentWidget&&(this._contentWidget.updatePosition(t.startLineNumber),this._editor.layoutContentWidget(this._contentWidget)))}}}e.CodeLensWidget=p}),define(oe[810],re([1,0,14,8,2,142,15,37,20,380,715,809,3,24,50,63,79,17]),function(ae,e,c,k,E,L,y,f,_,C,p,n,s,t,i,o,g,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CodeLensContribution=void 0;let l=class{static{this.ID="css.editor.codeLens"}constructor(r,d,m,u,b,v){this._editor=r,this._languageFeaturesService=d,this._commandService=u,this._notificationService=b,this._codeLensCache=v,this._disposables=new E.DisposableStore,this._localToDispose=new E.DisposableStore,this._lenses=[],this._oldCodeLensModels=new E.DisposableStore,this._provideCodeLensDebounce=m.for(d.codeLensProvider,"CodeLensProvide",{min:250}),this._resolveCodeLensesDebounce=m.for(d.codeLensProvider,"CodeLensResolve",{min:250,salt:"resolve"}),this._resolveCodeLensesScheduler=new c.RunOnceScheduler(()=>this._resolveCodeLensesInViewport(),this._resolveCodeLensesDebounce.default()),this._disposables.add(this._editor.onDidChangeModel(()=>this._onModelChange())),this._disposables.add(this._editor.onDidChangeModelLanguage(()=>this._onModelChange())),this._disposables.add(this._editor.onDidChangeConfiguration(w=>{(w.hasChanged(50)||w.hasChanged(19)||w.hasChanged(18))&&this._updateLensStyle(),w.hasChanged(17)&&this._onModelChange()})),this._disposables.add(d.codeLensProvider.onDidChange(this._onModelChange,this)),this._onModelChange(),this._updateLensStyle()}dispose(){this._localDispose(),this._disposables.dispose(),this._oldCodeLensModels.dispose(),this._currentCodeLensModel?.dispose()}_getLayoutInfo(){const r=Math.max(1.3,this._editor.getOption(67)/this._editor.getOption(52));let d=this._editor.getOption(19);return(!d||d<5)&&(d=this._editor.getOption(52)*.9|0),{fontSize:d,codeLensHeight:d*r|0}}_updateLensStyle(){const{codeLensHeight:r,fontSize:d}=this._getLayoutInfo(),m=this._editor.getOption(18),u=this._editor.getOption(50),{style:b}=this._editor.getContainerDomNode();b.setProperty("--vscode-editorCodeLens-lineHeight",`${r}px`),b.setProperty("--vscode-editorCodeLens-fontSize",`${d}px`),b.setProperty("--vscode-editorCodeLens-fontFeatureSettings",u.fontFeatureSettings),m&&(b.setProperty("--vscode-editorCodeLens-fontFamily",m),b.setProperty("--vscode-editorCodeLens-fontFamilyDefault",f.EDITOR_FONT_DEFAULTS.fontFamily)),this._editor.changeViewZones(v=>{for(const w of this._lenses)w.updateHeight(r,v)})}_localDispose(){this._getCodeLensModelPromise?.cancel(),this._getCodeLensModelPromise=void 0,this._resolveCodeLensesPromise?.cancel(),this._resolveCodeLensesPromise=void 0,this._localToDispose.clear(),this._oldCodeLensModels.clear(),this._currentCodeLensModel?.dispose()}_onModelChange(){this._localDispose();const r=this._editor.getModel();if(!r||!this._editor.getOption(17)||r.isTooLargeForTokenization())return;const d=this._codeLensCache.get(r);if(d&&this._renderCodeLensSymbols(d),!this._languageFeaturesService.codeLensProvider.has(r)){d&&(0,c.disposableTimeout)(()=>{const u=this._codeLensCache.get(r);d===u&&(this._codeLensCache.delete(r),this._onModelChange())},30*1e3,this._localToDispose);return}for(const u of this._languageFeaturesService.codeLensProvider.all(r))if(typeof u.onDidChange=="function"){const b=u.onDidChange(()=>m.schedule());this._localToDispose.add(b)}const m=new c.RunOnceScheduler(()=>{const u=Date.now();this._getCodeLensModelPromise?.cancel(),this._getCodeLensModelPromise=(0,c.createCancelablePromise)(b=>(0,C.getCodeLensModel)(this._languageFeaturesService.codeLensProvider,r,b)),this._getCodeLensModelPromise.then(b=>{this._currentCodeLensModel&&this._oldCodeLensModels.add(this._currentCodeLensModel),this._currentCodeLensModel=b,this._codeLensCache.put(r,b);const v=this._provideCodeLensDebounce.update(r,Date.now()-u);m.delay=v,this._renderCodeLensSymbols(b),this._resolveCodeLensesInViewportSoon()},k.onUnexpectedError)},this._provideCodeLensDebounce.get(r));this._localToDispose.add(m),this._localToDispose.add((0,E.toDisposable)(()=>this._resolveCodeLensesScheduler.cancel())),this._localToDispose.add(this._editor.onDidChangeModelContent(()=>{this._editor.changeDecorations(u=>{this._editor.changeViewZones(b=>{const v=[];let w=-1;this._lenses.forEach(D=>{!D.isValid()||w===D.getLineNumber()?v.push(D):(D.update(b),w=D.getLineNumber())});const S=new n.CodeLensHelper;v.forEach(D=>{D.dispose(S,b),this._lenses.splice(this._lenses.indexOf(D),1)}),S.commit(u)})}),m.schedule(),this._resolveCodeLensesScheduler.cancel(),this._resolveCodeLensesPromise?.cancel(),this._resolveCodeLensesPromise=void 0})),this._localToDispose.add(this._editor.onDidFocusEditorText(()=>{m.schedule()})),this._localToDispose.add(this._editor.onDidBlurEditorText(()=>{m.cancel()})),this._localToDispose.add(this._editor.onDidScrollChange(u=>{u.scrollTopChanged&&this._lenses.length>0&&this._resolveCodeLensesInViewportSoon()})),this._localToDispose.add(this._editor.onDidLayoutChange(()=>{this._resolveCodeLensesInViewportSoon()})),this._localToDispose.add((0,E.toDisposable)(()=>{if(this._editor.getModel()){const u=L.StableEditorScrollState.capture(this._editor);this._editor.changeDecorations(b=>{this._editor.changeViewZones(v=>{this._disposeAllLenses(b,v)})}),u.restore(this._editor)}else this._disposeAllLenses(void 0,void 0)})),this._localToDispose.add(this._editor.onMouseDown(u=>{if(u.target.type!==9)return;let b=u.target.element;if(b?.tagName==="SPAN"&&(b=b.parentElement),b?.tagName==="A")for(const v of this._lenses){const w=v.getCommand(b);if(w){this._commandService.executeCommand(w.id,...w.arguments||[]).catch(S=>this._notificationService.error(S));break}}})),m.schedule()}_disposeAllLenses(r,d){const m=new n.CodeLensHelper;for(const u of this._lenses)u.dispose(m,d);r&&m.commit(r),this._lenses.length=0}_renderCodeLensSymbols(r){if(!this._editor.hasModel())return;const d=this._editor.getModel().getLineCount(),m=[];let u;for(const w of r.lenses){const S=w.symbol.range.startLineNumber;S<1||S>d||(u&&u[u.length-1].symbol.range.startLineNumber===S?u.push(w):(u=[w],m.push(u)))}if(!m.length&&!this._lenses.length)return;const b=L.StableEditorScrollState.capture(this._editor),v=this._getLayoutInfo();this._editor.changeDecorations(w=>{this._editor.changeViewZones(S=>{const D=new n.CodeLensHelper;let I=0,T=0;for(;T<m.length&&I<this._lenses.length;){const M=m[T][0].symbol.range.startLineNumber,A=this._lenses[I].getLineNumber();A<M?(this._lenses[I].dispose(D,S),this._lenses.splice(I,1)):A===M?(this._lenses[I].updateCodeLensSymbols(m[T],D),T++,I++):(this._lenses.splice(I,0,new n.CodeLensWidget(m[T],this._editor,D,S,v.codeLensHeight,()=>this._resolveCodeLensesInViewportSoon())),I++,T++)}for(;I<this._lenses.length;)this._lenses[I].dispose(D,S),this._lenses.splice(I,1);for(;T<m.length;)this._lenses.push(new n.CodeLensWidget(m[T],this._editor,D,S,v.codeLensHeight,()=>this._resolveCodeLensesInViewportSoon())),T++;D.commit(w)})}),b.restore(this._editor)}_resolveCodeLensesInViewportSoon(){this._editor.getModel()&&this._resolveCodeLensesScheduler.schedule()}_resolveCodeLensesInViewport(){this._resolveCodeLensesPromise?.cancel(),this._resolveCodeLensesPromise=void 0;const r=this._editor.getModel();if(!r)return;const d=[],m=[];if(this._lenses.forEach(v=>{const w=v.computeIfNecessary(r);w&&(d.push(w),m.push(v))}),d.length===0)return;const u=Date.now(),b=(0,c.createCancelablePromise)(v=>{const w=d.map((S,D)=>{const I=new Array(S.length),T=S.map((M,A)=>!M.symbol.command&&typeof M.provider.resolveCodeLens=="function"?Promise.resolve(M.provider.resolveCodeLens(r,M.symbol,v)).then(R=>{I[A]=R},k.onUnexpectedExternalError):(I[A]=M.symbol,Promise.resolve(void 0)));return Promise.all(T).then(()=>{!v.isCancellationRequested&&!m[D].isDisposed()&&m[D].updateCommands(I)})});return Promise.all(w)});this._resolveCodeLensesPromise=b,this._resolveCodeLensesPromise.then(()=>{const v=this._resolveCodeLensesDebounce.update(r,Date.now()-u);this._resolveCodeLensesScheduler.delay=v,this._currentCodeLensModel&&this._codeLensCache.put(r,this._currentCodeLensModel),this._oldCodeLensModels.clear(),b===this._resolveCodeLensesPromise&&(this._resolveCodeLensesPromise=void 0)},v=>{(0,k.onUnexpectedError)(v),b===this._resolveCodeLensesPromise&&(this._resolveCodeLensesPromise=void 0)})}async getModel(){return await this._getCodeLensModelPromise,await this._resolveCodeLensesPromise,this._currentCodeLensModel?.isDisposed?void 0:this._currentCodeLensModel}};e.CodeLensContribution=l,e.CodeLensContribution=l=De([he(1,h.ILanguageFeaturesService),he(2,g.ILanguageFeatureDebounceService),he(3,t.ICommandService),he(4,i.INotificationService),he(5,p.ICodeLensCache)],l),(0,y.registerEditorContribution)(l.ID,l,1),(0,y.registerEditorAction)(class extends y.EditorAction{constructor(){super({id:"codelens.showLensesInCurrentLine",precondition:_.EditorContextKeys.hasCodeLensProvider,label:(0,s.localize)(899,"Show CodeLens Commands For Current Line"),alias:"Show CodeLens Commands For Current Line"})}async run(r,d){if(!d.hasModel())return;const m=r.get(o.IQuickInputService),u=r.get(t.ICommandService),b=r.get(i.INotificationService),v=d.getSelection().positionLineNumber,w=d.getContribution(l.ID);if(!w)return;const S=await w.getModel();if(!S)return;const D=[];for(const M of S.lenses)M.symbol.command&&M.symbol.range.startLineNumber===v&&D.push({label:M.symbol.command.title,command:M.symbol.command});if(D.length===0)return;const I=await m.pick(D,{canPickMany:!1,placeHolder:(0,s.localize)(900,"Select a command")});if(!I)return;let T=I.command;if(S.isDisposed){const A=(await w.getModel())?.lenses.find(R=>R.symbol.range.startLineNumber===v&&R.symbol.command?.title===T.title);if(!A||!A.symbol.command)return;T=A.symbol.command}try{await u.executeCommand(T.id,...T.arguments||[])}catch(M){b.error(M)}}})}),define(oe[417],re([1,0,14,33,8,6,2,59,11,185,15,4,36,79,17,396,27]),function(ae,e,c,k,E,L,y,f,_,C,p,n,s,t,i,o,g){"use strict";var h;Object.defineProperty(e,"__esModule",{value:!0}),e.DecoratorLimitReporter=e.ColorDetector=e.ColorDecorationInjectedTextMarker=void 0,e.ColorDecorationInjectedTextMarker=Object.create({});let l=class extends y.Disposable{static{h=this}static{this.ID="editor.contrib.colorDetector"}static{this.RECOMPUTE_TIME=1e3}constructor(d,m,u,b){super(),this._editor=d,this._configurationService=m,this._languageFeaturesService=u,this._localToDispose=this._register(new y.DisposableStore),this._decorationsIds=[],this._colorDatas=new Map,this._colorDecoratorIds=this._editor.createDecorationsCollection(),this._ruleFactory=new C.DynamicCssRules(this._editor),this._decoratorLimitReporter=new a,this._colorDecorationClassRefs=this._register(new y.DisposableStore),this._debounceInformation=b.for(u.colorProvider,"Document Colors",{min:h.RECOMPUTE_TIME}),this._register(d.onDidChangeModel(()=>{this._isColorDecoratorsEnabled=this.isEnabled(),this.updateColors()})),this._register(d.onDidChangeModelLanguage(()=>this.updateColors())),this._register(u.colorProvider.onDidChange(()=>this.updateColors())),this._register(d.onDidChangeConfiguration(v=>{const w=this._isColorDecoratorsEnabled;this._isColorDecoratorsEnabled=this.isEnabled(),this._isDefaultColorDecoratorsEnabled=this._editor.getOption(148);const S=w!==this._isColorDecoratorsEnabled||v.hasChanged(21),D=v.hasChanged(148);(S||D)&&(this._isColorDecoratorsEnabled?this.updateColors():this.removeAllDecorations())})),this._timeoutTimer=null,this._computePromise=null,this._isColorDecoratorsEnabled=this.isEnabled(),this._isDefaultColorDecoratorsEnabled=this._editor.getOption(148),this.updateColors()}isEnabled(){const d=this._editor.getModel();if(!d)return!1;const m=d.getLanguageId(),u=this._configurationService.getValue(m);if(u&&typeof u=="object"){const b=u.colorDecorators;if(b&&b.enable!==void 0&&!b.enable)return b.enable}return this._editor.getOption(20)}static get(d){return d.getContribution(this.ID)}dispose(){this.stop(),this.removeAllDecorations(),super.dispose()}updateColors(){if(this.stop(),!this._isColorDecoratorsEnabled)return;const d=this._editor.getModel();!d||!this._languageFeaturesService.colorProvider.has(d)||(this._localToDispose.add(this._editor.onDidChangeModelContent(()=>{this._timeoutTimer||(this._timeoutTimer=new c.TimeoutTimer,this._timeoutTimer.cancelAndSet(()=>{this._timeoutTimer=null,this.beginCompute()},this._debounceInformation.get(d)))})),this.beginCompute())}async beginCompute(){this._computePromise=(0,c.createCancelablePromise)(async d=>{const m=this._editor.getModel();if(!m)return[];const u=new f.StopWatch(!1),b=await(0,o.getColors)(this._languageFeaturesService.colorProvider,m,d,this._isDefaultColorDecoratorsEnabled);return this._debounceInformation.update(m,u.elapsed()),b});try{const d=await this._computePromise;this.updateDecorations(d),this.updateColorDecorators(d),this._computePromise=null}catch(d){(0,E.onUnexpectedError)(d)}}stop(){this._timeoutTimer&&(this._timeoutTimer.cancel(),this._timeoutTimer=null),this._computePromise&&(this._computePromise.cancel(),this._computePromise=null),this._localToDispose.clear()}updateDecorations(d){const m=d.map(u=>({range:{startLineNumber:u.colorInfo.range.startLineNumber,startColumn:u.colorInfo.range.startColumn,endLineNumber:u.colorInfo.range.endLineNumber,endColumn:u.colorInfo.range.endColumn},options:s.ModelDecorationOptions.EMPTY}));this._editor.changeDecorations(u=>{this._decorationsIds=u.deltaDecorations(this._decorationsIds,m),this._colorDatas=new Map,this._decorationsIds.forEach((b,v)=>this._colorDatas.set(b,d[v]))})}updateColorDecorators(d){this._colorDecorationClassRefs.clear();const m=[],u=this._editor.getOption(21);for(let v=0;v<d.length&&m.length<u;v++){const{red:w,green:S,blue:D,alpha:I}=d[v].colorInfo.color,T=new k.RGBA(Math.round(w*255),Math.round(S*255),Math.round(D*255),I),M=`rgba(${T.r}, ${T.g}, ${T.b}, ${T.a})`,A=this._colorDecorationClassRefs.add(this._ruleFactory.createClassNameRef({backgroundColor:M}));m.push({range:{startLineNumber:d[v].colorInfo.range.startLineNumber,startColumn:d[v].colorInfo.range.startColumn,endLineNumber:d[v].colorInfo.range.endLineNumber,endColumn:d[v].colorInfo.range.endColumn},options:{description:"colorDetector",before:{content:_.noBreakWhitespace,inlineClassName:`${A.className} colorpicker-color-decoration`,inlineClassNameAffectsLetterSpacing:!0,attachedData:e.ColorDecorationInjectedTextMarker}}})}const b=u<d.length?u:!1;this._decoratorLimitReporter.update(d.length,b),this._colorDecoratorIds.set(m)}removeAllDecorations(){this._editor.removeDecorations(this._decorationsIds),this._decorationsIds=[],this._colorDecoratorIds.clear(),this._colorDecorationClassRefs.clear()}getColorData(d){const m=this._editor.getModel();if(!m)return null;const u=m.getDecorationsInRange(n.Range.fromPositions(d,d)).filter(b=>this._colorDatas.has(b.id));return u.length===0?null:this._colorDatas.get(u[0].id)}isColorDecoration(d){return this._colorDecoratorIds.has(d)}};e.ColorDetector=l,e.ColorDetector=l=h=De([he(1,g.IConfigurationService),he(2,i.ILanguageFeaturesService),he(3,t.ILanguageFeatureDebounceService)],l);class a{constructor(){this._onDidChange=new L.Emitter,this._computed=0,this._limited=!1}update(d,m){(d!==this._computed||m!==this._limited)&&(this._computed=d,this._limited=m,this._onDidChange.fire())}}e.DecoratorLimitReporter=a,(0,p.registerEditorContribution)(l.ID,l,1)}),define(oe[286],re([1,0,14,18,33,2,4,396,417,629,754,86,25,5]),function(ae,e,c,k,E,L,y,f,_,C,p,n,s,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StandaloneColorPickerParticipant=e.StandaloneColorPickerHover=e.ColorHoverParticipant=e.ColorHover=void 0;class i{constructor(u,b,v,w){this.owner=u,this.range=b,this.model=v,this.provider=w,this.forceShowAtRange=!0}isValidForHoverAnchor(u){return u.type===1&&this.range.startColumn<=u.range.startColumn&&this.range.endColumn>=u.range.endColumn}}e.ColorHover=i;let o=class{constructor(u,b){this._editor=u,this._themeService=b,this.hoverOrdinal=2}computeSync(u,b){return[]}computeAsync(u,b,v){return c.AsyncIterableObject.fromPromise(this._computeAsync(u,b,v))}async _computeAsync(u,b,v){if(!this._editor.hasModel())return[];const w=_.ColorDetector.get(this._editor);if(!w)return[];for(const S of b){if(!w.isColorDecoration(S))continue;const D=w.getColorData(S.range.getStartPosition());if(D)return[await l(this,this._editor.getModel(),D.colorInfo,D.provider)]}return[]}renderHoverParts(u,b){const v=a(this,this._editor,this._themeService,b,u);if(!v)return new n.RenderedHoverParts([]);this._colorPicker=v.colorPicker;const w={hoverPart:v.hoverPart,hoverElement:this._colorPicker.domNode,dispose(){v.disposables.dispose()}};return new n.RenderedHoverParts([w])}handleResize(){this._colorPicker?.layout()}isColorPickerVisible(){return!!this._colorPicker}};e.ColorHoverParticipant=o,e.ColorHoverParticipant=o=De([he(1,s.IThemeService)],o);class g{constructor(u,b,v,w){this.owner=u,this.range=b,this.model=v,this.provider=w}}e.StandaloneColorPickerHover=g;let h=class{constructor(u,b){this._editor=u,this._themeService=b,this._color=null}async createColorHover(u,b,v){if(!this._editor.hasModel()||!_.ColorDetector.get(this._editor))return null;const S=await(0,f.getColors)(v,this._editor.getModel(),k.CancellationToken.None);let D=null,I=null;for(const R of S){const N=R.colorInfo;y.Range.containsRange(N.range,u.range)&&(D=N,I=R.provider)}const T=D??u,M=I??b,A=!!D;return{colorHover:await l(this,this._editor.getModel(),T,M),foundInEditor:A}}async updateEditorModel(u){if(!this._editor.hasModel())return;const b=u.model;let v=new y.Range(u.range.startLineNumber,u.range.startColumn,u.range.endLineNumber,u.range.endColumn);this._color&&(await d(this._editor.getModel(),b,this._color,v,u),v=r(this._editor,v,b))}renderHoverParts(u,b){return a(this,this._editor,this._themeService,b,u)}set color(u){this._color=u}get color(){return this._color}};e.StandaloneColorPickerParticipant=h,e.StandaloneColorPickerParticipant=h=De([he(1,s.IThemeService)],h);async function l(m,u,b,v){const w=u.getValueInRange(b.range),{red:S,green:D,blue:I,alpha:T}=b.color,M=new E.RGBA(Math.round(S*255),Math.round(D*255),Math.round(I*255),T),A=new E.Color(M),R=await(0,f.getColorPresentations)(u,b,v,k.CancellationToken.None),N=new C.ColorPickerModel(A,[],0);return N.colorPresentations=R||[],N.guessColorPresentation(A,w),m instanceof o?new i(m,y.Range.lift(b.range),N,v):new g(m,y.Range.lift(b.range),N,v)}function a(m,u,b,v,w){if(v.length===0||!u.hasModel())return;if(w.setMinimumDimensions){const N=u.getOption(67)+8;w.setMinimumDimensions(new t.Dimension(302,N))}const S=new L.DisposableStore,D=v[0],I=u.getModel(),T=D.model,M=S.add(new p.ColorPickerWidget(w.fragment,T,u.getOption(144),b,m instanceof h));let A=!1,R=new y.Range(D.range.startLineNumber,D.range.startColumn,D.range.endLineNumber,D.range.endColumn);if(m instanceof h){const N=D.model.color;m.color=N,d(I,T,N,R,D),S.add(T.onColorFlushed(O=>{m.color=O}))}else S.add(T.onColorFlushed(async N=>{await d(I,T,N,R,D),A=!0,R=r(u,R,T)}));return S.add(T.onDidChangeColor(N=>{d(I,T,N,R,D)})),S.add(u.onDidChangeModelContent(N=>{A?A=!1:(w.hide(),u.focus())})),{hoverPart:D,colorPicker:M,disposables:S}}function r(m,u,b){const v=[],w=b.presentation.textEdit??{range:u,text:b.presentation.label,forceMoveMarkers:!1};v.push(w),b.presentation.additionalTextEdits&&v.push(...b.presentation.additionalTextEdits);const S=y.Range.lift(w.range),D=m.getModel()._setTrackedRange(null,S,3);return m.executeEdits("colorpicker",v),m.pushUndoStop(),m.getModel()._getTrackedRange(D)??S}async function d(m,u,b,v,w){const S=await(0,f.getColorPresentations)(m,{range:v,color:{red:b.rgba.r/255,green:b.rgba.g/255,blue:b.rgba.b/255,alpha:b.rgba.a}},w.provider,k.CancellationToken.None);u.colorPresentations=S||[]}}),define(oe[811],re([1,0,2,286,7,384,31,6,17,15,20,12,44,34,395,5,236]),function(ae,e,c,k,E,L,y,f,_,C,p,n,s,t,i,o){"use strict";var g,h;Object.defineProperty(e,"__esModule",{value:!0}),e.StandaloneColorPickerWidget=e.StandaloneColorPickerController=void 0;let l=class extends c.Disposable{static{g=this}static{this.ID="editor.contrib.standaloneColorPickerController"}constructor(b,v,w,S,D,I,T){super(),this._editor=b,this._modelService=w,this._keybindingService=S,this._instantiationService=D,this._languageFeatureService=I,this._languageConfigurationService=T,this._standaloneColorPickerWidget=null,this._standaloneColorPickerVisible=p.EditorContextKeys.standaloneColorPickerVisible.bindTo(v),this._standaloneColorPickerFocused=p.EditorContextKeys.standaloneColorPickerFocused.bindTo(v)}showOrFocus(){this._editor.hasModel()&&(this._standaloneColorPickerVisible.get()?this._standaloneColorPickerFocused.get()||this._standaloneColorPickerWidget?.focus():this._standaloneColorPickerWidget=new d(this._editor,this._standaloneColorPickerVisible,this._standaloneColorPickerFocused,this._instantiationService,this._modelService,this._keybindingService,this._languageFeatureService,this._languageConfigurationService))}hide(){this._standaloneColorPickerFocused.set(!1),this._standaloneColorPickerVisible.set(!1),this._standaloneColorPickerWidget?.hide(),this._editor.focus()}insertColor(){this._standaloneColorPickerWidget?.updateEditor(),this.hide()}static get(b){return b.getContribution(g.ID)}};e.StandaloneColorPickerController=l,e.StandaloneColorPickerController=l=g=De([he(1,n.IContextKeyService),he(2,s.IModelService),he(3,y.IKeybindingService),he(4,E.IInstantiationService),he(5,_.ILanguageFeaturesService),he(6,t.ILanguageConfigurationService)],l),(0,C.registerEditorContribution)(l.ID,l,1);const a=8,r=22;let d=class extends c.Disposable{static{h=this}static{this.ID="editor.contrib.standaloneColorPickerWidget"}constructor(b,v,w,S,D,I,T,M){super(),this._editor=b,this._standaloneColorPickerVisible=v,this._standaloneColorPickerFocused=w,this._modelService=D,this._keybindingService=I,this._languageFeaturesService=T,this._languageConfigurationService=M,this.allowEditorOverflow=!0,this._position=void 0,this._body=document.createElement("div"),this._colorHover=null,this._selectionSetInEditor=!1,this._onResult=this._register(new f.Emitter),this.onResult=this._onResult.event,this._standaloneColorPickerVisible.set(!0),this._standaloneColorPickerParticipant=S.createInstance(k.StandaloneColorPickerParticipant,this._editor),this._position=this._editor._getViewModel()?.getPrimaryCursorState().modelState.position;const A=this._editor.getSelection(),R=A?{startLineNumber:A.startLineNumber,startColumn:A.startColumn,endLineNumber:A.endLineNumber,endColumn:A.endColumn}:{startLineNumber:0,endLineNumber:0,endColumn:0,startColumn:0},N=this._register(o.trackFocus(this._body));this._register(N.onDidBlur(O=>{this.hide()})),this._register(N.onDidFocus(O=>{this.focus()})),this._register(this._editor.onDidChangeCursorPosition(()=>{this._selectionSetInEditor?this._selectionSetInEditor=!1:this.hide()})),this._register(this._editor.onMouseMove(O=>{const x=O.target.element?.classList;x&&x.contains("colorpicker-color-decoration")&&this.hide()})),this._register(this.onResult(O=>{this._render(O.value,O.foundInEditor)})),this._start(R),this._body.style.zIndex="50",this._editor.addContentWidget(this)}updateEditor(){this._colorHover&&this._standaloneColorPickerParticipant.updateEditorModel(this._colorHover)}getId(){return h.ID}getDomNode(){return this._body}getPosition(){if(!this._position)return null;const b=this._editor.getOption(60).above;return{position:this._position,secondaryPosition:this._position,preference:b?[1,2]:[2,1],positionAffinity:2}}hide(){this.dispose(),this._standaloneColorPickerVisible.set(!1),this._standaloneColorPickerFocused.set(!1),this._editor.removeContentWidget(this),this._editor.focus()}focus(){this._standaloneColorPickerFocused.set(!0),this._body.focus()}async _start(b){const v=await this._computeAsync(b);v&&this._onResult.fire(new m(v.result,v.foundInEditor))}async _computeAsync(b){if(!this._editor.hasModel())return null;const v={range:b,color:{red:0,green:0,blue:0,alpha:1}},w=await this._standaloneColorPickerParticipant.createColorHover(v,new i.DefaultDocumentColorProvider(this._modelService,this._languageConfigurationService),this._languageFeaturesService.colorProvider);return w?{result:w.colorHover,foundInEditor:w.foundInEditor}:null}_render(b,v){const w=document.createDocumentFragment(),S=this._register(new L.EditorHoverStatusBar(this._keybindingService)),D={fragment:w,statusBar:S,onContentsChanged:()=>{},hide:()=>this.hide()};this._colorHover=b;const I=this._standaloneColorPickerParticipant.renderHoverParts(D,[b]);if(!I)return;this._register(I.disposables);const T=I.colorPicker;this._body.classList.add("standalone-colorpicker-body"),this._body.style.maxHeight=Math.max(this._editor.getLayoutInfo().height/4,250)+"px",this._body.style.maxWidth=Math.max(this._editor.getLayoutInfo().width*.66,500)+"px",this._body.tabIndex=0,this._body.appendChild(w),T.layout();const M=T.body,A=M.saturationBox.domNode.clientWidth,R=M.domNode.clientWidth-A-r-a,N=T.body.enterButton;N?.onClicked(()=>{this.updateEditor(),this.hide()});const O=T.header,x=O.pickedColorNode;x.style.width=A+a+"px";const F=O.originalColorNode;F.style.width=R+"px",T.header.closeButton?.onClicked(()=>{this.hide()}),v&&(N&&(N.button.textContent="Replace"),this._selectionSetInEditor=!0,this._editor.setSelection(b.range)),this._editor.layoutContentWidget(this)}};e.StandaloneColorPickerWidget=d,e.StandaloneColorPickerWidget=d=h=De([he(3,E.IInstantiationService),he(4,s.IModelService),he(5,y.IKeybindingService),he(6,_.ILanguageFeaturesService),he(7,t.ILanguageConfigurationService)],d);class m{constructor(b,v){this.value=b,this.foundInEditor=v}}}),define(oe[812],re([1,0,15,3,811,20,29,236]),function(ae,e,c,k,E,L,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ShowOrFocusStandaloneColorPicker=void 0;class f extends c.EditorAction2{constructor(){super({id:"editor.action.showOrFocusStandaloneColorPicker",title:{...(0,k.localize2)(893,"Show or Focus Standalone Color Picker"),mnemonicTitle:(0,k.localize)(890,"&&Show or Focus Standalone Color Picker")},precondition:void 0,menu:[{id:y.MenuId.CommandPalette}],metadata:{description:(0,k.localize2)(894,"Show or focus a standalone color picker which uses the default color provider. It displays hex/rgb/hsl colors.")}})}runEditorCommand(n,s){E.StandaloneColorPickerController.get(s)?.showOrFocus()}}e.ShowOrFocusStandaloneColorPicker=f;class _ extends c.EditorAction{constructor(){super({id:"editor.action.hideColorPicker",label:(0,k.localize)(891,"Hide the Color Picker"),alias:"Hide the Color Picker",precondition:L.EditorContextKeys.standaloneColorPickerVisible.isEqualTo(!0),kbOpts:{primary:9,weight:100},metadata:{description:(0,k.localize2)(895,"Hide the standalone color picker.")}})}run(n,s){E.StandaloneColorPickerController.get(s)?.hide()}}class C extends c.EditorAction{constructor(){super({id:"editor.action.insertColorWithStandaloneColorPicker",label:(0,k.localize)(892,"Insert Color with Standalone Color Picker"),alias:"Insert Color with Standalone Color Picker",precondition:L.EditorContextKeys.standaloneColorPickerFocused.isEqualTo(!0),kbOpts:{primary:3,weight:100},metadata:{description:(0,k.localize2)(896,"Insert hex/rgb/hsl colors with the focused standalone color picker.")}})}run(n,s){E.StandaloneColorPickerController.get(s)?.insertColor()}}(0,c.registerEditorAction)(_),(0,c.registerEditorAction)(C),(0,y.registerAction2)(f)}),define(oe[813],re([1,0,2,16,15,9,4,23,36,631,516]),function(ae,e,c,k,E,L,y,f,_,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DragAndDropController=void 0;function p(s){return k.isMacintosh?s.altKey:s.ctrlKey}class n extends c.Disposable{static{this.ID="editor.contrib.dragAndDrop"}static{this.TRIGGER_KEY_VALUE=k.isMacintosh?6:5}constructor(t){super(),this._editor=t,this._dndDecorationIds=this._editor.createDecorationsCollection(),this._register(this._editor.onMouseDown(i=>this._onEditorMouseDown(i))),this._register(this._editor.onMouseUp(i=>this._onEditorMouseUp(i))),this._register(this._editor.onMouseDrag(i=>this._onEditorMouseDrag(i))),this._register(this._editor.onMouseDrop(i=>this._onEditorMouseDrop(i))),this._register(this._editor.onMouseDropCanceled(()=>this._onEditorMouseDropCanceled())),this._register(this._editor.onKeyDown(i=>this.onEditorKeyDown(i))),this._register(this._editor.onKeyUp(i=>this.onEditorKeyUp(i))),this._register(this._editor.onDidBlurEditorWidget(()=>this.onEditorBlur())),this._register(this._editor.onDidBlurEditorText(()=>this.onEditorBlur())),this._mouseDown=!1,this._modifierPressed=!1,this._dragSelection=null}onEditorBlur(){this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1,this._modifierPressed=!1}onEditorKeyDown(t){!this._editor.getOption(35)||this._editor.getOption(22)||(p(t)&&(this._modifierPressed=!0),this._mouseDown&&p(t)&&this._editor.updateOptions({mouseStyle:"copy"}))}onEditorKeyUp(t){!this._editor.getOption(35)||this._editor.getOption(22)||(p(t)&&(this._modifierPressed=!1),this._mouseDown&&t.keyCode===n.TRIGGER_KEY_VALUE&&this._editor.updateOptions({mouseStyle:"default"}))}_onEditorMouseDown(t){this._mouseDown=!0}_onEditorMouseUp(t){this._mouseDown=!1,this._editor.updateOptions({mouseStyle:"text"})}_onEditorMouseDrag(t){const i=t.target;if(this._dragSelection===null){const g=(this._editor.getSelections()||[]).filter(h=>i.position&&h.containsPosition(i.position));if(g.length===1)this._dragSelection=g[0];else return}p(t.event)?this._editor.updateOptions({mouseStyle:"copy"}):this._editor.updateOptions({mouseStyle:"default"}),i.position&&(this._dragSelection.containsPosition(i.position)?this._removeDecoration():this.showAt(i.position))}_onEditorMouseDropCanceled(){this._editor.updateOptions({mouseStyle:"text"}),this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1}_onEditorMouseDrop(t){if(t.target&&(this._hitContent(t.target)||this._hitMargin(t.target))&&t.target.position){const i=new L.Position(t.target.position.lineNumber,t.target.position.column);if(this._dragSelection===null){let o=null;if(t.event.shiftKey){const g=this._editor.getSelection();if(g){const{selectionStartLineNumber:h,selectionStartColumn:l}=g;o=[new f.Selection(h,l,i.lineNumber,i.column)]}}else o=(this._editor.getSelections()||[]).map(g=>g.containsPosition(i)?new f.Selection(i.lineNumber,i.column,i.lineNumber,i.column):g);this._editor.setSelections(o||[],"mouse",3)}else(!this._dragSelection.containsPosition(i)||(p(t.event)||this._modifierPressed)&&(this._dragSelection.getEndPosition().equals(i)||this._dragSelection.getStartPosition().equals(i)))&&(this._editor.pushUndoStop(),this._editor.executeCommand(n.ID,new C.DragAndDropCommand(this._dragSelection,i,p(t.event)||this._modifierPressed)),this._editor.pushUndoStop())}this._editor.updateOptions({mouseStyle:"text"}),this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1}static{this._DECORATION_OPTIONS=_.ModelDecorationOptions.register({description:"dnd-target",className:"dnd-target"})}showAt(t){this._dndDecorationIds.set([{range:new y.Range(t.lineNumber,t.column,t.lineNumber,t.column),options:n._DECORATION_OPTIONS}]),this._editor.revealPosition(t,1)}_removeDecoration(){this._dndDecorationIds.clear()}_hitContent(t){return t.type===6||t.type===7}_hitMargin(t){return t.type===2||t.type===3||t.type===4}dispose(){this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1,this._modifierPressed=!1,super.dispose()}}e.DragAndDropController=n,(0,E.registerEditorContribution)(n.ID,n,2)}),define(oe[814],re([1,0,4,40,36,32,25]),function(ae,e,c,k,E,L,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FindDecorations=void 0;class f{constructor(C){this._editor=C,this._decorations=[],this._overviewRulerApproximateDecorations=[],this._findScopeDecorationIds=[],this._rangeHighlightDecorationId=null,this._highlightedDecorationId=null,this._startPosition=this._editor.getPosition()}dispose(){this._editor.removeDecorations(this._allDecorations()),this._decorations=[],this._overviewRulerApproximateDecorations=[],this._findScopeDecorationIds=[],this._rangeHighlightDecorationId=null,this._highlightedDecorationId=null}reset(){this._decorations=[],this._overviewRulerApproximateDecorations=[],this._findScopeDecorationIds=[],this._rangeHighlightDecorationId=null,this._highlightedDecorationId=null}getCount(){return this._decorations.length}getFindScope(){return this._findScopeDecorationIds[0]?this._editor.getModel().getDecorationRange(this._findScopeDecorationIds[0]):null}getFindScopes(){if(this._findScopeDecorationIds.length){const C=this._findScopeDecorationIds.map(p=>this._editor.getModel().getDecorationRange(p)).filter(p=>!!p);if(C.length)return C}return null}getStartPosition(){return this._startPosition}setStartPosition(C){this._startPosition=C,this.setCurrentFindMatch(null)}_getDecorationIndex(C){const p=this._decorations.indexOf(C);return p>=0?p+1:1}getDecorationRangeAt(C){const p=C<this._decorations.length?this._decorations[C]:null;return p?this._editor.getModel().getDecorationRange(p):null}getCurrentMatchesPosition(C){const p=this._editor.getModel().getDecorationsInRange(C);for(const n of p){const s=n.options;if(s===f._FIND_MATCH_DECORATION||s===f._CURRENT_FIND_MATCH_DECORATION)return this._getDecorationIndex(n.id)}return 0}setCurrentFindMatch(C){let p=null,n=0;if(C)for(let s=0,t=this._decorations.length;s<t;s++){const i=this._editor.getModel().getDecorationRange(this._decorations[s]);if(C.equalsRange(i)){p=this._decorations[s],n=s+1;break}}return(this._highlightedDecorationId!==null||p!==null)&&this._editor.changeDecorations(s=>{if(this._highlightedDecorationId!==null&&(s.changeDecorationOptions(this._highlightedDecorationId,f._FIND_MATCH_DECORATION),this._highlightedDecorationId=null),p!==null&&(this._highlightedDecorationId=p,s.changeDecorationOptions(this._highlightedDecorationId,f._CURRENT_FIND_MATCH_DECORATION)),this._rangeHighlightDecorationId!==null&&(s.removeDecoration(this._rangeHighlightDecorationId),this._rangeHighlightDecorationId=null),p!==null){let t=this._editor.getModel().getDecorationRange(p);if(t.startLineNumber!==t.endLineNumber&&t.endColumn===1){const i=t.endLineNumber-1,o=this._editor.getModel().getLineMaxColumn(i);t=new c.Range(t.startLineNumber,t.startColumn,i,o)}this._rangeHighlightDecorationId=s.addDecoration(t,f._RANGE_HIGHLIGHT_DECORATION)}}),n}set(C,p){this._editor.changeDecorations(n=>{let s=f._FIND_MATCH_DECORATION;const t=[];if(C.length>1e3){s=f._FIND_MATCH_NO_OVERVIEW_DECORATION;const o=this._editor.getModel().getLineCount(),h=this._editor.getLayoutInfo().height/o,l=Math.max(2,Math.ceil(3/h));let a=C[0].range.startLineNumber,r=C[0].range.endLineNumber;for(let d=1,m=C.length;d<m;d++){const u=C[d].range;r+l>=u.startLineNumber?u.endLineNumber>r&&(r=u.endLineNumber):(t.push({range:new c.Range(a,1,r,1),options:f._FIND_MATCH_ONLY_OVERVIEW_DECORATION}),a=u.startLineNumber,r=u.endLineNumber)}t.push({range:new c.Range(a,1,r,1),options:f._FIND_MATCH_ONLY_OVERVIEW_DECORATION})}const i=new Array(C.length);for(let o=0,g=C.length;o<g;o++)i[o]={range:C[o].range,options:s};this._decorations=n.deltaDecorations(this._decorations,i),this._overviewRulerApproximateDecorations=n.deltaDecorations(this._overviewRulerApproximateDecorations,t),this._rangeHighlightDecorationId&&(n.removeDecoration(this._rangeHighlightDecorationId),this._rangeHighlightDecorationId=null),this._findScopeDecorationIds.length&&(this._findScopeDecorationIds.forEach(o=>n.removeDecoration(o)),this._findScopeDecorationIds=[]),p?.length&&(this._findScopeDecorationIds=p.map(o=>n.addDecoration(o,f._FIND_SCOPE_DECORATION)))})}matchBeforePosition(C){if(this._decorations.length===0)return null;for(let p=this._decorations.length-1;p>=0;p--){const n=this._decorations[p],s=this._editor.getModel().getDecorationRange(n);if(!(!s||s.endLineNumber>C.lineNumber)){if(s.endLineNumber<C.lineNumber)return s;if(!(s.endColumn>C.column))return s}}return this._editor.getModel().getDecorationRange(this._decorations[this._decorations.length-1])}matchAfterPosition(C){if(this._decorations.length===0)return null;for(let p=0,n=this._decorations.length;p<n;p++){const s=this._decorations[p],t=this._editor.getModel().getDecorationRange(s);if(!(!t||t.startLineNumber<C.lineNumber)){if(t.startLineNumber>C.lineNumber)return t;if(!(t.startColumn<C.column))return t}}return this._editor.getModel().getDecorationRange(this._decorations[0])}_allDecorations(){let C=[];return C=C.concat(this._decorations),C=C.concat(this._overviewRulerApproximateDecorations),this._findScopeDecorationIds.length&&C.push(...this._findScopeDecorationIds),this._rangeHighlightDecorationId&&C.push(this._rangeHighlightDecorationId),C}static{this._CURRENT_FIND_MATCH_DECORATION=E.ModelDecorationOptions.register({description:"current-find-match",stickiness:1,zIndex:13,className:"currentFindMatch",inlineClassName:"currentFindMatchInline",showIfCollapsed:!0,overviewRuler:{color:(0,y.themeColorFromId)(L.overviewRulerFindMatchForeground),position:k.OverviewRulerLane.Center},minimap:{color:(0,y.themeColorFromId)(L.minimapFindMatch),position:1}})}static{this._FIND_MATCH_DECORATION=E.ModelDecorationOptions.register({description:"find-match",stickiness:1,zIndex:10,className:"findMatch",inlineClassName:"findMatchInline",showIfCollapsed:!0,overviewRuler:{color:(0,y.themeColorFromId)(L.overviewRulerFindMatchForeground),position:k.OverviewRulerLane.Center},minimap:{color:(0,y.themeColorFromId)(L.minimapFindMatch),position:1}})}static{this._FIND_MATCH_NO_OVERVIEW_DECORATION=E.ModelDecorationOptions.register({description:"find-match-no-overview",stickiness:1,className:"findMatch",showIfCollapsed:!0})}static{this._FIND_MATCH_ONLY_OVERVIEW_DECORATION=E.ModelDecorationOptions.register({description:"find-match-only-overview",stickiness:1,overviewRuler:{color:(0,y.themeColorFromId)(L.overviewRulerFindMatchForeground),position:k.OverviewRulerLane.Center}})}static{this._RANGE_HIGHLIGHT_DECORATION=E.ModelDecorationOptions.register({description:"find-range-highlight",stickiness:1,className:"rangeHighlight",isWholeLine:!0})}static{this._FIND_SCOPE_DECORATION=E.ModelDecorationOptions.register({description:"find-scope",className:"findScope",isWholeLine:!0})}}e.FindDecorations=f}),define(oe[219],re([1,0,67,14,2,145,9,4,23,203,814,632,633,12]),function(ae,e,c,k,E,L,y,f,_,C,p,n,s,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FindModelBoundToEditorModel=e.MATCHES_LIMIT=e.FIND_IDS=e.TogglePreserveCaseKeybinding=e.ToggleSearchScopeKeybinding=e.ToggleRegexKeybinding=e.ToggleWholeWordKeybinding=e.ToggleCaseSensitiveKeybinding=e.CONTEXT_REPLACE_INPUT_FOCUSED=e.CONTEXT_FIND_INPUT_FOCUSED=e.CONTEXT_FIND_WIDGET_NOT_VISIBLE=e.CONTEXT_FIND_WIDGET_VISIBLE=void 0,e.CONTEXT_FIND_WIDGET_VISIBLE=new t.RawContextKey("findWidgetVisible",!1),e.CONTEXT_FIND_WIDGET_NOT_VISIBLE=e.CONTEXT_FIND_WIDGET_VISIBLE.toNegated(),e.CONTEXT_FIND_INPUT_FOCUSED=new t.RawContextKey("findInputFocussed",!1),e.CONTEXT_REPLACE_INPUT_FOCUSED=new t.RawContextKey("replaceInputFocussed",!1),e.ToggleCaseSensitiveKeybinding={primary:545,mac:{primary:2593}},e.ToggleWholeWordKeybinding={primary:565,mac:{primary:2613}},e.ToggleRegexKeybinding={primary:560,mac:{primary:2608}},e.ToggleSearchScopeKeybinding={primary:554,mac:{primary:2602}},e.TogglePreserveCaseKeybinding={primary:558,mac:{primary:2606}},e.FIND_IDS={StartFindAction:"actions.find",StartFindWithSelection:"actions.findWithSelection",StartFindWithArgs:"editor.actions.findWithArgs",NextMatchFindAction:"editor.action.nextMatchFindAction",PreviousMatchFindAction:"editor.action.previousMatchFindAction",GoToMatchFindAction:"editor.action.goToMatchFindAction",NextSelectionMatchFindAction:"editor.action.nextSelectionMatchFindAction",PreviousSelectionMatchFindAction:"editor.action.previousSelectionMatchFindAction",StartFindReplaceAction:"editor.action.startFindReplaceAction",CloseFindWidgetCommand:"closeFindWidget",ToggleCaseSensitiveCommand:"toggleFindCaseSensitive",ToggleWholeWordCommand:"toggleFindWholeWord",ToggleRegexCommand:"toggleFindRegex",ToggleSearchScopeCommand:"toggleFindInSelection",TogglePreserveCaseCommand:"togglePreserveCase",ReplaceOneAction:"editor.action.replaceOne",ReplaceAllAction:"editor.action.replaceAll",SelectAllMatchesAction:"editor.action.selectAllMatches"},e.MATCHES_LIMIT=19999;const i=240;class o{constructor(h,l){this._toDispose=new E.DisposableStore,this._editor=h,this._state=l,this._isDisposed=!1,this._startSearchingTimer=new k.TimeoutTimer,this._decorations=new p.FindDecorations(h),this._toDispose.add(this._decorations),this._updateDecorationsScheduler=new k.RunOnceScheduler(()=>{if(this._editor.hasModel())return this.research(!1)},100),this._toDispose.add(this._updateDecorationsScheduler),this._toDispose.add(this._editor.onDidChangeCursorPosition(a=>{(a.reason===3||a.reason===5||a.reason===6)&&this._decorations.setStartPosition(this._editor.getPosition())})),this._ignoreModelContentChanged=!1,this._toDispose.add(this._editor.onDidChangeModelContent(a=>{this._ignoreModelContentChanged||(a.isFlush&&this._decorations.reset(),this._decorations.setStartPosition(this._editor.getPosition()),this._updateDecorationsScheduler.schedule())})),this._toDispose.add(this._state.onFindReplaceStateChange(a=>this._onStateChanged(a))),this.research(!1,this._state.searchScope)}dispose(){this._isDisposed=!0,(0,E.dispose)(this._startSearchingTimer),this._toDispose.dispose()}_onStateChanged(h){this._isDisposed||this._editor.hasModel()&&(h.searchString||h.isReplaceRevealed||h.isRegex||h.wholeWord||h.matchCase||h.searchScope)&&(this._editor.getModel().isTooLargeForSyncing()?(this._startSearchingTimer.cancel(),this._startSearchingTimer.setIfNotSet(()=>{h.searchScope?this.research(h.moveCursor,this._state.searchScope):this.research(h.moveCursor)},i)):h.searchScope?this.research(h.moveCursor,this._state.searchScope):this.research(h.moveCursor))}static _getSearchRange(h,l){return l||h.getFullModelRange()}research(h,l){let a=null;typeof l<"u"?l!==null&&(Array.isArray(l)?a=l:a=[l]):a=this._decorations.getFindScopes(),a!==null&&(a=a.map(u=>{if(u.startLineNumber!==u.endLineNumber){let b=u.endLineNumber;return u.endColumn===1&&(b=b-1),new f.Range(u.startLineNumber,1,b,this._editor.getModel().getLineMaxColumn(b))}return u}));const r=this._findMatches(a,!1,e.MATCHES_LIMIT);this._decorations.set(r,a);const d=this._editor.getSelection();let m=this._decorations.getCurrentMatchesPosition(d);if(m===0&&r.length>0){const u=(0,c.findFirstIdxMonotonousOrArrLen)(r.map(b=>b.range),b=>f.Range.compareRangesUsingStarts(b,d)>=0);m=u>0?u-1+1:m}this._state.changeMatchInfo(m,this._decorations.getCount(),void 0),h&&this._editor.getOption(41).cursorMoveOnType&&this._moveToNextMatch(this._decorations.getStartPosition())}_hasMatches(){return this._state.matchesCount>0}_cannotFind(){if(!this._hasMatches()){const h=this._decorations.getFindScope();return h&&this._editor.revealRangeInCenterIfOutsideViewport(h,0),!0}return!1}_setCurrentFindMatch(h){const l=this._decorations.setCurrentFindMatch(h);this._state.changeMatchInfo(l,this._decorations.getCount(),h),this._editor.setSelection(h),this._editor.revealRangeInCenterIfOutsideViewport(h,0)}_prevSearchPosition(h){const l=this._state.isRegex&&(this._state.searchString.indexOf("^")>=0||this._state.searchString.indexOf("$")>=0);let{lineNumber:a,column:r}=h;const d=this._editor.getModel();return l||r===1?(a===1?a=d.getLineCount():a--,r=d.getLineMaxColumn(a)):r--,new y.Position(a,r)}_moveToPrevMatch(h,l=!1){if(!this._state.canNavigateBack()){const w=this._decorations.matchAfterPosition(h);w&&this._setCurrentFindMatch(w);return}if(this._decorations.getCount()<e.MATCHES_LIMIT){let w=this._decorations.matchBeforePosition(h);w&&w.isEmpty()&&w.getStartPosition().equals(h)&&(h=this._prevSearchPosition(h),w=this._decorations.matchBeforePosition(h)),w&&this._setCurrentFindMatch(w);return}if(this._cannotFind())return;const a=this._decorations.getFindScope(),r=o._getSearchRange(this._editor.getModel(),a);r.getEndPosition().isBefore(h)&&(h=r.getEndPosition()),h.isBefore(r.getStartPosition())&&(h=r.getEndPosition());const{lineNumber:d,column:m}=h,u=this._editor.getModel();let b=new y.Position(d,m),v=u.findPreviousMatch(this._state.searchString,b,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(132):null,!1);if(v&&v.range.isEmpty()&&v.range.getStartPosition().equals(b)&&(b=this._prevSearchPosition(b),v=u.findPreviousMatch(this._state.searchString,b,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(132):null,!1)),!!v){if(!l&&!r.containsRange(v.range))return this._moveToPrevMatch(v.range.getStartPosition(),!0);this._setCurrentFindMatch(v.range)}}moveToPrevMatch(){this._moveToPrevMatch(this._editor.getSelection().getStartPosition())}_nextSearchPosition(h){const l=this._state.isRegex&&(this._state.searchString.indexOf("^")>=0||this._state.searchString.indexOf("$")>=0);let{lineNumber:a,column:r}=h;const d=this._editor.getModel();return l||r===d.getLineMaxColumn(a)?(a===d.getLineCount()?a=1:a++,r=1):r++,new y.Position(a,r)}_moveToNextMatch(h){if(!this._state.canNavigateForward()){const a=this._decorations.matchBeforePosition(h);a&&this._setCurrentFindMatch(a);return}if(this._decorations.getCount()<e.MATCHES_LIMIT){let a=this._decorations.matchAfterPosition(h);a&&a.isEmpty()&&a.getStartPosition().equals(h)&&(h=this._nextSearchPosition(h),a=this._decorations.matchAfterPosition(h)),a&&this._setCurrentFindMatch(a);return}const l=this._getNextMatch(h,!1,!0);l&&this._setCurrentFindMatch(l.range)}_getNextMatch(h,l,a,r=!1){if(this._cannotFind())return null;const d=this._decorations.getFindScope(),m=o._getSearchRange(this._editor.getModel(),d);m.getEndPosition().isBefore(h)&&(h=m.getStartPosition()),h.isBefore(m.getStartPosition())&&(h=m.getStartPosition());const{lineNumber:u,column:b}=h,v=this._editor.getModel();let w=new y.Position(u,b),S=v.findNextMatch(this._state.searchString,w,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(132):null,l);return a&&S&&S.range.isEmpty()&&S.range.getStartPosition().equals(w)&&(w=this._nextSearchPosition(w),S=v.findNextMatch(this._state.searchString,w,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(132):null,l)),S?!r&&!m.containsRange(S.range)?this._getNextMatch(S.range.getEndPosition(),l,a,!0):S:null}moveToNextMatch(){this._moveToNextMatch(this._editor.getSelection().getEndPosition())}_moveToMatch(h){const l=this._decorations.getDecorationRangeAt(h);l&&this._setCurrentFindMatch(l)}moveToMatch(h){this._moveToMatch(h)}_getReplacePattern(){return this._state.isRegex?(0,s.parseReplaceString)(this._state.replaceString):s.ReplacePattern.fromStaticValue(this._state.replaceString)}replace(){if(!this._hasMatches())return;const h=this._getReplacePattern(),l=this._editor.getSelection(),a=this._getNextMatch(l.getStartPosition(),!0,!1);if(a)if(l.equalsRange(a.range)){const r=h.buildReplaceString(a.matches,this._state.preserveCase),d=new L.ReplaceCommand(l,r);this._executeEditorCommand("replace",d),this._decorations.setStartPosition(new y.Position(l.startLineNumber,l.startColumn+r.length)),this.research(!0)}else this._decorations.setStartPosition(this._editor.getPosition()),this._setCurrentFindMatch(a.range)}_findMatches(h,l,a){const r=(h||[null]).map(d=>o._getSearchRange(this._editor.getModel(),d));return this._editor.getModel().findMatches(this._state.searchString,r,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(132):null,l,a)}replaceAll(){if(!this._hasMatches())return;const h=this._decorations.getFindScopes();h===null&&this._state.matchesCount>=e.MATCHES_LIMIT?this._largeReplaceAll():this._regularReplaceAll(h),this.research(!1)}_largeReplaceAll(){const l=new C.SearchParams(this._state.searchString,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(132):null).parseSearchRequest();if(!l)return;let a=l.regex;if(!a.multiline){let S="mu";a.ignoreCase&&(S+="i"),a.global&&(S+="g"),a=new RegExp(a.source,S)}const r=this._editor.getModel(),d=r.getValue(1),m=r.getFullModelRange(),u=this._getReplacePattern();let b;const v=this._state.preserveCase;u.hasReplacementPatterns||v?b=d.replace(a,function(){return u.buildReplaceString(arguments,v)}):b=d.replace(a,u.buildReplaceString(null,v));const w=new L.ReplaceCommandThatPreservesSelection(m,b,this._editor.getSelection());this._executeEditorCommand("replaceAll",w)}_regularReplaceAll(h){const l=this._getReplacePattern(),a=this._findMatches(h,l.hasReplacementPatterns||this._state.preserveCase,1073741824),r=[];for(let m=0,u=a.length;m<u;m++)r[m]=l.buildReplaceString(a[m].matches,this._state.preserveCase);const d=new n.ReplaceAllCommand(this._editor.getSelection(),a.map(m=>m.range),r);this._executeEditorCommand("replaceAll",d)}selectAllMatches(){if(!this._hasMatches())return;const h=this._decorations.getFindScopes();let a=this._findMatches(h,!1,1073741824).map(d=>new _.Selection(d.range.startLineNumber,d.range.startColumn,d.range.endLineNumber,d.range.endColumn));const r=this._editor.getSelection();for(let d=0,m=a.length;d<m;d++)if(a[d].equalsRange(r)){a=[r].concat(a.slice(0,d)).concat(a.slice(d+1));break}this._editor.setSelections(a)}_executeEditorCommand(h,l){try{this._ignoreModelContentChanged=!0,this._editor.pushUndoStop(),this._editor.executeCommand(h,l),this._editor.pushUndoStop()}finally{this._ignoreModelContentChanged=!1}}}e.FindModelBoundToEditorModel=o}),define(oe[815],re([1,0,5,364,83,14,219,32,43,518]),function(ae,e,c,k,E,L,y,f,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FindOptionsWidget=void 0;class C extends E.Widget{static{this.ID="editor.contrib.findOptionsWidget"}constructor(n,s,t){super(),this._hideSoon=this._register(new L.RunOnceScheduler(()=>this._hide(),2e3)),this._isVisible=!1,this._editor=n,this._state=s,this._keybindingService=t,this._domNode=document.createElement("div"),this._domNode.className="findOptionsWidget",this._domNode.style.display="none",this._domNode.style.top="10px",this._domNode.style.zIndex="12",this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true");const i={inputActiveOptionBorder:(0,f.asCssVariable)(f.inputActiveOptionBorder),inputActiveOptionForeground:(0,f.asCssVariable)(f.inputActiveOptionForeground),inputActiveOptionBackground:(0,f.asCssVariable)(f.inputActiveOptionBackground)},o=this._register((0,_.createInstantHoverDelegate)());this.caseSensitive=this._register(new k.CaseSensitiveToggle({appendTitle:this._keybindingLabelFor(y.FIND_IDS.ToggleCaseSensitiveCommand),isChecked:this._state.matchCase,hoverDelegate:o,...i})),this._domNode.appendChild(this.caseSensitive.domNode),this._register(this.caseSensitive.onChange(()=>{this._state.change({matchCase:this.caseSensitive.checked},!1)})),this.wholeWords=this._register(new k.WholeWordsToggle({appendTitle:this._keybindingLabelFor(y.FIND_IDS.ToggleWholeWordCommand),isChecked:this._state.wholeWord,hoverDelegate:o,...i})),this._domNode.appendChild(this.wholeWords.domNode),this._register(this.wholeWords.onChange(()=>{this._state.change({wholeWord:this.wholeWords.checked},!1)})),this.regex=this._register(new k.RegexToggle({appendTitle:this._keybindingLabelFor(y.FIND_IDS.ToggleRegexCommand),isChecked:this._state.isRegex,hoverDelegate:o,...i})),this._domNode.appendChild(this.regex.domNode),this._register(this.regex.onChange(()=>{this._state.change({isRegex:this.regex.checked},!1)})),this._editor.addOverlayWidget(this),this._register(this._state.onFindReplaceStateChange(g=>{let h=!1;g.isRegex&&(this.regex.checked=this._state.isRegex,h=!0),g.wholeWord&&(this.wholeWords.checked=this._state.wholeWord,h=!0),g.matchCase&&(this.caseSensitive.checked=this._state.matchCase,h=!0),!this._state.isRevealed&&h&&this._revealTemporarily()})),this._register(c.addDisposableListener(this._domNode,c.EventType.MOUSE_LEAVE,g=>this._onMouseLeave())),this._register(c.addDisposableListener(this._domNode,"mouseover",g=>this._onMouseOver()))}_keybindingLabelFor(n){const s=this._keybindingService.lookupKeybinding(n);return s?` (${s.getLabel()})`:""}dispose(){this._editor.removeOverlayWidget(this),super.dispose()}getId(){return C.ID}getDomNode(){return this._domNode}getPosition(){return{preference:0}}highlightFindOptions(){this._revealTemporarily()}_revealTemporarily(){this._show(),this._hideSoon.schedule()}_onMouseLeave(){this._hideSoon.schedule()}_onMouseOver(){this._hideSoon.cancel()}_show(){this._isVisible||(this._isVisible=!0,this._domNode.style.display="block")}_hide(){this._isVisible&&(this._isVisible=!1,this._domNode.style.display="none")}}e.FindOptionsWidget=C}),define(oe[816],re([1,0,6,2,4,219]),function(ae,e,c,k,E,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FindReplaceState=void 0;function y(_,C){return _===1?!0:_===2?!1:C}class f extends k.Disposable{get searchString(){return this._searchString}get replaceString(){return this._replaceString}get isRevealed(){return this._isRevealed}get isReplaceRevealed(){return this._isReplaceRevealed}get isRegex(){return y(this._isRegexOverride,this._isRegex)}get wholeWord(){return y(this._wholeWordOverride,this._wholeWord)}get matchCase(){return y(this._matchCaseOverride,this._matchCase)}get preserveCase(){return y(this._preserveCaseOverride,this._preserveCase)}get actualIsRegex(){return this._isRegex}get actualWholeWord(){return this._wholeWord}get actualMatchCase(){return this._matchCase}get actualPreserveCase(){return this._preserveCase}get searchScope(){return this._searchScope}get matchesPosition(){return this._matchesPosition}get matchesCount(){return this._matchesCount}get currentMatch(){return this._currentMatch}constructor(){super(),this._onFindReplaceStateChange=this._register(new c.Emitter),this.onFindReplaceStateChange=this._onFindReplaceStateChange.event,this._searchString="",this._replaceString="",this._isRevealed=!1,this._isReplaceRevealed=!1,this._isRegex=!1,this._isRegexOverride=0,this._wholeWord=!1,this._wholeWordOverride=0,this._matchCase=!1,this._matchCaseOverride=0,this._preserveCase=!1,this._preserveCaseOverride=0,this._searchScope=null,this._matchesPosition=0,this._matchesCount=0,this._currentMatch=null,this._loop=!0,this._isSearching=!1,this._filters=null}changeMatchInfo(C,p,n){const s={moveCursor:!1,updateHistory:!1,searchString:!1,replaceString:!1,isRevealed:!1,isReplaceRevealed:!1,isRegex:!1,wholeWord:!1,matchCase:!1,preserveCase:!1,searchScope:!1,matchesPosition:!1,matchesCount:!1,currentMatch:!1,loop:!1,isSearching:!1,filters:!1};let t=!1;p===0&&(C=0),C>p&&(C=p),this._matchesPosition!==C&&(this._matchesPosition=C,s.matchesPosition=!0,t=!0),this._matchesCount!==p&&(this._matchesCount=p,s.matchesCount=!0,t=!0),typeof n<"u"&&(E.Range.equalsRange(this._currentMatch,n)||(this._currentMatch=n,s.currentMatch=!0,t=!0)),t&&this._onFindReplaceStateChange.fire(s)}change(C,p,n=!0){const s={moveCursor:p,updateHistory:n,searchString:!1,replaceString:!1,isRevealed:!1,isReplaceRevealed:!1,isRegex:!1,wholeWord:!1,matchCase:!1,preserveCase:!1,searchScope:!1,matchesPosition:!1,matchesCount:!1,currentMatch:!1,loop:!1,isSearching:!1,filters:!1};let t=!1;const i=this.isRegex,o=this.wholeWord,g=this.matchCase,h=this.preserveCase;typeof C.searchString<"u"&&this._searchString!==C.searchString&&(this._searchString=C.searchString,s.searchString=!0,t=!0),typeof C.replaceString<"u"&&this._replaceString!==C.replaceString&&(this._replaceString=C.replaceString,s.replaceString=!0,t=!0),typeof C.isRevealed<"u"&&this._isRevealed!==C.isRevealed&&(this._isRevealed=C.isRevealed,s.isRevealed=!0,t=!0),typeof C.isReplaceRevealed<"u"&&this._isReplaceRevealed!==C.isReplaceRevealed&&(this._isReplaceRevealed=C.isReplaceRevealed,s.isReplaceRevealed=!0,t=!0),typeof C.isRegex<"u"&&(this._isRegex=C.isRegex),typeof C.wholeWord<"u"&&(this._wholeWord=C.wholeWord),typeof C.matchCase<"u"&&(this._matchCase=C.matchCase),typeof C.preserveCase<"u"&&(this._preserveCase=C.preserveCase),typeof C.searchScope<"u"&&(C.searchScope?.every(l=>this._searchScope?.some(a=>!E.Range.equalsRange(a,l)))||(this._searchScope=C.searchScope,s.searchScope=!0,t=!0)),typeof C.loop<"u"&&this._loop!==C.loop&&(this._loop=C.loop,s.loop=!0,t=!0),typeof C.isSearching<"u"&&this._isSearching!==C.isSearching&&(this._isSearching=C.isSearching,s.isSearching=!0,t=!0),typeof C.filters<"u"&&(this._filters?this._filters.update(C.filters):this._filters=C.filters,s.filters=!0,t=!0),this._isRegexOverride=typeof C.isRegexOverride<"u"?C.isRegexOverride:0,this._wholeWordOverride=typeof C.wholeWordOverride<"u"?C.wholeWordOverride:0,this._matchCaseOverride=typeof C.matchCaseOverride<"u"?C.matchCaseOverride:0,this._preserveCaseOverride=typeof C.preserveCaseOverride<"u"?C.preserveCaseOverride:0,i!==this.isRegex&&(t=!0,s.isRegex=!0),o!==this.wholeWord&&(t=!0,s.wholeWord=!0),g!==this.matchCase&&(t=!0,s.matchCase=!0),h!==this.preserveCase&&(t=!0,s.preserveCase=!0),t&&this._onFindReplaceStateChange.fire(s)}canNavigateBack(){return this.canNavigateInLoop()||this.matchesPosition!==1}canNavigateForward(){return this.canNavigateInLoop()||this.matchesPosition<this.matchesCount}canNavigateInLoop(){return this._loop||this.matchesCount>=L.MATCHES_LIMIT}}e.FindReplaceState=f}),define(oe[817],re([1,0,5,48,165,164,83,14,26,8,2,16,11,4,219,3,399,669,32,71,25,30,97,19,109,43,519]),function(ae,e,c,k,E,L,y,f,_,C,p,n,s,t,i,o,g,h,l,a,r,d,m,u,b,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SimpleButton=e.FindWidget=e.FindWidgetViewZone=e.NLS_NO_RESULTS=e.NLS_MATCHES_LOCATION=e.findNextMatchIcon=e.findPreviousMatchIcon=e.findReplaceAllIcon=e.findReplaceIcon=e.findSelectionIcon=void 0;const w=(0,a.registerIcon)("find-collapsed",_.Codicon.chevronRight,o.localize(804,"Icon to indicate that the editor find widget is collapsed.")),S=(0,a.registerIcon)("find-expanded",_.Codicon.chevronDown,o.localize(805,"Icon to indicate that the editor find widget is expanded."));e.findSelectionIcon=(0,a.registerIcon)("find-selection",_.Codicon.selection,o.localize(806,"Icon for 'Find in Selection' in the editor find widget.")),e.findReplaceIcon=(0,a.registerIcon)("find-replace",_.Codicon.replace,o.localize(807,"Icon for 'Replace' in the editor find widget.")),e.findReplaceAllIcon=(0,a.registerIcon)("find-replace-all",_.Codicon.replaceAll,o.localize(808,"Icon for 'Replace All' in the editor find widget.")),e.findPreviousMatchIcon=(0,a.registerIcon)("find-previous-match",_.Codicon.arrowUp,o.localize(809,"Icon for 'Find Previous' in the editor find widget.")),e.findNextMatchIcon=(0,a.registerIcon)("find-next-match",_.Codicon.arrowDown,o.localize(810,"Icon for 'Find Next' in the editor find widget."));const D=o.localize(811,"Find / Replace"),I=o.localize(812,"Find"),T=o.localize(813,"Find"),M=o.localize(814,"Previous Match"),A=o.localize(815,"Next Match"),R=o.localize(816,"Find in Selection"),N=o.localize(817,"Close"),O=o.localize(818,"Replace"),x=o.localize(819,"Replace"),F=o.localize(820,"Replace"),W=o.localize(821,"Replace All"),V=o.localize(822,"Toggle Replace"),q=o.localize(823,"Only the first {0} results are highlighted, but all find operations work on the entire text.",i.MATCHES_LIMIT);e.NLS_MATCHES_LOCATION=o.localize(824,"{0} of {1}"),e.NLS_NO_RESULTS=o.localize(825,"No results");const H=419,G=275-54;let Y=69;const X=33,Z="ctrlEnterReplaceAll.windows.donotask",j=n.isMacintosh?256:2048;class P{constructor(ce){this.afterLineNumber=ce,this.heightInPx=X,this.suppressMouseDown=!1,this.domNode=document.createElement("div"),this.domNode.className="dock-find-viewzone"}}e.FindWidgetViewZone=P;function te(pe,ce,ie){const ne=!!ce.match(/\n/);if(ie&&ne&&ie.selectionStart>0){pe.stopPropagation();return}}function se(pe,ce,ie){const ne=!!ce.match(/\n/);if(ie&&ne&&ie.selectionEnd<ie.value.length){pe.stopPropagation();return}}class ue extends y.Widget{static{this.ID="editor.contrib.findWidget"}constructor(ce,ie,ne,J,B,U,z,$,Q,ee){super(),this._hoverService=ee,this._cachedHeight=null,this._revealTimeouts=[],this._codeEditor=ce,this._controller=ie,this._state=ne,this._contextViewProvider=J,this._keybindingService=B,this._contextKeyService=U,this._storageService=$,this._notificationService=Q,this._ctrlEnterReplaceAllWarningPrompted=!!$.getBoolean(Z,0),this._isVisible=!1,this._isReplaceVisible=!1,this._ignoreChangeEvent=!1,this._updateHistoryDelayer=new f.Delayer(500),this._register((0,p.toDisposable)(()=>this._updateHistoryDelayer.cancel())),this._register(this._state.onFindReplaceStateChange(le=>this._onStateChanged(le))),this._buildDomNode(),this._updateButtons(),this._tryUpdateWidgetWidth(),this._findInput.inputBox.layout(),this._register(this._codeEditor.onDidChangeConfiguration(le=>{if(le.hasChanged(92)&&(this._codeEditor.getOption(92)&&this._state.change({isReplaceRevealed:!1},!1),this._updateButtons()),le.hasChanged(146)&&this._tryUpdateWidgetWidth(),le.hasChanged(2)&&this.updateAccessibilitySupport(),le.hasChanged(41)){const de=this._codeEditor.getOption(41).loop;this._state.change({loop:de},!1);const me=this._codeEditor.getOption(41).addExtraSpaceOnTop;me&&!this._viewZone&&(this._viewZone=new P(0),this._showViewZone()),!me&&this._viewZone&&this._removeViewZone()}})),this.updateAccessibilitySupport(),this._register(this._codeEditor.onDidChangeCursorSelection(()=>{this._isVisible&&this._updateToggleSelectionFindButton()})),this._register(this._codeEditor.onDidFocusEditorWidget(async()=>{if(this._isVisible){const le=await this._controller.getGlobalBufferTerm();le&&le!==this._state.searchString&&(this._state.change({searchString:le},!1),this._findInput.select())}})),this._findInputFocused=i.CONTEXT_FIND_INPUT_FOCUSED.bindTo(U),this._findFocusTracker=this._register(c.trackFocus(this._findInput.inputBox.inputElement)),this._register(this._findFocusTracker.onDidFocus(()=>{this._findInputFocused.set(!0),this._updateSearchScope()})),this._register(this._findFocusTracker.onDidBlur(()=>{this._findInputFocused.set(!1)})),this._replaceInputFocused=i.CONTEXT_REPLACE_INPUT_FOCUSED.bindTo(U),this._replaceFocusTracker=this._register(c.trackFocus(this._replaceInput.inputBox.inputElement)),this._register(this._replaceFocusTracker.onDidFocus(()=>{this._replaceInputFocused.set(!0),this._updateSearchScope()})),this._register(this._replaceFocusTracker.onDidBlur(()=>{this._replaceInputFocused.set(!1)})),this._codeEditor.addOverlayWidget(this),this._codeEditor.getOption(41).addExtraSpaceOnTop&&(this._viewZone=new P(0)),this._register(this._codeEditor.onDidChangeModel(()=>{this._isVisible&&(this._viewZoneId=void 0)})),this._register(this._codeEditor.onDidScrollChange(le=>{if(le.scrollTopChanged){this._layoutViewZone();return}setTimeout(()=>{this._layoutViewZone()},0)}))}getId(){return ue.ID}getDomNode(){return this._domNode}getPosition(){return this._isVisible?{preference:0}:null}_onStateChanged(ce){if(ce.searchString){try{this._ignoreChangeEvent=!0,this._findInput.setValue(this._state.searchString)}finally{this._ignoreChangeEvent=!1}this._updateButtons()}if(ce.replaceString&&(this._replaceInput.inputBox.value=this._state.replaceString),ce.isRevealed&&(this._state.isRevealed?this._reveal():this._hide(!0)),ce.isReplaceRevealed&&(this._state.isReplaceRevealed?!this._codeEditor.getOption(92)&&!this._isReplaceVisible&&(this._isReplaceVisible=!0,this._replaceInput.width=c.getTotalWidth(this._findInput.domNode),this._updateButtons(),this._replaceInput.inputBox.layout()):this._isReplaceVisible&&(this._isReplaceVisible=!1,this._updateButtons())),(ce.isRevealed||ce.isReplaceRevealed)&&(this._state.isRevealed||this._state.isReplaceRevealed)&&this._tryUpdateHeight()&&this._showViewZone(),ce.isRegex&&this._findInput.setRegex(this._state.isRegex),ce.wholeWord&&this._findInput.setWholeWords(this._state.wholeWord),ce.matchCase&&this._findInput.setCaseSensitive(this._state.matchCase),ce.preserveCase&&this._replaceInput.setPreserveCase(this._state.preserveCase),ce.searchScope&&(this._state.searchScope?this._toggleSelectionFind.checked=!0:this._toggleSelectionFind.checked=!1,this._updateToggleSelectionFindButton()),ce.searchString||ce.matchesCount||ce.matchesPosition){const ie=this._state.searchString.length>0&&this._state.matchesCount===0;this._domNode.classList.toggle("no-results",ie),this._updateMatchesCount(),this._updateButtons()}(ce.searchString||ce.currentMatch)&&this._layoutViewZone(),ce.updateHistory&&this._delayedUpdateHistory(),ce.loop&&this._updateButtons()}_delayedUpdateHistory(){this._updateHistoryDelayer.trigger(this._updateHistory.bind(this)).then(void 0,C.onUnexpectedError)}_updateHistory(){this._state.searchString&&this._findInput.inputBox.addToHistory(),this._state.replaceString&&this._replaceInput.inputBox.addToHistory()}_updateMatchesCount(){this._matchesCount.style.minWidth=Y+"px",this._state.matchesCount>=i.MATCHES_LIMIT?this._matchesCount.title=q:this._matchesCount.title="",this._matchesCount.firstChild?.remove();let ce;if(this._state.matchesCount>0){let ie=String(this._state.matchesCount);this._state.matchesCount>=i.MATCHES_LIMIT&&(ie+="+");let ne=String(this._state.matchesPosition);ne==="0"&&(ne="?"),ce=s.format(e.NLS_MATCHES_LOCATION,ne,ie)}else ce=e.NLS_NO_RESULTS;this._matchesCount.appendChild(document.createTextNode(ce)),(0,k.alert)(this._getAriaLabel(ce,this._state.currentMatch,this._state.searchString)),Y=Math.max(Y,this._matchesCount.clientWidth)}_getAriaLabel(ce,ie,ne){if(ce===e.NLS_NO_RESULTS)return ne===""?o.localize(826,"{0} found",ce):o.localize(827,"{0} found for '{1}'",ce,ne);if(ie){const J=o.localize(828,"{0} found for '{1}', at {2}",ce,ne,ie.startLineNumber+":"+ie.startColumn),B=this._codeEditor.getModel();return B&&ie.startLineNumber<=B.getLineCount()&&ie.startLineNumber>=1?`${B.getLineContent(ie.startLineNumber)}, ${J}`:J}return o.localize(829,"{0} found for '{1}'",ce,ne)}_updateToggleSelectionFindButton(){const ce=this._codeEditor.getSelection(),ie=ce?ce.startLineNumber!==ce.endLineNumber||ce.startColumn!==ce.endColumn:!1,ne=this._toggleSelectionFind.checked;this._isVisible&&(ne||ie)?this._toggleSelectionFind.enable():this._toggleSelectionFind.disable()}_updateButtons(){this._findInput.setEnabled(this._isVisible),this._replaceInput.setEnabled(this._isVisible&&this._isReplaceVisible),this._updateToggleSelectionFindButton(),this._closeBtn.setEnabled(this._isVisible);const ce=this._state.searchString.length>0,ie=!!this._state.matchesCount;this._prevBtn.setEnabled(this._isVisible&&ce&&ie&&this._state.canNavigateBack()),this._nextBtn.setEnabled(this._isVisible&&ce&&ie&&this._state.canNavigateForward()),this._replaceBtn.setEnabled(this._isVisible&&this._isReplaceVisible&&ce),this._replaceAllBtn.setEnabled(this._isVisible&&this._isReplaceVisible&&ce),this._domNode.classList.toggle("replaceToggled",this._isReplaceVisible),this._toggleReplaceBtn.setExpanded(this._isReplaceVisible);const ne=!this._codeEditor.getOption(92);this._toggleReplaceBtn.setEnabled(this._isVisible&&ne)}_reveal(){if(this._revealTimeouts.forEach(ce=>{clearTimeout(ce)}),this._revealTimeouts=[],!this._isVisible){this._isVisible=!0;const ce=this._codeEditor.getSelection();switch(this._codeEditor.getOption(41).autoFindInSelection){case"always":this._toggleSelectionFind.checked=!0;break;case"never":this._toggleSelectionFind.checked=!1;break;case"multiline":{const ne=!!ce&&ce.startLineNumber!==ce.endLineNumber;this._toggleSelectionFind.checked=ne;break}default:break}this._tryUpdateWidgetWidth(),this._updateButtons(),this._revealTimeouts.push(setTimeout(()=>{this._domNode.classList.add("visible"),this._domNode.setAttribute("aria-hidden","false")},0)),this._revealTimeouts.push(setTimeout(()=>{this._findInput.validate()},200)),this._codeEditor.layoutOverlayWidget(this);let ie=!0;if(this._codeEditor.getOption(41).seedSearchStringFromSelection&&ce){const ne=this._codeEditor.getDomNode();if(ne){const J=c.getDomNodePagePosition(ne),B=this._codeEditor.getScrolledVisiblePosition(ce.getStartPosition()),U=J.left+(B?B.left:0),z=B?B.top:0;if(this._viewZone&&z<this._viewZone.heightInPx){ce.endLineNumber>ce.startLineNumber&&(ie=!1);const $=c.getTopLeftOffset(this._domNode).left;U>$&&(ie=!1);const Q=this._codeEditor.getScrolledVisiblePosition(ce.getEndPosition());J.left+(Q?Q.left:0)>$&&(ie=!1)}}}this._showViewZone(ie)}}_hide(ce){this._revealTimeouts.forEach(ie=>{clearTimeout(ie)}),this._revealTimeouts=[],this._isVisible&&(this._isVisible=!1,this._updateButtons(),this._domNode.classList.remove("visible"),this._domNode.setAttribute("aria-hidden","true"),this._findInput.clearMessage(),ce&&this._codeEditor.focus(),this._codeEditor.layoutOverlayWidget(this),this._removeViewZone())}_layoutViewZone(ce){if(!this._codeEditor.getOption(41).addExtraSpaceOnTop){this._removeViewZone();return}if(!this._isVisible)return;const ne=this._viewZone;this._viewZoneId!==void 0||!ne||this._codeEditor.changeViewZones(J=>{ne.heightInPx=this._getHeight(),this._viewZoneId=J.addZone(ne),this._codeEditor.setScrollTop(ce||this._codeEditor.getScrollTop()+ne.heightInPx)})}_showViewZone(ce=!0){if(!this._isVisible||!this._codeEditor.getOption(41).addExtraSpaceOnTop)return;this._viewZone===void 0&&(this._viewZone=new P(0));const ne=this._viewZone;this._codeEditor.changeViewZones(J=>{if(this._viewZoneId!==void 0){const B=this._getHeight();if(B===ne.heightInPx)return;const U=B-ne.heightInPx;ne.heightInPx=B,J.layoutZone(this._viewZoneId),ce&&this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()+U);return}else{let B=this._getHeight();if(B-=this._codeEditor.getOption(84).top,B<=0)return;ne.heightInPx=B,this._viewZoneId=J.addZone(ne),ce&&this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()+B)}})}_removeViewZone(){this._codeEditor.changeViewZones(ce=>{this._viewZoneId!==void 0&&(ce.removeZone(this._viewZoneId),this._viewZoneId=void 0,this._viewZone&&(this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()-this._viewZone.heightInPx),this._viewZone=void 0))})}_tryUpdateWidgetWidth(){if(!this._isVisible||!this._domNode.isConnected)return;const ce=this._codeEditor.getLayoutInfo();if(ce.contentWidth<=0){this._domNode.classList.add("hiddenEditor");return}else this._domNode.classList.contains("hiddenEditor")&&this._domNode.classList.remove("hiddenEditor");const ne=ce.width,J=ce.minimap.minimapWidth;let B=!1,U=!1,z=!1;if(this._resized&&c.getTotalWidth(this._domNode)>H){this._domNode.style.maxWidth=`${ne-28-J-15}px`,this._replaceInput.width=c.getTotalWidth(this._findInput.domNode);return}if(H+28+J>=ne&&(U=!0),H+28+J-Y>=ne&&(z=!0),H+28+J-Y>=ne+50&&(B=!0),this._domNode.classList.toggle("collapsed-find-widget",B),this._domNode.classList.toggle("narrow-find-widget",z),this._domNode.classList.toggle("reduced-find-widget",U),!z&&!B&&(this._domNode.style.maxWidth=`${ne-28-J-15}px`),this._findInput.layout({collapsedFindWidget:B,narrowFindWidget:z,reducedFindWidget:U}),this._resized){const $=this._findInput.inputBox.element.clientWidth;$>0&&(this._replaceInput.width=$)}else this._isReplaceVisible&&(this._replaceInput.width=c.getTotalWidth(this._findInput.domNode))}_getHeight(){let ce=0;return ce+=4,ce+=this._findInput.inputBox.height+2,this._isReplaceVisible&&(ce+=4,ce+=this._replaceInput.inputBox.height+2),ce+=4,ce}_tryUpdateHeight(){const ce=this._getHeight();return this._cachedHeight!==null&&this._cachedHeight===ce?!1:(this._cachedHeight=ce,this._domNode.style.height=`${ce}px`,!0)}focusFindInput(){this._findInput.select(),this._findInput.focus()}focusReplaceInput(){this._replaceInput.select(),this._replaceInput.focus()}highlightFindOptions(){this._findInput.highlightFindOptions()}_updateSearchScope(){if(this._codeEditor.hasModel()&&this._toggleSelectionFind.checked){const ce=this._codeEditor.getSelections();ce.map(ie=>{ie.endColumn===1&&ie.endLineNumber>ie.startLineNumber&&(ie=ie.setEndPosition(ie.endLineNumber-1,this._codeEditor.getModel().getLineMaxColumn(ie.endLineNumber-1)));const ne=this._state.currentMatch;return ie.startLineNumber!==ie.endLineNumber&&!t.Range.equalsRange(ie,ne)?ie:null}).filter(ie=>!!ie),ce.length&&this._state.change({searchScope:ce},!0)}}_onFindInputMouseDown(ce){ce.middleButton&&ce.stopPropagation()}_onFindInputKeyDown(ce){if(ce.equals(j|3))if(this._keybindingService.dispatchEvent(ce,ce.target)){ce.preventDefault();return}else{this._findInput.inputBox.insertAtCursor(`
|
|
684
|
+
`&&(z=2),this._modelData.model.getValue(z,U)}setValue(B){try{if(this._beginUpdate(),!this._modelData)return;this._modelData.model.setValue(B)}finally{this._endUpdate()}}getModel(){return this._modelData?this._modelData.model:null}setModel(B=null){try{this._beginUpdate();const U=B;if(this._modelData===null&&U===null||this._modelData&&this._modelData.model===U)return;const z={oldModelUrl:this._modelData?.model.uri||null,newModelUrl:U?.uri||null};this._onWillChangeModel.fire(z);const $=this.hasTextFocus(),Q=this._detachModel();this._attachModel(U),$&&this.hasModel()&&this.focus(),this._removeDecorationTypes(),this._onDidChangeModel.fire(z),this._postDetachModelCleanup(Q),this._contributionsDisposable=this._contributions.onAfterModelAttached()}finally{this._endUpdate()}}_removeDecorationTypes(){if(this._decorationTypeKeysToIds={},this._decorationTypeSubtypes){for(const B in this._decorationTypeSubtypes){const U=this._decorationTypeSubtypes[B];for(const z in U)this._removeDecorationType(B+"-"+z)}this._decorationTypeSubtypes={}}}getVisibleRanges(){return this._modelData?this._modelData.viewModel.getVisibleRanges():[]}getVisibleRangesPlusViewportAboveBelow(){return this._modelData?this._modelData.viewModel.getVisibleRangesPlusViewportAboveBelow():[]}getWhitespaces(){return this._modelData?this._modelData.viewModel.viewLayout.getWhitespaces():[]}static _getVerticalOffsetAfterPosition(B,U,z,$){const Q=B.model.validatePosition({lineNumber:U,column:z}),ee=B.viewModel.coordinatesConverter.convertModelPositionToViewPosition(Q);return B.viewModel.viewLayout.getVerticalOffsetAfterLineNumber(ee.lineNumber,$)}getTopForLineNumber(B,U=!1){return this._modelData?H._getVerticalOffsetForPosition(this._modelData,B,1,U):-1}getTopForPosition(B,U){return this._modelData?H._getVerticalOffsetForPosition(this._modelData,B,U,!1):-1}static _getVerticalOffsetForPosition(B,U,z,$=!1){const Q=B.model.validatePosition({lineNumber:U,column:z}),ee=B.viewModel.coordinatesConverter.convertModelPositionToViewPosition(Q);return B.viewModel.viewLayout.getVerticalOffsetForLineNumber(ee.lineNumber,$)}getBottomForLineNumber(B,U=!1){return this._modelData?H._getVerticalOffsetAfterPosition(this._modelData,B,1,U):-1}setHiddenAreas(B,U){this._modelData?.viewModel.setHiddenAreas(B.map(z=>r.Range.lift(z)),U)}getVisibleColumnFromPosition(B){if(!this._modelData)return B.column;const U=this._modelData.model.validatePosition(B),z=this._modelData.model.getOptions().tabSize;return h.CursorColumns.visibleColumnFromColumn(this._modelData.model.getLineContent(U.lineNumber),U.column,z)+1}getPosition(){return this._modelData?this._modelData.viewModel.getPosition():null}setPosition(B,U="api"){if(this._modelData){if(!a.Position.isIPosition(B))throw new Error("Invalid arguments");this._modelData.viewModel.setSelections(U,[{selectionStartLineNumber:B.lineNumber,selectionStartColumn:B.column,positionLineNumber:B.lineNumber,positionColumn:B.column}])}}_sendRevealRange(B,U,z,$){if(!this._modelData)return;if(!r.Range.isIRange(B))throw new Error("Invalid arguments");const Q=this._modelData.model.validateRange(B),ee=this._modelData.viewModel.coordinatesConverter.convertModelRangeToViewRange(Q);this._modelData.viewModel.revealRange("api",z,ee,U,$)}revealLine(B,U=0){this._revealLine(B,0,U)}revealLineInCenter(B,U=0){this._revealLine(B,1,U)}revealLineInCenterIfOutsideViewport(B,U=0){this._revealLine(B,2,U)}revealLineNearTop(B,U=0){this._revealLine(B,5,U)}_revealLine(B,U,z){if(typeof B!="number")throw new Error("Invalid arguments");this._sendRevealRange(new r.Range(B,1,B,1),U,!1,z)}revealPosition(B,U=0){this._revealPosition(B,0,!0,U)}revealPositionInCenter(B,U=0){this._revealPosition(B,1,!0,U)}revealPositionInCenterIfOutsideViewport(B,U=0){this._revealPosition(B,2,!0,U)}revealPositionNearTop(B,U=0){this._revealPosition(B,5,!0,U)}_revealPosition(B,U,z,$){if(!a.Position.isIPosition(B))throw new Error("Invalid arguments");this._sendRevealRange(new r.Range(B.lineNumber,B.column,B.lineNumber,B.column),U,z,$)}getSelection(){return this._modelData?this._modelData.viewModel.getSelection():null}getSelections(){return this._modelData?this._modelData.viewModel.getSelections():null}setSelection(B,U="api"){const z=d.Selection.isISelection(B),$=r.Range.isIRange(B);if(!z&&!$)throw new Error("Invalid arguments");if(z)this._setSelectionImpl(B,U);else if($){const Q={selectionStartLineNumber:B.startLineNumber,selectionStartColumn:B.startColumn,positionLineNumber:B.endLineNumber,positionColumn:B.endColumn};this._setSelectionImpl(Q,U)}}_setSelectionImpl(B,U){if(!this._modelData)return;const z=new d.Selection(B.selectionStartLineNumber,B.selectionStartColumn,B.positionLineNumber,B.positionColumn);this._modelData.viewModel.setSelections(U,[z])}revealLines(B,U,z=0){this._revealLines(B,U,0,z)}revealLinesInCenter(B,U,z=0){this._revealLines(B,U,1,z)}revealLinesInCenterIfOutsideViewport(B,U,z=0){this._revealLines(B,U,2,z)}revealLinesNearTop(B,U,z=0){this._revealLines(B,U,5,z)}_revealLines(B,U,z,$){if(typeof B!="number"||typeof U!="number")throw new Error("Invalid arguments");this._sendRevealRange(new r.Range(B,1,U,1),z,!1,$)}revealRange(B,U=0,z=!1,$=!0){this._revealRange(B,z?1:0,$,U)}revealRangeInCenter(B,U=0){this._revealRange(B,1,!0,U)}revealRangeInCenterIfOutsideViewport(B,U=0){this._revealRange(B,2,!0,U)}revealRangeNearTop(B,U=0){this._revealRange(B,5,!0,U)}revealRangeNearTopIfOutsideViewport(B,U=0){this._revealRange(B,6,!0,U)}revealRangeAtTop(B,U=0){this._revealRange(B,3,!0,U)}_revealRange(B,U,z,$){if(!r.Range.isIRange(B))throw new Error("Invalid arguments");this._sendRevealRange(r.Range.lift(B),U,z,$)}setSelections(B,U="api",z=0){if(this._modelData){if(!B||B.length===0)throw new Error("Invalid arguments");for(let $=0,Q=B.length;$<Q;$++)if(!d.Selection.isISelection(B[$]))throw new Error("Invalid arguments");this._modelData.viewModel.setSelections(U,B,z)}}getContentWidth(){return this._modelData?this._modelData.viewModel.viewLayout.getContentWidth():-1}getScrollWidth(){return this._modelData?this._modelData.viewModel.viewLayout.getScrollWidth():-1}getScrollLeft(){return this._modelData?this._modelData.viewModel.viewLayout.getCurrentScrollLeft():-1}getContentHeight(){return this._modelData?this._modelData.viewModel.viewLayout.getContentHeight():-1}getScrollHeight(){return this._modelData?this._modelData.viewModel.viewLayout.getScrollHeight():-1}getScrollTop(){return this._modelData?this._modelData.viewModel.viewLayout.getCurrentScrollTop():-1}setScrollLeft(B,U=1){if(this._modelData){if(typeof B!="number")throw new Error("Invalid arguments");this._modelData.viewModel.viewLayout.setScrollPosition({scrollLeft:B},U)}}setScrollTop(B,U=1){if(this._modelData){if(typeof B!="number")throw new Error("Invalid arguments");this._modelData.viewModel.viewLayout.setScrollPosition({scrollTop:B},U)}}setScrollPosition(B,U=1){this._modelData&&this._modelData.viewModel.viewLayout.setScrollPosition(B,U)}hasPendingScrollAnimation(){return this._modelData?this._modelData.viewModel.viewLayout.hasPendingScrollAnimation():!1}saveViewState(){if(!this._modelData)return null;const B=this._contributions.saveViewState(),U=this._modelData.viewModel.saveCursorState(),z=this._modelData.viewModel.saveState();return{cursorState:U,viewState:z,contributionsState:B}}restoreViewState(B){if(!this._modelData||!this._modelData.hasRealView)return;const U=B;if(U&&U.cursorState&&U.viewState){const z=U.cursorState;Array.isArray(z)?z.length>0&&this._modelData.viewModel.restoreCursorState(z):this._modelData.viewModel.restoreCursorState([z]),this._contributions.restoreViewState(U.contributionsState||{});const $=this._modelData.viewModel.reduceRestoreState(U.viewState);this._modelData.view.restoreState($)}}handleInitialized(){this._getViewModel()?.visibleLinesStabilized()}getContribution(B){return this._contributions.get(B)}getActions(){return Array.from(this._actions.values())}getSupportedActions(){let B=this.getActions();return B=B.filter(U=>U.isSupported()),B}getAction(B){return this._actions.get(B)||null}trigger(B,U,z){z=z||{};try{switch(this._beginUpdate(),U){case"compositionStart":this._startComposition();return;case"compositionEnd":this._endComposition(B);return;case"type":{const Q=z;this._type(B,Q.text||"");return}case"replacePreviousChar":{const Q=z;this._compositionType(B,Q.text||"",Q.replaceCharCnt||0,0,0);return}case"compositionType":{const Q=z;this._compositionType(B,Q.text||"",Q.replacePrevCharCnt||0,Q.replaceNextCharCnt||0,Q.positionDelta||0);return}case"paste":{const Q=z;this._paste(B,Q.text||"",Q.pasteOnNewLine||!1,Q.multicursorText||null,Q.mode||null,Q.clipboardEvent);return}case"cut":this._cut(B);return}const $=this.getAction(U);if($){Promise.resolve($.run(z)).then(void 0,k.onUnexpectedError);return}if(!this._modelData||this._triggerEditorCommand(B,U,z))return;this._triggerCommand(U,z)}finally{this._endUpdate()}}_triggerCommand(B,U){this._commandService.executeCommand(B,U)}_startComposition(){this._modelData&&(this._modelData.viewModel.startComposition(),this._onDidCompositionStart.fire())}_endComposition(B){this._modelData&&(this._modelData.viewModel.endComposition(B),this._onDidCompositionEnd.fire())}_type(B,U){!this._modelData||U.length===0||(B==="keyboard"&&this._onWillType.fire(U),this._modelData.viewModel.type(U,B),B==="keyboard"&&this._onDidType.fire(U))}_compositionType(B,U,z,$,Q){this._modelData&&this._modelData.viewModel.compositionType(U,z,$,Q,B)}_paste(B,U,z,$,Q,ee){if(!this._modelData)return;const le=this._modelData.viewModel,de=le.getSelection().getStartPosition();le.paste(U,z,$,B);const me=le.getSelection().getStartPosition();B==="keyboard"&&this._onDidPaste.fire({clipboardEvent:ee,range:new r.Range(de.lineNumber,de.column,me.lineNumber,me.column),languageId:Q})}_cut(B){this._modelData&&this._modelData.viewModel.cut(B)}_triggerEditorCommand(B,U,z){const $=p.EditorExtensionsRegistry.getEditorCommand(U);return $?(z=z||{},z.source=B,this._instantiationService.invokeFunction(Q=>{Promise.resolve($.runEditorCommand(Q,this,z)).then(void 0,k.onUnexpectedError)}),!0):!1}_getViewModel(){return this._modelData?this._modelData.viewModel:null}pushUndoStop(){return!this._modelData||this._configuration.options.get(92)?!1:(this._modelData.model.pushStackElement(),!0)}popUndoStop(){return!this._modelData||this._configuration.options.get(92)?!1:(this._modelData.model.popStackElement(),!0)}executeEdits(B,U,z){if(!this._modelData||this._configuration.options.get(92))return!1;let $;return z?Array.isArray(z)?$=()=>z:$=z:$=()=>null,this._modelData.viewModel.executeEdits(B,U,$),!0}executeCommand(B,U){this._modelData&&this._modelData.viewModel.executeCommand(U,B)}executeCommands(B,U){this._modelData&&this._modelData.viewModel.executeCommands(U,B)}createDecorationsCollection(B){return new se(this,B)}changeDecorations(B){return this._modelData?this._modelData.model.changeDecorations(B,this._id):null}getLineDecorations(B){return this._modelData?this._modelData.model.getLineDecorations(B,this._id,(0,g.filterValidationDecorations)(this._configuration.options)):null}getDecorationsInRange(B){return this._modelData?this._modelData.model.getDecorationsInRange(B,this._id,(0,g.filterValidationDecorations)(this._configuration.options)):null}deltaDecorations(B,U){return this._modelData?B.length===0&&U.length===0?B:this._modelData.model.deltaDecorations(B,U,this._id):[]}removeDecorations(B){!this._modelData||B.length===0||this._modelData.model.changeDecorations(U=>{U.deltaDecorations(B,[])})}removeDecorationsByType(B){const U=this._decorationTypeKeysToIds[B];U&&this.changeDecorations(z=>z.deltaDecorations(U,[])),this._decorationTypeKeysToIds.hasOwnProperty(B)&&delete this._decorationTypeKeysToIds[B],this._decorationTypeSubtypes.hasOwnProperty(B)&&delete this._decorationTypeSubtypes[B]}getLayoutInfo(){return this._configuration.options.get(146)}createOverviewRuler(B){return!this._modelData||!this._modelData.hasRealView?null:this._modelData.view.createOverviewRuler(B)}getContainerDomNode(){return this._domElement}getDomNode(){return!this._modelData||!this._modelData.hasRealView?null:this._modelData.view.domNode.domNode}delegateVerticalScrollbarPointerDown(B){!this._modelData||!this._modelData.hasRealView||this._modelData.view.delegateVerticalScrollbarPointerDown(B)}delegateScrollFromMouseWheelEvent(B){!this._modelData||!this._modelData.hasRealView||this._modelData.view.delegateScrollFromMouseWheelEvent(B)}layout(B,U=!1){this._configuration.observeContainer(B),U||this.render()}focus(){!this._modelData||!this._modelData.hasRealView||this._modelData.view.focus()}hasTextFocus(){return!this._modelData||!this._modelData.hasRealView?!1:this._modelData.view.isFocused()}hasWidgetFocus(){return this._focusTracker&&this._focusTracker.hasFocus()}addContentWidget(B){const U={widget:B,position:B.getPosition()};this._contentWidgets.hasOwnProperty(B.getId())&&console.warn("Overwriting a content widget with the same id:"+B.getId()),this._contentWidgets[B.getId()]=U,this._modelData&&this._modelData.hasRealView&&this._modelData.view.addContentWidget(U)}layoutContentWidget(B){const U=B.getId();if(this._contentWidgets.hasOwnProperty(U)){const z=this._contentWidgets[U];z.position=B.getPosition(),this._modelData&&this._modelData.hasRealView&&this._modelData.view.layoutContentWidget(z)}}removeContentWidget(B){const U=B.getId();if(this._contentWidgets.hasOwnProperty(U)){const z=this._contentWidgets[U];delete this._contentWidgets[U],this._modelData&&this._modelData.hasRealView&&this._modelData.view.removeContentWidget(z)}}addOverlayWidget(B){const U={widget:B,position:B.getPosition()};this._overlayWidgets.hasOwnProperty(B.getId())&&console.warn("Overwriting an overlay widget with the same id."),this._overlayWidgets[B.getId()]=U,this._modelData&&this._modelData.hasRealView&&this._modelData.view.addOverlayWidget(U)}layoutOverlayWidget(B){const U=B.getId();if(this._overlayWidgets.hasOwnProperty(U)){const z=this._overlayWidgets[U];z.position=B.getPosition(),this._modelData&&this._modelData.hasRealView&&this._modelData.view.layoutOverlayWidget(z)}}removeOverlayWidget(B){const U=B.getId();if(this._overlayWidgets.hasOwnProperty(U)){const z=this._overlayWidgets[U];delete this._overlayWidgets[U],this._modelData&&this._modelData.hasRealView&&this._modelData.view.removeOverlayWidget(z)}}addGlyphMarginWidget(B){const U={widget:B,position:B.getPosition()};this._glyphMarginWidgets.hasOwnProperty(B.getId())&&console.warn("Overwriting a glyph margin widget with the same id."),this._glyphMarginWidgets[B.getId()]=U,this._modelData&&this._modelData.hasRealView&&this._modelData.view.addGlyphMarginWidget(U)}layoutGlyphMarginWidget(B){const U=B.getId();if(this._glyphMarginWidgets.hasOwnProperty(U)){const z=this._glyphMarginWidgets[U];z.position=B.getPosition(),this._modelData&&this._modelData.hasRealView&&this._modelData.view.layoutGlyphMarginWidget(z)}}removeGlyphMarginWidget(B){const U=B.getId();if(this._glyphMarginWidgets.hasOwnProperty(U)){const z=this._glyphMarginWidgets[U];delete this._glyphMarginWidgets[U],this._modelData&&this._modelData.hasRealView&&this._modelData.view.removeGlyphMarginWidget(z)}}changeViewZones(B){!this._modelData||!this._modelData.hasRealView||this._modelData.view.change(B)}getTargetAtClientPoint(B,U){return!this._modelData||!this._modelData.hasRealView?null:this._modelData.view.getTargetAtClientPoint(B,U)}getScrolledVisiblePosition(B){if(!this._modelData||!this._modelData.hasRealView)return null;const U=this._modelData.model.validatePosition(B),z=this._configuration.options,$=z.get(146),Q=H._getVerticalOffsetForPosition(this._modelData,U.lineNumber,U.column)-this.getScrollTop(),ee=this._modelData.view.getOffsetForColumn(U.lineNumber,U.column)+$.glyphMarginWidth+$.lineNumbersWidth+$.decorationsWidth-this.getScrollLeft();return{top:Q,left:ee,height:z.get(67)}}getOffsetForColumn(B,U){return!this._modelData||!this._modelData.hasRealView?-1:this._modelData.view.getOffsetForColumn(B,U)}render(B=!1){!this._modelData||!this._modelData.hasRealView||this._modelData.viewModel.batchEvents(()=>{this._modelData.view.render(!0,B)})}setAriaOptions(B){!this._modelData||!this._modelData.hasRealView||this._modelData.view.setAriaOptions(B)}applyFontInfo(B){(0,f.applyFontInfo)(B,this._configuration.options.get(50))}setBanner(B,U){this._bannerDomNode&&this._domElement.contains(this._bannerDomNode)&&this._bannerDomNode.remove(),this._bannerDomNode=B,this._configuration.setReservedHeight(B?U:0),this._bannerDomNode&&this._domElement.prepend(this._bannerDomNode)}_attachModel(B){if(!B){this._modelData=null;return}const U=[];this._domElement.setAttribute("data-mode-id",B.getLanguageId()),this._configuration.setIsDominatedByLongLines(B.isDominatedByLongLines()),this._configuration.setModelLineCount(B.getLineCount());const z=B.onBeforeAttached(),$=new T.ViewModel(this._id,this._configuration,B,t.DOMLineBreaksComputerFactory.create(c.getWindow(this._domElement)),I.MonospaceLineBreaksComputerFactory.create(this._configuration.options),le=>c.scheduleAtNextAnimationFrame(c.getWindow(this._domElement),le),this.languageConfigurationService,this._themeService,z,{batchChanges:le=>{try{return this._beginUpdate(),le()}finally{this._endUpdate()}}});U.push(B.onWillDispose(()=>this.setModel(null))),U.push($.onEvent(le=>{switch(le.kind){case 0:this._onDidContentSizeChange.fire(le);break;case 1:this._editorTextFocus.setValue(le.hasFocus);break;case 2:this._onDidScrollChange.fire(le);break;case 3:this._onDidChangeViewZones.fire();break;case 4:this._onDidChangeHiddenAreas.fire();break;case 5:this._onDidAttemptReadOnlyEdit.fire();break;case 6:{if(le.reachedMaxCursorCount){const ve=this.getOption(80),Le=M.localize(1010,"The number of cursors has been limited to {0}. Consider using [find and replace](https://code.visualstudio.com/docs/editor/codebasics#_find-and-replace) for larger changes or increase the editor multi cursor limit setting.",ve);this._notificationService.prompt(F.Severity.Warning,Le,[{label:"Find and Replace",run:()=>{this._commandService.executeCommand("editor.action.startFindReplaceAction")}},{label:M.localize(1011,"Increase Multi Cursor Limit"),run:()=>{this._commandService.executeCommand("workbench.action.openSettings2",{query:"editor.multiCursorLimit"})}}])}const de=[];for(let ve=0,Le=le.selections.length;ve<Le;ve++)de[ve]=le.selections[ve].getPosition();const me={position:de[0],secondaryPositions:de.slice(1),reason:le.reason,source:le.source};this._onDidChangeCursorPosition.fire(me);const be={selection:le.selections[0],secondarySelections:le.selections.slice(1),modelVersionId:le.modelVersionId,oldSelections:le.oldSelections,oldModelVersionId:le.oldModelVersionId,source:le.source,reason:le.reason};this._onDidChangeCursorSelection.fire(be);break}case 7:this._onDidChangeModelDecorations.fire(le.event);break;case 8:this._domElement.setAttribute("data-mode-id",B.getLanguageId()),this._onDidChangeModelLanguage.fire(le.event);break;case 9:this._onDidChangeModelLanguageConfiguration.fire(le.event);break;case 10:this._onDidChangeModelContent.fire(le.event);break;case 11:this._onDidChangeModelOptions.fire(le.event);break;case 12:this._onDidChangeModelTokens.fire(le.event);break}}));const[Q,ee]=this._createView($);if(ee){this._domElement.appendChild(Q.domNode.domNode);let le=Object.keys(this._contentWidgets);for(let de=0,me=le.length;de<me;de++){const be=le[de];Q.addContentWidget(this._contentWidgets[be])}le=Object.keys(this._overlayWidgets);for(let de=0,me=le.length;de<me;de++){const be=le[de];Q.addOverlayWidget(this._overlayWidgets[be])}le=Object.keys(this._glyphMarginWidgets);for(let de=0,me=le.length;de<me;de++){const be=le[de];Q.addGlyphMarginWidget(this._glyphMarginWidgets[be])}Q.render(!1,!0),Q.domNode.domNode.setAttribute("data-uri",B.uri.toString())}this._modelData=new Y(B,$,Q,ee,U,z)}_createView(B){let U;this.isSimpleWidget?U={paste:(Q,ee,le,de)=>{this._paste("keyboard",Q,ee,le,de)},type:Q=>{this._type("keyboard",Q)},compositionType:(Q,ee,le,de)=>{this._compositionType("keyboard",Q,ee,le,de)},startComposition:()=>{this._startComposition()},endComposition:()=>{this._endComposition("keyboard")},cut:()=>{this._cut("keyboard")}}:U={paste:(Q,ee,le,de)=>{const me={text:Q,pasteOnNewLine:ee,multicursorText:le,mode:de};this._commandService.executeCommand("paste",me)},type:Q=>{const ee={text:Q};this._commandService.executeCommand("type",ee)},compositionType:(Q,ee,le,de)=>{if(le||de){const me={text:Q,replacePrevCharCnt:ee,replaceNextCharCnt:le,positionDelta:de};this._commandService.executeCommand("compositionType",me)}else{const me={text:Q,replaceCharCnt:ee};this._commandService.executeCommand("replacePreviousChar",me)}},startComposition:()=>{this._commandService.executeCommand("compositionStart",{})},endComposition:()=>{this._commandService.executeCommand("compositionEnd",{})},cut:()=>{this._commandService.executeCommand("cut",{})}};const z=new i.ViewUserInputEvents(B.coordinatesConverter);return z.onKeyDown=Q=>this._onKeyDown.fire(Q),z.onKeyUp=Q=>this._onKeyUp.fire(Q),z.onContextMenu=Q=>this._onContextMenu.fire(Q),z.onMouseMove=Q=>this._onMouseMove.fire(Q),z.onMouseLeave=Q=>this._onMouseLeave.fire(Q),z.onMouseDown=Q=>this._onMouseDown.fire(Q),z.onMouseUp=Q=>this._onMouseUp.fire(Q),z.onMouseDrag=Q=>this._onMouseDrag.fire(Q),z.onMouseDrop=Q=>this._onMouseDrop.fire(Q),z.onMouseDropCanceled=Q=>this._onMouseDropCanceled.fire(Q),z.onMouseWheel=Q=>this._onMouseWheel.fire(Q),[new s.View(U,this._configuration,this._themeService.getColorTheme(),B,z,this._overflowWidgetsDomNode,this._instantiationService),!0]}_postDetachModelCleanup(B){B?.removeAllDecorationsWithOwnerId(this._id)}_detachModel(){if(this._contributionsDisposable?.dispose(),this._contributionsDisposable=void 0,!this._modelData)return null;const B=this._modelData.model,U=this._modelData.hasRealView?this._modelData.view.domNode.domNode:null;return this._modelData.dispose(),this._modelData=null,this._domElement.removeAttribute("data-mode-id"),U&&this._domElement.contains(U)&&U.remove(),this._bannerDomNode&&this._domElement.contains(this._bannerDomNode)&&this._bannerDomNode.remove(),B}_removeDecorationType(B){this._codeEditorService.removeDecorationType(B)}hasModel(){return this._modelData!==null}showDropIndicatorAt(B){const U=[{range:new r.Range(B.lineNumber,B.column,B.lineNumber,B.column),options:H.dropIntoEditorDecorationOptions}];this._dropIntoEditorDecorations.set(U),this.revealPosition(B,1)}removeDropIndicator(){this._dropIntoEditorDecorations.clear()}setContextValue(B,U){this._contextKeyService.createKey(B,U)}_beginUpdate(){this._updateCounter++,this._updateCounter===1&&this._onBeginUpdate.fire()}_endUpdate(){this._updateCounter--,this._updateCounter===0&&this._onEndUpdate.fire()}};e.CodeEditorWidget=K,e.CodeEditorWidget=K=H=De([he(3,O.IInstantiationService),he(4,n.ICodeEditorService),he(5,R.ICommandService),he(6,N.IContextKeyService),he(7,V.IThemeService),he(8,F.INotificationService),he(9,A.IAccessibilityService),he(10,w.ILanguageConfigurationService),he(11,D.ILanguageFeaturesService)],K);let G=0;class Y{constructor(B,U,z,$,Q,ee){this.model=B,this.viewModel=U,this.view=z,this.hasRealView=$,this.listenersToRemove=Q,this.attachedView=ee}dispose(){(0,L.dispose)(this.listenersToRemove),this.model.onBeforeDetached(this.attachedView),this.hasRealView&&this.view.dispose(),this.viewModel.dispose()}}class X extends L.Disposable{constructor(B){super(),this._emitterOptions=B,this._onDidChangeToTrue=this._register(new E.Emitter(this._emitterOptions)),this.onDidChangeToTrue=this._onDidChangeToTrue.event,this._onDidChangeToFalse=this._register(new E.Emitter(this._emitterOptions)),this.onDidChangeToFalse=this._onDidChangeToFalse.event,this._value=0}setValue(B){const U=B?2:1;this._value!==U&&(this._value=U,this._value===2?this._onDidChangeToTrue.fire():this._value===1&&this._onDidChangeToFalse.fire())}}e.BooleanEventEmitter=X;class Z extends E.Emitter{constructor(B,U){super({deliveryQueue:U}),this._contributions=B}fire(B){this._contributions.onBeforeInteractionEvent(),super.fire(B)}}class j extends L.Disposable{constructor(B,U){super(),this._editor=B,U.createKey("editorId",B.getId()),this._editorSimpleInput=v.EditorContextKeys.editorSimpleInput.bindTo(U),this._editorFocus=v.EditorContextKeys.focus.bindTo(U),this._textInputFocus=v.EditorContextKeys.textInputFocus.bindTo(U),this._editorTextFocus=v.EditorContextKeys.editorTextFocus.bindTo(U),this._tabMovesFocus=v.EditorContextKeys.tabMovesFocus.bindTo(U),this._editorReadonly=v.EditorContextKeys.readOnly.bindTo(U),this._inDiffEditor=v.EditorContextKeys.inDiffEditor.bindTo(U),this._editorColumnSelection=v.EditorContextKeys.columnSelection.bindTo(U),this._hasMultipleSelections=v.EditorContextKeys.hasMultipleSelections.bindTo(U),this._hasNonEmptySelection=v.EditorContextKeys.hasNonEmptySelection.bindTo(U),this._canUndo=v.EditorContextKeys.canUndo.bindTo(U),this._canRedo=v.EditorContextKeys.canRedo.bindTo(U),this._register(this._editor.onDidChangeConfiguration(()=>this._updateFromConfig())),this._register(this._editor.onDidChangeCursorSelection(()=>this._updateFromSelection())),this._register(this._editor.onDidFocusEditorWidget(()=>this._updateFromFocus())),this._register(this._editor.onDidBlurEditorWidget(()=>this._updateFromFocus())),this._register(this._editor.onDidFocusEditorText(()=>this._updateFromFocus())),this._register(this._editor.onDidBlurEditorText(()=>this._updateFromFocus())),this._register(this._editor.onDidChangeModel(()=>this._updateFromModel())),this._register(this._editor.onDidChangeConfiguration(()=>this._updateFromModel())),this._register(C.TabFocus.onDidChangeTabFocus(z=>this._tabMovesFocus.set(z))),this._updateFromConfig(),this._updateFromSelection(),this._updateFromFocus(),this._updateFromModel(),this._editorSimpleInput.set(this._editor.isSimpleWidget)}_updateFromConfig(){const B=this._editor.getOptions();this._tabMovesFocus.set(C.TabFocus.getTabFocusMode()),this._editorReadonly.set(B.get(92)),this._inDiffEditor.set(B.get(61)),this._editorColumnSelection.set(B.get(22))}_updateFromSelection(){const B=this._editor.getSelections();B?(this._hasMultipleSelections.set(B.length>1),this._hasNonEmptySelection.set(B.some(U=>!U.isEmpty()))):(this._hasMultipleSelections.reset(),this._hasNonEmptySelection.reset())}_updateFromFocus(){this._editorFocus.set(this._editor.hasWidgetFocus()&&!this._editor.isSimpleWidget),this._editorTextFocus.set(this._editor.hasTextFocus()&&!this._editor.isSimpleWidget),this._textInputFocus.set(this._editor.hasTextFocus())}_updateFromModel(){const B=this._editor.getModel();this._canUndo.set(!!(B&&B.canUndo())),this._canRedo.set(!!(B&&B.canRedo()))}}class P extends L.Disposable{constructor(B,U,z){super(),this._editor=B,this._contextKeyService=U,this._languageFeaturesService=z,this._langId=v.EditorContextKeys.languageId.bindTo(U),this._hasCompletionItemProvider=v.EditorContextKeys.hasCompletionItemProvider.bindTo(U),this._hasCodeActionsProvider=v.EditorContextKeys.hasCodeActionsProvider.bindTo(U),this._hasCodeLensProvider=v.EditorContextKeys.hasCodeLensProvider.bindTo(U),this._hasDefinitionProvider=v.EditorContextKeys.hasDefinitionProvider.bindTo(U),this._hasDeclarationProvider=v.EditorContextKeys.hasDeclarationProvider.bindTo(U),this._hasImplementationProvider=v.EditorContextKeys.hasImplementationProvider.bindTo(U),this._hasTypeDefinitionProvider=v.EditorContextKeys.hasTypeDefinitionProvider.bindTo(U),this._hasHoverProvider=v.EditorContextKeys.hasHoverProvider.bindTo(U),this._hasDocumentHighlightProvider=v.EditorContextKeys.hasDocumentHighlightProvider.bindTo(U),this._hasDocumentSymbolProvider=v.EditorContextKeys.hasDocumentSymbolProvider.bindTo(U),this._hasReferenceProvider=v.EditorContextKeys.hasReferenceProvider.bindTo(U),this._hasRenameProvider=v.EditorContextKeys.hasRenameProvider.bindTo(U),this._hasSignatureHelpProvider=v.EditorContextKeys.hasSignatureHelpProvider.bindTo(U),this._hasInlayHintsProvider=v.EditorContextKeys.hasInlayHintsProvider.bindTo(U),this._hasDocumentFormattingProvider=v.EditorContextKeys.hasDocumentFormattingProvider.bindTo(U),this._hasDocumentSelectionFormattingProvider=v.EditorContextKeys.hasDocumentSelectionFormattingProvider.bindTo(U),this._hasMultipleDocumentFormattingProvider=v.EditorContextKeys.hasMultipleDocumentFormattingProvider.bindTo(U),this._hasMultipleDocumentSelectionFormattingProvider=v.EditorContextKeys.hasMultipleDocumentSelectionFormattingProvider.bindTo(U),this._isInEmbeddedEditor=v.EditorContextKeys.isInEmbeddedEditor.bindTo(U);const $=()=>this._update();this._register(B.onDidChangeModel($)),this._register(B.onDidChangeModelLanguage($)),this._register(z.completionProvider.onDidChange($)),this._register(z.codeActionProvider.onDidChange($)),this._register(z.codeLensProvider.onDidChange($)),this._register(z.definitionProvider.onDidChange($)),this._register(z.declarationProvider.onDidChange($)),this._register(z.implementationProvider.onDidChange($)),this._register(z.typeDefinitionProvider.onDidChange($)),this._register(z.hoverProvider.onDidChange($)),this._register(z.documentHighlightProvider.onDidChange($)),this._register(z.documentSymbolProvider.onDidChange($)),this._register(z.referenceProvider.onDidChange($)),this._register(z.renameProvider.onDidChange($)),this._register(z.documentFormattingEditProvider.onDidChange($)),this._register(z.documentRangeFormattingEditProvider.onDidChange($)),this._register(z.signatureHelpProvider.onDidChange($)),this._register(z.inlayHintsProvider.onDidChange($)),$()}dispose(){super.dispose()}reset(){this._contextKeyService.bufferChangeEvents(()=>{this._langId.reset(),this._hasCompletionItemProvider.reset(),this._hasCodeActionsProvider.reset(),this._hasCodeLensProvider.reset(),this._hasDefinitionProvider.reset(),this._hasDeclarationProvider.reset(),this._hasImplementationProvider.reset(),this._hasTypeDefinitionProvider.reset(),this._hasHoverProvider.reset(),this._hasDocumentHighlightProvider.reset(),this._hasDocumentSymbolProvider.reset(),this._hasReferenceProvider.reset(),this._hasRenameProvider.reset(),this._hasDocumentFormattingProvider.reset(),this._hasDocumentSelectionFormattingProvider.reset(),this._hasSignatureHelpProvider.reset(),this._isInEmbeddedEditor.reset()})}_update(){const B=this._editor.getModel();if(!B){this.reset();return}this._contextKeyService.bufferChangeEvents(()=>{this._langId.set(B.getLanguageId()),this._hasCompletionItemProvider.set(this._languageFeaturesService.completionProvider.has(B)),this._hasCodeActionsProvider.set(this._languageFeaturesService.codeActionProvider.has(B)),this._hasCodeLensProvider.set(this._languageFeaturesService.codeLensProvider.has(B)),this._hasDefinitionProvider.set(this._languageFeaturesService.definitionProvider.has(B)),this._hasDeclarationProvider.set(this._languageFeaturesService.declarationProvider.has(B)),this._hasImplementationProvider.set(this._languageFeaturesService.implementationProvider.has(B)),this._hasTypeDefinitionProvider.set(this._languageFeaturesService.typeDefinitionProvider.has(B)),this._hasHoverProvider.set(this._languageFeaturesService.hoverProvider.has(B)),this._hasDocumentHighlightProvider.set(this._languageFeaturesService.documentHighlightProvider.has(B)),this._hasDocumentSymbolProvider.set(this._languageFeaturesService.documentSymbolProvider.has(B)),this._hasReferenceProvider.set(this._languageFeaturesService.referenceProvider.has(B)),this._hasRenameProvider.set(this._languageFeaturesService.renameProvider.has(B)),this._hasSignatureHelpProvider.set(this._languageFeaturesService.signatureHelpProvider.has(B)),this._hasInlayHintsProvider.set(this._languageFeaturesService.inlayHintsProvider.has(B)),this._hasDocumentFormattingProvider.set(this._languageFeaturesService.documentFormattingEditProvider.has(B)||this._languageFeaturesService.documentRangeFormattingEditProvider.has(B)),this._hasDocumentSelectionFormattingProvider.set(this._languageFeaturesService.documentRangeFormattingEditProvider.has(B)),this._hasMultipleDocumentFormattingProvider.set(this._languageFeaturesService.documentFormattingEditProvider.all(B).length+this._languageFeaturesService.documentRangeFormattingEditProvider.all(B).length>1),this._hasMultipleDocumentSelectionFormattingProvider.set(this._languageFeaturesService.documentRangeFormattingEditProvider.all(B).length>1),this._isInEmbeddedEditor.set(B.uri.scheme===y.Schemas.walkThroughSnippet||B.uri.scheme===y.Schemas.vscodeChatCodeBlock)})}}e.EditorModeContext=P;class te extends L.Disposable{constructor(B,U){super(),this._onChange=this._register(new E.Emitter),this.onChange=this._onChange.event,this._hadFocus=void 0,this._hasDomElementFocus=!1,this._domFocusTracker=this._register(c.trackFocus(B)),this._overflowWidgetsDomNodeHasFocus=!1,this._register(this._domFocusTracker.onDidFocus(()=>{this._hasDomElementFocus=!0,this._update()})),this._register(this._domFocusTracker.onDidBlur(()=>{this._hasDomElementFocus=!1,this._update()})),U&&(this._overflowWidgetsDomNode=this._register(c.trackFocus(U)),this._register(this._overflowWidgetsDomNode.onDidFocus(()=>{this._overflowWidgetsDomNodeHasFocus=!0,this._update()})),this._register(this._overflowWidgetsDomNode.onDidBlur(()=>{this._overflowWidgetsDomNodeHasFocus=!1,this._update()})))}_update(){const B=this._hasDomElementFocus||this._overflowWidgetsDomNodeHasFocus;this._hadFocus!==B&&(this._hadFocus=B,this._onChange.fire(void 0))}hasFocus(){return this._hadFocus??!1}}class se{get length(){return this._decorationIds.length}constructor(B,U){this._editor=B,this._decorationIds=[],this._isChangingDecorations=!1,Array.isArray(U)&&U.length>0&&this.set(U)}onDidChange(B,U,z){return this._editor.onDidChangeModelDecorations($=>{this._isChangingDecorations||B.call(U,$)},z)}getRange(B){return!this._editor.hasModel()||B>=this._decorationIds.length?null:this._editor.getModel().getDecorationRange(this._decorationIds[B])}getRanges(){if(!this._editor.hasModel())return[];const B=this._editor.getModel(),U=[];for(const z of this._decorationIds){const $=B.getDecorationRange(z);$&&U.push($)}return U}has(B){return this._decorationIds.includes(B.id)}clear(){this._decorationIds.length!==0&&this.set([])}set(B){try{this._isChangingDecorations=!0,this._editor.changeDecorations(U=>{this._decorationIds=U.deltaDecorations(this._decorationIds,B)})}finally{this._isChangingDecorations=!1}return this._decorationIds}append(B){let U=[];try{this._isChangingDecorations=!0,this._editor.changeDecorations(z=>{U=z.deltaDecorations([],B),this._decorationIds=this._decorationIds.concat(U)})}finally{this._isChangingDecorations=!1}return U}}const ue=encodeURIComponent("<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 6 3' enable-background='new 0 0 6 3' height='3' width='6'><g fill='"),ge=encodeURIComponent("'><polygon points='5.5,0 2.5,3 1.1,3 4.1,0'/><polygon points='4,0 6,2 6,0.6 5.4,0'/><polygon points='0,2 1,3 2.4,3 0,0.6'/></g></svg>");function pe(J){return ue+encodeURIComponent(J.toString())+ge}const ce=encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" height="3" width="12"><g fill="'),ie=encodeURIComponent('"><circle cx="1" cy="1" r="1"/><circle cx="5" cy="1" r="1"/><circle cx="9" cy="1" r="1"/></g></svg>');function ne(J){return ce+encodeURIComponent(J.toString())+ie}(0,V.registerThemingParticipant)((J,B)=>{const U=J.getColor(W.editorErrorForeground);U&&B.addRule(`.monaco-editor .squiggly-error { background: url("data:image/svg+xml,${pe(U)}") repeat-x bottom left; }`);const z=J.getColor(W.editorWarningForeground);z&&B.addRule(`.monaco-editor .squiggly-warning { background: url("data:image/svg+xml,${pe(z)}") repeat-x bottom left; }`);const $=J.getColor(W.editorInfoForeground);$&&B.addRule(`.monaco-editor .squiggly-info { background: url("data:image/svg+xml,${pe($)}") repeat-x bottom left; }`);const Q=J.getColor(W.editorHintForeground);Q&&B.addRule(`.monaco-editor .squiggly-hint { background: url("data:image/svg+xml,${ne(Q)}") no-repeat bottom left; }`);const ee=J.getColor(l.editorUnnecessaryCodeOpacity);ee&&B.addRule(`.monaco-editor.showUnused .squiggly-inline-unnecessary { opacity: ${ee.rgba.a}; }`)})}),define(oe[124],re([1,0,54,35,218,34,17,60,24,12,7,50,25]),function(ae,e,c,k,E,L,y,f,_,C,p,n,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EmbeddedCodeEditorWidget=void 0;let t=class extends E.CodeEditorWidget{constructor(o,g,h,l,a,r,d,m,u,b,v,w,S){super(o,{...l.getRawOptions(),overflowWidgetsDomNode:l.getOverflowWidgetsDomNode()},h,a,r,d,m,u,b,v,w,S),this._parentEditor=l,this._overwriteOptions=g,super.updateOptions(this._overwriteOptions),this._register(l.onDidChangeConfiguration(D=>this._onParentConfigurationChanged(D)))}getParentEditor(){return this._parentEditor}_onParentConfigurationChanged(o){super.updateOptions(this._parentEditor.getRawOptions()),super.updateOptions(this._overwriteOptions)}updateOptions(o){c.mixin(this._overwriteOptions,o,!0),super.updateOptions(this._overwriteOptions)}};e.EmbeddedCodeEditorWidget=t,e.EmbeddedCodeEditorWidget=t=De([he(4,p.IInstantiationService),he(5,k.ICodeEditorService),he(6,_.ICommandService),he(7,C.IContextKeyService),he(8,s.IThemeService),he(9,n.INotificationService),he(10,f.IAccessibilityService),he(11,L.ILanguageConfigurationService),he(12,y.ILanguageFeaturesService)],t)}),define(oe[284],re([1,0,5,67,8,6,2,21,65,15,35,142,218,753,797,320,283,790,379,368,410,659,85,161,391,9,4,198,20,136,12,7,180,96,766,562,798,402,509]),function(ae,e,c,k,E,L,y,f,_,C,p,n,s,t,i,o,g,h,l,a,r,d,m,u,b,v,w,S,D,I,T,M,A,R,N,O,x,F){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DiffEditorWidget=void 0;let W=class extends O.DelegatingEditor{get onDidContentSizeChange(){return this._editors.onDidContentSizeChange}constructor(H,K,G,Y,X,Z,j,P){super(),this._domElement=H,this._parentContextKeyService=Y,this._parentInstantiationService=X,this._accessibilitySignalService=j,this._editorProgressService=P,this.elements=(0,c.h)("div.monaco-diff-editor.side-by-side",{style:{position:"relative",height:"100%"}},[(0,c.h)("div.editor.original@original",{style:{position:"absolute",height:"100%"}}),(0,c.h)("div.editor.modified@modified",{style:{position:"absolute",height:"100%"}}),(0,c.h)("div.accessibleDiffViewer@accessibleDiffViewer",{style:{position:"absolute",height:"100%"}})]),this._diffModelSrc=this._register((0,f.disposableObservableValue)(this,void 0)),this._diffModel=(0,f.derived)(this,z=>this._diffModelSrc.read(z)?.object),this.onDidChangeModel=L.Event.fromObservableLight(this._diffModel),this._contextKeyService=this._register(this._parentContextKeyService.createScoped(this._domElement)),this._instantiationService=this._register(this._parentInstantiationService.createChild(new A.ServiceCollection([T.IContextKeyService,this._contextKeyService]))),this._boundarySashes=(0,f.observableValue)(this,void 0),this._accessibleDiffViewerShouldBeVisible=(0,f.observableValue)(this,!1),this._accessibleDiffViewerVisible=(0,f.derived)(this,z=>this._options.onlyShowAccessibleDiffViewer.read(z)?!0:this._accessibleDiffViewerShouldBeVisible.read(z)),this._movedBlocksLinesPart=(0,f.observableValue)(this,void 0),this._layoutInfo=(0,f.derived)(this,z=>{const $=this._rootSizeObserver.width.read(z),Q=this._rootSizeObserver.height.read(z);this._rootSizeObserver.automaticLayout?this.elements.root.style.height="100%":this.elements.root.style.height=Q+"px";const ee=this._sash.read(z),le=this._gutter.read(z),de=le?.width.read(z)??0,me=this._overviewRulerPart.read(z)?.width??0;let be,ve,Le,Se,ye;if(!!ee){const ke=ee.sashLeft.read(z),Re=this._movedBlocksLinesPart.read(z)?.width.read(z)??0;be=0,ve=ke-de-Re,ye=ke-de,Le=ke,Se=$-Le-me}else ye=0,be=de,ve=Math.max(5,this._editors.original.getLayoutInfo().decorationsLeft),Le=de+ve,Se=$-Le-me;return this.elements.original.style.left=be+"px",this.elements.original.style.width=ve+"px",this._editors.original.layout({width:ve,height:Q},!0),le?.layout(ye),this.elements.modified.style.left=Le+"px",this.elements.modified.style.width=Se+"px",this._editors.modified.layout({width:Se,height:Q},!0),{modifiedEditor:this._editors.modified.getLayoutInfo(),originalEditor:this._editors.original.getLayoutInfo()}}),this._diffValue=this._diffModel.map((z,$)=>z?.diff.read($)),this.onDidUpdateDiff=L.Event.fromObservableLight(this._diffValue),Z.willCreateDiffEditor(),this._contextKeyService.createKey("isInDiffEditor",!0),this._domElement.appendChild(this.elements.root),this._register((0,y.toDisposable)(()=>this.elements.root.remove())),this._rootSizeObserver=this._register(new m.ObservableElementSizeObserver(this.elements.root,K.dimension)),this._rootSizeObserver.setAutomaticLayout(K.automaticLayout??!1),this._options=this._instantiationService.createInstance(x.DiffEditorOptions,K),this._register((0,f.autorun)(z=>{this._options.setWidth(this._rootSizeObserver.width.read(z))})),this._contextKeyService.createKey(D.EditorContextKeys.isEmbeddedDiffEditor.key,!1),this._register((0,b.bindContextKey)(D.EditorContextKeys.isEmbeddedDiffEditor,this._contextKeyService,z=>this._options.isInEmbeddedEditor.read(z))),this._register((0,b.bindContextKey)(D.EditorContextKeys.comparingMovedCode,this._contextKeyService,z=>!!this._diffModel.read(z)?.movedTextToCompare.read(z))),this._register((0,b.bindContextKey)(D.EditorContextKeys.diffEditorRenderSideBySideInlineBreakpointReached,this._contextKeyService,z=>this._options.couldShowInlineViewBecauseOfSize.read(z))),this._register((0,b.bindContextKey)(D.EditorContextKeys.diffEditorInlineMode,this._contextKeyService,z=>!this._options.renderSideBySide.read(z))),this._register((0,b.bindContextKey)(D.EditorContextKeys.hasChanges,this._contextKeyService,z=>(this._diffModel.read(z)?.diff.read(z)?.mappings.length??0)>0)),this._editors=this._register(this._instantiationService.createInstance(N.DiffEditorEditors,this.elements.original,this.elements.modified,this._options,G,(z,$,Q,ee)=>this._createInnerEditor(z,$,Q,ee))),this._register((0,b.bindContextKey)(D.EditorContextKeys.diffEditorOriginalWritable,this._contextKeyService,z=>this._options.originalEditable.read(z))),this._register((0,b.bindContextKey)(D.EditorContextKeys.diffEditorModifiedWritable,this._contextKeyService,z=>!this._options.readOnly.read(z))),this._register((0,b.bindContextKey)(D.EditorContextKeys.diffEditorOriginalUri,this._contextKeyService,z=>this._diffModel.read(z)?.model.original.uri.toString()??"")),this._register((0,b.bindContextKey)(D.EditorContextKeys.diffEditorModifiedUri,this._contextKeyService,z=>this._diffModel.read(z)?.model.modified.uri.toString()??"")),this._overviewRulerPart=(0,_.derivedDisposable)(this,z=>this._options.renderOverviewRuler.read(z)?this._instantiationService.createInstance((0,u.readHotReloadableExport)(r.OverviewRulerFeature,z),this._editors,this.elements.root,this._diffModel,this._rootSizeObserver.width,this._rootSizeObserver.height,this._layoutInfo.map($=>$.modifiedEditor)):void 0).recomputeInitiallyAndOnChange(this._store);const te={height:this._rootSizeObserver.height,width:this._rootSizeObserver.width.map((z,$)=>z-(this._overviewRulerPart.read($)?.width??0))};this._sashLayout=new o.SashLayout(this._options,te),this._sash=(0,_.derivedDisposable)(this,z=>{const $=this._options.renderSideBySide.read(z);return this.elements.root.classList.toggle("side-by-side",$),$?new o.DiffEditorSash(this.elements.root,te,this._options.enableSplitViewResizing,this._boundarySashes,this._sashLayout.sashLeft,()=>this._sashLayout.resetSash()):void 0}).recomputeInitiallyAndOnChange(this._store);const se=(0,_.derivedDisposable)(this,z=>this._instantiationService.createInstance((0,u.readHotReloadableExport)(l.HideUnchangedRegionsFeature,z),this._editors,this._diffModel,this._options)).recomputeInitiallyAndOnChange(this._store);(0,_.derivedDisposable)(this,z=>this._instantiationService.createInstance((0,u.readHotReloadableExport)(i.DiffEditorDecorations,z),this._editors,this._diffModel,this._options,this)).recomputeInitiallyAndOnChange(this._store);const ue=new Set,ge=new Set;let pe=!1;const ce=(0,_.derivedDisposable)(this,z=>this._instantiationService.createInstance((0,u.readHotReloadableExport)(g.DiffEditorViewZones,z),(0,c.getWindow)(this._domElement),this._editors,this._diffModel,this._options,this,()=>pe||se.get().isUpdatingHiddenAreas,ue,ge)).recomputeInitiallyAndOnChange(this._store),ie=(0,f.derived)(this,z=>{const $=ce.read(z).viewZones.read(z).orig,Q=se.read(z).viewZones.read(z).origViewZones;return $.concat(Q)}),ne=(0,f.derived)(this,z=>{const $=ce.read(z).viewZones.read(z).mod,Q=se.read(z).viewZones.read(z).modViewZones;return $.concat(Q)});this._register((0,m.applyViewZones)(this._editors.original,ie,z=>{pe=z},ue));let J;this._register((0,m.applyViewZones)(this._editors.modified,ne,z=>{pe=z,pe?J=n.StableEditorScrollState.capture(this._editors.modified):(J?.restore(this._editors.modified),J=void 0)},ge)),this._accessibleDiffViewer=(0,_.derivedDisposable)(this,z=>this._instantiationService.createInstance((0,u.readHotReloadableExport)(t.AccessibleDiffViewer,z),this.elements.accessibleDiffViewer,this._accessibleDiffViewerVisible,($,Q)=>this._accessibleDiffViewerShouldBeVisible.set($,Q),this._options.onlyShowAccessibleDiffViewer.map($=>!$),this._rootSizeObserver.width,this._rootSizeObserver.height,this._diffModel.map(($,Q)=>$?.diff.read(Q)?.mappings.map(ee=>ee.lineRangeMapping)),new t.AccessibleDiffViewerModelFromEditors(this._editors))).recomputeInitiallyAndOnChange(this._store);const B=this._accessibleDiffViewerVisible.map(z=>z?"hidden":"visible");this._register((0,m.applyStyle)(this.elements.modified,{visibility:B})),this._register((0,m.applyStyle)(this.elements.original,{visibility:B})),this._createDiffEditorContributions(),Z.addDiffEditor(this),this._gutter=(0,_.derivedDisposable)(this,z=>this._options.shouldRenderGutterMenu.read(z)?this._instantiationService.createInstance((0,u.readHotReloadableExport)(h.DiffEditorGutter,z),this.elements.root,this._diffModel,this._editors,this._options,this._sashLayout,this._boundarySashes):void 0),this._register((0,f.recomputeInitiallyAndOnChange)(this._layoutInfo)),(0,_.derivedDisposable)(this,z=>new((0,u.readHotReloadableExport)(a.MovedBlocksLinesFeature,z))(this.elements.root,this._diffModel,this._layoutInfo.map($=>$.originalEditor),this._layoutInfo.map($=>$.modifiedEditor),this._editors)).recomputeInitiallyAndOnChange(this._store,z=>{this._movedBlocksLinesPart.set(z,void 0)}),this._register(L.Event.runAndSubscribe(this._editors.modified.onDidChangeCursorPosition,z=>this._handleCursorPositionChange(z,!0))),this._register(L.Event.runAndSubscribe(this._editors.original.onDidChangeCursorPosition,z=>this._handleCursorPositionChange(z,!1)));const U=this._diffModel.map(this,(z,$)=>{if(z)return z.diff.read($)===void 0&&!z.isDiffUpToDate.read($)});this._register((0,f.autorunWithStore)((z,$)=>{if(U.read(z)===!0){const Q=this._editorProgressService.show(!0,1e3);$.add((0,y.toDisposable)(()=>Q.done()))}})),this._register((0,f.autorunWithStore)((z,$)=>{$.add(new((0,u.readHotReloadableExport)(d.RevertButtonsFeature,z))(this._editors,this._diffModel,this._options,this))})),this._register((0,f.autorunWithStore)((z,$)=>{const Q=this._diffModel.read(z);if(Q)for(const ee of[Q.model.original,Q.model.modified])$.add(ee.onWillDispose(le=>{(0,E.onUnexpectedError)(new E.BugIndicatingError("TextModel got disposed before DiffEditorWidget model got reset")),this.setModel(null)}))})),this._register((0,f.autorun)(z=>{this._options.setModel(this._diffModel.read(z))}))}_createInnerEditor(H,K,G,Y){return H.createInstance(s.CodeEditorWidget,K,G,Y)}_createDiffEditorContributions(){const H=C.EditorExtensionsRegistry.getDiffEditorContributions();for(const K of H)try{this._register(this._instantiationService.createInstance(K.ctor,this))}catch(G){(0,E.onUnexpectedError)(G)}}get _targetEditor(){return this._editors.modified}getEditorType(){return S.EditorType.IDiffEditor}layout(H){this._rootSizeObserver.observe(H)}hasTextFocus(){return this._editors.original.hasTextFocus()||this._editors.modified.hasTextFocus()}saveViewState(){const H=this._editors.original.saveViewState(),K=this._editors.modified.saveViewState();return{original:H,modified:K,modelState:this._diffModel.get()?.serializeState()}}restoreViewState(H){if(H&&H.original&&H.modified){const K=H;this._editors.original.restoreViewState(K.original),this._editors.modified.restoreViewState(K.modified),K.modelState&&this._diffModel.get()?.restoreSerializedState(K.modelState)}}handleInitialized(){this._editors.original.handleInitialized(),this._editors.modified.handleInitialized()}createViewModel(H){return this._instantiationService.createInstance(F.DiffEditorViewModel,H,this._options)}getModel(){return this._diffModel.get()?.model??null}setModel(H){const K=H?"model"in H?m.RefCounted.create(H).createNewRef(this):m.RefCounted.create(this.createViewModel(H),this):null;this.setDiffModel(K)}setDiffModel(H,K){const G=this._diffModel.get();!H&&G&&this._accessibleDiffViewer.get().close(),this._diffModel.get()!==H?.object&&(0,f.subtransaction)(K,Y=>{const X=H?.object;f.observableFromEvent.batchEventsGlobally(Y,()=>{this._editors.original.setModel(X?X.model.original:null),this._editors.modified.setModel(X?X.model.modified:null)});const Z=this._diffModelSrc.get()?.createNewRef(this);this._diffModelSrc.set(H?.createNewRef(this),Y),setTimeout(()=>{Z?.dispose()},0)})}updateOptions(H){this._options.updateOptions(H)}getContainerDomNode(){return this._domElement}getOriginalEditor(){return this._editors.original}getModifiedEditor(){return this._editors.modified}getLineChanges(){const H=this._diffModel.get()?.diff.get();return H?V(H):null}revert(H){const K=this._diffModel.get();!K||!K.isDiffUpToDate.get()||this._editors.modified.executeEdits("diffEditor",[{range:H.modified.toExclusiveRange(),text:K.model.original.getValueInRange(H.original.toExclusiveRange())}])}revertRangeMappings(H){const K=this._diffModel.get();if(!K||!K.isDiffUpToDate.get())return;const G=H.map(Y=>({range:Y.modifiedRange,text:K.model.original.getValueInRange(Y.originalRange)}));this._editors.modified.executeEdits("diffEditor",G)}_goTo(H){this._editors.modified.setPosition(new v.Position(H.lineRangeMapping.modified.startLineNumber,1)),this._editors.modified.revealRangeInCenter(H.lineRangeMapping.modified.toExclusiveRange())}goToDiff(H){const K=this._diffModel.get()?.diff.get()?.mappings;if(!K||K.length===0)return;const G=this._editors.modified.getPosition().lineNumber;let Y;H==="next"?Y=K.find(X=>X.lineRangeMapping.modified.startLineNumber>G)??K[0]:Y=(0,k.findLast)(K,X=>X.lineRangeMapping.modified.startLineNumber<G)??K[K.length-1],this._goTo(Y),Y.lineRangeMapping.modified.isEmpty?this._accessibilitySignalService.playSignal(I.AccessibilitySignal.diffLineDeleted,{source:"diffEditor.goToDiff"}):Y.lineRangeMapping.original.isEmpty?this._accessibilitySignalService.playSignal(I.AccessibilitySignal.diffLineInserted,{source:"diffEditor.goToDiff"}):Y&&this._accessibilitySignalService.playSignal(I.AccessibilitySignal.diffLineModified,{source:"diffEditor.goToDiff"})}revealFirstDiff(){const H=this._diffModel.get();H&&this.waitForDiff().then(()=>{const K=H.diff.get()?.mappings;!K||K.length===0||this._goTo(K[0])})}accessibleDiffViewerNext(){this._accessibleDiffViewer.get().next()}accessibleDiffViewerPrev(){this._accessibleDiffViewer.get().prev()}async waitForDiff(){const H=this._diffModel.get();H&&await H.waitForDiff()}mapToOtherSide(){const H=this._editors.modified.hasWidgetFocus(),K=H?this._editors.modified:this._editors.original,G=H?this._editors.original:this._editors.modified;let Y;const X=K.getSelection();if(X){const Z=this._diffModel.get()?.diff.get()?.mappings.map(j=>H?j.lineRangeMapping.flip():j.lineRangeMapping);if(Z){const j=(0,m.translatePosition)(X.getStartPosition(),Z),P=(0,m.translatePosition)(X.getEndPosition(),Z);Y=w.Range.plusRange(j,P)}}return{destination:G,destinationSelection:Y}}switchSide(){const{destination:H,destinationSelection:K}=this.mapToOtherSide();H.focus(),K&&H.setSelection(K)}exitCompareMove(){const H=this._diffModel.get();H&&H.movedTextToCompare.set(void 0,void 0)}collapseAllUnchangedRegions(){const H=this._diffModel.get()?.unchangedRegions.get();H&&(0,f.transaction)(K=>{for(const G of H)G.collapseAll(K)})}showAllUnchangedRegions(){const H=this._diffModel.get()?.unchangedRegions.get();H&&(0,f.transaction)(K=>{for(const G of H)G.showAll(K)})}_handleCursorPositionChange(H,K){if(H?.reason===3){const G=this._diffModel.get()?.diff.get()?.mappings.find(Y=>K?Y.lineRangeMapping.modified.contains(H.position.lineNumber):Y.lineRangeMapping.original.contains(H.position.lineNumber));G?.lineRangeMapping.modified.isEmpty?this._accessibilitySignalService.playSignal(I.AccessibilitySignal.diffLineDeleted,{source:"diffEditor.cursorPositionChanged"}):G?.lineRangeMapping.original.isEmpty?this._accessibilitySignalService.playSignal(I.AccessibilitySignal.diffLineInserted,{source:"diffEditor.cursorPositionChanged"}):G&&this._accessibilitySignalService.playSignal(I.AccessibilitySignal.diffLineModified,{source:"diffEditor.cursorPositionChanged"})}}};e.DiffEditorWidget=W,e.DiffEditorWidget=W=De([he(3,T.IContextKeyService),he(4,M.IInstantiationService),he(5,p.ICodeEditorService),he(6,I.IAccessibilitySignalService),he(7,R.IEditorProgressService)],W);function V(q){return q.mappings.map(H=>{const K=H.lineRangeMapping;let G,Y,X,Z,j=K.innerChanges;return K.original.isEmpty?(G=K.original.startLineNumber-1,Y=0,j=void 0):(G=K.original.startLineNumber,Y=K.original.endLineNumberExclusive-1),K.modified.isEmpty?(X=K.modified.startLineNumber-1,Z=0,j=void 0):(X=K.modified.startLineNumber,Z=K.modified.endLineNumberExclusive-1),{originalStartLineNumber:G,originalEndLineNumber:Y,modifiedStartLineNumber:X,modifiedEndLineNumber:Z,charChanges:j?.map(P=>({originalStartLineNumber:P.originalRange.startLineNumber,originalStartColumn:P.originalRange.startColumn,originalEndLineNumber:P.originalRange.endLineNumber,originalEndColumn:P.originalRange.endColumn,modifiedStartLineNumber:P.modifiedRange.startLineNumber,modifiedStartColumn:P.modifiedRange.startColumn,modifiedEndLineNumber:P.modifiedRange.endLineNumber,modifiedEndColumn:P.modifiedRange.endColumn}))}})}}),define(oe[802],re([1,0,5,26,15,35,284,20,3,29,27,12,138]),function(ae,e,c,k,E,L,y,f,_,C,p,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AccessibleDiffViewerPrev=e.AccessibleDiffViewerNext=e.RevertHunkOrSelection=e.ShowAllUnchangedRegions=e.CollapseAllUnchangedRegions=e.ExitCompareMove=e.SwitchSide=e.ToggleUseInlineViewWhenSpaceIsLimited=e.ToggleShowMovedCodeBlocks=e.ToggleCollapseUnchangedRegions=void 0,e.findDiffEditor=b,e.findFocusedDiffEditor=v;class s extends C.Action2{constructor(){super({id:"diffEditor.toggleCollapseUnchangedRegions",title:(0,_.localize2)(998,"Toggle Collapse Unchanged Regions"),icon:k.Codicon.map,toggled:n.ContextKeyExpr.has("config.diffEditor.hideUnchangedRegions.enabled"),precondition:n.ContextKeyExpr.has("isInDiffEditor"),menu:{when:n.ContextKeyExpr.has("isInDiffEditor"),id:C.MenuId.EditorTitle,order:22,group:"navigation"}})}run(D,...I){const T=D.get(p.IConfigurationService),M=!T.getValue("diffEditor.hideUnchangedRegions.enabled");T.updateValue("diffEditor.hideUnchangedRegions.enabled",M)}}e.ToggleCollapseUnchangedRegions=s;class t extends C.Action2{constructor(){super({id:"diffEditor.toggleShowMovedCodeBlocks",title:(0,_.localize2)(999,"Toggle Show Moved Code Blocks"),precondition:n.ContextKeyExpr.has("isInDiffEditor")})}run(D,...I){const T=D.get(p.IConfigurationService),M=!T.getValue("diffEditor.experimental.showMoves");T.updateValue("diffEditor.experimental.showMoves",M)}}e.ToggleShowMovedCodeBlocks=t;class i extends C.Action2{constructor(){super({id:"diffEditor.toggleUseInlineViewWhenSpaceIsLimited",title:(0,_.localize2)(1e3,"Toggle Use Inline View When Space Is Limited"),precondition:n.ContextKeyExpr.has("isInDiffEditor")})}run(D,...I){const T=D.get(p.IConfigurationService),M=!T.getValue("diffEditor.useInlineViewWhenSpaceIsLimited");T.updateValue("diffEditor.useInlineViewWhenSpaceIsLimited",M)}}e.ToggleUseInlineViewWhenSpaceIsLimited=i;const o=(0,_.localize2)(1001,"Diff Editor");class g extends E.EditorAction2{constructor(){super({id:"diffEditor.switchSide",title:(0,_.localize2)(1002,"Switch Side"),icon:k.Codicon.arrowSwap,precondition:n.ContextKeyExpr.has("isInDiffEditor"),f1:!0,category:o})}runEditorCommand(D,I,T){const M=v(D);if(M instanceof y.DiffEditorWidget){if(T&&T.dryRun)return{destinationSelection:M.mapToOtherSide().destinationSelection};M.switchSide()}}}e.SwitchSide=g;class h extends E.EditorAction2{constructor(){super({id:"diffEditor.exitCompareMove",title:(0,_.localize2)(1003,"Exit Compare Move"),icon:k.Codicon.close,precondition:f.EditorContextKeys.comparingMovedCode,f1:!1,category:o,keybinding:{weight:1e4,primary:9}})}runEditorCommand(D,I,...T){const M=v(D);M instanceof y.DiffEditorWidget&&M.exitCompareMove()}}e.ExitCompareMove=h;class l extends E.EditorAction2{constructor(){super({id:"diffEditor.collapseAllUnchangedRegions",title:(0,_.localize2)(1004,"Collapse All Unchanged Regions"),icon:k.Codicon.fold,precondition:n.ContextKeyExpr.has("isInDiffEditor"),f1:!0,category:o})}runEditorCommand(D,I,...T){const M=v(D);M instanceof y.DiffEditorWidget&&M.collapseAllUnchangedRegions()}}e.CollapseAllUnchangedRegions=l;class a extends E.EditorAction2{constructor(){super({id:"diffEditor.showAllUnchangedRegions",title:(0,_.localize2)(1005,"Show All Unchanged Regions"),icon:k.Codicon.unfold,precondition:n.ContextKeyExpr.has("isInDiffEditor"),f1:!0,category:o})}runEditorCommand(D,I,...T){const M=v(D);M instanceof y.DiffEditorWidget&&M.showAllUnchangedRegions()}}e.ShowAllUnchangedRegions=a;class r extends C.Action2{constructor(){super({id:"diffEditor.revert",title:(0,_.localize2)(1006,"Revert"),f1:!1,category:o})}run(D,I){const T=b(D,I.originalUri,I.modifiedUri);T instanceof y.DiffEditorWidget&&T.revertRangeMappings(I.mapping.innerChanges??[])}}e.RevertHunkOrSelection=r;const d=(0,_.localize2)(1007,"Accessible Diff Viewer");class m extends C.Action2{static{this.id="editor.action.accessibleDiffViewer.next"}constructor(){super({id:m.id,title:(0,_.localize2)(1008,"Go to Next Difference"),category:d,precondition:n.ContextKeyExpr.has("isInDiffEditor"),keybinding:{primary:65,weight:100},f1:!0})}run(D){v(D)?.accessibleDiffViewerNext()}}e.AccessibleDiffViewerNext=m;class u extends C.Action2{static{this.id="editor.action.accessibleDiffViewer.prev"}constructor(){super({id:u.id,title:(0,_.localize2)(1009,"Go to Previous Difference"),category:d,precondition:n.ContextKeyExpr.has("isInDiffEditor"),keybinding:{primary:1089,weight:100},f1:!0})}run(D){v(D)?.accessibleDiffViewerPrev()}}e.AccessibleDiffViewerPrev=u;function b(S,D,I){return S.get(L.ICodeEditorService).listDiffEditors().find(A=>{const R=A.getModifiedEditor(),N=A.getOriginalEditor();return R&&R.getModel()?.uri.toString()===I.toString()&&N&&N.getModel()?.uri.toString()===D.toString()})||null}function v(S){const I=S.get(L.ICodeEditorService).listDiffEditors(),T=(0,c.getActiveElement)();if(T)for(const M of I){const A=M.getContainerDomNode();if(w(A,T))return M}return null}function w(S,D){let I=D;for(;I;){if(I===S)return!0;I=I.parentElement}return!1}}),define(oe[803],re([1,0,26,802,20,3,29,24,12,138]),function(ae,e,c,k,E,L,y,f,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),(0,y.registerAction2)(k.ToggleCollapseUnchangedRegions),(0,y.registerAction2)(k.ToggleShowMovedCodeBlocks),(0,y.registerAction2)(k.ToggleUseInlineViewWhenSpaceIsLimited),y.MenuRegistry.appendMenuItem(y.MenuId.EditorTitle,{command:{id:new k.ToggleUseInlineViewWhenSpaceIsLimited().desc.id,title:(0,L.localize)(993,"Use Inline View When Space Is Limited"),toggled:_.ContextKeyExpr.has("config.diffEditor.useInlineViewWhenSpaceIsLimited"),precondition:_.ContextKeyExpr.has("isInDiffEditor")},order:11,group:"1_diff",when:_.ContextKeyExpr.and(E.EditorContextKeys.diffEditorRenderSideBySideInlineBreakpointReached,_.ContextKeyExpr.has("isInDiffEditor"))}),y.MenuRegistry.appendMenuItem(y.MenuId.EditorTitle,{command:{id:new k.ToggleShowMovedCodeBlocks().desc.id,title:(0,L.localize)(994,"Show Moved Code Blocks"),icon:c.Codicon.move,toggled:_.ContextKeyEqualsExpr.create("config.diffEditor.experimental.showMoves",!0),precondition:_.ContextKeyExpr.has("isInDiffEditor")},order:10,group:"1_diff",when:_.ContextKeyExpr.has("isInDiffEditor")}),(0,y.registerAction2)(k.RevertHunkOrSelection);for(const C of[{icon:c.Codicon.arrowRight,key:E.EditorContextKeys.diffEditorInlineMode.toNegated()},{icon:c.Codicon.discard,key:E.EditorContextKeys.diffEditorInlineMode}])y.MenuRegistry.appendMenuItem(y.MenuId.DiffEditorHunkToolbar,{command:{id:new k.RevertHunkOrSelection().desc.id,title:(0,L.localize)(995,"Revert Block"),icon:C.icon},when:_.ContextKeyExpr.and(E.EditorContextKeys.diffEditorModifiedWritable,C.key),order:5,group:"primary"}),y.MenuRegistry.appendMenuItem(y.MenuId.DiffEditorSelectionToolbar,{command:{id:new k.RevertHunkOrSelection().desc.id,title:(0,L.localize)(996,"Revert Selection"),icon:C.icon},when:_.ContextKeyExpr.and(E.EditorContextKeys.diffEditorModifiedWritable,C.key),order:5,group:"primary"});(0,y.registerAction2)(k.SwitchSide),(0,y.registerAction2)(k.ExitCompareMove),(0,y.registerAction2)(k.CollapseAllUnchangedRegions),(0,y.registerAction2)(k.ShowAllUnchangedRegions),y.MenuRegistry.appendMenuItem(y.MenuId.EditorTitle,{command:{id:k.AccessibleDiffViewerNext.id,title:(0,L.localize)(997,"Open Accessible Diff Viewer"),precondition:_.ContextKeyExpr.has("isInDiffEditor")},order:10,group:"2_diff",when:_.ContextKeyExpr.and(E.EditorContextKeys.accessibleDiffViewerVisible.negate(),_.ContextKeyExpr.has("isInDiffEditor"))}),f.CommandsRegistry.registerCommandAlias("editor.action.diffReview.next",k.AccessibleDiffViewerNext.id),(0,y.registerAction2)(k.AccessibleDiffViewerNext),f.CommandsRegistry.registerCommandAlias("editor.action.diffReview.prev",k.AccessibleDiffViewerPrev.id),(0,y.registerAction2)(k.AccessibleDiffViewerPrev)}),define(oe[415],re([1,0,5,231,26,2,21,91,129,284,123,216,29,7,369]),function(ae,e,c,k,E,L,y,f,_,C,p,n,s,t,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DiffEditorItemTemplate=e.TemplateData=void 0;class o{constructor(l,a){this.viewModel=l,this.deltaScrollVertical=a}getId(){return this.viewModel}}e.TemplateData=o;let g=class extends L.Disposable{constructor(l,a,r,d){super(),this._container=l,this._overflowWidgetsDomNode=a,this._workbenchUIElementFactory=r,this._instantiationService=d,this._viewModel=(0,f.observableValue)(this,void 0),this._collapsed=(0,y.derived)(this,u=>this._viewModel.read(u)?.collapsed.read(u)),this._editorContentHeight=(0,f.observableValue)(this,500),this.contentHeight=(0,y.derived)(this,u=>(this._collapsed.read(u)?0:this._editorContentHeight.read(u))+this._outerEditorHeight),this._modifiedContentWidth=(0,f.observableValue)(this,0),this._modifiedWidth=(0,f.observableValue)(this,0),this._originalContentWidth=(0,f.observableValue)(this,0),this._originalWidth=(0,f.observableValue)(this,0),this.maxScroll=(0,y.derived)(this,u=>{const b=this._modifiedContentWidth.read(u)-this._modifiedWidth.read(u),v=this._originalContentWidth.read(u)-this._originalWidth.read(u);return b>v?{maxScroll:b,width:this._modifiedWidth.read(u)}:{maxScroll:v,width:this._originalWidth.read(u)}}),this._elements=(0,c.h)("div.multiDiffEntry",[(0,c.h)("div.header@header",[(0,c.h)("div.header-content",[(0,c.h)("div.collapse-button@collapseButton"),(0,c.h)("div.file-path",[(0,c.h)("div.title.modified.show-file-icons@primaryPath",[]),(0,c.h)("div.status.deleted@status",["R"]),(0,c.h)("div.title.original.show-file-icons@secondaryPath",[])]),(0,c.h)("div.actions@actions")])]),(0,c.h)("div.editorParent",[(0,c.h)("div.editorContainer@editor")])]),this.editor=this._register(this._instantiationService.createInstance(C.DiffEditorWidget,this._elements.editor,{overflowWidgetsDomNode:this._overflowWidgetsDomNode},{})),this.isModifedFocused=(0,_.observableCodeEditor)(this.editor.getModifiedEditor()).isFocused,this.isOriginalFocused=(0,_.observableCodeEditor)(this.editor.getOriginalEditor()).isFocused,this.isFocused=(0,y.derived)(this,u=>this.isModifedFocused.read(u)||this.isOriginalFocused.read(u)),this._resourceLabel=this._workbenchUIElementFactory.createResourceLabel?this._register(this._workbenchUIElementFactory.createResourceLabel(this._elements.primaryPath)):void 0,this._resourceLabel2=this._workbenchUIElementFactory.createResourceLabel?this._register(this._workbenchUIElementFactory.createResourceLabel(this._elements.secondaryPath)):void 0,this._dataStore=new L.DisposableStore,this._headerHeight=40,this._lastScrollTop=-1,this._isSettingScrollTop=!1;const m=new k.Button(this._elements.collapseButton,{});this._register((0,y.autorun)(u=>{m.element.className="",m.icon=this._collapsed.read(u)?E.Codicon.chevronRight:E.Codicon.chevronDown})),this._register(m.onDidClick(()=>{this._viewModel.get()?.collapsed.set(!this._collapsed.get(),void 0)})),this._register((0,y.autorun)(u=>{this._elements.editor.style.display=this._collapsed.read(u)?"none":"block"})),this._register(this.editor.getModifiedEditor().onDidLayoutChange(u=>{const b=this.editor.getModifiedEditor().getLayoutInfo().contentWidth;this._modifiedWidth.set(b,void 0)})),this._register(this.editor.getOriginalEditor().onDidLayoutChange(u=>{const b=this.editor.getOriginalEditor().getLayoutInfo().contentWidth;this._originalWidth.set(b,void 0)})),this._register(this.editor.onDidContentSizeChange(u=>{(0,f.globalTransaction)(b=>{this._editorContentHeight.set(u.contentHeight,b),this._modifiedContentWidth.set(this.editor.getModifiedEditor().getContentWidth(),b),this._originalContentWidth.set(this.editor.getOriginalEditor().getContentWidth(),b)})})),this._register(this.editor.getOriginalEditor().onDidScrollChange(u=>{if(this._isSettingScrollTop||!u.scrollTopChanged||!this._data)return;const b=u.scrollTop-this._lastScrollTop;this._data.deltaScrollVertical(b)})),this._register((0,y.autorun)(u=>{const b=this._viewModel.read(u)?.isActive.read(u);this._elements.root.classList.toggle("active",b)})),this._container.appendChild(this._elements.root),this._outerEditorHeight=this._headerHeight,this._register(this._instantiationService.createInstance(n.MenuWorkbenchToolBar,this._elements.actions,s.MenuId.MultiDiffEditorFileToolbar,{actionRunner:this._register(new i.ActionRunnerWithContext(()=>this._viewModel.get()?.modifiedUri)),menuOptions:{shouldForwardArgs:!0},toolbarOptions:{primaryGroup:u=>u.startsWith("navigation")},actionViewItemProvider:(u,b)=>(0,p.createActionViewItem)(d,u,b)}))}setScrollLeft(l){this._modifiedContentWidth.get()-this._modifiedWidth.get()>this._originalContentWidth.get()-this._originalWidth.get()?this.editor.getModifiedEditor().setScrollLeft(l):this.editor.getOriginalEditor().setScrollLeft(l)}setData(l){this._data=l;function a(d){return{...d,scrollBeyondLastLine:!1,hideUnchangedRegions:{enabled:!0},scrollbar:{vertical:"hidden",horizontal:"hidden",handleMouseWheel:!1,useShadows:!1},renderOverviewRuler:!1,fixedOverflowWidgets:!0,overviewRulerBorder:!1}}if(!l){(0,f.globalTransaction)(d=>{this._viewModel.set(void 0,d),this.editor.setDiffModel(null,d),this._dataStore.clear()});return}const r=l.viewModel.documentDiffItem;(0,f.globalTransaction)(d=>{this._resourceLabel?.setUri(l.viewModel.modifiedUri??l.viewModel.originalUri,{strikethrough:l.viewModel.modifiedUri===void 0});let m=!1,u=!1,b=!1,v="";l.viewModel.modifiedUri&&l.viewModel.originalUri&&l.viewModel.modifiedUri.path!==l.viewModel.originalUri.path?(v="R",m=!0):l.viewModel.modifiedUri?l.viewModel.originalUri||(v="A",b=!0):(v="D",u=!0),this._elements.status.classList.toggle("renamed",m),this._elements.status.classList.toggle("deleted",u),this._elements.status.classList.toggle("added",b),this._elements.status.innerText=v,this._resourceLabel2?.setUri(m?l.viewModel.originalUri:void 0,{strikethrough:!0}),this._dataStore.clear(),this._viewModel.set(l.viewModel,d),this.editor.setDiffModel(l.viewModel.diffEditorViewModelRef,d),this.editor.updateOptions(a(r.options??{}))}),r.onOptionsDidChange&&this._dataStore.add(r.onOptionsDidChange(()=>{this.editor.updateOptions(a(r.options??{}))})),l.viewModel.isAlive.recomputeInitiallyAndOnChange(this._dataStore,d=>{d||this.setData(void 0)})}render(l,a,r,d){this._elements.root.style.visibility="visible",this._elements.root.style.top=`${l.start}px`,this._elements.root.style.height=`${l.length}px`,this._elements.root.style.width=`${a}px`,this._elements.root.style.position="absolute";const m=l.length-this._headerHeight,u=Math.max(0,Math.min(d.start-l.start,m));this._elements.header.style.transform=`translateY(${u}px)`,(0,f.globalTransaction)(b=>{this.editor.layout({width:a-2*8-2*1,height:l.length-this._outerEditorHeight})});try{this._isSettingScrollTop=!0,this._lastScrollTop=r,this.editor.getOriginalEditor().setScrollTop(r)}finally{this._isSettingScrollTop=!1}this._elements.header.classList.toggle("shadow",u>0||r>0),this._elements.header.classList.toggle("collapsed",u===m)}hide(){this._elements.root.style.top="-100000px",this._elements.root.style.visibility="hidden"}};e.DiffEditorItemTemplate=g,e.DiffEditorItemTemplate=g=De([he(3,t.IInstantiationService)],g)}),define(oe[804],re([1,0,5,84,13,67,8,2,21,91,162,85,69,23,20,12,7,180,415,563,3,511]),function(ae,e,c,k,E,L,y,f,_,C,p,n,s,t,i,o,g,h,l,a,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MultiDiffEditorWidgetImpl=void 0;let d=class extends f.Disposable{constructor(b,v,w,S,D,I){super(),this._element=b,this._dimension=v,this._viewModel=w,this._workbenchUIElementFactory=S,this._parentContextKeyService=D,this._parentInstantiationService=I,this._scrollableElements=(0,c.h)("div.scrollContent",[(0,c.h)("div@content",{style:{overflow:"hidden"}}),(0,c.h)("div.monaco-editor@overflowWidgetsDomNode",{})]),this._scrollable=this._register(new p.Scrollable({forceIntegerValues:!1,scheduleAtNextAnimationFrame:M=>(0,c.scheduleAtNextAnimationFrame)((0,c.getWindow)(this._element),M),smoothScrollDuration:100})),this._scrollableElement=this._register(new k.SmoothScrollableElement(this._scrollableElements.root,{vertical:1,horizontal:1,useShadows:!1},this._scrollable)),this._elements=(0,c.h)("div.monaco-component.multiDiffEditor",{},[(0,c.h)("div",{},[this._scrollableElement.getDomNode()]),(0,c.h)("div.placeholder@placeholder",{},[(0,c.h)("div",[(0,r.localize)(984,"No Changed Files")])])]),this._sizeObserver=this._register(new n.ObservableElementSizeObserver(this._element,void 0)),this._objectPool=this._register(new a.ObjectPool(M=>{const A=this._instantiationService.createInstance(l.DiffEditorItemTemplate,this._scrollableElements.content,this._scrollableElements.overflowWidgetsDomNode,this._workbenchUIElementFactory);return A.setData(M),A})),this.scrollTop=(0,_.observableFromEvent)(this,this._scrollableElement.onScroll,()=>this._scrollableElement.getScrollPosition().scrollTop),this.scrollLeft=(0,_.observableFromEvent)(this,this._scrollableElement.onScroll,()=>this._scrollableElement.getScrollPosition().scrollLeft),this._viewItemsInfo=(0,_.derivedWithStore)(this,(M,A)=>{const R=this._viewModel.read(M);if(!R)return{items:[],getItem:F=>{throw new y.BugIndicatingError}};const N=R.items.read(M),O=new Map;return{items:N.map(F=>{const W=A.add(new m(F,this._objectPool,this.scrollLeft,q=>{this._scrollableElement.setScrollPosition({scrollTop:this._scrollableElement.getScrollPosition().scrollTop+q})})),V=this._lastDocStates?.[W.getKey()];return V&&(0,C.transaction)(q=>{W.setViewState(V,q)}),O.set(F,W),W}),getItem:F=>O.get(F)}}),this._viewItems=this._viewItemsInfo.map(this,M=>M.items),this._spaceBetweenPx=0,this._totalHeight=this._viewItems.map(this,(M,A)=>M.reduce((R,N)=>R+N.contentHeight.read(A)+this._spaceBetweenPx,0)),this._contextKeyService=this._register(this._parentContextKeyService.createScoped(this._element)),this._instantiationService=this._register(this._parentInstantiationService.createChild(new h.ServiceCollection([o.IContextKeyService,this._contextKeyService]))),this._lastDocStates={},this._contextKeyService.createKey(i.EditorContextKeys.inMultiDiffEditor.key,!0),this._register((0,_.autorunWithStore)((M,A)=>{const R=this._viewModel.read(M);if(R&&R.contextKeys)for(const[N,O]of Object.entries(R.contextKeys)){const x=this._contextKeyService.createKey(N,void 0);x.set(O),A.add((0,f.toDisposable)(()=>x.reset()))}}));const T=this._parentContextKeyService.createKey(i.EditorContextKeys.multiDiffEditorAllCollapsed.key,!1);this._register((0,_.autorun)(M=>{const A=this._viewModel.read(M);if(A){const R=A.items.read(M).every(N=>N.collapsed.read(M));T.set(R)}})),this._register((0,_.autorun)(M=>{const A=this._dimension.read(M);this._sizeObserver.observe(A)})),this._register((0,_.autorun)(M=>{const A=this._viewItems.read(M);this._elements.placeholder.classList.toggle("visible",A.length===0)})),this._scrollableElements.content.style.position="relative",this._register((0,_.autorun)(M=>{const A=this._sizeObserver.height.read(M);this._scrollableElements.root.style.height=`${A}px`;const R=this._totalHeight.read(M);this._scrollableElements.content.style.height=`${R}px`;const N=this._sizeObserver.width.read(M);let O=N;const x=this._viewItems.read(M),F=(0,L.findFirstMax)(x,(0,E.compareBy)(W=>W.maxScroll.read(M).maxScroll,E.numberComparator));if(F){const W=F.maxScroll.read(M);O=N+W.maxScroll}this._scrollableElement.setScrollDimensions({width:N,height:A,scrollHeight:R,scrollWidth:O})})),b.replaceChildren(this._elements.root),this._register((0,f.toDisposable)(()=>{b.replaceChildren()})),this._register(this._register((0,_.autorun)(M=>{(0,C.globalTransaction)(A=>{this.render(M)})})))}render(b){const v=this.scrollTop.read(b);let w=0,S=0,D=0;const I=this._sizeObserver.height.read(b),T=s.OffsetRange.ofStartAndLength(v,I),M=this._sizeObserver.width.read(b);for(const A of this._viewItems.read(b)){const R=A.contentHeight.read(b),N=Math.min(R,I),O=s.OffsetRange.ofStartAndLength(S,N),x=s.OffsetRange.ofStartAndLength(D,R);if(x.isBefore(T))w-=R-N,A.hide();else if(x.isAfter(T))A.hide();else{const F=Math.max(0,Math.min(T.start-x.start,R-N));w-=F;const W=s.OffsetRange.ofStartAndLength(v+w,I);A.render(O,F,M,W)}S+=N+this._spaceBetweenPx,D+=R+this._spaceBetweenPx}this._scrollableElements.content.style.transform=`translateY(${-(v+w)}px)`}};e.MultiDiffEditorWidgetImpl=d,e.MultiDiffEditorWidgetImpl=d=De([he(4,o.IContextKeyService),he(5,g.IInstantiationService)],d);class m extends f.Disposable{constructor(b,v,w,S){super(),this.viewModel=b,this._objectPool=v,this._scrollLeft=w,this._deltaScrollVertical=S,this._templateRef=this._register((0,C.disposableObservableValue)(this,void 0)),this.contentHeight=(0,_.derived)(this,D=>this._templateRef.read(D)?.object.contentHeight?.read(D)??this.viewModel.lastTemplateData.read(D).contentHeight),this.maxScroll=(0,_.derived)(this,D=>this._templateRef.read(D)?.object.maxScroll.read(D)??{maxScroll:0,scrollWidth:0}),this.template=(0,_.derived)(this,D=>this._templateRef.read(D)?.object),this._isHidden=(0,_.observableValue)(this,!1),this._isFocused=(0,_.derived)(this,D=>this.template.read(D)?.isFocused.read(D)??!1),this.viewModel.setIsFocused(this._isFocused,void 0),this._register((0,_.autorun)(D=>{const I=this._scrollLeft.read(D);this._templateRef.read(D)?.object.setScrollLeft(I)})),this._register((0,_.autorun)(D=>{const I=this._templateRef.read(D);!I||!this._isHidden.read(D)||I.object.isFocused.read(D)||this._clear()}))}dispose(){this._clear(),super.dispose()}toString(){return`VirtualViewItem(${this.viewModel.documentDiffItem.modified?.uri.toString()})`}getKey(){return this.viewModel.getKey()}setViewState(b,v){this.viewModel.collapsed.set(b.collapsed,v),this._updateTemplateData(v);const w=this.viewModel.lastTemplateData.get(),S=b.selections?.map(t.Selection.liftSelection);this.viewModel.lastTemplateData.set({...w,selections:S},v);const D=this._templateRef.get();D&&S&&D.object.editor.setSelections(S)}_updateTemplateData(b){const v=this._templateRef.get();v&&this.viewModel.lastTemplateData.set({contentHeight:v.object.contentHeight.get(),selections:v.object.editor.getSelections()??void 0},b)}_clear(){const b=this._templateRef.get();b&&(0,C.transaction)(v=>{this._updateTemplateData(v),b.object.hide(),this._templateRef.set(void 0,v)})}hide(){this._isHidden.set(!0,void 0)}render(b,v,w,S){this._isHidden.set(!1,void 0);let D=this._templateRef.get();if(!D){D=this._objectPool.getUnusedObj(new l.TemplateData(this.viewModel,this._deltaScrollVertical)),this._templateRef.set(D,void 0);const I=this.viewModel.lastTemplateData.get().selections;I&&D.object.editor.setSelections(I)}D.object.render(b,w,v,S)}}}),define(oe[805],re([1,0,2,21,161,804,7,415,747]),function(ae,e,c,k,E,L,y,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MultiDiffEditorWidget=void 0;let _=class extends c.Disposable{constructor(p,n,s){super(),this._element=p,this._workbenchUIElementFactory=n,this._instantiationService=s,this._dimension=(0,k.observableValue)(this,void 0),this._viewModel=(0,k.observableValue)(this,void 0),this._widgetImpl=(0,k.derivedWithStore)(this,(t,i)=>((0,E.readHotReloadableExport)(f.DiffEditorItemTemplate,t),i.add(this._instantiationService.createInstance((0,E.readHotReloadableExport)(L.MultiDiffEditorWidgetImpl,t),this._element,this._dimension,this._viewModel,this._workbenchUIElementFactory)))),this._register((0,k.recomputeInitiallyAndOnChange)(this._widgetImpl))}};e.MultiDiffEditorWidget=_,e.MultiDiffEditorWidget=_=De([he(2,y.IInstantiationService)],_)}),define(oe[806],re([1,0,14,2,15,9,4,23,20,40,36,3,29,32,25,513]),function(ae,e,c,k,E,L,y,f,_,C,p,n,s,t,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BracketMatchingController=void 0;const o=(0,t.registerColor)("editorOverviewRuler.bracketMatchForeground","#A0A0A0",n.localize(978,"Overview ruler marker color for matching brackets."));class g extends E.EditorAction{constructor(){super({id:"editor.action.jumpToBracket",label:n.localize(979,"Go to Bracket"),alias:"Go to Bracket",precondition:void 0,kbOpts:{kbExpr:_.EditorContextKeys.editorTextFocus,primary:3165,weight:100}})}run(m,u){r.get(u)?.jumpToBracket()}}class h extends E.EditorAction{constructor(){super({id:"editor.action.selectToBracket",label:n.localize(980,"Select to Bracket"),alias:"Select to Bracket",precondition:void 0,metadata:{description:n.localize2(983,"Select the text inside and including the brackets or curly braces"),args:[{name:"args",schema:{type:"object",properties:{selectBrackets:{type:"boolean",default:!0}}}}]}})}run(m,u,b){let v=!0;b&&b.selectBrackets===!1&&(v=!1),r.get(u)?.selectToBracket(v)}}class l extends E.EditorAction{constructor(){super({id:"editor.action.removeBrackets",label:n.localize(981,"Remove Brackets"),alias:"Remove Brackets",precondition:void 0,kbOpts:{kbExpr:_.EditorContextKeys.editorTextFocus,primary:2561,weight:100}})}run(m,u){r.get(u)?.removeBrackets(this.id)}}class a{constructor(m,u,b){this.position=m,this.brackets=u,this.options=b}}class r extends k.Disposable{static{this.ID="editor.contrib.bracketMatchingController"}static get(m){return m.getContribution(r.ID)}constructor(m){super(),this._editor=m,this._lastBracketsData=[],this._lastVersionId=0,this._decorations=this._editor.createDecorationsCollection(),this._updateBracketsSoon=this._register(new c.RunOnceScheduler(()=>this._updateBrackets(),50)),this._matchBrackets=this._editor.getOption(72),this._updateBracketsSoon.schedule(),this._register(m.onDidChangeCursorPosition(u=>{this._matchBrackets!=="never"&&this._updateBracketsSoon.schedule()})),this._register(m.onDidChangeModelContent(u=>{this._updateBracketsSoon.schedule()})),this._register(m.onDidChangeModel(u=>{this._lastBracketsData=[],this._updateBracketsSoon.schedule()})),this._register(m.onDidChangeModelLanguageConfiguration(u=>{this._lastBracketsData=[],this._updateBracketsSoon.schedule()})),this._register(m.onDidChangeConfiguration(u=>{u.hasChanged(72)&&(this._matchBrackets=this._editor.getOption(72),this._decorations.clear(),this._lastBracketsData=[],this._lastVersionId=0,this._updateBracketsSoon.schedule())})),this._register(m.onDidBlurEditorWidget(()=>{this._updateBracketsSoon.schedule()})),this._register(m.onDidFocusEditorWidget(()=>{this._updateBracketsSoon.schedule()}))}jumpToBracket(){if(!this._editor.hasModel())return;const m=this._editor.getModel(),u=this._editor.getSelections().map(b=>{const v=b.getStartPosition(),w=m.bracketPairs.matchBracket(v);let S=null;if(w)w[0].containsPosition(v)&&!w[1].containsPosition(v)?S=w[1].getStartPosition():w[1].containsPosition(v)&&(S=w[0].getStartPosition());else{const D=m.bracketPairs.findEnclosingBrackets(v);if(D)S=D[1].getStartPosition();else{const I=m.bracketPairs.findNextBracket(v);I&&I.range&&(S=I.range.getStartPosition())}}return S?new f.Selection(S.lineNumber,S.column,S.lineNumber,S.column):new f.Selection(v.lineNumber,v.column,v.lineNumber,v.column)});this._editor.setSelections(u),this._editor.revealRange(u[0])}selectToBracket(m){if(!this._editor.hasModel())return;const u=this._editor.getModel(),b=[];this._editor.getSelections().forEach(v=>{const w=v.getStartPosition();let S=u.bracketPairs.matchBracket(w);if(!S&&(S=u.bracketPairs.findEnclosingBrackets(w),!S)){const T=u.bracketPairs.findNextBracket(w);T&&T.range&&(S=u.bracketPairs.matchBracket(T.range.getStartPosition()))}let D=null,I=null;if(S){S.sort(y.Range.compareRangesUsingStarts);const[T,M]=S;if(D=m?T.getStartPosition():T.getEndPosition(),I=m?M.getEndPosition():M.getStartPosition(),M.containsPosition(w)){const A=D;D=I,I=A}}D&&I&&b.push(new f.Selection(D.lineNumber,D.column,I.lineNumber,I.column))}),b.length>0&&(this._editor.setSelections(b),this._editor.revealRange(b[0]))}removeBrackets(m){if(!this._editor.hasModel())return;const u=this._editor.getModel();this._editor.getSelections().forEach(b=>{const v=b.getPosition();let w=u.bracketPairs.matchBracket(v);w||(w=u.bracketPairs.findEnclosingBrackets(v)),w&&(this._editor.pushUndoStop(),this._editor.executeEdits(m,[{range:w[0],text:""},{range:w[1],text:""}]),this._editor.pushUndoStop())})}static{this._DECORATION_OPTIONS_WITH_OVERVIEW_RULER=p.ModelDecorationOptions.register({description:"bracket-match-overview",stickiness:1,className:"bracket-match",overviewRuler:{color:(0,i.themeColorFromId)(o),position:C.OverviewRulerLane.Center}})}static{this._DECORATION_OPTIONS_WITHOUT_OVERVIEW_RULER=p.ModelDecorationOptions.register({description:"bracket-match-no-overview",stickiness:1,className:"bracket-match"})}_updateBrackets(){if(this._matchBrackets==="never")return;this._recomputeBrackets();const m=[];let u=0;for(const b of this._lastBracketsData){const v=b.brackets;v&&(m[u++]={range:v[0],options:b.options},m[u++]={range:v[1],options:b.options})}this._decorations.set(m)}_recomputeBrackets(){if(!this._editor.hasModel()||!this._editor.hasWidgetFocus()){this._lastBracketsData=[],this._lastVersionId=0;return}const m=this._editor.getSelections();if(m.length>100){this._lastBracketsData=[],this._lastVersionId=0;return}const u=this._editor.getModel(),b=u.getVersionId();let v=[];this._lastVersionId===b&&(v=this._lastBracketsData);const w=[];let S=0;for(let A=0,R=m.length;A<R;A++){const N=m[A];N.isEmpty()&&(w[S++]=N.getStartPosition())}w.length>1&&w.sort(L.Position.compare);const D=[];let I=0,T=0;const M=v.length;for(let A=0,R=w.length;A<R;A++){const N=w[A];for(;T<M&&v[T].position.isBefore(N);)T++;if(T<M&&v[T].position.equals(N))D[I++]=v[T];else{let O=u.bracketPairs.matchBracket(N,20),x=r._DECORATION_OPTIONS_WITH_OVERVIEW_RULER;!O&&this._matchBrackets==="always"&&(O=u.bracketPairs.findEnclosingBrackets(N,20),x=r._DECORATION_OPTIONS_WITHOUT_OVERVIEW_RULER),D[I++]=new a(N,O,x)}}this._lastBracketsData=D,this._lastVersionId=b}}e.BracketMatchingController=r,(0,E.registerEditorContribution)(r.ID,r,1),(0,E.registerEditorAction)(h),(0,E.registerEditorAction)(g),(0,E.registerEditorAction)(l),s.MenuRegistry.appendMenuItem(s.MenuId.MenubarGoMenu,{group:"5_infile_nav",command:{id:"editor.action.jumpToBracket",title:n.localize(982,"Go to &&Bracket")},order:2})}),define(oe[416],re([1,0,5,68,26,6,2,30,40,36,248,155,3,31,71,4,514]),function(ae,e,c,k,E,L,y,f,_,C,p,n,s,t,i,o){"use strict";var g;Object.defineProperty(e,"__esModule",{value:!0}),e.LightBulbWidget=void 0;const h=(0,i.registerIcon)("gutter-lightbulb",E.Codicon.lightBulb,s.localize(901,"Icon which spawns code actions menu from the gutter when there is no space in the editor.")),l=(0,i.registerIcon)("gutter-lightbulb-auto-fix",E.Codicon.lightbulbAutofix,s.localize(902,"Icon which spawns code actions menu from the gutter when there is no space in the editor and a quick fix is available.")),a=(0,i.registerIcon)("gutter-lightbulb-sparkle",E.Codicon.lightbulbSparkle,s.localize(903,"Icon which spawns code actions menu from the gutter when there is no space in the editor and an AI fix is available.")),r=(0,i.registerIcon)("gutter-lightbulb-aifix-auto-fix",E.Codicon.lightbulbSparkleAutofix,s.localize(904,"Icon which spawns code actions menu from the gutter when there is no space in the editor and an AI fix and a quick fix is available.")),d=(0,i.registerIcon)("gutter-lightbulb-sparkle-filled",E.Codicon.sparkleFilled,s.localize(905,"Icon which spawns code actions menu from the gutter when there is no space in the editor and an AI fix and a quick fix is available."));var m;(function(b){b.Hidden={type:0};class v{constructor(S,D,I,T){this.actions=S,this.trigger=D,this.editorPosition=I,this.widgetPosition=T,this.type=1}}b.Showing=v})(m||(m={}));let u=class extends y.Disposable{static{g=this}static{this.GUTTER_DECORATION=C.ModelDecorationOptions.register({description:"codicon-gutter-lightbulb-decoration",glyphMarginClassName:f.ThemeIcon.asClassName(E.Codicon.lightBulb),glyphMargin:{position:_.GlyphMarginLane.Left},stickiness:1})}static{this.ID="editor.contrib.lightbulbWidget"}static{this._posPref=[0]}constructor(v,w){super(),this._editor=v,this._keybindingService=w,this._onClick=this._register(new L.Emitter),this.onClick=this._onClick.event,this._state=m.Hidden,this._gutterState=m.Hidden,this._iconClasses=[],this.gutterDecoration=g.GUTTER_DECORATION,this._domNode=c.$("div.lightBulbWidget"),this._domNode.role="listbox",this._register(k.Gesture.ignoreTarget(this._domNode)),this._editor.addContentWidget(this),this._register(this._editor.onDidChangeModelContent(S=>{const D=this._editor.getModel();(this.state.type!==1||!D||this.state.editorPosition.lineNumber>=D.getLineCount())&&this.hide(),(this.gutterState.type!==1||!D||this.gutterState.editorPosition.lineNumber>=D.getLineCount())&&this.gutterHide()})),this._register(c.addStandardDisposableGenericMouseDownListener(this._domNode,S=>{if(this.state.type!==1)return;this._editor.focus(),S.preventDefault();const{top:D,height:I}=c.getDomNodePagePosition(this._domNode),T=this._editor.getOption(67);let M=Math.floor(T/3);this.state.widgetPosition.position!==null&&this.state.widgetPosition.position.lineNumber<this.state.editorPosition.lineNumber&&(M+=T),this._onClick.fire({x:S.posx,y:D+I+M,actions:this.state.actions,trigger:this.state.trigger})})),this._register(c.addDisposableListener(this._domNode,"mouseenter",S=>{(S.buttons&1)===1&&this.hide()})),this._register(L.Event.runAndSubscribe(this._keybindingService.onDidUpdateKeybindings,()=>{this._preferredKbLabel=this._keybindingService.lookupKeybinding(n.autoFixCommandId)?.getLabel()??void 0,this._quickFixKbLabel=this._keybindingService.lookupKeybinding(n.quickFixCommandId)?.getLabel()??void 0,this._updateLightBulbTitleAndIcon()})),this._register(this._editor.onMouseDown(async S=>{const D=["codicon-"+h.id,"codicon-"+r.id,"codicon-"+l.id,"codicon-"+a.id,"codicon-"+d.id];if(!S.target.element||!D.some(R=>S.target.element&&S.target.element.classList.contains(R))||this.gutterState.type!==1)return;this._editor.focus();const{top:I,height:T}=c.getDomNodePagePosition(S.target.element),M=this._editor.getOption(67);let A=Math.floor(M/3);this.gutterState.widgetPosition.position!==null&&this.gutterState.widgetPosition.position.lineNumber<this.gutterState.editorPosition.lineNumber&&(A+=M),this._onClick.fire({x:S.event.posx,y:I+T+A,actions:this.gutterState.actions,trigger:this.gutterState.trigger})}))}dispose(){super.dispose(),this._editor.removeContentWidget(this),this._gutterDecorationID&&this._removeGutterDecoration(this._gutterDecorationID)}getId(){return"LightBulbWidget"}getDomNode(){return this._domNode}getPosition(){return this._state.type===1?this._state.widgetPosition:null}update(v,w,S){if(v.validActions.length<=0)return this.gutterHide(),this.hide();if(!this._editor.getOptions().get(65).enabled)return this.gutterHide(),this.hide();const I=this._editor.getModel();if(!I)return this.gutterHide(),this.hide();const{lineNumber:T,column:M}=I.validatePosition(S),A=I.getOptions().tabSize,R=this._editor.getOptions().get(50),N=I.getLineContent(T),O=(0,p.computeIndentLevel)(N,A),x=R.spaceWidth*O>22,F=K=>K>2&&this._editor.getTopForLineNumber(K)===this._editor.getTopForLineNumber(K-1);let W=T,V=1;if(!x){const K=G=>{const Y=I.getLineContent(G);return/^\s*$|^\s+/.test(Y)||Y.length<=V};if(T>1&&!F(T-1)){const G=I.getLineCount(),Y=T===G,X=T>1&&K(T-1),Z=!Y&&K(T+1),j=K(T),P=!Z&&!X;let te=!1;const se=this._editor.getLineDecorations(T);if(se)for(const ue of se)ue.options.glyphMarginClassName?.includes(E.Codicon.debugBreakpoint.id)&&(te=!0);if(!Z&&!X&&!te)return this.gutterState=new m.Showing(v,w,S,{position:{lineNumber:W,column:V},preference:g._posPref}),this.renderGutterLightbub(),this.hide();X||Y||P&&!j?W-=1:(Z||P&&j)&&(W+=1)}else{if(T===1&&(T===I.getLineCount()||!K(T+1)&&!K(T)))return this.gutterState=new m.Showing(v,w,S,{position:{lineNumber:W,column:V},preference:g._posPref}),this.renderGutterLightbub(),this.hide();if(T<I.getLineCount()&&!F(T+1))W+=1;else if(M*R.spaceWidth<22)return this.hide()}V=/^\S\s*$/.test(I.getLineContent(W))?2:1}this.state=new m.Showing(v,w,S,{position:{lineNumber:W,column:V},preference:g._posPref}),this._gutterDecorationID&&(this._removeGutterDecoration(this._gutterDecorationID),this.gutterHide());const q=v.validActions,H=v.validActions[0].action.kind;if(q.length!==1||!H){this._editor.layoutContentWidget(this);return}this._editor.layoutContentWidget(this)}hide(){this.state!==m.Hidden&&(this.state=m.Hidden,this._editor.layoutContentWidget(this))}gutterHide(){this.gutterState!==m.Hidden&&(this._gutterDecorationID&&this._removeGutterDecoration(this._gutterDecorationID),this.gutterState=m.Hidden)}get state(){return this._state}set state(v){this._state=v,this._updateLightBulbTitleAndIcon()}get gutterState(){return this._gutterState}set gutterState(v){this._gutterState=v,this._updateGutterLightBulbTitleAndIcon()}_updateLightBulbTitleAndIcon(){if(this._domNode.classList.remove(...this._iconClasses),this._iconClasses=[],this.state.type!==1)return;let v,w=!1;this.state.actions.allAIFixes?(v=E.Codicon.sparkleFilled,this.state.actions.validActions.length===1&&(w=!0)):this.state.actions.hasAutoFix?this.state.actions.hasAIFix?v=E.Codicon.lightbulbSparkleAutofix:v=E.Codicon.lightbulbAutofix:this.state.actions.hasAIFix?v=E.Codicon.lightbulbSparkle:v=E.Codicon.lightBulb,this._updateLightbulbTitle(this.state.actions.hasAutoFix,w),this._iconClasses=f.ThemeIcon.asClassNameArray(v),this._domNode.classList.add(...this._iconClasses)}_updateGutterLightBulbTitleAndIcon(){if(this.gutterState.type!==1)return;let v,w=!1;this.gutterState.actions.allAIFixes?(v=d,this.gutterState.actions.validActions.length===1&&(w=!0)):this.gutterState.actions.hasAutoFix?this.gutterState.actions.hasAIFix?v=r:v=l:this.gutterState.actions.hasAIFix?v=a:v=h,this._updateLightbulbTitle(this.gutterState.actions.hasAutoFix,w);const S=C.ModelDecorationOptions.register({description:"codicon-gutter-lightbulb-decoration",glyphMarginClassName:f.ThemeIcon.asClassName(v),glyphMargin:{position:_.GlyphMarginLane.Left},stickiness:1});this.gutterDecoration=S}renderGutterLightbub(){const v=this._editor.getSelection();v&&(this._gutterDecorationID===void 0?this._addGutterDecoration(v.startLineNumber):this._updateGutterDecoration(this._gutterDecorationID,v.startLineNumber))}_addGutterDecoration(v){this._editor.changeDecorations(w=>{this._gutterDecorationID=w.addDecoration(new o.Range(v,0,v,0),this.gutterDecoration)})}_removeGutterDecoration(v){this._editor.changeDecorations(w=>{w.removeDecoration(v),this._gutterDecorationID=void 0})}_updateGutterDecoration(v,w){this._editor.changeDecorations(S=>{S.changeDecoration(v,new o.Range(w,0,w,0)),S.changeDecorationOptions(v,this.gutterDecoration)})}_updateLightbulbTitle(v,w){this.state.type===1&&(w?this.title=s.localize(906,"Run: {0}",this.state.actions.validActions[0].action.title):v&&this._preferredKbLabel?this.title=s.localize(907,"Show Code Actions. Preferred Quick Fix Available ({0})",this._preferredKbLabel):!v&&this._quickFixKbLabel?this.title=s.localize(908,"Show Code Actions ({0})",this._quickFixKbLabel):v||(this.title=s.localize(909,"Show Code Actions")))}set title(v){this._domNode.title=v}};e.LightBulbWidget=u,e.LightBulbWidget=u=g=De([he(1,t.IKeybindingService)],u)}),define(oe[285],re([1,0,5,48,8,98,2,9,36,17,155,724,748,416,184,3,751,24,27,12,7,107,96,32,97,25,133,403,90]),function(ae,e,c,k,E,L,y,f,_,C,p,n,s,t,i,o,g,h,l,a,r,d,m,u,b,v,w,S,D){"use strict";var I;Object.defineProperty(e,"__esModule",{value:!0}),e.CodeActionController=void 0;const T="quickfix-edit-highlight";let M=class extends y.Disposable{static{I=this}static{this.ID="editor.contrib.codeActionController"}static get(R){return R.getContribution(I.ID)}constructor(R,N,O,x,F,W,V,q,H,K){super(),this._commandService=V,this._configurationService=q,this._actionWidgetService=H,this._instantiationService=K,this._activeCodeActions=this._register(new y.MutableDisposable),this._showDisabled=!1,this._disposed=!1,this._editor=R,this._model=this._register(new S.CodeActionModel(this._editor,F.codeActionProvider,N,O,W,q)),this._register(this._model.onDidChangeState(G=>this.update(G))),this._lightBulbWidget=new L.Lazy(()=>{const G=this._editor.getContribution(t.LightBulbWidget.ID);return G&&this._register(G.onClick(Y=>this.showCodeActionsFromLightbulb(Y.actions,Y))),G}),this._resolver=x.createInstance(n.CodeActionKeybindingResolver),this._register(this._editor.onDidLayoutChange(()=>this._actionWidgetService.hide()))}dispose(){this._disposed=!0,super.dispose()}async showCodeActionsFromLightbulb(R,N){if(R.allAIFixes&&R.validActions.length===1){const O=R.validActions[0],x=O.action.command;x&&x.id==="inlineChat.start"&&x.arguments&&x.arguments.length>=1&&(x.arguments[0]={...x.arguments[0],autoSend:!1}),await this._applyCodeAction(O,!1,!1,p.ApplyCodeActionReason.FromAILightbulb);return}await this.showCodeActionList(R,N,{includeDisabledActions:!1,fromLightbulb:!0})}showCodeActions(R,N,O){return this.showCodeActionList(N,O,{includeDisabledActions:!1,fromLightbulb:!1})}manualTriggerAtCurrentPosition(R,N,O,x){if(!this._editor.hasModel())return;i.MessageController.get(this._editor)?.closeMessage();const F=this._editor.getPosition();this._trigger({type:1,triggerAction:N,filter:O,autoApply:x,context:{notAvailableMessage:R,position:F}})}_trigger(R){return this._model.trigger(R)}async _applyCodeAction(R,N,O,x){try{await this._instantiationService.invokeFunction(p.applyCodeAction,R,x,{preview:O,editor:this._editor})}finally{N&&this._trigger({type:2,triggerAction:w.CodeActionTriggerSource.QuickFix,filter:{}})}}hideLightBulbWidget(){this._lightBulbWidget.rawValue?.hide(),this._lightBulbWidget.rawValue?.gutterHide()}async update(R){if(R.type!==1){this.hideLightBulbWidget();return}let N;try{N=await R.actions}catch(O){(0,E.onUnexpectedError)(O);return}if(!this._disposed)if(this._lightBulbWidget.value?.update(N,R.trigger,R.position),R.trigger.type===1){if(R.trigger.filter?.include){const x=this.tryGetValidActionToApply(R.trigger,N);if(x){try{this.hideLightBulbWidget(),await this._applyCodeAction(x,!1,!1,p.ApplyCodeActionReason.FromCodeActions)}finally{N.dispose()}return}if(R.trigger.context){const F=this.getInvalidActionThatWouldHaveBeenApplied(R.trigger,N);if(F&&F.action.disabled){i.MessageController.get(this._editor)?.showMessage(F.action.disabled,R.trigger.context.position),N.dispose();return}}}const O=!!R.trigger.filter?.include;if(R.trigger.context&&(!N.allActions.length||!O&&!N.validActions.length)){i.MessageController.get(this._editor)?.showMessage(R.trigger.context.notAvailableMessage,R.trigger.context.position),this._activeCodeActions.value=N,N.dispose();return}this._activeCodeActions.value=N,this.showCodeActionList(N,this.toCoords(R.position),{includeDisabledActions:O,fromLightbulb:!1})}else this._actionWidgetService.isVisible?N.dispose():this._activeCodeActions.value=N}getInvalidActionThatWouldHaveBeenApplied(R,N){if(N.allActions.length&&(R.autoApply==="first"&&N.validActions.length===0||R.autoApply==="ifSingle"&&N.allActions.length===1))return N.allActions.find(({action:O})=>O.disabled)}tryGetValidActionToApply(R,N){if(N.validActions.length&&(R.autoApply==="first"&&N.validActions.length>0||R.autoApply==="ifSingle"&&N.validActions.length===1))return N.validActions[0]}static{this.DECORATION=_.ModelDecorationOptions.register({description:"quickfix-highlight",className:T})}async showCodeActionList(R,N,O){const x=this._editor.createDecorationsCollection(),F=this._editor.getDomNode();if(!F)return;const W=O.includeDisabledActions&&(this._showDisabled||R.validActions.length===0)?R.allActions:R.validActions;if(!W.length)return;const V=f.Position.isIPosition(N)?this.toCoords(N):N,q={onSelect:async(H,K)=>{this._applyCodeAction(H,!0,!!K,O.fromLightbulb?p.ApplyCodeActionReason.FromAILightbulb:p.ApplyCodeActionReason.FromCodeActions),this._actionWidgetService.hide(!1),x.clear()},onHide:H=>{this._editor?.focus(),x.clear()},onHover:async(H,K)=>{if(K.isCancellationRequested)return;let G=!1;const Y=H.action.kind;if(Y){const X=new D.HierarchicalKind(Y);G=[w.CodeActionKind.RefactorExtract,w.CodeActionKind.RefactorInline,w.CodeActionKind.RefactorRewrite,w.CodeActionKind.RefactorMove,w.CodeActionKind.Source].some(j=>j.contains(X))}return{canPreview:G||!!H.action.edit?.edits.length}},onFocus:H=>{if(H&&H.action){const K=H.action.ranges,G=H.action.diagnostics;if(x.clear(),K&&K.length>0){const Y=G&&G?.length>1?G.map(X=>({range:X,options:I.DECORATION})):K.map(X=>({range:X,options:I.DECORATION}));x.set(Y)}else if(G&&G.length>0){const Y=G.map(Z=>({range:Z,options:I.DECORATION}));x.set(Y);const X=G[0];if(X.startLineNumber&&X.startColumn){const Z=this._editor.getModel()?.getWordAtPosition({lineNumber:X.startLineNumber,column:X.startColumn})?.word;k.status((0,o.localize)(918,"Context: {0} at line {1} and column {2}.",Z,X.startLineNumber,X.startColumn))}}}else x.clear()}};this._actionWidgetService.show("codeActionWidget",!0,(0,s.toMenuItems)(W,this._shouldShowHeaders(),this._resolver.getResolver()),q,V,F,this._getActionBarActions(R,N,O))}toCoords(R){if(!this._editor.hasModel())return{x:0,y:0};this._editor.revealPosition(R,1),this._editor.render();const N=this._editor.getScrolledVisiblePosition(R),O=(0,c.getDomNodePagePosition)(this._editor.getDomNode()),x=O.left+N.left,F=O.top+N.top+N.height;return{x,y:F}}_shouldShowHeaders(){const R=this._editor?.getModel();return this._configurationService.getValue("editor.codeActionWidget.showHeaders",{resource:R?.uri})}_getActionBarActions(R,N,O){if(O.fromLightbulb)return[];const x=R.documentation.map(F=>({id:F.id,label:F.title,tooltip:F.tooltip??"",class:void 0,enabled:!0,run:()=>this._commandService.executeCommand(F.id,...F.arguments??[])}));return O.includeDisabledActions&&R.validActions.length>0&&R.allActions.length!==R.validActions.length&&x.push(this._showDisabled?{id:"hideMoreActions",label:(0,o.localize)(919,"Hide Disabled"),enabled:!0,tooltip:"",class:void 0,run:()=>(this._showDisabled=!1,this.showCodeActionList(R,N,O))}:{id:"showMoreActions",label:(0,o.localize)(920,"Show Disabled"),enabled:!0,tooltip:"",class:void 0,run:()=>(this._showDisabled=!0,this.showCodeActionList(R,N,O))}),x}};e.CodeActionController=M,e.CodeActionController=M=I=De([he(1,d.IMarkerService),he(2,a.IContextKeyService),he(3,r.IInstantiationService),he(4,C.ILanguageFeaturesService),he(5,m.IEditorProgressService),he(6,h.ICommandService),he(7,l.IConfigurationService),he(8,g.IActionWidgetService),he(9,r.IInstantiationService)],M),(0,v.registerThemingParticipant)((A,R)=>{((x,F)=>{F&&R.addRule(`.monaco-editor ${x} { background-color: ${F}; }`)})(".quickfix-edit-highlight",A.getColor(u.editorFindMatchHighlight));const O=A.getColor(u.editorFindMatchHighlightBorder);O&&R.addRule(`.monaco-editor .quickfix-edit-highlight { border: 1px ${(0,b.isHighContrast)(A.type)?"dotted":"solid"} ${O}; box-sizing: border-box; }`)})}),define(oe[807],re([1,0,90,11,15,20,155,3,12,133,285,403]),function(ae,e,c,k,E,L,y,f,_,C,p,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AutoFixAction=e.FixAllAction=e.OrganizeImportsAction=e.SourceAction=e.RefactorAction=e.CodeActionCommand=e.QuickFixAction=void 0;function s(m){return _.ContextKeyExpr.regex(n.SUPPORTED_CODE_ACTIONS.keys()[0],new RegExp("(\\s|^)"+(0,k.escapeRegExpCharacters)(m.value)+"\\b"))}const t={type:"object",defaultSnippets:[{body:{kind:""}}],properties:{kind:{type:"string",description:f.localize(923,"Kind of the code action to run.")},apply:{type:"string",description:f.localize(924,"Controls when the returned actions are applied."),default:"ifSingle",enum:["first","ifSingle","never"],enumDescriptions:[f.localize(925,"Always apply the first returned code action."),f.localize(926,"Apply the first returned code action if it is the only one."),f.localize(927,"Do not apply the returned code actions.")]},preferred:{type:"boolean",default:!1,description:f.localize(928,"Controls if only preferred code actions should be returned.")}}};function i(m,u,b,v,w=C.CodeActionTriggerSource.Default){m.hasModel()&&p.CodeActionController.get(m)?.manualTriggerAtCurrentPosition(u,w,b,v)}class o extends E.EditorAction{constructor(){super({id:y.quickFixCommandId,label:f.localize(929,"Quick Fix..."),alias:"Quick Fix...",precondition:_.ContextKeyExpr.and(L.EditorContextKeys.writable,L.EditorContextKeys.hasCodeActionsProvider),kbOpts:{kbExpr:L.EditorContextKeys.textInputFocus,primary:2137,weight:100}})}run(u,b){return i(b,f.localize(930,"No code actions available"),void 0,void 0,C.CodeActionTriggerSource.QuickFix)}}e.QuickFixAction=o;class g extends E.EditorCommand{constructor(){super({id:y.codeActionCommandId,precondition:_.ContextKeyExpr.and(L.EditorContextKeys.writable,L.EditorContextKeys.hasCodeActionsProvider),metadata:{description:"Trigger a code action",args:[{name:"args",schema:t}]}})}runEditorCommand(u,b,v){const w=C.CodeActionCommandArgs.fromUser(v,{kind:c.HierarchicalKind.Empty,apply:"ifSingle"});return i(b,typeof v?.kind=="string"?w.preferred?f.localize(931,"No preferred code actions for '{0}' available",v.kind):f.localize(932,"No code actions for '{0}' available",v.kind):w.preferred?f.localize(933,"No preferred code actions available"):f.localize(934,"No code actions available"),{include:w.kind,includeSourceActions:!0,onlyIncludePreferredActions:w.preferred},w.apply)}}e.CodeActionCommand=g;class h extends E.EditorAction{constructor(){super({id:y.refactorCommandId,label:f.localize(935,"Refactor..."),alias:"Refactor...",precondition:_.ContextKeyExpr.and(L.EditorContextKeys.writable,L.EditorContextKeys.hasCodeActionsProvider),kbOpts:{kbExpr:L.EditorContextKeys.textInputFocus,primary:3120,mac:{primary:1328},weight:100},contextMenuOpts:{group:"1_modification",order:2,when:_.ContextKeyExpr.and(L.EditorContextKeys.writable,s(C.CodeActionKind.Refactor))},metadata:{description:"Refactor...",args:[{name:"args",schema:t}]}})}run(u,b,v){const w=C.CodeActionCommandArgs.fromUser(v,{kind:C.CodeActionKind.Refactor,apply:"never"});return i(b,typeof v?.kind=="string"?w.preferred?f.localize(936,"No preferred refactorings for '{0}' available",v.kind):f.localize(937,"No refactorings for '{0}' available",v.kind):w.preferred?f.localize(938,"No preferred refactorings available"):f.localize(939,"No refactorings available"),{include:C.CodeActionKind.Refactor.contains(w.kind)?w.kind:c.HierarchicalKind.None,onlyIncludePreferredActions:w.preferred},w.apply,C.CodeActionTriggerSource.Refactor)}}e.RefactorAction=h;class l extends E.EditorAction{constructor(){super({id:y.sourceActionCommandId,label:f.localize(940,"Source Action..."),alias:"Source Action...",precondition:_.ContextKeyExpr.and(L.EditorContextKeys.writable,L.EditorContextKeys.hasCodeActionsProvider),contextMenuOpts:{group:"1_modification",order:2.1,when:_.ContextKeyExpr.and(L.EditorContextKeys.writable,s(C.CodeActionKind.Source))},metadata:{description:"Source Action...",args:[{name:"args",schema:t}]}})}run(u,b,v){const w=C.CodeActionCommandArgs.fromUser(v,{kind:C.CodeActionKind.Source,apply:"never"});return i(b,typeof v?.kind=="string"?w.preferred?f.localize(941,"No preferred source actions for '{0}' available",v.kind):f.localize(942,"No source actions for '{0}' available",v.kind):w.preferred?f.localize(943,"No preferred source actions available"):f.localize(944,"No source actions available"),{include:C.CodeActionKind.Source.contains(w.kind)?w.kind:c.HierarchicalKind.None,includeSourceActions:!0,onlyIncludePreferredActions:w.preferred},w.apply,C.CodeActionTriggerSource.SourceAction)}}e.SourceAction=l;class a extends E.EditorAction{constructor(){super({id:y.organizeImportsCommandId,label:f.localize(945,"Organize Imports"),alias:"Organize Imports",precondition:_.ContextKeyExpr.and(L.EditorContextKeys.writable,s(C.CodeActionKind.SourceOrganizeImports)),kbOpts:{kbExpr:L.EditorContextKeys.textInputFocus,primary:1581,weight:100}})}run(u,b){return i(b,f.localize(946,"No organize imports action available"),{include:C.CodeActionKind.SourceOrganizeImports,includeSourceActions:!0},"ifSingle",C.CodeActionTriggerSource.OrganizeImports)}}e.OrganizeImportsAction=a;class r extends E.EditorAction{constructor(){super({id:y.fixAllCommandId,label:f.localize(947,"Fix All"),alias:"Fix All",precondition:_.ContextKeyExpr.and(L.EditorContextKeys.writable,s(C.CodeActionKind.SourceFixAll))})}run(u,b){return i(b,f.localize(948,"No fix all action available"),{include:C.CodeActionKind.SourceFixAll,includeSourceActions:!0},"ifSingle",C.CodeActionTriggerSource.FixAll)}}e.FixAllAction=r;class d extends E.EditorAction{constructor(){super({id:y.autoFixCommandId,label:f.localize(949,"Auto Fix..."),alias:"Auto Fix...",precondition:_.ContextKeyExpr.and(L.EditorContextKeys.writable,s(C.CodeActionKind.QuickFix)),kbOpts:{kbExpr:L.EditorContextKeys.textInputFocus,primary:1625,mac:{primary:2649},weight:100}})}run(u,b){return i(b,f.localize(950,"No auto fixes available"),{include:C.CodeActionKind.QuickFix,onlyIncludePreferredActions:!0},"ifSingle",C.CodeActionTriggerSource.AutoFix)}}e.AutoFixAction=d}),define(oe[808],re([1,0,15,272,807,285,416,3,108,38]),function(ae,e,c,k,E,L,y,f,_,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),(0,c.registerEditorContribution)(L.CodeActionController.ID,L.CodeActionController,3),(0,c.registerEditorContribution)(y.LightBulbWidget.ID,y.LightBulbWidget,4),(0,c.registerEditorAction)(E.QuickFixAction),(0,c.registerEditorAction)(E.RefactorAction),(0,c.registerEditorAction)(E.SourceAction),(0,c.registerEditorAction)(E.OrganizeImportsAction),(0,c.registerEditorAction)(E.AutoFixAction),(0,c.registerEditorAction)(E.FixAllAction),(0,c.registerEditorCommand)(new E.CodeActionCommand),C.Registry.as(_.Extensions.Configuration).registerConfiguration({...k.editorConfigurationBaseNode,properties:{"editor.codeActionWidget.showHeaders":{type:"boolean",scope:5,description:f.localize(921,"Enable/disable showing group headers in the Code Action menu."),default:!0}}}),C.Registry.as(_.Extensions.Configuration).registerConfiguration({...k.editorConfigurationBaseNode,properties:{"editor.codeActionWidget.includeNearbyQuickFixes":{type:"boolean",scope:5,description:f.localize(922,"Enable/disable showing nearest Quick Fix within a line when not currently on a diagnostic."),default:!0}}})}),define(oe[809],re([1,0,5,111,4,36,515]),function(ae,e,c,k,E,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CodeLensWidget=e.CodeLensHelper=void 0;class y{constructor(s,t,i){this.afterColumn=1073741824,this.afterLineNumber=s,this.heightInPx=t,this._onHeight=i,this.suppressMouseDown=!0,this.domNode=document.createElement("div")}onComputedHeight(s){this._lastHeight===void 0?this._lastHeight=s:this._lastHeight!==s&&(this._lastHeight=s,this._onHeight())}isVisible(){return this._lastHeight!==0&&this.domNode.hasAttribute("monaco-visible-view-zone")}}class f{static{this._idPool=0}constructor(s,t){this.allowEditorOverflow=!1,this.suppressMouseDown=!0,this._commands=new Map,this._isEmpty=!0,this._editor=s,this._id=`codelens.widget-${f._idPool++}`,this.updatePosition(t),this._domNode=document.createElement("span"),this._domNode.className="codelens-decoration"}withCommands(s,t){this._commands.clear();const i=[];let o=!1;for(let g=0;g<s.length;g++){const h=s[g];if(h&&(o=!0,h.command)){const l=(0,k.renderLabelWithIcons)(h.command.title.trim());if(h.command.id){const a=`c${f._idPool++}`;i.push(c.$("a",{id:a,title:h.command.tooltip,role:"button"},...l)),this._commands.set(a,h.command)}else i.push(c.$("span",{title:h.command.tooltip},...l));g+1<s.length&&i.push(c.$("span",void 0,"\xA0|\xA0"))}}o?(c.reset(this._domNode,...i),this._isEmpty&&t&&this._domNode.classList.add("fadein"),this._isEmpty=!1):c.reset(this._domNode,c.$("span",void 0,"no commands"))}getCommand(s){return s.parentElement===this._domNode?this._commands.get(s.id):void 0}getId(){return this._id}getDomNode(){return this._domNode}updatePosition(s){const t=this._editor.getModel().getLineFirstNonWhitespaceColumn(s);this._widgetPosition={position:{lineNumber:s,column:t},preference:[1]}}getPosition(){return this._widgetPosition||null}}class _{constructor(){this._removeDecorations=[],this._addDecorations=[],this._addDecorationsCallbacks=[]}addDecoration(s,t){this._addDecorations.push(s),this._addDecorationsCallbacks.push(t)}removeDecoration(s){this._removeDecorations.push(s)}commit(s){const t=s.deltaDecorations(this._removeDecorations,this._addDecorations);for(let i=0,o=t.length;i<o;i++)this._addDecorationsCallbacks[i](t[i])}}e.CodeLensHelper=_;const C=L.ModelDecorationOptions.register({collapseOnReplaceEdit:!0,description:"codelens"});class p{constructor(s,t,i,o,g,h){this._isDisposed=!1,this._editor=t,this._data=s,this._decorationIds=[];let l;const a=[];this._data.forEach((r,d)=>{r.symbol.command&&a.push(r.symbol),i.addDecoration({range:r.symbol.range,options:C},m=>this._decorationIds[d]=m),l?l=E.Range.plusRange(l,r.symbol.range):l=E.Range.lift(r.symbol.range)}),this._viewZone=new y(l.startLineNumber-1,g,h),this._viewZoneId=o.addZone(this._viewZone),a.length>0&&(this._createContentWidgetIfNecessary(),this._contentWidget.withCommands(a,!1))}_createContentWidgetIfNecessary(){this._contentWidget?this._editor.layoutContentWidget(this._contentWidget):(this._contentWidget=new f(this._editor,this._viewZone.afterLineNumber+1),this._editor.addContentWidget(this._contentWidget))}dispose(s,t){this._decorationIds.forEach(s.removeDecoration,s),this._decorationIds=[],t?.removeZone(this._viewZoneId),this._contentWidget&&(this._editor.removeContentWidget(this._contentWidget),this._contentWidget=void 0),this._isDisposed=!0}isDisposed(){return this._isDisposed}isValid(){return this._decorationIds.some((s,t)=>{const i=this._editor.getModel().getDecorationRange(s),o=this._data[t].symbol;return!!(i&&E.Range.isEmpty(o.range)===i.isEmpty())})}updateCodeLensSymbols(s,t){this._decorationIds.forEach(t.removeDecoration,t),this._decorationIds=[],this._data=s,this._data.forEach((i,o)=>{t.addDecoration({range:i.symbol.range,options:C},g=>this._decorationIds[o]=g)})}updateHeight(s,t){this._viewZone.heightInPx=s,t.layoutZone(this._viewZoneId),this._contentWidget&&this._editor.layoutContentWidget(this._contentWidget)}computeIfNecessary(s){if(!this._viewZone.isVisible())return null;for(let t=0;t<this._decorationIds.length;t++){const i=s.getDecorationRange(this._decorationIds[t]);i&&(this._data[t].symbol.range=i)}return this._data}updateCommands(s){this._createContentWidgetIfNecessary(),this._contentWidget.withCommands(s,!0);for(let t=0;t<this._data.length;t++){const i=s[t];if(i){const{symbol:o}=this._data[t];o.command=i.command||o.command}}}getCommand(s){return this._contentWidget?.getCommand(s)}getLineNumber(){const s=this._editor.getModel().getDecorationRange(this._decorationIds[0]);return s?s.startLineNumber:-1}update(s){if(this.isValid()){const t=this._editor.getModel().getDecorationRange(this._decorationIds[0]);t&&(this._viewZone.afterLineNumber=t.startLineNumber-1,s.layoutZone(this._viewZoneId),this._contentWidget&&(this._contentWidget.updatePosition(t.startLineNumber),this._editor.layoutContentWidget(this._contentWidget)))}}}e.CodeLensWidget=p}),define(oe[810],re([1,0,14,8,2,142,15,37,20,380,715,809,3,24,50,63,79,17]),function(ae,e,c,k,E,L,y,f,_,C,p,n,s,t,i,o,g,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CodeLensContribution=void 0;let l=class{static{this.ID="css.editor.codeLens"}constructor(r,d,m,u,b,v){this._editor=r,this._languageFeaturesService=d,this._commandService=u,this._notificationService=b,this._codeLensCache=v,this._disposables=new E.DisposableStore,this._localToDispose=new E.DisposableStore,this._lenses=[],this._oldCodeLensModels=new E.DisposableStore,this._provideCodeLensDebounce=m.for(d.codeLensProvider,"CodeLensProvide",{min:250}),this._resolveCodeLensesDebounce=m.for(d.codeLensProvider,"CodeLensResolve",{min:250,salt:"resolve"}),this._resolveCodeLensesScheduler=new c.RunOnceScheduler(()=>this._resolveCodeLensesInViewport(),this._resolveCodeLensesDebounce.default()),this._disposables.add(this._editor.onDidChangeModel(()=>this._onModelChange())),this._disposables.add(this._editor.onDidChangeModelLanguage(()=>this._onModelChange())),this._disposables.add(this._editor.onDidChangeConfiguration(w=>{(w.hasChanged(50)||w.hasChanged(19)||w.hasChanged(18))&&this._updateLensStyle(),w.hasChanged(17)&&this._onModelChange()})),this._disposables.add(d.codeLensProvider.onDidChange(this._onModelChange,this)),this._onModelChange(),this._updateLensStyle()}dispose(){this._localDispose(),this._disposables.dispose(),this._oldCodeLensModels.dispose(),this._currentCodeLensModel?.dispose()}_getLayoutInfo(){const r=Math.max(1.3,this._editor.getOption(67)/this._editor.getOption(52));let d=this._editor.getOption(19);return(!d||d<5)&&(d=this._editor.getOption(52)*.9|0),{fontSize:d,codeLensHeight:d*r|0}}_updateLensStyle(){const{codeLensHeight:r,fontSize:d}=this._getLayoutInfo(),m=this._editor.getOption(18),u=this._editor.getOption(50),{style:b}=this._editor.getContainerDomNode();b.setProperty("--vscode-editorCodeLens-lineHeight",`${r}px`),b.setProperty("--vscode-editorCodeLens-fontSize",`${d}px`),b.setProperty("--vscode-editorCodeLens-fontFeatureSettings",u.fontFeatureSettings),m&&(b.setProperty("--vscode-editorCodeLens-fontFamily",m),b.setProperty("--vscode-editorCodeLens-fontFamilyDefault",f.EDITOR_FONT_DEFAULTS.fontFamily)),this._editor.changeViewZones(v=>{for(const w of this._lenses)w.updateHeight(r,v)})}_localDispose(){this._getCodeLensModelPromise?.cancel(),this._getCodeLensModelPromise=void 0,this._resolveCodeLensesPromise?.cancel(),this._resolveCodeLensesPromise=void 0,this._localToDispose.clear(),this._oldCodeLensModels.clear(),this._currentCodeLensModel?.dispose()}_onModelChange(){this._localDispose();const r=this._editor.getModel();if(!r||!this._editor.getOption(17)||r.isTooLargeForTokenization())return;const d=this._codeLensCache.get(r);if(d&&this._renderCodeLensSymbols(d),!this._languageFeaturesService.codeLensProvider.has(r)){d&&(0,c.disposableTimeout)(()=>{const u=this._codeLensCache.get(r);d===u&&(this._codeLensCache.delete(r),this._onModelChange())},30*1e3,this._localToDispose);return}for(const u of this._languageFeaturesService.codeLensProvider.all(r))if(typeof u.onDidChange=="function"){const b=u.onDidChange(()=>m.schedule());this._localToDispose.add(b)}const m=new c.RunOnceScheduler(()=>{const u=Date.now();this._getCodeLensModelPromise?.cancel(),this._getCodeLensModelPromise=(0,c.createCancelablePromise)(b=>(0,C.getCodeLensModel)(this._languageFeaturesService.codeLensProvider,r,b)),this._getCodeLensModelPromise.then(b=>{this._currentCodeLensModel&&this._oldCodeLensModels.add(this._currentCodeLensModel),this._currentCodeLensModel=b,this._codeLensCache.put(r,b);const v=this._provideCodeLensDebounce.update(r,Date.now()-u);m.delay=v,this._renderCodeLensSymbols(b),this._resolveCodeLensesInViewportSoon()},k.onUnexpectedError)},this._provideCodeLensDebounce.get(r));this._localToDispose.add(m),this._localToDispose.add((0,E.toDisposable)(()=>this._resolveCodeLensesScheduler.cancel())),this._localToDispose.add(this._editor.onDidChangeModelContent(()=>{this._editor.changeDecorations(u=>{this._editor.changeViewZones(b=>{const v=[];let w=-1;this._lenses.forEach(D=>{!D.isValid()||w===D.getLineNumber()?v.push(D):(D.update(b),w=D.getLineNumber())});const S=new n.CodeLensHelper;v.forEach(D=>{D.dispose(S,b),this._lenses.splice(this._lenses.indexOf(D),1)}),S.commit(u)})}),m.schedule(),this._resolveCodeLensesScheduler.cancel(),this._resolveCodeLensesPromise?.cancel(),this._resolveCodeLensesPromise=void 0})),this._localToDispose.add(this._editor.onDidFocusEditorText(()=>{m.schedule()})),this._localToDispose.add(this._editor.onDidBlurEditorText(()=>{m.cancel()})),this._localToDispose.add(this._editor.onDidScrollChange(u=>{u.scrollTopChanged&&this._lenses.length>0&&this._resolveCodeLensesInViewportSoon()})),this._localToDispose.add(this._editor.onDidLayoutChange(()=>{this._resolveCodeLensesInViewportSoon()})),this._localToDispose.add((0,E.toDisposable)(()=>{if(this._editor.getModel()){const u=L.StableEditorScrollState.capture(this._editor);this._editor.changeDecorations(b=>{this._editor.changeViewZones(v=>{this._disposeAllLenses(b,v)})}),u.restore(this._editor)}else this._disposeAllLenses(void 0,void 0)})),this._localToDispose.add(this._editor.onMouseDown(u=>{if(u.target.type!==9)return;let b=u.target.element;if(b?.tagName==="SPAN"&&(b=b.parentElement),b?.tagName==="A")for(const v of this._lenses){const w=v.getCommand(b);if(w){this._commandService.executeCommand(w.id,...w.arguments||[]).catch(S=>this._notificationService.error(S));break}}})),m.schedule()}_disposeAllLenses(r,d){const m=new n.CodeLensHelper;for(const u of this._lenses)u.dispose(m,d);r&&m.commit(r),this._lenses.length=0}_renderCodeLensSymbols(r){if(!this._editor.hasModel())return;const d=this._editor.getModel().getLineCount(),m=[];let u;for(const w of r.lenses){const S=w.symbol.range.startLineNumber;S<1||S>d||(u&&u[u.length-1].symbol.range.startLineNumber===S?u.push(w):(u=[w],m.push(u)))}if(!m.length&&!this._lenses.length)return;const b=L.StableEditorScrollState.capture(this._editor),v=this._getLayoutInfo();this._editor.changeDecorations(w=>{this._editor.changeViewZones(S=>{const D=new n.CodeLensHelper;let I=0,T=0;for(;T<m.length&&I<this._lenses.length;){const M=m[T][0].symbol.range.startLineNumber,A=this._lenses[I].getLineNumber();A<M?(this._lenses[I].dispose(D,S),this._lenses.splice(I,1)):A===M?(this._lenses[I].updateCodeLensSymbols(m[T],D),T++,I++):(this._lenses.splice(I,0,new n.CodeLensWidget(m[T],this._editor,D,S,v.codeLensHeight,()=>this._resolveCodeLensesInViewportSoon())),I++,T++)}for(;I<this._lenses.length;)this._lenses[I].dispose(D,S),this._lenses.splice(I,1);for(;T<m.length;)this._lenses.push(new n.CodeLensWidget(m[T],this._editor,D,S,v.codeLensHeight,()=>this._resolveCodeLensesInViewportSoon())),T++;D.commit(w)})}),b.restore(this._editor)}_resolveCodeLensesInViewportSoon(){this._editor.getModel()&&this._resolveCodeLensesScheduler.schedule()}_resolveCodeLensesInViewport(){this._resolveCodeLensesPromise?.cancel(),this._resolveCodeLensesPromise=void 0;const r=this._editor.getModel();if(!r)return;const d=[],m=[];if(this._lenses.forEach(v=>{const w=v.computeIfNecessary(r);w&&(d.push(w),m.push(v))}),d.length===0)return;const u=Date.now(),b=(0,c.createCancelablePromise)(v=>{const w=d.map((S,D)=>{const I=new Array(S.length),T=S.map((M,A)=>!M.symbol.command&&typeof M.provider.resolveCodeLens=="function"?Promise.resolve(M.provider.resolveCodeLens(r,M.symbol,v)).then(R=>{I[A]=R},k.onUnexpectedExternalError):(I[A]=M.symbol,Promise.resolve(void 0)));return Promise.all(T).then(()=>{!v.isCancellationRequested&&!m[D].isDisposed()&&m[D].updateCommands(I)})});return Promise.all(w)});this._resolveCodeLensesPromise=b,this._resolveCodeLensesPromise.then(()=>{const v=this._resolveCodeLensesDebounce.update(r,Date.now()-u);this._resolveCodeLensesScheduler.delay=v,this._currentCodeLensModel&&this._codeLensCache.put(r,this._currentCodeLensModel),this._oldCodeLensModels.clear(),b===this._resolveCodeLensesPromise&&(this._resolveCodeLensesPromise=void 0)},v=>{(0,k.onUnexpectedError)(v),b===this._resolveCodeLensesPromise&&(this._resolveCodeLensesPromise=void 0)})}async getModel(){return await this._getCodeLensModelPromise,await this._resolveCodeLensesPromise,this._currentCodeLensModel?.isDisposed?void 0:this._currentCodeLensModel}};e.CodeLensContribution=l,e.CodeLensContribution=l=De([he(1,h.ILanguageFeaturesService),he(2,g.ILanguageFeatureDebounceService),he(3,t.ICommandService),he(4,i.INotificationService),he(5,p.ICodeLensCache)],l),(0,y.registerEditorContribution)(l.ID,l,1),(0,y.registerEditorAction)(class extends y.EditorAction{constructor(){super({id:"codelens.showLensesInCurrentLine",precondition:_.EditorContextKeys.hasCodeLensProvider,label:(0,s.localize)(899,"Show CodeLens Commands For Current Line"),alias:"Show CodeLens Commands For Current Line"})}async run(r,d){if(!d.hasModel())return;const m=r.get(o.IQuickInputService),u=r.get(t.ICommandService),b=r.get(i.INotificationService),v=d.getSelection().positionLineNumber,w=d.getContribution(l.ID);if(!w)return;const S=await w.getModel();if(!S)return;const D=[];for(const M of S.lenses)M.symbol.command&&M.symbol.range.startLineNumber===v&&D.push({label:M.symbol.command.title,command:M.symbol.command});if(D.length===0)return;const I=await m.pick(D,{canPickMany:!1,placeHolder:(0,s.localize)(900,"Select a command")});if(!I)return;let T=I.command;if(S.isDisposed){const A=(await w.getModel())?.lenses.find(R=>R.symbol.range.startLineNumber===v&&R.symbol.command?.title===T.title);if(!A||!A.symbol.command)return;T=A.symbol.command}try{await u.executeCommand(T.id,...T.arguments||[])}catch(M){b.error(M)}}})}),define(oe[417],re([1,0,14,33,8,6,2,59,11,185,15,4,36,79,17,396,27]),function(ae,e,c,k,E,L,y,f,_,C,p,n,s,t,i,o,g){"use strict";var h;Object.defineProperty(e,"__esModule",{value:!0}),e.DecoratorLimitReporter=e.ColorDetector=e.ColorDecorationInjectedTextMarker=void 0,e.ColorDecorationInjectedTextMarker=Object.create({});let l=class extends y.Disposable{static{h=this}static{this.ID="editor.contrib.colorDetector"}static{this.RECOMPUTE_TIME=1e3}constructor(d,m,u,b){super(),this._editor=d,this._configurationService=m,this._languageFeaturesService=u,this._localToDispose=this._register(new y.DisposableStore),this._decorationsIds=[],this._colorDatas=new Map,this._colorDecoratorIds=this._editor.createDecorationsCollection(),this._ruleFactory=new C.DynamicCssRules(this._editor),this._decoratorLimitReporter=new a,this._colorDecorationClassRefs=this._register(new y.DisposableStore),this._debounceInformation=b.for(u.colorProvider,"Document Colors",{min:h.RECOMPUTE_TIME}),this._register(d.onDidChangeModel(()=>{this._isColorDecoratorsEnabled=this.isEnabled(),this.updateColors()})),this._register(d.onDidChangeModelLanguage(()=>this.updateColors())),this._register(u.colorProvider.onDidChange(()=>this.updateColors())),this._register(d.onDidChangeConfiguration(v=>{const w=this._isColorDecoratorsEnabled;this._isColorDecoratorsEnabled=this.isEnabled(),this._isDefaultColorDecoratorsEnabled=this._editor.getOption(148);const S=w!==this._isColorDecoratorsEnabled||v.hasChanged(21),D=v.hasChanged(148);(S||D)&&(this._isColorDecoratorsEnabled?this.updateColors():this.removeAllDecorations())})),this._timeoutTimer=null,this._computePromise=null,this._isColorDecoratorsEnabled=this.isEnabled(),this._isDefaultColorDecoratorsEnabled=this._editor.getOption(148),this.updateColors()}isEnabled(){const d=this._editor.getModel();if(!d)return!1;const m=d.getLanguageId(),u=this._configurationService.getValue(m);if(u&&typeof u=="object"){const b=u.colorDecorators;if(b&&b.enable!==void 0&&!b.enable)return b.enable}return this._editor.getOption(20)}static get(d){return d.getContribution(this.ID)}dispose(){this.stop(),this.removeAllDecorations(),super.dispose()}updateColors(){if(this.stop(),!this._isColorDecoratorsEnabled)return;const d=this._editor.getModel();!d||!this._languageFeaturesService.colorProvider.has(d)||(this._localToDispose.add(this._editor.onDidChangeModelContent(()=>{this._timeoutTimer||(this._timeoutTimer=new c.TimeoutTimer,this._timeoutTimer.cancelAndSet(()=>{this._timeoutTimer=null,this.beginCompute()},this._debounceInformation.get(d)))})),this.beginCompute())}async beginCompute(){this._computePromise=(0,c.createCancelablePromise)(async d=>{const m=this._editor.getModel();if(!m)return[];const u=new f.StopWatch(!1),b=await(0,o.getColors)(this._languageFeaturesService.colorProvider,m,d,this._isDefaultColorDecoratorsEnabled);return this._debounceInformation.update(m,u.elapsed()),b});try{const d=await this._computePromise;this.updateDecorations(d),this.updateColorDecorators(d),this._computePromise=null}catch(d){(0,E.onUnexpectedError)(d)}}stop(){this._timeoutTimer&&(this._timeoutTimer.cancel(),this._timeoutTimer=null),this._computePromise&&(this._computePromise.cancel(),this._computePromise=null),this._localToDispose.clear()}updateDecorations(d){const m=d.map(u=>({range:{startLineNumber:u.colorInfo.range.startLineNumber,startColumn:u.colorInfo.range.startColumn,endLineNumber:u.colorInfo.range.endLineNumber,endColumn:u.colorInfo.range.endColumn},options:s.ModelDecorationOptions.EMPTY}));this._editor.changeDecorations(u=>{this._decorationsIds=u.deltaDecorations(this._decorationsIds,m),this._colorDatas=new Map,this._decorationsIds.forEach((b,v)=>this._colorDatas.set(b,d[v]))})}updateColorDecorators(d){this._colorDecorationClassRefs.clear();const m=[],u=this._editor.getOption(21);for(let v=0;v<d.length&&m.length<u;v++){const{red:w,green:S,blue:D,alpha:I}=d[v].colorInfo.color,T=new k.RGBA(Math.round(w*255),Math.round(S*255),Math.round(D*255),I),M=`rgba(${T.r}, ${T.g}, ${T.b}, ${T.a})`,A=this._colorDecorationClassRefs.add(this._ruleFactory.createClassNameRef({backgroundColor:M}));m.push({range:{startLineNumber:d[v].colorInfo.range.startLineNumber,startColumn:d[v].colorInfo.range.startColumn,endLineNumber:d[v].colorInfo.range.endLineNumber,endColumn:d[v].colorInfo.range.endColumn},options:{description:"colorDetector",before:{content:_.noBreakWhitespace,inlineClassName:`${A.className} colorpicker-color-decoration`,inlineClassNameAffectsLetterSpacing:!0,attachedData:e.ColorDecorationInjectedTextMarker}}})}const b=u<d.length?u:!1;this._decoratorLimitReporter.update(d.length,b),this._colorDecoratorIds.set(m)}removeAllDecorations(){this._editor.removeDecorations(this._decorationsIds),this._decorationsIds=[],this._colorDecoratorIds.clear(),this._colorDecorationClassRefs.clear()}getColorData(d){const m=this._editor.getModel();if(!m)return null;const u=m.getDecorationsInRange(n.Range.fromPositions(d,d)).filter(b=>this._colorDatas.has(b.id));return u.length===0?null:this._colorDatas.get(u[0].id)}isColorDecoration(d){return this._colorDecoratorIds.has(d)}};e.ColorDetector=l,e.ColorDetector=l=h=De([he(1,g.IConfigurationService),he(2,i.ILanguageFeaturesService),he(3,t.ILanguageFeatureDebounceService)],l);class a{constructor(){this._onDidChange=new L.Emitter,this._computed=0,this._limited=!1}update(d,m){(d!==this._computed||m!==this._limited)&&(this._computed=d,this._limited=m,this._onDidChange.fire())}}e.DecoratorLimitReporter=a,(0,p.registerEditorContribution)(l.ID,l,1)}),define(oe[286],re([1,0,14,18,33,2,4,396,417,629,754,86,25,5]),function(ae,e,c,k,E,L,y,f,_,C,p,n,s,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StandaloneColorPickerParticipant=e.StandaloneColorPickerHover=e.ColorHoverParticipant=e.ColorHover=void 0;class i{constructor(u,b,v,w){this.owner=u,this.range=b,this.model=v,this.provider=w,this.forceShowAtRange=!0}isValidForHoverAnchor(u){return u.type===1&&this.range.startColumn<=u.range.startColumn&&this.range.endColumn>=u.range.endColumn}}e.ColorHover=i;let o=class{constructor(u,b){this._editor=u,this._themeService=b,this.hoverOrdinal=2}computeSync(u,b){return[]}computeAsync(u,b,v){return c.AsyncIterableObject.fromPromise(this._computeAsync(u,b,v))}async _computeAsync(u,b,v){if(!this._editor.hasModel())return[];const w=_.ColorDetector.get(this._editor);if(!w)return[];for(const S of b){if(!w.isColorDecoration(S))continue;const D=w.getColorData(S.range.getStartPosition());if(D)return[await l(this,this._editor.getModel(),D.colorInfo,D.provider)]}return[]}renderHoverParts(u,b){const v=a(this,this._editor,this._themeService,b,u);if(!v)return new n.RenderedHoverParts([]);this._colorPicker=v.colorPicker;const w={hoverPart:v.hoverPart,hoverElement:this._colorPicker.domNode,dispose(){v.disposables.dispose()}};return new n.RenderedHoverParts([w])}handleResize(){this._colorPicker?.layout()}isColorPickerVisible(){return!!this._colorPicker}};e.ColorHoverParticipant=o,e.ColorHoverParticipant=o=De([he(1,s.IThemeService)],o);class g{constructor(u,b,v,w){this.owner=u,this.range=b,this.model=v,this.provider=w}}e.StandaloneColorPickerHover=g;let h=class{constructor(u,b){this._editor=u,this._themeService=b,this._color=null}async createColorHover(u,b,v){if(!this._editor.hasModel()||!_.ColorDetector.get(this._editor))return null;const S=await(0,f.getColors)(v,this._editor.getModel(),k.CancellationToken.None);let D=null,I=null;for(const R of S){const N=R.colorInfo;y.Range.containsRange(N.range,u.range)&&(D=N,I=R.provider)}const T=D??u,M=I??b,A=!!D;return{colorHover:await l(this,this._editor.getModel(),T,M),foundInEditor:A}}async updateEditorModel(u){if(!this._editor.hasModel())return;const b=u.model;let v=new y.Range(u.range.startLineNumber,u.range.startColumn,u.range.endLineNumber,u.range.endColumn);this._color&&(await d(this._editor.getModel(),b,this._color,v,u),v=r(this._editor,v,b))}renderHoverParts(u,b){return a(this,this._editor,this._themeService,b,u)}set color(u){this._color=u}get color(){return this._color}};e.StandaloneColorPickerParticipant=h,e.StandaloneColorPickerParticipant=h=De([he(1,s.IThemeService)],h);async function l(m,u,b,v){const w=u.getValueInRange(b.range),{red:S,green:D,blue:I,alpha:T}=b.color,M=new E.RGBA(Math.round(S*255),Math.round(D*255),Math.round(I*255),T),A=new E.Color(M),R=await(0,f.getColorPresentations)(u,b,v,k.CancellationToken.None),N=new C.ColorPickerModel(A,[],0);return N.colorPresentations=R||[],N.guessColorPresentation(A,w),m instanceof o?new i(m,y.Range.lift(b.range),N,v):new g(m,y.Range.lift(b.range),N,v)}function a(m,u,b,v,w){if(v.length===0||!u.hasModel())return;if(w.setMinimumDimensions){const N=u.getOption(67)+8;w.setMinimumDimensions(new t.Dimension(302,N))}const S=new L.DisposableStore,D=v[0],I=u.getModel(),T=D.model,M=S.add(new p.ColorPickerWidget(w.fragment,T,u.getOption(144),b,m instanceof h));let A=!1,R=new y.Range(D.range.startLineNumber,D.range.startColumn,D.range.endLineNumber,D.range.endColumn);if(m instanceof h){const N=D.model.color;m.color=N,d(I,T,N,R,D),S.add(T.onColorFlushed(O=>{m.color=O}))}else S.add(T.onColorFlushed(async N=>{await d(I,T,N,R,D),A=!0,R=r(u,R,T)}));return S.add(T.onDidChangeColor(N=>{d(I,T,N,R,D)})),S.add(u.onDidChangeModelContent(N=>{A?A=!1:(w.hide(),u.focus())})),{hoverPart:D,colorPicker:M,disposables:S}}function r(m,u,b){const v=[],w=b.presentation.textEdit??{range:u,text:b.presentation.label,forceMoveMarkers:!1};v.push(w),b.presentation.additionalTextEdits&&v.push(...b.presentation.additionalTextEdits);const S=y.Range.lift(w.range),D=m.getModel()._setTrackedRange(null,S,3);return m.executeEdits("colorpicker",v),m.pushUndoStop(),m.getModel()._getTrackedRange(D)??S}async function d(m,u,b,v,w){const S=await(0,f.getColorPresentations)(m,{range:v,color:{red:b.rgba.r/255,green:b.rgba.g/255,blue:b.rgba.b/255,alpha:b.rgba.a}},w.provider,k.CancellationToken.None);u.colorPresentations=S||[]}}),define(oe[811],re([1,0,2,286,7,384,31,6,17,15,20,12,44,34,395,5,236]),function(ae,e,c,k,E,L,y,f,_,C,p,n,s,t,i,o){"use strict";var g,h;Object.defineProperty(e,"__esModule",{value:!0}),e.StandaloneColorPickerWidget=e.StandaloneColorPickerController=void 0;let l=class extends c.Disposable{static{g=this}static{this.ID="editor.contrib.standaloneColorPickerController"}constructor(b,v,w,S,D,I,T){super(),this._editor=b,this._modelService=w,this._keybindingService=S,this._instantiationService=D,this._languageFeatureService=I,this._languageConfigurationService=T,this._standaloneColorPickerWidget=null,this._standaloneColorPickerVisible=p.EditorContextKeys.standaloneColorPickerVisible.bindTo(v),this._standaloneColorPickerFocused=p.EditorContextKeys.standaloneColorPickerFocused.bindTo(v)}showOrFocus(){this._editor.hasModel()&&(this._standaloneColorPickerVisible.get()?this._standaloneColorPickerFocused.get()||this._standaloneColorPickerWidget?.focus():this._standaloneColorPickerWidget=new d(this._editor,this._standaloneColorPickerVisible,this._standaloneColorPickerFocused,this._instantiationService,this._modelService,this._keybindingService,this._languageFeatureService,this._languageConfigurationService))}hide(){this._standaloneColorPickerFocused.set(!1),this._standaloneColorPickerVisible.set(!1),this._standaloneColorPickerWidget?.hide(),this._editor.focus()}insertColor(){this._standaloneColorPickerWidget?.updateEditor(),this.hide()}static get(b){return b.getContribution(g.ID)}};e.StandaloneColorPickerController=l,e.StandaloneColorPickerController=l=g=De([he(1,n.IContextKeyService),he(2,s.IModelService),he(3,y.IKeybindingService),he(4,E.IInstantiationService),he(5,_.ILanguageFeaturesService),he(6,t.ILanguageConfigurationService)],l),(0,C.registerEditorContribution)(l.ID,l,1);const a=8,r=22;let d=class extends c.Disposable{static{h=this}static{this.ID="editor.contrib.standaloneColorPickerWidget"}constructor(b,v,w,S,D,I,T,M){super(),this._editor=b,this._standaloneColorPickerVisible=v,this._standaloneColorPickerFocused=w,this._modelService=D,this._keybindingService=I,this._languageFeaturesService=T,this._languageConfigurationService=M,this.allowEditorOverflow=!0,this._position=void 0,this._body=document.createElement("div"),this._colorHover=null,this._selectionSetInEditor=!1,this._onResult=this._register(new f.Emitter),this.onResult=this._onResult.event,this._standaloneColorPickerVisible.set(!0),this._standaloneColorPickerParticipant=S.createInstance(k.StandaloneColorPickerParticipant,this._editor),this._position=this._editor._getViewModel()?.getPrimaryCursorState().modelState.position;const A=this._editor.getSelection(),R=A?{startLineNumber:A.startLineNumber,startColumn:A.startColumn,endLineNumber:A.endLineNumber,endColumn:A.endColumn}:{startLineNumber:0,endLineNumber:0,endColumn:0,startColumn:0},N=this._register(o.trackFocus(this._body));this._register(N.onDidBlur(O=>{this.hide()})),this._register(N.onDidFocus(O=>{this.focus()})),this._register(this._editor.onDidChangeCursorPosition(()=>{this._selectionSetInEditor?this._selectionSetInEditor=!1:this.hide()})),this._register(this._editor.onMouseMove(O=>{const x=O.target.element?.classList;x&&x.contains("colorpicker-color-decoration")&&this.hide()})),this._register(this.onResult(O=>{this._render(O.value,O.foundInEditor)})),this._start(R),this._body.style.zIndex="50",this._editor.addContentWidget(this)}updateEditor(){this._colorHover&&this._standaloneColorPickerParticipant.updateEditorModel(this._colorHover)}getId(){return h.ID}getDomNode(){return this._body}getPosition(){if(!this._position)return null;const b=this._editor.getOption(60).above;return{position:this._position,secondaryPosition:this._position,preference:b?[1,2]:[2,1],positionAffinity:2}}hide(){this.dispose(),this._standaloneColorPickerVisible.set(!1),this._standaloneColorPickerFocused.set(!1),this._editor.removeContentWidget(this),this._editor.focus()}focus(){this._standaloneColorPickerFocused.set(!0),this._body.focus()}async _start(b){const v=await this._computeAsync(b);v&&this._onResult.fire(new m(v.result,v.foundInEditor))}async _computeAsync(b){if(!this._editor.hasModel())return null;const v={range:b,color:{red:0,green:0,blue:0,alpha:1}},w=await this._standaloneColorPickerParticipant.createColorHover(v,new i.DefaultDocumentColorProvider(this._modelService,this._languageConfigurationService),this._languageFeaturesService.colorProvider);return w?{result:w.colorHover,foundInEditor:w.foundInEditor}:null}_render(b,v){const w=document.createDocumentFragment(),S=this._register(new L.EditorHoverStatusBar(this._keybindingService)),D={fragment:w,statusBar:S,onContentsChanged:()=>{},hide:()=>this.hide()};this._colorHover=b;const I=this._standaloneColorPickerParticipant.renderHoverParts(D,[b]);if(!I)return;this._register(I.disposables);const T=I.colorPicker;this._body.classList.add("standalone-colorpicker-body"),this._body.style.maxHeight=Math.max(this._editor.getLayoutInfo().height/4,250)+"px",this._body.style.maxWidth=Math.max(this._editor.getLayoutInfo().width*.66,500)+"px",this._body.tabIndex=0,this._body.appendChild(w),T.layout();const M=T.body,A=M.saturationBox.domNode.clientWidth,R=M.domNode.clientWidth-A-r-a,N=T.body.enterButton;N?.onClicked(()=>{this.updateEditor(),this.hide()});const O=T.header,x=O.pickedColorNode;x.style.width=A+a+"px";const F=O.originalColorNode;F.style.width=R+"px",T.header.closeButton?.onClicked(()=>{this.hide()}),v&&(N&&(N.button.textContent="Replace"),this._selectionSetInEditor=!0,this._editor.setSelection(b.range)),this._editor.layoutContentWidget(this)}};e.StandaloneColorPickerWidget=d,e.StandaloneColorPickerWidget=d=h=De([he(3,E.IInstantiationService),he(4,s.IModelService),he(5,y.IKeybindingService),he(6,_.ILanguageFeaturesService),he(7,t.ILanguageConfigurationService)],d);class m{constructor(b,v){this.value=b,this.foundInEditor=v}}}),define(oe[812],re([1,0,15,3,811,20,29,236]),function(ae,e,c,k,E,L,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ShowOrFocusStandaloneColorPicker=void 0;class f extends c.EditorAction2{constructor(){super({id:"editor.action.showOrFocusStandaloneColorPicker",title:{...(0,k.localize2)(893,"Show or Focus Standalone Color Picker"),mnemonicTitle:(0,k.localize)(890,"&&Show or Focus Standalone Color Picker")},precondition:void 0,menu:[{id:y.MenuId.CommandPalette}],metadata:{description:(0,k.localize2)(894,"Show or focus a standalone color picker which uses the default color provider. It displays hex/rgb/hsl colors.")}})}runEditorCommand(n,s){E.StandaloneColorPickerController.get(s)?.showOrFocus()}}e.ShowOrFocusStandaloneColorPicker=f;class _ extends c.EditorAction{constructor(){super({id:"editor.action.hideColorPicker",label:(0,k.localize)(891,"Hide the Color Picker"),alias:"Hide the Color Picker",precondition:L.EditorContextKeys.standaloneColorPickerVisible.isEqualTo(!0),kbOpts:{primary:9,weight:100},metadata:{description:(0,k.localize2)(895,"Hide the standalone color picker.")}})}run(n,s){E.StandaloneColorPickerController.get(s)?.hide()}}class C extends c.EditorAction{constructor(){super({id:"editor.action.insertColorWithStandaloneColorPicker",label:(0,k.localize)(892,"Insert Color with Standalone Color Picker"),alias:"Insert Color with Standalone Color Picker",precondition:L.EditorContextKeys.standaloneColorPickerFocused.isEqualTo(!0),kbOpts:{primary:3,weight:100},metadata:{description:(0,k.localize2)(896,"Insert hex/rgb/hsl colors with the focused standalone color picker.")}})}run(n,s){E.StandaloneColorPickerController.get(s)?.insertColor()}}(0,c.registerEditorAction)(_),(0,c.registerEditorAction)(C),(0,y.registerAction2)(f)}),define(oe[813],re([1,0,2,16,15,9,4,23,36,631,516]),function(ae,e,c,k,E,L,y,f,_,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DragAndDropController=void 0;function p(s){return k.isMacintosh?s.altKey:s.ctrlKey}class n extends c.Disposable{static{this.ID="editor.contrib.dragAndDrop"}static{this.TRIGGER_KEY_VALUE=k.isMacintosh?6:5}constructor(t){super(),this._editor=t,this._dndDecorationIds=this._editor.createDecorationsCollection(),this._register(this._editor.onMouseDown(i=>this._onEditorMouseDown(i))),this._register(this._editor.onMouseUp(i=>this._onEditorMouseUp(i))),this._register(this._editor.onMouseDrag(i=>this._onEditorMouseDrag(i))),this._register(this._editor.onMouseDrop(i=>this._onEditorMouseDrop(i))),this._register(this._editor.onMouseDropCanceled(()=>this._onEditorMouseDropCanceled())),this._register(this._editor.onKeyDown(i=>this.onEditorKeyDown(i))),this._register(this._editor.onKeyUp(i=>this.onEditorKeyUp(i))),this._register(this._editor.onDidBlurEditorWidget(()=>this.onEditorBlur())),this._register(this._editor.onDidBlurEditorText(()=>this.onEditorBlur())),this._mouseDown=!1,this._modifierPressed=!1,this._dragSelection=null}onEditorBlur(){this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1,this._modifierPressed=!1}onEditorKeyDown(t){!this._editor.getOption(35)||this._editor.getOption(22)||(p(t)&&(this._modifierPressed=!0),this._mouseDown&&p(t)&&this._editor.updateOptions({mouseStyle:"copy"}))}onEditorKeyUp(t){!this._editor.getOption(35)||this._editor.getOption(22)||(p(t)&&(this._modifierPressed=!1),this._mouseDown&&t.keyCode===n.TRIGGER_KEY_VALUE&&this._editor.updateOptions({mouseStyle:"default"}))}_onEditorMouseDown(t){this._mouseDown=!0}_onEditorMouseUp(t){this._mouseDown=!1,this._editor.updateOptions({mouseStyle:"text"})}_onEditorMouseDrag(t){const i=t.target;if(this._dragSelection===null){const g=(this._editor.getSelections()||[]).filter(h=>i.position&&h.containsPosition(i.position));if(g.length===1)this._dragSelection=g[0];else return}p(t.event)?this._editor.updateOptions({mouseStyle:"copy"}):this._editor.updateOptions({mouseStyle:"default"}),i.position&&(this._dragSelection.containsPosition(i.position)?this._removeDecoration():this.showAt(i.position))}_onEditorMouseDropCanceled(){this._editor.updateOptions({mouseStyle:"text"}),this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1}_onEditorMouseDrop(t){if(t.target&&(this._hitContent(t.target)||this._hitMargin(t.target))&&t.target.position){const i=new L.Position(t.target.position.lineNumber,t.target.position.column);if(this._dragSelection===null){let o=null;if(t.event.shiftKey){const g=this._editor.getSelection();if(g){const{selectionStartLineNumber:h,selectionStartColumn:l}=g;o=[new f.Selection(h,l,i.lineNumber,i.column)]}}else o=(this._editor.getSelections()||[]).map(g=>g.containsPosition(i)?new f.Selection(i.lineNumber,i.column,i.lineNumber,i.column):g);this._editor.setSelections(o||[],"mouse",3)}else(!this._dragSelection.containsPosition(i)||(p(t.event)||this._modifierPressed)&&(this._dragSelection.getEndPosition().equals(i)||this._dragSelection.getStartPosition().equals(i)))&&(this._editor.pushUndoStop(),this._editor.executeCommand(n.ID,new C.DragAndDropCommand(this._dragSelection,i,p(t.event)||this._modifierPressed)),this._editor.pushUndoStop())}this._editor.updateOptions({mouseStyle:"text"}),this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1}static{this._DECORATION_OPTIONS=_.ModelDecorationOptions.register({description:"dnd-target",className:"dnd-target"})}showAt(t){this._dndDecorationIds.set([{range:new y.Range(t.lineNumber,t.column,t.lineNumber,t.column),options:n._DECORATION_OPTIONS}]),this._editor.revealPosition(t,1)}_removeDecoration(){this._dndDecorationIds.clear()}_hitContent(t){return t.type===6||t.type===7}_hitMargin(t){return t.type===2||t.type===3||t.type===4}dispose(){this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1,this._modifierPressed=!1,super.dispose()}}e.DragAndDropController=n,(0,E.registerEditorContribution)(n.ID,n,2)}),define(oe[814],re([1,0,4,40,36,32,25]),function(ae,e,c,k,E,L,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FindDecorations=void 0;class f{constructor(C){this._editor=C,this._decorations=[],this._overviewRulerApproximateDecorations=[],this._findScopeDecorationIds=[],this._rangeHighlightDecorationId=null,this._highlightedDecorationId=null,this._startPosition=this._editor.getPosition()}dispose(){this._editor.removeDecorations(this._allDecorations()),this._decorations=[],this._overviewRulerApproximateDecorations=[],this._findScopeDecorationIds=[],this._rangeHighlightDecorationId=null,this._highlightedDecorationId=null}reset(){this._decorations=[],this._overviewRulerApproximateDecorations=[],this._findScopeDecorationIds=[],this._rangeHighlightDecorationId=null,this._highlightedDecorationId=null}getCount(){return this._decorations.length}getFindScope(){return this._findScopeDecorationIds[0]?this._editor.getModel().getDecorationRange(this._findScopeDecorationIds[0]):null}getFindScopes(){if(this._findScopeDecorationIds.length){const C=this._findScopeDecorationIds.map(p=>this._editor.getModel().getDecorationRange(p)).filter(p=>!!p);if(C.length)return C}return null}getStartPosition(){return this._startPosition}setStartPosition(C){this._startPosition=C,this.setCurrentFindMatch(null)}_getDecorationIndex(C){const p=this._decorations.indexOf(C);return p>=0?p+1:1}getDecorationRangeAt(C){const p=C<this._decorations.length?this._decorations[C]:null;return p?this._editor.getModel().getDecorationRange(p):null}getCurrentMatchesPosition(C){const p=this._editor.getModel().getDecorationsInRange(C);for(const n of p){const s=n.options;if(s===f._FIND_MATCH_DECORATION||s===f._CURRENT_FIND_MATCH_DECORATION)return this._getDecorationIndex(n.id)}return 0}setCurrentFindMatch(C){let p=null,n=0;if(C)for(let s=0,t=this._decorations.length;s<t;s++){const i=this._editor.getModel().getDecorationRange(this._decorations[s]);if(C.equalsRange(i)){p=this._decorations[s],n=s+1;break}}return(this._highlightedDecorationId!==null||p!==null)&&this._editor.changeDecorations(s=>{if(this._highlightedDecorationId!==null&&(s.changeDecorationOptions(this._highlightedDecorationId,f._FIND_MATCH_DECORATION),this._highlightedDecorationId=null),p!==null&&(this._highlightedDecorationId=p,s.changeDecorationOptions(this._highlightedDecorationId,f._CURRENT_FIND_MATCH_DECORATION)),this._rangeHighlightDecorationId!==null&&(s.removeDecoration(this._rangeHighlightDecorationId),this._rangeHighlightDecorationId=null),p!==null){let t=this._editor.getModel().getDecorationRange(p);if(t.startLineNumber!==t.endLineNumber&&t.endColumn===1){const i=t.endLineNumber-1,o=this._editor.getModel().getLineMaxColumn(i);t=new c.Range(t.startLineNumber,t.startColumn,i,o)}this._rangeHighlightDecorationId=s.addDecoration(t,f._RANGE_HIGHLIGHT_DECORATION)}}),n}set(C,p){this._editor.changeDecorations(n=>{let s=f._FIND_MATCH_DECORATION;const t=[];if(C.length>1e3){s=f._FIND_MATCH_NO_OVERVIEW_DECORATION;const o=this._editor.getModel().getLineCount(),h=this._editor.getLayoutInfo().height/o,l=Math.max(2,Math.ceil(3/h));let a=C[0].range.startLineNumber,r=C[0].range.endLineNumber;for(let d=1,m=C.length;d<m;d++){const u=C[d].range;r+l>=u.startLineNumber?u.endLineNumber>r&&(r=u.endLineNumber):(t.push({range:new c.Range(a,1,r,1),options:f._FIND_MATCH_ONLY_OVERVIEW_DECORATION}),a=u.startLineNumber,r=u.endLineNumber)}t.push({range:new c.Range(a,1,r,1),options:f._FIND_MATCH_ONLY_OVERVIEW_DECORATION})}const i=new Array(C.length);for(let o=0,g=C.length;o<g;o++)i[o]={range:C[o].range,options:s};this._decorations=n.deltaDecorations(this._decorations,i),this._overviewRulerApproximateDecorations=n.deltaDecorations(this._overviewRulerApproximateDecorations,t),this._rangeHighlightDecorationId&&(n.removeDecoration(this._rangeHighlightDecorationId),this._rangeHighlightDecorationId=null),this._findScopeDecorationIds.length&&(this._findScopeDecorationIds.forEach(o=>n.removeDecoration(o)),this._findScopeDecorationIds=[]),p?.length&&(this._findScopeDecorationIds=p.map(o=>n.addDecoration(o,f._FIND_SCOPE_DECORATION)))})}matchBeforePosition(C){if(this._decorations.length===0)return null;for(let p=this._decorations.length-1;p>=0;p--){const n=this._decorations[p],s=this._editor.getModel().getDecorationRange(n);if(!(!s||s.endLineNumber>C.lineNumber)){if(s.endLineNumber<C.lineNumber)return s;if(!(s.endColumn>C.column))return s}}return this._editor.getModel().getDecorationRange(this._decorations[this._decorations.length-1])}matchAfterPosition(C){if(this._decorations.length===0)return null;for(let p=0,n=this._decorations.length;p<n;p++){const s=this._decorations[p],t=this._editor.getModel().getDecorationRange(s);if(!(!t||t.startLineNumber<C.lineNumber)){if(t.startLineNumber>C.lineNumber)return t;if(!(t.startColumn<C.column))return t}}return this._editor.getModel().getDecorationRange(this._decorations[0])}_allDecorations(){let C=[];return C=C.concat(this._decorations),C=C.concat(this._overviewRulerApproximateDecorations),this._findScopeDecorationIds.length&&C.push(...this._findScopeDecorationIds),this._rangeHighlightDecorationId&&C.push(this._rangeHighlightDecorationId),C}static{this._CURRENT_FIND_MATCH_DECORATION=E.ModelDecorationOptions.register({description:"current-find-match",stickiness:1,zIndex:13,className:"currentFindMatch",inlineClassName:"currentFindMatchInline",showIfCollapsed:!0,overviewRuler:{color:(0,y.themeColorFromId)(L.overviewRulerFindMatchForeground),position:k.OverviewRulerLane.Center},minimap:{color:(0,y.themeColorFromId)(L.minimapFindMatch),position:1}})}static{this._FIND_MATCH_DECORATION=E.ModelDecorationOptions.register({description:"find-match",stickiness:1,zIndex:10,className:"findMatch",inlineClassName:"findMatchInline",showIfCollapsed:!0,overviewRuler:{color:(0,y.themeColorFromId)(L.overviewRulerFindMatchForeground),position:k.OverviewRulerLane.Center},minimap:{color:(0,y.themeColorFromId)(L.minimapFindMatch),position:1}})}static{this._FIND_MATCH_NO_OVERVIEW_DECORATION=E.ModelDecorationOptions.register({description:"find-match-no-overview",stickiness:1,className:"findMatch",showIfCollapsed:!0})}static{this._FIND_MATCH_ONLY_OVERVIEW_DECORATION=E.ModelDecorationOptions.register({description:"find-match-only-overview",stickiness:1,overviewRuler:{color:(0,y.themeColorFromId)(L.overviewRulerFindMatchForeground),position:k.OverviewRulerLane.Center}})}static{this._RANGE_HIGHLIGHT_DECORATION=E.ModelDecorationOptions.register({description:"find-range-highlight",stickiness:1,className:"rangeHighlight",isWholeLine:!0})}static{this._FIND_SCOPE_DECORATION=E.ModelDecorationOptions.register({description:"find-scope",className:"findScope",isWholeLine:!0})}}e.FindDecorations=f}),define(oe[219],re([1,0,67,14,2,145,9,4,23,203,814,632,633,12]),function(ae,e,c,k,E,L,y,f,_,C,p,n,s,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FindModelBoundToEditorModel=e.MATCHES_LIMIT=e.FIND_IDS=e.TogglePreserveCaseKeybinding=e.ToggleSearchScopeKeybinding=e.ToggleRegexKeybinding=e.ToggleWholeWordKeybinding=e.ToggleCaseSensitiveKeybinding=e.CONTEXT_REPLACE_INPUT_FOCUSED=e.CONTEXT_FIND_INPUT_FOCUSED=e.CONTEXT_FIND_WIDGET_NOT_VISIBLE=e.CONTEXT_FIND_WIDGET_VISIBLE=void 0,e.CONTEXT_FIND_WIDGET_VISIBLE=new t.RawContextKey("findWidgetVisible",!1),e.CONTEXT_FIND_WIDGET_NOT_VISIBLE=e.CONTEXT_FIND_WIDGET_VISIBLE.toNegated(),e.CONTEXT_FIND_INPUT_FOCUSED=new t.RawContextKey("findInputFocussed",!1),e.CONTEXT_REPLACE_INPUT_FOCUSED=new t.RawContextKey("replaceInputFocussed",!1),e.ToggleCaseSensitiveKeybinding={primary:545,mac:{primary:2593}},e.ToggleWholeWordKeybinding={primary:565,mac:{primary:2613}},e.ToggleRegexKeybinding={primary:560,mac:{primary:2608}},e.ToggleSearchScopeKeybinding={primary:554,mac:{primary:2602}},e.TogglePreserveCaseKeybinding={primary:558,mac:{primary:2606}},e.FIND_IDS={StartFindAction:"actions.find",StartFindWithSelection:"actions.findWithSelection",StartFindWithArgs:"editor.actions.findWithArgs",NextMatchFindAction:"editor.action.nextMatchFindAction",PreviousMatchFindAction:"editor.action.previousMatchFindAction",GoToMatchFindAction:"editor.action.goToMatchFindAction",NextSelectionMatchFindAction:"editor.action.nextSelectionMatchFindAction",PreviousSelectionMatchFindAction:"editor.action.previousSelectionMatchFindAction",StartFindReplaceAction:"editor.action.startFindReplaceAction",CloseFindWidgetCommand:"closeFindWidget",ToggleCaseSensitiveCommand:"toggleFindCaseSensitive",ToggleWholeWordCommand:"toggleFindWholeWord",ToggleRegexCommand:"toggleFindRegex",ToggleSearchScopeCommand:"toggleFindInSelection",TogglePreserveCaseCommand:"togglePreserveCase",ReplaceOneAction:"editor.action.replaceOne",ReplaceAllAction:"editor.action.replaceAll",SelectAllMatchesAction:"editor.action.selectAllMatches"},e.MATCHES_LIMIT=19999;const i=240;class o{constructor(h,l){this._toDispose=new E.DisposableStore,this._editor=h,this._state=l,this._isDisposed=!1,this._startSearchingTimer=new k.TimeoutTimer,this._decorations=new p.FindDecorations(h),this._toDispose.add(this._decorations),this._updateDecorationsScheduler=new k.RunOnceScheduler(()=>{if(this._editor.hasModel())return this.research(!1)},100),this._toDispose.add(this._updateDecorationsScheduler),this._toDispose.add(this._editor.onDidChangeCursorPosition(a=>{(a.reason===3||a.reason===5||a.reason===6)&&this._decorations.setStartPosition(this._editor.getPosition())})),this._ignoreModelContentChanged=!1,this._toDispose.add(this._editor.onDidChangeModelContent(a=>{this._ignoreModelContentChanged||(a.isFlush&&this._decorations.reset(),this._decorations.setStartPosition(this._editor.getPosition()),this._updateDecorationsScheduler.schedule())})),this._toDispose.add(this._state.onFindReplaceStateChange(a=>this._onStateChanged(a))),this.research(!1,this._state.searchScope)}dispose(){this._isDisposed=!0,(0,E.dispose)(this._startSearchingTimer),this._toDispose.dispose()}_onStateChanged(h){this._isDisposed||this._editor.hasModel()&&(h.searchString||h.isReplaceRevealed||h.isRegex||h.wholeWord||h.matchCase||h.searchScope)&&(this._editor.getModel().isTooLargeForSyncing()?(this._startSearchingTimer.cancel(),this._startSearchingTimer.setIfNotSet(()=>{h.searchScope?this.research(h.moveCursor,this._state.searchScope):this.research(h.moveCursor)},i)):h.searchScope?this.research(h.moveCursor,this._state.searchScope):this.research(h.moveCursor))}static _getSearchRange(h,l){return l||h.getFullModelRange()}research(h,l){let a=null;typeof l<"u"?l!==null&&(Array.isArray(l)?a=l:a=[l]):a=this._decorations.getFindScopes(),a!==null&&(a=a.map(u=>{if(u.startLineNumber!==u.endLineNumber){let b=u.endLineNumber;return u.endColumn===1&&(b=b-1),new f.Range(u.startLineNumber,1,b,this._editor.getModel().getLineMaxColumn(b))}return u}));const r=this._findMatches(a,!1,e.MATCHES_LIMIT);this._decorations.set(r,a);const d=this._editor.getSelection();let m=this._decorations.getCurrentMatchesPosition(d);if(m===0&&r.length>0){const u=(0,c.findFirstIdxMonotonousOrArrLen)(r.map(b=>b.range),b=>f.Range.compareRangesUsingStarts(b,d)>=0);m=u>0?u-1+1:m}this._state.changeMatchInfo(m,this._decorations.getCount(),void 0),h&&this._editor.getOption(41).cursorMoveOnType&&this._moveToNextMatch(this._decorations.getStartPosition())}_hasMatches(){return this._state.matchesCount>0}_cannotFind(){if(!this._hasMatches()){const h=this._decorations.getFindScope();return h&&this._editor.revealRangeInCenterIfOutsideViewport(h,0),!0}return!1}_setCurrentFindMatch(h){const l=this._decorations.setCurrentFindMatch(h);this._state.changeMatchInfo(l,this._decorations.getCount(),h),this._editor.setSelection(h),this._editor.revealRangeInCenterIfOutsideViewport(h,0)}_prevSearchPosition(h){const l=this._state.isRegex&&(this._state.searchString.indexOf("^")>=0||this._state.searchString.indexOf("$")>=0);let{lineNumber:a,column:r}=h;const d=this._editor.getModel();return l||r===1?(a===1?a=d.getLineCount():a--,r=d.getLineMaxColumn(a)):r--,new y.Position(a,r)}_moveToPrevMatch(h,l=!1){if(!this._state.canNavigateBack()){const w=this._decorations.matchAfterPosition(h);w&&this._setCurrentFindMatch(w);return}if(this._decorations.getCount()<e.MATCHES_LIMIT){let w=this._decorations.matchBeforePosition(h);w&&w.isEmpty()&&w.getStartPosition().equals(h)&&(h=this._prevSearchPosition(h),w=this._decorations.matchBeforePosition(h)),w&&this._setCurrentFindMatch(w);return}if(this._cannotFind())return;const a=this._decorations.getFindScope(),r=o._getSearchRange(this._editor.getModel(),a);r.getEndPosition().isBefore(h)&&(h=r.getEndPosition()),h.isBefore(r.getStartPosition())&&(h=r.getEndPosition());const{lineNumber:d,column:m}=h,u=this._editor.getModel();let b=new y.Position(d,m),v=u.findPreviousMatch(this._state.searchString,b,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(132):null,!1);if(v&&v.range.isEmpty()&&v.range.getStartPosition().equals(b)&&(b=this._prevSearchPosition(b),v=u.findPreviousMatch(this._state.searchString,b,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(132):null,!1)),!!v){if(!l&&!r.containsRange(v.range))return this._moveToPrevMatch(v.range.getStartPosition(),!0);this._setCurrentFindMatch(v.range)}}moveToPrevMatch(){this._moveToPrevMatch(this._editor.getSelection().getStartPosition())}_nextSearchPosition(h){const l=this._state.isRegex&&(this._state.searchString.indexOf("^")>=0||this._state.searchString.indexOf("$")>=0);let{lineNumber:a,column:r}=h;const d=this._editor.getModel();return l||r===d.getLineMaxColumn(a)?(a===d.getLineCount()?a=1:a++,r=1):r++,new y.Position(a,r)}_moveToNextMatch(h){if(!this._state.canNavigateForward()){const a=this._decorations.matchBeforePosition(h);a&&this._setCurrentFindMatch(a);return}if(this._decorations.getCount()<e.MATCHES_LIMIT){let a=this._decorations.matchAfterPosition(h);a&&a.isEmpty()&&a.getStartPosition().equals(h)&&(h=this._nextSearchPosition(h),a=this._decorations.matchAfterPosition(h)),a&&this._setCurrentFindMatch(a);return}const l=this._getNextMatch(h,!1,!0);l&&this._setCurrentFindMatch(l.range)}_getNextMatch(h,l,a,r=!1){if(this._cannotFind())return null;const d=this._decorations.getFindScope(),m=o._getSearchRange(this._editor.getModel(),d);m.getEndPosition().isBefore(h)&&(h=m.getStartPosition()),h.isBefore(m.getStartPosition())&&(h=m.getStartPosition());const{lineNumber:u,column:b}=h,v=this._editor.getModel();let w=new y.Position(u,b),S=v.findNextMatch(this._state.searchString,w,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(132):null,l);return a&&S&&S.range.isEmpty()&&S.range.getStartPosition().equals(w)&&(w=this._nextSearchPosition(w),S=v.findNextMatch(this._state.searchString,w,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(132):null,l)),S?!r&&!m.containsRange(S.range)?this._getNextMatch(S.range.getEndPosition(),l,a,!0):S:null}moveToNextMatch(){this._moveToNextMatch(this._editor.getSelection().getEndPosition())}_moveToMatch(h){const l=this._decorations.getDecorationRangeAt(h);l&&this._setCurrentFindMatch(l)}moveToMatch(h){this._moveToMatch(h)}_getReplacePattern(){return this._state.isRegex?(0,s.parseReplaceString)(this._state.replaceString):s.ReplacePattern.fromStaticValue(this._state.replaceString)}replace(){if(!this._hasMatches())return;const h=this._getReplacePattern(),l=this._editor.getSelection(),a=this._getNextMatch(l.getStartPosition(),!0,!1);if(a)if(l.equalsRange(a.range)){const r=h.buildReplaceString(a.matches,this._state.preserveCase),d=new L.ReplaceCommand(l,r);this._executeEditorCommand("replace",d),this._decorations.setStartPosition(new y.Position(l.startLineNumber,l.startColumn+r.length)),this.research(!0)}else this._decorations.setStartPosition(this._editor.getPosition()),this._setCurrentFindMatch(a.range)}_findMatches(h,l,a){const r=(h||[null]).map(d=>o._getSearchRange(this._editor.getModel(),d));return this._editor.getModel().findMatches(this._state.searchString,r,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(132):null,l,a)}replaceAll(){if(!this._hasMatches())return;const h=this._decorations.getFindScopes();h===null&&this._state.matchesCount>=e.MATCHES_LIMIT?this._largeReplaceAll():this._regularReplaceAll(h),this.research(!1)}_largeReplaceAll(){const l=new C.SearchParams(this._state.searchString,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(132):null).parseSearchRequest();if(!l)return;let a=l.regex;if(!a.multiline){let S="mu";a.ignoreCase&&(S+="i"),a.global&&(S+="g"),a=new RegExp(a.source,S)}const r=this._editor.getModel(),d=r.getValue(1),m=r.getFullModelRange(),u=this._getReplacePattern();let b;const v=this._state.preserveCase;u.hasReplacementPatterns||v?b=d.replace(a,function(){return u.buildReplaceString(arguments,v)}):b=d.replace(a,u.buildReplaceString(null,v));const w=new L.ReplaceCommandThatPreservesSelection(m,b,this._editor.getSelection());this._executeEditorCommand("replaceAll",w)}_regularReplaceAll(h){const l=this._getReplacePattern(),a=this._findMatches(h,l.hasReplacementPatterns||this._state.preserveCase,1073741824),r=[];for(let m=0,u=a.length;m<u;m++)r[m]=l.buildReplaceString(a[m].matches,this._state.preserveCase);const d=new n.ReplaceAllCommand(this._editor.getSelection(),a.map(m=>m.range),r);this._executeEditorCommand("replaceAll",d)}selectAllMatches(){if(!this._hasMatches())return;const h=this._decorations.getFindScopes();let a=this._findMatches(h,!1,1073741824).map(d=>new _.Selection(d.range.startLineNumber,d.range.startColumn,d.range.endLineNumber,d.range.endColumn));const r=this._editor.getSelection();for(let d=0,m=a.length;d<m;d++)if(a[d].equalsRange(r)){a=[r].concat(a.slice(0,d)).concat(a.slice(d+1));break}this._editor.setSelections(a)}_executeEditorCommand(h,l){try{this._ignoreModelContentChanged=!0,this._editor.pushUndoStop(),this._editor.executeCommand(h,l),this._editor.pushUndoStop()}finally{this._ignoreModelContentChanged=!1}}}e.FindModelBoundToEditorModel=o}),define(oe[815],re([1,0,5,364,83,14,219,32,43,518]),function(ae,e,c,k,E,L,y,f,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FindOptionsWidget=void 0;class C extends E.Widget{static{this.ID="editor.contrib.findOptionsWidget"}constructor(n,s,t){super(),this._hideSoon=this._register(new L.RunOnceScheduler(()=>this._hide(),2e3)),this._isVisible=!1,this._editor=n,this._state=s,this._keybindingService=t,this._domNode=document.createElement("div"),this._domNode.className="findOptionsWidget",this._domNode.style.display="none",this._domNode.style.top="10px",this._domNode.style.zIndex="12",this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true");const i={inputActiveOptionBorder:(0,f.asCssVariable)(f.inputActiveOptionBorder),inputActiveOptionForeground:(0,f.asCssVariable)(f.inputActiveOptionForeground),inputActiveOptionBackground:(0,f.asCssVariable)(f.inputActiveOptionBackground)},o=this._register((0,_.createInstantHoverDelegate)());this.caseSensitive=this._register(new k.CaseSensitiveToggle({appendTitle:this._keybindingLabelFor(y.FIND_IDS.ToggleCaseSensitiveCommand),isChecked:this._state.matchCase,hoverDelegate:o,...i})),this._domNode.appendChild(this.caseSensitive.domNode),this._register(this.caseSensitive.onChange(()=>{this._state.change({matchCase:this.caseSensitive.checked},!1)})),this.wholeWords=this._register(new k.WholeWordsToggle({appendTitle:this._keybindingLabelFor(y.FIND_IDS.ToggleWholeWordCommand),isChecked:this._state.wholeWord,hoverDelegate:o,...i})),this._domNode.appendChild(this.wholeWords.domNode),this._register(this.wholeWords.onChange(()=>{this._state.change({wholeWord:this.wholeWords.checked},!1)})),this.regex=this._register(new k.RegexToggle({appendTitle:this._keybindingLabelFor(y.FIND_IDS.ToggleRegexCommand),isChecked:this._state.isRegex,hoverDelegate:o,...i})),this._domNode.appendChild(this.regex.domNode),this._register(this.regex.onChange(()=>{this._state.change({isRegex:this.regex.checked},!1)})),this._editor.addOverlayWidget(this),this._register(this._state.onFindReplaceStateChange(g=>{let h=!1;g.isRegex&&(this.regex.checked=this._state.isRegex,h=!0),g.wholeWord&&(this.wholeWords.checked=this._state.wholeWord,h=!0),g.matchCase&&(this.caseSensitive.checked=this._state.matchCase,h=!0),!this._state.isRevealed&&h&&this._revealTemporarily()})),this._register(c.addDisposableListener(this._domNode,c.EventType.MOUSE_LEAVE,g=>this._onMouseLeave())),this._register(c.addDisposableListener(this._domNode,"mouseover",g=>this._onMouseOver()))}_keybindingLabelFor(n){const s=this._keybindingService.lookupKeybinding(n);return s?` (${s.getLabel()})`:""}dispose(){this._editor.removeOverlayWidget(this),super.dispose()}getId(){return C.ID}getDomNode(){return this._domNode}getPosition(){return{preference:0}}highlightFindOptions(){this._revealTemporarily()}_revealTemporarily(){this._show(),this._hideSoon.schedule()}_onMouseLeave(){this._hideSoon.schedule()}_onMouseOver(){this._hideSoon.cancel()}_show(){this._isVisible||(this._isVisible=!0,this._domNode.style.display="block")}_hide(){this._isVisible&&(this._isVisible=!1,this._domNode.style.display="none")}}e.FindOptionsWidget=C}),define(oe[816],re([1,0,6,2,4,219]),function(ae,e,c,k,E,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FindReplaceState=void 0;function y(_,C){return _===1?!0:_===2?!1:C}class f extends k.Disposable{get searchString(){return this._searchString}get replaceString(){return this._replaceString}get isRevealed(){return this._isRevealed}get isReplaceRevealed(){return this._isReplaceRevealed}get isRegex(){return y(this._isRegexOverride,this._isRegex)}get wholeWord(){return y(this._wholeWordOverride,this._wholeWord)}get matchCase(){return y(this._matchCaseOverride,this._matchCase)}get preserveCase(){return y(this._preserveCaseOverride,this._preserveCase)}get actualIsRegex(){return this._isRegex}get actualWholeWord(){return this._wholeWord}get actualMatchCase(){return this._matchCase}get actualPreserveCase(){return this._preserveCase}get searchScope(){return this._searchScope}get matchesPosition(){return this._matchesPosition}get matchesCount(){return this._matchesCount}get currentMatch(){return this._currentMatch}constructor(){super(),this._onFindReplaceStateChange=this._register(new c.Emitter),this.onFindReplaceStateChange=this._onFindReplaceStateChange.event,this._searchString="",this._replaceString="",this._isRevealed=!1,this._isReplaceRevealed=!1,this._isRegex=!1,this._isRegexOverride=0,this._wholeWord=!1,this._wholeWordOverride=0,this._matchCase=!1,this._matchCaseOverride=0,this._preserveCase=!1,this._preserveCaseOverride=0,this._searchScope=null,this._matchesPosition=0,this._matchesCount=0,this._currentMatch=null,this._loop=!0,this._isSearching=!1,this._filters=null}changeMatchInfo(C,p,n){const s={moveCursor:!1,updateHistory:!1,searchString:!1,replaceString:!1,isRevealed:!1,isReplaceRevealed:!1,isRegex:!1,wholeWord:!1,matchCase:!1,preserveCase:!1,searchScope:!1,matchesPosition:!1,matchesCount:!1,currentMatch:!1,loop:!1,isSearching:!1,filters:!1};let t=!1;p===0&&(C=0),C>p&&(C=p),this._matchesPosition!==C&&(this._matchesPosition=C,s.matchesPosition=!0,t=!0),this._matchesCount!==p&&(this._matchesCount=p,s.matchesCount=!0,t=!0),typeof n<"u"&&(E.Range.equalsRange(this._currentMatch,n)||(this._currentMatch=n,s.currentMatch=!0,t=!0)),t&&this._onFindReplaceStateChange.fire(s)}change(C,p,n=!0){const s={moveCursor:p,updateHistory:n,searchString:!1,replaceString:!1,isRevealed:!1,isReplaceRevealed:!1,isRegex:!1,wholeWord:!1,matchCase:!1,preserveCase:!1,searchScope:!1,matchesPosition:!1,matchesCount:!1,currentMatch:!1,loop:!1,isSearching:!1,filters:!1};let t=!1;const i=this.isRegex,o=this.wholeWord,g=this.matchCase,h=this.preserveCase;typeof C.searchString<"u"&&this._searchString!==C.searchString&&(this._searchString=C.searchString,s.searchString=!0,t=!0),typeof C.replaceString<"u"&&this._replaceString!==C.replaceString&&(this._replaceString=C.replaceString,s.replaceString=!0,t=!0),typeof C.isRevealed<"u"&&this._isRevealed!==C.isRevealed&&(this._isRevealed=C.isRevealed,s.isRevealed=!0,t=!0),typeof C.isReplaceRevealed<"u"&&this._isReplaceRevealed!==C.isReplaceRevealed&&(this._isReplaceRevealed=C.isReplaceRevealed,s.isReplaceRevealed=!0,t=!0),typeof C.isRegex<"u"&&(this._isRegex=C.isRegex),typeof C.wholeWord<"u"&&(this._wholeWord=C.wholeWord),typeof C.matchCase<"u"&&(this._matchCase=C.matchCase),typeof C.preserveCase<"u"&&(this._preserveCase=C.preserveCase),typeof C.searchScope<"u"&&(C.searchScope?.every(l=>this._searchScope?.some(a=>!E.Range.equalsRange(a,l)))||(this._searchScope=C.searchScope,s.searchScope=!0,t=!0)),typeof C.loop<"u"&&this._loop!==C.loop&&(this._loop=C.loop,s.loop=!0,t=!0),typeof C.isSearching<"u"&&this._isSearching!==C.isSearching&&(this._isSearching=C.isSearching,s.isSearching=!0,t=!0),typeof C.filters<"u"&&(this._filters?this._filters.update(C.filters):this._filters=C.filters,s.filters=!0,t=!0),this._isRegexOverride=typeof C.isRegexOverride<"u"?C.isRegexOverride:0,this._wholeWordOverride=typeof C.wholeWordOverride<"u"?C.wholeWordOverride:0,this._matchCaseOverride=typeof C.matchCaseOverride<"u"?C.matchCaseOverride:0,this._preserveCaseOverride=typeof C.preserveCaseOverride<"u"?C.preserveCaseOverride:0,i!==this.isRegex&&(t=!0,s.isRegex=!0),o!==this.wholeWord&&(t=!0,s.wholeWord=!0),g!==this.matchCase&&(t=!0,s.matchCase=!0),h!==this.preserveCase&&(t=!0,s.preserveCase=!0),t&&this._onFindReplaceStateChange.fire(s)}canNavigateBack(){return this.canNavigateInLoop()||this.matchesPosition!==1}canNavigateForward(){return this.canNavigateInLoop()||this.matchesPosition<this.matchesCount}canNavigateInLoop(){return this._loop||this.matchesCount>=L.MATCHES_LIMIT}}e.FindReplaceState=f}),define(oe[817],re([1,0,5,48,165,164,83,14,26,8,2,16,11,4,219,3,399,669,32,71,25,30,97,19,109,43,519]),function(ae,e,c,k,E,L,y,f,_,C,p,n,s,t,i,o,g,h,l,a,r,d,m,u,b,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SimpleButton=e.FindWidget=e.FindWidgetViewZone=e.NLS_NO_RESULTS=e.NLS_MATCHES_LOCATION=e.findNextMatchIcon=e.findPreviousMatchIcon=e.findReplaceAllIcon=e.findReplaceIcon=e.findSelectionIcon=void 0;const w=(0,a.registerIcon)("find-collapsed",_.Codicon.chevronRight,o.localize(804,"Icon to indicate that the editor find widget is collapsed.")),S=(0,a.registerIcon)("find-expanded",_.Codicon.chevronDown,o.localize(805,"Icon to indicate that the editor find widget is expanded."));e.findSelectionIcon=(0,a.registerIcon)("find-selection",_.Codicon.selection,o.localize(806,"Icon for 'Find in Selection' in the editor find widget.")),e.findReplaceIcon=(0,a.registerIcon)("find-replace",_.Codicon.replace,o.localize(807,"Icon for 'Replace' in the editor find widget.")),e.findReplaceAllIcon=(0,a.registerIcon)("find-replace-all",_.Codicon.replaceAll,o.localize(808,"Icon for 'Replace All' in the editor find widget.")),e.findPreviousMatchIcon=(0,a.registerIcon)("find-previous-match",_.Codicon.arrowUp,o.localize(809,"Icon for 'Find Previous' in the editor find widget.")),e.findNextMatchIcon=(0,a.registerIcon)("find-next-match",_.Codicon.arrowDown,o.localize(810,"Icon for 'Find Next' in the editor find widget."));const D=o.localize(811,"Find / Replace"),I=o.localize(812,"Find"),T=o.localize(813,"Find"),M=o.localize(814,"Previous Match"),A=o.localize(815,"Next Match"),R=o.localize(816,"Find in Selection"),N=o.localize(817,"Close"),O=o.localize(818,"Replace"),x=o.localize(819,"Replace"),F=o.localize(820,"Replace"),W=o.localize(821,"Replace All"),V=o.localize(822,"Toggle Replace"),q=o.localize(823,"Only the first {0} results are highlighted, but all find operations work on the entire text.",i.MATCHES_LIMIT);e.NLS_MATCHES_LOCATION=o.localize(824,"{0} of {1}"),e.NLS_NO_RESULTS=o.localize(825,"No results");const H=419,G=275-54;let Y=69;const X=33,Z="ctrlEnterReplaceAll.windows.donotask",j=n.isMacintosh?256:2048;class P{constructor(ce){this.afterLineNumber=ce,this.heightInPx=X,this.suppressMouseDown=!1,this.domNode=document.createElement("div"),this.domNode.className="dock-find-viewzone"}}e.FindWidgetViewZone=P;function te(pe,ce,ie){const ne=!!ce.match(/\n/);if(ie&&ne&&ie.selectionStart>0){pe.stopPropagation();return}}function se(pe,ce,ie){const ne=!!ce.match(/\n/);if(ie&&ne&&ie.selectionEnd<ie.value.length){pe.stopPropagation();return}}class ue extends y.Widget{static{this.ID="editor.contrib.findWidget"}constructor(ce,ie,ne,J,B,U,z,$,Q,ee){super(),this._hoverService=ee,this._cachedHeight=null,this._revealTimeouts=[],this._codeEditor=ce,this._controller=ie,this._state=ne,this._contextViewProvider=J,this._keybindingService=B,this._contextKeyService=U,this._storageService=$,this._notificationService=Q,this._ctrlEnterReplaceAllWarningPrompted=!!$.getBoolean(Z,0),this._isVisible=!1,this._isReplaceVisible=!1,this._ignoreChangeEvent=!1,this._updateHistoryDelayer=new f.Delayer(500),this._register((0,p.toDisposable)(()=>this._updateHistoryDelayer.cancel())),this._register(this._state.onFindReplaceStateChange(le=>this._onStateChanged(le))),this._buildDomNode(),this._updateButtons(),this._tryUpdateWidgetWidth(),this._findInput.inputBox.layout(),this._register(this._codeEditor.onDidChangeConfiguration(le=>{if(le.hasChanged(92)&&(this._codeEditor.getOption(92)&&this._state.change({isReplaceRevealed:!1},!1),this._updateButtons()),le.hasChanged(146)&&this._tryUpdateWidgetWidth(),le.hasChanged(2)&&this.updateAccessibilitySupport(),le.hasChanged(41)){const de=this._codeEditor.getOption(41).loop;this._state.change({loop:de},!1);const me=this._codeEditor.getOption(41).addExtraSpaceOnTop;me&&!this._viewZone&&(this._viewZone=new P(0),this._showViewZone()),!me&&this._viewZone&&this._removeViewZone()}})),this.updateAccessibilitySupport(),this._register(this._codeEditor.onDidChangeCursorSelection(()=>{this._isVisible&&this._updateToggleSelectionFindButton()})),this._register(this._codeEditor.onDidFocusEditorWidget(async()=>{if(this._isVisible){const le=await this._controller.getGlobalBufferTerm();le&&le!==this._state.searchString&&(this._state.change({searchString:le},!1),this._findInput.select())}})),this._findInputFocused=i.CONTEXT_FIND_INPUT_FOCUSED.bindTo(U),this._findFocusTracker=this._register(c.trackFocus(this._findInput.inputBox.inputElement)),this._register(this._findFocusTracker.onDidFocus(()=>{this._findInputFocused.set(!0),this._updateSearchScope()})),this._register(this._findFocusTracker.onDidBlur(()=>{this._findInputFocused.set(!1)})),this._replaceInputFocused=i.CONTEXT_REPLACE_INPUT_FOCUSED.bindTo(U),this._replaceFocusTracker=this._register(c.trackFocus(this._replaceInput.inputBox.inputElement)),this._register(this._replaceFocusTracker.onDidFocus(()=>{this._replaceInputFocused.set(!0),this._updateSearchScope()})),this._register(this._replaceFocusTracker.onDidBlur(()=>{this._replaceInputFocused.set(!1)})),this._codeEditor.addOverlayWidget(this),this._codeEditor.getOption(41).addExtraSpaceOnTop&&(this._viewZone=new P(0)),this._register(this._codeEditor.onDidChangeModel(()=>{this._isVisible&&(this._viewZoneId=void 0)})),this._register(this._codeEditor.onDidScrollChange(le=>{if(le.scrollTopChanged){this._layoutViewZone();return}setTimeout(()=>{this._layoutViewZone()},0)}))}getId(){return ue.ID}getDomNode(){return this._domNode}getPosition(){return this._isVisible?{preference:0}:null}_onStateChanged(ce){if(ce.searchString){try{this._ignoreChangeEvent=!0,this._findInput.setValue(this._state.searchString)}finally{this._ignoreChangeEvent=!1}this._updateButtons()}if(ce.replaceString&&(this._replaceInput.inputBox.value=this._state.replaceString),ce.isRevealed&&(this._state.isRevealed?this._reveal():this._hide(!0)),ce.isReplaceRevealed&&(this._state.isReplaceRevealed?!this._codeEditor.getOption(92)&&!this._isReplaceVisible&&(this._isReplaceVisible=!0,this._replaceInput.width=c.getTotalWidth(this._findInput.domNode),this._updateButtons(),this._replaceInput.inputBox.layout()):this._isReplaceVisible&&(this._isReplaceVisible=!1,this._updateButtons())),(ce.isRevealed||ce.isReplaceRevealed)&&(this._state.isRevealed||this._state.isReplaceRevealed)&&this._tryUpdateHeight()&&this._showViewZone(),ce.isRegex&&this._findInput.setRegex(this._state.isRegex),ce.wholeWord&&this._findInput.setWholeWords(this._state.wholeWord),ce.matchCase&&this._findInput.setCaseSensitive(this._state.matchCase),ce.preserveCase&&this._replaceInput.setPreserveCase(this._state.preserveCase),ce.searchScope&&(this._state.searchScope?this._toggleSelectionFind.checked=!0:this._toggleSelectionFind.checked=!1,this._updateToggleSelectionFindButton()),ce.searchString||ce.matchesCount||ce.matchesPosition){const ie=this._state.searchString.length>0&&this._state.matchesCount===0;this._domNode.classList.toggle("no-results",ie),this._updateMatchesCount(),this._updateButtons()}(ce.searchString||ce.currentMatch)&&this._layoutViewZone(),ce.updateHistory&&this._delayedUpdateHistory(),ce.loop&&this._updateButtons()}_delayedUpdateHistory(){this._updateHistoryDelayer.trigger(this._updateHistory.bind(this)).then(void 0,C.onUnexpectedError)}_updateHistory(){this._state.searchString&&this._findInput.inputBox.addToHistory(),this._state.replaceString&&this._replaceInput.inputBox.addToHistory()}_updateMatchesCount(){this._matchesCount.style.minWidth=Y+"px",this._state.matchesCount>=i.MATCHES_LIMIT?this._matchesCount.title=q:this._matchesCount.title="",this._matchesCount.firstChild?.remove();let ce;if(this._state.matchesCount>0){let ie=String(this._state.matchesCount);this._state.matchesCount>=i.MATCHES_LIMIT&&(ie+="+");let ne=String(this._state.matchesPosition);ne==="0"&&(ne="?"),ce=s.format(e.NLS_MATCHES_LOCATION,ne,ie)}else ce=e.NLS_NO_RESULTS;this._matchesCount.appendChild(document.createTextNode(ce)),(0,k.alert)(this._getAriaLabel(ce,this._state.currentMatch,this._state.searchString)),Y=Math.max(Y,this._matchesCount.clientWidth)}_getAriaLabel(ce,ie,ne){if(ce===e.NLS_NO_RESULTS)return ne===""?o.localize(826,"{0} found",ce):o.localize(827,"{0} found for '{1}'",ce,ne);if(ie){const J=o.localize(828,"{0} found for '{1}', at {2}",ce,ne,ie.startLineNumber+":"+ie.startColumn),B=this._codeEditor.getModel();return B&&ie.startLineNumber<=B.getLineCount()&&ie.startLineNumber>=1?`${B.getLineContent(ie.startLineNumber)}, ${J}`:J}return o.localize(829,"{0} found for '{1}'",ce,ne)}_updateToggleSelectionFindButton(){const ce=this._codeEditor.getSelection(),ie=ce?ce.startLineNumber!==ce.endLineNumber||ce.startColumn!==ce.endColumn:!1,ne=this._toggleSelectionFind.checked;this._isVisible&&(ne||ie)?this._toggleSelectionFind.enable():this._toggleSelectionFind.disable()}_updateButtons(){this._findInput.setEnabled(this._isVisible),this._replaceInput.setEnabled(this._isVisible&&this._isReplaceVisible),this._updateToggleSelectionFindButton(),this._closeBtn.setEnabled(this._isVisible);const ce=this._state.searchString.length>0,ie=!!this._state.matchesCount;this._prevBtn.setEnabled(this._isVisible&&ce&&ie&&this._state.canNavigateBack()),this._nextBtn.setEnabled(this._isVisible&&ce&&ie&&this._state.canNavigateForward()),this._replaceBtn.setEnabled(this._isVisible&&this._isReplaceVisible&&ce),this._replaceAllBtn.setEnabled(this._isVisible&&this._isReplaceVisible&&ce),this._domNode.classList.toggle("replaceToggled",this._isReplaceVisible),this._toggleReplaceBtn.setExpanded(this._isReplaceVisible);const ne=!this._codeEditor.getOption(92);this._toggleReplaceBtn.setEnabled(this._isVisible&&ne)}_reveal(){if(this._revealTimeouts.forEach(ce=>{clearTimeout(ce)}),this._revealTimeouts=[],!this._isVisible){this._isVisible=!0;const ce=this._codeEditor.getSelection();switch(this._codeEditor.getOption(41).autoFindInSelection){case"always":this._toggleSelectionFind.checked=!0;break;case"never":this._toggleSelectionFind.checked=!1;break;case"multiline":{const ne=!!ce&&ce.startLineNumber!==ce.endLineNumber;this._toggleSelectionFind.checked=ne;break}default:break}this._tryUpdateWidgetWidth(),this._updateButtons(),this._revealTimeouts.push(setTimeout(()=>{this._domNode.classList.add("visible"),this._domNode.setAttribute("aria-hidden","false")},0)),this._revealTimeouts.push(setTimeout(()=>{this._findInput.validate()},200)),this._codeEditor.layoutOverlayWidget(this);let ie=!0;if(this._codeEditor.getOption(41).seedSearchStringFromSelection&&ce){const ne=this._codeEditor.getDomNode();if(ne){const J=c.getDomNodePagePosition(ne),B=this._codeEditor.getScrolledVisiblePosition(ce.getStartPosition()),U=J.left+(B?B.left:0),z=B?B.top:0;if(this._viewZone&&z<this._viewZone.heightInPx){ce.endLineNumber>ce.startLineNumber&&(ie=!1);const $=c.getTopLeftOffset(this._domNode).left;U>$&&(ie=!1);const Q=this._codeEditor.getScrolledVisiblePosition(ce.getEndPosition());J.left+(Q?Q.left:0)>$&&(ie=!1)}}}this._showViewZone(ie)}}_hide(ce){this._revealTimeouts.forEach(ie=>{clearTimeout(ie)}),this._revealTimeouts=[],this._isVisible&&(this._isVisible=!1,this._updateButtons(),this._domNode.classList.remove("visible"),this._domNode.setAttribute("aria-hidden","true"),this._findInput.clearMessage(),ce&&this._codeEditor.focus(),this._codeEditor.layoutOverlayWidget(this),this._removeViewZone())}_layoutViewZone(ce){if(!this._codeEditor.getOption(41).addExtraSpaceOnTop){this._removeViewZone();return}if(!this._isVisible)return;const ne=this._viewZone;this._viewZoneId!==void 0||!ne||this._codeEditor.changeViewZones(J=>{ne.heightInPx=this._getHeight(),this._viewZoneId=J.addZone(ne),this._codeEditor.setScrollTop(ce||this._codeEditor.getScrollTop()+ne.heightInPx)})}_showViewZone(ce=!0){if(!this._isVisible||!this._codeEditor.getOption(41).addExtraSpaceOnTop)return;this._viewZone===void 0&&(this._viewZone=new P(0));const ne=this._viewZone;this._codeEditor.changeViewZones(J=>{if(this._viewZoneId!==void 0){const B=this._getHeight();if(B===ne.heightInPx)return;const U=B-ne.heightInPx;ne.heightInPx=B,J.layoutZone(this._viewZoneId),ce&&this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()+U);return}else{let B=this._getHeight();if(B-=this._codeEditor.getOption(84).top,B<=0)return;ne.heightInPx=B,this._viewZoneId=J.addZone(ne),ce&&this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()+B)}})}_removeViewZone(){this._codeEditor.changeViewZones(ce=>{this._viewZoneId!==void 0&&(ce.removeZone(this._viewZoneId),this._viewZoneId=void 0,this._viewZone&&(this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()-this._viewZone.heightInPx),this._viewZone=void 0))})}_tryUpdateWidgetWidth(){if(!this._isVisible||!this._domNode.isConnected)return;const ce=this._codeEditor.getLayoutInfo();if(ce.contentWidth<=0){this._domNode.classList.add("hiddenEditor");return}else this._domNode.classList.contains("hiddenEditor")&&this._domNode.classList.remove("hiddenEditor");const ne=ce.width,J=ce.minimap.minimapWidth;let B=!1,U=!1,z=!1;if(this._resized&&c.getTotalWidth(this._domNode)>H){this._domNode.style.maxWidth=`${ne-28-J-15}px`,this._replaceInput.width=c.getTotalWidth(this._findInput.domNode);return}if(H+28+J>=ne&&(U=!0),H+28+J-Y>=ne&&(z=!0),H+28+J-Y>=ne+50&&(B=!0),this._domNode.classList.toggle("collapsed-find-widget",B),this._domNode.classList.toggle("narrow-find-widget",z),this._domNode.classList.toggle("reduced-find-widget",U),!z&&!B&&(this._domNode.style.maxWidth=`${ne-28-J-15}px`),this._findInput.layout({collapsedFindWidget:B,narrowFindWidget:z,reducedFindWidget:U}),this._resized){const $=this._findInput.inputBox.element.clientWidth;$>0&&(this._replaceInput.width=$)}else this._isReplaceVisible&&(this._replaceInput.width=c.getTotalWidth(this._findInput.domNode))}_getHeight(){let ce=0;return ce+=4,ce+=this._findInput.inputBox.height+2,this._isReplaceVisible&&(ce+=4,ce+=this._replaceInput.inputBox.height+2),ce+=4,ce}_tryUpdateHeight(){const ce=this._getHeight();return this._cachedHeight!==null&&this._cachedHeight===ce?!1:(this._cachedHeight=ce,this._domNode.style.height=`${ce}px`,!0)}focusFindInput(){this._findInput.select(),this._findInput.focus()}focusReplaceInput(){this._replaceInput.select(),this._replaceInput.focus()}highlightFindOptions(){this._findInput.highlightFindOptions()}_updateSearchScope(){if(this._codeEditor.hasModel()&&this._toggleSelectionFind.checked){const ce=this._codeEditor.getSelections();ce.map(ie=>{ie.endColumn===1&&ie.endLineNumber>ie.startLineNumber&&(ie=ie.setEndPosition(ie.endLineNumber-1,this._codeEditor.getModel().getLineMaxColumn(ie.endLineNumber-1)));const ne=this._state.currentMatch;return ie.startLineNumber!==ie.endLineNumber&&!t.Range.equalsRange(ie,ne)?ie:null}).filter(ie=>!!ie),ce.length&&this._state.change({searchScope:ce},!0)}}_onFindInputMouseDown(ce){ce.middleButton&&ce.stopPropagation()}_onFindInputKeyDown(ce){if(ce.equals(j|3))if(this._keybindingService.dispatchEvent(ce,ce.target)){ce.preventDefault();return}else{this._findInput.inputBox.insertAtCursor(`
|
|
685
685
|
`),ce.preventDefault();return}if(ce.equals(2)){this._isReplaceVisible?this._replaceInput.focus():this._findInput.focusOnCaseSensitive(),ce.preventDefault();return}if(ce.equals(2066)){this._codeEditor.focus(),ce.preventDefault();return}if(ce.equals(16))return te(ce,this._findInput.getValue(),this._findInput.domNode.querySelector("textarea"));if(ce.equals(18))return se(ce,this._findInput.getValue(),this._findInput.domNode.querySelector("textarea"))}_onReplaceInputKeyDown(ce){if(ce.equals(j|3))if(this._keybindingService.dispatchEvent(ce,ce.target)){ce.preventDefault();return}else{n.isWindows&&n.isNative&&!this._ctrlEnterReplaceAllWarningPrompted&&(this._notificationService.info(o.localize(830,"Ctrl+Enter now inserts line break instead of replacing all. You can modify the keybinding for editor.action.replaceAll to override this behavior.")),this._ctrlEnterReplaceAllWarningPrompted=!0,this._storageService.store(Z,!0,0,0)),this._replaceInput.inputBox.insertAtCursor(`
|
|
686
686
|
`),ce.preventDefault();return}if(ce.equals(2)){this._findInput.focusOnCaseSensitive(),ce.preventDefault();return}if(ce.equals(1026)){this._findInput.focus(),ce.preventDefault();return}if(ce.equals(2066)){this._codeEditor.focus(),ce.preventDefault();return}if(ce.equals(16))return te(ce,this._replaceInput.inputBox.value,this._replaceInput.inputBox.element.querySelector("textarea"));if(ce.equals(18))return se(ce,this._replaceInput.inputBox.value,this._replaceInput.inputBox.element.querySelector("textarea"))}getVerticalSashLeft(ce){return 0}_keybindingLabelFor(ce){const ie=this._keybindingService.lookupKeybinding(ce);return ie?` (${ie.getLabel()})`:""}_buildDomNode(){this._findInput=this._register(new g.ContextScopedFindInput(null,this._contextViewProvider,{width:G,label:I,placeholder:T,appendCaseSensitiveLabel:this._keybindingLabelFor(i.FIND_IDS.ToggleCaseSensitiveCommand),appendWholeWordsLabel:this._keybindingLabelFor(i.FIND_IDS.ToggleWholeWordCommand),appendRegexLabel:this._keybindingLabelFor(i.FIND_IDS.ToggleRegexCommand),validation:ee=>{if(ee.length===0||!this._findInput.getRegex())return null;try{return new RegExp(ee,"gu"),null}catch(le){return{content:le.message}}},flexibleHeight:!0,flexibleWidth:!0,flexibleMaxHeight:118,showCommonFindToggles:!0,showHistoryHint:()=>(0,h.showHistoryKeybindingHint)(this._keybindingService),inputBoxStyles:b.defaultInputBoxStyles,toggleStyles:b.defaultToggleStyles},this._contextKeyService)),this._findInput.setRegex(!!this._state.isRegex),this._findInput.setCaseSensitive(!!this._state.matchCase),this._findInput.setWholeWords(!!this._state.wholeWord),this._register(this._findInput.onKeyDown(ee=>this._onFindInputKeyDown(ee))),this._register(this._findInput.inputBox.onDidChange(()=>{this._ignoreChangeEvent||this._state.change({searchString:this._findInput.getValue()},!0)})),this._register(this._findInput.onDidOptionChange(()=>{this._state.change({isRegex:this._findInput.getRegex(),wholeWord:this._findInput.getWholeWords(),matchCase:this._findInput.getCaseSensitive()},!0)})),this._register(this._findInput.onCaseSensitiveKeyDown(ee=>{ee.equals(1026)&&this._isReplaceVisible&&(this._replaceInput.focus(),ee.preventDefault())})),this._register(this._findInput.onRegexKeyDown(ee=>{ee.equals(2)&&this._isReplaceVisible&&(this._replaceInput.focusOnPreserve(),ee.preventDefault())})),this._register(this._findInput.inputBox.onDidHeightChange(ee=>{this._tryUpdateHeight()&&this._showViewZone()})),n.isLinux&&this._register(this._findInput.onMouseDown(ee=>this._onFindInputMouseDown(ee))),this._matchesCount=document.createElement("div"),this._matchesCount.className="matchesCount",this._updateMatchesCount();const ne=this._register((0,v.createInstantHoverDelegate)());this._prevBtn=this._register(new ge({label:M+this._keybindingLabelFor(i.FIND_IDS.PreviousMatchFindAction),icon:e.findPreviousMatchIcon,hoverDelegate:ne,onTrigger:()=>{(0,u.assertIsDefined)(this._codeEditor.getAction(i.FIND_IDS.PreviousMatchFindAction)).run().then(void 0,C.onUnexpectedError)}},this._hoverService)),this._nextBtn=this._register(new ge({label:A+this._keybindingLabelFor(i.FIND_IDS.NextMatchFindAction),icon:e.findNextMatchIcon,hoverDelegate:ne,onTrigger:()=>{(0,u.assertIsDefined)(this._codeEditor.getAction(i.FIND_IDS.NextMatchFindAction)).run().then(void 0,C.onUnexpectedError)}},this._hoverService));const J=document.createElement("div");J.className="find-part",J.appendChild(this._findInput.domNode);const B=document.createElement("div");B.className="find-actions",J.appendChild(B),B.appendChild(this._matchesCount),B.appendChild(this._prevBtn.domNode),B.appendChild(this._nextBtn.domNode),this._toggleSelectionFind=this._register(new E.Toggle({icon:e.findSelectionIcon,title:R+this._keybindingLabelFor(i.FIND_IDS.ToggleSearchScopeCommand),isChecked:!1,hoverDelegate:ne,inputActiveOptionBackground:(0,l.asCssVariable)(l.inputActiveOptionBackground),inputActiveOptionBorder:(0,l.asCssVariable)(l.inputActiveOptionBorder),inputActiveOptionForeground:(0,l.asCssVariable)(l.inputActiveOptionForeground)})),this._register(this._toggleSelectionFind.onChange(()=>{if(this._toggleSelectionFind.checked){if(this._codeEditor.hasModel()){let ee=this._codeEditor.getSelections();ee=ee.map(le=>(le.endColumn===1&&le.endLineNumber>le.startLineNumber&&(le=le.setEndPosition(le.endLineNumber-1,this._codeEditor.getModel().getLineMaxColumn(le.endLineNumber-1))),le.isEmpty()?null:le)).filter(le=>!!le),ee.length&&this._state.change({searchScope:ee},!0)}}else this._state.change({searchScope:null},!0)})),B.appendChild(this._toggleSelectionFind.domNode),this._closeBtn=this._register(new ge({label:N+this._keybindingLabelFor(i.FIND_IDS.CloseFindWidgetCommand),icon:a.widgetClose,hoverDelegate:ne,onTrigger:()=>{this._state.change({isRevealed:!1,searchScope:null},!1)},onKeyDown:ee=>{ee.equals(2)&&this._isReplaceVisible&&(this._replaceBtn.isEnabled()?this._replaceBtn.focus():this._codeEditor.focus(),ee.preventDefault())}},this._hoverService)),this._replaceInput=this._register(new g.ContextScopedReplaceInput(null,void 0,{label:O,placeholder:x,appendPreserveCaseLabel:this._keybindingLabelFor(i.FIND_IDS.TogglePreserveCaseCommand),history:[],flexibleHeight:!0,flexibleWidth:!0,flexibleMaxHeight:118,showHistoryHint:()=>(0,h.showHistoryKeybindingHint)(this._keybindingService),inputBoxStyles:b.defaultInputBoxStyles,toggleStyles:b.defaultToggleStyles},this._contextKeyService,!0)),this._replaceInput.setPreserveCase(!!this._state.preserveCase),this._register(this._replaceInput.onKeyDown(ee=>this._onReplaceInputKeyDown(ee))),this._register(this._replaceInput.inputBox.onDidChange(()=>{this._state.change({replaceString:this._replaceInput.inputBox.value},!1)})),this._register(this._replaceInput.inputBox.onDidHeightChange(ee=>{this._isReplaceVisible&&this._tryUpdateHeight()&&this._showViewZone()})),this._register(this._replaceInput.onDidOptionChange(()=>{this._state.change({preserveCase:this._replaceInput.getPreserveCase()},!0)})),this._register(this._replaceInput.onPreserveCaseKeyDown(ee=>{ee.equals(2)&&(this._prevBtn.isEnabled()?this._prevBtn.focus():this._nextBtn.isEnabled()?this._nextBtn.focus():this._toggleSelectionFind.enabled?this._toggleSelectionFind.focus():this._closeBtn.isEnabled()&&this._closeBtn.focus(),ee.preventDefault())}));const U=this._register((0,v.createInstantHoverDelegate)());this._replaceBtn=this._register(new ge({label:F+this._keybindingLabelFor(i.FIND_IDS.ReplaceOneAction),icon:e.findReplaceIcon,hoverDelegate:U,onTrigger:()=>{this._controller.replace()},onKeyDown:ee=>{ee.equals(1026)&&(this._closeBtn.focus(),ee.preventDefault())}},this._hoverService)),this._replaceAllBtn=this._register(new ge({label:W+this._keybindingLabelFor(i.FIND_IDS.ReplaceAllAction),icon:e.findReplaceAllIcon,hoverDelegate:U,onTrigger:()=>{this._controller.replaceAll()}},this._hoverService));const z=document.createElement("div");z.className="replace-part",z.appendChild(this._replaceInput.domNode);const $=document.createElement("div");$.className="replace-actions",z.appendChild($),$.appendChild(this._replaceBtn.domNode),$.appendChild(this._replaceAllBtn.domNode),this._toggleReplaceBtn=this._register(new ge({label:V,className:"codicon toggle left",onTrigger:()=>{this._state.change({isReplaceRevealed:!this._isReplaceVisible},!1),this._isReplaceVisible&&(this._replaceInput.width=c.getTotalWidth(this._findInput.domNode),this._replaceInput.inputBox.layout()),this._showViewZone()}},this._hoverService)),this._toggleReplaceBtn.setExpanded(this._isReplaceVisible),this._domNode=document.createElement("div"),this._domNode.className="editor-widget find-widget",this._domNode.setAttribute("aria-hidden","true"),this._domNode.ariaLabel=D,this._domNode.role="dialog",this._domNode.style.width=`${H}px`,this._domNode.appendChild(this._toggleReplaceBtn.domNode),this._domNode.appendChild(J),this._domNode.appendChild(this._closeBtn.domNode),this._domNode.appendChild(z),this._resizeSash=this._register(new L.Sash(this._domNode,this,{orientation:0,size:2})),this._resized=!1;let Q=H;this._register(this._resizeSash.onDidStart(()=>{Q=c.getTotalWidth(this._domNode)})),this._register(this._resizeSash.onDidChange(ee=>{this._resized=!0;const le=Q+ee.startX-ee.currentX;if(le<H)return;const de=parseFloat(c.getComputedStyle(this._domNode).maxWidth)||0;le>de||(this._domNode.style.width=`${le}px`,this._isReplaceVisible&&(this._replaceInput.width=c.getTotalWidth(this._findInput.domNode)),this._findInput.inputBox.layout(),this._tryUpdateHeight())})),this._register(this._resizeSash.onDidReset(()=>{const ee=c.getTotalWidth(this._domNode);if(ee<H)return;let le=H;if(!this._resized||ee===H){const de=this._codeEditor.getLayoutInfo();le=de.width-28-de.minimap.minimapWidth-15,this._resized=!0}this._domNode.style.width=`${le}px`,this._isReplaceVisible&&(this._replaceInput.width=c.getTotalWidth(this._findInput.domNode)),this._findInput.inputBox.layout()}))}updateAccessibilitySupport(){const ce=this._codeEditor.getOption(2);this._findInput.setFocusInputOnOptionClick(ce!==2)}}e.FindWidget=ue;class ge extends y.Widget{constructor(ce,ie){super(),this._opts=ce;let ne="button";this._opts.className&&(ne=ne+" "+this._opts.className),this._opts.icon&&(ne=ne+" "+d.ThemeIcon.asClassName(this._opts.icon)),this._domNode=document.createElement("div"),this._domNode.tabIndex=0,this._domNode.className=ne,this._domNode.setAttribute("role","button"),this._domNode.setAttribute("aria-label",this._opts.label),this._register(ie.setupManagedHover(ce.hoverDelegate??(0,v.getDefaultHoverDelegate)("element"),this._domNode,this._opts.label)),this.onclick(this._domNode,J=>{this._opts.onTrigger(),J.preventDefault()}),this.onkeydown(this._domNode,J=>{if(J.equals(10)||J.equals(3)){this._opts.onTrigger(),J.preventDefault();return}this._opts.onKeyDown?.(J)})}get domNode(){return this._domNode}isEnabled(){return this._domNode.tabIndex>=0}focus(){this._domNode.focus()}setEnabled(ce){this._domNode.classList.toggle("disabled",!ce),this._domNode.setAttribute("aria-disabled",String(!ce)),this._domNode.tabIndex=ce?0:-1}setExpanded(ce){this._domNode.setAttribute("aria-expanded",String(!!ce)),ce?(this._domNode.classList.remove(...d.ThemeIcon.asClassNameArray(w)),this._domNode.classList.add(...d.ThemeIcon.asClassNameArray(S))):(this._domNode.classList.remove(...d.ThemeIcon.asClassNameArray(S)),this._domNode.classList.add(...d.ThemeIcon.asClassNameArray(w)))}}e.SimpleButton=ge,(0,r.registerThemingParticipant)((pe,ce)=>{const ie=pe.getColor(l.editorFindMatchHighlightBorder);ie&&ce.addRule(`.monaco-editor .findMatch { border: 1px ${(0,m.isHighContrast)(pe.type)?"dotted":"solid"} ${ie}; box-sizing: border-box; }`);const ne=pe.getColor(l.editorFindRangeHighlightBorder);ne&&ce.addRule(`.monaco-editor .findScope { border: 1px ${(0,m.isHighContrast)(pe.type)?"dashed":"solid"} ${ne}; }`);const J=pe.getColor(l.contrastBorder);J&&ce.addRule(`.monaco-editor .find-widget { border: 1px solid ${J}; }`);const B=pe.getColor(l.editorFindMatchForeground);B&&ce.addRule(`.monaco-editor .findMatchInline { color: ${B}; }`);const U=pe.getColor(l.editorFindMatchHighlightForeground);U&&ce.addRule(`.monaco-editor .currentFindMatchInline { color: ${U}; }`)})}),define(oe[418],re([1,0,14,2,11,15,80,20,40,219,815,816,817,3,29,116,12,58,31,50,63,100,25,117]),function(ae,e,c,k,E,L,y,f,_,C,p,n,s,t,i,o,g,h,l,a,r,d,m,u){"use strict";var b;Object.defineProperty(e,"__esModule",{value:!0}),e.StartFindReplaceAction=e.PreviousSelectionMatchFindAction=e.NextSelectionMatchFindAction=e.SelectionMatchFindAction=e.MoveToMatchFindAction=e.PreviousMatchFindAction=e.NextMatchFindAction=e.MatchFindAction=e.StartFindWithSelectionAction=e.StartFindWithArgsAction=e.StartFindAction=e.FindController=e.CommonFindController=void 0,e.getSelectionSearchString=w;const v=524288;function w(q,H="single",K=!1){if(!q.hasModel())return null;const G=q.getSelection();if(H==="single"&&G.startLineNumber===G.endLineNumber||H==="multiple"){if(G.isEmpty()){const Y=q.getConfiguredWordAtPosition(G.getStartPosition());if(Y&&K===!1)return Y.word}else if(q.getModel().getValueLengthInRange(G)<v)return q.getModel().getValueInRange(G)}return null}let S=class extends k.Disposable{static{b=this}static{this.ID="editor.contrib.findController"}get editor(){return this._editor}static get(H){return H.getContribution(b.ID)}constructor(H,K,G,Y,X,Z){super(),this._editor=H,this._findWidgetVisible=C.CONTEXT_FIND_WIDGET_VISIBLE.bindTo(K),this._contextKeyService=K,this._storageService=G,this._clipboardService=Y,this._notificationService=X,this._hoverService=Z,this._updateHistoryDelayer=new c.Delayer(500),this._state=this._register(new n.FindReplaceState),this.loadQueryState(),this._register(this._state.onFindReplaceStateChange(j=>this._onStateChanged(j))),this._model=null,this._register(this._editor.onDidChangeModel(()=>{const j=this._editor.getModel()&&this._state.isRevealed;this.disposeModel(),this._state.change({searchScope:null,matchCase:this._storageService.getBoolean("editor.matchCase",1,!1),wholeWord:this._storageService.getBoolean("editor.wholeWord",1,!1),isRegex:this._storageService.getBoolean("editor.isRegex",1,!1),preserveCase:this._storageService.getBoolean("editor.preserveCase",1,!1)},!1),j&&this._start({forceRevealReplace:!1,seedSearchStringFromSelection:"none",seedSearchStringFromNonEmptySelection:!1,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!1,updateSearchScope:!1,loop:this._editor.getOption(41).loop})}))}dispose(){this.disposeModel(),super.dispose()}disposeModel(){this._model&&(this._model.dispose(),this._model=null)}_onStateChanged(H){this.saveQueryState(H),H.isRevealed&&(this._state.isRevealed?this._findWidgetVisible.set(!0):(this._findWidgetVisible.reset(),this.disposeModel())),H.searchString&&this.setGlobalBufferTerm(this._state.searchString)}saveQueryState(H){H.isRegex&&this._storageService.store("editor.isRegex",this._state.actualIsRegex,1,1),H.wholeWord&&this._storageService.store("editor.wholeWord",this._state.actualWholeWord,1,1),H.matchCase&&this._storageService.store("editor.matchCase",this._state.actualMatchCase,1,1),H.preserveCase&&this._storageService.store("editor.preserveCase",this._state.actualPreserveCase,1,1)}loadQueryState(){this._state.change({matchCase:this._storageService.getBoolean("editor.matchCase",1,this._state.matchCase),wholeWord:this._storageService.getBoolean("editor.wholeWord",1,this._state.wholeWord),isRegex:this._storageService.getBoolean("editor.isRegex",1,this._state.isRegex),preserveCase:this._storageService.getBoolean("editor.preserveCase",1,this._state.preserveCase)},!1)}isFindInputFocused(){return!!C.CONTEXT_FIND_INPUT_FOCUSED.getValue(this._contextKeyService)}getState(){return this._state}closeFindWidget(){this._state.change({isRevealed:!1,searchScope:null},!1),this._editor.focus()}toggleCaseSensitive(){this._state.change({matchCase:!this._state.matchCase},!1),this._state.isRevealed||this.highlightFindOptions()}toggleWholeWords(){this._state.change({wholeWord:!this._state.wholeWord},!1),this._state.isRevealed||this.highlightFindOptions()}toggleRegex(){this._state.change({isRegex:!this._state.isRegex},!1),this._state.isRevealed||this.highlightFindOptions()}togglePreserveCase(){this._state.change({preserveCase:!this._state.preserveCase},!1),this._state.isRevealed||this.highlightFindOptions()}toggleSearchScope(){if(this._state.searchScope)this._state.change({searchScope:null},!0);else if(this._editor.hasModel()){let H=this._editor.getSelections();H=H.map(K=>(K.endColumn===1&&K.endLineNumber>K.startLineNumber&&(K=K.setEndPosition(K.endLineNumber-1,this._editor.getModel().getLineMaxColumn(K.endLineNumber-1))),K.isEmpty()?null:K)).filter(K=>!!K),H.length&&this._state.change({searchScope:H},!0)}}setSearchString(H){this._state.isRegex&&(H=E.escapeRegExpCharacters(H)),this._state.change({searchString:H},!1)}highlightFindOptions(H=!1){}async _start(H,K){if(this.disposeModel(),!this._editor.hasModel())return;const G={...K,isRevealed:!0};if(H.seedSearchStringFromSelection==="single"){const Y=w(this._editor,H.seedSearchStringFromSelection,H.seedSearchStringFromNonEmptySelection);Y&&(this._state.isRegex?G.searchString=E.escapeRegExpCharacters(Y):G.searchString=Y)}else if(H.seedSearchStringFromSelection==="multiple"&&!H.updateSearchScope){const Y=w(this._editor,H.seedSearchStringFromSelection);Y&&(G.searchString=Y)}if(!G.searchString&&H.seedSearchStringFromGlobalClipboard){const Y=await this.getGlobalBufferTerm();if(!this._editor.hasModel())return;Y&&(G.searchString=Y)}if(H.forceRevealReplace||G.isReplaceRevealed?G.isReplaceRevealed=!0:this._findWidgetVisible.get()||(G.isReplaceRevealed=!1),H.updateSearchScope){const Y=this._editor.getSelections();Y.some(X=>!X.isEmpty())&&(G.searchScope=Y)}G.loop=H.loop,this._state.change(G,!1),this._model||(this._model=new C.FindModelBoundToEditorModel(this._editor,this._state))}start(H,K){return this._start(H,K)}moveToNextMatch(){return this._model?(this._model.moveToNextMatch(),!0):!1}moveToPrevMatch(){return this._model?(this._model.moveToPrevMatch(),!0):!1}goToMatch(H){return this._model?(this._model.moveToMatch(H),!0):!1}replace(){return this._model?(this._model.replace(),!0):!1}replaceAll(){return this._model?this._editor.getModel()?.isTooLargeForHeapOperation()?(this._notificationService.warn(t.localize(831,"The file is too large to perform a replace all operation.")),!1):(this._model.replaceAll(),!0):!1}selectAllMatches(){return this._model?(this._model.selectAllMatches(),this._editor.focus(),!0):!1}async getGlobalBufferTerm(){return this._editor.getOption(41).globalFindClipboard&&this._editor.hasModel()&&!this._editor.getModel().isTooLargeForSyncing()?this._clipboardService.readFindText():""}setGlobalBufferTerm(H){this._editor.getOption(41).globalFindClipboard&&this._editor.hasModel()&&!this._editor.getModel().isTooLargeForSyncing()&&this._clipboardService.writeFindText(H)}};e.CommonFindController=S,e.CommonFindController=S=b=De([he(1,g.IContextKeyService),he(2,d.IStorageService),he(3,o.IClipboardService),he(4,a.INotificationService),he(5,u.IHoverService)],S);let D=class extends S{constructor(H,K,G,Y,X,Z,j,P,te){super(H,G,j,P,Z,te),this._contextViewService=K,this._keybindingService=Y,this._themeService=X,this._widget=null,this._findOptionsWidget=null}async _start(H,K){this._widget||this._createFindWidget();const G=this._editor.getSelection();let Y=!1;switch(this._editor.getOption(41).autoFindInSelection){case"always":Y=!0;break;case"never":Y=!1;break;case"multiline":{Y=!!G&&G.startLineNumber!==G.endLineNumber;break}default:break}H.updateSearchScope=H.updateSearchScope||Y,await super._start(H,K),this._widget&&(H.shouldFocus===2?this._widget.focusReplaceInput():H.shouldFocus===1&&this._widget.focusFindInput())}highlightFindOptions(H=!1){this._widget||this._createFindWidget(),this._state.isRevealed&&!H?this._widget.highlightFindOptions():this._findOptionsWidget.highlightFindOptions()}_createFindWidget(){this._widget=this._register(new s.FindWidget(this._editor,this,this._state,this._contextViewService,this._keybindingService,this._contextKeyService,this._themeService,this._storageService,this._notificationService,this._hoverService)),this._findOptionsWidget=this._register(new p.FindOptionsWidget(this._editor,this._state,this._keybindingService))}};e.FindController=D,e.FindController=D=De([he(1,h.IContextViewService),he(2,g.IContextKeyService),he(3,l.IKeybindingService),he(4,m.IThemeService),he(5,a.INotificationService),he(6,d.IStorageService),he(7,o.IClipboardService),he(8,u.IHoverService)],D),e.StartFindAction=(0,L.registerMultiEditorAction)(new L.MultiEditorAction({id:C.FIND_IDS.StartFindAction,label:t.localize(832,"Find"),alias:"Find",precondition:g.ContextKeyExpr.or(f.EditorContextKeys.focus,g.ContextKeyExpr.has("editorIsOpen")),kbOpts:{kbExpr:null,primary:2084,weight:100},menuOpts:{menuId:i.MenuId.MenubarEditMenu,group:"3_find",title:t.localize(833,"&&Find"),order:1}})),e.StartFindAction.addImplementation(0,(q,H,K)=>{const G=S.get(H);return G?G.start({forceRevealReplace:!1,seedSearchStringFromSelection:H.getOption(41).seedSearchStringFromSelection!=="never"?"single":"none",seedSearchStringFromNonEmptySelection:H.getOption(41).seedSearchStringFromSelection==="selection",seedSearchStringFromGlobalClipboard:H.getOption(41).globalFindClipboard,shouldFocus:1,shouldAnimate:!0,updateSearchScope:!1,loop:H.getOption(41).loop}):!1});const I={description:"Open a new In-Editor Find Widget.",args:[{name:"Open a new In-Editor Find Widget args",schema:{properties:{searchString:{type:"string"},replaceString:{type:"string"},isRegex:{type:"boolean"},matchWholeWord:{type:"boolean"},isCaseSensitive:{type:"boolean"},preserveCase:{type:"boolean"},findInSelection:{type:"boolean"}}}}]};class T extends L.EditorAction{constructor(){super({id:C.FIND_IDS.StartFindWithArgs,label:t.localize(834,"Find With Arguments"),alias:"Find With Arguments",precondition:void 0,kbOpts:{kbExpr:null,primary:0,weight:100},metadata:I})}async run(H,K,G){const Y=S.get(K);if(Y){const X=G?{searchString:G.searchString,replaceString:G.replaceString,isReplaceRevealed:G.replaceString!==void 0,isRegex:G.isRegex,wholeWord:G.matchWholeWord,matchCase:G.isCaseSensitive,preserveCase:G.preserveCase}:{};await Y.start({forceRevealReplace:!1,seedSearchStringFromSelection:Y.getState().searchString.length===0&&K.getOption(41).seedSearchStringFromSelection!=="never"?"single":"none",seedSearchStringFromNonEmptySelection:K.getOption(41).seedSearchStringFromSelection==="selection",seedSearchStringFromGlobalClipboard:!0,shouldFocus:1,shouldAnimate:!0,updateSearchScope:G?.findInSelection||!1,loop:K.getOption(41).loop},X),Y.setGlobalBufferTerm(Y.getState().searchString)}}}e.StartFindWithArgsAction=T;class M extends L.EditorAction{constructor(){super({id:C.FIND_IDS.StartFindWithSelection,label:t.localize(835,"Find With Selection"),alias:"Find With Selection",precondition:void 0,kbOpts:{kbExpr:null,primary:0,mac:{primary:2083},weight:100}})}async run(H,K){const G=S.get(K);G&&(await G.start({forceRevealReplace:!1,seedSearchStringFromSelection:"multiple",seedSearchStringFromNonEmptySelection:!1,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:K.getOption(41).loop}),G.setGlobalBufferTerm(G.getState().searchString))}}e.StartFindWithSelectionAction=M;class A extends L.EditorAction{async run(H,K){const G=S.get(K);G&&!this._run(G)&&(await G.start({forceRevealReplace:!1,seedSearchStringFromSelection:G.getState().searchString.length===0&&K.getOption(41).seedSearchStringFromSelection!=="never"?"single":"none",seedSearchStringFromNonEmptySelection:K.getOption(41).seedSearchStringFromSelection==="selection",seedSearchStringFromGlobalClipboard:!0,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:K.getOption(41).loop}),this._run(G))}}e.MatchFindAction=A;class R extends A{constructor(){super({id:C.FIND_IDS.NextMatchFindAction,label:t.localize(836,"Find Next"),alias:"Find Next",precondition:void 0,kbOpts:[{kbExpr:f.EditorContextKeys.focus,primary:61,mac:{primary:2085,secondary:[61]},weight:100},{kbExpr:g.ContextKeyExpr.and(f.EditorContextKeys.focus,C.CONTEXT_FIND_INPUT_FOCUSED),primary:3,weight:100}]})}_run(H){return H.moveToNextMatch()?(H.editor.pushUndoStop(),!0):!1}}e.NextMatchFindAction=R;class N extends A{constructor(){super({id:C.FIND_IDS.PreviousMatchFindAction,label:t.localize(837,"Find Previous"),alias:"Find Previous",precondition:void 0,kbOpts:[{kbExpr:f.EditorContextKeys.focus,primary:1085,mac:{primary:3109,secondary:[1085]},weight:100},{kbExpr:g.ContextKeyExpr.and(f.EditorContextKeys.focus,C.CONTEXT_FIND_INPUT_FOCUSED),primary:1027,weight:100}]})}_run(H){return H.moveToPrevMatch()}}e.PreviousMatchFindAction=N;class O extends L.EditorAction{constructor(){super({id:C.FIND_IDS.GoToMatchFindAction,label:t.localize(838,"Go to Match..."),alias:"Go to Match...",precondition:C.CONTEXT_FIND_WIDGET_VISIBLE}),this._highlightDecorations=[]}run(H,K,G){const Y=S.get(K);if(!Y)return;const X=Y.getState().matchesCount;if(X<1){H.get(a.INotificationService).notify({severity:a.Severity.Warning,message:t.localize(839,"No matches. Try searching for something else.")});return}const j=H.get(r.IQuickInputService).createInputBox();j.placeholder=t.localize(840,"Type a number to go to a specific match (between 1 and {0})",X);const P=se=>{const ue=parseInt(se);if(isNaN(ue))return;const ge=Y.getState().matchesCount;if(ue>0&&ue<=ge)return ue-1;if(ue<0&&ue>=-ge)return ge+ue},te=se=>{const ue=P(se);if(typeof ue=="number"){j.validationMessage=void 0,Y.goToMatch(ue);const ge=Y.getState().currentMatch;ge&&this.addDecorations(K,ge)}else j.validationMessage=t.localize(841,"Please type a number between 1 and {0}",Y.getState().matchesCount),this.clearDecorations(K)};j.onDidChangeValue(se=>{te(se)}),j.onDidAccept(()=>{const se=P(j.value);typeof se=="number"?(Y.goToMatch(se),j.hide()):j.validationMessage=t.localize(842,"Please type a number between 1 and {0}",Y.getState().matchesCount)}),j.onDidHide(()=>{this.clearDecorations(K),j.dispose()}),j.show()}clearDecorations(H){H.changeDecorations(K=>{this._highlightDecorations=K.deltaDecorations(this._highlightDecorations,[])})}addDecorations(H,K){H.changeDecorations(G=>{this._highlightDecorations=G.deltaDecorations(this._highlightDecorations,[{range:K,options:{description:"find-match-quick-access-range-highlight",className:"rangeHighlight",isWholeLine:!0}},{range:K,options:{description:"find-match-quick-access-range-highlight-overview",overviewRuler:{color:(0,m.themeColorFromId)(y.overviewRulerRangeHighlight),position:_.OverviewRulerLane.Full}}}])})}}e.MoveToMatchFindAction=O;class x extends L.EditorAction{async run(H,K){const G=S.get(K);if(!G)return;const Y=w(K,"single",!1);Y&&G.setSearchString(Y),this._run(G)||(await G.start({forceRevealReplace:!1,seedSearchStringFromSelection:"none",seedSearchStringFromNonEmptySelection:!1,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:K.getOption(41).loop}),this._run(G))}}e.SelectionMatchFindAction=x;class F extends x{constructor(){super({id:C.FIND_IDS.NextSelectionMatchFindAction,label:t.localize(843,"Find Next Selection"),alias:"Find Next Selection",precondition:void 0,kbOpts:{kbExpr:f.EditorContextKeys.focus,primary:2109,weight:100}})}_run(H){return H.moveToNextMatch()}}e.NextSelectionMatchFindAction=F;class W extends x{constructor(){super({id:C.FIND_IDS.PreviousSelectionMatchFindAction,label:t.localize(844,"Find Previous Selection"),alias:"Find Previous Selection",precondition:void 0,kbOpts:{kbExpr:f.EditorContextKeys.focus,primary:3133,weight:100}})}_run(H){return H.moveToPrevMatch()}}e.PreviousSelectionMatchFindAction=W,e.StartFindReplaceAction=(0,L.registerMultiEditorAction)(new L.MultiEditorAction({id:C.FIND_IDS.StartFindReplaceAction,label:t.localize(845,"Replace"),alias:"Replace",precondition:g.ContextKeyExpr.or(f.EditorContextKeys.focus,g.ContextKeyExpr.has("editorIsOpen")),kbOpts:{kbExpr:null,primary:2086,mac:{primary:2596},weight:100},menuOpts:{menuId:i.MenuId.MenubarEditMenu,group:"3_find",title:t.localize(846,"&&Replace"),order:2}})),e.StartFindReplaceAction.addImplementation(0,(q,H,K)=>{if(!H.hasModel()||H.getOption(92))return!1;const G=S.get(H);if(!G)return!1;const Y=H.getSelection(),X=G.isFindInputFocused(),Z=!Y.isEmpty()&&Y.startLineNumber===Y.endLineNumber&&H.getOption(41).seedSearchStringFromSelection!=="never"&&!X,j=X||Z?2:1;return G.start({forceRevealReplace:!0,seedSearchStringFromSelection:Z?"single":"none",seedSearchStringFromNonEmptySelection:H.getOption(41).seedSearchStringFromSelection==="selection",seedSearchStringFromGlobalClipboard:H.getOption(41).seedSearchStringFromSelection!=="never",shouldFocus:j,shouldAnimate:!0,updateSearchScope:!1,loop:H.getOption(41).loop})}),(0,L.registerEditorContribution)(S.ID,D,0),(0,L.registerEditorAction)(T),(0,L.registerEditorAction)(M),(0,L.registerEditorAction)(R),(0,L.registerEditorAction)(N),(0,L.registerEditorAction)(O),(0,L.registerEditorAction)(F),(0,L.registerEditorAction)(W);const V=L.EditorCommand.bindToContribution(S.get);(0,L.registerEditorCommand)(new V({id:C.FIND_IDS.CloseFindWidgetCommand,precondition:C.CONTEXT_FIND_WIDGET_VISIBLE,handler:q=>q.closeFindWidget(),kbOpts:{weight:105,kbExpr:g.ContextKeyExpr.and(f.EditorContextKeys.focus,g.ContextKeyExpr.not("isComposing")),primary:9,secondary:[1033]}})),(0,L.registerEditorCommand)(new V({id:C.FIND_IDS.ToggleCaseSensitiveCommand,precondition:void 0,handler:q=>q.toggleCaseSensitive(),kbOpts:{weight:105,kbExpr:f.EditorContextKeys.focus,primary:C.ToggleCaseSensitiveKeybinding.primary,mac:C.ToggleCaseSensitiveKeybinding.mac,win:C.ToggleCaseSensitiveKeybinding.win,linux:C.ToggleCaseSensitiveKeybinding.linux}})),(0,L.registerEditorCommand)(new V({id:C.FIND_IDS.ToggleWholeWordCommand,precondition:void 0,handler:q=>q.toggleWholeWords(),kbOpts:{weight:105,kbExpr:f.EditorContextKeys.focus,primary:C.ToggleWholeWordKeybinding.primary,mac:C.ToggleWholeWordKeybinding.mac,win:C.ToggleWholeWordKeybinding.win,linux:C.ToggleWholeWordKeybinding.linux}})),(0,L.registerEditorCommand)(new V({id:C.FIND_IDS.ToggleRegexCommand,precondition:void 0,handler:q=>q.toggleRegex(),kbOpts:{weight:105,kbExpr:f.EditorContextKeys.focus,primary:C.ToggleRegexKeybinding.primary,mac:C.ToggleRegexKeybinding.mac,win:C.ToggleRegexKeybinding.win,linux:C.ToggleRegexKeybinding.linux}})),(0,L.registerEditorCommand)(new V({id:C.FIND_IDS.ToggleSearchScopeCommand,precondition:void 0,handler:q=>q.toggleSearchScope(),kbOpts:{weight:105,kbExpr:f.EditorContextKeys.focus,primary:C.ToggleSearchScopeKeybinding.primary,mac:C.ToggleSearchScopeKeybinding.mac,win:C.ToggleSearchScopeKeybinding.win,linux:C.ToggleSearchScopeKeybinding.linux}})),(0,L.registerEditorCommand)(new V({id:C.FIND_IDS.TogglePreserveCaseCommand,precondition:void 0,handler:q=>q.togglePreserveCase(),kbOpts:{weight:105,kbExpr:f.EditorContextKeys.focus,primary:C.TogglePreserveCaseKeybinding.primary,mac:C.TogglePreserveCaseKeybinding.mac,win:C.TogglePreserveCaseKeybinding.win,linux:C.TogglePreserveCaseKeybinding.linux}})),(0,L.registerEditorCommand)(new V({id:C.FIND_IDS.ReplaceOneAction,precondition:C.CONTEXT_FIND_WIDGET_VISIBLE,handler:q=>q.replace(),kbOpts:{weight:105,kbExpr:f.EditorContextKeys.focus,primary:3094}})),(0,L.registerEditorCommand)(new V({id:C.FIND_IDS.ReplaceOneAction,precondition:C.CONTEXT_FIND_WIDGET_VISIBLE,handler:q=>q.replace(),kbOpts:{weight:105,kbExpr:g.ContextKeyExpr.and(f.EditorContextKeys.focus,C.CONTEXT_REPLACE_INPUT_FOCUSED),primary:3}})),(0,L.registerEditorCommand)(new V({id:C.FIND_IDS.ReplaceAllAction,precondition:C.CONTEXT_FIND_WIDGET_VISIBLE,handler:q=>q.replaceAll(),kbOpts:{weight:105,kbExpr:f.EditorContextKeys.focus,primary:2563}})),(0,L.registerEditorCommand)(new V({id:C.FIND_IDS.ReplaceAllAction,precondition:C.CONTEXT_FIND_WIDGET_VISIBLE,handler:q=>q.replaceAll(),kbOpts:{weight:105,kbExpr:g.ContextKeyExpr.and(f.EditorContextKeys.focus,C.CONTEXT_REPLACE_INPUT_FOCUSED),primary:void 0,mac:{primary:2051}}})),(0,L.registerEditorCommand)(new V({id:C.FIND_IDS.SelectAllMatchesAction,precondition:C.CONTEXT_FIND_WIDGET_VISIBLE,handler:q=>q.selectAllMatches(),kbOpts:{weight:105,kbExpr:f.EditorContextKeys.focus,primary:515}}))}),define(oe[419],re([1,0,26,36,3,32,71,25,30]),function(ae,e,c,k,E,L,y,f,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FoldingDecorationProvider=e.foldingManualExpandedIcon=e.foldingManualCollapsedIcon=e.foldingCollapsedIcon=e.foldingExpandedIcon=void 0;const C=(0,L.registerColor)("editor.foldBackground",{light:(0,L.transparent)(L.editorSelectionBackground,.3),dark:(0,L.transparent)(L.editorSelectionBackground,.3),hcDark:null,hcLight:null},(0,E.localize)(776,"Background color behind folded ranges. The color must not be opaque so as not to hide underlying decorations."),!0);(0,L.registerColor)("editor.foldPlaceholderForeground",{light:"#808080",dark:"#808080",hcDark:null,hcLight:null},(0,E.localize)(777,"Color of the collapsed text after the first line of a folded range.")),(0,L.registerColor)("editorGutter.foldingControlForeground",L.iconForeground,(0,E.localize)(778,"Color of the folding control in the editor gutter.")),e.foldingExpandedIcon=(0,y.registerIcon)("folding-expanded",c.Codicon.chevronDown,(0,E.localize)(779,"Icon for expanded ranges in the editor glyph margin.")),e.foldingCollapsedIcon=(0,y.registerIcon)("folding-collapsed",c.Codicon.chevronRight,(0,E.localize)(780,"Icon for collapsed ranges in the editor glyph margin.")),e.foldingManualCollapsedIcon=(0,y.registerIcon)("folding-manual-collapsed",e.foldingCollapsedIcon,(0,E.localize)(781,"Icon for manually collapsed ranges in the editor glyph margin.")),e.foldingManualExpandedIcon=(0,y.registerIcon)("folding-manual-expanded",e.foldingExpandedIcon,(0,E.localize)(782,"Icon for manually expanded ranges in the editor glyph margin."));const p={color:(0,f.themeColorFromId)(C),position:1},n=(0,E.localize)(783,"Click to expand the range."),s=(0,E.localize)(784,"Click to collapse the range.");class t{static{this.COLLAPSED_VISUAL_DECORATION=k.ModelDecorationOptions.register({description:"folding-collapsed-visual-decoration",stickiness:0,afterContentClassName:"inline-folded",isWholeLine:!0,linesDecorationsTooltip:n,firstLineDecorationClassName:_.ThemeIcon.asClassName(e.foldingCollapsedIcon)})}static{this.COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION=k.ModelDecorationOptions.register({description:"folding-collapsed-highlighted-visual-decoration",stickiness:0,afterContentClassName:"inline-folded",className:"folded-background",minimap:p,isWholeLine:!0,linesDecorationsTooltip:n,firstLineDecorationClassName:_.ThemeIcon.asClassName(e.foldingCollapsedIcon)})}static{this.MANUALLY_COLLAPSED_VISUAL_DECORATION=k.ModelDecorationOptions.register({description:"folding-manually-collapsed-visual-decoration",stickiness:0,afterContentClassName:"inline-folded",isWholeLine:!0,linesDecorationsTooltip:n,firstLineDecorationClassName:_.ThemeIcon.asClassName(e.foldingManualCollapsedIcon)})}static{this.MANUALLY_COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION=k.ModelDecorationOptions.register({description:"folding-manually-collapsed-highlighted-visual-decoration",stickiness:0,afterContentClassName:"inline-folded",className:"folded-background",minimap:p,isWholeLine:!0,linesDecorationsTooltip:n,firstLineDecorationClassName:_.ThemeIcon.asClassName(e.foldingManualCollapsedIcon)})}static{this.NO_CONTROLS_COLLAPSED_RANGE_DECORATION=k.ModelDecorationOptions.register({description:"folding-no-controls-range-decoration",stickiness:0,afterContentClassName:"inline-folded",isWholeLine:!0,linesDecorationsTooltip:n})}static{this.NO_CONTROLS_COLLAPSED_HIGHLIGHTED_RANGE_DECORATION=k.ModelDecorationOptions.register({description:"folding-no-controls-range-decoration",stickiness:0,afterContentClassName:"inline-folded",className:"folded-background",minimap:p,isWholeLine:!0,linesDecorationsTooltip:n})}static{this.EXPANDED_VISUAL_DECORATION=k.ModelDecorationOptions.register({description:"folding-expanded-visual-decoration",stickiness:1,isWholeLine:!0,firstLineDecorationClassName:"alwaysShowFoldIcons "+_.ThemeIcon.asClassName(e.foldingExpandedIcon),linesDecorationsTooltip:s})}static{this.EXPANDED_AUTO_HIDE_VISUAL_DECORATION=k.ModelDecorationOptions.register({description:"folding-expanded-auto-hide-visual-decoration",stickiness:1,isWholeLine:!0,firstLineDecorationClassName:_.ThemeIcon.asClassName(e.foldingExpandedIcon),linesDecorationsTooltip:s})}static{this.MANUALLY_EXPANDED_VISUAL_DECORATION=k.ModelDecorationOptions.register({description:"folding-manually-expanded-visual-decoration",stickiness:0,isWholeLine:!0,firstLineDecorationClassName:"alwaysShowFoldIcons "+_.ThemeIcon.asClassName(e.foldingManualExpandedIcon),linesDecorationsTooltip:s})}static{this.MANUALLY_EXPANDED_AUTO_HIDE_VISUAL_DECORATION=k.ModelDecorationOptions.register({description:"folding-manually-expanded-auto-hide-visual-decoration",stickiness:0,isWholeLine:!0,firstLineDecorationClassName:_.ThemeIcon.asClassName(e.foldingManualExpandedIcon),linesDecorationsTooltip:s})}static{this.NO_CONTROLS_EXPANDED_RANGE_DECORATION=k.ModelDecorationOptions.register({description:"folding-no-controls-range-decoration",stickiness:0,isWholeLine:!0})}static{this.HIDDEN_RANGE_DECORATION=k.ModelDecorationOptions.register({description:"folding-hidden-range-decoration",stickiness:1})}constructor(o){this.editor=o,this.showFoldingControls="mouseover",this.showFoldingHighlights=!0}getDecorationOption(o,g,h){return g?t.HIDDEN_RANGE_DECORATION:this.showFoldingControls==="never"?o?this.showFoldingHighlights?t.NO_CONTROLS_COLLAPSED_HIGHLIGHTED_RANGE_DECORATION:t.NO_CONTROLS_COLLAPSED_RANGE_DECORATION:t.NO_CONTROLS_EXPANDED_RANGE_DECORATION:o?h?this.showFoldingHighlights?t.MANUALLY_COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION:t.MANUALLY_COLLAPSED_VISUAL_DECORATION:this.showFoldingHighlights?t.COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION:t.COLLAPSED_VISUAL_DECORATION:this.showFoldingControls==="mouseover"?h?t.MANUALLY_EXPANDED_AUTO_HIDE_VISUAL_DECORATION:t.EXPANDED_AUTO_HIDE_VISUAL_DECORATION:h?t.MANUALLY_EXPANDED_VISUAL_DECORATION:t.EXPANDED_VISUAL_DECORATION}changeDecorations(o){return this.editor.changeDecorations(o)}removeDecorations(o){this.editor.removeDecorations(o)}}e.FoldingDecorationProvider=t}),define(oe[287],re([1,0,14,18,8,72,2,11,19,142,15,20,28,34,349,634,350,3,12,419,204,351,50,79,59,17,6,24,22,44,27,520]),function(ae,e,c,k,E,L,y,f,_,C,p,n,s,t,i,o,g,h,l,a,r,d,m,u,b,v,w,S,D,I,T){"use strict";var M;Object.defineProperty(e,"__esModule",{value:!0}),e.RangesLimitReporter=e.FoldingController=void 0;const A=new l.RawContextKey("foldingEnabled",!1);let R=class extends y.Disposable{static{M=this}static{this.ID="editor.contrib.folding"}static get(J){return J.getContribution(M.ID)}static getFoldingRangeProviders(J,B){const U=J.foldingRangeProvider.ordered(B);return M._foldingRangeSelector?.(U,B)??U}constructor(J,B,U,z,$,Q){super(),this.contextKeyService=B,this.languageConfigurationService=U,this.languageFeaturesService=Q,this.localToDispose=this._register(new y.DisposableStore),this.editor=J,this._foldingLimitReporter=new N(J);const ee=this.editor.getOptions();this._isEnabled=ee.get(43),this._useFoldingProviders=ee.get(44)!=="indentation",this._unfoldOnClickAfterEndOfLine=ee.get(48),this._restoringViewState=!1,this._currentModelHasFoldedImports=!1,this._foldingImportsByDefault=ee.get(46),this.updateDebounceInfo=$.for(Q.foldingRangeProvider,"Folding",{min:200}),this.foldingModel=null,this.hiddenRangeModel=null,this.rangeProvider=null,this.foldingRegionPromise=null,this.foldingModelPromise=null,this.updateScheduler=null,this.cursorChangedScheduler=null,this.mouseDownInfo=null,this.foldingDecorationProvider=new a.FoldingDecorationProvider(J),this.foldingDecorationProvider.showFoldingControls=ee.get(111),this.foldingDecorationProvider.showFoldingHighlights=ee.get(45),this.foldingEnabled=A.bindTo(this.contextKeyService),this.foldingEnabled.set(this._isEnabled),this._register(this.editor.onDidChangeModel(()=>this.onModelChanged())),this._register(this.editor.onDidChangeConfiguration(le=>{if(le.hasChanged(43)&&(this._isEnabled=this.editor.getOptions().get(43),this.foldingEnabled.set(this._isEnabled),this.onModelChanged()),le.hasChanged(47)&&this.onModelChanged(),le.hasChanged(111)||le.hasChanged(45)){const de=this.editor.getOptions();this.foldingDecorationProvider.showFoldingControls=de.get(111),this.foldingDecorationProvider.showFoldingHighlights=de.get(45),this.triggerFoldingModelChanged()}le.hasChanged(44)&&(this._useFoldingProviders=this.editor.getOptions().get(44)!=="indentation",this.onFoldingStrategyChanged()),le.hasChanged(48)&&(this._unfoldOnClickAfterEndOfLine=this.editor.getOptions().get(48)),le.hasChanged(46)&&(this._foldingImportsByDefault=this.editor.getOptions().get(46))})),this.onModelChanged()}saveViewState(){const J=this.editor.getModel();if(!J||!this._isEnabled||J.isTooLargeForTokenization())return{};if(this.foldingModel){const B=this.foldingModel.getMemento(),U=this.rangeProvider?this.rangeProvider.id:void 0;return{collapsedRegions:B,lineCount:J.getLineCount(),provider:U,foldedImports:this._currentModelHasFoldedImports}}}restoreViewState(J){const B=this.editor.getModel();if(!(!B||!this._isEnabled||B.isTooLargeForTokenization()||!this.hiddenRangeModel)&&J&&(this._currentModelHasFoldedImports=!!J.foldedImports,J.collapsedRegions&&J.collapsedRegions.length>0&&this.foldingModel)){this._restoringViewState=!0;try{this.foldingModel.applyMemento(J.collapsedRegions)}finally{this._restoringViewState=!1}}}onModelChanged(){this.localToDispose.clear();const J=this.editor.getModel();!this._isEnabled||!J||J.isTooLargeForTokenization()||(this._currentModelHasFoldedImports=!1,this.foldingModel=new i.FoldingModel(J,this.foldingDecorationProvider),this.localToDispose.add(this.foldingModel),this.hiddenRangeModel=new o.HiddenRangeModel(this.foldingModel),this.localToDispose.add(this.hiddenRangeModel),this.localToDispose.add(this.hiddenRangeModel.onDidChange(B=>this.onHiddenRangesChanges(B))),this.updateScheduler=new c.Delayer(this.updateDebounceInfo.get(J)),this.cursorChangedScheduler=new c.RunOnceScheduler(()=>this.revealCursor(),200),this.localToDispose.add(this.cursorChangedScheduler),this.localToDispose.add(this.languageFeaturesService.foldingRangeProvider.onDidChange(()=>this.onFoldingStrategyChanged())),this.localToDispose.add(this.editor.onDidChangeModelLanguageConfiguration(()=>this.onFoldingStrategyChanged())),this.localToDispose.add(this.editor.onDidChangeModelContent(B=>this.onDidChangeModelContent(B))),this.localToDispose.add(this.editor.onDidChangeCursorPosition(()=>this.onCursorPositionChanged())),this.localToDispose.add(this.editor.onMouseDown(B=>this.onEditorMouseDown(B))),this.localToDispose.add(this.editor.onMouseUp(B=>this.onEditorMouseUp(B))),this.localToDispose.add({dispose:()=>{this.foldingRegionPromise&&(this.foldingRegionPromise.cancel(),this.foldingRegionPromise=null),this.updateScheduler?.cancel(),this.updateScheduler=null,this.foldingModel=null,this.foldingModelPromise=null,this.hiddenRangeModel=null,this.cursorChangedScheduler=null,this.rangeProvider?.dispose(),this.rangeProvider=null}}),this.triggerFoldingModelChanged())}onFoldingStrategyChanged(){this.rangeProvider?.dispose(),this.rangeProvider=null,this.triggerFoldingModelChanged()}getRangeProvider(J){if(this.rangeProvider)return this.rangeProvider;const B=new g.IndentRangeProvider(J,this.languageConfigurationService,this._foldingLimitReporter);if(this.rangeProvider=B,this._useFoldingProviders&&this.foldingModel){const U=M.getFoldingRangeProviders(this.languageFeaturesService,J);U.length>0&&(this.rangeProvider=new d.SyntaxRangeProvider(J,U,()=>this.triggerFoldingModelChanged(),this._foldingLimitReporter,B))}return this.rangeProvider}getFoldingModel(){return this.foldingModelPromise}onDidChangeModelContent(J){this.hiddenRangeModel?.notifyChangeModelContent(J),this.triggerFoldingModelChanged()}triggerFoldingModelChanged(){this.updateScheduler&&(this.foldingRegionPromise&&(this.foldingRegionPromise.cancel(),this.foldingRegionPromise=null),this.foldingModelPromise=this.updateScheduler.trigger(()=>{const J=this.foldingModel;if(!J)return null;const B=new b.StopWatch,U=this.getRangeProvider(J.textModel),z=this.foldingRegionPromise=(0,c.createCancelablePromise)($=>U.compute($));return z.then($=>{if($&&z===this.foldingRegionPromise){let Q;if(this._foldingImportsByDefault&&!this._currentModelHasFoldedImports){const me=$.setCollapsedAllOfType(s.FoldingRangeKind.Imports.value,!0);me&&(Q=C.StableEditorScrollState.capture(this.editor),this._currentModelHasFoldedImports=me)}const ee=this.editor.getSelections(),le=ee?ee.map(me=>me.startLineNumber):[];J.update($,le),Q?.restore(this.editor);const de=this.updateDebounceInfo.update(J.textModel,B.elapsed());this.updateScheduler&&(this.updateScheduler.defaultDelay=de)}return J})}).then(void 0,J=>((0,E.onUnexpectedError)(J),null)))}onHiddenRangesChanges(J){if(this.hiddenRangeModel&&J.length&&!this._restoringViewState){const B=this.editor.getSelections();B&&this.hiddenRangeModel.adjustSelections(B)&&this.editor.setSelections(B)}this.editor.setHiddenAreas(J,this)}onCursorPositionChanged(){this.hiddenRangeModel&&this.hiddenRangeModel.hasRanges()&&this.cursorChangedScheduler.schedule()}revealCursor(){const J=this.getFoldingModel();J&&J.then(B=>{if(B){const U=this.editor.getSelections();if(U&&U.length>0){const z=[];for(const $ of U){const Q=$.selectionStartLineNumber;this.hiddenRangeModel&&this.hiddenRangeModel.isHidden(Q)&&z.push(...B.getAllRegionsAtLine(Q,ee=>ee.isCollapsed&&Q>ee.startLineNumber))}z.length&&(B.toggleCollapseState(z),this.reveal(U[0].getPosition()))}}}).then(void 0,E.onUnexpectedError)}onEditorMouseDown(J){if(this.mouseDownInfo=null,!this.hiddenRangeModel||!J.target||!J.target.range||!J.event.leftButton&&!J.event.middleButton)return;const B=J.target.range;let U=!1;switch(J.target.type){case 4:{const z=J.target.detail,$=J.target.element.offsetLeft;if(z.offsetX-$<4)return;U=!0;break}case 7:{if(this._unfoldOnClickAfterEndOfLine&&this.hiddenRangeModel.hasRanges()&&!J.target.detail.isAfterLines)break;return}case 6:{if(this.hiddenRangeModel.hasRanges()){const z=this.editor.getModel();if(z&&B.startColumn===z.getLineMaxColumn(B.startLineNumber))break}return}default:return}this.mouseDownInfo={lineNumber:B.startLineNumber,iconClicked:U}}onEditorMouseUp(J){const B=this.foldingModel;if(!B||!this.mouseDownInfo||!J.target)return;const U=this.mouseDownInfo.lineNumber,z=this.mouseDownInfo.iconClicked,$=J.target.range;if(!$||$.startLineNumber!==U)return;if(z){if(J.target.type!==4)return}else{const ee=this.editor.getModel();if(!ee||$.startColumn!==ee.getLineMaxColumn(U))return}const Q=B.getRegionAtLine(U);if(Q&&Q.startLineNumber===U){const ee=Q.isCollapsed;if(z||ee){const le=J.event.altKey;let de=[];if(le){const me=ve=>!ve.containedBy(Q)&&!Q.containedBy(ve),be=B.getRegionsInside(null,me);for(const ve of be)ve.isCollapsed&&de.push(ve);de.length===0&&(de=be)}else{const me=J.event.middleButton||J.event.shiftKey;if(me)for(const be of B.getRegionsInside(Q))be.isCollapsed===ee&&de.push(be);(ee||!me||de.length===0)&&de.push(Q)}B.toggleCollapseState(de),this.reveal({lineNumber:U,column:1})}}}reveal(J){this.editor.revealPositionInCenterIfOutsideViewport(J,0)}};e.FoldingController=R,e.FoldingController=R=M=De([he(1,l.IContextKeyService),he(2,t.ILanguageConfigurationService),he(3,m.INotificationService),he(4,u.ILanguageFeatureDebounceService),he(5,v.ILanguageFeaturesService)],R);class N{constructor(J){this.editor=J,this._onDidChange=new w.Emitter,this._computed=0,this._limited=!1}get limit(){return this.editor.getOptions().get(47)}update(J,B){(J!==this._computed||B!==this._limited)&&(this._computed=J,this._limited=B,this._onDidChange.fire())}}e.RangesLimitReporter=N;class O extends p.EditorAction{runEditorCommand(J,B,U){const z=J.get(t.ILanguageConfigurationService),$=R.get(B);if(!$)return;const Q=$.getFoldingModel();if(Q)return this.reportTelemetry(J,B),Q.then(ee=>{if(ee){this.invoke($,ee,B,U,z);const le=B.getSelection();le&&$.reveal(le.getStartPosition())}})}getSelectedLines(J){const B=J.getSelections();return B?B.map(U=>U.startLineNumber):[]}getLineNumbers(J,B){return J&&J.selectionLines?J.selectionLines.map(U=>U+1):this.getSelectedLines(B)}run(J,B){}}function x(ne){if(!_.isUndefined(ne)){if(!_.isObject(ne))return!1;const J=ne;if(!_.isUndefined(J.levels)&&!_.isNumber(J.levels)||!_.isUndefined(J.direction)&&!_.isString(J.direction)||!_.isUndefined(J.selectionLines)&&(!Array.isArray(J.selectionLines)||!J.selectionLines.every(_.isNumber)))return!1}return!0}class F extends O{constructor(){super({id:"editor.unfold",label:h.localize(785,"Unfold"),alias:"Unfold",precondition:A,kbOpts:{kbExpr:n.EditorContextKeys.editorTextFocus,primary:3166,mac:{primary:2654},weight:100},metadata:{description:"Unfold the content in the editor",args:[{name:"Unfold editor argument",description:`Property-value pairs that can be passed through this argument:
|
|
687
687
|
* 'levels': Number of levels to unfold. If not set, defaults to 1.
|